|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[30],[,,function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return r})),function(e){e.JoinCall="io.element.join",e.HangupCall="im.vector.hangup",e.CallParticipants="io.element.participants",e.MuteAudio="io.element.mute_audio",e.UnmuteAudio="io.element.unmute_audio",e.MuteVideo="io.element.mute_video",e.UnmuteVideo="io.element.unmute_video",e.StartLiveStream="im.vector.start_live_stream",e.ScreenshareRequest="io.element.screenshare_request",e.ScreenshareStart="io.element.screenshare_start",e.ScreenshareStop="io.element.screenshare_stop",e.TileLayout="io.element.tile_layout",e.SpotlightLayout="io.element.spotlight_layout",e.OpenIntegrationManager="integration_manager_open",e.ViewRoom="io.element.view_room"}(r||(r={}))},,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(60);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var i=n(61);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var o=n(25);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=n(62);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var s=n(21);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var l=n(63);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var c=n(64);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var u=n(65);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var d=n(66);Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===d[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}}))}));var h=n(33);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===h[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}}))}));var p=n(67);Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===p[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}}))}));var m=n(68);Object.keys(m).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===m[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return m[e]}}))}));var g=n(69);Object.keys(g).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===g[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return g[e]}}))}));var f=n(22);Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===f[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))}));var _=n(19);Object.keys(_).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===_[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return _[e]}}))}));var b=n(20);Object.keys(b).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===b[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return b[e]}}))}));var v=n(35);Object.keys(v).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===v[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return v[e]}}))}));var y=n(70);Object.keys(y).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===y[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return y[e]}}))}));var E=n(71);Object.keys(E).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===E[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return E[e]}}))}));var S=n(72);Object.keys(S).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===S[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return S[e]}}))}));var w=n(73);Object.keys(w).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===w[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return w[e]}}))}));var T=n(74);Object.keys(T).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===T[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return T[e]}}))}));var C=n(75);Object.keys(C).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===C[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return C[e]}}))}));var x=n(76);Object.keys(x).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===x[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return x[e]}}))}));var F=n(23);Object.keys(F).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===F[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return F[e]}}))}));var D=n(77);Object.keys(D).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===D[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return D[e]}}))}));var k=n(78);Object.keys(k).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===k[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return k[e]}}))}));var O=n(79);Object.keys(O).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===O[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return O[e]}}))}));var I=n(34);Object.keys(I).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===I[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return I[e]}}))}));var A=n(80);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===A[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}}))}));var R=n(81);Object.keys(R).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===R[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return R[e]}}))}));var N=n(82);Object.keys(N).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===N[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return N[e]}}))}));var M=n(83);Object.keys(M).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===M[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return M[e]}}))}));var P=n(84);Object.keys(P).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===P[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return P[e]}}))}));var L=n(85);Object.keys(L).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===L[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return L[e]}}))}));var B=n(86);Object.keys(B).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===B[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return B[e]}}))}));var U=n(87);Object.keys(U).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===U[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return U[e]}}))}));var j=n(88);Object.keys(j).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===j[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return j[e]}}))}));var G=n(24);Object.keys(G).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===G[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return G[e]}}))}));var z=n(37);Object.keys(z).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===z[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return z[e]}}))}));var H=n(38);Object.keys(H).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===H[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return H[e]}}))}));var q=n(39);Object.keys(q).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===q[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return q[e]}}))}));var V=n(89);Object.keys(V).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===V[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return V[e]}}))}));var $=n(90);Object.keys($).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===$[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return $[e]}}))}));var K=n(36);Object.keys(K).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===K[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return K[e]}}))}));var W=n(91);Object.keys(W).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===W[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return W[e]}}))}))},,,,,,,,,,,function(e,t,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}_(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&_(e,"error",t,n)}(e,i,{once:!0})}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var l=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var i,o,a,s;if(c(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),a=o[t]),void 0===a)a=o[t]=n,++e._eventsCount;else if("function"==typeof a?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=u(e))>0&&a.length>i&&!a.warned){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=a.length,s=l,console&&console.warn&&console.warn(s)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=h.bind(r);return i.listener=n,r.wrapFn=i,i}function m(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):f(i,i.length)}function g(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function f(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function _(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){r.once&&e.removeEventListener(t,i),n(o)}))}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");l=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=i[e];if(void 0===l)return!1;if("function"==typeof l)o(l,this,t);else{var c=l.length,u=f(l,c);for(n=0;n<c;++n)o(u[n],this,t)}return!0},s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)},s.prototype.once=function(e,t){return c(t),this.on(e,p(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,p(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,o,a;if(c(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return m(this,e,!0)},s.prototype.rawListeners=function(e){return m(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},s.prototype.listenerCount=g,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},,function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.WidgetApiDirection=void 0,t.invertedDirection=function(e){if(e===r.ToWidget)return r.FromWidget;if(e===r.FromWidget)return r.ToWidget;throw new Error("Invalid direction")},t.WidgetApiDirection=r,function(e){e.ToWidget="toWidget",e.FromWidget="fromWidget"}(r||(t.WidgetApiDirection=r={}))},function(e,t,n){"use strict";var r,i;Object.defineProperty(t,"__esModule",{value:!0}),t.UnstableApiVersion=t.MatrixApiVersion=t.CurrentApiVersions=void 0,t.MatrixApiVersion=r,function(e){e.Prerelease1="0.0.1",e.Prerelease2="0.0.2"}(r||(t.MatrixApiVersion=r={})),t.UnstableApiVersion=i,function(e){e.MSC2762="org.matrix.msc2762",e.MSC2871="org.matrix.msc2871",e.MSC2931="org.matrix.msc2931",e.MSC2974="org.matrix.msc2974",e.MSC2876="org.matrix.msc2876",e.MSC3819="org.matrix.msc3819",e.MSC3846="town.robin.msc3846",e.MSC3869="org.matrix.msc3869"}(i||(t.UnstableApiVersion=i={}));var o=[r.Prerelease1,r.Prerelease2,i.MSC2762,i.MSC2871,i.MSC2931,i.MSC2974,i.MSC2876,i.MSC3819,i.MSC3846,i.MSC3869];t.CurrentApiVersions=o},function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.PostmessageTransport=void 0;var i=n(17),o=n(6);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return d(e)}(this,n)}}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(a,e);var t,n,r,i=u(a);function a(e,t,n,r){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(o=i.call(this)).sendDirection=e,o.initialWidgetId=t,o.transportWindow=n,o.inboundWindow=r,p(d(o),"strictOriginCheck",void 0),p(d(o),"targetOrigin",void 0),p(d(o),"timeoutSeconds",10),p(d(o),"_ready",!1),p(d(o),"_widgetId",null),p(d(o),"outboundRequests",new Map),p(d(o),"stopController",new AbortController),o._widgetId=t,o}return t=a,(n=[{key:"ready",get:function(){return this._ready}},{key:"widgetId",get:function(){return this._widgetId||null}},{key:"nextRequestId",get:function(){for(var e="widgetapi-".concat(Date.now()),t=0,n=e;this.outboundRequests.has(n);)n="".concat(e,"-").concat(t++);return this.outboundRequests.set(n,null),n}},{key:"sendInternal",value:function(e){var t=this.targetOrigin||"*";console.log("[PostmessageTransport] Sending object to ".concat(t,": "),e),this.transportWindow.postMessage(e,t)}},{key:"reply",value:function(e,t){return this.sendInternal(s(s({},e),{},{response:t}))}},{key:"send",value:function(e,t){return this.sendComplete(e,t).then((function(e){return e.response}))}},{key:"sendComplete",value:function(e,t){var n=this;if(!this.ready||!this.widgetId)return Promise.reject(new Error("Not ready or unknown widget ID"));var r={api:this.sendDirection,widgetId:this.widgetId,requestId:this.nextRequestId,action:e,data:t};return e===o.WidgetApiToWidgetAction.UpdateVisibility&&(r.visible=t.visible),new Promise((function(e,t){var i=function(e){s(),t(e)},o=setTimeout((function(){return i(new Error("Request timed out"))}),1e3*(n.timeoutSeconds||1)),a=function(){return i(new Error("Transport stopped"))};n.stopController.signal.addEventListener("abort",a);var s=function(){n.outboundRequests.delete(r.requestId),clearTimeout(o),n.stopController.signal.removeEventListener("abort",a)};n.outboundRequests.set(r.requestId,{request:r,resolve:function(t){s(),e(t)},reject:i}),n.sendInternal(r)}))}},{key:"start",value:function(){var e=this;this.inboundWindow.addEventListener("message",(function(t){e.handleMessage(t)})),this._ready=!0}},{key:"stop",value:function(){this._ready=!1,this.stopController.abort()}},{key:"handleMessage",value:function(e){if(!this.stopController.signal.aborted&&e.data&&(!this.strictOriginCheck||e.origin===window.origin)){var t=e.data;if(t.action&&t.requestId&&t.widgetId)if(t.response){if(t.api!==this.sendDirection)return;this.handleResponse(t)}else{var n=t;if(n.api!==(0,o.invertedDirection)(this.sendDirection))return;this.handleRequest(n)}}}},{key:"handleRequest",value:function(e){if(this.widgetId){if(this.widgetId!==e.widgetId)return}else this._widgetId=e.widgetId;this.emit("message",new CustomEvent("message",{detail:e}))}},{key:"handleResponse",value:function(e){if(e.widgetId===this.widgetId){var t=this.outboundRequests.get(e.requestId);if(t)if((0,o.isErrorResponse)(e.response)){var n=e.response;t.reject(new Error(n.error.message))}else t.resolve(e)}}}])&&l(t.prototype,n),r&&l(t,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(i.EventEmitter);t.PostmessageTransport=m},function(e,t,n){"use strict";var r,i;Object.defineProperty(t,"__esModule",{value:!0}),t.WidgetApiToWidgetAction=t.WidgetApiFromWidgetAction=void 0,t.WidgetApiToWidgetAction=r,function(e){e.SupportedApiVersions="supported_api_versions",e.Capabilities="capabilities",e.NotifyCapabilities="notify_capabilities",e.TakeScreenshot="screenshot",e.UpdateVisibility="visibility",e.OpenIDCredentials="openid_credentials",e.WidgetConfig="widget_config",e.CloseModalWidget="close_modal",e.ButtonClicked="button_clicked",e.SendEvent="send_event",e.SendToDevice="send_to_device",e.UpdateTurnServers="update_turn_servers"}(r||(t.WidgetApiToWidgetAction=r={})),t.WidgetApiFromWidgetAction=i,function(e){e.SupportedApiVersions="supported_api_versions",e.ContentLoaded="content_loaded",e.SendSticker="m.sticker",e.UpdateAlwaysOnScreen="set_always_on_screen",e.GetOpenIDCredentials="get_openid",e.CloseModalWidget="close_modal",e.OpenModalWidget="open_modal",e.SetModalButtonEnabled="set_button_enabled",e.SendEvent="send_event",e.SendToDevice="send_to_device",e.WatchTurnServers="watch_turn_servers",e.UnwatchTurnServers="unwatch_turn_servers",e.MSC2876ReadEvents="org.matrix.msc2876.read_events",e.MSC2931Navigate="org.matrix.msc2931.navigate",e.MSC2974RenegotiateCapabilities="org.matrix.msc2974.request_capabilities",e.MSC3869ReadRelations="org.matrix.msc3869.read_relations"}(i||(t.WidgetApiFromWidgetAction=i={}))},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.OpenIDRequestState=void 0,t.OpenIDRequestState=r,function(e){e.Allowed="allowed",e.Blocked="blocked",e.PendingUserConfirmation="request"}(r||(t.OpenIDRequestState=r={}))},function(e,t,n){"use strict";function r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){l=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a,s;Object.defineProperty(t,"__esModule",{value:!0}),t.WidgetEventCapability=t.EventKind=t.EventDirection=void 0,t.EventKind=a,function(e){e.Event="event",e.State="state_event",e.ToDevice="to_device"}(a||(t.EventKind=a={})),t.EventDirection=s,function(e){e.Send="send",e.Receive="receive"}(s||(t.EventDirection=s={}));var l=function(){function e(t,n,r,i,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.direction=t,this.eventType=n,this.kind=r,this.keyStr=i,this.raw=o}var t,n,i;return t=e,n=[{key:"matchesAsStateEvent",value:function(e,t,n){return this.kind===a.State&&this.direction===e&&this.eventType===t&&(null===this.keyStr||this.keyStr===n)}},{key:"matchesAsToDeviceEvent",value:function(e,t){return this.kind===a.ToDevice&&this.direction===e&&this.eventType===t}},{key:"matchesAsRoomEvent",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return this.kind===a.Event&&this.direction===e&&this.eventType===t&&("m.room.message"!==this.eventType||null===this.keyStr||this.keyStr===n)}}],i=[{key:"forStateEvent",value:function(t,n,r){n=n.replace(/#/g,"\\#"),r=null!=r?"#".concat(r):"";var i="org.matrix.msc2762.".concat(t,".state_event:").concat(n).concat(r);return e.findEventCapabilities([i])[0]}},{key:"forToDeviceEvent",value:function(t,n){var r="org.matrix.msc3819.".concat(t,".to_device:").concat(n);return e.findEventCapabilities([r])[0]}},{key:"forRoomEvent",value:function(t,n){var r="org.matrix.msc2762.".concat(t,".event:").concat(n);return e.findEventCapabilities([r])[0]}},{key:"forRoomMessageEvent",value:function(t,n){n=null==n?"":n;var r="org.matrix.msc2762.".concat(t,".event:m.room.message#").concat(n);return e.findEventCapabilities([r])[0]}},{key:"findEventCapabilities",value:function(t){var n,i=[],o=r(t);try{for(o.s();!(n=o.n()).done;){var l=n.value,c=null,u=void 0,d=null;if(l.startsWith("org.matrix.msc2762.send.event:")?(c=s.Send,d=a.Event,u=l.substring("org.matrix.msc2762.send.event:".length)):l.startsWith("org.matrix.msc2762.send.state_event:")?(c=s.Send,d=a.State,u=l.substring("org.matrix.msc2762.send.state_event:".length)):l.startsWith("org.matrix.msc3819.send.to_device:")?(c=s.Send,d=a.ToDevice,u=l.substring("org.matrix.msc3819.send.to_device:".length)):l.startsWith("org.matrix.msc2762.receive.event:")?(c=s.Receive,d=a.Event,u=l.substring("org.matrix.msc2762.receive.event:".length)):l.startsWith("org.matrix.msc2762.receive.state_event:")?(c=s.Receive,d=a.State,u=l.substring("org.matrix.msc2762.receive.state_event:".length)):l.startsWith("org.matrix.msc3819.receive.to_device:")&&(c=s.Receive,d=a.ToDevice,u=l.substring("org.matrix.msc3819.receive.to_device:".length)),null!==c&&null!==d){var h=u.startsWith("m.room.message#")||d===a.State,p=null;if(u.includes("#")&&h){var m=u.split("#"),g=m.findIndex((function(e){return!e.endsWith("\\")}));u=m.slice(0,g+1).map((function(e){return e.endsWith("\\")?e.substring(0,e.length-1):e})).join("#"),p=m.slice(g+1).join("#")}i.push(new e(c,u,d,p,l))}}}catch(e){o.e(e)}finally{o.f()}return i}}],n&&o(t.prototype,n),i&&o(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.WidgetEventCapability=l},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.Symbols=void 0,t.Symbols=r,function(e){e.AnyRoom="*"}(r||(t.Symbols=r={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));class r{constructor(e){this.obj=e}get(e,t){const n=this.obj[e];return void 0!==n?n:this.obj[null!=t?t:(r=e,r.replace(/._./g,(e=>`${e[0]}${e[2].toUpperCase()}`)))];var r}toJSON(){return this.obj}}},,,,,,,function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.MatrixWidgetType=void 0,t.MatrixWidgetType=r,function(e){e.Custom="m.custom",e.JitsiMeet="m.jitsi",e.Stickerpicker="m.stickerpicker"}(r||(t.MatrixWidgetType=r={}))},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.BuiltInModalButtonID=void 0,t.BuiltInModalButtonID=r,function(e){e.Close="m.close"}(r||(t.BuiltInModalButtonID=r={}))},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.VideoConferenceCapabilities=t.StickerpickerCapabilities=t.MatrixCapabilities=void 0,t.getTimelineRoomIDFromCapability=function(e){return e.substring(e.indexOf(":")+1)},t.isTimelineCapability=function(e){return null==e?void 0:e.startsWith("org.matrix.msc2762.timeline:")},t.isTimelineCapabilityFor=function(e,t){return e==="org.matrix.msc2762.timeline:".concat(t)},t.MatrixCapabilities=r,function(e){e.Screenshots="m.capability.screenshot",e.StickerSending="m.sticker",e.AlwaysOnScreen="m.always_on_screen",e.RequiresClient="io.element.requires_client",e.MSC2931Navigate="org.matrix.msc2931.navigate",e.MSC3846TurnServers="town.robin.msc3846.turn_servers"}(r||(t.MatrixCapabilities=r={}));var i=[r.StickerSending];t.StickerpickerCapabilities=i;var o=[r.AlwaysOnScreen];t.VideoConferenceCapabilities=o},function(e,t,n){"use strict";function r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){l=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleObservable=void 0;var a=function(){function e(t){var n,r,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),i=[],(r="listeners")in(n=this)?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,t&&this.listeners.push(t)}var t,n,i;return t=e,(n=[{key:"onUpdate",value:function(e){this.listeners.push(e)}},{key:"update",value:function(e){var t,n=r(this.listeners);try{for(n.s();!(t=n.n()).done;)(0,t.value)(e)}catch(e){n.e(e)}finally{n.f()}}},{key:"close",value:function(){this.listeners=[]}}])&&o(t.prototype,n),i&&o(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.SimpleObservable=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidUrl=function(e){if(!e)return!1;try{var t=new URL(e);return"http"===t.protocol||"https"===t.protocol}catch(e){if(e instanceof TypeError)return!1;throw e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertPresent=function(e,t){if(!e[t])throw new Error("".concat(t," is required"))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Widget=void 0;var r=n(38),i=n(6);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.definition=t,!this.definition)throw new Error("Definition is required");(0,r.assertPresent)(t,"id"),(0,r.assertPresent)(t,"creatorUserId"),(0,r.assertPresent)(t,"type"),(0,r.assertPresent)(t,"url")}var t,n,a;return t=e,(n=[{key:"creatorUserId",get:function(){return this.definition.creatorUserId}},{key:"type",get:function(){return this.definition.type}},{key:"id",get:function(){return this.definition.id}},{key:"name",get:function(){return this.definition.name||null}},{key:"title",get:function(){return this.rawData.title||null}},{key:"templateUrl",get:function(){return this.definition.url}},{key:"origin",get:function(){return new URL(this.templateUrl).origin}},{key:"waitForIframeLoad",get:function(){return!1!==this.definition.waitForIframeLoad&&(this.definition.waitForIframeLoad,!0)}},{key:"rawData",get:function(){return this.definition.data||{}}},{key:"getCompleteUrl",value:function(e){return(0,i.runTemplate)(this.templateUrl,this.definition,e)}}])&&o(t.prototype,n),a&&o(t,a),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.Widget=a},,,,,,,,,,,,,,function(e,t,n){"use strict";(function(e){var r=n(57),i=n(58),o=n(59);function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=l.prototype:(null===e&&(e=new l(t)),e.length=t),e}function l(e,t,n){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);l.TYPED_ARRAY_SUPPORT?(e=t).__proto__=l.prototype:e=h(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!l.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|m(t,n);e=s(e,r);var i=e.write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(l.isBuffer(t)){var n=0|p(t.length);return 0===(e=s(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?s(e,0):h(e,t);if("Buffer"===t.type&&o(t.data))return h(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t){if(u(t),e=s(e,t<0?0:0|p(t)),!l.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function h(e,t){var n=t.length<0?0:0|p(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function m(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return G(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,n);case"utf8":case"utf-8":return x(this,t,n);case"ascii":return D(this,t,n);case"latin1":case"binary":return k(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function f(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function _(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,i);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,i){var o,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var u=-1;for(o=n;o<s;o++)if(c(e,o)===c(t,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===l)return u*a}else-1!==u&&(o-=o-u),u=-1}else for(n+l>s&&(n=s-l),o=n;o>=0;o--){for(var d=!0,h=0;h<l;h++)if(c(e,o+h)!==c(t,h)){d=!1;break}if(d)return o}return-1}function v(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function y(e,t,n,r){return H(G(t,e.length-n),e,n,r)}function E(e,t,n,r){return H(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function S(e,t,n,r){return E(e,t,n,r)}function w(e,t,n,r){return H(z(t),e,n,r)}function T(e,t,n,r){return H(function(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)r=(n=e.charCodeAt(a))>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function C(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function x(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,a,s,l,c=e[i],u=null,d=c>239?4:c>223?3:c>191?2:1;if(i+d<=n)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&c)<<6|63&o)>127&&(u=l);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(l=(15&c)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(l=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=d}return function(e){var t=e.length;if(t<=F)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=F));return n}(r)}t.Buffer=l,t.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},t.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,n){return c(null,e,t,n)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(e,t,n){return function(e,t,n,r){return u(t),t<=0?s(e,t):void 0!==n?"string"==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},l.allocUnsafe=function(e){return d(null,e)},l.allocUnsafeSlow=function(e){return d(null,e)},l.isBuffer=function(e){return!(null==e||!e._isBuffer)},l.compare=function(e,t){if(!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=l.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var a=e[n];if(!l.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},l.byteLength=m,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)f(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)f(this,t,t+3),f(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)f(this,t,t+7),f(this,t+1,t+6),f(this,t+2,t+5),f(this,t+3,t+4);return this},l.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?x(this,0,e):g.apply(this,arguments)},l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},l.prototype.compare=function(e,t,n,r,i){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(r,i),u=e.slice(t,n),d=0;d<s;++d)if(c[d]!==u[d]){o=c[d],a=u[d];break}return o<a?-1:a<o?1:0},l.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},l.prototype.indexOf=function(e,t,n){return _(this,e,t,n,!0)},l.prototype.lastIndexOf=function(e,t,n){return _(this,e,t,n,!1)},l.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return y(this,e,t,n);case"ascii":return E(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return w(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var F=4096;function D(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function k(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function O(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=j(e[o]);return i}function I(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function A(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,n,r,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function N(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function M(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function P(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(e,t,n,r,o){return o||P(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,o){return o||P(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),l.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=l.prototype;else{var i=t-e;n=new l(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},l.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},l.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUInt8=function(e,t){return t||A(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||A(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||A(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||A(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||A(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return t||A(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||A(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||A(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||A(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||A(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||A(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||A(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||A(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||A(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||R(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},l.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||R(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);R(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);R(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return L(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return L(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},l.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!l.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var a=l.isBuffer(e)?e:G(new l(e,r).toString()),s=a.length;for(o=0;o<n-t;++o)this[o+t]=a[o%s]}return this};var U=/[^+\/0-9A-Za-z-_]/g;function j(e){return e<16?"0"+e.toString(16):e.toString(16)}function G(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function z(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function H(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(14))},,,,function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=c(e),a=r[0],s=r[1],l=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),u=0,d=s>0?a-4:a;for(n=0;n<d;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],l[u++]=t>>16&255,l[u++]=t>>8&255,l[u++]=255&t;2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,l[u++]=255&t);1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t);return l},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,l=n-i;s<l;s+=a)o.push(u(e,s,s+a>l?l:s+a));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=a.length;s<l;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var i,o,a=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<<s)-1,c=l>>1,u=-7,d=n?i-1:0,h=n?-1:1,p=e[t+d];for(d+=h,o=p&(1<<-u)-1,p>>=-u,u+=s;u>0;o=256*o+e[t+d],d+=h,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=256*a+e[t+d],d+=h,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=c}return(p?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,l,c=8*o-i-1,u=(1<<c)-1,d=u>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,m=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+d>=1?h/l:h*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(t*l-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[n+p]=255&s,p+=m,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[n+p]=255&a,p+=m,a/=256,c-=8);e[n+p-m]|=128*g}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.WidgetApi=void 0;var i=n(17),o=n(19),a=n(20),s=n(21),l=n(22),c=n(23),u=n(33),d=n(34),h=n(24),p=n(25);function m(){m=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var i=t&&t.prototype instanceof h?t:h,o=Object.create(i.prototype),a=new C(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return F()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=S(a,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,a),o}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var d={};function h(){}function p(){}function g(){}var f={};l(f,o,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(x([])));b&&b!==t&&n.call(b,o)&&(f=b);var v=g.prototype=h.prototype=Object.create(f);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function i(o,a,s,l){var c=u(e[o],e,a);if("throw"!==c.type){var d=c.arg,h=d.value;return h&&"object"==r(h)&&n.call(h,"__await")?t.resolve(h.__await).then((function(e){i("next",e,s,l)}),(function(e){i("throw",e,s,l)})):t.resolve(h).then((function(e){d.value=e,s(d)}),(function(e){return i("throw",e,s,l)}))}l(c.arg)}var o;this._invoke=function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}}function S(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,d;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function x(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:F}}function F(){return{value:void 0,done:!0}}return p.prototype=g,l(v,"constructor",g),l(g,"constructor",p),p.displayName=l(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,l(e,s,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(E.prototype),l(E.prototype,a,(function(){return this})),e.AsyncIterator=E,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new E(c(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(v),l(v,s,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=x,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:x(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function g(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function f(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){g(o,r,i,a,s,"next",e)}function s(e){g(o,r,i,a,s,"throw",e)}a(void 0)}))}}function _(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=E(e);if(t){var o=E(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return y(e)}(this,n)}}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e){return new C(e)}function T(e){var t,n;function r(t,n){try{var o=e[t](n),a=o.value,s=a instanceof C;Promise.resolve(s?a.wrapped:a).then((function(e){s?r("return"===t?"return":"next",e):i(o.done?"return":"normal",e)}),(function(e){r("throw",e)}))}catch(e){i("throw",e)}}function i(e,i){switch(e){case"return":t.resolve({value:i,done:!0});break;case"throw":t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise((function(o,a){var s={key:e,arg:i,resolve:o,reject:a,next:null};n?n=n.next=s:(t=n=s,r(e,i))}))},"function"!=typeof e.return&&(this.return=void 0)}function C(e){this.wrapped=e}T.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},T.prototype.next=function(e){return this._invoke("next",e)},T.prototype.throw=function(e){return this._invoke("throw",e)},T.prototype.return=function(e){return this._invoke("return",e)};var x=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}(E,e);var t,n,r,i,g=v(E);function E(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,E),(e=g.call(this)).clientOrigin=n,S(y(e),"transport",void 0),S(y(e),"capabilitiesFinished",!1),S(y(e),"supportsMSC2974Renegotiate",!1),S(y(e),"requestedCapabilities",[]),S(y(e),"approvedCapabilities",void 0),S(y(e),"cachedClientVersions",void 0),S(y(e),"turnServerWatchers",0),!window.parent)throw new Error("No parent window. This widget doesn't appear to be embedded properly.");return e.transport=new s.PostmessageTransport(o.WidgetApiDirection.FromWidget,t,window.parent,window),e.transport.targetOrigin=n,e.transport.on("message",e.handleMessage.bind(y(e))),e}return t=E,n=[{key:"hasCapability",value:function(e){return Array.isArray(this.approvedCapabilities)?this.approvedCapabilities.includes(e):this.requestedCapabilities.includes(e)}},{key:"requestCapability",value:function(e){if(this.capabilitiesFinished&&!this.supportsMSC2974Renegotiate)throw new Error("Capabilities have already been negotiated");this.requestedCapabilities.push(e)}},{key:"requestCapabilities",value:function(e){var t=this;e.forEach((function(e){return t.requestCapability(e)}))}},{key:"requestCapabilityForRoomTimeline",value:function(e){this.requestCapability("org.matrix.msc2762.timeline:".concat(e))}},{key:"requestCapabilityToSendState",value:function(e,t){this.requestCapability(h.WidgetEventCapability.forStateEvent(h.EventDirection.Send,e,t).raw)}},{key:"requestCapabilityToReceiveState",value:function(e,t){this.requestCapability(h.WidgetEventCapability.forStateEvent(h.EventDirection.Receive,e,t).raw)}},{key:"requestCapabilityToSendToDevice",value:function(e){this.requestCapability(h.WidgetEventCapability.forToDeviceEvent(h.EventDirection.Send,e).raw)}},{key:"requestCapabilityToReceiveToDevice",value:function(e){this.requestCapability(h.WidgetEventCapability.forToDeviceEvent(h.EventDirection.Receive,e).raw)}},{key:"requestCapabilityToSendEvent",value:function(e){this.requestCapability(h.WidgetEventCapability.forRoomEvent(h.EventDirection.Send,e).raw)}},{key:"requestCapabilityToReceiveEvent",value:function(e){this.requestCapability(h.WidgetEventCapability.forRoomEvent(h.EventDirection.Receive,e).raw)}},{key:"requestCapabilityToSendMessage",value:function(e){this.requestCapability(h.WidgetEventCapability.forRoomMessageEvent(h.EventDirection.Send,e).raw)}},{key:"requestCapabilityToReceiveMessage",value:function(e){this.requestCapability(h.WidgetEventCapability.forRoomMessageEvent(h.EventDirection.Receive,e).raw)}},{key:"requestOpenIDConnectToken",value:function(){var e=this;return new Promise((function(t,n){e.transport.sendComplete(l.WidgetApiFromWidgetAction.GetOpenIDCredentials,{}).then((function(r){var i=r.response;i.state===c.OpenIDRequestState.Allowed?t(i):i.state===c.OpenIDRequestState.Blocked?n(new Error("User declined to verify their identity")):i.state===c.OpenIDRequestState.PendingUserConfirmation?e.on("action:".concat(l.WidgetApiToWidgetAction.OpenIDCredentials),(function o(a){a.preventDefault();var s=a.detail;s.data.original_request_id===r.requestId&&(s.data.state===c.OpenIDRequestState.Allowed?(t(s.data),e.transport.reply(s,{})):s.data.state===c.OpenIDRequestState.Blocked?(n(new Error("User declined to verify their identity")),e.transport.reply(s,{})):(n(new Error("Invalid state on reply: "+i.state)),e.transport.reply(s,{error:{message:"Invalid state"}})),e.off("action:".concat(l.WidgetApiToWidgetAction.OpenIDCredentials),o))})):n(new Error("Invalid state: "+i.state))})).catch(n)}))}},{key:"updateRequestedCapabilities",value:function(){return this.transport.send(l.WidgetApiFromWidgetAction.MSC2974RenegotiateCapabilities,{capabilities:this.requestedCapabilities}).then()}},{key:"sendContentLoaded",value:function(){return this.transport.send(l.WidgetApiFromWidgetAction.ContentLoaded,{}).then()}},{key:"sendSticker",value:function(e){return this.transport.send(l.WidgetApiFromWidgetAction.SendSticker,e).then()}},{key:"setAlwaysOnScreen",value:function(e){return this.transport.send(l.WidgetApiFromWidgetAction.UpdateAlwaysOnScreen,{value:e}).then((function(e){return e.success}))}},{key:"openModalWidget",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:u.MatrixWidgetType.Custom;return this.transport.send(l.WidgetApiFromWidgetAction.OpenModalWidget,{type:i,url:e,name:t,buttons:n,data:r}).then()}},{key:"closeModalWidget",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.transport.send(l.WidgetApiFromWidgetAction.CloseModalWidget,e).then()}},{key:"sendRoomEvent",value:function(e,t,n){return this.transport.send(l.WidgetApiFromWidgetAction.SendEvent,{type:e,content:t,room_id:n})}},{key:"sendStateEvent",value:function(e,t,n,r){return this.transport.send(l.WidgetApiFromWidgetAction.SendEvent,{type:e,content:n,state_key:t,room_id:r})}},{key:"sendToDevice",value:function(e,t,n){return this.transport.send(l.WidgetApiFromWidgetAction.SendToDevice,{type:e,encrypted:t,messages:n})}},{key:"readRoomEvents",value:function(e,t,n,r){var i={type:e,msgtype:n};return void 0!==t&&(i.limit=t),r&&(r.includes(p.Symbols.AnyRoom)?i.room_ids=p.Symbols.AnyRoom:i.room_ids=r),this.transport.send(l.WidgetApiFromWidgetAction.MSC2876ReadEvents,i).then((function(e){return e.events}))}},{key:"readEventRelations",value:(i=f(m().mark((function e(t,n,r,i,o,s,c,u){var d;return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getClientVersions();case 2:if(e.sent.includes(a.UnstableApiVersion.MSC3869)){e.next=5;break}throw new Error("The read_relations action is not supported by the client.");case 5:return d={event_id:t,rel_type:r,event_type:i,room_id:n,to:c,from:s,limit:o,direction:u},e.abrupt("return",this.transport.send(l.WidgetApiFromWidgetAction.MSC3869ReadRelations,d));case 7:case"end":return e.stop()}}),e,this)}))),function(e,t,n,r,o,a,s,l){return i.apply(this,arguments)})},{key:"readStateEvents",value:function(e,t,n,r){var i={type:e,state_key:void 0===n||n};return void 0!==t&&(i.limit=t),r&&(r.includes(p.Symbols.AnyRoom)?i.room_ids=p.Symbols.AnyRoom:i.room_ids=r),this.transport.send(l.WidgetApiFromWidgetAction.MSC2876ReadEvents,i).then((function(e){return e.events}))}},{key:"setModalButtonEnabled",value:function(e,t){if(e===d.BuiltInModalButtonID.Close)throw new Error("The close button cannot be disabled");return this.transport.send(l.WidgetApiFromWidgetAction.SetModalButtonEnabled,{button:e,enabled:t}).then()}},{key:"navigateTo",value:function(e){if(!e||!e.startsWith("https://matrix.to/#"))throw new Error("Invalid matrix.to URI");return this.transport.send(l.WidgetApiFromWidgetAction.MSC2931Navigate,{uri:e}).then()}},{key:"getTurnServers",value:function(){var e,t=this;return(e=m().mark((function e(){var n,r;return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=function(){var e=f(m().mark((function e(r){return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r.preventDefault(),n(r.detail.data),e.next=4,t.transport.reply(r.detail,{});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.on("action:".concat(l.WidgetApiToWidgetAction.UpdateTurnServers),r),0!==t.turnServerWatchers){e.next=12;break}return e.prev=3,e.next=6,w(t.transport.send(l.WidgetApiFromWidgetAction.WatchTurnServers,{}));case 6:e.next=12;break;case 8:throw e.prev=8,e.t0=e.catch(3),t.off("action:".concat(l.WidgetApiToWidgetAction.UpdateTurnServers),r),e.t0;case 12:t.turnServerWatchers++,e.prev=13;case 14:return e.next=17,w(new Promise((function(e){return n=e})));case 17:return e.next=19,e.sent;case 19:e.next=14;break;case 21:if(e.prev=21,t.off("action:".concat(l.WidgetApiToWidgetAction.UpdateTurnServers),r),t.turnServerWatchers--,0!==t.turnServerWatchers){e.next=27;break}return e.next=27,w(t.transport.send(l.WidgetApiFromWidgetAction.UnwatchTurnServers,{}));case 27:return e.finish(21);case 28:case"end":return e.stop()}}),e,null,[[3,8],[13,,21,28]])})),function(){return new T(e.apply(this,arguments))})()}},{key:"start",value:function(){var e=this;this.transport.start(),this.getClientVersions().then((function(t){t.includes(a.UnstableApiVersion.MSC2974)&&(e.supportsMSC2974Renegotiate=!0)}))}},{key:"handleMessage",value:function(e){var t=new CustomEvent("action:".concat(e.detail.action),{detail:e.detail,cancelable:!0});if(this.emit("action:".concat(e.detail.action),t),!t.defaultPrevented)switch(e.detail.action){case l.WidgetApiToWidgetAction.SupportedApiVersions:return this.replyVersions(e.detail);case l.WidgetApiToWidgetAction.Capabilities:return this.handleCapabilities(e.detail);case l.WidgetApiToWidgetAction.UpdateVisibility:case l.WidgetApiToWidgetAction.NotifyCapabilities:return this.transport.reply(e.detail,{});default:return this.transport.reply(e.detail,{error:{message:"Unknown or unsupported action: "+e.detail.action}})}}},{key:"replyVersions",value:function(e){this.transport.reply(e,{supported_versions:a.CurrentApiVersions})}},{key:"getClientVersions",value:function(){var e=this;return Array.isArray(this.cachedClientVersions)?Promise.resolve(this.cachedClientVersions):this.transport.send(l.WidgetApiFromWidgetAction.SupportedApiVersions,{}).then((function(t){return e.cachedClientVersions=t.supported_versions,t.supported_versions})).catch((function(e){return console.warn("non-fatal error getting supported client versions: ",e),[]}))}},{key:"handleCapabilities",value:function(e){var t=this;return this.capabilitiesFinished?this.transport.reply(e,{error:{message:"Capability negotiation already completed"}}):this.getClientVersions().then((function(n){return n.includes(a.UnstableApiVersion.MSC2871)?t.once("action:".concat(l.WidgetApiToWidgetAction.NotifyCapabilities),(function(e){t.approvedCapabilities=e.detail.data.approved,t.emit("ready")})):t.emit("ready"),t.capabilitiesFinished=!0,t.transport.reply(e,{capabilities:t.requestedCapabilities})}))}}],n&&_(t.prototype,n),r&&_(t,r),Object.defineProperty(t,"prototype",{writable:!1}),E}(i.EventEmitter);t.WidgetApi=x},function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.ClientWidgetApi=void 0;var i=n(17),o=n(21),a=n(19),s=n(22),l=n(35),c=n(20),u=n(24),d=n(23),h=n(36),p=n(25);function m(){m=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var i=t&&t.prototype instanceof h?t:h,o=Object.create(i.prototype),a=new C(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return F()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=S(a,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,a),o}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var d={};function h(){}function p(){}function g(){}var f={};l(f,o,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(x([])));b&&b!==t&&n.call(b,o)&&(f=b);var v=g.prototype=h.prototype=Object.create(f);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function i(o,a,s,l){var c=u(e[o],e,a);if("throw"!==c.type){var d=c.arg,h=d.value;return h&&"object"==r(h)&&n.call(h,"__await")?t.resolve(h.__await).then((function(e){i("next",e,s,l)}),(function(e){i("throw",e,s,l)})):t.resolve(h).then((function(e){d.value=e,s(d)}),(function(e){return i("throw",e,s,l)}))}l(c.arg)}var o;this._invoke=function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}}function S(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,d;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function x(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:F}}function F(){return{value:void 0,done:!0}}return p.prototype=g,l(v,"constructor",g),l(g,"constructor",p),p.displayName=l(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,l(e,s,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(E.prototype),l(E.prototype,a,(function(){return this})),e.AsyncIterator=E,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new E(c(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(v),l(v,s,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=x,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:x(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function g(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function f(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){g(o,r,i,a,s,"next",e)}function s(e){g(o,r,i,a,s,"throw",e)}a(void 0)}))}}function _(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){x(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function E(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function S(e,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},S(e,t)}function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=C(e);if(t){var o=C(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return T(e)}(this,n)}}function T(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},C(e)}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F(e){var t,n,r,i=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new D(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function D(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return D=function(e){this.s=e,this.n=e.next},D.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new D(e)}var k=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S(e,t)}(I,e);var t,n,r,i,g,b,v,C,D,k,O=w(I);function I(e,t,n){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,I),(r=O.call(this)).widget=e,r.iframe=t,r.driver=n,x(T(r),"transport",void 0),x(T(r),"contentLoadedActionSent",!1),x(T(r),"allowedCapabilities",new Set),x(T(r),"allowedEvents",[]),x(T(r),"isStopped",!1),x(T(r),"turnServers",null),null==t||!t.contentWindow)throw new Error("No iframe supplied");if(!e)throw new Error("Invalid widget");if(!n)throw new Error("Invalid driver");return r.transport=new o.PostmessageTransport(a.WidgetApiDirection.ToWidget,e.id,t.contentWindow,window),r.transport.targetOrigin=e.origin,r.transport.on("message",r.handleMessage.bind(T(r))),t.addEventListener("load",r.onIframeLoad.bind(T(r))),r.transport.start(),r}return t=I,n=[{key:"hasCapability",value:function(e){return this.allowedCapabilities.has(e)}},{key:"canUseRoomTimeline",value:function(e){return this.hasCapability("org.matrix.msc2762.timeline:".concat(p.Symbols.AnyRoom))||this.hasCapability("org.matrix.msc2762.timeline:".concat(e))}},{key:"canSendRoomEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.allowedEvents.some((function(n){return n.matchesAsRoomEvent(u.EventDirection.Send,e,t)}))}},{key:"canSendStateEvent",value:function(e,t){return this.allowedEvents.some((function(n){return n.matchesAsStateEvent(u.EventDirection.Send,e,t)}))}},{key:"canSendToDeviceEvent",value:function(e){return this.allowedEvents.some((function(t){return t.matchesAsToDeviceEvent(u.EventDirection.Send,e)}))}},{key:"canReceiveRoomEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.allowedEvents.some((function(n){return n.matchesAsRoomEvent(u.EventDirection.Receive,e,t)}))}},{key:"canReceiveStateEvent",value:function(e,t){return this.allowedEvents.some((function(n){return n.matchesAsStateEvent(u.EventDirection.Receive,e,t)}))}},{key:"canReceiveToDeviceEvent",value:function(e){return this.allowedEvents.some((function(t){return t.matchesAsToDeviceEvent(u.EventDirection.Receive,e)}))}},{key:"stop",value:function(){this.isStopped=!0,this.transport.stop()}},{key:"beginCapabilities",value:function(){var e,t=this;this.emit("preparing"),this.transport.send(s.WidgetApiToWidgetAction.Capabilities,{}).then((function(n){return e=n.capabilities,t.driver.validateCapabilities(new Set(n.capabilities))})).then((function(n){console.log("Widget ".concat(t.widget.id," is allowed capabilities:"),Array.from(n)),t.allowedCapabilities=n,t.allowedEvents=u.WidgetEventCapability.findEventCapabilities(n),t.notifyCapabilities(e),t.emit("ready")}))}},{key:"notifyCapabilities",value:function(e){var t=this;this.transport.send(s.WidgetApiToWidgetAction.NotifyCapabilities,{requested:e,approved:Array.from(this.allowedCapabilities)}).catch((function(e){console.warn("non-fatal error notifying widget of approved capabilities:",e)})).then((function(){t.emit("capabilitiesNotified")}))}},{key:"onIframeLoad",value:function(e){this.widget.waitForIframeLoad?this.beginCapabilities():this.contentLoadedActionSent=!1}},{key:"handleContentLoadedAction",value:function(e){if(this.contentLoadedActionSent)throw new Error("Improper sequence: ContentLoaded Action can only be send once after the widget loaded and should only be used if waitForIframeLoad is false (default=true)");this.widget.waitForIframeLoad?this.transport.reply(e,{error:{message:"Improper sequence: not expecting ContentLoaded event if waitForIframLoad is true (default=true)"}}):(this.transport.reply(e,{}),this.beginCapabilities()),this.contentLoadedActionSent=!0}},{key:"replyVersions",value:function(e){this.transport.reply(e,{supported_versions:c.CurrentApiVersions})}},{key:"handleCapabilitiesRenegotiate",value:function(e){var t,n=this;this.transport.reply(e,{});var r=(null===(t=e.data)||void 0===t?void 0:t.capabilities)||[],i=new Set(r.filter((function(e){return!n.hasCapability(e)})));if(0===i.size)return this.notifyCapabilities([]);this.driver.validateCapabilities(i).then((function(e){return e.forEach((function(e){return n.allowedCapabilities.add(e)})),u.WidgetEventCapability.findEventCapabilities(e).forEach((function(e){return n.allowedEvents.push(e)})),n.notifyCapabilities(Array.from(i))}))}},{key:"handleNavigate",value:function(e){var t,n,r=this;if(!this.hasCapability(l.MatrixCapabilities.MSC2931Navigate))return this.transport.reply(e,{error:{message:"Missing capability"}});if(null===(t=e.data)||void 0===t||!t.uri||null===(n=e.data)||void 0===n||!n.uri.toString().startsWith("https://matrix.to/#"))return this.transport.reply(e,{error:{message:"Invalid matrix.to URI"}});var i=function(t){return console.error("[ClientWidgetApi] Failed to handle navigation: ",t),r.transport.reply(e,{error:{message:"Error handling navigation"}})};try{this.driver.navigate(e.data.uri.toString()).catch((function(e){return i(e)})).then((function(){return r.transport.reply(e,{})}))}catch(e){return i(e)}}},{key:"handleOIDC",value:function(e){var t=this,n=1,r=function(r,i){return i=i||{},n>1?t.transport.send(s.WidgetApiToWidgetAction.OpenIDCredentials,y({state:r,original_request_id:e.requestId},i)):t.transport.reply(e,y({state:r},i))},i=function(i){return console.error("[ClientWidgetApi] Failed to handle OIDC: ",i),n>1?r(d.OpenIDRequestState.Blocked):t.transport.reply(e,{error:{message:i}})},o=new h.SimpleObservable((function(e){return e.state===d.OpenIDRequestState.PendingUserConfirmation&&n>1?(o.close(),i("client provided out-of-phase response to OIDC flow")):e.state===d.OpenIDRequestState.PendingUserConfirmation?(r(e.state),void n++):e.state!==d.OpenIDRequestState.Allowed||e.token?(e.state===d.OpenIDRequestState.Blocked&&(e.token=null),o.close(),r(e.state,e.token)):i("client provided invalid OIDC token for an allowed request")}));this.driver.askOpenID(o)}},{key:"handleReadEvents",value:function(e){var t=this;if(!e.data.type)return this.transport.reply(e,{error:{message:"Invalid request - missing event type"}});if(void 0!==e.data.limit&&(!e.data.limit||e.data.limit<0))return this.transport.reply(e,{error:{message:"Invalid request - limit out of range"}});var n=null;if(e.data.room_ids){n=e.data.room_ids,Array.isArray(n)||(n=[n]);var r,i=_(n);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(!this.canUseRoomTimeline(o))return this.transport.reply(e,{error:{message:"Unable to access room timeline: ".concat(o)}})}}catch(e){i.e(e)}finally{i.f()}}var a=e.data.limit||0,s=Promise.resolve([]);if(void 0!==e.data.state_key){var l=!0===e.data.state_key?void 0:e.data.state_key.toString();if(!this.canReceiveStateEvent(e.data.type,l))return this.transport.reply(e,{error:{message:"Cannot read state events of this type"}});s=this.driver.readStateEvents(e.data.type,l,a,n)}else{if(!this.canReceiveRoomEvent(e.data.type,e.data.msgtype))return this.transport.reply(e,{error:{message:"Cannot read room events of this type"}});s=this.driver.readRoomEvents(e.data.type,e.data.msgtype,a,n)}return s.then((function(n){return t.transport.reply(e,{events:n})}))}},{key:"handleSendEvent",value:function(e){var t,n=this;if(!e.data.type)return this.transport.reply(e,{error:{message:"Invalid request - missing event type"}});if(e.data.room_id&&!this.canUseRoomTimeline(e.data.room_id))return this.transport.reply(e,{error:{message:"Unable to access room timeline: ".concat(e.data.room_id)}});if(null!==e.data.state_key&&void 0!==e.data.state_key){if(!this.canSendStateEvent(e.data.type,e.data.state_key))return this.transport.reply(e,{error:{message:"Cannot send state events of this type"}});t=this.driver.sendEvent(e.data.type,e.data.content||{},e.data.state_key,e.data.room_id)}else{var r=e.data.content||{},i=r.msgtype;if(!this.canSendRoomEvent(e.data.type,i))return this.transport.reply(e,{error:{message:"Cannot send room events of this type"}});t=this.driver.sendEvent(e.data.type,r,null,e.data.room_id)}t.then((function(t){return n.transport.reply(e,{room_id:t.roomId,event_id:t.eventId})})).catch((function(t){return console.error("error sending event: ",t),n.transport.reply(e,{error:{message:"Error sending event"}})}))}},{key:"handleSendToDevice",value:(k=f(m().mark((function e(t){return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.data.type){e.next=5;break}return e.next=3,this.transport.reply(t,{error:{message:"Invalid request - missing event type"}});case 3:case 8:case 13:case 18:case 25:e.next=32;break;case 5:if(t.data.messages){e.next=10;break}return e.next=8,this.transport.reply(t,{error:{message:"Invalid request - missing event contents"}});case 10:if("boolean"==typeof t.data.encrypted){e.next=15;break}return e.next=13,this.transport.reply(t,{error:{message:"Invalid request - missing encryption flag"}});case 15:if(this.canSendToDeviceEvent(t.data.type)){e.next=20;break}return e.next=18,this.transport.reply(t,{error:{message:"Cannot send to-device events of this type"}});case 20:return e.prev=20,e.next=23,this.driver.sendToDevice(t.data.type,t.data.encrypted,t.data.messages);case 23:return e.next=25,this.transport.reply(t,{});case 27:return e.prev=27,e.t0=e.catch(20),console.error("error sending to-device event",e.t0),e.next=32,this.transport.reply(t,{error:{message:"Error sending event"}});case 32:case"end":return e.stop()}}),e,this,[[20,27]])}))),function(e){return k.apply(this,arguments)})},{key:"pollTurnServers",value:(D=f(m().mark((function e(t,n){var r,i,o,a,l,c;return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.transport.send(s.WidgetApiToWidgetAction.UpdateTurnServers,n);case 3:r=!1,i=!1,e.prev=5,a=F(t);case 7:return e.next=9,a.next();case 9:if(!(r=!(l=e.sent).done)){e.next=16;break}return c=l.value,e.next=13,this.transport.send(s.WidgetApiToWidgetAction.UpdateTurnServers,c);case 13:r=!1,e.next=7;break;case 16:e.next=22;break;case 18:e.prev=18,e.t0=e.catch(5),i=!0,o=e.t0;case 22:if(e.prev=22,e.prev=23,!r||null==a.return){e.next=27;break}return e.next=27,a.return();case 27:if(e.prev=27,!i){e.next=30;break}throw o;case 30:return e.finish(27);case 31:return e.finish(22);case 32:e.next=37;break;case 34:e.prev=34,e.t1=e.catch(0),console.error("error polling for TURN servers",e.t1);case 37:case"end":return e.stop()}}),e,this,[[0,34],[5,18,22,32],[23,,27,31]])}))),function(e,t){return D.apply(this,arguments)})},{key:"handleWatchTurnServers",value:(C=f(m().mark((function e(t){var n,r,i,o;return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.hasCapability(l.MatrixCapabilities.MSC3846TurnServers)){e.next=5;break}return e.next=3,this.transport.reply(t,{error:{message:"Missing capability"}});case 3:case 8:e.next=30;break;case 5:if(!this.turnServers){e.next=10;break}return e.next=8,this.transport.reply(t,{});case 10:return e.prev=10,n=this.driver.getTurnServers(),e.next=14,n.next();case 14:if(r=e.sent,i=r.done,o=r.value,!i){e.next=19;break}throw new Error("Client refuses to provide any TURN servers");case 19:return e.next=21,this.transport.reply(t,{});case 21:this.pollTurnServers(n,o),this.turnServers=n,e.next=30;break;case 25:return e.prev=25,e.t0=e.catch(10),console.error("error getting first TURN server results",e.t0),e.next=30,this.transport.reply(t,{error:{message:"TURN servers not available"}});case 30:case"end":return e.stop()}}),e,this,[[10,25]])}))),function(e){return C.apply(this,arguments)})},{key:"handleUnwatchTurnServers",value:(v=f(m().mark((function e(t){return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.hasCapability(l.MatrixCapabilities.MSC3846TurnServers)){e.next=5;break}return e.next=3,this.transport.reply(t,{error:{message:"Missing capability"}});case 3:case 8:e.next=15;break;case 5:if(this.turnServers){e.next=10;break}return e.next=8,this.transport.reply(t,{});case 10:return e.next=12,this.turnServers.return(void 0);case 12:return this.turnServers=null,e.next=15,this.transport.reply(t,{});case 15:case"end":return e.stop()}}),e,this)}))),function(e){return v.apply(this,arguments)})},{key:"handleReadRelations",value:(b=f(m().mark((function e(t){var n,r,i=this;return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.data.event_id){e.next=2;break}return e.abrupt("return",this.transport.reply(t,{error:{message:"Invalid request - missing event ID"}}));case 2:if(!(void 0!==t.data.limit&&t.data.limit<0)){e.next=4;break}return e.abrupt("return",this.transport.reply(t,{error:{message:"Invalid request - limit out of range"}}));case 4:if(void 0===t.data.room_id||this.canUseRoomTimeline(t.data.room_id)){e.next=6;break}return e.abrupt("return",this.transport.reply(t,{error:{message:"Unable to access room timeline: ".concat(t.data.room_id)}}));case 6:return e.prev=6,e.next=9,this.driver.readEventRelations(t.data.event_id,t.data.room_id,t.data.rel_type,t.data.event_type,t.data.from,t.data.to,t.data.limit,t.data.direction);case 9:if(!(n=e.sent).originalEvent){e.next=18;break}if(void 0===n.originalEvent.state_key){e.next=16;break}if(this.canReceiveStateEvent(n.originalEvent.type,n.originalEvent.state_key)){e.next=14;break}return e.abrupt("return",this.transport.reply(t,{error:{message:"Cannot read state events of this type"}}));case 14:e.next=18;break;case 16:if(this.canReceiveRoomEvent(n.originalEvent.type,n.originalEvent.content.msgtype)){e.next=18;break}return e.abrupt("return",this.transport.reply(t,{error:{message:"Cannot read room events of this type"}}));case 18:return r=n.chunk.filter((function(e){return void 0!==e.state_key?i.canReceiveStateEvent(e.type,e.state_key):i.canReceiveRoomEvent(e.type,e.content.msgtype)})),e.abrupt("return",this.transport.reply(t,{original_event:n.originalEvent,chunk:r,prev_batch:n.prevBatch,next_batch:n.nextBatch}));case 22:return e.prev=22,e.t0=e.catch(6),console.error("error getting the relations",e.t0),e.next=27,this.transport.reply(t,{error:{message:"Unexpected error while reading relations"}});case 27:case"end":return e.stop()}}),e,this,[[6,22]])}))),function(e){return b.apply(this,arguments)})},{key:"handleMessage",value:function(e){if(!this.isStopped){var t=new CustomEvent("action:".concat(e.detail.action),{detail:e.detail,cancelable:!0});if(this.emit("action:".concat(e.detail.action),t),!t.defaultPrevented)switch(e.detail.action){case s.WidgetApiFromWidgetAction.ContentLoaded:return this.handleContentLoadedAction(e.detail);case s.WidgetApiFromWidgetAction.SupportedApiVersions:return this.replyVersions(e.detail);case s.WidgetApiFromWidgetAction.SendEvent:return this.handleSendEvent(e.detail);case s.WidgetApiFromWidgetAction.SendToDevice:return this.handleSendToDevice(e.detail);case s.WidgetApiFromWidgetAction.GetOpenIDCredentials:return this.handleOIDC(e.detail);case s.WidgetApiFromWidgetAction.MSC2931Navigate:return this.handleNavigate(e.detail);case s.WidgetApiFromWidgetAction.MSC2974RenegotiateCapabilities:return this.handleCapabilitiesRenegotiate(e.detail);case s.WidgetApiFromWidgetAction.MSC2876ReadEvents:return this.handleReadEvents(e.detail);case s.WidgetApiFromWidgetAction.WatchTurnServers:return this.handleWatchTurnServers(e.detail);case s.WidgetApiFromWidgetAction.UnwatchTurnServers:return this.handleUnwatchTurnServers(e.detail);case s.WidgetApiFromWidgetAction.MSC3869ReadRelations:return this.handleReadRelations(e.detail);default:return this.transport.reply(e.detail,{error:{message:"Unknown or unsupported action: "+e.detail.action}})}}}},{key:"takeScreenshot",value:function(){return this.transport.send(s.WidgetApiToWidgetAction.TakeScreenshot,{})}},{key:"updateVisibility",value:function(e){return this.transport.send(s.WidgetApiToWidgetAction.UpdateVisibility,{visible:e})}},{key:"sendWidgetConfig",value:function(e){return this.transport.send(s.WidgetApiToWidgetAction.WidgetConfig,e).then()}},{key:"notifyModalWidgetButtonClicked",value:function(e){return this.transport.send(s.WidgetApiToWidgetAction.ButtonClicked,{id:e}).then()}},{key:"notifyModalWidgetClose",value:function(e){return this.transport.send(s.WidgetApiToWidgetAction.CloseModalWidget,e).then()}},{key:"feedEvent",value:(g=f(m().mark((function e(t,n){var r;return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.room_id===n||this.canUseRoomTimeline(t.room_id)){e.next=2;break}return e.abrupt("return");case 2:if(void 0===t.state_key||null===t.state_key){e.next=7;break}if(this.canReceiveStateEvent(t.type,t.state_key)){e.next=5;break}return e.abrupt("return");case 5:e.next=9;break;case 7:if(this.canReceiveRoomEvent(t.type,null===(r=t.content)||void 0===r?void 0:r.msgtype)){e.next=9;break}return e.abrupt("return");case 9:return e.next=11,this.transport.send(s.WidgetApiToWidgetAction.SendEvent,t);case 11:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"feedToDevice",value:(i=f(m().mark((function e(t,n){return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.canReceiveToDeviceEvent(t.type)){e.next=3;break}return e.next=3,this.transport.send(s.WidgetApiToWidgetAction.SendToDevice,y(y({},t),{},{encrypted:n}));case 3:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})}],n&&E(t.prototype,n),r&&E(t,r),Object.defineProperty(t,"prototype",{writable:!1}),I}(i.EventEmitter);t.ClientWidgetApi=k},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isErrorResponse=function(e){if("error"in e){return!!e.error.message}return!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.WidgetKind=void 0,t.WidgetKind=r,function(e){e.Room="room",e.Account="account",e.Modal="modal"}(r||(t.WidgetKind=r={}))},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ModalButtonKind=void 0,t.ModalButtonKind=r,function(e){e.Primary="m.primary",e.Secondary="m.secondary",e.Warning="m.warning",e.Danger="m.danger",e.Link="m.link"}(r||(t.ModalButtonKind=r={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WidgetParser=void 0;var r=n(39),i=n(37);function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){l=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw o}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var l=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,a;return t=e,a=[{key:"parseAccountData",value:function(t){if(!t)return[];for(var n=[],r=0,i=Object.keys(t);r<i.length;r++){var o=i[r],a=t[o];if(a&&("m.widget"===a.type||"im.vector.modular.widgets"===a.type)&&a.sender&&(a.state_key||a.id)===o){var s={content:a.content,sender:a.sender,type:"m.widget",state_key:o,event_id:"$example",room_id:"!example",origin_server_ts:1},l=e.parseRoomWidget(s);l&&n.push(l)}}return n}},{key:"parseWidgetsFromRoomState",value:function(t){if(!t)return[];var n,r=[],i=o(t);try{for(i.s();!(n=i.n()).done;){var a=n.value,s=e.parseRoomWidget(a);s&&r.push(s)}}catch(e){i.e(e)}finally{i.f()}return r}},{key:"parseRoomWidget",value:function(t){if(!t)return null;if("m.widget"!==t.type&&"im.vector.modular.widgets"!==t.type)return null;var n=t.content||{},r={id:t.state_key,creatorUserId:n.creatorUserId||t.sender,name:n.name,type:n.type,url:n.url,waitForIframeLoad:n.waitForIframeLoad,data:n.data};return e.processEstimatedWidget(r)}},{key:"processEstimatedWidget",value:function(e){return e.id&&e.creatorUserId&&e.type&&(0,i.isValidUrl)(e.url)?new r.Widget(e):null}}],(n=null)&&s(t.prototype,n),a&&s(t,a),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.WidgetParser=l},function(e,t,n){"use strict";function r(e){return null==e?"".concat(e):e.toString()}Object.defineProperty(t,"__esModule",{value:!0}),t.runTemplate=function(e,t,n){for(var i=Object.assign({},t.data,{matrix_room_id:n.widgetRoomId||"",matrix_user_id:n.currentUserId,matrix_display_name:n.userDisplayName||n.currentUserId,matrix_avatar_url:n.userHttpAvatarUrl||"",matrix_widget_id:t.id,"org.matrix.msc2873.client_id":n.clientId||"","org.matrix.msc2873.client_theme":n.clientTheme||"","org.matrix.msc2873.client_language":n.clientLanguage||""}),o=e,a=0,s=Object.keys(i);a<s.length;a++){var l=s[a],c="$".concat(l).replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),u=new RegExp(c,"g");o=o.replace(u,encodeURIComponent(r(i[l])))}return o},t.toString=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WidgetDriver=void 0;var r=n(6);function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,o;return t=e,(n=[{key:"validateCapabilities",value:function(e){return Promise.resolve(new Set)}},{key:"sendEvent",value:function(e,t){return Promise.reject(new Error("Failed to override function"))}},{key:"sendToDevice",value:function(e,t,n){return Promise.reject(new Error("Failed to override function"))}},{key:"readRoomEvents",value:function(e,t,n){return Promise.resolve([])}},{key:"readStateEvents",value:function(e,t,n){return Promise.resolve([])}},{key:"readEventRelations",value:function(e,t,n,r,i,o,a,s){return Promise.resolve({chunk:[]})}},{key:"askOpenID",value:function(e){e.update({state:r.OpenIDRequestState.Blocked})}},{key:"navigate",value:function(e){throw new Error("Navigation is not implemented")}},{key:"getTurnServers",value:function(){throw new Error("TURN server support is not implemented")}}])&&i(t.prototype,n),o&&i(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.WidgetDriver=o},,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";e.exports=n(945)},function(e,t,n){"use strict";n.d(t,"i",(function(){return E})),n.d(t,"h",(function(){return S})),n.d(t,"c",(function(){return w})),n.d(t,"a",(function(){return F})),n.d(t,"b",(function(){return D})),n.d(t,"k",(function(){return k})),n.d(t,"l",(function(){return A})),n.d(t,"d",(function(){return R})),n.d(t,"f",(function(){return N})),n.d(t,"g",(function(){return M})),n.d(t,"e",(function(){return L})),n.d(t,"j",(function(){return B}));var r=n(13),i=n.n(r),o=n(948),a=n.n(o),s=n(120),l=n.n(s),c=n(1),u=n(16),d=n(125),h=n(157),p=n(137),m=n(390),g=n(131),f=n(347),_=n(1420);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const y="i18n/";a.a.setSeparator("|");function E(e,t){const n=new Error(e);return n.translatedMessage=F(e,t),n}function S(){const e=d.b.getValue("language",null,!0);return e||P(N()[0])}function w(e){return e}a.a.setFallbackLocale("en");const T=(e,t)=>{const n=a.a.translate(e,v(v({},t),{},{fallbackLocale:a.a.getLocale()}));if(!n||n.startsWith("missing translation:")){const n=a.a.translate(e,v(v({},t),{},{locale:"en"}));return!n||n.startsWith("missing translation:")?{translated:e,isFallback:!0}:{translated:n,isFallback:!0}}return{translated:n}};function C(e,t){const n=v(v({},t),{},{interpolate:!1});return n&&"object"==typeof n&&Object.keys(n).forEach((e=>{void 0===n[e]&&(c.a.warn("safeCounterpartTranslate called with undefined interpolation name: "+e),n[e]="undefined"),null===n[e]&&(c.a.warn("safeCounterpartTranslate called with null interpolation name: "+e),n[e]="null")})),T(e,n)}const x=(e,t)=>e;function F(e,t,n){const{translated:r}=C(e,t),i=O(r,t,n);return x(i,e)}function D(e,t,n){const{translated:r,isFallback:i}=C(e,t),o=O(r,t,n);return x(i?l.a.createElement("span",{lang:"en"},o):o,e)}function k(e){return e.replace(/%\(([^)]*)\)/g,"% ($1)")}function O(e,t,n){let r=e;if(void 0!==t){const e={};for(const n in t)e[`%\\(${n}\\)s`]=t[n];r=I(r,e)}if(void 0!==n){const e={};for(const t in n)e[`(<${t}>(.*?)<\\/${t}>|<${t}>|<${t}\\s*\\/>)`]=n[t];r=I(r,e)}return r}function I(e,t){const n=[e];let r=!1;for(const i in t){const o=new RegExp(i,"g");let a=!1;for(let e=0;e<n.length;e++){const s=n[e];if("string"!=typeof s)continue;let l=o.exec(s);if(!l)continue;a=!0;const c=s.slice(0,l.index),u=[];let d;for(;l;){d=l;const e=l.slice(2);let n,a;if(n=t[i]instanceof Function?t[i](...e):t[i],"object"==typeof n&&(r=!0),"string"==typeof n&&""===n||u.push(n),l=o.exec(s),l){const e=d.index+d[0].length;a=s.slice(e,l.index)}else a=s.slice(d.index+d[0].length);a&&u.push(a)}n.splice(e,1,...u),""!==c&&n.splice(e,0,c)}a||"%\\(count\\)s"!==i&&c.a.log(`Could not find ${o} in ${e}`)}return r?l.a.createElement("span",null,...n):n.join("")}function A(e){Array.isArray(e)||(e=[e]);const t=h.a.get();let n,r;return t&&t.setLanguage(e),U().then((t=>{r=t;for(let t=0;t<e.length;++t)if(r.hasOwnProperty(e[t])){n=e[t];break}return n||(n="en",c.a.error("Unable to find an appropriate language")),j(y+r[n].fileName)})).then((async e=>{if(a.a.registerTranslations(n,e),await V(),a.a.setLocale(n),await d.b.setValue("language",null,p.a.DEVICE,n),c.a.log("set language to "+n),"en"!==n)return j(y+r.en.fileName)})).then((async e=>{e&&a.a.registerTranslations("en",e),await V()}))}function R(){return U().then((e=>{const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push({value:n,label:e[n].label});return t}))}function N(){return navigator.languages&&navigator.languages.length?navigator.languages:navigator.language?[navigator.language]:[navigator.userLanguage||"en"]}function M(e){const t=[],n=P(e),r=n.split("-");return 2===r.length&&r[0]===r[1]?t.push(r[0]):(t.push(n),2===r.length&&t.push(r[0])),t}function P(e){return e.toLowerCase().replace("_","-")}function L(){return a.a.getLocale()}function B(e){const t=L(),n=e.map(P);{const r=n.indexOf(t);if(r>-1)return e[r]}{const r=n.findIndex((e=>e.slice(0,2)===t.slice(0,2)));if(r>-1)return e[r]}{const t=n.findIndex((e=>e.startsWith("en")));if(t>-1)return e[t]}return e[0]}async function U(){let e;e="string"==typeof _.a?_.a:y+"languages.json";const t=await fetch(e,{method:"GET"});if(!t.ok)throw new Error(`Failed to load ${e}, got ${t.status}`);return t.json()}async function j(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;return Object(m.a)((()=>async function(e){const t=await fetch(e,{method:"GET"});if(!t.ok)throw new Error(`Failed to load ${e}, got ${t.status}`);return t.json()}(e)),t,(t=>(c.a.log("Failed to load i18n",e),c.a.error(t),!0)))}let G=null,z=0;class H{constructor(){}}function q(e){const t=new u.b((()=>({})));for(const[n,r]of Object.entries(e))for(const[e,i]of Object.entries(r))Object(u.L)(t.getOrCreate(e),n,i);for(const[e,n]of t)a.a.registerTranslations(e,n)}async function V(){q(f.a.instance.allTranslations);const e=g.b.get().custom_translations_url;if(e)try{let t;if(Date.now()>=z?(t=H.lookupFn?H.lookupFn(e):await(await fetch(e)).json(),G=t,z=Date.now()+3e5):t=G,!t)return;q(t)}catch(e){c.a.warn("Ignoring error while registering custom translations: ",e),z=Date.now()+3e5}}i()(H,"lookupFn",void 0)},function(e,t,n){"use strict";n.d(t,"a",(function(){return Z}));var r=n(13),i=n.n(r),o=n(136),a=n(351),s=n(16),l=n(179),c=n(353),u=n(174),d=n(419),h=n(1),p=n(928),m=n(125),g=n(147),f=n(143),_=n(140),b=n(151),v=n(124);function y(e,t,n){return{action:"MatrixActions.sync",state:t,prevState:n,matrixClient:e}}function E(e,t){return{action:"MatrixActions.accountData",event:t,event_type:t.getType(),event_content:t.getContent()}}function S(e,t,n){return{action:"MatrixActions.Room.accountData",event:t,event_type:t.getType(),event_content:t.getContent(),room:n}}function w(e,t){return{action:"MatrixActions.Room",room:t}}function T(e,t,n){return{action:"MatrixActions.Room.tags",room:n}}function C(e,t,n){return{action:"MatrixActions.Room.receipt",event:t,room:n,matrixClient:e}}function x(e,t,n,r,i,o){return{action:"MatrixActions.Room.timeline",event:t,isLiveEvent:o.liveEvent,isLiveUnfilteredRoomTimelineEvent:o.timeline.getTimelineSet()===(null==n?void 0:n.getUnfilteredTimelineSet()),room:n}}function F(e,t,n,r){return{action:"MatrixActions.RoomState.events",event:t,state:n,lastStateEvent:r}}function D(e,t,n,r){return{action:"MatrixActions.Room.myMembership",room:t,membership:n,oldMembership:r}}function k(e,t){return{action:"MatrixActions.Event.decrypted",event:t}}let O=[];function I(e,t,n){const r=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];const o=n(e,...r);o&&v.a.dispatch(o,!1)};e.on(t,r),O.push((()=>{e.removeListener(t,r)}))}var A={start(e){I(e,g.b.Sync,y),I(e,g.b.AccountData,E),I(e,_.d.AccountData,S),I(e,g.b.Room,w),I(e,_.d.Tags,T),I(e,_.d.Receipt,C),I(e,_.d.Timeline,x),I(e,_.d.MyMembership,D),I(e,f.c.Decrypted,k),I(e,b.b.Events,F)},stop(){O.forEach((e=>e())),O=[]}},R=n(127),N=n(431),M=n(432),P=n(289),L=n(250),B=n(292),U=n(523),j=n(120),G=n.n(j),z=n(121),H=n(131),q=n(135),V=n(145),$=n(155);var K=e=>{const t=H.b.get().brand,n=Object(z.a)("You've previously used a newer version of %(brand)s with this session. To use this version again with end to end encryption, you will need to sign out and back in again.",{brand:t});return G.a.createElement(q.a,{className:"mx_CryptoStoreTooNewDialog",contentId:"mx_Dialog_content",title:Object(z.a)("Incompatible Database"),hasCancel:!1,onFinished:e.onFinished},G.a.createElement("div",{className:"mx_Dialog_content",id:"mx_Dialog_content"},n),G.a.createElement(V.a,{primaryButton:Object(z.a)("Continue With Encryption Disabled"),hasCancel:!1,onPrimaryButtonClick:()=>e.onFinished(!1)},G.a.createElement("button",{onClick:()=>{R.b.createDialog($.a,{title:Object(z.a)("Sign out"),description:Object(z.a)("To avoid losing your chat history, you must export your room keys before logging out. You will need to go back to the newer version of %(brand)s to do this",{brand:t}),button:Object(z.a)("Sign out"),focus:!1,onFinished:t=>{t&&(v.a.dispatch({action:"logout"}),e.onFinished(!0))}})}},Object(z.a)("Sign out"))))},W=n(137),Y=n(691);function Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function X(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Z=new class{constructor(){i()(this,"opts",{initialSyncLimit:20}),i()(this,"matrixClient",null),i()(this,"justRegisteredUserId",null),i()(this,"currentClientCreds",void 0)}get(){return this.matrixClient}unset(){this.matrixClient=null,A.stop()}setJustRegisteredUserId(e){if(this.justRegisteredUserId=e,e){const e=Date.now().toString();window.localStorage.setItem("mx_registration_time",e)}}currentUserIsJustRegistered(){return this.matrixClient&&this.matrixClient.credentials.userId===this.justRegisteredUserId}userRegisteredWithinLastHours(e){if(e<=0)return!1;try{const t=parseInt(window.localStorage.getItem("mx_registration_time"),10);return(Date.now()-t)/36e5<=e}catch(e){return!1}}userRegisteredAfter(e){try{const t=parseInt(window.localStorage.getItem("mx_registration_time"),10);return e.getTime()<=t}catch(e){return!1}}replaceUsingCreds(e){this.currentClientCreds=e,this.createClient(e)}async assign(){for(const e of["indexeddb","memory"])try{const e=this.matrixClient.store.startup();h.a.log("MatrixClientPeg: waiting for MatrixClient store to initialise"),await e;break}catch(t){if("indexeddb"!==e)throw h.a.error("Failed to start memory store!",t),t;h.a.error("Error starting matrixclient store - falling back to memory store",t),this.matrixClient.store=new a.a({localStorage:localStorage})}m.b.getValue("lowBandwidth")||await this.initClientCrypto();const e=s.k(this.opts);if(e.pendingEventOrdering=o.PendingEventOrdering.Detached,e.lazyLoadMembers=!0,e.clientWellKnownPollPeriod=7200,e.threadSupport=!0,m.b.getValue("feature_sliding_sync")){const t=m.b.getValue("feature_sliding_sync_proxy_url");t?h.a.log("Activating sliding sync using proxy at ",t):h.a.log("Activating sliding sync"),e.slidingSync=U.a.instance.configure(this.matrixClient,t||this.matrixClient.baseUrl),U.a.instance.startSpidering(100,50)}return A.start(this.matrixClient),N.a.matrixClient=this.matrixClient,Y.a.matrixClient=this.matrixClient,e}async initClientCrypto(){const e=m.b.getValue("feature_rust_crypto");if(await m.b.setValue("feature_rust_crypto",null,W.a.DEVICE,e),e)await this.matrixClient.initRustCrypto();else try{this.matrixClient.initCrypto&&(await this.matrixClient.initCrypto(),this.matrixClient.setCryptoTrustCrossSignedDevices(!m.b.getValue("e2ee.manuallyVerifyAllSessions")),await Object(L.f)(this.matrixClient),M.e(!0))}catch(e){e instanceof Error&&"InvalidCryptoStoreError"===e.name&&R.b.createDialog(K),h.a.warn("Unable to initialise e2e",e)}}async start(){const e=await this.assign();h.a.log("MatrixClientPeg: really starting MatrixClient"),await this.get().startClient(e),h.a.log("MatrixClientPeg: MatrixClient started")}getCredentials(){var e,t,n,r;let i=this.currentClientCreds;return(null===(e=this.currentClientCreds)||void 0===e?void 0:e.userId)!==(null===(t=this.matrixClient)||void 0===t||null===(n=t.credentials)||void 0===n?void 0:n.userId)&&(i=null),X(X({},null!==(r=i)&&void 0!==r?r:{}),{},{homeserverUrl:this.matrixClient.baseUrl,identityServerUrl:this.matrixClient.idBaseUrl,userId:this.matrixClient.credentials.userId,deviceId:this.matrixClient.getDeviceId(),accessToken:this.matrixClient.getAccessToken(),guest:this.matrixClient.isGuest()})}getHomeserverName(){const e=/^@[^:]+:(.+)$/.exec(this.matrixClient.credentials.userId);if(null===e||e.length<1)throw new Error("Failed to derive homeserver name from user ID!");return e[1]}namesToRoomName(e,t){const n=t-1;return e.length?1===e.length&&n<=1?e[0]:void 0:Object(z.a)("Empty room")}memberNamesToRoomName(e,t){const n=this.namesToRoomName(e,t);return n||(2===e.length&&2===t?Object(z.a)("%(user1)s and %(user2)s",{user1:e[0],user2:e[1]}):Object(z.a)("%(user)s and %(count)s others",{user:e[0],count:t-1}))}inviteeNamesToRoomName(e,t){const n=this.namesToRoomName(e,t);return n||(2===e.length&&2===t?Object(z.a)("Inviting %(user1)s and %(user2)s",{user1:e[0],user2:e[1]}):Object(z.a)("Inviting %(user)s and %(count)s others",{user:e[0],count:t-1}))}createClient(e){const t={baseUrl:e.homeserverUrl,idBaseUrl:e.identityServerUrl,accessToken:e.accessToken,userId:e.userId,deviceId:e.deviceId,pickleKey:e.pickleKey,timelineSupport:!0,forceTURN:!m.b.getValue("webRtcAllowPeerToPeer"),fallbackICEServerAllowed:!!m.b.getValue("fallbackICEServerAllowed"),iceCandidatePoolSize:20,verificationMethods:[u.e.SAS,d.e,u.e.RECIPROCATE_QR_CODE],identityServer:new P.a,cryptoCallbacks:X({},L.c),roomNameGenerator:(e,t)=>{switch(t.type){case o.RoomNameType.Generated:return"Inviting"===t.subtype?this.inviteeNamesToRoomName(t.names,t.count):this.memberNamesToRoomName(t.names,t.count);case o.RoomNameType.EmptyRoom:return t.oldName?Object(z.a)("Empty room (was %(oldName)s)",{oldName:t.oldName}):Object(z.a)("Empty room");default:return null}}};B.a.getDehydrationKey&&(t.cryptoCallbacks.getDehydrationKey=B.a.getDehydrationKey),this.matrixClient=Object(p.a)(t),this.matrixClient.setMaxListeners(500),this.matrixClient.setGuest(Boolean(e.guest));const n=new c.b(void 0,{timelineSupport:!0,pendingEvents:!1});n.getLiveTimeline().setPaginationToken("",l.b.BACKWARDS),this.matrixClient.setNotifTimelineSet(n)}};window.mxMatrixClientPeg||(window.mxMatrixClientPeg=Z)},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(132),i=n.n(r),o=n(120),a=n.n(o),s=n(126),l=n.n(s),c=n(152),u=n(142);const d=["element","onClick","children","kind","disabled","inputRef","className","onKeyDown","onKeyUp","triggerOnMouseDown"];function h(e){let{element:t,onClick:n,children:r,kind:o,disabled:s,inputRef:h,className:p,onKeyDown:m,onKeyUp:g,triggerOnMouseDown:f}=e;const _=i()(e,d);return s?(_["aria-disabled"]=!0,_.disabled=!0):(f?_.onMouseDown=null!=n?n:void 0:_.onClick=null!=n?n:void 0,_.onKeyDown=e=>{switch(Object(c.a)().getAccessibilityAction(e)){case u.h.Enter:return e.stopPropagation(),e.preventDefault(),null==n?void 0:n(e);case u.h.Space:e.stopPropagation(),e.preventDefault();break;default:null==m||m(e)}},_.onKeyUp=e=>{switch(Object(c.a)().getAccessibilityAction(e)){case u.h.Enter:e.stopPropagation(),e.preventDefault();break;case u.h.Space:return e.stopPropagation(),e.preventDefault(),null==n?void 0:n(e);default:null==g||g(e)}}),_.ref=h,_.className=l()("mx_AccessibleButton",p,{mx_AccessibleButton_hasKind:o,[`mx_AccessibleButton_kind_${o}`]:o,mx_AccessibleButton_disabled:s}),a.a.createElement(t,_,r)}h.defaultProps={element:"div",role:"button",tabIndex:0},h.displayName="AccessibleButton"},function(e,t,n){"use strict";n.d(t,"b",(function(){return a}));var r=n(992),i=n(676);class o extends r.Dispatcher{dispatch(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e instanceof i.a?e.fn((e=>{this.dispatch(e,t)})):t?super.dispatch(e):window.setTimeout(super.dispatch.bind(this,e),0)}fire(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.dispatch({action:e},t)}}const a=new o;window.mxDispatcher||(window.mxDispatcher=a),t.a=a},function(e,t,n){"use strict";n.d(t,"a",(function(){return $})),n.d(t,"b",(function(){return W}));var r=n(13),i=n.n(r),o=n(1),a=n(122),s=n(137),l=n(524);class c extends l.a{constructor(e,t){super(),this.featureNames=e,this.watchers=t}getValue(e,t){if(this.featureNames.includes(e))return this.readFeature(e);if("notificationsEnabled"===e)return this.getBoolean("notifications_enabled");if("notificationBodyEnabled"===e)return this.getBoolean("notifications_body_enabled");if("audioNotificationsEnabled"===e)return this.getBoolean("audio_notifications_enabled");return(this.getSettings()||{})[e]}setValue(e,t,n){if(this.featureNames.includes(e))return this.writeFeature(e,n),Promise.resolve();if("notificationsEnabled"===e)return this.setBoolean("notifications_enabled",n),this.watchers.notifyUpdate(e,null,s.a.DEVICE,n),Promise.resolve();if("notificationBodyEnabled"===e)return this.setBoolean("notifications_body_enabled",n),this.watchers.notifyUpdate(e,null,s.a.DEVICE,n),Promise.resolve();if("audioNotificationsEnabled"===e)return this.setBoolean("audio_notifications_enabled",n),this.watchers.notifyUpdate(e,null,s.a.DEVICE,n),Promise.resolve();if("layout"===e){const t=this.getSettings()||{};return delete t.useIRCLayout,t.layout=n,this.setObject("mx_local_settings",t),this.watchers.notifyUpdate(e,null,s.a.DEVICE,n),Promise.resolve()}const r=this.getSettings()||{};return r[e]=n,this.setObject("mx_local_settings",r),this.watchers.notifyUpdate(e,null,s.a.DEVICE,n),Promise.resolve()}canSetValue(e,t){return!0}watchSetting(e,t,n){this.watchers.watchSetting(e,t,n)}unwatchSetting(e){this.watchers.unwatchSetting(e)}getSettings(){return this.getObject("mx_local_settings")}readFeature(e){return(!a.a.get()||!a.a.get().isGuest())&&this.getBoolean("mx_labs_feature_"+e)}writeFeature(e,t){this.setBoolean("mx_labs_feature_"+e,t),this.watchers.notifyUpdate(e,null,s.a.DEVICE,t)}}var u=n(16);class d extends l.a{constructor(e){super(),this.watchers=e}getValue(e,t){if("blacklistUnverifiedDevices"===e){const e=this.read("mx_local_settings");if(null!=e&&e.blacklistUnverifiedDevicesPerRoom)return e.blacklistUnverifiedDevicesPerRoom[t]}const n=this.read(this.getKey(e,t));return n?n.value:null}setValue(e,t,n){if("blacklistUnverifiedDevices"===e){let r=this.read("mx_local_settings");return r||(r={}),r.blacklistUnverifiedDevicesPerRoom||(r.blacklistUnverifiedDevicesPerRoom={}),Object(u.L)(r.blacklistUnverifiedDevicesPerRoom,t,n),this.setObject("mx_local_settings",r),this.watchers.notifyUpdate(e,t,s.a.ROOM_DEVICE,n),Promise.resolve()}return null===n?this.removeItem(this.getKey(e,t)):this.setObject(this.getKey(e,t),{value:n}),this.watchers.notifyUpdate(e,t,s.a.ROOM_DEVICE,n),Promise.resolve()}canSetValue(e,t){return!0}read(e){return this.getObject(e)}getKey(e,t){return"mx_setting_"+e+"_"+t}}var h=n(324);class p extends h.a{constructor(e,t){super(),this.defaults=e,this.invertedDefaults=t}getValue(e,t){let n=this.defaults[e];return void 0===n&&(n=this.invertedDefaults[e]),n}async setValue(e,t,n){throw new Error("Cannot set values on the default level handler")}canSetValue(e,t){return!1}isSupported(){return!0}}var m=n(140),g=n(431),f=n(185);const _="im.vector.setting.allowed_widgets",b="im.vector.web.settings";class v extends g.a{constructor(e){super(),this.watchers=e,i()(this,"onAccountData",((e,t,n)=>{const r=t.roomId;if("org.matrix.room.preview_urls"===e.getType()){let t=e.getContent().disable;t="boolean"!=typeof t?null:!t,this.watchers.notifyUpdate("urlPreviewsEnabled",r,s.a.ROOM_ACCOUNT,t)}else if(e.getType()===b){const t=n?n.getContent():{},i=Object(f.d)(t,e.getContent());for(const t of i){const n=e.getContent()[t];this.watchers.notifyUpdate(t,r,s.a.ROOM_ACCOUNT,n)}}else e.getType()===_&&this.watchers.notifyUpdate("allowedWidgets",r,s.a.ROOM_ACCOUNT,e.getContent())}))}initMatrixClient(e,t){e&&e.removeListener(m.d.AccountData,this.onAccountData),t.on(m.d.AccountData,this.onAccountData)}getValue(e,t){if("urlPreviewsEnabled"===e){const e=this.getSettings(t,"org.matrix.room.preview_urls")||{};return"boolean"!=typeof e.disable?null:!e.disable}if("allowedWidgets"===e)return this.getSettings(t,_);return(this.getSettings(t)||{})[e]}async setRoomAccountData(e,t,n,r){let i;null===n?i=r:(i=this.getSettings(e,t)||{},i[n]=r),await this.client.setRoomAccountData(e,t,i);const o=Object(u.m)(),a=(i,s)=>{s.roomId===e&&i.getType()===t&&(null!==n&&i.getContent()[n]!==r||(this.client.off(m.d.AccountData,a),o.resolve()))};this.client.on(m.d.AccountData,a),await o.promise}setValue(e,t,n){switch(e){case"urlPreviewsEnabled":return this.setRoomAccountData(t,"org.matrix.room.preview_urls","disable",!n);case"allowedWidgets":return this.setRoomAccountData(t,_,null,n);default:return this.setRoomAccountData(t,b,e,n)}}canSetValue(e,t){return!!this.client.getRoom(t)}isSupported(){return this.client&&!this.client.isGuest()}getSettings(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b;const r=null===(t=this.client.getRoom(e))||void 0===t?void 0:t.getAccountData(n);return r&&r.getContent()?Object(f.a)(r.getContent()):null}}var y=n(147);const E="im.vector.riot.breadcrumb_rooms",S="im.vector.setting.breadcrumbs",w=[E,S],T="io.element.recent_emoji",C="im.vector.setting.integration_provisioning",x="im.vector.analytics",F="im.vector.web.settings";class D extends g.a{constructor(e){super(),this.watchers=e,i()(this,"onAccountData",((e,t)=>{if("org.matrix.preview_urls"===e.getType()){let t=e.getContent().disable;t="boolean"!=typeof t?null:!t,this.watchers.notifyUpdate("urlPreviewsEnabled",null,s.a.ACCOUNT,t)}else if(e.getType()===F||e.getType()===x){var n;const r=null!==(n=null==t?void 0:t.getContent())&&void 0!==n?n:{},i=Object(f.d)(r,e.getContent());for(const t of i){const n=e.getContent()[t];this.watchers.notifyUpdate(t,null,s.a.ACCOUNT,n)}}else if(w.includes(e.getType()))this.notifyBreadcrumbsUpdate(e);else if(e.getType()===C){const t=e.getContent().enabled;this.watchers.notifyUpdate("integrationProvisioning",null,s.a.ACCOUNT,t)}else if(e.getType()===T){const t=e.getContent().enabled;this.watchers.notifyUpdate("recent_emoji",null,s.a.ACCOUNT,t)}}))}get level(){return s.a.ACCOUNT}initMatrixClient(e,t){null==e||e.removeListener(y.b.AccountData,this.onAccountData),t.on(y.b.AccountData,this.onAccountData)}getValue(e,t){if("urlPreviewsEnabled"===e){const e=this.getSettings("org.matrix.preview_urls")||{};return"boolean"!=typeof e.disable?null:!e.disable}if("breadcrumb_rooms"===e){let e=this.getSettings(S);return e&&e.recent_rooms||(e=this.getSettings(E),e&&(e.recent_rooms=e.rooms)),e&&e.recent_rooms?e.recent_rooms:[]}if("recent_emoji"===e){const e=this.getSettings(T);return e?e.recent_emoji:null}if("integrationProvisioning"===e){const e=this.getSettings(C);return e?e.enabled:null}if("pseudonymousAnalyticsOptIn"===e){const t=this.getSettings(x)||{};return"boolean"!=typeof t[e]?null:t[e]}if("MessageComposerInput.insertTrailingColon"===e){const n=(this.getSettings()||{})[e];return null==n?(this.setValue(e,t,!0),!0):n}const n=this.getSettings()||{};let r=n[e];return null==r&&("hideAvatarChanges"!==e&&"hideDisplaynameChanges"!==e||(r=n.hideAvatarDisplaynameChanges)),r}async setAccountData(e,t,n,r){var i;let o=this.getSettings(e);!r||null!==(i=o)&&void 0!==i&&i[t]||(o=this.getSettings(r)),o||(o={}),o[t]=n;const a=Object(u.m)(),s=r=>{r.getType()===e&&r.getContent()[t]===n&&(this.client.off(y.b.AccountData,s),a.resolve())};this.client.on(y.b.AccountData,s),await this.client.setAccountData(e,o),await a.promise}setValue(e,t,n){switch(e){case"urlPreviewsEnabled":return this.setAccountData("org.matrix.preview_urls","disable",!n);case"breadcrumb_rooms":return this.setAccountData(S,"recent_rooms",n,E);case"recent_emoji":return this.setAccountData(T,"recent_emoji",n);case"integrationProvisioning":return this.setAccountData(C,"enabled",n);case"pseudonymousAnalyticsOptIn":return this.setAccountData(x,"pseudonymousAnalyticsOptIn",n);default:return this.setAccountData(F,e,n)}}canSetValue(e,t){return!0}isSupported(){return this.client&&!this.client.isGuest()}getSettings(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"im.vector.web.settings";if(!this.client)return null;const t=this.client.getAccountData(e);return t&&t.getContent()?Object(f.a)(t.getContent()):null}notifyBreadcrumbsUpdate(e){let t=[];if(e.getType()===E){const n=this.getSettings(S);t=n?n.recent_rooms:e.getContent().rooms}else{if(e.getType()!==S)return;t=e.getContent().recent_rooms}this.watchers.notifyUpdate("breadcrumb_rooms",null,s.a.ACCOUNT,t||[])}}var k=n(151);const O="im.vector.web.settings";class I extends g.a{constructor(e){super(),this.watchers=e,i()(this,"onEvent",((e,t,n)=>{const r=e.getRoomId(),i=this.client.getRoom(r);if(i&&(!i||t===i.currentState))if("org.matrix.room.preview_urls"===e.getType()){let t=e.getContent().disable;t="boolean"!=typeof t?null:!t,this.watchers.notifyUpdate("urlPreviewsEnabled",r,s.a.ROOM,t)}else if(e.getType()===O){const t=n?n.getContent():{},i=Object(f.d)(t,e.getContent());for(const t of i)this.watchers.notifyUpdate(t,r,s.a.ROOM,e.getContent()[t])}}))}initMatrixClient(e,t){e&&e.removeListener(k.b.Events,this.onEvent),t.on(k.b.Events,this.onEvent)}getValue(e,t){if("urlPreviewsEnabled"===e){const e=this.getSettings(t,"org.matrix.room.preview_urls")||{};return"boolean"!=typeof e.disable?null:!e.disable}return(this.getSettings(t)||{})[e]}async sendStateEvent(e,t,n,r){const i=this.getSettings(e,t)||{};i[n]=r;const{event_id:o}=await this.client.sendStateEvent(e,t,i),a=Object(u.m)(),s=e=>{e.getId()===o&&(this.client.off(k.b.Events,s),a.resolve())};this.client.on(k.b.Events,s),await a.promise}setValue(e,t,n){return"urlPreviewsEnabled"===e?this.sendStateEvent(t,"org.matrix.room.preview_urls","disable",!n):this.sendStateEvent(t,O,e,n)}canSetValue(e,t){var n;const r=this.client.getRoom(t);let i=O;return"urlPreviewsEnabled"===e&&(i="org.matrix.room.preview_urls"),null!==(n=null==r?void 0:r.currentState.maySendStateEvent(i,this.client.getUserId()))&&void 0!==n&&n}isSupported(){return!!this.client}getSettings(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:O;const r=null===(t=this.client.getRoom(e))||void 0===t?void 0:t.currentState.getStateEvents(n,"");return null!=r&&r.getContent()?Object(f.a)(r.getContent()):null}}var A=n(131),R=n(26);class N extends h.a{constructor(e){super(),this.featureNames=e}getValue(e,t){const n=new R.a(A.b.get());if(this.featureNames.includes(e)){const t=(n.get("features")||{})[e];return Object(u.u)(t)?null:!0===t||!1===t?t:"enable"===t||"disable"!==t&&null}if("theme"===e)return n.get("default_theme");const r=n.get("setting_defaults");return!r||Object(u.u)(r[e])?null:r[e]}async setValue(e,t,n){throw new Error("Cannot change settings at the config level")}canSetValue(e,t){return!1}isSupported(){return!0}}var M=n(121),P=n(124),L=n(313);class B extends h.a{constructor(e,t){super(),this.handler=e,this.level=t,i()(this,"cache",{})}getValue(e,t){const n=null!=t?t:"UNDEFINED",r=this.cache[e];return null!=r&&r.hasOwnProperty(n)?r[n]:this.handler.getValue(e,t)}async setValue(e,t,n){var r;this.cache[e]||(this.cache[e]={});const i=this.cache[e],o=null!=t?t:"UNDEFINED";i[o]=n;const a=this.handler.getValue(e,t),s=this.handler.setValue(e,t,n);null===(r=this.handler.watchers)||void 0===r||r.notifyUpdate(e,t,this.level,n);try{await s}catch(n){var l;null===(l=this.handler.watchers)||void 0===l||l.notifyUpdate(e,t,this.level,a)}finally{i[o]===n&&delete i[o]}}canSetValue(e,t){return this.handler.canSetValue(e,t)}isSupported(){return this.handler.isSupported()}}var U=n(128),j=n(157);class G extends h.a{constructor(){super(),i()(this,"store",{}),i()(this,"onAction",(e=>{e.action===U.a.PlatformSet&&(this.store={},Object.entries(L.c).forEach((t=>{var n;let[r,i]=t;null!==(n=i.supportedLevels)&&void 0!==n&&n.includes(s.a.PLATFORM)&&e.platform.supportsSetting(r)&&e.platform.getSettingValue(r).then((e=>{this.store[r]=e}))})))})),P.a.register(this.onAction)}canSetValue(e,t){var n,r;return null!==(n=null===(r=j.a.get())||void 0===r?void 0:r.supportsSetting(e))&&void 0!==n&&n}getValue(e,t){return this.store[e]}async setValue(e,t,n){var r;this.store[e]=n,await(null===(r=j.a.get())||void 0===r?void 0:r.setSettingValue(e,n))}isSupported(){var e,t;return null!==(e=null===(t=j.a.get())||void 0===t?void 0:t.supportsSetting())&&void 0!==e&&e}}const z={},H={},q=[];for(const e in L.c){const t=L.c[e];z[e]=t.default,t.isFeature&&q.push(e),t.invertedSettingName&&(H[t.invertedSettingName]=!t.default)}const V={[s.a.DEVICE]:new c(q,L.d),[s.a.ROOM_DEVICE]:new d(L.d),[s.a.ROOM_ACCOUNT]:new B(new v(L.d),s.a.ROOM_ACCOUNT),[s.a.ACCOUNT]:new B(new D(L.d),s.a.ACCOUNT),[s.a.ROOM]:new B(new I(L.d),s.a.ROOM),[s.a.PLATFORM]:new B(new G,s.a.PLATFORM),[s.a.CONFIG]:new N(q),[s.a.DEFAULT]:new p(z,H)},$=[s.a.DEVICE,s.a.ROOM_DEVICE,s.a.ROOM_ACCOUNT,s.a.ACCOUNT,s.a.ROOM,s.a.CONFIG,s.a.DEFAULT];function K(e){return e.supportedLevelsAreOrdered||1===e.supportedLevels.length?[...e.supportedLevels]:$}class W{static getFeatureSettingNames(){return Object.keys(L.c).filter((e=>W.isFeature(e)))}static watchSetting(e,t,n){const r=L.c[e],i=e;if(!r)throw new Error(`${e} is not a setting`);r.invertedSettingName&&(e=r.invertedSettingName);const a=`${(new Date).getTime()}_${W.watcherCount++}_${e}_${t}`,s=(e,t,r)=>{var a;if(!W.doesSettingSupportLevel(i,t))return void o.a.warn(`Setting handler notified for an update of an invalid setting level: ${i}@${t} - this likely means a weird setting value made it into the level's storage. The notification will be ignored.`);const s=W.getValue(i),l=null!==(a=W.getValueAt(t,i))&&void 0!==a?a:r;n(i,e,t,l,s)};return W.watchers.set(a,s),L.d.watchSetting(e,t,s),a}static unwatchSetting(e){W.watchers.has(e)?(L.d.unwatchSetting(W.watchers.get(e)),W.watchers.delete(e)):o.a.warn(`Ending non-existent watcher ID ${e}`)}static monitorSetting(e,t){t=t||null,this.monitors.has(e)||this.monitors.set(e,new Map);const n=()=>{this.monitors.get(e).set(t,W.watchSetting(e,t,((e,t,n,r,i)=>{P.a.dispatch({action:U.a.SettingUpdated,settingName:e,roomId:t,level:n,newValueAtLevel:r,newValue:i})})))},r=Array.from(this.monitors.get(e).keys());r.find((e=>e===t||null===e))?null===t&&(r.forEach((t=>{W.unwatchSetting(this.monitors.get(e).get(t))})),this.monitors.get(e).clear(),n()):n()}static getDisplayName(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.a.DEFAULT;if(!L.c[e]||!L.c[e].displayName)return null;let n=L.c[e].displayName;return n instanceof Object&&(n=n[t]?n[t]:n.default),Object(M.a)(n)}static getDescription(e){var t;const n=null===(t=L.c[e])||void 0===t?void 0:t.description;return n?"string"!=typeof n?n():Object(M.a)(n):null}static isFeature(e){return!!L.c[e]&&!!L.c[e].isFeature}static shouldHaveWarning(e){var t;return!!L.c[e]&&(null!==(t=L.c[e].shouldWarn)&&void 0!==t&&t)}static getBetaInfo(e){var t;if(W.isFeature(e)&&!1!==W.getValueAt(s.a.CONFIG,e,null,!0,!0))return null===(t=L.c[e])||void 0===t?void 0:t.betaInfo}static getLabGroup(e){if(W.isFeature(e))return L.c[e].labsGroup}static isEnabled(e){var t,n;return!!L.c[e]&&(null===(t=!(null!==(n=L.c[e].controller)&&void 0!==n&&n.settingDisabled))||void 0===t||t)}static getValue(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!L.c[e])throw new Error("Setting '"+e+"' does not appear to be a setting.");const r=K(L.c[e]);return W.getValueAt(r[0],e,t,!1,n)}static getValueAt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const o=L.c[t];if(!o)throw new Error("Setting '"+t+"' does not appear to be a setting.");const a=K(o);a.includes(s.a.DEFAULT)||a.push(s.a.DEFAULT);const l=a.indexOf(e);if(-1===l)throw new Error(`Level "${e}" for setting "${t}" is not prioritized`);const c=W.getHandlers(t);if(o.invertedSettingName&&(t=o.invertedSettingName),r){const r=c[e];if(!r)return W.getFinalValue(o,e,n,null,null);const i=r.getValue(t,n);return W.getFinalValue(o,e,n,i,e)}for(let r=l;r<a.length;r++){const s=c[a[r]];if(!s)continue;if(i&&"default"===a[r])continue;const l=s.getValue(t,n);if(null!=l)return W.getFinalValue(o,e,n,l,a[r])}return W.getFinalValue(o,e,n,null,null)}static getDefaultValue(e){if(!L.c[e])throw new Error("Setting '"+e+"' does not appear to be a setting.");return L.c[e].default}static getFinalValue(e,t,n,r,i){let o=r;if(e.controller){const a=e.controller.getValueOverride(t,n,r,i);null!=a&&(o=a)}return e.invertedSettingName&&(o=!o),o}static async setValue(e,t,n,r){var i;const o=L.c[e];if(!o)throw new Error("Setting '"+e+"' does not appear to be a setting.");const a=W.getHandler(e,n);if(!a)throw new Error("Setting "+e+" does not have a handler for "+n);if(o.invertedSettingName&&(e=o.invertedSettingName,r=!r),!a.canSetValue(e,t))throw new Error("User cannot set "+e+" at "+n+" in "+t);o.controller&&!await o.controller.beforeChange(n,t,r)||(await a.setValue(e,t,r),null===(i=o.controller)||void 0===i||i.onChange(n,t,r))}static canSetValue(e,t,n){var r;if(!L.c[e])throw new Error("Setting '"+e+"' does not appear to be a setting.");if(!W.isEnabled(e))return!1;if(W.isFeature(e)&&(null===(r=L.c[e])||void 0===r||!r.betaInfo)){const n=W.getValueAt(s.a.CONFIG,e,t,!0,!0);if(!0===n||!1===n)return!1}const i=W.getHandler(e,n);return!!i&&i.canSetValue(e,t)}static isLevelSupported(e){return!!V[e]&&V[e].isSupported()}static doesSettingSupportLevel(e,t){var n;const r=L.c[e];if(!r)throw new Error("Setting '"+e+"' does not appear to be a setting.");return t===s.a.DEFAULT||!(null===(n=r.supportedLevels)||void 0===n||!n.includes(t))}static firstSupportedLevel(e){const t=L.c[e];if(!t)throw new Error("Setting '"+e+"' does not appear to be a setting.");const n=K(t);n.includes(s.a.DEFAULT)||n.push(s.a.DEFAULT);const r=W.getHandlers(e);for(const e of n){if(r[e])return e}return null}static runMigrations(){W.migrateHiddenReadReceipts()}static migrateHiddenReadReceipts(){if(a.a.get().isGuest())return;const e=P.a.register((t=>{if("MatrixActions.sync"===t.action){P.a.unregister(e);if("boolean"!=typeof W.getValue("sendReadReceipts",null,!0)){const e=V[s.a.DEVICE].readFeature("feature_hidden_read_receipts");if("boolean"==typeof e){const t=!e;console.log(`Setting sendReadReceipts to ${t} because of previously-set labs flag`),W.setValue("sendReadReceipts",null,s.a.ACCOUNT,t)}}}}))}static debugSetting(e,t){o.a.log(`--- DEBUG ${e}`);const n=L.c[e];o.a.log(`--- definition: ${n?JSON.stringify(n):"<NOT_FOUND>"}`),o.a.log(`--- default level order: ${JSON.stringify($)}`),o.a.log(`--- registered handlers: ${JSON.stringify(Object.keys(V))}`);const r=e=>{for(const n of Object.keys(V)){const r=V[n];try{const i=r.getValue(e,t);o.a.log(`--- ${n}@${t||"<no_room>"} = ${JSON.stringify(i)}`)}catch(e){o.a.log(`--- ${r.constructor.name}@${t||"<no_room>"} THREW ERROR: ${e.message}`),o.a.error(e)}if(t)try{const t=r.getValue(e,null);o.a.log(`--- ${n}@<no_room> = ${JSON.stringify(t)}`)}catch(e){o.a.log(`--- ${r.constructor.name}@<no_room> THREW ERROR: ${e.message}`),o.a.error(e)}}o.a.log("--- calculating as returned by SettingsStore"),o.a.log("--- these might not match if the setting uses a controller - be warned!");try{const n=W.getValue(e,t);o.a.log(`--- SettingsStore#generic@${t||"<no_room>"} = ${JSON.stringify(n)}`)}catch(e){o.a.log(`--- SettingsStore#generic@${t||"<no_room>"} THREW ERROR: ${e.message}`),o.a.error(e)}if(t)try{const t=W.getValue(e,null);o.a.log(`--- SettingsStore#generic@<no_room> = ${JSON.stringify(t)}`)}catch(e){o.a.log(`--- SettingsStore#generic@$<no_room> THREW ERROR: ${e.message}`),o.a.error(e)}for(const n of $){try{const r=W.getValueAt(n,e,t);o.a.log(`--- SettingsStore#${n}@${t||"<no_room>"} = ${JSON.stringify(r)}`)}catch(e){o.a.log(`--- SettingsStore#${n}@${t||"<no_room>"} THREW ERROR: ${e.message}`),o.a.error(e)}if(t)try{const t=W.getValueAt(n,e,null);o.a.log(`--- SettingsStore#${n}@<no_room> = ${JSON.stringify(t)}`)}catch(e){o.a.log(`--- SettingsStore#${n}@$<no_room> THREW ERROR: ${e.message}`),o.a.error(e)}}};r(e),n.invertedSettingName&&(o.a.log("--- TESTING INVERTED SETTING NAME"),o.a.log(`--- inverted: ${n.invertedSettingName}`),r(n.invertedSettingName)),o.a.log("--- END DEBUG")}static getHandler(e,t){const n=W.getHandlers(e);return n[t]?n[t]:null}static getHandlers(e){if(!L.c[e])return{};const t={};for(const n of L.c[e].supportedLevels){if(!V[n])throw new Error("Unexpected level "+n);W.isLevelSupported(n)&&(t[n]=V[n])}return t.default||(t.default=V.default),t}}i()(W,"watchers",new Map),i()(W,"monitors",new Map),i()(W,"watcherCount",1),window.mxSettingsStore=W},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)){if(r.length){var a=i.apply(null,r);a&&e.push(a)}}else if("object"===o){if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]")){e.push(r.toString());continue}for(var s in r)n.call(r,s)&&r[s]&&e.push(s)}}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return v}));var r=n(130),i=n.n(r),o=n(13),a=n.n(o),s=n(120),l=n.n(s),c=n(186),u=n.n(c),d=n(126),h=n.n(d),p=n(16),m=n(158),g=n(124),f=n(994);const _="mx_Dialog_Container",b="mx_Dialog_StaticContainer";let v;!function(e){e.Opened="opened"}(v||(v={}));class y extends m.b{constructor(){super(...arguments),a()(this,"counter",0),a()(this,"priorityModal",null),a()(this,"staticModal",null),a()(this,"modals",[]),a()(this,"onBackgroundClick",(()=>{const e=this.getCurrentModal();e&&(e.closeReason="backgroundClick",e.close(),e.closeReason=void 0)}))}static getOrCreateContainer(){let e=document.getElementById(_);return e||(e=document.createElement("div"),e.id=_,document.body.appendChild(e)),e}static getOrCreateStaticContainer(){let e=document.getElementById(b);return e||(e=document.createElement("div"),e.id=b,document.body.appendChild(e)),e}toggleCurrentDialogVisibility(){const e=this.getCurrentModal();e&&(e.hidden=!e.hidden)}hasDialogs(){return!!this.priorityModal||!!this.staticModal||this.modals.length>0}createDialog(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return this.createDialogAsync(Promise.resolve(e),t,n,r,i,o)}appendDialog(e,t,n){return this.appendDialogAsync(Promise.resolve(e),t,n)}closeCurrentModal(e){const t=this.getCurrentModal();t&&(t.closeReason=e,t.close())}buildModal(e,t,n,r){const o={onFinished:null==t?void 0:t.onFinished,onBeforeClose:null==r?void 0:r.onBeforeClose,className:n,elem:null},[a,s]=this.getCloseFn(o,t),c=this.counter++;return o.elem=l.a.createElement(f.a,i()({key:c,prom:e},t,{onFinished:a})),o.close=a,{modal:o,closeDialog:a,onFinishedProm:s}}getCloseFn(e,t){var n=this;const r=Object(p.m)();return[async function(){if(e.beforeClosePromise)await e.beforeClosePromise;else if(e.onBeforeClose){e.beforeClosePromise=e.onBeforeClose(e.closeReason);const t=await e.beforeClosePromise;if(e.beforeClosePromise=void 0,!t)return}for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];r.resolve(o),null!=t&&t.onFinished&&t.onFinished.apply(null,o);const s=n.modals.indexOf(e);s>=0&&n.modals.splice(s,1),n.priorityModal===e&&(n.priorityModal=null,n.modals=[]),n.staticModal===e&&(n.staticModal=null,n.modals=[]),n.reRender()},r.promise]}createDialogAsync(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};const a=this.getCurrentModal(),{modal:s,closeDialog:l,onFinishedProm:c}=this.buildModal(e,t,n,o);return r?this.priorityModal=s:i?this.staticModal=s:this.modals.unshift(s),this.reRender(),this.emitIfChanged(a),{close:l,finished:c}}appendDialogAsync(e,t,n){const r=this.getCurrentModal(),{modal:i,closeDialog:o,onFinishedProm:a}=this.buildModal(e,t,n,{});return this.modals.push(i),this.reRender(),this.emitIfChanged(r),{close:o,finished:a}}emitIfChanged(e){e!==this.getCurrentModal()&&this.emit(v.Opened)}getCurrentModal(){return this.priorityModal?this.priorityModal:this.modals[0]||this.staticModal}async reRender(){if(await Object(p.N)(0),0===this.modals.length&&!this.priorityModal&&!this.staticModal)return g.a.dispatch({action:"aria_unhide_main_app"}),u.a.unmountComponentAtNode(y.getOrCreateContainer()),void u.a.unmountComponentAtNode(y.getOrCreateStaticContainer());if(g.a.dispatch({action:"aria_hide_main_app"}),this.staticModal){const e=h()("mx_Dialog_wrapper mx_Dialog_staticWrapper",this.staticModal.className),t=l.a.createElement("div",{className:e},l.a.createElement("div",{className:"mx_Dialog"},this.staticModal.elem),l.a.createElement("div",{"data-testid":"dialog-background",className:"mx_Dialog_background mx_Dialog_staticBackground",onClick:this.onBackgroundClick}));u.a.render(t,y.getOrCreateStaticContainer())}else u.a.unmountComponentAtNode(y.getOrCreateStaticContainer());const t=this.getCurrentModal();if(t===this.staticModal||t.hidden)u.a.unmountComponentAtNode(y.getOrCreateContainer());else{const n=h()("mx_Dialog_wrapper",t.className,{mx_Dialog_wrapperWithStaticUnder:this.staticModal}),r=l.a.createElement("div",{className:n},l.a.createElement("div",{className:"mx_Dialog"},t.elem),l.a.createElement("div",{"data-testid":"dialog-background",className:"mx_Dialog_background",onClick:this.onBackgroundClick}));e((()=>u.a.render(r,y.getOrCreateContainer())))}}}window.singletonModalManager||(window.singletonModalManager=new y),t.b=window.singletonModalManager}).call(this,n(54).setImmediate)},function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return r})),function(e){e.ViewUser="view_user",e.ViewUserSettings="view_user_settings",e.ViewUserDeviceSettings="view_user_device_settings",e.ViewRoomDirectory="view_room_directory",e.ViewRoomError="view_room_error",e.ViewHomePage="view_home_page",e.RecheckTheme="recheck_theme",e.CheckUpdates="check_updates",e.FocusSendMessageComposer="focus_send_message_composer",e.ClearAndFocusSendMessageComposer="clear_focus_send_message_composer",e.FocusEditMessageComposer="focus_edit_message_composer",e.FocusAComposer="focus_a_composer",e.ToggleUserMenu="toggle_user_menu",e.ToggleSpacePanel="toggle_space_panel",e.UpdateFontSize="update_font_size",e.UpdateSystemFont="update_system_font",e.ViewRoom="view_room",e.ViewThread="view_thread",e.ViewRoomDelta="view_room_delta",e.OpenDialPad="open_dial_pad",e.DialNumber="dial_number",e.PstnSupportUpdated="pstn_support_updated",e.VirtualRoomSupportUpdated="virtual_room_support_updated",e.UploadStarted="upload_started",e.UploadProgress="upload_progress",e.UploadFinished="upload_finished",e.UploadFailed="upload_failed",e.UploadCanceled="upload_canceled",e.JoinRoom="join_room",e.JoinRoomReady="join_room_ready",e.JoinRoomError="join_room_error",e.BulkRedactStart="bulk_redact_start",e.BulkRedactEnd="bulk_redact_end",e.ComposerInsert="composer_insert",e.SwitchSpace="switch_space",e.UpdateSpaceHierarchy="update_space_hierarchy",e.SettingUpdated="setting_updated",e.EditEvent="edit_event",e.PseudonymousAnalyticsAccept="pseudonymous_analytics_accept",e.PseudonymousAnalyticsReject="pseudonymous_analytics_reject",e.ReportKeyBackupNotEnabled="report_key_backup_not_enabled",e.AfterLeaveRoom="after_leave_room",e.DoAfterSyncPrepared="do_after_sync_prepared",e.ViewStartChatOrReuse="view_start_chat_or_reuse",e.ActiveRoomChanged="active_room_changed",e.OpenForwardDialog="open_forward_dialog",e.OpenReportEventDialog="open_report_event_dialog",e.TriggerLogout="trigger_logout",e.OpenSpacePreferences="open_space_preferences",e.OpenSpaceSettings="open_space_settings",e.OpenInviteDialog="open_invite_dialog",e.OpenAddToExistingSpaceDialog="open_add_to_existing_space_dialog",e.DumpDebugLogs="dump_debug_logs",e.ShowRoomTopic="show_room_topic",e.OnLoggedOut="on_logged_out",e.OnLoggedIn="on_logged_in",e.OverwriteLogin="overwrite_login",e.PlatformSet="platform_set",e.ShowThread="show_thread"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"h",(function(){return o})),n.d(t,"e",(function(){return a})),n.d(t,"i",(function(){return s})),n.d(t,"j",(function(){return l})),n.d(t,"k",(function(){return c})),n.d(t,"o",(function(){return u})),n.d(t,"n",(function(){return d})),n.d(t,"r",(function(){return h})),n.d(t,"q",(function(){return p})),n.d(t,"p",(function(){return m})),n.d(t,"m",(function(){return g})),n.d(t,"d",(function(){return f})),n.d(t,"l",(function(){return _})),n.d(t,"a",(function(){return b})),n.d(t,"g",(function(){return v})),n.d(t,"f",(function(){return y})),n.d(t,"c",(function(){return E}));var r=n(15);let i,o,a;!function(e){e.RoomCanonicalAlias="m.room.canonical_alias",e.RoomCreate="m.room.create",e.RoomJoinRules="m.room.join_rules",e.RoomMember="m.room.member",e.RoomThirdPartyInvite="m.room.third_party_invite",e.RoomPowerLevels="m.room.power_levels",e.RoomName="m.room.name",e.RoomTopic="m.room.topic",e.RoomAvatar="m.room.avatar",e.RoomPinnedEvents="m.room.pinned_events",e.RoomEncryption="m.room.encryption",e.RoomHistoryVisibility="m.room.history_visibility",e.RoomGuestAccess="m.room.guest_access",e.RoomServerAcl="m.room.server_acl",e.RoomTombstone="m.room.tombstone",e.RoomPredecessor="org.matrix.msc3946.room_predecessor",e.SpaceChild="m.space.child",e.SpaceParent="m.space.parent",e.RoomRedaction="m.room.redaction",e.RoomMessage="m.room.message",e.RoomMessageEncrypted="m.room.encrypted",e.Sticker="m.sticker",e.CallInvite="m.call.invite",e.CallCandidates="m.call.candidates",e.CallAnswer="m.call.answer",e.CallHangup="m.call.hangup",e.CallReject="m.call.reject",e.CallSelectAnswer="m.call.select_answer",e.CallNegotiate="m.call.negotiate",e.CallSDPStreamMetadataChanged="m.call.sdp_stream_metadata_changed",e.CallSDPStreamMetadataChangedPrefix="org.matrix.call.sdp_stream_metadata_changed",e.CallReplaces="m.call.replaces",e.CallAssertedIdentity="m.call.asserted_identity",e.CallAssertedIdentityPrefix="org.matrix.call.asserted_identity",e.KeyVerificationRequest="m.key.verification.request",e.KeyVerificationStart="m.key.verification.start",e.KeyVerificationCancel="m.key.verification.cancel",e.KeyVerificationMac="m.key.verification.mac",e.KeyVerificationDone="m.key.verification.done",e.KeyVerificationKey="m.key.verification.key",e.KeyVerificationAccept="m.key.verification.accept",e.KeyVerificationReady="m.key.verification.ready",e.RoomMessageFeedback="m.room.message.feedback",e.Reaction="m.reaction",e.PollStart="org.matrix.msc3381.poll.start",e.Typing="m.typing",e.Receipt="m.receipt",e.Presence="m.presence",e.FullyRead="m.fully_read",e.Tag="m.tag",e.SpaceOrder="org.matrix.msc3230.space_order",e.PushRules="m.push_rules",e.Direct="m.direct",e.IgnoredUserList="m.ignored_user_list",e.RoomKey="m.room_key",e.RoomKeyRequest="m.room_key_request",e.ForwardedRoomKey="m.forwarded_room_key",e.Dummy="m.dummy",e.GroupCallPrefix="org.matrix.msc3401.call",e.GroupCallMemberPrefix="org.matrix.msc3401.call.member"}(i||(i={})),function(e){e.Annotation="m.annotation",e.Replace="m.replace",e.Reference="m.reference",e.Thread="m.thread"}(o||(o={})),function(e){e.Text="m.text",e.Emote="m.emote",e.Notice="m.notice",e.Image="m.image",e.File="m.file",e.Audio="m.audio",e.Location="m.location",e.Video="m.video",e.KeyVerificationRequest="m.key.verification.request"}(a||(a={}));const s="type";let l;!function(e){e.Space="m.space",e.UnstableCall="org.matrix.msc3417.call",e.ElementVideo="io.element.video"}(l||(l={}));const c="org.matrix.msgid",u=new r.c("m.room.purpose","org.matrix.msc3088.purpose"),d=new r.c("m.enabled","org.matrix.msc3088.enabled"),h=new r.c("m.data_tree","org.matrix.msc3089.data_tree"),p=new r.c("m.leaf","org.matrix.msc3089.leaf"),m=new r.c("m.branch","org.matrix.msc3089.branch"),g=new r.c("m.room.marker","org.matrix.msc2716.marker"),f=new r.c("with_relations","org.matrix.msc3912.with_relations"),_=new r.c("io.element.functional_members","io.element.functional_members"),b=new r.c("m.visibility","org.matrix.msc3531.visibility"),v=new r.c("enabled","org.matrix.msc3881.enabled"),y=new r.c("device_id","org.matrix.msc3881.device_id"),E=new r.c("m.local_notification_settings","org.matrix.msc3890.local_notification_settings")},function(e,t){function n(){return e.exports=n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,n.apply(this,arguments)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return u}));var r=n(13),i=n.n(r),o=n(26);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const l={brand:"Element",integrations_ui_url:"https://scalar.vector.im/",integrations_rest_url:"https://scalar.vector.im/api",uisi_autorageshake_app:"element-auto-uisi",jitsi:{preferred_domain:"meet.element.io"},element_call:{url:"https://call.element.io",use_exclusively:!1,participant_limit:8,brand:"Element Call"},desktopBuilds:{available:!0,logo:n(995).default,url:"https://element.io/get-started"},voice_broadcast:{chunk_length:120,max_length:14400}};class c{static setInstance(e){c.instance=e,c.fallback=new o.a(e),window.mxReactSdkConfig=e}static get(e,t){return void 0===e?c.instance||{}:c.fallback.get(e,t)}static getObject(e,t){const n=c.get(e,t);return null!=n?new o.a(n):void 0===n?void 0:null}static put(e){c.setInstance(s(s({},l),e))}static unset(){c.setInstance({})}static add(e){c.put(s(s({},c.get()),e))}}function u(e){return e.sso_redirect_options?e.sso_redirect_options:e.sso_immediate_redirect?{immediate:!0}:{}}i()(c,"instance",void 0),i()(c,"fallback",void 0)},function(e,t,n){var r=n(408);e.exports=function(e,t){if(null==e)return{};var n,i,o=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return c}));var r=n(130),i=n.n(r),o=n(120),a=n.n(o);const s=Object(o.createContext)(void 0);function l(){return Object(o.useContext)(s)}s.displayName="MatrixClientContext",t.a=s;const c=e=>{const t=e;return Object(o.forwardRef)(((e,n)=>{const r=Object(o.useContext)(s);return a.a.createElement(t,i()({ref:n},e,{mxClient:r}))}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(121);class l extends a.a.PureComponent{render(){const{w:e,h:t,message:n}=this.props;return a.a.createElement("div",{className:"mx_Spinner"},n&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:"mx_Spinner_Msg"},n)," "),a.a.createElement("div",{className:"mx_Spinner_icon",style:{width:e,height:t},"aria-label":Object(s.a)("Loading…"),role:"progressbar","data-testid":"spinner"}))}}i()(l,"defaultProps",{w:32,h:32})},function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(427),l=n.n(s),c=n(126),u=n.n(c),d=n(123),h=n(122),p=n(121),m=n(133),g=n(175),f=n(159),_=n(152),b=n(142);class v extends a.a.Component{constructor(e){super(e),i()(this,"matrixClient",void 0),i()(this,"onKeyDown",(e=>{var t,n;null===(t=(n=this.props).onKeyDown)||void 0===t||t.call(n,e);switch(Object(_.a)().getAccessibilityAction(e)){case b.h.Escape:if(!this.props.hasCancel)break;e.stopPropagation(),e.preventDefault(),this.props.onFinished()}})),i()(this,"onCancelClick",(()=>{this.props.onFinished()})),this.matrixClient=h.a.get()}render(){let e,t;this.props.hasCancel&&(e=a.a.createElement(d.a,{onClick:this.onCancelClick,className:"mx_Dialog_cancelButton","aria-label":Object(p.a)("Close dialog")})),this.props.headerImage&&(t=a.a.createElement("img",{className:"mx_Dialog_titleImage",src:this.props.headerImage,alt:""}));const n={onKeyDown:this.onKeyDown,role:"dialog","aria-describedby":this.props.contentId};return this.props["aria-label"]?n["aria-label"]=this.props["aria-label"]:n["aria-labelledby"]="mx_BaseDialog_title",a.a.createElement(m.a.Provider,{value:this.matrixClient},a.a.createElement(f.a,{screenName:this.props.screenName}),a.a.createElement(l.a,{returnFocus:!0,lockProps:n,className:u()({[this.props.className]:!0,mx_Dialog_fixedWidth:this.props.fixedWidth})},this.props.top,a.a.createElement("div",{className:u()("mx_Dialog_header",{mx_Dialog_headerWithButton:!!this.props.headerButton,mx_Dialog_headerWithCancel:!!e})},a.a.createElement(g.a,{size:"h2",className:u()("mx_Dialog_title",this.props.titleClass),id:"mx_BaseDialog_title"},t,this.props.title),this.props.headerButton,e),this.props.children))}}i()(v,"defaultProps",{hasCancel:!0,fixedWidth:!0})},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"setCryptoStoreFactory",(function(){return L})),n.d(t,"createClient",(function(){return U})),n.d(t,"createRoomWidgetClient",(function(){return j}));var r=n(350),i=n(351),o=n(424),a=n(147),s=n(514);n.d(t,"CRYPTO_ENABLED",(function(){return a.a})),n.d(t,"UNSTABLE_MSC3852_LAST_SEEN_UA",(function(){return a.g})),n.d(t,"PendingEventOrdering",(function(){return a.e})),n.d(t,"RoomVersionStability",(function(){return a.f})),n.d(t,"M_AUTHENTICATION",(function(){return a.c})),n.d(t,"ClientEvent",(function(){return a.b})),n.d(t,"MatrixClient",(function(){return a.d})),n.d(t,"fixNotificationCountOnDecryption",(function(){return a.h})),n.d(t,"RoomWidgetClient",(function(){return s.a}));var l=n(193);n.d(t,"HttpApiEvent",(function(){return l.d})),n.d(t,"ClientPrefix",(function(){return l.a})),n.d(t,"IdentityPrefix",(function(){return l.e})),n.d(t,"MediaPrefix",(function(){return l.h})),n.d(t,"HTTPError",(function(){return l.c})),n.d(t,"MatrixError",(function(){return l.f})),n.d(t,"ConnectionError",(function(){return l.b})),n.d(t,"Method",(function(){return l.i})),n.d(t,"timeoutSignal",(function(){return l.m})),n.d(t,"anySignal",(function(){return l.j})),n.d(t,"parseErrorResponse",(function(){return l.k})),n.d(t,"retryNetworkOperation",(function(){return l.l})),n.d(t,"MatrixHttpApi",(function(){return l.g}));var c=n(321);n.d(t,"AutoDiscoveryAction",(function(){return c.b})),n.d(t,"AutoDiscovery",(function(){return c.a}));var u=n(515);n.d(t,"Category",(function(){return u.a})),n.d(t,"SyncAccumulator",(function(){return u.b}));var d=n(288);n.d(t,"InvalidStoreState",(function(){return d.d})),n.d(t,"InvalidStoreError",(function(){return d.c})),n.d(t,"InvalidCryptoStoreState",(function(){return d.b})),n.d(t,"InvalidCryptoStoreError",(function(){return d.a})),n.d(t,"KeySignatureUploadError",(function(){return d.e}));var h=n(355);n.d(t,"BeaconEvent",(function(){return h.b})),n.d(t,"isTimestampInDuration",(function(){return h.d})),n.d(t,"getBeaconInfoIdentifier",(function(){return h.c})),n.d(t,"Beacon",(function(){return h.a}));var p=n(143);n.d(t,"EventStatus",(function(){return p.a})),n.d(t,"MatrixEventEvent",(function(){return p.c})),n.d(t,"MatrixEvent",(function(){return p.b}));var m=n(140);n.d(t,"KNOWN_SAFE_ROOM_VERSION",(function(){return m.a})),n.d(t,"NotificationCountType",(function(){return m.b})),n.d(t,"RoomEvent",(function(){return m.d})),n.d(t,"Room",(function(){return m.c})),n.d(t,"RoomNameType",(function(){return m.e}));var g=n(179);n.d(t,"Direction",(function(){return g.a})),n.d(t,"EventTimeline",(function(){return g.b}));var f=n(353);n.d(t,"DuplicateStrategy",(function(){return f.a})),n.d(t,"EventTimelineSet",(function(){return f.b}));var _=n(410);n.d(t,"PollEvent",(function(){return _.b})),n.d(t,"Poll",(function(){return _.a}));var b=n(184);n.d(t,"RoomMemberEvent",(function(){return b.b})),n.d(t,"RoomMember",(function(){return b.a}));var v=n(151);n.d(t,"RoomStateEvent",(function(){return v.b})),n.d(t,"RoomState",(function(){return v.a}));var y=n(222);n.d(t,"UserEvent",(function(){return y.b})),n.d(t,"User",(function(){return y.a})),n.d(t,"MatrixScheduler",(function(){return o.a}));var E=n(315);n.d(t,"Filter",(function(){return E.a}));var S=n(516);n.d(t,"TimelineWindow",(function(){return S.b})),n.d(t,"TimelineIndex",(function(){return S.a}));var w=n(425);n.d(t,"AuthType",(function(){return w.a})),n.d(t,"InteractiveAuth",(function(){return w.b}));var T=n(271);n.d(t,"SERVICE_TYPES",(function(){return T.a})),n.d(t,"MemoryStore",(function(){return i.a}));var C=n(492);n.d(t,"IndexedDBStore",(function(){return C.a})),n.d(t,"MemoryCryptoStore",(function(){return r.a}));var x=n(225);n.d(t,"IndexedDBCryptoStore",(function(){return x.a}));var F=n(352);n.d(t,"getHttpUriForMxc",(function(){return F.a}));var D=n(129);n.d(t,"EventType",(function(){return D.b})),n.d(t,"RelationType",(function(){return D.h})),n.d(t,"MsgType",(function(){return D.e})),n.d(t,"RoomCreateTypeField",(function(){return D.i})),n.d(t,"RoomType",(function(){return D.j})),n.d(t,"ToDeviceMessageId",(function(){return D.k})),n.d(t,"UNSTABLE_MSC3088_PURPOSE",(function(){return D.o})),n.d(t,"UNSTABLE_MSC3088_ENABLED",(function(){return D.n})),n.d(t,"UNSTABLE_MSC3089_TREE_SUBTYPE",(function(){return D.r})),n.d(t,"UNSTABLE_MSC3089_LEAF",(function(){return D.q})),n.d(t,"UNSTABLE_MSC3089_BRANCH",(function(){return D.p})),n.d(t,"UNSTABLE_MSC2716_MARKER",(function(){return D.m})),n.d(t,"MSC3912_RELATION_BASED_REDACTIONS_PROP",(function(){return D.d})),n.d(t,"UNSTABLE_ELEMENT_FUNCTIONAL_USERS",(function(){return D.l})),n.d(t,"EVENT_VISIBILITY_CHANGE_TYPE",(function(){return D.a})),n.d(t,"PUSHER_ENABLED",(function(){return D.g})),n.d(t,"PUSHER_DEVICE_ID",(function(){return D.f})),n.d(t,"LOCAL_NOTIFICATION_SETTINGS_PREFIX",(function(){return D.c}));var k=n(231);n.d(t,"PushRuleActionName",(function(){return k.d})),n.d(t,"TweakName",(function(){return k.g})),n.d(t,"ConditionOperator",(function(){return k.b})),n.d(t,"DMMemberCountCondition",(function(){return k.c})),n.d(t,"isDmMemberCountCondition",(function(){return k.h})),n.d(t,"ConditionKind",(function(){return k.a})),n.d(t,"PushRuleKind",(function(){return k.e})),n.d(t,"RuleId",(function(){return k.f}));var O=n(160);n.d(t,"Visibility",(function(){return O.f})),n.d(t,"Preset",(function(){return O.d})),n.d(t,"JoinRule",(function(){return O.c})),n.d(t,"RestrictedAllowType",(function(){return O.e})),n.d(t,"GuestAccess",(function(){return O.a})),n.d(t,"HistoryVisibility",(function(){return O.b}));n(675);var I=n(423);n.d(t,"SearchOrderBy",(function(){return I.a}));var A=n(504);n.d(t,"RoomSummary",(function(){return A.a}));var R=n(269);n.d(t,"ContentHelpers",(function(){return R}));var N=n(188);n.d(t,"createNewMatrixCall",(function(){return N.h}));var M=n(224);n.d(t,"GroupCallEvent",(function(){return M.c})),n.d(t,"GroupCallIntent",(function(){return M.d})),n.d(t,"GroupCallState",(function(){return M.e})),n.d(t,"GroupCallType",(function(){return M.f}));let P=()=>new r.a;function L(e){P=e}function B(t){var n,r,a;return t.store=null!==(n=t.store)&&void 0!==n?n:new i.a({localStorage:e.localStorage}),t.scheduler=null!==(r=t.scheduler)&&void 0!==r?r:new o.a,t.cryptoStore=null!==(a=t.cryptoStore)&&void 0!==a?a:P(),t}function U(e){return new a.d(B(e))}function j(e,t,n,r){return new s.a(e,t,n,B(r))}}.call(this,n(14))},function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return r})),function(e){e.DEVICE="device",e.ROOM_DEVICE="room-device",e.ROOM_ACCOUNT="room-account",e.ACCOUNT="account",e.ROOM="room",e.PLATFORM="platform",e.CONFIG="config",e.DEFAULT="default"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return s}));var r=n(120),i=n(194);let o;!function(e){e.Room="Room",e.Thread="Thread",e.ThreadsList="ThreadsList",e.File="File",e.Notification="Notification",e.Search="Search",e.Pinned="Pinned"}(o||(o={}));const a=Object(r.createContext)({roomLoading:!0,peekLoading:!1,shouldPeek:!0,membersLoaded:!1,numUnreadMessages:0,canPeek:!1,showApps:!1,isPeeking:!1,showRightPanel:!0,joining:!1,showTopUnreadMessagesBar:!1,statusBarVisible:!1,canReact:!1,canSelfRedact:!1,canSendMessages:!1,resizing:!1,layout:i.a.Group,lowBandwidth:!1,alwaysShowTimestamps:!1,showTwelveHourTimestamps:!1,readMarkerInViewThresholdMs:3e3,readMarkerOutOfViewThresholdMs:3e4,showHiddenEvents:!1,showReadReceipts:!0,showRedactions:!0,showJoinLeaves:!0,showAvatarChanges:!0,showDisplaynameChanges:!0,matrixClientIsReady:!1,showUrlPreview:!1,timelineRenderingType:o.Room,threadId:void 0,liveTimeline:void 0,narrow:!1,activeCall:null,msc3946ProcessDynamicPredecessor:!1});function s(){return Object(r.useContext)(a)}a.displayName="RoomContext",t.b=a},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(132),i=n.n(r),o=n(13),a=n.n(o),s=n(120),l=n.n(s),c=n(126),u=n.n(c),d=n(149),h=n(161);const p=["element","inputRef","prefixComponent","postfixComponent","className","onValidate","children","tooltipContent","forceValidity","tooltipClassName","list","validateOnBlur","validateOnChange","validateOnFocus","usePlaceholderAsHint","forceTooltipVisible"];function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const f="mx_Field";let _=1;class b extends l.a.PureComponent{constructor(e){super(e),a()(this,"id",void 0),a()(this,"inputRef",void 0),a()(this,"validateOnChange",Object(d.debounce)((()=>{this.validate({focused:!0})}),200)),a()(this,"onFocus",(e=>{var t,n;this.setState({focused:!0}),this.props.validateOnFocus&&this.validate({focused:!0}),null===(t=(n=this.props).onFocus)||void 0===t||t.call(n,e)})),a()(this,"onChange",(e=>{var t,n;this.props.validateOnChange&&this.validateOnChange(),null===(t=(n=this.props).onChange)||void 0===t||t.call(n,e)})),a()(this,"onBlur",(e=>{var t,n;this.setState({focused:!1}),this.props.validateOnBlur&&this.validate({focused:!1}),null===(t=(n=this.props).onBlur)||void 0===t||t.call(n,e)})),this.state={feedbackVisible:!1,focused:!1},this.id=this.props.id||`${f}_${_++}`}focus(){var e;null===(e=this.inputRef.current)||void 0===e||e.focus(),this.setState({focused:!0})}async validate(e){var t,n;let{focused:r,allowEmpty:i=!0}=e;if(!this.props.onValidate)return;const o=null!==(t=null===(n=this.inputRef.current)||void 0===n?void 0:n.value)&&void 0!==t?t:null,{valid:a,feedback:s}=await this.props.onValidate({value:o,focused:r,allowEmpty:i});return this.state.focused&&s?this.setState({valid:a,feedback:s,feedbackVisible:!0}):this.setState({valid:a,feedbackVisible:!1}),a}render(){var e;const t=this.props,{element:n,inputRef:r,prefixComponent:o,postfixComponent:a,className:s,onValidate:c,children:d,tooltipContent:m,forceValidity:f,tooltipClassName:_,list:b,validateOnBlur:v,validateOnChange:y,validateOnFocus:E,usePlaceholderAsHint:S,forceTooltipVisible:w}=t,T=i()(t,p);this.inputRef=r||l.a.createRef(),T.placeholder=null!==(e=T.placeholder)&&void 0!==e?e:T.label,T.id=this.id,T.onFocus=this.onFocus,T.onChange=this.onChange,T.onBlur=this.onBlur;const C=g(g({},T),{},{ref:this.inputRef,list:b}),x=l.a.createElement(this.props.element,C,d);let F,D;o&&(F=l.a.createElement("span",{className:"mx_Field_prefix"},o)),a&&(D=l.a.createElement("span",{className:"mx_Field_postfix"},a));const k=null!=f,O=u()("mx_Field",`mx_Field_${this.props.element}`,s,{mx_Field_labelAlwaysTopLeft:o||S,mx_Field_placeholderIsHint:S,mx_Field_valid:k?f:c&&!0===this.state.valid,mx_Field_invalid:k?!f:c&&!1===this.state.valid});let I;return(m||this.state.feedback)&&(I=l.a.createElement(h.b,{tooltipClassName:u()("mx_Field_tooltip","mx_Tooltip_noMargin",_),visible:this.state.focused&&w||this.state.feedbackVisible,label:m||this.state.feedback,alignment:h.b.Alignment.Right})),l.a.createElement("div",{className:O},F,x,l.a.createElement("label",{htmlFor:this.id},this.props.label),D,I)}}a()(b,"defaultProps",{element:"input",type:"text",validateOnFocus:!0,validateOnBlur:!0,validateOnChange:!0})},function(e,t,n){"use strict";n.d(t,"a",(function(){return D})),n.d(t,"b",(function(){return O})),n.d(t,"d",(function(){return I})),n.d(t,"c",(function(){return A})),n.d(t,"e",(function(){return N}));var r=n(13),i=n.n(r),o=n(10),a=n(353),s=n(179),l=n(352),c=n(16),u=n(143),d=n(409),h=n(184),p=n(504),m=n(1),g=n(287),f=n(129),_=n(147),b=n(315),v=n(151),y=n(355),E=n(170),S=n(18),w=n(661),T=n(662),C=n(410);function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const D="9",k=["1","2","3","4","5","6","7","8","9"];let O,I;!function(e){e.Highlight="highlight",e.Total="total"}(O||(O={})),function(e){e.MyMembership="Room.myMembership",e.Tags="Room.tags",e.AccountData="Room.accountData",e.Receipt="Room.receipt",e.Name="Room.name",e.Redaction="Room.redaction",e.RedactionCancelled="Room.redactionCancelled",e.LocalEchoUpdated="Room.localEchoUpdated",e.Timeline="Room.timeline",e.TimelineReset="Room.timelineReset",e.TimelineRefresh="Room.TimelineRefresh",e.OldStateUpdated="Room.OldStateUpdated",e.CurrentStateUpdated="Room.CurrentStateUpdated",e.HistoryImportedWithinTimeline="Room.historyImportedWithinTimeline",e.UnreadNotifications="Room.UnreadNotifications"}(I||(I={}));class A extends T.a{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.roomId=e,this.client=t,this.myUserId=n,this.opts=r,i()(this,"reEmitter",void 0),i()(this,"txnToEvent",new Map),i()(this,"notificationCounts",{}),i()(this,"threadNotifications",new Map),i()(this,"cachedThreadReadReceipts",new Map),i()(this,"oldestThreadedReceiptTs",1/0),i()(this,"unthreadedReceipts",new Map),i()(this,"timelineSets",void 0),i()(this,"polls",new Map),i()(this,"threadsTimelineSets",[]),i()(this,"filteredTimelineSets",{}),i()(this,"timelineNeedsRefresh",!1),i()(this,"pendingEventList",void 0),i()(this,"blacklistUnverifiedDevices",void 0),i()(this,"selfMembership",void 0),i()(this,"summaryHeroes",null),i()(this,"getTypeWarning",!1),i()(this,"getVersionWarning",!1),i()(this,"membersPromise",void 0),i()(this,"name",void 0),i()(this,"normalizedName",void 0),i()(this,"tags",{}),i()(this,"accountData",new Map),i()(this,"summary",null),i()(this,"timeline",void 0),i()(this,"oldState",void 0),i()(this,"currentState",void 0),i()(this,"relations",new w.a(this.client,this)),i()(this,"threads",new Map),i()(this,"lastThread",void 0),i()(this,"visibilityEvents",new Map),i()(this,"threadTimelineSetsPromise",null),i()(this,"threadsReady",!1),i()(this,"updateThreadRootEvents",((e,t,n)=>{var r,i;e.length&&(this.updateThreadRootEvent(null===(r=this.threadsTimelineSets)||void 0===r?void 0:r[0],e,t,n),e.hasCurrentUserParticipated&&this.updateThreadRootEvent(null===(i=this.threadsTimelineSets)||void 0===i?void 0:i[1],e,t,n))})),i()(this,"updateThreadRootEvent",((e,t,n,r)=>{e&&t.rootEvent&&(r&&e.removeEvent(t.id),E.e.hasServerSideSupport?e.addLiveEvent(t.rootEvent,{duplicateStrategy:a.a.Replace,fromCache:!1,roomState:this.currentState}):e.addEventToTimeline(t.rootEvent,e.getLiveTimeline(),{toStartOfTimeline:n}))})),i()(this,"applyRedaction",(e=>{if(e.isRedaction()){const t=e.event.redacts,n=t?this.findEventById(t):void 0;if(n){if(n.makeRedacted(e),n.isState()){const e=this.currentState.getStateEvents(n.getType(),n.getStateKey());(null==e?void 0:e.getId())===n.getId()&&this.currentState.setStateEvents([n])}this.emit(I.Redaction,e,this),this.visibilityEvents.delete(t),n.isVisibilityEvent()&&this.redactVisibilityChangeEvent(e)}}})),this.setMaxListeners(100),this.reEmitter=new g.b(this),r.pendingEventOrdering=r.pendingEventOrdering||_.e.Chronological,this.name=e,this.normalizedName=e,this.timelineSets=[new a.b(this,r)],this.reEmitter.reEmit(this.getUnfilteredTimelineSet(),[I.Timeline,I.TimelineReset]),this.fixUpLegacyTimelineFields(),this.opts.pendingEventOrdering===_.e.Detached&&(this.pendingEventList=[],this.client.store.getPendingEvents(this.roomId).then((e=>{const n=this.client.getEventMapper({toDevice:!1,decrypt:!1});e.forEach((async e=>{const r=n(e);await t.decryptEventIfNeeded(r),r.setStatus(d.a.NOT_SENT),this.addPendingEvent(r,r.getTxnId())}))}))),this.opts.lazyLoadMembers?this.membersPromise=void 0:this.membersPromise=Promise.resolve(!1)}async createThreadsTimelineSets(){var e;if(this.threadTimelineSetsPromise)return this.threadTimelineSetsPromise;if(null!==(e=this.client)&&void 0!==e&&e.supportsThreads())try{this.threadTimelineSetsPromise=Promise.all([this.createThreadTimelineSet(),this.createThreadTimelineSet(E.g.My)]);const e=await this.threadTimelineSetsPromise;return this.threadsTimelineSets.push(...e),e}catch(e){return this.threadTimelineSetsPromise=null,null}return null}async decryptCriticalEvents(){if(!this.client.isCryptoEnabled())return;const e=this.getEventReadUpTo(this.client.getUserId(),!0),t=this.getLiveTimeline().getEvents(),n=t.findIndex((t=>t.event.event_id===e)),r=t.slice(n).reverse().map((e=>this.client.decryptEventIfNeeded(e,{isRetry:!0})));await Promise.allSettled(r)}async decryptAllEvents(){if(!this.client.isCryptoEnabled())return;const e=this.getUnfilteredTimelineSet().getLiveTimeline().getEvents().slice(0).reverse().map((e=>this.client.decryptEventIfNeeded(e,{isRetry:!0})));await Promise.allSettled(e)}getCreator(){var e;const t=this.currentState.getStateEvents(f.b.RoomCreate,"");return null!==(e=null==t?void 0:t.getContent().creator)&&void 0!==e?e:null}getVersion(){var e;const t=this.currentState.getStateEvents(f.b.RoomCreate,"");return t?null!==(e=t.getContent().room_version)&&void 0!==e?e:"1":(this.getVersionWarning||(m.a.warn("[getVersion] Room "+this.roomId+" does not have an m.room.create event"),this.getVersionWarning=!0),"1")}shouldUpgradeToVersion(){return k.includes(this.getVersion())?null:D}async getRecommendedVersion(){let e=(await this.client.getCapabilities())["m.room_versions"];if(!e){e={default:D,available:{}};for(const t of k)e.available[t]=_.f.Stable}let t=this.checkVersionAgainstCapability(e);if(t.urgent&&t.needsUpgrade){m.a.warn("Refreshing room version capability because the server looks to be supporting a newer room version we don't know about.");if(e=(await this.client.getCapabilities(!0))["m.room_versions"],!e)return m.a.warn("No room version capability - assuming upgrade required."),t;t=this.checkVersionAgainstCapability(e)}return t}checkVersionAgainstCapability(e){const t=this.getVersion();m.a.log(`[${this.roomId}] Current version: ${t}`),m.a.log(`[${this.roomId}] Version capability: `,e);const n={version:t,needsUpgrade:!1,urgent:!1};if(t===e.default)return n;return Object.keys(e.available).filter((t=>"stable"===e.available[t])).includes(t)||(n.version=e.default,n.needsUpgrade=!0,n.urgent=!!this.getVersion().match(/^[0-9]+[0-9.]*$/g),n.urgent?m.a.warn(`URGENT upgrade required on ${this.roomId}`):m.a.warn(`Non-urgent upgrade required on ${this.roomId}`)),n}userMayUpgradeRoom(e){return this.currentState.maySendStateEvent(f.b.RoomTombstone,e)}getPendingEvents(){if(!this.pendingEventList)throw new Error("Cannot call getPendingEvents with pendingEventOrdering == "+this.opts.pendingEventOrdering);return this.pendingEventList}removePendingEvent(e){if(!this.pendingEventList)throw new Error("Cannot call removePendingEvent with pendingEventOrdering == "+this.opts.pendingEventOrdering);const t=c.I(this.pendingEventList,(function(t){return t.getId()==e}),!1);return this.savePendingEvents(),t}hasPendingEvent(e){var t,n;return null!==(t=null===(n=this.pendingEventList)||void 0===n?void 0:n.some((t=>t.getId()===e)))&&void 0!==t&&t}getPendingEvent(e){var t,n;return null!==(t=null===(n=this.pendingEventList)||void 0===n?void 0:n.find((t=>t.getId()===e)))&&void 0!==t?t:null}getLiveTimeline(){return this.getUnfilteredTimelineSet().getLiveTimeline()}getLastActiveTimestamp(){const e=this.getLiveTimeline().getEvents();if(e.length){return e[e.length-1].getTs()}return Number.MIN_SAFE_INTEGER}getMyMembership(){var e;return null!==(e=this.selfMembership)&&void 0!==e?e:"leave"}getDMInviter(){const e=this.getMember(this.myUserId);if(e)return e.getDMInviter();if("invite"===this.selfMembership){var t;if(2===this.getInvitedAndJoinedMemberCount())return null===(t=this.summaryHeroes)||void 0===t?void 0:t[0]}}guessDMUserId(){const e=this.getMember(this.myUserId);if(e){const t=e.getDMInviter();if(t)return t}if(Array.isArray(this.summaryHeroes)&&this.summaryHeroes.length)return this.summaryHeroes[0];const t=this.currentState.getMembers().find((e=>e.userId!==this.myUserId));return t?t.userId:this.myUserId}getAvatarFallbackMember(){if(this.getInvitedAndJoinedMemberCount()>2)return;const e=Array.isArray(this.summaryHeroes)&&this.summaryHeroes.length;if(e){const e=this.summaryHeroes.map((e=>this.getMember(e))).find((e=>!!e));if(e)return e}const t=this.currentState.getMembers();if(t.length<=2){const e=t.find((e=>e.userId!==this.myUserId));if(e)return e}if(e){const e=this.summaryHeroes.map((e=>this.client.getUser(e))).find((e=>!!e));if(e){const t=new h.a(this.roomId,e.userId);return t.user=e,t}}}updateMyMembership(e){const t=this.selfMembership;this.selfMembership=e,t!==e&&("leave"===e&&this.cleanupAfterLeaving(),this.emit(I.MyMembership,this,e,t))}async loadMembersFromServer(){const e=this.client.store.getSyncToken();return(await this.client.members(this.roomId,void 0,"leave",null!=e?e:void 0)).chunk}async loadMembers(){let e=!1,t=await this.client.store.getOutOfBandMembers(this.roomId);(null===t||this.client.isCryptoEnabled()&&this.client.isRoomEncrypted(this.roomId))&&(e=!0,t=await this.loadMembersFromServer(),m.a.log(`LL: got ${t.length} members from server for room ${this.roomId}`));return{memberEvents:t.filter(c.A).map(this.client.getEventMapper()),fromServer:e}}membersLoaded(){return!this.opts.lazyLoadMembers||this.currentState.outOfBandMembersReady()}loadMembersIfNeeded(){if(this.membersPromise)return this.membersPromise;this.currentState.markOutOfBandMembersStarted();const e=this.loadMembers().then((e=>(this.currentState.setOutOfBandMembers(e.memberEvents),e.fromServer))).catch((e=>{throw this.membersPromise=void 0,this.currentState.markOutOfBandMembersFailed(),e}));return e.then((e=>{if(e){const e=this.currentState.getMembers().filter((e=>e.isOutOfBand())).map((e=>{var t;return null===(t=e.events.member)||void 0===t?void 0:t.event}));m.a.log(`LL: telling store to write ${e.length} members for room ${this.roomId}`);return this.client.store.setOutOfBandMembers(this.roomId,e).catch((e=>{m.a.log("LL: storing OOB room members failed, oh well",e)}))}})).catch((e=>{m.a.error(e)})),this.membersPromise=e,this.membersPromise}async clearLoadedMembersIfNeeded(){this.opts.lazyLoadMembers&&this.membersPromise&&(await this.loadMembersIfNeeded(),await this.client.store.clearOutOfBandMembers(this.roomId),this.currentState.clearOutOfBandMembers(),this.membersPromise=void 0)}cleanupAfterLeaving(){this.clearLoadedMembersIfNeeded().catch((e=>{m.a.error(`error after clearing loaded members from room ${this.roomId} after leaving`),m.a.log(e)}))}async refreshLiveTimeline(){const e=this.getLiveTimeline(),t=e.getPaginationToken(s.b.FORWARDS),n=e.getPaginationToken(s.b.BACKWARDS),r=e.getEvents(),i=r[r.length-1];m.a.log(`[refreshLiveTimeline for ${this.roomId}] at mostRecentEventInTimeline=${i&&i.getId()} liveTimelineBefore=${e.toString()} forwardPaginationToken=${t} backwardPaginationToken=${n}`);const o=this.getUnfilteredTimelineSet();let a;i?(this.resetLiveTimeline(null,null),this.emit(I.TimelineRefresh,this,o),a=await this.client.getEventTimeline(o,i.getId())):a=await this.client.getLatestTimeline(o);const l=o.getLiveTimeline();!l||null===l.getPaginationToken(s.a.Forward)&&null===l.getPaginationToken(s.a.Backward)&&0===l.getEvents().length?(m.a.log(`[refreshLiveTimeline for ${this.roomId}] using our new live timeline`),a.setPaginationToken(t,s.b.FORWARDS),o.setLiveTimeline(a),this.fixUpLegacyTimelineFields()):m.a.log(`[refreshLiveTimeline for ${this.roomId}] \`/sync\` or some other request beat us to creating a new live timeline after we reset it. We'll use that instead since any events in the scrollback from this timeline will include the history.`),this.setTimelineNeedsRefresh(!1),this.emit(I.TimelineRefresh,this,o)}resetLiveTimeline(e,t){for(const n of this.timelineSets)n.resetLiveTimeline(null!=e?e:void 0,null!=t?t:void 0);for(const n of this.threads.values())n.resetLiveTimeline(e,t);this.fixUpLegacyTimelineFields()}fixUpLegacyTimelineFields(){const e=this.oldState,t=this.currentState;this.timeline=this.getLiveTimeline().getEvents(),this.oldState=this.getLiveTimeline().getState(s.b.BACKWARDS),this.currentState=this.getLiveTimeline().getState(s.b.FORWARDS),e!==this.oldState&&this.emit(I.OldStateUpdated,this,e,this.oldState),t!==this.currentState&&(this.emit(I.CurrentStateUpdated,this,t,this.currentState),this.reEmitter.stopReEmitting(t,[v.b.Events,v.b.Members,v.b.NewMember,v.b.Update,v.b.Marker,y.b.New,y.b.Update,y.b.Destroy,y.b.LivenessChange]),this.reEmitter.reEmit(this.currentState,[v.b.Events,v.b.Members,v.b.NewMember,v.b.Update,v.b.Marker,y.b.New,y.b.Update,y.b.Destroy,y.b.LivenessChange]))}async hasUnverifiedDevices(){if(!this.client.isRoomEncrypted(this.roomId))return!1;const e=await this.getEncryptionTargetMembers();for(const t of e){if(this.client.getStoredDevicesForUser(t.userId).some((e=>e.isUnverified())))return!0}return!1}getTimelineSets(){return this.timelineSets}getUnfilteredTimelineSet(){return this.timelineSets[0]}getTimelineForEvent(e){const t=this.findEventById(e),n=this.findThreadForEvent(t);return n?n.timelineSet.getTimelineForEvent(e):this.getUnfilteredTimelineSet().getTimelineForEvent(e)}addTimeline(){return this.getUnfilteredTimelineSet().addTimeline()}setTimelineNeedsRefresh(e){this.timelineNeedsRefresh=e}getTimelineNeedsRefresh(){return this.timelineNeedsRefresh}findEventById(e){let t=this.getUnfilteredTimelineSet().findEventById(e);if(!t){const n=this.getThreads();for(let r=0;r<n.length;r++){if(t=n[r].findEventById(e),t)return t}}return t}getUnreadNotificationCount(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O.Total,t=this.getRoomUnreadNotificationCount(e);for(const r of this.threadNotifications.values()){var n;t+=null!==(n=r[e])&&void 0!==n?n:0}return t}getUnreadCountForEventContext(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O.Total,n=arguments.length>1?arguments[1]:void 0;return null!==(e=!!n.threadRootId&&!n.isThreadRoot?this.getThreadUnreadNotificationCount(n.threadRootId,t):this.getRoomUnreadNotificationCount(t))&&void 0!==e?e:0}getRoomUnreadNotificationCount(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O.Total;return null!==(e=this.notificationCounts[t])&&void 0!==e?e:0}getThreadUnreadNotificationCount(e){var t,n;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:O.Total;return null!==(t=null===(n=this.threadNotifications.get(e))||void 0===n?void 0:n[r])&&void 0!==t?t:0}hasThreadUnreadNotification(){for(const n of this.threadNotifications.values()){var e,t;if((null!==(e=n.highlight)&&void 0!==e?e:0)>0||(null!==(t=n.total)&&void 0!==t?t:0)>0)return!0}return!1}setThreadUnreadNotificationCount(e,t,n){var r,i;const o=F({highlight:null===(r=this.threadNotifications.get(e))||void 0===r?void 0:r.highlight,total:null===(i=this.threadNotifications.get(e))||void 0===i?void 0:i.total},{[t]:n});this.threadNotifications.set(e,o),this.emit(I.UnreadNotifications,o,e)}get threadsAggregateNotificationType(){let e=null;for(const r of this.threadNotifications.values()){var t,n;if((null!==(t=r.highlight)&&void 0!==t?t:0)>0)return O.Highlight;(null!==(n=r.total)&&void 0!==n?n:0)>0&&!e&&(e=O.Total)}return e}resetThreadUnreadNotificationCount(e){if(e)for(const[t]of this.threadNotifications)e.includes(t)||this.threadNotifications.delete(t);else this.threadNotifications.clear();this.emit(I.UnreadNotifications)}setUnreadNotificationCount(e,t){this.notificationCounts[e]=t,this.emit(I.UnreadNotifications,this.notificationCounts)}setUnread(e,t){return this.setUnreadNotificationCount(e,t)}setSummary(e){const t=e["m.heroes"],n=e["m.joined_member_count"],r=e["m.invited_member_count"];Number.isInteger(n)&&this.currentState.setJoinedMemberCount(n),Number.isInteger(r)&&this.currentState.setInvitedMemberCount(r),Array.isArray(t)&&(this.summaryHeroes=t.filter((e=>e!==this.myUserId)))}setBlacklistUnverifiedDevices(e){this.blacklistUnverifiedDevices=e}getBlacklistUnverifiedDevices(){return void 0===this.blacklistUnverifiedDevices?null:this.blacklistUnverifiedDevices}getAvatarUrl(e,t,n,r){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];const o=this.currentState.getStateEvents(f.b.RoomAvatar,"");if(!o&&!i)return null;const a=o?o.getContent().url:null;return a?Object(l.a)(e,a,t,n,r):null}getMxcAvatarUrl(){var e,t;return(null===(e=this.currentState.getStateEvents(f.b.RoomAvatar,""))||void 0===e||null===(t=e.getContent())||void 0===t?void 0:t.url)||null}getCanonicalAlias(){const e=this.currentState.getStateEvents(f.b.RoomCanonicalAlias,"");return e&&e.getContent().alias||null}getAltAliases(){const e=this.currentState.getStateEvents(f.b.RoomCanonicalAlias,"");return e&&e.getContent().alt_aliases||[]}addEventsToTimeline(e,t,n,r){n.getTimelineSet().addEventsToTimeline(e,t,n,r)}getThread(e){var t;return null!==(t=this.threads.get(e))&&void 0!==t?t:null}getThreads(){return Array.from(this.threads.values())}getMember(e){return this.currentState.getMember(e)}getMembers(){return this.currentState.getMembers()}getJoinedMembers(){return this.getMembersWithMembership("join")}getJoinedMemberCount(){return this.currentState.getJoinedMemberCount()}getInvitedMemberCount(){return this.currentState.getInvitedMemberCount()}getInvitedAndJoinedMemberCount(){return this.getInvitedMemberCount()+this.getJoinedMemberCount()}getMembersWithMembership(e){return this.currentState.getMembers().filter((function(t){return t.membership===e}))}async getEncryptionTargetMembers(){await this.loadMembersIfNeeded();let e=this.getMembersWithMembership("join");return this.shouldEncryptForInvitedMembers()&&(e=e.concat(this.getMembersWithMembership("invite"))),e}shouldEncryptForInvitedMembers(){var e;const t=this.currentState.getStateEvents(f.b.RoomHistoryVisibility,"");return"joined"!==(null==t||null===(e=t.getContent())||void 0===e?void 0:e.history_visibility)}getDefaultRoomName(e){return this.calculateRoomName(e,!0)}hasMembershipState(e,t){const n=this.getMember(e);return!!n&&n.membership===t}getOrCreateFilteredTimelineSet(e){let{prepopulateTimeline:t=!0,useSyncEvents:n=!0,pendingEvents:r=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.filteredTimelineSets[e.filterId])return this.filteredTimelineSets[e.filterId];const i=Object.assign({filter:e,pendingEvents:r},this.opts),o=new a.b(this,i);this.reEmitter.reEmit(o,[I.Timeline,I.TimelineReset]),n&&(this.filteredTimelineSets[e.filterId]=o,this.timelineSets.push(o));const l=this.getLiveTimeline();if(t){l.getEvents().forEach((function(e){o.addLiveEvent(e)}));let e=l;for(;e.getNeighbouringTimeline(s.b.BACKWARDS);)e=e.getNeighbouringTimeline(s.b.BACKWARDS);o.getLiveTimeline().setPaginationToken(e.getPaginationToken(s.b.BACKWARDS),s.b.BACKWARDS)}else if(n){const e=l.getPaginationToken(s.a.Forward);o.getLiveTimeline().setPaginationToken(e,s.a.Backward)}return o}async getThreadListFilter(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E.g.All;const t=this.client.getUserId(),n=new b.a(t),r={room:{timeline:{[E.a.name]:[E.d.name]}}};e===E.g.My&&(r.room.timeline[E.b.name]=[t]),n.setDefinition(r);const i=await this.client.getOrCreateFilter(`THREAD_PANEL_${this.roomId}_${e}`,n);return n.filterId=i,n}async createThreadTimelineSet(e){let t;if(E.e.hasServerSideListSupport)t=new a.b(this,F(F({},this.opts),{},{pendingEvents:!1}),void 0,void 0,null!=e?e:E.g.All),this.reEmitter.reEmit(t,[I.Timeline,I.TimelineReset]);else if(E.e.hasServerSideSupport){const n=await this.getThreadListFilter(e);t=this.getOrCreateFilteredTimelineSet(n,{prepopulateTimeline:!1,useSyncEvents:!1,pendingEvents:!1})}else t=new a.b(this,{pendingEvents:!1}),Array.from(this.threads).forEach((n=>{let[,r]=n;if(0===r.length)return;const i=r.timeline.some((e=>e.getSender()===this.client.getUserId()));(e!==E.g.My||i)&&t.getLiveTimeline().addEvent(r.rootEvent,{toStartOfTimeline:!1})}));return t}processThreadRoots(e,t){for(const n of e)s.b.setEventMetadata(n,this.currentState,t),this.getThread(n.getId())||this.createThread(n.getId(),n,[],t)}async fetchRoomThreads(){if(!this.threadsReady&&this.client.supportsThreads()){if(E.e.hasServerSideListSupport)await Promise.all([this.fetchRoomThreadList(E.g.All),this.fetchRoomThreadList(E.g.My)]);else{const n=await this.getThreadListFilter(),{chunk:r}=await this.client.createMessagesRequest(this.roomId,"",Number.MAX_SAFE_INTEGER,s.a.Backward,n);if(!r.length)return;const i=r.map(this.client.getEventMapper()).sort(((e,t)=>{const n=e.getServerAggregatedRelation(E.d.name),r=t.getServerAggregatedRelation(E.d.name);return n.latest_event.origin_server_ts-r.latest_event.origin_server_ts}));let o;const l=this.getLiveTimeline().getState(s.b.FORWARDS);for(const n of i){var e;const r={duplicateStrategy:a.a.Ignore,fromCache:!1,roomState:l};null===(e=this.threadsTimelineSets[0])||void 0===e||e.addLiveEvent(n,r);const i=n.getServerAggregatedRelation(E.d.name);var t;if(null!=i&&i.current_user_participated)null===(t=this.threadsTimelineSets[1])||void 0===t||t.addLiveEvent(n,r),o=n}this.processThreadRoots(i,!0),this.client.decryptEventIfNeeded(i[i.length-1]),o&&this.client.decryptEventIfNeeded(o)}this.on(E.f.NewReply,this.onThreadNewReply),this.on(E.f.Delete,this.onThreadDelete),this.threadsReady=!0}}async processPollEvents(e){const t=e=>{if(o.M_POLL_START.matches(e.getType()))try{const t=new C.a(e,this.client,this);this.polls.set(e.getId(),t),this.emit(C.b.New,t)}catch{}},n=e=>{const t=e.relationEventId;if(t&&this.polls.has(t)){const n=this.polls.get(t);null==n||n.onNewRelation(e)}},r=e=>{t(e),n(e)};for(const t of e)try{await this.client.decryptEventIfNeeded(t),r(t)}catch{}}async fetchRoomThreadList(e){const t=e===E.g.My?this.threadsTimelineSets[1]:this.threadsTimelineSets[0],{chunk:n,end:r}=await this.client.createThreadListMessagesRequest(this.roomId,null,void 0,s.a.Backward,t.threadListType,t.getFilter());if(t.getLiveTimeline().setPaginationToken(null!=r?r:null,s.a.Backward),!n.length)return;const i=n.map(this.client.getEventMapper());this.processThreadRoots(i,!0);const o=this.getLiveTimeline().getState(s.b.FORWARDS);for(const e of i)t.addLiveEvent(e,{duplicateStrategy:a.a.Replace,fromCache:!1,roomState:o})}onThreadNewReply(e){this.updateThreadRootEvents(e,!1,!0)}onThreadDelete(e){var t;this.threads.delete(e.id);const n=this.getTimelineForEvent(e.id),r=null==n||null===(t=n.getEvents())||void 0===t?void 0:t.find((t=>t.getId()===e.id));r?e.clearEventMetadata(r):m.a.debug("onThreadDelete: Could not find root event in room timeline");for(const t of this.threadsTimelineSets)t.removeEvent(e.id)}removeFilteredTimelineSet(e){const t=this.filteredTimelineSets[e.filterId];delete this.filteredTimelineSets[e.filterId];const n=this.timelineSets.indexOf(t);n>-1&&this.timelineSets.splice(n,1)}eventShouldLiveIn(e,t,n){var r,i;if(null===(r=this.client)||void 0===r||!r.supportsThreads())return{shouldLiveInRoom:!0,shouldLiveInThread:!1};if(e.isThreadRoot||null!=n&&n.has(e.getId()))return{shouldLiveInRoom:!0,shouldLiveInThread:!0,threadId:e.getId()};if(e.isRelation(E.d.name))return{shouldLiveInRoom:!1,shouldLiveInThread:!0,threadId:e.threadRootId};const o=e.getAssociatedId(),a=null!==(i=this.findEventById(o))&&void 0!==i?i:null==t?void 0:t.find((e=>e.getId()===o));return a&&(e.isRelation()||e.isRedaction())?this.eventShouldLiveIn(a,t,n):null!=n&&n.has(e.relationEventId)?{shouldLiveInRoom:!0,shouldLiveInThread:!0,threadId:e.relationEventId}:{shouldLiveInRoom:!0,shouldLiveInThread:!1}}findThreadForEvent(e){if(!e)return null;const{threadId:t}=this.eventShouldLiveIn(e);return t?this.getThread(t):null}addThreadedEvents(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.getThread(e);if(!r){var i;const o=null!==(i=this.findEventById(e))&&void 0!==i?i:t.find((t=>t.getId()===e));r=this.createThread(e,o,t,n)}r.addEvents(t,n)}processThreadedEvents(e,t){e.forEach(this.applyRedaction);const n={};for(const t of e){var r;const{threadId:e,shouldLiveInThread:i}=this.eventShouldLiveIn(t);i&&!n[e]&&(n[e]=[]),null===(r=n[e])||void 0===r||r.push(t)}Object.entries(n).map((e=>{let[n,r]=e;return this.addThreadedEvents(n,r,t)}))}createThread(e,t){var n,r,i;let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=arguments.length>3?arguments[3]:void 0;if(this.threads.has(e))return this.threads.get(e);if(t){const e=this.relations.getAllChildEventsForEvent(t.getId());null!=e&&e.length&&(o=o.concat(e.filter((e=>!e.isRelation(f.h.Replace)))))}const s=new E.e(e,t,{room:this,client:this.client,pendingEventOrdering:this.opts.pendingEventOrdering,receipts:null!==(n=this.cachedThreadReadReceipts.get(e))&&void 0!==n?n:[]});this.cachedThreadReadReceipts.delete(e),this.threads.set(s.id,s),s.addEvents(o,!1),this.reEmitter.reEmit(s,[E.f.Delete,E.f.Update,E.f.NewReply,I.Timeline,I.TimelineReset]);const l=(null===(r=this.lastThread)||void 0===r?void 0:r.rootEvent)&&(null==t?void 0:t.localTimestamp)&&(null===(i=this.lastThread.rootEvent)||void 0===i?void 0:i.localTimestamp)<(null==t?void 0:t.localTimestamp);return this.lastThread&&!l||(this.lastThread=s),this.threadsReady&&this.updateThreadRootEvents(s,a,!1),this.emit(E.f.New,s,a),s}processLiveEvent(e){this.applyRedaction(e),e.isVisibilityEvent()&&this.applyNewVisibilityEvent(e),this.applyPendingVisibilityEvents(e);if(!e.getUnsigned().transaction_id&&e.getSender()===this.myUserId)for(const[t,n]of this.txnToEvent)if(n.getId()===e.getId()){m.a.debug("processLiveEvent: found sent event without txn ID: ",t,e.getId());const n=e.getUnsigned();n.transaction_id=t,e.setUnsigned(n);break}}addLiveEvent(e,t){const{duplicateStrategy:n,timelineWasEmpty:r,fromCache:i}=t;for(const t of this.timelineSets)t.addLiveEvent(e,{duplicateStrategy:n,fromCache:i,timelineWasEmpty:r});e.sender&&e.getType()!==f.b.RoomRedaction&&this.addReceipt(Object(T.b)(e.sender.userId,e,S.b.Read),!0)}addPendingEvent(e,t){if(e.status!==d.a.SENDING&&e.status!==d.a.NOT_SENT)throw new Error("addPendingEvent called on an event with status "+e.status);if(this.txnToEvent.get(t))throw new Error("addPendingEvent called on an event with known txnId "+t);if(s.b.setEventMetadata(e,this.getLiveTimeline().getState(s.b.FORWARDS),!1),this.txnToEvent.set(t,e),this.pendingEventList){if(this.pendingEventList.some((e=>e.status===d.a.NOT_SENT))&&(m.a.warn("Setting event as NOT_SENT due to messages in the same state"),e.setStatus(d.a.NOT_SENT)),this.pendingEventList.push(e),this.savePendingEvents(),e.isRelation()&&this.aggregateNonLiveRelation(e),e.isRedaction()){const t=e.event.redacts;let n=this.pendingEventList.find((e=>e.getId()===t));!n&&t&&(n=this.findEventById(t)),n&&(n.markLocallyRedacted(e),this.emit(I.Redaction,e,this))}}else for(const t of this.timelineSets)t.getFilter()?t.getFilter().filterRoomTimeline([e]).length&&t.addEventToTimeline(e,t.getLiveTimeline(),{toStartOfTimeline:!1}):t.addEventToTimeline(e,t.getLiveTimeline(),{toStartOfTimeline:!1});this.emit(I.LocalEchoUpdated,e,this)}savePendingEvents(){if(this.pendingEventList){const e=this.pendingEventList.map((e=>F(F({},e.event),{},{txn_id:e.getTxnId()}))).filter((e=>{const t=e.type===f.b.RoomMessageEncrypted,n=this.client.isRoomEncrypted(this.roomId);return t||!n}));this.client.store.setPendingEvents(this.roomId,e)}}aggregateNonLiveRelation(e){this.relations.aggregateChildEvent(e)}getEventForTxnId(e){return this.txnToEvent.get(e)}handleRemoteEcho(e,t){const n=t.getId(),r=e.getId(),i=t.status;m.a.debug(`Got remote echo for event ${n} -> ${r} old status ${i}`),this.txnToEvent.delete(e.getUnsigned().transaction_id),this.pendingEventList&&this.removePendingEvent(n),t.handleRemoteEcho(e.event);const{shouldLiveInRoom:o,threadId:a}=this.eventShouldLiveIn(e),s=a?this.getThread(a):null;if(null==s||s.setEventMetadata(t),null==s||s.timelineSet.handleRemoteEcho(t,n,r),o)for(const e of this.timelineSets)e.handleRemoteEcho(t,n,r);this.emit(I.LocalEchoUpdated,t,this,n,i)}updatePendingEvent(e,t,n){if(m.a.log(`setting pendingEvent status to ${t} in ${e.getRoomId()} event ID ${e.getId()} -> ${n}`),t==d.a.SENT&&!n)throw new Error("updatePendingEvent called with status=SENT, but no new event id");if(t==d.a.SENT){if(this.getTimelineForEvent(n)){const t=this.findEventById(n);if(!(null==t?void 0:t.getUnsigned().transaction_id)&&t){const n=t.getUnsigned();n.transaction_id=e.getTxnId(),t.setUnsigned(n),this.removeEvent(t.getId()),this.handleRemoteEcho(t,e)}return}}const r=e.status,i=e.getId();if(!r)throw new Error("updatePendingEventStatus called on an event which is not a local echo.");const o=R[r];if(null==o||!o.includes(t))throw new Error(`Invalid EventStatus transition ${r}->${t}`);if(e.setStatus(t),t==d.a.SENT){e.replaceLocalEventId(n);const{shouldLiveInRoom:t,threadId:r}=this.eventShouldLiveIn(e),o=r?this.getThread(r):void 0;if(null==o||o.setEventMetadata(e),null==o||o.timelineSet.replaceEventId(i,n),t)for(const e of this.timelineSets)e.replaceEventId(i,n)}else if(t==d.a.CANCELLED){if(this.pendingEventList){const e=this.getPendingEvent(i);this.removePendingEvent(i),null!=e&&e.isRedaction()&&this.revertRedactionLocalEcho(e)}this.removeEvent(i)}this.savePendingEvents(),this.emit(I.LocalEchoUpdated,e,this,i,r)}revertRedactionLocalEcho(e){const t=e.event.redacts;if(!t)return;const n=this.getUnfilteredTimelineSet().findEventById(t);n&&(n.unmarkLocallyRedacted(),this.emit(I.RedactionCancelled,e,this),n.isRelation()&&this.aggregateNonLiveRelation(n))}addLiveEvents(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=t,i=!1;if("object"==typeof t?({duplicateStrategy:r,fromCache:n=!1,timelineWasEmpty:i}=t):void 0!==t&&m.a.warn("Overload deprecated: `Room.addLiveEvents(events, duplicateStrategy?, fromCache?)` is deprecated in favor of the overload with `Room.addLiveEvents(events, IAddLiveEventOptions)`"),r&&-1===["replace","ignore"].indexOf(r))throw new Error("duplicateStrategy MUST be either 'replace' or 'ignore'");for(let e=0;e<this.timelineSets.length;e++){const t=this.timelineSets[e].getLiveTimeline();if(t.getPaginationToken(s.b.FORWARDS))throw new Error("live timeline "+e+" is no longer live - it has a pagination token ("+t.getPaginationToken(s.b.FORWARDS)+")");if(t.getNeighbouringTimeline(s.b.FORWARDS))throw new Error(`live timeline ${e} is no longer live - it has a neighbouring timeline`)}const o=this.findThreadRoots(e),a={},l={duplicateStrategy:r,fromCache:n,timelineWasEmpty:i};for(const t of e){var c;if(this.processLiveEvent(t),t.getUnsigned().transaction_id){const e=this.txnToEvent.get(t.getUnsigned().transaction_id);if(e){this.handleRemoteEcho(t,e);continue}}const{shouldLiveInRoom:n,shouldLiveInThread:r,threadId:i}=this.eventShouldLiveIn(t,e,o);r&&!a[null!=i?i:""]&&(a[null!=i?i:""]=[]),null===(c=a[null!=i?i:""])||void 0===c||c.push(t),n&&this.addLiveEvent(t,l)}Object.entries(a).forEach((e=>{let[t,n]=e;this.addThreadedEvents(t,n,!1)}))}partitionThreadedEvents(e){if(this.client.supportsThreads()){const t=this.findThreadRoots(e);return e.reduce(((n,r)=>{const{shouldLiveInRoom:i,shouldLiveInThread:o,threadId:a}=this.eventShouldLiveIn(r,e,t);return i&&n[0].push(r),o&&(r.setThreadId(null!=a?a:""),n[1].push(r)),n}),[[],[]])}return[e,[]]}findThreadRoots(e){const t=new Set;for(const r of e){var n;if(r.isRelation(E.d.name))t.add(null!==(n=r.relationEventId)&&void 0!==n?n:"")}return t}addReceipt(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=e.getContent();Object.keys(n).forEach((e=>{Object.keys(n[e]).forEach((r=>{Object.keys(n[e][r]).forEach((i=>{var o,a,s;const l=n[e][r][i],c=!l.thread_id||l.thread_id===S.a,u=c?this:this.threads.get(null!==(o=l.thread_id)&&void 0!==o?o:"");var d;if(u){if(u.addReceiptToStructure(e,r,i,l,t),this.client.isInitialSyncComplete()&&i===this.client.getUserId()){const t=u.timeline[u.timeline.length-1];t&&e===t.getId()&&i===t.getSender()&&(u.setUnread(O.Total,0),u.setUnread(O.Highlight,0))}}else this.cachedThreadReadReceipts.set(l.thread_id,[...null!==(d=this.cachedThreadReadReceipts.get(l.thread_id))&&void 0!==d?d:[],{eventId:e,receiptType:r,userId:i,receipt:l,synthetic:t}]);i===this.client.getUserId()&&!c&&l.ts<this.oldestThreadedReceiptTs&&(this.oldestThreadedReceiptTs=l.ts),!l.thread_id&&l.ts>(null!==(a=null===(s=this.unthreadedReceipts.get(i))||void 0===s?void 0:s.ts)&&void 0!==a?a:0)&&this.unthreadedReceipts.set(i,l)}))}))})),this.emit(I.Receipt,e,this)}addEphemeralEvents(e){for(const t of e)t.getType()===f.b.Typing?this.currentState.setTypingEvent(t):t.getType()===f.b.Receipt&&this.addReceipt(t)}removeEvents(e){for(const t of e)this.removeEvent(t)}removeEvent(e){let t=!1;for(const n of this.timelineSets){const r=n.removeEvent(e);r&&(r.isRedaction()&&this.revertRedactionLocalEcho(r),t=!0)}return t}recalculate(){const e=this.currentState.getStateEvents(f.b.RoomMember,this.myUserId);if(e){const t=e.getContent().membership;if(this.updateMyMembership(t),"invite"===t){(e.getUnsigned().invite_room_state||[]).forEach((e=>{this.currentState.getStateEvents(e.type,e.state_key)||this.currentState.setStateEvents([new u.b({type:e.type,state_key:e.state_key,content:e.content,event_id:"$fake"+Date.now(),room_id:this.roomId,user_id:this.myUserId})])}))}}const t=this.name;this.name=this.calculateRoomName(this.myUserId),this.normalizedName=Object(c.B)(this.name),this.summary=new p.a(this.roomId,{title:this.name}),t!==this.name&&this.emit(I.Name,this)}addTags(e){this.tags=e.getContent().tags||{},this.emit(I.Tags,e,this)}addAccountData(e){for(const t of e){"m.tag"===t.getType()&&this.addTags(t);const e=t.getType(),n=this.accountData.get(e);this.accountData.set(e,t),this.emit(I.AccountData,t,this,n)}}getAccountData(e){return this.accountData.get(e)}maySendMessage(){return"join"===this.getMyMembership()&&(this.client.isRoomEncrypted(this.roomId)?this.currentState.maySendEvent(f.b.RoomMessageEncrypted,this.myUserId):this.currentState.maySendEvent(f.b.RoomMessage,this.myUserId))}canInvite(e){let t="join"===this.getMyMembership();const n=this.currentState.getStateEvents(f.b.RoomPowerLevels,""),r=n&&n.getContent(),i=this.getMember(e);return r&&i&&r.invite>i.powerLevel&&(t=!1),t}getJoinRule(){return this.currentState.getJoinRule()}getHistoryVisibility(){return this.currentState.getHistoryVisibility()}getGuestAccess(){return this.currentState.getGuestAccess()}getType(){const e=this.currentState.getStateEvents(f.b.RoomCreate,"");if(e)return e.getContent()[f.i];this.getTypeWarning||(m.a.warn("[getType] Room "+this.roomId+" does not have an m.room.create event"),this.getTypeWarning=!0)}isSpaceRoom(){return this.getType()===f.j.Space}isCallRoom(){return this.getType()===f.j.UnstableCall}isElementVideoRoom(){return this.getType()===f.j.ElementVideo}findPredecessor(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.getLiveTimeline().getState(s.b.FORWARDS);return t?t.findPredecessor(e):null}roomNameGenerator(e){if(this.client.roomNameGenerator){const t=this.client.roomNameGenerator(this.roomId,e);if(null!==t)return t}switch(e.type){case N.Actual:return e.name;case N.Generated:return"Inviting"===e.subtype?`Inviting ${M(e.names,e.count)}`:M(e.names,e.count);case N.EmptyRoom:return e.oldName?`Empty room (was ${e.oldName})`:"Empty room"}}calculateRoomName(e){if(!(arguments.length>1&&void 0!==arguments[1]&&arguments[1])){const e=this.currentState.getStateEvents(f.b.RoomName,"");if(null!=e&&e.getContent().name)return this.roomNameGenerator({type:N.Actual,name:e.getContent().name})}const t=this.getCanonicalAlias();if(t)return this.roomNameGenerator({type:N.Actual,name:t});let n=this.currentState.getJoinedMemberCount()+this.currentState.getInvitedMemberCount()-1,r=[];const i=this.currentState.getStateEvents(f.l.name,"");Array.isArray(null==i?void 0:i.getContent().service_members)&&(r=i.getContent().service_members);let o=[];if(this.summaryHeroes)this.summaryHeroes.forEach((e=>{if(r.includes(e))return void n--;const t=this.getMember(e);o.push(t?t.name:e)}));else{let t=this.currentState.getMembers().filter((t=>t.userId!==e&&("invite"===t.membership||"join"===t.membership)));t=t.filter((e=>{let{userId:t}=e;return!r.includes(t)||(n--,!1)})),t.sort(((e,t)=>c.h(e.userId,t.userId))),t=t.slice(0,5),o=t.map((e=>e.name))}if(n)return this.roomNameGenerator({type:N.Generated,names:o,count:n});if("join"==this.getMyMembership()){const e=this.currentState.getStateEvents(f.b.RoomThirdPartyInvite);if(null!=e&&e.length){const t=e.map((e=>e.getContent().display_name));return this.roomNameGenerator({type:N.Generated,subtype:"Inviting",names:t,count:t.length+1})}}let a,s=o;return s.length||(s=this.currentState.getMembers().filter((t=>t.userId!==e&&"invite"!==t.membership&&"join"!==t.membership)).map((e=>e.name))),s.length&&(a=this.roomNameGenerator({type:N.Generated,names:s,count:s.length+1})),this.roomNameGenerator({type:N.EmptyRoom,oldName:a})}applyNewVisibilityEvent(e){const t=e.asVisibilityChange();if(!t)return;const n=e.getSender();if(!n)return;if(!(f.a.name&&this.currentState.maySendStateEvent(f.a.name,n)||f.a.altName&&this.currentState.maySendStateEvent(f.a.altName,n)))return;const r=this.visibilityEvents.get(t.eventId);if(r){let t=r.length-1;const n=Math.max(0,r.length-30);for(;t>=n;--t){if(r[t].getTs()<e.getTs())break}-1===t?r.unshift(e):r.splice(t+1,0,e)}else this.visibilityEvents.set(t.eventId,[e]);const i=this.findEventById(t.eventId);i&&i.applyVisibilityEvent(t)}redactVisibilityChangeEvent(e){if(!e.isVisibilityEvent)throw new Error("expected a visibility change event");const t=e.getRelation(),n=null==t?void 0:t.event_id,r=this.visibilityEvents.get(n);if(!r)return;const i=r.findIndex((t=>t.getId()===e.getId()));if(-1!==i&&(r.splice(i,1),i===r.length)){const e=this.findEventById(n);if(!e)return;if(0===i)this.visibilityEvents.delete(n),e.applyVisibilityEvent();else{const t=r[r.length-1].asVisibilityChange();if(!t)throw new Error("at this stage, visibility changes should be well-formed");e.applyVisibilityEvent(t)}}}applyPendingVisibilityEvents(e){const t=this.visibilityEvents.get(e.getId());if(!t||0==t.length)return;const n=t[t.length-1],r=n.asVisibilityChange();r&&(r.visible,n.getTs()<e.getTs()||e.applyVisibilityEvent(r))}getOldestThreadedReceiptTs(){return this.oldestThreadedReceiptTs}getLastUnthreadedReceiptFor(e){return this.unthreadedReceipts.get(e)}fixupNotifications(e){super.fixupNotifications(e);const t=this.getThreads().filter((e=>this.getThreadUnreadNotificationCount(e.id,O.Total)>0));for(const n of t)n.fixupNotifications(e)}}const R={[d.a.ENCRYPTING]:[d.a.SENDING,d.a.NOT_SENT,d.a.CANCELLED],[d.a.SENDING]:[d.a.ENCRYPTING,d.a.QUEUED,d.a.NOT_SENT,d.a.SENT],[d.a.QUEUED]:[d.a.SENDING,d.a.NOT_SENT,d.a.CANCELLED],[d.a.SENT]:[],[d.a.NOT_SENT]:[d.a.SENDING,d.a.QUEUED,d.a.CANCELLED],[d.a.CANCELLED]:[]};let N;function M(e,t){const n=t-1;if(e.length){if(1===e.length&&n<=1)return e[0];if(2===e.length&&n<=2)return`${e[0]} and ${e[1]}`;return n>1?`${e[0]} and ${n} others`:`${e[0]} and 1 other`}return"Empty room"}!function(e){e[e.EmptyRoom=0]="EmptyRoom",e[e.Generated=1]="Generated",e[e.Actual=2]="Actual"}(N||(N={}))},function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return o})),n.d(t,"d",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(120);function i(e,t,n){o(e,t,n)}function o(e,t,n){const i=Object(r.useRef)(n);Object(r.useEffect)((()=>{i.current=n}),[n]),Object(r.useEffect)((()=>{if(!e)return;const n=function(){return i.current(...arguments)};return e.on(t,n),()=>{e.off(t,n)}}),[t,e])}function a(e,t,n){return s(e,t,n)}function s(e,t,n){const[i,a]=Object(r.useState)(n),s=Object(r.useCallback)((function(){a(n(...arguments))}),[n]);return Object(r.useEffect)(s,[e]),o(e,t,s),i}},function(e,t,n){"use strict";n.d(t,"h",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"a",(function(){return l})),n.d(t,"g",(function(){return c})),n.d(t,"b",(function(){return u})),n.d(t,"d",(function(){return d})),n.d(t,"i",(function(){return h})),n.d(t,"f",(function(){return p}));var r=n(121),i=n(205);let o,a;!function(e){e.SendMessage="KeyBinding.sendMessageInComposer",e.SelectPrevSendHistory="KeyBinding.previousMessageInComposerHistory",e.SelectNextSendHistory="KeyBinding.nextMessageInComposerHistory",e.EditPrevMessage="KeyBinding.editPreviousMessage",e.EditNextMessage="KeyBinding.editNextMessage",e.CancelReplyOrEdit="KeyBinding.cancelReplyInComposer",e.ShowStickerPicker="KeyBinding.showStickerPicker",e.FormatBold="KeyBinding.toggleBoldInComposer",e.FormatItalics="KeyBinding.toggleItalicsInComposer",e.FormatLink="KeyBinding.FormatLink",e.FormatCode="KeyBinding.FormatCode",e.FormatQuote="KeyBinding.toggleQuoteInComposer",e.EditUndo="KeyBinding.editUndoInComposer",e.EditRedo="KeyBinding.editRedoInComposer",e.NewLine="KeyBinding.newLineInComposer",e.MoveCursorToStart="KeyBinding.jumpToStartInComposer",e.MoveCursorToEnd="KeyBinding.jumpToEndInComposer",e.CompleteAutocomplete="KeyBinding.completeAutocomplete",e.ForceCompleteAutocomplete="KeyBinding.forceCompleteAutocomplete",e.PrevSelectionInAutocomplete="KeyBinding.previousOptionInAutoComplete",e.NextSelectionInAutocomplete="KeyBinding.nextOptionInAutoComplete",e.CancelAutocomplete="KeyBinding.cancelAutoComplete",e.ClearRoomFilter="KeyBinding.clearRoomFilter",e.PrevRoom="KeyBinding.downerRoom",e.NextRoom="KeyBinding.upperRoom",e.SelectRoomInRoomList="KeyBinding.selectRoomInRoomList",e.CollapseRoomListSection="KeyBinding.collapseSectionInRoomList",e.ExpandRoomListSection="KeyBinding.expandSectionInRoomList",e.ScrollUp="KeyBinding.scrollUpInTimeline",e.ScrollDown="KeyBinding.scrollDownInTimeline",e.DismissReadMarker="KeyBinding.dismissReadMarkerAndJumpToBottom",e.JumpToOldestUnread="KeyBinding.jumpToOldestUnreadMessage",e.UploadFile="KeyBinding.uploadFileToRoom",e.SearchInRoom="KeyBinding.searchInRoom",e.JumpToFirstMessage="KeyBinding.jumpToFirstMessageInTimeline",e.JumpToLatestMessage="KeyBinding.jumpToLastMessageInTimeline",e.FilterRooms="KeyBinding.filterRooms",e.ToggleSpacePanel="KeyBinding.toggleSpacePanel",e.ToggleRoomSidePanel="KeyBinding.toggleRightPanel",e.ToggleUserMenu="KeyBinding.toggleTopLeftMenu",e.ShowKeyboardSettings="KeyBinding.showKeyBindingsSettings",e.GoToHome="KeyBinding.goToHomeView",e.SelectPrevRoom="KeyBinding.previousRoom",e.SelectNextRoom="KeyBinding.nextRoom",e.SelectPrevUnreadRoom="KeyBinding.previousUnreadRoom",e.SelectNextUnreadRoom="KeyBinding.nextUnreadRoom",e.SwitchToSpaceByNumber="KeyBinding.switchToSpaceByNumber",e.OpenUserSettings="KeyBinding.openUserSettings",e.PreviousVisitedRoomOrSpace="KeyBinding.PreviousVisitedRoomOrSpace",e.NextVisitedRoomOrSpace="KeyBinding.NextVisitedRoomOrSpace",e.ToggleMicInCall="KeyBinding.toggleMicInCall",e.ToggleWebcamInCall="KeyBinding.toggleWebcamInCall",e.Escape="KeyBinding.escape",e.Enter="KeyBinding.enter",e.Space="KeyBinding.space",e.Backspace="KeyBinding.backspace",e.Delete="KeyBinding.delete",e.Home="KeyBinding.home",e.End="KeyBinding.end",e.ArrowLeft="KeyBinding.arrowLeft",e.ArrowUp="KeyBinding.arrowUp",e.ArrowRight="KeyBinding.arrowRight",e.ArrowDown="KeyBinding.arrowDown",e.Tab="KeyBinding.tab",e.Comma="KeyBinding.comma",e.ToggleHiddenEventVisibility="KeyBinding.toggleHiddenEventVisibility"}(o||(o={})),function(e){e.NAVIGATION="Navigation",e.ACCESSIBILITY="Accessibility",e.CALLS="Calls",e.COMPOSER="Composer",e.ROOM_LIST="Room List",e.ROOM="Room",e.AUTOCOMPLETE="Autocomplete",e.LABS="Labs"}(a||(a={}));const s="digits",l={[i.b.PAGE_UP]:Object(r.c)("Page Up"),[i.b.PAGE_DOWN]:Object(r.c)("Page Down"),[i.b.ESCAPE]:Object(r.c)("Esc"),[i.b.ENTER]:Object(r.c)("Enter"),[i.b.SPACE]:Object(r.c)("Space"),[i.b.HOME]:Object(r.c)("Home"),[i.b.END]:Object(r.c)("End"),[i.b.ALT]:Object(r.c)("Alt"),[i.b.CONTROL]:Object(r.c)("Ctrl"),[i.b.SHIFT]:Object(r.c)("Shift"),[s]:Object(r.c)("[number]")},c={[i.b.ARROW_UP]:"↑",[i.b.ARROW_DOWN]:"↓",[i.b.ARROW_LEFT]:"←",[i.b.ARROW_RIGHT]:"→"};i.a&&(c[i.b.META]="⌘",c[i.b.ALT]="⌥");const u={[a.COMPOSER]:{categoryLabel:Object(r.c)("Composer"),settingNames:[o.SendMessage,o.NewLine,o.FormatBold,o.FormatItalics,o.FormatQuote,o.FormatLink,o.FormatCode,o.EditUndo,o.EditRedo,o.MoveCursorToStart,o.MoveCursorToEnd,o.CancelReplyOrEdit,o.EditNextMessage,o.EditPrevMessage,o.SelectNextSendHistory,o.SelectPrevSendHistory,o.ShowStickerPicker]},[a.CALLS]:{categoryLabel:Object(r.c)("Calls"),settingNames:[o.ToggleMicInCall,o.ToggleWebcamInCall]},[a.ROOM]:{categoryLabel:Object(r.c)("Room"),settingNames:[o.SearchInRoom,o.UploadFile,o.DismissReadMarker,o.JumpToOldestUnread,o.ScrollUp,o.ScrollDown,o.JumpToFirstMessage,o.JumpToLatestMessage]},[a.ROOM_LIST]:{categoryLabel:Object(r.c)("Room List"),settingNames:[o.SelectRoomInRoomList,o.ClearRoomFilter,o.CollapseRoomListSection,o.ExpandRoomListSection,o.NextRoom,o.PrevRoom]},[a.ACCESSIBILITY]:{categoryLabel:Object(r.c)("Accessibility"),settingNames:[o.Escape,o.Enter,o.Space,o.Backspace,o.Delete,o.Home,o.End,o.ArrowLeft,o.ArrowUp,o.ArrowRight,o.ArrowDown,o.Comma]},[a.NAVIGATION]:{categoryLabel:Object(r.c)("Navigation"),settingNames:[o.ToggleUserMenu,o.ToggleRoomSidePanel,o.ToggleSpacePanel,o.ShowKeyboardSettings,o.GoToHome,o.FilterRooms,o.SelectNextUnreadRoom,o.SelectPrevUnreadRoom,o.SelectNextRoom,o.SelectPrevRoom,o.OpenUserSettings,o.SwitchToSpaceByNumber,o.PreviousVisitedRoomOrSpace,o.NextVisitedRoomOrSpace]},[a.AUTOCOMPLETE]:{categoryLabel:Object(r.c)("Autocomplete"),settingNames:[o.CancelAutocomplete,o.NextSelectionInAutocomplete,o.PrevSelectionInAutocomplete,o.CompleteAutocomplete,o.ForceCompleteAutocomplete]},[a.LABS]:{categoryLabel:Object(r.c)("Labs"),settingNames:[o.ToggleHiddenEventVisibility]}},d=[o.OpenUserSettings,o.SwitchToSpaceByNumber,o.PreviousVisitedRoomOrSpace,o.NextVisitedRoomOrSpace],h=[o.OpenUserSettings],p={[o.FormatBold]:{default:{ctrlOrCmdKey:!0,key:i.b.B},displayName:Object(r.c)("Toggle Bold")},[o.FormatItalics]:{default:{ctrlOrCmdKey:!0,key:i.b.I},displayName:Object(r.c)("Toggle Italics")},[o.FormatQuote]:{default:{ctrlOrCmdKey:!0,shiftKey:!0,key:i.b.GREATER_THAN},displayName:Object(r.c)("Toggle Quote")},[o.FormatCode]:{default:{ctrlOrCmdKey:!0,key:i.b.E},displayName:Object(r.c)("Toggle Code Block")},[o.FormatLink]:{default:{ctrlOrCmdKey:!0,shiftKey:!0,key:i.b.L},displayName:Object(r.c)("Toggle Link")},[o.CancelReplyOrEdit]:{default:{key:i.b.ESCAPE},displayName:Object(r.c)("Cancel replying to a message")},[o.EditNextMessage]:{default:{key:i.b.ARROW_DOWN},displayName:Object(r.c)("Navigate to next message to edit")},[o.EditPrevMessage]:{default:{key:i.b.ARROW_UP},displayName:Object(r.c)("Navigate to previous message to edit")},[o.MoveCursorToStart]:{default:{ctrlOrCmdKey:!0,key:i.b.HOME},displayName:Object(r.c)("Jump to start of the composer")},[o.MoveCursorToEnd]:{default:{ctrlOrCmdKey:!0,key:i.b.END},displayName:Object(r.c)("Jump to end of the composer")},[o.SelectNextSendHistory]:{default:{altKey:!0,ctrlKey:!0,key:i.b.ARROW_DOWN},displayName:Object(r.c)("Navigate to next message in composer history")},[o.SelectPrevSendHistory]:{default:{altKey:!0,ctrlKey:!0,key:i.b.ARROW_UP},displayName:Object(r.c)("Navigate to previous message in composer history")},[o.ShowStickerPicker]:{default:{ctrlOrCmdKey:!0,key:i.b.SEMICOLON},displayName:Object(r.c)("Send a sticker")},[o.ToggleMicInCall]:{default:{ctrlOrCmdKey:!0,key:i.b.D},displayName:Object(r.c)("Toggle microphone mute")},[o.ToggleWebcamInCall]:{default:{ctrlOrCmdKey:!0,key:i.b.E},displayName:Object(r.c)("Toggle webcam on/off")},[o.DismissReadMarker]:{default:{key:i.b.ESCAPE},displayName:Object(r.c)("Dismiss read marker and jump to bottom")},[o.JumpToOldestUnread]:{default:{shiftKey:!0,key:i.b.PAGE_UP},displayName:Object(r.c)("Jump to oldest unread message")},[o.UploadFile]:{default:{ctrlOrCmdKey:!0,shiftKey:!0,key:i.b.U},displayName:Object(r.c)("Upload a file")},[o.ScrollUp]:{default:{key:i.b.PAGE_UP},displayName:Object(r.c)("Scroll up in the timeline")},[o.ScrollDown]:{default:{key:i.b.PAGE_DOWN},displayName:Object(r.c)("Scroll down in the timeline")},[o.FilterRooms]:{default:{ctrlOrCmdKey:!0,key:i.b.K},displayName:Object(r.c)("Jump to room search")},[o.SelectRoomInRoomList]:{default:{key:i.b.ENTER},displayName:Object(r.c)("Select room from the room list")},[o.CollapseRoomListSection]:{default:{key:i.b.ARROW_LEFT},displayName:Object(r.c)("Collapse room list section")},[o.ExpandRoomListSection]:{default:{key:i.b.ARROW_RIGHT},displayName:Object(r.c)("Expand room list section")},[o.NextRoom]:{default:{key:i.b.ARROW_DOWN},displayName:Object(r.c)("Navigate down in the room list")},[o.PrevRoom]:{default:{key:i.b.ARROW_UP},displayName:Object(r.c)("Navigate up in the room list")},[o.ToggleUserMenu]:{default:{ctrlOrCmdKey:!0,key:i.b.BACKTICK},displayName:Object(r.c)("Toggle the top left menu")},[o.ToggleRoomSidePanel]:{default:{ctrlOrCmdKey:!0,key:i.b.PERIOD},displayName:Object(r.c)("Toggle right panel")},[o.ShowKeyboardSettings]:{default:{ctrlOrCmdKey:!0,key:i.b.SLASH},displayName:Object(r.c)("Open this settings tab")},[o.GoToHome]:{default:{ctrlOrCmdKey:!0,altKey:!i.a,shiftKey:i.a,key:i.b.H},displayName:Object(r.c)("Go to Home View")},[o.SelectNextUnreadRoom]:{default:{shiftKey:!0,altKey:!0,key:i.b.ARROW_DOWN},displayName:Object(r.c)("Next unread room or DM")},[o.SelectPrevUnreadRoom]:{default:{shiftKey:!0,altKey:!0,key:i.b.ARROW_UP},displayName:Object(r.c)("Previous unread room or DM")},[o.SelectNextRoom]:{default:{altKey:!0,key:i.b.ARROW_DOWN},displayName:Object(r.c)("Next room or DM")},[o.SelectPrevRoom]:{default:{altKey:!0,key:i.b.ARROW_UP},displayName:Object(r.c)("Previous room or DM")},[o.CancelAutocomplete]:{default:{key:i.b.ESCAPE},displayName:Object(r.c)("Cancel autocomplete")},[o.NextSelectionInAutocomplete]:{default:{key:i.b.ARROW_DOWN},displayName:Object(r.c)("Next autocomplete suggestion")},[o.PrevSelectionInAutocomplete]:{default:{key:i.b.ARROW_UP},displayName:Object(r.c)("Previous autocomplete suggestion")},[o.ToggleSpacePanel]:{default:{ctrlOrCmdKey:!0,shiftKey:!0,key:i.b.D},displayName:Object(r.c)("Toggle space panel")},[o.ToggleHiddenEventVisibility]:{default:{ctrlOrCmdKey:!0,shiftKey:!0,key:i.b.H},displayName:Object(r.c)("Toggle hidden event visibility")},[o.JumpToFirstMessage]:{default:{key:i.b.HOME,ctrlKey:!0},displayName:Object(r.c)("Jump to first message")},[o.JumpToLatestMessage]:{default:{key:i.b.END,ctrlKey:!0},displayName:Object(r.c)("Jump to last message")},[o.EditUndo]:{default:{key:i.b.Z,ctrlOrCmdKey:!0},displayName:Object(r.c)("Undo edit")},[o.EditRedo]:{default:{key:i.a?i.b.Z:i.b.Y,ctrlOrCmdKey:!0,shiftKey:i.a},displayName:Object(r.c)("Redo edit")},[o.PreviousVisitedRoomOrSpace]:{default:{metaKey:i.a,altKey:!i.a,key:i.a?i.b.SQUARE_BRACKET_LEFT:i.b.ARROW_LEFT},displayName:Object(r.c)("Previous recently visited room or space")},[o.NextVisitedRoomOrSpace]:{default:{metaKey:i.a,altKey:!i.a,key:i.a?i.b.SQUARE_BRACKET_RIGHT:i.b.ARROW_RIGHT},displayName:Object(r.c)("Next recently visited room or space")},[o.SwitchToSpaceByNumber]:{default:{ctrlOrCmdKey:!0,key:s},displayName:Object(r.c)("Switch to space by number")},[o.OpenUserSettings]:{default:{metaKey:!0,key:i.b.COMMA},displayName:Object(r.c)("Open user settings")},[o.Escape]:{default:{key:i.b.ESCAPE},displayName:Object(r.c)("Close dialog or context menu")},[o.Enter]:{default:{key:i.b.ENTER},displayName:Object(r.c)("Activate selected button")},[o.Space]:{default:{key:i.b.SPACE}},[o.Backspace]:{default:{key:i.b.BACKSPACE}},[o.Delete]:{default:{key:i.b.DELETE}},[o.Home]:{default:{key:i.b.HOME}},[o.End]:{default:{key:i.b.END}},[o.ArrowLeft]:{default:{key:i.b.ARROW_LEFT}},[o.ArrowUp]:{default:{key:i.b.ARROW_UP}},[o.ArrowRight]:{default:{key:i.b.ARROW_RIGHT}},[o.ArrowDown]:{default:{key:i.b.ARROW_DOWN}},[o.Comma]:{default:{key:i.b.COMMA}}}},function(e,t,n){"use strict";n.d(t,"c",(function(){return f})),n.d(t,"b",(function(){return _}));var r=n(13),i=n.n(r),o=n(10),a=n(1),s=n(129),l=n(16),c=n(170),u=n(287),d=n(158),h=n(654),p=n(511),m=n(409);n.d(t,"a",(function(){return m.a}));const g=Object.freeze({visible:!0});let f;!function(e){e.Decrypted="Event.decrypted",e.BeforeRedaction="Event.beforeRedaction",e.VisibilityChange="Event.visibilityChange",e.LocalEventIdReplaced="Event.localEventIdReplaced",e.Status="Event.status",e.Replaced="Event.replaced",e.RelationsCreated="Event.relationsCreated"}(f||(f={}));class _ extends d.b{constructor(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),this.event=t,i()(this,"pushActions",null),i()(this,"_replacingEvent",null),i()(this,"_localRedactionEvent",null),i()(this,"_isCancelled",!1),i()(this,"clearEvent",void 0),i()(this,"visibility",g),i()(this,"_hasCachedExtEv",!1),i()(this,"_cachedExtEv",void 0),i()(this,"senderCurve25519Key",null),i()(this,"claimedEd25519Key",null),i()(this,"forwardingCurve25519KeyChain",[]),i()(this,"untrusted",null),i()(this,"decryptionPromise",null),i()(this,"retryDecryption",!1),i()(this,"txnId",void 0),i()(this,"thread",void 0),i()(this,"threadId",void 0),i()(this,"encryptedDisabledForUnverifiedDevices",!1),i()(this,"localTimestamp",void 0),i()(this,"sender",null),i()(this,"target",null),i()(this,"status",null),i()(this,"error",null),i()(this,"forwardLooking",!0),i()(this,"verificationRequest",void 0),i()(this,"reEmitter",void 0),["state_key","type","sender","room_id","membership"].forEach((e=>{"string"==typeof t[e]&&(t[e]=Object(l.t)(t[e]))})),["membership","avatar_url","displayname"].forEach((e=>{var n;"string"==typeof(null===(n=t.content)||void 0===n?void 0:n[e])&&(t.content[e]=Object(l.t)(t.content[e]))})),["rel_type"].forEach((e=>{var n,r;"string"==typeof(null===(n=t.content)||void 0===n||null===(r=n["m.relates_to"])||void 0===r?void 0:r[e])&&(t.content["m.relates_to"][e]=Object(l.t)(t.content["m.relates_to"][e]))})),this.txnId=t.txn_id,this.localTimestamp=Date.now()-(null!==(e=this.getAge())&&void 0!==e?e:0),this.reEmitter=new u.b(this)}get unstableExtensibleEvent(){return this._hasCachedExtEv||(this._cachedExtEv=o.ExtensibleEvents.parse(this.getEffectiveEvent())),this._cachedExtEv}invalidateExtensibleEvent(){this._hasCachedExtEv=!1}getEffectiveEvent(){const e=Object.assign({},this.getContent());if(this.getWireType()===s.b.RoomMessageEncrypted)for(const[t,n]of Object.entries(this.getWireContent()))["algorithm","ciphertext","device_id","sender_key","session_id"].includes(t)||void 0===e[t]&&(e[t]=n);return Object.assign({},this.event,this.clearEvent,{content:e})}getId(){return this.event.event_id}getSender(){return this.event.sender||this.event.user_id}getType(){return this.clearEvent?this.clearEvent.type:this.event.type}getWireType(){return this.event.type}getRoomId(){return this.event.room_id}getTs(){return this.event.origin_server_ts}getDate(){return this.event.origin_server_ts?new Date(this.event.origin_server_ts):null}getDetails(){let e=`id=${this.getId()} type=${this.getWireType()} sender=${this.getSender()}`;const t=this.getRoomId();t&&(e+=` room=${t}`);const n=this.getDate();return n&&(e+=` ts=${n.toISOString()}`),e}getOriginalContent(){return this._localRedactionEvent?{}:this.clearEvent?this.clearEvent.content||{}:this.event.content||{}}getContent(){return this._localRedactionEvent?{}:this._replacingEvent?this._replacingEvent.getContent()["m.new_content"]||{}:this.getOriginalContent()}getWireContent(){return this.event.content||{}}get threadRootId(){var e;const t=null===(e=this.getWireContent())||void 0===e?void 0:e["m.relates_to"];return(null==t?void 0:t.rel_type)===c.d.name?t.event_id:(null===(n=this.getThread())||void 0===n?void 0:n.id)||this.threadId;var n}get isThreadRoot(){var e;return!!this.getServerAggregatedRelation(c.d.name)||(null===(e=this.getThread())||void 0===e?void 0:e.id)===this.getId()}get replyEventId(){var e,t;return null===(e=this.getWireContent()["m.relates_to"])||void 0===e||null===(t=e["m.in_reply_to"])||void 0===t?void 0:t.event_id}get relationEventId(){var e,t;return null===(e=this.getWireContent())||void 0===e||null===(t=e["m.relates_to"])||void 0===t?void 0:t.event_id}getPrevContent(){return this.getUnsigned().prev_content||this.event.prev_content||{}}getDirectionalContent(){return this.forwardLooking?this.getContent():this.getPrevContent()}getAge(){return this.getUnsigned().age||this.event.age}getLocalAge(){return Date.now()-this.localTimestamp}getStateKey(){return this.event.state_key}isState(){return void 0!==this.event.state_key}makeEncrypted(e,t,n,r){this.clearEvent={type:this.event.type,content:this.event.content},this.event.type=e,this.event.content=t,this.senderCurve25519Key=n,this.claimedEd25519Key=r}isBeingDecrypted(){return null!=this.decryptionPromise}getDecryptionPromise(){return this.decryptionPromise}isDecryptionFailure(){var e,t;return"m.bad.encrypted"===(null===(e=this.clearEvent)||void 0===e||null===(t=e.content)||void 0===t?void 0:t.msgtype)}get isEncryptedDisabledForUnverifiedDevices(){return this.isDecryptionFailure()&&this.encryptedDisabledForUnverifiedDevices}shouldAttemptDecryption(){return!this.isRedacted()&&(!this.isBeingDecrypted()&&(!this.clearEvent&&!!this.isEncrypted()))}async attemptDecryption(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isEncrypted())throw new Error("Attempt to decrypt event which isn't encrypted");const n=this.clearEvent&&!this.isDecryptionFailure(),r=t.forceRedecryptIfUntrusted&&this.isKeySourceUntrusted();if(n&&!r)throw new Error("Attempt to decrypt event which has already been decrypted");return this.decryptionPromise?(a.a.log(`Event ${this.getId()} already being decrypted; queueing a retry`),this.retryDecryption=!0,this.decryptionPromise):(this.decryptionPromise=this.decryptionLoop(e,t),this.decryptionPromise)}cancelAndResendKeyRequest(e,t){const n=this.getWireContent();return e.requestRoomKey({algorithm:n.algorithm,room_id:this.getRoomId(),session_id:n.session_id,sender_key:n.sender_key},this.getKeyRequestRecipients(t),!0)}getKeyRequestRecipients(e){return[{userId:e,deviceId:"*"}]}async decryptionLoop(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(await Promise.resolve();;){let n,r;this.retryDecryption=!1;try{e?(n=await e.decryptEvent(this),!0===t.isRetry&&a.a.info(`Decrypted event on retry (${this.getDetails()})`)):n=this.badEncryptedMessage("Encryption not enabled")}catch(e){const t=e instanceof h.b?e.detailedString:String(e);if(r=e,this.retryDecryption){a.a.log(`Error decrypting event (${this.getDetails()}), but retrying: ${t}`);continue}a.a.warn(`Error decrypting event (${this.getDetails()}): ${t}`),n=this.badEncryptedMessage(String(e))}return this.decryptionPromise=null,this.retryDecryption=!1,this.setClearData(n),this.setPushActions(null),void(!1!==t.emit&&this.emit(f.Decrypted,this,r))}}badEncryptedMessage(e){return{clearEvent:{type:s.b.RoomMessage,content:{msgtype:"m.bad.encrypted",body:"** Unable to decrypt: "+e+" **"}},encryptedDisabledForUnverifiedDevices:e===`DecryptionError: ${p.b["m.unverified"]}`}}setClearData(e){var t,n;this.clearEvent=e.clearEvent,this.senderCurve25519Key=null!==(t=e.senderCurve25519Key)&&void 0!==t?t:null,this.claimedEd25519Key=null!==(n=e.claimedEd25519Key)&&void 0!==n?n:null,this.forwardingCurve25519KeyChain=e.forwardingCurve25519KeyChain||[],this.untrusted=e.untrusted||!1,this.encryptedDisabledForUnverifiedDevices=e.encryptedDisabledForUnverifiedDevices||!1,this.invalidateExtensibleEvent()}getClearContent(){return this.clearEvent?this.clearEvent.content:null}isEncrypted(){return!this.isState()&&this.event.type===s.b.RoomMessageEncrypted}getSenderKey(){return this.senderCurve25519Key}getKeysClaimed(){return this.claimedEd25519Key?{ed25519:this.claimedEd25519Key}:{}}getClaimedEd25519Key(){return this.claimedEd25519Key}getForwardingCurve25519KeyChain(){return this.forwardingCurve25519KeyChain}isKeySourceUntrusted(){return!!this.untrusted}getUnsigned(){return this.event.unsigned||{}}setUnsigned(e){this.event.unsigned=e}unmarkLocallyRedacted(){const e=this._localRedactionEvent;return this._localRedactionEvent=null,this.event.unsigned&&(this.event.unsigned.redacted_because=void 0),!!e}markLocallyRedacted(e){this._localRedactionEvent||(this.emit(f.BeforeRedaction,this,e),this._localRedactionEvent=e,this.event.unsigned||(this.event.unsigned={}),this.event.unsigned.redacted_because=e.event)}applyVisibilityEvent(e){var t,n;const r=null===(t=null==e?void 0:e.visible)||void 0===t||t,i=null!==(n=null==e?void 0:e.reason)&&void 0!==n?n:null;let o=!1;this.visibility.visible!==r?o=!0:this.visibility.visible||this.visibility.reason===i||(o=!0),o&&(this.visibility=r?g:Object.freeze({visible:!1,reason:i}),this.emit(f.VisibilityChange,this,r))}messageVisibility(){return this.visibility}makeRedacted(e){if(!e.event)throw new Error("invalid redactionEvent in makeRedacted");this._localRedactionEvent=null,this.emit(f.BeforeRedaction,this,e),this._replacingEvent=null,this.event.unsigned||(this.event.unsigned={}),this.event.unsigned.redacted_because=e.event;for(const e in this.event)this.event.hasOwnProperty(e)&&!b.has(e)&&delete this.event[e];this.isEncrypted()&&(this.clearEvent=void 0);const t=this.getType()in v?v[this.getType()]:{},n=this.getContent();for(const e in n)n.hasOwnProperty(e)&&!t[e]&&delete n[e];this.invalidateExtensibleEvent()}isRedacted(){return Boolean(this.getUnsigned().redacted_because)}isRedaction(){return this.getType()===s.b.RoomRedaction}asVisibilityChange(){if(!s.a.matches(this.getType()))return null;const e=this.getRelation();if(!e||"m.reference"!=e.rel_type)return null;const t=e.event_id;if(!t)return null;const n=this.getWireContent(),r=!!n.visible,i=n.reason;return i&&"string"!=typeof i?null:{visible:r,reason:i,eventId:t}}isVisibilityEvent(){return s.a.matches(this.getType())}getRedactionEvent(){var e,t,n,r;return this.isRedacted()?null!==(e=this.clearEvent)&&void 0!==e&&e.unsigned?null!==(n=null===(r=this.clearEvent)||void 0===r?void 0:r.unsigned.redacted_because)&&void 0!==n?n:null:null!==(t=this.event.unsigned)&&void 0!==t&&t.redacted_because?this.event.unsigned.redacted_because:{}:null}getPushActions(){return this.pushActions}setPushActions(e){this.pushActions=e}handleRemoteEcho(e){const t=this.getUnsigned(),n=this.getId();this.event=e,t.redacted_because&&(this.event.unsigned||(this.event.unsigned={}),this.event.unsigned.redacted_because=t.redacted_because),this.setStatus(null),this.getId()!==n&&this.emit(f.LocalEventIdReplaced,this),this.localTimestamp=Date.now()-this.getAge()}isSending(){return!!this.status}setStatus(e){this.status=e,this.emit(f.Status,this,e)}replaceLocalEventId(e){this.event.event_id=e,this.emit(f.LocalEventIdReplaced,this)}isRelation(e){var t;const n=null===(t=this.getWireContent())||void 0===t?void 0:t["m.relates_to"];return(!this.isState()||(null==n?void 0:n.rel_type)!==s.h.Replace)&&!(null==n||!n.rel_type||!n.event_id||e&&n.rel_type!==e)}getRelation(){var e;return this.isRelation()&&null!==(e=this.getWireContent()["m.relates_to"])&&void 0!==e?e:null}makeReplaced(e){this.isRedacted()&&e||this.isState()||this._replacingEvent!==e&&(this._replacingEvent=null!=e?e:null,this.emit(f.Replaced,this),this.invalidateExtensibleEvent())}getAssociatedStatus(){return this._replacingEvent?this._replacingEvent.status:this._localRedactionEvent?this._localRedactionEvent.status:this.status}getServerAggregatedRelation(e){var t;return null===(t=this.getUnsigned()["m.relations"])||void 0===t?void 0:t[e]}replacingEventId(){const e=this.getServerAggregatedRelation(s.h.Replace);return e?e.event_id:this._replacingEvent?this._replacingEvent.getId():void 0}replacingEvent(){return this._replacingEvent}replacingEventDate(){const e=this.getServerAggregatedRelation(s.h.Replace);if(e){const t=e.origin_server_ts;if(Number.isFinite(t))return new Date(t)}else if(this._replacingEvent){var t;return null!==(t=this._replacingEvent.getDate())&&void 0!==t?t:void 0}}localRedactionEvent(){return this._localRedactionEvent}getAssociatedId(){const e=this.getRelation();return this.replyEventId?this.replyEventId:e?e.event_id:this.isRedaction()?this.event.redacts:void 0}hasAssocation(){return!!this.getAssociatedId()}hasAssociation(){return!!this.getAssociatedId()}updateAssociatedId(e){const t=this.getRelation();t?t.event_id=e:this.isRedaction()&&(this.event.redacts=e)}flagCancelled(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._isCancelled=e}isCancelled(){return this._isCancelled}toSnapshot(){const e=new _(JSON.parse(JSON.stringify(this.event)));for(const[t,n]of Object.entries(this))"event"!==t&&(e[t]=n);return e}isEquivalentTo(e){if(!e)return!1;if(e===this)return!0;const t=Object(l.l)(this.event),n=Object(l.l)(e.event);return JSON.stringify(t)===JSON.stringify(n)}toJSON(){const e=this.getEffectiveEvent();return this.isEncrypted()?{decrypted:e,encrypted:this.event}:e}setVerificationRequest(e){this.verificationRequest=e}setTxnId(e){this.txnId=e}getTxnId(){return this.txnId}setThread(e){this.thread&&this.reEmitter.stopReEmitting(this.thread,[c.f.Update]),this.thread=e,this.setThreadId(null==e?void 0:e.id),e&&this.reEmitter.reEmit(e,[c.f.Update])}getThread(){return this.thread}setThreadId(e){this.threadId=e}}const b=new Set(["event_id","type","room_id","user_id","sender","state_key","prev_state","content","unsigned","origin_server_ts"]),v={[s.b.RoomMember]:{membership:1},[s.b.RoomCreate]:{creator:1},[s.b.RoomJoinRules]:{join_rule:1},[s.b.RoomPowerLevels]:{ban:1,events:1,events_default:1,kick:1,redact:1,state_default:1,users:1,users_default:1}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(121),l=n(135);class c extends a.a.Component{constructor(){super(...arguments),i()(this,"onClick",(()=>{this.props.onFinished(!0)}))}render(){return a.a.createElement(l.a,{className:"mx_ErrorDialog",onFinished:this.props.onFinished,title:this.props.title||Object(s.a)("Error"),headerImage:this.props.headerImage,contentId:"mx_Dialog_content"},a.a.createElement("div",{className:"mx_Dialog_content",id:"mx_Dialog_content"},this.props.description||Object(s.a)("An error has occurred.")),a.a.createElement("div",{className:"mx_Dialog_buttons"},a.a.createElement("button",{className:"mx_Dialog_primary",onClick:this.onClick,autoFocus:this.props.focus},this.props.button||Object(s.a)("OK"))))}}i()(c,"defaultProps",{focus:!0})},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(121);class l extends a.a.Component{constructor(){super(...arguments),i()(this,"onCancelClick",(e=>{this.props.onCancel(e)}))}render(){let e,t="mx_Dialog_primary";this.props.primaryButtonClass&&(t+=" "+this.props.primaryButtonClass),(this.props.cancelButton||this.props.hasCancel)&&(e=a.a.createElement("button",{"data-testid":"dialog-cancel-button",type:"button",onClick:this.onCancelClick,className:this.props.cancelButtonClass,disabled:this.props.disabled},this.props.cancelButton||Object(s.a)("Cancel")));let n=null;return this.props.additive&&(n=a.a.createElement("div",{className:"mx_Dialog_buttons_additive"},this.props.additive)),a.a.createElement("div",{className:"mx_Dialog_buttons"},n,a.a.createElement("span",{className:"mx_Dialog_buttons_row"},e,this.props.children,a.a.createElement("button",{type:this.props.primaryIsSubmit?"submit":"button","data-testid":"dialog-primary-button",className:t,onClick:this.props.onPrimaryButtonClick,autoFocus:this.props.focus,disabled:this.props.disabled||this.props.primaryDisabled},this.props.primaryButton)))}}i()(l,"defaultProps",{hasCancel:!0,disabled:!1})},function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"i",(function(){return o})),n.d(t,"g",(function(){return a})),n.d(t,"h",(function(){return s})),n.d(t,"j",(function(){return l})),n.d(t,"b",(function(){return c})),n.d(t,"e",(function(){return u})),n.d(t,"d",(function(){return d})),n.d(t,"a",(function(){return h})),n.d(t,"f",(function(){return p})),n.d(t,"k",(function(){return m})),n.d(t,"o",(function(){return g})),n.d(t,"m",(function(){return f})),n.d(t,"l",(function(){return _})),n.d(t,"n",(function(){return b}));var r=n(290);function i(e,t){if(e.length===t)return e;const n=[];if(e.length>t){const r=Math.round(e.length/t);for(let t=0;t<e.length;t+=r)n.push(e[t])}else{const r=Math.ceil(t/e.length);for(const t of e)n.push(...s(t,r))}return l(n,t,s(e[e.length-1],t))}function o(e,t){if(e.length===t)return e;let n=[];if(e.length>t){for(;n.length>2*t||0===n.length;){n=[];for(let t=1;t<e.length-1;t+=2){const r=(e[t-1]+e[t+1]+e[t])/3;n.push(r)}e=n}return i(n,t)}return i(e,t)}function a(e,t,n){const i=Math.min(...e),o=Math.max(...e);return e.map((e=>Object(r.d)(Object(r.c)(e,i,o),t,n)))}function s(e,t){return new Array(t).fill(e)}function l(e,t,n){return e.length===t?e:e.length>t?e.slice(0,t):e.concat(n.slice(0,t-e.length))}function c(e){return e.slice(0,e.length)}function u(e,t){if(e.length===t.length){for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}return!0}function d(e,t){return e.length!==t.length||(!!t.some((t=>!e.includes(t)))||!!e.some((e=>!t.includes(e))))}function h(e,t){return{added:t.filter((t=>!e.includes(t))),removed:e.filter((e=>!t.includes(e)))}}function p(e,t){return e.filter((e=>t.includes(e)))}function m(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Array.from(t.reduce(((e,t)=>(t.forEach((t=>e.add(t))),e)),new Set))}function g(e,t,n){const r=Array.from(e),[i]=r.splice(t,1);return r.splice(n,0,i),r}const f=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(((e,t)=>{const n=new Uint8Array(e.length+t.length);return n.set(e,0),n.set(t,e.length),n}),new Uint8Array(0))};async function _(e,t){for(const n of e)if(!await t(n))return!1;return!0}function b(e){return e.filter(Boolean)}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return ie})),n.d(t,"g",(function(){return se})),n.d(t,"e",(function(){return le})),n.d(t,"f",(function(){return ce})),n.d(t,"c",(function(){return de})),n.d(t,"b",(function(){return pe})),n.d(t,"d",(function(){return ge})),n.d(t,"h",(function(){return fe}));var r=n(132),i=n.n(r),o=n(13),a=n.n(o),s=n(215),l=n(143),c=n(962),u=n(188),d=n(315),h=n(508),p=n(16),m=n(179),g=n(320),f=n(321),_=n(199),b=n(287),v=n(976),y=n(1),E=n(271),S=n(193),w=n(174),T=n(422),C=n(421),x=n(222),F=n(352),D=n(1561),k=n(671),O=n(987),I=n(269),A=n(140),R=n(184),N=n(129),M=n(160),P=n(988),L=n(223),B=n(672),U=n(1562),j=n(423),G=n(231),z=n(224),H=n(989),q=n(509),V=n(158),$=n(18),K=n(673),W=n(170),Y=n(204),Q=n(15),X=n(990),Z=n(991),J=n(413),ee=n(674);const te=["server","limit","since"];function ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ne(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ne(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const ie=Object(w.d)(),oe=216e5,ae=6e5,se=new Q.c("last_seen_user_agent","org.matrix.msc3852.last_seen_user_agent");let le,ce;var ue;!function(e){e.Chronological="chronological",e.Detached="detached"}(le||(le={})),function(e){e.Stable="stable",e.Unstable="unstable"}(ce||(ce={})),function(e){e.MasterKey="master_key",e.SelfSigningKey="self_signing_key",e.UserSigningKey="user_signing_key"}(ue||(ue={}));const de=new Q.c("m.authentication","org.matrix.msc2965.authentication"),he="$";let pe;!function(e){e.Sync="sync",e.Event="event",e.ToDeviceEvent="toDeviceEvent",e.AccountData="accountData",e.Room="Room",e.DeleteRoom="deleteRoom",e.SyncUnexpectedError="sync.unexpectedError",e.ClientWellKnown="WellKnown.client",e.ReceivedVoipEvent="received_voip_event",e.UndecryptableToDeviceEvent="toDeviceEvent.undecryptable",e.TurnServers="turnServers",e.TurnServersError="turnServers.error"}(pe||(pe={}));const me=new Q.c("action","org.matrix.msc3824.action");class ge extends V.b{constructor(e){var t;super(),a()(this,"reEmitter",new b.b(this)),a()(this,"olmVersion",null),a()(this,"usingExternalCrypto",!1),a()(this,"store",void 0),a()(this,"deviceId",void 0),a()(this,"credentials",void 0),a()(this,"pickleKey",void 0),a()(this,"scheduler",void 0),a()(this,"clientRunning",!1),a()(this,"timelineSupport",!1),a()(this,"urlPreviewCache",{}),a()(this,"identityServer",void 0),a()(this,"http",void 0),a()(this,"crypto",void 0),a()(this,"cryptoBackend",void 0),a()(this,"cryptoCallbacks",void 0),a()(this,"callEventHandler",void 0),a()(this,"groupCallEventHandler",void 0),a()(this,"supportsCallTransfer",!1),a()(this,"forceTURN",!1),a()(this,"iceCandidatePoolSize",0),a()(this,"idBaseUrl",void 0),a()(this,"baseUrl",void 0),a()(this,"isVoipWithNoMediaAllowed",void 0),a()(this,"canSupportVoip",!1),a()(this,"peekSync",null),a()(this,"isGuestAccount",!1),a()(this,"ongoingScrollbacks",{}),a()(this,"notifTimelineSet",null),a()(this,"cryptoStore",void 0),a()(this,"verificationMethods",void 0),a()(this,"fallbackICEServerAllowed",!1),a()(this,"roomList",void 0),a()(this,"syncApi",void 0),a()(this,"roomNameGenerator",void 0),a()(this,"pushRules",void 0),a()(this,"syncLeftRoomsPromise",void 0),a()(this,"syncedLeftRooms",!1),a()(this,"clientOpts",void 0),a()(this,"clientWellKnownIntervalID",void 0),a()(this,"canResetTimelineCallback",void 0),a()(this,"canSupport",new Map),a()(this,"pushProcessor",new g.a(this)),a()(this,"serverVersionsPromise",void 0),a()(this,"cachedCapabilities",void 0),a()(this,"clientWellKnown",void 0),a()(this,"clientWellKnownPromise",void 0),a()(this,"turnServers",[]),a()(this,"turnServersExpiry",0),a()(this,"checkTurnServersIntervalID",void 0),a()(this,"exportedOlmDeviceToImport",void 0),a()(this,"txnCtr",0),a()(this,"mediaHandler",new H.a(this)),a()(this,"sessionId",void 0),a()(this,"pendingEventEncryption",new Map),a()(this,"useE2eForGroupCall",!0),a()(this,"toDeviceMessageQueue",void 0),a()(this,"ignoredInvites",void 0),a()(this,"startCallEventHandler",(()=>{this.isInitialSyncComplete()&&(this.callEventHandler.start(),this.groupCallEventHandler.start(),this.off(pe.Sync,this.startCallEventHandler))})),a()(this,"fixupRoomNotifications",(()=>{if(this.isInitialSyncComplete()){var e;const t=(null!==(e=this.getRooms())&&void 0!==e?e:[]).filter((e=>e.getUnreadNotificationCount(A.b.Total)>0));for(const e of t){const t=this.getSafeUserId();e.fixupNotifications(t)}this.off(pe.Sync,this.fixupRoomNotifications)}})),e.baseUrl=p.p(e.baseUrl),e.idBaseUrl=p.p(e.idBaseUrl),this.baseUrl=e.baseUrl,this.idBaseUrl=e.idBaseUrl,this.identityServer=e.identityServer,this.usingExternalCrypto=null!==(t=e.usingExternalCrypto)&&void 0!==t&&t,this.store=e.store||new c.a,this.deviceId=e.deviceId||null,this.sessionId=Object(L.b)(10);const n=e.userId||null;this.credentials={userId:n},this.http=new S.g(this,{fetchFn:e.fetchFn,baseUrl:e.baseUrl,idBaseUrl:e.idBaseUrl,accessToken:e.accessToken,prefix:S.a.R0,onlyData:!0,extraParams:e.queryParams,localTimeoutMs:e.localTimeoutMs,useAuthorizationHeader:e.useAuthorizationHeader}),e.deviceToImport?this.deviceId?y.a.warn("not importing device because device ID is provided to constructor independently of exported data"):this.credentials.userId?y.a.warn("not importing device because user ID is provided to constructor independently of exported data"):e.deviceToImport.deviceId?(this.deviceId=e.deviceToImport.deviceId,this.credentials.userId=e.deviceToImport.userId,this.exportedOlmDeviceToImport=e.deviceToImport.olmDevice):y.a.warn("not importing device because no device ID in exported data"):e.pickleKey&&(this.pickleKey=e.pickleKey),this.scheduler=e.scheduler,this.scheduler&&this.scheduler.setProcessFunction((async e=>{const t=this.getRoom(e.getRoomId());e.status!==l.a.SENDING&&this.updatePendingEventStatus(t,e,l.a.SENDING);const n=await this.sendEventHttpRequest(e);return t&&t.updatePendingEvent(e,l.a.SENT,n.event_id),n})),Object(u.k)()&&(this.callEventHandler=new h.a(this),this.groupCallEventHandler=new q.a(this),this.canSupportVoip=!0,this.on(pe.Sync,this.startCallEventHandler)),this.on(pe.Sync,this.fixupRoomNotifications),this.timelineSupport=Boolean(e.timelineSupport),this.cryptoStore=e.cryptoStore,this.verificationMethods=e.verificationMethods,this.cryptoCallbacks=e.cryptoCallbacks||{},this.forceTURN=e.forceTURN||!1,this.iceCandidatePoolSize=void 0===e.iceCandidatePoolSize?0:e.iceCandidatePoolSize,this.supportsCallTransfer=e.supportsCallTransfer||!1,this.fallbackICEServerAllowed=e.fallbackICEServerAllowed||!1,this.isVoipWithNoMediaAllowed=e.isVoipWithNoMediaAllowed||!1,void 0!==e.useE2eForGroupCall&&(this.useE2eForGroupCall=e.useE2eForGroupCall),this.roomList=new v.a(this.cryptoStore),this.roomNameGenerator=e.roomNameGenerator,this.toDeviceMessageQueue=new X.a(this),this.on(l.c.Decrypted,(e=>{fe(this,e)})),this.on(A.d.Receipt,((e,t)=>{if(t&&this.isRoomEncrypted(t.roomId)){const r=e.getContent();if(!(Object.keys(r).filter((e=>{for(const[t,n]of Object.entries(r[e]))if(p.w(t)&&n&&Object.keys(n).includes(this.getUserId()))return!0;return!1})).length>0))return;const i=20,o=t.getLiveTimeline().getEvents();let a=0;for(let e=o.length-1;e>=0;e--){var n;if(e===o.length-i)return;const r=o[e];if(t.hasUserReadEvent(this.getUserId(),r.getId()))break;const s=this.getPushActionsForEvent(r);a+=null!=s&&null!==(n=s.tweaks)&&void 0!==n&&n.highlight?1:0}t.setUnreadNotificationCount(A.b.Highlight,a)}})),this.ignoredInvites=new Z.a(this)}async startClient(e){var t;if(this.clientRunning)return;this.clientRunning=!0,"number"==typeof e&&(e={initialSyncLimit:e});const n=this.getUserId();n&&this.store.storeUser(new x.a(n)),this.canSupportVoip&&(this.checkTurnServersIntervalID=setInterval((()=>{this.checkTurnServers()}),ae),this.checkTurnServers()),this.syncApi&&(y.a.error("Still have sync object whilst not running: stopping old one"),this.syncApi.stop());try{await this.getVersions();const{threads:e,list:t,fwdPagination:n}=await this.doesServerSupportThread();W.e.setServerSideSupport(e),W.e.setServerSideListSupport(t),W.e.setServerSideFwdPaginationSupport(n)}catch(e){y.a.error("Can't fetch server versions, continuing to initialise sync, this will be retried later",e)}this.clientOpts=null!==(t=e)&&void 0!==t?t:{},this.clientOpts.slidingSync?this.syncApi=new K.a(this.clientOpts.slidingSync,this,this.clientOpts,this.buildSyncApiOptions()):this.syncApi=new s.a(this,this.clientOpts,this.buildSyncApiOptions()),this.clientOpts.hasOwnProperty("experimentalThreadSupport")&&y.a.warn("`experimentalThreadSupport` has been deprecated, use `threadSupport` instead"),!this.clientOpts.hasOwnProperty("threadSupport")&&this.clientOpts.hasOwnProperty("experimentalThreadSupport")&&(this.clientOpts.threadSupport=this.clientOpts.experimentalThreadSupport),this.syncApi.sync(),void 0!==this.clientOpts.clientWellKnownPollPeriod&&(this.clientWellKnownIntervalID=setInterval((()=>{this.fetchClientWellKnown()}),1e3*this.clientOpts.clientWellKnownPollPeriod),this.fetchClientWellKnown()),this.toDeviceMessageQueue.start()}buildSyncApiOptions(){return{crypto:this.crypto,cryptoCallbacks:this.cryptoBackend,canResetEntireTimeline:e=>!!this.canResetTimelineCallback&&this.canResetTimelineCallback(e)}}stopClient(){var t,n,r,i,o;null===(t=this.cryptoBackend)||void 0===t||t.stop(),this.clientRunning&&(y.a.log("stopping MatrixClient"),this.clientRunning=!1,null===(n=this.syncApi)||void 0===n||n.stop(),this.syncApi=void 0,null===(r=this.peekSync)||void 0===r||r.stopPeeking(),null===(i=this.callEventHandler)||void 0===i||i.stop(),null===(o=this.groupCallEventHandler)||void 0===o||o.stop(),this.callEventHandler=void 0,this.groupCallEventHandler=void 0,e.clearInterval(this.checkTurnServersIntervalID),this.checkTurnServersIntervalID=void 0,void 0!==this.clientWellKnownIntervalID&&e.clearInterval(this.clientWellKnownIntervalID),this.toDeviceMessageQueue.stop())}async rehydrateDevice(){if(this.crypto)throw new Error("Cannot rehydrate device after crypto is initialized");if(!this.cryptoCallbacks.getDehydrationKey)return;const t=await this.getDehydratedDevice();if(!t)return;if(!t.device_data||!t.device_id)return void y.a.info("no dehydrated device found");const n=new e.Olm.Account;try{const e=t.device_data;if(e.algorithm!==k.a)return void y.a.warn("Wrong algorithm for dehydrated device");y.a.log("unpickling dehydrated device");const r=await this.cryptoCallbacks.getDehydrationKey(e,(t=>{n.unpickle(new Uint8Array(t),e.account)}));n.unpickle(r,e.account),y.a.log("unpickled device");if((await this.http.authedRequest(S.i.Post,"/dehydrated_device/claim",void 0,{device_id:t.device_id},{prefix:"/_matrix/client/unstable/org.matrix.msc2697.v2"})).success){this.deviceId=t.device_id,y.a.info("using dehydrated device");const e=this.pickleKey||"DEFAULT_KEY";return this.exportedOlmDeviceToImport={pickledAccount:n.pickle(e),sessions:[],pickleKey:e},n.free(),this.deviceId}return n.free(),void y.a.info("not using dehydrated device")}catch(e){n.free(),y.a.warn("could not unpickle",e)}}async getDehydratedDevice(){try{return await this.http.authedRequest(S.i.Get,"/dehydrated_device",void 0,void 0,{prefix:"/_matrix/client/unstable/org.matrix.msc2697.v2"})}catch(e){return void y.a.info("could not get dehydrated device",e)}}async setDehydrationKey(e,t,n){if(this.crypto)return this.crypto.dehydrationManager.setKeyAndQueueDehydration(e,t,n);y.a.warn("not dehydrating device if crypto is not enabled")}async createDehydratedDevice(e,t,n){if(this.crypto)return await this.crypto.dehydrationManager.setKey(e,t,n),this.crypto.dehydrationManager.dehydrateDevice();y.a.warn("not dehydrating device if crypto is not enabled")}async exportDevice(){if(this.crypto)return{userId:this.credentials.userId,deviceId:this.deviceId,olmDevice:await this.crypto.olmDevice.export()};y.a.warn("not exporting device if crypto is not enabled")}clearStores(){if(this.clientRunning)throw new Error("Cannot clear stores while client is running");const t=[];t.push(this.store.deleteAllData()),this.cryptoStore&&t.push(this.cryptoStore.deleteAllData());return t.push((async()=>{let t;try{t=e.indexedDB}catch(e){return}for(const e of[`${ee.a}::matrix-sdk-crypto`,`${ee.a}::matrix-sdk-crypto-meta`]){const n=new Promise(((n,r)=>{y.a.info(`Removing IndexedDB instance ${e}`);const i=t.deleteDatabase(e);i.onsuccess=t=>{y.a.info(`Removed IndexedDB instance ${e}`),n(0)},i.onerror=t=>{y.a.warn(`Failed to remove IndexedDB instance ${e}:`,t),n(0)},i.onblocked=t=>{y.a.info(`cannot yet remove IndexedDB instance ${e}`)}}));await n}})()),Promise.all(t).then()}getUserId(){return this.credentials&&this.credentials.userId?this.credentials.userId:null}getSafeUserId(){const e=this.getUserId();if(!e)throw new Error("Expected logged in user but found none.");return e}getDomain(){return this.credentials&&this.credentials.userId?this.credentials.userId.replace(/^.*?:/,""):null}getUserIdLocalpart(){return this.credentials&&this.credentials.userId?this.credentials.userId.split(":")[0].substring(1):null}getDeviceId(){return this.deviceId}getSessionId(){return this.sessionId}supportsVoip(){return this.canSupportVoip}getMediaHandler(){return this.mediaHandler}setForceTURN(e){this.forceTURN=e}setSupportsCallTransfer(e){this.supportsCallTransfer=e}getUseE2eForGroupCall(){return this.useE2eForGroupCall}createCall(e){return Object(u.h)(this,e)}async createGroupCall(e,t,n,r,i,o){if(this.getGroupCallForRoom(e))throw new Error(`${e} already has an existing group call`);const a=this.getRoom(e);if(!a)throw new Error(`Cannot find room ${e}`);return new z.a(this,a,t,n,r,void 0,i||this.isVoipWithNoMediaAllowed,o,this.isVoipWithNoMediaAllowed).create()}waitUntilRoomReadyForGroupCalls(e){return this.groupCallEventHandler.waitUntilRoomReadyForGroupCalls(e)}getGroupCallForRoom(e){return this.groupCallEventHandler.groupCalls.get(e)||null}getSyncState(){var e,t;return null!==(e=null===(t=this.syncApi)||void 0===t?void 0:t.getSyncState())&&void 0!==e?e:null}getSyncStateData(){return this.syncApi?this.syncApi.getSyncStateData():null}isInitialSyncComplete(){const e=this.getSyncState();return!!e&&(e===s.b.Prepared||e===s.b.Syncing)}isGuest(){return this.isGuestAccount}setGuest(e){this.isGuestAccount=e}getScheduler(){return this.scheduler}retryImmediately(){var e,t;return this.toDeviceMessageQueue.sendQueue(),null!==(e=null===(t=this.syncApi)||void 0===t?void 0:t.retryImmediately())&&void 0!==e&&e}getNotifTimelineSet(){return this.notifTimelineSet}setNotifTimelineSet(e){this.notifTimelineSet=e}getCapabilities(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const n=(new Date).getTime();return this.cachedCapabilities&&!t&&n<this.cachedCapabilities.expiration?(y.a.log("Returning cached capabilities"),Promise.resolve(this.cachedCapabilities.capabilities)):this.http.authedRequest(S.i.Get,"/capabilities").catch((e=>(y.a.error(e),{}))).then((function(){const t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).capabilities||{},r=Object.keys(t).length?oe:6e4+5e3*Math.random();return e.cachedCapabilities={capabilities:t,expiration:n+r},y.a.log("Caching capabilities: ",t),t}))}async initCrypto(){if(!Object(w.d)())throw new Error("End-to-end encryption not supported in this js-sdk build: did you remember to load the olm library?");if(this.cryptoBackend)return void y.a.warn("Attempt to re-initialise e2e encryption on MatrixClient");if(!this.cryptoStore)throw new Error("Cannot enable encryption: no cryptoStore provided");y.a.log("Crypto: Starting up crypto store..."),await this.cryptoStore.startup(),y.a.log("Crypto: initialising roomlist..."),await this.roomList.init();const e=this.getUserId();if(null===e)throw new Error("Cannot enable encryption on MatrixClient with unknown userId: ensure userId is passed in createClient().");if(null===this.deviceId)throw new Error("Cannot enable encryption on MatrixClient with unknown deviceId: ensure deviceId is passed in createClient().");const t=new w.a(this,e,this.deviceId,this.store,this.cryptoStore,this.roomList,this.verificationMethods);this.reEmitter.reEmit(t,[w.b.KeyBackupFailed,w.b.KeyBackupSessionsRemaining,w.b.RoomKeyRequest,w.b.RoomKeyRequestCancellation,w.b.Warning,w.b.DevicesUpdated,w.b.WillUpdateDevices,w.b.DeviceVerificationChanged,w.b.UserTrustStatusChanged,w.b.KeysChanged]),y.a.log("Crypto: initialising crypto object..."),await t.init({exportedOlmDevice:this.exportedOlmDeviceToImport,pickleKey:this.pickleKey}),delete this.exportedOlmDeviceToImport,this.olmVersion=w.a.getOlmVersion(),t.registerEventHandlers(this),this.cryptoBackend=this.crypto=t,this.crypto.uploadDeviceKeys().catch((e=>{y.a.error("Error uploading device keys",e)}))}async initRustCrypto(){if(this.cryptoBackend)return void y.a.warn("Attempt to re-initialise e2e encryption on MatrixClient");const e=this.getUserId();if(null===e)throw new Error("Cannot enable encryption on MatrixClient with unknown userId: ensure userId is passed in createClient().");const t=this.getDeviceId();if(null===t)throw new Error("Cannot enable encryption on MatrixClient with unknown deviceId: ensure deviceId is passed in createClient().");const r=await n.e(32).then(n.bind(null,1550)),i=await r.initRustCrypto(this.http,e,t);this.cryptoBackend=i,this.on(R.b.Membership,i.onRoomMembership.bind(i))}isCryptoEnabled(){return!!this.cryptoBackend}getDeviceEd25519Key(){var e,t;return null!==(e=null===(t=this.crypto)||void 0===t?void 0:t.getDeviceEd25519Key())&&void 0!==e?e:null}getDeviceCurve25519Key(){var e,t;return null!==(e=null===(t=this.crypto)||void 0===t?void 0:t.getDeviceCurve25519Key())&&void 0!==e?e:null}async uploadKeys(){y.a.warn("MatrixClient.uploadKeys is deprecated")}downloadKeys(e,t){return this.crypto?this.crypto.downloadKeys(e,t):Promise.reject(new Error("End-to-end encryption disabled"))}getStoredDevicesForUser(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.getStoredDevicesForUser(e)||[]}getStoredDevice(e,t){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.getStoredDevice(e,t)||null}setDeviceVerified(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=this.setDeviceVerification(e,t,n,null,null);return e==this.credentials.userId&&this.checkKeyBackup(),r}setDeviceBlocked(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.setDeviceVerification(e,t,null,n,null)}setDeviceKnown(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.setDeviceVerification(e,t,null,null,n)}async setDeviceVerification(e,t,n,r,i){if(!this.crypto)throw new Error("End-to-end encryption disabled");await this.crypto.setDeviceVerification(e,t,n,r,i)}requestVerificationDM(e,t){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.requestVerificationDM(e,t)}findVerificationRequestDMInProgress(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.findVerificationRequestDMInProgress(e)}getVerificationRequestsToDeviceInProgress(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.getVerificationRequestsToDeviceInProgress(e)}requestVerification(e,t){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.requestVerification(e,t)}beginKeyVerification(e,t,n){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.beginKeyVerification(e,t,n)}checkSecretStorageKey(e,t){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.checkSecretStorageKey(e,t)}setGlobalBlacklistUnverifiedDevices(e){if(!this.cryptoBackend)throw new Error("End-to-end encryption disabled");return this.cryptoBackend.globalBlacklistUnverifiedDevices=e,e}getGlobalBlacklistUnverifiedDevices(){if(!this.cryptoBackend)throw new Error("End-to-end encryption disabled");return this.cryptoBackend.globalBlacklistUnverifiedDevices}setGlobalErrorOnUnknownDevices(e){if(!this.cryptoBackend)throw new Error("End-to-end encryption disabled");this.cryptoBackend.globalErrorOnUnknownDevices=e}getGlobalErrorOnUnknownDevices(){if(!this.cryptoBackend)throw new Error("End-to-end encryption disabled");return this.cryptoBackend.globalErrorOnUnknownDevices}getCrossSigningId(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O.a.Master;if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.getCrossSigningId(e)}getStoredCrossSigningForUser(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.getStoredCrossSigningForUser(e)}checkUserTrust(e){if(!this.cryptoBackend)throw new Error("End-to-end encryption disabled");return this.cryptoBackend.checkUserTrust(e)}checkDeviceTrust(e,t){if(!this.cryptoBackend)throw new Error("End-to-end encryption disabled");return this.cryptoBackend.checkDeviceTrust(e,t)}checkIfOwnDeviceCrossSigned(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.checkIfOwnDeviceCrossSigned(e)}checkOwnCrossSigningTrust(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.checkOwnCrossSigningTrust(e)}checkCrossSigningPrivateKey(e,t){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.checkCrossSigningPrivateKey(e,t)}legacyDeviceVerification(e,t,n){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.legacyDeviceVerification(e,t,n)}prepareToEncrypt(e){if(!this.cryptoBackend)throw new Error("End-to-end encryption disabled");this.cryptoBackend.prepareToEncrypt(e)}userHasCrossSigningKeys(){if(!this.cryptoBackend)throw new Error("End-to-end encryption disabled");return this.cryptoBackend.userHasCrossSigningKeys()}isCrossSigningReady(){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.isCrossSigningReady()}bootstrapCrossSigning(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.bootstrapCrossSigning(e)}getCryptoTrustCrossSignedDevices(){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.getCryptoTrustCrossSignedDevices()}setCryptoTrustCrossSignedDevices(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");this.crypto.setCryptoTrustCrossSignedDevices(e)}countSessionsNeedingBackup(){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.countSessionsNeedingBackup()}getEventEncryptionInfo(e){if(!this.cryptoBackend)throw new Error("End-to-end encryption disabled");return this.cryptoBackend.getEventEncryptionInfo(e)}createRecoveryKeyFromPassphrase(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.createRecoveryKeyFromPassphrase(e)}isSecretStorageReady(){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.isSecretStorageReady()}bootstrapSecretStorage(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.bootstrapSecretStorage(e)}addSecretStorageKey(e,t,n){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.addSecretStorageKey(e,t,n)}hasSecretStorageKey(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.hasSecretStorageKey(e)}storeSecret(e,t,n){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.storeSecret(e,t,n)}getSecret(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.getSecret(e)}isSecretStored(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.isSecretStored(e)}requestSecret(e,t){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.requestSecret(e,t)}getDefaultSecretStorageKeyId(){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.getDefaultSecretStorageKeyId()}setDefaultSecretStorageKeyId(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.setDefaultSecretStorageKeyId(e)}checkSecretStoragePrivateKey(e,t){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.checkSecretStoragePrivateKey(e,t)}async getEventSenderDeviceInfo(e){return this.crypto?this.crypto.getEventSenderDeviceInfo(e):null}async isEventSenderVerified(e){const t=await this.getEventSenderDeviceInfo(e);return!!t&&t.isVerified()}getOutgoingRoomKeyRequest(e){if(!this.crypto)throw new Error("End-to-End encryption disabled");const t=e.getWireContent(),n={session_id:t.session_id,sender_key:t.sender_key,algorithm:t.algorithm,room_id:e.getRoomId()};return n.session_id&&n.sender_key&&n.algorithm&&n.room_id?this.crypto.cryptoStore.getOutgoingRoomKeyRequest(n):Promise.resolve(null)}cancelAndResendEventRoomKeyRequest(e){if(!this.crypto)throw new Error("End-to-End encryption disabled");return e.cancelAndResendKeyRequest(this.crypto,this.getUserId())}setRoomEncryption(e,t){if(!this.crypto)throw new Error("End-to-End encryption disabled");return this.crypto.setRoomEncryption(e,t)}isRoomEncrypted(e){const t=this.getRoom(e);if(!t)return!1;return!!t.currentState.getStateEvents(N.b.RoomEncryption,"")||this.roomList.isRoomEncrypted(e)}encryptAndSendToDevices(e,t){if(!this.crypto)throw new Error("End-to-End encryption disabled");return this.crypto.encryptAndSendToDevices(e,t)}forceDiscardSession(e){if(!this.crypto)throw new Error("End-to-End encryption disabled");this.crypto.forceDiscardSession(e)}exportRoomKeys(){return this.cryptoBackend?this.cryptoBackend.exportRoomKeys():Promise.reject(new Error("End-to-end encryption disabled"))}importRoomKeys(e,t){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.importRoomKeys(e,t)}checkKeyBackup(){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.backupManager.checkKeyBackup()}async getKeyBackupVersion(){let e;try{e=await this.http.authedRequest(S.i.Get,"/room_keys/version",void 0,void 0,{prefix:S.a.V3})}catch(e){if("M_NOT_FOUND"===e.errcode)return null;throw e}return B.a.checkBackupVersion(e),e}isKeyBackupTrusted(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.backupManager.isKeyBackupTrusted(e)}getKeyBackupEnabled(){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.backupManager.getKeyBackupEnabled()}enableKeyBackup(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.backupManager.enableKeyBackup(e)}disableKeyBackup(){if(!this.crypto)throw new Error("End-to-end encryption disabled");this.crypto.backupManager.disableKeyBackup()}async prepareKeyBackupVersion(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{secureSecretStorage:!1};if(!this.crypto)throw new Error("End-to-end encryption disabled");const{algorithm:n,auth_data:r,recovery_key:i,privateKey:o}=await this.crypto.backupManager.prepareKeyBackupVersion(e);return t.secureSecretStorage&&(await this.storeSecret("m.megolm_backup.v1",Object(_.encodeBase64)(o)),y.a.info("Key backup private key stored in secret storage")),{algorithm:n,auth_data:r,recovery_key:i}}isKeyBackupKeyStored(){return Promise.resolve(this.isSecretStored("m.megolm_backup.v1"))}async createKeyBackupVersion(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");await this.crypto.backupManager.createKeyBackupVersion(e);const t={algorithm:e.algorithm,auth_data:e.auth_data};await this.crypto.signObject(t.auth_data),this.cryptoCallbacks.getCrossSigningKey&&this.crypto.crossSigningInfo.getId()&&await this.crypto.crossSigningInfo.signObject(t.auth_data,"master");const n=await this.http.authedRequest(S.i.Post,"/room_keys/version",void 0,t,{prefix:S.a.V3});return await this.checkKeyBackup(),this.getKeyBackupEnabled()||y.a.error("Key backup not usable even though we just created it"),n}async deleteKeyBackupVersion(e){if(!this.crypto)throw new Error("End-to-end encryption disabled");this.crypto.backupManager.version&&this.crypto.backupManager.disableKeyBackup();const t=p.o("/room_keys/version/$version",{$version:e});await this.http.authedRequest(S.i.Delete,t,void 0,void 0,{prefix:S.a.V3})}makeKeyBackupPath(e,t,n){let r;r=void 0!==t?p.o("/room_keys/keys/$roomId/$sessionId",{$roomId:e,$sessionId:t}):void 0!==e?p.o("/room_keys/keys/$roomId",{$roomId:e}):"/room_keys/keys";return{path:r,queryData:void 0===n?void 0:{version:n}}}async sendKeyBackup(e,t,n,r){if(!this.crypto)throw new Error("End-to-end encryption disabled");const i=this.makeKeyBackupPath(e,t,n);await this.http.authedRequest(S.i.Put,i.path,i.queryData,r,{prefix:S.a.V3})}async scheduleAllGroupSessionsForBackup(){if(!this.crypto)throw new Error("End-to-end encryption disabled");await this.crypto.backupManager.scheduleAllGroupSessionsForBackup()}flagAllGroupSessionsForBackup(){if(!this.crypto)throw new Error("End-to-end encryption disabled");return this.crypto.backupManager.flagAllGroupSessionsForBackup()}isValidRecoveryKey(e){try{return Object(T.a)(e),!0}catch(e){return!1}}keyBackupKeyFromPassword(e,t){return Object(C.b)(t.auth_data,e)}keyBackupKeyFromRecoveryKey(e){return Object(T.a)(e)}async restoreKeyBackupWithPassword(e,t,n,r,i){const o=await Object(C.b)(r.auth_data,e);return this.restoreKeyBackup(o,t,n,r,i)}async restoreKeyBackupWithSecretStorage(e,t,n,r){if(!this.crypto)throw new Error("End-to-end encryption disabled");const i=await this.getSecret("m.megolm_backup.v1"),o=Object(w.c)(i);if(o){const e=await this.crypto.getSecretStorageKey();await this.storeSecret("m.megolm_backup.v1",o,[e[0]])}const a=Object(_.decodeBase64)(o||i);return this.restoreKeyBackup(a,t,n,e,r)}restoreKeyBackupWithRecoveryKey(e,t,n,r,i){const o=Object(T.a)(e);return this.restoreKeyBackup(o,t,n,r,i)}async restoreKeyBackupWithCache(e,t,n,r){if(!this.crypto)throw new Error("End-to-end encryption disabled");const i=await this.crypto.getSessionBackupPrivateKey();if(!i)throw new Error("Couldn't get key");return this.restoreKeyBackup(i,e,t,n,r)}async restoreKeyBackup(e,t,n,r,i){const o=null==i?void 0:i.cacheCompleteCallback,a=null==i?void 0:i.progressCallback;if(!this.crypto)throw new Error("End-to-end encryption disabled");let s=0,l=[];const c=this.makeKeyBackupPath(t,n,r.version),u=await B.a.makeAlgorithm(r,(async()=>e)),d=u.untrusted;try{if(!await u.keyMatches(e))return Promise.reject(new S.f({errcode:ge.RESTORE_BACKUP_ERROR_BAD_KEY}));this.crypto.storeSessionBackupPrivateKey(e).catch((e=>{y.a.warn("Error caching session backup key:",e)})).then(o),a&&a({stage:"fetch"});const r=await this.http.authedRequest(S.i.Get,c.path,c.queryData,void 0,{prefix:S.a.V3});if(r.rooms){const e=r.rooms;for(const[t,n]of Object.entries(e)){if(!n.sessions)continue;s+=Object.keys(n.sessions).length;const e=await u.decryptSessions(n.sessions);for(const n of e)n.room_id=t,l.push(n)}}else if(r.sessions){const e=r.sessions;s=Object.keys(e).length,l=await u.decryptSessions(e);for(const e of l)e.room_id=t}else{s=1;try{const[e]=await u.decryptSessions({[n]:r});e.room_id=t,e.session_id=n,l.push(e)}catch(e){y.a.log("Failed to decrypt megolm session from backup",e)}}}finally{u.free()}return await this.importRoomKeys(l,{progressCallback:a,untrusted:d,source:"backup"}),await this.checkKeyBackup(),{total:s,imported:l.length}}async deleteKeysFromBackup(e,t,n){if(!this.crypto)throw new Error("End-to-end encryption disabled");const r=this.makeKeyBackupPath(e,t,n);await this.http.authedRequest(S.i.Delete,r.path,r.queryData,void 0,{prefix:S.a.V3})}async sendSharedHistoryKeys(e,t){if(!this.crypto)throw new Error("End-to-end encryption disabled");const n=this.roomList.getRoomEncryption(e);if(!n)return void y.a.error("Unknown room. Not sharing decryption keys");const r=await this.crypto.downloadKeys(t),i=new Map;for(const[e,t]of r)i.set(e,Array.from(t.values()));const o=this.crypto.getRoomDecryptor(e,n.algorithm);o.sendSharedHistoryInboundSessions?await o.sendSharedHistoryInboundSessions(i):y.a.warn("Algorithm does not support sharing previous keys",n.algorithm)}getMediaConfig(){return this.http.authedRequest(S.i.Get,"/config",void 0,void 0,{prefix:S.h.R0})}getRoom(e){return e?this.store.getRoom(e):null}getRooms(){return this.store.getRooms()}getVisibleRooms(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.store.getRooms(),n=new Set;for(const i of t){var r;const t=null===(r=i.findPredecessor(e))||void 0===r?void 0:r.roomId;t&&n.add(t)}return t.filter((e=>!e.currentState.getStateEvents(N.b.RoomTombstone,"")||!n.has(e.roomId)))}getUser(e){return this.store.getUser(e)}getUsers(){return this.store.getUsers()}setAccountData(e,t){const n=p.o("/user/$userId/account_data/$type",{$userId:this.credentials.userId,$type:e});return Object(S.l)(5,(()=>this.http.authedRequest(S.i.Put,n,void 0,t)))}getAccountData(e){return this.store.getAccountData(e)}async getAccountDataFromServer(e){if(this.isInitialSyncComplete()){const t=this.store.getAccountData(e);return t?t.getContent():null}const t=p.o("/user/$userId/account_data/$type",{$userId:this.credentials.userId,$type:e});try{return await this.http.authedRequest(S.i.Get,t)}catch(e){var n;if("M_NOT_FOUND"===(null===(n=e.data)||void 0===n?void 0:n.errcode))return null;throw e}}async deleteAccountData(e){const t=this.canSupport.get(J.a.AccountDataDeletion);if(t===J.b.Unsupported)return void await this.setAccountData(e,{});const n=p.o("/user/$userId/account_data/$type",{$userId:this.getSafeUserId(),$type:e}),r=t===J.b.Unstable?{prefix:"/_matrix/client/unstable/org.matrix.msc3391"}:void 0;return await this.http.authedRequest(S.i.Delete,n,void 0,void 0,r)}getIgnoredUsers(){const e=this.getAccountData("m.ignored_user_list");return e&&e.getContent()&&e.getContent().ignored_users?Object.keys(e.getContent().ignored_users):[]}setIgnoredUsers(e){const t={ignored_users:{}};return e.forEach((e=>{t.ignored_users[e]={}})),this.setAccountData("m.ignored_user_list",t)}isUserIgnored(e){return this.getIgnoredUsers().includes(e)}async joinRoom(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};void 0===t.syncRoom&&(t.syncRoom=!0);const n=this.getRoom(e);if(null!=n&&n.hasMembershipState(this.credentials.userId,"join"))return Promise.resolve(n);let r=Promise.resolve();if(t.inviteSignUrl){const e=new URL(t.inviteSignUrl);e.searchParams.set("mxid",this.credentials.userId),r=this.http.requestOtherUrl(S.i.Post,e)}const i={};t.viaServers&&(i.server_name=t.viaServers);try{const n={},o=await r;o&&(n.third_party_signed=o);const a=p.o("/join/$roomid",{$roomid:e}),l=(await this.http.authedRequest(S.i.Post,a,i,n)).room_id,c=new s.a(this,this.clientOpts,this.buildSyncApiOptions()).createRoom(l);return t.syncRoom,c}catch(e){throw e}}resendEvent(e,t){return this.toDeviceMessageQueue.sendQueue(),this.updatePendingEventStatus(t,e,l.a.SENDING),this.encryptAndSendEvent(t,e)}cancelPendingEvent(e){if(![l.a.QUEUED,l.a.NOT_SENT,l.a.ENCRYPTING].includes(e.status))throw new Error("cannot cancel an event with status "+e.status);e.status===l.a.ENCRYPTING?this.pendingEventEncryption.delete(e.getId()):this.scheduler&&e.status===l.a.QUEUED&&this.scheduler.removeEventFromQueue(e);const t=this.getRoom(e.getRoomId());this.updatePendingEventStatus(t,e,l.a.CANCELLED)}setRoomName(e,t){return this.sendStateEvent(e,N.b.RoomName,{name:t})}setRoomTopic(e,t,n){const r=I.makeTopicContent(t,n);return this.sendStateEvent(e,N.b.RoomTopic,r)}getRoomTags(e){const t=p.o("/user/$userId/rooms/$roomId/tags",{$userId:this.credentials.userId,$roomId:e});return this.http.authedRequest(S.i.Get,t)}setRoomTag(e,t,n){const r=p.o("/user/$userId/rooms/$roomId/tags/$tag",{$userId:this.credentials.userId,$roomId:e,$tag:t});return this.http.authedRequest(S.i.Put,r,void 0,n)}deleteRoomTag(e,t){const n=p.o("/user/$userId/rooms/$roomId/tags/$tag",{$userId:this.credentials.userId,$roomId:e,$tag:t});return this.http.authedRequest(S.i.Delete,n)}setRoomAccountData(e,t,n){const r=p.o("/user/$userId/rooms/$roomId/account_data/$type",{$userId:this.credentials.userId,$roomId:e,$type:t});return this.http.authedRequest(S.i.Put,r,void 0,n)}setPowerLevel(e,t,n,r){let i={users:{}};(null==r?void 0:r.getType())===N.b.RoomPowerLevels&&(i=p.k(r.getContent()));const o=Array.isArray(t)?t:[t];for(const e of o)null==n?delete i.users[e]:i.users[e]=n;const a=p.o("/rooms/$roomId/state/m.room.power_levels",{$roomId:e});return this.http.authedRequest(S.i.Put,a,void 0,i)}async unstable_createLiveBeacon(e,t){return this.unstable_setLiveBeacon(e,t)}async unstable_setLiveBeacon(e,t){return this.sendStateEvent(e,Y.b.name,t,this.getUserId())}sendEvent(e,t,n,r,i){var o;let a,s,l,c;if(null!=t&&t.startsWith(he)||null===t?(c=i,l=r,s=n,a=t):(c=r,l=n,s=t,a=null),a&&(null===(o=l["m.relates_to"])||void 0===o||!o.rel_type)){var u,d;const t=!(null===(u=l["m.relates_to"])||void 0===u||!u["m.in_reply_to"]);l["m.relates_to"]=re(re({},l["m.relates_to"]),{},{rel_type:W.d.name,event_id:a,is_falling_back:!t});const n=null===(d=this.getRoom(e))||void 0===d?void 0:d.getThread(a);var h,p;if(n&&!t)l["m.relates_to"]["m.in_reply_to"]={event_id:null!==(h=null===(p=n.lastReply((e=>e.isRelation(W.d.name)&&!e.status)))||void 0===p?void 0:p.getId())&&void 0!==h?h:a}}return this.sendCompleteEvent(e,a,{type:s,content:l},c)}sendCompleteEvent(e,t,n,r){r||(r=this.makeTxnId());const i=new l.b(Object.assign(n,{event_id:"~"+e+":"+r,user_id:this.credentials.userId,sender:this.credentials.userId,room_id:e,origin_server_ts:(new Date).getTime()})),o=this.getRoom(e),a=t?null==o?void 0:o.getThread(t):void 0;a&&i.setThread(a),this.reEmitter.reEmit(i,[l.c.Replaced,l.c.VisibilityChange]),null==o||o.reEmitter.reEmit(i,[l.c.BeforeRedaction]);const s=i.getAssociatedId();if(null!=s&&s.startsWith("~")){const e=null==o?void 0:o.getPendingEvents().find((e=>e.getId()===s));null==e||e.once(l.c.LocalEventIdReplaced,(()=>{i.updateAssociatedId(e.getId())}))}const c=i.getType();return y.a.log(`sendEvent of type ${c} in ${e} with txnId ${r}`),i.setTxnId(r),i.setStatus(l.a.SENDING),null==o||o.addPendingEvent(i,r),i.status===l.a.NOT_SENT?Promise.reject(new Error("Event blocked by other events not yet sent")):this.encryptAndSendEvent(o,i)}encryptAndSendEvent(e,t){let n=!1;return Promise.resolve().then((()=>{const r=this.encryptEventIfNeeded(t,null!=e?e:void 0);return r?(this.pendingEventEncryption.set(t.getId(),r),this.updatePendingEventStatus(e,t,l.a.ENCRYPTING),r.then((()=>{this.pendingEventEncryption.has(t.getId())?this.updatePendingEventStatus(e,t,l.a.SENDING):n=!0}))):null})).then((()=>{if(n)return{};let r=null;return this.scheduler&&(r=this.scheduler.queueEvent(t),r&&this.scheduler.getQueueForEvent(t).length>1&&this.updatePendingEventStatus(e,t,l.a.QUEUED)),r||(r=this.sendEventHttpRequest(t),e&&(r=r.then((n=>(e.updatePendingEvent(t,l.a.SENT,n.event_id),n))))),r})).catch((n=>{y.a.error("Error sending event",n.stack||n);try{t.error=n,this.updatePendingEventStatus(e,t,l.a.NOT_SENT)}catch(e){y.a.error("Exception in error handler!",e.stack||n)}throw n instanceof S.f&&(n.event=t),n}))}encryptEventIfNeeded(e,t){if(e.isEncrypted())return null;if(e.isRedaction())return null;if(!t||!this.isRoomEncrypted(e.getRoomId()))return null;if(!this.cryptoBackend&&this.usingExternalCrypto)return null;if(e.getType()===N.b.Reaction)return null;if(!this.cryptoBackend)throw new Error("This room is configured to use encryption, but your client does not support encryption.");return this.cryptoBackend.encryptEvent(e,t)}getEncryptedIfNeededEventType(e,t){return t===N.b.Reaction?t:this.isRoomEncrypted(e)?N.b.RoomMessageEncrypted:t}updatePendingEventStatus(e,t,n){e?e.updatePendingEvent(t,n):t.setStatus(n)}sendEventHttpRequest(e){let t=e.getTxnId();t||(t=this.makeTxnId(),e.setTxnId(t));const n={$roomId:e.getRoomId(),$eventType:e.getWireType(),$stateKey:e.getStateKey(),$txnId:t};let r;if(e.isState()){let t="/rooms/$roomId/state/$eventType";e.getStateKey()&&e.getStateKey().length>0&&(t="/rooms/$roomId/state/$eventType/$stateKey"),r=p.o(t,n)}else if(e.isRedaction()){const t="/rooms/$roomId/redact/$redactsEventId/$txnId";r=p.o(t,re({$redactsEventId:e.event.redacts},n))}else r=p.o("/rooms/$roomId/send/$eventType/$txnId",n);return this.http.authedRequest(S.i.Put,r,void 0,e.getWireContent()).then((t=>(y.a.log(`Event sent to ${e.getRoomId()} with event id ${t.event_id}`),t)))}redactEvent(e,t,n,r,i){var o,a,s,l,c;null!==(o=n)&&void 0!==o&&o.startsWith(he)||(i=r,r=n,n=t,t=null);const u=null===(a=i)||void 0===a?void 0:a.reason;if(null!==(s=i)&&void 0!==s&&s.with_relations&&this.canSupport.get(J.a.RelationBasedRedactions)===J.b.Unsupported)throw new Error(`Server does not support relation based redactions roomId ${e} eventId ${n} txnId: ${r} threadId ${t}`);const d=null!==(l=i)&&void 0!==l&&l.with_relations?{[this.canSupport.get(J.a.RelationBasedRedactions)===J.b.Stable?N.d.stable:N.d.unstable]:null===(c=i)||void 0===c?void 0:c.with_relations}:{};return this.sendCompleteEvent(e,t,{type:N.b.RoomRedaction,content:re(re({},d),{},{reason:u}),redacts:n},r)}sendMessage(e,t,n,r){"string"!=typeof t&&null!==t&&(r=n,n=t,t=null);const i=N.b.RoomMessage,o=n;return this.sendEvent(e,t,i,o,r)}sendTextMessage(e,t,n,r){var i;null!==(i=t)&&void 0!==i&&i.startsWith(he)||null===t||(r=n,n=t,t=null);const o=I.makeTextMessage(n);return this.sendMessage(e,t,o,r)}sendNotice(e,t,n,r){var i;null!==(i=t)&&void 0!==i&&i.startsWith(he)||null===t||(r=n,n=t,t=null);const o=I.makeNotice(n);return this.sendMessage(e,t,o,r)}sendEmoteMessage(e,t,n,r){var i;null!==(i=t)&&void 0!==i&&i.startsWith(he)||null===t||(r=n,n=t,t=null);const o=I.makeEmoteMessage(n);return this.sendMessage(e,t,o,r)}sendImageMessage(e,t,n,r){var i;let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"Image";null!==(i=t)&&void 0!==i&&i.startsWith(he)||null===t||(o=r||"Image",r=n,n=t,t=null);const a={msgtype:N.e.Image,url:n,info:r,body:o};return this.sendMessage(e,t,a)}sendStickerMessage(e,t,n,r){var i;let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"Sticker";null!==(i=t)&&void 0!==i&&i.startsWith(he)||null===t||(o=r||"Sticker",r=n,n=t,t=null);const a={url:n,info:r,body:o};return this.sendEvent(e,t,N.b.Sticker,a)}sendHtmlMessage(e,t,n,r){var i;null!==(i=t)&&void 0!==i&&i.startsWith(he)||null===t||(r=n,n=t,t=null);const o=I.makeHtmlMessage(n,r);return this.sendMessage(e,t,o)}sendHtmlNotice(e,t,n,r){var i;null!==(i=t)&&void 0!==i&&i.startsWith(he)||null===t||(r=n,n=t,t=null);const o=I.makeHtmlNotice(n,r);return this.sendMessage(e,t,o)}sendHtmlEmote(e,t,n,r){var i;null!==(i=t)&&void 0!==i&&i.startsWith(he)||null===t||(r=n,n=t,t=null);const o=I.makeHtmlEmote(n,r);return this.sendMessage(e,t,o)}async sendReceipt(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.isGuest())return Promise.resolve({});const i=p.o("/rooms/$roomId/receipt/$receiptType/$eventId",{$roomId:e.getRoomId(),$receiptType:t,$eventId:e.getId()});if(!r){const t=!!e.threadRootId;n=re(re({},n),{},{thread_id:t?e.threadRootId:$.a})}const o=this.http.authedRequest(S.i.Post,i,void 0,n||{}),a=this.getRoom(e.getRoomId());return a&&this.credentials.userId&&a.addLocalEchoReceipt(this.credentials.userId,e,t),o}async sendReadReceipt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$.b.Read,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e)return;const r=e.getId(),i=this.getRoom(e.getRoomId());if(null!=i&&i.hasPendingEvent(r))throw new Error(`Cannot set read receipt to a pending event (${r})`);return this.sendReceipt(e,t,{},n)}async setRoomReadMarkers(e,t,n,r){const i=this.getRoom(e);if(i&&i.hasPendingEvent(t))throw new Error(`Cannot set read marker to a pending event (${t})`);let o,a;if(n){if(o=n.getId(),null!=i&&i.hasPendingEvent(o))throw new Error(`Cannot set read receipt to a pending event (${o})`);null==i||i.addLocalEchoReceipt(this.credentials.userId,n,$.b.Read)}if(r){if(a=r.getId(),null!=i&&i.hasPendingEvent(a))throw new Error(`Cannot set read receipt to a pending event (${a})`);null==i||i.addLocalEchoReceipt(this.credentials.userId,r,$.b.ReadPrivate)}return await this.setRoomReadMarkersHttpRequest(e,t,o,a)}getUrlPreview(e,t){t=6e4*Math.floor(t/6e4);const n=new URL(e);n.hash="";const r=t+"_"+(e=n.toString()),i=this.urlPreviewCache[r];if(i)return i;const o=this.http.authedRequest(S.i.Get,"/preview_url",{url:e,ts:t.toString()},void 0,{prefix:S.h.R0});return this.urlPreviewCache[r]=o,o}sendTyping(e,t,n){if(this.isGuest())return Promise.resolve({});const r=p.o("/rooms/$roomId/typing/$userId",{$roomId:e,$userId:this.getUserId()}),i={typing:t};return t&&(i.timeout=n||2e4),this.http.authedRequest(S.i.Put,r,void 0,i)}getRoomUpgradeHistory(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=this.getRoom(e);if(!r)return[];return[...this.findPredecessorRooms(r,t,n),r,...this.findSuccessorRooms(r,t,n)]}findPredecessorRooms(e,t,n){var r;const i=[];let o=null===(r=e.findPredecessor(n))||void 0===r?void 0:r.roomId;for(;null!==o;){var a;const r=this.getRoom(o);if(null===r)break;if(t){const t=r.currentState.getStateEvents(N.b.RoomTombstone,"");if(!t||t.getContent().replacement_room!==e.roomId)break}i.splice(0,0,r),o=null===(a=(e=r).findPredecessor(n))||void 0===a?void 0:a.roomId}return i}findSuccessorRooms(e,t,n){const r=[];let i=e.currentState.getStateEvents(N.b.RoomTombstone,"");for(;i;){const a=this.getRoom(i.getContent().replacement_room);if(!a)break;if(a.roomId===e.roomId)break;if(t){var o;const t=null===(o=a.findPredecessor(n))||void 0===o?void 0:o.roomId;if(!t||t!==e.roomId)break}r.push(a);if(new Set(r.map((e=>e.roomId))).size<r.length)return r.slice(0,r.length-1);i=(e=a).currentState.getStateEvents(N.b.RoomTombstone,"")}return r}invite(e,t,n){return this.membershipChange(e,t,"invite",n)}inviteByEmail(e,t){return this.inviteByThreePid(e,"email",t)}async inviteByThreePid(e,t,n){var r;const i=p.o("/rooms/$roomId/invite",{$roomId:e}),o=this.getIdentityServerUrl(!0);if(!o)return Promise.reject(new S.f({error:"No supplied identity server URL",errcode:"ORG.MATRIX.JSSDK_MISSING_PARAM"}));const a={id_server:o,medium:t,address:n};if(null!==(r=this.identityServer)&&void 0!==r&&r.getAccessToken&&await this.doesServerAcceptIdentityAccessToken()){const e=await this.identityServer.getAccessToken();e&&(a.id_access_token=e)}return this.http.authedRequest(S.i.Post,i,void 0,a)}leave(e){return this.membershipChange(e,void 0,"leave")}leaveRoomChain(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=this.getRoomUpgradeHistory(e);let r=n;if(!t){r=[];for(const t of n)if(r.push(t),t.roomId===e)break}const i={},o=[],a=e=>this.leave(e).then((()=>{delete i[e]})).catch((t=>{i[e]=t}));for(const e of r)o.push(a(e.roomId));return Promise.all(o).then((()=>i))}ban(e,t,n){return this.membershipChange(e,t,"ban",n)}forget(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=this.membershipChange(e,void 0,"forget");return t?n.then((t=>(this.store.removeRoom(e),this.emit(pe.DeleteRoom,e),t))):n}unban(e,t){const n=p.o("/rooms/$roomId/unban",{$roomId:e}),r={user_id:t};return this.http.authedRequest(S.i.Post,n,void 0,r)}kick(e,t,n){const r=p.o("/rooms/$roomId/kick",{$roomId:e}),i={user_id:t,reason:n};return this.http.authedRequest(S.i.Post,r,void 0,i)}membershipChange(e,t,n,r){const i=p.o("/rooms/$room_id/$membership",{$room_id:e,$membership:n});return this.http.authedRequest(S.i.Post,i,void 0,{user_id:t,reason:r})}getPushActionsForEvent(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.getPushActions()&&!t||e.setPushActions(this.pushProcessor.actionsForEvent(e)),e.getPushActions()}setProfileInfo(e,t){const n=p.o("/profile/$userId/$info",{$userId:this.credentials.userId,$info:e});return this.http.authedRequest(S.i.Put,n,void 0,t)}async setDisplayName(e){const t=await this.setProfileInfo("displayname",{displayname:e}),n=this.getUser(this.getUserId());return n&&(n.displayName=e,n.emit(x.b.DisplayName,n.events.presence,n)),t}async setAvatarUrl(e){const t=await this.setProfileInfo("avatar_url",{avatar_url:e}),n=this.getUser(this.getUserId());return n&&(n.avatarUrl=e,n.emit(x.b.AvatarUrl,n.events.presence,n)),t}mxcUrlToHttp(e,t,n,r,i){return Object(F.a)(this.baseUrl,e,t,n,r,i)}async setPresence(e){const t=p.o("/presence/$userId/status",{$userId:this.credentials.userId});if(-1===["offline","online","unavailable"].indexOf(e.presence))throw new Error("Bad presence value: "+e.presence);await this.http.authedRequest(S.i.Put,t,void 0,e)}getPresence(e){const t=p.o("/presence/$userId/status",{$userId:e});return this.http.authedRequest(S.i.Get,t)}scrollback(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30,n=0,r=this.ongoingScrollbacks[e.roomId]||{};if(r.promise)return r.promise;if(r.errorTs){const e=Date.now()-r.errorTs;n=Math.max(3e3-e,0)}if(null===e.oldState.paginationToken)return Promise.resolve(e);const i=this.store.scrollback(e,t).length;if(i===t)return Promise.resolve(e);t-=i;const o=new Promise(((r,i)=>{Object(p.N)(n).then((()=>this.createMessagesRequest(e.roomId,e.oldState.paginationToken,t,m.a.Backward))).then((t=>{var n,i;const o=t.chunk.map(this.getEventMapper());if(t.state){const n=t.state.map(this.getEventMapper());e.currentState.setUnknownStateEvents(n)}const[a,s]=e.partitionThreadedEvents(o);this.processAggregatedTimelineEvents(e,a),e.addEventsToTimeline(a,!0,e.getLiveTimeline()),this.processThreadEvents(e,s,!0),e.oldState.paginationToken=null!==(n=t.end)&&void 0!==n?n:null,0===t.chunk.length&&(e.oldState.paginationToken=null),this.store.storeEvents(e,o,null!==(i=t.end)&&void 0!==i?i:null,!0),delete this.ongoingScrollbacks[e.roomId],r(e)})).catch((t=>{this.ongoingScrollbacks[e.roomId]={errorTs:Date.now()},i(t)}))}));return r={promise:o},this.ongoingScrollbacks[e.roomId]=r,o}getEventMapper(e){return Object(P.a)(this,e||{})}async getEventTimeline(e,t){var n,r,i,o;if(!this.timelineSupport)throw new Error("timeline support is disabled. Set the 'timelineSupport' parameter to true when creating MatrixClient to enable it.");if(null==e||!e.room)throw new Error("getEventTimeline only supports room timelines");if(e.getTimelineForEvent(t))return e.getTimelineForEvent(t);if(e.thread&&this.supportsThreads())return this.getThreadTimeline(e,t);const a=p.o("/rooms/$roomId/context/$eventId",{$roomId:e.room.roomId,$eventId:t});let s;null!==(n=this.clientOpts)&&void 0!==n&&n.lazyLoadMembers&&(s={filter:JSON.stringify(d.a.LAZY_LOADING_MESSAGES_FILTER)});const l=await this.http.authedRequest(S.i.Get,a,s);if(!l.event)throw new Error("'event' not in '/context' result - homeserver too old?");if(e.getTimelineForEvent(t))return e.getTimelineForEvent(t);const c=this.getEventMapper(),u=c(l.event);if(u.isRelation(W.d.name))return void y.a.warn("Tried loading a regular timeline at the position of a thread event");const h=[...l.events_after.reverse().map(c),u,...l.events_before.map(c)];let g=e.getTimelineForEvent(h[0].getId());g?g.getState(m.b.BACKWARDS).setUnknownStateEvents(l.state.map(c)):(g=e.addTimeline(),g.initialiseState(l.state.map(c)),g.getState(m.b.FORWARDS).paginationToken=l.end);const[f,_]=e.room.partitionThreadedEvents(h);return e.addEventsToTimeline(f,!0,g,l.start),this.processThreadEvents(e.room,_,!0),this.processAggregatedTimelineEvents(e.room,f),null!==(r=null!==(i=e.getTimelineForEvent(t))&&void 0!==i?i:null===(o=e.room.findThreadForEvent(u))||void 0===o?void 0:o.liveTimeline)&&void 0!==r?r:g}async getThreadTimeline(e,t){var n;if(!this.supportsThreads())throw new Error("could not get thread timeline: no client support");if(!e.room)throw new Error("could not get thread timeline: not a room timeline");if(!e.thread)throw new Error("could not get thread timeline: not a thread timeline");const r=p.o("/rooms/$roomId/context/$eventId",{$roomId:e.room.roomId,$eventId:t}),i={limit:"0"};null!==(n=this.clientOpts)&&void 0!==n&&n.lazyLoadMembers&&(i.filter=JSON.stringify(d.a.LAZY_LOADING_MESSAGES_FILTER));const o=await this.http.authedRequest(S.i.Get,r,i),a=this.getEventMapper(),s=a(o.event);if(e.canContain(s)&&W.e.hasServerSideSupport){if(W.e.hasServerSideFwdPaginationSupport){var l,c,u;if(!e.thread)throw new Error("could not get thread timeline: not a thread timeline");const n=e.thread,r=await this.fetchRelations(e.room.roomId,n.id,W.d.name,null,{dir:m.a.Backward,from:o.start}),i=await this.fetchRelations(e.room.roomId,n.id,W.d.name,null,{dir:m.a.Forward,from:o.end}),d=[...i.chunk.reverse().map(a),s,...r.chunk.map(a)];for(const t of d){var h;await(null===(h=e.thread)||void 0===h?void 0:h.processEvent(t))}let p=e.getTimelineForEvent(s.getId());if(p?p.getState(m.b.BACKWARDS).setUnknownStateEvents(o.state.map(a)):(p=e.addTimeline(),p.initialiseState(o.state.map(a))),e.addEventsToTimeline(d,!0,p,i.next_batch),!r.next_batch){const t=await this.fetchRoomEvent(e.room.roomId,n.id);e.addEventsToTimeline([a(t)],!0,p,null)}return p.setPaginationToken(null!==(l=r.next_batch)&&void 0!==l?l:null,m.a.Backward),p.setPaginationToken(null!==(c=i.next_batch)&&void 0!==c?c:null,m.a.Forward),this.processAggregatedTimelineEvents(e.room,d),null!==(u=e.getTimelineForEvent(t))&&void 0!==u?u:p}{var g;const t=e.thread,n=await this.fetchRelations(e.room.roomId,t.id,W.d.name,null,{dir:m.a.Backward,from:o.start}),r=[];let i=o.end;for(;i;){var f;const n=await this.fetchRelations(e.room.roomId,t.id,W.d.name,null,{dir:m.a.Forward,from:i});i=null!==(f=n.next_batch)&&void 0!==f?f:null,r.push(...n.chunk)}const l=[...r.reverse().map(a),s,...n.chunk.map(a)];for(const t of l){var _;await(null===(_=e.thread)||void 0===_?void 0:_.processEvent(t))}const c=e.getLiveTimeline();if(c.getState(m.b.BACKWARDS).setUnknownStateEvents(o.state.map(a)),e.addEventsToTimeline(l,!0,c,null),!n.next_batch){const n=await this.fetchRoomEvent(e.room.roomId,t.id);e.addEventsToTimeline([a(n)],!0,c,null)}return c.setPaginationToken(null!==(g=n.next_batch)&&void 0!==g?g:null,m.a.Backward),c.setPaginationToken(null,m.a.Forward),this.processAggregatedTimelineEvents(e.room,l),c}}}async getLatestTimeline(e){if(!this.timelineSupport)throw new Error("timeline support is disabled. Set the 'timelineSupport' parameter to true when creating MatrixClient to enable it.");if(!e.room)throw new Error("getLatestTimeline only supports room timelines");let t;if(null!==e.threadListType){var n;t=null===(n=(await this.createThreadListMessagesRequest(e.room.roomId,null,1,m.a.Backward,e.threadListType,e.getFilter())).chunk)||void 0===n?void 0:n[0]}else if(e.thread&&W.e.hasServerSideSupport){var r;t=null===(r=(await this.fetchRelations(e.room.roomId,e.thread.id,W.d.name,null,{dir:m.a.Backward,limit:1})).chunk)||void 0===r?void 0:r[0]}else{var i,o;const n=p.o("/rooms/$roomId/messages",{$roomId:e.room.roomId}),r={dir:"b"};null!==(i=this.clientOpts)&&void 0!==i&&i.lazyLoadMembers&&(r.filter=JSON.stringify(d.a.LAZY_LOADING_MESSAGES_FILTER));t=null===(o=(await this.http.authedRequest(S.i.Get,n,r)).chunk)||void 0===o?void 0:o[0]}if(!t)throw new Error("No message returned when trying to construct getLatestTimeline");return this.getEventTimeline(e,t.event_id)}createMessagesRequest(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:30,i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;const a=p.o("/rooms/$roomId/messages",{$roomId:e}),s={limit:r.toString(),dir:i};t&&(s.from=t);let l=null;var c;(null!==(n=this.clientOpts)&&void 0!==n&&n.lazyLoadMembers&&(l=Object.assign({},d.a.LAZY_LOADING_MESSAGES_FILTER)),o)&&(l=l||{},Object.assign(l,null===(c=o.getRoomTimelineFilterComponent())||void 0===c?void 0:c.toJSON()));return l&&(s.filter=JSON.stringify(l)),this.http.authedRequest(S.i.Get,a,s)}createThreadListMessagesRequest(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:30,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:m.a.Backward,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:W.g.All,a=arguments.length>5?arguments[5]:void 0;const s=p.o("/rooms/$roomId/threads",{$roomId:e}),l={limit:r.toString(),dir:i,include:Object(W.i)(o)};t&&(l.from=t);let c={};var u;(null!==(n=this.clientOpts)&&void 0!==n&&n.lazyLoadMembers&&(c=re({},d.a.LAZY_LOADING_MESSAGES_FILTER)),a)&&(c=re(re({},c),null===(u=a.getRoomTimelineFilterComponent())||void 0===u?void 0:u.toJSON()));Object.keys(c).length&&(l.filter=JSON.stringify(c));const h={prefix:W.e.hasServerSideListSupport===W.c.Stable?"/_matrix/client/v1":"/_matrix/client/unstable/org.matrix.msc3856"};return this.http.authedRequest(S.i.Get,s,l,void 0,h).then((e=>{var t;return re(re({},e),{},{chunk:null===(t=e.chunk)||void 0===t?void 0:t.reverse(),start:e.prev_batch,end:e.next_batch})}))}paginateEventTimeline(e,t){const n=e.getTimelineSet()===this.notifTimelineSet,r=this.getRoom(e.getRoomId()),i=e.getTimelineSet().threadListType,o=e.getTimelineSet().thread,a=(t=t||{}).backwards||!1;if(n&&!a)throw new Error("paginateNotifTimeline can only paginate backwards");const s=a?m.b.BACKWARDS:m.b.FORWARDS,l=e.getPaginationToken(s),c=e.paginationRequests[s];if(c)return c;let u,d,h;var f;if(n)u="/notifications",d={limit:(null!==(f=t.limit)&&void 0!==f?f:30).toString(),only:"highlight"},l&&"end"!==l&&(d.from=l),h=this.http.authedRequest(S.i.Get,"/notifications",d).then((async t=>{const n=t.next_token,r=[];t.notifications=t.notifications.filter(p.A);for(let e=0;e<t.notifications.length;e++){const n=t.notifications[e],i=this.getEventMapper()(n.event);i.setPushActions(g.a.actionListToActionsObject(n.actions)),i.event.room_id=n.room_id,r[e]=i}const i=e.getTimelineSet();return i.addEventsToTimeline(r,a,e,n),this.processAggregatedTimelineEvents(i.room,r),a&&!t.next_token&&e.setPaginationToken(null,s),Boolean(t.next_token)})).finally((()=>{e.paginationRequests[s]=null})),e.paginationRequests[s]=h;else if(null!==i){if(!r)throw new Error("Unknown room "+e.getRoomId());if(!W.e.hasServerSideFwdPaginationSupport&&s===m.a.Forward)throw new Error("Cannot paginate threads forwards without server-side support for MSC 3715");h=this.createThreadListMessagesRequest(e.getRoomId(),l,t.limit,s,i,e.getFilter()).then((t=>{if(t.state){const n=e.getState(s),r=t.state.filter(p.A).map(this.getEventMapper());n.setUnknownStateEvents(r)}const n=t.end,i=t.chunk.filter(p.A).map(this.getEventMapper());return e.getTimelineSet().addEventsToTimeline(i,a,e,n),this.processAggregatedTimelineEvents(r,i),this.processThreadRoots(r,i,a),a&&t.end==t.start&&e.setPaginationToken(null,s),t.end!==t.start})).finally((()=>{e.paginationRequests[s]=null})),e.paginationRequests[s]=h}else if(o){var _,b;const n=this.getRoom(null!==(_=e.getRoomId())&&void 0!==_?_:void 0);if(!n)throw new Error("Unknown room "+e.getRoomId());h=this.fetchRelations(null!==(b=e.getRoomId())&&void 0!==b?b:"",o.id,W.d.name,null,{dir:s,limit:t.limit,from:null!=l?l:void 0}).then((async t=>{const r=this.getEventMapper(),i=t.chunk.filter(p.A).map(r);for(const e of i.slice().reverse()){await(null==o?void 0:o.processEvent(e));const t=e.getSender();a&&null!==(null==o?void 0:o.getEventReadUpTo(t))||n.addLocalEchoReceipt(t,e,$.b.Read)}const l=t.next_batch,c=e.getTimelineSet();if(c.addEventsToTimeline(i,a,e,null!=l?l:null),!l&&a){var u;const t=await this.fetchRoomEvent(null!==(u=e.getRoomId())&&void 0!==u?u:"",o.id);c.addEventsToTimeline([r(t)],!0,e,null)}return this.processAggregatedTimelineEvents(c.room,i),a&&!l&&e.setPaginationToken(null,s),Boolean(l)})).finally((()=>{e.paginationRequests[s]=null})),e.paginationRequests[s]=h}else{if(!r)throw new Error("Unknown room "+e.getRoomId());h=this.createMessagesRequest(e.getRoomId(),l,t.limit,s,e.getFilter()).then((t=>{if(t.state){const n=e.getState(s),r=t.state.filter(p.A).map(this.getEventMapper());n.setUnknownStateEvents(r)}const n=t.end,i=t.chunk.filter(p.A).map(this.getEventMapper()),o=e.getTimelineSet(),[l]=r.partitionThreadedEvents(i);o.addEventsToTimeline(l,a,e,n),this.processAggregatedTimelineEvents(r,l),this.processThreadRoots(r,l.filter((e=>e.getServerAggregatedRelation(W.d.name))),!1);const c=void 0===t.end||t.end===t.start;return a&&c&&e.setPaginationToken(null,s),!c})).finally((()=>{e.paginationRequests[s]=null})),e.paginationRequests[s]=h}return h}resetNotifTimelineSet(){this.notifTimelineSet&&this.notifTimelineSet.resetLiveTimeline("end")}peekInRoom(e){var t;return null===(t=this.peekSync)||void 0===t||t.stopPeeking(),this.peekSync=new s.a(this,this.clientOpts,this.buildSyncApiOptions()),this.peekSync.peek(e)}stopPeeking(){this.peekSync&&(this.peekSync.stopPeeking(),this.peekSync=null)}setGuestAccess(e,t){const n=this.sendStateEvent(e,N.b.RoomGuestAccess,{guest_access:t.allowJoin?"can_join":"forbidden"},"");let r=Promise.resolve(void 0);return t.allowRead&&(r=this.sendStateEvent(e,N.b.RoomHistoryVisibility,{history_visibility:"world_readable"},"")),Promise.all([r,n]).then()}requestRegisterEmailToken(e,t,n,r){return this.requestTokenFromEndpoint("/register/email/requestToken",{email:e,client_secret:t,send_attempt:n,next_link:r})}requestRegisterMsisdnToken(e,t,n,r,i){return this.requestTokenFromEndpoint("/register/msisdn/requestToken",{country:e,phone_number:t,client_secret:n,send_attempt:r,next_link:i})}requestAdd3pidEmailToken(e,t,n,r){return this.requestTokenFromEndpoint("/account/3pid/email/requestToken",{email:e,client_secret:t,send_attempt:n,next_link:r})}requestAdd3pidMsisdnToken(e,t,n,r,i){return this.requestTokenFromEndpoint("/account/3pid/msisdn/requestToken",{country:e,phone_number:t,client_secret:n,send_attempt:r,next_link:i})}requestPasswordEmailToken(e,t,n,r){return this.requestTokenFromEndpoint("/account/password/email/requestToken",{email:e,client_secret:t,send_attempt:n,next_link:r})}requestPasswordMsisdnToken(e,t,n,r,i){return this.requestTokenFromEndpoint("/account/password/msisdn/requestToken",{country:e,phone_number:t,client_secret:n,send_attempt:r,next_link:i})}async requestTokenFromEndpoint(e,t){const n=Object.assign({},t);if(!await this.doesServerSupportSeparateAddAndBind()&&this.idBaseUrl){var r;const e=new URL(this.idBaseUrl);if(n.id_server=e.host,null!==(r=this.identityServer)&&void 0!==r&&r.getAccessToken&&await this.doesServerAcceptIdentityAccessToken()){const e=await this.identityServer.getAccessToken();e&&(n.id_access_token=e)}}return this.http.request(S.i.Post,e,void 0,n)}getRoomPushRule(e,t){var n,r;if(this.pushRules)return null===(n=this.pushRules[e])||void 0===n||null===(r=n.room)||void 0===r?void 0:r.find((e=>e.rule_id===t));throw new Error("SyncApi.sync() must be done before accessing to push rules.")}setRoomMutePushRule(e,t,n){let r,i=!1;const o=this.getRoomPushRule(e,t);if(null!=o&&o.actions.includes(G.d.DontNotify)&&(i=!0),n)if(o){if(!i){const n=p.m();this.deletePushRule(e,G.e.RoomSpecific,o.rule_id).then((()=>{this.addPushRule(e,G.e.RoomSpecific,t,{actions:[G.d.DontNotify]}).then((()=>{n.resolve()})).catch((e=>{n.reject(e)}))})).catch((e=>{n.reject(e)})),r=n.promise}}else r=this.addPushRule(e,G.e.RoomSpecific,t,{actions:[G.d.DontNotify]});else i&&(r=this.deletePushRule(e,G.e.RoomSpecific,o.rule_id));if(r)return new Promise(((e,t)=>{r.then((()=>{this.getPushRules().then((t=>{this.pushRules=t,e()})).catch((e=>{t(e)}))})).catch((e=>{this.getPushRules().then((n=>{this.pushRules=n,t(e)})).catch((n=>{t(e)}))}))}))}searchMessageText(e){const t={search_term:e.query};return"keys"in e&&(t.keys=e.keys),this.search({body:{search_categories:{room_events:t}}})}searchRoomEvents(e){const t={search_categories:{room_events:{search_term:e.term,filter:e.filter,order_by:j.a.Recent,event_context:{before_limit:1,after_limit:1,include_profile:!0}}}},n={_query:t,results:[],highlights:[]};return this.search({body:t}).then((e=>this.processRoomEventsSearch(n,e)))}backPaginateRoomEventsSearch(e){if(!e.next_batch)return Promise.reject(new Error("Cannot backpaginate event search any further"));if(e.pendingRequest)return e.pendingRequest;const t={body:e._query,next_batch:e.next_batch},n=this.search(t,e.abortSignal).then((t=>this.processRoomEventsSearch(e,t))).finally((()=>{e.pendingRequest=void 0}));return e.pendingRequest=n,n}processRoomEventsSearch(e,t){var n,r;const i=t.search_categories.room_events;e.count=i.count,e.next_batch=i.next_batch;const o=new Set(i.highlights);e.highlights.forEach((e=>{o.add(e)})),e.highlights=Array.from(o);const a=this.getEventMapper(),s=null!==(n=null===(r=i.results)||void 0===r?void 0:r.length)&&void 0!==n?n:0;for(let t=0;t<s;t++){const n=D.a.fromJson(i.results[t],a),r=this.getRoom(n.context.getEvent().getRoomId());if(r)for(const e of n.context.getTimeline()){const t=r.getMember(e.getSender());!e.sender&&t&&(e.sender=t)}e.results.push(n)}return e}syncLeftRooms(){if(this.syncedLeftRooms)return Promise.resolve([]);if(this.syncLeftRoomsPromise)return this.syncLeftRoomsPromise;const e=new s.a(this,this.clientOpts,this.buildSyncApiOptions());return this.syncLeftRoomsPromise=e.syncLeftRooms(),this.syncLeftRoomsPromise.then((()=>{y.a.log("Marking success of sync left room request"),this.syncedLeftRooms=!0})).finally((()=>{this.syncLeftRoomsPromise=void 0})),this.syncLeftRoomsPromise}createFilter(e){const t=p.o("/user/$userId/filter",{$userId:this.credentials.userId});return this.http.authedRequest(S.i.Post,t,void 0,e).then((t=>{const n=d.a.fromJson(this.credentials.userId,t.filter_id,e);return this.store.storeFilter(n),n}))}getFilter(e,t,n){if(n){const n=this.store.getFilter(e,t);if(n)return Promise.resolve(n)}const r=p.o("/user/$userId/filter/$filterId",{$userId:e,$filterId:t});return this.http.authedRequest(S.i.Get,r).then((n=>{const r=d.a.fromJson(e,t,n);return this.store.storeFilter(r),r}))}async getOrCreateFilter(e,t){const n=this.store.getFilterIdByName(e);let r;if(n){try{const e=await this.getFilter(this.credentials.userId,n,!0);if(e){const i=e.getDefinition(),o=t.getDefinition();p.j(i,o)&&(r=n)}}catch(e){if("M_UNKNOWN"!==e.errcode&&"M_NOT_FOUND"!==e.errcode)throw e}r||this.store.setFilterIdByName(e,void 0)}if(r)return r;const i=await this.createFilter(t.getDefinition());return this.store.setFilterIdByName(e,i.filterId),i.filterId}getOpenIdToken(){const e=p.o("/user/$userId/openid/request_token",{$userId:this.credentials.userId});return this.http.authedRequest(S.i.Post,e,void 0,{})}turnServer(){return this.http.authedRequest(S.i.Get,"/voip/turnServer")}getTurnServers(){return this.turnServers||[]}getTurnServersExpiry(){return this.turnServersExpiry}get pollingTurnServers(){return void 0!==this.checkTurnServersIntervalID}async checkTurnServers(){if(!this.canSupportVoip)return;let t=!1;const n=this.turnServersExpiry-Date.now();if(n>ae)y.a.debug("TURN creds are valid for another "+n+" ms: not fetching new ones."),t=!0;else{y.a.debug("Fetching new TURN credentials");try{const e=await this.turnServer();if(e.uris){y.a.log("Got TURN URIs: "+e.uris+" refresh in "+e.ttl+" secs");const n={urls:e.uris,username:e.username,credential:e.password};this.turnServers=[n],this.turnServersExpiry=Date.now()+1e3*e.ttl,t=!0,this.emit(pe.TurnServers,this.turnServers)}}catch(t){y.a.error("Failed to get TURN URIs",t),403===t.httpStatus?(y.a.info("TURN access unavailable for this account: stopping credentials checks"),null!==this.checkTurnServersIntervalID&&e.clearInterval(this.checkTurnServersIntervalID),this.checkTurnServersIntervalID=void 0,this.emit(pe.TurnServersError,t,!0)):this.emit(pe.TurnServersError,t,!1)}}return t}setFallbackICEServerAllowed(e){this.fallbackICEServerAllowed=e}isFallbackICEServerAllowed(){return this.fallbackICEServerAllowed}isSynapseAdministrator(){const e=p.o("/_synapse/admin/v1/users/$userId/admin",{$userId:this.getUserId()});return this.http.authedRequest(S.i.Get,e,void 0,void 0,{prefix:""}).then((e=>e.admin))}whoisSynapseUser(e){const t=p.o("/_synapse/admin/v1/whois/$userId",{$userId:e});return this.http.authedRequest(S.i.Get,t,void 0,void 0,{prefix:""})}deactivateSynapseUser(e){const t=p.o("/_synapse/admin/v1/deactivate/$userId",{$userId:e});return this.http.authedRequest(S.i.Post,t,void 0,void 0,{prefix:""})}async fetchClientWellKnown(){var e;this.clientWellKnownPromise=f.a.getRawClientConfig(null!==(e=this.getDomain())&&void 0!==e?e:void 0),this.clientWellKnown=await this.clientWellKnownPromise,this.emit(pe.ClientWellKnown,this.clientWellKnown)}getClientWellKnown(){return this.clientWellKnown}waitForClientWellKnown(){if(!this.clientRunning)throw new Error("Client is not running");return this.clientWellKnownPromise}storeClientOptions(){const e=["boolean","string","number"],t=Object.entries(this.clientOpts).filter((t=>{let[n,r]=t;return e.includes(typeof r)})).reduce(((e,t)=>{let[n,r]=t;return e[n]=r,e}),{});return this.store.storeClientOptions(t)}async _unstable_getSharedRooms(e){const t=await this.doesServerSupportUnstableFeature("uk.half-shot.msc2666"),n=await this.doesServerSupportUnstableFeature("uk.half-shot.msc2666.mutual_rooms");if(!t&&!n)throw Error("Server does not support mutual_rooms API");const r=p.o(`/uk.half-shot.msc2666/user/${n?"mutual_rooms":"shared_rooms"}/$userId`,{$userId:e});return(await this.http.authedRequest(S.i.Get,r,void 0,void 0,{prefix:S.a.Unstable})).joined}async getVersions(){if(this.serverVersionsPromise)return this.serverVersionsPromise;this.serverVersionsPromise=this.http.request(S.i.Get,"/_matrix/client/versions",void 0,void 0,{prefix:""}).catch((e=>{throw this.serverVersionsPromise=void 0,e}));const e=await this.serverVersionsPromise;return this.canSupport=await Object(J.c)(e),this.serverVersionsPromise}async isVersionSupported(e){const{versions:t}=await this.getVersions();return t&&t.includes(e)}async doesServerSupportLazyLoading(){const e=await this.getVersions();if(!e)return!1;const t=e.versions,n=e.unstable_features;return t&&t.includes("r0.5.0")||n&&n["m.lazy_load_members"]}async doesServerRequireIdServerParam(){const e=await this.getVersions();if(!e)return!0;const t=e.versions;if(t&&t.includes("r0.6.0"))return!1;const n=e.unstable_features;return!n||(void 0===n["m.require_identity_server"]||n["m.require_identity_server"])}async doesServerAcceptIdentityAccessToken(){const e=await this.getVersions();if(!e)return!1;const t=e.versions,n=e.unstable_features;return t&&t.includes("r0.6.0")||n&&n["m.id_access_token"]}async doesServerSupportSeparateAddAndBind(){const e=await this.getVersions();if(!e)return!1;const t=e.versions,n=e.unstable_features;return(null==t?void 0:t.includes("r0.6.0"))||(null==n?void 0:n["m.separate_add_and_bind"])}async doesServerSupportUnstableFeature(e){const t=await this.getVersions();if(!t)return!1;const n=t.unstable_features;return n&&!!n[e]}async doesServerForceEncryptionForPreset(e){const t=await this.getVersions();if(!t)return!1;const n=t.unstable_features,r=e.includes("_chat")?e.substring(0,e.indexOf("_chat")):e;return n&&!!n[`io.element.e2ee_forced.${r}`]}async doesServerSupportThread(){if(await this.isVersionSupported("v1.4"))return{threads:W.c.Stable,list:W.c.Stable,fwdPagination:W.c.Stable};try{const[e,t,n,r,i,o]=await Promise.all([this.doesServerSupportUnstableFeature("org.matrix.msc3440"),this.doesServerSupportUnstableFeature("org.matrix.msc3440.stable"),this.doesServerSupportUnstableFeature("org.matrix.msc3856"),this.doesServerSupportUnstableFeature("org.matrix.msc3856.stable"),this.doesServerSupportUnstableFeature("org.matrix.msc3715"),this.doesServerSupportUnstableFeature("org.matrix.msc3715.stable")]);return{threads:Object(W.h)(t,e),list:Object(W.h)(r,n),fwdPagination:Object(W.h)(o,i)}}catch(e){return{threads:W.c.None,list:W.c.None,fwdPagination:W.c.None}}}doesServerSupportLogoutDevices(){return this.isVersionSupported("r0.6.1")}hasLazyLoadMembersEnabled(){var e;return!(null===(e=this.clientOpts)||void 0===e||!e.lazyLoadMembers)}setCanResetTimelineCallback(e){this.canResetTimelineCallback=e}getCanResetTimelineCallback(){return this.canResetTimelineCallback}async relations(e,t,n,r){var i,o;let a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{dir:m.a.Backward};const s=r?this.getEncryptedIfNeededEventType(e,r):null,[l,c]=await Promise.all([this.fetchRoomEvent(e,t),this.fetchRelations(e,t,n,s,a)]),u=this.getEventMapper(),d=l?u(l):void 0;let h=c.chunk.map(u);if(s===N.b.RoomMessageEncrypted){const e=d?h.concat(d):h;await Promise.all(e.map((e=>this.decryptEventIfNeeded(e)))),null!==r&&(h=h.filter((e=>e.getType()===r)))}return d&&n===N.h.Replace&&(h=h.filter((e=>e.getSender()===d.getSender()))),{originalEvent:null!=d?d:null,events:h,nextBatch:null!==(i=c.next_batch)&&void 0!==i?i:null,prevBatch:null!==(o=c.prev_batch)&&void 0!==o?o:null}}getCrossSigningCacheCallbacks(){var e;return null===(e=this.crypto)||void 0===e?void 0:e.crossSigningInfo.getCacheCallbacks()}generateClientSecret(){return Object(L.b)(32)}decryptEventIfNeeded(e,t){return e.shouldAttemptDecryption()&&this.isCryptoEnabled()&&e.attemptDecryption(this.cryptoBackend,t),e.isBeingDecrypted()?e.getDecryptionPromise():Promise.resolve()}termsUrlForService(e,t){switch(e){case E.a.IS:return this.http.getUrl("/terms",void 0,S.e.V2,t);case E.a.IM:return this.http.getUrl("/terms",void 0,"/_matrix/integrations/v1",t);default:throw new Error("Unsupported service type")}}getHomeserverUrl(){return this.baseUrl}getIdentityServerUrl(){var e,t;return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&(null!==(e=this.idBaseUrl)&&void 0!==e&&e.startsWith("http://")||null!==(t=this.idBaseUrl)&&void 0!==t&&t.startsWith("https://"))?this.idBaseUrl.split("://")[1]:this.idBaseUrl}setIdentityServerUrl(e){this.idBaseUrl=p.p(e),this.http.setIdBaseUrl(this.idBaseUrl)}getAccessToken(){return this.http.opts.accessToken||null}setAccessToken(e){this.http.opts.accessToken=e}isLoggedIn(){return void 0!==this.http.opts.accessToken}makeTxnId(){return"m"+(new Date).getTime()+"."+this.txnCtr++}isUsernameAvailable(e){return this.http.authedRequest(S.i.Get,"/register/available",{username:e}).then((e=>e.available)).catch((e=>"M_USER_IN_USE"!==e.errcode&&Promise.reject(e)))}register(e,t,n,r,i,o,a){!0===i?i={email:!0}:null!=i&&!1!==i||(i={}),n&&(r.session=n);const s={auth:r,refresh_token:!0};return null!=e&&(s.username=e),null!=t&&(s.password=t),i.email&&(s.bind_email=!0),i.msisdn&&(s.bind_msisdn=!0),null!=o&&(s.guest_access_token=o),null!=a&&(s.inhibit_login=a),null!=t&&(s.x_show_msisdn=!0),this.registerRequest(s)}registerGuest(){let{body:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.registerRequest(e||{},"guest")}registerRequest(e,t){const n={};return t&&(n.kind=t),this.http.request(S.i.Post,"/register",n,e)}refreshToken(e){return this.http.authedRequest(S.i.Post,"/refresh",void 0,{refresh_token:e},{prefix:S.a.V1,inhibitLogoutEmit:!0})}loginFlows(){return this.http.request(S.i.Get,"/login")}login(e,t){const n={type:e};return Object.assign(n,t),this.http.authedRequest(S.i.Post,"/login",void 0,n).then((e=>(e.access_token&&e.user_id&&(this.http.opts.accessToken=e.access_token,this.credentials={userId:e.user_id}),e)))}loginWithPassword(e,t){return this.login("m.login.password",{user:e,password:t})}loginWithSAML2(e){return this.login("m.login.saml2",{relay_state:e})}getCasLoginUrl(e){return this.getSsoLoginUrl(e,"cas")}getSsoLoginUrl(e){let t=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,r="/login/"+(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"sso")+"/redirect";t&&(r+="/"+t);const i={redirectUrl:e,[me.unstable]:n};return this.http.getUrl(r,i,S.a.R0).href}loginWithToken(e){return this.login("m.login.token",{token:e})}async logout(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==(e=this.crypto)&&void 0!==e&&null!==(t=e.backupManager)&&void 0!==t&&t.getKeyBackupEnabled())try{for(;await this.crypto.backupManager.backupPendingKeys(200)>0;);}catch(e){y.a.error("Key backup request failed when logging out. Some keys may be missing from backup",e)}return n&&(this.stopClient(),this.http.abort()),this.http.authedRequest(S.i.Post,"/logout")}deactivateAccount(e,t){const n={};return e&&(n.auth=e),void 0!==t&&(n.erase=t),this.http.authedRequest(S.i.Post,"/account/deactivate",void 0,n)}requestLoginToken(e){const t={auth:e};return this.http.authedRequest(S.i.Post,"/org.matrix.msc3882/login/token",void 0,t,{prefix:S.a.Unstable})}getFallbackAuthUrl(e,t){const n=p.o("/auth/$loginType/fallback/web",{$loginType:e});return this.http.getUrl(n,{session:t},S.a.R0).href}async createRoom(e){var t;const n=(e.invite_3pid||[]).filter((e=>!e.id_access_token));if(n.length>0&&null!==(t=this.identityServer)&&void 0!==t&&t.getAccessToken&&await this.doesServerAcceptIdentityAccessToken()){const e=await this.identityServer.getAccessToken();if(e)for(const t of n)t.id_access_token=e}return this.http.authedRequest(S.i.Post,"/createRoom",void 0,e)}fetchRelations(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{dir:m.a.Backward};W.e.hasServerSideFwdPaginationSupport===W.c.Experimental&&(i=Object(p.K)("dir","org.matrix.msc3715.dir",i));const o=p.n(i);let a="/rooms/$roomId/relations/$eventId";null!==n?(a+="/$relationType",null!==r&&(a+="/$eventType")):null!==r&&(y.a.warn(`eventType: ${r} ignored when fetching\n relations as relationType is null`),r=null);const s=p.o(a+"?"+o,{$roomId:e,$eventId:t,$relationType:n,$eventType:r});return this.http.authedRequest(S.i.Get,s,void 0,void 0,{prefix:S.a.V1})}roomState(e){const t=p.o("/rooms/$roomId/state",{$roomId:e});return this.http.authedRequest(S.i.Get,t)}fetchRoomEvent(e,t){const n=p.o("/rooms/$roomId/event/$eventId",{$roomId:e,$eventId:t});return this.http.authedRequest(S.i.Get,n)}members(e,t,n,r){const i={};t&&(i.membership=t),n&&(i.not_membership=n),r&&(i.at=r);const o=p.n(i),a=p.o("/rooms/$roomId/members?"+o,{$roomId:e});return this.http.authedRequest(S.i.Get,a)}upgradeRoom(e,t){const n=p.o("/rooms/$roomId/upgrade",{$roomId:e});return this.http.authedRequest(S.i.Post,n,void 0,{new_version:t})}getStateEvent(e,t,n){const r={$roomId:e,$eventType:t,$stateKey:n};let i=p.o("/rooms/$roomId/state/$eventType",r);return void 0!==n&&(i=p.o(i+"/$stateKey",r)),this.http.authedRequest(S.i.Get,i)}sendStateEvent(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const o={$roomId:e,$eventType:t,$stateKey:r};let a=p.o("/rooms/$roomId/state/$eventType",o);return void 0!==r&&(a=p.o(a+"/$stateKey",o)),this.http.authedRequest(S.i.Put,a,void 0,n,i)}roomInitialSync(e,t){var n;const r=p.o("/rooms/$roomId/initialSync",{$roomId:e});return this.http.authedRequest(S.i.Get,r,{limit:null!==(n=null==t?void 0:t.toString())&&void 0!==n?n:"30"})}async setRoomReadMarkersHttpRequest(e,t,n,r){const i=p.o("/rooms/$roomId/read_markers",{$roomId:e}),o={[$.b.FullyRead]:t,[$.b.Read]:n};return(await this.doesServerSupportUnstableFeature("org.matrix.msc2285.stable")||await this.isVersionSupported("v1.4"))&&(o[$.b.ReadPrivate]=r),this.http.authedRequest(S.i.Post,i,void 0,o)}getJoinedRooms(){const e=p.o("/joined_rooms",{});return this.http.authedRequest(S.i.Get,e)}getJoinedRoomMembers(e){const t=p.o("/rooms/$roomId/joined_members",{$roomId:e});return this.http.authedRequest(S.i.Get,t)}publicRooms(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{server:t,limit:n,since:r}=e,o=i()(e,te);const a={server:t,limit:n,since:r};return 0===Object.keys(o).length?this.http.authedRequest(S.i.Get,"/publicRooms",a):this.http.authedRequest(S.i.Post,"/publicRooms",a,o)}createAlias(e,t){const n=p.o("/directory/room/$alias",{$alias:e}),r={room_id:t};return this.http.authedRequest(S.i.Put,n,void 0,r)}deleteAlias(e){const t=p.o("/directory/room/$alias",{$alias:e});return this.http.authedRequest(S.i.Delete,t)}getLocalAliases(e){const t=p.o("/rooms/$roomId/aliases",{$roomId:e}),n=S.a.V3;return this.http.authedRequest(S.i.Get,t,void 0,void 0,{prefix:n})}getRoomIdForAlias(e){const t=p.o("/directory/room/$alias",{$alias:e});return this.http.authedRequest(S.i.Get,t)}resolveRoomAlias(e){const t=p.o("/directory/room/$alias",{$alias:e});return this.http.request(S.i.Get,t)}getRoomDirectoryVisibility(e){const t=p.o("/directory/list/room/$roomId",{$roomId:e});return this.http.authedRequest(S.i.Get,t)}setRoomDirectoryVisibility(e,t){const n=p.o("/directory/list/room/$roomId",{$roomId:e});return this.http.authedRequest(S.i.Put,n,void 0,{visibility:t})}setRoomDirectoryVisibilityAppService(e,t,n){const r=p.o("/directory/list/appservice/$networkId/$roomId",{$networkId:e,$roomId:t});return this.http.authedRequest(S.i.Put,r,void 0,{visibility:n})}searchUserDirectory(e){let{term:t,limit:n}=e;const r={search_term:t};return void 0!==n&&(r.limit=n),this.http.authedRequest(S.i.Post,"/user_directory/search",void 0,r)}uploadContent(e,t){return this.http.uploadContent(e,t)}cancelUpload(e){return this.http.cancelUpload(e)}getCurrentUploads(){return this.http.getCurrentUploads()}getProfileInfo(e,t){const n=t?p.o("/profile/$userId/$info",{$userId:e,$info:t}):p.o("/profile/$userId",{$userId:e});return this.http.authedRequest(S.i.Get,n)}getThreePids(){return this.http.authedRequest(S.i.Get,"/account/3pid")}addThreePid(e,t){const n={threePidCreds:e,bind:t};return this.http.authedRequest(S.i.Post,"/account/3pid",void 0,n)}async addThreePidOnly(e){const t=await this.isVersionSupported("r0.6.0")?S.a.R0:S.a.Unstable;return this.http.authedRequest(S.i.Post,"/account/3pid/add",void 0,e,{prefix:t})}async bindThreePid(e){const t=await this.isVersionSupported("r0.6.0")?S.a.R0:S.a.Unstable;return this.http.authedRequest(S.i.Post,"/account/3pid/bind",void 0,e,{prefix:t})}async unbindThreePid(e,t){const n={medium:e,address:t,id_server:this.getIdentityServerUrl(!0)},r=await this.isVersionSupported("r0.6.0")?S.a.R0:S.a.Unstable;return this.http.authedRequest(S.i.Post,"/account/3pid/unbind",void 0,n,{prefix:r})}deleteThreePid(e,t){return this.http.authedRequest(S.i.Post,"/account/3pid/delete",void 0,{medium:e,address:t})}setPassword(e,t,n){const r={auth:e,new_password:t,logout_devices:n};return this.http.authedRequest(S.i.Post,"/account/password",void 0,r)}getDevices(){return this.http.authedRequest(S.i.Get,"/devices")}getDevice(e){const t=p.o("/devices/$device_id",{$device_id:e});return this.http.authedRequest(S.i.Get,t)}setDeviceDetails(e,t){const n=p.o("/devices/$device_id",{$device_id:e});return this.http.authedRequest(S.i.Put,n,void 0,t)}deleteDevice(e,t){const n=p.o("/devices/$device_id",{$device_id:e}),r={};return t&&(r.auth=t),this.http.authedRequest(S.i.Delete,n,void 0,r)}deleteMultipleDevices(e,t){const n={devices:e};t&&(n.auth=t);return this.http.authedRequest(S.i.Post,"/delete_devices",void 0,n)}async getPushers(){const e=await this.http.authedRequest(S.i.Get,"/pushers");return await this.doesServerSupportUnstableFeature("org.matrix.msc3881")||(e.pushers=e.pushers.map((e=>(e.hasOwnProperty(N.g.name)||(e[N.g.name]=!0),e)))),e}setPusher(e){return this.http.authedRequest(S.i.Post,"/pushers/set",void 0,e)}setLocalNotificationSettings(e,t){const n=`${N.c.name}.${e}`;return this.setAccountData(n,t)}getPushRules(){return this.http.authedRequest(S.i.Get,"/pushrules/").then((e=>(this.setPushRules(e),this.pushRules)))}setPushRules(e){this.pushRules=g.a.rewriteDefaultRules(e),this.pushProcessor.updateCachedPushRuleKeys(this.pushRules)}addPushRule(e,t,n,r){const i=p.o("/pushrules/"+e+"/$kind/$ruleId",{$kind:t,$ruleId:n});return this.http.authedRequest(S.i.Put,i,void 0,r)}deletePushRule(e,t,n){const r=p.o("/pushrules/"+e+"/$kind/$ruleId",{$kind:t,$ruleId:n});return this.http.authedRequest(S.i.Delete,r)}setPushRuleEnabled(e,t,n,r){const i=p.o("/pushrules/"+e+"/$kind/$ruleId/enabled",{$kind:t,$ruleId:n});return this.http.authedRequest(S.i.Put,i,void 0,{enabled:r})}setPushRuleActions(e,t,n,r){const i=p.o("/pushrules/"+e+"/$kind/$ruleId/actions",{$kind:t,$ruleId:n});return this.http.authedRequest(S.i.Put,i,void 0,{actions:r})}search(e,t){let{body:n,next_batch:r}=e;const i={};return r&&(i.next_batch=r),this.http.authedRequest(S.i.Post,"/search",i,n,{abortSignal:t})}uploadKeysRequest(e,t){return this.http.authedRequest(S.i.Post,"/keys/upload",void 0,e)}uploadKeySignatures(e){return this.http.authedRequest(S.i.Post,"/keys/signatures/upload",void 0,e,{prefix:S.a.V3})}downloadKeysForUsers(e){let{token:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={device_keys:{}};return void 0!==t&&(n.token=t),e.forEach((e=>{n.device_keys[e]=[]})),this.http.authedRequest(S.i.Post,"/keys/query",void 0,n)}claimOneTimeKeys(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"signed_curve25519",n=arguments.length>2?arguments[2]:void 0;const r={};void 0===t&&(t="signed_curve25519");for(const[n,i]of e){const e=r[n]||{};r[n]=e,e[i]=t}const i={one_time_keys:r};n&&(i.timeout=n);return this.http.authedRequest(S.i.Post,"/keys/claim",void 0,i)}getKeyChanges(e,t){const n={from:e,to:t};return this.http.authedRequest(S.i.Get,"/keys/changes",n)}uploadDeviceSigningKeys(e,t){const n=Object.assign({},t);return e&&Object.assign(n,{auth:e}),this.http.authedRequest(S.i.Post,"/keys/device_signing/upload",void 0,n,{prefix:S.a.Unstable})}registerWithIdentityServer(e){if(!this.idBaseUrl)throw new Error("No identity server base URL set");const t=this.http.getUrl("/account/register",void 0,S.e.V2,this.idBaseUrl);return this.http.requestOtherUrl(S.i.Post,t,e)}requestEmailToken(e,t,n,r,i){const o={client_secret:t,email:e,send_attempt:null==n?void 0:n.toString()};return r&&(o.next_link=r),this.http.idServerRequest(S.i.Post,"/validate/email/requestToken",o,S.e.V2,i)}requestMsisdnToken(e,t,n,r,i,o){const a={client_secret:n,country:e,phone_number:t,send_attempt:null==r?void 0:r.toString()};return i&&(a.next_link=i),this.http.idServerRequest(S.i.Post,"/validate/msisdn/requestToken",a,S.e.V2,o)}submitMsisdnToken(e,t,n,r){const i={sid:e,client_secret:t,token:n};return this.http.idServerRequest(S.i.Post,"/validate/msisdn/submitToken",i,S.e.V2,r)}submitMsisdnTokenOtherUrl(e,t,n,r){const i={sid:t,client_secret:n,token:r};return this.http.requestOtherUrl(S.i.Post,e,i)}getIdentityHashDetails(e){return this.http.idServerRequest(S.i.Get,"/hash_details",void 0,S.e.V2,e)}async identityHashedLookup(t,n){const r={},i=await this.getIdentityHashDetails(n);if(!i||!i.lookup_pepper||!i.algorithms)throw new Error("Unsupported identity server: bad response");r.pepper=i.lookup_pepper;const o={};if(i.algorithms.includes("sha256")){const n=new e.Olm.Utility;r.addresses=t.map((e=>{const t=e[0].toLowerCase(),i=e[1].toLowerCase(),a=n.sha256(`${t} ${i} ${r.pepper}`).replace(/\+/g,"-").replace(/\//g,"_");return o[a]=e[0],a})),r.algorithm="sha256"}else{if(!i.algorithms.includes("none"))throw new Error("Unsupported identity server: unknown hash algorithm");r.addresses=t.map((e=>{const t=`${e[0].toLowerCase()} ${e[1].toLowerCase()}`;return o[t]=e[0],t})),r.algorithm="none"}const a=await this.http.idServerRequest(S.i.Post,"/lookup",r,S.e.V2,n);if(null==a||!a.mappings)return[];const s=[];for(const e of Object.keys(a.mappings)){const t=a.mappings[e],n=o[e];if(!n)throw new Error("Identity server returned more results than expected");s.push({address:n,mxid:t})}return s}async lookupThreePid(e,t,n){const r=(await this.identityHashedLookup([[t,e]],n)).find((e=>e.address===t));if(!r)return{};return{address:t,medium:e,mxid:r.mxid}}async bulkLookupThreePids(e,t){const n=await this.identityHashedLookup(e.map((e=>[e[1],e[0]])),t),r=[];for(const t of n){const n=e.find((e=>e[1]===t.address));if(!n)throw new Error("Identity sever returned unexpected results");r.push([n[0],t.address,t.mxid])}return{threepids:r}}getIdentityAccount(e){return this.http.idServerRequest(S.i.Get,"/account",void 0,S.e.V2,e)}sendToDevice(e,t,n){const r=p.o("/sendToDevice/$eventType/$txnId",{$eventType:e,$txnId:n||this.makeTxnId()}),i={messages:p.F(t)},o=new Map;for(const[e,n]of t)o.set(e,Array.from(n.keys()));return y.a.log(`PUT ${r}`,o),this.http.authedRequest(S.i.Put,r,void 0,i)}queueToDevice(e){return this.toDeviceMessageQueue.queueBatch(e)}getThirdpartyProtocols(){return this.http.authedRequest(S.i.Get,"/thirdparty/protocols").then((e=>{if(!e||"object"!=typeof e)throw new Error(`/thirdparty/protocols did not return an object: ${e}`);return e}))}getThirdpartyLocation(e,t){const n=p.o("/thirdparty/location/$protocol",{$protocol:e});return this.http.authedRequest(S.i.Get,n,t)}getThirdpartyUser(e,t){const n=p.o("/thirdparty/user/$protocol",{$protocol:e});return this.http.authedRequest(S.i.Get,n,t)}getTerms(e,t){const n=this.termsUrlForService(e,t);return this.http.requestOtherUrl(S.i.Get,n)}agreeToTerms(e,t,n,r){const i=this.termsUrlForService(e,t),o={Authorization:"Bearer "+n};return this.http.requestOtherUrl(S.i.Post,i,{user_accepts:r},{headers:o})}reportEvent(e,t,n,r){const i=p.o("/rooms/$roomId/report/$eventId",{$roomId:e,$eventId:t});return this.http.authedRequest(S.i.Post,i,void 0,{score:n,reason:r})}getRoomHierarchy(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4?arguments[4]:void 0;const o=p.o("/rooms/$roomId/hierarchy",{$roomId:e}),a={suggested_only:String(r),max_depth:null==n?void 0:n.toString(),from:i,limit:null==t?void 0:t.toString()};return this.http.authedRequest(S.i.Get,o,a,void 0,{prefix:S.a.V1}).catch((e=>{if("M_UNRECOGNIZED"===e.errcode)return this.http.authedRequest(S.i.Get,o,a,void 0,{prefix:"/_matrix/client/unstable/org.matrix.msc2946"});throw e}))}async unstableCreateFileTree(e){const{room_id:t}=await this.createRoom({name:e,preset:M.d.PrivateChat,power_level_content_override:re(re({},U.a),{},{users:{[this.getUserId()]:100}}),creation_content:{[N.i]:N.j.Space},initial_state:[{type:N.o.name,state_key:N.r.name,content:{[N.n.name]:!0}},{type:N.b.RoomEncryption,state_key:"",content:{algorithm:_.MEGOLM_ALGORITHM}}]});return new U.b(this,t)}unstableGetFileTreeSpace(e){var t,n;const r=this.getRoom(e);if("join"!==(null==r?void 0:r.getMyMembership()))return null;const i=r.currentState.getStateEvents(N.b.RoomCreate,""),o=r.currentState.getStateEvents(N.o.name,N.r.name);if(!i)throw new Error("Expected single room create event");return null!=o&&null!==(t=o.getContent())&&void 0!==t&&t[N.n.name]?(null===(n=i.getContent())||void 0===n?void 0:n[N.i])!==N.j.Space?null:new U.b(this,e):null}slidingSync(e,t,n){const r={};e.pos&&(r.pos=e.pos,delete e.pos),e.timeout&&(r.timeout=e.timeout,delete e.timeout);const i=e.clientTimeout;return delete e.clientTimeout,this.http.authedRequest(S.i.Post,"/sync",r,e,{prefix:"/_matrix/client/unstable/org.matrix.msc3575",baseUrl:t,localTimeoutMs:i,abortSignal:n})}supportsExperimentalThreads(){var e;return y.a.warn("supportsExperimentalThreads() is deprecated, use supportThreads() instead"),(null===(e=this.clientOpts)||void 0===e?void 0:e.experimentalThreadSupport)||!1}supportsThreads(){var e;return(null===(e=this.clientOpts)||void 0===e?void 0:e.threadSupport)||!1}async getRoomSummary(e,t){const n=p.o("/rooms/$roomid/summary",{$roomid:e});return this.http.authedRequest(S.i.Get,n,{via:t},void 0,{prefix:"/_matrix/client/unstable/im.nheko.summary"})}processThreadEvents(e,t,n){e.processThreadedEvents(t,n)}processThreadRoots(e,t,n){e.processThreadRoots(t,n)}processBeaconEvents(e,t){this.processAggregatedTimelineEvents(e,t)}processAggregatedTimelineEvents(e,t){null!=t&&t.length&&e&&(e.currentState.processBeaconEvents(t,this),e.processPollEvents(t))}async whoami(){return this.http.authedRequest(S.i.Get,"/account/whoami")}async timestampToEvent(e,t,n){const r=p.o("/rooms/$roomId/timestamp_to_event",{$roomId:e}),i={ts:t.toString(),dir:n};try{return await this.http.authedRequest(S.i.Get,r,i,void 0,{prefix:S.a.V1})}catch(e){if("M_UNRECOGNIZED"===e.errcode&&(400===e.httpStatus||404===e.httpStatus||405===e.httpStatus))return await this.http.authedRequest(S.i.Get,r,i,void 0,{prefix:"/_matrix/client/unstable/org.matrix.msc3030"});throw e}}}function fe(e,t){var n,r;const i=e.getUserId(),o=t.getId(),a=e.getRoom(t.getRoomId());if(!a||!i||!o)return;const s=t.getPushActions(),l=e.getPushActionsForEvent(t,!0),c=!!t.threadRootId&&!t.isThreadRoot,u=a.getUnreadCountForEventContext(A.b.Highlight,t),d=!(null==s||null===(n=s.tweaks)||void 0===n||!n.highlight),h=!(null==l||null===(r=l.tweaks)||void 0===r||!r.highlight);let p;if(c){const e=a.getThread(t.threadRootId);p=!e||e.hasUserReadEvent(i,o)}else p=a.hasUserReadEvent(i,o);if(p)return;if(d!==h||u>0){let e=u;h&&!d&&e++,!h&&d&&e--,c?a.setThreadUnreadNotificationCount(t.threadRootId,A.b.Highlight,e):a.setUnreadNotificationCount(A.b.Highlight,e)}const m=a.getUnreadCountForEventContext(A.b.Total,t);!(null==l||!l.notify)&&(c?a.setThreadUnreadNotificationCount(t.threadRootId,A.b.Total,m+1):a.setUnreadNotificationCount(A.b.Total,m+1))}a()(ge,"RESTORE_BACKUP_ERROR_BAD_KEY","RESTORE_BACKUP_ERROR_BAD_KEY")}).call(this,n(14))},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(130),i=n.n(r),o=n(132),a=n.n(o),s=n(13),l=n.n(s),c=n(120),u=n.n(c),d=n(123),h=n(161);const p=["title","tooltip","children","tooltipClassName","forceHide","alignment","onHideTooltip"];class m extends u.a.PureComponent{constructor(e){super(e),l()(this,"showTooltip",(()=>{this.props.onHover&&this.props.onHover(!0),this.props.forceHide||this.setState({hover:!0})})),l()(this,"hideTooltip",(e=>{var t,n;this.props.onHover&&this.props.onHover(!1),this.setState({hover:!1}),null===(t=(n=this.props).onHideTooltip)||void 0===t||t.call(n,e)})),l()(this,"onFocus",(e=>{e.relatedTarget&&this.showTooltip()})),this.state={hover:!1}}componentDidUpdate(e){!e.forceHide&&this.props.forceHide&&this.state.hover&&this.setState({hover:!1})}render(){const e=this.props,{title:t,tooltip:n,children:r,tooltipClassName:o,forceHide:s,alignment:l,onHideTooltip:c}=e,m=a()(e,p),g=this.state.hover&&(t||n)&&u.a.createElement(h.b,{tooltipClassName:o,label:n||t,alignment:l});return u.a.createElement(d.a,i()({},m,{onMouseOver:this.showTooltip||m.onMouseOver,onMouseLeave:this.hideTooltip||m.onMouseLeave,onFocus:this.onFocus||m.onFocus,onBlur:this.hideTooltip||m.onBlur,"aria-label":t||m["aria-label"]}),r,this.props.label,(n||t)&&g)}}},function(e,t,n){(function(e,r){var i;(function(){var o,a=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",c="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",d=500,h="__lodash_placeholder__",p=1,m=2,g=4,f=1,_=2,b=1,v=2,y=4,E=8,S=16,w=32,T=64,C=128,x=256,F=512,D=30,k="...",O=800,I=16,A=1,R=2,N=1/0,M=9007199254740991,P=17976931348623157e292,L=NaN,B=4294967295,U=B-1,j=B>>>1,G=[["ary",C],["bind",b],["bindKey",v],["curry",E],["curryRight",S],["flip",F],["partial",w],["partialRight",T],["rearg",x]],z="[object Arguments]",H="[object Array]",q="[object AsyncFunction]",V="[object Boolean]",$="[object Date]",K="[object DOMException]",W="[object Error]",Y="[object Function]",Q="[object GeneratorFunction]",X="[object Map]",Z="[object Number]",J="[object Null]",ee="[object Object]",te="[object Promise]",ne="[object Proxy]",re="[object RegExp]",ie="[object Set]",oe="[object String]",ae="[object Symbol]",se="[object Undefined]",le="[object WeakMap]",ce="[object WeakSet]",ue="[object ArrayBuffer]",de="[object DataView]",he="[object Float32Array]",pe="[object Float64Array]",me="[object Int8Array]",ge="[object Int16Array]",fe="[object Int32Array]",_e="[object Uint8Array]",be="[object Uint8ClampedArray]",ve="[object Uint16Array]",ye="[object Uint32Array]",Ee=/\b__p \+= '';/g,Se=/\b(__p \+=) '' \+/g,we=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Te=/&(?:amp|lt|gt|quot|#39);/g,Ce=/[&<>"']/g,xe=RegExp(Te.source),Fe=RegExp(Ce.source),De=/<%-([\s\S]+?)%>/g,ke=/<%([\s\S]+?)%>/g,Oe=/<%=([\s\S]+?)%>/g,Ie=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ae=/^\w*$/,Re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ne=/[\\^$.*+?()[\]{}|]/g,Me=RegExp(Ne.source),Pe=/^\s+/,Le=/\s/,Be=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ue=/\{\n\/\* \[wrapped with (.+)\] \*/,je=/,? & /,Ge=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ze=/[()=,{}\[\]\/\s]/,He=/\\(\\)?/g,qe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ve=/\w*$/,$e=/^[-+]0x[0-9a-f]+$/i,Ke=/^0b[01]+$/i,We=/^\[object .+?Constructor\]$/,Ye=/^0o[0-7]+$/i,Qe=/^(?:0|[1-9]\d*)$/,Xe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ze=/($^)/,Je=/['\n\r\u2028\u2029\\]/g,et="\\ud800-\\udfff",tt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",nt="\\u2700-\\u27bf",rt="a-z\\xdf-\\xf6\\xf8-\\xff",it="A-Z\\xc0-\\xd6\\xd8-\\xde",ot="\\ufe0e\\ufe0f",at="\\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",st="['’]",lt="["+et+"]",ct="["+at+"]",ut="["+tt+"]",dt="\\d+",ht="["+nt+"]",pt="["+rt+"]",mt="[^"+et+at+dt+nt+rt+it+"]",gt="\\ud83c[\\udffb-\\udfff]",ft="[^"+et+"]",_t="(?:\\ud83c[\\udde6-\\uddff]){2}",bt="[\\ud800-\\udbff][\\udc00-\\udfff]",vt="["+it+"]",yt="\\u200d",Et="(?:"+pt+"|"+mt+")",St="(?:"+vt+"|"+mt+")",wt="(?:['’](?:d|ll|m|re|s|t|ve))?",Tt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ct="(?:"+ut+"|"+gt+")"+"?",xt="["+ot+"]?",Ft=xt+Ct+("(?:"+yt+"(?:"+[ft,_t,bt].join("|")+")"+xt+Ct+")*"),Dt="(?:"+[ht,_t,bt].join("|")+")"+Ft,kt="(?:"+[ft+ut+"?",ut,_t,bt,lt].join("|")+")",Ot=RegExp(st,"g"),It=RegExp(ut,"g"),At=RegExp(gt+"(?="+gt+")|"+kt+Ft,"g"),Rt=RegExp([vt+"?"+pt+"+"+wt+"(?="+[ct,vt,"$"].join("|")+")",St+"+"+Tt+"(?="+[ct,vt+Et,"$"].join("|")+")",vt+"?"+Et+"+"+wt,vt+"+"+Tt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",dt,Dt].join("|"),"g"),Nt=RegExp("["+yt+et+tt+ot+"]"),Mt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Pt=["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"],Lt=-1,Bt={};Bt[he]=Bt[pe]=Bt[me]=Bt[ge]=Bt[fe]=Bt[_e]=Bt[be]=Bt[ve]=Bt[ye]=!0,Bt[z]=Bt[H]=Bt[ue]=Bt[V]=Bt[de]=Bt[$]=Bt[W]=Bt[Y]=Bt[X]=Bt[Z]=Bt[ee]=Bt[re]=Bt[ie]=Bt[oe]=Bt[le]=!1;var Ut={};Ut[z]=Ut[H]=Ut[ue]=Ut[de]=Ut[V]=Ut[$]=Ut[he]=Ut[pe]=Ut[me]=Ut[ge]=Ut[fe]=Ut[X]=Ut[Z]=Ut[ee]=Ut[re]=Ut[ie]=Ut[oe]=Ut[ae]=Ut[_e]=Ut[be]=Ut[ve]=Ut[ye]=!0,Ut[W]=Ut[Y]=Ut[le]=!1;var jt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Gt=parseFloat,zt=parseInt,Ht="object"==typeof e&&e&&e.Object===Object&&e,qt="object"==typeof self&&self&&self.Object===Object&&self,Vt=Ht||qt||Function("return this")(),$t=t&&!t.nodeType&&t,Kt=$t&&"object"==typeof r&&r&&!r.nodeType&&r,Wt=Kt&&Kt.exports===$t,Yt=Wt&&Ht.process,Qt=function(){try{var e=Kt&&Kt.require&&Kt.require("util").types;return e||Yt&&Yt.binding&&Yt.binding("util")}catch(e){}}(),Xt=Qt&&Qt.isArrayBuffer,Zt=Qt&&Qt.isDate,Jt=Qt&&Qt.isMap,en=Qt&&Qt.isRegExp,tn=Qt&&Qt.isSet,nn=Qt&&Qt.isTypedArray;function rn(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 on(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function an(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function sn(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function ln(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function cn(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function un(e,t){return!!(null==e?0:e.length)&&yn(e,t,0)>-1}function dn(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function hn(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function pn(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function mn(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function gn(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function fn(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var _n=Tn("length");function bn(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function vn(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function yn(e,t,n){return t==t?function(e,t,n){var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):vn(e,Sn,n)}function En(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Sn(e){return e!=e}function wn(e,t){var n=null==e?0:e.length;return n?Fn(e,t)/n:L}function Tn(e){return function(t){return null==t?o:t[e]}}function Cn(e){return function(t){return null==e?o:e[t]}}function xn(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function Fn(e,t){for(var n,r=-1,i=e.length;++r<i;){var a=t(e[r]);a!==o&&(n=n===o?a:n+a)}return n}function Dn(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function kn(e){return e?e.slice(0,$n(e)+1).replace(Pe,""):e}function On(e){return function(t){return e(t)}}function In(e,t){return hn(t,(function(t){return e[t]}))}function An(e,t){return e.has(t)}function Rn(e,t){for(var n=-1,r=e.length;++n<r&&yn(t,e[n],0)>-1;);return n}function Nn(e,t){for(var n=e.length;n--&&yn(t,e[n],0)>-1;);return n}var Mn=Cn({"À":"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"}),Pn=Cn({"&":"&","<":"<",">":">",'"':""","'":"'"});function Ln(e){return"\\"+jt[e]}function Bn(e){return Nt.test(e)}function Un(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function jn(e,t){return function(n){return e(t(n))}}function Gn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&a!==h||(e[n]=h,o[i++]=n)}return o}function zn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function Hn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function qn(e){return Bn(e)?function(e){var t=At.lastIndex=0;for(;At.test(e);)++t;return t}(e):_n(e)}function Vn(e){return Bn(e)?function(e){return e.match(At)||[]}(e):function(e){return e.split("")}(e)}function $n(e){for(var t=e.length;t--&&Le.test(e.charAt(t)););return t}var Kn=Cn({"&":"&","<":"<",">":">",""":'"',"'":"'"});var Wn=function e(t){var n,r=(t=null==t?Vt:Wn.defaults(Vt.Object(),t,Wn.pick(Vt,Pt))).Array,i=t.Date,Le=t.Error,et=t.Function,tt=t.Math,nt=t.Object,rt=t.RegExp,it=t.String,ot=t.TypeError,at=r.prototype,st=et.prototype,lt=nt.prototype,ct=t["__core-js_shared__"],ut=st.toString,dt=lt.hasOwnProperty,ht=0,pt=(n=/[^.]+$/.exec(ct&&ct.keys&&ct.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",mt=lt.toString,gt=ut.call(nt),ft=Vt._,_t=rt("^"+ut.call(dt).replace(Ne,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),bt=Wt?t.Buffer:o,vt=t.Symbol,yt=t.Uint8Array,Et=bt?bt.allocUnsafe:o,St=jn(nt.getPrototypeOf,nt),wt=nt.create,Tt=lt.propertyIsEnumerable,Ct=at.splice,xt=vt?vt.isConcatSpreadable:o,Ft=vt?vt.iterator:o,Dt=vt?vt.toStringTag:o,kt=function(){try{var e=zo(nt,"defineProperty");return e({},"",{}),e}catch(e){}}(),At=t.clearTimeout!==Vt.clearTimeout&&t.clearTimeout,Nt=i&&i.now!==Vt.Date.now&&i.now,jt=t.setTimeout!==Vt.setTimeout&&t.setTimeout,Ht=tt.ceil,qt=tt.floor,$t=nt.getOwnPropertySymbols,Kt=bt?bt.isBuffer:o,Yt=t.isFinite,Qt=at.join,_n=jn(nt.keys,nt),Cn=tt.max,Yn=tt.min,Qn=i.now,Xn=t.parseInt,Zn=tt.random,Jn=at.reverse,er=zo(t,"DataView"),tr=zo(t,"Map"),nr=zo(t,"Promise"),rr=zo(t,"Set"),ir=zo(t,"WeakMap"),or=zo(nt,"create"),ar=ir&&new ir,sr={},lr=ma(er),cr=ma(tr),ur=ma(nr),dr=ma(rr),hr=ma(ir),pr=vt?vt.prototype:o,mr=pr?pr.valueOf:o,gr=pr?pr.toString:o;function fr(e){if(Is(e)&&!ys(e)&&!(e instanceof yr)){if(e instanceof vr)return e;if(dt.call(e,"__wrapped__"))return ga(e)}return new vr(e)}var _r=function(){function e(){}return function(t){if(!Os(t))return{};if(wt)return wt(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function br(){}function vr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function yr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=B,this.__views__=[]}function Er(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Sr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function wr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Tr(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new wr;++t<n;)this.add(e[t])}function Cr(e){var t=this.__data__=new Sr(e);this.size=t.size}function xr(e,t){var n=ys(e),r=!n&&vs(e),i=!n&&!r&&Ts(e),o=!n&&!r&&!i&&Us(e),a=n||r||i||o,s=a?Dn(e.length,it):[],l=s.length;for(var c in e)!t&&!dt.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Yo(c,l))||s.push(c);return s}function Fr(e){var t=e.length;return t?e[Ti(0,t-1)]:o}function Dr(e,t){return da(oo(e),Lr(t,0,e.length))}function kr(e){return da(oo(e))}function Or(e,t,n){(n!==o&&!fs(e[t],n)||n===o&&!(t in e))&&Mr(e,t,n)}function Ir(e,t,n){var r=e[t];dt.call(e,t)&&fs(r,n)&&(n!==o||t in e)||Mr(e,t,n)}function Ar(e,t){for(var n=e.length;n--;)if(fs(e[n][0],t))return n;return-1}function Rr(e,t,n,r){return zr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function Nr(e,t){return e&&ao(t,sl(t),e)}function Mr(e,t,n){"__proto__"==t&&kt?kt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Pr(e,t){for(var n=-1,i=t.length,a=r(i),s=null==e;++n<i;)a[n]=s?o:nl(e,t[n]);return a}function Lr(e,t,n){return e==e&&(n!==o&&(e=e<=n?e:n),t!==o&&(e=e>=t?e:t)),e}function Br(e,t,n,r,i,a){var s,l=t&p,c=t&m,u=t&g;if(n&&(s=i?n(e,r,i,a):n(e)),s!==o)return s;if(!Os(e))return e;var d=ys(e);if(d){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&dt.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!l)return oo(e,s)}else{var h=Vo(e),f=h==Y||h==Q;if(Ts(e))return Ji(e,l);if(h==ee||h==z||f&&!i){if(s=c||f?{}:Ko(e),!l)return c?function(e,t){return ao(e,qo(e),t)}(e,function(e,t){return e&&ao(t,ll(t),e)}(s,e)):function(e,t){return ao(e,Ho(e),t)}(e,Nr(s,e))}else{if(!Ut[h])return i?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case ue:return eo(e);case V:case $:return new r(+e);case de:return function(e,t){var n=t?eo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case he:case pe:case me:case ge:case fe:case _e:case be:case ve:case ye:return to(e,n);case X:return new r;case Z:case oe:return new r(e);case re:return function(e){var t=new e.constructor(e.source,Ve.exec(e));return t.lastIndex=e.lastIndex,t}(e);case ie:return new r;case ae:return i=e,mr?nt(mr.call(i)):{}}var i}(e,h,l)}}a||(a=new Cr);var _=a.get(e);if(_)return _;a.set(e,s),Ps(e)?e.forEach((function(r){s.add(Br(r,t,n,r,e,a))})):As(e)&&e.forEach((function(r,i){s.set(i,Br(r,t,n,i,e,a))}));var b=d?o:(u?c?Mo:No:c?ll:sl)(e);return an(b||e,(function(r,i){b&&(r=e[i=r]),Ir(s,i,Br(r,t,n,i,e,a))})),s}function Ur(e,t,n){var r=n.length;if(null==e)return!r;for(e=nt(e);r--;){var i=n[r],a=t[i],s=e[i];if(s===o&&!(i in e)||!a(s))return!1}return!0}function jr(e,t,n){if("function"!=typeof e)throw new ot(l);return sa((function(){e.apply(o,n)}),t)}function Gr(e,t,n,r){var i=-1,o=un,s=!0,l=e.length,c=[],u=t.length;if(!l)return c;n&&(t=hn(t,On(n))),r?(o=dn,s=!1):t.length>=a&&(o=An,s=!1,t=new Tr(t));e:for(;++i<l;){var d=e[i],h=null==n?d:n(d);if(d=r||0!==d?d:0,s&&h==h){for(var p=u;p--;)if(t[p]===h)continue e;c.push(d)}else o(t,h,r)||c.push(d)}return c}fr.templateSettings={escape:De,evaluate:ke,interpolate:Oe,variable:"",imports:{_:fr}},fr.prototype=br.prototype,fr.prototype.constructor=fr,vr.prototype=_r(br.prototype),vr.prototype.constructor=vr,yr.prototype=_r(br.prototype),yr.prototype.constructor=yr,Er.prototype.clear=function(){this.__data__=or?or(null):{},this.size=0},Er.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Er.prototype.get=function(e){var t=this.__data__;if(or){var n=t[e];return n===u?o:n}return dt.call(t,e)?t[e]:o},Er.prototype.has=function(e){var t=this.__data__;return or?t[e]!==o:dt.call(t,e)},Er.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=or&&t===o?u:t,this},Sr.prototype.clear=function(){this.__data__=[],this.size=0},Sr.prototype.delete=function(e){var t=this.__data__,n=Ar(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ct.call(t,n,1),--this.size,!0)},Sr.prototype.get=function(e){var t=this.__data__,n=Ar(t,e);return n<0?o:t[n][1]},Sr.prototype.has=function(e){return Ar(this.__data__,e)>-1},Sr.prototype.set=function(e,t){var n=this.__data__,r=Ar(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},wr.prototype.clear=function(){this.size=0,this.__data__={hash:new Er,map:new(tr||Sr),string:new Er}},wr.prototype.delete=function(e){var t=jo(this,e).delete(e);return this.size-=t?1:0,t},wr.prototype.get=function(e){return jo(this,e).get(e)},wr.prototype.has=function(e){return jo(this,e).has(e)},wr.prototype.set=function(e,t){var n=jo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Tr.prototype.add=Tr.prototype.push=function(e){return this.__data__.set(e,u),this},Tr.prototype.has=function(e){return this.__data__.has(e)},Cr.prototype.clear=function(){this.__data__=new Sr,this.size=0},Cr.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Cr.prototype.get=function(e){return this.__data__.get(e)},Cr.prototype.has=function(e){return this.__data__.has(e)},Cr.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Sr){var r=n.__data__;if(!tr||r.length<a-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new wr(r)}return n.set(e,t),this.size=n.size,this};var zr=co(Qr),Hr=co(Xr,!0);function qr(e,t){var n=!0;return zr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function Vr(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],s=t(a);if(null!=s&&(l===o?s==s&&!Bs(s):n(s,l)))var l=s,c=a}return c}function $r(e,t){var n=[];return zr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function Kr(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=Wo),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?Kr(s,t-1,n,r,i):pn(i,s):r||(i[i.length]=s)}return i}var Wr=uo(),Yr=uo(!0);function Qr(e,t){return e&&Wr(e,t,sl)}function Xr(e,t){return e&&Yr(e,t,sl)}function Zr(e,t){return cn(t,(function(t){return Fs(e[t])}))}function Jr(e,t){for(var n=0,r=(t=Yi(t,e)).length;null!=e&&n<r;)e=e[pa(t[n++])];return n&&n==r?e:o}function ei(e,t,n){var r=t(e);return ys(e)?r:pn(r,n(e))}function ti(e){return null==e?e===o?se:J:Dt&&Dt in nt(e)?function(e){var t=dt.call(e,Dt),n=e[Dt];try{e[Dt]=o;var r=!0}catch(e){}var i=mt.call(e);r&&(t?e[Dt]=n:delete e[Dt]);return i}(e):function(e){return mt.call(e)}(e)}function ni(e,t){return e>t}function ri(e,t){return null!=e&&dt.call(e,t)}function ii(e,t){return null!=e&&t in nt(e)}function oi(e,t,n){for(var i=n?dn:un,a=e[0].length,s=e.length,l=s,c=r(s),u=1/0,d=[];l--;){var h=e[l];l&&t&&(h=hn(h,On(t))),u=Yn(h.length,u),c[l]=!n&&(t||a>=120&&h.length>=120)?new Tr(l&&h):o}h=e[0];var p=-1,m=c[0];e:for(;++p<a&&d.length<u;){var g=h[p],f=t?t(g):g;if(g=n||0!==g?g:0,!(m?An(m,f):i(d,f,n))){for(l=s;--l;){var _=c[l];if(!(_?An(_,f):i(e[l],f,n)))continue e}m&&m.push(f),d.push(g)}}return d}function ai(e,t,n){var r=null==(e=ia(e,t=Yi(t,e)))?e:e[pa(xa(t))];return null==r?o:rn(r,e,n)}function si(e){return Is(e)&&ti(e)==z}function li(e,t,n,r,i){return e===t||(null==e||null==t||!Is(e)&&!Is(t)?e!=e&&t!=t:function(e,t,n,r,i,a){var s=ys(e),l=ys(t),c=s?H:Vo(e),u=l?H:Vo(t),d=(c=c==z?ee:c)==ee,h=(u=u==z?ee:u)==ee,p=c==u;if(p&&Ts(e)){if(!Ts(t))return!1;s=!0,d=!1}if(p&&!d)return a||(a=new Cr),s||Us(e)?Ao(e,t,n,r,i,a):function(e,t,n,r,i,o,a){switch(n){case de:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case ue:return!(e.byteLength!=t.byteLength||!o(new yt(e),new yt(t)));case V:case $:case Z:return fs(+e,+t);case W:return e.name==t.name&&e.message==t.message;case re:case oe:return e==t+"";case X:var s=Un;case ie:var l=r&f;if(s||(s=zn),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=_,a.set(e,t);var u=Ao(s(e),s(t),r,i,o,a);return a.delete(e),u;case ae:if(mr)return mr.call(e)==mr.call(t)}return!1}(e,t,c,n,r,i,a);if(!(n&f)){var m=d&&dt.call(e,"__wrapped__"),g=h&&dt.call(t,"__wrapped__");if(m||g){var b=m?e.value():e,v=g?t.value():t;return a||(a=new Cr),i(b,v,n,r,a)}}if(!p)return!1;return a||(a=new Cr),function(e,t,n,r,i,a){var s=n&f,l=No(e),c=l.length,u=No(t),d=u.length;if(c!=d&&!s)return!1;var h=c;for(;h--;){var p=l[h];if(!(s?p in t:dt.call(t,p)))return!1}var m=a.get(e),g=a.get(t);if(m&&g)return m==t&&g==e;var _=!0;a.set(e,t),a.set(t,e);var b=s;for(;++h<c;){var v=e[p=l[h]],y=t[p];if(r)var E=s?r(y,v,p,t,e,a):r(v,y,p,e,t,a);if(!(E===o?v===y||i(v,y,n,r,a):E)){_=!1;break}b||(b="constructor"==p)}if(_&&!b){var S=e.constructor,w=t.constructor;S==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof S&&S instanceof S&&"function"==typeof w&&w instanceof w||(_=!1)}return a.delete(e),a.delete(t),_}(e,t,n,r,i,a)}(e,t,n,r,li,i))}function ci(e,t,n,r){var i=n.length,a=i,s=!r;if(null==e)return!a;for(e=nt(e);i--;){var l=n[i];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<a;){var c=(l=n[i])[0],u=e[c],d=l[1];if(s&&l[2]){if(u===o&&!(c in e))return!1}else{var h=new Cr;if(r)var p=r(u,d,c,e,t,h);if(!(p===o?li(d,u,f|_,r,h):p))return!1}}return!0}function ui(e){return!(!Os(e)||(t=e,pt&&pt in t))&&(Fs(e)?_t:We).test(ma(e));var t}function di(e){return"function"==typeof e?e:null==e?Rl:"object"==typeof e?ys(e)?_i(e[0],e[1]):fi(e):zl(e)}function hi(e){if(!ea(e))return _n(e);var t=[];for(var n in nt(e))dt.call(e,n)&&"constructor"!=n&&t.push(n);return t}function pi(e){if(!Os(e))return function(e){var t=[];if(null!=e)for(var n in nt(e))t.push(n);return t}(e);var t=ea(e),n=[];for(var r in e)("constructor"!=r||!t&&dt.call(e,r))&&n.push(r);return n}function mi(e,t){return e<t}function gi(e,t){var n=-1,i=Ss(e)?r(e.length):[];return zr(e,(function(e,r,o){i[++n]=t(e,r,o)})),i}function fi(e){var t=Go(e);return 1==t.length&&t[0][2]?na(t[0][0],t[0][1]):function(n){return n===e||ci(n,e,t)}}function _i(e,t){return Xo(e)&&ta(t)?na(pa(e),t):function(n){var r=nl(n,e);return r===o&&r===t?rl(n,e):li(t,r,f|_)}}function bi(e,t,n,r,i){e!==t&&Wr(t,(function(a,s){if(i||(i=new Cr),Os(a))!function(e,t,n,r,i,a,s){var l=oa(e,n),c=oa(t,n),u=s.get(c);if(u)return void Or(e,n,u);var d=a?a(l,c,n+"",e,t,s):o,h=d===o;if(h){var p=ys(c),m=!p&&Ts(c),g=!p&&!m&&Us(c);d=c,p||m||g?ys(l)?d=l:ws(l)?d=oo(l):m?(h=!1,d=Ji(c,!0)):g?(h=!1,d=to(c,!0)):d=[]:Ns(c)||vs(c)?(d=l,vs(l)?d=Ks(l):Os(l)&&!Fs(l)||(d=Ko(c))):h=!1}h&&(s.set(c,d),i(d,c,r,a,s),s.delete(c));Or(e,n,d)}(e,t,s,n,bi,r,i);else{var l=r?r(oa(e,s),a,s+"",e,t,i):o;l===o&&(l=a),Or(e,s,l)}}),ll)}function vi(e,t){var n=e.length;if(n)return Yo(t+=t<0?n:0,n)?e[t]:o}function yi(e,t,n){t=t.length?hn(t,(function(e){return ys(e)?function(t){return Jr(t,1===e.length?e[0]:e)}:e})):[Rl];var r=-1;t=hn(t,On(Uo()));var i=gi(e,(function(e,n,i){var o=hn(t,(function(t){return t(e)}));return{criteria:o,index:++r,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(i,(function(e,t){return function(e,t,n){var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;for(;++r<a;){var l=no(i[r],o[r]);if(l)return r>=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Ei(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=Jr(e,a);n(s,a)&&ki(o,Yi(a,e),s)}return o}function Si(e,t,n,r){var i=r?En:yn,o=-1,a=t.length,s=e;for(e===t&&(t=oo(t)),n&&(s=hn(e,On(n)));++o<a;)for(var l=0,c=t[o],u=n?n(c):c;(l=i(s,u,l,r))>-1;)s!==e&&Ct.call(s,l,1),Ct.call(e,l,1);return e}function wi(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;Yo(i)?Ct.call(e,i,1):Gi(e,i)}}return e}function Ti(e,t){return e+qt(Zn()*(t-e+1))}function Ci(e,t){var n="";if(!e||t<1||t>M)return n;do{t%2&&(n+=e),(t=qt(t/2))&&(e+=e)}while(t);return n}function xi(e,t){return la(ra(e,t,Rl),e+"")}function Fi(e){return Fr(fl(e))}function Di(e,t){var n=fl(e);return da(n,Lr(t,0,n.length))}function ki(e,t,n,r){if(!Os(e))return e;for(var i=-1,a=(t=Yi(t,e)).length,s=a-1,l=e;null!=l&&++i<a;){var c=pa(t[i]),u=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(i!=s){var d=l[c];(u=r?r(d,c,l):o)===o&&(u=Os(d)?d:Yo(t[i+1])?[]:{})}Ir(l,c,u),l=l[c]}return e}var Oi=ar?function(e,t){return ar.set(e,t),e}:Rl,Ii=kt?function(e,t){return kt(e,"toString",{configurable:!0,enumerable:!1,value:Ol(t),writable:!0})}:Rl;function Ai(e){return da(fl(e))}function Ri(e,t,n){var i=-1,o=e.length;t<0&&(t=-t>o?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<o;)a[i]=e[i+t];return a}function Ni(e,t){var n;return zr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function Mi(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=j){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!Bs(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return Pi(e,t,Rl,n)}function Pi(e,t,n,r){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=n(t))!=t,l=null===t,c=Bs(t),u=t===o;i<a;){var d=qt((i+a)/2),h=n(e[d]),p=h!==o,m=null===h,g=h==h,f=Bs(h);if(s)var _=r||g;else _=u?g&&(r||p):l?g&&p&&(r||!m):c?g&&p&&!m&&(r||!f):!m&&!f&&(r?h<=t:h<t);_?i=d+1:a=d}return Yn(a,U)}function Li(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!fs(s,l)){var l=s;o[i++]=0===a?0:a}}return o}function Bi(e){return"number"==typeof e?e:Bs(e)?L:+e}function Ui(e){if("string"==typeof e)return e;if(ys(e))return hn(e,Ui)+"";if(Bs(e))return gr?gr.call(e):"";var t=e+"";return"0"==t&&1/e==-N?"-0":t}function ji(e,t,n){var r=-1,i=un,o=e.length,s=!0,l=[],c=l;if(n)s=!1,i=dn;else if(o>=a){var u=t?null:xo(e);if(u)return zn(u);s=!1,i=An,c=new Tr}else c=t?[]:l;e:for(;++r<o;){var d=e[r],h=t?t(d):d;if(d=n||0!==d?d:0,s&&h==h){for(var p=c.length;p--;)if(c[p]===h)continue e;t&&c.push(h),l.push(d)}else i(c,h,n)||(c!==l&&c.push(h),l.push(d))}return l}function Gi(e,t){return null==(e=ia(e,t=Yi(t,e)))||delete e[pa(xa(t))]}function zi(e,t,n,r){return ki(e,t,n(Jr(e,t)),r)}function Hi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?Ri(e,r?0:o,r?o+1:i):Ri(e,r?o+1:0,r?i:o)}function qi(e,t){var n=e;return n instanceof yr&&(n=n.value()),mn(t,(function(e,t){return t.func.apply(t.thisArg,pn([e],t.args))}),n)}function Vi(e,t,n){var i=e.length;if(i<2)return i?ji(e[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=e[o],l=-1;++l<i;)l!=o&&(a[o]=Gr(a[o]||s,e[l],t,n));return ji(Kr(a,1),t,n)}function $i(e,t,n){for(var r=-1,i=e.length,a=t.length,s={};++r<i;){var l=r<a?t[r]:o;n(s,e[r],l)}return s}function Ki(e){return ws(e)?e:[]}function Wi(e){return"function"==typeof e?e:Rl}function Yi(e,t){return ys(e)?e:Xo(e,t)?[e]:ha(Ws(e))}var Qi=xi;function Xi(e,t,n){var r=e.length;return n=n===o?r:n,!t&&n>=r?e:Ri(e,t,n)}var Zi=At||function(e){return Vt.clearTimeout(e)};function Ji(e,t){if(t)return e.slice();var n=e.length,r=Et?Et(n):new e.constructor(n);return e.copy(r),r}function eo(e){var t=new e.constructor(e.byteLength);return new yt(t).set(new yt(e)),t}function to(e,t){var n=t?eo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function no(e,t){if(e!==t){var n=e!==o,r=null===e,i=e==e,a=Bs(e),s=t!==o,l=null===t,c=t==t,u=Bs(t);if(!l&&!u&&!a&&e>t||a&&s&&c&&!l&&!u||r&&s&&c||!n&&c||!i)return 1;if(!r&&!a&&!u&&e<t||u&&n&&i&&!r&&!a||l&&n&&i||!s&&i||!c)return-1}return 0}function ro(e,t,n,i){for(var o=-1,a=e.length,s=n.length,l=-1,c=t.length,u=Cn(a-s,0),d=r(c+u),h=!i;++l<c;)d[l]=t[l];for(;++o<s;)(h||o<a)&&(d[n[o]]=e[o]);for(;u--;)d[l++]=e[o++];return d}function io(e,t,n,i){for(var o=-1,a=e.length,s=-1,l=n.length,c=-1,u=t.length,d=Cn(a-l,0),h=r(d+u),p=!i;++o<d;)h[o]=e[o];for(var m=o;++c<u;)h[m+c]=t[c];for(;++s<l;)(p||o<a)&&(h[m+n[s]]=e[o++]);return h}function oo(e,t){var n=-1,i=e.length;for(t||(t=r(i));++n<i;)t[n]=e[n];return t}function ao(e,t,n,r){var i=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var l=t[a],c=r?r(n[l],e[l],l,n,e):o;c===o&&(c=e[l]),i?Mr(n,l,c):Ir(n,l,c)}return n}function so(e,t){return function(n,r){var i=ys(n)?on:Rr,o=t?t():{};return i(n,e,Uo(r,2),o)}}function lo(e){return xi((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,s=i>2?n[2]:o;for(a=e.length>3&&"function"==typeof a?(i--,a):o,s&&Qo(n[0],n[1],s)&&(a=i<3?o:a,i=1),t=nt(t);++r<i;){var l=n[r];l&&e(t,l,r,a)}return t}))}function co(e,t){return function(n,r){if(null==n)return n;if(!Ss(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=nt(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function uo(e){return function(t,n,r){for(var i=-1,o=nt(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===n(o[l],l,o))break}return t}}function ho(e){return function(t){var n=Bn(t=Ws(t))?Vn(t):o,r=n?n[0]:t.charAt(0),i=n?Xi(n,1).join(""):t.slice(1);return r[e]()+i}}function po(e){return function(t){return mn(Fl(vl(t).replace(Ot,"")),e,"")}}function mo(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=_r(e.prototype),r=e.apply(n,t);return Os(r)?r:n}}function go(e){return function(t,n,r){var i=nt(t);if(!Ss(t)){var a=Uo(n,3);t=sl(t),n=function(e){return a(i[e],e,i)}}var s=e(t,n,r);return s>-1?i[a?t[s]:s]:o}}function fo(e){return Ro((function(t){var n=t.length,r=n,i=vr.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new ot(l);if(i&&!s&&"wrapper"==Lo(a))var s=new vr([],!0)}for(r=s?r:n;++r<n;){var c=Lo(a=t[r]),u="wrapper"==c?Po(a):o;s=u&&Zo(u[0])&&u[1]==(C|E|w|x)&&!u[4].length&&1==u[9]?s[Lo(u[0])].apply(s,u[3]):1==a.length&&Zo(a)?s[c]():s.thru(a)}return function(){var e=arguments,r=e[0];if(s&&1==e.length&&ys(r))return s.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}}))}function _o(e,t,n,i,a,s,l,c,u,d){var h=t&C,p=t&b,m=t&v,g=t&(E|S),f=t&F,_=m?o:mo(e);return function b(){for(var v=arguments.length,y=r(v),E=v;E--;)y[E]=arguments[E];if(g)var S=Bo(b),w=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(y,S);if(i&&(y=ro(y,i,a,g)),s&&(y=io(y,s,l,g)),v-=w,g&&v<d){var T=Gn(y,S);return To(e,t,_o,b.placeholder,n,y,T,c,u,d-v)}var C=p?n:this,x=m?C[e]:e;return v=y.length,c?y=function(e,t){var n=e.length,r=Yn(t.length,n),i=oo(e);for(;r--;){var a=t[r];e[r]=Yo(a,n)?i[a]:o}return e}(y,c):f&&v>1&&y.reverse(),h&&u<v&&(y.length=u),this&&this!==Vt&&this instanceof b&&(x=_||mo(x)),x.apply(C,y)}}function bo(e,t){return function(n,r){return function(e,t,n,r){return Qr(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function vo(e,t){return function(n,r){var i;if(n===o&&r===o)return t;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=Ui(n),r=Ui(r)):(n=Bi(n),r=Bi(r)),i=e(n,r)}return i}}function yo(e){return Ro((function(t){return t=hn(t,On(Uo())),xi((function(n){var r=this;return e(t,(function(e){return rn(e,r,n)}))}))}))}function Eo(e,t){var n=(t=t===o?" ":Ui(t)).length;if(n<2)return n?Ci(t,e):t;var r=Ci(t,Ht(e/qn(t)));return Bn(t)?Xi(Vn(r),0,e).join(""):r.slice(0,e)}function So(e){return function(t,n,i){return i&&"number"!=typeof i&&Qo(t,n,i)&&(n=i=o),t=Hs(t),n===o?(n=t,t=0):n=Hs(n),function(e,t,n,i){for(var o=-1,a=Cn(Ht((t-e)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=e,e+=n;return s}(t,n,i=i===o?t<n?1:-1:Hs(i),e)}}function wo(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=$s(t),n=$s(n)),e(t,n)}}function To(e,t,n,r,i,a,s,l,c,u){var d=t&E;t|=d?w:T,(t&=~(d?T:w))&y||(t&=~(b|v));var h=[e,t,i,d?a:o,d?s:o,d?o:a,d?o:s,l,c,u],p=n.apply(o,h);return Zo(e)&&aa(p,h),p.placeholder=r,ca(p,e,t)}function Co(e){var t=tt[e];return function(e,n){if(e=$s(e),(n=null==n?0:Yn(qs(n),292))&&Yt(e)){var r=(Ws(e)+"e").split("e");return+((r=(Ws(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var xo=rr&&1/zn(new rr([,-0]))[1]==N?function(e){return new rr(e)}:Bl;function Fo(e){return function(t){var n=Vo(t);return n==X?Un(t):n==ie?Hn(t):function(e,t){return hn(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Do(e,t,n,i,a,s,c,u){var d=t&v;if(!d&&"function"!=typeof e)throw new ot(l);var p=i?i.length:0;if(p||(t&=~(w|T),i=a=o),c=c===o?c:Cn(qs(c),0),u=u===o?u:qs(u),p-=a?a.length:0,t&T){var m=i,g=a;i=a=o}var f=d?o:Po(e),_=[e,t,n,i,a,m,g,s,c,u];if(f&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<(b|v|C),a=r==C&&n==E||r==C&&n==x&&e[7].length<=t[8]||r==(C|x)&&t[7].length<=t[8]&&n==E;if(!o&&!a)return e;r&b&&(e[2]=t[2],i|=n&b?0:y);var s=t[3];if(s){var l=e[3];e[3]=l?ro(l,s,t[4]):s,e[4]=l?Gn(e[3],h):t[4]}(s=t[5])&&(l=e[5],e[5]=l?io(l,s,t[6]):s,e[6]=l?Gn(e[5],h):t[6]);(s=t[7])&&(e[7]=s);r&C&&(e[8]=null==e[8]?t[8]:Yn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(_,f),e=_[0],t=_[1],n=_[2],i=_[3],a=_[4],!(u=_[9]=_[9]===o?d?0:e.length:Cn(_[9]-p,0))&&t&(E|S)&&(t&=~(E|S)),t&&t!=b)F=t==E||t==S?function(e,t,n){var i=mo(e);return function a(){for(var s=arguments.length,l=r(s),c=s,u=Bo(a);c--;)l[c]=arguments[c];var d=s<3&&l[0]!==u&&l[s-1]!==u?[]:Gn(l,u);return(s-=d.length)<n?To(e,t,_o,a.placeholder,o,l,d,o,o,n-s):rn(this&&this!==Vt&&this instanceof a?i:e,this,l)}}(e,t,u):t!=w&&t!=(b|w)||a.length?_o.apply(o,_):function(e,t,n,i){var o=t&b,a=mo(e);return function t(){for(var s=-1,l=arguments.length,c=-1,u=i.length,d=r(u+l),h=this&&this!==Vt&&this instanceof t?a:e;++c<u;)d[c]=i[c];for(;l--;)d[c++]=arguments[++s];return rn(h,o?n:this,d)}}(e,t,n,i);else var F=function(e,t,n){var r=t&b,i=mo(e);return function t(){return(this&&this!==Vt&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n);return ca((f?Oi:aa)(F,_),e,t)}function ko(e,t,n,r){return e===o||fs(e,lt[n])&&!dt.call(r,n)?t:e}function Oo(e,t,n,r,i,a){return Os(e)&&Os(t)&&(a.set(t,e),bi(e,t,o,Oo,a),a.delete(t)),e}function Io(e){return Ns(e)?o:e}function Ao(e,t,n,r,i,a){var s=n&f,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var h=-1,p=!0,m=n&_?new Tr:o;for(a.set(e,t),a.set(t,e);++h<l;){var g=e[h],b=t[h];if(r)var v=s?r(b,g,h,t,e,a):r(g,b,h,e,t,a);if(v!==o){if(v)continue;p=!1;break}if(m){if(!fn(t,(function(e,t){if(!An(m,t)&&(g===e||i(g,e,n,r,a)))return m.push(t)}))){p=!1;break}}else if(g!==b&&!i(g,b,n,r,a)){p=!1;break}}return a.delete(e),a.delete(t),p}function Ro(e){return la(ra(e,o,Ea),e+"")}function No(e){return ei(e,sl,Ho)}function Mo(e){return ei(e,ll,qo)}var Po=ar?function(e){return ar.get(e)}:Bl;function Lo(e){for(var t=e.name+"",n=sr[t],r=dt.call(sr,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function Bo(e){return(dt.call(fr,"placeholder")?fr:e).placeholder}function Uo(){var e=fr.iteratee||Nl;return e=e===Nl?di:e,arguments.length?e(arguments[0],arguments[1]):e}function jo(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Go(e){for(var t=sl(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,ta(i)]}return t}function zo(e,t){var n=function(e,t){return null==e?o:e[t]}(e,t);return ui(n)?n:o}var Ho=$t?function(e){return null==e?[]:(e=nt(e),cn($t(e),(function(t){return Tt.call(e,t)})))}:Vl,qo=$t?function(e){for(var t=[];e;)pn(t,Ho(e)),e=St(e);return t}:Vl,Vo=ti;function $o(e,t,n){for(var r=-1,i=(t=Yi(t,e)).length,o=!1;++r<i;){var a=pa(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&ks(i)&&Yo(a,i)&&(ys(e)||vs(e))}function Ko(e){return"function"!=typeof e.constructor||ea(e)?{}:_r(St(e))}function Wo(e){return ys(e)||vs(e)||!!(xt&&e&&e[xt])}function Yo(e,t){var n=typeof e;return!!(t=null==t?M:t)&&("number"==n||"symbol"!=n&&Qe.test(e))&&e>-1&&e%1==0&&e<t}function Qo(e,t,n){if(!Os(n))return!1;var r=typeof t;return!!("number"==r?Ss(n)&&Yo(t,n.length):"string"==r&&t in n)&&fs(n[t],e)}function Xo(e,t){if(ys(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Bs(e))||(Ae.test(e)||!Ie.test(e)||null!=t&&e in nt(t))}function Zo(e){var t=Lo(e),n=fr[t];if("function"!=typeof n||!(t in yr.prototype))return!1;if(e===n)return!0;var r=Po(n);return!!r&&e===r[0]}(er&&Vo(new er(new ArrayBuffer(1)))!=de||tr&&Vo(new tr)!=X||nr&&Vo(nr.resolve())!=te||rr&&Vo(new rr)!=ie||ir&&Vo(new ir)!=le)&&(Vo=function(e){var t=ti(e),n=t==ee?e.constructor:o,r=n?ma(n):"";if(r)switch(r){case lr:return de;case cr:return X;case ur:return te;case dr:return ie;case hr:return le}return t});var Jo=ct?Fs:$l;function ea(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||lt)}function ta(e){return e==e&&!Os(e)}function na(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==o||e in nt(n)))}}function ra(e,t,n){return t=Cn(t===o?e.length-1:t,0),function(){for(var i=arguments,o=-1,a=Cn(i.length-t,0),s=r(a);++o<a;)s[o]=i[t+o];o=-1;for(var l=r(t+1);++o<t;)l[o]=i[o];return l[t]=n(s),rn(e,this,l)}}function ia(e,t){return t.length<2?e:Jr(e,Ri(t,0,-1))}function oa(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var aa=ua(Oi),sa=jt||function(e,t){return Vt.setTimeout(e,t)},la=ua(Ii);function ca(e,t,n){var r=t+"";return la(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(Be,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return an(G,(function(n){var r="_."+n[0];t&n[1]&&!un(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(Ue);return t?t[1].split(je):[]}(r),n)))}function ua(e){var t=0,n=0;return function(){var r=Qn(),i=I-(r-n);if(n=r,i>0){if(++t>=O)return arguments[0]}else t=0;return e.apply(o,arguments)}}function da(e,t){var n=-1,r=e.length,i=r-1;for(t=t===o?r:t;++n<t;){var a=Ti(n,i),s=e[a];e[a]=e[n],e[n]=s}return e.length=t,e}var ha=function(e){var t=us(e,(function(e){return n.size===d&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Re,(function(e,n,r,i){t.push(r?i.replace(He,"$1"):n||e)})),t}));function pa(e){if("string"==typeof e||Bs(e))return e;var t=e+"";return"0"==t&&1/e==-N?"-0":t}function ma(e){if(null!=e){try{return ut.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function ga(e){if(e instanceof yr)return e.clone();var t=new vr(e.__wrapped__,e.__chain__);return t.__actions__=oo(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var fa=xi((function(e,t){return ws(e)?Gr(e,Kr(t,1,ws,!0)):[]})),_a=xi((function(e,t){var n=xa(t);return ws(n)&&(n=o),ws(e)?Gr(e,Kr(t,1,ws,!0),Uo(n,2)):[]})),ba=xi((function(e,t){var n=xa(t);return ws(n)&&(n=o),ws(e)?Gr(e,Kr(t,1,ws,!0),o,n):[]}));function va(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:qs(n);return i<0&&(i=Cn(r+i,0)),vn(e,Uo(t,3),i)}function ya(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==o&&(i=qs(n),i=n<0?Cn(r+i,0):Yn(i,r-1)),vn(e,Uo(t,3),i,!0)}function Ea(e){return(null==e?0:e.length)?Kr(e,1):[]}function Sa(e){return e&&e.length?e[0]:o}var wa=xi((function(e){var t=hn(e,Ki);return t.length&&t[0]===e[0]?oi(t):[]})),Ta=xi((function(e){var t=xa(e),n=hn(e,Ki);return t===xa(n)?t=o:n.pop(),n.length&&n[0]===e[0]?oi(n,Uo(t,2)):[]})),Ca=xi((function(e){var t=xa(e),n=hn(e,Ki);return(t="function"==typeof t?t:o)&&n.pop(),n.length&&n[0]===e[0]?oi(n,o,t):[]}));function xa(e){var t=null==e?0:e.length;return t?e[t-1]:o}var Fa=xi(Da);function Da(e,t){return e&&e.length&&t&&t.length?Si(e,t):e}var ka=Ro((function(e,t){var n=null==e?0:e.length,r=Pr(e,t);return wi(e,hn(t,(function(e){return Yo(e,n)?+e:e})).sort(no)),r}));function Oa(e){return null==e?e:Jn.call(e)}var Ia=xi((function(e){return ji(Kr(e,1,ws,!0))})),Aa=xi((function(e){var t=xa(e);return ws(t)&&(t=o),ji(Kr(e,1,ws,!0),Uo(t,2))})),Ra=xi((function(e){var t=xa(e);return t="function"==typeof t?t:o,ji(Kr(e,1,ws,!0),o,t)}));function Na(e){if(!e||!e.length)return[];var t=0;return e=cn(e,(function(e){if(ws(e))return t=Cn(e.length,t),!0})),Dn(t,(function(t){return hn(e,Tn(t))}))}function Ma(e,t){if(!e||!e.length)return[];var n=Na(e);return null==t?n:hn(n,(function(e){return rn(t,o,e)}))}var Pa=xi((function(e,t){return ws(e)?Gr(e,t):[]})),La=xi((function(e){return Vi(cn(e,ws))})),Ba=xi((function(e){var t=xa(e);return ws(t)&&(t=o),Vi(cn(e,ws),Uo(t,2))})),Ua=xi((function(e){var t=xa(e);return t="function"==typeof t?t:o,Vi(cn(e,ws),o,t)})),ja=xi(Na);var Ga=xi((function(e){var t=e.length,n=t>1?e[t-1]:o;return n="function"==typeof n?(e.pop(),n):o,Ma(e,n)}));function za(e){var t=fr(e);return t.__chain__=!0,t}function Ha(e,t){return t(e)}var qa=Ro((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return Pr(t,e)};return!(t>1||this.__actions__.length)&&r instanceof yr&&Yo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:Ha,args:[i],thisArg:o}),new vr(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e}))):this.thru(i)}));var Va=so((function(e,t,n){dt.call(e,n)?++e[n]:Mr(e,n,1)}));var $a=go(va),Ka=go(ya);function Wa(e,t){return(ys(e)?an:zr)(e,Uo(t,3))}function Ya(e,t){return(ys(e)?sn:Hr)(e,Uo(t,3))}var Qa=so((function(e,t,n){dt.call(e,n)?e[n].push(t):Mr(e,n,[t])}));var Xa=xi((function(e,t,n){var i=-1,o="function"==typeof t,a=Ss(e)?r(e.length):[];return zr(e,(function(e){a[++i]=o?rn(t,e,n):ai(e,t,n)})),a})),Za=so((function(e,t,n){Mr(e,n,t)}));function Ja(e,t){return(ys(e)?hn:gi)(e,Uo(t,3))}var es=so((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var ts=xi((function(e,t){if(null==e)return[];var n=t.length;return n>1&&Qo(e,t[0],t[1])?t=[]:n>2&&Qo(t[0],t[1],t[2])&&(t=[t[0]]),yi(e,Kr(t,1),[])})),ns=Nt||function(){return Vt.Date.now()};function rs(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,Do(e,C,o,o,o,o,t)}function is(e,t){var n;if("function"!=typeof t)throw new ot(l);return e=qs(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var os=xi((function(e,t,n){var r=b;if(n.length){var i=Gn(n,Bo(os));r|=w}return Do(e,r,t,n,i)})),as=xi((function(e,t,n){var r=b|v;if(n.length){var i=Gn(n,Bo(as));r|=w}return Do(t,r,e,n,i)}));function ss(e,t,n){var r,i,a,s,c,u,d=0,h=!1,p=!1,m=!0;if("function"!=typeof e)throw new ot(l);function g(t){var n=r,a=i;return r=i=o,d=t,s=e.apply(a,n)}function f(e){var n=e-u;return u===o||n>=t||n<0||p&&e-d>=a}function _(){var e=ns();if(f(e))return b(e);c=sa(_,function(e){var n=t-(e-u);return p?Yn(n,a-(e-d)):n}(e))}function b(e){return c=o,m&&r?g(e):(r=i=o,s)}function v(){var e=ns(),n=f(e);if(r=arguments,i=this,u=e,n){if(c===o)return function(e){return d=e,c=sa(_,t),h?g(e):s}(u);if(p)return Zi(c),c=sa(_,t),g(u)}return c===o&&(c=sa(_,t)),s}return t=$s(t)||0,Os(n)&&(h=!!n.leading,a=(p="maxWait"in n)?Cn($s(n.maxWait)||0,t):a,m="trailing"in n?!!n.trailing:m),v.cancel=function(){c!==o&&Zi(c),d=0,r=u=i=c=o},v.flush=function(){return c===o?s:b(ns())},v}var ls=xi((function(e,t){return jr(e,1,t)})),cs=xi((function(e,t,n){return jr(e,$s(t)||0,n)}));function us(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ot(l);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(us.Cache||wr),n}function ds(e){if("function"!=typeof e)throw new ot(l);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)}}us.Cache=wr;var hs=Qi((function(e,t){var n=(t=1==t.length&&ys(t[0])?hn(t[0],On(Uo())):hn(Kr(t,1),On(Uo()))).length;return xi((function(r){for(var i=-1,o=Yn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return rn(e,this,r)}))})),ps=xi((function(e,t){var n=Gn(t,Bo(ps));return Do(e,w,o,t,n)})),ms=xi((function(e,t){var n=Gn(t,Bo(ms));return Do(e,T,o,t,n)})),gs=Ro((function(e,t){return Do(e,x,o,o,o,t)}));function fs(e,t){return e===t||e!=e&&t!=t}var _s=wo(ni),bs=wo((function(e,t){return e>=t})),vs=si(function(){return arguments}())?si:function(e){return Is(e)&&dt.call(e,"callee")&&!Tt.call(e,"callee")},ys=r.isArray,Es=Xt?On(Xt):function(e){return Is(e)&&ti(e)==ue};function Ss(e){return null!=e&&ks(e.length)&&!Fs(e)}function ws(e){return Is(e)&&Ss(e)}var Ts=Kt||$l,Cs=Zt?On(Zt):function(e){return Is(e)&&ti(e)==$};function xs(e){if(!Is(e))return!1;var t=ti(e);return t==W||t==K||"string"==typeof e.message&&"string"==typeof e.name&&!Ns(e)}function Fs(e){if(!Os(e))return!1;var t=ti(e);return t==Y||t==Q||t==q||t==ne}function Ds(e){return"number"==typeof e&&e==qs(e)}function ks(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=M}function Os(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Is(e){return null!=e&&"object"==typeof e}var As=Jt?On(Jt):function(e){return Is(e)&&Vo(e)==X};function Rs(e){return"number"==typeof e||Is(e)&&ti(e)==Z}function Ns(e){if(!Is(e)||ti(e)!=ee)return!1;var t=St(e);if(null===t)return!0;var n=dt.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&ut.call(n)==gt}var Ms=en?On(en):function(e){return Is(e)&&ti(e)==re};var Ps=tn?On(tn):function(e){return Is(e)&&Vo(e)==ie};function Ls(e){return"string"==typeof e||!ys(e)&&Is(e)&&ti(e)==oe}function Bs(e){return"symbol"==typeof e||Is(e)&&ti(e)==ae}var Us=nn?On(nn):function(e){return Is(e)&&ks(e.length)&&!!Bt[ti(e)]};var js=wo(mi),Gs=wo((function(e,t){return e<=t}));function zs(e){if(!e)return[];if(Ss(e))return Ls(e)?Vn(e):oo(e);if(Ft&&e[Ft])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ft]());var t=Vo(e);return(t==X?Un:t==ie?zn:fl)(e)}function Hs(e){return e?(e=$s(e))===N||e===-N?(e<0?-1:1)*P:e==e?e:0:0===e?e:0}function qs(e){var t=Hs(e),n=t%1;return t==t?n?t-n:t:0}function Vs(e){return e?Lr(qs(e),0,B):0}function $s(e){if("number"==typeof e)return e;if(Bs(e))return L;if(Os(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Os(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=kn(e);var n=Ke.test(e);return n||Ye.test(e)?zt(e.slice(2),n?2:8):$e.test(e)?L:+e}function Ks(e){return ao(e,ll(e))}function Ws(e){return null==e?"":Ui(e)}var Ys=lo((function(e,t){if(ea(t)||Ss(t))ao(t,sl(t),e);else for(var n in t)dt.call(t,n)&&Ir(e,n,t[n])})),Qs=lo((function(e,t){ao(t,ll(t),e)})),Xs=lo((function(e,t,n,r){ao(t,ll(t),e,r)})),Zs=lo((function(e,t,n,r){ao(t,sl(t),e,r)})),Js=Ro(Pr);var el=xi((function(e,t){e=nt(e);var n=-1,r=t.length,i=r>2?t[2]:o;for(i&&Qo(t[0],t[1],i)&&(r=1);++n<r;)for(var a=t[n],s=ll(a),l=-1,c=s.length;++l<c;){var u=s[l],d=e[u];(d===o||fs(d,lt[u])&&!dt.call(e,u))&&(e[u]=a[u])}return e})),tl=xi((function(e){return e.push(o,Oo),rn(ul,o,e)}));function nl(e,t,n){var r=null==e?o:Jr(e,t);return r===o?n:r}function rl(e,t){return null!=e&&$o(e,t,ii)}var il=bo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=mt.call(t)),e[t]=n}),Ol(Rl)),ol=bo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=mt.call(t)),dt.call(e,t)?e[t].push(n):e[t]=[n]}),Uo),al=xi(ai);function sl(e){return Ss(e)?xr(e):hi(e)}function ll(e){return Ss(e)?xr(e,!0):pi(e)}var cl=lo((function(e,t,n){bi(e,t,n)})),ul=lo((function(e,t,n,r){bi(e,t,n,r)})),dl=Ro((function(e,t){var n={};if(null==e)return n;var r=!1;t=hn(t,(function(t){return t=Yi(t,e),r||(r=t.length>1),t})),ao(e,Mo(e),n),r&&(n=Br(n,p|m|g,Io));for(var i=t.length;i--;)Gi(n,t[i]);return n}));var hl=Ro((function(e,t){return null==e?{}:function(e,t){return Ei(e,t,(function(t,n){return rl(e,n)}))}(e,t)}));function pl(e,t){if(null==e)return{};var n=hn(Mo(e),(function(e){return[e]}));return t=Uo(t),Ei(e,n,(function(e,n){return t(e,n[0])}))}var ml=Fo(sl),gl=Fo(ll);function fl(e){return null==e?[]:In(e,sl(e))}var _l=po((function(e,t,n){return t=t.toLowerCase(),e+(n?bl(t):t)}));function bl(e){return xl(Ws(e).toLowerCase())}function vl(e){return(e=Ws(e))&&e.replace(Xe,Mn).replace(It,"")}var yl=po((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),El=po((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Sl=ho("toLowerCase");var wl=po((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Tl=po((function(e,t,n){return e+(n?" ":"")+xl(t)}));var Cl=po((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),xl=ho("toUpperCase");function Fl(e,t,n){return e=Ws(e),(t=n?o:t)===o?function(e){return Mt.test(e)}(e)?function(e){return e.match(Rt)||[]}(e):function(e){return e.match(Ge)||[]}(e):e.match(t)||[]}var Dl=xi((function(e,t){try{return rn(e,o,t)}catch(e){return xs(e)?e:new Le(e)}})),kl=Ro((function(e,t){return an(t,(function(t){t=pa(t),Mr(e,t,os(e[t],e))})),e}));function Ol(e){return function(){return e}}var Il=fo(),Al=fo(!0);function Rl(e){return e}function Nl(e){return di("function"==typeof e?e:Br(e,p))}var Ml=xi((function(e,t){return function(n){return ai(n,e,t)}})),Pl=xi((function(e,t){return function(n){return ai(e,n,t)}}));function Ll(e,t,n){var r=sl(t),i=Zr(t,r);null!=n||Os(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=Zr(t,sl(t)));var o=!(Os(n)&&"chain"in n&&!n.chain),a=Fs(e);return an(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__=oo(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,pn([this.value()],arguments))})})),e}function Bl(){}var Ul=yo(hn),jl=yo(ln),Gl=yo(fn);function zl(e){return Xo(e)?Tn(pa(e)):function(e){return function(t){return Jr(t,e)}}(e)}var Hl=So(),ql=So(!0);function Vl(){return[]}function $l(){return!1}var Kl=vo((function(e,t){return e+t}),0),Wl=Co("ceil"),Yl=vo((function(e,t){return e/t}),1),Ql=Co("floor");var Xl,Zl=vo((function(e,t){return e*t}),1),Jl=Co("round"),ec=vo((function(e,t){return e-t}),0);return fr.after=function(e,t){if("function"!=typeof t)throw new ot(l);return e=qs(e),function(){if(--e<1)return t.apply(this,arguments)}},fr.ary=rs,fr.assign=Ys,fr.assignIn=Qs,fr.assignInWith=Xs,fr.assignWith=Zs,fr.at=Js,fr.before=is,fr.bind=os,fr.bindAll=kl,fr.bindKey=as,fr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return ys(e)?e:[e]},fr.chain=za,fr.chunk=function(e,t,n){t=(n?Qo(e,t,n):t===o)?1:Cn(qs(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var a=0,s=0,l=r(Ht(i/t));a<i;)l[s++]=Ri(e,a,a+=t);return l},fr.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},fr.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return pn(ys(n)?oo(n):[n],Kr(t,1))},fr.cond=function(e){var t=null==e?0:e.length,n=Uo();return e=t?hn(e,(function(e){if("function"!=typeof e[1])throw new ot(l);return[n(e[0]),e[1]]})):[],xi((function(n){for(var r=-1;++r<t;){var i=e[r];if(rn(i[0],this,n))return rn(i[1],this,n)}}))},fr.conforms=function(e){return function(e){var t=sl(e);return function(n){return Ur(n,e,t)}}(Br(e,p))},fr.constant=Ol,fr.countBy=Va,fr.create=function(e,t){var n=_r(e);return null==t?n:Nr(n,t)},fr.curry=function e(t,n,r){var i=Do(t,E,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},fr.curryRight=function e(t,n,r){var i=Do(t,S,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},fr.debounce=ss,fr.defaults=el,fr.defaultsDeep=tl,fr.defer=ls,fr.delay=cs,fr.difference=fa,fr.differenceBy=_a,fr.differenceWith=ba,fr.drop=function(e,t,n){var r=null==e?0:e.length;return r?Ri(e,(t=n||t===o?1:qs(t))<0?0:t,r):[]},fr.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?Ri(e,0,(t=r-(t=n||t===o?1:qs(t)))<0?0:t):[]},fr.dropRightWhile=function(e,t){return e&&e.length?Hi(e,Uo(t,3),!0,!0):[]},fr.dropWhile=function(e,t){return e&&e.length?Hi(e,Uo(t,3),!0):[]},fr.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&Qo(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=qs(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:qs(r))<0&&(r+=i),r=n>r?0:Vs(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},fr.filter=function(e,t){return(ys(e)?cn:$r)(e,Uo(t,3))},fr.flatMap=function(e,t){return Kr(Ja(e,t),1)},fr.flatMapDeep=function(e,t){return Kr(Ja(e,t),N)},fr.flatMapDepth=function(e,t,n){return n=n===o?1:qs(n),Kr(Ja(e,t),n)},fr.flatten=Ea,fr.flattenDeep=function(e){return(null==e?0:e.length)?Kr(e,N):[]},fr.flattenDepth=function(e,t){return(null==e?0:e.length)?Kr(e,t=t===o?1:qs(t)):[]},fr.flip=function(e){return Do(e,F)},fr.flow=Il,fr.flowRight=Al,fr.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},fr.functions=function(e){return null==e?[]:Zr(e,sl(e))},fr.functionsIn=function(e){return null==e?[]:Zr(e,ll(e))},fr.groupBy=Qa,fr.initial=function(e){return(null==e?0:e.length)?Ri(e,0,-1):[]},fr.intersection=wa,fr.intersectionBy=Ta,fr.intersectionWith=Ca,fr.invert=il,fr.invertBy=ol,fr.invokeMap=Xa,fr.iteratee=Nl,fr.keyBy=Za,fr.keys=sl,fr.keysIn=ll,fr.map=Ja,fr.mapKeys=function(e,t){var n={};return t=Uo(t,3),Qr(e,(function(e,r,i){Mr(n,t(e,r,i),e)})),n},fr.mapValues=function(e,t){var n={};return t=Uo(t,3),Qr(e,(function(e,r,i){Mr(n,r,t(e,r,i))})),n},fr.matches=function(e){return fi(Br(e,p))},fr.matchesProperty=function(e,t){return _i(e,Br(t,p))},fr.memoize=us,fr.merge=cl,fr.mergeWith=ul,fr.method=Ml,fr.methodOf=Pl,fr.mixin=Ll,fr.negate=ds,fr.nthArg=function(e){return e=qs(e),xi((function(t){return vi(t,e)}))},fr.omit=dl,fr.omitBy=function(e,t){return pl(e,ds(Uo(t)))},fr.once=function(e){return is(2,e)},fr.orderBy=function(e,t,n,r){return null==e?[]:(ys(t)||(t=null==t?[]:[t]),ys(n=r?o:n)||(n=null==n?[]:[n]),yi(e,t,n))},fr.over=Ul,fr.overArgs=hs,fr.overEvery=jl,fr.overSome=Gl,fr.partial=ps,fr.partialRight=ms,fr.partition=es,fr.pick=hl,fr.pickBy=pl,fr.property=zl,fr.propertyOf=function(e){return function(t){return null==e?o:Jr(e,t)}},fr.pull=Fa,fr.pullAll=Da,fr.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Si(e,t,Uo(n,2)):e},fr.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Si(e,t,o,n):e},fr.pullAt=ka,fr.range=Hl,fr.rangeRight=ql,fr.rearg=gs,fr.reject=function(e,t){return(ys(e)?cn:$r)(e,ds(Uo(t,3)))},fr.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=Uo(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return wi(e,i),n},fr.rest=function(e,t){if("function"!=typeof e)throw new ot(l);return xi(e,t=t===o?t:qs(t))},fr.reverse=Oa,fr.sampleSize=function(e,t,n){return t=(n?Qo(e,t,n):t===o)?1:qs(t),(ys(e)?Dr:Di)(e,t)},fr.set=function(e,t,n){return null==e?e:ki(e,t,n)},fr.setWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:ki(e,t,n,r)},fr.shuffle=function(e){return(ys(e)?kr:Ai)(e)},fr.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&Qo(e,t,n)?(t=0,n=r):(t=null==t?0:qs(t),n=n===o?r:qs(n)),Ri(e,t,n)):[]},fr.sortBy=ts,fr.sortedUniq=function(e){return e&&e.length?Li(e):[]},fr.sortedUniqBy=function(e,t){return e&&e.length?Li(e,Uo(t,2)):[]},fr.split=function(e,t,n){return n&&"number"!=typeof n&&Qo(e,t,n)&&(t=n=o),(n=n===o?B:n>>>0)?(e=Ws(e))&&("string"==typeof t||null!=t&&!Ms(t))&&!(t=Ui(t))&&Bn(e)?Xi(Vn(e),0,n):e.split(t,n):[]},fr.spread=function(e,t){if("function"!=typeof e)throw new ot(l);return t=null==t?0:Cn(qs(t),0),xi((function(n){var r=n[t],i=Xi(n,0,t);return r&&pn(i,r),rn(e,this,i)}))},fr.tail=function(e){var t=null==e?0:e.length;return t?Ri(e,1,t):[]},fr.take=function(e,t,n){return e&&e.length?Ri(e,0,(t=n||t===o?1:qs(t))<0?0:t):[]},fr.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Ri(e,(t=r-(t=n||t===o?1:qs(t)))<0?0:t,r):[]},fr.takeRightWhile=function(e,t){return e&&e.length?Hi(e,Uo(t,3),!1,!0):[]},fr.takeWhile=function(e,t){return e&&e.length?Hi(e,Uo(t,3)):[]},fr.tap=function(e,t){return t(e),e},fr.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new ot(l);return Os(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),ss(e,t,{leading:r,maxWait:t,trailing:i})},fr.thru=Ha,fr.toArray=zs,fr.toPairs=ml,fr.toPairsIn=gl,fr.toPath=function(e){return ys(e)?hn(e,pa):Bs(e)?[e]:oo(ha(Ws(e)))},fr.toPlainObject=Ks,fr.transform=function(e,t,n){var r=ys(e),i=r||Ts(e)||Us(e);if(t=Uo(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Os(e)&&Fs(o)?_r(St(e)):{}}return(i?an:Qr)(e,(function(e,r,i){return t(n,e,r,i)})),n},fr.unary=function(e){return rs(e,1)},fr.union=Ia,fr.unionBy=Aa,fr.unionWith=Ra,fr.uniq=function(e){return e&&e.length?ji(e):[]},fr.uniqBy=function(e,t){return e&&e.length?ji(e,Uo(t,2)):[]},fr.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?ji(e,o,t):[]},fr.unset=function(e,t){return null==e||Gi(e,t)},fr.unzip=Na,fr.unzipWith=Ma,fr.update=function(e,t,n){return null==e?e:zi(e,t,Wi(n))},fr.updateWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:zi(e,t,Wi(n),r)},fr.values=fl,fr.valuesIn=function(e){return null==e?[]:In(e,ll(e))},fr.without=Pa,fr.words=Fl,fr.wrap=function(e,t){return ps(Wi(t),e)},fr.xor=La,fr.xorBy=Ba,fr.xorWith=Ua,fr.zip=ja,fr.zipObject=function(e,t){return $i(e||[],t||[],Ir)},fr.zipObjectDeep=function(e,t){return $i(e||[],t||[],ki)},fr.zipWith=Ga,fr.entries=ml,fr.entriesIn=gl,fr.extend=Qs,fr.extendWith=Xs,Ll(fr,fr),fr.add=Kl,fr.attempt=Dl,fr.camelCase=_l,fr.capitalize=bl,fr.ceil=Wl,fr.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=$s(n))==n?n:0),t!==o&&(t=(t=$s(t))==t?t:0),Lr($s(e),t,n)},fr.clone=function(e){return Br(e,g)},fr.cloneDeep=function(e){return Br(e,p|g)},fr.cloneDeepWith=function(e,t){return Br(e,p|g,t="function"==typeof t?t:o)},fr.cloneWith=function(e,t){return Br(e,g,t="function"==typeof t?t:o)},fr.conformsTo=function(e,t){return null==t||Ur(e,t,sl(t))},fr.deburr=vl,fr.defaultTo=function(e,t){return null==e||e!=e?t:e},fr.divide=Yl,fr.endsWith=function(e,t,n){e=Ws(e),t=Ui(t);var r=e.length,i=n=n===o?r:Lr(qs(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},fr.eq=fs,fr.escape=function(e){return(e=Ws(e))&&Fe.test(e)?e.replace(Ce,Pn):e},fr.escapeRegExp=function(e){return(e=Ws(e))&&Me.test(e)?e.replace(Ne,"\\$&"):e},fr.every=function(e,t,n){var r=ys(e)?ln:qr;return n&&Qo(e,t,n)&&(t=o),r(e,Uo(t,3))},fr.find=$a,fr.findIndex=va,fr.findKey=function(e,t){return bn(e,Uo(t,3),Qr)},fr.findLast=Ka,fr.findLastIndex=ya,fr.findLastKey=function(e,t){return bn(e,Uo(t,3),Xr)},fr.floor=Ql,fr.forEach=Wa,fr.forEachRight=Ya,fr.forIn=function(e,t){return null==e?e:Wr(e,Uo(t,3),ll)},fr.forInRight=function(e,t){return null==e?e:Yr(e,Uo(t,3),ll)},fr.forOwn=function(e,t){return e&&Qr(e,Uo(t,3))},fr.forOwnRight=function(e,t){return e&&Xr(e,Uo(t,3))},fr.get=nl,fr.gt=_s,fr.gte=bs,fr.has=function(e,t){return null!=e&&$o(e,t,ri)},fr.hasIn=rl,fr.head=Sa,fr.identity=Rl,fr.includes=function(e,t,n,r){e=Ss(e)?e:fl(e),n=n&&!r?qs(n):0;var i=e.length;return n<0&&(n=Cn(i+n,0)),Ls(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&yn(e,t,n)>-1},fr.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:qs(n);return i<0&&(i=Cn(r+i,0)),yn(e,t,i)},fr.inRange=function(e,t,n){return t=Hs(t),n===o?(n=t,t=0):n=Hs(n),function(e,t,n){return e>=Yn(t,n)&&e<Cn(t,n)}(e=$s(e),t,n)},fr.invoke=al,fr.isArguments=vs,fr.isArray=ys,fr.isArrayBuffer=Es,fr.isArrayLike=Ss,fr.isArrayLikeObject=ws,fr.isBoolean=function(e){return!0===e||!1===e||Is(e)&&ti(e)==V},fr.isBuffer=Ts,fr.isDate=Cs,fr.isElement=function(e){return Is(e)&&1===e.nodeType&&!Ns(e)},fr.isEmpty=function(e){if(null==e)return!0;if(Ss(e)&&(ys(e)||"string"==typeof e||"function"==typeof e.splice||Ts(e)||Us(e)||vs(e)))return!e.length;var t=Vo(e);if(t==X||t==ie)return!e.size;if(ea(e))return!hi(e).length;for(var n in e)if(dt.call(e,n))return!1;return!0},fr.isEqual=function(e,t){return li(e,t)},fr.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:o)?n(e,t):o;return r===o?li(e,t,o,n):!!r},fr.isError=xs,fr.isFinite=function(e){return"number"==typeof e&&Yt(e)},fr.isFunction=Fs,fr.isInteger=Ds,fr.isLength=ks,fr.isMap=As,fr.isMatch=function(e,t){return e===t||ci(e,t,Go(t))},fr.isMatchWith=function(e,t,n){return n="function"==typeof n?n:o,ci(e,t,Go(t),n)},fr.isNaN=function(e){return Rs(e)&&e!=+e},fr.isNative=function(e){if(Jo(e))throw new Le(s);return ui(e)},fr.isNil=function(e){return null==e},fr.isNull=function(e){return null===e},fr.isNumber=Rs,fr.isObject=Os,fr.isObjectLike=Is,fr.isPlainObject=Ns,fr.isRegExp=Ms,fr.isSafeInteger=function(e){return Ds(e)&&e>=-M&&e<=M},fr.isSet=Ps,fr.isString=Ls,fr.isSymbol=Bs,fr.isTypedArray=Us,fr.isUndefined=function(e){return e===o},fr.isWeakMap=function(e){return Is(e)&&Vo(e)==le},fr.isWeakSet=function(e){return Is(e)&&ti(e)==ce},fr.join=function(e,t){return null==e?"":Qt.call(e,t)},fr.kebabCase=yl,fr.last=xa,fr.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=qs(n))<0?Cn(r+i,0):Yn(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):vn(e,Sn,i,!0)},fr.lowerCase=El,fr.lowerFirst=Sl,fr.lt=js,fr.lte=Gs,fr.max=function(e){return e&&e.length?Vr(e,Rl,ni):o},fr.maxBy=function(e,t){return e&&e.length?Vr(e,Uo(t,2),ni):o},fr.mean=function(e){return wn(e,Rl)},fr.meanBy=function(e,t){return wn(e,Uo(t,2))},fr.min=function(e){return e&&e.length?Vr(e,Rl,mi):o},fr.minBy=function(e,t){return e&&e.length?Vr(e,Uo(t,2),mi):o},fr.stubArray=Vl,fr.stubFalse=$l,fr.stubObject=function(){return{}},fr.stubString=function(){return""},fr.stubTrue=function(){return!0},fr.multiply=Zl,fr.nth=function(e,t){return e&&e.length?vi(e,qs(t)):o},fr.noConflict=function(){return Vt._===this&&(Vt._=ft),this},fr.noop=Bl,fr.now=ns,fr.pad=function(e,t,n){e=Ws(e);var r=(t=qs(t))?qn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Eo(qt(i),n)+e+Eo(Ht(i),n)},fr.padEnd=function(e,t,n){e=Ws(e);var r=(t=qs(t))?qn(e):0;return t&&r<t?e+Eo(t-r,n):e},fr.padStart=function(e,t,n){e=Ws(e);var r=(t=qs(t))?qn(e):0;return t&&r<t?Eo(t-r,n)+e:e},fr.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),Xn(Ws(e).replace(Pe,""),t||0)},fr.random=function(e,t,n){if(n&&"boolean"!=typeof n&&Qo(e,t,n)&&(t=n=o),n===o&&("boolean"==typeof t?(n=t,t=o):"boolean"==typeof e&&(n=e,e=o)),e===o&&t===o?(e=0,t=1):(e=Hs(e),t===o?(t=e,e=0):t=Hs(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=Zn();return Yn(e+i*(t-e+Gt("1e-"+((i+"").length-1))),t)}return Ti(e,t)},fr.reduce=function(e,t,n){var r=ys(e)?mn:xn,i=arguments.length<3;return r(e,Uo(t,4),n,i,zr)},fr.reduceRight=function(e,t,n){var r=ys(e)?gn:xn,i=arguments.length<3;return r(e,Uo(t,4),n,i,Hr)},fr.repeat=function(e,t,n){return t=(n?Qo(e,t,n):t===o)?1:qs(t),Ci(Ws(e),t)},fr.replace=function(){var e=arguments,t=Ws(e[0]);return e.length<3?t:t.replace(e[1],e[2])},fr.result=function(e,t,n){var r=-1,i=(t=Yi(t,e)).length;for(i||(i=1,e=o);++r<i;){var a=null==e?o:e[pa(t[r])];a===o&&(r=i,a=n),e=Fs(a)?a.call(e):a}return e},fr.round=Jl,fr.runInContext=e,fr.sample=function(e){return(ys(e)?Fr:Fi)(e)},fr.size=function(e){if(null==e)return 0;if(Ss(e))return Ls(e)?qn(e):e.length;var t=Vo(e);return t==X||t==ie?e.size:hi(e).length},fr.snakeCase=wl,fr.some=function(e,t,n){var r=ys(e)?fn:Ni;return n&&Qo(e,t,n)&&(t=o),r(e,Uo(t,3))},fr.sortedIndex=function(e,t){return Mi(e,t)},fr.sortedIndexBy=function(e,t,n){return Pi(e,t,Uo(n,2))},fr.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=Mi(e,t);if(r<n&&fs(e[r],t))return r}return-1},fr.sortedLastIndex=function(e,t){return Mi(e,t,!0)},fr.sortedLastIndexBy=function(e,t,n){return Pi(e,t,Uo(n,2),!0)},fr.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=Mi(e,t,!0)-1;if(fs(e[n],t))return n}return-1},fr.startCase=Tl,fr.startsWith=function(e,t,n){return e=Ws(e),n=null==n?0:Lr(qs(n),0,e.length),t=Ui(t),e.slice(n,n+t.length)==t},fr.subtract=ec,fr.sum=function(e){return e&&e.length?Fn(e,Rl):0},fr.sumBy=function(e,t){return e&&e.length?Fn(e,Uo(t,2)):0},fr.template=function(e,t,n){var r=fr.templateSettings;n&&Qo(e,t,n)&&(t=o),e=Ws(e),t=Xs({},t,r,ko);var i,a,s=Xs({},t.imports,r.imports,ko),l=sl(s),u=In(s,l),d=0,h=t.interpolate||Ze,p="__p += '",m=rt((t.escape||Ze).source+"|"+h.source+"|"+(h===Oe?qe:Ze).source+"|"+(t.evaluate||Ze).source+"|$","g"),g="//# sourceURL="+(dt.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Lt+"]")+"\n";e.replace(m,(function(t,n,r,o,s,l){return r||(r=o),p+=e.slice(d,l).replace(Je,Ln),n&&(i=!0,p+="' +\n__e("+n+") +\n'"),s&&(a=!0,p+="';\n"+s+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),d=l+t.length,t})),p+="';\n";var f=dt.call(t,"variable")&&t.variable;if(f){if(ze.test(f))throw new Le(c)}else p="with (obj) {\n"+p+"\n}\n";p=(a?p.replace(Ee,""):p).replace(Se,"$1").replace(we,"$1;"),p="function("+(f||"obj")+") {\n"+(f?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var _=Dl((function(){return et(l,g+"return "+p).apply(o,u)}));if(_.source=p,xs(_))throw _;return _},fr.times=function(e,t){if((e=qs(e))<1||e>M)return[];var n=B,r=Yn(e,B);t=Uo(t),e-=B;for(var i=Dn(r,t);++n<e;)t(n);return i},fr.toFinite=Hs,fr.toInteger=qs,fr.toLength=Vs,fr.toLower=function(e){return Ws(e).toLowerCase()},fr.toNumber=$s,fr.toSafeInteger=function(e){return e?Lr(qs(e),-M,M):0===e?e:0},fr.toString=Ws,fr.toUpper=function(e){return Ws(e).toUpperCase()},fr.trim=function(e,t,n){if((e=Ws(e))&&(n||t===o))return kn(e);if(!e||!(t=Ui(t)))return e;var r=Vn(e),i=Vn(t);return Xi(r,Rn(r,i),Nn(r,i)+1).join("")},fr.trimEnd=function(e,t,n){if((e=Ws(e))&&(n||t===o))return e.slice(0,$n(e)+1);if(!e||!(t=Ui(t)))return e;var r=Vn(e);return Xi(r,0,Nn(r,Vn(t))+1).join("")},fr.trimStart=function(e,t,n){if((e=Ws(e))&&(n||t===o))return e.replace(Pe,"");if(!e||!(t=Ui(t)))return e;var r=Vn(e);return Xi(r,Rn(r,Vn(t))).join("")},fr.truncate=function(e,t){var n=D,r=k;if(Os(t)){var i="separator"in t?t.separator:i;n="length"in t?qs(t.length):n,r="omission"in t?Ui(t.omission):r}var a=(e=Ws(e)).length;if(Bn(e)){var s=Vn(e);a=s.length}if(n>=a)return e;var l=n-qn(r);if(l<1)return r;var c=s?Xi(s,0,l).join(""):e.slice(0,l);if(i===o)return c+r;if(s&&(l+=c.length-l),Ms(i)){if(e.slice(l).search(i)){var u,d=c;for(i.global||(i=rt(i.source,Ws(Ve.exec(i))+"g")),i.lastIndex=0;u=i.exec(d);)var h=u.index;c=c.slice(0,h===o?l:h)}}else if(e.indexOf(Ui(i),l)!=l){var p=c.lastIndexOf(i);p>-1&&(c=c.slice(0,p))}return c+r},fr.unescape=function(e){return(e=Ws(e))&&xe.test(e)?e.replace(Te,Kn):e},fr.uniqueId=function(e){var t=++ht;return Ws(e)+t},fr.upperCase=Cl,fr.upperFirst=xl,fr.each=Wa,fr.eachRight=Ya,fr.first=Sa,Ll(fr,(Xl={},Qr(fr,(function(e,t){dt.call(fr.prototype,t)||(Xl[t]=e)})),Xl),{chain:!1}),fr.VERSION="4.17.21",an(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){fr[e].placeholder=fr})),an(["drop","take"],(function(e,t){yr.prototype[e]=function(n){n=n===o?1:Cn(qs(n),0);var r=this.__filtered__&&!t?new yr(this):this.clone();return r.__filtered__?r.__takeCount__=Yn(n,r.__takeCount__):r.__views__.push({size:Yn(n,B),type:e+(r.__dir__<0?"Right":"")}),r},yr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),an(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=n==A||3==n;yr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Uo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),an(["head","last"],(function(e,t){var n="take"+(t?"Right":"");yr.prototype[e]=function(){return this[n](1).value()[0]}})),an(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");yr.prototype[e]=function(){return this.__filtered__?new yr(this):this[n](1)}})),yr.prototype.compact=function(){return this.filter(Rl)},yr.prototype.find=function(e){return this.filter(e).head()},yr.prototype.findLast=function(e){return this.reverse().find(e)},yr.prototype.invokeMap=xi((function(e,t){return"function"==typeof e?new yr(this):this.map((function(n){return ai(n,e,t)}))})),yr.prototype.reject=function(e){return this.filter(ds(Uo(e)))},yr.prototype.slice=function(e,t){e=qs(e);var n=this;return n.__filtered__&&(e>0||t<0)?new yr(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(n=(t=qs(t))<0?n.dropRight(-t):n.take(t-e)),n)},yr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},yr.prototype.toArray=function(){return this.take(B)},Qr(yr.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=fr[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);i&&(fr.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,l=t instanceof yr,c=s[0],u=l||ys(t),d=function(e){var t=i.apply(fr,pn([e],s));return r&&h?t[0]:t};u&&n&&"function"==typeof c&&1!=c.length&&(l=u=!1);var h=this.__chain__,p=!!this.__actions__.length,m=a&&!h,g=l&&!p;if(!a&&u){t=g?t:new yr(this);var f=e.apply(t,s);return f.__actions__.push({func:Ha,args:[d],thisArg:o}),new vr(f,h)}return m&&g?e.apply(this,s):(f=this.thru(d),m?r?f.value()[0]:f.value():f)})})),an(["pop","push","shift","sort","splice","unshift"],(function(e){var t=at[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);fr.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(ys(i)?i:[],e)}return this[n]((function(n){return t.apply(ys(n)?n:[],e)}))}})),Qr(yr.prototype,(function(e,t){var n=fr[t];if(n){var r=n.name+"";dt.call(sr,r)||(sr[r]=[]),sr[r].push({name:t,func:n})}})),sr[_o(o,v).name]=[{name:"wrapper",func:o}],yr.prototype.clone=function(){var e=new yr(this.__wrapped__);return e.__actions__=oo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=oo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=oo(this.__views__),e},yr.prototype.reverse=function(){if(this.__filtered__){var e=new yr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},yr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=ys(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=Yn(t,e+a);break;case"takeRight":e=Cn(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,l=s-a,c=r?s:a-1,u=this.__iteratees__,d=u.length,h=0,p=Yn(l,this.__takeCount__);if(!n||!r&&i==l&&p==l)return qi(e,this.__actions__);var m=[];e:for(;l--&&h<p;){for(var g=-1,f=e[c+=t];++g<d;){var _=u[g],b=_.iteratee,v=_.type,y=b(f);if(v==R)f=y;else if(!y){if(v==A)continue e;break e}}m[h++]=f}return m},fr.prototype.at=qa,fr.prototype.chain=function(){return za(this)},fr.prototype.commit=function(){return new vr(this.value(),this.__chain__)},fr.prototype.next=function(){this.__values__===o&&(this.__values__=zs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},fr.prototype.plant=function(e){for(var t,n=this;n instanceof br;){var r=ga(n);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},fr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof yr){var t=e;return this.__actions__.length&&(t=new yr(this)),(t=t.reverse()).__actions__.push({func:Ha,args:[Oa],thisArg:o}),new vr(t,this.__chain__)}return this.thru(Oa)},fr.prototype.toJSON=fr.prototype.valueOf=fr.prototype.value=function(){return qi(this.__wrapped__,this.__actions__)},fr.prototype.first=fr.prototype.head,Ft&&(fr.prototype[Ft]=function(){return this}),fr}();Vt._=Wn,(i=function(){return Wn}.call(t,n,t,r))===o||(r.exports=i)}).call(this)}).call(this,n(14),n(365)(e))},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return M})),n.d(t,"n",(function(){return P})),n.d(t,"p",(function(){return L})),n.d(t,"o",(function(){return U})),n.d(t,"i",(function(){return j})),n.d(t,"j",(function(){return G})),n.d(t,"l",(function(){return z})),n.d(t,"k",(function(){return H})),n.d(t,"q",(function(){return q})),n.d(t,"m",(function(){return V}));var r=n(130),i=n.n(r),o=n(132),a=n.n(o),s=n(13),l=n.n(s),c=n(120),u=n.n(c),d=n(186),h=n.n(d),p=n(126),m=n.n(p),g=n(427),f=n.n(g),_=n(195),b=n(169),v=n(142),y=n(152),E=n(127),S=n(550);n.d(t,"b",(function(){return S.a}));var w=n(328);n.d(t,"c",(function(){return w.a}));var T=n(734);n.d(t,"d",(function(){return T.a}));var C=n(735);n.d(t,"e",(function(){return C.a}));var x=n(445);n.d(t,"f",(function(){return x.a}));var F=n(736);n.d(t,"g",(function(){return F.a}));var D=n(737);n.d(t,"h",(function(){return D.a}));const k=["top","bottom","left","right","bottomAligned","rightAligned","menuClassName","menuHeight","menuWidth","menuPaddingLeft","menuPaddingRight","menuPaddingBottom","menuPaddingTop","zIndex","children","focusLock","managed","wrapperClassName","chevronFace","chevronOffset"],O=["hasBackground","onFinished"];function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const R="mx_ContextualMenu_Container";function N(){let e=document.getElementById(R);return e||(e=document.createElement("div"),e.id=R,document.body.appendChild(e)),e}let M;!function(e){e.Top="top",e.Bottom="bottom",e.Left="left",e.Right="right",e.None="none"}(M||(M={}));class P extends u.a.PureComponent{constructor(t){super(t),l()(this,"initialFocus",void 0),l()(this,"onModalOpen",(()=>{var e,t;null===(e=(t=this.props).onFinished)||void 0===e||e.call(t)})),l()(this,"collectContextMenuRect",(e=>{if(!e)return;const t=e.querySelector('[role^="menuitem"]')||e.querySelector("[tab-index]");t&&t.focus(),this.setState({contextMenuElem:e})})),l()(this,"onContextMenu",(t=>{if(this.props.onFinished){this.props.onFinished(),t.preventDefault(),t.stopPropagation();const n=t.clientX,r=t.clientY;e((()=>{var e;const t=new MouseEvent("contextmenu",{clientX:n,clientY:r,screenX:0,screenY:0,button:0,relatedTarget:null});null===(e=document.elementFromPoint(n,r))||void 0===e||e.dispatchEvent(t)}))}})),l()(this,"onContextMenuPreventBubbling",(e=>{e.stopPropagation()})),l()(this,"onFinished",(e=>{var t,n;e.stopPropagation(),e.preventDefault(),null===(t=(n=this.props).onFinished)||void 0===t||t.call(n)})),l()(this,"onClick",(e=>{var t,n;(e.stopPropagation(),this.props.closeOnInteraction)&&(null===(t=(n=this.props).onFinished)||void 0===t||t.call(n))})),l()(this,"onKeyDown",(e=>{e.stopPropagation();const t=Object(y.a)().getAccessibilityAction(e);this.props.managed?Object(b.g)(e.target)&&t!==v.h.Escape||[v.h.Escape,v.h.Tab,v.h.ArrowLeft,v.h.ArrowRight].includes(t)&&this.props.onFinished():t===v.h.Escape&&this.props.onFinished()})),this.state={},this.initialFocus=document.activeElement}componentDidMount(){E.b.on(E.a.Opened,this.onModalOpen)}componentWillUnmount(){E.b.off(E.a.Opened,this.onModalOpen),this.initialFocus.focus()}renderMenu(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.hasBackground;const t={},n=this.props,{top:r,bottom:o,left:s,right:l,bottomAligned:c,rightAligned:d,menuClassName:h,menuHeight:p,menuWidth:g,menuPaddingLeft:v,menuPaddingRight:y,menuPaddingBottom:E,menuPaddingTop:S,zIndex:w,children:T,focusLock:C,managed:x,wrapperClassName:F,chevronFace:D,chevronOffset:I}=n,R=a()(n,k);let N;r?t.top=r:t.bottom=o,s?(t.left=s,N=M.Left):(t.right=l,N=M.Right);const P=this.state.contextMenuElem?this.state.contextMenuElem.getBoundingClientRect():null,L={};D&&(N=D);const B=N&&N!==M.None;N===M.Top||N===M.Bottom?L.left=I:L.top=I;const{windowWidth:U,windowHeight:j}=_.b.instance;if(P){if(void 0!==t.top){let e=j-10;c||(e-=P.height),t.top=Math.min(t.top,e),void 0!==L.top&&(L.top=I+r-t.top)}else void 0!==t.bottom&&(t.bottom=Math.min(t.bottom,j-P.height-10),void 0!==L.top&&(L.top=I+t.bottom-o));if(void 0!==t.left){let e=U-10;d||(e-=P.width),t.left=Math.min(t.left,e),void 0!==L.left&&(L.left=I+s-t.left)}else void 0!==t.right&&(t.right=Math.min(t.right,U-P.width-10),void 0!==L.left&&(L.left=I+t.right-l))}let G;B&&(G=u.a.createElement("div",{style:L,className:"mx_ContextualMenu_chevron_"+N}));const z=m()({mx_ContextualMenu:!0,mx_ContextualMenu_left:!B&&void 0!==t.left&&!t.right,mx_ContextualMenu_right:!B&&void 0!==t.right&&!t.left,mx_ContextualMenu_top:!B&&void 0!==t.top&&!t.bottom,mx_ContextualMenu_bottom:!B&&void 0!==t.bottom&&!t.top,mx_ContextualMenu_withChevron_left:N===M.Left,mx_ContextualMenu_withChevron_right:N===M.Right,mx_ContextualMenu_withChevron_top:N===M.Top,mx_ContextualMenu_withChevron_bottom:N===M.Bottom,mx_ContextualMenu_rightAligned:!0===d,mx_ContextualMenu_bottomAligned:!0===c},h),H={};g&&(H.width=g),p&&(H.height=p),isNaN(Number(S))||(H.paddingTop=S),isNaN(Number(v))||(H.paddingLeft=v),isNaN(Number(E))||(H.paddingBottom=E),isNaN(Number(y))||(H.paddingRight=y);const q={};let V;isNaN(Number(w))||(H.zIndex=w+1,q.zIndex=w),e&&(V=u.a.createElement("div",{className:"mx_ContextualMenu_background",style:q,onClick:this.onFinished,onContextMenu:this.onContextMenu}));let $=u.a.createElement(u.a.Fragment,null,G,T);C&&($=u.a.createElement(f.a,null,$));const{hasBackground:K,onFinished:W}=R,Y=a()(R,O);return u.a.createElement(b.d,{handleHomeEnd:!0,handleUpDown:!0,onKeyDown:this.onKeyDown},(e=>{let{onKeyDownHandler:n}=e;return u.a.createElement("div",{className:m()("mx_ContextualMenu_wrapper",F),style:A(A({},t),q),onClick:this.onClick,onKeyDown:n,onContextMenu:this.onContextMenuPreventBubbling},V,u.a.createElement("div",i()({className:z,style:H,ref:this.collectContextMenuRect,role:x?"menu":void 0},Y),$))}))}render(){return this.props.mountAsChild?this.renderMenu():h.a.createPortal(this.renderMenu(),N())}}l()(P,"defaultProps",{hasBackground:!0,managed:!0});const L=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:12;const n=e.right+window.scrollX+3;let r=e.top+e.height/2+window.scrollY;return r-=t+8,{left:n,top:r,chevronOffset:t}},B=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:12;const n=_.b.instance.windowWidth-e.left+window.scrollX-3;let r=e.top+e.height/2+window.scrollY;return r-=t+8,{right:n,top:r,chevronOffset:t}},U=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:12;return e.left>_.b.instance.windowWidth-e.right?B(e,t):L(e,t)},j=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:M.None,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r={chevronFace:t},i=e.right+window.scrollX,o=e.bottom+window.scrollY,a=e.top+window.scrollY;return r.right=_.b.instance.windowWidth-i,o<_.b.instance.windowHeight/2?r.top=o+n:r.bottom=_.b.instance.windowHeight-a+n,r},G=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:M.None,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r={chevronFace:t},i=e.left+window.scrollX,o=e.bottom+window.scrollY,a=e.top+window.scrollY;return r.left=i,o<_.b.instance.windowHeight/2?r.top=o+n:r.bottom=_.b.instance.windowHeight-a+n,r},z=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:M.None,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r={chevronFace:t},i=e.right+window.scrollX,o=e.top+window.scrollY;return r.right=_.b.instance.windowWidth-i,r.bottom=_.b.instance.windowHeight-o+n,r},H=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:M.None,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r={chevronFace:t},i=e.left+window.scrollX,o=e.top+window.scrollY;return r.left=i,r.bottom=_.b.instance.windowHeight-o+n,r},q=e=>{let t=Object(c.useRef)(null);e&&(t=e);const[n,r]=Object(c.useState)(!1);return[!!t.current&&n,t,e=>{null==e||e.preventDefault(),null==e||e.stopPropagation(),r(!0)},e=>{null==e||e.preventDefault(),null==e||e.stopPropagation(),r(!1)},r]};function V(e,t){const n=function(){var e;h.a.unmountComponentAtNode(N());for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];null==t||null===(e=t.onFinished)||void 0===e||e.apply(null,r)},r=u.a.createElement(P,i()({},t,{mountAsChild:!0,hasBackground:!1,onFinished:n,windowResize:n}),u.a.createElement(e,i()({},t,{onFinished:n})));return h.a.render(r,N()),{close:n}}}).call(this,n(54).setImmediate)},function(e,t,n){"use strict";n.d(t,"b",(function(){return b})),n.d(t,"a",(function(){return v}));var r,i=n(13),o=n.n(i),a=n(184),s=n(1),l=n(16),c=n(129),u=n(143),d=n(160),h=n(158),p=n(355),m=n(287),g=n(204);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}let b;!function(e){e[e.NotStarted=0]="NotStarted",e[e.InProgress=1]="InProgress",e[e.Finished=2]="Finished"}(r||(r={})),function(e){e.Events="RoomState.events",e.Members="RoomState.members",e.NewMember="RoomState.newMember",e.Update="RoomState.update",e.BeaconLiveness="RoomState.BeaconLiveness",e.Marker="RoomState.Marker"}(b||(b={}));class v extends h.b{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:r.NotStarted};super(),this.roomId=e,this.oobMemberFlags=t,o()(this,"reEmitter",new m.b(this)),o()(this,"sentinels",{}),o()(this,"displayNameToUserIds",new Map),o()(this,"userIdsToDisplayNames",{}),o()(this,"tokenToInvite",{}),o()(this,"joinedMemberCount",null),o()(this,"summaryJoinedMemberCount",null),o()(this,"invitedMemberCount",null),o()(this,"summaryInvitedMemberCount",null),o()(this,"modified",-1),o()(this,"members",{}),o()(this,"events",new Map),o()(this,"paginationToken",null),o()(this,"beacons",new Map),o()(this,"_liveBeaconIds",[]),this.updateModifiedTime()}getJoinedMemberCount(){return null!==this.summaryJoinedMemberCount?this.summaryJoinedMemberCount:(null===this.joinedMemberCount&&(this.joinedMemberCount=this.getMembers().reduce(((e,t)=>"join"===t.membership?e+1:e),0)),this.joinedMemberCount)}setJoinedMemberCount(e){this.summaryJoinedMemberCount=e}getInvitedMemberCount(){return null!==this.summaryInvitedMemberCount?this.summaryInvitedMemberCount:(null===this.invitedMemberCount&&(this.invitedMemberCount=this.getMembers().reduce(((e,t)=>"invite"===t.membership?e+1:e),0)),this.invitedMemberCount)}setInvitedMemberCount(e){this.summaryInvitedMemberCount=e}getMembers(){return Object.values(this.members)}getMembersExcept(e){return this.getMembers().filter((t=>!e.includes(t.userId)))}getMember(e){return this.members[e]||null}getSentinelMember(e){if(!e)return null;let t=this.sentinels[e];if(void 0===t){t=new a.a(this.roomId,e);const n=this.members[e];null!=n&&n.events.member&&t.setMembershipEvent(n.events.member,this),this.sentinels[e]=t}return t}getStateEvents(e,t){if(!this.events.has(e))return void 0===t?[]:null;if(void 0===t)return Array.from(this.events.get(e).values());const n=this.events.get(e).get(t);return n||null}get hasLiveBeacons(){var e;return!(null===(e=this.liveBeaconIds)||void 0===e||!e.length)}get liveBeaconIds(){return this._liveBeaconIds}clone(){const e=new v(this.roomId,this.oobMemberFlags),t=this.oobMemberFlags.status;return this.oobMemberFlags.status=r.NotStarted,Array.from(this.events.values()).forEach((t=>{e.setStateEvents(Array.from(t.values()))})),this.oobMemberFlags.status=t,null!==this.summaryInvitedMemberCount&&e.setInvitedMemberCount(this.getInvitedMemberCount()),null!==this.summaryJoinedMemberCount&&e.setJoinedMemberCount(this.getJoinedMemberCount()),this.oobMemberFlags.status==r.Finished&&this.getMembers().forEach((t=>{var n;t.isOutOfBand()&&(null===(n=e.getMember(t.userId))||void 0===n||n.markOutOfBand())})),e}setUnknownStateEvents(e){const t=e.filter((e=>!this.events.has(e.getType())||!this.events.get(e.getType()).has(e.getStateKey())));this.setStateEvents(t)}setStateEvents(e,t){this.updateModifiedTime(),e.forEach((e=>{if(e.getRoomId()!==this.roomId||!e.isState())return;g.b.matches(e.getType())&&this.setBeacon(e);const t=this.getStateEventMatching(e);var n;(this.setStateEvent(e),e.getType()===c.b.RoomMember)&&(this.updateDisplayNameCache(e.getStateKey(),null!==(n=e.getContent().displayname)&&void 0!==n?n:""),this.updateThirdPartyTokenCache(e));this.emit(b.Events,e,this,t)})),this.onBeaconLivenessChange(),e.forEach((e=>{if(e.getRoomId()===this.roomId&&e.isState())if(e.getType()===c.b.RoomMember){const t=e.getStateKey();"leave"!==e.getContent().membership&&"ban"!==e.getContent().membership||(e.getContent().avatar_url=e.getContent().avatar_url||e.getPrevContent().avatar_url,e.getContent().displayname=e.getContent().displayname||e.getPrevContent().displayname);const n=this.getOrCreateMember(t,e);n.setMembershipEvent(e,this),this.updateMember(n),this.emit(b.Members,e,this,n)}else if(e.getType()===c.b.RoomPowerLevels){if(""!==e.getStateKey())return;Object.values(this.members).forEach((t=>{const n=t.getLastModifiedTime();t.setPowerLevelEvent(e),n!==t.getLastModifiedTime()&&this.emit(b.Members,e,this,t)})),this.sentinels={}}else c.m.matches(e.getType())&&this.emit(b.Marker,e,t)})),this.emit(b.Update,this)}processBeaconEvents(e,t){if(!e.length||!this.beacons.size)return;const n=[...this.beacons.values()].reduce(((e,t)=>_(_({},e),{},{[t.beaconInfoId]:t})),{}),r=(e,t)=>{if(!g.a.matches(t.getType()))return;const r=n[e];r&&r.addLocations([t])};e.forEach((e=>{var i;const o=null===(i=e.getRelation())||void 0===i?void 0:i.event_id;o&&n[o]&&(t.decryptEventIfNeeded(e),e.isBeingDecrypted()||e.isDecryptionFailure()?e.once(u.c.Decrypted,(async()=>{r(o,e)})):r(o,e))}))}getOrCreateMember(e,t){let n=this.members[e];return n||(n=new a.a(this.roomId,e),this.members[e]=n,this.emit(b.NewMember,t,this,n)),n}setStateEvent(e){this.events.has(e.getType())||this.events.set(e.getType(),new Map),this.events.get(e.getType()).set(e.getStateKey(),e)}setBeacon(e){const t=Object(p.c)(e);if(this.beacons.has(t)){const r=this.beacons.get(t);var n;return e.isRedacted()?void(r.beaconInfoId===(null===(n=e.getRedactionEvent())||void 0===n?void 0:n.redacts)&&(r.destroy(),this.beacons.delete(t))):r.update(e)}if(e.isRedacted())return;const r=new p.a(e);this.reEmitter.reEmit(r,[p.b.New,p.b.Update,p.b.Destroy,p.b.LivenessChange]),this.emit(p.b.New,e,r),r.on(p.b.LivenessChange,this.onBeaconLivenessChange.bind(this)),r.on(p.b.Destroy,this.onBeaconLivenessChange.bind(this)),this.beacons.set(r.identifier,r)}onBeaconLivenessChange(){this._liveBeaconIds=Array.from(this.beacons.values()).filter((e=>e.isLive)).map((e=>e.identifier)),this.emit(b.BeaconLiveness,this,this.hasLiveBeacons)}getStateEventMatching(e){var t,n;return null!==(t=null===(n=this.events.get(e.getType()))||void 0===n?void 0:n.get(e.getStateKey()))&&void 0!==t?t:null}updateMember(e){const t=this.getStateEvents(c.b.RoomPowerLevels,"");t&&e.setPowerLevelEvent(t),delete this.sentinels[e.userId],this.members[e.userId]=e,this.joinedMemberCount=null,this.invitedMemberCount=null}needsOutOfBandMembers(){return this.oobMemberFlags.status===r.NotStarted}outOfBandMembersReady(){return this.oobMemberFlags.status===r.Finished}markOutOfBandMembersStarted(){this.oobMemberFlags.status===r.NotStarted&&(this.oobMemberFlags.status=r.InProgress)}markOutOfBandMembersFailed(){this.oobMemberFlags.status===r.InProgress&&(this.oobMemberFlags.status=r.NotStarted)}clearOutOfBandMembers(){let e=0;Object.keys(this.members).forEach((t=>{this.members[t].isOutOfBand()&&(++e,delete this.members[t])})),s.a.log(`LL: RoomState removed ${e} members...`),this.oobMemberFlags.status=r.NotStarted}setOutOfBandMembers(e){s.a.log(`LL: RoomState about to set ${e.length} OOB members ...`),this.oobMemberFlags.status===r.InProgress&&(s.a.log("LL: RoomState put in finished state ..."),this.oobMemberFlags.status=r.Finished,e.forEach((e=>this.setOutOfBandMember(e))),this.emit(b.Update,this))}setOutOfBandMember(e){if(e.getType()!==c.b.RoomMember)return;const t=e.getStateKey(),n=this.getMember(t);if(n&&!n.isOutOfBand())return;const r=this.getOrCreateMember(t,e);r.setMembershipEvent(e,this),r.markOutOfBand(),this.updateDisplayNameCache(r.userId,r.name),this.setStateEvent(e),this.updateMember(r),this.emit(b.Members,e,this,r)}setTypingEvent(e){Object.values(this.members).forEach((function(t){t.setTypingEvent(e)}))}getInviteForThreePidToken(e){return this.tokenToInvite[e]||null}updateModifiedTime(){this.modified=Date.now()}getLastModifiedTime(){return this.modified}getUserIdsWithDisplayName(e){var t;return null!==(t=this.displayNameToUserIds.get(l.J(e)))&&void 0!==t?t:[]}maySendRedactionForEvent(e,t){const n=this.getMember(t);if(!n||"leave"===n.membership)return!1;if(e.status||e.isRedacted())return!1;const r=this.maySendEvent(c.b.RoomRedaction,t);return e.getSender()===t?r:this.hasSufficientPowerLevelFor("redact",n.powerLevel)}hasSufficientPowerLevelFor(e,t){const n=this.getStateEvents(c.b.RoomPowerLevels,"");let r={};n&&(r=n.getContent());let i=50;return l.v(r[e])&&(i=r[e]),t>=i}maySendMessage(e){return this.maySendEventOfType(c.b.RoomMessage,e,!1)}maySendEvent(e,t){return this.maySendEventOfType(e,t,!1)}mayClientSendStateEvent(e,t){return!(t.isGuest()||!t.credentials.userId)&&this.maySendStateEvent(e,t.credentials.userId)}maySendStateEvent(e,t){return this.maySendEventOfType(e,t,!0)}maySendEventOfType(e,t,n){const r=this.getStateEvents(c.b.RoomPowerLevels,"");let i,o={},a=0,s=0,l=0;if(r){i=r.getContent(),o=i.events||{},a=Number.isSafeInteger(i.state_default)?i.state_default:50;const e=i.users&&i.users[t];Number.isSafeInteger(e)?l=e:Number.isSafeInteger(i.users_default)&&(l=i.users_default),Number.isSafeInteger(i.events_default)&&(s=i.events_default)}let u=n?a:s;return Number.isSafeInteger(o[e])&&(u=o[e]),l>=u}mayTriggerNotifOfType(e,t){const n=this.getMember(t);if(!n)return!1;const r=this.getStateEvents(c.b.RoomPowerLevels,"");let i=50;return r&&r.getContent()&&r.getContent().notifications&&l.v(r.getContent().notifications[e])&&(i=r.getContent().notifications[e]),n.powerLevel>=i}getJoinRule(){var e;const t=this.getStateEvents(c.b.RoomJoinRules,"");return(null!==(e=null==t?void 0:t.getContent())&&void 0!==e?e:{}).join_rule||d.c.Invite}getHistoryVisibility(){var e;const t=this.getStateEvents(c.b.RoomHistoryVisibility,"");return(null!==(e=null==t?void 0:t.getContent())&&void 0!==e?e:{}).history_visibility||d.b.Shared}getGuestAccess(){var e;const t=this.getStateEvents(c.b.RoomGuestAccess,"");return(null!==(e=null==t?void 0:t.getContent())&&void 0!==e?e:{}).guest_access||d.a.Forbidden}findPredecessor(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0]){const e=this.getStateEvents(c.b.RoomPredecessor,"");if(e){const t=e.getContent(),n=t.predecessor_room_id;let r=t.last_known_event_id;if("string"!=typeof r&&(r=void 0),"string"==typeof n)return{roomId:n,eventId:r}}}const e=this.getStateEvents(c.b.RoomCreate,"");if(e){const t=e.getContent().predecessor;if(t){const e=t.room_id;if("string"==typeof e){let n=t.event_id;return"string"==typeof n&&""!==n||(n=void 0),{roomId:e,eventId:n}}}}return null}updateThirdPartyTokenCache(e){if(!e.getContent().third_party_invite)return;const t=(e.getContent().third_party_invite.signed||{}).token;if(!t)return;this.getStateEvents(c.b.RoomThirdPartyInvite,t)&&(this.tokenToInvite[t]=e)}updateDisplayNameCache(e,t){const n=this.userIdsToDisplayNames[e];if(delete this.userIdsToDisplayNames[e],n){const t=l.J(n),r=this.displayNameToUserIds.get(t);if(r){const n=r.filter((t=>t!==e));this.displayNameToUserIds.set(t,n)}}this.userIdsToDisplayNames[e]=t;const r=t&&l.J(t);if(r){var i;const t=null!==(i=this.displayNameToUserIds.get(r))&&void 0!==i?i:[];t.push(e),this.displayNameToUserIds.set(r,t)}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(13),i=n.n(r),o=n(205),a=n(125),s=n(131),l=n(142),c=n(677);const u=e=>l.b[e].settingNames.reduce(((e,t)=>{var n;const r=null===(n=Object(c.c)()[t])||void 0===n?void 0:n.default;return r&&e.push({action:t,keyCombo:r}),e}),[]),d={getMessageComposerBindings:()=>{const e=u(l.c.COMPOSER);return a.b.getValue("MessageComposerInput.ctrlEnterToSend")?(e.push({action:l.h.SendMessage,keyCombo:{key:o.b.ENTER,ctrlOrCmdKey:!0}}),e.push({action:l.h.NewLine,keyCombo:{key:o.b.ENTER}}),e.push({action:l.h.NewLine,keyCombo:{key:o.b.ENTER,shiftKey:!0}})):(e.push({action:l.h.SendMessage,keyCombo:{key:o.b.ENTER}}),e.push({action:l.h.NewLine,keyCombo:{key:o.b.ENTER,shiftKey:!0}}),o.a&&e.push({action:l.h.NewLine,keyCombo:{key:o.b.ENTER,altKey:!0}})),e},getAutocompleteBindings:()=>{const e=u(l.c.AUTOCOMPLETE);return e.push({action:l.h.ForceCompleteAutocomplete,keyCombo:{key:o.b.TAB}}),e.push({action:l.h.ForceCompleteAutocomplete,keyCombo:{key:o.b.TAB,ctrlKey:!0}}),e.push({action:l.h.CompleteAutocomplete,keyCombo:{key:o.b.ENTER}}),e.push({action:l.h.CompleteAutocomplete,keyCombo:{key:o.b.ENTER,ctrlKey:!0}}),e},getRoomListBindings:()=>u(l.c.ROOM_LIST),getRoomBindings:()=>{const e=u(l.c.ROOM);return a.b.getValue("ctrlFForSearch")&&e.push({action:l.h.SearchInRoom,keyCombo:{key:o.b.F,ctrlOrCmdKey:!0}}),e},getNavigationBindings:()=>u(l.c.NAVIGATION),getAccessibilityBindings:()=>u(l.c.ACCESSIBILITY),getCallBindings:()=>u(l.c.CALLS),getLabsBindings:()=>s.b.get("show_labs_settings")?u(l.c.LABS):[]};function h(e,t,n){var r,i,o,a,s,l,c,u;if(void 0!==t.key)if(e.shiftKey){if(e.key.toLowerCase()!==t.key.toLowerCase())return!1}else if(e.key!==t.key)return!1;const d=null!==(r=t.ctrlKey)&&void 0!==r&&r,h=null!==(i=t.altKey)&&void 0!==i&&i,p=null!==(o=t.shiftKey)&&void 0!==o&&o,m=null!==(a=t.metaKey)&&void 0!==a&&a,g=null!==(s=e.ctrlKey)&&void 0!==s&&s,f=null!==(l=e.altKey)&&void 0!==l&&l,_=null!==(c=e.shiftKey)&&void 0!==c&&c,b=null!==(u=e.metaKey)&&void 0!==u&&u;if(t.ctrlOrCmdKey){if(n){if(!b||g!==d||f!==h||_!==p)return!1}else if(!g||b!==m||f!==h||_!==p)return!1;return!0}return b===m&&g===d&&f===h&&_===p}const p=new class{constructor(){i()(this,"bindingsProviders",[d])}getAction(e,t){for(const n of e){const e=n().find((e=>h(t,e.keyCombo,o.a)));if(e)return e.action}}getMessageComposerAction(e){return this.getAction(this.bindingsProviders.map((e=>e.getMessageComposerBindings)),e)}getAutocompleteAction(e){return this.getAction(this.bindingsProviders.map((e=>e.getAutocompleteBindings)),e)}getRoomListAction(e){return this.getAction(this.bindingsProviders.map((e=>e.getRoomListBindings)),e)}getRoomAction(e){return this.getAction(this.bindingsProviders.map((e=>e.getRoomBindings)),e)}getNavigationAction(e){return this.getAction(this.bindingsProviders.map((e=>e.getNavigationBindings)),e)}getAccessibilityAction(e){return this.getAction(this.bindingsProviders.map((e=>e.getAccessibilityBindings)),e)}getCallAction(e){return this.getAction(this.bindingsProviders.map((e=>e.getCallBindings)),e)}getLabsAction(e){return this.getAction(this.bindingsProviders.map((e=>e.getLabsBindings)),e)}};function m(){return p}},function(e,t,n){"use strict";n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return c}));var r=n(13),i=n.n(r),o=n(17),a=n(1340),s=n.n(a);const l="update";class c extends o.EventEmitter{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),this.dispatcher=e,i()(this,"storeState",void 0),i()(this,"lock",new s.a),i()(this,"dispatcherRef",void 0),this.dispatcherRef=e.register(this.onDispatch.bind(this)),this.storeState=t}get state(){return this.storeState}stop(){this.dispatcherRef&&this.dispatcher.unregister(this.dispatcherRef)}async updateState(e){await this.lock.acquireAsync();try{this.storeState=Object.freeze(Object.assign({},this.storeState,e)),this.emit(l,this)}finally{await this.lock.release()}}async reset(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];await this.lock.acquireAsync();try{this.storeState=Object.freeze(e||{}),t||this.emit(l,this)}finally{await this.lock.release()}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return Y})),n.d(t,"b",(function(){return Q}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(124),l=n(183),c=n(189),u=n(523);class d{constructor(){i()(this,"password",void 0),i()(this,"passwordTimeoutId",void 0),i()(this,"clearPassword",(()=>{clearTimeout(this.passwordTimeoutId),this.passwordTimeoutId=void 0,this.password=void 0}))}setPassword(e){this.password=e,clearTimeout(this.passwordTimeoutId),this.passwordTimeoutId=setTimeout(this.clearPassword,3e5)}getPassword(){return this.password}}var h=n(125),p=n(131);const m=/[\x21-\x2F\x3A-\x40\x5B-\x60\x7B-\x7E]+/g;class g{constructor(e){this.stores=e,i()(this,"sortNames",new Map),i()(this,"loadedRooms",new Set),i()(this,"collator",void 0)}async loadMemberList(e,t){if(!this.stores.client)return{joined:[],invited:[]};const n=h.b.getValue("language");this.collator=new Intl.Collator(n,{sensitivity:"base",ignorePunctuation:!1});const r=await this.loadMembers(e),i=this.filterMembers(r,t);return i.joined.sort(((e,t)=>this.sortMembers(e,t))),i.invited.sort(((e,t)=>this.sortMembers(e,t))),{joined:i.joined,invited:i.invited}}async loadMembers(e){const t=this.stores.client.getRoom(e);if(!t)return[];if(!this.isLazyLoadingEnabled(e)||this.loadedRooms.has(e))return this.loadMembersInRoom(t);if(this.isLazyMemberStorageEnabled())try{await t.loadMembersIfNeeded()}catch(e){}else{t.currentState.markOutOfBandMembersStarted();const n=(await this.stores.client.members(e,void 0,"leave")).chunk.map(this.stores.client.getEventMapper());t.currentState.setOutOfBandMembers(n)}return this.loadedRooms.add(e),this.loadMembersInRoom(t)}loadMembersInRoom(e){const t=Object.values(e.currentState.members);return t.forEach((e=>{e.user||(e.user=this.stores.client.getUser(e.userId)||void 0)})),t}isLazyLoadingEnabled(e){return h.b.getValue("feature_sliding_sync")?!this.stores.client.isRoomEncrypted(e):this.stores.client.hasLazyLoadMembersEnabled()}isLazyMemberStorageEnabled(){return!h.b.getValue("feature_sliding_sync")&&this.stores.client.hasLazyLoadMembersEnabled()}isPresenceEnabled(){var e;if(!this.stores.client)return!0;const t=p.b.get("enable_presence_by_hs_url");return null===(e=null==t?void 0:t[this.stores.client.baseUrl])||void 0===e||e}filterMembers(e,t){const n={joined:[],invited:[]};return e.forEach((e=>{if("join"===e.membership||"invite"===e.membership){if(t){t=t.toLowerCase();const n=e.name.toLowerCase().includes(t),r=e.userId.toLowerCase().includes(t);if(!n&&!r)return}switch(e.membership){case"join":n.joined.push(e);break;case"invite":n.invited.push(e)}}})),n}sortMembers(e,t){const n=e.user,r=t.user;if(!n&&!r)return 0;if(n&&!r)return-1;if(!n&&r)return 1;const i=this.isPresenceEnabled();if(i){const e=e=>"unavailable"===e?"online":e,t=t=>{const n=["active","online","offline"],r=n.indexOf(e(t));return-1===r?n.length:r},i=t(n.currentlyActive?"active":n.presence),o=t(r.currentlyActive?"active":r.presence);if(i!==o)return i-o}return e.powerLevel!==t.powerLevel?t.powerLevel-e.powerLevel:i&&n.getLastActiveTs()!==r.getLastActiveTs()?r.getLastActiveTs()-n.getLastActiveTs():this.collator.compare(this.canonicalisedName(e.name),this.canonicalisedName(t.name))}canonicalisedName(e){let t=this.sortNames.get(e);return t||(t=("@"===e[0]?e.slice(1):e).replace(m,""),this.sortNames.set(e,t),t)}}var f=n(220),_=n(173),b=n(16),v=n(1),y=n(160),E=n(17),S=n.n(E),w=n(122),T=n(127),C=n(121),x=n(389),F=n(128),D=n(390),k=n(138),O=n(164),I=n(208),A=n(144),R=n(391),N=n(153),M=n(306),P=n(192),L=n(800);function B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const j={joining:!1,joinError:null,roomId:null,threadId:null,subscribingRoomId:null,initialEventId:null,initialEventPixelOffset:null,isInitialEventHighlighted:!1,initialEventScrollIntoView:!0,roomAlias:null,roomLoading:!1,roomLoadError:null,replyingToEvent:null,shouldPeek:!1,viaServers:[],wasContextSwitch:!1,viewingCall:!1};class G extends S.a{constructor(e,t){super(),this.stores=t,i()(this,"state",b.k(j)),i()(this,"dis",void 0),i()(this,"dispatchToken",void 0),i()(this,"onCurrentBroadcastRecordingChanged",(e=>{if(null===e){var t;const e=null===(t=this.stores.client)||void 0===t?void 0:t.getRoom(this.state.roomId||void 0);e&&this.doMaybeSetCurrentVoiceBroadcastPlayback(e)}})),this.resetDispatcher(e),this.stores.voiceBroadcastRecordingsStore.addListener(P.y.CurrentChanged,this.onCurrentBroadcastRecordingChanged)}addRoomListener(e,t){this.on(e,t)}removeRoomListener(e,t){this.off(e,t)}emitForRoom(e,t){this.emit(e,t)}setState(e){let t=!1;for(const n of Object.keys(e))if(this.state[n]!==e[n]){t=!0;break}if(!t)return;var n;e.viewingCall&&(null===(n=this.stores.voiceBroadcastPlaybacksStore.getCurrent())||void 0===n||n.pause(),this.stores.voiceBroadcastRecordingsStore.getCurrent()&&(Object(L.a)(),e.viewingCall=!1));const r=this.state.roomId;this.state=Object.assign(this.state,e),r!==this.state.roomId&&(r&&this.emitForRoom(r,!1),this.state.roomId&&this.emitForRoom(this.state.roomId,!0),this.dis.dispatch({action:F.a.ActiveRoomChanged,oldRoomId:r,newRoomId:this.state.roomId})),this.emit(N.b)}doMaybeSetCurrentVoiceBroadcastPlayback(e){Object(P.G)(e,this.stores.client,this.stores.voiceBroadcastPlaybacksStore,this.stores.voiceBroadcastRecordingsStore)}onRoomStateEvents(e){var t,n;const r=null===(t=e.getRoomId)||void 0===t?void 0:t.call(e);if(!r||r!==this.state.roomId)return;const i=null===(n=this.stores.client)||void 0===n?void 0:n.getRoom(r);i&&this.doMaybeSetCurrentVoiceBroadcastPlayback(i)}onDispatch(e){switch(e.action){case F.a.ViewRoom:this.viewRoom(e);break;case F.a.ViewThread:this.viewThread(e);break;case"view_welcome_page":case F.a.ViewHomePage:this.setState({roomId:null,roomAlias:null,viaServers:[],wasContextSwitch:!1,viewingCall:!1}),Object(P.F)(this.stores.voiceBroadcastPlaybacksStore);break;case"MatrixActions.RoomState.events":this.onRoomStateEvents(e.event);break;case F.a.ViewRoomError:this.viewRoomError(e);break;case"will_join":this.setState({joining:!0});break;case"cancel_join":this.setState({joining:!1});break;case F.a.JoinRoom:this.joinRoom(e);break;case F.a.JoinRoomError:this.joinRoomError(e);break;case F.a.JoinRoomReady:this.state.roomId===e.roomId&&this.setState({shouldPeek:!1}),Object(R.a)(w.a.get(),e.roomId).then((t=>{const n=t.getJoinedMemberCount(),r=n>1e3?"MoreThanAThousand":n>100?"OneHundredAndOneToAThousand":n>10?"ElevenToOneHundred":n>2?"ThreeToTen":n>1?"Two":"One";this.stores.posthogAnalytics.trackEvent({eventName:"JoinedRoom",trigger:e.metricsTrigger,roomSize:r,isDM:!!O.a.shared().getUserIdForRoomId(t.roomId),isSpace:t.isSpaceRoom()})}));break;case"on_client_not_viable":case F.a.OnLoggedOut:this.reset();break;case"reply_to_event":k.a.Thread!==e.context&&(e.event&&e.event.getRoomId()!==this.state.roomId?this.dis.dispatch({action:F.a.ViewRoom,room_id:e.event.getRoomId(),replyingToEvent:e.event,metricsTrigger:void 0}):this.setState({replyingToEvent:e.event}))}}async viewRoom(e){if(e.room_id){var t,n,r,i,o,a,s,l,c;const p=w.a.get().getRoom(e.room_id);if(null!==e.metricsTrigger&&e.room_id!==this.state.roomId){let t;if(this.stores.spaceStore.activeSpace===I.a.Home)t="Home";else if(Object(I.h)(this.stores.spaceStore.activeSpace))t="Meta";else{var u;t=(null===(u=this.stores.spaceStore.activeSpaceRoom)||void 0===u?void 0:u.getJoinRule())===y.c.Public?"Public":"Private"}this.stores.posthogAnalytics.trackEvent({eventName:"ViewRoom",trigger:e.metricsTrigger,viaKeyboard:e.metricsViaKeyboard,isDM:!!O.a.shared().getUserIdForRoomId(e.room_id),isSpace:null==p?void 0:p.isSpaceRoom(),activeSpace:t})}var d;if(h.b.getValue("feature_sliding_sync")&&this.state.roomId!==e.room_id)return this.state.subscribingRoomId&&this.state.subscribingRoomId!==e.room_id&&this.stores.slidingSyncManager.setRoomVisible(this.state.subscribingRoomId,!1),this.setState({subscribingRoomId:e.room_id,roomId:e.room_id,initialEventId:null,initialEventPixelOffset:null,isInitialEventHighlighted:null,initialEventScrollIntoView:!0,roomAlias:null,roomLoading:!0,roomLoadError:null,viaServers:e.via_servers,wasContextSwitch:e.context_switch,viewingCall:null!==(d=e.view_call)&&void 0!==d&&d}),await this.stores.slidingSyncManager.setRoomVisible(e.room_id,!0),this.state.subscribingRoomId!==e.room_id?void this.stores.slidingSyncManager.setRoomVisible(e.room_id,!1):void this.dis.dispatch(U({},e));const m={roomId:e.room_id,roomAlias:null!==(t=e.room_alias)&&void 0!==t?t:null,initialEventId:null!==(n=e.event_id)&&void 0!==n?n:null,isInitialEventHighlighted:null!==(r=e.highlighted)&&void 0!==r&&r,initialEventScrollIntoView:null===(i=e.scroll_into_view)||void 0===i||i,roomLoading:!1,roomLoadError:null,shouldPeek:void 0===e.should_peek||e.should_peek,joining:e.joining||!1,replyingToEvent:null,viaServers:null!==(o=e.via_servers)&&void 0!==o?o:[],wasContextSwitch:null!==(a=e.context_switch)&&void 0!==a&&a,viewingCall:null!==(s=e.view_call)&&void 0!==s?s:e.room_id===this.state.roomId?this.state.viewingCall:null!==M.a.instance.getActiveCall(e.room_id)};(null===(l=e.replyingToEvent)||void 0===l?void 0:l.getRoomId())===e.room_id?m.replyingToEvent=e.replyingToEvent:(null===(c=this.state.replyingToEvent)||void 0===c?void 0:c.getRoomId())===e.room_id&&(m.replyingToEvent=this.state.replyingToEvent),this.setState(m),e.auto_join&&this.dis.dispatch(U(U({},e),{},{action:F.a.JoinRoom,roomId:e.room_id,metricsTrigger:e.metricsTrigger})),p&&(((e,t)=>{const n=t.getCurrent();n&&"live"!==(null==n?void 0:n.getLiveness())&&(null==n?void 0:n.infoEvent.getRoomId())!==e.roomId&&(t.clearCurrent(),n.pause())})(p,this.stores.voiceBroadcastPlaybacksStore),this.doMaybeSetCurrentVoiceBroadcastPlayback(p))}else if(e.room_alias){let t=Object(x.a)(e.room_alias);if(!t){var p;this.setState({roomId:null,initialEventId:null,initialEventPixelOffset:null,isInitialEventHighlighted:!1,initialEventScrollIntoView:!0,roomAlias:e.room_alias,roomLoading:!0,roomLoadError:null,viaServers:e.via_servers,wasContextSwitch:e.context_switch,viewingCall:null!==(p=e.view_call)&&void 0!==p&&p});try{const n=await w.a.get().getRoomIdForAlias(e.room_alias);Object(x.b)(e.room_alias,n.room_id),t=n.room_id}catch(t){return v.a.error("RVS failed to get room id for alias: ",t),void this.dis.dispatch({action:F.a.ViewRoomError,room_id:null,room_alias:e.room_alias,err:t})}}this.dis.dispatch(U(U({},e),{},{room_id:t}))}}viewThread(e){this.setState({threadId:e.thread_id})}viewRoomError(e){this.setState({roomId:e.room_id,roomAlias:e.room_alias,roomLoading:!1,roomLoadError:e.err})}async joinRoom(e){this.setState({joining:!0});const t=w.a.get(),{roomAlias:n,roomId:r}=this.state,i=n||r,o=this.state.viaServers||[];try{await Object(D.a)((()=>t.joinRoom(i,U({viaServers:o},e.opts||{}))),5,(e=>504===e.httpStatus)),this.dis.dispatch({action:F.a.JoinRoomReady,roomId:r,metricsTrigger:e.metricsTrigger})}catch(e){this.dis.dispatch({action:F.a.JoinRoomError,roomId:r,err:e})}}getInvitingUserId(e){const t=w.a.get(),n=t.getRoom(e);if("invite"===(null==n?void 0:n.getMyMembership())){const e=n.getMember(t.getUserId()),r=e?e.events.member:null;return r&&r.getSender()}}showJoinRoomError(e,t){let n=e.message?e.message:JSON.stringify(e);if(v.a.log("Failed to join room:",n),"ConnectionError"===e.name)n=Object(C.a)("There was an error joining.");else if("M_INCOMPATIBLE_ROOM_VERSION"===e.errcode)n=a.a.createElement("div",null,Object(C.a)("Sorry, your homeserver is too old to participate here."),a.a.createElement("br",null),Object(C.a)("Please contact your homeserver administrator."));else if(404===e.httpStatus){const e=this.getInvitingUserId(t);e&&(n=e.endsWith(`:${w.a.get().getDomain()}`)?Object(C.a)("The person who invited you has already left."):Object(C.a)("The person who invited you has already left, or their server is offline.")),t===this.state.roomId&&0===this.state.viaServers.length&&(n=a.a.createElement("div",null,Object(C.a)("You attempted to join using a room ID without providing a list of servers to join through. Room IDs are internal identifiers and cannot be used to join a room without additional information."),a.a.createElement("br",null),a.a.createElement("br",null),Object(C.a)("If you know a room address, try joining through that instead.")))}T.b.createDialog(A.a,{title:Object(C.a)("Failed to join"),description:n})}joinRoomError(e){this.setState({joining:!1,joinError:e.err}),e.err&&this.showJoinRoomError(e.err,e.roomId)}reset(){this.state=Object.assign({},j)}resetDispatcher(e){this.dispatchToken&&this.dis.unregister(this.dispatchToken),this.dis=e,e&&(this.dispatchToken=this.dis.register(this.onDispatch.bind(this)))}getRoomId(){return this.state.roomId}getThreadId(){return this.state.threadId}getInitialEventId(){return this.state.initialEventId}isInitialEventHighlighted(){return this.state.isInitialEventHighlighted}initialEventScrollIntoView(){return this.state.initialEventScrollIntoView}getRoomAlias(){return this.state.roomAlias}isRoomLoading(){return this.state.roomLoading}getRoomLoadError(){return this.state.roomLoadError}isJoining(){return this.state.joining}getJoinError(){return this.state.joinError}getQuotingEvent(){return this.state.replyingToEvent}shouldPeek(){return this.state.shouldPeek}getWasContextSwitch(){return this.state.wasContextSwitch}isViewingCall(){return this.state.viewingCall}}var z=n(178),H=n(217),q=n(329);class V{constructor(e){this.context=e,i()(this,"typingStates",void 0),this.reset()}reset(){this.typingStates={}}setSelfTyping(e,t,n){var r;if(Object(H.a)(e))return;if(!h.b.getValue("sendTypingNotifications"))return;if(h.b.getValue("lowBandwidth"))return;if(t)return;let i=this.typingStates[e];!n&&!i||i&&i.isTyping===n||(i||(i=this.typingStates[e]={isTyping:n,serverTimer:new q.a(3e4),userTimer:new q.a(1e4)}),i.isTyping=n,n&&(i.serverTimer.isRunning()?i.serverTimer.restart():i.serverTimer.restart().finished().then((()=>{const t=this.typingStates[e];t&&(t.isTyping=!1)})),i.userTimer.isRunning()?i.userTimer.restart():i.userTimer.restart().finished().then((()=>{this.setSelfTyping(e,t,!1)}))),null===(r=this.context.client)||void 0===r||r.sendTyping(e,n,3e4))}}var $=n(207),K=n(587),W=n(234);const Y=Object(o.createContext)(void 0);Y.displayName="SDKContext";class Q{constructor(){i()(this,"client",void 0),i()(this,"_WidgetPermissionStore",void 0),i()(this,"_MemberListStore",void 0),i()(this,"_RightPanelStore",void 0),i()(this,"_RoomNotificationStateStore",void 0),i()(this,"_RoomViewStore",void 0),i()(this,"_WidgetLayoutStore",void 0),i()(this,"_WidgetStore",void 0),i()(this,"_PosthogAnalytics",void 0),i()(this,"_SlidingSyncManager",void 0),i()(this,"_SpaceStore",void 0),i()(this,"_LegacyCallHandler",void 0),i()(this,"_TypingStore",void 0),i()(this,"_VoiceBroadcastRecordingsStore",void 0),i()(this,"_VoiceBroadcastPreRecordingStore",void 0),i()(this,"_VoiceBroadcastPlaybacksStore",void 0),i()(this,"_AccountPasswordStore",void 0)}constructEagerStores(){this._RoomViewStore=this.roomViewStore}get legacyCallHandler(){return this._LegacyCallHandler||(this._LegacyCallHandler=l.b.instance),this._LegacyCallHandler}get rightPanelStore(){return this._RightPanelStore||(this._RightPanelStore=_.a.instance),this._RightPanelStore}get roomNotificationStateStore(){return this._RoomNotificationStateStore||(this._RoomNotificationStateStore=f.a.instance),this._RoomNotificationStateStore}get roomViewStore(){return this._RoomViewStore||(this._RoomViewStore=new G(s.a,this)),this._RoomViewStore}get widgetLayoutStore(){return this._WidgetLayoutStore||(this._WidgetLayoutStore=$.d.instance),this._WidgetLayoutStore}get widgetPermissionStore(){return this._WidgetPermissionStore||(this._WidgetPermissionStore=new K.b(this)),this._WidgetPermissionStore}get widgetStore(){return this._WidgetStore||(this._WidgetStore=W.a.instance),this._WidgetStore}get posthogAnalytics(){return this._PosthogAnalytics||(this._PosthogAnalytics=c.a.instance),this._PosthogAnalytics}get memberListStore(){return this._MemberListStore||(this._MemberListStore=new g(this)),this._MemberListStore}get slidingSyncManager(){return this._SlidingSyncManager||(this._SlidingSyncManager=u.a.instance),this._SlidingSyncManager}get spaceStore(){return this._SpaceStore||(this._SpaceStore=z.a.instance),this._SpaceStore}get typingStore(){return this._TypingStore||(this._TypingStore=new V(this),window.mxTypingStore=this._TypingStore),this._TypingStore}get voiceBroadcastRecordingsStore(){return this._VoiceBroadcastRecordingsStore||(this._VoiceBroadcastRecordingsStore=new P.x),this._VoiceBroadcastRecordingsStore}get voiceBroadcastPreRecordingStore(){return this._VoiceBroadcastPreRecordingStore||(this._VoiceBroadcastPreRecordingStore=new P.q),this._VoiceBroadcastPreRecordingStore}get voiceBroadcastPlaybacksStore(){return this._VoiceBroadcastPlaybacksStore||(this._VoiceBroadcastPlaybacksStore=new P.n(this.voiceBroadcastRecordingsStore)),this._VoiceBroadcastPlaybacksStore}get accountPasswordStore(){return this._AccountPasswordStore||(this._AccountPasswordStore=new d),this._AccountPasswordStore}}i()(Q,"instance",new Q)},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(126),l=n.n(s),c=n(121),u=n(135),d=n(145);class h extends a.a.Component{constructor(){super(...arguments),i()(this,"onOk",(()=>{this.props.onFinished(!0)})),i()(this,"onCancel",(()=>{this.props.onFinished(!1)}))}render(){let e="";return this.props.danger&&(e="danger"),a.a.createElement(u.a,{className:l()("mx_QuestionDialog",this.props.className),onFinished:this.props.onFinished,title:this.props.title,contentId:"mx_Dialog_content",headerImage:this.props.headerImage,hasCancel:this.props.hasCancelButton,fixedWidth:this.props.fixedWidth},a.a.createElement("div",{className:"mx_Dialog_content",id:"mx_Dialog_content"},this.props.description),a.a.createElement(d.a,{primaryButton:this.props.button||Object(c.a)("OK"),primaryButtonClass:e,primaryDisabled:this.props.buttonDisabled,cancelButton:this.props.cancelButton,hasCancel:this.props.hasCancelButton&&!this.props.quitOnly,onPrimaryButtonClick:this.onOk,focus:this.props.focus,onCancel:this.onCancel},this.props.extraButtons))}}i()(h,"defaultProps",{title:"",description:"",extraButtons:null,focus:!0,hasCancelButton:!0,danger:!1,quitOnly:!1})},function(e,t,n){"use strict";let r,i;n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i})),function(e){e.AdvancedEncryption="UIFeature.advancedEncryption",e.URLPreviews="UIFeature.urlPreviews",e.Widgets="UIFeature.widgets",e.Voip="UIFeature.voip",e.Feedback="UIFeature.feedback",e.Registration="UIFeature.registration",e.PasswordReset="UIFeature.passwordReset",e.Deactivate="UIFeature.deactivate",e.ShareQRCode="UIFeature.shareQrCode",e.ShareSocial="UIFeature.shareSocial",e.IdentityServer="UIFeature.identityServer",e.ThirdPartyID="UIFeature.thirdPartyId",e.AdvancedSettings="UIFeature.advancedSettings",e.RoomHistorySettings="UIFeature.roomHistorySettings",e.TimelineEnableRelativeDates="UIFeature.timelineEnableRelativeDates",e.BulkUnverifiedSessionsReminder="UIFeature.BulkUnverifiedSessionsReminder"}(r||(r={})),function(e){e.InviteUsers="UIComponent.sendInvites",e.CreateRooms="UIComponent.roomCreation",e.CreateSpaces="UIComponent.spaceCreation",e.ExploreRooms="UIComponent.exploreRooms",e.AddIntegrations="UIComponent.addIntegrations"}(i||(i={}))},function(e,t,n){"use strict";var r=n(13),i=n.n(r),o=n(124),a=n(128);class s{constructor(){i()(this,"platform",null)}get(){return this.platform}set(e){this.platform=e,o.a.dispatch({action:a.a.PlatformSet,platform:e})}}window.mxPlatformPeg||(window.mxPlatformPeg=new s),t.a=window.mxPlatformPeg},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(17);let i;!function(e){e.NewListener="newListener",e.RemoveListener="removeListener",e.Error="error"}(i||(i={}));class o extends r.EventEmitter{addListener(e,t){return super.addListener(e,t)}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return super.emit(e,...n)}eventNames(){return super.eventNames()}listenerCount(e){return super.listenerCount(e)}listeners(e){return super.listeners(e)}off(e,t){return super.off(e,t)}on(e,t){return super.on(e,t)}once(e,t){return super.once(e,t)}prependListener(e,t){return super.prependListener(e,t)}prependOnceListener(e,t){return super.prependOnceListener(e,t)}removeAllListeners(e){return super.removeAllListeners(e)}removeListener(e,t){return super.removeListener(e,t)}rawListeners(e){return super.rawListeners(e)}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return h}));var r=n(13),i=n.n(r),o=n(120),a=n(426),s=n(362),l=n(189);const c={[s.a.LOADING]:"Loading",[s.a.WELCOME]:"Welcome",[s.a.LOGIN]:"Login",[s.a.REGISTER]:"Register",[s.a.USE_CASE_SELECTION]:"UseCaseSelection",[s.a.FORGOT_PASSWORD]:"ForgotPassword",[s.a.COMPLETE_SECURITY]:"CompleteSecurity",[s.a.E2E_SETUP]:"E2ESetup",[s.a.SOFT_LOGOUT]:"SoftLogout"},u={[a.a.HomePage]:"Home",[a.a.RoomView]:"Room",[a.a.UserView]:"User"};class d{constructor(){i()(this,"view",s.a.LOADING),i()(this,"pageType",void 0),i()(this,"override",void 0)}static get instance(){return d.internalInstance||(d.internalInstance=new d),d.internalInstance}trackPageChange(e,t,n){this.view=e,this.pageType=t,this.override||this.trackPage(n)}trackPage(e){const t=this.view===s.a.LOGGED_IN?u[this.pageType]:c[this.view];l.a.instance.trackEvent({eventName:"$pageview",$current_url:t,durationMs:e})}trackOverride(e){e&&(this.override=e,l.a.instance.trackEvent({eventName:"$pageview",$current_url:e}))}clearOverride(e){e===this.override&&(this.override=void 0,this.trackPage())}static trackInteraction(e,t,n){let r;"click"===(null==t?void 0:t.type)?r="Pointer":null!=t&&t.type.startsWith("key")&&(r="Keyboard"),l.a.instance.trackEvent({eventName:"Interaction",interactionType:r,index:n,name:e})}}i()(d,"internalInstance",void 0);class h extends o.PureComponent{componentDidMount(){d.instance.trackOverride(this.props.screenName)}componentDidUpdate(){d.instance.trackOverride(this.props.screenName)}componentWillUnmount(){d.instance.clearOverride(this.props.screenName)}render(){return null}}},function(e,t,n){"use strict";let r,i,o,a,s,l;n.d(t,"f",(function(){return r})),n.d(t,"d",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"e",(function(){return a})),n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return l})),function(e){e.Public="public",e.Private="private"}(r||(r={})),function(e){e.PrivateChat="private_chat",e.TrustedPrivateChat="trusted_private_chat",e.PublicChat="public_chat"}(i||(i={})),function(e){e.Public="public",e.Invite="invite",e.Private="private",e.Knock="knock",e.Restricted="restricted"}(o||(o={})),function(e){e.RoomMembership="m.room_membership"}(a||(a={})),function(e){e.CanJoin="can_join",e.Forbidden="forbidden"}(s||(s={})),function(e){e.Invited="invited",e.Joined="joined",e.Shared="shared",e.WorldReadable="world_readable"}(l||(l={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return g}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(186),l=n.n(s),c=n(126),u=n.n(c),d=n(195),h=n(185);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}let m;!function(e){e[e.Natural=0]="Natural",e[e.Left=1]="Left",e[e.Right=2]="Right",e[e.Top=3]="Top",e[e.Bottom=4]="Bottom",e[e.InnerBottom=5]="InnerBottom",e[e.TopRight=6]="TopRight"}(m||(m={}));class g extends a.a.PureComponent{constructor(e){super(e),i()(this,"parent",null),i()(this,"updatePosition",(()=>{if(!this.props.visible||!this.parent)return;const e=this.parent.getBoundingClientRect(),t=d.b.instance.windowWidth,n=this.props.maxParentWidth?Math.min(e.width,this.props.maxParentWidth):e.width,r=e.top+window.scrollY,i=e.top+window.scrollY+e.height/2,o=t-e.left-window.scrollX,a=e.right+window.scrollX,s=e.left-window.scrollX+n/2,l={};switch(this.props.alignment){case m.Natural:if(e.right>t/2){l.right=o+6,l.top=i,l.transform="translateY(-50%)";break}case m.Right:l.left=a+6,l.top=i,l.transform="translateY(-50%)";break;case m.Left:l.right=o+6,l.top=i,l.transform="translateY(-50%)";break;case m.Top:l.top=r-6,l.transform=`translate(max(10px, min(calc(${s}px - 50%), calc(100vw - 100% - 10px))), -100%)`;break;case m.Bottom:l.top=r+e.height+6,l.transform=`translate(max(10px, min(calc(${s}px - 50%), calc(100vw - 100% - 10px))))`;break;case m.InnerBottom:l.top=r+e.height-50,l.transform=`translate(max(10px, min(calc(${s}px - 50%), calc(100vw - 100% - 10px))))`;break;case m.TopRight:l.top=r-6,l.right=t-e.right-window.scrollX,l.transform="translateY(-100%)"}this.setState(l)})),this.state={},g.container||(g.container=document.createElement("div"),g.container.className="mx_Tooltip_wrapper",document.body.appendChild(g.container))}componentDidMount(){var e,t;window.addEventListener("scroll",this.updatePosition,{passive:!0,capture:!0}),this.parent=null!==(e=null===(t=l.a.findDOMNode(this))||void 0===t?void 0:t.parentNode)&&void 0!==e?e:null,this.updatePosition()}componentDidUpdate(e){Object(h.c)(e,this.props)&&this.updatePosition()}componentWillUnmount(){window.removeEventListener("scroll",this.updatePosition,{capture:!0})}render(){const e=u()("mx_Tooltip",this.props.tooltipClassName,{mx_Tooltip_visible:this.props.visible,mx_Tooltip_invisible:!this.props.visible}),t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},this.state);t.display=this.props.visible?"block":"none";const n=a.a.createElement("div",{role:"tooltip",className:e,style:t},a.a.createElement("div",{className:"mx_Tooltip_chevron"}),this.props.label);return a.a.createElement("div",{className:this.props.className},l.a.createPortal(n,g.container))}}i()(g,"container",void 0),i()(g,"Alignment",m),i()(g,"defaultProps",{visible:!0,alignment:m.Natural})},function(e,t,n){"use strict";n.d(t,"a",(function(){return C}));var r=n(130),i=n.n(r),o=n(132),a=n.n(o),s=n(13),l=n.n(s),c=n(120),u=n.n(c),d=n(151),h=n(126),p=n.n(h),m=n(129),g=n(191),f=n(406),_=n(122),b=n(127),v=n(259),y=n(164),E=n(166),S=n(297),w=n(146);const T=["room","oobData","viewAvatarOnClick","onClick","className"];class C extends u.a.Component{constructor(e){super(e),l()(this,"onRoomStateEvents",(e=>{var t;e.getRoomId()===(null===(t=this.props.room)||void 0===t?void 0:t.roomId)&&e.getType()===m.b.RoomAvatar&&this.setState({urls:C.getImageUrls(this.props)})})),l()(this,"onRoomAvatarClick",(()=>{var e,t;const n={src:v.b(null!==(e=this.props.room)&&void 0!==e?e:null,void 0,void 0,void 0),name:null===(t=this.props.room)||void 0===t?void 0:t.name};b.b.createDialog(f.a,n,"mx_Dialog_lightbox",void 0,!0)})),this.state={urls:C.getImageUrls(this.props)}}componentDidMount(){_.a.get().on(d.b.Events,this.onRoomStateEvents)}componentWillUnmount(){var e;null===(e=_.a.get())||void 0===e||e.removeListener(d.b.Events,this.onRoomStateEvents)}static getDerivedStateFromProps(e){return{urls:C.getImageUrls(e)}}static getImageUrls(e){let t=null;return e.oobData.avatarUrl&&(t=Object(E.b)(e.oobData.avatarUrl).getThumbnailOfSourceHttp(e.width,e.height,e.resizeMethod)),Object(w.n)([t,C.getRoomAvatarUrl(e)])}static getRoomAvatarUrl(e){return e.room?v.b(e.room,e.width,e.height,e.resizeMethod):null}get roomIdName(){var e,t;const n=this.props.room;if(n){const e=y.a.shared().getUserIdForRoomId(n.roomId);if(e)return e;if(n instanceof S.b&&1===n.targets.length)return n.targets[0].userId}return(null===(e=this.props.room)||void 0===e?void 0:e.roomId)||(null===(t=this.props.oobData)||void 0===t?void 0:t.roomId)}render(){var e,t,n,r;const o=this.props,{room:s,oobData:l,viewAvatarOnClick:c,onClick:d,className:h}=o,f=a()(o,T),_=null!==(e=null!==(t=null==s?void 0:s.name)&&void 0!==t?t:l.name)&&void 0!==e?e:"?";return u.a.createElement(g.a,i()({},f,{className:p()(h,{mx_RoomAvatar_isSpaceRoom:(null!==(n=null==s?void 0:s.getType())&&void 0!==n?n:null===(r=this.props.oobData)||void 0===r?void 0:r.roomType)===m.j.Space}),name:_,idName:this.roomIdName,urls:this.state.urls,onClick:c&&this.state.urls[0]?this.onRoomAvatarClick:d}))}}l()(C,"defaultProps",{width:36,height:36,resizeMethod:"crop",oobData:{}})},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(773),i=n(774),o=n(577),a=n(304),s=n(1373),l=n(263),c=n(455),u=n(776),d=n(1374),h=n(777),p=n(580),m=n(385),g=n(1375),f=n(1376),_=n(1377),b=n(1378),v=n(579),y=n(578),E=n(775),S=n(779),w=n(781),T=n(1379),C=n(778),x=n(782),F=n(1380),D=n(1381),k=n(1382),O=n(780);t.getDomElement=r.getDomElement,t.getLocationHref=r.getLocationHref,t.htmlTreeAsString=r.htmlTreeAsString,t.dsnFromString=i.dsnFromString,t.dsnToString=i.dsnToString,t.makeDsn=i.makeDsn,t.SentryError=o.SentryError,t.GLOBAL_OBJ=a.GLOBAL_OBJ,t.getGlobalObject=a.getGlobalObject,t.getGlobalSingleton=a.getGlobalSingleton,t.addInstrumentationHandler=s.addInstrumentationHandler,t.isDOMError=l.isDOMError,t.isDOMException=l.isDOMException,t.isElement=l.isElement,t.isError=l.isError,t.isErrorEvent=l.isErrorEvent,t.isEvent=l.isEvent,t.isInstanceOf=l.isInstanceOf,t.isNaN=l.isNaN,t.isPlainObject=l.isPlainObject,t.isPrimitive=l.isPrimitive,t.isRegExp=l.isRegExp,t.isString=l.isString,t.isSyntheticEvent=l.isSyntheticEvent,t.isThenable=l.isThenable,t.CONSOLE_LEVELS=c.CONSOLE_LEVELS,t.consoleSandbox=c.consoleSandbox,Object.defineProperty(t,"logger",{enumerable:!0,get:()=>c.logger}),t.memoBuilder=u.memoBuilder,t.addContextToFrame=d.addContextToFrame,t.addExceptionMechanism=d.addExceptionMechanism,t.addExceptionTypeValue=d.addExceptionTypeValue,t.arrayify=d.arrayify,t.checkOrSetAlreadyCaught=d.checkOrSetAlreadyCaught,t.getEventDescription=d.getEventDescription,t.parseSemver=d.parseSemver,t.uuid4=d.uuid4,t.dynamicRequire=h.dynamicRequire,t.isNodeEnv=h.isNodeEnv,t.loadModule=h.loadModule,t.normalize=p.normalize,t.normalizeToSize=p.normalizeToSize,t.walk=p.walk,t.addNonEnumerableProperty=m.addNonEnumerableProperty,t.convertToPlainObject=m.convertToPlainObject,t.dropUndefinedKeys=m.dropUndefinedKeys,t.extractExceptionKeysForMessage=m.extractExceptionKeysForMessage,t.fill=m.fill,t.getOriginalFunction=m.getOriginalFunction,t.markFunctionWrapped=m.markFunctionWrapped,t.objectify=m.objectify,t.urlEncode=m.urlEncode,t.basename=g.basename,t.dirname=g.dirname,t.isAbsolute=g.isAbsolute,t.join=g.join,t.normalizePath=g.normalizePath,t.relative=g.relative,t.resolve=g.resolve,t.makePromiseBuffer=f.makePromiseBuffer,t.addRequestDataToEvent=_.addRequestDataToEvent,t.addRequestDataToTransaction=_.addRequestDataToTransaction,t.extractPathForTransaction=_.extractPathForTransaction,t.extractRequestData=_.extractRequestData,t.severityFromString=b.severityFromString,t.severityLevelFromString=b.severityLevelFromString,t.validSeverityLevels=b.validSeverityLevels,t.createStackParser=v.createStackParser,t.getFunctionName=v.getFunctionName,t.nodeStackLineParser=v.nodeStackLineParser,t.stackParserFromStackParserOptions=v.stackParserFromStackParserOptions,t.stripSentryFramesAndReverse=v.stripSentryFramesAndReverse,t.escapeStringForRegex=y.escapeStringForRegex,t.isMatchingPattern=y.isMatchingPattern,t.safeJoin=y.safeJoin,t.snipLine=y.snipLine,t.stringMatchesSomePattern=y.stringMatchesSomePattern,t.truncate=y.truncate,t.isNativeFetch=E.isNativeFetch,t.supportsDOMError=E.supportsDOMError,t.supportsDOMException=E.supportsDOMException,t.supportsErrorEvent=E.supportsErrorEvent,t.supportsFetch=E.supportsFetch,t.supportsHistory=E.supportsHistory,t.supportsNativeFetch=E.supportsNativeFetch,t.supportsReferrerPolicy=E.supportsReferrerPolicy,t.supportsReportingObserver=E.supportsReportingObserver,t.SyncPromise=S.SyncPromise,t.rejectedSyncPromise=S.rejectedSyncPromise,t.resolvedSyncPromise=S.resolvedSyncPromise,Object.defineProperty(t,"_browserPerformanceTimeOriginMode",{enumerable:!0,get:()=>w._browserPerformanceTimeOriginMode}),t.browserPerformanceTimeOrigin=w.browserPerformanceTimeOrigin,t.dateTimestampInSeconds=w.dateTimestampInSeconds,t.timestampInSeconds=w.timestampInSeconds,t.timestampWithMs=w.timestampWithMs,t.usingPerformanceAPI=w.usingPerformanceAPI,t.TRACEPARENT_REGEXP=T.TRACEPARENT_REGEXP,t.extractTraceparentData=T.extractTraceparentData,t.getSDKSource=C.getSDKSource,t.isBrowserBundle=C.isBrowserBundle,t.addItemToEnvelope=x.addItemToEnvelope,t.createAttachmentEnvelopeItem=x.createAttachmentEnvelopeItem,t.createEnvelope=x.createEnvelope,t.createEventEnvelopeHeaders=x.createEventEnvelopeHeaders,t.envelopeContainsItemType=x.envelopeContainsItemType,t.envelopeItemTypeToDataCategory=x.envelopeItemTypeToDataCategory,t.forEachEnvelopeItem=x.forEachEnvelopeItem,t.getSdkMetadataForEnvelopeHeader=x.getSdkMetadataForEnvelopeHeader,t.parseEnvelope=x.parseEnvelope,t.serializeEnvelope=x.serializeEnvelope,t.createClientReportEnvelope=F.createClientReportEnvelope,t.DEFAULT_RETRY_AFTER=D.DEFAULT_RETRY_AFTER,t.disabledUntil=D.disabledUntil,t.isRateLimited=D.isRateLimited,t.parseRetryAfterHeader=D.parseRetryAfterHeader,t.updateRateLimits=D.updateRateLimits,t.BAGGAGE_HEADER_NAME=k.BAGGAGE_HEADER_NAME,t.MAX_BAGGAGE_STRING_LENGTH=k.MAX_BAGGAGE_STRING_LENGTH,t.SENTRY_BAGGAGE_KEY_PREFIX=k.SENTRY_BAGGAGE_KEY_PREFIX,t.SENTRY_BAGGAGE_KEY_PREFIX_REGEX=k.SENTRY_BAGGAGE_KEY_PREFIX_REGEX,t.baggageHeaderToDynamicSamplingContext=k.baggageHeaderToDynamicSamplingContext,t.dynamicSamplingContextToSentryBaggageHeader=k.dynamicSamplingContextToSentryBaggageHeader,t.getNumberOfUrlSegments=O.getNumberOfUrlSegments,t.parseUrl=O.parseUrl,t.stripUrlQueryAndFragment=O.stripUrlQueryAndFragment},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(13),i=n.n(r),o=n(149),a=n(147),s=n(1),l=n(129),c=n(122);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class h{constructor(e){var t,n;this.matrixClient=e,i()(this,"roomToUser",null),i()(this,"userToRooms",null),i()(this,"hasSentOutPatchDirectAccountDataPatch",void 0),i()(this,"mDirectEvent",void 0),i()(this,"onAccountData",(e=>{e.getType()==l.b.Direct&&(this.mDirectEvent=d({},e.getContent()),this.userToRooms=null,this.roomToUser=null)})),this.hasSentOutPatchDirectAccountDataPatch=!1;const r=null!==(t=null===(n=e.getAccountData(l.b.Direct))||void 0===n?void 0:n.getContent())&&void 0!==t?t:{};this.mDirectEvent=d({},r)}static makeShared(){return h.sharedInstance=new h(c.a.get()),h.sharedInstance}static setShared(e){h.sharedInstance=e}static shared(){return h.sharedInstance}start(){this.populateRoomToUser(),this.matrixClient.on(a.b.AccountData,this.onAccountData)}stop(){this.matrixClient.removeListener(a.b.AccountData,this.onAccountData)}patchUpSelfDMs(e){const t=this.matrixClient.getUserId(),n=e[t];if(n){const r=n.map((e=>{const n=this.matrixClient.getRoom(e);if(n){const r=n.guessDMUserId();if(r&&r!==t)return{userId:r,roomId:e}}})).filter((e=>!!e));return!!r.length&&(e[t]=n.filter((e=>!r.some((t=>t.roomId===e)))),r.forEach((t=>{let{userId:n,roomId:r}=t;const i=e[n];i?(i.push(r),e[n]=Object(o.uniq)(i)):e[n]=[r]})),!0)}return!1}getDMRoomsForUserId(e){return this.getUserToRooms()[e]||[]}getDMRoomForIdentifiers(e){let t=this.getDMRoomsForUserId(e[0]);for(let n=1;n<e.length;n++){const r=this.getDMRoomsForUserId(e[n]);t=t.filter((e=>r.includes(e)))}return t.map((e=>c.a.get().getRoom(e))).filter((e=>e&&"join"===e.getMyMembership()))[0]}getUserIdForRoomId(e){if(null==this.roomToUser&&this.populateRoomToUser(),void 0===this.roomToUser[e]){const t=this.matrixClient.getRoom(e);if(t)return t.getDMInviter()}return this.roomToUser[e]}getUniqueRoomsWithIndividuals(){return this.roomToUser?Object.keys(this.roomToUser).map((e=>({userId:this.getUserIdForRoomId(e),room:this.matrixClient.getRoom(e)}))).filter((e=>e.userId&&e.room&&2===e.room.getInvitedAndJoinedMemberCount())).reduce(((e,t)=>(e[t.userId]=t.room)&&e),{}):{}}getRoomIds(){return Object.values(this.mDirectEvent).reduce(((e,t)=>(t.forEach((t=>e.add(t))),e)),new Set)}getUserToRooms(){if(!this.userToRooms){const e=this.mDirectEvent,t=e[this.matrixClient.getUserId()];if(null!=t&&t.length){const t=this.patchUpSelfDMs(e);s.a.warn("Invalid m.direct account data detected (self-chats that shouldn't be), patching it up."),t&&!this.hasSentOutPatchDirectAccountDataPatch&&(this.hasSentOutPatchDirectAccountDataPatch=!0,this.matrixClient.setAccountData(l.b.Direct,e))}this.userToRooms=e}return this.userToRooms}populateRoomToUser(){this.roomToUser={};for(const e of Object.keys(this.getUserToRooms()))for(const t of this.userToRooms[e])this.roomToUser[t]=e}}i()(h,"sharedInstance",void 0)},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"g",(function(){return c})),n.d(t,"c",(function(){return u})),n.d(t,"h",(function(){return d})),n.d(t,"m",(function(){return h})),n.d(t,"l",(function(){return p})),n.d(t,"n",(function(){return m})),n.d(t,"o",(function(){return _})),n.d(t,"d",(function(){return b})),n.d(t,"e",(function(){return v})),n.d(t,"f",(function(){return y})),n.d(t,"k",(function(){return E})),n.d(t,"b",(function(){return C})),n.d(t,"j",(function(){return x})),n.d(t,"i",(function(){return F}));var r=n(121);function i(){return[Object(r.a)("Sun"),Object(r.a)("Mon"),Object(r.a)("Tue"),Object(r.a)("Wed"),Object(r.a)("Thu"),Object(r.a)("Fri"),Object(r.a)("Sat")]}function o(){return[Object(r.a)("Jan"),Object(r.a)("Feb"),Object(r.a)("Mar"),Object(r.a)("Apr"),Object(r.a)("May"),Object(r.a)("Jun"),Object(r.a)("Jul"),Object(r.a)("Aug"),Object(r.a)("Sep"),Object(r.a)("Oct"),Object(r.a)("Nov"),Object(r.a)("Dec")]}function a(e){return(e<10?"0":"")+e}function s(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.getHours()%12;const i=a(e.getMinutes()),o=e.getHours()>=12?Object(r.a)("PM"):Object(r.a)("AM");if(n=n||12,t){return`${n}:${i}:${a(e.getSeconds())}${o}`}return`${n}:${i}${o}`}function l(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=new Date,a=i(),s=o();return e.toDateString()===n.toDateString()?h(e,t):n.getTime()-e.getTime()<5184e5?Object(r.a)("%(weekDayName)s %(time)s",{weekDayName:a[e.getDay()],time:h(e,t)}):n.getFullYear()===e.getFullYear()?Object(r.a)("%(weekDayName)s, %(monthName)s %(day)s %(time)s",{weekDayName:a[e.getDay()],monthName:s[e.getMonth()],day:e.getDate(),time:h(e,t)}):u(e,t)}function c(e){const t=i(),n=o();return Object(r.a)("%(weekDayName)s, %(monthName)s %(day)s %(fullYear)s",{weekDayName:t[e.getDay()],monthName:n[e.getMonth()],day:e.getDate(),fullYear:e.getFullYear()})}function u(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const a=i(),s=o();return Object(r.a)("%(weekDayName)s, %(monthName)s %(day)s %(fullYear)s %(time)s",{weekDayName:a[e.getDay()],monthName:s[e.getMonth()],day:e.getDate(),fullYear:e.getFullYear(),time:n?d(e,t):h(e,t)})}function d(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?s(e,!0):a(e.getHours())+":"+a(e.getMinutes())+":"+a(e.getSeconds())}function h(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?s(e):a(e.getHours())+":"+a(e.getMinutes())}function p(e){const t=e<0;e=Math.abs(e);const n=Math.floor(e/3600).toFixed(0).padStart(2,"0");let r="";return"00"!==n&&(r+=`${n}:`),r+=`${Math.floor(e%3600/60).toFixed(0).padStart(2,"0")}:${Math.floor(e%3600%60).toFixed(0).padStart(2,"0")}`,t&&(r="-"+r),r}function m(e){const t=Math.floor(e/3600).toFixed(0),n=Math.floor(e%3600/60).toFixed(0),i=Math.floor(e%3600%60).toFixed(0);return"0"!==t?Object(r.a)("%(hours)sh %(minutes)sm %(seconds)ss left",{hours:t,minutes:n,seconds:i}):"0"!==n?Object(r.a)("%(minutes)sm %(seconds)ss left",{minutes:n,seconds:i}):Object(r.a)("%(seconds)ss left",{seconds:i})}const g=864e5;function f(e,t){return Math.abs(e.getTime()-t.getTime())<=g}function _(e,t){return!(!t||!e)&&(!f(e,t)||e.getDay()!==t.getDay())}function b(e){return Object(r.a)("%(date)s at %(time)s",{date:e.toLocaleDateString().replace(/\//g,"-"),time:e.toLocaleTimeString().replace(/:/g,"-")})}function v(e){return e.toISOString()}function y(e){return e.getFullYear()+"/"+a(e.getMonth()+1)+"/"+a(e.getDate())}function E(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=new Date(Date.now());if(f(e,n))return h(e,t);{let t=`${o()[e.getMonth()]} ${e.getDate()}`;return r=n,e.getFullYear()!==r.getFullYear()&&(t+=`, ${e.getFullYear()}`),t}var r}const S=6e4,w=60*S,T=24*w;function C(e){return e>=T?Object(r.a)("%(value)sd",{value:Math.round(e/T)}):e>=w?Object(r.a)("%(value)sh",{value:Math.round(e/w)}):e>=S?Object(r.a)("%(value)sm",{value:Math.round(e/S)}):Object(r.a)("%(value)ss",{value:Math.round(e/1e3)})}function x(e){const t=Math.floor(e/T),n=Math.floor(e%T/w),i=Math.floor(e%w/S),o=Math.floor(e%S/1e3);return t>0?Object(r.a)("%(days)sd %(hours)sh %(minutes)sm %(seconds)ss",{days:t,hours:n,minutes:i,seconds:o}):n>0?Object(r.a)("%(hours)sh %(minutes)sm %(seconds)ss",{hours:n,minutes:i,seconds:o}):i>0?Object(r.a)("%(minutes)sm %(seconds)ss",{minutes:i,seconds:o}):Object(r.a)("%(value)ss",{value:o})}const F=e=>new Intl.DateTimeFormat(void 0,{day:"2-digit",month:"2-digit",year:"2-digit"}).format(e)},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return l}));var r=n(13),i=n.n(r),o=n(122);class a{constructor(e,t){if(this.prepared=e,i()(this,"client",void 0),this.client=null!=t?t:o.a.get(),!this.client)throw new Error("No possible MatrixClient for media resolution. Please provide one or log in.")}get isEncrypted(){return!!this.prepared.file}get srcMxc(){return this.prepared.mxc}get thumbnailMxc(){var e;return null===(e=this.prepared.thumbnail)||void 0===e?void 0:e.mxc}get hasThumbnail(){return!!this.thumbnailMxc}get srcHttp(){return this.client.mxcUrlToHttp(this.srcMxc)}get thumbnailHttp(){return this.hasThumbnail?this.client.mxcUrlToHttp(this.thumbnailMxc):null}getThumbnailHttp(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"scale";return this.hasThumbnail?(e=Math.floor(e*window.devicePixelRatio),t=Math.floor(t*window.devicePixelRatio),this.client.mxcUrlToHttp(this.thumbnailMxc,e,t,n)):null}getThumbnailOfSourceHttp(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"scale";return e=Math.floor(e*window.devicePixelRatio),t=Math.floor(t*window.devicePixelRatio),this.client.mxcUrlToHttp(this.srcMxc,e,t,n)}getSquareThumbnailHttp(e){return e=Math.floor(e*window.devicePixelRatio),this.hasThumbnail?this.getThumbnailHttp(e,e,"crop"):this.getThumbnailOfSourceHttp(e,e,"crop")}downloadSource(){return fetch(this.srcHttp)}}function s(e,t){return new a(function(e){var t,n,r,i;let o;if(null!=e&&null!==(t=e.info)&&void 0!==t&&t.thumbnail_url?o={mxc:e.info.thumbnail_url,file:e.info.thumbnail_file}:null!=e&&null!==(n=e.info)&&void 0!==n&&null!==(r=n.thumbnail_file)&&void 0!==r&&r.url&&(o={mxc:e.info.thumbnail_file.url,file:e.info.thumbnail_file}),null!=e&&e.url)return{thumbnail:o,mxc:e.url,file:e.file};if(null!=e&&null!==(i=e.file)&&void 0!==i&&i.url)return{thumbnail:o,mxc:e.file.url,file:e.file};throw new Error("Invalid file provided: cannot determine MXC URI. Has it been redacted?")}(e),t)}function l(e,t){return s({url:e},t)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(120),i=n(125);const o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const[o,a]=Object(r.useState)(i.b.getValue(e,t,n));return Object(r.useEffect)((()=>{const r=i.b.watchSetting(e,t,(()=>{a(i.b.getValue(e,t,n))}));return()=>{i.b.unwatchSetting(r)}}),[e,t,n]),o},a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const[n,o]=Object(r.useState)(i.b.getValue(e,t));return Object(r.useEffect)((()=>{const n=i.b.watchSetting(e,t,(()=>{o(i.b.getValue(e,t))}));return()=>{i.b.unwatchSetting(n)}}),[e,t]),n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return w})),n.d(t,"g",(function(){return T})),n.d(t,"i",(function(){return C})),n.d(t,"h",(function(){return x})),n.d(t,"f",(function(){return F})),n.d(t,"k",(function(){return D})),n.d(t,"l",(function(){return k})),n.d(t,"d",(function(){return O})),n.d(t,"j",(function(){return A})),n.d(t,"e",(function(){return R})),n.d(t,"c",(function(){return N})),n.d(t,"b",(function(){return L}));var r=n(13),i=n.n(r),o=n(1046),a=n.n(o),s=n(16),l=n(1),c=n(151),u=n(129),d=n(122);class h{forEvent(e,t){throw new Error("Not implemented")}forRoom(e){throw new Error("Not implemented")}forUser(e){throw new Error("Not implemented")}forEntity(e){throw new Error("Not implemented")}isPermalinkHost(e){throw new Error("Not implemented")}parsePermalink(e){throw new Error("Not implemented")}}class p{constructor(e,t,n,r){this.roomIdOrAlias=e,this.eventId=t,this.userId=n,this.viaServers=r}static forUser(e){return new p(null,null,e,null)}static forRoom(e){return new p(e,null,null,arguments.length>1&&void 0!==arguments[1]?arguments[1]:[])}static forEvent(e,t){return new p(e,t,null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:[])}get primaryEntityId(){return this.roomIdOrAlias||this.userId}get sigil(){var e;return(null===(e=this.primaryEntityId)||void 0===e?void 0:e[0])||"?"}}const m="matrix.to",g=`https://${m}`,f=`^(?:https?://)?${m.replace(".","\\.")}/#/(.*)`;class _ extends h{constructor(){super()}forEvent(e,t,n){return`${g}/#/${e}/${t}${this.encodeServerCandidates(n)}`}forRoom(e,t){return`${g}/#/${e}${this.encodeServerCandidates(t)}`}forUser(e){return`${g}/#/${e}`}forEntity(e){return`${g}/#/${e}`}isPermalinkHost(e){return e===m}encodeServerCandidates(e){return e&&0!==e.length?`?via=${e.map((e=>encodeURIComponent(e))).join("&via=")}`:""}parsePermalink(e){if(!e)throw new Error("Does not appear to be a permalink");const t=[...e.matchAll(new RegExp(f,"gi"))][0];if(!t||t.length<2)throw new Error("Does not appear to be a permalink");const n=t[1].split("/"),r=n[0];if("@"===r[0])return p.forUser(r);if("#"===r[0]||"!"===r[0]){if(1===n.length){const[e,t=""]=r.split("?"),n=t.split(/&?via=/g).filter((e=>!!e));return p.forRoom(e,n)}const e=n.length>1?n.slice(1).join("/"):"",[t,i=""]=e.split("?"),o=i.split(/&?via=/g).filter((e=>!!e));return p.forEvent(r,t,o)}throw new Error("Unknown entity type in permalink")}}class b extends h{constructor(e){if(super(),i()(this,"elementUrl",void 0),this.elementUrl=e,!this.elementUrl.startsWith("http:")&&!this.elementUrl.startsWith("https:"))throw new Error("Element prefix URL does not appear to be an HTTP(S) URL")}forEvent(e,t,n){return`${this.elementUrl}/#/room/${e}/${t}${this.encodeServerCandidates(n)}`}forRoom(e,t){return`${this.elementUrl}/#/room/${e}${this.encodeServerCandidates(t)}`}forUser(e){return`${this.elementUrl}/#/user/${e}`}forEntity(e){if("!"===e[0]||"#"===e[0])return this.forRoom(e);if("@"===e[0])return this.forUser(e);throw new Error("Unrecognized entity")}isPermalinkHost(e){const t=new URL(this.elementUrl);return e===(t.host||t.hostname)}encodeServerCandidates(e){return e&&0!==e.length?`?via=${e.map((e=>encodeURIComponent(e))).join("&via=")}`:""}parsePermalink(e){if(!e||!e.startsWith(this.elementUrl))throw new Error("Does not appear to be a permalink");const t=e.substring(`${this.elementUrl}/#/`.length);return b.parseAppRoute(t)}static parseAppRoute(e){const t=e.split("/");if(t.length<2)throw new Error("URL is missing parts");const[n]=t.splice(-1,1),[r,i=""]=n.split("?");t.push(r);const o=t[0],a=t[1];if("user"===o)return p.forUser(a);if("room"===o){const e=t.length>2?t.slice(2).join("/"):"",n=i.split(/&?via=/).filter((e=>!!e));return p.forEvent(a,e,n)}throw new Error("Unknown entity type in permalink")}}var v=n(131),y=n(368);class E extends h{constructor(){super()}encodeEntity(e){if("!"===e[0])return`roomid/${e.slice(1)}`;if("#"===e[0])return`r/${e.slice(1)}`;if("@"===e[0])return`u/${e.slice(1)}`;if("$"===e[0])return`e/${e.slice(1)}`;throw new Error("Cannot encode entity: "+e)}forEvent(e,t,n){return`matrix:${this.encodeEntity(e)}/${this.encodeEntity(t)}${this.encodeServerCandidates(n)}`}forRoom(e,t){return`matrix:${this.encodeEntity(e)}${this.encodeServerCandidates(t)}`}forUser(e){return`matrix:${this.encodeEntity(e)}`}forEntity(e){return`matrix:${this.encodeEntity(e)}`}isPermalinkHost(e){return""===e}encodeServerCandidates(e){return e&&0!==e.length?`?via=${e.map((e=>encodeURIComponent(e))).join("&via=")}`:""}parsePermalink(e){if(!e||!e.startsWith("matrix:"))throw new Error("Does not appear to be a permalink");const t=e.substring("matrix:".length).split("/"),n=t[0],r=t[1];if("u"===n)return p.forUser(`@${r}`);if("r"===n||"roomid"===n){const e="r"===n?"#":"!";if(2===t.length){const[t,n=""]=r.split("?"),i=n.split(/&?via=/g).filter((e=>!!e));return p.forRoom(`${e}${t}`,i)}if("e"===t[2]){const n=t.length>3?t.slice(3).join("/"):"",[i,o=""]=n.split("?"),a=o.split(/&?via=/g).filter((e=>!!e));return p.forEvent(`${e}${r}`,`$${i}`,a)}throw new Error("Faulty room permalink")}throw new Error("Unknown entity type in permalink")}}const S=/.*/;class w{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.room=e,i()(this,"roomId",void 0),i()(this,"highestPlUserId",null),i()(this,"populationMap",null),i()(this,"bannedHostsRegexps",null),i()(this,"allowedHostsRegexps",null),i()(this,"_serverCandidates",void 0),i()(this,"started",!1),i()(this,"onRoomStateUpdate",(()=>{this.fullUpdate()})),i()(this,"updateServerCandidates",(()=>{const e=new Set;this.highestPlUserId&&e.add(R(this.highestPlUserId));const t=Object.keys(this.populationMap).sort(((e,t)=>this.populationMap[t]-this.populationMap[e]));for(let r=0;r<t.length&&e.size<3;r++){var n;const i=t[r],o=null!==(n=N(i))&&void 0!==n?n:"";e.has(i)||P(o)||M(o,this.bannedHostsRegexps)||!M(o,this.allowedHostsRegexps)||e.add(i)}this._serverCandidates=[...e]})),this.roomId=e?e.roomId:t,!this.roomId)throw new Error("Failed to resolve a roomId for the permalink creator to use")}load(){this.room&&this.room.currentState?this.fullUpdate():l.a.warn("Tried to load a permalink creator with no room state")}start(){this.load(),this.room.currentState.on(c.b.Update,this.onRoomStateUpdate),this.started=!0}stop(){this.room.currentState.removeListener(c.b.Update,this.onRoomStateUpdate),this.started=!1}get serverCandidates(){return this._serverCandidates}isStarted(){return this.started}forEvent(e){return I().forEvent(this.roomId,e,this._serverCandidates)}forShareableRoom(){if(this.room){const e=this.room.getCanonicalAlias();if(e)return I().forRoom(e)}return I().forRoom(this.roomId,this._serverCandidates)}forRoom(){return I().forRoom(this.roomId,this._serverCandidates)}fullUpdate(){this.updateAllowedServers(),this.updateHighestPlUser(),this.updatePopulationMap(),this.updateServerCandidates()}updateHighestPlUser(){const e=this.room.currentState.getStateEvents("m.room.power_levels","");if(e){const t=e.getContent();if(t){const e=t.users;if(e){const t=Object.entries(e).filter((e=>{var t;let[n]=e;const r=this.room.getMember(n);if(!r||"join"!==r.membership)return!1;const i=R(n),o=null!==(t=N(i))&&void 0!==t?t:i;return!P(o)&&!M(o,this.bannedHostsRegexps)&&M(o,this.allowedHostsRegexps)})),n=t.reduce(((e,t)=>t[1]>e[1]?t:e),[null,0]),[r,i]=n;if(null!==r&&i>=50)return void(this.highestPlUserId=r)}}}this.highestPlUserId=null}updateAllowedServers(){const e=[];let t=[S];if(this.room.currentState){const n=this.room.currentState.getStateEvents(u.b.RoomServerAcl,"");if(n&&n.getContent()){const r=e=>new RegExp("^"+s.r(e,!1)+"$");(n.getContent().deny||[]).forEach((t=>e.push(r(t))));const i=n.getContent().allow||[];t=[],i.forEach((e=>t.push(r(e))))}}this.bannedHostsRegexps=e,this.allowedHostsRegexps=t}updatePopulationMap(){const e={};for(const t of this.room.getJoinedMembers()){const n=R(t.userId);e[n]||(e[n]=0),e[n]++}this.populationMap=e}}function T(e){return I().forEntity(e)}function C(e){return I().forUser(e)}function x(e){if(!e)throw new Error("can't permalink a falsy roomId");if("!"!==e[0])return I().forRoom(e,[]);const t=d.a.get().getRoom(e);if(!t)return I().forRoom(e,[]);const n=new w(t);return n.load(),n.forShareableRoom()}function F(e){return!!(new _).isPermalinkHost(e)||I().isPermalinkHost(e)}function D(e){if(!e)return null;if("#"===e[0]||"!"===e[0])return x(e);if("@"===e[0])return C(e);if("matrix:"===e.slice(0,7))try{const t=A(e);if(t){if(t.roomIdOrAlias){const e=t.eventId?`/${t.eventId}`:"";let n=g+`/#/${t.roomIdOrAlias}${e}`;return t.viaServers.length>0&&(n+=(new _).encodeServerCandidates(t.viaServers)),n}if(t.userId)return g+`/#/${t.userId}`}}catch{}return e}function k(e){if(!(e.startsWith("http:")||e.startsWith("https:")||e.startsWith("matrix:")||e.startsWith("vector:")))return e;try{const t=decodeURIComponent(e).match(y.a);if(t)return t[1]}catch(t){return e}try{const t=A(e);if(t)if(t.roomIdOrAlias){const n=t.eventId?`/${t.eventId}`:"";e=`#/room/${t.roomIdOrAlias}${n}`,t.viaServers.length>0&&(e+=(new _).encodeServerCandidates(t.viaServers))}else t.userId&&(e=`#/user/${t.userId}`)}catch(e){}return e}function O(e){try{let t=A(e);if(!t){const n=e.match(y.a);if(n){const e=new b("http://localhost"),r=n[1].split("#").slice(1).join("#");t=e.parsePermalink(`http://localhost/#${r}`)}}if(!t)return null;if(t.userId)return t.userId;if(t.roomIdOrAlias)return t.roomIdOrAlias}catch(e){}return null}function I(){const e=v.b.get("permalink_prefix");return e&&e!==g?new b(e):new _}function A(e){try{const t=v.b.get("permalink_prefix"),n=decodeURIComponent(e);if(new RegExp(f,"i").test(n))return(new _).parsePermalink(n);if(e.startsWith("matrix:"))return(new E).parsePermalink(e);if(t&&e.startsWith(t))return new b(t).parsePermalink(e)}catch(e){l.a.error("Failed to parse permalink",e)}return null}function R(e){return e.split(":").splice(1).join(":")}function N(e){if(!e)return null;try{return new URL(`https://${e}`).hostname}catch(e){return console.error("Error encountered while extracting hostname from server name",e),null}}function M(e,t){if(!e)return!0;if(t.length>0&&!t[0].test)throw new Error(t[0].toString());return t.some((t=>t.test(e)))}function P(e){return!!e&&(e.startsWith("[")&&e.endsWith("]")&&(e=e.substring(1,e.length-1)),a()(e))}const L=e=>{const t=new w(e);return t.load(),t.serverCandidates}},function(e,t,n){"use strict";n.d(t,"g",(function(){return S})),n.d(t,"c",(function(){return w})),n.d(t,"f",(function(){return T})),n.d(t,"h",(function(){return x})),n.d(t,"d",(function(){return F})),n.d(t,"i",(function(){return D})),n.d(t,"e",(function(){return c})),n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return v}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(152),l=n(142);const c=e=>{let{children:t,inputRef:n}=e;const[r,i,o]=D(n);return t({onFocus:r,isActive:i,ref:o})};var u=n(130),d=n.n(u),h=n(132),p=n.n(h),m=n(123);const g=["inputRef","onFocus"],f=e=>{let{inputRef:t,onFocus:n}=e,r=p()(e,g);const[i,o,s]=D(t);return a.a.createElement(m.a,d()({},r,{onFocus:e=>{i(),null==n||n(e)},inputRef:s,tabIndex:o?0:-1}))};var _=n(148);const b=["inputRef","onFocus"],v=e=>{let{inputRef:t,onFocus:n}=e,r=p()(e,b);const[i,o,s]=D(t);return a.a.createElement(_.a,d()({},r,{onFocus:e=>{i(),null==n||n(e)},inputRef:s,tabIndex:o?0:-1}))};function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(e){return e.matches('input:not([type="radio"]):not([type="checkbox"]), textarea, select, [contenteditable=true]')}const w=Object(o.createContext)({state:{refs:[]},dispatch:()=>{}});let T;w.displayName="RovingTabIndexContext",function(e){e.Register="REGISTER",e.Unregister="UNREGISTER",e.SetFocus="SET_FOCUS"}(T||(T={}));const C=(e,t)=>{switch(t.type){case T.Register:return e.activeRef||(e.activeRef=t.payload.ref),e.refs.push(t.payload.ref),e.refs.sort(((e,t)=>{if(e===t)return 0;const n=e.current.compareDocumentPosition(t.current);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0})),E({},e);case T.Unregister:{const i=e.refs.findIndex((e=>e===t.payload.ref));if(-1===i)return e;var n,r;if(e.refs.splice(i,1)[0]===e.activeRef)if(i>=e.refs.length?e.activeRef=x(e.refs,e.refs.length-1,!0):e.activeRef=x(e.refs,i)||x(e.refs,i,!0),document.activeElement===document.body)null===(n=e.activeRef)||void 0===n||null===(r=n.current)||void 0===r||r.focus();return E({},e)}case T.SetFocus:return e.activeRef===t.payload.ref?e:(e.activeRef=t.payload.ref,E({},e));default:return e}},x=function(e,t){if(arguments.length>2&&void 0!==arguments[2]&&arguments[2])for(let r=t;r<e.length&&r>=0;r--){var n;if(null!==(null===(n=e[r].current)||void 0===n?void 0:n.offsetParent))return e[r]}else for(let n=t;n<e.length&&n>=0;n++){var r;if(null!==(null===(r=e[n].current)||void 0===r?void 0:r.offsetParent))return e[n]}},F=e=>{let{children:t,handleHomeEnd:n,handleUpDown:r,handleLeftRight:i,onKeyDown:c}=e;const[u,d]=Object(o.useReducer)(C,{refs:[]}),h=Object(o.useMemo)((()=>({state:u,dispatch:d})),[u]),p=Object(o.useCallback)((e=>{if(c&&(c(e,h.state),e.defaultPrevented))return;let t=!1;const o=Object(s.a)().getAccessibilityAction(e);let a;if(S(e.target)){if(o===l.h.Tab)if(t=!0,h.state.refs.length>0){const t=h.state.refs.indexOf(h.state.activeRef);a=x(h.state.refs,t+(e.shiftKey?-1:1),e.shiftKey)}}else switch(o){case l.h.Home:n&&(t=!0,a=x(h.state.refs,0));break;case l.h.End:n&&(t=!0,a=x(h.state.refs,h.state.refs.length-1,!0));break;case l.h.ArrowDown:case l.h.ArrowRight:if((o===l.h.ArrowDown&&r||o===l.h.ArrowRight&&i)&&(t=!0,h.state.refs.length>0)){const e=h.state.refs.indexOf(h.state.activeRef);a=x(h.state.refs,e+1)}break;case l.h.ArrowUp:case l.h.ArrowLeft:if((o===l.h.ArrowUp&&r||o===l.h.ArrowLeft&&i)&&(t=!0,h.state.refs.length>0)){const e=h.state.refs.indexOf(h.state.activeRef);a=x(h.state.refs,e-1,!0)}}var u;(t&&(e.preventDefault(),e.stopPropagation()),a)&&(null===(u=a.current)||void 0===u||u.focus(),d({type:T.SetFocus,payload:{ref:a}}))}),[h,c,n,r,i]);return a.a.createElement(w.Provider,{value:h},t({onKeyDownHandler:p}))},D=e=>{const t=Object(o.useContext)(w);let n=Object(o.useRef)(null);e&&(n=e),Object(o.useLayoutEffect)((()=>(t.dispatch({type:T.Register,payload:{ref:n}}),()=>{t.dispatch({type:T.Unregister,payload:{ref:n}})})),[]);return[Object(o.useCallback)((()=>{t.dispatch({type:T.SetFocus,payload:{ref:n}})}),[]),t.state.activeRef===n,n]}},function(e,t,n){"use strict";n.d(t,"f",(function(){return b})),n.d(t,"c",(function(){return v})),n.d(t,"h",(function(){return y})),n.d(t,"e",(function(){return E})),n.d(t,"b",(function(){return S})),n.d(t,"a",(function(){return w})),n.d(t,"d",(function(){return T})),n.d(t,"g",(function(){return C})),n.d(t,"i",(function(){return x}));var r=n(13),i=n.n(r),o=n(147),a=n(287),s=n(129),l=n(143),c=n(179),u=n(353),d=n(140),h=n(15),p=n(1),m=n(662),g=n(18);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}let b,v;function y(e,t){return e?v.Stable:t?v.Experimental:v.None}!function(e){e.New="Thread.new",e.Update="Thread.update",e.NewReply="Thread.newReply",e.ViewThread="Thread.viewThread",e.Delete="Thread.delete"}(b||(b={})),function(e){e[e.None=0]="None",e[e.Experimental=1]="Experimental",e[e.Stable=2]="Stable"}(v||(v={}));class E extends m.a{constructor(e,t,n){var r;if(super(),this.id=e,this.rootEvent=t,i()(this,"timelineSet",void 0),i()(this,"timeline",[]),i()(this,"_currentUserParticipated",!1),i()(this,"reEmitter",void 0),i()(this,"lastEvent",void 0),i()(this,"replyCount",0),i()(this,"lastPendingEvent",void 0),i()(this,"pendingReplyCount",0),i()(this,"room",void 0),i()(this,"client",void 0),i()(this,"pendingEventOrdering",void 0),i()(this,"initialEventsFetched",!E.hasServerSideSupport),i()(this,"replayEvents",[]),i()(this,"onBeforeRedaction",((e,t)=>{null!=e&&e.isRelation(T.name)&&this.room.eventShouldLiveIn(e).threadId===this.id&&e.getId()!==this.id&&!t.status&&(this.replyCount--,this.updatePendingReplyCount(),this.emit(b.Update,this))})),i()(this,"onRedaction",(async e=>{if(e.threadRootId===this.id)if(this.replyCount<=0){for(const e of this.timeline)this.clearEventMetadata(e);this.lastEvent=this.rootEvent,this._currentUserParticipated=!1,this.emit(b.Delete,this)}else await this.updateThreadMetadata()})),i()(this,"onTimelineEvent",((e,t,n)=>{n||t.addLocalEchoReceipt(e.getSender(),e,g.b.Read),this.onEcho(e,null!=n&&n)})),i()(this,"onLocalEcho",(e=>{this.onEcho(e,!1)})),i()(this,"onEcho",(async(e,t)=>{e.threadRootId===this.id&&this.lastEvent!==e&&(await this.updateThreadMetadata(),e.isRelation(T.name)&&(t||this.emit(b.NewReply,this,e)))})),null==n||!n.room)throw new Error("element-web#22141: A thread requires a room in order to function");this.room=n.room,this.client=n.client,this.pendingEventOrdering=null!==(r=n.pendingEventOrdering)&&void 0!==r?r:o.e.Chronological,this.timelineSet=new u.b(this.room,{timelineSupport:!0,pendingEvents:!0},this.client,this),this.reEmitter=new a.b(this),this.reEmitter.reEmit(this.timelineSet,[d.d.Timeline,d.d.TimelineReset]),this.room.on(l.c.BeforeRedaction,this.onBeforeRedaction),this.room.on(d.d.Redaction,this.onRedaction),this.room.on(d.d.LocalEchoUpdated,this.onLocalEcho),this.timelineSet.on(d.d.Timeline,this.onTimelineEvent),this.processReceipts(n.receipts),this.updateThreadMetadata(),this.setEventMetadata(this.rootEvent)}async fetchRootEvent(){this.rootEvent=this.room.findEventById(this.id);try{const e=await this.client.fetchRoomEvent(this.roomId,this.id),t=this.client.getEventMapper();this.rootEvent=t(e)}catch(e){p.a.error("Failed to fetch thread root to construct thread with",e)}await this.processEvent(this.rootEvent)}static setServerSideSupport(e){E.hasServerSideSupport=e,e!==v.Stable&&(S.setPreferUnstable(!0),w.setPreferUnstable(!0),T.setPreferUnstable(!0))}static setServerSideListSupport(e){E.hasServerSideListSupport=e}static setServerSideFwdPaginationSupport(e){E.hasServerSideFwdPaginationSupport=e}get roomState(){return this.room.getLiveTimeline().getState(c.b.FORWARDS)}addEventToTimeline(e,t){this.findEventById(e.getId())||(this.timelineSet.addEventToTimeline(e,this.liveTimeline,{toStartOfTimeline:t,fromCache:!1,roomState:this.roomState}),this.timeline=this.events)}addEvents(e,t){e.forEach((e=>this.addEvent(e,t,!1))),this.updateThreadMetadata()}async addEvent(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.setEventMetadata(e);const r=this.lastReply(),i=!r||e.localTimestamp>=r.localTimestamp;if(E.hasServerSideSupport){if(!t&&this.initialEventsFetched&&i)this.addEventToTimeline(e,!1),this.fetchEditsWhereNeeded(e);else if(e.isRelation(s.h.Annotation)||e.isRelation(s.h.Replace)){var o,a,l;if(this.initialEventsFetched)this.addEventToTimeline(e,t);else null===(l=this.replayEvents)||void 0===l||l.push(e);return null===(o=this.timelineSet.relations)||void 0===o||o.aggregateParentEvent(e),void(null===(a=this.timelineSet.relations)||void 0===a||a.aggregateChildEvent(e,this.timelineSet))}}else this.addEventToTimeline(e,t),this.client.decryptEventIfNeeded(e,{});E.hasServerSideSupport&&this.rootEvent||!e.isRelation(T.name)||this.replyCount++,n&&(this.emit(b.NewReply,this,e),this.updateThreadMetadata())}async processEvent(e){e&&(this.setEventMetadata(e),await this.fetchEditsWhereNeeded(e)),this.timeline=this.events}processReceipts(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];for(const{eventId:t,receiptType:n,userId:r,receipt:i,synthetic:o}of e)this.addReceiptToStructure(t,n,r,i,o)}getRootEventBundledRelationship(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.rootEvent;return null==e?void 0:e.getServerAggregatedRelation(T.name)}async processRootEvent(){const e=this.getRootEventBundledRelationship();if(E.hasServerSideSupport&&e){this.replyCount=e.count,this._currentUserParticipated=!!e.current_user_participated;const t=this.client.getEventMapper();this.lastEvent=t(_(_({},e.latest_event),{},{room_id:this.roomId})),this.updatePendingReplyCount(),await this.processEvent(this.lastEvent)}}updatePendingReplyCount(){const e=(this.pendingEventOrdering===o.e.Detached?this.room.getPendingEvents():this.events).filter((e=>{var t;return e.threadRootId===this.id&&e.isRelation(T.name)&&null!==e.status&&e.getId()!==(null===(t=this.lastEvent)||void 0===t?void 0:t.getId())}));this.lastPendingEvent=e.length?e[e.length-1]:void 0,this.pendingReplyCount=e.length}async resetLiveTimeline(e,t){const n=this.liveTimeline;this.timelineSet.resetLiveTimeline(null!=e?e:void 0,null!=t?t:void 0);const r=this.liveTimeline;let i,o;if(e){i=(await this.client.createMessagesRequest(this.roomId,e,1,c.a.Forward)).end}if(t){o=(await this.client.createMessagesRequest(this.roomId,t,1,c.a.Backward)).start}var a,s;t&&n.getPaginationToken(c.a.Forward)===t&&n.setPaginationToken(null!==(a=o)&&void 0!==a?a:null,c.a.Forward);e&&r.getPaginationToken(c.a.Backward)===e&&r.setPaginationToken(null!==(s=i)&&void 0!==s?s:null,c.a.Backward)}async updateThreadMetadata(){if(this.updatePendingReplyCount(),E.hasServerSideSupport&&(this.initialEventsFetched||await this.processRootEvent(),await this.fetchRootEvent()),await this.processRootEvent(),!this.initialEventsFetched){this.initialEventsFetched=!0;try{0===this.replyCount&&this.rootEvent?(this.timelineSet.addEventsToTimeline([this.rootEvent],!0,this.liveTimeline,null),this.liveTimeline.setPaginationToken(null,c.a.Backward)):await this.client.paginateEventTimeline(this.liveTimeline,{backwards:!0,limit:Math.max(1,this.length)});for(const e of this.replayEvents)this.addEvent(e,!1);this.replayEvents=null,this.emit(d.d.TimelineReset,this.room,this.timelineSet,!0)}catch(e){p.a.error("Failed to load start of newly created thread: ",e),this.initialEventsFetched=!1}}this.emit(b.Update,this)}async fetchEditsWhereNeeded(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Promise.all(t.filter((e=>e.isEncrypted())).map((e=>{if(!e.isRelation())return this.client.relations(this.roomId,e.getId(),s.h.Replace,e.getType(),{limit:1}).then((t=>{t.events.length&&e.makeReplaced(t.events[0])})).catch((e=>{p.a.error("Failed to load edits for encrypted thread event",e)}))})))}setEventMetadata(e){e&&(c.b.setEventMetadata(e,this.roomState,!1),e.setThread(this))}clearEventMetadata(e){var t,n,r;e&&(e.setThread(void 0),null===(t=e.event)||void 0===t||(null===(n=t.unsigned)||void 0===n||(null===(r=n["m.relations"])||void 0===r||delete r[T.name])))}findEventById(e){return this.timelineSet.findEventById(e)}lastReply(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>!0;for(let t=this.timeline.length-1;t>=0;t--){const n=this.timeline[t];if(e(n))return n}return null}get roomId(){return this.room.roomId}get length(){return this.replyCount+this.pendingReplyCount}get replyToEvent(){var e,t;return null!==(e=null!==(t=this.lastPendingEvent)&&void 0!==t?t:this.lastEvent)&&void 0!==e?e:this.lastReply()}get events(){return this.liveTimeline.getEvents()}has(e){return this.timelineSet.findEventById(e)instanceof l.b}get hasCurrentUserParticipated(){return this._currentUserParticipated}get liveTimeline(){return this.timelineSet.getLiveTimeline()}getUnfilteredTimelineSet(){return this.timelineSet}addReceipt(e,t){throw new Error("Unsupported function on the thread model")}getEventReadUpTo(e,t){const n=e===this.client.getUserId(),r=this.timeline[this.timeline.length-1];if(n&&r){const e=r.getTs()<this.room.getOldestThreadedReceiptTs(),t=r.getId();if(e&&t)return t}const i=super.getEventReadUpTo(e,t);if(r){const t=this.room.getLastUnthreadedReceiptFor(e);if(!t)return i;for(let e=(null===(o=this.timeline)||void 0===o?void 0:o.length)-1;e>=0;--e){var o,a;const n=this.timeline[e];if(n.getId()===i)return i;if(n.getTs()<t.ts)return null!==(a=n.getId())&&void 0!==a?a:i}}return i}hasUserReadEvent(e,t){if(e===this.client.getUserId()){var n,r,i,o,a,s;const t=(null!==(n=null===(r=this.lastReply())||void 0===r?void 0:r.getTs())&&void 0!==n?n:0)<this.room.getOldestThreadedReceiptTs(),l=null!==(i=null===(o=this.room.getLastUnthreadedReceiptFor(e))||void 0===o?void 0:o.ts)&&void 0!==i?i:0,c=(null!==(a=null==this||null===(s=this.lastReply())||void 0===s?void 0:s.getTs())&&void 0!==a?a:0)<l;if(t||c)return!0}return super.hasUserReadEvent(e,t)}setUnread(e,t){return this.room.setThreadUnreadNotificationCount(this.id,e,t)}}i()(E,"hasServerSideSupport",v.None),i()(E,"hasServerSideListSupport",v.None),i()(E,"hasServerSideFwdPaginationSupport",v.None);const S=new h.b("related_by_senders","io.element.relation_senders"),w=new h.b("related_by_rel_types","io.element.relation_types"),T=new h.b("m.thread","io.element.thread");let C;function x(e){return e===C.My?"participated":"all"}!function(e){e[e.My=0]="My",e[e.All=1]="All"}(C||(C={}))},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";n.d(t,"b",(function(){return _})),n.d(t,"a",(function(){return b}));var r=n(130),i=n.n(r),o=n(132),a=n.n(o),s=n(120),l=n.n(s),c=n(124),u=n(128),d=n(191),h=n(166),p=n(375),m=n(260),g=n(739);const f=["width","height","resizeMethod","viewUserOnClick","forceHistorical","fallbackUserId","hideTitle","member"];function _(e){var t,n;let{width:r,height:o,resizeMethod:_="crop",viewUserOnClick:b,forceHistorical:v,fallbackUserId:y,hideTitle:E,member:S}=e,w=a()(e,f);const T=Object(s.useContext)(p.a),C=Object(g.a)({userId:null==S?void 0:S.userId,member:S,forceHistorical:v}),x=null!==(t=null==C?void 0:C.name)&&void 0!==t?t:y;let F,D=w.title;if(null!=C&&C.name){var k,O,I,A;if(C.getMxcAvatarUrl())F=Object(h.b)(null!==(k=C.getMxcAvatarUrl())&&void 0!==k?k:"").getThumbnailOfSourceHttp(r,o,_);if(!D)D=null!==(O=m.a.getDisplayUserIdentifier(null!==(I=null==C?void 0:C.userId)&&void 0!==I?I:"",{roomId:null!==(A=null==C?void 0:C.roomId)&&void 0!==A?A:""}))&&void 0!==O?O:y}return l.a.createElement(d.a,i()({},w,{width:r,height:o,resizeMethod:_,name:null!=x?x:"",title:E?void 0:D,idName:null!==(n=null==C?void 0:C.userId)&&void 0!==n?n:y,url:F,onClick:b?()=>{c.a.dispatch({action:u.a.ViewUser,member:S,push:T.isCard})}:w.onClick}))}class b extends l.a.Component{render(){return l.a.createElement(_,this.props,this.props.children)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(13),i=n.n(r),o=n(1),a=n(174),s=n(124),l=n(925),c=n(125),u=n(182),d=n(137),h=n(153),p=n(566);function m(e){if(!e)return e;const t=[...e.history].map((e=>function(e){var t,n,r,i,o;const a=null!==(t=e.state)&&void 0!==t?t:{};return{state:{widgetId:a.widgetId,spaceId:a.spaceId,isInitialEventHighlighted:a.isInitialEventHighlighted,initialEventScrollIntoView:a.initialEventScrollIntoView,threadHeadEventId:null!=a&&null!==(n=a.threadHeadEvent)&&void 0!==n&&n.getId()?a.threadHeadEvent.getId():void 0,memberInfoEventId:null!=a&&null!==(r=a.memberInfoEvent)&&void 0!==r&&r.getId()?a.memberInfoEvent.getId():void 0,initialEventId:null!=a&&null!==(i=a.initialEvent)&&void 0!==i&&i.getId()?a.initialEvent.getId():void 0,memberId:null!=a&&null!==(o=a.member)&&void 0!==o&&o.userId?a.member.userId:void 0},phase:e.phase}}(e)));return{isOpen:e.isOpen,history:t}}function g(e,t){if(!e)return e;const n=[...e.history].map((e=>function(e,t){var n;const r=null!==(n=e.state)&&void 0!==n?n:{},i={widgetId:r.widgetId,spaceId:r.spaceId,isInitialEventHighlighted:r.isInitialEventHighlighted,initialEventScrollIntoView:r.initialEventScrollIntoView,threadHeadEvent:null!=r&&r.threadHeadEventId?t.findEventById(r.threadHeadEventId):void 0,memberInfoEvent:null!=r&&r.memberInfoEventId?t.findEventById(r.memberInfoEventId):void 0,initialEvent:null!=r&&r.initialEventId?t.findEventById(r.initialEventId):void 0,member:!(null==r||!r.memberId)&&t.getMember(r.memberId)||void 0};return{state:i,phase:e.phase}}(e,t)));return{history:n,isOpen:e.isOpen}}var f=n(128),_=n(154);class b extends p.a{constructor(){super(s.a),i()(this,"global",void 0),i()(this,"byRoom",void 0),i()(this,"viewedRoomId",void 0),i()(this,"onVerificationRequestUpdate",(()=>{var e;if(null===(e=this.currentCard)||void 0===e||!e.state)return;const{member:t}=this.currentCard.state;if(!t)return;const n=Object(l.b)(t);n&&(this.currentCard.state.verificationRequest=n,this.emitAndUpdateSettings())})),this.reset()}reset(){this.global=void 0,this.byRoom={},this.viewedRoomId=null}async onReady(){var e;this.viewedRoomId=_.b.instance.roomViewStore.getRoomId(),null===(e=this.matrixClient)||void 0===e||e.on(a.b.VerificationRequest,this.onVerificationRequestUpdate),this.loadCacheFromSettings(),this.emitAndUpdateSettings()}async onNotReady(){var e;null===(e=this.matrixClient)||void 0===e||e.off(a.b.VerificationRequest,this.onVerificationRequestUpdate)}onDispatcherAction(e){if(e.action!==f.a.ActiveRoomChanged)return;const t=e;this.handleViewedRoomChange(t.oldRoomId,t.newRoomId)}get isOpen(){var e,t;return null!==(e=null===(t=this.byRoom[this.viewedRoomId])||void 0===t?void 0:t.isOpen)&&void 0!==e&&e}isOpenForRoom(e){var t,n;return null!==(t=null===(n=this.byRoom[e])||void 0===n?void 0:n.isOpen)&&void 0!==t&&t}get roomPhaseHistory(){var e,t;return null!==(e=null===(t=this.byRoom[this.viewedRoomId])||void 0===t?void 0:t.history)&&void 0!==e?e:[]}get currentCard(){const e=this.roomPhaseHistory;return e.length>=1?e[e.length-1]:{state:{},phase:null}}currentCardForRoom(e){var t,n;const r=null!==(t=null===(n=this.byRoom[e])||void 0===n?void 0:n.history)&&void 0!==t?t:[];return r.length>0?r[r.length-1]:{state:{},phase:null}}get previousCard(){const e=this.roomPhaseHistory;return(null==e?void 0:e.length)>=2?e[e.length-2]:{state:{},phase:null}}setCard(e){var t,n,r,i,o;let a=arguments.length>2?arguments[2]:void 0;const s=null!=a?a:this.viewedRoomId,l=this.getVerificationRedirect(e),c=null!==(t=null==l?void 0:l.phase)&&void 0!==t?t:e.phase,u=null!==(n=null==l?void 0:l.state)&&void 0!==n?n:0===Object.keys(null!==(r=e.state)&&void 0!==r?r:{}).length?null:e.state;if(this.isPhaseValid(c,Boolean(s)))if(c===(null===(i=this.currentCardForRoom(s))||void 0===i?void 0:i.phase)&&u){var d,h;const e=null!==(d=null===(h=this.byRoom[s])||void 0===h?void 0:h.history)&&void 0!==d?d:[];e[e.length-1].state=u,this.emitAndUpdateSettings()}else if(c===(null===(o=this.currentCardForRoom(s))||void 0===o?void 0:o.phase)&&this.byRoom[s])this.show(s),this.emitAndUpdateSettings();else{const e=[{phase:c,state:null!=u?u:{}}];this.byRoom[s]={history:e,isOpen:!0},this.emitAndUpdateSettings()}}setCards(e){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const n=null!=t?t:this.viewedRoomId,r=e.map((e=>{var t;return{phase:e.phase,state:null!==(t=e.state)&&void 0!==t?t:{}}}));this.byRoom[n]={history:r,isOpen:!0},this.show(n),this.emitAndUpdateSettings()}pushCard(e){var t,n,r;let i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const a=null!=o?o:this.viewedRoomId,s=this.getVerificationRedirect(e),l=null!==(t=null==s?void 0:s.phase)&&void 0!==t?t:e.phase,c=null!==(n=null!==(r=null==s?void 0:s.state)&&void 0!==r?r:e.state)&&void 0!==n?n:{};if(!this.isPhaseValid(l,Boolean(a)))return;const u=this.byRoom[a];u?(u.history.push({state:c,phase:l}),u.isOpen=!i||u.isOpen):this.byRoom[a]={history:[{phase:l,state:c}],isOpen:!i},this.show(a),this.emitAndUpdateSettings()}popCard(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=null!=e?e:this.viewedRoomId;if(!this.byRoom[t])return;const n=this.byRoom[t].history.pop();return this.emitAndUpdateSettings(),n}togglePanel(e){const t=null!=e?e:this.viewedRoomId;this.byRoom[t]&&(this.byRoom[t].isOpen=!this.byRoom[t].isOpen,this.emitAndUpdateSettings())}show(e){this.isOpenForRoom(null!=e?e:this.viewedRoomId)||this.togglePanel(e)}hide(e){this.isOpenForRoom(null!=e?e:this.viewedRoomId)&&this.togglePanel(e)}loadCacheFromSettings(){if(this.viewedRoomId){var e;const r=null===(e=this.mxClient)||void 0===e?void 0:e.getRoom(this.viewedRoomId);var t,n;if(r)this.global=null!==(t=this.global)&&void 0!==t?t:g(c.b.getValue("RightPanel.phasesGlobal"),r),this.byRoom[this.viewedRoomId]=null!==(n=this.byRoom[this.viewedRoomId])&&void 0!==n?n:g(c.b.getValue("RightPanel.phases",this.viewedRoomId),r);else o.a.warn("Could not restore the right panel after load because there was no associated room object.")}}emitAndUpdateSettings(){this.filterValidCards(this.global);const e=m(this.global);if(c.b.setValue("RightPanel.phasesGlobal",null,d.a.DEVICE,e),this.viewedRoomId){const e=this.byRoom[this.viewedRoomId];this.filterValidCards(e);const t=m(e);c.b.setValue("RightPanel.phases",this.viewedRoomId,d.a.ROOM_DEVICE,t)}this.emit(h.b,null)}filterValidCards(e){null!=e&&e.history&&(e.history=e.history.filter((e=>this.isCardStateValid(e))),e.history.length||(e.isOpen=!1))}isCardStateValid(e){switch(e.phase){case u.a.ThreadView:return e.state.threadHeadEvent||o.a.warn("removed card from right panel because of missing threadHeadEvent in card state"),!!e.state.threadHeadEvent;case u.a.RoomMemberInfo:case u.a.SpaceMemberInfo:case u.a.EncryptionPanel:return e.state.member||o.a.warn("removed card from right panel because of missing member in card state"),!!e.state.member;case u.a.Room3pidMemberInfo:case u.a.Space3pidMemberInfo:return e.state.memberInfoEvent||o.a.warn("removed card from right panel because of missing memberInfoEvent in card state"),!!e.state.memberInfoEvent;case u.a.Widget:return e.state.widgetId||o.a.warn("removed card from right panel because of missing widgetId in card state"),!!e.state.widgetId}return!0}getVerificationRedirect(e){if(e.phase===u.a.RoomMemberInfo&&e.state){const{member:t}=e.state,n=Object(l.b)(t);if(n)return{phase:u.a.EncryptionPanel,state:{verificationRequest:n,member:t}}}return null}isPhaseValid(e,t){return e&&u.a[e]?!!t||(o.a.warn(`Tried to switch right panel to a room phase: ${e}, but we are currently not viewing a room`),!1):(o.a.warn(`Tried to switch right panel to unknown phase: ${e}`),!1)}handleViewedRoomChange(e,t){var n,r;if(this.mxClient){if(this.viewedRoomId=t,this.loadCacheFromSettings(),(null===(n=this.currentCard)||void 0===n?void 0:n.phase)!==u.a.EncryptionPanel){const e=this.byRoom[this.viewedRoomId];null!=e&&e.history&&(e.history=e.history.filter((e=>e.phase!=u.a.RoomMemberInfo&&e.phase!=u.a.Room3pidMemberInfo)))}if(c.b.getValue("feature_right_panel_default_open")&&(null===(r=this.byRoom[this.viewedRoomId])||void 0===r||!r.isOpen)){var i;const e=[{phase:u.a.RoomMemberList}],t=this.viewedRoomId?null===(i=this.mxClient)||void 0===i?void 0:i.getRoom(this.viewedRoomId):void 0;null!=t&&t.isSpaceRoom()||e.unshift({phase:u.a.RoomSummary}),this.byRoom[this.viewedRoomId]={isOpen:!0,history:e}}this.emitAndUpdateSettings()}}static get instance(){return this.internalInstance||(this.internalInstance=new b,this.internalInstance.start()),this.internalInstance}}i()(b,"internalInstance",void 0),window.mxRightPanelStore=b.instance},function(e,t,n){"use strict";(function(e,r){n.d(t,"e",(function(){return q})),n.d(t,"d",(function(){return V})),n.d(t,"b",(function(){return $})),n.d(t,"a",(function(){return K})),n.d(t,"c",(function(){return W}));var i=n(13),o=n.n(i),a=n(416),s=n.n(a),l=n(359),c=n(129),u=n(287),d=n(1),h=n(511),p=n(199),m=n(978),g=n(358),f=n(654),_=n(360),b=n(980),v=n(981),y=n(669),E=n(225),S=n(419),w=n(512),T=n(421),C=n(422),x=n(239),F=n(984),D=n(985),k=n(986),O=n(288),I=n(322),A=n(671),R=n(672),N=n(140),M=n(184),P=n(143),L=n(147),B=n(158),U=n(151),j=n(16);function G(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const z=g.a.DeviceVerification,H={[S.c.NAME]:S.c,[w.a.NAME]:w.a,[S.e]:k.a,[S.d]:k.a},q={RECIPROCATE_QR_CODE:S.c.NAME,SAS:w.a.NAME};function V(){return Boolean(e.Olm)}let $;!function(e){e.DeviceVerificationChanged="deviceVerificationChanged",e.UserTrustStatusChanged="userTrustStatusChanged",e.UserCrossSigningUpdated="userCrossSigningUpdated",e.RoomKeyRequest="crypto.roomKeyRequest",e.RoomKeyRequestCancellation="crypto.roomKeyRequestCancellation",e.KeyBackupStatus="crypto.keyBackupStatus",e.KeyBackupFailed="crypto.keyBackupFailed",e.KeyBackupSessionsRemaining="crypto.keyBackupSessionsRemaining",e.KeySignatureUploadFailure="crypto.keySignatureUploadFailure",e.VerificationRequest="crypto.verification.request",e.Warning="crypto.warning",e.WillUpdateDevices="crypto.willUpdateDevices",e.DevicesUpdated="crypto.devicesUpdated",e.KeysChanged="crossSigning.keysChanged"}($||($={}));class K extends B.b{static getOlmVersion(){return h.a.getOlmVersion()}constructor(e,t,n,r,i,a,s){var l;if(super(),l=this,this.baseApis=e,this.userId=t,this.deviceId=n,this.clientStore=r,this.cryptoStore=i,this.roomList=a,o()(this,"backupManager",void 0),o()(this,"crossSigningInfo",void 0),o()(this,"olmDevice",void 0),o()(this,"deviceList",void 0),o()(this,"dehydrationManager",void 0),o()(this,"secretStorage",void 0),o()(this,"reEmitter",void 0),o()(this,"verificationMethods",void 0),o()(this,"supportedAlgorithms",void 0),o()(this,"outgoingRoomKeyRequestManager",void 0),o()(this,"toDeviceVerificationRequests",void 0),o()(this,"inRoomVerificationRequests",void 0),o()(this,"trustCrossSignedDevices",!0),o()(this,"lastOneTimeKeyCheck",null),o()(this,"oneTimeKeyCheckInProgress",!1),o()(this,"roomEncryptors",new Map),o()(this,"roomDecryptors",new Map),o()(this,"deviceKeys",{}),o()(this,"globalBlacklistUnverifiedDevices",!1),o()(this,"globalErrorOnUnknownDevices",!0),o()(this,"receivedRoomKeyRequests",[]),o()(this,"receivedRoomKeyRequestCancellations",[]),o()(this,"processingRoomKeyRequests",!1),o()(this,"lazyLoadMembers",!1),o()(this,"roomDeviceTrackingState",{}),o()(this,"lastNewSessionForced",new j.b((()=>new j.b((()=>0))))),o()(this,"sendKeyRequestsImmediately",!1),o()(this,"oneTimeKeyCount",void 0),o()(this,"needsNewFallback",void 0),o()(this,"fallbackCleanup",void 0),o()(this,"onDeviceListUserCrossSigningUpdated",(async e=>{if(e===this.userId){const t=this.deviceList.getStoredCrossSigningForUser(e),n=t?t.getId():null,r=this.crossSigningInfo.getId();r&&n&&!(r!==n)?await this.checkOwnCrossSigningTrust():(this.storeTrustedSelfKeys(null),this.emit($.KeysChanged,{}),this.emit($.UserTrustStatusChanged,this.userId,this.checkUserTrust(e)))}else{await this.checkDeviceVerifications(e);const t=this.deviceList.getStoredCrossSigningForUser(e);t&&(t.updateCrossSigningVerifiedBefore(this.checkUserTrust(e).isCrossSigningVerified()),this.deviceList.setRawStoredCrossSigningForUser(e,t.toStorage())),this.emit($.UserTrustStatusChanged,e,this.checkUserTrust(e))}})),o()(this,"onMembership",((e,t,n)=>{try{this.onRoomMembership(e,t,n)}catch(e){d.a.error("Error handling membership change:",e)}})),o()(this,"onToDeviceEvent",(e=>{try{d.a.log(`received to-device ${e.getType()} from: ${e.getSender()} id: ${e.getContent()[c.k]}`),"m.room_key"==e.getType()||"m.forwarded_room_key"==e.getType()?this.onRoomKeyEvent(e):"m.room_key_request"==e.getType()?this.onRoomKeyRequestEvent(e):"m.secret.request"===e.getType()?this.secretStorage.onRequestReceived(e):"m.secret.send"===e.getType()?this.secretStorage.onSecretReceived(e):"m.room_key.withheld"===e.getType()?this.onRoomKeyWithheldEvent(e):e.getContent().transaction_id?this.onKeyVerificationMessage(e):"m.bad.encrypted"===e.getContent().msgtype?this.onToDeviceBadEncrypted(e):(e.isBeingDecrypted()||e.shouldAttemptDecryption())&&(e.isBeingDecrypted()||e.attemptDecryption(this),e.once(P.c.Decrypted,(e=>{this.onToDeviceEvent(e)})))}catch(e){d.a.error("Error handling toDeviceEvent:",e)}})),o()(this,"onTimelineEvent",(function(e,t,n,r){let{liveEvent:i=!0}=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};if(!F.a.validateEvent(e,l.baseApis))return;l.handleVerificationEvent(e,l.inRoomVerificationRequests,(e=>{const t=new F.a(l.baseApis,e.getRoomId());return new x.k(t,l.verificationMethods,l.baseApis)}),i)})),this.reEmitter=new u.b(this),s){this.verificationMethods=new Map;for(const e of s)"string"==typeof e?H[e]&&this.verificationMethods.set(e,H[e]):e.NAME?this.verificationMethods.set(e.NAME,e):d.a.warn(`Excluding unknown verification method ${e}`)}else this.verificationMethods=new Map(Object.entries(H));this.backupManager=new R.a(e,(async()=>{const e=await this.getSessionBackupPrivateKey();if(e)return e;const t=await this.getSecret("m.megolm_backup.v1");if(t){const e=W(t);if(e){const t=await this.getSecretStorageKey();await this.storeSecret("m.megolm_backup.v1",e,[t[0]])}return p.decodeBase64(e||t)}if(this.baseApis.cryptoCallbacks&&this.baseApis.cryptoCallbacks.getBackupKey)return this.baseApis.cryptoCallbacks.getBackupKey();throw new Error("Unable to get private key")})),this.olmDevice=new h.a(i),this.deviceList=new m.a(e,i,this.olmDevice),this.deviceList.on($.UserCrossSigningUpdated,this.onDeviceListUserCrossSigningUpdated),this.reEmitter.reEmit(this.deviceList,[$.DevicesUpdated,$.WillUpdateDevices]),this.supportedAlgorithms=Array.from(f.a.keys()),this.outgoingRoomKeyRequestManager=new y.a(e,this.deviceId,this.cryptoStore),this.toDeviceVerificationRequests=new D.b,this.inRoomVerificationRequests=new F.b;const g=this.baseApis.cryptoCallbacks||{},b=Object(_.d)(i,this.olmDevice);this.crossSigningInfo=new _.a(t,g,b),this.secretStorage=new v.b(e,g,e),this.dehydrationManager=new A.b(this),!g.getCrossSigningKey&&g.getSecretStorageKey&&(g.getCrossSigningKey=async e=>_.a.getFromSecretStorage(e,this.secretStorage))}async init(){let{exportedOlmDevice:t,pickleKey:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};d.a.log("Crypto: initialising Olm..."),await e.Olm.init(),d.a.log(t?"Crypto: initialising Olm device from exported device...":"Crypto: initialising Olm device..."),await this.olmDevice.init({fromExportedDevice:t,pickleKey:n}),d.a.log("Crypto: loading device list..."),await this.deviceList.load(),this.deviceKeys["ed25519:"+this.deviceId]=this.olmDevice.deviceEd25519Key,this.deviceKeys["curve25519:"+this.deviceId]=this.olmDevice.deviceCurve25519Key,d.a.log("Crypto: fetching own devices...");let r=this.deviceList.getRawStoredDevicesForUser(this.userId);if(r||(r={}),!r[this.deviceId]){d.a.log("Crypto: adding this device to the store...");const e={keys:this.deviceKeys,algorithms:this.supportedAlgorithms,verified:z.VERIFIED,known:!0};r[this.deviceId]=e,this.deviceList.storeDevicesForUser(this.userId,r),this.deviceList.saveIfDirty()}await this.cryptoStore.doTxn("readonly",[E.a.STORE_ACCOUNT],(e=>{this.cryptoStore.getCrossSigningKeys(e,(e=>{e&&0!==Object.keys(e).length&&(d.a.log("Loaded cross-signing public keys from crypto store"),this.crossSigningInfo.setKeys(e))}))})),this.deviceList.startTrackingDeviceList(this.userId),d.a.log("Crypto: checking for key backup..."),this.backupManager.checkAndStart()}getCryptoTrustCrossSignedDevices(){return this.trustCrossSignedDevices}setCryptoTrustCrossSignedDevices(e){this.trustCrossSignedDevices=e;for(const e of this.deviceList.getKnownUserIds()){const t=this.deviceList.getRawStoredDevicesForUser(e);for(const n of Object.keys(t)){const t=this.checkDeviceTrust(e,n);if(!t.isLocallyVerified()&&t.isCrossSigningVerified()){const t=this.deviceList.getStoredDevice(e,n);this.emit($.DeviceVerificationChanged,e,n,t)}}}}async createRecoveryKeyFromPassphrase(t){const n=new e.Olm.PkDecryption;try{const e={};if(t){const r=await Object(T.c)(t);e.passphrase={algorithm:"m.pbkdf2",iterations:r.iterations,salt:r.salt},e.pubkey=n.init_with_private_key(r.key)}else e.pubkey=n.generate_key();const r=n.get_private_key();return{keyInfo:e,encodedPrivateKey:Object(C.b)(r),privateKey:r}}finally{null==n||n.free()}}async userHasCrossSigningKeys(){return await this.downloadKeys([this.userId]),null!==this.deviceList.getStoredCrossSigningForUser(this.userId)}async isCrossSigningReady(){const e=this.crossSigningInfo.getId(),t=await this.crossSigningInfo.isStoredInKeyCache()||await this.crossSigningInfo.isStoredInSecretStorage(this.secretStorage);return!(!e||!t)}async isSecretStorageReady(){const e=await this.secretStorage.hasKey(),t=await this.crossSigningInfo.isStoredInSecretStorage(this.secretStorage),n=!this.backupManager.getKeyBackupEnabled()||await this.baseApis.isKeyBackupKeyStored();return!!(e&&t&&n)}async bootstrapCrossSigning(){let{authUploadDeviceSigningKeys:e,setupNewCrossSigning:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};d.a.log("Bootstrapping cross-signing");const n=this.baseApis.cryptoCallbacks,r=new b.a(this.baseApis.store.accountData,n),i=new _.a(this.userId,r.crossSigningCallbacks,r.crossSigningCallbacks),o=async()=>{i.resetKeys(),await this.signObject(i.keys.master),r.addCrossSigningKeys(e,i.keys);const t=this.deviceList.getStoredDevice(this.userId,this.deviceId),n=await i.signDevice(this.userId,t);r.addKeySignature(this.userId,this.deviceId,n),this.backupManager.backupInfo&&(await i.signObject(this.backupManager.backupInfo.auth_data,"master"),r.addSessionBackup(this.backupManager.backupInfo))},a=this.crossSigningInfo.getId(),s=await this.crossSigningInfo.isStoredInKeyCache(),l=await this.crossSigningInfo.isStoredInSecretStorage(this.secretStorage),c=s||l;d.a.log({setupNewCrossSigning:t,publicKeysOnDevice:a,privateKeysInCache:s,privateKeysInStorage:l,privateKeysExistSomewhere:c}),!c||t?(d.a.log("Cross-signing private keys not found locally or in secret storage, creating new keys"),await o()):a&&s?d.a.log("Cross-signing public keys trusted and private keys found locally"):l&&(d.a.log("Cross-signing private keys not found locally, but they are available in secret storage, reading storage and caching locally"),await this.checkOwnCrossSigningTrust({allowPrivateKeyRequests:!0}));const u=r.crossSigningCallbacks.privateKeys;if(u.size&&!this.baseApis.cryptoCallbacks.saveCrossSigningKeys){const e=new v.b(r.accountDataClientAdapter,r.ssssCryptoCallbacks,void 0);await e.hasKey()&&(d.a.log("Storing new cross-signing private keys in secret storage"),await _.a.storeInSecretStorage(u,e))}const h=r.buildOperation();await h.apply(this),await r.persist(this),d.a.log("Cross-signing ready")}async bootstrapSecretStorage(){let{createSecretStorageKey:e=(async()=>({})),keyBackupInfo:t,setupNewKeyBackup:n,setupNewSecretStorage:r,getKeyBackupPassphrase:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};d.a.log("Bootstrapping Secure Secret Storage");const o=this.baseApis.cryptoCallbacks,a=new b.a(this.baseApis.store.accountData,o),s=new v.b(a.accountDataClientAdapter,a.ssssCryptoCallbacks,void 0);let l=null;const c=async(e,t)=>{t&&(e.key=t);const{keyId:n,keyInfo:r}=await s.addKey(v.a,e);return t&&a.ssssCryptoCallbacks.addPrivateKey(n,r,t),await s.setDefaultKeyId(n),n},u=async(e,t)=>{if(!t.mac){var n,r;const i=await(null===(n=(r=this.baseApis.cryptoCallbacks).getSecretStorageKey)||void 0===n?void 0:n.call(r,{keys:{[e]:t}},""));if(i){const n=i[1];a.ssssCryptoCallbacks.addPrivateKey(e,t,n);const{iv:r,mac:o}=await Object(I.a)(n);t.iv=r,t.mac=o,await a.setAccountData(`m.secret_storage.key.${e}`,t)}}},h=async e=>{if(this.crossSigningInfo.getId()&&await this.crossSigningInfo.isStoredInKeyCache("master"))try{d.a.log("Adding cross-signing signature to key backup"),await this.crossSigningInfo.signObject(e,"master")}catch(e){d.a.error("Signing key backup with cross-signing keys failed",e)}else d.a.warn("Cross-signing keys not available, skipping signature on key backup")},m=await this.getSecretStorageKey(),[g,f]=m||[null,null],y=!r&&f&&f.algorithm===v.a;if(d.a.log({keyBackupInfo:t,setupNewKeyBackup:n,setupNewSecretStorage:r,storageExists:y,oldKeyInfo:f}),y||t)if(!y&&t){d.a.log("Secret storage does not exist, using key backup key");const e=await this.getSessionBackupPrivateKey()||await(null==i?void 0:i()),n={};t.auth_data.private_key_salt&&t.auth_data.private_key_iterations&&(n.passphrase={algorithm:"m.pbkdf2",iterations:t.auth_data.private_key_iterations,salt:t.auth_data.private_key_salt,bits:256}),l=await c(n,e),await s.store("m.megolm_backup.v1",p.encodeBase64(e),[l]),await h(t.auth_data),a.addSessionBackup(t)}else d.a.log("Secret storage exists"),f&&f.algorithm===v.a&&await u(g,f);else{d.a.log("Secret storage does not exist, creating new storage key");const{keyInfo:t={},privateKey:n}=await e();l=await c(t,n)}if(!this.baseApis.cryptoCallbacks.saveCrossSigningKeys&&await this.isCrossSigningReady()&&(l||!await this.crossSigningInfo.isStoredInSecretStorage(s))){d.a.log("Copying cross-signing private keys from cache to secret storage");const e=await this.crossSigningInfo.getCrossSigningKeysFromCache();await _.a.storeInSecretStorage(e,s)}if(n&&!t){d.a.log("Creating new message key backup version");const e=await this.baseApis.prepareKeyBackupVersion(null,{secureSecretStorage:!1}),t=Object(C.a)(e.recovery_key);await s.store("m.megolm_backup.v1",p.encodeBase64(t));const n={algorithm:e.algorithm,auth_data:e.auth_data};await h(n.auth_data),await this.signObject(n.auth_data),a.addSessionBackup(n)}const E=await s.get("m.megolm_backup.v1");if(E){d.a.info("Got session backup key from secret storage: caching");const e=W(E);if(e){const t=l||g;await s.store("m.megolm_backup.v1",e,t?[t]:null)}const t=new Uint8Array(p.decodeBase64(e||E));a.addSessionBackupPrivateKeyToCache(t)}else if(this.backupManager.getKeyBackupEnabled()){const e=await this.getSessionBackupPrivateKey()||await(null==i?void 0:i());if(!e)return void d.a.error("Key backup is enabled but couldn't get key backup key!");d.a.info("Got session backup key from cache/user that wasn't in SSSS: saving to SSSS"),await s.store("m.megolm_backup.v1",p.encodeBase64(e))}const S=a.buildOperation();await S.apply(this),await a.persist(this),d.a.log("Secure Secret Storage ready")}addSecretStorageKey(e,t,n){return this.secretStorage.addKey(e,t,n)}hasSecretStorageKey(e){return this.secretStorage.hasKey(e)}getSecretStorageKey(e){return this.secretStorage.getKey(e)}storeSecret(e,t,n){return this.secretStorage.store(e,t,n)}getSecret(e){return this.secretStorage.get(e)}isSecretStored(e){return this.secretStorage.isStored(e)}requestSecret(e,t){return t||(t=Object.keys(this.deviceList.getRawStoredDevicesForUser(this.userId))),this.secretStorage.request(e,t)}getDefaultSecretStorageKeyId(){return this.secretStorage.getDefaultKeyId()}setDefaultSecretStorageKeyId(e){return this.secretStorage.setDefaultKeyId(e)}checkSecretStorageKey(e,t){return this.secretStorage.checkKey(e,t)}checkSecretStoragePrivateKey(t,n){let r=null;try{r=new e.Olm.PkDecryption;return r.init_with_private_key(t)===n}finally{var i;null===(i=r)||void 0===i||i.free()}}async getSessionBackupPrivateKey(){let e=await new Promise((e=>{this.cryptoStore.doTxn("readonly",[E.a.STORE_ACCOUNT],(t=>{this.cryptoStore.getSecretStorePrivateKey(t,e,"m.megolm_backup.v1")}))}));if(e&&"string"==typeof e&&(e=new Uint8Array(p.decodeBase64(W(e)||e)),await this.storeSessionBackupPrivateKey(e)),e&&e.ciphertext){const t=r.from(this.olmDevice.pickleKey),n=await Object(I.b)(e,t,"m.megolm_backup.v1");e=p.decodeBase64(n)}return e}async storeSessionBackupPrivateKey(e){if(!(e instanceof Uint8Array))throw new Error(`storeSessionBackupPrivateKey expects Uint8Array, got ${e}`);const t=r.from(this.olmDevice.pickleKey),n=await Object(I.c)(p.encodeBase64(e),t,"m.megolm_backup.v1");return this.cryptoStore.doTxn("readwrite",[E.a.STORE_ACCOUNT],(e=>{this.cryptoStore.storeSecretStorePrivateKey(e,"m.megolm_backup.v1",n)}))}checkCrossSigningPrivateKey(t,n){let r=null;try{r=new e.Olm.PkSigning;return r.init_with_seed(t)===n}finally{var i;null===(i=r)||void 0===i||i.free()}}async afterCrossSigningLocalKeyChange(){d.a.info("Starting cross-signing key change post-processing");const e=this.deviceList.getStoredDevice(this.userId,this.deviceId),t=await this.crossSigningInfo.signDevice(this.userId,e);d.a.info(`Starting background key sig upload for ${this.deviceId}`);const n=e=>{let{shouldEmit:r=!1}=e;return this.baseApis.uploadKeySignatures({[this.userId]:{[this.deviceId]:t}}).then((e=>{const{failures:t}=e||{};if(Object.keys(t||[]).length>0)throw r&&this.baseApis.emit($.KeySignatureUploadFailure,t,"afterCrossSigningLocalKeyChange",n),new O.e("Key upload failed",{failures:t});d.a.info(`Finished background key sig upload for ${this.deviceId}`)})).catch((e=>{d.a.error(`Error during background key sig upload for ${this.deviceId}`,e)}))};n({shouldEmit:!0});const r=this.baseApis.cryptoCallbacks.shouldUpgradeDeviceVerifications;if(r){d.a.info("Starting device verification upgrade");const e={};for(const[t,n]of Object.entries(this.deviceList.crossSigningInfo)){const r=await this.checkForDeviceVerificationUpgrade(t,_.a.fromStorage(n,t));r&&(e[t]=r)}if(Object.keys(e).length>0){d.a.info(`Found ${Object.keys(e).length} verif users to upgrade`);try{const t=await r({users:e});if(t)for(const n of t)n in e&&await this.baseApis.setDeviceVerified(n,e[n].crossSigningInfo.getId())}catch(e){d.a.log("shouldUpgradeDeviceVerifications threw an error: not upgrading",e)}}d.a.info("Finished device verification upgrade")}d.a.info("Finished cross-signing key change post-processing")}async checkForDeviceVerificationUpgrade(e,t){const n=this.crossSigningInfo.checkUserTrust(t);if(t.firstUse&&!n.isVerified()){const n=this.deviceList.getRawStoredDevicesForUser(e),r=await this.checkForValidDeviceSignature(e,t.keys.master,n);if(r.length)return{devices:r.map((e=>g.a.fromStorage(n[e],e))),crossSigningInfo:t}}}async checkForValidDeviceSignature(e,t,n){const r=[];if(n&&t.signatures&&t.signatures[e])for(const i of Object.keys(t.signatures[e])){const[,o]=i.split(":",2);if(o in n&&n[o].verified===z.VERIFIED)try{await p.verifySignature(this.olmDevice,t,e,o,n[o].keys[i]),r.push(o)}catch(e){}}return r}getCrossSigningId(e){return this.crossSigningInfo.getId(e)}getStoredCrossSigningForUser(e){return this.deviceList.getStoredCrossSigningForUser(e)}checkUserTrust(e){const t=this.deviceList.getStoredCrossSigningForUser(e);return t?this.crossSigningInfo.checkUserTrust(t):new _.c(!1,!1,!1)}checkDeviceTrust(e,t){const n=this.deviceList.getStoredDevice(e,t);return this.checkDeviceInfoTrust(e,n)}checkDeviceInfoTrust(e,t){const n=!(null==t||!t.isVerified()),r=this.deviceList.getStoredCrossSigningForUser(e);if(t&&r){const i=this.trustCrossSignedDevices||e===this.userId;return this.crossSigningInfo.checkDeviceTrust(r,t,n,i)}return new _.b(!1,!1,n,!1)}checkIfOwnDeviceCrossSigned(e){var t;const n=this.deviceList.getStoredDevice(this.userId,e);if(!n)return!1;const r=this.deviceList.getStoredCrossSigningForUser(this.userId);return null!==(t=null==r?void 0:r.checkDeviceTrust(r,n,!1,!0).isCrossSigningVerified())&&void 0!==t&&t}async checkOwnCrossSigningTrust(){let{allowPrivateKeyRequests:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.userId;await this.downloadKeys([this.userId]);const n=await this.crossSigningInfo.getCrossSigningKeysFromCache(),r=this.deviceList.getStoredCrossSigningForUser(t);if(!r)return void d.a.error("Got cross-signing update event for user "+t+" but no new cross-signing information found!");const i=r.getId(),o=this.crossSigningInfo.getId()!==i,a=r.getId()&&!n.has("master");if(o&&d.a.info("Got new master public key",i),e&&(o||a)){d.a.info("Attempting to retrieve cross-signing master private key");let e=null;try{e=(await this.crossSigningInfo.getCrossSigningKey("master",i))[1],d.a.info("Got cross-signing master private key")}finally{var s;null===(s=e)||void 0===s||s.free()}}const l=this.crossSigningInfo.getId("self_signing"),c=this.crossSigningInfo.getId("user_signing");this.storeTrustedSelfKeys(r.keys);const u=l!==r.getId("self_signing"),h=c!==r.getId("user_signing"),p=r.getId("self_signing")&&!n.has("self_signing"),m=r.getId("user_signing")&&!n.has("user_signing"),g={};if(u&&d.a.info("Got new self-signing key",r.getId("self_signing")),e&&(u||p)){d.a.info("Attempting to retrieve cross-signing self-signing private key");let e=null;try{e=(await this.crossSigningInfo.getCrossSigningKey("self_signing",r.getId("self_signing")))[1],d.a.info("Got cross-signing self-signing private key")}finally{var f;null===(f=e)||void 0===f||f.free()}const t=this.deviceList.getStoredDevice(this.userId,this.deviceId),n=await this.crossSigningInfo.signDevice(this.userId,t);g[this.deviceId]=n}if(h&&d.a.info("Got new user-signing key",r.getId("user_signing")),e&&(h||m)){d.a.info("Attempting to retrieve cross-signing user-signing private key");let e=null;try{e=(await this.crossSigningInfo.getCrossSigningKey("user_signing",r.getId("user_signing")))[1],d.a.info("Got cross-signing user-signing private key")}finally{var _;null===(_=e)||void 0===_||_.free()}}if(o){const e=this.crossSigningInfo.keys.master;await this.signObject(e);const t=e.signatures[this.userId]["ed25519:"+this.deviceId];g[this.crossSigningInfo.getId()]=Object.assign({},e,{signatures:{[this.userId]:{["ed25519:"+this.deviceId]:t}}})}const b=Object.keys(g);if(b.length){const e=t=>{let{shouldEmit:n=!1}=t;return d.a.info(`Starting background key sig upload for ${b}`),this.baseApis.uploadKeySignatures({[this.userId]:g}).then((t=>{const{failures:r}=t||{};if(d.a.info(`Finished background key sig upload for ${b}`),Object.keys(r||[]).length>0)throw n&&this.baseApis.emit($.KeySignatureUploadFailure,r,"checkOwnCrossSigningTrust",e),new O.e("Key upload failed",{failures:r})})).catch((e=>{d.a.error(`Error during background key sig upload for ${b}`,e)}))};e({shouldEmit:!0})}this.emit($.UserTrustStatusChanged,t,this.checkUserTrust(t)),o&&(this.emit($.KeysChanged,{}),await this.afterCrossSigningLocalKeyChange()),await this.backupManager.checkKeyBackup()}async storeTrustedSelfKeys(e){e?this.crossSigningInfo.setKeys(e):this.crossSigningInfo.clearKeys(),await this.cryptoStore.doTxn("readwrite",[E.a.STORE_ACCOUNT],(e=>{this.cryptoStore.storeCrossSigningKeys(e,this.crossSigningInfo.keys)}))}async checkDeviceVerifications(e){const t=this.baseApis.cryptoCallbacks.shouldUpgradeDeviceVerifications;if(t){if(d.a.info(`Starting device verification upgrade for ${e}`),this.crossSigningInfo.keys.user_signing){const n=this.deviceList.getStoredCrossSigningForUser(e);if(n){const r=await this.checkForDeviceVerificationUpgrade(e,n);if(r){(await t({users:{[e]:r}})).includes(e)&&await this.baseApis.setDeviceVerified(e,n.getId())}}}d.a.info(`Finished device verification upgrade for ${e}`)}}enableLazyLoading(){this.lazyLoadMembers=!0}registerEventHandlers(e){e.on(M.b.Membership,this.onMembership),e.on(L.b.ToDeviceEvent,this.onToDeviceEvent),e.on(N.d.Timeline,this.onTimelineEvent),e.on(P.c.Decrypted,this.onTimelineEvent)}start(){d.a.warn("MatrixClient.crypto.start() is deprecated")}stop(){this.outgoingRoomKeyRequestManager.stop(),this.deviceList.stop(),this.dehydrationManager.stop()}getDeviceEd25519Key(){return this.olmDevice.deviceEd25519Key}getDeviceCurve25519Key(){return this.olmDevice.deviceCurve25519Key}setGlobalBlacklistUnverifiedDevices(e){this.globalBlacklistUnverifiedDevices=e}getGlobalBlacklistUnverifiedDevices(){return this.globalBlacklistUnverifiedDevices}uploadDeviceKeys(){const e={algorithms:this.supportedAlgorithms,device_id:this.deviceId,keys:this.deviceKeys,user_id:this.userId};return this.signObject(e).then((()=>this.baseApis.uploadKeysRequest({device_keys:e})))}updateOneTimeKeyCount(e){if(!isFinite(e))throw new TypeError("Parameter for updateOneTimeKeyCount has to be a number");this.oneTimeKeyCount=e}setNeedsNewFallback(e){this.needsNewFallback=e}getNeedsNewFallback(){return!!this.needsNewFallback}maybeUploadOneTimeKeys(){if(this.oneTimeKeyCheckInProgress)return;const e=Date.now();if(null!==this.lastOneTimeKeyCheck&&e-this.lastOneTimeKeyCheck<6e4)return;this.lastOneTimeKeyCheck=e;const t=this.olmDevice.maxNumberOfOneTimeKeys(),n=Math.floor(t/2),r=async e=>{for(;n>e||this.getNeedsNewFallback();){if(n>e){d.a.info("generating oneTimeKeys");const t=Math.min(n-e,5);await this.olmDevice.generateOneTimeKeys(t)}if(this.getNeedsNewFallback()){const e=await this.olmDevice.getFallbackKey();e.curve25519&&0!=Object.keys(e.curve25519).length||(d.a.info("generating fallback key"),this.fallbackCleanup&&(clearTimeout(this.fallbackCleanup),delete this.fallbackCleanup),await this.olmDevice.generateFallbackKey())}d.a.info("calling uploadOneTimeKeys");const t=await this.uploadOneTimeKeys();if(!t.one_time_key_counts||!t.one_time_key_counts.signed_curve25519)throw new Error("response for uploading keys does not contain one_time_key_counts.signed_curve25519");e=t.one_time_key_counts.signed_curve25519}};this.oneTimeKeyCheckInProgress=!0,Promise.resolve().then((()=>void 0!==this.oneTimeKeyCount?Promise.resolve(this.oneTimeKeyCount):this.baseApis.uploadKeysRequest({}).then((e=>e.one_time_key_counts.signed_curve25519||0)))).then((e=>r(e))).catch((e=>{d.a.error("Error uploading one-time keys",e.stack||e)})).finally((()=>{this.oneTimeKeyCount=void 0,this.oneTimeKeyCheckInProgress=!1}))}async uploadOneTimeKeys(){const e=[];let t;if(this.getNeedsNewFallback()){t={};const n=await this.olmDevice.getFallbackKey();for(const[r,i]of Object.entries(n.curve25519)){const n={key:i,fallback:!0};t["signed_curve25519:"+r]=n,e.push(this.signObject(n))}this.setNeedsNewFallback(!1)}const n=await this.olmDevice.getOneTimeKeys(),r={};for(const t in n.curve25519)if(n.curve25519.hasOwnProperty(t)){const i={key:n.curve25519[t]};r["signed_curve25519:"+t]=i,e.push(this.signObject(i))}await Promise.all(e);const i={one_time_keys:r};t&&(i["org.matrix.msc2732.fallback_keys"]=t,i.fallback_keys=t);const o=await this.baseApis.uploadKeysRequest(i);return t&&(this.fallbackCleanup=setTimeout((()=>{delete this.fallbackCleanup,this.olmDevice.forgetOldFallbackKey()}),36e5)),await this.olmDevice.markKeysAsPublished(),o}downloadKeys(e,t){return this.deviceList.downloadKeys(e,!!t)}getStoredDevicesForUser(e){return this.deviceList.getStoredDevicesForUser(e)}getStoredDevice(e,t){return this.deviceList.getStoredDevice(e,t)}saveDeviceList(e){return this.deviceList.saveIfDirty(e)}async setDeviceVerification(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=arguments.length>5?arguments[5]:void 0;const a=this.deviceList.getStoredCrossSigningForUser(e);if(a&&a.getId()===t){if(null!==r||null!==i)throw new Error("Cannot set blocked or known for a cross-signing key");if(!n)throw new Error("Cannot set a cross-signing key as unverified");const s=o?Object.values(o)[0]:null;if(o&&(1!==Object.values(o).length||s!==a.getId()))throw new Error(`Key did not match expected value: expected ${a.getId()}, got ${s}`);if(this.crossSigningInfo.getId()||e!==this.crossSigningInfo.userId||(this.storeTrustedSelfKeys(a.keys),this.emit($.UserTrustStatusChanged,this.userId,this.checkUserTrust(e))),e!==this.userId){d.a.info("Master key "+a.getId()+" for "+e+" marked verified. Signing...");const n=await this.crossSigningInfo.signUser(a);if(n){const r=async i=>{let{shouldEmit:o=!1}=i;d.a.info("Uploading signature for "+e+"...");const a=await this.baseApis.uploadKeySignatures({[e]:{[t]:n}}),{failures:s}=a||{};if(Object.keys(s||[]).length>0)throw o&&this.baseApis.emit($.KeySignatureUploadFailure,s,"setDeviceVerification",r),new O.e("Key upload failed",{failures:s})};await r({shouldEmit:!0})}return n}return a}const s=this.deviceList.getRawStoredDevicesForUser(e);if(!s||!s[t])throw new Error("Unknown device "+e+":"+t);const l=s[t];let c=l.verified;if(n){if(o)for(const[e,t]of Object.entries(o))if(l.keys[e]!==t)throw new Error(`Key did not match expected value: expected ${t}, got ${l.keys[e]}`);c=z.VERIFIED}else null!==n&&c==z.VERIFIED&&(c=z.UNVERIFIED);r?c=z.BLOCKED:null!==r&&c==z.BLOCKED&&(c=z.UNVERIFIED);let u=l.known;if(null!==i&&(u=i),l.verified===c&&l.known===u||(l.verified=c,l.known=u,this.deviceList.storeDevicesForUser(e,s),this.deviceList.saveIfDirty()),n&&e===this.userId){let n;d.a.info("Own device "+t+" marked verified: signing");if(this.checkDeviceTrust(e,t).isCrossSigningVerified()?d.a.log(`Own device ${t} already cross-signing verified`):n=await this.crossSigningInfo.signDevice(e,g.a.fromStorage(l,t)),n){const r=async i=>{let{shouldEmit:o=!1}=i;d.a.info("Uploading signature for "+t);const a=await this.baseApis.uploadKeySignatures({[e]:{[t]:n}}),{failures:s}=a||{};if(Object.keys(s||[]).length>0)throw o&&this.baseApis.emit($.KeySignatureUploadFailure,s,"setDeviceVerification",r),new O.e("Key upload failed",{failures:s})};await r({shouldEmit:!0})}}const h=g.a.fromStorage(l,t);return this.emit($.DeviceVerificationChanged,e,t,h),h}findVerificationRequestDMInProgress(e){return this.inRoomVerificationRequests.findRequestInProgress(e)}getVerificationRequestsToDeviceInProgress(e){return this.toDeviceVerificationRequests.getRequestsInProgress(e)}requestVerificationDM(e,t){const n=this.inRoomVerificationRequests.findRequestInProgress(t);if(n)return Promise.resolve(n);const r=new F.a(this.baseApis,t,e);return this.requestVerificationWithChannel(e,r,this.inRoomVerificationRequests)}requestVerification(e,t){t||(t=Object.keys(this.deviceList.getRawStoredDevicesForUser(e)));const n=this.toDeviceVerificationRequests.findRequestInProgress(e,t);if(n)return Promise.resolve(n);const r=new D.a(this.baseApis,e,t,D.a.makeTransactionId());return this.requestVerificationWithChannel(e,r,this.toDeviceVerificationRequests)}async requestVerificationWithChannel(e,t,n){let r=new x.k(t,this.verificationMethods,this.baseApis);t.transactionId&&n.setRequestByChannel(t,r),await r.sendRequest();const i=n.getRequestByChannel(t);return i?r=i:(d.a.log(`Crypto: adding new request to requestsByTxnId with id ${t.transactionId} ${t.roomId}`),n.setRequestByChannel(t,r)),r}beginKeyVerification(e,t,n){let r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(i){if(r=this.toDeviceVerificationRequests.getRequestBySenderAndTxnId(t,i),!r)throw new Error(`No request found for user ${t} with transactionId ${i}`)}else{i=D.a.makeTransactionId();const e=new D.a(this.baseApis,t,[n],i,n);r=new x.k(e,this.verificationMethods,this.baseApis),this.toDeviceVerificationRequests.setRequestBySenderAndTxnId(t,i,r)}return r.beginKeyVerification(e,{userId:t,deviceId:n})}async legacyDeviceVerification(e,t,n){const r=D.a.makeTransactionId(),i=new D.a(this.baseApis,e,[t],r,t),o=new x.k(i,this.verificationMethods,this.baseApis);this.toDeviceVerificationRequests.setRequestBySenderAndTxnId(e,r,o);const a=o.beginKeyVerification(n,{userId:e,deviceId:t});return await Promise.race([a.verify(),o.waitFor((e=>e.started))]),o}async getOlmSessionsForUser(e){const t=this.getStoredDevicesForUser(e)||[],n={};for(const e of t){const t=e.getIdentityKey(),r=await this.olmDevice.getSessionInfoForDevice(t);n[e.deviceId]={deviceIdKey:t,sessions:r}}return n}getEventSenderDeviceInfo(e){const t=e.getSenderKey(),n=e.getWireContent().algorithm;if(!t||!n)return null;if(e.isKeySourceUntrusted())return null;const r=this.deviceList.getDeviceByIdentityKey(n,t);if(null===r)return null;const i=e.getClaimedEd25519Key();return i?i!==r.getFingerprint()?(d.a.warn("Event "+e.getId()+" claims ed25519 key "+i+" but sender device has key "+r.getFingerprint()),null):r:(d.a.warn("Event "+e.getId()+" claims no ed25519 key: cannot verify sending device"),null)}getEventEncryptionInfo(e){var t,n;const r={};if(r.senderKey=null!==(t=e.getSenderKey())&&void 0!==t?t:void 0,r.algorithm=e.getWireContent().algorithm,!r.senderKey||!r.algorithm)return r.encrypted=!1,r;r.encrypted=!0,e.isKeySourceUntrusted()?r.authenticated=!1:r.authenticated=!0,r.sender=null!==(n=this.deviceList.getDeviceByIdentityKey(r.algorithm,r.senderKey))&&void 0!==n?n:void 0;const i=e.getClaimedEd25519Key();return i||(d.a.warn("Event "+e.getId()+" claims no ed25519 key: cannot verify sending device"),r.mismatchedSender=!0),r.sender&&i!==r.sender.getFingerprint()&&(d.a.warn("Event "+e.getId()+" claims ed25519 key "+i+"but sender device has key "+r.sender.getFingerprint()),r.mismatchedSender=!0),r}forceDiscardSession(e){const t=this.roomEncryptors.get(e);if(void 0===t)throw new Error("Room not encrypted");if(void 0===t.forceDiscardSession)throw new Error("Room encryption algorithm doesn't support session discarding");t.forceDiscardSession()}async setRoomEncryption(e,t,n){const r=this.clientStore.getRoom(e);if(!r)throw new Error(`Unable to enable encryption tracking devices in unknown room ${e}`);await this.setRoomEncryptionImpl(r,t),this.lazyLoadMembers||n||this.deviceList.refreshOutdatedDeviceLists()}async setRoomEncryptionImpl(e,t){const n=e.roomId;if(!t.algorithm)return void d.a.log("Ignoring setRoomEncryption with no algorithm");const r=this.roomList.getRoomEncryption(n);if(r&&JSON.stringify(r)!=JSON.stringify(t))return void d.a.error("Ignoring m.room.encryption event which requests a change of config in "+n);if(this.roomEncryptors.get(n))return;let i=null;r||(i=this.roomList.setRoomEncryption(n,t));const o=f.c.get(t.algorithm);if(!o)throw new Error("Unable to encrypt with "+t.algorithm);const a=new o({userId:this.userId,deviceId:this.deviceId,crypto:this,olmDevice:this.olmDevice,baseApis:this.baseApis,roomId:n,config:t});if(this.roomEncryptors.set(n,a),i&&await i,d.a.log(`Enabling encryption in ${n}`),e.membersLoaded())await this.trackRoomDevicesImpl(e);else{const t=r=>{e.off(U.b.Update,t),e.membersLoaded()&&this.trackRoomDevicesImpl(e).catch((e=>{d.a.error(`Error enabling device tracking in ${n}`,e)}))};e.on(U.b.Update,t)}}trackRoomDevices(e){const t=this.clientStore.getRoom(e);if(!t)throw new Error(`Unable to start tracking devices in unknown room ${e}`);return this.trackRoomDevicesImpl(t)}trackRoomDevicesImpl(e){const t=e.roomId,n=async()=>{if(!this.roomEncryptors.has(t))return;d.a.log(`Starting to track devices for room ${t} ...`);(await e.getEncryptionTargetMembers()).forEach((e=>{this.deviceList.startTrackingDeviceList(e.userId)}))};let r=this.roomDeviceTrackingState[t];return r||(r=n(),this.roomDeviceTrackingState[t]=r.catch((e=>{throw delete this.roomDeviceTrackingState[t],e}))),r}ensureOlmSessionsForUsers(e,t){const n=new Map;for(const t of e){const e=[];n.set(t,e);const r=this.getStoredDevicesForUser(t)||[];for(const t of r){t.getIdentityKey()!=this.olmDevice.deviceCurve25519Key&&(t.verified!=z.BLOCKED&&e.push(t))}}return p.ensureOlmSessionsForDevices(this.olmDevice,this.baseApis,n,t)}async exportRoomKeys(){const e=[];return await this.cryptoStore.doTxn("readonly",[E.a.STORE_INBOUND_GROUP_SESSIONS],(t=>{this.cryptoStore.getAllEndToEndInboundGroupSessions(t,(t=>{if(null===t)return;const n=this.olmDevice.exportInboundGroupSession(t.senderKey,t.sessionId,t.sessionData);delete n.first_known_index,n.algorithm=p.MEGOLM_ALGORITHM,e.push(n)}))})),e}importRoomKeys(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=0,r=0;const i=e.length;function o(){var e;null===(e=t.progressCallback)||void 0===e||e.call(t,{stage:"load_keys",successes:n,failures:r,total:i})}return Promise.all(e.map((e=>{if(!e.room_id||!e.algorithm)return d.a.warn("ignoring room key entry with missing fields",e),r++,t.progressCallback&&o(),null;return this.getRoomDecryptor(e.room_id,e.algorithm).importRoomKey(e,t).finally((()=>{n++,t.progressCallback&&o()}))}))).then()}countSessionsNeedingBackup(){return this.backupManager.countSessionsNeedingBackup()}prepareToEncrypt(e){const t=this.roomEncryptors.get(e.roomId);t&&t.prepareToEncrypt(e)}async encryptEvent(e,t){const n=e.getRoomId(),r=this.roomEncryptors.get(n);if(!r)throw new Error("Room "+n+" was previously configured to use encryption, but is no longer. Perhaps the homeserver is hiding the configuration event.");await this.trackRoomDevicesImpl(t);let i=e.getContent();const o=i["m.relates_to"];o&&(i=Object.assign({},i),delete i["m.relates_to"]);const a=i["io.element.performance_metrics"];a&&(i=Object.assign({},i),delete i["io.element.performance_metrics"]);const s=await r.encryptMessage(t,e.getType(),i);o&&(s["m.relates_to"]=o),a&&(s["io.element.performance_metrics"]=a),e.makeEncrypted("m.room.encrypted",s,this.olmDevice.deviceCurve25519Key,this.olmDevice.deviceEd25519Key)}async decryptEvent(e){if(e.isRedacted()){const t=new P.b(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?G(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({room_id:e.getRoomId()},e.getUnsigned().redacted_because));let n=e.getUnsigned().redacted_because;if(t.isEncrypted())try{n=(await this.decryptEvent(t)).clearEvent}catch(e){d.a.warn("Decryption of redaction failed. Falling back to unencrypted event.",e)}return{clearEvent:{room_id:e.getRoomId(),type:"m.room.message",content:{},unsigned:{redacted_because:n}}}}{const t=e.getWireContent();return this.getRoomDecryptor(e.getRoomId(),t.algorithm).decryptEvent(e)}}async handleDeviceListChanges(e,t){e.oldSyncToken&&await this.evalDeviceListChanges(t)}requestRoomKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this.outgoingRoomKeyRequestManager.queueRoomKeyRequest(e,t,n).then((()=>{this.sendKeyRequestsImmediately&&this.outgoingRoomKeyRequestManager.sendQueuedRequests()})).catch((e=>{d.a.error("Error requesting key for event",e)}))}cancelRoomKeyRequest(e){this.outgoingRoomKeyRequestManager.cancelRoomKeyRequest(e).catch((e=>{d.a.warn("Error clearing pending room key requests",e)}))}async cancelAndResendAllOutgoingKeyRequests(){await this.outgoingRoomKeyRequestManager.cancelAndResendAllOutgoingRequests()}async onCryptoEvent(e,t){const n=t.getContent();await this.setRoomEncryptionImpl(e,n)}async onSyncWillProcess(e){e.oldSyncToken||(d.a.log("Initial sync performed - resetting device tracking state"),this.deviceList.stopTrackingAllDeviceLists(),this.deviceList.startTrackingDeviceList(this.userId),this.roomDeviceTrackingState={}),this.sendKeyRequestsImmediately=!1}async onSyncCompleted(e){var t;this.deviceList.setSyncToken(null!==(t=e.nextSyncToken)&&void 0!==t?t:null),this.deviceList.saveIfDirty(),this.deviceList.startTrackingDeviceList(this.userId),this.deviceList.refreshOutdatedDeviceLists(),e.catchingUp||(this.maybeUploadOneTimeKeys(),this.processReceivedRoomKeyRequests(),this.outgoingRoomKeyRequestManager.sendQueuedRequests(),this.sendKeyRequestsImmediately=!0)}async evalDeviceListChanges(e){if(Array.isArray(null==e?void 0:e.changed)&&e.changed.forEach((e=>{this.deviceList.invalidateUserDeviceList(e)})),Array.isArray(null==e?void 0:e.left)&&e.left.length){const t=new Set(await this.getTrackedE2eUsers());e.left.forEach((e=>{t.has(e)||this.deviceList.stopTrackingDeviceList(e)}))}}async getTrackedE2eUsers(){const e=[];for(const t of this.getTrackedE2eRooms()){const n=await t.getEncryptionTargetMembers();for(const t of n)e.push(t.userId)}return e}getTrackedE2eRooms(){return this.clientStore.getRooms().filter((e=>{if(!this.roomEncryptors.get(e.roomId))return!1;if(!this.roomDeviceTrackingState[e.roomId])return!1;const t=e.getMyMembership();return"join"===t||"invite"===t}))}async encryptAndSendToDevices(e,t){const n={eventType:c.b.RoomMessageEncrypted,batch:[]};try{await Promise.all(e.map((async e=>{let{userId:r,deviceInfo:i}=e;const o=i.deviceId,a={algorithm:p.OLM_ALGORITHM,sender_key:this.olmDevice.deviceCurve25519Key,ciphertext:{},[c.k]:Object(l.v4)()};n.batch.push({userId:r,deviceId:o,payload:a}),await p.ensureOlmSessionsForDevices(this.olmDevice,this.baseApis,new Map([[r,[i]]])),await p.encryptMessageForDevice(a.ciphertext,this.userId,this.deviceId,this.olmDevice,r,i,t)}))),n.batch=n.batch.filter((e=>Object.keys(e.payload.ciphertext).length>0||(d.a.log(`No ciphertext for device ${e.userId}:${e.deviceId}: pruning`),!1)));try{await this.baseApis.queueToDevice(n)}catch(e){throw d.a.error("sendToDevice failed",e),e}}catch(e){throw d.a.error("encryptAndSendToDevices promises failed",e),e}}async preprocessToDeviceMessages(e){return e.filter((e=>{var t;return!(e.type===c.b.RoomMessageEncrypted&&!["m.olm.v1.curve25519-aes-sha2"].includes(null===(t=e.content)||void 0===t?void 0:t.algorithm))||(d.a.log("Ignoring invalid encrypted to-device event from "+e.sender),!1)}))}onRoomKeyEvent(e){const t=e.getContent();if(!t.room_id||!t.algorithm)return void d.a.error("key event is missing fields");this.backupManager.checkedForBackup||this.backupManager.checkAndStart();this.getRoomDecryptor(t.room_id,t.algorithm).onRoomKeyEvent(e)}onRoomKeyWithheldEvent(e){const t=e.getContent();if(!(("m.no_olm"===t.code||t.room_id&&t.session_id)&&t.algorithm&&t.sender_key))return void d.a.error("key withheld event is missing fields");d.a.info(`Got room key withheld event from ${e.getSender()} for ${t.algorithm} session ${t.sender_key}|${t.session_id} in room ${t.room_id} with code ${t.code} (${t.reason})`);const n=this.getRoomDecryptor(t.room_id,t.algorithm);if(n.onRoomKeyWithheldEvent&&n.onRoomKeyWithheldEvent(e),!t.room_id){const e=this.getRoomDecryptors(t.algorithm);for(const n of e)n.retryDecryptionFromSender(t.sender_key)}}onKeyVerificationMessage(e){if(!D.a.validateEvent(e,this.baseApis))return;this.handleVerificationEvent(e,this.toDeviceVerificationRequests,(e=>{if(!D.a.canCreateRequest(D.a.getEventType(e)))return;const t=e.getContent(),n=t&&t.from_device;if(!n)return;const r=e.getSender(),i=new D.a(this.baseApis,r,[n]);return new x.k(i,this.verificationMethods,this.baseApis)}))}async handleVerificationEvent(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e.isSending()&&e.status!=P.a.SENT){let t,n;try{await new Promise(((r,i)=>{t=r,n=()=>{e.status==P.a.CANCELLED&&i(new Error("Event status set to CANCELLED."))},e.once(P.c.LocalEventIdReplaced,t),e.on(P.c.Status,n)}))}catch(e){return void d.a.error("error while waiting for the verification event to be sent: ",e)}finally{e.removeListener(P.c.LocalEventIdReplaced,t),e.removeListener(P.c.Status,n)}}let i=t.getRequest(e),o=!1;if(!i){if(i=n(e),!i)return void d.a.log(`Crypto: could not find VerificationRequest for ${e.getType()}, and could not create one, so ignoring.`);o=!0,t.setRequest(e,i)}e.setVerificationRequest(i);try{await i.channel.handleEvent(e,i,r)}catch(e){d.a.error("error while handling verification event",e)}o&&!i.initiatedByMe&&!i.invalid&&!i.observeOnly&&this.baseApis.emit($.VerificationRequest,i)}async onToDeviceBadEncrypted(e){const t=e.getWireContent(),n=e.getSender(),r=t.algorithm,i=t.sender_key;this.baseApis.emit(L.b.UndecryptableToDeviceEvent,e);const o=()=>{const e=this.getRoomDecryptors(p.MEGOLM_ALGORITHM);for(const t of e)t.retryDecryptionFromSender(i)};if(void 0===n||void 0===i||void 0===i)return;const a=this.lastNewSessionForced.getOrCreate(n),s=a.getOrCreate(i);if(s+36e5>Date.now())return d.a.debug("New session already forced with device "+n+":"+i+" at "+s+": not forcing another"),await this.olmDevice.recordSessionProblem(i,"wedged",!0),void o();let u=this.deviceList.getDeviceByIdentityKey(r,i);if(!u&&(await this.downloadKeys([n],!1),u=this.deviceList.getDeviceByIdentityKey(r,i),!u))return d.a.info("Couldn't find device for identity key "+i+": not re-establishing session"),await this.olmDevice.recordSessionProblem(i,"wedged",!1),void o();const h=new Map([[n,[u]]]);await p.ensureOlmSessionsForDevices(this.olmDevice,this.baseApis,h,!0),a.set(i,Date.now());const m={algorithm:p.OLM_ALGORITHM,sender_key:this.olmDevice.deviceCurve25519Key,ciphertext:{},[c.k]:Object(l.v4)()};await p.encryptMessageForDevice(m.ciphertext,this.userId,this.deviceId,this.olmDevice,n,u,{type:"m.dummy"}),await this.olmDevice.recordSessionProblem(i,"wedged",!0),o(),await this.baseApis.sendToDevice("m.room.encrypted",new Map([[n,new Map([[u.deviceId,m]])]]));const g=await this.outgoingRoomKeyRequestManager.getOutgoingSentRoomKeyRequest(n,u.deviceId);for(const e of g)this.requestRoomKey(e.requestBody,e.recipients,!0)}onRoomMembership(e,t,n){const r=t.roomId,i=this.roomEncryptors.get(r);if(i){var o;if(r in this.roomDeviceTrackingState)"join"==t.membership?(d.a.log("Join event for "+t.userId+" in "+r),this.deviceList.startTrackingDeviceList(t.userId)):"invite"==t.membership&&null!==(o=this.clientStore.getRoom(r))&&void 0!==o&&o.shouldEncryptForInvitedMembers()&&(d.a.log("Invite event for "+t.userId+" in "+r),this.deviceList.startTrackingDeviceList(t.userId));i.onRoomMembership(e,t,n)}}onRoomKeyRequestEvent(e){const t=e.getContent();if("request"===t.action){const t=new Y(e);this.receivedRoomKeyRequests.push(t)}else if("request_cancellation"===t.action){const t=new Q(e);this.receivedRoomKeyRequestCancellations.push(t)}}async processReceivedRoomKeyRequests(){if(!this.processingRoomKeyRequests){this.processingRoomKeyRequests=!0;try{const e=this.receivedRoomKeyRequests;this.receivedRoomKeyRequests=[];const t=this.receivedRoomKeyRequestCancellations;this.receivedRoomKeyRequestCancellations=[],await Promise.all(e.map((e=>this.processReceivedRoomKeyRequest(e)))),await Promise.all(t.map((e=>this.processReceivedRoomKeyRequestCancellation(e))))}catch(e){d.a.error(`Error processing room key requsts: ${e}`)}finally{this.processingRoomKeyRequests=!1}}}async processReceivedRoomKeyRequest(e){const t=e.userId,n=e.deviceId,r=e.requestBody,i=r.room_id,o=r.algorithm;if(d.a.log(`m.room_key_request from ${t}:${n} for ${i} / ${r.session_id} (id ${e.requestId})`),t!==this.userId){if(!this.roomEncryptors.get(i))return void d.a.debug(`room key request for unencrypted room ${i}`);const e=this.roomEncryptors.get(i),o=this.deviceList.getStoredDevice(t,n);if(!o)return void d.a.debug(`Ignoring keyshare for unknown device ${t}:${n}`);try{await e.reshareKeyWithDevice(r.sender_key,r.session_id,t,o)}catch(e){d.a.warn("Failed to re-share keys for session "+r.session_id+" with device "+t+":"+o.deviceId,e)}return}if(n===this.deviceId)return void d.a.log("Ignoring room key request from ourselves");if(!this.roomDecryptors.has(i))return void d.a.log(`room key request for unencrypted room ${i}`);const a=this.roomDecryptors.get(i).get(o);if(a)if(await a.hasKeysForKeyRequest(e)){if(e.share=()=>{a.shareKeysWithDevice(e)},this.checkDeviceTrust(t,n).isVerified())return d.a.log("device is already verified: sharing keys"),void e.share();this.emit($.RoomKeyRequest,e)}else d.a.log(`room key request for unknown session ${i} / `+r.session_id);else d.a.log(`room key request for unknown alg ${o} in room ${i}`)}async processReceivedRoomKeyRequestCancellation(e){d.a.log(`m.room_key_request cancellation for ${e.userId}:${e.deviceId} (id ${e.requestId})`),this.emit($.RoomKeyRequestCancellation,e)}getRoomDecryptor(e,t){let n,r;if(e&&(n=this.roomDecryptors.get(e),n||(n=new Map,this.roomDecryptors.set(e,n)),r=n.get(t),r))return r;const i=f.a.get(t);if(!i)throw new f.b("UNKNOWN_ENCRYPTION_ALGORITHM",'Unknown encryption algorithm "'+t+'".');return r=new i({userId:this.userId,crypto:this,olmDevice:this.olmDevice,baseApis:this.baseApis,roomId:null!=e?e:void 0}),n&&n.set(t,r),r}getRoomDecryptors(e){const t=[];for(const n of this.roomDecryptors.values())n.has(e)&&t.push(n.get(e));return t}async signObject(e){const t=new Map(Object.entries(e.signatures||{})),n=e.unsigned;delete e.signatures,delete e.unsigned;const r=t.get(this.userId)||{};t.set(this.userId,r),r["ed25519:"+this.deviceId]=await this.olmDevice.sign(s.a.stringify(e)),e.signatures=Object(j.F)(t),void 0!==n&&(e.unsigned=n)}}function W(e){if("string"!=typeof e||e.indexOf(",")<0)return null;const t=Uint8Array.from(e.split(","),(e=>parseInt(e)));return p.encodeBase64(t)}class Y{constructor(e){o()(this,"userId",void 0),o()(this,"deviceId",void 0),o()(this,"requestId",void 0),o()(this,"requestBody",void 0),o()(this,"share",void 0);const t=e.getContent();this.userId=e.getSender(),this.deviceId=t.requesting_device_id,this.requestId=t.request_id,this.requestBody=t.body||{},this.share=()=>{throw new Error("don't know how to share keys for this request yet")}}}class Q{constructor(e){o()(this,"userId",void 0),o()(this,"deviceId",void 0),o()(this,"requestId",void 0);const t=e.getContent();this.userId=e.getSender(),this.deviceId=t.requesting_device_id,this.requestId=t.request_id}}}).call(this,n(14),n(53).Buffer)},function(e,t,n){"use strict";var r=n(13),i=n.n(r),o=n(132),a=n.n(o),s=n(120),l=n.n(s),c=n(126),u=n.n(c);const d=["size","className","children"];function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=e=>{let{size:t,className:n,children:r}=e,i=a()(e,d);return l.a.createElement(t||"h1",p(p({},i),{},{className:u()(`mx_Heading_${t}`,n),children:r}))}},function(e,t,n){"use strict";n.d(t,"d",(function(){return _})),n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return v})),n.d(t,"c",(function(){return y}));var r=n(130),i=n.n(r),o=n(132),a=n.n(o),s=n(120),l=n.n(s),c=n(126),u=n.n(c),d=n(150),h=n(121);const p=["label","iconClassName","active","className"],m=["label","iconClassName","active","className","words"],g=["label","className","iconClassName","children","isDestructive"],f=["className","children","compact"],_=e=>{let{label:t,iconClassName:n,active:r,className:o}=e,s=a()(e,p);return l.a.createElement(d.f,i()({},s,{className:u()(o,{mx_IconizedContextMenu_item:!0,mx_IconizedContextMenu_active:r}),active:r,label:t}),n&&l.a.createElement("span",{className:u()("mx_IconizedContextMenu_icon",n)}),l.a.createElement("span",{className:"mx_IconizedContextMenu_label"},t),r&&l.a.createElement("span",{className:"mx_IconizedContextMenu_icon mx_IconizedContextMenu_checked"}))},b=e=>{let t,{label:n,iconClassName:r,active:o,className:s,words:c}=e,p=a()(e,m);return t=c?l.a.createElement("span",{className:"mx_IconizedContextMenu_activeText"},o?Object(h.a)("On"):Object(h.a)("Off")):l.a.createElement("span",{className:u()("mx_IconizedContextMenu_icon",{mx_IconizedContextMenu_checked:o,mx_IconizedContextMenu_unchecked:!o})}),l.a.createElement(d.e,i()({},p,{className:u()(s,{mx_IconizedContextMenu_item:!0,mx_IconizedContextMenu_active:o}),active:o,label:n}),l.a.createElement("span",{className:u()("mx_IconizedContextMenu_icon",r)}),l.a.createElement("span",{className:"mx_IconizedContextMenu_label"},n),t)},v=e=>{let{label:t,className:n,iconClassName:r,children:o,isDestructive:s}=e,c=a()(e,g);return l.a.createElement(d.d,i()({},c,{className:u()(n,{mx_IconizedContextMenu_item:!0,mx_IconizedContextMenu_itemDestructive:s}),label:t}),r&&l.a.createElement("span",{className:u()("mx_IconizedContextMenu_icon",r)}),l.a.createElement("span",{className:"mx_IconizedContextMenu_label"},t),o)},y=e=>{let{first:t,red:n,className:r,label:i,children:o}=e;const a=u()("mx_IconizedContextMenu_optionList",r,{mx_IconizedContextMenu_optionList_notFirst:!t,mx_IconizedContextMenu_optionList_red:n});return l.a.createElement("div",{className:a},i&&l.a.createElement("div",null,l.a.createElement("span",{className:"mx_IconizedContextMenu_optionList_label"},i)),o)};t.e=e=>{let{className:t,children:n,compact:r}=e,o=a()(e,f);const s=u()("mx_IconizedContextMenu",t,{mx_IconizedContextMenu_compact:r});return l.a.createElement(d.n,i()({chevronFace:d.a.None},o),l.a.createElement("div",{className:s},n))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return g})),n.d(t,"b",(function(){return f}));var r=n(130),i=n.n(r),o=n(132),a=n.n(o),s=n(13),l=n.n(s),c=n(120),u=n.n(c),d=n(223),h=n(126),p=n.n(h);const m=["children","className","kind","inputRef"];let g;!function(e){e.Solid="solid",e.Outline="outline"}(g||(g={}));class f extends u.a.PureComponent{constructor(e){super(e),l()(this,"id",void 0),this.id=this.props.id||"checkbox_"+Object(d.b)(10)}render(){const e=this.props,{children:t,className:n,kind:r=g.Solid,inputRef:o}=e,s=a()(e,m),l=p()("mx_Checkbox",n,{mx_Checkbox_hasKind:r,[`mx_Checkbox_kind_${r}`]:r});return u.a.createElement("span",{className:l},u.a.createElement("input",i()({ref:o,id:this.id},s,{type:"checkbox"})),u.a.createElement("label",{htmlFor:this.id},u.a.createElement("div",{className:"mx_Checkbox_background"},u.a.createElement("div",{className:"mx_Checkbox_checkmark"})),!!this.props.children&&u.a.createElement("div",null,this.props.children)))}}l()(f,"defaultProps",{className:""})},function(e,t,n){"use strict";n.d(t,"b",(function(){return V})),n.d(t,"a",(function(){return W}));var r=n(13),i=n.n(r),o=n(149),a=n(129),s=n(140),l=n(147),c=n(1),u=n(151),d=n(202),h=n(124),p=n(226),m=n(125),g=n(164),f=n(197),_=n(146),b=n(278),v=n(190);class y extends b.a{constructor(e){super(),this.getRoomFn=e,i()(this,"rooms",[]),i()(this,"states",{}),i()(this,"onRoomNotificationStateUpdate",(()=>{this.calculateTotalState()}))}get symbol(){return this._color===f.a.Unsent?"!":null}setRooms(e){const t=this.rooms,n=Object(_.a)(t,e);this.rooms=e;for(const e of n.removed){const t=this.states[e.roomId];t&&(delete this.states[e.roomId],t.off(b.b.Update,this.onRoomNotificationStateUpdate))}for(const e of n.added){const t=this.getRoomFn(e);t.on(b.b.Update,this.onRoomNotificationStateUpdate),this.states[e.roomId]=t}this.calculateTotalState()}getFirstRoomWithNotifications(){var e;return null===(e=Object.values(this.states).find((e=>e.color>=this.color)))||void 0===e?void 0:e.room.roomId}destroy(){super.destroy();for(const e of Object.values(this.states))e.off(b.b.Update,this.onRoomNotificationStateUpdate);this.states={}}calculateTotalState(){const e=this.snapshot();this._count=0,this._color=f.a.None;for(const[e,t]of Object.entries(this.states)){p.c.instance.getTagsForRoom(this.rooms.find((t=>t.roomId===e))).includes(v.a.LowPriority)&&t.color===f.a.Bold||(this._count+=t.count,this._color=Math.max(this.color,t.color))}this.emitIfUpdated(e)}}var E=n(220),S=n(451),w=n(801),T=n(128),C=n(16);function x(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:C.a;const o=Math.min(Math.max(e.length,t.length),r),a=Object(C.c)(e,o,i),s=Object(C.c)(t,o,i),l=Object(C.P)(a,i),c=Object(C.P)(s,i);if(c-l-BigInt(1)<n)return o<r?x(Object(C.c)(a,o+1,i),Object(C.c)(s,o+1,i),n,o+1,i):[];const u=(c-l)/BigInt(n+1),d=BigInt(l+u);return Array(n).fill(void 0).map(((e,t)=>Object(C.e)(d+BigInt(t)*u,i)))}const F=function(e,t,n){var r,i,o,a,s,l;let c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:50;if(t<0||n<0||t>e.length||n>e.length||t===n)return[];const u=e.map(((e,t)=>({index:t,order:e}))),d=Object(_.o)(u,t,n),h=void 0===(null===(r=d[n-1])||void 0===r?void 0:r.order);let p=n,m=n,g=!0;const f=void 0!==(null===(i=d[n+1])||void 0===i?void 0:i.order)?Object(C.P)(d[n+1].order):BigInt(Number.MAX_VALUE);for(let e=n-1,t=1;e>=0;e--,t++){var b;if(void 0!==(null===(b=d[e])||void 0===b?void 0:b.order)&&f-Object(C.P)(d[e].order)>t)break;p=e}const v=void 0===d[0].order?void 0:Object(C.P)(d[0].order),y=BigInt(n);0===p&&void 0!==v&&f-v<=y&&v<=y&&(g=!1);const E=!h;let S=E;if(E){var w;const e=void 0!==(null===(w=d[n-1])||void 0===w?void 0:w.order)?Object(C.P)(d[n-1].order):BigInt(Number.MIN_VALUE);for(let t=n+1,r=1;t<d.length;t++,r++){var T;if(void 0===(null===(T=d[t])||void 0===T?void 0:T.order)||Object(C.P)(d[t].order)-e>r)break;m=t}m===d.length-1&&(d[m]?Object(C.P)(d[m].order):BigInt(Number.MAX_VALUE))-e<=m-n&&(S=!1)}const F=g?n-p:Number.MAX_SAFE_INTEGER,D=S?m-n:Number.MAX_SAFE_INTEGER;h||F<D?m=n:p=n;const k=null!==(o=null===(a=d[p-1])||void 0===a?void 0:a.order)&&void 0!==o?o:"";return x(k,null!==(s=null===(l=d[m+1])||void 0===l?void 0:l.order)&&void 0!==s?s:C.a.charAt(C.a.length-1).repeat(k.length||1),1+m-p,c).map(((e,t)=>({index:d[p+t].index,order:e})))};var D=n(933),k=n(208),O=n(389),I=n(242);const A=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set;n.add(t);const r=e.get(t);return null==r||r.forEach((t=>{n.has(t)||A(e,t,n)})),n},R=(e,t,n)=>{const r=A(t,n),i=new Set;return r.forEach((t=>{const n=e.get(t);null==n||n.forEach(i.add,i)})),i},N=e=>function(t,n,r){if((!(arguments.length>3&&void 0!==arguments[3])||arguments[3])&&e.has(r))return e.get(r);const i=R(t,n,r);return e.set(r,i),i};var M=n(189),P=n(154);function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const U="mx_active_space",j=[k.a.Home,k.a.Favourites,k.a.People,k.a.Orphans],G=20,z=e=>`mx_space_context_${e}`,H=e=>e.reduce(((e,t)=>(e[t.isSpaceRoom()?0:1].push(t),e)),[[],[]]),q=e=>{if("string"==typeof e&&e.length<=50&&Array.from(e).every((e=>{const t=e.charCodeAt(0);return t>=32&&t<=126})))return e},V=(e,t,n)=>{var r;return[null!==(r=q(e))&&void 0!==r?r:NaN,t,n]},$=e=>E.a.instance.getRoomState(e);class K extends d.a{constructor(){var e;super(h.a,{}),e=this,i()(this,"rootSpaces",[]),i()(this,"parentMap",new S.a),i()(this,"notificationStateMap",new Map),i()(this,"roomIdsBySpace",new Map),i()(this,"childSpacesBySpace",new Map),i()(this,"userIdsBySpace",new Map),i()(this,"_aggregatedSpaceCache",{roomIdsBySpace:new Map,userIdsBySpace:new Map}),i()(this,"_activeSpace",k.a.Home),i()(this,"_suggestedRooms",[]),i()(this,"_invitedSpaces",new Set),i()(this,"spaceOrderLocalEchoMap",new Map),i()(this,"_allRoomsInHome",!1),i()(this,"_enabledMetaSpaces",[]),i()(this,"fetchSuggestedRooms",(async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:G;try{const{rooms:r}=await e.matrixClient.getRoomHierarchy(t.roomId,n,1,!0),i=new S.a;return r.forEach((e=>{e.children_state.forEach((e=>{var t;e.type===a.b.SpaceChild&&null!==(t=e.content.via)&&void 0!==t&&t.length&&e.content.via.forEach((t=>{i.getOrCreate(e.state_key,new Set).add(t)}))}))})),r.filter((t=>{var n;return t.room_type!==a.j.Space&&"join"!==(null===(n=e.matrixClient.getRoom(t.room_id))||void 0===n?void 0:n.getMyMembership())})).map((e=>B(B({},e),{},{viaServers:Array.from(i.get(e.room_id)||[])})))}catch(e){c.a.error(e)}return[]})),i()(this,"getSpaceFilteredRoomIds",(function(t){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t===k.a.Home&&e.allRoomsInHome?new Set(e.matrixClient.getVisibleRooms().map((e=>e.roomId))):!n||Object(k.h)(t)?e.roomIdsBySpace.get(t)||new Set:e.getAggregatedRoomIdsBySpace(e.roomIdsBySpace,e.childSpacesBySpace,t,r)})),i()(this,"getSpaceFilteredUserIds",(function(t){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!(t===k.a.Home&&e.allRoomsInHome||Object(k.h)(t)))return!n||Object(k.h)(t)?e.userIdsBySpace.get(t)||new Set:e.getAggregatedUserIdsBySpace(e.userIdsBySpace,e.childSpacesBySpace,t,r)})),i()(this,"getAggregatedRoomIdsBySpace",N(this._aggregatedSpaceCache.roomIdsBySpace)),i()(this,"getAggregatedUserIdsBySpace",N(this._aggregatedSpaceCache.userIdsBySpace)),i()(this,"markTreeChildren",((e,t)=>{const n=[e];for(;n.length;){const e=n.pop();t.delete(e),this.getChildSpaces(e.roomId).forEach((e=>{t.has(e)&&n.push(e)}))}})),i()(this,"findRootSpaces",(e=>{const t=new Set(e);e.forEach((e=>{this.getChildSpaces(e.roomId).forEach((e=>{t.delete(e)}))}));const n=Array.from(t),r=new Set(Object(o.sortBy)(e,(e=>e.roomId)));return n.forEach((e=>{this.markTreeChildren(e,r)})),Array.from(r).forEach((e=>{r.has(e)&&(n.push(e),this.markTreeChildren(e,r))})),n})),i()(this,"rebuildSpaceHierarchy",(()=>{const e=this.matrixClient.getVisibleRooms().filter((e=>e.isSpaceRoom())),[t,n]=e.reduce(((e,t)=>{let[n,r]=e;switch(Object(I.b)(t.getMyMembership())){case I.a.Join:n.push(t);break;case I.a.Invite:r.push(t)}return[n,r]}),[[],[]]),r=this.findRootSpaces(t),i=this.rootSpaces;this.rootSpaces=this.sortRootSpaces(r),this.onRoomsUpdate(),Object(_.e)(i,this.rootSpaces)&&this.emit(k.f,this.spacePanelSpaces,this.enabledMetaSpaces);const o=this._invitedSpaces;this._invitedSpaces=new Set(this.sortRootSpaces(n)),Object(w.b)(o,this._invitedSpaces)&&this.emit(k.c,this.invitedSpaces)})),i()(this,"rebuildParentMap",(()=>{const e=this.matrixClient.getVisibleRooms().filter((e=>e.isSpaceRoom()&&"join"===e.getMyMembership()));this.parentMap=new S.a,e.forEach((e=>{this.getChildren(e.roomId).forEach((t=>{this.parentMap.getOrCreate(t.roomId,new Set).add(e.roomId)}))})),M.a.instance.setProperty("numSpaces",e.length)})),i()(this,"rebuildHomeSpace",(()=>{if(this.allRoomsInHome)this.roomIdsBySpace.delete(k.a.Home);else{const e=new Set(this.matrixClient.getVisibleRooms().filter(this.showInHomeSpace).map((e=>e.roomId)));this.roomIdsBySpace.set(k.a.Home,e)}this.activeSpace===k.a.Home&&this.switchSpaceIfNeeded()})),i()(this,"rebuildMetaSpaces",(()=>{const e=new Set(this.enabledMetaSpaces),t=this.matrixClient.getVisibleRooms();if(e.has(k.a.Home)?this.rebuildHomeSpace():this.roomIdsBySpace.delete(k.a.Home),e.has(k.a.Favourites)){const e=t.filter((e=>e.tags[v.a.Favourite]));this.roomIdsBySpace.set(k.a.Favourites,new Set(e.map((e=>e.roomId))))}else this.roomIdsBySpace.delete(k.a.Favourites);if(e.has(k.a.Orphans)||e.has(k.a.Home)){const e=t.filter((e=>{var t;return!(null!==(t=this.parentMap.get(e.roomId))&&void 0!==t&&t.size||g.a.shared().getUserIdForRoomId(e.roomId))}));this.roomIdsBySpace.set(k.a.Orphans,new Set(e.map((e=>e.roomId))))}Object(k.h)(this.activeSpace)&&this.switchSpaceIfNeeded()})),i()(this,"updateNotificationStates",(e=>{const t=new Set(this.enabledMetaSpaces),n=this.matrixClient.getVisibleRooms();let r;t.has(k.a.People)?r=k.a.People:t.has(k.a.Home)&&(r=k.a.Home),e||(e=[...this.roomIdsBySpace.keys()],r===k.a.People&&e.push(k.a.People),t.has(k.a.Home)&&!this.allRoomsInHome&&e.push(k.a.Home)),e.forEach((e=>{if(this.allRoomsInHome&&e===k.a.Home)return;const t=this.getSpaceFilteredRoomIds(e,!0);this.getNotificationState(e).setRooms(n.filter((n=>e===k.a.People?this.isRoomInSpace(k.a.People,n.roomId):!(n.isSpaceRoom()||!t.has(n.roomId))&&(!r||!g.a.shared().getUserIdForRoomId(n.roomId)||e===r))))})),r!==k.a.People&&this.notificationStateMap.delete(k.a.People)})),i()(this,"showInHomeSpace",(e=>{var t;return!!this.allRoomsInHome||!e.isSpaceRoom()&&!(null!==(t=this.parentMap.get(e.roomId))&&void 0!==t&&t.size&&!g.a.shared().getUserIdForRoomId(e.roomId)&&"invite"!==e.getMyMembership())})),i()(this,"onMemberUpdate",((e,t)=>{const n=K.isInSpace(e.getMember(t));var r,i;n?null===(r=this.userIdsBySpace.get(e.roomId))||void 0===r||r.add(t):null===(i=this.userIdsBySpace.get(e.roomId))||void 0===i||i.delete(t);this._aggregatedSpaceCache.userIdsBySpace.clear();const o=this.getKnownParents(e.roomId,!0);this.emit(e.roomId),o.forEach((e=>this.emit(e))),n||this.switchSpaceIfNeeded()})),i()(this,"onRoomsUpdate",(()=>{const e=this.matrixClient.getVisibleRooms(),t=this.roomIdsBySpace,n=this.userIdsBySpace,r=this.childSpacesBySpace;this.roomIdsBySpace=new Map,this.userIdsBySpace=new Map,this.childSpacesBySpace=new Map,this.rebuildParentMap(),this.rebuildMetaSpaces();const i=new S.a;e.forEach((e=>{"join"===e.getMyMembership()&&this.getParents(e.roomId).forEach((t=>{i.getOrCreate(t.roomId,new Set).add(e.roomId)}))})),this.rootSpaces.forEach((e=>{const t=(e,n)=>{var r,o;if(n.has(e))return;if(this.roomIdsBySpace.has(e)&&this.userIdsBySpace.has(e))return[this.roomIdsBySpace.get(e),this.userIdsBySpace.get(e)];const[a,s]=H(this.getChildren(e));this.childSpacesBySpace.set(e,new Set(a.map((e=>e.roomId))));const l=new Set(s.map((e=>e.roomId))),c=null===(r=this.matrixClient)||void 0===r?void 0:r.getRoom(e),u=new Set(null==c?void 0:c.getMembers().filter((e=>"join"===e.membership||"invite"===e.membership)).map((e=>e.userId))),d=new Set(n).add(e);a.forEach((e=>{t(e.roomId,d)})),null===(o=i.get(e))||void 0===o||o.forEach((e=>{l.add(e)}));const h=new Set(Array.from(l).flatMap((e=>this.matrixClient.getRoomUpgradeHistory(e,!0).map((e=>e.roomId)))));return this.roomIdsBySpace.set(e,h),this.userIdsBySpace.set(e,u),[h,u]};t(e.roomId,new Set)}));const o=Object(S.b)(t,this.roomIdsBySpace),a=Object(S.b)(n,this.userIdsBySpace),s=Object(S.b)(r,this.childSpacesBySpace),l=o.changed.filter((e=>Object(w.b)(t.get(e),this.roomIdsBySpace.get(e)))),c=a.changed.filter((e=>Object(w.b)(n.get(e),this.userIdsBySpace.get(e)))),u=s.changed.filter((e=>Object(w.b)(r.get(e),this.childSpacesBySpace.get(e)))),d=new Set([...o.added,...a.added,...s.added,...o.removed,...a.removed,...s.removed,...l,...c,...u]);Array.from(d).flatMap((e=>[...this.getKnownParents(e,!0)])).forEach((e=>d.add(e))),this._aggregatedSpaceCache.roomIdsBySpace.clear(),this._aggregatedSpaceCache.userIdsBySpace.clear(),d.forEach((e=>{this.emit(e)})),d.has(this.activeSpace)&&this.switchSpaceIfNeeded();const h=[...d];this.enabledMetaSpaces.includes(k.a.People)&&a.added.length+a.removed.length+c.length>0&&h.push(k.a.People),this.updateNotificationStates(h)})),i()(this,"switchSpaceIfNeeded",(function(){var t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P.b.instance.roomViewStore.getRoomId();e.isRoomInSpace(e.activeSpace,n)||null!==(t=e.matrixClient.getRoom(n))&&void 0!==t&&t.isSpaceRoom()||e.switchToRelatedSpace(n)})),i()(this,"switchToRelatedSpace",(e=>{var t;if(this.suggestedRooms.find((t=>t.room_id===e)))return;let n=null===(t=this.getCanonicalParent(e))||void 0===t?void 0:t.roomId;var r;n||(n=null===(r=this.rootSpaces.find((t=>this.isRoomInSpace(t.roomId,e))))||void 0===r?void 0:r.roomId);n||(n=[...this.enabledMetaSpaces].reverse().find((t=>this.isRoomInSpace(t,e)))),n?this.setActiveSpace(n,!1):this.goToFirstSpace()})),i()(this,"onRoom",((e,t,n)=>{const r=e.getMyMembership();if(!r)return;const i=t||r;if(e.isSpaceRoom()){if("invite"===i){const t=this._invitedSpaces.size;this._invitedSpaces.add(e),t!==this._invitedSpaces.size&&this.emit(k.c,this.invitedSpaces)}else if("invite"===n&&"join"!==i)this._invitedSpaces.delete(e)&&this.emit(k.c,this.invitedSpaces);else{var o;this.rebuildSpaceHierarchy(),null===(o=this.parentMap.get(e.roomId))||void 0===o||o.forEach((e=>{this.emit(e)})),this.emit(e.roomId)}"join"===i&&e.roomId===P.b.instance.roomViewStore.getRoomId()?this.setActiveSpace(e.roomId,!1):"leave"===i&&e.roomId===this.activeSpace&&this.goToFirstSpace(!0)}else if(this.onRoomsUpdate(),"join"===i){const n=this._suggestedRooms.length;this._suggestedRooms=this._suggestedRooms.filter((t=>t.room_id!==e.roomId)),n!==this._suggestedRooms.length&&this.emit(k.e,this._suggestedRooms),"join"===t&&e.roomId===P.b.instance.roomViewStore.getRoomId()&&this.switchSpaceIfNeeded(e.roomId)}})),i()(this,"onRoomState",(e=>{const t=this.matrixClient.getRoom(e.getRoomId());if(t)switch(e.getType()){case a.b.SpaceChild:{const n=this.matrixClient.getRoom(e.getStateKey());t.isSpaceRoom()&&(null!=n&&n.isSpaceRoom()?(this.rebuildSpaceHierarchy(),this.emit(n.roomId)):this.onRoomsUpdate(),this.emit(t.roomId)),t.roomId===this.activeSpace&&"join"!==(null==n?void 0:n.getMyMembership())&&e.getPrevContent().suggested!==e.getContent().suggested&&this.loadSuggestedRooms(t);break}case a.b.SpaceParent:t.isSpaceRoom()?this.rebuildSpaceHierarchy():this.onRoomsUpdate(),this.emit(t.roomId);break;case a.b.RoomPowerLevels:t.isSpaceRoom()&&this.onRoomsUpdate()}})),i()(this,"onRoomStateMembers",(e=>{const t=this.matrixClient.getRoom(e.getRoomId()),n=e.getStateKey();null!=t&&t.isSpaceRoom()&&g.a.shared().getDMRoomsForUserId(n).length>0&&e.getPrevContent().membership!==e.getContent().membership&&this.onMemberUpdate(t,n)})),i()(this,"onRoomAccountData",((e,t,n)=>{if(t.isSpaceRoom()&&e.getType()===a.b.SpaceOrder){var r,i;this.spaceOrderLocalEchoMap.delete(t.roomId);(null===(r=e.getContent())||void 0===r?void 0:r.order)!==(null==n||null===(i=n.getContent())||void 0===i?void 0:i.order)&&this.notifyIfOrderChanged()}else if(e.getType()===a.b.Tag){var o,s;const r=(null==n||null===(o=n.getContent())||void 0===o?void 0:o.tags)||{},i=(null===(s=e.getContent())||void 0===s?void 0:s.tags)||{};!!r[v.a.Favourite]!=!!i[v.a.Favourite]&&this.onRoomFavouriteChange(t)}})),i()(this,"onAccountData",((e,t)=>{if(e.getType()===a.b.Direct){var n;const r=new Set(Object.values(null!==(n=null==t?void 0:t.getContent())&&void 0!==n?n:{}).flat()),i=new Set(Object.values(e.getContent()).flat()),o=Object(w.a)(r,i);[...o.added,...o.removed].forEach((e=>{var t;const n=null===(t=this.matrixClient)||void 0===t?void 0:t.getRoom(e);n&&this.onRoomDmChange(n,i.has(e))})),o.removed.length>0&&this.switchSpaceIfNeeded()}})),i()(this,"getSpaceTagOrdering",(e=>{var t,n;return this.spaceOrderLocalEchoMap.has(e.roomId)?this.spaceOrderLocalEchoMap.get(e.roomId):q(null===(t=e.getAccountData(a.b.SpaceOrder))||void 0===t||null===(n=t.getContent())||void 0===n?void 0:n.order)})),m.b.monitorSetting("Spaces.allRoomsInHome",null),m.b.monitorSetting("Spaces.enabledMetaSpaces",null),m.b.monitorSetting("Spaces.showPeopleInSpace",null)}get invitedSpaces(){return Array.from(this._invitedSpaces)}get enabledMetaSpaces(){return this._enabledMetaSpaces}get spacePanelSpaces(){return this.rootSpaces}get activeSpace(){return this._activeSpace}get activeSpaceRoom(){var e;return Object(k.h)(this._activeSpace)?null:null===(e=this.matrixClient)||void 0===e?void 0:e.getRoom(this._activeSpace)}get suggestedRooms(){return this._suggestedRooms}get allRoomsInHome(){return this._allRoomsInHome}setActiveRoomInSpace(e){var t,n;if(Object(k.h)(e)||null!==(t=this.matrixClient)&&void 0!==t&&null!==(n=t.getRoom(e))&&void 0!==n&&n.isSpaceRoom())if(e!==this.activeSpace&&this.setActiveSpace(e,!1),e){const t=this.getNotificationState(e).getFirstRoomWithNotifications();h.a.dispatch({action:T.a.ViewRoom,room_id:t,context_switch:!0,metricsTrigger:"WebSpacePanelNotificationBadge"})}else{const e=p.c.instance.orderedLists;for(let t=0;t<D.a.length;t++){const n=e[D.a[t]].find((e=>{if(this.showInHomeSpace(e)){return E.a.instance.getRoomState(e).isUnread}}));if(n){h.a.dispatch({action:T.a.ViewRoom,room_id:n.roomId,context_switch:!0,metricsTrigger:"WebSpacePanelNotificationBadge"});break}}}}setActiveSpace(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e||!this.matrixClient||e===this.activeSpace)return;let n=null;var r;if(Object(k.h)(e)){if(!this.enabledMetaSpaces.includes(e))return}else if(n=this.matrixClient.getRoom(e),null===(r=n)||void 0===r||!r.isSpaceRoom())return;if(window.localStorage.setItem(U,this._activeSpace=e),t){var i,o;const t=window.localStorage.getItem(z(e));t&&"invite"!==(null===(i=n)||void 0===i?void 0:i.getMyMembership())&&"join"===(null===(o=this.matrixClient.getRoom(t))||void 0===o?void 0:o.getMyMembership())&&this.isRoomInSpace(e,t)?h.a.dispatch({action:T.a.ViewRoom,room_id:t,context_switch:!0,metricsTrigger:"WebSpaceContextSwitch"}):n?h.a.dispatch({action:T.a.ViewRoom,room_id:e,context_switch:!0,metricsTrigger:"WebSpaceContextSwitch"}):h.a.dispatch({action:T.a.ViewHomePage,context_switch:!0})}this.emit(k.d,this.activeSpace),this.emit(k.e,this._suggestedRooms=[]),n&&(this.loadSuggestedRooms(n),W.instance.traverseSpace(e,(e=>{var t;null===(t=this.matrixClient.getRoom(e))||void 0===t||t.loadMembersIfNeeded()}),!1))}async loadSuggestedRooms(e){const t=await this.fetchSuggestedRooms(e);this._activeSpace===e.roomId&&(this._suggestedRooms=t,this.emit(k.e,this._suggestedRooms))}addRoomToSpace(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.matrixClient.sendStateEvent(e.roomId,a.b.SpaceChild,{via:n,suggested:r},t)}getChildren(e){var t;const n=null===(t=this.matrixClient)||void 0===t?void 0:t.getRoom(e),r=null==n?void 0:n.currentState.getStateEvents(a.b.SpaceChild).filter((e=>{var t;return null===(t=e.getContent())||void 0===t?void 0:t.via}));return Object(o.sortBy)(r,(e=>V(e.getContent().order,e.getTs(),e.getStateKey()))).map((e=>{const t=this.matrixClient.getRoomUpgradeHistory(e.getStateKey(),!0);return t[t.length-1]})).filter((e=>"join"===(null==e?void 0:e.getMyMembership())||"invite"===(null==e?void 0:e.getMyMembership())))||[]}getChildRooms(e){return this.getChildren(e).filter((e=>!e.isSpaceRoom()))}getChildSpaces(e){return this.getChildren(e).filter((e=>e.isSpaceRoom()&&"join"===e.getMyMembership()))}getParents(e){var t,n,r;let i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=null===(t=this.matrixClient)||void 0===t?void 0:t.getUserId(),s=null===(n=this.matrixClient)||void 0===n?void 0:n.getRoom(e),l=null!==(r=null==s?void 0:s.currentState.getStateEvents(a.b.SpaceParent))&&void 0!==r?r:[];return Object(_.n)(l.map((t=>{const n=t.getContent();if(!Array.isArray(n.via)||i&&!n.canonical)return;const r=this.matrixClient.getRoom(t.getStateKey()),s=null==r?void 0:r.currentState.getStateEvents(a.b.SpaceChild,e);return null==r||!r.currentState.maySendStateEvent(a.b.SpaceChild,o)||s&&!Array.isArray(s.getContent().via)?void 0:r})))}getCanonicalParent(e){var t;const n=this.getParents(e,!0);return(null===(t=Object(o.sortBy)(n,(e=>e.roomId)))||void 0===t?void 0:t[0])||null}getKnownParents(e,t){return t?R(this.parentMap,this.parentMap,e):this.parentMap.get(e)||new Set}isRoomInSpace(e,t){var n,r;let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(e===k.a.Home&&this.allRoomsInHome)return!0;if(null!==(n=this.getSpaceFilteredRoomIds(e,i))&&void 0!==n&&n.has(t))return!0;const o=g.a.shared().getUserIdForRoomId(t);return!!o&&(e===k.a.Home||e===k.a.People||!(Object(k.h)(e)||null===(r=this.getSpaceFilteredUserIds(e,i))||void 0===r||!r.has(o)||!m.b.getValue("Spaces.showPeopleInSpace",e)))}static isInSpace(e){return"join"===(null==e?void 0:e.membership)||"invite"===(null==e?void 0:e.membership)}notifyIfOrderChanged(){const e=this.sortRootSpaces(this.rootSpaces);Object(_.e)(this.rootSpaces,e)&&(this.rootSpaces=e,this.emit(k.f,this.spacePanelSpaces,this.enabledMetaSpaces))}onRoomFavouriteChange(e){this.enabledMetaSpaces.includes(k.a.Favourites)&&(e.tags[v.a.Favourite]?this.roomIdsBySpace.get(k.a.Favourites).add(e.roomId):this.roomIdsBySpace.get(k.a.Favourites).delete(e.roomId),this.emit(k.a.Favourites))}onRoomDmChange(e,t){const n=new Set(this.enabledMetaSpaces);if(!this.allRoomsInHome&&n.has(k.a.Home)){const t=this.roomIdsBySpace.get(k.a.Home);if(this.showInHomeSpace(e))null==t||t.add(e.roomId);else if(!this.roomIdsBySpace.get(k.a.Orphans).has(e.roomId)){var r;null===(r=this.roomIdsBySpace.get(k.a.Home))||void 0===r||r.delete(e.roomId)}this.emit(k.a.Home)}n.has(k.a.People)&&this.emit(k.a.People),(n.has(k.a.Orphans)||n.has(k.a.Home))&&t&&this.roomIdsBySpace.get(k.a.Orphans).delete(e.roomId)&&(this.emit(k.a.Orphans),this.emit(k.a.Home))}async reset(){this.rootSpaces=[],this.parentMap=new S.a,this.notificationStateMap=new Map,this.roomIdsBySpace=new Map,this.userIdsBySpace=new Map,this._aggregatedSpaceCache.roomIdsBySpace.clear(),this._aggregatedSpaceCache.userIdsBySpace.clear(),this._activeSpace=k.a.Home,this._suggestedRooms=[],this._invitedSpaces=new Set,this._enabledMetaSpaces=[]}async onNotReady(){this.matrixClient&&(this.matrixClient.removeListener(l.b.Room,this.onRoom),this.matrixClient.removeListener(s.d.MyMembership,this.onRoom),this.matrixClient.removeListener(s.d.AccountData,this.onRoomAccountData),this.matrixClient.removeListener(u.b.Events,this.onRoomState),this.matrixClient.removeListener(u.b.Members,this.onRoomStateMembers),this.matrixClient.removeListener(l.b.AccountData,this.onAccountData)),await this.reset()}async onReady(){this.matrixClient.on(l.b.Room,this.onRoom),this.matrixClient.on(s.d.MyMembership,this.onRoom),this.matrixClient.on(s.d.AccountData,this.onRoomAccountData),this.matrixClient.on(u.b.Events,this.onRoomState),this.matrixClient.on(u.b.Members,this.onRoomStateMembers),this.matrixClient.on(l.b.AccountData,this.onAccountData);const e=this._enabledMetaSpaces,t=m.b.getValue("Spaces.enabledMetaSpaces");this._enabledMetaSpaces=j.filter((e=>t[e])),this._allRoomsInHome=m.b.getValue("Spaces.allRoomsInHome"),this.sendUserProperties(),this.rebuildSpaceHierarchy(),Object(_.d)(e,this._enabledMetaSpaces)&&this.emit(k.f,this.spacePanelSpaces,this.enabledMetaSpaces);const n=window.localStorage.getItem(U);n&&(Object(k.h)(n)?t[n]:this.matrixClient.getRoom(n))?this.setActiveSpace(n,!1):this.switchSpaceIfNeeded()}sendUserProperties(){const e=new Set(this.enabledMetaSpaces);M.a.instance.setProperty("WebMetaSpaceHomeEnabled",e.has(k.a.Home)),M.a.instance.setProperty("WebMetaSpaceHomeAllRooms",this.allRoomsInHome),M.a.instance.setProperty("WebMetaSpacePeopleEnabled",e.has(k.a.People)),M.a.instance.setProperty("WebMetaSpaceFavouritesEnabled",e.has(k.a.Favourites)),M.a.instance.setProperty("WebMetaSpaceOrphansEnabled",e.has(k.a.Orphans))}goToFirstSpace(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.setActiveSpace(null!==(e=this.enabledMetaSpaces[0])&&void 0!==e?e:null===(t=this.spacePanelSpaces[0])||void 0===t?void 0:t.roomId,n)}async onAction(e){if(this.matrixClient)switch(e.action){case T.a.ViewRoom:{var t;const n=(null===(t=e.justCreatedOpts)||void 0===t?void 0:t.roomType)===a.j.Space;if(e.context_switch||e.justCreatedOpts&&!n)break;let r=e.room_id;if(e.room_alias&&!r&&(r=Object(O.a)(e.room_alias)),!r)return;const i=this.matrixClient.getRoom(r);null!=i&&i.isSpaceRoom()?this.setActiveSpace(i.roomId,!1):this.switchSpaceIfNeeded(r),window.localStorage.setItem(z(this.activeSpace),e.room_id);break}case T.a.ViewHomePage:!e.context_switch&&this.enabledMetaSpaces.includes(k.a.Home)&&(this.setActiveSpace(k.a.Home,!1),window.localStorage.setItem(z(this.activeSpace),""));break;case T.a.AfterLeaveRoom:Object(k.h)(this._activeSpace)||e.room_id!==this._activeSpace||this.goToFirstSpace(!0);break;case T.a.SwitchSpace:{if(e.num<1||e.num>9)break;const t=this.enabledMetaSpaces.length;e.num<=t?this.setActiveSpace(this.enabledMetaSpaces[e.num-1]):this.spacePanelSpaces.length>e.num-t-1&&this.setActiveSpace(this.spacePanelSpaces[e.num-t-1].roomId);break}case T.a.SettingUpdated:switch(e.settingName){case"Spaces.allRoomsInHome":{const e=m.b.getValue("Spaces.allRoomsInHome");this.allRoomsInHome!==e&&(this._allRoomsInHome=e,this.emit(k.b,this.allRoomsInHome),this.enabledMetaSpaces.includes(k.a.Home)&&this.rebuildHomeSpace(),this.sendUserProperties());break}case"Spaces.enabledMetaSpaces":{const e=m.b.getValue("Spaces.enabledMetaSpaces"),t=j.filter((t=>e[t]));if(Object(_.d)(this._enabledMetaSpaces,t)){const n=this.enabledMetaSpaces.some((e=>e===k.a.Home||e===k.a.People));this._enabledMetaSpaces=t;const r=this.enabledMetaSpaces.some((e=>e===k.a.Home||e===k.a.People));Object(k.h)(this.activeSpace)&&!e[this.activeSpace]&&this.switchSpaceIfNeeded(),this.rebuildMetaSpaces(),n!==r?this.updateNotificationStates():this.updateNotificationStates(t),this.emit(k.f,this.spacePanelSpaces,this.enabledMetaSpaces),this.sendUserProperties()}break}case"Spaces.showPeopleInSpace":this.emit(e.roomId),this.enabledMetaSpaces.some((e=>e===k.a.Home||e===k.a.People))||this.updateNotificationStates([e.roomId])}}}getNotificationState(e){if(this.notificationStateMap.has(e))return this.notificationStateMap.get(e);const t=new y($);return this.notificationStateMap.set(e,t),t}traverseSpace(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0;if(r&&r.has(e))return;t(e);const i=new Set(r).add(e),[o,a]=H(this.getChildren(e));n&&a.forEach((e=>t(e.roomId))),o.forEach((e=>this.traverseSpace(e.roomId,t,n,i)))}sortRootSpaces(e){return Object(o.sortBy)(e,[this.getSpaceTagOrdering,"roomId"])}async setRootSpaceOrder(e,t){this.spaceOrderLocalEchoMap.set(e.roomId,t);try{await this.matrixClient.setRoomAccountData(e.roomId,a.b.SpaceOrder,{order:t})}catch(n){c.a.warn("Failed to set root space order",n),this.spaceOrderLocalEchoMap.get(e.roomId)===t&&this.spaceOrderLocalEchoMap.delete(e.roomId)}}moveRootSpace(e,t){const n=this.rootSpaces.map(this.getSpaceTagOrdering);F(n,e,t).forEach((e=>{let{index:t,order:n}=e;this.setRootSpaceOrder(this.rootSpaces[t],n)})),this.notifyIfOrderChanged()}}class W{static get instance(){return W.internalInstance}}i()(W,"internalInstance",(()=>{const e=new K;return e.start(),e})()),window.mxSpaceStore=W.instance},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return c}));var r=n(13),i=n.n(r),o=n(1),a=n(151),s=n(129);let l;!function(e){e.Backward="b",e.Forward="f"}(l||(l={}));class c{static setEventMetadata(e,t,n){var r,i,o,a;null!==(r=e.sender)&&void 0!==r&&null!==(i=r.events)&&void 0!==i&&i.member||(e.sender=t.getSentinelMember(e.getSender())),null!==(o=e.target)&&void 0!==o&&null!==(a=o.events)&&void 0!==a&&a.member||e.getType()!==s.b.RoomMember||(e.target=t.getSentinelMember(e.getStateKey())),e.isState()&&n&&(e.forwardLooking=!1)}constructor(e){var t,n;this.eventTimelineSet=e,i()(this,"roomId",void 0),i()(this,"name",void 0),i()(this,"events",[]),i()(this,"baseIndex",0),i()(this,"startState",void 0),i()(this,"endState",void 0),i()(this,"startToken",null),i()(this,"endToken",null),i()(this,"prevTimeline",null),i()(this,"nextTimeline",null),i()(this,"paginationRequests",{[l.Backward]:null,[l.Forward]:null}),this.roomId=null!==(t=null===(n=e.room)||void 0===n?void 0:n.roomId)&&void 0!==t?t:null,this.roomId&&(this.startState=new a.a(this.roomId),this.endState=new a.a(this.roomId)),this.paginationRequests={b:null,f:null},this.name=this.roomId+":"+(new Date).toISOString()}initialiseState(e){var t,n;let{timelineWasEmpty:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.events.length>0)throw new Error("Cannot initialise state after events are added");null===(t=this.startState)||void 0===t||t.setStateEvents(e,{timelineWasEmpty:r}),null===(n=this.endState)||void 0===n||n.setStateEvents(e,{timelineWasEmpty:r})}forkLive(e){const t=this.getState(e),n=new c(this.eventTimelineSet);return n.startState=null==t?void 0:t.clone(),n.endState=t,this.endState=null==t?void 0:t.clone(),n}fork(e){const t=this.getState(e),n=new c(this.eventTimelineSet);return n.startState=null==t?void 0:t.clone(),n.endState=null==t?void 0:t.clone(),n}getRoomId(){return this.roomId}getFilter(){return this.eventTimelineSet.getFilter()}getTimelineSet(){return this.eventTimelineSet}getBaseIndex(){return this.baseIndex}getEvents(){return this.events}getState(e){if(e==c.BACKWARDS)return this.startState;if(e==c.FORWARDS)return this.endState;throw new Error("Invalid direction '"+e+"'")}getPaginationToken(e){return this.roomId?this.getState(e).paginationToken:e===l.Backward?this.startToken:this.endToken}setPaginationToken(e,t){this.roomId?this.getState(t).paginationToken=e:t===l.Backward?this.startToken=e:this.endToken=e}getNeighbouringTimeline(e){if(e==c.BACKWARDS)return this.prevTimeline;if(e==c.FORWARDS)return this.nextTimeline;throw new Error("Invalid direction '"+e+"'")}setNeighbouringTimeline(e,t){if(this.getNeighbouringTimeline(t))throw new Error("timeline already has a neighbouring timeline - cannot reset neighbour (direction: "+t+")");if(t==c.BACKWARDS)this.prevTimeline=e;else{if(t!=c.FORWARDS)throw new Error("Invalid direction '"+t+"'");this.nextTimeline=e}this.setPaginationToken(null,t)}addEvent(e,t,n){let r,i=!!t;"object"==typeof t?({toStartOfTimeline:i,roomState:n,timelineWasEmpty:r}=t):void 0!==t&&o.a.warn("Overload deprecated: `EventTimeline.addEvent(event, toStartOfTimeline, roomState?)` is deprecated in favor of the overload with `EventTimeline.addEvent(event, IAddEventOptions)`"),n||(n=i?this.startState:this.endState);const a=this.getTimelineSet();var l;a.room&&(c.setEventMetadata(e,n,i),e.isState()&&a.room.getUnfilteredTimelineSet()===a&&(null===(l=n)||void 0===l||l.setStateEvents([e],{timelineWasEmpty:r}),e.sender&&(e.getType()!==s.b.RoomMember||i)||c.setEventMetadata(e,n,i)));let u;u=i?0:this.events.length,this.events.splice(u,0,e),i&&this.baseIndex++}removeEvent(e){for(let t=this.events.length-1;t>=0;t--){const n=this.events[t];if(n.getId()==e)return this.events.splice(t,1),t<this.baseIndex&&this.baseIndex--,n}return null}toString(){return this.name}}i()(c,"BACKWARDS",l.Backward),i()(c,"FORWARDS",l.Forward)},function(e,t,n){"use strict";n.d(t,"k",(function(){return _})),n.d(t,"c",(function(){return b})),n.d(t,"g",(function(){return y})),n.d(t,"a",(function(){return E})),n.d(t,"h",(function(){return T})),n.d(t,"m",(function(){return C})),n.d(t,"f",(function(){return x})),n.d(t,"e",(function(){return F})),n.d(t,"b",(function(){return D})),n.d(t,"l",(function(){return k})),n.d(t,"i",(function(){return O})),n.d(t,"d",(function(){return I})),n.d(t,"j",(function(){return A}));var r=n(143),i=n(129),o=n(1),a=n(187),s=n(30),l=n(204),c=n(170),u=n(122),d=n(370),h=n(125),p=n(124),m=n(314),g=n(128),f=n(261);function _(e){const{status:t}=e;var n;if((!t||t===r.a.SENT)&&!e.isRedacted())if("m.room.message"===e.getType()){const t=e.getContent();if(t.msgtype&&"m.bad.encrypted"!==t.msgtype&&t.hasOwnProperty("body"))return!0}else if("m.sticker"===e.getType()||a.e.matches(e.getType())||a.a.matches(e.getType())||l.b.matches(e.getType())||e.getType()===f.b&&(null===(n=e.getContent())||void 0===n?void 0:n.state)===f.c.Started)return!0;return!1}function b(e){if(!(e.getType()===i.b.RoomMessage||a.e.matches(e.getType()))||e.status===r.a.CANCELLED||e.isRedacted()||e.isRelation(i.h.Replace)||e.getSender()!==u.a.get().getUserId())return!1;const{msgtype:t,body:n}=e.getOriginalContent();return a.e.matches(e.getType())||(t===i.e.Text||t===i.e.Emote)&&!!n&&"string"==typeof n}const v=100;function y(e){let{events:t,isForward:n,fromEventId:r}=e;if(!t.length)return;const i=t.length-1,o=n?1:-1,a=n?0:i;let s=n?i:0;r||(s=Math.min(Math.max(0,a+o*v),i));let l=!r;for(let e=a;e!==s+o;e+=o){const n=t[e];if(l||n.getId()!==r){if(l&&!Object(d.a)(n)&&b(n))return n}else l=!0,s=Math.min(Math.max(0,e+o*v),i)}}let E;!function(e){e.VISIBLE_FOR_ALL="VISIBLE_FOR_ALL",e.HIDDEN_TO_CURRENT_USER="HIDDEN_TO_CURRENT_USER",e.SEE_THROUGH_FOR_CURRENT_USER="SEE_THROUGH_FOR_CURRENT_USER"}(E||(E={}));let S=null;const w=()=>(null===S&&(S=h.b.getValue("feature_msc3531_hide_messages_pending_moderation")),S);function T(e,t){var n,r;if(t=null!==(n=t)&&void 0!==n?n:u.a.get(),!w())return E.VISIBLE_FOR_ALL;if(e.messageVisibility().visible)return E.VISIBLE_FOR_ALL;if((null===(r=e.sender)||void 0===r?void 0:r.userId)===t.getUserId())return E.SEE_THROUGH_FOR_CURRENT_USER;const o=t.getRoom(e.getRoomId());return i.a.name&&null!=o&&o.currentState.maySendStateEvent(i.a.name,t.getUserId())||i.a.altName&&null!=o&&o.currentState.maySendStateEvent(i.a.altName,t.getUserId())?E.SEE_THROUGH_FOR_CURRENT_USER:E.HIDDEN_TO_CURRENT_USER}function C(e){const t=e.getContent();return!!t["org.matrix.msc2516.voice"]||!!t["org.matrix.msc3245.voice"]}async function x(e,t,n){var i;let a;try{const i=await e.fetchRoomEvent(t,n);a=new r.b(i)}catch(e){o.a.warn("Could not find initial event: "+n),a=null}if(e.supportsThreads()&&null!==(i=a)&&void 0!==i&&i.isRelation(c.d.name)&&!a.getThread()){var s;const n=a.threadRootId,r=e.getRoom(t),i=e.getEventMapper(),l=null!==(s=null==r?void 0:r.findEventById(n))&&void 0!==s?s:i(await e.fetchRoomEvent(t,n));try{null==r||r.createThread(n,l,[a],!0)}catch(e){o.a.warn("Could not find root event: "+n)}}return a}function F(e,t,n){b(e)&&(a.e.matches(e.getType())?Object(m.g)(e,n):p.a.dispatch({action:g.a.EditEvent,event:e,timelineRenderingType:t}))}function D(e){return e===r.a.QUEUED||e===r.a.NOT_SENT||e===r.a.ENCRYPTING}const k=e=>{const t=e.getType();return s.c.matches(t)||t===i.b.RoomMessage&&s.c.matches(e.getContent().msgtype)};function O(e){var t;return e.isThreadRoot&&!(null===(t=e.getThread())||void 0===t||!t.length)&&!!e.getThread().replyToEvent}function I(e){return!l.b.matches(e.getType())}const A=(e,t)=>{p.a.dispatch({action:g.a.ViewRoom,event_id:t,highlighted:!0,room_id:e,metricsTrigger:void 0})}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return v}));var r=n(255),i=n(757),o=n(1),a=n(136),s=n(188),l=n(223),c=n(122),u=n(157),d=n(131),h=n(124),p=n(379),m=n(283),g=n(201),f=n(565),_=n(185),b=n(121);class v{static canUserModifyWidgets(e){if(!e)return o.a.warn("No room ID specified"),!1;const t=c.a.get();if(!t)return o.a.warn("User must be be logged in"),!1;const n=t.getRoom(e);if(!n)return o.a.warn(`Room ID ${e} is not recognised`),!1;const r=t.credentials.userId;return r?"join"!==n.getMyMembership()?(o.a.warn(`User ${r} is not in room ${e}`),!1):n.currentState.maySendStateEvent("im.vector.modular.widgets",r):(o.a.warn("Failed to get user ID"),!1)}static isScalarUrl(e){if(!e)return o.a.error("Scalar URL check failed. No URL specified"),!1;const t=r.parse(e);let n=d.b.get().integrations_widgets_urls;if(!n||0===n.length){const e=m.a.sharedInstance().getPrimaryManager();n=e?[e.apiUrl]:[]}for(let e=0;e<n.length;e++){const o=r.parse(n[e]);var i;if(t&&o)if(t.protocol===o.protocol&&t.host===o.host&&null!==(i=t.pathname)&&void 0!==i&&i.startsWith(o.pathname))return!0}return!1}static waitForUserWidget(e,t){return new Promise(((n,r)=>{function i(n){return!!n&&(t?void 0!==n.getContent()[e]:void 0===n.getContent()[e])}if(i(c.a.get().getAccountData("m.widgets")))return void n();function o(e){i(c.a.get().getAccountData("m.widgets"))&&(c.a.get().removeListener(a.ClientEvent.AccountData,o),clearTimeout(s),n())}const s=window.setTimeout((()=>{c.a.get().removeListener(a.ClientEvent.AccountData,o),r(new Error("Timed out waiting for widget ID "+e+" to appear"))}),2e4);c.a.get().on(a.ClientEvent.AccountData,o)}))}static waitForRoomWidget(e,t,n){return new Promise(((r,i)=>{function o(t){const r=null==t?void 0:t.some((t=>t.getContent()&&t.getContent().id===e));return n?!!r:!r}const s=c.a.get().getRoom(t);if(o(null==s?void 0:s.currentState.getStateEvents("im.vector.modular.widgets")))return void r();function l(e){if(e.getRoomId()!==t||"im.vector.modular.widgets"!==e.getType())return;o(null==s?void 0:s.currentState.getStateEvents("im.vector.modular.widgets"))&&(c.a.get().removeListener(a.RoomStateEvent.Events,l),clearTimeout(u),r())}const u=window.setTimeout((()=>{c.a.get().removeListener(a.RoomStateEvent.Events,l),i(new Error("Timed out waiting for widget ID "+e+" to appear"))}),2e4);c.a.get().on(a.RoomStateEvent.Events,l)}))}static setUserWidget(e,t,n,r,i){const a={type:t.preferred,url:n,name:r,data:i},s=c.a.get(),l=Object(_.a)(v.getUserWidgets());try{delete l[e]}catch(e){o.a.error("$widgetId is non-configurable")}const u=Boolean(n);return u&&(l[e]={content:a,sender:s.getUserId(),state_key:e,type:"m.widget",id:e}),s.setAccountData("m.widgets",l).then((()=>v.waitForUserWidget(e,u))).then((()=>{h.a.dispatch({action:"user_widget_updated"})}))}static setRoomWidget(e,t,n,r,i,o,a){let s;return s=Boolean(r)?{type:null==n?void 0:n.legacy,url:r,name:i,data:o,avatar_url:a}:{},v.setRoomWidgetContent(e,t,s)}static setRoomWidgetContent(e,t,n){const r=!!n.url;p.a.setRoomWidgetEcho(e,t,n);return c.a.get().sendStateEvent(e,"im.vector.modular.widgets",n,t).then((()=>v.waitForRoomWidget(t,e,r))).finally((()=>{p.a.removeRoomWidgetEcho(e,t)}))}static getRoomWidgets(e){const t=e.currentState.getStateEvents("im.vector.modular.widgets");return t?t.filter((e=>e.getContent().type&&e.getContent().url)):[]}static getUserWidgets(){const e=c.a.get();if(!e)throw new Error("User not logged in");const t=e.getAccountData("m.widgets");return t&&t.getContent()?t.getContent():{}}static getUserWidgetsArray(){return Object.values(v.getUserWidgets())}static getStickerpickerWidgets(){return v.getUserWidgetsArray().filter((e=>e.content&&"m.stickerpicker"===e.content.type))}static getIntegrationManagerWidgets(){return v.getUserWidgetsArray().filter((e=>e.content&&"m.integration_manager"===e.content.type))}static getRoomWidgetsOfType(e,t){return(v.getRoomWidgets(e)||[]).filter((e=>{const n=e.getContent();return n.url&&t.matches(n.type)}))}static async removeIntegrationManagerWidgets(){const e=c.a.get();if(!e)throw new Error("User not logged in");const t=e.getAccountData("m.widgets");if(!t)return;const n=t.getContent()||{};Object.entries(n).forEach((e=>{let[t,r]=e;r.content&&"m.integration_manager"===r.content.type&&delete n[t]})),await e.setAccountData("m.widgets",n)}static addIntegrationManagerWidget(e,t,n){return v.setUserWidget("integration_manager_"+(new Date).getTime(),g.a.INTEGRATION_MANAGER,t,"Integration manager: "+e,{api_url:n})}static async removeStickerpickerWidgets(){const e=c.a.get();if(!e)throw new Error("User not logged in");const t=e.getAccountData("m.widgets");if(!t)return;const n=t.getContent()||{};Object.entries(n).forEach((e=>{let[t,r]=e;r.content&&"m.stickerpicker"===r.content.type&&delete n[t]})),await e.setAccountData("m.widgets",n)}static async addJitsiWidget(t,n,r,o,a){var u;const d=f.a.getInstance().preferredDomain,h=await f.a.getInstance().getJitsiAuth(),p=Object(l.b)(24);let m;m="openidtoken-jwt"===h?i.base32.stringify(e.from(t),{pad:!1}):`Jitsi${Object(l.c)(1)}${Object(l.a)(23)}`;const _=new URL(v.getLocalJitsiWrapperUrl({auth:h}));_.search="",_.searchParams.set("confId",m),await v.setRoomWidget(t,p,g.a.JITSI,_.toString(),r,{conferenceId:m,roomName:null!=a?a:null===(u=c.a.get().getRoom(t))||void 0===u?void 0:u.name,isAudioOnly:n===s.g.Voice,isVideoChannel:o,domain:d,auth:h})}static makeAppConfig(e,t,n,r,i){if(!n)throw new Error("Widgets must be created by someone - provide a senderUserId");return t.creatorUserId=n,t.id=e,t.roomId=r,t.eventId=i,t.name=t.name||t.type,t}static getLocalJitsiWrapperUrl(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=["conferenceDomain=$domain","conferenceId=$conferenceId","isAudioOnly=$isAudioOnly","isVideoChannel=$isVideoChannel","displayName=$matrix_display_name","avatarUrl=$matrix_avatar_url","userId=$matrix_user_id","roomId=$matrix_room_id","theme=$theme","roomName=$roomName",`supportsScreensharing=${null===(e=u.a.get())||void 0===e?void 0:e.supportsJitsiScreensharing()}`,"language=$org.matrix.msc2873.client_language"];t.auth&&n.push(`auth=${t.auth}`);const r=n.join("&");let i=window.location.href;"https:"===window.location.protocol||t.forLocalRender||(i="https://app.element.io/");return new URL("jitsi.html#"+r,i).href}static getWidgetName(e){var t;return(null==e||null===(t=e.name)||void 0===t?void 0:t.trim())||Object(b.a)("Unknown App")}static getWidgetDataTitle(e){var t,n;return(null==e||null===(t=e.data)||void 0===t||null===(n=t.title)||void 0===n?void 0:n.trim())||""}static getWidgetUid(e){return e?v.calcWidgetUid(e.id,e.roomId):""}static calcWidgetUid(e,t){return t?`room_${t}_${e}`:`user_${e}`}static editWidget(e,t){var n;null===(n=m.a.sharedInstance().getPrimaryManager())||void 0===n||n.open(e,"type_"+t.type,t.id)}static isManagedByManager(e){if(v.isScalarUrl(e.url)){const e=m.a.sharedInstance();if(e.hasManager()){const t=e.getPrimaryManager();return v.isScalarUrl(null==t?void 0:t.apiUrl)}}return!1}}}).call(this,n(53).Buffer)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(121);let i;function o(e){switch(e){case i.ThreadPanel:return Object(r.a)("Threads");case i.Timeline:return Object(r.a)("Back to chat");case i.RoomSummary:return Object(r.a)("Room information");case i.RoomMemberList:return Object(r.a)("Room members");case i.ThreadView:return Object(r.a)("Back to thread")}return null}!function(e){e.RoomMemberList="RoomMemberList",e.FilePanel="FilePanel",e.NotificationPanel="NotificationPanel",e.RoomMemberInfo="RoomMemberInfo",e.EncryptionPanel="EncryptionPanel",e.RoomSummary="RoomSummary",e.Widget="Widget",e.PinnedMessages="PinnedMessages",e.Timeline="Timeline",e.Room3pidMemberInfo="Room3pidMemberInfo",e.SpaceMemberList="SpaceMemberList",e.SpaceMemberInfo="SpaceMemberInfo",e.Space3pidMemberInfo="Space3pidMemberInfo",e.ThreadView="ThreadView",e.ThreadPanel="ThreadPanel"}(i||(i={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return ie})),n.d(t,"b",(function(){return oe}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(188),l=n(1),c=n(17),u=n.n(c),d=n(231),h=n(320),p=n(215),m=n(508),g=n(122),f=n(127),_=n(121),b=n(124),v=n(181),y=n(125),E=n(201),S=n(137),w=n(155),T=n(144),C=n(234),x=n(265),F=n(2),D=n(156),k=n(128),O=n(387),I=n(241),A=n(207),R=n(379),N=n(131);function M(){var e;return N.b.get().widget_build_url?N.b.get().widget_build_url:null===(e=Object(I.b)())||void 0===e?void 0:e.widget_build_url}var P=n(219),L=n(126),B=n.n(L),U=n(162),j=n(148),G=n(123);class z extends a.a.Component{constructor(e){super(e),i()(this,"componentDidMount",(()=>{oe.instance.addListener(ie.SilencedCallsChanged,this.onSilencedCallsChanged)})),i()(this,"onSilencedCallsChanged",(()=>{this.setState({silenced:oe.instance.isCallSilenced(this.props.call.callId)})})),i()(this,"onAnswerClick",(e=>{e.stopPropagation(),oe.instance.answerCall(oe.instance.roomIdForCall(this.props.call))})),i()(this,"onRejectClick",(e=>{e.stopPropagation(),oe.instance.hangupOrReject(oe.instance.roomIdForCall(this.props.call),!0)})),i()(this,"onSilenceClick",(e=>{e.stopPropagation();const t=this.props.call.callId;this.state.silenced?oe.instance.unSilenceCall(t):oe.instance.silenceCall(t)})),this.state={silenced:oe.instance.isCallSilenced(this.props.call.callId)}}componentWillUnmount(){oe.instance.removeListener(ie.SilencedCallsChanged,this.onSilencedCallsChanged)}render(){const e=this.props.call,t=g.a.get().getRoom(oe.instance.roomIdForCall(e)),n=e.type===s.g.Voice,r=oe.instance.isForcedSilent();let i=this.state.silenced?Object(_.a)("Sound on"):Object(_.a)("Silence call");r&&(i=Object(_.a)("Notifications silenced"));const o=B()("mx_IncomingLegacyCallToast_content",{mx_IncomingLegacyCallToast_content_voice:n,mx_IncomingLegacyCallToast_content_video:!n}),l=B()("mx_IncomingLegacyCallToast_iconButton",{mx_IncomingLegacyCallToast_unSilence:this.state.silenced,mx_IncomingLegacyCallToast_silence:!this.state.silenced});return a.a.createElement(a.a.Fragment,null,a.a.createElement(U.a,{room:null!=t?t:void 0,height:32,width:32}),a.a.createElement("div",{className:o},a.a.createElement("span",{className:"mx_LegacyCallEvent_caller"},t?t.name:Object(_.a)("Unknown caller")),a.a.createElement("div",{className:"mx_LegacyCallEvent_type"},a.a.createElement("div",{className:"mx_LegacyCallEvent_type_icon"}),n?Object(_.a)("Voice call"):Object(_.a)("Video call")),a.a.createElement("div",{className:"mx_IncomingLegacyCallToast_buttons"},a.a.createElement(G.a,{className:"mx_IncomingLegacyCallToast_button mx_IncomingLegacyCallToast_button_decline",onClick:this.onRejectClick,kind:"danger"},a.a.createElement("span",null," ",Object(_.a)("Decline")," ")),a.a.createElement(G.a,{className:"mx_IncomingLegacyCallToast_button mx_IncomingLegacyCallToast_button_accept",onClick:this.onAnswerClick,kind:"primary"},a.a.createElement("span",null," ",Object(_.a)("Accept")," ")))),a.a.createElement(j.a,{className:l,disabled:r,onClick:this.onSilenceClick,title:i}))}}var H=n(198),q=n(446),V=n(586),$=n(305),K=n(798),W=n(388),Y=n(154),Q=n(800);const X="m.protocol.pstn",Z="im.vector.protocol.pstn",J="im.vector.protocol.sip_native",ee="im.vector.protocol.sip_virtual",te=["error","emptied","stalled","suspend","waiting"],ne=[...te,"play","pause","playing","ended","loadeddata","loadedmetadata","canplay","canplaythrough","volumechange"];let re;!function(e){e.Ring="ringAudio",e.Ringback="ringbackAudio",e.CallEnd="callendAudio",e.Busy="busyAudio"}(re||(re={}));let ie;!function(e){e.CallsChanged="calls_changed",e.CallChangeRoom="call_change_room",e.SilencedCallsChanged="silenced_calls_changed",e.CallState="call_state"}(ie||(ie={}));class oe extends u.a{constructor(){super(...arguments),i()(this,"calls",new Map),i()(this,"transferees",new Map),i()(this,"audioPromises",new Map),i()(this,"audioElementsWithListeners",new Map),i()(this,"supportsPstnProtocol",null),i()(this,"pstnSupportPrefixed",null),i()(this,"supportsSipNativeVirtual",null),i()(this,"assertedIdentityNativeUsers",new Map),i()(this,"silencedCalls",new Set),i()(this,"onCallIncoming",(e=>{if(!g.a.get().supportsVoip())return;const t=oe.instance.roomIdForCall(e);if(this.getCallForRoom(t))return void l.a.log("Got incoming call for room "+t+" but there's already a call for this room: ignoring");this.addCallForRoom(t,e),this.setCallListeners(e),this.onCallStateChanged(e.state,null,e);const n=g.a.get();n.prepareToEncrypt(n.getRoom(e.roomId))})),i()(this,"onCallStateChanged",((e,t,n)=>{if(!this.matchesCallForThisRoom(n))return;const r=this.roomIdForCall(n);switch(this.setCallState(n,e),b.a.dispatch({action:"call_state",room_id:r,state:e}),t){case s.f.Ringing:this.pause(re.Ring);break;case s.f.InviteSent:this.pause(re.Ringback)}switch(e!==s.f.Ringing&&this.silencedCalls.delete(n.callId),e){case s.f.Ringing:{const e=new h.a(g.a.get()).getPushRuleById(d.f.IncomingCall),t=null==e?void 0:e.enabled,r=null==e?void 0:e.actions.some((e=>e.set_tweak===d.g.Sound&&"ring"===e.value));t&&r&&!this.isForcedSilent()?this.play(re.Ring):this.silenceCall(n.callId);break}case s.f.InviteSent:this.play(re.Ringback);break;case s.f.Ended:{const e=n.hangupReason;if(this.removeCallForRoom(r),t===s.f.InviteSent&&n.hangupParty===s.e.Remote){if(this.play(re.Busy),!e||[s.c.UserHangup,"user hangup"].includes(e))break;let t,r;n.hangupReason===s.c.UserBusy?(t=Object(_.a)("User Busy"),r=Object(_.a)("The user you called is busy.")):(t=Object(_.a)("Call Failed"),r=Object(_.a)("The call could not be established")),f.b.createDialog(T.a,{title:t,description:r})}else e===s.c.AnsweredElsewhere&&t===s.f.Connecting?f.b.createDialog(T.a,{title:Object(_.a)("Answered Elsewhere"),description:Object(_.a)("The call was answered on another device.")}):t!==s.f.Fledgling&&t!==s.f.Ringing&&this.play(re.CallEnd);this.logCallStats(n,r);break}}}))}static get instance(){return window.mxLegacyCallHandler||(window.mxLegacyCallHandler=new oe),window.mxLegacyCallHandler}roomIdForCall(e){var t,n;if(!e)return null;if(this.shouldObeyAssertedfIdentity()){const t=this.assertedIdentityNativeUsers.get(e.callId);if(t){const e=Object($.a)(g.a.get(),t);if(e)return e.roomId}}return null!==(t=null!==(n=O.a.sharedInstance().nativeRoomForVirtualRoom(e.roomId))&&void 0!==n?n:e.roomId)&&void 0!==t?t:null}start(){navigator.mediaSession&&(navigator.mediaSession.setActionHandler("play",(function(){})),navigator.mediaSession.setActionHandler("pause",(function(){})),navigator.mediaSession.setActionHandler("seekbackward",(function(){})),navigator.mediaSession.setActionHandler("seekforward",(function(){})),navigator.mediaSession.setActionHandler("previoustrack",(function(){})),navigator.mediaSession.setActionHandler("nexttrack",(function(){}))),y.b.getValue(D.b.Voip)&&g.a.get().on(m.b.Incoming,this.onCallIncoming),this.checkProtocols(3),Object.values(re).forEach((e=>{const t=document.getElementById(e);t?this.addEventListenersForAudioElement(t):l.a.warn(`LegacyCallHandler: missing <audio id="${e}"> from page`)}))}stop(){const e=g.a.get();e&&e.removeListener(m.b.Incoming,this.onCallIncoming),Array.from(this.audioElementsWithListeners.keys()).forEach((e=>{this.removeEventListenersForAudioElement(e)}))}addEventListenersForAudioElement(e){this.audioElementsWithListeners.get(e)||ne.forEach((t=>{e.addEventListener(t,this),this.audioElementsWithListeners.set(e,!0)}))}removeEventListenersForAudioElement(e){ne.forEach((t=>{e.removeEventListener(t,this)}))}handleEvent(e){const t=e.target,n=null==t?void 0:t.id;te.includes(e.type)?l.a.error(`LegacyCallHandler: encountered "${e.type}" event with <audio id="${n}">`,e):ne.includes(e.type)&&function(){if(y.b.getValue("debug_legacy_call_handler")){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];l.a.log.call(console,"LegacyCallHandler debuglog:",...t)}}(`encountered "${e.type}" event with <audio id="${n}">`,e)}isForcedSilent(){const e=g.a.get();return Object(W.e)(e)}silenceCall(e){this.silencedCalls.add(e),this.emit(ie.SilencedCallsChanged,this.silencedCalls),this.areAnyCallsUnsilenced()||this.pause(re.Ring)}unSilenceCall(e){this.isForcedSilent()||(this.silencedCalls.delete(e),this.emit(ie.SilencedCallsChanged,this.silencedCalls),this.play(re.Ring))}isCallSilenced(e){return this.isForcedSilent()||this.silencedCalls.has(e)}areAnyCallsUnsilenced(){for(const e of this.calls.values())if(e.state===s.f.Ringing&&!this.isCallSilenced(e.callId))return!0;return!1}async checkProtocols(e){try{const e=await g.a.get().getThirdpartyProtocols();void 0!==e[X]?(this.supportsPstnProtocol=Boolean(e[X]),this.supportsPstnProtocol&&(this.pstnSupportPrefixed=!1)):void 0!==e[Z]?(this.supportsPstnProtocol=Boolean(e[Z]),this.supportsPstnProtocol&&(this.pstnSupportPrefixed=!0)):this.supportsPstnProtocol=null,b.a.dispatch({action:k.a.PstnSupportUpdated}),void 0!==e[J]&&void 0!==e[ee]&&(this.supportsSipNativeVirtual=Boolean(e[J]&&e[ee])),b.a.dispatch({action:k.a.VirtualRoomSupportUpdated})}catch(t){1===e?l.a.log("Failed to check for protocol support and no retries remain: assuming no support",t):(l.a.log("Failed to check for protocol support: will retry",t),window.setTimeout((()=>{this.checkProtocols(e-1)}),1e4))}}shouldObeyAssertedfIdentity(){var e;return!(null===(e=N.b.getObject("voip"))||void 0===e||!e.get("obey_asserted_identity"))}getSupportsPstnProtocol(){return this.supportsPstnProtocol}getSupportsVirtualRooms(){return this.supportsSipNativeVirtual}async pstnLookup(e){try{return await g.a.get().getThirdpartyUser(this.pstnSupportPrefixed?Z:X,{"m.id.phone":e})}catch(e){return l.a.warn("Failed to lookup user from phone number",e),Promise.resolve([])}}async sipVirtualLookup(e){try{return await g.a.get().getThirdpartyUser(ee,{native_mxid:e})}catch(e){return l.a.warn("Failed to query SIP identity for user",e),Promise.resolve([])}}async sipNativeLookup(e){try{return await g.a.get().getThirdpartyUser(J,{virtual_mxid:e})}catch(e){return l.a.warn("Failed to query identity for SIP user",e),Promise.resolve([])}}getCallById(e){for(const t of this.calls.values())if(t.callId===e)return t;return null}getCallForRoom(e){return this.calls.get(e)||null}getAnyActiveCall(){for(const e of this.calls.values())if(e.state!==s.f.Ended)return e;return null}getAllActiveCalls(){const e=[];for(const t of this.calls.values())t.state!==s.f.Ended&&t.state!==s.f.Ringing&&e.push(t);return e}getAllActiveCallsNotInRoom(e){const t=[];for(const[n,r]of this.calls.entries())n!==e&&r.state!==s.f.Ended&&t.push(r);return t}getAllActiveCallsForPip(e){const t=g.a.get().getRoom(e);return A.d.instance.hasMaximisedWidget(t)?this.getAllActiveCalls():this.getAllActiveCallsNotInRoom(e)}getTransfereeForCallId(e){return this.transferees.get(e)}play(e){const t=`LegacyCallHandler.play(${e}):`;l.a.debug(`${t} beginning of function`);const n=document.getElementById(e);if(n){this.addEventListenersForAudioElement(n);const r=async()=>{try{n.muted&&(l.a.error(`${t} <audio> element was unexpectedly muted but we recovered gracefully by unmuting it`),n.muted=!1),l.a.debug(`${t} attempting to play audio at volume=${n.volume}`),await n.play(),l.a.debug(`${t} playing audio successfully`)}catch(e){l.a.warn(`${t} unable to play audio clip`,e)}};this.audioPromises.has(e)?this.audioPromises.set(e,this.audioPromises.get(e).then((()=>(n.load(),r())))):this.audioPromises.set(e,r())}else l.a.warn(`${t} unable to find <audio> element for ${e}`)}pause(e){const t=`LegacyCallHandler.pause(${e}):`;l.a.debug(`${t} beginning of function`);const n=document.getElementById(e),r=()=>{l.a.debug(`${t} pausing audio`),n.pause()};n?this.audioPromises.has(e)?this.audioPromises.set(e,this.audioPromises.get(e).then(r)):r():l.a.warn(`${t} unable to find <audio> element for ${e}`)}matchesCallForThisRoom(e){const t=this.roomIdForCall(e),n=this.getCallForRoom(t);return!!n&&e.callId===n.callId}setCallListeners(e){let t=this.roomIdForCall(e);e.on(s.d.Error,(t=>{this.matchesCallForThisRoom(e)&&(l.a.error("Call error:",t),t.code!==s.c.NoUserMedia?0!==g.a.get().getTurnServers().length||null!==y.b.getValue("fallbackICEServerAllowed")?f.b.createDialog(T.a,{title:Object(_.a)("Call Failed"),description:t.message}):this.showICEFallbackPrompt():this.showMediaCaptureError(e))})),e.on(s.d.Hangup,(()=>{this.matchesCallForThisRoom(e)&&this.removeCallForRoom(t)})),e.on(s.d.State,((t,n)=>{this.onCallStateChanged(t,n,e)})),e.on(s.d.Replaced,(n=>{this.matchesCallForThisRoom(e)&&(l.a.log(`Call ID ${e.callId} is being replaced by call ID ${n.callId}`),e.state===s.f.Ringing?this.pause(re.Ring):e.state===s.f.InviteSent&&this.pause(re.Ringback),this.removeCallForRoom(t),this.addCallForRoom(t,n),this.setCallListeners(n),this.setCallState(n,n.state))})),e.on(s.d.AssertedIdentityChanged,(async()=>{var n;if(!this.matchesCallForThisRoom(e))return;if(l.a.log(`Call ID ${e.callId} got new asserted identity:`,e.getRemoteAssertedIdentity()),!this.shouldObeyAssertedfIdentity())return void l.a.log("asserted identity not enabled in config: ignoring");const r=null===(n=e.getRemoteAssertedIdentity())||void 0===n?void 0:n.id;let i=r;if(r){const e=await this.sipNativeLookup(r);e.length&&e[0].fields.lookup_success&&(i=e[0].userid)}if(l.a.log(`Asserted identity ${r} mapped to ${i}`),i){this.assertedIdentityNativeUsers.set(e.callId,i),await Object(P.c)(g.a.get(),i);const n=this.roomIdForCall(e);l.a.log(`Old room ID: ${t}, new room ID: ${n}`),n!==t&&(this.removeCallForRoom(t),t=n,l.a.log("Moving call to room "+t),this.addCallForRoom(t,e,!0))}}))}async logCallStats(e,t){const n=await e.getCurrentCallStats();if(l.a.debug(`Call completed. Call ID: ${e.callId}, virtual room ID: ${e.roomId}, user-facing room ID: ${t}, direction: ${e.direction}, our Party ID: ${e.ourPartyId}, hangup party: ${e.hangupParty}, hangup reason: ${e.hangupReason}`),n){l.a.debug("Local candidates:");for(const e of n.filter((e=>"local-candidate"===e.type))){const t=e.address||e.ip;l.a.debug(`${e.id} - type: ${e.candidateType}, address: ${t}, port: ${e.port}, protocol: ${e.protocol}, relay protocol: ${e.relayProtocol}, network type: ${e.networkType}`)}l.a.debug("Remote candidates:");for(const e of n.filter((e=>"remote-candidate"===e.type))){const t=e.address||e.ip;l.a.debug(`${e.id} - type: ${e.candidateType}, address: ${t}, port: ${e.port}, protocol: ${e.protocol}`)}l.a.debug("Candidate pairs:");for(const e of n.filter((e=>"candidate-pair"===e.type)))l.a.debug(`${e.localCandidateId} / ${e.remoteCandidateId} - state: ${e.state}, nominated: ${e.nominated}, requests sent ${e.requestsSent}, requests received ${e.requestsReceived}, responses received: ${e.responsesReceived}, responses sent: ${e.responsesSent}, bytes received: ${e.bytesReceived}, bytes sent: ${e.bytesSent}, `);l.a.debug("Outbound RTP:");for(const e of n.filter((e=>"outbound-rtp"===e.type)))l.a.debug(e);l.a.debug("Inbound RTP:");for(const e of n.filter((e=>"inbound-rtp"===e.type)))l.a.debug(e)}else l.a.debug("Call statistics are undefined. The call has probably failed before a peerConn was established")}setCallState(e,t){const n=oe.instance.roomIdForCall(e);l.a.log(`Call state in ${n} changed to ${t}`);const r=`call_${e.callId}`;t===s.f.Ringing?H.a.sharedInstance().addOrReplaceToast({key:r,priority:100,component:z,bodyClassName:"mx_IncomingLegacyCallToast",props:{call:e}}):H.a.sharedInstance().dismissToast(r),this.emit(ie.CallState,n,t)}removeCallForRoom(e){l.a.log("Removing call for room ",e),this.calls.delete(e),this.emit(ie.CallsChanged,this.calls)}showICEFallbackPrompt(){const e=g.a.get(),t=e=>a.a.createElement("code",null,e);f.b.createDialog(w.a,{title:Object(_.a)("Call failed due to misconfigured server"),description:a.a.createElement("div",null,a.a.createElement("p",null,Object(_.a)("Please ask the administrator of your homeserver (<code>%(homeserverDomain)s</code>) to configure a TURN server in order for calls to work reliably.",{homeserverDomain:e.getDomain()},{code:t})),a.a.createElement("p",null,Object(_.a)("Alternatively, you can try to use the public server at <code>turn.matrix.org</code>, but this will not be as reliable, and it will share your IP address with that server. You can also manage this in Settings.",void 0,{code:t}))),button:Object(_.a)("Try using turn.matrix.org"),cancelButton:Object(_.a)("OK"),onFinished:t=>{y.b.setValue("fallbackICEServerAllowed",null,S.a.DEVICE,t),e.setFallbackICEServerAllowed(t)}},void 0,!0)}showMediaCaptureError(e){let t,n;e.type===s.g.Voice?(t=Object(_.a)("Unable to access microphone"),n=a.a.createElement("div",null,Object(_.a)("Call failed because microphone could not be accessed. Check that a microphone is plugged in and set up correctly."))):e.type===s.g.Video&&(t=Object(_.a)("Unable to access webcam / microphone"),n=a.a.createElement("div",null,Object(_.a)("Call failed because webcam or microphone could not be accessed. Check that:"),a.a.createElement("ul",null,a.a.createElement("li",null,Object(_.a)("A microphone and webcam are plugged in and set up correctly")),a.a.createElement("li",null,Object(_.a)("Permission is granted to use the webcam")),a.a.createElement("li",null,Object(_.a)("No other application is using the webcam"))))),f.b.createDialog(T.a,{title:t,description:n},void 0,!0)}async placeMatrixCall(e,t,n){const r=await O.a.sharedInstance().getOrCreateVirtualRoomForRoom(e)||e;if(l.a.debug("Mapped real room "+e+" to room ID "+r),r!==e){const e=g.a.get().getRoom(r);e.getPendingEvents().length>0&&q.a.cancelUnsentEvents(e)}const i=g.a.get().getTurnServersExpiry()-Date.now();l.a.log("Current turn creds expire in "+i+" ms");const o=g.a.get().createCall(r);try{this.addCallForRoom(e,o)}catch(e){return void f.b.createDialog(T.a,{title:Object(_.a)("Already in call"),description:Object(_.a)("You're already in a call with this person.")})}n&&this.transferees.set(o.callId,n),this.setCallListeners(o),this.setActiveCallRoomId(e),t===s.g.Voice?o.placeVoiceCall():"video"===t?o.placeVideoCall():l.a.error("Unknown conf call type: "+t)}async placeCall(e,t,n){var r;if(null===(r=Y.b.instance.voiceBroadcastPlaybacksStore.getCurrent())||void 0===r||r.pause(),Y.b.instance.voiceBroadcastRecordingsStore.getCurrent())return void Object(Q.a)();if(M())return void await async function(e){const t=g.a.get().getRoom(e);if(!t)return;if(!v.a.canUserModifyWidgets(e))return void l.a.error(`User not allowed to modify widgets in ${e}`);const n=M();if(!n)return;let r;try{const t=await fetch(`${n}?roomId=${e}`);r=await t.json()}catch(t){return void l.a.error(`Managed hybrid widget builder failed for room ${e}`,t)}if(!r)return;const{widget_id:i,widget:o,layout:a}=r;let s=C.a.instance.getApps(e);if(s.some((e=>e.id===i))||R.a.roomHasPendingWidgets(e,[]))return void l.a.error(`Managed hybrid widget already present in room ${e}`);try{await v.a.setRoomWidgetContent(e,i,o)}catch(t){return void l.a.error(`Unable to add managed hybrid widget in room ${e}`,t)}if(!A.d.instance.canCopyLayoutToRoom(t))return;s=C.a.instance.getApps(e);const c=s.find((e=>e.id===i));c&&(A.d.instance.moveToContainer(t,c,a.container),A.d.instance.setContainerHeight(t,a.container,a.height),A.d.instance.copyLayoutToRoom(t))}(e);if(!g.a.get().supportsVoip())return void f.b.createDialog(T.a,{title:Object(_.a)("Calls are unsupported"),description:Object(_.a)("You cannot place calls in this browser.")});if(g.a.get().getSyncState()===p.b.Error)return void f.b.createDialog(T.a,{title:Object(_.a)("Connectivity to the server has been lost"),description:Object(_.a)("You cannot place calls without a connection to the server.")});if(this.getAllActiveCalls().length>1)return void f.b.createDialog(T.a,{title:Object(_.a)("Too Many Calls"),description:Object(_.a)("You've reached the maximum number of simultaneous calls.")});const i=g.a.get().getRoom(e);if(!i)return void l.a.error(`Room ${e} does not exist.`);const o=Object(K.a)(i);o.length<=1?f.b.createDialog(T.a,{description:Object(_.a)("You cannot place a call with yourself.")}):2===o.length?(l.a.info(`Place ${t} call in ${e}`),await this.placeMatrixCall(e,t,n)):await this.placeJitsiCall(e,t)}hangupAllCalls(){for(const e of this.calls.values())this.stopRingingIfPossible(e.callId),e.hangup(s.c.UserHangup,!1)}hangupOrReject(e,t){const n=this.calls.get(e);n&&(this.stopRingingIfPossible(n.callId),t?n.reject():n.hangup(s.c.UserHangup,!1))}answerCall(e){if(!this.calls.has(e))return;const t=this.calls.get(e);this.stopRingingIfPossible(t.callId),this.getAllActiveCalls().length>1?f.b.createDialog(T.a,{title:Object(_.a)("Too Many Calls"),description:Object(_.a)("You've reached the maximum number of simultaneous calls.")}):(t.answer(),this.setActiveCallRoomId(e),b.a.dispatch({action:k.a.ViewRoom,room_id:e,metricsTrigger:"WebAcceptCall"}))}stopRingingIfPossible(e){this.silencedCalls.delete(e),this.areAnyCallsUnsilenced()||this.pause(re.Ring)}async dialNumber(e,t){const n=await this.pstnLookup(e);if(!n||0===n.length||!n[0].userid)return void f.b.createDialog(T.a,{title:Object(_.a)("Unable to look up phone number"),description:Object(_.a)("There was an error looking up the phone number")});const r=n[0].userid;let i;if(this.getSupportsVirtualRooms()){const t=await this.sipNativeLookup(r);i=t.length>0&&t[0].fields.lookup_success?t[0].userid:r,l.a.log("Looked up "+e+" to "+r+" and mapped to native user "+i)}else i=r;const o=await Object(P.c)(g.a.get(),i);b.a.dispatch({action:k.a.ViewRoom,room_id:o,metricsTrigger:"WebDialPad"}),await this.placeMatrixCall(o,s.g.Voice,t)}async startTransferToPhoneNumber(e,t,n){if(n)return void this.dialNumber(t,e);const r=await this.pstnLookup(t);r&&0!==r.length&&r[0].userid?await this.startTransferToMatrixID(e,r[0].userid,n):f.b.createDialog(T.a,{title:Object(_.a)("Unable to transfer call"),description:Object(_.a)("There was an error looking up the phone number")})}async startTransferToMatrixID(e,t,n){if(n){const n=await Object(P.c)(g.a.get(),t);this.placeCall(n,e.type,e),b.a.dispatch({action:k.a.ViewRoom,room_id:n,should_peek:!1,joining:!1,metricsTrigger:void 0})}else try{await e.transfer(t)}catch(e){l.a.log("Failed to transfer call",e),f.b.createDialog(T.a,{title:Object(_.a)("Transfer Failed"),description:Object(_.a)("Failed to transfer call")})}}setActiveCallRoomId(e){l.a.info("Setting call in room "+e+" active");for(const[t,n]of this.calls.entries())n.state!==s.f.Ended&&(t===e?n.setRemoteOnHold(!1):(l.a.info("Holding call in room "+t+" because another call is being set active"),n.setRemoteOnHold(!0)))}hasAnyUnheldCall(){for(const e of this.calls.values())if(e.state!==s.f.Ended&&!e.isRemoteOnHold())return!0;return!1}async placeJitsiCall(e,t){const n=g.a.get();l.a.info(`Place conference call in ${e}`),b.a.dispatch({action:"appsDrawer",show:!0});const r=C.a.instance.getApps(e).find((e=>E.a.JITSI.matches(e.type)));if(r)A.d.instance.moveToContainer(n.getRoom(e),r,A.a.Top);else try{await v.a.addJitsiWidget(e,t,"Jitsi",!1),l.a.log("Jitsi widget added")}catch(e){"M_FORBIDDEN"===e.errcode&&f.b.createDialog(T.a,{title:Object(_.a)("Permission Required"),description:Object(_.a)("You do not have permission to start a conference call in this room")}),l.a.error(e)}}hangupCallApp(e){l.a.info("Leaving conference call in "+e);const t=C.a.instance.getRoom(e);if(!t)return;t.widgets.filter((e=>E.a.JITSI.matches(e.type))).forEach((e=>{const t=x.a.instance.getMessagingForUid(v.a.getWidgetUid(e));t&&t.transport.send(F.a.HangupCall,{})}))}showTransferDialog(e){e.setRemoteOnHold(!0),b.a.dispatch({action:k.a.OpenInviteDialog,kind:V.a.CallTransfer,call:e,analyticsName:"Transfer Call",className:"mx_InviteDialog_transferWrapper",onFinishedCallback:t=>{0!==t.length&&!1!==t[0]||e.setRemoteOnHold(!1)}})}addCallForRoom(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.calls.has(e))throw l.a.log(`Couldn't add call to room ${e}: already have a call for this room`),new Error("Already have a call for room "+e);l.a.log("setting call for room "+e),this.calls.set(e,t),n?this.emit(ie.CallChangeRoom,t):this.emit(ie.CallsChanged,this.calls)}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return d}));var r=n(13),i=n.n(r),o=n(352),a=n(16),s=n(1),l=n(158),c=n(129);let u;!function(e){e.Membership="RoomMember.membership",e.Name="RoomMember.name",e.PowerLevel="RoomMember.powerLevel",e.Typing="RoomMember.typing"}(u||(u={}));class d extends l.b{constructor(e,t){super(),this.roomId=e,this.userId=t,i()(this,"_isOutOfBand",!1),i()(this,"modified",-1),i()(this,"requestedProfileInfo",!1),i()(this,"typing",!1),i()(this,"name",void 0),i()(this,"rawDisplayName",void 0),i()(this,"powerLevel",0),i()(this,"powerLevelNorm",0),i()(this,"user",void 0),i()(this,"membership",void 0),i()(this,"disambiguate",!1),i()(this,"events",{}),this.name=t,this.rawDisplayName=t,this.updateModifiedTime()}markOutOfBand(){this._isOutOfBand=!0}isOutOfBand(){return this._isOutOfBand}setMembershipEvent(e,t){var n,r;const i=null!==(n=e.getDirectionalContent().displayname)&&void 0!==n?n:"";if(e.getType()!==c.b.RoomMember)return;this._isOutOfBand=!1,this.events.member=e;const o=this.membership;this.membership=e.getDirectionalContent().membership,void 0===this.membership&&s.a.trace(`membership event with membership undefined (forwardLooking: ${e.forwardLooking})!`,e.getContent(),"prevcontent is ",e.getPrevContent()),this.disambiguate=function(e,t,n){if(!t||t===e)return!1;if(!a.J(t))return!1;if(!n)return!1;if(h.test(t))return!0;if(p.test(t))return!0;const r=n.getUserIdsWithDisplayName(t);return!!r.some((t=>t!==e))}(this.userId,i,t);const l=this.name;this.name=function(e,t,n){return t&&t!==e?n?a.H(t)+" ("+e+")":a.J(t)?a.H(t):e:e}(this.userId,i,this.disambiguate),this.rawDisplayName=a.H(null!==(r=e.getDirectionalContent().displayname)&&void 0!==r?r:""),this.rawDisplayName&&a.J(this.rawDisplayName)||(this.rawDisplayName=this.userId),o!==this.membership&&(this.updateModifiedTime(),this.emit(u.Membership,e,this,o)),l!==this.name&&(this.updateModifiedTime(),this.emit(u.Name,e,this,l))}setPowerLevelEvent(e){if(e.getType()!==c.b.RoomPowerLevels||""!==e.getStateKey())return;const t=e.getDirectionalContent();let n=t.users_default||0;const r=t.users||{};Object.values(r).forEach((e=>{n=Math.max(n,e)}));const i=this.powerLevel,o=this.powerLevelNorm;void 0!==r[this.userId]&&Number.isInteger(r[this.userId])?this.powerLevel=r[this.userId]:void 0!==t.users_default?this.powerLevel=t.users_default:this.powerLevel=0,this.powerLevelNorm=0,n>0&&(this.powerLevelNorm=100*this.powerLevel/n),i===this.powerLevel&&o===this.powerLevelNorm||(this.updateModifiedTime(),this.emit(u.PowerLevel,e,this))}setTypingEvent(e){if("m.typing"!==e.getType())return;const t=this.typing;this.typing=!1;const n=e.getContent().user_ids;Array.isArray(n)&&(-1!==n.indexOf(this.userId)&&(this.typing=!0),t!==this.typing&&(this.updateModifiedTime(),this.emit(u.Typing,e,this)))}updateModifiedTime(){this.modified=Date.now()}getLastModifiedTime(){return this.modified}isKicked(){return"leave"===this.membership&&void 0!==this.events.member&&this.events.member.getSender()!==this.events.member.getStateKey()}getDMInviter(){if(this.events.member){const e=this.events.member;let t=e.getContent(),n=e.getSender();if("join"===t.membership&&(t=e.getPrevContent(),n=e.getUnsigned().prev_sender),"invite"===t.membership&&t.is_direct)return n}}getAvatarUrl(e,t,n,r){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=arguments.length>5?arguments[5]:void 0;const s=this.getMxcAvatarUrl();if(!s&&!i)return null;const l=Object(o.a)(e,s,t,n,r,a);return l||null}getMxcAvatarUrl(){return this.events.member?this.events.member.getDirectionalContent().avatar_url:this.user?this.user.avatarUrl:void 0}}const h=/@.+:.+/,p=/[\u200E\u200F\u202A-\u202F]/},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"f",(function(){return o})),n.d(t,"e",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return l})),n.d(t,"a",(function(){return c}));var r=n(146);function i(e,t){const n=new Map(Object.entries(e));for(const e of t)n.delete(e);return Array.from(n.entries()).reduce(((e,t)=>{let[n,r]=t;return e[n]=r,e}),{})}function o(e,t){const n=Object.keys(e),o=Object(r.a)(n,t);return 0===o.removed.length?a(e):i(e,o.removed)}function a(e,t){const n={};for(const[r,i]of Object.entries(e))n[r]=i,t&&(n[r]=t(r,i));return n}function s(e,t){if(e===t)return!1;const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!0;const o=Object(r.f)(n,i);return o.length!==n.length||o.some((n=>e[n]!==t[n]))}function l(e,t){const n=function(e,t){const n=Object.keys(e),i=Object.keys(t),o=Object(r.a)(n,i);return{changed:Object(r.f)(n,i).filter((n=>e[n]!==t[n])),added:o.added,removed:o.removed}}(e,t);return Object(r.k)(n.removed,n.added,n.changed)}function c(e){return JSON.parse(JSON.stringify(e))}},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(944)},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"e",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"a",(function(){return l}));var r=n(10);const i=new r.UnstableValue("m.poll.disclosed","org.matrix.msc3381.poll.disclosed"),o=new r.UnstableValue("m.poll.undisclosed","org.matrix.msc3381.poll.undisclosed"),a=new r.UnstableValue("m.poll.start","org.matrix.msc3381.poll.start"),s=new r.UnstableValue("m.poll.response","org.matrix.msc3381.poll.response"),l=new r.UnstableValue("m.poll.end","org.matrix.msc3381.poll.end")},function(e,t,n){"use strict";n.d(t,"f",(function(){return E})),n.d(t,"g",(function(){return S})),n.d(t,"a",(function(){return w})),n.d(t,"e",(function(){return T})),n.d(t,"d",(function(){return C})),n.d(t,"c",(function(){return x})),n.d(t,"b",(function(){return F})),n.d(t,"i",(function(){return D})),n.d(t,"j",(function(){return A})),n.d(t,"k",(function(){return R})),n.d(t,"h",(function(){return N}));var r,i,o=n(13),a=n.n(o),s=n(359),l=n(963),c=n(1),u=n(16),d=n(129),h=n(223),p=n(357),m=n(497),g=n(158),f=n(358),_=n(224),b=n(193);function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}let E,S,w,T,C,x;!function(e){e.AUDIO="audio",e.VIDEO="video"}(r||(r={})),function(e){e.OPUS="opus"}(i||(i={})),function(e){e.Fledgling="fledgling",e.InviteSent="invite_sent",e.WaitLocalMedia="wait_local_media",e.CreateOffer="create_offer",e.CreateAnswer="create_answer",e.Connecting="connecting",e.Connected="connected",e.Ringing="ringing",e.Ended="ended"}(E||(E={})),function(e){e.Voice="voice",e.Video="video"}(S||(S={})),function(e){e.Inbound="inbound",e.Outbound="outbound"}(w||(w={})),function(e){e.Local="local",e.Remote="remote"}(T||(T={})),function(e){e.Hangup="hangup",e.State="state",e.Error="error",e.Replaced="replaced",e.LocalHoldUnhold="local_hold_unhold",e.RemoteHoldUnhold="remote_hold_unhold",e.HoldUnhold="hold_unhold",e.FeedsChanged="feeds_changed",e.AssertedIdentityChanged="asserted_identity_changed",e.LengthChanged="length_changed",e.DataChannel="datachannel",e.SendVoipEvent="send_voip_event"}(C||(C={})),function(e){e.UserHangup="user_hangup",e.LocalOfferFailed="local_offer_failed",e.NoUserMedia="no_user_media",e.UnknownDevices="unknown_devices",e.SendInvite="send_invite",e.CreateAnswer="create_answer",e.CreateOffer="create_offer",e.SendAnswer="send_answer",e.SetRemoteDescription="set_remote_description",e.SetLocalDescription="set_local_description",e.AnsweredElsewhere="answered_elsewhere",e.IceFailed="ice_failed",e.InviteTimeout="invite_timeout",e.Replaced="replaced",e.SignallingFailed="signalling_timeout",e.UserBusy="user_busy",e.Transferred="transferred",e.NewSession="new_session"}(x||(x={}));class F extends Error{constructor(e,t,n){super(t+": "+n),a()(this,"code",void 0),this.code=e}}function D(){return Date.now().toString()+Object(h.b)(16)}function k(e){return[{mediaType:"audio",codec:"opus",enableDtx:!0,maxAverageBitrate:e?12e3:void 0}]}function O(e,t){return e+":"+t}class I extends g.b{constructor(e){var t;if(super(),a()(this,"roomId",void 0),a()(this,"callId",void 0),a()(this,"invitee",void 0),a()(this,"hangupParty",void 0),a()(this,"hangupReason",void 0),a()(this,"direction",void 0),a()(this,"ourPartyId",void 0),a()(this,"peerConn",void 0),a()(this,"toDeviceSeq",0),a()(this,"isPtt",!1),a()(this,"_state",E.Fledgling),a()(this,"client",void 0),a()(this,"forceTURN",void 0),a()(this,"turnServers",void 0),a()(this,"candidateSendQueue",[]),a()(this,"candidateSendTries",0),a()(this,"candidatesEnded",!1),a()(this,"feeds",[]),a()(this,"transceivers",new Map),a()(this,"inviteOrAnswerSent",!1),a()(this,"waitForLocalAVStream",!1),a()(this,"successor",void 0),a()(this,"opponentMember",void 0),a()(this,"opponentVersion",void 0),a()(this,"opponentPartyId",void 0),a()(this,"opponentCaps",void 0),a()(this,"iceDisconnectedTimeout",void 0),a()(this,"inviteTimeout",void 0),a()(this,"removeTrackListeners",new Map),a()(this,"remoteOnHold",!1),a()(this,"callStatsAtEnd",void 0),a()(this,"makingOffer",!1),a()(this,"ignoreOffer",!1),a()(this,"responsePromiseChain",void 0),a()(this,"remoteCandidateBuffer",new Map),a()(this,"remoteAssertedIdentity",void 0),a()(this,"remoteSDPStreamMetadata",void 0),a()(this,"callLengthInterval",void 0),a()(this,"callStartTime",void 0),a()(this,"opponentDeviceId",void 0),a()(this,"opponentDeviceInfo",void 0),a()(this,"opponentSessionId",void 0),a()(this,"groupCallId",void 0),a()(this,"stopVideoTrackTimer",void 0),a()(this,"isOnlyDataChannelAllowed",void 0),a()(this,"gotLocalIceCandidate",(e=>{if(e.candidate){if(this.candidatesEnded)return void c.a.warn(`Call ${this.callId} gotLocalIceCandidate() got candidate after candidates have ended - ignoring!`);if(c.a.debug(`Call ${this.callId} got local ICE ${e.candidate.sdpMid} ${e.candidate.candidate}`),this.callHasEnded())return;""===e.candidate.candidate?this.queueCandidate(null):this.queueCandidate(e.candidate)}})),a()(this,"onIceGatheringStateChange",(e=>{var t;c.a.debug(`Call ${this.callId} onIceGatheringStateChange() ice gathering state changed to ${this.peerConn.iceGatheringState}`),"complete"===(null===(t=this.peerConn)||void 0===t?void 0:t.iceGatheringState)&&this.queueCandidate(null)})),a()(this,"getLocalOfferFailed",(e=>{c.a.error(`Call ${this.callId} getLocalOfferFailed() running`,e),this.emit(C.Error,new F(x.LocalOfferFailed,"Failed to get local offer!",e)),this.terminate(T.Local,x.LocalOfferFailed,!1)})),a()(this,"getUserMediaFailed",(e=>{this.successor?this.successor.getUserMediaFailed(e):(c.a.warn(`Call ${this.callId} getUserMediaFailed() failed to get user media - ending call`,e),this.emit(C.Error,new F(x.NoUserMedia,"Couldn't start capturing media! Is your microphone set up and does this app have permission?",e)),this.terminate(T.Local,x.NoUserMedia,!1))})),a()(this,"onIceConnectionStateChanged",(()=>{var e,t,n,r,i;if(!this.callHasEnded()){if(c.a.debug(`Call ${this.callId} onIceConnectionStateChanged() running (state=${null===(e=this.peerConn)||void 0===e?void 0:e.iceConnectionState})`),["connected","completed"].includes(null!==(t=null===(n=this.peerConn)||void 0===n?void 0:n.iceConnectionState)&&void 0!==t?t:""))clearTimeout(this.iceDisconnectedTimeout),this.iceDisconnectedTimeout=void 0,this.state=E.Connected,this.callLengthInterval||this.callStartTime||(this.callStartTime=Date.now(),this.callLengthInterval=setInterval((()=>{this.emit(C.LengthChanged,Math.round((Date.now()-this.callStartTime)/1e3))}),1e3));else if("failed"==(null===(r=this.peerConn)||void 0===r?void 0:r.iceConnectionState)){var o;null!==(o=this.peerConn)&&void 0!==o&&o.restartIce?(this.candidatesEnded=!1,this.peerConn.restartIce()):(c.a.info(`Call ${this.callId} onIceConnectionStateChanged() hanging up call (ICE failed and no ICE restart method)`),this.hangup(x.IceFailed,!1))}else"disconnected"==(null===(i=this.peerConn)||void 0===i?void 0:i.iceConnectionState)&&(this.iceDisconnectedTimeout=setTimeout((()=>{c.a.info(`Call ${this.callId} onIceConnectionStateChanged() hanging up call (ICE disconnected for too long)`),this.hangup(x.IceFailed,!1)}),3e4),this.state=E.Connecting);if(this.isPtt&&["failed","disconnected"].includes(this.peerConn.iceConnectionState))for(const e of this.getRemoteFeeds())e.setAudioVideoMuted(!0,!0)}})),a()(this,"onSignallingStateChanged",(()=>{var e;c.a.debug(`Call ${this.callId} onSignallingStateChanged() running (state=${null===(e=this.peerConn)||void 0===e?void 0:e.signalingState})`)})),a()(this,"onTrack",(e=>{if(0===e.streams.length)return void c.a.warn(`Call ${this.callId} onTrack() called with streamless track streamless (kind=${e.track.kind})`);const t=e.streams[0];if(this.pushRemoteFeed(t),!this.removeTrackListeners.has(t)){const e=()=>{0===t.getTracks().length&&(c.a.info(`Call ${this.callId} onTrack() removing track (streamId=${t.id})`),this.deleteFeedByStream(t),t.removeEventListener("removetrack",e),this.removeTrackListeners.delete(t))};t.addEventListener("removetrack",e),this.removeTrackListeners.set(t,e)}})),a()(this,"onDataChannel",(e=>{this.emit(C.DataChannel,e.channel)})),a()(this,"onNegotiationNeeded",(async()=>{c.a.info(`Call ${this.callId} onNegotiationNeeded() negotiation is needed!`),this.state===E.CreateOffer||0!==this.opponentVersion?this.queueGotLocalOffer():c.a.info(`Call ${this.callId} onNegotiationNeeded() opponent does not support renegotiation: ignoring negotiationneeded event`)})),a()(this,"onHangupReceived",(e=>{c.a.debug(`Call ${this.callId} onHangupReceived() running`),this.partyIdMatches(e)||this.state===E.Ringing?this.terminate(T.Remote,e.reason||x.UserHangup,!0):c.a.info(`Call ${this.callId} onHangupReceived() ignoring message from party ID ${e.party_id}: our partner is ${this.opponentPartyId}`)})),a()(this,"onRejectReceived",(e=>{c.a.debug(`Call ${this.callId} onRejectReceived() running`);[E.InviteSent,E.Ringing].includes(this.state)||this.state===E.Fledgling&&this.direction===w.Inbound?this.terminate(T.Remote,e.reason||x.UserHangup,!0):c.a.debug(`Call ${this.callId} onRejectReceived() called in wrong state (state=${this.state})`)})),a()(this,"onAnsweredElsewhere",(e=>{c.a.debug(`Call ${this.callId} onAnsweredElsewhere() running`),this.terminate(T.Remote,x.AnsweredElsewhere,!0)})),this.roomId=e.roomId,this.invitee=e.invitee,this.client=e.client,!this.client.deviceId)throw new Error("Client must have a device ID to start calls");this.forceTURN=null!==(t=e.forceTURN)&&void 0!==t&&t,this.ourPartyId=this.client.deviceId,this.opponentDeviceId=e.opponentDeviceId,this.opponentSessionId=e.opponentSessionId,this.groupCallId=e.groupCallId,this.turnServers=e.turnServers||[],0===this.turnServers.length&&this.client.isFallbackICEServerAllowed()&&this.turnServers.push({urls:["stun:turn.matrix.org"]});for(const e of this.turnServers)u.f(e,["urls"]);this.callId=D(),this.isOnlyDataChannelAllowed=this.client.isVoipWithNoMediaAllowed}async placeVoiceCall(){await this.placeCall(!0,!1)}async placeVideoCall(){await this.placeCall(!0,!0)}createDataChannel(e,t){const n=this.peerConn.createDataChannel(e,t);return this.emit(C.DataChannel,n),n}getOpponentMember(){return this.opponentMember}getOpponentDeviceId(){return this.opponentDeviceId}getOpponentSessionId(){return this.opponentSessionId}opponentCanBeTransferred(){return Boolean(this.opponentCaps&&this.opponentCaps["m.call.transferee"])}opponentSupportsDTMF(){return Boolean(this.opponentCaps&&this.opponentCaps["m.call.dtmf"])}getRemoteAssertedIdentity(){return this.remoteAssertedIdentity}get state(){return this._state}set state(e){const t=this._state;this._state=e,this.emit(C.State,e,t)}get type(){return this.hasUserMediaVideoSender||this.hasRemoteUserMediaVideoTrack?S.Video:S.Voice}get hasLocalUserMediaVideoTrack(){var e;return!(null===(e=this.localUsermediaStream)||void 0===e||!e.getVideoTracks().length)}get hasRemoteUserMediaVideoTrack(){return this.getRemoteFeeds().some((e=>{var t;return e.purpose===p.b.Usermedia&&(null===(t=e.stream)||void 0===t?void 0:t.getVideoTracks().length)}))}get hasLocalUserMediaAudioTrack(){var e;return!(null===(e=this.localUsermediaStream)||void 0===e||!e.getAudioTracks().length)}get hasRemoteUserMediaAudioTrack(){return this.getRemoteFeeds().some((e=>{var t;return e.purpose===p.b.Usermedia&&!(null===(t=e.stream)||void 0===t||!t.getAudioTracks().length)}))}get hasUserMediaAudioSender(){var e;return Boolean(null===(e=this.transceivers.get(O(p.b.Usermedia,"audio")))||void 0===e?void 0:e.sender)}get hasUserMediaVideoSender(){var e;return Boolean(null===(e=this.transceivers.get(O(p.b.Usermedia,"video")))||void 0===e?void 0:e.sender)}get localUsermediaFeed(){return this.getLocalFeeds().find((e=>e.purpose===p.b.Usermedia))}get localScreensharingFeed(){return this.getLocalFeeds().find((e=>e.purpose===p.b.Screenshare))}get localUsermediaStream(){var e;return null===(e=this.localUsermediaFeed)||void 0===e?void 0:e.stream}get localScreensharingStream(){var e;return null===(e=this.localScreensharingFeed)||void 0===e?void 0:e.stream}get remoteUsermediaFeed(){return this.getRemoteFeeds().find((e=>e.purpose===p.b.Usermedia))}get remoteScreensharingFeed(){return this.getRemoteFeeds().find((e=>e.purpose===p.b.Screenshare))}get remoteUsermediaStream(){var e;return null===(e=this.remoteUsermediaFeed)||void 0===e?void 0:e.stream}get remoteScreensharingStream(){var e;return null===(e=this.remoteScreensharingFeed)||void 0===e?void 0:e.stream}getFeedByStreamId(e){return this.getFeeds().find((t=>t.stream.id===e))}getFeeds(){return this.feeds}getLocalFeeds(){return this.feeds.filter((e=>e.isLocal()))}getRemoteFeeds(){return this.feeds.filter((e=>!e.isLocal()))}async initOpponentCrypto(){var e,t;if(!this.opponentDeviceId)return;if(!this.client.getUseE2eForGroupCall())return;if(!this.client.isCryptoEnabled())return void(this.opponentDeviceInfo=new f.a(this.opponentDeviceId));if(!this.client.crypto)throw new Error("Crypto is not initialised.");const n=this.invitee||(null===(e=this.getOpponentMember())||void 0===e?void 0:e.userId);if(!n)throw new Error("Couldn't find opponent user ID to init crypto");const r=await this.client.crypto.deviceList.downloadKeys([n],!1);if(this.opponentDeviceInfo=null===(t=r.get(n))||void 0===t?void 0:t.get(this.opponentDeviceId),void 0===this.opponentDeviceInfo)throw new _.g(n)}getLocalSDPStreamMetadata(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t={};for(const n of this.getLocalFeeds())e&&(n.sdpMetadataStreamId=n.stream.id),t[n.sdpMetadataStreamId]={purpose:n.purpose,audio_muted:n.isAudioMuted(),video_muted:n.isVideoMuted()};return t}noIncomingFeeds(){return!this.feeds.some((e=>!e.isLocal()))}pushRemoteFeed(e){if(!this.opponentSupportsSDPStreamMetadata())return void this.pushRemoteFeedWithoutMetadata(e);const t=this.getOpponentMember().userId,n=this.remoteSDPStreamMetadata[e.id].purpose,r=this.remoteSDPStreamMetadata[e.id].audio_muted,i=this.remoteSDPStreamMetadata[e.id].video_muted;n?this.getFeedByStreamId(e.id)?c.a.warn(`Call ${this.callId} pushRemoteFeed() ignoring stream because we already have a feed for it (streamId=${e.id})`):(this.feeds.push(new m.a({client:this.client,call:this,roomId:this.roomId,userId:t,deviceId:this.getOpponentDeviceId(),stream:e,purpose:n,audioMuted:r,videoMuted:i})),this.emit(C.FeedsChanged,this.feeds),c.a.info(`Call ${this.callId} pushRemoteFeed() pushed stream (streamId=${e.id}, active=${e.active}, purpose=${n})`)):c.a.warn(`Call ${this.callId} pushRemoteFeed() ignoring stream because we didn't get any metadata about it (streamId=${e.id})`)}pushRemoteFeedWithoutMetadata(e){var t;const n=this.getOpponentMember().userId,r=p.b.Usermedia,i=null===(t=this.feeds.find((e=>!e.isLocal())))||void 0===t?void 0:t.stream;i&&e.id!==i.id?c.a.warn(`Call ${this.callId} pushRemoteFeedWithoutMetadata() ignoring new stream because we already have stream (streamId=${e.id})`):this.getFeedByStreamId(e.id)?c.a.warn(`Call ${this.callId} pushRemoteFeedWithoutMetadata() ignoring stream because we already have a feed for it (streamId=${e.id})`):(this.feeds.push(new m.a({client:this.client,call:this,roomId:this.roomId,audioMuted:!1,videoMuted:!1,userId:n,deviceId:this.getOpponentDeviceId(),stream:e,purpose:r})),this.emit(C.FeedsChanged,this.feeds),c.a.info(`Call ${this.callId} pushRemoteFeedWithoutMetadata() pushed stream (streamId=${e.id}, active=${e.active})`))}pushNewLocalFeed(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=this.client.getUserId();A(e.getAudioTracks(),!0),A(e.getVideoTracks(),!0),this.getFeedByStreamId(e.id)?c.a.warn(`Call ${this.callId} pushNewLocalFeed() ignoring stream because we already have a feed for it (streamId=${e.id})`):this.pushLocalFeed(new m.a({client:this.client,roomId:this.roomId,audioMuted:!1,videoMuted:!1,userId:r,deviceId:this.getOpponentDeviceId(),stream:e,purpose:t}),n)}pushLocalFeed(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.feeds.some((t=>e.stream.id===t.stream.id)))c.a.info(`Call ${this.callId} pushLocalFeed() ignoring duplicate local stream (streamId=${e.stream.id})`);else{if(this.feeds.push(e),t)for(const t of e.stream.getTracks()){c.a.info(`Call ${this.callId} pushLocalFeed() adding track to peer connection (id=${t.id}, kind=${t.kind}, streamId=${e.stream.id}, streamPurpose=${e.purpose}, enabled=${t.enabled})`);const n=O(e.purpose,t.kind);if(this.transceivers.has(n)){const r=this.transceivers.get(n);r.sender.setStreams&&r.sender.setStreams(e.stream),r.sender.replaceTrack(t),r.direction="inactive"===r.direction?"sendonly":"sendrecv"}else{const r=this.peerConn.addTrack(t,e.stream),i=this.peerConn.getTransceivers().find((e=>e.sender===r));i?this.transceivers.set(n,i):c.a.warn(`Call ${this.callId} pushLocalFeed() didn't find a matching transceiver after adding track!`)}}c.a.info(`Call ${this.callId} pushLocalFeed() pushed stream (id=${e.stream.id}, active=${e.stream.active}, purpose=${e.purpose})`),this.emit(C.FeedsChanged,this.feeds)}}removeLocalFeed(e){const t=O(e.purpose,"audio"),n=O(e.purpose,"video");for(const e of[t,n])if(this.transceivers.has(e)){const t=this.transceivers.get(e);t.sender&&this.peerConn.removeTrack(t.sender)}e.purpose===p.b.Screenshare&&this.client.getMediaHandler().stopScreensharingStream(e.stream),this.deleteFeed(e)}deleteAllFeeds(){for(const e of this.feeds)e.isLocal()&&this.groupCallId||e.dispose();this.feeds=[],this.emit(C.FeedsChanged,this.feeds)}deleteFeedByStream(e){const t=this.getFeedByStreamId(e.id);t?this.deleteFeed(t):c.a.warn(`Call ${this.callId} deleteFeedByStream() didn't find the feed to delete (streamId=${e.id})`)}deleteFeed(e){e.dispose(),this.feeds.splice(this.feeds.indexOf(e),1),this.emit(C.FeedsChanged,this.feeds)}async getCurrentCallStats(){return this.callHasEnded()?this.callStatsAtEnd:this.collectCallStats()}async collectCallStats(){if(!this.peerConn)return;const e=await this.peerConn.getStats(),t=[];return e.forEach((e=>{t.push(e)})),t}async initWithInvite(e){var t;const n=e.getContent();this.direction=w.Inbound;await this.client.checkTurnServers()||c.a.warn(`Call ${this.callId} initWithInvite() failed to get TURN credentials! Proceeding with call anyway...`);const r=n[p.a];r?this.updateRemoteSDPStreamMetadata(r):c.a.debug(`Call ${this.callId} initWithInvite() did not get any SDPStreamMetadata! Can not send/receive multiple streams`),this.peerConn=this.createPeerConnection(),this.chooseOpponent(e),await this.initOpponentCrypto();try{await this.peerConn.setRemoteDescription(n.offer),await this.addBufferedIceCandidates()}catch(e){return c.a.debug(`Call ${this.callId} initWithInvite() failed to set remote description`,e),void this.terminate(T.Local,x.SetRemoteDescription,!1)}const i=null===(t=this.feeds.find((e=>!e.isLocal())))||void 0===t?void 0:t.stream;if(!(this.isOnlyDataChannelAllowed||i&&0!==i.getTracks().length))return c.a.error(`Call ${this.callId} initWithInvite() no remote stream or no tracks after setting remote description!`),void this.terminate(T.Local,x.SetRemoteDescription,!1);if(this.state=E.Ringing,e.getLocalAge()){const t=setTimeout((()=>{this.state==E.Ringing&&(c.a.debug(`Call ${this.callId} initWithInvite() invite has expired. Hanging up.`),this.hangupParty=T.Remote,this.state=E.Ended,this.stopAllMedia(),"closed"!=this.peerConn.signalingState&&this.peerConn.close(),this.emit(C.Hangup,this))}),n.lifetime-e.getLocalAge()),r=e=>{e!==E.Ringing&&(clearTimeout(t),this.off(C.State,r))};this.on(C.State,r)}}initWithHangup(e){this.state=E.Ended}shouldAnswerWithMediaType(e,t,n){return e&&!t?(c.a.warn(`Call ${this.callId} shouldAnswerWithMediaType() unable to answer with ${n} because the other side isn't sending it either.`),!1):u.u(e)||e===t||this.opponentSupportsSDPStreamMetadata()?null!=e?e:t:(c.a.warn(`Call ${this.callId} shouldAnswerWithMediaType() unable to answer with ${n}=${e} because the other side doesn't support it. Answering with ${n}=${t}.`),t)}async answer(e,t){if(!this.inviteOrAnswerSent){if(!1===e&&!1===t)throw new Error("You CANNOT answer a call without media");if(this.localUsermediaStream||this.waitForLocalAVStream)this.waitForLocalAVStream&&(this.state=E.WaitLocalMedia);else{const r=this.state,i=this.shouldAnswerWithMediaType(e,this.hasRemoteUserMediaAudioTrack,"audio"),o=this.shouldAnswerWithMediaType(t,this.hasRemoteUserMediaVideoTrack,"video");this.state=E.WaitLocalMedia,this.waitForLocalAVStream=!0;try{var n;const e=await this.client.getMediaHandler().getUserMediaStream(i,o);this.waitForLocalAVStream=!1;const t=[new m.a({client:this.client,roomId:this.roomId,userId:this.client.getUserId(),deviceId:null!==(n=this.client.getDeviceId())&&void 0!==n?n:void 0,stream:e,purpose:p.b.Usermedia,audioMuted:!1,videoMuted:!1})];this.localScreensharingFeed&&t.push(this.localScreensharingFeed),this.answerWithCallFeeds(t)}catch(e){if(!o)return void this.getUserMediaFailed(e);c.a.warn(`Call ${this.callId} answer() failed to getUserMedia(), trying to getUserMedia() without video`),this.state=r,this.waitForLocalAVStream=!1,await this.answer(i,!1)}}}}answerWithCallFeeds(e){this.inviteOrAnswerSent||this.queueGotCallFeedsForAnswer(e)}replacedBy(e){c.a.debug(`Call ${this.callId} replacedBy() running (newCallId=${e.callId})`),this.state===E.WaitLocalMedia?(c.a.debug(`Call ${this.callId} replacedBy() telling new call to wait for local media (newCallId=${e.callId})`),e.waitForLocalAVStream=!0):[E.CreateOffer,E.InviteSent].includes(this.state)&&(e.direction===w.Outbound?e.queueGotCallFeedsForAnswer([]):(c.a.debug(`Call ${this.callId} replacedBy() handing local stream to new call(newCallId=${e.callId})`),e.queueGotCallFeedsForAnswer(this.getLocalFeeds().map((e=>e.clone()))))),this.successor=e,this.emit(C.Replaced,e),this.hangup(x.Replaced,!0)}hangup(e,t){if(this.callHasEnded())return;if(c.a.debug(`Call ${this.callId} hangup() ending call (reason=${e})`),this.terminate(T.Local,e,!t),[E.Fledgling,E.WaitLocalMedia].includes(this.state))return;const n={};(this.opponentVersion&&0!==this.opponentVersion||e!==x.UserHangup)&&(n.reason=e),this.sendVoipEvent(d.b.CallHangup,n)}reject(){if(this.state!==E.Ringing)throw Error("Call must be in 'ringing' state to reject!");if(0===this.opponentVersion)return c.a.info(`Call ${this.callId} reject() opponent version is less than 1: sending hangup instead of reject (opponentVersion=${this.opponentVersion})`),void this.hangup(x.UserHangup,!0);c.a.debug("Rejecting call: "+this.callId),this.terminate(T.Local,x.UserHangup,!0),this.sendVoipEvent(d.b.CallReject,{})}async upgradeCall(e,t){if((e||t)&&this.opponentSupportsSDPStreamMetadata())try{c.a.debug(`Call ${this.callId} upgradeCall() upgrading call (audio=${e}, video=${t})`);const n=e||this.hasLocalUserMediaAudioTrack,r=t||this.hasLocalUserMediaVideoTrack,i=await this.client.getMediaHandler().getUserMediaStream(n,r,!1);await this.updateLocalUsermediaStream(i,e,t)}catch(e){c.a.error(`Call ${this.callId} upgradeCall() failed to upgrade the call`,e),this.emit(C.Error,new F(x.NoUserMedia,"Failed to get camera access: ",e))}}opponentSupportsSDPStreamMetadata(){return Boolean(this.remoteSDPStreamMetadata)}isScreensharing(){return Boolean(this.localScreensharingStream)}async setScreensharingEnabled(e,t){if(e&&this.isScreensharing())return c.a.warn(`Call ${this.callId} setScreensharingEnabled() there is already a screensharing stream - there is nothing to do!`),!0;if(!e&&!this.isScreensharing())return c.a.warn(`Call ${this.callId} setScreensharingEnabled() there already isn't a screensharing stream - there is nothing to do!`),!1;if(!this.opponentSupportsSDPStreamMetadata())return this.setScreensharingEnabledWithoutMetadataSupport(e,t);if(c.a.debug(`Call ${this.callId} setScreensharingEnabled() running (enabled=${e})`),!e){const e=this.transceivers.get(O(p.b.Screenshare,"audio")),t=this.transceivers.get(O(p.b.Screenshare,"video"));for(const n of[e,t])n&&n.sender&&this.peerConn.removeTrack(n.sender);return this.client.getMediaHandler().stopScreensharingStream(this.localScreensharingStream),this.deleteFeedByStream(this.localScreensharingStream),!1}try{const e=await this.client.getMediaHandler().getScreensharingStream(t);return!!e&&(this.pushNewLocalFeed(e,p.b.Screenshare),!0)}catch(e){return c.a.error(`Call ${this.callId} setScreensharingEnabled() failed to get screen-sharing stream:`,e),!1}}async setScreensharingEnabledWithoutMetadataSupport(e,t){if(c.a.debug(`Call ${this.callId} setScreensharingEnabledWithoutMetadataSupport() running (enabled=${e})`),!e){var n,r;const e=null===(n=this.localUsermediaStream)||void 0===n?void 0:n.getTracks().find((e=>"video"===e.kind)),t=null===(r=this.transceivers.get(O(p.b.Usermedia,"video")))||void 0===r?void 0:r.sender;return null==t||t.replaceTrack(null!=e?e:null),this.client.getMediaHandler().stopScreensharingStream(this.localScreensharingStream),this.deleteFeedByStream(this.localScreensharingStream),!1}try{var i;const e=await this.client.getMediaHandler().getScreensharingStream(t);if(!e)return!1;const n=e.getTracks().find((e=>"video"===e.kind)),r=null===(i=this.transceivers.get(O(p.b.Usermedia,"video")))||void 0===i?void 0:i.sender;return null==r||r.replaceTrack(null!=n?n:null),this.pushNewLocalFeed(e,p.b.Screenshare,!1),!0}catch(e){return c.a.error(`Call ${this.callId} setScreensharingEnabledWithoutMetadataSupport() failed to get screen-sharing stream:`,e),!1}}async updateLocalUsermediaStream(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=this.localUsermediaFeed,i=t||!r.isAudioMuted()&&!this.remoteOnHold,o=n||!r.isVideoMuted()&&!this.remoteOnHold;c.a.log(`Call ${this.callId} updateLocalUsermediaStream() running (streamId=${e.id}, audio=${i}, video=${o})`),A(e.getAudioTracks(),i),A(e.getVideoTracks(),o);for(const e of this.localUsermediaStream.getTracks())this.localUsermediaStream.removeTrack(e),e.stop();for(const t of e.getTracks())this.localUsermediaStream.addTrack(t);for(const t of e.getTracks()){const n=O(p.b.Usermedia,t.kind),i=this.transceivers.get(n),o=null==i?void 0:i.sender;let a=!1;if(o)try{c.a.info(`Call ${this.callId} updateLocalUsermediaStream() replacing track (id=${t.id}, kind=${t.kind}, streamId=${e.id}, streamPurpose=${r.purpose})`),await o.replaceTrack(t),i.direction="inactive"===i.direction?"sendonly":"sendrecv",a=!0}catch(e){c.a.warn(`Call ${this.callId} updateLocalUsermediaStream() replaceTrack failed: adding new transceiver instead`,e)}if(!a){c.a.info(`Call ${this.callId} updateLocalUsermediaStream() adding track to peer connection (id=${t.id}, kind=${t.kind}, streamId=${e.id}, streamPurpose=${r.purpose})`);const i=this.peerConn.addTrack(t,this.localUsermediaStream),o=this.peerConn.getTransceivers().find((e=>e.sender===i));o?this.transceivers.set(n,o):c.a.warn(`Call ${this.callId} updateLocalUsermediaStream() couldn't find matching transceiver for newly added track!`)}}}async setLocalVideoMuted(e){var t;if(c.a.log(`Call ${this.callId} setLocalVideoMuted() running ${e}`),e||void 0===this.stopVideoTrackTimer||(clearTimeout(this.stopVideoTrackTimer),this.stopVideoTrackTimer=void 0),!await this.client.getMediaHandler().hasVideoDevice())return this.isLocalVideoMuted();if(!this.hasUserMediaVideoSender&&!e)return await this.upgradeCall(!1,!0),this.isLocalVideoMuted();if(!e&&0===this.localUsermediaStream.getVideoTracks().length){const e=await this.client.getMediaHandler().getUserMediaStream(!0,!0);await this.updateLocalUsermediaStream(e)}return null===(t=this.localUsermediaFeed)||void 0===t||t.setAudioVideoMuted(null,e),this.updateMuteStatus(),await this.sendMetadataUpdate(),e&&(this.stopVideoTrackTimer=setTimeout((()=>{for(const e of this.localUsermediaStream.getVideoTracks())e.stop(),this.localUsermediaStream.removeTrack(e)}),120)),this.isLocalVideoMuted()}isLocalVideoMuted(){var e,t;return null!==(e=null===(t=this.localUsermediaFeed)||void 0===t?void 0:t.isVideoMuted())&&void 0!==e&&e}async setMicrophoneMuted(e){var t;return c.a.log(`Call ${this.callId} setMicrophoneMuted() running ${e}`),await this.client.getMediaHandler().hasAudioDevice()?e||this.hasUserMediaAudioSender&&this.hasLocalUserMediaAudioTrack?(null===(t=this.localUsermediaFeed)||void 0===t||t.setAudioVideoMuted(e,null),this.updateMuteStatus(),await this.sendMetadataUpdate(),this.isMicrophoneMuted()):(await this.upgradeCall(!0,!1),this.isMicrophoneMuted()):this.isMicrophoneMuted()}isMicrophoneMuted(){var e,t;return null!==(e=null===(t=this.localUsermediaFeed)||void 0===t?void 0:t.isAudioMuted())&&void 0!==e&&e}isRemoteOnHold(){return this.remoteOnHold}setRemoteOnHold(e){if(this.isRemoteOnHold()!==e){this.remoteOnHold=e;for(const t of this.peerConn.getTransceivers())t.direction=e?"sendonly":"sendrecv";this.updateMuteStatus(),this.sendMetadataUpdate(),this.emit(C.RemoteHoldUnhold,this.remoteOnHold)}}isLocalOnHold(){if(this.state!==E.Connected)return!1;let e=!0;for(const t of this.peerConn.getTransceivers()){["inactive","recvonly"].includes(t.currentDirection)||(e=!1)}return e}sendDtmfDigit(e){for(const n of this.peerConn.getSenders()){var t;if("audio"===(null===(t=n.track)||void 0===t?void 0:t.kind)&&n.dtmf)return void n.dtmf.insertDTMF(e)}throw new Error("Unable to find a track to send DTMF on")}updateMuteStatus(){const e=this.isMicrophoneMuted()||this.remoteOnHold,t=this.isLocalVideoMuted()||this.remoteOnHold;c.a.log(`Call ${this.callId} updateMuteStatus stream ${this.localUsermediaStream.id} micShouldBeMuted ${e} vidShouldBeMuted ${t}`),A(this.localUsermediaStream.getAudioTracks(),!e),A(this.localUsermediaStream.getVideoTracks(),!t)}async sendMetadataUpdate(){await this.sendVoipEvent(d.b.CallSDPStreamMetadataChangedPrefix,{[p.a]:this.getLocalSDPStreamMetadata()})}gotCallFeedsForInvite(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.successor)this.successor.queueGotCallFeedsForAnswer(e);else if(this.callHasEnded())this.stopAllMedia();else{for(const t of e)this.pushLocalFeed(t);t&&this.peerConn.addTransceiver("video",{direction:"recvonly"}),this.state=E.CreateOffer,c.a.debug(`Call ${this.callId} gotUserMediaForInvite() run`)}}async sendAnswer(){const e={answer:{sdp:this.peerConn.localDescription.sdp,type:this.peerConn.localDescription.type},[p.a]:this.getLocalSDPStreamMetadata(!0)};e.capabilities={"m.call.transferee":this.client.supportsCallTransfer,"m.call.dtmf":!1};const t=this.discardDuplicateCandidates();c.a.info(`Call ${this.callId} sendAnswer() discarding ${t} candidates that will be sent in answer`);try{await this.sendVoipEvent(d.b.CallAnswer,e),this.inviteOrAnswerSent=!0}catch(e){this.state=E.Ringing,e instanceof b.f&&e.event&&this.client.cancelPendingEvent(e.event);let t=x.SendAnswer,n="Failed to send answer";throw"UnknownDeviceError"==e.name&&(t=x.UnknownDevices,n="Unknown devices present in the room"),this.emit(C.Error,new F(t,n,e)),e}this.sendCandidateQueue()}queueGotCallFeedsForAnswer(e){this.responsePromiseChain?this.responsePromiseChain=this.responsePromiseChain.then((()=>this.gotCallFeedsForAnswer(e))):this.responsePromiseChain=this.gotCallFeedsForAnswer(e)}mungeSdp(e,t){const n=Object(l.parse)(e.sdp);n.media.forEach((e=>{const n=new Map,r=new Map;for(const t of e.rtp)n.set(t.payload,t.codec),r.set(t.codec,t.payload);for(const i of t){if(i.mediaType!==e.type)continue;if(!r.has(i.codec)){c.a.info(`Call ${this.callId} mungeSdp() ignoring SDP modifications for ${i.codec} as it's not present.`);continue}const t=[];void 0!==i.enableDtx&&t.push("usedtx="+(i.enableDtx?"1":"0")),void 0!==i.maxAverageBitrate&&t.push(`maxaveragebitrate=${i.maxAverageBitrate}`);let o=!1;for(const r of e.fmtp)n.get(r.payload)===i.codec&&(o=!0,r.config+=";"+t.join(";"));o||e.fmtp.push({payload:r.get(i.codec),config:t.join(";")})}})),e.sdp=Object(l.write)(n)}async createOffer(){const e=await this.peerConn.createOffer();return this.mungeSdp(e,k(this.isPtt)),e}async createAnswer(){const e=await this.peerConn.createAnswer();return this.mungeSdp(e,k(this.isPtt)),e}async gotCallFeedsForAnswer(e){if(this.callHasEnded())return;this.waitForLocalAVStream=!1;for(const t of e)this.pushLocalFeed(t);let t;this.state=E.CreateAnswer;try{this.getRidOfRTXCodecs(),t=await this.createAnswer()}catch(e){return c.a.debug(`Call ${this.callId} gotCallFeedsForAnswer() failed to create answer: `,e),void this.terminate(T.Local,x.CreateAnswer,!0)}try{if(await this.peerConn.setLocalDescription(t),this.callHasEnded())return;if(this.state=E.Connecting,await new Promise((e=>{setTimeout(e,200)})),this.callHasEnded())return;this.sendAnswer()}catch(e){return c.a.debug(`Call ${this.callId} gotCallFeedsForAnswer() error setting local description!`,e),void this.terminate(T.Local,x.SetLocalDescription,!0)}}async onRemoteIceCandidatesReceived(e){if(this.callHasEnded())return;const t=e.getContent(),n=t.candidates;if(!n)return void c.a.info(`Call ${this.callId} onRemoteIceCandidatesReceived() ignoring candidates event with no candidates!`);const r=0===t.version?null:t.party_id||null;if(void 0!==this.opponentPartyId)this.partyIdMatches(t)?await this.addIceCandidates(n):c.a.info(`Call ${this.callId} onRemoteIceCandidatesReceived() ignoring candidates from party ID ${t.party_id}: we have chosen party ID ${this.opponentPartyId}`);else if(r){c.a.info(`Call ${this.callId} onRemoteIceCandidatesReceived() buffering ${n.length} candidates until we pick an opponent`);const e=this.remoteCandidateBuffer.get(r)||[];e.push(...n),this.remoteCandidateBuffer.set(r,e)}}async onAnswerReceived(e){const t=e.getContent();if(c.a.debug(`Call ${this.callId} onAnswerReceived() running (hangupParty=${t.party_id})`),this.callHasEnded())return void c.a.debug(`Call ${this.callId} onAnswerReceived() ignoring answer because call has ended`);if(void 0!==this.opponentPartyId)return void c.a.info(`Call ${this.callId} onAnswerReceived() ignoring answer from party ID ${t.party_id}: we already have an answer/reject from ${this.opponentPartyId}`);this.chooseOpponent(e),await this.addBufferedIceCandidates(),this.state=E.Connecting;const n=t[p.a];n?this.updateRemoteSDPStreamMetadata(n):c.a.warn(`Call ${this.callId} onAnswerReceived() did not get any SDPStreamMetadata! Can not send/receive multiple streams`);try{await this.peerConn.setRemoteDescription(t.answer)}catch(e){return c.a.debug(`Call ${this.callId} onAnswerReceived() failed to set remote description`,e),void this.terminate(T.Local,x.SetRemoteDescription,!1)}if(null!==this.opponentPartyId)try{await this.sendVoipEvent(d.b.CallSelectAnswer,{selected_party_id:this.opponentPartyId})}catch(e){c.a.warn(`Call ${this.callId} onAnswerReceived() failed to send select_answer event`,e)}}async onSelectAnswerReceived(e){if(this.direction!==w.Inbound)return void c.a.warn(`Call ${this.callId} onSelectAnswerReceived() got select_answer for an outbound call: ignoring`);const t=e.getContent().selected_party_id;null!=t?t!==this.ourPartyId&&(c.a.info(`Call ${this.callId} onSelectAnswerReceived() got select_answer for party ID ${t}: we are party ID ${this.ourPartyId}.`),await this.terminate(T.Remote,x.AnsweredElsewhere,!0)):c.a.warn(`Call ${this.callId} onSelectAnswerReceived() got nonsensical select_answer with null/undefined selected_party_id: ignoring`)}async onNegotiateReceived(e){const t=e.getContent(),n=t.description;if(!n||!n.sdp||!n.type)return void c.a.info(`Call ${this.callId} onNegotiateReceived() ignoring invalid m.call.negotiate event`);const r=this.direction===w.Inbound,i="offer"===n.type&&(this.makingOffer||"stable"!==this.peerConn.signalingState);if(this.ignoreOffer=!r&&i,this.ignoreOffer)return void c.a.info(`Call ${this.callId} onNegotiateReceived() ignoring colliding negotiate event because we're impolite`);const o=this.isLocalOnHold(),a=t[p.a];a?this.updateRemoteSDPStreamMetadata(a):c.a.warn(`Call ${this.callId} onNegotiateReceived() received negotiation event without SDPStreamMetadata!`);try{if(await this.peerConn.setRemoteDescription(n),"offer"===n.type){var s;let e;try{this.getRidOfRTXCodecs(),e=await this.createAnswer()}catch(e){return c.a.debug(`Call ${this.callId} onNegotiateReceived() failed to create answer: `,e),void this.terminate(T.Local,x.CreateAnswer,!0)}await this.peerConn.setLocalDescription(e),this.sendVoipEvent(d.b.CallNegotiate,{description:null===(s=this.peerConn.localDescription)||void 0===s?void 0:s.toJSON(),[p.a]:this.getLocalSDPStreamMetadata(!0)})}}catch(e){c.a.warn(`Call ${this.callId} onNegotiateReceived() failed to complete negotiation`,e)}const l=this.isLocalOnHold();o!==l&&(this.emit(C.LocalHoldUnhold,l),this.emit(C.HoldUnhold,l))}updateRemoteSDPStreamMetadata(e){this.remoteSDPStreamMetadata=u.G(this.remoteSDPStreamMetadata||{},e,!0);for(const e of this.getRemoteFeeds()){var t;const n=e.stream.id,r=this.remoteSDPStreamMetadata[n];e.setAudioVideoMuted(null==r?void 0:r.audio_muted,null==r?void 0:r.video_muted),e.purpose=null===(t=this.remoteSDPStreamMetadata[n])||void 0===t?void 0:t.purpose}}onSDPStreamMetadataChangedReceived(e){const t=e.getContent()[p.a];this.updateRemoteSDPStreamMetadata(t)}async onAssertedIdentityReceived(e){const t=e.getContent();t.asserted_identity&&(this.remoteAssertedIdentity={id:t.asserted_identity.id,displayName:t.asserted_identity.display_name},this.emit(C.AssertedIdentityChanged))}callHasEnded(){return this.state===E.Ended}queueGotLocalOffer(){this.responsePromiseChain?this.responsePromiseChain=this.responsePromiseChain.then((()=>this.wrappedGotLocalOffer())):this.responsePromiseChain=this.wrappedGotLocalOffer()}async wrappedGotLocalOffer(){this.makingOffer=!0;try{await this.gotLocalOffer()}catch(e){return void this.getLocalOfferFailed(e)}finally{this.makingOffer=!1}}async gotLocalOffer(){if(c.a.debug(`Call ${this.callId} gotLocalOffer() running`),this.callHasEnded())return void c.a.debug(`Call ${this.callId} gotLocalOffer() ignoring newly created offer because the call has ended"`);let e;try{this.getRidOfRTXCodecs(),e=await this.createOffer()}catch(e){return c.a.debug(`Call ${this.callId} gotLocalOffer() failed to create offer: `,e),void this.terminate(T.Local,x.CreateOffer,!0)}try{await this.peerConn.setLocalDescription(e)}catch(e){return c.a.debug(`Call ${this.callId} gotLocalOffer() error setting local description!`,e),void this.terminate(T.Local,x.SetLocalDescription,!0)}if("gathering"===this.peerConn.iceGatheringState&&await new Promise((e=>{setTimeout(e,200)})),this.callHasEnded())return;const t=this.state===E.CreateOffer?d.b.CallInvite:d.b.CallNegotiate,n={lifetime:6e4};var r,i;(t===d.b.CallInvite&&this.invitee&&(n.invitee=this.invitee),this.state===E.CreateOffer)?n.offer=null===(r=this.peerConn.localDescription)||void 0===r?void 0:r.toJSON():n.description=null===(i=this.peerConn.localDescription)||void 0===i?void 0:i.toJSON();n.capabilities={"m.call.transferee":this.client.supportsCallTransfer,"m.call.dtmf":!1},n[p.a]=this.getLocalSDPStreamMetadata(!0);const o=this.discardDuplicateCandidates();c.a.info(`Call ${this.callId} gotLocalOffer() discarding ${o} candidates that will be sent in offer`);try{await this.sendVoipEvent(t,n)}catch(e){c.a.error(`Call ${this.callId} gotLocalOffer() failed to send invite`,e),e instanceof b.f&&e.event&&this.client.cancelPendingEvent(e.event);let t=x.SignallingFailed,n="Signalling failed";return this.state===E.CreateOffer&&(t=x.SendInvite,n="Failed to send invite"),"UnknownDeviceError"==e.name&&(t=x.UnknownDevices,n="Unknown devices present in the room"),this.emit(C.Error,new F(t,n,e)),void this.terminate(T.Local,t,!1)}this.sendCandidateQueue(),this.state===E.CreateOffer&&(this.inviteOrAnswerSent=!0,this.state=E.InviteSent,this.inviteTimeout=setTimeout((()=>{this.inviteTimeout=void 0,this.state===E.InviteSent&&this.hangup(x.InviteTimeout,!1)}),6e4))}getRidOfRTXCodecs(){if(!RTCRtpReceiver.getCapabilities||!RTCRtpSender.getCapabilities)return;const e=RTCRtpReceiver.getCapabilities("video").codecs,t=[...RTCRtpSender.getCapabilities("video").codecs,...e];for(const e of t)if("video/rtx"===e.mimeType){const n=t.indexOf(e);t.splice(n,1)}const n=this.transceivers.get(O(p.b.Screenshare,"video"));n&&n.setCodecPreferences(t)}async sendVoipEvent(e,t){const n=Object.assign({},t,{version:"1",call_id:this.callId,party_id:this.ourPartyId,conf_id:this.groupCallId});if(this.opponentDeviceId){var r;const t=this.toDeviceSeq++,i=y(y({},n),{},{device_id:this.client.deviceId,sender_session_id:this.client.getSessionId(),dest_session_id:this.opponentSessionId,seq:t,[d.k]:Object(s.v4)()});this.emit(C.SendVoipEvent,{type:"toDevice",eventType:e,userId:this.invitee||(null===(r=this.getOpponentMember())||void 0===r?void 0:r.userId),opponentDeviceId:this.opponentDeviceId,content:i});const o=this.invitee||this.getOpponentMember().userId;if(this.client.getUseE2eForGroupCall()){if(!this.opponentDeviceInfo)return void c.a.warn(`Call ${this.callId} sendVoipEvent() failed: we do not have opponentDeviceInfo`);await this.client.encryptAndSendToDevices([{userId:o,deviceInfo:this.opponentDeviceInfo}],{type:e,content:i})}else await this.client.sendToDevice(e,new Map([[o,new Map([[this.opponentDeviceId,i]])]]))}else{var i;this.emit(C.SendVoipEvent,{type:"sendEvent",eventType:e,roomId:this.roomId,content:n,userId:this.invitee||(null===(i=this.getOpponentMember())||void 0===i?void 0:i.userId)}),await this.client.sendEvent(this.roomId,e,n)}}queueCandidate(e){if(e?this.candidateSendQueue.push(e):this.candidatesEnded=!0,this.state===E.Ringing||!this.inviteOrAnswerSent)return;const t=this.direction===w.Inbound?500:2e3;0===this.candidateSendTries&&setTimeout((()=>{this.sendCandidateQueue()}),t)}discardDuplicateCandidates(){let e=0;const t=[];for(let n=0;n<this.candidateSendQueue.length;n++){const r=this.candidateSendQueue[n];""===r.candidate?t.push(r):e++}return this.candidateSendQueue=t,e}async transfer(e){const t=await this.client.getProfileInfo(e),n=D(),r={replacement_id:D(),target_user:{id:e,display_name:t.displayname,avatar_url:t.avatar_url},create_call:n};await this.sendVoipEvent(d.b.CallReplaces,r),await this.terminate(T.Local,x.Transferred,!0)}async transferToCall(e){var t,n;const r=null===(t=e.getOpponentMember())||void 0===t?void 0:t.userId,i=r?await this.client.getProfileInfo(r):void 0,o=null===(n=this.getOpponentMember())||void 0===n?void 0:n.userId,a=o?await this.client.getProfileInfo(o):void 0,s=D(),l={replacement_id:D(),target_user:{id:o,display_name:null==a?void 0:a.displayname,avatar_url:null==a?void 0:a.avatar_url},await_call:s};await e.sendVoipEvent(d.b.CallReplaces,l);const c={replacement_id:D(),target_user:{id:r,display_name:null==i?void 0:i.displayname,avatar_url:null==i?void 0:i.avatar_url},create_call:s};await this.sendVoipEvent(d.b.CallReplaces,c),await this.terminate(T.Local,x.Transferred,!0),await e.terminate(T.Local,x.Transferred,!0)}async terminate(e,t,n){if(!this.callHasEnded()){this.hangupParty=e,this.hangupReason=t,this.state=E.Ended,this.inviteTimeout&&(clearTimeout(this.inviteTimeout),this.inviteTimeout=void 0),void 0!==this.iceDisconnectedTimeout&&(clearTimeout(this.iceDisconnectedTimeout),this.iceDisconnectedTimeout=void 0),this.callLengthInterval&&(clearInterval(this.callLengthInterval),this.callLengthInterval=void 0),void 0!==this.stopVideoTrackTimer&&(clearTimeout(this.stopVideoTrackTimer),this.stopVideoTrackTimer=void 0);for(const[e,t]of this.removeTrackListeners)e.removeEventListener("removetrack",t);this.removeTrackListeners.clear(),this.callStatsAtEnd=await this.collectCallStats(),this.stopAllMedia(),this.deleteAllFeeds(),this.peerConn&&"closed"!==this.peerConn.signalingState&&this.peerConn.close(),n&&this.emit(C.Hangup,this),this.client.callEventHandler.calls.delete(this.callId)}}stopAllMedia(){c.a.debug(`Call ${this.callId} stopAllMedia() running`);for(const e of this.feeds)if(e.isLocal()&&e.purpose===p.b.Usermedia)this.client.getMediaHandler().stopUserMediaStream(e.stream);else if(e.isLocal()&&e.purpose===p.b.Screenshare)this.client.getMediaHandler().stopScreensharingStream(e.stream);else if(!e.isLocal()){c.a.debug(`Call ${this.callId} stopAllMedia() stopping stream (streamId=${e.stream.id})`);for(const t of e.stream.getTracks())t.stop()}}checkForErrorListener(){if(0===this.listeners(g.a.Error).length)throw new Error("You MUST attach an error listener using call.on('error', function() {})")}async sendCandidateQueue(){if(0===this.candidateSendQueue.length||this.callHasEnded())return;const e=this.candidateSendQueue;this.candidateSendQueue=[],++this.candidateSendTries;const t={candidates:e.map((e=>e.toJSON()))};this.candidatesEnded&&t.candidates.push({candidate:""}),c.a.debug(`Call ${this.callId} sendCandidateQueue() attempting to send ${e.length} candidates`);try{await this.sendVoipEvent(d.b.CallCandidates,t),this.candidateSendTries=0,this.sendCandidateQueue()}catch(t){if(t instanceof b.f&&t.event&&this.client.cancelPendingEvent(t.event),this.candidateSendQueue.push(...e),this.candidateSendTries>5){c.a.debug(`Call ${this.callId} sendCandidateQueue() failed to send candidates on attempt ${this.candidateSendTries}. Giving up on this call.`,t);const e=x.SignallingFailed,n="Signalling failed";return this.emit(C.Error,new F(e,n,t)),void this.hangup(e,!1)}const n=500*Math.pow(2,this.candidateSendTries);++this.candidateSendTries,c.a.debug(`Call ${this.callId} sendCandidateQueue() failed to send candidates. Retrying in ${n}ms`,t),setTimeout((()=>{this.sendCandidateQueue()}),n)}}async placeCall(e,t){if(!e)throw new Error("You CANNOT start a call without audio");this.state=E.WaitLocalMedia;try{var n;const r=await this.client.getMediaHandler().getUserMediaStream(e,t);A(r.getAudioTracks(),!0),A(r.getVideoTracks(),!0);const i=new m.a({client:this.client,roomId:this.roomId,userId:this.client.getUserId(),deviceId:null!==(n=this.client.getDeviceId())&&void 0!==n?n:void 0,stream:r,purpose:p.b.Usermedia,audioMuted:!1,videoMuted:!1});await this.placeCallWithCallFeeds([i])}catch(e){return void this.getUserMediaFailed(e)}}async placeCallWithCallFeeds(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.checkForErrorListener(),this.direction=w.Outbound,await this.initOpponentCrypto(),this.client.callEventHandler.calls.set(this.callId,this);await this.client.checkTurnServers()||c.a.warn(`Call ${this.callId} placeCallWithCallFeeds() failed to get TURN credentials! Proceeding with call anyway...`),this.peerConn=this.createPeerConnection(),this.gotCallFeedsForInvite(e,t)}createPeerConnection(){const e=new window.RTCPeerConnection({iceTransportPolicy:this.forceTURN?"relay":void 0,iceServers:this.turnServers,iceCandidatePoolSize:this.client.iceCandidatePoolSize,bundlePolicy:"max-bundle"});return e.addEventListener("iceconnectionstatechange",this.onIceConnectionStateChanged),e.addEventListener("signalingstatechange",this.onSignallingStateChanged),e.addEventListener("icecandidate",this.gotLocalIceCandidate),e.addEventListener("icegatheringstatechange",this.onIceGatheringStateChange),e.addEventListener("track",this.onTrack),e.addEventListener("negotiationneeded",this.onNegotiationNeeded),e.addEventListener("datachannel",this.onDataChannel),e}partyIdMatches(e){return(0===e.version?null:e.party_id||null)===this.opponentPartyId}chooseOpponent(e){var t;const n=e.getContent();c.a.debug(`Call ${this.callId} chooseOpponent() running (partyId=${n.party_id})`),this.opponentVersion=n.version,0===this.opponentVersion?this.opponentPartyId=null:this.opponentPartyId=n.party_id||null,this.opponentCaps=n.capabilities||{},this.opponentMember=null!==(t=this.client.getRoom(this.roomId).getMember(e.getSender()))&&void 0!==t?t:void 0}async addBufferedIceCandidates(){const e=this.remoteCandidateBuffer.get(this.opponentPartyId);e&&(c.a.info(`Call ${this.callId} addBufferedIceCandidates() adding ${e.length} buffered candidates for opponent ${this.opponentPartyId}`),await this.addIceCandidates(e)),this.remoteCandidateBuffer.clear()}async addIceCandidates(e){for(const t of e){null!==t.sdpMid&&void 0!==t.sdpMid||null!==t.sdpMLineIndex&&void 0!==t.sdpMLineIndex?c.a.debug(`Call ${this.callId} addIceCandidates() got remote ICE candidate (sdpMid=${t.sdpMid}, candidate=${t.candidate})`):c.a.debug(`Call ${this.callId} addIceCandidates() got remote ICE end-of-candidates`);try{await this.peerConn.addIceCandidate(t)}catch(e){this.ignoreOffer||c.a.info(`Call ${this.callId} addIceCandidates() failed to add remote ICE candidate`,e)}}}get hasPeerConnection(){return Boolean(this.peerConn)}}function A(e,t){for(const n of e)n.enabled=t}function R(){if("undefined"==typeof window||"undefined"==typeof document)return!1;try{if(!Boolean(window.RTCPeerConnection||window.RTCSessionDescription||window.RTCIceCandidate||navigator.mediaDevices))return c.a.error("WebRTC is not supported in this browser / environment"),!1}catch(e){return c.a.error("Exception thrown when trying to access WebRTC",e),!1}return!0}function N(e,t,n){if(!R())return null;const r=!!n&&n.forceTURN,i={client:e,roomId:t,invitee:null==n?void 0:n.invitee,turnServers:e.getTurnServers(),forceTURN:e.forceTURN||r,opponentDeviceId:null==n?void 0:n.opponentDeviceId,opponentSessionId:null==n?void 0:n.opponentSessionId,groupCallId:null==n?void 0:n.groupCallId},o=new I(i);return e.reEmitter.reEmit(o,Object.values(C)),o}},function(e,t,n){"use strict";n.d(t,"a",(function(){return S}));var r=n(132),i=n.n(r),o=n(13),a=n.n(o),s=n(996),l=n.n(s),c=n(1),u=n(157),d=n(131),h=n(122),p=n(125),m=n(128),g=n(124),f=n(194);const _=["eventName"];function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}let y;!function(e){e[e.Disabled=0]="Disabled",e[e.Anonymous=1]="Anonymous",e[e.Pseudonymous=2]="Pseudonymous"}(y||(y={}));const E=new Set(["register","login","forgot_password","soft_logout","new","settings","welcome","home","start","directory","start_sso","start_cas","complete_security","post_registration","room","user"]);class S{static get instance(){return this._instance||(this._instance=new S(l.a)),this._instance}constructor(e){this.posthog=e,a()(this,"anonymity",y.Disabled),a()(this,"enabled",!1),a()(this,"platformSuperProperties",{}),a()(this,"propertiesForNextEvent",{}),a()(this,"userPropertyCache",{}),a()(this,"authenticationType","Other"),a()(this,"onLayoutUpdated",(()=>{let e;switch(p.b.getValue("layout")){case f.a.IRC:e="IRC";break;case f.a.Bubble:e="Bubble";break;case f.a.Group:e=p.b.getValue("useCompactLayout")?"Compact":"Group"}this.setProperty("WebLayout",e)})),a()(this,"onAction",(e=>{if(e.action!==m.a.SettingUpdated)return;["layout","useCompactLayout"].includes(e.settingName)&&this.onLayoutUpdated()})),a()(this,"lastScreen","Loading"),a()(this,"sanitizeProperties",((e,t)=>("$pageview"===t&&(this.lastScreen=e.$current_url),e.$current_url=this.lastScreen,this.anonymity==y.Anonymous&&(e.$referrer=null,e.$referring_domain=null,e.$initial_referrer=null,e.$initial_referring_domain=null,e.$device_id=null),e)));const t=d.b.getObject("posthog");t?(this.posthog.init(t.get("project_api_key"),{api_host:t.get("api_host"),autocapture:!1,mask_all_text:!0,mask_all_element_attributes:!0,capture_pageview:!1,sanitize_properties:this.sanitizeProperties,respect_dnt:!0,advanced_disable_decide:!0}),this.enabled=!0):this.enabled=!1,g.a.register(this.onAction),p.b.monitorSetting("layout",null),p.b.monitorSetting("useCompactLayout",null),this.onLayoutUpdated()}registerSuperProperties(e){this.enabled&&this.posthog.register(e)}static async getPlatformProperties(){const e=u.a.get();let t;try{t=await(null==e?void 0:e.getAppVersion())}catch(e){t="unknown"}return{appVersion:t,appPlatform:null==e?void 0:e.getHumanReadableName()}}capture(e,t,n){if(!this.enabled)return;const{origin:r,hash:i,pathname:o}=window.location;t.redactedCurrentUrl=function(e,t,n){let r;if(e.startsWith("file://")&&(n="/<redacted_file_scheme_url>/"),""==t)r="";else{let[e,n]=t.split("/");E.has(n)||(n="<redacted_screen_name>"),r=`${e}/${n}/<redacted>`}return e+n+r}(r,i,o),this.posthog.capture(e,v(v({},this.propertiesForNextEvent),t)),this.propertiesForNextEvent={}}isEnabled(){return this.enabled}setAnonymity(e){!this.enabled||e!=y.Disabled&&e!=y.Anonymous||(this.posthog.reset(),this.registerSuperProperties(this.platformSuperProperties)),this.anonymity=e}static getRandomAnalyticsId(){return[...crypto.getRandomValues(new Uint8Array(16))].map((e=>e.toString(16))).join("")}async identifyUser(e,t){if(this.anonymity==y.Pseudonymous)try{const n=await e.getAccountDataFromServer(S.ANALYTICS_EVENT_TYPE);let r=null==n?void 0:n.id;r||(r=t(),await e.setAccountData(S.ANALYTICS_EVENT_TYPE,Object.assign({id:r},n))),this.posthog.identify(r)}catch(e){c.a.log("Unable to identify user for tracking"+e.toString())}}getAnonymity(){return this.anonymity}logout(){this.enabled&&this.posthog.reset(),this.setAnonymity(y.Disabled)}trackEvent(e,t){let{eventName:n}=e,r=i()(e,_);this.anonymity!=y.Disabled&&this.anonymity!=y.Anonymous&&this.capture(n,r,t)}setProperty(e,t){this.userPropertyCache[e]!==t&&(this.userPropertyCache[e]=t,this.propertiesForNextEvent.$set||(this.propertiesForNextEvent.$set={}),this.propertiesForNextEvent.$set[e]=t)}setPropertyOnce(e,t){this.userPropertyCache[e]||(this.userPropertyCache[e]=t,this.propertiesForNextEvent.$set_once||(this.propertiesForNextEvent.$set_once={}),this.propertiesForNextEvent.$set_once[e]=t)}async updatePlatformSuperProperties(){this.platformSuperProperties=await S.getPlatformProperties(),this.registerSuperProperties(this.platformSuperProperties)}async updateAnonymityFromSettings(e){const t=e?y.Pseudonymous:y.Disabled;this.setAnonymity(t),t===y.Pseudonymous&&(await this.identifyUser(h.a.get(),S.getRandomAnalyticsId),h.a.currentUserIsJustRegistered()&&this.trackNewUserEvent()),t!==y.Disabled&&await S.instance.updatePlatformSuperProperties()}startListeningToSettingsChanges(){p.b.watchSetting("pseudonymousAnalyticsOptIn",null,((e,t,n,r,i)=>{this.updateAnonymityFromSettings(!!i)}))}setAuthenticationType(e){this.authenticationType=e}trackNewUserEvent(){const e={},t=parseInt(window.localStorage.getItem("mx_registration_time"),10);return isNaN(t)||(e.timestamp=new Date(t)),this.trackEvent({eventName:"Signup",authenticationType:this.authenticationType},e)}}a()(S,"_instance",null),a()(S,"ANALYTICS_EVENT_TYPE","im.vector.analytics")},function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o})),function(e){e.Invite="im.vector.fake.invite",e.Untagged="im.vector.fake.recent",e.Archived="im.vector.fake.archived",e.LowPriority="m.lowpriority",e.Favourite="m.favourite",e.DM="im.vector.fake.direct",e.ServerNotice="m.server_notice",e.Suggested="im.vector.fake.suggested",e.SavedItems="im.vector.fake.saved_items"}(r||(r={}));const i=[r.Invite,r.Favourite,r.SavedItems,r.DM,r.Untagged,r.LowPriority,r.ServerNotice,r.Suggested,r.Archived];let o;!function(e){e.Timeline="TIMELINE",e.PossibleTagChange="POSSIBLE_TAG_CHANGE",e.ReadReceipt="READ_RECEIPT",e.NewRoom="NEW_ROOM",e.RoomRemoved="ROOM_REMOVED"}(o||(o={}))},function(e,t,n){"use strict";var r=n(130),i=n.n(r),o=n(132),a=n.n(o),s=n(120),l=n.n(s),c=n(126),u=n.n(c),d=n(147),h=n(259),p=n(125),m=n(123),g=n(138),f=n(133),_=n(141),b=n(552),v=n(121);const y=["name","idName","title","url","urls","width","height","resizeMethod","defaultToInitialLetter","onClick","inputRef","className"],E=function(e,t){let n=[];return arguments.length>2&&void 0!==arguments[2]&&arguments[2]||(n=t||[],e&&(n=[e,...n])),Array.from(new Set(n))};t.a=e=>{const{name:t,idName:n,title:r,url:o,urls:c,width:S=40,height:w=40,resizeMethod:T="crop",defaultToInitialLetter:C=!0,onClick:x,inputRef:F,className:D}=e,k=a()(e,y),[O,I]=(e=>{let{url:t,urls:n}=e;const r=Object(s.useContext)(g.b),i=r?r.lowBandwidth:p.b.getValue("lowBandwidth"),[o,a]=Object(s.useState)(E(t,n,i)),[l,c]=Object(s.useState)(0),u=Object(s.useCallback)((()=>{c((e=>e+1))}),[]);Object(s.useEffect)((()=>{a(E(t,n,i)),c(0)}),[t,JSON.stringify(n)]);const h=Object(s.useContext)(f.a),m=Object(s.useCallback)(((e,t)=>{"ERROR"!==e&&t!==e&&c(0)}),[]);return Object(_.c)(h,d.b.Sync,m),[o[l],u]})({url:o,urls:c});if(!O&&C&&t){const e=h.e(t),o=l.a.createElement("span",{className:"mx_BaseAvatar_initial","aria-hidden":"true",style:{fontSize:Object(b.a)(.65*S),width:Object(b.a)(S),lineHeight:Object(b.a)(w)}},e),a=l.a.createElement("img",{className:"mx_BaseAvatar_image",src:h.d(n||t),alt:"",title:r,onError:I,style:{width:Object(b.a)(S),height:Object(b.a)(w)},"aria-hidden":"true","data-testid":"avatar-img"});return x?l.a.createElement(m.a,i()({"aria-label":Object(v.a)("Avatar"),"aria-live":"off"},k,{element:"span",className:u()("mx_BaseAvatar",D),onClick:x,inputRef:F}),o,a):l.a.createElement("span",i()({className:u()("mx_BaseAvatar",D),ref:F},k,{role:"presentation"}),o,a)}return x?l.a.createElement(m.a,i()({className:u()("mx_BaseAvatar mx_BaseAvatar_image",D),element:"img",src:O,onClick:x,onError:I,style:{width:Object(b.a)(S),height:Object(b.a)(w)},title:r,alt:Object(v.a)("Avatar"),inputRef:F,"data-testid":"avatar-img"},k)):l.a.createElement("img",i()({className:u()("mx_BaseAvatar mx_BaseAvatar_image",D),src:O,onError:I,style:{width:Object(b.a)(S),height:Object(b.a)(w)},title:r,alt:"",ref:F,"data-testid":"avatar-img"},k))}},function(e,t,n){"use strict";n.d(t,"g",(function(){return r.b})),n.d(t,"c",(function(){return r.a})),n.d(t,"h",(function(){return r.c})),n.d(t,"m",(function(){return E})),n.d(t,"l",(function(){return S})),n.d(t,"i",(function(){return w})),n.d(t,"o",(function(){return A})),n.d(t,"v",(function(){return L})),n.d(t,"s",(function(){return B})),n.d(t,"r",(function(){return H})),n.d(t,"E",(function(){return K})),n.d(t,"b",(function(){return Q})),n.d(t,"a",(function(){return ee})),n.d(t,"d",(function(){return ne})),n.d(t,"e",(function(){return ae})),n.d(t,"f",(function(){return ye})),n.d(t,"k",(function(){return Fe})),n.d(t,"u",(function(){return De})),n.d(t,"A",(function(){return ke})),n.d(t,"O",(function(){return Re})),n.d(t,"j",(function(){return $e})),n.d(t,"B",(function(){return Ke})),n.d(t,"p",(function(){return at})),n.d(t,"t",(function(){return st})),n.d(t,"w",(function(){return ft})),n.d(t,"Q",(function(){return _t})),n.d(t,"R",(function(){return bt})),n.d(t,"S",(function(){return yt})),n.d(t,"T",(function(){return ct})),n.d(t,"n",(function(){return Et.a})),n.d(t,"q",(function(){return St})),n.d(t,"y",(function(){return wt})),n.d(t,"x",(function(){return Tt})),n.d(t,"C",(function(){return O})),n.d(t,"D",(function(){return Ct})),n.d(t,"F",(function(){return xt})),n.d(t,"G",(function(){return Ft})),n.d(t,"H",(function(){return It})),n.d(t,"I",(function(){return At})),n.d(t,"J",(function(){return vt})),n.d(t,"K",(function(){return Rt})),n.d(t,"L",(function(){return Nt})),n.d(t,"M",(function(){return Mt})),n.d(t,"N",(function(){return Pt})),n.d(t,"P",(function(){return Ut})),n.d(t,"z",(function(){return jt}));var r=n(261),i=n(13),o=n.n(i),a=n(136),s=n(158),l=n(6),c=n(1),u=n(16),d=n(251),h=n(500),p=n(153),m=n(499),g=n(354);let f;!function(e){e.Add="add"}(f||(f={}));class _ extends s.b{constructor(e,t,n,r){super(),this.event=e,this.relationType=t,this.relationEventType=n,this.client=r,o()(this,"relations",void 0),o()(this,"eventId",void 0),o()(this,"roomId",void 0),o()(this,"setUpRelations",(()=>{this.setRelations(),this.relations?this.relations.on(g.b.Add,this.onRelationsAdd):this.event.once(a.MatrixEventEvent.RelationsCreated,this.onRelationsCreated)})),o()(this,"onRelationsCreated",(()=>{this.setRelations(),this.relations?(this.relations.on(g.b.Add,this.onRelationsAdd),this.emitCurrent()):this.event.once(a.MatrixEventEvent.RelationsCreated,this.onRelationsCreated)})),o()(this,"onRelationsAdd",(e=>{this.emit(f.Add,e)}));const i=e.getId();if(!i)throw new Error("unable to create RelationsHelper: missing event ID");const s=e.getRoomId();if(!s)throw new Error("unable to create RelationsHelper: missing room ID");this.eventId=i,this.roomId=s,this.setUpRelations()}setRelations(){var e,t;const n=this.client.getRoom(this.event.getRoomId());this.relations=null==n||null===(e=n.getUnfilteredTimelineSet())||void 0===e||null===(t=e.relations)||void 0===t?void 0:t.getChildEventsForEvent(this.eventId,this.relationType,this.relationEventType)}emitCurrent(){var e,t;null===(e=this.relations)||void 0===e||null===(t=e.getRelations())||void 0===t||t.forEach((e=>this.emit(f.Add,e)))}getCurrent(){var e;return(null===(e=this.relations)||void 0===e?void 0:e.getRelations())||[]}async emitFetchCurrent(){let e;do{const t=await this.client.relations(this.roomId,this.eventId,this.relationType,this.relationEventType,{from:e,limit:50});e=null==t?void 0:t.nextBatch,null==t||t.events.forEach((e=>this.emit(f.Add,e)))}while(e)}destroy(){this.removeAllListeners(),this.event.off(a.MatrixEventEvent.RelationsCreated,this.onRelationsCreated),this.relations&&this.relations.off(g.b.Add,this.onRelationsAdd)}}class b{constructor(){o()(this,"events",[]),o()(this,"addOrReplaceEvent",(e=>(this.events=this.events.filter((t=>!this.equalByTxnIdOrId(e,t))),this.events.push(e),!0))),o()(this,"compareBySequence",((e,t)=>{var n,i,o,a;return((null===(n=e.getContent())||void 0===n||null===(i=n[r.a])||void 0===i?void 0:i.sequence)||0)-((null===(o=t.getContent())||void 0===o||null===(a=o[r.a])||void 0===a?void 0:a.sequence)||0)})),o()(this,"compareByTimestamp",((e,t)=>e.getTs()-t.getTs()))}getEvents(){return[...this.events]}getNext(e){return this.events[this.events.indexOf(e)+1]}addEvent(e){this.addOrReplaceEvent(e)&&this.sort()}addEvents(e){e.reduce(((e,t)=>this.addOrReplaceEvent(t)||e),!1)&&this.sort()}includes(e){return!!this.events.find((t=>this.equalByTxnIdOrId(e,t)))}getLength(){return this.events.reduce(((e,t)=>e+this.calculateChunkLength(t)),0)}getLengthSeconds(){return this.getLength()/1e3}getLengthTo(e){let t=0;for(let n=0;n<this.events.indexOf(e);n++)t+=this.calculateChunkLength(this.events[n]);return t}findByTime(e){let t=0;for(let n=0;n<this.events.length;n++)if(t+=this.calculateChunkLength(this.events[n]),t>=e)return this.events[n];return null}isLast(e){return this.events.indexOf(e)>=this.events.length-1}getSequenceForEvent(e){var t,n;const i=parseInt(null===(t=e.getContent())||void 0===t||null===(n=t[r.a])||void 0===n?void 0:n.sequence,10);return isNaN(i)?this.events.includes(e)?this.events.indexOf(e)+1:null:i}getNumberOfEvents(){return this.events.length}calculateChunkLength(e){var t,n,r,i;return(null===(t=e.getContent())||void 0===t||null===(n=t["org.matrix.msc1767.audio"])||void 0===n?void 0:n.duration)||(null===(r=e.getContent())||void 0===r||null===(i=r.info)||void 0===i?void 0:i.duration)||0}equalByTxnIdOrId(e,t){return e.getTxnId()&&t.getTxnId()&&e.getTxnId()===t.getTxnId()||e.getId()===t.getId()}sort(){const e=this.allHaveSequence()?this.compareBySequence:this.compareByTimestamp;this.events.sort(e)}allHaveSequence(){return!this.events.some((e=>{var t,n;const i=null===(t=e.getContent())||void 0===t||null===(n=t[r.a])||void 0===n?void 0:n.sequence;return parseInt(i,10)!==i}))}}const v=new Map([["started","live"],["resumed","live"],["paused","grey"],["stopped","not-live"]]);var y=n(121);let E,S;!function(e){e.Paused="pause",e.Playing="playing",e.Stopped="stopped",e.Buffering="buffering",e.Error="error"}(E||(E={})),function(e){e.TimesChanged="times_changed",e.LivenessChanged="liveness_changed",e.StateChanged="state_changed",e.InfoStateChanged="info_state_changed"}(S||(S={}));class w extends s.b{constructor(e,t,n){super(),this.infoEvent=e,this.client=t,this.recordings=n,o()(this,"state",E.Stopped),o()(this,"chunkEvents",new b),o()(this,"utdChunkEvents",new Map),o()(this,"playbacks",new Map),o()(this,"currentlyPlaying",null),o()(this,"duration",0),o()(this,"position",0),o()(this,"liveData",new l.SimpleObservable),o()(this,"liveness","not-live"),o()(this,"infoState",void 0),o()(this,"lastInfoEvent",void 0),o()(this,"chunkRelationHelper",void 0),o()(this,"infoRelationHelper",void 0),o()(this,"skipToNext",void 0),o()(this,"skipToDeferred",void 0),o()(this,"addChunkEvent",(async e=>{var t;return!(!e.getId()&&!e.getTxnId())&&(e.isDecryptionFailure()?(this.onChunkEventDecryptionFailure(e),!1):(null===(t=e.getContent())||void 0===t?void 0:t.msgtype)===a.MsgType.Audio&&(this.chunkEvents.addEvent(e),this.setDuration(this.chunkEvents.getLength()),this.getState()===E.Buffering&&await this.startOrPlayNext(),!0))})),o()(this,"onChunkEventDecryptionFailure",(e=>{const t=e.getId();t?(this.utdChunkEvents.has(t)||e.once(a.MatrixEventEvent.Decrypted,this.onChunkEventDecrypted),this.utdChunkEvents.set(t,e),this.setError()):c.a.warn("Broadcast chunk decryption failure for event without Id",{broadcast:this.infoEvent.getId()})})),o()(this,"onChunkEventDecrypted",(async e=>{const t=e.getId();t?(this.utdChunkEvents.delete(t),await this.addChunkEvent(e),0===this.utdChunkEvents.size&&this.setState(E.Paused)):c.a.warn("Broadcast chunk decrypted for event without Id",{broadcast:this.infoEvent.getId()})})),o()(this,"startOrPlayNext",(async()=>this.currentlyPlaying?this.playNext():await this.start())),o()(this,"addInfoEvent",(e=>{var t;if(this.lastInfoEvent&&this.lastInfoEvent.getTs()>=e.getTs())return;const n=null===(t=e.getContent())||void 0===t?void 0:t.state;Object.values(r.c).includes(n)&&(this.lastInfoEvent=e,this.setInfoState(n))})),o()(this,"onBeforeRedaction",(()=>{this.getState()!==E.Stopped&&(this.stop(),this.destroy())})),o()(this,"onPlaybackPositionUpdate",((e,t)=>{if(e!==this.currentlyPlaying)return;const n=this.chunkEvents.getLengthTo(e)+1e3*t;n<this.position||this.setPosition(n)})),o()(this,"onPlaybackStateChange",(async(e,t)=>{e===this.currentlyPlaying&&t===d.d.Stopped&&(await this.playNext(),this.unloadPlayback(e))})),this.addInfoEvent(this.infoEvent),this.infoEvent.on(a.MatrixEventEvent.BeforeRedaction,this.onBeforeRedaction),this.setUpRelationsHelper()}async setUpRelationsHelper(){if(this.infoRelationHelper=new _(this.infoEvent,a.RelationType.Reference,r.b,this.client),this.infoRelationHelper.getCurrent().forEach(this.addInfoEvent),this.infoState!==r.c.Stopped){this.infoRelationHelper.on(f.Add,this.addInfoEvent);try{await this.infoRelationHelper.emitFetchCurrent()}catch(e){c.a.warn("error fetching server side relation for voice broadcast info",e),this.infoRelationHelper.emitCurrent()}}this.chunkRelationHelper=new _(this.infoEvent,a.RelationType.Reference,a.EventType.RoomMessage,this.client),this.chunkRelationHelper.on(f.Add,this.addChunkEvent);try{await this.chunkRelationHelper.emitFetchCurrent()}catch(e){c.a.warn("error fetching server side relation for voice broadcast chunks",e),this.chunkRelationHelper.emitCurrent()}}async tryLoadPlayback(e){try{return await this.loadPlayback(e)}catch(t){c.a.warn("Unable to load broadcast playback",{message:t.message,broadcastId:this.infoEvent.getId(),chunkId:e.getId()}),this.setError()}}async loadPlayback(e){const t=e.getId();if(!t)throw new Error("Broadcast chunk event without Id occurred");const n=new m.a(e),r=await n.sourceBlob.value,i=await r.arrayBuffer(),o=h.a.instance.createPlaybackInstance(i);await o.prepare(),o.clockInfo.populatePlaceholdersFrom(e),this.playbacks.set(t,o),o.on(p.b,(t=>this.onPlaybackStateChange(e,t))),o.clockInfo.liveData.onUpdate((t=>{let[n]=t;this.onPlaybackPositionUpdate(e,n)}))}unloadPlayback(e){const t=this.playbacks.get(e.getId());t&&(t.destroy(),this.playbacks.delete(e.getId()))}setDuration(e){this.duration!==e&&(this.duration=e,this.emitTimesChanged(),this.liveData.update([this.timeSeconds,this.durationSeconds]))}setPosition(e){this.position!==e&&(this.position=e,this.emitTimesChanged(),this.liveData.update([this.timeSeconds,this.durationSeconds]))}emitTimesChanged(){this.emit(S.TimesChanged,{duration:this.durationSeconds,position:this.timeSeconds,timeLeft:this.timeLeftSeconds})}async playNext(){if(!this.currentlyPlaying)return;const e=this.chunkEvents.getNext(this.currentlyPlaying);if(e)return this.playEvent(e);this.getInfoState()===r.c.Stopped&&this.chunkEvents.getSequenceForEvent(this.currentlyPlaying)===this.lastChunkSequence?this.stop():this.setState(E.Buffering)}get lastChunkSequence(){var e;return(null===(e=this.lastInfoEvent.getContent())||void 0===e?void 0:e.last_chunk_sequence)||this.chunkEvents.getNumberOfEvents()}async playEvent(e){this.setState(E.Playing),this.currentlyPlaying=e;const t=await this.tryGetOrLoadPlaybackForEvent(e);null==t||t.play()}async tryGetOrLoadPlaybackForEvent(e){try{return await this.getOrLoadPlaybackForEvent(e)}catch(t){c.a.warn("Unable to load broadcast playback",{message:t.message,broadcastId:this.infoEvent.getId(),chunkId:e.getId()}),this.setError()}}async getOrLoadPlaybackForEvent(e){const t=e.getId();if(!t)throw new Error("Broadcast chunk event without Id occurred");if(!this.playbacks.has(t)){const t=this.getState();this.setState(E.Buffering),await this.loadPlayback(e),this.setState(t)}const n=this.playbacks.get(t);if(!n)throw new Error(`Unable to find playback for event ${e.getId()}`);const r=this.chunkEvents.getNext(e);return r&&this.tryLoadPlayback(r),n}getCurrentPlayback(){if(this.currentlyPlaying)return this.playbacks.get(this.currentlyPlaying.getId())}getLiveness(){return this.liveness}setLiveness(e){this.liveness!==e&&(this.liveness=e,this.emit(S.LivenessChanged,e))}get currentState(){return d.d.Playing}get timeSeconds(){return this.position/1e3}get durationSeconds(){return this.duration/1e3}get timeLeftSeconds(){return Math.max(0,Math.round(this.durationSeconds)-this.timeSeconds)}async skipTo(e){if(this.skipToNext=e,this.skipToDeferred)return this.skipToDeferred.promise;for(this.skipToDeferred=Object(u.m)();void 0!==this.skipToNext;){const e=this.skipToNext;this.skipToNext=void 0,await this.doSkipTo(e)}this.skipToDeferred.resolve(),this.skipToDeferred=void 0}async doSkipTo(e){const t=1e3*e,n=this.chunkEvents.findByTime(t);if(!n)return void c.a.warn("voice broadcast chunk event to skip to not found");const r=this.getCurrentPlayback(),i=await this.tryGetOrLoadPlaybackForEvent(n),o=this.currentlyPlaying;if(!i)return void c.a.warn("voice broadcast chunk to skip to not found",n);this.currentlyPlaying=n,r&&o&&r!==i&&(r.off(p.b,this.onPlaybackStateChange),await r.stop(),r.on(p.b,this.onPlaybackStateChange),this.unloadPlayback(o));const a=t-this.chunkEvents.getLengthTo(n);await i.skipTo(a/1e3),this.state!==E.Playing||i.isPlaying||await i.play(),this.setPosition(t)}async start(){if(this.state===E.Playing)return;const e=this.recordings.getCurrent();if(e&&e.getState()!==r.c.Stopped){var t;if(!await Re())return;await(null===(t=this.recordings.getCurrent())||void 0===t?void 0:t.stop())}const n=this.chunkEvents.getEvents(),i=this.getInfoState()===r.c.Stopped?n[0]:n[n.length-1];if(i)return this.playEvent(i);this.setState(E.Buffering)}stop(){var e;this.getState()!==E.Error&&(this.setState(E.Stopped),null===(e=this.getCurrentPlayback())||void 0===e||e.stop(),this.currentlyPlaying=null,this.setPosition(0))}pause(){var e;this.getState()!==E.Error&&this.getState()!==E.Stopped&&(this.setState(E.Paused),null===(e=this.getCurrentPlayback())||void 0===e||e.pause())}resume(){var e;this.getState()!==E.Error&&(this.currentlyPlaying?(this.setState(E.Playing),null===(e=this.getCurrentPlayback())||void 0===e||e.play()):this.start())}async toggle(){this.getState()!==E.Error&&(this.state!==E.Stopped?this.state!==E.Paused?this.pause():this.resume():await this.start())}getState(){return this.state}setState(e){this.state!==e&&(this.state=e,this.emit(S.StateChanged,e,this))}setError(){var e;this.setState(E.Error),null===(e=this.getCurrentPlayback())||void 0===e||e.stop(),this.currentlyPlaying=null,this.setPosition(0)}getInfoState(){return this.infoState}setInfoState(e){var t,n;this.infoState!==e&&(this.infoState=e,this.emit(S.InfoStateChanged,e),this.setLiveness((t=this.infoState,null!==(n=v.get(t))&&void 0!==n?n:"not-live")))}get errorMessage(){return this.getState()!==E.Error?"":this.utdChunkEvents.size?Object(y.a)("Unable to decrypt voice broadcast"):Object(y.a)("Unable to play this voice broadcast")}destroy(){for(const[,e]of this.utdChunkEvents)e.off(a.MatrixEventEvent.Decrypted,this.onChunkEventDecrypted);this.utdChunkEvents.clear(),this.chunkRelationHelper.destroy(),this.infoRelationHelper.destroy(),this.removeAllListeners(),this.chunkEvents=new b,this.playbacks.forEach((e=>e.destroy())),this.playbacks=new Map}}var T=n(120),C=n.n(T),x=n(215),F=n(213),D=n(127);const k=()=>{D.b.createDialog(F.a,{title:Object(y.a)("Can't start a new voice broadcast"),description:C.a.createElement("p",null,Object(y.a)("You are already recording a voice broadcast. Please end your current voice broadcast to start a new one.")),hasCloseButton:!0})},O=async(e,t,n)=>{if(n.getCurrent())return k(),!1;const i=t.getUserId();if(!i)return!1;if(!e.currentState.maySendStateEvent(r.b,i))return D.b.createDialog(F.a,{title:Object(y.a)("Can't start a new voice broadcast"),description:C.a.createElement("p",null,Object(y.a)("You don't have the required permissions to start a voice broadcast in this room. Contact a room administrator to upgrade your permissions.")),hasCloseButton:!0}),!1;if(t.getSyncState()===x.b.Error)return D.b.createDialog(F.a,{title:Object(y.a)("Connection error"),description:C.a.createElement("p",null,Object(y.a)("Unfortunately we're unable to start a recording right now. Please try again later.")),hasCloseButton:!0}),!1;const{hasBroadcast:o,startedByUser:a}=await vt(t,e,i);return o&&a?(k(),!1):!o||(D.b.createDialog(F.a,{title:Object(y.a)("Can't start a new voice broadcast"),description:C.a.createElement("p",null,Object(y.a)("Someone else is already recording a voice broadcast. Wait for their voice broadcast to end to start a new one.")),hasCloseButton:!0}),!1)},I=async(e,t,n,i)=>{var o;return await O(e,t,i)?(null===(o=n.getCurrent())||void 0===o||o.pause(),n.clearCurrent(),(async(e,t,n)=>{const{promise:i,resolve:o,reject:s}=Object(u.m)(),l=t.getUserId();if(!l)return s("unable to start voice broadcast if current user is unknown"),i;let c=null;const d=()=>{if(!c)return;const i=e.currentState.getStateEvents(r.b,l);if((null==i?void 0:i.getId())===c.event_id){e.off(a.RoomStateEvent.Events,d);const r=new B(i,t);n.setCurrent(r),r.start(),o(r)}};return e.on(a.RoomStateEvent.Events,d),c=await t.sendStateEvent(e.roomId,r.b,{device_id:t.getDeviceId(),state:r.c.Started,chunk_length:It()},l),i})(e,t,i)):null};class A extends s.b{constructor(e,t,n,r,i){super(),this.room=e,this.sender=t,this.client=n,this.playbacksStore=r,this.recordingsStore=i,o()(this,"start",(async()=>{await I(this.room,this.client,this.playbacksStore,this.recordingsStore),this.emit("dismiss",this)})),o()(this,"cancel",(()=>{this.emit("dismiss",this)}))}destroy(){this.removeAllListeners()}}var R=n(284),N=n(816),M=n(124),P=n(595);let L;!function(e){e.StateChanged="liveness_changed",e.TimeLeftChanged="time_left_changed"}(L||(L={}));class B extends s.b{constructor(e,t,n){super(),this.infoEvent=e,this.client=t,o()(this,"state",void 0),o()(this,"recorder",null),o()(this,"dispatcherRef",void 0),o()(this,"chunkEvents",new b),o()(this,"chunkRelationHelper",void 0),o()(this,"maxLength",void 0),o()(this,"timeLeft",void 0),o()(this,"toRetry",[]),o()(this,"reconnectedListener",void 0),o()(this,"roomId",void 0),o()(this,"infoEventId",void 0),o()(this,"sequence",0),o()(this,"onChunkEvent",(e=>{var t;(e.getId()||e.getTxnId())&&(null===(t=e.getContent())||void 0===t?void 0:t.msgtype)===a.MsgType.Audio&&this.chunkEvents.addEvent(e)})),o()(this,"onReconnect",(async()=>{if("connection_error"!==this.state)return;const e=[...this.toRetry];for(const t of this.toRetry)try{await t(),e.splice(e.indexOf(t),1)}catch{break}this.toRetry=e,0===this.toRetry.length&&await this.pause()})),o()(this,"toggle",(async()=>this.getState()===r.c.Paused?this.resume():[r.c.Started,r.c.Resumed].includes(this.getState())?this.pause():void 0)),o()(this,"onBeforeRedaction",(()=>{this.getState()!==r.c.Stopped&&(this.setState(r.c.Stopped),this.destroy())})),o()(this,"onAction",(e=>{"call_state"===e.action&&this.pause()})),o()(this,"onCurrentChunkLengthUpdated",(e=>{this.setTimeLeft(this.maxLength-this.chunkEvents.getLengthSeconds()-e)})),o()(this,"onChunkRecorded",(async e=>{await this.callWithRetry((async()=>{const{url:t,file:n}=await this.uploadFile(e);await this.sendVoiceMessage(e,t,n)}))})),this.maxLength=At(),this.timeLeft=this.maxLength,this.infoEventId=this.determineEventIdFromInfoEvent(),this.roomId=this.determineRoomIdFromInfoEvent(),this.state=n||this.determineInitialStateFromInfoEvent(),this.infoEvent.on(a.MatrixEventEvent.BeforeRedaction,this.onBeforeRedaction),this.dispatcherRef=M.a.register(this.onAction),this.chunkRelationHelper=this.initialiseChunkEventRelation(),this.reconnectedListener=Object(P.a)(this.onReconnect),this.client.on(a.ClientEvent.Sync,this.reconnectedListener)}initialiseChunkEventRelation(){const e=new _(this.infoEvent,a.RelationType.Reference,a.EventType.RoomMessage,this.client);return e.on(f.Add,this.onChunkEvent),e.emitFetchCurrent().catch((t=>{c.a.warn("error fetching server side relation for voice broadcast chunks",t),e.emitCurrent()})),e}determineEventIdFromInfoEvent(){const e=this.infoEvent.getId();if(!e)throw new Error("Cannot create broadcast for info event without Id.");return e}determineRoomIdFromInfoEvent(){const e=this.infoEvent.getRoomId();if(!e)throw new Error(`Cannot create broadcast for unknown room (info event ${this.infoEventId})`);return e}determineInitialStateFromInfoEvent(){var e,t;const n=this.client.getRoom(this.roomId),i=null==n||null===(e=n.getUnfilteredTimelineSet())||void 0===e||null===(t=e.relations)||void 0===t?void 0:t.getChildEventsForEvent(this.infoEventId,a.RelationType.Reference,r.b),o=null==i?void 0:i.getRelations();return null!=o&&o.find((e=>{var t;return(null===(t=e.getContent())||void 0===t?void 0:t.state)===r.c.Stopped}))?r.c.Stopped:r.c.Started}getTimeLeft(){return this.timeLeft}async setTimeLeft(e){if(e<=0)return await this.stop();e>=this.timeLeft||(this.timeLeft=e,this.emit(L.TimeLeftChanged,e))}async start(){return this.getRecorder().start()}async stop(){this.state!==r.c.Stopped&&(this.setState(r.c.Stopped),await this.stopRecorder(),await this.sendInfoStateEvent(r.c.Stopped))}async pause(){[r.c.Stopped,r.c.Paused].includes(this.state)||(this.setState(r.c.Paused),await this.stopRecorder(),await this.sendInfoStateEvent(r.c.Paused))}async resume(){this.state===r.c.Paused&&(this.setState(r.c.Resumed),await this.getRecorder().start(),await this.sendInfoStateEvent(r.c.Resumed))}getState(){return this.state}getRecorder(){return this.recorder||(this.recorder=K(),this.recorder.on(H.ChunkRecorded,this.onChunkRecorded),this.recorder.on(H.CurrentChunkLengthUpdated,this.onCurrentChunkLengthUpdated)),this.recorder}async destroy(){this.recorder&&(this.recorder.stop(),this.recorder.destroy()),this.infoEvent.off(a.MatrixEventEvent.BeforeRedaction,this.onBeforeRedaction),this.removeAllListeners(),M.a.unregister(this.dispatcherRef),this.chunkEvents=new b,this.chunkRelationHelper.destroy(),this.client.off(a.ClientEvent.Sync,this.reconnectedListener)}setState(e){this.state=e,this.emit(L.StateChanged,this.state)}async onConnectionError(){await this.stopRecorder(!1),this.setState("connection_error")}async uploadFile(e){return Object(R.b)(this.client,this.roomId,new Blob([e.buffer],{type:this.getRecorder().contentType}))}async sendVoiceMessage(e,t,n){const r=++this.sequence;await this.callWithRetry((async()=>{const i=Object(N.a)(t,this.getRecorder().contentType,Math.round(1e3*e.length),e.buffer.length,n);i["m.relates_to"]={rel_type:a.RelationType.Reference,event_id:this.infoEventId},i["io.element.voice_broadcast_chunk"]={sequence:r},await this.client.sendMessage(this.roomId,i)}))}async sendInfoStateEvent(e){await this.callWithRetry((async()=>{await this.client.sendStateEvent(this.roomId,r.b,{device_id:this.client.getDeviceId(),state:e,last_chunk_sequence:this.sequence,"m.relates_to":{rel_type:a.RelationType.Reference,event_id:this.infoEventId}},this.client.getSafeUserId())}))}async callWithRetry(e){try{await e()}catch{this.toRetry.push(e),this.onConnectionError()}}async stopRecorder(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.recorder)try{const t=await this.recorder.stop();t&&e&&await this.onChunkRecorded(t)}catch(e){c.a.warn("error stopping voice broadcast recorder",e)}}}var U=n(149),j=n(348),G=n(146),z=n(567);let H;!function(e){e.ChunkRecorded="chunk_recorded",e.CurrentChunkLengthUpdated="current_chunk_length_updated"}(H||(H={}));const q=[79,112,117,115,72,101,97,100],V=[79,112,117,115,84,97,103,115];class $ extends s.b{constructor(e,t){super(),this.voiceRecording=e,this.targetChunkLength=t,o()(this,"opusHead",void 0),o()(this,"opusTags",void 0),o()(this,"chunkBuffer",new Uint8Array(0)),o()(this,"previousChunkEndTimePosition",0),o()(this,"currentChunkLength",0),o()(this,"onDataAvailable",(e=>{const t=new Uint8Array(e),n=Array.from(t.slice(28,36));Object(U.isEqual)(q,n)?this.opusHead=t:Object(U.isEqual)(V,n)?this.opusTags=t:(this.setCurrentChunkLength(this.voiceRecording.recorderSeconds-this.previousChunkEndTimePosition),this.handleData(t))})),this.voiceRecording.onDataAvailable=this.onDataAvailable}async start(){await this.voiceRecording.start(),this.voiceRecording.liveData.onUpdate((e=>{this.setCurrentChunkLength(e.timeSeconds-this.previousChunkEndTimePosition)}))}async stop(){try{await this.voiceRecording.stop()}catch(e){}z.a.forgetAllFor(this.voiceRecording);const e=this.extractChunk();return this.currentChunkLength=0,this.previousChunkEndTimePosition=0,e}get contentType(){return this.voiceRecording.contentType}setCurrentChunkLength(e){this.currentChunkLength!==e&&(this.currentChunkLength=e,this.emit(H.CurrentChunkLengthUpdated,e))}getCurrentChunkLength(){return this.currentChunkLength}handleData(e){this.chunkBuffer=Object(G.m)(this.chunkBuffer,e),this.emitChunkIfTargetLengthReached()}emitChunkIfTargetLengthReached(){this.getCurrentChunkLength()>=this.targetChunkLength&&this.emitAndResetChunk()}extractChunk(){if(0===this.chunkBuffer.length)return null;if(!this.opusHead||!this.opusTags)return c.a.warn("Broadcast chunk cannot be extracted. OpusHead or OpusTags is missing."),null;const e=this.voiceRecording.recorderSeconds,t={buffer:Object(G.m)(this.opusHead,this.opusTags,this.chunkBuffer),length:this.getCurrentChunkLength()};return this.chunkBuffer=new Uint8Array(0),this.setCurrentChunkLength(0),this.previousChunkEndTimePosition=e,t}emitAndResetChunk(){0!==this.chunkBuffer.length&&this.emit(H.ChunkRecorded,this.extractChunk())}destroy(){this.removeAllListeners(),this.voiceRecording.destroy()}}const K=()=>{const e=new j.d;return e.disableMaxLength(),new $(e,It())};var W=n(122),Y=n(154);const Q=e=>{var t;let{mxEvent:n}=e;const i=Object(T.useContext)(Y.a),o=W.a.get(),[s,l]=Object(T.useState)((null===(t=n.getContent())||void 0===t?void 0:t.state)||r.c.Stopped);if(Object(T.useEffect)((()=>{const e=new _(n,a.RelationType.Reference,r.b,o);return e.on(f.Add,(e=>{var t;(null===(t=e.getContent())||void 0===t?void 0:t.state)===r.c.Stopped&&l(r.c.Stopped)})),e.emitCurrent(),()=>{e.destroy()}})),Mt(s,o,n)){const e=i.voiceBroadcastRecordingsStore.getByInfoEvent(n,o);return C.a.createElement(st,{recording:e})}const c=i.voiceBroadcastPlaybacksStore.getByInfoEvent(n,o);return C.a.createElement($e,{playback:c})};var X=n(126),Z=n.n(X),J=n(395);const ee=e=>{let{grey:t=!1}=e;const n=Z()("mx_LiveBadge",{"mx_LiveBadge--grey":t});return C.a.createElement("div",{className:n},C.a.createElement(J.a,{className:"mx_Icon mx_Icon_16"}),Object(y.a)("Live"))};var te=n(123);const ne=e=>{let{className:t="",icon:n,label:r,onClick:i}=e;return C.a.createElement(te.a,{className:Z()("mx_VoiceBroadcastControl",t),onClick:i,"aria-label":r},C.a.createElement(n,{className:"mx_Icon mx_Icon_16"}))};var re;function ie(){return ie=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ie.apply(this,arguments)}function oe(e){return T.createElement("svg",ie({fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",role:"presentation","aria-hidden":!0},e),re||(re=T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 16A8 8 0 108 0a8 8 0 000 16zM6.98 4.51c-.05-.57.37-1.07.94-1.11.56-.04 1.06.38 1.12.95v.16l-.32 4c-.03.37-.34.65-.71.65h-.06a.707.707 0 01-.65-.65l-.32-4zm1.9 6.61a.88.88 0 11-1.76 0 .88.88 0 011.76 0z",fill:"#8D99A5"})))}const ae=e=>{let{message:t}=e;return C.a.createElement("div",{className:"mx_VoiceBroadcastRecordingConnectionError"},C.a.createElement(oe,{className:"mx_Icon mx_Icon_16"}),t)};var se;function le(){return le=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},le.apply(this,arguments)}function ce(e){return T.createElement("svg",le({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16.15 19.751",role:"presentation","aria-hidden":!0},e),se||(se=T.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M4.175 3.9a3.9 3.9 0 017.8 0v5.832a3.9 3.9 0 11-7.8 0zM1.25 8.488c.69 0 1.25.56 1.25 1.25a5.57 5.57 0 005.567 5.566h.017a5.57 5.57 0 005.566-5.566 1.25 1.25 0 012.5 0c0 4.03-2.96 7.37-6.825 7.97v.793a1.25 1.25 0 01-2.5 0v-.793C2.96 17.108 0 13.769 0 9.738c0-.69.56-1.25 1.25-1.25z",clipRule:"evenodd"})))}var ue;function de(){return de=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},de.apply(this,arguments)}function he(e){return T.createElement("svg",de({fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 14",role:"presentation","aria-hidden":!0},e),ue||(ue=T.createElement("path",{d:"M8 0H4v1.333h4V0zM5.333 8.667h1.334v-4H5.333v4zm5.354-4.407l.946-.947c-.286-.34-.6-.66-.94-.94l-.946.947A5.974 5.974 0 006 2a6 6 0 106 6 5.975 5.975 0 00-1.313-3.74zM6 12.667A4.663 4.663 0 011.333 8 4.663 4.663 0 016 3.333 4.663 4.663 0 0110.667 8 4.663 4.663 0 016 12.667z",fill:"currentColor"})))}var pe=n(162),me=n(464),ge=n(337),fe=n(165),_e=n(134),be=n(128),ve=n(148);const ye=e=>{let{linkToRoom:t=!1,live:n="not-live",liveBadgePosition:r="right",onCloseClick:i=(()=>{}),onMicrophoneLineClick:o=null,room:a,microphoneLabel:s,showBroadcast:l=!1,showBuffering:c=!1,bufferingPosition:u="line",showClose:d=!1,timeLeft:h}=e;const p=l&&C.a.createElement("div",{className:"mx_VoiceBroadcastHeader_line"},C.a.createElement(J.a,{className:"mx_Icon mx_Icon_16"}),Object(y.a)("Voice broadcast")),m="not-live"!==n&&C.a.createElement(ee,{grey:"grey"===n}),g=d&&C.a.createElement(te.a,{onClick:i},C.a.createElement(me.a,{className:"mx_Icon mx_Icon_16"})),f=h&&C.a.createElement("div",{className:"mx_VoiceBroadcastHeader_line"},C.a.createElement(he,{className:"mx_Icon mx_Icon_16"}),C.a.createElement(ge.a,{formatFn:fe.n,seconds:h})),_=c&&"line"===u&&C.a.createElement("div",{className:"mx_VoiceBroadcastHeader_line"},C.a.createElement(_e.a,{w:14,h:14}),Object(y.a)("Buffering…")),b=Z()({mx_VoiceBroadcastHeader_line:!0,"mx_VoiceBroadcastHeader_mic--clickable":o}),v=s&&C.a.createElement(ve.a,{className:b,onClick:o,title:Object(y.a)("Change input device")},C.a.createElement(ce,{className:"mx_Icon mx_Icon_16"}),C.a.createElement("span",null,s)),E=()=>{M.a.dispatch({action:be.a.ViewRoom,room_id:a.roomId,metricsTrigger:void 0})};let S=C.a.createElement(pe.a,{room:a,width:32,height:32}),w=C.a.createElement("div",{className:"mx_VoiceBroadcastHeader_room_wrapper"},C.a.createElement("div",{className:"mx_VoiceBroadcastHeader_room"},a.name),c&&"title"===u&&C.a.createElement(_e.a,{w:12,h:12}));return t&&(S=C.a.createElement(te.a,{onClick:E},S),w=C.a.createElement(te.a,{onClick:E},w)),C.a.createElement("div",{className:"mx_VoiceBroadcastHeader"},S,C.a.createElement("div",{className:"mx_VoiceBroadcastHeader_content"},w,v,f,p,_,"middle"===r&&m),"right"===r&&m,g)};var Ee;function Se(){return Se=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Se.apply(this,arguments)}function we(e){return T.createElement("svg",Se({fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 13 16",role:"presentation","aria-hidden":!0},e),Ee||(Ee=T.createElement("path",{d:"M0 14.21V1.79A1 1 0 011.524.938l10.092 6.21a1 1 0 010 1.704l-10.092 6.21A1 1 0 010 14.21z",fill:"currentColor"})))}var Te;function Ce(){return Ce=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ce.apply(this,arguments)}function xe(e){return T.createElement("svg",Ce({fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 12",role:"presentation","aria-hidden":!0},e),Te||(Te=T.createElement("path",{d:"M0 1a1 1 0 011-1h1a1 1 0 011 1v10a1 1 0 01-1 1H1a1 1 0 01-1-1V1zM7 1a1 1 0 011-1h1a1 1 0 011 1v10a1 1 0 01-1 1H8a1 1 0 01-1-1V1z",fill:"currentColor"})))}const Fe=e=>{let t,n,{onClick:r,state:i}=e,o="";switch(i){case E.Stopped:t=we,o="mx_VoiceBroadcastControl-play",n=Object(y.a)("play voice broadcast");break;case E.Paused:t=we,o="mx_VoiceBroadcastControl-play",n=Object(y.a)("resume voice broadcast");break;case E.Buffering:case E.Playing:t=xe,n=Object(y.a)("pause voice broadcast")}return C.a.createElement(ne,{className:o,label:n,icon:t,onClick:r})},De=()=>C.a.createElement("div",{className:"mx_VoiceBroadcastRecordingConnectionError"},C.a.createElement(oe,{className:"mx_Icon mx_Icon_16"}),Object(y.a)("Connection error - Recording paused")),ke=()=>C.a.createElement("div",{className:"mx_RoomTile_subtitle mx_RoomTile_subtitle--voice-broadcast"},C.a.createElement(J.a,{className:"mx_Icon mx_Icon_16"}),Object(y.a)("Live"));var Oe=n(135),Ie=n(145);const Ae=e=>{let{onFinished:t}=e;return C.a.createElement(Oe.a,{title:Object(y.a)("Listen to live broadcast?"),hasCancel:!0,onFinished:t},C.a.createElement("p",null,Object(y.a)("If you start listening to this live broadcast, your current live broadcast recording will be ended.")),C.a.createElement(Ie.a,{onPrimaryButtonClick:()=>t(!0),primaryButton:Object(y.a)("Yes, end my recording"),cancelButton:Object(y.a)("No"),onCancel:()=>t(!1)}))},Re=async()=>{const{promise:e,resolve:t}=Object(u.m)();return D.b.createDialog(Ae,{onFinished:t}),e};var Ne=n(141);const Me=e=>{const t=W.a.get().getRoom(e.infoEvent.getRoomId());if(!t)throw new Error(`Voice Broadcast room not found (event ${e.infoEvent.getId()})`);const n=Object(Ne.d)(e,S.StateChanged,(t=>null!=t?t:e.getState()));return{times:Object(Ne.d)(e,S.TimesChanged,(t=>null!=t?t:{duration:e.durationSeconds,position:e.timeSeconds,timeLeft:e.timeLeftSeconds})),liveness:Object(Ne.d)(e,S.LivenessChanged,(t=>null!=t?t:e.getLiveness())),playbackState:n,room:t,sender:e.infoEvent.sender,toggle:()=>{e.toggle()}}};var Pe,Le;function Be(){return Be=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Be.apply(this,arguments)}function Ue(e){return T.createElement("svg",Be({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 19.977 22.975",role:"presentation","aria-hidden":!0},e),Pe||(Pe=T.createElement("path",{fill:"currentColor",d:"M9.976 22.975c-2.648 0-4.922-.88-6.82-2.64C1.258 18.577.206 16.4.003 13.808a.728.728 0 01.208-.583.786.786 0 01.598-.25c.222 0 .412.078.57.236.157.157.254.356.29.597.205 2.13 1.093 3.913 2.668 5.348 1.574 1.435 3.454 2.153 5.64 2.153 2.314 0 4.282-.81 5.903-2.43 1.62-1.621 2.43-3.59 2.43-5.904 0-2.315-.786-4.283-2.36-5.904-1.575-1.62-3.52-2.43-5.835-2.43h-.611l1.445 1.444a.8.8 0 01.25.583.8.8 0 01-.25.584.8.8 0 01-.584.25.8.8 0 01-.583-.25L6.865 4.334a.846.846 0 01-.195-.278.816.816 0 01-.055-.306c0-.11.018-.213.055-.305a.846.846 0 01.195-.278L9.81.222A.754.754 0 0110.365 0a.85.85 0 01.584.222.85.85 0 01.222.584.754.754 0 01-.222.555L9.337 2.973h.64c1.388 0 2.69.259 3.903.777a10.021 10.021 0 013.18 2.14 10.02 10.02 0 012.14 3.18 9.824 9.824 0 01.777 3.904c0 1.389-.259 2.69-.777 3.903a10.02 10.02 0 01-2.14 3.18 10.02 10.02 0 01-3.18 2.14 9.824 9.824 0 01-3.904.778z"})),Le||(Le=T.createElement("path",{fill:"currentColor",d:"M7.017 16.914c-.46 0-.87-.078-1.227-.236a2.052 2.052 0 01-.844-.658 1.707 1.707 0 01-.33-.975h1.202a.8.8 0 00.176.463c.107.13.248.231.425.304.177.072.375.108.595.108.234 0 .442-.04.623-.12.181-.084.323-.2.425-.346a.85.85 0 00.15-.508.882.882 0 00-.153-.524 1.026 1.026 0 00-.454-.355 1.775 1.775 0 00-.71-.128h-.578v-.914h.579c.227 0 .427-.04.597-.118a.967.967 0 00.406-.333.856.856 0 00.144-.502.872.872 0 00-.125-.482.841.841 0 00-.354-.323 1.166 1.166 0 00-.534-.115c-.2 0-.386.036-.556.109a1.01 1.01 0 00-.413.31.786.786 0 00-.166.473h-1.14a1.66 1.66 0 01.316-.965 2.04 2.04 0 01.818-.652c.34-.158.723-.237 1.147-.237.437 0 .816.082 1.138.246.324.162.574.38.751.655.177.275.265.579.265.911.002.369-.106.678-.326.927a1.53 1.53 0 01-.856.489v.051c.46.064.813.235 1.058.511.247.275.37.617.367 1.026 0 .367-.104.695-.313.985a2.076 2.076 0 01-.857.677 2.991 2.991 0 01-1.246.246zm5.498.036c-.526 0-.978-.134-1.355-.4-.375-.268-.664-.655-.866-1.16-.2-.507-.3-1.118-.3-1.831.002-.714.103-1.321.303-1.822.202-.503.491-.886.866-1.15.377-.265.828-.397 1.352-.397.524 0 .975.132 1.352.396.377.265.666.648.866 1.15.203.504.304 1.111.304 1.823 0 .716-.101 1.327-.304 1.834-.2.505-.489.89-.866 1.157-.375.266-.826.4-1.352.4zm0-1c.41 0 .732-.202.968-.605.24-.405.358-1 .358-1.786 0-.52-.054-.957-.163-1.31-.108-.354-.262-.62-.46-.8a1.008 1.008 0 00-.703-.271c-.407 0-.729.202-.965.607-.237.403-.356.994-.358 1.774-.002.522.05.96.157 1.316.108.356.262.625.46.806.198.179.433.268.706.268z"})))}var je,Ge;function ze(){return ze=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ze.apply(this,arguments)}function He(e){return T.createElement("svg",ze({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 19.977 22.975",role:"presentation","aria-hidden":!0},e),je||(je=T.createElement("path",{fill:"currentColor",d:"M10.001 22.975c2.649 0 4.922-.88 6.82-2.64 1.899-1.759 2.95-3.935 3.153-6.528a.728.728 0 00-.208-.583.786.786 0 00-.597-.25.776.776 0 00-.57.236 1.044 1.044 0 00-.291.597c-.204 2.13-1.093 3.913-2.667 5.348-1.575 1.435-3.454 2.153-5.64 2.153-2.315 0-4.283-.81-5.903-2.43-1.62-1.621-2.431-3.59-2.431-5.904 0-2.315.787-4.283 2.361-5.904 1.574-1.62 3.52-2.43 5.834-2.43h.611L9.03 6.083a.8.8 0 00-.25.583.8.8 0 00.25.584.8.8 0 00.583.25.8.8 0 00.584-.25l2.917-2.917a.846.846 0 00.194-.278.817.817 0 00.056-.306.817.817 0 00-.056-.305.846.846 0 00-.194-.278L10.168.222A.754.754 0 009.612 0a.85.85 0 00-.583.222.85.85 0 00-.222.584c0 .222.074.407.222.555l1.611 1.612h-.639c-1.389 0-2.69.259-3.903.777a10.021 10.021 0 00-3.181 2.14 10.022 10.022 0 00-2.14 3.18A9.824 9.824 0 000 12.974c0 1.389.26 2.69.778 3.903a10.021 10.021 0 002.139 3.18 10.02 10.02 0 003.18 2.14 9.824 9.824 0 003.904.778z"})),Ge||(Ge=T.createElement("path",{fill:"currentColor",d:"M7.017 16.914c-.46 0-.87-.078-1.227-.236a2.052 2.052 0 01-.844-.658 1.707 1.707 0 01-.33-.975h1.202a.8.8 0 00.176.463c.107.13.248.231.425.304.177.072.375.108.595.108.234 0 .442-.04.623-.12.181-.084.323-.2.425-.346a.85.85 0 00.15-.508.882.882 0 00-.153-.524 1.026 1.026 0 00-.454-.355 1.775 1.775 0 00-.71-.128h-.578v-.914h.578c.228 0 .428-.04.598-.118a.967.967 0 00.406-.333.856.856 0 00.144-.502.872.872 0 00-.125-.482.841.841 0 00-.355-.323 1.166 1.166 0 00-.533-.115c-.2 0-.386.036-.556.109a1.01 1.01 0 00-.413.31.786.786 0 00-.166.473h-1.14a1.66 1.66 0 01.315-.965 2.04 2.04 0 01.819-.652c.34-.158.723-.237 1.147-.237.437 0 .816.082 1.138.246.324.162.574.38.75.655.178.275.266.579.266.911.002.369-.106.678-.326.927a1.53 1.53 0 01-.856.489v.051c.46.064.812.235 1.057.511.248.275.37.617.368 1.026 0 .367-.104.695-.313.985a2.076 2.076 0 01-.857.677 2.991 2.991 0 01-1.246.246zm5.498.036c-.526 0-.978-.134-1.355-.4-.375-.268-.664-.655-.866-1.16-.2-.507-.3-1.118-.3-1.831.001-.714.103-1.321.303-1.822.202-.503.491-.886.866-1.15.377-.265.828-.397 1.352-.397.524 0 .975.132 1.352.396.377.265.666.648.866 1.15.202.504.304 1.111.304 1.823 0 .716-.102 1.327-.304 1.834-.2.505-.489.89-.866 1.157-.375.266-.826.4-1.352.4zm0-1c.409 0 .732-.202.968-.605.239-.405.358-1 .358-1.786 0-.52-.054-.957-.163-1.31-.108-.354-.262-.62-.46-.8a1.008 1.008 0 00-.703-.271c-.407 0-.729.202-.965.607-.237.403-.356.994-.358 1.774-.002.522.05.96.156 1.316.109.356.262.625.46.806.199.179.434.268.707.268z"})))}var qe=n(596);const Ve=e=>{let{onClick:t,icon:n,label:r}=e;return C.a.createElement(te.a,{kind:"secondary_content",onClick:t,"aria-label":r},C.a.createElement(n,{className:"mx_Icon mx_Icon_24"}))},$e=e=>{let{pip:t=!1,playback:n}=e;const{times:r,liveness:i,playbackState:o,room:a,sender:s,toggle:l}=Me(n);let c=null,u=null;if(o!==E.Stopped){const e=()=>{n.skipTo(Math.max(0,r.position-30))};c=C.a.createElement(Ve,{icon:Ue,label:Object(y.a)("30s backward"),onClick:e});const t=()=>{n.skipTo(Math.min(r.duration,r.position+30))};u=C.a.createElement(Ve,{icon:He,label:Object(y.a)("30s forward"),onClick:t})}const d=Z()({mx_VoiceBroadcastBody:!0,"mx_VoiceBroadcastBody--pip":t}),h=o===E.Error?C.a.createElement(ae,{message:n.errorMessage}):C.a.createElement(C.a.Fragment,null,C.a.createElement("div",{className:"mx_VoiceBroadcastBody_controls"},c,C.a.createElement(Fe,{state:o,onClick:l}),u),C.a.createElement(qe.a,{playback:n}),C.a.createElement("div",{className:"mx_VoiceBroadcastBody_timerow"},C.a.createElement(ge.a,{seconds:r.position}),C.a.createElement(ge.a,{seconds:-r.timeLeft})));return C.a.createElement("div",{className:d},C.a.createElement(ye,{linkToRoom:t,live:i,microphoneLabel:null==s?void 0:s.name,room:a,showBroadcast:o!==E.Buffering,showBuffering:o===E.Buffering}),h)},Ke=e=>{let{playback:t}=e;const{liveness:n,playbackState:r,room:i,sender:o,toggle:a}=Me(t);return C.a.createElement("div",{className:"mx_VoiceBroadcastBody mx_VoiceBroadcastBody--pip mx_VoiceBroadcastBody--small"},C.a.createElement(ye,{linkToRoom:!0,live:n,liveBadgePosition:"middle",microphoneLabel:null==o?void 0:o.name,room:i,showBuffering:r===E.Buffering,bufferingPosition:"title"}),C.a.createElement(Fe,{state:r,onClick:a}),C.a.createElement(te.a,{onClick:()=>t.stop()},C.a.createElement(me.a,{className:"mx_Icon mx_Icon_8 mx_VoiceBroadcastBody__small-close"})))};var We=n(245),Ye=n(817);function Qe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qe(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Ze=e=>{var t;const n=Object(T.useRef)(!0),[r,i]=Object(T.useState)({devices:[],device:null});n.current&&(n.current=!1,Object(Ye.a)(!1).then((e=>{We.c.getDevices().then((t=>{let{audioinput:n}=t;We.c.getDefaultDevice(n);const o=We.c.getAudioInput(),a=n.find((e=>e.deviceId===o))||n[0];i(Xe(Xe({},r),{},{devices:n,device:a})),null==e||e.getTracks().forEach((e=>e.stop()))}))})));return{currentDevice:r.device,currentDeviceLabel:(null===(t=r.device)||void 0===t?void 0:t.label)||Object(y.a)("Default Device"),devices:r.devices,setDevice:t=>{var n;const o=t.deviceId!==(null===(n=r.device)||void 0===n?void 0:n.deviceId);We.c.instance.setDevice(t.deviceId,We.b.AudioInput),i(Xe(Xe({},r),{},{device:t})),o&&(null==e||e(t))}}};var Je=n(130),et=n.n(Je),tt=n(150),nt=n(176);const rt=e=>{let{containerRef:t,currentDevice:n,devices:r,onDeviceSelect:i}=e;const o=r.map((e=>C.a.createElement(nt.d,{key:e.deviceId,active:e.deviceId===(null==n?void 0:n.deviceId),onClick:()=>i(e),label:e.label})));return C.a.createElement(nt.e,et()({mountAsChild:!1,onFinished:()=>{}},Object(tt.o)(t.current.getBoundingClientRect(),0)),C.a.createElement(nt.c,null,o))};function it(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ot(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?it(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):it(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const at=e=>{let{voiceBroadcastPreRecording:t}=e;const n=Object(T.useRef)(null),{currentDevice:r,currentDeviceLabel:i,devices:o,setDevice:a}=Ze(),[s,l]=Object(T.useState)({showDeviceSelect:!1,disableStartButton:!1});return C.a.createElement("div",{className:"mx_VoiceBroadcastBody mx_VoiceBroadcastBody--pip",ref:n},C.a.createElement(ye,{linkToRoom:!0,onCloseClick:t.cancel,onMicrophoneLineClick:()=>l(ot(ot({},s),{},{showDeviceSelect:!0})),room:t.room,microphoneLabel:i,showClose:!0}),C.a.createElement(te.a,{className:"mx_VoiceBroadcastBody_blockButton",kind:"danger",onClick:()=>{l((e=>ot(ot({},e),{},{disableStartButton:!0}))),t.start()},disabled:s.disableStartButton},C.a.createElement(J.a,{className:"mx_Icon mx_Icon_16"}),Object(y.a)("Go live")),s.showDeviceSelect&&C.a.createElement(rt,{containerRef:n,currentDevice:r,devices:o,onDeviceSelect:e=>{l((e=>ot(ot({},e),{},{showDeviceSelect:!1}))),a(e)}}))},st=e=>{let{recording:t}=e;const{live:n,room:r,sender:i,recordingState:o}=ct(t);return C.a.createElement("div",{className:"mx_VoiceBroadcastBody"},C.a.createElement(ye,{live:n?"live":"grey",microphoneLabel:null==i?void 0:i.name,room:r}),"connection_error"===o&&C.a.createElement(De,null))};var lt=n(155);const ct=e=>{const t=W.a.get(),n=e.infoEvent.getRoomId(),i=t.getRoom(n);if(!i)throw new Error("Unable to find voice broadcast room with Id: "+n);const o=Object(Ne.d)(e,L.StateChanged,(t=>null!=t?t:e.getState())),a=Object(Ne.d)(e,L.TimeLeftChanged,(t=>null!=t?t:e.getTimeLeft()));return{live:[r.c.Started,r.c.Resumed].includes(o),timeLeft:a,recordingState:o,room:i,sender:e.infoEvent.sender,stopRecording:async()=>{await(async()=>{const{finished:e}=D.b.createDialog(lt.a,{title:Object(y.a)("Stop live broadcasting?"),description:C.a.createElement("p",null,Object(y.a)("Are you sure you want to stop your live broadcast? This will end the broadcast and the full recording will be available in the room.")),button:Object(y.a)("Yes, stop broadcast")}),[t]=await e;return t})()&&await e.stop()},toggleRecording:e.toggle}};var ut;function dt(){return dt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dt.apply(this,arguments)}function ht(e){return T.createElement("svg",dt({fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 13 16",role:"presentation","aria-hidden":!0},e),ut||(ut=T.createElement("rect",{x:.974,y:2,width:12,height:12,rx:1,fill:"currentColor"})))}var pt;function mt(){return mt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mt.apply(this,arguments)}function gt(e){return T.createElement("svg",mt({fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10",role:"presentation","aria-hidden":!0},e),pt||(pt=T.createElement("circle",{cx:5,cy:5,r:5,fill:"#FF5B55"})))}const ft=e=>{let{recording:t}=e;const n=Object(T.useRef)(null),{live:i,timeLeft:o,recordingState:a,room:s,stopRecording:l,toggleRecording:c}=ct(t),{currentDevice:u,devices:d,setDevice:h}=Ze(),[p,m]=Object(T.useState)(!1),g=a===r.c.Paused?C.a.createElement(ne,{className:"mx_VoiceBroadcastControl-recording",onClick:c,icon:gt,label:Object(y.a)("resume voice broadcast")}):C.a.createElement(ne,{onClick:c,icon:xe,label:Object(y.a)("pause voice broadcast")}),f="connection_error"===a?C.a.createElement(De,null):C.a.createElement("div",{className:"mx_VoiceBroadcastBody_controls"},g,C.a.createElement(ve.a,{onClick:()=>m(!0),title:Object(y.a)("Change input device")},C.a.createElement(ce,{className:"mx_Icon mx_Icon_16 mx_Icon_alert"})),C.a.createElement(ne,{icon:ht,label:"Stop Recording",onClick:l}));return C.a.createElement("div",{className:"mx_VoiceBroadcastBody mx_VoiceBroadcastBody--pip",ref:n},C.a.createElement(ye,{linkToRoom:!0,live:i?"live":"grey",room:s,timeLeft:o}),C.a.createElement("hr",{className:"mx_VoiceBroadcastBody_divider"}),f,p&&C.a.createElement(rt,{containerRef:n,currentDevice:u,devices:d,onDeviceSelect:async e=>{m(!1),(null==u?void 0:u.deviceId)!==e.deviceId&&(h(e),[r.c.Paused,r.c.Stopped].includes(a)||(await t.pause(),await t.resume()))}}))},_t=e=>({currentVoiceBroadcastPreRecording:Object(Ne.d)(e,"changed",(t=>null!=t?t:e.getCurrent()))}),bt=e=>({currentVoiceBroadcastRecording:Object(Ne.d)(e,wt.CurrentChanged,(t=>null!=t?t:e.getCurrent()))}),vt=async(e,t,n)=>{let i=!1,o=!1,a=null;const s=t.currentState.getStateEvents(r.b);return await Object(G.l)(s,(async t=>{var s;const l=null===(s=t.getContent())||void 0===s?void 0:s.state;if(l&&l!==r.c.Stopped){const r=await Nt(t,e);if(null!=r&&r.isRedacted())return!0;if(i=!0,a=r,t.getStateKey()===n)return o=!0,!1}return!0})),{hasBroadcast:i,infoEvent:a,startedByUser:o}},yt=e=>{const t=Object(T.useContext)(Y.a),[n,r]=Object(T.useState)(!1),i=Object(T.useMemo)((()=>t.client?()=>{vt(t.client,e).then((e=>{let{hasBroadcast:t}=e;r(t)}),(()=>{}))}:()=>{}),[e,t,r]);return Object(T.useEffect)((()=>{i()}),[i]),Object(Ne.c)(e.currentState,a.RoomStateEvent.Update,(()=>i())),n};var Et=n(597);class St extends s.b{constructor(){super(...arguments),o()(this,"current",null),o()(this,"onCancel",(e=>{this.current===e&&this.clearCurrent()}))}setCurrent(e){this.current!==e&&(this.current&&this.current.off("dismiss",this.onCancel),this.current=e,e.on("dismiss",this.onCancel),this.emit("changed",e))}clearCurrent(){null!==this.current&&(this.current.off("dismiss",this.onCancel),this.current=null,this.emit("changed",null))}getCurrent(){return this.current}destroy(){this.removeAllListeners(),this.current&&this.current.off("dismiss",this.onCancel)}}let wt;!function(e){e.CurrentChanged="current_changed"}(wt||(wt={}));class Tt extends s.b{constructor(){super(),o()(this,"current",null),o()(this,"recordings",new Map),o()(this,"onCurrentStateChanged",(e=>{e===r.c.Stopped&&this.clearCurrent()}))}setCurrent(e){if(this.current===e)return;const t=e.infoEvent.getId();if(!t)throw new Error("Got broadcast info event without Id");this.current&&this.current.off(L.StateChanged,this.onCurrentStateChanged),this.current=e,this.current.on(L.StateChanged,this.onCurrentStateChanged),this.recordings.set(t,e),this.emit(wt.CurrentChanged,e)}getCurrent(){return this.current}hasCurrent(){return null!==this.current}clearCurrent(){this.current&&(this.current.off(L.StateChanged,this.onCurrentStateChanged),this.current=null,this.emit(wt.CurrentChanged,null))}getByInfoEvent(e,t){const n=e.getId();if(!n)throw new Error("Got broadcast info event without Id");const r=this.recordings.get(n)||new B(e,t);return this.recordings.set(n,r),r}}const Ct=async e=>{var t,n,r;null===(t=e.voiceBroadcastPlaybacksStore.getCurrent())||void 0===t||t.stop(),e.voiceBroadcastPlaybacksStore.clearCurrent(),await(null===(n=e.voiceBroadcastRecordingsStore.getCurrent())||void 0===n?void 0:n.stop()),e.voiceBroadcastRecordingsStore.clearCurrent(),null===(r=e.voiceBroadcastPreRecordingStore.getCurrent())||void 0===r||r.cancel(),e.voiceBroadcastPreRecordingStore.clearCurrent()},xt=e=>{var t;null===(t=e.getCurrent())||void 0===t||t.getState(),E.Stopped},Ft=async(e,t,n,r)=>{if(r.hasCurrent())return;const i=n.getCurrent();if(i&&i.getState()!==E.Stopped)return;const{infoEvent:o}=await vt(t,e);if(o){const e=n.getByInfoEvent(o,t);n.setCurrent(e)}else n.clearCurrent()};var Dt=n(131),kt=n(313),Ot=n(125);const It=()=>{var e,t;return Ot.b.getValue(kt.a.VoiceBroadcastForceSmallChunks)?15:(null===(e=Dt.b.get("voice_broadcast"))||void 0===e?void 0:e.chunk_length)||(null===(t=Dt.a.voice_broadcast)||void 0===t?void 0:t.chunk_length)||120},At=()=>{var e,t;return(null===(e=Dt.b.get("voice_broadcast"))||void 0===e?void 0:e.max_length)||(null===(t=Dt.a.voice_broadcast)||void 0===t?void 0:t.max_length)||14400},Rt=(e,t)=>{var n,i;const o=e.getRelation();return(null==o?void 0:o.rel_type)===a.RelationType.Reference&&!!o.event_id&&(null===(n=t.getRoom(e.getRoomId()))||void 0===n||null===(i=n.findEventById(o.event_id))||void 0===i?void 0:i.getType())===r.b};n(559);const Nt=async(e,t)=>{var n,i,o;if((null===(n=e.getContent())||void 0===n?void 0:n.state)===r.c.Started)return e;const s=null===(i=e.getRelation())||void 0===i?void 0:i.event_id;if(!s)return null;const l=e.getRoomId()||"",c=null===(o=t.getRoom(l))||void 0===o?void 0:o.findEventById(s);if(c)return c;try{const e=await t.fetchRoomEvent(l,s);return new a.MatrixEvent(e)}catch(e){}return null},Mt=(e,t,n)=>{var i;const o=t.getUserId();return!!o&&o===n.getSender()&&t.getDeviceId()===(null===(i=n.getContent())||void 0===i?void 0:i.device_id)&&e!==r.c.Stopped};n(598);const Pt=e=>{var t;return e.getType()===r.b&&(null===(t=e.getContent())||void 0===t?void 0:t.state)===r.c.Stopped&&!e.isRedacted()};var Lt=n(180),Bt=n(465);const Ut=e=>()=>{var t,n;const r=null===(t=W.a.get())||void 0===t?void 0:t.getUserId(),i=null===(n=e.getRelation())||void 0===n?void 0:n.event_id,o=e.getRoomId(),a={a:e=>i&&o?C.a.createElement(te.a,{kind:"link_inline",onClick:()=>Object(Lt.j)(o,i)},e):e};return r&&r===e.getSender()?Object(y.a)("You ended a <a>voice broadcast</a>",{},a):Object(y.a)("%(senderName)s ended a <a>voice broadcast</a>",{senderName:Object(Bt.a)(e)},a)};n(599);class jt{constructor(e){this.client=e,o()(this,"onClientSync",(()=>{this.client.getSyncState()===x.b.Syncing&&(this.client.off(a.ClientEvent.Sync,this.onClientSync),this.resume())})),e.isInitialSyncComplete()?this.resume():e.on(a.ClientEvent.Sync,this.onClientSync)}resume(){const e=this.client.getUserId(),t=this.client.getDeviceId();e&&t&&this.client.getRooms().forEach((n=>{const i=((e,t,n)=>{const i=e.currentState.getStateEvents(r.b,t);if(!i)return null;const o=i.getContent()||{};return o.state===r.c.Stopped?null:o.device_id===n?i:null})(n,e,t);if(i)return this.sendStopVoiceBroadcastStateEvent(i),!1}))}sendStopVoiceBroadcastStateEvent(e){var t,n,i;const o=this.client.getUserId(),s=this.client.getDeviceId(),l=e.getRoomId();if(!o||!s||!l)return;const c={device_id:s,state:r.c.Stopped},u=(null===(t=e.getContent())||void 0===t?void 0:t.state)===r.c.Started?e.getId():null===(n=e.getContent())||void 0===n||null===(i=n["m.relates_to"])||void 0===i?void 0:i.event_id;u&&(c["m.relates_to"]={rel_type:a.RelationType.Reference,event_id:u}),this.client.sendStateEvent(l,r.b,c,o)}destroy(){this.client.off(a.ClientEvent.Sync,this.onClientSync)}}},function(e,t,n){"use strict";(function(e){n.d(t,"g",(function(){return p}));var r=n(13),i=n.n(r),o=n(959),a=n(507),s=n(16),l=n(961),c=n(411),u=n(356),d=n(412),h=n(506);n.d(t,"d",(function(){return h.a})),n.d(t,"a",(function(){return a.a})),n.d(t,"e",(function(){return a.b})),n.d(t,"h",(function(){return a.c})),n.d(t,"b",(function(){return u.a})),n.d(t,"c",(function(){return u.b})),n.d(t,"f",(function(){return u.c})),n.d(t,"i",(function(){return c.a})),n.d(t,"j",(function(){return d.a})),n.d(t,"k",(function(){return d.b})),n.d(t,"l",(function(){return d.c})),n.d(t,"m",(function(){return d.d}));class p extends o.a{constructor(){super(...arguments),i()(this,"uploads",[])}uploadContent(t){var n,r,i,o,h;let p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const m=null===(n=p.includeFilename)||void 0===n||n,g=null!==(r=p.abortController)&&void 0!==r?r:new AbortController,f=null!==(i=null!==(o=p.type)&&void 0!==o?o:t.type)&&void 0!==i?i:"application/octet-stream",_=null!==(h=p.name)&&void 0!==h?h:t.name,b={loaded:0,total:0,abortController:g},v=s.m();if(e.XMLHttpRequest){const n=new e.XMLHttpRequest,r=function(){n.abort(),v.reject(new Error("Timeout"))};let i=l.b(r,3e4);n.onreadystatechange=function(){if(n.readyState===e.XMLHttpRequest.DONE){l.a(i);try{if(0===n.status)throw new DOMException(n.statusText,"AbortError");if(!n.responseText)throw new Error("No response body.");n.status>=400?v.reject(Object(d.b)(n,n.responseText)):v.resolve(JSON.parse(n.responseText))}catch(e){if("AbortError"===e.name)return void v.reject(e);v.reject(new u.a("request failed",e))}}},n.upload.onprogress=e=>{var t;l.a(i),b.loaded=e.loaded,b.total=e.total,i=l.b(r,3e4),null===(t=p.progressHandler)||void 0===t||t.call(p,{loaded:e.loaded,total:e.total})};const o=this.getUrl("/upload",void 0,a.c.R0);m&&_&&o.searchParams.set("filename",encodeURIComponent(_)),!this.opts.useAuthorizationHeader&&this.opts.accessToken&&o.searchParams.set("access_token",encodeURIComponent(this.opts.accessToken)),n.open(c.a.Post,o.href),this.opts.useAuthorizationHeader&&this.opts.accessToken&&n.setRequestHeader("Authorization","Bearer "+this.opts.accessToken),n.setRequestHeader("Content-Type",f),n.send(t),g.signal.addEventListener("abort",(()=>{n.abort()}))}else{const e={};m&&_&&(e.filename=_);const n={"Content-Type":f};this.authedRequest(c.a.Post,"/upload",e,t,{prefix:a.c.R0,headers:n,abortSignal:g.signal}).then((e=>this.opts.onlyData?e:e.json())).then(v.resolve,v.reject)}return b.promise=v.promise.finally((()=>{s.I(this.uploads,(e=>e===b))})),g.signal.addEventListener("abort",(()=>{s.I(this.uploads,(e=>e===b)),v.reject(new DOMException("Aborted","AbortError"))})),this.uploads.push(b),b.promise}cancelUpload(e){const t=this.uploads.find((t=>t.promise===e));return!!t&&(t.abortController.abort(),!0)}getCurrentUploads(){return this.uploads}getContentUri(){return{base:this.opts.baseUrl,path:a.c.R0+"/upload",params:{access_token:this.opts.accessToken}}}}}).call(this,n(14))},function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return r})),function(e){e.IRC="irc",e.Group="group",e.Bubble="bubble"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return l}));var r=n(13),i=n.n(r),o=n(17),a=n.n(o);let s;!function(e){e.Resize="resize"}(s||(s={}));class l extends a.a{constructor(){super(),i()(this,"resizeObserver",void 0),i()(this,"uiElementDimensions",new Map),i()(this,"trackedUiElements",new Map),i()(this,"windowWidth",void 0),i()(this,"windowHeight",void 0),i()(this,"resizeObserverCallback",(e=>{const t=e.find((e=>e.target===document.body));t&&(this.windowWidth=t.contentRect.width,this.windowHeight=t.contentRect.height),e.forEach((e=>{const t=this.trackedUiElements.get(e.target);t&&(this.uiElementDimensions.set(t,e.contentRect),this.emit(t,s.Resize,e))})),this.emit(s.Resize,e)})),this.windowWidth=window.innerWidth,this.windowHeight=window.innerHeight,this.resizeObserver=new ResizeObserver(this.resizeObserverCallback),this.resizeObserver.observe(document.body)}static get instance(){return l._instance||(l._instance=new l),l._instance}static destroy(){l._instance&&(l._instance.resizeObserver.disconnect(),l._instance.removeAllListeners(),l._instance=null)}getElementDimensions(e){return this.uiElementDimensions.get(e)}trackElementDimensions(e,t){this.trackedUiElements.set(t,e),this.resizeObserver.observe(t)}stopTrackingElementDimensions(e){let t;this.trackedUiElements.forEach(((n,r)=>{n===e&&(t=r)})),t&&(this.resizeObserver.unobserve(t),this.uiElementDimensions.delete(e),this.trackedUiElements.delete(t))}isTrackingElementDimensions(e){return this.uiElementDimensions.has(e)}}i()(l,"_instance",null),window.mxUIStore=l.instance},function(e,t,n){"use strict";n.d(t,"b",(function(){return N})),n.d(t,"k",(function(){return L})),n.d(t,"i",(function(){return B})),n.d(t,"e",(function(){return U})),n.d(t,"f",(function(){return j})),n.d(t,"c",(function(){return Q})),n.d(t,"j",(function(){return X})),n.d(t,"a",(function(){return Z})),n.d(t,"h",(function(){return J})),n.d(t,"g",(function(){return ee})),n.d(t,"d",(function(){return te}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(439),l=n.n(s),c=n(700),u=n.n(c),d=n(126),h=n.n(d),p=n(548),m=n.n(p),g=n(149),f=n(1096),_=n.n(f),b=n(549),v=n(1097),y=n.n(v),E=n(368),S=n(125),w=n(168),T=n(373),C=n(166),x=n(227);function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const k=/([\ud800-\udbff])([\udc00-\udfff])/,O=/([\u2100-\u2bff])/,I=/[\u200D\u200B\s]/g,A=new RegExp(`^(${m.a.source})+$`,"i"),R=/^#[0-9a-fA-F]{6}$/,N=["bitcoin","ftp","geo","http","https","im","irc","ircs","magnet","mailto","matrix","mms","news","nntp","openpgp4fpr","sip","sftp","sms","smsto","ssh","tel","urn","webcal","wtai","xmpp"],M=/\/_matrix\/media\/r0\/(?:download|thumbnail)\/(.+?)\/(.+?)(?:[?/]|$)/;function P(e){return k.test(e)||O.test(e)}function L(e){var t;const n=null===(t=Object(T.d)(e))||void 0===t?void 0:t.shortcodes;return null!=n&&n.length?`:${n[0]}:`:""}function B(e){const t=l()(e,z);return a.a.createElement("div",{dangerouslySetInnerHTML:{__html:t},dir:"auto"})}function U(e){return l()(e,{allowedTags:[],allowedAttributes:{},selfClosing:[],allowedSchemes:[],disallowedTagsMode:"discard"})}function j(e){try{return N.includes(new URL(e).protocol.slice(0,-1))}catch(e){return!1}}const G={a:function(e,t){if(t.href){t.target="_blank";(Object(w.l)(t.href)!==t.href||t.href.match(E.a))&&delete t.target}else delete t.href;return t.rel="noreferrer noopener",{tagName:e,attribs:t}},img:function(e,t){let n=t.src;if(!n||!S.b.getValue("showImages"))return{tagName:e,attribs:{}};if(!n.startsWith("mxc://")){const e=M.exec(n);e&&(n=`mxc://${e[1]}/${e[2]}`)}if(!n.startsWith("mxc://"))return{tagName:e,attribs:{}};const r=Number(t.width),i=Number(t.height),o=Math.min(r||800,800),a=Math.min(i||600,600);return t.style=`max-width: ${o}px; max-height: ${a}px;`,r&&(t.style+="width: 100%;"),i&&(t.style+="height: 100%;"),t.src=Object(C.b)(n).getThumbnailOfSourceHttp(o,a),{tagName:e,attribs:t}},code:function(e,t){if(void 0!==t.class){const e=t.class.split(/\s/).filter((function(e){return e.startsWith("language-")&&!e.startsWith("language-_")}));t.class=e.join(" ")}return{tagName:e,attribs:t}},"*":function(e,t){"img"!==e&&delete t.style;const n={"data-mx-color":"color","data-mx-bg-color":"background-color"};let r="";return Object.keys(n).forEach((e=>{const i=n[e],o=t[e];o&&"string"==typeof o&&R.test(o)&&(r+=i+":"+o+";",delete t[e])})),r&&(t.style=r+(t.style||"")),{tagName:e,attribs:t}}},z={allowedTags:["font","del","h1","h2","h3","h4","h5","h6","blockquote","p","a","ul","ol","sup","sub","nl","li","b","i","u","strong","em","strike","code","hr","br","div","table","thead","caption","tbody","tr","th","td","pre","span","img","details","summary"],allowedAttributes:{font:["color","data-mx-bg-color","data-mx-color","style"],span:["data-mx-maths","data-mx-bg-color","data-mx-color","data-mx-spoiler","style"],div:["data-mx-maths"],a:["href","name","target","rel"],img:["src","alt","title","style"],ol:["start"],code:["class"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:N,allowProtocolRelative:!1,transformTags:G,nestingLimit:50},H=D(D({},z),{},{transformTags:{code:G.code,"*":G["*"]}}),q=D(D({},z),{},{allowedTags:["font","del","a","sup","sub","b","i","u","strong","em","strike","br","div","span"]});class V{constructor(e,t){this.highlightClass=e,this.highlightLink=t}applyHighlights(e,t){let n,r=0,i=[];const o=t[0];for(;(n=e.toLowerCase().indexOf(o.toLowerCase(),r))>=0;){if(n>r){const o=e.substring(r,n);i=i.concat(this.applySubHighlights(o,t))}const a=n+o.length;i.push(this.processSnippet(e.substring(n,a),!0)),r=a}if(r!==e.length){const n=e.substring(r,void 0);i=i.concat(this.applySubHighlights(n,t))}return i}applySubHighlights(e,t){return t[1]?this.applyHighlights(e,t.slice(1)):[this.processSnippet(e,!1)]}}class $ extends V{processSnippet(e,t){if(!t)return e;let n=`<span class="${this.highlightClass}">${e}</span>`;return this.highlightLink&&(n=`<a href="${encodeURI(this.highlightLink)}">${n}</a>`),n}}const K=e=>`<span class='mx_Emoji' title='${L(e)}'>${e}</span>`,W=(e,t)=>a.a.createElement("span",{key:t,className:"mx_Emoji",title:L(e)},e);function Y(e,t){const n=t?K:W,r=[];let i="",o=0;for(const t of Object(g.split)(e,""))m.a.test(t)?(i&&(r.push(i),i=""),r.push(n(t,o)),o++):i+=t;return i&&r.push(i),r}function Q(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i="org.matrix.custom.html"===e.format&&"string"==typeof e.formatted_body;let o,s,c=!1,d=!1,p=z;r.forComposerQuote&&(p=H);try{const n=null==t?void 0:t.filter((e=>!e.includes("<"))).map((e=>l()(e,p)));let a="string"==typeof e.formatted_body?e.formatted_body:null;const h="string"==typeof e.body?e.body:"";r.stripReplyFallback&&a&&(a=Object(x.d)(a)),o=r.stripReplyFallback?Object(x.e)(h):h,c=P(i?a:h);const m=null!=n&&n.length?new $("mx_EventTile_searchHighlight",r.highlightLink):null;if(i){m&&(p.textFilter=function(e){return m.applyHighlights(e,n).join("")}),s=l()(a,p);const e=u.a.load(s,{_useHtmlParser2:!0,decodeEntities:!1});d=!(e.html()===e.root().text()),d&&S.b.getValue("feature_latex_maths")&&(e('div, span[data-mx-maths!=""]').replaceWith((function(t,n){return _.a.renderToString(Object(b.decode)(e(n).attr("data-mx-maths")),{throwOnError:!1,displayMode:"div"==n.name,output:"htmlAndMathml"})})),s=e.html()),c&&(s=Y(s,!0).join(""))}else m&&(s=m.applyHighlights(h,n).join(""))}finally{delete p.textFilter}const m=null!==(n=s)&&void 0!==n?n:o;if(r.returnString)return m;let g=!1;if(!r.disableBigEmoji&&c){var f;let t=void 0!==m?m.trim():"";t=t.replace(I,"");const n=A.exec(t);g=(null==n||null===(f=n[0])||void 0===f?void 0:f.length)===t.length&&(o===s||void 0===e.formatted_body||!e.formatted_body.includes("http:")&&!e.formatted_body.includes("https:"))}const v=h()({mx_EventTile_body:!0,mx_EventTile_bigEmoji:g,"markdown-body":d&&!g});let y;return!s&&c&&(y=Y(o,!1)),s?a.a.createElement("span",{key:"body",ref:r.ref,className:v,dangerouslySetInnerHTML:{__html:s},dir:"auto"}):a.a.createElement("span",{key:"body",ref:r.ref,className:v,dir:"auto"},y||o)}function X(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];S.b.getValue("feature_html_topic")||(t=void 0);let i,o=!!t,s=!1,c="";try{s=P(o?t:e),o&&(c=l()(t,r?z:q),s&&(c=Y(c,!0).join("")))}catch{o=!1}return!o&&s&&(i=Y(e,!1)),o?a.a.createElement("span",{ref:n,dangerouslySetInnerHTML:{__html:c},dir:"auto"}):a.a.createElement("span",{ref:n,dir:"auto"},i||e)}function Z(e){let{as:t,options:n,children:r}=e;return a.a.createElement(y.a,{as:t,options:Object(g.merge)({},E.e,n)},r)}function J(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:E.e;return Object(E.b)(e,t)}function ee(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:E.e;return l()(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:E.e;return Object(E.c)(e,t)}(e,t),z)}function te(e){switch(e.nodeName){case"H1":case"H2":case"H3":case"H4":case"H5":case"H6":case"PRE":case"BLOCKQUOTE":case"P":case"UL":case"OL":case"LI":case"HR":case"TABLE":case"THEAD":case"TBODY":case"TR":case"TH":case"TD":return!0;case"DIV":return!e.hasAttribute("data-mx-maths");default:return!1}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(121);let i;function o(e){switch(e){case i.None:return Object(r.a)("None");case i.Bold:return Object(r.a)("Bold");case i.Grey:return Object(r.a)("Grey");case i.Red:return Object(r.a)("Red");case i.Unsent:return Object(r.a)("Unsent");default:return Object(r.a)("unknown")}}!function(e){e[e.None=0]="None",e[e.Bold=1]="Bold",e[e.Grey=2]="Grey",e[e.Red=3]="Red",e[e.Unsent=4]="Unsent"}(i||(i={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(13),i=n.n(r),o=n(17),a=n.n(o);class s extends a.a{constructor(){super(...arguments),i()(this,"toasts",[]),i()(this,"countSeen",0)}static sharedInstance(){return window.mxToastStore||(window.mxToastStore=new s),window.mxToastStore}reset(){this.toasts=[],this.countSeen=0}addOrReplaceToast(e){const t=this.toasts.findIndex((t=>t.key===e.key));if(-1===t){let t=this.toasts.length;for(;t>0&&this.toasts[t-1].priority<e.priority;)--t;this.toasts.splice(t,0,e)}else this.toasts[t]=e;this.emit("update")}dismissToast(e){this.toasts[0]&&this.toasts[0].key===e&&this.countSeen++;const t=this.toasts.length;this.toasts=this.toasts.filter((t=>t.key!==e)),t!==this.toasts.length&&(0===this.toasts.length&&(this.countSeen=0),this.emit("update"))}getToasts(){return this.toasts}getCountSeen(){return this.countSeen}}},function(e,t,n){"use strict";n.r(t),function(e,r){n.d(t,"OLM_ALGORITHM",(function(){return p})),n.d(t,"MEGOLM_ALGORITHM",(function(){return m})),n.d(t,"MEGOLM_BACKUP_ALGORITHM",(function(){return g})),n.d(t,"encryptMessageForDevice",(function(){return f})),n.d(t,"getExistingOlmSessions",(function(){return _})),n.d(t,"ensureOlmSessionsForDevices",(function(){return b})),n.d(t,"verifySignature",(function(){return y})),n.d(t,"pkSign",(function(){return E})),n.d(t,"pkVerify",(function(){return S})),n.d(t,"isOlmEncrypted",(function(){return w})),n.d(t,"encodeBase64",(function(){return T})),n.d(t,"encodeUnpaddedBase64",(function(){return C})),n.d(t,"decodeBase64",(function(){return x}));var i,o=n(13),a=n.n(o),s=n(416),l=n.n(s),c=n(1),u=n(129),d=n(16);function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}!function(e){e.Olm="m.olm.v1.curve25519-aes-sha2",e.Megolm="m.megolm.v1.aes-sha2",e.MegolmBackup="m.megolm_backup.v1.curve25519-aes-sha2"}(i||(i={}));const p=i.Olm,m=i.Megolm,g=i.MegolmBackup;async function f(e,t,n,r,i,o,s){const l=o.getIdentityKey(),u=await r.getSessionIdForDevice(l);if(null===u)return void c.a.log(`[olmlib.encryptMessageForDevice] Unable to find Olm session for device ${i}:${o.deviceId}`);c.a.log(`[olmlib.encryptMessageForDevice] Using Olm session ${u} for device ${i}:${o.deviceId}`);const d=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({sender:t,sender_device:n,keys:{ed25519:r.deviceEd25519Key},recipient:i,recipient_keys:{ed25519:o.getFingerprint()}},s);e[l]=await r.encryptMessage(l,u,JSON.stringify(d))}async function _(e,t,n){const r=new d.b((()=>[])),i=new d.b((()=>new Map)),o=[];for(const[t,a]of Object.entries(n))for(const n of a){const a=n.deviceId,s=n.getIdentityKey();o.push((async()=>{const o=await e.getSessionIdForDevice(s,!0);null===o?r.getOrCreate(t).push(n):i.getOrCreate(t).set(a,{device:n,sessionId:o})})())}return await Promise.all(o),[r,i]}async function b(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4?arguments[4]:void 0,o=arguments.length>5?arguments[5]:void 0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:c.a;const s=[],l=new Map,u=new Map;for(const t of n.values())for(const n of t){const t=n.getIdentityKey();t!==e.deviceCurve25519Key&&(e.sessionsInProgress[t]||(e.sessionsInProgress[t]=new Promise((n=>{u.set(t,(r=>{delete e.sessionsInProgress[t],n(r)}))}))))}for(const[t,i]of n){const n=new Map;l.set(t,n);for(const o of i){const i=o.deviceId,l=o.getIdentityKey();if(l===e.deviceCurve25519Key){a.info("Attempted to start session with ourself! Ignoring"),n.set(i,{device:o,sessionId:null});continue}const c=`for ${l} (${t}:${i})`,d=await e.getSessionIdForDevice(l,!!u.get(l),a),h=u.get(l);null!==d&&h&&h(),(null===d||r)&&(r?a.info(`Forcing new Olm session ${c}`):a.info(`Making new Olm session ${c}`),s.push([t,i])),n.set(i,{device:o,sessionId:d})}}if(0===s.length)return l;const d="signed_curve25519";let h,p=`one-time keys for ${s.length} devices`;try{a.debug(`Claiming ${p}`),h=await t.claimOneTimeKeys(s,d,i),a.debug(`Claimed ${p}`)}catch(e){for(const e of u.values())e();throw a.log(`Failed to claim ${p}`,e,s),e}o&&"failures"in h&&o.push(...Object.keys(h.failures));const m=h.one_time_keys||{},g=[];for(const[t,i]of n){const n=m[t]||{};for(const o of i){var f,_;const i=o.deviceId,s=o.getIdentityKey();if(s===e.deviceCurve25519Key)continue;if(null!==(f=l.get(t))&&void 0!==f&&null!==(_=f.get(i))&&void 0!==_&&_.sessionId&&!r)continue;const c=n[i]||{};let h=null;for(const e in c)0===e.indexOf(d+":")&&(h=c[e]);var b;if(h)g.push(v(e,h,t,o).then((e=>{var n,r;null===(n=u.get(s))||void 0===n||n(null!=e?e:void 0);const o=null===(r=l.get(t))||void 0===r?void 0:r.get(i);o&&(o.sessionId=e)}),(e=>{var t;throw null===(t=u.get(s))||void 0===t||t(),e})));else a.warn(`No one-time keys (alg=${d}) for device ${t}:${i}`),null===(b=u.get(s))||void 0===b||b()}}return p=`Olm sessions for ${g.length} devices`,a.debug(`Starting ${p}`),await Promise.all(g),a.debug(`Started ${p}`),l}async function v(e,t,n,r){const i=r.deviceId;try{await y(e,t,n,i,r.getFingerprint())}catch(e){return c.a.error("Unable to verify signature on one-time key for device "+n+":"+i+":",e),null}let o;try{o=await e.createOutboundSession(r.getIdentityKey(),t.key)}catch(e){return c.a.error("Error starting olm session with device "+n+":"+i+": "+e),null}return c.a.log("Started new olm sessionid "+o+" for device "+n+":"+i),o}async function y(e,t,n,r,i){const o="ed25519:"+r,a=((t.signatures||{})[n]||{})[o];if(!a)throw Error("No signature");const s=Object.assign({},t);"unsigned"in s&&delete s.unsigned,delete s.signatures;const c=l.a.stringify(s);e.verifySignature(i,c,a)}function E(t,n,r,i){let o=!1;if(n instanceof Uint8Array){const t=new e.Olm.PkSigning;i=t.init_with_seed(n),n=t,o=!0}const a=t.signatures||{};delete t.signatures;const s=t.unsigned;t.unsigned&&delete t.unsigned;try{const e=a[r]||{};return a[r]=e,e["ed25519:"+i]=n.sign(l.a.stringify(t))}finally{t.signatures=a,s&&(t.unsigned=s),o&&n.free()}}function S(t,n,r){const i="ed25519:"+n;if(!(t.signatures&&t.signatures[r]&&t.signatures[r][i]))throw new Error("No signature");const o=t.signatures[r][i],a=new e.Olm.Utility,s=t.signatures;delete t.signatures;const c=t.unsigned;t.unsigned&&delete t.unsigned;try{a.ed25519_verify(n,l.a.stringify(t),o)}finally{t.signatures=s,c&&(t.unsigned=c),a.free()}}function w(e){return e.getSenderKey()?!(e.getWireType()!==u.b.RoomMessageEncrypted||!["m.olm.v1.curve25519-aes-sha2"].includes(e.getWireContent().algorithm))||(c.a.error("Event was not encrypted using an appropriate algorithm"),!1):(c.a.error("Event has no sender key (not encrypted?)"),!1)}function T(e){return r.from(e).toString("base64")}function C(e){return T(e).replace(/=+$/g,"")}function x(e){return r.from(e,"base64")}}.call(this,n(14),n(53).Buffer)},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(120),i=n.n(r),o=n(126),a=n.n(o);function s(e){let{description:t,hideDescriptionIfValid:n,deriveData:r,rules:o}=e;return async function(e){let{value:s,focused:l,allowEmpty:c=!0}=e;if(!s&&c)return{};const u={value:s,allowEmpty:c},d=await(null==r?void 0:r.call(this,u)),h=[];let p,m,g,f=!0;if(null!=o&&o.length)for(const e of o){var _;if(!e.key||!e.test)continue;if(!f&&e.final)continue;if(null!==(_=e.skip)&&void 0!==_&&_.call(this,u,d))continue;const t=await e.test.call(this,u,d);if(f=f&&t,t&&e.valid){const t=e.valid.call(this,d);if(!t)continue;h.push({key:e.key,valid:!0,text:t})}else if(!t&&e.invalid){const t=e.invalid.call(this,d);if(!t)continue;h.push({key:e.key,valid:!1,text:t})}}if(!l)return{valid:f};if(h&&h.length&&(p=i.a.createElement("ul",{className:"mx_Validation_details"},h.map((e=>{const t=a()({mx_Validation_detail:!0,mx_Validation_valid:e.valid,mx_Validation_invalid:!e.valid});return i.a.createElement("li",{key:e.key,className:t},e.text)})))),t&&(p||!n)){const e=t.call(this,d,h);m=e?i.a.createElement("div",{className:"mx_Validation_description"},e):void 0}return(m||p)&&(g=i.a.createElement("div",{className:"mx_Validation"},m,p)),{valid:f,feedback:g}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(13),i=n.n(r);class o{constructor(e,t){this.preferred=e,this.legacy=t}matches(e){return e===this.preferred||e===this.legacy}static fromString(e){const t=Object.values(o).filter((e=>e instanceof o)).find((t=>t.matches(e)));return t||new o(e,e)}}i()(o,"JITSI",new o("m.jitsi","jitsi")),i()(o,"STICKERPICKER",new o("m.stickerpicker","m.stickerpicker")),i()(o,"INTEGRATION_MANAGER",new o("m.integration_manager","m.integration_manager")),i()(o,"CUSTOM",new o("m.custom","m.custom"))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(13),i=n.n(r),o=n(153),a=n(566);class s extends o.a{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),i()(this,"readyStore",void 0);const t=this;this.readyStore=new class extends a.a{get mxClient(){return this.matrixClient}async onReady(){return t.onReady()}async onNotReady(){return t.onNotReady()}}(e)}async start(){await this.readyStore.start()}get matrixClient(){return this.readyStore.mxClient}async onReady(){}async onNotReady(){}async onDispatch(e){await this.onAction(e)}}},function(e,t,n){"use strict";n.d(t,"c",(function(){return R})),n.d(t,"g",(function(){return N})),n.d(t,"f",(function(){return M})),n.d(t,"b",(function(){return P})),n.d(t,"a",(function(){return L})),n.d(t,"e",(function(){return B})),n.d(t,"d",(function(){return U}));var r=n(13),i=n.n(r),o=n(158),a=n(1),s=n(223),l=n(140),c=n(151),u=n(188),d=n(15),h=n(6),p=n(224),m=n(129),g=n(131),f=n(125),_=n(245),b=n(390),v=n(181),y=n(201),E=n(2),S=n(234),w=n(265),T=n(332),C=n(157),x=n(121),F=n(799),D=n(127),k=n(460),O=n(189);const I=16e3,A=async function(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>!0;const i=new Promise((i=>{n=function(){r(...arguments)&&i()},e.on(t,n)})),o=!1===await Object(b.b)(i,!1,I);if(e.off(t,n),o)throw new Error("Timed out")};let R;!function(e){e.Disconnected="disconnected",e.Connecting="connecting",e.Connected="connected",e.Disconnecting="disconnecting"}(R||(R={}));const N=e=>e===R.Connected||e===R.Disconnecting;let M,P;!function(e){e.Tile="tile",e.Spotlight="spotlight"}(M||(M={})),function(e){e.ConnectionState="connection_state",e.Participants="participants",e.Layout="layout",e.Destroy="destroy"}(P||(P={}));class L extends o.b{get messaging(){return this._messaging}set messaging(e){this._messaging=e}get roomId(){return this.widget.roomId}get connectionState(){return this._connectionState}set connectionState(e){const t=this._connectionState;this._connectionState=e,this.emit(P.ConnectionState,e,t)}get connected(){return N(this.connectionState)}get participants(){return this._participants}set participants(e){const t=this._participants;this._participants=e,this.emit(P.Participants,e,t)}constructor(e,t){super(),this.widget=e,this.client=t,i()(this,"widgetUid",v.a.getWidgetUid(this.widget)),i()(this,"room",this.client.getRoom(this.roomId)),i()(this,"STUCK_DEVICE_TIMEOUT_MS",void 0),i()(this,"_messaging",null),i()(this,"_connectionState",R.Disconnected),i()(this,"_participants",new Map),i()(this,"onMyMembership",(async(e,t)=>{"join"!==t&&this.setDisconnected()})),i()(this,"onStopMessaging",(e=>{e===this.widgetUid&&(a.a.log("The widget died; treating this as a user hangup"),this.setDisconnected())})),i()(this,"beforeUnload",(()=>this.setDisconnected()))}static get(e){var t;return null!==(t=U.get(e))&&void 0!==t?t:B.get(e)}async connect(){this.connectionState=R.Connecting;const{[_.b.AudioInput]:e,[_.b.VideoInput]:t}=await _.c.getDevices();let n=null;if(!_.c.startWithAudioMuted){var r,i;const t=_.c.getAudioInput();n=null!==(r=null!==(i=e.find((e=>e.deviceId===t)))&&void 0!==i?i:e[0])&&void 0!==r?r:null}let o=null;if(!_.c.startWithVideoMuted){var a,s;const e=_.c.getVideoInput();o=null!==(a=null!==(s=t.find((t=>t.deviceId===e)))&&void 0!==s?s:t[0])&&void 0!==a?a:null}const c=w.a.instance;if(this.messaging=c.getMessagingForUid(this.widgetUid),!this.messaging)try{await A(c,w.b.StoreMessaging,((e,t)=>e===this.widgetUid&&(this.messaging=t,!0)))}catch(e){throw new Error(`Failed to bind call widget in room ${this.roomId}: ${e}`)}try{await this.performConnection(n,o)}catch(e){throw this.connectionState=R.Disconnected,e}this.room.on(l.d.MyMembership,this.onMyMembership),w.a.instance.on(w.b.StopMessaging,this.onStopMessaging),window.addEventListener("beforeunload",this.beforeUnload),this.connectionState=R.Connected}async disconnect(){if(this.connectionState!==R.Connected)throw new Error("Not connected");this.connectionState=R.Disconnecting,await this.performDisconnection(),this.setDisconnected()}setDisconnected(){this.room.off(l.d.MyMembership,this.onMyMembership),w.a.instance.off(w.b.StopMessaging,this.onStopMessaging),window.removeEventListener("beforeunload",this.beforeUnload),this.messaging=null,this.connectionState=R.Disconnected}destroy(){this.connected&&this.setDisconnected(),this.emit(P.Destroy)}}class B extends L{constructor(e,t){super(e,t),i()(this,"STUCK_DEVICE_TIMEOUT_MS",36e5),i()(this,"resendDevicesTimer",null),i()(this,"participantsExpirationTimer",null),i()(this,"onRoomState",(()=>this.updateParticipants())),i()(this,"onConnectionState",(async(e,t)=>{e!==R.Connected||N(t)?e===R.Disconnected&&N(t)&&(this.updateParticipants(),null!==this.resendDevicesTimer&&(clearInterval(this.resendDevicesTimer),this.resendDevicesTimer=null),await this.removeOurDevice()):(this.updateParticipants(),await this.addOurDevice(),this.resendDevicesTimer=window.setInterval((async()=>{a.a.log(`Resending video member event for ${this.roomId}`),await this.addOurDevice()}),3*this.STUCK_DEVICE_TIMEOUT_MS/4))})),i()(this,"onDock",(async()=>{await this.messaging.transport.send(E.a.TileLayout,{})})),i()(this,"onUndock",(async()=>{await this.messaging.transport.send(E.a.SpotlightLayout,{})})),i()(this,"onHangup",(async e=>{this.connectionState!==R.Disconnecting&&(e.preventDefault(),this.connectionState===R.Connecting&&await A(this,P.ConnectionState),await this.messaging.transport.reply(e.detail,{}),this.setDisconnected())})),this.room.on(c.b.Update,this.onRoomState),this.on(P.ConnectionState,this.onConnectionState),this.updateParticipants()}static get(e){if(f.b.getValue("feature_video_rooms")&&e.isElementVideoRoom()){const t=S.a.instance.getApps(e.roomId).find((e=>{var t;return y.a.JITSI.matches(e.type)&&(null===(t=e.data)||void 0===t?void 0:t.isVideoChannel)}));if(t)return new B(t,e.client)}return null}static async create(e){await v.a.addJitsiWidget(e.roomId,u.g.Video,"Group call",!0,e.name)}updateParticipants(){null!==this.participantsExpirationTimer&&(clearTimeout(this.participantsExpirationTimer),this.participantsExpirationTimer=null);const e=new Map,t=Date.now();let n=1/0;for(const r of this.room.currentState.getStateEvents(B.MEMBER_EVENT_TYPE)){const i=this.room.getMember(r.getStateKey()),o=r.getContent(),a="number"==typeof o.expires_ts?o.expires_ts:-1/0;let s=a>t&&Array.isArray(o.devices)?o.devices.filter((e=>"string"==typeof e)):[];this.connected||(null==i?void 0:i.userId)!==this.client.getUserId()||(s=s.filter((e=>e!==this.client.getDeviceId()))),s.length>0&&"join"===(null==i?void 0:i.membership)&&(e.set(i,new Set(s)),a<n&&(n=a))}if(this.connected){const t=this.room.getMember(this.client.getUserId());let n=e.get(t);void 0===n&&(n=new Set,e.set(t,n)),n.add(this.client.getDeviceId())}this.participants=e,n<1/0&&(this.participantsExpirationTimer=window.setTimeout((()=>this.updateParticipants()),n-t))}async updateDevices(e){if("join"!==this.room.getMyMembership())return;const t=this.room.currentState.getStateEvents(B.MEMBER_EVENT_TYPE,this.client.getUserId()),n=null==t?void 0:t.getContent(),r=e(("number"==typeof(null==n?void 0:n.expires_ts)?n.expires_ts:-1/0)>Date.now()&&Array.isArray(null==n?void 0:n.devices)?n.devices:[]);if(null!==r){const e={devices:r,expires_ts:Date.now()+this.STUCK_DEVICE_TIMEOUT_MS};await this.client.sendStateEvent(this.roomId,B.MEMBER_EVENT_TYPE,e,this.client.getUserId())}}async clean(){const e=Date.now(),{devices:t}=await this.client.getDevices(),n=new Map(t.map((e=>[e.device_id,e])));await this.updateDevices((t=>{const r=t.filter((t=>{const r=n.get(t);return void 0!==(null==r?void 0:r.last_seen_ts)&&!(t===this.client.getDeviceId()&&!this.connected)&&e-r.last_seen_ts<this.STUCK_DEVICE_TIMEOUT_MS}));return r.length===t.length?null:r}))}async addOurDevice(){await this.updateDevices((e=>Array.from(new Set(e).add(this.client.getDeviceId()))))}async removeOurDevice(){await this.updateDevices((e=>{const t=new Set(e);return t.delete(this.client.getDeviceId()),Array.from(t)}))}async performConnection(e,t){var n,r;const i=new Promise(((e,t)=>{const n=w.a.instance,r=e=>{e===this.widgetUid&&(o(),t(new Error("Messaging stopped")))},i=()=>{o(),e()},o=()=>{n.off(w.b.StopMessaging,r),this.off(P.ConnectionState,i)};n.on(w.b.StopMessaging,r),this.on(P.ConnectionState,i)}));this.messaging.on(`action:${E.a.HangupCall}`,this.onHangup);const o=A(this.messaging,`action:${E.a.JoinCall}`,(e=>(e.preventDefault(),this.messaging.transport.reply(e.detail,{}),!0))),a=this.messaging.transport.send(E.a.JoinCall,{audioInput:null!==(n=null==e?void 0:e.label)&&void 0!==n?n:null,videoInput:null!==(r=null==t?void 0:t.label)&&void 0!==r?r:null});try{await Promise.race([Promise.all([a,o]),i])}catch(e){throw this.messaging.off(`action:${E.a.HangupCall}`,this.onHangup),this.messaging.transport.ready&&this.messaging.transport.send(E.a.HangupCall,{force:!0}),new Error(`Failed to join call in room ${this.roomId}: ${e}`)}T.b.instance.on(T.a.Dock,this.onDock),T.b.instance.on(T.a.Undock,this.onUndock)}async performDisconnection(){const e=A(this.messaging,`action:${E.a.HangupCall}`,(e=>(e.preventDefault(),this.messaging.transport.reply(e.detail,{}),!0))),t=this.messaging.transport.send(E.a.HangupCall,{});try{await Promise.all([t,e])}catch(e){throw new Error(`Failed to hangup call in room ${this.roomId}: ${e}`)}}setDisconnected(){this.messaging.off(`action:${E.a.HangupCall}`,this.onHangup),T.b.instance.off(T.a.Dock,this.onDock),T.b.instance.off(T.a.Undock,this.onUndock),super.setDisconnected()}destroy(){this.room.off(c.b.Update,this.onRoomState),this.on(P.ConnectionState,this.onConnectionState),null!==this.participantsExpirationTimer&&(clearTimeout(this.participantsExpirationTimer),this.participantsExpirationTimer=null),null!==this.resendDevicesTimer&&(clearInterval(this.resendDevicesTimer),this.resendDevicesTimer=null),super.destroy()}}i()(B,"MEMBER_EVENT_TYPE","io.element.video.member");class U extends L{get layout(){return this._layout}set layout(e){this._layout=e,this.emit(P.Layout,e)}constructor(e,t){var n;const r=t.getAccountData(O.a.ANALYTICS_EVENT_TYPE),o=null!=r&&r.getContent().pseudonymousAnalyticsOptIn?null==r?void 0:r.getContent().id:"",a=new URLSearchParams({embed:"",preload:"",hideHeader:"",userId:t.getUserId(),deviceId:t.getDeviceId(),roomId:e.room.roomId,baseUrl:t.baseUrl,lang:Object(x.e)().replace("_","-"),fontScale:""+f.b.getValue("baseFontSize")/k.a.DEFAULT_SIZE,analyticsID:o});f.b.getValue("useSystemFont")&&f.b.getValue("systemFont").split(",").map((e=>((e=e.trim()).startsWith('"')&&e.endsWith('"')&&(e=e.slice(1,-1)),e))).forEach((e=>a.append("font",e)));const l=new URL(null!==(n=g.b.get("element_call").url)&&void 0!==n?n:g.a.element_call.url);l.pathname="/room",l.hash=`#?${a.toString()}`,super(S.a.instance.addVirtualWidget({id:Object(s.b)(24),creatorUserId:t.getUserId(),name:"Element Call",type:h.MatrixWidgetType.Custom,url:l.toString()},e.room.roomId),t),this.groupCall=e,i()(this,"STUCK_DEVICE_TIMEOUT_MS",36e5),i()(this,"terminationTimer",null),i()(this,"_layout",M.Tile),i()(this,"onParticipants",(async(e,t)=>{let n=0;for(const t of e.values())n+=t.size;let r=0;for(const e of t.values())r+=e.size;var i;0===n&&r>0&&this.mayTerminate&&(null!==(i=t.get(this.room.getMember(this.client.getUserId())))&&void 0!==i&&i.has(this.client.getDeviceId())?await this.groupCall.terminate():this.terminationTimer=window.setTimeout((()=>this.groupCall.terminate()),6e3*Math.random()+2e3))})),i()(this,"onGroupCallParticipants",(()=>this.updateParticipants())),i()(this,"onGroupCallState",(e=>{e===p.e.Ended&&this.destroy()})),i()(this,"onHangup",(async e=>{e.preventDefault(),await this.messaging.transport.reply(e.detail,{}),this.setDisconnected()})),i()(this,"onTileLayout",(async e=>{e.preventDefault(),this.layout=M.Tile,await this.messaging.transport.reply(e.detail,{})})),i()(this,"onSpotlightLayout",(async e=>{e.preventDefault(),this.layout=M.Spotlight,await this.messaging.transport.reply(e.detail,{})})),i()(this,"onScreenshareRequest",(async e=>{var t;if(e.preventDefault(),null!==(t=C.a.get())&&void 0!==t&&t.supportsDesktopCapturer()){await this.messaging.transport.reply(e.detail,{pending:!0});const{finished:t}=D.b.createDialog(F.a),[n]=await t;n?await this.messaging.transport.send(E.a.ScreenshareStart,{desktopCapturerSourceId:n}):await this.messaging.transport.send(E.a.ScreenshareStop,{})}else await this.messaging.transport.reply(e.detail,{pending:!1})})),this.on(P.Participants,this.onParticipants),e.on(p.c.ParticipantsChanged,this.onGroupCallParticipants),e.on(p.c.GroupCallStateChanged,this.onGroupCallState),this.updateParticipants()}static get(e){if(f.b.getValue("feature_group_calls")||f.b.getValue("feature_video_rooms")&&f.b.getValue("feature_element_call_video_rooms")&&e.isCallRoom()){const t=e.client.groupCallEventHandler.groupCalls.get(e.roomId);if(void 0!==t)return new U(t,e.client)}return null}static async create(e){const t=f.b.getValue("feature_video_rooms")&&f.b.getValue("feature_element_call_video_rooms")&&e.isCallRoom(),n=new p.a(e.client,e,p.f.Video,!1,t?p.d.Room:p.d.Prompt);await n.create()}clean(){return this.groupCall.cleanMemberState()}async performConnection(e,t){try{var n,r;await this.messaging.transport.send(E.a.JoinCall,{audioInput:null!==(n=null==e?void 0:e.label)&&void 0!==n?n:null,videoInput:null!==(r=null==t?void 0:t.label)&&void 0!==r?r:null})}catch(e){throw new Error(`Failed to join call in room ${this.roomId}: ${e}`)}this.groupCall.enteredViaAnotherSession=!0,this.messaging.on(`action:${E.a.HangupCall}`,this.onHangup),this.messaging.on(`action:${E.a.TileLayout}`,this.onTileLayout),this.messaging.on(`action:${E.a.SpotlightLayout}`,this.onSpotlightLayout),this.messaging.on(`action:${E.a.ScreenshareRequest}`,this.onScreenshareRequest)}async performDisconnection(){try{await this.messaging.transport.send(E.a.HangupCall,{})}catch(e){throw new Error(`Failed to hangup call in room ${this.roomId}: ${e}`)}}setDisconnected(){this.messaging.off(`action:${E.a.HangupCall}`,this.onHangup),this.messaging.off(`action:${E.a.TileLayout}`,this.onTileLayout),this.messaging.off(`action:${E.a.SpotlightLayout}`,this.onSpotlightLayout),this.messaging.off(`action:${E.a.ScreenshareRequest}`,this.onScreenshareRequest),super.setDisconnected(),this.groupCall.enteredViaAnotherSession=!1}destroy(){S.a.instance.removeVirtualWidget(this.widget.id,this.groupCall.room.roomId),this.off(P.Participants,this.onParticipants),this.groupCall.off(p.c.ParticipantsChanged,this.onGroupCallParticipants),this.groupCall.off(p.c.GroupCallStateChanged,this.onGroupCallState),null!==this.terminationTimer&&(clearTimeout(this.terminationTimer),this.terminationTimer=null),super.destroy()}async setLayout(e){const t=e===M.Tile?E.a.TileLayout:E.a.SpotlightLayout;await this.messaging.transport.send(t,{})}updateParticipants(){const e=new Map;for(const[t,n]of this.groupCall.participants)e.set(t,new Set(n.keys()));this.participants=e}get mayTerminate(){return this.groupCall.intent!==p.d.Room&&this.room.currentState.mayClientSendStateEvent(U.CALL_EVENT_TYPE.name,this.client)}}i()(U,"CALL_EVENT_TYPE",new d.a(null,m.b.GroupCallPrefix)),i()(U,"MEMBER_EVENT_TYPE",new d.a(null,m.b.GroupCallMemberPrefix))},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o}));var r=n(15);const i=new r.c("m.beacon_info","org.matrix.msc3672.beacon_info"),o=new r.c("m.beacon","org.matrix.msc3672.beacon")},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return o}));const r={HOME:"Home",END:"End",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",BACKSPACE:"Backspace",DELETE:"Delete",ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",TAB:"Tab",ESCAPE:"Escape",ENTER:"Enter",ALT:"Alt",CONTROL:"Control",META:"Meta",SHIFT:"Shift",CONTEXT_MENU:"ContextMenu",COMMA:",",PERIOD:".",LESS_THAN:"<",GREATER_THAN:">",BACKTICK:"`",SPACE:" ",SLASH:"/",SQUARE_BRACKET_LEFT:"[",SQUARE_BRACKET_RIGHT:"]",SEMICOLON:";",A:"a",B:"b",C:"c",D:"d",E:"e",F:"f",G:"g",H:"h",I:"i",J:"j",K:"k",L:"l",M:"m",N:"n",O:"o",P:"p",Q:"q",R:"r",S:"s",T:"t",U:"u",V:"v",W:"w",X:"x",Y:"y",Z:"z"},i=navigator.platform.toUpperCase().includes("MAC");function o(e){return i?e.metaKey&&!e.altKey&&!e.ctrlKey&&!e.shiftKey:e.ctrlKey&&!e.altKey&&!e.metaKey&&!e.shiftKey}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(121);class l extends a.a.PureComponent{render(){return a.a.createElement("div",{className:"mx_InlineSpinner"},a.a.createElement("div",{className:"mx_InlineSpinner_icon mx_Spinner_icon",style:{width:this.props.w,height:this.props.h},"aria-label":Object(s.a)("Loading…")},this.props.children))}}i()(l,"defaultProps",{w:16,h:16})},function(e,t,n){"use strict";n.d(t,"c",(function(){return b})),n.d(t,"a",(function(){return v})),n.d(t,"b",(function(){return y})),n.d(t,"d",(function(){return E}));var r=n(13),i=n.n(r),o=n(151),a=n(16),s=n(125),l=n(234),c=n(201),u=n(290),d=n(124),h=n(566),p=n(137),m=n(146),g=n(153);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const b="io.element.widgets.layout";let v;!function(e){e.Top="top",e.Right="right",e.Center="center"}(v||(v={}));const y=3;class E extends h.a{constructor(){super(d.a),i()(this,"byRoom",new a.b((()=>new Map))),i()(this,"pinnedRef",void 0),i()(this,"layoutRef",void 0),i()(this,"updateAllRooms",(()=>{this.byRoom=new a.b((()=>new Map));for(const e of this.matrixClient.getVisibleRooms())this.recalculateRoom(e)})),i()(this,"updateFromWidgetStore",(e=>{if(e){var t;const n=null===(t=this.matrixClient)||void 0===t?void 0:t.getRoom(e);n&&this.recalculateRoom(n)}else this.updateAllRooms()})),i()(this,"updateRoomFromState",(e=>{var t;if(e.getType()!==b)return;const n=null===(t=this.matrixClient)||void 0===t?void 0:t.getRoom(e.getRoomId());n&&this.recalculateRoom(n)})),i()(this,"updateFromSettings",((e,t)=>{if(t){var n;const e=null===(n=this.matrixClient)||void 0===n?void 0:n.getRoom(t);e&&this.recalculateRoom(e)}else this.updateAllRooms()}))}static get instance(){return this.internalInstance||(this.internalInstance=new E,this.internalInstance.start()),this.internalInstance}static emissionForRoom(e){return`update_${e.roomId}`}emitFor(e){this.emit(E.emissionForRoom(e))}async onReady(){var e;this.updateAllRooms(),null===(e=this.matrixClient)||void 0===e||e.on(o.b.Events,this.updateRoomFromState),this.pinnedRef=s.b.watchSetting("Widgets.pinned",null,this.updateFromSettings),this.layoutRef=s.b.watchSetting("Widgets.layout",null,this.updateFromSettings),l.a.instance.on(g.b,this.updateFromWidgetStore)}async onNotReady(){var e;this.byRoom=new a.b((()=>new Map)),null===(e=this.matrixClient)||void 0===e||e.off(o.b.Events,this.updateRoomFromState),s.b.unwatchSetting(this.pinnedRef),s.b.unwatchSetting(this.layoutRef),l.a.instance.off(g.b,this.updateFromWidgetStore)}recalculateRoom(e){var t;const n=l.a.instance.getApps(e.roomId);if(null==n||!n.length)return this.byRoom.set(e.roomId,new Map),void this.emitFor(e);const r=this.byRoom.getOrCreate(e.roomId),i=JSON.stringify(Object(a.F)(r)),o=e.currentState.getStateEvents(b,""),d=s.b.getValue("Widgets.pinned",e.roomId);let h=s.b.getValue("Widgets.layout",e.roomId);o&&h&&h.overrides!==o.getId()&&(h=null);const p=null!==(t=null==o?void 0:o.getContent())&&void 0!==t?t:null,m=[],g=[],f=[];for(const e of n){var _,E,S,w,T;const t=null==p||null===(_=p.widgets)||void 0===_||null===(E=_[e.id])||void 0===E?void 0:E.container,n=null===(S=h)||void 0===S||null===(w=S.widgets)||void 0===w||null===(T=w[e.id])||void 0===T?void 0:T.container,r=!(null==d||!d[e.id]),i=c.a.JITSI.matches(e.type)?v.Top:v.Right;if(n?n===v.Center:t===v.Center){f.length?console.error("Tried to push a second widget into the center container"):f.push(e);continue}let o=i;n||t?o=null!=n?n:t:r&&!t&&(o=v.Top),(o===v.Top?m:g).push(e)}const C=m.slice(y);g.push(...C),m.sort(((e,t)=>{var n,r,i,o,s,l;const d=null==p||null===(n=p.widgets)||void 0===n?void 0:n[e.id],m=null==p||null===(r=p.widgets)||void 0===r?void 0:r[t.id],g=null===(i=h)||void 0===i||null===(o=i.widgets)||void 0===o?void 0:o[e.id],f=null===(s=h)||void 0===s||null===(l=s.widgets)||void 0===l?void 0:l[t.id],_=c.a.JITSI.matches(e.type)?Number.MIN_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,b=c.a.JITSI.matches(t.type)?Number.MIN_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,v=Object(u.b)(null==g?void 0:g.index,Object(u.b)(null==d?void 0:d.index,_)),y=Object(u.b)(null==f?void 0:f.index,Object(u.b)(null==m?void 0:m.index,b));return v===y?Object(a.h)(e.id,t.id):v-y}));const x=[];let F=null,D=!0;for(let e=0;e<m.length;e++){var k,O,I;const t=m[e],n=null==p||null===(k=p.widgets)||void 0===k?void 0:k[t.id],r=null===(O=h)||void 0===O||null===(I=O.widgets)||void 0===I?void 0:I[t.id];if(Number.isFinite(null==r?void 0:r.width)||Number.isFinite(null==n?void 0:n.width)){const e=(null==r?void 0:r.width)||(null==n?void 0:n.width),t=Object(u.a)(e,10,100);x.push(t),D=!1}else x.push(100);if(null!=n&&n.height||null!=r&&r.height){const e=Object(u.b)(null==n?void 0:n.height,2),t=Object(u.b)(null==r?void 0:r.height,e);F=Math.max(F,Object(u.a)(t,2,100))}}if(D)for(let e=0;e<x.length;e++)x[e]=100/x.length;else{const e=Object(u.e)(...x)-100;if(e<0)for(let t=0;t<x.length;t++)x[t]+=Math.abs(e)/x.length;else if(e>0){for(let t=0;t<x.length;t++)x[t]=Object(u.a)(x[t]-e/x.length,10,100);const t=Object(u.e)(...x)-100;if(t>0){const e=x.map(((e,t)=>[t,e])).filter((e=>e[1]>10)).map((e=>e[0]));for(const n of e)x[n]-=t/e.length}}}const A=new Map;this.byRoom.set(e.roomId,A),m.length&&A.set(v.Top,{ordered:m,distributions:x,height:F}),g.length&&A.set(v.Right,{ordered:g}),f.length&&A.set(v.Center,{ordered:f});JSON.stringify(Object(a.F)(A))!==i&&this.emitFor(e)}getContainerWidgets(e,t){var n,r;return(null===(n=this.byRoom.get(null==e?void 0:e.roomId))||void 0===n||null===(r=n.get(t))||void 0===r?void 0:r.ordered)||[]}isInContainer(e,t,n){return this.getContainerWidgets(e,n).some((e=>e.id===t.id))}canAddToContainer(e,t){switch(t){case v.Top:case v.Right:return this.getContainerWidgets(e,t).length<y;case v.Center:return this.getContainerWidgets(e,t).length<1}}getResizerDistributions(e,t){var n,r;let i=null===(n=this.byRoom.get(e.roomId))||void 0===n||null===(r=n.get(t))||void 0===r?void 0:r.distributions;return!i||i.length<2?[]:(2===i.length&&(i=[i[0]]),3===i.length&&(i=[i[0],i[2]]),i.map((e=>`${e.toFixed(1)}%`)))}setResizerDistributions(e,t,n){if(t!==v.Top)return;const r=n.map((e=>Number(Number(e.substring(0,e.length-1)).toFixed(1)))),i=this.getContainerWidgets(e,t),o=100-Object(u.e)(...r);2===r.length&&r.splice(1,0,o),1===r.length&&r.push(o);const a={};i.forEach(((n,i)=>{var o,s;a[n.id]={container:t,width:r[i],index:i,height:(null===(o=this.byRoom.get(e.roomId))||void 0===o||null===(s=o.get(t))||void 0===s?void 0:s.height)||2}})),this.updateUserLayout(e,a)}getContainerHeight(e,t){var n,r,i;return null!==(n=null===(r=this.byRoom.get(e.roomId))||void 0===r||null===(i=r.get(t))||void 0===i?void 0:i.height)&&void 0!==n?n:null}setContainerHeight(e,t,n){var r,i;const o=this.getContainerWidgets(e,t),a=null===(r=this.byRoom.get(e.roomId))||void 0===r||null===(i=r.get(t))||void 0===i?void 0:i.distributions,s={};o.forEach(((e,r)=>{s[e.id]={container:t,width:null==a?void 0:a[r],index:r,height:n}})),this.updateUserLayout(e,s)}moveWithinContainer(e,t,n,r){var i,o,a,s;const l=Object(m.b)(this.getContainerWidgets(e,t)),c=l.findIndex((e=>e.id===n.id));if(c<0)return;l.splice(c,1);const d=Object(u.a)(c+r,0,l.length);l.splice(d,0,n);const h=null===(i=this.byRoom.get(e.roomId))||void 0===i||null===(o=i.get(t))||void 0===o?void 0:o.distributions,p=null===(a=this.byRoom.get(e.roomId))||void 0===a||null===(s=a.get(t))||void 0===s?void 0:s.height,g={};l.forEach(((e,n)=>{g[e.id]={container:t,width:null==h?void 0:h[n],index:n,height:p}})),this.updateUserLayout(e,g)}moveToContainer(e,t,n){if(!this.getAllWidgets(e).some((e=>{let[n]=e;return n.id===t.id})))return;const r={};switch(n){case v.Right:break;case v.Center:for(const t of this.getContainerWidgets(e,v.Top))r[t.id]={container:v.Right};for(const t of this.getContainerWidgets(e,v.Center))r[t.id]={container:v.Right};break;case v.Top:if(this.hasMaximisedWidget(e)){r[this.getContainerWidgets(e,v.Center)[0].id]={container:v.Right}}}r[t.id]={container:n},this.updateUserLayout(e,r)}hasMaximisedWidget(e){return this.getContainerWidgets(e,v.Center).length>0}hasPinnedWidgets(e){return this.getContainerWidgets(e,v.Top).length>0}canCopyLayoutToRoom(e){return!!this.matrixClient&&e.currentState.maySendStateEvent(b,this.matrixClient.getUserId())}copyLayoutToRoom(e){var t;const n=this.getAllWidgets(e),r={widgets:{}};for(const[t,l]of n)if(r.widgets[t.id]={container:l},l===v.Top){var i,o,a,s;const n=this.getContainerWidgets(e,l).findIndex((e=>e.id===t.id)),c=null===(i=this.byRoom.get(e.roomId))||void 0===i||null===(o=i.get(l))||void 0===o?void 0:o.distributions,u=null===(a=this.byRoom.get(e.roomId))||void 0===a||null===(s=a.get(l))||void 0===s?void 0:s.height;r.widgets[t.id]=_(_({},r.widgets[t.id]),{},{height:u?Math.round(u):void 0,width:null!=c&&c[n]?Math.round(c[n]):void 0,index:n})}null===(t=this.matrixClient)||void 0===t||t.sendStateEvent(e.roomId,b,r,"")}getAllWidgets(e){const t=this.byRoom.get(e.roomId);if(!t)return[];const n=[];for(const[e,r]of t){const t=r.ordered;for(const r of t)n.push([r,e])}return n}updateUserLayout(e,t){const n=this.getAllWidgets(e);for(const[s,l]of n){var r,i;const n=this.getContainerWidgets(e,l).findIndex((e=>e.id===s.id)),c=null===(r=this.byRoom.get(e.roomId))||void 0===r||null===(i=r.get(l))||void 0===i?void 0:i.distributions;var o,a;if(!t[s.id])t[s.id]={container:l,index:n,height:null===(o=this.byRoom.get(e.roomId))||void 0===o||null===(a=o.get(l))||void 0===a?void 0:a.height,width:null==c?void 0:c[n]}}const l=e.currentState.getStateEvents(b,"");s.b.setValue("Widgets.layout",e.roomId,p.a.ROOM_ACCOUNT,{overrides:null==l?void 0:l.getId(),widgets:t}).catch((()=>this.recalculateRoom(e))),this.recalculateRoom(e)}}i()(E,"internalInstance",void 0),window.mxWidgetLayoutStore=E.instance},function(e,t,n){"use strict";n.d(t,"f",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"d",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"e",(function(){return l})),n.d(t,"a",(function(){return c})),n.d(t,"g",(function(){return u})),n.d(t,"h",(function(){return d}));var r=n(121);const i=Symbol("top-level-spaces"),o=Symbol("invited-spaces"),a=Symbol("selected-space"),s=Symbol("home-behaviour"),l=Symbol("suggested-rooms");let c;!function(e){e.Home="home-space",e.Favourites="favourites-space",e.People="people-space",e.Orphans="orphans-space"}(c||(c={}));const u=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];switch(e){case c.Home:return t?Object(r.a)("All rooms"):Object(r.a)("Home");case c.Favourites:return Object(r.a)("Favourites");case c.People:return Object(r.a)("People");case c.Orphans:return Object(r.a)("Other rooms")}};function d(e){return e===c.Home||e===c.Favourites||e===c.People||e===c.Orphans}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));class r{getValueOverride(e,t,n,r){return null}async beforeChange(e,t,n){return!0}onChange(e,t,n){}get settingDisabled(){return!1}}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var o=n(371),a=n(703);i(n(703),t);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=s),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:s,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?o.ElementType.Tag:void 0,r=new a.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===o.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new a.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===o.ElementType.Comment)this.lastNode.data+=e;else{var t=new a.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new a.Text(""),t=new a.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new a.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"d",(function(){return a})),n.d(t,"a",(function(){return s})),n.d(t,"e",(function(){return l})),n.d(t,"f",(function(){return c})),n.d(t,"b",(function(){return u}));var r=n(121),i=n(740);function o(e){return e<1e3?e.toString():e<1e4?(e/1e3).toFixed(1)+"K":e<1e5?(e/1e3).toFixed(0)+"K":e<1e7?(e/1e6).toFixed(1)+"M":e<1e8?(e/1e6).toFixed(0)+"M":(e/1e9).toFixed(1)+"B"}function a(e){return(new Intl.NumberFormat).format(e)}function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(0===e)return"0 Bytes";const n=t<0?0:t,r=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,r)).toFixed(n))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][r]}function l(e){return e.match(/.{1,4}/g).join(" ")}function c(e){return`mx_Username_color${function(e){let t,n,r=0;if(0===e.length)return r;for(t=0;t<e.length;t++)n=e.charCodeAt(t),r=(r<<5)-r+n,r|=0;return Math.abs(r)}(e)%8+1}`}function u(e,t){const n=void 0===t?0:Math.max(e.length-t,0);if(0===e.length)return"";if(1===e.length)return e[0];{let o,a;return n>0?e=e.slice(0,t):o=e.pop(),a=e.every((e=>"string"==typeof e))?e.join(", "):Object(i.a)(e,", "),n>0?Object(r.a)("%(items)s and %(count)s others",{items:a,count:n}):Object(r.a)("%(items)s and %(lastItem)s",{items:a,lastItem:o})}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(132),i=n.n(r),o=n(13),a=n.n(o),s=n(126),l=n.n(s),c=n(120),u=n.n(c);const d=["element","className","onScroll","tabIndex","wrappedRef","children"];function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class m extends u.a.Component{constructor(){super(...arguments),a()(this,"containerRef",u.a.createRef())}componentDidMount(){var e,t;this.containerRef.current&&this.props.onScroll&&this.containerRef.current.addEventListener("scroll",this.props.onScroll,{passive:!0}),null===(e=(t=this.props).wrappedRef)||void 0===e||e.call(t,this.containerRef.current)}componentWillUnmount(){this.containerRef.current&&this.props.onScroll&&this.containerRef.current.removeEventListener("scroll",this.props.onScroll)}render(){const e=this.props,{element:t,className:n,onScroll:r,tabIndex:o,wrappedRef:a,children:s}=e,c=i()(e,d);return u.a.createElement(t,p(p({},c),{},{ref:this.containerRef,className:l()("mx_AutoHideScrollbar",n),tabIndex:null!=o?o:-1}),s)}}a()(m,"defaultProps",{element:"div"})},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(126),l=n.n(s),c=n(121),u=n(135),d=n(145);class h extends a.a.Component{constructor(){super(...arguments),i()(this,"onFinished",(()=>{this.props.onFinished()}))}render(){return a.a.createElement(u.a,{className:"mx_InfoDialog",onFinished:this.props.onFinished,top:this.props.top,title:this.props.title,contentId:"mx_Dialog_content",hasCancel:this.props.hasCloseButton,onKeyDown:this.props.onKeyDown,fixedWidth:this.props.fixedWidth},a.a.createElement("div",{className:l()("mx_Dialog_content",this.props.className),id:"mx_Dialog_content"},this.props.description),!1!==this.props.button&&a.a.createElement(d.a,{primaryButton:this.props.button||Object(c.a)("OK"),onPrimaryButtonClick:this.onFinished,hasCancel:!1}))}}i()(h,"defaultProps",{title:"",description:"",hasCloseButton:!1})},function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return r})),function(e){e.General="USER_GENERAL_TAB",e.Appearance="USER_APPEARANCE_TAB",e.Notifications="USER_NOTIFICATIONS_TAB",e.Preferences="USER_PREFERENCES_TAB",e.Keyboard="USER_KEYBOARD_TAB",e.Sidebar="USER_SIDEBAR_TAB",e.Voice="USER_VOICE_TAB",e.Security="USER_SECURITY_TAB",e.Labs="USER_LABS_TAB",e.Mjolnir="USER_MJOLNIR_TAB",e.Help="USER_HELP_TAB",e.SessionManager="USER_SESSION_MANAGER_TAB"}(r||(r={}))},function(e,t,n){"use strict";(function(e){n.d(t,"b",(function(){return w})),n.d(t,"d",(function(){return D})),n.d(t,"e",(function(){return k})),n.d(t,"a",(function(){return O})),n.d(t,"c",(function(){return A}));var r=n(13),i=n.n(r),o=n(222),a=n(140),s=n(16),l=n(315),c=n(179),u=n(1),d=n(288),h=n(147),p=n(193),m=n(129),g=n(151),f=n(184),_=n(355),b=n(505),v=n(413);function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const S=!0;let w;!function(e){e.Error="ERROR",e.Prepared="PREPARED",e.Stopped="STOPPED",e.Syncing="SYNCING",e.Catchup="CATCHUP",e.Reconnecting="RECONNECTING"}(w||(w={}));const T=["org.matrix.msc2716v3"];function C(e,t){return`FILTER_SYNC_${e}`+(t?"_"+t:"")}function x(){S&&u.a.log(...arguments)}var F;function D(e){return E({initialSyncLimit:8,resolveInvitesToProfiles:!1,pollTimeout:3e4,pendingEventOrdering:h.e.Chronological,threadSupport:!1},e)}function k(e){return E({canResetEntireTimeline:e=>!1},e)}!function(e){e.Offline="offline",e.Online="online",e.Unavailable="unavailable"}(F||(F={}));class O{constructor(e,t,n){this.client=e,i()(this,"opts",void 0),i()(this,"syncOpts",void 0),i()(this,"_peekRoom",null),i()(this,"currentSyncRequest",void 0),i()(this,"abortController",void 0),i()(this,"syncState",null),i()(this,"syncStateData",void 0),i()(this,"catchingUp",!1),i()(this,"running",!1),i()(this,"keepAliveTimer",void 0),i()(this,"connectionReturnedDefer",void 0),i()(this,"notifEvents",[]),i()(this,"failedSyncCount",0),i()(this,"storeIsInvalid",!1),i()(this,"getPushRules",(async()=>{try{x("Getting push rules...");const e=await this.client.getPushRules();x("Got push rules"),this.client.pushRules=e}catch(e){if(u.a.error("Getting push rules failed",e),this.shouldAbortSync(e))return;return x("Waiting for saved sync before retrying push rules..."),await this.recoverFromSyncStartupError(this.savedSyncPromise,e),this.getPushRules()}})),i()(this,"buildDefaultFilter",(()=>{const e=new l.a(this.client.credentials.userId);return this.client.canSupport.get(v.a.ThreadUnreadNotifications)!==v.b.Unsupported&&e.setUnreadThreadNotifications(!0),e})),i()(this,"checkLazyLoadStatus",(async()=>{if(x("Checking lazy load status..."),this.opts.lazyLoadMembers&&this.client.isGuest()&&(this.opts.lazyLoadMembers=!1),this.opts.lazyLoadMembers){x("Checking server lazy load support...");await this.client.doesServerSupportLazyLoading()?(x("Enabling lazy load on sync filter..."),this.opts.filter||(this.opts.filter=this.buildDefaultFilter()),this.opts.filter.setLazyLoadMembers(!0)):(x("LL: lazy loading requested but not supported by server, so disabling"),this.opts.lazyLoadMembers=!1)}x("Checking whether lazy loading has changed in store...");if(await this.wasLazyLoadingToggled(this.opts.lazyLoadMembers)){this.storeIsInvalid=!0;const e=new d.c(d.d.ToggledLazyLoading,!!this.opts.lazyLoadMembers);return this.updateSyncState(w.Error,{error:e}),void u.a.warn("InvalidStoreError: store is not usable: stopping sync.")}var e;this.opts.lazyLoadMembers&&(null===(e=this.syncOpts.crypto)||void 0===e||e.enableLazyLoading());try{x("Storing client options..."),await this.client.storeClientOptions(),x("Stored client options")}catch(e){throw u.a.error("Storing client options failed",e),e}})),i()(this,"getFilter",(async()=>{let e,t;x("Getting filter..."),e=this.opts.filter?this.opts.filter:this.buildDefaultFilter();try{t=await this.client.getOrCreateFilter(C(this.client.credentials.userId),e)}catch(e){return u.a.error("Getting filter failed",e),this.shouldAbortSync(e)?{}:(x("Waiting for saved sync before retrying filter..."),await this.recoverFromSyncStartupError(this.savedSyncPromise,e),this.getFilter())}return{filter:e,filterId:t}})),i()(this,"savedSyncPromise",void 0),i()(this,"onOnline",(()=>{x("Browser thinks we are back online"),this.startKeepAlives(0)})),this.opts=D(t),this.syncOpts=k(n),e.getNotifTimelineSet()&&e.reEmitter.reEmit(e.getNotifTimelineSet(),[a.d.Timeline,a.d.TimelineReset])}createRoom(e){const t=A(this.client,e,this.opts);return t.on(g.b.Marker,((e,n)=>{this.onMarkerStateEvent(t,e,n)})),t}onMarkerStateEvent(e,t){let{timelineWasEmpty:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(n)return void u.a.debug(`MarkerState: Ignoring markerEventId=${t.getId()} in roomId=${e.roomId} because the timeline was empty before the marker arrived which means there is nothing to refresh.`);T.includes(e.getVersion())||t.getSender()===e.getCreator()?(u.a.debug(`MarkerState: Timeline needs to be refreshed because a new markerEventId=${t.getId()} was sent in roomId=${e.roomId}`),e.setTimelineNeedsRefresh(!0),e.emit(a.d.HistoryImportedWithinTimeline,t,e)):u.a.debug(`MarkerState: Ignoring markerEventId=${t.getId()} in roomId=${e.roomId} because MSC2716 is not supported in the room version or for any room version, the marker wasn't sent by the room creator.`)}async syncLeftRooms(){var e;const t=this.client,n=new l.a(this.client.credentials.userId);n.setTimelineLimit(1),n.setIncludeLeaveRooms(!0);const r=this.opts.pollTimeout+8e4,i={timeout:0,filter:await t.getOrCreateFilter(C(t.credentials.userId,"LEFT_ROOMS"),n)},o=await t.http.authedRequest(p.i.Get,"/sync",i,void 0,{localTimeoutMs:r});let a=[];null!==(e=o.rooms)&&void 0!==e&&e.leave&&(a=this.mapSyncResponseToRoomArray(o.rooms.leave));return(await Promise.all(a.map((async e=>{const n=e.room;if(!e.isBrandNewRoom)return;e.timeline=e.timeline||{prev_batch:null,events:[]};const r=this.mapSyncEventsFormat(e.timeline,n),i=this.mapSyncEventsFormat(e.state,n);return n.getLiveTimeline().setPaginationToken(e.timeline.prev_batch,c.b.BACKWARDS),await this.injectRoomEvents(n,i,r),n.recalculate(),t.store.storeRoom(n),t.emit(h.b.Room,n),this.processEventsForNotifs(n,r),n})))).filter(Boolean)}peek(e){var t;if((null===(t=this._peekRoom)||void 0===t?void 0:t.roomId)===e)return Promise.resolve(this._peekRoom);const n=this.client;return this._peekRoom=this.createRoom(e),this.client.roomInitialSync(e,20).then((e=>{e.messages=e.messages||{chunk:[]},e.messages.chunk=e.messages.chunk||[],e.state=e.state||[];const t=s.k(e.state).map(n.getEventMapper()),r=e.state.map(n.getEventMapper()),i=e.messages.chunk.map(n.getEventMapper());return Array.isArray(e.presence)&&e.presence.map(n.getEventMapper()).forEach((function(e){let t=n.store.getUser(e.getContent().user_id);t?t.setPresenceEvent(e):(t=I(n,e.getContent().user_id),t.setPresenceEvent(e),n.store.storeUser(t)),n.emit(h.b.Event,e)})),e.messages.start&&(this._peekRoom.oldState.paginationToken=e.messages.start),this._peekRoom.oldState.setStateEvents(t),this._peekRoom.currentState.setStateEvents(r),this.resolveInvites(this._peekRoom),this._peekRoom.recalculate(),this._peekRoom.addEventsToTimeline(i.reverse(),!0,this._peekRoom.getLiveTimeline(),e.messages.start),n.store.storeRoom(this._peekRoom),n.emit(h.b.Room,this._peekRoom),this.peekPoll(this._peekRoom),this._peekRoom}))}stopPeeking(){this._peekRoom=null}peekPoll(e,t){var n;this._peekRoom===e?this.client.http.authedRequest(p.i.Get,"/events",{room_id:e.roomId,timeout:String(3e4),from:t},void 0,{localTimeoutMs:5e4,abortSignal:null===(n=this.abortController)||void 0===n?void 0:n.signal}).then((t=>{if(this._peekRoom!==e)return void x("Stopped peeking in room %s",e.roomId);t.chunk.filter((function(e){return"m.presence"===e.type})).map(this.client.getEventMapper()).forEach((e=>{let t=this.client.store.getUser(e.getContent().user_id);t?t.setPresenceEvent(e):(t=I(this.client,e.getContent().user_id),t.setPresenceEvent(e),this.client.store.storeUser(t)),this.client.emit(h.b.Event,e)}));const n=t.chunk.filter((function(t){return t.room_id===e.roomId&&t.event_id})).map(this.client.getEventMapper());e.addLiveEvents(n),this.peekPoll(e,t.end)}),(n=>{u.a.error("[%s] Peek poll failed: %s",e.roomId,n),setTimeout((()=>{this.peekPoll(e,t)}),3e4)})):x("Stopped peeking in room %s",e.roomId)}getSyncState(){return this.syncState}getSyncStateData(){var e;return null!==(e=this.syncStateData)&&void 0!==e?e:null}async recoverFromSyncStartupError(e,t){await e;const n=this.startKeepAlives();this.updateSyncState(w.Error,{error:t}),await n}async wasLazyLoadingToggled(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!1;if(!await this.client.store.isNewlyCreated()){const n=await this.client.store.getClientOptions();return n&&(t=!!n.lazyLoadMembers),t!==e}return!1}shouldAbortSync(e){return"M_UNKNOWN_TOKEN"===e.errcode&&(u.a.warn("Token no longer valid - assuming logout"),this.stop(),this.updateSyncState(w.Error,{error:e}),!0)}async sync(){var t,n;if(this.running=!0,this.abortController=new AbortController,null===(t=e.window)||void 0===t||null===(n=t.addEventListener)||void 0===n||n.call(t,"online",this.onOnline,!1),this.client.isGuest())return this.doSync({});x("Getting saved sync token...");const r=this.client.store.getSavedSyncToken().then((e=>(x("Got saved sync token"),e)));this.savedSyncPromise=this.client.store.getSavedSync().then((e=>{if(x(`Got reply from saved sync, exists? ${!!e}`),e)return this.syncFromCache(e)})).catch((e=>{u.a.error("Getting saved sync failed",e)})),await this.getPushRules(),await this.checkLazyLoadStatus();const{filterId:i,filter:o}=await this.getFilter();if(o){if(this.client.resetNotifTimelineSet(),!this.currentSyncRequest){let e=i;const t=await r;if(t)x("Sending first sync request...");else{x("Sending initial sync request...");const t=this.buildDefaultFilter();t.setDefinition(o.getDefinition()),t.setTimelineLimit(this.opts.initialSyncLimit),e=JSON.stringify(t.getDefinition())}this.currentSyncRequest=this.doSyncRequest({filter:e},t)}return x("Waiting for saved sync before starting sync processing..."),await this.savedSyncPromise,this.doSync({filter:i})}}stop(){var t,n,r;x("SyncApi.stop"),null===(t=e.window)||void 0===t||null===(n=t.removeEventListener)||void 0===n||n.call(t,"online",this.onOnline,!1),this.running=!1,null===(r=this.abortController)||void 0===r||r.abort(),this.keepAliveTimer&&(clearTimeout(this.keepAliveTimer),this.keepAliveTimer=void 0)}retryImmediately(){return!!this.connectionReturnedDefer&&(this.startKeepAlives(0),!0)}async syncFromCache(e){x("sync(): not doing HTTP hit, instead returning stored /sync data");const t=e.nextBatch;this.client.store.setSyncToken(t);const n={nextSyncToken:t,catchingUp:!1,fromCache:!0},r={next_batch:t,rooms:e.roomsData,account_data:{events:e.accountData}};try{await this.processSyncResponse(n,r)}catch(e){u.a.error("Error processing cached sync",e)}this.storeIsInvalid||this.updateSyncState(w.Prepared,n)}async doSync(e){for(;this.running;){const t=this.client.store.getSyncToken();let n;try{this.currentSyncRequest||(this.currentSyncRequest=this.doSyncRequest(e,t)),n=await this.currentSyncRequest}catch(e){if(await this.onSyncError(e))return;continue}finally{this.currentSyncRequest=void 0}this.client.store.setSyncToken(n.next_batch),this.failedSyncCount=0,await this.client.store.setSyncData(n);const r={oldSyncToken:null!=t?t:void 0,nextSyncToken:n.next_batch,catchingUp:this.catchingUp};this.syncOpts.crypto&&await this.syncOpts.crypto.onSyncWillProcess(r);try{await this.processSyncResponse(r,n)}catch(e){u.a.error("Caught /sync error",e),this.client.emit(h.b.SyncUnexpectedError,e)}r.catchingUp=this.catchingUp,e.hasSyncedBefore||(this.updateSyncState(w.Prepared,r),e.hasSyncedBefore=!0),this.syncOpts.cryptoCallbacks&&await this.syncOpts.cryptoCallbacks.onSyncCompleted(r),this.updateSyncState(w.Syncing,r),this.client.store.wantsSave()&&(this.syncOpts.crypto&&await this.syncOpts.crypto.saveDeviceList(0),this.client.store.save())}this.running||(x("Sync no longer running: exiting."),this.connectionReturnedDefer&&(this.connectionReturnedDefer.reject(),this.connectionReturnedDefer=void 0),this.updateSyncState(w.Stopped))}doSyncRequest(e,t){var n;const r=this.getSyncParams(e,t);return this.client.http.authedRequest(p.i.Get,"/sync",r,void 0,{localTimeoutMs:r.timeout+8e4,abortSignal:null===(n=this.abortController)||void 0===n?void 0:n.signal})}getSyncParams(e,t){let n=this.opts.pollTimeout;(this.getSyncState()!==w.Syncing||this.catchingUp)&&(this.catchingUp=!0,n=0);let r=e.filter;this.client.isGuest()&&!r&&(r=this.getGuestFilter());const i={filter:r,timeout:n};return this.opts.disablePresence&&(i.set_presence=F.Offline),t?i.since=t:i._cacheBuster=Date.now(),[w.Reconnecting,w.Error].includes(this.getSyncState())&&(i.timeout=0),i}async onSyncError(e){if(!this.running)return x("Sync no longer running: exiting"),this.connectionReturnedDefer&&(this.connectionReturnedDefer.reject(),this.connectionReturnedDefer=void 0),this.updateSyncState(w.Stopped),!0;if(u.a.error("/sync error %s",e),this.shouldAbortSync(e))return!0;this.failedSyncCount++,u.a.log("Number of consecutive failed sync requests:",this.failedSyncCount),x("Starting keep-alive");const t=this.startKeepAlives();this.currentSyncRequest=void 0,this.updateSyncState(this.failedSyncCount>=3?w.Error:w.Reconnecting,{error:e});return await t&&this.getSyncState()===w.Error&&this.updateSyncState(w.Catchup,{catchingUp:!0}),!1}async processSyncResponse(e,t){var n,r;const i=this.client;if(Array.isArray(null===(n=t.presence)||void 0===n?void 0:n.events)&&t.presence.events.filter(s.A).map(i.getEventMapper()).forEach((function(e){let t=i.store.getUser(e.getSender());t?t.setPresenceEvent(e):(t=I(i,e.getSender()),t.setPresenceEvent(e),i.store.storeUser(t)),i.emit(h.b.Event,e)})),Array.isArray(null===(r=t.account_data)||void 0===r?void 0:r.events)){const e=t.account_data.events.filter(s.A).map(i.getEventMapper()),n=e.reduce(((e,t)=>(e[t.getType()]=i.store.getAccountData(t.getType()),e)),{});i.store.storeAccountDataEvents(e),e.forEach((function(e){if(e.getType()===m.b.PushRules){const t=e.getContent();i.setPushRules(t)}const t=n[e.getType()];return i.emit(h.b.AccountData,e,t),e}))}if(t.to_device&&Array.isArray(t.to_device.events)&&t.to_device.events.length>0){let e=t.to_device.events.filter(s.A);this.syncOpts.cryptoCallbacks&&(e=await this.syncOpts.cryptoCallbacks.preprocessToDeviceMessages(e));const n=[];e.map(i.getEventMapper({toDevice:!0})).map((e=>{if("m.key.verification.cancel"===e.getType()){const t=e.getContent().transaction_id;t&&n.push(t)}return e})).forEach((function(e){const t=e.getContent();if("m.room.message"!=e.getType()||"m.bad.encrypted"!=t.msgtype){if("m.key.verification.start"===e.getType()||"m.key.verification.request"===e.getType()){const r=t.transaction_id;n.includes(r)&&e.flagCancelled()}i.emit(h.b.ToDeviceEvent,e)}else u.a.log("Ignoring undecryptable to-device event from "+e.getSender())}))}else this.catchingUp=!1;let o=[],l=[],d=[];if(t.rooms&&(t.rooms.invite&&(o=this.mapSyncResponseToRoomArray(t.rooms.invite)),t.rooms.join&&(l=this.mapSyncResponseToRoomArray(t.rooms.join)),t.rooms.leave&&(d=this.mapSyncResponseToRoomArray(t.rooms.leave))),this.notifEvents=[],await s.D(o,(async e=>{var t;const n=e.room,r=this.mapSyncEventsFormat(e.invite_state,n);await this.injectRoomEvents(n,r);const o=null===(t=n.currentState.getStateEvents(m.b.RoomMember,i.getUserId()))||void 0===t?void 0:t.getSender(),a=i.crypto;if(a){const e=await a.cryptoStore.takeParkedSharedHistory(n.roomId);for(const t of e)t.senderId===o&&await a.olmDevice.addInboundGroupSession(n.roomId,t.senderKey,t.forwardingCurve25519KeyChain,t.sessionId,t.sessionKey,t.keysClaimed,!0,{sharedHistory:!0,untrusted:!0})}e.isBrandNewRoom?(n.recalculate(),i.store.storeRoom(n),i.emit(h.b.Room,n)):n.recalculate(),r.forEach((function(e){i.emit(h.b.Event,e)}))})),await s.D(l,(async t=>{var n;const r=t.room,o=this.mapSyncEventsFormat(t.state,r),s=this.mapSyncEventsFormat(t.timeline,r,!1),l=this.mapSyncEventsFormat(t.ephemeral),d=this.mapSyncEventsFormat(t.account_data),p=i.isRoomEncrypted(r.roomId);if(t.unread_notifications){var g,f;if(!p||0===t.unread_notifications.notification_count)r.setUnreadNotificationCount(a.b.Total,null!==(g=t.unread_notifications.notification_count)&&void 0!==g?g:0);if(!p||r.getUnreadNotificationCount(a.b.Highlight)<=0)r.setUnreadNotificationCount(a.b.Highlight,null!==(f=t.unread_notifications.highlight_count)&&void 0!==f?f:0)}const _=null!==(n=t[b.a.name])&&void 0!==n?n:t[b.a.altName];if(_){r.resetThreadUnreadNotificationCount(Object.keys(_));for(const[e,t]of Object.entries(_)){var v;if(!p||0===t.notification_count)r.setThreadUnreadNotificationCount(e,a.b.Total,null!==(v=t.notification_count)&&void 0!==v?v:0);const n=r.getThreadUnreadNotificationCount(e,a.b.Highlight)<=0;var y;if(!p||p&&n)r.setThreadUnreadNotificationCount(e,a.b.Highlight,null!==(y=t.highlight_count)&&void 0!==y?y:0)}}else r.resetThreadUnreadNotificationCount();if(t.timeline=t.timeline||{},t.isBrandNewRoom)null!==t.timeline.prev_batch&&r.getLiveTimeline().setPaginationToken(t.timeline.prev_batch,c.b.BACKWARDS);else if(t.timeline.limited){let n=!0;for(let e=s.length-1;e>=0;e--){const t=s[e].getId();if(r.getTimelineForEvent(t)){x(`Already have event ${t} in limited sync - not resetting`),n=!1,s.splice(0,e);break}}var E;if(n)r.resetLiveTimeline(t.timeline.prev_batch,this.syncOpts.canResetEntireTimeline(r.roomId)?null:null!==(E=e.oldSyncToken)&&void 0!==E?E:null),i.resetNotifTimelineSet()}if(this.syncOpts.cryptoCallbacks)for(const e of o.concat(s))e.isState()&&e.getType()===m.b.RoomEncryption&&""===e.getStateKey()&&await this.syncOpts.cryptoCallbacks.onCryptoEvent(r,e);try{await this.injectRoomEvents(r,o,s,e.fromCache)}catch(e){u.a.error(`Failed to process events on room ${r.roomId}:`,e)}t.summary&&r.setSummary(t.summary),r.addEphemeralEvents(l),r.addAccountData(d),r.recalculate(),t.isBrandNewRoom&&(i.store.storeRoom(r),i.emit(h.b.Room,r)),this.processEventsForNotifs(r,s);const S=e=>i.emit(h.b.Event,e);o.forEach(S),s.forEach(S),l.forEach(S),d.forEach(S),r.decryptCriticalEvents()})),await s.D(d,(async e=>{const t=e.room,n=this.mapSyncEventsFormat(e.state,t),r=this.mapSyncEventsFormat(e.timeline,t),o=this.mapSyncEventsFormat(e.account_data);await this.injectRoomEvents(t,n,r),t.addAccountData(o),t.recalculate(),e.isBrandNewRoom&&(i.store.storeRoom(t),i.emit(h.b.Room,t)),this.processEventsForNotifs(t,r),n.forEach((function(e){i.emit(h.b.Event,e)})),r.forEach((function(e){i.emit(h.b.Event,e)})),o.forEach((function(e){i.emit(h.b.Event,e)}))})),e.oldSyncToken&&this.notifEvents.length&&(this.notifEvents.sort((function(e,t){return e.getTs()-t.getTs()})),this.notifEvents.forEach((function(e){var t;null===(t=i.getNotifTimelineSet())||void 0===t||t.addLiveEvent(e)}))),t.device_lists&&this.syncOpts.crypto&&await this.syncOpts.crypto.handleDeviceListChanges(e,t.device_lists),this.syncOpts.crypto&&t.device_one_time_keys_count){const e=t.device_one_time_keys_count.signed_curve25519||0;this.syncOpts.crypto.updateOneTimeKeyCount(e)}if(this.syncOpts.crypto&&(t.device_unused_fallback_key_types||t["org.matrix.msc2732.device_unused_fallback_key_types"])){const e=t.device_unused_fallback_key_types||t["org.matrix.msc2732.device_unused_fallback_key_types"];this.syncOpts.crypto.setNeedsNewFallback(Array.isArray(e)&&!e.includes("signed_curve25519"))}}startKeepAlives(e){return void 0===e&&(e=2e3+Math.floor(5e3*Math.random())),null!==this.keepAliveTimer&&clearTimeout(this.keepAliveTimer),e>0?this.keepAliveTimer=setTimeout(this.pokeKeepAlive.bind(this),e):this.pokeKeepAlive(),this.connectionReturnedDefer||(this.connectionReturnedDefer=s.m()),this.connectionReturnedDefer.promise}pokeKeepAlive(){var e;let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const n=()=>{clearTimeout(this.keepAliveTimer),this.connectionReturnedDefer&&(this.connectionReturnedDefer.resolve(t),this.connectionReturnedDefer=void 0)};this.client.http.request(p.i.Get,"/_matrix/client/versions",void 0,void 0,{prefix:"",localTimeoutMs:15e3,abortSignal:null===(e=this.abortController)||void 0===e?void 0:e.signal}).then((()=>{n()}),(e=>{400==e.httpStatus||404==e.httpStatus?this.keepAliveTimer=setTimeout(n,2e3):(t=!0,this.keepAliveTimer=setTimeout(this.pokeKeepAlive.bind(this,t),5e3+Math.floor(5e3*Math.random())),this.updateSyncState(w.Error,{error:e}))}))}mapSyncResponseToRoomArray(e){const t=this.client;return Object.keys(e).filter((e=>!Object(s.Q)(e))).map((n=>{const r=e[n];let i=t.store.getRoom(n),o=!1;return i||(i=this.createRoom(n),o=!0),r.room=i,r.isBrandNewRoom=o,r}))}mapSyncEventsFormat(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!Array.isArray(e.events))return[];const r=this.client.getEventMapper({decrypt:n});return e.events.filter(s.A).map((function(e){return t&&(e.room_id=t.roomId),r(e)}))}resolveInvites(e){if(!e||!this.opts.resolveInvitesToProfiles)return;const t=this.client;e.getMembersWithMembership("invite").forEach((function(n){if(n.requestedProfileInfo)return;n.requestedProfileInfo=!0;const r=t.getUser(n.userId);let i;i=r?Promise.resolve({avatar_url:r.avatarUrl,displayname:r.displayName}):t.getProfileInfo(n.userId),i.then((function(t){const r=n.events.member;"invite"===(null==r?void 0:r.getContent().membership)&&(r.getContent().avatar_url=t.avatar_url,r.getContent().displayname=t.displayname,n.setMembershipEvent(r,e.currentState))}),(function(e){}))}))}async injectRoomEvents(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=e.getLiveTimeline(),o=0==i.getEvents().length;if(o){for(const e of t)this.client.getPushActionsForEvent(e);i.initialiseState(t,{timelineWasEmpty:o})}this.resolveInvites(e),e.recalculate(),o||(e.oldState.setStateEvents(t||[]),e.currentState.setStateEvents(t||[])),e.addLiveEvents(n||[],{fromCache:r,timelineWasEmpty:o}),this.client.processBeaconEvents(e,n)}processEventsForNotifs(e,t){if(this.client.getNotifTimelineSet())for(const e of t){var n;const t=this.client.getPushActionsForEvent(e);null!=t&&t.notify&&null!==(n=t.tweaks)&&void 0!==n&&n.highlight&&this.notifEvents.push(e)}}getGuestFilter(){return"{}"}updateSyncState(e,t){const n=this.syncState;this.syncState=e,this.syncStateData=t,this.client.emit(h.b.Sync,this.syncState,n,t)}}function I(e,t){const n=new o.a(t);return e.reEmitter.reEmit(n,[o.b.AvatarUrl,o.b.DisplayName,o.b.Presence,o.b.CurrentlyActive,o.b.LastPresenceTs]),n}function A(e,t,n){const{timelineSupport:r}=e,i=new a.c(t,e,e.getUserId(),{lazyLoadMembers:n.lazyLoadMembers,pendingEventOrdering:n.pendingEventOrdering,timelineSupport:r});return e.reEmitter.reEmit(i,[a.d.Name,a.d.Redaction,a.d.RedactionCancelled,a.d.Receipt,a.d.Tags,a.d.LocalEchoUpdated,a.d.AccountData,a.d.MyMembership,a.d.Timeline,a.d.TimelineReset,g.b.Events,g.b.Members,g.b.NewMember,g.b.Update,_.b.New,_.b.Update,_.b.Destroy,_.b.LivenessChange]),i.on(g.b.NewMember,((t,n,r)=>{var i;r.user=null!==(i=e.getUser(r.userId))&&void 0!==i?i:void 0,e.reEmitter.reEmit(r,[f.b.Name,f.b.Typing,f.b.PowerLevel,f.b.Membership])})),i}}).call(this,n(14))},function(e,t,n){e.exports=n(1002)()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(297);function i(e){return"string"==typeof e?e.startsWith(r.a):e instanceof r.b}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(1372),i=n(330),o=n(457),a=n(1383),s=n(456),l=n(783),c=n(1384),u=n(1386),d=n(1387),h=n(1388),p=n(1389),m=n(784),g=n(1390),f=n(785),_=n(1391),b=n(786),v=n(787);t.addBreadcrumb=r.addBreadcrumb,t.captureEvent=r.captureEvent,t.captureException=r.captureException,t.captureMessage=r.captureMessage,t.configureScope=r.configureScope,t.setContext=r.setContext,t.setExtra=r.setExtra,t.setExtras=r.setExtras,t.setTag=r.setTag,t.setTags=r.setTags,t.setUser=r.setUser,t.startTransaction=r.startTransaction,t.withScope=r.withScope,t.Hub=i.Hub,t.getCurrentHub=i.getCurrentHub,t.getHubFromCarrier=i.getHubFromCarrier,t.getMainCarrier=i.getMainCarrier,t.makeMain=i.makeMain,t.setHubOnCarrier=i.setHubOnCarrier,t.closeSession=o.closeSession,t.makeSession=o.makeSession,t.updateSession=o.updateSession,t.SessionFlusher=a.SessionFlusher,t.Scope=s.Scope,t.addGlobalEventProcessor=s.addGlobalEventProcessor,t.getEnvelopeEndpointWithUrlEncodedAuth=l.getEnvelopeEndpointWithUrlEncodedAuth,t.getReportDialogEndpoint=l.getReportDialogEndpoint,t.BaseClient=c.BaseClient,t.initAndBind=u.initAndBind,t.createTransport=d.createTransport,t.makeOfflineTransport=h.makeOfflineTransport,t.SDK_VERSION=p.SDK_VERSION,t.getIntegrationsToSetup=m.getIntegrationsToSetup,t.Integrations=g,t.prepareEvent=f.prepareEvent,t.hasTracingEnabled=_.hasTracingEnabled,t.FunctionToString=b.FunctionToString,t.InboundFilters=v.InboundFilters},function(e,t,n){"use strict";n.d(t,"b",(function(){return O})),n.d(t,"a",(function(){return I})),n.d(t,"d",(function(){return A})),n.d(t,"c",(function(){return R}));var r=n(13),i=n.n(r),o=n(147),a=n(129),s=n(160),l=n(1),c=n(122),u=n(127),d=n(121),h=n(124),p=n(285),m=n(434),g=n(792),f=n(178),_=n(249),b=n(203),v=n(128),y=n(144),E=n(134),S=n(305),w=n(307),T=n(242),C=n(807),x=n(125);function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const k={[a.b.RoomName]:50,[a.b.RoomAvatar]:50,[a.b.RoomPowerLevels]:100,[a.b.RoomHistoryVisibility]:100,[a.b.RoomCanonicalAlias]:50,[a.b.RoomTombstone]:100,[a.b.RoomServerAcl]:100,[a.b.RoomEncryption]:100};async function O(e){void 0===(e=e||{}).spinner&&(e.spinner=!0),void 0===e.guestAccess&&(e.guestAccess=!0),void 0===e.encryption&&(e.encryption=!1);const t=c.a.get();if(t.isGuest())return h.a.dispatch({action:"require_registration"}),null;const n=e.dmUserId?s.d.TrustedPrivateChat:s.d.PrivateChat,r=e.createOpts||{};if(r.preset=r.preset||n,r.visibility=r.visibility||s.f.Private,e.dmUserId&&void 0===r.invite)switch(Object(m.b)(e.dmUserId)){case"mx-user-id":r.invite=[e.dmUserId];break;case"email":r.invite_3pid=[{id_server:c.a.get().getIdentityServerUrl(!0),medium:"email",address:e.dmUserId}]}if(e.dmUserId&&void 0===r.is_direct&&(r.is_direct=!0),e.roomType?(r.creation_content=D(D({},r.creation_content),{},{[a.i]:e.roomType}),e.roomType===a.j.ElementVideo?r.power_level_content_override={events:D(D({},k),{},{[b.e.MEMBER_EVENT_TYPE]:0,"im.vector.modular.widgets":200}),users:{[t.getUserId()]:200}}:e.roomType===a.j.UnstableCall&&(r.power_level_content_override={events:D(D({},k),{},{[b.d.MEMBER_EVENT_TYPE.name]:0,[b.d.CALL_EVENT_TYPE.name]:200}),users:{[t.getUserId()]:200}})):x.b.getValue("feature_group_calls")&&(r.power_level_content_override={events:D(D({},k),{},{[b.d.MEMBER_EVENT_TYPE.name]:100,[b.d.CALL_EVENT_TYPE.name]:100})}),void 0===e.andView&&(e.andView=!0),r.initial_state=r.initial_state||[],e.guestAccess&&r.initial_state.push({type:"m.room.guest_access",state_key:"",content:{guest_access:"can_join"}}),e.encryption&&r.initial_state.push({type:"m.room.encryption",state_key:"",content:{algorithm:"m.megolm.v1.aes-sha2"}}),e.parentSpace&&(r.initial_state.push(Object(_.b)(e.parentSpace,!0)),e.historyVisibility||(e.historyVisibility=r.preset===s.d.PublicChat?s.b.WorldReadable:s.b.Invited),e.joinRule===s.c.Restricted&&(r.room_version=C.a.RestrictedRooms,r.initial_state.push({type:a.b.RoomJoinRules,content:{join_rule:s.c.Restricted,allow:[{type:s.e.RoomMembership,room_id:e.parentSpace.roomId}]}}))),e.joinRule&&e.joinRule!==s.c.Restricted&&r.initial_state.push({type:a.b.RoomJoinRules,content:{join_rule:e.joinRule}}),e.avatar){let n=e.avatar;e.avatar instanceof File&&({content_uri:n}=await t.uploadContent(e.avatar)),r.initial_state.push({type:a.b.RoomAvatar,content:{url:n}})}let i,g,S;return e.historyVisibility&&r.initial_state.push({type:a.b.RoomHistoryVisibility,content:{history_visibility:e.historyVisibility}}),e.spinner&&(i=u.b.createDialog(E.a,void 0,"mx_Dialog_spinner")),t.createRoom(r).catch((function(e){return 403===e.httpStatus&&"M_UNKNOWN"===e.errcode&&"Not allowed to publish room"===e.data.error?(l.a.warn("Failed to publish room, try again without publishing it"),r.visibility=s.f.Private,t.createRoom(r)):Promise.reject(e)})).finally((function(){i&&i.close()})).then((async n=>{g=n.room_id,S=new Promise((e=>{const n=t.getRoom(g);if(n)e(n);else{const n=r=>{r.roomId===g&&(e(r),t.off(o.b.Room,n))};t.on(o.b.Room,n)}})),e.dmUserId&&await p.d(g,e.dmUserId)})).then((()=>{if(e.parentSpace)return f.a.instance.addRoomToSpace(e.parentSpace,g,[t.getDomain()],e.suggested)})).then((async()=>{if(e.roomType===a.j.ElementVideo){await b.e.create(await S);const e=(await S).currentState.getStateEvents(a.b.RoomPowerLevels,"");await t.setPowerLevel(g,t.getUserId(),100,e)}else if(e.roomType===a.j.UnstableCall){await b.d.create(await S);const e=(await S).currentState.getStateEvents(a.b.RoomPowerLevels,"");await t.setPowerLevel(g,t.getUserId(),100,e)}})).then((function(){return e.andView&&h.a.dispatch({action:v.a.ViewRoom,room_id:g,should_peek:!1,joining:!0,justCreatedOpts:e,metricsTrigger:"Created"}),g}),(function(t){if(e.inlineErrors)throw t;h.a.dispatch({action:v.a.JoinRoomError,roomId:g}),l.a.error("Failed to create room "+g+" "+t);let n=Object(d.a)("Server may be unavailable, overloaded, or you hit a bug.");return"M_UNSUPPORTED_ROOM_VERSION"===t.errcode&&(n=Object(d.a)("The server does not support the room version specified.")),u.b.createDialog(y.a,{title:Object(d.a)("Failure to create room"),description:n}),null}))}async function I(e,t){try{const n=await e.downloadKeys(t);if(0===n.size)return!1;for(const e of n.values())if(0===e.size)return!1}catch(e){return l.a.error("Error determining if it's possible to encrypt to all users: ",e),!1}return!0}async function A(e,t,n){const r=Object(S.a)(e,t);let i;return i=r?r.roomId:await O({dmUserId:t,spinner:!1,andView:!1,createOpts:{creation_content:{[g.a]:n}}}),i}async function R(e,t){const n=Object(S.a)(e,t);let r;if(n)r=n.roomId;else{let n;Object(w.a)()&&(n=await I(e,[t])),r=await O({encryption:n,dmUserId:t,spinner:!1,andView:!1}),await Object(T.e)(e,r,t)}return r}},function(e,t,n){"use strict";n.d(t,"b",(function(){return S})),n.d(t,"a",(function(){return w}));var r=n(13),i=n.n(r),o=n(147),a=n(202),s=n(124),l=n(190),c=n(197),u=n(146),d=n(278);class h extends d.a{constructor(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;super(),this.byTileCount=e,this.getRoomFn=t,i()(this,"rooms",[]),i()(this,"states",{}),i()(this,"onRoomNotificationStateUpdate",(()=>{this.calculateTotalState()}))}get symbol(){return this._color===c.a.Unsent?"!":null}setRooms(e){if(this.byTileCount)return this.rooms=e,void this.calculateTotalState();const t=this.rooms,n=Object(u.a)(t,e);this.rooms=[...e];for(const e of n.removed){const t=this.states[e.roomId];t&&(delete this.states[e.roomId],t.off(d.b.Update,this.onRoomNotificationStateUpdate))}for(const e of n.added){const t=this.getRoomFn(e);t.on(d.b.Update,this.onRoomNotificationStateUpdate),this.states[e.roomId]=t}this.calculateTotalState()}getForRoom(e){const t=this.states[e.roomId];if(!t)throw new Error("Unknown room for notification state");return t}destroy(){super.destroy();for(const e of Object.values(this.states))e.off(d.b.Update,this.onRoomNotificationStateUpdate);this.states={}}calculateTotalState(){const e=this.snapshot();if(this.byTileCount)this._color=c.a.Red,this._count=this.rooms.length;else{this._count=0,this._color=c.a.None;for(const e of Object.values(this.states))this._count+=e.count,this._color=Math.max(this.color,e.color)}this.emitIfUpdated(e)}}var p=n(143),m=n(140),g=n(122),f=n(696),_=n(264);class b extends d.a{constructor(e){super(),this.room=e,i()(this,"handleLocalEchoUpdated",(()=>{this.updateNotificationState()})),i()(this,"handleReadReceipt",((e,t)=>{Object(f.a)(e,g.a.get())&&t.roomId===this.room.roomId&&this.updateNotificationState()})),i()(this,"handleMembershipUpdate",(()=>{this.updateNotificationState()})),i()(this,"handleNotificationCountUpdate",(()=>{this.updateNotificationState()})),i()(this,"onEventDecrypted",(e=>{e.getRoomId()===this.room.roomId&&this.updateNotificationState()})),i()(this,"handleRoomEventUpdate",(e=>{(null==e?void 0:e.getRoomId())===this.room.roomId&&this.updateNotificationState()})),i()(this,"handleAccountDataUpdate",(e=>{"m.push_rules"===e.getType()&&this.updateNotificationState()}));const t=this.room.client;this.room.on(m.d.Receipt,this.handleReadReceipt),this.room.on(m.d.MyMembership,this.handleMembershipUpdate),this.room.on(m.d.LocalEchoUpdated,this.handleLocalEchoUpdated),this.room.on(m.d.Timeline,this.handleRoomEventUpdate),this.room.on(m.d.Redaction,this.handleRoomEventUpdate),this.room.on(m.d.UnreadNotifications,this.handleNotificationCountUpdate),t.on(p.c.Decrypted,this.onEventDecrypted),t.on(o.b.AccountData,this.handleAccountDataUpdate),this.updateNotificationState()}destroy(){super.destroy();const e=this.room.client;this.room.removeListener(m.d.Receipt,this.handleReadReceipt),this.room.removeListener(m.d.MyMembership,this.handleMembershipUpdate),this.room.removeListener(m.d.LocalEchoUpdated,this.handleLocalEchoUpdated),this.room.removeListener(m.d.Timeline,this.handleRoomEventUpdate),this.room.removeListener(m.d.Redaction,this.handleRoomEventUpdate),e.removeListener(p.c.Decrypted,this.onEventDecrypted),e.removeListener(o.b.AccountData,this.handleAccountDataUpdate)}updateNotificationState(){const e=this.snapshot(),{color:t,symbol:n,count:r}=_.b(this.room);this._color=t,this._symbol=n,this._count=r,this.emitIfUpdated(e)}}class v extends d.a{constructor(){super(),i()(this,"totalStatesWithUnread",0),this._symbol=null,this._count=0,this._color=c.a.None}get numUnreadStates(){return this.totalStatesWithUnread}add(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.symbol&&t&&(this._symbol=e.symbol),e.count&&(this._count+=e.count),e.color>this.color&&(this._color=e.color),e.hasUnreadCount&&this.totalStatesWithUnread++}}var y=n(656),E=n(189);const S=Symbol("update-status-indicator");class w extends a.a{constructor(){super(s.a,{}),i()(this,"roomMap",new Map),i()(this,"listMap",new Map),i()(this,"_globalState",new v),i()(this,"onSync",((e,t,n)=>{const r=new v,i=this.matrixClient.getVisibleRooms();let o=0;for(const e of i)y.a.instance.isRoomVisible(e)&&(r.add(this.getRoomState(e)),e.tags[l.a.Favourite]&&!e.getType()&&o++);E.a.instance.setProperty("numFavouriteRooms",o),this.globalState.symbol===r.symbol&&this.globalState.count===r.count&&this.globalState.color===r.color&&this.globalState.numUnreadStates===r.numUnreadStates&&e===t||(this._globalState=r,this.emit(S,r,e,t,n))}))}get globalState(){return this._globalState}getListState(e){if(this.listMap.has(e))return this.listMap.get(e);const t=e===l.a.Invite,n=new h(t,(e=>this.getRoomState(e)));return this.listMap.set(e,n),n}getRoomState(e){return this.roomMap.has(e)||this.roomMap.set(e,new b(e)),this.roomMap.get(e)}static get instance(){return w.internalInstance}async onReady(){this.matrixClient.on(o.b.Sync,this.onSync)}async onNotReady(){var e;null===(e=this.matrixClient)||void 0===e||e.off(o.b.Sync,this.onSync);for(const e of this.roomMap.values())e.destroy()}async onAction(e){}}i()(w,"internalInstance",(()=>{const e=new w;return e.start(),e})())},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const r={};function i(e){var t,n;return null===(t=null===(n=r.shouldShowComponent)||void 0===n?void 0:n.call(r,e))||void 0===t||t}},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s}));var r=n(13),i=n.n(r),o=n(158);let a;!function(e){e.DisplayName="User.displayName",e.AvatarUrl="User.avatarUrl",e.Presence="User.presence",e.CurrentlyActive="User.currentlyActive",e.LastPresenceTs="User.lastPresenceTs"}(a||(a={}));class s extends o.b{constructor(e){super(),this.userId=e,i()(this,"modified",-1),i()(this,"displayName",void 0),i()(this,"rawDisplayName",void 0),i()(this,"avatarUrl",void 0),i()(this,"presenceStatusMsg",void 0),i()(this,"presence","offline"),i()(this,"lastActiveAgo",0),i()(this,"lastPresenceTs",0),i()(this,"currentlyActive",!1),i()(this,"events",{}),this.displayName=e,this.rawDisplayName=e,this.updateModifiedTime()}setPresenceEvent(e){if("m.presence"!==e.getType())return;const t=null===this.events.presence;this.events.presence=e;const n=[];(e.getContent().presence!==this.presence||t)&&n.push(a.Presence),e.getContent().avatar_url&&e.getContent().avatar_url!==this.avatarUrl&&n.push(a.AvatarUrl),e.getContent().displayname&&e.getContent().displayname!==this.displayName&&n.push(a.DisplayName),void 0!==e.getContent().currently_active&&e.getContent().currently_active!==this.currentlyActive&&n.push(a.CurrentlyActive),this.presence=e.getContent().presence,n.push(a.LastPresenceTs),e.getContent().status_msg&&(this.presenceStatusMsg=e.getContent().status_msg),e.getContent().displayname&&(this.displayName=e.getContent().displayname),e.getContent().avatar_url&&(this.avatarUrl=e.getContent().avatar_url),this.lastActiveAgo=e.getContent().last_active_ago,this.lastPresenceTs=Date.now(),this.currentlyActive=e.getContent().currently_active,this.updateModifiedTime();for(const t of n)this.emit(t,e,this)}setDisplayName(e){const t=this.displayName;this.displayName=e,e!==t&&this.updateModifiedTime()}setRawDisplayName(e){this.rawDisplayName=e}setAvatarUrl(e){const t=this.avatarUrl;this.avatarUrl=e,e!==t&&this.updateModifiedTime()}updateModifiedTime(){this.modified=Date.now()}getLastModifiedTime(){return this.modified}getLastActiveTs(){return this.lastPresenceTs-this.lastActiveAgo}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s})),n.d(t,"c",(function(){return l}));const r="abcdefghijklmnopqrstuvwxyz",i="ABCDEFGHIJKLMNOPQRSTUVWXYZ",o="0123456789";function a(e){return c(e,i+r+o)}function s(e){return c(e,r)}function l(e){return c(e,i)}function c(e,t){let n="";for(let r=0;r<e;++r)n+=t.charAt(Math.floor(Math.random()*t.length));return n}},function(e,t,n){"use strict";n.d(t,"d",(function(){return b})),n.d(t,"f",(function(){return v})),n.d(t,"c",(function(){return E})),n.d(t,"b",(function(){return S})),n.d(t,"g",(function(){return C})),n.d(t,"e",(function(){return w})),n.d(t,"a",(function(){return k}));var r=n(13),i=n.n(r),o=n(158),a=n(497),s=n(188),l=n(151),c=n(1),u=n(287),d=n(357),h=n(129),p=n(508),m=n(509),g=n(16);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}let b,v,y,E,S,w;!function(e){e.Ring="m.ring",e.Prompt="m.prompt",e.Room="m.room"}(b||(b={})),function(e){e.Video="m.video",e.Voice="m.voice"}(v||(v={})),function(e){e.CallEnded="call_ended"}(y||(y={})),function(e){e.GroupCallStateChanged="group_call_state_changed",e.ActiveSpeakerChanged="active_speaker_changed",e.CallsChanged="calls_changed",e.UserMediaFeedsChanged="user_media_feeds_changed",e.ScreenshareFeedsChanged="screenshare_feeds_changed",e.LocalScreenshareStateChanged="local_screenshare_state_changed",e.LocalMuteStateChanged="local_mute_state_changed",e.ParticipantsChanged="participants_changed",e.Error="error"}(E||(E={})),function(e){e.NoUserMedia="no_user_media",e.UnknownDevice="unknown_device",e.PlaceCallFailed="place_call_failed"}(S||(S={}));class T extends Error{constructor(e,t,n){n?(super(t+": "+n),i()(this,"code",void 0)):(super(t),i()(this,"code",void 0)),this.code=e}}class C extends T{constructor(e){super(S.UnknownDevice,"No device found for "+e),this.userId=e}}class x extends Error{constructor(){super("Cannot unmute: another user is speaking")}}!function(e){e.LocalCallFeedUninitialized="local_call_feed_uninitialized",e.InitializingLocalCallFeed="initializing_local_call_feed",e.LocalCallFeedInitialized="local_call_feed_initialized",e.Entered="entered",e.Ended="ended"}(w||(w={}));const F=36e5;function D(e){var t;return(null===(t=e.getOpponentMember())||void 0===t?void 0:t.userId)||e.invitee||null}class k extends o.b{constructor(e,t,n,r,o,d,p,m,g){var f,_;super(),this.client=e,this.room=t,this.type=n,this.isPtt=r,this.intent=o,this.dataChannelsEnabled=p,this.dataChannelOptions=m,i()(this,"activeSpeakerInterval",1e3),i()(this,"retryCallInterval",5e3),i()(this,"participantTimeout",15e3),i()(this,"pttMaxTransmitTime",2e4),i()(this,"activeSpeaker",void 0),i()(this,"localCallFeed",void 0),i()(this,"localScreenshareFeed",void 0),i()(this,"localDesktopCapturerSourceId",void 0),i()(this,"userMediaFeeds",[]),i()(this,"screenshareFeeds",[]),i()(this,"groupCallId",void 0),i()(this,"allowCallWithoutVideoAndAudio",void 0),i()(this,"calls",new Map),i()(this,"callHandlers",new Map),i()(this,"activeSpeakerLoopInterval",void 0),i()(this,"retryCallLoopInterval",void 0),i()(this,"retryCallCounts",new Map),i()(this,"reEmitter",void 0),i()(this,"transmitTimer",null),i()(this,"participantsExpirationTimer",null),i()(this,"resendMemberStateTimer",null),i()(this,"initWithAudioMuted",!1),i()(this,"initWithVideoMuted",!1),i()(this,"initCallFeedPromise",void 0),i()(this,"_state",w.LocalCallFeedUninitialized),i()(this,"_participants",new Map),i()(this,"_creationTs",null),i()(this,"_enteredViaAnotherSession",!1),i()(this,"onIncomingCall",(e=>{var t,n;if(e.roomId!==this.room.roomId)return;if(e.state!==s.f.Ringing)return void c.a.warn(`GroupCall ${this.groupCallId} onIncomingCall() incoming call no longer in ringing state - ignoring`);if(!e.groupCallId||e.groupCallId!==this.groupCallId)return c.a.log(`GroupCall ${this.groupCallId} onIncomingCall() ignored because it doesn't match the current group call`),void e.reject();const r=null===(t=e.getOpponentMember())||void 0===t?void 0:t.userId;if(void 0===r)return void c.a.warn(`GroupCall ${this.groupCallId} onIncomingCall() incoming call with no member - ignoring`);const i=null!==(n=this.calls.get(r))&&void 0!==n?n:new Map,o=i.get(e.getOpponentDeviceId());(null==o?void 0:o.callId)!==e.callId&&(c.a.log(`GroupCall ${this.groupCallId} onIncomingCall() incoming call (userId=${r}, callId=${e.callId})`),o&&this.disposeCall(o,s.c.Replaced),this.initCall(e),e.answerWithCallFeeds(this.getLocalFeeds().map((e=>e.clone()))),i.set(e.getOpponentDeviceId(),e),this.calls.set(r,i),this.emit(E.CallsChanged,this.calls))})),i()(this,"onRetryCallLoop",(()=>{let e=!1;for(const[{userId:r},i]of this.participants){const o=this.calls.get(r);let a=this.retryCallCounts.get(r);for(const[s,l]of i){var t,n;const i=null==o?void 0:o.get(s),c=null!==(t=null===(n=a)||void 0===n?void 0:n.get(s))&&void 0!==t?t:0;(null==i?void 0:i.getOpponentSessionId())!==l.sessionId&&this.wantsOutgoingCall(r,s)&&c<3&&(void 0===a&&(a=new Map,this.retryCallCounts.set(r,a)),a.set(s,c+1),e=!0)}}e&&this.placeOutgoingCalls()})),i()(this,"onCallFeedsChanged",(e=>{const t=D(e),n=e.getOpponentDeviceId();if(!t)throw new Error("Cannot change call feeds without user id");const r=this.getUserMediaFeed(t,n),i=e.remoteUsermediaFeed;i!==r&&(!r&&i?this.addUserMediaFeed(i):r&&i?this.replaceUserMediaFeed(r,i):r&&!i&&this.removeUserMediaFeed(r));const o=this.getScreenshareFeed(t,n),a=e.remoteScreensharingFeed;a!==o&&(!o&&a?this.addScreenshareFeed(a):o&&a?this.replaceScreenshareFeed(o,a):o&&!a&&this.removeScreenshareFeed(o))})),i()(this,"onCallStateChanged",((e,t,n)=>{var r;const i=this.localCallFeed.isAudioMuted();e.localUsermediaStream&&e.isMicrophoneMuted()!==i&&e.setMicrophoneMuted(i);const o=this.localCallFeed.isVideoMuted();e.localUsermediaStream&&e.isLocalVideoMuted()!==o&&e.setLocalVideoMuted(o);const a=null===(r=e.getOpponentMember())||void 0===r?void 0:r.userId;if(t===s.f.Connected&&a){const t=this.retryCallCounts.get(a);null==t||t.delete(e.getOpponentDeviceId()),0===(null==t?void 0:t.size)&&this.retryCallCounts.delete(a)}})),i()(this,"onCallHangup",(e=>{var t,n;if(e.hangupReason===s.c.Replaced)return;const r=null!==(t=null===(n=e.getOpponentMember())||void 0===n?void 0:n.userId)&&void 0!==t?t:this.room.getMember(e.invitee).userId,i=this.calls.get(r);(null==i?void 0:i.get(e.getOpponentDeviceId()))===e&&(this.disposeCall(e,e.hangupReason),i.delete(e.getOpponentDeviceId()),0===i.size&&this.calls.delete(r),this.emit(E.CallsChanged,this.calls))})),i()(this,"onCallReplaced",((e,t)=>{const n=e.getOpponentMember().userId;let r=this.calls.get(n);void 0===r&&(r=new Map,this.calls.set(n,r)),this.disposeCall(e,s.c.Replaced),this.initCall(t),r.set(e.getOpponentDeviceId(),t),this.emit(E.CallsChanged,this.calls)})),i()(this,"onActiveSpeakerLoop",(()=>{let e,t;for(const n of this.userMediaFeeds){if(n.isLocal()&&this.userMediaFeeds.length>1)continue;const r=n.speakingVolumeSamples.reduce(((e,t)=>e+Math.max(t,a.c)))/n.speakingVolumeSamples.length;(!e||r>e)&&(e=r,t=n)}t&&this.activeSpeaker!==t&&e&&e>a.c&&(this.activeSpeaker=t,this.emit(E.ActiveSpeakerChanged,this.activeSpeaker))})),i()(this,"onRoomState",(()=>this.updateParticipants())),i()(this,"onParticipantsChanged",(()=>{this.state===w.Entered&&this.placeOutgoingCalls()})),i()(this,"onStateChanged",((e,t)=>{e!==w.Entered&&t!==w.Entered&&e!==w.Ended||(this.updateParticipants(),this.updateMemberState().catch((e=>c.a.error(`GroupCall ${this.groupCallId} onStateChanged() failed to update member state devices"`,e))))})),i()(this,"onLocalFeedsChanged",(()=>{this.state===w.Entered&&this.updateMemberState().catch((e=>c.a.error(`GroupCall ${this.groupCallId} onLocalFeedsChanged() failed to update member state feeds`,e)))})),this.reEmitter=new u.a(this),this.groupCallId=null!=d?d:Object(s.i)(),this.creationTs=null!==(f=null===(_=t.currentState.getStateEvents(h.b.GroupCallPrefix,this.groupCallId))||void 0===_?void 0:_.getTs())&&void 0!==f?f:null,this.updateParticipants(),t.on(l.b.Update,this.onRoomState),this.on(E.ParticipantsChanged,this.onParticipantsChanged),this.on(E.GroupCallStateChanged,this.onStateChanged),this.on(E.LocalScreenshareStateChanged,this.onLocalFeedsChanged),this.allowCallWithoutVideoAndAudio=!!g}async create(){this.creationTs=Date.now(),this.client.groupCallEventHandler.groupCalls.set(this.room.roomId,this),this.client.emit(m.b.Outgoing,this);const e={"m.intent":this.intent,"m.type":this.type,"io.element.ptt":this.isPtt,dataChannelsEnabled:this.dataChannelsEnabled,dataChannelOptions:this.dataChannelsEnabled?this.dataChannelOptions:void 0};return await this.client.sendStateEvent(this.room.roomId,h.b.GroupCallPrefix,e,this.groupCallId),this}get state(){return this._state}set state(e){const t=this._state;e!==t&&(this._state=e,this.emit(E.GroupCallStateChanged,e,t))}get participants(){return this._participants}set participants(e){const t=this._participants,n=(e,t)=>e.sessionId===t.sessionId&&e.screensharing===t.screensharing;Object(g.y)(e,t,((e,t)=>Object(g.y)(e,t,n)))||(this._participants=e,this.emit(E.ParticipantsChanged,e))}get creationTs(){return this._creationTs}set creationTs(e){this._creationTs=e}get enteredViaAnotherSession(){return this._enteredViaAnotherSession}set enteredViaAnotherSession(e){this._enteredViaAnotherSession=e,this.updateParticipants()}forEachCall(e){for(const t of this.calls.values())for(const n of t.values())e(n)}getLocalFeeds(){const e=[];return this.localCallFeed&&e.push(this.localCallFeed),this.localScreenshareFeed&&e.push(this.localScreenshareFeed),e}hasLocalParticipant(){var e,t;return null!==(e=null===(t=this.participants.get(this.room.getMember(this.client.getUserId())))||void 0===t?void 0:t.has(this.client.getDeviceId()))&&void 0!==e&&e}async initLocalCallFeed(){if(this.state!==w.LocalCallFeedUninitialized)throw new Error(`Cannot initialize local call feed in the "${this.state}" state.`);if(this.state=w.InitializingLocalCallFeed,this.initCallFeedPromise)return this.initCallFeedPromise;try{this.initCallFeedPromise=this.initLocalCallFeedInternal(),await this.initCallFeedPromise}finally{this.initCallFeedPromise=void 0}}async initLocalCallFeedInternal(){let e;c.a.log(`GroupCall ${this.groupCallId} initLocalCallFeedInternal() running`);try{e=await this.client.getMediaHandler().getUserMediaStream(!0,this.type===v.Video)}catch(t){if(!this.allowCallWithoutVideoAndAudio)throw this.state=w.LocalCallFeedUninitialized,t;e=new MediaStream}if(this._state!==w.InitializingLocalCallFeed)throw this.client.getMediaHandler().stopUserMediaStream(e),new Error("Group call disposed while gathering media stream");const t=new a.a({client:this.client,roomId:this.room.roomId,userId:this.client.getUserId(),deviceId:this.client.getDeviceId(),stream:e,purpose:d.b.Usermedia,audioMuted:this.initWithAudioMuted||0===e.getAudioTracks().length||this.isPtt,videoMuted:this.initWithVideoMuted||0===e.getVideoTracks().length});Object(s.j)(e.getAudioTracks(),!t.isAudioMuted()),Object(s.j)(e.getVideoTracks(),!t.isVideoMuted()),this.localCallFeed=t,this.addUserMediaFeed(t),this.state=w.LocalCallFeedInitialized}async updateLocalUsermediaStream(e){if(this.localCallFeed){const t=this.localCallFeed.stream;this.localCallFeed.setNewStream(e);const n=this.localCallFeed.isAudioMuted(),r=this.localCallFeed.isVideoMuted();c.a.log(`GroupCall ${this.groupCallId} updateLocalUsermediaStream() (oldStreamId=${t.id}, newStreamId=${e.id}, micShouldBeMuted=${n}, vidShouldBeMuted=${r})`),Object(s.j)(e.getAudioTracks(),!n),Object(s.j)(e.getVideoTracks(),!r),this.client.getMediaHandler().stopUserMediaStream(t)}}async enter(){if(this.state===w.LocalCallFeedUninitialized)await this.initLocalCallFeed();else if(this.state!==w.LocalCallFeedInitialized)throw new Error(`Cannot enter call in the "${this.state}" state`);c.a.log(`GroupCall ${this.groupCallId} enter() running`),this.state=w.Entered,this.client.on(p.b.Incoming,this.onIncomingCall);for(const e of this.client.callEventHandler.calls.values())this.onIncomingCall(e);this.retryCallLoopInterval=setInterval(this.onRetryCallLoop,this.retryCallInterval),this.activeSpeaker=void 0,this.onActiveSpeakerLoop(),this.activeSpeakerLoopInterval=setInterval(this.onActiveSpeakerLoop,this.activeSpeakerInterval)}dispose(){this.localCallFeed&&(this.removeUserMediaFeed(this.localCallFeed),this.localCallFeed=void 0),this.localScreenshareFeed&&(this.client.getMediaHandler().stopScreensharingStream(this.localScreenshareFeed.stream),this.removeScreenshareFeed(this.localScreenshareFeed),this.localScreenshareFeed=void 0,this.localDesktopCapturerSourceId=void 0),this.client.getMediaHandler().stopAllStreams(),null!==this.transmitTimer&&(clearTimeout(this.transmitTimer),this.transmitTimer=null),void 0!==this.retryCallLoopInterval&&(clearInterval(this.retryCallLoopInterval),this.retryCallLoopInterval=void 0),this.state===w.Entered&&(this.forEachCall((e=>this.disposeCall(e,s.c.UserHangup))),this.calls.clear(),this.activeSpeaker=void 0,clearInterval(this.activeSpeakerLoopInterval),this.retryCallCounts.clear(),clearInterval(this.retryCallLoopInterval),this.client.removeListener(p.b.Incoming,this.onIncomingCall))}leave(){this.dispose(),this.state=w.LocalCallFeedUninitialized}async terminate(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.dispose(),this.room.off(l.b.Update,this.onRoomState),this.client.groupCallEventHandler.groupCalls.delete(this.room.roomId),this.client.emit(m.b.Ended,this),this.state=w.Ended,e){const e=this.room.currentState.getStateEvents(h.b.GroupCallPrefix,this.groupCallId);await this.client.sendStateEvent(this.room.roomId,h.b.GroupCallPrefix,_(_({},e.getContent()),{},{"m.terminated":y.CallEnded}),this.groupCallId)}}isLocalVideoMuted(){return!this.localCallFeed||this.localCallFeed.isVideoMuted()}isMicrophoneMuted(){return!this.localCallFeed||this.localCallFeed.isAudioMuted()}async setMicrophoneMuted(e){if(!e&&!await this.client.getMediaHandler().hasAudioDevice())return!1;const t=!e&&this.isPtt;this.isPtt&&(!e&&this.isMicrophoneMuted()?this.transmitTimer=setTimeout((()=>{this.setMicrophoneMuted(!0)}),this.pttMaxTransmitTime):e&&!this.isMicrophoneMuted()&&(null!==this.transmitTimer&&clearTimeout(this.transmitTimer),this.transmitTimer=null)),this.forEachCall((t=>{var n;return null===(n=t.localUsermediaFeed)||void 0===n?void 0:n.setAudioVideoMuted(e,null)}));const n=async()=>{const e=[];this.forEachCall((t=>e.push(t.sendMetadataUpdate()))),await Promise.all(e).catch((e=>c.a.info(`GroupCall ${this.groupCallId} setMicrophoneMuted() failed to send some metadata updates`,e)))};if(t&&await n(),this.localCallFeed){c.a.log(`GroupCall ${this.groupCallId} setMicrophoneMuted() (streamId=${this.localCallFeed.stream.id}, muted=${e})`);try{if(!e){if(null===await this.client.getMediaHandler().getUserMediaStream(!0,!this.localCallFeed.isVideoMuted()))return c.a.log(`GroupCall ${this.groupCallId} setMicrophoneMuted() no device to receive local stream, muted=${e}`),!1}}catch(t){return c.a.log(`GroupCall ${this.groupCallId} setMicrophoneMuted() no device or permission to receive local stream, muted=${e}`),!1}this.localCallFeed.setAudioVideoMuted(e,null),Object(s.j)(this.localCallFeed.stream.getAudioTracks(),!e)}else c.a.log(`GroupCall ${this.groupCallId} setMicrophoneMuted() no stream muted (muted=${e})`),this.initWithAudioMuted=e;return this.forEachCall((t=>Object(s.j)(t.localUsermediaFeed.stream.getAudioTracks(),!e))),this.emit(E.LocalMuteStateChanged,e,this.isLocalVideoMuted()),t||await n(),!0}async setLocalVideoMuted(e){if(!e&&!await this.client.getMediaHandler().hasVideoDevice())return!1;if(this.localCallFeed){c.a.log(`GroupCall ${this.groupCallId} setLocalVideoMuted() (stream=${this.localCallFeed.stream.id}, muted=${e})`);try{const t=await this.client.getMediaHandler().getUserMediaStream(!0,!e);await this.updateLocalUsermediaStream(t),this.localCallFeed.setAudioVideoMuted(null,e),Object(s.j)(this.localCallFeed.stream.getVideoTracks(),!e)}catch(t){return c.a.log(`GroupCall ${this.groupCallId} setLocalVideoMuted() no device or permission to receive local stream, muted=${e}`),!1}}else c.a.log(`GroupCall ${this.groupCallId} setLocalVideoMuted() no stream muted (muted=${e})`),this.initWithVideoMuted=e;const t=[];return this.forEachCall((n=>t.push(n.setLocalVideoMuted(e)))),await Promise.all(t),this.emit(E.LocalMuteStateChanged,this.isMicrophoneMuted(),e),!0}async setScreensharingEnabled(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e===this.isScreensharing())return e;if(!e)return this.forEachCall((e=>{e.localScreensharingFeed&&e.removeLocalFeed(e.localScreensharingFeed)})),this.client.getMediaHandler().stopScreensharingStream(this.localScreenshareFeed.stream),this.removeScreenshareFeed(this.localScreenshareFeed),this.localScreenshareFeed=void 0,this.localDesktopCapturerSourceId=void 0,this.emit(E.LocalScreenshareStateChanged,!1,void 0,void 0),!1;try{c.a.log(`GroupCall ${this.groupCallId} setScreensharingEnabled() is asking for screensharing permissions`);const e=await this.client.getMediaHandler().getScreensharingStream(t);for(const t of e.getTracks()){const e=()=>{this.setScreensharingEnabled(!1),t.removeEventListener("ended",e)};t.addEventListener("ended",e)}return c.a.log(`GroupCall ${this.groupCallId} setScreensharingEnabled() granted screensharing permissions. Setting screensharing enabled on all calls`),this.localDesktopCapturerSourceId=t.desktopCapturerSourceId,this.localScreenshareFeed=new a.a({client:this.client,roomId:this.room.roomId,userId:this.client.getUserId(),deviceId:this.client.getDeviceId(),stream:e,purpose:d.b.Screenshare,audioMuted:!1,videoMuted:!1}),this.addScreenshareFeed(this.localScreenshareFeed),this.emit(E.LocalScreenshareStateChanged,!0,this.localScreenshareFeed,this.localDesktopCapturerSourceId),this.forEachCall((e=>e.pushLocalFeed(this.localScreenshareFeed.clone()))),!0}catch(e){if(t.throwOnFail)throw e;return c.a.error(`GroupCall ${this.groupCallId} setScreensharingEnabled() enabling screensharing error`,e),this.emit(E.Error,new T(S.NoUserMedia,"Failed to get screen-sharing stream: ",e)),!1}}isScreensharing(){return!!this.localScreenshareFeed}wantsOutgoingCall(e,t){const n=this.client.getUserId(),r=this.client.getDeviceId();return e>=n&&(e!==n||t>r)}placeOutgoingCalls(){let e=!1;for(const[{userId:n},r]of this.participants){var t;const i=null!==(t=this.calls.get(n))&&void 0!==t?t:new Map;for(const[t,o]of r){const r=i.get(t);if((null==r?void 0:r.getOpponentSessionId())!==o.sessionId&&this.wantsOutgoingCall(n,t)){e=!0,void 0!==r&&(c.a.debug(`GroupCall ${this.groupCallId} placeOutgoingCalls() replacing call (userId=${n}, deviceId=${t}, callId=${r.callId})`),this.disposeCall(r,s.c.NewSession));const a=Object(s.h)(this.client,this.room.roomId,{invitee:n,opponentDeviceId:t,opponentSessionId:o.sessionId,groupCallId:this.groupCallId});null===a?(c.a.error(`GroupCall ${this.groupCallId} placeOutgoingCalls() failed to create call (userId=${n}, device=${t})`),i.delete(t)):(this.initCall(a),i.set(t,a),c.a.debug(`GroupCall ${this.groupCallId} placeOutgoingCalls() placing call (userId=${n}, deviceId=${t}, sessionId=${o.sessionId})`),a.placeCallWithCallFeeds(this.getLocalFeeds().map((e=>e.clone())),o.screensharing).then((()=>{this.dataChannelsEnabled&&a.createDataChannel("datachannel",this.dataChannelOptions)})).catch((e=>{c.a.warn(`GroupCall ${this.groupCallId} placeOutgoingCalls() failed to place call (userId=${n})`,e),e instanceof s.b&&e.code===S.UnknownDevice?this.emit(E.Error,e):this.emit(E.Error,new T(S.PlaceCallFailed,`Failed to place call to ${n}`)),this.disposeCall(a,s.c.SignallingFailed),i.get(t)===a&&i.delete(t)})))}}i.size>0?this.calls.set(n,i):this.calls.delete(n)}e&&this.emit(E.CallsChanged,this.calls)}getMemberStateEvents(e){return void 0===e?this.room.currentState.getStateEvents(h.b.GroupCallMemberPrefix):this.room.currentState.getStateEvents(h.b.GroupCallMemberPrefix,e)}initCall(e){const t=D(e);if(!t)throw new Error("Cannot init call without user id");const n=()=>this.onCallFeedsChanged(e),r=(t,n)=>this.onCallStateChanged(e,t,n),i=this.onCallHangup,o=t=>this.onCallReplaced(e,t);let a=this.callHandlers.get(t);void 0===a&&(a=new Map,this.callHandlers.set(t,a)),a.set(e.getOpponentDeviceId(),{onCallFeedsChanged:n,onCallStateChanged:r,onCallHangup:i,onCallReplaced:o}),e.on(s.d.FeedsChanged,n),e.on(s.d.State,r),e.on(s.d.Hangup,i),e.on(s.d.Replaced,o),e.isPtt=this.isPtt,this.reEmitter.reEmit(e,Object.values(s.d)),n()}disposeCall(e,t){const n=D(e),r=e.getOpponentDeviceId();if(!n)throw new Error("Cannot dispose call without user id");const i=this.callHandlers.get(n),{onCallFeedsChanged:o,onCallStateChanged:a,onCallHangup:l,onCallReplaced:c}=i.get(r);if(e.removeListener(s.d.FeedsChanged,o),e.removeListener(s.d.State,a),e.removeListener(s.d.Hangup,l),e.removeListener(s.d.Replaced,c),i.delete(n),0===i.size&&this.callHandlers.delete(n),e.hangupReason===s.c.Replaced)return;e.state!==s.f.Ended&&e.hangup(t,!1);const u=this.getUserMediaFeed(n,r);u&&this.removeUserMediaFeed(u);const d=this.getScreenshareFeed(n,r);d&&this.removeScreenshareFeed(d)}getUserMediaFeed(e,t){return this.userMediaFeeds.find((n=>n.userId===e&&n.deviceId===t))}addUserMediaFeed(e){this.userMediaFeeds.push(e),e.measureVolumeActivity(!0),this.emit(E.UserMediaFeedsChanged,this.userMediaFeeds)}replaceUserMediaFeed(e,t){const n=this.userMediaFeeds.findIndex((t=>t.userId===e.userId&&t.deviceId===e.deviceId));if(-1===n)throw new Error("Couldn't find user media feed to replace");this.userMediaFeeds.splice(n,1,t),e.dispose(),t.measureVolumeActivity(!0),this.emit(E.UserMediaFeedsChanged,this.userMediaFeeds)}removeUserMediaFeed(e){const t=this.userMediaFeeds.findIndex((t=>t.userId===e.userId&&t.deviceId===e.deviceId));if(-1===t)throw new Error("Couldn't find user media feed to remove");this.userMediaFeeds.splice(t,1),e.dispose(),this.emit(E.UserMediaFeedsChanged,this.userMediaFeeds),this.activeSpeaker===e&&(this.activeSpeaker=this.userMediaFeeds[0],this.emit(E.ActiveSpeakerChanged,this.activeSpeaker))}getScreenshareFeed(e,t){return this.screenshareFeeds.find((n=>n.userId===e&&n.deviceId===t))}addScreenshareFeed(e){this.screenshareFeeds.push(e),this.emit(E.ScreenshareFeedsChanged,this.screenshareFeeds)}replaceScreenshareFeed(e,t){const n=this.screenshareFeeds.findIndex((t=>t.userId===e.userId&&t.deviceId===e.deviceId));if(-1===n)throw new Error("Couldn't find screenshare feed to replace");this.screenshareFeeds.splice(n,1,t),e.dispose(),this.emit(E.ScreenshareFeedsChanged,this.screenshareFeeds)}removeScreenshareFeed(e){const t=this.screenshareFeeds.findIndex((t=>t.userId===e.userId&&t.deviceId===e.deviceId));if(-1===t)throw new Error("Couldn't find screenshare feed to remove");this.screenshareFeeds.splice(t,1),e.dispose(),this.emit(E.ScreenshareFeedsChanged,this.screenshareFeeds)}updateParticipants(){const e=this.room.getMember(this.client.getUserId());if(!e)return void c.a.warn(`GroupCall ${this.groupCallId} updateParticipants() tried to update participants before local room member is available`);if(null!==this.participantsExpirationTimer&&(clearTimeout(this.participantsExpirationTimer),this.participantsExpirationTimer=null),this.state===w.Ended)return void(this.participants=new Map);const t=new Map,n=Date.now(),r=this.state===w.Entered||this.enteredViaAnotherSession;let i=1/0;for(const e of this.getMemberStateEvents()){const o=this.room.getMember(e.getStateKey()),a=e.getContent(),s=(Array.isArray(a["m.calls"])?a["m.calls"]:[]).find((e=>e["m.call_id"]===this.groupCallId));let l=(Array.isArray(null==s?void 0:s["m.devices"])?s["m.devices"]:[]).filter((e=>"string"==typeof e.device_id&&"string"==typeof e.session_id&&"number"==typeof e.expires_ts&&e.expires_ts>n&&Array.isArray(e.feeds)));if(r||(null==o?void 0:o.userId)!==this.client.getUserId()||(l=l.filter((e=>e.device_id!==this.client.getDeviceId()))),l.length>0&&"join"===(null==o?void 0:o.membership)){const e=new Map;t.set(o,e);for(const t of l)e.set(t.device_id,{sessionId:t.session_id,screensharing:t.feeds.some((e=>e.purpose===d.b.Screenshare))}),t.expires_ts<i&&(i=t.expires_ts)}}if(r){let n=t.get(e);void 0===n&&(n=new Map,t.set(e,n)),n.has(this.client.getDeviceId())||n.set(this.client.getDeviceId(),{sessionId:this.client.getSessionId(),screensharing:this.getLocalFeeds().some((e=>e.purpose===d.b.Screenshare))})}this.participants=t,i<1/0&&(this.participantsExpirationTimer=setTimeout((()=>this.updateParticipants()),i-n))}async updateDevices(e){var t;let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=Date.now(),i=this.client.getUserId(),o=this.getMemberStateEvents(i),a=null!==(t=null==o?void 0:o.getContent())&&void 0!==t?t:{},s=Array.isArray(a["m.calls"])?a["m.calls"]:[];let l=null;const c=[];for(const e of s)e["m.call_id"]===this.groupCallId?l=e:c.push(e);null===l&&(l={});const u=e((Array.isArray(l["m.devices"])?l["m.devices"]:[]).filter((e=>"string"==typeof e.device_id&&"string"==typeof e.session_id&&"number"==typeof e.expires_ts&&e.expires_ts>r&&Array.isArray(e.feeds))));if(null===u)return;const d=[...c];u.length>0&&d.push(_(_({},l),{},{"m.call_id":this.groupCallId,"m.devices":u}));const p={"m.calls":d};await this.client.sendStateEvent(this.room.roomId,h.b.GroupCallMemberPrefix,p,i,{keepAlive:n})}async addDeviceToMemberState(){await this.updateDevices((e=>[...e.filter((e=>e.device_id!==this.client.getDeviceId())),{device_id:this.client.getDeviceId(),session_id:this.client.getSessionId(),expires_ts:Date.now()+F,feeds:this.getLocalFeeds().map((e=>({purpose:e.purpose})))}]))}async updateMemberState(){null!==this.resendMemberStateTimer&&(clearInterval(this.resendMemberStateTimer),this.resendMemberStateTimer=null),this.state===w.Entered?(await this.addDeviceToMemberState(),this.resendMemberStateTimer=setInterval((async()=>{c.a.log(`GroupCall ${this.groupCallId} updateMemberState() resending call member state"`);try{await this.addDeviceToMemberState()}catch(e){c.a.error(`GroupCall ${this.groupCallId} updateMemberState() failed to resend call member state`,e)}}),27e5)):await this.updateDevices((e=>e.filter((e=>e.device_id!==this.client.getDeviceId()))),!0)}async cleanMemberState(){const{devices:e}=await this.client.getDevices(),t=new Map(e.map((e=>[e.device_id,e])));await this.updateDevices((e=>{const n=e.filter((e=>{const n=t.get(e.device_id);return void 0!==(null==n?void 0:n.last_seen_ts)&&!(e.device_id===this.client.getDeviceId()&&this.state!==w.Entered&&!this.enteredViaAnotherSession)}));return n.length===e.length?null:n}))}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return d}));var r=n(13),i=n.n(r),o=n(1),a=n(510),s=n(350),l=n(977),c=n(288),u=n(667);class d{static exists(e,t){return u.a(e,t)}constructor(e,t){this.indexedDB=e,this.dbName=t,i()(this,"backendPromise",void 0),i()(this,"backend",void 0)}startup(){return this.backendPromise||(this.backendPromise=new Promise(((e,t)=>{if(!this.indexedDB)return void t(new Error("no indexeddb support available"));o.a.log(`connecting to indexeddb ${this.dbName}`);const n=this.indexedDB.open(this.dbName,l.b);n.onupgradeneeded=e=>{const t=n.result,r=e.oldVersion;l.c(t,r)},n.onblocked=()=>{o.a.log("can't yet open IndexedDBCryptoStore because it is open elsewhere")},n.onerror=e=>{o.a.log("Error connecting to indexeddb",e),t(n.error)},n.onsuccess=()=>{const t=n.result;o.a.log(`connected to indexeddb ${this.dbName}`),e(new l.a(t))}})).then((e=>e.doTxn("readonly",[d.STORE_INBOUND_GROUP_SESSIONS,d.STORE_INBOUND_GROUP_SESSIONS_WITHHELD],(t=>{e.getEndToEndInboundGroupSession("","",t,(()=>{}))})).then((()=>e)))).catch((t=>{if("VersionError"===t.name)throw o.a.warn("Crypto DB is too new for us to use!",t),new c.a(c.b.TooNew);o.a.warn(`unable to connect to indexeddb ${this.dbName}: falling back to localStorage store: ${t}`);try{return new a.a(e.localStorage)}catch(t){return o.a.warn(`unable to open localStorage: falling back to in-memory store: ${t}`),new s.a}})).then((e=>(this.backend=e,e)))),this.backendPromise}deleteAllData(){return new Promise(((e,t)=>{if(!this.indexedDB)return void t(new Error("no indexeddb support available"));o.a.log(`Removing indexeddb instance: ${this.dbName}`);const n=this.indexedDB.deleteDatabase(this.dbName);n.onblocked=()=>{o.a.log("can't yet delete IndexedDBCryptoStore because it is open elsewhere")},n.onerror=e=>{o.a.log("Error deleting data from indexeddb",e),t(n.error)},n.onsuccess=()=>{o.a.log(`Removed indexeddb instance: ${this.dbName}`),e()}})).catch((e=>{o.a.warn(`unable to delete IndexedDBCryptoStore: ${e}`)}))}getOrAddOutgoingRoomKeyRequest(e){return this.backend.getOrAddOutgoingRoomKeyRequest(e)}getOutgoingRoomKeyRequest(e){return this.backend.getOutgoingRoomKeyRequest(e)}getOutgoingRoomKeyRequestByState(e){return this.backend.getOutgoingRoomKeyRequestByState(e)}getAllOutgoingRoomKeyRequestsByState(e){return this.backend.getAllOutgoingRoomKeyRequestsByState(e)}getOutgoingRoomKeyRequestsByTarget(e,t,n){return this.backend.getOutgoingRoomKeyRequestsByTarget(e,t,n)}updateOutgoingRoomKeyRequest(e,t,n){return this.backend.updateOutgoingRoomKeyRequest(e,t,n)}deleteOutgoingRoomKeyRequest(e,t){return this.backend.deleteOutgoingRoomKeyRequest(e,t)}getAccount(e,t){this.backend.getAccount(e,t)}storeAccount(e,t){this.backend.storeAccount(e,t)}getCrossSigningKeys(e,t){this.backend.getCrossSigningKeys(e,t)}getSecretStorePrivateKey(e,t,n){this.backend.getSecretStorePrivateKey(e,t,n)}storeCrossSigningKeys(e,t){this.backend.storeCrossSigningKeys(e,t)}storeSecretStorePrivateKey(e,t,n){this.backend.storeSecretStorePrivateKey(e,t,n)}countEndToEndSessions(e,t){this.backend.countEndToEndSessions(e,t)}getEndToEndSession(e,t,n,r){this.backend.getEndToEndSession(e,t,n,r)}getEndToEndSessions(e,t,n){this.backend.getEndToEndSessions(e,t,n)}getAllEndToEndSessions(e,t){this.backend.getAllEndToEndSessions(e,t)}storeEndToEndSession(e,t,n,r){this.backend.storeEndToEndSession(e,t,n,r)}storeEndToEndSessionProblem(e,t,n){return this.backend.storeEndToEndSessionProblem(e,t,n)}getEndToEndSessionProblem(e,t){return this.backend.getEndToEndSessionProblem(e,t)}filterOutNotifiedErrorDevices(e){return this.backend.filterOutNotifiedErrorDevices(e)}getEndToEndInboundGroupSession(e,t,n,r){this.backend.getEndToEndInboundGroupSession(e,t,n,r)}getAllEndToEndInboundGroupSessions(e,t){this.backend.getAllEndToEndInboundGroupSessions(e,t)}addEndToEndInboundGroupSession(e,t,n,r){this.backend.addEndToEndInboundGroupSession(e,t,n,r)}storeEndToEndInboundGroupSession(e,t,n,r){this.backend.storeEndToEndInboundGroupSession(e,t,n,r)}storeEndToEndInboundGroupSessionWithheld(e,t,n,r){this.backend.storeEndToEndInboundGroupSessionWithheld(e,t,n,r)}storeEndToEndDeviceData(e,t){this.backend.storeEndToEndDeviceData(e,t)}getEndToEndDeviceData(e,t){this.backend.getEndToEndDeviceData(e,t)}storeEndToEndRoom(e,t,n){this.backend.storeEndToEndRoom(e,t,n)}getEndToEndRooms(e,t){this.backend.getEndToEndRooms(e,t)}getSessionsNeedingBackup(e){return this.backend.getSessionsNeedingBackup(e)}countSessionsNeedingBackup(e){return this.backend.countSessionsNeedingBackup(e)}unmarkSessionsNeedingBackup(e,t){return this.backend.unmarkSessionsNeedingBackup(e,t)}markSessionsNeedingBackup(e,t){return this.backend.markSessionsNeedingBackup(e,t)}addSharedHistoryInboundGroupSession(e,t,n,r){this.backend.addSharedHistoryInboundGroupSession(e,t,n,r)}getSharedHistoryInboundGroupSessions(e,t){return this.backend.getSharedHistoryInboundGroupSessions(e,t)}addParkedSharedHistory(e,t,n){this.backend.addParkedSharedHistory(e,t,n)}takeParkedSharedHistory(e,t){return this.backend.takeParkedSharedHistory(e,t)}doTxn(e,t,n,r){return this.backend.doTxn(e,t,n,r)}}i()(d,"STORE_ACCOUNT","account"),i()(d,"STORE_SESSIONS","sessions"),i()(d,"STORE_INBOUND_GROUP_SESSIONS","inbound_group_sessions"),i()(d,"STORE_INBOUND_GROUP_SESSIONS_WITHHELD","inbound_group_sessions_withheld"),i()(d,"STORE_SHARED_HISTORY_INBOUND_GROUP_SESSIONS","shared_history_inbound_group_sessions"),i()(d,"STORE_PARKED_SHARED_HISTORY","parked_shared_history"),i()(d,"STORE_DEVICE_DATA","device_data"),i()(d,"STORE_ROOMS","rooms"),i()(d,"STORE_BACKUP","sessions_needing_backup")}).call(this,n(14))},function(e,t,n){"use strict";(function(e){n.d(t,"b",(function(){return C})),n.d(t,"a",(function(){return x})),n.d(t,"c",(function(){return D}));var r=n(13),i=n.n(r),o=n(1),a=n(129),s=n(125),l=n(190),c=n(294),u=n(124),d=n(696),h=n(697),p=n(1548),m=n(242),g=n(930),f=n(396),_=n(202),b=n(220),v=n(656),y=n(1412),E=n(843),S=n(1414),w=n(153),T=n(154);const C=E.a.ListsUpdate,x=E.a.ListsLoading;class F extends _.a{constructor(e){super(e),i()(this,"initialListsGenerated",!1),i()(this,"msc3946ProcessDynamicPredecessor",void 0),i()(this,"msc3946SettingWatcherRef",void 0),i()(this,"algorithm",new p.a),i()(this,"prefilterConditions",[]),i()(this,"updateFn",new f.a((()=>{for(const e of Object.keys(this.orderedLists))b.a.instance.getListState(e).setRooms(this.orderedLists[e]);this.emit(C)}))),i()(this,"onAlgorithmListUpdated",(e=>{this.updateFn.mark(),e&&this.updateFn.trigger()})),i()(this,"onAlgorithmFilterUpdated",(()=>{this.updateFn.trigger()})),i()(this,"onPrefilterUpdated",(async()=>{await this.recalculatePrefiltering(),this.updateFn.trigger()})),this.setMaxListeners(20),this.algorithm.start(),this.msc3946ProcessDynamicPredecessor=s.b.getValue("feature_dynamic_room_predecessors"),this.msc3946SettingWatcherRef=s.b.watchSetting("feature_dynamic_room_predecessors",null,((e,t,n,r,i)=>{this.msc3946ProcessDynamicPredecessor=i,this.regenerateAllLists({trigger:!0})}))}componentWillUnmount(){s.b.unwatchSetting(this.msc3946SettingWatcherRef)}setupWatchers(){new y.a(this)}get orderedLists(){return this.algorithm?this.algorithm.getOrderedRooms():{}}async resetStore(){await this.reset(),this.prefilterConditions=[],this.initialListsGenerated=!1,this.algorithm.off(p.b,this.onAlgorithmListUpdated),this.algorithm.off(h.a,this.onAlgorithmListUpdated),this.algorithm.stop(),this.algorithm=new p.a,this.algorithm.on(p.b,this.onAlgorithmListUpdated),this.algorithm.on(h.a,this.onAlgorithmListUpdated),await this.reset(null,!0)}async makeReady(e){e&&this.readyStore.useUnitTestClient(e),T.b.instance.roomViewStore.addListener(w.b,(()=>this.handleRVSUpdate({}))),this.algorithm.on(p.b,this.onAlgorithmListUpdated),this.algorithm.on(h.a,this.onAlgorithmFilterUpdated),this.setupWatchers(),o.a.log("Regenerating room lists: Startup"),this.updateAlgorithmInstances(),this.regenerateAllLists({trigger:!1}),this.handleRVSUpdate({trigger:!1}),this.updateFn.mark(),this.updateFn.trigger()}handleRVSUpdate(e){let{trigger:t=!0}=e;if(!this.matrixClient)return;const n=T.b.instance.roomViewStore.getRoomId();if(!n&&this.algorithm.stickyRoom)this.algorithm.setStickyRoom(null);else if(n){const e=this.matrixClient.getRoom(n);e?e!==this.algorithm.stickyRoom&&this.algorithm.setStickyRoom(e):(o.a.warn(`${n} is current in RVS but missing from client - clearing sticky room`),this.algorithm.setStickyRoom(null))}t&&this.updateFn.trigger()}async onReady(){await this.makeReady()}async onNotReady(){await this.resetStore()}async onAction(t){this.matrixClient&&this.initialListsGenerated&&(F.TEST_MODE?await this.onDispatchAsync(t):e((()=>this.onDispatchAsync(t))))}async onDispatchAsync(e){if(this.matrixClient&&this.initialListsGenerated){if(!this.algorithm)throw new Error("Room list store has no algorithm to process dispatcher update with");if("MatrixActions.Room.receipt"===e.action){if(Object(d.a)(e.event,this.matrixClient)){const t=e.room;return t?(await this.handleRoomUpdate(t,l.c.ReadReceipt),void this.updateFn.trigger()):void o.a.warn(`Own read receipt was in unknown room ${t.roomId}`)}}else if("MatrixActions.Room.tags"===e.action){const t=e;await this.handleRoomUpdate(t.room,l.c.PossibleTagChange),this.updateFn.trigger()}else if("MatrixActions.Room.timeline"===e.action){const t=e;if(!t.isLiveEvent||!t.isLiveUnfilteredRoomTimelineEvent||!t.room)return;const n=t.event.getRoomId(),r=this.matrixClient.getRoom(n),i=async e=>{if(t.event.getType()===a.b.RoomTombstone&&""===t.event.getStateKey()){if(this.matrixClient.getRoom(t.event.getContent().replacement_room))return}await this.handleRoomUpdate(e,l.c.Timeline),this.updateFn.trigger()};if(!r)return o.a.warn(`Live timeline event ${t.event.getId()} received without associated room`),o.a.warn("Queuing failed room update for retry as a result."),void window.setTimeout((async()=>{const e=this.matrixClient.getRoom(n);await i(e)}),100);await i(r)}else if("MatrixActions.Event.decrypted"===e.action){const t=e,n=t.event.getRoomId();if(!n)return;const r=this.matrixClient.getRoom(n);if(!r)return void o.a.warn(`Event ${t.event.getId()} was decrypted in an unknown room ${n}`);await this.handleRoomUpdate(r,l.c.Timeline),this.updateFn.trigger()}else if("MatrixActions.accountData"===e.action&&e.event_type===a.b.Direct){const t=e.event.getContent();for(const e of Object.keys(t)){const n=t[e];for(const e of n){const t=this.matrixClient.getRoom(e);t?await this.handleRoomUpdate(t,l.c.PossibleTagChange):o.a.warn(`${e} was found in DMs but the room is not in the store`)}}this.updateFn.trigger()}else if("MatrixActions.Room.myMembership"===e.action)return void this.onDispatchMyMembership(e)}}async onDispatchMyMembership(e){const t=Object(m.b)(e.oldMembership),n=Object(m.b)(e.membership);if(t!==m.a.Join&&n===m.a.Join){const t=e.room.currentState.findPredecessor(this.msc3946ProcessDynamicPredecessor);if(t){const e=this.matrixClient.getRoom(t.roomId);if(e){this.algorithm.stickyRoom===e&&this.algorithm.setStickyRoom(null),this.algorithm.handleRoomUpdate(e,l.c.RoomRemoved)}else o.a.warn(`Unable to find predecessor room with id ${t.roomId}`)}return await this.handleRoomUpdate(e.room,l.c.NewRoom),void this.updateFn.trigger()}return t!==m.a.Invite&&n===m.a.Invite?(await this.handleRoomUpdate(e.room,l.c.NewRoom),void this.updateFn.trigger()):t!==n?(await this.handleRoomUpdate(e.room,l.c.PossibleTagChange),void this.updateFn.trigger()):void 0}async handleRoomUpdate(e,t){if(t===l.c.NewRoom&&"invite"===e.getMyMembership()&&await v.a.instance.onNewInvitedRoom(e),!v.a.instance.isRoomVisible(e))return;if((t===l.c.NewRoom||t===l.c.PossibleTagChange)&&!this.prefilterConditions.every((t=>t.isVisible(e))))return;this.algorithm.handleRoomUpdate(e,t)&&this.updateFn.mark()}async recalculatePrefiltering(){if(!this.algorithm)return;if(!this.algorithm.hasTagSortingMap)return;this.algorithm.updatesInhibited=!0;const e=this.getPlausibleRooms(),t=this.algorithm.stickyRoom,n=t&&e.includes(t);this.algorithm.setStickyRoom(null),this.algorithm.setKnownRooms(e),n&&this.algorithm.setStickyRoom(t),this.updateFn.mark(),this.algorithm.updatesInhibited=!1}setTagSorting(e,t){this.setAndPersistTagSorting(e,t),this.updateFn.trigger()}setAndPersistTagSorting(e,t){this.algorithm.setTagSorting(e,t),localStorage.setItem(`mx_tagSort_${e}`,t)}getTagSorting(e){return this.algorithm.getTagSorting(e)}getStoredTagSorting(e){return localStorage.getItem(`mx_tagSort_${e}`)}calculateTagSorting(e){const t=this.getTagSorting(e),n=this.getStoredTagSorting(e);let r=c.b.Recent;return n?r=n:t&&(r=t),r}setListOrder(e,t){this.setAndPersistListOrder(e,t),this.updateFn.trigger()}setAndPersistListOrder(e,t){this.algorithm.setListOrdering(e,t),localStorage.setItem(`mx_listOrder_${e}`,t)}getListOrder(e){return this.algorithm.getListOrdering(e)}getStoredListOrder(e){return localStorage.getItem(`mx_listOrder_${e}`)}calculateListOrder(e){const t=c.a.Importance,n=this.getListOrder(e),r=this.getStoredListOrder(e);let i=t;return r?i=r:n&&(i=n),i}updateAlgorithmInstances(){this.updateFn.mark();for(const e of Object.keys(this.orderedLists)){const t=this.getTagSorting(e),n=this.getListOrder(e),r=this.calculateTagSorting(e),i=this.calculateListOrder(e);r!==t&&this.setAndPersistTagSorting(e,r),i!==n&&this.setAndPersistListOrder(e,i)}}getPlausibleRooms(){if(!this.matrixClient)return[];let e=this.matrixClient.getVisibleRooms(this.msc3946ProcessDynamicPredecessor);return e=e.filter((e=>v.a.instance.isRoomVisible(e))),this.prefilterConditions.length>0&&(e=e.filter((e=>{for(const t of this.prefilterConditions)if(!t.isVisible(e))return!1;return!0}))),e}regenerateAllLists(e){let{trigger:t=!0}=e;o.a.warn("Regenerating all room lists");const n=this.getPlausibleRooms(),r={},i={},a=[...l.b];for(const e of a)r[e]=this.calculateTagSorting(e),i[e]=this.calculateListOrder(e),g.a.instance.ensureLayoutExists(e);this.algorithm.populateTags(r,i),this.algorithm.setKnownRooms(n),this.initialListsGenerated=!0,t&&this.updateFn.trigger()}async addFilter(e){let t=Promise.resolve();e.on(h.a,this.onPrefilterUpdated),this.prefilterConditions.push(e),t=this.recalculatePrefiltering(),t.then((()=>this.updateFn.trigger()))}removeFilter(e){let t=Promise.resolve(),n=!1;const r=this.prefilterConditions.indexOf(e);r>=0&&(e.off(h.a,this.onPrefilterUpdated),this.prefilterConditions.splice(r,1),t=this.recalculatePrefiltering(),n=!0),n&&t.then((()=>this.updateFn.trigger()))}getTagsForRoom(e){const t=this.algorithm.getTagsForRoom(e);return t||[l.a.Untagged]}getCount(e){return this.orderedLists[e].length||0}async manualRoomUpdate(e,t){await this.handleRoomUpdate(e,t),this.updateFn.trigger()}}i()(F,"TEST_MODE",!1);class D{static get instance(){if(!D.internalInstance)if(s.b.getValue("feature_sliding_sync")){o.a.info("using SlidingRoomListStoreClass");const e=new S.a(u.a,T.b.instance);e.start(),D.internalInstance=e}else{const e=new F(u.a);e.start(),D.internalInstance=e}return this.internalInstance}}i()(D,"internalInstance",void 0),window.mxRoomListStore=D.instance}).call(this,n(54).setImmediate)},function(e,t,n){"use strict";n.d(t,"b",(function(){return b})),n.d(t,"e",(function(){return v})),n.d(t,"d",(function(){return y})),n.d(t,"c",(function(){return E})),n.d(t,"a",(function(){return S}));var r=n(13),i=n.n(r),o=n(439),a=n.n(o),s=n(724),l=n.n(s),c=n(170),u=n(129),d=n(204),h=n(187),p=n(196),m=n(168),g=n(230);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e){if(e&&!e.isRedacted())return e.replyEventId?e.replyEventId:void 0}function v(e){const t=e.split("\n");for(;t.length&&t[0].startsWith("> ");)t.shift();return""===t[0]&&t.shift(),t.join("\n")}function y(e){return a()(e,{allowedTags:!1,allowedAttributes:!1,allowedSchemes:[...p.b,"mxc"],exclusiveFilter:e=>"mx-reply"===e.tag})}function E(e){var t,n;if(e.isRedacted())return!1;const r=null===(t=e.getWireContent())||void 0===t||null===(n=t["m.relates_to"])||void 0===n?void 0:n["m.in_reply_to"];if(!r)return!1;const i=e.getRelation();return((null==i?void 0:i.rel_type)!==c.d.name||null==i||!i.is_falling_back)&&!!r.event_id}function S(e,t,n){if(e["m.relates_to"]=_(_({},e["m.relates_to"]||{}),function(e){if(!e)return{};const t={"m.in_reply_to":{event_id:e.getId()}};return e.threadRootId&&(t.is_falling_back=!1),t}(t)),n.includeLegacyFallback){const r=function(e,t){if(!e)return null;let{body:n,formatted_body:r,msgtype:i}=e.getContent();b(e)&&n&&(n=v(n)),n||(n=""),r=r?y(r):l()(n).replace(/\n/g,"<br/>");const o=t.forEvent(e.getId()),a=Object(m.i)(e.getSender()),s=e.getSender();if(d.b.matches(e.getType())){const t=Object(g.f)(e.getContent())?"their":"a";return{html:`<mx-reply><blockquote><a href="${o}">In reply to</a> <a href="${a}">${s}</a><br>shared ${t} live location.</blockquote></mx-reply>`,body:`> <${s}> shared ${t} live location.\n\n`}}if(h.a.matches(e.getType()))return{html:`<mx-reply><blockquote><a href="${o}">In reply to</a> <a href="${a}">${s}</a><br>Ended poll</blockquote></mx-reply>`,body:`> <${s}>Ended poll\n\n`};switch(i){case u.e.Text:case u.e.Notice:{r=`<mx-reply><blockquote><a href="${o}">In reply to</a> <a href="${a}">${s}</a><br>${r}</blockquote></mx-reply>`;const e=n.trim().split("\n");e.length>0&&(e[0]=`<${s}> ${e[0]}`,n=e.map((e=>`> ${e}`)).join("\n")+"\n\n");break}case u.e.Image:r=`<mx-reply><blockquote><a href="${o}">In reply to</a> <a href="${a}">${s}</a><br>sent an image.</blockquote></mx-reply>`,n=`> <${s}> sent an image.\n\n`;break;case u.e.Video:r=`<mx-reply><blockquote><a href="${o}">In reply to</a> <a href="${a}">${s}</a><br>sent a video.</blockquote></mx-reply>`,n=`> <${s}> sent a video.\n\n`;break;case u.e.Audio:r=`<mx-reply><blockquote><a href="${o}">In reply to</a> <a href="${a}">${s}</a><br>sent an audio file.</blockquote></mx-reply>`,n=`> <${s}> sent an audio file.\n\n`;break;case u.e.File:r=`<mx-reply><blockquote><a href="${o}">In reply to</a> <a href="${a}">${s}</a><br>sent a file.</blockquote></mx-reply>`,n=`> <${s}> sent a file.\n\n`;break;case u.e.Location:{const t=Object(g.f)(e.getContent())?"their":"a";r=`<mx-reply><blockquote><a href="${o}">In reply to</a> <a href="${a}">${s}</a><br>shared ${t} location.</blockquote></mx-reply>`,n=`> <${s}> shared ${t} location.\n\n`;break}case u.e.Emote:{r=`<mx-reply><blockquote><a href="${o}">In reply to</a> * <a href="${a}">${s}</a><br>${r}</blockquote></mx-reply>`;const e=n.trim().split("\n");e.length>0&&(e[0]=`* <${s}> ${e[0]}`,n=e.map((e=>`> ${e}`)).join("\n")+"\n\n");break}default:return null}return{body:n,html:r}}(t,n.permalinkCreator);r&&(e.formatted_body&&(e.formatted_body=r.html+e.formatted_body),e.body=r.body+e.body)}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"d",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return s}));var r=n(1);async function i(e){try{var t,n;if(null!==(t=navigator)&&void 0!==t&&null!==(n=t.clipboard)&&void 0!==n&&n.writeText)return await navigator.clipboard.writeText(e),!0;{const t=document.createElement("textarea");t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t);const n=document.getSelection(),r=document.createRange();r.selectNode(t),n.removeAllRanges(),n.addRange(r);const i=document.execCommand("copy");return n.removeAllRanges(),document.body.removeChild(t),i}}catch(e){r.a.error("copyPlaintext failed",e)}return!1}function o(e){const t=document.createRange();t.selectNodeContents(e);const n=window.getSelection();n.removeAllRanges(),n.addRange(t)}function a(e){return!!e&&(o(e),document.execCommand("copy"))}function s(){return window.getSelection().toString()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(125),l=n(121),c=n(392),u=n(177);class d extends a.a.Component{constructor(e){super(e),i()(this,"onChange",(async e=>{await this.save(e),this.setState({value:e}),this.props.onChange&&this.props.onChange(e)})),i()(this,"checkBoxOnChange",(e=>{this.onChange(e.target.checked)})),i()(this,"save",(async e=>{await s.b.setValue(this.props.name,this.props.roomId,this.props.level,void 0!==e?e:this.state.value)})),this.state={value:s.b.getValueAt(this.props.level,this.props.name,this.props.roomId,this.props.isExplicit)}}render(){var e;const t=s.b.canSetValue(this.props.name,this.props.roomId,this.props.level);if(!t&&this.props.hideIfCannotSet)return null;const n=null!==(e=this.props.label?Object(l.a)(this.props.label):s.b.getDisplayName(this.props.name,this.props.level))&&void 0!==e?e:void 0,r=s.b.getDescription(this.props.name),i=s.b.shouldHaveWarning(this.props.name);let o=null;return this.props.disabled&&this.props.disabledDescription&&(o=a.a.createElement("div",{className:"mx_SettingsFlag_microcopy"},this.props.disabledDescription)),this.props.useCheckbox?a.a.createElement(u.b,{checked:this.state.value,onChange:this.checkBoxOnChange,disabled:this.props.disabled||!t},n):a.a.createElement("div",{className:"mx_SettingsFlag"},a.a.createElement("label",{className:"mx_SettingsFlag_label"},a.a.createElement("span",{className:"mx_SettingsFlag_labelText"},n),r&&a.a.createElement("div",{className:"mx_SettingsFlag_microcopy"},i?Object(l.a)("<w>WARNING:</w> <description/>",{},{w:e=>a.a.createElement("span",{className:"mx_SettingsTab_microcopy_warning"},e),description:r}):r),o),a.a.createElement(c.a,{checked:this.state.value,onChange:this.onChange,disabled:this.props.disabled||!t,title:n}))}}},function(e,t,n){"use strict";n.d(t,"d",(function(){return r.a})),n.d(t,"f",(function(){return o})),n.d(t,"g",(function(){return a})),n.d(t,"a",(function(){return s.a})),n.d(t,"e",(function(){return s.b})),n.d(t,"c",(function(){return l.c})),n.d(t,"h",(function(){return l.d})),n.d(t,"b",(function(){return l.b})),n.d(t,"i",(function(){return c.a})),n.d(t,"j",(function(){return h}));var r=n(535),i=n(30);const o=e=>{var t;const n=i.b.findIn(e);return(null!==(t=null==n?void 0:n.type)&&void 0!==t?t:i.a.Self)==i.a.Self},a=e=>{const t=e.getContent(),n=i.c.findIn(t);return n?n.uri:t.geo_uri};var s=n(438),l=n(536),c=n(538),u=n(121),d=n(131);const h=e=>{const t=d.b.get().brand;switch(e){case 1:return Object(u.a)("%(brand)s was denied permission to fetch your location. Please allow location access in your browser settings.",{brand:t});case 2:return Object(u.a)("Failed to fetch your location. Please try again later.");case 3:return Object(u.a)("Timed out trying to fetch your location. Please try again later.");case 4:return Object(u.a)("Unknown error fetching location. Please try again later.")}}},function(e,t,n){"use strict";let r,i,o;n.d(t,"d",(function(){return r})),n.d(t,"g",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"h",(function(){return s})),n.d(t,"a",(function(){return l})),n.d(t,"e",(function(){return c})),n.d(t,"f",(function(){return u})),function(e){e.DontNotify="dont_notify",e.Notify="notify",e.Coalesce="coalesce"}(r||(r={})),function(e){e.Highlight="highlight",e.Sound="sound"}(i||(i={})),function(e){e.ExactEquals="==",e.LessThan="<",e.GreaterThan=">",e.GreaterThanOrEqual=">=",e.LessThanOrEqual="<="}(o||(o={}));const a="2";function s(e){return"==2"===e||"2"===e}let l,c,u;!function(e){e.EventMatch="event_match",e.EventPropertyIs="event_property_is",e.ContainsDisplayName="contains_display_name",e.RoomMemberCount="room_member_count",e.SenderNotificationPermission="sender_notification_permission",e.CallStarted="call_started",e.CallStartedPrefix="org.matrix.msc3914.call_started"}(l||(l={})),function(e){e.Override="override",e.ContentSpecific="content",e.RoomSpecific="room",e.SenderSpecific="sender",e.Underride="underride"}(c||(c={})),function(e){e.Master=".m.rule.master",e.ContainsDisplayName=".m.rule.contains_display_name",e.ContainsUserName=".m.rule.contains_user_name",e.AtRoomNotification=".m.rule.roomnotif",e.DM=".m.rule.room_one_to_one",e.EncryptedDM=".m.rule.encrypted_room_one_to_one",e.Message=".m.rule.message",e.EncryptedMessage=".m.rule.encrypted",e.InviteToSelf=".m.rule.invite_for_me",e.MemberEvent=".m.rule.member_event",e.IncomingCall=".m.rule.call",e.SuppressNotices=".m.rule.suppress_notices",e.Tombstone=".m.rule.tombstone",e.PollStart=".m.rule.poll_start",e.PollStartUnstable=".org.matrix.msc3930.rule.poll_start",e.PollEnd=".m.rule.poll_end",e.PollEndUnstable=".org.matrix.msc3930.rule.poll_end",e.PollStartOneToOne=".m.rule.poll_start_one_to_one",e.PollStartOneToOneUnstable=".org.matrix.msc3930.rule.poll_start_one_to_one",e.PollEndOneToOne=".m.rule.poll_end_one_to_one",e.PollEndOneToOneUnstable=".org.matrix.msc3930.rule.poll_end_one_to_one"}(u||(u={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"f",(function(){return _})),n.d(t,"e",(function(){return b})),n.d(t,"c",(function(){return v})),n.d(t,"b",(function(){return y})),n.d(t,"d",(function(){return E}));var r=n(120),i=n.n(r),o=n(1),a=n(129),s=n(122),l=n(655),c=n(127),u=n(121),d=n(929),h=n(191),p=n(166),m=n(144),g=n(586);function f(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0;const i=new l.a(e,r);return i.invite(t,void 0,n).then((e=>Promise.resolve({states:e,inviter:i})))}function _(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";c.b.createDialog(d.a,{kind:g.a.Dm,initialText:e},"mx_InviteDialog_flexWrapper",!1,!0)}function b(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";c.b.createDialog(d.a,{kind:g.a.Invite,initialText:t,roomId:e},"mx_InviteDialog_flexWrapper",!1,!0)}function v(e){if(!e||e.getType()!==a.b.RoomThirdPartyInvite)return!1;return!["key_validity_url","public_key","display_name"].some((t=>!e.getContent()[t]))}function y(e,t){return f(e,t,arguments.length>2&&void 0!==arguments[2]&&arguments[2],arguments.length>3?arguments[3]:void 0).then((t=>{const n=s.a.get().getRoom(e);E(t.states,n,t.inviter)})).catch((e=>{o.a.error(e.stack),c.b.createDialog(m.a,{title:Object(u.a)("Failed to invite"),description:e&&e.message?e.message:Object(u.a)("Operation failed")})}))}function E(e,t,n,r){const o=Object.keys(e).filter((t=>"error"===e[t]));if(1===o.length&&n.fatal)return c.b.createDialog(m.a,{title:Object(u.a)("Failed to invite users to %(roomName)s",{roomName:t.name}),description:n.getErrorText(o[0])}),!1;{const a=[];for(const t of o)if("error"===e[t]){const e=n.getErrorText(t);a.push(t+": "+e)}const l=s.a.get();if(a.length>0){const e=i.a.createElement("div",{className:"mx_InviteDialog_multiInviterError"},i.a.createElement("h4",null,Object(u.a)("We sent the others, but the below people couldn't be invited to <RoomName/>",{},{RoomName:()=>i.a.createElement("b",null,t.name)})),i.a.createElement("div",null,o.map((e=>{var t,o,a;const s=(null==r?void 0:r.get(e))||l.getUser(e),c=s.name||s.rawDisplayName,u=(null===(t=(o=s).getMxcAvatarUrl)||void 0===t?void 0:t.call(o))||s.avatarUrl;return i.a.createElement("div",{key:e,className:"mx_InviteDialog_tile mx_InviteDialog_tile--inviterError"},i.a.createElement("div",{className:"mx_InviteDialog_tile_avatarStack"},i.a.createElement(h.a,{url:null!==(a=u&&Object(p.b)(u).getSquareThumbnailHttp(24))&&void 0!==a?a:void 0,name:c,idName:null==s?void 0:s.userId,width:36,height:36})),i.a.createElement("div",{className:"mx_InviteDialog_tile_nameStack"},i.a.createElement("span",{className:"mx_InviteDialog_tile_nameStack_name"},c),i.a.createElement("span",{className:"mx_InviteDialog_tile_nameStack_userId"},null==s?void 0:s.userId)),i.a.createElement("div",{className:"mx_InviteDialog_tile--inviterError_errorText"},n.getErrorText(e)))}))));return c.b.createDialog(m.a,{title:Object(u.a)("Some invites couldn't be sent"),description:e}),!1}}return!0}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(120),i=n.n(r),o=n(126),a=n.n(o),s=n(121);t.b=e=>{let{className:t,actionLabel:n,onBack:o,onAction:l,children:c}=e;const[u,d]=Object(r.useState)(null);let h;if(u)c=u;else if(l){const e=()=>{l().then((e=>{"string"==typeof e&&d(e)}))};h=i.a.createElement("button",{onClick:e},n)}return i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:a()("mx_DevTools_content",t)},c),i.a.createElement("div",{className:"mx_Dialog_buttons"},i.a.createElement("button",{onClick:()=>{u?d(null):o()}},Object(s.a)("Back")),h))};const l=Object(r.createContext)({})},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(13),i=n.n(r),o=n(1),a=n(147),s=n(151),l=n(202),c=n(124),u=n(379),d=n(332),h=n(181),p=n(201),m=n(153);class g extends l.a{constructor(){super(c.a,{}),i()(this,"widgetMap",new Map),i()(this,"roomMap",new Map),i()(this,"onWidgetEchoStoreUpdate",((e,t)=>{this.initRoom(e),this.loadRoomWidgets(this.matrixClient.getRoom(e)),this.emit(m.b,e)})),i()(this,"onRoom",(e=>{this.initRoom(e.roomId),this.loadRoomWidgets(e),this.emit(m.b,e.roomId)})),i()(this,"onRoomStateEvents",(e=>{if("im.vector.modular.widgets"!==e.getType())return;const t=e.getRoomId();this.initRoom(t),this.loadRoomWidgets(this.matrixClient.getRoom(t)),this.emit(m.b,t)})),u.a.on("update",this.onWidgetEchoStoreUpdate)}static get instance(){return g.internalInstance}initRoom(e){this.roomMap.has(e)||this.roomMap.set(e,{widgets:[]})}async onReady(){this.matrixClient.on(a.b.Room,this.onRoom),this.matrixClient.on(s.b.Events,this.onRoomStateEvents),this.matrixClient.getRooms().forEach((e=>{this.loadRoomWidgets(e)})),this.emit(m.b,null)}async onNotReady(){this.matrixClient.off(a.b.Room,this.onRoom),this.matrixClient.off(s.b.Events,this.onRoomStateEvents),this.widgetMap=new Map,this.roomMap=new Map,await this.reset({})}async onAction(e){}generateApps(e){return u.a.getEchoedRoomWidgets(e.roomId,h.a.getRoomWidgets(e)).map((e=>h.a.makeAppConfig(e.getStateKey(),e.getContent(),e.getSender(),e.getRoomId(),e.getId())))}loadRoomWidgets(e){if(!e)return;const t=this.roomMap.get(e.roomId)||{};t.widgets=[],Array.from(this.widgetMap.values()).forEach((n=>{n.roomId===e.roomId&&(void 0===n.eventId?t.widgets.push(n):this.widgetMap.delete(h.a.getWidgetUid(n)))}));let n=!1;this.generateApps(e).forEach((e=>{const r=this.widgetMap.get(h.a.getWidgetUid(e));r&&o.a.warn(`Possible widget ID conflict for ${e.id} - wants to store in room ${e.roomId} but is currently stored as ${r.roomId} - letting the want win`),this.widgetMap.set(h.a.getWidgetUid(e),e),t.widgets.push(e),n=!0})),n&&!this.roomMap.has(e.roomId)&&this.roomMap.set(e.roomId,t);const r=d.b.instance.getPersistentWidgetId();r&&d.b.instance.getPersistentRoomId()===e.roomId&&!t.widgets.some((e=>e.id===r))&&(o.a.log(`Persistent widget ${r} removed from room ${e.roomId}: destroying.`),d.b.instance.destroyPersistentWidget(r,e.roomId)),this.emit(e.roomId)}get(e,t){return this.widgetMap.get(h.a.calcWidgetUid(e,t))}getRoom(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&this.initRoom(e),this.roomMap.get(e)}getApps(e){const t=this.getRoom(e);return(null==t?void 0:t.widgets)||[]}addVirtualWidget(e,t){this.initRoom(t);const n=h.a.makeAppConfig(e.id,e,e.creatorUserId,t,void 0);return this.widgetMap.set(h.a.getWidgetUid(n),n),this.roomMap.get(t).widgets.push(n),n}removeVirtualWidget(e,t){this.widgetMap.delete(h.a.calcWidgetUid(e,t));const n=this.roomMap.get(t);n&&(n.widgets=n.widgets.filter((n=>!(n.id===e&&n.roomId===t))))}doesRoomHaveConference(e){const t=this.getRoom(e.roomId);if(!t)return!1;const n=t.widgets.filter((e=>p.a.JITSI.matches(e.type))),r=u.a.roomHasPendingWidgetsOfType(e.roomId,[],p.a.JITSI);return n.length>0||r}isJoinedToConferenceIn(e){const t=this.getRoom(e.roomId);if(!t)return!1;return t.widgets.filter((e=>p.a.JITSI.matches(e.type))).some((t=>d.b.instance.getWidgetPersistence(t.id,e.roomId)))}}i()(g,"internalInstance",(()=>{const e=new g;return e.start(),e})()),window.mxWidgetStore=g.instance},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(120),i=n.n(r),o=n(126),a=n.n(o),s=n(392),l=n(461);class c extends i.a.PureComponent{render(){const{label:e,caption:t}=this.props;let n=i.a.createElement("span",{className:"mx_SettingsFlag_label"},e,t&&i.a.createElement(i.a.Fragment,null,i.a.createElement("br",null),i.a.createElement(l.a,null,t))),r=i.a.createElement(s.a,{checked:this.props.value,disabled:this.props.disabled,onChange:this.props.onChange,title:this.props.label,tooltip:this.props.tooltip});if(this.props.toggleInFront){const e=n;n=r,r=e}const o=a()("mx_SettingsFlag",this.props.className,{mx_SettingsFlag_toggleInFront:this.props.toggleInFront});return i.a.createElement("div",{"data-testid":this.props["data-testid"],className:o},n,r)}}},function(e,t,n){"use strict";var r=n(120),i=n.n(r),o=n(123);t.a=e=>{let{description:t,detail:n,acceptLabel:r,rejectLabel:a,onAccept:s,onReject:l}=e;const c=n?i.a.createElement("div",{className:"mx_Toast_detail"},n):null;return i.a.createElement("div",null,i.a.createElement("div",{className:"mx_Toast_description"},t,c),i.a.createElement("div",{className:"mx_Toast_buttons","aria-live":"off"},l&&a&&i.a.createElement(o.a,{kind:"danger_outline",onClick:l},a),i.a.createElement(o.a,{onClick:s,kind:"primary"},r)))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(120);const i=(e,t)=>{const n=Object(r.useRef)((e=>{}));Object(r.useEffect)((()=>{n.current=t}),[t]),Object(r.useEffect)((()=>{const t=e.register((e=>n.current(e)));return()=>{e.unregister(t)}}),[e])}},function(e,t,n){"use strict";n.d(t,"b",(function(){return Te})),n.d(t,"a",(function(){return Ce})),n.d(t,"e",(function(){return ke})),n.d(t,"g",(function(){return Oe})),n.d(t,"f",(function(){return Ie})),n.d(t,"d",(function(){return Re})),n.d(t,"c",(function(){return Ne}));var r=n(130),i=n.n(r),o=n(120),a=n.n(o),s=n(129),l=n(187),c=n(224),u=n(125),d=n(138),h=n(917),p=n(13),m=n.n(p),g=n(126),f=n.n(g),_=n(239),b=n(174),v=n(122),y=n(121),E=n(611),S=n(281);class w extends a.a.Component{constructor(e){super(e),m()(this,"onRequestChanged",(()=>{this.forceUpdate()})),m()(this,"onTrustChanged",(e=>{const{mxEvent:t}=this.props,n=t.verificationRequest;n&&n.otherUserId===e&&this.forceUpdate()}))}componentDidMount(){const e=this.props.mxEvent.verificationRequest;e&&e.on(_.l.Change,this.onRequestChanged),v.a.get().on(b.b.UserTrustStatusChanged,this.onTrustChanged)}componentWillUnmount(){const e=this.props.mxEvent.verificationRequest;e&&e.off(_.l.Change,this.onRequestChanged);const t=v.a.get();t&&t.removeListener(b.b.UserTrustStatusChanged,this.onTrustChanged)}static shouldRender(e,t){return!!t&&(!(e.getType()===s.b.KeyVerificationCancel&&!t.cancelled)&&(!(e.getType()===s.b.KeyVerificationDone&&!t.done)&&(!t.pending&&!!v.a.get().checkUserTrust(t.otherUserId).isCrossSigningVerified())))}render(){const{mxEvent:e}=this.props,t=e.verificationRequest;if(!w.shouldRender(e,t))return null;const n=v.a.get().getUserId();let r;if(t.done)r=Object(y.a)("You verified %(name)s",{name:Object(E.a)(t.otherUserId,e.getRoomId())});else if(t.cancelled){const i=t.cancellingUserId;r=i===n?Object(y.a)("You cancelled verifying %(name)s",{name:Object(E.a)(t.otherUserId,e.getRoomId())}):Object(y.a)("%(name)s cancelled verifying",{name:Object(E.a)(i,e.getRoomId())})}if(r){const n=f()("mx_cryptoEvent mx_cryptoEvent_icon",{mx_cryptoEvent_icon_verified:t.done});return a.a.createElement(S.a,{className:n,title:r,subtitle:Object(E.b)(t.otherUserId,e.getRoomId()),timestamp:this.props.timestamp})}return null}}var T=n(188),C=n(172),x=n(468),F=n(123),D=n(841),k=n(148),O=n(165),I=n(337);class A extends a.a.PureComponent{constructor(e){super(e),m()(this,"wrapperElement",Object(o.createRef)()),m()(this,"resizeObserver",void 0),m()(this,"onLengthChanged",(e=>{this.setState({length:e})})),m()(this,"resizeObserverCallback",(e=>{const t=e.find((e=>e.target===this.wrapperElement.current));t&&this.setState({narrow:t.contentRect.width<642.8571428571429})})),m()(this,"onSilencedChanged",(e=>{this.setState({silenced:e})})),m()(this,"onStateChanged",(e=>{this.setState({callState:e})})),this.state={callState:this.props.callEventGrouper.state,silenced:!1,narrow:!1,length:0}}componentDidMount(){this.props.callEventGrouper.addListener(x.b.StateChanged,this.onStateChanged),this.props.callEventGrouper.addListener(x.b.SilencedChanged,this.onSilencedChanged),this.props.callEventGrouper.addListener(x.b.LengthChanged,this.onLengthChanged),this.resizeObserver=new ResizeObserver(this.resizeObserverCallback),this.wrapperElement.current&&this.resizeObserver.observe(this.wrapperElement.current)}componentWillUnmount(){this.props.callEventGrouper.removeListener(x.b.StateChanged,this.onStateChanged),this.props.callEventGrouper.removeListener(x.b.SilencedChanged,this.onSilencedChanged),this.props.callEventGrouper.removeListener(x.b.LengthChanged,this.onLengthChanged),this.resizeObserver.disconnect()}renderCallBackButton(e){return a.a.createElement(F.a,{className:"mx_LegacyCallEvent_content_button mx_LegacyCallEvent_content_button_callBack",onClick:this.props.callEventGrouper.callBack,kind:"primary"},a.a.createElement("span",null," ",e," "))}renderSilenceIcon(){const e=f()({mx_LegacyCallEvent_iconButton:!0,mx_LegacyCallEvent_unSilence:this.state.silenced,mx_LegacyCallEvent_silence:!this.state.silenced});return a.a.createElement(k.a,{className:e,onClick:this.props.callEventGrouper.toggleSilenced,title:this.state.silenced?Object(y.a)("Sound on"):Object(y.a)("Silence call")})}renderContent(e){if(e===T.f.Ringing){let e;return this.state.narrow||(e=this.renderSilenceIcon()),a.a.createElement("div",{className:"mx_LegacyCallEvent_content"},e,a.a.createElement(F.a,{className:"mx_LegacyCallEvent_content_button mx_LegacyCallEvent_content_button_reject",onClick:this.props.callEventGrouper.rejectCall,kind:"danger"},a.a.createElement("span",null," ",Object(y.a)("Decline")," ")),a.a.createElement(F.a,{className:"mx_LegacyCallEvent_content_button mx_LegacyCallEvent_content_button_answer",onClick:this.props.callEventGrouper.answerCall,kind:"primary"},a.a.createElement("span",null," ",Object(y.a)("Accept")," ")),this.props.timestamp)}if(e===T.f.Ended){const e=this.props.callEventGrouper.hangupReason;if(this.props.callEventGrouper.gotRejected)return a.a.createElement("div",{className:"mx_LegacyCallEvent_content"},Object(y.a)("Call declined"),this.renderCallBackButton(Object(y.a)("Call back")),this.props.timestamp);if([T.c.UserHangup,"user hangup"].includes(e)||!e){const e=this.props.callEventGrouper.duration;let t=Object(y.a)("Call ended");return e&&(t+=" • "+Object(O.j)(e)),a.a.createElement("div",{className:"mx_LegacyCallEvent_content"},t,this.props.timestamp)}if(e===T.c.InviteTimeout)return a.a.createElement("div",{className:"mx_LegacyCallEvent_content"},Object(y.a)("No answer"),this.renderCallBackButton(Object(y.a)("Call back")),this.props.timestamp);if(e===T.c.AnsweredElsewhere)return a.a.createElement("div",{className:"mx_LegacyCallEvent_content"},Object(y.a)("Answered elsewhere"),this.props.timestamp);let t;return t=e===T.c.IceFailed?Object(y.a)("Could not connect media"):"ice_timeout"===e?Object(y.a)("Connection failed"):e===T.c.NoUserMedia?Object(y.a)("Their device couldn't start the camera or microphone"):"unknown_error"===e?Object(y.a)("An unknown error occurred"):e===T.c.UserBusy?Object(y.a)("The user you called is busy."):Object(y.a)("Unknown failure: %(reason)s",{reason:e}),a.a.createElement("div",{className:"mx_LegacyCallEvent_content"},a.a.createElement(D.b,{tooltip:t,className:"mx_LegacyCallEvent_content_tooltip",kind:D.a.Warning}),Object(y.a)("Connection failed"),this.renderCallBackButton(Object(y.a)("Retry")),this.props.timestamp)}return e===T.f.Connected?a.a.createElement("div",{className:"mx_LegacyCallEvent_content"},a.a.createElement(I.a,{seconds:this.state.length,"aria-live":"off"}),this.props.timestamp):e===T.f.Connecting?a.a.createElement("div",{className:"mx_LegacyCallEvent_content"},Object(y.a)("Connecting"),this.props.timestamp):e===x.a.Missed?a.a.createElement("div",{className:"mx_LegacyCallEvent_content"},Object(y.a)("Missed call"),this.renderCallBackButton(Object(y.a)("Call back")),this.props.timestamp):a.a.createElement("div",{className:"mx_LegacyCallEvent_content"},Object(y.a)("The call is in an unknown state!"),this.props.timestamp)}render(){const e=this.props.mxEvent,t=e.sender?e.sender.name:e.getSender(),n=this.props.callEventGrouper.isVoice,r=n?Object(y.a)("Voice call"):Object(y.a)("Video call"),i=this.state.callState,o=this.props.callEventGrouper.hangupReason,s=this.renderContent(i),l=f()("mx_LegacyCallEvent",{mx_LegacyCallEvent_voice:n,mx_LegacyCallEvent_video:!n,mx_LegacyCallEvent_narrow:this.state.narrow,mx_LegacyCallEvent_missed:i===x.a.Missed,mx_LegacyCallEvent_noAnswer:i===T.f.Ended&&o===T.c.InviteTimeout,mx_LegacyCallEvent_rejected:i===T.f.Ended&&this.props.callEventGrouper.gotRejected});let c;return this.state.narrow&&this.state.callState===T.f.Ringing&&(c=this.renderSilenceIcon()),a.a.createElement("div",{className:"mx_LegacyCallEvent_wrapper",ref:this.wrapperElement},a.a.createElement("div",{className:l},c,a.a.createElement("div",{className:"mx_LegacyCallEvent_info"},a.a.createElement(C.b,{member:e.sender,width:32,height:32}),a.a.createElement("div",{className:"mx_LegacyCallEvent_info_basic"},a.a.createElement("div",{className:"mx_LegacyCallEvent_sender"},t),a.a.createElement("div",{className:"mx_LegacyCallEvent_type"},a.a.createElement("div",{className:"mx_LegacyCallEvent_type_icon"}),r))),s))}}var R=n(203),N=n(280),M=n(124),P=n(128),L=n(600),B=n(612),U=n(133),j=n(613);const G=Object(o.forwardRef)(((e,t)=>{let{mxEvent:n,call:r,participatingMembers:i,buttonText:s,buttonKind:l,buttonDisabledTooltip:c,onButtonClick:u}=e;const d=Object(o.useMemo)((()=>{var e,t;return null!==(e=null===(t=n.sender)||void 0===t?void 0:t.name)&&void 0!==e?e:n.getSender()}),[n]),h=Object(o.useMemo)((()=>i.slice(0,8)),[i]),p=i.length>h.length;return a.a.createElement("div",{className:"mx_CallEvent_wrapper",ref:t},a.a.createElement("div",{className:"mx_CallEvent mx_CallEvent_active"},a.a.createElement(C.b,{member:n.sender,fallbackUserId:n.getSender(),viewUserOnClick:!0,width:24,height:24}),a.a.createElement("div",{className:"mx_CallEvent_columns"},a.a.createElement("div",{className:"mx_CallEvent_details"},a.a.createElement("span",{className:"mx_CallEvent_title"},Object(y.a)("%(name)s started a video call",{name:d})),a.a.createElement(L.a,{type:L.c.Video,text:Object(y.a)("Video call"),active:!1,participantCount:i.length}),a.a.createElement(B.a,{members:h,faceSize:24,overflow:p})),r&&a.a.createElement(j.b,{groupCall:r.groupCall}),a.a.createElement(k.a,{className:"mx_CallEvent_button",kind:l,disabled:null===u||void 0!==c,onClick:u,tooltip:c},s))))})),z=Object(o.forwardRef)(((e,t)=>{let{mxEvent:n,call:r}=e;const i=Object(N.c)(r),s=Object(N.g)(r),l=Object(N.d)(r),c=Object(o.useCallback)((e=>{e.preventDefault(),M.a.dispatch({action:P.a.ViewRoom,room_id:n.getRoomId(),view_call:!0,metricsTrigger:void 0})}),[n]),u=Object(o.useCallback)((e=>{e.preventDefault(),r.disconnect()}),[r]),[d,h,p]=Object(o.useMemo)((()=>{switch(i){case R.c.Disconnected:return[Object(y.a)("Join"),"primary",c];case R.c.Connecting:return[Object(y.a)("Join"),"primary",null];case R.c.Connected:return[Object(y.a)("Leave"),"danger",u];case R.c.Disconnecting:return[Object(y.a)("Leave"),"danger",null]}}),[i,c,u]);return a.a.createElement(G,{ref:t,mxEvent:n,call:r,participatingMembers:s,buttonText:d,buttonKind:h,buttonDisabledTooltip:null!=l?l:void 0,onButtonClick:p})})),H=Object(o.forwardRef)(((e,t)=>{let{mxEvent:n}=e;const r=Object(o.useContext)(U.a),i=Object(N.a)(n.getRoomId()),s=r.getRoom(n.getRoomId()).currentState.getStateEvents(n.getType(),n.getStateKey());return"m.terminated"in s.getContent()?a.a.createElement("div",{className:"mx_CallEvent_wrapper",ref:t},a.a.createElement("div",{className:"mx_CallEvent mx_CallEvent_inactive"},a.a.createElement("div",{className:"mx_CallEvent_columns"},a.a.createElement("span",{className:"mx_CallEvent_title"},Object(y.a)("Video call ended")),a.a.createElement(j.a,{delta:s.getTs()-n.getTs()})))):null===i?a.a.createElement(G,{ref:t,mxEvent:n,call:null,participatingMembers:[],buttonText:Object(y.a)("Join"),buttonKind:"primary",onButtonClick:null}):a.a.createElement(z,{mxEvent:n,call:i,ref:t})}));var q=n(293);class V extends a.a.Component{render(){var e;const t=q.b(this.props.mxEvent,!0,null===(e=this.context)||void 0===e?void 0:e.showHiddenEvents);return t?a.a.createElement("div",{className:"mx_TextualEvent"},t):null}}m()(V,"contextType",d.b);var $=n(842),K=n(1),W=n(168),Y=n(309);const Q=e=>{let{mxEvent:t,timestamp:n}=e;const r=u.b.getValue("feature_dynamic_room_predecessors"),i=Object(o.useContext)(d.b),s=Object(Y.a)(i.room,Object(o.useCallback)((e=>e.findPredecessor(r)),[r])),l=Object(o.useCallback)((e=>{e.preventDefault(),M.a.dispatch({action:P.a.ViewRoom,event_id:s.eventId,highlighted:!0,room_id:s.roomId,metricsTrigger:"Predecessor",metricsViaKeyboard:"click"!==e.type})}),[null==s?void 0:s.eventId,null==s?void 0:s.roomId]);if(!i.room||i.room.roomId!==t.getRoomId())return K.a.warn("RoomPredecessorTile unexpectedly used outside of the context of theroom containing this m.room.create event."),a.a.createElement(a.a.Fragment,null);if(!s)return K.a.warn("RoomPredecessorTile unexpectedly used in a room with no predecessor."),a.a.createElement("div",null);const c=v.a.get().getRoom(s.roomId);if(!c)return K.a.warn(`Failed to find predecessor room with id ${s.roomId}`),a.a.createElement(a.a.Fragment,null);const h=new W.a(c,s.roomId);let p;h.load(),p=s.eventId?h.forEvent(s.eventId):h.forRoom();const m=a.a.createElement("a",{href:p,onClick:l},Object(y.a)("Click here to see older messages."));return a.a.createElement(S.a,{className:"mx_CreateEvent",title:Object(y.a)("This room is a continuation of another conversation."),subtitle:m,timestamp:n})};var X=n(127),Z=n(166),J=n(162),ee=n(406);class te extends a.a.Component{constructor(){super(...arguments),m()(this,"onAvatarClick",(()=>{const e=v.a.get(),t=this.props.mxEvent,n=Object(Z.b)(t.getContent().url).srcHttp,r=e.getRoom(this.props.mxEvent.getRoomId()),i={src:n,name:Object(y.a)("%(senderDisplayName)s changed the avatar for %(roomName)s",{senderDisplayName:t.sender&&t.sender.name?t.sender.name:t.getSender(),roomName:r?r.name:""})};X.b.createDialog(ee.a,i,"mx_Dialog_lightbox",null,!0)}))}render(){const e=this.props.mxEvent,t=e.sender&&e.sender.name?e.sender.name:e.getSender();if(!e.getContent().url||0===e.getContent().url.trim().length)return a.a.createElement("div",{className:"mx_TextualEvent"},Object(y.a)("%(senderDisplayName)s removed the room avatar.",{senderDisplayName:t}));const n=v.a.get().getRoom(e.getRoomId()),r={avatarUrl:e.getContent().url,name:n?n.name:""};return a.a.createElement("div",{className:"mx_RoomAvatarEvent"},Object(y.a)("%(senderDisplayName)s changed the room avatar to <img/>",{senderDisplayName:t},{img:()=>a.a.createElement(F.a,{key:"avatar",className:"mx_RoomAvatarEvent_avatar",onClick:this.onAvatarClick},a.a.createElement(J.a,{width:14,height:14,oobData:r}))}))}}var ne=n(207),re=n(493),ie=n(182),oe=n(173);class ae extends a.a.Component{constructor(){super(...arguments),m()(this,"openRequest",(()=>{const{verificationRequest:e}=this.props.mxEvent,t=v.a.get().getUser(e.otherUserId);oe.a.instance.setCards([{phase:ie.a.RoomSummary},{phase:ie.a.RoomMemberInfo,state:{member:t}},{phase:ie.a.EncryptionPanel,state:{verificationRequest:e,member:t}}])})),m()(this,"onRequestChanged",(()=>{this.forceUpdate()})),m()(this,"onAcceptClicked",(async()=>{const e=this.props.mxEvent.verificationRequest;if(e)try{this.openRequest(),await e.accept()}catch(e){K.a.error(e.message)}})),m()(this,"onRejectClicked",(async()=>{const e=this.props.mxEvent.verificationRequest;if(e)try{await e.cancel()}catch(e){K.a.error(e.message)}}))}componentDidMount(){const e=this.props.mxEvent.verificationRequest;e&&e.on(_.l.Change,this.onRequestChanged)}componentWillUnmount(){const e=this.props.mxEvent.verificationRequest;e&&e.off(_.l.Change,this.onRequestChanged)}acceptedLabel(e){return e===v.a.get().getUserId()?Object(y.a)("You accepted"):Object(y.a)("%(name)s accepted",{name:Object(E.a)(e,this.props.mxEvent.getRoomId())})}cancelledLabel(e){const t=v.a.get().getUserId(),{cancellationCode:n}=this.props.mxEvent.verificationRequest,r="m.user"===n;return e===t?r?Object(y.a)("You declined"):Object(y.a)("You cancelled"):r?Object(y.a)("%(name)s declined",{name:Object(E.a)(e,this.props.mxEvent.getRoomId())}):Object(y.a)("%(name)s cancelled",{name:Object(E.a)(e,this.props.mxEvent.getRoomId())})}render(){const{mxEvent:e}=this.props,t=e.verificationRequest;if(!t||t.invalid)return null;let n,r,i;if(!t.canAccept){let e;t.ready||t.started||t.done?e=a.a.createElement(F.a,{onClick:this.openRequest},this.acceptedLabel(t.receivingUserId)):t.cancelled?e=this.cancelledLabel(t.cancellingUserId):t.accepting?e=Object(y.a)("Accepting…"):t.declining&&(e=Object(y.a)("Declining…")),i=a.a.createElement("div",{className:"mx_cryptoEvent_state"},e)}if(t.initiatedByMe)n=Object(y.a)("You sent a verification request"),r=Object(E.b)(t.receivingUserId,e.getRoomId());else{const o=Object(E.a)(t.requestingUserId,e.getRoomId());n=Object(y.a)("%(name)s wants to verify",{name:o}),r=Object(E.b)(t.requestingUserId,e.getRoomId()),t.canAccept&&(i=a.a.createElement("div",{className:"mx_cryptoEvent_buttons"},a.a.createElement(F.a,{kind:"danger",onClick:this.onRejectClicked},Object(y.a)("Decline")),a.a.createElement(F.a,{kind:"primary",onClick:this.onAcceptClicked},Object(y.a)("Accept"))))}return n?a.a.createElement(S.a,{className:"mx_cryptoEvent mx_cryptoEvent_icon",title:n,subtitle:r,timestamp:this.props.timestamp},i):null}}var se=n(201),le=n(234);class ce extends a.a.PureComponent{constructor(e){super(e)}render(){var e;const t=this.props.mxEvent.getContent().url,n=this.props.mxEvent.getPrevContent().url,r=(null===(e=this.props.mxEvent.sender)||void 0===e?void 0:e.name)||this.props.mxEvent.getSender(),i=v.a.get().getRoom(this.props.mxEvent.getRoomId()),o=this.props.mxEvent.getStateKey(),s=le.a.instance.getRoom(i.roomId,!0).widgets.find((e=>e.id===o));let l=Object(y.a)("Join the conference at the top of this room");return s&&ne.d.instance.isInContainer(i,s,ne.a.Right)?l=Object(y.a)("Join the conference from the room information card on the right"):s||(l=null),t?n?a.a.createElement(S.a,{className:"mx_MJitsiWidgetEvent",title:Object(y.a)("Video conference updated by %(senderName)s",{senderName:r}),subtitle:l,timestamp:this.props.timestamp}):a.a.createElement(S.a,{className:"mx_MJitsiWidgetEvent",title:Object(y.a)("Video conference started by %(senderName)s",{senderName:r}),subtitle:l,timestamp:this.props.timestamp}):a.a.createElement(S.a,{className:"mx_MJitsiWidgetEvent",title:Object(y.a)("Video conference ended by %(senderName)s",{senderName:r}),timestamp:this.props.timestamp})}}var ue=n(180);var de=a.a.forwardRef(((e,t)=>{let n,{mxEvent:r}=e;const i=r.messageVisibility();switch(i.visible){case!0:throw new Error("HiddenBody should only be applied to hidden messages");case!1:n=i.reason?Object(y.a)("Message pending moderation: %(reason)s",{reason:i.reason}):Object(y.a)("Message pending moderation")}return a.a.createElement("span",{className:"mx_HiddenBody",ref:t},n)})),he=n(136);class pe extends a.a.PureComponent{constructor(e){super(e),m()(this,"onToggle",(e=>{e.preventDefault();const{expanded:t}=this.state;this.setState({expanded:!t})})),this.state={expanded:!1}}componentDidMount(){const{mxEvent:e}=this.props;v.a.get().decryptEventIfNeeded(e),e.isBeingDecrypted()&&e.once(he.MatrixEventEvent.Decrypted,(()=>this.forceUpdate()))}render(){const{mxEvent:e}=this.props,{expanded:t}=this.state;let n;n=t?a.a.createElement("pre",null,JSON.stringify(e,null,4)):a.a.createElement("code",null,`{ "type": ${e.getType()} }`);const r=f()("mx_ViewSourceEvent mx_EventTile_content",{mx_ViewSourceEvent_expanded:t});return a.a.createElement("span",{className:r},n,a.a.createElement(F.a,{kind:"link",title:Object(y.a)("toggle event"),className:"mx_ViewSourceEvent_toggle",onClick:this.onToggle}))}}var me=n(204);const ge=e=>{var t;return me.b.matches(e.getType())&&((null===(t=e.getContent())||void 0===t?void 0:t.live)||e.isRedacted())};var fe=n(598),_e=n(192);const be=(e,t)=>a.a.createElement(h.a,i()({ref:e},t)),ve=(e,t)=>a.a.createElement(w,i()({ref:e},t)),ye=(e,t)=>a.a.createElement(H,i()({ref:e},t)),Ee=(e,t)=>a.a.createElement(V,i()({ref:e},t)),Se=(e,t)=>a.a.createElement(ae,i()({ref:e},t)),we=(e,t)=>a.a.createElement(de,i()({ref:e},t)),Te=(e,t)=>a.a.createElement(ce,i()({ref:e},t)),Ce=(e,t)=>a.a.createElement(pe,i()({ref:e},t)),xe=new Map([[s.b.RoomMessage,be],[s.b.Sticker,be],[l.e.name,be],[l.e.altName,be],[l.a.name,be],[l.a.altName,be],[s.b.KeyVerificationCancel,ve],[s.b.KeyVerificationDone,ve],[s.b.CallInvite,(e,t)=>a.a.createElement(A,i()({ref:e},t))]]),Fe=new Map([[s.b.RoomEncryption,(e,t)=>a.a.createElement($.a,i()({ref:e},t))],[s.b.RoomCanonicalAlias,Ee],[s.b.RoomCreate,(e,t)=>a.a.createElement(Q,t)],[s.b.RoomMember,Ee],[s.b.RoomName,Ee],[s.b.RoomAvatar,(e,t)=>a.a.createElement(te,i()({ref:e},t))],[s.b.RoomThirdPartyInvite,Ee],[s.b.RoomHistoryVisibility,Ee],[s.b.RoomTopic,Ee],[s.b.RoomPowerLevels,Ee],[s.b.RoomPinnedEvents,Ee],[s.b.RoomServerAcl,Ee],["im.vector.modular.widgets",Ee],[ne.c,Ee],[s.b.RoomTombstone,Ee],[s.b.RoomJoinRules,Ee],[s.b.RoomGuestAccess,Ee]]);for(const e of R.d.CALL_EVENT_TYPE.names)Fe.set(e,ye);for(const e of re.a)Fe.set(e,Ee);const De=new Set([s.b.RoomEncryption,s.b.RoomCanonicalAlias,s.b.RoomCreate,s.b.RoomName,s.b.RoomAvatar,s.b.RoomHistoryVisibility,s.b.RoomTopic,s.b.RoomPowerLevels,s.b.RoomPinnedEvents,s.b.RoomServerAcl,ne.c,s.b.RoomTombstone,s.b.RoomJoinRules,s.b.RoomGuestAccess]);function ke(e,t,n,r){var i;const o=e.getType();if(r&&n)return Ce;const a=()=>n?Ce:void 0;if(Object(ue.h)(e,t)===ue.a.HIDDEN_TO_CURRENT_USER)return we;if(o===s.b.RoomMessage){const n=e.getContent();if((null==n?void 0:n.msgtype)===s.e.KeyVerificationRequest){const r=t.getUserId();return e.getSender()!==r&&n.to!==r?a():Se}}else if(o===s.b.KeyVerificationDone){const n=t.getUserId();if(e.getSender()!==n)return a()}if((o===s.b.KeyVerificationCancel||o===s.b.KeyVerificationDone)&&!w.shouldRender(e,e.verificationRequest))return a();if(o===s.b.RoomCreate){var l;const n=u.b.getValue("feature_dynamic_room_predecessors");if(!(null===(l=t.getRoom(e.getRoomId()))||void 0===l?void 0:l.findPredecessor(n)))return a()}if("im.vector.modular.widgets"===o){let t=e.getContent().type;if(t||(t=e.getPrevContent().type),se.a.JITSI.matches(t))return Te}var c;return e.isState()?ge(e)||Object(fe.a)(e)?be:Object(_e.N)(e)?Ee:De.has(o)&&""!==e.getStateKey()?a():(Fe.get(o)!==Ee||Object(q.a)(e,n))&&null!==(c=Fe.get(o))&&void 0!==c?c:a():e.isRedacted()?be:e.isRelation(s.h.Replace)||e.getContent()[_e.c]||!n&&e.isDecryptionFailure()&&Object(_e.K)(e,t)?a():null!==(i=xe.get(o))&&void 0!==i?i:a()}function Oe(e,t,n,r){var i;r=null!==(i=r)&&void 0!==i?i:v.a.get();const o=ke(t.mxEvent,r,n);if(!o)return;const{ref:a,mxEvent:s,forExport:l,replacingEventId:c,editState:u,highlights:h,highlightLink:p,showUrlPreview:m,permalinkCreator:g,onHeightChanged:f,callEventGrouper:_,getRelationsForEvent:b,isSeeingThroughMessageHiddenForModeration:y,timestamp:E}=t;switch(e){case d.a.File:case d.a.Notification:case d.a.Thread:return o(t.ref,{mxEvent:s,highlights:h,highlightLink:p,showUrlPreview:m,onHeightChanged:f,editState:u,replacingEventId:c,getRelationsForEvent:b,isSeeingThroughMessageHiddenForModeration:y,permalinkCreator:g});default:return o(a,{mxEvent:s,forExport:l,replacingEventId:c,editState:u,highlights:h,highlightLink:p,showUrlPreview:m,permalinkCreator:g,onHeightChanged:f,callEventGrouper:_,getRelationsForEvent:b,isSeeingThroughMessageHiddenForModeration:y,timestamp:E})}}function Ie(e,t,n){var r;n=null!==(r=n)&&void 0!==r?r:v.a.get();const i=ke(e.mxEvent,n,t);if(!i)return;const{ref:o,mxEvent:a,highlights:s,highlightLink:l,onHeightChanged:c,showUrlPreview:u,overrideBodyTypes:d,overrideEventTypes:h,replacingEventId:p,maxImageHeight:m,getRelationsForEvent:g,isSeeingThroughMessageHiddenForModeration:f,permalinkCreator:_}=e;return i(o,{mxEvent:a,highlights:s,highlightLink:l,onHeightChanged:c,showUrlPreview:u,overrideBodyTypes:d,overrideEventTypes:h,replacingEventId:p,maxImageHeight:m,getRelationsForEvent:g,isSeeingThroughMessageHiddenForModeration:f,permalinkCreator:_})}const Ae=[s.b.RoomMessage,s.b.Sticker];function Re(e){return Ae.includes(e.getType())||l.e.matches(e.getType())||l.a.matches(e.getType())}function Ne(e,t){if(e.isRedacted()&&!e.isEncrypted()&&!Re(e)&&!e.isState())return!1;if(e.isRelation(s.h.Replace))return!1;const n=v.a.get(),r=ke(e,n,t);if(!r)return!1;if(r===Ee)return Object(q.a)(e,t);if(r===Fe.get(s.b.RoomCreate)){var i;const t=u.b.getValue("feature_dynamic_room_predecessors"),r=null===(i=n.getRoom(e.getRoomId()))||void 0===i?void 0:i.findPredecessor(t);return Boolean(r)}if(R.d.CALL_EVENT_TYPE.names.some((e=>r===Fe.get(e)))){const t=e.getContent()["m.intent"];return 0===Object.keys(e.getPrevContent()).length&&"string"==typeof t&&t!==c.d.Room}return r!==Ce}},function(e,t,n){"use strict";n.d(t,"i",(function(){return d})),n.d(t,"j",(function(){return h})),n.d(t,"a",(function(){return p})),n.d(t,"h",(function(){return g})),n.d(t,"g",(function(){return f})),n.d(t,"f",(function(){return _})),n.d(t,"d",(function(){return b})),n.d(t,"c",(function(){return v})),n.d(t,"e",(function(){return y})),n.d(t,"b",(function(){return S})),n.d(t,"l",(function(){return w})),n.d(t,"k",(function(){return T}));var r=n(13),i=n.n(r),o=n(1),a=n(361),s=n(419),l=n(129),c=n(158);const u="m.key.verification.",d=u+"request",h=u+"start",p=u+"cancel",m=u+"done",g=u+"ready";let f;!function(e){e[e.Unsent=1]="Unsent",e[e.Requested=2]="Requested",e[e.Ready=3]="Ready",e[e.Started=4]="Started",e[e.Cancelled=5]="Cancelled",e[e.Done=6]="Done"}(f||(f={}));const _=f.Unsent,b=f.Requested,v=f.Ready,y=f.Started,E=f.Cancelled,S=f.Done;let w;!function(e){e.Change="change"}(w||(w={}));class T extends c.b{constructor(e,t,n){super(),this.channel=e,this.verificationMethods=t,this.client=n,i()(this,"eventsByUs",new Map),i()(this,"eventsByThem",new Map),i()(this,"_observeOnly",!1),i()(this,"timeoutTimer",null),i()(this,"_accepting",!1),i()(this,"_declining",!1),i()(this,"verifierHasFinished",!1),i()(this,"_cancelled",!1),i()(this,"_chosenMethod",null),i()(this,"_qrCodeData",null),i()(this,"requestReceivedAt",null),i()(this,"commonMethods",[]),i()(this,"_phase",void 0),i()(this,"_cancellingUserId",void 0),i()(this,"_verifier",void 0),i()(this,"cancelOnTimeout",(async()=>{try{this.initiatedByMe?await this.cancel({reason:"Other party didn't accept in time",code:"m.timeout"}):await this.cancel({reason:"User didn't accept in time",code:"m.timeout"})}catch(e){o.a.error("Error while cancelling verification request",e)}})),this.channel.request=this,this.setPhase(_,!1)}static validateEvent(e,t,n){const r=t.getContent();return!(!e||!e.startsWith(u))&&(r?e!==d&&e!==g||Array.isArray(r.methods)?e!==d&&e!==g&&e!==h||"string"==typeof r.from_device&&0!==r.from_device.length||(o.a.log("VerificationRequest: validateEvent: fail because from_device"),!1):(o.a.log("VerificationRequest: validateEvent: fail because methods"),!1):(o.a.log("VerificationRequest: validateEvent: no content"),!1))}get invalid(){return this.phase===_}get requested(){return this.phase===b}get cancelled(){return this.phase===E}get ready(){return this.phase===v}get started(){return this.phase===y}get done(){return this.phase===S}get methods(){return this.commonMethods}get chosenMethod(){return this._chosenMethod}calculateEventTimeout(e){let t=this.channel.getTimestamp(e)+6e5;if(this.requestReceivedAt&&!this.initiatedByMe&&this.phase<=b){const e=this.requestReceivedAt+12e4;t=Math.min(t,e)}return Math.max(0,t-Date.now())}get timeout(){const e=this.getEventByEither(d);return e?this.calculateEventTimeout(e):0}get requestEvent(){return this.getEventByEither(d)}get phase(){return this._phase}get verifier(){return this._verifier}get canAccept(){return this.phase<v&&!this._accepting&&!this._declining}get accepting(){return this._accepting}get declining(){return this._declining}get pending(){return!this.observeOnly&&this._phase!==S&&this._phase!==E}get qrCodeData(){return this._qrCodeData}otherPartySupportsMethod(e){if(!(arguments.length>1&&void 0!==arguments[1]&&arguments[1])&&!this.ready&&!this.started)return!1;const t=this.eventsByThem.get(d)||this.eventsByThem.get(g);if(!t){if(this.started&&this.initiatedByMe){const t=this.eventsByUs.get(h),n=t&&t.getContent();return e==(n&&n.method)}return!1}const n=t.getContent();if(!n)return!1;const{methods:r}=n;return!!Array.isArray(r)&&r.includes(e)}get initiatedByMe(){const e=this.eventsByUs.size+this.eventsByThem.size===0;if(this._phase===_&&e)return!0;const t=this.eventsByUs.has(d),n=this.eventsByThem.has(d);if(t&&!n)return!0;if(!t&&n)return!1;const r=this.eventsByUs.has(h),i=this.eventsByThem.has(h);return!(!r||i)}get requestingUserId(){return this.initiatedByMe?this.client.getUserId():this.otherUserId}get receivingUserId(){return this.initiatedByMe?this.otherUserId:this.client.getUserId()}get otherUserId(){return this.channel.userId}get isSelfVerification(){return this.client.getUserId()===this.otherUserId}get cancellingUserId(){const e=this.eventsByUs.get(p),t=this.eventsByThem.get(p);return e&&(!t||e.getId()<t.getId())?e.getSender():t?t.getSender():void 0}get cancellationCode(){const e=this.getEventByEither(p);return e?e.getContent().code:null}get observeOnly(){return this._observeOnly}get targetDevice(){const e=this.eventsByThem.get(d)||this.eventsByThem.get(g)||this.eventsByThem.get(h),t=null==e?void 0:e.getContent(),n=null==t?void 0:t.from_device;return{userId:this.otherUserId,deviceId:n}}beginKeyVerification(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!this.observeOnly&&!this._verifier){if(this.phase===b||this.phase===v||this.phase===_&&this.channel.canCreateRequest(h)){if(this.commonMethods.length&&!this.commonMethods.includes(e))throw Object(a.g)();if(this._verifier=this.createVerifier(e,null,t),!this._verifier)throw Object(a.g)();this._chosenMethod=e}}return this._verifier}async sendRequest(){if(!this.observeOnly&&this._phase===_){const e=[...this.verificationMethods.keys()];await this.channel.send(d,{methods:e})}}async cancel(){let{reason:e="User declined",code:t="m.user"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.observeOnly&&this._phase!==E){if(this._declining=!0,this.emit(w.Change),this._verifier)return this._verifier.cancel(Object(a.a)(t,e)());this._cancellingUserId=this.client.getUserId(),await this.channel.send(p,{code:t,reason:e})}}async accept(){if(!this.observeOnly&&this.phase===b&&!this.initiatedByMe){const e=[...this.verificationMethods.keys()];this._accepting=!0,this.emit(w.Change),await this.channel.send(g,{methods:e})}}waitFor(e){return new Promise(((t,n)=>{const r=()=>{let i=!1;return e(this)?(t(this),i=!0):this.cancelled&&(n(new Error("cancelled")),i=!0),i&&this.off(w.Change,r),i};r()||this.on(w.Change,r)}))}setPhase(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this._phase=e,t&&this.emit(w.Change)}getEventByEither(e){return this.eventsByThem.get(e)||this.eventsByUs.get(e)}getEventBy(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?this.eventsByThem.get(e):this.eventsByUs.get(e)}calculatePhaseTransitions(){const e=[{phase:_}],t=()=>e[e.length-1].phase,n=this.eventsByThem.has(d),r=this.getEventBy(d,n);r&&e.push({phase:b,event:r});const i=r&&this.getEventBy(g,!n);let o;if(i&&t()===b&&e.push({phase:v,event:i}),i||!r){const e=this.eventsByThem.get(h),t=this.eventsByUs.get(h);o=e&&t?e.getSender()<t.getSender()?e:t:e||t}else o=this.getEventBy(h,!n);if(o){const n=t()===b&&(null==r?void 0:r.getSender())!==o.getSender(),i=t()===_&&this.channel.canCreateRequest(h);(n||t()===v||i)&&e.push({phase:y,event:o})}const a=this.eventsByUs.get(m);(this.verifierHasFinished||a&&t()===y)&&e.push({phase:S});const s=this.getEventByEither(p);return(this._cancelled||s)&&t()!==S?(e.push({phase:E,event:s}),e):e}transitionToPhase(e){const{phase:t,event:n}=e;if((t===b||t===v)&&!this.wasSentByOwnDevice(n)){const e=n.getContent();this.commonMethods=e.methods.filter((e=>this.verificationMethods.has(e)))}if(this.observeOnly||t!==b&&t!==y&&t!==v||this.channel.receiveStartFromOtherDevices&&this.wasSentByOwnUser(n)&&!this.wasSentByOwnDevice(n)&&(this._observeOnly=!0),t===y){const{method:e}=n.getContent();this._verifier||this.observeOnly||(this._verifier=this.createVerifier(e,n),this._verifier?this._chosenMethod=e:this.cancel({code:"m.unknown_method",reason:`Unknown method: ${e}`}))}}applyPhaseTransitions(){const e=this.calculatePhaseTransitions(),t=e.findIndex((e=>e.phase===this.phase)),n=e.slice(t+1);for(const e of n)this.transitionToPhase(e);return n}isWinningStartRace(e){if(e.getType()!==h)return!1;const t=this._verifier.startEvent;let n,r;if(this.isSelfVerification)if(t){const e=t.getContent();n=e&&e.from_device}else n=this.client.getDeviceId();else n=t?t.getSender():this.client.getUserId();if(this.isSelfVerification){const t=e.getContent();r=t&&t.from_device}else r=e.getSender();return r<n}hasEventId(e){for(const t of this.eventsByUs.values())if(t.getId()===e)return!0;for(const t of this.eventsByThem.values())if(t.getId()===e)return!0;return!1}async handleEvent(e,t,n,r,i){if(this.done||this.cancelled)return;const a=this._observeOnly;if(this.adjustObserveOnly(t,n),!this.observeOnly&&!r&&await this.cancelOnError(e,t))return;if(i?this.eventsByUs.has(e):this.eventsByThem.has(e))return;const l=this.phase;this.addEvent(e,t,i);const c=this.applyPhaseTransitions();try{if(this._verifier&&!this.observeOnly){const n=this.isWinningStartRace(t);if(this._verifier.canSwitchStartEvent(t)&&n)this._verifier.switchStartEvent(t);else if(!r){var u;(e===p||null!==(u=this._verifier.events)&&void 0!==u&&u.includes(e))&&this._verifier.handleEvent(t)}}if(c.length){if(n&&c.some((e=>e.phase===v))){this.otherPartySupportsMethod(s.d,!0)&&(this._qrCodeData=await s.a.create(this,this.client))}const e=c[c.length-1],{phase:t}=e;this.setupTimeout(t),this.setPhase(t)}else this._observeOnly!==a&&this.emit(w.Change)}finally{o.a.log(`Verification request ${this.channel.transactionId}: ${e} event with id:${t.getId()}, content:${JSON.stringify(t.getContent())} deviceId:${this.channel.deviceId}, sender:${t.getSender()}, isSentByUs:${i}, isLiveEvent:${n}, isRemoteEcho:${r}, phase:${l}=>${this.phase}, observeOnly:${a}=>${this._observeOnly}`)}}setupTimeout(e){if(!this.timeoutTimer&&!this.observeOnly&&e===b&&(this.timeoutTimer=setTimeout(this.cancelOnTimeout,this.timeout)),this.timeoutTimer){(e===y||e===v||e===S||e===E)&&(clearTimeout(this.timeoutTimer),this.timeoutTimer=null)}}async cancelOnError(e,t){if(e===h){const e=t.getContent().method;if(!this.verificationMethods.has(e))return await this.cancel(Object(a.b)(Object(a.g)())),!0}const n=e===d&&this.phase!==_,r=e===g&&this.phase!==b&&this.phase!==y;if(this.phase!==_&&(n||r)){o.a.warn(`Cancelling, unexpected ${e} verification event from ${t.getSender()}`);const n=`Unexpected ${e} event in phase ${this.phase}`;return await this.cancel(Object(a.b)(Object(a.f)({reason:n}))),!0}return!1}adjustObserveOnly(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]||(this._observeOnly=!0),this.calculateEventTimeout(e)<3e3&&(this._observeOnly=!0)}addEvent(e,t){if(arguments.length>2&&void 0!==arguments[2]&&arguments[2]?this.eventsByUs.set(e,t):this.eventsByThem.set(e,t),e===d){for(const[e,t]of this.eventsByThem.entries())t.getSender()!==this.otherUserId&&this.eventsByThem.delete(e);this.requestReceivedAt=Date.now()}}createVerifier(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;n||(n=this.targetDevice);const{userId:r,deviceId:i}=n,a=this.verificationMethods.get(e);if(a)return new a(this.channel,this.client,r,i,t,this);o.a.warn("could not find verifier constructor for method",e)}wasSentByOwnUser(e){return(null==e?void 0:e.getSender())===this.client.getUserId()}wasSentByOwnDevice(e){if(!this.wasSentByOwnUser(e))return!1;const t=e.getContent();return!(!t||t.from_device!==this.client.getDeviceId())}onVerifierCancelled(){this._cancelled=!0;const e=this.applyPhaseTransitions();e.length&&this.setPhase(e[e.length-1].phase)}onVerifierFinished(){this.channel.send(l.b.KeyVerificationDone,{}),this.verifierHasFinished=!0;const e=this.applyPhaseTransitions();e.length&&this.setPhase(e[e.length-1].phase)}getEventFromOtherParty(e){return this.eventsByThem.get(e)}}},function(e,t,n){var r=n(31).default;function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}e.exports=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var l=a?Object.getOwnPropertyDescriptor(e,s):null;l&&(l.get||l.set)?Object.defineProperty(o,s,l):o[s]=e[s]}return o.default=e,n&&n.set(e,o),o},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return d})),n.d(t,"f",(function(){return h})),n.d(t,"h",(function(){return p})),n.d(t,"d",(function(){return m})),n.d(t,"g",(function(){return g})),n.d(t,"a",(function(){return f})),n.d(t,"e",(function(){return _}));var r=n(15),i=n(122);const o="io.element.call_behaviour",a="io.element.e2ee",s="im.vector.riot.e2ee",l=new r.c("m.tile_server","org.matrix.msc3488.tile_server"),c="io.element.embedded_pages";function u(){const e=i.a.get().getClientWellKnown();return null==e?void 0:e[o]}function d(){const e=i.a.get().getClientWellKnown();return null!=e&&e[a]?e[a]:null!=e&&e[s]?e[s]:null}function h(){return p(i.a.get().getClientWellKnown())}function p(e){var t;return null!==(t=null==e?void 0:e[l.name])&&void 0!==t?t:null==e?void 0:e[l.altName]}function m(){var e,t;return null==(t=null===(e=i.a.get())||void 0===e?void 0:e.getClientWellKnown())?void 0:t[c]}function g(){var e;return!0===(null===(e=d())||void 0===e?void 0:e.secure_backup_required)}let f;function _(){const e=d();return e&&e.secure_backup_setup_methods&&e.secure_backup_setup_methods.length&&(e.secure_backup_setup_methods.includes(f.Key)||e.secure_backup_setup_methods.includes(f.Passphrase))?e.secure_backup_setup_methods:[f.Key,f.Passphrase]}!function(e){e.Key="key",e.Passphrase="passphrase"}(f||(f={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"d",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"e",(function(){return l}));var r=n(151);let i;function o(e){const t={[i.Invite]:[],[i.Join]:[],[i.Leave]:[]};for(const n of e)t[a(n.getMyMembership())].push(n);return t}function a(e){return"invite"===e?i.Invite:"join"===e?i.Join:i.Leave}function s(e){const t=a(e);return t===i.Join||t===i.Invite}async function l(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{timeout:1500};const{timeout:o}=i;let a;return new Promise((i=>{a=function(e,r,o){o.userId===n&&o.roomId===t&&i(!0)},e.on(r.b.NewMember,a),window.setTimeout(i,o,!1)})).finally((()=>{e.removeListener(r.b.NewMember,a)}))}!function(e){e.Join="JOIN",e.Invite="INVITE",e.Leave="LEAVE"}(i||(i={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(130),i=n.n(r),o=n(132),a=n.n(o),s=n(120),l=n.n(s),c=n(126),u=n.n(c),d=n(244);const h=["class","children","tooltip","tooltipClass","tooltipProps"];class p extends l.a.Component{constructor(e){super(e)}render(){const e=this.props,{class:t,children:n,tooltip:r,tooltipClass:o,tooltipProps:s}=e,c=a()(e,h);return l.a.createElement(d.a,i()({onClick:this.props.onClick,tooltipTargetClassName:u()("mx_TextWithTooltip_target",t)},s,{label:r,tooltipClassName:o,className:"mx_TextWithTooltip_tooltip"},c),n)}}},function(e,t,n){"use strict";var r=n(130),i=n.n(r),o=n(132),a=n.n(o),s=n(120),l=n.n(s),c=n(564),u=n(756),d=n(161);const h=["children","tooltipTargetClassName","className","id","label","alignment","tooltipClassName","maxParentWidth","ignoreHover"];t.a=e=>{let{children:t,tooltipTargetClassName:n,className:r,id:o,label:s,alignment:p,tooltipClassName:m,maxParentWidth:g,ignoreHover:f}=e,_=a()(e,h);const[b,v]=Object(c.a)(),[y,E]=Object(u.a)(f||(()=>!1)),S=(b||y)&&l.a.createElement(d.b,{id:o,className:r,tooltipClassName:m,label:s,alignment:p,visible:b||y,maxParentWidth:g});return l.a.createElement("div",i()({},E,v,{tabIndex:0,"aria-describedby":o,className:n},_),t,S)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return h})),n.d(t,"a",(function(){return p})),n.d(t,"c",(function(){return m}));var r=n(13),i=n.n(r),o=n(17),a=n.n(o),s=n(1),l=n(125),c=n(137),u=n(122),d=n(121);let h,p;!function(e){e.AudioOutput="audiooutput",e.AudioInput="audioinput",e.VideoInput="videoinput"}(h||(h={})),function(e){e.AudioOutputChanged="audio_output_changed"}(p||(p={}));class m extends a.a{static get instance(){return m.internalInstance||(m.internalInstance=new m),m.internalInstance}static async hasAnyLabeledDevices(){return(await navigator.mediaDevices.enumerateDevices()).some((e=>Boolean(e.label)))}static async getDevices(){try{const e=await navigator.mediaDevices.enumerateDevices(),t={[h.AudioOutput]:[],[h.AudioInput]:[],[h.VideoInput]:[]};return e.forEach((e=>t[e.kind].push(e))),t}catch(e){s.a.warn("Unable to refresh WebRTC Devices: ",e)}}static async loadDevices(){const e=l.b.getValue("webrtc_audioinput"),t=l.b.getValue("webrtc_videoinput");await u.a.get().getMediaHandler().setAudioInput(e),await u.a.get().getMediaHandler().setVideoInput(t),await m.updateAudioSettings()}static async updateAudioSettings(){await u.a.get().getMediaHandler().setAudioSettings({autoGainControl:m.getAudioAutoGainControl(),echoCancellation:m.getAudioEchoCancellation(),noiseSuppression:m.getAudioNoiseSuppression()})}setAudioOutput(e){l.b.setValue("webrtc_audiooutput",null,c.a.DEVICE,e),this.emit(p.AudioOutputChanged,e)}async setAudioInput(e){return l.b.setValue("webrtc_audioinput",null,c.a.DEVICE,e),u.a.get().getMediaHandler().setAudioInput(e)}async setVideoInput(e){return l.b.setValue("webrtc_videoinput",null,c.a.DEVICE,e),u.a.get().getMediaHandler().setVideoInput(e)}async setDevice(e,t){switch(t){case h.AudioOutput:this.setAudioOutput(e);break;case h.AudioInput:await this.setAudioInput(e);break;case h.VideoInput:await this.setVideoInput(e)}}static async setAudioAutoGainControl(e){await l.b.setValue("webrtc_audio_autoGainControl",null,c.a.DEVICE,e),await m.updateAudioSettings()}static async setAudioEchoCancellation(e){await l.b.setValue("webrtc_audio_echoCancellation",null,c.a.DEVICE,e),await m.updateAudioSettings()}static async setAudioNoiseSuppression(e){await l.b.setValue("webrtc_audio_noiseSuppression",null,c.a.DEVICE,e),await m.updateAudioSettings()}static getAudioOutput(){return l.b.getValueAt(c.a.DEVICE,"webrtc_audiooutput")}static getAudioInput(){return l.b.getValueAt(c.a.DEVICE,"webrtc_audioinput")}static getVideoInput(){return l.b.getValueAt(c.a.DEVICE,"webrtc_videoinput")}static getAudioAutoGainControl(){return l.b.getValue("webrtc_audio_autoGainControl")}static getAudioEchoCancellation(){return l.b.getValue("webrtc_audio_echoCancellation")}static getAudioNoiseSuppression(){return l.b.getValue("webrtc_audio_noiseSuppression")}static getDevice(e){switch(e){case h.AudioOutput:return this.getAudioOutput();case h.AudioInput:return this.getAudioInput();case h.VideoInput:return this.getVideoInput()}}static get startWithAudioMuted(){return l.b.getValue("audioInputMuted")}static set startWithAudioMuted(e){l.b.setValue("audioInputMuted",null,c.a.DEVICE,e)}static get startWithVideoMuted(){return l.b.getValue("videoInputMuted")}static set startWithVideoMuted(e){l.b.setValue("videoInputMuted",null,c.a.DEVICE,e)}}i()(m,"internalInstance",void 0),i()(m,"getDefaultDevice",(e=>e.some((e=>"default"===e.deviceId))?"default":(e.unshift({deviceId:"",label:Object(d.a)("Default Device")}),"")))},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(125),l=n(278),c=n(161),u=n(121),d=n(197),h=n(795);class p extends a.a.PureComponent{constructor(e){super(e),i()(this,"countWatcherRef",void 0),i()(this,"countPreferenceChanged",(()=>{this.setState({showCounts:s.b.getValue("Notifications.alwaysShowBadgeCounts",this.roomId)})})),i()(this,"onNotificationUpdate",(()=>{this.forceUpdate()})),i()(this,"onMouseOver",(e=>{e.stopPropagation(),this.setState({showTooltip:!0})})),i()(this,"onMouseLeave",(()=>{this.setState({showTooltip:!1})})),this.props.notification.on(l.b.Update,this.onNotificationUpdate),this.state={showCounts:s.b.getValue("Notifications.alwaysShowBadgeCounts",this.roomId),showTooltip:!1},this.countWatcherRef=s.b.watchSetting("Notifications.alwaysShowBadgeCounts",this.roomId,this.countPreferenceChanged)}get roomId(){return this.props.roomId||null}componentWillUnmount(){s.b.unwatchSetting(this.countWatcherRef),this.props.notification.off(l.b.Update,this.onNotificationUpdate)}componentDidUpdate(e){e.notification&&e.notification.off(l.b.Update,this.onNotificationUpdate),this.props.notification.on(l.b.Update,this.onNotificationUpdate)}render(){const{notification:e,showUnsentTooltip:t,forceCount:n,onClick:r}=this.props;if(e.isIdle)return null;if(n&&!e.hasUnreadCount)return null;let i,o;return t&&this.state.showTooltip&&e.color===d.a.Unsent&&(i=Object(u.a)("Message didn't send. Click for info."),o=a.a.createElement(c.b,{className:"mx_RoleButton_tooltip",label:i})),a.a.createElement(h.a,{label:i,symbol:e.symbol,count:e.count,color:e.color,onClick:r,onMouseOver:this.onMouseOver,onMouseLeave:this.onMouseLeave},o)}}},function(e,t,n){"use strict";n.r(t),n.d(t,"CHAT_EFFECTS",(function(){return i}));var r=n(121);const i=[{emojis:["🎊","🎉"],msgType:"nic.custom.confetti",command:"confetti",description:()=>Object(r.c)("Sends the given message with confetti"),fallbackMessage:()=>Object(r.a)("sends confetti")+" 🎉",options:{maxCount:150,speed:3,frameInterval:15,alpha:1,gradient:!1}},{emojis:["🎆"],msgType:"nic.custom.fireworks",command:"fireworks",description:()=>Object(r.c)("Sends the given message with fireworks"),fallbackMessage:()=>Object(r.a)("sends fireworks")+" 🎆",options:{maxCount:500,gravity:.05}},{emojis:["🌧️","⛈️","🌦️"],msgType:"io.element.effect.rainfall",command:"rainfall",description:()=>Object(r.c)("Sends the given message with rainfall"),fallbackMessage:()=>Object(r.a)("sends rainfall")+" 🌧️",options:{maxCount:600,speed:10}},{emojis:["❄","🌨"],msgType:"io.element.effect.snowfall",command:"snowfall",description:()=>Object(r.c)("Sends the given message with snowfall"),fallbackMessage:()=>Object(r.a)("sends snowfall")+" ❄",options:{maxCount:200,gravity:.05,maxDrift:5}},{emojis:["👾","🌌"],msgType:"io.element.effects.space_invaders",command:"spaceinvaders",description:()=>Object(r.c)("Sends the given message with a space themed effect"),fallbackMessage:()=>Object(r.a)("sends space invaders")+" 👾",options:{maxCount:50,gravity:.01}},{emojis:["💝"],msgType:"io.element.effect.hearts",command:"hearts",description:()=>Object(r.c)("Sends the given message with hearts"),fallbackMessage:()=>Object(r.a)("sends hearts")+" 💝",options:{maxCount:120,gravity:3.2}}]},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(120);function i(e,t,n){const[i,o]=Object(r.useState)(n);return Object(r.useEffect)((()=>{let t=!1;return e().then((e=>{t||o(e)})),()=>{t=!0}}),t),i}},function(e,t,n){"use strict";n.d(t,"d",(function(){return I})),n.d(t,"b",(function(){return A})),n.d(t,"k",(function(){return R})),n.d(t,"e",(function(){return N})),n.d(t,"g",(function(){return M})),n.d(t,"c",(function(){return P})),n.d(t,"i",(function(){return L})),n.d(t,"f",(function(){return B})),n.d(t,"h",(function(){return U})),n.d(t,"a",(function(){return j})),n.d(t,"j",(function(){return G}));var r=n(120),i=n.n(r),o=n(129),a=n(160),s=n(168),l=n(127),c=n(588),u=n(219),d=n(121),h=n(803),p=n(213),m=n(232),g=n(1),f=n(135),_=n(123),b=n(133),v=n(286),y=n(590),E=n(393),S=n(802);var w=e=>{let{space:t,onAddExistingSpaceClick:n,onFinished:o}=e;const[s,l]=Object(r.useState)(t),[c,u]=Object(r.useState)(!1),[h,p]=Object(r.useState)(""),m=Object(r.useRef)(),[w,T]=Object(r.useState)(""),C=Object(r.useRef)(),[x,F]=Object(r.useState)(null),[D,k]=Object(r.useState)(""),O=t.getJoinRule();let I=a.c.Restricted;O===a.c.Public&&(I=a.c.Public);const[A,R]=Object(r.useState)(I),N=async e=>{if(e.preventDefault(),!c){if(u(!0),!await m.current.validate({allowEmpty:!1}))return m.current.focus(),m.current.validate({allowEmpty:!1,focused:!0}),void u(!1);if(A===a.c.Public&&!await C.current.validate({allowEmpty:!0}))return C.current.focus(),C.current.validate({allowEmpty:!0,focused:!0}),void u(!1);try{await Object(y.c)(h,A===a.c.Public,w,D,x,{},{parentSpace:s,joinRule:A}),o(!0)}catch(e){g.a.error(e)}}};let M;return A===a.c.Restricted?M=i.a.createElement("p",null,Object(d.a)("Anyone in <SpaceName/> will be able to find and join.",{},{SpaceName:()=>i.a.createElement("b",null,s.name)})):A===a.c.Public?M=i.a.createElement("p",null,Object(d.a)("Anyone will be able to find and join this space, not just members of <SpaceName/>.",{},{SpaceName:()=>i.a.createElement("b",null,s.name)})):A===a.c.Invite&&(M=i.a.createElement("p",null,Object(d.a)("Only people invited will be able to find and join this space."))),i.a.createElement(f.a,{title:i.a.createElement(E.c,{title:Object(d.a)("Create a space"),space:t,value:s,onChange:l}),className:"mx_CreateSubspaceDialog",contentId:"mx_CreateSubspaceDialog",onFinished:o,fixedWidth:!1},i.a.createElement(b.a.Provider,{value:t.client},i.a.createElement("div",{className:"mx_CreateSubspaceDialog_content"},i.a.createElement("div",{className:"mx_CreateSubspaceDialog_betaNotice"},i.a.createElement(v.a,null),Object(d.a)("Add a space to a space you manage.")),i.a.createElement(y.a,{busy:c,onSubmit:N,setAvatar:F,name:h,setName:p,nameFieldRef:m,topic:D,setTopic:k,alias:w,setAlias:T,showAliasField:A===a.c.Public,aliasFieldRef:C},i.a.createElement(S.a,{label:Object(d.a)("Space visibility"),labelInvite:Object(d.a)("Private space (invite only)"),labelPublic:Object(d.a)("Public space"),labelRestricted:Object(d.a)("Visible to space members"),width:478,value:A,onChange:R}),M)),i.a.createElement("div",{className:"mx_CreateSubspaceDialog_footer"},i.a.createElement("div",{className:"mx_CreateSubspaceDialog_footer_prompt"},i.a.createElement("div",null,Object(d.a)("Want to add an existing space instead?")),i.a.createElement(_.a,{kind:"link",onClick:()=>{n(),o()}},Object(d.a)("Add existing space"))),i.a.createElement(_.a,{kind:"primary_outline",disabled:c,onClick:()=>o(!1)},Object(d.a)("Cancel")),i.a.createElement(_.a,{kind:"primary",disabled:c,onClick:N},c?Object(d.a)("Adding…"):Object(d.a)("Add")))))};var T=e=>{let{space:t,onCreateSubspaceClick:n,onFinished:o}=e;const[a,s]=Object(r.useState)(t);return i.a.createElement(f.a,{title:i.a.createElement(E.c,{title:Object(d.a)("Add existing space"),space:t,value:a,onChange:s}),className:"mx_AddExistingToSpaceDialog",contentId:"mx_AddExistingToSpace",onFinished:o,fixedWidth:!1},i.a.createElement(b.a.Provider,{value:t.client},i.a.createElement(E.a,{space:t,onFinished:o,footerPrompt:i.a.createElement(i.a.Fragment,null,i.a.createElement("div",null,Object(d.a)("Want to add a new space instead?")),i.a.createElement(_.a,{onClick:n,kind:"link"},Object(d.a)("Create a new space"))),filterPlaceholder:Object(d.a)("Search for spaces"),spacesRenderer:E.g})))},C=n(124),x=n(128),F=n(134),D=n(221),k=n(156),O=n(154);const I=e=>{const t=e.client.getUserId();return"join"===e.getMyMembership()&&(e.currentState.maySendStateEvent(o.b.RoomAvatar,t)||e.currentState.maySendStateEvent(o.b.RoomName,t)||e.currentState.maySendStateEvent(o.b.RoomTopic,t)||e.currentState.maySendStateEvent(o.b.RoomJoinRules,t))},A=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{type:o.b.SpaceParent,content:{via:Object(s.b)(e),canonical:t},state_key:e.roomId}};function R(e){C.a.dispatch({action:x.a.OpenSpaceSettings,space:e})}const N=e=>{C.a.dispatch({action:x.a.OpenAddToExistingSpaceDialog,space:e})},M=async(e,t)=>{const n=l.b.createDialog(c.a,{type:t,defaultPublic:e.getJoinRule()===a.c.Public,parentSpace:e}),[r,i]=await n.finished;return r&&await Object(u.b)(i),r},P=e=>("join"===(null==e?void 0:e.getMyMembership())&&e.canInvite(e.client.getUserId())||e.getJoinRule()===a.c.Public)&&Object(D.a)(k.a.InviteUsers),L=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("public"===e.getJoinRule()){const t=l.b.createDialog(p.a,{title:Object(d.a)("Invite to %(spaceName)s",{spaceName:e.name}),description:i.a.createElement(i.a.Fragment,null,i.a.createElement("span",null,Object(d.a)("Share your public space")),i.a.createElement(h.a,{space:e,onFinished:()=>t.close()})),fixedWidth:!1,button:!1,className:"mx_SpacePanel_sharePublicSpace",hasCloseButton:!0})}else Object(m.e)(e.roomId,t)},B=e=>{l.b.createDialog(T,{space:e,onCreateSubspaceClick:()=>U(e),onFinished:t=>{t&&O.b.instance.roomViewStore.getRoomId()===e.roomId&&C.a.fire(x.a.UpdateSpaceHierarchy)}},"mx_AddExistingToSpaceDialog_wrapper")},U=e=>{l.b.createDialog(w,{space:e,onAddExistingSpaceClick:()=>B(e),onFinished:t=>{t&&O.b.instance.roomViewStore.getRoomId()===e.roomId&&C.a.fire(x.a.UpdateSpaceHierarchy)}},"mx_CreateSubspaceDialog_wrapper")},j=async(e,t,n)=>{const r=l.b.createDialog(F.a,void 0,"mx_Dialog_spinner");try{for(const e of t)await n(e);await n(e)}finally{r.close()}},G=(e,t)=>{C.a.dispatch({action:x.a.OpenSpacePreferences,space:e,initialTabId:t})}},function(e,t,n){"use strict";n.d(t,"d",(function(){return M})),n.d(t,"a",(function(){return P})),n.d(t,"c",(function(){return j})),n.d(t,"e",(function(){return G})),n.d(t,"b",(function(){return z})),n.d(t,"f",(function(){return H}));var r=n(421),i=n(422),o=n(199),a=n(1),s=n(127),l=n(122),c=n(121),u=n(241),d=n(13),h=n.n(d),p=n(149),m=n(126),g=n.n(m),f=n(120),_=n.n(f),b=n(139),v=n(123),y=n(256),E=n(145),S=n(135),w=n(291);class T extends _.a.PureComponent{constructor(e){super(e),h()(this,"fileUpload",_.a.createRef()),h()(this,"onCancel",(()=>{this.state.resetting&&this.setState({resetting:!1}),this.props.onFinished(!1)})),h()(this,"onUseRecoveryKeyClick",(()=>{this.setState({forceRecoveryKey:!0})})),h()(this,"validateRecoveryKeyOnChange",Object(p.debounce)((async()=>{await this.validateRecoveryKey()}),200)),h()(this,"onRecoveryKeyChange",(e=>{this.setState({recoveryKey:e.target.value,recoveryKeyFileError:null}),this.fileUpload.current&&(this.fileUpload.current.value=null),this.validateRecoveryKeyOnChange()})),h()(this,"onRecoveryKeyFileChange",(async e=>{var t;if(null===(t=e.target.files)||void 0===t||!t.length)return;const n=e.target.files[0];if(n.size>128)this.setState({recoveryKeyFileError:!0,recoveryKeyCorrect:!1,recoveryKeyValid:!1});else{const e=await n.text();/^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\s]+$/.test(e)?(this.setState({recoveryKeyFileError:null,recoveryKey:e.trim()}),await this.validateRecoveryKey()):this.setState({recoveryKeyFileError:!0,recoveryKeyCorrect:!1,recoveryKeyValid:!1,recoveryKey:""})}})),h()(this,"onRecoveryKeyFileUploadClick",(()=>{var e;null===(e=this.fileUpload.current)||void 0===e||e.click()})),h()(this,"onPassPhraseNext",(async e=>{if(e.preventDefault(),this.state.passPhrase.length<=0)return;this.setState({keyMatches:null});const t={passphrase:this.state.passPhrase},n=await this.props.checkPrivateKey(t);n?this.props.onFinished(t):this.setState({keyMatches:n})})),h()(this,"onRecoveryKeyNext",(async e=>{if(e.preventDefault(),!this.state.recoveryKeyValid)return;this.setState({keyMatches:null});const t={recoveryKey:this.state.recoveryKey},n=await this.props.checkPrivateKey(t);n?this.props.onFinished(t):this.setState({keyMatches:n})})),h()(this,"onPassPhraseChange",(e=>{this.setState({passPhrase:e.target.value,keyMatches:null})})),h()(this,"onResetAllClick",(e=>{e.preventDefault(),this.setState({resetting:!0})})),h()(this,"onConfirmResetAllClick",(async()=>{s.b.toggleCurrentDialogVisibility();try{await z((async()=>{const e=l.a.get();await e.bootstrapCrossSigning({authUploadDeviceSigningKeys:async t=>{const{finished:n}=s.b.createDialog(y.a,{title:Object(c.a)("Setting up keys"),matrixClient:e,makeRequest:t}),[r]=await n;if(!r)throw new Error("Cross-signing key upload auth canceled")},setupNewCrossSigning:!0}),this.props.onFinished({})}),!0)}catch(e){a.a.error(e),this.props.onFinished(!1)}})),this.state={recoveryKey:"",recoveryKeyValid:null,recoveryKeyCorrect:null,recoveryKeyFileError:null,forceRecoveryKey:!1,passPhrase:"",keyMatches:null,resetting:!1}}async validateRecoveryKey(){if(""!==this.state.recoveryKey)try{const e=l.a.get(),t=e.keyBackupKeyFromRecoveryKey(this.state.recoveryKey),n=await e.checkSecretStorageKey(t,this.props.keyInfo);this.setState({recoveryKeyValid:!0,recoveryKeyCorrect:n})}catch(e){this.setState({recoveryKeyValid:!1,recoveryKeyCorrect:!1})}else this.setState({recoveryKeyValid:null,recoveryKeyCorrect:null})}getKeyValidationText(){return this.state.recoveryKeyFileError?Object(c.a)("Wrong file type"):this.state.recoveryKeyCorrect?Object(c.a)("Looks good!"):this.state.recoveryKeyValid?Object(c.a)("Wrong Security Key"):null===this.state.recoveryKeyValid?"":Object(c.a)("Invalid Security Key")}render(){var e,t,n,r;const i=(null===(e=this.props.keyInfo)||void 0===e||null===(t=e.passphrase)||void 0===t?void 0:t.salt)&&(null===(n=this.props.keyInfo)||void 0===n||null===(r=n.passphrase)||void 0===r?void 0:r.iterations),o=_.a.createElement("div",{className:"mx_AccessSecretStorageDialog_reset"},Object(c.a)("Forgotten or lost all recovery methods? <a>Reset all</a>",void 0,{a:e=>_.a.createElement(v.a,{kind:"link_inline",onClick:this.onResetAllClick,className:"mx_AccessSecretStorageDialog_reset_link"},e)}));let a,s,l;if(this.state.resetting)s=Object(c.a)("Reset everything"),l=["mx_AccessSecretStorageDialog_titleWithIcon mx_AccessSecretStorageDialog_resetBadge"],a=_.a.createElement("div",null,_.a.createElement("p",null,Object(c.a)("Only do this if you have no other device to complete verification with.")),_.a.createElement("p",null,Object(c.a)("If you reset everything, you will restart with no trusted sessions, no trusted users, and might not be able to see past messages.")),_.a.createElement(E.a,{primaryButton:Object(c.a)("Reset"),onPrimaryButtonClick:this.onConfirmResetAllClick,hasCancel:!0,onCancel:this.onCancel,focus:!1,primaryButtonClass:"danger"}));else if(i&&!this.state.forceRecoveryKey){let e;s=Object(c.a)("Security Phrase"),l=["mx_AccessSecretStorageDialog_titleWithIcon mx_AccessSecretStorageDialog_securePhraseTitle"],e=!1===this.state.keyMatches?_.a.createElement("div",{className:"mx_AccessSecretStorageDialog_keyStatus"},"👎 ",Object(c.a)("Unable to access secret storage. Please verify that you entered the correct Security Phrase.")):_.a.createElement("div",{className:"mx_AccessSecretStorageDialog_keyStatus"}),a=_.a.createElement("div",null,_.a.createElement("p",null,Object(c.a)("Enter your Security Phrase or <button>use your Security Key</button> to continue.",{},{button:e=>_.a.createElement(v.a,{kind:"link_inline",onClick:this.onUseRecoveryKeyClick},e)})),_.a.createElement("form",{className:"mx_AccessSecretStorageDialog_primaryContainer",onSubmit:this.onPassPhraseNext},_.a.createElement(b.a,{id:"mx_passPhraseInput",className:"mx_AccessSecretStorageDialog_passPhraseInput",type:"password",label:Object(c.a)("Security Phrase"),value:this.state.passPhrase,onChange:this.onPassPhraseChange,autoFocus:!0,autoComplete:"new-password"}),e,_.a.createElement(E.a,{primaryButton:Object(c.a)("Continue"),onPrimaryButtonClick:this.onPassPhraseNext,hasCancel:!0,onCancel:this.onCancel,focus:!1,primaryDisabled:0===this.state.passPhrase.length,additive:o})))}else{var u;s=Object(c.a)("Security Key"),l=["mx_AccessSecretStorageDialog_titleWithIcon mx_AccessSecretStorageDialog_secureBackupTitle"];const e=g()({mx_AccessSecretStorageDialog_recoveryKeyFeedback:!0,"mx_AccessSecretStorageDialog_recoveryKeyFeedback--valid":!0===this.state.recoveryKeyCorrect,"mx_AccessSecretStorageDialog_recoveryKeyFeedback--invalid":!1===this.state.recoveryKeyCorrect}),t=_.a.createElement("div",{className:e},this.getKeyValidationText());a=_.a.createElement("div",null,_.a.createElement("p",null,Object(c.a)("Use your Security Key to continue.")),_.a.createElement("form",{className:"mx_AccessSecretStorageDialog_primaryContainer",onSubmit:this.onRecoveryKeyNext,spellCheck:!1,autoComplete:"off"},_.a.createElement("div",{className:"mx_AccessSecretStorageDialog_recoveryKeyEntry"},_.a.createElement("div",{className:"mx_AccessSecretStorageDialog_recoveryKeyEntry_textInput"},_.a.createElement(b.a,{type:"password",id:"mx_securityKey",label:Object(c.a)("Security Key"),value:this.state.recoveryKey,onChange:this.onRecoveryKeyChange,autoFocus:!0,forceValidity:null!==(u=this.state.recoveryKeyCorrect)&&void 0!==u?u:void 0,autoComplete:"off"})),_.a.createElement("span",{className:"mx_AccessSecretStorageDialog_recoveryKeyEntry_entryControlSeparatorText"},Object(c.a)("%(securityKey)s or %(recoveryFile)s",{recoveryFile:"",securityKey:""})),_.a.createElement("div",null,_.a.createElement("input",{type:"file",className:"mx_AccessSecretStorageDialog_recoveryKeyEntry_fileInput",ref:this.fileUpload,onClick:w.a,onChange:this.onRecoveryKeyFileChange}),_.a.createElement(v.a,{kind:"primary",onClick:this.onRecoveryKeyFileUploadClick},Object(c.a)("Upload")))),t,_.a.createElement(E.a,{primaryButton:Object(c.a)("Continue"),onPrimaryButtonClick:this.onRecoveryKeyNext,hasCancel:!0,cancelButton:Object(c.a)("Go Back"),cancelButtonClass:"danger",onCancel:this.onCancel,focus:!1,primaryDisabled:!this.state.recoveryKeyValid,additive:o})))}return _.a.createElement(S.a,{className:"mx_AccessSecretStorageDialog",onFinished:this.props.onFinished,title:s,titleClass:l},_.a.createElement("div",null,a))}}var C=n(367),x=n(125),F=n(292),D=n(155);let k={},O={},I=!1,A=!1,R={};function N(){return I}function M(){return I}class P extends Error{constructor(){super("Secret storage access canceled")}}async function L(){const[e]=await s.b.createDialog(D.a,{title:Object(c.a)("Cancel entering passphrase?"),description:Object(c.a)("Are you sure you want to cancel entering passphrase?"),danger:!1,button:Object(c.a)("Go Back"),cancelButton:Object(c.a)("Cancel")}).finished;return!e}function B(e){return async t=>{let{passphrase:n,recoveryKey:o}=t;return n?Object(r.a)(n,e.passphrase.salt,e.passphrase.iterations):Object(i.a)(o)}}function U(e,t,n){N()&&(k[e]=n,O[e]=t)}const j={getSecretStorageKey:async function(e){var t;let{keys:n}=e;const r=l.a.get();let i,o=await r.getDefaultSecretStorageKeyId();if(o&&(i=n[o],i||(o=null)),!o){const e=Object.entries(n);if(e.length>1)throw new Error("Multiple storage key requests not implemented");[o,i]=e[0]}if(N()&&k[o])return[o,k[o]];if(R.key&&await l.a.get().checkSecretStorageKey(R.key,i))return U(o,i,R.key),[o,R.key];const c=null===(t=F.a.getSecretStorageKey)||void 0===t?void 0:t.call(F.a);if(c)return a.a.log("Using key from security customisations (secret storage)"),U(o,i,c),[o,c];if(A)throw new Error("Could not unlock non-interactively");const u=B(i),{finished:d}=s.b.createDialog(T,{keyInfo:i,checkPrivateKey:async e=>{const t=await u(e);return l.a.get().checkSecretStorageKey(t,i)}},void 0,!1,!1,{onBeforeClose:async e=>"backgroundClick"!==e||L()}),[h]=await d;if(!h)throw new P;const p=await u(h);return U(o,i,p),[o,p]},cacheSecretStorageKey:U,onSecretRequested:async function(e,t,n,r,i){a.a.log("onSecretRequested",e,t,n,r,i);const s=l.a.get();if(e===s.getUserId())if(null!=i&&i.isVerified()){if("m.cross_signing.master"===r||"m.cross_signing.self_signing"===r||"m.cross_signing.user_signing"===r){const e=s.getCrossSigningCacheCallbacks();if(null==e||!e.getCrossSigningKeyCache)return;const n=r.replace("m.cross_signing.",""),i=await e.getCrossSigningKeyCache(n);return i||a.a.log(`${n} requested by ${t}, but not found in cache`),i?Object(o.encodeBase64)(i):void 0}if("m.megolm_backup.v1"===r){var c;const e=await(null===(c=s.crypto)||void 0===c?void 0:c.getSessionBackupPrivateKey());return e||a.a.log(`session backup key requested by ${t}, but not found in cache`),e?Object(o.encodeBase64)(e):void 0}a.a.warn("onSecretRequested didn't recognise the secret named ",r)}else a.a.log(`Ignoring secret request from untrusted device ${t}`)},getDehydrationKey:async function(e,t){var n;const r=null===(n=F.a.getSecretStorageKey)||void 0===n?void 0:n.call(F.a);if(r)return a.a.log("Using key from security customisations (dehydration)"),r;const i=B(e),{finished:o}=s.b.createDialog(T,{keyInfo:e,checkPrivateKey:async e=>{const n=await i(e);try{return t(n),!0}catch(e){return!1}}},void 0,!1,!1,{onBeforeClose:async e=>"backgroundClick"!==e||L()}),[l]=await o;if(!l)throw new P;const c=await i(l);return R={key:new Uint8Array(c),keyInfo:e},c}};async function G(){let e;const{finished:t}=s.b.createDialog(C.a,{showSummary:!1,keyCallback:t=>e=t},void 0,!1,!0);if(!await t)throw new Error("Key backup prompt cancelled");return e}async function z(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:async()=>{},t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=l.a.get();I=!0;try{if(!await r.hasSecretStorageKey()||t){const{finished:e}=s.b.createDialogAsync(n.e(33).then(n.bind(null,1571)),{forceReset:t},void 0,!1,!0,{onBeforeClose:async e=>"backgroundClick"!==e||!Object(u.g)()}),[r]=await e;if(!r)throw new Error("Secret storage creation canceled")}else{await r.bootstrapCrossSigning({authUploadDeviceSigningKeys:async e=>{const{finished:t}=s.b.createDialog(y.a,{title:Object(c.a)("Setting up keys"),matrixClient:r,makeRequest:e}),[n]=await t;if(!n)throw new Error("Cross-signing key upload auth canceled")}}),await r.bootstrapSecretStorage({getKeyBackupPassphrase:G});const e=Object.keys(k)[0];if(e&&x.b.getValue("feature_dehydration")){let t={};O[e]&&O[e].passphrase&&(t={passphrase:O[e].passphrase}),a.a.log("Setting dehydration key"),await r.setDehydrationKey(k[e],t,"Backup device")}else e?a.a.log("Not setting dehydration key: feature disabled"):a.a.warn("Not setting dehydration key: no SSSS key found")}return await e()}catch(e){var i;throw null===(i=F.a.catchAccessSecretStorageError)||void 0===i||i.call(F.a,e),a.a.error(e),e}finally{I=!1,N()||(k={},O={})}}async function H(e){const t=R.key;let n=!1;if(t&&await e.isSecretStorageReady()){a.a.log("Trying to set up cross-signing using dehydration key"),I=!0,A=!0;try{await e.checkOwnCrossSigningTrust();let r={};R.keyInfo&&R.keyInfo.passphrase&&(r={passphrase:R.keyInfo.passphrase}),await e.setDehydrationKey(t,r,"Backup device");const i=await e.getKeyBackupVersion();i&&(n=!0,e.restoreKeyBackupWithSecretStorage(i).finally((()=>{I=!1,A=!1,N()||(k={},O={})})))}finally{R={},n||(I=!1,A=!1,N()||(k={},O={}))}}}},function(e,t,n){"use strict";n.d(t,"d",(function(){return m})),n.d(t,"b",(function(){return g})),n.d(t,"a",(function(){return f})),n.d(t,"c",(function(){return _}));var r=n(13),i=n.n(r),o=n(17),a=n.n(o),s=n(6),l=n(1),c=n(153),u=n(146);class d{constructor(e){var t=this;this.context=e,i()(this,"clipStart",0),i()(this,"stopped",!0),i()(this,"lastCheck",0),i()(this,"observable",new s.SimpleObservable),i()(this,"timerId",void 0),i()(this,"clipDuration",0),i()(this,"placeholderDuration",0),i()(this,"checkTime",(function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const n=t.timeSeconds;(t.lastCheck!==n||e)&&(t.observable.update([n,t.durationSeconds]),t.lastCheck=n)}))}get durationSeconds(){return this.clipDuration||this.placeholderDuration}set durationSeconds(e){this.clipDuration=e,this.observable.update([this.timeSeconds,this.clipDuration])}get timeSeconds(){return(this.context.currentTime-this.clipStart)%this.clipDuration}get liveData(){return this.observable}populatePlaceholdersFrom(e){var t;const n=Number(null===(t=e.getContent().info)||void 0===t?void 0:t.duration);Number.isFinite(n)&&(this.placeholderDuration=n/1e3)}flagLoadTime(){this.clipStart=this.context.currentTime}flagStart(){this.stopped&&(this.clipStart=this.context.currentTime,this.stopped=!1),this.timerId||(this.timerId=window.setInterval(this.checkTime,100))}flagStop(){this.stopped=!0,this.clipStart=this.context.currentTime}syncTo(e,t){this.clipStart=e-t,this.stopped=!1,this.checkTime(!0)}destroy(){this.observable.close(),this.timerId&&clearInterval(this.timerId)}}var h=n(922),p=n(290);let m;!function(e){e.Decoding="decoding",e.Stopped="stopped",e.Paused="paused",e.Playing="playing"}(m||(m={}));const g=39,f=Object(u.h)(0,g);class _ extends a.a{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f;super(),this.buf=e,i()(this,"thumbnailWaveform",void 0),i()(this,"context",void 0),i()(this,"source",void 0),i()(this,"state",m.Decoding),i()(this,"audioBuf",void 0),i()(this,"element",void 0),i()(this,"resampledWaveform",void 0),i()(this,"waveformObservable",new s.SimpleObservable),i()(this,"clock",void 0),i()(this,"fileSize",void 0),i()(this,"onPlaybackEnd",(async()=>{await this.context.suspend(),this.emit(m.Stopped)})),this.fileSize=this.buf.byteLength,this.context=Object(h.a)(),this.resampledWaveform=Object(u.c)(null!=t?t:f,g),this.thumbnailWaveform=Object(u.c)(null!=t?t:f,100),this.waveformObservable.update(this.resampledWaveform),this.clock=new d(this.context)}get sizeBytes(){return this.fileSize}get waveform(){return this.resampledWaveform}get waveformData(){return this.waveformObservable}get clockInfo(){return this.clock}get liveData(){return this.clock.liveData}get timeSeconds(){return this.clock.timeSeconds}get durationSeconds(){return this.clock.durationSeconds}get currentState(){return this.state}get isPlaying(){return this.currentState===m.Playing}emit(e){this.state=e;for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return super.emit(e,...n),super.emit(c.b,e,...n),!0}destroy(){this.stop(),this.removeAllListeners(),this.clock.destroy(),this.waveformObservable.close(),this.element&&(URL.revokeObjectURL(this.element.src),this.element.remove())}async prepare(){if(this.state===m.Decoding){if(this.buf.byteLength>5242880){l.a.log("Audio file too large: processing through <audio /> element"),this.element=document.createElement("AUDIO");const e=new Promise(((e,t)=>{this.element.onloadeddata=()=>e(null),this.element.onerror=e=>t(e)}));this.element.src=URL.createObjectURL(new Blob([this.buf])),await e}else{this.audioBuf=await new Promise(((e,t)=>{this.context.decodeAudioData(this.buf,(t=>e(t)),(async n=>{try{l.a.error("Error decoding recording: ",n),l.a.warn("Trying to re-encode to WAV instead...");const r=await Object(h.b)(this.buf);this.context.decodeAudioData(r,(t=>e(t)),(e=>{l.a.error("Still failed to decode recording: ",e),t(e)}))}catch(n){l.a.error("Caught decoding error:",n),t(n)}}))}));const e=Array.from(this.audioBuf.getChannelData(0));this.resampledWaveform=function(e){const t=e.map((e=>Math.abs(e)));return Object(u.g)(Object(u.i)(t,g),0,1)}(e)}this.waveformObservable.update(this.resampledWaveform),this.clock.flagLoadTime(),this.clock.durationSeconds=this.element?this.element.duration:this.audioBuf.duration,this.emit(m.Stopped)}}async play(){this.state===m.Stopped&&(this.disconnectSource(),this.makeNewSourceBuffer(),this.element?await this.element.play():this.source.start()),await this.context.resume(),this.clock.flagStart(),this.emit(m.Playing)}disconnectSource(){var e,t;this.element||(null===(e=this.source)||void 0===e||e.disconnect(),null===(t=this.source)||void 0===t||t.removeEventListener("ended",this.onPlaybackEnd))}makeNewSourceBuffer(){this.element&&this.source||(this.element?this.source=this.context.createMediaElementSource(this.element):(this.source=this.context.createBufferSource(),this.source.buffer=this.audioBuf),this.source.addEventListener("ended",this.onPlaybackEnd),this.source.connect(this.context.destination))}async pause(){await this.context.suspend(),this.emit(m.Paused)}async stop(){await this.onPlaybackEnd(),this.clock.flagStop()}async toggle(){this.isPlaying?await this.pause():await this.play()}async skipTo(e){e=Object(p.a)(e,0,this.clock.durationSeconds);const t=this.isPlaying;t&&await this.context.suspend();const n=this.context.currentTime;this.disconnectSource(),this.makeNewSourceBuffer(),this.clock.syncTo(n,e),this.element?this.element.currentTime=e:this.source.start(n,e),t?await this.context.resume():await this.pause()}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return g})),n.d(t,"c",(function(){return x})),n.d(t,"a",(function(){return D}));var r=n(13),i=n.n(r),o=n(149),a=n(548),s=n.n(a);class l{constructor(e,t,n,r){this.updateCallback=e,this.getAutocompleterComponent=t,this.updateQuery=n,this.partCreator=r,i()(this,"partIndex",void 0)}onEscape(e){this.getAutocompleterComponent().onEscape(e)}close(){this.updateCallback({close:!0})}hasSelection(){return this.getAutocompleterComponent().hasSelection()}hasCompletions(){const e=this.getAutocompleterComponent();return e&&e.countCompletions()>0}confirmCompletion(){this.getAutocompleterComponent().onConfirmCompletion(),this.updateCallback({close:!0})}async startSelection(){const e=this.getAutocompleterComponent();0===e.countCompletions()&&await e.forceComplete()}selectPreviousSelection(){this.getAutocompleterComponent().moveSelection(-1)}selectNextSelection(){this.getAutocompleterComponent().moveSelection(1)}onPartUpdate(e,t){return this.partIndex=t.index,this.updateQuery(e.text)}onComponentConfirm(e){this.updateCallback({replaceParts:this.partForCompletion(e),close:!0})}partForCompletion(e){const{completionId:t}=e,n=e.completion;switch(e.type){case"room":return[this.partCreator.roomPill(n,t),this.partCreator.plain(e.suffix)];case"at-room":return[this.partCreator.atRoomPill(t),this.partCreator.plain(e.suffix)];case"user":return this.partCreator.createMentionParts(0===this.partIndex,n,t);case"command":return[this.partCreator.command(n)];default:return this.partCreator.plainWithEmoji(n)}}}var c=n(196),u=n(259),d=n(124),h=n(128),p=n(125);const m=String.fromCodePoint(8203);let g;!function(e){e.Plain="plain",e.Newline="newline",e.Emoji="emoji",e.Command="command",e.UserPill="user-pill",e.RoomPill="room-pill",e.AtRoomPill="at-room-pill",e.PillCandidate="pill-candidate"}(g||(g={}));class f{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";i()(this,"_text",void 0),this._text=e}acceptsInsertion(e,t,n){return!0}acceptsRemoval(e,t){return!0}merge(e){return!1}split(e){const t=this.text.slice(e);return this._text=this.text.slice(0,e),new b(t)}remove(e,t){const n=this.text.slice(0,e)+this.text.slice(e+t);for(let r=e;r<t+e;++r){const e=this.text.charAt(r);if(!this.acceptsRemoval(r,e))return n}this._text=n}appendUntilRejected(e,t){const n=this.text.length;let r=e;for(;r;){const[i]=Object(o.split)(r,"",2);if(!this.acceptsInsertion(i,n+e.length-r.length,t))break;r=r.slice(i.length)}return this._text+=e.slice(0,e.length-r.length),r||void 0}validateAndInsert(e,t,n){for(let r=0;r<t.length;++r){const i=t.charAt(r);if(!this.acceptsInsertion(i,e+r,n))return!1}const r=this._text.slice(0,e),i=this._text.slice(e);return this._text=r+t+i,!0}createAutoComplete(e){}trim(e){const t=this._text.slice(e);return this._text=this._text.slice(0,e),t}get text(){return this._text}get canEdit(){return!0}get acceptsCaret(){return this.canEdit}toString(){return`${this.type}(${this.text})`}serialize(){return{type:this.type,text:this.text}}}class _ extends f{acceptsInsertion(e,t,n){return"\n"!==e&&!s.a.test(e)&&("insertFromPaste"===n||"insertFromDrop"===n||("@"!==e&&"#"!==e&&":"!==e&&"+"!==e||0!==t&&(" "!==this._text[t-1]&&this._text[t-1]!==m&&("+"!==this._text[t-1]||":"!==e))))}toDOMNode(){return document.createTextNode(this.text)}merge(e){return e.type===this.type&&(this._text=this.text+e.text,!0)}updateDOMNode(e){e.textContent!==this.text&&(e.textContent=this.text)}canUpdateDOMNode(e){return e.nodeType===Node.TEXT_NODE}}class b extends _{get type(){return g.Plain}}class v extends f{constructor(e,t){super(t),this.resourceId=e,i()(this,"onClick",void 0)}acceptsInsertion(e){return" "!==e}acceptsRemoval(e,t){return 0!==e}toDOMNode(){const e=document.createElement("span");return e.setAttribute("spellcheck","false"),e.setAttribute("contentEditable","false"),e.onclick=this.onClick,e.className=this.className,e.appendChild(document.createTextNode(this.text)),this.setAvatar(e),e}updateDOMNode(e){const t=e.childNodes[0];t.textContent!==this.text&&(t.textContent=this.text),e.className!==this.className&&(e.className=this.className),e.onclick!==this.onClick&&(e.onclick=this.onClick),this.setAvatar(e)}canUpdateDOMNode(e){return e.nodeType===Node.ELEMENT_NODE&&"SPAN"===e.nodeName&&1===e.childNodes.length&&e.childNodes[0].nodeType===Node.TEXT_NODE}setAvatarVars(e,t,n){const r=`url('${t}')`,i=`'${n}'`;e.style.getPropertyValue("--avatar-background")!==r&&e.style.setProperty("--avatar-background",r),e.style.getPropertyValue("--avatar-letter")!==i&&e.style.setProperty("--avatar-letter",i)}serialize(){return{type:this.type,text:this.text,resourceId:this.resourceId}}get canEdit(){return!1}}class y extends f{acceptsInsertion(e,t){return 0===t&&"\n"===e}acceptsRemoval(e,t){return!0}toDOMNode(){return document.createElement("br")}merge(){return!1}updateDOMNode(){}canUpdateDOMNode(e){return"BR"===e.tagName}get type(){return g.Newline}get canEdit(){return!1}}class E extends f{acceptsInsertion(e,t){return s.a.test(e)}acceptsRemoval(e,t){return!1}toDOMNode(){const e=document.createElement("span");return e.className="mx_Emoji",e.setAttribute("title",Object(c.k)(this.text)),e.appendChild(document.createTextNode(this.text)),e}updateDOMNode(e){const t=e.childNodes[0];t.textContent!==this.text&&(e.setAttribute("title",Object(c.k)(this.text)),t.textContent=this.text)}canUpdateDOMNode(e){return"mx_Emoji"===e.className}get type(){return g.Emoji}get canEdit(){return!1}get acceptsCaret(){return!0}}class S extends v{constructor(e,t,n){super(e,t),this.room=n}setAvatar(e){var t;let n="",r=u.b(null!==(t=this.room)&&void 0!==t?t:null,16,16,"crop");var i,o,a,s;r||(n=null!==(i=u.e((null===(o=this.room)||void 0===o?void 0:o.name)||this.resourceId))&&void 0!==i?i:"",r=u.d(null!==(a=null===(s=this.room)||void 0===s?void 0:s.roomId)&&void 0!==a?a:this.resourceId));this.setAvatarVars(e,r,n)}get type(){return g.RoomPill}get className(){var e;return"mx_Pill "+(null!==(e=this.room)&&void 0!==e&&e.isSpaceRoom()?"mx_SpacePill":"mx_RoomPill")}}class w extends S{constructor(e,t){super(e,e,t)}get type(){return g.AtRoomPill}serialize(){return{type:this.type,text:this.text}}}class T extends v{constructor(e,t,n){super(e,t),this.member=n,i()(this,"onClick",(()=>{d.a.dispatch({action:h.a.ViewUser,member:this.member})}))}get type(){return g.UserPill}get className(){return"mx_UserPill mx_Pill"}setAvatar(e){if(!this.member)return;const t=this.member.name||this.member.userId,n=u.d(this.member.userId),r=u.a(this.member,16,16,"crop");let i="";var o;r===n&&(i=null!==(o=u.e(t))&&void 0!==o?o:"");this.setAvatarVars(e,r,i)}}class C extends _{constructor(e,t){super(e),this.autoCompleteCreator=t}createAutoComplete(e){return this.autoCompleteCreator.create(e)}acceptsInsertion(e,t,n){return 0===t||super.acceptsInsertion(e,t,n)}merge(){return!1}acceptsRemoval(e,t){return!0}get type(){return g.PillCandidate}}function x(e,t){return n=>r=>new l(r,e,t,n)}class F{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.room=e,this.client=t,i()(this,"autoCompleteCreator",void 0),this.autoCompleteCreator={create:null==n?void 0:n(this)}}setAutoCompleteCreator(e){this.autoCompleteCreator.create=e(this)}createPartForInput(e,t,n){switch(e[0]){case"#":case"@":case":":case"+":return this.pillCandidate("");case"\n":return new y;default:return s.a.test(Object(o.split)(e,"",2)[0])?new E:new b}}createDefaultPart(e){return this.plain(e)}deserializePart(e){switch(e.type){case g.Plain:return this.plain(e.text);case g.Newline:return this.newline();case g.Emoji:return this.emoji(e.text);case g.AtRoomPill:return this.atRoomPill(e.text);case g.PillCandidate:return this.pillCandidate(e.text);case g.RoomPill:return this.roomPill(e.resourceId);case g.UserPill:return this.userPill(e.text,e.resourceId)}}plain(e){return new b(e)}newline(){return new y("\n")}emoji(e){return new E(e)}pillCandidate(e){return new C(e,this.autoCompleteCreator)}roomPill(e,t){let n;var r;t||"#"!==e[0]?n=null!==(r=this.client.getRoom(t||e))&&void 0!==r?r:void 0:n=this.client.getRooms().find((t=>t.getCanonicalAlias()===e||t.getAltAliases().includes(e)));return new S(e,n?n.name:e,n)}atRoomPill(e){return new w(e,this.room)}userPill(e,t){const n=this.room.getMember(t);return new T(t,e,n||void 0)}static isRegionalIndicator(e){var t;const n=null!==(t=e.codePointAt(0))&&void 0!==t?t:0;return 0!=n&&2==e.length&&127462<=n&&n<=127487}plainWithEmoji(e){const t=[];let n="";for(const r of Object(o.split)(e,""))s.a.test(r)?(n&&(t.push(this.plain(n)),n=""),t.push(this.emoji(r)),F.isRegionalIndicator(e)&&t.push(this.plain(m))):n+=r;return n&&t.push(this.plain(n)),t}createMentionParts(e,t,n){const r=this.userPill(t,n);p.b.getValue("MessageComposerInput.insertTrailingColon")||(e=!1);return[r,this.plain(e?": ":" ")]}}class D extends F{createPartForInput(e,t){return 0===t&&"/"===e[0]?this.command(""):super.createPartForInput(e,t)}command(e){return new k(e,this.autoCompleteCreator)}deserializePart(e){return e.type===g.Command?this.command(e.text):super.deserializePart(e)}}class k extends C{get type(){return g.Command}}},function(e,t,n){"use strict";var r=function(e){};e.exports=function(e,t){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];if(r(t),!e){var a;if(void 0===t)a=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=0;(a=new Error(t.replace(/%s/g,(function(){return String(i[s++])})))).name="Invariant Violation"}throw a.framesToPop=1,a}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FOCUS_NO_AUTOFOCUS=t.FOCUS_AUTO=t.FOCUS_ALLOW=t.FOCUS_DISABLED=t.FOCUS_GROUP=void 0,t.FOCUS_GROUP="data-focus-lock",t.FOCUS_DISABLED="data-focus-lock-disabled",t.FOCUS_ALLOW="data-no-focus-lock",t.FOCUS_AUTO="data-autofocus-inside",t.FOCUS_NO_AUTOFOCUS="data-no-autofocus"},function(e,t,n){"use strict";var r=n(1040),i=n(1041);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=v,t.resolve=function(e,t){return v(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?v(e,!1,!0).resolveObject(t):t},t.format=function(e){i.isString(e)&&(e=v(e));return e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(c),d=["%","/","?",";","#"].concat(u),h=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},f={javascript:!0,"javascript:":!0},_={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=n(1042);function v(e,t,n){if(e&&i.isObject(e)&&e instanceof o)return e;var r=new o;return r.parse(e,t,n),r}o.prototype.parse=function(e,t,n){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),s=-1!==o&&o<e.indexOf("#")?"?":"#",c=e.split(s);c[0]=c[0].replace(/\\/g,"/");var v=e=c.join(s);if(v=v.trim(),!n&&1===e.split("#").length){var y=l.exec(v);if(y)return this.path=v,this.href=v,this.pathname=y[1],y[2]?(this.search=y[2],this.query=t?b.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var E=a.exec(v);if(E){var S=(E=E[0]).toLowerCase();this.protocol=S,v=v.substr(E.length)}if(n||E||v.match(/^\/\/[^@\/]+@[^@\/]+/)){var w="//"===v.substr(0,2);!w||E&&f[E]||(v=v.substr(2),this.slashes=!0)}if(!f[E]&&(w||E&&!_[E])){for(var T,C,x=-1,F=0;F<h.length;F++){-1!==(D=v.indexOf(h[F]))&&(-1===x||D<x)&&(x=D)}-1!==(C=-1===x?v.lastIndexOf("@"):v.lastIndexOf("@",x))&&(T=v.slice(0,C),v=v.slice(C+1),this.auth=decodeURIComponent(T)),x=-1;for(F=0;F<d.length;F++){var D;-1!==(D=v.indexOf(d[F]))&&(-1===x||D<x)&&(x=D)}-1===x&&(x=v.length),this.host=v.slice(0,x),v=v.slice(x),this.parseHost(),this.hostname=this.hostname||"";var k="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!k)for(var O=this.hostname.split(/\./),I=(F=0,O.length);F<I;F++){var A=O[F];if(A&&!A.match(p)){for(var R="",N=0,M=A.length;N<M;N++)A.charCodeAt(N)>127?R+="x":R+=A[N];if(!R.match(p)){var P=O.slice(0,F),L=O.slice(F+1),B=A.match(m);B&&(P.push(B[1]),L.unshift(B[2])),L.length&&(v="/"+L.join(".")+v),this.hostname=P.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),k||(this.hostname=r.toASCII(this.hostname));var U=this.port?":"+this.port:"",j=this.hostname||"";this.host=j+U,this.href+=this.host,k&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==v[0]&&(v="/"+v))}if(!g[S])for(F=0,I=u.length;F<I;F++){var G=u[F];if(-1!==v.indexOf(G)){var z=encodeURIComponent(G);z===G&&(z=escape(G)),v=v.split(G).join(z)}}var H=v.indexOf("#");-1!==H&&(this.hash=v.substr(H),v=v.slice(0,H));var q=v.indexOf("?");if(-1!==q?(this.search=v.substr(q),this.query=v.substr(q+1),t&&(this.query=b.parse(this.query)),v=v.slice(0,q)):t&&(this.search="",this.query={}),v&&(this.pathname=v),_[S]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){U=this.pathname||"";var V=this.search||"";this.path=U+V}return this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,a="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(a=b.stringify(this.query));var s=this.search||a&&"?"+a||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||_[t])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),t+o+(n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+r},o.prototype.resolve=function(e){return this.resolveObject(v(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if(i.isString(e)){var t=new o;t.parse(e,!1,!0),e=t}for(var n=new o,r=Object.keys(this),a=0;a<r.length;a++){var s=r[a];n[s]=this[s]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var l=Object.keys(e),c=0;c<l.length;c++){var u=l[c];"protocol"!==u&&(n[u]=e[u])}return _[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!_[e.protocol]){for(var d=Object.keys(e),h=0;h<d.length;h++){var p=d[h];n[p]=e[p]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||f[e.protocol])n.pathname=e.pathname;else{for(var m=(e.pathname||"").split("/");m.length&&!(e.host=m.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==m[0]&&m.unshift(""),m.length<2&&m.unshift(""),n.pathname=m.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var g=n.pathname||"",b=n.search||"";n.path=g+b}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var v=n.pathname&&"/"===n.pathname.charAt(0),y=e.host||e.pathname&&"/"===e.pathname.charAt(0),E=y||v||n.host&&e.pathname,S=E,w=n.pathname&&n.pathname.split("/")||[],T=(m=e.pathname&&e.pathname.split("/")||[],n.protocol&&!_[n.protocol]);if(T&&(n.hostname="",n.port=null,n.host&&(""===w[0]?w[0]=n.host:w.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===m[0]?m[0]=e.host:m.unshift(e.host)),e.host=null),E=E&&(""===m[0]||""===w[0])),y)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,w=m;else if(m.length)w||(w=[]),w.pop(),w=w.concat(m),n.search=e.search,n.query=e.query;else if(!i.isNullOrUndefined(e.search)){if(T)n.hostname=n.host=w.shift(),(k=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=k.shift(),n.host=n.hostname=k.shift());return n.search=e.search,n.query=e.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!w.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var C=w.slice(-1)[0],x=(n.host||e.host||w.length>1)&&("."===C||".."===C)||""===C,F=0,D=w.length;D>=0;D--)"."===(C=w[D])?w.splice(D,1):".."===C?(w.splice(D,1),F++):F&&(w.splice(D,1),F--);if(!E&&!S)for(;F--;F)w.unshift("..");!E||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),x&&"/"!==w.join("/").substr(-1)&&w.push("");var k,O=""===w[0]||w[0]&&"/"===w[0].charAt(0);T&&(n.hostname=n.host=O?"":w.length?w.shift():"",(k=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=k.shift(),n.host=n.hostname=k.shift()));return(E=E||n.host&&w.length)&&!O&&w.unshift(""),w.length?n.pathname=w.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(121),l=n(123),c=n(520),u=n(319),d=n(135);class h extends a.a.Component{constructor(e){super(e),i()(this,"onAuthFinished",((e,t)=>{e?this.props.onFinished(!0,t):t===c.a?this.props.onFinished(!1,null):this.setState({authError:t})})),i()(this,"onUpdateStagePhase",((e,t)=>{this.setState({uiaStage:e,uiaStagePhase:t})})),i()(this,"onDismissClick",(()=>{this.props.onFinished(!1)})),this.state={authError:null,uiaStage:null,uiaStagePhase:null}}getDefaultDialogAesthetics(){const e={[u.c.PHASE_PREAUTH]:{title:Object(s.a)("Use Single Sign On to continue"),body:Object(s.a)("To continue, use Single Sign On to prove your identity."),continueText:Object(s.a)("Single Sign On"),continueKind:"primary"},[u.c.PHASE_POSTAUTH]:{title:Object(s.a)("Confirm to continue"),body:Object(s.a)("Click the button below to confirm your identity."),continueText:Object(s.a)("Confirm"),continueKind:"primary"}};return{[u.c.LOGIN_TYPE]:e,[u.c.UNSTABLE_LOGIN_TYPE]:e}}render(){let e,t,n=this.state.authError?"Error":this.props.title||Object(s.a)("Authentication"),r=this.state.authError?null:this.props.body;const i=this.props.aestheticsForStagePhases||this.getDefaultDialogAesthetics();if(!this.state.authError&&i&&null!==this.state.uiaStage&&null!==this.state.uiaStagePhase&&i[this.state.uiaStage]){const o=i[this.state.uiaStage][this.state.uiaStagePhase];o&&(o.title&&(n=o.title),o.body&&(r=o.body),o.continueText&&(e=o.continueText),o.continueKind&&(t=o.continueKind))}let o;return o=this.state.authError?a.a.createElement("div",{id:"mx_Dialog_content"},a.a.createElement("div",{role:"alert"},this.state.authError.message||this.state.authError.toString()),a.a.createElement("br",null),a.a.createElement(l.a,{onClick:this.onDismissClick,className:"mx_GeneralButton",autoFocus:!0},Object(s.a)("Dismiss"))):a.a.createElement("div",{id:"mx_Dialog_content"},r,a.a.createElement(c.b,{matrixClient:this.props.matrixClient,authData:this.props.authData,makeRequest:this.props.makeRequest,onAuthFinished:this.onAuthFinished,onStagePhaseChange:this.onUpdateStagePhase,continueText:e,continueKind:t})),a.a.createElement(d.a,{className:"mx_InteractiveAuthDialog",onFinished:this.props.onFinished,title:n,contentId:"mx_Dialog_content"},o)}}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.hasChildren=t.isDocument=t.isComment=t.isText=t.isCDATA=t.isTag=void 0,i(n(702),t),i(n(1059),t),i(n(1060),t),i(n(708),t),i(n(709),t),i(n(1061),t),i(n(1062),t);var o=n(210);Object.defineProperty(t,"isTag",{enumerable:!0,get:function(){return o.isTag}}),Object.defineProperty(t,"isCDATA",{enumerable:!0,get:function(){return o.isCDATA}}),Object.defineProperty(t,"isText",{enumerable:!0,get:function(){return o.isText}}),Object.defineProperty(t,"isComment",{enumerable:!0,get:function(){return o.isComment}}),Object.defineProperty(t,"isDocument",{enumerable:!0,get:function(){return o.isDocument}}),Object.defineProperty(t,"hasChildren",{enumerable:!0,get:function(){return o.hasChildren}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(130),i=n.n(r),o=n(132),a=n.n(o),s=n(13),l=n.n(s),c=n(120),u=n.n(c),d=n(126),h=n.n(d);const p=["children","className","disabled","outlined","childrenInLabel","inputRef"];class m extends u.a.PureComponent{render(){const e=this.props,{children:t,className:n,disabled:r,outlined:o,childrenInLabel:s,inputRef:l}=e,c=a()(e,p),d=h()("mx_StyledRadioButton",n,{mx_StyledRadioButton_disabled:r,mx_StyledRadioButton_enabled:!r,mx_StyledRadioButton_checked:this.props.checked,mx_StyledRadioButton_outlined:o}),m=u.a.createElement(u.a.Fragment,null,u.a.createElement("input",i()({ref:l,type:"radio",disabled:r},c)),u.a.createElement("div",null,u.a.createElement("div",null)));return s?u.a.createElement("label",{className:d},m,u.a.createElement("div",{className:"mx_StyledRadioButton_content"},t),u.a.createElement("div",{className:"mx_StyledRadioButton_spacer"})):u.a.createElement("div",{className:d},u.a.createElement("label",{className:"mx_StyledRadioButton_innerLabel"},m),u.a.createElement("div",{className:"mx_StyledRadioButton_content"},t),u.a.createElement("div",{className:"mx_StyledRadioButton_spacer"}))}}l()(m,"defaultProps",{className:"",childrenInLabel:!0})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return u})),n.d(t,"e",(function(){return d})),n.d(t,"b",(function(){return h}));var r=n(149),i=n(164),o=n(166),a=n(217);function s(e,t,n,r){let i;return null!=e&&e.getMxcAvatarUrl()&&(i=Object(o.b)(e.getMxcAvatarUrl()).getThumbnailOfSourceHttp(t,n,r)),i||(i=u(e?e.userId:"")),i}function l(e,t,n,r){return e.avatarUrl?Object(o.b)(e.avatarUrl).getThumbnailOfSourceHttp(t,n,r):null}const c=new Map;function u(e){if(!e)return"";const t=["#0DBD8B","#368bd6","#ac3ba8"];let n=0;for(let t=0;t<e.length;++t)n+=e.charCodeAt(t);const r=n%t.length,i=`--avatar-background-colors_${r}`,o=document.body.style.getPropertyValue(i)||t[r];let a=c.get(o);return a||(!function(e){return"string"==typeof e&&(7===e.length||9===e.length)&&"#"===e.charAt(0)&&!e.slice(1).split("").some((e=>isNaN(parseInt(e,16))))}(o)?a="":(a=function(e){const t=document.createElement("canvas");t.width=40,t.height=40;const n=t.getContext("2d");return n?(n.fillStyle=e,n.fillRect(0,0,40,40),t.toDataURL()):""}(o),c.set(o,a))),a}function d(e){if(!e)return void console.trace("`name` argument to `getInitialLetter` not supplied");if(e.length<1)return;const t=e[0];return"@"!==t&&"#"!==t&&"+"!==t||!e[1]||(e=e.substring(1)),Object(r.split)(e,"",1)[0].toUpperCase()}function h(e,t,n,r){if(!e)return null;if(e.getMxcAvatarUrl()){var s;const i=Object(o.b)(null!==(s=e.getMxcAvatarUrl())&&void 0!==s?s:void 0);return void 0!==t&&void 0!==n?i.getThumbnailOfSourceHttp(t,n,r):i.srcHttp}if(e.isSpaceRoom())return null;if(!i.a.shared().getUserIdForRoomId(e.roomId)&&!Object(a.a)(e))return null;const l=e.getAvatarFallbackMember();if(null!=l&&l.getMxcAvatarUrl()){const e=Object(o.b)(l.getMxcAvatarUrl());return void 0!==t&&void 0!==n?e.getThumbnailOfSourceHttp(t,n,r):e.srcHttp}return null}},function(e,t,n){"use strict";t.a={getDisplayUserIdentifier:function(e,t){let{roomId:n,withDisplayName:r}=t;return e}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return o}));const r="io.element.voice_broadcast_info",i="io.element.voice_broadcast_chunk";let o;!function(e){e.Started="started",e.Paused="paused",e.Resumed="resumed",e.Stopped="stopped"}(o||(o={}))},function(e,t,n){"use strict";class r{constructor(e){const t={},n=this._getOverriddenMethods(this,t);for(const r of Object.keys(n))"function"==typeof n[r]&&(t[r]=e[r],e[r]=n[r])}_getOverriddenMethods(){throw new Error("Not implemented")}}r.install=function(e,t,n){e.__mixins||(e.__mixins=[]);for(let n=0;n<e.__mixins.length;n++)if(e.__mixins[n].constructor===t)return e.__mixins[n];const r=new t(e,n);return e.__mixins.push(r),r},e.exports=r},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=Object.prototype.toString;function r(e,t){return n.call(e)===`[object ${t}]`}function i(e){return r(e,"Object")}function o(e,t){try{return e instanceof t}catch(e){return!1}}t.isDOMError=function(e){return r(e,"DOMError")},t.isDOMException=function(e){return r(e,"DOMException")},t.isElement=function(e){return"undefined"!=typeof Element&&o(e,Element)},t.isError=function(e){switch(n.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return o(e,Error)}},t.isErrorEvent=function(e){return r(e,"ErrorEvent")},t.isEvent=function(e){return"undefined"!=typeof Event&&o(e,Event)},t.isInstanceOf=o,t.isNaN=function(e){return"number"==typeof e&&e!=e},t.isPlainObject=i,t.isPrimitive=function(e){return null===e||"object"!=typeof e&&"function"!=typeof e},t.isRegExp=function(e){return r(e,"RegExp")},t.isString=function(e){return r(e,"String")},t.isSyntheticEvent=function(e){return i(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e},t.isThenable=function(e){return Boolean(e&&e.then&&"function"==typeof e.then)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"c",(function(){return p})),n.d(t,"d",(function(){return m})),n.d(t,"b",(function(){return v}));var r=n(320),i=n(140),o=n(231),a=n(122),s=n(197),l=n(793),c=n(436),u=n(242),d=n(125);let h;function p(e,t){var n;if(e.isGuest())return h.AllMessages;if(f(t))return h.Mute;let i;try{i=e.getRoomPushRule("global",t)}catch(e){return null}if(null===(n=i)||void 0===n||!n.enabled)return h.AllMessages;if(b(i))return h.MentionsOnly;return r.a.actionListToActionsObject(i.actions).tweaks.sound?h.AllMessagesLoud:null}function m(e,t){return t===h.Mute?function(e){const t=a.a.get(),n=[],r=t.getRoomPushRule("global",e);r&&n.push(t.deletePushRule("global",o.e.RoomSpecific,r.rule_id));return n.push(t.addPushRule("global",o.e.Override,e,{conditions:[{kind:o.a.EventMatch,key:"room_id",pattern:e}],actions:[o.d.DontNotify]})),Promise.all(n)}(e):function(e,t){const n=a.a.get(),r=[],i=f(e);i&&r.push(n.deletePushRule("global",o.e.Override,i.rule_id));if(t===h.AllMessages){const t=n.getRoomPushRule("global",e);t&&r.push(n.deletePushRule("global",o.e.RoomSpecific,t.rule_id))}else t===h.MentionsOnly?(r.push(n.addPushRule("global",o.e.RoomSpecific,e,{actions:[o.d.DontNotify]})),r.push(n.setPushRuleEnabled("global",o.e.RoomSpecific,e,!0))):t===h.AllMessagesLoud&&(r.push(n.addPushRule("global",o.e.RoomSpecific,e,{actions:[o.d.Notify,{set_tweak:o.g.Sound,value:"default"}]})),r.push(n.setPushRuleEnabled("global",o.e.RoomSpecific,e,!0)));return Promise.all(r)}(e,t)}function g(e,t,n){let r=n?e.getThreadUnreadNotificationCount(n,t):e.getUnreadNotificationCount(t);const o=d.b.getValue("feature_dynamic_room_predecessors"),s=e.findPredecessor(o);if(!n&&null!=s&&s.roomId){const e=s.roomId,t=a.a.get().getRoom(e);t&&(r+=t.getUnreadNotificationCount(i.b.Highlight))}return r}function f(e){var t,n;const r=a.a.get();if(null==r||null===(t=r.pushRules)||void 0===t||null===(n=t.global)||void 0===n||!n.override)return null;for(const t of r.pushRules.global.override)if(t.enabled&&_(e,t)&&b(t))return t;return null}function _(e,t){var n;if(1!==(null===(n=t.conditions)||void 0===n?void 0:n.length))return!1;const r=t.conditions[0];return r.kind===o.a.EventMatch&&"room_id"===r.key&&r.pattern===e}function b(e){return 1===e.actions.length&&e.actions[0]===o.d.DontNotify}function v(e,t){if(!e)return{symbol:null,count:0,color:s.a.None};if(Object(l.b)(e,t).length>0)return{symbol:"!",count:1,color:s.a.Unsent};if(Object(u.b)(e.getMyMembership())===u.a.Invite)return{symbol:"!",count:1,color:s.a.Red};if(p(e.client,e.roomId)===h.Mute)return{symbol:null,count:0,color:s.a.None};const n=g(e,i.b.Highlight,t),r=g(e,i.b.Total,t),o=r||n;if(n>0)return{symbol:null,count:o,color:s.a.Red};if(r>0)return{symbol:null,count:o,color:s.a.Grey};let a=!1;return a=t?Object(c.b)(e.getThread(t)):Object(c.a)(e),{symbol:null,count:o,color:a?s.a.Bold:s.a.None}}!function(e){e.AllMessagesLoud="all_messages_loud",e.AllMessages="all_messages",e.MentionsOnly="mentions_only",e.Mute="mute"}(h||(h={}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return u}));var r=n(13),i=n.n(r),o=n(202),a=n(124),s=n(451),l=n(181);let c;!function(e){e.StoreMessaging="store_messaging",e.StopMessaging="stop_messaging"}(c||(c={}));class u extends o.a{constructor(){super(a.a),i()(this,"widgetMap",new s.a)}static get instance(){return u.internalInstance}async onAction(e){}async onReady(){this.widgetMap.clear()}storeMessaging(e,t,n){this.stopMessaging(e,t);const r=l.a.calcWidgetUid(e.id,t);this.widgetMap.set(r,n),this.emit(c.StoreMessaging,r,n)}stopMessaging(e,t){this.stopMessagingByUid(l.a.calcWidgetUid(e.id,t))}getMessaging(e,t){return this.widgetMap.get(l.a.calcWidgetUid(e.id,t))}stopMessagingByUid(e){var t;null===(t=this.widgetMap.remove(e))||void 0===t||t.stop(),this.emit(c.StopMessaging,e)}getMessagingForUid(e){return this.widgetMap.get(e)}}i()(u,"internalInstance",(()=>{const e=new u;return e.start(),e})())},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(120),i=n.n(r),o=n(126),a=n.n(o),s=n(121),l=n(123),c=n(161);let u;!function(e){e.Verified="verified",e.Warning="warning",e.Unknown="unknown",e.Normal="normal",e.Unauthenticated="unauthenticated"}(u||(u={}));const d={[u.Warning]:Object(s.c)("This user has not verified all of their sessions."),[u.Normal]:Object(s.c)("You have not verified this user."),[u.Verified]:Object(s.c)("You have verified this user. This user has verified all of their sessions.")},h={[u.Warning]:Object(s.c)("Someone is using an unknown session"),[u.Normal]:Object(s.c)("This room is end-to-end encrypted"),[u.Verified]:Object(s.c)("Everyone in this room is verified")};t.b=e=>{let{isUser:t,status:n,className:o,size:p,onClick:m,hideTooltip:g,tooltipAlignment:f,bordered:_}=e;const[b,v]=Object(r.useState)(!1),y=a()({mx_E2EIcon:!0,mx_E2EIcon_bordered:_,mx_E2EIcon_warning:n===u.Warning,mx_E2EIcon_normal:n===u.Normal,mx_E2EIcon_verified:n===u.Verified},o);let E,S;E=t?d[n]:h[n],p&&(S={width:`${p}px`,height:`${p}px`});const w=()=>v(!0),T=()=>v(!1);let C;return b&&!g&&(C=i.a.createElement(c.b,{label:E?Object(s.a)(E):"",alignment:f})),m?i.a.createElement(l.a,{onClick:m,onMouseOver:w,onMouseLeave:T,className:y,style:S},C):i.a.createElement("div",{onMouseOver:w,onMouseLeave:T,className:y,style:S},C)}},,function(e,t,n){"use strict";n.d(t,"d",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"i",(function(){return a})),n.d(t,"g",(function(){return s})),n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return p})),n.d(t,"f",(function(){return m})),n.d(t,"h",(function(){return g})),n.d(t,"e",(function(){return f})),n.d(t,"l",(function(){return _})),n.d(t,"j",(function(){return S})),n.d(t,"k",(function(){return T}));const r=e=>{return t=e.timestamp,n=e.timeout,Math.max(0,t+n-Date.now());var t,n},i=e=>e.beaconInfo.timestamp+e.beaconInfo.timeout,o=(e,t)=>i(t)-i(e),a=(e,t)=>t.beaconInfo.timestamp-e.beaconInfo.timestamp,s=e=>!e.isLive&&e.beaconInfo.timestamp>Date.now()&&i(e)>Date.now();var l=n(1);let c;!function(e){e.Unavailable="Unavailable",e.PermissionDenied="PermissionDenied",e.PositionUnavailable="PositionUnavailable",e.Timeout="Timeout",e.Default="Default"}(c||(c={}));const u={timeout:1e4,maximumAge:6e4},d=e=>{var t;if(l.a.error("Geolocation failed",null!==(t=null==e?void 0:e.message)&&void 0!==t?t:e),!(e=>"object"==typeof e&&!!e.PERMISSION_DENIED)(e))return e.message===c.Unavailable?c.Unavailable:c.Default;switch(null==e?void 0:e.code){case e.PERMISSION_DENIED:return c.PermissionDenied;case e.POSITION_UNAVAILABLE:return c.PositionUnavailable;case e.TIMEOUT:return c.Timeout;default:return c.Default}},h=()=>{if(!navigator.geolocation)throw new Error(c.Unavailable);return navigator.geolocation},p=e=>{const{latitude:t,longitude:n,altitude:r,accuracy:i}=e.coords;return{timestamp:Date.now(),latitude:t,longitude:n,altitude:r,accuracy:i}},m=e=>`geo:${e.latitude},${e.longitude}${Number.isFinite(e.altitude)?`,${e.altitude}`:""}${Number.isFinite(e.accuracy)?`;u=${e.accuracy}`:""}`,g=e=>{const t=p(e);return{timestamp:t.timestamp,geoUri:m(t)}},f=async()=>{try{return await new Promise(((e,t)=>{h().getCurrentPosition(e,t,u)}))}catch(e){throw new Error(d(e))}},_=(e,t)=>{try{const n=e=>t(d(e)),r=h().watchPosition(e,n,u);return()=>{h().clearWatch(r)}}catch(e){throw new Error(d(e))}};var b=n(120),v=n(136),y=n(133),E=n(141);const S=e=>{const t=Object(b.useContext)(y.a),[n,r]=Object(b.useState)();Object(b.useEffect)((()=>{const n=e.getRoomId(),i=Object(v.getBeaconInfoIdentifier)(e),o=t.getRoom(n),a=null==o?void 0:o.currentState.beacons.get(i);(null==a?void 0:a.beaconInfoId)===e.getId()?r(a):r(void 0)}),[e,t]);const i=Object(E.b)(n,v.BeaconEvent.Update,(()=>null==n?void 0:n.beaconInfoId));return Object(b.useEffect)((()=>{i&&i!==e.getId()&&r(void 0)}),[i,e]),Object(b.useEffect)((()=>{n&&n.monitorLiveness()}),[n]),n};var w=n(339);const T=e=>{const[t,n]=Object(b.useState)(!1),r=Object(E.b)(w.a.instance,w.b.LocationPublishError,(()=>e.some(w.a.instance.beaconHasLocationPublishError))),i=Object(E.b)(w.a.instance,w.b.BeaconUpdateError,(()=>e.some((e=>w.a.instance.beaconUpdateErrors.has(e)))));Object(b.useEffect)((()=>{i&&n(!1)}),[i]),Object(b.useEffect)((()=>{n(!1)}),[e]);return{onStopSharing:async()=>{n(!0);try{await Promise.all(e.map((e=>w.a.instance.stopBeacon(e))))}catch(e){n(!1)}},onResetLocationPublishError:()=>{e.forEach((e=>{w.a.instance.resetLocationPublishError(e)}))},beacon:e.map((e=>w.a.instance.getBeaconById(e))).sort(o).shift(),stoppingInProgress:t,hasLocationPublishError:r,hasStopSharingError:i}}},function(e,t,n){"use strict";n.r(t),n.d(t,"makeHtmlMessage",(function(){return d})),n.d(t,"makeHtmlNotice",(function(){return h})),n.d(t,"makeHtmlEmote",(function(){return p})),n.d(t,"makeTextMessage",(function(){return m})),n.d(t,"makeNotice",(function(){return g})),n.d(t,"makeEmoteMessage",(function(){return f})),n.d(t,"getTextForLocationEvent",(function(){return _})),n.d(t,"makeLocationContent",(function(){return b})),n.d(t,"parseLocationEvent",(function(){return v})),n.d(t,"makeTopicContent",(function(){return y})),n.d(t,"parseTopicContent",(function(){return E})),n.d(t,"makeBeaconInfoContent",(function(){return S})),n.d(t,"parseBeaconInfoContent",(function(){return w})),n.d(t,"makeBeaconContent",(function(){return T})),n.d(t,"parseBeaconContent",(function(){return C}));var r=n(13),i=n.n(r),o=n(129),a=n(55),s=n(41),l=n(30);const c=new(n(15).c)("m.topic","org.matrix.msc3765.topic");function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e,t){return{msgtype:o.e.Text,format:"org.matrix.custom.html",body:e,formatted_body:t}}function h(e,t){return{msgtype:o.e.Notice,format:"org.matrix.custom.html",body:e,formatted_body:t}}function p(e,t){return{msgtype:o.e.Emote,format:"org.matrix.custom.html",body:e,formatted_body:t}}function m(e){return{msgtype:o.e.Text,body:e}}function g(e){return{msgtype:o.e.Notice,body:e}}function f(e){return{msgtype:o.e.Emote,body:e}}const _=(e,t,n,r)=>{const i=`at ${new Date(n).toISOString()}`;return[t===l.a.Self?"User":void 0,"Location",r?`"${r}"`:void 0,e,i].filter(Boolean).join(" ")},b=(e,t,n,r,s)=>{const c=null!=e?e:_(t,s||l.a.Self,n,r),d=n?{[l.d.name]:n}:{};return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({msgtype:o.e.Location,body:c,geo_uri:t,[l.c.name]:{description:r,uri:t},[l.b.name]:{type:s||l.a.Self},[a.c.name]:c},d)},v=e=>{var t,n;const r=l.c.findIn(e),i=l.b.findIn(e),o=l.d.findIn(e),s=a.c.findIn(e),c=null!==(t=null==r?void 0:r.uri)&&void 0!==t?t:null==e?void 0:e.geo_uri,u=null==r?void 0:r.description,d=null!==(n=null==i?void 0:i.type)&&void 0!==n?n:l.a.Self,h=null!=s?s:e.body;return b(h,c,null!=o?o:void 0,u,d)},y=(e,t)=>{const n=[{body:e,mimetype:"text/plain"}];return Object(s.b)(t)&&n.push({body:t,mimetype:"text/html"}),{topic:e,[c.name]:n}},E=e=>{var t,n,r;const i=c.findIn(e);if(!Array.isArray(i))return{text:e.topic};return{text:null!==(t=null==i||null===(n=i.find((e=>!Object(s.b)(e.mimetype)||"text/plain"===e.mimetype)))||void 0===n?void 0:n.body)&&void 0!==t?t:e.topic,html:null==i||null===(r=i.find((e=>"text/html"===e.mimetype)))||void 0===r?void 0:r.body}},S=(e,t,n,r,i)=>({description:n,timeout:e,live:t,[l.d.name]:i||Date.now(),[l.b.name]:{type:null!=r?r:l.a.Self}}),w=e=>{var t;const{description:n,timeout:r,live:i}=e,o=null!==(t=l.d.findIn(e))&&void 0!==t?t:void 0,a=l.b.findIn(e);return{description:n,timeout:r,live:i,assetType:null==a?void 0:a.type,timestamp:o}},T=(e,t,n,r)=>({[l.c.name]:{description:r,uri:e},[l.d.name]:t,"m.relates_to":{rel_type:a.d.name,event_id:n}}),C=e=>{var t;const n=l.c.findIn(e),r=null!==(t=l.d.findIn(e))&&void 0!==t?t:void 0;return{description:null==n?void 0:n.description,uri:null==n?void 0:n.uri,timestamp:r}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d}));var r=n(1),i=n(136),o=n(124),a=n(122),s=n(297),l=n(217);function c(e,t){var n;if(!t.actualRoomId)return!1;const r=e.getRoom(t.actualRoomId);if(!r)return!1;if(r.getInvitedAndJoinedMemberCount()!==1+(null===(n=t.targets)||void 0===n?void 0:n.length))return!1;if(0===r.currentState.getStateEvents(i.EventType.RoomHistoryVisibility).length)return!1;const o=r.currentState.getStateEvents(i.EventType.RoomEncryption);return!0!==t.encrypted||0!==o.length}async function u(e,t,n){if(Object(l.a)(e)){var r;const i=(n=null!==(r=n)&&void 0!==r?r:a.a.get()).getRoom(e);return i.isCreated?t(i.actualRoomId):new Promise(((e,n)=>{i.afterCreateCallbacks.push((r=>{t(r).then(e).catch(n)})),o.a.dispatch({action:"local_room_event",roomId:i.roomId})}))}return t(e)}async function d(e,t){return c(e,t)?h(t,t.actualRoomId).then((()=>(t.state=s.c.CREATED,e.emit(i.ClientEvent.Room,t),Promise.resolve(t.actualRoomId)))):new Promise((n=>{const o=()=>{a&&clearInterval(a),l&&clearTimeout(l),h(t,t.actualRoomId).then((()=>{t.state=s.c.CREATED,e.emit(i.ClientEvent.Room,t),n(t.actualRoomId)}))},a=window.setInterval((()=>{c(e,t)&&o()}),500),l=window.setTimeout((()=>{r.a.warn(`Assuming local room ${t.roomId} is ready after hitting timeout`),o()}),5e3)}))}async function h(e,t){for(const n of e.afterCreateCallbacks)await n(t);e.afterCreateCallbacks=[]}},function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return r})),function(e){e.IS="SERVICE_TYPE_IS",e.IM="SERVICE_TYPE_IM"}(r||(r={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contains=t.parentAutofocusables=t.getAllTabbableNodes=t.getTabbableNodes=t.filterAutoFocusable=t.filterFocusable=void 0;var r=n(273),i=n(323),o=n(1026),a=n(1027);t.filterFocusable=function(e,t){return(0,r.toArray)(e).filter((function(e){return(0,i.isVisibleCached)(t,e)})).filter((function(e){return(0,i.notHiddenInput)(e)}))};t.filterAutoFocusable=function(e,t){return void 0===t&&(t=new Map),(0,r.toArray)(e).filter((function(e){return(0,i.isAutoFocusAllowedCached)(t,e)}))};t.getTabbableNodes=function(e,n,r){return(0,o.orderByTabIndex)((0,t.filterFocusable)((0,a.getFocusables)(e,r),n),!0,r)};t.getAllTabbableNodes=function(e,n){return(0,o.orderByTabIndex)((0,t.filterFocusable)((0,a.getFocusables)(e),n),!1)};t.parentAutofocusables=function(e,n){return(0,t.filterFocusable)((0,a.getParentAutofocusables)(e),n)};t.contains=function(e,n){return e.shadowRoot?(0,t.contains)(e.shadowRoot,n):!(void 0===Object.getPrototypeOf(e).contains||!Object.getPrototypeOf(e).contains.call(e,n))||(0,r.toArray)(e.children).some((function(e){var r;if(e instanceof HTMLIFrameElement){var i=null===(r=e.contentDocument)||void 0===r?void 0:r.body;return!!i&&(0,t.contains)(i,n)}return(0,t.contains)(e,n)}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFirst=t.asArray=t.toArray=void 0;t.toArray=function(e){for(var t=Array(e.length),n=0;n<e.length;++n)t[n]=e[n];return t};t.asArray=function(e){return Array.isArray(e)?e:[e]};t.getFirst=function(e){return Array.isArray(e)?e[0]:e}},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"Notifier",(function(){return U}));var r=n(13),i=n.n(r),o=n(143),a=n(140),s=n(147),l=n(1),c=n(129),u=n(30),d=n(215),h=n(122),p=n(189),m=n(131),g=n(157),f=n(293),_=n(259),b=n(124),v=n(121),y=n(127),E=n(125),S=n(617),w=n(137),T=n(692),C=n(618),x=n(166),F=n(144),D=n(183),k=n(387),O=n(154),I=n(388),A=n(1415),R=n(198),N=n(203),M=n(192),P=n(465);const L={[c.e.KeyVerificationRequest]:e=>{const t=(e.sender||{}).name;return Object(v.a)("%(name)s is requesting verification",{name:t})},[u.c.name]:e=>f.c(e)(),[u.c.altName]:e=>f.c(e)(),[c.e.Audio]:e=>{var t,n,r;return null!==(t=e.getContent())&&void 0!==t&&t[M.c]?1===(null===(n=e.getContent())||void 0===n||null===(r=n[M.c])||void 0===r?void 0:r.sequence)?Object(v.a)("%(senderName)s started a voice broadcast",{senderName:Object(P.a)(e)}):null:f.b(e)}};class B{constructor(){i()(this,"notifsByRoom",{}),i()(this,"pendingEncryptedEventIds",[]),i()(this,"toolbarHidden",void 0),i()(this,"isSyncing",void 0),i()(this,"onSyncStateChange",((e,t,n)=>{e===d.b.Syncing?this.isSyncing=!0:e!==d.b.Stopped&&e!==d.b.Error||(this.isSyncing=!1),[d.b.Stopped,d.b.Error].includes(e)||null!=n&&n.fromCache||Object(I.c)(h.a.get())})),i()(this,"onEvent",((e,t,n,r,i)=>{if(i.liveEvent&&this.isSyncing&&e.getSender()!==h.a.get().getUserId())if(h.a.get().decryptEventIfNeeded(e),e.isBeingDecrypted()||e.isDecryptionFailure())for(this.pendingEncryptedEventIds.push(e.getId());this.pendingEncryptedEventIds.length>20;)this.pendingEncryptedEventIds.shift();else this.evaluateEvent(e)})),i()(this,"onEventDecrypted",(e=>{if(e.isDecryptionFailure())return;const t=this.pendingEncryptedEventIds.indexOf(e.getId());-1!==t&&(this.pendingEncryptedEventIds.splice(t,1),this.evaluateEvent(e))})),i()(this,"onRoomReceipt",((e,t)=>{if(0===t.getUnreadNotificationCount()){const e=g.a.get();if(!e)return;if(void 0===this.notifsByRoom[t.roomId])return;for(const n of this.notifsByRoom[t.roomId])e.clearNotification(n);delete this.notifsByRoom[t.roomId]}}))}notificationMessageForEvent(e){return L.hasOwnProperty(e.getContent().msgtype)?L[e.getContent().msgtype](e):f.b(e)}displayPopupNotification(e,t){const n=g.a.get(),r=h.a.get();if(!n)return;if(!n.supportsNotifications()||!n.maySendNotifications())return;if(Object(I.e)(r))return;let i,o=this.notificationMessageForEvent(e);if(!o)return;e.sender&&t.name!==e.sender.name?"m.room.member"===e.getType()?i=t.name:e.sender&&(i=e.sender.name+" ("+t.name+")",e.getContent().body&&!L.hasOwnProperty(e.getContent().msgtype)&&(o=e.getContent().body)):(i=t.name,e.getContent().body&&!L.hasOwnProperty(e.getContent().msgtype)&&(o=e.getContent().body)),this.isBodyEnabled()||(o="");let a=null;e.sender&&!E.b.getValue("lowBandwidth")&&(a=_.a(e.sender,40,40,"crop"));const s=n.displayNotification(i,o,a,t,e);s&&(void 0===this.notifsByRoom[e.getRoomId()]&&(this.notifsByRoom[e.getRoomId()]=[]),this.notifsByRoom[e.getRoomId()].push(s))}getSoundForRoom(e){const t=E.b.getValue("notificationSound",e);return t?"string"!=typeof t.url?(l.a.warn(`${e} has custom notification sound event, but no url string`),null):t.url.startsWith("mxc://")?{url:Object(x.b)(t.url).srcHttp,name:t.name,type:t.type,size:t.size}:(l.a.warn(`${e} has custom notification sound event, but url is not a mxc url`),null):null}async playAudioNotification(e,t){const n=h.a.get();if(Object(I.e)(n))return;const r=this.getSoundForRoom(t.roomId);l.a.log(`Got sound ${r&&r.name||"default"} for ${t.roomId}`);try{let e=document.querySelector(r?`audio[src='${r.url}']`:"#messageAudio");if(!e){if(!r)return void l.a.error("No audio element or sound to play for notification");e=new Audio(r.url),r.type&&(e.type=r.type),document.body.appendChild(e)}await e.play()}catch(e){l.a.warn("Caught error when trying to fetch room notification sound:",e)}}start(){h.a.get().on(a.d.Timeline,this.onEvent),h.a.get().on(a.d.Receipt,this.onRoomReceipt),h.a.get().on(o.c.Decrypted,this.onEventDecrypted),h.a.get().on(s.b.Sync,this.onSyncStateChange),this.toolbarHidden=!1,this.isSyncing=!1}stop(){h.a.get()&&(h.a.get().removeListener(a.d.Timeline,this.onEvent),h.a.get().removeListener(a.d.Receipt,this.onRoomReceipt),h.a.get().removeListener(o.c.Decrypted,this.onEventDecrypted),h.a.get().removeListener(s.b.Sync,this.onSyncStateChange)),this.isSyncing=!1}supportsDesktopNotifications(){var e,t;return null!==(e=null===(t=g.a.get())||void 0===t?void 0:t.supportsNotifications())&&void 0!==e&&e}setEnabled(e,t){const n=g.a.get();n&&(E.b.isLevelSupported(w.a.DEVICE)&&E.b.setValue("audioNotificationsEnabled",null,w.a.DEVICE,this.isEnabled()),e?n.requestNotificationPermission().then((e=>{if("granted"===e)t&&t(),p.a.instance.trackEvent({eventName:"PermissionChanged",permission:"Notification",granted:!0}),b.a.dispatch({action:"notifier_enabled",value:!0});else{const t=m.b.get().brand,n="denied"===e?Object(v.a)("%(brand)s does not have permission to send you notifications - please check your browser settings",{brand:t}):Object(v.a)("%(brand)s was not given permission to send notifications - please try again",{brand:t});y.b.createDialog(F.a,{title:Object(v.a)("Unable to enable Notifications"),description:n})}})):(p.a.instance.trackEvent({eventName:"PermissionChanged",permission:"Notification",granted:!1}),b.a.dispatch({action:"notifier_enabled",value:!1})),this.setPromptHidden(!0))}isEnabled(){return this.isPossible()&&E.b.getValue("notificationsEnabled")}isPossible(){const e=g.a.get();return!(null==e||!e.supportsNotifications())&&!!e.maySendNotifications()}isBodyEnabled(){return this.isEnabled()&&E.b.getValue("notificationBodyEnabled")}isAudioEnabled(){return E.b.getValue("audioNotificationsEnabled")}setPromptHidden(t){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.toolbarHidden=t,Object(S.a)(),n&&e.localStorage&&e.localStorage.setItem("notifications_hidden",String(t))}shouldShowPrompt(){const e=h.a.get();if(!e)return!1;return!e.isGuest()&&this.supportsDesktopNotifications()&&!Object(T.c)()&&!this.isEnabled()&&!this.isPromptHidden()}isPromptHidden(){return e.localStorage?"true"===e.localStorage.getItem("notifications_hidden"):!!this.toolbarHidden}evaluateEvent(e){if(e.getType()===M.g)return;let t=e.getRoomId();if(D.b.instance.getSupportsVirtualRooms()){const e=k.a.sharedInstance().nativeRoomForVirtualRoom(t);e&&(t=e)}const n=h.a.get().getRoom(t);if(!n)return;const r=h.a.get().getPushActionsForEvent(e);if(null!=r&&r.notify){this.performCustomEventHandling(e);const t=O.b.instance.roomViewStore,o=t.getRoomId()===n.roomId,a=e.getId()!==e.threadRootId?e.threadRootId:void 0,s=t.getThreadId()===a;if(o&&(!a||s)&&C.a.sharedInstance().userActiveRecently()&&!y.b.hasDialogs())return;var i;if(this.isEnabled()&&this.displayPopupNotification(e,n),r.tweaks.sound&&this.isAudioEnabled())null===(i=g.a.get())||void 0===i||i.loudNotification(e,n),this.playAudioNotification(e,n)}}performCustomEventHandling(e){N.d.CALL_EVENT_TYPE.names.includes(e.getType())&&E.b.getValue("feature_group_calls")&&R.a.sharedInstance().addOrReplaceToast({key:Object(A.b)(e.getStateKey()),priority:100,component:A.a,bodyClassName:"mx_IncomingCallToast",props:{callEvent:e}})}}window.mxNotifier||(window.mxNotifier=new B),t.default=window.mxNotifier;const U=window.mxNotifier}.call(this,n(14))},function(e,t,n){"use strict";var r,i,o;Object.defineProperty(t,"__esModule",{value:!0}),t.hasUnescapedText=t.isNumberedHeader=t.SPECIAL_ELEMENTS=t.getTagID=t.TAG_ID=t.TAG_NAMES=t.DOCUMENT_MODE=t.ATTRS=t.NS=void 0,function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"}(r=t.NS||(t.NS={})),function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"}(t.ATTRS||(t.ATTRS={})),function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"}(t.DOCUMENT_MODE||(t.DOCUMENT_MODE={})),function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"}(i=t.TAG_NAMES||(t.TAG_NAMES={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SECTION=94]="SECTION",e[e.SELECT=95]="SELECT",e[e.SOURCE=96]="SOURCE",e[e.SMALL=97]="SMALL",e[e.SPAN=98]="SPAN",e[e.STRIKE=99]="STRIKE",e[e.STRONG=100]="STRONG",e[e.STYLE=101]="STYLE",e[e.SUB=102]="SUB",e[e.SUMMARY=103]="SUMMARY",e[e.SUP=104]="SUP",e[e.TABLE=105]="TABLE",e[e.TBODY=106]="TBODY",e[e.TEMPLATE=107]="TEMPLATE",e[e.TEXTAREA=108]="TEXTAREA",e[e.TFOOT=109]="TFOOT",e[e.TD=110]="TD",e[e.TH=111]="TH",e[e.THEAD=112]="THEAD",e[e.TITLE=113]="TITLE",e[e.TR=114]="TR",e[e.TRACK=115]="TRACK",e[e.TT=116]="TT",e[e.U=117]="U",e[e.UL=118]="UL",e[e.SVG=119]="SVG",e[e.VAR=120]="VAR",e[e.WBR=121]="WBR",e[e.XMP=122]="XMP"}(o=t.TAG_ID||(t.TAG_ID={}));const a=new Map([[i.A,o.A],[i.ADDRESS,o.ADDRESS],[i.ANNOTATION_XML,o.ANNOTATION_XML],[i.APPLET,o.APPLET],[i.AREA,o.AREA],[i.ARTICLE,o.ARTICLE],[i.ASIDE,o.ASIDE],[i.B,o.B],[i.BASE,o.BASE],[i.BASEFONT,o.BASEFONT],[i.BGSOUND,o.BGSOUND],[i.BIG,o.BIG],[i.BLOCKQUOTE,o.BLOCKQUOTE],[i.BODY,o.BODY],[i.BR,o.BR],[i.BUTTON,o.BUTTON],[i.CAPTION,o.CAPTION],[i.CENTER,o.CENTER],[i.CODE,o.CODE],[i.COL,o.COL],[i.COLGROUP,o.COLGROUP],[i.DD,o.DD],[i.DESC,o.DESC],[i.DETAILS,o.DETAILS],[i.DIALOG,o.DIALOG],[i.DIR,o.DIR],[i.DIV,o.DIV],[i.DL,o.DL],[i.DT,o.DT],[i.EM,o.EM],[i.EMBED,o.EMBED],[i.FIELDSET,o.FIELDSET],[i.FIGCAPTION,o.FIGCAPTION],[i.FIGURE,o.FIGURE],[i.FONT,o.FONT],[i.FOOTER,o.FOOTER],[i.FOREIGN_OBJECT,o.FOREIGN_OBJECT],[i.FORM,o.FORM],[i.FRAME,o.FRAME],[i.FRAMESET,o.FRAMESET],[i.H1,o.H1],[i.H2,o.H2],[i.H3,o.H3],[i.H4,o.H4],[i.H5,o.H5],[i.H6,o.H6],[i.HEAD,o.HEAD],[i.HEADER,o.HEADER],[i.HGROUP,o.HGROUP],[i.HR,o.HR],[i.HTML,o.HTML],[i.I,o.I],[i.IMG,o.IMG],[i.IMAGE,o.IMAGE],[i.INPUT,o.INPUT],[i.IFRAME,o.IFRAME],[i.KEYGEN,o.KEYGEN],[i.LABEL,o.LABEL],[i.LI,o.LI],[i.LINK,o.LINK],[i.LISTING,o.LISTING],[i.MAIN,o.MAIN],[i.MALIGNMARK,o.MALIGNMARK],[i.MARQUEE,o.MARQUEE],[i.MATH,o.MATH],[i.MENU,o.MENU],[i.META,o.META],[i.MGLYPH,o.MGLYPH],[i.MI,o.MI],[i.MO,o.MO],[i.MN,o.MN],[i.MS,o.MS],[i.MTEXT,o.MTEXT],[i.NAV,o.NAV],[i.NOBR,o.NOBR],[i.NOFRAMES,o.NOFRAMES],[i.NOEMBED,o.NOEMBED],[i.NOSCRIPT,o.NOSCRIPT],[i.OBJECT,o.OBJECT],[i.OL,o.OL],[i.OPTGROUP,o.OPTGROUP],[i.OPTION,o.OPTION],[i.P,o.P],[i.PARAM,o.PARAM],[i.PLAINTEXT,o.PLAINTEXT],[i.PRE,o.PRE],[i.RB,o.RB],[i.RP,o.RP],[i.RT,o.RT],[i.RTC,o.RTC],[i.RUBY,o.RUBY],[i.S,o.S],[i.SCRIPT,o.SCRIPT],[i.SECTION,o.SECTION],[i.SELECT,o.SELECT],[i.SOURCE,o.SOURCE],[i.SMALL,o.SMALL],[i.SPAN,o.SPAN],[i.STRIKE,o.STRIKE],[i.STRONG,o.STRONG],[i.STYLE,o.STYLE],[i.SUB,o.SUB],[i.SUMMARY,o.SUMMARY],[i.SUP,o.SUP],[i.TABLE,o.TABLE],[i.TBODY,o.TBODY],[i.TEMPLATE,o.TEMPLATE],[i.TEXTAREA,o.TEXTAREA],[i.TFOOT,o.TFOOT],[i.TD,o.TD],[i.TH,o.TH],[i.THEAD,o.THEAD],[i.TITLE,o.TITLE],[i.TR,o.TR],[i.TRACK,o.TRACK],[i.TT,o.TT],[i.U,o.U],[i.UL,o.UL],[i.SVG,o.SVG],[i.VAR,o.VAR],[i.WBR,o.WBR],[i.XMP,o.XMP]]);t.getTagID=function(e){var t;return null!==(t=a.get(e))&&void 0!==t?t:o.UNKNOWN};const s=o;t.SPECIAL_ELEMENTS={[r.HTML]:new Set([s.ADDRESS,s.APPLET,s.AREA,s.ARTICLE,s.ASIDE,s.BASE,s.BASEFONT,s.BGSOUND,s.BLOCKQUOTE,s.BODY,s.BR,s.BUTTON,s.CAPTION,s.CENTER,s.COL,s.COLGROUP,s.DD,s.DETAILS,s.DIR,s.DIV,s.DL,s.DT,s.EMBED,s.FIELDSET,s.FIGCAPTION,s.FIGURE,s.FOOTER,s.FORM,s.FRAME,s.FRAMESET,s.H1,s.H2,s.H3,s.H4,s.H5,s.H6,s.HEAD,s.HEADER,s.HGROUP,s.HR,s.HTML,s.IFRAME,s.IMG,s.INPUT,s.LI,s.LINK,s.LISTING,s.MAIN,s.MARQUEE,s.MENU,s.META,s.NAV,s.NOEMBED,s.NOFRAMES,s.NOSCRIPT,s.OBJECT,s.OL,s.P,s.PARAM,s.PLAINTEXT,s.PRE,s.SCRIPT,s.SECTION,s.SELECT,s.SOURCE,s.STYLE,s.SUMMARY,s.TABLE,s.TBODY,s.TD,s.TEMPLATE,s.TEXTAREA,s.TFOOT,s.TH,s.THEAD,s.TITLE,s.TR,s.TRACK,s.UL,s.WBR,s.XMP]),[r.MATHML]:new Set([s.MI,s.MO,s.MN,s.MS,s.MTEXT,s.ANNOTATION_XML]),[r.SVG]:new Set([s.TITLE,s.FOREIGN_OBJECT,s.DESC]),[r.XLINK]:new Set,[r.XML]:new Set,[r.XMLNS]:new Set},t.isNumberedHeader=function(e){return e===s.H1||e===s.H2||e===s.H3||e===s.H4||e===s.H5||e===s.H6};const l=new Set([i.STYLE,i.SCRIPT,i.XMP,i.IFRAME,i.NOEMBED,i.NOFRAMES,i.PLAINTEXT]);t.hasUnescapedText=function(e,t){return l.has(e)||t&&e===i.NOSCRIPT}},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(131),l=n(127),c=n(121),u=n(384),d=n(123),h=n(155),p=n(135),m=n(139),g=n(134),f=n(145),_=n(576),b=n(124),v=n(128);class y extends a.a.Component{constructor(e){super(e),i()(this,"unmounted",void 0),i()(this,"onCancel",(()=>{this.props.onFinished(!1)})),i()(this,"onSubmit",(()=>{if(!(this.state.text&&this.state.text.trim()||this.state.issueUrl&&this.state.issueUrl.trim()))return void this.setState({err:Object(c.a)("Please tell us what went wrong or, better, create a GitHub issue that describes the problem.")});const e=(this.state.text.length>0?this.state.text+"\n\n":"")+"Issue: "+(this.state.issueUrl.length>0?this.state.issueUrl:"No issue link given");this.setState({busy:!0,progress:null,err:null}),this.sendProgressCallback(Object(c.a)("Preparing to send logs")),Object(u.a)(s.b.get().bug_report_endpoint_url,{userText:e,sendLogs:!0,progressCallback:this.sendProgressCallback,labels:this.props.label?[this.props.label]:[]}).then((()=>{this.unmounted||(this.props.onFinished(!1),l.b.createDialog(h.a,{title:Object(c.a)("Logs sent"),description:Object(c.a)("Thank you!"),hasCancelButton:!1}))}),(e=>{this.unmounted||this.setState({busy:!1,progress:null,err:Object(c.a)("Failed to send logs: ")+`${e.message}`})})),Object(_.b)(this.state.text,this.state.issueUrl,this.props.error)})),i()(this,"onDownload",(async()=>{this.setState({downloadBusy:!0}),this.downloadProgressCallback(Object(c.a)("Preparing to download logs"));try{await Object(u.b)({sendLogs:!0,progressCallback:this.downloadProgressCallback,labels:this.props.label?[this.props.label]:[]}),this.setState({downloadBusy:!1,downloadProgress:null})}catch(e){this.unmounted||this.setState({downloadBusy:!1,downloadProgress:Object(c.a)("Failed to send logs: ")+`${e.message}`})}})),i()(this,"onTextChange",(e=>{this.setState({text:e.currentTarget.value})})),i()(this,"onIssueUrlChange",(e=>{this.setState({issueUrl:e.currentTarget.value})})),i()(this,"sendProgressCallback",(e=>{this.unmounted||this.setState({progress:e})})),i()(this,"downloadProgressCallback",(e=>{this.unmounted||this.setState({downloadProgress:e})})),this.state={sendLogs:!0,busy:!1,err:null,issueUrl:"",text:e.initialText||"",progress:null,downloadBusy:!1,downloadProgress:null},this.unmounted=!1,b.a.dispatch({action:v.a.DumpDebugLogs})}componentWillUnmount(){this.unmounted=!0}render(){let e=null;this.state.err&&(e=a.a.createElement("div",{className:"error"},this.state.err));let t,n=null;return this.state.busy&&(n=a.a.createElement("div",{className:"progress"},a.a.createElement(g.a,null),this.state.progress," ...")),window.Modernizr&&Object.values(window.Modernizr).some((e=>!1===e))&&(t=a.a.createElement("p",null,a.a.createElement("b",null,Object(c.a)("Reminder: Your browser is unsupported, so your experience may be unpredictable.")))),a.a.createElement(p.a,{className:"mx_BugReportDialog",onFinished:this.onCancel,title:Object(c.a)("Submit debug logs"),contentId:"mx_Dialog_content"},a.a.createElement("div",{className:"mx_Dialog_content",id:"mx_Dialog_content"},t,a.a.createElement("p",null,Object(c.a)("Debug logs contain application usage data including your username, the IDs or aliases of the rooms you have visited, which UI elements you last interacted with, and the usernames of other users. They do not contain messages.")),a.a.createElement("p",null,a.a.createElement("b",null,Object(c.a)("Before submitting logs, you must <a>create a GitHub issue</a> to describe your problem.",{},{a:e=>a.a.createElement("a",{target:"_blank",href:"https://github.com/vector-im/element-web/issues/new/choose"},e)}))),a.a.createElement("div",{className:"mx_BugReportDialog_download"},a.a.createElement(d.a,{onClick:this.onDownload,kind:"link",disabled:this.state.downloadBusy},Object(c.a)("Download logs")),this.state.downloadProgress&&a.a.createElement("span",null,this.state.downloadProgress," ...")),a.a.createElement(m.a,{type:"text",className:"mx_BugReportDialog_field_input",label:Object(c.a)("GitHub issue"),onChange:this.onIssueUrlChange,value:this.state.issueUrl,placeholder:"https://github.com/vector-im/element-web/issues/..."}),a.a.createElement(m.a,{className:"mx_BugReportDialog_field_input",element:"textarea",label:Object(c.a)("Notes"),rows:5,onChange:this.onTextChange,value:this.state.text,placeholder:Object(c.a)("If there is additional context that would help in analysing the issue, such as what you were doing at the time, room IDs, user IDs, etc., please include those things here.")}),n,e),a.a.createElement(f.a,{primaryButton:Object(c.a)("Send logs"),onPrimaryButtonClick:this.onSubmit,focus:!0,onCancel:this.onCancel,disabled:this.state.busy}))}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(218),i=n(163),o=i.GLOBAL_OBJ;let a=0;function s(){a++,setTimeout((()=>{a--}))}t.WINDOW=o,t.ignoreNextOnError=s,t.shouldIgnoreOnError=function(){return a>0},t.wrap=function e(t,n={},o){if("function"!=typeof t)return t;try{const e=t.__sentry_wrapped__;if(e)return e;if(i.getOriginalFunction(t))return t}catch(e){return t}const a=function(){const a=Array.prototype.slice.call(arguments);try{o&&"function"==typeof o&&o.apply(this,arguments);const r=a.map((t=>e(t,n)));return t.apply(this,r)}catch(e){throw s(),r.withScope((t=>{t.addEventProcessor((e=>(n.mechanism&&(i.addExceptionTypeValue(e,void 0,void 0),i.addExceptionMechanism(e,n.mechanism)),e.extra={...e.extra,arguments:a},e))),r.captureException(e)})),e}};try{for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(a[e]=t[e])}catch(e){}i.markFunctionWrapped(a,t),i.addNonEnumerableProperty(t,"__sentry_wrapped__",a);try{Object.getOwnPropertyDescriptor(a,"name").configurable&&Object.defineProperty(a,"name",{get:()=>t.name})}catch(e){}return a}},function(e,t,n){"use strict";n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return c}));var r=n(13),i=n.n(r),o=n(158),a=n(197),s=n(125);let l;!function(e){e.Update="update"}(l||(l={}));class c extends o.b{constructor(){super(),i()(this,"_symbol",null),i()(this,"_count",0),i()(this,"_color",a.a.None),i()(this,"watcherReferences",[]),this.watcherReferences.push(s.b.watchSetting("feature_hidebold",null,(()=>{this.emit(l.Update)})))}get symbol(){return this._symbol}get count(){return this._count}get color(){return this._color}get isIdle(){return this.color<=a.a.None}get isUnread(){if(this.color>a.a.Bold)return!0;{const e=s.b.getValue("feature_hidebold");return this.color===a.a.Bold&&!e}}get hasUnreadCount(){return this.color>=a.a.Grey&&(!!this.count||!!this.symbol)}get hasMentions(){return this.color>=a.a.Red}emitIfUpdated(e){e.isDifferentFrom(this)&&this.emit(l.Update)}snapshot(){return new u(this)}destroy(){this.removeAllListeners(l.Update);for(const e of this.watcherReferences)s.b.unwatchSetting(e);this.watcherReferences=[]}}class u{constructor(e){i()(this,"symbol",void 0),i()(this,"count",void 0),i()(this,"color",void 0),this.symbol=e.symbol,this.count=e.count,this.color=e.color}isDifferentFrom(e){const t={count:this.count,symbol:this.symbol,color:this.color},n={count:e.count,symbol:e.symbol,color:e.color};return JSON.stringify(t)!==JSON.stringify(n)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(126),l=n.n(s),c=n(123),u=n(121),d=n(152),h=n(142),p=n(185);class m extends a.a.Component{constructor(){super(...arguments),i()(this,"onMouseEnter",(()=>{this.props.onMouseEnter(this.props.dropdownKey)})),i()(this,"onClick",(e=>{e.preventDefault(),e.stopPropagation(),this.props.onClick(this.props.dropdownKey)}))}render(){const e=l()({mx_Dropdown_option:!0,mx_Dropdown_option_highlight:this.props.highlighted});return a.a.createElement("div",{id:this.props.id,className:e,onClick:this.onClick,onMouseEnter:this.onMouseEnter,role:"option","aria-selected":this.props.highlighted,ref:this.props.inputRef},this.props.children)}}i()(m,"defaultProps",{disabled:!1});class g extends a.a.Component{constructor(e){super(e),i()(this,"buttonRef",Object(o.createRef)()),i()(this,"dropdownRootElement",null),i()(this,"ignoreEvent",null),i()(this,"childrenByKey",{}),i()(this,"onDocumentClick",(e=>{e!==this.ignoreEvent&&this.setState({expanded:!1})})),i()(this,"onRootClick",(e=>{this.ignoreEvent=e})),i()(this,"onAccessibleButtonClick",(e=>{if(this.props.disabled)return;const t=Object(d.a)().getAccessibilityAction(e);this.state.expanded?t===h.h.Enter?(this.props.onOptionChange(this.state.highlightedOption),this.close()):e.key||(this.setState({expanded:!1}),e.preventDefault()):(this.setState({expanded:!0}),e.preventDefault())})),i()(this,"onMenuOptionClick",(e=>{this.close(),this.props.onOptionChange(e)})),i()(this,"onKeyDown",(e=>{let t=!0;switch(Object(d.a)().getAccessibilityAction(e)){case h.h.Enter:this.props.onOptionChange(this.state.highlightedOption);case h.h.Escape:this.close();break;case h.h.ArrowDown:this.state.expanded?this.setState({highlightedOption:this.nextOption(this.state.highlightedOption)}):this.setState({expanded:!0});break;case h.h.ArrowUp:this.state.expanded?this.setState({highlightedOption:this.prevOption(this.state.highlightedOption)}):this.setState({expanded:!0});break;default:t=!1}t&&(e.preventDefault(),e.stopPropagation())})),i()(this,"onInputChange",(e=>{this.setState({searchQuery:e.currentTarget.value}),this.props.onSearchChange&&this.props.onSearchChange(e.currentTarget.value)})),i()(this,"collectRoot",(e=>{this.dropdownRootElement&&this.dropdownRootElement.removeEventListener("click",this.onRootClick,!1),e&&e.addEventListener("click",this.onRootClick,!1),this.dropdownRootElement=e})),i()(this,"setHighlightedOption",(e=>{this.setState({highlightedOption:e})})),this.reindexChildren(this.props.children);const t=a.a.Children.toArray(e.children)[0];this.state={expanded:!1,highlightedOption:t?t.key:null,searchQuery:""},document.addEventListener("click",this.onDocumentClick,!1)}componentDidUpdate(e){var t;if(Object(p.c)(this.props,e)&&null!==(t=this.props.children)&&void 0!==t&&t.length){var n;this.reindexChildren(this.props.children);const e=this.props.children[0];this.setState({highlightedOption:null!==(n=String(null==e?void 0:e.key))&&void 0!==n?n:null})}}componentWillUnmount(){document.removeEventListener("click",this.onDocumentClick,!1)}reindexChildren(e){this.childrenByKey={},a.a.Children.forEach(e,(e=>{this.childrenByKey[e.key]=e}))}close(){this.setState({expanded:!1}),this.buttonRef.current&&this.buttonRef.current.focus()}nextOption(e){const t=Object.keys(this.childrenByKey),n=t.indexOf(e);return t[(n+1)%t.length]}prevOption(e){const t=Object.keys(this.childrenByKey),n=t.indexOf(e);return t[n<=0?t.length-1:(n-1)%t.length]}scrollIntoView(e){e&&e.scrollIntoView({block:"nearest",behavior:"auto"})}getMenuOptions(){const e=a.a.Children.map(this.props.children,(e=>{const t=this.state.highlightedOption===e.key;return a.a.createElement(m,{id:`${this.props.id}__${e.key}`,key:e.key,dropdownKey:e.key,highlighted:t,onMouseEnter:this.setHighlightedOption,onClick:this.onMenuOptionClick,inputRef:t?this.scrollIntoView:void 0},e)}));return 0===e.length?[a.a.createElement("div",{key:"0",className:"mx_Dropdown_option",role:"option","aria-selected":!1},Object(u.a)("No results"))]:e}render(){let e;const t={};let n;if(this.props.menuWidth&&(t.width=this.props.menuWidth),this.state.expanded&&(this.props.searchEnabled&&(e=a.a.createElement("input",{id:`${this.props.id}_input`,type:"text",autoFocus:!0,className:"mx_Dropdown_option",onChange:this.onInputChange,value:this.state.searchQuery,role:"combobox","aria-autocomplete":"list","aria-activedescendant":`${this.props.id}__${this.state.highlightedOption}`,"aria-expanded":this.state.expanded,"aria-controls":`${this.props.id}_listbox`,"aria-disabled":this.props.disabled,"aria-label":this.props.label,onKeyDown:this.onKeyDown})),n=a.a.createElement("div",{className:"mx_Dropdown_menu",style:t,role:"listbox",id:`${this.props.id}_listbox`},this.getMenuOptions())),!e){const t=this.props.getShortOption?this.props.getShortOption(this.props.value):this.childrenByKey[this.props.value];e=a.a.createElement("div",{className:"mx_Dropdown_option",id:`${this.props.id}_value`},t||this.props.placeholder)}const r={mx_Dropdown:!0,mx_Dropdown_disabled:this.props.disabled};return this.props.className&&(r[this.props.className]=!0),a.a.createElement("div",{className:l()(r),ref:this.collectRoot},a.a.createElement(c.a,{className:"mx_Dropdown_input mx_no_textinput",onClick:this.onAccessibleButtonClick,"aria-haspopup":"listbox","aria-expanded":this.state.expanded,disabled:this.props.disabled,inputRef:this.buttonRef,"aria-label":this.props.label,"aria-describedby":`${this.props.id}_value`,"aria-owns":`${this.props.id}_input`,onKeyDown:this.onKeyDown},e,a.a.createElement("span",{className:"mx_Dropdown_arrow"}),n))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return d})),n.d(t,"f",(function(){return p})),n.d(t,"g",(function(){return m})),n.d(t,"d",(function(){return g})),n.d(t,"e",(function(){return f}));var r=n(120),i=n(203),o=n(141),a=n(306),s=n(131),l=n(121);const c=e=>{const[t,n]=Object(r.useState)((()=>a.a.instance.getCall(e)));return Object(o.a)(a.a.instance,a.b.Call,((t,r)=>{r===e&&n(t)})),t},u=(e,t)=>{const n=c(t);return(null==n?void 0:n.widget.id)===e?n:null},d=e=>Object(o.d)(e,i.b.ConnectionState,Object(r.useCallback)((t=>null!=t?t:e.connectionState),[e])),h=e=>Object(o.d)(e,i.b.Participants,Object(r.useCallback)((t=>null!=t?t:e.participants),[e])),p=e=>{const t=h(e);return Object(r.useMemo)((()=>{let e=0;for(const n of t.values())e+=n.size;return e}),[t])},m=e=>{const t=h(e);return Object(r.useMemo)((()=>{const e=[];for(const[n,r]of t)for(let t=0;t<r.size;t++)e.push(n);return e}),[t])},g=e=>{const t=(e=>{var t;return p(e)>=(null!==(t=s.b.get("element_call").participant_limit)&&void 0!==t?t:s.a.element_call.participant_limit)})(e);return d(e)===i.c.Connecting?Object(l.a)("Connecting"):t?Object(l.a)("Sorry — this call is currently full"):null},f=e=>Object(o.d)(e,i.b.Layout,Object(r.useCallback)((t=>null!=t?t:e.layout),[e]))},function(e,t,n){"use strict";var r=n(120),i=n.n(r),o=n(126),a=n.n(o);const s=Object(r.forwardRef)(((e,t)=>{let{className:n,title:r,timestamp:o,subtitle:s,children:l}=e;return i.a.createElement("div",{className:a()("mx_EventTileBubble",n),ref:t},i.a.createElement("div",{className:"mx_EventTileBubble_title"},r),s&&i.a.createElement("div",{className:"mx_EventTileBubble_subtitle"},s),l,o)}));t.a=s},,function(e,t,n){"use strict";n.d(t,"a",(function(){return M}));var r=n(13),i=n.n(r),o=n(255),a=n.n(o),s=n(1),l=n(147),c=n(16),u=n(131),d=n(127),h=n(271),p=n(125),m=n(498),g=n(122);class f{constructor(e,t){this.apiUrl=e,this.uiUrl=t,i()(this,"scalarToken",void 0),i()(this,"termsInteractionCallback",void 0),i()(this,"isDefaultManager",void 0),this.scalarToken=null,this.termsInteractionCallback=void 0;const n=u.b.get("integrations_rest_url"),r=u.b.get("integrations_ui_url");this.isDefaultManager=e===n&&r===t}writeTokenToStore(){window.localStorage.setItem("mx_scalar_token_at_"+this.apiUrl,this.scalarToken),this.isDefaultManager&&window.localStorage.removeItem("mx_scalar_token")}readTokenFromStore(){let e=window.localStorage.getItem("mx_scalar_token_at_"+this.apiUrl);return!e&&this.isDefaultManager&&(e=window.localStorage.getItem("mx_scalar_token")),e}readToken(){return this.scalarToken?this.scalarToken:this.readTokenFromStore()}setTermsInteractionCallback(e){this.termsInteractionCallback=e}connect(){return this.getScalarToken().then((e=>{this.scalarToken=e}))}hasCredentials(){return null!=this.scalarToken}getScalarToken(){const e=this.readToken();return e?this.checkToken(e).catch((e=>{if(e instanceof m.b)throw e;return this.registerForToken()})):this.registerForToken()}async getAccountName(e){const t=new URL(this.apiUrl+"/account");t.searchParams.set("scalar_token",e),t.searchParams.set("v","1.1");const n=await fetch(t,{method:"GET"}),r=await n.json();if("M_TERMS_NOT_SIGNED"===(null==r?void 0:r.errcode))throw new m.b;if(!n.ok)throw r;if(null==r||!r.user_id)throw new Error("Missing user_id in response");return r.user_id}checkToken(e){return this.getAccountName(e).then((t=>{const n=g.a.get().getUserId();if(t!==n)throw new Error("Scalar token is owned by someone else: "+n);return e})).catch((t=>{if(t instanceof m.b){s.a.log("Integration manager requires new terms to be agreed to");const t=a.a.parse(this.apiUrl);return t.path="",t.pathname="",Object(m.d)([new m.a(h.a.IM,a.a.format(t),e)],this.termsInteractionCallback).then((()=>e))}throw t}))}registerForToken(){return g.a.get().getOpenIdToken().then((e=>this.exchangeForScalarToken(e))).then((e=>this.checkToken(e))).then((e=>(this.scalarToken=e,this.writeTokenToStore(),e)))}async exchangeForScalarToken(e){const t=new URL(this.apiUrl+"/register");t.searchParams.set("v","1.1");const n=await fetch(t,{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}});if(!n.ok)throw new Error(`Scalar request failed: ${n.status}`);const r=await n.json();if(null==r||!r.scalar_token)throw new Error("Missing scalar_token in response");return r.scalar_token}async getScalarPageTitle(e){var t;const n=new URL(this.getStarterLink(this.apiUrl+"/widgets/title_lookup"));n.searchParams.set("curl",encodeURIComponent(e));const r=await fetch(n,{method:"GET"});if(!r.ok)throw new Error(`Scalar request failed: ${r.status}`);const i=await r.json();return null==i||null===(t=i.page_title_cache_item)||void 0===t?void 0:t.cached_title}async disableWidgetAssets(e,t){const n=new URL(this.getStarterLink(this.apiUrl+"/widgets/set_assets_state"));n.searchParams.set("widget_type",e.preferred),n.searchParams.set("widget_id",t),n.searchParams.set("state","disable");const r=await fetch(n,{method:"GET"});if(!r.ok)throw new Error(`Scalar request failed: ${r.status}`);if(!await r.text())throw new Error("Failed to set widget assets state")}getScalarInterfaceUrlForRoom(e,t,n){const r=e.roomId,i=e.name;let o=this.uiUrl;return o+="?scalar_token="+encodeURIComponent(this.scalarToken),o+="&room_id="+encodeURIComponent(r),o+="&room_name="+encodeURIComponent(i),o+="&theme="+encodeURIComponent(p.b.getValue("theme")),n&&(o+="&integ_id="+encodeURIComponent(n)),t&&(o+="&screen="+encodeURIComponent(t)),o}getStarterLink(e){return e+"?scalar_token="+encodeURIComponent(this.scalarToken)}}var _=n(120),b=n.n(_),v=n(121),y=n(124),E=n(134),S=n(152),w=n(142),T=n(175);class C extends b.a.Component{constructor(){super(...arguments),i()(this,"dispatcherRef",void 0),i()(this,"state",{errored:!1}),i()(this,"onKeyDown",(e=>{if(Object(S.a)().getAccessibilityAction(e)===w.h.Escape)e.stopPropagation(),e.preventDefault(),this.props.onFinished()})),i()(this,"onAction",(e=>{"close_scalar"===e.action&&this.props.onFinished()})),i()(this,"onError",(()=>{this.setState({errored:!0})}))}componentDidMount(){this.dispatcherRef=y.a.register(this.onAction),document.addEventListener("keydown",this.onKeyDown)}componentWillUnmount(){y.a.unregister(this.dispatcherRef),document.removeEventListener("keydown",this.onKeyDown)}render(){return this.props.loading?b.a.createElement("div",{className:"mx_IntegrationManager_loading"},b.a.createElement(T.a,{size:"h3"},Object(v.a)("Connecting to integration manager…")),b.a.createElement(E.a,null)):!this.props.connected||this.state.errored?b.a.createElement("div",{className:"mx_IntegrationManager_error"},b.a.createElement(T.a,{size:"h3"},Object(v.a)("Cannot connect to integration manager")),b.a.createElement("p",null,Object(v.a)("The integration manager is offline or it cannot reach your homeserver."))):b.a.createElement("iframe",{title:Object(v.a)("Integration manager"),src:this.props.url,onError:this.onError})}}let x;i()(C,"defaultProps",{connected:!0,loading:!1}),function(e){e.Account="account",e.Config="config",e.Homeserver="homeserver"}(x||(x={}));class F{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3?arguments[3]:void 0;this.kind=e,this.apiUrl=t,this.uiUrl=n,this.id=r}get name(){return a.a.parse(this.uiUrl).host}get trimmedApiUrl(){const e=a.a.parse(this.apiUrl);return e.pathname="",e.path="",a.a.format(e)}getScalarClient(){return new f(this.apiUrl,this.uiUrl)}async open(e,t,n){if(!p.b.getValue("integrationProvisioning"))return M.sharedInstance().showDisabledDialog();const r=d.b.createDialog(C,{loading:!0},"mx_IntegrationManager"),i=this.getScalarClient();i.setTermsInteractionCallback(((e,t)=>Object(m.c)(e,t,"mx_TermsDialog_forIntegrationManager")));const o={};try{await i.connect(),i.hasCredentials()?o.url=i.getScalarInterfaceUrlForRoom(e,t,n):o.connected=!1}catch(e){if(e instanceof m.b)return void r.close();s.a.error(e),o.connected=!1}r.close(),d.b.createDialog(C,o,"mx_IntegrationManager")}}var D=n(135),k=n(145);class O extends b.a.Component{constructor(){super(...arguments),i()(this,"onAcknowledgeClick",(()=>{this.props.onFinished()}))}render(){const e=u.b.get().brand;return b.a.createElement(D.a,{className:"mx_IntegrationsImpossibleDialog",hasCancel:!1,onFinished:this.props.onFinished,title:Object(v.a)("Integrations not allowed")},b.a.createElement("div",{className:"mx_IntegrationsImpossibleDialog_content"},b.a.createElement("p",null,Object(v.a)("Your %(brand)s doesn't allow you to use an integration manager to do this. Please contact an admin.",{brand:e}))),b.a.createElement(k.a,{primaryButton:Object(v.a)("OK"),onPrimaryButtonClick:this.onAcknowledgeClick,hasCancel:!1}))}}var I=n(128);class A extends b.a.Component{constructor(){super(...arguments),i()(this,"onAcknowledgeClick",(()=>{this.props.onFinished()})),i()(this,"onOpenSettingsClick",(()=>{this.props.onFinished(),y.a.fire(I.a.ViewUserSettings)}))}render(){return b.a.createElement(D.a,{className:"mx_IntegrationsDisabledDialog",hasCancel:!0,onFinished:this.props.onFinished,title:Object(v.a)("Integrations are disabled")},b.a.createElement("div",{className:"mx_IntegrationsDisabledDialog_content"},b.a.createElement("p",null,Object(v.a)("Enable '%(manageIntegrations)s' in Settings to do this.",{manageIntegrations:Object(v.a)("Manage integrations")}))),b.a.createElement(k.a,{primaryButton:Object(v.a)("Settings"),onPrimaryButtonClick:this.onOpenSettingsClick,cancelButton:Object(v.a)("OK"),onCancel:this.onAcknowledgeClick}))}}var R=n(181);const N=[x.Account,x.Homeserver,x.Config];class M{static sharedInstance(){return M.instance||(M.instance=new M),M.instance}constructor(){i()(this,"managers",[]),i()(this,"client",void 0),i()(this,"primaryManager",void 0),i()(this,"setupHomeserverManagers",(async e=>{if(s.a.log("Updating homeserver-configured integration managers..."),e&&e["m.integrations"]){let t=e["m.integrations"].managers;Array.isArray(t)||(t=[]),s.a.log(`Homeserver has ${t.length} integration managers`),this.managers=this.managers.filter((e=>e.kind!==x.Homeserver));for(const e of t)e.api_url&&this.managers.push(new F(x.Homeserver,e.api_url,e.ui_url));this.primaryManager=null}else s.a.log("Homeserver has no integration managers")})),i()(this,"onAccountData",(e=>{"m.widgets"===e.getType()&&this.compileManagers()})),this.compileManagers()}startWatching(){this.stopWatching(),this.client=g.a.get(),this.client.on(l.b.AccountData,this.onAccountData),this.client.on(l.b.ClientWellKnown,this.setupHomeserverManagers),this.compileManagers()}stopWatching(){this.client&&(this.client.removeListener(l.b.AccountData,this.onAccountData),this.client.removeListener(l.b.ClientWellKnown,this.setupHomeserverManagers))}compileManagers(){this.managers=[],this.setupConfiguredManager(),this.setupAccountManagers()}setupConfiguredManager(){const e=u.b.get("integrations_rest_url"),t=u.b.get("integrations_ui_url");e&&t&&(this.managers.push(new F(x.Config,e,t)),this.primaryManager=null)}setupAccountManagers(){if(!this.client||!this.client.getUserId())return;R.a.getIntegrationManagerWidgets().forEach((e=>{const t=e.content.data;if(!t)return;const n=e.content.url,r=t.api_url;if(!r||!n)return;const i=new F(x.Account,r,n,e.id||e.state_key||"");this.managers.push(i)})),this.primaryManager=null}hasManager(){return this.managers.length>0}getOrderedManagers(){const e=[];for(const t of N){const n=this.managers.filter((e=>e.kind===t));n&&n.length&&(t===x.Account&&n.sort(((e,t)=>Object(c.h)(e.id,t.id))),e.push(...n))}return e}getPrimaryManager(){return this.hasManager()?(this.primaryManager||(this.primaryManager=this.getOrderedManagers()[0]),this.primaryManager):null}openNoManagerDialog(){d.b.createDialog(O)}showDisabledDialog(){d.b.createDialog(A)}async overwriteManagerOnAccount(e){await R.a.removeIntegrationManagerWidgets(),await R.a.addIntegrationManagerWidget(e.name,e.uiUrl,e.apiUrl)}async tryDiscoverManager(e){let t;s.a.log("Looking up integration manager via .well-known"),(e.startsWith("http:")||e.startsWith("https:"))&&(e=a.a.parse(e).host);try{const n=await fetch(`https://${e}/.well-known/matrix/integrations`);t=await n.json()}catch(e){return s.a.error(e),s.a.warn("Failed to locate integration manager"),null}if(!t||!t["m.integrations_widget"])return s.a.warn("Missing integrations widget on .well-known response"),null;const n=t["m.integrations_widget"];if(!n.url||!n.data||!n.data.api_url)return s.a.warn("Malformed .well-known response for integrations widget"),null;const r=new F(x.Account,n.data.api_url,n.url);return s.a.log("Got an integration manager (untested)"),r}}i()(M,"instance",void 0),window.mxIntegrationManagers=M},function(e,t,n){"use strict";n.d(t,"b",(function(){return $})),n.d(t,"a",(function(){return K}));var r=n(13),i=n.n(r),o=n(129),a=n(698),s=n.n(a),l=n(1343),c=n.n(l),u=n(1),d=n(170),h=n(16),p=n(124),m=n(121),g=n(127),f=n(134),_=n(128);class b{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;this.roomId=e,this.fileName=t,this.relation=n,this.fileSize=r,i()(this,"abortController",new AbortController),i()(this,"promise",void 0),i()(this,"uploaded",0)}onProgress(e){this.uploaded=e.loaded,this.fileSize=e.total}abort(){this.abortController.abort()}get cancelled(){return this.abortController.signal.aborted}get total(){return this.fileSize}get loaded(){return this.uploaded}}var v=n(125),y=n(452),E=n(138),S=n(227),w=n(144),T=n(378),C=n(120),x=n.n(C),F=n(135),D=n(145);class k extends x.a.Component{constructor(){super(...arguments),i()(this,"onCancelClick",(()=>{this.props.onFinished(!1)})),i()(this,"onUploadClick",(()=>{this.props.onFinished(!0)}))}render(){let e,t;if(1===this.props.totalFiles&&1===this.props.badFiles.length)e=Object(m.a)("This file is <b>too large</b> to upload. The file size limit is %(limit)s but this file is %(sizeOfThisFile)s.",{limit:Object(T.filesize)(this.props.contentMessages.getUploadLimit()),sizeOfThisFile:Object(T.filesize)(this.props.badFiles[0].size)},{b:e=>x.a.createElement("b",null,e)}),t=x.a.createElement(D.a,{primaryButton:Object(m.a)("OK"),hasCancel:!1,onPrimaryButtonClick:this.onCancelClick,focus:!0});else if(this.props.totalFiles===this.props.badFiles.length)e=Object(m.a)("These files are <b>too large</b> to upload. The file size limit is %(limit)s.",{limit:Object(T.filesize)(this.props.contentMessages.getUploadLimit())},{b:e=>x.a.createElement("b",null,e)}),t=x.a.createElement(D.a,{primaryButton:Object(m.a)("OK"),hasCancel:!1,onPrimaryButtonClick:this.onCancelClick,focus:!0});else{e=Object(m.a)("Some files are <b>too large</b> to be uploaded. The file size limit is %(limit)s.",{limit:Object(T.filesize)(this.props.contentMessages.getUploadLimit())},{b:e=>x.a.createElement("b",null,e)});const n=this.props.totalFiles-this.props.badFiles.length;t=x.a.createElement(D.a,{primaryButton:Object(m.a)("Upload %(count)s other files",{count:n}),onPrimaryButtonClick:this.onUploadClick,hasCancel:!0,cancelButton:Object(m.a)("Cancel All"),onCancel:this.onCancelClick,focus:!0})}return x.a.createElement(F.a,{className:"mx_UploadFailureDialog",onFinished:this.onCancelClick,title:Object(m.a)("Upload Error"),contentId:"mx_Dialog_content"},x.a.createElement("div",{id:"mx_Dialog_content"},e,undefined),t)}}var O=n(934),I=n(495),A=n(568),R=n(270),N=n(154);function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const L=[0,0,22,37,0,0,22,37,1];class B extends Error{}const U=32768,j=65536,G=.1,z=["image/avif","image/webp"];async function H(e,t,n){let r="image/png";"image/jpeg"===n.type&&(r="image/jpeg");const i=await async function(e){const t=new Image,n=URL.createObjectURL(e),r=new Promise(((e,r)=>{t.onload=function(){URL.revokeObjectURL(n),e(t)},t.onerror=function(e){r(e)}}));t.src=n;let i=Promise.resolve(!1);"image/png"===e.type&&(i=V(e).then((e=>{const t=new Uint8Array(e),n=c()(t);for(const e of n)if("pHYs"===e.name)return e.data.byteLength===L.length&&e.data.every(((e,t)=>e===L[t]));return!1})));const[o]=await Promise.all([i,r]);return{width:o?t.width>>1:t.width,height:o?t.height>>1:t.height,img:t}}(n),o=await Object(I.b)(i.img,i.width,i.height,r),a=o.info;if(!z.includes(n.type)){const e=n.size-a.thumbnail_info.size;if(n.size<=U||e<=j&&e<=n.size*G)return delete a.thumbnail_info,a}const s=await $(e,t,o.thumbnail);return a.thumbnail_url=s.url,a.thumbnail_file=s.file,a}function q(e,t,n){let r;return function(e){return new Promise(((t,n)=>{const r=document.createElement("video");r.preload="metadata",r.playsInline=!0,r.muted=!0;const i=new FileReader;i.onload=function(e){var i,o;r.onloadeddata=async function(){t(r),r.pause()},r.onerror=function(e){n(e)};let a=null===(i=e.target)||void 0===i?void 0:i.result;null!==(o=a)&&void 0!==o&&o.startsWith("data:video/quicktime;")&&(a=a.replace("data:video/quicktime;","data:video/mp4;")),r.src=a,r.load(),r.play()},i.onerror=function(e){n(e)},i.readAsDataURL(e)}))}(n).then((e=>Object(I.b)(e,e.videoWidth,e.videoHeight,"image/jpeg"))).then((n=>(r=n.info,$(e,t,n.thumbnail)))).then((e=>(r.thumbnail_url=e.url,r.thumbnail_file=e.file,r)))}function V(e){return new Promise(((t,n)=>{const r=new FileReader;r.onload=function(e){var n;t(null===(n=e.target)||void 0===n?void 0:n.result)},r.onerror=function(e){n(e)},r.readAsArrayBuffer(e)}))}async function $(e,t,n,r,i){const o=null!=i?i:new AbortController;if(e.isRoomEncrypted(t)){const t=await V(n);if(o.signal.aborted)throw new B;const i=await s.a.encryptAttachment(t);if(o.signal.aborted)throw new B;const a=new Blob([i.data]),{content_uri:l}=await e.uploadContent(a,{progressHandler:r,abortController:o,includeFilename:!1,type:"application/octet-stream"});if(o.signal.aborted)throw new B;return{file:P(P({},i.info),{},{url:l})}}{const{content_uri:t}=await e.uploadContent(n,{progressHandler:r,abortController:o});if(o.signal.aborted)throw new B;return{url:t}}}class K{constructor(){i()(this,"inprogress",[]),i()(this,"mediaConfig",null)}sendStickerContentToRoom(e,t,n,r,i,o){return Object(R.a)(t,(t=>o.sendStickerMessage(t,n,e,r,i)),o).catch((n=>{throw u.a.warn(`Failed to send content with URL ${e} to room ${t}`,n),n}))}getUploadLimit(){return null!==this.mediaConfig&&void 0!==this.mediaConfig["m.upload.size"]?this.mediaConfig["m.upload.size"]:null}async sendContentListToRoom(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:E.a.Room;if(r.isGuest())return void p.a.dispatch({action:"require_registration"});const o=N.b.instance.roomViewStore.getQuotingEvent();if(!this.mediaConfig){const e=g.b.createDialog(f.a,void 0,"mx_Dialog_spinner");await this.ensureMediaConfigFetched(r),e.close()}const a=[],s=[];for(const t of e)this.isFileSizeAcceptable(t)?s.push(t):a.push(t);if(a.length>0){const{finished:t}=g.b.createDialog(k,{badFiles:a,totalFiles:e.length,contentMessages:this}),[n]=await t;if(!n)return}let l=!1,c=Promise.resolve();for(let e=0;e<s.length;++e){const i=s[e],a=c;if(!l){const{finished:t}=g.b.createDialog(O.a,{file:i,currentIndex:e,totalFiles:s.length}),[n,r]=await t;if(!n)break;r&&(l=!0)}c=Object(R.a)(t,(e=>this.sendContentToRoom(i,e,n,r,null!=o?o:void 0,a)))}o&&p.a.dispatch({action:"reply_to_event",event:null,context:i}),p.a.dispatch({action:_.a.FocusSendMessageComposer,context:i})}getCurrentUploads(e){return this.inprogress.filter((t=>{const n=!e&&!t.relation,r=e&&t.relation&&e.rel_type===t.relation.rel_type&&e.event_id===t.relation.event_id;return(n||r)&&!t.cancelled}))}cancelUpload(e){e.abort(),p.a.dispatch({action:_.a.UploadCanceled,upload:e})}async sendContentToRoom(e,t,n,r,i,a){const s=e.name||Object(m.a)("Attachment"),l={body:s,info:{size:e.size},msgtype:o.e.File};Object(A.a)(l,n),i&&Object(S.a)(l,i,{includeLegacyFallback:!1}),v.b.getValue("Performance.addSendMessageTimingMetadata")&&Object(y.a)(l),e.type&&(l.info.mimetype=e.type);const c=new b(t,s,n,e.size);this.inprogress.push(c),p.a.dispatch({action:_.a.UploadStarted,upload:c});try{if(e.type.startsWith("image/")){l.msgtype=o.e.Image;try{const n=await H(r,t,e);Object.assign(l.info,n)}catch(e){u.a.error(e),l.msgtype=o.e.File}}else if(0===e.type.indexOf("audio/"))l.msgtype=o.e.Audio;else if(0===e.type.indexOf("video/")){l.msgtype=o.e.Video;try{const n=await q(r,t,e);Object.assign(l.info,n)}catch(e){u.a.error(e),l.msgtype=o.e.File}}else l.msgtype=o.e.File;if(c.cancelled)throw new B;const i=await $(r,t,e,(function(e){c.onProgress(e),p.a.dispatch({action:_.a.UploadProgress,upload:c})}),c.abortController);if(l.file=i.file,l.url=i.url,c.cancelled)throw new B;if(a&&await a,c.cancelled)throw new B;const s=(null==n?void 0:n.rel_type)===d.d.name?n.event_id:null,h=await r.sendMessage(t,null!=s?s:null,l);v.b.getValue("Performance.addSendMessageTimingMetadata")&&Object(y.b)(r,t,h.event_id),p.a.dispatch({action:_.a.UploadFinished,upload:c}),p.a.dispatch({action:"message_sent"})}catch(e){if(413===(null==e?void 0:e.httpStatus)&&(this.mediaConfig=null),!c.cancelled){let t=Object(m.a)("The file '%(fileName)s' failed to upload.",{fileName:c.fileName});413===e.httpStatus&&(t=Object(m.a)("The file '%(fileName)s' exceeds this homeserver's size limit for uploads",{fileName:c.fileName})),g.b.createDialog(w.a,{title:Object(m.a)("Upload Failed"),description:t}),p.a.dispatch({action:_.a.UploadFailed,upload:c,error:e})}}finally{Object(h.I)(this.inprogress,(e=>e.promise===c.promise))}}isFileSizeAcceptable(e){return!(null!==this.mediaConfig&&void 0!==this.mediaConfig["m.upload.size"]&&e.size>this.mediaConfig["m.upload.size"])}ensureMediaConfigFetched(e){return null!==this.mediaConfig?Promise.resolve():(u.a.log("[Media Config] Fetching"),e.getMediaConfig().then((e=>(u.a.log("[Media Config] Fetched config:",e),e))).catch((()=>(u.a.log("[Media Config] Could not fetch config, so not limiting uploads."),{}))).then((e=>{this.mediaConfig=e})))}static sharedInstance(){return void 0===window.mxContentMessages&&(window.mxContentMessages=new K),window.mxContentMessages}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return c}));var r=n(129),i=n(122);var o={};function a(e){return s(e.getCanonicalAlias(),e.getAltAliases())}function s(e,t){var n;return o.getDisplayAliasForAliasSet?o.getDisplayAliasForAliasSet(e,t):null!==(n=e||(null==t?void 0:t[0]))&&void 0!==n?n:""}function l(e,t){let n;if(t){const t=function(e,t){let n,r;for(const o of e.getJoinedMembers()){var i;if(o.userId!=t)if(void 0===n||o.events.member&&o.events.member.getTs()<n)r=o,n=null===(i=o.events.member)||void 0===i?void 0:i.getTs()}if(r)return r.userId;for(const i of e.currentState.getMembers()){var o;if(i.userId!=t)if(void 0===n||i.events.member&&i.events.member.getTs()<n)r=i,n=null===(o=i.events.member)||void 0===o?void 0:o.getTs()}return void 0===r?t:r.userId}(e,i.a.get().getUserId());n=t}else n=null;return c(e.roomId,n)}async function c(e,t){if(i.a.get().isGuest())return;const n=i.a.get().getAccountData(r.b.Direct),o=(null==n?void 0:n.getContent())||{},a=new Map(Object.entries(o));let s=!1;for(const n of a.keys()){const r=a.get(n)||[];if(n!=t){const t=r.indexOf(e);t>-1&&(r.splice(t,1),s=!0)}}if(t){const n=a.get(t)||[];-1==n.indexOf(e)&&(n.push(e),s=!0),a.set(t,n)}s&&await i.a.get().setAccountData(r.b.Direct,Object.fromEntries(a))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return S}));var r=n(120),i=n.n(r),o=n(16),a=n(121),s=n(123),l=n(125),c=n(137),u=n(127),d=n(124),h=n(128),p=n(214),m=n(804);var g=e=>{var t;let{featureId:n,onFinished:r}=e;const o=l.b.getBetaInfo(n);return i.a.createElement(m.a,{title:Object(a.a)("%(featureName)s Beta feedback",{featureName:o.title}),subheading:Object(a.a)(o.feedbackSubheading),onFinished:r,rageshakeLabel:o.feedbackLabel,rageshakeData:Object.fromEntries(((null===(t=l.b.getBetaInfo(n))||void 0===t?void 0:t.extraSettings)||[]).map((e=>l.b.getValue(e))))},i.a.createElement(s.a,{kind:"link_inline",onClick:()=>{r(),d.a.dispatch({action:h.a.ViewUserSettings,initialTabId:p.a.Labs})}},Object(a.a)("To leave the beta, visit your settings.")))},f=n(131),_=n(229),b=n(167),v=n(206),y=n(148),E=n(462);const S=e=>{let{onClick:t,tooltipTitle:n=Object(a.a)("This is a beta feature"),tooltipCaption:r=Object(a.a)("Click for more info")}=e;return t?i.a.createElement(y.a,{className:"mx_BetaCard_betaPill",title:`${n} ${r}`,tooltip:i.a.createElement("div",null,i.a.createElement("div",{className:"mx_Tooltip_title"},n),i.a.createElement("div",{className:"mx_Tooltip_sub"},r)),onClick:t},Object(a.a)("Beta")):i.a.createElement("span",{className:"mx_BetaCard_betaPill"},Object(a.a)("Beta"))};t.b=e=>{let{title:t,featureId:n}=e;const d=l.b.getBetaInfo(n),h=Object(b.a)(n),[p,m]=Object(r.useState)(!1);if(!d)return null;const{title:y,caption:w,faq:T,image:C,feedbackLabel:x,feedbackSubheading:F,extraSettings:D,requiresRefresh:k}=d;let O,I,A;if(h&&x&&F&&Object(E.a)()&&(O=i.a.createElement(s.a,{onClick:()=>{u.b.createDialog(g,{featureId:n})},kind:"primary"},Object(a.a)("Feedback"))),k){const e=f.b.get().brand;I=h?Object(a.a)("Leaving the beta will reload %(brand)s.",{brand:e}):Object(a.a)("Joining the beta will reload %(brand)s.",{brand:e})}return A=p?i.a.createElement(v.a,null):h?Object(a.a)("Leave the beta"):Object(a.a)("Join the beta"),i.a.createElement("div",{className:"mx_BetaCard"},i.a.createElement("div",{className:"mx_BetaCard_columns"},i.a.createElement("div",{className:"mx_BetaCard_columns_description"},i.a.createElement("h3",{className:"mx_BetaCard_title"},i.a.createElement("span",null,t||Object(a.a)(y)),i.a.createElement(S,null)),i.a.createElement("div",{className:"mx_BetaCard_caption"},w()),i.a.createElement("div",{className:"mx_BetaCard_buttons"},O,i.a.createElement(s.a,{onClick:async()=>{m(!0),k||await Object(o.N)(2e3),await l.b.setValue(n,null,c.a.DEVICE,!h),k||m(!1)},kind:O?"primary_outline":"primary",disabled:p},A)),I&&i.a.createElement("div",{className:"mx_BetaCard_refreshWarning"},I),T&&i.a.createElement("div",{className:"mx_BetaCard_faq"},T(h))),i.a.createElement("div",{className:"mx_BetaCard_columns_image_wrapper"},i.a.createElement("img",{className:"mx_BetaCard_columns_image",src:C,alt:""}))),D&&h&&i.a.createElement("div",{className:"mx_BetaCard_relatedSettings"},D.map((e=>i.a.createElement(_.a,{key:e,name:e,level:c.a.DEVICE})))))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var r=n(13),i=n.n(r);class o{constructor(e){this.target=e,i()(this,"reEmitters",new Map)}reEmit(e,t){var n=this;let r=this.reEmitters.get(e);r||(r=new Map,this.reEmitters.set(e,r));for(const i of t){const t=function(){if("error"!==i||0!==n.target.listenerCount("error")){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];n.target.emit(i,...r,e)}};e.on(i,t),r.set(i,t)}}stopReEmitting(e,t){const n=this.reEmitters.get(e);if(n){for(const r of t)e.off(r,n.get(r)),n.delete(r);0===n.size&&this.reEmitters.delete(e)}}}class a extends o{constructor(e){super(e)}reEmit(e,t){super.reEmit(e,t)}stopReEmitting(e,t){super.stopReEmitting(e,t)}}},function(e,t,n){"use strict";n.d(t,"d",(function(){return o})),n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return l})),n.d(t,"e",(function(){return c}));var r=n(13),i=n.n(r);let o,a;!function(e){e[e.ToggledLazyLoading=0]="ToggledLazyLoading"}(o||(o={}));class s extends Error{constructor(e,t){super(`Store is invalid because ${e}, please stop the client, delete all data and start the client again`),this.reason=e,this.value=t,this.name="InvalidStoreError"}}i()(s,"TOGGLED_LAZY_LOADING",o.ToggledLazyLoading),function(e){e.TooNew="TOO_NEW"}(a||(a={}));class l extends Error{constructor(e){super(`Crypto store is invalid because ${e}, please stop the client, delete all data and start the client again`),this.reason=e,this.name="InvalidCryptoStoreError"}}i()(l,"TOO_NEW",a.TooNew);class c extends Error{constructor(e,t){super(e),this.value=t}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(271),l=n(136),c=n(1),u=n(122),d=n(127),h=n(121),p=n(498),m=n(433),g=n(155),f=n(366);class _ extends Error{}class b{constructor(e){i()(this,"accessToken",void 0),i()(this,"tempClient",void 0),i()(this,"authEnabled",!0),e&&(this.tempClient=Object(l.createClient)({baseUrl:"",idBaseUrl:e}))}get matrixClient(){return this.tempClient?this.tempClient:u.a.get()}writeToken(){this.tempClient||window.localStorage.setItem("mx_is_access_token",this.accessToken)}readToken(){return this.tempClient?null:window.localStorage.getItem("mx_is_access_token")}hasCredentials(){return Boolean(this.accessToken)}async getAccessToken(){let{check:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.authEnabled)return null;let t=this.accessToken;if(t||(t=this.readToken()),!t)return t=await this.registerForToken(e),t&&(this.accessToken=t,this.writeToken()),t;if(e)try{await this.checkToken(t)}catch(e){if(e instanceof p.b||e instanceof _)throw e;t=await this.registerForToken(),t&&(this.accessToken=t,this.writeToken())}return t}async checkToken(e){const t=this.matrixClient.getIdentityServerUrl();try{await this.matrixClient.getIdentityAccount(e)}catch(n){if("M_TERMS_NOT_SIGNED"===n.errcode)return c.a.log("Identity server requires new terms to be agreed to"),void await Object(p.d)([new p.a(s.a.IS,t,e)]);throw n}if(!this.tempClient&&!Object(m.a)()&&!await Object(m.b)(t)){const{finished:e}=d.b.createDialog(g.a,{title:Object(h.a)("Identity server has no terms of service"),description:a.a.createElement("div",null,a.a.createElement("p",null,Object(h.a)("This action requires accessing the default identity server <server /> to validate an email address or phone number, but the server does not have any terms of service.",{},{server:()=>a.a.createElement("b",null,Object(f.a)(t))})),a.a.createElement("p",null,Object(h.a)("Only continue if you trust the owner of the server."))),button:Object(h.a)("Trust")}),[n]=await e;if(!n)throw new _("User aborted identity server action without terms");Object(m.d)()}}async registerForToken(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=await u.a.get().getOpenIdToken(),{access_token:n,token:r}=await this.matrixClient.registerWithIdentityServer(t),i=r||n;return e&&await this.checkToken(i),i}}},function(e,t,n){"use strict";function r(e,t){return Number.isFinite(e)?Number(e):t}function i(e,t,n){return Math.min(Math.max(e,t),n)}function o(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return[...t].reduce(((e,t)=>t+e),0)}function a(e,t,n){return e*(n-t)+t}function s(e,t,n){const r=(e-t)/(n-t);return Number.isNaN(r)?0:r}n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"e",(function(){return o})),n.d(t,"d",(function(){return a})),n.d(t,"c",(function(){return s}))},function(e,t,n){"use strict";function r(e){e.currentTarget.value=""}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";t.a={SHOW_ENCRYPTION_SETUP_UI:!0}},function(e,t,n){"use strict";n.d(t,"c",(function(){return A})),n.d(t,"a",(function(){return B})),n.d(t,"b",(function(){return U}));var r=n(120),i=n.n(r),o=n(1),a=n(16),s=n(160),l=n(129),c=n(187),u=n(121),d=n(525),h=n(232),p=n(125),m=n(493),g=n(207),f=n(182),_=n(124),b=n(122),v=n(404),y=n(123),E=n(173),S=n(180),w=n(203),T=n(192),C=n(465);function x(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.getSender();const r=b.a.get(),i=e.getRoomId(),o=null===(t=r.getRoom(i))||void 0===t?void 0:t.getMember(n);return(null==o?void 0:o.name)||(null==o?void 0:o.rawDisplayName)||n||Object(u.a)("Someone")}function F(e){var t;const n=null===(t=b.a.get().getRoom(e.getRoomId()))||void 0===t?void 0:t.name;return b.a.get().supportsVoip()?()=>Object(u.a)("Video call started in %(roomName)s.",{roomName:n}):()=>Object(u.a)("Video call started in %(roomName)s. (not supported by this browser)",{roomName:n})}const D=()=>{_.a.dispatch({action:"open_room_settings",initial_tab_id:v.b})};function k(e){return Object(S.l)(e)?A(e):()=>{const t=e.sender&&e.sender.name?e.sender.name:e.getSender();let n=e.getContent().body;return e.isRedacted()&&(n=R(e)),n=e.getContent().msgtype===l.e.Emote?"* "+t+" "+n:e.getContent().msgtype===l.e.Image?Object(u.a)("%(senderDisplayName)s sent an image.",{senderDisplayName:t}):e.getType()==l.b.Sticker?Object(u.a)("%(senderDisplayName)s sent a sticker.",{senderDisplayName:t}):t+": "+n,n}}const O=()=>{E.a.instance.setCard({phase:f.a.PinnedMessages},!1)};function I(e){const t=Object(C.a)(e),{entity:n}=e.getPrevContent(),{entity:r,recommendation:i,reason:o}=e.getContent();return r?i&&o?r===n?m.g.includes(e.getType())?()=>Object(u.a)("%(senderName)s updated the rule banning users matching %(glob)s for %(reason)s",{senderName:t,glob:r,reason:o}):m.c.includes(e.getType())?()=>Object(u.a)("%(senderName)s updated the rule banning rooms matching %(glob)s for %(reason)s",{senderName:t,glob:r,reason:o}):m.f.includes(e.getType())?()=>Object(u.a)("%(senderName)s updated the rule banning servers matching %(glob)s for %(reason)s",{senderName:t,glob:r,reason:o}):()=>Object(u.a)("%(senderName)s updated a ban rule matching %(glob)s for %(reason)s",{senderName:t,glob:r,reason:o}):n?m.g.includes(e.getType())?()=>Object(u.a)("%(senderName)s changed a rule that was banning users matching %(oldGlob)s to matching %(newGlob)s for %(reason)s",{senderName:t,oldGlob:n,newGlob:r,reason:o}):m.c.includes(e.getType())?()=>Object(u.a)("%(senderName)s changed a rule that was banning rooms matching %(oldGlob)s to matching %(newGlob)s for %(reason)s",{senderName:t,oldGlob:n,newGlob:r,reason:o}):m.f.includes(e.getType())?()=>Object(u.a)("%(senderName)s changed a rule that was banning servers matching %(oldGlob)s to matching %(newGlob)s for %(reason)s",{senderName:t,oldGlob:n,newGlob:r,reason:o}):()=>Object(u.a)("%(senderName)s updated a ban rule that was matching %(oldGlob)s to matching %(newGlob)s for %(reason)s",{senderName:t,oldGlob:n,newGlob:r,reason:o}):m.g.includes(e.getType())?()=>Object(u.a)("%(senderName)s created a rule banning users matching %(glob)s for %(reason)s",{senderName:t,glob:r,reason:o}):m.c.includes(e.getType())?()=>Object(u.a)("%(senderName)s created a rule banning rooms matching %(glob)s for %(reason)s",{senderName:t,glob:r,reason:o}):m.f.includes(e.getType())?()=>Object(u.a)("%(senderName)s created a rule banning servers matching %(glob)s for %(reason)s",{senderName:t,glob:r,reason:o}):()=>Object(u.a)("%(senderName)s created a ban rule matching %(glob)s for %(reason)s",{senderName:t,glob:r,reason:o}):()=>Object(u.a)("%(senderName)s updated an invalid ban rule",{senderName:t}):m.g.includes(e.getType())?()=>Object(u.a)("%(senderName)s removed the rule banning users matching %(glob)s",{senderName:t,glob:n}):m.c.includes(e.getType())?()=>Object(u.a)("%(senderName)s removed the rule banning rooms matching %(glob)s",{senderName:t,glob:n}):m.f.includes(e.getType())?()=>Object(u.a)("%(senderName)s removed the rule banning servers matching %(glob)s",{senderName:t,glob:n}):()=>Object(u.a)("%(senderName)s removed a ban rule matching %(glob)s",{senderName:t,glob:n})}function A(e){return()=>Object(u.a)("%(senderName)s has shared their location",{senderName:Object(C.a)(e)})}function R(e){var t;let n=Object(u.a)("Message deleted");const r=e.getUnsigned(),i=null==r||null===(t=r.redacted_because)||void 0===t?void 0:t.sender;if(i&&i!==e.getSender()){const t=b.a.get().getRoom(e.getRoomId()),r=null==t?void 0:t.getMember(i);n=Object(u.a)("Message deleted by %(name)s",{name:(null==r?void 0:r.name)||i})}return n}function N(e){return()=>{let t="";if(e.isRedacted()){var n,r;t=R(e);t=(null!==(n=null===(r=e.sender)||void 0===r?void 0:r.name)&&void 0!==n?n:e.getSender())+": "+t}else{var i,o;t=Object(u.a)("%(senderName)s has started a poll - %(pollQuestion)s",{senderName:Object(C.a)(e),pollQuestion:null===(i=e.unstableExtensibleEvent)||void 0===i||null===(o=i.question)||void 0===o?void 0:o.text})}return t}}function M(e){return()=>Object(u.a)("%(senderName)s has ended a poll",{senderName:Object(C.a)(e)})}const P={[l.b.RoomMessage]:k,[l.b.Sticker]:k,[l.b.CallInvite]:function(e){var t,n;const r=Object(C.a)(e),i=!(null!==(t=e.getContent().offer)&&void 0!==t&&null!==(n=t.sdp)&&void 0!==n&&n.includes("m=video")),o=b.a.get().supportsVoip();return i&&o?()=>Object(u.a)("%(senderName)s placed a voice call.",{senderName:r}):i&&!o?()=>Object(u.a)("%(senderName)s placed a voice call. (not supported by this browser)",{senderName:r}):!i&&o?()=>Object(u.a)("%(senderName)s placed a video call.",{senderName:r}):i||o?null:()=>Object(u.a)("%(senderName)s placed a video call. (not supported by this browser)",{senderName:r})},[c.e.name]:N,[c.a.name]:M,[c.e.altName]:N,[c.a.altName]:M},L={[l.b.RoomCanonicalAlias]:function(e){const t=Object(C.a)(e),n=e.getPrevContent().alias,r=e.getPrevContent().alt_aliases||[],i=e.getContent().alias,o=e.getContent().alt_aliases||[],a=r.filter((e=>!o.includes(e))),s=o.filter((e=>!r.includes(e)));if(a.length||s.length){if(i!==n)return()=>Object(u.a)("%(senderName)s changed the main and alternative addresses for this room.",{senderName:t});if(s.length&&!a.length)return()=>Object(u.a)("%(senderName)s added the alternative addresses %(addresses)s for this room.",{senderName:t,addresses:s.join(", "),count:s.length});if(a.length&&!s.length)return()=>Object(u.a)("%(senderName)s removed the alternative addresses %(addresses)s for this room.",{senderName:t,addresses:a.join(", "),count:a.length});if(a.length&&s.length)return()=>Object(u.a)("%(senderName)s changed the alternative addresses for this room.",{senderName:t})}else{if(i)return()=>Object(u.a)("%(senderName)s set the main address for this room to %(address)s.",{senderName:t,address:e.getContent().alias});if(n)return()=>Object(u.a)("%(senderName)s removed the main address for this room.",{senderName:t})}return()=>Object(u.a)("%(senderName)s changed the addresses for this room.",{senderName:t})},[l.b.RoomName]:function(e){const t=e.sender&&e.sender.name?e.sender.name:e.getSender();return e.getContent().name&&0!==e.getContent().name.trim().length?e.getPrevContent().name?()=>Object(u.a)("%(senderDisplayName)s changed the room name from %(oldRoomName)s to %(newRoomName)s.",{senderDisplayName:t,oldRoomName:e.getPrevContent().name,newRoomName:e.getContent().name}):()=>Object(u.a)("%(senderDisplayName)s changed the room name to %(roomName)s.",{senderDisplayName:t,roomName:e.getContent().name}):()=>Object(u.a)("%(senderDisplayName)s removed the room name.",{senderDisplayName:t})},[l.b.RoomTopic]:function(e){const t=e.sender&&e.sender.name?e.sender.name:e.getSender();return()=>Object(u.a)('%(senderDisplayName)s changed the topic to "%(topic)s".',{senderDisplayName:t,topic:e.getContent().topic})},[l.b.RoomMember]:function(e,t,n){var r,i;const s=(null===(r=e.sender)||void 0===r?void 0:r.name)||x(e),l=(null===(i=e.target)||void 0===i?void 0:i.name)||x(e,e.getStateKey()),c=e.getPrevContent(),d=e.getContent(),h=d.reason;switch(d.membership){case"invite":{const e=d.third_party_invite;return e?e.display_name?()=>Object(u.a)("%(targetName)s accepted the invitation for %(displayName)s",{targetName:l,displayName:e.display_name}):()=>Object(u.a)("%(targetName)s accepted an invitation",{targetName:l}):()=>Object(u.a)("%(senderName)s invited %(targetName)s",{senderName:s,targetName:l})}case"ban":return()=>h?Object(u.a)("%(senderName)s banned %(targetName)s: %(reason)s",{senderName:s,targetName:l,reason:h}):Object(u.a)("%(senderName)s banned %(targetName)s",{senderName:s,targetName:l});case"join":return c&&"join"===c.membership?c.displayname&&d.displayname&&c.displayname!==d.displayname?()=>Object(u.a)("%(oldDisplayName)s changed their display name to %(displayName)s",{oldDisplayName:Object(a.H)(c.displayname),displayName:Object(a.H)(d.displayname)}):!c.displayname&&d.displayname?()=>Object(u.a)("%(senderName)s set their display name to %(displayName)s",{senderName:e.getSender(),displayName:Object(a.H)(d.displayname)}):c.displayname&&!d.displayname?()=>Object(u.a)("%(senderName)s removed their display name (%(oldDisplayName)s)",{senderName:s,oldDisplayName:Object(a.H)(c.displayname)}):c.avatar_url&&!d.avatar_url?()=>Object(u.a)("%(senderName)s removed their profile picture",{senderName:s}):c.avatar_url&&d.avatar_url&&c.avatar_url!==d.avatar_url?()=>Object(u.a)("%(senderName)s changed their profile picture",{senderName:s}):!c.avatar_url&&d.avatar_url?()=>Object(u.a)("%(senderName)s set a profile picture",{senderName:s}):(null!=n?n:p.b.getValue("showHiddenEventsInTimeline"))?()=>Object(u.a)("%(senderName)s made no change",{senderName:s}):null:(e.target||o.a.warn("Join message has no target! -- "+e.getContent().state_key),()=>Object(u.a)("%(targetName)s joined the room",{targetName:l}));case"leave":return e.getSender()===e.getStateKey()?"invite"===c.membership?()=>Object(u.a)("%(targetName)s rejected the invitation",{targetName:l}):()=>h?Object(u.a)("%(targetName)s left the room: %(reason)s",{targetName:l,reason:h}):Object(u.a)("%(targetName)s left the room",{targetName:l}):"ban"===c.membership?()=>Object(u.a)("%(senderName)s unbanned %(targetName)s",{senderName:s,targetName:l}):"invite"===c.membership?()=>h?Object(u.a)("%(senderName)s withdrew %(targetName)s's invitation: %(reason)s",{senderName:s,targetName:l,reason:h}):Object(u.a)("%(senderName)s withdrew %(targetName)s's invitation",{senderName:s,targetName:l}):"join"===c.membership?()=>h?Object(u.a)("%(senderName)s removed %(targetName)s: %(reason)s",{senderName:s,targetName:l,reason:h}):Object(u.a)("%(senderName)s removed %(targetName)s",{senderName:s,targetName:l}):null}return null},[l.b.RoomAvatar]:function(e){var t;const n=(null==e||null===(t=e.sender)||void 0===t?void 0:t.name)||e.getSender();return()=>Object(u.a)("%(senderDisplayName)s changed the room avatar.",{senderDisplayName:n})},[l.b.RoomThirdPartyInvite]:function(e){const t=Object(C.a)(e);return Object(h.c)(e)?()=>Object(u.a)("%(senderName)s sent an invitation to %(targetDisplayName)s to join the room.",{senderName:t,targetDisplayName:e.getContent().display_name}):()=>Object(u.a)("%(senderName)s revoked the invitation for %(targetDisplayName)s to join the room.",{senderName:t,targetDisplayName:e.getPrevContent().display_name||Object(u.a)("Someone")})},[l.b.RoomHistoryVisibility]:function(e){const t=Object(C.a)(e);switch(e.getContent().history_visibility){case s.b.Invited:return()=>Object(u.a)("%(senderName)s made future room history visible to all room members, from the point they are invited.",{senderName:t});case s.b.Joined:return()=>Object(u.a)("%(senderName)s made future room history visible to all room members, from the point they joined.",{senderName:t});case s.b.Shared:return()=>Object(u.a)("%(senderName)s made future room history visible to all room members.",{senderName:t});case s.b.WorldReadable:return()=>Object(u.a)("%(senderName)s made future room history visible to anyone.",{senderName:t});default:return()=>Object(u.a)("%(senderName)s made future room history visible to unknown (%(visibility)s).",{senderName:t,visibility:e.getContent().history_visibility})}},[l.b.RoomPowerLevels]:function(e){var t,n;const r=Object(C.a)(e);if(null===(t=e.getPrevContent())||void 0===t||!t.users||null===(n=e.getContent())||void 0===n||!n.users)return null;const i=e.getPrevContent().users_default||0,o=e.getContent().users_default||0,a=[];Object.keys(e.getContent().users).forEach((e=>{-1===a.indexOf(e)&&a.push(e)})),Object.keys(e.getPrevContent().users).forEach((e=>{-1===a.indexOf(e)&&a.push(e)}));const s=[];return a.forEach((t=>{let n=e.getPrevContent().users[t];Number.isInteger(n)||(n=i);let r=e.getContent().users[t];if(Number.isInteger(r)||(r=o),(n!==i||r!==o)&&r!==n){const i=x(e,t);s.push({userId:t,name:i,from:n,to:r})}})),s.length?()=>Object(u.a)("%(senderName)s changed the power level of %(powerLevelDiffText)s.",{senderName:r,powerLevelDiffText:s.map((e=>Object(u.a)("%(userId)s from %(fromPowerLevel)s to %(toPowerLevel)s",{userId:e.name,fromPowerLevel:d.b(e.from,i),toPowerLevel:d.b(e.to,o)}))).join(", ")}):null},[l.b.RoomPinnedEvents]:function(e,t){var n,r;if(!p.b.getValue("feature_pinning"))return null;const o=Object(C.a)(e),a=e.getRoomId(),s=null!==(n=e.getContent().pinned)&&void 0!==n?n:[],l=null!==(r=e.getPrevContent().pinned)&&void 0!==r?r:[],c=s.filter((e=>l.indexOf(e)<0)),d=l.filter((e=>s.indexOf(e)<0));if(1===c.length&&0===d.length){if(t){const e=c.pop();return()=>i.a.createElement("span",null,Object(u.a)("%(senderName)s pinned <a>a message</a> to this room. See all <b>pinned messages</b>.",{senderName:o},{a:t=>i.a.createElement(y.a,{kind:"link_inline",onClick:t=>Object(S.j)(a,e)},t),b:e=>i.a.createElement(y.a,{kind:"link_inline",onClick:O},e)}))}return()=>Object(u.a)("%(senderName)s pinned a message to this room. See all pinned messages.",{senderName:o})}if(1===d.length&&0===c.length){if(t){const e=d.pop();return()=>i.a.createElement("span",null,Object(u.a)("%(senderName)s unpinned <a>a message</a> from this room. See all <b>pinned messages</b>.",{senderName:o},{a:t=>i.a.createElement(y.a,{kind:"link_inline",onClick:t=>Object(S.j)(a,e)},t),b:e=>i.a.createElement(y.a,{kind:"link_inline",onClick:O},e)}))}return()=>Object(u.a)("%(senderName)s unpinned a message from this room. See all pinned messages.",{senderName:o})}return t?()=>i.a.createElement("span",null,Object(u.a)("%(senderName)s changed the <a>pinned messages</a> for the room.",{senderName:o},{a:e=>i.a.createElement(y.a,{kind:"link_inline",onClick:O},e)})):()=>Object(u.a)("%(senderName)s changed the pinned messages for the room.",{senderName:o})},[l.b.RoomServerAcl]:function(e){const t=e.sender&&e.sender.name?e.sender.name:e.getSender(),n=e.getPrevContent(),r=e.getContent(),i=Array.isArray(n.deny)?n.deny:[],o=Array.isArray(n.allow)?n.allow:[];let a;return n.allow_ip_literals,a=0===i.length&&0===o.length?()=>Object(u.a)("%(senderDisplayName)s set the server ACLs for this room.",{senderDisplayName:t}):()=>Object(u.a)("%(senderDisplayName)s changed the server ACLs for this room.",{senderDisplayName:t}),Array.isArray(r.allow)||(r.allow=[]),0===r.allow.length?()=>a()+" "+Object(u.a)("🎉 All servers are banned from participating! This room can no longer be used."):a},[l.b.RoomTombstone]:function(e){const t=e.sender&&e.sender.name?e.sender.name:e.getSender();return()=>Object(u.a)("%(senderDisplayName)s upgraded this room.",{senderDisplayName:t})},[l.b.RoomJoinRules]:function(e,t){const n=e.sender&&e.sender.name?e.sender.name:e.getSender();switch(e.getContent().join_rule){case s.c.Public:return()=>Object(u.a)("%(senderDisplayName)s made the room public to whoever knows the link.",{senderDisplayName:n});case s.c.Invite:return()=>Object(u.a)("%(senderDisplayName)s made the room invite only.",{senderDisplayName:n});case s.c.Restricted:return t?()=>i.a.createElement("span",null,Object(u.a)("%(senderDisplayName)s changed who can join this room. <a>View settings</a>.",{senderDisplayName:n},{a:e=>i.a.createElement(y.a,{kind:"link_inline",onClick:D},e)})):()=>Object(u.a)("%(senderDisplayName)s changed who can join this room.",{senderDisplayName:n});default:return()=>Object(u.a)("%(senderDisplayName)s changed the join rule to %(rule)s",{senderDisplayName:n,rule:e.getContent().join_rule})}},[l.b.RoomGuestAccess]:function(e){const t=e.sender&&e.sender.name?e.sender.name:e.getSender();switch(e.getContent().guest_access){case s.a.CanJoin:return()=>Object(u.a)("%(senderDisplayName)s has allowed guests to join the room.",{senderDisplayName:t});case s.a.Forbidden:return()=>Object(u.a)("%(senderDisplayName)s has prevented guests from joining the room.",{senderDisplayName:t});default:return()=>Object(u.a)("%(senderDisplayName)s changed guest access to %(rule)s",{senderDisplayName:t,rule:e.getContent().guest_access})}},"im.vector.modular.widgets":function(e){const t=Object(C.a)(e),{name:n,type:r,url:i}=e.getPrevContent(),{name:o,type:a,url:s}=e.getContent()||{};let l=o||n||a||r||"";return l&&l.length>0&&(l=l[0].toUpperCase()+l.slice(1)),s?i?()=>Object(u.a)("%(widgetName)s widget modified by %(senderName)s",{widgetName:l,senderName:t}):()=>Object(u.a)("%(widgetName)s widget added by %(senderName)s",{widgetName:l,senderName:t}):()=>Object(u.a)("%(widgetName)s widget removed by %(senderName)s",{widgetName:l,senderName:t})},[g.c]:function(e){const t=Object(C.a)(e);return()=>Object(u.a)("%(senderName)s has updated the room layout",{senderName:t})},[T.g]:T.P};for(const e of m.a)L[e]=I;for(const e of w.d.CALL_EVENT_TYPE.names)L[e]=F;function B(e,t){const n=(e.isState()?L:P)[e.getType()];return Boolean(null==n?void 0:n(e,!1,t))}function U(e){var t;let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0;const i=(e.isState()?L:P)[e.getType()];return(null==i||null===(t=i(e,n,r))||void 0===t?void 0:t())||""}},function(e,t,n){"use strict";let r,i;n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i})),function(e){e.Manual="MANUAL",e.Alphabetic="ALPHABETIC",e.Recent="RECENT"}(r||(r={})),function(e){e.Importance="IMPORTANCE",e.Natural="NATURAL"}(i||(i={}))},function(e,t){e.exports={trueFunc:function(){return!0},falseFunc:function(){return!1}}},function(e,t,n){"use strict";let r,i,o,a,{isClean:s,my:l}=n(540),c=n(440),u=n(444),d=n(441);function h(e){return e.map((e=>(e.nodes&&(e.nodes=h(e.nodes)),delete e.source,e)))}function p(e){if(e[s]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)p(t)}class m extends d{push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}each(e){if(!this.proxyOf.nodes)return;let t,n,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],n=e(this.proxyOf.nodes[t],t),!1!==n);)this.indexes[r]+=1;return delete this.indexes[r],n}walk(e){return this.each(((t,n)=>{let r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return!1!==r&&t.walk&&(r=t.walk(e)),r}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((n,r)=>{if("decl"===n.type&&e.test(n.prop))return t(n,r)})):this.walk(((n,r)=>{if("decl"===n.type&&n.prop===e)return t(n,r)})):(t=e,this.walk(((e,n)=>{if("decl"===e.type)return t(e,n)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((n,r)=>{if("rule"===n.type&&e.test(n.selector))return t(n,r)})):this.walk(((n,r)=>{if("rule"===n.type&&n.selector===e)return t(n,r)})):(t=e,this.walk(((e,n)=>{if("rule"===e.type)return t(e,n)})))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((n,r)=>{if("atrule"===n.type&&e.test(n.name))return t(n,r)})):this.walk(((n,r)=>{if("atrule"===n.type&&n.name===e)return t(n,r)})):(t=e,this.walk(((e,n)=>{if("atrule"===e.type)return t(e,n)})))}walkComments(e){return this.walk(((t,n)=>{if("comment"===t.type)return e(t,n)}))}append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}insertBefore(e,t){let n,r=this.index(e),i=0===r&&"prepend",o=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let e of o)this.proxyOf.nodes.splice(r,0,e);for(let e in this.indexes)n=this.indexes[e],r<=n&&(this.indexes[e]=n+o.length);return this.markDirty(),this}insertAfter(e,t){let n,r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let e of i)this.proxyOf.nodes.splice(r+1,0,e);for(let e in this.indexes)n=this.indexes[e],r<n&&(this.indexes[e]=n+i.length);return this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls((r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))})),this.markDirty(),this}every(e){return this.nodes.every(e)}some(e){return this.nodes.some(e)}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}normalize(e,t){if("string"==typeof e)e=h(r(e).nodes);else if(Array.isArray(e)){e=e.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if("root"===e.type&&"document"!==this.type){e=e.nodes.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new c(e)]}else if(e.selector)e=[new i(e)];else if(e.name)e=[new o(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new u(e)]}return e.map((e=>(e[l]||m.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[s]&&p(e),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e)))}getProxyProcessor(){return{set:(e,t,n)=>(e[t]===n||(e[t]=n,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0),get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...n)=>e[t](...n.map((e=>"function"==typeof e?(t,n)=>e(t.toProxy(),n):e))):"every"===t||"some"===t?n=>e[t](((e,...t)=>n(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t]}}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}}m.registerParse=e=>{r=e},m.registerRule=e=>{i=e},m.registerAtRule=e=>{o=e},m.registerRoot=e=>{a=e},e.exports=m,m.default=m,m.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,o.prototype):"rule"===e.type?Object.setPrototypeOf(e,i.prototype):"decl"===e.type?Object.setPrototypeOf(e,c.prototype):"comment"===e.type?Object.setPrototypeOf(e,u.prototype):"root"===e.type&&Object.setPrototypeOf(e,a.prototype),e[l]=!0,e.nodes&&e.nodes.forEach((e=>{m.rebuild(e)}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return l}));var r=n(13),i=n.n(r),o=n(136);const a="local+";let s;!function(e){e[e.NEW=0]="NEW",e[e.CREATING=1]="CREATING",e[e.CREATED=2]="CREATED",e[e.ERROR=3]="ERROR"}(s||(s={}));class l extends o.Room{constructor(e,t,n){super(e,t,n,{pendingEventOrdering:o.PendingEventOrdering.Detached}),i()(this,"encrypted",!1),i()(this,"actualRoomId",void 0),i()(this,"targets",[]),i()(this,"afterCreateCallbacks",[]),i()(this,"state",s.NEW),this.name=this.getDefaultRoomName(n)}get isNew(){return this.state===s.NEW}get isCreated(){return this.state===s.CREATED}get isError(){return this.state===s.ERROR}}},function(e,t,n){"use strict";var r=n(120),i=n.n(r),o=n(126),a=n.n(o),s=n(121),l=n(228),c=n(148);t.a=e=>{let{children:t,getTextToCopy:n,border:o=!0,className:u}=e;const[d,h]=Object(r.useState)(void 0),p=a()("mx_CopyableText",u,{mx_CopyableText_border:o});return i.a.createElement("div",{className:p},t,i.a.createElement(c.a,{title:null!=d?d:Object(s.a)("Copy"),onClick:async e=>{e.preventDefault();const t=await Object(l.b)(n());h(t?Object(s.a)("Copied!"):Object(s.a)("Failed to copy"))},className:"mx_CopyableText_copyButton",onHideTooltip:()=>{d&&h(void 0)}}))}},function(e,t){let n;const r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];t.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return r[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');n=e},t.isKanjiModeEnabled=function(){return void 0!==n},t.toSJIS=function(e){return n(e)}},function(e,t,n){const r=n(750),i=n(751);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!r.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return i.testNumeric(e)?t.NUMERIC:i.testAlphanumeric(e)?t.ALPHANUMERIC:i.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(e){return n}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(13),i=n.n(r),o=n(149),a=n(16);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class c{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{keys:[]};i()(this,"_options",void 0),i()(this,"_items",void 0),this._options=t,this.setObjects(e),void 0===this._options.shouldMatchWordsOnly&&(this._options.shouldMatchWordsOnly=!0)}setObjects(e){this._items=new Map;for(const t of e){const e=Object(o.at)(t,this._options.keys);if(this._options.funcs)for(const n of this._options.funcs){const r=n(t);Array.isArray(r)?e.push(...r):e.push(r)}for(const[n,r]of Object.entries(e)){if(!r)continue;const e=this.processQuery(r);this._items.has(e)||this._items.set(e,[]),this._items.get(e).push({keyWeight:Number(n),object:t})}}}match(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(e=this.processQuery(e),this._options.shouldMatchWordsOnly&&(e=e.replace(/[^\w]/g,"")),0===e.length)return[];const n=[];for(const[t,r]of this._items.entries()){let i=t;this._options.shouldMatchWordsOnly&&(i=i.replace(/[^\w]/g,""));const o=i.indexOf(e);-1!==o&&n.push(...r.map((e=>l({index:o},e))))}n.sort(((e,t)=>{if(e.index<t.index)return-1;if(e.index===t.index){if(e.keyWeight<t.keyWeight)return-1;if(e.keyWeight===t.keyWeight)return 0}return 1}));const r=Object(o.uniq)(n.map((e=>e.object))),i=-1===t?r.length:t;return r.slice(0,i)}processQuery(e){return!1!==this._options.fuzzy?Object(a.J)(e.toLowerCase()).toLowerCase():e.toLowerCase()}}},function(e,t,n){"use strict";const r=t.NAMESPACES={HTML:"http://www.w3.org/1999/xhtml",MATHML:"http://www.w3.org/1998/Math/MathML",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"};t.ATTRS={TYPE:"type",ACTION:"action",ENCODING:"encoding",PROMPT:"prompt",NAME:"name",COLOR:"color",FACE:"face",SIZE:"size"},t.DOCUMENT_MODE={NO_QUIRKS:"no-quirks",QUIRKS:"quirks",LIMITED_QUIRKS:"limited-quirks"};const i=t.TAG_NAMES={A:"a",ADDRESS:"address",ANNOTATION_XML:"annotation-xml",APPLET:"applet",AREA:"area",ARTICLE:"article",ASIDE:"aside",B:"b",BASE:"base",BASEFONT:"basefont",BGSOUND:"bgsound",BIG:"big",BLOCKQUOTE:"blockquote",BODY:"body",BR:"br",BUTTON:"button",CAPTION:"caption",CENTER:"center",CODE:"code",COL:"col",COLGROUP:"colgroup",DD:"dd",DESC:"desc",DETAILS:"details",DIALOG:"dialog",DIR:"dir",DIV:"div",DL:"dl",DT:"dt",EM:"em",EMBED:"embed",FIELDSET:"fieldset",FIGCAPTION:"figcaption",FIGURE:"figure",FONT:"font",FOOTER:"footer",FOREIGN_OBJECT:"foreignObject",FORM:"form",FRAME:"frame",FRAMESET:"frameset",H1:"h1",H2:"h2",H3:"h3",H4:"h4",H5:"h5",H6:"h6",HEAD:"head",HEADER:"header",HGROUP:"hgroup",HR:"hr",HTML:"html",I:"i",IMG:"img",IMAGE:"image",INPUT:"input",IFRAME:"iframe",KEYGEN:"keygen",LABEL:"label",LI:"li",LINK:"link",LISTING:"listing",MAIN:"main",MALIGNMARK:"malignmark",MARQUEE:"marquee",MATH:"math",MENU:"menu",META:"meta",MGLYPH:"mglyph",MI:"mi",MO:"mo",MN:"mn",MS:"ms",MTEXT:"mtext",NAV:"nav",NOBR:"nobr",NOFRAMES:"noframes",NOEMBED:"noembed",NOSCRIPT:"noscript",OBJECT:"object",OL:"ol",OPTGROUP:"optgroup",OPTION:"option",P:"p",PARAM:"param",PLAINTEXT:"plaintext",PRE:"pre",RB:"rb",RP:"rp",RT:"rt",RTC:"rtc",RUBY:"ruby",S:"s",SCRIPT:"script",SECTION:"section",SELECT:"select",SOURCE:"source",SMALL:"small",SPAN:"span",STRIKE:"strike",STRONG:"strong",STYLE:"style",SUB:"sub",SUMMARY:"summary",SUP:"sup",TABLE:"table",TBODY:"tbody",TEMPLATE:"template",TEXTAREA:"textarea",TFOOT:"tfoot",TD:"td",TH:"th",THEAD:"thead",TITLE:"title",TR:"tr",TRACK:"track",TT:"tt",U:"u",UL:"ul",SVG:"svg",VAR:"var",WBR:"wbr",XMP:"xmp"};t.SPECIAL_ELEMENTS={[r.HTML]:{[i.ADDRESS]:!0,[i.APPLET]:!0,[i.AREA]:!0,[i.ARTICLE]:!0,[i.ASIDE]:!0,[i.BASE]:!0,[i.BASEFONT]:!0,[i.BGSOUND]:!0,[i.BLOCKQUOTE]:!0,[i.BODY]:!0,[i.BR]:!0,[i.BUTTON]:!0,[i.CAPTION]:!0,[i.CENTER]:!0,[i.COL]:!0,[i.COLGROUP]:!0,[i.DD]:!0,[i.DETAILS]:!0,[i.DIR]:!0,[i.DIV]:!0,[i.DL]:!0,[i.DT]:!0,[i.EMBED]:!0,[i.FIELDSET]:!0,[i.FIGCAPTION]:!0,[i.FIGURE]:!0,[i.FOOTER]:!0,[i.FORM]:!0,[i.FRAME]:!0,[i.FRAMESET]:!0,[i.H1]:!0,[i.H2]:!0,[i.H3]:!0,[i.H4]:!0,[i.H5]:!0,[i.H6]:!0,[i.HEAD]:!0,[i.HEADER]:!0,[i.HGROUP]:!0,[i.HR]:!0,[i.HTML]:!0,[i.IFRAME]:!0,[i.IMG]:!0,[i.INPUT]:!0,[i.LI]:!0,[i.LINK]:!0,[i.LISTING]:!0,[i.MAIN]:!0,[i.MARQUEE]:!0,[i.MENU]:!0,[i.META]:!0,[i.NAV]:!0,[i.NOEMBED]:!0,[i.NOFRAMES]:!0,[i.NOSCRIPT]:!0,[i.OBJECT]:!0,[i.OL]:!0,[i.P]:!0,[i.PARAM]:!0,[i.PLAINTEXT]:!0,[i.PRE]:!0,[i.SCRIPT]:!0,[i.SECTION]:!0,[i.SELECT]:!0,[i.SOURCE]:!0,[i.STYLE]:!0,[i.SUMMARY]:!0,[i.TABLE]:!0,[i.TBODY]:!0,[i.TD]:!0,[i.TEMPLATE]:!0,[i.TEXTAREA]:!0,[i.TFOOT]:!0,[i.TH]:!0,[i.THEAD]:!0,[i.TITLE]:!0,[i.TR]:!0,[i.TRACK]:!0,[i.UL]:!0,[i.WBR]:!0,[i.XMP]:!0},[r.MATHML]:{[i.MI]:!0,[i.MO]:!0,[i.MN]:!0,[i.MS]:!0,[i.MTEXT]:!0,[i.ANNOTATION_XML]:!0},[r.SVG]:{[i.TITLE]:!0,[i.FOREIGN_OBJECT]:!0,[i.DESC]:!0}}},function(e,t,n){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(e,t,n){(function(e){function n(e){return e&&e.Math==Math?e:void 0}Object.defineProperty(t,"__esModule",{value:!0});const r="object"==typeof globalThis&&n(globalThis)||"object"==typeof window&&n(window)||"object"==typeof self&&n(self)||"object"==typeof e&&n(e)||function(){return this}()||{};t.GLOBAL_OBJ=r,t.getGlobalObject=function(){return r},t.getGlobalSingleton=function(e,t,n){const i=n||r,o=i.__SENTRY__=i.__SENTRY__||{};return o[e]||(o[e]=t())}}).call(this,n(14))},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(164),i=n(217),o=n(242),a=n(797);function s(e,t,n){const r=e.filter((e=>{if(e&&"join"===e.getMyMembership()){if(Object(i.a)(e))return!1;const r=Object(a.a)(e),s=e.currentState.getMembers().filter((e=>!r.includes(e.userId)&&e.membership&&Object(o.c)(e.membership)));if(s.find((e=>e.userId===t))&&2===s.length)return!0;const l=e.currentState.getStateEvents("m.room.third_party_invite")||[];return n&&1===s.length&&1===l.length}return!1})).sort(((e,t)=>t.getLastActiveTimestamp()-e.getLastActiveTimestamp()));if(r.length)return r[0]}function l(e,t){const n=s(r.a.shared().getDMRoomsForUserId(t).map((t=>e.getRoom(t))).filter((e=>null!==e)),t,!0);if(n)return n;const i=r.a.shared().getRoomIds();return s(Array.from(i).map((t=>e.getRoom(t))).filter((e=>null!==e)),t,!1)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return m})),n.d(t,"a",(function(){return g}));var r=n(13),i=n.n(r),o=n(1),a=n(509),s=n(124),l=n(153),c=n(202),u=n(234),d=n(125),h=n(137),p=n(203);let m;!function(e){e.Call="call",e.ActiveCalls="active_calls"}(m||(m={}));class g extends c.a{static get instance(){return this._instance||(this._instance=new g,this._instance.start()),this._instance}constructor(){super(s.a),i()(this,"_activeCalls",new Set),i()(this,"calls",new Map),i()(this,"callListeners",new Map),i()(this,"onWidgets",(e=>{if(null===e)for(const e of this.matrixClient.getRooms())this.updateRoom(e);else{const t=this.matrixClient.getRoom(e);null!==t&&this.updateRoom(t)}})),i()(this,"onGroupCall",(e=>this.updateRoom(e.room)))}async onAction(){}async onReady(){for(const e of this.matrixClient.getRooms())this.updateRoom(e);this.matrixClient.on(a.b.Incoming,this.onGroupCall),this.matrixClient.on(a.b.Outgoing,this.onGroupCall),u.a.instance.on(l.b,this.onWidgets);const e=d.b.getValue("activeCallRoomIds");e.length&&await Promise.all([...e.map((async e=>{var t;o.a.log(`Cleaning up call state for room ${e}`),await(null===(t=this.getCall(e))||void 0===t?void 0:t.clean())})),d.b.setValue("activeCallRoomIds",null,h.a.DEVICE,[])])}async onNotReady(){for(const[e,t]of this.callListeners){for(const[n,r]of t)e.off(n,r);e.destroy()}this.callListeners.clear(),this.calls.clear(),this._activeCalls.clear(),this.matrixClient.off(a.b.Incoming,this.onGroupCall),this.matrixClient.off(a.b.Outgoing,this.onGroupCall),this.matrixClient.off(a.b.Ended,this.onGroupCall),u.a.instance.off(l.b,this.onWidgets)}get activeCalls(){return this._activeCalls}set activeCalls(e){this._activeCalls=e,this.emit(m.ActiveCalls,e),d.b.setValue("activeCallRoomIds",null,h.a.DEVICE,[...e].map((e=>e.roomId)))}updateRoom(e){if(!this.calls.has(e.roomId)){const t=p.a.get(e);if(t){const n=e=>{e===p.c.Connected?this.activeCalls=new Set([...this.activeCalls,t]):e===p.c.Disconnected&&(this.activeCalls=new Set([...this.activeCalls].filter((e=>e!==t))))},r=()=>{this.calls.delete(e.roomId);for(const[e,n]of this.callListeners.get(t))t.off(e,n);this.updateRoom(e)};t.on(p.b.ConnectionState,n),t.on(p.b.Destroy,r),this.calls.set(e.roomId,t),this.callListeners.set(t,new Map([[p.b.ConnectionState,n],[p.b.Destroy,r]]))}this.emit(m.Call,t,e.roomId)}}getCall(e){var t;return null!==(t=this.calls.get(e))&&void 0!==t?t:null}getActiveCall(e){const t=this.getCall(e);return null!==t&&this.activeCalls.has(t)?t:null}}i()(g,"_instance",void 0)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(241);function i(){const e=Object(r.c)();if(e){return!(!1===e.default)}return!0}},function(e,t,n){"use strict";n.r(t),n.d(t,"containsEmoji",(function(){return r}));const r=(e,t)=>t.some((t=>e.body&&e.body.includes(t)))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(120),i=n(151),o=n(141);const a=e=>e,s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;const[n,s]=Object(r.useState)(e?t(e.currentState):void 0),l=Object(r.useCallback)((()=>{e&&s(t(e.currentState))}),[e,t]);return Object(o.c)(null==e?void 0:e.currentState,i.b.Update,l),Object(r.useEffect)((()=>(l(),()=>{s(void 0)})),[l]),n}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return s})),n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return u})),n.d(t,"g",(function(){return d})),n.d(t,"b",(function(){return h})),n.d(t,"f",(function(){return p})),n.d(t,"e",(function(){return f})),n.d(t,"h",(function(){return _}));var r=n(16),i=n(121),o=n(125),a=n(469);const s="light",l={light:"light-high-contrast"};function c(e){return l[e]}function u(e){for(const t in l)if(l[t]===e)return t}function d(e){return Object.values(l).includes(e)}function h(){const e={light:Object(i.a)("Light"),"light-high-contrast":Object(i.a)("Light high contrast"),dark:Object(i.a)("Dark")},t=o.b.getValue("custom_themes"),n={};for(const{name:e}of t)n[`custom-${e}`]=e;return Object.assign({},n,e)}function p(){const e=Object.entries(h()).map((e=>({id:e[0],name:e[1]}))).filter((e=>!d(e.id))),t=e.filter((e=>!e.id.startsWith("custom-"))),n=e.filter((e=>!t.includes(e))).sort(((e,t)=>Object(r.h)(e.name,t.name)));return[...t,...n]}const m=["font-display","font-family","font-stretch","font-style","font-weight","font-variant","font-feature-settings","font-variation-settings","src","unicode-range"];function g(e){const{style:t}=document.body;function n(e,n){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];t.setProperty(`--${e}`,n),r&&(t.setProperty(`--${e}-0pct`,n+"00"),t.setProperty(`--${e}-15pct`,n+"26"),t.setProperty(`--${e}-50pct`,n+"7F"))}if(e.colors)for(const[t,r]of Object.entries(e.colors))if(Array.isArray(r))for(let e=0;e<r.length;e+=1)n(`${t}_${e}`,r[e],!1);else n(t,r);if(e.fonts){const{fonts:n}=e;if(n.faces){const e=n.faces.map((e=>{var t;const n=null===(t=e.src)||void 0===t?void 0:t.map((e=>{let t="";return e.format&&(t=`format("${e.format}")`),e.url?`url("${e.url}") ${t}`:e.local?`local("${e.local}") ${t}`:""})).join(", ");return`@font-face {${Object.keys(e).filter((e=>m.includes(e))).map((t=>{let r;return r="src"===t?n:"font-family"===t?`"${e[t]}"`:e[t],`${t}: ${r}`})).join(";")}}`})).join("\n"),t=document.createElement("style");t.setAttribute("title","custom-theme-font-faces"),t.setAttribute("type","text/css"),t.appendChild(document.createTextNode(e)),document.head.appendChild(t)}n.general&&t.setProperty("--font-family",n.general),n.monospace&&t.setProperty("--font-family-monospace",n.monospace)}}function f(e){const t=o.b.getValue("custom_themes");if(!t)throw new Error(`No custom themes set, can't set custom theme "${e}"`);const n=t.find((t=>t.name===e));if(!n){const n=t.map((e=>e.name)).join(", ");throw new Error(`Can't find custom theme "${e}", only know ${n}`)}return n}async function _(t){if(!t){t=(new a.a).getEffectiveTheme()}!function(){const e=Object.values(document.body.style);for(const t of e)t.startsWith("--")&&document.body.style.removeProperty(t);const t=document.querySelector("head > style[title='custom-theme-font-faces']");t&&t.remove()}();let n=t;if(t.startsWith("custom-")){const e=f(t.slice(7));n=e.is_dark?"dark-custom":"light-custom",g(e)}const r=new Map;if(Array.from(document.querySelectorAll("[data-mx-theme]")).forEach((e=>{r.set(e.dataset.mxTheme.toLowerCase(),e)})),!r.has(n))throw new Error("Unknown theme "+n);const i=r.get(n);return i.disabled=!1,new Promise(((t,n)=>{const o=function(){i.disabled=!1,r.forEach((e=>{e!=i&&(e.disabled=!0)}));const n=e.getComputedStyle(document.body);if(n.backgroundColor){document.querySelector('meta[name="theme-color"]').content=n.backgroundColor}t()},a=()=>Boolean([...document.styleSheets].find((e=>(null==e?void 0:e.href)===i.href)));!function(){if(a())return void o();let e=0;const t=window.setInterval((()=>{a()&&(clearInterval(t),i.onload=null,i.onerror=null,o()),e++,10===e&&(clearInterval(t),n())}),200);i.onload=()=>{clearInterval(t),o()},i.onerror=e=>{clearInterval(t),n(e)}}()}))}}).call(this,n(14))},,,function(e,t,n){"use strict";n.d(t,"d",(function(){return V})),n.d(t,"b",(function(){return ee})),n.d(t,"a",(function(){return te})),n.d(t,"e",(function(){return ne})),n.d(t,"c",(function(){return re}));var r=n(147),i=n(120),o=n.n(i),a=n(121),s=n(692),l=n(619),c=n(122),u=n(209);class d extends u.a{constructor(e,t){super(),this.setter=e,this.inverse=t}onChange(e,t,n){this.setter.call(c.a.get(),this.inverse?!n:n)}}var h=n(157);class p extends u.a{onChange(e,t,n){var r;null===(r=h.a.get())||void 0===r||r.reload()}}var m=n(124),g=n(128);class f extends u.a{constructor(){super()}onChange(e,t,n){m.a.dispatch({action:g.a.UpdateFontSize,size:n})}}var _=n(125);class b extends u.a{constructor(){super()}onChange(e,t,n){m.a.dispatch({action:g.a.UpdateSystemFont,useSystemFont:_.b.getValue("useSystemFont"),font:n})}}class v extends u.a{constructor(){super()}onChange(e,t,n){m.a.dispatch({action:g.a.UpdateSystemFont,useSystemFont:n,font:_.b.getValue("systemFont")})}}var y=n(137),E=n(205);class S extends u.a{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];super(),this.uiFeatureName=e,this.forcedValue=t}getValueOverride(e,t,n,r){return this.settingDisabled?this.forcedValue:null}get settingDisabled(){return!_.b.getValue(this.uiFeatureName)}}var w=n(156);class T extends u.a{constructor(e){super(),this.controllers=e}getValueOverride(e,t,n,r){for(const i of this.controllers){const o=i.getValueOverride(e,t,n,r);if(null!=o)return o}return null}onChange(e,t,n){for(const r of this.controllers)r.onChange(e,t,n)}get settingDisabled(){for(const e of this.controllers)if(e.settingDisabled)return!0;return!1}}var C=n(194);class x extends u.a{getValueOverride(e,t,n,r){return!this.prefersReducedMotion()&&null}get settingDisabled(){return this.prefersReducedMotion()}prefersReducedMotion(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}}class F extends u.a{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];super(),this.settingName=e,this.forcedValue=t,this.incompatibleValue=n}getValueOverride(e,t,n,r){return this.incompatibleSetting?this.forcedValue:null}get settingDisabled(){return this.incompatibleSetting}get incompatibleSetting(){return"function"==typeof this.incompatibleValue?this.incompatibleValue(_.b.getValue(this.settingName)):_.b.getValue(this.settingName)===this.incompatibleValue}}var D=n(466),k=n(208),O=n(131),I=n(136),A=n(1),R=n(560),N=n(200),M=n(248);const P=e=>{let{onFinished:t}=e;const n=c.a.get(),r=_.b.getValue("feature_sliding_sync_proxy_url"),i=Object(M.a)((()=>async function(e){await e.http.authedRequest(I.Method.Post,"/sync",void 0,void 0,{localTimeoutMs:1e4,prefix:"/_matrix/client/unstable/org.matrix.msc3575"}),A.a.info("server natively support sliding sync OK")}(n).then((()=>!0),(()=>!1))),[],null);let s;s=null===i?Object(a.a)("Checking…"):i?Object(a.a)("Your server has native support"):Object(a.a)("Your server lacks native support");const l=Object(N.a)({async deriveData(e){let{value:t}=e;try{return await async function(e,t){const n=new AbortController,r=window.setTimeout((()=>n.abort()),1e4),i=await fetch(e+"/client/server.json",{signal:n.signal});if(clearTimeout(r),200!=i.status)throw new Error(`proxyHealthCheck: proxy server returned HTTP ${i.status}`);const o=await i.json();if(o.server!==t)throw new Error(`proxyHealthCheck: client using ${t} but server is as ${o.server}`);A.a.info("sliding sync proxy is OK")}(t,c.a.get().baseUrl),{}}catch(e){return{error:e}}},rules:[{key:"required",test:async e=>{let{value:t}=e;return!!t||i},invalid:()=>Object(a.a)("Your server lacks native support, you must specify a proxy")},{key:"working",final:!0,test:async(e,t)=>{let{error:n}=t;return!n},valid:()=>Object(a.a)("Looks good"),invalid:e=>{let{error:t}=e;return null==t?void 0:t.message}}]});return o.a.createElement(R.a,{title:Object(a.a)("Sliding Sync configuration"),description:o.a.createElement("div",null,o.a.createElement("div",null,o.a.createElement("b",null,Object(a.a)("To disable you will need to log out and back in, use with caution!"))),s),placeholder:i?Object(a.a)("Proxy URL (optional)"):Object(a.a)("Proxy URL"),value:r,button:Object(a.a)("Enable"),validator:l,onFinished:(e,n)=>{e?(_.b.setValue("feature_sliding_sync_proxy_url",null,y.a.DEVICE,n),t(!0)):t(!1)}})};var L=n(127);class B extends u.a{async beforeChange(e,t,n){const{finished:r}=L.b.createDialog(P),[i]=await r;return n===i}async onChange(){var e;null===(e=h.a.get())||void 0===e||e.reload()}get settingDisabled(){return _.b.getValue("feature_sliding_sync")}}var U=n(460);class j extends u.a{get settingDisabled(){return!0}}var G=n(13),z=n.n(G),H=n(691);class q extends H.a{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];super(),this.settingName=e,this.watchers=t,this.unstableFeatures=n,this.forcedValue=r,z()(this,"enabled",void 0)}get disabled(){return!this.enabled}set disabled(e){if(!e===this.enabled)return;this.enabled=!e;const t=_.b.firstSupportedLevel(this.settingName),n=_.b.getValue(this.settingName,null);this.watchers.notifyUpdate(this.settingName,null,t,n)}async initMatrixClient(e,t){this.disabled=!0;let n=!0;for(const e of this.unstableFeatures)if(n=await this.client.doesServerSupportUnstableFeature(e),!n)break;this.disabled=!n}getValueOverride(e,t,n,r){return this.settingDisabled?this.forcedValue:null}get settingDisabled(){return this.disabled}}const V=new class{constructor(){z()(this,"watchers",new Map)}watchSetting(e,t,n){this.watchers.has(e)||this.watchers.set(e,new Map),this.watchers.get(e).has(t)||this.watchers.get(e).set(t,[]),this.watchers.get(e).get(t).push(n)}unwatchSetting(e){this.watchers.forEach((t=>{t.forEach((t=>{let n;for(;-1!==(n=t.indexOf(e));)t.splice(n,1)}))}))}notifyUpdate(e,t,n,r){if(!this.watchers.has(e))return;const i=this.watchers.get(e),o=[];null!==t&&i.has(t)&&o.push(...i.get(t)),t?i.has(null)&&o.push(...i.get(null)):o.push(...Array.from(i.values()).flat(1));for(const e of o)e(t,n,r)}},$=[y.a.DEVICE,y.a.ROOM_DEVICE,y.a.ROOM_ACCOUNT,y.a.ACCOUNT,y.a.CONFIG],K=[y.a.ROOM_ACCOUNT,y.a.ACCOUNT],W=[y.a.DEVICE,y.a.ROOM_DEVICE,y.a.ROOM_ACCOUNT,y.a.ACCOUNT,y.a.CONFIG,y.a.ROOM],Y=[y.a.DEVICE,y.a.ACCOUNT,y.a.CONFIG],Q=[y.a.DEVICE,y.a.CONFIG],X=[y.a.DEVICE],Z=[y.a.DEVICE,y.a.CONFIG],J=[y.a.CONFIG];let ee,te;!function(e){e[e.Messaging=0]="Messaging",e[e.Profile=1]="Profile",e[e.Spaces=2]="Spaces",e[e.Widgets=3]="Widgets",e[e.Rooms=4]="Rooms",e[e.VoiceAndVideo=5]="VoiceAndVideo",e[e.Moderation=6]="Moderation",e[e.Analytics=7]="Analytics",e[e.MessagePreviews=8]="MessagePreviews",e[e.Themes=9]="Themes",e[e.Encryption=10]="Encryption",e[e.Experimental=11]="Experimental",e[e.Developer=12]="Developer"}(ee||(ee={})),function(e){e.VoiceBroadcast="feature_voice_broadcast",e.VoiceBroadcastForceSmallChunks="feature_voice_broadcast_force_small_chunks"}(te||(te={}));const ne={[ee.Messaging]:Object(a.c)("Messaging"),[ee.Profile]:Object(a.c)("Profile"),[ee.Spaces]:Object(a.c)("Spaces"),[ee.Widgets]:Object(a.c)("Widgets"),[ee.Rooms]:Object(a.c)("Rooms"),[ee.VoiceAndVideo]:Object(a.c)("Voice & Video"),[ee.Moderation]:Object(a.c)("Moderation"),[ee.Analytics]:Object(a.c)("Analytics"),[ee.MessagePreviews]:Object(a.c)("Message Previews"),[ee.Themes]:Object(a.c)("Themes"),[ee.Encryption]:Object(a.c)("Encryption"),[ee.Experimental]:Object(a.c)("Experimental"),[ee.Developer]:Object(a.c)("Developer")},re={feature_video_rooms:{isFeature:!0,labsGroup:ee.VoiceAndVideo,displayName:Object(a.c)("Video rooms"),supportedLevels:Q,default:!1,controller:new p,betaInfo:{title:Object(a.c)("Video rooms"),caption:()=>o.a.createElement(o.a.Fragment,null,o.a.createElement("p",null,Object(a.a)("A new way to chat over voice and video in %(brand)s.",{brand:O.b.get().brand})),o.a.createElement("p",null,Object(a.a)("Video rooms are always-on VoIP channels embedded within a room in %(brand)s.",{brand:O.b.get().brand}))),faq:()=>O.b.get().bug_report_endpoint_url&&o.a.createElement(o.a.Fragment,null,o.a.createElement("h4",null,Object(a.a)("How can I create a video room?")),o.a.createElement("p",null,Object(a.a)("Use the “+” button in the room section of the left panel.")),o.a.createElement("h4",null,Object(a.a)("Can I use text chat alongside the video call?")),o.a.createElement("p",null,Object(a.a)("Yes, the chat timeline is displayed alongside the video."))),feedbackLabel:"video-room-feedback",feedbackSubheading:Object(a.c)("Thank you for trying the beta, please go into as much detail as you can so we can improve it."),image:n(1416),requiresRefresh:!0}},feature_exploring_public_spaces:{isFeature:!0,labsGroup:ee.Spaces,displayName:Object(a.c)("Explore public spaces in the new search dialog"),supportedLevels:Q,default:!1,controller:new q("feature_exploring_public_spaces",V,["org.matrix.msc3827.stable"])},feature_msc3531_hide_messages_pending_moderation:{isFeature:!0,labsGroup:ee.Moderation,controller:new p,displayName:Object(a.c)("Let moderators hide messages pending moderation."),supportedLevels:Q,default:!1},feature_report_to_moderators:{isFeature:!0,labsGroup:ee.Moderation,displayName:Object(a.c)("Report to moderators"),description:Object(a.c)("In rooms that support moderation, the “Report” button will let you report abuse to room moderators."),supportedLevels:Q,default:!1},feature_latex_maths:{isFeature:!0,labsGroup:ee.Messaging,displayName:Object(a.c)("Render LaTeX maths in messages"),supportedLevels:Q,default:!1},feature_pinning:{isFeature:!0,labsGroup:ee.Messaging,displayName:Object(a.c)("Message Pinning"),supportedLevels:Q,default:!1},feature_wysiwyg_composer:{isFeature:!0,labsGroup:ee.Messaging,displayName:Object(a.c)("Rich text editor"),description:Object(a.c)("Use rich text instead of Markdown in the message composer."),supportedLevels:Q,default:!1},feature_state_counters:{isFeature:!0,labsGroup:ee.Rooms,displayName:Object(a.c)("Render simple counters in room header"),supportedLevels:Q,default:!1},feature_mjolnir:{isFeature:!0,labsGroup:ee.Moderation,displayName:Object(a.c)("New ways to ignore people"),description:Object(a.c)("Currently experimental."),supportedLevels:Q,default:!1},feature_custom_themes:{isFeature:!0,labsGroup:ee.Themes,displayName:Object(a.c)("Support adding custom themes"),supportedLevels:Q,default:!1},feature_roomlist_preview_reactions_dms:{isFeature:!0,labsGroup:ee.MessagePreviews,displayName:Object(a.c)("Show message previews for reactions in DMs"),supportedLevels:Q,default:!1,controller:new F("feature_roomlist_preview_reactions_all")},feature_roomlist_preview_reactions_all:{isFeature:!0,labsGroup:ee.MessagePreviews,displayName:Object(a.c)("Show message previews for reactions in all rooms"),supportedLevels:Q,default:!1},feature_dehydration:{isFeature:!0,labsGroup:ee.Encryption,displayName:Object(a.c)("Offline encrypted messaging using dehydrated devices"),supportedLevels:Q,default:!1},useOnlyCurrentProfiles:{supportedLevels:Y,displayName:Object(a.c)("Show current avatar and name for users in message history"),default:!1},mjolnirRooms:{supportedLevels:[y.a.ACCOUNT],default:[]},mjolnirPersonalRoom:{supportedLevels:[y.a.ACCOUNT],default:null},feature_html_topic:{isFeature:!0,labsGroup:ee.Rooms,supportedLevels:Q,displayName:Object(a.c)("Show HTML representation of room topics"),default:!1},feature_bridge_state:{isFeature:!0,labsGroup:ee.Rooms,supportedLevels:Q,displayName:Object(a.c)("Show info about bridges in room settings"),default:!1},feature_breadcrumbs_v2:{isFeature:!0,labsGroup:ee.Rooms,supportedLevels:Q,displayName:Object(a.c)("Use new room breadcrumbs"),default:!1},feature_right_panel_default_open:{isFeature:!0,labsGroup:ee.Rooms,supportedLevels:Q,displayName:Object(a.c)("Right panel stays open"),description:Object(a.c)("Defaults to room member list."),default:!1},feature_poll_history:{isFeature:!0,labsGroup:ee.Rooms,supportedLevels:Q,displayName:Object(a.c)("Polls history"),description:Object(a.c)("View a list of polls in a room. (Under active development)"),default:!1},feature_jump_to_date:{isFeature:!0,labsGroup:ee.Messaging,displayName:Object(a.c)("Jump to date (adds /jumptodate and jump to date headers)"),supportedLevels:Q,default:!1,controller:new q("feature_jump_to_date",V,["org.matrix.msc3030"])},"RoomList.backgroundImage":{supportedLevels:Y,default:null},sendReadReceipts:{supportedLevels:Y,displayName:Object(a.c)("Send read receipts"),default:!0},feature_sliding_sync:{isFeature:!0,labsGroup:ee.Developer,supportedLevels:Z,displayName:Object(a.c)("Sliding Sync mode"),description:Object(a.c)("Under active development, cannot be disabled."),shouldWarn:!0,default:!1,controller:new B},feature_sliding_sync_proxy_url:{supportedLevels:Z,default:""},feature_element_call_video_rooms:{isFeature:!0,supportedLevels:Q,labsGroup:ee.VoiceAndVideo,displayName:Object(a.c)("Element Call video rooms"),controller:new p,default:!1},feature_group_calls:{isFeature:!0,supportedLevels:Q,labsGroup:ee.VoiceAndVideo,displayName:Object(a.c)("New group call experience"),controller:new p,default:!1},feature_location_share_live:{isFeature:!0,labsGroup:ee.Messaging,supportedLevels:Q,displayName:Object(a.c)("Live Location Sharing"),description:Object(a.c)("Temporary implementation. Locations persist in room history."),shouldWarn:!0,default:!1},feature_dynamic_room_predecessors:{isFeature:!0,labsGroup:ee.Rooms,supportedLevels:Q,displayName:Object(a.c)("Dynamic room predecessors"),description:Object(a.c)("Enable MSC3946 (to support late-arriving room archives)"),shouldWarn:!0,default:!1},feature_favourite_messages:{isFeature:!0,labsGroup:ee.Messaging,supportedLevels:Q,displayName:Object(a.c)("Favourite Messages"),description:Object(a.c)("Under active development."),default:!1},[te.VoiceBroadcast]:{isFeature:!0,labsGroup:ee.Messaging,supportedLevels:Q,displayName:Object(a.c)("Voice broadcast"),default:!1},[te.VoiceBroadcastForceSmallChunks]:{supportedLevels:X,displayName:Object(a.c)("Force 15s voice broadcast chunk length"),default:!1},feature_new_device_manager:{isFeature:!0,labsGroup:ee.Experimental,supportedLevels:Q,displayName:Object(a.c)("Use new session manager"),default:!1,betaInfo:{title:Object(a.c)("New session manager"),caption:()=>o.a.createElement(o.a.Fragment,null,o.a.createElement("p",null,Object(a.a)("Have greater visibility and control over all your sessions.")),o.a.createElement("p",null,Object(a.a)("Our new sessions manager provides better visibility of all your sessions, and greater control over them including the ability to remotely toggle push notifications.")))}},feature_rust_crypto:{isFeature:!0,labsGroup:ee.Developer,supportedLevels:Z,displayName:Object(a.c)("Rust cryptography implementation"),description:Object(a.c)("Under active development. Can currently only be enabled via config.json"),default:!1,controller:new j},baseFontSize:{displayName:Object(a.c)("Font size"),supportedLevels:Y,default:U.a.DEFAULT_SIZE,controller:new f},useCustomFontSize:{displayName:Object(a.c)("Use custom size"),supportedLevels:Y,default:!1},"MessageComposerInput.suggestEmoji":{supportedLevels:Y,displayName:Object(a.c)("Enable Emoji suggestions while typing"),default:!0,invertedSettingName:"MessageComposerInput.dontSuggestEmoji"},"MessageComposerInput.showStickersButton":{supportedLevels:Y,displayName:Object(a.c)("Show stickers button"),default:!0,controller:new S(w.b.Widgets,!1)},"MessageComposerInput.showPollsButton":{supportedLevels:Y,displayName:Object(a.c)("Show polls button"),default:!0},"MessageComposerInput.insertTrailingColon":{supportedLevels:Y,displayName:Object(a.c)("Insert a trailing colon after user mentions at the start of a message"),default:!0},"Notifications.alwaysShowBadgeCounts":{supportedLevels:K,default:!1},feature_hidebold:{isFeature:!0,supportedLevels:Z,displayName:Object(a.c)("Hide notification dot (only display counters badges)"),labsGroup:ee.Rooms,default:!1},useCompactLayout:{supportedLevels:X,displayName:Object(a.c)("Use a more compact 'Modern' layout"),default:!1,controller:new F("layout",!1,(e=>e!==C.a.Group))},showRedactions:{supportedLevels:W,displayName:Object(a.c)("Show a placeholder for removed messages"),default:!0,invertedSettingName:"hideRedactions"},showJoinLeaves:{supportedLevels:W,displayName:Object(a.c)("Show join/leave messages (invites/removes/bans unaffected)"),default:!0,invertedSettingName:"hideJoinLeaves"},showAvatarChanges:{supportedLevels:W,displayName:Object(a.c)("Show avatar changes"),default:!0,invertedSettingName:"hideAvatarChanges"},showDisplaynameChanges:{supportedLevels:W,displayName:Object(a.c)("Show display name changes"),default:!0,invertedSettingName:"hideDisplaynameChanges"},showReadReceipts:{supportedLevels:$,displayName:Object(a.c)("Show read receipts sent by other users"),default:!0,invertedSettingName:"hideReadReceipts"},showTwelveHourTimestamps:{supportedLevels:Y,displayName:Object(a.c)("Show timestamps in 12 hour format (e.g. 2:30pm)"),default:!1},alwaysShowTimestamps:{supportedLevels:Y,displayName:Object(a.c)("Always show message timestamps"),default:!1},autoplayGifs:{supportedLevels:Y,displayName:Object(a.c)("Autoplay GIFs"),default:!1},autoplayVideo:{supportedLevels:Y,displayName:Object(a.c)("Autoplay videos"),default:!1},enableSyntaxHighlightLanguageDetection:{supportedLevels:Y,displayName:Object(a.c)("Enable automatic language detection for syntax highlighting"),default:!1},expandCodeByDefault:{supportedLevels:Y,displayName:Object(a.c)("Expand code blocks by default"),default:!1},showCodeLineNumbers:{supportedLevels:Y,displayName:Object(a.c)("Show line numbers in code blocks"),default:!0},scrollToBottomOnMessageSent:{supportedLevels:Y,displayName:Object(a.c)("Jump to the bottom of the timeline when you send a message"),default:!0},"Pill.shouldShowPillAvatar":{supportedLevels:Y,displayName:Object(a.c)("Show avatars in user and room mentions"),default:!0,invertedSettingName:"Pill.shouldHidePillAvatar"},"TextualBody.enableBigEmoji":{supportedLevels:Y,displayName:Object(a.c)("Enable big emoji in chat"),default:!0,invertedSettingName:"TextualBody.disableBigEmoji"},"MessageComposerInput.isRichTextEnabled":{supportedLevels:Y,default:!1},"MessageComposer.showFormatting":{supportedLevels:Y,default:!1},sendTypingNotifications:{supportedLevels:Y,displayName:Object(a.c)("Send typing notifications"),default:!0,invertedSettingName:"dontSendTypingNotifications"},showTypingNotifications:{supportedLevels:Y,displayName:Object(a.c)("Show typing notifications"),default:!0},ctrlFForSearch:{supportedLevels:Y,displayName:E.a?Object(a.c)("Use Command + F to search timeline"):Object(a.c)("Use Ctrl + F to search timeline"),default:!1},"MessageComposerInput.ctrlEnterToSend":{supportedLevels:Y,displayName:E.a?Object(a.c)("Use Command + Enter to send a message"):Object(a.c)("Use Ctrl + Enter to send a message"),default:!1},"MessageComposerInput.surroundWith":{supportedLevels:Y,displayName:Object(a.c)("Surround selected text when typing special characters"),default:!1},"MessageComposerInput.autoReplaceEmoji":{supportedLevels:Y,displayName:Object(a.c)("Automatically replace plain text Emoji"),default:!1},"MessageComposerInput.useMarkdown":{supportedLevels:Y,displayName:Object(a.c)("Enable Markdown"),description:()=>Object(a.a)("Start messages with <code>/plain</code> to send without markdown and <code>/md</code> to send with.",{},{code:e=>o.a.createElement("code",null,e)}),default:!0},"VideoView.flipVideoHorizontally":{supportedLevels:Y,displayName:Object(a.c)("Mirror local video feed"),default:!1},theme:{supportedLevels:Y,default:"light",controller:new l.a},custom_themes:{supportedLevels:Y,default:[]},use_system_theme:{supportedLevels:X,default:!0,displayName:Object(a.c)("Match system theme")},useSystemFont:{supportedLevels:X,default:!1,displayName:Object(a.c)("Use a system font"),controller:new v},systemFont:{supportedLevels:X,default:"",displayName:Object(a.c)("System font name"),controller:new b},webRtcAllowPeerToPeer:{supportedLevels:Z,displayName:Object(a.c)("Allow Peer-to-Peer for 1:1 calls"),description:Object(a.c)("When enabled, the other party might be able to see your IP address"),default:!0,invertedSettingName:"webRtcForceTURN"},webrtc_audiooutput:{supportedLevels:X,default:"default"},webrtc_audioinput:{supportedLevels:X,default:"default"},webrtc_videoinput:{supportedLevels:X,default:"default"},webrtc_audio_autoGainControl:{supportedLevels:X,displayName:Object(a.c)("Automatic gain control"),default:!0},webrtc_audio_echoCancellation:{supportedLevels:X,displayName:Object(a.c)("Echo cancellation"),default:!0},webrtc_audio_noiseSuppression:{supportedLevels:X,displayName:Object(a.c)("Noise suppression"),default:!0},language:{supportedLevels:Z,default:"en"},breadcrumb_rooms:{supportedLevels:[y.a.ACCOUNT],default:[]},recent_emoji:{supportedLevels:[y.a.ACCOUNT],default:[]},"SpotlightSearch.recentSearches":{supportedLevels:[y.a.ACCOUNT],default:[]},"SpotlightSearch.showNsfwPublicRooms":{supportedLevels:Y,displayName:Object(a.c)("Show NSFW content"),default:!1},room_directory_servers:{supportedLevels:[y.a.ACCOUNT],default:[]},integrationProvisioning:{supportedLevels:[y.a.ACCOUNT],default:!0},allowedWidgets:{supportedLevels:[y.a.ROOM_ACCOUNT,y.a.ROOM_DEVICE],supportedLevelsAreOrdered:!0,default:{}},analyticsOptIn:{supportedLevels:Z,default:!1},pseudonymousAnalyticsOptIn:{supportedLevels:[y.a.ACCOUNT],displayName:Object(a.c)("Send analytics data"),default:null},deviceClientInformationOptIn:{supportedLevels:[y.a.ACCOUNT],displayName:Object(a.c)("Record the client name, version, and url to recognise sessions more easily in session manager"),default:!1},"FTUE.useCaseSelection":{supportedLevels:Y,default:null},autocompleteDelay:{supportedLevels:Z,default:200},readMarkerInViewThresholdMs:{supportedLevels:Z,default:3e3},readMarkerOutOfViewThresholdMs:{supportedLevels:Z,default:3e4},blacklistUnverifiedDevices:{supportedLevels:[y.a.ROOM_DEVICE,y.a.DEVICE],supportedLevelsAreOrdered:!0,displayName:{default:Object(a.c)("Never send encrypted messages to unverified sessions from this session"),"room-device":Object(a.c)("Never send encrypted messages to unverified sessions in this room from this session")},default:!1,controller:new S(w.b.AdvancedEncryption)},urlPreviewsEnabled:{supportedLevels:W,displayName:{default:Object(a.c)("Enable inline URL previews by default"),"room-account":Object(a.c)("Enable URL previews for this room (only affects you)"),room:Object(a.c)("Enable URL previews by default for participants in this room")},default:!0,controller:new S(w.b.URLPreviews)},urlPreviewsEnabled_e2ee:{supportedLevels:[y.a.ROOM_DEVICE,y.a.ROOM_ACCOUNT],displayName:{"room-account":Object(a.c)("Enable URL previews for this room (only affects you)")},default:!1,controller:new S(w.b.URLPreviews)},notificationsEnabled:{supportedLevels:X,default:!1,controller:new s.b},deviceNotificationsEnabled:{supportedLevels:[y.a.DEVICE],default:!0},notificationSound:{supportedLevels:K,default:!1},notificationBodyEnabled:{supportedLevels:X,default:!0,controller:new s.a},audioNotificationsEnabled:{supportedLevels:X,default:!0},enableWidgetScreenshots:{supportedLevels:Y,displayName:Object(a.c)("Enable widget screenshots on supported widgets"),default:!1},promptBeforeInviteUnknownUsers:{supportedLevels:Y,displayName:Object(a.c)("Prompt before sending invites to potentially invalid matrix IDs"),default:!0},widgetOpenIDPermissions:{supportedLevels:X,default:{allow:[],deny:[]}},breadcrumbs:{supportedLevels:Y,displayName:Object(a.c)("Show shortcuts to recently viewed rooms above the room list"),default:!0,controller:new F("feature_breadcrumbs_v2",!0)},"FTUE.userOnboardingButton":{supportedLevels:Y,displayName:Object(a.c)("Show shortcut to welcome checklist above the room list"),default:!0},showHiddenEventsInTimeline:{displayName:Object(a.c)("Show hidden events in timeline"),supportedLevels:X,default:!1},lowBandwidth:{supportedLevels:Z,displayName:Object(a.c)("Low bandwidth mode"),description:Object(a.c)("Requires compatible homeserver."),default:!1,controller:new p,shouldWarn:!0},fallbackICEServerAllowed:{supportedLevels:X,displayName:Object(a.c)("Allow fallback call assist server (turn.matrix.org)"),description:Object(a.c)("Only applies if your homeserver does not offer one. Your IP address would be shared during a call."),default:null},showImages:{supportedLevels:Y,displayName:Object(a.c)("Show previews/thumbnails for images"),default:!0},"RightPanel.phasesGlobal":{supportedLevels:[y.a.DEVICE],default:null},"RightPanel.phases":{supportedLevels:[y.a.ROOM_DEVICE],default:null},enableEventIndexing:{supportedLevels:X,displayName:Object(a.c)("Enable message search in encrypted rooms"),default:!0},crawlerSleepTime:{supportedLevels:X,displayName:Object(a.c)("How fast should messages be downloaded."),default:3e3},showCallButtonsInComposer:{supportedLevels:Z,default:!0,controller:new S(w.b.Voip)},"e2ee.manuallyVerifyAllSessions":{supportedLevels:X,displayName:Object(a.c)("Manually verify all remote sessions"),default:!1,controller:new T([new S(w.b.AdvancedEncryption),new d(r.d.prototype.setCryptoTrustCrossSignedDevices,!0)])},ircDisplayNameWidth:{supportedLevels:[y.a.ROOM_DEVICE,y.a.DEVICE],supportedLevelsAreOrdered:!0,displayName:Object(a.c)("IRC display name width"),default:80},layout:{supportedLevels:Y,default:C.a.Group},"Images.size":{supportedLevels:Y,default:D.a.Normal},showChatEffects:{supportedLevels:W,displayName:Object(a.c)("Show chat effects (animations when receiving e.g. confetti)"),default:!0,controller:new x},"Performance.addSendMessageTimingMetadata":{supportedLevels:[y.a.CONFIG],default:!1},"Widgets.pinned":{supportedLevels:K,default:{}},"Widgets.layout":{supportedLevels:K,default:{}},"Spaces.allRoomsInHome":{displayName:Object(a.c)("Show all rooms in Home"),description:Object(a.c)("All rooms you're in will appear in Home."),supportedLevels:Y,default:!1},"Spaces.enabledMetaSpaces":{supportedLevels:Y,default:{[k.a.Home]:!0}},"Spaces.showPeopleInSpace":{supportedLevels:[y.a.ROOM_ACCOUNT],default:!0},developerMode:{displayName:Object(a.c)("Developer mode"),supportedLevels:Y,default:!1},automaticErrorReporting:{displayName:Object(a.c)("Automatically send debug logs on any error"),supportedLevels:Y,default:!1,controller:new p},automaticDecryptionErrorReporting:{displayName:Object(a.c)("Automatically send debug logs on decryption errors"),supportedLevels:X,default:!1,controller:new p},automaticKeyBackNotEnabledReporting:{displayName:Object(a.c)("Automatically send debug logs when key backup is not functioning"),supportedLevels:Z,default:!1},debug_scroll_panel:{supportedLevels:X,default:!1},debug_timeline_panel:{supportedLevels:X,default:!1},debug_registration:{supportedLevels:X,default:!1},debug_animation:{supportedLevels:X,default:!1},debug_legacy_call_handler:{supportedLevels:X,default:!1},audioInputMuted:{supportedLevels:X,default:!1},videoInputMuted:{supportedLevels:X,default:!1},activeCallRoomIds:{supportedLevels:X,default:[]},[w.b.RoomHistorySettings]:{supportedLevels:J,default:!0},[w.b.AdvancedEncryption]:{supportedLevels:J,default:!0},[w.b.URLPreviews]:{supportedLevels:J,default:!0},[w.b.Widgets]:{supportedLevels:J,default:!0},[w.b.Voip]:{supportedLevels:J,default:!0},[w.b.Feedback]:{supportedLevels:J,default:!0},[w.b.Registration]:{supportedLevels:J,default:!0},[w.b.PasswordReset]:{supportedLevels:J,default:!0},[w.b.Deactivate]:{supportedLevels:J,default:!0},[w.b.ShareQRCode]:{supportedLevels:J,default:!0},[w.b.ShareSocial]:{supportedLevels:J,default:!0},[w.b.IdentityServer]:{supportedLevels:J,default:!0,controller:new S(w.b.ThirdPartyID)},[w.b.ThirdPartyID]:{supportedLevels:J,default:!0},[w.b.AdvancedSettings]:{supportedLevels:J,default:!0},[w.b.TimelineEnableRelativeDates]:{supportedLevels:J,default:!0},[w.b.BulkUnverifiedSessionsReminder]:{supportedLevels:J,default:!0},"Electron.autoLaunch":{supportedLevels:[y.a.PLATFORM],displayName:Object(a.c)("Start automatically after system login"),default:!1},"Electron.warnBeforeExit":{supportedLevels:[y.a.PLATFORM],displayName:Object(a.c)("Warn before quitting"),default:!0},"Electron.alwaysShowMenuBar":{supportedLevels:[y.a.PLATFORM],displayName:Object(a.c)("Always show the window menu bar"),default:!1},"Electron.showTrayIcon":{supportedLevels:[y.a.PLATFORM],displayName:Object(a.c)("Show tray icon and minimise window to it on close"),default:!0},"Electron.enableHardwareAcceleration":{supportedLevels:[y.a.PLATFORM],displayName:Object(a.c)("Enable hardware acceleration"),default:!0}}},function(e,t,n){"use strict";n.d(t,"e",(function(){return T})),n.d(t,"f",(function(){return C})),n.d(t,"g",(function(){return F})),n.d(t,"d",(function(){return D})),n.d(t,"a",(function(){return I})),n.d(t,"b",(function(){return A})),n.d(t,"c",(function(){return R}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(1),l=n(187);class c{constructor(e){i()(this,"relations",void 0),this.relations=e.filter((e=>!!e))}getRelations(){return this.relations.reduce(((e,t)=>[...e,...t.getRelations()]),[])}on(e,t){this.relations.forEach((n=>n.on(e,t)))}off(e,t){this.relations.forEach((n=>n.off(e,t)))}}var u=n(447),d=n(55),h=n(376);class p extends u.a{get answerIds(){return this.internalAnswerIds}get spoiled(){return this.internalSpoiled}constructor(e){super(e),i()(this,"internalAnswerIds",[]),i()(this,"internalSpoiled",!1),i()(this,"pollEventId",void 0);const t=this.wireContent["m.relates_to"];if(!d.d.matches(null==t?void 0:t.rel_type)||"string"!=typeof(null==t?void 0:t.event_id))throw new h.a("Relationship must be a reference to an event");this.pollEventId=t.event_id,this.validateAgainst(null)}validateAgainst(e){var t;const n=l.d.findIn(this.wireContent);if(!Array.isArray(null==n?void 0:n.answers))return this.internalSpoiled=!0,void(this.internalAnswerIds=[]);let r=null!==(t=null==n?void 0:n.answers)&&void 0!==t?t:[];if(r.some((e=>"string"!=typeof e))||0===r.length)return this.internalSpoiled=!0,void(this.internalAnswerIds=[]);if(e){if(r.some((t=>!e.answers.some((e=>e.id===t)))))return this.internalSpoiled=!0,void(this.internalAnswerIds=[]);r=r.slice(0,e.maxSelections)}this.internalAnswerIds=r,this.internalSpoiled=!1}isEquivalentTo(e){return Object(d.e)(e,l.d)}serialize(){return{type:l.d.name,content:{"m.relates_to":{rel_type:d.d.name,event_id:this.pollEventId},[l.d.name]:{answers:this.spoiled?void 0:this.answerIds}}}}static from(e,t){return new p({type:l.d.name,content:{"m.relates_to":{rel_type:d.d.name,event_id:t},[l.d.name]:{answers:e}}})}}var m=n(410),g=n(121),f=n(127),_=n(211),b=n(133),v=n(144),y=n(741),E=n(122),S=n(134),w=n(938);function T(e,t){if(!e.getId())return s.a.warn("findTopAnswer: Poll event needs an event ID to fetch relations in order to determine the top answer - assuming no best answer"),"";const n=e.unstableExtensibleEvent;if(null==n||!n.isEquivalentTo(l.e))return s.a.warn("Failed to parse poll to determine top answer - assuming no best answer"),"";const r=R(A(I(t)),n),i=Math.max(...r.values()),o=[];for(const[e,t]of r)t==i&&o.push(e);const a=o.map((e=>{var t,r;return null!==(t=null===(r=n.answers.find((t=>t.id===e)))||void 0===r?void 0:r.text)&&void 0!==t?t:""}));return Object(_.b)(a,3)}function C(e,t){const n=t.getRoom(e.getRoomId()),r=null==n?void 0:n.polls.get(e.getId());return!(!r||r.isFetchingResponses)&&r.isEnded}function x(e,t){if(!t)return!1;const n=e.getId();if(!n)return!1;const r=function(e,t){const n=[],r=e(t,"m.reference",l.d.name);r&&n.push(r);const i=e(t,"m.reference",l.d.altName);return i&&n.push(i),new c(n)}(t,n);return r.getRelations().length>0}function F(e,t){var n,r;x(e,t)?f.b.createDialog(v.a,{title:Object(g.a)("Can't edit poll"),description:Object(g.a)("Sorry, you can't edit a poll after votes have been cast.")}):f.b.createDialog(y.a,{room:E.a.get().getRoom(e.getRoomId()),threadId:null!==(n=null===(r=e.getThread())||void 0===r?void 0:r.id)&&void 0!==n?n:null,editingMxEvent:e},"mx_CompoundDialog",!1,!0)}class D extends a.a.Component{constructor(e){super(e),i()(this,"context",void 0),i()(this,"seenEventIds",[]),i()(this,"onResponsesChange",(e=>{this.setState({voteRelations:e}),this.onRelationsChange()})),i()(this,"onRelationsChange",(()=>{this.unselectIfNewEventFromMe()})),this.state={selected:null,pollInitialised:!1}}componentDidMount(){const e=this.context.getRoom(this.props.mxEvent.getRoomId()),t=null==e?void 0:e.polls.get(this.props.mxEvent.getId());t?this.setPollInstance(t):null==e||e.on(m.b.New,this.setPollInstance.bind(this))}componentWillUnmount(){this.removeListeners()}async setPollInstance(e){if(e.pollId!==this.props.mxEvent.getId())return;this.setState({poll:e},(()=>{this.addListeners()}));const t=await e.getResponses();this.setState({pollInitialised:!0,voteRelations:t})}addListeners(){var e,t,n;null===(e=this.state.poll)||void 0===e||e.on(m.b.Responses,this.onResponsesChange),null===(t=this.state.poll)||void 0===t||t.on(m.b.End,this.onRelationsChange),null===(n=this.state.poll)||void 0===n||n.on(m.b.UndecryptableRelations,this.render.bind(this))}removeListeners(){this.state.poll&&(this.state.poll.off(m.b.Responses,this.onResponsesChange),this.state.poll.off(m.b.End,this.onRelationsChange),this.state.poll.off(m.b.UndecryptableRelations,this.render.bind(this)))}selectOption(e){var t,n;if(null!==(t=this.state.poll)&&void 0!==t&&t.isEnded)return;const r=this.collectUserVotes(),i=this.context.getSafeUserId();if(e===(null===(n=r.get(i))||void 0===n?void 0:n.answers[0]))return;const o=p.from([e],this.props.mxEvent.getId()).serialize();this.context.sendEvent(this.props.mxEvent.getRoomId(),o.type,o.content).catch((e=>{console.error("Failed to submit poll response event:",e),f.b.createDialog(v.a,{title:Object(g.a)("Vote not registered"),description:Object(g.a)("Sorry, your vote was not registered. Please try again.")})})),this.setState({selected:e})}collectUserVotes(){return this.state.voteRelations?A(I(this.state.voteRelations),this.context.getUserId(),this.state.selected):new Map}unselectIfNewEventFromMe(){var e;const t=((null===(e=this.state.voteRelations)||void 0===e?void 0:e.getRelations())||[]).filter((e=>!this.seenEventIds.includes(e.getId())));let n=this.state.selected;if(t.length>0)for(const e of t)e.getSender()===this.context.getUserId()&&(n=null);const r=t.map((e=>e.getId()));this.seenEventIds=this.seenEventIds.concat(r),this.setState({selected:n})}totalVotes(e){let t=0;for(const n of e.values())t+=n;return t}render(){var e;const{poll:t,pollInitialised:n}=this.state;if(null==t||!t.pollEvent)return null;const r=t.pollEvent,i=this.props.mxEvent.getId(),o=!n||t.isFetchingResponses,s=this.collectUserVotes(),c=R(s,r),u=this.totalVotes(c),d=Math.max(...c.values()),h=this.context.getUserId(),p=null==s||null===(e=s.get(h))||void 0===e?void 0:e.answers[0],m=l.b.matches(r.kind.name),f=t.isEnded||m&&void 0!==p;let _;_=f&&t.undecryptableRelationsCount?Object(g.a)("Due to decryption errors, some votes may not be counted"):t.isEnded?Object(g.a)("Final result based on %(count)s votes",{count:u}):m?void 0===p?0===u?Object(g.a)("No votes cast"):Object(g.a)("%(count)s votes cast. Vote to see the results",{count:u}):Object(g.a)("Based on %(count)s votes",{count:u}):Object(g.a)("Results will be visible when the poll is ended");const b=this.props.mxEvent.replacingEvent()?a.a.createElement("span",{className:"mx_MPollBody_edited"}," (",Object(g.a)("edited"),")"):null;return a.a.createElement("div",{className:"mx_MPollBody"},a.a.createElement("h2",{"data-testid":"pollQuestion"},r.question.text,b),a.a.createElement("div",{className:"mx_MPollBody_allOptions"},r.answers.map((e=>{let n=0;var r;f&&(n=null!==(r=c.get(e.id))&&void 0!==r?r:0);const o=!t.isEnded&&p===e.id||t.isEnded&&n===d;return a.a.createElement(w.a,{key:e.id,pollId:i,answer:e,isChecked:o,isEnded:t.isEnded,voteCount:n,totalVoteCount:u,displayVoteCount:f,onOptionSelected:this.selectOption.bind(this)})}))),a.a.createElement("div",{"data-testid":"totalVotes",className:"mx_MPollBody_totalVotes"},_,o&&a.a.createElement(S.a,{w:16,h:16})))}}i()(D,"contextType",b.a);class k{constructor(e,t,n){this.ts=e,this.sender=t,this.answers=n}}function O(e){const t=e.unstableExtensibleEvent;if(null==t||!t.isEquivalentTo(l.d))throw new Error("Failed to parse Poll Response Event to determine user response");return new k(e.getTs(),e.getSender(),t.answerIds)}function I(e){return e?e.getRelations().map(O):[]}function A(e,t,n){const r=new Map;for(const t of e){const e=r.get(t.sender);(!e||e.ts<t.ts)&&r.set(t.sender,t)}return n&&t&&r.set(t,new k(0,t,[n])),r}function R(e,t){const n=new Map;for(const r of e.values()){const e=p.from(r.answers,"$irrelevant");if(e.validateAgainst(t),!e.spoiled)for(const t of e.answerIds)n.has(t)?n.set(t,n.get(t)+1):n.set(t,1)}return n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(13),i=n.n(r),o=n(505),a=n(170);class s{constructor(e,t){this.filterJson=e,this.userId=t}check(e){var t,n;const r=(null===(t=e.getUnsigned())||void 0===t?void 0:t["m.relations"])||{},i=Object.keys(r),o=[];return this.userId&&null!=r&&null!==(n=r[a.d.name])&&void 0!==n&&n.current_user_participated&&o.push(this.userId),this.checkFields(e.getRoomId(),e.getSender(),e.getType(),!!e.getContent()&&void 0!==e.getContent().url,i,o)}toJSON(){return{types:this.filterJson.types||null,not_types:this.filterJson.not_types||[],rooms:this.filterJson.rooms||null,not_rooms:this.filterJson.not_rooms||[],senders:this.filterJson.senders||null,not_senders:this.filterJson.not_senders||[],contains_url:this.filterJson.contains_url||null,[a.b.name]:this.filterJson[a.b.name]||[],[a.a.name]:this.filterJson[a.a.name]||[]}}checkFields(e,t,n,r,i,o){const s={rooms:function(t){return e===t},senders:function(e){return t===e},types:function(e){return function(e,t){if(t.endsWith("*")){const n=t.slice(0,-1);return e.slice(0,n.length)===n}return e===t}(n,e)}};for(const e in s){const t=s[e],n="not_"+e,r=this.filterJson[n];if(null!=r&&r.some(t))return!1;const i=this.filterJson[e];if(i&&!i.some(t))return!1}const l=this.filterJson.contains_url;if(void 0!==l&&l!==r)return!1;const c=this.filterJson[a.a.name];if(void 0!==c&&!this.arrayMatchesFilter(c,i))return!1;const u=this.filterJson[a.b.name];return!(void 0!==u&&!this.arrayMatchesFilter(u,o))}arrayMatchesFilter(e,t){return t.length>0&&e.every((e=>t.includes(e)))}filter(e){return e.filter(this.check,this)}limit(){return void 0!==this.filterJson.limit?this.filterJson.limit:10}}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){const r=t.split(".");let i=e;for(let e=0;e<r.length-1;e++)i[r[e]]||(i[r[e]]={}),i=i[r[e]];i[r[r.length-1]]=n}class d{static fromJson(e,t,n){const r=new d(e,t);return r.setDefinition(n),r}constructor(e,t){this.userId=e,this.filterId=t,i()(this,"definition",{}),i()(this,"roomFilter",void 0),i()(this,"roomTimelineFilter",void 0)}getFilterId(){return this.filterId}getDefinition(){return this.definition}setDefinition(e){this.definition=e;const t=e.room,n={};t&&(t.rooms&&(n.rooms=t.rooms),t.rooms&&(n.not_rooms=t.not_rooms)),this.roomFilter=new s(n,this.userId),this.roomTimelineFilter=new s((null==t?void 0:t.timeline)||{},this.userId)}getRoomTimelineFilterComponent(){return this.roomTimelineFilter}filterRoomTimeline(e){return this.roomFilter&&(e=this.roomFilter.filter(e)),this.roomTimelineFilter&&(e=this.roomTimelineFilter.filter(e)),e}setTimelineLimit(e){u(this.definition,"room.timeline.limit",e)}setUnreadThreadNotifications(e){var t,n,r;this.definition=c(c({},this.definition),{},{room:c(c({},null===(t=this.definition)||void 0===t?void 0:t.room),{},{timeline:c(c({},null===(n=this.definition)||void 0===n||null===(r=n.room)||void 0===r?void 0:r.timeline),{},{[o.a.name]:e})})})}setLazyLoadMembers(e){u(this.definition,"room.state.lazy_load_members",e)}setIncludeLeaveRooms(e){u(this.definition,"room.include_leave",e)}}i()(d,"LAZY_LOADING_MESSAGES_FILTER",{lazy_load_members:!0})},,function(e,t,n){"use strict";n.d(t,"a",(function(){return C}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(126),l=n.n(s),c=n(140),u=n(222),d=n(129),h=n(160),p=n(15),m=n(162),g=n(246),f=n(220),_=n(122),b=n(131);var v=n(121),y=n(243),E=n(164);const S=new p.c("busy","org.matrix.msc3026.busy");var w;function T(e){switch(e){case w.Globe:return Object(v.a)("This room is public");case w.PresenceOnline:return Object(v.a)("Online");case w.PresenceAway:return Object(v.a)("Away");case w.PresenceOffline:return Object(v.a)("Offline");case w.PresenceBusy:return Object(v.a)("Busy")}}!function(e){e.None="NONE",e.Globe="GLOBE",e.PresenceOnline="ONLINE",e.PresenceAway="AWAY",e.PresenceOffline="OFFLINE",e.PresenceBusy="BUSY"}(w||(w={}));class C extends a.a.PureComponent{constructor(e){super(e),i()(this,"_dmUser",void 0),i()(this,"isUnmounted",!1),i()(this,"isWatchingTimeline",!1),i()(this,"onRoomTimeline",((e,t)=>{if(!this.isUnmounted&&this.props.room.roomId===(null==t?void 0:t.roomId)&&(e.getType()===d.b.RoomJoinRules||e.getType()===d.b.RoomMember)){const e=this.calculateIcon();e!==this.state.icon&&this.setState({icon:e})}})),i()(this,"onPresenceUpdate",(()=>{if(this.isUnmounted)return;const e=this.getPresenceIcon();e!==this.state.icon&&this.setState({icon:e})})),this.state={notificationState:f.a.instance.getRoomState(this.props.room),icon:this.calculateIcon()}}componentWillUnmount(){this.isUnmounted=!0,this.isWatchingTimeline&&this.props.room.off(c.d.Timeline,this.onRoomTimeline),this.dmUser=null}get isPublicRoom(){const e=this.props.room.currentState.getStateEvents(d.b.RoomJoinRules,"");return(e&&e.getContent().join_rule)===h.c.Public}get dmUser(){return this._dmUser}set dmUser(e){const t=this._dmUser;this._dmUser=e,t&&t!==this._dmUser&&(t.off(u.b.CurrentlyActive,this.onPresenceUpdate),t.off(u.b.Presence,this.onPresenceUpdate)),this._dmUser&&t!==this._dmUser&&(this._dmUser.on(u.b.CurrentlyActive,this.onPresenceUpdate),this._dmUser.on(u.b.Presence,this.onPresenceUpdate))}getPresenceIcon(){if(!this.dmUser)return w.None;let e=w.None;const t=this.dmUser.currentlyActive||"online"===this.dmUser.presence;return S.matches(this.dmUser.presence)?e=w.PresenceBusy:t?e=w.PresenceOnline:"offline"===this.dmUser.presence?e=w.PresenceOffline:"unavailable"===this.dmUser.presence&&(e=w.PresenceAway),e}calculateIcon(){let e=w.None;const t=E.a.shared().getUserIdForRoomId(this.props.room.roomId);return t&&2===this.props.room.getJoinedMemberCount()?function(){const e=_.a.get().baseUrl,t=b.b.get("enable_presence_by_hs_url");return!t||!(!t[e]&&void 0!==t[e])}()&&(this.dmUser=_.a.get().getUser(t),e=this.getPresenceIcon()):(e=this.isPublicRoom?w.Globe:w.None,this.isWatchingTimeline||(this.props.room.on(c.d.Timeline,this.onRoomTimeline),this.isWatchingTimeline=!0)),e}render(){let e,t;this.props.displayBadge&&this.state.notificationState&&(e=a.a.createElement(g.a,{notification:this.state.notificationState,forceCount:this.props.forceCount,roomId:this.props.room.roomId})),this.state.icon!==w.None&&(t=a.a.createElement(y.a,{tooltip:T(this.state.icon),tooltipProps:this.props.tooltipProps,class:`mx_DecoratedRoomAvatar_icon mx_DecoratedRoomAvatar_icon_${this.state.icon.toLowerCase()}`}));const n=l()("mx_DecoratedRoomAvatar",{mx_DecoratedRoomAvatar_cutout:t});return a.a.createElement("div",{className:n},a.a.createElement(m.a,{room:this.props.room,width:this.props.avatarSize,height:this.props.avatarSize,oobData:this.props.oobData,viewAvatarOnClick:this.props.viewAvatarOnClick}),t,e)}}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return w})),n.d(t,"b",(function(){return T})),n.d(t,"c",(function(){return O})),n.d(t,"d",(function(){return A}));var r=n(13),i=n.n(r),o=n(126),a=n.n(o),s=n(425),l=n(1),c=n(120),u=n.n(c),d=n(521),h=n(121),p=n(125),m=n(522),g=n(690);function f(e){const t=Object(c.useContext)(m.a),n=t?t.dispatch:null;return Object(c.useEffect)((()=>{if(n)return n({type:g.a.Add,value:e}),()=>n({type:g.a.Remove,value:e})}),[e,n]),null}var _=n(123),b=n(148),v=n(139),y=n(134),E=n(161),S=n(1045);const w=0;class T extends u.a.Component{constructor(e){super(e),i()(this,"onSubmit",(e=>{var t;e.preventDefault(),this.props.busy||this.props.submitAuthDict({type:s.a.Password,user:null!==(t=this.props.matrixClient.credentials.userId)&&void 0!==t?t:void 0,identifier:{type:"m.id.user",user:this.props.matrixClient.credentials.userId},password:this.state.password})})),i()(this,"onPasswordFieldChange",(e=>{this.setState({password:e.target.value})})),this.state={password:""}}componentDidMount(){this.props.onPhaseChange(w)}render(){const e=a()({error:this.props.errorText});let t,n;return t=this.props.busy?u.a.createElement(y.a,null):u.a.createElement("input",{type:"submit",className:"mx_Dialog_primary",disabled:!this.state.password,value:Object(h.a)("Continue")}),this.props.errorText&&(n=u.a.createElement("div",{className:"error",role:"alert"},this.props.errorText)),u.a.createElement("div",null,u.a.createElement("p",null,Object(h.a)("Confirm your identity by entering your account password below.")),u.a.createElement("form",{onSubmit:this.onSubmit,className:"mx_InteractiveAuthEntryComponents_passwordSection"},u.a.createElement(v.a,{className:e,type:"password",name:"passwordField",label:Object(h.a)("Password"),autoFocus:!0,value:this.state.password,onChange:this.onPasswordFieldChange}),n,u.a.createElement("div",{className:"mx_button_row"},t)))}}i()(T,"LOGIN_TYPE",s.a.Password);class C extends u.a.Component{constructor(){super(...arguments),i()(this,"onCaptchaResponse",(e=>{this.props.submitAuthDict({type:s.a.Recaptcha,response:e})}))}componentDidMount(){this.props.onPhaseChange(w)}render(){if(this.props.busy)return u.a.createElement(y.a,null);let e,t,n=this.props.errorText;return this.props.stageParams&&this.props.stageParams.public_key?e=this.props.stageParams.public_key:n=Object(h.a)("Missing captcha public key in homeserver configuration. Please report this to your homeserver administrator."),n&&(t=u.a.createElement("div",{className:"error",role:"alert"},n)),u.a.createElement("div",null,u.a.createElement(S.a,{sitePublicKey:e,onCaptchaResponse:this.onCaptchaResponse}),t)}}i()(C,"LOGIN_TYPE",s.a.Recaptcha);class x extends u.a.Component{constructor(e){var t;super(e),i()(this,"trySubmit",(()=>{let e=!0;for(const t of this.state.policies){const n=this.state.toggledPolicies[t.id];e=e&&n}e?this.props.submitAuthDict({type:s.a.Terms}):this.setState({errorText:Object(h.a)("Please review and accept all of the homeserver's policies")})}));const n=(null===(t=this.props.stageParams)||void 0===t?void 0:t.policies)||{},r=p.b.getValue("language"),o={},a=[];for(const e of Object.keys(n)){const t=n[e];let i=t[r];if(i||(i=t.en),!i){const e=Object.keys(t).find((e=>"version"!==e));i=e?t[e]:void 0}if(!i)throw new Error("Failed to find a policy to show the user");o[e]=!1,a.push({id:e,name:i.name,url:i.url})}this.state={toggledPolicies:o,policies:a}}componentDidMount(){this.props.onPhaseChange(w)}togglePolicy(e){const t={};for(const n of this.state.policies){let r=this.state.toggledPolicies[n.id];n.id===e&&(r=!r),t[n.id]=r}this.setState({toggledPolicies:t})}render(){if(this.props.busy)return u.a.createElement(y.a,null);const e=[];let t,n,r=!0;for(const t of this.state.policies){const n=this.state.toggledPolicies[t.id];r=r&&n,e.push(u.a.createElement("label",{key:"policy_checkbox_"+t.id,className:"mx_InteractiveAuthEntryComponents_termsPolicy"},u.a.createElement("input",{type:"checkbox",onChange:()=>this.togglePolicy(t.id),checked:n}),u.a.createElement("a",{href:t.url,target:"_blank",rel:"noreferrer noopener"},t.name)))}return(this.props.errorText||this.state.errorText)&&(t=u.a.createElement("div",{className:"error",role:"alert"},this.props.errorText||this.state.errorText)),!1!==this.props.showContinue&&(n=u.a.createElement("button",{className:"mx_InteractiveAuthEntryComponents_termsSubmit mx_GeneralButton",onClick:this.trySubmit,disabled:!r},Object(h.a)("Accept"))),u.a.createElement("div",null,u.a.createElement("p",null,Object(h.a)("Please review and accept the policies of this homeserver:")),e,t,n)}}i()(x,"LOGIN_TYPE",s.a.Terms);class F extends u.a.Component{constructor(e){super(e),this.state={requested:!1,requesting:!1}}componentDidMount(){this.props.onPhaseChange(w)}render(){var e,t;let n;return this.props.errorText&&"M_UNAUTHORIZED"!==this.props.errorCode&&(n=u.a.createElement("div",{className:"error",role:"alert"},this.props.errorText)),void 0===(null===(e=this.props.inputs)||void 0===e?void 0:e.emailAddress)||null!==(t=this.props.stageState)&&void 0!==t&&t.emailSid?n||u.a.createElement(y.a,null):u.a.createElement("div",{className:"mx_InteractiveAuthEntryComponents_emailWrapper"},u.a.createElement(f,{title:Object(h.a)("Check your email to continue"),icon:u.a.createElement("img",{src:d.b,alt:Object(h.a)("Unread email icon"),width:16}),hideServerPicker:!0}),u.a.createElement("p",null,Object(h.a)("To create your account, open the link in the email we just sent to %(emailAddress)s.",{emailAddress:u.a.createElement("b",null,this.props.inputs.emailAddress)})),this.state.requesting?u.a.createElement("p",{className:"secondary"},Object(h.a)("Did not receive it? <a>Resend it</a>",{},{a:e=>u.a.createElement(c.Fragment,null,u.a.createElement(_.a,{kind:"link_inline",onClick:null,disabled:!0},e," ",u.a.createElement(y.a,{w:14,h:14})))})):u.a.createElement("p",{className:"secondary"},Object(h.a)("Did not receive it? <a>Resend it</a>",{},{a:e=>u.a.createElement(b.a,{kind:"link_inline",title:this.state.requested?Object(h.a)("Resent!"):Object(h.a)("Resend"),alignment:E.a.Right,onHideTooltip:this.state.requested?()=>this.setState({requested:!1}):void 0,onClick:async()=>{this.setState({requesting:!0});try{var e,t;await(null===(e=(t=this.props).requestEmailToken)||void 0===e?void 0:e.call(t))}catch(e){l.a.warn("Email token request failed: ",e)}finally{this.setState({requested:!0,requesting:!1})}}},e)})),n)}}i()(F,"LOGIN_TYPE",s.a.Email);class D extends u.a.Component{constructor(e){super(e),i()(this,"submitUrl",void 0),i()(this,"sid",void 0),i()(this,"msisdn",void 0),i()(this,"onTokenChange",(e=>{this.setState({token:e.target.value})})),i()(this,"onFormSubmit",(async e=>{if(e.preventDefault(),""!=this.state.token){this.setState({errorText:null});try{let e;if(!this.submitUrl)throw new Error("The registration with MSISDN flow is misconfigured");if(e=await this.props.matrixClient.submitMsisdnTokenOtherUrl(this.submitUrl,this.sid,this.props.clientSecret,this.state.token),e.success){const e={sid:this.sid,client_secret:this.props.clientSecret};this.props.submitAuthDict({type:s.a.Msisdn,threepid_creds:e,threepidCreds:e})}else this.setState({errorText:Object(h.a)("Token incorrect")})}catch(e){this.props.fail(e),l.a.log("Failed to submit msisdn token")}}})),this.state={token:"",requestingToken:!1,errorText:""}}componentDidMount(){this.props.onPhaseChange(w),this.setState({requestingToken:!0}),this.requestMsisdnToken().catch((e=>{this.props.fail(e)})).finally((()=>{this.setState({requestingToken:!1})}))}requestMsisdnToken(){return this.props.matrixClient.requestRegisterMsisdnToken(this.props.inputs.phoneCountry,this.props.inputs.phoneNumber,this.props.clientSecret,1).then((e=>{this.submitUrl=e.submit_url,this.sid=e.sid,this.msisdn=e.msisdn}))}render(){if(this.state.requestingToken)return u.a.createElement(y.a,null);{const e=Boolean(this.state.token),t=a()({mx_InteractiveAuthEntryComponents_msisdnSubmit:!0,mx_GeneralButton:!0});let n;return this.state.errorText&&(n=u.a.createElement("div",{className:"error",role:"alert"},this.state.errorText)),u.a.createElement("div",null,u.a.createElement("p",null,Object(h.a)("A text message has been sent to %(msisdn)s",{msisdn:u.a.createElement("i",null,this.msisdn)})),u.a.createElement("p",null,Object(h.a)("Please enter the code it contains:")),u.a.createElement("div",{className:"mx_InteractiveAuthEntryComponents_msisdnWrapper"},u.a.createElement("form",{onSubmit:this.onFormSubmit},u.a.createElement("input",{type:"text",className:"mx_InteractiveAuthEntryComponents_msisdnEntry",value:this.state.token,onChange:this.onTokenChange,"aria-label":Object(h.a)("Code")}),u.a.createElement("br",null),u.a.createElement("input",{type:"submit",value:Object(h.a)("Submit"),className:t,disabled:!e})),n))}}}i()(D,"LOGIN_TYPE",s.a.Msisdn);class k extends u.a.Component{constructor(e){super(e),i()(this,"onSubmit",(e=>{e.preventDefault(),this.props.busy||this.props.submitAuthDict({type:this.props.loginType,token:this.state.registrationToken})})),i()(this,"onRegistrationTokenFieldChange",(e=>{this.setState({registrationToken:e.target.value})})),this.state={registrationToken:""}}componentDidMount(){this.props.onPhaseChange(w)}render(){const e=a()({error:this.props.errorText});let t,n;return t=this.props.busy?u.a.createElement(y.a,null):u.a.createElement(_.a,{onClick:this.onSubmit,kind:"primary",disabled:!this.state.registrationToken},Object(h.a)("Continue")),this.props.errorText&&(n=u.a.createElement("div",{className:"error",role:"alert"},this.props.errorText)),u.a.createElement("div",null,u.a.createElement("p",null,Object(h.a)("Enter a registration token provided by the homeserver administrator.")),u.a.createElement("form",{onSubmit:this.onSubmit,className:"mx_InteractiveAuthEntryComponents_registrationTokenSection"},u.a.createElement(v.a,{className:e,type:"text",name:"registrationTokenField",label:Object(h.a)("Registration token"),autoFocus:!0,value:this.state.registrationToken,onChange:this.onRegistrationTokenFieldChange}),n,u.a.createElement("div",{className:"mx_button_row"},t)))}}i()(k,"LOGIN_TYPE",s.a.RegistrationToken);class O extends u.a.Component{constructor(e){if(super(e),i()(this,"ssoUrl",void 0),i()(this,"popupWindow",void 0),i()(this,"attemptFailed",(()=>{this.setState({attemptFailed:!0})})),i()(this,"onReceiveMessage",(e=>{"authDone"===e.data&&e.origin===this.props.matrixClient.getHomeserverUrl()&&this.popupWindow&&(this.popupWindow.close(),this.popupWindow=null)})),i()(this,"onStartAuthClick",(()=>{this.popupWindow=window.open(this.ssoUrl,"_blank"),this.setState({phase:O.PHASE_POSTAUTH}),this.props.onPhaseChange(O.PHASE_POSTAUTH)})),i()(this,"onConfirmClick",(()=>{this.props.submitAuthDict({})})),!this.props.authSessionId)throw new Error("This UIA flow requires an authSessionId");this.ssoUrl=e.matrixClient.getFallbackAuthUrl(this.props.loginType,this.props.authSessionId),this.popupWindow=null,window.addEventListener("message",this.onReceiveMessage),this.state={phase:O.PHASE_PREAUTH,attemptFailed:!1}}componentDidMount(){this.props.onPhaseChange(O.PHASE_PREAUTH)}componentWillUnmount(){window.removeEventListener("message",this.onReceiveMessage),this.popupWindow&&(this.popupWindow.close(),this.popupWindow=null)}render(){var e;let t;const n=u.a.createElement(_.a,{onClick:null!==(e=this.props.onCancel)&&void 0!==e?e:null,kind:this.props.continueKind?this.props.continueKind+"_outline":"primary_outline"},Object(h.a)("Cancel"));let r;return t=this.state.phase===O.PHASE_PREAUTH?u.a.createElement(_.a,{onClick:this.onStartAuthClick,kind:this.props.continueKind||"primary"},this.props.continueText||Object(h.a)("Single Sign On")):u.a.createElement(_.a,{onClick:this.onConfirmClick,kind:this.props.continueKind||"primary"},this.props.continueText||Object(h.a)("Confirm")),this.props.errorText?r=u.a.createElement("div",{className:"error",role:"alert"},this.props.errorText):this.state.attemptFailed&&(r=u.a.createElement("div",{className:"error",role:"alert"},Object(h.a)("Something went wrong in confirming your identity. Cancel and try again."))),u.a.createElement(c.Fragment,null,r,u.a.createElement("div",{className:"mx_InteractiveAuthEntryComponents_sso_buttons"},n,t))}}i()(O,"LOGIN_TYPE",s.a.Sso),i()(O,"UNSTABLE_LOGIN_TYPE",s.a.SsoUnstable),i()(O,"PHASE_PREAUTH",1),i()(O,"PHASE_POSTAUTH",2);class I extends u.a.Component{constructor(e){super(e),i()(this,"popupWindow",void 0),i()(this,"fallbackButton",Object(c.createRef)()),i()(this,"focus",(()=>{var e;null===(e=this.fallbackButton.current)||void 0===e||e.focus()})),i()(this,"onShowFallbackClick",(e=>{if(!this.props.authSessionId)return;e.preventDefault(),e.stopPropagation();const t=this.props.matrixClient.getFallbackAuthUrl(this.props.loginType,this.props.authSessionId);this.popupWindow=window.open(t,"_blank")})),i()(this,"onReceiveMessage",(e=>{"authDone"===e.data&&e.origin===this.props.matrixClient.getHomeserverUrl()&&this.props.submitAuthDict({})})),this.popupWindow=null,window.addEventListener("message",this.onReceiveMessage)}componentDidMount(){this.props.onPhaseChange(w)}componentWillUnmount(){var e;window.removeEventListener("message",this.onReceiveMessage),null===(e=this.popupWindow)||void 0===e||e.close()}render(){let e;return this.props.errorText&&(e=u.a.createElement("div",{className:"error",role:"alert"},this.props.errorText)),u.a.createElement("div",null,u.a.createElement(_.a,{kind:"link",inputRef:this.fallbackButton,onClick:this.onShowFallbackClick},Object(h.a)("Start authentication")),e)}}function A(e){switch(e){case s.a.Password:return T;case s.a.Recaptcha:return C;case s.a.Email:return F;case s.a.Msisdn:return D;case s.a.Terms:return x;case s.a.RegistrationToken:case s.a.UnstableRegistrationToken:return k;case s.a.Sso:case s.a.SsoUnstable:return O;default:return I}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(13),i=n.n(r),o=n(16),a=n(1),s=n(231),l=n(129);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const d=[s.e.Override,s.e.ContentSpecific,s.e.RoomSpecific,s.e.SenderSpecific,s.e.Underride],h=[{rule_id:".m.rule.reaction",default:!0,enabled:!0,conditions:[{kind:s.a.EventMatch,key:"type",pattern:"m.reaction"}],actions:[s.d.DontNotify]},{rule_id:".org.matrix.msc3786.rule.room.server_acl",default:!0,enabled:!0,conditions:[{kind:s.a.EventMatch,key:"type",pattern:l.b.RoomServerAcl},{kind:s.a.EventMatch,key:"state_key",pattern:""}],actions:[]}],p=[{rule_id:".org.matrix.msc3914.rule.room.call",default:!0,enabled:!0,conditions:[{kind:s.a.EventMatch,key:"type",pattern:"org.matrix.msc3401.call"},{kind:s.a.CallStarted}],actions:[s.d.Notify,{set_tweak:s.g.Sound,value:"default"}]}];class m{constructor(e){this.client=e,i()(this,"parsedKeys",new Map)}static actionListToActionsObject(e){const t={notify:!1,tweaks:{}};for(const n of e)n===s.d.Notify?t.notify=!0:"object"==typeof n&&(void 0===n.value&&(n.value=!0),t.tweaks[n.set_tweak]=n.value);return t}static rewriteDefaultRules(e){var t;let n=JSON.parse(JSON.stringify(e));n||(n={}),n.global||(n.global={}),n.global.override||(n.global.override=[]),n.global.underride||(n.global.underride=[]);const r=n.global.override;for(const e of h){const t=r.find((t=>t.rule_id===e.rule_id));if(t)t.default=e.default,t.conditions=e.conditions,t.actions=e.actions;else{const t=e.rule_id;a.a.warn(`Adding default global override for ${t}`),r.push(e)}}const i=null!==(t=n.global.underride)&&void 0!==t?t:[];for(const e of p){const t=i.find((t=>t.rule_id===e.rule_id));if(t)t.default=e.default,t.conditions=e.conditions,t.actions=e.actions;else{const t=e.rule_id;a.a.warn(`Adding default global underride for ${t}`),i.push(e)}}return n}updateCachedPushRuleKeys(e){e||(e={}),e.global||(e.global={}),e.global.override||(e.global.override=[]),e.global.room||(e.global.room=[]),e.global.sender||(e.global.sender=[]),e.global.underride||(e.global.underride=[]);const t=new Set(this.parsedKeys.keys());for(const n of[e.global.override,e.global.room,e.global.sender,e.global.underride])for(const e of n)if(e.conditions)for(const n of e.conditions)n.kind===s.a.EventMatch&&(t.delete(n.key),this.parsedKeys.set(n.key,m.partsForDottedKey(n.key)));t.forEach((e=>this.parsedKeys.delete(e)))}matchingRuleFromKindSet(e,t){for(const n of d){const r=t[n];if(r)for(const t of r){if(!t.enabled)continue;const r=this.templateRuleToRaw(n,t);if(r&&this.ruleMatchesEvent(r,e))return u(u({},t),{},{kind:n})}}return null}templateRuleToRaw(e,t){const n={rule_id:t.rule_id,actions:t.actions,conditions:[]};switch(e){case s.e.Underride:case s.e.Override:n.conditions=t.conditions;break;case s.e.RoomSpecific:if(!t.rule_id)return null;n.conditions.push({kind:s.a.EventMatch,key:"room_id",value:t.rule_id});break;case s.e.SenderSpecific:if(!t.rule_id)return null;n.conditions.push({kind:s.a.EventMatch,key:"user_id",value:t.rule_id});break;case s.e.ContentSpecific:if(!t.pattern)return null;n.conditions.push({kind:s.a.EventMatch,key:"content.body",pattern:t.pattern})}return n}eventFulfillsCondition(e,t){switch(e.kind){case s.a.EventMatch:return this.eventFulfillsEventMatchCondition(e,t);case s.a.EventPropertyIs:return this.eventFulfillsEventPropertyIsCondition(e,t);case s.a.ContainsDisplayName:return this.eventFulfillsDisplayNameCondition(e,t);case s.a.RoomMemberCount:return this.eventFulfillsRoomMemberCountCondition(e,t);case s.a.SenderNotificationPermission:return this.eventFulfillsSenderNotifPermCondition(e,t);case s.a.CallStarted:case s.a.CallStartedPrefix:return this.eventFulfillsCallStartedCondition(e,t)}return!1}eventFulfillsSenderNotifPermCondition(e,t){const n=e.key;if(!n)return!1;const r=this.client.getRoom(t.getRoomId());return!(null==r||!r.currentState)&&r.currentState.mayTriggerNotifOfType(n,t.getSender())}eventFulfillsRoomMemberCountCondition(e,t){if(!e.is)return!1;const n=this.client.getRoom(t.getRoomId());if(!n||!n.currentState||!n.currentState.members)return!1;const r=n.currentState.getJoinedMemberCount(),i=e.is.match(/^([=<>]*)(\d*)$/);if(!i)return!1;const o=i[1],a=parseInt(i[2]);if(isNaN(a))return!1;switch(o){case"":case"==":return r==a;case"<":return r<a;case">":return r>a;case"<=":return r<=a;case">=":return r>=a;default:return!1}}eventFulfillsDisplayNameCondition(e,t){var n;let r=t.getContent();if(t.isEncrypted()&&t.getClearContent()&&(r=t.getClearContent()),!r||!r.body||"string"!=typeof r.body)return!1;const i=this.client.getRoom(t.getRoomId()),a=null==i||null===(n=i.currentState)||void 0===n?void 0:n.getMember(this.client.credentials.userId);if(!a)return!1;const s=a.name,l=new RegExp("(^|\\W)"+Object(o.q)(s)+"(\\W|$)","i");return r.body.search(l)>-1}eventFulfillsEventMatchCondition(e,t){if(!e.key)return!1;const n=this.valueForDottedKey(e.key,t);if("string"!=typeof n)return!1;if(e.value)return e.value===n;if("string"!=typeof e.pattern)return!1;const r="content.body"===e.key?this.createCachedRegex("(^|\\W)",e.pattern,"(\\W|$)"):this.createCachedRegex("^",e.pattern,"$");return!!n.match(r)}eventFulfillsEventPropertyIsCondition(e,t){return!(!e.key||void 0===e.value)&&e.value===this.valueForDottedKey(e.key,t)}eventFulfillsCallStartedCondition(e,t){return["m.ring","m.prompt"].includes(t.getContent()["m.intent"])&&!("m.terminated"in t.getContent())&&(t.getPrevContent()["m.terminated"]!==t.getContent()["m.terminated"]||Object(o.j)(t.getPrevContent(),{}))}createCachedRegex(e,t,n){return m.cachedGlobToRegex[t]||(m.cachedGlobToRegex[t]=new RegExp(e+Object(o.r)(t)+n,"i")),m.cachedGlobToRegex[t]}static partsForDottedKey(e){const t=[];let n="",r=!1;for(const i of e)r?(n+="\\"===i||"."===i?i:"\\"+i,r=!1):"."==i?(t.push(n),n=""):"\\"==i?r=!0:n+=i;return r&&(n+="\\"),t.push(n),t}valueForDottedKey(e,t){let n,r=this.parsedKeys.get(e);void 0===r&&(r=m.partsForDottedKey(e),this.parsedKeys.set(e,r));const i=r[0];let a=0;for("content"===i?(n=t.getContent(),++a):"type"===i?(n=t.getType(),++a):n=t.event;a<r.length;++a){if(Object(o.u)(n))return;n=n[r[a]]}return n}matchingRuleForEventWithRulesets(e,t){return t?e.getSender()===this.client.credentials.userId?null:this.matchingRuleFromKindSet(e,t.global):null}pushActionsForEventAndRulesets(e,t){const n=this.matchingRuleForEventWithRulesets(e,t);if(!n)return{};const r=m.actionListToActionsObject(n.actions);return void 0===r.tweaks.highlight&&(r.tweaks.highlight=n.kind==s.e.ContentSpecific),r}ruleMatchesEvent(e,t){var n;return!(null!==(n=e.conditions)&&void 0!==n&&n.some((e=>!this.eventFulfillsCondition(e,t))))}actionsForEvent(e){return this.pushActionsForEventAndRulesets(e,this.client.pushRules)}getPushRuleById(e){var t;const n=this.getPushRuleAndKindById(e);return null!==(t=null==n?void 0:n.rule)&&void 0!==t?t:null}getPushRuleAndKindById(e){for(const n of["global"]){var t;if(void 0!==(null===(t=this.client.pushRules)||void 0===t?void 0:t[n]))for(const t of d)if(void 0!==this.client.pushRules[n][t])for(const r of this.client.pushRules[n][t])if(r.rule_id===e)return{rule:r,kind:t}}return null}}i()(m,"cachedGlobToRegex",{})},function(e,t,n){"use strict";(function(e){n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return c}));var r=n(13),i=n.n(r),o=n(1),a=n(193);let s;var l;!function(e){e.SUCCESS="SUCCESS",e.IGNORE="IGNORE",e.PROMPT="PROMPT",e.FAIL_PROMPT="FAIL_PROMPT",e.FAIL_ERROR="FAIL_ERROR"}(s||(s={})),function(e){e.Invalid="Invalid homeserver discovery response",e.GenericFailure="Failed to get autodiscovery configuration from server",e.InvalidHsBaseUrl="Invalid base_url for m.homeserver",e.InvalidHomeserver="Homeserver URL does not appear to be a valid Matrix homeserver",e.InvalidIsBaseUrl="Invalid base_url for m.identity_server",e.InvalidIdentityServer="Identity server URL does not appear to be a valid identity server",e.InvalidIs="Invalid identity server discovery response",e.MissingWellknown="No .well-known JSON file found",e.InvalidJson="Invalid JSON"}(l||(l={}));class c{static async fromDiscoveryConfig(e){var t;const n={"m.homeserver":{state:c.FAIL_ERROR,error:c.ERROR_INVALID,base_url:null},"m.identity_server":{state:c.PROMPT,error:null,base_url:null}};if(!e||!e["m.homeserver"])return o.a.error("No m.homeserver key in config"),n["m.homeserver"].state=c.FAIL_PROMPT,n["m.homeserver"].error=c.ERROR_INVALID,Promise.resolve(n);if(!e["m.homeserver"].base_url)return o.a.error("No m.homeserver base_url in config"),n["m.homeserver"].state=c.FAIL_PROMPT,n["m.homeserver"].error=c.ERROR_INVALID_HS_BASE_URL,Promise.resolve(n);const r=this.sanitizeWellKnownUrl(e["m.homeserver"].base_url);if(!r)return o.a.error("Invalid base_url for m.homeserver"),n["m.homeserver"].error=c.ERROR_INVALID_HS_BASE_URL,Promise.resolve(n);const i=await this.fetchWellKnownObject(`${r}/_matrix/client/versions`);if(!i||null===(t=i.raw)||void 0===t||!t.versions)return o.a.error("Invalid /versions response"),n["m.homeserver"].error=c.ERROR_INVALID_HOMESERVER,n["m.homeserver"].base_url=r,Promise.resolve(n);n["m.homeserver"]={state:c.SUCCESS,error:null,base_url:r};let a="";if(e["m.identity_server"]){const t={"m.homeserver":n["m.homeserver"],"m.identity_server":{state:c.FAIL_PROMPT,error:c.ERROR_INVALID_IS,base_url:null}};if(a=this.sanitizeWellKnownUrl(e["m.identity_server"].base_url),!a)return o.a.error("Invalid base_url for m.identity_server"),t["m.identity_server"].error=c.ERROR_INVALID_IS_BASE_URL,Promise.resolve(t);const r=await this.fetchWellKnownObject(`${a}/_matrix/identity/v2`);if(null==r||!r.raw||r.action!==s.SUCCESS)return o.a.error("Invalid /v2 response"),t["m.identity_server"].error=c.ERROR_INVALID_IDENTITY_SERVER,t["m.identity_server"].base_url=a,Promise.resolve(t)}return a&&a.toString().length>0&&(n["m.identity_server"]={state:c.SUCCESS,error:null,base_url:a}),Object.keys(e).forEach((t=>{if("m.homeserver"===t||"m.identity_server"===t){const r=["error","state","base_url"];for(const i of Object.keys(e[t]))r.includes(i)||(n[t][i]=e[t][i])}else n[t]=e[t]})),Promise.resolve(n)}static async findClientConfig(e){if(!e||"string"!=typeof e||0===e.length)throw new Error("'domain' must be a string of non-zero length");const t={"m.homeserver":{state:c.FAIL_ERROR,error:c.ERROR_INVALID,base_url:null},"m.identity_server":{state:c.PROMPT,error:null,base_url:null}},n=await this.fetchWellKnownObject(`https://${e}/.well-known/matrix/client`);return n&&n.action===s.SUCCESS?c.fromDiscoveryConfig(n.raw):(o.a.error("No response or error when parsing .well-known"),n.reason&&o.a.error(n.reason),n.action===s.IGNORE?t["m.homeserver"]={state:c.PROMPT,error:null,base_url:null}:(t["m.homeserver"].state=c.FAIL_PROMPT,t["m.homeserver"].error=c.ERROR_INVALID),Promise.resolve(t))}static async getRawClientConfig(e){if(!e||"string"!=typeof e||0===e.length)throw new Error("'domain' must be a string of non-zero length");const t=await this.fetchWellKnownObject(`https://${e}/.well-known/matrix/client`);return t&&t.raw||{}}static sanitizeWellKnownUrl(e){if(!e)return!1;try{var t;let n;try{n=new URL(e)}catch(e){o.a.error("Could not parse url",e)}if(null===(t=n)||void 0===t||!t.hostname)return!1;if("http:"!==n.protocol&&"https:"!==n.protocol)return!1;const r=n.port?`:${n.port}`:"",i=n.pathname?n.pathname:"";let a=`${n.protocol}//${n.hostname}${r}${i}`;return a.endsWith("/")&&(a=a.substring(0,a.length-1)),a}catch(e){return o.a.error(e),!1}}static fetch(t,n){return this.fetchFn?this.fetchFn(t,n):e.fetch(t,n)}static setFetchFn(e){c.fetchFn=e}static async fetchWellKnownObject(e){let t;try{if(t=await c.fetch(e,{method:a.i.Get,signal:Object(a.m)(5e3)}),404===t.status)return{raw:{},action:s.IGNORE,reason:c.ERROR_MISSING_WELLKNOWN};if(!t.ok)return{raw:{},action:s.FAIL_PROMPT,reason:"General failure"}}catch(e){const t=e;let n="";return"object"==typeof t&&(n=null==t?void 0:t.message),{error:t,raw:{},action:s.FAIL_PROMPT,reason:n||"General failure"}}try{return{raw:await t.json(),action:s.SUCCESS}}catch(e){const t=e;return{error:t,raw:{},action:s.FAIL_PROMPT,reason:"SyntaxError"===(null==t?void 0:t.name)?c.ERROR_INVALID_JSON:c.ERROR_INVALID}}}}i()(c,"ERROR_INVALID",l.Invalid),i()(c,"ERROR_GENERIC_FAILURE",l.GenericFailure),i()(c,"ERROR_INVALID_HS_BASE_URL",l.InvalidHsBaseUrl),i()(c,"ERROR_INVALID_HOMESERVER",l.InvalidHomeserver),i()(c,"ERROR_INVALID_IS_BASE_URL",l.InvalidIsBaseUrl),i()(c,"ERROR_INVALID_IDENTITY_SERVER",l.InvalidIdentityServer),i()(c,"ERROR_INVALID_IS",l.InvalidIs),i()(c,"ERROR_MISSING_WELLKNOWN",l.MissingWellknown),i()(c,"ERROR_INVALID_JSON",l.InvalidJson),i()(c,"ALL_ERRORS",Object.keys(l)),i()(c,"FAIL_ERROR",s.FAIL_ERROR),i()(c,"FAIL_PROMPT",s.FAIL_PROMPT),i()(c,"PROMPT",s.PROMPT),i()(c,"SUCCESS",s.SUCCESS),i()(c,"fetchFn",void 0)}).call(this,n(14))},function(e,t,n){"use strict";n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return u}));var r=n(199),i=n(418);const o=new Uint8Array(8);async function a(e,t,n,o){let a;o?a=Object(r.decodeBase64)(o):(a=new Uint8Array(16),i.b.getRandomValues(a),a[8]&=127);const[s,c]=await l(t,n),u=(new i.a).encode(e),d=await i.c.encrypt({name:"AES-CTR",counter:a,length:64},s,u),h=await i.c.sign({name:"HMAC"},c,d);return{iv:Object(r.encodeBase64)(a),ciphertext:Object(r.encodeBase64)(d),mac:Object(r.encodeBase64)(h)}}async function s(e,t,n){const[o,a]=await l(t,n),s=Object(r.decodeBase64)(e.ciphertext);if(!await i.c.verify({name:"HMAC"},a,Object(r.decodeBase64)(e.mac),s))throw new Error(`Error decrypting secret ${n}: bad MAC`);const c=await i.c.decrypt({name:"AES-CTR",counter:Object(r.decodeBase64)(e.iv),length:64},o,s);return(new TextDecoder).decode(new Uint8Array(c))}async function l(e,t){const n=await i.c.importKey("raw",e,{name:"HKDF"},!1,["deriveBits"]),r=await i.c.deriveBits({name:"HKDF",salt:o,info:(new i.a).encode(t),hash:"SHA-256"},n,512),a=r.slice(0,32),s=r.slice(32),l=i.c.importKey("raw",a,{name:"AES-CTR"},!1,["encrypt","decrypt"]),c=i.c.importKey("raw",s,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign","verify"]);return Promise.all([l,c])}const c="\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";function u(e,t){return a(c,e,"",t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDefined=t.isNotAGuard=t.isGuard=t.isAutoFocusAllowed=t.notHiddenInput=t.isRadioElement=t.isHTMLInputElement=t.isHTMLButtonElement=t.getDataset=t.isAutoFocusAllowedCached=t.isVisibleCached=void 0;var r=n(254),i=function(e){return e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode},o=function(e){return e===document||e&&e.nodeType===Node.DOCUMENT_NODE},a=function(e,t){return!e||o(e)||!function(e){if(e.nodeType!==Node.ELEMENT_NODE)return!1;var t=window.getComputedStyle(e,null);return!(!t||!t.getPropertyValue||"none"!==t.getPropertyValue("display")&&"hidden"!==t.getPropertyValue("visibility"))}(e)&&t(i(e))};t.isVisibleCached=function(e,n){var r=e.get(n);if(void 0!==r)return r;var i=a(n,t.isVisibleCached.bind(void 0,e));return e.set(n,i),i};t.isAutoFocusAllowedCached=function(e,n){var r=e.get(n);if(void 0!==r)return r;var a=function(e,n){return!(e&&!o(e))||!!(0,t.isAutoFocusAllowed)(e)&&n(i(e))}(n,t.isAutoFocusAllowedCached.bind(void 0,e));return e.set(n,a),a};t.getDataset=function(e){return e.dataset};t.isHTMLButtonElement=function(e){return"BUTTON"===e.tagName};t.isHTMLInputElement=function(e){return"INPUT"===e.tagName};t.isRadioElement=function(e){return(0,t.isHTMLInputElement)(e)&&"radio"===e.type};t.notHiddenInput=function(e){return!(((0,t.isHTMLInputElement)(e)||(0,t.isHTMLButtonElement)(e))&&("hidden"===e.type||e.disabled))};t.isAutoFocusAllowed=function(e){var t=e.getAttribute(r.FOCUS_NO_AUTOFOCUS);return![!0,"true",""].includes(t)};t.isGuard=function(e){var n;return Boolean(e&&(null===(n=(0,t.getDataset)(e))||void 0===n?void 0:n.focusGuard))};t.isNotAGuard=function(e){return!(0,t.isGuard)(e)};t.isDefined=function(e){return Boolean(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(13),i=n.n(r);class o{constructor(){i()(this,"watchers",void 0)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const r=new RegExp("^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$","i");function i(e){return!(e.indexOf("@")<1)&&r.test(e)}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)},i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.merge=t.contains=t.root=t.parseHTML=t.text=t.xml=t.html=void 0;var s=n(257),l=a(n(701));function c(e,t,n){return e?e(null!=t?t:e._root.children,null,void 0,n).toString():""}function u(e){if(Array.isArray(e))return!0;if("object"!=typeof e||!Object.prototype.hasOwnProperty.call(e,"length")||"number"!=typeof e.length||e.length<0)return!1;for(var t=0;t<e.length;t++)if(!(t in e))return!1;return!0}t.html=function(e,t){return c(this,function(e,t){return!t&&"object"==typeof e&&null!=e&&!("length"in e)&&!("type"in e)}(e)?void(t=e):e,r(r(r({},l.default),null==this?void 0:this._options),(0,l.flatten)(null!=t?t:{})))},t.xml=function(e){return c(this,e,r(r({},this._options),{xmlMode:!0}))},t.text=function(e){for(var t=e||(this?this.root():[]),n="",r=0;r<t.length;r++)n+=(0,s.textContent)(t[r]);return n},t.parseHTML=function(e,t,n){if(void 0===n&&(n="boolean"==typeof t&&t),!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t);var r=this.load(e,l.default,!1);return n||r("script").remove(),r.root()[0].children.slice()},t.root=function(){return this(this._root)},t.contains=function(e,t){if(t===e)return!1;for(var n=t;n&&n!==n.parent;)if((n=n.parent)===e)return!0;return!1},t.merge=function(e,t){if(u(e)&&u(t)){for(var n=e.length,r=+t.length,i=0;i<r;i++)e[n++]=t[i];return e.length=n,e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isHtml=t.cloneDom=t.domEach=t.cssCase=t.camelCase=t.isCheerio=t.isTag=void 0;var r,i=n(210),o=n(210);Object.defineProperty(t,"isTag",{enumerable:!0,get:function(){return o.isTag}}),t.isCheerio=function(e){return null!=e.cheerio},t.camelCase=function(e){return e.replace(/[_.-](\w|$)/g,(function(e,t){return t.toUpperCase()}))},t.cssCase=function(e){return e.replace(/[A-Z]/g,"-$&").toLowerCase()},t.domEach=function(e,t){for(var n=e.length,r=0;r<n;r++)t(e[r],r);return e},t.cloneDom=function(e){var t="length"in e?Array.prototype.map.call(e,(function(e){return(0,i.cloneNode)(e,!0)})):[(0,i.cloneNode)(e,!0)],n=new i.Document(t);return t.forEach((function(e){e.parent=n})),t},function(e){e[e.LowerA=97]="LowerA",e[e.LowerZ=122]="LowerZ",e[e.UpperA=65]="UpperA",e[e.UpperZ=90]="UpperZ",e[e.Exclamation=33]="Exclamation"}(r||(r={})),t.isHtml=function(e){var t=e.indexOf("<");if(t<0||t>e.length-3)return!1;var n=e.charCodeAt(t+1);return(n>=r.LowerA&&n<=r.LowerZ||n>=r.UpperA&&n<=r.UpperZ||n===r.Exclamation)&&e.includes(">",t+2)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(130),i=n.n(r),o=n(132),a=n.n(o),s=n(120),l=n.n(s),c=n(148);const u=["isExpanded","children","onClick","onContextMenu"],d=e=>{let{isExpanded:t,children:n,onClick:r,onContextMenu:o}=e,s=a()(e,u);return l.a.createElement(c.a,i()({},s,{onClick:r,onContextMenu:o||r,"aria-haspopup":!0,"aria-expanded":t,forceHide:t}),n)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(13),i=n.n(r);class o{constructor(e){this.timeout=e,i()(this,"timerHandle",void 0),i()(this,"startTs",void 0),i()(this,"promise",void 0),i()(this,"resolve",void 0),i()(this,"reject",void 0),i()(this,"onTimeout",(()=>{const e=Date.now()-this.startTs;if(e>=this.timeout)this.resolve(),this.setNotStarted();else{const t=this.timeout-e;this.timerHandle=window.setTimeout(this.onTimeout,t)}})),this.setNotStarted()}setNotStarted(){this.timerHandle=void 0,this.startTs=void 0,this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t})).finally((()=>{this.timerHandle=void 0}))}changeTimeout(e){if(e===this.timeout)return;const t=e<this.timeout;this.timeout=e,this.isRunning()&&t&&(clearTimeout(this.timerHandle),this.onTimeout())}start(){return this.isRunning()||(this.startTs=Date.now(),this.timerHandle=window.setTimeout(this.onTimeout,this.timeout)),this}restart(){return this.isRunning()?(this.startTs=Date.now(),this):this.start()}abort(){return this.isRunning()&&(clearTimeout(this.timerHandle),this.reject(new Error("Timer was aborted.")),this.setNotStarted()),this}finished(){return this.promise}isRunning(){return void 0!==this.timerHandle}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(163),i=n(456),o=n(457),a=4,s=100;class l{__init(){this._stack=[{}]}constructor(e,t=new i.Scope,n=a){this._version=n,l.prototype.__init.call(this),this.getStackTop().scope=t,e&&this.bindClient(e)}isOlderThan(e){return this._version<e}bindClient(e){this.getStackTop().client=e,e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){const e=i.Scope.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(e){const t=this.pushScope();try{e(t)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){const n=this._lastEventId=t&&t.event_id?t.event_id:r.uuid4(),i=new Error("Sentry syntheticException");return this._withClient(((r,o)=>{r.captureException(e,{originalException:e,syntheticException:i,...t,event_id:n},o)})),n}captureMessage(e,t,n){const i=this._lastEventId=n&&n.event_id?n.event_id:r.uuid4(),o=new Error(e);return this._withClient(((r,a)=>{r.captureMessage(e,t,{originalException:e,syntheticException:o,...n,event_id:i},a)})),i}captureEvent(e,t){const n=t&&t.event_id?t.event_id:r.uuid4();return e.type||(this._lastEventId=n),this._withClient(((r,i)=>{r.captureEvent(e,{...t,event_id:n},i)})),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){const{scope:n,client:i}=this.getStackTop();if(!n||!i)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:a=s}=i.getOptions&&i.getOptions()||{};if(a<=0)return;const l={timestamp:r.dateTimestampInSeconds(),...e},c=o?r.consoleSandbox((()=>o(l,t))):l;null!==c&&n.addBreadcrumb(c,a)}setUser(e){const t=this.getScope();t&&t.setUser(e)}setTags(e){const t=this.getScope();t&&t.setTags(e)}setExtras(e){const t=this.getScope();t&&t.setExtras(e)}setTag(e,t){const n=this.getScope();n&&n.setTag(e,t)}setExtra(e,t){const n=this.getScope();n&&n.setExtra(e,t)}setContext(e,t){const n=this.getScope();n&&n.setContext(e,t)}configureScope(e){const{scope:t,client:n}=this.getStackTop();t&&n&&e(t)}run(e){const t=u(this);try{e(this)}finally{u(t)}}getIntegration(e){const t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(t){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.logger.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){return this._callExtensionMethod("startTransaction",e,t)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){const e=this.getStackTop(),t=e&&e.scope,n=t&&t.getSession();n&&o.closeSession(n),this._sendSessionUpdate(),t&&t.setSession()}startSession(e){const{scope:t,client:n}=this.getStackTop(),{release:i,environment:a}=n&&n.getOptions()||{},{userAgent:s}=r.GLOBAL_OBJ.navigator||{},l=o.makeSession({release:i,environment:a,...t&&{user:t.getUser()},...s&&{userAgent:s},...e});if(t){const e=t.getSession&&t.getSession();e&&"ok"===e.status&&o.updateSession(e,{status:"exited"}),this.endSession(),t.setSession(l)}return l}shouldSendDefaultPii(){const e=this.getClient(),t=e&&e.getOptions();return Boolean(t&&t.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:t}=this.getStackTop();if(!e)return;const n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}_withClient(e){const{scope:t,client:n}=this.getStackTop();n&&e(n,t)}_callExtensionMethod(e,...t){const n=c().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[e])return n.extensions[e].apply(this,t);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.logger.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function c(){return r.GLOBAL_OBJ.__SENTRY__=r.GLOBAL_OBJ.__SENTRY__||{extensions:{},hub:void 0},r.GLOBAL_OBJ}function u(e){const t=c(),n=h(t);return p(t,e),n}function d(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function h(e){return r.getGlobalSingleton("hub",(()=>new l),e)}function p(e,t){if(!e)return!1;return(e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0}t.API_VERSION=a,t.Hub=l,t.getCurrentHub=function(){const e=c();return d(e)&&!h(e).isOlderThan(a)||p(e,new l),r.isNodeEnv()?function(e){try{const t=c().__SENTRY__,n=t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active;if(!n)return h(e);if(!d(n)||h(n).isOlderThan(a)){const t=h(e).getStackTop();p(n,new l(t.client,i.Scope.clone(t.scope)))}return h(n)}catch(t){return h(e)}}(e):h(e)},t.getHubFromCarrier=h,t.getMainCarrier=c,t.makeMain=u,t.setHubOnCarrier=p},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(13),i=n.n(r),o=n(197),a=n(278);class s extends a.a{constructor(e,t,n){super(),this._symbol=e,this._count=t,this._color=n}static forCount(e,t){return new s(null,e,t)}static forSymbol(e,t){return new s(e,0,t)}}i()(s,"RED_EXCLAMATION",s.forSymbol("!",o.a.Red))},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return h}));var r=n(13),i=n.n(r),o=n(17),a=n.n(o),s=n(136),l=n(122),c=n(181),u=n(265);let d;!function(e){e.Persistence="persistence",e.Dock="dock",e.Undock="undock"}(d||(d={}));class h extends a.a{constructor(){super(...arguments),i()(this,"persistentWidgetId",void 0),i()(this,"persistentRoomId",void 0),i()(this,"dockedWidgetsByUid",new Map),i()(this,"onRoomStateEvents",((e,t)=>{let{roomId:n}=t;"im.vector.modular.widgets"===e.getType()&&this.destroyPersistentWidget(e.getStateKey(),n)}))}static get instance(){return h.internalInstance||(h.internalInstance=new h),h.internalInstance}start(){l.a.get().on(s.RoomStateEvent.Events,this.onRoomStateEvents)}stop(){var e;null===(e=l.a.get())||void 0===e||e.removeListener(s.RoomStateEvent.Events,this.onRoomStateEvents)}destroyPersistentWidget(e,t){this.getWidgetPersistence(e,t)&&(u.a.instance.stopMessagingByUid(c.a.calcWidgetUid(e,t)),this.setWidgetPersistence(e,t,!1))}setWidgetPersistence(e,t,n){const r=this.getWidgetPersistence(e,t);r&&!n?(this.persistentWidgetId=null,this.persistentRoomId=null):!r&&n&&(this.persistentWidgetId=e,this.persistentRoomId=t),this.emit(d.Persistence)}getWidgetPersistence(e,t){return this.persistentWidgetId===e&&this.persistentRoomId===t}getPersistentWidgetId(){return this.persistentWidgetId}getPersistentRoomId(){return this.persistentRoomId}dockWidget(e,t){var n;const r=c.a.calcWidgetUid(e,t),i=null!==(n=this.dockedWidgetsByUid.get(r))&&void 0!==n?n:0;this.dockedWidgetsByUid.set(r,i+1),0===i&&this.emit(d.Dock)}undockWidget(e,t){const n=c.a.calcWidgetUid(e,t),r=this.dockedWidgetsByUid.get(n);r&&this.dockedWidgetsByUid.set(n,r-1),1===r&&this.emit(d.Undock)}isDocked(e,t){var n;const r=c.a.calcWidgetUid(e,t);return(null!==(n=this.dockedWidgetsByUid.get(r))&&void 0!==n?n:0)>0}isLive(e,t){return this.isDocked(e,t)||this.getWidgetPersistence(e,t)}}i()(h,"internalInstance",void 0),window.mxActiveWidgetStore=h.instance},function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return m})),n.d(t,"c",(function(){return g}));var r=n(13),i=n.n(r),o=n(120),a=n(126),s=n.n(a),l=n(1),c=n(121),u=n(212),d=n(123),h=n(159);class p{constructor(e,t,n,r,i){this.id=e,this.label=t,this.icon=n,this.body=r,this.screenName=i}}let m;!function(e){e.LEFT="left",e.TOP="top"}(m||(m={}));class g extends o.Component{constructor(e){var t;super(e);const n=e.tabs.find((t=>t.id===e.initialTabId));this.state={activeTabId:n?e.initialTabId:null===(t=e.tabs[0])||void 0===t?void 0:t.id}}getTabById(e){return this.props.tabs.find((t=>t.id===e))}setActiveTab(e){this.getTabById(e.id)?(this.props.onChange&&this.props.onChange(e.id),this.setState({activeTabId:e.id})):l.a.error("Could not find tab "+e.label+" in tabs")}renderTabLabel(e){let t="mx_TabbedView_tabLabel ";this.state.activeTabId===e.id&&(t+="mx_TabbedView_tabLabel_active");let n=null;e.icon&&(n=o.createElement("span",{className:`mx_TabbedView_maskedIcon ${e.icon}`}));const r=Object(c.a)(e.label);return o.createElement(d.a,{className:t,key:"tab_label_"+e.label,onClick:()=>this.setActiveTab(e),"data-testid":`settings-tab-${e.id}`},n,o.createElement("span",{className:"mx_TabbedView_tabLabel_text"},r))}renderTabPanel(e){return o.createElement("div",{className:"mx_TabbedView_tabPanel",key:"mx_tabpanel_"+e.label},o.createElement(u.a,{className:"mx_TabbedView_tabPanelContent"},e.body))}render(){var e;const t=this.props.tabs.map((e=>this.renderTabLabel(e))),n=this.getTabById(this.state.activeTabId),r=n?this.renderTabPanel(n):null,i=s()({mx_TabbedView:!0,mx_TabbedView_tabsOnLeft:this.props.tabLocation==m.LEFT,mx_TabbedView_tabsOnTop:this.props.tabLocation==m.TOP});return o.createElement("div",{className:i},o.createElement(h.a,{screenName:null!==(e=null==n?void 0:n.screenName)&&void 0!==e?e:this.props.screenName}),o.createElement("div",{className:"mx_TabbedView_tabLabels"},t),r)}}i()(g,"defaultProps",{tabLocation:m.LEFT})},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(130),i=n.n(r),o=n(132),a=n.n(o),s=n(13),l=n.n(s),c=n(120),u=n.n(c),d=n(149),h=n(126),p=n.n(h),m=n(123),g=n(152),f=n(142);const _=["onSearch","onCleared","onKeyDown","onFocus","onBlur","className","placeholder","blurredPlaceholder","autoFocus","initialValue","collapsed"];class b extends u.a.Component{constructor(e){super(e),l()(this,"search",Object(c.createRef)()),l()(this,"onChange",(()=>{this.search.current&&(this.setState({searchTerm:this.search.current.value}),this.onSearch())})),l()(this,"onSearch",Object(d.throttle)((()=>{var e;this.props.onSearch(null===(e=this.search.current)||void 0===e?void 0:e.value)}),200,{trailing:!0,leading:!0})),l()(this,"onKeyDown",(e=>{if(Object(g.a)().getAccessibilityAction(e)===f.h.Escape)this.clearSearch("keyboard");this.props.onKeyDown&&this.props.onKeyDown(e)})),l()(this,"onFocus",(e=>{this.setState({blurred:!1}),e.target.select(),this.props.onFocus&&this.props.onFocus(e)})),l()(this,"onBlur",(e=>{this.setState({blurred:!0}),this.props.onBlur&&this.props.onBlur(e)})),this.state={searchTerm:e.initialValue||"",blurred:!0}}clearSearch(e){this.search.current.value="",this.onChange(),this.props.onCleared&&this.props.onCleared(e)}render(){const e=this.props,{onSearch:t,onCleared:n,onKeyDown:r,onFocus:o,onBlur:s,className:l="",placeholder:c,blurredPlaceholder:d,autoFocus:h,initialValue:g,collapsed:f}=e,b=a()(e,_);if(f)return null;const v=!this.state.blurred||this.state.searchTerm?u.a.createElement(m.a,{key:"button",tabIndex:-1,className:"mx_SearchBox_closeButton",onClick:()=>{this.clearSearch("button")}}):void 0;return u.a.createElement("div",{className:p()("mx_SearchBox","mx_textinput",{mx_SearchBox_blurred:this.state.blurred})},u.a.createElement("input",i()({},b,{key:"searchfield",type:"text",ref:this.search,className:"mx_textinput_icon mx_textinput_search "+l,value:this.state.searchTerm,onFocus:this.onFocus,onChange:this.onChange,onKeyDown:this.onKeyDown,onBlur:this.onBlur,placeholder:this.state.blurred&&d||c,autoComplete:"off",autoFocus:this.props.autoFocus,"data-testid":"searchbox-input"})),v)}}},function(e,t,n){"use strict";var r=n(120),i=n.n(r),o=n(126),a=n.n(o),s=n(258);t.a=function(e){let{name:t,definitions:n,value:r,className:o,outlined:l,disabled:c,onChange:u}=e;const d=e=>{u(e.target.value)};return i.a.createElement(i.a.Fragment,null,n.map((e=>{var n;const u=`${t}-${e.value}`;return i.a.createElement(i.a.Fragment,{key:e.value},i.a.createElement(s.a,{id:u,className:a()(o,e.className),onChange:d,checked:void 0!==e.checked?e.checked:e.value===r,name:t,value:e.value,disabled:null!==(n=e.disabled)&&void 0!==n?n:c,outlined:l,"aria-describedby":e.description?`${u}-description`:void 0},e.label),e.description?i.a.createElement("span",{id:`${u}-description`},e.description):null)})))}},function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return r})),function(e){e.Send="send",e.Edit="edit"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(165);class l extends a.a.Component{constructor(e){super(e)}shouldComponentUpdate(e){return Math.floor(this.props.seconds)!==Math.floor(e.seconds)}render(){return a.a.createElement("span",{"aria-live":this.props["aria-live"],role:this.props.role,className:"mx_Clock"},this.props.formatFn(this.props.seconds))}}i()(l,"defaultProps",{formatFn:s.l})},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(378),l=n(1),c=n(121),u=n(127),d=n(123),h=n(166),p=n(144),m=n(563),g=n(825),f=n(243),_=n(138);let b;function v(e){if(!e)return"";const t=window.getComputedStyle(e,null);let n=t.cssText;if(""==n)for(const e of t)n+=e+":",n+=t.getPropertyValue(e)+";";return n}!async function(){if(b)return;const e=await fetch(n(826).default).then((e=>e.text()));b="data:image/svg+xml;base64,"+window.btoa(e)}();class y extends a.a.Component{constructor(e){super(e),i()(this,"context",void 0),i()(this,"iframe",Object(o.createRef)()),i()(this,"dummyLink",Object(o.createRef)()),i()(this,"userDidClick",!1),i()(this,"fileDownloader",new g.a((()=>this.iframe.current))),i()(this,"decryptFile",(async()=>{if(!this.state.decryptedBlob)try{this.userDidClick=!0,this.setState({decryptedBlob:await this.props.mediaEventHelper.sourceBlob.value})}catch(e){l.a.warn("Unable to decrypt attachment: ",e),u.b.createDialog(p.a,{title:Object(c.a)("Error"),description:Object(c.a)("Error decrypting attachment")})}})),i()(this,"onPlaceholderClick",(async()=>{const e=this.props.mediaEventHelper;null!=e&&e.media.isEncrypted?(await this.decryptFile(),this.downloadFile(this.fileName,this.linkText)):this.fileDownloader.download({blob:await e.sourceBlob.value,name:this.fileName})})),this.state={}}getContentUrl(){if(this.props.forExport)return null;return Object(h.a)(this.props.mxEvent.getContent()).srcHttp}get content(){return this.props.mxEvent.getContent()}get fileName(){return this.content.body&&this.content.body.length>0?this.content.body:Object(c.a)("Attachment")}get linkText(){return Object(m.a)(this.content)}downloadFile(e,t){this.fileDownloader.download({blob:this.state.decryptedBlob,name:e,autoDownload:this.userDidClick,opts:{imgSrc:b,imgStyle:null,style:v(this.dummyLink.current),textContent:Object(c.a)("Download %(text)s",{text:t})}})}componentDidUpdate(e,t){this.props.onHeightChanged&&!t.decryptedBlob&&this.state.decryptedBlob&&this.props.onHeightChanged()}render(){var e;const t=null===(e=this.props.mediaEventHelper)||void 0===e?void 0:e.media.isEncrypted,n=this.getContentUrl(),r=this.content.info?this.content.info.size:null,i=this.content.info?this.content.info.mimetype:"application/octet-stream";let o=null;if(this.props.showGenericPlaceholder&&(o=a.a.createElement(d.a,{className:"mx_MediaBody mx_MFileBody_info",onClick:this.onPlaceholderClick},a.a.createElement("span",{className:"mx_MFileBody_info_icon"}),a.a.createElement(f.a,{tooltip:Object(m.a)(this.content,Object(c.a)("Attachment"),!0)},a.a.createElement("span",{className:"mx_MFileBody_info_filename"},Object(m.a)(this.content,Object(c.a)("Attachment"),!0,!0))))),this.props.forExport){var u;const e=this.props.mxEvent.getContent();return a.a.createElement("span",{className:"mx_MFileBody"},a.a.createElement("a",{href:(null===(u=e.file)||void 0===u?void 0:u.url)||e.url},o))}let h=!this.props.showGenericPlaceholder||this.context.timelineRenderingType!==_.a.Room&&this.context.timelineRenderingType!==_.a.Search&&this.context.timelineRenderingType!==_.a.Pinned;if(this.context.timelineRenderingType===_.a.Thread&&(h=!1),t){if(!this.state.decryptedBlob)return a.a.createElement("span",{className:"mx_MFileBody"},o,h&&a.a.createElement("div",{className:"mx_MFileBody_download"},a.a.createElement(d.a,{onClick:this.decryptFile},Object(c.a)("Decrypt %(text)s",{text:this.linkText}))));const e="usercontent/";return a.a.createElement("span",{className:"mx_MFileBody"},o,h&&a.a.createElement("div",{className:"mx_MFileBody_download"},a.a.createElement("div",{"aria-hidden":!0,style:{display:"none"}},a.a.createElement("a",{ref:this.dummyLink})),a.a.createElement("iframe",{"aria-hidden":!0,title:Object(m.a)(this.content,Object(c.a)("Attachment"),!0,!0),src:e,onLoad:()=>this.downloadFile(this.fileName,this.linkText),ref:this.iframe,sandbox:"allow-scripts allow-downloads allow-downloads-without-user-activation"})))}if(n){var p;const e={target:"_blank",rel:"noreferrer noopener",href:n},t="number"!=typeof r||r>524288e3;return["application/pdf"].includes(i)&&!t?e.onClick=e=>{l.a.log(`Downloading ${i} as blob (unencrypted)`),e.preventDefault(),e.stopPropagation(),this.props.mediaEventHelper.sourceBlob.value.then((e=>{const t=URL.createObjectURL(e),n=document.createElement("a");n.download=this.fileName,n.href=t,document.body.appendChild(n),n.click(),n.remove()}))}:e.download=this.fileName,a.a.createElement("span",{className:"mx_MFileBody"},o,h&&a.a.createElement("div",{className:"mx_MFileBody_download"},a.a.createElement("a",e,a.a.createElement("span",{className:"mx_MFileBody_download_icon"}),Object(c.a)("Download %(text)s",{text:this.linkText})),this.context.timelineRenderingType===_.a.File&&a.a.createElement("div",{className:"mx_MImageBody_size"},null!==(p=this.content.info)&&void 0!==p&&p.size?Object(s.filesize)(this.content.info.size):"")))}{const e=this.linkText?": "+this.linkText:"";return a.a.createElement("span",{className:"mx_MFileBody"},o,Object(c.a)("Invalid file%(extra)s",{extra:e}))}}}i()(y,"contextType",_.b),i()(y,"defaultProps",{showGenericPlaceholder:!0})},function(e,t,n){"use strict";n.d(t,"b",(function(){return b})),n.d(t,"a",(function(){return E}));var r=n(13),i=n.n(r),o=n(149),a=n(136),s=n(269),l=n(204),c=n(1),u=n(124),d=n(202),h=n(146),p=n(268),m=n(270);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const _=(e,t)=>e.beaconInfoOwner===t;let b;!function(e){e.LivenessChange="OwnBeaconStore.LivenessChange",e.MonitoringLivePosition="OwnBeaconStore.MonitoringLivePosition",e.LocationPublishError="LocationPublishError",e.BeaconUpdateError="BeaconUpdateError"}(b||(b={}));const v="mx_live_beacon_created_id",y=()=>{let e;try{var t;if(e=JSON.parse(null!==(t=window.localStorage.getItem(v))&&void 0!==t?t:"[]"),!Array.isArray(e))throw new Error("Invalid stored value")}catch(t){c.a.error("Failed to retrieve locally created beacon event ids",t),e=[]}return e};class E extends d.a{constructor(){super(u.a),i()(this,"beacons",new Map),i()(this,"beaconsByRoomId",new Map),i()(this,"beaconLocationPublishErrorCounts",new Map),i()(this,"beaconUpdateErrors",new Map),i()(this,"liveBeaconIds",[]),i()(this,"locationInterval",void 0),i()(this,"geolocationError",void 0),i()(this,"clearPositionWatch",void 0),i()(this,"lastPublishedPositionTimestamp",void 0),i()(this,"hasLiveBeacons",(e=>!!this.getLiveBeaconIds(e).length)),i()(this,"hasLocationPublishErrors",(e=>this.getLiveBeaconIds(e).some(this.beaconHasLocationPublishError))),i()(this,"beaconHasLocationPublishError",(e=>this.beaconLocationPublishErrorCounts.get(e)>=2)),i()(this,"resetLocationPublishError",(e=>{this.incrementBeaconLocationPublishErrorCount(e,!1),this.publishCurrentLocationToBeacons()})),i()(this,"getLiveBeaconIds",(e=>e?this.liveBeaconIds.filter((t=>{var n;return null===(n=this.beaconsByRoomId.get(e))||void 0===n?void 0:n.has(t)})):this.liveBeaconIds)),i()(this,"getLiveBeaconIdsWithLocationPublishError",(e=>this.getLiveBeaconIds(e).filter(this.beaconHasLocationPublishError))),i()(this,"getBeaconById",(e=>this.beacons.get(e))),i()(this,"stopBeacon",(async e=>{var t;const n=this.beacons.get(e);null!=n&&null!==(t=n.beaconInfo)&&void 0!==t&&t.live&&(await this.updateBeaconEvent(n,{live:!1}),(e=>{const t=y();window.localStorage.setItem(v,JSON.stringify(t.filter((t=>t!==e))))})(n.beaconInfoId))})),i()(this,"onNewBeacon",((e,t)=>{_(t,this.matrixClient.getUserId())&&(this.addBeacon(t),this.checkLiveness())})),i()(this,"onUpdateBeacon",((e,t)=>{_(t,this.matrixClient.getUserId())&&(this.checkLiveness(),t.monitorLiveness())})),i()(this,"onDestroyBeacon",(e=>{this.beacons.has(e)&&this.checkLiveness()})),i()(this,"onBeaconLiveness",((e,t)=>{this.beacons.has(t.identifier)&&(e||this.stopBeacon(t.identifier),this.checkLiveness(),this.emit(b.LivenessChange,this.getLiveBeaconIds()))})),i()(this,"onRoomStateMembers",((e,t,n)=>{var r;this.beaconsByRoomId.has(t.roomId)&&n.userId===this.matrixClient.getUserId()&&("leave"!==n.membership&&"ban"!==n.membership||(null===(r=this.beaconsByRoomId.get(t.roomId))||void 0===r||r.forEach(this.removeBeacon),this.beaconsByRoomId.delete(t.roomId)))})),i()(this,"initialiseBeaconState",(()=>{const e=this.matrixClient.getUserId();this.matrixClient.getVisibleRooms().forEach((t=>{[...t.currentState.beacons.values()].filter((t=>_(t,e))).forEach((e=>this.addBeacon(e)))})),this.checkLiveness()})),i()(this,"addBeacon",(e=>{this.beacons.set(e.identifier,e),this.beaconsByRoomId.has(e.roomId)||this.beaconsByRoomId.set(e.roomId,new Set),this.beaconsByRoomId.get(e.roomId).add(e.identifier),e.monitorLiveness()})),i()(this,"removeBeacon",(e=>{this.beacons.has(e)&&(this.beacons.get(e).destroy(),this.beacons.delete(e),this.checkLiveness())})),i()(this,"checkLiveness",(()=>{const e=y(),t=this.getLiveBeaconIds();this.liveBeaconIds=[...this.beacons.values()].filter((t=>t.isLive&&e.includes(t.beaconInfoId))).sort(p.i).map((e=>e.identifier));const n=Object(h.a)(t,this.liveBeaconIds);(n.added.length||n.removed.length)&&this.emit(b.LivenessChange,this.liveBeaconIds),n.added.length&&this.isMonitoringLiveLocation&&this.publishCurrentLocationToBeacons(),!(null==t||!t.length)!=!!this.liveBeaconIds.length&&this.togglePollingLocation()})),i()(this,"createLiveBeacon",(async(e,t)=>{const n=this.getLiveBeaconIds(e);await Promise.all(n.map((e=>this.stopBeacon(e))));const{event_id:r}=await Object(m.a)(e,(e=>this.matrixClient.unstable_createLiveBeacon(e,t)),this.matrixClient);(e=>{const t=y();window.localStorage.setItem(v,JSON.stringify([...t,e]))})(r)})),i()(this,"togglePollingLocation",(()=>{this.liveBeaconIds.length?this.startPollingLocation():this.stopPollingLocation()})),i()(this,"startPollingLocation",(async()=>{this.stopPollingLocation();try{this.clearPositionWatch=Object(p.l)(this.onWatchedPosition,this.onGeolocationError)}catch(e){return void this.onGeolocationError(null==e?void 0:e.message)}this.locationInterval=window.setInterval((()=>{this.lastPublishedPositionTimestamp&&this.lastPublishedPositionTimestamp<=Date.now()-3e4&&this.publishCurrentLocationToBeacons()}),3e4),this.emit(b.MonitoringLivePosition)})),i()(this,"stopPollingLocation",(()=>{clearInterval(this.locationInterval),this.locationInterval=void 0,this.lastPublishedPositionTimestamp=void 0,this.geolocationError=void 0,this.clearPositionWatch&&(this.clearPositionWatch(),this.clearPositionWatch=void 0),this.emit(b.MonitoringLivePosition)})),i()(this,"onWatchedPosition",(e=>{const t=Object(p.h)(e);this.lastPublishedPositionTimestamp?this.debouncedPublishLocationToBeacons(t):this.publishLocationToBeacons(t)})),i()(this,"onGeolocationError",(async e=>{this.geolocationError=e,c.a.error("Geolocation failed",this.geolocationError),[p.a.Unavailable,p.a.PermissionDenied].includes(e)&&(this.stopPollingLocation(),await Promise.all(this.liveBeaconIds.map(this.stopBeacon)))})),i()(this,"publishCurrentLocationToBeacons",(async()=>{try{const e=await Object(p.e)();this.publishLocationToBeacons(Object(p.h)(e))}catch(e){this.onGeolocationError(null==e?void 0:e.message)}})),i()(this,"updateBeaconEvent",(async(e,t)=>{const{description:n,timeout:r,timestamp:i,live:o,assetType:a}=f(f({},e.beaconInfo),t),l=Object(s.makeBeaconInfoContent)(r,o,n,a,i);try{await this.matrixClient.unstable_setLiveBeacon(e.roomId,l);this.beaconUpdateErrors.has(e.identifier)&&(this.beaconUpdateErrors.delete(e.identifier),this.emit(b.BeaconUpdateError,e.identifier,!1))}catch(t){throw c.a.error("Failed to update beacon",t),this.beaconUpdateErrors.set(e.identifier,t),this.emit(b.BeaconUpdateError,e.identifier,!0),t}})),i()(this,"publishLocationToBeacons",(async e=>{this.lastPublishedPositionTimestamp=Date.now(),await Promise.all(this.healthyLiveBeaconIds.map((t=>this.sendLocationToBeacon(this.beacons.get(t),e))))})),i()(this,"debouncedPublishLocationToBeacons",Object(o.debounce)(this.publishLocationToBeacons,5e3)),i()(this,"sendLocationToBeacon",(async(e,t)=>{let{geoUri:n,timestamp:r}=t;const i=Object(s.makeBeaconContent)(n,r,e.beaconInfoId);try{await this.matrixClient.sendEvent(e.roomId,l.a.name,i),this.incrementBeaconLocationPublishErrorCount(e.identifier,!1)}catch(t){c.a.error(t),this.incrementBeaconLocationPublishErrorCount(e.identifier,!0)}})),i()(this,"incrementBeaconLocationPublishErrorCount",((e,t)=>{const n=this.beaconHasLocationPublishError(e);var r;t?this.beaconLocationPublishErrorCounts.set(e,(null!==(r=this.beaconLocationPublishErrorCounts.get(e))&&void 0!==r?r:0)+1):this.beaconLocationPublishErrorCounts.delete(e);this.beaconHasLocationPublishError(e)!==n&&this.emit(b.LocationPublishError,e)}))}static get instance(){return E.internalInstance}get isMonitoringLiveLocation(){return!!this.clearPositionWatch}async onNotReady(){this.matrixClient.removeListener(a.BeaconEvent.LivenessChange,this.onBeaconLiveness),this.matrixClient.removeListener(a.BeaconEvent.New,this.onNewBeacon),this.matrixClient.removeListener(a.BeaconEvent.Update,this.onUpdateBeacon),this.matrixClient.removeListener(a.BeaconEvent.Destroy,this.onDestroyBeacon),this.matrixClient.removeListener(a.RoomStateEvent.Members,this.onRoomStateMembers),this.beacons.forEach((e=>e.destroy())),this.stopPollingLocation(),this.beacons.clear(),this.beaconsByRoomId.clear(),this.liveBeaconIds=[],this.beaconLocationPublishErrorCounts.clear(),this.beaconUpdateErrors.clear()}async onReady(){this.matrixClient.on(a.BeaconEvent.LivenessChange,this.onBeaconLiveness),this.matrixClient.on(a.BeaconEvent.New,this.onNewBeacon),this.matrixClient.on(a.BeaconEvent.Update,this.onUpdateBeacon),this.matrixClient.on(a.BeaconEvent.Destroy,this.onDestroyBeacon),this.matrixClient.on(a.RoomStateEvent.Members,this.onRoomStateMembers),this.initialiseBeaconState()}async onAction(e){}get healthyLiveBeaconIds(){return this.liveBeaconIds.filter((e=>!this.beaconHasLocationPublishError(e)&&!this.beaconUpdateErrors.has(e)))}}i()(E,"internalInstance",(()=>{const e=new E;return e.start(),e})())},function(e,t,n){"use strict";var r=n(130),i=n.n(r),o=n(132),a=n.n(o),s=n(120),l=n.n(s),c=n(126),u=n.n(c),d=n(607);const h=["className","withError","isIdle"];t.a=e=>{let{className:t,withError:n,isIdle:r}=e,o=a()(e,h);return l.a.createElement(d.a,i()({},o,{className:u()("mx_StyledLiveBeaconIcon",t,{mx_StyledLiveBeaconIcon_error:n,mx_StyledLiveBeaconIcon_idle:r})}))}},function(e,t,n){"use strict";var r=n(130),i=n.n(r),o=n(132),a=n.n(o),s=n(120),l=n.n(s),c=n(126),u=n.n(c);const d=["legend","className","children","description"];t.a=e=>{let{legend:t,className:n,children:r,description:o}=e,s=a()(e,d);return l.a.createElement("fieldset",i()({},s,{className:u()("mx_SettingsFieldset",n)}),l.a.createElement("legend",{className:"mx_SettingsFieldset_legend"},t),o&&l.a.createElement("div",{className:"mx_SettingsFieldset_description"},o),r)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"c",(function(){return p})),n.d(t,"b",(function(){return m})),n.d(t,"d",(function(){return g})),n.d(t,"e",(function(){return _}));var r=n(13),i=n.n(r),o=n(199),a=n(1),s=n(124),l=n(128),c=n(653),u=n(122),d=n(432);const h="mx_sso_hs_url",p="mx_sso_is_url",m="mx_sso_idp_id";let g;!function(e){e.Checking="CHECKING",e.Error="ERROR",e.NotAvailable="NOTAVAILABLE",e.Downloading="DOWNLOADING",e.Ready="READY"}(g||(g={}));const f="mx_defer_update";class _{constructor(){i()(this,"notificationCount",0),i()(this,"errorDidOccur",!1),i()(this,"onAction",(e=>{switch(e.action){case"on_client_not_viable":case l.a.OnLoggedOut:this.setNotificationCount(0)}})),s.a.register(this.onAction),this.startUpdateCheck=this.startUpdateCheck.bind(this)}setNotificationCount(e){this.notificationCount=e}setErrorStatus(e){this.errorDidOccur=e}async canSelfUpdate(){return!1}startUpdateCheck(){Object(c.a)(),localStorage.removeItem(f),s.a.dispatch({action:l.a.CheckUpdates,status:g.Checking})}installUpdate(){}shouldShowUpdate(e){if(u.a.userRegisteredWithinLastHours(24))return!1;try{const[t,n]=JSON.parse(localStorage.getItem(f));return e!==t||Date.now()>n}catch(e){return!0}}deferUpdate(e){const t=new Date(Date.now()+864e5);t.setHours(8,0,0,0),localStorage.setItem(f,JSON.stringify([e,t.getTime()])),Object(c.a)()}supportsSpellCheckSettings(){return!1}allowOverridingNativeContextMenus(){return!1}supportsNotifications(){return!1}maySendNotifications(){return!1}displayNotification(e,t,n,r,i){const o={body:t,silent:!0};n&&(o.icon=n);const a=new window.Notification(e,o);return a.onclick=()=>{const e={action:l.a.ViewRoom,room_id:r.roomId,metricsTrigger:"Notification"};null!=i&&i.getThread()&&(e.event_id=i.getId()),s.a.dispatch(e),window.focus()},a}loudNotification(e,t){}clearNotification(e){e.close&&e.close()}needsUrlTooltips(){return!1}supportsSetting(e){return!1}async getSettingValue(e){}setSettingValue(e,t){throw new Error("Unimplemented")}getEventIndexingManager(){return null}setLanguage(e){}setSpellCheckEnabled(e){}async getSpellCheckEnabled(){return!1}setSpellCheckLanguages(e){}getSpellCheckLanguages(){return null}async getDesktopCapturerSources(e){return[]}supportsDesktopCapturer(){return!1}supportsJitsiScreensharing(){return!0}overrideBrowserShortcuts(){return!1}navigateForwardBack(e){}getAvailableSpellCheckLanguages(){return null}getSSOCallbackUrl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=new URL(window.location.href);return t.hash=e,t}startSingleSignOn(e,t,n,r,i){localStorage.setItem(h,e.getHomeserverUrl()),e.getIdentityServerUrl()&&localStorage.setItem(p,e.getIdentityServerUrl()),r&&localStorage.setItem(m,r);const o=this.getSSOCallbackUrl(n);window.location.href=e.getSsoLoginUrl(o.toString(),t,r,i)}async getPickleKey(e,t){if(!window.crypto||!window.crypto.subtle)return null;let n;try{n=await Object(d.c)("pickleKey",[e,t])}catch(e){a.a.error("idbLoad for pickleKey failed",e)}if(!n)return null;if(!n.encrypted||!n.iv||!n.cryptoKey)return a.a.error("Badly formatted pickle key"),null;const r=new Uint8Array(e.length+t.length+1);for(let t=0;t<e.length;t++)r[t]=e.charCodeAt(t);r[e.length]=124;for(let n=0;n<t.length;n++)r[e.length+1+n]=t.charCodeAt(n);try{const e=await crypto.subtle.decrypt({name:"AES-GCM",iv:n.iv,additionalData:r},n.cryptoKey,n.encrypted);return Object(o.encodeUnpaddedBase64)(e)}catch(e){return a.a.error("Error decrypting pickle key"),null}}async createPickleKey(e,t){if(!window.crypto||!window.crypto.subtle)return null;const n=window.crypto,r=new Uint8Array(32);n.getRandomValues(r);const i=await n.subtle.generateKey({name:"AES-GCM",length:256},!1,["encrypt","decrypt"]),a=new Uint8Array(32);n.getRandomValues(a);const s=new Uint8Array(e.length+t.length+1);for(let t=0;t<e.length;t++)s[t]=e.charCodeAt(t);s[e.length]=124;for(let n=0;n<t.length;n++)s[e.length+1+n]=t.charCodeAt(n);const l=await n.subtle.encrypt({name:"AES-GCM",iv:a,additionalData:s},i,r);try{await Object(d.d)("pickleKey",[e,t],{encrypted:l,iv:a,cryptoKey:i})}catch(e){return null}return Object(o.encodeUnpaddedBase64)(r)}async destroyPickleKey(e,t){try{await Object(d.b)("pickleKey",[e,t])}catch(e){a.a.error("idbDelete failed in destroyPickleKey",e)}}}},,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return O}));var r=n(13),i=n.n(r),o=n(16),a=n(136),s=n(127),l=n(121),c=n(120),u=n.n(c),d=n(1),h=n(744);class p extends h.a{constructor(e){super(e),i()(this,"contentRef",Object(c.createRef)()),this.state={title:this.props.title,canSubmit:!0,actionLabel:Object(l.a)("OK")}}async submit(){try{const e=await this.contentRef.current.trySubmit();this.props.onFinished(!0,e)}catch(e){d.a.error("Error during submission of module dialog:",e)}}cancel(){this.props.onFinished(!1)}renderContent(){return u.a.createElement("div",{className:"mx_ModuleUiDialog"},this.props.contentFactory(this.props.contentProps,this.contentRef))}}var m=n(131),g=n(157),f=n(124),_=n(852),b=n(168),v=n(122),y=n(389),E=n(128);function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class T{constructor(){i()(this,"cachedTranslations",void 0)}get translations(){return this.cachedTranslations}registerTranslations(e){this.cachedTranslations=e}translateString(e,t){return Object(l.a)(e,t)}openDialog(e,t){return new Promise((n=>{s.b.createDialog(p,{title:e,contentFactory:t,contentProps:{moduleApi:this}},"mx_CompoundDialog").finished.then((e=>{let[t,r]=e;n({didOkOrSubmit:t,model:r})}))}))}async registerSimpleAccount(e,t,n){var r,i;const o=null===(r=m.b.get("validated_server_config"))||void 0===r?void 0:r.hsUrl,s=a.createClient({baseUrl:o}),l={username:e,password:t,initial_device_display_name:m.b.get("default_device_display_name")||(null===(i=g.a.get())||void 0===i?void 0:i.getDefaultDeviceDisplayName()),auth:void 0,inhibit_login:!1},c=await s.registerRequest(l).catch((e=>s.registerRequest(w(w({},l),{},{auth:{session:e.data.session,type:"m.login.dummy"}}))));if(n){const e=a.createClient({baseUrl:o,userId:c.user_id,deviceId:c.device_id,accessToken:c.access_token});await e.setDisplayName(n)}return{homeserverUrl:o,userId:c.user_id,deviceId:c.device_id,accessToken:c.access_token}}async overwriteAccountAuth(e){f.a.dispatch({action:E.a.OverwriteLogin,credentials:w(w({},e),{},{guest:!1})},!0)}async navigatePermalink(e,t){Object(_.a)(e);const n=Object(b.j)(e);if(null!=n&&n.roomIdOrAlias&&t){let e=n.roomIdOrAlias,r=n.viaServers;if(e.startsWith("#")&&(e=Object(y.a)(n.roomIdOrAlias),!e)){const t=await v.a.get().getRoomIdForAlias(n.roomIdOrAlias);e=t.room_id,r||(r=t.servers)}f.a.dispatch({action:E.a.ViewRoom,room_id:e,via_servers:r}),t&&f.a.dispatch({action:E.a.JoinRoom})}}getConfigValue(e,t){const n=m.b.get(e);if(n&&"object"==typeof n)return n[t]}}class C{constructor(e){i()(this,"module",void 0),i()(this,"api",new T),this.module=e(this.api)}}var x=n(1417),F=n(1419),D=n(139),k=n(134);x.TextInputField.renderFactory=e=>u.a.createElement(D.a,{type:"text",value:e.value,onChange:t=>e.onChange(t.target.value),label:e.label,autoComplete:"off"}),F.Spinner.renderFactory=()=>u.a.createElement(k.a,null);class O{constructor(){i()(this,"modules",[])}reset(){this.modules=[]}get allTranslations(){const e={};for(const t of this.modules){const n=t.api.translations;if(n)for(const[t,r]of Object.entries(n)){Object(o.L)(e,t,e[t]||{});for(const[n,i]of Object.entries(r))Object(o.L)(e[t],n,i)}}return e}registerModule(e){this.modules.push(new C(e))}invoke(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(const t of this.modules)t.module.emit(e,...n)}}i()(O,"instance",new O)},function(e,t,n){"use strict";n.d(t,"c",(function(){return S})),n.d(t,"a",(function(){return w})),n.d(t,"b",(function(){return x})),n.d(t,"d",(function(){return F}));var r=n(13),i=n.n(r),o=n(1341),a=n.n(o),s=n.p+"opus-encoderWorker.min.c3a64a8.js",l=n(6),c=n(17),u=n.n(c),d=n(1),h=n(245),p=n(567);let m;!function(e){e.Timekeep="timekeep",e.AmplitudeMark="amplitude_mark"}(m||(m={}));var g=n(153),f=n(922),_=n(146);class b{constructor(e,t){this.width=e,i()(this,"samples",[]),this.samples=Object(_.h)(t,this.width)}get value(){return this.samples}pushValue(e){let t=Object(_.b)(this.samples);t.splice(0,0,e),t.length>this.width&&(t=t.slice(0,this.width)),this.samples=t}}var v=n(290),y=n(1342),E=n.n(y);const S=48e3,w=44,T={bitrate:24e3,encoderApplication:2048},C={bitrate:96e3,encoderApplication:2049};let x;!function(e){e.Started="started",e.EndingSoon="ending_soon",e.Ended="ended",e.Uploading="uploading",e.Uploaded="uploaded"}(x||(x={}));class F extends u.a{constructor(){super(...arguments),i()(this,"recorder",void 0),i()(this,"recorderContext",void 0),i()(this,"recorderSource",void 0),i()(this,"recorderStream",void 0),i()(this,"recorderWorklet",void 0),i()(this,"recorderProcessor",void 0),i()(this,"recording",!1),i()(this,"observable",void 0),i()(this,"targetMaxLength",900),i()(this,"amplitudes",[]),i()(this,"liveWaveform",new b(w,0)),i()(this,"onDataAvailable",void 0),i()(this,"onAudioProcess",(e=>{this.processAudioUpdate(e.playbackTime)})),i()(this,"processAudioUpdate",(e=>{if(!this.recording)return;if(this.observable.update({waveform:this.liveWaveform.value.map((e=>Object(v.a)(e,0,1))),timeSeconds:e}),!this.targetMaxLength)return;const t=900-this.recorderSeconds;t<0?this.stop():t<=10&&p.a.for(this,"ending_soon").do((()=>(this.emit(x.EndingSoon,{secondsLeft:t}),p.a.Void)))}))}get contentType(){return"audio/ogg"}get durationSeconds(){if(!this.recorder)throw new Error("Duration not available without a recording");return this.recorderContext.currentTime}get isRecording(){return this.recording}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return super.emit(e,...n),super.emit(g.b,e,...n),!0}disableMaxLength(){this.targetMaxLength=null}shouldRecordInHighQuality(){return!h.c.getAudioNoiseSuppression()}async makeRecorder(){try{this.recorderStream=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1,deviceId:h.c.getAudioInput(),autoGainControl:{ideal:h.c.getAudioAutoGainControl()},echoCancellation:{ideal:h.c.getAudioEchoCancellation()},noiseSuppression:{ideal:h.c.getAudioNoiseSuppression()}}}),this.recorderContext=Object(f.a)({}),this.recorderSource=this.recorderContext.createMediaStreamSource(this.recorderStream),this.recorderContext.audioWorklet?(await this.recorderContext.audioWorklet.addModule(E.a),this.recorderWorklet=new AudioWorkletNode(this.recorderContext,"mx-voice-worklet"),this.recorderSource.connect(this.recorderWorklet),this.recorderWorklet.connect(this.recorderContext.destination),this.recorderWorklet.port.onmessage=e=>{switch(e.data.ev){case m.Timekeep:this.processAudioUpdate(e.data.timeSeconds);break;case m.AmplitudeMark:e.data.forIndex===this.amplitudes.length&&(this.amplitudes.push(e.data.amplitude),this.liveWaveform.pushValue(e.data.amplitude))}}):(this.recorderProcessor=this.recorderContext.createScriptProcessor(1024,1,1),this.recorderSource.connect(this.recorderProcessor),this.recorderProcessor.connect(this.recorderContext.destination),this.recorderProcessor.addEventListener("audioprocess",this.onAudioProcess));const e=this.shouldRecordInHighQuality()?C:T,{encoderApplication:t,bitrate:n}=e;this.recorder=new a.a({encoderPath:s,encoderSampleRate:S,encoderApplication:t,streamPages:!0,encoderFrameSize:20,numberOfChannels:1,sourceNode:this.recorderSource,encoderBitRate:n,encoderComplexity:3,resampleQuality:3}),this.recorder.ondataavailable=e=>{var t;return null===(t=this.onDataAvailable)||void 0===t?void 0:t.call(this,e)}}catch(e){throw d.a.error("Error starting recording: ",e),e instanceof DOMException&&d.a.error(`${e.name} (${e.code}): ${e.message}`),this.recorderStream&&this.recorderStream.getTracks().forEach((e=>e.stop())),this.recorderSource&&this.recorderSource.disconnect(),this.recorder&&this.recorder.close(),this.recorderContext&&this.recorderContext.close(),e}}get liveData(){if(!this.recording)throw new Error("No observable when not recording");return this.observable}get isSupported(){return!!a.a.isRecordingSupported()}get recorderSeconds(){return this.recorder.encodedSamplePosition/48e3}async start(){if(this.recording)throw new Error("Recording already in progress");this.observable&&this.observable.close(),this.observable=new l.SimpleObservable,await this.makeRecorder(),await this.recorder.start(),this.recording=!0,this.emit(x.Started)}async stop(){return p.a.for(this,"stop").do((async()=>{if(!this.recording)throw new Error("No recording to stop");await this.recorder.stop(),this.recorderSource.disconnect(),this.recorderWorklet&&this.recorderWorklet.disconnect(),this.recorderProcessor&&(this.recorderProcessor.disconnect(),this.recorderProcessor.removeEventListener("audioprocess",this.onAudioProcess)),await this.recorderContext.close(),this.recorderStream.getTracks().forEach((e=>e.stop())),this.recording=!1,await this.recorder.close(),this.emit(x.Ended)}))}destroy(){this.stop(),this.removeAllListeners(),this.onDataAvailable=void 0,p.a.forgetAllFor(this),this.observable.close()}}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(13),i=n.n(r),o=n(1),a=n(16);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class c{constructor(){i()(this,"outgoingRoomKeyRequests",[]),i()(this,"account",null),i()(this,"crossSigningKeys",null),i()(this,"privateKeys",{}),i()(this,"sessions",{}),i()(this,"sessionProblems",{}),i()(this,"notifiedErrorDevices",{}),i()(this,"inboundGroupSessions",{}),i()(this,"inboundGroupSessionsWithheld",{}),i()(this,"deviceData",null),i()(this,"rooms",{}),i()(this,"sessionsNeedingBackup",{}),i()(this,"sharedHistoryInboundGroupSessions",{}),i()(this,"parkedSharedHistory",new Map)}async startup(){return this}deleteAllData(){return Promise.resolve()}getOrAddOutgoingRoomKeyRequest(e){const t=e.requestBody;return a.E((()=>{const n=this._getOutgoingRoomKeyRequest(t);return n?(o.a.log(`already have key request outstanding for ${t.room_id} / ${t.session_id}: not sending another`),n):(o.a.log(`enqueueing key request for ${t.room_id} / `+t.session_id),this.outgoingRoomKeyRequests.push(e),e)}))}getOutgoingRoomKeyRequest(e){return Promise.resolve(this._getOutgoingRoomKeyRequest(e))}_getOutgoingRoomKeyRequest(e){for(const t of this.outgoingRoomKeyRequests)if(a.j(t.requestBody,e))return t;return null}getOutgoingRoomKeyRequestByState(e){for(const t of this.outgoingRoomKeyRequests)for(const n of e)if(t.state===n)return Promise.resolve(t);return Promise.resolve(null)}getAllOutgoingRoomKeyRequestsByState(e){return Promise.resolve(this.outgoingRoomKeyRequests.filter((t=>t.state==e)))}getOutgoingRoomKeyRequestsByTarget(e,t,n){const r=[];for(const i of this.outgoingRoomKeyRequests)for(const o of n)i.state===o&&i.recipients.some((n=>n.userId===e&&n.deviceId===t))&&r.push(i);return Promise.resolve(r)}updateOutgoingRoomKeyRequest(e,t,n){for(const r of this.outgoingRoomKeyRequests)if(r.requestId===e)return r.state!==t?(o.a.warn(`Cannot update room key request from ${t} as it was already updated to ${r.state}`),Promise.resolve(null)):(Object.assign(r,n),Promise.resolve(r));return Promise.resolve(null)}deleteOutgoingRoomKeyRequest(e,t){for(let n=0;n<this.outgoingRoomKeyRequests.length;n++){const r=this.outgoingRoomKeyRequests[n];if(r.requestId===e)return r.state!=t?(o.a.warn(`Cannot delete room key request in state ${r.state} (expected ${t})`),Promise.resolve(null)):(this.outgoingRoomKeyRequests.splice(n,1),Promise.resolve(r))}return Promise.resolve(null)}getAccount(e,t){t(this.account)}storeAccount(e,t){this.account=t}getCrossSigningKeys(e,t){t(this.crossSigningKeys)}getSecretStorePrivateKey(e,t,n){t(this.privateKeys[n]||null)}storeCrossSigningKeys(e,t){this.crossSigningKeys=t}storeSecretStorePrivateKey(e,t,n){this.privateKeys[t]=n}countEndToEndSessions(e,t){t(Object.keys(this.sessions).length)}getEndToEndSession(e,t,n,r){r((this.sessions[e]||{})[t]||null)}getEndToEndSessions(e,t,n){n(this.sessions[e]||{})}getAllEndToEndSessions(e,t){Object.entries(this.sessions).forEach((e=>{let[n,r]=e;Object.entries(r).forEach((e=>{let[r,i]=e;t(l(l({},i),{},{deviceKey:n,sessionId:r}))}))}))}storeEndToEndSession(e,t,n,r){let i=this.sessions[e];void 0===i&&(i={},this.sessions[e]=i),i[t]=n}async storeEndToEndSessionProblem(e,t,n){const r=this.sessionProblems[e]=this.sessionProblems[e]||[];r.push({type:t,fixed:n,time:Date.now()}),r.sort(((e,t)=>e.time-t.time))}async getEndToEndSessionProblem(e,t){const n=this.sessionProblems[e]||[];if(!n.length)return null;const r=n[n.length-1];for(const e of n)if(e.time>t)return Object.assign({},e,{fixed:r.fixed});return r.fixed?null:r}async filterOutNotifiedErrorDevices(e){const t=this.notifiedErrorDevices,n=[];for(const r of e){const{userId:e,deviceInfo:i}=r;e in t?i.deviceId in t[e]||(n.push(r),Object(a.L)(t[e],i.deviceId,!0)):(n.push(r),Object(a.L)(t,e,{[i.deviceId]:!0}))}return n}getEndToEndInboundGroupSession(e,t,n,r){const i=e+"/"+t;r(this.inboundGroupSessions[i]||null,this.inboundGroupSessionsWithheld[i]||null)}getAllEndToEndInboundGroupSessions(e,t){for(const e of Object.keys(this.inboundGroupSessions))t({senderKey:e.slice(0,43),sessionId:e.slice(44),sessionData:this.inboundGroupSessions[e]});t(null)}addEndToEndInboundGroupSession(e,t,n,r){const i=e+"/"+t;void 0===this.inboundGroupSessions[i]&&(this.inboundGroupSessions[i]=n)}storeEndToEndInboundGroupSession(e,t,n,r){this.inboundGroupSessions[e+"/"+t]=n}storeEndToEndInboundGroupSessionWithheld(e,t,n,r){const i=e+"/"+t;this.inboundGroupSessionsWithheld[i]=n}getEndToEndDeviceData(e,t){t(this.deviceData)}storeEndToEndDeviceData(e,t){this.deviceData=e}storeEndToEndRoom(e,t,n){this.rooms[e]=t}getEndToEndRooms(e,t){t(this.rooms)}getSessionsNeedingBackup(e){const t=[];for(const n in this.sessionsNeedingBackup)if(this.inboundGroupSessions[n]&&(t.push({senderKey:n.slice(0,43),sessionId:n.slice(44),sessionData:this.inboundGroupSessions[n]}),e&&n.length>=e))break;return Promise.resolve(t)}countSessionsNeedingBackup(){return Promise.resolve(Object.keys(this.sessionsNeedingBackup).length)}unmarkSessionsNeedingBackup(e){for(const t of e){const e=t.senderKey+"/"+t.sessionId;delete this.sessionsNeedingBackup[e]}return Promise.resolve()}markSessionsNeedingBackup(e){for(const t of e){const e=t.senderKey+"/"+t.sessionId;this.sessionsNeedingBackup[e]=!0}return Promise.resolve()}addSharedHistoryInboundGroupSession(e,t,n){const r=this.sharedHistoryInboundGroupSessions[e]||[];r.push([t,n]),this.sharedHistoryInboundGroupSessions[e]=r}getSharedHistoryInboundGroupSessions(e){return Promise.resolve(this.sharedHistoryInboundGroupSessions[e]||[])}addParkedSharedHistory(e,t){var n;const r=null!==(n=this.parkedSharedHistory.get(e))&&void 0!==n?n:[];r.push(t),this.parkedSharedHistory.set(e,r)}takeParkedSharedHistory(e){var t;const n=null!==(t=this.parkedSharedHistory.get(e))&&void 0!==t?t:[];return this.parkedSharedHistory.delete(e),Promise.resolve(n)}doTxn(e,t,n){return Promise.resolve(n(null))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(13),i=n.n(r),o=n(222),a=n(151),s=n(16);function l(e){return"string"==typeof e&&!!e&&"undefined"!==e&&"null"!==e||"number"==typeof e}class c{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i()(this,"rooms",{}),i()(this,"users",{}),i()(this,"syncToken",null),i()(this,"filters",new s.b((()=>new Map))),i()(this,"accountData",new Map),i()(this,"localStorage",void 0),i()(this,"oobMembers",new Map),i()(this,"pendingEvents",{}),i()(this,"clientOptions",void 0),i()(this,"pendingToDeviceBatches",[]),i()(this,"nextToDeviceBatchId",0),i()(this,"onRoomMember",((e,t,n)=>{if("invite"===n.membership)return;const r=this.users[n.userId]||new o.a(n.userId);n.name&&(r.setDisplayName(n.name),n.events.member&&r.setRawDisplayName(n.events.member.getDirectionalContent().displayname)),n.events.member&&n.events.member.getContent().avatar_url&&r.setAvatarUrl(n.events.member.getContent().avatar_url),this.users[r.userId]=r})),this.localStorage=e.localStorage}getSyncToken(){return this.syncToken}isNewlyCreated(){return Promise.resolve(!0)}setSyncToken(e){this.syncToken=e}storeRoom(e){this.rooms[e.roomId]=e,e.currentState.on(a.b.Members,this.onRoomMember),e.currentState.getMembers().forEach((t=>{this.onRoomMember(null,e.currentState,t)}))}getRoom(e){return this.rooms[e]||null}getRooms(){return Object.values(this.rooms)}removeRoom(e){this.rooms[e]&&this.rooms[e].currentState.removeListener(a.b.Members,this.onRoomMember),delete this.rooms[e]}getRoomSummaries(){return Object.values(this.rooms).map((function(e){return e.summary}))}storeUser(e){this.users[e.userId]=e}getUser(e){return this.users[e]||null}getUsers(){return Object.values(this.users)}scrollback(e,t){return[]}storeEvents(e,t,n,r){}storeFilter(e){null!=e&&e.userId&&null!=e&&e.filterId&&this.filters.getOrCreate(e.userId).set(e.filterId,e)}getFilter(e,t){var n;return(null===(n=this.filters.get(e))||void 0===n?void 0:n.get(t))||null}getFilterIdByName(e){if(!this.localStorage)return null;const t="mxjssdk_memory_filter_"+e;try{const e=this.localStorage.getItem(t);if(l(e))return e}catch(e){}return null}setFilterIdByName(e,t){if(!this.localStorage)return;const n="mxjssdk_memory_filter_"+e;try{l(t)?this.localStorage.setItem(n,t):this.localStorage.removeItem(n)}catch(e){}}storeAccountDataEvents(e){e.forEach((e=>{!Object.keys(e.getContent()).length?this.accountData.delete(e.getType()):this.accountData.set(e.getType(),e)}))}getAccountData(e){return this.accountData.get(e)}setSyncData(e){return Promise.resolve()}wantsSave(){return!1}save(e){}startup(){return Promise.resolve()}getSavedSync(){return Promise.resolve(null)}getSavedSyncToken(){return Promise.resolve(null)}deleteAllData(){return this.rooms={},this.users={},this.syncToken=null,this.filters=new s.b((()=>new Map)),this.accountData=new Map,Promise.resolve()}getOutOfBandMembers(e){return Promise.resolve(this.oobMembers.get(e)||null)}setOutOfBandMembers(e,t){return this.oobMembers.set(e,t),Promise.resolve()}clearOutOfBandMembers(e){return this.oobMembers.delete(e),Promise.resolve()}getClientOptions(){return Promise.resolve(this.clientOptions)}storeClientOptions(e){return this.clientOptions=Object.assign({},e),Promise.resolve()}async getPendingEvents(e){var t;return null!==(t=this.pendingEvents[e])&&void 0!==t?t:[]}async setPendingEvents(e,t){this.pendingEvents[e]=t}saveToDeviceBatches(e){for(const t of e)this.pendingToDeviceBatches.push({id:this.nextToDeviceBatchId++,eventType:t.eventType,txnId:t.txnId,batch:t.batch});return Promise.resolve()}async getOldestToDeviceBatch(){return 0===this.pendingToDeviceBatches.length?null:this.pendingToDeviceBatches[0]}removeToDeviceBatch(e){return this.pendingToDeviceBatches=this.pendingToDeviceBatches.filter((t=>t.id!==e)),Promise.resolve()}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(16);function i(e,t,n,i,o){let a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if("string"!=typeof t||!t)return"";if(0!==t.indexOf("mxc://"))return a?t:"";let s=t.slice(6),l="/_matrix/media/r0/download/";const c={};n&&(c.width=Math.round(n).toString()),i&&(c.height=Math.round(i).toString()),o&&(c.method=o),Object.keys(c).length>0&&(l="/_matrix/media/r0/thumbnail/");const u=s.indexOf("#");let d="";u>=0&&(d=s.slice(u),s=s.slice(0,u));return e+l+s+(0===Object.keys(c).length?"":"?"+r.n(c))+d}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return h}));var r=n(13),i=n.n(r),o=n(179),a=n(1),s=n(140),l=n(158),c=n(661);let u,d;u=a.a.log.bind(a.a),function(e){e.Ignore="ignore",e.Replace="replace"}(d||(d={}));class h extends l.b{constructor(e){var t,n,r;let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2?arguments[2]:void 0,l=arguments.length>3?arguments[3]:void 0,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;super(),this.room=e,this.thread=l,this.threadListType=u,i()(this,"relations",void 0),i()(this,"timelineSupport",void 0),i()(this,"displayPendingEvents",void 0),i()(this,"liveTimeline",void 0),i()(this,"timelines",void 0),i()(this,"_eventIdToTimeline",new Map),i()(this,"filter",void 0),this.timelineSupport=Boolean(a.timelineSupport),this.liveTimeline=new o.b(this),this.displayPendingEvents=!1!==a.pendingEvents,this.timelines=[this.liveTimeline],this._eventIdToTimeline=new Map,this.filter=a.filter,this.relations=null!==(t=null===(n=this.room)||void 0===n?void 0:n.relations)&&void 0!==t?t:new c.a(null!==(r=null==e?void 0:e.client)&&void 0!==r?r:s)}getTimelines(){return this.timelines}getFilter(){return this.filter}setFilter(e){this.filter=e}getPendingEvents(){return this.room&&this.displayPendingEvents?this.room.getPendingEvents():[]}getLiveTimeline(){return this.liveTimeline}setLiveTimeline(e){this.liveTimeline=e}eventIdToTimeline(e){return this._eventIdToTimeline.get(e)}replaceEventId(e,t){const n=this._eventIdToTimeline.get(e);n&&(this._eventIdToTimeline.delete(e),this._eventIdToTimeline.set(t,n))}resetLiveTimeline(e,t){const n=!this.timelineSupport||!t,r=this.liveTimeline,i=n?r.forkLive(o.b.FORWARDS):r.fork(o.b.FORWARDS);n?(this.timelines=[i],this._eventIdToTimeline=new Map):this.timelines.push(i),t&&r.setPaginationToken(t,o.b.FORWARDS),i.setPaginationToken(null!=e?e:null,o.b.BACKWARDS),this.liveTimeline=i,this.emit(s.d.TimelineReset,this.room,this,n)}getTimelineForEvent(e){if(null==e)return null;const t=this._eventIdToTimeline.get(e);return void 0===t?null:t}findEventById(e){const t=this.getTimelineForEvent(e);if(t)return t.getEvents().find((function(t){return t.getId()==e}))}addTimeline(){if(!this.timelineSupport)throw new Error("timeline support is disabled. Set the 'timelineSupport' parameter to true when creating MatrixClient to enable it.");const e=new o.b(this);return this.timelines.push(e),e}addEventsToTimeline(e,t,n,r){if(!n)throw new Error("'timeline' not specified for EventTimelineSet.addEventsToTimeline");if(!t&&n==this.liveTimeline)throw new Error("EventTimelineSet.addEventsToTimeline cannot be used for adding events to the live timeline - use Room.addLiveEvents instead");if(this.filter&&!(e=this.filter.filterRoomTimeline(e)).length)return;const i=t?o.b.BACKWARDS:o.b.FORWARDS,s=t?o.b.FORWARDS:o.b.BACKWARDS;let l=!1,c=!1;for(const r of e){const e=r.getId(),d=this._eventIdToTimeline.get(e);if(!d){this.addEventToTimeline(r,n,{toStartOfTimeline:t}),c=!0,l=!0;continue}if(c=!1,d==n){u("Event "+e+" already in timeline "+n);continue}const h=n.getNeighbouringTimeline(i);if(h){u(d==h?"Event "+e+" in neighbouring timeline - switching to "+d:"Event "+e+" already in a different timeline "+d),n=d;continue}a.a.info("Already have timeline for "+e+" - joining timeline "+n+" to "+d);const p=d===this.liveTimeline,m=n===this.liveTimeline,g=i===o.b.BACKWARDS&&p,f=i===o.b.FORWARDS&&m;g||f?(g&&a.a.warn("Refusing to set a preceding existingTimeLine on our timeline as the existingTimeLine is live ("+d+")"),f&&a.a.warn("Refusing to set our preceding timeline on a existingTimeLine as our timeline is live ("+n+")")):(n.setNeighbouringTimeline(d,i),d.setNeighbouringTimeline(n,s),n=d,l=!0)}if(c||!l){if(i===o.b.FORWARDS&&n===this.liveTimeline)return a.a.warn({lastEventWasNew:c,didUpdate:l}),void a.a.warn(`Refusing to set forwards pagination token of live timeline ${n} to ${r}`);n.setPaginationToken(null!=r?r:null,i)}}addLiveEvent(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0,s=t||d.Ignore;if("object"==typeof t?({duplicateStrategy:s=d.Ignore,fromCache:r=!1,roomState:i,timelineWasEmpty:n}=t):void 0!==t&&a.a.warn("Overload deprecated: `EventTimelineSet.addLiveEvent(event, duplicateStrategy?, fromCache?, roomState?)` is deprecated in favor of the overload with `EventTimelineSet.addLiveEvent(event, IAddLiveEventOptions)`"),this.filter){if(!this.filter.filterRoomTimeline([e]).length)return}const l=this._eventIdToTimeline.get(e.getId());if(l)if(s===d.Replace){u("EventTimelineSet.addLiveEvent: replacing duplicate event "+e.getId());const t=l.getEvents();for(let n=0;n<t.length;n++)if(t[n].getId()===e.getId()){i||(i=l.getState(o.b.FORWARDS)),o.b.setEventMetadata(e,i,!1),t[n]=e;break}}else u("EventTimelineSet.addLiveEvent: ignoring duplicate event "+e.getId());else this.addEventToTimeline(e,this.liveTimeline,{toStartOfTimeline:!1,fromCache:r,roomState:i,timelineWasEmpty:n})}addEventToTimeline(e,t,n){let r,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0,l=!!n;var c;if("object"==typeof n?({toStartOfTimeline:l,fromCache:i=!1,roomState:o,timelineWasEmpty:r}=n):void 0!==n&&a.a.warn("Overload deprecated: `EventTimelineSet.addEventToTimeline(event, timeline, toStartOfTimeline, fromCache?, roomState?)` is deprecated in favor of the overload with `EventTimelineSet.addEventToTimeline(event, timeline, IAddEventToTimelineOptions)`"),t.getTimelineSet()!==this)throw new Error(`EventTimelineSet.addEventToTimeline: Timeline=${t.toString()} does not belong " +\n "in timelineSet(threadId=${null===(c=this.thread)||void 0===c?void 0:c.id})`);if(this.room&&!this.canContain(e)){var u;let n=`event=${e.getId()}`;return e.threadRootId&&(n+=`(belongs to thread=${e.threadRootId})`),void a.a.warn(`EventTimelineSet.addEventToTimeline: Ignoring ${n} that does not belong in timeline=${t.toString()} timelineSet(threadId=${null===(u=this.thread)||void 0===u?void 0:u.id})`)}const d=e.getId();t.addEvent(e,{toStartOfTimeline:l,roomState:o,timelineWasEmpty:r}),this._eventIdToTimeline.set(d,t),this.relations.aggregateParentEvent(e),this.relations.aggregateChildEvent(e,this);const h={timeline:t,liveEvent:!l&&t==this.liveTimeline&&!i};this.emit(s.d.Timeline,e,this.room,Boolean(l),!1,h)}handleRemoteEcho(e,t,n){const r=this._eventIdToTimeline.get(t);r?(this._eventIdToTimeline.delete(t),this._eventIdToTimeline.set(n,r)):this.filter&&!this.filter.filterRoomTimeline([e]).length||this.addEventToTimeline(e,this.liveTimeline,{toStartOfTimeline:!1})}removeEvent(e){const t=this._eventIdToTimeline.get(e);if(!t)return null;const n=t.removeEvent(e);if(n){this._eventIdToTimeline.delete(e);const r={timeline:t};this.emit(s.d.Timeline,n,this.room,void 0,!0,r)}return n}compareEventOrdering(e,t){if(e==t)return 0;const n=this._eventIdToTimeline.get(e),r=this._eventIdToTimeline.get(t);if(void 0===n)return null;if(void 0===r)return null;if(n===r){let r,i;const o=n.getEvents();for(let n=0;n<o.length&&(void 0===r||void 0===i);n++){const a=o[n].getId();a==e&&(r=n),a==t&&(i=n)}return r-i}let i=n;for(;i;){if(i===r)return-1;i=i.getNeighbouringTimeline(o.b.FORWARDS)}for(i=n;i;){if(i===r)return 1;i=i.getNeighbouringTimeline(o.b.BACKWARDS)}return null}canContain(e){if(!this.room)throw new Error("Cannot call `EventTimelineSet::canContain without a `room` set. Set the room when creating the EventTimelineSet to call this method.");const{threadId:t,shouldLiveInRoom:n}=this.room.eventShouldLiveIn(e);return this.thread?this.thread.id===t:n}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return d}));var r=n(13),i=n.n(r),o=n(143),a=n(1),s=n(129),l=n(158),c=n(140);let u;!function(e){e.Add="Relations.add",e.Remove="Relations.remove",e.Redaction="Relations.redaction"}(u||(u={}));class d extends l.b{constructor(e,t,n,r){super(),this.relationType=e,this.eventType=t,this.altEventTypes=r,i()(this,"relationEventIds",new Set),i()(this,"relations",new Set),i()(this,"annotationsByKey",{}),i()(this,"annotationsBySender",{}),i()(this,"sortedAnnotationsByKey",[]),i()(this,"targetEvent",null),i()(this,"creationEmitted",!1),i()(this,"client",void 0),i()(this,"onEventStatus",((e,t)=>{e.isSending()?t===o.a.CANCELLED&&(e.removeListener(o.c.Status,this.onEventStatus),this.removeEvent(e)):e.removeListener(o.c.Status,this.onEventStatus)})),i()(this,"onBeforeRedaction",(async e=>{if(this.relations.has(e)){if(this.relations.delete(e),this.relationType===s.h.Annotation)this.removeAnnotationFromAggregation(e);else if(this.relationType===s.h.Replace&&this.targetEvent&&!this.targetEvent.isState()){const e=await this.getLastReplacement();this.targetEvent.makeReplaced(e)}e.removeListener(o.c.BeforeRedaction,this.onBeforeRedaction),this.emit(u.Redaction,e)}})),this.client=n instanceof c.c?n.client:n}async addEvent(e){if(this.relationEventIds.has(e.getId()))return;const t=e.getRelation();if(!t)return void a.a.error("Event must have relation info");const n=t.rel_type,r=e.getType();if(this.relationType===n&&function(e,t){return[t,...arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]].includes(e)}(r,this.eventType,this.altEventTypes)){if(e.isSending()&&e.on(o.c.Status,this.onEventStatus),this.relations.add(e),this.relationEventIds.add(e.getId()),this.relationType===s.h.Annotation)this.addAnnotationToAggregation(e);else if(this.relationType===s.h.Replace&&this.targetEvent&&!this.targetEvent.isState()){const e=await this.getLastReplacement();this.targetEvent.makeReplaced(e)}e.on(o.c.BeforeRedaction,this.onBeforeRedaction),this.emit(u.Add,e),this.maybeEmitCreated()}else a.a.error("Event relation info doesn't match this container")}async removeEvent(e){if(this.relations.has(e)){if(this.relations.delete(e),this.relationType===s.h.Annotation)this.removeAnnotationFromAggregation(e);else if(this.relationType===s.h.Replace&&this.targetEvent&&!this.targetEvent.isState()){const e=await this.getLastReplacement();this.targetEvent.makeReplaced(e)}this.emit(u.Remove,e)}}getRelations(){return[...this.relations]}addAnnotationToAggregation(e){var t;const{key:n}=null!==(t=e.getRelation())&&void 0!==t?t:{};if(!n)return;let r=this.annotationsByKey[n];r||(r=this.annotationsByKey[n]=new Set,this.sortedAnnotationsByKey.push([n,r])),r.add(e),this.sortedAnnotationsByKey.sort(((e,t)=>{const n=e[1];return t[1].size-n.size}));const i=e.getSender();let o=this.annotationsBySender[i];o||(o=this.annotationsBySender[i]=new Set),o.add(e)}removeAnnotationFromAggregation(e){var t;const{key:n}=null!==(t=e.getRelation())&&void 0!==t?t:{};if(!n)return;const r=this.annotationsByKey[n];r&&(r.delete(e),this.sortedAnnotationsByKey.sort(((e,t)=>{const n=e[1];return t[1].size-n.size})));const i=e.getSender(),o=this.annotationsBySender[i];o&&o.delete(e)}getSortedAnnotationsByKey(){return this.relationType!==s.h.Annotation?null:this.sortedAnnotationsByKey}getAnnotationsBySender(){return this.relationType!==s.h.Annotation?null:this.annotationsBySender}async getLastReplacement(){if(this.relationType!==s.h.Replace)return null;if(!this.targetEvent)return null;const e=this.targetEvent.getServerAggregatedRelation(s.h.Replace),t=null==e?void 0:e.origin_server_ts,n=this.getRelations().reduce(((e,n)=>n.getSender()!==this.targetEvent.getSender()||t&&t>n.getTs()||e&&e.getTs()>n.getTs()?e:n),null);return null!=n&&n.shouldAttemptDecryption()&&this.client.isCryptoEnabled()?await n.attemptDecryption(this.client.crypto):null!=n&&n.isBeingDecrypted()&&await n.getDecryptionPromise(),n}async setTargetEvent(e){if(!this.targetEvent){if(this.targetEvent=e,this.relationType===s.h.Replace&&!this.targetEvent.isState()){const e=await this.getLastReplacement();e&&this.targetEvent.makeReplaced(e)}this.maybeEmitCreated()}}maybeEmitCreated(){this.creationEmitted||this.targetEvent&&this.relations.size&&(this.creationEmitted=!0,this.targetEvent.emit(o.c.RelationsCreated,this.relationType,this.eventType))}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return l})),n.d(t,"d",(function(){return c})),n.d(t,"c",(function(){return u})),n.d(t,"a",(function(){return d}));var r=n(13),i=n.n(r),o=n(269),a=n(16),s=n(158);let l;!function(e){e.New="Beacon.new",e.Update="Beacon.update",e.LivenessChange="Beacon.LivenessChange",e.Destroy="Beacon.Destroy",e.LocationUpdate="Beacon.LocationUpdate"}(l||(l={}));const c=(e,t,n)=>n>=e&&e+t>=n,u=e=>`${e.getRoomId()}_${e.getStateKey()}`;class d extends s.b{constructor(e){super(),this.rootEvent=e,i()(this,"roomId",void 0),i()(this,"_beaconInfo",void 0),i()(this,"_isLive",void 0),i()(this,"livenessWatchTimeout",void 0),i()(this,"_latestLocationEvent",void 0),i()(this,"clearLatestLocation",(()=>{this._latestLocationEvent=void 0,this.emit(l.LocationUpdate,this.latestLocationState)})),this.setBeaconInfo(this.rootEvent),this.roomId=this.rootEvent.getRoomId()}get isLive(){return!!this._isLive}get identifier(){return u(this.rootEvent)}get beaconInfoId(){return this.rootEvent.getId()}get beaconInfoOwner(){return this.rootEvent.getStateKey()}get beaconInfoEventType(){return this.rootEvent.getType()}get beaconInfo(){return this._beaconInfo}get latestLocationState(){return this._latestLocationEvent&&Object(o.parseBeaconContent)(this._latestLocationEvent.getContent())}get latestLocationEvent(){return this._latestLocationEvent}update(e){if(u(e)!==this.identifier)throw new Error("Invalid updating event");e.getTs()<this.rootEvent.getTs()||(this.rootEvent=e,this.setBeaconInfo(this.rootEvent),this.emit(l.Update,e,this),this.clearLatestLocation())}destroy(){this.livenessWatchTimeout&&clearTimeout(this.livenessWatchTimeout),this._isLive=!1,this.emit(l.Destroy,this.identifier)}monitorLiveness(){if(this.livenessWatchTimeout&&clearTimeout(this.livenessWatchTimeout),this.checkLiveness(),this.beaconInfo)if(this.isLive){const e=this.beaconInfo.timestamp+this.beaconInfo.timeout-Date.now();e>1&&(this.livenessWatchTimeout=setTimeout((()=>{this.monitorLiveness()}),e))}else this.beaconInfo.timestamp>Date.now()&&(this.livenessWatchTimeout=setTimeout((()=>{this.monitorLiveness()}),this.beaconInfo.timestamp-Date.now()))}addLocations(e){var t;if(!this.isLive)return;const n=null===(t=e.filter((e=>{const t=e.getContent(),n=Object(o.parseBeaconContent)(t);if(!n.uri||!n.timestamp)return!1;const{timestamp:r}=n;return this._beaconInfo.timestamp&&c(this._beaconInfo.timestamp,this._beaconInfo.timeout,r)&&(!this.latestLocationState||r>this.latestLocationState.timestamp)})).sort(a.O))||void 0===t?void 0:t[0];n&&(this._latestLocationEvent=n,this.emit(l.LocationUpdate,this.latestLocationState))}setBeaconInfo(e){this._beaconInfo=Object(o.parseBeaconInfoContent)(e.getContent()),this.checkLiveness()}checkLiveness(){var e,t;const n=this.isLive;if(!this.beaconInfo)return;const r=this.beaconInfo.timestamp>Date.now()?this.beaconInfo.timestamp-36e4:this.beaconInfo.timestamp;this._isLive=!(null===(e=this._beaconInfo)||void 0===e||!e.live)&&!!r&&c(r,null===(t=this._beaconInfo)||void 0===t?void 0:t.timeout,Date.now()),n!==this.isLive&&this.emit(l.LivenessChange,this.isLive,this)}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return s}));var r=n(13),i=n.n(r);class o extends Error{constructor(e,t){super(e),this.httpStatus=t}}class a extends o{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=e.error||"Unknown message";t&&(o=`[${t}] ${o}`),n&&(o=`${o} (${n})`),super(`MatrixError: ${o}`,t),this.httpStatus=t,this.url=n,this.event=r,i()(this,"errcode",void 0),i()(this,"data",void 0),this.errcode=e.errcode,this.name=e.errcode||"Unknown error code",this.data=e}}class s extends Error{constructor(e,t){super(e+(t?`: ${t.message}`:""))}get name(){return"ConnectionError"}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}));const r="org.matrix.msc3077.sdp_stream_metadata";let i;!function(e){e.Usermedia="m.usermedia",e.Screenshare="m.screenshare"}(i||(i={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r,i=n(13),o=n.n(i);!function(e){e[e.Blocked=-1]="Blocked",e[e.Unverified=0]="Unverified",e[e.Verified=1]="Verified"}(r||(r={}));class a{static fromStorage(e,t){const n=new a(t);for(const t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}constructor(e){this.deviceId=e,o()(this,"algorithms",[]),o()(this,"keys",{}),o()(this,"verified",r.Unverified),o()(this,"known",!1),o()(this,"unsigned",{}),o()(this,"signatures",{})}toStorage(){return{algorithms:this.algorithms,keys:this.keys,verified:this.verified,known:this.known,unsigned:this.unsigned,signatures:this.signatures}}getFingerprint(){return this.keys["ed25519:"+this.deviceId]}getIdentityKey(){return this.keys["curve25519:"+this.deviceId]}getDisplayName(){return this.unsigned.device_display_name||null}isBlocked(){return this.verified==r.Blocked}isVerified(){return this.verified==r.Verified}isUnverified(){return this.verified==r.Unverified}isKnown(){return!0===this.known}}o()(a,"DeviceVerification",{VERIFIED:r.Verified,UNVERIFIED:r.Unverified,BLOCKED:r.Blocked})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NIL",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return l.default}});var r=h(n(966)),i=h(n(968)),o=h(n(970)),a=h(n(972)),s=h(n(974)),l=h(n(975)),c=h(n(415)),u=h(n(414)),d=h(n(666));function h(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";(function(e,r){n.d(t,"a",(function(){return h})),n.d(t,"c",(function(){return m})),n.d(t,"b",(function(){return g})),n.d(t,"d",(function(){return f})),n.d(t,"e",(function(){return _}));var i=n(13),o=n.n(i),a=n(199),s=n(1),l=n(225),c=n(322);const u=6e4;function d(e){return Object.values(e.keys)[0]}class h{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.userId=e,this.callbacks=t,this.cacheCallbacks=n,o()(this,"keys",{}),o()(this,"firstUse",!0),o()(this,"crossSigningVerifiedBefore",!1)}static fromStorage(e,t){const n=new h(t);for(const t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}toStorage(){return{keys:this.keys,firstUse:this.firstUse,crossSigningVerifiedBefore:this.crossSigningVerifiedBefore}}async getCrossSigningKey(t,n){const r=["master","self_signing","user_signing"].indexOf(t)>=0;if(!this.callbacks.getCrossSigningKey)throw new Error("No getCrossSigningKey callback supplied");function i(t){if(!t)return;const r=new e.Olm.PkSigning,i=r.init_with_seed(t);if(i===n)return[i,r];r.free()}void 0===n&&(n=this.getId(t));let o=null;this.cacheCallbacks.getCrossSigningKeyCache&&r&&(o=await this.cacheCallbacks.getCrossSigningKeyCache(t,n));const a=i(o);if(a)return a;o=await this.callbacks.getCrossSigningKey(t,n);const s=i(o);if(s)return this.cacheCallbacks.storeCrossSigningKeyCache&&r&&await this.cacheCallbacks.storeCrossSigningKeyCache(t,o),s;if(!o)throw new Error("getCrossSigningKey callback for "+t+" returned falsey");throw new Error("Key type "+t+" from getCrossSigningKey callback did not match")}async isStoredInSecretStorage(e){const t=await e.isStored("m.cross_signing.master")||{};function n(e){for(const n of Object.keys(t))e[n]||delete t[n]}for(const t of["self_signing","user_signing"])n(await e.isStored(`m.cross_signing.${t}`)||{});return Object.keys(t).length?t:null}static async storeInSecretStorage(e,t){for(const[n,r]of e){const e=Object(a.encodeBase64)(r);await t.store(`m.cross_signing.${n}`,e)}}static async getFromSecretStorage(e,t){const n=await t.get(`m.cross_signing.${e}`);return n?Object(a.decodeBase64)(n):null}async isStoredInKeyCache(e){const t=this.cacheCallbacks;if(!t)return!1;const n=e?[e]:["master","self_signing","user_signing"];for(const e of n){var r;if(!await(null===(r=t.getCrossSigningKeyCache)||void 0===r?void 0:r.call(t,e)))return!1}return!0}async getCrossSigningKeysFromCache(){const e=new Map,t=this.cacheCallbacks;if(!t)return e;for(const r of["master","self_signing","user_signing"]){var n;const i=await(null===(n=t.getCrossSigningKeyCache)||void 0===n?void 0:n.call(t,r));i&&e.set(r,i)}return e}getId(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"master";if(!this.keys[e])return null;return d(this.keys[e])}async resetKeys(t){if(!this.callbacks.saveCrossSigningKeys)throw new Error("No saveCrossSigningKeys callback supplied");if(void 0===t||t&p.MASTER||!this.keys.master)t=p.MASTER|p.USER_SIGNING|p.SELF_SIGNING;else if(0===t)return;const n={},r={};let i,o;try{if(t&p.MASTER?(i=new e.Olm.PkSigning,n.master=i.generate_seed(),o=i.init_with_seed(n.master),r.master={user_id:this.userId,usage:["master"],keys:{["ed25519:"+o]:o}}):[o,i]=await this.getCrossSigningKey("master"),t&p.SELF_SIGNING){const t=new e.Olm.PkSigning;try{n.self_signing=t.generate_seed();const e=t.init_with_seed(n.self_signing);r.self_signing={user_id:this.userId,usage:["self_signing"],keys:{["ed25519:"+e]:e}},Object(a.pkSign)(r.self_signing,i,this.userId,o)}finally{t.free()}}if(t&p.USER_SIGNING){const t=new e.Olm.PkSigning;try{n.user_signing=t.generate_seed();const e=t.init_with_seed(n.user_signing);r.user_signing={user_id:this.userId,usage:["user_signing"],keys:{["ed25519:"+e]:e}},Object(a.pkSign)(r.user_signing,i,this.userId,o)}finally{t.free()}}Object.assign(this.keys,r),this.callbacks.saveCrossSigningKeys(n)}finally{i&&i.free()}}clearKeys(){this.keys={}}setKeys(e){const t={};if(e.master){if(e.master.user_id!==this.userId){const t="Mismatched user ID "+e.master.user_id+" in master key from "+this.userId;throw s.a.error(t),new Error(t)}this.keys.master?d(e.master)!==this.getId()&&(this.firstUse=!1):this.firstUse=!0,t.master=e.master}else{if(!this.keys.master)throw new Error("Tried to set cross-signing keys without a master key");t.master=this.keys.master}const n=d(t.master);if(e.user_signing){if(e.user_signing.user_id!==this.userId){const t="Mismatched user ID "+e.master.user_id+" in user_signing key from "+this.userId;throw s.a.error(t),new Error(t)}try{Object(a.pkVerify)(e.user_signing,n,this.userId)}catch(e){throw s.a.error("invalid signature on user-signing key"),e}}if(e.self_signing){if(e.self_signing.user_id!==this.userId){const t="Mismatched user ID "+e.master.user_id+" in self_signing key from "+this.userId;throw s.a.error(t),new Error(t)}try{Object(a.pkVerify)(e.self_signing,n,this.userId)}catch(e){throw s.a.error("invalid signature on self-signing key"),e}}e.master&&(this.keys.master=e.master,delete this.keys.self_signing,delete this.keys.user_signing),e.self_signing&&(this.keys.self_signing=e.self_signing),e.user_signing&&(this.keys.user_signing=e.user_signing)}updateCrossSigningVerifiedBefore(e){!this.crossSigningVerifiedBefore&&e&&(this.crossSigningVerifiedBefore=!0)}async signObject(e,t){if(!this.keys[t])throw new Error("Attempted to sign with "+t+" key but no such key present");const[n,r]=await this.getCrossSigningKey(t);try{return Object(a.pkSign)(e,r,this.userId,n),e}finally{r.free()}}async signUser(e){if(this.keys.user_signing)return this.signObject(e.keys.master,"user_signing");s.a.info("No user signing key: not signing user")}async signDevice(e,t){if(e!==this.userId)throw new Error(`Trying to sign ${e}'s device; can only sign our own device`);if(this.keys.self_signing)return this.signObject({algorithms:t.algorithms,keys:t.keys,device_id:t.deviceId,user_id:e},"self_signing");s.a.info("No self signing key: not signing device")}checkUserTrust(e){if(this.userId===e.userId&&this.getId()&&this.getId()===e.getId()&&this.getId("self_signing")&&this.getId("self_signing")===e.getId("self_signing"))return new m(!0,!0,this.firstUse);if(!this.keys.user_signing)return new m(!1,!1,e.firstUse);let t;const n=e.keys.master,r=this.getId("user_signing");try{Object(a.pkVerify)(n,r,this.userId),t=!0}catch(e){t=!1}return new m(t,e.crossSigningVerifiedBefore,e.firstUse)}checkDeviceTrust(e,t,n,r){const i=this.checkUserTrust(e),o=e.keys.self_signing;if(!o)return new g(!1,!1,n,r);const s=function(e,t){return{algorithms:e.algorithms,keys:e.keys,device_id:e.deviceId,user_id:t,signatures:e.signatures}}(t,e.userId);try{return Object(a.pkVerify)(o,e.getId(),e.userId),Object(a.pkVerify)(s,d(o),e.userId),g.fromUserTrustLevel(i,n,r)}catch(e){return new g(!1,!1,n,r)}}getCacheCallbacks(){return this.cacheCallbacks}}let p;!function(e){e[e.MASTER=4]="MASTER",e[e.USER_SIGNING=2]="USER_SIGNING",e[e.SELF_SIGNING=1]="SELF_SIGNING"}(p||(p={}));class m{constructor(e,t,n){this.crossSigningVerified=e,this.crossSigningVerifiedBefore=t,this.tofu=n}isVerified(){return this.isCrossSigningVerified()}isCrossSigningVerified(){return this.crossSigningVerified}wasCrossSigningVerified(){return this.crossSigningVerifiedBefore}isTofu(){return this.tofu}}class g{constructor(e,t,n,r){this.crossSigningVerified=e,this.tofu=t,this.localVerified=n,this.trustCrossSignedDevices=r}static fromUserTrustLevel(e,t,n){return new g(e.isCrossSigningVerified(),e.isTofu(),t,n)}isVerified(){return Boolean(this.isLocallyVerified()||this.trustCrossSignedDevices&&this.isCrossSigningVerified())}isCrossSigningVerified(){return this.crossSigningVerified}isLocallyVerified(){return this.localVerified}isTofu(){return this.tofu}}function f(e,t){return{getCrossSigningKeyCache:async function(n,i){const o=await new Promise((t=>e.doTxn("readonly",[l.a.STORE_ACCOUNT],(r=>{e.getSecretStorePrivateKey(r,t,n)}))));if(o&&o.ciphertext){const e=r.from(t.pickleKey),i=await Object(c.b)(o,e,n);return Object(a.decodeBase64)(i)}return o},storeCrossSigningKeyCache:async function(n,i){if(!(i instanceof Uint8Array))throw new Error(`storeCrossSigningKeyCache expects Uint8Array, got ${i}`);const o=r.from(t.pickleKey),s=await Object(c.c)(Object(a.encodeBase64)(i),o,n);return e.doTxn("readwrite",[l.a.STORE_ACCOUNT],(t=>{e.storeSecretStorePrivateKey(t,n,s)}))}}}async function _(e,t,n){if(e.getUserId()===t)return s.a.log("Cross-signing: Self-verification done; requesting keys"),new Promise(((t,r)=>{const i=e,o=i.crypto.crossSigningInfo,l=new h(o.userId,{getCrossSigningKey:async e=>{s.a.debug("Cross-signing: requesting secret",e,n);const{promise:t}=i.requestSecret(`m.cross_signing.${e}`,[n]),r=await t,o=Object(a.decodeBase64)(r);return Uint8Array.from(o)}},o.getCacheCallbacks());l.keys=o.keys;const c=new Promise((e=>{setTimeout(e,u,new Error("Timeout"))})),d=(async()=>{if(!await i.crypto.getSessionBackupPrivateKey()){s.a.info("No cached backup key found. Requesting...");const e=i.requestSecret("m.megolm_backup.v1",[n]),t=await e.promise;s.a.info("Got key backup key, decoding...");const r=Object(a.decodeBase64)(t);s.a.info("Decoded backup key, storing..."),await i.crypto.storeSessionBackupPrivateKey(Uint8Array.from(r)),s.a.info("Backup key stored. Starting backup restore...");const o=await i.getKeyBackupVersion();i.restoreKeyBackupWithCache(void 0,void 0,o).then((()=>{s.a.info("Backup restored.")}))}})();return Promise.race([Promise.all([l.getCrossSigningKey("master"),l.getCrossSigningKey("self_signing"),l.getCrossSigningKey("user_signing"),d]),c]).then(t,r)})).catch((e=>{s.a.warn("Cross-signing: failure while requesting keys:",e)}))}}).call(this,n(14),n(53).Buffer)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"h",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"g",(function(){return l})),n.d(t,"f",(function(){return c})),n.d(t,"d",(function(){return u})),n.d(t,"c",(function(){return d})),n.d(t,"b",(function(){return h}));var r=n(143),i=n(129);function o(e,t){return function(n){return function(e,t,n){const o=Object.assign({},{code:e,reason:t},n);return new r.b({type:i.b.KeyVerificationCancel,content:o})}(e,t,n)}}const a=o("m.user","Cancelled by user"),s=o("m.timeout","Timed out"),l=o("m.unknown_method","Unknown method"),c=o("m.unexpected_message","Unexpected message"),u=o("m.key_mismatch","Key mismatch"),d=o("m.invalid_message","Invalid message");function h(e){const t=e.getContent();if(t){const{code:e,reason:n}=t;return{code:e,reason:n}}return{code:"Unknown error",reason:"m.unknown"}}},function(e,t,n){"use strict";var r;!function(e){e[e.LOADING=0]="LOADING",e[e.WELCOME=1]="WELCOME",e[e.LOGIN=2]="LOGIN",e[e.REGISTER=3]="REGISTER",e[e.FORGOT_PASSWORD=4]="FORGOT_PASSWORD",e[e.COMPLETE_SECURITY=5]="COMPLETE_SECURITY",e[e.E2E_SETUP=6]="E2E_SETUP",e[e.USE_CASE_SELECTION=7]="USE_CASE_SELECTION",e[e.LOGGED_IN=8]="LOGGED_IN",e[e.SOFT_LOGOUT=9]="SOFT_LOGOUT"}(r||(r={})),t.a=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignRef=void 0,t.assignRef=function(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}},function(e,t,n){(function(n){var r,i,o,a,s,l,c,u,d,h,p,m,g,f,_,b,v,y,E,S,w,T,C,x,F,D,k,O,I,A;!function(R){var N="object"==typeof n?n:"object"==typeof self?self:"object"==typeof this?this:{};function M(e,t){return e!==N&&("function"==typeof Object.create?Object.defineProperty(e,"__esModule",{value:!0}):e.__esModule=!0),function(n,r){return e[n]=t?t(n,r):r}}r=function(e){!function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])};i=function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)},o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},s=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},l=function(e,t){return function(n,r){t(n,r,e)}},c=function(e,t,n,r,i,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,l=r.kind,c="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?r.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,r.name):{}),h=!1,p=n.length-1;p>=0;p--){var m={};for(var g in r)m[g]="access"===g?{}:r[g];for(var g in r.access)m.access[g]=r.access[g];m.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var f=(0,n[p])("accessor"===l?{get:d.get,set:d.set}:d[c],m);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(s=a(f.get))&&(d.get=s),(s=a(f.set))&&(d.set=s),(s=a(f.init))&&i.push(s)}else(s=a(f))&&("field"===l?i.push(s):d[c]=s)}u&&Object.defineProperty(u,r.name,d),h=!0},u=function(e,t,n){for(var r=arguments.length>2,i=0;i<t.length;i++)n=r?t[i].call(e,n):t[i].call(e);return r?n:void 0},d=function(e){return"symbol"==typeof e?e:"".concat(e)},h=function(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})},p=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},m=function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){e.done?n(e.value):i(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))},g=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return l([e,t])}}function l(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},f=function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||A(t,e,n)},A=Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},_=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},b=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},v=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(b(arguments[t]));return e},y=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r},E=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},S=function(e){return this instanceof S?(this.v=e,this):new S(e)},w=function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{l(i[e](t))}catch(e){d(o[0][3],e)}}function l(e){e.value instanceof S?Promise.resolve(e.value.v).then(c,u):d(o[0][2],e)}function c(e){s("next",e)}function u(e){s("throw",e)}function d(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}},T=function(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:S(e[r](t)),done:!1}:i?i(t):t}:i}},C=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=_(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){i(r,o,(t=e[n](t)).done,t.value)}))}}function i(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}},x=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};var n=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};F=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&A(t,e,r);return n(t,e),t},D=function(e){return e&&e.__esModule?e:{default:e}},k=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},O=function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},I=function(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)},e("__extends",i),e("__assign",o),e("__rest",a),e("__decorate",s),e("__param",l),e("__esDecorate",c),e("__runInitializers",u),e("__propKey",d),e("__setFunctionName",h),e("__metadata",p),e("__awaiter",m),e("__generator",g),e("__exportStar",f),e("__createBinding",A),e("__values",_),e("__read",b),e("__spread",v),e("__spreadArrays",y),e("__spreadArray",E),e("__await",S),e("__asyncGenerator",w),e("__asyncDelegator",T),e("__asyncValues",C),e("__makeTemplateObject",x),e("__importStar",F),e("__importDefault",D),e("__classPrivateFieldGet",k),e("__classPrivateFieldSet",O),e("__classPrivateFieldIn",I)}(M(N,M(e)))}.apply(t,[t]),void 0===r||(e.exports=r)}()}).call(this,n(14))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var r=n(255),i=n.n(r);function o(e){if(!e)return"";const t=i.a.parse(e);return t&&"/"===t.path?t.host||"":e}function a(e){if(!e)return"";let t=e;e.startsWith("https://")||(t="https://"+e);return null===i.a.parse(t).hostname?e:t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r,i,o=n(13),a=n.n(o),s=n(120),l=n.n(s),c=n(147),u=n(1),d=n(122),h=n(121),p=n(250),m=n(134),g=n(145),f=n(123),_=n(135);!function(e){e.Passphrase="passphrase",e.RecoveryKey="recovery_key",e.SecretStorage="secret_storage"}(r||(r={})),function(e){e.PreFetch="prefetch",e.Fetch="fetch",e.LoadKeys="load_keys"}(i||(i={}));class b extends l.a.PureComponent{constructor(e){super(e),a()(this,"onCancel",(()=>{this.props.onFinished(!1)})),a()(this,"onDone",(()=>{this.props.onFinished(!0)})),a()(this,"onUseRecoveryKeyClick",(()=>{this.setState({forceRecoveryKey:!0})})),a()(this,"progressCallback",(e=>{this.setState({progress:e})})),a()(this,"onResetRecoveryClick",(()=>{this.props.onFinished(!1),Object(p.b)((async()=>{}),!0)})),a()(this,"onRecoveryKeyChange",(e=>{this.setState({recoveryKey:e.target.value,recoveryKeyValid:d.a.get().isValidRecoveryKey(e.target.value)})})),a()(this,"onPassPhraseNext",(async()=>{this.setState({loading:!0,restoreError:null,restoreType:r.Passphrase});try{const e=await d.a.get().restoreKeyBackupWithPassword(this.state.passPhrase,void 0,void 0,this.state.backupInfo,{progressCallback:this.progressCallback});if(this.props.keyCallback){const e=await d.a.get().keyBackupKeyFromPassword(this.state.passPhrase,this.state.backupInfo);this.props.keyCallback(e)}if(!this.props.showSummary)return void this.props.onFinished(!0);this.setState({loading:!1,recoverInfo:e})}catch(e){u.a.log("Error restoring backup",e),this.setState({loading:!1,restoreError:e})}})),a()(this,"onRecoveryKeyNext",(async()=>{if(this.state.recoveryKeyValid){this.setState({loading:!0,restoreError:null,restoreType:r.RecoveryKey});try{const e=await d.a.get().restoreKeyBackupWithRecoveryKey(this.state.recoveryKey,void 0,void 0,this.state.backupInfo,{progressCallback:this.progressCallback});if(this.props.keyCallback){const e=d.a.get().keyBackupKeyFromRecoveryKey(this.state.recoveryKey);this.props.keyCallback(e)}if(!this.props.showSummary)return void this.props.onFinished(!0);this.setState({loading:!1,recoverInfo:e})}catch(e){u.a.log("Error restoring backup",e),this.setState({loading:!1,restoreError:e})}}})),a()(this,"onPassPhraseChange",(e=>{this.setState({passPhrase:e.target.value})})),this.state={backupInfo:null,backupKeyStored:null,loading:!1,loadError:null,restoreError:null,recoveryKey:"",recoverInfo:null,recoveryKeyValid:!1,forceRecoveryKey:!1,passPhrase:"",restoreType:null,progress:{stage:i.PreFetch}}}componentDidMount(){this.loadBackupStatus()}async restoreWithSecretStorage(){this.setState({loading:!0,restoreError:null,restoreType:r.SecretStorage});try{await Object(p.b)((async()=>{await d.a.get().restoreKeyBackupWithSecretStorage(this.state.backupInfo,void 0,void 0,{progressCallback:this.progressCallback})})),this.setState({loading:!1})}catch(e){u.a.log("Error restoring backup",e),this.setState({restoreError:e,loading:!1})}}async restoreWithCachedKey(e){if(!e)return!1;try{const t=await d.a.get().restoreKeyBackupWithCache(void 0,void 0,e,{progressCallback:this.progressCallback});return this.setState({recoverInfo:t}),!0}catch(e){return u.a.log("restoreWithCachedKey failed:",e),!1}}async loadBackupStatus(){this.setState({loading:!0,loadError:null});try{const e=d.a.get(),t=await e.getKeyBackupVersion(),n=await e.hasSecretStorageKey()&&await e.isKeyBackupKeyStored();this.setState({backupInfo:t,backupKeyStored:n});if(await this.restoreWithCachedKey(t))return u.a.log("RestoreKeyBackupDialog: found cached backup key"),void this.setState({loading:!1});if(n)return this.restoreWithSecretStorage();this.setState({loadError:null,loading:!1})}catch(e){u.a.log("Error loading backup status",e),this.setState({loadError:e,loading:!1})}}render(){const e=this.state.backupInfo&&this.state.backupInfo.auth_data&&this.state.backupInfo.auth_data.private_key_salt&&this.state.backupInfo.auth_data.private_key_iterations;let t,n;if(this.state.loading){let e;if(n=Object(h.a)("Restoring keys from backup"),this.state.progress.stage===i.Fetch)e=Object(h.a)("Fetching keys from server…");else if(this.state.progress.stage===i.LoadKeys){const{total:t,successes:n,failures:r}=this.state.progress;e=Object(h.a)("%(completed)s of %(total)s keys restored",{total:t,completed:n+r})}else this.state.progress.stage===i.PreFetch&&(e=Object(h.a)("Fetching keys from server…"));t=l.a.createElement("div",null,l.a.createElement("div",null,e),l.a.createElement(m.a,null))}else if(this.state.loadError)n=Object(h.a)("Error"),t=Object(h.a)("Unable to load backup status");else if(this.state.restoreError)this.state.restoreError.errcode===c.d.RESTORE_BACKUP_ERROR_BAD_KEY?this.state.restoreType===r.RecoveryKey?(n=Object(h.a)("Security Key mismatch"),t=l.a.createElement("div",null,l.a.createElement("p",null,Object(h.a)("Backup could not be decrypted with this Security Key: please verify that you entered the correct Security Key.")))):(n=Object(h.a)("Incorrect Security Phrase"),t=l.a.createElement("div",null,l.a.createElement("p",null,Object(h.a)("Backup could not be decrypted with this Security Phrase: please verify that you entered the correct Security Phrase.")))):(n=Object(h.a)("Error"),t=Object(h.a)("Unable to restore backup"));else if(null===this.state.backupInfo)n=Object(h.a)("Error"),t=Object(h.a)("No backup found!");else if(this.state.recoverInfo){let e;n=Object(h.a)("Keys restored"),this.state.recoverInfo.total>this.state.recoverInfo.imported&&(e=l.a.createElement("p",null,Object(h.a)("Failed to decrypt %(failedCount)s sessions!",{failedCount:this.state.recoverInfo.total-this.state.recoverInfo.imported}))),t=l.a.createElement("div",null,l.a.createElement("p",null,Object(h.a)("Successfully restored %(sessionCount)s keys",{sessionCount:this.state.recoverInfo.imported})),e,l.a.createElement(g.a,{primaryButton:Object(h.a)("OK"),onPrimaryButtonClick:this.onDone,hasCancel:!1,focus:!0}))}else if(e&&!this.state.forceRecoveryKey)n=Object(h.a)("Enter Security Phrase"),t=l.a.createElement("div",null,l.a.createElement("p",null,Object(h.a)("<b>Warning</b>: you should only set up key backup from a trusted computer.",{},{b:e=>l.a.createElement("b",null,e)})),l.a.createElement("p",null,Object(h.a)("Access your secure message history and set up secure messaging by entering your Security Phrase.")),l.a.createElement("form",{className:"mx_RestoreKeyBackupDialog_primaryContainer"},l.a.createElement("input",{type:"password",className:"mx_RestoreKeyBackupDialog_passPhraseInput",onChange:this.onPassPhraseChange,value:this.state.passPhrase,autoFocus:!0}),l.a.createElement(g.a,{primaryButton:Object(h.a)("Next"),onPrimaryButtonClick:this.onPassPhraseNext,primaryIsSubmit:!0,hasCancel:!0,onCancel:this.onCancel,focus:!1})),Object(h.a)("If you've forgotten your Security Phrase you can <button1>use your Security Key</button1> or <button2>set up new recovery options</button2>",{},{button1:e=>l.a.createElement(f.a,{kind:"link_inline",onClick:this.onUseRecoveryKeyClick},e),button2:e=>l.a.createElement(f.a,{kind:"link_inline",onClick:this.onResetRecoveryClick},e)}));else{let e;n=Object(h.a)("Enter Security Key"),e=0===this.state.recoveryKey.length?l.a.createElement("div",{className:"mx_RestoreKeyBackupDialog_keyStatus"}):this.state.recoveryKeyValid?l.a.createElement("div",{className:"mx_RestoreKeyBackupDialog_keyStatus"},"👍 ",Object(h.a)("This looks like a valid Security Key!")):l.a.createElement("div",{className:"mx_RestoreKeyBackupDialog_keyStatus"},"👎 ",Object(h.a)("Not a valid Security Key")),t=l.a.createElement("div",null,l.a.createElement("p",null,Object(h.a)("<b>Warning</b>: you should only set up key backup from a trusted computer.",{},{b:e=>l.a.createElement("b",null,e)})),l.a.createElement("p",null,Object(h.a)("Access your secure message history and set up secure messaging by entering your Security Key.")),l.a.createElement("div",{className:"mx_RestoreKeyBackupDialog_primaryContainer"},l.a.createElement("input",{className:"mx_RestoreKeyBackupDialog_recoveryKeyInput",onChange:this.onRecoveryKeyChange,value:this.state.recoveryKey,autoFocus:!0}),e,l.a.createElement(g.a,{primaryButton:Object(h.a)("Next"),onPrimaryButtonClick:this.onRecoveryKeyNext,hasCancel:!0,onCancel:this.onCancel,focus:!1,primaryDisabled:!this.state.recoveryKeyValid})),Object(h.a)("If you've forgotten your Security Key you can <button>set up new recovery options</button>",{},{button:e=>l.a.createElement(f.a,{kind:"link_inline",onClick:this.onResetRecoveryClick},e)}))}return l.a.createElement(_.a,{className:"mx_RestoreKeyBackupDialog",onFinished:this.props.onFinished,title:n},l.a.createElement("div",{className:"mx_RestoreKeyBackupDialog_content"},t))}}a()(b,"defaultProps",{showSummary:!0})},function(e,t,n){"use strict";n.d(t,"a",(function(){return g})),n.d(t,"e",(function(){return f})),n.d(t,"d",(function(){return _})),n.d(t,"b",(function(){return b})),n.d(t,"c",(function(){return v}));var r=n(369),i=n(1048),o=n.n(i),a=n(1049),s=n.n(a),l=n(136),c=n(168),u=n(124),d=n(128);let h;function p(e){let{scanner:t,parser:n,utils:r,token:i,name:o}=e;const{DOT:a,NUM:s,TLD:l,COLON:c,SYM:u,HYPHEN:d,UNDERSCORE:h,LOCALHOST:p,domain:m}=t.tokens,g=n.start,f=r.createTokenClass(o,{isLink:!0}),_=[m,l,p,u,h,d],b=[m,l,p,d],v=g.tt(i),y=v.tt(m);for(const e of _)v.tt(e,y),y.tt(e,y);const E=y.tt(a);for(const e of _)E.tt(e,y);const S=y.tt(c),w=S.tt(m);w.tt(a,S);for(const e of b)w.tt(e,w),w.tt(e,f);for(const e of b)S.tt(e,w);w.tt(c).tt(s,f)}function m(e,t){e.preventDefault(),u.a.dispatch({action:d.a.ViewUser,member:new l.User(t)})}!function(e){e.URL="url",e.UserId="userid",e.RoomAlias="roomalias"}(h||(h={}));const g="^(?:vector://|https?://)?(?:"+((window.location.host+window.location.pathname).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"|(?:www\\.)?(?:riot|vector)\\.im/(?:app|beta|staging|develop)/|(?:app|beta|staging|develop)\\.element\\.io/)(#.*)");const f={events:function(e,t){switch(t){case h.URL:try{const t=Object(c.j)(e);if(null!=t&&t.userId)return{click:function(e){m(e,t.userId)}};{const t=Object(c.l)(e);if(t!==e)return{click:function(e){e.preventDefault(),window.location.hash=t}}}}catch(e){}break;case h.UserId:return{click:function(t){var n;const r=null===(n=Object(c.j)(e))||void 0===n?void 0:n.userId;r&&m(t,r)}};case h.RoomAlias:return{click:function(t){var n;const r=null===(n=Object(c.j)(e))||void 0===n?void 0:n.roomIdOrAlias;var i;r&&(i=r,t.preventDefault(),u.a.dispatch({action:d.a.ViewRoom,room_alias:i,metricsTrigger:"Timeline",metricsViaKeyboard:!1}))}}}},formatHref:function(e,t){switch(t){case h.RoomAlias:case h.UserId:}return Object(c.k)(e)},attributes:{rel:"noreferrer noopener"},ignoreTags:["pre","code"],className:"linkified",target:function(e,t){if(t===h.URL)try{return Object(c.l)(e)!==e||decodeURIComponent(e).match(g)?null:"_blank"}catch(e){}return null}};Object(r.registerPlugin)(h.RoomAlias,(e=>{let{scanner:t,parser:n,utils:r}=e;p({scanner:t,parser:n,utils:r,token:t.tokens.POUND,name:h.RoomAlias})})),Object(r.registerPlugin)(h.UserId,(e=>{let{scanner:t,parser:n,utils:r}=e;p({scanner:t,parser:n,utils:r,token:t.tokens.AT,name:h.UserId})})),Object(r.registerCustomProtocol)("matrix",!0);const _=r,b=o.a,v=s.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){for(var n in t)e[n]=t[n];return e},i=function(){function e(e){this.j={},this.jr=[],this.jd=null,this.t=e}var t=e.prototype;return t.accepts=function(){return!!this.t},t.tt=function(t,n){if(t instanceof Array){if(0===t.length)return;for(var i=this.tt(t[0],n),a=1;a<t.length;a++)this.tt(t[a],i);return i}if(n&&n instanceof e)return this.j[t]=n,n;var s=n,l=this.j[t];if(l)return s&&(l.t=s),l;l=o();var u=c(this,t);return u?(r(l.j,u.j),l.jr.append(u.jr),l.jr=u.jd,l.t=s||u.t):l.t=s,this.j[t]=l,l},e}(),o=function(){return new i},a=function(e){return new i(e)},s=function(e,t,n){return e.j[t]||(e.j[t]=n),e.j[t]},l=function(e,t,n){e.jr.push([t,n])},c=function(e,t){var n=e.j[t];if(n)return n;for(var r=0;r<e.jr.length;r++){var i=e.jr[r][0],o=e.jr[r][1];if(o&&i.test(t))return o}return e.jd},u=function(e,t,n){for(var r=0;r<t.length;r++)s(e,t[r],n)},d=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0],i=t[n][1];s(e,r,i)}},h=function(e,t,n,r){for(var i,o=0,a=t.length;o<a&&(i=e.j[t[o]]);)e=i,o++;if(o>=a)return e;for(;o<a-1;)i=r(),s(e,t[o],i),e=i,o++;return s(e,t[a-1],n),n},p="WORD",m="UWORD",g="LOCALHOST",f="TLD",_="UTLD",b="SCHEME",v="SLASH_SCHEME",y="COMPOUND_SCHEME",E="COMPOUND_SLASH_SCHEME",S="NUM",w="WS",T="NL",C="OPENBRACE",x="OPENBRACKET",F="OPENANGLEBRACKET",D="OPENPAREN",k="CLOSEBRACE",O="CLOSEBRACKET",I="CLOSEANGLEBRACKET",A="CLOSEPAREN",R="AMPERSAND",N="APOSTROPHE",M="ASTERISK",P="AT",L="BACKSLASH",B="BACKTICK",U="CARET",j="COLON",G="COMMA",z="DOLLAR",H="DOT",q="EQUALS",V="EXCLAMATION",$="HYPHEN",K="PERCENT",W="PIPE",Y="PLUS",Q="POUND",X="QUERY",Z="QUOTE",J="SEMI",ee="SLASH",te="TILDE",ne="UNDERSCORE",re="EMOJIS",ie="SYM",oe=[S],ae=[p,g,f,b,v],se=ae.concat(S),le=ae.concat(m,_),ce=le.concat(S),ue=le.concat(y,E,S,re),de=[b,v,y,E],he={};function pe(e){return e in he||(he[e]=[]),he[e]}he.ascii=ae,he.asciinumeric=se,he.words=le,he.alphanumeric=ce,he.domain=ue,he.scheme=de;var me=Object.freeze({__proto__:null,WORD:p,UWORD:m,LOCALHOST:g,TLD:f,UTLD:_,SCHEME:b,SLASH_SCHEME:v,COMPOUND_SCHEME:y,COMPOUND_SLASH_SCHEME:E,NUM:S,WS:w,NL:T,OPENBRACE:C,OPENBRACKET:x,OPENANGLEBRACKET:F,OPENPAREN:D,CLOSEBRACE:k,CLOSEBRACKET:O,CLOSEANGLEBRACKET:I,CLOSEPAREN:A,AMPERSAND:R,APOSTROPHE:N,ASTERISK:M,AT:P,BACKSLASH:L,BACKTICK:B,CARET:U,COLON:j,COMMA:G,DOLLAR:z,DOT:H,EQUALS:q,EXCLAMATION:V,HYPHEN:$,PERCENT:K,PIPE:W,PLUS:Y,POUND:Q,QUERY:X,QUOTE:Z,SEMI:J,SLASH:ee,TILDE:te,UNDERSCORE:ne,EMOJIS:re,SYM:ie,numeric:oe,ascii:ae,asciinumeric:se,words:le,alphanumeric:ce,domain:ue,scheme:de,collections:he,registerTextTokenCollection:pe,collectionsWithToken:function(e){var t=[];for(var n in he)he[n].indexOf(e)>=0&&t.push(n);return t},registerTextToken:function(e,t){void 0===t&&(t=[]);for(var n=0;n<t.length;n++){pe(t[n]).push(e)}return e}}),ge="aaa aarp abarth abb abbott abbvie abc able abogado abudhabi ac academy accenture accountant accountants aco actor ad adac ads adult ae aeg aero aetna af afl africa ag agakhan agency ai aig airbus airforce airtel akdn al alfaromeo alibaba alipay allfinanz allstate ally alsace alstom am amazon americanexpress americanfamily amex amfam amica amsterdam analytics android anquan anz ao aol apartments app apple aq aquarelle ar arab aramco archi army arpa art arte as asda asia associates at athleta attorney au auction audi audible audio auspost author auto autos avianca aw aws ax axa az azure ba baby baidu banamex bananarepublic band bank bar barcelona barclaycard barclays barefoot bargains baseball basketball bauhaus bayern bb bbc bbt bbva bcg bcn bd be beats beauty beer bentley berlin best bestbuy bet bf bg bh bharti bi bible bid bike bing bingo bio biz bj black blackfriday blockbuster blog bloomberg blue bm bms bmw bn bnpparibas bo boats boehringer bofa bom bond boo book booking bosch bostik boston bot boutique box br bradesco bridgestone broadway broker brother brussels bs bt budapest bugatti build builders business buy buzz bv bw by bz bzh ca cab cafe cal call calvinklein cam camera camp cancerresearch canon capetown capital capitalone car caravan cards care career careers cars casa case cash casino cat catering catholic cba cbn cbre cbs cc cd center ceo cern cf cfa cfd cg ch chanel channel charity chase chat cheap chintai christmas chrome church ci cipriani circle cisco citadel citi citic city cityeats ck cl claims cleaning click clinic clinique clothing cloud club clubmed cm cn co coach codes coffee college cologne com comcast commbank community company compare computer comsec condos construction consulting contact contractors cooking cookingchannel cool coop corsica country coupon coupons courses cpa cr credit creditcard creditunion cricket crown crs cruise cruises csc cu cuisinella cv cw cx cy cymru cyou cz dabur dad dance data date dating datsun day dclk dds de deal dealer deals degree delivery dell deloitte delta democrat dental dentist desi design dev dhl diamonds diet digital direct directory discount discover dish diy dj dk dm dnp do docs doctor dog domains dot download drive dtv dubai dunlop dupont durban dvag dvr dz earth eat ec eco edeka edu education ee eg email emerck energy engineer engineering enterprises epson equipment er ericsson erni es esq estate et etisalat eu eurovision eus events exchange expert exposed express extraspace fage fail fairwinds faith family fan fans farm farmers fashion fast fedex feedback ferrari ferrero fi fiat fidelity fido film final finance financial fire firestone firmdale fish fishing fit fitness fj fk flickr flights flir florist flowers fly fm fo foo food foodnetwork football ford forex forsale forum foundation fox fr free fresenius frl frogans frontdoor frontier ftr fujitsu fun fund furniture futbol fyi ga gal gallery gallo gallup game games gap garden gay gb gbiz gd gdn ge gea gent genting george gf gg ggee gh gi gift gifts gives giving gl glass gle global globo gm gmail gmbh gmo gmx gn godaddy gold goldpoint golf goo goodyear goog google gop got gov gp gq gr grainger graphics gratis green gripe grocery group gs gt gu guardian gucci guge guide guitars guru gw gy hair hamburg hangout haus hbo hdfc hdfcbank health healthcare help helsinki here hermes hgtv hiphop hisamitsu hitachi hiv hk hkt hm hn hockey holdings holiday homedepot homegoods homes homesense honda horse hospital host hosting hot hoteles hotels hotmail house how hr hsbc ht hu hughes hyatt hyundai ibm icbc ice icu id ie ieee ifm ikano il im imamat imdb immo immobilien in inc industries infiniti info ing ink institute insurance insure int international intuit investments io ipiranga iq ir irish is ismaili ist istanbul it itau itv jaguar java jcb je jeep jetzt jewelry jio jll jm jmp jnj jo jobs joburg jot joy jp jpmorgan jprs juegos juniper kaufen kddi ke kerryhotels kerrylogistics kerryproperties kfh kg kh ki kia kim kinder kindle kitchen kiwi km kn koeln komatsu kosher kp kpmg kpn kr krd kred kuokgroup kw ky kyoto kz la lacaixa lamborghini lamer lancaster lancia land landrover lanxess lasalle lat latino latrobe law lawyer lb lc lds lease leclerc lefrak legal lego lexus lgbt li lidl life lifeinsurance lifestyle lighting like lilly limited limo lincoln linde link lipsy live living lk llc llp loan loans locker locus loft lol london lotte lotto love lpl lplfinancial lr ls lt ltd ltda lu lundbeck luxe luxury lv ly ma macys madrid maif maison makeup man management mango map market marketing markets marriott marshalls maserati mattel mba mc mckinsey md me med media meet melbourne meme memorial men menu merckmsd mg mh miami microsoft mil mini mint mit mitsubishi mk ml mlb mls mm mma mn mo mobi mobile moda moe moi mom monash money monster mormon mortgage moscow moto motorcycles mov movie mp mq mr ms msd mt mtn mtr mu museum music mutual mv mw mx my mz na nab nagoya name natura navy nba nc ne nec net netbank netflix network neustar new news next nextdirect nexus nf nfl ng ngo nhk ni nico nike nikon ninja nissan nissay nl no nokia northwesternmutual norton now nowruz nowtv np nr nra nrw ntt nu nyc nz obi observer office okinawa olayan olayangroup oldnavy ollo om omega one ong onl online ooo open oracle orange org organic origins osaka otsuka ott ovh pa page panasonic paris pars partners parts party passagens pay pccw pe pet pf pfizer pg ph pharmacy phd philips phone photo photography photos physio pics pictet pictures pid pin ping pink pioneer pizza pk pl place play playstation plumbing plus pm pn pnc pohl poker politie porn post pr pramerica praxi press prime pro prod productions prof progressive promo properties property protection pru prudential ps pt pub pw pwc py qa qpon quebec quest racing radio re read realestate realtor realty recipes red redstone redumbrella rehab reise reisen reit reliance ren rent rentals repair report republican rest restaurant review reviews rexroth rich richardli ricoh ril rio rip ro rocher rocks rodeo rogers room rs rsvp ru rugby ruhr run rw rwe ryukyu sa saarland safe safety sakura sale salon samsclub samsung sandvik sandvikcoromant sanofi sap sarl sas save saxo sb sbi sbs sc sca scb schaeffler schmidt scholarships school schule schwarz science scot sd se search seat secure security seek select sener services ses seven sew sex sexy sfr sg sh shangrila sharp shaw shell shia shiksha shoes shop shopping shouji show showtime si silk sina singles site sj sk ski skin sky skype sl sling sm smart smile sn sncf so soccer social softbank software sohu solar solutions song sony soy spa space sport spot sr srl ss st stada staples star statebank statefarm stc stcgroup stockholm storage store stream studio study style su sucks supplies supply support surf surgery suzuki sv swatch swiss sx sy sydney systems sz tab taipei talk taobao target tatamotors tatar tattoo tax taxi tc tci td tdk team tech technology tel temasek tennis teva tf tg th thd theater theatre tiaa tickets tienda tiffany tips tires tirol tj tjmaxx tjx tk tkmaxx tl tm tmall tn to today tokyo tools top toray toshiba total tours town toyota toys tr trade trading training travel travelchannel travelers travelersinsurance trust trv tt tube tui tunes tushu tv tvs tw tz ua ubank ubs ug uk unicom university uno uol ups us uy uz va vacations vana vanguard vc ve vegas ventures verisign vermögensberater vermögensberatung versicherung vet vg vi viajes video vig viking villas vin vip virgin visa vision viva vivo vlaanderen vn vodka volkswagen volvo vote voting voto voyage vu vuelos wales walmart walter wang wanggou watch watches weather weatherchannel webcam weber website wed wedding weibo weir wf whoswho wien wiki williamhill win windows wine winners wme wolterskluwer woodside work works world wow ws wtc wtf xbox xerox xfinity xihuan xin xxx xyz yachts yahoo yamaxun yandex ye yodobashi yoga yokohama you youtube yt yun za zappos zara zero zip zm zone zuerich zw".split(" "),fe="ελ ευ бг бел дети ею католик ком мкд мон москва онлайн орг рус рф сайт срб укр қаз հայ ישראל קום ابوظبي اتصالات ارامكو الاردن البحرين الجزائر السعودية العليان المغرب امارات ایران بارت بازار بيتك بھارت تونس سودان سورية شبكة عراق عرب عمان فلسطين قطر كاثوليك كوم مصر مليسيا موريتانيا موقع همراه پاکستان ڀارت कॉम नेट भारत भारतम् भारोत संगठन বাংলা ভারত ভাৰত ਭਾਰਤ ભારત ଭାରତ இந்தியா இலங்கை சிங்கப்பூர் భారత్ ಭಾರತ ഭാരതം ලංකා คอม ไทย ລາວ გე みんな アマゾン クラウド グーグル コム ストア セール ファッション ポイント 世界 中信 中国 中國 中文网 亚马逊 企业 佛山 信息 健康 八卦 公司 公益 台湾 台灣 商城 商店 商标 嘉里 嘉里大酒店 在线 大拿 天主教 娱乐 家電 广东 微博 慈善 我爱你 手机 招聘 政务 政府 新加坡 新闻 时尚 書籍 机构 淡马锡 游戏 澳門 点看 移动 组织机构 网址 网店 网站 网络 联通 诺基亚 谷歌 购物 通販 集团 電訊盈科 飞利浦 食品 餐厅 香格里拉 香港 닷넷 닷컴 삼성 한국".split(" "),_e=/[a-z]/,be=/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/,ve=/(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEDD-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDDFF\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6])/,ye=/\ufe0f/,Ee=/\d/,Se=/\s/;function we(e){void 0===e&&(e=[]);var t=o(),n=o(),r=a(S),i=a(p),c=a(m),u=a(re),y=a(w),E=function(e){var t=a(p);return t.jr=[[_e,i]],t},oe=function(e){var t=a(m);return t.jr=[[_e,n],[be,c]],t},ae=function(e,t){var n=E();return n.t=e,n},se=function(e,t){var n=oe();return n.t=e,n};d(t,[["'",a(N)],["{",a(C)],["[",a(x)],["<",a(F)],["(",a(D)],["}",a(k)],["]",a(O)],[">",a(I)],[")",a(A)],["&",a(R)],["*",a(M)],["@",a(P)],["`",a(B)],["^",a(U)],[":",a(j)],[",",a(G)],["$",a(z)],[".",a(H)],["=",a(q)],["!",a(V)],["-",a($)],["%",a(K)],["|",a(W)],["+",a(Y)],["#",a(Q)],["?",a(X)],['"',a(Z)],["/",a(ee)],[";",a(J)],["~",a(te)],["_",a(ne)],["\\",a(L)]]),s(t,"\n",a(T)),l(t,Se,y),s(y,"\n",o()),l(y,Se,y);for(var le=0;le<ge.length;le++)h(t,ge[le],ae(f),E);for(var ce=0;ce<fe.length;ce++)h(t,fe[ce],se(_),oe);var ue=ae(b),de=ae(v);h(t,"file",ue,E),h(t,"mailto",ue,E),h(t,"ftp",de,E),h(t,"http",de,E),s(de,"s",de);var he=ae(b),pe=ae(v),me=a(b),we=a(v);e=e.sort((function(e,t){return e[0]>t[0]?1:-1}));for(var Te=0;Te<e.length;Te++)for(var Ce=e[Te][0].split("-"),xe=1===Ce.length?e[Te][1]?he:pe:e[Te][1]?me:we,Fe=t,De=0;De<Ce.length;De++){var ke=0===De?E:o,Oe=De===Ce.length-1?xe:ke();Fe=h(Fe,Ce[De],Oe,ke),Ce.length>1&&De<Ce.length-1&&(Fe=s(Fe,"-",o()))}h(t,"localhost",ae(g),E),l(t,Ee,r),l(t,_e,i),l(t,be,c),l(t,ve,u),l(t,ye,u),l(r,Ee,r),l(i,_e,i),l(c,_e,n),l(c,be,c),l(u,ve,u),l(u,ye,u);var Ie=o();return s(u,"",Ie),l(Ie,ve,u),l(Ie,ye,u),t.jd=a(ie),t}function Te(e,t){return Te=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Te(e,t)}var Ce={defaultProtocol:"http",events:null,format:Fe,formatHref:Fe,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function xe(e,t){void 0===t&&(t=null);var n=r({},Ce);e&&(n=r(n,e instanceof xe?e.o:e));for(var i=n.ignoreTags,o=[],a=0;a<i.length;a++)o.push(i[a].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=o}function Fe(e){return e}xe.prototype={o:Ce,defaultRender:function(e){return e},check:function(e){return this.get("validate",e.toString(),e)},get:function(e,t,n){var r=null!=t,i=this.o[e];return i?("object"==typeof i?"function"==typeof(i=n.t in i?i[n.t]:Ce[e])&&r&&(i=i(t,n)):"function"==typeof i&&r&&(i=i(t,n.t,n)),i):i},getObj:function(e,t,n){var r=this.o[e];return"function"==typeof r&&null!=t&&(r=r(t,n.t,n)),r},render:function(e){var t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}};var De=Object.freeze({__proto__:null,defaults:Ce,Options:xe,assign:r});function ke(e,t){this.t="token",this.v=e,this.tk=t}function Oe(e,t){var n=function(t){var n,r;function i(n,r){var i;return(i=t.call(this,n,r)||this).t=e,i}return r=t,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,Te(n,r),i}(ke);for(var r in t)n.prototype[r]=t[r];return n}ke.prototype={isLink:!1,toString:function(){return this.v},toHref:function(e){return this.toString()},toFormattedString:function(e){var t=this.toString(),n=e.get("truncate",t,this),r=e.get("format",t,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref:function(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex:function(){return this.tk[0].s},endIndex:function(){return this.tk[this.tk.length-1].e},toObject:function(e){return void 0===e&&(e=Ce.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject:function(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate:function(e){return e.get("validate",this.toString(),this)},render:function(e){var t=this,n=this.toFormattedHref(e),i=e.get("tagName",n,t),o=this.toFormattedString(e),a={},s=e.get("className",n,t),l=e.get("target",n,t),c=e.get("rel",n,t),u=e.getObj("attributes",n,t),d=e.getObj("events",n,t);return a.href=n,s&&(a.class=s),l&&(a.target=l),c&&(a.rel=c),u&&r(a,u),{tagName:i,attributes:a,content:o,eventListeners:d}}};var Ie=Oe("email",{isLink:!0,toHref:function(){return"mailto:"+this.toString()}}),Ae=Oe("text"),Re=Oe("nl"),Ne=Oe("url",{isLink:!0,toHref:function(e){return void 0===e&&(e=Ce.defaultProtocol),this.hasProtocol()?this.v:e+"://"+this.v},hasProtocol:function(){var e=this.tk;return e.length>=2&&de.indexOf(e[0].t)>=0&&e[1].t===j}}),Me=Object.freeze({__proto__:null,MultiToken:ke,Base:ke,createTokenClass:Oe,Email:Ie,Text:Ae,Nl:Re,Url:Ne});function Pe(){var e=o(),t=o(),n=o(),r=o(),i=o(),l=o(),c=o(),d=o(),h=o(),p=a(Ne),m=o(),w=a(Ne),re=a(Ne),ae=o(),se=o(),le=o(),ce=o(),de=o(),he=a(Ne),pe=a(Ne),me=a(Ne),ge=a(Ne),fe=o(),_e=o(),be=o(),ve=o(),ye=o(),Ee=o(),Se=o(),we=a(Ie),Te=o(),Ce=a(Ie),xe=o(),Fe=o(),De=o(),ke=o(),Oe=a(Re);s(e,T,Oe),s(e,b,t),s(e,v,n),s(e,y,t),s(e,E,n),s(t,j,l),s(n,j,r),s(r,ee,i),s(i,ee,l),s(e,g,p),u(e,ue,c),s(c,H,d),s(c,$,h),u(c,ue,c),s(t,H,d),s(t,$,h),u(t,ue,c),s(n,H,d),s(n,$,h),u(n,ue,c),s(d,f,p),s(d,_,p),u(d,ue,c),u(h,ue,c),s(p,H,d),s(p,$,h),u(p,ue,c),s(p,j,m),s(p,ee,re),u(m,oe,w),s(w,ee,re),s(l,ee,re),u(l,ue,re);var Ae=ue.concat([R,M,P,L,B,U,z,q,$,S,K,W,Y,Q,ee,ie,te,ne]),Me=[N,I,k,O,A,j,G,H,V,F,C,x,D,X,Z,J];s(re,C,se),s(re,x,le),s(re,F,ce),s(re,D,de),s(ae,C,se),s(ae,x,le),s(ae,F,ce),s(ae,D,de),s(se,k,re),s(le,O,re),s(ce,I,re),s(de,A,re),s(se,k,re),s(pe,O,re),s(me,I,re),s(ge,A,re),s(se,k,re),s(_e,O,re),s(be,I,re),s(ve,A,re),u(se,Ae,se),u(le,Ae,pe),u(ce,Ae,me),u(de,Ae,ge),u(se,Me,se),u(le,Me,_e),u(ce,Me,be),u(de,Me,ve),u(he,Ae,he),u(pe,Ae,pe),u(me,Ae,me),u(ge,Ae,ge),u(he,Me,he),u(pe,Me,pe),u(me,Me,me),u(ge,Me,ge),u(fe,Ae,fe),u(_e,Ae,pe),u(be,Ae,me),u(ve,Ae,ge),u(fe,Me,fe),u(_e,Me,_e),u(be,Me,be),u(ve,Me,ve),u(re,Ae,re),u(ae,Ae,re),u(re,Me,ae),u(ae,Me,ae);var Pe=[R,N,M,L,B,U,k,z,q,$,S,C,K,W,Y,Q,X,ee,ie,te,ne];return s(e,te,xe),u(c,Pe,xe),s(c,P,Fe),u(p,Pe,xe),s(p,P,Fe),u(d,Pe,xe),u(xe,ue,xe),u(xe,Pe,xe),s(xe,P,Fe),s(xe,H,ke),u(ke,ue,xe),u(ke,Pe,xe),s(Fe,g,we),u(Fe,ue,ye),u(De,ue,ye),s(ye,H,Ee),s(ye,$,Se),s(Ee,f,we),s(Ee,_,we),u(Ee,ue,ye),u(Se,ue,ye),s(we,H,Ee),s(we,$,Se),u(we,ue,ye),s(we,j,Te),u(Te,oe,Ce),e}function Le(e,t,n){var r=n[0].s,i=n[n.length-1].e;return new e(t.slice(r,i),n)}var Be="undefined"!=typeof console&&console&&console.warn||function(){},Ue={scanner:null,parser:null,pluginQueue:[],customSchemes:[],initialized:!1};function je(){Ue.scanner={start:we(Ue.customSchemes),tokens:me},Ue.parser={start:Pe(),tokens:Me};for(var e={createTokenClass:Oe},t=0;t<Ue.pluginQueue.length;t++)Ue.pluginQueue[t][1]({scanner:Ue.scanner,parser:Ue.parser,utils:e});Ue.initialized=!0}function Ge(e){return Ue.initialized||je(),function(e,t,n){for(var r=n.length,i=0,o=[],a=[];i<r;){for(var s=e,l=null,u=null,d=0,h=null,p=-1;i<r&&!(l=c(s,n[i].t));)a.push(n[i++]);for(;i<r&&(u=l||c(s,n[i].t));)l=null,(s=u).accepts()?(p=0,h=s):p>=0&&p++,i++,d++;if(p<0)(i-=d)<r&&(a.push(n[i]),i++);else{a.length>0&&(o.push(Le(Ae,t,a)),a=[]),i-=p,d-=p;var m=h.t,g=n.slice(i-d,i);o.push(Le(m,t,g))}}return a.length>0&&o.push(Le(Ae,t,a)),o}(Ue.parser.start,e,function(e,t){for(var n=function(e){for(var t=[],n=e.length,r=0;r<n;){var i=e.charCodeAt(r),o=void 0,a=i<55296||i>56319||r+1===n||(o=e.charCodeAt(r+1))<56320||o>57343?e[r]:e.slice(r,r+2);t.push(a),r+=a.length}return t}(t.replace(/[A-Z]/g,(function(e){return e.toLowerCase()}))),r=n.length,i=[],o=0,a=0;a<r;){for(var s=e,l=null,u=0,d=null,h=-1,p=-1;a<r&&(l=c(s,n[a]));)(s=l).accepts()?(h=0,p=0,d=s):h>=0&&(h+=n[a].length,p++),u+=n[a].length,o+=n[a].length,a++;o-=h,a-=p,u-=h,i.push({t:d.t,v:t.substr(o-u,u),s:o-u,e:o})}return i}(Ue.scanner.start,e))}t.MultiToken=ke,t.Options=xe,t.find=function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=null);for(var r=new xe(n),i=Ge(e),o=[],a=0;a<i.length;a++){var s=i[a];!s.isLink||t&&s.t!==t||o.push(s.toFormattedObject(r))}return o},t.init=je,t.options=De,t.registerCustomProtocol=function(e,t){if(void 0===t&&(t=!1),Ue.initialized&&Be('linkifyjs: already initialized - will not register custom protocol "'+e+'" until you manually call linkify.init(). To avoid this warning, please register all custom schemes before invoking linkify the first time.'),!/^[a-z]+(-[a-z]+)*$/.test(e))throw new Error("linkifyjs: incorrect protocol format.\n 1. Must only contain lowercase ASCII letters or -\n 2. Cannot start or end with -\n 3. - cannot repeat");Ue.customSchemes.push([e,t])},t.registerPlugin=function(e,t){if("function"!=typeof t)throw new Error("linkifyjs: Invalid plugin "+t+" (expects function)");for(var n=0;n<Ue.pluginQueue.length;n++)if(e===Ue.pluginQueue[n][0])return Be('linkifyjs: plugin "'+e+'" already registered - will be overwritten'),void(Ue.pluginQueue[n]=[e,t]);Ue.pluginQueue.push([e,t]),Ue.initialized&&Be('linkifyjs: already initialized - will not register plugin "'+e+'" until you manually call linkify.init(). To avoid this warning, please register all plugins before invoking linkify the first time.')},t.reset=function(){Ue.scanner=null,Ue.parser=null,Ue.pluginQueue=[],Ue.customSchemes=[],Ue.initialized=!1},t.test=function(e,t){void 0===t&&(t=null);var n=Ge(e);return 1===n.length&&n[0].isLink&&(!t||n[0].t===t)},t.tokenize=Ge},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(129),i=n(125);function o(e,t){const n=t?e=>t[e]:t=>i.b.getValue(t,e.getRoomId());if(e.isRedacted()&&!n("showRedactions")&&!e.getThread())return!0;if(e.isRelation(r.h.Replace))return!0;const o=function(e){const t={isMemberEvent:e.getType()===r.b.RoomMember};if(!t.isMemberEvent)return t;const n=e.getContent(),i=e.getPrevContent(),o=n.membership!==i.membership;t.isJoin=o&&"join"===n.membership,t.isPart=o&&"leave"===n.membership&&e.getStateKey()===e.getSender();const a=!o&&"join"===n.membership;return t.isDisplaynameChange=a&&n.displayname!==i.displayname,t.isAvatarChange=a&&n.avatar_url!==i.avatar_url,t}(e);if(o.isMemberEvent){if((o.isJoin||o.isPart)&&!n("showJoinLeaves"))return!0;if(o.isAvatarChange&&!n("showAvatarChanges"))return!0;if(o.isDisplaynameChange&&!n("showDisplaynameChanges"))return!0}return!1}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(r=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===r.Tag||e.type===r.Script||e.type===r.Style},t.Root=r.Root,t.Text=r.Text,t.Directive=r.Directive,t.Comment=r.Comment,t.Script=r.Script,t.Style=r.Style,t.Tag=r.Tag,t.CDATA=r.CDATA,t.Doctype=r.Doctype},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.stringify=t.parse=t.isTraversal=void 0,i(n(530),t);var o=n(1067);Object.defineProperty(t,"isTraversal",{enumerable:!0,get:function(){return o.isTraversal}}),Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return o.parse}});var a=n(1068);Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return a.stringify}})},function(e,t,n){"use strict";n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return d})),n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return m}));var r=n(13),i=n.n(r),o=n(1098),a=n(1099);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const c=new Map,u=new Map,d=e=>c.get(g(e)),h=["people","people","control","nature","foods","places","activity","objects","symbols","flags"],p={people:[],nature:[],foods:[],places:[],activity:[],objects:[],symbols:[],flags:[]},m=o.map((e=>{var t,n;const r=null!==(t=a[e.hexcode])&&void 0!==t?t:[e.label.toLowerCase().replace(/\W+/g,"_")],i=l(l({},e),{},{shortcodes:"string"==typeof r?[r]:r}),o=null!==(n=h[i.group])&&void 0!==n?n:(s=i.unicode,1===Array.from(s).length&&s>="🇦"&&s<="🇿"?"symbols":null);var s;return p.hasOwnProperty(o)&&p[o].push(i),c.set(g(i.unicode),i),i.emoticon&&(Array.isArray(i.emoticon)?i.emoticon.forEach((e=>u.set(e,i))):u.set(i.emoticon,i)),i}));function g(e){return e.replace(/[\uFE00-\uFE0F]$/,"")}},function(e,t,n){"use strict";let r,i,o=n(296);class a extends o{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}removeChild(e,t){let n=this.index(e);return!t&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}normalize(e,t,n){let r=super.normalize(e);if(t)if("prepend"===n)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of r)e.raws.before=t.raws.before;return r}toResult(e={}){return new r(new i,this,e).stringify()}}a.registerLazyResult=e=>{r=e},a.registerProcessor=e=>{i=e},e.exports=a,a.default=a,o.registerRoot(a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(120);const i=n.n(r).a.createContext({isCard:!1})},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));class r extends Error{constructor(e){super(e)}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return _})),n.d(t,"a",(function(){return b}));var r=n(13),i=n.n(r),o=n(413),a=n(136),s=n(120),l=n.n(s),c=n(121),u=n(122),d=n(127),h=n(559),p=n(144),m=n(560);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class _ extends l.a.Component{render(){return l.a.createElement(m.a,{onFinished:this.props.onFinished,title:Object(c.a)("Confirm Removal"),description:Object(c.a)("Are you sure you wish to remove (delete) this event? Note that if you delete a room name or topic change, it could undo the change."),placeholder:Object(c.a)("Reason (optional)"),focus:!0,button:Object(c.a)("Remove")})}}function b(e){let{mxEvent:t,onCloseDialog:n=(()=>{})}=e;const r=t.getId();if(!r)throw new Error("cannot redact event without ID");const i=t.getRoomId();if(!i)throw new Error(`cannot redact event ${t.getId()} without room ID`);d.b.createDialog(_,{onFinished:async(e,s)=>{if(!e)return;const l=u.a.get(),m={};if(Object(h.a)(t)){const e=l.canSupport.get(o.a.RelationBasedRedactions);e&&e!==o.b.Unsupported&&(m.with_relations=[a.RelationType.Reference])}try{null==n||n(),await l.redactEvent(i,r,void 0,f(f({},s?{reason:s}:{}),m))}catch(e){const t=e.errcode||e.statusCode;void 0!==t&&d.b.createDialog(p.a,{title:Object(c.a)("Error"),description:Object(c.a)("You cannot delete this message. (%(code)s)",{code:t})})}}},"mx_Dialog_confirmredact")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r="array",i="bit",o="bits",a="byte",s="bytes",l="",c="exponent",u="function",d="iec",h="Invalid number",p="Invalid rounding method",m="jedec",g="object",f=".",_="round",b="s",v="kbit",y="kB",E=" ",S="string",w="0",T={symbol:{iec:{bits:["bit","Kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["bit","Kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},fullform:{iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]}};function C(e,{bits:t=!1,pad:n=!1,base:C=-1,round:x=2,locale:F=l,localeOptions:D={},separator:k=l,spacer:O=E,symbols:I={},standard:A=l,output:R=S,fullform:N=!1,fullforms:M=[],exponent:P=-1,roundingMethod:L=_,precision:B=0}={}){let U=P,j=Number(e),G=[],z=0,H=l;-1===C&&0===A.length?(C=10,A=m):-1===C&&A.length>0?C=(A=A===d?d:m)===d?2:10:A=10===(C=2===C?2:10)||A===m?m:d;const q=10===C?1e3:1024,V=!0===N,$=j<0,K=Math[L];if("bigint"!=typeof e&&isNaN(e))throw new TypeError(h);if(typeof K!==u)throw new TypeError(p);if($&&(j=-j),(-1===U||isNaN(U))&&(U=Math.floor(Math.log(j)/Math.log(q)),U<0&&(U=0)),U>8&&(B>0&&(B+=8-U),U=8),R===c)return U;if(0===j)G[0]=0,H=G[1]=T.symbol[A][t?o:s][U];else{z=j/(2===C?Math.pow(2,10*U):Math.pow(1e3,U)),t&&(z*=8,z>=q&&U<8&&(z/=q,U++));const e=Math.pow(10,U>0?x:0);G[0]=K(z*e)/e,G[0]===q&&U<8&&-1===P&&(G[0]=1,U++),H=G[1]=10===C&&1===U?t?v:y:T.symbol[A][t?o:s][U]}if($&&(G[0]=-G[0]),B>0&&(G[0]=G[0].toPrecision(B)),G[1]=I[G[1]]||G[1],!0===F?G[0]=G[0].toLocaleString():F.length>0?G[0]=G[0].toLocaleString(F,D):k.length>0&&(G[0]=G[0].toString().replace(f,k)),n&&!1===Number.isInteger(G[0])&&x>0){const e=k||f,t=G[0].toString().split(e),n=t[1]||l,r=n.length,i=x-r;G[0]=`${t[0]}${e}${n.padEnd(r+i,w)}`}return V&&(G[1]=M[U]?M[U]:T.fullform[A][U]+(t?i:a)+(1===G[0]?l:b)),R===r?G:R===g?{value:G[0],symbol:G[1],exponent:U,unit:H}:G.join(O)}t.filesize=C,t.partial=function({bits:e=!1,pad:t=!1,base:n=-1,round:r=2,locale:i=l,localeOptions:o={},separator:a=l,spacer:s=E,symbols:c={},standard:u=l,output:d=S,fullform:h=!1,fullforms:p=[],exponent:m=-1,roundingMethod:g=_,precision:f=0}={}){return l=>C(l,{bits:e,pad:t,base:n,round:r,locale:i,localeOptions:o,separator:a,spacer:s,symbols:c,standard:u,output:d,fullform:h,fullforms:p,exponent:m,roundingMethod:g,precision:f})}},function(e,t,n){"use strict";var r=n(13),i=n.n(r),o=n(17),a=n.n(o);class s extends a.a{constructor(){super(),i()(this,"roomWidgetEcho",void 0),this.roomWidgetEcho={}}getEchoedRoomWidgets(e,t){const n=[],r=Object.assign({},this.roomWidgetEcho[e]);for(const e of t){const t=e.getStateKey();r[t]&&0===Object.keys(r[t]).length||n.push(e),delete r[t]}return n}roomHasPendingWidgetsOfType(e,t,n){const r=Object.assign({},this.roomWidgetEcho[e]);for(const e of t){delete r[e.getStateKey()]}return void 0===n?Object.keys(r).length>0:Object.values(r).some((e=>n.matches(e.type)))}roomHasPendingWidgets(e,t){return this.roomHasPendingWidgetsOfType(e,t)}setRoomWidgetEcho(e,t,n){void 0===this.roomWidgetEcho[e]&&(this.roomWidgetEcho[e]={}),this.roomWidgetEcho[e][t]=n,this.emit("update",e,t)}removeRoomWidgetEcho(e,t){delete this.roomWidgetEcho[e][t],0===Object.keys(this.roomWidgetEcho[e]).length&&delete this.roomWidgetEcho[e],this.emit("update",e,t)}}let l=null;l||(l=new s),t.a=l},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(1),l=n(125),c=n(329),u=n(212),d=n(152),h=n(142);const p=function(){if(l.b.getValue("debug_scroll_panel")){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];s.a.log.call(console,"ScrollPanel debuglog:",...t)}};class m extends a.a.Component{constructor(e){var t,n;super(e),t=this,i()(this,"pendingFillRequests",{b:null,f:null}),i()(this,"itemlist",Object(o.createRef)()),i()(this,"unmounted",!1),i()(this,"scrollTimeout",void 0),i()(this,"isFilling",void 0),i()(this,"isFillingDueToPropsUpdate",!1),i()(this,"fillRequestWhileRunning",void 0),i()(this,"pendingFillDueToPropsUpdate",void 0),i()(this,"scrollState",void 0),i()(this,"preventShrinkingState",void 0),i()(this,"unfillDebouncer",void 0),i()(this,"bottomGrowth",void 0),i()(this,"minListHeight",void 0),i()(this,"heightUpdateInProgress",void 0),i()(this,"divScroll",void 0),i()(this,"onScroll",(e=>{var t,n;this.props.resizeNotifier&&this.props.resizeNotifier.isResizing||(p("onScroll called past resize gate; scroll node top:",this.getScrollNode().scrollTop),this.scrollTimeout.restart(),this.saveScrollState(),this.updatePreventShrinking(),null===(t=(n=this.props).onScroll)||void 0===t||t.call(n,e),this.checkFillState())})),i()(this,"onResize",(()=>{p("onResize called"),this.checkScroll(),this.preventShrinkingState&&this.preventShrinking()})),i()(this,"checkScroll",(function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t.unmounted||(t.restoreSavedScrollState(),t.checkFillState(0,e))})),i()(this,"isAtBottom",(()=>{const e=this.getScrollNode();return e.scrollHeight-(e.scrollTop+e.clientHeight)<=1})),i()(this,"checkFillState",(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t.unmounted)return;const r=0===e,i=t.getScrollNode();if(r){if(t.isFilling&&!t.isFillingDueToPropsUpdate)return p("isFilling: not entering while request is ongoing, marking for a subsequent request"),t.fillRequestWhileRunning=!0,void(t.pendingFillDueToPropsUpdate=n);p("isFilling: setting"),t.isFilling=!0,t.isFillingDueToPropsUpdate=n}const o=t.itemlist.current,a=o&&o.firstElementChild,l=a&&a.offsetTop,c=[];if((!a||i.scrollTop-l<i.clientHeight)&&c.push(t.maybeFill(e,!0)),i.scrollHeight-i.scrollTop<2*i.clientHeight&&c.push(t.maybeFill(e,!1)),c.length)try{await Promise.all(c)}catch(e){s.a.error(e)}if(r&&(p("isFilling: clearing"),t.isFilling=!1,t.isFillingDueToPropsUpdate=!1),t.fillRequestWhileRunning){const e=t.pendingFillDueToPropsUpdate;t.fillRequestWhileRunning=!1,t.pendingFillDueToPropsUpdate=!1,t.checkFillState(0,e)}})),i()(this,"getScrollState",(()=>this.scrollState)),i()(this,"resetScrollState",(()=>{this.scrollState={stuckAtBottom:this.props.startAtBottom},this.bottomGrowth=0,this.minListHeight=0,this.scrollTimeout=new c.a(100),this.heightUpdateInProgress=!1})),i()(this,"scrollToTop",(()=>{this.getScrollNode().scrollTop=0,this.saveScrollState()})),i()(this,"scrollToBottom",(()=>{const e=this.getScrollNode();e.scrollTop=e.scrollHeight,this.saveScrollState()})),i()(this,"scrollRelative",(e=>{const t=this.getScrollNode(),n=e*t.clientHeight*.9;t.scrollBy(0,n),this.saveScrollState()})),i()(this,"handleScrollKey",(e=>{switch(Object(d.a)().getRoomAction(e)){case h.h.ScrollUp:this.scrollRelative(-1);break;case h.h.ScrollDown:this.scrollRelative(1);break;case h.h.JumpToFirstMessage:this.scrollToTop();break;case h.h.JumpToLatestMessage:this.scrollToBottom()}})),i()(this,"scrollToToken",((e,t,n)=>{t=t||0,n=n||0,this.scrollState={stuckAtBottom:!1,trackedScrollToken:e};const r=this.getTrackedNode(),i=this.getScrollNode();r&&(p("scrollToken: setting scrollTop",{offsetBase:n,pixelOffset:t,offsetTop:r.offsetTop}),i.scrollTop=r.offsetTop-i.clientHeight*n+t,this.saveScrollState())})),i()(this,"collectScroll",(e=>{this.divScroll=e})),i()(this,"preventShrinking",(()=>{const e=this.itemlist.current,t=e&&e.children;if(!e)return;let n;for(let e=t.length-1;e>=0;e--){const r=t[e];if(r.dataset.scrollTokens){n=r;break}}if(!n)return;this.clearPreventShrinking();const r=e.clientHeight-(n.offsetTop+n.clientHeight);this.preventShrinkingState={offsetFromBottom:r,offsetNode:n},p("prevent shrinking, last tile ",r,"px from bottom")})),i()(this,"clearPreventShrinking",(()=>{const e=this.itemlist.current,t=e&&e.parentElement;t&&(t.style.paddingBottom=null),this.preventShrinkingState=null,p("prevent shrinking cleared")})),i()(this,"updatePreventShrinking",(()=>{if(this.preventShrinkingState){const e=this.getScrollNode(),t=this.scrollState,n=this.itemlist.current,{offsetNode:r,offsetFromBottom:i}=this.preventShrinkingState,o=n.parentElement;let a=!r.parentElement;if(!a&&!t.stuckAtBottom){a=e.scrollHeight-(e.scrollTop+e.clientHeight)>=200}if(!a){const e=i-(n.clientHeight-(r.offsetTop+r.clientHeight));e>0?(o.style.paddingBottom=`${e}px`,p("update prevent shrinking ",e,"px from bottom")):e<0&&(a=!0)}a&&this.clearPreventShrinking()}})),null===(n=this.props.resizeNotifier)||void 0===n||n.on("middlePanelResizedNoisy",this.onResize),this.resetScrollState()}componentDidMount(){this.checkScroll()}componentDidUpdate(){this.checkScroll(!0),this.updatePreventShrinking()}componentWillUnmount(){var e;this.unmounted=!0,null===(e=this.props.resizeNotifier)||void 0===e||e.removeListener("middlePanelResizedNoisy",this.onResize)}getExcessHeight(e){const t=this.getScrollNode(),n=this.getMessagesHeight(),r=n-this.getListHeight(),i=t.scrollTop+r;return e?i-t.clientHeight-6e3:n-(i+2*t.clientHeight)-6e3}checkUnfillState(e){let t=this.getExcessHeight(e);if(t<=0)return;const n=t,r=this.itemlist.current.children;let i,o=null;for(let n=0;n<r.length&&(i=r[e?n:r.length-1-n],t-=i.clientHeight,!(i.clientHeight>t));n++)i.dataset.scrollTokens&&(o=i.dataset.scrollTokens.split(",")[0]);o&&(this.unfillDebouncer&&clearTimeout(this.unfillDebouncer),this.unfillDebouncer=window.setTimeout((()=>{var t,r;this.unfillDebouncer=null,p("unfilling now",{backwards:e,origExcessHeight:n}),null===(t=(r=this.props).onUnfillRequest)||void 0===t||t.call(r,e,o)}),200))}maybeFill(e,t){const n=t?"b":"f";return this.pendingFillRequests[n]?(p("Already a fill in progress - not starting another; direction=",n),Promise.resolve()):(p("starting fill; direction=",n),this.pendingFillRequests[n]=!0,new Promise((e=>window.setTimeout(e,1))).then((()=>this.props.onFillRequest(t))).finally((()=>{this.pendingFillRequests[n]=!1})).then((r=>{if(!this.unmounted)return this.checkUnfillState(!t),p("fill complete; hasMoreResults=",r,"direction=",n),r?this.checkFillState(e+1):void 0})))}saveScrollState(){if(this.props.stickyBottom&&this.isAtBottom())return this.scrollState={stuckAtBottom:!0},void p("saved stuckAtBottom state");const e=this.getScrollNode(),t=e.scrollHeight-(e.scrollTop+e.clientHeight),n=this.itemlist.current.children;let r=null;for(let e=n.length-1;e>=0;--e){var i;const o=n[e];if(null!==(i=o.dataset)&&void 0!==i&&i.scrollTokens&&(r=o,this.topFromBottom(r)>t))break}if(!r)return void p("unable to save scroll state: found no children in the viewport");const o=r.dataset.scrollTokens.split(",")[0];p("saving anchored scroll state to message",o);const a=this.topFromBottom(r);this.scrollState={stuckAtBottom:!1,trackedNode:r,trackedScrollToken:o,bottomOffset:a,pixelOffset:a-t}}async restoreSavedScrollState(){const e=this.scrollState;if(e.stuckAtBottom){const e=this.getScrollNode();e.scrollTop!==e.scrollHeight&&(e.scrollTop=e.scrollHeight)}else if(e.trackedScrollToken){const t=this.itemlist.current,n=this.getTrackedNode();if(n){const r=this.topFromBottom(n),i=r-e.bottomOffset;this.bottomGrowth+=i,e.bottomOffset=r;const o=`${this.getListHeight()}px`;t.style.height!==o&&(t.style.height=o),p("balancing height because messages below viewport grew by",i)}}if(this.heightUpdateInProgress)p("not updating height because request already in progress");else{this.heightUpdateInProgress=!0;try{await this.updateHeight()}finally{this.heightUpdateInProgress=!1}}}async updateHeight(){if(this.scrollTimeout.isRunning()?(p("updateHeight waiting for scrolling to end ... "),await this.scrollTimeout.finished(),p("updateHeight actually running now")):p("updateHeight running without delay"),this.unmounted)return void p("updateHeight: abort due to unmount");const e=this.getScrollNode(),t=this.itemlist.current,n=this.getMessagesHeight();n<e.clientHeight?this.minListHeight=e.clientHeight:this.minListHeight=400*Math.ceil(n/400),this.bottomGrowth=0;const r=`${this.getListHeight()}px`,i=this.scrollState;if(i.stuckAtBottom)t.style.height!==r&&(t.style.height=r),e.scrollTop!==e.scrollHeight&&(e.scrollTop=e.scrollHeight),p("updateHeight to",r);else if(i.trackedScrollToken){const n=this.getTrackedNode();if(n){const i=n.offsetTop;t.style.height!==r&&(t.style.height=r);const o=n.offsetTop-i;e.scrollBy(0,o),p("updateHeight to",{newHeight:r,topDiff:o})}}}getTrackedNode(){const e=this.scrollState,t=e.trackedNode;if(null==t||!t.parentElement){let t;const r=this.itemlist.current.children,i=e.trackedScrollToken;for(let e=r.length-1;e>=0;--e){var n;const o=r[e];if(i&&null!==(n=o.dataset.scrollTokens)&&void 0!==n&&n.split(",").includes(i)){t=o;break}}t&&p("had to find tracked node again for token:",e.trackedScrollToken),e.trackedNode=t}if(e.trackedNode)return e.trackedNode;p("No node with token:",e.trackedScrollToken)}getListHeight(){return this.bottomGrowth+this.minListHeight}getMessagesHeight(){const e=this.itemlist.current,t=e.lastElementChild;return(t?t.offsetTop+t.clientHeight:0)-(e.firstElementChild?e.firstElementChild.offsetTop:0)+36}topFromBottom(e){return this.itemlist.current.clientHeight-e.offsetTop}getScrollNode(){if(this.unmounted)throw new Error("ScrollPanel.getScrollNode called when unmounted");if(!this.divScroll)throw new Error("ScrollPanel.getScrollNode called before AutoHideScrollbar ref collected");return this.divScroll}render(){return a.a.createElement(u.a,{wrappedRef:this.collectScroll,onScroll:this.onScroll,className:`mx_ScrollPanel ${this.props.className}`,style:this.props.style},this.props.fixedChildren,a.a.createElement("div",{className:"mx_RoomView_messageListWrapper"},a.a.createElement("ol",{ref:this.itemlist,className:"mx_RoomView_MessageList","aria-live":"polite"},this.props.children)))}}i()(m,"defaultProps",{stickyBottom:!0,startAtBottom:!0,onFillRequest:function(e){return Promise.resolve(!1)},onUnfillRequest:function(e,t){},onScroll:function(){}})},function(e,t,n){"use strict";n.d(t,"c",(function(){return p})),n.d(t,"b",(function(){return m})),n.d(t,"g",(function(){return g})),n.d(t,"a",(function(){return f})),n.d(t,"d",(function(){return _})),n.d(t,"e",(function(){return b})),n.d(t,"f",(function(){return v})),n.d(t,"h",(function(){return y}));var r=n(549),i=n(700),o=n.n(i),a=n(724),s=n.n(a),l=n(932),c=n(168),u=n(125),d=n(131),h=n(252);function p(e){let{forceHTML:t=!1,useMarkdown:n=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!n)return s()(g(e)).replace(/\n/g,"<br/>");const r=function(e){return e.parts.reduce(((e,t)=>{switch(t.type){case h.b.Newline:return e+"\n";case h.b.Plain:case h.b.Emoji:case h.b.Command:case h.b.PillCandidate:case h.b.AtRoomPill:return e+t.text;case h.b.RoomPill:return e+`[${t.resourceId.replace(/[[\\\]]/g,(e=>"\\"+e))}](${Object(c.g)(t.resourceId)})`;case h.b.UserPill:return e+`[${t.text.replace(/[[\\\]]/g,(e=>"\\"+e))}](${Object(c.g)(t.resourceId)})`}}),"")}(e);return m(r,{forceHTML:t})}function m(e){let{forceHTML:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e;if(u.b.getValue("feature_latex_maths")){const t=["display","inline"],n={tex:{display:"(^)\\$\\$(([^$]|\\\\\\$)+?)\\$\\$$",inline:"(^|\\s|[.,!?:;])(?!\\\\)\\$(?!\\s)(([^$\\n]|\\\\\\$)*([^\\\\\\s\\$]|\\\\\\$)(?:\\\\\\$)?)\\$"},latex:{display:"(^)\\\\\\[(?!\\\\\\])(.*?)\\\\\\]$",inline:"(^|[^\\\\])\\\\\\((?!\\\\\\))(.*?)\\\\\\)"}};["tex","latex"].forEach((function(i){t.forEach((function(t){var o,a,s;const l=(null===(o=d.b.get("latex_maths_delims"))||void 0===o||null===(a=o[t])||void 0===a||null===(s=a.pattern)||void 0===s?void 0:s[i])||n[i][t];e=e.replace(RegExp(l,"gms"),(function(e,n,i){const o=Object(r.encode)(i);switch(t){case"display":return`${n}<div data-mx-maths="${o}">\n\n</div>\n\n`;case"inline":return`${n}<span data-mx-maths="${o}"></span>`}}))}))})),e=e.replace(/(.)<div/g,(function(e,t){return`${t}\n<div`}))}const i=new l.a(e);if(!i.isPlainText()||t){const e=o.a.load(i.toHTML(),{_useHtmlParser2:!0,decodeEntities:!1});if(u.b.getValue("feature_latex_maths")){const t=new l.a(n),r=o.a.load(t.toHTML(),{_useHtmlParser2:!0,decodeEntities:!1});r("code").each((function(t){e("code").eq(t).text(r("code").eq(t).text())})),e("div, span").each((function(t,n){const r=e(n).attr("data-mx-maths");r&&e(n).html(`<code>${r}</code>`)}))}return e.html()}if(e.indexOf("\\")>-1)return i.toPlaintext()}function g(e){return e.parts.reduce(((e,t)=>{switch(t.type){case h.b.Newline:return e+"\n";case h.b.Plain:case h.b.Emoji:case h.b.Command:case h.b.PillCandidate:case h.b.AtRoomPill:return e+t.text;case h.b.RoomPill:return e+`${t.resourceId}`;case h.b.UserPill:return e+`${t.text}`}}),"")}function f(e){var t,n;const r=_(e,"/me ",!1),i=(null===(t=e.parts[0])||void 0===t||null===(n=t.text)||void 0===n?void 0:n.length)>4||e.parts.length>1;return r&&i}function _(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=e.parts[0];let i=(null==r?void 0:r.text)||"";return n||(t=t.toLowerCase(),i=i.toLowerCase()),r&&(r.type===h.b.Plain||r.type===h.b.Command)&&i.startsWith(t)}function b(e){return v(e,"/me ")}function v(e,t){return(e=e.clone()).removeText({index:0,offset:0},t.length),e}function y(e){const{parts:t}=e;if(t.length){const n=t[0];n.type===h.b.Plain&&n.text.startsWith("\\/")&&(e=e.clone()).removeText({index:0,offset:0},1)}return e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(13),i=n.n(r),o=n(138);class a{constructor(e){let{commandRegex:t,forcedCommandRegex:n,renderingType:r}=e;if(i()(this,"commandRegex",void 0),i()(this,"forcedCommandRegex",void 0),i()(this,"renderingType",o.a.Room),t){if(!t.global)throw new Error("commandRegex must have global flag set");this.commandRegex=t}if(n){if(!n.global)throw new Error("forcedCommandRegex must have global flag set");this.forcedCommandRegex=n}r&&(this.renderingType=r)}destroy(){}getCurrentCommand(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=this.commandRegex;if(r&&this.shouldForceComplete()&&(i=this.forcedCommandRegex||/\S+/g),!i)return{};for(i.lastIndex=0;null!==(n=i.exec(e));){const e=n.index,r=e+n[0].length;if(t.start<=r&&t.end>=e)return{command:n,range:{start:e,end:r}}}return{command:null,range:{start:-1,end:-1}}}shouldForceComplete(){return!1}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return p})),n.d(t,"a",(function(){return m}));var r=n(130),i=n.n(r),o=n(132),a=n.n(o),s=n(120),l=n.n(s),c=n(126),u=n.n(c);const d=["title","subtitle","description","className","aria-selected"],h=["title","subtitle","description","className","children","aria-selected"],p=Object(s.forwardRef)(((e,t)=>{const{title:n,subtitle:r,description:o,className:s,"aria-selected":c}=e,h=a()(e,d);return l.a.createElement("div",i()({},h,{className:u()("mx_Autocomplete_Completion_block",s),role:"option","aria-selected":c,ref:t}),l.a.createElement("span",{className:"mx_Autocomplete_Completion_title"},n),l.a.createElement("span",{className:"mx_Autocomplete_Completion_subtitle"},r),l.a.createElement("span",{className:"mx_Autocomplete_Completion_description"},o))})),m=Object(s.forwardRef)(((e,t)=>{const{title:n,subtitle:r,description:o,className:s,children:c,"aria-selected":d}=e,p=a()(e,h);return l.a.createElement("div",i()({},p,{className:u()("mx_Autocomplete_Completion_pill",s),role:"option","aria-selected":d,ref:t}),c,l.a.createElement("span",{className:"mx_Autocomplete_Completion_title"},n),l.a.createElement("span",{className:"mx_Autocomplete_Completion_subtitle"},r),l.a.createElement("span",{className:"mx_Autocomplete_Completion_description"},o))}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return g})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return _}));var r=n(1359),i=n.n(r),o=n(1368),a=n.n(o),s=n(1),l=n(122),c=n(157),u=n(121),d=n(575),h=n(125),p=n(131);async function m(){var e,t,n;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const a=r.progressCallback||(()=>{});let p;a(Object(u.a)("Collecting app version information"));try{var m;p=await(null===(m=c.a.get())||void 0===m?void 0:m.getAppVersion())}catch(e){}const g=null!==(e=null===(t=window.navigator)||void 0===t?void 0:t.userAgent)&&void 0!==e?e:"UNKNOWN";let f="UNKNOWN";try{f=String(window.matchMedia("(display-mode: standalone)").matches)}catch(e){}let _="UNKNOWN";try{_=String(window.matchMedia("(pointer: coarse)").matches)}catch(e){}const b=l.a.get();s.a.log("Sending bug report.");const v=new FormData;if(v.append("text",r.userText||"User did not supply any additional text."),v.append("app",r.customApp||"element-web"),v.append("version",null!==(n=p)&&void 0!==n?n:"UNKNOWN"),v.append("user_agent",g),v.append("installed_pwa",f),v.append("touch_input",_),r.customFields)for(const e in r.customFields)v.append(e,r.customFields[e]);if(b&&(v.append("user_id",b.credentials.userId),v.append("device_id",b.deviceId),b.isCryptoEnabled()&&b.crypto)){const e=[`ed25519:${b.getDeviceEd25519Key()}`];b.getDeviceCurve25519Key&&e.push(`curve25519:${b.getDeviceCurve25519Key()}`),v.append("device_keys",e.join(", ")),v.append("cross_signing_key",b.getCrossSigningId());const t=b.crypto.crossSigningInfo,n=b.crypto.secretStorage;v.append("cross_signing_ready",String(await b.isCrossSigningReady())),v.append("cross_signing_supported_by_hs",String(await b.doesServerSupportUnstableFeature("org.matrix.e2e_cross_signing"))),v.append("cross_signing_key",t.getId()),v.append("cross_signing_privkey_in_secret_storage",String(!!await t.isStoredInSecretStorage(n)));const r=b.getCrossSigningCacheCallbacks();v.append("cross_signing_master_privkey_cached",String(!(!r||!await r.getCrossSigningKeyCache("master")))),v.append("cross_signing_self_signing_privkey_cached",String(!(!r||!await r.getCrossSigningKeyCache("self_signing")))),v.append("cross_signing_user_signing_privkey_cached",String(!(!r||!await r.getCrossSigningKeyCache("user_signing")))),v.append("secret_storage_ready",String(await b.isSecretStorageReady())),v.append("secret_storage_key_in_account",String(!!await n.hasKey())),v.append("session_backup_key_in_secret_storage",String(!!await b.isKeyBackupKeyStored()));const i=await b.crypto.getSessionBackupPrivateKey();v.append("session_backup_key_cached",String(!!i)),v.append("session_backup_key_well_formed",String(i instanceof Uint8Array))}if(r.labels)for(const e of r.labels)v.append("label",e);const y=h.b.getFeatureSettingNames().filter((e=>h.b.getValue(e)));if(y.length&&v.append("enabled_labs",y.join(", ")),h.b.getValue("lowBandwidth")&&v.append("lowBandwidth","enabled"),navigator.storage&&navigator.storage.persisted)try{v.append("storageManager_persisted",String(await navigator.storage.persisted()))}catch(e){}else if(document.hasStorageAccess)try{v.append("storageManager_persisted",String(await document.hasStorageAccess()))}catch(e){}if(navigator.storage&&navigator.storage.estimate)try{const e=await navigator.storage.estimate();v.append("storageManager_quota",String(e.quota)),v.append("storageManager_usage",String(e.usage)),e.usageDetails&&Object.keys(e.usageDetails).forEach((t=>{v.append(`storageManager_usage_${t}`,String(e.usageDetails[t]))}))}catch(e){}if(window.Modernizr){const e=Object.keys(window.Modernizr).filter((e=>!1===window.Modernizr[e]));e.length>0&&v.append("modernizr_missing_features",e.join(", "))}if(v.append("mx_local_settings",localStorage.getItem("mx_local_settings")),r.sendLogs){a(Object(u.a)("Collecting logs"));const e=await d.c();for(const t of e){let e=(new TextEncoder).encode(t.lines);o&&(e=i.a.gzip(e)),v.append("compressed-log",new Blob([e]),t.id)}}return v}async function g(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)throw new Error("No bug report endpoint has been set.");const n=t.progressCallback||(()=>{}),r=await m(t);return n(Object(u.a)("Uploading logs")),b(e,r,n)}async function f(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.progressCallback||(()=>{}),n=await m(e,!1);t(Object(u.a)("Downloading logs"));let r="";const i=new a.a;let o=0;for(const[e,t]of n.entries())"compressed-log"===e?await new Promise((e=>{const n=new FileReader;n.addEventListener("loadend",(t=>{i.append(`log-${o++}.log`,(new TextDecoder).decode(t.target.result)),e()})),n.readAsArrayBuffer(t)})):r+=`${e} = ${t}\n`;i.append("issue.txt",r);const s=document.createElement("a");s.href=`data:application/octet-stream;base64,${btoa(function(e){let t="";for(let n=0;n<e.length;n+=1)t+=String.fromCharCode(e[n]);return t}(i.out))}`,s.download="rageshake.tar",document.body.appendChild(s),s.click(),document.body.removeChild(s)}async function _(e,t,n){var r;let i,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};try{var s;i=await(null===(s=c.a.get())||void 0===s?void 0:s.getAppVersion())}catch(e){}const u=new FormData;u.append("label",t),u.append("text",n),u.append("can_contact",o?"yes":"no"),u.append("app","element-web"),u.append("version",i||"UNKNOWN"),u.append("platform",c.a.get().getHumanReadableName()),u.append("user_id",null===(r=l.a.get())||void 0===r?void 0:r.getUserId());for(const e in a)u.append(e,JSON.stringify(a[e]));await b(p.b.get().bug_report_endpoint_url,u,(()=>{}))}function b(e,t,n){return new Promise(((r,i)=>{const o=new XMLHttpRequest;o.open("POST",e),o.responseType="json",o.timeout=3e5,o.onreadystatechange=function(){if(o.readyState===XMLHttpRequest.LOADING)n(Object(u.a)("Waiting for response from server"));else if(o.readyState===XMLHttpRequest.DONE){if(o.status<200||o.status>=400)return void i(new Error(`HTTP ${o.status}`));r(o.response.report_url||"")}},o.send(t)}))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(773),i=n(263),o=n(578);function a(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}function s(e,t){const n=t.prototype||{};e.prototype=t.prototype=n,a(e,"__sentry_original__",t)}function l(e){if(i.isError(e))return{message:e.message,name:e.name,stack:e.stack,...u(e)};if(i.isEvent(e)){const t={type:e.type,target:c(e.target),currentTarget:c(e.currentTarget),...u(e)};return"undefined"!=typeof CustomEvent&&i.isInstanceOf(e,CustomEvent)&&(t.detail=e.detail),t}return e}function c(e){try{return i.isElement(e)?r.htmlTreeAsString(e):Object.prototype.toString.call(e)}catch(e){return"<unknown>"}}function u(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function d(e,t){if(i.isPlainObject(e)){const n=t.get(e);if(void 0!==n)return n;const r={};t.set(e,r);for(const n of Object.keys(e))void 0!==e[n]&&(r[n]=d(e[n],t));return r}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const r=[];return t.set(e,r),e.forEach((e=>{r.push(d(e,t))})),r}return e}t.addNonEnumerableProperty=a,t.convertToPlainObject=l,t.dropUndefinedKeys=function(e){return d(e,new Map)},t.extractExceptionKeysForMessage=function(e,t=40){const n=Object.keys(l(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return o.truncate(n[0],t);for(let e=n.length;e>0;e--){const r=n.slice(0,e).join(", ");if(!(r.length>t))return e===n.length?r:o.truncate(r,t)}return""},t.fill=function(e,t,n){if(!(t in e))return;const r=e[t],i=n(r);if("function"==typeof i)try{s(i,r)}catch(e){}e[t]=i},t.getOriginalFunction=function(e){return e.__sentry_original__},t.markFunctionWrapped=s,t.objectify=function(e){let t;switch(!0){case null==e:t=new String(e);break;case"symbol"==typeof e||"bigint"==typeof e:t=Object(e);break;case i.isPrimitive(e):t=new e.constructor(e);break;default:t=e}return t},t.urlEncode=function(e){return Object.keys(e).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`)).join("&")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return l}));var r=n(120),i=n.n(r),o=n(193),a=n(121);function s(e,t,n,r){let o=e?n[e]:void 0;void 0===o&&(o=n[""]);const s=e=>t?i.a.createElement("a",{href:t,target:"_blank",rel:"noreferrer noopener"},e):e;return o.includes("<a>")?Object(a.a)(o,{},Object.assign({a:s},r)):Object(a.a)(o,{},r)}function l(e){if(e instanceof o.f&&"M_RESOURCE_LIMIT_EXCEEDED"===e.errcode){const t=s(e.data.limit_type,e.data.admin_contact,{monthly_active_user:Object(a.c)("This homeserver has hit its Monthly Active User limit."),hs_blocked:Object(a.c)("This homeserver has been blocked by its administrator."),"":Object(a.c)("This homeserver has exceeded one of its resource limits.")}),n=s(e.data.limit_type,e.data.admin_contact,{"":Object(a.c)("Please <a>contact your service administrator</a> to continue using the service.")});return i.a.createElement("div",null,i.a.createElement("div",null,t),i.a.createElement("div",null,n))}return i.a.createElement("div",null,Object(a.a)("Unable to connect to Homeserver. Retrying…"))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(13),i=n.n(r),o=n(1),a=n(129),s=n(219),l=n(122),c=n(164),u=n(183),d=n(792),h=n(305);class p{constructor(){i()(this,"virtualToNativeRoomIdCache",new Map)}static sharedInstance(){return void 0===window.mxVoipUserMapper&&(window.mxVoipUserMapper=new p),window.mxVoipUserMapper}async userToVirtualUser(e){const t=await u.b.instance.sipVirtualLookup(e);return 0!==t.length&&t[0].fields.lookup_success?t[0].userid:null}async getVirtualUserForRoom(e){const t=c.a.shared().getUserIdForRoomId(e);if(!t)return null;const n=await this.userToVirtualUser(t);return n||null}async getOrCreateVirtualRoomForRoom(e){const t=await this.getVirtualUserForRoom(e);if(!t)return null;const n=await Object(s.d)(l.a.get(),t,e);return l.a.get().setRoomAccountData(n,d.a,{native_room:e}),this.virtualToNativeRoomIdCache.set(n,e),n}async getVirtualRoomForRoom(e){const t=await this.getVirtualUserForRoom(e);if(t)return Object(h.a)(l.a.get(),t)}nativeRoomForVirtualRoom(e){const t=this.virtualToNativeRoomIdCache.get(e);if(t)return o.a.log("Returning native room ID "+t+" for virtual room ID "+e+" from cache"),t;const n=l.a.get().getRoom(e);if(!n)return null;const r=n.getAccountData(d.a);if(!r||!r.getContent())return null;const i=r.getContent().native_room,a=l.a.get().getRoom(i);return a&&"join"===a.getMyMembership()?i:null}isVirtualRoom(e){if(this.nativeRoomForVirtualRoom(e.roomId))return!0;if(this.virtualToNativeRoomIdCache.has(e.roomId))return!0;const t=e.currentState.getStateEvents(a.b.RoomCreate,"");if(!t||!t.getContent())return!1;if(t.getSender()!==l.a.get().getUserId())return!1;const n=t.getContent()[d.a];return Boolean(n)}async onNewInvitedRoom(e){if(!u.b.instance.getSupportsVirtualRooms())return;const t=e.getDMInviter();t||o.a.error("Could not find DM inviter for room id: "+e.roomId),o.a.log(`Checking virtual-ness of room ID ${e.roomId}, invited by ${t}`);const n=await u.b.instance.sipNativeLookup(t);if(0!==n.length&&n[0].fields.is_virtual){const t=n[0].userid,r=Object(h.a)(l.a.get(),t);r&&(l.a.get().setRoomAccountData(e.roomId,d.a,{native_room:r.roomId}),l.a.get().joinRoom(e.roomId),this.virtualToNativeRoomIdCache.set(e.roomId,r.roomId))}}}},function(e,t,n){"use strict";n.d(t,"d",(function(){return l})),n.d(t,"c",(function(){return c})),n.d(t,"e",(function(){return u})),n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return h}));var r=n(129),i=n(18),o=n(140),a=n(125);const s=["notificationsEnabled","notificationBodyEnabled","audioNotificationsEnabled"];function l(e){return`${r.c.name}.${e}`}async function c(e){if(e.isGuest())return;const t=l(e.deviceId);if(!e.getAccountData(t)){const n=!s.some((e=>a.b.getValue(e)));await e.setAccountData(t,{is_silenced:n})}}function u(e){var t,n;const r=l(e.deviceId),i=e.getAccountData(r);return null!==(t=null==i||null===(n=i.getContent())||void 0===n?void 0:n.is_silenced)&&void 0!==t&&t}async function d(e,t){var n,r,s;const l=e.getLiveTimeline().getEvents(),c=null===(n=e.lastThread)||void 0===n?void 0:n.events,u=null==l?void 0:l[(null==l?void 0:l.length)-1],d=null==c?void 0:c[(null==c?void 0:c.length)-1],h=(null!==(r=null==u?void 0:u.getTs())&&void 0!==r?r:0)>(null!==(s=null==d?void 0:d.getTs())&&void 0!==s?s:0)?u:d;try{if(h){const n=a.b.getValue("sendReadReceipts",e.roomId)?i.b.Read:i.b.ReadPrivate;return await t.sendReadReceipt(h,n,!0)}return{}}finally{e.setUnreadNotificationCount(o.b.Highlight,0),e.setUnreadNotificationCount(o.b.Total,0);for(const t of e.getThreads())e.setThreadUnreadNotificationCount(t.id,o.b.Highlight,0),e.setThreadUnreadNotificationCount(t.id,o.b.Total,0)}}function h(e){const t=e.getRooms().reduce(((t,n)=>{if(n.getUnreadNotificationCount()>0){const r=d(n,e);t.push(r)}return t}),[]);return Promise.all(t)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o}));const r=new Map;function i(e,t){r.set(e,t)}function o(e){return r.get(e)}},function(e,t,n){"use strict";async function r(e,t,n){const r=new Promise((r=>{const i=window.setTimeout(r,n,t);e.then((()=>{clearTimeout(i)}))}));return Promise.race([e,r])}async function i(e,t,n){let r;for(let i=0;i<t;i++)try{return await e()}catch(e){if(n&&!n(e))throw e;r=e}throw r}n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return _}));var r=n(13),i=n.n(r),o=n(129),a=n(1),s=n(147),l=n(232),c=n(127),u=n(121),d=n(144),h=n(178),p=n(134);function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}async function f(e,t){const n=e.getRoom(t);return n||new Promise((n=>{const r=i=>{i.roomId===t&&(n(i),e.off(s.b.Room,r))};e.on(s.b.Room,r)}))}async function _(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],m=arguments.length>5&&void 0!==arguments[5]&&arguments[5],_=arguments.length>6?arguments[6]:void 0;const b=e.client;let v;_||(v=c.b.createDialog(p.a,void 0,"mx_Dialog_spinner"));let y=[];r&&(y=[...e.getMembersWithMembership("join"),...e.getMembersWithMembership("invite")].map((e=>e.userId)).filter((e=>e!==b.getUserId())));let E=[];s&&(E=Array.from(h.a.instance.getKnownParents(e.roomId)).map((e=>b.getRoom(e))).filter((e=>null==e?void 0:e.currentState.maySendStateEvent(o.b.SpaceChild,b.getUserId()))));const S={roomUpgraded:!1,roomSynced:!m&&!r&&void 0,inviteUsersProgress:r?0:void 0,inviteUsersTotal:y.length,updateSpacesProgress:s?0:void 0,updateSpacesTotal:E.length};let w;null==_||_(S);try{({replacement_room:w}=await b.upgradeRoom(e.roomId,t))}catch(e){if(!i)throw e;throw a.a.error(e),c.b.createDialog(d.a,{title:Object(u.a)("Error upgrading room"),description:Object(u.a)("Double check that your server supports the room version chosen and try again.")}),e}if(S.roomUpgraded=!0,null==_||_(S),(m||r)&&(await f(e.client,w),S.roomSynced=!0,null==_||_(S)),y.length>0&&await Object(l.b)(w,y,!1,(()=>{S.inviteUsersProgress++,null==_||_(S)})),E.length>0)try{for(const t of E){const n=t.currentState.getStateEvents(o.b.SpaceChild,e.roomId);await b.sendStateEvent(t.roomId,o.b.SpaceChild,g(g({},(null==n?void 0:n.getContent())||{}),{},{via:[b.getDomain()]}),w),await b.sendStateEvent(t.roomId,o.b.SpaceChild,{},e.roomId),S.updateSpacesProgress++,null==_||_(S)}}catch(e){a.a.warn("Failed to update parent spaces during room upgrade",e)}return null===(n=v)||void 0===n||n.close(),w}},function(e,t,n){"use strict";var r=n(130),i=n.n(r),o=n(132),a=n.n(o),s=n(120),l=n.n(s),c=n(126),u=n.n(c),d=n(148);const h=["checked","disabled","title","tooltip","onChange"];t.a=e=>{let{checked:t,disabled:n=!1,title:r,tooltip:o,onChange:s}=e,c=a()(e,h);const p=u()({mx_ToggleSwitch:!0,mx_ToggleSwitch_on:t,mx_ToggleSwitch_enabled:!n});return l.a.createElement(d.a,i()({},c,{className:p,onClick:()=>{n||s(!t)},role:"switch","aria-checked":t,"aria-disabled":n,title:r,tooltip:o}),l.a.createElement("div",{className:"mx_ToggleSwitch_ball"}))}},function(e,t,n){"use strict";n.d(t,"b",(function(){return I})),n.d(t,"a",(function(){return R})),n.d(t,"f",(function(){return M})),n.d(t,"g",(function(){return P})),n.d(t,"e",(function(){return L})),n.d(t,"c",(function(){return B}));var r=n(120),i=n.n(r),o=n(126),a=n.n(o),s=n(16),l=n(129),c=n(1),u=n(121),d=n(135),h=n(279),p=n(334),m=n(178),g=n(162),f=n(285),_=n(123),b=n(212),v=n(164),y=n(168),E=n(177),S=n(133),w=n(435),T=n(494),C=n(317),x=n(301),F=n(747);const D=44,k=15,O=24,I=e=>{let{room:t,checked:n,onChange:r}=e;return i.a.createElement("label",{className:"mx_AddExistingToSpace_entry"},null!=t&&t.isSpaceRoom()?i.a.createElement(g.a,{room:t,height:32,width:32}):i.a.createElement(C.a,{room:t,avatarSize:32}),i.a.createElement("span",{className:"mx_AddExistingToSpace_entry_name"},t.name),i.a.createElement(E.b,{onChange:r?e=>r(e.currentTarget.checked):null,checked:n,disabled:!r}))},A=function(e,t){let{scrollTop:n,height:r}=e,i=0;for(var o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];a.forEach((e=>{i+=O+k+e*D}));const l=n,c=l+r,u=i+k,d=u+t*D,h=Math.max(l,u),p=Math.min(c,d);return{scrollTop:Math.max(0,n-u),height:Math.max(0,p-h)}},R=e=>{let{space:t,footerPrompt:o,emptySelectionButton:a,filterPlaceholder:l,roomsRenderer:d,dmsRenderer:h,spacesRenderer:g,onFinished:f}=e;const E=Object(r.useContext)(S.a),C=Object(r.useMemo)((()=>E.getVisibleRooms().filter((e=>"join"===e.getMyMembership()))),[E]),F=Object(r.useRef)(),[D,k]=Object(r.useState)({scrollTop:0,height:600}),[O,I]=Object(r.useState)(new Set),[R,N]=Object(r.useState)(null),[M,P]=Object(r.useState)(null),[L,B]=Object(r.useState)(""),U=L.toLowerCase().trim(),j=Object(r.useMemo)((()=>new Set(m.a.instance.getChildSpaces(t.roomId))),[t]),G=Object(r.useMemo)((()=>new Set(m.a.instance.getChildRooms(t.roomId))),[t]),[z,H,q]=Object(r.useMemo)((()=>{let e=C;if(U){e=new x.a(C,{keys:["name"],funcs:[e=>[e.getCanonicalAlias(),...e.getAltAliases()].filter(Boolean)],shouldMatchWordsOnly:!1}).match(U)}const n=t.getJoinRule();return Object(w.b)(e).reduce(((e,r)=>(r.isSpaceRoom()?r===t||j.has(r)||e[0].push(r):G.has(r)||(v.a.shared().getUserIdForRoomId(r.roomId)?"public"!==n&&e[2].push(r):e[1].push(r)),e)),[[],[],[]])}),[C,t,U,G,j]),V=async()=>{let e;P(null),N(0);for(const n of O){const r=Object(y.b)(n);try{await m.a.instance.addRoomToSpace(t,n.roomId,r).catch((async e=>{if("M_LIMIT_EXCEEDED"===e.errcode)return await Object(s.N)(e.data.retry_after_ms),void await m.a.instance.addRoomToSpace(t,n.roomId,r);throw e})),N((e=>e+1))}catch(t){c.a.error("Failed to add rooms to space",t),e=t;break}}e?P(e):f(!0)},$=null!==R;let K;if(M)K=i.a.createElement(i.a.Fragment,null,i.a.createElement("img",{src:n(394).default,height:"24",width:"24",alt:""}),i.a.createElement("span",{className:"mx_AddExistingToSpaceDialog_error"},i.a.createElement("div",{className:"mx_AddExistingToSpaceDialog_errorHeading"},Object(u.a)("Not all selected were added")),i.a.createElement("div",{className:"mx_AddExistingToSpaceDialog_errorCaption"},Object(u.a)("Try again"))),i.a.createElement(_.a,{className:"mx_AddExistingToSpaceDialog_retryButton",onClick:V},Object(u.a)("Retry")));else if($)K=i.a.createElement("span",null,i.a.createElement(T.a,{value:R,max:O.size}),i.a.createElement("div",{className:"mx_AddExistingToSpaceDialog_progressText"},Object(u.a)("Adding rooms... (%(progress)s out of %(count)s)",{count:O.size,progress:R})));else{let e=a;(!e||O.size>0)&&(e=i.a.createElement(_.a,{kind:"primary",disabled:O.size<1,onClick:V},Object(u.a)("Add"))),K=i.a.createElement(i.a.Fragment,null,i.a.createElement("span",null,o),e)}const W=$||M?null:(e,t)=>{e?O.add(t):O.delete(t),I(new Set(O))},Y=!g||h||d?0:z.length,Q=d?H.length:0,X=h?q.length:0;let Z=!0;(Y>0||Q>0||X>0)&&(Z=!1);const J=A(D,Q),ee=A(D,Y,Q),te=A(D,X,Y,Q);return i.a.createElement("div",{className:"mx_AddExistingToSpace"},i.a.createElement(p.a,{className:"mx_textinput_icon mx_textinput_search",placeholder:l,onSearch:B,autoFocus:!0}),i.a.createElement(b.a,{className:"mx_AddExistingToSpace_content",onScroll:()=>{var e;const t=null===(e=F.current)||void 0===e?void 0:e.containerRef.current;k({scrollTop:t.scrollTop,height:t.clientHeight})},wrappedRef:e=>{k({scrollTop:e.scrollTop,height:e.clientHeight})},ref:F},H.length>0&&d?d(H,O,J,W):void 0,z.length>0&&g?g(z,O,ee,W):null,q.length>0&&h?h(q,O,te,W):null,Z?i.a.createElement("span",{className:"mx_AddExistingToSpace_noResults"},Object(u.a)("No results")):void 0),i.a.createElement("div",{className:"mx_AddExistingToSpace_footer"},K))},N=e=>(t,n,r,o)=>{let{scrollTop:a,height:s}=r;return i.a.createElement("div",{className:"mx_AddExistingToSpace_section"},i.a.createElement("h3",null,Object(u.a)(e)),i.a.createElement(F.a,{itemHeight:D,items:t,scrollTop:a,height:s,renderItem:e=>i.a.createElement(I,{key:e.roomId,room:e,checked:n.has(e),onChange:o?t=>{o(t,e)}:null})}))},M=N(Object(u.c)("Rooms")),P=N(Object(u.c)("Spaces")),L=N(Object(u.c)("Direct Messages")),B=e=>{let{title:t,space:n,value:o,onChange:s}=e;const c=Object(r.useMemo)((()=>[n,...m.a.instance.getChildSpaces(n.roomId).filter((e=>e.currentState.maySendStateEvent(l.b.SpaceChild,e.client.credentials.userId)))]),[n]);let d;return d=c.length>1?i.a.createElement(h.a,{id:"mx_SpaceSelectDropdown",className:"mx_SpaceSelectDropdown",onOptionChange:e=>{s(c.find((t=>t.roomId===e))||n)},value:o.roomId,label:Object(u.a)("Space selection")},c.map((e=>{const t=a()({mx_SubspaceSelector_dropdownOptionActive:e===o});return i.a.createElement("div",{key:e.roomId,className:t},i.a.createElement(g.a,{room:e,width:24,height:24}),e.name||Object(f.b)(e)||e.roomId)}))):i.a.createElement("div",{className:"mx_SubspaceSelector_onlySpace"},n.name||Object(f.b)(n)||n.roomId),i.a.createElement("div",{className:"mx_SubspaceSelector"},i.a.createElement(g.a,{room:o,height:40,width:40}),i.a.createElement("div",null,i.a.createElement("h1",null,t),d))};t.d=e=>{let{space:t,onCreateRoomClick:n,onAddSubspaceClick:o,onFinished:a}=e;const[s,l]=Object(r.useState)(t);return i.a.createElement(d.a,{title:i.a.createElement(B,{title:Object(u.a)("Add existing rooms"),space:t,value:s,onChange:l}),className:"mx_AddExistingToSpaceDialog",contentId:"mx_AddExistingToSpace",onFinished:a,fixedWidth:!1},i.a.createElement(S.a.Provider,{value:t.client},i.a.createElement(R,{space:t,onFinished:a,footerPrompt:i.a.createElement(i.a.Fragment,null,i.a.createElement("div",null,Object(u.a)("Want to add a new room instead?")),i.a.createElement(_.a,{kind:"link",onClick:e=>{n(e),a()}},Object(u.a)("Create a new room"))),filterPlaceholder:Object(u.a)("Search for rooms"),roomsRenderer:M,spacesRenderer:()=>i.a.createElement("div",{className:"mx_AddExistingToSpace_section"},i.a.createElement("h3",null,Object(u.a)("Spaces")),i.a.createElement(_.a,{kind:"link",onClick:()=>{o(),a()}},Object(u.a)("Adding spaces has moved."))),dmsRenderer:L})))}},function(e,t,n){"use strict";n.r(t),n.d(t,"Icon",(function(){return a}));var r,i=n(120);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}function a(e){return i.createElement("svg",o({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",role:"presentation","aria-hidden":!0},e),r||(r=i.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm-.12 3.504c.84-.06 1.59.57 1.68 1.426v.24l-.48 6c-.045.555-.51.975-1.064.975h-.09a1.06 1.06 0 01-.975-.975l-.48-6a1.527 1.527 0 011.41-1.666zm.12 10.26a1.32 1.32 0 110 2.64 1.32 1.32 0 010-2.64z",fill:"#ff5b55"})))}t.default="img/element-icons/warning-badge.3cf4d1a.svg"},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r,i,o,a,s=n(120);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(this,arguments)}function c(e){return s.createElement("svg",l({fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 21.799 21.799",role:"presentation","aria-hidden":!0},e),r||(r=s.createElement("path",{d:"M19.189 3.086a1 1 0 00-1.58 1.226v.001l.001.001.014.018.063.087c.057.08.14.202.243.364.206.323.484.8.763 1.397.56 1.2 1.106 2.853 1.106 4.72 0 1.866-.546 3.519-1.106 4.72a12.36 12.36 0 01-.763 1.396 8.777 8.777 0 01-.306.45l-.014.019v.001l-.001.001a1 1 0 001.58 1.226l-.746-.58.746.58.002-.002.002-.004.009-.01.026-.036.09-.123c.074-.105.178-.256.3-.448.244-.384.566-.936.887-1.625.64-1.37 1.294-3.318 1.294-5.565 0-2.248-.654-4.195-1.294-5.566a14.368 14.368 0 00-.887-1.625 10.746 10.746 0 00-.39-.571l-.026-.035-.009-.011-.002-.004-.002-.001-.79.613z",fill:"currentColor"})),i||(i=s.createElement("path",{d:"M16.59 6.686a1 1 0 00-1.582 1.224l.003.005.025.034a5.67 5.67 0 01.458.802c.26.558.506 1.31.506 2.149 0 .838-.246 1.59-.506 2.148a5.66 5.66 0 01-.458.802l-.025.035-.003.004a1 1 0 001.581 1.225L15.8 14.5l.79.614.001-.003.002-.002.006-.008.017-.022.051-.07a7.7 7.7 0 00.64-1.114c.339-.729.693-1.776.693-2.995 0-1.22-.354-2.267-.694-2.995a7.689 7.689 0 00-.639-1.114 3.763 3.763 0 00-.051-.07l-.017-.023-.006-.007-.002-.003v-.001s-.002-.001-.79.613zM2.61 18.713a1 1 0 001.58-1.226v-.001l-.001-.001-.014-.018a8.711 8.711 0 01-.306-.45c-.206-.324-.484-.8-.763-1.398C2.546 14.42 2 12.766 2 10.9c0-1.866.546-3.519 1.106-4.72a12.36 12.36 0 01.762-1.396 8.721 8.721 0 01.307-.45l.014-.019v-.001l.001-.001a1 1 0 00-1.58-1.226l.746.58-.746-.58-.002.002-.002.004-.009.01-.026.036-.09.123c-.074.105-.178.256-.3.448-.244.384-.566.936-.887 1.625C.654 6.704 0 8.652 0 10.899c0 2.248.654 4.195 1.294 5.566.32.689.643 1.241.887 1.625a10.737 10.737 0 00.39.571l.026.035.009.011.002.004.002.001.79-.613z",fill:"currentColor"})),o||(o=s.createElement("path",{d:"M5.21 15.113a1 1 0 001.58-1.224l-.002-.005a3.866 3.866 0 01-.132-.195 5.669 5.669 0 01-.35-.641c-.261-.558-.507-1.31-.507-2.149 0-.838.246-1.59.506-2.148a5.68 5.68 0 01.458-.802 1.9 1.9 0 01.025-.035l.003-.004A1 1 0 005.21 6.685l.789.614-.79-.614-.001.003-.002.002-.006.008-.017.022a5.853 5.853 0 00-.216.316 7.679 7.679 0 00-.474.869c-.34.728-.694 1.775-.694 2.994 0 1.22.354 2.267.694 2.995a7.69 7.69 0 00.64 1.114c.02.03.037.053.05.07l.017.023.006.007.002.003v.001s.002.001.79-.613z",fill:"currentColor"})),a||(a=s.createElement("circle",{cx:11,cy:10.899,r:2,fill:"currentColor"})))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(13),i=n.n(r);class o{constructor(e,t){this.fn=e,this.onMarkCallback=t,i()(this,"marked",!1)}reset(){this.marked=!1}mark(){var e;this.marked||null===(e=this.onMarkCallback)||void 0===e||e.call(this),this.marked=!0}trigger(){this.marked&&(this.reset(),this.fn())}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(120);const i=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const[t,n]=Object(r.useState)(e);return[t,()=>{n(!t)},n]}},function(e,t,n){"use strict";var r=n(130),i=n.n(r),o=n(132),a=n.n(o),s=n(120),l=n.n(s),c=n(616);const u=["heading","description","children"];t.a=e=>{let{heading:t,description:n,children:r}=e,o=a()(e,u);return l.a.createElement("div",i()({},o,{className:"mx_SettingsSubsection"}),"string"==typeof t?l.a.createElement(c.a,{heading:t}):l.a.createElement(l.a.Fragment,null,t),!!n&&l.a.createElement("div",{className:"mx_SettingsSubsection_description"},n),l.a.createElement("div",{className:"mx_SettingsSubsection_content"},r))}},,,,,,function(e,t,n){"use strict";n.d(t,"b",(function(){return Te})),n.d(t,"a",(function(){return Ce})),n.d(t,"c",(function(){return xe}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(140),l=n(333),c=n(121),u=n(847),d=n(921),h=n(126),p=n.n(h),m=n(122),g=n(139),f=n(166),_=n(123),b=n(849),v=n(381),y=n(291);function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class w extends a.a.Component{constructor(e){super(e),i()(this,"avatarUpload",Object(o.createRef)()),i()(this,"uploadAvatar",(()=>{this.avatarUpload.current.click()})),i()(this,"removeAvatar",(()=>{this.avatarUpload.current.value="",this.setState({avatarUrl:null,avatarFile:null,profileFieldsTouched:S(S({},this.state.profileFieldsTouched),{},{avatar:!0})})})),i()(this,"isSaveEnabled",(()=>Boolean(Object.values(this.state.profileFieldsTouched).length))),i()(this,"cancelProfileChanges",(async e=>{e.stopPropagation(),e.preventDefault(),this.isSaveEnabled()&&this.setState({profileFieldsTouched:{},displayName:this.state.originalDisplayName,topic:this.state.originalTopic,avatarUrl:this.state.originalAvatarUrl,avatarFile:null})})),i()(this,"saveProfile",(async e=>{if(e.stopPropagation(),e.preventDefault(),!this.isSaveEnabled())return;this.setState({profileFieldsTouched:{}});const t=m.a.get(),n={},r=this.state.displayName.trim();if(this.state.originalDisplayName!==this.state.displayName&&(await t.setRoomName(this.props.roomId,r),n.originalDisplayName=r,n.displayName=r),this.state.avatarFile){const{content_uri:e}=await t.uploadContent(this.state.avatarFile);await t.sendStateEvent(this.props.roomId,"m.room.avatar",{url:e},""),n.avatarUrl=Object(f.b)(e).getSquareThumbnailHttp(96),n.originalAvatarUrl=n.avatarUrl,n.avatarFile=null}else this.state.originalAvatarUrl!==this.state.avatarUrl&&await t.sendStateEvent(this.props.roomId,"m.room.avatar",{},"");if(this.state.originalTopic!==this.state.topic){const e=Object(v.b)(this.state.topic,{forceHTML:!1});await t.setRoomTopic(this.props.roomId,this.state.topic,e),n.originalTopic=this.state.topic}this.setState(n)})),i()(this,"onDisplayNameChanged",(e=>{this.setState({displayName:e.target.value}),this.state.originalDisplayName===e.target.value?this.setState({profileFieldsTouched:S(S({},this.state.profileFieldsTouched),{},{name:!1})}):this.setState({profileFieldsTouched:S(S({},this.state.profileFieldsTouched),{},{name:!0})})})),i()(this,"onTopicChanged",(e=>{this.setState({topic:e.target.value}),this.state.originalTopic===e.target.value?this.setState({profileFieldsTouched:S(S({},this.state.profileFieldsTouched),{},{topic:!1})}):this.setState({profileFieldsTouched:S(S({},this.state.profileFieldsTouched),{},{topic:!0})})})),i()(this,"onAvatarChanged",(e=>{if(!e.target.files||!e.target.files.length)return void this.setState({avatarUrl:this.state.originalAvatarUrl,avatarFile:null,profileFieldsTouched:S(S({},this.state.profileFieldsTouched),{},{avatar:!1})});const t=e.target.files[0],n=new FileReader;n.onload=e=>{this.setState({avatarUrl:String(e.target.result),avatarFile:t,profileFieldsTouched:S(S({},this.state.profileFieldsTouched),{},{avatar:!0})})},n.readAsDataURL(t)}));const t=m.a.get(),n=t.getRoom(e.roomId);if(!n)throw new Error(`Expected a room for ID: ${e.roomId}`);const r=n.currentState.getStateEvents("m.room.avatar","");let a=r&&r.getContent()?r.getContent().url:null;a&&(a=Object(f.b)(a).getSquareThumbnailHttp(96));const s=n.currentState.getStateEvents("m.room.topic",""),l=s&&s.getContent()?s.getContent().topic:"",c=n.currentState.getStateEvents("m.room.name",""),u=c&&c.getContent()?c.getContent().name:"";this.state={originalDisplayName:u,displayName:u,originalAvatarUrl:a,avatarUrl:a,avatarFile:null,originalTopic:l,topic:l,profileFieldsTouched:{},canSetName:n.currentState.maySendStateEvent("m.room.name",t.getUserId()),canSetTopic:n.currentState.maySendStateEvent("m.room.topic",t.getUserId()),canSetAvatar:n.currentState.maySendStateEvent("m.room.avatar",t.getUserId())}}render(){let e;return(this.state.canSetName||this.state.canSetTopic||this.state.canSetAvatar)&&(e=a.a.createElement("div",{className:"mx_ProfileSettings_buttons"},a.a.createElement(_.a,{onClick:this.cancelProfileChanges,kind:"link",disabled:!this.isSaveEnabled()},Object(c.a)("Cancel")),a.a.createElement(_.a,{onClick:this.saveProfile,kind:"primary",disabled:!this.isSaveEnabled()},Object(c.a)("Save")))),a.a.createElement("form",{onSubmit:this.saveProfile,autoComplete:"off",noValidate:!0,className:"mx_ProfileSettings"},a.a.createElement("input",{type:"file",ref:this.avatarUpload,className:"mx_ProfileSettings_avatarUpload",onClick:y.a,onChange:this.onAvatarChanged,accept:"image/*"}),a.a.createElement("div",{className:"mx_ProfileSettings_profile"},a.a.createElement("div",{className:"mx_ProfileSettings_profile_controls"},a.a.createElement(g.a,{label:Object(c.a)("Room Name"),type:"text",value:this.state.displayName,autoComplete:"off",onChange:this.onDisplayNameChanged,disabled:!this.state.canSetName}),a.a.createElement(g.a,{className:p()("mx_ProfileSettings_profile_controls_topic","mx_ProfileSettings_profile_controls_topic--room"),id:"profileTopic",label:Object(c.a)("Room Topic"),disabled:!this.state.canSetTopic,type:"text",value:this.state.topic,autoComplete:"off",onChange:this.onTopicChanged,element:"textarea"})),a.a.createElement(b.a,{avatarUrl:this.state.avatarUrl,avatarName:this.state.displayName||this.props.roomId,avatarAltText:Object(c.a)("Room avatar"),uploadAvatar:this.state.canSetAvatar?this.uploadAvatar:void 0,removeAvatar:this.state.canSetAvatar?this.removeAvatar:void 0})),e)}}var T=n(124),C=n(133),x=n(125),F=n(156),D=n(128),k=n(137),O=n(229),I=n(341);class A extends a.a.Component{constructor(){super(...arguments),i()(this,"onClickUserSettings",(e=>{e.preventDefault(),e.stopPropagation(),T.a.fire(D.a.ViewUserSettings)}))}render(){const e=this.props.room.roomId,t=m.a.get().isRoomEncrypted(e);let n,r;if(t)n=Object(c.a)("In encrypted rooms, like this one, URL previews are disabled by default to ensure that your homeserver (where the previews are generated) cannot gather information about links you see in this room.");else{if(n=x.b.getValueAt(k.a.ACCOUNT,"urlPreviewsEnabled")?Object(c.a)("You have <a>enabled</a> URL previews by default.",{},{a:e=>a.a.createElement(_.a,{kind:"link_inline",onClick:this.onClickUserSettings},e)}):Object(c.a)("You have <a>disabled</a> URL previews by default.",{},{a:e=>a.a.createElement(_.a,{kind:"link_inline",onClick:this.onClickUserSettings},e)}),x.b.canSetValue("urlPreviewsEnabled",e,k.a.ROOM))r=a.a.createElement("label",null,a.a.createElement(O.a,{name:"urlPreviewsEnabled",level:k.a.ROOM,roomId:e,isExplicit:!0}));else{let t=Object(c.c)("URL previews are enabled by default for participants in this room.");x.b.getValueAt(k.a.ROOM,"urlPreviewsEnabled",e,!0)||(t=Object(c.c)("URL previews are disabled by default for participants in this room.")),r=a.a.createElement("label",null,Object(c.a)(t))}}const i=a.a.createElement(O.a,{name:t?"urlPreviewsEnabled_e2ee":"urlPreviewsEnabled",level:k.a.ROOM_ACCOUNT,roomId:e}),o=a.a.createElement(a.a.Fragment,null,a.a.createElement("p",null,Object(c.a)("When someone puts a URL in their message, a URL preview can be shown to give more information about that link such as the title, description, and an image from the website.")),a.a.createElement("p",null,n));return a.a.createElement(I.a,{legend:Object(c.a)("URL Previews"),description:o},r,a.a.createElement("label",null,i))}}var R=n(923),N=n(159);class M extends a.a.Component{constructor(e,t){super(e,t),i()(this,"context",void 0),i()(this,"onLeaveClick",(e=>{T.a.dispatch({action:"leave_room",room_id:this.props.roomId}),N.b.trackInteraction("WebRoomSettingsLeaveButton",e)})),this.state={isRoomPublished:!1}}render(){var e;const t=this.context,n=t.getRoom(this.props.roomId),r=null==n?void 0:n.currentState.mayClientSendStateEvent("m.room.canonical_alias",t),i=null!==(e=null==n?void 0:n.currentState.getStateEvents("m.room.canonical_alias",""))&&void 0!==e?e:void 0,o=n&&x.b.getValue(F.b.URLPreviews)?a.a.createElement(A,{room:n}):null;let s;return"join"===(null==n?void 0:n.getMyMembership())&&(s=a.a.createElement(a.a.Fragment,null,a.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(c.a)("Leave room")),a.a.createElement("div",{className:"mx_SettingsTab_section"},a.a.createElement(_.a,{kind:"danger",onClick:this.onLeaveClick},Object(c.a)("Leave room"))))),a.a.createElement("div",{className:"mx_SettingsTab mx_GeneralRoomSettingsTab"},a.a.createElement("div",{className:"mx_SettingsTab_heading"},Object(c.a)("General")),a.a.createElement("div",{className:"mx_SettingsTab_section mx_GeneralRoomSettingsTab_profileSection"},a.a.createElement(w,{roomId:this.props.roomId})),a.a.createElement("div",{className:"mx_SettingsTab_heading"},Object(c.a)("Room Addresses")),a.a.createElement(R.a,{roomId:this.props.roomId,canSetCanonicalAlias:r,canSetAliases:!0,canonicalAliasEvent:i}),a.a.createElement("div",{className:"mx_SettingsTab_heading"},Object(c.a)("Other")),o,s)}}i()(M,"contextType",C.a);var P=n(160),L=n(151),B=n(129),U=n(1),j=n(602),G=n(235),z=n(127),H=n(155),q=n(335),V=n(219),$=n(588),K=n(937),W=n(144),Y=n(130),Q=n.n(Y),X=n(132),Z=n.n(X);const J=["children","className"];var ee=e=>{let{children:t,className:n}=e,r=Z()(e,J);return a.a.createElement("a",Q()({target:"_blank",rel:"noreferrer noopener"},r,{className:p()("mx_ExternalLink",n)}),t,a.a.createElement("i",{className:"mx_ExternalLink_icon"}))};class te extends a.a.Component{constructor(e,t){var n;super(e,t),i()(this,"context",void 0),i()(this,"onStateEvent",(e=>{[B.b.RoomJoinRules,B.b.RoomGuestAccess,B.b.RoomHistoryVisibility,B.b.RoomEncryption].includes(e.getType())&&this.forceUpdate()})),i()(this,"onEncryptionChange",(async()=>{var e;if((null===(e=this.context.getRoom(this.props.roomId))||void 0===e?void 0:e.getJoinRule())===P.c.Public){const e=z.b.createDialog(H.a,{title:Object(c.a)("Are you sure you want to add encryption to this public room?"),description:a.a.createElement("div",null,a.a.createElement("p",null," ",Object(c.a)("<b>It's not recommended to add encryption to public rooms.</b> Anyone can find and join public rooms, so anyone can read messages in them. You'll get none of the benefits of encryption, and you won't be able to turn it off later. Encrypting messages in a public room will make receiving and sending messages slower.",void 0,{b:e=>a.a.createElement("b",null,e)})," "),a.a.createElement("p",null," ",Object(c.a)("To avoid these issues, create a <a>new encrypted room</a> for the conversation you plan to have.",void 0,{a:t=>a.a.createElement(_.a,{kind:"link_inline",onClick:()=>{e.close(),this.createNewRoom(!1,!0)}}," ",t," ")})," "))}),{finished:t}=e,[n]=await t;if(!n)return}z.b.createDialog(H.a,{title:Object(c.a)("Enable encryption?"),description:Object(c.a)("Once enabled, encryption for a room cannot be disabled. Messages sent in an encrypted room cannot be seen by the server, only by the participants of the room. Enabling encryption may prevent many bots and bridges from working correctly. <a>Learn more about encryption.</a>",{},{a:e=>a.a.createElement(ee,{href:"https://element.io/help#encryption"},e)}),onFinished:e=>{if(!e)return void this.setState({encrypted:!1});const t=this.state.encrypted;this.setState({encrypted:!0}),this.context.sendStateEvent(this.props.roomId,B.b.RoomEncryption,{algorithm:"m.megolm.v1.aes-sha2"}).catch((e=>{U.a.error(e),this.setState({encrypted:t})}))}})})),i()(this,"onGuestAccessChange",(e=>{const t=e?P.a.CanJoin:P.a.Forbidden,n=this.state.guestAccess;n!==t&&(this.setState({guestAccess:t}),this.context.sendStateEvent(this.props.roomId,B.b.RoomGuestAccess,{guest_access:t},"").catch((e=>{U.a.error(e),this.setState({guestAccess:n})})))})),i()(this,"createNewRoom",(async(e,t)=>{const n=z.b.createDialog($.a,{defaultPublic:e,defaultEncrypted:t});N.b.trackInteraction("WebRoomSettingsSecurityTabCreateNewRoomButton");const[r,i]=await n.finished;return r&&await Object(V.b)(i),r})),i()(this,"onHistoryRadioToggle",(e=>{const t=this.state.history;t!==e&&(this.setState({history:e}),this.context.sendStateEvent(this.props.roomId,B.b.RoomHistoryVisibility,{history_visibility:e},"").catch((e=>{U.a.error(e),this.setState({history:t})})))})),i()(this,"updateBlacklistDevicesFlag",(e=>{var t;null===(t=this.context.getRoom(this.props.roomId))||void 0===t||t.setBlacklistUnverifiedDevices(e)})),i()(this,"onJoinRuleChangeError",(e=>{var t;z.b.createDialog(W.a,{title:Object(c.a)("Failed to update the join rules"),description:null!==(t=e.message)&&void 0!==t?t:Object(c.a)("Unknown failure")})})),i()(this,"onBeforeJoinRuleChange",(async e=>{if(this.state.encrypted&&e===P.c.Public){const e=z.b.createDialog(H.a,{title:Object(c.a)("Are you sure you want to make this encrypted room public?"),description:a.a.createElement("div",null,a.a.createElement("p",null," ",Object(c.a)("<b>It's not recommended to make encrypted rooms public.</b> It will mean anyone can find and join the room, so anyone can read messages. You'll get none of the benefits of encryption. Encrypting messages in a public room will make receiving and sending messages slower.",void 0,{b:e=>a.a.createElement("b",null,e)})," "),a.a.createElement("p",null," ",Object(c.a)("To avoid these issues, create a <a>new public room</a> for the conversation you plan to have.",void 0,{a:t=>a.a.createElement(_.a,{kind:"link_inline",onClick:()=>{e.close(),this.createNewRoom(!0,!1)}}," ",t," ")})," "))}),{finished:t}=e,[n]=await t;if(!n)return!1}return!0})),i()(this,"toggleAdvancedSection",(()=>{this.setState({showAdvancedSection:!this.state.showAdvancedSection})}));const r=null===(n=t.getRoom(this.props.roomId))||void 0===n?void 0:n.currentState;this.state={guestAccess:this.pullContentPropertyFromEvent(null==r?void 0:r.getStateEvents(B.b.RoomGuestAccess,""),"guest_access",P.a.Forbidden),history:this.pullContentPropertyFromEvent(null==r?void 0:r.getStateEvents(B.b.RoomHistoryVisibility,""),"history_visibility",P.b.Shared),hasAliases:!1,encrypted:t.isRoomEncrypted(this.props.roomId),showAdvancedSection:!1}}componentDidMount(){this.context.on(L.b.Events,this.onStateEvent),this.hasAliases().then((e=>this.setState({hasAliases:e})))}pullContentPropertyFromEvent(e,t,n){return(null==e?void 0:e.getContent()[t])||n}componentWillUnmount(){this.context.removeListener(L.b.Events,this.onStateEvent)}async hasAliases(){const e=this.context,t=(await e.getLocalAliases(this.props.roomId)).aliases;return Array.isArray(t)&&0!==t.length}renderJoinRule(){const e=this.context.getRoom(this.props.roomId);let t;(null==e?void 0:e.getJoinRule())!==P.c.Public||this.state.hasAliases||(t=a.a.createElement("div",{className:"mx_SecurityRoomSettingsTab_warning"},a.a.createElement(j.Icon,{width:15,height:15}),a.a.createElement("span",null,Object(c.a)("To link to this room, please add an address."))));const n=Object(c.a)("Decide who can join %(roomName)s.",{roomName:null==e?void 0:e.name});return a.a.createElement(I.a,{legend:Object(c.a)("Access"),description:n},a.a.createElement(K.a,{room:e,beforeChange:this.onBeforeJoinRuleChange,onError:this.onJoinRuleChangeError,closeSettingsFn:this.props.closeSettingsFn,promptUpgrade:!0,aliasWarning:t}))}renderHistory(){var e;if(!x.b.getValue(F.b.RoomHistorySettings))return null;const t=this.context,n=this.state.history,r=null===(e=t.getRoom(this.props.roomId))||void 0===e?void 0:e.currentState,i=null==r?void 0:r.mayClientSendStateEvent(B.b.RoomHistoryVisibility,t),o=[{value:P.b.Shared,label:Object(c.a)("Members only (since the point in time of selecting this option)")},{value:P.b.Invited,label:Object(c.a)("Members only (since they were invited)")},{value:P.b.Joined,label:Object(c.a)("Members only (since they joined)")}];this.state.encrypted&&n!==P.b.WorldReadable||o.unshift({value:P.b.WorldReadable,label:Object(c.a)("Anyone")});const s=Object(c.a)("Changes to who can read history will only apply to future messages in this room. The visibility of existing history will be unchanged.");return a.a.createElement(I.a,{legend:Object(c.a)("Who can read history?"),description:s},a.a.createElement(q.a,{name:"historyVis",value:n,onChange:this.onHistoryRadioToggle,disabled:!i,definitions:o}))}renderAdvanced(){var e;const t=this.context,n=this.state.guestAccess,r=null===(e=t.getRoom(this.props.roomId))||void 0===e?void 0:e.currentState,i=null==r?void 0:r.mayClientSendStateEvent(B.b.RoomGuestAccess,t);return a.a.createElement(a.a.Fragment,null,a.a.createElement(G.a,{value:n===P.a.CanJoin,onChange:this.onGuestAccessChange,disabled:!i,label:Object(c.a)("Enable guest access")}),a.a.createElement("p",null,Object(c.a)("People with supported clients will be able to join the room without having a registered account.")))}render(){const e=this.context,t=e.getRoom(this.props.roomId),n=this.state.encrypted,r=null==t?void 0:t.currentState.mayClientSendStateEvent(B.b.RoomEncryption,e),i=!n&&r;let o;n&&x.b.isEnabled("blacklistUnverifiedDevices")&&(o=a.a.createElement(O.a,{name:"blacklistUnverifiedDevices",level:k.a.ROOM_DEVICE,onChange:this.updateBlacklistDevicesFlag,roomId:this.props.roomId}));const s=this.renderHistory();let l;return(null==t?void 0:t.getJoinRule())===P.c.Public&&(l=a.a.createElement("div",{className:"mx_SettingsTab_section"},a.a.createElement(_.a,{onClick:this.toggleAdvancedSection,kind:"link",className:"mx_SettingsTab_showAdvanced"},this.state.showAdvancedSection?Object(c.a)("Hide advanced"):Object(c.a)("Show advanced")),this.state.showAdvancedSection&&this.renderAdvanced())),a.a.createElement("div",{className:"mx_SettingsTab mx_SecurityRoomSettingsTab"},a.a.createElement("div",{className:"mx_SettingsTab_heading"},Object(c.a)("Security & Privacy")),a.a.createElement(I.a,{legend:Object(c.a)("Encryption"),description:Object(c.a)("Once enabled, encryption cannot be disabled.")},a.a.createElement(G.a,{value:n,onChange:this.onEncryptionChange,label:Object(c.a)("Encrypted"),disabled:!i}),o),this.renderJoinRule(),l,s)}}i()(te,"contextType",C.a);var ne=n(274),re=n(491),ie=n(264),oe=n(214);class ae extends a.a.Component{constructor(e,t){super(e,t),i()(this,"roomProps",void 0),i()(this,"soundUpload",Object(o.createRef)()),i()(this,"context",void 0),i()(this,"triggerUploader",(async e=>{var t;e.stopPropagation(),e.preventDefault(),null===(t=this.soundUpload.current)||void 0===t||t.click()})),i()(this,"onSoundUploadChanged",(e=>{if(!e.target.files||!e.target.files.length)return void this.setState({uploadedFile:null});const t=e.target.files[0];this.setState({uploadedFile:t})})),i()(this,"onClickSaveSound",(async e=>{e.stopPropagation(),e.preventDefault();try{await this.saveSound()}catch(e){U.a.error(`Unable to save notification sound for ${this.props.roomId}`),U.a.error(e)}})),i()(this,"clearSound",(e=>{e.stopPropagation(),e.preventDefault(),x.b.setValue("notificationSound",this.props.roomId,k.a.ROOM_ACCOUNT,null),this.setState({currentSound:"default"})})),i()(this,"onRoomNotificationChange",(e=>{this.roomProps.notificationVolume=e,this.forceUpdate()})),i()(this,"onOpenSettingsClick",(e=>{e.preventDefault(),this.props.closeSettingsFn(),T.a.dispatch({action:D.a.ViewUserSettings,initialTabId:oe.a.Notifications})})),this.roomProps=re.a.forRoom(t.getRoom(this.props.roomId));let n="default";const r=ne.default.getSoundForRoom(this.props.roomId);r&&(n=r.name||r.url),this.state={currentSound:n,uploadedFile:null}}async saveSound(){if(!this.state.uploadedFile)return;let e=this.state.uploadedFile.type;"video/ogg"===e&&(e="audio/ogg");const{content_uri:t}=await m.a.get().uploadContent(this.state.uploadedFile,{type:e});await x.b.setValue("notificationSound",this.props.roomId,k.a.ROOM_ACCOUNT,{name:this.state.uploadedFile.name,type:e,size:this.state.uploadedFile.size,url:t}),this.setState({uploadedFile:null,currentSound:this.state.uploadedFile.name})}render(){let e;return this.state.uploadedFile&&(e=a.a.createElement("div",null,a.a.createElement("span",null,Object(c.a)("Uploaded sound"),": ",a.a.createElement("code",null,this.state.uploadedFile.name)))),a.a.createElement("div",{className:"mx_SettingsTab"},a.a.createElement("div",{className:"mx_SettingsTab_heading"},Object(c.a)("Notifications")),a.a.createElement("div",{className:"mx_SettingsTab_section mx_NotificationSettingsTab_notificationsSection"},a.a.createElement(q.a,{name:"roomNotificationSetting",definitions:[{value:ie.a.AllMessages,className:"mx_NotificationSettingsTab_defaultEntry",label:a.a.createElement(a.a.Fragment,null,Object(c.a)("Default"),a.a.createElement("div",{className:"mx_NotificationSettingsTab_microCopy"},Object(c.a)("Get notifications as set up in your <a>settings</a>",{},{a:e=>a.a.createElement(_.a,{kind:"link_inline",onClick:this.onOpenSettingsClick},e)})))},{value:ie.a.AllMessagesLoud,className:"mx_NotificationSettingsTab_allMessagesEntry",label:a.a.createElement(a.a.Fragment,null,Object(c.a)("All messages"),a.a.createElement("div",{className:"mx_NotificationSettingsTab_microCopy"},Object(c.a)("Get notified for every message")))},{value:ie.a.MentionsOnly,className:"mx_NotificationSettingsTab_mentionsKeywordsEntry",label:a.a.createElement(a.a.Fragment,null,Object(c.a)("@mentions & keywords"),a.a.createElement("div",{className:"mx_NotificationSettingsTab_microCopy"},Object(c.a)("Get notified only with mentions and keywords as set up in your <a>settings</a>",{},{a:e=>a.a.createElement(_.a,{kind:"link_inline",onClick:this.onOpenSettingsClick},e)})))},{value:ie.a.Mute,className:"mx_NotificationSettingsTab_noneEntry",label:a.a.createElement(a.a.Fragment,null,Object(c.a)("Off"),a.a.createElement("div",{className:"mx_NotificationSettingsTab_microCopy"},Object(c.a)("You won't get any notifications")))}],onChange:this.onRoomNotificationChange,value:this.roomProps.notificationVolume})),a.a.createElement("div",{className:"mx_SettingsTab_section mx_SettingsTab_subsectionText"},a.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(c.a)("Sounds")),a.a.createElement("div",null,a.a.createElement("div",{className:"mx_SettingsTab_subsectionText"},a.a.createElement("span",null,Object(c.a)("Notification sound"),": ",a.a.createElement("code",null,this.state.currentSound))),a.a.createElement(_.a,{className:"mx_NotificationSound_resetSound",disabled:"default"==this.state.currentSound,onClick:this.clearSound,kind:"primary"},Object(c.a)("Reset"))),a.a.createElement("div",null,a.a.createElement("h3",null,Object(c.a)("Set a new custom sound")),a.a.createElement("div",{className:"mx_SettingsFlag"},a.a.createElement("form",{autoComplete:"off",noValidate:!0},a.a.createElement("input",{ref:this.soundUpload,className:"mx_NotificationSound_soundUpload",type:"file",onClick:y.a,onChange:this.onSoundUploadChanged,accept:"audio/*"})),e),a.a.createElement(_.a,{className:"mx_NotificationSound_browse",onClick:this.triggerUploader,kind:"primary"},Object(c.a)("Browse")),a.a.createElement(_.a,{className:"mx_NotificationSound_save",disabled:null==this.state.uploadedFile,onClick:this.onClickSaveSound,kind:"primary"},Object(c.a)("Save")),a.a.createElement("br",null))))}}i()(ae,"contextType",C.a);var se=n(551),le=n(168),ce=n(191),ue=n(196);class de extends a.a.PureComponent{render(){var e,t;const n=this.props.ev.getContent();if(null===(e=n.channel)||void 0===e||!e.id||null===(t=n.protocol)||void 0===t||!t.id)return U.a.warn(`Bridge info event ${this.props.ev.getId()} has missing content. Tile will not render`),null;n.bridgebot||(U.a.warn(`Bridge info event ${this.props.ev.getId()} does not provide a 'bridgebot' key whichis deprecated behaviour. Using sender for now.`),n.bridgebot=this.props.ev.getSender());const{channel:r,network:i,protocol:o}=n,s=o.displayname||o.id,l=r.displayname||r.id;let u;n.creator&&(u=a.a.createElement("li",null,Object(c.a)("This bridge was provisioned by <user />.",{},{user:()=>a.a.createElement(se.b,{type:se.a.UserMention,room:this.props.room,url:Object(le.i)(n.creator),shouldShowPillAvatar:x.b.getValue("Pill.shouldShowPillAvatar")})})));const d=a.a.createElement("li",null,Object(c.a)("This bridge is managed by <user />.",{},{user:()=>a.a.createElement(se.b,{type:se.a.UserMention,room:this.props.room,url:Object(le.i)(n.bridgebot),shouldShowPillAvatar:x.b.getValue("Pill.shouldShowPillAvatar")})}));let h,p;if(o.avatar_url){var m;const e=null!==(m=Object(f.b)(o.avatar_url).getSquareThumbnailHttp(64))&&void 0!==m?m:void 0;h=a.a.createElement(ce.a,{className:"mx_RoomSettingsDialog_protocolIcon",width:48,height:48,resizeMethod:"crop",name:s,idName:s,url:e})}else h=a.a.createElement("div",{className:"mx_RoomSettingsDialog_noProtocolIcon"});if(i){const e=i.displayname||i.id;let t=a.a.createElement("span",null,e);"string"==typeof i.external_url&&Object(ue.f)(i.external_url)&&(t=a.a.createElement("a",{href:i.external_url,target:"_blank",rel:"noreferrer noopener"},e)),p=Object(c.a)("Workspace: <networkLink/>",{},{networkLink:()=>t})}let g=a.a.createElement("span",null,l);"string"==typeof r.external_url&&Object(ue.f)(r.external_url)&&(g=a.a.createElement("a",{href:r.external_url,target:"_blank",rel:"noreferrer noopener"},l));const _=this.props.ev.getId();return a.a.createElement("li",{key:_,className:"mx_RoomSettingsDialog_BridgeList_listItem"},a.a.createElement("div",{className:"mx_RoomSettingsDialog_column_icon"},h),a.a.createElement("div",{className:"mx_RoomSettingsDialog_column_data"},a.a.createElement("h3",{className:"mx_RoomSettingsDialog_column_data_protocolName"},s),a.a.createElement("p",{className:"mx_RoomSettingsDialog_column_data_details mx_RoomSettingsDialog_workspace_channel_details"},p,a.a.createElement("span",{className:"mx_RoomSettingsDialog_channel"},Object(c.a)("Channel: <channelLink/>",{},{channelLink:()=>g}))),a.a.createElement("ul",{className:"mx_RoomSettingsDialog_column_data_metadata mx_RoomSettingsDialog_metadata"},u," ",d)))}}const he=["uk.half-shot.bridge"],pe="https://matrix.org/bridges/";class me extends a.a.Component{renderBridgeCard(e,t){const n=e.getContent();return t&&null!=n&&n.channel&&n.protocol?a.a.createElement(de,{key:e.getId(),room:t,ev:e}):null}static getBridgeStateEvents(e){var t;const n=null===(t=m.a.get().getRoom(e))||void 0===t?void 0:t.currentState;return n?he.map((e=>n.getStateEvents(e))).flat(1):[]}render(){const e=me.getBridgeStateEvents(this.props.roomId),t=m.a.get().getRoom(this.props.roomId);let n;return n=e.length>0?a.a.createElement("div",null,a.a.createElement("p",null,Object(c.a)("This room is bridging messages to the following platforms. <a>Learn more.</a>",{},{a:e=>a.a.createElement("a",{href:pe,target:"_blank",rel:"noreferrer noopener"},e)})),a.a.createElement("ul",{className:"mx_RoomSettingsDialog_BridgeList"},e.map((e=>this.renderBridgeCard(e,t))))):a.a.createElement("p",null,Object(c.a)("This room isn't bridging messages to any platforms. <a>Learn more.</a>",{},{a:e=>a.a.createElement("a",{href:pe,target:"_blank",rel:"noreferrer noopener"},e)})),a.a.createElement("div",{className:"mx_SettingsTab"},a.a.createElement("div",{className:"mx_SettingsTab_heading"},Object(c.a)("Bridges")),a.a.createElement("div",{className:"mx_SettingsTab_section mx_SettingsTab_subsectionText"},n))}}var ge=n(135),fe=n(398),_e=n(851),be=n(203),ve=n(309),ye=n(131);function Ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const Se=e=>{var t;let{roomId:n}=e;const r=Object(o.useMemo)((()=>m.a.get().getRoom(n)),[n]),s=Object(o.useMemo)((()=>r.getJoinRule()===P.c.Public),[r]),[l,u,d]=Object(ve.a)(r,Object(o.useCallback)((e=>{var t,n;const r=null==e||null===(t=e.getStateEvents(B.b.RoomPowerLevels,""))||void 0===t?void 0:t.getContent();return[null!=r?r:{},null!==(n=null==r?void 0:r.events)&&void 0!==n?n:{},null==e?void 0:e.maySendStateEvent(B.b.RoomPowerLevels,m.a.get().getUserId())]}),[])),[h,p]=Object(o.useState)((()=>0===u[be.d.MEMBER_EVENT_TYPE.name])),g=Object(o.useCallback)((e=>{if(p(e),e){var t,r,o;const e=null!==(t=null!==(r=u[B.b.RoomMessage])&&void 0!==r?r:l.users_default)&&void 0!==t?t:0,n=null!==(o=l.kick)&&void 0!==o?o:50;u[be.d.CALL_EVENT_TYPE.name]=s?n:e,u[be.d.MEMBER_EVENT_TYPE.name]=e}else{var a,c;const e=null!==(a=null!==(c=u[B.b.RoomPowerLevels])&&void 0!==c?c:l.state_default)&&void 0!==a?a:100;u[be.d.CALL_EVENT_TYPE.name]=e,u[be.d.MEMBER_EVENT_TYPE.name]=e}m.a.get().sendStateEvent(n,B.b.RoomPowerLevels,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ee(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({events:u},l))}),[n,l,u,s]),f=null!==(t=ye.b.get("element_call").brand)&&void 0!==t?t:ye.a.element_call.brand;return a.a.createElement(G.a,{"data-testid":"element-call-switch",label:Object(c.a)("Enable %(brand)s as an additional calling option in this room",{brand:f}),caption:Object(c.a)("%(brand)s is end-to-end encrypted, but is currently limited to smaller numbers of users.",{brand:f}),value:h,onChange:g,disabled:!d,tooltip:Object(c.a)("You do not have sufficient permissions to change this.")})},we=e=>{let{roomId:t}=e;return a.a.createElement(_e.a,{heading:Object(c.a)("Voice & Video")},a.a.createElement(fe.a,{heading:Object(c.a)("Call type")},a.a.createElement(Se,{roomId:t})))},Te="ROOM_SECURITY_TAB",Ce="ROOM_NOTIFICATIONS_TAB";class xe extends a.a.Component{constructor(e){super(e),i()(this,"dispatcherRef",void 0),i()(this,"onAction",(e=>{e.action===D.a.ViewHomePage&&this.props.onFinished(!0)})),i()(this,"onRoomName",(()=>{this.setState({roomName:m.a.get().getRoom(this.props.roomId).name})})),this.state={roomName:""}}componentDidMount(){this.dispatcherRef=T.a.register(this.onAction),m.a.get().on(s.d.Name,this.onRoomName),this.onRoomName()}componentWillUnmount(){this.dispatcherRef&&T.a.unregister(this.dispatcherRef),m.a.get().removeListener(s.d.Name,this.onRoomName)}getTabs(){const e=[];return e.push(new l.a("ROOM_GENERAL_TAB",Object(c.c)("General"),"mx_RoomSettingsDialog_settingsIcon",a.a.createElement(M,{roomId:this.props.roomId}),"RoomSettingsGeneral")),x.b.getValue("feature_group_calls")&&e.push(new l.a("ROOM_VOIP_TAB",Object(c.c)("Voice & Video"),"mx_RoomSettingsDialog_voiceIcon",a.a.createElement(we,{roomId:this.props.roomId}))),e.push(new l.a(Te,Object(c.c)("Security & Privacy"),"mx_RoomSettingsDialog_securityIcon",a.a.createElement(te,{roomId:this.props.roomId,closeSettingsFn:()=>this.props.onFinished(!0)}),"RoomSettingsSecurityPrivacy")),e.push(new l.a("ROOM_ROLES_TAB",Object(c.c)("Roles & Permissions"),"mx_RoomSettingsDialog_rolesIcon",a.a.createElement(d.a,{roomId:this.props.roomId}),"RoomSettingsRolesPermissions")),e.push(new l.a(Ce,Object(c.c)("Notifications"),"mx_RoomSettingsDialog_notificationsIcon",a.a.createElement(ae,{roomId:this.props.roomId,closeSettingsFn:()=>this.props.onFinished(!0)}),"RoomSettingsNotifications")),x.b.getValue("feature_bridge_state")&&e.push(new l.a("ROOM_BRIDGES_TAB",Object(c.c)("Bridges"),"mx_RoomSettingsDialog_bridgesIcon",a.a.createElement(me,{roomId:this.props.roomId}),"RoomSettingsBridges")),x.b.getValue(F.b.AdvancedSettings)&&e.push(new l.a("ROOM_ADVANCED_TAB",Object(c.c)("Advanced"),"mx_RoomSettingsDialog_warningIcon",a.a.createElement(u.a,{roomId:this.props.roomId,closeSettingsFn:()=>this.props.onFinished(!0)}),"RoomSettingsAdvanced")),e}render(){const e=this.state.roomName;return a.a.createElement(ge.a,{className:"mx_RoomSettingsDialog",hasCancel:!0,onFinished:this.props.onFinished,title:Object(c.a)("Room Settings - %(roomName)s",{roomName:e})},a.a.createElement("div",{className:"mx_SettingsDialog_content"},a.a.createElement(l.c,{tabs:this.getTabs(),initialTabId:this.props.initialTabId,screenName:"RoomSettings"})))}}},function(e,t,n){"use strict";n.d(t,"e",(function(){return S})),n.d(t,"c",(function(){return w})),n.d(t,"a",(function(){return C})),n.d(t,"b",(function(){return x})),n.d(t,"d",(function(){return F}));var r=n(13),i=n.n(r),o=n(147),a=n(1),s=n(219),l=n(128),c=n(124),u=n(297),d=n(270),h=n(164),p=n(305);var m=n(307),g=n(199),f=n(136);var _=n(217),b=n(434);async function v(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=t.map((e=>e.userId));let i;var o;1===r.length?i=Object(p.a)(e,r[0]):i=null!==(o=h.a.shared().getDMRoomForIdentifiers(r))&&void 0!==o?o:void 0;if(i&&!Object(_.a)(i))return c.a.dispatch({action:l.a.ViewRoom,room_id:i.roomId,should_peek:!1,joining:!1,metricsTrigger:"MessageUser"}),Promise.resolve(i.roomId);const a={inlineErrors:!0};await F(e,t)&&(a.encryption=!0);const u=1===r.length&&r[0]===e.getUserId();return 1!==r.length||u||(a.dmUserId=r[0]),r.length>1&&(a.createOpts=r.reduce(((t,n)=>{const r=Object(b.b)(n);if("email"===r){const r={id_server:e.getIdentityServerUrl(!0),medium:"email",address:n};t.invite_3pid.push(r)}else"mx-user-id"===r&&t.invite.push(n);return t}),{invite:[],invite_3pid:[]})),a.spinner=n,Object(s.b)(a)}const y=async(e,t)=>{const n=e.filter((e=>e instanceof x));if(0===n.length)return e;const r=await E(n,t);return e.map((e=>{var t,n;if(!(e instanceof x))return e;const i=r.find((t=>t.threePidId===e.userId));return i?new C({user_id:i.mxid,avatar_url:null==i||null===(t=i.profile)||void 0===t?void 0:t.avatar_url,display_name:null==i||null===(n=i.profile)||void 0===n?void 0:n.displayname}):e}))},E=async(e,t)=>{const n=await(async(e,t)=>{if(!t.identityServer)return[];if(0===e.length)return[];const n=await t.identityServer.getAccessToken();return(await t.bulkLookupThreePids(e.map((e=>[e.isEmail?"email":"msisdn",e.userId])),n)).threepids.map((e=>{let[t,n,r]=e;return{threePidId:n,mxid:r}}))})(e,t),r=n.map((async e=>{let n=null;try{n=await t.getProfileInfo(e.mxid)}catch{}return{threePidId:e.threePidId,mxid:e.mxid,profile:n}}));return Promise.all(r)};async function S(e,t){let n=t;try{n=await y(t,e)}catch(e){a.a.warn("Error resolving 3rd-party members",e)}const r=function(e,t){const n=t.map((e=>e.userId));let r;return r=1===n.length?Object(p.a)(e,n[0]):h.a.shared().getDMRoomForIdentifiers(n),r||null}(e,n);if(r)return c.a.dispatch({action:l.a.ViewRoom,room_id:r.roomId,should_peek:!1,joining:!1,metricsTrigger:"MessageUser"}),r.roomId;if(1===t.length&&t[0]instanceof x&&Object(m.a)())return await v(e,t);const i=await async function(e,t){const n=e.getUserId(),r=new u.b(u.a+e.makeTxnId(),e,n),i=[];return i.push(new f.MatrixEvent({event_id:`~${r.roomId}:${e.makeTxnId()}`,type:f.EventType.RoomCreate,content:{creator:n,room_version:f.KNOWN_SAFE_ROOM_VERSION},state_key:"",user_id:n,sender:n,room_id:r.roomId,origin_server_ts:Date.now()})),await F(e,t)&&(r.encrypted=!0,i.push(new f.MatrixEvent({event_id:`~${r.roomId}:${e.makeTxnId()}`,type:f.EventType.RoomEncryption,content:{algorithm:g.MEGOLM_ALGORITHM},user_id:n,sender:n,state_key:"",room_id:r.roomId,origin_server_ts:Date.now()}))),i.push(new f.MatrixEvent({event_id:`~${r.roomId}:${e.makeTxnId()}`,type:f.EventType.RoomMember,content:{displayname:n,membership:"join"},state_key:n,user_id:n,sender:n,room_id:r.roomId})),t.forEach((t=>{var o,a;i.push(new f.MatrixEvent({event_id:`~${r.roomId}:${e.makeTxnId()}`,type:f.EventType.RoomMember,content:{displayname:t.name,avatar_url:null!==(o=t.getMxcAvatarUrl())&&void 0!==o?o:void 0,membership:"invite",isDirect:!0},state_key:t.userId,sender:n,room_id:r.roomId})),i.push(new f.MatrixEvent({event_id:`~${r.roomId}:${e.makeTxnId()}`,type:f.EventType.RoomMember,content:{displayname:t.name,avatar_url:null!==(a=t.getMxcAvatarUrl())&&void 0!==a?a:void 0,membership:"join"},state_key:t.userId,sender:t.userId,room_id:r.roomId}))})),r.targets=t,r.updateMyMembership("join"),r.addLiveEvents(i),r.currentState.setStateEvents(i),r.name=r.getDefaultRoomName(e.getUserId()),e.store.storeRoom(r),r}(e,n);return c.a.dispatch({action:l.a.ViewRoom,room_id:i.roomId,joining:!1,targets:n}),i.roomId}async function w(e,t){if(t.isNew)return t.state=u.c.CREATING,e.emit(o.b.Room,t),v(e,t.targets,!1).then((n=>{if(!n)throw new Error(`startDm for local room ${t.roomId} didn't return a room Id`);return t.actualRoomId=n,Object(d.b)(e,t)}),(()=>{a.a.warn(`Error creating DM for local room ${t.roomId}`),t.state=u.c.ERROR,e.emit(o.b.Room,t)}))}class T{}class C extends T{constructor(e){super(),i()(this,"_userId",void 0),i()(this,"displayName",void 0),i()(this,"avatarUrl",void 0),this._userId=e.user_id,this.displayName=e.display_name,this.avatarUrl=e.avatar_url}get name(){return this.displayName||this._userId}get userId(){return this._userId}getMxcAvatarUrl(){var e;return null!==(e=this.avatarUrl)&&void 0!==e?e:null}}class x extends T{constructor(e){super(),i()(this,"id",void 0),this.id=e}get isEmail(){return this.id.includes("@")}get name(){return this.id}get userId(){return this.id}getMxcAvatarUrl(){return null}}async function F(e,t){if(Object(m.a)()){if(1===t.length&&t[0]instanceof x)return!0;if(!t.some((e=>e instanceof x))){const n=t.map((e=>e.userId));if(await Object(s.a)(e,n))return!0}}return!1}},function(e,t,n){"use strict";n.d(t,"a",(function(){return R}));var r=n(130),i=n.n(r),o=n(13),a=n.n(o),s=n(120),l=n.n(s),c=n(427),u=n.n(c),d=n(121),h=n(148),p=n(172),m=n(328),g=n(650),f=n(150),_=n(753),b=n(125),v=n(165),y=n(124),E=n(128),S=n(132),w=n.n(S);const T=["deltaMode","deltaX","deltaY","deltaZ"];function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){let{deltaMode:t,deltaX:n,deltaY:r,deltaZ:i}=e,o=w()(e,T);return 1===t&&(n*=18,r*=18,i*=18),new WheelEvent("syntheticWheel",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({deltaMode:0,deltaY:r,deltaX:n,deltaZ:i},o))}var F=n(195),D=n(142),k=n(152),O=n(563);const I=.95,A=()=>{const e=getComputedStyle(document.documentElement).getPropertyValue("--image-view-panel-height");return parseInt(e.slice(0,e.length-2))};class R extends l.a.Component{constructor(e){var t,n;super(e),a()(this,"contextMenuButton",Object(s.createRef)()),a()(this,"focusLock",Object(s.createRef)()),a()(this,"imageWrapper",Object(s.createRef)()),a()(this,"image",Object(s.createRef)()),a()(this,"initX",0),a()(this,"initY",0),a()(this,"previousX",0),a()(this,"previousY",0),a()(this,"animatingLoading",!1),a()(this,"imageIsLoaded",!1),a()(this,"imageLoaded",(()=>{const{thumbnailInfo:e}=this.props;null!=e&&e.width&&this.setState({zoom:e.width/this.image.current.naturalWidth}),this.imageIsLoaded=!0,this.animatingLoading=!0,this.setZoomAndRotation(),this.setState({translationX:0,translationY:0}),this.animatingLoading=!1})),a()(this,"recalculateZoom",(()=>{this.setZoomAndRotation()})),a()(this,"setZoomAndRotation",(e=>{const t=this.image.current,n=this.imageWrapper.current,r=null!=e?e:this.state.rotation,i=r%180==0,o=i?t.naturalWidth:t.naturalHeight,a=i?t.naturalHeight:t.naturalWidth,s=n.clientWidth/o,l=n.clientHeight/a;if(s>=1&&l>=1)return void this.setState({zoom:1,minZoom:1,maxZoom:1,rotation:r});const c=Math.min(s,l)*I,u=this.state.zoom<=this.state.minZoom?c:this.state.zoom;this.setState({minZoom:c,maxZoom:1,rotation:r,zoom:u})})),a()(this,"onWheel",(e=>{if(e.target===this.image.current){e.stopPropagation(),e.preventDefault();const{deltaY:t}=x(e);this.zoomDelta(.0025*-t,e.offsetX,e.offsetY)}})),a()(this,"onZoomInClick",(()=>{this.zoomDelta(.1)})),a()(this,"onZoomOutClick",(()=>{this.zoomDelta(-.1)})),a()(this,"onKeyDown",(e=>{if(Object(k.a)().getAccessibilityAction(e)===D.h.Escape)e.stopPropagation(),e.preventDefault(),this.props.onFinished()})),a()(this,"onRotateCounterClockwiseClick",(()=>{const e=this.state.rotation;this.setZoomAndRotation(e-90)})),a()(this,"onRotateClockwiseClick",(()=>{const e=this.state.rotation;this.setZoomAndRotation(e+90)})),a()(this,"onDownloadClick",(()=>{const e=document.createElement("a");e.href=this.props.src,e.download=this.props.name,e.target="_blank",e.rel="noreferrer noopener",e.click()})),a()(this,"onOpenContextMenu",(()=>{this.setState({contextMenuDisplayed:!0})})),a()(this,"onCloseContextMenu",(()=>{this.setState({contextMenuDisplayed:!1})})),a()(this,"onPermalinkClicked",(e=>{e.preventDefault(),y.a.dispatch({action:E.a.ViewRoom,event_id:this.props.mxEvent.getId(),highlighted:!0,room_id:this.props.mxEvent.getRoomId(),metricsTrigger:void 0}),this.props.onFinished()})),a()(this,"onStartMoving",(e=>{e.stopPropagation(),e.preventDefault(),0===e.button&&(this.state.zoom!==this.state.minZoom?(this.setState({moving:!0}),this.previousX=this.state.translationX,this.previousY=this.state.translationY,this.initX=e.pageX-this.state.translationX,this.initY=e.pageY-this.state.translationY):this.zoom(this.state.maxZoom===this.state.minZoom?2*this.state.maxZoom:this.state.maxZoom,e.nativeEvent.offsetX,e.nativeEvent.offsetY))})),a()(this,"onMoving",(e=>{e.stopPropagation(),e.preventDefault(),this.state.moving&&this.setState({translationX:e.pageX-this.initX,translationY:e.pageY-this.initY})})),a()(this,"onEndMoving",(()=>{!0===this.state.moving&&Math.abs(this.state.translationX-this.previousX)<10&&Math.abs(this.state.translationY-this.previousY)<10&&(this.zoom(this.state.minZoom),this.initX=0,this.initY=0),this.setState({moving:!1})}));const{thumbnailInfo:r}=this.props;this.state={zoom:0,minZoom:I,maxZoom:I,rotation:0,translationX:null!==(t=(null==r?void 0:r.positionX)+(null==r?void 0:r.width)/2-F.b.instance.windowWidth/2)&&void 0!==t?t:0,translationY:null!==(n=(null==r?void 0:r.positionY)+(null==r?void 0:r.height)/2-F.b.instance.windowHeight/2-A()/2)&&void 0!==n?n:0,moving:!1,contextMenuDisplayed:!1}}componentDidMount(){this.focusLock.current.addEventListener("wheel",this.onWheel,{passive:!1}),window.addEventListener("resize",this.recalculateZoom),this.image.current.addEventListener("load",this.imageLoaded)}componentWillUnmount(){this.focusLock.current.removeEventListener("wheel",this.onWheel),window.removeEventListener("resize",this.recalculateZoom),this.image.current.removeEventListener("load",this.imageLoaded)}zoomDelta(e,t,n){this.zoom(this.state.zoom+e,t,n)}zoom(e,t,n){const r=this.state.zoom,i=this.state.maxZoom===this.state.minZoom?2*this.state.maxZoom:this.state.maxZoom,o=Math.min(e,i);if(o<=this.state.minZoom)this.setState({zoom:this.state.minZoom,translationX:0,translationY:0});else if("number"!=typeof t&&"number"!=typeof n)this.setState({zoom:o,translationX:this.state.translationX*o/r,translationY:this.state.translationY*o/r});else{let e,i;switch((this.state.rotation%360+360)%360){case 0:e=this.image.current.clientWidth/2-t,i=this.image.current.clientHeight/2-n;break;case 90:e=n-this.image.current.clientHeight/2,i=this.image.current.clientWidth/2-t;break;case 180:e=t-this.image.current.clientWidth/2,i=n-this.image.current.clientHeight/2;break;case 270:e=this.image.current.clientHeight/2-n,i=t-this.image.current.clientWidth/2}this.setState({zoom:o,translationX:this.state.translationX+(o-r)*e,translationY:this.state.translationY+(o-r)*i})}}renderContextMenu(){let e=null;return this.state.contextMenuDisplayed&&(e=l.a.createElement(g.a,i()({},Object(f.i)(this.contextMenuButton.current.getBoundingClientRect()),{mxEvent:this.props.mxEvent,permalinkCreator:this.props.permalinkCreator,onFinished:this.onCloseContextMenu,onCloseDialog:this.props.onFinished}))),l.a.createElement(l.a.Fragment,null,e)}render(){var e;const t=!!this.props.mxEvent;let n,r;n=this.animatingLoading?"mx_ImageView_image_animatingLoading":this.state.moving||!this.imageIsLoaded?"":"mx_ImageView_image_animating",r=this.state.moving?"grabbing":this.state.zoom===this.state.minZoom?"zoom-in":"zoom-out";const i=this.state.rotation+"deg",o=this.state.zoom,a={cursor:r,transform:`translateX(${this.state.translationX+"px"})\n translateY(${this.state.translationY+"px"})\n scale(${o})\n rotate(${i})`};let s,c;if(t){const e=this.props.mxEvent,t=b.b.getValue("showTwelveHourTimestamps");let n="#";this.props.permalinkCreator&&(n=this.props.permalinkCreator.forEvent(this.props.mxEvent.getId()));const r=e.sender?e.sender.name:e.getSender(),i=l.a.createElement("div",{className:"mx_ImageView_info_sender"},r),o=l.a.createElement("a",{href:n,onClick:this.onPermalinkClicked,"aria-label":Object(v.c)(new Date(this.props.mxEvent.getTs()),t,!1)},l.a.createElement(_.a,{showFullDate:!0,showTwelveHour:t,ts:e.getTs(),showSeconds:!1})),a=l.a.createElement(p.b,{member:e.sender,fallbackUserId:e.getSender(),width:32,height:32,viewUserOnClick:!0});s=l.a.createElement("div",{className:"mx_ImageView_info_wrapper"},a,l.a.createElement("div",{className:"mx_ImageView_info"},i,o))}else s=l.a.createElement("div",null);this.props.mxEvent&&(c=l.a.createElement(m.a,{className:"mx_ImageView_button mx_ImageView_button_more",title:Object(d.a)("Options"),onClick:this.onOpenContextMenu,inputRef:this.contextMenuButton,isExpanded:this.state.contextMenuDisplayed}));const g=l.a.createElement(h.a,{className:"mx_ImageView_button mx_ImageView_button_zoomOut",title:Object(d.a)("Zoom out"),onClick:this.onZoomOutClick}),f=l.a.createElement(h.a,{className:"mx_ImageView_button mx_ImageView_button_zoomIn",title:Object(d.a)("Zoom in"),onClick:this.onZoomInClick});let y;var E;null!==(e=this.props.mxEvent)&&void 0!==e&&e.getContent()&&(y=l.a.createElement("div",{className:"mx_ImageView_title"},Object(O.a)(null===(E=this.props.mxEvent)||void 0===E?void 0:E.getContent(),Object(d.a)("Image"),!0)));return l.a.createElement(u.a,{returnFocus:!0,lockProps:{onKeyDown:this.onKeyDown,role:"dialog"},className:"mx_ImageView",ref:this.focusLock},l.a.createElement("div",{className:"mx_ImageView_panel"},s,y,l.a.createElement("div",{className:"mx_ImageView_toolbar"},g,f,l.a.createElement(h.a,{className:"mx_ImageView_button mx_ImageView_button_rotateCCW",title:Object(d.a)("Rotate Left"),onClick:this.onRotateCounterClockwiseClick}),l.a.createElement(h.a,{className:"mx_ImageView_button mx_ImageView_button_rotateCW",title:Object(d.a)("Rotate Right"),onClick:this.onRotateClockwiseClick}),l.a.createElement(h.a,{className:"mx_ImageView_button mx_ImageView_button_download",title:Object(d.a)("Download"),onClick:this.onDownloadClick}),c,l.a.createElement(h.a,{className:"mx_ImageView_button mx_ImageView_button_close",title:Object(d.a)("Close"),onClick:this.props.onFinished}),this.renderContextMenu())),l.a.createElement("div",{className:"mx_ImageView_image_wrapper",ref:this.imageWrapper,onMouseDown:this.props.onFinished,onMouseMove:this.onMoving,onMouseUp:this.onEndMoving,onMouseLeave:this.onEndMoving},l.a.createElement("img",{src:this.props.src,style:a,alt:this.props.name,ref:this.image,className:`mx_ImageView_image ${n}`,draggable:!0,onMouseDown:this.onStartMoving})))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return ee})),n.d(t,"c",(function(){return ae})),n.d(t,"b",(function(){return se})),n.d(t,"e",(function(){return le})),n.d(t,"d",(function(){return ce}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(179),l=n(129),c=n(269),u=n(1346),d=n(1),h=n(122),p=n(124),m=n(121),g=n(127),f=n(655),_=n(196),b=n(155),v=n(181),y=n(760),E=n(434),S=n(366),w=n(433),T=n(168),C=n(201),x=n(565),F=n(276),D=n(219),k=n(128),O=n(242),I=n(131),A=n(125),R=n(156),N=n(247),M=n(183),P=n(285),L=n(391),B=n(934),U=n(648),j=n(810),G=n(213);var z=e=>{let{onFinished:t}=e;const n={};ae.forEach((e=>{e.isEnabled()&&(n[e.category]||(n[e.category]=[]),n[e.category].push(e))}));const r=Object.values(ee).filter((e=>n[e])).map((e=>{const t=[a.a.createElement("tr",{key:"_category_"+e,className:"mx_SlashCommandHelpDialog_headerRow"},a.a.createElement("td",{colSpan:3},a.a.createElement("h2",null,Object(m.a)(e))))];return n[e].forEach((e=>{t.push(a.a.createElement("tr",{key:e.command},a.a.createElement("td",null,a.a.createElement("strong",null,e.getCommand())),a.a.createElement("td",null,e.args),a.a.createElement("td",null,e.description)))})),t}));return a.a.createElement(G.a,{className:"mx_SlashCommandHelpDialog",title:Object(m.a)("Command Help"),description:a.a.createElement("table",null,a.a.createElement("tbody",null,r)),hasCloseButton:!0,onFinished:t})},H=n(221),q=n(138),V=n(189),$=n(387),K=n(381),W=n(496),Y=n(217),Q=n(154);function X(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?X(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const J=async()=>new Promise((e=>{const t=document.createElement("input");t.setAttribute("type","file"),t.onchange=t=>{var n;const r=null===(n=t.target.files)||void 0===n?void 0:n[0];r&&g.b.createDialog(B.a,{file:r,onFinished:async t=>{if(t){const{content_uri:t}=await h.a.get().uploadContent(r);e(t)}else e(null)}})},t.click()})),ee={messages:Object(m.c)("Messages"),actions:Object(m.c)("Actions"),admin:Object(m.c)("Admin"),advanced:Object(m.c)("Advanced"),effects:Object(m.c)("Effects"),other:Object(m.c)("Other")};class te{constructor(e){var t;i()(this,"command",void 0),i()(this,"aliases",void 0),i()(this,"args",void 0),i()(this,"description",void 0),i()(this,"runFn",void 0),i()(this,"category",void 0),i()(this,"hideCompletionAfterSpace",void 0),i()(this,"renderingTypes",void 0),i()(this,"analyticsName",void 0),i()(this,"_isEnabled",void 0),this.command=e.command,this.aliases=e.aliases||[],this.args=e.args||"",this.description=e.description,this.runFn=null===(t=e.runFn)||void 0===t?void 0:t.bind(this),this.category=e.category||ee.other,this.hideCompletionAfterSpace=e.hideCompletionAfterSpace||!1,this._isEnabled=e.isEnabled,this.renderingTypes=e.renderingTypes,this.analyticsName=e.analyticsName}getCommand(){return`/${this.command}`}getCommandWithArgs(){return this.getCommand()+" "+this.args}run(e,t,n){var r;if(!this.runFn)return ne(Object(m.i)("Command error: Unable to handle slash command."));const i=t?q.a.Thread:q.a.Room;return!this.renderingTypes||null!==(r=this.renderingTypes)&&void 0!==r&&r.includes(i)?(this.analyticsName&&V.a.instance.trackEvent({eventName:"SlashCommand",command:this.analyticsName}),this.runFn(e,n)):ne(Object(m.i)("Command error: Unable to find rendering type (%(renderingType)s)",{renderingType:i}))}getUsage(){return Object(m.a)("Usage")+": "+this.getCommandWithArgs()}isEnabled(){return!this._isEnabled||this._isEnabled()}}function ne(e){return{error:e}}function re(){return{promise:arguments.length>0&&void 0!==arguments[0]?arguments[0]:Promise.resolve()}}function ie(e){return re(Promise.resolve(e))}const oe=()=>{const e=h.a.get().getRoom(Q.b.instance.roomViewStore.getRoomId());return Object(Y.a)(e)},ae=[new te({command:"spoiler",args:"<message>",description:Object(m.c)("Sends the given message as a spoiler"),runFn:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return ie(c.makeHtmlMessage(t,`<span data-mx-spoiler>${t}</span>`))},category:ee.messages}),new te({command:"shrug",args:"<message>",description:Object(m.c)("Prepends ¯\\_(ツ)_/¯ to a plain-text message"),runFn:function(e,t){let n="¯\\_(ツ)_/¯";return t&&(n=n+" "+t),ie(c.makeTextMessage(n))},category:ee.messages}),new te({command:"tableflip",args:"<message>",description:Object(m.c)("Prepends (╯°□°)╯︵ ┻━┻ to a plain-text message"),runFn:function(e,t){let n="(╯°□°)╯︵ ┻━┻";return t&&(n=n+" "+t),ie(c.makeTextMessage(n))},category:ee.messages}),new te({command:"unflip",args:"<message>",description:Object(m.c)("Prepends ┬──┬ ノ( ゜-゜ノ) to a plain-text message"),runFn:function(e,t){let n="┬──┬ ノ( ゜-゜ノ)";return t&&(n=n+" "+t),ie(c.makeTextMessage(n))},category:ee.messages}),new te({command:"lenny",args:"<message>",description:Object(m.c)("Prepends ( ͡° ͜ʖ ͡°) to a plain-text message"),runFn:function(e,t){let n="( ͡° ͜ʖ ͡°)";return t&&(n=n+" "+t),ie(c.makeTextMessage(n))},category:ee.messages}),new te({command:"plain",args:"<message>",description:Object(m.c)("Sends a message as plain text, without interpreting it as markdown"),runFn:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return ie(c.makeTextMessage(t))},category:ee.messages}),new te({command:"html",args:"<message>",description:Object(m.c)("Sends a message as html, without interpreting it as markdown"),runFn:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return ie(c.makeHtmlMessage(t,t))},category:ee.messages}),new te({command:"upgraderoom",args:"<new_version>",description:Object(m.c)("Upgrades a room to a new version"),isEnabled:()=>!oe(),runFn:function(e,t){if(t){const n=h.a.get(),r=n.getRoom(e);if(null==r||!r.currentState.mayClientSendStateEvent("m.room.tombstone",n))return ne(Object(m.i)("You do not have the required permissions to use this command."));const{finished:i}=g.b.createDialog(j.a,{roomId:e,targetVersion:t},void 0,!1,!0);return re(i.then((async e=>{let[n]=e;null!=n&&n.continue&&await Object(L.b)(r,t,n.invite)})))}return ne(this.getUsage())},category:ee.admin,renderingTypes:[q.a.Room]}),new te({command:"jumptodate",args:"<YYYY-MM-DD>",description:Object(m.c)("Jump to the given date in the timeline"),isEnabled:()=>A.b.getValue("feature_jump_to_date"),runFn:function(e,t){return t?re((async()=>{const n=Date.parse(t);if(!n)throw Object(m.i)("We were unable to understand the given date (%(inputDate)s). Try using the format YYYY-MM-DD.",{inputDate:t});const r=h.a.get(),{event_id:i,origin_server_ts:o}=await r.timestampToEvent(e,n,s.a.Forward);d.a.log(`/timestamp_to_event: found ${i} (${o}) for timestamp=${n}`),p.a.dispatch({action:k.a.ViewRoom,event_id:i,highlighted:!0,room_id:e,metricsTrigger:"SlashCommand",metricsViaKeyboard:!0})})()):ne(this.getUsage())},category:ee.actions}),new te({command:"nick",args:"<display_name>",description:Object(m.c)("Changes your display nickname"),runFn:function(e,t){return t?re(h.a.get().setDisplayName(t)):ne(this.getUsage())},category:ee.actions,renderingTypes:[q.a.Room]}),new te({command:"myroomnick",aliases:["roomnick"],args:"<display_name>",description:Object(m.c)("Changes your display nickname in the current room only"),isEnabled:()=>!oe(),runFn:function(e,t){if(t){var n;const r=h.a.get(),i=null===(n=r.getRoom(e))||void 0===n?void 0:n.currentState.getStateEvents("m.room.member",r.getUserId()),o=Z(Z({},i?i.getContent():{membership:"join"}),{},{displayname:t});return re(r.sendStateEvent(e,"m.room.member",o,r.getUserId()))}return ne(this.getUsage())},category:ee.actions,renderingTypes:[q.a.Room]}),new te({command:"roomavatar",args:"[<mxc_url>]",description:Object(m.c)("Changes the avatar of the current room"),isEnabled:()=>!oe(),runFn:function(e,t){let n=Promise.resolve(null!=t?t:null);return t||(n=J()),re(n.then((t=>{if(t)return h.a.get().sendStateEvent(e,"m.room.avatar",{url:t},"")})))},category:ee.actions,renderingTypes:[q.a.Room]}),new te({command:"myroomavatar",args:"[<mxc_url>]",description:Object(m.c)("Changes your avatar in this current room only"),isEnabled:()=>!oe(),runFn:function(e,t){const n=h.a.get(),r=n.getRoom(e),i=n.getUserId();let o=Promise.resolve(null!=t?t:null);return t||(o=J()),re(o.then((t=>{if(!t)return;const o=null==r?void 0:r.currentState.getStateEvents("m.room.member",i),a=Z(Z({},o?o.getContent():{membership:"join"}),{},{avatar_url:t});return n.sendStateEvent(e,"m.room.member",a,i)})))},category:ee.actions,renderingTypes:[q.a.Room]}),new te({command:"myavatar",args:"[<mxc_url>]",description:Object(m.c)("Changes your avatar in all rooms"),runFn:function(e,t){let n=Promise.resolve(null!=t?t:null);return t||(n=J()),re(n.then((e=>{if(e)return h.a.get().setAvatarUrl(e)})))},category:ee.actions,renderingTypes:[q.a.Room]}),new te({command:"topic",args:"[<topic>]",description:Object(m.c)("Gets or sets the room topic"),isEnabled:()=>!oe(),runFn:function(e,t){var n;const r=h.a.get();if(t){const n=Object(K.b)(t,{forceHTML:!1});return re(r.setRoomTopic(e,t,n))}const i=r.getRoom(e);if(!i)return ne(Object(m.i)("Failed to get room topic: Unable to find room (%(roomId)s",{roomId:e}));const a=null===(n=i.currentState.getStateEvents("m.room.topic",""))||void 0===n?void 0:n.getContent(),s=a?c.parseTopicContent(a):{text:Object(m.a)("This room has no topic.")},l=Object(_.j)(s.text,s.html,void 0,!0);return g.b.createDialog(G.a,{title:i.name,description:o.createElement(_.a,null,l),hasCloseButton:!0,className:"markdown-body"}),re()},category:ee.admin,renderingTypes:[q.a.Room]}),new te({command:"roomname",args:"<name>",description:Object(m.c)("Sets the room name"),isEnabled:()=>!oe(),runFn:function(e,t){return t?re(h.a.get().setRoomName(e,t)):ne(this.getUsage())},category:ee.admin,renderingTypes:[q.a.Room]}),new te({command:"invite",args:"<user-id> [<reason>]",description:Object(m.c)("Invites user with given id to current room"),analyticsName:"Invite",isEnabled:()=>!oe()&&Object(H.a)(R.a.InviteUsers),runFn:function(e,t){if(t){const[n,r]=t.split(/\s+(.+)/);if(n){let t=Promise.resolve();if(Object(E.b)(n)===E.a.Email&&!h.a.get().getIdentityServerUrl()){const e=Object(w.c)();if(!e)return ne(Object(m.i)("Use an identity server to invite by email. Manage in Settings."));{const{finished:n}=g.b.createDialog(b.a,{title:Object(m.a)("Use an identity server"),description:o.createElement("p",null,Object(m.a)("Use an identity server to invite by email. Click continue to use the default identity server (%(defaultIdentityServerName)s) or manage in Settings.",{defaultIdentityServerName:Object(S.a)(e)})),button:Object(m.a)("Continue")});t=n.then((e=>{let[t]=e;if(!t)throw Object(m.i)("Use an identity server to invite by email. Manage in Settings.");Object(w.d)()}))}}const i=new f.a(e);return re(t.then((()=>i.invite([n],r,!0))).then((()=>{if("invited"!==i.getCompletionState(n))throw new Error(i.getErrorText(n))})))}}return ne(this.getUsage())},category:ee.actions,renderingTypes:[q.a.Room]}),new te({command:"join",aliases:["j","goto"],args:"<room-address>",description:Object(m.c)("Joins room with given address"),runFn:function(e,t){if(t){const e=t.split(" ");if(e.length<1)return ne(this.getUsage());let n=!1;if(e[0].startsWith("http:")||e[0].startsWith("https:")){const t=new URL(e[0]),r=t.host||t.hostname;Object(T.f)(r)&&(n=!0)}if("#"===e[0][0]){let t=e[0];return t.includes(":")||(t+=":"+h.a.get().getDomain()),p.a.dispatch({action:k.a.ViewRoom,room_alias:t,auto_join:!0,metricsTrigger:"SlashCommand",metricsViaKeyboard:!0}),re()}if("!"===e[0][0]){const[t,...n]=e;return p.a.dispatch({action:k.a.ViewRoom,room_id:t,via_servers:n,auto_join:!0,metricsTrigger:"SlashCommand",metricsViaKeyboard:!0}),re()}if(n){const t=Object(T.j)(e[0]);if(!t)return ne(this.getUsage());if(!t.roomIdOrAlias)return ne(this.getUsage());const n=t.roomIdOrAlias,r=t.viaServers,i=t.eventId,o={action:k.a.ViewRoom,auto_join:!0,metricsTrigger:"SlashCommand",metricsViaKeyboard:!0};return"!"===n[0]?o.room_id=n:o.room_alias=n,i&&(o.event_id=i,o.highlighted=!0),r&&(o.opts={viaServers:r},o.via_servers=r),p.a.dispatch(o),re()}}return ne(this.getUsage())},category:ee.actions,renderingTypes:[q.a.Room]}),new te({command:"part",args:"[<room-address>]",description:Object(m.c)("Leave room"),analyticsName:"Part",isEnabled:()=>!oe(),runFn:function(e,t){const n=h.a.get();let r;if(t){const e=t.match(/^(\S+)$/);if(e){var i;let t=e[1];if("#"!==t[0])return ne(this.getUsage());t.includes(":")||(t+=":"+n.getDomain());if(r=null===(i=n.getRooms().find((e=>e.getCanonicalAlias()===t||e.getAltAliases().includes(t))))||void 0===i?void 0:i.roomId,!r)return ne(Object(m.i)("Unrecognised room address: %(roomAlias)s",{roomAlias:t}))}}return r||(r=e),re(Object(W.a)(r))},category:ee.actions,renderingTypes:[q.a.Room]}),new te({command:"remove",aliases:["kick"],args:"<user-id> [reason]",description:Object(m.c)("Removes user with given id from this room"),isEnabled:()=>!oe(),runFn:function(e,t){if(t){const n=t.match(/^(\S+?)( +(.*))?$/);if(n)return re(h.a.get().kick(e,n[1],n[3]))}return ne(this.getUsage())},category:ee.admin,renderingTypes:[q.a.Room]}),new te({command:"ban",args:"<user-id> [reason]",description:Object(m.c)("Bans user with given id"),isEnabled:()=>!oe(),runFn:function(e,t){if(t){const n=t.match(/^(\S+?)( +(.*))?$/);if(n)return re(h.a.get().ban(e,n[1],n[3]))}return ne(this.getUsage())},category:ee.admin,renderingTypes:[q.a.Room]}),new te({command:"unban",args:"<user-id>",description:Object(m.c)("Unbans user with given ID"),isEnabled:()=>!oe(),runFn:function(e,t){if(t){const n=t.match(/^(\S+)$/);if(n)return re(h.a.get().unban(e,n[1]))}return ne(this.getUsage())},category:ee.admin,renderingTypes:[q.a.Room]}),new te({command:"ignore",args:"<user-id>",description:Object(m.c)("Ignores a user, hiding their messages from you"),runFn:function(e,t){if(t){const e=h.a.get(),n=t.match(/^(@[^:]+:\S+)$/);if(n){const t=n[1],r=e.getIgnoredUsers();return r.push(t),re(e.setIgnoredUsers(r).then((()=>{g.b.createDialog(G.a,{title:Object(m.a)("Ignored user"),description:o.createElement("div",null,o.createElement("p",null,Object(m.a)("You are now ignoring %(userId)s",{userId:t})))})})))}}return ne(this.getUsage())},category:ee.actions}),new te({command:"unignore",args:"<user-id>",description:Object(m.c)("Stops ignoring a user, showing their messages going forward"),runFn:function(e,t){if(t){const e=h.a.get(),n=t.match(/(^@[^:]+:\S+$)/);if(n){const t=n[1],r=e.getIgnoredUsers(),i=r.indexOf(t);return-1!==i&&r.splice(i,1),re(e.setIgnoredUsers(r).then((()=>{g.b.createDialog(G.a,{title:Object(m.a)("Unignored user"),description:o.createElement("div",null,o.createElement("p",null,Object(m.a)("You are no longer ignoring %(userId)s",{userId:t})))})})))}}return ne(this.getUsage())},category:ee.actions}),new te({command:"op",args:"<user-id> [<power-level>]",description:Object(m.c)("Define the power level of a user"),isEnabled(){const e=h.a.get(),t=e.getRoom(Q.b.instance.roomViewStore.getRoomId());return!(null==t||!t.currentState.maySendStateEvent(l.b.RoomPowerLevels,e.getUserId())||Object(Y.a)(t))},runFn:function(e,t){if(t){const n=t.match(/^(\S+?)( +(-?\d+))?$/);let r=50;if(n){const t=n[1];if(4===n.length&&void 0!==n[3]&&(r=parseInt(n[3],10)),!isNaN(r)){const n=h.a.get(),i=n.getRoom(e);if(!i)return ne(Object(m.i)("Command failed: Unable to find room (%(roomId)s",{roomId:e}));const o=i.getMember(t);if(!o||Object(O.b)(o.membership)===O.a.Leave)return ne(Object(m.i)("Could not find user in room"));const a=i.currentState.getStateEvents("m.room.power_levels","");return re(n.setPowerLevel(e,t,r,a))}}}return ne(this.getUsage())},category:ee.admin,renderingTypes:[q.a.Room]}),new te({command:"deop",args:"<user-id>",description:Object(m.c)("Deops user with given id"),isEnabled(){const e=h.a.get(),t=e.getRoom(Q.b.instance.roomViewStore.getRoomId());return!(null==t||!t.currentState.maySendStateEvent(l.b.RoomPowerLevels,e.getUserId())||Object(Y.a)(t))},runFn:function(e,t){if(t){if(t.match(/^(\S+)$/)){const n=h.a.get(),r=n.getRoom(e);if(!r)return ne(Object(m.i)("Command failed: Unable to find room (%(roomId)s",{roomId:e}));const i=r.currentState.getStateEvents("m.room.power_levels","");return null!=i&&i.getContent().users[t]?re(n.setPowerLevel(e,t,void 0,i)):ne(Object(m.i)("Could not find user in room"))}}return ne(this.getUsage())},category:ee.admin,renderingTypes:[q.a.Room]}),new te({command:"devtools",description:Object(m.c)("Opens the Developer Tools dialog"),runFn:function(e){return g.b.createDialog(U.a,{roomId:e},"mx_DevtoolsDialog_wrapper"),re()},category:ee.advanced}),new te({command:"addwidget",args:"<url | embed code | Jitsi url>",description:Object(m.c)("Adds a custom widget by URL to the room"),isEnabled:()=>A.b.getValue(R.b.Widgets)&&Object(H.a)(R.a.AddIntegrations)&&!oe(),runFn:function(e,t){if(!t)return ne(Object(m.i)("Please supply a widget URL or embed code"));if(t.toLowerCase().startsWith("<iframe ")){const e=Object(u.parseFragment)(t);if(e&&e.childNodes&&1===e.childNodes.length){const n=e.childNodes[0];if("iframe"===n.tagName.toLowerCase()&&n.attrs){const e=n.attrs.find((e=>"src"===e.name));d.a.log("Pulling URL out of iframe (embed code)"),t=e.value}}}if(!t.startsWith("https://")&&!t.startsWith("http://"))return ne(Object(m.i)("Please supply a https:// or http:// widget URL"));if(v.a.canUserModifyWidgets(e)){const n=h.a.get().getUserId(),r=(new Date).getTime(),i=encodeURIComponent(`${e}_${n}_${r}`);let o=C.a.CUSTOM,a="Custom",s={};const l=x.a.getInstance().parsePreferredConferenceUrl(t);return l&&(d.a.log("Making /addwidget widget a Jitsi conference"),o=C.a.JITSI,a="Jitsi",s=l,t=v.a.getLocalJitsiWrapperUrl()),re(v.a.setRoomWidget(e,i,o,t,a,s))}return ne(Object(m.i)("You cannot modify widgets in this room."))},category:ee.admin,renderingTypes:[q.a.Room]}),new te({command:"verify",args:"<user-id> <device-id> <device-signing-key>",description:Object(m.c)("Verifies a user, session, and pubkey tuple"),runFn:function(e,t){if(t){const e=t.match(/^(\S+) +(\S+) +(\S+)$/);if(e){const t=h.a.get(),n=e[1],r=e[2],i=e[3];return re((async()=>{const e=t.getStoredDevice(n,r);if(!e)throw Object(m.i)("Unknown (user, session) pair: (%(userId)s, %(deviceId)s)",{userId:n,deviceId:r});if((await t.checkDeviceTrust(n,r)).isVerified())throw e.getFingerprint()===i?Object(m.i)("Session already verified!"):Object(m.i)("WARNING: session already verified, but keys do NOT MATCH!");if(e.getFingerprint()!==i){const t=e.getFingerprint();throw Object(m.i)('WARNING: KEY VERIFICATION FAILED! The signing key for %(userId)s and session %(deviceId)s is "%(fprint)s" which does not match the provided key "%(fingerprint)s". This could mean your communications are being intercepted!',{fprint:t,userId:n,deviceId:r,fingerprint:i})}await t.setDeviceVerified(n,r,!0),g.b.createDialog(G.a,{title:Object(m.a)("Verified key"),description:o.createElement("div",null,o.createElement("p",null,Object(m.a)("The signing key you provided matches the signing key you received from %(userId)s's session %(deviceId)s. Session marked as verified.",{userId:n,deviceId:r})))})})())}}return ne(this.getUsage())},category:ee.advanced,renderingTypes:[q.a.Room]}),new te({command:"discardsession",description:Object(m.c)("Forces the current outbound group session in an encrypted room to be discarded"),isEnabled:()=>!oe(),runFn:function(e){try{h.a.get().forceDiscardSession(e)}catch(e){return ne(e.message)}return re()},category:ee.advanced,renderingTypes:[q.a.Room]}),new te({command:"remakeolm",description:Object(m.c)("Developer command: Discards the current outbound group session and sets up new Olm sessions"),isEnabled:()=>A.b.getValue("developerMode")&&!oe(),runFn:e=>{try{const t=h.a.get().getRoom(e);return h.a.get().forceDiscardSession(e),re(null==t?void 0:t.getEncryptionTargetMembers().then((e=>{var t;null===(t=h.a.get().crypto)||void 0===t||t.ensureOlmSessionsForUsers(e.map((e=>e.userId)),!0)})))}catch(e){return ne(e.message)}},category:ee.advanced,renderingTypes:[q.a.Room]}),new te({command:"rainbow",description:Object(m.c)("Sends the given message coloured as a rainbow"),args:"<message>",runFn:function(e,t){return t?ie(c.makeHtmlMessage(t,Object(y.a)(t))):ne(this.getUsage())},category:ee.messages}),new te({command:"rainbowme",description:Object(m.c)("Sends the given emote coloured as a rainbow"),args:"<message>",runFn:function(e,t){return t?ie(c.makeHtmlEmote(t,Object(y.a)(t))):ne(this.getUsage())},category:ee.messages}),new te({command:"help",description:Object(m.c)("Displays list of commands with usages and descriptions"),runFn:function(){return g.b.createDialog(z),re()},category:ee.advanced}),new te({command:"whois",description:Object(m.c)("Displays information about a user"),args:"<user-id>",isEnabled:()=>!oe(),runFn:function(e,t){var n;if(!t||!t.startsWith("@")||!t.includes(":"))return ne(this.getUsage());const r=null===(n=h.a.get().getRoom(e))||void 0===n?void 0:n.getMember(t);return p.a.dispatch({action:k.a.ViewUser,member:r||{userId:t}}),re()},category:ee.advanced}),new te({command:"rageshake",aliases:["bugreport"],description:Object(m.c)("Send a bug report with logs"),isEnabled:()=>!!I.b.get().bug_report_endpoint_url,args:"<description>",runFn:function(e,t){return re(g.b.createDialog(F.a,{initialText:t}).finished)},category:ee.advanced}),new te({command:"tovirtual",description:Object(m.c)("Switches to this room's virtual room, if it has one"),category:ee.advanced,isEnabled:()=>!!M.b.instance.getSupportsVirtualRooms()&&!oe(),runFn:e=>re((async()=>{const t=await $.a.sharedInstance().getVirtualRoomForRoom(e);if(!t)throw Object(m.i)("No virtual room for this room");p.a.dispatch({action:k.a.ViewRoom,room_id:t.roomId,metricsTrigger:"SlashCommand",metricsViaKeyboard:!0})})())}),new te({command:"query",description:Object(m.c)("Opens chat with the given user"),args:"<user-id>",runFn:function(e,t){const n=t&&/^\+?[0123456789]+$/.test(t);return t&&(t.startsWith("@")&&t.includes(":")||n)?re((async()=>{if(n){const e=await M.b.instance.pstnLookup(t);if(!e||0===e.length||!e[0].userid)throw Object(m.i)("Unable to find Matrix ID for phone number");t=e[0].userid}const e=await Object(D.c)(h.a.get(),t);p.a.dispatch({action:k.a.ViewRoom,room_id:e,metricsTrigger:"SlashCommand",metricsViaKeyboard:!0})})()):ne(this.getUsage())},category:ee.actions}),new te({command:"msg",description:Object(m.c)("Sends a message to the given user"),args:"<user-id> [<message>]",runFn:function(e,t){if(t){const e=t.match(/^(\S+?)(?: +(.*))?$/s);if(e){const[t,n]=e.slice(1);if(t&&t.startsWith("@")&&t.includes(":"))return re((async()=>{const e=h.a.get(),r=await Object(D.c)(e,t);p.a.dispatch({action:k.a.ViewRoom,room_id:r,metricsTrigger:"SlashCommand",metricsViaKeyboard:!0}),n&&e.sendTextMessage(r,n)})())}}return ne(this.getUsage())},category:ee.actions}),new te({command:"holdcall",description:Object(m.c)("Places the call in the current room on hold"),category:ee.other,isEnabled:()=>!oe(),runFn:function(e,t){const n=M.b.instance.getCallForRoom(e);return n?(n.setRemoteOnHold(!0),re()):ne(Object(m.i)("No active call in this room"))},renderingTypes:[q.a.Room]}),new te({command:"unholdcall",description:Object(m.c)("Takes the call in the current room off hold"),category:ee.other,isEnabled:()=>!oe(),runFn:function(e,t){const n=M.b.instance.getCallForRoom(e);return n?(n.setRemoteOnHold(!1),re()):ne(Object(m.i)("No active call in this room"))},renderingTypes:[q.a.Room]}),new te({command:"converttodm",description:Object(m.c)("Converts the room to a DM"),category:ee.other,isEnabled:()=>!oe(),runFn:function(e,t){const n=h.a.get().getRoom(e);return re(Object(P.c)(n,!0))},renderingTypes:[q.a.Room]}),new te({command:"converttoroom",description:Object(m.c)("Converts the DM to a room"),category:ee.other,isEnabled:()=>!oe(),runFn:function(e,t){const n=h.a.get().getRoom(e);return re(Object(P.c)(n,!1))},renderingTypes:[q.a.Room]}),new te({command:"me",args:"<message>",description:Object(m.c)("Displays action"),category:ee.messages,hideCompletionAfterSpace:!0}),...N.CHAT_EFFECTS.map((e=>new te({command:e.command,description:e.description(),args:"<message>",runFn:function(t,n){let r;return r=n?{msgtype:e.msgType,body:n}:c.makeEmoteMessage(e.fallbackMessage()),p.a.dispatch({action:`effects.${e.command}`}),ie(r)},category:ee.effects,renderingTypes:[q.a.Room]})))],se=new Map;function le(e){if("/"!==(e=e.replace(/\s+$/,""))[0])return{};const t=e.match(/^(\S+?)(?:[ \n]+((.|\n)*))?$/);let n,r;return t?(n=t[1].substring(1).toLowerCase(),r=t[2]):n=e,{cmd:n,args:r}}function ce(e){const{cmd:t,args:n}=le(e);return t&&se.has(t)&&se.get(t).isEnabled()?{cmd:se.get(t),args:n}:{}}ae.forEach((e=>{se.set(e.command,e),e.aliases.forEach((t=>{se.set(t,e)}))}))},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return r})),function(e){e.NOT_SENT="not_sent",e.ENCRYPTING="encrypting",e.SENDING="sending",e.QUEUED="queued",e.SENT="sent",e.CANCELLED="cancelled"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return u}));var r=n(13),i=n.n(r),o=n(187),a=n(354),s=n(158);let l;!function(e){e.New="Poll.new",e.End="Poll.end",e.Update="Poll.update",e.Responses="Poll.Responses",e.Destroy="Poll.Destroy",e.UndecryptableRelations="Poll.UndecryptableRelations"}(l||(l={}));const c=(e,t)=>({responseEvents:e.filter((e=>{if(!e.isDecryptionFailure())return o.d.matches(e.getType())&&e.getTs()<=t}))});class u extends s.b{constructor(e,t,n){if(super(),this.rootEvent=e,this.matrixClient=t,this.room=n,i()(this,"roomId",void 0),i()(this,"pollEvent",void 0),i()(this,"_isFetchingResponses",!1),i()(this,"relationsNextBatch",void 0),i()(this,"responses",null),i()(this,"endEvent",void 0),i()(this,"undecryptableRelationEventIds",new Set),i()(this,"countUndecryptableEvents",(e=>{const t=e.filter((e=>e.isDecryptionFailure())).map((e=>e.getId())),n=this.undecryptableRelationsCount;this.undecryptableRelationEventIds=new Set([...this.undecryptableRelationEventIds,...t]),this.undecryptableRelationsCount!==n&&this.emit(l.UndecryptableRelations,this.undecryptableRelationsCount)})),!this.rootEvent.getRoomId()||!this.rootEvent.getId())throw new Error("Invalid poll start event.");this.roomId=this.rootEvent.getRoomId(),this.pollEvent=this.rootEvent.unstableExtensibleEvent}get pollId(){return this.rootEvent.getId()}get endEventId(){var e;return null===(e=this.endEvent)||void 0===e?void 0:e.getId()}get isEnded(){return!!this.endEvent}get isFetchingResponses(){return this._isFetchingResponses}get undecryptableRelationsCount(){return this.undecryptableRelationEventIds.size}async getResponses(){return this.responses||this.isFetchingResponses||await this.fetchResponses(),this.responses}onNewRelation(e){var t;if(o.a.matches(e.getType())&&this.validateEndEvent(e)&&(this.endEvent=e,this.refilterResponsesOnEnd(),this.emit(l.End)),!this.responses)return;const n=(null===(t=this.endEvent)||void 0===t?void 0:t.getTs())||Number.MAX_SAFE_INTEGER,{responseEvents:r}=c([e],n);this.countUndecryptableEvents([e]),r.length&&(r.forEach((e=>{this.responses.addEvent(e)})),this.emit(l.Responses,this.responses))}async fetchResponses(){var e,t;this._isFetchingResponses=!0;const n=await this.matrixClient.relations(this.roomId,this.rootEvent.getId(),"m.reference",void 0,{from:this.relationsNextBatch||void 0});await Promise.all(n.events.map((e=>this.matrixClient.decryptEventIfNeeded(e))));const r=this.responses||new a.a("m.reference",o.d.name,this.matrixClient,[o.d.altName]),i=n.events.find((e=>o.a.matches(e.getType())));this.validateEndEvent(i)&&(this.endEvent=i,this.refilterResponsesOnEnd(),this.emit(l.End));const s=(null===(e=this.endEvent)||void 0===e?void 0:e.getTs())||Number.MAX_SAFE_INTEGER,{responseEvents:u}=c(n.events,s);u.forEach((e=>{r.addEvent(e)})),this.relationsNextBatch=null!==(t=n.nextBatch)&&void 0!==t?t:void 0,this.responses=r,this.countUndecryptableEvents(n.events),this.relationsNextBatch?this.fetchResponses():this._isFetchingResponses=!1,this.emit(l.Responses,this.responses)}refilterResponsesOnEnd(){var e;if(!this.responses)return;const t=(null===(e=this.endEvent)||void 0===e?void 0:e.getTs())||Number.MAX_SAFE_INTEGER;this.responses.getRelations().forEach((e=>{var n;e.getTs()>t&&(null===(n=this.responses)||void 0===n||n.removeEvent(e))})),this.emit(l.Responses,this.responses)}validateEndEvent(e){if(!e)return!1;if(this.endEvent&&this.endEvent.getTs()<e.getTs())return!1;const t=this.room.currentState,n=e.getSender();return!!n&&(n===this.rootEvent.getSender()||t.maySendRedactionForEvent(this.rootEvent,n))}}},function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return r})),function(e){e.Get="GET",e.Put="PUT",e.Post="POST",e.Delete="DELETE"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"d",(function(){return s})),n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return d}));var r=n(960),i=n(1),o=n(16),a=n(356);function s(e){const t=new AbortController;return setTimeout((()=>{t.abort()}),e),t.signal}function l(e){const t=new AbortController;function n(){for(const t of e)t.removeEventListener("abort",r)}function r(){t.abort(),n()}for(const t of e){if(t.aborted){r();break}t.addEventListener("abort",r)}return{signal:t.signal,cleanup:n}}function c(e,t){var n,i;let o;try{o=function(e){let t;t=u(e)?e.getResponseHeader("Content-Type"):e.headers.get("Content-Type");if(!t)return null;try{return Object(r.parse)(t)}catch(e){throw new Error(`Error parsing Content-Type '${t}': ${e}`)}}(e)}catch(e){return e}return"application/json"===(null===(n=o)||void 0===n?void 0:n.type)&&t?new a.c(JSON.parse(t),e.status,u(e)?e.responseURL:e.url):"text/plain"===(null===(i=o)||void 0===i?void 0:i.type)?new a.b(`Server returned ${e.status} error: ${t}`,e.status):new a.b(`Server returned ${e.status} error`,e.status)}function u(e){return"getResponseHeader"in e}async function d(e,t){let n=0,r=null;for(;n<e;)try{if(n>0){const e=1e3*Math.pow(2,n);i.a.log(`network operation failed ${n} times, retrying in ${e}ms...`),await Object(o.N)(e)}return await t()}catch(e){if(!(e instanceof a.a))throw e;n+=1,r=e}throw r}},function(e,t,n){"use strict";let r,i;n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return a})),function(e){e[e.Stable=0]="Stable",e[e.Unstable=1]="Unstable",e[e.Unsupported=2]="Unsupported"}(r||(r={})),function(e){e.Thread="Thread",e.ThreadUnreadNotifications="ThreadUnreadNotifications",e.LoginTokenRequest="LoginTokenRequest",e.RelationBasedRedactions="RelationBasedRedactions",e.AccountDataDeletion="AccountDataDeletion"}(i||(i={}));const o={[i.Thread]:{unstablePrefixes:["org.matrix.msc3440"],matrixVersion:"v1.3"},[i.ThreadUnreadNotifications]:{unstablePrefixes:["org.matrix.msc3771","org.matrix.msc3773"],matrixVersion:"v1.4"},[i.LoginTokenRequest]:{unstablePrefixes:["org.matrix.msc3882"]},[i.RelationBasedRedactions]:{unstablePrefixes:["org.matrix.msc3912"]},[i.AccountDataDeletion]:{unstablePrefixes:["org.matrix.msc3391"]}};async function a(e){const t=new Map;for(const[l,c]of Object.entries(o)){var n,i,a,s;const o=null!==(n=null===(i=e.versions)||void 0===i?void 0:i.includes(c.matrixVersion||""))&&void 0!==n&&n,u=null!==(a=null===(s=c.unstablePrefixes)||void 0===s?void 0:s.every((t=>{var n;return!0===(null===(n=e.unstable_features)||void 0===n?void 0:n[t])})))&&void 0!==a&&a;o?t.set(l,r.Stable):u?t.set(l,r.Unstable):t.set(l,r.Unsupported)}return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.unsafeStringify=a;var r,i=(r=n(415))&&r.__esModule?r:{default:r};const o=[];for(let e=0;e<256;++e)o.push((e+256).toString(16).slice(1));function a(e,t=0){return(o[e[t+0]]+o[e[t+1]]+o[e[t+2]]+o[e[t+3]]+"-"+o[e[t+4]]+o[e[t+5]]+"-"+o[e[t+6]]+o[e[t+7]]+"-"+o[e[t+8]]+o[e[t+9]]+"-"+o[e[t+10]]+o[e[t+11]]+o[e[t+12]]+o[e[t+13]]+o[e[t+14]]+o[e[t+15]]).toLowerCase()}var s=function(e,t=0){const n=a(e,t);if(!(0,i.default)(n))throw TypeError("Stringified UUID is invalid");return n};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=(r=n(967))&&r.__esModule?r:{default:r};var o=function(e){return"string"==typeof e&&i.default.test(e)};t.default=o},function(e,t,n){"use strict";for(var r=/[\\\"\x00-\x1F]/g,i={},o=0;o<32;++o)i[String.fromCharCode(o)]="\\U"+("0000"+o.toString(16)).slice(-4).toUpperCase();function a(e){return r.lastIndex=0,e.replace(r,(function(e){return i[e]}))}function s(e){switch(typeof e){case"string":return'"'+a(e)+'"';case"number":return isFinite(e)?e:"null";case"boolean":return e;case"object":return null===e?"null":Array.isArray(e)?function(e){for(var t="[",n="",r=0;r<e.length;++r)n+=t,t=",",n+=s(e[r]);return","!=t?"[]":n+"]"}(e):function(e){var t="{",n="",r=Object.keys(e);r.sort();for(var i=0;i<r.length;++i){var o=r[i];n+=t+'"'+a(o)+'":',t=",",n+=s(e[o])}return","!=t?"{}":n+"}"}(e);default:throw new Error("Cannot stringify: "+typeof e)}}i["\b"]="\\b",i["\t"]="\\t",i["\n"]="\\n",i["\f"]="\\f",i["\r"]="\\r",i['"']='\\"',i["\\"]="\\\\",e.exports={stringify:s}},function(e,t,n){"use strict";n.d(t,"d",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return c})),n.d(t,"f",(function(){return u})),n.d(t,"g",(function(){return d}));var r=n(13),i=n.n(r);const o=new Map,a=new Map;class s{constructor(e){i()(this,"userId",void 0),i()(this,"deviceId",void 0),i()(this,"crypto",void 0),i()(this,"olmDevice",void 0),i()(this,"baseApis",void 0),i()(this,"roomId",void 0),this.userId=e.userId,this.deviceId=e.deviceId,this.crypto=e.crypto,this.olmDevice=e.olmDevice,this.baseApis=e.baseApis,this.roomId=e.roomId}prepareToEncrypt(e){}onRoomMembership(e,t,n){}}class l{constructor(e){i()(this,"userId",void 0),i()(this,"crypto",void 0),i()(this,"olmDevice",void 0),i()(this,"baseApis",void 0),i()(this,"roomId",void 0),this.userId=e.userId,this.crypto=e.crypto,this.olmDevice=e.olmDevice,this.baseApis=e.baseApis,this.roomId=e.roomId}async onRoomKeyEvent(e){}async importRoomKey(e,t){}hasKeysForKeyRequest(e){return Promise.resolve(!1)}shareKeysWithDevice(e){throw new Error("shareKeysWithDevice not supported for this DecryptionAlgorithm")}async retryDecryptionFromSender(e){return!1}}class c extends Error{constructor(e,t,n){super(t),this.code=e,i()(this,"detailedString",void 0),this.code=e,this.name="DecryptionError",this.detailedString=function(e,t){let n=e.name+"[msg: "+e.message;t&&(n+=", "+Object.keys(t).map((e=>e+": "+t[e])).join(", "));return n+="]",n}(this,n)}}class u extends Error{constructor(e,t,n){super(e),this.devices=t,this.event=n,this.name="UnknownDeviceError",this.devices=t}}function d(e,t,n){o.set(e,t),a.set(e,n)}},function(e,t,n){"use strict";(function(e){n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return h})),n.d(t,"a",(function(){return p}));var r,i,o,a,s,l,c,u=n(1);let d=null===(r=e.window)||void 0===r?void 0:r.crypto,h=null!==(i=null===(o=e.window)||void 0===o||null===(a=o.crypto)||void 0===a?void 0:a.subtle)&&void 0!==i?i:null===(s=e.window)||void 0===s||null===(l=s.crypto)||void 0===l?void 0:l.webkitSubtle,p=null===(c=e.window)||void 0===c?void 0:c.TextEncoder;if(!d)try{d=n(979).webcrypto}catch(e){u.a.error("Failed to load webcrypto",e)}var m;h||(h=null===(m=d)||void 0===m?void 0:m.subtle);if(!p)try{p=n(503).TextEncoder}catch(e){u.a.error("Failed to load TextEncoder util",e)}}).call(this,n(14))},function(e,t,n){"use strict";(function(e,r){n.d(t,"e",(function(){return u})),n.d(t,"d",(function(){return d})),n.d(t,"b",(function(){return h})),n.d(t,"c",(function(){return p})),n.d(t,"a",(function(){return g}));var i=n(13),o=n.n(i),a=n(420),s=n(361),l=n(199),c=n(1);const u="m.qr_code.show.v1",d="m.qr_code.scan.v1";let h;!function(e){e.ShowReciprocateQr="show_reciprocate_qr"}(h||(h={}));class p extends a.b{constructor(){super(...arguments),o()(this,"reciprocateQREvent",void 0),o()(this,"doVerification",(async()=>{if(!this.startEvent)throw new Error("It is not currently possible to start verificationwith this method yet.");const{qrCodeData:e}=this.request;if(this.startEvent.getContent().secret!==(null==e?void 0:e.encodedSharedSecret))throw Object(s.d)();await new Promise(((e,t)=>{this.reciprocateQREvent={confirm:e,cancel:()=>t(Object(s.h)())},this.emit(h.ShowReciprocateQr,this.reciprocateQREvent)}));const t={};switch(null==e?void 0:e.mode){case m.VerifyOtherUser:{const n=e.otherUserMasterKey;t[`ed25519:${n}`]=n;break}case m.VerifySelfTrusted:{const n=this.request.targetDevice.deviceId;t[`ed25519:${n}`]=e.otherDeviceKey;break}case m.VerifySelfUntrusted:{const n=e.myMasterKey;t[`ed25519:${n}`]=n;break}}await this.verifyKeys(this.userId,t,((e,n,r)=>{const i=t[e];if(!i)throw Object(s.d)();if(r!==i)throw c.a.error("key ID from key info does not match"),Object(s.d)();for(const e in n.keys){if(!e.startsWith("ed25519"))continue;const r=t[e];if(!r)throw Object(s.d)();if(n.keys[e]!==r)throw c.a.error("master key does not match"),Object(s.d)()}}))}))}static factory(e,t,n,r,i,o){return new p(e,t,n,r,i,o)}static get NAME(){return"m.reciprocate.v1"}}var m;!function(e){e[e.VerifyOtherUser=0]="VerifyOtherUser",e[e.VerifySelfTrusted=1]="VerifySelfTrusted",e[e.VerifySelfUntrusted=2]="VerifySelfUntrusted"}(m||(m={}));class g{constructor(e,t,n,r,i,o){this.mode=e,this.sharedSecret=t,this.otherUserMasterKey=n,this.otherDeviceKey=r,this.myMasterKey=i,this.buffer=o}static async create(e,t){const n=g.generateSharedSecret(),r=g.determineMode(e,t);let i=null,o=null,a=null;if(r===m.VerifyOtherUser){i=t.getStoredCrossSigningForUser(e.otherUserId).getId("master")}else if(r===m.VerifySelfTrusted)o=await g.getOtherDeviceKey(e,t);else if(r===m.VerifySelfUntrusted){const e=t.getUserId();a=t.getStoredCrossSigningForUser(e).getId("master")}const s=g.generateQrData(e,t,r,n,i,o,a),l=g.generateBuffer(s);return new g(r,n,i,o,a,l)}get encodedSharedSecret(){return this.sharedSecret}getBuffer(){return this.buffer}static generateSharedSecret(){const t=new Uint8Array(11);return e.crypto.getRandomValues(t),Object(l.encodeUnpaddedBase64)(t)}static async getOtherDeviceKey(e,t){const n=t.getUserId(),r=e.targetDevice,i=r.deviceId?t.getStoredDevice(n,r.deviceId):void 0;if(!i)throw new Error("could not find device "+(null==r?void 0:r.deviceId));return i.getFingerprint()}static determineMode(e,t){const n=t.getUserId(),r=e.otherUserId;let i=m.VerifyOtherUser;if(n===r){i=t.checkUserTrust(n).isCrossSigningVerified()?m.VerifySelfTrusted:m.VerifySelfUntrusted}return i}static generateQrData(e,t,n,r,i,o,a){const s=t.getUserId(),l={prefix:"MATRIX",version:2,mode:n,transactionId:e.channel.transactionId,firstKeyB64:"",secondKeyB64:"",secretB64:r},c=t.getStoredCrossSigningForUser(s);return n===m.VerifyOtherUser?(l.firstKeyB64=c.getId("master"),l.secondKeyB64=i):n===m.VerifySelfTrusted?(l.firstKeyB64=c.getId("master"),l.secondKeyB64=o):n===m.VerifySelfUntrusted&&(l.firstKeyB64=t.getDeviceEd25519Key(),l.secondKeyB64=a),l}static generateBuffer(e){let t=r.alloc(0);const n=e=>{const n=r.from([e]);t=r.concat([t,n])},i=e=>{const n=r.alloc(2);n.writeInt16BE(e,0),t=r.concat([t,n])},o=function(e,n){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const a=r.from(e,n);o&&i(a.byteLength),t=r.concat([t,a])},a=e=>{const n=Object(l.decodeBase64)(e),i=r.from(n);t=r.concat([t,i])};return o(e.prefix,"ascii",!1),n(e.version),n(e.mode),o(e.transactionId,"utf-8"),a(e.firstKeyB64),a(e.secondKeyB64),a(e.secretB64),t}}}).call(this,n(14),n(53).Buffer)},function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"c",(function(){return m})),n.d(t,"b",(function(){return g}));var r=n(13),i=n.n(r),o=n(143),a=n(129),s=n(1),l=n(358),c=n(361),u=n(360),d=n(158);const h=new Error("Verification timed out");class p extends Error{constructor(e){super(),this.startEvent=e}}let m;!function(e){e.Cancel="cancel"}(m||(m={}));class g extends d.b{constructor(e,t,n,r,o,a){super(),this.channel=e,this.baseApis=t,this.userId=n,this.deviceId=r,this.startEvent=o,this.request=a,i()(this,"cancelled",!1),i()(this,"_done",!1),i()(this,"promise",null),i()(this,"transactionTimeoutTimer",null),i()(this,"expectedEvent",void 0),i()(this,"resolve",void 0),i()(this,"reject",void 0),i()(this,"resolveEvent",void 0),i()(this,"rejectEvent",void 0),i()(this,"started",void 0),i()(this,"doVerification",void 0)}get initiatedByMe(){if(!this.startEvent)return!0;const e=this.startEvent.getSender(),t=this.startEvent.getContent();return e===this.baseApis.getUserId()&&t.from_device===this.baseApis.getDeviceId()}get hasBeenCancelled(){return this.cancelled}resetTimer(){s.a.info("Refreshing/starting the verification transaction timeout timer"),null!==this.transactionTimeoutTimer&&clearTimeout(this.transactionTimeoutTimer),this.transactionTimeoutTimer=setTimeout((()=>{this._done||this.cancelled||(s.a.info("Triggering verification timeout"),this.cancel(h))}),6e5)}endTimer(){null!==this.transactionTimeoutTimer&&(clearTimeout(this.transactionTimeoutTimer),this.transactionTimeoutTimer=null)}send(e,t){return this.channel.send(e,t)}waitForEvent(e){if(this._done)return Promise.reject(new Error("Verification is already done"));const t=this.request.getEventFromOtherParty(e);return t?Promise.resolve(t):(this.expectedEvent=e,new Promise(((e,t)=>{this.resolveEvent=e,this.rejectEvent=t})))}canSwitchStartEvent(e){return!1}switchStartEvent(e){if(this.canSwitchStartEvent(e))if(s.a.log("Verification Base: switching verification start event",{restartingFlow:!!this.rejectEvent}),this.rejectEvent){const t=this.rejectEvent;this.rejectEvent=void 0,t(new p(e))}else this.startEvent=e}handleEvent(e){var t;if(!this._done)if(e.getType()===this.expectedEvent)this.expectedEvent!==a.b.KeyVerificationDone&&(this.expectedEvent=void 0,this.rejectEvent=void 0,this.resetTimer(),null===(t=this.resolveEvent)||void 0===t||t.call(this,e));else if(e.getType()===a.b.KeyVerificationCancel){const t=this.reject;if(this.reject=void 0,t){const n=e.getContent(),{reason:r,code:i}=n;t(new Error(`Other side cancelled verification because ${r} (${i})`))}}else if(this.expectedEvent){const t=new Error("Unexpected message: expecting "+this.expectedEvent+" but got "+e.getType());if(this.expectedEvent=void 0,this.rejectEvent){const e=this.rejectEvent;this.rejectEvent=void 0,e(t)}this.cancel(t)}}async done(){var e;if(this.endTimer(),!this._done)return this.request.onVerifierFinished(),null===(e=this.resolve)||void 0===e||e.call(this),Object(u.e)(this.baseApis,this.userId,this.deviceId)}cancel(e){if(this.endTimer(),!this._done){if(this.cancelled=!0,this.request.onVerifierCancelled(),this.userId&&this.deviceId)if(e===h){const e=Object(c.e)();this.send(e.getType(),e.getContent())}else if(e instanceof o.b){if(e.getSender()!==this.userId){const t=e.getContent();e.getType()===a.b.KeyVerificationCancel?(t.code=t.code||"m.unknown",t.reason=t.reason||t.body||"Unknown reason",this.send(a.b.KeyVerificationCancel,t)):this.send(a.b.KeyVerificationCancel,{code:"m.unknown",reason:t.body||"Unknown reason"})}}else this.send(a.b.KeyVerificationCancel,{code:"m.unknown",reason:e.toString()});null!==this.promise?this.reject&&this.reject(e):this.promise=Promise.reject(e),this.emit(m.Cancel,e)}}verify(){var e=this;return this.promise||(this.promise=new Promise(((t,n)=>{this.resolve=function(){e._done=!0,e.endTimer(),t(...arguments)},this.reject=e=>{this._done=!0,this.endTimer(),n(e)}})),this.doVerification&&!this.started&&(this.started=!0,this.resetTimer(),new Promise(((e,t)=>{var n;(null===(n=this.baseApis.crypto.deviceList.getStoredCrossSigningForUser(this.userId))||void 0===n?void 0:n.getId())===this.deviceId&&t(new Error("Device ID is the same as the cross-signing ID")),e()})).then((()=>this.doVerification())).then(this.done.bind(this),this.cancel.bind(this)))),this.promise}async verifyKeys(e,t,n){const r=[];for(const[i,o]of Object.entries(t)){const t=i.split(":",2)[1],a=this.baseApis.getStoredDevice(e,t);if(a)n(i,a,o),r.push([t,i,a.keys[i]]);else{const a=this.baseApis.crypto.deviceList.getStoredCrossSigningForUser(e);a&&a.getId()===t?(n(i,l.a.fromStorage({keys:{[i]:t}},t),o),r.push([t,i,t])):s.a.warn(`verification: Could not find device ${t} to verify`)}}if(!r.length)throw new Error("No devices could be verified");s.a.info("Verification completed! Marking devices verified: ",r);for(const[t,n,i]of r)await this.baseApis.crypto.setDeviceVerification(e,t,!0,null,null,{[n]:i});e==this.baseApis.credentials.userId&&await this.baseApis.checkKeyBackup()}get events(){}}},function(e,t,n){"use strict";(function(e){n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return l})),n.d(t,"a",(function(){return c}));var r=n(223),i=n(418);const o=5e5,a=256;function s(t,n){if(!e.Olm)throw new Error("Olm is not available");if(!t.private_key_salt||!t.private_key_iterations)throw new Error("Salt and/or iterations not found: this backup cannot be restored with a passphrase");return c(n,t.private_key_salt,t.private_key_iterations,t.private_key_bits||a)}async function l(t){if(!e.Olm)throw new Error("Olm is not available");const n=Object(r.b)(32);return{key:await c(t,n,o,a),salt:n,iterations:o}}async function c(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:a;if(!i.c||!i.a)throw new Error("Password-based backup is not available on this platform");const o=await i.c.importKey("raw",(new i.a).encode(e),{name:"PBKDF2"},!1,["deriveBits"]),s=await i.c.deriveBits({name:"PBKDF2",salt:(new i.a).encode(t),iterations:n,hash:"SHA-512"},o,r);return new Uint8Array(s)}}).call(this,n(14))},function(e,t,n){"use strict";(function(e,r){n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s}));var i=n(982);const o=[139,1];function a(t){var n;const r=e.alloc(o.length+t.length+1);r.set(o,0),r.set(t,o.length);let a=0;for(let e=0;e<r.length-1;++e)a^=r[e];r[r.length-1]=a;return null===(n=i.encode(r).match(/.{1,4}/g))||void 0===n?void 0:n.join(" ")}function s(e){const t=i.decode(e.replace(/ /g,""));let n=0;for(const e of t)n^=e;if(0!==n)throw new Error("Incorrect parity");for(let e=0;e<o.length;++e)if(t[e]!==o[e])throw new Error("Incorrect prefix");if(t.length!==o.length+r.Olm.PRIVATE_KEY_LENGTH+1)throw new Error("Incorrect length");return Uint8Array.from(t.slice(o.length,o.length+r.Olm.PRIVATE_KEY_LENGTH))}}).call(this,n(53).Buffer,n(14))},function(e,t,n){"use strict";var r;let i;n.d(t,"a",(function(){return i})),function(e){e.RoomId="room_id",e.Sender="sender"}(r||(r={})),function(e){e.Recent="recent",e.Rank="rank"}(i||(i={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(13),i=n.n(r),o=n(16),a=n(1),s=n(129),l=n(193);const c=!1;class u{static RETRY_BACKOFF_RATELIMIT(e,t,n){if(400===n.httpStatus||403===n.httpStatus||401===n.httpStatus)return-1;if(n instanceof l.b)return-1;if("M_TOO_LARGE"===n.name)return-1;if("M_LIMIT_EXCEEDED"===n.name){const e=n.data.retry_after_ms;if(e>0)return e}return t>4?-1:1e3*Math.pow(2,t)}static QUEUE_MESSAGES(e){return e.getType()===s.b.RoomMessage||e.hasAssociation()?"message":null}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.RETRY_BACKOFF_RATELIMIT,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.QUEUE_MESSAGES;this.retryAlgorithm=e,this.queueAlgorithm=t,i()(this,"queues",{}),i()(this,"activeQueues",[]),i()(this,"procFn",null),i()(this,"processQueue",(e=>{const t=this.peekNextEvent(e);t?(d("Queue '%s' has %s pending events",e,this.queues[e].length),Promise.resolve().then((()=>this.procFn(t.event))).then((n=>{this.removeNextEvent(e),d("Queue '%s' sent event %s",e,t.event.getId()),t.defer.resolve(n),this.processQueue(e)}),(n=>{t.attempts+=1;const r=this.retryAlgorithm(t.event,t.attempts,n);d("retry(%s) err=%s event_id=%s waitTime=%s",t.attempts,n,t.event.getId(),r),-1===r?(d("Queue '%s' giving up on event %s",e,t.event.getId()),this.clearQueue(e,n)):setTimeout(this.processQueue,r,e)}))):this.disableQueue(e)}))}getQueueForEvent(e){const t=this.queueAlgorithm(e);return t&&this.queues[t]?this.queues[t].map((function(e){return e.event})):null}removeEventFromQueue(e){const t=this.queueAlgorithm(e);if(!t||!this.queues[t])return!1;let n=!1;return o.I(this.queues[t],(t=>t.event.getId()===e.getId()&&(n=!0,!0))),n}setProcessFunction(e){this.procFn=e,this.startProcessingQueues()}queueEvent(e){const t=this.queueAlgorithm(e);if(!t)return null;this.queues[t]||(this.queues[t]=[]);const n=o.m();return this.queues[t].push({event:e,defer:n,attempts:0}),d("Queue algorithm dumped event %s into queue '%s'",e.getId(),t),this.startProcessingQueues(),n.promise}startProcessingQueues(){this.procFn&&Object.keys(this.queues).filter((e=>-1===this.activeQueues.indexOf(e)&&this.queues[e].length>0)).forEach((e=>{this.activeQueues.push(e),d("Spinning up queue: '%s'",e),this.processQueue(e)}))}disableQueue(e){const t=this.activeQueues.indexOf(e);t>=0&&this.activeQueues.splice(t,1),d("Stopping queue '%s' as it is now empty",e)}clearQueue(e,t){let n;for(d("clearing queue '%s'",e);n=this.removeNextEvent(e);)n.defer.reject(t);this.disableQueue(e)}peekNextEvent(e){const t=this.queues[e];if(Array.isArray(t))return t[0]}removeNextEvent(e){const t=this.queues[e];if(Array.isArray(t))return t.shift()}}function d(){c&&a.a.log(...arguments)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return d}));var r=n(13),i=n.n(r),o=n(1),a=n(16);const s="m.login.email.identity",l="m.login.msisdn";let c;!function(e){e.Password="m.login.password",e.Recaptcha="m.login.recaptcha",e.Terms="m.login.terms",e.Email="m.login.email.identity",e.Msisdn="m.login.msisdn",e.Sso="m.login.sso",e.SsoUnstable="org.matrix.login.sso",e.Dummy="m.login.dummy",e.RegistrationToken="m.login.registration_token",e.UnstableRegistrationToken="org.matrix.msc3231.login.registration_token"}(c||(c={}));class u extends Error{constructor(e,t,n){super(e),this.required_stages=t,this.flows=n,i()(this,"name","NoAuthFlowFoundError")}}class d{constructor(e){i()(this,"matrixClient",void 0),i()(this,"inputs",void 0),i()(this,"clientSecret",void 0),i()(this,"requestCallback",void 0),i()(this,"busyChangedCallback",void 0),i()(this,"stateUpdatedCallback",void 0),i()(this,"requestEmailTokenCallback",void 0),i()(this,"data",void 0),i()(this,"emailSid",void 0),i()(this,"requestingEmailToken",!1),i()(this,"attemptAuthDeferred",null),i()(this,"chosenFlow",null),i()(this,"currentStage",null),i()(this,"emailAttempt",1),i()(this,"submitPromise",null),i()(this,"requestEmailToken",(async()=>{if(this.requestingEmailToken)o.a.warn("Could not request email token: Already requesting");else{o.a.trace("Requesting email token. Attempt: "+this.emailAttempt),this.requestingEmailToken=!0;try{const e=await this.requestEmailTokenCallback(this.inputs.emailAddress,this.clientSecret,this.emailAttempt++,this.data.session);this.emailSid=e.sid,o.a.trace("Email token request succeeded")}finally{this.requestingEmailToken=!1}}})),this.matrixClient=e.matrixClient,this.data=e.authData||{},this.requestCallback=e.doRequest,this.busyChangedCallback=e.busyChanged,this.stateUpdatedCallback=e.stateUpdated||e.startAuthStage,this.requestEmailTokenCallback=e.requestEmailToken,this.inputs=e.inputs||{},e.sessionId&&(this.data.session=e.sessionId),this.clientSecret=e.clientSecret||this.matrixClient.generateClientSecret(),this.emailSid=e.emailSid}attemptAuth(){var e;this.attemptAuthDeferred=Object(a.m)();const t=this.attemptAuthDeferred.promise;if(null!==(e=this.data)&&void 0!==e&&e.flows)this.startNextAuthStage();else{var n;null===(n=this.busyChangedCallback)||void 0===n||n.call(this,!0);const e=this.data.session?{session:this.data.session}:null;this.doRequest(e).finally((()=>{var e;null===(e=this.busyChangedCallback)||void 0===e||e.call(this,!1)}))}return t}async poll(){if(!this.data.session)return;if(!this.attemptAuthDeferred)return;if(this.submitPromise)return;let e={};if(this.currentStage==s&&this.emailSid){const t={sid:this.emailSid,client_secret:this.clientSecret};if(await this.matrixClient.doesServerRequireIdServerParam()){const e=new URL(this.matrixClient.getIdentityServerUrl());t.id_server=e.host}e={type:s,threepid_creds:t,threepidCreds:t}}this.submitAuthDict(e,!0)}getSessionId(){var e;return null===(e=this.data)||void 0===e?void 0:e.session}getClientSecret(){return this.clientSecret}getStageParams(e){var t;return null===(t=this.data.params)||void 0===t?void 0:t[e]}getChosenFlow(){return this.chosenFlow}async submitAuthDict(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.attemptAuthDeferred)throw new Error("submitAuthDict() called before attemptAuth()");var n;t||(null===(n=this.busyChangedCallback)||void 0===n||n.call(this,!0));for(;this.submitPromise;)try{await this.submitPromise}catch(e){}let r;this.data.session?(r={session:this.data.session},Object.assign(r,e)):r=e;try{this.submitPromise=this.doRequest(r,t),await this.submitPromise}finally{var i;if(this.submitPromise=null,!t)null===(i=this.busyChangedCallback)||void 0===i||i.call(this,!1)}}getEmailSid(){return this.emailSid}setEmailSid(e){this.emailSid=e}async doRequest(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];try{const n=await this.requestCallback(e,t);this.attemptAuthDeferred.resolve(n),this.attemptAuthDeferred=null}catch(e){var n,r,i;const s=null!==(n=null===(r=e.data)||void 0===r?void 0:r.flows)&&void 0!==n?n:null,l=this.data.flows||Boolean(s);var a;if(401!==e.httpStatus||!e.data||!l)if(t)o.a.log("Background poll request failed doing UI auth: ignoring",e);else null===(a=this.attemptAuthDeferred)||void 0===a||a.reject(e);e.data||(e.data={}),e.data.flows||e.data.completed||e.data.session||(e.data.flows=this.data.flows,e.data.completed=this.data.completed,e.data.session=this.data.session),this.data=e.data;try{this.startNextAuthStage()}catch(e){return this.attemptAuthDeferred.reject(e),void(this.attemptAuthDeferred=null)}if(!this.emailSid&&null!==(i=this.chosenFlow)&&void 0!==i&&i.stages.includes(c.Email))try{await this.requestEmailToken()}catch(e){this.attemptAuthDeferred.reject(e),this.attemptAuthDeferred=null}}}startNextAuthStage(){var e,t;const n=this.chooseStage();if(!n)throw new Error("No incomplete flows from the server");var r,i;(this.currentStage=n,n!==c.Dummy)?null!==(e=this.data)&&void 0!==e&&e.errcode||null!==(t=this.data)&&void 0!==t&&t.error?this.stateUpdatedCallback(n,{errcode:(null===(r=this.data)||void 0===r?void 0:r.errcode)||"",error:(null===(i=this.data)||void 0===i?void 0:i.error)||""}):this.stateUpdatedCallback(n,n===s?{emailSid:this.emailSid}:{}):this.submitAuthDict({type:"m.login.dummy"})}chooseStage(){null===this.chosenFlow&&(this.chosenFlow=this.chooseFlow()),o.a.log("Active flow => %s",JSON.stringify(this.chosenFlow));const e=this.firstUncompletedStage(this.chosenFlow);return o.a.log("Next stage: %s",e),e}chooseFlow(){const e=this.data.flows||[],t=Boolean(this.inputs.emailAddress)||Boolean(this.emailSid),n=Boolean(this.inputs.phoneCountry)&&Boolean(this.inputs.phoneNumber);for(const r of e){let e=!1,i=!1;for(const t of r.stages)t===s?e=!0:t==l&&(i=!0);if(e==t&&i==n)return r}const r=[];throw t&&r.push(s),n&&r.push(l),new u("No appropriate authentication flow found",r,e)}firstUncompletedStage(e){const t=this.data.completed||[];return e.stages.find((e=>!t.includes(e)))}}},function(e,t,n){"use strict";var r;!function(e){e.HomePage="home_page",e.RoomView="room_view",e.UserView="user_view"}(r||(r={})),t.a=r},function(e,t,n){"use strict";var r=n(171);Object.defineProperty(t,"__esModule",{value:!0});var i={};t.default=void 0;var o=r(n(997)),a=n(1036);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var s=o.default;t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAllAffectedNodes=void 0;var r=n(254),i=n(273),o=function(e){return e.parentNode?o(e.parentNode):e};t.getAllAffectedNodes=function(e){return(0,i.asArray)(e).filter(Boolean).reduce((function(e,t){var n=t.getAttribute(r.FOCUS_GROUP);return e.push.apply(e,n?function(e){for(var t=new Set,n=e.length,r=0;r<n;r+=1)for(var i=r+1;i<n;i+=1){var o=e[r].compareDocumentPosition(e[i]);(o&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter((function(e,n){return!t.has(n)}))}((0,i.toArray)(o(t).querySelectorAll("[".concat(r.FOCUS_GROUP,'="').concat(n,'"]:not([').concat(r.FOCUS_DISABLED,'="disabled"])')))):[t]),e}),[])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getActiveElement=void 0;var r=n(1029);t.getActiveElement=function(e){if(void 0===e&&(e=document),e&&e.activeElement){var n=e.activeElement;return n.shadowRoot?(0,t.getActiveElement)(n.shadowRoot):n instanceof HTMLIFrameElement&&(0,r.safeProbe)((function(){return n.contentWindow.document}))?(0,t.getActiveElement)(n.contentWindow.document):n}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deferAction=function(e){var t=window.setImmediate;void 0!==t?t(e):setTimeout(e,1)},t.inlineProp=void 0;t.inlineProp=function(e,t){var n={};return n[e]=t,n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(13),i=n.n(r),o=n(324);class a extends o.a{static set matrixClient(e){const t=a._matrixClient;a._matrixClient=e;for(const n of a.instances)n.initMatrixClient(t,e)}constructor(){super(),a.instances.push(this)}get client(){return a._matrixClient}}i()(a,"_matrixClient",void 0),i()(a,"instances",[])},function(e,t,n){"use strict";n.d(t,"f",(function(){return p})),n.d(t,"a",(function(){return m})),n.d(t,"e",(function(){return g})),n.d(t,"c",(function(){return b})),n.d(t,"d",(function(){return v})),n.d(t,"b",(function(){return y}));var r=n(510),i=n(492),o=n(225),a=n(1);const s=window.localStorage;let l;try{l=window.indexedDB}catch(e){}const c="riot-web-sync",u="matrix-js-sdk:crypto";function d(e){a.a.log(`StorageManager: ${e}`)}function h(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];a.a.error(`StorageManager: ${e}`,...n)}function p(){navigator.storage&&navigator.storage.persist?navigator.storage.persist().then((e=>{a.a.log("StorageManager: Persistent?",e)})):document.requestStorageAccess?document.requestStorageAccess().then((()=>a.a.log("StorageManager: Persistent?",!0)),(()=>a.a.log("StorageManager: Persistent?",!1))):a.a.log("StorageManager: Persistence unsupported")}async function m(){d("Checking storage consistency"),d(`Local storage supported? ${!!s}`),d(`IndexedDB supported? ${!!l}`);let e=!1,t=!1,n=!1,a=!0;if(s?(e=s.length>0,d(`Local storage contains data? ${e}`),n=!!s.getItem("mx_crypto_initialised"),d(`Crypto initialised? ${n}`)):(a=!1,h("Local storage cannot be used on this browser")),l&&s){(await async function(){let e=!1;try{return e=await i.a.exists(l,c),d(`Sync store using IndexedDB contains data? ${e}`),{exists:e,healthy:!0}}catch(e){h("Sync store using IndexedDB inaccessible",e)}return d("Sync store using memory only"),{exists:e,healthy:!1}}()).healthy||(a=!1)}else a=!1,h("Sync store cannot be used on this browser");if(l){const e=await async function(){let e=!1;try{return e=await o.a.exists(l,u),d(`Crypto store using IndexedDB contains data? ${e}`),{exists:e,healthy:!0}}catch(e){h("Crypto store using IndexedDB inaccessible",e)}try{return e=r.a.exists(s),d(`Crypto store using local storage contains data? ${e}`),{exists:e,healthy:!0}}catch(e){h("Crypto store using local storage inaccessible",e)}return d("Crypto store using memory only"),{exists:e,healthy:!1}}();t=e.exists,e.healthy||(a=!1)}else a=!1,h("Crypto store cannot be used on this browser");return e&&n&&!t&&(a=!1,h("Data exists in local storage and crypto is marked as initialised but no data found in crypto store. IndexedDB storage has likely been evicted by the browser!")),a?d("Storage consistency checks passed"):h("Storage consistency checks failed"),{dataInLocalStorage:e,dataInCryptoStore:t,cryptoInited:n,healthy:a}}function g(e){s.setItem("mx_crypto_initialised",String(e))}let f=null;async function _(){if(!l)throw new Error("IndexedDB not available");f=await new Promise(((e,t)=>{const n=l.open("matrix-react-sdk",1);n.onerror=t,n.onsuccess=()=>{e(n.result)},n.onupgradeneeded=()=>{const e=n.result;e.createObjectStore("pickleKey"),e.createObjectStore("account")}}))}async function b(e,t){return f||await _(),new Promise(((n,r)=>{const i=f.transaction([e],"readonly");i.onerror=r;const o=i.objectStore(e).get(t);o.onerror=r,o.onsuccess=e=>{n(o.result)}}))}async function v(e,t,n){return f||await _(),new Promise(((r,i)=>{const o=f.transaction([e],"readwrite");o.onerror=i;const a=o.objectStore(e).put(n,t);a.onerror=i,a.onsuccess=e=>{r()}}))}async function y(e,t){return f||await _(),new Promise(((n,r)=>{const i=f.transaction([e],"readwrite");i.onerror=r;const o=i.objectStore(e).delete(t);o.onerror=r,o.onsuccess=()=>{n()}}))}},function(e,t,n){"use strict";n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return l})),n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return u}));var r=n(271),i=n(1),o=n(131),a=n(122);function s(){return o.b.get("validated_server_config").isUrl}function l(){const e=s();a.a.get().setAccountData("m.identity_server",{base_url:e})}async function c(e){var t;let n;try{n=await a.a.get().getTerms(r.a.IS,e)}catch(e){if(i.a.error(e),"rejected"!==e.cors&&404!==e.httpStatus)throw e;n=null}return!(null===(t=n)||void 0===t||!t.policies)&&Object.keys(n.policies).length>0}function u(){const e=a.a.get().getAccountData("m.identity_server");return e&&e.getContent()&&e.getContent().base_url}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));const r=/^\S+@\S+\.\S+$/,i=/^@\S+:\S+$/,o=/^!\S+:\S+$/;let a;function s(e){return r.test(e)?a.Email:i.test(e)?a.MatrixUserId:o.test(e)?a.MatrixRoomId:null}!function(e){e.Email="email",e.MatrixUserId="mx-user-id",e.MatrixRoomId="mx-room-id"}(a||(a={}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return u}));var r=n(129),i=n(122),o=n(436),a=n(242);function s(e){const t=e.getType(),n=e.getContent(),i=e.getPrevContent();return t===r.b.RoomMember&&i.membership!==n.membership||(t!==r.b.RoomMember||i.displayname===n.displayname)&&(t!==r.b.RoomMember||i.avatar_url===n.avatar_url)}const l=e=>{let t="";i.a.get()&&(t=i.a.get().getUserId());const n={};return e.sort(((e,r)=>{var i,o;const a=null!==(i=n[e.roomId])&&void 0!==i?i:c(e,t),s=null!==(o=n[r.roomId])&&void 0!==o?o:c(r,t);return n[e.roomId]=a,n[r.roomId]=s,s-a}))},c=(e,t)=>{const n=(()=>{var n,i;if(null==e||!e.timeline)return Number.MAX_SAFE_INTEGER;if(Object(a.b)(e.getMyMembership())!==a.a.Join){const n=e.currentState.getStateEvents(r.b.RoomMember,t);if(n&&!Array.isArray(n))return n.getTs()}for(let n=e.timeline.length-1;n>=0;--n){const r=e.timeline[n];if(r.getTs()&&(r.getSender()===t&&s(r)||o.c(r)))return r.getTs()}return null!==(n=null===(i=e.timeline[0])||void 0===i?void 0:i.getTs())&&void 0!==n?n:Number.MAX_SAFE_INTEGER})(),i=e.getThreads().map((e=>{var t,n;const r=null!==(t=e.replyToEvent)&&void 0!==t?t:e.rootEvent;return null!==(n=null==r?void 0:r.getTs())&&void 0!==n?n:0}));return Math.max(n,...i)};class u{sortRooms(e,t){return l(e)}getLastTs(e,t){return c(e,t)}}},function(e,t,n){"use strict";n.d(t,"c",(function(){return c})),n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d}));var r=n(129),i=n(204),o=n(122),a=n(370),s=n(238),l=n(125);function c(e){if(e.getSender()===o.a.get().credentials.userId)return!1;switch(e.getType()){case r.b.RoomMember:case r.b.RoomThirdPartyInvite:case r.b.CallAnswer:case r.b.CallHangup:case r.b.RoomCanonicalAlias:case r.b.RoomServerAcl:case i.a.name:case i.a.altName:return!1}return!e.isRedacted()&&Object(s.c)(e,!1)}function u(e){if(l.b.getValue("feature_sliding_sync"))return!1;for(const t of[e,...e.getThreads()])if(d(t))return!0;return!1}function d(e){var t;if(!e||0===e.timeline.length)return!1;const n=o.a.get().getUserId();if((null===(t=e.timeline[e.timeline.length-1])||void 0===t?void 0:t.getSender())===n)return!1;const r=e.getEventReadUpTo(n);for(let t=e.timeline.length-1;t>=0;--t){const n=e.timeline[t];if(n.getId()==r)return!1;if(!Object(a.a)(n)&&c(n))return!0}return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ERR=void 0,function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"}(t.ERR||(t.ERR={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(121);let i;!function(e){e.MapStyleUrlNotConfigured="MapStyleUrlNotConfigured",e.MapStyleUrlNotReachable="MapStyleUrlNotReachable",e.Default="Default"}(i||(i={}));const o=e=>{switch(e){case i.MapStyleUrlNotConfigured:return Object(r.a)("This homeserver is not configured to display maps.");case i.MapStyleUrlNotReachable:default:return Object(r.a)("This homeserver is not configured correctly to display maps, or the configured map server may be unreachable.")}}},function(e,t,n){const r=n(720),i=n(1100),{isPlainObject:o}=n(1101),a=n(1102),s=n(1103),{parse:l}=n(1104),c=["img","audio","video","picture","svg","object","map","iframe","embed"],u=["script","style"];function d(e,t){e&&Object.keys(e).forEach((function(n){t(e[n],n)}))}function h(e,t){return{}.hasOwnProperty.call(e,t)}function p(e,t){const n=[];return d(e,(function(e){t(e)&&n.push(e)})),n}e.exports=g;const m=/^[^\0\t\n\f\r /<=>]+$/;function g(e,t,n){if(null==e)return"";"number"==typeof e&&(e=e.toString());let _="",b="";function v(e,t){const n=this;this.tag=e,this.attribs=t||{},this.tagPosition=_.length,this.text="",this.mediaChildren=[],this.updateParentNodeText=function(){if(O.length){O[O.length-1].text+=n.text}},this.updateParentNodeMediaChildren=function(){if(O.length&&c.includes(this.tag)){O[O.length-1].mediaChildren.push(this.tag)}}}(t=Object.assign({},g.defaults,t)).parser=Object.assign({},f,t.parser);const y=function(e){return!1===t.allowedTags||(t.allowedTags||[]).indexOf(e)>-1};u.forEach((function(e){y(e)&&!t.allowVulnerableTags&&console.warn(`\n\n⚠️ Your \`allowedTags\` option includes, \`${e}\`, which is inherently\nvulnerable to XSS attacks. Please remove it from \`allowedTags\`.\nOr, to disable this warning, add the \`allowVulnerableTags\` option\nand ensure you are accounting for this risk.\n\n`)}));const E=t.nonTextTags||["script","style","textarea","option"];let S,w;t.allowedAttributes&&(S={},w={},d(t.allowedAttributes,(function(e,t){S[t]=[];const n=[];e.forEach((function(e){"string"==typeof e&&e.indexOf("*")>=0?n.push(i(e).replace(/\\\*/g,".*")):S[t].push(e)})),n.length&&(w[t]=new RegExp("^("+n.join("|")+")$"))})));const T={},C={},x={};d(t.allowedClasses,(function(e,t){S&&(h(S,t)||(S[t]=[]),S[t].push("class")),T[t]=[],x[t]=[];const n=[];e.forEach((function(e){"string"==typeof e&&e.indexOf("*")>=0?n.push(i(e).replace(/\\\*/g,".*")):e instanceof RegExp?x[t].push(e):T[t].push(e)})),n.length&&(C[t]=new RegExp("^("+n.join("|")+")$"))}));const F={};let D,k,O,I,A,R,N;d(t.transformTags,(function(e,t){let n;"function"==typeof e?n=e:"string"==typeof e&&(n=g.simpleTransform(e)),"*"===t?D=n:F[t]=n}));let M=!1;L();const P=new r.Parser({onopentag:function(e,n){if(t.enforceHtmlBoundary&&"html"===e&&L(),R)return void N++;const r=new v(e,n);O.push(r);let i=!1;const c=!!r.text;let u;if(h(F,e)&&(u=F[e](e,n),r.attribs=n=u.attribs,void 0!==u.text&&(r.innerText=u.text),e!==u.tagName&&(r.name=e=u.tagName,A[k]=u.tagName)),D&&(u=D(e,n),r.attribs=n=u.attribs,e!==u.tagName&&(r.name=e=u.tagName,A[k]=u.tagName)),(!y(e)||"recursiveEscape"===t.disallowedTagsMode&&!function(e){for(const t in e)if(h(e,t))return!1;return!0}(I)||null!=t.nestingLimit&&k>=t.nestingLimit)&&(i=!0,I[k]=!0,"discard"===t.disallowedTagsMode&&-1!==E.indexOf(e)&&(R=!0,N=1),I[k]=!0),k++,i){if("discard"===t.disallowedTagsMode)return;b=_,_=""}_+="<"+e,"script"===e&&(t.allowedScriptHostnames||t.allowedScriptDomains)&&(r.innerText=""),(!S||h(S,e)||S["*"])&&d(n,(function(n,i){if(!m.test(i))return void delete r.attribs[i];let c=!1;if(!S||h(S,e)&&-1!==S[e].indexOf(i)||S["*"]&&-1!==S["*"].indexOf(i)||h(w,e)&&w[e].test(i)||w["*"]&&w["*"].test(i))c=!0;else if(S&&S[e])for(const t of S[e])if(o(t)&&t.name&&t.name===i){c=!0;let e="";if(!0===t.multiple){const r=n.split(" ");for(const n of r)-1!==t.values.indexOf(n)&&(""===e?e=n:e+=" "+n)}else t.values.indexOf(n)>=0&&(e=n);n=e}if(c){if(-1!==t.allowedSchemesAppliedToAttributes.indexOf(i)&&U(e,n))return void delete r.attribs[i];if("script"===e&&"src"===i){let e=!0;try{const r=j(n);if(t.allowedScriptHostnames||t.allowedScriptDomains){const n=(t.allowedScriptHostnames||[]).find((function(e){return e===r.url.hostname})),i=(t.allowedScriptDomains||[]).find((function(e){return r.url.hostname===e||r.url.hostname.endsWith(`.${e}`)}));e=n||i}}catch(t){e=!1}if(!e)return void delete r.attribs[i]}if("iframe"===e&&"src"===i){let e=!0;try{const r=j(n);if(r.isRelativeUrl)e=h(t,"allowIframeRelativeUrls")?t.allowIframeRelativeUrls:!t.allowedIframeHostnames&&!t.allowedIframeDomains;else if(t.allowedIframeHostnames||t.allowedIframeDomains){const n=(t.allowedIframeHostnames||[]).find((function(e){return e===r.url.hostname})),i=(t.allowedIframeDomains||[]).find((function(e){return r.url.hostname===e||r.url.hostname.endsWith(`.${e}`)}));e=n||i}}catch(t){e=!1}if(!e)return void delete r.attribs[i]}if("srcset"===i)try{let e=s(n);if(e.forEach((function(e){U("srcset",e.url)&&(e.evil=!0)})),e=p(e,(function(e){return!e.evil})),!e.length)return void delete r.attribs[i];n=p(e,(function(e){return!e.evil})).map((function(e){if(!e.url)throw new Error("URL missing");return e.url+(e.w?` ${e.w}w`:"")+(e.h?` ${e.h}h`:"")+(e.d?` ${e.d}x`:"")})).join(", "),r.attribs[i]=n}catch(e){return void delete r.attribs[i]}if("class"===i){const t=T[e],o=T["*"],s=C[e],l=x[e],c=[s,C["*"]].concat(l).filter((function(e){return e}));if(!(n=G(n,t&&o?a(t,o):t||o,c)).length)return void delete r.attribs[i]}if("style"===i)if(t.parseStyleAttributes)try{const o=function(e,t){if(!t)return e;const n=e.nodes[0];let r;r=t[n.selector]&&t["*"]?a(t[n.selector],t["*"]):t[n.selector]||t["*"];r&&(e.nodes[0].nodes=n.nodes.reduce(function(e){return function(t,n){if(h(e,n.prop)){e[n.prop].some((function(e){return e.test(n.value)}))&&t.push(n)}return t}}(r),[]));return e}(l(e+" {"+n+"}"),t.allowedStyles);if(n=function(e){return e.nodes[0].nodes.reduce((function(e,t){return e.push(`${t.prop}:${t.value}${t.important?" !important":""}`),e}),[]).join(";")}(o),0===n.length)return void delete r.attribs[i]}catch(t){return console.warn('Failed to parse "'+e+" {"+n+"}\", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547"),void delete r.attribs[i]}else if(t.allowedStyles)throw new Error("allowedStyles option cannot be used together with parseStyleAttributes: false.");_+=" "+i,n&&n.length&&(_+='="'+B(n,!0)+'"')}else delete r.attribs[i]})),-1!==t.selfClosing.indexOf(e)?_+=" />":(_+=">",!r.innerText||c||t.textFilter||(_+=B(r.innerText),M=!0)),i&&(_=b+B(_),b="")},ontext:function(e){if(R)return;const n=O[O.length-1];let r;if(n&&(r=n.tag,e=void 0!==n.innerText?n.innerText:e),"discard"!==t.disallowedTagsMode||"script"!==r&&"style"!==r){const n=B(e,!1);t.textFilter&&!M?_+=t.textFilter(n,r):M||(_+=n)}else _+=e;if(O.length){O[O.length-1].text+=e}},onclosetag:function(e,n){if(R){if(N--,N)return;R=!1}const r=O.pop();if(!r)return;if(r.tag!==e)return void O.push(r);R=!!t.enforceHtmlBoundary&&"html"===e,k--;const i=I[k];if(i){if(delete I[k],"discard"===t.disallowedTagsMode)return void r.updateParentNodeText();b=_,_=""}A[k]&&(e=A[k],delete A[k]),t.exclusiveFilter&&t.exclusiveFilter(r)?_=_.substr(0,r.tagPosition):(r.updateParentNodeMediaChildren(),r.updateParentNodeText(),-1!==t.selfClosing.indexOf(e)||n&&!y(e)&&["escape","recursiveEscape"].indexOf(t.disallowedTagsMode)>=0?i&&(_=b,b=""):(_+="</"+e+">",i&&(_=b+B(_),b=""),M=!1))}},t.parser);return P.write(e),P.end(),_;function L(){_="",k=0,O=[],I={},A={},R=!1,N=0}function B(e,n){return"string"!=typeof e&&(e+=""),t.parser.decodeEntities&&(e=e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),n&&(e=e.replace(/"/g,"""))),e=e.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&").replace(/</g,"<").replace(/>/g,">"),n&&(e=e.replace(/"/g,""")),e}function U(e,n){for(n=n.replace(/[\x00-\x20]+/g,"");;){const e=n.indexOf("\x3c!--");if(-1===e)break;const t=n.indexOf("--\x3e",e+4);if(-1===t)break;n=n.substring(0,e)+n.substring(t+3)}const r=n.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!r)return!!n.match(/^[/\\]{2}/)&&!t.allowProtocolRelative;const i=r[1].toLowerCase();return h(t.allowedSchemesByTag,e)?-1===t.allowedSchemesByTag[e].indexOf(i):!t.allowedSchemes||-1===t.allowedSchemes.indexOf(i)}function j(e){if((e=e.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//")).startsWith("relative:"))throw new Error("relative: exploit attempt");let t="relative://relative-site";for(let e=0;e<100;e++)t+=`/${e}`;const n=new URL(e,t);return{isRelativeUrl:n&&"relative-site"===n.hostname&&"relative:"===n.protocol,url:n}}function G(e,t,n){return t?(e=e.split(/\s+/)).filter((function(e){return-1!==t.indexOf(e)||n.some((function(t){return t.test(e)}))})).join(" "):e}}const f={decodeEntities:!0};g.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0},g.simpleTransform=function(e,t,n){return n=void 0===n||n,t=t||{},function(r,i){let o;if(n)for(o in t)i[o]=t[o];else i=t;return{tagName:e,attribs:i}}}},function(e,t,n){"use strict";let r=n(441);class i extends r{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}e.exports=i,i.default=i},function(e,t,n){"use strict";let{isClean:r,my:i}=n(540),o=n(539),a=n(726),s=n(442);function l(e,t){let n=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if("proxyCache"===r)continue;let i=e[r],o=typeof i;"parent"===r&&"object"===o?t&&(n[r]=t):"source"===r?n[r]=i:Array.isArray(i)?n[r]=i.map((e=>l(e,n))):("object"===o&&null!==i&&(i=l(i)),n[r]=i)}return n}class c{constructor(e={}){this.raws={},this[r]=!1,this[i]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let n of e[t])"function"==typeof n.clone?this.append(n.clone()):this.append(n)}else this[t]=e[t]}error(e,t={}){if(this.source){let{start:n,end:r}=this.rangeBy(t);return this.source.input.error(e,{line:n.line,column:n.column},{line:r.line,column:r.column},t)}return new o(e)}warn(e,t,n){let r={node:this};for(let e in n)r[e]=n[e];return e.warn(t,r)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}toString(e=s){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}assign(e={}){for(let t in e)this[t]=e[t];return this}clone(e={}){let t=l(this);for(let n in e)t[n]=e[n];return t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let r of e)r===this?n=!0:n?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);n||this.remove()}return this}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}before(e){return this.parent.insertBefore(this,e),this}after(e){return this.parent.insertAfter(this,e),this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}raw(e,t){return(new a).raw(this,e,t)}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}toJSON(e,t){let n={},r=null==t;t=t||new Map;let i=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let r=this[e];if(Array.isArray(r))n[e]=r.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof r&&r.toJSON)n[e]=r.toJSON(null,t);else if("source"===e){let o=t.get(r.input);null==o&&(o=i,t.set(r.input,i),i++),n[e]={inputId:o,start:r.start,end:r.end}}else n[e]=r}return r&&(n.inputs=[...t.keys()].map((e=>e.toJSON()))),n}positionInside(e){let t=this.toString(),n=this.source.start.column,r=this.source.start.line;for(let i=0;i<e;i++)"\n"===t[i]?(n=1,r+=1):n+=1;return{line:r,column:n}}positionBy(e){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let n=this.toString().indexOf(e.word);-1!==n&&(t=this.positionInside(n))}return t}rangeBy(e){let t={line:this.source.start.line,column:this.source.start.column},n=this.source.end?{line:this.source.end.line,column:this.source.end.column+1}:{line:t.line,column:t.column+1};if(e.word){let r=this.toString().indexOf(e.word);-1!==r&&(t=this.positionInside(r),n=this.positionInside(r+e.word.length))}else e.start?t={line:e.start.line,column:e.start.column}:e.index&&(t=this.positionInside(e.index)),e.end?n={line:e.end.line,column:e.end.column}:e.endIndex?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={line:t.line,column:t.column+1}),{start:t,end:n}}getProxyProcessor(){return{set:(e,t,n)=>(e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0),get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t]}}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}markDirty(){if(this[r]){this[r]=!1;let e=this;for(;e=e.parent;)e[r]=!1}}get proxyOf(){return this}}e.exports=c,c.default=c},function(e,t,n){"use strict";let r=n(726);function i(e,t){new r(t).stringify(e)}e.exports=i,i.default=i},function(e,t,n){"use strict";let{SourceMapConsumer:r,SourceMapGenerator:i}=n(541),{fileURLToPath:o,pathToFileURL:a}=n(729),{resolve:s,isAbsolute:l}=n(542),{nanoid:c}=n(1106),u=n(725),d=n(539),h=n(730),p=Symbol("fromOffsetCache"),m=Boolean(r&&i),g=Boolean(s&&l);class f{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!g||/^\w+:\/\//.test(t.from)||l(t.from)?this.file=t.from:this.file=s(t.from)),g&&m){let e=new h(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+c(6)+">"),this.map&&(this.map.file=this.from)}fromOffset(e){let t,n;if(this[p])n=this[p];else{let e=this.css.split("\n");n=new Array(e.length);let t=0;for(let r=0,i=e.length;r<i;r++)n[r]=t,t+=e[r].length+1;this[p]=n}t=n[n.length-1];let r=0;if(e>=t)r=n.length-1;else{let t,i=n.length-2;for(;r<i;)if(t=r+(i-r>>1),e<n[t])i=t-1;else{if(!(e>=n[t+1])){r=t;break}r=t+1}}return{line:r+1,col:e-n[r]+1}}error(e,t,n,r={}){let i,o,s;if(t&&"object"==typeof t){let e=t,r=n;if("number"==typeof e.offset){let r=this.fromOffset(e.offset);t=r.line,n=r.col}else t=e.line,n=e.column;if("number"==typeof r.offset){let e=this.fromOffset(r.offset);o=e.line,s=e.col}else o=r.line,s=r.column}else if(!n){let e=this.fromOffset(t);t=e.line,n=e.col}let l=this.origin(t,n,o,s);return i=l?new d(e,void 0===l.endLine?l.line:{line:l.line,column:l.column},void 0===l.endLine?l.column:{line:l.endLine,column:l.endColumn},l.source,l.file,r.plugin):new d(e,void 0===o?t:{line:t,column:n},void 0===o?n:{line:o,column:s},this.css,this.file,r.plugin),i.input={line:t,column:n,endLine:o,endColumn:s,source:this.css},this.file&&(a&&(i.input.url=a(this.file).toString()),i.input.file=this.file),i}origin(e,t,n,r){if(!this.map)return!1;let i,s,c=this.map.consumer(),u=c.originalPositionFor({line:e,column:t});if(!u.source)return!1;"number"==typeof n&&(i=c.originalPositionFor({line:n,column:r})),s=l(u.source)?a(u.source):new URL(u.source,this.map.consumer().sourceRoot||a(this.map.mapFile));let d={url:s.toString(),line:u.line,column:u.column,endLine:i&&i.line,endColumn:i&&i.column};if("file:"===s.protocol){if(!o)throw new Error("file: protocol is not available in this PostCSS build");d.file=o(s)}let h=c.sourceContentFor(u.source);return h&&(d.source=h),d}mapResolve(e){return/^\w+:\/\//.test(e)?e:s(this.map.consumer().sourceRoot||this.map.root||".",e)}get from(){return this.file||this.id}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}}e.exports=f,f.default=f,u&&u.registerInput&&u.registerInput(f)},function(e,t,n){"use strict";let r=n(441);class i extends r{constructor(e){super(e),this.type="comment"}}e.exports=i,i.default=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(130),i=n.n(r),o=n(132),a=n.n(o),s=n(120),l=n.n(s),c=n(169);const u=["children","label","active","disabled"],d=e=>{let{children:t,label:n,active:r,disabled:o}=e,s=a()(e,u);return l.a.createElement(c.a,i()({},s,{role:"menuitemradio","aria-checked":r,"aria-disabled":o,disabled:o,"aria-label":n}),t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(143),i=n(1),o=n(122),a=n(124);class s{static resendUnsentEvents(e){return Promise.all(e.getPendingEvents().filter((function(e){return e.status===r.a.NOT_SENT})).map((function(e){return s.resend(e)})))}static cancelUnsentEvents(e){e.getPendingEvents().filter((function(e){return e.status===r.a.NOT_SENT})).forEach((function(e){s.removeFromQueue(e)}))}static resend(e){const t=o.a.get().getRoom(e.getRoomId());return o.a.get().resendEvent(e,t).then((function(t){a.a.dispatch({action:"message_sent",event:e})}),(function(e){i.a.log("Resend got send failure: "+e.name+"("+e+")")}))}static removeFromQueue(e){o.a.get().cancelPendingEvent(e)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));class r{constructor(e){this.wireFormat=e}get wireContent(){return this.wireFormat.content}}},function(e,t,n){"use strict";n.d(t,"f",(function(){return d})),n.d(t,"d",(function(){return h})),n.d(t,"e",(function(){return p})),n.d(t,"a",(function(){return g})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return _}));var r=n(120),i=n.n(r),o=n(121),a=n(139),s=n(233),l=n(133),c=n(200),u=n(555);const d=e=>JSON.stringify(e,null,2),h=e=>({id:"eventType",label:Object(o.c)("Event Type"),default:e}),p=e=>({id:"stateKey",label:Object(o.c)("State Key"),default:e}),m=Object(c.a)({deriveData(e){let{value:t}=e;try{JSON.parse(t)}catch(e){return e}},rules:[{key:"validJson",test:(e,t)=>{let{value:n}=e;return!n||!t},invalid:e=>Object(o.a)("Doesn't look like valid JSON.")+" "+e}]}),g=e=>{let{fieldDefs:t,defaultContent:n="{\n\n}",onSend:l,onBack:c}=e;const[u,d]=Object(r.useState)(t.map((e=>{var t;return null!==(t=e.default)&&void 0!==t?t:""}))),[h,p]=Object(r.useState)(n),g=Object(r.useRef)(),f=t.map(((e,t)=>i.a.createElement(a.a,{key:e.id,id:e.id,label:Object(o.a)(e.label),size:42,autoFocus:void 0===n&&0===t,type:"text",autoComplete:"on",value:u[t],onChange:e=>d((n=>(n[t]=e.target.value,[...n])))})));return i.a.createElement(s.b,{actionLabel:Object(o.a)("Send"),onAction:async()=>{if(!await g.current.validate({}))return g.current.focus(),void g.current.validate({focused:!0});try{const e=JSON.parse(h);await l(u,e)}catch(e){return Object(o.a)("Failed to send event!")+` (${e.toString()})`}return Object(o.a)("Event sent!")},onBack:c},i.a.createElement("div",{className:"mx_DevTools_eventTypeStateKeyGroup"},f),i.a.createElement(a.a,{id:"evContent",label:Object(o.a)("Event Content"),type:"text",className:"mx_DevTools_textarea",autoComplete:"off",value:h,onChange:e=>p(e.target.value),element:"textarea",onValidate:m,ref:g,autoFocus:!!n}))},f=e=>{let{mxEvent:t,onBack:n,Editor:a}=e;const[l,c]=Object(r.useState)(!1);if(l){const e=()=>{c(!1)};return i.a.createElement(a,{mxEvent:t,onBack:e})}return i.a.createElement(s.b,{onBack:n,actionLabel:Object(o.a)("Edit"),onAction:async()=>{c(!0)}},i.a.createElement(u.a,{language:"json"},d(t.event)))},_=e=>{let{mxEvent:t,onBack:n}=e;const o=Object(r.useContext)(s.a),a=Object(r.useContext)(l.a),c=Object(r.useMemo)((()=>[h(null==t?void 0:t.getType())]),[t]);let u;if(t){var p,m;const e=t.getContent(),n=null!==(p=null===(m=e["m.new_content"])||void 0===m?void 0:m.body)&&void 0!==p?p:e.body,r={body:` * ${n}`,msgtype:e.msgtype,"m.new_content":{body:n,msgtype:e.msgtype},"m.relates_to":{rel_type:"m.replace",event_id:(f=t,null!==(b=null===(v=(null!==(_=f.replacingEvent())&&void 0!==_?_:f).getWireContent()["m.relates_to"])||void 0===v?void 0:v.event_id)&&void 0!==b?b:f.getId())}};u=d(r)}var f,_,b,v;return i.a.createElement(g,{fieldDefs:c,defaultContent:u,onSend:(e,t)=>{let[n]=e;return a.sendEvent(o.room.roomId,n,t)},onBack:n})}},function(e,t,n){"use strict";var r=n(13),i=n.n(r),o=n(132),a=n.n(o),s=n(120),l=n(1309),c=n(126),u=n.n(c),d=n(121),h=n(134);const p=["data","className"];function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const f={errorCorrectionLevel:"L"};t.a=e=>{let{data:t,className:n}=e,r=a()(e,p);const[i,o]=s.useState(null);return s.useEffect((()=>{let e=!1;return Object(l.toDataURL)(t,g(g({},f),r)).then((t=>{e||o(t)})),()=>{e=!0}}),[JSON.stringify(t),r]),s.createElement("div",{className:u()("mx_QRCode",n)},i?s.createElement("img",{src:i,className:"mx_VerificationQRCode",alt:Object(d.a)("QR Code")}):s.createElement(h.a,null))}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return j}));var r=n(130),i=n.n(r),o=n(13),a=n.n(o),s=n(120),l=n.n(s),c=n(140),u=n(126),d=n.n(u),h=n(169),p=n(123),m=n(124),g=n(128),f=n(121),_=n(150),b=n(190),v=n(646),y=n(317),E=n(264),S=n(122),w=n(818),T=n(246),C=n(220),x=n(278),F=n(148),D=n(491),k=n(592),O=n(593),I=n(159),A=n(142),R=n(152),N=n(1398),M=n(819),P=n(306),L=n(154),B=n(192);const U=e=>`mx_RoomTile_messagePreview_${e}`,j=e=>({left:e.left+window.scrollX-9,top:e.bottom+window.scrollY+17,chevronFace:_.a.None});class G extends l.a.PureComponent{constructor(t){super(t),a()(this,"dispatcherRef",void 0),a()(this,"roomTileRef",Object(s.createRef)()),a()(this,"notificationState",void 0),a()(this,"roomProps",void 0),a()(this,"onRoomNameUpdate",(e=>{this.forceUpdate()})),a()(this,"onNotificationUpdate",(()=>{this.forceUpdate()})),a()(this,"onRoomPropertyUpdate",(e=>{e===k.a.NotificationVolume&&this.onNotificationUpdate()})),a()(this,"onAction",(t=>{t.action===g.a.ViewRoom&&t.room_id===this.props.room.roomId&&t.show_room_tile&&e((()=>{this.scrollIntoView()}))})),a()(this,"onRoomPreviewChanged",(e=>{this.props.room&&e.roomId===this.props.room.roomId&&this.generatePreview()})),a()(this,"onCallChanged",((e,t)=>{var n;t===(null===(n=this.props.room)||void 0===n?void 0:n.roomId)&&this.setState({call:e})})),a()(this,"scrollIntoView",(()=>{this.roomTileRef.current&&this.roomTileRef.current.scrollIntoView({block:"nearest",behavior:"auto"})})),a()(this,"onTileClick",(async e=>{e.preventDefault(),e.stopPropagation();const t=Object(R.a)().getAccessibilityAction(e),n=[A.h.Enter,A.h.Space].includes(t);m.a.dispatch({action:g.a.ViewRoom,show_room_tile:!0,room_id:this.props.room.roomId,clear_search:n,metricsTrigger:"RoomList",metricsViaKeyboard:"click"!==e.type})})),a()(this,"onActiveRoomUpdate",(e=>{this.setState({selected:e})})),a()(this,"onNotificationsMenuOpenClick",(e=>{e.preventDefault(),e.stopPropagation();const t=e.target;this.setState({notificationsMenuPosition:t.getBoundingClientRect()}),I.b.trackInteraction("WebRoomListRoomTileNotificationsMenu",e)})),a()(this,"onCloseNotificationsMenu",(()=>{this.setState({notificationsMenuPosition:null})})),a()(this,"onGeneralMenuOpenClick",(e=>{e.preventDefault(),e.stopPropagation();const t=e.target;this.setState({generalMenuPosition:t.getBoundingClientRect()})})),a()(this,"onContextMenu",(e=>{this.showContextMenu&&(e.preventDefault(),e.stopPropagation(),this.setState({generalMenuPosition:{left:e.clientX,bottom:e.clientY}}))})),a()(this,"onCloseGeneralMenu",(()=>{this.setState({generalMenuPosition:null})})),this.state={selected:L.b.instance.roomViewStore.getRoomId()===this.props.room.roomId,notificationsMenuPosition:null,generalMenuPosition:null,call:P.a.instance.getCall(this.props.room.roomId),messagePreview:""},this.generatePreview(),this.notificationState=C.a.instance.getRoomState(this.props.room),this.roomProps=D.a.forRoom(this.props.room)}get showContextMenu(){return this.props.tag!==b.a.Invite}get showMessagePreview(){return!this.props.isMinimized&&this.props.showMessagePreview}componentDidUpdate(e,t){var n,r;const i=e.showMessagePreview!==this.props.showMessagePreview,o=e.isMinimized!==this.props.isMinimized;var a,s;((i||o)&&this.generatePreview(),(null===(n=e.room)||void 0===n?void 0:n.roomId)!==(null===(r=this.props.room)||void 0===r?void 0:r.roomId))&&(v.a.instance.off(v.a.getPreviewChangedEventName(e.room),this.onRoomPreviewChanged),v.a.instance.on(v.a.getPreviewChangedEventName(this.props.room),this.onRoomPreviewChanged),null===(a=e.room)||void 0===a||a.off(c.d.Name,this.onRoomNameUpdate),null===(s=this.props.room)||void 0===s||s.on(c.d.Name,this.onRoomNameUpdate))}componentDidMount(){this.state.selected&&this.scrollIntoView(),L.b.instance.roomViewStore.addRoomListener(this.props.room.roomId,this.onActiveRoomUpdate),this.dispatcherRef=m.a.register(this.onAction),v.a.instance.on(v.a.getPreviewChangedEventName(this.props.room),this.onRoomPreviewChanged),this.notificationState.on(x.b.Update,this.onNotificationUpdate),this.roomProps.on(O.b,this.onRoomPropertyUpdate),this.props.room.on(c.d.Name,this.onRoomNameUpdate),P.a.instance.on(P.b.Call,this.onCallChanged),this.setState({call:P.a.instance.getCall(this.props.room.roomId)})}componentWillUnmount(){L.b.instance.roomViewStore.removeRoomListener(this.props.room.roomId,this.onActiveRoomUpdate),v.a.instance.off(v.a.getPreviewChangedEventName(this.props.room),this.onRoomPreviewChanged),this.props.room.off(c.d.Name,this.onRoomNameUpdate),this.dispatcherRef&&m.a.unregister(this.dispatcherRef),this.notificationState.off(x.b.Update,this.onNotificationUpdate),this.roomProps.off(O.b,this.onRoomPropertyUpdate),P.a.instance.off(P.b.Call,this.onCallChanged)}async generatePreview(){if(!this.showMessagePreview)return null;const e=await v.a.instance.getPreviewForRoom(this.props.room,this.props.tag);this.setState({messagePreview:e})}renderNotificationsMenu(e){if(S.a.get().isGuest()||this.props.tag===b.a.Archived||!this.showContextMenu||this.props.isMinimized)return null;const t=this.roomProps.notificationVolume,n=d()("mx_RoomTile_notificationsButton",{mx_RoomNotificationContextMenu_iconBell:t===E.a.AllMessages,mx_RoomNotificationContextMenu_iconBellDot:t===E.a.AllMessagesLoud,mx_RoomNotificationContextMenu_iconBellMentions:t===E.a.MentionsOnly,mx_RoomNotificationContextMenu_iconBellCrossed:t===E.a.Mute,mx_RoomTile_notificationsButton_show:t===E.a.Mute});return l.a.createElement(l.a.Fragment,null,l.a.createElement(_.c,{className:n,onClick:this.onNotificationsMenuOpenClick,title:Object(f.a)("Notification options"),isExpanded:!!this.state.notificationsMenuPosition,tabIndex:e?0:-1}),this.state.notificationsMenuPosition&&l.a.createElement(w.a,i()({},j(this.state.notificationsMenuPosition),{onFinished:this.onCloseNotificationsMenu,room:this.props.room})))}renderGeneralMenu(){return this.showContextMenu?l.a.createElement(l.a.Fragment,null,l.a.createElement(_.c,{className:"mx_RoomTile_menuButton",onClick:this.onGeneralMenuOpenClick,title:Object(f.a)("Room options"),isExpanded:!!this.state.generalMenuPosition}),this.state.generalMenuPosition&&l.a.createElement(M.a,i()({},j(this.state.generalMenuPosition),{onFinished:this.onCloseGeneralMenu,room:this.props.room,onPostFavoriteClick:e=>I.b.trackInteraction("WebRoomListRoomTileContextMenuFavouriteToggle",e),onPostInviteClick:e=>I.b.trackInteraction("WebRoomListRoomTileContextMenuInviteItem",e),onPostSettingsClick:e=>I.b.trackInteraction("WebRoomListRoomTileContextMenuSettingsItem",e),onPostLeaveClick:e=>I.b.trackInteraction("WebRoomListRoomTileContextMenuLeaveItem",e)}))):null}render(){const e=d()({mx_RoomTile:!0,mx_RoomTile_selected:this.state.selected,mx_RoomTile_hasMenuOpen:!(!this.state.generalMenuPosition&&!this.state.notificationsMenuPosition),mx_RoomTile_minimized:this.props.isMinimized});let t,n,r=this.props.room.name;"string"!=typeof r&&(r=""),r=r.replace(":",":"),!this.props.isMinimized&&this.notificationState&&(t=l.a.createElement("div",{className:"mx_RoomTile_badgeContainer","aria-hidden":"true"},l.a.createElement(T.a,{notification:this.notificationState,forceCount:!1,roomId:this.props.room.roomId}))),this.state.call?n=l.a.createElement("div",{className:"mx_RoomTile_subtitle"},l.a.createElement(N.a,{call:this.state.call})):this.props.hasLiveVoiceBroadcast?n=l.a.createElement(B.A,null):this.showMessagePreview&&this.state.messagePreview&&(n=l.a.createElement("div",{className:"mx_RoomTile_subtitle",id:U(this.props.room.roomId),title:this.state.messagePreview},this.state.messagePreview));const o=d()({mx_RoomTile_title:!0,mx_RoomTile_titleWithSubtitle:!!n,mx_RoomTile_titleHasUnreadEvents:this.notificationState.isUnread}),a=this.props.isMinimized?null:l.a.createElement("div",{className:"mx_RoomTile_titleContainer"},l.a.createElement("div",{title:r,className:o,tabIndex:-1},l.a.createElement("span",{dir:"auto"},r)),n);let s,c=r;this.props.tag===b.a.Invite||(this.notificationState.hasMentions?c+=" "+Object(f.a)("%(count)s unread messages including mentions.",{count:this.notificationState.count}):this.notificationState.hasUnreadCount?c+=" "+Object(f.a)("%(count)s unread messages.",{count:this.notificationState.count}):this.notificationState.isUnread&&(c+=" "+Object(f.a)("Unread messages."))),this.showMessagePreview&&(s=U(this.props.room.roomId));const u={};let m=p.a;return this.props.isMinimized&&(m=F.a,u.title=r,u.forceHide=!!this.state.generalMenuPosition),l.a.createElement(l.a.Fragment,null,l.a.createElement(h.e,{inputRef:this.roomTileRef},(n=>{let{onFocus:r,isActive:o,ref:d}=n;return l.a.createElement(m,i()({},u,{onFocus:r,tabIndex:o?0:-1,inputRef:d,className:e,onClick:this.onTileClick,onContextMenu:this.onContextMenu,role:"treeitem","aria-label":c,"aria-selected":this.state.selected,"aria-describedby":s}),l.a.createElement(y.a,{room:this.props.room,avatarSize:32,displayBadge:this.props.isMinimized,tooltipProps:{tabIndex:o?0:-1}}),a,t,this.renderGeneralMenu(),this.renderNotificationsMenu(o))})))}}t.b=e=>{const t=Object(B.S)(e.room);return l.a.createElement(G,i()({},e,{hasLiveVoiceBroadcast:t}))}}).call(this,n(54).setImmediate)},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o}));var r=n(146);function i(e,t){const n=[...e.keys()],i=[...t.keys()],o=Object(r.a)(n,i);return{changed:Object(r.f)(n,i).filter((n=>e.get(n)!==t.get(n))),added:o.added,removed:o.removed}}class o extends Map{constructor(e){super(e)}getOrCreate(e,t){return this.has(e)?this.get(e):(this.set(e,t),t)}remove(e){const t=this.get(e);return this.delete(e),t}}},function(e,t,n){"use strict";function r(e){e["io.element.performance_metrics"]={sendStartTs:Date.now()}}function i(e,t,n){e.sendEvent(t,"io.element.performance_metric",{"io.element.performance_metrics":{forEventId:n,responseTs:Date.now(),kind:"send_time"}})}n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"c",(function(){return b})),n.d(t,"b",(function(){return v}));var r=n(129),i=n(196),o=n(168),a=n(252),s=n(131),l=n(760),c=n(227);const u=["UL","OL","LI"];function d(e){return e.replace(/[\\*_[\]`<]|^>/g,(e=>`\\${e}`))}function h(e){let t=0,n=0;for(const r of e)"`"===r?n++:(t=Math.max(t,n),n=0);return Math.max(t,n)}function p(e){var t;return u.includes((null===(t=e.parentNode)||void 0===t?void 0:t.nodeName)||"")}function m(e,t,n){const r="@room",i=[];return e.split(r).forEach(((e,o,a)=>{e.length&&i.push(...t.plainWithEmoji(n.shouldEscape?d(e):e));o===a.length-1||i.push(t.atRoomPill(r))})),i}function g(e,t,n){e.unshift(n.plain(t));for(let r=0;r<e.length;r++)e[r].type===a.b.Newline&&(e.splice(r+1,0,n.plain(t)),r+=1)}function f(e,t,n,r){let o;return Array.from(e.childNodes).flatMap((e=>{const a=_(e,t,n,r);return a.length&&o&&(Object(i.d)(o)||Object(i.d)(e))&&(p(e)?a.unshift(t.newline()):a.unshift(t.newline(),t.newline())),a.length&&(o=e),a}))}function _(e,t,n,r){var i;if(function(e){return e.nodeType===Node.TEXT_NODE?"\n"===e.nodeValue:e.nodeType!==Node.ELEMENT_NODE||"MX-REPLY"===e.nodeName}(e))return[];switch(e.nodeType){case Node.TEXT_NODE:return m(e.nodeValue,t,n);case Node.ELEMENT_NODE:switch(e.nodeName){case"H1":case"H2":case"H3":case"H4":case"H5":case"H6":return function(e,t,n){const r=parseInt(e.nodeName.slice(1),10);return[t.plain("#".repeat(r)+" "),...f(e,t,n)]}(e,t,n);case"A":return function(e,t,n){const{href:r}=e,i=Object(o.d)(r);switch(null==i?void 0:i[0]){case"@":return[t.userPill(e.textContent,i)];case"#":return[t.roomPill(i)]}const a=Array.from(e.childNodes);return r===e.textContent&&a.every((e=>e.nodeType===Node.TEXT_NODE))?m(e.textContent,t,n):[t.plain("["),...f(e,t,n),t.plain(`](${r})`)]}(e,t,n);case"IMG":return function(e,t,n){const{alt:r,src:i}=e;return t.plainWithEmoji(`![${d(r)}](${i})`)}(e,t);case"BR":return[t.newline()];case"HR":return[t.plain("---")];case"EM":return[t.plain("_"),...f(e,t,n),t.plain("_")];case"STRONG":return[t.plain("**"),...f(e,t,n),t.plain("**")];case"DEL":return[t.plain("<del>"),...f(e,t,n),t.plain("</del>")];case"SUB":return[t.plain("<sub>"),...f(e,t,n),t.plain("</sub>")];case"SUP":return[t.plain("<sup>"),...f(e,t,n),t.plain("</sup>")];case"U":return[t.plain("<u>"),...f(e,t,n),t.plain("</u>")];case"PRE":return function(e,t,n){var r;let i="";if("CODE"===(null===(r=e.firstChild)||void 0===r?void 0:r.nodeName))for(const t of e.firstChild.classList)if(t.startsWith("language-")&&!t.startsWith("language-_")){i=t.slice("language-".length);break}const o=e.textContent.replace(/\n$/,""),a="`".repeat(Math.max(3,h(o)+1)),s=[...t.plainWithEmoji(a+i),t.newline()];return o.split("\n").forEach((e=>{s.push(...t.plainWithEmoji(e)),s.push(t.newline())})),s.push(t.plain(a)),s}(e,t);case"CODE":{const n="`".repeat(h(e.textContent)+1);return t.plainWithEmoji(`${n}${e.textContent}${n}`)}case"BLOCKQUOTE":{const r=f(e,t,n);return g(r,"> ",t),r}case"LI":return null!==(i=null==r?void 0:r(e))&&void 0!==i?i:f(e,t,n);case"UL":{const r=f(e,t,n,(e=>[t.plain("- "),...f(e,t,n)]));return p(e)&&g(r," ",t),r}case"OL":{var a;let r=null!==(a=e.start)&&void 0!==a?a:1;const i=f(e,t,n,(e=>{const i=[t.plain(`${r}. `),...f(e,t,n)];return r++,i}));return p(e)&&g(i," ",t),i}case"DIV":case"SPAN":if(e.hasAttribute("data-mx-maths")){var l,c,u,_,b,v,y,E;const n=s.b.get().latex_maths_delims,r="SPAN"===e.nodeName?null!==(l=null==n||null===(c=n.inline)||void 0===c?void 0:c.left)&&void 0!==l?l:"\\(":null!==(u=null==n||null===(_=n.display)||void 0===_?void 0:_.left)&&void 0!==u?u:"\\[",i="SPAN"===e.nodeName?null!==(b=null==n||null===(v=n.inline)||void 0===v?void 0:v.right)&&void 0!==b?b:"\\)":null!==(y=null==n||null===(E=n.display)||void 0===E?void 0:E.right)&&void 0!==y?y:"\\]",o=e.getAttribute("data-mx-maths");return t.plainWithEmoji(`${r}${o}${i}`)}}}return f(e,t,n)}function b(e,t,n){const r=e.split(/\r\n|\r|\n/g);return r.reduce(((e,i,o)=>{n.isQuotedMessage&&e.push(t.plain("> ")),e.push(...m(i,t,n));return o===r.length-1||e.push(t.newline()),e}),[])}function v(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{shouldEscape:!0};const i=e.getContent();let o;const a=i.msgtype===r.e.Emote;let s=!1;if("org.matrix.custom.html"===i.format)o=function(e,t,n){const r=_((new DOMParser).parseFromString(e,"text/html").body,t,n);return n.isQuotedMessage&&g(r,"> ",t),r}(i.formatted_body||"",t,n),i.body&&i.formatted_body&&Object(l.a)(i.body)===i.formatted_body&&(s=!0);else{let r=i.body||"";e.replyEventId&&(r=Object(c.e)(r)),o=b(r,t,n)}return a&&s?o.unshift(t.plain("/rainbowme ")):s?o.unshift(t.plain("/rainbow ")):a&&o.unshift(t.plain("/me ")),o}},function(e,t,n){"use strict";const r=n(1348),i=n(571),o=n(1349),a=n(572),s=i.CODE_POINTS,l=i.CODE_POINT_SEQUENCES,c={128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},u="DATA_STATE",d="RCDATA_STATE",h="RAWTEXT_STATE",p="SCRIPT_DATA_STATE",m="PLAINTEXT_STATE",g="TAG_OPEN_STATE",f="END_TAG_OPEN_STATE",_="TAG_NAME_STATE",b="RCDATA_LESS_THAN_SIGN_STATE",v="RCDATA_END_TAG_OPEN_STATE",y="RCDATA_END_TAG_NAME_STATE",E="RAWTEXT_LESS_THAN_SIGN_STATE",S="RAWTEXT_END_TAG_OPEN_STATE",w="RAWTEXT_END_TAG_NAME_STATE",T="SCRIPT_DATA_LESS_THAN_SIGN_STATE",C="SCRIPT_DATA_END_TAG_OPEN_STATE",x="SCRIPT_DATA_END_TAG_NAME_STATE",F="SCRIPT_DATA_ESCAPE_START_STATE",D="SCRIPT_DATA_ESCAPE_START_DASH_STATE",k="SCRIPT_DATA_ESCAPED_STATE",O="SCRIPT_DATA_ESCAPED_DASH_STATE",I="SCRIPT_DATA_ESCAPED_DASH_DASH_STATE",A="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE",R="SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE",N="SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE",M="SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE",P="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",L="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE",B="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE",U="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",j="SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",G="BEFORE_ATTRIBUTE_NAME_STATE",z="ATTRIBUTE_NAME_STATE",H="AFTER_ATTRIBUTE_NAME_STATE",q="BEFORE_ATTRIBUTE_VALUE_STATE",V="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE",$="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE",K="ATTRIBUTE_VALUE_UNQUOTED_STATE",W="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE",Y="SELF_CLOSING_START_TAG_STATE",Q="BOGUS_COMMENT_STATE",X="MARKUP_DECLARATION_OPEN_STATE",Z="COMMENT_START_STATE",J="COMMENT_START_DASH_STATE",ee="COMMENT_STATE",te="COMMENT_LESS_THAN_SIGN_STATE",ne="COMMENT_LESS_THAN_SIGN_BANG_STATE",re="COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE",ie="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE",oe="COMMENT_END_DASH_STATE",ae="COMMENT_END_STATE",se="COMMENT_END_BANG_STATE",le="DOCTYPE_STATE",ce="BEFORE_DOCTYPE_NAME_STATE",ue="DOCTYPE_NAME_STATE",de="AFTER_DOCTYPE_NAME_STATE",he="AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE",pe="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE",me="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE",ge="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE",fe="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE",_e="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE",be="AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE",ve="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE",ye="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE",Ee="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE",Se="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE",we="BOGUS_DOCTYPE_STATE",Te="CDATA_SECTION_STATE",Ce="CDATA_SECTION_BRACKET_STATE",xe="CDATA_SECTION_END_STATE",Fe="CHARACTER_REFERENCE_STATE",De="NAMED_CHARACTER_REFERENCE_STATE",ke="AMBIGUOS_AMPERSAND_STATE",Oe="NUMERIC_CHARACTER_REFERENCE_STATE",Ie="HEXADEMICAL_CHARACTER_REFERENCE_START_STATE",Ae="DECIMAL_CHARACTER_REFERENCE_START_STATE",Re="HEXADEMICAL_CHARACTER_REFERENCE_STATE",Ne="DECIMAL_CHARACTER_REFERENCE_STATE",Me="NUMERIC_CHARACTER_REFERENCE_END_STATE";function Pe(e){return e===s.SPACE||e===s.LINE_FEED||e===s.TABULATION||e===s.FORM_FEED}function Le(e){return e>=s.DIGIT_0&&e<=s.DIGIT_9}function Be(e){return e>=s.LATIN_CAPITAL_A&&e<=s.LATIN_CAPITAL_Z}function Ue(e){return e>=s.LATIN_SMALL_A&&e<=s.LATIN_SMALL_Z}function je(e){return Ue(e)||Be(e)}function Ge(e){return je(e)||Le(e)}function ze(e){return e>=s.LATIN_CAPITAL_A&&e<=s.LATIN_CAPITAL_F}function He(e){return e>=s.LATIN_SMALL_A&&e<=s.LATIN_SMALL_F}function qe(e){return e+32}function Ve(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(e>>>10&1023|55296)+String.fromCharCode(56320|1023&e))}function $e(e){return String.fromCharCode(qe(e))}function Ke(e,t){const n=o[++e];let r=++e,i=r+n-1;for(;r<=i;){const e=r+i>>>1,a=o[e];if(a<t)r=e+1;else{if(!(a>t))return o[e+n];i=e-1}}return-1}class We{constructor(){this.preprocessor=new r,this.tokenQueue=[],this.allowCDATA=!1,this.state=u,this.returnState="",this.charRefCode=-1,this.tempBuff=[],this.lastStartTagName="",this.consumedAfterSnapshot=-1,this.active=!1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr=null}_err(){}_errOnNextCodePoint(e){this._consume(),this._err(e),this._unconsume()}getNextToken(){for(;!this.tokenQueue.length&&this.active;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this[this.state](e)}return this.tokenQueue.shift()}write(e,t){this.active=!0,this.preprocessor.write(e,t)}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e)}_ensureHibernation(){if(this.preprocessor.endOfChunkHit){for(;this.consumedAfterSnapshot>0;this.consumedAfterSnapshot--)this.preprocessor.retreat();return this.active=!1,this.tokenQueue.push({type:We.HIBERNATION_TOKEN}),!0}return!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(){this.consumedAfterSnapshot--,this.preprocessor.retreat()}_reconsumeInState(e){this.state=e,this._unconsume()}_consumeSequenceIfMatch(e,t,n){let r=0,i=!0;const o=e.length;let a,l=0,c=t;for(;l<o;l++){if(l>0&&(c=this._consume(),r++),c===s.EOF){i=!1;break}if(a=e[l],c!==a&&(n||c!==qe(a))){i=!1;break}}if(!i)for(;r--;)this._unconsume();return i}_isTempBufferEqualToScriptString(){if(this.tempBuff.length!==l.SCRIPT_STRING.length)return!1;for(let e=0;e<this.tempBuff.length;e++)if(this.tempBuff[e]!==l.SCRIPT_STRING[e])return!1;return!0}_createStartTagToken(){this.currentToken={type:We.START_TAG_TOKEN,tagName:"",selfClosing:!1,ackSelfClosing:!1,attrs:[]}}_createEndTagToken(){this.currentToken={type:We.END_TAG_TOKEN,tagName:"",selfClosing:!1,attrs:[]}}_createCommentToken(){this.currentToken={type:We.COMMENT_TOKEN,data:""}}_createDoctypeToken(e){this.currentToken={type:We.DOCTYPE_TOKEN,name:e,forceQuirks:!1,publicId:null,systemId:null}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t}}_createEOFToken(){this.currentToken={type:We.EOF_TOKEN}}_createAttr(e){this.currentAttr={name:e,value:""}}_leaveAttrName(e){null===We.getTokenAttr(this.currentToken,this.currentAttr.name)?this.currentToken.attrs.push(this.currentAttr):this._err(a.duplicateAttribute),this.state=e}_leaveAttrValue(e){this.state=e}_emitCurrentToken(){this._emitCurrentCharacterToken();const e=this.currentToken;this.currentToken=null,e.type===We.START_TAG_TOKEN?this.lastStartTagName=e.tagName:e.type===We.END_TAG_TOKEN&&(e.attrs.length>0&&this._err(a.endTagWithAttributes),e.selfClosing&&this._err(a.endTagWithTrailingSolidus)),this.tokenQueue.push(e)}_emitCurrentCharacterToken(){this.currentCharacterToken&&(this.tokenQueue.push(this.currentCharacterToken),this.currentCharacterToken=null)}_emitEOFToken(){this._createEOFToken(),this._emitCurrentToken()}_appendCharToCurrentCharacterToken(e,t){this.currentCharacterToken&&this.currentCharacterToken.type!==e&&this._emitCurrentCharacterToken(),this.currentCharacterToken?this.currentCharacterToken.chars+=t:this._createCharacterToken(e,t)}_emitCodePoint(e){let t=We.CHARACTER_TOKEN;Pe(e)?t=We.WHITESPACE_CHARACTER_TOKEN:e===s.NULL&&(t=We.NULL_CHARACTER_TOKEN),this._appendCharToCurrentCharacterToken(t,Ve(e))}_emitSeveralCodePoints(e){for(let t=0;t<e.length;t++)this._emitCodePoint(e[t])}_emitChars(e){this._appendCharToCurrentCharacterToken(We.CHARACTER_TOKEN,e)}_matchNamedCharacterReference(e){let t=null,n=1,r=Ke(0,e);for(this.tempBuff.push(e);r>-1;){const e=o[r],i=e<7;i&&1&e&&(t=2&e?[o[++r],o[++r]]:[o[++r]],n=0);const a=this._consume();if(this.tempBuff.push(a),n++,a===s.EOF)break;r=i?4&e?Ke(r,a):-1:a===e?++r:-1}for(;n--;)this.tempBuff.pop(),this._unconsume();return t}_isCharacterReferenceInAttribute(){return this.returnState===V||this.returnState===$||this.returnState===K}_isCharacterReferenceAttributeQuirk(e){if(!e&&this._isCharacterReferenceInAttribute()){const e=this._consume();return this._unconsume(),e===s.EQUALS_SIGN||Ge(e)}return!1}_flushCodePointsConsumedAsCharacterReference(){if(this._isCharacterReferenceInAttribute())for(let e=0;e<this.tempBuff.length;e++)this.currentAttr.value+=Ve(this.tempBuff[e]);else this._emitSeveralCodePoints(this.tempBuff);this.tempBuff=[]}[u](e){this.preprocessor.dropParsedChunk(),e===s.LESS_THAN_SIGN?this.state=g:e===s.AMPERSAND?(this.returnState=u,this.state=Fe):e===s.NULL?(this._err(a.unexpectedNullCharacter),this._emitCodePoint(e)):e===s.EOF?this._emitEOFToken():this._emitCodePoint(e)}[d](e){this.preprocessor.dropParsedChunk(),e===s.AMPERSAND?(this.returnState=d,this.state=Fe):e===s.LESS_THAN_SIGN?this.state=b:e===s.NULL?(this._err(a.unexpectedNullCharacter),this._emitChars(i.REPLACEMENT_CHARACTER)):e===s.EOF?this._emitEOFToken():this._emitCodePoint(e)}[h](e){this.preprocessor.dropParsedChunk(),e===s.LESS_THAN_SIGN?this.state=E:e===s.NULL?(this._err(a.unexpectedNullCharacter),this._emitChars(i.REPLACEMENT_CHARACTER)):e===s.EOF?this._emitEOFToken():this._emitCodePoint(e)}[p](e){this.preprocessor.dropParsedChunk(),e===s.LESS_THAN_SIGN?this.state=T:e===s.NULL?(this._err(a.unexpectedNullCharacter),this._emitChars(i.REPLACEMENT_CHARACTER)):e===s.EOF?this._emitEOFToken():this._emitCodePoint(e)}[m](e){this.preprocessor.dropParsedChunk(),e===s.NULL?(this._err(a.unexpectedNullCharacter),this._emitChars(i.REPLACEMENT_CHARACTER)):e===s.EOF?this._emitEOFToken():this._emitCodePoint(e)}[g](e){e===s.EXCLAMATION_MARK?this.state=X:e===s.SOLIDUS?this.state=f:je(e)?(this._createStartTagToken(),this._reconsumeInState(_)):e===s.QUESTION_MARK?(this._err(a.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(),this._reconsumeInState(Q)):e===s.EOF?(this._err(a.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken()):(this._err(a.invalidFirstCharacterOfTagName),this._emitChars("<"),this._reconsumeInState(u))}[f](e){je(e)?(this._createEndTagToken(),this._reconsumeInState(_)):e===s.GREATER_THAN_SIGN?(this._err(a.missingEndTagName),this.state=u):e===s.EOF?(this._err(a.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken()):(this._err(a.invalidFirstCharacterOfTagName),this._createCommentToken(),this._reconsumeInState(Q))}[_](e){Pe(e)?this.state=G:e===s.SOLIDUS?this.state=Y:e===s.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):Be(e)?this.currentToken.tagName+=$e(e):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.tagName+=i.REPLACEMENT_CHARACTER):e===s.EOF?(this._err(a.eofInTag),this._emitEOFToken()):this.currentToken.tagName+=Ve(e)}[b](e){e===s.SOLIDUS?(this.tempBuff=[],this.state=v):(this._emitChars("<"),this._reconsumeInState(d))}[v](e){je(e)?(this._createEndTagToken(),this._reconsumeInState(y)):(this._emitChars("</"),this._reconsumeInState(d))}[y](e){if(Be(e))this.currentToken.tagName+=$e(e),this.tempBuff.push(e);else if(Ue(e))this.currentToken.tagName+=Ve(e),this.tempBuff.push(e);else{if(this.lastStartTagName===this.currentToken.tagName){if(Pe(e))return void(this.state=G);if(e===s.SOLIDUS)return void(this.state=Y);if(e===s.GREATER_THAN_SIGN)return this.state=u,void this._emitCurrentToken()}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(d)}}[E](e){e===s.SOLIDUS?(this.tempBuff=[],this.state=S):(this._emitChars("<"),this._reconsumeInState(h))}[S](e){je(e)?(this._createEndTagToken(),this._reconsumeInState(w)):(this._emitChars("</"),this._reconsumeInState(h))}[w](e){if(Be(e))this.currentToken.tagName+=$e(e),this.tempBuff.push(e);else if(Ue(e))this.currentToken.tagName+=Ve(e),this.tempBuff.push(e);else{if(this.lastStartTagName===this.currentToken.tagName){if(Pe(e))return void(this.state=G);if(e===s.SOLIDUS)return void(this.state=Y);if(e===s.GREATER_THAN_SIGN)return this._emitCurrentToken(),void(this.state=u)}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(h)}}[T](e){e===s.SOLIDUS?(this.tempBuff=[],this.state=C):e===s.EXCLAMATION_MARK?(this.state=F,this._emitChars("<!")):(this._emitChars("<"),this._reconsumeInState(p))}[C](e){je(e)?(this._createEndTagToken(),this._reconsumeInState(x)):(this._emitChars("</"),this._reconsumeInState(p))}[x](e){if(Be(e))this.currentToken.tagName+=$e(e),this.tempBuff.push(e);else if(Ue(e))this.currentToken.tagName+=Ve(e),this.tempBuff.push(e);else{if(this.lastStartTagName===this.currentToken.tagName){if(Pe(e))return void(this.state=G);if(e===s.SOLIDUS)return void(this.state=Y);if(e===s.GREATER_THAN_SIGN)return this._emitCurrentToken(),void(this.state=u)}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(p)}}[F](e){e===s.HYPHEN_MINUS?(this.state=D,this._emitChars("-")):this._reconsumeInState(p)}[D](e){e===s.HYPHEN_MINUS?(this.state=I,this._emitChars("-")):this._reconsumeInState(p)}[k](e){e===s.HYPHEN_MINUS?(this.state=O,this._emitChars("-")):e===s.LESS_THAN_SIGN?this.state=A:e===s.NULL?(this._err(a.unexpectedNullCharacter),this._emitChars(i.REPLACEMENT_CHARACTER)):e===s.EOF?(this._err(a.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):this._emitCodePoint(e)}[O](e){e===s.HYPHEN_MINUS?(this.state=I,this._emitChars("-")):e===s.LESS_THAN_SIGN?this.state=A:e===s.NULL?(this._err(a.unexpectedNullCharacter),this.state=k,this._emitChars(i.REPLACEMENT_CHARACTER)):e===s.EOF?(this._err(a.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=k,this._emitCodePoint(e))}[I](e){e===s.HYPHEN_MINUS?this._emitChars("-"):e===s.LESS_THAN_SIGN?this.state=A:e===s.GREATER_THAN_SIGN?(this.state=p,this._emitChars(">")):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.state=k,this._emitChars(i.REPLACEMENT_CHARACTER)):e===s.EOF?(this._err(a.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=k,this._emitCodePoint(e))}[A](e){e===s.SOLIDUS?(this.tempBuff=[],this.state=R):je(e)?(this.tempBuff=[],this._emitChars("<"),this._reconsumeInState(M)):(this._emitChars("<"),this._reconsumeInState(k))}[R](e){je(e)?(this._createEndTagToken(),this._reconsumeInState(N)):(this._emitChars("</"),this._reconsumeInState(k))}[N](e){if(Be(e))this.currentToken.tagName+=$e(e),this.tempBuff.push(e);else if(Ue(e))this.currentToken.tagName+=Ve(e),this.tempBuff.push(e);else{if(this.lastStartTagName===this.currentToken.tagName){if(Pe(e))return void(this.state=G);if(e===s.SOLIDUS)return void(this.state=Y);if(e===s.GREATER_THAN_SIGN)return this._emitCurrentToken(),void(this.state=u)}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(k)}}[M](e){Pe(e)||e===s.SOLIDUS||e===s.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?P:k,this._emitCodePoint(e)):Be(e)?(this.tempBuff.push(qe(e)),this._emitCodePoint(e)):Ue(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState(k)}[P](e){e===s.HYPHEN_MINUS?(this.state=L,this._emitChars("-")):e===s.LESS_THAN_SIGN?(this.state=U,this._emitChars("<")):e===s.NULL?(this._err(a.unexpectedNullCharacter),this._emitChars(i.REPLACEMENT_CHARACTER)):e===s.EOF?(this._err(a.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):this._emitCodePoint(e)}[L](e){e===s.HYPHEN_MINUS?(this.state=B,this._emitChars("-")):e===s.LESS_THAN_SIGN?(this.state=U,this._emitChars("<")):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.state=P,this._emitChars(i.REPLACEMENT_CHARACTER)):e===s.EOF?(this._err(a.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=P,this._emitCodePoint(e))}[B](e){e===s.HYPHEN_MINUS?this._emitChars("-"):e===s.LESS_THAN_SIGN?(this.state=U,this._emitChars("<")):e===s.GREATER_THAN_SIGN?(this.state=p,this._emitChars(">")):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.state=P,this._emitChars(i.REPLACEMENT_CHARACTER)):e===s.EOF?(this._err(a.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=P,this._emitCodePoint(e))}[U](e){e===s.SOLIDUS?(this.tempBuff=[],this.state=j,this._emitChars("/")):this._reconsumeInState(P)}[j](e){Pe(e)||e===s.SOLIDUS||e===s.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?k:P,this._emitCodePoint(e)):Be(e)?(this.tempBuff.push(qe(e)),this._emitCodePoint(e)):Ue(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState(P)}[G](e){Pe(e)||(e===s.SOLIDUS||e===s.GREATER_THAN_SIGN||e===s.EOF?this._reconsumeInState(H):e===s.EQUALS_SIGN?(this._err(a.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=z):(this._createAttr(""),this._reconsumeInState(z)))}[z](e){Pe(e)||e===s.SOLIDUS||e===s.GREATER_THAN_SIGN||e===s.EOF?(this._leaveAttrName(H),this._unconsume()):e===s.EQUALS_SIGN?this._leaveAttrName(q):Be(e)?this.currentAttr.name+=$e(e):e===s.QUOTATION_MARK||e===s.APOSTROPHE||e===s.LESS_THAN_SIGN?(this._err(a.unexpectedCharacterInAttributeName),this.currentAttr.name+=Ve(e)):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentAttr.name+=i.REPLACEMENT_CHARACTER):this.currentAttr.name+=Ve(e)}[H](e){Pe(e)||(e===s.SOLIDUS?this.state=Y:e===s.EQUALS_SIGN?this.state=q:e===s.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInTag),this._emitEOFToken()):(this._createAttr(""),this._reconsumeInState(z)))}[q](e){Pe(e)||(e===s.QUOTATION_MARK?this.state=V:e===s.APOSTROPHE?this.state=$:e===s.GREATER_THAN_SIGN?(this._err(a.missingAttributeValue),this.state=u,this._emitCurrentToken()):this._reconsumeInState(K))}[V](e){e===s.QUOTATION_MARK?this.state=W:e===s.AMPERSAND?(this.returnState=V,this.state=Fe):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentAttr.value+=i.REPLACEMENT_CHARACTER):e===s.EOF?(this._err(a.eofInTag),this._emitEOFToken()):this.currentAttr.value+=Ve(e)}[$](e){e===s.APOSTROPHE?this.state=W:e===s.AMPERSAND?(this.returnState=$,this.state=Fe):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentAttr.value+=i.REPLACEMENT_CHARACTER):e===s.EOF?(this._err(a.eofInTag),this._emitEOFToken()):this.currentAttr.value+=Ve(e)}[K](e){Pe(e)?this._leaveAttrValue(G):e===s.AMPERSAND?(this.returnState=K,this.state=Fe):e===s.GREATER_THAN_SIGN?(this._leaveAttrValue(u),this._emitCurrentToken()):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentAttr.value+=i.REPLACEMENT_CHARACTER):e===s.QUOTATION_MARK||e===s.APOSTROPHE||e===s.LESS_THAN_SIGN||e===s.EQUALS_SIGN||e===s.GRAVE_ACCENT?(this._err(a.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=Ve(e)):e===s.EOF?(this._err(a.eofInTag),this._emitEOFToken()):this.currentAttr.value+=Ve(e)}[W](e){Pe(e)?this._leaveAttrValue(G):e===s.SOLIDUS?this._leaveAttrValue(Y):e===s.GREATER_THAN_SIGN?(this._leaveAttrValue(u),this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInTag),this._emitEOFToken()):(this._err(a.missingWhitespaceBetweenAttributes),this._reconsumeInState(G))}[Y](e){e===s.GREATER_THAN_SIGN?(this.currentToken.selfClosing=!0,this.state=u,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInTag),this._emitEOFToken()):(this._err(a.unexpectedSolidusInTag),this._reconsumeInState(G))}[Q](e){e===s.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):e===s.EOF?(this._emitCurrentToken(),this._emitEOFToken()):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.data+=i.REPLACEMENT_CHARACTER):this.currentToken.data+=Ve(e)}[X](e){this._consumeSequenceIfMatch(l.DASH_DASH_STRING,e,!0)?(this._createCommentToken(),this.state=Z):this._consumeSequenceIfMatch(l.DOCTYPE_STRING,e,!1)?this.state=le:this._consumeSequenceIfMatch(l.CDATA_START_STRING,e,!0)?this.allowCDATA?this.state=Te:(this._err(a.cdataInHtmlContent),this._createCommentToken(),this.currentToken.data="[CDATA[",this.state=Q):this._ensureHibernation()||(this._err(a.incorrectlyOpenedComment),this._createCommentToken(),this._reconsumeInState(Q))}[Z](e){e===s.HYPHEN_MINUS?this.state=J:e===s.GREATER_THAN_SIGN?(this._err(a.abruptClosingOfEmptyComment),this.state=u,this._emitCurrentToken()):this._reconsumeInState(ee)}[J](e){e===s.HYPHEN_MINUS?this.state=ae:e===s.GREATER_THAN_SIGN?(this._err(a.abruptClosingOfEmptyComment),this.state=u,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(ee))}[ee](e){e===s.HYPHEN_MINUS?this.state=oe:e===s.LESS_THAN_SIGN?(this.currentToken.data+="<",this.state=te):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.data+=i.REPLACEMENT_CHARACTER):e===s.EOF?(this._err(a.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.data+=Ve(e)}[te](e){e===s.EXCLAMATION_MARK?(this.currentToken.data+="!",this.state=ne):e===s.LESS_THAN_SIGN?this.currentToken.data+="!":this._reconsumeInState(ee)}[ne](e){e===s.HYPHEN_MINUS?this.state=re:this._reconsumeInState(ee)}[re](e){e===s.HYPHEN_MINUS?this.state=ie:this._reconsumeInState(oe)}[ie](e){e!==s.GREATER_THAN_SIGN&&e!==s.EOF&&this._err(a.nestedComment),this._reconsumeInState(ae)}[oe](e){e===s.HYPHEN_MINUS?this.state=ae:e===s.EOF?(this._err(a.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(ee))}[ae](e){e===s.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):e===s.EXCLAMATION_MARK?this.state=se:e===s.HYPHEN_MINUS?this.currentToken.data+="-":e===s.EOF?(this._err(a.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--",this._reconsumeInState(ee))}[se](e){e===s.HYPHEN_MINUS?(this.currentToken.data+="--!",this.state=oe):e===s.GREATER_THAN_SIGN?(this._err(a.incorrectlyClosedComment),this.state=u,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--!",this._reconsumeInState(ee))}[le](e){Pe(e)?this.state=ce:e===s.GREATER_THAN_SIGN?this._reconsumeInState(ce):e===s.EOF?(this._err(a.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingWhitespaceBeforeDoctypeName),this._reconsumeInState(ce))}[ce](e){Pe(e)||(Be(e)?(this._createDoctypeToken($e(e)),this.state=ue):e===s.NULL?(this._err(a.unexpectedNullCharacter),this._createDoctypeToken(i.REPLACEMENT_CHARACTER),this.state=ue):e===s.GREATER_THAN_SIGN?(this._err(a.missingDoctypeName),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=u):e===s.EOF?(this._err(a.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._createDoctypeToken(Ve(e)),this.state=ue))}[ue](e){Pe(e)?this.state=de:e===s.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):Be(e)?this.currentToken.name+=$e(e):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.name+=i.REPLACEMENT_CHARACTER):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.name+=Ve(e)}[de](e){Pe(e)||(e===s.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this._consumeSequenceIfMatch(l.PUBLIC_STRING,e,!1)?this.state=he:this._consumeSequenceIfMatch(l.SYSTEM_STRING,e,!1)?this.state=be:this._ensureHibernation()||(this._err(a.invalidCharacterSequenceAfterDoctypeName),this.currentToken.forceQuirks=!0,this._reconsumeInState(we)))}[he](e){Pe(e)?this.state=pe:e===s.QUOTATION_MARK?(this._err(a.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=me):e===s.APOSTROPHE?(this._err(a.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=ge):e===s.GREATER_THAN_SIGN?(this._err(a.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=u,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(we))}[pe](e){Pe(e)||(e===s.QUOTATION_MARK?(this.currentToken.publicId="",this.state=me):e===s.APOSTROPHE?(this.currentToken.publicId="",this.state=ge):e===s.GREATER_THAN_SIGN?(this._err(a.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=u,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(we)))}[me](e){e===s.QUOTATION_MARK?this.state=fe:e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.publicId+=i.REPLACEMENT_CHARACTER):e===s.GREATER_THAN_SIGN?(this._err(a.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=u):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=Ve(e)}[ge](e){e===s.APOSTROPHE?this.state=fe:e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.publicId+=i.REPLACEMENT_CHARACTER):e===s.GREATER_THAN_SIGN?(this._err(a.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=u):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=Ve(e)}[fe](e){Pe(e)?this.state=_e:e===s.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):e===s.QUOTATION_MARK?(this._err(a.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=ye):e===s.APOSTROPHE?(this._err(a.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=Ee):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(we))}[_e](e){Pe(e)||(e===s.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=u):e===s.QUOTATION_MARK?(this.currentToken.systemId="",this.state=ye):e===s.APOSTROPHE?(this.currentToken.systemId="",this.state=Ee):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(we)))}[be](e){Pe(e)?this.state=ve:e===s.QUOTATION_MARK?(this._err(a.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=ye):e===s.APOSTROPHE?(this._err(a.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=Ee):e===s.GREATER_THAN_SIGN?(this._err(a.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=u,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(we))}[ve](e){Pe(e)||(e===s.QUOTATION_MARK?(this.currentToken.systemId="",this.state=ye):e===s.APOSTROPHE?(this.currentToken.systemId="",this.state=Ee):e===s.GREATER_THAN_SIGN?(this._err(a.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=u,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(we)))}[ye](e){e===s.QUOTATION_MARK?this.state=Se:e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.systemId+=i.REPLACEMENT_CHARACTER):e===s.GREATER_THAN_SIGN?(this._err(a.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=u):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=Ve(e)}[Ee](e){e===s.APOSTROPHE?this.state=Se:e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.systemId+=i.REPLACEMENT_CHARACTER):e===s.GREATER_THAN_SIGN?(this._err(a.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=u):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=Ve(e)}[Se](e){Pe(e)||(e===s.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=u):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.unexpectedCharacterAfterDoctypeSystemIdentifier),this._reconsumeInState(we)))}[we](e){e===s.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=u):e===s.NULL?this._err(a.unexpectedNullCharacter):e===s.EOF&&(this._emitCurrentToken(),this._emitEOFToken())}[Te](e){e===s.RIGHT_SQUARE_BRACKET?this.state=Ce:e===s.EOF?(this._err(a.eofInCdata),this._emitEOFToken()):this._emitCodePoint(e)}[Ce](e){e===s.RIGHT_SQUARE_BRACKET?this.state=xe:(this._emitChars("]"),this._reconsumeInState(Te))}[xe](e){e===s.GREATER_THAN_SIGN?this.state=u:e===s.RIGHT_SQUARE_BRACKET?this._emitChars("]"):(this._emitChars("]]"),this._reconsumeInState(Te))}[Fe](e){this.tempBuff=[s.AMPERSAND],e===s.NUMBER_SIGN?(this.tempBuff.push(e),this.state=Oe):Ge(e)?this._reconsumeInState(De):(this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[De](e){const t=this._matchNamedCharacterReference(e);if(this._ensureHibernation())this.tempBuff=[s.AMPERSAND];else if(t){const e=this.tempBuff[this.tempBuff.length-1]===s.SEMICOLON;this._isCharacterReferenceAttributeQuirk(e)||(e||this._errOnNextCodePoint(a.missingSemicolonAfterCharacterReference),this.tempBuff=t),this._flushCodePointsConsumedAsCharacterReference(),this.state=this.returnState}else this._flushCodePointsConsumedAsCharacterReference(),this.state=ke}[ke](e){Ge(e)?this._isCharacterReferenceInAttribute()?this.currentAttr.value+=Ve(e):this._emitCodePoint(e):(e===s.SEMICOLON&&this._err(a.unknownNamedCharacterReference),this._reconsumeInState(this.returnState))}[Oe](e){this.charRefCode=0,e===s.LATIN_SMALL_X||e===s.LATIN_CAPITAL_X?(this.tempBuff.push(e),this.state=Ie):this._reconsumeInState(Ae)}[Ie](e){!function(e){return Le(e)||ze(e)||He(e)}(e)?(this._err(a.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)):this._reconsumeInState(Re)}[Ae](e){Le(e)?this._reconsumeInState(Ne):(this._err(a.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[Re](e){ze(e)?this.charRefCode=16*this.charRefCode+e-55:He(e)?this.charRefCode=16*this.charRefCode+e-87:Le(e)?this.charRefCode=16*this.charRefCode+e-48:e===s.SEMICOLON?this.state=Me:(this._err(a.missingSemicolonAfterCharacterReference),this._reconsumeInState(Me))}[Ne](e){Le(e)?this.charRefCode=10*this.charRefCode+e-48:e===s.SEMICOLON?this.state=Me:(this._err(a.missingSemicolonAfterCharacterReference),this._reconsumeInState(Me))}[Me](){if(this.charRefCode===s.NULL)this._err(a.nullCharacterReference),this.charRefCode=s.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(a.characterReferenceOutsideUnicodeRange),this.charRefCode=s.REPLACEMENT_CHARACTER;else if(i.isSurrogate(this.charRefCode))this._err(a.surrogateCharacterReference),this.charRefCode=s.REPLACEMENT_CHARACTER;else if(i.isUndefinedCodePoint(this.charRefCode))this._err(a.noncharacterCharacterReference);else if(i.isControlCodePoint(this.charRefCode)||this.charRefCode===s.CARRIAGE_RETURN){this._err(a.controlCharacterReference);const e=c[this.charRefCode];e&&(this.charRefCode=e)}this.tempBuff=[this.charRefCode],this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)}}We.CHARACTER_TOKEN="CHARACTER_TOKEN",We.NULL_CHARACTER_TOKEN="NULL_CHARACTER_TOKEN",We.WHITESPACE_CHARACTER_TOKEN="WHITESPACE_CHARACTER_TOKEN",We.START_TAG_TOKEN="START_TAG_TOKEN",We.END_TAG_TOKEN="END_TAG_TOKEN",We.COMMENT_TOKEN="COMMENT_TOKEN",We.DOCTYPE_TOKEN="DOCTYPE_TOKEN",We.EOF_TOKEN="EOF_TOKEN",We.HIBERNATION_TOKEN="HIBERNATION_TOKEN",We.MODE={DATA:u,RCDATA:d,RAWTEXT:h,SCRIPT_DATA:p,PLAINTEXT:m},We.getTokenAttr=function(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null},e.exports=We},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(304),i="Sentry Logger ",o=["debug","info","warn","error","log","assert","trace"];function a(e){if(!("console"in r.GLOBAL_OBJ))return e();const t=r.GLOBAL_OBJ.console,n={};o.forEach((e=>{const r=t[e]&&t[e].__sentry_original__;e in t&&r&&(n[e]=t[e],t[e]=r)}));try{return e()}finally{Object.keys(n).forEach((e=>{t[e]=n[e]}))}}function s(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1}};return"undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?o.forEach((n=>{t[n]=(...t)=>{e&&a((()=>{r.GLOBAL_OBJ.console[n](`${i}[${n}]:`,...t)}))}})):o.forEach((e=>{t[e]=()=>{}})),t}t.logger=void 0,"undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?t.logger=r.getGlobalSingleton("logger",s):t.logger=s(),t.CONSOLE_LEVELS=o,t.consoleSandbox=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(163),i=n(457);class o{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(e){const t=new o;return e&&(t._breadcrumbs=[...e._breadcrumbs],t._tags={...e._tags},t._extra={...e._extra},t._contexts={...e._contexts},t._user=e._user,t._level=e._level,t._span=e._span,t._session=e._session,t._transactionName=e._transactionName,t._fingerprint=e._fingerprint,t._eventProcessors=[...e._eventProcessors],t._requestSession=e._requestSession,t._attachments=[...e._attachments],t._sdkProcessingMetadata={...e._sdkProcessingMetadata}),t}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&i.updateSession(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if("function"==typeof e){const t=e(this);return t instanceof o?t:this}return e instanceof o?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession)):r.isPlainObject(e)&&(this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession)),this}clear(){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._attachments=[],this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const i={timestamp:r.dateTimestampInSeconds(),...e};return this._breadcrumbs=[...this._breadcrumbs,i].slice(-n),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,t={}){if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};const t=this._span.transaction&&this._span.transaction.name;t&&(e.tags={transaction:t,...e.tags})}return this._applyFingerprint(e),e.breadcrumbs=[...e.breadcrumbs||[],...this._breadcrumbs],e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...a(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}_notifyEventProcessors(e,t,n,i=0){return new r.SyncPromise(((o,a)=>{const s=e[i];if(null===t||"function"!=typeof s)o(t);else{const l=s({...t},n);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.id&&null===l&&r.logger.log(`Event processor "${s.id}" dropped event`),r.isThenable(l)?l.then((t=>this._notifyEventProcessors(e,t,n,i+1).then(o))).then(null,a):this._notifyEventProcessors(e,l,n,i+1).then(o).then(null,a)}}))}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?r.arrayify(e.fingerprint):[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}}function a(){return r.getGlobalSingleton("globalEventProcessors",(()=>[]))}t.Scope=o,t.addGlobalEventProcessor=function(e){a().push(e)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(163);function i(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||r.timestampInSeconds(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:r.uuid4()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}t.closeSession=function(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),i(e,n)},t.makeSession=function(e){const t=r.timestampInSeconds(),n={sid:r.uuid4(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return r.dropUndefinedKeys({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&i(n,e),n},t.updateSession=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(218),i=n(163);function o(e,t){const n=l(e,t),r={type:t&&t.name,value:u(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function a(e,t,n,o){const a=r.getCurrentHub().getClient(),s=a&&a.getOptions().normalizeDepth,c={exception:{values:[{type:i.isEvent(t)?t.constructor.name:o?"UnhandledRejection":"Error",value:`Non-Error ${o?"promise rejection":"exception"} captured with keys: ${i.extractExceptionKeysForMessage(t)}`}]},extra:{__serialized__:i.normalizeToSize(t,s)}};if(n){const t=l(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}function s(e,t){return{exception:{values:[o(e,t)]}}}function l(e,t){const n=t.stacktrace||t.stack||"",r=function(e){if(e){if("number"==typeof e.framesToPop)return e.framesToPop;if(c.test(e.message))return 1}return 0}(t);try{return e(n,r)}catch(e){}return[]}const c=/Minified React error #\d+;/i;function u(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function d(e,t,n,r,o){let l;if(i.isErrorEvent(t)&&t.error){return s(e,t.error)}if(i.isDOMError(t)||i.isDOMException(t)){const o=t;if("stack"in t)l=s(e,t);else{const t=o.name||(i.isDOMError(o)?"DOMError":"DOMException"),a=o.message?`${t}: ${o.message}`:t;l=h(e,a,n,r),i.addExceptionTypeValue(l,a)}return"code"in o&&(l.tags={...l.tags,"DOMException.code":`${o.code}`}),l}if(i.isError(t))return s(e,t);if(i.isPlainObject(t)||i.isEvent(t)){return l=a(e,t,n,o),i.addExceptionMechanism(l,{synthetic:!0}),l}return l=h(e,t,n,r),i.addExceptionTypeValue(l,`${t}`,void 0),i.addExceptionMechanism(l,{synthetic:!0}),l}function h(e,t,n,r){const i={message:t};if(r&&n){const r=l(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]})}return i}t.eventFromError=s,t.eventFromException=function(e,t,n,r){const o=d(e,t,n&&n.syntheticException||void 0,r);return i.addExceptionMechanism(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),i.resolvedSyncPromise(o)},t.eventFromMessage=function(e,t,n="info",r,o){const a=h(e,t,r&&r.syntheticException||void 0,o);return a.level=n,r&&r.event_id&&(a.event_id=r.event_id),i.resolvedSyncPromise(a)},t.eventFromPlainObject=a,t.eventFromString=h,t.eventFromUnknownInput=d,t.exceptionFromError=o,t.parseStackFrames=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(218),i=n(163),o=n(277),a=1024,s="Breadcrumbs";class l{static __initStatic(){this.id=s}__init(){this.name=l.id}constructor(e){l.prototype.__init.call(this),this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){this.options.console&&i.addInstrumentationHandler("console",c),this.options.dom&&i.addInstrumentationHandler("dom",function(e){function t(t){let n,o="object"==typeof e?e.serializeAttribute:void 0,s="object"==typeof e&&"number"==typeof e.maxStringLength?e.maxStringLength:void 0;s&&s>a&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.warn(`\`dom.maxStringLength\` cannot exceed ${a}, but a value of ${s} was configured. Sentry will use ${a} instead.`),s=a),"string"==typeof o&&(o=[o]);try{n=t.event.target?i.htmlTreeAsString(t.event.target,{keyAttrs:o,maxStringLength:s}):i.htmlTreeAsString(t.event,{keyAttrs:o,maxStringLength:s})}catch(e){n="<unknown>"}0!==n.length&&r.getCurrentHub().addBreadcrumb({category:`ui.${t.name}`,message:n},{event:t.event,name:t.name,global:t.global})}return t}(this.options.dom)),this.options.xhr&&i.addInstrumentationHandler("xhr",u),this.options.fetch&&i.addInstrumentationHandler("fetch",d),this.options.history&&i.addInstrumentationHandler("history",h)}addSentryBreadcrumb(e){this.options.sentry&&r.getCurrentHub().addBreadcrumb({category:"sentry."+("transaction"===e.type?"transaction":"event"),event_id:e.event_id,level:e.level,message:i.getEventDescription(e)},{event:e})}}function c(e){for(let t=0;t<e.args.length;t++)if("ref=Ref<"===e.args[t]){e.args[t+1]="viewRef";break}const t={category:"console",data:{arguments:e.args,logger:"console"},level:i.severityLevelFromString(e.level),message:i.safeJoin(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;t.message=`Assertion failed: ${i.safeJoin(e.args.slice(1)," ")||"console.assert"}`,t.data.arguments=e.args.slice(1)}r.getCurrentHub().addBreadcrumb(t,{input:e.args,level:e.level})}function u(e){if(e.endTimestamp){if(e.xhr.__sentry_own_request__)return;const{method:t,url:n,status_code:i,body:o}=e.xhr.__sentry_xhr__||{};r.getCurrentHub().addBreadcrumb({category:"xhr",data:{method:t,url:n,status_code:i},type:"http"},{xhr:e.xhr,input:o})}else;}function d(e){e.endTimestamp&&(e.fetchData.url.match(/sentry_key/)&&"POST"===e.fetchData.method||(e.error?r.getCurrentHub().addBreadcrumb({category:"fetch",data:e.fetchData,level:"error",type:"http"},{data:e.error,input:e.args}):r.getCurrentHub().addBreadcrumb({category:"fetch",data:{...e.fetchData,status_code:e.response.status},type:"http"},{input:e.args,response:e.response})))}function h(e){let t=e.from,n=e.to;const a=i.parseUrl(o.WINDOW.location.href);let s=i.parseUrl(t);const l=i.parseUrl(n);s.path||(s=a),a.protocol===l.protocol&&a.host===l.host&&(n=l.relative),a.protocol===s.protocol&&a.host===s.host&&(t=s.relative),r.getCurrentHub().addBreadcrumb({category:"navigation",data:{from:t,to:n}})}l.__initStatic(),t.BREADCRUMB_INTEGRATION_ID=s,t.Breadcrumbs=l},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(13),i=n.n(r),o=n(124),a=n(125),s=n(552),l=n(128),c=n(137);class u{constructor(){i()(this,"dispatcherRef",void 0),i()(this,"onAction",(e=>{e.action===l.a.UpdateFontSize?this.setRootFontSize(e.size):e.action===l.a.UpdateSystemFont?this.setSystemFont(e):e.action===l.a.OnLoggedOut?(this.setRootFontSize(u.DEFAULT_SIZE),this.setSystemFont({useSystemFont:!1,font:""})):e.action===l.a.OnLoggedIn&&this.updateFont()})),i()(this,"setRootFontSize",(e=>{const t=Math.max(Math.min(u.MAX_SIZE,e),u.MIN_SIZE);t!==e&&a.b.setValue("baseFontSize",null,c.a.DEVICE,t),document.querySelector(":root").style.fontSize=Object(s.a)(t)})),i()(this,"setSystemFont",(e=>{let{useSystemFont:t,font:n}=e;document.body.style.fontFamily=t?n.split(",").map((e=>((e=e.trim()).startsWith('"')||e.endsWith('"')||(e=`"${e}"`),e))).join(","):""})),this.dispatcherRef=null}start(){this.updateFont(),this.dispatcherRef=o.a.register(this.onAction)}stop(){this.dispatcherRef&&o.a.unregister(this.dispatcherRef)}updateFont(){this.setRootFontSize(a.b.getValue("baseFontSize")),this.setSystemFont({useSystemFont:a.b.getValue("useSystemFont"),font:a.b.getValue("systemFont")})}}i()(u,"MIN_SIZE",8),i()(u,"DEFAULT_SIZE",10),i()(u,"MAX_SIZE",15),i()(u,"SIZE_DIFF",5)},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(130),i=n.n(r),o=n(132),a=n.n(o),s=n(120),l=n.n(s);const c=["children"],u=e=>{let{children:t}=e,n=a()(e,c);return l.a.createElement("span",i()({className:"mx_Caption"},n),t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(131),i=n(125),o=n(156);function a(){return!!r.b.get().bug_report_endpoint_url&&i.b.getValue(o.b.Feedback)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(120),i=n(186),o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)};function a(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},s.apply(this,arguments)},l={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},c={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},u={width:"20px",height:"20px",position:"absolute"},d={top:s(s({},l),{top:"-5px"}),right:s(s({},c),{left:void 0,right:"-5px"}),bottom:s(s({},l),{top:void 0,bottom:"-5px"}),left:s(s({},c),{left:"-5px"}),topRight:s(s({},u),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:s(s({},u),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:s(s({},u),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:s(s({},u),{left:"-10px",top:"-10px",cursor:"nw-resize"})},h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return a(t,e),t.prototype.render=function(){return r.createElement("div",{className:this.props.className||"",style:s(s({position:"absolute",userSelect:"none"},d[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(r.PureComponent),p={width:"auto",height:"auto"},m=function(e,t,n){return Math.max(Math.min(e,n),t)},g=function(e,t){return Math.round(e/t)*t},f=function(e,t){return new RegExp(e,"i").test(t)},_=function(e){return Boolean(e.touches&&e.touches.length)},b=function(e,t,n){void 0===n&&(n=0);var r=t.reduce((function(n,r,i){return Math.abs(r-e)<Math.abs(t[n]-e)?i:n}),0),i=Math.abs(t[r]-e);return 0===n||i<n?t[r]:e},v=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},y=function(e,t,n,r){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return n*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return r*(Number(e.replace("vh",""))/100)}return e},E=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],S="__resizable_base__",w=function(e){function t(t){var n=e.call(this,t)||this;return n.ratio=1,n.resizable=null,n.parentLeft=0,n.parentTop=0,n.resizableLeft=0,n.resizableRight=0,n.resizableTop=0,n.resizableBottom=0,n.targetLeft=0,n.targetTop=0,n.appendBase=function(){if(!n.resizable||!n.window)return null;var e=n.parentNode;if(!e)return null;var t=n.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(S):t.className+=S,e.appendChild(t),t},n.removeBase=function(e){var t=n.parentNode;t&&t.removeChild(e)},n.ref=function(e){e&&(n.resizable=e)},n.state={isResizing:!1,width:void 0===(n.propsSize&&n.propsSize.width)?"auto":n.propsSize&&n.propsSize.width,height:void 0===(n.propsSize&&n.propsSize.height)?"auto":n.propsSize&&n.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n}return a(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||p},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,r=this.resizable.offsetHeight,i=this.resizable.style.position;"relative"!==i&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:r,this.resizable.style.position=i}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,n=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&e.propsSize[t].toString().endsWith("%")){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var n=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/n[t]*100+"%"}return v(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?v(t.width):n("width"),height:t&&void 0!==t.height&&!this.state.isResizing?v(t.height):n("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;"wrap"!==n&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var r={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),r},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==n&&"auto"!==n?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){var n,r,i=this.props.boundsByDirection,o=this.state.direction,a=i&&f("left",o),s=i&&f("top",o);if("parent"===this.props.bounds){var l=this.parentNode;l&&(n=a?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),r=s?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(n=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,r=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(n=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),r=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return n&&Number.isFinite(n)&&(e=e&&e<n?e:n),r&&Number.isFinite(r)&&(t=t&&t<r?t:r),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,r=this.props.resizeRatio||1,i=this.state,o=i.direction,a=i.original,s=this.props,l=s.lockAspectRatio,c=s.lockAspectRatioExtraHeight,u=s.lockAspectRatioExtraWidth,d=a.width,h=a.height,p=c||0,m=u||0;return f("right",o)&&(d=a.width+(e-a.x)*r/n,l&&(h=(d-m)/this.ratio+p)),f("left",o)&&(d=a.width-(e-a.x)*r/n,l&&(h=(d-m)/this.ratio+p)),f("bottom",o)&&(h=a.height+(t-a.y)*r/n,l&&(d=(h-p)*this.ratio+m)),f("top",o)&&(h=a.height-(t-a.y)*r/n,l&&(d=(h-p)*this.ratio+m)),{newWidth:d,newHeight:h}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,r){var i=this.props,o=i.lockAspectRatio,a=i.lockAspectRatioExtraHeight,s=i.lockAspectRatioExtraWidth,l=void 0===r.width?10:r.width,c=void 0===n.width||n.width<0?e:n.width,u=void 0===r.height?10:r.height,d=void 0===n.height||n.height<0?t:n.height,h=a||0,p=s||0;if(o){var g=(u-h)*this.ratio+p,f=(d-h)*this.ratio+p,_=(l-p)/this.ratio+h,b=(c-p)/this.ratio+h,v=Math.max(l,g),y=Math.min(c,f),E=Math.max(u,_),S=Math.min(d,b);e=m(e,v,y),t=m(t,E,S)}else e=m(e,l,c),t=m(t,u,d);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var n=this.props.bounds.getBoundingClientRect();this.targetLeft=n.left,this.targetTop=n.top}if(this.resizable){var r=this.resizable.getBoundingClientRect(),i=r.left,o=r.top,a=r.right,s=r.bottom;this.resizableLeft=i,this.resizableRight=a,this.resizableTop=o,this.resizableBottom=s}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var n,r=0,i=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(r=e.nativeEvent.clientX,i=e.nativeEvent.clientY):e.nativeEvent&&_(e.nativeEvent)&&(r=e.nativeEvent.touches[0].clientX,i=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var o=this.window.getComputedStyle(this.resizable);if("auto"!==o.flexBasis){var a=this.parentNode;if(a){var l=this.window.getComputedStyle(a).flexDirection;this.flexDir=l.startsWith("row")?"row":"column",n=o.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var c={original:{x:r,y:i,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:s(s({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:n};this.setState(c)}},t.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&_(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var n=this.props,r=n.maxWidth,o=n.maxHeight,a=n.minWidth,s=n.minHeight,l=_(e)?e.touches[0].clientX:e.clientX,c=_(e)?e.touches[0].clientY:e.clientY,u=this.state,d=u.direction,h=u.original,p=u.width,m=u.height,f=this.getParentSize(),v=function(e,t,n,r,i,o,a){return r=y(r,e.width,t,n),i=y(i,e.height,t,n),o=y(o,e.width,t,n),a=y(a,e.height,t,n),{maxWidth:void 0===r?void 0:Number(r),maxHeight:void 0===i?void 0:Number(i),minWidth:void 0===o?void 0:Number(o),minHeight:void 0===a?void 0:Number(a)}}(f,this.window.innerWidth,this.window.innerHeight,r,o,a,s);r=v.maxWidth,o=v.maxHeight,a=v.minWidth,s=v.minHeight;var E=this.calculateNewSizeFromDirection(l,c),S=E.newHeight,w=E.newWidth,T=this.calculateNewMaxFromBoundary(r,o);this.props.snap&&this.props.snap.x&&(w=b(w,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(S=b(S,this.props.snap.y,this.props.snapGap));var C=this.calculateNewSizeFromAspectRatio(w,S,{width:T.maxWidth,height:T.maxHeight},{width:a,height:s});if(w=C.newWidth,S=C.newHeight,this.props.grid){var x=g(w,this.props.grid[0]),F=g(S,this.props.grid[1]),D=this.props.snapGap||0;w=0===D||Math.abs(x-w)<=D?x:w,S=0===D||Math.abs(F-S)<=D?F:S}var k={width:w-h.width,height:S-h.height};if(p&&"string"==typeof p)if(p.endsWith("%"))w=w/f.width*100+"%";else if(p.endsWith("vw")){w=w/this.window.innerWidth*100+"vw"}else if(p.endsWith("vh")){w=w/this.window.innerHeight*100+"vh"}if(m&&"string"==typeof m)if(m.endsWith("%"))S=S/f.height*100+"%";else if(m.endsWith("vw")){S=S/this.window.innerWidth*100+"vw"}else if(m.endsWith("vh")){S=S/this.window.innerHeight*100+"vh"}var O={width:this.createSizeForCssProperty(w,"width"),height:this.createSizeForCssProperty(S,"height")};"row"===this.flexDir?O.flexBasis=O.width:"column"===this.flexDir&&(O.flexBasis=O.height),i.flushSync((function(){t.setState(O)})),this.props.onResize&&this.props.onResize(e,d,this.resizable,k)}},t.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,r=t.direction,i=t.original;if(n&&this.resizable){var o={width:this.size.width-i.width,height:this.size.height-i.height};this.props.onResizeStop&&this.props.onResizeStop(e,r,this.resizable,o),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:s(s({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},t.prototype.renderResizer=function(){var e=this,t=this.props,n=t.enable,i=t.handleStyles,o=t.handleClasses,a=t.handleWrapperStyle,s=t.handleWrapperClass,l=t.handleComponent;if(!n)return null;var c=Object.keys(n).map((function(t){return!1!==n[t]?r.createElement(h,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:i&&i[t],className:o&&o[t]},l&&l[t]?l[t]:null):null}));return r.createElement("div",{className:s,style:a},c)},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce((function(t,n){return-1!==E.indexOf(n)||(t[n]=e.props[n]),t}),{}),n=s(s(s({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(n.flexBasis=this.state.flexBasis);var i=this.props.as||"div";return r.createElement(i,s({ref:this.ref,style:n,className:this.props.className},t),this.state.isResizing&&r.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(r.PureComponent);t.Resizable=w},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r,i=n(120);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}function a(e){return i.createElement("svg",o({fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10",role:"presentation","aria-hidden":!0},e),r||(r=i.createElement("path",{d:"M1 1l8 8M9.001 1l-8 8",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round"})))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(121);function i(e){var t,n,i;return null!==(t=null!==(n=null===(i=e.sender)||void 0===i?void 0:i.name)&&void 0!==n?n:e.getSender())&&void 0!==t?t:Object(r.a)("Someone")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));const r={w:800,h:600},i={w:324,h:324},o={w:Math.ceil(182.25),h:324};let a;function s(e,t,n){const s=t.w/t.h,l=s<1,c=e===a.Large?r:l?o:i;if(!t.w||!t.h)return c;const u={w:Math.min(c.w,t.w),h:n?Math.min(c.h,t.h,n):Math.min(c.h,t.h)};return u.h*s<u.w?{w:Math.floor(u.h*s),h:u.h}:{w:u.w,h:Math.floor(u.w/s)}}!function(e){e.Normal="normal",e.Large="large"}(a||(a={}))},function(e,t,n){"use strict";var r=n(120),i=n.n(r),o=n(602);t.a=e=>{let{className:t,children:n}=e;return i.a.createElement("span",{className:t},i.a.createElement(o.Icon,{className:"mx_MediaProcessingError_Icon",width:"16",height:"16"}),n)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return p})),n.d(t,"d",(function(){return m})),n.d(t,"c",(function(){return g}));var r=n(13),i=n.n(r),o=n(129),a=n(188),s=n(17),l=n(183),c=n(122);let u;!function(e){e.StateChanged="state_changed",e.SilencedChanged="silenced_changed",e.LengthChanged="length_changed"}(u||(u={}));const d=[a.f.Connecting,a.f.WaitLocalMedia,a.f.CreateOffer,a.f.CreateAnswer],h=[a.f.Connected,a.f.Ringing,a.f.Ended];let p;!function(e){e.Missed="missed"}(p||(p={}));const m=e=>{return(t=e.getType()).startsWith("m.call.")||t.startsWith("org.matrix.call.");var t};function g(e,t){const n=new Map;return null==t||t.forEach((t=>{if(!m(t))return;const r=t.getContent().call_id;n.has(r)||(e.has(r)?n.set(r,e.get(r)):n.set(r,new f)),n.get(r).add(t)})),n}class f extends s.EventEmitter{constructor(){super(),i()(this,"events",new Set),i()(this,"call",null),i()(this,"state",void 0),i()(this,"onSilencedCallsChanged",(()=>{const e=l.b.instance.isCallSilenced(this.callId);this.emit(u.SilencedChanged,e)})),i()(this,"onLengthChanged",(e=>{this.emit(u.LengthChanged,e)})),i()(this,"answerCall",(()=>{l.b.instance.answerCall(this.roomId)})),i()(this,"rejectCall",(()=>{l.b.instance.hangupOrReject(this.roomId,!0)})),i()(this,"callBack",(()=>{l.b.instance.placeCall(this.roomId,this.isVoice?a.g.Voice:a.g.Video)})),i()(this,"toggleSilenced",(()=>{l.b.instance.isCallSilenced(this.callId)?l.b.instance.unSilenceCall(this.callId):l.b.instance.silenceCall(this.callId)})),i()(this,"setState",(()=>{var e,t;d.includes(null===(e=this.call)||void 0===e?void 0:e.state)?this.state=a.f.Connecting:h.includes(null===(t=this.call)||void 0===t?void 0:t.state)?this.state=this.call.state:this.callWasMissed?this.state=p.Missed:this.reject||this.hangup?this.state=a.f.Ended:this.invite&&this.call&&(this.state=a.f.Connecting),this.emit(u.StateChanged,this.state)})),i()(this,"setCall",(()=>{this.call||(this.call=l.b.instance.getCallById(this.callId),this.setCallListeners(),this.setState())})),l.b.instance.addListener(l.a.CallsChanged,this.setCall),l.b.instance.addListener(l.a.SilencedCallsChanged,this.onSilencedCallsChanged)}get invite(){return[...this.events].find((e=>e.getType()===o.b.CallInvite))}get hangup(){return[...this.events].find((e=>e.getType()===o.b.CallHangup))}get reject(){return[...this.events].find((e=>e.getType()===o.b.CallReject))}get selectAnswer(){return[...this.events].find((e=>e.getType()===o.b.CallSelectAnswer))}get isVoice(){var e,t,n;const r=this.invite;if(r)return-1===(null===(e=r.getContent())||void 0===e||null===(t=e.offer)||void 0===t||null===(n=t.sdp)||void 0===n?void 0:n.indexOf("m=video"))}get hangupReason(){var e,t,n,r,i;return null!==(e=null!==(t=null===(n=this.call)||void 0===n?void 0:n.hangupReason)&&void 0!==t?t:null===(r=this.hangup)||void 0===r||null===(i=r.getContent())||void 0===i?void 0:i.reason)&&void 0!==e?e:null}get rejectParty(){var e;return null===(e=this.reject)||void 0===e?void 0:e.getSender()}get gotRejected(){return Boolean(this.reject)}get duration(){return this.hangup&&this.selectAnswer?this.hangup.getDate().getTime()-this.selectAnswer.getDate().getTime():null}get callWasMissed(){return![...this.events].some((e=>{var t;return(null===(t=e.sender)||void 0===t?void 0:t.userId)===c.a.get().getUserId()}))}get callId(){var e,t;return null===(e=[...this.events][0])||void 0===e||null===(t=e.getContent())||void 0===t?void 0:t.call_id}get roomId(){var e;return null===(e=[...this.events][0])||void 0===e?void 0:e.getRoomId()}setCallListeners(){this.call&&(this.call.addListener(a.d.State,this.setState),this.call.addListener(a.d.LengthChanged,this.onLengthChanged))}add(e){this.events.has(e)||(this.events.add(e),this.setCall())}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return h}));var r=n(13),i=n.n(r),o=n(1),a=n(125),s=n(124),l=n(128),c=n(619),u=n(310),d=n(137);class h{constructor(){i()(this,"themeWatchRef",void 0),i()(this,"systemThemeWatchRef",void 0),i()(this,"dispatcherRef",void 0),i()(this,"preferDark",void 0),i()(this,"preferLight",void 0),i()(this,"preferHighContrast",void 0),i()(this,"currentTheme",void 0),i()(this,"onChange",(()=>{this.recheck()})),i()(this,"onAction",(e=>{e.action===l.a.RecheckTheme&&this.recheck(e.forceTheme)})),this.themeWatchRef=null,this.systemThemeWatchRef=null,this.dispatcherRef=null,this.preferDark=e.matchMedia("(prefers-color-scheme: dark)"),this.preferLight=e.matchMedia("(prefers-color-scheme: light)"),this.preferHighContrast=e.matchMedia("(prefers-contrast: more)"),this.currentTheme=this.getEffectiveTheme()}start(){this.themeWatchRef=a.b.watchSetting("theme",null,this.onChange),this.systemThemeWatchRef=a.b.watchSetting("use_system_theme",null,this.onChange),this.preferDark.addEventListener("change",this.onChange),this.preferLight.addEventListener("change",this.onChange),this.preferHighContrast.addEventListener("change",this.onChange),this.dispatcherRef=s.a.register(this.onAction)}stop(){this.preferDark.removeEventListener("change",this.onChange),this.preferLight.removeEventListener("change",this.onChange),this.preferHighContrast.removeEventListener("change",this.onChange),this.systemThemeWatchRef&&a.b.unwatchSetting(this.systemThemeWatchRef),this.themeWatchRef&&a.b.unwatchSetting(this.themeWatchRef),this.dispatcherRef&&s.a.unregister(this.dispatcherRef)}recheck(e){const t=this.currentTheme;this.currentTheme=void 0===e?this.getEffectiveTheme():e,t!==this.currentTheme&&Object(u.h)(this.currentTheme)}getEffectiveTheme(){if(c.a.isLogin)return"light";if(a.b.getValueAt(d.a.DEVICE,"use_system_theme",null,!1,!0)){o.a.log("returning explicit system theme");const e=this.themeBasedOnSystem();if(e)return e}const e=a.b.getValueAt(d.a.DEVICE,"theme",null,!1,!0);if(e)return o.a.log("returning explicit theme: "+e),e;if(a.b.getValue("use_system_theme")){const e=this.themeBasedOnSystem();if(e)return e}return o.a.log("returning theme value"),a.b.getValue("theme")}themeBasedOnSystem(){let e;if(this.preferDark.matches?e="dark":this.preferLight.matches&&(e="light"),e&&this.preferHighContrast.matches){const t=Object(u.c)(e);t&&(e=t)}return e}isSystemThemeSupported(){return this.preferDark.matches||this.preferLight.matches}}}).call(this,n(14))},,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return I}));var r=n(13),i=n.n(r),o=n(592),a=n(594),s=n(146),l=n(808);let c;!function(e){e[e.NotStarted=0]="NotStarted",e[e.PendingErrors=1]="PendingErrors",e[e.AllSuccessful=2]="AllSuccessful"}(c||(c={}));class u extends l.a{constructor(){super(...arguments),i()(this,"_transactions",[]),i()(this,"_state",c.NotStarted),i()(this,"checkTransactions",(()=>{let e=c.AllSuccessful;for(const t of this.transactions){if(t.status===a.b.Error||t.didPreviouslyFail){e=c.PendingErrors;break}t.status===a.b.Pending&&(e=c.NotStarted)}this._state=e,this.notifyCondition(e)}))}get transactions(){return Object(s.b)(this._transactions)}get state(){return this._state}get firstFailedTime(){const e=this.transactions.find((e=>e.didPreviouslyFail||e.status===a.b.Error));return e?e.startTime:null}disownTransaction(e){const t=this._transactions.indexOf(e);t>=0&&this._transactions.splice(t,1),e.destroy(),this.checkTransactions()}beginTransaction(e,t){const n=new a.a(e,t);return this._transactions.push(n),n.whenAnything(this.checkTransactions),n.when(a.b.Success,(()=>n.destroy())),n}destroy(){for(const e of this.transactions)e.destroy();this._transactions=[],super.destroy()}}class d extends u{constructor(e){super(),this.room=e}}var h=n(202),p=n(124),m=n(809),g=n(120),f=n.n(g),_=n(121),b=n(123),v=n(127),y=n(135),E=n(165),S=n(125),w=n(162),T=n(134),C=n(153),x=n(122);class F extends g.PureComponent{constructor(){super(...arguments),i()(this,"onEchosUpdated",(()=>{this.forceUpdate()}))}componentDidMount(){O.instance.on(C.b,this.onEchosUpdated)}componentWillUnmount(){O.instance.off(C.b,this.onEchosUpdated)}renderTimeline(){return O.instance.contexts.map(((e,t)=>{if(!e.firstFailedTime)return null;if(!(e instanceof d))throw new Error("Cannot render unknown context: "+e.constructor.name);const n=g.createElement("div",{className:"mx_ServerOfflineDialog_content_context_timeline_header"},g.createElement(w.a,{width:24,height:24,room:e.room}),g.createElement("span",null,e.room.name)),r=e.transactions.filter((e=>e.status===a.b.Error||e.didPreviouslyFail)).map(((e,t)=>{let n=g.createElement(T.a,{w:19,h:19});return e.status===a.b.Error&&(n=g.createElement(b.a,{kind:"link",onClick:()=>e.run()},Object(_.a)("Resend"))),g.createElement("div",{className:"mx_ServerOfflineDialog_content_context_txn",key:`txn-${t}`},g.createElement("span",{className:"mx_ServerOfflineDialog_content_context_txn_desc"},e.auditName),n)}));return g.createElement("div",{className:"mx_ServerOfflineDialog_content_context",key:`context-${t}`},g.createElement("div",{className:"mx_ServerOfflineDialog_content_context_timestamp"},Object(E.m)(e.firstFailedTime,S.b.getValue("showTwelveHourTimestamps"))),g.createElement("div",{className:"mx_ServerOfflineDialog_content_context_timeline"},n,r))}))}render(){let e=this.renderTimeline().filter((e=>!!e));0===e.length&&(e=[g.createElement("div",{key:1},Object(_.a)("You're all caught up."))]);const t=x.a.getHomeserverName();return g.createElement(y.a,{title:Object(_.a)("Server isn't responding"),className:"mx_ServerOfflineDialog",contentId:"mx_Dialog_content",onFinished:this.props.onFinished,hasCancel:!0},g.createElement("div",{className:"mx_ServerOfflineDialog_content"},g.createElement("p",null,Object(_.a)("Your server isn't responding to some of your requests. Below are some of the most likely reasons.")),g.createElement("ul",null,g.createElement("li",null,Object(_.a)("The server (%(serverName)s) took too long to respond.",{serverName:t})),g.createElement("li",null,Object(_.a)("Your firewall or anti-virus is blocking the request.")),g.createElement("li",null,Object(_.a)("A browser extension is preventing the request.")),g.createElement("li",null,Object(_.a)("The server is offline.")),g.createElement("li",null,Object(_.a)("The server has denied your request.")),g.createElement("li",null,Object(_.a)("Your area is experiencing difficulties connecting to the internet.")),g.createElement("li",null,Object(_.a)("A connection error occurred while trying to contact the server.")),g.createElement("li",null,Object(_.a)("The server is not configured to indicate what the problem is (CORS)."))),g.createElement("hr",null),g.createElement("h2",null,Object(_.a)("Recent changes that have not yet been received")),e))}}class D extends f.a.PureComponent{constructor(){super(...arguments),i()(this,"openDialog",(()=>{v.b.createDialog(F,{})}))}render(){return f.a.createElement("div",{className:"mx_NonUrgentEchoFailureToast"},f.a.createElement("span",{className:"mx_NonUrgentEchoFailureToast_icon"}),Object(_.a)("Your server isn't responding to some <a>requests</a>.",{},{a:e=>f.a.createElement(b.a,{kind:"link_inline",onClick:this.openDialog},e)}))}}const k=e=>`room-${e.roomId}`;class O extends h.a{constructor(){super(p.a),i()(this,"caches",new Map)}static get instance(){return this._instance||(this._instance=new O,this._instance.start()),this._instance}get contexts(){return Array.from(this.caches.values()).map((e=>e.context))}getOrCreateChamberForRoom(e){if(this.caches.has(k(e)))return this.caches.get(k(e));const t=new d(e);t.whenAnything((()=>this.checkContexts()));const n=new o.b(t);return n.setClient(this.matrixClient),this.caches.set(k(e),n),n}async checkContexts(){let e=!1;for(const t of this.caches.values())if(e=t.context.state===c.PendingErrors,e)break;if(e&&!this.state.toastRef){const e=m.a.instance.addToast(D);await this.updateState({toastRef:e})}else!e&&this.state.toastRef&&(m.a.instance.removeToast(this.state.toastRef),await this.updateState({toastRef:null}))}async onReady(){if(this.caches)for(const e of this.caches.values())e.setClient(this.matrixClient)}async onNotReady(){for(const e of this.caches.values())e.setClient(null)}async onAction(e){}}i()(O,"_instance",void 0);class I{constructor(){}static forRoom(e){return O.instance.getOrCreateChamberForRoom(e)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var r=n(13),i=n.n(r),o=n(351),a=n(515),s=n(16),l=n(667),c=n(1);const u=[e=>{e.createObjectStore("users",{keyPath:["userId"]}),e.createObjectStore("accountData",{keyPath:["type"]}),e.createObjectStore("sync",{keyPath:["clobber"]})},e=>{e.createObjectStore("oob_membership_events",{keyPath:["room_id","state_key"]}).createIndex("room","room_id")},e=>{e.createObjectStore("client_options",{keyPath:["clobber"]})},e=>{e.createObjectStore("to_device_queue",{autoIncrement:!0})}],d=u.length;function h(e,t,n){const r=e.openCursor(t);return new Promise(((e,t)=>{const i=[];r.onerror=()=>{t(new Error("Query failed: "+r.error))},r.onsuccess=()=>{const t=r.result;t?(i.push(n(t)),t.continue()):e(i)}}))}function p(e){return new Promise(((t,n)=>{e.oncomplete=function(e){t(e)},e.onerror=function(){n(e.error)}}))}function m(e){return new Promise(((t,n)=>{e.onsuccess=function(e){t(e)},e.onerror=function(){n(e.error)}}))}function g(e){return m(e).then((t=>e.result))}class f{static exists(e,t){return t="matrix-js-sdk:"+(t||"default"),l.a(e,t)}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";this.indexedDB=e,i()(this,"dbName",void 0),i()(this,"syncAccumulator",void 0),i()(this,"db",void 0),i()(this,"disconnected",!0),i()(this,"_isNewlyCreated",!1),i()(this,"isPersisting",!1),i()(this,"pendingUserPresenceData",[]),this.dbName="matrix-js-sdk:"+t,this.syncAccumulator=new a.b}connect(){if(!this.disconnected)return c.a.log("LocalIndexedDBStoreBackend.connect: already connected or connecting"),Promise.resolve();this.disconnected=!1,c.a.log("LocalIndexedDBStoreBackend.connect: connecting...");const e=this.indexedDB.open(this.dbName,d);return e.onupgradeneeded=t=>{const n=e.result,r=t.oldVersion;c.a.log(`LocalIndexedDBStoreBackend.connect: upgrading from ${r}`),r<1&&(this._isNewlyCreated=!0),u.forEach(((e,t)=>{r<=t&&e(n)}))},e.onblocked=()=>{c.a.log("can't yet open LocalIndexedDBStoreBackend because it is open elsewhere")},c.a.log("LocalIndexedDBStoreBackend.connect: awaiting connection..."),m(e).then((async()=>{c.a.log("LocalIndexedDBStoreBackend.connect: connected"),this.db=e.result,this.db.onversionchange=()=>{var e;null===(e=this.db)||void 0===e||e.close()},await this.init()}))}isNewlyCreated(){return Promise.resolve(this._isNewlyCreated)}init(){return Promise.all([this.loadAccountData(),this.loadSyncData()]).then((e=>{let[t,n]=e;c.a.log("LocalIndexedDBStoreBackend: loaded initial data"),this.syncAccumulator.accumulate({next_batch:n.nextBatch,rooms:n.roomsData,account_data:{events:t}},!0)}))}getOutOfBandMembers(e){return new Promise(((t,n)=>{const r=this.db.transaction(["oob_membership_events"],"readonly").objectStore("oob_membership_events").index("room"),i=IDBKeyRange.only(e),o=r.openCursor(i),a=[];let s=!1;o.onsuccess=()=>{const e=o.result;if(!e)return a.length||s?t(a):t(null);const n=e.value;n.oob_written?s=!0:a.push(n),e.continue()},o.onerror=e=>{n(e)}})).then((t=>(c.a.log(`LL: got ${null==t?void 0:t.length} membershipEvents from storage for room ${e} ...`),t)))}async setOutOfBandMembers(e,t){c.a.log(`LL: backend about to store ${t.length} members for ${e}`);const n=this.db.transaction(["oob_membership_events"],"readwrite"),r=n.objectStore("oob_membership_events");t.forEach((e=>{r.put(e)}));const i={room_id:e,oob_written:!0,state_key:0};r.put(i),await p(n),c.a.log(`LL: backend done storing for ${e}!`)}async clearOutOfBandMembers(e){const t=this.db.transaction(["oob_membership_events"],"readonly").objectStore("oob_membership_events").index("room"),n=IDBKeyRange.only(e),r=g(t.openKeyCursor(n,"next")).then((e=>(null==e?void 0:e.primaryKey)[1])),i=g(t.openKeyCursor(n,"prev")).then((e=>(null==e?void 0:e.primaryKey)[1])),[o,a]=await Promise.all([r,i]),s=this.db.transaction(["oob_membership_events"],"readwrite").objectStore("oob_membership_events"),l=IDBKeyRange.bound([e,o],[e,a]);var u;c.a.log(`LL: Deleting all users + marker in storage for room ${e}, with key range:`,[e,o],[e,a]),await(u=s.delete(l),new Promise(((e,t)=>{u.onsuccess=()=>e(u),u.onerror=e=>t(e)})))}clearDatabase(){return new Promise((e=>{c.a.log(`Removing indexeddb instance: ${this.dbName}`);const t=this.indexedDB.deleteDatabase(this.dbName);t.onblocked=()=>{c.a.log(`can't yet delete indexeddb ${this.dbName} because it is open elsewhere`)},t.onerror=()=>{c.a.warn(`unable to delete js-sdk store indexeddb: ${t.error}`),e()},t.onsuccess=()=>{c.a.log(`Removed indexeddb instance: ${this.dbName}`),e()}}))}getSavedSync(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=this.syncAccumulator.getJSON();return t.nextBatch?e?Promise.resolve(s.k(t)):Promise.resolve(t):Promise.resolve(null)}getNextBatchToken(){return Promise.resolve(this.syncAccumulator.getNextBatchToken())}setSyncData(e){return Promise.resolve().then((()=>{this.syncAccumulator.accumulate(e)}))}async syncToDatabase(e){if(this.isPersisting)return c.a.warn("Skipping syncToDatabase() as persist already in flight"),void this.pendingUserPresenceData.push(...e);e.unshift(...this.pendingUserPresenceData),this.isPersisting=!0;try{const t=this.syncAccumulator.getJSON(!0);await Promise.all([this.persistUserPresenceEvents(e),this.persistAccountData(t.accountData),this.persistSyncData(t.nextBatch,t.roomsData)])}finally{this.isPersisting=!1}}persistSyncData(e,t){return c.a.log("Persisting sync data up to",e),s.E((()=>{const n=this.db.transaction(["sync"],"readwrite");return n.objectStore("sync").put({clobber:"-",nextBatch:e,roomsData:t}),p(n).then((()=>{c.a.log("Persisted sync data up to",e)}))}))}persistAccountData(e){return s.E((()=>{const t=this.db.transaction(["accountData"],"readwrite"),n=t.objectStore("accountData");for(const t of e)n.put(t);return p(t).then()}))}persistUserPresenceEvents(e){return s.E((()=>{const t=this.db.transaction(["users"],"readwrite"),n=t.objectStore("users");for(const t of e)n.put({userId:t[0],event:t[1]});return p(t).then()}))}getUserPresenceEvents(){return s.E((()=>h(this.db.transaction(["users"],"readonly").objectStore("users"),void 0,(e=>[e.value.userId,e.value.event]))))}loadAccountData(){return c.a.log("LocalIndexedDBStoreBackend: loading account data..."),s.E((()=>h(this.db.transaction(["accountData"],"readonly").objectStore("accountData"),void 0,(e=>e.value)).then((e=>(c.a.log("LocalIndexedDBStoreBackend: loaded account data"),e)))))}loadSyncData(){return c.a.log("LocalIndexedDBStoreBackend: loading sync data..."),s.E((()=>h(this.db.transaction(["sync"],"readonly").objectStore("sync"),void 0,(e=>e.value)).then((e=>(c.a.log("LocalIndexedDBStoreBackend: loaded sync data"),e.length>1&&c.a.warn("loadSyncData: More than 1 sync row found."),e.length>0?e[0]:{})))))}getClientOptions(){return Promise.resolve().then((()=>h(this.db.transaction(["client_options"],"readonly").objectStore("client_options"),void 0,(e=>{var t;return null===(t=e.value)||void 0===t?void 0:t.options})).then((e=>e[0]))))}async storeClientOptions(e){const t=this.db.transaction(["client_options"],"readwrite");t.objectStore("client_options").put({clobber:"-",options:e}),await p(t)}async saveToDeviceBatches(e){const t=this.db.transaction(["to_device_queue"],"readwrite"),n=t.objectStore("to_device_queue");for(const t of e)n.add(t);await p(t)}async getOldestToDeviceBatch(){const e=this.db.transaction(["to_device_queue"],"readonly").objectStore("to_device_queue"),t=await g(e.openCursor());if(!t)return null;const n=t.value;return{id:t.key,txnId:n.txnId,eventType:n.eventType,batch:n.batch}}async removeToDeviceBatch(e){const t=this.db.transaction(["to_device_queue"],"readwrite");t.objectStore("to_device_queue").delete(e),await p(t)}}class _{constructor(e,t){this.workerFactory=e,this.dbName=t,i()(this,"worker",void 0),i()(this,"nextSeq",0),i()(this,"inFlight",{}),i()(this,"startPromise",void 0),i()(this,"onWorkerMessage",(e=>{const t=e.data;if("cmd_success"==t.command||"cmd_fail"==t.command){if(void 0===t.seq)return void c.a.error("Got reply from worker with no seq");const e=this.inFlight[t.seq];if(void 0===e)return void c.a.error("Got reply for unknown seq "+t.seq);if(delete this.inFlight[t.seq],"cmd_success"==t.command)e.resolve(t.result);else{const n=new Error(t.error.message);n.name=t.error.name,e.reject(n)}}else c.a.warn("Unrecognised message from worker: ",t)}))}connect(){return this.ensureStarted().then((()=>this.doCmd("connect")))}clearDatabase(){return this.ensureStarted().then((()=>this.doCmd("clearDatabase")))}isNewlyCreated(){return this.doCmd("isNewlyCreated")}getSavedSync(){return this.doCmd("getSavedSync")}getNextBatchToken(){return this.doCmd("getNextBatchToken")}setSyncData(e){return this.doCmd("setSyncData",[e])}syncToDatabase(e){return this.doCmd("syncToDatabase",[e])}getOutOfBandMembers(e){return this.doCmd("getOutOfBandMembers",[e])}setOutOfBandMembers(e,t){return this.doCmd("setOutOfBandMembers",[e,t])}clearOutOfBandMembers(e){return this.doCmd("clearOutOfBandMembers",[e])}getClientOptions(){return this.doCmd("getClientOptions")}storeClientOptions(e){return this.doCmd("storeClientOptions",[e])}getUserPresenceEvents(){return this.doCmd("getUserPresenceEvents")}async saveToDeviceBatches(e){return this.doCmd("saveToDeviceBatches",[e])}async getOldestToDeviceBatch(){return this.doCmd("getOldestToDeviceBatch")}async removeToDeviceBatch(e){return this.doCmd("removeToDeviceBatch",[e])}ensureStarted(){return this.startPromise||(this.worker=this.workerFactory(),this.worker.onmessage=this.onWorkerMessage,this.startPromise=this.doCmd("setupWorker",[this.dbName]).then((()=>{c.a.log("IndexedDB worker is ready")}))),this.startPromise}doCmd(e,t){return Promise.resolve().then((()=>{var n;const r=this.nextSeq++,i=Object(s.m)();return this.inFlight[r]=i,null===(n=this.worker)||void 0===n||n.postMessage({command:e,seq:r,args:t}),i.promise}))}}var b=n(222),v=n(143),y=n(158);class E extends o.a{static exists(e,t){return f.exists(e,t)}constructor(e){if(super(e),i()(this,"backend",void 0),i()(this,"startedUp",!1),i()(this,"syncTs",0),i()(this,"userModifiedMap",{}),i()(this,"emitter",new y.b),i()(this,"on",this.emitter.on.bind(this.emitter)),i()(this,"getSavedSync",this.degradable((()=>this.backend.getSavedSync()),"getSavedSync")),i()(this,"isNewlyCreated",this.degradable((()=>this.backend.isNewlyCreated()),"isNewlyCreated")),i()(this,"getSavedSyncToken",this.degradable((()=>this.backend.getNextBatchToken()),"getSavedSyncToken")),i()(this,"deleteAllData",this.degradable((()=>(super.deleteAllData(),this.backend.clearDatabase().then((()=>{c.a.log("Deleted indexeddb data.")}),(e=>{throw c.a.error(`Failed to delete indexeddb data: ${e}`),e})))))),i()(this,"reallySave",this.degradable((()=>{this.syncTs=Date.now();const e=[];for(const t of this.getUsers())this.userModifiedMap[t.userId]!==t.getLastModifiedTime()&&t.events.presence&&(e.push([t.userId,t.events.presence.event]),this.userModifiedMap[t.userId]=t.getLastModifiedTime());return this.backend.syncToDatabase(e)}))),i()(this,"setSyncData",this.degradable((e=>this.backend.setSyncData(e)),"setSyncData")),i()(this,"getOutOfBandMembers",this.degradable((e=>this.backend.getOutOfBandMembers(e)),"getOutOfBandMembers")),i()(this,"setOutOfBandMembers",this.degradable(((e,t)=>(super.setOutOfBandMembers(e,t),this.backend.setOutOfBandMembers(e,t))),"setOutOfBandMembers")),i()(this,"clearOutOfBandMembers",this.degradable((e=>(super.clearOutOfBandMembers(e),this.backend.clearOutOfBandMembers(e))),"clearOutOfBandMembers")),i()(this,"getClientOptions",this.degradable((()=>this.backend.getClientOptions()),"getClientOptions")),i()(this,"storeClientOptions",this.degradable((e=>(super.storeClientOptions(e),this.backend.storeClientOptions(e))),"storeClientOptions")),!e.indexedDB)throw new Error("Missing required option: indexedDB");e.workerFactory?this.backend=new _(e.workerFactory,e.dbName):this.backend=new f(e.indexedDB,e.dbName)}startup(){return this.startedUp?(c.a.log("IndexedDBStore.startup: already started"),Promise.resolve()):(c.a.log("IndexedDBStore.startup: connecting to backend"),this.backend.connect().then((()=>(c.a.log("IndexedDBStore.startup: loading presence events"),this.backend.getUserPresenceEvents()))).then((e=>{c.a.log("IndexedDBStore.startup: processing presence events"),e.forEach((e=>{let[t,n]=e;const r=new b.a(t);n&&r.setPresenceEvent(new v.b(n)),this.userModifiedMap[r.userId]=r.getLastModifiedTime(),this.storeUser(r)}))})))}wantsSave(){return Date.now()-this.syncTs>3e5}save(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this.wantsSave()?this.reallySave():Promise.resolve()}degradable(e,t){var n=this;const r=t?super[t]:null;return async function(){for(var t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];try{return await e.call(n,...i)}catch(e){c.a.error("IndexedDBStore failure, degrading to MemoryStore",e),n.emitter.emit("degraded",e);try{c.a.log("IndexedDBStore trying to delete degraded data"),await n.backend.clearDatabase(),c.a.log("IndexedDBStore delete after degrading succeeded")}catch(e){c.a.warn("IndexedDBStore delete after degrading failed",e)}if(r)return r.call(n,...i)}}}async getPendingEvents(e){if(!this.localStorage)return super.getPendingEvents(e);const t=this.localStorage.getItem(S(e));if(t)try{return JSON.parse(t)}catch(e){c.a.error("Could not parse persisted pending events",e)}return[]}async setPendingEvents(e,t){if(!this.localStorage)return super.setPendingEvents(e,t);t.length>0?this.localStorage.setItem(S(e),JSON.stringify(t)):this.localStorage.removeItem(S(e))}saveToDeviceBatches(e){return this.backend.saveToDeviceBatches(e)}getOldestToDeviceBatch(){return this.backend.getOldestToDeviceBatch()}removeToDeviceBatch(e){return this.backend.removeToDeviceBatch(e)}}function S(e){return`mx_pending_events_${e}`}},function(e,t,n){"use strict";n.d(t,"e",(function(){return p})),n.d(t,"d",(function(){return g})),n.d(t,"g",(function(){return f})),n.d(t,"c",(function(){return _})),n.d(t,"f",(function(){return b})),n.d(t,"a",(function(){return v})),n.d(t,"b",(function(){return E}));var r=n(13),i=n.n(r),o=n(1050),a=n.n(o);class s{constructor(e){i()(this,"regex",void 0);const t=a()(e,{extended:!1,globstar:!1}).toString().replace(/\\\?/g,".");this.regex=new RegExp(t.substring(1,t.length-1))}test(e){return this.regex.test(e)}}const l="m.ban",c=[l,"org.matrix.mjolnir.ban"];function u(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return c.includes(e)?t?c[c.length-1]:l:null}class d{constructor(e,t,n,r){i()(this,"_glob",void 0),i()(this,"_entity",void 0),i()(this,"_action",void 0),i()(this,"_reason",void 0),i()(this,"_kind",void 0),this._glob=new s(e),this._entity=e,this._action=u(t,!1),this._reason=n,this._kind=r}get entity(){return this._entity}get reason(){return this._reason}get kind(){return this._kind}get recommendation(){return this._action}isMatch(e){return this._glob.test(e)}}var h=n(122);const p="m.policy.rule.user",m="m.policy.rule.room",g="m.policy.rule.server",f=[p,"m.room.rule.user","org.matrix.mjolnir.rule.user"],_=[m,"m.room.rule.room","org.matrix.mjolnir.rule.room"],b=[g,"m.room.rule.server","org.matrix.mjolnir.rule.server"],v=[...f,..._,...b];function y(e){return f.includes(e)?p:_.includes(e)?m:b.includes(e)?g:null}class E{constructor(e){i()(this,"_rules",[]),i()(this,"_roomId",void 0),this._roomId=e,this.updateList()}get roomId(){return this._roomId}get serverRules(){return this._rules.filter((e=>e.kind===g))}get userRules(){return this._rules.filter((e=>e.kind===p))}get roomRules(){return this._rules.filter((e=>e.kind===m))}async banEntity(e,t,n){const r=y(e);r&&(await h.a.get().sendStateEvent(this._roomId,r,{entity:t,reason:n,recommendation:u(l,!0)},"rule:"+t),this._rules.push(new d(t,l,n,r)))}async unbanEntity(e,t){const n=y(e);n&&(await h.a.get().sendStateEvent(this._roomId,n,{},"rule:"+t),this._rules=this._rules.filter((n=>n.kind!==y(e)||n.entity!==t)))}updateList(){this._rules=[];const e=h.a.get().getRoom(this._roomId);if(e)for(const t of v){const n=e.currentState.getStateEvents(t);for(const e of n){if(!e.getStateKey())continue;const n=y(t);if(!n)continue;const r=e.getContent().entity,i=e.getContent().recommendation,o=e.getContent().reason;r&&i&&o&&this._rules.push(new d(r,i,o,n))}}}}},function(e,t,n){"use strict";var r=n(120),i=n.n(r),o=n(13),a=n.n(o),s=n(1),l=n(125);const c=function(){if(l.b.getValue("debug_animation")){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];s.a.log.call(console,"Animation debuglog:",...t)}};function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const h=function(){if(l.b.getValue("debug_animation")){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];s.a.log.call(console,"Animation debuglog:",...t)}};function p(e,t,n){const i=Object(r.useRef)({timestamp:null,value:e}),[o,a]=Object(r.useState)(e),[s,l]=Object(r.useState)(0);Object(r.useEffect)((()=>{const e=t-i.current.value;l(e/n),i.current=d(d({},i.current),{},{timestamp:null})}),[n,t]);const u=Object(r.useCallback)((e=>{if(!i.current.timestamp)return i.current=d(d({},i.current),{},{timestamp:e}),!0;if(Math.abs(s)<Number.EPSILON)return!1;const n=e-i.current.timestamp,r=s*n,o=t-i.current.value,l=Math.sign(r)*Math.min(Math.abs(o),Math.abs(r)),c=i.current.value+l;return h(`Animating to ${t} at ${c} timeDelta=${n}, valueDelta=${r}`),a(c),i.current={value:c,timestamp:e},Math.abs(o)>Number.EPSILON}),[s,t]);return function(e,t){const n=Object(r.useRef)(null),i=Object(r.useCallback)((e=>{t(e)?n.current=requestAnimationFrame(i):c("Finished animation!")}),[t]);Object(r.useEffect)((()=>(c("Started animation!"),e&&(n.current=requestAnimationFrame(i)),()=>{n.current&&(c("Aborted animation!"),cancelAnimationFrame(n.current),n.current=null)})),[e,i])}(n>0,u),n>0?o:t}t.a=e=>{let{value:t,max:n,animated:r=!0}=e;const o=p(0,t,r?300:0);return i.a.createElement("progress",{className:"mx_ProgressBar",max:n,value:o})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return d}));var r=n(13),i=n.n(r),o=n(16);function a(){return new Worker(n.p+"eb87b8d11927ec4f0ff7.worker.js")}class s{static get instance(){return s.internalInstance}constructor(){i()(this,"worker",void 0),i()(this,"seq",0),i()(this,"pendingDeferredMap",new Map),i()(this,"onMessage",(e=>{const{seq:t,blurhash:n}=e.data,r=this.pendingDeferredMap.get(t);r&&(this.pendingDeferredMap.delete(t),r.resolve(n))})),this.worker=new a,this.worker.onmessage=this.onMessage}getBlurhash(e){const t=this.seq++,n=Object(o.m)();return this.pendingDeferredMap.set(t,n),this.worker.postMessage({seq:t,imageData:e}),n.promise}}i()(s,"internalInstance",new s);const l="xyz.amorgan.blurhash",c=800,u=600;async function d(e,t,n,r){let i,o,a,d=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],h=t,p=n;p>u&&(h=Math.floor(h*(u/p)),p=u),h>c&&(p=Math.floor(p*(c/h)),h=c);try{i=new window.OffscreenCanvas(h,p),o=i.getContext("2d")}catch(e){i=document.createElement("canvas"),i.width=h,i.height=p,o=i.getContext("2d")}o.drawImage(e,0,0,h,p),a=window.OffscreenCanvas&&i instanceof OffscreenCanvas?i.convertToBlob({type:r}):new Promise((e=>i.toBlob(e,r)));const m=o.getImageData(0,0,h,p),g=d?await s.instance.getBlurhash(m):void 0,f=await a;return{info:{thumbnail_info:{w:h,h:p,mimetype:f.type,size:f.size},w:t,h:n,[l]:g},thumbnail:f}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return C})),n.d(t,"b",(function(){return x}));var r=n(16),i=n(120),o=n.n(i),a=n(409),s=n(143),l=n(127),c=n(134),u=n(122),d=n(121),h=n(144),p=n(208),m=n(178),g=n(124),f=n(128),_=n(160),b=n(145),v=n(135),y=n(811);const E=e=>{const t=e.client.getUserId();return 100===e.getMember(t).powerLevelNorm&&e.getJoinedMembers().every((e=>e.userId===t||e.powerLevelNorm<100))};var S=e=>{let{space:t,onFinished:n}=e;const r=Object(i.useMemo)((()=>{const e=new Set(m.a.instance.getSpaceFilteredRoomIds(t.roomId));return m.a.instance.traverseSpace(t.roomId,(n=>{t.roomId!==n&&e.add(n)}),!1),Array.from(e).map((e=>t.client.getRoom(e))).filter(Boolean)}),[t]),[a,s]=Object(i.useState)([]),l=Object(i.useMemo)((()=>new Set(a)),[a]);let c,u;if(t.getJoinRule()!==_.c.Public&&(c=Object(d.a)("You won't be able to rejoin unless you are re-invited.")),E(t))u=Object(d.a)("You're the only admin of this space. Leaving it will mean no one has control over it.");else{a.filter(E).length>0&&(u=Object(d.a)("You're the only admin of some of the rooms or spaces you wish to leave. Leaving them will leave them without any admins."))}return o.a.createElement(v.a,{title:Object(d.a)("Leave %(spaceName)s",{spaceName:t.name}),className:"mx_LeaveSpaceDialog",contentId:"mx_LeaveSpaceDialog",onFinished:()=>n(!1),fixedWidth:!1},o.a.createElement("div",{className:"mx_Dialog_content",id:"mx_LeaveSpaceDialog"},o.a.createElement("p",null,Object(d.a)("You are about to leave <spaceName/>.",{},{spaceName:()=>o.a.createElement("b",null,t.name)})," ",c,c&&o.a.createElement(o.a.Fragment,null," "),r.length>0&&Object(d.a)("Would you like to leave the rooms in this space?")),r.length>0&&o.a.createElement(y.a,{space:t,spaceChildren:r,selected:l,onChange:s,noneLabel:Object(d.a)("Don't leave any rooms"),allLabel:Object(d.a)("Leave all rooms"),specificLabel:Object(d.a)("Leave some rooms")}),u&&o.a.createElement("div",{className:"mx_LeaveSpaceDialog_section_warning"},u)),o.a.createElement(b.a,{primaryButton:Object(d.a)("Leave space"),primaryButtonClass:"danger",onPrimaryButtonClick:()=>n(!0,a),hasCancel:!0,onCancel:()=>n(!1)}))},w=n(249),T=n(154);async function C(e){var t;let n,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];(!(arguments.length>2&&void 0!==arguments[2])||arguments[2])&&(n=l.b.createDialog(c.a,void 0,"mx_Dialog_spinner"));const _=u.a.get();let b=!0;const v=_.getRoomUpgradeHistory(e);if(v&&v.length>0){v[v.length-1].roomId!==e&&(b=!1)}const y=_.getRoom(e);await Promise.all(y.getPendingEvents().filter((e=>[a.a.QUEUED,a.a.ENCRYPTING,a.a.SENDING].includes(e.status))).map((e=>new Promise(((t,r)=>{const i=()=>{var o;e.status===a.a.NOT_SENT&&(null===(o=n)||void 0===o||o.close(),r(e.error));e.status&&e.status!==a.a.SENT||(e.off(s.c.Status,i),t())};e.on(s.c.Status,i)})))));let E={};if(b)E=await _.leaveRoomChain(e,i);else try{await _.leave(e)}catch(t){var S;if(null!=t&&null!==(S=t.data)&&void 0!==S&&S.errcode){const n=t.data.error||Object(d.a)("Unexpected server error trying to leave the room");E[e]=Object.assign(new Error(n),{errcode:t.data.errcode,data:t.data})}else E[e]=t||new Error("Failed to leave room for unknown causes")}if(i){const t=Object.values(E).find((e=>"M_LIMIT_EXCEEDED"===(null==e?void 0:e.errcode)));var w;if(t)return await Object(r.N)(null!==(w=t.data.retry_after_ms)&&void 0!==w?w:100),C(e,!1,!1)}null===(t=n)||void 0===t||t.close();const x=Object.entries(E).filter((e=>!!e[1]));if(x.length>0){const t=[];for(const n of x){const r=n[1];let i=Object(d.a)("Unexpected server error trying to leave the room");if(r.errcode&&r.message){if("M_CANNOT_LEAVE_SERVER_NOTICE_ROOM"===r.errcode)return void l.b.createDialog(h.a,{title:Object(d.a)("Can't leave Server Notices room"),description:Object(d.a)("This room is used for important messages from the Homeserver, so you cannot leave it.")});i=E[e].message}t.push(i,o.a.createElement("BR"))}l.b.createDialog(h.a,{title:Object(d.a)("Error leaving room"),description:t})}else if(T.b.instance.roomViewStore.getRoomId()===e)if(Object(p.h)(m.a.instance.activeSpace))g.a.dispatch({action:f.a.ViewHomePage});else if(m.a.instance.activeSpace===e){const t=m.a.instance.getCanonicalParent(e);null!==t?g.a.dispatch({action:f.a.ViewRoom,room_id:t.roomId,metricsTrigger:void 0}):g.a.dispatch({action:f.a.ViewHomePage})}else g.a.dispatch({action:f.a.ViewRoom,room_id:m.a.instance.activeSpace,metricsTrigger:void 0})}const x=e=>{l.b.createDialog(S,{space:e,onFinished:async(t,n)=>{t&&(await Object(w.a)(e,n,(e=>C(e.roomId))),g.a.dispatch({action:f.a.AfterLeaveRoom,room_id:e.roomId}))}},"mx_LeaveSpaceDialog_wrapper")}},function(e,t,n){"use strict";n.d(t,"c",(function(){return d})),n.d(t,"b",(function(){return h})),n.d(t,"a",(function(){return p}));var r=n(13),i=n.n(r),o=n(357);let a=null,s=0;var l=n(1),c=n(158),u=n(188);const d=-60;let h;!function(e){e.NewStream="new_stream",e.MuteStateChanged="mute_state_changed",e.LocalVolumeChanged="local_volume_changed",e.VolumeChanged="volume_changed",e.ConnectedChanged="connected_changed",e.Speaking="speaking",e.Disposed="disposed"}(h||(h={}));class p extends c.b{constructor(e){super(),i()(this,"stream",void 0),i()(this,"sdpMetadataStreamId",void 0),i()(this,"userId",void 0),i()(this,"deviceId",void 0),i()(this,"purpose",void 0),i()(this,"speakingVolumeSamples",void 0),i()(this,"client",void 0),i()(this,"call",void 0),i()(this,"roomId",void 0),i()(this,"audioMuted",void 0),i()(this,"videoMuted",void 0),i()(this,"localVolume",1),i()(this,"measuringVolumeActivity",!1),i()(this,"audioContext",void 0),i()(this,"analyser",void 0),i()(this,"frequencyBinCount",void 0),i()(this,"speakingThreshold",d),i()(this,"speaking",!1),i()(this,"volumeLooperTimeout",void 0),i()(this,"_disposed",!1),i()(this,"_connected",!1),i()(this,"onAddTrack",(()=>{this.emit(h.NewStream,this.stream)})),i()(this,"onCallState",(e=>{e===u.f.Connected?this.connected=!0:e===u.f.Connecting&&(this.connected=!1)})),i()(this,"volumeLooper",(()=>{if(!this.analyser)return;if(!this.measuringVolumeActivity)return;this.analyser.getFloatFrequencyData(this.frequencyBinCount);let e=-1/0;for(const t of this.frequencyBinCount)t>e&&(e=t);this.speakingVolumeSamples.shift(),this.speakingVolumeSamples.push(e),this.emit(h.VolumeChanged,e);let t=!1;for(const e of this.speakingVolumeSamples)if(e>this.speakingThreshold){t=!0;break}this.speaking!==t&&(this.speaking=t,this.emit(h.Speaking,this.speaking)),this.volumeLooperTimeout=setTimeout(this.volumeLooper,200)})),this.client=e.client,this.call=e.call,this.roomId=e.roomId,this.userId=e.userId,this.deviceId=e.deviceId,this.purpose=e.purpose,this.audioMuted=e.audioMuted,this.videoMuted=e.videoMuted,this.speakingVolumeSamples=new Array(8).fill(-1/0),this.sdpMetadataStreamId=e.stream.id,this.updateStream(null,e.stream),this.stream=e.stream,this.hasAudioTrack&&this.initVolumeMeasuring(),e.call&&(e.call.addListener(u.d.State,this.onCallState),this.onCallState(e.call.state))}get connected(){return this.isLocal()||this._connected}set connected(e){this._connected=e,this.emit(h.ConnectedChanged,this.connected)}get hasAudioTrack(){return this.stream.getAudioTracks().length>0}updateStream(e,t){t!==e&&(e&&(e.removeEventListener("addtrack",this.onAddTrack),this.measureVolumeActivity(!1)),this.stream=t,t.addEventListener("addtrack",this.onAddTrack),this.hasAudioTrack?this.initVolumeMeasuring():this.measureVolumeActivity(!1),this.emit(h.NewStream,this.stream))}initVolumeMeasuring(){if(!this.hasAudioTrack)return;this.audioContext||(this.audioContext=(null===a&&(a=new AudioContext),s++,a)),this.analyser=this.audioContext.createAnalyser(),this.analyser.fftSize=512,this.analyser.smoothingTimeConstant=.1;this.audioContext.createMediaStreamSource(this.stream).connect(this.analyser),this.frequencyBinCount=new Float32Array(this.analyser.frequencyBinCount)}getMember(){var e;const t=this.client.getRoom(this.roomId);return null!==(e=null==t?void 0:t.getMember(this.userId))&&void 0!==e?e:null}isLocal(){return this.userId===this.client.getUserId()&&(void 0===this.deviceId||this.deviceId===this.client.getDeviceId())}isAudioMuted(){return 0===this.stream.getAudioTracks().length||this.audioMuted}isVideoMuted(){return 0===this.stream.getVideoTracks().length||this.videoMuted}isSpeaking(){return this.speaking}setNewStream(e){this.updateStream(this.stream,e)}setAudioVideoMuted(e,t){null!==e&&(this.audioMuted!==e&&this.speakingVolumeSamples.fill(-1/0),this.audioMuted=e),null!==t&&(this.videoMuted=t),this.emit(h.MuteStateChanged,this.audioMuted,this.videoMuted)}measureVolumeActivity(e){if(e){if(!this.analyser||!this.frequencyBinCount||!this.hasAudioTrack)return;this.measuringVolumeActivity=!0,this.volumeLooper()}else this.measuringVolumeActivity=!1,this.speakingVolumeSamples.fill(-1/0),this.emit(h.VolumeChanged,-1/0)}setSpeakingThreshold(e){this.speakingThreshold=e}clone(){const e=this.client.getMediaHandler(),t=this.stream.clone();return l.a.log(`CallFeed clone() cloning stream (originalStreamId=${this.stream.id}, newStreamId${t.id})`),this.purpose===o.b.Usermedia?e.userMediaStreams.push(t):e.screensharingStreams.push(t),new p({client:this.client,roomId:this.roomId,userId:this.userId,deviceId:this.deviceId,stream:t,purpose:this.purpose,audioMuted:this.audioMuted,videoMuted:this.videoMuted})}dispose(){var e,t,n;clearTimeout(this.volumeLooperTimeout),null===(e=this.stream)||void 0===e||e.removeEventListener("addtrack",this.onAddTrack),null===(t=this.call)||void 0===t||t.removeListener(u.d.State,this.onCallState),this.audioContext&&(this.audioContext=void 0,this.analyser=void 0,s--,0===s&&(null===(n=a)||void 0===n||n.close(),a=null)),this._disposed=!0,this.emit(h.Disposed)}get disposed(){return this._disposed}set disposed(e){this._disposed=e}getLocalVolume(){return this.localVolume}setLocalVolume(e){this.localVolume=e,this.emit(h.LocalVolumeChanged,e)}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return y})),n.d(t,"a",(function(){return E})),n.d(t,"d",(function(){return S})),n.d(t,"c",(function(){return w}));var r=n(126),i=n.n(r),o=n(1),a=n(122),s=n(127),l=n(13),c=n.n(l),u=n(255),d=n.n(u),h=n(120),p=n.n(h),m=n(271),g=n(121),f=n(145),_=n(135);class b extends p.a.PureComponent{constructor(){super(...arguments),c()(this,"onChange",(e=>{this.props.onChange(this.props.url,e.currentTarget.checked)}))}render(){return p.a.createElement("input",{type:"checkbox",onChange:this.onChange,checked:this.props.checked})}}class v extends p.a.PureComponent{constructor(e){super(e),c()(this,"onCancelClick",(()=>{this.props.onFinished(!1)})),c()(this,"onNextClick",(()=>{this.props.onFinished(!0,Object.keys(this.state.agreedUrls).filter((e=>this.state.agreedUrls[e])))})),c()(this,"onTermsCheckboxChange",((e,t)=>{this.setState({agreedUrls:Object.assign({},this.state.agreedUrls,{[e]:t})})})),this.state={agreedUrls:{}};for(const t of e.agreedUrls)this.state.agreedUrls[t]=!0}nameForServiceType(e,t){switch(e){case m.a.IS:return p.a.createElement("div",null,Object(g.a)("Identity server"),p.a.createElement("br",null),"(",t,")");case m.a.IM:return p.a.createElement("div",null,Object(g.a)("Integration manager"),p.a.createElement("br",null),"(",t,")")}}summaryForServiceType(e){switch(e){case m.a.IS:return p.a.createElement("div",null,Object(g.a)("Find others by phone or email"),p.a.createElement("br",null),Object(g.a)("Be found by phone or email"));case m.a.IM:return p.a.createElement("div",null,Object(g.a)("Use bots, bridges, widgets and sticker packs"))}}render(){const e=[];for(const t of this.props.policiesAndServicePairs){const n=d.a.parse(t.service.baseUrl),r=Object.values(t.policies);for(let i=0;i<r.length;++i){const o=r[i],a=Object(g.j)(Object.keys(o).filter((e=>"version"!==e)));let s,l;0===i&&(s=this.nameForServiceType(t.service.serviceType,n.host),l=this.summaryForServiceType(t.service.serviceType)),e.push(p.a.createElement("tr",{key:o[a].url},p.a.createElement("td",{className:"mx_TermsDialog_service"},s),p.a.createElement("td",{className:"mx_TermsDialog_summary"},l),p.a.createElement("td",null,o[a].name,p.a.createElement("a",{rel:"noreferrer noopener",target:"_blank",href:o[a].url},p.a.createElement("span",{className:"mx_TermsDialog_link"}))),p.a.createElement("td",null,p.a.createElement(b,{url:o[a].url,onChange:this.onTermsCheckboxChange,checked:Boolean(this.state.agreedUrls[o[a].url])}))))}}let t=!1;for(const e of this.props.policiesAndServicePairs){let n=0;for(const t of Object.values(e.policies)){let e=!1;for(const n of Object.keys(t))if("version"!==n&&this.state.agreedUrls[t[n].url]){e=!0;break}e&&++n}if(n===Object.keys(e.policies).length){t=!0;break}}return p.a.createElement(_.a,{fixedWidth:!1,onFinished:this.onCancelClick,title:Object(g.a)("Terms of Service"),contentId:"mx_Dialog_content",hasCancel:!1},p.a.createElement("div",{id:"mx_Dialog_content"},p.a.createElement("p",null,Object(g.a)("To continue you need to accept the terms of this service.")),p.a.createElement("table",{className:"mx_TermsDialog_termsTable"},p.a.createElement("tbody",null,p.a.createElement("tr",{className:"mx_TermsDialog_termsTableHeader"},p.a.createElement("th",null,Object(g.a)("Service")),p.a.createElement("th",null,Object(g.a)("Summary")),p.a.createElement("th",null,Object(g.a)("Document")),p.a.createElement("th",null,Object(g.a)("Accept"))),e))),p.a.createElement(f.a,{primaryButton:Object(g.a)("Next"),hasCancel:!0,onCancel:this.onCancelClick,onPrimaryButtonClick:this.onNextClick,primaryDisabled:!t}))}}class y extends Error{}class E{constructor(e,t,n){this.serviceType=e,this.baseUrl=t,this.accessToken=n}}async function S(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:w;const n=e.map((e=>a.a.get().getTerms(e.serviceType,e.baseUrl))),r=(await Promise.all(n)).map(((t,n)=>({service:e[n],policies:t.policies}))),i=await a.a.get().getAccountData("m.accepted_terms");let s;s=i&&i.getContent()&&i.getContent().accepted?new Set(i.getContent().accepted):new Set;const l=[];for(const{service:e,policies:t}of r){const n={};for(const[e,r]of Object.entries(t)){let t=!1;for(const e of Object.keys(r))if("version"!==e&&s.has(r[e].url)){t=!0;break}t||(n[e]=r)}Object.keys(n).length>0&&l.push({service:e,policies:n})}const c=s.size;if(l.length>0){const e=await t(l,[...s]);o.a.log("User has agreed to URLs",e),e.forEach((e=>s.add(e)))}else o.a.log("User has already agreed to all required policies");if(s.size!==c){const e={accepted:Array.from(s)};await a.a.get().setAccountData("m.accepted_terms",e)}const u=r.map((e=>{const t=Array.from(s).filter((t=>{for(const n of Object.values(e.policies))for(const e of Object.keys(n))if("version"!==e&&n[e].url===t)return!0;return!1}));return 0===t.length?Promise.resolve():a.a.get().agreeToTerms(e.service.serviceType,e.service.baseUrl,e.service.accessToken,t)}));await Promise.all(u)}async function w(e,t,n){o.a.log("Terms that need agreement",e);const{finished:r}=s.b.createDialog(v,{policiesAndServicePairs:e,agreedUrls:t},i()("mx_TermsDialog",n)),[a,l]=await r;if(!a)throw new y;return l}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(13),i=n.n(r),o=n(129),a=n(1);class s{constructor(e){this.getFn=e,i()(this,"val",void 0),i()(this,"prom",void 0),i()(this,"done",!1)}get present(){return this.done}get cachedValue(){return this.val}get value(){return this.prom?this.prom:(this.prom=this.getFn(),this.prom.then((e=>(this.val=e,this.done=!0,e))))}}var l=n(166),c=n(528);class u{constructor(e){this.event=e,i()(this,"sourceUrl",void 0),i()(this,"thumbnailUrl",void 0),i()(this,"sourceBlob",void 0),i()(this,"thumbnailBlob",void 0),i()(this,"media",void 0),i()(this,"prepareSourceUrl",(async()=>{if(this.media.isEncrypted){const e=await this.sourceBlob.value;return URL.createObjectURL(e)}return this.media.srcHttp})),i()(this,"prepareThumbnailUrl",(async()=>{if(this.media.isEncrypted){const e=await this.thumbnailBlob.value;return null===e?null:URL.createObjectURL(e)}return this.media.thumbnailHttp})),i()(this,"fetchSource",(()=>{if(this.media.isEncrypted){const e=this.event.getContent();return Object(c.c)(e.file,e.info)}return this.media.downloadSource().then((e=>e.blob()))})),i()(this,"fetchThumbnail",(()=>{if(!this.media.hasThumbnail)return Promise.resolve(null);if(this.media.isEncrypted){var e;const t=this.event.getContent();return null!==(e=t.info)&&void 0!==e&&e.thumbnail_file?Object(c.c)(t.info.thumbnail_file,t.info.thumbnail_info):(a.a.warn("Media claims to have thumbnail and is encrypted, but no thumbnail_file found"),Promise.resolve(null))}return fetch(this.media.thumbnailHttp).then((e=>e.blob()))})),this.sourceUrl=new s(this.prepareSourceUrl),this.thumbnailUrl=new s(this.prepareThumbnailUrl),this.sourceBlob=new s(this.fetchSource),this.thumbnailBlob=new s(this.fetchThumbnail),this.media=Object(l.a)(this.event.getContent())}get fileName(){return this.event.getContent().filename||this.event.getContent().body||"download"}destroy(){this.media.isEncrypted&&(this.sourceUrl.cachedValue&&URL.revokeObjectURL(this.sourceUrl.cachedValue),this.thumbnailUrl.cachedValue&&URL.revokeObjectURL(this.thumbnailUrl.cachedValue))}static isEligible(e){if(!e)return!1;if(e.isRedacted())return!1;if(e.getType()===o.b.Sticker)return!0;if(e.getType()!==o.b.RoomMessage)return!1;const t=e.getContent();return!![o.e.Video,o.e.Audio,o.e.Image,o.e.File].includes(t.msgtype)||"string"==typeof t.url}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(13),i=n.n(r),o=n(251);class a extends o.c{constructor(e,t){super(t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.a),this.manager=e}async play(){return this.manager.pauseAllExcept(this),super.play()}destroy(){this.manager.destroyPlaybackInstance(this),super.destroy()}}class s{constructor(){i()(this,"instances",[])}static get instance(){return s.internalInstance||(s.internalInstance=new s),s.internalInstance}pauseAllExcept(e){this.instances.filter((t=>t!==e&&t.currentState===o.d.Playing)).forEach((e=>e.pause()))}destroyPlaybackInstance(e){this.instances=this.instances.filter((t=>t!==e))}createPlaybackInstance(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.a;const n=new a(this,e,t);return this.instances.push(n),n}}i()(s,"internalInstance",void 0)},function(e,t,n){"use strict";n.d(t,"a",(function(){return x}));var r=n(130),i=n.n(r),o=n(13),a=n.n(o),s=n(120),l=n.n(s),c=n(179),u=n(1),d=n(121),h=n(165),p=n(122),m=n(124),g=n(128),f=n(125),_=n(156),b=n(127),v=n(144),y=n(450),E=n(150),S=n(176),w=n(139),T=n(169);var C=e=>{let{ts:t,onDatePicked:n}=e;const r=new Date(t),i=`${r.getFullYear()}-${`${r.getMonth()+1}`.padStart(2,"0")}-${`${r.getDate()}`.padStart(2,"0")}`,[o,a]=Object(s.useState)(i),[c,u,h]=Object(T.i)(),p=e=>{e.preventDefault(),n(o)};return l.a.createElement("form",{className:"mx_JumpToDatePicker_form",onSubmit:p},l.a.createElement("span",{className:"mx_JumpToDatePicker_label"},Object(d.a)("Jump to date")),l.a.createElement(w.a,{element:"input",type:"date",onInput:e=>a(e.target.value),value:o,className:"mx_JumpToDatePicker_datePicker",label:Object(d.a)("Pick a date to jump to"),onFocus:c,inputRef:h,tabIndex:u?0:-1}),l.a.createElement(T.a,{element:"button",type:"submit",kind:"primary",className:"mx_JumpToDatePicker_submitButton",onClick:p},Object(d.a)("Go")))};class x extends l.a.Component{constructor(e){super(e),a()(this,"settingWatcherRef",void 0),a()(this,"onContextMenuOpenClick",(e=>{e.preventDefault(),e.stopPropagation();const t=e.target;this.setState({contextMenuPosition:t.getBoundingClientRect()})})),a()(this,"onContextMenuCloseClick",(()=>{this.closeMenu()})),a()(this,"closeMenu",(()=>{this.setState({contextMenuPosition:void 0})})),a()(this,"pickDate",(async e=>{const t=new Date(e).getTime(),n=p.a.get();try{const e=this.props.roomId,{event_id:r,origin_server_ts:i}=await n.timestampToEvent(e,t,c.a.Forward);u.a.log(`/timestamp_to_event: found ${r} (${i}) for timestamp=${t} (looking forward)`),m.a.dispatch({action:g.a.ViewRoom,event_id:r,highlighted:!0,room_id:e,metricsTrigger:void 0})}catch(e){const t=e.errcode||e.statusCode;void 0!==t&&b.b.createDialog(v.a,{title:Object(d.a)("Error"),description:Object(d.a)("Unable to find event at that date. (%(code)s)",{code:t})})}})),a()(this,"onLastWeekClicked",(()=>{const e=new Date;e.setDate(e.getDate()-7),this.pickDate(e),this.closeMenu()})),a()(this,"onLastMonthClicked",(()=>{const e=new Date;e.setMonth(e.getMonth()-1,1),this.pickDate(e),this.closeMenu()})),a()(this,"onTheBeginningClicked",(()=>{const e=new Date(0);this.pickDate(e),this.closeMenu()})),a()(this,"onDatePicked",(e=>{this.pickDate(e),this.closeMenu()})),this.state={jumpToDateEnabled:f.b.getValue("feature_jump_to_date")},this.settingWatcherRef=f.b.watchSetting("feature_jump_to_date",null,((e,t,n,r,i)=>{this.setState({jumpToDateEnabled:i})}))}componentWillUnmount(){this.settingWatcherRef&&f.b.unwatchSetting(this.settingWatcherRef)}getLabel(){const e=new Date(this.props.ts),t=!f.b.getValue(_.b.TimelineEnableRelativeDates);if(this.props.forExport||t)return Object(h.g)(e);const n=new Date,r=new Date,i=[Object(d.a)("Sunday"),Object(d.a)("Monday"),Object(d.a)("Tuesday"),Object(d.a)("Wednesday"),Object(d.a)("Thursday"),Object(d.a)("Friday"),Object(d.a)("Saturday")];return r.setDate(n.getDate()-1),e.toDateString()===n.toDateString()?Object(d.a)("Today"):e.toDateString()===r.toDateString()?Object(d.a)("Yesterday"):n.getTime()-e.getTime()<5184e5?i[e.getDay()]:Object(h.g)(e)}renderJumpToDateMenu(){let e;return this.state.contextMenuPosition&&(e=l.a.createElement(S.e,i()({},Object(y.a)(this.state.contextMenuPosition),{onFinished:this.onContextMenuCloseClick}),l.a.createElement(S.c,{first:!0},l.a.createElement(S.b,{label:Object(d.a)("Last week"),onClick:this.onLastWeekClicked}),l.a.createElement(S.b,{label:Object(d.a)("Last month"),onClick:this.onLastMonthClicked}),l.a.createElement(S.b,{label:Object(d.a)("The beginning of the room"),onClick:this.onTheBeginningClicked})),l.a.createElement(S.c,null,l.a.createElement(C,{ts:this.props.ts,onDatePicked:this.onDatePicked})))),l.a.createElement(E.c,{className:"mx_DateSeparator_jumpToDateMenu",onClick:this.onContextMenuOpenClick,isExpanded:!!this.state.contextMenuPosition,title:Object(d.a)("Jump to date")},l.a.createElement("h2",{"aria-hidden":"true"},this.getLabel()),l.a.createElement("div",{className:"mx_DateSeparator_chevron"}),e)}render(){const e=this.getLabel();let t;return t=this.state.jumpToDateEnabled?this.renderJumpToDateMenu():l.a.createElement("h2",{"aria-hidden":"true"},e),l.a.createElement("div",{className:"mx_DateSeparator",role:"separator",tabIndex:-1,"aria-label":e},l.a.createElement("hr",{role:"none"}),t,l.a.createElement("hr",{role:"none"}))}}},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=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,t){for(var n,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<arguments.length;l++){for(var c in n=Object(arguments[l]))i.call(n,c)&&(s[c]=n[c]);if(r){a=r(n);for(var u=0;u<a.length;u++)o.call(n,a[u])&&(s[a[u]]=n[a[u]])}}return s}},function(e,t,n){(function(e){var r=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++)n[t[r]]=Object.getOwnPropertyDescriptor(e,t[r]);return n},i=/%[sdj%]/g;t.format=function(e){if(!_(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(s(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,o=r.length,a=String(e).replace(i,(function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),l=r[n];n<o;l=r[++n])g(l)||!y(l)?a+=" "+l:a+=" "+s(l);return a},t.deprecate=function(n,r){if(void 0!==e&&!0===e.noDeprecation)return n;if(void 0===e)return function(){return t.deprecate(n,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(e.throwDeprecation)throw new Error(r);e.traceDeprecation?console.trace(r):console.error(r),i=!0}return n.apply(this,arguments)}};var o,a={};function s(e,n){var r={seen:[],stylize:c};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),m(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=l),u(r,e,r.depth)}function l(e,t){var n=s.styles[t];return n?"["+s.colors[n][0]+"m"+e+"["+s.colors[n][1]+"m":e}function c(e,t){return e}function u(e,n,r){if(e.customInspect&&n&&w(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return _(i)||(i=u(e,i,r)),i}var o=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(_(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(f(t))return e.stylize(""+t,"number");if(m(t))return e.stylize(""+t,"boolean");if(g(t))return e.stylize("null","null")}(e,n);if(o)return o;var a=Object.keys(n),s=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),S(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return d(n);if(0===a.length){if(w(n)){var l=n.name?": "+n.name:"";return e.stylize("[Function"+l+"]","special")}if(v(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(E(n))return e.stylize(Date.prototype.toString.call(n),"date");if(S(n))return d(n)}var c,y="",T=!1,C=["{","}"];(p(n)&&(T=!0,C=["[","]"]),w(n))&&(y=" [Function"+(n.name?": "+n.name:"")+"]");return v(n)&&(y=" "+RegExp.prototype.toString.call(n)),E(n)&&(y=" "+Date.prototype.toUTCString.call(n)),S(n)&&(y=" "+d(n)),0!==a.length||T&&0!=n.length?r<0?v(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),c=T?function(e,t,n,r,i){for(var o=[],a=0,s=t.length;a<s;++a)F(t,String(a))?o.push(h(e,t,n,r,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(h(e,t,n,r,i,!0))})),o}(e,n,r,s,a):a.map((function(t){return h(e,n,r,s,t,T)})),e.seen.pop(),function(e,t,n){var r=e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(r>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(c,y,C)):C[0]+y+C[1]}function d(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,n,r,i,o){var a,s,l;if((l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),F(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(l.value)<0?(s=g(n)?u(e,l.value,null):u(e,l.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),b(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function p(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function g(e){return null===e}function f(e){return"number"==typeof e}function _(e){return"string"==typeof e}function b(e){return void 0===e}function v(e){return y(e)&&"[object RegExp]"===T(e)}function y(e){return"object"==typeof e&&null!==e}function E(e){return y(e)&&"[object Date]"===T(e)}function S(e){return y(e)&&("[object Error]"===T(e)||e instanceof Error)}function w(e){return"function"==typeof e}function T(e){return Object.prototype.toString.call(e)}function C(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(n){if(b(o)&&(o=e.env.NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\b"+n+"\\b","i").test(o)){var r=e.pid;a[n]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",n,r,e)}}else a[n]=function(){};return a[n]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=m,t.isNull=g,t.isNullOrUndefined=function(e){return null==e},t.isNumber=f,t.isString=_,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=v,t.isObject=y,t.isDate=E,t.isError=S,t.isFunction=w,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(950);var x=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function F(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(e=new Date,n=[C(e.getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":"),[e.getDate(),x[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(951),t._extend=function(e,t){if(!t||!y(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var D="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function k(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(D&&e[D]){var t;if("function"!=typeof(t=e[D]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,D,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise((function(e,r){t=e,n=r})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(e,r){e?n(e):t(r)}));try{e.apply(this,i)}catch(e){n(e)}return r}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),D&&Object.defineProperty(t,D,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,r(e))},t.promisify.custom=D,t.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function n(){for(var n=[],r=0;r<arguments.length;r++)n.push(arguments[r]);var i=n.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var o=this,a=function(){return i.apply(o,arguments)};t.apply(this,n).then((function(t){e.nextTick(a,null,t)}),(function(t){e.nextTick(k,t,a)}))}return Object.setPrototypeOf(n,Object.getPrototypeOf(t)),Object.defineProperties(n,r(t)),n}}).call(this,n(56))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));class r{constructor(e,t){this.roomId=e}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=new(n(15).b)("unread_thread_notifications","org.matrix.msc3773.unread_thread_notifications")},function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return r})),function(e){e.SessionLoggedOut="Session.logged_out",e.NoConsent="no_consent"}(r||(r={}))},function(e,t,n){"use strict";let r,i,o;n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o})),function(e){e.R0="/_matrix/client/r0",e.V1="/_matrix/client/v1",e.V3="/_matrix/client/v3",e.Unstable="/_matrix/client/unstable"}(r||(r={})),function(e){e.V2="/_matrix/identity/v2"}(i||(i={})),function(e){e.R0="/_matrix/media/r0"}(o||(o={}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return h}));var r=n(13),i=n.n(r),o=n(1),a=n(188),s=n(129),l=n(147),c=n(224),u=n(140);let d;!function(e){e.Incoming="Call.incoming"}(d||(d={}));class h{constructor(e){i()(this,"calls",void 0),i()(this,"callEventBuffer",void 0),i()(this,"nextSeqByCall",new Map),i()(this,"toDeviceEventBuffers",new Map),i()(this,"client",void 0),i()(this,"candidateEventsByCall",void 0),i()(this,"eventBufferPromiseChain",void 0),i()(this,"onSync",(()=>{const e=this.callEventBuffer;this.callEventBuffer=[],this.eventBufferPromiseChain?this.eventBufferPromiseChain=this.eventBufferPromiseChain.then((()=>this.evaluateEventBuffer(e))):this.eventBufferPromiseChain=this.evaluateEventBuffer(e)})),i()(this,"onRoomTimeline",(e=>{this.callEventBuffer.push(e)})),i()(this,"onToDeviceEvent",(e=>{const t=e.getContent();if(!t.call_id)return void this.callEventBuffer.push(e);if(this.nextSeqByCall.has(t.call_id)||this.nextSeqByCall.set(t.call_id,0),void 0===t.seq)return void this.callEventBuffer.push(e);const n=this.nextSeqByCall.get(t.call_id)||0;if(t.seq!==n){this.toDeviceEventBuffers.has(t.call_id)||this.toDeviceEventBuffers.set(t.call_id,[]);const n=this.toDeviceEventBuffers.get(t.call_id),r=n.findIndex((e=>e.getContent().seq>t.seq));-1===r?n.push(e):n.splice(r,0,e)}else{const n=t.call_id;this.callEventBuffer.push(e),this.nextSeqByCall.set(n,t.seq+1);const r=this.toDeviceEventBuffers.get(n);let i=r&&r.shift();for(;i&&i.getContent().seq===this.nextSeqByCall.get(n);)this.callEventBuffer.push(i),this.nextSeqByCall.set(n,i.getContent().seq+1),i=r.shift()}})),this.client=e,this.calls=new Map,this.callEventBuffer=[],this.candidateEventsByCall=new Map}start(){this.client.on(l.b.Sync,this.onSync),this.client.on(u.d.Timeline,this.onRoomTimeline),this.client.on(l.b.ToDeviceEvent,this.onToDeviceEvent)}stop(){this.client.removeListener(l.b.Sync,this.onSync),this.client.removeListener(u.d.Timeline,this.onRoomTimeline),this.client.removeListener(l.b.ToDeviceEvent,this.onToDeviceEvent)}async evaluateEventBuffer(e){await Promise.all(e.map((e=>this.client.decryptEventIfNeeded(e))));const t=e.filter((e=>{const t=e.getType();return t.startsWith("m.call.")||t.startsWith("org.matrix.call.")})),n=new Set;for(const e of t){const t=e.getType();t!==s.b.CallAnswer&&t!==s.b.CallHangup||n.add(e.getContent().call_id)}for(const e of t){const t=e.getType(),r=e.getContent().call_id;if(t!==s.b.CallInvite||!n.has(r))try{await this.handleCallEvent(e)}catch(e){o.a.error("CallEventHandler evaluateEventBuffer() caught exception handling call event",e)}}}async handleCallEvent(e){var t,n;this.client.emit(l.b.ReceivedVoipEvent,e);const r=e.getContent(),i=e.getRoomId()||(null===(t=this.client.groupCallEventHandler.getGroupCallById(r.conf_id))||void 0===t||null===(n=t.room)||void 0===n?void 0:n.roomId),u=r.conf_id,h=e.getType(),p=e.getSender();let m,g,f=r.call_id?this.calls.get(r.call_id):void 0;if(u){if(g=this.client.groupCallEventHandler.getGroupCallById(u),!g)return void o.a.warn(`CallEventHandler handleCallEvent() could not find a group call - ignoring event (groupCallId=${u}, type=${h})`);if(m=r.device_id,!m)return o.a.warn(`CallEventHandler handleCallEvent() could not find a device id - ignoring event (senderId=${p})`),void g.emit(c.c.Error,new c.g(p));if(r.dest_session_id!==this.client.getSessionId())return void o.a.warn("CallEventHandler handleCallEvent() call event does not match current session id - ignoring")}const _=p===this.client.credentials.userId&&(void 0===m||m===this.client.getDeviceId());if(i)if(h!==s.b.CallInvite)if(h!==s.b.CallCandidates){var b;if([s.b.CallHangup,s.b.CallReject].includes(h))f?f.state!==a.f.Ended&&(h===s.b.CallHangup?f.onHangupReceived(r):f.onRejectReceived(r),f.state===a.f.Ended&&this.calls.delete(r.call_id)):(f=null!==(b=Object(a.h)(this.client,i,{opponentDeviceId:m,opponentSessionId:r.sender_session_id}))&&void 0!==b?b:void 0,f&&(f.callId=r.call_id,f.initWithHangup(e),this.calls.set(r.call_id,f)));else if(f&&f.hasPeerConnection){if(e.getContent().party_id!==f.ourPartyId)switch(h){case s.b.CallAnswer:_?f.state===a.f.Ringing&&f.onAnsweredElsewhere(r):f.onAnswerReceived(e);break;case s.b.CallSelectAnswer:f.onSelectAnswerReceived(e);break;case s.b.CallNegotiate:f.onNegotiateReceived(e);break;case s.b.CallAssertedIdentity:case s.b.CallAssertedIdentityPrefix:f.onAssertedIdentityReceived(e);break;case s.b.CallSDPStreamMetadataChanged:case s.b.CallSDPStreamMetadataChangedPrefix:f.onSDPStreamMetadataChangedReceived(e)}}else o.a.info(`CallEventHandler handleCallEvent() discarding possible call event as we don't have a call (type=${h})`)}else{if(_)return;f?f.onRemoteIceCandidatesReceived(e):(this.candidateEventsByCall.has(r.call_id)||this.candidateEventsByCall.set(r.call_id,[]),this.candidateEventsByCall.get(r.call_id).push(e))}else{var v,y;if(_)return;if(e.getLocalAge()>r.lifetime-3e3)return;if(f&&f.state===a.f.Ended)return;if(f&&o.a.warn(`CallEventHandler handleCallEvent() already has a call but got an invite - clobbering (callId=${r.call_id})`),r.invitee&&r.invitee!==this.client.getUserId())return;const t=(null!==(v=this.client.getTurnServersExpiry())&&void 0!==v?v:0)-Date.now();if(o.a.info("CallEventHandler handleCallEvent() current turn creds expire in "+t+" ms"),f=null!==(y=Object(a.h)(this.client,i,{forceTURN:this.client.forceTURN,opponentDeviceId:m,groupCallId:u,opponentSessionId:r.sender_session_id}))&&void 0!==y?y:void 0,!f)return void o.a.log(`CallEventHandler handleCallEvent() this client does not support WebRTC (callId=${r.call_id})`);f.callId=r.call_id;try{await f.initWithInvite(e)}catch(e){var E;if(e instanceof a.b)if(e.code===c.b.UnknownDevice)null===(E=g)||void 0===E||E.emit(c.c.Error,e);else o.a.error(e)}if(this.calls.set(f.callId,f),this.candidateEventsByCall.get(f.callId))for(const e of this.candidateEventsByCall.get(f.callId))f.onRemoteIceCandidatesReceived(e);let n;for(const e of this.calls.values()){var S;const t=[a.f.WaitLocalMedia,a.f.CreateOffer,a.f.InviteSent].includes(e.state);if(f.roomId===e.roomId&&e.direction===a.a.Outbound&&(null===(S=f.getOpponentMember())||void 0===S?void 0:S.userId)===e.invitee&&t){n=e;break}}n?n.callId>f.callId?(o.a.log(`CallEventHandler handleCallEvent() detected glare - answering incoming call and canceling outgoing call (incomingId=${f.callId}, outgoingId=${n.callId})`),n.replacedBy(f)):(o.a.log(`CallEventHandler handleCallEvent() detected glare - hanging up incoming call (incomingId=${f.callId}, outgoingId=${n.callId})`),f.hangup(a.c.Replaced,!0)):this.client.emit(d.Incoming,f)}}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return h}));var r=n(13),i=n.n(r),o=n(147),a=n(224),s=n(151),l=n(1),c=n(129),u=n(215);let d;!function(e){e.Incoming="GroupCall.incoming",e.Outgoing="GroupCall.outgoing",e.Ended="GroupCall.ended",e.Participants="GroupCall.participants"}(d||(d={}));class h{constructor(e){this.client=e,i()(this,"groupCalls",new Map),i()(this,"roomDeferreds",new Map),i()(this,"onRoomsChanged",(e=>{this.createGroupCallForRoom(e)})),i()(this,"onRoomStateChanged",((e,t)=>{if(e.getType()===c.b.GroupCallPrefix){const n=e.getStateKey(),r=e.getContent(),i=this.groupCalls.get(t.roomId);i||r["m.terminated"]?i&&i.groupCallId===n?r["m.terminated"]?i.terminate(!1):r["m.type"]!==i.type&&l.a.warn(`GroupCallEventHandler onRoomStateChanged() currently does not support changing type (roomId=${t.roomId})`):i&&i.groupCallId!==n&&l.a.warn(`GroupCallEventHandler onRoomStateChanged() currently does not support multiple calls (roomId=${t.roomId})`):this.createGroupCallFromRoomStateEvent(e)}}))}async start(){this.client.getSyncState()!==u.b.Syncing&&(l.a.debug("GroupCallEventHandler start() waiting for client to start syncing"),await new Promise((e=>{const t=()=>{if(this.client.getSyncState()===u.b.Syncing)return this.client.off(o.b.Sync,t),e()};this.client.on(o.b.Sync,t)})));const e=this.client.getRooms();for(const t of e)this.createGroupCallForRoom(t);this.client.on(o.b.Room,this.onRoomsChanged),this.client.on(s.b.Events,this.onRoomStateChanged)}stop(){this.client.removeListener(s.b.Events,this.onRoomStateChanged)}getRoomDeferred(e){let t=this.roomDeferreds.get(e);if(void 0===t){let n;t={prom:new Promise((e=>{n=e}))},t.resolve=n,this.roomDeferreds.set(e,t)}return t}waitUntilRoomReadyForGroupCalls(e){return this.getRoomDeferred(e).prom}getGroupCallById(e){return[...this.groupCalls.values()].find((t=>t.groupCallId===e))}createGroupCallForRoom(e){const t=e.currentState.getStateEvents(c.b.GroupCallPrefix),n=t.sort(((e,t)=>t.getTs()-e.getTs()));for(const r of n){if(!r.getContent()["m.terminated"]){l.a.debug(`GroupCallEventHandler createGroupCallForRoom() choosing group call from possible calls (stateKey=${r.getStateKey()}, ts=${r.getTs()}, roomId=${e.roomId}, numOfPossibleCalls=${t.length})`),this.createGroupCallFromRoomStateEvent(r);break}}l.a.info(`GroupCallEventHandler createGroupCallForRoom() processed room (roomId=${e.roomId})`),this.getRoomDeferred(e.roomId).resolve()}createGroupCallFromRoomStateEvent(e){const t=e.getRoomId(),n=e.getContent(),r=this.client.getRoom(t);if(!r)return void l.a.warn(`GroupCallEventHandler createGroupCallFromRoomStateEvent() couldn't find room for call (roomId=${t})`);const i=e.getStateKey(),o=n["m.type"];if(!Object.values(a.f).includes(o))return void l.a.warn(`GroupCallEventHandler createGroupCallFromRoomStateEvent() received invalid call type (type=${o}, roomId=${t})`);const s=n["m.intent"];if(!Object.values(a.d).includes(s))return void l.a.warn(`Received invalid group call intent (type=${o}, roomId=${t})`);const c=Boolean(n["io.element.ptt"]);let u;if(null!=n&&n.dataChannelsEnabled&&null!=n&&n.dataChannelOptions){const{ordered:e,maxPacketLifeTime:t,maxRetransmits:r,protocol:i}=n.dataChannelOptions;u={ordered:e,maxPacketLifeTime:t,maxRetransmits:r,protocol:i}}const h=new a.a(this.client,r,o,c,s,i,(null==n?void 0:n.dataChannelsEnabled)||this.client.isVoipWithNoMediaAllowed,u,this.client.isVoipWithNoMediaAllowed);return this.groupCalls.set(r.roomId,h),this.client.emit(d.Incoming,h),h}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(1),i=n(350),o=n(16);const a="crypto.",s=a+"account",l=a+"cross_signing_keys",c=a+"notified_error_devices",u=a+"device_data",d=a+"inboundgroupsessions/",h=a+"inboundgroupsessions.withheld/",p=a+"rooms/",m=a+"sessionsneedingbackup";function g(e){return a+"sessions/"+e}function f(e){return a+"session.problems/"+e}function _(e,t){return d+e+"/"+t}function b(e,t){return h+e+"/"+t}function v(e){return p+e}class y extends i.a{static exists(e){const t=e.length;for(let r=0;r<t;r++){var n;if(null!==(n=e.key(r))&&void 0!==n&&n.startsWith(a))return!0}return!1}constructor(e){super(),this.store=e}countEndToEndSessions(e,t){let n=0;for(let e=0;e<this.store.length;++e){var r;null!==(r=this.store.key(e))&&void 0!==r&&r.startsWith(g(""))&&++n}t(n)}_getEndToEndSessions(e){const t=E(this.store,g(e)),n={};for(const[e,r]of Object.entries(t||{}))n[e]="string"==typeof r?{session:r}:r;return n}getEndToEndSession(e,t,n,r){r(this._getEndToEndSessions(e)[t]||{})}getEndToEndSessions(e,t,n){n(this._getEndToEndSessions(e)||{})}getAllEndToEndSessions(e,t){for(let e=0;e<this.store.length;++e){var n;if(null!==(n=this.store.key(e))&&void 0!==n&&n.startsWith(g(""))){const n=this.store.key(e).split("/")[1];for(const e of Object.values(this._getEndToEndSessions(n)))t(e)}}}storeEndToEndSession(e,t,n,r){const i=this._getEndToEndSessions(e)||{};i[t]=n,S(this.store,g(e),i)}async storeEndToEndSessionProblem(e,t,n){const r=f(e),i=E(this.store,r)||[];i.push({type:t,fixed:n,time:Date.now()}),i.sort(((e,t)=>e.time-t.time)),S(this.store,r,i)}async getEndToEndSessionProblem(e,t){const n=f(e),r=E(this.store,n)||[];if(!r.length)return null;const i=r[r.length-1];for(const e of r)if(e.time>t)return Object.assign({},e,{fixed:i.fixed});return i.fixed?null:i}async filterOutNotifiedErrorDevices(e){const t=E(this.store,c)||{},n=[];for(const r of e){const{userId:e,deviceInfo:i}=r;e in t?i.deviceId in t[e]||(n.push(r),Object(o.L)(t[e],i.deviceId,!0)):(n.push(r),Object(o.L)(t,e,{[i.deviceId]:!0}))}return S(this.store,c,t),n}getEndToEndInboundGroupSession(e,t,n,r){r(E(this.store,_(e,t)),E(this.store,b(e,t)))}getAllEndToEndInboundGroupSessions(e,t){for(let e=0;e<this.store.length;++e){const n=this.store.key(e);null!=n&&n.startsWith(d)&&t({senderKey:n.slice(d.length,d.length+43),sessionId:n.slice(d.length+44),sessionData:E(this.store,n)})}t(null)}addEndToEndInboundGroupSession(e,t,n,r){E(this.store,_(e,t))||this.storeEndToEndInboundGroupSession(e,t,n,r)}storeEndToEndInboundGroupSession(e,t,n,r){S(this.store,_(e,t),n)}storeEndToEndInboundGroupSessionWithheld(e,t,n,r){S(this.store,b(e,t),n)}getEndToEndDeviceData(e,t){t(E(this.store,u))}storeEndToEndDeviceData(e,t){S(this.store,u,e)}storeEndToEndRoom(e,t,n){S(this.store,v(e),t)}getEndToEndRooms(e,t){const n={},r=v("");for(let e=0;e<this.store.length;++e){const t=this.store.key(e);if(null!=t&&t.startsWith(r)){n[t.slice(r.length)]=E(this.store,t)}}t(n)}getSessionsNeedingBackup(e){const t=E(this.store,m)||{},n=[];for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){const t=r.slice(0,43),i=r.slice(44);if(this.getEndToEndInboundGroupSession(t,i,null,(e=>{n.push({senderKey:t,sessionId:i,sessionData:e})})),e&&n.length>=e)break}return Promise.resolve(n)}countSessionsNeedingBackup(){const e=E(this.store,m)||{};return Promise.resolve(Object.keys(e).length)}unmarkSessionsNeedingBackup(e){const t=E(this.store,m)||{};for(const n of e)delete t[n.senderKey+"/"+n.sessionId];return S(this.store,m,t),Promise.resolve()}markSessionsNeedingBackup(e){const t=E(this.store,m)||{};for(const n of e)t[n.senderKey+"/"+n.sessionId]=!0;return S(this.store,m,t),Promise.resolve()}deleteAllData(){return this.store.removeItem(s),Promise.resolve()}getAccount(e,t){t(E(this.store,s))}storeAccount(e,t){S(this.store,s,t)}getCrossSigningKeys(e,t){t(E(this.store,l))}getSecretStorePrivateKey(e,t,n){t(E(this.store,a+`ssss_cache.${n}`))}storeCrossSigningKeys(e,t){S(this.store,l,t)}storeSecretStorePrivateKey(e,t,n){S(this.store,a+`ssss_cache.${t}`,n)}doTxn(e,t,n){return Promise.resolve(n(null))}}function E(e,t){try{return JSON.parse(e.getItem(t))}catch(e){r.a.log("Error: Failed to get key %s: %s",t,e.message),r.a.log(e.stack)}return null}function S(e,t,n){e.setItem(t,JSON.stringify(n))}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return h}));var r=n(13),i=n.n(r),o=n(1),a=n(225),s=n(654);const l=49152;class c extends Error{constructor(){super(...arguments),i()(this,"data",{errcode:"M_TOO_LARGE",error:"Payload too large for encrypted message"})}}function u(e){if(void 0===e)throw new Error("payloadString undefined");if(e.length>l)throw new c(`Message too long (${e.length} bytes). The maximum for an encrypted message is ${l} bytes.`)}class d{constructor(e){this.cryptoStore=e,i()(this,"pickleKey","DEFAULT_KEY"),i()(this,"deviceCurve25519Key",null),i()(this,"deviceEd25519Key",null),i()(this,"maxOneTimeKeys",null),i()(this,"outboundGroupSessionStore",{}),i()(this,"inboundGroupSessionMessageIndexes",{}),i()(this,"sessionsInProgress",{}),i()(this,"olmPrekeyPromise",Promise.resolve())}static getOlmVersion(){return e.Olm.get_library_version()}async init(){let t,{pickleKey:n,fromExportedDevice:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i=new e.Olm.Account;try{r?(n&&o.a.warn("ignoring opts.pickleKey because opts.fromExportedDevice is present."),this.pickleKey=r.pickleKey,await this.initialiseFromExportedDevice(r,i)):(n&&(this.pickleKey=n),await this.initialiseAccount(i)),t=JSON.parse(i.identity_keys()),this.maxOneTimeKeys=i.max_number_of_one_time_keys()}finally{i.free()}this.deviceCurve25519Key=t.curve25519,this.deviceEd25519Key=t.ed25519}async initialiseFromExportedDevice(e,t){await this.cryptoStore.doTxn("readwrite",[a.a.STORE_ACCOUNT,a.a.STORE_SESSIONS],(t=>{this.cryptoStore.storeAccount(t,e.pickledAccount),e.sessions.forEach((e=>{const{deviceKey:n,sessionId:r}=e,i={session:e.session,lastReceivedMessageTs:e.lastReceivedMessageTs};this.cryptoStore.storeEndToEndSession(n,r,i,t)}))})),t.unpickle(this.pickleKey,e.pickledAccount)}async initialiseAccount(e){await this.cryptoStore.doTxn("readwrite",[a.a.STORE_ACCOUNT],(t=>{this.cryptoStore.getAccount(t,(n=>{null!==n?e.unpickle(this.pickleKey,n):(e.create(),n=e.pickle(this.pickleKey),this.cryptoStore.storeAccount(t,n))}))}))}getAccount(t,n){this.cryptoStore.getAccount(t,(t=>{const r=new e.Olm.Account;try{r.unpickle(this.pickleKey,t),n(r)}finally{r.free()}}))}storeAccount(e,t){this.cryptoStore.storeAccount(e,t.pickle(this.pickleKey))}async export(){const e={pickleKey:this.pickleKey};return await this.cryptoStore.doTxn("readonly",[a.a.STORE_ACCOUNT,a.a.STORE_SESSIONS],(t=>{this.cryptoStore.getAccount(t,(t=>{e.pickledAccount=t})),e.sessions=[],this.cryptoStore.getAllEndToEndSessions(t,(t=>{e.sessions.push(t)}))})),e}getSession(e,t,n,r){this.cryptoStore.getEndToEndSession(e,t,n,(e=>{this.unpickleSession(e,r)}))}unpickleSession(t,n){const r=new e.Olm.Session;try{r.unpickle(this.pickleKey,t.session);n(Object.assign({},t,{session:r}))}finally{r.free()}}saveSession(e,t,n){const r=t.session.session_id();o.a.debug(`Saving Olm session ${r} with device ${e}: ${t.session.describe()}`);const i=Object.assign(t,{session:t.session.pickle(this.pickleKey)});this.cryptoStore.storeEndToEndSession(e,r,i,n)}getUtility(t){const n=new e.Olm.Utility;try{return t(n)}finally{n.free()}}async sign(e){let t;return await this.cryptoStore.doTxn("readonly",[a.a.STORE_ACCOUNT],(n=>{this.getAccount(n,(n=>{t=n.sign(e)}))})),t}async getOneTimeKeys(){let e;return await this.cryptoStore.doTxn("readonly",[a.a.STORE_ACCOUNT],(t=>{this.getAccount(t,(t=>{e=JSON.parse(t.one_time_keys())}))})),e}maxNumberOfOneTimeKeys(){var e;return null!==(e=this.maxOneTimeKeys)&&void 0!==e?e:-1}async markKeysAsPublished(){await this.cryptoStore.doTxn("readwrite",[a.a.STORE_ACCOUNT],(e=>{this.getAccount(e,(t=>{t.mark_keys_as_published(),this.storeAccount(e,t)}))}))}generateOneTimeKeys(e){return this.cryptoStore.doTxn("readwrite",[a.a.STORE_ACCOUNT],(t=>{this.getAccount(t,(n=>{n.generate_one_time_keys(e),this.storeAccount(t,n)}))}))}async generateFallbackKey(){await this.cryptoStore.doTxn("readwrite",[a.a.STORE_ACCOUNT],(e=>{this.getAccount(e,(t=>{t.generate_fallback_key(),this.storeAccount(e,t)}))}))}async getFallbackKey(){let e;return await this.cryptoStore.doTxn("readonly",[a.a.STORE_ACCOUNT],(t=>{this.getAccount(t,(t=>{e=JSON.parse(t.unpublished_fallback_key())}))})),e}async forgetOldFallbackKey(){await this.cryptoStore.doTxn("readwrite",[a.a.STORE_ACCOUNT],(e=>{this.getAccount(e,(t=>{t.forget_old_fallback_key(),this.storeAccount(e,t)}))}))}async createOutboundSession(t,n){let r;return await this.cryptoStore.doTxn("readwrite",[a.a.STORE_ACCOUNT,a.a.STORE_SESSIONS],(i=>{this.getAccount(i,(o=>{const a=new e.Olm.Session;try{a.create_outbound(o,t,n),r=a.session_id(),this.storeAccount(i,o);const e={session:a,lastReceivedMessageTs:Date.now()};this.saveSession(t,e,i)}finally{a.free()}}))}),o.a.withPrefix("[createOutboundSession]")),r}async createInboundSession(t,n,r){if(0!==n)throw new Error("Need messageType == 0 to create inbound session");let i;return await this.cryptoStore.doTxn("readwrite",[a.a.STORE_ACCOUNT,a.a.STORE_SESSIONS],(o=>{this.getAccount(o,(a=>{const s=new e.Olm.Session;try{s.create_inbound_from(a,t,r),a.remove_one_time_keys(s),this.storeAccount(o,a);const e=s.decrypt(n,r),l={session:s,lastReceivedMessageTs:Date.now()};this.saveSession(t,l,o),i={payload:e,session_id:s.session_id()}}finally{s.free()}}))}),o.a.withPrefix("[createInboundSession]")),i}async getSessionIdsForDevice(e){const t=o.a.withPrefix("[getSessionIdsForDevice]");if(e in this.sessionsInProgress){t.debug(`Waiting for Olm session for ${e} to be created`);try{await this.sessionsInProgress[e]}catch(e){}}let n;return await this.cryptoStore.doTxn("readonly",[a.a.STORE_SESSIONS],(t=>{this.cryptoStore.getEndToEndSessions(e,t,(e=>{n=Object.keys(e)}))}),t),n}async getSessionIdForDevice(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0;const r=await this.getSessionInfoForDevice(e,t,n);if(0===r.length)return null;let i=0;for(let e=1;e<r.length;e++){const t=r[e],n=void 0===t.lastReceivedMessageTs?0:t.lastReceivedMessageTs,o=r[i],a=void 0===o.lastReceivedMessageTs?0:o.lastReceivedMessageTs;(n>a||n===a&&t.sessionId<o.sessionId)&&(i=e)}return r[i].sessionId}async getSessionInfoForDevice(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.a;if(n=n.withPrefix("[getSessionInfoForDevice]"),e in this.sessionsInProgress&&!t){n.debug(`Waiting for Olm session for ${e} to be created`);try{await this.sessionsInProgress[e]}catch(e){}}const r=[];return await this.cryptoStore.doTxn("readonly",[a.a.STORE_SESSIONS],(t=>{this.cryptoStore.getEndToEndSessions(e,t,(e=>{const t=Object.keys(e).sort();for(const n of t)this.unpickleSession(e[n],(e=>{r.push({lastReceivedMessageTs:e.lastReceivedMessageTs,hasReceivedMessage:e.session.has_received_message(),sessionId:n})}))}))}),n),r}async encryptMessage(e,t,n){let r;return u(n),await this.cryptoStore.doTxn("readwrite",[a.a.STORE_SESSIONS],(i=>{this.getSession(e,t,i,(a=>{const s=a.session.describe();o.a.log("encryptMessage: Olm Session ID "+t+" to "+e+": "+s),r=a.session.encrypt(n),this.saveSession(e,a,i)}))}),o.a.withPrefix("[encryptMessage]")),r}async decryptMessage(e,t,n,r){let i;return await this.cryptoStore.doTxn("readwrite",[a.a.STORE_SESSIONS],(a=>{this.getSession(e,t,a,(s=>{const l=s.session.describe();o.a.log("decryptMessage: Olm Session ID "+t+" from "+e+": "+l),i=s.session.decrypt(n,r),s.lastReceivedMessageTs=Date.now(),this.saveSession(e,s,a)}))}),o.a.withPrefix("[decryptMessage]")),i}async matchesSession(e,t,n,r){if(0!==n)return!1;let i;return await this.cryptoStore.doTxn("readonly",[a.a.STORE_SESSIONS],(n=>{this.getSession(e,t,n,(e=>{i=e.session.matches_inbound(r)}))}),o.a.withPrefix("[matchesSession]")),i}async recordSessionProblem(e,t,n){o.a.info(`Recording problem on olm session with ${e} of type ${t}. Recreating: ${n}`),await this.cryptoStore.storeEndToEndSessionProblem(e,t,n)}sessionMayHaveProblems(e,t){return this.cryptoStore.getEndToEndSessionProblem(e,t)}filterOutNotifiedErrorDevices(e){return this.cryptoStore.filterOutNotifiedErrorDevices(e)}saveOutboundGroupSession(e){this.outboundGroupSessionStore[e.session_id()]=e.pickle(this.pickleKey)}getOutboundGroupSession(t,n){const r=this.outboundGroupSessionStore[t];if(void 0===r)throw new Error("Unknown outbound group session "+t);const i=new e.Olm.OutboundGroupSession;try{return i.unpickle(this.pickleKey,r),n(i)}finally{i.free()}}createOutboundGroupSession(){const t=new e.Olm.OutboundGroupSession;try{return t.create(),this.saveOutboundGroupSession(t),t.session_id()}finally{t.free()}}encryptGroupMessage(e,t){return o.a.log(`encrypting msg with megolm session ${e}`),u(t),this.getOutboundGroupSession(e,(e=>{const n=e.encrypt(t);return this.saveOutboundGroupSession(e),n}))}getOutboundGroupSessionKey(e){return this.getOutboundGroupSession(e,(function(e){return{chain_index:e.message_index(),key:e.session_key()}}))}unpickleInboundGroupSession(t,n){const r=new e.Olm.InboundGroupSession;try{return r.unpickle(this.pickleKey,t.session),n(r)}finally{r.free()}}getInboundGroupSession(e,t,n,r,i){this.cryptoStore.getEndToEndInboundGroupSession(t,n,r,((t,n)=>{if(null!==t){if(null!==e&&e!==t.room_id)throw new Error("Mismatched room_id for inbound group session (expected "+t.room_id+", was "+e+")");this.unpickleInboundGroupSession(t,(e=>{i(e,t,n)}))}else i(null,null,n)}))}async addInboundGroupSession(t,n,r,i,s,l,c){let u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{};await this.cryptoStore.doTxn("readwrite",[a.a.STORE_INBOUND_GROUP_SESSIONS,a.a.STORE_INBOUND_GROUP_SESSIONS_WITHHELD,a.a.STORE_SHARED_HISTORY_INBOUND_GROUP_SESSIONS],(a=>{this.getInboundGroupSession(t,n,i,a,((d,h)=>{const p=new e.Olm.InboundGroupSession;try{if(c?p.import_session(s):p.create(s),i!=p.session_id())throw new Error("Mismatched group session ID from senderKey: "+n);if(d&&(o.a.log(`Update for megolm session ${n}|${i}`),d.first_known_index()<=p.first_known_index())){if(!h.untrusted||u.untrusted)return void o.a.log(`Keeping existing megolm session ${n}|${i}`);if(d.first_known_index()<p.first_known_index())return void(d.export_session(p.first_known_index())===p.export_session(p.first_known_index())?(o.a.info(`Upgrading trust of existing megolm session ${n}|${i} based on newly-received trusted session`),h.untrusted=!1,this.cryptoStore.storeEndToEndInboundGroupSession(n,i,h,a)):o.a.warn(`Newly-received megolm session ${n}|$sessionId} does not match existing session! Keeping existing session`))}o.a.info(`Storing megolm session ${n}|${i} with first index `+p.first_known_index());const e=Object.assign({},u,{room_id:t,session:p.pickle(this.pickleKey),keysClaimed:l,forwardingCurve25519KeyChain:r});this.cryptoStore.storeEndToEndInboundGroupSession(n,i,e,a),!d&&u.sharedHistory&&this.cryptoStore.addSharedHistoryInboundGroupSession(t,n,i,a)}finally{p.free()}}))}),o.a.withPrefix("[addInboundGroupSession]"))}async addInboundGroupSessionWithheld(e,t,n,r,i){await this.cryptoStore.doTxn("readwrite",[a.a.STORE_INBOUND_GROUP_SESSIONS_WITHHELD],(o=>{this.cryptoStore.storeEndToEndInboundGroupSessionWithheld(t,n,{room_id:e,code:r,reason:i},o)}))}async decryptGroupMessage(e,t,n,r,i,l){let c,u=null;if(await this.cryptoStore.doTxn("readwrite",[a.a.STORE_INBOUND_GROUP_SESSIONS,a.a.STORE_INBOUND_GROUP_SESSIONS_WITHHELD],(o=>{this.getInboundGroupSession(e,t,n,o,((e,a,d)=>{if(null===e||null===a)return d&&(c=new s.b("MEGOLM_UNKNOWN_INBOUND_SESSION_ID",p(d),{session:t+"|"+n})),void(u=null);let h;try{h=e.decrypt(r)}catch(e){return void(c="OLM.UNKNOWN_MESSAGE_INDEX"===(null==e?void 0:e.message)&&d?new s.b("MEGOLM_UNKNOWN_INBOUND_SESSION_ID",p(d),{session:t+"|"+n}):e)}let m=h.plaintext;if(void 0===m)m=h;else{const e=t+"|"+n+"|"+h.message_index;if(e in this.inboundGroupSessionMessageIndexes){const t=this.inboundGroupSessionMessageIndexes[e];if(t.id!==i||t.timestamp!==l)return void(c=new Error("Duplicate message index, possible replay attack: "+e))}this.inboundGroupSessionMessageIndexes[e]={id:i,timestamp:l}}a.session=e.pickle(this.pickleKey),this.cryptoStore.storeEndToEndInboundGroupSession(t,n,a,o),u={result:m,keysClaimed:a.keysClaimed||{},senderKey:t,forwardingCurve25519KeyChain:a.forwardingCurve25519KeyChain||[],untrusted:!!a.untrusted}}))}),o.a.withPrefix("[decryptGroupMessage]")),c)throw c;return u}async hasInboundSessionKeys(e,t,n){let r;return await this.cryptoStore.doTxn("readonly",[a.a.STORE_INBOUND_GROUP_SESSIONS,a.a.STORE_INBOUND_GROUP_SESSIONS_WITHHELD],(i=>{this.cryptoStore.getEndToEndInboundGroupSession(t,n,i,(i=>{null!==i?e!==i.room_id?(o.a.warn(`requested keys for inbound group session ${t}|${n}, with incorrect room_id (expected ${i.room_id}, was ${e})`),r=!1):r=!0:r=!1}))}),o.a.withPrefix("[hasInboundSessionKeys]")),r}async getInboundGroupSessionKey(e,t,n,r){let i=null;return await this.cryptoStore.doTxn("readonly",[a.a.STORE_INBOUND_GROUP_SESSIONS,a.a.STORE_INBOUND_GROUP_SESSIONS_WITHHELD],(o=>{this.getInboundGroupSession(e,t,n,o,((e,t)=>{if(null===e||null===t)return void(i=null);void 0===r&&(r=e.first_known_index());const n=e.export_session(r),o=(t.keysClaimed||{}).ed25519||null,a=t.forwardingCurve25519KeyChain||[],s="untrusted"in t?t.untrusted:a.length>0;i={chain_index:r,key:n,forwarding_curve25519_key_chain:a,sender_claimed_ed25519_key:o,shared_history:t.sharedHistory||!1,untrusted:s}}))}),o.a.withPrefix("[getInboundGroupSessionKey]")),i}exportInboundGroupSession(e,t,n){return this.unpickleInboundGroupSession(n,(r=>{const i=r.first_known_index();return{sender_key:e,sender_claimed_keys:n.keysClaimed,room_id:n.room_id,session_id:t,session_key:r.export_session(i),forwarding_curve25519_key_chain:n.forwardingCurve25519KeyChain||[],first_known_index:r.first_known_index(),"org.matrix.msc3061.shared_history":n.sharedHistory||!1}}))}async getSharedHistoryInboundGroupSessions(e){let t;return await this.cryptoStore.doTxn("readonly",[a.a.STORE_SHARED_HISTORY_INBOUND_GROUP_SESSIONS],(n=>{t=this.cryptoStore.getSharedHistoryInboundGroupSessions(e,n)}),o.a.withPrefix("[getSharedHistoryInboundGroupSessionsForRoom]")),t}verifySignature(e,t,n){this.getUtility((function(r){r.ed25519_verify(e,t,n)}))}}const h={"m.unverified":"The sender has disabled encrypting to unverified devices.","m.blacklisted":"The sender has blocked you.","m.unauthorised":"You are not authorised to read the message.","m.no_olm":"Unable to establish a secure channel."};function p(e){return e.code&&e.code in h?h[e.code]:e.reason?e.reason:"decryption key withheld"}}).call(this,n(14))},function(e,t,n){"use strict";(function(e){n.d(t,"b",(function(){return A})),n.d(t,"a",(function(){return R}));var r=n(13),i=n.n(r),o=n(416),a=n.n(o),s=n(420),l=n(361),c=n(1),u=n(670),d=n(129);const h=d.b.KeyVerificationStart,p=[d.b.KeyVerificationAccept,d.b.KeyVerificationKey,d.b.KeyVerificationMac];let m;const g=Object(l.a)("m.mismatched_sas","Mismatched short authentication string"),f=Object(l.a)("m.mismatched_commitment","Mismatched commitment"),_=[["🐶","dog"],["🐱","cat"],["🦁","lion"],["🐎","horse"],["🦄","unicorn"],["🐷","pig"],["🐘","elephant"],["🐰","rabbit"],["🐼","panda"],["🐓","rooster"],["🐧","penguin"],["🐢","turtle"],["🐟","fish"],["🐙","octopus"],["🦋","butterfly"],["🌷","flower"],["🌳","tree"],["🌵","cactus"],["🍄","mushroom"],["🌏","globe"],["🌙","moon"],["☁️","cloud"],["🔥","fire"],["🍌","banana"],["🍎","apple"],["🍓","strawberry"],["🌽","corn"],["🍕","pizza"],["🎂","cake"],["❤️","heart"],["🙂","smiley"],["🤖","robot"],["🎩","hat"],["👓","glasses"],["🔧","spanner"],["🎅","santa"],["👍","thumbs up"],["☂️","umbrella"],["⌛","hourglass"],["⏰","clock"],["🎁","gift"],["💡","light bulb"],["📕","book"],["✏️","pencil"],["📎","paperclip"],["✂️","scissors"],["🔒","lock"],["🔑","key"],["🔨","hammer"],["☎️","telephone"],["🏁","flag"],["🚂","train"],["🚲","bicycle"],["✈️","aeroplane"],["🚀","rocket"],["🏆","trophy"],["⚽","ball"],["🎸","guitar"],["🎺","trumpet"],["🔔","bell"],["⚓️","anchor"],["🎧","headphones"],["📁","folder"],["📌","pin"]];const b={decimal:u.a,emoji:function(e){return[e[0]>>2,(3&e[0])<<4|e[1]>>4,(15&e[1])<<2|e[2]>>6,63&e[2],e[3]>>2,(3&e[3])<<4|e[4]>>4,(15&e[4])<<2|e[5]>>6].map((e=>_[e]))}};function v(e,t){const n={};for(const r of t)r in b&&(n[r]=b[r](Array.from(e)));return n}const y={"hkdf-hmac-sha256":"calculate_mac","org.matrix.msc3783.hkdf-hmac-sha256":"calculate_mac_fixed_base64","hkdf-hmac-sha256.v2":"calculate_mac_fixed_base64","hmac-sha256":"calculate_mac_long_kdf"};function E(e,t){return function(n,r){const i=e[y[t]](n,r);return c.a.log("SAS calculateMAC:",t,[n,r],i),i}}const S={"curve25519-hkdf-sha256":function(e,t,n){const r=`${e.baseApis.getUserId()}|${e.baseApis.deviceId}|${e.ourSASPubKey}|`,i=`${e.userId}|${e.deviceId}|${e.theirSASPubKey}|`,o="MATRIX_KEY_VERIFICATION_SAS|"+(e.initiatedByMe?r+i:i+r)+e.channel.transactionId;return t.generate_bytes(o,n)},curve25519:function(e,t,n){const r=`${e.baseApis.getUserId()}${e.baseApis.deviceId}`,i=`${e.userId}${e.deviceId}`,o="MATRIX_KEY_VERIFICATION_SAS"+(e.initiatedByMe?r+i:i+r)+e.channel.transactionId;return t.generate_bytes(o,n)}},w=["curve25519-hkdf-sha256","curve25519"],T=["sha256"],C=["hkdf-hmac-sha256.v2","org.matrix.msc3783.hkdf-hmac-sha256","hkdf-hmac-sha256","hmac-sha256"],x=Object.keys(b),F=new Set(w),D=new Set(T),k=new Set(C),O=new Set(x);function I(e,t){return Array.isArray(e)?e.filter((e=>t.has(e))):[]}let A;!function(e){e.ShowSas="show_sas"}(A||(A={}));class R extends s.b{constructor(){super(...arguments),i()(this,"waitingForAccept",void 0),i()(this,"ourSASPubKey",void 0),i()(this,"theirSASPubKey",void 0),i()(this,"sasEvent",void 0),i()(this,"doVerification",(async()=>{await e.Olm.init(),m=m||new e.Olm.Utility,await this.baseApis.downloadKeys([this.userId]);let t=!1;do{try{return this.initiatedByMe?await this.doSendVerification():await this.doRespondVerification()}catch(e){if(!(e instanceof s.a))throw e;this.startEvent=e.startEvent,t=!0}}while(t)}))}static get NAME(){return"m.sas.v1"}get events(){return p}canSwitchStartEvent(e){if(e.getType()!==h)return!1;const t=e.getContent();return(null==t?void 0:t.method)===R.NAME&&!!this.waitingForAccept}async sendStart(){const e=this.channel.completeContent(h,{method:R.NAME,from_device:this.baseApis.deviceId,key_agreement_protocols:w,hashes:T,message_authentication_codes:C,short_authentication_string:x});return await this.channel.sendCompleted(h,e),e}async verifyAndCheckMAC(e,t,n,r){const i=S[e](this,n,6),o=new Promise(((e,o)=>{this.sasEvent={sas:v(i,t),confirm:async()=>{try{await this.sendMAC(n,r),e()}catch(e){o(e)}},cancel:()=>o(Object(l.h)()),mismatch:()=>o(g())},this.emit(A.ShowSas,this.sasEvent)})),[a]=await Promise.all([this.waitForEvent(d.b.KeyVerificationMac).then((e=>(this.expectedEvent=d.b.KeyVerificationDone,e))),o]),s=a.getContent();await this.checkMAC(n,s,r)}async doSendVerification(){let t,n;if(this.waitingForAccept=!0,t=this.startEvent?this.channel.completedContentFromEvent(this.startEvent):await this.sendStart(),!this.initiatedByMe)throw new s.a(this.startEvent);try{n=await this.waitForEvent(d.b.KeyVerificationAccept)}finally{this.waitingForAccept=!1}let r=n.getContent();const i=I(r.short_authentication_string,O);if(!(F.has(r.key_agreement_protocol)&&D.has(r.hash)&&k.has(r.message_authentication_code)&&i.length))throw Object(l.g)();if("string"!=typeof r.commitment)throw Object(l.c)();const o=r.key_agreement_protocol,c=r.message_authentication_code,u=r.commitment,h=new e.Olm.SAS;try{this.ourSASPubKey=h.get_pubkey(),await this.send(d.b.KeyVerificationKey,{key:this.ourSASPubKey}),n=await this.waitForEvent(d.b.KeyVerificationKey),r=n.getContent();const e=r.key+a.a.stringify(t);if(m.sha256(e)!==u)throw f();this.theirSASPubKey=r.key,h.set_their_key(r.key),await this.verifyAndCheckMAC(o,i,h,c)}finally{h.free()}}async doRespondVerification(){let t=this.channel.completedContentFromEvent(this.startEvent);const n=I(w,new Set(t.key_agreement_protocols))[0],r=I(T,new Set(t.hashes))[0],i=I(C,new Set(t.message_authentication_codes))[0],o=I(t.short_authentication_string,O);if(void 0===n||void 0===r||void 0===i||!o.length)throw Object(l.g)();const s=new e.Olm.SAS;try{const e=s.get_pubkey()+a.a.stringify(t);await this.send(d.b.KeyVerificationAccept,{key_agreement_protocol:n,hash:r,message_authentication_code:i,short_authentication_string:o,commitment:m.sha256(e)});t=(await this.waitForEvent(d.b.KeyVerificationKey)).getContent(),this.theirSASPubKey=t.key,s.set_their_key(t.key),this.ourSASPubKey=s.get_pubkey(),await this.send(d.b.KeyVerificationKey,{key:this.ourSASPubKey}),await this.verifyAndCheckMAC(n,o,s,i)}finally{s.free()}}sendMAC(e,t){const n={},r=[],i="MATRIX_KEY_VERIFICATION_MAC"+this.baseApis.getUserId()+this.baseApis.deviceId+this.userId+this.deviceId+this.channel.transactionId,o=`ed25519:${this.baseApis.deviceId}`;n[o]=E(e,t)(this.baseApis.getDeviceEd25519Key(),i+o),r.push(o);const a=this.baseApis.getCrossSigningId();if(a){const o=`ed25519:${a}`;n[o]=E(e,t)(a,i+o),r.push(o)}const s=E(e,t)(r.sort().join(","),i+"KEY_IDS");return this.send(d.b.KeyVerificationMac,{mac:n,keys:s})}async checkMAC(e,t,n){const r="MATRIX_KEY_VERIFICATION_MAC"+this.userId+this.deviceId+this.baseApis.getUserId()+this.baseApis.deviceId+this.channel.transactionId;if(t.keys!==E(e,n)(Object.keys(t.mac).sort().join(","),r+"KEY_IDS"))throw Object(l.d)();await this.verifyKeys(this.userId,t.mac,((t,i,o)=>{if(o!==E(e,n)(i.keys[t],r+t))throw Object(l.d)()}))}}}).call(this,n(14))},function(e,t,n){"use strict";n.d(t,"d",(function(){return u})),n.d(t,"c",(function(){return d})),n.d(t,"b",(function(){return h})),n.d(t,"g",(function(){return p})),n.d(t,"a",(function(){return m})),n.d(t,"f",(function(){return g})),n.d(t,"e",(function(){return _}));var r=n(13),i=n.n(r),o=n(1),a=n(158),s=n(16);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const u="*",d="$ME",h="$LAZY";let p,m,g;!function(e){e.RequestFinished="FINISHED",e.Complete="COMPLETE"}(p||(p={}));class f{constructor(e){i()(this,"list",void 0),i()(this,"isModified",void 0),i()(this,"roomIndexToRoomId",{}),i()(this,"joinedCount",0),this.replaceList(e)}setModified(e){this.isModified=e}updateListRange(e){this.list.ranges=JSON.parse(JSON.stringify(e))}replaceList(e){e.filters=e.filters||{},e.ranges=e.ranges||[],this.list=JSON.parse(JSON.stringify(e)),this.isModified=!0,this.roomIndexToRoomId={},this.joinedCount=0}getList(e){let t={ranges:JSON.parse(JSON.stringify(this.list.ranges))};return(this.isModified||e)&&(t=JSON.parse(JSON.stringify(this.list))),t}isIndexInRange(e){for(const t of this.list.ranges)if(t[0]<=e&&e<=t[1])return!0;return!1}}!function(e){e.PreProcess="ExtState.PreProcess",e.PostProcess="ExtState.PostProcess"}(m||(m={})),function(e){e.RoomData="SlidingSync.RoomData",e.Lifecycle="SlidingSync.Lifecycle",e.List="SlidingSync.List"}(g||(g={}));class _ extends a.b{constructor(e,t,n,r,o){super(),this.proxyBaseUrl=e,this.roomSubscriptionInfo=n,this.client=r,this.timeoutMS=o,i()(this,"lists",void 0),i()(this,"listModifiedCount",0),i()(this,"terminated",!1),i()(this,"needsResend",!1),i()(this,"txnId",null),i()(this,"txnIdDefers",[]),i()(this,"extensions",{}),i()(this,"desiredRoomSubscriptions",new Set),i()(this,"confirmedRoomSubscriptions",new Set),i()(this,"customSubscriptions",new Map),i()(this,"roomIdToCustomSubscription",new Map),i()(this,"pendingReq",void 0),i()(this,"abortController",void 0),this.lists=new Map,t.forEach(((e,t)=>{this.lists.set(t,new f(e))}))}addCustomSubscription(e,t){this.customSubscriptions.has(e)?o.a.warn(`addCustomSubscription: ${e} already exists as a custom subscription, ignoring.`):this.customSubscriptions.set(e,t)}useCustomSubscription(e,t){this.roomIdToCustomSubscription.get(e)!==t&&(this.roomIdToCustomSubscription.set(e,t),this.confirmedRoomSubscriptions.delete(e))}getListData(e){const t=this.lists.get(e);return t?{joinedCount:t.joinedCount,roomIndexToRoomId:Object.assign({},t.roomIndexToRoomId)}:null}getListParams(e){const t=this.lists.get(e);return t?t.getList(!0):null}setListRanges(e,t){const n=this.lists.get(e);return n?(n.updateListRange(t),this.resend()):Promise.reject(new Error("no list with key "+e))}setList(e,t){const n=this.lists.get(e);return n?(n.replaceList(t),this.lists.set(e,n)):this.lists.set(e,new f(t)),this.listModifiedCount+=1,this.resend()}getRoomSubscriptions(){return new Set(Array.from(this.desiredRoomSubscriptions))}modifyRoomSubscriptions(e){return this.desiredRoomSubscriptions=e,this.resend()}modifyRoomSubscriptionInfo(e){return this.roomSubscriptionInfo=e,this.confirmedRoomSubscriptions=new Set,this.resend()}registerExtension(e){if(this.extensions[e.name()])throw new Error(`registerExtension: ${e.name()} already exists as an extension`);this.extensions[e.name()]=e}getExtensionRequest(e){const t={};return Object.keys(this.extensions).forEach((n=>{t[n]=this.extensions[n].onRequest(e)})),t}onPreExtensionsResponse(e){Object.keys(e).forEach((t=>{this.extensions[t].when()==m.PreProcess&&this.extensions[t].onResponse(e[t])}))}onPostExtensionsResponse(e){Object.keys(e).forEach((t=>{this.extensions[t].when()==m.PostProcess&&this.extensions[t].onResponse(e[t])}))}invokeRoomDataListeners(e,t){t.required_state||(t.required_state=[]),t.timeline||(t.timeline=[]),this.emit(g.RoomData,e,t)}invokeLifecycleListeners(e,t,n){this.emit(g.Lifecycle,e,t,n)}shiftRight(e,t,n){const r=this.lists.get(e);if(r)for(let e=t;e>n;e--)r.isIndexInRange(e)&&(r.roomIndexToRoomId[e]=r.roomIndexToRoomId[e-1])}shiftLeft(e,t,n){const r=this.lists.get(e);if(r)for(let e=n;e<t;e++)r.isIndexInRange(e)&&(r.roomIndexToRoomId[e]=r.roomIndexToRoomId[e+1])}removeEntry(e,t){const n=this.lists.get(e);if(!n)return;let r=-1;for(const e in n.roomIndexToRoomId)Number(e)>r&&(r=Number(e));r<0||t>r||(this.shiftLeft(e,r,t),delete n.roomIndexToRoomId[r])}addEntry(e,t){const n=this.lists.get(e);if(!n)return;let r=-1;for(const e in n.roomIndexToRoomId)Number(e)>r&&(r=Number(e));r<0||t>r||this.shiftRight(e,r+1,t)}processListOps(e,t){let n=-1;const r=this.lists.get(t);r&&(e.ops.forEach((e=>{if(r)switch(e.op){case"DELETE":o.a.debug("DELETE",t,e.index,";"),delete r.roomIndexToRoomId[e.index],-1!==n&&this.removeEntry(t,n),n=e.index;break;case"INSERT":o.a.debug("INSERT",t,e.index,e.room_id,";"),r.roomIndexToRoomId[e.index]&&(n<0?this.addEntry(t,e.index):n>e.index?this.shiftRight(t,n,e.index):n<e.index&&this.shiftLeft(t,e.index,n)),n=-1,r.roomIndexToRoomId[e.index]=e.room_id;break;case"INVALIDATE":for(let t=e.range[0];t<=e.range[1];t++)delete r.roomIndexToRoomId[t];o.a.debug("INVALIDATE",t,e.range[0],e.range[1],";");break;case"SYNC":{const n=e.range[0];for(let t=n;t<=e.range[1];t++){const i=e.room_ids[t-n];if(!i)break;r.roomIndexToRoomId[t]=i}o.a.debug("SYNC",t,e.range[0],e.range[1],(e.room_ids||[]).join(" "),";");break}}})),-1!==n&&this.removeEntry(t,n))}resend(){var e;if(this.needsResend&&this.txnIdDefers.length>0)return this.txnIdDefers[this.txnIdDefers.length-1].promise;this.needsResend=!0,this.txnId=this.client.makeTxnId();const t=Object(s.m)();return this.txnIdDefers.push(c(c({},t),{},{txnId:this.txnId})),null===(e=this.abortController)||void 0===e||e.abort(),this.abortController=new AbortController,t.promise}resolveTransactionDefers(e){if(!e)return;let t=-1;for(let n=0;n<this.txnIdDefers.length;n++)if(this.txnIdDefers[n].txnId===e){t=n;break}if(-1!==t){for(let e=0;e<t;e++)this.txnIdDefers[e].reject(this.txnIdDefers[e].txnId);this.txnIdDefers[t].resolve(e),this.txnIdDefers=this.txnIdDefers.slice(t+1)}else o.a.warn(`resolveTransactionDefers: seen ${e} but it isn't a pending txn, ignoring.`)}stop(){var e;this.terminated=!0,null===(e=this.abortController)||void 0===e||e.abort(),this.removeAllListeners(g.Lifecycle),this.removeAllListeners(g.List),this.removeAllListeners(g.RoomData)}resetup(){var e;o.a.warn("SlidingSync: resetting connection info"),this.txnIdDefers.forEach((e=>{e.reject(e.txnId)})),this.txnIdDefers=[],this.lists.forEach((e=>{e.setModified(!0)})),this.confirmedRoomSubscriptions=new Set,this.needsResend=!0,null===(e=this.abortController)||void 0===e||e.abort(),this.abortController=new AbortController}async start(){let e;for(this.abortController=new AbortController;!this.terminated;){this.needsResend=!1;let t,n=!1;try{const r=this.listModifiedCount,i={};this.lists.forEach(((e,t)=>{i[t]=e.getList(!1)}));const a={lists:i,pos:e,timeout:this.timeoutMS,clientTimeout:this.timeoutMS+1e4,extensions:this.getExtensionRequest(void 0===e)},s=b(this.desiredRoomSubscriptions,this.confirmedRoomSubscriptions),l=b(this.confirmedRoomSubscriptions,this.desiredRoomSubscriptions);if(l.size>0&&(a.unsubscribe_rooms=Array.from(l)),s.size>0){a.room_subscriptions={};for(const e of s){const t=this.roomIdToCustomSubscription.get(e);let n=this.roomSubscriptionInfo;t&&this.customSubscriptions.has(t)&&(n=this.customSubscriptions.get(t)),a.room_subscriptions[e]=n}}this.txnId&&(a.txn_id=this.txnId,this.txnId=null),this.pendingReq=this.client.slidingSync(a,this.proxyBaseUrl,this.abortController.signal),t=await this.pendingReq,e=t.pos;for(const e of s)this.confirmedRoomSubscriptions.add(e);for(const e of l)this.confirmedRoomSubscriptions.delete(e);r!==this.listModifiedCount&&(o.a.debug("list modified during await call, not updating list"),n=!0),this.lists.forEach((e=>{e.setModified(!1)})),t.lists=t.lists||{},t.rooms=t.rooms||{},t.extensions=t.extensions||{},Object.keys(t.lists).forEach((e=>{const n=this.lists.get(e);n&&t&&(n.joinedCount=t.lists[e].count)})),this.invokeLifecycleListeners(p.RequestFinished,t)}catch(t){if(t.httpStatus){if(this.invokeLifecycleListeners(p.RequestFinished,null,t),400===t.httpStatus){this.resetup(),e=void 0,await Object(s.N)(50);continue}}else if(this.needsResend||"AbortError"===t.name)continue;o.a.error(t),await Object(s.N)(5e3)}if(!t)continue;this.onPreExtensionsResponse(t.extensions),Object.keys(t.rooms).forEach((e=>{this.invokeRoomDataListeners(e,t.rooms[e])}));const r=new Set;if(!n)for(const[e,n]of Object.entries(t.lists))n.ops=n.ops||[],n.ops.length>0&&r.add(e),this.processListOps(n,e);this.invokeLifecycleListeners(p.Complete,t),this.onPostExtensionsResponse(t.extensions),r.forEach((e=>{const t=this.lists.get(e);t&&this.emit(g.List,e,t.joinedCount,Object.assign({},t.roomIndexToRoomId))})),this.resolveTransactionDefers(t.txn_id)}}}const b=(e,t)=>{const n=new Set(e);for(const e of t)n.delete(e);return n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(13),i=n.n(r),o=n(6),a=n(143),s=n(129),l=n(1),c=n(147),u=n(215),d=n(673),h=n(222),p=n(16);class m extends c.d{constructor(e,t,n,r){var d,h,p,m,g,f,_,b,v,y;super(r),this.widgetApi=e,this.capabilities=t,this.roomId=n,i()(this,"room",void 0),i()(this,"widgetApiReady",new Promise((e=>this.widgetApi.once("ready",e)))),i()(this,"lifecycle",void 0),i()(this,"syncState",null),i()(this,"onEvent",(async e=>{if(e.preventDefault(),e.detail.data.room_id===this.roomId){const t=new a.b(e.detail.data);await this.syncApi.injectRoomEvents(this.room,[],[t]),this.emit(c.b.Event,t),this.setSyncState(u.b.Syncing),l.a.info(`Received event ${t.getId()} ${t.getType()} ${t.getStateKey()}`)}else{const{event_id:t,room_id:n}=e.detail.data;l.a.info(`Received event ${t} for a different room ${n}; discarding`)}await this.ack(e)})),i()(this,"onToDevice",(async e=>{e.preventDefault();const t=new a.b({type:e.detail.data.type,sender:e.detail.data.sender,content:e.detail.data.content});e.detail.data.encrypted&&t.makeEncrypted(s.b.RoomMessageEncrypted,{},"",""),this.emit(c.b.ToDeviceEvent,t),this.setSyncState(u.b.Syncing),await this.ack(e)})),(null!==(d=t.sendEvent)&&void 0!==d&&d.length||null!==(h=t.receiveEvent)&&void 0!==h&&h.length||!0===t.sendMessage||Array.isArray(t.sendMessage)&&t.sendMessage.length||!0===t.receiveMessage||Array.isArray(t.receiveMessage)&&t.receiveMessage.length||null!==(p=t.sendState)&&void 0!==p&&p.length||null!==(m=t.receiveState)&&void 0!==m&&m.length)&&e.requestCapabilityForRoomTimeline(n),null===(g=t.sendEvent)||void 0===g||g.forEach((t=>e.requestCapabilityToSendEvent(t))),null===(f=t.receiveEvent)||void 0===f||f.forEach((t=>e.requestCapabilityToReceiveEvent(t))),!0===t.sendMessage?e.requestCapabilityToSendMessage():Array.isArray(t.sendMessage)&&t.sendMessage.forEach((t=>e.requestCapabilityToSendMessage(t))),!0===t.receiveMessage?e.requestCapabilityToReceiveMessage():Array.isArray(t.receiveMessage)&&t.receiveMessage.forEach((t=>e.requestCapabilityToReceiveMessage(t))),null===(_=t.sendState)||void 0===_||_.forEach((t=>{let{eventType:n,stateKey:r}=t;return e.requestCapabilityToSendState(n,r)})),null===(b=t.receiveState)||void 0===b||b.forEach((t=>{let{eventType:n,stateKey:r}=t;return e.requestCapabilityToReceiveState(n,r)})),null===(v=t.sendToDevice)||void 0===v||v.forEach((t=>e.requestCapabilityToSendToDevice(t))),null===(y=t.receiveToDevice)||void 0===y||y.forEach((t=>e.requestCapabilityToReceiveToDevice(t))),t.turnServers&&e.requestCapability(o.MatrixCapabilities.MSC3846TurnServers),e.on(`action:${o.WidgetApiToWidgetAction.SendEvent}`,this.onEvent),e.on(`action:${o.WidgetApiToWidgetAction.SendToDevice}`,this.onToDevice),e.start()}async startClient(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.lifecycle=new AbortController;const r=this.getUserId();r&&this.store.storeUser(new h.a(r)),n.slidingSync?this.syncApi=new d.a(n.slidingSync,this,n,this.buildSyncApiOptions()):this.syncApi=new u.a(this,n,this.buildSyncApiOptions()),this.room=this.syncApi.createRoom(this.roomId),this.store.storeRoom(this.room),await this.widgetApiReady,await Promise.all(null!==(e=null===(t=this.capabilities.receiveState)||void 0===t?void 0:t.map((async e=>{let{eventType:t,stateKey:n}=e;const r=(await this.widgetApi.readStateEvents(t,void 0,n,[this.roomId])).map((e=>new a.b(e)));await this.syncApi.injectRoomEvents(this.room,[],r),r.forEach((e=>{this.emit(c.b.Event,e),l.a.info(`Backfilled event ${e.getId()} ${e.getType()} ${e.getStateKey()}`)}))})))&&void 0!==e?e:[]),this.setSyncState(u.b.Syncing),l.a.info("Finished backfilling events"),this.capabilities.turnServers&&this.watchTurnServers()}stopClient(){this.widgetApi.off(`action:${o.WidgetApiToWidgetAction.SendEvent}`,this.onEvent),this.widgetApi.off(`action:${o.WidgetApiToWidgetAction.SendToDevice}`,this.onToDevice),super.stopClient(),this.lifecycle.abort()}async joinRoom(e){if(e===this.roomId)return this.room;throw new Error(`Unknown room: ${e}`)}async encryptAndSendEvent(e,t){let n;try{n=await this.widgetApi.sendRoomEvent(t.getType(),t.getContent(),e.roomId)}catch(n){throw this.updatePendingEventStatus(e,t,a.a.NOT_SENT),n}return e.updatePendingEvent(t,a.a.SENT,n.event_id),{event_id:n.event_id}}async sendStateEvent(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return await this.widgetApi.sendStateEvent(t,r,n,e)}async sendToDevice(e,t){return await this.widgetApi.sendToDevice(e,!1,Object(p.F)(t)),{}}async queueToDevice(e){let{eventType:t,batch:n}=e;const r=new p.b((()=>new Map));for(const{userId:e,deviceId:t,payload:i}of n)r.getOrCreate(e).set(t,i);await this.widgetApi.sendToDevice(t,!1,Object(p.F)(r))}async encryptAndSendToDevices(e,t){const n=new p.b((()=>new Map));for(const{userId:r,deviceInfo:{deviceId:i}}of e)n.getOrCreate(r).set(i,t);await this.widgetApi.sendToDevice(t.type,!0,Object(p.F)(n))}async checkTurnServers(){return this.turnServers.length>0}getSyncState(){return this.syncState}setSyncState(e){const t=this.syncState;this.syncState=e,this.emit(c.b.Sync,e,t)}async ack(e){await this.widgetApi.transport.reply(e.detail,{})}async watchTurnServers(){const e=this.widgetApi.getTurnServers(),t=()=>{e.return(void 0)};this.lifecycle.signal.addEventListener("abort",t);try{for await(const t of e)this.turnServers=[{urls:t.uris,username:t.username,credential:t.password}],this.emit(c.b.TurnServers,this.turnServers),l.a.log(`Received TURN server: ${t.uris}`)}catch(e){l.a.warn("Error watching TURN servers",e)}finally{this.lifecycle.signal.removeEventListener("abort",t)}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return p}));var r=n(13),i=n.n(r),o=n(1),a=n(16),s=n(129),l=n(18),c=n(505);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}let h;!function(e){e.Invite="invite",e.Leave="leave",e.Join="join"}(h||(h={}));class p{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opts=e,i()(this,"accountData",{}),i()(this,"inviteRooms",{}),i()(this,"joinRooms",{}),i()(this,"nextBatch",null),this.opts.maxTimelineEntries=this.opts.maxTimelineEntries||50}accumulate(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.accumulateRooms(e,t),this.accumulateAccountData(e),this.nextBatch=e.next_batch}accumulateAccountData(e){e.account_data&&e.account_data.events&&e.account_data.events.forEach((e=>{this.accountData[e.type]=e}))}accumulateRooms(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.rooms&&(e.rooms.invite&&Object.keys(e.rooms.invite).forEach((n=>{this.accumulateRoom(n,h.Invite,e.rooms.invite[n],t)})),e.rooms.join&&Object.keys(e.rooms.join).forEach((n=>{this.accumulateRoom(n,h.Join,e.rooms.join[n],t)})),e.rooms.leave&&Object.keys(e.rooms.leave).forEach((n=>{this.accumulateRoom(n,h.Leave,e.rooms.leave[n],t)})))}accumulateRoom(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];switch(t){case h.Invite:this.accumulateInviteState(e,n);break;case h.Join:this.inviteRooms[e]&&delete this.inviteRooms[e],this.accumulateJoinState(e,n,r);break;case h.Leave:this.inviteRooms[e]?delete this.inviteRooms[e]:delete this.joinRooms[e];break;default:o.a.error("Unknown cateogory: ",t)}}accumulateInviteState(e,t){if(!t.invite_state||!t.invite_state.events)return;if(!this.inviteRooms[e])return void(this.inviteRooms[e]={invite_state:t.invite_state});const n=this.inviteRooms[e];t.invite_state.events.forEach((e=>{let t=!1;for(let r=0;r<n.invite_state.events.length;r++){const i=n.invite_state.events[r];i.type===e.type&&i.state_key==e.state_key&&(n.invite_state.events[r]=e,t=!0)}t||n.invite_state.events.push(e)}))}accumulateJoinState(e,t){var n,r,i,o,u,h,p,g;let f=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.joinRooms[e]||(this.joinRooms[e]={_currentState:Object.create(null),_timeline:[],_accountData:Object.create(null),_unreadNotifications:{},_unreadThreadNotifications:{},_summary:{},_readReceipts:{},_threadReadReceipts:{}});const _=this.joinRooms[e];if(t.account_data&&t.account_data.events&&t.account_data.events.forEach((e=>{_._accountData[e.type]=e})),t.unread_notifications&&(_._unreadNotifications=t.unread_notifications),_._unreadThreadNotifications=null!==(n=null!==(r=t[c.a.stable])&&void 0!==r?r:t[c.a.unstable])&&void 0!==n?n:void 0,t.summary){const e="m.heroes",n="m.invited_member_count",r="m.joined_member_count",i=_._summary,o=t.summary;i[e]=o[e]||i[e],i[r]=o[r]||i[r],i[n]=o[n]||i[n]}if(null===(i=t.ephemeral)||void 0===i||null===(o=i.events)||void 0===o||o.forEach((e=>{e.type===s.b.Receipt&&e.content&&Object.keys(e.content).forEach((t=>{Object.entries(e.content[t]).forEach((n=>{let[r,i]=n;if(Object(a.w)(r))for(const n of Object.keys(i)){const i=e.content[t][r][n],a={data:e.content[t][r][n],type:r,eventId:t};var o;if(i.thread_id&&i.thread_id!==l.a)_._threadReadReceipts=d(d({},_._threadReadReceipts),{},{[i.thread_id]:d(d({},null!==(o=_._threadReadReceipts[i.thread_id])&&void 0!==o?o:{}),{},{[n]:a})});else _._readReceipts[n]=a}}))}))})),t.timeline&&t.timeline.limited&&(_._timeline=[]),null===(u=t.state)||void 0===u||null===(h=u.events)||void 0===h||h.forEach((e=>{m(_._currentState,e)})),null===(p=t.timeline)||void 0===p||null===(g=p.events)||void 0===g||g.forEach(((e,n)=>{var r;let i;if(m(_._currentState,e),f)i=e;else{i=Object.assign({},e),void 0!==i.unsigned&&(i.unsigned=Object.assign({},i.unsigned));const t=e.unsigned?e.unsigned.age:e.age;void 0!==t&&(i._localTs=Date.now()-t)}_._timeline.push({event:i,token:0===n&&null!==(r=t.timeline.prev_batch)&&void 0!==r?r:null})})),_._timeline.length>this.opts.maxTimelineEntries){for(let e=_._timeline.length-this.opts.maxTimelineEntries;e<_._timeline.length;e++)if(_._timeline[e].token){_._timeline=_._timeline.slice(e,_._timeline.length);break}}}getJSON(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t={join:{},invite:{},leave:{}};Object.keys(this.inviteRooms).forEach((e=>{t.invite[e]=this.inviteRooms[e]})),Object.keys(this.joinRooms).forEach((n=>{const r=this.joinRooms[n],i={ephemeral:{events:[]},account_data:{events:[]},state:{events:[]},timeline:{events:[],prev_batch:null},unread_notifications:r._unreadNotifications,unread_thread_notifications:r._unreadThreadNotifications,summary:r._summary};Object.keys(r._accountData).forEach((e=>{i.account_data.events.push(r._accountData[e])}));const o={type:s.b.Receipt,room_id:n,content:{}},l=new a.b((()=>new a.b((()=>new Map))));for(const[e,t]of Object.entries(r._readReceipts))l.getOrCreate(t.eventId).getOrCreate(t.type).set(e,t.data);for(const e of Object.values(r._threadReadReceipts))for(const[t,n]of Object.entries(e))l.getOrCreate(n.eventId).getOrCreate(n.type).set(t,n.data);o.content=Object(a.F)(l),l.size>0&&i.ephemeral.events.push(o),r._timeline.forEach((t=>{if(!i.timeline.prev_batch){if(!t.token)return;i.timeline.prev_batch=t.token}let n;var r;!e&&("_localTs"in(r=t.event)&&void 0!==r._localTs)?(n=Object.assign({},t.event),void 0!==n.unsigned&&(n.unsigned=Object.assign({},n.unsigned)),delete n._localTs,n.unsigned=n.unsigned||{},n.unsigned.age=Date.now()-t.event._localTs):n=t.event,i.timeline.events.push(n)}));const c=Object.create(null);for(let e=i.timeline.events.length-1;e>=0;e--){const t=i.timeline.events[e];if(null===t.state_key||void 0===t.state_key)continue;const n=Object(a.k)(t);n.unsigned&&(n.unsigned.prev_content&&(n.content=n.unsigned.prev_content),n.unsigned.prev_sender&&(n.sender=n.unsigned.prev_sender)),m(c,n)}Object.keys(r._currentState).forEach((e=>{Object.keys(r._currentState[e]).forEach((t=>{let n=r._currentState[e][t];c[e]&&c[e][t]&&(n=c[e][t]),i.state.events.push(n)}))})),t.join[n]=i}));const n=[];return Object.keys(this.accountData).forEach((e=>{n.push(this.accountData[e])})),{nextBatch:this.nextBatch,roomsData:t,accountData:n}}getNextBatchToken(){return this.nextBatch}}function m(e,t){null!==t.state_key&&void 0!==t.state_key&&t.type&&(e[t.type]||(e[t.type]=Object.create(null)),e[t.type][t.state_key]=t)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return l}));var r=n(13),i=n.n(r),o=n(179);n(1);const a=function(){};class s{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.client=e,this.timelineSet=t,i()(this,"windowLimit",void 0),i()(this,"start",void 0),i()(this,"end",void 0),i()(this,"eventCount",0),this.windowLimit=n.windowLimit||1e3}load(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20;const n=n=>{if(!n)throw new Error("No timeline given to initFields");let r;const i=n.getEvents();if(e){if(r=i.findIndex((t=>t.getId()===e)),r<0)throw new Error("getEventTimeline result didn't include requested event")}else r=i.length;const o=Math.min(i.length,r+Math.ceil(t/2)),a=Math.max(0,o-t);this.start=new l(n,a-n.getBaseIndex()),this.end=new l(n,o-n.getBaseIndex()),this.eventCount=o-a};return this.timelineSet.getTimelineForEvent(e)?(n(this.timelineSet.getTimelineForEvent(e)),Promise.resolve()):e?this.client.getEventTimeline(this.timelineSet,e).then(n):(n(this.timelineSet.getLiveTimeline()),Promise.resolve())}getTimelineIndex(e){var t,n;if(e==o.b.BACKWARDS)return null!==(t=this.start)&&void 0!==t?t:null;if(e==o.b.FORWARDS)return null!==(n=this.end)&&void 0!==n?n:null;throw new Error("Invalid direction '"+e+"'")}extend(e,t){const n=this.getTimelineIndex(e);if(!n)return a("TimelineWindow: no timeline yet"),!1;const r=e==o.b.BACKWARDS?n.retreat(t):n.advance(t);if(r){this.eventCount+=r,a("TimelineWindow: increased cap by "+r+" (now "+this.eventCount+")");const t=this.eventCount-this.windowLimit;return t>0&&this.unpaginate(t,e!=o.b.BACKWARDS),!0}return!1}canPaginate(e){const t=this.getTimelineIndex(e);if(!t)return a("TimelineWindow: no timeline yet"),!1;if(e==o.b.BACKWARDS){if(t.index>t.minIndex())return!0}else if(t.index<t.maxIndex())return!0;const n=t.timeline.getNeighbouringTimeline(e),r=t.timeline.getPaginationToken(e);return Boolean(n)||Boolean(r)}async paginate(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5;const i=this.getTimelineIndex(e);if(!i)return a("TimelineWindow: no timeline yet"),!1;if(i.pendingPaginate)return i.pendingPaginate;if(this.extend(e,t))return!0;if(!n||0===r)return!1;if(!i.timeline.getPaginationToken(e))return a("TimelineWindow: no token"),!1;a("TimelineWindow: starting request");const s=this.client.paginateEventTimeline(i.timeline,{backwards:e==o.b.BACKWARDS,limit:t}).finally((function(){i.pendingPaginate=void 0})).then((n=>(a("TimelineWindow: request completed with result "+n),n?this.paginate(e,t,!0,r-1):this.paginate(e,t,!1,0))));return i.pendingPaginate=s,s}unpaginate(e,t){const n=t?this.start:this.end;if(!n)throw new Error(`Attempting to unpaginate startOfTimeline=${t} but don't have this direction`);if(e>this.eventCount||e<0)throw new Error(`Attemting to unpaginate ${e} events, but only have ${this.eventCount} in the timeline`);for(;e>0;){const r=t?n.advance(e):n.retreat(e);if(r<=0)throw new Error("Unable to unpaginate any further, but still have "+this.eventCount+" events");e-=r,this.eventCount-=r,a("TimelineWindow.unpaginate: dropped "+r+" (now "+this.eventCount+")")}}getEvents(){if(!this.start)return[];const e=[];let t=this.start.timeline;for(;;){var n,r;const i=t.getEvents();let a=0,s=i.length;t===this.start.timeline&&(a=this.start.index+t.getBaseIndex()),t===(null===(n=this.end)||void 0===n?void 0:n.timeline)&&(s=this.end.index+t.getBaseIndex());for(let t=a;t<s;t++)e.push(i[t]);if(t===(null===(r=this.end)||void 0===r?void 0:r.timeline))break;t=t.getNeighbouringTimeline(o.b.FORWARDS)}return e}}class l{constructor(e,t){this.timeline=e,this.index=t,i()(this,"pendingPaginate",void 0)}minIndex(){return-1*this.timeline.getBaseIndex()}maxIndex(){return this.timeline.getEvents().length-this.timeline.getBaseIndex()}advance(e){if(!e)return 0;let t;if(e<0){if(t=Math.max(e,this.minIndex()-this.index),t<0)return this.index+=t,t}else if(t=Math.min(e,this.maxIndex()-this.index),t>0)return this.index+=t,t;const n=this.timeline.getNeighbouringTimeline(e<0?o.b.BACKWARDS:o.b.FORWARDS);return n?(this.timeline=n,this.index=e<0?this.maxIndex():this.minIndex(),a("paginate: switched to new neighbour"),this.advance(e)):0}retreat(e){return-1*this.advance(-1*e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useCallbackRef=void 0;var r=n(120);t.useCallbackRef=function(e,t){var n=(0,r.useState)((function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}}))[0];return n.callback=t,n.facade}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCallbackRef=void 0,t.createCallbackRef=function(e){var t=null;return{get current(){return t},set current(n){var r=t;r!==n&&(t=n,e(n,r))}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mediumSidecar=t.mediumEffect=t.mediumBlur=t.mediumFocus=void 0;var r=n(1010),i=(0,r.createMedium)({},(function(e){return{target:e.target,currentTarget:e.currentTarget}}));t.mediumFocus=i;var o=(0,r.createMedium)();t.mediumBlur=o;var a=(0,r.createMedium)();t.mediumEffect=a;var s=(0,r.createSidecarMedium)({async:!0});t.mediumSidecar=s},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return h}));var r=n(13),i=n.n(r),o=n(425),a=n(120),s=n.n(a),l=n(1),c=n(319),u=n(134);const d=new Error("User cancelled auth session");class h extends s.a.Component{constructor(e){super(e),i()(this,"authLogic",void 0),i()(this,"intervalId",null),i()(this,"stageComponent",Object(a.createRef)()),i()(this,"unmounted",!1),i()(this,"requestEmailToken",(async(e,t,n,r)=>{this.setState({busy:!0});try{return await this.props.requestEmailToken(e,t,n,r)}finally{this.setState({busy:!1})}})),i()(this,"authStateUpdated",((e,t)=>{const n=this.state.authStage;this.setState({busy:!1,authStage:e,stageState:t,errorText:t.error,errorCode:t.errcode},(()=>{if(n!==e)this.setFocus();else if(!t.error){var r,i;null===(r=this.stageComponent.current)||void 0===r||null===(i=r.attemptFailed)||void 0===i||i.call(r)}}))})),i()(this,"requestCallback",((e,t)=>this.props.makeRequest(e))),i()(this,"onBusyChanged",(e=>{e&&this.setState({busy:!0,errorText:void 0,errorCode:void 0})})),i()(this,"submitAuthDict",(e=>{this.authLogic.submitAuthDict(e)})),i()(this,"onPhaseChange",(e=>{var t,n,r;null===(t=(n=this.props).onStagePhaseChange)||void 0===t||t.call(n,null!==(r=this.state.authStage)&&void 0!==r?r:null,e||0)})),i()(this,"onStageCancel",(()=>{this.props.onAuthFinished(!1,d)})),i()(this,"onAuthStageFailed",(e=>{this.props.onAuthFinished(!1,e)})),i()(this,"setEmailSid",(e=>{this.authLogic.setEmailSid(e)})),this.state={busy:!1,submitButtonEnabled:!1},this.authLogic=new o.b({authData:this.props.authData,doRequest:this.requestCallback,busyChanged:this.onBusyChanged,inputs:this.props.inputs,stateUpdated:this.authStateUpdated,matrixClient:this.props.matrixClient,sessionId:this.props.sessionId,clientSecret:this.props.clientSecret,emailSid:this.props.emailSid,requestEmailToken:this.requestEmailToken}),this.props.poll&&(this.intervalId=window.setInterval((()=>{this.authLogic.poll()}),2e3))}componentDidMount(){this.authLogic.attemptAuth().then((e=>{const t={emailSid:this.authLogic.getEmailSid(),clientSecret:this.authLogic.getClientSecret()};this.props.onAuthFinished(!0,e,t)})).catch((e=>{if(this.props.onAuthFinished(!1,e),l.a.error("Error during user-interactive auth:",e),this.unmounted)return;const t=e.message||e.toString();this.setState({errorText:t,errorCode:e.errcode})}))}componentWillUnmount(){this.unmounted=!0,null!==this.intervalId&&clearInterval(this.intervalId)}setFocus(){var e,t;null===(e=this.stageComponent.current)||void 0===e||null===(t=e.focus)||void 0===t||t.call(e)}render(){const e=this.state.authStage;if(!e)return this.state.busy?s.a.createElement(u.a,null):null;const t=Object(c.d)(e);return s.a.createElement(t,{ref:this.stageComponent,loginType:e,matrixClient:this.props.matrixClient,authSessionId:this.authLogic.getSessionId(),clientSecret:this.authLogic.getClientSecret(),stageParams:this.authLogic.getStageParams(e),submitAuthDict:this.submitAuthDict,errorText:this.state.errorText,errorCode:this.state.errorCode,busy:this.state.busy,inputs:this.props.inputs,stageState:this.state.stageState,fail:this.onAuthStageFailed,setEmailSid:this.setEmailSid,showContinue:!this.props.continueIsManaged,onPhaseChange:this.onPhaseChange,requestEmailToken:this.authLogic.requestEmailToken,continueText:this.props.continueText,continueKind:this.props.continueKind,onCancel:this.onStageCancel})}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r,i,o,a,s=n(120);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(this,arguments)}function c(e){return s.createElement("svg",l({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 57 46",role:"presentation","aria-hidden":!0},e),r||(r=s.createElement("path",{fill:"#737d8c",d:"M4 17c-.5 0-.975.096-1.416.264L20 34.68l17.416-17.416A3.98 3.98 0 0036 17zM.264 19.584A3.98 3.98 0 000 21v21a4 4 0 004 4h32a4 4 0 004-4V21c0-.5-.096-.975-.264-1.416L21.16 38.16a1.64 1.64 0 01-.533.356 1.64 1.64 0 01-.627.125 1.64 1.64 0 01-.627-.125 1.64 1.64 0 01-.533-.356z"})),i||(i=s.createElement("path",{fill:"#0dbd8b",fillOpacity:.1,d:"M57 16a16 16 0 01-16 16 16 16 0 01-16-16A16 16 0 0141 0a16 16 0 0116 16z"})),o||(o=s.createElement("path",{fill:"#fff",d:"M53 16a12 12 0 01-12 12 12 12 0 01-12-12A12 12 0 0141 4a12 12 0 0112 12z"})),a||(a=s.createElement("path",{fill:"#0dbd8b",d:"M49 16a8 8 0 01-8 8 8 8 0 01-8-8 8 8 0 018-8 8 8 0 018 8z"})))}t.b="img/element-icons/email-prompt.8b97994.svg"},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(120);const i=Object(r.createContext)(void 0)},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(13),i=n.n(r),o=n(129),a=n(513),s=n(1),l=n(16);const c={timeline_limit:50,include_old_rooms:{timeline_limit:0,required_state:[[o.b.RoomCreate,""],[o.b.RoomTombstone,""],[o.b.SpaceChild,a.d],[o.b.SpaceParent,a.d],[o.b.RoomMember,a.c]]}},u="unencrypted",d=Object.assign({required_state:[[a.d,a.d],[o.b.RoomMember,a.c],[o.b.RoomMember,a.b]]},c),h=Object.assign({required_state:[[a.d,a.d]]},c);class p{constructor(){i()(this,"slidingSync",void 0),i()(this,"client",void 0),i()(this,"configureDefer",void 0),this.configureDefer=Object(l.m)()}static get instance(){return p.internalInstance}configure(e,t){return this.client=e,this.slidingSync=new a.e(t,new Map,h,e,2e4),this.slidingSync.addCustomSubscription(u,d),this.slidingSync.setList(p.ListSpaces,{ranges:[[0,20]],sort:["by_name"],slow_get_all_rooms:!0,timeline_limit:0,required_state:[[o.b.RoomJoinRules,""],[o.b.RoomAvatar,""],[o.b.RoomTombstone,""],[o.b.RoomEncryption,""],[o.b.RoomCreate,""],[o.b.SpaceChild,a.d],[o.b.SpaceParent,a.d],[o.b.RoomMember,a.c]],include_old_rooms:{timeline_limit:0,required_state:[[o.b.RoomCreate,""],[o.b.RoomTombstone,""],[o.b.SpaceChild,a.d],[o.b.SpaceParent,a.d],[o.b.RoomMember,a.c]]},filters:{room_types:["m.space"]}}),this.configureDefer.resolve(),this.slidingSync}async ensureListRegistered(e,t){s.a.debug("ensureListRegistered:::",e,t),await this.configureDefer.promise;let n=this.slidingSync.getListParams(e);if(n){const e=Object.assign({},n,t);if(JSON.stringify(n)===JSON.stringify(e))return s.a.debug("list matches, not sending, update => ",t),n;n=e}else n={ranges:[[0,20]],sort:["by_notification_level","by_recency"],timeline_limit:1,required_state:[[o.b.RoomJoinRules,""],[o.b.RoomAvatar,""],[o.b.RoomTombstone,""],[o.b.RoomEncryption,""],[o.b.RoomCreate,""],[o.b.RoomMember,a.c]],include_old_rooms:{timeline_limit:0,required_state:[[o.b.RoomCreate,""],[o.b.RoomTombstone,""],[o.b.SpaceChild,a.d],[o.b.SpaceParent,a.d],[o.b.RoomMember,a.c]]}},n=Object.assign(n,t);try{t.ranges&&1===Object.keys(t).length?await this.slidingSync.setListRanges(e,t.ranges):await this.slidingSync.setList(e,n)}catch(e){s.a.debug("ensureListRegistered: update failed txn_id=",e)}return this.slidingSync.getListParams(e)}async setRoomVisible(e,t){await this.configureDefer.promise;const n=this.slidingSync.getRoomSubscriptions();t?n.add(e):n.delete(e);const r=this.client.getRoom(e);let i=!this.client.isRoomEncrypted(e);r||(i=!1),s.a.log("SlidingSync setRoomVisible:",e,t,"shouldLazyLoad:",i),i&&this.slidingSync.useCustomSubscription(e,u);const o=this.slidingSync.modifyRoomSubscriptions(n);if(r)return e;try{await o}catch(n){s.a.warn("SlidingSync setRoomVisible:",e,t,"failed to confirm transaction")}return e}async startSpidering(e,t){await Object(l.N)(t);let n=e,r=!0,i=!0;for(;r;){const s=n+e-1;try{const t=[[0,e-1],[n,s]];i?await this.slidingSync.setList(p.ListSearch,{ranges:t,sort:["by_recency"],timeline_limit:0,required_state:[[o.b.RoomJoinRules,""],[o.b.RoomAvatar,""],[o.b.RoomTombstone,""],[o.b.RoomEncryption,""],[o.b.RoomCreate,""],[o.b.RoomMember,a.c]],filters:{not_room_types:["m.space"]}}):await this.slidingSync.setListRanges(p.ListSearch,t)}catch(e){}finally{await Object(l.N)(t)}r=s+1<this.slidingSync.getListData(p.ListSearch).joinedCount,n+=e,i=!1}}}i()(p,"ListSpaces","space_list"),i()(p,"ListSearch","search_list"),i()(p,"internalInstance",new p)},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(13),i=n.n(r),o=n(324);class a extends o.a{static clear(){a.itemCache.clear(),a.objectCache.clear()}constructor(){super(),a.storageListenerBound||(a.storageListenerBound=!0,window.addEventListener("storage",a.onStorageEvent))}getItem(e){if(!a.itemCache.has(e)){const t=localStorage.getItem(e);return a.itemCache.set(e,t),t}return a.itemCache.get(e)}getBoolean(e){const t=this.getItem(e);return"true"===t||"false"!==t&&null}getObject(e){if(!a.objectCache.has(e))try{const t=JSON.parse(localStorage.getItem(e));return a.objectCache.set(e,t),t}catch(e){return console.error("Failed to parse localStorage object",e),null}return a.objectCache.get(e)}setItem(e,t){a.itemCache.set(e,t),localStorage.setItem(e,t)}setBoolean(e,t){this.setItem(e,`${t}`)}setObject(e,t){a.objectCache.set(e,t),localStorage.setItem(e,JSON.stringify(t))}removeItem(e){localStorage.removeItem(e),a.itemCache.delete(e),a.objectCache.delete(e)}isSupported(){return void 0!==localStorage&&null!==localStorage}}i()(a,"itemCache",new Map),i()(a,"objectCache",new Map),i()(a,"storageListenerBound",!1),i()(a,"onStorageEvent",(e=>{null===e.key?a.clear():(a.itemCache.delete(e.key),a.objectCache.delete(e.key))}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(121);function i(e){return{undefined:Object(r.a)("Default"),0:Object(r.a)("Restricted"),[e]:Object(r.a)("Default"),50:Object(r.a)("Moderator"),100:Object(r.a)("Admin")}}function o(e,t){const n=i(t);return n[e]?n[e]:Object(r.a)("Custom (%(level)s)",{level:e})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(13),i=n.n(r),o=n(160),a=n(1),s=n(151),l=n(122),c=n(493),u=n(125),d=n(121),h=n(124),p=n(137),m=n(128);class g{constructor(){i()(this,"_lists",[]),i()(this,"_roomIds",[]),i()(this,"mjolnirWatchRef",null),i()(this,"dispatcherRef",null),i()(this,"onAction",(e=>{"setup_mjolnir"===e.action&&(a.a.log("Setting up Mjolnir: after sync"),this.setup())})),i()(this,"onEvent",(e=>{l.a.get()&&this._roomIds.includes(e.getRoomId())&&c.a.includes(e.getType())&&this.updateLists(this._roomIds)}))}get roomIds(){return this._roomIds}get lists(){return this._lists}start(){this.mjolnirWatchRef=u.b.watchSetting("mjolnirRooms",null,this.onListsChanged.bind(this)),this.dispatcherRef=h.a.register(this.onAction),h.a.dispatch({action:m.a.DoAfterSyncPrepared,deferred_action:{action:"setup_mjolnir"}})}setup(){l.a.get()&&(this.updateLists(u.b.getValue("mjolnirRooms")),l.a.get().on(s.b.Events,this.onEvent))}stop(){this.mjolnirWatchRef&&(u.b.unwatchSetting(this.mjolnirWatchRef),this.mjolnirWatchRef=null),this.dispatcherRef&&(h.a.unregister(this.dispatcherRef),this.dispatcherRef=null),l.a.get()&&l.a.get().removeListener(s.b.Events,this.onEvent)}async getOrCreatePersonalList(){let e=u.b.getValue("mjolnirPersonalRoom");if(!e){const t=await l.a.get().createRoom({name:Object(d.a)("My Ban List"),topic:Object(d.a)("This is your list of users/servers you have blocked - don't leave the room!"),preset:o.d.PrivateChat});e=t.room_id,await u.b.setValue("mjolnirPersonalRoom",null,p.a.ACCOUNT,e),await u.b.setValue("mjolnirRooms",null,p.a.ACCOUNT,[e,...this._roomIds])}if(!e)throw new Error("Error finding a room ID to use");let t=this._lists.find((t=>t.roomId===e));return t||(t=new c.b(e)),t}getPersonalList(){const e=u.b.getValue("mjolnirPersonalRoom");if(!e)return null;let t=this._lists.find((t=>t.roomId===e));return t||(t=new c.b(e)),t}async subscribeToList(e){const t=[...this._roomIds,e];await u.b.setValue("mjolnirRooms",null,p.a.ACCOUNT,t),this._lists.push(new c.b(e))}async unsubscribeFromList(e){const t=this._roomIds.filter((t=>t!==e));await u.b.setValue("mjolnirRooms",null,p.a.ACCOUNT,t),this._lists=this._lists.filter((t=>t.roomId!==e))}onListsChanged(e,t,n,r){this.updateLists(r)}updateLists(e){if(l.a.get()&&(a.a.log("Updating Mjolnir ban lists to: "+e),this._lists=[],this._roomIds=e||[],e))for(const t of e)this._lists.push(new c.b(t))}isServerBanned(e){for(const t of this._lists)for(const n of t.serverRules)if(n.isMatch(e))return!0;return!1}isUserBanned(e){for(const t of this._lists)for(const n of t.userRules)if(n.isMatch(e))return!0;return!1}static sharedInstance(){return g.instance||(g.instance=new g),g.instance}}i()(g,"instance",null)},function(e,t,n){"use strict";var r=n(120),i=n.n(r),o=n(121),a=n(133),s=n(165),l=n(125);const c=i.a.forwardRef(((e,t)=>{let{mxEvent:n}=e;const c=Object(r.useContext)(a.a);let u=Object(o.a)("Message deleted");const d=n.getUnsigned(),h=d&&d.redacted_because&&d.redacted_because.sender;if(h&&h!==n.getSender()){const e=c.getRoom(n.getRoomId()),t=e&&e.getMember(h);u=Object(o.a)("Message deleted by %(name)s",{name:t?t.name:h})}const p=l.b.getValue("showTwelveHourTimestamps"),m=Object(s.c)(new Date(d.redacted_because.origin_server_ts),p),g=Object(o.a)("Message deleted on %(date)s",{date:m});return i.a.createElement("span",{className:"mx_RedactedBody",ref:t,title:g},u)}));t.a=c},function(e,t,n){"use strict";n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return u}));var r=n(698),i=n.n(r),o=n(193),a=n(166),s=n(699);class l extends Error{constructor(e){super(e.message),this.name="DownloadError",this.stack=e.stack}}class c extends Error{constructor(e){super(e.message),this.name="DecryptError",this.stack=e.stack}}async function u(e,t){const n=Object(a.a)({file:e});let r;try{const e=await n.downloadSource();if(!e.ok)throw Object(o.k)(e,await e.text());r=await e.arrayBuffer()}catch(e){throw new l(e)}try{const n=await i.a.decryptAttachment(r,e);let o=null!=t&&t.mimetype?t.mimetype.split(";")[0].trim():"";return o=Object(s.a)(o),new Blob([n],{type:o})}catch(e){throw new c(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.escapeText=t.escapeAttribute=t.escapeUTF8=t.escape=t.encodeXML=t.getCodePoint=t.xmlReplacer=void 0,t.xmlReplacer=/["&'<>$\x80-\uFFFF]/g;var r=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);function i(e){for(var n,i="",o=0;null!==(n=t.xmlReplacer.exec(e));){var a=n.index,s=e.charCodeAt(a),l=r.get(s);void 0!==l?(i+=e.substring(o,a)+l,o=a+1):(i+="".concat(e.substring(o,a),"&#x").concat((0,t.getCodePoint)(e,a).toString(16),";"),o=t.xmlReplacer.lastIndex+=Number(55296==(64512&s)))}return i+e.substr(o)}function o(e,t){return function(n){for(var r,i=0,o="";r=e.exec(n);)i!==r.index&&(o+=n.substring(i,r.index)),o+=t.get(r[0].charCodeAt(0)),i=r.index+1;return o+n.substring(i)}}t.getCodePoint=null!=String.prototype.codePointAt?function(e,t){return e.codePointAt(t)}:function(e,t){return 55296==(64512&e.charCodeAt(t))?1024*(e.charCodeAt(t)-55296)+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t)},t.encodeXML=i,t.escape=i,t.escapeUTF8=o(/[&<>'"]/g,r),t.escapeAttribute=o(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),t.escapeText=o(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeAction=t.IgnoreCaseMode=t.SelectorType=void 0,function(e){e.Attribute="attribute",e.Pseudo="pseudo",e.PseudoElement="pseudo-element",e.Tag="tag",e.Universal="universal",e.Adjacent="adjacent",e.Child="child",e.Descendant="descendant",e.Parent="parent",e.Sibling="sibling",e.ColumnCombinator="column-combinator"}(t.SelectorType||(t.SelectorType={})),t.IgnoreCaseMode={Unknown:null,QuirksMode:"quirks",IgnoreCase:!0,CaseSensitive:!1},function(e){e.Any="any",e.Element="element",e.End="end",e.Equals="equals",e.Exists="exists",e.Hyphen="hyphen",e.Not="not",e.Start="start"}(t.AttributeAction||(t.AttributeAction={}))},function(e,t,n){"use strict";var r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.subselects=t.getNextSiblings=t.ensureIsTag=t.PLACEHOLDER_ELEMENT=void 0;var o=i(n(295)),a=n(711);function s(e,t){return e===o.default.falseFunc?o.default.falseFunc:function(n){return t.isTag(n)&&e(n)}}function l(e,t){var n=t.getSiblings(e);if(n.length<=1)return[];var r=n.indexOf(e);return r<0||r===n.length-1?[]:n.slice(r+1).filter(t.isTag)}function c(e){return{xmlMode:!!e.xmlMode,lowerCaseAttributeNames:!!e.lowerCaseAttributeNames,lowerCaseTags:!!e.lowerCaseTags,quirksMode:!!e.quirksMode,cacheResults:!!e.cacheResults,pseudos:e.pseudos,adapter:e.adapter,equals:e.equals}}t.PLACEHOLDER_ELEMENT={},t.ensureIsTag=s,t.getNextSiblings=l;var u=function(e,t,n,r,i){var a=i(t,c(n),r);return a===o.default.trueFunc?e:a===o.default.falseFunc?o.default.falseFunc:function(t){return a(t)&&e(t)}};t.subselects={is:u,matches:u,where:u,not:function(e,t,n,r,i){var a=i(t,c(n),r);return a===o.default.falseFunc?e:a===o.default.trueFunc?o.default.falseFunc:function(t){return!a(t)&&e(t)}},has:function(e,n,i,u,d){var h=i.adapter,p=c(i);p.relativeSelector=!0;var m=n.some((function(e){return e.some(a.isTraversal)}))?[t.PLACEHOLDER_ELEMENT]:void 0,g=d(n,p,m);if(g===o.default.falseFunc)return o.default.falseFunc;var f=s(g,h);if(m&&g!==o.default.trueFunc){var _=g.shouldTestNextSiblings,b=void 0!==_&&_;return function(t){if(!e(t))return!1;m[0]=t;var n=h.getChildren(t),i=b?r(r([],n,!0),l(t,h),!0):n;return h.existsOne(f,i)}}return function(t){return e(t)&&h.existsOne(f,h.getChildren(t))}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isUndefinedCodePoint=t.isControlCodePoint=t.getSurrogatePairCodePoint=t.isSurrogatePair=t.isSurrogate=t.SEQUENCES=t.CODE_POINTS=t.REPLACEMENT_CHARACTER=void 0;const r=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]);t.REPLACEMENT_CHARACTER="<22>",function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.NUMBER_SIGN=35]="NUMBER_SIGN",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_F=70]="LATIN_CAPITAL_F",e[e.LATIN_CAPITAL_X=88]="LATIN_CAPITAL_X",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_F=102]="LATIN_SMALL_F",e[e.LATIN_SMALL_X=120]="LATIN_SMALL_X",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z",e[e.REPLACEMENT_CHARACTER=65533]="REPLACEMENT_CHARACTER"}(t.CODE_POINTS||(t.CODE_POINTS={})),t.SEQUENCES={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"},t.isSurrogate=function(e){return e>=55296&&e<=57343},t.isSurrogatePair=function(e){return e>=56320&&e<=57343},t.getSurrogatePairCodePoint=function(e,t){return 1024*(e-55296)+9216+t},t.isControlCodePoint=function(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159},t.isUndefinedCodePoint=function(e){return e>=64976&&e<=65007||r.has(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTokenAttr=t.TokenType=void 0,function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"}(t.TokenType||(t.TokenType={})),t.getTokenAttr=function(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultTreeAdapter=void 0;const r=n(275);function i(e){return{nodeName:"#text",value:e,parentNode:null}}t.defaultTreeAdapter={createDocument:()=>({nodeName:"#document",mode:r.DOCUMENT_MODE.NO_QUIRKS,childNodes:[]}),createDocumentFragment:()=>({nodeName:"#document-fragment",childNodes:[]}),createElement:(e,t,n)=>({nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}),createCommentNode:e=>({nodeName:"#comment",data:e,parentNode:null}),appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent:e=>e.content,setDocumentType(e,n,r,i){const o=e.childNodes.find((e=>"#documentType"===e.nodeName));if(o)o.name=n,o.publicId=r,o.systemId=i;else{const o={nodeName:"#documentType",name:n,publicId:r,systemId:i,parentNode:null};t.defaultTreeAdapter.appendChild(e,o)}},setDocumentMode(e,t){e.mode=t},getDocumentMode:e=>e.mode,detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,n){if(e.childNodes.length>0){const r=e.childNodes[e.childNodes.length-1];if(t.defaultTreeAdapter.isTextNode(r))return void(r.value+=n)}t.defaultTreeAdapter.appendChild(e,i(n))},insertTextBefore(e,n,r){const o=e.childNodes[e.childNodes.indexOf(r)-1];o&&t.defaultTreeAdapter.isTextNode(o)?o.value+=n:t.defaultTreeAdapter.insertBefore(e,i(n),r)},adoptAttributes(e,t){const n=new Set(e.attrs.map((e=>e.name)));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild:e=>e.childNodes[0],getChildNodes:e=>e.childNodes,getParentNode:e=>e.parentNode,getAttrList:e=>e.attrs,getTagName:e=>e.tagName,getNamespaceURI:e=>e.namespaceURI,getTextNodeContent:e=>e.value,getCommentNodeContent:e=>e.data,getDocumentTypeNodeName:e=>e.name,getDocumentTypeNodePublicId:e=>e.publicId,getDocumentTypeNodeSystemId:e=>e.systemId,isTextNode:e=>"#text"===e.nodeName,isCommentNode:e=>"#comment"===e.nodeName,isDocumentTypeNode:e=>"#documentType"===e.nodeName,isElementNode:e=>Object.prototype.hasOwnProperty.call(e,"tagName"),setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation:e=>e.sourceCodeLocation,updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation=Object.assign(Object.assign({},e.sourceCodeLocation),t)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1),i=n(131),o=n(241),a=n(438);function s(){var e,t;const n=null!==(e=null===(t=Object(o.f)())||void 0===t?void 0:t.map_style_url)&&void 0!==e?e:i.b.get().map_style_url;if(!n)throw r.a.error("'map_style_url' missing from homeserver .well-known area, and missing from from config.json."),new Error(a.a.MapStyleUrlNotConfigured);return n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"c",(function(){return d})),n.d(t,"d",(function(){return h})),n.d(t,"b",(function(){return p}));var r=n(537),i=n(30),o=n(1),a=n(121),s=n(538),l=n(535),c=n(438);const u=(e,t,n)=>{try{const i=Object(l.a)(),s=new r.Map({container:t,style:i,zoom:15,interactive:e,attributionControl:!1,locale:{"AttributionControl.ToggleAttribution":Object(a.a)("Toggle attribution"),"AttributionControl.MapFeedback":Object(a.a)("Map feedback"),"FullscreenControl.Enter":Object(a.a)("Enter fullscreen"),"FullscreenControl.Exit":Object(a.a)("Exit fullscreen"),"GeolocateControl.FindMyLocation":Object(a.a)("Find my location"),"GeolocateControl.LocationNotAvailable":Object(a.a)("Location not available"),"LogoControl.Title":Object(a.a)("Mapbox logo"),"NavigationControl.ResetBearing":Object(a.a)("Reset bearing to north"),"NavigationControl.ZoomIn":Object(a.a)("Zoom in"),"NavigationControl.ZoomOut":Object(a.a)("Zoom out")}});return s.addControl(new r.AttributionControl,"top-right"),s.on("error",(e=>{o.a.error("Failed to load map: check map_style_url in config.json has a valid URL and API key",e.error),null==n||n(new Error(c.a.MapStyleUrlNotReachable))})),s}catch(e){throw o.a.error("Failed to render map",e),e}},d=(e,t)=>new r.Marker({element:t,anchor:"bottom",offset:[0,-1]}).setLngLat({lon:e.longitude,lat:e.latitude}),h=e=>`https://www.openstreetmap.org/?mlat=${e.latitude}&mlon=${e.longitude}#map=16/${e.latitude}/${e.longitude}`,p=e=>{const t=e.getContent(),n=t[i.c.name];if(void 0!==n){const e=n.uri;if(void 0!==e)return h(Object(s.a)(e))}else{const e=t.geo_uri;if(e)return h(Object(s.a)(e))}return null}},function(e,t,n){e.exports=function(){"use strict";var e,t,n;function r(r,i){if(e)if(t){var o="var sharedChunk = {}; ("+e+")(sharedChunk); ("+t+")(sharedChunk);",a={};e(a),n=i(a),"undefined"!=typeof window&&(n.workerUrl=window.URL.createObjectURL(new Blob([o],{type:"text/javascript"})))}else t=i;else e=i}return r(["exports"],(function(e){var t=n;function n(e,t,n,r){this.cx=3*e,this.bx=3*(n-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(r-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=t,this.p2x=n,this.p2y=r}function r(e,n,r,i){const o=new t(e,n,r,i);return function(e){return o.solve(e)}}n.prototype={sampleCurveX:function(e){return((this.ax*e+this.bx)*e+this.cx)*e},sampleCurveY:function(e){return((this.ay*e+this.by)*e+this.cy)*e},sampleCurveDerivativeX:function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},solveCurveX:function(e,t){if(void 0===t&&(t=1e-6),e<0)return 0;if(e>1)return 1;for(var n=e,r=0;r<8;r++){var i=this.sampleCurveX(n)-e;if(Math.abs(i)<t)return n;var o=this.sampleCurveDerivativeX(n);if(Math.abs(o)<1e-6)break;n-=i/o}var a=0,s=1;for(n=e,r=0;r<20&&(i=this.sampleCurveX(n),!(Math.abs(i-e)<t));r++)e>i?a=n:s=n,n=.5*(s-a)+a;return n},solve:function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))}};const i=r(.25,.1,.25,1);function o(e,t,n){return Math.min(n,Math.max(t,e))}function a(e,t,n){const r=n-t,i=((e-t)%r+r)%r+t;return i===t?n:i}function s(e,...t){for(const n of t)for(const t in n)e[t]=n[t];return e}let l=1;function c(e,t){e.forEach((e=>{t[e]&&(t[e]=t[e].bind(t))}))}function u(e,t,n){const r={};for(const i in e)r[i]=t.call(n||this,e[i],i,e);return r}function d(e,t,n){const r={};for(const i in e)t.call(n||this,e[i],i,e)&&(r[i]=e[i]);return r}function h(e){return Array.isArray(e)?e.map(h):"object"==typeof e&&e?u(e,h):e}const p={};function m(e){p[e]||("undefined"!=typeof console&&console.warn(e),p[e]=!0)}function g(e,t,n){return(n.y-e.y)*(t.x-e.x)>(t.y-e.y)*(n.x-e.x)}function f(e){let t=0;for(let n,r,i=0,o=e.length,a=o-1;i<o;a=i++)n=e[i],r=e[a],t+=(r.x-n.x)*(n.y+r.y);return t}function _(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}function b(e){const t={};if(e.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((e,n,r,i)=>{const o=r||i;return t[n]=!o||o.toLowerCase(),""})),t["max-age"]){const e=parseInt(t["max-age"],10);isNaN(e)?delete t["max-age"]:t["max-age"]=e}return t}let v,y,E=null;function S(e){if(null==E){const t=e.navigator?e.navigator.userAgent:null;E=!!e.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return E}function w(e){return"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap}const T={now:"undefined"!=typeof performance&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frame(e){const t=requestAnimationFrame(e);return{cancel:()=>cancelAnimationFrame(t)}},getImageData(e,t=0){const n=window.document.createElement("canvas"),r=n.getContext("2d");if(!r)throw new Error("failed to create canvas 2d context");return n.width=e.width,n.height=e.height,r.drawImage(e,0,0,e.width,e.height),r.getImageData(-t,-t,e.width+2*t,e.height+2*t)},resolveURL:e=>(v||(v=document.createElement("a")),v.href=e,v.href),hardwareConcurrency:"undefined"!=typeof navigator&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(null==y&&(y=matchMedia("(prefers-reduced-motion: reduce)")),y.matches)}};var C=x;function x(e,t){this.x=e,this.y=t}x.prototype={clone:function(){return new x(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,n=e.y-this.y;return t*t+n*n},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[2]*this.x+e[3]*this.y;return this.x=e[0]*this.x+e[1]*this.y,this.y=t,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),n=Math.sin(e),r=n*this.x+t*this.y;return this.x=t*this.x-n*this.y,this.y=r,this},_rotateAround:function(e,t){var n=Math.cos(e),r=Math.sin(e),i=t.y+r*(this.x-t.x)+n*(this.y-t.y);return this.x=t.x+n*(this.x-t.x)-r*(this.y-t.y),this.y=i,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},x.convert=function(e){return e instanceof x?e:Array.isArray(e)?new x(e[0],e[1]):e};const F={MAX_PARALLEL_IMAGE_REQUESTS:16,REGISTERED_PROTOCOLS:{}},D="mapbox-tiles";let k,O,I=500,A=50;function R(){"undefined"==typeof caches||k||(k=caches.open(D))}let N=1/0;const M={supported:!1,testSupport:function(e){!B&&L&&(U?j(e):P=e)}};let P,L,B=!1,U=!1;function j(e){const t=e.createTexture();e.bindTexture(e.TEXTURE_2D,t);try{if(e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,L),e.isContextLost())return;M.supported=!0}catch(e){}e.deleteTexture(t),B=!0}"undefined"!=typeof document&&(L=document.createElement("img"),L.onload=function(){P&&j(P),P=null,U=!0},L.onerror=function(){B=!0,P=null},L.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");const G={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(G);class z extends Error{constructor(e,t,n,r){super(`AJAXError: ${t} (${e}): ${n}`),this.status=e,this.statusText=t,this.url=n,this.body=r}}const H=_()?()=>self.worker&&self.worker.referrer:()=>("blob:"===window.location.protocol?window.parent:window).location.href;function q(e,t){const n=new AbortController,r=new Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,referrer:H(),signal:n.signal});let i=!1,o=!1;return"json"===e.type&&r.headers.set("Accept","application/json"),((n,a,s)=>{if(o)return;const l=Date.now();fetch(r).then((n=>n.ok?((n,a,s)=>{("arrayBuffer"===e.type?n.arrayBuffer():"json"===e.type?n.json():n.text()).then((e=>{o||(a&&s&&function(e,t,n){if(R(),!k)return;const r={status:t.status,statusText:t.statusText,headers:new Headers};t.headers.forEach(((e,t)=>r.headers.set(t,e)));const i=b(t.headers.get("Cache-Control")||"");i["no-store"]||(i["max-age"]&&r.headers.set("Expires",new Date(n+1e3*i["max-age"]).toUTCString()),new Date(r.headers.get("Expires")).getTime()-n<42e4||function(e,t){if(void 0===O)try{new Response(new ReadableStream),O=!0}catch(e){O=!1}O?t(e.body):e.blob().then(t)}(t,(t=>{const n=new Response(t,r);R(),k&&k.then((t=>t.put(function(e){const t=e.indexOf("?");return t<0?e:e.slice(0,t)}(e.url),n))).catch((e=>m(e.message)))})))}(r,a,s),i=!0,t(null,e,n.headers.get("Cache-Control"),n.headers.get("Expires")))})).catch((e=>{o||t(new Error(e.message))}))})(n,null,l):n.blob().then((r=>t(new z(n.status,n.statusText,e.url,r)))))).catch((e=>{20!==e.code&&t(new Error(e.message))}))})(),{cancel:()=>{o=!0,i||n.abort()}}}const V=function(e,t){if(/:\/\//.test(e.url)&&!/^https?:|^file:/.test(e.url)){if(_()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",e,t);if(!_()){const n=e.url.substring(0,e.url.indexOf("://"));return(F.REGISTERED_PROTOCOLS[n]||q)(e,t)}}if(!(/^file:/.test(n=e.url)||/^file:/.test(H())&&!/^\w+:/.test(n))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return q(e,t);if(_()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",e,t,void 0,!0)}var n;return function(e,t){const n=new XMLHttpRequest;n.open(e.method||"GET",e.url,!0),"arrayBuffer"===e.type&&(n.responseType="arraybuffer");for(const t in e.headers)n.setRequestHeader(t,e.headers[t]);return"json"===e.type&&(n.responseType="text",n.setRequestHeader("Accept","application/json")),n.withCredentials="include"===e.credentials,n.onerror=()=>{t(new Error(n.statusText))},n.onload=()=>{if((n.status>=200&&n.status<300||0===n.status)&&null!==n.response){let r=n.response;if("json"===e.type)try{r=JSON.parse(n.response)}catch(e){return t(e)}t(null,r,n.getResponseHeader("Cache-Control"),n.getResponseHeader("Expires"))}else{const r=new Blob([n.response],{type:n.getResponseHeader("Content-Type")});t(new z(n.status,n.statusText,e.url,r))}},n.send(e.body),{cancel:()=>n.abort()}}(e,t)},$=function(e,t){return V(s(e,{type:"arrayBuffer"}),t)};function K(e){const t=window.document.createElement("a");return t.href=e,t.protocol===window.document.location.protocol&&t.host===window.document.location.host}const W="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let Y,Q;Y=[],Q=0;const X=function(e,t){if(M.supported&&(e.headers||(e.headers={}),e.headers.accept="image/webp,*/*"),Q>=F.MAX_PARALLEL_IMAGE_REQUESTS){const n={requestParameters:e,callback:t,cancelled:!1,cancel(){this.cancelled=!0}};return Y.push(n),n}Q++;let n=!1;const r=()=>{if(!n)for(n=!0,Q--;Y.length&&Q<F.MAX_PARALLEL_IMAGE_REQUESTS;){const e=Y.shift(),{requestParameters:t,callback:n,cancelled:r}=e;r||(e.cancel=X(t,n).cancel)}},i=$(e,((e,n,i,o)=>{r(),e?t(e):n&&function(e,t){"function"==typeof createImageBitmap?function(e,t){const n=new Blob([new Uint8Array(e)],{type:"image/png"});createImageBitmap(n).then((e=>{t(null,e)})).catch((e=>{t(new Error(`Could not load image because of ${e.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))}))}(e,t):function(e,t){const n=new Image;n.onload=()=>{t(null,n),URL.revokeObjectURL(n.src),n.onload=null,window.requestAnimationFrame((()=>{n.src=W}))},n.onerror=()=>t(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const r=new Blob([new Uint8Array(e)],{type:"image/png"});n.src=e.byteLength?URL.createObjectURL(r):W}(e,t)}(n,((e,n)=>{null!=e?t(e):null!=n&&t(null,n,{cacheControl:i,expires:o})}))}));return{cancel:()=>{i.cancel(),r()}}};function Z(e,t,n){n[e]&&-1!==n[e].indexOf(t)||(n[e]=n[e]||[],n[e].push(t))}function J(e,t,n){if(n&&n[e]){const r=n[e].indexOf(t);-1!==r&&n[e].splice(r,1)}}class ee{constructor(e,t={}){s(this,t),this.type=e}}class te extends ee{constructor(e,t={}){super("error",s({error:e},t))}}class ne{on(e,t){return this._listeners=this._listeners||{},Z(e,t,this._listeners),this}off(e,t){return J(e,t,this._listeners),J(e,t,this._oneTimeListeners),this}once(e,t){return this._oneTimeListeners=this._oneTimeListeners||{},Z(e,t,this._oneTimeListeners),this}fire(e,t){"string"==typeof e&&(e=new ee(e,t||{}));const n=e.type;if(this.listens(n)){e.target=this;const t=this._listeners&&this._listeners[n]?this._listeners[n].slice():[];for(const n of t)n.call(this,e);const r=this._oneTimeListeners&&this._oneTimeListeners[n]?this._oneTimeListeners[n].slice():[];for(const t of r)J(n,t,this._oneTimeListeners),t.call(this,e);const i=this._eventedParent;i&&(s(e,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),i.fire(e))}else e instanceof te&&console.error(e.error);return this}listens(e){return this._listeners&&this._listeners[e]&&this._listeners[e].length>0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e)}setEventedParent(e,t){return this._eventedParent=e,this._eventedParentData=t,this}}var re={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1},elevationOffset:{type:"number",default:450}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};class ie{constructor(e,t,n,r){this.message=(e?`${e}: `:"")+n,r&&(this.identifier=r),null!=t&&t.__line__&&(this.line=t.__line__)}}function oe(e){const t=e.value;return t?[new ie(e.key,t,"constants have been deprecated as of v8")]:[]}function ae(e,...t){for(const n of t)for(const t in n)e[t]=n[t];return e}function se(e){return e instanceof Number||e instanceof String||e instanceof Boolean?e.valueOf():e}function le(e){if(Array.isArray(e))return e.map(le);if(e instanceof Object&&!(e instanceof Number||e instanceof String||e instanceof Boolean)){const t={};for(const n in e)t[n]=le(e[n]);return t}return se(e)}class ce extends Error{constructor(e,t){super(t),this.message=t,this.key=e}}class ue{constructor(e,t=[]){this.parent=e,this.bindings={};for(const[e,n]of t)this.bindings[e]=n}concat(e){return new ue(this,e)}get(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(`${e} not found in scope.`)}has(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)}}const de={kind:"null"},he={kind:"number"},pe={kind:"string"},me={kind:"boolean"},ge={kind:"color"},fe={kind:"object"},_e={kind:"value"},be={kind:"collator"},ve={kind:"formatted"},ye={kind:"padding"},Ee={kind:"resolvedImage"};function Se(e,t){return{kind:"array",itemType:e,N:t}}function we(e){if("array"===e.kind){const t=we(e.itemType);return"number"==typeof e.N?`array<${t}, ${e.N}>`:"value"===e.itemType.kind?"array":`array<${t}>`}return e.kind}const Te=[de,he,pe,me,ge,ve,fe,Se(_e),ye,Ee];function Ce(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!Ce(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(const e of Te)if(!Ce(e,t))return null}return`Expected ${we(e)} but found ${we(t)} instead.`}function xe(e,t){return t.some((t=>t.kind===e.kind))}function Fe(e,t){return t.some((t=>"null"===t?null===e:"array"===t?Array.isArray(e):"object"===t?e&&!Array.isArray(e)&&"object"==typeof e:t===typeof e))}var De,ke={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Oe(e){return(e=Math.round(e))<0?0:e>255?255:e}function Ie(e){return Oe("%"===e[e.length-1]?parseFloat(e)/100*255:parseInt(e))}function Ae(e){return(t="%"===e[e.length-1]?parseFloat(e)/100:parseFloat(e))<0?0:t>1?1:t;var t}function Re(e,t,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}try{De={}.parseCSSColor=function(e){var t,n=e.replace(/ /g,"").toLowerCase();if(n in ke)return ke[n].slice();if("#"===n[0])return 4===n.length?(t=parseInt(n.substr(1),16))>=0&&t<=4095?[(3840&t)>>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===n.length&&(t=parseInt(n.substr(1),16))>=0&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var r=n.indexOf("("),i=n.indexOf(")");if(-1!==r&&i+1===n.length){var o=n.substr(0,r),a=n.substr(r+1,i-(r+1)).split(","),s=1;switch(o){case"rgba":if(4!==a.length)return null;s=Ae(a.pop());case"rgb":return 3!==a.length?null:[Ie(a[0]),Ie(a[1]),Ie(a[2]),s];case"hsla":if(4!==a.length)return null;s=Ae(a.pop());case"hsl":if(3!==a.length)return null;var l=(parseFloat(a[0])%360+360)%360/360,c=Ae(a[1]),u=Ae(a[2]),d=u<=.5?u*(c+1):u+c-u*c,h=2*u-d;return[Oe(255*Re(h,d,l+1/3)),Oe(255*Re(h,d,l)),Oe(255*Re(h,d,l-1/3)),s];default:return null}}return null}}catch(e){}class Ne{constructor(e,t,n,r=1){this.r=e,this.g=t,this.b=n,this.a=r}static parse(e){if(!e)return;if(e instanceof Ne)return e;if("string"!=typeof e)return;const t=De(e);return t?new Ne(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3]):void 0}toString(){const[e,t,n,r]=this.toArray();return`rgba(${Math.round(e)},${Math.round(t)},${Math.round(n)},${r})`}toArray(){const{r:e,g:t,b:n,a:r}=this;return 0===r?[0,0,0,0]:[255*e/r,255*t/r,255*n/r,r]}}Ne.black=new Ne(0,0,0,1),Ne.white=new Ne(1,1,1,1),Ne.transparent=new Ne(0,0,0,0),Ne.red=new Ne(1,0,0,1);class Me{constructor(e,t,n){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=n,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,t){return this.collator.compare(e,t)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Pe{constructor(e,t,n,r,i){this.text=e,this.image=t,this.scale=n,this.fontStack=r,this.textColor=i}}class Le{constructor(e){this.sections=e}static fromString(e){return new Le([new Pe(e,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some((e=>0!==e.text.length||e.image&&0!==e.image.name.length))}static factory(e){return e instanceof Le?e:Le.fromString(e)}toString(){return 0===this.sections.length?"":this.sections.map((e=>e.text)).join("")}}class Be{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof Be)return e;if("number"==typeof e)return new Be([e,e,e,e]);if(Array.isArray(e)&&!(e.length<1||e.length>4)){for(const t of e)if("number"!=typeof t)return;switch(e.length){case 1:e=[e[0],e[0],e[0],e[0]];break;case 2:e=[e[0],e[1],e[0],e[1]];break;case 3:e=[e[0],e[1],e[2],e[1]]}return new Be(e)}}toString(){return JSON.stringify(this.values)}}class Ue{constructor(e){this.name=e.name,this.available=e.available}toString(){return this.name}static fromString(e){return e?new Ue({name:e,available:!1}):null}}function je(e,t,n,r){return"number"==typeof e&&e>=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof n&&n>=0&&n<=255?void 0===r||"number"==typeof r&&r>=0&&r<=1?null:`Invalid rgba value [${[e,t,n,r].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof r?[e,t,n,r]:[e,t,n]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Ge(e){if(null===e)return!0;if("string"==typeof e)return!0;if("boolean"==typeof e)return!0;if("number"==typeof e)return!0;if(e instanceof Ne)return!0;if(e instanceof Me)return!0;if(e instanceof Le)return!0;if(e instanceof Be)return!0;if(e instanceof Ue)return!0;if(Array.isArray(e)){for(const t of e)if(!Ge(t))return!1;return!0}if("object"==typeof e){for(const t in e)if(!Ge(e[t]))return!1;return!0}return!1}function ze(e){if(null===e)return de;if("string"==typeof e)return pe;if("boolean"==typeof e)return me;if("number"==typeof e)return he;if(e instanceof Ne)return ge;if(e instanceof Me)return be;if(e instanceof Le)return ve;if(e instanceof Be)return ye;if(e instanceof Ue)return Ee;if(Array.isArray(e)){const t=e.length;let n;for(const t of e){const e=ze(t);if(n){if(n===e)continue;n=_e;break}n=e}return Se(n||_e,t)}return fe}function He(e){const t=typeof e;return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof Ne||e instanceof Le||e instanceof Be||e instanceof Ue?e.toString():JSON.stringify(e)}class qe{constructor(e,t){this.type=e,this.value=t}static parse(e,t){if(2!==e.length)return t.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!Ge(e[1]))return t.error("invalid value");const n=e[1];let r=ze(n);const i=t.expectedType;return"array"!==r.kind||0!==r.N||!i||"array"!==i.kind||"number"==typeof i.N&&0!==i.N||(r=i),new qe(r,n)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class Ve{constructor(e){this.name="ExpressionEvaluationError",this.message=e}toJSON(){return this.message}}const $e={string:pe,number:he,boolean:me,object:fe};class Ke{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let n,r=1;const i=e[0];if("array"===i){let i,o;if(e.length>2){const n=e[1];if("string"!=typeof n||!(n in $e)||"object"===n)return t.error('The item type argument of "array" must be one of string, number, boolean',1);i=$e[n],r++}else i=_e;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);o=e[2],r++}n=Se(i,o)}else{if(!$e[i])throw new Error(`Types doesn't contain name = ${i}`);n=$e[i]}const o=[];for(;r<e.length;r++){const n=t.parse(e[r],r,_e);if(!n)return null;o.push(n)}return new Ke(n,o)}evaluate(e){for(let t=0;t<this.args.length;t++){const n=this.args[t].evaluate(e);if(!Ce(this.type,ze(n)))return n;if(t===this.args.length-1)throw new Ve(`Expected value to be of type ${we(this.type)}, but found ${we(ze(n))} instead.`)}throw new Error}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every((e=>e.outputDefined()))}}const We={"to-boolean":me,"to-color":ge,"to-number":he,"to-string":pe};class Ye{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");const n=e[0];if(!We[n])throw new Error(`Can't parse ${n} as it is not part of the known types`);if(("to-boolean"===n||"to-string"===n)&&2!==e.length)return t.error("Expected one argument.");const r=We[n],i=[];for(let n=1;n<e.length;n++){const r=t.parse(e[n],n,_e);if(!r)return null;i.push(r)}return new Ye(r,i)}evaluate(e){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(e));if("color"===this.type.kind){let t,n;for(const r of this.args){if(t=r.evaluate(e),n=null,t instanceof Ne)return t;if("string"==typeof t){const n=e.parseColor(t);if(n)return n}else if(Array.isArray(t)&&(n=t.length<3||t.length>4?`Invalid rbga value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.`:je(t[0],t[1],t[2],t[3]),!n))return new Ne(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new Ve(n||`Could not parse color from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}if("padding"===this.type.kind){let t;for(const n of this.args){t=n.evaluate(e);const r=Be.parse(t);if(r)return r}throw new Ve(`Could not parse padding from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}if("number"===this.type.kind){let t=null;for(const n of this.args){if(t=n.evaluate(e),null===t)return 0;const r=Number(t);if(!isNaN(r))return r}throw new Ve(`Could not convert ${JSON.stringify(t)} to number.`)}return"formatted"===this.type.kind?Le.fromString(He(this.args[0].evaluate(e))):"resolvedImage"===this.type.kind?Ue.fromString(He(this.args[0].evaluate(e))):He(this.args[0].evaluate(e))}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every((e=>e.outputDefined()))}}const Qe=["Unknown","Point","LineString","Polygon"];class Xe{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?"number"==typeof this.feature.type?Qe[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(e){let t=this._parseColorCache[e];return t||(t=this._parseColorCache[e]=Ne.parse(e)),t}}class Ze{constructor(e,t,n,r){this.name=e,this.type=t,this._evaluate=n,this.args=r}evaluate(e){return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}static parse(e,t){const n=e[0],r=Ze.definitions[n];if(!r)return t.error(`Unknown expression "${n}". If you wanted a literal array, use ["literal", [...]].`,0);const i=Array.isArray(r)?r[0]:r.type,o=Array.isArray(r)?[[r[1],r[2]]]:r.overloads,a=o.filter((([t])=>!Array.isArray(t)||t.length===e.length-1));let s=null;for(const[r,o]of a){s=new Et(t.registry,t.path,null,t.scope);const a=[];let l=!1;for(let t=1;t<e.length;t++){const n=e[t],i=Array.isArray(r)?r[t-1]:r.type,o=s.parse(n,1+a.length,i);if(!o){l=!0;break}a.push(o)}if(!l)if(Array.isArray(r)&&r.length!==a.length)s.error(`Expected ${r.length} arguments, but found ${a.length} instead.`);else{for(let e=0;e<a.length;e++){const t=Array.isArray(r)?r[e]:r.type,n=a[e];s.concat(e+1).checkSubtype(t,n.type)}if(0===s.errors.length)return new Ze(n,i,o,a)}}if(1===a.length)t.errors.push(...s.errors);else{const n=(a.length?a:o).map((([e])=>{return t=e,Array.isArray(t)?`(${t.map(we).join(", ")})`:`(${we(t.type)}...)`;var t})).join(" | "),r=[];for(let n=1;n<e.length;n++){const i=t.parse(e[n],1+r.length);if(!i)return null;r.push(we(i.type))}t.error(`Expected arguments of type ${n}, but found (${r.join(", ")}) instead.`)}return null}static register(e,t){Ze.definitions=t;for(const n in t)e[n]=Ze}}class Je{constructor(e,t,n){this.type=be,this.locale=n,this.caseSensitive=e,this.diacriticSensitive=t}static parse(e,t){if(2!==e.length)return t.error("Expected one argument.");const n=e[1];if("object"!=typeof n||Array.isArray(n))return t.error("Collator options argument must be an object.");const r=t.parse(void 0!==n["case-sensitive"]&&n["case-sensitive"],1,me);if(!r)return null;const i=t.parse(void 0!==n["diacritic-sensitive"]&&n["diacritic-sensitive"],1,me);if(!i)return null;let o=null;return n.locale&&(o=t.parse(n.locale,1,pe),!o)?null:new Je(r,i,o)}evaluate(e){return new Me(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}}const et=8192;function tt(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.max(e[2],t[0]),e[3]=Math.max(e[3],t[1])}function nt(e,t){return!(e[0]<=t[0]||e[2]>=t[2]||e[1]<=t[1]||e[3]>=t[3])}function rt(e,t){const n=(180+e[0])/360,r=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e[1]*Math.PI/360)))/360,i=Math.pow(2,t.z);return[Math.round(n*i*et),Math.round(r*i*et)]}function it(e,t,n){const r=e[0]-t[0],i=e[1]-t[1],o=e[0]-n[0],a=e[1]-n[1];return r*a-o*i==0&&r*o<=0&&i*a<=0}function ot(e,t){let n=!1;for(let a=0,s=t.length;a<s;a++){const s=t[a];for(let t=0,a=s.length;t<a-1;t++){if(it(e,s[t],s[t+1]))return!1;(i=s[t])[1]>(r=e)[1]!=(o=s[t+1])[1]>r[1]&&r[0]<(o[0]-i[0])*(r[1]-i[1])/(o[1]-i[1])+i[0]&&(n=!n)}}var r,i,o;return n}function at(e,t){for(let n=0;n<t.length;n++)if(ot(e,t[n]))return!0;return!1}function st(e,t,n,r){const i=r[0]-n[0],o=r[1]-n[1],a=(e[0]-n[0])*o-i*(e[1]-n[1]),s=(t[0]-n[0])*o-i*(t[1]-n[1]);return a>0&&s<0||a<0&&s>0}function lt(e,t,n){for(const c of n)for(let n=0;n<c.length-1;++n)if(0!=(s=[(a=c[n+1])[0]-(o=c[n])[0],a[1]-o[1]])[0]*(l=[(i=t)[0]-(r=e)[0],i[1]-r[1]])[1]-s[1]*l[0]&&st(r,i,o,a)&&st(o,a,r,i))return!0;var r,i,o,a,s,l;return!1}function ct(e,t){for(let n=0;n<e.length;++n)if(!ot(e[n],t))return!1;for(let n=0;n<e.length-1;++n)if(lt(e[n],e[n+1],t))return!1;return!0}function ut(e,t){for(let n=0;n<t.length;n++)if(ct(e,t[n]))return!0;return!1}function dt(e,t,n){const r=[];for(let i=0;i<e.length;i++){const o=[];for(let r=0;r<e[i].length;r++){const a=rt(e[i][r],n);tt(t,a),o.push(a)}r.push(o)}return r}function ht(e,t,n){const r=[];for(let i=0;i<e.length;i++){const o=dt(e[i],t,n);r.push(o)}return r}function pt(e,t,n,r){if(e[0]<n[0]||e[0]>n[2]){const t=.5*r;let i=e[0]-n[0]>t?-r:n[0]-e[0]>t?r:0;0===i&&(i=e[0]-n[2]>t?-r:n[2]-e[0]>t?r:0),e[0]+=i}tt(t,e)}function mt(e,t,n,r){const i=Math.pow(2,r.z)*et,o=[r.x*et,r.y*et],a=[];for(const r of e)for(const e of r){const r=[e.x+o[0],e.y+o[1]];pt(r,t,n,i),a.push(r)}return a}function gt(e,t,n,r){const i=Math.pow(2,r.z)*et,o=[r.x*et,r.y*et],a=[];for(const n of e){const e=[];for(const r of n){const n=[r.x+o[0],r.y+o[1]];tt(t,n),e.push(n)}a.push(e)}if(t[2]-t[0]<=i/2){(s=t)[0]=s[1]=1/0,s[2]=s[3]=-1/0;for(const e of a)for(const r of e)pt(r,t,n,i)}var s;return a}class ft{constructor(e,t){this.type=me,this.geojson=e,this.geometries=t}static parse(e,t){if(2!==e.length)return t.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(Ge(e[1])){const t=e[1];if("FeatureCollection"===t.type)for(let e=0;e<t.features.length;++e){const n=t.features[e].geometry.type;if("Polygon"===n||"MultiPolygon"===n)return new ft(t,t.features[e].geometry)}else if("Feature"===t.type){const e=t.geometry.type;if("Polygon"===e||"MultiPolygon"===e)return new ft(t,t.geometry)}else if("Polygon"===t.type||"MultiPolygon"===t.type)return new ft(t,t)}return t.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(null!=e.geometry()&&null!=e.canonicalID()){if("Point"===e.geometryType())return function(e,t){const n=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],i=e.canonicalID();if("Polygon"===t.type){const o=dt(t.coordinates,r,i),a=mt(e.geometry(),n,r,i);if(!nt(n,r))return!1;for(const e of a)if(!ot(e,o))return!1}if("MultiPolygon"===t.type){const o=ht(t.coordinates,r,i),a=mt(e.geometry(),n,r,i);if(!nt(n,r))return!1;for(const e of a)if(!at(e,o))return!1}return!0}(e,this.geometries);if("LineString"===e.geometryType())return function(e,t){const n=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],i=e.canonicalID();if("Polygon"===t.type){const o=dt(t.coordinates,r,i),a=gt(e.geometry(),n,r,i);if(!nt(n,r))return!1;for(const e of a)if(!ct(e,o))return!1}if("MultiPolygon"===t.type){const o=ht(t.coordinates,r,i),a=gt(e.geometry(),n,r,i);if(!nt(n,r))return!1;for(const e of a)if(!ut(e,o))return!1}return!0}(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}function _t(e){if(e instanceof Ze){if("get"===e.name&&1===e.args.length)return!1;if("feature-state"===e.name)return!1;if("has"===e.name&&1===e.args.length)return!1;if("properties"===e.name||"geometry-type"===e.name||"id"===e.name)return!1;if(/^filter-/.test(e.name))return!1}if(e instanceof ft)return!1;let t=!0;return e.eachChild((e=>{t&&!_t(e)&&(t=!1)})),t}function bt(e){if(e instanceof Ze&&"feature-state"===e.name)return!1;let t=!0;return e.eachChild((e=>{t&&!bt(e)&&(t=!1)})),t}function vt(e,t){if(e instanceof Ze&&t.indexOf(e.name)>=0)return!1;let n=!0;return e.eachChild((e=>{n&&!vt(e,t)&&(n=!1)})),n}class yt{constructor(e,t){this.type=t.type,this.name=e,this.boundExpression=t}static parse(e,t){if(2!==e.length||"string"!=typeof e[1])return t.error("'var' expression requires exactly one string literal argument.");const n=e[1];return t.scope.has(n)?new yt(n,t.scope.get(n)):t.error(`Unknown variable "${n}". Make sure "${n}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(e){return this.boundExpression.evaluate(e)}eachChild(){}outputDefined(){return!1}}class Et{constructor(e,t=[],n,r=new ue,i=[]){this.registry=e,this.path=t,this.key=t.map((e=>`[${e}]`)).join(""),this.scope=r,this.errors=i,this.expectedType=n}parse(e,t,n,r,i={}){return t?this.concat(t,n,r)._parse(e,i):this._parse(e,i)}_parse(e,t){function n(e,t,n){return"assert"===n?new Ke(t,[e]):"coerce"===n?new Ye(t,[e]):e}if(null!==e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e||(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const r=e[0];if("string"!=typeof r)return this.error(`Expression name must be a string, but found ${typeof r} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const i=this.registry[r];if(i){let r=i.parse(e,this);if(!r)return null;if(this.expectedType){const e=this.expectedType,i=r.type;if("string"!==e.kind&&"number"!==e.kind&&"boolean"!==e.kind&&"object"!==e.kind&&"array"!==e.kind||"value"!==i.kind)if("color"!==e.kind&&"formatted"!==e.kind&&"resolvedImage"!==e.kind||"value"!==i.kind&&"string"!==i.kind)if("padding"!==e.kind||"value"!==i.kind&&"number"!==i.kind&&"array"!==i.kind){if(this.checkSubtype(e,i))return null}else r=n(r,e,t.typeAnnotation||"coerce");else r=n(r,e,t.typeAnnotation||"coerce");else r=n(r,e,t.typeAnnotation||"assert")}if(!(r instanceof qe)&&"resolvedImage"!==r.type.kind&&St(r)){const t=new Xe;try{r=new qe(r.type,r.evaluate(t))}catch(e){return this.error(e.message),null}}return r}return this.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(void 0===e?"'undefined' value invalid. Use null instead.":"object"==typeof e?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof e} instead.`)}concat(e,t,n){const r="number"==typeof e?this.path.concat(e):this.path,i=n?this.scope.concat(n):this.scope;return new Et(this.registry,r,t||null,i,this.errors)}error(e,...t){const n=`${this.key}${t.map((e=>`[${e}]`)).join("")}`;this.errors.push(new ce(n,e))}checkSubtype(e,t){const n=Ce(e,t);return n&&this.error(n),n}}function St(e){if(e instanceof yt)return St(e.boundExpression);if(e instanceof Ze&&"error"===e.name)return!1;if(e instanceof Je)return!1;if(e instanceof ft)return!1;const t=e instanceof Ye||e instanceof Ke;let n=!0;return e.eachChild((e=>{n=t?n&&St(e):n&&e instanceof qe})),!!n&&_t(e)&&vt(e,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function wt(e,t){const n=e.length-1;let r,i,o=0,a=n,s=0;for(;o<=a;)if(s=Math.floor((o+a)/2),r=e[s],i=e[s+1],r<=t){if(s===n||t<i)return s;o=s+1}else{if(!(r>t))throw new Ve("Input is not a number.");a=s-1}return 0}class Tt{constructor(e,t,n){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(const[e,t]of n)this.labels.push(e),this.outputs.push(t)}static parse(e,t){if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");const n=t.parse(e[1],1,he);if(!n)return null;const r=[];let i=null;t.expectedType&&"value"!==t.expectedType.kind&&(i=t.expectedType);for(let n=1;n<e.length;n+=2){const o=1===n?-1/0:e[n],a=e[n+1],s=n,l=n+1;if("number"!=typeof o)return t.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',s);if(r.length&&r[r.length-1][0]>=o)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',s);const c=t.parse(a,l,i);if(!c)return null;i=i||c.type,r.push([o,c])}return new Tt(i,n,r)}evaluate(e){const t=this.labels,n=this.outputs;if(1===t.length)return n[0].evaluate(e);const r=this.input.evaluate(e);if(r<=t[0])return n[0].evaluate(e);const i=t.length;return r>=t[i-1]?n[i-1].evaluate(e):n[wt(t,r)].evaluate(e)}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every((e=>e.outputDefined()))}}function Ct(e,t,n){return e*(1-n)+t*n}var xt=Object.freeze({__proto__:null,number:Ct,color:function(e,t,n){return new Ne(Ct(e.r,t.r,n),Ct(e.g,t.g,n),Ct(e.b,t.b,n),Ct(e.a,t.a,n))},array:function(e,t,n){return e.map(((e,r)=>Ct(e,t[r],n)))},padding:function(e,t,n){const r=e.values,i=t.values;return new Be([Ct(r[0],i[0],n),Ct(r[1],i[1],n),Ct(r[2],i[2],n),Ct(r[3],i[3],n)])}});const Ft=.95047,Dt=1.08883,kt=4/29,Ot=6/29,It=3*Ot*Ot,At=Math.PI/180,Rt=180/Math.PI;function Nt(e){return e>.008856451679035631?Math.pow(e,1/3):e/It+kt}function Mt(e){return e>Ot?e*e*e:It*(e-kt)}function Pt(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Lt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Bt(e){const t=Lt(e.r),n=Lt(e.g),r=Lt(e.b),i=Nt((.4124564*t+.3575761*n+.1804375*r)/Ft),o=Nt((.2126729*t+.7151522*n+.072175*r)/1);return{l:116*o-16,a:500*(i-o),b:200*(o-Nt((.0193339*t+.119192*n+.9503041*r)/Dt)),alpha:e.a}}function Ut(e){let t=(e.l+16)/116,n=isNaN(e.a)?t:t+e.a/500,r=isNaN(e.b)?t:t-e.b/200;return t=1*Mt(t),n=Ft*Mt(n),r=Dt*Mt(r),new Ne(Pt(3.2404542*n-1.5371385*t-.4985314*r),Pt(-.969266*n+1.8760108*t+.041556*r),Pt(.0556434*n-.2040259*t+1.0572252*r),e.alpha)}function jt(e,t,n){const r=t-e;return e+n*(r>180||r<-180?r-360*Math.round(r/360):r)}const Gt={forward:Bt,reverse:Ut,interpolate:function(e,t,n){return{l:Ct(e.l,t.l,n),a:Ct(e.a,t.a,n),b:Ct(e.b,t.b,n),alpha:Ct(e.alpha,t.alpha,n)}}},zt={forward:function(e){const{l:t,a:n,b:r}=Bt(e),i=Math.atan2(r,n)*Rt;return{h:i<0?i+360:i,c:Math.sqrt(n*n+r*r),l:t,alpha:e.a}},reverse:function(e){const t=e.h*At,n=e.c;return Ut({l:e.l,a:Math.cos(t)*n,b:Math.sin(t)*n,alpha:e.alpha})},interpolate:function(e,t,n){return{h:jt(e.h,t.h,n),c:Ct(e.c,t.c,n),l:Ct(e.l,t.l,n),alpha:Ct(e.alpha,t.alpha,n)}}};var Ht=Object.freeze({__proto__:null,lab:Gt,hcl:zt});class qt{constructor(e,t,n,r,i){this.type=e,this.operator=t,this.interpolation=n,this.input=r,this.labels=[],this.outputs=[];for(const[e,t]of i)this.labels.push(e),this.outputs.push(t)}static interpolationFactor(e,n,r,i){let o=0;if("exponential"===e.name)o=Vt(n,e.base,r,i);else if("linear"===e.name)o=Vt(n,1,r,i);else if("cubic-bezier"===e.name){const a=e.controlPoints;o=new t(a[0],a[1],a[2],a[3]).solve(Vt(n,1,r,i))}return o}static parse(e,t){let[n,r,i,...o]=e;if(!Array.isArray(r)||0===r.length)return t.error("Expected an interpolation type expression.",1);if("linear"===r[0])r={name:"linear"};else if("exponential"===r[0]){const e=r[1];if("number"!=typeof e)return t.error("Exponential interpolation requires a numeric base.",1,1);r={name:"exponential",base:e}}else{if("cubic-bezier"!==r[0])return t.error(`Unknown interpolation type ${String(r[0])}`,1,0);{const e=r.slice(1);if(4!==e.length||e.some((e=>"number"!=typeof e||e<0||e>1)))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);r={name:"cubic-bezier",controlPoints:e}}}if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(i=t.parse(i,2,he),!i)return null;const a=[];let s=null;"interpolate-hcl"===n||"interpolate-lab"===n?s=ge:t.expectedType&&"value"!==t.expectedType.kind&&(s=t.expectedType);for(let e=0;e<o.length;e+=2){const n=o[e],r=o[e+1],i=e+3,l=e+4;if("number"!=typeof n)return t.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',i);if(a.length&&a[a.length-1][0]>=n)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',i);const c=t.parse(r,l,s);if(!c)return null;s=s||c.type,a.push([n,c])}return"number"===s.kind||"color"===s.kind||"padding"===s.kind||"array"===s.kind&&"number"===s.itemType.kind&&"number"==typeof s.N?new qt(s,n,r,i,a):t.error(`Type ${we(s)} is not interpolatable.`)}evaluate(e){const t=this.labels,n=this.outputs;if(1===t.length)return n[0].evaluate(e);const r=this.input.evaluate(e);if(r<=t[0])return n[0].evaluate(e);const i=t.length;if(r>=t[i-1])return n[i-1].evaluate(e);const o=wt(t,r),a=qt.interpolationFactor(this.interpolation,r,t[o],t[o+1]),s=n[o].evaluate(e),l=n[o+1].evaluate(e);return"interpolate"===this.operator?xt[this.type.kind.toLowerCase()](s,l,a):"interpolate-hcl"===this.operator?zt.reverse(zt.interpolate(zt.forward(s),zt.forward(l),a)):Gt.reverse(Gt.interpolate(Gt.forward(s),Gt.forward(l),a))}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every((e=>e.outputDefined()))}}function Vt(e,t,n,r){const i=r-n,o=e-n;return 0===i?0:1===t?o/i:(Math.pow(t,o)-1)/(Math.pow(t,i)-1)}class $t{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expectected at least one argument.");let n=null;const r=t.expectedType;r&&"value"!==r.kind&&(n=r);const i=[];for(const r of e.slice(1)){const e=t.parse(r,1+i.length,n,void 0,{typeAnnotation:"omit"});if(!e)return null;n=n||e.type,i.push(e)}if(!n)throw new Error("No output type");const o=r&&i.some((e=>Ce(r,e.type)));return new $t(o?_e:n,i)}evaluate(e){let t,n=null,r=0;for(const i of this.args)if(r++,n=i.evaluate(e),n&&n instanceof Ue&&!n.available&&(t||(t=n.name),n=null,r===this.args.length&&(n=t)),null!==n)break;return n}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every((e=>e.outputDefined()))}}class Kt{constructor(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(const t of this.bindings)e(t[1]);e(this.result)}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);const n=[];for(let r=1;r<e.length-1;r+=2){const i=e[r];if("string"!=typeof i)return t.error(`Expected string, but found ${typeof i} instead.`,r);if(/[^a-zA-Z0-9_]/.test(i))return t.error("Variable names must contain only alphanumeric characters or '_'.",r);const o=t.parse(e[r+1],r+1);if(!o)return null;n.push([i,o])}const r=t.parse(e[e.length-1],e.length-1,t.expectedType,n);return r?new Kt(n,r):null}outputDefined(){return this.result.outputDefined()}}class Wt{constructor(e,t,n){this.type=e,this.index=t,this.input=n}static parse(e,t){if(3!==e.length)return t.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const n=t.parse(e[1],1,he),r=t.parse(e[2],2,Se(t.expectedType||_e));return n&&r?new Wt(r.type.itemType,n,r):null}evaluate(e){const t=this.index.evaluate(e),n=this.input.evaluate(e);if(t<0)throw new Ve(`Array index out of bounds: ${t} < 0.`);if(t>=n.length)throw new Ve(`Array index out of bounds: ${t} > ${n.length-1}.`);if(t!==Math.floor(t))throw new Ve(`Array index must be an integer, but found ${t} instead.`);return n[t]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}}class Yt{constructor(e,t){this.type=me,this.needle=e,this.haystack=t}static parse(e,t){if(3!==e.length)return t.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const n=t.parse(e[1],1,_e),r=t.parse(e[2],2,_e);return n&&r?xe(n.type,[me,pe,he,de,_e])?new Yt(n,r):t.error(`Expected first argument to be of type boolean, string, number or null, but found ${we(n.type)} instead`):null}evaluate(e){const t=this.needle.evaluate(e),n=this.haystack.evaluate(e);if(!n)return!1;if(!Fe(t,["boolean","string","number","null"]))throw new Ve(`Expected first argument to be of type boolean, string, number or null, but found ${we(ze(t))} instead.`);if(!Fe(n,["string","array"]))throw new Ve(`Expected second argument to be of type array or string, but found ${we(ze(n))} instead.`);return n.indexOf(t)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}}class Qt{constructor(e,t,n){this.type=he,this.needle=e,this.haystack=t,this.fromIndex=n}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const n=t.parse(e[1],1,_e),r=t.parse(e[2],2,_e);if(!n||!r)return null;if(!xe(n.type,[me,pe,he,de,_e]))return t.error(`Expected first argument to be of type boolean, string, number or null, but found ${we(n.type)} instead`);if(4===e.length){const i=t.parse(e[3],3,he);return i?new Qt(n,r,i):null}return new Qt(n,r)}evaluate(e){const t=this.needle.evaluate(e),n=this.haystack.evaluate(e);if(!Fe(t,["boolean","string","number","null"]))throw new Ve(`Expected first argument to be of type boolean, string, number or null, but found ${we(ze(t))} instead.`);if(!Fe(n,["string","array"]))throw new Ve(`Expected second argument to be of type array or string, but found ${we(ze(n))} instead.`);if(this.fromIndex){const r=this.fromIndex.evaluate(e);return n.indexOf(t,r)}return n.indexOf(t)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}}class Xt{constructor(e,t,n,r,i,o){this.inputType=e,this.type=t,this.input=n,this.cases=r,this.outputs=i,this.otherwise=o}static parse(e,t){if(e.length<5)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!=1)return t.error("Expected an even number of arguments.");let n,r;t.expectedType&&"value"!==t.expectedType.kind&&(r=t.expectedType);const i={},o=[];for(let a=2;a<e.length-1;a+=2){let s=e[a];const l=e[a+1];Array.isArray(s)||(s=[s]);const c=t.concat(a);if(0===s.length)return c.error("Expected at least one branch label.");for(const e of s){if("number"!=typeof e&&"string"!=typeof e)return c.error("Branch labels must be numbers or strings.");if("number"==typeof e&&Math.abs(e)>Number.MAX_SAFE_INTEGER)return c.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof e&&Math.floor(e)!==e)return c.error("Numeric branch labels must be integer values.");if(n){if(c.checkSubtype(n,ze(e)))return null}else n=ze(e);if(void 0!==i[String(e)])return c.error("Branch labels must be unique.");i[String(e)]=o.length}const u=t.parse(l,a,r);if(!u)return null;r=r||u.type,o.push(u)}const a=t.parse(e[1],1,_e);if(!a)return null;const s=t.parse(e[e.length-1],e.length-1,r);return s?"value"!==a.type.kind&&t.concat(1).checkSubtype(n,a.type)?null:new Xt(n,r,a,i,o,s):null}evaluate(e){const t=this.input.evaluate(e);return(ze(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every((e=>e.outputDefined()))&&this.otherwise.outputDefined()}}class Zt{constructor(e,t,n){this.type=e,this.branches=t,this.otherwise=n}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!=0)return t.error("Expected an odd number of arguments.");let n;t.expectedType&&"value"!==t.expectedType.kind&&(n=t.expectedType);const r=[];for(let i=1;i<e.length-1;i+=2){const o=t.parse(e[i],i,me);if(!o)return null;const a=t.parse(e[i+1],i+1,n);if(!a)return null;r.push([o,a]),n=n||a.type}const i=t.parse(e[e.length-1],e.length-1,n);if(!i)return null;if(!n)throw new Error("Can't infer output type");return new Zt(n,r,i)}evaluate(e){for(const[t,n]of this.branches)if(t.evaluate(e))return n.evaluate(e);return this.otherwise.evaluate(e)}eachChild(e){for(const[t,n]of this.branches)e(t),e(n);e(this.otherwise)}outputDefined(){return this.branches.every((([e,t])=>t.outputDefined()))&&this.otherwise.outputDefined()}}class Jt{constructor(e,t,n,r){this.type=e,this.input=t,this.beginIndex=n,this.endIndex=r}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const n=t.parse(e[1],1,_e),r=t.parse(e[2],2,he);if(!n||!r)return null;if(!xe(n.type,[Se(_e),pe,_e]))return t.error(`Expected first argument to be of type array or string, but found ${we(n.type)} instead`);if(4===e.length){const i=t.parse(e[3],3,he);return i?new Jt(n.type,n,r,i):null}return new Jt(n.type,n,r)}evaluate(e){const t=this.input.evaluate(e),n=this.beginIndex.evaluate(e);if(!Fe(t,["string","array"]))throw new Ve(`Expected first argument to be of type array or string, but found ${we(ze(t))} instead.`);if(this.endIndex){const r=this.endIndex.evaluate(e);return t.slice(n,r)}return t.slice(n)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}}function en(e,t){return"=="===e||"!="===e?"boolean"===t.kind||"string"===t.kind||"number"===t.kind||"null"===t.kind||"value"===t.kind:"string"===t.kind||"number"===t.kind||"value"===t.kind}function tn(e,t,n,r){return 0===r.compare(t,n)}function nn(e,t,n){const r="=="!==e&&"!="!==e;return class i{constructor(e,t,n){this.type=me,this.lhs=e,this.rhs=t,this.collator=n,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}static parse(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");const n=e[0];let o=t.parse(e[1],1,_e);if(!o)return null;if(!en(n,o.type))return t.concat(1).error(`"${n}" comparisons are not supported for type '${we(o.type)}'.`);let a=t.parse(e[2],2,_e);if(!a)return null;if(!en(n,a.type))return t.concat(2).error(`"${n}" comparisons are not supported for type '${we(a.type)}'.`);if(o.type.kind!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return t.error(`Cannot compare types '${we(o.type)}' and '${we(a.type)}'.`);r&&("value"===o.type.kind&&"value"!==a.type.kind?o=new Ke(a.type,[o]):"value"!==o.type.kind&&"value"===a.type.kind&&(a=new Ke(o.type,[a])));let s=null;if(4===e.length){if("string"!==o.type.kind&&"string"!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return t.error("Cannot use collator to compare non-string types.");if(s=t.parse(e[3],3,be),!s)return null}return new i(o,a,s)}evaluate(i){const o=this.lhs.evaluate(i),a=this.rhs.evaluate(i);if(r&&this.hasUntypedArgument){const t=ze(o),n=ze(a);if(t.kind!==n.kind||"string"!==t.kind&&"number"!==t.kind)throw new Ve(`Expected arguments for "${e}" to be (string, string) or (number, number), but found (${t.kind}, ${n.kind}) instead.`)}if(this.collator&&!r&&this.hasUntypedArgument){const e=ze(o),n=ze(a);if("string"!==e.kind||"string"!==n.kind)return t(i,o,a)}return this.collator?n(i,o,a,this.collator.evaluate(i)):t(i,o,a)}eachChild(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)}outputDefined(){return!0}}}const rn=nn("==",(function(e,t,n){return t===n}),tn),on=nn("!=",(function(e,t,n){return t!==n}),(function(e,t,n,r){return!tn(0,t,n,r)})),an=nn("<",(function(e,t,n){return t<n}),(function(e,t,n,r){return r.compare(t,n)<0})),sn=nn(">",(function(e,t,n){return t>n}),(function(e,t,n,r){return r.compare(t,n)>0})),ln=nn("<=",(function(e,t,n){return t<=n}),(function(e,t,n,r){return r.compare(t,n)<=0})),cn=nn(">=",(function(e,t,n){return t>=n}),(function(e,t,n,r){return r.compare(t,n)>=0}));class un{constructor(e,t,n,r,i){this.type=pe,this.number=e,this.locale=t,this.currency=n,this.minFractionDigits=r,this.maxFractionDigits=i}static parse(e,t){if(3!==e.length)return t.error("Expected two arguments.");const n=t.parse(e[1],1,he);if(!n)return null;const r=e[2];if("object"!=typeof r||Array.isArray(r))return t.error("NumberFormat options argument must be an object.");let i=null;if(r.locale&&(i=t.parse(r.locale,1,pe),!i))return null;let o=null;if(r.currency&&(o=t.parse(r.currency,1,pe),!o))return null;let a=null;if(r["min-fraction-digits"]&&(a=t.parse(r["min-fraction-digits"],1,he),!a))return null;let s=null;return r["max-fraction-digits"]&&(s=t.parse(r["max-fraction-digits"],1,he),!s)?null:new un(n,i,o,a,s)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}}class dn{constructor(e){this.type=ve,this.sections=e}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");const n=e[1];if(!Array.isArray(n)&&"object"==typeof n)return t.error("First argument must be an image or text section.");const r=[];let i=!1;for(let n=1;n<=e.length-1;++n){const o=e[n];if(i&&"object"==typeof o&&!Array.isArray(o)){i=!1;let e=null;if(o["font-scale"]&&(e=t.parse(o["font-scale"],1,he),!e))return null;let n=null;if(o["text-font"]&&(n=t.parse(o["text-font"],1,Se(pe)),!n))return null;let a=null;if(o["text-color"]&&(a=t.parse(o["text-color"],1,ge),!a))return null;const s=r[r.length-1];s.scale=e,s.font=n,s.textColor=a}else{const o=t.parse(e[n],1,_e);if(!o)return null;const a=o.type.kind;if("string"!==a&&"value"!==a&&"null"!==a&&"resolvedImage"!==a)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,r.push({content:o,scale:null,font:null,textColor:null})}}return new dn(r)}evaluate(e){return new Le(this.sections.map((t=>{const n=t.content.evaluate(e);return ze(n)===Ee?new Pe("",n,null,null,null):new Pe(He(n),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)})))}eachChild(e){for(const t of this.sections)e(t.content),t.scale&&e(t.scale),t.font&&e(t.font),t.textColor&&e(t.textColor)}outputDefined(){return!1}}class hn{constructor(e){this.type=Ee,this.input=e}static parse(e,t){if(2!==e.length)return t.error("Expected two arguments.");const n=t.parse(e[1],1,pe);return n?new hn(n):t.error("No image name provided.")}evaluate(e){const t=this.input.evaluate(e),n=Ue.fromString(t);return n&&e.availableImages&&(n.available=e.availableImages.indexOf(t)>-1),n}eachChild(e){e(this.input)}outputDefined(){return!1}}class pn{constructor(e){this.type=he,this.input=e}static parse(e,t){if(2!==e.length)return t.error(`Expected 1 argument, but found ${e.length-1} instead.`);const n=t.parse(e[1],1);return n?"array"!==n.type.kind&&"string"!==n.type.kind&&"value"!==n.type.kind?t.error(`Expected argument of type string or array, but found ${we(n.type)} instead.`):new pn(n):null}evaluate(e){const t=this.input.evaluate(e);if("string"==typeof t)return t.length;if(Array.isArray(t))return t.length;throw new Ve(`Expected value to be of type string or array, but found ${we(ze(t))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}}const mn={"==":rn,"!=":on,">":sn,"<":an,">=":cn,"<=":ln,array:Ke,at:Wt,boolean:Ke,case:Zt,coalesce:$t,collator:Je,format:dn,image:hn,in:Yt,"index-of":Qt,interpolate:qt,"interpolate-hcl":qt,"interpolate-lab":qt,length:pn,let:Kt,literal:qe,match:Xt,number:Ke,"number-format":un,object:Ke,slice:Jt,step:Tt,string:Ke,"to-boolean":Ye,"to-color":Ye,"to-number":Ye,"to-string":Ye,var:yt,within:ft};function gn(e,[t,n,r,i]){t=t.evaluate(e),n=n.evaluate(e),r=r.evaluate(e);const o=i?i.evaluate(e):1,a=je(t,n,r,o);if(a)throw new Ve(a);return new Ne(t/255*o,n/255*o,r/255*o,o)}function fn(e,t){return e in t}function _n(e,t){const n=t[e];return void 0===n?null:n}function bn(e){return{type:e}}function vn(e){return{result:"success",value:e}}function yn(e){return{result:"error",value:e}}function En(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function Sn(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function wn(e){return!!e.expression&&e.expression.interpolated}function Tn(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}function Cn(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function xn(e){return e}function Fn(e,t){const n="color"===t.type,r=e.stops&&"object"==typeof e.stops[0][0],i=r||!(r||void 0!==e.property),o=e.type||(wn(t)?"exponential":"interval");if(n||"padding"===t.type){const r=n?Ne.parse:Be.parse;(e=ae({},e)).stops&&(e.stops=e.stops.map((e=>[e[0],r(e[1])]))),e.default=r(e.default?e.default:t.default)}if(e.colorSpace&&"rgb"!==e.colorSpace&&!Ht[e.colorSpace])throw new Error(`Unknown color space: ${e.colorSpace}`);let a,s,l;if("exponential"===o)a=In;else if("interval"===o)a=On;else if("categorical"===o){a=kn,s=Object.create(null);for(const t of e.stops)s[t[0]]=t[1];l=typeof e.stops[0][0]}else{if("identity"!==o)throw new Error(`Unknown function type "${o}"`);a=An}if(r){const n={},r=[];for(let t=0;t<e.stops.length;t++){const i=e.stops[t],o=i[0].zoom;void 0===n[o]&&(n[o]={zoom:o,type:e.type,property:e.property,default:e.default,stops:[]},r.push(o)),n[o].stops.push([i[0].value,i[1]])}const i=[];for(const e of r)i.push([n[e].zoom,Fn(n[e],t)]);const o={name:"linear"};return{kind:"composite",interpolationType:o,interpolationFactor:qt.interpolationFactor.bind(void 0,o),zoomStops:i.map((e=>e[0])),evaluate:({zoom:n},r)=>In({stops:i,base:e.base},t,n).evaluate(n,r)}}if(i){const n="exponential"===o?{name:"exponential",base:void 0!==e.base?e.base:1}:null;return{kind:"camera",interpolationType:n,interpolationFactor:qt.interpolationFactor.bind(void 0,n),zoomStops:e.stops.map((e=>e[0])),evaluate:({zoom:n})=>a(e,t,n,s,l)}}return{kind:"source",evaluate(n,r){const i=r&&r.properties?r.properties[e.property]:void 0;return void 0===i?Dn(e.default,t.default):a(e,t,i,s,l)}}}function Dn(e,t,n){return void 0!==e?e:void 0!==t?t:void 0!==n?n:void 0}function kn(e,t,n,r,i){return Dn(typeof n===i?r[n]:void 0,e.default,t.default)}function On(e,t,n){if("number"!==Tn(n))return Dn(e.default,t.default);const r=e.stops.length;if(1===r)return e.stops[0][1];if(n<=e.stops[0][0])return e.stops[0][1];if(n>=e.stops[r-1][0])return e.stops[r-1][1];const i=wt(e.stops.map((e=>e[0])),n);return e.stops[i][1]}function In(e,t,n){const r=void 0!==e.base?e.base:1;if("number"!==Tn(n))return Dn(e.default,t.default);const i=e.stops.length;if(1===i)return e.stops[0][1];if(n<=e.stops[0][0])return e.stops[0][1];if(n>=e.stops[i-1][0])return e.stops[i-1][1];const o=wt(e.stops.map((e=>e[0])),n),a=function(e,t,n,r){const i=r-n,o=e-n;return 0===i?0:1===t?o/i:(Math.pow(t,o)-1)/(Math.pow(t,i)-1)}(n,r,e.stops[o][0],e.stops[o+1][0]),s=e.stops[o][1],l=e.stops[o+1][1];let c=xt[t.type]||xn;if(e.colorSpace&&"rgb"!==e.colorSpace){const t=Ht[e.colorSpace];c=(e,n)=>t.reverse(t.interpolate(t.forward(e),t.forward(n),a))}return"function"==typeof s.evaluate?{evaluate(...e){const t=s.evaluate.apply(void 0,e),n=l.evaluate.apply(void 0,e);if(void 0!==t&&void 0!==n)return c(t,n,a)}}:c(s,l,a)}function An(e,t,n){switch(t.type){case"color":n=Ne.parse(n);break;case"formatted":n=Le.fromString(n.toString());break;case"resolvedImage":n=Ue.fromString(n.toString());break;case"padding":n=Be.parse(n);break;default:Tn(n)===t.type||"enum"===t.type&&t.values[n]||(n=void 0)}return Dn(n,e.default,t.default)}Ze.register(mn,{error:[{kind:"error"},[pe],(e,[t])=>{throw new Ve(t.evaluate(e))}],typeof:[pe,[_e],(e,[t])=>we(ze(t.evaluate(e)))],"to-rgba":[Se(he,4),[ge],(e,[t])=>t.evaluate(e).toArray()],rgb:[ge,[he,he,he],gn],rgba:[ge,[he,he,he,he],gn],has:{type:me,overloads:[[[pe],(e,[t])=>fn(t.evaluate(e),e.properties())],[[pe,fe],(e,[t,n])=>fn(t.evaluate(e),n.evaluate(e))]]},get:{type:_e,overloads:[[[pe],(e,[t])=>_n(t.evaluate(e),e.properties())],[[pe,fe],(e,[t,n])=>_n(t.evaluate(e),n.evaluate(e))]]},"feature-state":[_e,[pe],(e,[t])=>_n(t.evaluate(e),e.featureState||{})],properties:[fe,[],e=>e.properties()],"geometry-type":[pe,[],e=>e.geometryType()],id:[_e,[],e=>e.id()],zoom:[he,[],e=>e.globals.zoom],"heatmap-density":[he,[],e=>e.globals.heatmapDensity||0],"line-progress":[he,[],e=>e.globals.lineProgress||0],accumulated:[_e,[],e=>void 0===e.globals.accumulated?null:e.globals.accumulated],"+":[he,bn(he),(e,t)=>{let n=0;for(const r of t)n+=r.evaluate(e);return n}],"*":[he,bn(he),(e,t)=>{let n=1;for(const r of t)n*=r.evaluate(e);return n}],"-":{type:he,overloads:[[[he,he],(e,[t,n])=>t.evaluate(e)-n.evaluate(e)],[[he],(e,[t])=>-t.evaluate(e)]]},"/":[he,[he,he],(e,[t,n])=>t.evaluate(e)/n.evaluate(e)],"%":[he,[he,he],(e,[t,n])=>t.evaluate(e)%n.evaluate(e)],ln2:[he,[],()=>Math.LN2],pi:[he,[],()=>Math.PI],e:[he,[],()=>Math.E],"^":[he,[he,he],(e,[t,n])=>Math.pow(t.evaluate(e),n.evaluate(e))],sqrt:[he,[he],(e,[t])=>Math.sqrt(t.evaluate(e))],log10:[he,[he],(e,[t])=>Math.log(t.evaluate(e))/Math.LN10],ln:[he,[he],(e,[t])=>Math.log(t.evaluate(e))],log2:[he,[he],(e,[t])=>Math.log(t.evaluate(e))/Math.LN2],sin:[he,[he],(e,[t])=>Math.sin(t.evaluate(e))],cos:[he,[he],(e,[t])=>Math.cos(t.evaluate(e))],tan:[he,[he],(e,[t])=>Math.tan(t.evaluate(e))],asin:[he,[he],(e,[t])=>Math.asin(t.evaluate(e))],acos:[he,[he],(e,[t])=>Math.acos(t.evaluate(e))],atan:[he,[he],(e,[t])=>Math.atan(t.evaluate(e))],min:[he,bn(he),(e,t)=>Math.min(...t.map((t=>t.evaluate(e))))],max:[he,bn(he),(e,t)=>Math.max(...t.map((t=>t.evaluate(e))))],abs:[he,[he],(e,[t])=>Math.abs(t.evaluate(e))],round:[he,[he],(e,[t])=>{const n=t.evaluate(e);return n<0?-Math.round(-n):Math.round(n)}],floor:[he,[he],(e,[t])=>Math.floor(t.evaluate(e))],ceil:[he,[he],(e,[t])=>Math.ceil(t.evaluate(e))],"filter-==":[me,[pe,_e],(e,[t,n])=>e.properties()[t.value]===n.value],"filter-id-==":[me,[_e],(e,[t])=>e.id()===t.value],"filter-type-==":[me,[pe],(e,[t])=>e.geometryType()===t.value],"filter-<":[me,[pe,_e],(e,[t,n])=>{const r=e.properties()[t.value],i=n.value;return typeof r==typeof i&&r<i}],"filter-id-<":[me,[_e],(e,[t])=>{const n=e.id(),r=t.value;return typeof n==typeof r&&n<r}],"filter->":[me,[pe,_e],(e,[t,n])=>{const r=e.properties()[t.value],i=n.value;return typeof r==typeof i&&r>i}],"filter-id->":[me,[_e],(e,[t])=>{const n=e.id(),r=t.value;return typeof n==typeof r&&n>r}],"filter-<=":[me,[pe,_e],(e,[t,n])=>{const r=e.properties()[t.value],i=n.value;return typeof r==typeof i&&r<=i}],"filter-id-<=":[me,[_e],(e,[t])=>{const n=e.id(),r=t.value;return typeof n==typeof r&&n<=r}],"filter->=":[me,[pe,_e],(e,[t,n])=>{const r=e.properties()[t.value],i=n.value;return typeof r==typeof i&&r>=i}],"filter-id->=":[me,[_e],(e,[t])=>{const n=e.id(),r=t.value;return typeof n==typeof r&&n>=r}],"filter-has":[me,[_e],(e,[t])=>t.value in e.properties()],"filter-has-id":[me,[],e=>null!==e.id()&&void 0!==e.id()],"filter-type-in":[me,[Se(pe)],(e,[t])=>t.value.indexOf(e.geometryType())>=0],"filter-id-in":[me,[Se(_e)],(e,[t])=>t.value.indexOf(e.id())>=0],"filter-in-small":[me,[pe,Se(_e)],(e,[t,n])=>n.value.indexOf(e.properties()[t.value])>=0],"filter-in-large":[me,[pe,Se(_e)],(e,[t,n])=>function(e,t,n,r){for(;n<=r;){const i=n+r>>1;if(t[i]===e)return!0;t[i]>e?r=i-1:n=i+1}return!1}(e.properties()[t.value],n.value,0,n.value.length-1)],all:{type:me,overloads:[[[me,me],(e,[t,n])=>t.evaluate(e)&&n.evaluate(e)],[bn(me),(e,t)=>{for(const n of t)if(!n.evaluate(e))return!1;return!0}]]},any:{type:me,overloads:[[[me,me],(e,[t,n])=>t.evaluate(e)||n.evaluate(e)],[bn(me),(e,t)=>{for(const n of t)if(n.evaluate(e))return!0;return!1}]]},"!":[me,[me],(e,[t])=>!t.evaluate(e)],"is-supported-script":[me,[pe],(e,[t])=>{const n=e.globals&&e.globals.isSupportedScript;return!n||n(t.evaluate(e))}],upcase:[pe,[pe],(e,[t])=>t.evaluate(e).toUpperCase()],downcase:[pe,[pe],(e,[t])=>t.evaluate(e).toLowerCase()],concat:[pe,bn(_e),(e,t)=>t.map((t=>He(t.evaluate(e)))).join("")],"resolved-locale":[pe,[be],(e,[t])=>t.evaluate(e).resolvedLocale()]});class Rn{constructor(e,t){this.expression=e,this._warningHistory={},this._evaluator=new Xe,this._defaultValue=t?function(e){return"color"===e.type&&Cn(e.default)?new Ne(0,0,0,0):"color"===e.type?Ne.parse(e.default)||null:"padding"===e.type?Be.parse(e.default)||null:void 0===e.default?null:e.default}(t):null,this._enumValues=t&&"enum"===t.type?t.values:null}evaluateWithoutErrorHandling(e,t,n,r,i,o){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=n,this._evaluator.canonical=r,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o,this.expression.evaluate(this._evaluator)}evaluate(e,t,n,r,i,o){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=n||null,this._evaluator.canonical=r,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o||null;try{const e=this.expression.evaluate(this._evaluator);if(null==e||"number"==typeof e&&e!=e)return this._defaultValue;if(this._enumValues&&!(e in this._enumValues))throw new Ve(`Expected value to be one of ${Object.keys(this._enumValues).map((e=>JSON.stringify(e))).join(", ")}, but found ${JSON.stringify(e)} instead.`);return e}catch(e){return this._warningHistory[e.message]||(this._warningHistory[e.message]=!0,"undefined"!=typeof console&&console.warn(e.message)),this._defaultValue}}}function Nn(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&e[0]in mn}function Mn(e,t){const n=new Et(mn,[],t?function(e){const t={color:ge,string:pe,number:he,enum:pe,boolean:me,formatted:ve,padding:ye,resolvedImage:Ee};return"array"===e.type?Se(t[e.value]||_e,e.length):t[e.type]}(t):void 0),r=n.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return r?vn(new Rn(r,t)):yn(n.errors)}class Pn{constructor(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!bt(t.expression)}evaluateWithoutErrorHandling(e,t,n,r,i,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,n,r,i,o)}evaluate(e,t,n,r,i,o){return this._styleExpression.evaluate(e,t,n,r,i,o)}}class Ln{constructor(e,t,n,r){this.kind=e,this.zoomStops=n,this._styleExpression=t,this.isStateDependent="camera"!==e&&!bt(t.expression),this.interpolationType=r}evaluateWithoutErrorHandling(e,t,n,r,i,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,n,r,i,o)}evaluate(e,t,n,r,i,o){return this._styleExpression.evaluate(e,t,n,r,i,o)}interpolationFactor(e,t,n){return this.interpolationType?qt.interpolationFactor(this.interpolationType,e,t,n):0}}function Bn(e,t){const n=Mn(e,t);if("error"===n.result)return n;const r=n.value.expression,i=_t(r);if(!i&&!En(t))return yn([new ce("","data expressions not supported")]);const o=vt(r,["zoom"]);if(!o&&!Sn(t))return yn([new ce("","zoom expressions not supported")]);const a=jn(r);return a||o?a instanceof ce?yn([a]):a instanceof qt&&!wn(t)?yn([new ce("",'"interpolate" expressions cannot be used with this property')]):vn(a?new Ln(i?"camera":"composite",n.value,a.labels,a instanceof qt?a.interpolation:void 0):new Pn(i?"constant":"source",n.value)):yn([new ce("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Un{constructor(e,t){this._parameters=e,this._specification=t,ae(this,Fn(this._parameters,this._specification))}static deserialize(e){return new Un(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function jn(e){let t=null;if(e instanceof Kt)t=jn(e.result);else if(e instanceof $t){for(const n of e.args)if(t=jn(n),t)break}else(e instanceof Tt||e instanceof qt)&&e.input instanceof Ze&&"zoom"===e.input.name&&(t=e);return t instanceof ce||e.eachChild((e=>{const n=jn(e);n instanceof ce?t=n:!t&&n?t=new ce("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&n&&t!==n&&(t=new ce("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),t}function Gn(e){const t=e.key,n=e.value,r=e.valueSpec||{},i=e.objectElementValidators||{},o=e.style,a=e.styleSpec;let s=[];const l=Tn(n);if("object"!==l)return[new ie(t,n,`object expected, ${l} found`)];for(const e in n){const l=e.split(".")[0],c=r[l]||r["*"];let u;if(i[l])u=i[l];else if(r[l])u=gr;else if(i["*"])u=i["*"];else{if(!r["*"]){s.push(new ie(t,n[e],`unknown property "${e}"`));continue}u=gr}s=s.concat(u({key:(t?`${t}.`:t)+e,value:n[e],valueSpec:c,style:o,styleSpec:a,object:n,objectKey:e},n))}for(const e in r)i[e]||r[e].required&&void 0===r[e].default&&void 0===n[e]&&s.push(new ie(t,n,`missing required property "${e}"`));return s}function zn(e){const t=e.value,n=e.valueSpec,r=e.style,i=e.styleSpec,o=e.key,a=e.arrayElementValidator||gr;if("array"!==Tn(t))return[new ie(o,t,`array expected, ${Tn(t)} found`)];if(n.length&&t.length!==n.length)return[new ie(o,t,`array length ${n.length} expected, length ${t.length} found`)];if(n["min-length"]&&t.length<n["min-length"])return[new ie(o,t,`array length at least ${n["min-length"]} expected, length ${t.length} found`)];let s={type:n.value,values:n.values};i.$version<7&&(s.function=n.function),"object"===Tn(n.value)&&(s=n.value);let l=[];for(let e=0;e<t.length;e++)l=l.concat(a({array:t,arrayIndex:e,value:t[e],valueSpec:s,style:r,styleSpec:i,key:`${o}[${e}]`}));return l}function Hn(e){const t=e.key,n=e.value,r=e.valueSpec;let i=Tn(n);return"number"===i&&n!=n&&(i="NaN"),"number"!==i?[new ie(t,n,`number expected, ${i} found`)]:"minimum"in r&&n<r.minimum?[new ie(t,n,`${n} is less than the minimum value ${r.minimum}`)]:"maximum"in r&&n>r.maximum?[new ie(t,n,`${n} is greater than the maximum value ${r.maximum}`)]:[]}function qn(e){const t=e.valueSpec,n=se(e.value.type);let r,i,o,a={};const s="categorical"!==n&&void 0===e.value.property,l=!s,c="array"===Tn(e.value.stops)&&"array"===Tn(e.value.stops[0])&&"object"===Tn(e.value.stops[0][0]),u=Gn({key:e.key,value:e.value,valueSpec:e.styleSpec.function,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:function(e){if("identity"===n)return[new ie(e.key,e.value,'identity function may not have a "stops" property')];let t=[];const r=e.value;return t=t.concat(zn({key:e.key,value:r,valueSpec:e.valueSpec,style:e.style,styleSpec:e.styleSpec,arrayElementValidator:d})),"array"===Tn(r)&&0===r.length&&t.push(new ie(e.key,r,"array must have at least one stop")),t},default:function(e){return gr({key:e.key,value:e.value,valueSpec:t,style:e.style,styleSpec:e.styleSpec})}}});return"identity"===n&&s&&u.push(new ie(e.key,e.value,'missing required property "property"')),"identity"===n||e.value.stops||u.push(new ie(e.key,e.value,'missing required property "stops"')),"exponential"===n&&e.valueSpec.expression&&!wn(e.valueSpec)&&u.push(new ie(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(l&&!En(e.valueSpec)?u.push(new ie(e.key,e.value,"property functions not supported")):s&&!Sn(e.valueSpec)&&u.push(new ie(e.key,e.value,"zoom functions not supported"))),"categorical"!==n&&!c||void 0!==e.value.property||u.push(new ie(e.key,e.value,'"property" property is required')),u;function d(e){let n=[];const r=e.value,s=e.key;if("array"!==Tn(r))return[new ie(s,r,`array expected, ${Tn(r)} found`)];if(2!==r.length)return[new ie(s,r,`array length 2 expected, length ${r.length} found`)];if(c){if("object"!==Tn(r[0]))return[new ie(s,r,`object expected, ${Tn(r[0])} found`)];if(void 0===r[0].zoom)return[new ie(s,r,"object stop key must have zoom")];if(void 0===r[0].value)return[new ie(s,r,"object stop key must have value")];if(o&&o>se(r[0].zoom))return[new ie(s,r[0].zoom,"stop zoom values must appear in ascending order")];se(r[0].zoom)!==o&&(o=se(r[0].zoom),i=void 0,a={}),n=n.concat(Gn({key:`${s}[0]`,value:r[0],valueSpec:{zoom:{}},style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:Hn,value:h}}))}else n=n.concat(h({key:`${s}[0]`,value:r[0],valueSpec:{},style:e.style,styleSpec:e.styleSpec},r));return Nn(le(r[1]))?n.concat([new ie(`${s}[1]`,r[1],"expressions are not allowed in function stops.")]):n.concat(gr({key:`${s}[1]`,value:r[1],valueSpec:t,style:e.style,styleSpec:e.styleSpec}))}function h(e,o){const s=Tn(e.value),l=se(e.value),c=null!==e.value?e.value:o;if(r){if(s!==r)return[new ie(e.key,c,`${s} stop domain type must match previous stop domain type ${r}`)]}else r=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new ie(e.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==n){let r=`number expected, ${s} found`;return En(t)&&void 0===n&&(r+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new ie(e.key,c,r)]}return"categorical"!==n||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==n&&"number"===s&&void 0!==i&&l<i?[new ie(e.key,c,"stop domain values must appear in ascending order")]:(i=l,"categorical"===n&&l in a?[new ie(e.key,c,"stop domain values must be unique")]:(a[l]=!0,[])):[new ie(e.key,c,`integer expected, found ${l}`)]}}function Vn(e){const t=("property"===e.expressionContext?Bn:Mn)(le(e.value),e.valueSpec);if("error"===t.result)return t.value.map((t=>new ie(`${e.key}${t.key}`,e.value,t.message)));const n=t.value.expression||t.value._styleExpression.expression;if("property"===e.expressionContext&&"text-font"===e.propertyKey&&!n.outputDefined())return[new ie(e.key,e.value,`Invalid data expression for "${e.propertyKey}". Output values must be contained as literals within the expression.`)];if("property"===e.expressionContext&&"layout"===e.propertyType&&!bt(n))return[new ie(e.key,e.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===e.expressionContext&&!bt(n))return[new ie(e.key,e.value,'"feature-state" data expressions are not supported with filters.')];if(e.expressionContext&&0===e.expressionContext.indexOf("cluster")){if(!vt(n,["zoom","feature-state"]))return[new ie(e.key,e.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===e.expressionContext&&!_t(n))return[new ie(e.key,e.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function $n(e){const t=e.key,n=e.value,r=e.valueSpec,i=[];return Array.isArray(r.values)?-1===r.values.indexOf(se(n))&&i.push(new ie(t,n,`expected one of [${r.values.join(", ")}], ${JSON.stringify(n)} found`)):-1===Object.keys(r.values).indexOf(se(n))&&i.push(new ie(t,n,`expected one of [${Object.keys(r.values).join(", ")}], ${JSON.stringify(n)} found`)),i}function Kn(e){if(!0===e||!1===e)return!0;if(!Array.isArray(e)||0===e.length)return!1;switch(e[0]){case"has":return e.length>=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&("string"!=typeof e[1]||Array.isArray(e[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(const t of e.slice(1))if(!Kn(t)&&"boolean"!=typeof t)return!1;return!0;default:return!0}}const Wn={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Yn(e){if(null==e)return{filter:()=>!0,needGeometry:!1};Kn(e)||(e=Zn(e));const t=Mn(e,Wn);if("error"===t.result)throw new Error(t.value.map((e=>`${e.key}: ${e.message}`)).join(", "));return{filter:(e,n,r)=>t.value.evaluate(e,n,{},r),needGeometry:Xn(e)}}function Qn(e,t){return e<t?-1:e>t?1:0}function Xn(e){if(!Array.isArray(e))return!1;if("within"===e[0])return!0;for(let t=1;t<e.length;t++)if(Xn(e[t]))return!0;return!1}function Zn(e){if(!e)return!0;const t=e[0];return e.length<=1?"any"!==t:"=="===t?Jn(e[1],e[2],"=="):"!="===t?nr(Jn(e[1],e[2],"==")):"<"===t||">"===t||"<="===t||">="===t?Jn(e[1],e[2],t):"any"===t?(n=e.slice(1),["any"].concat(n.map(Zn))):"all"===t?["all"].concat(e.slice(1).map(Zn)):"none"===t?["all"].concat(e.slice(1).map(Zn).map(nr)):"in"===t?er(e[1],e.slice(2)):"!in"===t?nr(er(e[1],e.slice(2))):"has"===t?tr(e[1]):"!has"===t?nr(tr(e[1])):"within"!==t||e;var n}function Jn(e,t,n){switch(e){case"$type":return[`filter-type-${n}`,t];case"$id":return[`filter-id-${n}`,t];default:return[`filter-${n}`,e,t]}}function er(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((e=>typeof e!=typeof t[0]))?["filter-in-large",e,["literal",t.sort(Qn)]]:["filter-in-small",e,["literal",t]]}}function tr(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function nr(e){return["!",e]}function rr(e){return Kn(le(e.value))?Vn(ae({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}})):ir(e)}function ir(e){const t=e.value,n=e.key;if("array"!==Tn(t))return[new ie(n,t,`array expected, ${Tn(t)} found`)];const r=e.styleSpec;let i,o=[];if(t.length<1)return[new ie(n,t,"filter array must have at least 1 element")];switch(o=o.concat($n({key:`${n}[0]`,value:t[0],valueSpec:r.filter_operator,style:e.style,styleSpec:e.styleSpec})),se(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&"$type"===se(t[1])&&o.push(new ie(n,t,`"$type" cannot be use with operator "${t[0]}"`));case"==":case"!=":3!==t.length&&o.push(new ie(n,t,`filter array for operator "${t[0]}" must have 3 elements`));case"in":case"!in":t.length>=2&&(i=Tn(t[1]),"string"!==i&&o.push(new ie(`${n}[1]`,t[1],`string expected, ${i} found`)));for(let a=2;a<t.length;a++)i=Tn(t[a]),"$type"===se(t[1])?o=o.concat($n({key:`${n}[${a}]`,value:t[a],valueSpec:r.geometry_type,style:e.style,styleSpec:e.styleSpec})):"string"!==i&&"number"!==i&&"boolean"!==i&&o.push(new ie(`${n}[${a}]`,t[a],`string, number, or boolean expected, ${i} found`));break;case"any":case"all":case"none":for(let r=1;r<t.length;r++)o=o.concat(ir({key:`${n}[${r}]`,value:t[r],style:e.style,styleSpec:e.styleSpec}));break;case"has":case"!has":i=Tn(t[1]),2!==t.length?o.push(new ie(n,t,`filter array for "${t[0]}" operator must have 2 elements`)):"string"!==i&&o.push(new ie(`${n}[1]`,t[1],`string expected, ${i} found`));break;case"within":i=Tn(t[1]),2!==t.length?o.push(new ie(n,t,`filter array for "${t[0]}" operator must have 2 elements`)):"object"!==i&&o.push(new ie(`${n}[1]`,t[1],`object expected, ${i} found`))}return o}function or(e,t){const n=e.key,r=e.style,i=e.styleSpec,o=e.value,a=e.objectKey,s=i[`${t}_${e.layerType}`];if(!s)return[];const l=a.match(/^(.*)-transition$/);if("paint"===t&&l&&s[l[1]]&&s[l[1]].transition)return gr({key:n,value:o,valueSpec:i.transition,style:r,styleSpec:i});const c=e.valueSpec||s[a];if(!c)return[new ie(n,o,`unknown property "${a}"`)];let u;if("string"===Tn(o)&&En(c)&&!c.tokens&&(u=/^{([^}]+)}$/.exec(o)))return[new ie(n,o,`"${a}" does not support interpolation syntax\nUse an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(u[1])} }\`.`)];const d=[];return"symbol"===e.layerType&&("text-field"===a&&r&&!r.glyphs&&d.push(new ie(n,o,'use of "text-field" requires a style "glyphs" property')),"text-font"===a&&Cn(le(o))&&"identity"===se(o.type)&&d.push(new ie(n,o,'"text-font" does not support identity functions'))),d.concat(gr({key:e.key,value:o,valueSpec:c,style:r,styleSpec:i,expressionContext:"property",propertyType:t,propertyKey:a}))}function ar(e){return or(e,"paint")}function sr(e){return or(e,"layout")}function lr(e){let t=[];const n=e.value,r=e.key,i=e.style,o=e.styleSpec;n.type||n.ref||t.push(new ie(r,n,'either "type" or "ref" is required'));let a=se(n.type);const s=se(n.ref);if(n.id){const o=se(n.id);for(let a=0;a<e.arrayIndex;a++){const e=i.layers[a];se(e.id)===o&&t.push(new ie(r,n.id,`duplicate layer id "${n.id}", previously used at line ${e.id.__line__}`))}}if("ref"in n){let e;["type","source","source-layer","filter","layout"].forEach((e=>{e in n&&t.push(new ie(r,n[e],`"${e}" is prohibited for ref layers`))})),i.layers.forEach((t=>{se(t.id)===s&&(e=t)})),e?e.ref?t.push(new ie(r,n.ref,"ref cannot reference another ref layer")):a=se(e.type):t.push(new ie(r,n.ref,`ref layer "${s}" not found`))}else if("background"!==a)if(n.source){const e=i.sources&&i.sources[n.source],o=e&&se(e.type);e?"vector"===o&&"raster"===a?t.push(new ie(r,n.source,`layer "${n.id}" requires a raster source`)):"raster"===o&&"raster"!==a?t.push(new ie(r,n.source,`layer "${n.id}" requires a vector source`)):"vector"!==o||n["source-layer"]?"raster-dem"===o&&"hillshade"!==a?t.push(new ie(r,n.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==a||!n.paint||!n.paint["line-gradient"]||"geojson"===o&&e.lineMetrics||t.push(new ie(r,n,`layer "${n.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):t.push(new ie(r,n,`layer "${n.id}" must specify a "source-layer"`)):t.push(new ie(r,n.source,`source "${n.source}" not found`))}else t.push(new ie(r,n,'missing required property "source"'));return t=t.concat(Gn({key:r,value:n,valueSpec:o.layer,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{"*":()=>[],type:()=>gr({key:`${r}.type`,value:n.type,valueSpec:o.layer.type,style:e.style,styleSpec:e.styleSpec,object:n,objectKey:"type"}),filter:rr,layout:e=>Gn({layer:n,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{"*":e=>sr(ae({layerType:a},e))}}),paint:e=>Gn({layer:n,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{"*":e=>ar(ae({layerType:a},e))}})}})),t}function cr(e){const t=e.value,n=e.key,r=Tn(t);return"string"!==r?[new ie(n,t,`string expected, ${r} found`)]:[]}const ur={promoteId:function({key:e,value:t}){if("string"===Tn(t))return cr({key:e,value:t});{const n=[];for(const r in t)n.push(...cr({key:`${e}.${r}`,value:t[r]}));return n}}};function dr(e){const t=e.value,n=e.key,r=e.styleSpec,i=e.style;if(!t.type)return[new ie(n,t,'"type" is required')];const o=se(t.type);let a;switch(o){case"vector":case"raster":case"raster-dem":return a=Gn({key:n,value:t,valueSpec:r[`source_${o.replace("-","_")}`],style:e.style,styleSpec:r,objectElementValidators:ur}),a;case"geojson":if(a=Gn({key:n,value:t,valueSpec:r.source_geojson,style:i,styleSpec:r,objectElementValidators:ur}),t.cluster)for(const e in t.clusterProperties){const[r,i]=t.clusterProperties[e],o="string"==typeof r?[r,["accumulated"],["get",e]]:r;a.push(...Vn({key:`${n}.${e}.map`,value:i,expressionContext:"cluster-map"})),a.push(...Vn({key:`${n}.${e}.reduce`,value:o,expressionContext:"cluster-reduce"}))}return a;case"video":return Gn({key:n,value:t,valueSpec:r.source_video,style:i,styleSpec:r});case"image":return Gn({key:n,value:t,valueSpec:r.source_image,style:i,styleSpec:r});case"canvas":return[new ie(n,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return $n({key:`${n}.type`,value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:i,styleSpec:r})}}function hr(e){const t=e.value,n=e.styleSpec,r=n.light,i=e.style;let o=[];const a=Tn(t);if(void 0===t)return o;if("object"!==a)return o=o.concat([new ie("light",t,`object expected, ${a} found`)]),o;for(const e in t){const a=e.match(/^(.*)-transition$/);o=o.concat(a&&r[a[1]]&&r[a[1]].transition?gr({key:e,value:t[e],valueSpec:n.transition,style:i,styleSpec:n}):r[e]?gr({key:e,value:t[e],valueSpec:r[e],style:i,styleSpec:n}):[new ie(e,t[e],`unknown property "${e}"`)])}return o}function pr(e){const t=e.value,n=e.styleSpec,r=n.terrain,i=e.style;let o=[];const a=Tn(t);if(void 0===t)return o;if("object"!==a)return o=o.concat([new ie("terrain",t,`object expected, ${a} found`)]),o;for(const e in t)o=o.concat(r[e]?gr({key:e,value:t[e],valueSpec:r[e],style:i,styleSpec:n}):[new ie(e,t[e],`unknown property "${e}"`)]);return o}const mr={"*":()=>[],array:zn,boolean:function(e){const t=e.value,n=e.key,r=Tn(t);return"boolean"!==r?[new ie(n,t,`boolean expected, ${r} found`)]:[]},number:Hn,color:function(e){const t=e.key,n=e.value,r=Tn(n);return"string"!==r?[new ie(t,n,`color expected, ${r} found`)]:null===De(n)?[new ie(t,n,`color expected, "${n}" found`)]:[]},constants:oe,enum:$n,filter:rr,function:qn,layer:lr,object:Gn,source:dr,light:hr,terrain:pr,string:cr,formatted:function(e){return 0===cr(e).length?[]:Vn(e)},resolvedImage:function(e){return 0===cr(e).length?[]:Vn(e)},padding:function(e){const t=e.key,n=e.value;if("array"===Tn(n)){if(n.length<1||n.length>4)return[new ie(t,n,`padding requires 1 to 4 values; ${n.length} values found`)];const e={type:"number"};let r=[];for(let i=0;i<n.length;i++)r=r.concat(gr({key:`${t}[${i}]`,value:n[i],valueSpec:e}));return r}return Hn({key:t,value:n,valueSpec:{}})}};function gr(e){const t=e.value,n=e.valueSpec,r=e.styleSpec;return n.expression&&Cn(se(t))?qn(e):n.expression&&Nn(le(t))?Vn(e):n.type&&mr[n.type]?mr[n.type](e):Gn(ae({},e,{valueSpec:n.type?r[n.type]:n}))}function fr(e){const t=e.value,n=e.key,r=cr(e);return r.length||(-1===t.indexOf("{fontstack}")&&r.push(new ie(n,t,'"glyphs" url must include a "{fontstack}" token')),-1===t.indexOf("{range}")&&r.push(new ie(n,t,'"glyphs" url must include a "{range}" token'))),r}function _r(e,t=re){let n=[];return n=n.concat(gr({key:"",value:e,valueSpec:t.$root,styleSpec:t,style:e,objectElementValidators:{glyphs:fr,"*":()=>[]}})),e.constants&&(n=n.concat(oe({key:"constants",value:e.constants,style:e,styleSpec:t}))),br(n)}function br(e){return[].concat(e).sort(((e,t)=>e.line-t.line))}function vr(e){return function(...t){return br(e.apply(this,t))}}_r.source=vr(dr),_r.light=vr(hr),_r.terrain=vr(pr),_r.layer=vr(lr),_r.filter=vr(rr),_r.paintProperty=vr(ar),_r.layoutProperty=vr(sr);const yr=_r,Er=yr.light,Sr=yr.paintProperty,wr=yr.layoutProperty;function Tr(e,t){let n=!1;if(t&&t.length)for(const r of t)e.fire(new te(new Error(r.message))),n=!0;return n}class Cr{constructor(e,t,n){const r=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;const i=new Int32Array(this.arrayBuffer);e=i[0],this.d=(t=i[1])+2*(n=i[2]);for(let e=0;e<this.d*this.d;e++){const t=i[3+e],n=i[3+e+1];r.push(t===n?null:i.subarray(t,n))}const o=i[3+r.length+1];this.keys=i.subarray(i[3+r.length],o),this.bboxes=i.subarray(o),this.insert=this._insertReadonly}else{this.d=t+2*n;for(let e=0;e<this.d*this.d;e++)r.push([]);this.keys=[],this.bboxes=[]}this.n=t,this.extent=e,this.padding=n,this.scale=t/e,this.uid=0;const i=n/t*e;this.min=-i,this.max=e+i}insert(e,t,n,r,i){this._forEachCell(t,n,r,i,this._insertCell,this.uid++,void 0,void 0),this.keys.push(e),this.bboxes.push(t),this.bboxes.push(n),this.bboxes.push(r),this.bboxes.push(i)}_insertReadonly(){throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(e,t,n,r,i,o){this.cells[i].push(o)}query(e,t,n,r,i){const o=this.min,a=this.max;if(e<=o&&t<=o&&a<=n&&a<=r&&!i)return Array.prototype.slice.call(this.keys);{const o=[];return this._forEachCell(e,t,n,r,this._queryCell,o,{},i),o}}_queryCell(e,t,n,r,i,o,a,s){const l=this.cells[i];if(null!==l){const i=this.keys,c=this.bboxes;for(let u=0;u<l.length;u++){const d=l[u];if(void 0===a[d]){const l=4*d;(s?s(c[l+0],c[l+1],c[l+2],c[l+3]):e<=c[l+2]&&t<=c[l+3]&&n>=c[l+0]&&r>=c[l+1])?(a[d]=!0,o.push(i[d])):a[d]=!1}}}}_forEachCell(e,t,n,r,i,o,a,s){const l=this._convertToCellCoord(e),c=this._convertToCellCoord(t),u=this._convertToCellCoord(n),d=this._convertToCellCoord(r);for(let h=l;h<=u;h++)for(let l=c;l<=d;l++){const c=this.d*l+h;if((!s||s(this._convertFromCellCoord(h),this._convertFromCellCoord(l),this._convertFromCellCoord(h+1),this._convertFromCellCoord(l+1)))&&i.call(this,e,t,n,r,c,o,a,s))return}}_convertFromCellCoord(e){return(e-this.padding)/this.scale}_convertToCellCoord(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const e=this.cells,t=3+this.cells.length+1+1;let n=0;for(let e=0;e<this.cells.length;e++)n+=this.cells[e].length;const r=new Int32Array(t+n+this.keys.length+this.bboxes.length);r[0]=this.extent,r[1]=this.n,r[2]=this.padding;let i=t;for(let t=0;t<e.length;t++){const n=e[t];r[3+t]=i,r.set(n,i),i+=n.length}return r[3+e.length]=i,r.set(this.keys,i),i+=this.keys.length,r[3+e.length+1]=i,r.set(this.bboxes,i),i+=this.bboxes.length,r.buffer}static serialize(e,t){const n=e.toArrayBuffer();return t&&t.push(n),{buffer:n}}static deserialize(e){return new Cr(e.buffer)}}const xr={};function Fr(e,t,n={}){if(xr[e])throw new Error(`${e} is already registered.`);Object.defineProperty(t,"_classRegistryKey",{value:e,writeable:!1}),xr[e]={klass:t,omit:n.omit||[],shallow:n.shallow||[]}}Fr("Object",Object),Fr("TransferableGridIndex",Cr),Fr("Color",Ne),Fr("Error",Error),Fr("AJAXError",z),Fr("ResolvedImage",Ue),Fr("StylePropertyFunction",Un),Fr("StyleExpression",Rn,{omit:["_evaluator"]}),Fr("ZoomDependentExpression",Ln),Fr("ZoomConstantExpression",Pn),Fr("CompoundExpression",Ze,{omit:["_evaluate"]});for(const e in mn)mn[e]._classRegistryKey||Fr(`Expression_${e}`,mn[e]);function Dr(e){return e&&"undefined"!=typeof ArrayBuffer&&(e instanceof ArrayBuffer||e.constructor&&"ArrayBuffer"===e.constructor.name)}function kr(e,t){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||e instanceof Blob)return e;if(Dr(e))return t&&t.push(e),e;if(w(e))return t&&t.push(e),e;if(ArrayBuffer.isView(e)){const n=e;return t&&t.push(n.buffer),n}if(e instanceof ImageData)return t&&t.push(e.data.buffer),e;if(Array.isArray(e)){const n=[];for(const r of e)n.push(kr(r,t));return n}if("object"==typeof e){const n=e.constructor,r=n._classRegistryKey;if(!r)throw new Error("can't serialize object of unregistered class");if(!xr[r])throw new Error(`${r} is not registered.`);const i=n.serialize?n.serialize(e,t):{};if(n.serialize){if(t&&i===t[t.length-1])throw new Error("statically serialized object won't survive transfer of $name property")}else{for(const n in e){if(!e.hasOwnProperty(n))continue;if(xr[r].omit.indexOf(n)>=0)continue;const o=e[n];i[n]=xr[r].shallow.indexOf(n)>=0?o:kr(o,t)}e instanceof Error&&(i.message=e.message)}if(i.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==r&&(i.$name=r),i}throw new Error("can't serialize object of type "+typeof e)}function Or(e){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||e instanceof Blob||Dr(e)||w(e)||ArrayBuffer.isView(e)||e instanceof ImageData)return e;if(Array.isArray(e))return e.map(Or);if("object"==typeof e){const t=e.$name||"Object";if(!xr[t])throw new Error(`can't deserialize unregistered class ${t}`);const{klass:n}=xr[t];if(!n)throw new Error(`can't deserialize unregistered class ${t}`);if(n.deserialize)return n.deserialize(e);const r=Object.create(n.prototype);for(const n of Object.keys(e)){if("$name"===n)continue;const i=e[n];r[n]=xr[t].shallow.indexOf(n)>=0?i:Or(i)}return r}throw new Error("can't deserialize object of type "+typeof e)}class Ir{constructor(){this.first=!0}update(e,t){const n=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=n,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=n,!0):(this.lastFloorZoom>n?(this.lastIntegerZoom=n+1,this.lastIntegerZoomTime=t):this.lastFloorZoom<n&&(this.lastIntegerZoom=n,this.lastIntegerZoomTime=t),e!==this.lastZoom&&(this.lastZoom=e,this.lastFloorZoom=n,!0))}}const Ar={"Latin-1 Supplement":e=>e>=128&&e<=255,Arabic:e=>e>=1536&&e<=1791,"Arabic Supplement":e=>e>=1872&&e<=1919,"Arabic Extended-A":e=>e>=2208&&e<=2303,"Hangul Jamo":e=>e>=4352&&e<=4607,"Unified Canadian Aboriginal Syllabics":e=>e>=5120&&e<=5759,Khmer:e=>e>=6016&&e<=6143,"Unified Canadian Aboriginal Syllabics Extended":e=>e>=6320&&e<=6399,"General Punctuation":e=>e>=8192&&e<=8303,"Letterlike Symbols":e=>e>=8448&&e<=8527,"Number Forms":e=>e>=8528&&e<=8591,"Miscellaneous Technical":e=>e>=8960&&e<=9215,"Control Pictures":e=>e>=9216&&e<=9279,"Optical Character Recognition":e=>e>=9280&&e<=9311,"Enclosed Alphanumerics":e=>e>=9312&&e<=9471,"Geometric Shapes":e=>e>=9632&&e<=9727,"Miscellaneous Symbols":e=>e>=9728&&e<=9983,"Miscellaneous Symbols and Arrows":e=>e>=11008&&e<=11263,"CJK Radicals Supplement":e=>e>=11904&&e<=12031,"Kangxi Radicals":e=>e>=12032&&e<=12255,"Ideographic Description Characters":e=>e>=12272&&e<=12287,"CJK Symbols and Punctuation":e=>e>=12288&&e<=12351,Hiragana:e=>e>=12352&&e<=12447,Katakana:e=>e>=12448&&e<=12543,Bopomofo:e=>e>=12544&&e<=12591,"Hangul Compatibility Jamo":e=>e>=12592&&e<=12687,Kanbun:e=>e>=12688&&e<=12703,"Bopomofo Extended":e=>e>=12704&&e<=12735,"CJK Strokes":e=>e>=12736&&e<=12783,"Katakana Phonetic Extensions":e=>e>=12784&&e<=12799,"Enclosed CJK Letters and Months":e=>e>=12800&&e<=13055,"CJK Compatibility":e=>e>=13056&&e<=13311,"CJK Unified Ideographs Extension A":e=>e>=13312&&e<=19903,"Yijing Hexagram Symbols":e=>e>=19904&&e<=19967,"CJK Unified Ideographs":e=>e>=19968&&e<=40959,"Yi Syllables":e=>e>=40960&&e<=42127,"Yi Radicals":e=>e>=42128&&e<=42191,"Hangul Jamo Extended-A":e=>e>=43360&&e<=43391,"Hangul Syllables":e=>e>=44032&&e<=55215,"Hangul Jamo Extended-B":e=>e>=55216&&e<=55295,"Private Use Area":e=>e>=57344&&e<=63743,"CJK Compatibility Ideographs":e=>e>=63744&&e<=64255,"Arabic Presentation Forms-A":e=>e>=64336&&e<=65023,"Vertical Forms":e=>e>=65040&&e<=65055,"CJK Compatibility Forms":e=>e>=65072&&e<=65103,"Small Form Variants":e=>e>=65104&&e<=65135,"Arabic Presentation Forms-B":e=>e>=65136&&e<=65279,"Halfwidth and Fullwidth Forms":e=>e>=65280&&e<=65519};function Rr(e){for(const t of e)if(Pr(t.charCodeAt(0)))return!0;return!1}function Nr(e){for(const t of e)if(!Mr(t.charCodeAt(0)))return!1;return!0}function Mr(e){return!(Ar.Arabic(e)||Ar["Arabic Supplement"](e)||Ar["Arabic Extended-A"](e)||Ar["Arabic Presentation Forms-A"](e)||Ar["Arabic Presentation Forms-B"](e))}function Pr(e){return!(746!==e&&747!==e&&(e<4352||!(Ar["Bopomofo Extended"](e)||Ar.Bopomofo(e)||Ar["CJK Compatibility Forms"](e)&&!(e>=65097&&e<=65103)||Ar["CJK Compatibility Ideographs"](e)||Ar["CJK Compatibility"](e)||Ar["CJK Radicals Supplement"](e)||Ar["CJK Strokes"](e)||!(!Ar["CJK Symbols and Punctuation"](e)||e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||Ar["CJK Unified Ideographs Extension A"](e)||Ar["CJK Unified Ideographs"](e)||Ar["Enclosed CJK Letters and Months"](e)||Ar["Hangul Compatibility Jamo"](e)||Ar["Hangul Jamo Extended-A"](e)||Ar["Hangul Jamo Extended-B"](e)||Ar["Hangul Jamo"](e)||Ar["Hangul Syllables"](e)||Ar.Hiragana(e)||Ar["Ideographic Description Characters"](e)||Ar.Kanbun(e)||Ar["Kangxi Radicals"](e)||Ar["Katakana Phonetic Extensions"](e)||Ar.Katakana(e)&&12540!==e||!(!Ar["Halfwidth and Fullwidth Forms"](e)||65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||!(!Ar["Small Form Variants"](e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||Ar["Unified Canadian Aboriginal Syllabics"](e)||Ar["Unified Canadian Aboriginal Syllabics Extended"](e)||Ar["Vertical Forms"](e)||Ar["Yijing Hexagram Symbols"](e)||Ar["Yi Syllables"](e)||Ar["Yi Radicals"](e))))}function Lr(e){return!(Pr(e)||function(e){return!!(Ar["Latin-1 Supplement"](e)&&(167===e||169===e||174===e||177===e||188===e||189===e||190===e||215===e||247===e)||Ar["General Punctuation"](e)&&(8214===e||8224===e||8225===e||8240===e||8241===e||8251===e||8252===e||8258===e||8263===e||8264===e||8265===e||8273===e)||Ar["Letterlike Symbols"](e)||Ar["Number Forms"](e)||Ar["Miscellaneous Technical"](e)&&(e>=8960&&e<=8967||e>=8972&&e<=8991||e>=8996&&e<=9e3||9003===e||e>=9085&&e<=9114||e>=9150&&e<=9165||9167===e||e>=9169&&e<=9179||e>=9186&&e<=9215)||Ar["Control Pictures"](e)&&9251!==e||Ar["Optical Character Recognition"](e)||Ar["Enclosed Alphanumerics"](e)||Ar["Geometric Shapes"](e)||Ar["Miscellaneous Symbols"](e)&&!(e>=9754&&e<=9759)||Ar["Miscellaneous Symbols and Arrows"](e)&&(e>=11026&&e<=11055||e>=11088&&e<=11097||e>=11192&&e<=11243)||Ar["CJK Symbols and Punctuation"](e)||Ar.Katakana(e)||Ar["Private Use Area"](e)||Ar["CJK Compatibility Forms"](e)||Ar["Small Form Variants"](e)||Ar["Halfwidth and Fullwidth Forms"](e)||8734===e||8756===e||8757===e||e>=9984&&e<=10087||e>=10102&&e<=10131||65532===e||65533===e)}(e))}function Br(e){return e>=1424&&e<=2303||Ar["Arabic Presentation Forms-A"](e)||Ar["Arabic Presentation Forms-B"](e)}function Ur(e,t){return!(!t&&Br(e)||e>=2304&&e<=3583||e>=3840&&e<=4255||Ar.Khmer(e))}function jr(e){for(const t of e)if(Br(t.charCodeAt(0)))return!0;return!1}const Gr="deferred",zr="loading",Hr="loaded";let qr=null,Vr="unavailable",$r=null;const Kr=function(e){e&&"string"==typeof e&&e.indexOf("NetworkError")>-1&&(Vr="error"),qr&&qr(e)};function Wr(){Yr.fire(new ee("pluginStateChange",{pluginStatus:Vr,pluginURL:$r}))}const Yr=new ne,Qr=function(){return Vr},Xr=function(){if(Vr!==Gr||!$r)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Vr=zr,Wr(),$r&&$({url:$r},(e=>{e?Kr(e):(Vr=Hr,Wr())}))},Zr={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>Vr===Hr||null!=Zr.applyArabicShaping,isLoading:()=>Vr===zr,setState(e){if(!_())throw new Error("Cannot set the state of the rtl-text-plugin when not in the web-worker context");Vr=e.pluginStatus,$r=e.pluginURL},isParsed(){if(!_())throw new Error("rtl-text-plugin is only parsed on the worker-threads");return null!=Zr.applyArabicShaping&&null!=Zr.processBidirectionalText&&null!=Zr.processStyledBidirectionalText},getPluginURL(){if(!_())throw new Error("rtl-text-plugin url can only be queried from the worker threads");return $r}};class Jr{constructor(e,t){this.zoom=e,t?(this.now=t.now,this.fadeDuration=t.fadeDuration,this.zoomHistory=t.zoomHistory,this.transition=t.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Ir,this.transition={})}isSupportedScript(e){return function(e,t){for(const n of e)if(!Ur(n.charCodeAt(0),t))return!1;return!0}(e,Zr.isLoaded())}crossFadingFactor(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const e=this.zoom,t=e-Math.floor(e),n=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*n}:{fromScale:.5,toScale:1,t:1-(1-n)*t}}}class ei{constructor(e,t){this.property=e,this.value=t,this.expression=function(e,t){if(Cn(e))return new Un(e,t);if(Nn(e)){const n=Bn(e,t);if("error"===n.result)throw new Error(n.value.map((e=>`${e.key}: ${e.message}`)).join(", "));return n.value}{let n=e;return"color"===t.type&&"string"==typeof e?n=Ne.parse(e):"padding"!==t.type||"number"!=typeof e&&!Array.isArray(e)||(n=Be.parse(e)),{kind:"constant",evaluate:()=>n}}}(void 0===t?e.specification.default:t,e.specification)}isDataDriven(){return"source"===this.expression.kind||"composite"===this.expression.kind}possiblyEvaluate(e,t,n){return this.property.possiblyEvaluate(this,e,t,n)}}class ti{constructor(e){this.property=e,this.value=new ei(e,void 0)}transitioned(e,t){return new ri(this.property,this.value,t,s({},e.transition,this.transition),e.now)}untransitioned(){return new ri(this.property,this.value,null,{},0)}}class ni{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)}getValue(e){return h(this._values[e].value.value)}setValue(e,t){Object.prototype.hasOwnProperty.call(this._values,e)||(this._values[e]=new ti(this._values[e].property)),this._values[e].value=new ei(this._values[e].property,null===t?void 0:h(t))}getTransition(e){return h(this._values[e].transition)}setTransition(e,t){Object.prototype.hasOwnProperty.call(this._values,e)||(this._values[e]=new ti(this._values[e].property)),this._values[e].transition=h(t)||void 0}serialize(){const e={};for(const t of Object.keys(this._values)){const n=this.getValue(t);void 0!==n&&(e[t]=n);const r=this.getTransition(t);void 0!==r&&(e[`${t}-transition`]=r)}return e}transitioned(e,t){const n=new ii(this._properties);for(const r of Object.keys(this._values))n._values[r]=this._values[r].transitioned(e,t._values[r]);return n}untransitioned(){const e=new ii(this._properties);for(const t of Object.keys(this._values))e._values[t]=this._values[t].untransitioned();return e}}class ri{constructor(e,t,n,r,i){this.property=e,this.value=t,this.begin=i+r.delay||0,this.end=this.begin+r.duration||0,e.specification.transition&&(r.delay||r.duration)&&(this.prior=n)}possiblyEvaluate(e,t,n){const r=e.now||0,i=this.value.possiblyEvaluate(e,t,n),o=this.prior;if(o){if(r>this.end)return this.prior=null,i;if(this.value.isDataDriven())return this.prior=null,i;if(r<this.begin)return o.possiblyEvaluate(e,t,n);{const a=(r-this.begin)/(this.end-this.begin);return this.property.interpolate(o.possiblyEvaluate(e,t,n),i,function(e){if(e<=0)return 0;if(e>=1)return 1;const t=e*e,n=t*e;return 4*(e<.5?n:3*(e-t)+n-.75)}(a))}}return i}}class ii{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)}possiblyEvaluate(e,t,n){const r=new si(this._properties);for(const i of Object.keys(this._values))r._values[i]=this._values[i].possiblyEvaluate(e,t,n);return r}hasTransition(){for(const e of Object.keys(this._values))if(this._values[e].prior)return!0;return!1}}class oi{constructor(e){this._properties=e,this._values=Object.create(e.defaultPropertyValues)}getValue(e){return h(this._values[e].value)}setValue(e,t){this._values[e]=new ei(this._values[e].property,null===t?void 0:h(t))}serialize(){const e={};for(const t of Object.keys(this._values)){const n=this.getValue(t);void 0!==n&&(e[t]=n)}return e}possiblyEvaluate(e,t,n){const r=new si(this._properties);for(const i of Object.keys(this._values))r._values[i]=this._values[i].possiblyEvaluate(e,t,n);return r}}class ai{constructor(e,t,n){this.property=e,this.value=t,this.parameters=n}isConstant(){return"constant"===this.value.kind}constantOr(e){return"constant"===this.value.kind?this.value.value:e}evaluate(e,t,n,r){return this.property.evaluate(this.value,this.parameters,e,t,n,r)}}class si{constructor(e){this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)}get(e){return this._values[e]}}class li{constructor(e){this.specification=e}possiblyEvaluate(e,t){if(e.isDataDriven())throw new Error("Value should not be data driven");return e.expression.evaluate(t)}interpolate(e,t,n){const r=xt[this.specification.type];return r?r(e,t,n):e}}class ci{constructor(e,t){this.specification=e,this.overrides=t}possiblyEvaluate(e,t,n,r){return new ai(this,"constant"===e.expression.kind||"camera"===e.expression.kind?{kind:"constant",value:e.expression.evaluate(t,null,{},n,r)}:e.expression,t)}interpolate(e,t,n){if("constant"!==e.value.kind||"constant"!==t.value.kind)return e;if(void 0===e.value.value||void 0===t.value.value)return new ai(this,{kind:"constant",value:void 0},e.parameters);const r=xt[this.specification.type];return r?new ai(this,{kind:"constant",value:r(e.value.value,t.value.value,n)},e.parameters):e}evaluate(e,t,n,r,i,o){return"constant"===e.kind?e.value:e.evaluate(t,n,r,i,o)}}class ui extends ci{possiblyEvaluate(e,t,n,r){if(void 0===e.value)return new ai(this,{kind:"constant",value:void 0},t);if("constant"===e.expression.kind){const i=e.expression.evaluate(t,null,{},n,r),o="resolvedImage"===e.property.specification.type&&"string"!=typeof i?i.name:i,a=this._calculate(o,o,o,t);return new ai(this,{kind:"constant",value:a},t)}if("camera"===e.expression.kind){const n=this._calculate(e.expression.evaluate({zoom:t.zoom-1}),e.expression.evaluate({zoom:t.zoom}),e.expression.evaluate({zoom:t.zoom+1}),t);return new ai(this,{kind:"constant",value:n},t)}return new ai(this,e.expression,t)}evaluate(e,t,n,r,i,o){if("source"===e.kind){const a=e.evaluate(t,n,r,i,o);return this._calculate(a,a,a,t)}return"composite"===e.kind?this._calculate(e.evaluate({zoom:Math.floor(t.zoom)-1},n,r),e.evaluate({zoom:Math.floor(t.zoom)},n,r),e.evaluate({zoom:Math.floor(t.zoom)+1},n,r),t):e.value}_calculate(e,t,n,r){return r.zoom>r.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:n,to:t}}interpolate(e){return e}}class di{constructor(e){this.specification=e}possiblyEvaluate(e,t,n,r){if(void 0!==e.value){if("constant"===e.expression.kind){const i=e.expression.evaluate(t,null,{},n,r);return this._calculate(i,i,i,t)}return this._calculate(e.expression.evaluate(new Jr(Math.floor(t.zoom-1),t)),e.expression.evaluate(new Jr(Math.floor(t.zoom),t)),e.expression.evaluate(new Jr(Math.floor(t.zoom+1),t)),t)}}_calculate(e,t,n,r){return r.zoom>r.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:n,to:t}}interpolate(e){return e}}class hi{constructor(e){this.specification=e}possiblyEvaluate(e,t,n,r){return!!e.expression.evaluate(t,null,{},n,r)}interpolate(){return!1}}class pi{constructor(e){this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const t in e){const n=e[t];n.specification.overridable&&this.overridableProperties.push(t);const r=this.defaultPropertyValues[t]=new ei(n,void 0),i=this.defaultTransitionablePropertyValues[t]=new ti(n);this.defaultTransitioningPropertyValues[t]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=r.possiblyEvaluate({})}}}Fr("DataDrivenProperty",ci),Fr("DataConstantProperty",li),Fr("CrossFadedDataDrivenProperty",ui),Fr("CrossFadedProperty",di),Fr("ColorRampProperty",hi);const mi="-transition";class gi extends ne{constructor(e,t){if(super(),this.id=e.id,this.type=e.type,this._featureFilter={filter:()=>!0,needGeometry:!1},"custom"!==e.type&&(this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),t.layout&&(this._unevaluatedLayout=new oi(t.layout)),t.paint)){this._transitionablePaint=new ni(t.paint);for(const t in e.paint)this.setPaintProperty(t,e.paint[t],{validate:!1});for(const t in e.layout)this.setLayoutProperty(t,e.layout[t],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new si(t.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(e){return"visibility"===e?this.visibility:this._unevaluatedLayout.getValue(e)}setLayoutProperty(e,t,n={}){null!=t&&this._validate(wr,`layers.${this.id}.layout.${e}`,e,t,n)||("visibility"!==e?this._unevaluatedLayout.setValue(e,t):this.visibility=t)}getPaintProperty(e){return e.endsWith(mi)?this._transitionablePaint.getTransition(e.slice(0,-mi.length)):this._transitionablePaint.getValue(e)}setPaintProperty(e,t,n={}){if(null!=t&&this._validate(Sr,`layers.${this.id}.paint.${e}`,e,t,n))return!1;if(e.endsWith(mi))return this._transitionablePaint.setTransition(e.slice(0,-mi.length),t||void 0),!1;{const n=this._transitionablePaint._values[e],r="cross-faded-data-driven"===n.property.specification["property-type"],i=n.value.isDataDriven(),o=n.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);const a=this._transitionablePaint._values[e].value;return a.isDataDriven()||i||r||this._handleOverridablePaintPropertyUpdate(e,o,a)}}_handleSpecialPaintPropertyUpdate(e){}_handleOverridablePaintPropertyUpdate(e,t,n){return!1}isHidden(e){return!!(this.minzoom&&e<this.minzoom)||!!(this.maxzoom&&e>=this.maxzoom)||"none"===this.visibility}updateTransitions(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,void 0,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,void 0,t)}serialize(){const e={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),d(e,((e,t)=>!(void 0===e||"layout"===t&&!Object.keys(e).length||"paint"===t&&!Object.keys(e).length)))}_validate(e,t,n,r,i={}){return(!i||!1!==i.validate)&&Tr(this,e.call(yr,{key:t,layerType:this.type,objectKey:n,value:r,styleSpec:re,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const e in this.paint._values){const t=this.paint.get(e);if(t instanceof ai&&En(t.property.specification)&&("source"===t.value.kind||"composite"===t.value.kind)&&t.value.isStateDependent)return!0}return!1}}const fi={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class _i{constructor(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class bi{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}}static deserialize(e){const t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(e){this.reserve(e),this.length=e}reserve(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const t=this.uint8;this._refreshViews(),t&&this.uint8.set(t)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function vi(e,t=1){let n=0,r=0;return{members:e.map((e=>{const i=fi[e.type].BYTES_PER_ELEMENT,o=n=yi(n,Math.max(t,i)),a=e.components||1;return r=Math.max(r,i),n+=i*a,{name:e.name,type:e.type,components:a,offset:o}})),size:yi(n,Math.max(r,t)),alignment:t}}function yi(e,t){return Math.ceil(e/t)*t}class Ei extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t){const n=this.length;return this.resize(n+1),this.emplace(n,e,t)}emplace(e,t,n){const r=2*e;return this.int16[r+0]=t,this.int16[r+1]=n,e}}Ei.prototype.bytesPerElement=4,Fr("StructArrayLayout2i4",Ei);class Si extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,n,r){const i=this.length;return this.resize(i+1),this.emplace(i,e,t,n,r)}emplace(e,t,n,r,i){const o=4*e;return this.int16[o+0]=t,this.int16[o+1]=n,this.int16[o+2]=r,this.int16[o+3]=i,e}}Si.prototype.bytesPerElement=8,Fr("StructArrayLayout4i8",Si);class wi extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,n,r,i,o){const a=this.length;return this.resize(a+1),this.emplace(a,e,t,n,r,i,o)}emplace(e,t,n,r,i,o,a){const s=6*e;return this.int16[s+0]=t,this.int16[s+1]=n,this.int16[s+2]=r,this.int16[s+3]=i,this.int16[s+4]=o,this.int16[s+5]=a,e}}wi.prototype.bytesPerElement=12,Fr("StructArrayLayout2i4i12",wi);class Ti extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,n,r,i,o){const a=this.length;return this.resize(a+1),this.emplace(a,e,t,n,r,i,o)}emplace(e,t,n,r,i,o,a){const s=4*e,l=8*e;return this.int16[s+0]=t,this.int16[s+1]=n,this.uint8[l+4]=r,this.uint8[l+5]=i,this.uint8[l+6]=o,this.uint8[l+7]=a,e}}Ti.prototype.bytesPerElement=8,Fr("StructArrayLayout2i4ub8",Ti);class Ci extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t){const n=this.length;return this.resize(n+1),this.emplace(n,e,t)}emplace(e,t,n){const r=2*e;return this.float32[r+0]=t,this.float32[r+1]=n,e}}Ci.prototype.bytesPerElement=8,Fr("StructArrayLayout2f8",Ci);class xi extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,n,r,i,o,a,s,l,c){const u=this.length;return this.resize(u+1),this.emplace(u,e,t,n,r,i,o,a,s,l,c)}emplace(e,t,n,r,i,o,a,s,l,c,u){const d=10*e;return this.uint16[d+0]=t,this.uint16[d+1]=n,this.uint16[d+2]=r,this.uint16[d+3]=i,this.uint16[d+4]=o,this.uint16[d+5]=a,this.uint16[d+6]=s,this.uint16[d+7]=l,this.uint16[d+8]=c,this.uint16[d+9]=u,e}}xi.prototype.bytesPerElement=20,Fr("StructArrayLayout10ui20",xi);class Fi extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,n,r,i,o,a,s,l,c,u,d){const h=this.length;return this.resize(h+1),this.emplace(h,e,t,n,r,i,o,a,s,l,c,u,d)}emplace(e,t,n,r,i,o,a,s,l,c,u,d,h){const p=12*e;return this.int16[p+0]=t,this.int16[p+1]=n,this.int16[p+2]=r,this.int16[p+3]=i,this.uint16[p+4]=o,this.uint16[p+5]=a,this.uint16[p+6]=s,this.uint16[p+7]=l,this.int16[p+8]=c,this.int16[p+9]=u,this.int16[p+10]=d,this.int16[p+11]=h,e}}Fi.prototype.bytesPerElement=24,Fr("StructArrayLayout4i4ui4i24",Fi);class Di extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,n){const r=this.length;return this.resize(r+1),this.emplace(r,e,t,n)}emplace(e,t,n,r){const i=3*e;return this.float32[i+0]=t,this.float32[i+1]=n,this.float32[i+2]=r,e}}Di.prototype.bytesPerElement=12,Fr("StructArrayLayout3f12",Di);class ki extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(e){const t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.uint32[1*e+0]=t,e}}ki.prototype.bytesPerElement=4,Fr("StructArrayLayout1ul4",ki);class Oi extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,n,r,i,o,a,s,l){const c=this.length;return this.resize(c+1),this.emplace(c,e,t,n,r,i,o,a,s,l)}emplace(e,t,n,r,i,o,a,s,l,c){const u=10*e,d=5*e;return this.int16[u+0]=t,this.int16[u+1]=n,this.int16[u+2]=r,this.int16[u+3]=i,this.int16[u+4]=o,this.int16[u+5]=a,this.uint32[d+3]=s,this.uint16[u+8]=l,this.uint16[u+9]=c,e}}Oi.prototype.bytesPerElement=20,Fr("StructArrayLayout6i1ul2ui20",Oi);class Ii extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,n,r,i,o){const a=this.length;return this.resize(a+1),this.emplace(a,e,t,n,r,i,o)}emplace(e,t,n,r,i,o,a){const s=6*e;return this.int16[s+0]=t,this.int16[s+1]=n,this.int16[s+2]=r,this.int16[s+3]=i,this.int16[s+4]=o,this.int16[s+5]=a,e}}Ii.prototype.bytesPerElement=12,Fr("StructArrayLayout2i2i2i12",Ii);class Ai extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,n,r,i){const o=this.length;return this.resize(o+1),this.emplace(o,e,t,n,r,i)}emplace(e,t,n,r,i,o){const a=4*e,s=8*e;return this.float32[a+0]=t,this.float32[a+1]=n,this.float32[a+2]=r,this.int16[s+6]=i,this.int16[s+7]=o,e}}Ai.prototype.bytesPerElement=16,Fr("StructArrayLayout2f1f2i16",Ai);class Ri extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,n,r){const i=this.length;return this.resize(i+1),this.emplace(i,e,t,n,r)}emplace(e,t,n,r,i){const o=12*e,a=3*e;return this.uint8[o+0]=t,this.uint8[o+1]=n,this.float32[a+1]=r,this.float32[a+2]=i,e}}Ri.prototype.bytesPerElement=12,Fr("StructArrayLayout2ub2f12",Ri);class Ni extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,n){const r=this.length;return this.resize(r+1),this.emplace(r,e,t,n)}emplace(e,t,n,r){const i=3*e;return this.uint16[i+0]=t,this.uint16[i+1]=n,this.uint16[i+2]=r,e}}Ni.prototype.bytesPerElement=6,Fr("StructArrayLayout3ui6",Ni);class Mi extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,n,r,i,o,a,s,l,c,u,d,h,p,m,g,f){const _=this.length;return this.resize(_+1),this.emplace(_,e,t,n,r,i,o,a,s,l,c,u,d,h,p,m,g,f)}emplace(e,t,n,r,i,o,a,s,l,c,u,d,h,p,m,g,f,_){const b=24*e,v=12*e,y=48*e;return this.int16[b+0]=t,this.int16[b+1]=n,this.uint16[b+2]=r,this.uint16[b+3]=i,this.uint32[v+2]=o,this.uint32[v+3]=a,this.uint32[v+4]=s,this.uint16[b+10]=l,this.uint16[b+11]=c,this.uint16[b+12]=u,this.float32[v+7]=d,this.float32[v+8]=h,this.uint8[y+36]=p,this.uint8[y+37]=m,this.uint8[y+38]=g,this.uint32[v+10]=f,this.int16[b+22]=_,e}}Mi.prototype.bytesPerElement=48,Fr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Mi);class Pi extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,n,r,i,o,a,s,l,c,u,d,h,p,m,g,f,_,b,v,y,E,S,w,T,C,x,F){const D=this.length;return this.resize(D+1),this.emplace(D,e,t,n,r,i,o,a,s,l,c,u,d,h,p,m,g,f,_,b,v,y,E,S,w,T,C,x,F)}emplace(e,t,n,r,i,o,a,s,l,c,u,d,h,p,m,g,f,_,b,v,y,E,S,w,T,C,x,F,D){const k=34*e,O=17*e;return this.int16[k+0]=t,this.int16[k+1]=n,this.int16[k+2]=r,this.int16[k+3]=i,this.int16[k+4]=o,this.int16[k+5]=a,this.int16[k+6]=s,this.int16[k+7]=l,this.uint16[k+8]=c,this.uint16[k+9]=u,this.uint16[k+10]=d,this.uint16[k+11]=h,this.uint16[k+12]=p,this.uint16[k+13]=m,this.uint16[k+14]=g,this.uint16[k+15]=f,this.uint16[k+16]=_,this.uint16[k+17]=b,this.uint16[k+18]=v,this.uint16[k+19]=y,this.uint16[k+20]=E,this.uint16[k+21]=S,this.uint16[k+22]=w,this.uint32[O+12]=T,this.float32[O+13]=C,this.float32[O+14]=x,this.float32[O+15]=F,this.float32[O+16]=D,e}}Pi.prototype.bytesPerElement=68,Fr("StructArrayLayout8i15ui1ul4f68",Pi);class Li extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e){const t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.float32[1*e+0]=t,e}}Li.prototype.bytesPerElement=4,Fr("StructArrayLayout1f4",Li);class Bi extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,n){const r=this.length;return this.resize(r+1),this.emplace(r,e,t,n)}emplace(e,t,n,r){const i=3*e;return this.int16[i+0]=t,this.int16[i+1]=n,this.int16[i+2]=r,e}}Bi.prototype.bytesPerElement=6,Fr("StructArrayLayout3i6",Bi);class Ui extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,n){const r=this.length;return this.resize(r+1),this.emplace(r,e,t,n)}emplace(e,t,n,r){const i=4*e;return this.uint32[2*e+0]=t,this.uint16[i+2]=n,this.uint16[i+3]=r,e}}Ui.prototype.bytesPerElement=8,Fr("StructArrayLayout1ul2ui8",Ui);class ji extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t){const n=this.length;return this.resize(n+1),this.emplace(n,e,t)}emplace(e,t,n){const r=2*e;return this.uint16[r+0]=t,this.uint16[r+1]=n,e}}ji.prototype.bytesPerElement=4,Fr("StructArrayLayout2ui4",ji);class Gi extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e){const t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.uint16[1*e+0]=t,e}}Gi.prototype.bytesPerElement=2,Fr("StructArrayLayout1ui2",Gi);class zi extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,n,r){const i=this.length;return this.resize(i+1),this.emplace(i,e,t,n,r)}emplace(e,t,n,r,i){const o=4*e;return this.float32[o+0]=t,this.float32[o+1]=n,this.float32[o+2]=r,this.float32[o+3]=i,e}}zi.prototype.bytesPerElement=16,Fr("StructArrayLayout4f16",zi);class Hi extends _i{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new C(this.anchorPointX,this.anchorPointY)}}Hi.prototype.size=20;class qi extends Oi{get(e){return new Hi(this,e)}}Fr("CollisionBoxArray",qi);class Vi extends _i{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(e){this._structArray.uint8[this._pos1+37]=e}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(e){this._structArray.uint8[this._pos1+38]=e}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(e){this._structArray.uint32[this._pos4+10]=e}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}Vi.prototype.size=48;class $i extends Mi{get(e){return new Vi(this,e)}}Fr("PlacedSymbolArray",$i);class Ki extends _i{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(e){this._structArray.uint32[this._pos4+12]=e}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get textOffset0(){return this._structArray.float32[this._pos4+14]}get textOffset1(){return this._structArray.float32[this._pos4+15]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+16]}}Ki.prototype.size=68;class Wi extends Pi{get(e){return new Ki(this,e)}}Fr("SymbolInstanceArray",Wi);class Yi extends Li{getoffsetX(e){return this.float32[1*e+0]}}Fr("GlyphOffsetArray",Yi);class Qi extends Bi{getx(e){return this.int16[3*e+0]}gety(e){return this.int16[3*e+1]}gettileUnitDistanceFromAnchor(e){return this.int16[3*e+2]}}Fr("SymbolLineVertexArray",Qi);class Xi extends _i{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}Xi.prototype.size=8;class Zi extends Ui{get(e){return new Xi(this,e)}}Fr("FeatureIndexArray",Zi);class Ji extends Ei{}class eo extends Ei{}class to extends Ei{}class no extends wi{}class ro extends Ti{}class io extends Ci{}class oo extends xi{}class ao extends Fi{}class so extends Di{}class lo extends ki{}class co extends Ii{}class uo extends Ri{}class ho extends Ni{}class po extends ji{}const mo=vi([{name:"a_pos",components:2,type:"Int16"}],4),{members:go}=mo;class fo{constructor(e=[]){this.segments=e}prepareSegment(e,t,n,r){let i=this.segments[this.segments.length-1];return e>fo.MAX_VERTEX_ARRAY_LENGTH&&m(`Max vertices per segment is ${fo.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${e}`),(!i||i.vertexLength+e>fo.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==r)&&(i={vertexOffset:t.length,primitiveOffset:n.length,vertexLength:0,primitiveLength:0},void 0!==r&&(i.sortKey=r),this.segments.push(i)),i}get(){return this.segments}destroy(){for(const e of this.segments)for(const t in e.vaos)e.vaos[t].destroy()}static simpleSegment(e,t,n,r){return new fo([{vertexOffset:e,primitiveOffset:t,vertexLength:n,primitiveLength:r,vaos:{},sortKey:0}])}}function _o(e,t){return 256*(e=o(Math.floor(e),0,255))+o(Math.floor(t),0,255)}fo.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Fr("SegmentVector",fo);const bo=vi([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var vo={exports:{}},yo={exports:{}};yo.exports=function(e,t){var n,r,i,o,a,s,l,c;for(r=e.length-(n=3&e.length),i=t,a=3432918353,s=461845907,c=0;c<r;)l=255&e.charCodeAt(c)|(255&e.charCodeAt(++c))<<8|(255&e.charCodeAt(++c))<<16|(255&e.charCodeAt(++c))<<24,++c,i=27492+(65535&(o=5*(65535&(i=(i^=l=(65535&(l=(l=(65535&l)*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(l=0,n){case 3:l^=(255&e.charCodeAt(c+2))<<16;case 2:l^=(255&e.charCodeAt(c+1))<<8;case 1:i^=l=(65535&(l=(l=(65535&(l^=255&e.charCodeAt(c)))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return i^=e.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0};var Eo={exports:{}};Eo.exports=function(e,t){for(var n,r=e.length,i=t^r,o=0;r>=4;)n=1540483477*(65535&(n=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(n>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(n=1540483477*(65535&(n^=n>>>24))+((1540483477*(n>>>16)&65535)<<16)),r-=4,++o;switch(r){case 3:i^=(255&e.charCodeAt(o+2))<<16;case 2:i^=(255&e.charCodeAt(o+1))<<8;case 1:i=1540483477*(65535&(i^=255&e.charCodeAt(o)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0};var So=yo.exports,wo=Eo.exports;vo.exports=So,vo.exports.murmur3=So,vo.exports.murmur2=wo;class To{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(e,t,n,r){this.ids.push(Co(e)),this.positions.push(t,n,r)}getPositions(e){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const t=Co(e);let n=0,r=this.ids.length-1;for(;n<r;){const e=n+r>>1;this.ids[e]>=t?r=e:n=e+1}const i=[];for(;this.ids[n]===t;)i.push({index:this.positions[3*n],start:this.positions[3*n+1],end:this.positions[3*n+2]}),n++;return i}static serialize(e,t){const n=new Float64Array(e.ids),r=new Uint32Array(e.positions);return xo(n,r,0,n.length-1),t&&t.push(n.buffer,r.buffer),{ids:n,positions:r}}static deserialize(e){const t=new To;return t.ids=e.ids,t.positions=e.positions,t.indexed=!0,t}}function Co(e){const t=+e;return!isNaN(t)&&t<=Number.MAX_SAFE_INTEGER?t:vo.exports(String(e))}function xo(e,t,n,r){for(;n<r;){const i=e[n+r>>1];let o=n-1,a=r+1;for(;;){do{o++}while(e[o]<i);do{a--}while(e[a]>i);if(o>=a)break;Fo(e,o,a),Fo(t,3*o,3*a),Fo(t,3*o+1,3*a+1),Fo(t,3*o+2,3*a+2)}a-n<r-a?(xo(e,t,n,a),n=a+1):(xo(e,t,a+1,r),r=a)}}function Fo(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}Fr("FeaturePositionMap",To);class Do{constructor(e,t){this.gl=e.gl,this.location=t}}class ko extends Do{constructor(e,t){super(e,t),this.current=0}set(e){this.current!==e&&(this.current=e,this.gl.uniform1f(this.location,e))}}class Oo extends Do{constructor(e,t){super(e,t),this.current=[0,0,0,0]}set(e){e[0]===this.current[0]&&e[1]===this.current[1]&&e[2]===this.current[2]&&e[3]===this.current[3]||(this.current=e,this.gl.uniform4f(this.location,e[0],e[1],e[2],e[3]))}}class Io extends Do{constructor(e,t){super(e,t),this.current=Ne.transparent}set(e){e.r===this.current.r&&e.g===this.current.g&&e.b===this.current.b&&e.a===this.current.a||(this.current=e,this.gl.uniform4f(this.location,e.r,e.g,e.b,e.a))}}const Ao=new Float32Array(16);function Ro(e){return[_o(255*e.r,255*e.g),_o(255*e.b,255*e.a)]}class No{constructor(e,t,n){this.value=e,this.uniformNames=t.map((e=>`u_${e}`)),this.type=n}setUniform(e,t,n){e.set(n.constantOr(this.value))}getBinding(e,t,n){return"color"===this.type?new Io(e,t):new ko(e,t)}}class Mo{constructor(e,t){this.uniformNames=t.map((e=>`u_${e}`)),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(e,t){this.pixelRatioFrom=t.pixelRatio,this.pixelRatioTo=e.pixelRatio,this.patternFrom=t.tlbr,this.patternTo=e.tlbr}setUniform(e,t,n,r){const i="u_pattern_to"===r?this.patternTo:"u_pattern_from"===r?this.patternFrom:"u_pixel_ratio_to"===r?this.pixelRatioTo:"u_pixel_ratio_from"===r?this.pixelRatioFrom:null;i&&e.set(i)}getBinding(e,t,n){return"u_pattern"===n.substr(0,9)?new Oo(e,t):new ko(e,t)}}class Po{constructor(e,t,n,r){this.expression=e,this.type=n,this.maxValue=0,this.paintVertexAttributes=t.map((e=>({name:`a_${e}`,type:"Float32",components:"color"===n?2:1,offset:0}))),this.paintVertexArray=new r}populatePaintArray(e,t,n,r,i){const o=this.paintVertexArray.length,a=this.expression.evaluate(new Jr(0),t,{},r,[],i);this.paintVertexArray.resize(e),this._setPaintValue(o,e,a)}updatePaintArray(e,t,n,r){const i=this.expression.evaluate({zoom:0},n,r);this._setPaintValue(e,t,i)}_setPaintValue(e,t,n){if("color"===this.type){const r=Ro(n);for(let n=e;n<t;n++)this.paintVertexArray.emplace(n,r[0],r[1])}else{for(let r=e;r<t;r++)this.paintVertexArray.emplace(r,n);this.maxValue=Math.max(this.maxValue,Math.abs(n))}}upload(e){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=e.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class Lo{constructor(e,t,n,r,i,o){this.expression=e,this.uniformNames=t.map((e=>`u_${e}_t`)),this.type=n,this.useIntegerZoom=r,this.zoom=i,this.maxValue=0,this.paintVertexAttributes=t.map((e=>({name:`a_${e}`,type:"Float32",components:"color"===n?4:2,offset:0}))),this.paintVertexArray=new o}populatePaintArray(e,t,n,r,i){const o=this.expression.evaluate(new Jr(this.zoom),t,{},r,[],i),a=this.expression.evaluate(new Jr(this.zoom+1),t,{},r,[],i),s=this.paintVertexArray.length;this.paintVertexArray.resize(e),this._setPaintValue(s,e,o,a)}updatePaintArray(e,t,n,r){const i=this.expression.evaluate({zoom:this.zoom},n,r),o=this.expression.evaluate({zoom:this.zoom+1},n,r);this._setPaintValue(e,t,i,o)}_setPaintValue(e,t,n,r){if("color"===this.type){const i=Ro(n),o=Ro(r);for(let n=e;n<t;n++)this.paintVertexArray.emplace(n,i[0],i[1],o[0],o[1])}else{for(let i=e;i<t;i++)this.paintVertexArray.emplace(i,n,r);this.maxValue=Math.max(this.maxValue,Math.abs(n),Math.abs(r))}}upload(e){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=e.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(e,t){const n=this.useIntegerZoom?Math.floor(t.zoom):t.zoom,r=o(this.expression.interpolationFactor(n,this.zoom,this.zoom+1),0,1);e.set(r)}getBinding(e,t,n){return new ko(e,t)}}class Bo{constructor(e,t,n,r,i,o){this.expression=e,this.type=t,this.useIntegerZoom=n,this.zoom=r,this.layerId=o,this.zoomInPaintVertexArray=new i,this.zoomOutPaintVertexArray=new i}populatePaintArray(e,t,n){const r=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(e),this.zoomOutPaintVertexArray.resize(e),this._setPaintValues(r,e,t.patterns&&t.patterns[this.layerId],n)}updatePaintArray(e,t,n,r,i){this._setPaintValues(e,t,n.patterns&&n.patterns[this.layerId],i)}_setPaintValues(e,t,n,r){if(!r||!n)return;const{min:i,mid:o,max:a}=n,s=r[i],l=r[o],c=r[a];if(s&&l&&c)for(let n=e;n<t;n++)this.zoomInPaintVertexArray.emplace(n,l.tl[0],l.tl[1],l.br[0],l.br[1],s.tl[0],s.tl[1],s.br[0],s.br[1],l.pixelRatio,s.pixelRatio),this.zoomOutPaintVertexArray.emplace(n,l.tl[0],l.tl[1],l.br[0],l.br[1],c.tl[0],c.tl[1],c.br[0],c.br[1],l.pixelRatio,c.pixelRatio)}upload(e){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=e.createVertexBuffer(this.zoomInPaintVertexArray,bo.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=e.createVertexBuffer(this.zoomOutPaintVertexArray,bo.members,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class Uo{constructor(e,t,n){this.binders={},this._buffers=[];const r=[];for(const i in e.paint._values){if(!n(i))continue;const o=e.paint.get(i);if(!(o instanceof ai&&En(o.property.specification)))continue;const a=Go(i,e.type),s=o.value,l=o.property.specification.type,c=o.property.useIntegerZoom,u=o.property.specification["property-type"],d="cross-faded"===u||"cross-faded-data-driven"===u;if("constant"===s.kind)this.binders[i]=d?new Mo(s.value,a):new No(s.value,a,l),r.push(`/u_${i}`);else if("source"===s.kind||d){const n=zo(i,l,"source");this.binders[i]=d?new Bo(s,l,c,t,n,e.id):new Po(s,a,l,n),r.push(`/a_${i}`)}else{const e=zo(i,l,"composite");this.binders[i]=new Lo(s,a,l,c,t,e),r.push(`/z_${i}`)}}this.cacheKey=r.sort().join("")}getMaxValue(e){const t=this.binders[e];return t instanceof Po||t instanceof Lo?t.maxValue:0}populatePaintArrays(e,t,n,r,i){for(const o in this.binders){const a=this.binders[o];(a instanceof Po||a instanceof Lo||a instanceof Bo)&&a.populatePaintArray(e,t,n,r,i)}}setConstantPatternPositions(e,t){for(const n in this.binders){const r=this.binders[n];r instanceof Mo&&r.setConstantPatternPositions(e,t)}}updatePaintArrays(e,t,n,r,i){let o=!1;for(const a in e){const s=t.getPositions(a);for(const t of s){const s=n.feature(t.index);for(const n in this.binders){const l=this.binders[n];if((l instanceof Po||l instanceof Lo||l instanceof Bo)&&!0===l.expression.isStateDependent){const c=r.paint.get(n);l.expression=c.value,l.updatePaintArray(t.start,t.end,s,e[a],i),o=!0}}}}return o}defines(){const e=[];for(const t in this.binders){const n=this.binders[t];(n instanceof No||n instanceof Mo)&&e.push(...n.uniformNames.map((e=>`#define HAS_UNIFORM_${e}`)))}return e}getBinderAttributes(){const e=[];for(const t in this.binders){const n=this.binders[t];if(n instanceof Po||n instanceof Lo)for(let t=0;t<n.paintVertexAttributes.length;t++)e.push(n.paintVertexAttributes[t].name);else if(n instanceof Bo)for(let t=0;t<bo.members.length;t++)e.push(bo.members[t].name)}return e}getBinderUniforms(){const e=[];for(const t in this.binders){const n=this.binders[t];if(n instanceof No||n instanceof Mo||n instanceof Lo)for(const t of n.uniformNames)e.push(t)}return e}getPaintVertexBuffers(){return this._buffers}getUniforms(e,t){const n=[];for(const r in this.binders){const i=this.binders[r];if(i instanceof No||i instanceof Mo||i instanceof Lo)for(const o of i.uniformNames)if(t[o]){const a=i.getBinding(e,t[o],o);n.push({name:o,property:r,binding:a})}}return n}setUniforms(e,t,n,r){for(const{name:e,property:i,binding:o}of t)this.binders[i].setUniform(o,r,n.get(i),e)}updatePaintBuffers(e){this._buffers=[];for(const t in this.binders){const n=this.binders[t];if(e&&n instanceof Bo){const t=2===e.fromScale?n.zoomInPaintVertexBuffer:n.zoomOutPaintVertexBuffer;t&&this._buffers.push(t)}else(n instanceof Po||n instanceof Lo)&&n.paintVertexBuffer&&this._buffers.push(n.paintVertexBuffer)}}upload(e){for(const t in this.binders){const n=this.binders[t];(n instanceof Po||n instanceof Lo||n instanceof Bo)&&n.upload(e)}this.updatePaintBuffers()}destroy(){for(const e in this.binders){const t=this.binders[e];(t instanceof Po||t instanceof Lo||t instanceof Bo)&&t.destroy()}}}class jo{constructor(e,t,n=(()=>!0)){this.programConfigurations={};for(const r of e)this.programConfigurations[r.id]=new Uo(r,t,n);this.needsUpload=!1,this._featureMap=new To,this._bufferOffset=0}populatePaintArrays(e,t,n,r,i,o){for(const n in this.programConfigurations)this.programConfigurations[n].populatePaintArrays(e,t,r,i,o);void 0!==t.id&&this._featureMap.add(t.id,n,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,t,n,r){for(const i of n)this.needsUpload=this.programConfigurations[i.id].updatePaintArrays(e,this._featureMap,t,i,r)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(const t in this.programConfigurations)this.programConfigurations[t].upload(e);this.needsUpload=!1}}destroy(){for(const e in this.programConfigurations)this.programConfigurations[e].destroy()}}function Go(e,t){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[e]||[e.replace(`${t}-`,"").replace(/-/g,"_")]}function zo(e,t,n){const r={color:{source:Ci,composite:zi},number:{source:Li,composite:Ci}},i=function(e){return{"line-pattern":{source:oo,composite:oo},"fill-pattern":{source:oo,composite:oo},"fill-extrusion-pattern":{source:oo,composite:oo}}[e]}(e);return i&&i[n]||r[t][n]}Fr("ConstantBinder",No),Fr("CrossFadedConstantBinder",Mo),Fr("SourceExpressionBinder",Po),Fr("CrossFadedCompositeBinder",Bo),Fr("CompositeExpressionBinder",Lo),Fr("ProgramConfiguration",Uo,{omit:["_buffers"]}),Fr("ProgramConfigurationSet",jo);var Ho=8192;const qo=Math.pow(2,14)-1,Vo=-qo-1;function $o(e){const t=Ho/e.extent,n=e.loadGeometry();for(let e=0;e<n.length;e++){const r=n[e];for(let e=0;e<r.length;e++){const n=r[e],i=Math.round(n.x*t),a=Math.round(n.y*t);n.x=o(i,Vo,qo),n.y=o(a,Vo,qo),(i<n.x||i>n.x+1||a<n.y||a>n.y+1)&&m("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return n}function Ko(e,t){return{type:e.type,id:e.id,properties:e.properties,geometry:t?$o(e):[]}}function Wo(e,t,n,r,i){e.emplaceBack(2*t+(r+1)/2,2*n+(i+1)/2)}class Yo{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((e=>e.id)),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new eo,this.indexArray=new ho,this.segments=new fo,this.programConfigurations=new jo(e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter((e=>e.isStateDependent())).map((e=>e.id))}populate(e,t,n){const r=this.layers[0],i=[];let o=null,a=!1;"circle"===r.type&&(o=r.layout.get("circle-sort-key"),a=!o.isConstant());for(const{feature:t,id:r,index:s,sourceLayerIndex:l}of e){const e=this.layers[0]._featureFilter.needGeometry,c=Ko(t,e);if(!this.layers[0]._featureFilter.filter(new Jr(this.zoom),c,n))continue;const u=a?o.evaluate(c,{},n):void 0,d={id:r,properties:t.properties,type:t.type,sourceLayerIndex:l,index:s,geometry:e?c.geometry:$o(t),patterns:{},sortKey:u};i.push(d)}a&&i.sort(((e,t)=>e.sortKey-t.sortKey));for(const r of i){const{geometry:i,index:o,sourceLayerIndex:a}=r,s=e[o].feature;this.addFeature(r,i,o,n),t.featureIndex.insert(s,i,o,a,this.index)}}update(e,t,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,n)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,go),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(e,t,n,r){for(const n of t)for(const t of n){const n=t.x,r=t.y;if(n<0||n>=Ho||r<0||r>=Ho)continue;const i=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),o=i.vertexLength;Wo(this.layoutVertexArray,n,r,-1,-1),Wo(this.layoutVertexArray,n,r,1,-1),Wo(this.layoutVertexArray,n,r,1,1),Wo(this.layoutVertexArray,n,r,-1,1),this.indexArray.emplaceBack(o,o+1,o+2),this.indexArray.emplaceBack(o,o+3,o+2),i.vertexLength+=4,i.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,n,{},r)}}function Qo(e,t){for(let n=0;n<e.length;n++)if(oa(t,e[n]))return!0;for(let n=0;n<t.length;n++)if(oa(e,t[n]))return!0;return!!ea(e,t)}function Xo(e,t,n){return!!oa(e,t)||!!na(t,e,n)}function Zo(e,t){if(1===e.length)return ia(t,e[0]);for(let n=0;n<t.length;n++){const r=t[n];for(let t=0;t<r.length;t++)if(oa(e,r[t]))return!0}for(let n=0;n<e.length;n++)if(ia(t,e[n]))return!0;for(let n=0;n<t.length;n++)if(ea(e,t[n]))return!0;return!1}function Jo(e,t,n){if(e.length>1){if(ea(e,t))return!0;for(let r=0;r<t.length;r++)if(na(t[r],e,n))return!0}for(let r=0;r<e.length;r++)if(na(e[r],t,n))return!0;return!1}function ea(e,t){if(0===e.length||0===t.length)return!1;for(let n=0;n<e.length-1;n++){const r=e[n],i=e[n+1];for(let e=0;e<t.length-1;e++)if(ta(r,i,t[e],t[e+1]))return!0}return!1}function ta(e,t,n,r){return g(e,n,r)!==g(t,n,r)&&g(e,t,n)!==g(e,t,r)}function na(e,t,n){const r=n*n;if(1===t.length)return e.distSqr(t[0])<r;for(let n=1;n<t.length;n++)if(ra(e,t[n-1],t[n])<r)return!0;return!1}function ra(e,t,n){const r=t.distSqr(n);if(0===r)return e.distSqr(t);const i=((e.x-t.x)*(n.x-t.x)+(e.y-t.y)*(n.y-t.y))/r;return e.distSqr(i<0?t:i>1?n:n.sub(t)._mult(i)._add(t))}function ia(e,t){let n,r,i,o=!1;for(let a=0;a<e.length;a++){n=e[a];for(let e=0,a=n.length-1;e<n.length;a=e++)r=n[e],i=n[a],r.y>t.y!=i.y>t.y&&t.x<(i.x-r.x)*(t.y-r.y)/(i.y-r.y)+r.x&&(o=!o)}return o}function oa(e,t){let n=!1;for(let r=0,i=e.length-1;r<e.length;i=r++){const o=e[r],a=e[i];o.y>t.y!=a.y>t.y&&t.x<(a.x-o.x)*(t.y-o.y)/(a.y-o.y)+o.x&&(n=!n)}return n}function aa(e,t,n){const r=n[0],i=n[2];if(e.x<r.x&&t.x<r.x||e.x>i.x&&t.x>i.x||e.y<r.y&&t.y<r.y||e.y>i.y&&t.y>i.y)return!1;const o=g(e,t,n[0]);return o!==g(e,t,n[1])||o!==g(e,t,n[2])||o!==g(e,t,n[3])}function sa(e,t,n){const r=t.paint.get(e).value;return"constant"===r.kind?r.value:n.programConfigurations.get(t.id).getMaxValue(e)}function la(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function ca(e,t,n,r,i){if(!t[0]&&!t[1])return e;const o=C.convert(t)._mult(i);"viewport"===n&&o._rotate(-r);const a=[];for(let t=0;t<e.length;t++)a.push(e[t].sub(o));return a}Fr("CircleBucket",Yo,{omit:["layers"]});const ua=new pi({"circle-sort-key":new ci(re.layout_circle["circle-sort-key"])});var da={paint:new pi({"circle-radius":new ci(re.paint_circle["circle-radius"]),"circle-color":new ci(re.paint_circle["circle-color"]),"circle-blur":new ci(re.paint_circle["circle-blur"]),"circle-opacity":new ci(re.paint_circle["circle-opacity"]),"circle-translate":new li(re.paint_circle["circle-translate"]),"circle-translate-anchor":new li(re.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new li(re.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new li(re.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new ci(re.paint_circle["circle-stroke-width"]),"circle-stroke-color":new ci(re.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new ci(re.paint_circle["circle-stroke-opacity"])}),layout:ua},ha=1e-6,pa="undefined"!=typeof Float32Array?Float32Array:Array;function ma(){var e=new pa(9);return pa!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function ga(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function fa(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],c=t[6],u=t[7],d=t[8],h=t[9],p=t[10],m=t[11],g=t[12],f=t[13],_=t[14],b=t[15],v=n[0],y=n[1],E=n[2],S=n[3];return e[0]=v*r+y*s+E*d+S*g,e[1]=v*i+y*l+E*h+S*f,e[2]=v*o+y*c+E*p+S*_,e[3]=v*a+y*u+E*m+S*b,e[4]=(v=n[4])*r+(y=n[5])*s+(E=n[6])*d+(S=n[7])*g,e[5]=v*i+y*l+E*h+S*f,e[6]=v*o+y*c+E*p+S*_,e[7]=v*a+y*u+E*m+S*b,e[8]=(v=n[8])*r+(y=n[9])*s+(E=n[10])*d+(S=n[11])*g,e[9]=v*i+y*l+E*h+S*f,e[10]=v*o+y*c+E*p+S*_,e[11]=v*a+y*u+E*m+S*b,e[12]=(v=n[12])*r+(y=n[13])*s+(E=n[14])*d+(S=n[15])*g,e[13]=v*i+y*l+E*h+S*f,e[14]=v*o+y*c+E*p+S*_,e[15]=v*a+y*u+E*m+S*b,e}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var _a,ba=fa;function va(){var e=new pa(3);return pa!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function ya(e,t,n){var r=new pa(3);return r[0]=e,r[1]=t,r[2]=n,r}function Ea(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3];return e[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,e[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,e[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,e[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,e}function Sa(){var e=new pa(4);return pa!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function wa(e,t){const n=Ea([],[e.x,e.y,0,1],t);return new C(n[0]/n[3],n[1]/n[3])}va(),_a=new pa(4),pa!=Float32Array&&(_a[0]=0,_a[1]=0,_a[2]=0,_a[3]=0),va(),ya(1,0,0),ya(0,1,0),Sa(),Sa(),ma(),function(){var e;e=new pa(2),pa!=Float32Array&&(e[0]=0,e[1]=0)}();class Ta extends Yo{}Fr("HeatmapBucket",Ta,{omit:["layers"]});var Ca={paint:new pi({"heatmap-radius":new ci(re.paint_heatmap["heatmap-radius"]),"heatmap-weight":new ci(re.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new li(re.paint_heatmap["heatmap-intensity"]),"heatmap-color":new hi(re.paint_heatmap["heatmap-color"]),"heatmap-opacity":new li(re.paint_heatmap["heatmap-opacity"])})};function xa(e,{width:t,height:n},r,i){if(i){if(i instanceof Uint8ClampedArray)i=new Uint8Array(i.buffer);else if(i.length!==t*n*r)throw new RangeError(`mismatched image size. expected: ${i.length} but got: ${t*n*r}`)}else i=new Uint8Array(t*n*r);return e.width=t,e.height=n,e.data=i,e}function Fa(e,{width:t,height:n},r){if(t===e.width&&n===e.height)return;const i=xa({},{width:t,height:n},r);Da(e,i,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,t),height:Math.min(e.height,n)},r),e.width=t,e.height=n,e.data=i.data}function Da(e,t,n,r,i,o){if(0===i.width||0===i.height)return t;if(i.width>e.width||i.height>e.height||n.x>e.width-i.width||n.y>e.height-i.height)throw new RangeError("out of range source coordinates for image copy");if(i.width>t.width||i.height>t.height||r.x>t.width-i.width||r.y>t.height-i.height)throw new RangeError("out of range destination coordinates for image copy");const a=e.data,s=t.data;if(a===s)throw new Error("srcData equals dstData, so image is already copied");for(let l=0;l<i.height;l++){const c=((n.y+l)*e.width+n.x)*o,u=((r.y+l)*t.width+r.x)*o;for(let e=0;e<i.width*o;e++)s[u+e]=a[c+e]}return t}class ka{constructor(e,t){xa(this,e,1,t)}resize(e){Fa(this,e,1)}clone(){return new ka({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(e,t,n,r,i){Da(e,t,n,r,i,1)}}class Oa{constructor(e,t){xa(this,e,4,t)}resize(e){Fa(this,e,4)}replace(e,t){t?this.data.set(e):this.data=e instanceof Uint8ClampedArray?new Uint8Array(e.buffer):e}clone(){return new Oa({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(e,t,n,r,i){Da(e,t,n,r,i,4)}}function Ia(e){const t={},n=e.resolution||256,r=e.clips?e.clips.length:1,i=e.image||new Oa({width:n,height:r});if(Math.log(n)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${n}`);const o=(n,r,o)=>{t[e.evaluationKey]=o;const a=e.expression.evaluate(t);i.data[n+r+0]=Math.floor(255*a.r/a.a),i.data[n+r+1]=Math.floor(255*a.g/a.a),i.data[n+r+2]=Math.floor(255*a.b/a.a),i.data[n+r+3]=Math.floor(255*a.a)};if(e.clips)for(let t=0,i=0;t<r;++t,i+=4*n)for(let r=0,a=0;r<n;r++,a+=4){const s=r/(n-1),{start:l,end:c}=e.clips[t];o(i,a,l*(1-s)+c*s)}else for(let e=0,t=0;e<n;e++,t+=4)o(0,t,e/(n-1));return i}Fr("AlphaImage",ka),Fr("RGBAImage",Oa);var Aa={paint:new pi({"hillshade-illumination-direction":new li(re.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new li(re.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new li(re.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new li(re.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new li(re.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new li(re.paint_hillshade["hillshade-accent-color"])})};const Ra=vi([{name:"a_pos",components:2,type:"Int16"}],4),{members:Na}=Ra;var Ma={exports:{}};function Pa(e,t,n){n=n||2;var r,i,o,a,s,l,c,u=t&&t.length,d=u?t[0]*n:e.length,h=La(e,0,d,n,!0),p=[];if(!h||h.next===h.prev)return p;if(u&&(h=function(e,t,n,r){var i,o,a,s=[];for(i=0,o=t.length;i<o;i++)(a=La(e,t[i]*r,i<o-1?t[i+1]*r:e.length,r,!1))===a.next&&(a.steiner=!0),s.push(Wa(a));for(s.sort(qa),i=0;i<s.length;i++)n=Va(s[i],n);return n}(e,t,h,n)),e.length>80*n){r=o=e[0],i=a=e[1];for(var m=n;m<d;m+=n)(s=e[m])<r&&(r=s),(l=e[m+1])<i&&(i=l),s>o&&(o=s),l>a&&(a=l);c=0!==(c=Math.max(o-r,a-i))?32767/c:0}return Ua(h,p,n,r,i,c,0),p}function La(e,t,n,r,i){var o,a;if(i===ss(e,t,n,r)>0)for(o=t;o<n;o+=r)a=is(o,e[o],e[o+1],a);else for(o=n-r;o>=t;o-=r)a=is(o,e[o],e[o+1],a);return a&&Za(a,a.next)&&(os(a),a=a.next),a}function Ba(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!Za(r,r.next)&&0!==Xa(r.prev,r,r.next))r=r.next;else{if(os(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function Ua(e,t,n,r,i,o,a){if(e){!a&&o&&function(e,t,n,r){var i=e;do{0===i.z&&(i.z=Ka(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,n,r,i,o,a,s,l,c=1;do{for(n=e,e=null,o=null,a=0;n;){for(a++,r=n,s=0,t=0;t<c&&(s++,r=r.nextZ);t++);for(l=c;s>0||l>0&&r;)0!==s&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(a>1)}(i)}(e,r,i,o);for(var s,l,c=e;e.prev!==e.next;)if(s=e.prev,l=e.next,o?Ga(e,r,i,o):ja(e))t.push(s.i/n|0),t.push(e.i/n|0),t.push(l.i/n|0),os(e),e=l.next,c=l.next;else if((e=l)===c){a?1===a?Ua(e=za(Ba(e),t,n),t,n,r,i,o,2):2===a&&Ha(e,t,n,r,i,o):Ua(Ba(e),t,n,r,i,o,1);break}}}function ja(e){var t=e.prev,n=e,r=e.next;if(Xa(t,n,r)>=0)return!1;for(var i=t.x,o=n.x,a=r.x,s=t.y,l=n.y,c=r.y,u=i<o?i<a?i:a:o<a?o:a,d=s<l?s<c?s:c:l<c?l:c,h=i>o?i>a?i:a:o>a?o:a,p=s>l?s>c?s:c:l>c?l:c,m=r.next;m!==t;){if(m.x>=u&&m.x<=h&&m.y>=d&&m.y<=p&&Ya(i,s,o,l,a,c,m.x,m.y)&&Xa(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function Ga(e,t,n,r){var i=e.prev,o=e,a=e.next;if(Xa(i,o,a)>=0)return!1;for(var s=i.x,l=o.x,c=a.x,u=i.y,d=o.y,h=a.y,p=s<l?s<c?s:c:l<c?l:c,m=u<d?u<h?u:h:d<h?d:h,g=s>l?s>c?s:c:l>c?l:c,f=u>d?u>h?u:h:d>h?d:h,_=Ka(p,m,t,n,r),b=Ka(g,f,t,n,r),v=e.prevZ,y=e.nextZ;v&&v.z>=_&&y&&y.z<=b;){if(v.x>=p&&v.x<=g&&v.y>=m&&v.y<=f&&v!==i&&v!==a&&Ya(s,u,l,d,c,h,v.x,v.y)&&Xa(v.prev,v,v.next)>=0)return!1;if(v=v.prevZ,y.x>=p&&y.x<=g&&y.y>=m&&y.y<=f&&y!==i&&y!==a&&Ya(s,u,l,d,c,h,y.x,y.y)&&Xa(y.prev,y,y.next)>=0)return!1;y=y.nextZ}for(;v&&v.z>=_;){if(v.x>=p&&v.x<=g&&v.y>=m&&v.y<=f&&v!==i&&v!==a&&Ya(s,u,l,d,c,h,v.x,v.y)&&Xa(v.prev,v,v.next)>=0)return!1;v=v.prevZ}for(;y&&y.z<=b;){if(y.x>=p&&y.x<=g&&y.y>=m&&y.y<=f&&y!==i&&y!==a&&Ya(s,u,l,d,c,h,y.x,y.y)&&Xa(y.prev,y,y.next)>=0)return!1;y=y.nextZ}return!0}function za(e,t,n){var r=e;do{var i=r.prev,o=r.next.next;!Za(i,o)&&Ja(i,r,r.next,o)&&ns(i,o)&&ns(o,i)&&(t.push(i.i/n|0),t.push(r.i/n|0),t.push(o.i/n|0),os(r),os(r.next),r=e=o),r=r.next}while(r!==e);return Ba(r)}function Ha(e,t,n,r,i,o){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Qa(a,s)){var l=rs(a,s);return a=Ba(a,a.next),l=Ba(l,l.next),Ua(a,t,n,r,i,o,0),void Ua(l,t,n,r,i,o,0)}s=s.next}a=a.next}while(a!==e)}function qa(e,t){return e.x-t.x}function Va(e,t){var n=function(e,t){var n,r=t,i=e.x,o=e.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a&&(a=s,n=r.x<r.next.x?r:r.next,s===i))return n}r=r.next}while(r!==t);if(!n)return null;var l,c=n,u=n.x,d=n.y,h=1/0;r=n;do{i>=r.x&&r.x>=u&&i!==r.x&&Ya(o<d?i:a,o,u,d,o<d?a:i,o,r.x,r.y)&&(l=Math.abs(o-r.y)/(i-r.x),ns(r,e)&&(l<h||l===h&&(r.x>n.x||r.x===n.x&&$a(n,r)))&&(n=r,h=l)),r=r.next}while(r!==c);return n}(e,t);if(!n)return t;var r=rs(n,e);return Ba(r,r.next),Ba(n,n.next)}function $a(e,t){return Xa(e.prev,e,t.prev)<0&&Xa(t.next,e,e.next)<0}function Ka(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Wa(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function Ya(e,t,n,r,i,o,a,s){return(i-a)*(t-s)>=(e-a)*(o-s)&&(e-a)*(r-s)>=(n-a)*(t-s)&&(n-a)*(o-s)>=(i-a)*(r-s)}function Qa(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&Ja(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(ns(e,t)&&ns(t,e)&&function(e,t){var n=e,r=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(Xa(e.prev,e,t.prev)||Xa(e,t.prev,t))||Za(e,t)&&Xa(e.prev,e,e.next)>0&&Xa(t.prev,t,t.next)>0)}function Xa(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function Za(e,t){return e.x===t.x&&e.y===t.y}function Ja(e,t,n,r){var i=ts(Xa(e,t,n)),o=ts(Xa(e,t,r)),a=ts(Xa(n,r,e)),s=ts(Xa(n,r,t));return i!==o&&a!==s||!(0!==i||!es(e,n,t))||!(0!==o||!es(e,r,t))||!(0!==a||!es(n,e,r))||!(0!==s||!es(n,t,r))}function es(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function ts(e){return e>0?1:e<0?-1:0}function ns(e,t){return Xa(e.prev,e,e.next)<0?Xa(e,t,e.next)>=0&&Xa(e,e.prev,t)>=0:Xa(e,t,e.prev)<0||Xa(e,e.next,t)<0}function rs(e,t){var n=new as(e.i,e.x,e.y),r=new as(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function is(e,t,n,r){var i=new as(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function os(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function as(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function ss(e,t,n,r){for(var i=0,o=t,a=n-r;o<n;o+=r)i+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return i}function ls(e,t,n,r,i){cs(e,t,n||0,r||e.length-1,i||ds)}function cs(e,t,n,r,i){for(;r>n;){if(r-n>600){var o=r-n+1,a=t-n+1,s=Math.log(o),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(o-l)/o)*(a-o/2<0?-1:1);cs(e,t,Math.max(n,Math.floor(t-a*l/o+c)),Math.min(r,Math.floor(t+(o-a)*l/o+c)),i)}var u=e[t],d=n,h=r;for(us(e,n,t),i(e[r],u)>0&&us(e,n,r);d<h;){for(us(e,d,h),d++,h--;i(e[d],u)<0;)d++;for(;i(e[h],u)>0;)h--}0===i(e[n],u)?us(e,n,h):us(e,++h,r),h<=t&&(n=h+1),t<=h&&(r=h-1)}}function us(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function ds(e,t){return e<t?-1:e>t?1:0}function hs(e,t){const n=e.length;if(n<=1)return[e];const r=[];let i,o;for(let t=0;t<n;t++){const n=f(e[t]);0!==n&&(e[t].area=Math.abs(n),void 0===o&&(o=n<0),o===n<0?(i&&r.push(i),i=[e[t]]):i.push(e[t]))}if(i&&r.push(i),t>1)for(let e=0;e<r.length;e++)r[e].length<=t||(ls(r[e],t,1,r[e].length-1,ps),r[e]=r[e].slice(0,t));return r}function ps(e,t){return t.area-e.area}function ms(e,t,n){const r=n.patternDependencies;let i=!1;for(const n of t){const t=n.paint.get(`${e}-pattern`);t.isConstant()||(i=!0);const o=t.constantOr(null);o&&(i=!0,r[o.to]=!0,r[o.from]=!0)}return i}function gs(e,t,n,r,i){const o=i.patternDependencies;for(const a of t){const t=a.paint.get(`${e}-pattern`).value;if("constant"!==t.kind){let e=t.evaluate({zoom:r-1},n,{},i.availableImages),s=t.evaluate({zoom:r},n,{},i.availableImages),l=t.evaluate({zoom:r+1},n,{},i.availableImages);e=e&&e.name?e.name:e,s=s&&s.name?s.name:s,l=l&&l.name?l.name:l,o[e]=!0,o[s]=!0,o[l]=!0,n.patterns[a.id]={min:e,mid:s,max:l}}}return n}Ma.exports=Pa,Ma.exports.default=Pa,Pa.deviation=function(e,t,n,r){var i=t&&t.length,o=Math.abs(ss(e,0,i?t[0]*n:e.length,n));if(i)for(var a=0,s=t.length;a<s;a++)o-=Math.abs(ss(e,t[a]*n,a<s-1?t[a+1]*n:e.length,n));var l=0;for(a=0;a<r.length;a+=3){var c=r[a]*n,u=r[a+1]*n,d=r[a+2]*n;l+=Math.abs((e[c]-e[d])*(e[u+1]-e[c+1])-(e[c]-e[u])*(e[d+1]-e[c+1]))}return 0===o&&0===l?0:Math.abs((l-o)/o)},Pa.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,i=0;i<e.length;i++){for(var o=0;o<e[i].length;o++)for(var a=0;a<t;a++)n.vertices.push(e[i][o][a]);i>0&&n.holes.push(r+=e[i-1].length)}return n};class fs{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((e=>e.id)),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new to,this.indexArray=new ho,this.indexArray2=new po,this.programConfigurations=new jo(e.layers,e.zoom),this.segments=new fo,this.segments2=new fo,this.stateDependentLayerIds=this.layers.filter((e=>e.isStateDependent())).map((e=>e.id))}populate(e,t,n){this.hasPattern=ms("fill",this.layers,t);const r=this.layers[0].layout.get("fill-sort-key"),i=!r.isConstant(),o=[];for(const{feature:a,id:s,index:l,sourceLayerIndex:c}of e){const e=this.layers[0]._featureFilter.needGeometry,u=Ko(a,e);if(!this.layers[0]._featureFilter.filter(new Jr(this.zoom),u,n))continue;const d=i?r.evaluate(u,{},n,t.availableImages):void 0,h={id:s,properties:a.properties,type:a.type,sourceLayerIndex:c,index:l,geometry:e?u.geometry:$o(a),patterns:{},sortKey:d};o.push(h)}i&&o.sort(((e,t)=>e.sortKey-t.sortKey));for(const r of o){const{geometry:i,index:o,sourceLayerIndex:a}=r;if(this.hasPattern){const e=gs("fill",this.layers,r,this.zoom,t);this.patternFeatures.push(e)}else this.addFeature(r,i,o,n,{});t.featureIndex.insert(e[o].feature,i,o,a,this.index)}}update(e,t,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,n)}addFeatures(e,t,n){for(const e of this.patternFeatures)this.addFeature(e,e.geometry,e.index,t,n)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Na),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.indexBuffer2=e.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(e,t,n,r,i){for(const e of hs(t,500)){let t=0;for(const n of e)t+=n.length;const n=this.segments.prepareSegment(t,this.layoutVertexArray,this.indexArray),r=n.vertexLength,i=[],o=[];for(const t of e){if(0===t.length)continue;t!==e[0]&&o.push(i.length/2);const n=this.segments2.prepareSegment(t.length,this.layoutVertexArray,this.indexArray2),r=n.vertexLength;this.layoutVertexArray.emplaceBack(t[0].x,t[0].y),this.indexArray2.emplaceBack(r+t.length-1,r),i.push(t[0].x),i.push(t[0].y);for(let e=1;e<t.length;e++)this.layoutVertexArray.emplaceBack(t[e].x,t[e].y),this.indexArray2.emplaceBack(r+e-1,r+e),i.push(t[e].x),i.push(t[e].y);n.vertexLength+=t.length,n.primitiveLength+=t.length}const a=Ma.exports(i,o);for(let e=0;e<a.length;e+=3)this.indexArray.emplaceBack(r+a[e],r+a[e+1],r+a[e+2]);n.vertexLength+=t,n.primitiveLength+=a.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,n,i,r)}}Fr("FillBucket",fs,{omit:["layers","patternFeatures"]});const _s=new pi({"fill-sort-key":new ci(re.layout_fill["fill-sort-key"])});var bs={paint:new pi({"fill-antialias":new li(re.paint_fill["fill-antialias"]),"fill-opacity":new ci(re.paint_fill["fill-opacity"]),"fill-color":new ci(re.paint_fill["fill-color"]),"fill-outline-color":new ci(re.paint_fill["fill-outline-color"]),"fill-translate":new li(re.paint_fill["fill-translate"]),"fill-translate-anchor":new li(re.paint_fill["fill-translate-anchor"]),"fill-pattern":new ui(re.paint_fill["fill-pattern"])}),layout:_s};const vs=vi([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),ys=vi([{name:"a_centroid",components:2,type:"Int16"}],4),{members:Es}=vs;var Ss={},ws=C,Ts=Cs;function Cs(e,t,n,r,i){this.properties={},this.extent=n,this.type=0,this._pbf=e,this._geometry=-1,this._keys=r,this._values=i,e.readFields(xs,this,t)}function xs(e,t,n){1==e?t.id=n.readVarint():2==e?function(e,t){for(var n=e.readVarint()+e.pos;e.pos<n;){var r=t._keys[e.readVarint()],i=t._values[e.readVarint()];t.properties[r]=i}}(n,t):3==e?t.type=n.readVarint():4==e&&(t._geometry=n.pos)}function Fs(e){for(var t,n,r=0,i=0,o=e.length,a=o-1;i<o;a=i++)r+=((n=e[a]).x-(t=e[i]).x)*(t.y+n.y);return r}Cs.types=["Unknown","Point","LineString","Polygon"],Cs.prototype.loadGeometry=function(){var e=this._pbf;e.pos=this._geometry;for(var t,n=e.readVarint()+e.pos,r=1,i=0,o=0,a=0,s=[];e.pos<n;){if(i<=0){var l=e.readVarint();r=7&l,i=l>>3}if(i--,1===r||2===r)o+=e.readSVarint(),a+=e.readSVarint(),1===r&&(t&&s.push(t),t=[]),t.push(new ws(o,a));else{if(7!==r)throw new Error("unknown command "+r);t&&t.push(t[0].clone())}}return t&&s.push(t),s},Cs.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,n=1,r=0,i=0,o=0,a=1/0,s=-1/0,l=1/0,c=-1/0;e.pos<t;){if(r<=0){var u=e.readVarint();n=7&u,r=u>>3}if(r--,1===n||2===n)(i+=e.readSVarint())<a&&(a=i),i>s&&(s=i),(o+=e.readSVarint())<l&&(l=o),o>c&&(c=o);else if(7!==n)throw new Error("unknown command "+n)}return[a,l,s,c]},Cs.prototype.toGeoJSON=function(e,t,n){var r,i,o=this.extent*Math.pow(2,n),a=this.extent*e,s=this.extent*t,l=this.loadGeometry(),c=Cs.types[this.type];function u(e){for(var t=0;t<e.length;t++){var n=e[t];e[t]=[360*(n.x+a)/o-180,360/Math.PI*Math.atan(Math.exp((180-360*(n.y+s)/o)*Math.PI/180))-90]}}switch(this.type){case 1:var d=[];for(r=0;r<l.length;r++)d[r]=l[r][0];u(l=d);break;case 2:for(r=0;r<l.length;r++)u(l[r]);break;case 3:for(l=function(e){var t=e.length;if(t<=1)return[e];for(var n,r,i=[],o=0;o<t;o++){var a=Fs(e[o]);0!==a&&(void 0===r&&(r=a<0),r===a<0?(n&&i.push(n),n=[e[o]]):n.push(e[o]))}return n&&i.push(n),i}(l),r=0;r<l.length;r++)for(i=0;i<l[r].length;i++)u(l[r][i])}1===l.length?l=l[0]:c="Multi"+c;var h={type:"Feature",geometry:{type:c,coordinates:l},properties:this.properties};return"id"in this&&(h.id=this.id),h};var Ds=Ts,ks=Os;function Os(e,t){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],e.readFields(Is,this,t),this.length=this._features.length}function Is(e,t,n){15===e?t.version=n.readVarint():1===e?t.name=n.readString():5===e?t.extent=n.readVarint():2===e?t._features.push(n.pos):3===e?t._keys.push(n.readString()):4===e&&t._values.push(function(e){for(var t=null,n=e.readVarint()+e.pos;e.pos<n;){var r=e.readVarint()>>3;t=1===r?e.readString():2===r?e.readFloat():3===r?e.readDouble():4===r?e.readVarint64():5===r?e.readVarint():6===r?e.readSVarint():7===r?e.readBoolean():null}return t}(n))}Os.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new Ds(this._pbf,t,this.extent,this._keys,this._values)};var As=ks;function Rs(e,t,n){if(3===e){var r=new As(n,n.readVarint()+n.pos);r.length&&(t[r.name]=r)}}Ss.VectorTile=function(e,t){this.layers=e.readFields(Rs,{},t)},Ss.VectorTileFeature=Ts,Ss.VectorTileLayer=ks;const Ns=Ss.VectorTileFeature.types,Ms=Math.pow(2,13);function Ps(e,t,n,r,i,o,a,s){e.emplaceBack(t,n,2*Math.floor(r*Ms)+a,i*Ms*2,o*Ms*2,Math.round(s))}class Ls{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((e=>e.id)),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new no,this.centroidVertexArray=new Ji,this.indexArray=new ho,this.programConfigurations=new jo(e.layers,e.zoom),this.segments=new fo,this.stateDependentLayerIds=this.layers.filter((e=>e.isStateDependent())).map((e=>e.id))}populate(e,t,n){this.features=[],this.hasPattern=ms("fill-extrusion",this.layers,t);for(const{feature:r,id:i,index:o,sourceLayerIndex:a}of e){const e=this.layers[0]._featureFilter.needGeometry,s=Ko(r,e);if(!this.layers[0]._featureFilter.filter(new Jr(this.zoom),s,n))continue;const l={id:i,sourceLayerIndex:a,index:o,geometry:e?s.geometry:$o(r),properties:r.properties,type:r.type,patterns:{}};this.hasPattern?this.features.push(gs("fill-extrusion",this.layers,l,this.zoom,t)):this.addFeature(l,l.geometry,o,n,{}),t.featureIndex.insert(r,l.geometry,o,a,this.index,!0)}}addFeatures(e,t,n){for(const e of this.features){const{geometry:r}=e;this.addFeature(e,r,e.index,t,n)}}update(e,t,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,n)}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.centroidVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Es),this.centroidVertexBuffer=e.createVertexBuffer(this.centroidVertexArray,ys.members,!0),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(e,t,n,r,i){const o={x:0,y:0,vertexCount:0};for(const n of hs(t,500)){let t=0;for(const e of n)t+=e.length;let r=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(const e of n){if(0===e.length)continue;if(Us(e))continue;let t=0;for(let n=0;n<e.length;n++){const i=e[n];if(n>=1){const a=e[n-1];if(!Bs(i,a)){r.vertexLength+4>fo.MAX_VERTEX_ARRAY_LENGTH&&(r=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const e=i.sub(a)._perp()._unit(),n=a.dist(i);t+n>32768&&(t=0),Ps(this.layoutVertexArray,i.x,i.y,e.x,e.y,0,0,t),Ps(this.layoutVertexArray,i.x,i.y,e.x,e.y,0,1,t),o.x+=2*i.x,o.y+=2*i.y,o.vertexCount+=2,t+=n,Ps(this.layoutVertexArray,a.x,a.y,e.x,e.y,0,0,t),Ps(this.layoutVertexArray,a.x,a.y,e.x,e.y,0,1,t),o.x+=2*a.x,o.y+=2*a.y,o.vertexCount+=2;const s=r.vertexLength;this.indexArray.emplaceBack(s,s+2,s+1),this.indexArray.emplaceBack(s+1,s+2,s+3),r.vertexLength+=4,r.primitiveLength+=2}}}}if(r.vertexLength+t>fo.MAX_VERTEX_ARRAY_LENGTH&&(r=this.segments.prepareSegment(t,this.layoutVertexArray,this.indexArray)),"Polygon"!==Ns[e.type])continue;const i=[],a=[],s=r.vertexLength;for(const e of n)if(0!==e.length){e!==n[0]&&a.push(i.length/2);for(let t=0;t<e.length;t++){const n=e[t];Ps(this.layoutVertexArray,n.x,n.y,0,0,1,1,0),o.x+=n.x,o.y+=n.y,o.vertexCount+=1,i.push(n.x),i.push(n.y)}}const l=Ma.exports(i,a);for(let e=0;e<l.length;e+=3)this.indexArray.emplaceBack(s+l[e],s+l[e+2],s+l[e+1]);r.primitiveLength+=l.length/3,r.vertexLength+=t}for(let e=0;e<o.vertexCount;e++)this.centroidVertexArray.emplaceBack(Math.floor(o.x/o.vertexCount),Math.floor(o.y/o.vertexCount));this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,n,i,r)}}function Bs(e,t){return e.x===t.x&&(e.x<0||e.x>Ho)||e.y===t.y&&(e.y<0||e.y>Ho)}function Us(e){return e.every((e=>e.x<0))||e.every((e=>e.x>Ho))||e.every((e=>e.y<0))||e.every((e=>e.y>Ho))}Fr("FillExtrusionBucket",Ls,{omit:["layers","features"]});var js={paint:new pi({"fill-extrusion-opacity":new li(re["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new ci(re["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new li(re["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new li(re["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new ui(re["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new ci(re["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new ci(re["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new li(re["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})};function Gs(e,t){return e.x*t.x+e.y*t.y}function zs(e,t){if(1===e.length){let n=0;const r=t[n++];let i;for(;!i||r.equals(i);)if(i=t[n++],!i)return 1/0;for(;n<t.length;n++){const o=t[n],a=e[0],s=i.sub(r),l=o.sub(r),c=a.sub(r),u=Gs(s,s),d=Gs(s,l),h=Gs(l,l),p=Gs(c,s),m=Gs(c,l),g=u*h-d*d,f=(h*p-d*m)/g,_=(u*m-d*p)/g,b=r.z*(1-f-_)+i.z*f+o.z*_;if(isFinite(b))return b}return 1/0}{let e=1/0;for(const n of t)e=Math.min(e,n.z);return e}}const Hs=vi([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:qs}=Hs,Vs=vi([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:$s}=Vs,Ks=Ss.VectorTileFeature.types,Ws=Math.cos(Math.PI/180*37.5),Ys=Math.pow(2,14)/.5;class Qs{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((e=>e.id)),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach((e=>{this.gradients[e.id]={}})),this.layoutVertexArray=new ro,this.layoutVertexArray2=new io,this.indexArray=new ho,this.programConfigurations=new jo(e.layers,e.zoom),this.segments=new fo,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter((e=>e.isStateDependent())).map((e=>e.id))}populate(e,t,n){this.hasPattern=ms("line",this.layers,t);const r=this.layers[0].layout.get("line-sort-key"),i=!r.isConstant(),o=[];for(const{feature:t,id:a,index:s,sourceLayerIndex:l}of e){const e=this.layers[0]._featureFilter.needGeometry,c=Ko(t,e);if(!this.layers[0]._featureFilter.filter(new Jr(this.zoom),c,n))continue;const u=i?r.evaluate(c,{},n):void 0,d={id:a,properties:t.properties,type:t.type,sourceLayerIndex:l,index:s,geometry:e?c.geometry:$o(t),patterns:{},sortKey:u};o.push(d)}i&&o.sort(((e,t)=>e.sortKey-t.sortKey));for(const r of o){const{geometry:i,index:o,sourceLayerIndex:a}=r;if(this.hasPattern){const e=gs("line",this.layers,r,this.zoom,t);this.patternFeatures.push(e)}else this.addFeature(r,i,o,n,{});t.featureIndex.insert(e[o].feature,i,o,a,this.index)}}update(e,t,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,n)}addFeatures(e,t,n){for(const e of this.patternFeatures)this.addFeature(e,e.geometry,e.index,t,n)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=e.createVertexBuffer(this.layoutVertexArray2,$s)),this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,qs),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(e){if(e.properties&&Object.prototype.hasOwnProperty.call(e.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(e.properties,"mapbox_clip_end"))return{start:+e.properties.mapbox_clip_start,end:+e.properties.mapbox_clip_end}}addFeature(e,t,n,r,i){const o=this.layers[0].layout,a=o.get("line-join").evaluate(e,{}),s=o.get("line-cap"),l=o.get("line-miter-limit"),c=o.get("line-round-limit");this.lineClips=this.lineFeatureClips(e);for(const n of t)this.addLine(n,e,a,s,l,c);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,n,i,r)}addLine(e,t,n,r,i,o){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let t=0;t<e.length-1;t++)this.totalDistance+=e[t].dist(e[t+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}const a="Polygon"===Ks[t.type];let s=e.length;for(;s>=2&&e[s-1].equals(e[s-2]);)s--;let l=0;for(;l<s-1&&e[l].equals(e[l+1]);)l++;if(s<(a?3:2))return;"bevel"===n&&(i=1.05);const c=this.overscaling<=16?122880/(512*this.overscaling):0,u=this.segments.prepareSegment(10*s,this.layoutVertexArray,this.indexArray);let d,h,p,m,g;this.e1=this.e2=-1,a&&(d=e[s-2],g=e[l].sub(d)._unit()._perp());for(let t=l;t<s;t++){if(p=t===s-1?a?e[l+1]:void 0:e[t+1],p&&e[t].equals(p))continue;g&&(m=g),d&&(h=d),d=e[t],g=p?p.sub(d)._unit()._perp():m,m=m||g;let f=m.add(g);0===f.x&&0===f.y||f._unit();const _=m.x*g.x+m.y*g.y,b=f.x*g.x+f.y*g.y,v=0!==b?1/b:1/0,y=2*Math.sqrt(2-2*b),E=b<Ws&&h&&p,S=m.x*g.y-m.y*g.x>0;if(E&&t>l){const e=d.dist(h);if(e>2*c){const t=d.sub(d.sub(h)._mult(c/e)._round());this.updateDistance(h,t),this.addCurrentVertex(t,m,0,0,u),h=t}}const w=h&&p;let T=w?n:a?"butt":r;if(w&&"round"===T&&(v<o?T="miter":v<=2&&(T="fakeround")),"miter"===T&&v>i&&(T="bevel"),"bevel"===T&&(v>2&&(T="flipbevel"),v<i&&(T="miter")),h&&this.updateDistance(h,d),"miter"===T)f._mult(v),this.addCurrentVertex(d,f,0,0,u);else if("flipbevel"===T){if(v>100)f=g.mult(-1);else{const e=v*m.add(g).mag()/m.sub(g).mag();f._perp()._mult(e*(S?-1:1))}this.addCurrentVertex(d,f,0,0,u),this.addCurrentVertex(d,f.mult(-1),0,0,u)}else if("bevel"===T||"fakeround"===T){const e=-Math.sqrt(v*v-1),t=S?e:0,n=S?0:e;if(h&&this.addCurrentVertex(d,m,t,n,u),"fakeround"===T){const e=Math.round(180*y/Math.PI/20);for(let t=1;t<e;t++){let n=t/e;if(.5!==n){const e=n-.5;n+=n*e*(n-1)*((1.0904+_*(_*(3.55645-1.43519*_)-3.2452))*e*e+(.848013+_*(.215638*_-1.06021)))}const r=g.sub(m)._mult(n)._add(m)._unit()._mult(S?-1:1);this.addHalfVertex(d,r.x,r.y,!1,S,0,u)}}p&&this.addCurrentVertex(d,g,-t,-n,u)}else if("butt"===T)this.addCurrentVertex(d,f,0,0,u);else if("square"===T){const e=h?1:-1;this.addCurrentVertex(d,f,e,e,u)}else"round"===T&&(h&&(this.addCurrentVertex(d,m,0,0,u),this.addCurrentVertex(d,m,1,1,u,!0)),p&&(this.addCurrentVertex(d,g,-1,-1,u,!0),this.addCurrentVertex(d,g,0,0,u)));if(E&&t<s-1){const e=d.dist(p);if(e>2*c){const t=d.add(p.sub(d)._mult(c/e)._round());this.updateDistance(d,t),this.addCurrentVertex(t,g,0,0,u),d=t}}}}addCurrentVertex(e,t,n,r,i,o=!1){const a=t.y*r-t.x,s=-t.y-t.x*r;this.addHalfVertex(e,t.x+t.y*n,t.y-t.x*n,o,!1,n,i),this.addHalfVertex(e,a,s,o,!0,-r,i),this.distance>Ys/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(e,t,n,r,i,o))}addHalfVertex({x:e,y:t},n,r,i,o,a,s){const l=.5*(this.lineClips?this.scaledDistance*(Ys-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((e<<1)+(i?1:0),(t<<1)+(o?1:0),Math.round(63*n)+128,Math.round(63*r)+128,1+(0===a?0:a<0?-1:1)|(63&l)<<2,l>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const c=s.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,c),s.primitiveLength++),o?this.e2=c:this.e1=c}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(e,t){this.distance+=e.dist(t),this.updateScaledDistance()}}Fr("LineBucket",Qs,{omit:["layers","patternFeatures"]});const Xs=new pi({"line-cap":new li(re.layout_line["line-cap"]),"line-join":new ci(re.layout_line["line-join"]),"line-miter-limit":new li(re.layout_line["line-miter-limit"]),"line-round-limit":new li(re.layout_line["line-round-limit"]),"line-sort-key":new ci(re.layout_line["line-sort-key"])});var Zs={paint:new pi({"line-opacity":new ci(re.paint_line["line-opacity"]),"line-color":new ci(re.paint_line["line-color"]),"line-translate":new li(re.paint_line["line-translate"]),"line-translate-anchor":new li(re.paint_line["line-translate-anchor"]),"line-width":new ci(re.paint_line["line-width"]),"line-gap-width":new ci(re.paint_line["line-gap-width"]),"line-offset":new ci(re.paint_line["line-offset"]),"line-blur":new ci(re.paint_line["line-blur"]),"line-dasharray":new di(re.paint_line["line-dasharray"]),"line-pattern":new ui(re.paint_line["line-pattern"]),"line-gradient":new hi(re.paint_line["line-gradient"])}),layout:Xs};const Js=new class extends ci{possiblyEvaluate(e,t){return t=new Jr(Math.floor(t.zoom),{now:t.now,fadeDuration:t.fadeDuration,zoomHistory:t.zoomHistory,transition:t.transition}),super.possiblyEvaluate(e,t)}evaluate(e,t,n,r){return t=s({},t,{zoom:Math.floor(t.zoom)}),super.evaluate(e,t,n,r)}}(Zs.paint.properties["line-width"].specification);function el(e,t){return t>0?t+2*e:e}Js.useIntegerZoom=!0;const tl=vi([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),nl=vi([{name:"a_projected_pos",components:3,type:"Float32"}],4);vi([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const rl=vi([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]);vi([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);const il=vi([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),ol=vi([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function al(e,t,n){return e.sections.forEach((e=>{e.text=function(e,t,n){const r=t.layout.get("text-transform").evaluate(n,{});return"uppercase"===r?e=e.toLocaleUpperCase():"lowercase"===r&&(e=e.toLocaleLowerCase()),Zr.applyArabicShaping&&(e=Zr.applyArabicShaping(e)),e}(e.text,t,n)})),e}vi([{name:"triangle",components:3,type:"Uint16"}]),vi([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),vi([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),vi([{type:"Float32",name:"offsetX"}]),vi([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);const sl={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var ll=24,cl=hl,ul=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<<s)-1,c=l>>1,u=-7,d=n?i-1:0,h=n?-1:1,p=e[t+d];for(d+=h,o=p&(1<<-u)-1,p>>=-u,u+=s;u>0;o=256*o+e[t+d],d+=h,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=256*a+e[t+d],d+=h,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=c}return(p?-1:1)*a*Math.pow(2,o-r)},dl=function(e,t,n,r,i,o){var a,s,l,c=8*o-i-1,u=(1<<c)-1,d=u>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,m=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+d>=1?h/l:h*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(t*l-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[n+p]=255&s,p+=m,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[n+p]=255&a,p+=m,a/=256,c-=8);e[n+p-m]|=128*g};function hl(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}hl.Varint=0,hl.Fixed64=1,hl.Bytes=2,hl.Fixed32=5;var pl,ml=4294967296,gl=1/ml,fl="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function _l(e){return e.type===hl.Bytes?e.readVarint()+e.pos:e.pos+1}function bl(e,t,n){return n?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function vl(e,t,n){var r=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));n.realloc(r);for(var i=n.pos-1;i>=e;i--)n.buf[i+r]=n.buf[i]}function yl(e,t){for(var n=0;n<e.length;n++)t.writeVarint(e[n])}function El(e,t){for(var n=0;n<e.length;n++)t.writeSVarint(e[n])}function Sl(e,t){for(var n=0;n<e.length;n++)t.writeFloat(e[n])}function wl(e,t){for(var n=0;n<e.length;n++)t.writeDouble(e[n])}function Tl(e,t){for(var n=0;n<e.length;n++)t.writeBoolean(e[n])}function Cl(e,t){for(var n=0;n<e.length;n++)t.writeFixed32(e[n])}function xl(e,t){for(var n=0;n<e.length;n++)t.writeSFixed32(e[n])}function Fl(e,t){for(var n=0;n<e.length;n++)t.writeFixed64(e[n])}function Dl(e,t){for(var n=0;n<e.length;n++)t.writeSFixed64(e[n])}function kl(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+16777216*e[t+3]}function Ol(e,t,n){e[n]=t,e[n+1]=t>>>8,e[n+2]=t>>>16,e[n+3]=t>>>24}function Il(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}function Al(e,t,n){1===e&&n.readMessage(Rl,t)}function Rl(e,t,n){if(3===e){const{id:e,bitmap:r,width:i,height:o,left:a,top:s,advance:l}=n.readMessage(Nl,{});t.push({id:e,bitmap:new ka({width:i+6,height:o+6},r),metrics:{width:i,height:o,left:a,top:s,advance:l}})}}function Nl(e,t,n){1===e?t.id=n.readVarint():2===e?t.bitmap=n.readBytes():3===e?t.width=n.readVarint():4===e?t.height=n.readVarint():5===e?t.left=n.readSVarint():6===e?t.top=n.readSVarint():7===e&&(t.advance=n.readVarint())}function Ml(e){let t=0,n=0;for(const r of e)t+=r.w*r.h,n=Math.max(n,r.w);e.sort(((e,t)=>t.h-e.h));const r=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),n),h:1/0}];let i=0,o=0;for(const t of e)for(let e=r.length-1;e>=0;e--){const n=r[e];if(!(t.w>n.w||t.h>n.h)){if(t.x=n.x,t.y=n.y,o=Math.max(o,t.y+t.h),i=Math.max(i,t.x+t.w),t.w===n.w&&t.h===n.h){const t=r.pop();e<r.length&&(r[e]=t)}else t.h===n.h?(n.x+=t.w,n.w-=t.w):t.w===n.w?(n.y+=t.h,n.h-=t.h):(r.push({x:n.x+t.w,y:n.y,w:n.w-t.w,h:t.h}),n.y+=t.h,n.h-=t.h);break}}return{w:i,h:o,fill:t/(i*o)||0}}hl.prototype={destroy:function(){this.buf=null},readFields:function(e,t,n){for(n=n||this.length;this.pos<n;){var r=this.readVarint(),i=r>>3,o=this.pos;this.type=7&r,e(i,t,this),this.pos===o&&this.skip(r)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=kl(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=Il(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=kl(this.buf,this.pos)+kl(this.buf,this.pos+4)*ml;return this.pos+=8,e},readSFixed64:function(){var e=kl(this.buf,this.pos)+Il(this.buf,this.pos+4)*ml;return this.pos+=8,e},readFloat:function(){var e=ul(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=ul(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,n,r=this.buf;return t=127&(n=r[this.pos++]),n<128?t:(t|=(127&(n=r[this.pos++]))<<7,n<128?t:(t|=(127&(n=r[this.pos++]))<<14,n<128?t:(t|=(127&(n=r[this.pos++]))<<21,n<128?t:function(e,t,n){var r,i,o=n.buf;if(r=(112&(i=o[n.pos++]))>>4,i<128)return bl(e,r,t);if(r|=(127&(i=o[n.pos++]))<<3,i<128)return bl(e,r,t);if(r|=(127&(i=o[n.pos++]))<<10,i<128)return bl(e,r,t);if(r|=(127&(i=o[n.pos++]))<<17,i<128)return bl(e,r,t);if(r|=(127&(i=o[n.pos++]))<<24,i<128)return bl(e,r,t);if(r|=(1&(i=o[n.pos++]))<<31,i<128)return bl(e,r,t);throw new Error("Expected varint not more than 10 bytes")}(t|=(15&(n=r[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=12&&fl?function(e,t,n){return fl.decode(e.subarray(t,n))}(this.buf,t,e):function(e,t,n){for(var r="",i=t;i<n;){var o,a,s,l=e[i],c=null,u=l>239?4:l>223?3:l>191?2:1;if(i+u>n)break;1===u?l<128&&(c=l):2===u?128==(192&(o=e[i+1]))&&(c=(31&l)<<6|63&o)<=127&&(c=null):3===u?(a=e[i+2],128==(192&(o=e[i+1]))&&128==(192&a)&&((c=(15&l)<<12|(63&o)<<6|63&a)<=2047||c>=55296&&c<=57343)&&(c=null)):4===u&&(a=e[i+2],s=e[i+3],128==(192&(o=e[i+1]))&&128==(192&a)&&128==(192&s)&&((c=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,u=1):c>65535&&(c-=65536,r+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),r+=String.fromCharCode(c),i+=u}return r}(this.buf,t,e)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==hl.Bytes)return e.push(this.readVarint(t));var n=_l(this);for(e=e||[];this.pos<n;)e.push(this.readVarint(t));return e},readPackedSVarint:function(e){if(this.type!==hl.Bytes)return e.push(this.readSVarint());var t=_l(this);for(e=e||[];this.pos<t;)e.push(this.readSVarint());return e},readPackedBoolean:function(e){if(this.type!==hl.Bytes)return e.push(this.readBoolean());var t=_l(this);for(e=e||[];this.pos<t;)e.push(this.readBoolean());return e},readPackedFloat:function(e){if(this.type!==hl.Bytes)return e.push(this.readFloat());var t=_l(this);for(e=e||[];this.pos<t;)e.push(this.readFloat());return e},readPackedDouble:function(e){if(this.type!==hl.Bytes)return e.push(this.readDouble());var t=_l(this);for(e=e||[];this.pos<t;)e.push(this.readDouble());return e},readPackedFixed32:function(e){if(this.type!==hl.Bytes)return e.push(this.readFixed32());var t=_l(this);for(e=e||[];this.pos<t;)e.push(this.readFixed32());return e},readPackedSFixed32:function(e){if(this.type!==hl.Bytes)return e.push(this.readSFixed32());var t=_l(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed32());return e},readPackedFixed64:function(e){if(this.type!==hl.Bytes)return e.push(this.readFixed64());var t=_l(this);for(e=e||[];this.pos<t;)e.push(this.readFixed64());return e},readPackedSFixed64:function(e){if(this.type!==hl.Bytes)return e.push(this.readSFixed64());var t=_l(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed64());return e},skip:function(e){var t=7&e;if(t===hl.Varint)for(;this.buf[this.pos++]>127;);else if(t===hl.Bytes)this.pos=this.readVarint()+this.pos;else if(t===hl.Fixed32)this.pos+=4;else{if(t!==hl.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t<this.pos+e;)t*=2;if(t!==this.length){var n=new Uint8Array(t);n.set(this.buf),this.buf=n,this.length=t}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(e){this.realloc(4),Ol(this.buf,e,this.pos),this.pos+=4},writeSFixed32:function(e){this.realloc(4),Ol(this.buf,e,this.pos),this.pos+=4},writeFixed64:function(e){this.realloc(8),Ol(this.buf,-1&e,this.pos),Ol(this.buf,Math.floor(e*gl),this.pos+4),this.pos+=8},writeSFixed64:function(e){this.realloc(8),Ol(this.buf,-1&e,this.pos),Ol(this.buf,Math.floor(e*gl),this.pos+4),this.pos+=8},writeVarint:function(e){(e=+e||0)>268435455||e<0?function(e,t){var n,r;if(e>=0?(n=e%4294967296|0,r=e/4294967296|0):(r=~(-e/4294967296),4294967295^(n=~(-e%4294967296))?n=n+1|0:(n=0,r=r+1|0)),e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),function(e,t,n){n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,n.buf[n.pos]=127&(e>>>=7)}(n,0,t),function(e,t){var n=(7&e)<<4;t.buf[t.pos++]|=n|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e)))))}(r,t)}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=function(e,t,n){for(var r,i,o=0;o<t.length;o++){if((r=t.charCodeAt(o))>55295&&r<57344){if(!i){r>56319||o+1===t.length?(e[n++]=239,e[n++]=191,e[n++]=189):i=r;continue}if(r<56320){e[n++]=239,e[n++]=191,e[n++]=189,i=r;continue}r=i-55296<<10|r-56320|65536,i=null}else i&&(e[n++]=239,e[n++]=191,e[n++]=189,i=null);r<128?e[n++]=r:(r<2048?e[n++]=r>>6|192:(r<65536?e[n++]=r>>12|224:(e[n++]=r>>18|240,e[n++]=r>>12&63|128),e[n++]=r>>6&63|128),e[n++]=63&r|128)}return n}(this.buf,e,this.pos);var n=this.pos-t;n>=128&&vl(t,n,this),this.pos=t-1,this.writeVarint(n),this.pos+=n},writeFloat:function(e){this.realloc(4),dl(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),dl(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var n=0;n<t;n++)this.buf[this.pos++]=e[n]},writeRawMessage:function(e,t){this.pos++;var n=this.pos;e(t,this);var r=this.pos-n;r>=128&&vl(n,r,this),this.pos=n-1,this.writeVarint(r),this.pos+=r},writeMessage:function(e,t,n){this.writeTag(e,hl.Bytes),this.writeRawMessage(t,n)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,yl,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,El,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,Tl,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,Sl,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,wl,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,Cl,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,xl,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,Fl,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,Dl,t)},writeBytesField:function(e,t){this.writeTag(e,hl.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,hl.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,hl.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,hl.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,hl.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,hl.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,hl.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,hl.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,hl.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,hl.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}};class Pl{constructor(e,{pixelRatio:t,version:n,stretchX:r,stretchY:i,content:o}){this.paddedRect=e,this.pixelRatio=t,this.stretchX=r,this.stretchY=i,this.content=o,this.version=n}get tl(){return[this.paddedRect.x+1,this.paddedRect.y+1]}get br(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]}}class Ll{constructor(e,t){const n={},r={};this.haveRenderCallbacks=[];const i=[];this.addImages(e,n,i),this.addImages(t,r,i);const{w:o,h:a}=Ml(i),s=new Oa({width:o||1,height:a||1});for(const t in e){const r=e[t],i=n[t].paddedRect;Oa.copy(r.data,s,{x:0,y:0},{x:i.x+1,y:i.y+1},r.data)}for(const e in t){const n=t[e],i=r[e].paddedRect,o=i.x+1,a=i.y+1,l=n.data.width,c=n.data.height;Oa.copy(n.data,s,{x:0,y:0},{x:o,y:a},n.data),Oa.copy(n.data,s,{x:0,y:c-1},{x:o,y:a-1},{width:l,height:1}),Oa.copy(n.data,s,{x:0,y:0},{x:o,y:a+c},{width:l,height:1}),Oa.copy(n.data,s,{x:l-1,y:0},{x:o-1,y:a},{width:1,height:c}),Oa.copy(n.data,s,{x:0,y:0},{x:o+l,y:a},{width:1,height:c})}this.image=s,this.iconPositions=n,this.patternPositions=r}addImages(e,t,n){for(const r in e){const i=e[r],o={x:0,y:0,w:i.data.width+2,h:i.data.height+2};n.push(o),t[r]=new Pl(o,i),i.hasRenderCallback&&this.haveRenderCallbacks.push(r)}}patchUpdatedImages(e,t){e.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const n in e.updatedImages)this.patchUpdatedImage(this.iconPositions[n],e.getImage(n),t),this.patchUpdatedImage(this.patternPositions[n],e.getImage(n),t)}patchUpdatedImage(e,t,n){if(!e||!t)return;if(e.version===t.version)return;e.version=t.version;const[r,i]=e.tl;n.update(t.data,void 0,{x:r,y:i})}}Fr("ImagePosition",Pl),Fr("ImageAtlas",Ll),e.WritingMode=void 0,(pl=e.WritingMode||(e.WritingMode={}))[pl.none=0]="none",pl[pl.horizontal=1]="horizontal",pl[pl.vertical=2]="vertical",pl[pl.horizontalOnly=3]="horizontalOnly";const Bl=-17;class Ul{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(e,t){const n=new Ul;return n.scale=e||1,n.fontStack=t,n}static forImage(e){const t=new Ul;return t.imageName=e,t}}class jl{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(e,t){const n=new jl;for(let r=0;r<e.sections.length;r++){const i=e.sections[r];i.image?n.addImageSection(i):n.addTextSection(i,t)}return n}length(){return this.text.length}getSection(e){return this.sections[this.sectionIndex[e]]}getSectionIndex(e){return this.sectionIndex[e]}getCharCode(e){return this.text.charCodeAt(e)}verticalizePunctuation(){this.text=function(e){let t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n+1)||null,i=e.charCodeAt(n-1)||null;t+=r&&Lr(r)&&!sl[e[n+1]]||i&&Lr(i)&&!sl[e[n-1]]||!sl[e[n]]?e[n]:sl[e[n]]}return t}(this.text)}trim(){let e=0;for(let t=0;t<this.text.length&&zl[this.text.charCodeAt(t)];t++)e++;let t=this.text.length;for(let n=this.text.length-1;n>=0&&n>=e&&zl[this.text.charCodeAt(n)];n--)t--;this.text=this.text.substring(e,t),this.sectionIndex=this.sectionIndex.slice(e,t)}substring(e,t){const n=new jl;return n.text=this.text.substring(e,t),n.sectionIndex=this.sectionIndex.slice(e,t),n.sections=this.sections,n}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce(((e,t)=>Math.max(e,this.sections[t].scale)),0)}addTextSection(e,t){this.text+=e.text,this.sections.push(Ul.forText(e.scale,e.fontStack||t));const n=this.sections.length-1;for(let t=0;t<e.text.length;++t)this.sectionIndex.push(n)}addImageSection(e){const t=e.image?e.image.name:"";if(0===t.length)return void m("Can't add FormattedSection with an empty image.");const n=this.getNextImageSectionCharCode();n?(this.text+=String.fromCharCode(n),this.sections.push(Ul.forImage(t)),this.sectionIndex.push(this.sections.length-1)):m("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Gl(t,n,r,i,o,a,s,l,c,u,d,h,p,m,g,f){const _=jl.fromFeature(t,o);let b;h===e.WritingMode.vertical&&_.verticalizePunctuation();const{processBidirectionalText:v,processStyledBidirectionalText:y}=Zr;if(v&&1===_.sections.length){b=[];const e=v(_.toString(),Yl(_,u,a,n,i,m,g));for(const t of e){const e=new jl;e.text=t,e.sections=_.sections;for(let n=0;n<t.length;n++)e.sectionIndex.push(0);b.push(e)}}else if(y){b=[];const e=y(_.text,_.sectionIndex,Yl(_,u,a,n,i,m,g));for(const t of e){const e=new jl;e.text=t[0],e.sectionIndex=t[1],e.sections=_.sections,b.push(e)}}else b=function(e,t){const n=[],r=e.text;let i=0;for(const r of t)n.push(e.substring(i,r)),i=r;return i<r.length&&n.push(e.substring(i,r.length)),n}(_,Yl(_,u,a,n,i,m,g));const E=[],S={positionedLines:E,text:_.toString(),top:d[1],bottom:d[1],left:d[0],right:d[0],writingMode:h,iconsInText:!1,verticalizable:!1};return function(t,n,r,i,o,a,s,l,c,u,d,h){let p=0,m=Bl,g=0,f=0;const _="right"===l?1:"left"===l?0:.5;let b=0;for(const s of o){s.trim();const o=s.getMaxScale(),l=(o-1)*ll,y={positionedGlyphs:[],lineOffset:0};t.positionedLines[b]=y;const E=y.positionedGlyphs;let S=0;if(!s.length()){m+=a,++b;continue}for(let a=0;a<s.length();a++){const g=s.getSection(a),f=s.getSectionIndex(a),_=s.getCharCode(a);let b=0,y=null,w=null,T=null,C=ll;const x=!(c===e.WritingMode.horizontal||!d&&!Pr(_)||d&&(zl[_]||(v=_,Ar.Arabic(v)||Ar["Arabic Supplement"](v)||Ar["Arabic Extended-A"](v)||Ar["Arabic Presentation Forms-A"](v)||Ar["Arabic Presentation Forms-B"](v))));if(g.imageName){const e=i[g.imageName];if(!e)continue;T=g.imageName,t.iconsInText=t.iconsInText||!0,w=e.paddedRect;const n=e.displaySize;g.scale=g.scale*ll/h,y={width:n[0],height:n[1],left:1,top:-3,advance:x?n[1]:n[0]},b=l+(ll-n[1]*g.scale),C=y.advance;const r=x?n[0]*g.scale-ll*o:n[1]*g.scale-ll*o;r>0&&r>S&&(S=r)}else{const e=r[g.fontStack],t=e&&e[_];if(t&&t.rect)w=t.rect,y=t.metrics;else{const e=n[g.fontStack],t=e&&e[_];if(!t)continue;y=t.metrics}b=(o-g.scale)*ll}x?(t.verticalizable=!0,E.push({glyph:_,imageName:T,x:p,y:m+b,vertical:x,scale:g.scale,fontStack:g.fontStack,sectionIndex:f,metrics:y,rect:w}),p+=C*g.scale+u):(E.push({glyph:_,imageName:T,x:p,y:m+b,vertical:x,scale:g.scale,fontStack:g.fontStack,sectionIndex:f,metrics:y,rect:w}),p+=y.advance*g.scale+u)}0!==E.length&&(g=Math.max(p-u,g),Xl(E,0,E.length-1,_,S)),p=0;const w=a*o+S;y.lineOffset=Math.max(S,l),m+=w,f=Math.max(w,f),++b}var v;const y=m-Bl,{horizontalAlign:E,verticalAlign:S}=Ql(s);(function(e,t,n,r,i,o,a,s,l){const c=(t-n)*i;let u=0;u=o!==a?-s*r-Bl:(-r*l+.5)*a;for(const t of e)for(const e of t.positionedGlyphs)e.x+=c,e.y+=u})(t.positionedLines,_,E,S,g,f,a,y,o.length),t.top+=-S*y,t.bottom=t.top+y,t.left+=-E*g,t.right=t.left+g}(S,n,r,i,b,s,l,c,h,u,p,f),!function(e){for(const t of e)if(0!==t.positionedGlyphs.length)return!1;return!0}(E)&&S}const zl={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Hl={10:!0,32:!0,38:!0,40:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0};function ql(e,t,n,r,i,o){if(t.imageName){const e=r[t.imageName];return e?e.displaySize[0]*t.scale*ll/o+i:0}{const r=n[t.fontStack],o=r&&r[e];return o?o.metrics.advance*t.scale+i:0}}function Vl(e,t,n,r){const i=Math.pow(e-t,2);return r?e<t?i/2:2*i:i+Math.abs(n)*n}function $l(e,t,n){let r=0;return 10===e&&(r-=1e4),n&&(r+=150),40!==e&&65288!==e||(r+=50),41!==t&&65289!==t||(r+=50),r}function Kl(e,t,n,r,i,o){let a=null,s=Vl(t,n,i,o);for(const e of r){const r=Vl(t-e.x,n,i,o)+e.badness;r<=s&&(a=e,s=r)}return{index:e,x:t,priorBreak:a,badness:s}}function Wl(e){return e?Wl(e.priorBreak).concat(e.index):[]}function Yl(e,t,n,r,i,o,a){if("point"!==o)return[];if(!e)return[];const s=[],l=function(e,t,n,r,i,o){let a=0;for(let n=0;n<e.length();n++){const s=e.getSection(n);a+=ql(e.getCharCode(n),s,r,i,t,o)}return a/Math.max(1,Math.ceil(a/n))}(e,t,n,r,i,a),c=e.text.indexOf("")>=0;let u=0;for(let n=0;n<e.length();n++){const o=e.getSection(n),h=e.getCharCode(n);if(zl[h]||(u+=ql(h,o,r,i,t,a)),n<e.length()-1){const t=!((d=h)<11904||!(Ar["Bopomofo Extended"](d)||Ar.Bopomofo(d)||Ar["CJK Compatibility Forms"](d)||Ar["CJK Compatibility Ideographs"](d)||Ar["CJK Compatibility"](d)||Ar["CJK Radicals Supplement"](d)||Ar["CJK Strokes"](d)||Ar["CJK Symbols and Punctuation"](d)||Ar["CJK Unified Ideographs Extension A"](d)||Ar["CJK Unified Ideographs"](d)||Ar["Enclosed CJK Letters and Months"](d)||Ar["Halfwidth and Fullwidth Forms"](d)||Ar.Hiragana(d)||Ar["Ideographic Description Characters"](d)||Ar["Kangxi Radicals"](d)||Ar["Katakana Phonetic Extensions"](d)||Ar.Katakana(d)||Ar["Vertical Forms"](d)||Ar["Yi Radicals"](d)||Ar["Yi Syllables"](d)));(Hl[h]||t||o.imageName)&&s.push(Kl(n+1,u,l,s,$l(h,e.getCharCode(n+1),t&&c),!1))}}var d;return Wl(Kl(e.length(),u,l,s,0,!0))}function Ql(e){let t=.5,n=.5;switch(e){case"right":case"top-right":case"bottom-right":t=1;break;case"left":case"top-left":case"bottom-left":t=0}switch(e){case"bottom":case"bottom-right":case"bottom-left":n=1;break;case"top":case"top-right":case"top-left":n=0}return{horizontalAlign:t,verticalAlign:n}}function Xl(e,t,n,r,i){if(!r&&!i)return;const o=e[n],a=(e[n].x+o.metrics.advance*o.scale)*r;for(let r=t;r<=n;r++)e[r].x-=a,e[r].y+=i}function Zl(e,t,n){const{horizontalAlign:r,verticalAlign:i}=Ql(n),o=t[0]-e.displaySize[0]*r,a=t[1]-e.displaySize[1]*i;return{image:e,top:a,bottom:a+e.displaySize[1],left:o,right:o+e.displaySize[0]}}function Jl(e,t,n,r,i,o){const a=e.image;let s;if(a.content){const e=a.content,t=a.pixelRatio||1;s=[e[0]/t,e[1]/t,a.displaySize[0]-e[2]/t,a.displaySize[1]-e[3]/t]}const l=t.left*o,c=t.right*o;let u,d,h,p;"width"===n||"both"===n?(p=i[0]+l-r[3],d=i[0]+c+r[1]):(p=i[0]+(l+c-a.displaySize[0])/2,d=p+a.displaySize[0]);const m=t.top*o,g=t.bottom*o;return"height"===n||"both"===n?(u=i[1]+m-r[0],h=i[1]+g+r[2]):(u=i[1]+(m+g-a.displaySize[1])/2,h=u+a.displaySize[1]),{image:a,top:u,right:d,bottom:h,left:p,collisionPadding:s}}const ec=128;function tc(e,t){const{expression:n}=t;if("constant"===n.kind)return{kind:"constant",layoutSize:n.evaluate(new Jr(e+1))};if("source"===n.kind)return{kind:"source"};{const{zoomStops:t,interpolationType:r}=n;let i=0;for(;i<t.length&&t[i]<=e;)i++;i=Math.max(0,i-1);let o=i;for(;o<t.length&&t[o]<e+1;)o++;o=Math.min(t.length-1,o);const a=t[i],s=t[o];return"composite"===n.kind?{kind:"composite",minZoom:a,maxZoom:s,interpolationType:r}:{kind:"camera",minZoom:a,maxZoom:s,minSize:n.evaluate(new Jr(a)),maxSize:n.evaluate(new Jr(s)),interpolationType:r}}}class nc extends C{constructor(e,t,n,r){super(e,t),this.angle=n,void 0!==r&&(this.segment=r)}clone(){return new nc(this.x,this.y,this.angle,this.segment)}}function rc(e,t,n,r,i){if(void 0===t.segment)return!0;let o=t,a=t.segment+1,s=0;for(;s>-n/2;){if(a--,a<0)return!1;s-=e[a].dist(o),o=e[a]}s+=e[a].dist(e[a+1]),a++;const l=[];let c=0;for(;s<n/2;){const t=e[a],n=e[a+1];if(!n)return!1;let o=e[a-1].angleTo(t)-t.angleTo(n);for(o=Math.abs((o+3*Math.PI)%(2*Math.PI)-Math.PI),l.push({distance:s,angleDelta:o}),c+=o;s-l[0].distance>r;)c-=l.shift().angleDelta;if(c>i)return!1;a++,s+=t.dist(n)}return!0}function ic(e){let t=0;for(let n=0;n<e.length-1;n++)t+=e[n].dist(e[n+1]);return t}function oc(e,t,n){return e?.6*t*n:0}function ac(e,t){return Math.max(e?e.right-e.left:0,t?t.right-t.left:0)}function sc(e,t,n,r,i,o){const a=oc(n,i,o),s=ac(n,r)*o;let l=0;const c=ic(e)/2;for(let n=0;n<e.length-1;n++){const r=e[n],i=e[n+1],o=r.dist(i);if(l+o>c){const u=(c-l)/o,d=Ct(r.x,i.x,u),h=Ct(r.y,i.y,u),p=new nc(d,h,i.angleTo(r),n);return p._round(),!a||rc(e,p,s,a,t)?p:void 0}l+=o}}function lc(e,t,n,r,i,o,a,s,l){const c=oc(r,o,a),u=ac(r,i),d=u*a,h=0===e[0].x||e[0].x===l||0===e[0].y||e[0].y===l;return t-d<t/4&&(t=d+t/4),cc(e,h?t/2*s%t:(u/2+2*o)*a*s%t,t,c,n,d,h,!1,l)}function cc(e,t,n,r,i,o,a,s,l){const c=o/2,u=ic(e);let d=0,h=t-n,p=[];for(let t=0;t<e.length-1;t++){const a=e[t],s=e[t+1],m=a.dist(s),g=s.angleTo(a);for(;h+n<d+m;){h+=n;const f=(h-d)/m,_=Ct(a.x,s.x,f),b=Ct(a.y,s.y,f);if(_>=0&&_<l&&b>=0&&b<l&&h-c>=0&&h+c<=u){const n=new nc(_,b,g,t);n._round(),r&&!rc(e,n,o,r,i)||p.push(n)}}d+=m}return s||p.length||a||(p=cc(e,d/2,n,r,i,o,a,!0,l)),p}function uc(e,t,n,r,i){const o=[];for(let a=0;a<e.length;a++){const s=e[a];let l;for(let e=0;e<s.length-1;e++){let a=s[e],c=s[e+1];a.x<t&&c.x<t||(a.x<t?a=new C(t,a.y+(t-a.x)/(c.x-a.x)*(c.y-a.y))._round():c.x<t&&(c=new C(t,a.y+(t-a.x)/(c.x-a.x)*(c.y-a.y))._round()),a.y<n&&c.y<n||(a.y<n?a=new C(a.x+(n-a.y)/(c.y-a.y)*(c.x-a.x),n)._round():c.y<n&&(c=new C(a.x+(n-a.y)/(c.y-a.y)*(c.x-a.x),n)._round()),a.x>=r&&c.x>=r||(a.x>=r?a=new C(r,a.y+(r-a.x)/(c.x-a.x)*(c.y-a.y))._round():c.x>=r&&(c=new C(r,a.y+(r-a.x)/(c.x-a.x)*(c.y-a.y))._round()),a.y>=i&&c.y>=i||(a.y>=i?a=new C(a.x+(i-a.y)/(c.y-a.y)*(c.x-a.x),i)._round():c.y>=i&&(c=new C(a.x+(i-a.y)/(c.y-a.y)*(c.x-a.x),i)._round()),l&&a.equals(l[l.length-1])||(l=[a],o.push(l)),l.push(c)))))}}return o}function dc(e,t,n,r){const i=[],o=e.image,a=o.pixelRatio,s=o.paddedRect.w-2,l=o.paddedRect.h-2,c=e.right-e.left,u=e.bottom-e.top,d=o.stretchX||[[0,s]],h=o.stretchY||[[0,l]],p=(e,t)=>e+t[1]-t[0],m=d.reduce(p,0),g=h.reduce(p,0),f=s-m,_=l-g;let b=0,v=m,y=0,E=g,S=0,w=f,T=0,x=_;if(o.content&&r){const e=o.content;b=hc(d,0,e[0]),y=hc(h,0,e[1]),v=hc(d,e[0],e[2]),E=hc(h,e[1],e[3]),S=e[0]-b,T=e[1]-y,w=e[2]-e[0]-v,x=e[3]-e[1]-E}const F=(r,i,s,l)=>{const d=mc(r.stretch-b,v,c,e.left),h=gc(r.fixed-S,w,r.stretch,m),p=mc(i.stretch-y,E,u,e.top),f=gc(i.fixed-T,x,i.stretch,g),_=mc(s.stretch-b,v,c,e.left),F=gc(s.fixed-S,w,s.stretch,m),D=mc(l.stretch-y,E,u,e.top),k=gc(l.fixed-T,x,l.stretch,g),O=new C(d,p),I=new C(_,p),A=new C(_,D),R=new C(d,D),N=new C(h/a,f/a),M=new C(F/a,k/a),P=t*Math.PI/180;if(P){const e=Math.sin(P),t=Math.cos(P),n=[t,-e,e,t];O._matMult(n),I._matMult(n),R._matMult(n),A._matMult(n)}const L=r.stretch+r.fixed,B=i.stretch+i.fixed;return{tl:O,tr:I,bl:R,br:A,tex:{x:o.paddedRect.x+1+L,y:o.paddedRect.y+1+B,w:s.stretch+s.fixed-L,h:l.stretch+l.fixed-B},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:N,pixelOffsetBR:M,minFontScaleX:w/a/c,minFontScaleY:x/a/u,isSDF:n}};if(r&&(o.stretchX||o.stretchY)){const e=pc(d,f,m),t=pc(h,_,g);for(let n=0;n<e.length-1;n++){const r=e[n],o=e[n+1];for(let e=0;e<t.length-1;e++)i.push(F(r,t[e],o,t[e+1]))}}else i.push(F({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:s+1},{fixed:0,stretch:l+1}));return i}function hc(e,t,n){let r=0;for(const i of e)r+=Math.max(t,Math.min(n,i[1]))-Math.max(t,Math.min(n,i[0]));return r}function pc(e,t,n){const r=[{fixed:-1,stretch:0}];for(const[t,n]of e){const e=r[r.length-1];r.push({fixed:t-e.stretch,stretch:e.stretch}),r.push({fixed:t-e.stretch,stretch:e.stretch+(n-t)})}return r.push({fixed:t+1,stretch:n}),r}function mc(e,t,n,r){return e/t*n+r}function gc(e,t,n,r){return e-t*n/r}Fr("Anchor",nc);class fc{constructor(e,t,n,r,i,o,a,s,l,c){if(this.boxStartIndex=e.length,l){let e=o.top,t=o.bottom;const n=o.collisionPadding;n&&(e-=n[1],t+=n[3]);let r=t-e;r>0&&(r=Math.max(10,r),this.circleDiameter=r)}else{let l=o.top*a-s[0],u=o.bottom*a+s[2],d=o.left*a-s[3],h=o.right*a+s[1];const p=o.collisionPadding;if(p&&(d-=p[0]*a,l-=p[1]*a,h+=p[2]*a,u+=p[3]*a),c){const e=new C(d,l),t=new C(h,l),n=new C(d,u),r=new C(h,u),i=c*Math.PI/180;e._rotate(i),t._rotate(i),n._rotate(i),r._rotate(i),d=Math.min(e.x,t.x,n.x,r.x),h=Math.max(e.x,t.x,n.x,r.x),l=Math.min(e.y,t.y,n.y,r.y),u=Math.max(e.y,t.y,n.y,r.y)}e.emplaceBack(t.x,t.y,d,l,h,u,n,r,i)}this.boxEndIndex=e.length}}class _c{constructor(e=[],t=bc){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let e=(this.length>>1)-1;e>=0;e--)this._down(e)}push(e){this.data.push(e),this.length++,this._up(this.length-1)}pop(){if(0===this.length)return;const e=this.data[0],t=this.data.pop();return this.length--,this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){const{data:t,compare:n}=this,r=t[e];for(;e>0;){const i=e-1>>1,o=t[i];if(n(r,o)>=0)break;t[e]=o,e=i}t[e]=r}_down(e){const{data:t,compare:n}=this,r=this.length>>1,i=t[e];for(;e<r;){let r=1+(e<<1),o=t[r];const a=r+1;if(a<this.length&&n(t[a],o)<0&&(r=a,o=t[a]),n(o,i)>=0)break;t[e]=o,e=r}t[e]=i}}function bc(e,t){return e<t?-1:e>t?1:0}function vc(e,t=1,n=!1){let r=1/0,i=1/0,o=-1/0,a=-1/0;const s=e[0];for(let e=0;e<s.length;e++){const t=s[e];(!e||t.x<r)&&(r=t.x),(!e||t.y<i)&&(i=t.y),(!e||t.x>o)&&(o=t.x),(!e||t.y>a)&&(a=t.y)}const l=Math.min(o-r,a-i);let c=l/2;const u=new _c([],yc);if(0===l)return new C(r,i);for(let t=r;t<o;t+=l)for(let n=i;n<a;n+=l)u.push(new Ec(t+c,n+c,c,e));let d=function(e){let t=0,n=0,r=0;const i=e[0];for(let e=0,o=i.length,a=o-1;e<o;a=e++){const o=i[e],s=i[a],l=o.x*s.y-s.x*o.y;n+=(o.x+s.x)*l,r+=(o.y+s.y)*l,t+=3*l}return new Ec(n/t,r/t,0,e)}(e),h=u.length;for(;u.length;){const r=u.pop();(r.d>d.d||!d.d)&&(d=r,n&&console.log("found best %d after %d probes",Math.round(1e4*r.d)/1e4,h)),r.max-d.d<=t||(c=r.h/2,u.push(new Ec(r.p.x-c,r.p.y-c,c,e)),u.push(new Ec(r.p.x+c,r.p.y-c,c,e)),u.push(new Ec(r.p.x-c,r.p.y+c,c,e)),u.push(new Ec(r.p.x+c,r.p.y+c,c,e)),h+=4)}return n&&(console.log(`num probes: ${h}`),console.log(`best distance: ${d.d}`)),d.p}function yc(e,t){return t.max-e.max}function Ec(e,t,n,r){this.p=new C(e,t),this.h=n,this.d=function(e,t){let n=!1,r=1/0;for(let i=0;i<t.length;i++){const o=t[i];for(let t=0,i=o.length,a=i-1;t<i;a=t++){const i=o[t],s=o[a];i.y>e.y!=s.y>e.y&&e.x<(s.x-i.x)*(e.y-i.y)/(s.y-i.y)+i.x&&(n=!n),r=Math.min(r,ra(e,i,s))}}return(n?1:-1)*Math.sqrt(r)}(this.p,r),this.max=this.d+this.h*Math.SQRT2}const Sc=Number.POSITIVE_INFINITY;function wc(e,t){return t[1]!==Sc?function(e,t,n){let r=0,i=0;switch(t=Math.abs(t),n=Math.abs(n),e){case"top-right":case"top-left":case"top":i=n-7;break;case"bottom-right":case"bottom-left":case"bottom":i=7-n}switch(e){case"top-right":case"bottom-right":case"right":r=-t;break;case"top-left":case"bottom-left":case"left":r=t}return[r,i]}(e,t[0],t[1]):function(e,t){let n=0,r=0;t<0&&(t=0);const i=t/Math.sqrt(2);switch(e){case"top-right":case"top-left":r=i-7;break;case"bottom-right":case"bottom-left":r=7-i;break;case"bottom":r=7-t;break;case"top":r=t-7}switch(e){case"top-right":case"bottom-right":n=-i;break;case"top-left":case"bottom-left":n=i;break;case"left":n=t;break;case"right":n=-t}return[n,r]}(e,t[0])}function Tc(e){switch(e){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function Cc(t,n,r,i,o,a,s,l,c,u,d){let h=a.textMaxSize.evaluate(n,{});void 0===h&&(h=s);const p=t.layers[0].layout,g=p.get("icon-offset").evaluate(n,{},d),f=Dc(r.horizontal),_=s/24,b=t.tilePixelRatio*_,v=t.tilePixelRatio*h/24,y=t.tilePixelRatio*l,E=t.tilePixelRatio*p.get("symbol-spacing"),S=p.get("text-padding")*t.tilePixelRatio,w=function(e,t,n,r=1){const i=e.get("icon-padding").evaluate(t,{},n),o=i&&i.values;return[o[0]*r,o[1]*r,o[2]*r,o[3]*r]}(p,n,d,t.tilePixelRatio),T=p.get("text-max-angle")/180*Math.PI,C="viewport"!==p.get("text-rotation-alignment")&&"point"!==p.get("symbol-placement"),x="map"===p.get("icon-rotation-alignment")&&"point"!==p.get("symbol-placement"),F=p.get("symbol-placement"),D=E/2,k=p.get("icon-text-fit");let O;i&&"none"!==k&&(t.allowVerticalPlacement&&r.vertical&&(O=Jl(i,r.vertical,k,p.get("icon-text-fit-padding"),g,_)),f&&(i=Jl(i,f,k,p.get("icon-text-fit-padding"),g,_)));const I=(l,h)=>{h.x<0||h.x>=Ho||h.y<0||h.y>=Ho||function(t,n,r,i,o,a,s,l,c,u,d,h,p,g,f,_,b,v,y,E,S,w,T,C,x){const F=t.addToLineVertexArray(n,r);let D,k,O,I,A=0,R=0,N=0,M=0,P=-1,L=-1;const B={};let U=vo.exports(""),j=0,G=0;if(void 0===l._unevaluatedLayout.getValue("text-radial-offset")?[j,G]=l.layout.get("text-offset").evaluate(S,{},C).map((e=>e*ll)):(j=l.layout.get("text-radial-offset").evaluate(S,{},C)*ll,G=Sc),t.allowVerticalPlacement&&i.vertical){const e=l.layout.get("text-rotate").evaluate(S,{},C)+90;O=new fc(c,n,u,d,h,i.vertical,p,g,f,e),s&&(I=new fc(c,n,u,d,h,s,b,v,f,e))}if(o){const r=l.layout.get("icon-rotate").evaluate(S,{}),i="none"!==l.layout.get("icon-text-fit"),a=dc(o,r,T,i),p=s?dc(s,r,T,i):void 0;k=new fc(c,n,u,d,h,o,b,v,!1,r),A=4*a.length;const g=t.iconSizeData;let f=null;"source"===g.kind?(f=[ec*l.layout.get("icon-size").evaluate(S,{})],f[0]>xc&&m(`${t.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):"composite"===g.kind&&(f=[ec*w.compositeIconSizes[0].evaluate(S,{},C),ec*w.compositeIconSizes[1].evaluate(S,{},C)],(f[0]>xc||f[1]>xc)&&m(`${t.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),t.addSymbols(t.icon,a,f,E,y,S,e.WritingMode.none,n,F.lineStartIndex,F.lineLength,-1,C),P=t.icon.placedSymbolArray.length-1,p&&(R=4*p.length,t.addSymbols(t.icon,p,f,E,y,S,e.WritingMode.vertical,n,F.lineStartIndex,F.lineLength,-1,C),L=t.icon.placedSymbolArray.length-1)}const z=Object.keys(i.horizontal);for(const r of z){const o=i.horizontal[r];if(!D){U=vo.exports(o.text);const e=l.layout.get("text-rotate").evaluate(S,{},C);D=new fc(c,n,u,d,h,o,p,g,f,e)}const s=1===o.positionedLines.length;if(N+=Fc(t,n,o,a,l,f,S,_,F,i.vertical?e.WritingMode.horizontal:e.WritingMode.horizontalOnly,s?z:[r],B,P,w,C),s)break}i.vertical&&(M+=Fc(t,n,i.vertical,a,l,f,S,_,F,e.WritingMode.vertical,["vertical"],B,L,w,C));const H=D?D.boxStartIndex:t.collisionBoxArray.length,q=D?D.boxEndIndex:t.collisionBoxArray.length,V=O?O.boxStartIndex:t.collisionBoxArray.length,$=O?O.boxEndIndex:t.collisionBoxArray.length,K=k?k.boxStartIndex:t.collisionBoxArray.length,W=k?k.boxEndIndex:t.collisionBoxArray.length,Y=I?I.boxStartIndex:t.collisionBoxArray.length,Q=I?I.boxEndIndex:t.collisionBoxArray.length;let X=-1;const Z=(e,t)=>e&&e.circleDiameter?Math.max(e.circleDiameter,t):t;X=Z(D,X),X=Z(O,X),X=Z(k,X),X=Z(I,X);const J=X>-1?1:0;J&&(X*=x/ll),t.glyphOffsetArray.length>=Lc.MAX_GLYPHS&&m("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==S.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,S.sortKey),t.symbolInstances.emplaceBack(n.x,n.y,B.right>=0?B.right:-1,B.center>=0?B.center:-1,B.left>=0?B.left:-1,B.vertical||-1,P,L,U,H,q,V,$,K,W,Y,Q,u,N,M,A,R,J,0,p,j,G,X)}(t,h,l,r,i,o,O,t.layers[0],t.collisionBoxArray,n.index,n.sourceLayerIndex,t.index,b,[S,S,S,S],C,c,y,w,x,g,n,a,u,d,s)};if("line"===F)for(const e of uc(n.geometry,0,0,Ho,Ho)){const n=lc(e,E,T,r.vertical||f,i,24,v,t.overscaling,Ho);for(const r of n)f&&kc(t,f.text,D,r)||I(e,r)}else if("line-center"===F){for(const e of n.geometry)if(e.length>1){const t=sc(e,T,r.vertical||f,i,24,v);t&&I(e,t)}}else if("Polygon"===n.type)for(const e of hs(n.geometry,0)){const t=vc(e,16);I(e[0],new nc(t.x,t.y,0))}else if("LineString"===n.type)for(const e of n.geometry)I(e,new nc(e[0].x,e[0].y,0));else if("Point"===n.type)for(const e of n.geometry)for(const t of e)I([t],new nc(t.x,t.y,0))}const xc=32640;function Fc(e,t,n,r,i,o,a,s,l,c,u,d,h,p,g){const f=function(e,t,n,r,i,o,a,s){const l=r.layout.get("text-rotate").evaluate(o,{})*Math.PI/180,c=[];for(const e of t.positionedLines)for(const r of e.positionedGlyphs){if(!r.rect)continue;const o=r.rect||{};let u=4,d=!0,h=1,p=0;const m=(i||s)&&r.vertical,g=r.metrics.advance*r.scale/2;if(s&&t.verticalizable){const t=(r.scale-1)*ll,n=(ll-r.metrics.width*r.scale)/2;p=e.lineOffset/2-(r.imageName?-n:t)}if(r.imageName){const e=a[r.imageName];d=e.sdf,h=e.pixelRatio,u=1/h}const f=i?[r.x+g,r.y]:[0,0];let _=i?[0,0]:[r.x+g+n[0],r.y+n[1]-p],b=[0,0];m&&(b=_,_=[0,0]);const v=(r.metrics.left-u)*r.scale-g+_[0],y=(-r.metrics.top-u)*r.scale+_[1],E=v+o.w*r.scale/h,S=y+o.h*r.scale/h,w=new C(v,y),T=new C(E,y),x=new C(v,S),F=new C(E,S);if(m){const e=new C(-g,g-Bl),t=-Math.PI/2,n=12-g,i=new C(22-n,-(r.imageName?n:0)),o=new C(...b);w._rotateAround(t,e)._add(i)._add(o),T._rotateAround(t,e)._add(i)._add(o),x._rotateAround(t,e)._add(i)._add(o),F._rotateAround(t,e)._add(i)._add(o)}if(l){const e=Math.sin(l),t=Math.cos(l),n=[t,-e,e,t];w._matMult(n),T._matMult(n),x._matMult(n),F._matMult(n)}const D=new C(0,0),k=new C(0,0);c.push({tl:w,tr:T,bl:x,br:F,tex:o,writingMode:t.writingMode,glyphOffset:f,sectionIndex:r.sectionIndex,isSDF:d,pixelOffsetTL:D,pixelOffsetBR:k,minFontScaleX:0,minFontScaleY:0})}return c}(0,n,s,i,o,a,r,e.allowVerticalPlacement),_=e.textSizeData;let b=null;"source"===_.kind?(b=[ec*i.layout.get("text-size").evaluate(a,{})],b[0]>xc&&m(`${e.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):"composite"===_.kind&&(b=[ec*p.compositeTextSizes[0].evaluate(a,{},g),ec*p.compositeTextSizes[1].evaluate(a,{},g)],(b[0]>xc||b[1]>xc)&&m(`${e.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),e.addSymbols(e.text,f,b,s,o,a,c,t,l.lineStartIndex,l.lineLength,h,g);for(const t of u)d[t]=e.text.placedSymbolArray.length-1;return 4*f.length}function Dc(e){for(const t in e)return e[t];return null}function kc(e,t,n,r){const i=e.compareText;if(t in i){const e=i[t];for(let t=e.length-1;t>=0;t--)if(r.dist(e[t])<n)return!0}else i[t]=[];return i[t].push(r),!1}const Oc=Ss.VectorTileFeature.types,Ic=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function Ac(e,t,n,r,i,o,a,s,l,c,u,d,h){const p=s?Math.min(xc,Math.round(s[0])):0,m=s?Math.min(xc,Math.round(s[1])):0;e.emplaceBack(t,n,Math.round(32*r),Math.round(32*i),o,a,(p<<1)+(l?1:0),m,16*c,16*u,256*d,256*h)}function Rc(e,t,n){e.emplaceBack(t.x,t.y,n),e.emplaceBack(t.x,t.y,n),e.emplaceBack(t.x,t.y,n),e.emplaceBack(t.x,t.y,n)}function Nc(e){for(const t of e.sections)if(jr(t.text))return!0;return!1}class Mc{constructor(e){this.layoutVertexArray=new ao,this.indexArray=new ho,this.programConfigurations=e,this.segments=new fo,this.dynamicLayoutVertexArray=new so,this.opacityVertexArray=new lo,this.placedSymbolArray=new $i}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.indexArray.length&&0===this.dynamicLayoutVertexArray.length&&0===this.opacityVertexArray.length}upload(e,t,n,r){this.isEmpty()||(n&&(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,tl.members),this.indexBuffer=e.createIndexBuffer(this.indexArray,t),this.dynamicLayoutVertexBuffer=e.createVertexBuffer(this.dynamicLayoutVertexArray,nl.members,!0),this.opacityVertexBuffer=e.createVertexBuffer(this.opacityVertexArray,Ic,!0),this.opacityVertexBuffer.itemSize=1),(n||r)&&this.programConfigurations.upload(e))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}Fr("SymbolBuffers",Mc);class Pc{constructor(e,t,n){this.layoutVertexArray=new e,this.layoutAttributes=t,this.indexArray=new n,this.segments=new fo,this.collisionVertexArray=new uo}upload(e){this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=e.createVertexBuffer(this.collisionVertexArray,rl.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}Fr("CollisionBuffers",Pc);class Lc{constructor(t){this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((e=>e.id)),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=ga([]),this.placementViewportMatrix=ga([]);const n=this.layers[0]._unevaluatedLayout._values;this.textSizeData=tc(this.zoom,n["text-size"]),this.iconSizeData=tc(this.zoom,n["icon-size"]);const r=this.layers[0].layout,i=r.get("symbol-sort-key"),o=r.get("symbol-z-order");this.canOverlap="never"!==zc(r,"text-overlap","text-allow-overlap")||"never"!==zc(r,"icon-overlap","icon-allow-overlap")||r.get("text-ignore-placement")||r.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==o&&!i.isConstant(),this.sortFeaturesByY=("viewport-y"===o||"auto"===o&&!this.sortFeaturesByKey)&&this.canOverlap,"point"===r.get("symbol-placement")&&(this.writingModes=r.get("text-writing-mode").map((t=>e.WritingMode[t]))),this.stateDependentLayerIds=this.layers.filter((e=>e.isStateDependent())).map((e=>e.id)),this.sourceID=t.sourceID}createArrays(){this.text=new Mc(new jo(this.layers,this.zoom,(e=>/^text/.test(e)))),this.icon=new Mc(new jo(this.layers,this.zoom,(e=>/^icon/.test(e)))),this.glyphOffsetArray=new Yi,this.lineVertexArray=new Qi,this.symbolInstances=new Wi}calculateGlyphDependencies(e,t,n,r,i){for(let o=0;o<e.length;o++)if(t[e.charCodeAt(o)]=!0,(n||r)&&i){const n=sl[e.charAt(o)];n&&(t[n.charCodeAt(0)]=!0)}}populate(t,n,r){const i=this.layers[0],o=i.layout,a=o.get("text-font"),s=o.get("text-field"),l=o.get("icon-image"),c=("constant"!==s.value.kind||s.value.value instanceof Le&&!s.value.value.isEmpty()||s.value.value.toString().length>0)&&("constant"!==a.value.kind||a.value.value.length>0),u="constant"!==l.value.kind||!!l.value.value||Object.keys(l.parameters).length>0,d=o.get("symbol-sort-key");if(this.features=[],!c&&!u)return;const h=n.iconDependencies,p=n.glyphDependencies,m=n.availableImages,g=new Jr(this.zoom);for(const{feature:n,id:s,index:l,sourceLayerIndex:f}of t){const t=i._featureFilter.needGeometry,_=Ko(n,t);if(!i._featureFilter.filter(g,_,r))continue;let b,v;if(t||(_.geometry=$o(n)),c){const e=i.getValueAndResolveTokens("text-field",_,r,m),t=Le.factory(e);Nc(t)&&(this.hasRTLText=!0),(!this.hasRTLText||"unavailable"===Qr()||this.hasRTLText&&Zr.isParsed())&&(b=al(t,i,_))}if(u){const e=i.getValueAndResolveTokens("icon-image",_,r,m);v=e instanceof Ue?e:Ue.fromString(e)}if(!b&&!v)continue;const y=this.sortFeaturesByKey?d.evaluate(_,{},r):void 0;if(this.features.push({id:s,text:b,icon:v,index:l,sourceLayerIndex:f,geometry:_.geometry,properties:n.properties,type:Oc[n.type],sortKey:y}),v&&(h[v.name]=!0),b){const t=a.evaluate(_,{},r).join(","),n="viewport"!==o.get("text-rotation-alignment")&&"point"!==o.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(e.WritingMode.vertical)>=0;for(const e of b.sections)if(e.image)h[e.image.name]=!0;else{const r=Rr(b.toString()),i=e.fontStack||t,o=p[i]=p[i]||{};this.calculateGlyphDependencies(e.text,o,n,this.allowVerticalPlacement,r)}}}"line"===o.get("symbol-placement")&&(this.features=function(e){const t={},n={},r=[];let i=0;function o(t){r.push(e[t]),i++}function a(e,t,i){const o=n[e];return delete n[e],n[t]=o,r[o].geometry[0].pop(),r[o].geometry[0]=r[o].geometry[0].concat(i[0]),o}function s(e,n,i){const o=t[n];return delete t[n],t[e]=o,r[o].geometry[0].shift(),r[o].geometry[0]=i[0].concat(r[o].geometry[0]),o}function l(e,t,n){const r=n?t[0][t[0].length-1]:t[0][0];return`${e}:${r.x}:${r.y}`}for(let c=0;c<e.length;c++){const u=e[c],d=u.geometry,h=u.text?u.text.toString():null;if(!h){o(c);continue}const p=l(h,d),m=l(h,d,!0);if(p in n&&m in t&&n[p]!==t[m]){const e=s(p,m,d),i=a(p,m,r[e].geometry);delete t[p],delete n[m],n[l(h,r[i].geometry,!0)]=i,r[e].geometry=null}else p in n?a(p,m,d):m in t?s(p,m,d):(o(c),t[p]=i-1,n[m]=i-1)}return r.filter((e=>e.geometry))}(this.features)),this.sortFeaturesByKey&&this.features.sort(((e,t)=>e.sortKey-t.sortKey))}update(e,t,n){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,t,this.layers,n),this.icon.programConfigurations.updatePaintArrays(e,t,this.layers,n))}isEmpty(){return 0===this.symbolInstances.length&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(e){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(e),this.iconCollisionBox.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(e,t){const n=this.lineVertexArray.length;if(void 0!==e.segment){let n=e.dist(t[e.segment+1]),r=e.dist(t[e.segment]);const i={};for(let r=e.segment+1;r<t.length;r++)i[r]={x:t[r].x,y:t[r].y,tileUnitDistanceFromAnchor:n},r<t.length-1&&(n+=t[r+1].dist(t[r]));for(let n=e.segment||0;n>=0;n--)i[n]={x:t[n].x,y:t[n].y,tileUnitDistanceFromAnchor:r},n>0&&(r+=t[n-1].dist(t[n]));for(let e=0;e<t.length;e++){const t=i[e];this.lineVertexArray.emplaceBack(t.x,t.y,t.tileUnitDistanceFromAnchor)}}return{lineStartIndex:n,lineLength:this.lineVertexArray.length-n}}addSymbols(t,n,r,i,o,a,s,l,c,u,d,h){const p=t.indexArray,m=t.layoutVertexArray,g=t.segments.prepareSegment(4*n.length,m,p,this.canOverlap?a.sortKey:void 0),f=this.glyphOffsetArray.length,_=g.vertexLength,b=this.allowVerticalPlacement&&s===e.WritingMode.vertical?Math.PI/2:0,v=a.text&&a.text.sections;for(let e=0;e<n.length;e++){const{tl:i,tr:o,bl:s,br:c,tex:u,pixelOffsetTL:d,pixelOffsetBR:f,minFontScaleX:_,minFontScaleY:y,glyphOffset:E,isSDF:S,sectionIndex:w}=n[e],T=g.vertexLength,C=E[1];Ac(m,l.x,l.y,i.x,C+i.y,u.x,u.y,r,S,d.x,d.y,_,y),Ac(m,l.x,l.y,o.x,C+o.y,u.x+u.w,u.y,r,S,f.x,d.y,_,y),Ac(m,l.x,l.y,s.x,C+s.y,u.x,u.y+u.h,r,S,d.x,f.y,_,y),Ac(m,l.x,l.y,c.x,C+c.y,u.x+u.w,u.y+u.h,r,S,f.x,f.y,_,y),Rc(t.dynamicLayoutVertexArray,l,b),p.emplaceBack(T,T+1,T+2),p.emplaceBack(T+1,T+2,T+3),g.vertexLength+=4,g.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(E[0]),e!==n.length-1&&w===n[e+1].sectionIndex||t.programConfigurations.populatePaintArrays(m.length,a,a.index,{},h,v&&v[w])}t.placedSymbolArray.emplaceBack(l.x,l.y,f,this.glyphOffsetArray.length-f,_,c,u,l.segment,r?r[0]:0,r?r[1]:0,i[0],i[1],s,0,!1,0,d)}_addCollisionDebugVertex(e,t,n,r,i,o){return t.emplaceBack(0,0),e.emplaceBack(n.x,n.y,r,i,Math.round(o.x),Math.round(o.y))}addCollisionDebugVertices(e,t,n,r,i,o,a){const s=i.segments.prepareSegment(4,i.layoutVertexArray,i.indexArray),l=s.vertexLength,c=i.layoutVertexArray,u=i.collisionVertexArray,d=a.anchorX,h=a.anchorY;this._addCollisionDebugVertex(c,u,o,d,h,new C(e,t)),this._addCollisionDebugVertex(c,u,o,d,h,new C(n,t)),this._addCollisionDebugVertex(c,u,o,d,h,new C(n,r)),this._addCollisionDebugVertex(c,u,o,d,h,new C(e,r)),s.vertexLength+=4;const p=i.indexArray;p.emplaceBack(l,l+1),p.emplaceBack(l+1,l+2),p.emplaceBack(l+2,l+3),p.emplaceBack(l+3,l),s.primitiveLength+=4}addDebugCollisionBoxes(e,t,n,r){for(let i=e;i<t;i++){const e=this.collisionBoxArray.get(i);this.addCollisionDebugVertices(e.x1,e.y1,e.x2,e.y2,r?this.textCollisionBox:this.iconCollisionBox,e.anchorPoint,n)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new Pc(co,il.members,po),this.iconCollisionBox=new Pc(co,il.members,po);for(let e=0;e<this.symbolInstances.length;e++){const t=this.symbolInstances.get(e);this.addDebugCollisionBoxes(t.textBoxStartIndex,t.textBoxEndIndex,t,!0),this.addDebugCollisionBoxes(t.verticalTextBoxStartIndex,t.verticalTextBoxEndIndex,t,!0),this.addDebugCollisionBoxes(t.iconBoxStartIndex,t.iconBoxEndIndex,t,!1),this.addDebugCollisionBoxes(t.verticalIconBoxStartIndex,t.verticalIconBoxEndIndex,t,!1)}}_deserializeCollisionBoxesForSymbol(e,t,n,r,i,o,a,s,l){const c={};for(let r=t;r<n;r++){const t=e.get(r);c.textBox={x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,anchorPointX:t.anchorPointX,anchorPointY:t.anchorPointY},c.textFeatureIndex=t.featureIndex;break}for(let t=r;t<i;t++){const n=e.get(t);c.verticalTextBox={x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y2,anchorPointX:n.anchorPointX,anchorPointY:n.anchorPointY},c.verticalTextFeatureIndex=n.featureIndex;break}for(let t=o;t<a;t++){const n=e.get(t);c.iconBox={x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y2,anchorPointX:n.anchorPointX,anchorPointY:n.anchorPointY},c.iconFeatureIndex=n.featureIndex;break}for(let t=s;t<l;t++){const n=e.get(t);c.verticalIconBox={x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y2,anchorPointX:n.anchorPointX,anchorPointY:n.anchorPointY},c.verticalIconFeatureIndex=n.featureIndex;break}return c}deserializeCollisionBoxes(e){this.collisionArrays=[];for(let t=0;t<this.symbolInstances.length;t++){const n=this.symbolInstances.get(t);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(e,n.textBoxStartIndex,n.textBoxEndIndex,n.verticalTextBoxStartIndex,n.verticalTextBoxEndIndex,n.iconBoxStartIndex,n.iconBoxEndIndex,n.verticalIconBoxStartIndex,n.verticalIconBoxEndIndex))}}hasTextData(){return this.text.segments.get().length>0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(e,t){const n=e.placedSymbolArray.get(t),r=n.vertexStartIndex+4*n.numGlyphs;for(let t=n.vertexStartIndex;t<r;t+=4)e.indexArray.emplaceBack(t,t+1,t+2),e.indexArray.emplaceBack(t+1,t+2,t+3)}getSortedSymbolIndexes(e){if(this.sortedAngle===e&&void 0!==this.symbolInstanceIndexes)return this.symbolInstanceIndexes;const t=Math.sin(e),n=Math.cos(e),r=[],i=[],o=[];for(let e=0;e<this.symbolInstances.length;++e){o.push(e);const a=this.symbolInstances.get(e);r.push(0|Math.round(t*a.anchorX+n*a.anchorY)),i.push(a.featureIndex)}return o.sort(((e,t)=>r[e]-r[t]||i[t]-i[e])),o}addToSortKeyRanges(e,t){const n=this.sortKeyRanges[this.sortKeyRanges.length-1];n&&n.sortKey===t?n.symbolInstanceEnd=e+1:this.sortKeyRanges.push({sortKey:t,symbolInstanceStart:e,symbolInstanceEnd:e+1})}sortFeatures(e){if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const e of this.symbolInstanceIndexes){const t=this.symbolInstances.get(e);this.featureSortOrder.push(t.featureIndex),[t.rightJustifiedTextSymbolIndex,t.centerJustifiedTextSymbolIndex,t.leftJustifiedTextSymbolIndex].forEach(((e,t,n)=>{e>=0&&n.indexOf(e)===t&&this.addIndicesForPlacedSymbol(this.text,e)})),t.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,t.verticalPlacedTextSymbolIndex),t.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,t.placedIconSymbolIndex),t.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,t.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}Fr("SymbolBucket",Lc,{omit:["layers","collisionBoxArray","features","compareText"]}),Lc.MAX_GLYPHS=65535,Lc.addDynamicAttributes=Rc;const Bc=new pi({"symbol-placement":new li(re.layout_symbol["symbol-placement"]),"symbol-spacing":new li(re.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new li(re.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new ci(re.layout_symbol["symbol-sort-key"]),"symbol-z-order":new li(re.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new li(re.layout_symbol["icon-allow-overlap"]),"icon-overlap":new li(re.layout_symbol["icon-overlap"]),"icon-ignore-placement":new li(re.layout_symbol["icon-ignore-placement"]),"icon-optional":new li(re.layout_symbol["icon-optional"]),"icon-rotation-alignment":new li(re.layout_symbol["icon-rotation-alignment"]),"icon-size":new ci(re.layout_symbol["icon-size"]),"icon-text-fit":new li(re.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new li(re.layout_symbol["icon-text-fit-padding"]),"icon-image":new ci(re.layout_symbol["icon-image"]),"icon-rotate":new ci(re.layout_symbol["icon-rotate"]),"icon-padding":new ci(re.layout_symbol["icon-padding"]),"icon-keep-upright":new li(re.layout_symbol["icon-keep-upright"]),"icon-offset":new ci(re.layout_symbol["icon-offset"]),"icon-anchor":new ci(re.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new li(re.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new li(re.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new li(re.layout_symbol["text-rotation-alignment"]),"text-field":new ci(re.layout_symbol["text-field"]),"text-font":new ci(re.layout_symbol["text-font"]),"text-size":new ci(re.layout_symbol["text-size"]),"text-max-width":new ci(re.layout_symbol["text-max-width"]),"text-line-height":new li(re.layout_symbol["text-line-height"]),"text-letter-spacing":new ci(re.layout_symbol["text-letter-spacing"]),"text-justify":new ci(re.layout_symbol["text-justify"]),"text-radial-offset":new ci(re.layout_symbol["text-radial-offset"]),"text-variable-anchor":new li(re.layout_symbol["text-variable-anchor"]),"text-anchor":new ci(re.layout_symbol["text-anchor"]),"text-max-angle":new li(re.layout_symbol["text-max-angle"]),"text-writing-mode":new li(re.layout_symbol["text-writing-mode"]),"text-rotate":new ci(re.layout_symbol["text-rotate"]),"text-padding":new li(re.layout_symbol["text-padding"]),"text-keep-upright":new li(re.layout_symbol["text-keep-upright"]),"text-transform":new ci(re.layout_symbol["text-transform"]),"text-offset":new ci(re.layout_symbol["text-offset"]),"text-allow-overlap":new li(re.layout_symbol["text-allow-overlap"]),"text-overlap":new li(re.layout_symbol["text-overlap"]),"text-ignore-placement":new li(re.layout_symbol["text-ignore-placement"]),"text-optional":new li(re.layout_symbol["text-optional"])});var Uc={paint:new pi({"icon-opacity":new ci(re.paint_symbol["icon-opacity"]),"icon-color":new ci(re.paint_symbol["icon-color"]),"icon-halo-color":new ci(re.paint_symbol["icon-halo-color"]),"icon-halo-width":new ci(re.paint_symbol["icon-halo-width"]),"icon-halo-blur":new ci(re.paint_symbol["icon-halo-blur"]),"icon-translate":new li(re.paint_symbol["icon-translate"]),"icon-translate-anchor":new li(re.paint_symbol["icon-translate-anchor"]),"text-opacity":new ci(re.paint_symbol["text-opacity"]),"text-color":new ci(re.paint_symbol["text-color"],{runtimeType:ge,getOverride:e=>e.textColor,hasOverride:e=>!!e.textColor}),"text-halo-color":new ci(re.paint_symbol["text-halo-color"]),"text-halo-width":new ci(re.paint_symbol["text-halo-width"]),"text-halo-blur":new ci(re.paint_symbol["text-halo-blur"]),"text-translate":new li(re.paint_symbol["text-translate"]),"text-translate-anchor":new li(re.paint_symbol["text-translate-anchor"])}),layout:Bc};class jc{constructor(e){if(void 0===e.property.overrides)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=e.property.overrides?e.property.overrides.runtimeType:de,this.defaultValue=e}evaluate(e){if(e.formattedSection){const t=this.defaultValue.property.overrides;if(t&&t.hasOverride(e.formattedSection))return t.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default}eachChild(e){this.defaultValue.isConstant()||e(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Fr("FormatSectionOverride",jc,{omit:["defaultValue"]});class Gc extends gi{constructor(e){super(e,Uc)}recalculate(e,t){if(super.recalculate(e,t),"auto"===this.layout.get("icon-rotation-alignment")&&(this.layout._values["icon-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]="map"===this.layout.get("text-rotation-alignment")?"map":"viewport"),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){const e=this.layout.get("text-writing-mode");if(e){const t=[];for(const n of e)t.indexOf(n)<0&&t.push(n);this.layout._values["text-writing-mode"]=t}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(e,t,n,r){const i=this.layout.get(e).evaluate(t,{},n,r),o=this._unevaluatedLayout._values[e];return o.isDataDriven()||Nn(o.value)||!i?i:function(e,t){return t.replace(/{([^{}]+)}/g,((t,n)=>n in e?String(e[n]):""))}(t.properties,i)}createBucket(e){return new Lc(e)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const e of Uc.paint.overridableProperties){if(!Gc.hasPaintOverride(this.layout,e))continue;const t=this.paint.get(e),n=new jc(t),r=new Rn(n,t.property.specification);let i=null;i="constant"===t.value.kind||"source"===t.value.kind?new Pn("source",r):new Ln("composite",r,t.value.zoomStops),this.paint._values[e]=new ai(t.property,i,t.parameters)}}_handleOverridablePaintPropertyUpdate(e,t,n){return!(!this.layout||t.isDataDriven()||n.isDataDriven())&&Gc.hasPaintOverride(this.layout,e)}static hasPaintOverride(e,t){const n=e.get("text-field"),r=Uc.paint.properties[t];let i=!1;const o=e=>{for(const t of e)if(r.overrides&&r.overrides.hasOverride(t))return void(i=!0)};if("constant"===n.value.kind&&n.value.value instanceof Le)o(n.value.value.sections);else if("source"===n.value.kind){const e=t=>{i||(t instanceof qe&&ze(t.value)===ve?o(t.value.sections):t instanceof dn?o(t.sections):t.eachChild(e))},t=n.value;t._styleExpression&&e(t._styleExpression.expression)}return i}}function zc(e,t,n){let r="never";const i=e.get(t);return i?r=i:e.get(n)&&(r="always"),r}var Hc={paint:new pi({"background-color":new li(re.paint_background["background-color"]),"background-pattern":new di(re.paint_background["background-pattern"]),"background-opacity":new li(re.paint_background["background-opacity"])})},qc={paint:new pi({"raster-opacity":new li(re.paint_raster["raster-opacity"]),"raster-hue-rotate":new li(re.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new li(re.paint_raster["raster-brightness-min"]),"raster-brightness-max":new li(re.paint_raster["raster-brightness-max"]),"raster-saturation":new li(re.paint_raster["raster-saturation"]),"raster-contrast":new li(re.paint_raster["raster-contrast"]),"raster-resampling":new li(re.paint_raster["raster-resampling"]),"raster-fade-duration":new li(re.paint_raster["raster-fade-duration"])})};class Vc extends gi{constructor(e){super(e,{}),this.onAdd=e=>{this.implementation.onAdd&&this.implementation.onAdd(e,e.painter.context.gl)},this.onRemove=e=>{this.implementation.onRemove&&this.implementation.onRemove(e,e.painter.context.gl)},this.implementation=e}is3D(){return"3d"===this.implementation.renderingMode}hasOffscreenPass(){return void 0!==this.implementation.prerender}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}const $c={circle:class extends gi{constructor(e){super(e,da)}createBucket(e){return new Yo(e)}queryRadius(e){const t=e;return sa("circle-radius",this,t)+sa("circle-stroke-width",this,t)+la(this.paint.get("circle-translate"))}queryIntersectsFeature(e,t,n,r,i,o,a,s){const l=ca(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),o.angle,a),c=this.paint.get("circle-radius").evaluate(t,n)+this.paint.get("circle-stroke-width").evaluate(t,n),u="map"===this.paint.get("circle-pitch-alignment"),d=u?l:function(e,t){return e.map((e=>wa(e,t)))}(l,s),h=u?c*a:c;for(const e of r)for(const t of e){const e=u?t:wa(t,s);let n=h;const r=Ea([],[t.x,t.y,0,1],s);if("viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")?n*=r[3]/o.cameraToCenterDistance:"map"===this.paint.get("circle-pitch-scale")&&"viewport"===this.paint.get("circle-pitch-alignment")&&(n*=o.cameraToCenterDistance/r[3]),Xo(d,e,n))return!0}return!1}},heatmap:class extends gi{constructor(e){super(e,Ca),this._updateColorRamp()}createBucket(e){return new Ta(e)}_handleSpecialPaintPropertyUpdate(e){"heatmap-color"===e&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=Ia({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)}queryRadius(){return 0}queryIntersectsFeature(){return!1}hasOffscreenPass(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility}},hillshade:class extends gi{constructor(e){super(e,Aa)}hasOffscreenPass(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility}},fill:class extends gi{constructor(e){super(e,bs)}recalculate(e,t){super.recalculate(e,t);const n=this.paint._values["fill-outline-color"];"constant"===n.value.kind&&void 0===n.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(e){return new fs(e)}queryRadius(){return la(this.paint.get("fill-translate"))}queryIntersectsFeature(e,t,n,r,i,o,a){return Zo(ca(e,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),o.angle,a),r)}isTileClipped(){return!0}},"fill-extrusion":class extends gi{constructor(e){super(e,js)}createBucket(e){return new Ls(e)}queryRadius(){return la(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(e,t,n,r,i,o,a,s){const l=ca(e,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),o.angle,a),c=this.paint.get("fill-extrusion-height").evaluate(t,n),u=this.paint.get("fill-extrusion-base").evaluate(t,n),d=function(e,t,n,r){const i=[];for(const n of e){const e=[n.x,n.y,0,1];Ea(e,e,t),i.push(new C(e[0]/e[3],e[1]/e[3]))}return i}(l,s),h=function(e,t,n,r){const i=[],o=[],a=r[8]*t,s=r[9]*t,l=r[10]*t,c=r[11]*t,u=r[8]*n,d=r[9]*n,h=r[10]*n,p=r[11]*n;for(const t of e){const e=[],n=[];for(const i of t){const t=i.x,o=i.y,m=r[0]*t+r[4]*o+r[12],g=r[1]*t+r[5]*o+r[13],f=r[2]*t+r[6]*o+r[14],_=r[3]*t+r[7]*o+r[15],b=f+l,v=_+c,y=m+u,E=g+d,S=f+h,w=_+p,T=new C((m+a)/v,(g+s)/v);T.z=b/v,e.push(T);const x=new C(y/w,E/w);x.z=S/w,n.push(x)}i.push(e),o.push(n)}return[i,o]}(r,u,c,s);return function(e,t,n){let r=1/0;Zo(n,t)&&(r=zs(n,t[0]));for(let i=0;i<t.length;i++){const o=t[i],a=e[i];for(let e=0;e<o.length-1;e++){const t=o[e],i=[t,o[e+1],a[e+1],a[e],t];Qo(n,i)&&(r=Math.min(r,zs(n,i)))}}return r!==1/0&&r}(h[0],h[1],d)}},line:class extends gi{constructor(e){super(e,Zs),this.gradientVersion=0}_handleSpecialPaintPropertyUpdate(e){"line-gradient"===e&&(this.stepInterpolant=this._transitionablePaint._values["line-gradient"].value.expression._styleExpression.expression instanceof Tt,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER)}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(e,t){super.recalculate(e,t),this.paint._values["line-floorwidth"]=Js.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)}createBucket(e){return new Qs(e)}queryRadius(e){const t=e,n=el(sa("line-width",this,t),sa("line-gap-width",this,t)),r=sa("line-offset",this,t);return n/2+Math.abs(r)+la(this.paint.get("line-translate"))}queryIntersectsFeature(e,t,n,r,i,o,a){const s=ca(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),o.angle,a),l=a/2*el(this.paint.get("line-width").evaluate(t,n),this.paint.get("line-gap-width").evaluate(t,n)),c=this.paint.get("line-offset").evaluate(t,n);return c&&(r=function(e,t){const n=[];for(let r=0;r<e.length;r++){const i=e[r],o=[];for(let e=0;e<i.length;e++){const n=i[e-1],r=i[e],a=i[e+1],s=0===e?new C(0,0):r.sub(n)._unit()._perp(),l=e===i.length-1?new C(0,0):a.sub(r)._unit()._perp(),c=s._add(l)._unit(),u=c.x*l.x+c.y*l.y;0!==u&&c._mult(1/u),o.push(c._mult(t)._add(r))}n.push(o)}return n}(r,c*a)),function(e,t,n){for(let r=0;r<t.length;r++){const i=t[r];if(e.length>=3)for(let t=0;t<i.length;t++)if(oa(e,i[t]))return!0;if(Jo(e,i,n))return!0}return!1}(s,r,l)}isTileClipped(){return!0}},symbol:Gc,background:class extends gi{constructor(e){super(e,Hc)}},raster:class extends gi{constructor(e){super(e,qc)}}};class Kc{constructor(e){this._callback=e,this._triggered=!1,"undefined"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._callback()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((()=>{this._triggered=!1,this._callback()}),0))}remove(){delete this._channel,this._callback=()=>{}}}const Wc=6371008.8;class Yc{constructor(e,t){if(isNaN(e)||isNaN(t))throw new Error(`Invalid LngLat object: (${e}, ${t})`);if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Yc(a(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(e){const t=Math.PI/180,n=this.lat*t,r=e.lat*t,i=Math.sin(n)*Math.sin(r)+Math.cos(n)*Math.cos(r)*Math.cos((e.lng-this.lng)*t);return Wc*Math.acos(Math.min(i,1))}toBounds(e=0){const t=360*e/40075017,n=t/Math.cos(Math.PI/180*this.lat);return new Qc(new Yc(this.lng-n,this.lat-t),new Yc(this.lng+n,this.lat+t))}static convert(e){if(e instanceof Yc)return e;if(Array.isArray(e)&&(2===e.length||3===e.length))return new Yc(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&"object"==typeof e&&null!==e)return new Yc(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")}}class Qc{constructor(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1]))}setNorthEast(e){return this._ne=e instanceof Yc?new Yc(e.lng,e.lat):Yc.convert(e),this}setSouthWest(e){return this._sw=e instanceof Yc?new Yc(e.lng,e.lat):Yc.convert(e),this}extend(e){const t=this._sw,n=this._ne;let r,i;if(e instanceof Yc)r=e,i=e;else{if(!(e instanceof Qc))return Array.isArray(e)?4===e.length||e.every(Array.isArray)?this.extend(Qc.convert(e)):this.extend(Yc.convert(e)):this;if(r=e._sw,i=e._ne,!r||!i)return this}return t||n?(t.lng=Math.min(r.lng,t.lng),t.lat=Math.min(r.lat,t.lat),n.lng=Math.max(i.lng,n.lng),n.lat=Math.max(i.lat,n.lat)):(this._sw=new Yc(r.lng,r.lat),this._ne=new Yc(i.lng,i.lat)),this}getCenter(){return new Yc((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new Yc(this.getWest(),this.getNorth())}getSouthEast(){return new Yc(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(e){const{lng:t,lat:n}=Yc.convert(e);let r=this._sw.lng<=t&&t<=this._ne.lng;return this._sw.lng>this._ne.lng&&(r=this._sw.lng>=t&&t>=this._ne.lng),this._sw.lat<=n&&n<=this._ne.lat&&r}static convert(e){return e instanceof Qc?e:e?new Qc(e):e}}const Xc=2*Math.PI*Wc;function Zc(e){return Xc*Math.cos(e*Math.PI/180)}function Jc(e){return(180+e)/360}function eu(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function tu(e,t){return e/Zc(t)}function nu(e){return 360/Math.PI*Math.atan(Math.exp((180-360*e)*Math.PI/180))-90}class ru{constructor(e,t,n=0){this.x=+e,this.y=+t,this.z=+n}static fromLngLat(e,t=0){const n=Yc.convert(e);return new ru(Jc(n.lng),eu(n.lat),tu(t,n.lat))}toLngLat(){return new Yc(360*this.x-180,nu(this.y))}toAltitude(){return this.z*Zc(nu(this.y))}meterInMercatorCoordinateUnits(){return 1/Xc*(e=nu(this.y),1/Math.cos(e*Math.PI/180));var e}}function iu(e,t,n){var r=2*Math.PI*6378137/256/Math.pow(2,n);return[e*r-2*Math.PI*6378137/2,t*r-2*Math.PI*6378137/2]}class ou{constructor(e,t,n){if(e<0||e>25||n<0||n>=Math.pow(2,e)||t<0||t>=Math.pow(2,e))throw new Error(`x=${t}, y=${n}, z=${e} outside of bounds. 0<=x<${Math.pow(2,e)}, 0<=y<${Math.pow(2,e)} 0<=z<=25 `);this.z=e,this.x=t,this.y=n,this.key=lu(0,e,e,t,n)}equals(e){return this.z===e.z&&this.x===e.x&&this.y===e.y}url(e,t,n){const r=(o=this.y,a=this.z,s=iu(256*(i=this.x),256*(o=Math.pow(2,a)-o-1),a),l=iu(256*(i+1),256*(o+1),a),s[0]+","+s[1]+","+l[0]+","+l[1]);var i,o,a,s,l;const c=function(e,t,n){let r,i="";for(let o=e;o>0;o--)r=1<<o-1,i+=(t&r?1:0)+(n&r?2:0);return i}(this.z,this.x,this.y);return e[(this.x+this.y)%e.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String("tms"===n?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,t>1?"@2x":"").replace(/{quadkey}/g,c).replace(/{bbox-epsg-3857}/g,r)}isChildOf(e){const t=this.z-e.z;return t>0&&e.x===this.x>>t&&e.y===this.y>>t}getTilePoint(e){const t=Math.pow(2,this.z);return new C((e.x*t-this.x)*Ho,(e.y*t-this.y)*Ho)}toString(){return`${this.z}/${this.x}/${this.y}`}}class au{constructor(e,t){this.wrap=e,this.canonical=t,this.key=lu(e,t.z,t.z,t.x,t.y)}}class su{constructor(e,t,n,r,i){if(e<n)throw new Error(`overscaledZ should be >= z; overscaledZ = ${e}; z = ${n}`);this.overscaledZ=e,this.wrap=t,this.canonical=new ou(n,+r,+i),this.key=lu(t,e,n,r,i)}clone(){return new su(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(e){return this.overscaledZ===e.overscaledZ&&this.wrap===e.wrap&&this.canonical.equals(e.canonical)}scaledTo(e){if(e>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);const t=this.canonical.z-e;return e>this.canonical.z?new su(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new su(e,this.wrap,e,this.canonical.x>>t,this.canonical.y>>t)}calculateScaledKey(e,t){if(e>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);const n=this.canonical.z-e;return e>this.canonical.z?lu(this.wrap*+t,e,this.canonical.z,this.canonical.x,this.canonical.y):lu(this.wrap*+t,e,e,this.canonical.x>>n,this.canonical.y>>n)}isChildOf(e){if(e.wrap!==this.wrap)return!1;const t=this.canonical.z-e.canonical.z;return 0===e.overscaledZ||e.overscaledZ<this.overscaledZ&&e.canonical.x===this.canonical.x>>t&&e.canonical.y===this.canonical.y>>t}children(e){if(this.overscaledZ>=e)return[new su(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const t=this.canonical.z+1,n=2*this.canonical.x,r=2*this.canonical.y;return[new su(t,this.wrap,t,n,r),new su(t,this.wrap,t,n+1,r),new su(t,this.wrap,t,n,r+1),new su(t,this.wrap,t,n+1,r+1)]}isLessThan(e){return this.wrap<e.wrap||!(this.wrap>e.wrap)&&(this.overscaledZ<e.overscaledZ||!(this.overscaledZ>e.overscaledZ)&&(this.canonical.x<e.canonical.x||!(this.canonical.x>e.canonical.x)&&this.canonical.y<e.canonical.y))}wrapped(){return new su(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(e){return new su(this.overscaledZ,e,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new au(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(e){return this.canonical.getTilePoint(new ru(e.x-this.wrap,e.y))}}function lu(e,t,n,r,i){(e*=2)<0&&(e=-1*e-1);const o=1<<n;return(o*o*e+o*i+r).toString(36)+n.toString(36)+t.toString(36)}Fr("CanonicalTileID",ou),Fr("OverscaledTileID",su,{omit:["posMatrix"]});class cu{constructor(e,t,n){if(this.uid=e,t.height!==t.width)throw new RangeError("DEM tiles must be square");if(n&&"mapbox"!==n&&"terrarium"!==n)return void m(`"${n}" is not a valid encoding type. Valid types include "mapbox" and "terrarium".`);this.stride=t.height;const r=this.dim=t.height-2;this.data=new Uint32Array(t.data.buffer),this.encoding=n||"mapbox";for(let e=0;e<r;e++)this.data[this._idx(-1,e)]=this.data[this._idx(0,e)],this.data[this._idx(r,e)]=this.data[this._idx(r-1,e)],this.data[this._idx(e,-1)]=this.data[this._idx(e,0)],this.data[this._idx(e,r)]=this.data[this._idx(e,r-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(r,-1)]=this.data[this._idx(r-1,0)],this.data[this._idx(-1,r)]=this.data[this._idx(0,r-1)],this.data[this._idx(r,r)]=this.data[this._idx(r-1,r-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let e=0;e<r;e++)for(let t=0;t<r;t++){const n=this.get(e,t);n>this.max&&(this.max=n),n<this.min&&(this.min=n)}}get(e,t){const n=new Uint8Array(this.data.buffer),r=4*this._idx(e,t);return("terrarium"===this.encoding?this._unpackTerrarium:this._unpackMapbox)(n[r],n[r+1],n[r+2])}getUnpackVector(){return"terrarium"===this.encoding?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]}_idx(e,t){if(e<-1||e>=this.dim+1||t<-1||t>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(t+1)*this.stride+(e+1)}_unpackMapbox(e,t,n){return(256*e*256+256*t+n)/10-1e4}_unpackTerrarium(e,t,n){return 256*e+t+n/256-32768}getPixels(){return new Oa({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(e,t,n){if(this.dim!==e.dim)throw new Error("dem dimension mismatch");let r=t*this.dim,i=t*this.dim+this.dim,o=n*this.dim,a=n*this.dim+this.dim;switch(t){case-1:r=i-1;break;case 1:i=r+1}switch(n){case-1:o=a-1;break;case 1:a=o+1}const s=-t*this.dim,l=-n*this.dim;for(let t=o;t<a;t++)for(let n=r;n<i;n++)this.data[this._idx(n,t)]=e.data[this._idx(n+s,t+l)]}}Fr("DEMData",cu);class uu{constructor(e){this._stringToNumber={},this._numberToString=[];for(let t=0;t<e.length;t++){const n=e[t];this._stringToNumber[n]=t,this._numberToString[t]=n}}encode(e){return this._stringToNumber[e]}decode(e){if(e>=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${e} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[e]}}class du{constructor(e,t,n,r,i){this.type="Feature",this._vectorTileFeature=e,e._z=t,e._x=n,e._y=r,this.properties=e.properties,this.id=i}get geometry(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(e){this._geometry=e}toJSON(){const e={geometry:this.geometry};for(const t in this)"_geometry"!==t&&"_vectorTileFeature"!==t&&(e[t]=this[t]);return e}}class hu{constructor(e,t){this.tileID=e,this.x=e.canonical.x,this.y=e.canonical.y,this.z=e.canonical.z,this.grid=new Cr(Ho,16,0),this.grid3D=new Cr(Ho,16,0),this.featureIndexArray=new Zi,this.promoteId=t}insert(e,t,n,r,i,o){const a=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(n,r,i);const s=o?this.grid3D:this.grid;for(let e=0;e<t.length;e++){const n=t[e],r=[1/0,1/0,-1/0,-1/0];for(let e=0;e<n.length;e++){const t=n[e];r[0]=Math.min(r[0],t.x),r[1]=Math.min(r[1],t.y),r[2]=Math.max(r[2],t.x),r[3]=Math.max(r[3],t.y)}r[0]<Ho&&r[1]<Ho&&r[2]>=0&&r[3]>=0&&s.insert(a,r[0],r[1],r[2],r[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new Ss.VectorTile(new cl(this.rawTileData)).layers,this.sourceLayerCoder=new uu(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(e,t,n,r){this.loadVTLayers();const i=e.params||{},o=Ho/e.tileSize/e.scale,a=Yn(i.filter),s=e.queryGeometry,l=e.queryPadding*o,c=mu(s),u=this.grid.query(c.minX-l,c.minY-l,c.maxX+l,c.maxY+l),d=mu(e.cameraQueryGeometry),h=this.grid3D.query(d.minX-l,d.minY-l,d.maxX+l,d.maxY+l,((t,n,r,i)=>function(e,t,n,r,i){for(const o of e)if(t<=o.x&&n<=o.y&&r>=o.x&&i>=o.y)return!0;const o=[new C(t,n),new C(t,i),new C(r,i),new C(r,n)];if(e.length>2)for(const t of o)if(oa(e,t))return!0;for(let t=0;t<e.length-1;t++)if(aa(e[t],e[t+1],o))return!0;return!1}(e.cameraQueryGeometry,t-l,n-l,r+l,i+l)));for(const e of h)u.push(e);u.sort(gu);const p={};let m;for(let l=0;l<u.length;l++){const c=u[l];if(c===m)continue;m=c;const d=this.featureIndexArray.get(c);let h=null;this.loadMatchingFeature(p,d.bucketIndex,d.sourceLayerIndex,d.featureIndex,a,i.layers,i.availableImages,t,n,r,((t,n,r)=>(h||(h=$o(t)),n.queryIntersectsFeature(s,t,r,h,this.z,e.transform,o,e.pixelPosMatrix))))}return p}loadMatchingFeature(e,t,n,r,i,o,a,l,c,u,d){const h=this.bucketLayerIDs[t];if(o&&!function(e,t){for(let n=0;n<e.length;n++)if(t.indexOf(e[n])>=0)return!0;return!1}(o,h))return;const p=this.sourceLayerCoder.decode(n),m=this.vtLayers[p].feature(r);if(i.needGeometry){const e=Ko(m,!0);if(!i.filter(new Jr(this.tileID.overscaledZ),e,this.tileID.canonical))return}else if(!i.filter(new Jr(this.tileID.overscaledZ),m))return;const g=this.getId(m,p);for(let t=0;t<h.length;t++){const n=h[t];if(o&&o.indexOf(n)<0)continue;const i=l[n];if(!i)continue;let p={};g&&u&&(p=u.getState(i.sourceLayer||"_geojsonTileLayer",g));const f=s({},c[n]);f.paint=pu(f.paint,i.paint,m,p,a),f.layout=pu(f.layout,i.layout,m,p,a);const _=!d||d(m,i,p);if(!_)continue;const b=new du(m,this.z,this.x,this.y,g);b.layer=f;let v=e[n];void 0===v&&(v=e[n]=[]),v.push({featureIndex:r,feature:b,intersectionZ:_})}}lookupSymbolFeatures(e,t,n,r,i,o,a,s){const l={};this.loadVTLayers();const c=Yn(i);for(const i of e)this.loadMatchingFeature(l,n,r,i,c,o,a,s,t);return l}hasLayer(e){for(const t of this.bucketLayerIDs)for(const n of t)if(e===n)return!0;return!1}getId(e,t){let n=e.id;return this.promoteId&&(n=e.properties["string"==typeof this.promoteId?this.promoteId:this.promoteId[t]],"boolean"==typeof n&&(n=Number(n))),n}}function pu(e,t,n,r,i){return u(e,((e,o)=>{const a=t instanceof si?t.get(o):null;return a&&a.evaluate?a.evaluate(n,r,i):a}))}function mu(e){let t=1/0,n=1/0,r=-1/0,i=-1/0;for(const o of e)t=Math.min(t,o.x),n=Math.min(n,o.y),r=Math.max(r,o.x),i=Math.max(i,o.y);return{minX:t,minY:n,maxX:r,maxY:i}}function gu(e,t){return t-e}var fu;Fr("FeatureIndex",hu,{omit:["rawTileData","sourceLayerCoder"]}),e.PerformanceMarkers=void 0,(fu=e.PerformanceMarkers||(e.PerformanceMarkers={})).create="create",fu.load="load",fu.fullLoad="fullLoad";let _u=null,bu=[];const vu=1e3/30,yu={mark(e){performance.mark(e)},frame(e){const t=e;null!=_u&&bu.push(t-_u),_u=t},clearMetrics(){_u=null,bu=[],performance.clearMeasures("loadTime"),performance.clearMeasures("fullLoadTime");for(const t in e.PerformanceMarkers)performance.clearMarks(e.PerformanceMarkers[t])},getPerformanceMetrics(){performance.measure("loadTime",e.PerformanceMarkers.create,e.PerformanceMarkers.load),performance.measure("fullLoadTime",e.PerformanceMarkers.create,e.PerformanceMarkers.fullLoad);const t=performance.getEntriesByName("loadTime")[0].duration,n=performance.getEntriesByName("fullLoadTime")[0].duration,r=bu.length,i=1/(bu.reduce(((e,t)=>e+t),0)/r/1e3),o=bu.filter((e=>e>vu)).reduce(((e,t)=>e+(t-vu)/vu),0);return{loadTime:t,fullLoadTime:n,fps:i,percentDroppedFrames:o/(r+o)*100}}};e.AJAXError=z,e.ARRAY_TYPE=pa,e.Actor=class{constructor(e,t,n){this.target=e,this.parent=t,this.mapId=n,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},c(["receive","process"],this),this.invoker=new Kc(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=_()?e:window}send(e,t,n,r,i=!1){const o=Math.round(1e18*Math.random()).toString(36).substring(0,10);n&&(this.callbacks[o]=n);const a=S(this.globalScope)?void 0:[];return this.target.postMessage({id:o,type:e,hasCallback:!!n,targetMapId:r,mustQueue:i,sourceMapId:this.mapId,data:kr(t,a)},a),{cancel:()=>{n&&delete this.callbacks[o],this.target.postMessage({id:o,type:"<cancel>",targetMapId:r,sourceMapId:this.mapId})}}}receive(e){const t=e.data,n=t.id;if(n&&(!t.targetMapId||this.mapId===t.targetMapId))if("<cancel>"===t.type){delete this.tasks[n];const e=this.cancelCallbacks[n];delete this.cancelCallbacks[n],e&&e()}else _()||t.mustQueue?(this.tasks[n]=t,this.taskQueue.push(n),this.invoker.trigger()):this.processTask(n,t)}process(){if(!this.taskQueue.length)return;const e=this.taskQueue.shift(),t=this.tasks[e];delete this.tasks[e],this.taskQueue.length&&this.invoker.trigger(),t&&this.processTask(e,t)}processTask(e,t){if("<response>"===t.type){const n=this.callbacks[e];delete this.callbacks[e],n&&(t.error?n(Or(t.error)):n(null,Or(t.data)))}else{let n=!1;const r=S(this.globalScope)?void 0:[],i=t.hasCallback?(t,i)=>{n=!0,delete this.cancelCallbacks[e],this.target.postMessage({id:e,type:"<response>",sourceMapId:this.mapId,error:t?kr(t):null,data:kr(i,r)},r)}:e=>{n=!0};let o=null;const a=Or(t.data);if(this.parent[t.type])o=this.parent[t.type](t.sourceMapId,a,i);else if(this.parent.getWorkerSource){const e=t.type.split(".");o=this.parent.getWorkerSource(t.sourceMapId,e[0],a.source)[e[1]](a,i)}else i(new Error(`Could not find function ${t.type}`));!n&&o&&o.cancel&&(this.cancelCallbacks[e]=o.cancel)}}remove(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)}},e.AlphaImage=ka,e.CanonicalTileID=ou,e.CollisionBoxArray=qi,e.CollisionCircleLayoutArray=class extends Ai{},e.Color=Ne,e.DEMData=cu,e.DataConstantProperty=li,e.DictionaryCoder=uu,e.EXTENT=Ho,e.ErrorEvent=te,e.EvaluationParameters=Jr,e.Event=ee,e.Evented=ne,e.FeatureIndex=hu,e.FillBucket=fs,e.FillExtrusionBucket=Ls,e.GeoJSONFeature=du,e.ImageAtlas=Ll,e.ImagePosition=Pl,e.LineBucket=Qs,e.LineStripIndexArray=class extends Gi{},e.LngLat=Yc,e.LngLatBounds=Qc,e.MercatorCoordinate=ru,e.ONE_EM=ll,e.OverscaledTileID=su,e.PerformanceUtils=yu,e.PosArray=Ji,e.Properties=pi,e.QuadTriangleArray=class extends Ni{},e.RGBAImage=Oa,e.RasterBoundsArray=class extends Si{},e.RequestPerformance=class{constructor(e){this._marks={start:[e.url,"start"].join("#"),end:[e.url,"end"].join("#"),measure:e.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let e=performance.getEntriesByName(this._marks.measure);return 0===e.length&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),e=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),e}},e.ResourceType=G,e.SegmentVector=fo,e.SymbolBucket=Lc,e.Transitionable=ni,e.TriangleIndexArray=ho,e.Uniform1f=ko,e.Uniform1i=class extends Do{constructor(e,t){super(e,t),this.current=0}set(e){this.current!==e&&(this.current=e,this.gl.uniform1i(this.location,e))}},e.Uniform2f=class extends Do{constructor(e,t){super(e,t),this.current=[0,0]}set(e){e[0]===this.current[0]&&e[1]===this.current[1]||(this.current=e,this.gl.uniform2f(this.location,e[0],e[1]))}},e.Uniform3f=class extends Do{constructor(e,t){super(e,t),this.current=[0,0,0]}set(e){e[0]===this.current[0]&&e[1]===this.current[1]&&e[2]===this.current[2]||(this.current=e,this.gl.uniform3f(this.location,e[0],e[1],e[2]))}},e.Uniform4f=Oo,e.UniformColor=Io,e.UniformMatrix4f=class extends Do{constructor(e,t){super(e,t),this.current=Ao}set(e){if(e[12]!==this.current[12]||e[0]!==this.current[0])return this.current=e,void this.gl.uniformMatrix4fv(this.location,!1,e);for(let t=1;t<16;t++)if(e[t]!==this.current[t]){this.current=e,this.gl.uniformMatrix4fv(this.location,!1,e);break}}},e.UnwrappedTileID=au,e.ValidationError=ie,e.ZoomHistory=Ir,e.add=function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e},e.addDynamicAttributes=Rc,e.asyncAll=function(e,t,n){if(!e.length)return n(null,[]);let r=e.length;const i=new Array(e.length);let o=null;e.forEach(((e,a)=>{t(e,((e,t)=>{e&&(o=e),i[a]=t,0==--r&&n(o,i)}))}))},e.bezier=r,e.bindAll=c,e.cacheEntryPossiblyAdded=function(e){N++,N>A&&(e.getActor().send("enforceCacheSizeLimit",I),N=0)},e.clamp=o,e.clearTileCache=function(e){const t=caches.delete(D);e&&t.catch(e).then((()=>e()))},e.clipLine=uc,e.clone=function(e){var t=new pa(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},e.clone$1=h,e.clone$2=function(e){var t=new pa(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},e.collisionCircleLayout=ol,e.config=F,e.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},e.create=function(){var e=new pa(16);return pa!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e},e.create$1=ma,e.createExpression=Mn,e.createFilter=Yn,e.createLayout=vi,e.createStyleLayer=function(e){return"custom"===e.type?new Vc(e):new $c[e.type](e)},e.cross=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[0],s=n[1],l=n[2];return e[0]=i*l-o*s,e[1]=o*a-r*l,e[2]=r*s-i*a,e},e.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]},e.dot$1=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]},e.ease=i,e.emitValidationErrors=Tr,e.enforceCacheSizeLimit=function(e){R(),k&&k.then((t=>{t.keys().then((n=>{for(let r=0;r<n.length-e;r++)t.delete(n[r])}))}))},e.equals=function(e,t){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7],u=e[8],d=e[9],h=e[10],p=e[11],m=e[12],g=e[13],f=e[14],_=e[15],b=t[0],v=t[1],y=t[2],E=t[3],S=t[4],w=t[5],T=t[6],C=t[7],x=t[8],F=t[9],D=t[10],k=t[11],O=t[12],I=t[13],A=t[14],R=t[15];return Math.abs(n-b)<=ha*Math.max(1,Math.abs(n),Math.abs(b))&&Math.abs(r-v)<=ha*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(i-y)<=ha*Math.max(1,Math.abs(i),Math.abs(y))&&Math.abs(o-E)<=ha*Math.max(1,Math.abs(o),Math.abs(E))&&Math.abs(a-S)<=ha*Math.max(1,Math.abs(a),Math.abs(S))&&Math.abs(s-w)<=ha*Math.max(1,Math.abs(s),Math.abs(w))&&Math.abs(l-T)<=ha*Math.max(1,Math.abs(l),Math.abs(T))&&Math.abs(c-C)<=ha*Math.max(1,Math.abs(c),Math.abs(C))&&Math.abs(u-x)<=ha*Math.max(1,Math.abs(u),Math.abs(x))&&Math.abs(d-F)<=ha*Math.max(1,Math.abs(d),Math.abs(F))&&Math.abs(h-D)<=ha*Math.max(1,Math.abs(h),Math.abs(D))&&Math.abs(p-k)<=ha*Math.max(1,Math.abs(p),Math.abs(k))&&Math.abs(m-O)<=ha*Math.max(1,Math.abs(m),Math.abs(O))&&Math.abs(g-I)<=ha*Math.max(1,Math.abs(g),Math.abs(I))&&Math.abs(f-A)<=ha*Math.max(1,Math.abs(f),Math.abs(A))&&Math.abs(_-R)<=ha*Math.max(1,Math.abs(_),Math.abs(R))},e.evaluateSizeForFeature=function(e,{uSize:t,uSizeT:n},{lowerSize:r,upperSize:i}){return"source"===e.kind?r/ec:"composite"===e.kind?Ct(r/ec,i/ec,n):t},e.evaluateSizeForZoom=function(e,t){let n=0,r=0;if("constant"===e.kind)r=e.layoutSize;else if("source"!==e.kind){const{interpolationType:i,minZoom:a,maxZoom:s}=e,l=i?o(qt.interpolationFactor(i,t,a,s),0,1):0;"camera"===e.kind?r=Ct(e.minSize,e.maxSize,l):n=l}return{uSizeT:n,uSize:r}},e.evaluateVariableOffset=wc,e.evented=Yr,e.exported=T,e.exported$1=M,e.extend=s,e.filterObject=d,e.fromRotation=function(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=0,e[3]=-n,e[4]=r,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},e.fromScaling=function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},e.getAnchorAlignment=Ql,e.getAnchorJustification=Tc,e.getArrayBuffer=$,e.getImage=X,e.getJSON=function(e,t){return V(s(e,{type:"json"}),t)},e.getOverlapMode=zc,e.getRTLTextPluginStatus=Qr,e.getReferrer=H,e.getVideo=function(e,t){const n=window.document.createElement("video");n.muted=!0,n.onloadstart=function(){t(null,n)};for(let t=0;t<e.length;t++){const r=window.document.createElement("source");K(e[t])||(n.crossOrigin="Anonymous"),r.src=e[t],n.appendChild(r)}return{cancel:()=>{}}},e.identity=ga,e.invert=function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],c=t[7],u=t[8],d=t[9],h=t[10],p=t[11],m=t[12],g=t[13],f=t[14],_=t[15],b=n*s-r*a,v=n*l-i*a,y=n*c-o*a,E=r*l-i*s,S=r*c-o*s,w=i*c-o*l,T=u*g-d*m,C=u*f-h*m,x=u*_-p*m,F=d*f-h*g,D=d*_-p*g,k=h*_-p*f,O=b*k-v*D+y*F+E*x-S*C+w*T;return O?(e[0]=(s*k-l*D+c*F)*(O=1/O),e[1]=(i*D-r*k-o*F)*O,e[2]=(g*w-f*S+_*E)*O,e[3]=(h*S-d*w-p*E)*O,e[4]=(l*x-a*k-c*C)*O,e[5]=(n*k-i*x+o*C)*O,e[6]=(f*y-m*w-_*v)*O,e[7]=(u*w-h*y+p*v)*O,e[8]=(a*D-s*x+c*T)*O,e[9]=(r*x-n*D-o*T)*O,e[10]=(m*S-g*y+_*b)*O,e[11]=(d*y-u*S-p*b)*O,e[12]=(s*C-a*F-l*T)*O,e[13]=(n*F-r*C+i*T)*O,e[14]=(g*v-m*E-f*b)*O,e[15]=(u*E-d*v+h*b)*O,e):null},e.isImageBitmap=w,e.isSafari=S,e.isWorker=_,e.keysDifference=function(e,t){const n=[];for(const r in e)r in t||n.push(r);return n},e.lazyLoadRTLTextPlugin=function(){Zr.isLoading()||Zr.isLoaded()||"deferred"!==Qr()||Xr()},e.makeRequest=V,e.mapObject=u,e.mercatorXfromLng=Jc,e.mercatorYfromLat=eu,e.mercatorZfromAltitude=tu,e.mul=ba,e.mul$1=function(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e[3]=t[3]*n[3],e},e.multiply=fa,e.nextPowerOfTwo=function(e){return e<=1?1:Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},e.normalize=function(e,t){var n=t[0],r=t[1],i=t[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e},e.number=Ct,e.ortho=function(e,t,n,r,i,o,a){var s=1/(t-n),l=1/(r-i),c=1/(o-a);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+n)*s,e[13]=(i+r)*l,e[14]=(a+o)*c,e[15]=1,e},e.parseCacheControl=b,e.parseGlyphPbf=function(e){return new cl(e).readFields(Al,[])},e.pbf=cl,e.performSymbolLayout=function(t){t.bucket.createArrays(),t.bucket.tilePixelRatio=Ho/(512*t.bucket.overscaling),t.bucket.compareText={},t.bucket.iconsNeedLinear=!1;const n=t.bucket.layers[0].layout,r=t.bucket.layers[0]._unevaluatedLayout._values,i={layoutIconSize:r["icon-size"].possiblyEvaluate(new Jr(t.bucket.zoom+1),t.canonical),layoutTextSize:r["text-size"].possiblyEvaluate(new Jr(t.bucket.zoom+1),t.canonical),textMaxSize:r["text-size"].possiblyEvaluate(new Jr(18))};if("composite"===t.bucket.textSizeData.kind){const{minZoom:e,maxZoom:n}=t.bucket.textSizeData;i.compositeTextSizes=[r["text-size"].possiblyEvaluate(new Jr(e),t.canonical),r["text-size"].possiblyEvaluate(new Jr(n),t.canonical)]}if("composite"===t.bucket.iconSizeData.kind){const{minZoom:e,maxZoom:n}=t.bucket.iconSizeData;i.compositeIconSizes=[r["icon-size"].possiblyEvaluate(new Jr(e),t.canonical),r["icon-size"].possiblyEvaluate(new Jr(n),t.canonical)]}const o=n.get("text-line-height")*ll,a="viewport"!==n.get("text-rotation-alignment")&&"point"!==n.get("symbol-placement"),s=n.get("text-keep-upright"),l=n.get("text-size");for(const r of t.bucket.features){const c=n.get("text-font").evaluate(r,{},t.canonical).join(","),u=l.evaluate(r,{},t.canonical),d=i.layoutTextSize.evaluate(r,{},t.canonical),h=i.layoutIconSize.evaluate(r,{},t.canonical),p={horizontal:{},vertical:void 0},g=r.text;let f,_=[0,0];if(g){const i=g.toString(),l=n.get("text-letter-spacing").evaluate(r,{},t.canonical)*ll,h=Nr(i)?l:0,m=n.get("text-anchor").evaluate(r,{},t.canonical),f=n.get("text-variable-anchor");if(!f){const e=n.get("text-radial-offset").evaluate(r,{},t.canonical);_=e?wc(m,[e*ll,Sc]):n.get("text-offset").evaluate(r,{},t.canonical).map((e=>e*ll))}let b=a?"center":n.get("text-justify").evaluate(r,{},t.canonical);const v=n.get("symbol-placement"),y="point"===v?n.get("text-max-width").evaluate(r,{},t.canonical)*ll:0,E=()=>{t.bucket.allowVerticalPlacement&&Rr(i)&&(p.vertical=Gl(g,t.glyphMap,t.glyphPositions,t.imagePositions,c,y,o,m,"left",h,_,e.WritingMode.vertical,!0,v,d,u))};if(!a&&f){const n="auto"===b?f.map((e=>Tc(e))):[b];let r=!1;for(let i=0;i<n.length;i++){const a=n[i];if(!p.horizontal[a])if(r)p.horizontal[a]=p.horizontal[0];else{const n=Gl(g,t.glyphMap,t.glyphPositions,t.imagePositions,c,y,o,"center",a,h,_,e.WritingMode.horizontal,!1,v,d,u);n&&(p.horizontal[a]=n,r=1===n.positionedLines.length)}}E()}else{"auto"===b&&(b=Tc(m));const n=Gl(g,t.glyphMap,t.glyphPositions,t.imagePositions,c,y,o,m,b,h,_,e.WritingMode.horizontal,!1,v,d,u);n&&(p.horizontal[b]=n),E(),Rr(i)&&a&&s&&(p.vertical=Gl(g,t.glyphMap,t.glyphPositions,t.imagePositions,c,y,o,m,b,h,_,e.WritingMode.vertical,!1,v,d,u))}}let b=!1;if(r.icon&&r.icon.name){const e=t.imageMap[r.icon.name];e&&(f=Zl(t.imagePositions[r.icon.name],n.get("icon-offset").evaluate(r,{},t.canonical),n.get("icon-anchor").evaluate(r,{},t.canonical)),b=!!e.sdf,void 0===t.bucket.sdfIcons?t.bucket.sdfIcons=b:t.bucket.sdfIcons!==b&&m("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(e.pixelRatio!==t.bucket.pixelRatio||0!==n.get("icon-rotate").constantOr(1))&&(t.bucket.iconsNeedLinear=!0))}const v=Dc(p.horizontal)||p.vertical;t.bucket.iconsInText=!!v&&v.iconsInText,(v||f)&&Cc(t.bucket,r,p,f,t.imageMap,i,d,h,_,b,t.canonical)}t.showCollisionBoxes&&t.bucket.generateCollisionDebugBuffers()},e.perspective=function(e,t,n,r,i){var o,a=1/Math.tan(t/2);return e[0]=a/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0?(e[10]=(i+r)*(o=1/(r-i)),e[14]=2*i*r*o):(e[10]=-1,e[14]=-2*r),e},e.pick=function(e,t){const n={};for(let r=0;r<t.length;r++){const i=t[r];i in e&&(n[i]=e[i])}return n},e.plugin=Zr,e.pointGeometry=C,e.polygonIntersectsPolygon=Qo,e.potpack=Ml,e.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],e.register=Fr,e.registerForPluginStateChange=function(e){return e({pluginStatus:Vr,pluginURL:$r}),Yr.on("pluginStateChange",e),e},e.renderColorRamp=Ia,e.rotateX=function(e,t,n){var r=Math.sin(n),i=Math.cos(n),o=t[4],a=t[5],s=t[6],l=t[7],c=t[8],u=t[9],d=t[10],h=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=o*i+c*r,e[5]=a*i+u*r,e[6]=s*i+d*r,e[7]=l*i+h*r,e[8]=c*i-o*r,e[9]=u*i-a*r,e[10]=d*i-s*r,e[11]=h*i-l*r,e},e.rotateZ=function(e,t,n){var r=Math.sin(n),i=Math.cos(n),o=t[0],a=t[1],s=t[2],l=t[3],c=t[4],u=t[5],d=t[6],h=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=o*i+c*r,e[1]=a*i+u*r,e[2]=s*i+d*r,e[3]=l*i+h*r,e[4]=c*i-o*r,e[5]=u*i-a*r,e[6]=d*i-s*r,e[7]=h*i-l*r,e},e.scale=function(e,t,n){var r=n[0],i=n[1],o=n[2];return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},e.scale$1=function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e},e.setCacheLimits=function(e,t){I=e,A=t},e.setRTLTextPlugin=function(e,t,n=!1){if(Vr===Gr||Vr===zr||Vr===Hr)throw new Error("setRTLTextPlugin cannot be called multiple times.");$r=T.resolveURL(e),Vr=Gr,qr=t,Wr(),n||Xr()},e.spec=re,e.sphericalToCartesian=function([e,t,n]){return t+=90,t*=Math.PI/180,n*=Math.PI/180,{x:e*Math.cos(t)*Math.sin(n),y:e*Math.sin(t)*Math.sin(n),z:e*Math.cos(n)}},e.sqrLen=function(e){var t=e[0],n=e[1];return t*t+n*n},e.sub=function(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e},e.toEvaluationFeature=Ko,e.transformMat3=function(e,t,n){var r=t[0],i=t[1],o=t[2];return e[0]=r*n[0]+i*n[3]+o*n[6],e[1]=r*n[1]+i*n[4]+o*n[7],e[2]=r*n[2]+i*n[5]+o*n[8],e},e.transformMat4=Ea,e.transformMat4$1=function(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[4]*i+n[12],e[1]=n[1]*r+n[5]*i+n[13],e},e.translate=function(e,t,n){var r,i,o,a,s,l,c,u,d,h,p,m,g=n[0],f=n[1],_=n[2];return t===e?(e[12]=t[0]*g+t[4]*f+t[8]*_+t[12],e[13]=t[1]*g+t[5]*f+t[9]*_+t[13],e[14]=t[2]*g+t[6]*f+t[10]*_+t[14],e[15]=t[3]*g+t[7]*f+t[11]*_+t[15]):(i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],c=t[6],u=t[7],d=t[8],h=t[9],p=t[10],m=t[11],e[0]=r=t[0],e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=c,e[7]=u,e[8]=d,e[9]=h,e[10]=p,e[11]=m,e[12]=r*g+s*f+d*_+t[12],e[13]=i*g+l*f+h*_+t[13],e[14]=o*g+c*f+p*_+t[14],e[15]=a*g+u*f+m*_+t[15]),e},e.triggerPluginCompletionEvent=Kr,e.unicodeBlockLookup=Ar,e.uniqueId=function(){return l++},e.validateCustomStyleLayer=function(e){const t=[],n=e.id;return void 0===n&&t.push({message:`layers.${n}: missing required property "id"`}),void 0===e.render&&t.push({message:`layers.${n}: missing required method "render"`}),e.renderingMode&&"2d"!==e.renderingMode&&"3d"!==e.renderingMode&&t.push({message:`layers.${n}: property "renderingMode" must be either "2d" or "3d"`}),t},e.validateLight=Er,e.validateStyle=yr,e.vectorTile=Ss,e.warnOnce=m,e.wrap=a})),r(["./shared"],(function(e){function t(e){const n=typeof e;if("number"===n||"boolean"===n||"string"===n||null==e)return JSON.stringify(e);if(Array.isArray(e)){let n="[";for(const r of e)n+=`${t(r)},`;return`${n}]`}const r=Object.keys(e).sort();let i="{";for(let n=0;n<r.length;n++)i+=`${JSON.stringify(r[n])}:${t(e[r[n]])},`;return`${i}}`}function n(n){let r="";for(const i of e.refProperties)r+=`/${t(n[i])}`;return r}class r{constructor(e){this.keyCache={},e&&this.replace(e)}replace(e){this._layerConfigs={},this._layers={},this.update(e,[])}update(t,r){for(const n of t){this._layerConfigs[n.id]=n;const t=this._layers[n.id]=e.createStyleLayer(n);t._featureFilter=e.createFilter(t.filter),this.keyCache[n.id]&&delete this.keyCache[n.id]}for(const e of r)delete this.keyCache[e],delete this._layerConfigs[e],delete this._layers[e];this.familiesBySource={};const i=function(e,t){const r={};for(let i=0;i<e.length;i++){const o=t&&t[e[i].id]||n(e[i]);t&&(t[e[i].id]=o);let a=r[o];a||(a=r[o]=[]),a.push(e[i])}const i=[];for(const e in r)i.push(r[e]);return i}(Object.values(this._layerConfigs),this.keyCache);for(const e of i){const t=e.map((e=>this._layers[e.id])),n=t[0];if("none"===n.visibility)continue;const r=n.source||"";let i=this.familiesBySource[r];i||(i=this.familiesBySource[r]={});const o=n.sourceLayer||"_geojsonTileLayer";let a=i[o];a||(a=i[o]=[]),a.push(t)}}}class i{constructor(t){const n={},r=[];for(const e in t){const i=t[e],o=n[e]={};for(const e in i){const t=i[+e];if(!t||0===t.bitmap.width||0===t.bitmap.height)continue;const n={x:0,y:0,w:t.bitmap.width+2,h:t.bitmap.height+2};r.push(n),o[e]={rect:n,metrics:t.metrics}}}const{w:i,h:o}=e.potpack(r),a=new e.AlphaImage({width:i||1,height:o||1});for(const r in t){const i=t[r];for(const t in i){const o=i[+t];if(!o||0===o.bitmap.width||0===o.bitmap.height)continue;const s=n[r][t].rect;e.AlphaImage.copy(o.bitmap,a,{x:0,y:0},{x:s.x+1,y:s.y+1},o.bitmap)}}this.image=a,this.positions=n}}e.register("GlyphAtlas",i);class o{constructor(t){this.tileID=new e.OverscaledTileID(t.tileID.overscaledZ,t.tileID.wrap,t.tileID.canonical.z,t.tileID.canonical.x,t.tileID.canonical.y),this.uid=t.uid,this.zoom=t.zoom,this.pixelRatio=t.pixelRatio,this.tileSize=t.tileSize,this.source=t.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=t.showCollisionBoxes,this.collectResourceTiming=!!t.collectResourceTiming,this.returnDependencies=!!t.returnDependencies,this.promoteId=t.promoteId}parse(t,n,r,o,s){this.status="parsing",this.data=t,this.collisionBoxArray=new e.CollisionBoxArray;const l=new e.DictionaryCoder(Object.keys(t.layers).sort()),c=new e.FeatureIndex(this.tileID,this.promoteId);c.bucketLayerIDs=[];const u={},d={featureIndex:c,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:r},h=n.familiesBySource[this.source];for(const n in h){const i=t.layers[n];if(!i)continue;1===i.version&&e.warnOnce(`Vector tile source "${this.source}" layer "${n}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const o=l.encode(n),s=[];for(let e=0;e<i.length;e++){const t=i.feature(e),r=c.getId(t,n);s.push({feature:t,id:r,index:e,sourceLayerIndex:o})}for(const t of h[n]){const n=t[0];n.source!==this.source&&e.warnOnce(`layer.source = ${n.source} does not equal this.source = ${this.source}`),n.minzoom&&this.zoom<Math.floor(n.minzoom)||n.maxzoom&&this.zoom>=n.maxzoom||"none"!==n.visibility&&(a(t,this.zoom,r),(u[n.id]=n.createBucket({index:c.bucketLayerIDs.length,layers:t,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:o,sourceID:this.source})).populate(s,d,this.tileID.canonical),c.bucketLayerIDs.push(t.map((e=>e.id))))}}let p,m,g,f;const _=e.mapObject(d.glyphDependencies,(e=>Object.keys(e).map(Number)));Object.keys(_).length?o.send("getGlyphs",{uid:this.uid,stacks:_},((e,t)=>{p||(p=e,m=t,y.call(this))})):m={};const b=Object.keys(d.iconDependencies);b.length?o.send("getImages",{icons:b,source:this.source,tileID:this.tileID,type:"icons"},((e,t)=>{p||(p=e,g=t,y.call(this))})):g={};const v=Object.keys(d.patternDependencies);function y(){if(p)return s(p);if(m&&g&&f){const t=new i(m),n=new e.ImageAtlas(g,f);for(const i in u){const o=u[i];o instanceof e.SymbolBucket?(a(o.layers,this.zoom,r),e.performSymbolLayout({bucket:o,glyphMap:m,glyphPositions:t.positions,imageMap:g,imagePositions:n.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):o.hasPattern&&(o instanceof e.LineBucket||o instanceof e.FillBucket||o instanceof e.FillExtrusionBucket)&&(a(o.layers,this.zoom,r),o.addFeatures(d,this.tileID.canonical,n.patternPositions))}this.status="done",s(null,{buckets:Object.values(u).filter((e=>!e.isEmpty())),featureIndex:c,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:t.image,imageAtlas:n,glyphMap:this.returnDependencies?m:null,iconMap:this.returnDependencies?g:null,glyphPositions:this.returnDependencies?t.positions:null})}}v.length?o.send("getImages",{icons:v,source:this.source,tileID:this.tileID,type:"patterns"},((e,t)=>{p||(p=e,f=t,y.call(this))})):f={},y.call(this)}}function a(t,n,r){const i=new e.EvaluationParameters(n);for(const e of t)e.recalculate(i,r)}function s(t,n){const r=e.getArrayBuffer(t.request,((t,r,i,o)=>{t?n(t):r&&n(null,{vectorTile:new e.vectorTile.VectorTile(new e.pbf(r)),rawData:r,cacheControl:i,expires:o})}));return()=>{r.cancel(),n()}}class l{constructor(e,t,n,r){this.actor=e,this.layerIndex=t,this.availableImages=n,this.loadVectorData=r||s,this.loading={},this.loaded={}}loadTile(t,n){const r=t.uid;this.loading||(this.loading={});const i=!!(t&&t.request&&t.request.collectResourceTiming)&&new e.RequestPerformance(t.request),a=this.loading[r]=new o(t);a.abort=this.loadVectorData(t,((t,o)=>{if(delete this.loading[r],t||!o)return a.status="done",this.loaded[r]=a,n(t);const s=o.rawData,l={};o.expires&&(l.expires=o.expires),o.cacheControl&&(l.cacheControl=o.cacheControl);const c={};if(i){const e=i.finish();e&&(c.resourceTiming=JSON.parse(JSON.stringify(e)))}a.vectorTile=o.vectorTile,a.parse(o.vectorTile,this.layerIndex,this.availableImages,this.actor,((t,r)=>{if(t||!r)return n(t);n(null,e.extend({rawTileData:s.slice(0)},r,l,c))})),this.loaded=this.loaded||{},this.loaded[r]=a}))}reloadTile(e,t){const n=this.loaded,r=e.uid,i=this;if(n&&n[r]){const o=n[r];o.showCollisionBoxes=e.showCollisionBoxes;const a=(e,n)=>{const r=o.reloadCallback;r&&(delete o.reloadCallback,o.parse(o.vectorTile,i.layerIndex,this.availableImages,i.actor,r)),t(e,n)};"parsing"===o.status?o.reloadCallback=a:"done"===o.status&&(o.vectorTile?o.parse(o.vectorTile,this.layerIndex,this.availableImages,this.actor,a):a())}}abortTile(e,t){const n=this.loading,r=e.uid;n&&n[r]&&n[r].abort&&(n[r].abort(),delete n[r]),t()}removeTile(e,t){const n=this.loaded,r=e.uid;n&&n[r]&&delete n[r],t()}}class c{constructor(){this.loaded={}}loadTile(t,n){const{uid:r,encoding:i,rawImageData:o}=t,a=e.isImageBitmap(o)?this.getImageData(o):o,s=new e.DEMData(r,a,i);this.loaded=this.loaded||{},this.loaded[r]=s,n(null,s)}getImageData(t){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(t.width,t.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=t.width,this.offscreenCanvas.height=t.height,this.offscreenCanvasContext.drawImage(t,0,0,t.width,t.height);const n=this.offscreenCanvasContext.getImageData(-1,-1,t.width+2,t.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new e.RGBAImage({width:n.width,height:n.height},n.data)}removeTile(e){const t=this.loaded,n=e.uid;t&&t[n]&&delete t[n]}}var u=function e(t,n){var r,i=t&&t.type;if("FeatureCollection"===i)for(r=0;r<t.features.length;r++)e(t.features[r],n);else if("GeometryCollection"===i)for(r=0;r<t.geometries.length;r++)e(t.geometries[r],n);else if("Feature"===i)e(t.geometry,n);else if("Polygon"===i)d(t.coordinates,n);else if("MultiPolygon"===i)for(r=0;r<t.coordinates.length;r++)d(t.coordinates[r],n);return t};function d(e,t){if(0!==e.length){h(e[0],t);for(var n=1;n<e.length;n++)h(e[n],!t)}}function h(e,t){for(var n=0,r=0,i=0,o=e.length,a=o-1;i<o;a=i++){var s=(e[i][0]-e[a][0])*(e[a][1]+e[i][1]),l=n+s;r+=Math.abs(n)>=Math.abs(s)?n-l+s:s-l+n,n=l}n+r>=0!=!!t&&e.reverse()}const p=e.vectorTile.VectorTileFeature.prototype.toGeoJSON;class m{constructor(t){this._feature=t,this.extent=e.EXTENT,this.type=t.type,this.properties=t.tags,"id"in t&&!isNaN(t.id)&&(this.id=parseInt(t.id,10))}loadGeometry(){if(1===this._feature.type){const t=[];for(const n of this._feature.geometry)t.push([new e.pointGeometry(n[0],n[1])]);return t}{const t=[];for(const n of this._feature.geometry){const r=[];for(const t of n)r.push(new e.pointGeometry(t[0],t[1]));t.push(r)}return t}}toGeoJSON(e,t,n){return p.call(this,e,t,n)}}class g{constructor(t){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=e.EXTENT,this.length=t.length,this._features=t}feature(e){return new m(this._features[e])}}var f={exports:{}},_=e.pointGeometry,b=e.vectorTile.VectorTileFeature,v=y;function y(e,t){this.options=t||{},this.features=e,this.length=e.length}function E(e,t){this.id="number"==typeof e.id?e.id:void 0,this.type=e.type,this.rawGeometry=1===e.type?[e.geometry]:e.geometry,this.properties=e.tags,this.extent=t||4096}y.prototype.feature=function(e){return new E(this.features[e],this.options.extent)},E.prototype.loadGeometry=function(){var e=this.rawGeometry;this.geometry=[];for(var t=0;t<e.length;t++){for(var n=e[t],r=[],i=0;i<n.length;i++)r.push(new _(n[i][0],n[i][1]));this.geometry.push(r)}return this.geometry},E.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var e=this.geometry,t=1/0,n=-1/0,r=1/0,i=-1/0,o=0;o<e.length;o++)for(var a=e[o],s=0;s<a.length;s++){var l=a[s];t=Math.min(t,l.x),n=Math.max(n,l.x),r=Math.min(r,l.y),i=Math.max(i,l.y)}return[t,r,n,i]},E.prototype.toGeoJSON=b.prototype.toGeoJSON;var S=e.pbf,w=v;function T(e){var t=new S;return function(e,t){for(var n in e.layers)t.writeMessage(3,C,e.layers[n])}(e,t),t.finish()}function C(e,t){var n;t.writeVarintField(15,e.version||1),t.writeStringField(1,e.name||""),t.writeVarintField(5,e.extent||4096);var r={keys:[],values:[],keycache:{},valuecache:{}};for(n=0;n<e.length;n++)r.feature=e.feature(n),t.writeMessage(2,x,r);var i=r.keys;for(n=0;n<i.length;n++)t.writeStringField(3,i[n]);var o=r.values;for(n=0;n<o.length;n++)t.writeMessage(4,I,o[n])}function x(e,t){var n=e.feature;void 0!==n.id&&t.writeVarintField(1,n.id),t.writeMessage(2,F,e),t.writeVarintField(3,n.type),t.writeMessage(4,O,n)}function F(e,t){var n=e.feature,r=e.keys,i=e.values,o=e.keycache,a=e.valuecache;for(var s in n.properties){var l=n.properties[s],c=o[s];if(null!==l){void 0===c&&(r.push(s),o[s]=c=r.length-1),t.writeVarint(c);var u=typeof l;"string"!==u&&"boolean"!==u&&"number"!==u&&(l=JSON.stringify(l));var d=u+":"+l,h=a[d];void 0===h&&(i.push(l),a[d]=h=i.length-1),t.writeVarint(h)}}}function D(e,t){return(t<<3)+(7&e)}function k(e){return e<<1^e>>31}function O(e,t){for(var n=e.loadGeometry(),r=e.type,i=0,o=0,a=n.length,s=0;s<a;s++){var l=n[s],c=1;1===r&&(c=l.length),t.writeVarint(D(1,c));for(var u=3===r?l.length-1:l.length,d=0;d<u;d++){1===d&&1!==r&&t.writeVarint(D(2,u-1));var h=l[d].x-i,p=l[d].y-o;t.writeVarint(k(h)),t.writeVarint(k(p)),i+=h,o+=p}3===r&&t.writeVarint(D(7,1))}}function I(e,t){var n=typeof e;"string"===n?t.writeStringField(1,e):"boolean"===n?t.writeBooleanField(7,e):"number"===n&&(e%1!=0?t.writeDoubleField(3,e):e<0?t.writeSVarintField(6,e):t.writeVarintField(5,e))}function A(e,t,n,r,i,o){if(i-r<=n)return;const a=r+i>>1;R(e,t,a,r,i,o%2),A(e,t,n,r,a-1,o+1),A(e,t,n,a+1,i,o+1)}function R(e,t,n,r,i,o){for(;i>r;){if(i-r>600){const a=i-r+1,s=n-r+1,l=Math.log(a),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(a-c)/a)*(s-a/2<0?-1:1);R(e,t,n,Math.max(r,Math.floor(n-s*c/a+u)),Math.min(i,Math.floor(n+(a-s)*c/a+u)),o)}const a=t[2*n+o];let s=r,l=i;for(N(e,t,r,n),t[2*i+o]>a&&N(e,t,r,i);s<l;){for(N(e,t,s,l),s++,l--;t[2*s+o]<a;)s++;for(;t[2*l+o]>a;)l--}t[2*r+o]===a?N(e,t,r,l):(l++,N(e,t,l,i)),l<=n&&(r=l+1),n<=l&&(i=l-1)}}function N(e,t,n,r){M(e,n,r),M(t,2*n,2*r),M(t,2*n+1,2*r+1)}function M(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function P(e,t,n,r){const i=e-n,o=t-r;return i*i+o*o}f.exports=T,f.exports.fromVectorTileJs=T,f.exports.fromGeojsonVt=function(e,t){t=t||{};var n={};for(var r in e)n[r]=new w(e[r].features,t),n[r].name=r,n[r].version=t.version,n[r].extent=t.extent;return T({layers:n})},f.exports.GeoJSONWrapper=w;const L=e=>e[0],B=e=>e[1];class U{constructor(e,t=L,n=B,r=64,i=Float64Array){this.nodeSize=r,this.points=e;const o=e.length<65536?Uint16Array:Uint32Array,a=this.ids=new o(e.length),s=this.coords=new i(2*e.length);for(let r=0;r<e.length;r++)a[r]=r,s[2*r]=t(e[r]),s[2*r+1]=n(e[r]);A(a,s,r,0,a.length-1,0)}range(e,t,n,r){return function(e,t,n,r,i,o,a){const s=[0,e.length-1,0],l=[];let c,u;for(;s.length;){const d=s.pop(),h=s.pop(),p=s.pop();if(h-p<=a){for(let a=p;a<=h;a++)c=t[2*a],u=t[2*a+1],c>=n&&c<=i&&u>=r&&u<=o&&l.push(e[a]);continue}const m=Math.floor((p+h)/2);c=t[2*m],u=t[2*m+1],c>=n&&c<=i&&u>=r&&u<=o&&l.push(e[m]);const g=(d+1)%2;(0===d?n<=c:r<=u)&&(s.push(p),s.push(m-1),s.push(g)),(0===d?i>=c:o>=u)&&(s.push(m+1),s.push(h),s.push(g))}return l}(this.ids,this.coords,e,t,n,r,this.nodeSize)}within(e,t,n){return function(e,t,n,r,i,o){const a=[0,e.length-1,0],s=[],l=i*i;for(;a.length;){const c=a.pop(),u=a.pop(),d=a.pop();if(u-d<=o){for(let i=d;i<=u;i++)P(t[2*i],t[2*i+1],n,r)<=l&&s.push(e[i]);continue}const h=Math.floor((d+u)/2),p=t[2*h],m=t[2*h+1];P(p,m,n,r)<=l&&s.push(e[h]);const g=(c+1)%2;(0===c?n-i<=p:r-i<=m)&&(a.push(d),a.push(h-1),a.push(g)),(0===c?n+i>=p:r+i>=m)&&(a.push(h+1),a.push(u),a.push(g))}return s}(this.ids,this.coords,e,t,n,this.nodeSize)}}const j={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e},G=Math.fround||(z=new Float32Array(1),e=>(z[0]=+e,z[0]));var z;class H{constructor(e){this.options=X(Object.create(j),e),this.trees=new Array(this.options.maxZoom+1)}load(e){const{log:t,minZoom:n,maxZoom:r,nodeSize:i}=this.options;t&&console.time("total time");const o=`prepare ${e.length} points`;t&&console.time(o),this.points=e;let a=[];for(let t=0;t<e.length;t++)e[t].geometry&&a.push(V(e[t],t));this.trees[r+1]=new U(a,Z,J,i,Float32Array),t&&console.timeEnd(o);for(let e=r;e>=n;e--){const n=+Date.now();a=this._cluster(a,e),this.trees[e]=new U(a,Z,J,i,Float32Array),t&&console.log("z%d: %d clusters in %dms",e,a.length,+Date.now()-n)}return t&&console.timeEnd("total time"),this}getClusters(e,t){let n=((e[0]+180)%360+360)%360-180;const r=Math.max(-90,Math.min(90,e[1]));let i=180===e[2]?180:((e[2]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)n=-180,i=180;else if(n>i){const e=this.getClusters([n,r,180,o],t),a=this.getClusters([-180,r,i,o],t);return e.concat(a)}const a=this.trees[this._limitZoom(t)],s=a.range(W(n),Y(o),W(i),Y(r)),l=[];for(const e of s){const t=a.points[e];l.push(t.numPoints?$(t):this.points[t.index])}return l}getChildren(e){const t=this._getOriginId(e),n=this._getOriginZoom(e),r="No cluster with the specified id.",i=this.trees[n];if(!i)throw new Error(r);const o=i.points[t];if(!o)throw new Error(r);const a=this.options.radius/(this.options.extent*Math.pow(2,n-1)),s=i.within(o.x,o.y,a),l=[];for(const t of s){const n=i.points[t];n.parentId===e&&l.push(n.numPoints?$(n):this.points[n.index])}if(0===l.length)throw new Error(r);return l}getLeaves(e,t,n){const r=[];return this._appendLeaves(r,e,t=t||10,n=n||0,0),r}getTile(e,t,n){const r=this.trees[this._limitZoom(e)],i=Math.pow(2,e),{extent:o,radius:a}=this.options,s=a/o,l=(n-s)/i,c=(n+1+s)/i,u={features:[]};return this._addTileFeatures(r.range((t-s)/i,l,(t+1+s)/i,c),r.points,t,n,i,u),0===t&&this._addTileFeatures(r.range(1-s/i,l,1,c),r.points,i,n,i,u),t===i-1&&this._addTileFeatures(r.range(0,l,s/i,c),r.points,-1,n,i,u),u.features.length?u:null}getClusterExpansionZoom(e){let t=this._getOriginZoom(e)-1;for(;t<=this.options.maxZoom;){const n=this.getChildren(e);if(t++,1!==n.length)break;e=n[0].properties.cluster_id}return t}_appendLeaves(e,t,n,r,i){const o=this.getChildren(t);for(const t of o){const o=t.properties;if(o&&o.cluster?i+o.point_count<=r?i+=o.point_count:i=this._appendLeaves(e,o.cluster_id,n,r,i):i<r?i++:e.push(t),e.length===n)break}return i}_addTileFeatures(e,t,n,r,i,o){for(const a of e){const e=t[a],s=e.numPoints;let l,c,u;if(s)l=K(e),c=e.x,u=e.y;else{const t=this.points[e.index];l=t.properties,c=W(t.geometry.coordinates[0]),u=Y(t.geometry.coordinates[1])}const d={type:1,geometry:[[Math.round(this.options.extent*(c*i-n)),Math.round(this.options.extent*(u*i-r))]],tags:l};let h;s?h=e.id:this.options.generateId?h=e.index:this.points[e.index].id&&(h=this.points[e.index].id),void 0!==h&&(d.id=h),o.features.push(d)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,t){const n=[],{radius:r,extent:i,reduce:o,minPoints:a}=this.options,s=r/(i*Math.pow(2,t));for(let r=0;r<e.length;r++){const i=e[r];if(i.zoom<=t)continue;i.zoom=t;const l=this.trees[t+1],c=l.within(i.x,i.y,s),u=i.numPoints||1;let d=u;for(const e of c){const n=l.points[e];n.zoom>t&&(d+=n.numPoints||1)}if(d>u&&d>=a){let e=i.x*u,a=i.y*u,s=o&&u>1?this._map(i,!0):null;const h=(r<<5)+(t+1)+this.points.length;for(const n of c){const r=l.points[n];if(r.zoom<=t)continue;r.zoom=t;const c=r.numPoints||1;e+=r.x*c,a+=r.y*c,r.parentId=h,o&&(s||(s=this._map(i,!0)),o(s,this._map(r)))}i.parentId=h,n.push(q(e/d,a/d,h,d,s))}else if(n.push(i),d>1)for(const e of c){const r=l.points[e];r.zoom<=t||(r.zoom=t,n.push(r))}}return n}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t){if(e.numPoints)return t?X({},e.properties):e.properties;const n=this.points[e.index].properties,r=this.options.map(n);return t&&r===n?X({},r):r}}function q(e,t,n,r,i){return{x:G(e),y:G(t),zoom:1/0,id:n,parentId:-1,numPoints:r,properties:i}}function V(e,t){const[n,r]=e.geometry.coordinates;return{x:G(W(n)),y:G(Y(r)),zoom:1/0,index:t,parentId:-1}}function $(e){return{type:"Feature",id:e.id,properties:K(e),geometry:{type:"Point",coordinates:[(t=e.x,360*(t-.5)),Q(e.y)]}};var t}function K(e){const t=e.numPoints,n=t>=1e4?`${Math.round(t/1e3)}k`:t>=1e3?Math.round(t/100)/10+"k":t;return X(X({},e.properties),{cluster:!0,cluster_id:e.id,point_count:t,point_count_abbreviated:n})}function W(e){return e/360+.5}function Y(e){const t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function Q(e){const t=(180-360*e)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}function X(e,t){for(const n in t)e[n]=t[n];return e}function Z(e){return e.x}function J(e){return e.y}function ee(e,t,n,r){for(var i,o=r,a=n-t>>1,s=n-t,l=e[t],c=e[t+1],u=e[n],d=e[n+1],h=t+3;h<n;h+=3){var p=te(e[h],e[h+1],l,c,u,d);if(p>o)i=h,o=p;else if(p===o){var m=Math.abs(h-a);m<s&&(i=h,s=m)}}o>r&&(i-t>3&&ee(e,t,i,r),e[i+2]=o,n-i>3&&ee(e,i,n,r))}function te(e,t,n,r,i,o){var a=i-n,s=o-r;if(0!==a||0!==s){var l=((e-n)*a+(t-r)*s)/(a*a+s*s);l>1?(n=i,r=o):l>0&&(n+=a*l,r+=s*l)}return(a=e-n)*a+(s=t-r)*s}function ne(e,t,n,r){var i={id:void 0===e?null:e,type:t,geometry:n,tags:r,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(e){var t=e.geometry,n=e.type;if("Point"===n||"MultiPoint"===n||"LineString"===n)re(e,t);else if("Polygon"===n||"MultiLineString"===n)for(var r=0;r<t.length;r++)re(e,t[r]);else if("MultiPolygon"===n)for(r=0;r<t.length;r++)for(var i=0;i<t[r].length;i++)re(e,t[r][i])}(i),i}function re(e,t){for(var n=0;n<t.length;n+=3)e.minX=Math.min(e.minX,t[n]),e.minY=Math.min(e.minY,t[n+1]),e.maxX=Math.max(e.maxX,t[n]),e.maxY=Math.max(e.maxY,t[n+1])}function ie(e,t,n,r){if(t.geometry){var i=t.geometry.coordinates,o=t.geometry.type,a=Math.pow(n.tolerance/((1<<n.maxZoom)*n.extent),2),s=[],l=t.id;if(n.promoteId?l=t.properties[n.promoteId]:n.generateId&&(l=r||0),"Point"===o)oe(i,s);else if("MultiPoint"===o)for(var c=0;c<i.length;c++)oe(i[c],s);else if("LineString"===o)ae(i,s,a,!1);else if("MultiLineString"===o){if(n.lineMetrics){for(c=0;c<i.length;c++)ae(i[c],s=[],a,!1),e.push(ne(l,"LineString",s,t.properties));return}se(i,s,a,!1)}else if("Polygon"===o)se(i,s,a,!0);else{if("MultiPolygon"!==o){if("GeometryCollection"===o){for(c=0;c<t.geometry.geometries.length;c++)ie(e,{id:l,geometry:t.geometry.geometries[c],properties:t.properties},n,r);return}throw new Error("Input data is not a valid GeoJSON object.")}for(c=0;c<i.length;c++){var u=[];se(i[c],u,a,!0),s.push(u)}}e.push(ne(l,o,s,t.properties))}}function oe(e,t){t.push(le(e[0])),t.push(ce(e[1])),t.push(0)}function ae(e,t,n,r){for(var i,o,a=0,s=0;s<e.length;s++){var l=le(e[s][0]),c=ce(e[s][1]);t.push(l),t.push(c),t.push(0),s>0&&(a+=r?(i*c-l*o)/2:Math.sqrt(Math.pow(l-i,2)+Math.pow(c-o,2))),i=l,o=c}var u=t.length-3;t[2]=1,ee(t,0,u,n),t[u+2]=1,t.size=Math.abs(a),t.start=0,t.end=t.size}function se(e,t,n,r){for(var i=0;i<e.length;i++){var o=[];ae(e[i],o,n,r),t.push(o)}}function le(e){return e/360+.5}function ce(e){var t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function ue(e,t,n,r,i,o,a,s){if(r/=t,o>=(n/=t)&&a<r)return e;if(a<n||o>=r)return null;for(var l=[],c=0;c<e.length;c++){var u=e[c],d=u.geometry,h=u.type,p=0===i?u.minX:u.minY,m=0===i?u.maxX:u.maxY;if(p>=n&&m<r)l.push(u);else if(!(m<n||p>=r)){var g=[];if("Point"===h||"MultiPoint"===h)de(d,g,n,r,i);else if("LineString"===h)he(d,g,n,r,i,!1,s.lineMetrics);else if("MultiLineString"===h)me(d,g,n,r,i,!1);else if("Polygon"===h)me(d,g,n,r,i,!0);else if("MultiPolygon"===h)for(var f=0;f<d.length;f++){var _=[];me(d[f],_,n,r,i,!0),_.length&&g.push(_)}if(g.length){if(s.lineMetrics&&"LineString"===h){for(f=0;f<g.length;f++)l.push(ne(u.id,h,g[f],u.tags));continue}"LineString"!==h&&"MultiLineString"!==h||(1===g.length?(h="LineString",g=g[0]):h="MultiLineString"),"Point"!==h&&"MultiPoint"!==h||(h=3===g.length?"Point":"MultiPoint"),l.push(ne(u.id,h,g,u.tags))}}}return l.length?l:null}function de(e,t,n,r,i){for(var o=0;o<e.length;o+=3){var a=e[o+i];a>=n&&a<=r&&(t.push(e[o]),t.push(e[o+1]),t.push(e[o+2]))}}function he(e,t,n,r,i,o,a){for(var s,l,c=pe(e),u=0===i?fe:_e,d=e.start,h=0;h<e.length-3;h+=3){var p=e[h],m=e[h+1],g=e[h+2],f=e[h+3],_=e[h+4],b=0===i?p:m,v=0===i?f:_,y=!1;a&&(s=Math.sqrt(Math.pow(p-f,2)+Math.pow(m-_,2))),b<n?v>n&&(l=u(c,p,m,f,_,n),a&&(c.start=d+s*l)):b>r?v<r&&(l=u(c,p,m,f,_,r),a&&(c.start=d+s*l)):ge(c,p,m,g),v<n&&b>=n&&(l=u(c,p,m,f,_,n),y=!0),v>r&&b<=r&&(l=u(c,p,m,f,_,r),y=!0),!o&&y&&(a&&(c.end=d+s*l),t.push(c),c=pe(e)),a&&(d+=s)}var E=e.length-3;p=e[E],m=e[E+1],g=e[E+2],(b=0===i?p:m)>=n&&b<=r&&ge(c,p,m,g),E=c.length-3,o&&E>=3&&(c[E]!==c[0]||c[E+1]!==c[1])&&ge(c,c[0],c[1],c[2]),c.length&&t.push(c)}function pe(e){var t=[];return t.size=e.size,t.start=e.start,t.end=e.end,t}function me(e,t,n,r,i,o){for(var a=0;a<e.length;a++)he(e[a],t,n,r,i,o,!1)}function ge(e,t,n,r){e.push(t),e.push(n),e.push(r)}function fe(e,t,n,r,i,o){var a=(o-t)/(r-t);return e.push(o),e.push(n+(i-n)*a),e.push(1),a}function _e(e,t,n,r,i,o){var a=(o-n)/(i-n);return e.push(t+(r-t)*a),e.push(o),e.push(1),a}function be(e,t){for(var n=[],r=0;r<e.length;r++){var i,o=e[r],a=o.type;if("Point"===a||"MultiPoint"===a||"LineString"===a)i=ve(o.geometry,t);else if("MultiLineString"===a||"Polygon"===a){i=[];for(var s=0;s<o.geometry.length;s++)i.push(ve(o.geometry[s],t))}else if("MultiPolygon"===a)for(i=[],s=0;s<o.geometry.length;s++){for(var l=[],c=0;c<o.geometry[s].length;c++)l.push(ve(o.geometry[s][c],t));i.push(l)}n.push(ne(o.id,a,i,o.tags))}return n}function ve(e,t){var n=[];n.size=e.size,void 0!==e.start&&(n.start=e.start,n.end=e.end);for(var r=0;r<e.length;r+=3)n.push(e[r]+t,e[r+1],e[r+2]);return n}function ye(e,t){if(e.transformed)return e;var n,r,i,o=1<<e.z,a=e.x,s=e.y;for(n=0;n<e.features.length;n++){var l=e.features[n],c=l.geometry,u=l.type;if(l.geometry=[],1===u)for(r=0;r<c.length;r+=2)l.geometry.push(Ee(c[r],c[r+1],t,o,a,s));else for(r=0;r<c.length;r++){var d=[];for(i=0;i<c[r].length;i+=2)d.push(Ee(c[r][i],c[r][i+1],t,o,a,s));l.geometry.push(d)}}return e.transformed=!0,e}function Ee(e,t,n,r,i,o){return[Math.round(n*(e*r-i)),Math.round(n*(t*r-o))]}function Se(e,t,n,r,i){for(var o=t===i.maxZoom?0:i.tolerance/((1<<t)*i.extent),a={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:n,y:r,z:t,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},s=0;s<e.length;s++){a.numFeatures++,we(a,e[s],o,i);var l=e[s].minX,c=e[s].minY,u=e[s].maxX,d=e[s].maxY;l<a.minX&&(a.minX=l),c<a.minY&&(a.minY=c),u>a.maxX&&(a.maxX=u),d>a.maxY&&(a.maxY=d)}return a}function we(e,t,n,r){var i=t.geometry,o=t.type,a=[];if("Point"===o||"MultiPoint"===o)for(var s=0;s<i.length;s+=3)a.push(i[s]),a.push(i[s+1]),e.numPoints++,e.numSimplified++;else if("LineString"===o)Te(a,i,e,n,!1,!1);else if("MultiLineString"===o||"Polygon"===o)for(s=0;s<i.length;s++)Te(a,i[s],e,n,"Polygon"===o,0===s);else if("MultiPolygon"===o)for(var l=0;l<i.length;l++){var c=i[l];for(s=0;s<c.length;s++)Te(a,c[s],e,n,!0,0===s)}if(a.length){var u=t.tags||null;if("LineString"===o&&r.lineMetrics){for(var d in u={},t.tags)u[d]=t.tags[d];u.mapbox_clip_start=i.start/i.size,u.mapbox_clip_end=i.end/i.size}var h={geometry:a,type:"Polygon"===o||"MultiPolygon"===o?3:"LineString"===o||"MultiLineString"===o?2:1,tags:u};null!==t.id&&(h.id=t.id),e.features.push(h)}}function Te(e,t,n,r,i,o){var a=r*r;if(r>0&&t.size<(i?a:r))n.numPoints+=t.length/3;else{for(var s=[],l=0;l<t.length;l+=3)(0===r||t[l+2]>a)&&(n.numSimplified++,s.push(t[l]),s.push(t[l+1])),n.numPoints++;i&&function(e,t){for(var n=0,r=0,i=e.length,o=i-2;r<i;o=r,r+=2)n+=(e[r]-e[o])*(e[r+1]+e[o+1]);if(n>0===t)for(r=0,i=e.length;r<i/2;r+=2){var a=e[r],s=e[r+1];e[r]=e[i-2-r],e[r+1]=e[i-1-r],e[i-2-r]=a,e[i-1-r]=s}}(s,o),e.push(s)}}function Ce(e,t){var n=(t=this.options=function(e,t){for(var n in t)e[n]=t[n];return e}(Object.create(this.options),t)).debug;if(n&&console.time("preprocess data"),t.maxZoom<0||t.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(t.promoteId&&t.generateId)throw new Error("promoteId and generateId cannot be used together.");var r=function(e,t){var n=[];if("FeatureCollection"===e.type)for(var r=0;r<e.features.length;r++)ie(n,e.features[r],t,r);else ie(n,"Feature"===e.type?e:{geometry:e},t);return n}(e,t);this.tiles={},this.tileCoords=[],n&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",t.indexMaxZoom,t.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),r=function(e,t){var n=t.buffer/t.extent,r=e,i=ue(e,1,-1-n,n,0,-1,2,t),o=ue(e,1,1-n,2+n,0,-1,2,t);return(i||o)&&(r=ue(e,1,-n,1+n,0,-1,2,t)||[],i&&(r=be(i,1).concat(r)),o&&(r=r.concat(be(o,-1)))),r}(r,t),r.length&&this.splitTile(r,0,0,0),n&&(r.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}function xe(e,t,n){return 32*((1<<e)*n+t)+e}function Fe(e,t){const n=e.tileID.canonical;if(!this._geoJSONIndex)return t(null,null);const r=this._geoJSONIndex.getTile(n.z,n.x,n.y);if(!r)return t(null,null);const i=new g(r.features);let o=f.exports(i);0===o.byteOffset&&o.byteLength===o.buffer.byteLength||(o=new Uint8Array(o)),t(null,{vectorTile:i,rawData:o.buffer})}Ce.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Ce.prototype.splitTile=function(e,t,n,r,i,o,a){for(var s=[e,t,n,r],l=this.options,c=l.debug;s.length;){r=s.pop(),n=s.pop(),t=s.pop(),e=s.pop();var u=1<<t,d=xe(t,n,r),h=this.tiles[d];if(!h&&(c>1&&console.time("creation"),h=this.tiles[d]=Se(e,t,n,r,l),this.tileCoords.push({z:t,x:n,y:r}),c)){c>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",t,n,r,h.numFeatures,h.numPoints,h.numSimplified),console.timeEnd("creation"));var p="z"+t;this.stats[p]=(this.stats[p]||0)+1,this.total++}if(h.source=e,i){if(t===l.maxZoom||t===i)continue;var m=1<<i-t;if(n!==Math.floor(o/m)||r!==Math.floor(a/m))continue}else if(t===l.indexMaxZoom||h.numPoints<=l.indexMaxPoints)continue;if(h.source=null,0!==e.length){c>1&&console.time("clipping");var g,f,_,b,v,y,E=.5*l.buffer/l.extent,S=.5-E,w=.5+E,T=1+E;g=f=_=b=null,v=ue(e,u,n-E,n+w,0,h.minX,h.maxX,l),y=ue(e,u,n+S,n+T,0,h.minX,h.maxX,l),e=null,v&&(g=ue(v,u,r-E,r+w,1,h.minY,h.maxY,l),f=ue(v,u,r+S,r+T,1,h.minY,h.maxY,l),v=null),y&&(_=ue(y,u,r-E,r+w,1,h.minY,h.maxY,l),b=ue(y,u,r+S,r+T,1,h.minY,h.maxY,l),y=null),c>1&&console.timeEnd("clipping"),s.push(g||[],t+1,2*n,2*r),s.push(f||[],t+1,2*n,2*r+1),s.push(_||[],t+1,2*n+1,2*r),s.push(b||[],t+1,2*n+1,2*r+1)}}},Ce.prototype.getTile=function(e,t,n){var r=this.options,i=r.extent,o=r.debug;if(e<0||e>24)return null;var a=1<<e,s=xe(e,t=(t%a+a)%a,n);if(this.tiles[s])return ye(this.tiles[s],i);o>1&&console.log("drilling down to z%d-%d-%d",e,t,n);for(var l,c=e,u=t,d=n;!l&&c>0;)c--,u=Math.floor(u/2),d=Math.floor(d/2),l=this.tiles[xe(c,u,d)];return l&&l.source?(o>1&&console.log("found parent tile z%d-%d-%d",c,u,d),o>1&&console.time("drilling down"),this.splitTile(l.source,c,u,d,e,t,n),o>1&&console.timeEnd("drilling down"),this.tiles[s]?ye(this.tiles[s],i):null):null};class De extends l{constructor(e,t,n,r){super(e,t,n,Fe),r&&(this.loadGeoJSON=r)}loadData(t,n){var r;null===(r=this._pendingRequest)||void 0===r||r.cancel(),this._pendingCallback&&this._pendingCallback(null,{abandoned:!0});const i=!!(t&&t.request&&t.request.collectResourceTiming)&&new e.RequestPerformance(t.request);this._pendingCallback=n,this._pendingRequest=this.loadGeoJSON(t,((r,o)=>{if(delete this._pendingCallback,delete this._pendingRequest,r||!o)return n(r);if("object"!=typeof o)return n(new Error(`Input data given to '${t.source}' is not a valid GeoJSON object.`));{u(o,!0);try{if(t.filter){const n=e.createExpression(t.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===n.result)throw new Error(n.value.map((e=>`${e.key}: ${e.message}`)).join(", "));const r=o.features.filter((e=>n.value.evaluate({zoom:0},e)));o={type:"FeatureCollection",features:r}}this._geoJSONIndex=t.cluster?new H(function({superclusterOptions:t,clusterProperties:n}){if(!n||!t)return t;const r={},i={},o={accumulated:null,zoom:0},a={properties:null},s=Object.keys(n);for(const t of s){const[o,a]=n[t],s=e.createExpression(a),l=e.createExpression("string"==typeof o?[o,["accumulated"],["get",t]]:o);r[t]=s.value,i[t]=l.value}return t.map=e=>{a.properties=e;const t={};for(const e of s)t[e]=r[e].evaluate(o,a);return t},t.reduce=(e,t)=>{a.properties=t;for(const t of s)o.accumulated=e[t],e[t]=i[t].evaluate(o,a)},t}(t)).load(o.features):function(e,t){return new Ce(e,t)}(o,t.geojsonVtOptions)}catch(r){return n(r)}this.loaded={};const a={};if(i){const e=i.finish();e&&(a.resourceTiming={},a.resourceTiming[t.source]=JSON.parse(JSON.stringify(e)))}n(null,a)}}))}reloadTile(e,t){const n=this.loaded;return n&&n[e.uid]?super.reloadTile(e,t):this.loadTile(e,t)}loadGeoJSON(t,n){if(t.request)return e.getJSON(t.request,n);if("string"==typeof t.data)try{n(null,JSON.parse(t.data))}catch(e){n(new Error(`Input data given to '${t.source}' is not a valid GeoJSON object.`))}else n(new Error(`Input data given to '${t.source}' is not a valid GeoJSON object.`));return{cancel:()=>{}}}removeSource(e,t){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),t()}getClusterExpansionZoom(e,t){try{t(null,this._geoJSONIndex.getClusterExpansionZoom(e.clusterId))}catch(e){t(e)}}getClusterChildren(e,t){try{t(null,this._geoJSONIndex.getChildren(e.clusterId))}catch(e){t(e)}}getClusterLeaves(e,t){try{t(null,this._geoJSONIndex.getLeaves(e.clusterId,e.limit,e.offset))}catch(e){t(e)}}}class ke{constructor(t){this.self=t,this.actor=new e.Actor(t,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:l,geojson:De},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=(e,t)=>{if(this.workerSourceTypes[e])throw new Error(`Worker source with name "${e}" already registered.`);this.workerSourceTypes[e]=t},this.self.registerRTLTextPlugin=t=>{if(e.plugin.isParsed())throw new Error("RTL text plugin already registered.");e.plugin.applyArabicShaping=t.applyArabicShaping,e.plugin.processBidirectionalText=t.processBidirectionalText,e.plugin.processStyledBidirectionalText=t.processStyledBidirectionalText}}setReferrer(e,t){this.referrer=t}setImages(e,t,n){this.availableImages[e]=t;for(const n in this.workerSources[e]){const r=this.workerSources[e][n];for(const e in r)r[e].availableImages=t}n()}setLayers(e,t,n){this.getLayerIndex(e).replace(t),n()}updateLayers(e,t,n){this.getLayerIndex(e).update(t.layers,t.removedIds),n()}loadTile(e,t,n){this.getWorkerSource(e,t.type,t.source).loadTile(t,n)}loadDEMTile(e,t,n){this.getDEMWorkerSource(e,t.source).loadTile(t,n)}reloadTile(e,t,n){this.getWorkerSource(e,t.type,t.source).reloadTile(t,n)}abortTile(e,t,n){this.getWorkerSource(e,t.type,t.source).abortTile(t,n)}removeTile(e,t,n){this.getWorkerSource(e,t.type,t.source).removeTile(t,n)}removeDEMTile(e,t){this.getDEMWorkerSource(e,t.source).removeTile(t)}removeSource(e,t,n){if(!this.workerSources[e]||!this.workerSources[e][t.type]||!this.workerSources[e][t.type][t.source])return;const r=this.workerSources[e][t.type][t.source];delete this.workerSources[e][t.type][t.source],void 0!==r.removeSource?r.removeSource(t,n):n()}loadWorkerSource(e,t,n){try{this.self.importScripts(t.url),n()}catch(e){n(e.toString())}}syncRTLPluginState(t,n,r){try{e.plugin.setState(n);const t=e.plugin.getPluginURL();if(e.plugin.isLoaded()&&!e.plugin.isParsed()&&null!=t){this.self.importScripts(t);const n=e.plugin.isParsed();r(n?void 0:new Error(`RTL Text Plugin failed to import scripts from ${t}`),n)}}catch(e){r(e.toString())}}getAvailableImages(e){let t=this.availableImages[e];return t||(t=[]),t}getLayerIndex(e){let t=this.layerIndexes[e];return t||(t=this.layerIndexes[e]=new r),t}getWorkerSource(e,t,n){if(this.workerSources[e]||(this.workerSources[e]={}),this.workerSources[e][t]||(this.workerSources[e][t]={}),!this.workerSources[e][t][n]){const r={send:(t,n,r)=>{this.actor.send(t,n,r,e)}};this.workerSources[e][t][n]=new this.workerSourceTypes[t](r,this.getLayerIndex(e),this.getAvailableImages(e))}return this.workerSources[e][t][n]}getDEMWorkerSource(e,t){return this.demWorkerSources[e]||(this.demWorkerSources[e]={}),this.demWorkerSources[e][t]||(this.demWorkerSources[e][t]=new c),this.demWorkerSources[e][t]}enforceCacheSizeLimit(t,n){e.enforceCacheSizeLimit(n)}}return e.isWorker()&&(self.worker=new ke(self)),ke})),r(["./shared"],(function(e){var t=n;function n(e){return!function(e){return"undefined"==typeof window||"undefined"==typeof document?"not a browser":Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray?Function.prototype&&Function.prototype.bind?Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions?"JSON"in window&&"parse"in JSON&&"stringify"in JSON?function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var e,t,n=new Blob([""],{type:"text/javascript"}),r=URL.createObjectURL(n);try{t=new Worker(r),e=!0}catch(t){e=!1}return t&&t.terminate(),URL.revokeObjectURL(r),e}()?"Uint8ClampedArray"in window?ArrayBuffer.isView?function(){var e=document.createElement("canvas");e.width=e.height=1;var t=e.getContext("2d");if(!t)return!1;var n=t.getImageData(0,0,1,1);return n&&n.width===e.width}()?(void 0===r[t=e&&e.failIfMajorPerformanceCaveat]&&(r[t]=function(e){var t,r=function(e){var t=document.createElement("canvas"),r=Object.create(n.webGLContextAttributes);return r.failIfMajorPerformanceCaveat=e,t.getContext("webgl",r)||t.getContext("experimental-webgl",r)}(e);if(!r)return!1;try{t=r.createShader(r.VERTEX_SHADER)}catch(e){return!1}return!(!t||r.isContextLost())&&(r.shaderSource(t,"void main() {}"),r.compileShader(t),!0===r.getShaderParameter(t,r.COMPILE_STATUS))}(t)),r[t]?document.documentMode?"insufficient ECMAScript 6 support":void 0:"insufficient WebGL support"):"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray support":"insufficient worker support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support";var t}(e)}var r={};function i(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!i(e[n],t[n]))return!1;return!0}if("object"==typeof e&&null!==e&&null!==t){if("object"!=typeof t)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!i(e[n],t[n]))return!1;return!0}return e===t}n.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};class o{static testProp(e){if(!o.docStyle)return e[0];for(let t=0;t<e.length;t++)if(e[t]in o.docStyle)return e[t];return e[0]}static create(e,t,n){const r=window.document.createElement(e);return void 0!==t&&(r.className=t),n&&n.appendChild(r),r}static createNS(e,t){return window.document.createElementNS(e,t)}static disableDrag(){o.docStyle&&o.selectProp&&(o.userSelect=o.docStyle[o.selectProp],o.docStyle[o.selectProp]="none")}static enableDrag(){o.docStyle&&o.selectProp&&(o.docStyle[o.selectProp]=o.userSelect)}static setTransform(e,t){e.style[o.transformProp]=t}static addEventListener(e,t,n,r={}){e.addEventListener(t,n,"passive"in r?r:r.capture)}static removeEventListener(e,t,n,r={}){e.removeEventListener(t,n,"passive"in r?r:r.capture)}static suppressClickInternal(e){e.preventDefault(),e.stopPropagation(),window.removeEventListener("click",o.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",o.suppressClickInternal,!0),window.setTimeout((()=>{window.removeEventListener("click",o.suppressClickInternal,!0)}),0)}static mousePos(t,n){const r=t.getBoundingClientRect();return new e.pointGeometry(n.clientX-r.left-t.clientLeft,n.clientY-r.top-t.clientTop)}static touchPos(t,n){const r=t.getBoundingClientRect(),i=[];for(let o=0;o<n.length;o++)i.push(new e.pointGeometry(n[o].clientX-r.left-t.clientLeft,n[o].clientY-r.top-t.clientTop));return i}static mouseButton(e){return e.button}static remove(e){e.parentNode&&e.parentNode.removeChild(e)}}o.docStyle="undefined"!=typeof window&&window.document&&window.document.documentElement.style,o.selectProp=o.testProp(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),o.transformProp=o.testProp(["transform","WebkitTransform"]);class a{constructor(e){this._transformRequestFn=e}transformRequest(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}}normalizeSpriteURL(e,t,n){const r=function(e){const t=e.match(s);if(!t)throw new Error(`Unable to parse URL "${e}"`);return{protocol:t[1],authority:t[2],path:t[3]||"/",params:t[4]?t[4].split("&"):[]}}(e);return r.path+=`${t}${n}`,function(e){const t=e.params.length?`?${e.params.join("&")}`:"";return`${e.protocol}://${e.authority}${e.path}${t}`}(r)}setTransformRequest(e){this._transformRequestFn=e}}const s=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;class l{constructor(e,t,n,r){this.context=e,this.format=n,this.texture=e.gl.createTexture(),this.update(t,r)}update(t,n,r){const{width:i,height:o}=t,a=!(this.size&&this.size[0]===i&&this.size[1]===o||r),{context:s}=this,{gl:l}=s;if(this.useMipmap=Boolean(n&&n.useMipmap),l.bindTexture(l.TEXTURE_2D,this.texture),s.pixelStoreUnpackFlipY.set(!1),s.pixelStoreUnpack.set(1),s.pixelStoreUnpackPremultiplyAlpha.set(this.format===l.RGBA&&(!n||!1!==n.premultiply)),a)this.size=[i,o],t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof ImageData||e.isImageBitmap(t)?l.texImage2D(l.TEXTURE_2D,0,this.format,this.format,l.UNSIGNED_BYTE,t):l.texImage2D(l.TEXTURE_2D,0,this.format,i,o,0,this.format,l.UNSIGNED_BYTE,t.data);else{const{x:n,y:a}=r||{x:0,y:0};t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof ImageData||e.isImageBitmap(t)?l.texSubImage2D(l.TEXTURE_2D,0,n,a,l.RGBA,l.UNSIGNED_BYTE,t):l.texSubImage2D(l.TEXTURE_2D,0,n,a,i,o,l.RGBA,l.UNSIGNED_BYTE,t.data)}this.useMipmap&&this.isSizePowerOfTwo()&&l.generateMipmap(l.TEXTURE_2D)}bind(e,t,n){const{context:r}=this,{gl:i}=r;i.bindTexture(i.TEXTURE_2D,this.texture),n!==i.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(n=i.LINEAR),e!==this.filter&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,e),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,n||e),this.filter=e),t!==this.wrap&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,t),this.wrap=t)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:e}=this.context;e.deleteTexture(this.texture),this.texture=null}}function c(e){const{userImage:t}=e;return!!(t&&t.render&&t.render())&&(e.data.replace(new Uint8Array(t.data.buffer)),!0)}class u extends e.Evented{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.RGBAImage({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(e){if(this.loaded!==e&&(this.loaded=e,e)){for(const{ids:e,callback:t}of this.requestors)this._notify(e,t);this.requestors=[]}}getImage(e){return this.images[e]}addImage(e,t){if(this.images[e])throw new Error(`Image id ${e} already exist, use updateImage instead`);this._validate(e,t)&&(this.images[e]=t)}_validate(t,n){let r=!0;return this._validateStretch(n.stretchX,n.data&&n.data.width)||(this.fire(new e.ErrorEvent(new Error(`Image "${t}" has invalid "stretchX" value`))),r=!1),this._validateStretch(n.stretchY,n.data&&n.data.height)||(this.fire(new e.ErrorEvent(new Error(`Image "${t}" has invalid "stretchY" value`))),r=!1),this._validateContent(n.content,n)||(this.fire(new e.ErrorEvent(new Error(`Image "${t}" has invalid "content" value`))),r=!1),r}_validateStretch(e,t){if(!e)return!0;let n=0;for(const r of e){if(r[0]<n||r[1]<r[0]||t<r[1])return!1;n=r[1]}return!0}_validateContent(e,t){return!(e&&(4!==e.length||e[0]<0||t.data.width<e[0]||e[1]<0||t.data.height<e[1]||e[2]<0||t.data.width<e[2]||e[3]<0||t.data.height<e[3]||e[2]<e[0]||e[3]<e[1]))}updateImage(e,t){const n=this.images[e];if(n.data.width!==t.data.width||n.data.height!==t.data.height)throw new Error(`size mismatch between old image (${n.data.width}x${n.data.height}) and new image (${t.data.width}x${t.data.height}).`);t.version=n.version+1,this.images[e]=t,this.updatedImages[e]=!0}removeImage(e){const t=this.images[e];delete this.images[e],delete this.patterns[e],t.userImage&&t.userImage.onRemove&&t.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(e,t){let n=!0;if(!this.isLoaded())for(const t of e)this.images[t]||(n=!1);this.isLoaded()||n?this._notify(e,t):this.requestors.push({ids:e,callback:t})}_notify(t,n){const r={};for(const n of t){this.images[n]||this.fire(new e.Event("styleimagemissing",{id:n}));const t=this.images[n];t?r[n]={data:t.data.clone(),pixelRatio:t.pixelRatio,sdf:t.sdf,version:t.version,stretchX:t.stretchX,stretchY:t.stretchY,content:t.content,hasRenderCallback:Boolean(t.userImage&&t.userImage.render)}:e.warnOnce(`Image "${n}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}n(null,r)}getPixelSize(){const{width:e,height:t}=this.atlasImage;return{width:e,height:t}}getPattern(t){const n=this.patterns[t],r=this.getImage(t);if(!r)return null;if(n&&n.position.version===r.version)return n.position;if(n)n.position.version=r.version;else{const n={w:r.data.width+2,h:r.data.height+2,x:0,y:0},i=new e.ImagePosition(n,r);this.patterns[t]={bin:n,position:i}}return this._updatePatternAtlas(),this.patterns[t].position}bind(e){const t=e.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new l(e,this.atlasImage,t.RGBA),this.atlasTexture.bind(t.LINEAR,t.CLAMP_TO_EDGE)}_updatePatternAtlas(){const t=[];for(const e in this.patterns)t.push(this.patterns[e].bin);const{w:n,h:r}=e.potpack(t),i=this.atlasImage;i.resize({width:n||1,height:r||1});for(const t in this.patterns){const{bin:n}=this.patterns[t],r=n.x+1,o=n.y+1,a=this.images[t].data,s=a.width,l=a.height;e.RGBAImage.copy(a,i,{x:0,y:0},{x:r,y:o},{width:s,height:l}),e.RGBAImage.copy(a,i,{x:0,y:l-1},{x:r,y:o-1},{width:s,height:1}),e.RGBAImage.copy(a,i,{x:0,y:0},{x:r,y:o+l},{width:s,height:1}),e.RGBAImage.copy(a,i,{x:s-1,y:0},{x:r-1,y:o},{width:1,height:l}),e.RGBAImage.copy(a,i,{x:0,y:0},{x:r+s,y:o},{width:1,height:l})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(t){for(const n of t){if(this.callbackDispatchedThisFrame[n])continue;this.callbackDispatchedThisFrame[n]=!0;const t=this.images[n];t||e.warnOnce(`Image with ID: "${n}" was not found`),c(t)&&this.updateImage(n,t)}}}const d=1e20;function h(e,t,n,r,i,o,a,s,l){for(let c=t;c<t+r;c++)p(e,n*o+c,o,i,a,s,l);for(let c=n;c<n+i;c++)p(e,c*o+t,1,r,a,s,l)}function p(e,t,n,r,i,o,a){o[0]=0,a[0]=-d,a[1]=d,i[0]=e[t];for(let s=1,l=0,c=0;s<r;s++){i[s]=e[t+s*n];const r=s*s;do{const e=o[l];c=(i[s]-i[e]+r-e*e)/(s-e)/2}while(c<=a[l]&&--l>-1);l++,o[l]=s,a[l]=c,a[l+1]=d}for(let s=0,l=0;s<r;s++){for(;a[l+1]<s;)l++;const r=o[l],c=s-r;e[t+s*n]=i[r]+c*c}}class m{constructor(e,t){this.requestManager=e,this.localIdeographFontFamily=t,this.entries={}}setURL(e){this.url=e}getGlyphs(t,n){const r=[];for(const e in t)for(const n of t[e])r.push({stack:e,id:n});e.asyncAll(r,(({stack:e,id:t},n)=>{let r=this.entries[e];r||(r=this.entries[e]={glyphs:{},requests:{},ranges:{}});let i=r.glyphs[t];if(void 0!==i)return void n(null,{stack:e,id:t,glyph:i});if(i=this._tinySDF(r,e,t),i)return r.glyphs[t]=i,void n(null,{stack:e,id:t,glyph:i});const o=Math.floor(t/256);if(256*o>65535)return void n(new Error("glyphs > 65535 not supported"));if(r.ranges[o])return void n(null,{stack:e,id:t,glyph:i});let a=r.requests[o];a||(a=r.requests[o]=[],m.loadGlyphRange(e,o,this.url,this.requestManager,((e,t)=>{if(t){for(const e in t)this._doesCharSupportLocalGlyph(+e)||(r.glyphs[+e]=t[+e]);r.ranges[o]=!0}for(const n of a)n(e,t);delete r.requests[o]}))),a.push(((r,i)=>{r?n(r):i&&n(null,{stack:e,id:t,glyph:i[t]||null})}))}),((e,t)=>{if(e)n(e);else if(t){const e={};for(const{stack:n,id:r,glyph:i}of t)(e[n]||(e[n]={}))[r]=i&&{id:i.id,bitmap:i.bitmap.clone(),metrics:i.metrics};n(null,e)}}))}_doesCharSupportLocalGlyph(t){return!!this.localIdeographFontFamily&&(e.unicodeBlockLookup["CJK Unified Ideographs"](t)||e.unicodeBlockLookup["Hangul Syllables"](t)||e.unicodeBlockLookup.Hiragana(t)||e.unicodeBlockLookup.Katakana(t))}_tinySDF(t,n,r){const i=this.localIdeographFontFamily;if(!i)return;if(!this._doesCharSupportLocalGlyph(r))return;let o=t.tinySDF;if(!o){let e="400";/bold/i.test(n)?e="900":/medium/i.test(n)?e="500":/light/i.test(n)&&(e="200"),o=t.tinySDF=new m.TinySDF({fontSize:24,buffer:3,radius:8,cutoff:.25,fontFamily:i,fontWeight:e})}const a=o.draw(String.fromCharCode(r));return{id:r,bitmap:new e.AlphaImage({width:a.width||30,height:a.height||30},a.data),metrics:{width:a.glyphWidth||24,height:a.glyphHeight||24,left:a.glyphLeft||0,top:a.glyphTop-27||-8,advance:a.glyphAdvance||24}}}}m.loadGlyphRange=function(t,n,r,i,o){const a=256*n,s=a+255,l=i.transformRequest(r.replace("{fontstack}",t).replace("{range}",`${a}-${s}`),e.ResourceType.Glyphs);e.getArrayBuffer(l,((t,n)=>{if(t)o(t);else if(n){const t={};for(const r of e.parseGlyphPbf(n))t[r.id]=r;o(null,t)}}))},m.TinySDF=class{constructor({fontSize:e=24,buffer:t=3,radius:n=8,cutoff:r=.25,fontFamily:i="sans-serif",fontWeight:o="normal",fontStyle:a="normal"}={}){this.buffer=t,this.cutoff=r,this.radius=n;const s=this.size=e+4*t,l=this._createCanvas(s),c=this.ctx=l.getContext("2d",{willReadFrequently:!0});c.font=`${a} ${o} ${e}px ${i}`,c.textBaseline="alphabetic",c.textAlign="left",c.fillStyle="black",this.gridOuter=new Float64Array(s*s),this.gridInner=new Float64Array(s*s),this.f=new Float64Array(s),this.z=new Float64Array(s+1),this.v=new Uint16Array(s)}_createCanvas(e){const t=document.createElement("canvas");return t.width=t.height=e,t}draw(e){const{width:t,actualBoundingBoxAscent:n,actualBoundingBoxDescent:r,actualBoundingBoxLeft:i,actualBoundingBoxRight:o}=this.ctx.measureText(e),a=Math.ceil(n),s=Math.min(this.size-this.buffer,Math.ceil(o-i)),l=Math.min(this.size-this.buffer,a+Math.ceil(r)),c=s+2*this.buffer,u=l+2*this.buffer,p=Math.max(c*u,0),m=new Uint8ClampedArray(p),g={data:m,width:c,height:u,glyphWidth:s,glyphHeight:l,glyphTop:a,glyphLeft:0,glyphAdvance:t};if(0===s||0===l)return g;const{ctx:f,buffer:_,gridInner:b,gridOuter:v}=this;f.clearRect(_,_,s,l),f.fillText(e,_,_+a);const y=f.getImageData(_,_,s,l);v.fill(d,0,p),b.fill(0,0,p);for(let e=0;e<l;e++)for(let t=0;t<s;t++){const n=y.data[4*(e*s+t)+3]/255;if(0===n)continue;const r=(e+_)*c+t+_;if(1===n)v[r]=0,b[r]=d;else{const e=.5-n;v[r]=e>0?e*e:0,b[r]=e<0?e*e:0}}h(v,0,0,c,u,c,this.f,this.v,this.z),h(b,_,_,s,l,c,this.f,this.v,this.z);for(let e=0;e<p;e++){const t=Math.sqrt(v[e])-Math.sqrt(b[e]);m[e]=Math.round(255-255*(t/this.radius+this.cutoff))}return g}};const g=new e.Properties({anchor:new e.DataConstantProperty(e.spec.light.anchor),position:new class{constructor(){this.specification=e.spec.light.position}possiblyEvaluate(t,n){return e.sphericalToCartesian(t.expression.evaluate(n))}interpolate(t,n,r){return{x:e.number(t.x,n.x,r),y:e.number(t.y,n.y,r),z:e.number(t.z,n.z,r)}}},color:new e.DataConstantProperty(e.spec.light.color),intensity:new e.DataConstantProperty(e.spec.light.intensity)}),f="-transition";class _ extends e.Evented{constructor(t){super(),this._transitionable=new e.Transitionable(g),this.setLight(t),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(t,n={}){if(!this._validate(e.validateLight,t,n))for(const e in t){const n=t[e];e.endsWith(f)?this._transitionable.setTransition(e.slice(0,-f.length),n):this._transitionable.setValue(e,n)}}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}_validate(t,n,r){return(!r||!1!==r.validate)&&e.emitValidationErrors(this,t.call(e.validateStyle,e.extend({value:n,style:{glyphs:!0,sprite:!0},styleSpec:e.spec})))}}class b{constructor(e,t){this.width=e,this.height=t,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(e,t){const n=e.join(",")+String(t);return this.dashEntry[n]||(this.dashEntry[n]=this.addDash(e,t)),this.dashEntry[n]}getDashRanges(e,t,n){const r=[];let i=e.length%2==1?-e[e.length-1]*n:0,o=e[0]*n,a=!0;r.push({left:i,right:o,isDash:a,zeroLength:0===e[0]});let s=e[0];for(let t=1;t<e.length;t++){a=!a;const l=e[t];i=s*n,s+=l,o=s*n,r.push({left:i,right:o,isDash:a,zeroLength:0===l})}return r}addRoundDash(e,t,n){const r=t/2;for(let t=-n;t<=n;t++){const i=this.width*(this.nextRow+n+t);let o=0,a=e[o];for(let s=0;s<this.width;s++){s/a.right>1&&(a=e[++o]);const l=Math.abs(s-a.left),c=Math.abs(s-a.right),u=Math.min(l,c);let d;const h=t/n*(r+1);if(a.isDash){const e=r-Math.abs(h);d=Math.sqrt(u*u+e*e)}else d=r-Math.sqrt(u*u+h*h);this.data[i+s]=Math.max(0,Math.min(255,d+128))}}}addRegularDash(e){for(let t=e.length-1;t>=0;--t){const n=e[t],r=e[t+1];n.zeroLength?e.splice(t,1):r&&r.isDash===n.isDash&&(r.left=n.left,e.splice(t,1))}const t=e[0],n=e[e.length-1];t.isDash===n.isDash&&(t.left=n.left-this.width,n.right=t.right+this.width);const r=this.width*this.nextRow;let i=0,o=e[i];for(let t=0;t<this.width;t++){t/o.right>1&&(o=e[++i]);const n=Math.abs(t-o.left),a=Math.abs(t-o.right),s=Math.min(n,a);this.data[r+t]=Math.max(0,Math.min(255,(o.isDash?s:-s)+128))}}addDash(t,n){const r=n?7:0,i=2*r+1;if(this.nextRow+i>this.height)return e.warnOnce("LineAtlas out of space"),null;let o=0;for(let e=0;e<t.length;e++)o+=t[e];if(0!==o){const e=this.width/o,i=this.getDashRanges(t,this.width,e);n?this.addRoundDash(i,e,r):this.addRegularDash(i)}const a={y:(this.nextRow+r+.5)/this.height,height:2*r/this.height,width:o};return this.nextRow+=i,this.dirty=!0,a}bind(e){const t=e.gl;this.texture?(t.bindTexture(t.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,t.texSubImage2D(t.TEXTURE_2D,0,0,0,this.width,this.height,t.ALPHA,t.UNSIGNED_BYTE,this.data))):(this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texImage2D(t.TEXTURE_2D,0,t.ALPHA,this.width,this.height,0,t.ALPHA,t.UNSIGNED_BYTE,this.data))}}class v{constructor(t,n){this.workerPool=t,this.actors=[],this.currentActor=0,this.id=e.uniqueId();const r=this.workerPool.acquire(this.id);for(let e=0;e<r.length;e++){const t=new v.Actor(r[e],n,this.id);t.name=`Worker ${e}`,this.actors.push(t)}if(!this.actors.length)throw new Error("No actors found")}broadcast(t,n,r){e.asyncAll(this.actors,((e,r)=>{e.send(t,n,r)}),r=r||function(){})}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(){this.actors.forEach((e=>{e.remove()})),this.actors=[],this.workerPool.release(this.id)}}function y(t,n,r){const i=function(n,i){if(n)return r(n);if(i){const n=e.pick(e.extend(i,t),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);i.vector_layers&&(n.vectorLayers=i.vector_layers,n.vectorLayerIds=n.vectorLayers.map((e=>e.id))),r(null,n)}};return t.url?e.getJSON(n.transformRequest(t.url,e.ResourceType.Source),i):e.exported.frame((()=>i(null,t)))}v.Actor=e.Actor;class E{constructor(t,n,r){this.bounds=e.LngLatBounds.convert(this.validateBounds(t)),this.minzoom=n||0,this.maxzoom=r||24}validateBounds(e){return Array.isArray(e)&&4===e.length?[Math.max(-180,e[0]),Math.max(-90,e[1]),Math.min(180,e[2]),Math.min(90,e[3])]:[-180,-90,180,90]}contains(t){const n=Math.pow(2,t.z),r=Math.floor(e.mercatorXfromLng(this.bounds.getWest())*n),i=Math.floor(e.mercatorYfromLat(this.bounds.getNorth())*n),o=Math.ceil(e.mercatorXfromLng(this.bounds.getEast())*n),a=Math.ceil(e.mercatorYfromLat(this.bounds.getSouth())*n);return t.x>=r&&t.x<o&&t.y>=i&&t.y<a}}class S extends e.Evented{constructor(t,n,r,i){if(super(),this.id=t,this.dispatcher=r,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,e.extend(this,e.pick(n,["url","scheme","tileSize","promoteId"])),this._options=e.extend({type:"vector"},n),this._collectResourceTiming=n.collectResourceTiming,512!==this.tileSize)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(i)}load(){this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=y(this._options,this.map._requestManager,((t,n)=>{this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),t?this.fire(new e.ErrorEvent(t)):n&&(e.extend(this,n),n.bounds&&(this.tileBounds=new E(n.bounds,this.minzoom,this.maxzoom)),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"})))}))}loaded(){return this._loaded}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}onAdd(e){this.map=e,this.load()}setSourceProperty(e){this._tileJSONRequest&&this._tileJSONRequest.cancel(),e(),this.load()}setTiles(e){return this.setSourceProperty((()=>{this._options.tiles=e})),this}setUrl(e){return this.setSourceProperty((()=>{this.url=e,this._options.url=e})),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}serialize(){return e.extend({},this._options)}loadTile(t,n){const r=t.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),i={request:this.map._requestManager.transformRequest(r,e.ResourceType.Tile),uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,tileSize:this.tileSize*t.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};function o(r,i){return delete t.request,t.aborted?n(null):r&&404!==r.status?n(r):(i&&i.resourceTiming&&(t.resourceTiming=i.resourceTiming),this.map._refreshExpiredTiles&&i&&t.setExpiryData(i),t.loadVectorData(i,this.map.painter),e.cacheEntryPossiblyAdded(this.dispatcher),n(null),void(t.reloadCallback&&(this.loadTile(t,t.reloadCallback),t.reloadCallback=null)))}i.request.collectResourceTiming=this._collectResourceTiming,t.actor&&"expired"!==t.state?"loading"===t.state?t.reloadCallback=n:t.request=t.actor.send("reloadTile",i,o.bind(this)):(t.actor=this.dispatcher.getActor(),t.request=t.actor.send("loadTile",i,o.bind(this)))}abortTile(e){e.request&&(e.request.cancel(),delete e.request),e.actor&&e.actor.send("abortTile",{uid:e.uid,type:this.type,source:this.id},void 0)}unloadTile(e){e.unloadVectorData(),e.actor&&e.actor.send("removeTile",{uid:e.uid,type:this.type,source:this.id},void 0)}hasTransition(){return!1}}class w extends e.Evented{constructor(t,n,r,i){super(),this.id=t,this.dispatcher=r,this.setEventedParent(i),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=e.extend({type:"raster"},n),e.extend(this,e.pick(n,["url","scheme","tileSize"]))}load(){this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=y(this._options,this.map._requestManager,((t,n)=>{this._tileJSONRequest=null,this._loaded=!0,t?this.fire(new e.ErrorEvent(t)):n&&(e.extend(this,n),n.bounds&&(this.tileBounds=new E(n.bounds,this.minzoom,this.maxzoom)),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"})))}))}loaded(){return this._loaded}onAdd(e){this.map=e,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}serialize(){return e.extend({},this._options)}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}loadTile(t,n){const r=t.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);t.request=e.getImage(this.map._requestManager.transformRequest(r,e.ResourceType.Tile),((r,i,o)=>{if(delete t.request,t.aborted)t.state="unloaded",n(null);else if(r)t.state="errored",n(r);else if(i){this.map._refreshExpiredTiles&&t.setExpiryData(o);const r=this.map.painter.context,a=r.gl;t.texture=this.map.painter.getTileTexture(i.width),t.texture?t.texture.update(i,{useMipmap:!0}):(t.texture=new l(r,i,a.RGBA,{useMipmap:!0}),t.texture.bind(a.LINEAR,a.CLAMP_TO_EDGE,a.LINEAR_MIPMAP_NEAREST),r.extTextureFilterAnisotropic&&a.texParameterf(a.TEXTURE_2D,r.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,r.extTextureFilterAnisotropicMax)),t.state="loaded",e.cacheEntryPossiblyAdded(this.dispatcher),n(null)}}))}abortTile(e,t){e.request&&(e.request.cancel(),delete e.request),t()}unloadTile(e,t){e.texture&&this.map.painter.saveTileTexture(e.texture),t()}hasTransition(){return!1}}let T;class C extends w{constructor(t,n,r,i){super(t,n,r,i),this.type="raster-dem",this.maxzoom=22,this._options=e.extend({type:"raster-dem"},n),this.encoding=n.encoding||"mapbox"}serialize(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}}loadTile(t,n){const r=t.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);function i(e,r){e&&(t.state="errored",n(e)),r&&(t.dem=r,t.needsHillshadePrepare=!0,t.needsTerrainPrepare=!0,t.state="loaded",n(null))}t.request=e.getImage(this.map._requestManager.transformRequest(r,e.ResourceType.Tile),function(r,o){if(delete t.request,t.aborted)t.state="unloaded",n(null);else if(r)t.state="errored",n(r);else if(o){this.map._refreshExpiredTiles&&t.setExpiryData(o),delete o.cacheControl,delete o.expires;const n=e.isImageBitmap(o)&&(null==T&&(T="undefined"!=typeof OffscreenCanvas&&new OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof createImageBitmap),T)?o:e.exported.getImageData(o,1),r={uid:t.uid,coord:t.tileID,source:this.id,rawImageData:n,encoding:this.encoding};t.actor&&"expired"!==t.state||(t.actor=this.dispatcher.getActor(),t.actor.send("loadDEMTile",r,i.bind(this)))}}.bind(this)),t.neighboringTiles=this._getNeighboringTiles(t.tileID)}_getNeighboringTiles(t){const n=t.canonical,r=Math.pow(2,n.z),i=(n.x-1+r)%r,o=0===n.x?t.wrap-1:t.wrap,a=(n.x+1+r)%r,s=n.x+1===r?t.wrap+1:t.wrap,l={};return l[new e.OverscaledTileID(t.overscaledZ,o,n.z,i,n.y).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,s,n.z,a,n.y).key]={backfilled:!1},n.y>0&&(l[new e.OverscaledTileID(t.overscaledZ,o,n.z,i,n.y-1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,t.wrap,n.z,n.x,n.y-1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,s,n.z,a,n.y-1).key]={backfilled:!1}),n.y+1<r&&(l[new e.OverscaledTileID(t.overscaledZ,o,n.z,i,n.y+1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,t.wrap,n.z,n.x,n.y+1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,s,n.z,a,n.y+1).key]={backfilled:!1}),l}unloadTile(e){e.demTexture&&this.map.painter.saveTileTexture(e.demTexture),e.fbo&&(e.fbo.destroy(),delete e.fbo),e.dem&&delete e.dem,delete e.neighboringTiles,e.state="unloaded",e.actor&&e.actor.send("removeDEMTile",{uid:e.uid,source:this.id})}}class x extends e.Evented{constructor(t,n,r,i){super(),this.id=t,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._pendingLoads=0,this.actor=r.getActor(),this.setEventedParent(i),this._data=n.data,this._options=e.extend({},n),this._collectResourceTiming=n.collectResourceTiming,void 0!==n.maxzoom&&(this.maxzoom=n.maxzoom),n.type&&(this.type=n.type),n.attribution&&(this.attribution=n.attribution),this.promoteId=n.promoteId;const o=e.EXTENT/this.tileSize;this.workerOptions=e.extend({source:this.id,cluster:n.cluster||!1,geojsonVtOptions:{buffer:(void 0!==n.buffer?n.buffer:128)*o,tolerance:(void 0!==n.tolerance?n.tolerance:.375)*o,extent:e.EXTENT,maxZoom:this.maxzoom,lineMetrics:n.lineMetrics||!1,generateId:n.generateId||!1},superclusterOptions:{maxZoom:void 0!==n.clusterMaxZoom?n.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,n.clusterMinPoints||2),extent:e.EXTENT,radius:(n.clusterRadius||50)*o,log:!1,generateId:n.generateId||!1},clusterProperties:n.clusterProperties,filter:n.filter},n.workerOptions)}load(){this._updateWorkerData("metadata")}onAdd(e){this.map=e,this.load()}setData(e){return this._data=e,this._updateWorkerData("content"),this}getClusterExpansionZoom(e,t){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:e,source:this.id},t),this}getClusterChildren(e,t){return this.actor.send("geojson.getClusterChildren",{clusterId:e,source:this.id},t),this}getClusterLeaves(e,t,n,r){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:e,limit:t,offset:n},r),this}_updateWorkerData(t){const n=e.extend({},this.workerOptions),r=this._data;"string"==typeof r?(n.request=this.map._requestManager.transformRequest(e.exported.resolveURL(r),e.ResourceType.Source),n.request.collectResourceTiming=this._collectResourceTiming):n.data=JSON.stringify(r),this._pendingLoads++,this.fire(new e.Event("dataloading",{dataType:"source"})),this.actor.send(`${this.type}.loadData`,n,((n,r)=>{if(this._pendingLoads--,this._removed||r&&r.abandoned)return void this.fire(new e.Event("dataabort",{dataType:"source",sourceDataType:t}));let i=null;if(r&&r.resourceTiming&&r.resourceTiming[this.id]&&(i=r.resourceTiming[this.id].slice(0)),n)return void this.fire(new e.ErrorEvent(n));const o={dataType:"source",sourceDataType:t};this._collectResourceTiming&&i&&i.length>0&&e.extend(o,{resourceTiming:i}),this.fire(new e.Event("data",o))}))}loaded(){return 0===this._pendingLoads}loadTile(e,t){const n=e.actor?"reloadTile":"loadTile";e.actor=this.actor;const r={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};e.request=this.actor.send(n,r,((r,i)=>(delete e.request,e.unloadVectorData(),e.aborted?t(null):r?t(r):(e.loadVectorData(i,this.map.painter,"reloadTile"===n),t(null)))))}abortTile(e){e.request&&(e.request.cancel(),delete e.request),e.aborted=!0}unloadTile(e){e.unloadVectorData(),this.actor.send("removeTile",{uid:e.uid,type:this.type,source:this.id})}onRemove(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})}serialize(){return e.extend({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var F=e.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class D extends e.Evented{constructor(e,t,n,r){super(),this.id=e,this.dispatcher=n,this.coordinates=t.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(r),this.options=t}load(t,n){this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this.url=this.options.url,e.getImage(this.map._requestManager.transformRequest(this.url,e.ResourceType.Image),((r,i)=>{this._loaded=!0,r?this.fire(new e.ErrorEvent(r)):i&&(this.image=i,t&&(this.coordinates=t),n&&n(),this._finishLoading())}))}loaded(){return this._loaded}updateImage(e){return this.image&&e.url?(this.options.url=e.url,this.load(e.coordinates,(()=>{this.texture=null})),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(e){this.map=e,this.load()}setCoordinates(t){this.coordinates=t;const n=t.map(e.MercatorCoordinate.fromLngLat);this.tileID=function(t){let n=1/0,r=1/0,i=-1/0,o=-1/0;for(const e of t)n=Math.min(n,e.x),r=Math.min(r,e.y),i=Math.max(i,e.x),o=Math.max(o,e.y);const a=Math.max(i-n,o-r),s=Math.max(0,Math.floor(-Math.log(a)/Math.LN2)),l=Math.pow(2,s);return new e.CanonicalTileID(s,Math.floor((n+i)/2*l),Math.floor((r+o)/2*l))}(n),this.minzoom=this.maxzoom=this.tileID.z;const r=n.map((e=>this.tileID.getTilePoint(e)._round()));return this._boundsArray=new e.RasterBoundsArray,this._boundsArray.emplaceBack(r[0].x,r[0].y,0,0),this._boundsArray.emplaceBack(r[1].x,r[1].y,e.EXTENT,0),this._boundsArray.emplaceBack(r[3].x,r[3].y,0,e.EXTENT),this._boundsArray.emplaceBack(r[2].x,r[2].y,e.EXTENT,e.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(0===Object.keys(this.tiles).length||!this.image)return;const t=this.map.painter.context,n=t.gl;this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,F.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new l(t,this.image,n.RGBA),this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE));for(const e in this.tiles){const t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture)}}loadTile(e,t){this.tileID&&this.tileID.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={},t(null)):(e.state="errored",t(null))}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class k extends D{constructor(e,t,n,r){super(e,t,n,r),this.roundZoom=!0,this.type="video",this.options=t}load(){this._loaded=!1;const t=this.options;this.urls=[];for(const n of t.urls)this.urls.push(this.map._requestManager.transformRequest(n,e.ResourceType.Source).url);e.getVideo(this.urls,((t,n)=>{this._loaded=!0,t?this.fire(new e.ErrorEvent(t)):n&&(this.video=n,this.video.loop=!0,this.video.addEventListener("playing",(()=>{this.map.triggerRepaint()})),this.map&&this.video.play(),this._finishLoading())}))}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(t){if(this.video){const n=this.video.seekable;t<n.start(0)||t>n.end(0)?this.fire(new e.ErrorEvent(new e.ValidationError(`sources.${this.id}`,null,`Playback for this video can be set only between the ${n.start(0)} and ${n.end(0)}-second mark.`))):this.video.currentTime=t}}getVideo(){return this.video}onAdd(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(0===Object.keys(this.tiles).length||this.video.readyState<2)return;const t=this.map.painter.context,n=t.gl;this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,F.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE),n.texSubImage2D(n.TEXTURE_2D,0,0,0,n.RGBA,n.UNSIGNED_BYTE,this.video)):(this.texture=new l(t,this.video,n.RGBA),this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE));for(const e in this.tiles){const t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture)}}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class O extends D{constructor(t,n,r,i){super(t,n,r,i),n.coordinates?Array.isArray(n.coordinates)&&4===n.coordinates.length&&!n.coordinates.some((e=>!Array.isArray(e)||2!==e.length||e.some((e=>"number"!=typeof e))))||this.fire(new e.ErrorEvent(new e.ValidationError(`sources.${t}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.ErrorEvent(new e.ValidationError(`sources.${t}`,null,'missing required property "coordinates"'))),n.animate&&"boolean"!=typeof n.animate&&this.fire(new e.ErrorEvent(new e.ValidationError(`sources.${t}`,null,'optional "animate" property must be a boolean value'))),n.canvas?"string"==typeof n.canvas||n.canvas instanceof HTMLCanvasElement||this.fire(new e.ErrorEvent(new e.ValidationError(`sources.${t}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new e.ErrorEvent(new e.ValidationError(`sources.${t}`,null,'missing required property "canvas"'))),this.options=n,this.animate=void 0===n.animate||n.animate}load(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new e.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())}getCanvas(){return this.canvas}onAdd(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let t=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,t=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,t=!0),this._hasInvalidDimensions())return;if(0===Object.keys(this.tiles).length)return;const n=this.map.painter.context,r=n.gl;this.boundsBuffer||(this.boundsBuffer=n.createVertexBuffer(this._boundsArray,F.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(t||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new l(n,this.canvas,r.RGBA,{premultiply:!0});for(const e in this.tiles){const t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture)}}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const e of[this.canvas.width,this.canvas.height])if(isNaN(e)||e<=0)return!0;return!1}}const I={vector:S,raster:w,"raster-dem":C,geojson:x,video:k,image:D,canvas:O};function A(t,n){const r=e.create();return e.translate(r,r,[1,1,0]),e.scale(r,r,[.5*t.width,.5*t.height,1]),e.multiply(r,r,t.calculatePosMatrix(n.toUnwrapped()))}function R(e,t,n,r,i,o){const a=function(e,t,n){if(e)for(const r of e){const e=t[r];if(e&&e.source===n&&"fill-extrusion"===e.type)return!0}else for(const e in t){const r=t[e];if(r.source===n&&"fill-extrusion"===r.type)return!0}return!1}(i&&i.layers,t,e.id),s=o.maxPitchScaleFactor(),l=e.tilesIn(r,s,a);l.sort(N);const c=[];for(const r of l)c.push({wrappedTileID:r.tileID.wrapped().key,queryResults:r.tile.queryRenderedFeatures(t,n,e._state,r.queryGeometry,r.cameraQueryGeometry,r.scale,i,o,s,A(e.transform,r.tileID))});const u=function(e){const t={},n={};for(const r of e){const e=r.queryResults,i=r.wrappedTileID,o=n[i]=n[i]||{};for(const n in e){const r=e[n],i=o[n]=o[n]||{},a=t[n]=t[n]||[];for(const e of r)i[e.featureIndex]||(i[e.featureIndex]=!0,a.push(e))}}return t}(c);for(const t in u)u[t].forEach((t=>{const n=t.feature,r=e.getFeatureState(n.layer["source-layer"],n.id);n.source=n.layer.source,n.layer["source-layer"]&&(n.sourceLayer=n.layer["source-layer"]),n.state=r}));return u}function N(e,t){const n=e.tileID,r=t.tileID;return n.overscaledZ-r.overscaledZ||n.canonical.y-r.canonical.y||n.wrap-r.wrap||n.canonical.x-r.canonical.x}class M{constructor(t,n){this.tileID=t,this.uid=e.uniqueId(),this.uses=0,this.tileSize=n,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.textures=[],this.textureCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(t){const n=t+this.timeAdded;n<e.exported.now()||this.fadeEndTime&&n<this.fadeEndTime||(this.fadeEndTime=n)}wasRequested(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state}clearTextures(e){this.demTexture&&e.saveTileTexture(this.demTexture),this.textures.forEach((t=>e.saveTileTexture(t))),this.demTexture=null,this.textures=[],this.textureCoords={}}loadVectorData(t,n,r){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",t){t.featureIndex&&(this.latestFeatureIndex=t.featureIndex,t.rawTileData?(this.latestRawTileData=t.rawTileData,this.latestFeatureIndex.rawTileData=t.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=t.collisionBoxArray,this.buckets=function(e,t){const n={};if(!t)return n;for(const r of e){const e=r.layerIds.map((e=>t.getLayer(e))).filter(Boolean);if(0!==e.length){r.layers=e,r.stateDependentLayerIds&&(r.stateDependentLayers=r.stateDependentLayerIds.map((t=>e.filter((e=>e.id===t))[0])));for(const t of e)n[t.id]=r}}return n}(t.buckets,n.style),this.hasSymbolBuckets=!1;for(const t in this.buckets){const n=this.buckets[t];if(n instanceof e.SymbolBucket){if(this.hasSymbolBuckets=!0,!r)break;n.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const t in this.buckets){const n=this.buckets[t];if(n instanceof e.SymbolBucket&&n.hasRTLText){this.hasRTLText=!0,e.lazyLoadRTLTextPlugin();break}}this.queryPadding=0;for(const e in this.buckets){const t=this.buckets[e];this.queryPadding=Math.max(this.queryPadding,n.style.getLayer(e).queryRadius(t))}t.imageAtlas&&(this.imageAtlas=t.imageAtlas),t.glyphAtlasImage&&(this.glyphAtlasImage=t.glyphAtlasImage)}else this.collisionBoxArray=new e.CollisionBoxArray}unloadVectorData(){for(const e in this.buckets)this.buckets[e].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(e){return this.buckets[e.id]}upload(e){for(const t in this.buckets){const n=this.buckets[t];n.uploadPending()&&n.upload(e)}const t=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new l(e,this.imageAtlas.image,t.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new l(e,this.glyphAtlasImage,t.ALPHA),this.glyphAtlasImage=null)}prepare(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture)}queryRenderedFeatures(e,t,n,r,i,o,a,s,l,c){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:r,cameraQueryGeometry:i,scale:o,tileSize:this.tileSize,pixelPosMatrix:c,transform:s,params:a,queryPadding:this.queryPadding*l},e,t,n):{}}querySourceFeatures(t,n){const r=this.latestFeatureIndex;if(!r||!r.rawTileData)return;const i=r.loadVTLayers(),o=n?n.sourceLayer:"",a=i._geojsonTileLayer||i[o];if(!a)return;const s=e.createFilter(n&&n.filter),{z:l,x:c,y:u}=this.tileID.canonical,d={z:l,x:c,y:u};for(let n=0;n<a.length;n++){const i=a.feature(n);if(s.needGeometry){const t=e.toEvaluationFeature(i,!0);if(!s.filter(new e.EvaluationParameters(this.tileID.overscaledZ),t,this.tileID.canonical))continue}else if(!s.filter(new e.EvaluationParameters(this.tileID.overscaledZ),i))continue;const h=r.getId(i,o),p=new e.GeoJSONFeature(i,l,c,u,h);p.tile=d,t.push(p)}}hasData(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(t){const n=this.expirationTime;if(t.cacheControl){const n=e.parseCacheControl(t.cacheControl);n["max-age"]&&(this.expirationTime=Date.now()+1e3*n["max-age"])}else t.expires&&(this.expirationTime=new Date(t.expires).getTime());if(this.expirationTime){const e=Date.now();let t=!1;if(this.expirationTime>e)t=!1;else if(n)if(this.expirationTime<n)t=!0;else{const r=this.expirationTime-n;r?this.expirationTime=e+Math.max(r,3e4):t=!0}else t=!0;t?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}}getExpiryTimeout(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),Math.pow(2,31)-1)}setFeatureState(e,t){if(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||0===Object.keys(e).length)return;const n=this.latestFeatureIndex.loadVTLayers();for(const r in this.buckets){if(!t.style.hasLayer(r))continue;const i=this.buckets[r],o=i.layers[0].sourceLayer||"_geojsonTileLayer",a=n[o],s=e[o];if(!a||!s||0===Object.keys(s).length)continue;i.update(s,a,this.imageAtlas&&this.imageAtlas.patternPositions||{});const l=t&&t.style&&t.style.getLayer(r);l&&(this.queryPadding=Math.max(this.queryPadding,l.queryRadius(i)))}}holdingForFade(){return void 0!==this.symbolFadeHoldUntil}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<e.exported.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(t){this.symbolFadeHoldUntil=e.exported.now()+t}setDependencies(e,t){const n={};for(const e of t)n[e]=!0;this.dependencies[e]=n}hasDependency(e,t){for(const n of e){const e=this.dependencies[n];if(e)for(const n of t)if(e[n])return!0}return!1}}class P{constructor(e,t){this.max=e,this.onRemove=t,this.reset()}reset(){for(const e in this.data)for(const t of this.data[e])t.timeout&&clearTimeout(t.timeout),this.onRemove(t.value);return this.data={},this.order=[],this}add(e,t,n){const r=e.wrapped().key;void 0===this.data[r]&&(this.data[r]=[]);const i={value:t,timeout:void 0};if(void 0!==n&&(i.timeout=setTimeout((()=>{this.remove(e,i)}),n)),this.data[r].push(i),this.order.push(r),this.order.length>this.max){const e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this}has(e){return e.wrapped().key in this.data}getAndRemove(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null}_getAndRemoveByKey(e){const t=this.data[e].shift();return t.timeout&&clearTimeout(t.timeout),0===this.data[e].length&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),t.value}getByKey(e){const t=this.data[e];return t?t[0].value:null}get(e){return this.has(e)?this.data[e.wrapped().key][0].value:null}remove(e,t){if(!this.has(e))return this;const n=e.wrapped().key,r=void 0===t?0:this.data[n].indexOf(t),i=this.data[n][r];return this.data[n].splice(r,1),i.timeout&&clearTimeout(i.timeout),0===this.data[n].length&&delete this.data[n],this.onRemove(i.value),this.order.splice(this.order.indexOf(n),1),this}setMaxSize(e){for(this.max=e;this.order.length>this.max;){const e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this}filter(e){const t=[];for(const n in this.data)for(const r of this.data[n])e(r.value)||t.push(r);for(const e of t)this.remove(e.value.tileID,e)}}class L{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(t,n,r){const i=String(n);if(this.stateChanges[t]=this.stateChanges[t]||{},this.stateChanges[t][i]=this.stateChanges[t][i]||{},e.extend(this.stateChanges[t][i],r),null===this.deletedStates[t]){this.deletedStates[t]={};for(const e in this.state[t])e!==i&&(this.deletedStates[t][e]=null)}else if(this.deletedStates[t]&&null===this.deletedStates[t][i]){this.deletedStates[t][i]={};for(const e in this.state[t][i])r[e]||(this.deletedStates[t][i][e]=null)}else for(const e in r)this.deletedStates[t]&&this.deletedStates[t][i]&&null===this.deletedStates[t][i][e]&&delete this.deletedStates[t][i][e]}removeFeatureState(e,t,n){if(null===this.deletedStates[e])return;const r=String(t);if(this.deletedStates[e]=this.deletedStates[e]||{},n&&void 0!==t)null!==this.deletedStates[e][r]&&(this.deletedStates[e][r]=this.deletedStates[e][r]||{},this.deletedStates[e][r][n]=null);else if(void 0!==t)if(this.stateChanges[e]&&this.stateChanges[e][r])for(n in this.deletedStates[e][r]={},this.stateChanges[e][r])this.deletedStates[e][r][n]=null;else this.deletedStates[e][r]=null;else this.deletedStates[e]=null}getState(t,n){const r=String(n),i=e.extend({},(this.state[t]||{})[r],(this.stateChanges[t]||{})[r]);if(null===this.deletedStates[t])return{};if(this.deletedStates[t]){const e=this.deletedStates[t][n];if(null===e)return{};for(const t in e)delete i[t]}return i}initializeTileState(e,t){e.setFeatureState(this.state,t)}coalesceChanges(t,n){const r={};for(const t in this.stateChanges){this.state[t]=this.state[t]||{};const n={};for(const r in this.stateChanges[t])this.state[t][r]||(this.state[t][r]={}),e.extend(this.state[t][r],this.stateChanges[t][r]),n[r]=this.state[t][r];r[t]=n}for(const t in this.deletedStates){this.state[t]=this.state[t]||{};const n={};if(null===this.deletedStates[t])for(const e in this.state[t])n[e]={},this.state[t][e]={};else for(const e in this.deletedStates[t]){if(null===this.deletedStates[t][e])this.state[t][e]={};else for(const n of Object.keys(this.deletedStates[t][e]))delete this.state[t][e][n];n[e]=this.state[t][e]}r[t]=r[t]||{},e.extend(r[t],n)}if(this.stateChanges={},this.deletedStates={},0!==Object.keys(r).length)for(const e in t)t[e].setFeatureState(r,n)}}class B extends e.Evented{constructor(t,n,r){super(),this.id=t,this.dispatcher=r,this.on("data",(e=>{"source"===e.dataType&&"metadata"===e.sourceDataType&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&"source"===e.dataType&&"content"===e.sourceDataType&&(this.reload(),this.transform&&this.update(this.transform,this.terrain))})),this.on("dataloading",(()=>{this._sourceErrored=!1})),this.on("error",(()=>{this._sourceErrored=this._source.loaded()})),this._source=function(t,n,r,i){const o=new I[n.type](t,n,r,i);if(o.id!==t)throw new Error(`Expected Source id to be ${t} instead of ${o.id}`);return e.bindAll(["load","abort","unload","serialize","prepare"],o),o}(t,n,r,this),this._tiles={},this._cache=new P(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new L}onAdd(e){this.map=e,this._maxTileCacheSize=e?e._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(e)}onRemove(e){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(e)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;if(!this._source.loaded())return!1;for(const e in this._tiles){const t=this._tiles[e];if("loaded"!==t.state&&"errored"!==t.state)return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const e=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,e&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(e,t){return this._source.loadTile(e,t)}_unloadTile(e){if(this._source.unloadTile)return this._source.unloadTile(e,(()=>{}))}_abortTile(t){this._source.abortTile&&this._source.abortTile(t,(()=>{})),this._source.fire(new e.Event("dataabort",{tile:t,coord:t.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(e){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const t in this._tiles){const n=this._tiles[t];n.upload(e),n.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map((e=>e.tileID)).sort(U).map((e=>e.key))}getRenderableIds(t){const n=[];for(const e in this._tiles)this._isIdRenderable(e,t)&&n.push(this._tiles[e]);return t?n.sort(((t,n)=>{const r=t.tileID,i=n.tileID,o=new e.pointGeometry(r.canonical.x,r.canonical.y)._rotate(this.transform.angle),a=new e.pointGeometry(i.canonical.x,i.canonical.y)._rotate(this.transform.angle);return r.overscaledZ-i.overscaledZ||a.y-o.y||a.x-o.x})).map((e=>e.tileID.key)):n.map((e=>e.tileID)).sort(U).map((e=>e.key))}hasRenderableParent(e){const t=this.findLoadedParent(e,0);return!!t&&this._isIdRenderable(t.tileID.key)}_isIdRenderable(e,t){return this._tiles[e]&&this._tiles[e].hasData()&&!this._coveredTiles[e]&&(t||!this._tiles[e].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const e in this._tiles)"errored"!==this._tiles[e].state&&this._reloadTile(e,"reloading")}}_reloadTile(e,t){const n=this._tiles[e];n&&("loading"!==n.state&&(n.state=t),this._loadTile(n,this._tileLoaded.bind(this,n,e,t)))}_tileLoaded(t,n,r,i){if(i)return t.state="errored",void(404!==i.status?this._source.fire(new e.ErrorEvent(i,{tile:t})):this.update(this.transform,this.terrain));t.timeAdded=e.exported.now(),"expired"===r&&(t.refreshedUponExpiration=!0),this._setTileReloadTimer(n,t),"raster-dem"===this.getSource().type&&t.dem&&this._backfillDEM(t),this._state.initializeTileState(t,this.map?this.map.painter:null),t.aborted||this._source.fire(new e.Event("data",{dataType:"source",tile:t,coord:t.tileID}))}_backfillDEM(e){const t=this.getRenderableIds();for(let r=0;r<t.length;r++){const i=t[r];if(e.neighboringTiles&&e.neighboringTiles[i]){const t=this.getTileByID(i);n(e,t),n(t,e)}}function n(e,t){e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0;let n=t.tileID.canonical.x-e.tileID.canonical.x;const r=t.tileID.canonical.y-e.tileID.canonical.y,i=Math.pow(2,e.tileID.canonical.z),o=t.tileID.key;0===n&&0===r||Math.abs(r)>1||(Math.abs(n)>1&&(1===Math.abs(n+i)?n+=i:1===Math.abs(n-i)&&(n-=i)),t.dem&&e.dem&&(e.dem.backfillBorder(t.dem,n,r),e.neighboringTiles&&e.neighboringTiles[o]&&(e.neighboringTiles[o].backfilled=!0)))}}getTile(e){return this.getTileByID(e.key)}getTileByID(e){return this._tiles[e]}_retainLoadedChildren(e,t,n,r){for(const i in this._tiles){let o=this._tiles[i];if(r[i]||!o.hasData()||o.tileID.overscaledZ<=t||o.tileID.overscaledZ>n)continue;let a=o.tileID;for(;o&&o.tileID.overscaledZ>t+1;){const e=o.tileID.scaledTo(o.tileID.overscaledZ-1);o=this._tiles[e.key],o&&o.hasData()&&(a=e)}let s=a;for(;s.overscaledZ>t;)if(s=s.scaledTo(s.overscaledZ-1),e[s.key]){r[a.key]=a;break}}}findLoadedParent(e,t){if(e.key in this._loadedParentTiles){const n=this._loadedParentTiles[e.key];return n&&n.tileID.overscaledZ>=t?n:null}for(let n=e.overscaledZ-1;n>=t;n--){const t=e.scaledTo(n),r=this._getLoadedTile(t);if(r)return r}}_getLoadedTile(e){const t=this._tiles[e.key];return t&&t.hasData()?t:this._cache.getByKey(e.wrapped().key)}updateCacheSize(e){const t=Math.ceil(e.width/this._source.tileSize)+1,n=Math.ceil(e.height/this._source.tileSize)+1,r=Math.floor(t*n*5),i="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,r):r;this._cache.setMaxSize(i)}handleWrapJump(e){const t=Math.round((e-(void 0===this._prevLng?e:this._prevLng))/360);if(this._prevLng=e,t){const e={};for(const n in this._tiles){const r=this._tiles[n];r.tileID=r.tileID.unwrapTo(r.tileID.wrap+t),e[r.tileID.key]=r}this._tiles=e;for(const e in this._timers)clearTimeout(this._timers[e]),delete this._timers[e];for(const e in this._tiles)this._setTileReloadTimer(e,this._tiles[e])}}update(t,n){if(this.transform=t,this.terrain=n,!this._sourceLoaded||this._paused)return;let r;this.updateCacheSize(t),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?r=t.getVisibleUnwrappedCoordinates(this._source.tileID).map((t=>new e.OverscaledTileID(t.canonical.z,t.wrap,t.canonical.z,t.canonical.x,t.canonical.y))):(r=t.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:n}),this._source.hasTile&&(r=r.filter((e=>this._source.hasTile(e))))):r=[];const i=t.coveringZoomLevel(this._source),o=Math.max(i-B.maxOverzooming,this._source.minzoom),a=Math.max(i+B.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const e={};for(const t of r)if(t.canonical.z>this._source.minzoom){const n=t.scaledTo(t.canonical.z-1);e[n.key]=n;const r=t.scaledTo(Math.max(this._source.minzoom,Math.min(t.canonical.z,5)));e[r.key]=r}r=r.concat(Object.values(e))}const s=this._updateRetainedTiles(r,i);if(j(this._source.type)){const t={},l={},c=Object.keys(s);for(const n of c){const r=s[n],i=this._tiles[n];if(!i||i.fadeEndTime&&i.fadeEndTime<=e.exported.now())continue;const a=this.findLoadedParent(r,o);a&&(this._addTile(a.tileID),t[a.tileID.key]=a.tileID),l[n]=r}this._retainLoadedChildren(l,i,a,s);for(const e in t)s[e]||(this._coveredTiles[e]=!0,s[e]=t[e]);if(n){const e={},t={};for(const n of r)this._tiles[n.key].hasData()?e[n.key]=n:t[n.key]=n;for(const n in t){const r=t[n].children(this._source.maxzoom);this._tiles[r[0].key]&&this._tiles[r[1].key]&&this._tiles[r[2].key]&&this._tiles[r[3].key]&&(e[r[0].key]=s[r[0].key]=r[0],e[r[1].key]=s[r[1].key]=r[1],e[r[2].key]=s[r[2].key]=r[2],e[r[3].key]=s[r[3].key]=r[3],delete t[n])}for(const n in t){const r=this.findLoadedParent(t[n],this._source.minzoom);if(r){e[r.tileID.key]=s[r.tileID.key]=r.tileID;for(const t in e)e[t].isChildOf(r.tileID)&&delete e[t]}}for(const t in this._tiles)e[t]||(this._coveredTiles[t]=!0)}}for(const e in s)this._tiles[e].clearFadeHold();const l=e.keysDifference(this._tiles,s);for(const e of l){const t=this._tiles[e];t.hasSymbolBuckets&&!t.holdingForFade()?t.setHoldDuration(this.map._fadeDuration):t.hasSymbolBuckets&&!t.symbolFadeFinished()||this._removeTile(e)}this._updateLoadedParentTileCache()}releaseSymbolFadeTiles(){for(const e in this._tiles)this._tiles[e].holdingForFade()&&this._removeTile(e)}_updateRetainedTiles(e,t){const n={},r={},i=Math.max(t-B.maxOverzooming,this._source.minzoom),o=Math.max(t+B.maxUnderzooming,this._source.minzoom),a={};for(const r of e){const e=this._addTile(r);n[r.key]=r,e.hasData()||t<this._source.maxzoom&&(a[r.key]=r)}this._retainLoadedChildren(a,t,o,n);for(const o of e){let e=this._tiles[o.key];if(e.hasData())continue;if(t+1>this._source.maxzoom){const e=o.children(this._source.maxzoom)[0],t=this.getTile(e);if(t&&t.hasData()){n[e.key]=e;continue}}else{const e=o.children(this._source.maxzoom);if(n[e[0].key]&&n[e[1].key]&&n[e[2].key]&&n[e[3].key])continue}let a=e.wasRequested();for(let t=o.overscaledZ-1;t>=i;--t){const i=o.scaledTo(t);if(r[i.key])break;if(r[i.key]=!0,e=this.getTile(i),!e&&a&&(e=this._addTile(i)),e&&(n[i.key]=i,a=e.wasRequested(),e.hasData()))break}}return n}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const e in this._tiles){const t=[];let n,r=this._tiles[e].tileID;for(;r.overscaledZ>0;){if(r.key in this._loadedParentTiles){n=this._loadedParentTiles[r.key];break}t.push(r.key);const e=r.scaledTo(r.overscaledZ-1);if(n=this._getLoadedTile(e),n)break;r=e}for(const e of t)this._loadedParentTiles[e]=n}}_addTile(t){let n=this._tiles[t.key];if(n)return n;n=this._cache.getAndRemove(t),n&&(this._setTileReloadTimer(t.key,n),n.tileID=t,this._state.initializeTileState(n,this.map?this.map.painter:null),this._cacheTimers[t.key]&&(clearTimeout(this._cacheTimers[t.key]),delete this._cacheTimers[t.key],this._setTileReloadTimer(t.key,n)));const r=n;return n||(n=new M(t,this._source.tileSize*t.overscaleFactor()),this._loadTile(n,this._tileLoaded.bind(this,n,t.key,n.state))),n.uses++,this._tiles[t.key]=n,r||this._source.fire(new e.Event("dataloading",{tile:n,coord:n.tileID,dataType:"source"})),n}_setTileReloadTimer(e,t){e in this._timers&&(clearTimeout(this._timers[e]),delete this._timers[e]);const n=t.getExpiryTimeout();n&&(this._timers[e]=setTimeout((()=>{this._reloadTile(e,"expired"),delete this._timers[e]}),n))}_removeTile(e){const t=this._tiles[e];t&&(t.uses--,delete this._tiles[e],this._timers[e]&&(clearTimeout(this._timers[e]),delete this._timers[e]),t.uses>0||(t.hasData()&&"reloading"!==t.state?this._cache.add(t.tileID,t,t.getExpiryTimeout()):(t.aborted=!0,this._abortTile(t),this._unloadTile(t))))}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const e in this._tiles)this._removeTile(e);this._cache.reset()}tilesIn(t,n,r){const i=[],o=this.transform;if(!o)return i;const a=r?o.getCameraQueryGeometry(t):t,s=t.map((e=>o.pointCoordinate(e,this.terrain))),l=a.map((e=>o.pointCoordinate(e,this.terrain))),c=this.getIds();let u=1/0,d=1/0,h=-1/0,p=-1/0;for(const e of l)u=Math.min(u,e.x),d=Math.min(d,e.y),h=Math.max(h,e.x),p=Math.max(p,e.y);for(let t=0;t<c.length;t++){const r=this._tiles[c[t]];if(r.holdingForFade())continue;const a=r.tileID,m=Math.pow(2,o.zoom-r.tileID.overscaledZ),g=n*r.queryPadding*e.EXTENT/r.tileSize/m,f=[a.getTilePoint(new e.MercatorCoordinate(u,d)),a.getTilePoint(new e.MercatorCoordinate(h,p))];if(f[0].x-g<e.EXTENT&&f[0].y-g<e.EXTENT&&f[1].x+g>=0&&f[1].y+g>=0){const e=s.map((e=>a.getTilePoint(e))),t=l.map((e=>a.getTilePoint(e)));i.push({tile:r,tileID:a,queryGeometry:e,cameraQueryGeometry:t,scale:m})}}return i}getVisibleCoordinates(e){const t=this.getRenderableIds(e).map((e=>this._tiles[e].tileID));for(const e of t)e.posMatrix=this.transform.calculatePosMatrix(e.toUnwrapped());return t}hasTransition(){if(this._source.hasTransition())return!0;if(j(this._source.type))for(const t in this._tiles){const n=this._tiles[t];if(void 0!==n.fadeEndTime&&n.fadeEndTime>=e.exported.now())return!0}return!1}setFeatureState(e,t,n){this._state.updateState(e=e||"_geojsonTileLayer",t,n)}removeFeatureState(e,t,n){this._state.removeFeatureState(e=e||"_geojsonTileLayer",t,n)}getFeatureState(e,t){return this._state.getState(e=e||"_geojsonTileLayer",t)}setDependencies(e,t,n){const r=this._tiles[e];r&&r.setDependencies(t,n)}reloadTilesForDependencies(e,t){for(const n in this._tiles)this._tiles[n].hasDependency(e,t)&&this._reloadTile(n,"reloading");this._cache.filter((n=>!n.hasDependency(e,t)))}}function U(e,t){const n=Math.abs(2*e.wrap)-+(e.wrap<0),r=Math.abs(2*t.wrap)-+(t.wrap<0);return e.overscaledZ-t.overscaledZ||r-n||t.canonical.y-e.canonical.y||t.canonical.x-e.canonical.x}function j(e){return"raster"===e||"image"===e||"video"===e}B.maxOverzooming=10,B.maxUnderzooming=3;const G="mapboxgl_preloaded_worker_pool";class z{constructor(){this.active={}}acquire(e){if(!this.workers)for(this.workers=[];this.workers.length<z.workerCount;)this.workers.push(new Worker(Ei.workerUrl));return this.active[e]=!0,this.workers.slice()}release(e){delete this.active[e],0===this.numActive()&&(this.workers.forEach((e=>{e.terminate()})),this.workers=null)}isPreloaded(){return!!this.active[G]}numActive(){return Object.keys(this.active).length}}const H=Math.floor(e.exported.hardwareConcurrency/2);let q;function V(){return q||(q=new z),q}function $(t,n){const r={};for(const e in t)"ref"!==e&&(r[e]=t[e]);return e.refProperties.forEach((e=>{e in n&&(r[e]=n[e])})),r}function K(e){e=e.slice();const t=Object.create(null);for(let n=0;n<e.length;n++)t[e[n].id]=e[n];for(let n=0;n<e.length;n++)"ref"in e[n]&&(e[n]=$(e[n],t[e[n].ref]));return e}z.workerCount=Math.max(Math.min(H,6),1);const W={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight"};function Y(e,t,n){n.push({command:W.addSource,args:[e,t[e]]})}function Q(e,t,n){t.push({command:W.removeSource,args:[e]}),n[e]=!0}function X(e,t,n,r){Q(e,n,r),Y(e,t,n)}function Z(e,t,n){let r;for(r in e[n])if(Object.prototype.hasOwnProperty.call(e[n],r)&&"data"!==r&&!i(e[n][r],t[n][r]))return!1;for(r in t[n])if(Object.prototype.hasOwnProperty.call(t[n],r)&&"data"!==r&&!i(e[n][r],t[n][r]))return!1;return!0}function J(e,t,n,r,o,a){let s;for(s in t=t||{},e=e||{})Object.prototype.hasOwnProperty.call(e,s)&&(i(e[s],t[s])||n.push({command:a,args:[r,s,t[s],o]}));for(s in t)Object.prototype.hasOwnProperty.call(t,s)&&!Object.prototype.hasOwnProperty.call(e,s)&&(i(e[s],t[s])||n.push({command:a,args:[r,s,t[s],o]}))}function ee(e){return e.id}function te(e,t){return e[t.id]=t,e}class ne{constructor(e,t){this.reset(e,t)}reset(e,t){this.points=e||[],this._distances=[0];for(let e=1;e<this.points.length;e++)this._distances[e]=this._distances[e-1]+this.points[e].dist(this.points[e-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(t||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(t){if(1===this.points.length)return this.points[0];t=e.clamp(t,0,1);let n=1,r=this._distances[n];const i=t*this.paddedLength+this.padding;for(;r<i&&n<this._distances.length;)r=this._distances[++n];const o=n-1,a=this._distances[o],s=r-a,l=s>0?(i-a)/s:0;return this.points[o].mult(1-l).add(this.points[n].mult(l))}}function re(e,t){let n=!0;return"always"===e||"never"!==e&&"never"!==t||(n=!1),n}class ie{constructor(e,t,n){const r=this.boxCells=[],i=this.circleCells=[];this.xCellCount=Math.ceil(e/n),this.yCellCount=Math.ceil(t/n);for(let e=0;e<this.xCellCount*this.yCellCount;e++)r.push([]),i.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=e,this.height=t,this.xScale=this.xCellCount/e,this.yScale=this.yCellCount/t,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(e,t,n,r,i){this._forEachCell(t,n,r,i,this._insertBoxCell,this.boxUid++),this.boxKeys.push(e),this.bboxes.push(t),this.bboxes.push(n),this.bboxes.push(r),this.bboxes.push(i)}insertCircle(e,t,n,r){this._forEachCell(t-r,n-r,t+r,n+r,this._insertCircleCell,this.circleUid++),this.circleKeys.push(e),this.circles.push(t),this.circles.push(n),this.circles.push(r)}_insertBoxCell(e,t,n,r,i,o){this.boxCells[i].push(o)}_insertCircleCell(e,t,n,r,i,o){this.circleCells[i].push(o)}_query(e,t,n,r,i,o,a){if(n<0||e>this.width||r<0||t>this.height)return[];const s=[];if(e<=0&&t<=0&&this.width<=n&&this.height<=r){if(i)return[{key:null,x1:e,y1:t,x2:n,y2:r}];for(let e=0;e<this.boxKeys.length;e++)s.push({key:this.boxKeys[e],x1:this.bboxes[4*e],y1:this.bboxes[4*e+1],x2:this.bboxes[4*e+2],y2:this.bboxes[4*e+3]});for(let e=0;e<this.circleKeys.length;e++){const t=this.circles[3*e],n=this.circles[3*e+1],r=this.circles[3*e+2];s.push({key:this.circleKeys[e],x1:t-r,y1:n-r,x2:t+r,y2:n+r})}}else this._forEachCell(e,t,n,r,this._queryCell,s,{hitTest:i,overlapMode:o,seenUids:{box:{},circle:{}}},a);return s}query(e,t,n,r){return this._query(e,t,n,r,!1,null)}hitTest(e,t,n,r,i,o){return this._query(e,t,n,r,!0,i,o).length>0}hitTestCircle(e,t,n,r,i){const o=e-n,a=e+n,s=t-n,l=t+n;if(a<0||o>this.width||l<0||s>this.height)return!1;const c=[];return this._forEachCell(o,s,a,l,this._queryCellCircle,c,{hitTest:!0,overlapMode:r,circle:{x:e,y:t,radius:n},seenUids:{box:{},circle:{}}},i),c.length>0}_queryCell(e,t,n,r,i,o,a,s){const{seenUids:l,hitTest:c,overlapMode:u}=a,d=this.boxCells[i];if(null!==d){const i=this.bboxes;for(const a of d)if(!l.box[a]){l.box[a]=!0;const d=4*a,h=this.boxKeys[a];if(e<=i[d+2]&&t<=i[d+3]&&n>=i[d+0]&&r>=i[d+1]&&(!s||s(h))&&(!c||!re(u,h.overlapMode))&&(o.push({key:h,x1:i[d],y1:i[d+1],x2:i[d+2],y2:i[d+3]}),c))return!0}}const h=this.circleCells[i];if(null!==h){const i=this.circles;for(const a of h)if(!l.circle[a]){l.circle[a]=!0;const d=3*a,h=this.circleKeys[a];if(this._circleAndRectCollide(i[d],i[d+1],i[d+2],e,t,n,r)&&(!s||s(h))&&(!c||!re(u,h.overlapMode))){const e=i[d],t=i[d+1],n=i[d+2];if(o.push({key:h,x1:e-n,y1:t-n,x2:e+n,y2:t+n}),c)return!0}}}return!1}_queryCellCircle(e,t,n,r,i,o,a,s){const{circle:l,seenUids:c,overlapMode:u}=a,d=this.boxCells[i];if(null!==d){const e=this.bboxes;for(const t of d)if(!c.box[t]){c.box[t]=!0;const n=4*t,r=this.boxKeys[t];if(this._circleAndRectCollide(l.x,l.y,l.radius,e[n+0],e[n+1],e[n+2],e[n+3])&&(!s||s(r))&&!re(u,r.overlapMode))return o.push(!0),!0}}const h=this.circleCells[i];if(null!==h){const e=this.circles;for(const t of h)if(!c.circle[t]){c.circle[t]=!0;const n=3*t,r=this.circleKeys[t];if(this._circlesCollide(e[n],e[n+1],e[n+2],l.x,l.y,l.radius)&&(!s||s(r))&&!re(u,r.overlapMode))return o.push(!0),!0}}}_forEachCell(e,t,n,r,i,o,a,s){const l=this._convertToXCellCoord(e),c=this._convertToYCellCoord(t),u=this._convertToXCellCoord(n),d=this._convertToYCellCoord(r);for(let h=l;h<=u;h++)for(let l=c;l<=d;l++)if(i.call(this,e,t,n,r,this.xCellCount*l+h,o,a,s))return}_convertToXCellCoord(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}_convertToYCellCoord(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}_circlesCollide(e,t,n,r,i,o){const a=r-e,s=i-t,l=n+o;return l*l>a*a+s*s}_circleAndRectCollide(e,t,n,r,i,o,a){const s=(o-r)/2,l=Math.abs(e-(r+s));if(l>s+n)return!1;const c=(a-i)/2,u=Math.abs(t-(i+c));if(u>c+n)return!1;if(l<=s||u<=c)return!0;const d=l-s,h=u-c;return d*d+h*h<=n*n}}function oe(t,n,r,i,o){const a=e.create();return n?(e.scale(a,a,[1/o,1/o,1]),r||e.rotateZ(a,a,i.angle)):e.multiply(a,i.labelPlaneMatrix,t),a}function ae(t,n,r,i,o){if(n){const n=e.clone(t);return e.scale(n,n,[o,o,1]),r||e.rotateZ(n,n,-i.angle),n}return i.glCoordMatrix}function se(t,n,r){let i;r?(i=[t.x,t.y,r(t.x,t.y),1],e.transformMat4(i,i,n)):(i=[t.x,t.y,0,1],be(i,i,n));const o=i[3];return{point:new e.pointGeometry(i[0]/o,i[1]/o),signedDistanceFromCamera:o}}function le(e,t){return.5+e/t*.5}function ce(e,t){const n=e[0]/e[3],r=e[1]/e[3];return n>=-t[0]&&n<=t[0]&&r>=-t[1]&&r<=t[1]}function ue(t,n,r,i,o,a,s,l,c,u){const d=i?t.textSizeData:t.iconSizeData,h=e.evaluateSizeForZoom(d,r.transform.zoom),p=[256/r.width*2+1,256/r.height*2+1],m=i?t.text.dynamicLayoutVertexArray:t.icon.dynamicLayoutVertexArray;m.clear();const g=t.lineVertexArray,f=i?t.text.placedSymbolArray:t.icon.placedSymbolArray,_=r.transform.width/r.transform.height;let b=!1;for(let i=0;i<f.length;i++){const v=f.get(i);if(v.hidden||v.writingMode===e.WritingMode.vertical&&!b){_e(v.numGlyphs,m);continue}let y;if(b=!1,u?(y=[v.anchorX,v.anchorY,u(v.anchorX,v.anchorY),1],e.transformMat4(y,y,n)):(y=[v.anchorX,v.anchorY,0,1],be(y,y,n)),!ce(y,p)){_e(v.numGlyphs,m);continue}const E=le(r.transform.cameraToCenterDistance,y[3]),S=e.evaluateSizeForFeature(d,h,v),w=s?S/E:S*E,T=new e.pointGeometry(v.anchorX,v.anchorY),C=se(T,o,u).point,x={},F=pe(v,w,!1,l,n,o,a,t.glyphOffsetArray,g,m,C,T,x,_,c,u);b=F.useVertical,(F.notEnoughRoom||b||F.needsFlipping&&pe(v,w,!0,l,n,o,a,t.glyphOffsetArray,g,m,C,T,x,_,c,u).notEnoughRoom)&&_e(v.numGlyphs,m)}i?t.text.dynamicLayoutVertexBuffer.updateData(m):t.icon.dynamicLayoutVertexBuffer.updateData(m)}function de(e,t,n,r,i,o,a,s,l,c,u,d,h){const p=s.glyphStartIndex+s.numGlyphs,m=s.lineStartIndex,g=s.lineStartIndex+s.lineLength,f=t.getoffsetX(s.glyphStartIndex),_=t.getoffsetX(p-1),b=ge(e*f,n,r,i,o,a,s.segment,m,g,l,c,u,d,h);if(!b)return null;const v=ge(e*_,n,r,i,o,a,s.segment,m,g,l,c,u,d,h);return v?{first:b,last:v}:null}function he(t,n,r,i){return t===e.WritingMode.horizontal&&Math.abs(r.y-n.y)>Math.abs(r.x-n.x)*i?{useVertical:!0}:(t===e.WritingMode.vertical?n.y<r.y:n.x>r.x)?{needsFlipping:!0}:null}function pe(t,n,r,i,o,a,s,l,c,u,d,h,p,m,g,f){const _=n/24,b=t.lineOffsetX*_,v=t.lineOffsetY*_;let y;if(t.numGlyphs>1){const e=t.glyphStartIndex+t.numGlyphs,n=t.lineStartIndex,o=t.lineStartIndex+t.lineLength,u=de(_,l,b,v,r,d,h,t,c,a,p,g,f);if(!u)return{notEnoughRoom:!0};const E=se(u.first.point,s,f).point,S=se(u.last.point,s,f).point;if(i&&!r){const e=he(t.writingMode,E,S,m);if(e)return e}y=[u.first];for(let i=t.glyphStartIndex+1;i<e-1;i++)y.push(ge(_*l.getoffsetX(i),b,v,r,d,h,t.segment,n,o,c,a,p,g,f));y.push(u.last)}else{if(i&&!r){const n=se(h,o,f).point,r=t.lineStartIndex+t.segment+1,i=new e.pointGeometry(c.getx(r),c.gety(r)),a=se(i,o,f),s=a.signedDistanceFromCamera>0?a.point:me(h,i,n,1,o,f),l=he(t.writingMode,n,s,m);if(l)return l}const n=ge(_*l.getoffsetX(t.glyphStartIndex),b,v,r,d,h,t.segment,t.lineStartIndex,t.lineStartIndex+t.lineLength,c,a,p,g,f);if(!n)return{notEnoughRoom:!0};y=[n]}for(const t of y)e.addDynamicAttributes(u,t.point,t.angle);return{}}function me(e,t,n,r,i,o){const a=se(e.add(e.sub(t)._unit()),i,o).point,s=n.sub(a);return n.add(s._mult(r/s.mag()))}function ge(t,n,r,i,o,a,s,l,c,u,d,h,p,m){const g=i?t-n:t+n;let f=g>0?1:-1,_=0;i&&(f*=-1,_=Math.PI),f<0&&(_+=Math.PI);let b=f>0?l+s:l+s+1,v=o,y=o,E=0,S=0;const w=Math.abs(g),T=[];for(;E+S<=w;){if(b+=f,b<l||b>=c)return null;if(y=v,T.push(v),v=h[b],void 0===v){const t=new e.pointGeometry(u.getx(b),u.gety(b)),n=se(t,d,m);if(n.signedDistanceFromCamera>0)v=h[b]=n.point;else{const n=b-f;v=me(0===E?a:new e.pointGeometry(u.getx(n),u.gety(n)),t,y,w-E+1,d,m)}}E+=S,S=y.dist(v)}const C=(w-E)/S,x=v.sub(y),F=x.mult(C)._add(y);F._add(x._unit()._perp()._mult(r*f));const D=_+Math.atan2(v.y-y.y,v.x-y.x);return T.push(F),{point:F,angle:p?D:0,path:T}}const fe=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function _e(e,t){for(let n=0;n<e;n++){const e=t.length;t.resize(e+4),t.float32.set(fe,3*e)}}function be(e,t,n){const r=t[0],i=t[1];return e[0]=n[0]*r+n[4]*i+n[12],e[1]=n[1]*r+n[5]*i+n[13],e[3]=n[3]*r+n[7]*i+n[15],e}const ve=100;class ye{constructor(e,t=new ie(e.width+200,e.height+200,25),n=new ie(e.width+200,e.height+200,25)){this.transform=e,this.grid=t,this.ignoredGrid=n,this.pitchfactor=Math.cos(e._pitch)*e.cameraToCenterDistance,this.screenRightBoundary=e.width+ve,this.screenBottomBoundary=e.height+ve,this.gridRightBoundary=e.width+200,this.gridBottomBoundary=e.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(e,t,n,r,i,o){const a=this.projectAndGetPerspectiveRatio(r,e.anchorPointX,e.anchorPointY,o),s=n*a.perspectiveRatio,l=e.x1*s+a.point.x,c=e.y1*s+a.point.y,u=e.x2*s+a.point.x,d=e.y2*s+a.point.y;return!this.isInsideGrid(l,c,u,d)||"always"!==t&&this.grid.hitTest(l,c,u,d,t,i)||a.perspectiveRatio<this.perspectiveRatioCutoff?{box:[],offscreen:!1}:{box:[l,c,u,d],offscreen:this.isOffscreen(l,c,u,d)}}placeCollisionCircles(t,n,r,i,o,a,s,l,c,u,d,h,p,m){const g=[],f=new e.pointGeometry(n.anchorX,n.anchorY),_=se(f,a,m),b=le(this.transform.cameraToCenterDistance,_.signedDistanceFromCamera),v=(u?o/b:o*b)/e.ONE_EM,y=se(f,s,m).point,E=de(v,i,n.lineOffsetX*v,n.lineOffsetY*v,!1,y,f,n,r,s,{},!1,m);let S=!1,w=!1,T=!0;if(E){const n=.5*h*b+p,r=new e.pointGeometry(-100,-100),i=new e.pointGeometry(this.screenRightBoundary,this.screenBottomBoundary),o=new ne,a=E.first,s=E.last;let u=[];for(let e=a.path.length-1;e>=1;e--)u.push(a.path[e]);for(let e=1;e<s.path.length;e++)u.push(s.path[e]);const f=2.5*n;if(l){const e=u.map((e=>se(e,l,m)));u=e.some((e=>e.signedDistanceFromCamera<=0))?[]:e.map((e=>e.point))}let _=[];if(u.length>0){const t=u[0].clone(),n=u[0].clone();for(let e=1;e<u.length;e++)t.x=Math.min(t.x,u[e].x),t.y=Math.min(t.y,u[e].y),n.x=Math.max(n.x,u[e].x),n.y=Math.max(n.y,u[e].y);_=t.x>=r.x&&n.x<=i.x&&t.y>=r.y&&n.y<=i.y?[u]:n.x<r.x||t.x>i.x||n.y<r.y||t.y>i.y?[]:e.clipLine([u],r.x,r.y,i.x,i.y)}for(const e of _){o.reset(e,.25*n);let r=0;r=o.length<=.5*n?1:Math.ceil(o.paddedLength/f)+1;for(let e=0;e<r;e++){const i=e/Math.max(r-1,1),a=o.lerp(i),s=a.x+ve,l=a.y+ve;g.push(s,l,n,0);const u=s-n,h=l-n,p=s+n,m=l+n;if(T=T&&this.isOffscreen(u,h,p,m),w=w||this.isInsideGrid(u,h,p,m),"always"!==t&&this.grid.hitTestCircle(s,l,n,t,d)&&(S=!0,!c))return{circles:[],offscreen:!1,collisionDetected:S}}}}return{circles:!c&&S||!w||b<this.perspectiveRatioCutoff?[]:g,offscreen:T,collisionDetected:S}}queryRenderedSymbols(t){if(0===t.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};const n=[];let r=1/0,i=1/0,o=-1/0,a=-1/0;for(const s of t){const t=new e.pointGeometry(s.x+ve,s.y+ve);r=Math.min(r,t.x),i=Math.min(i,t.y),o=Math.max(o,t.x),a=Math.max(a,t.y),n.push(t)}const s=this.grid.query(r,i,o,a).concat(this.ignoredGrid.query(r,i,o,a)),l={},c={};for(const t of s){const r=t.key;if(void 0===l[r.bucketInstanceId]&&(l[r.bucketInstanceId]={}),l[r.bucketInstanceId][r.featureIndex])continue;const i=[new e.pointGeometry(t.x1,t.y1),new e.pointGeometry(t.x2,t.y1),new e.pointGeometry(t.x2,t.y2),new e.pointGeometry(t.x1,t.y2)];e.polygonIntersectsPolygon(n,i)&&(l[r.bucketInstanceId][r.featureIndex]=!0,void 0===c[r.bucketInstanceId]&&(c[r.bucketInstanceId]=[]),c[r.bucketInstanceId].push(r.featureIndex))}return c}insertCollisionBox(e,t,n,r,i,o){(n?this.ignoredGrid:this.grid).insert({bucketInstanceId:r,featureIndex:i,collisionGroupID:o,overlapMode:t},e[0],e[1],e[2],e[3])}insertCollisionCircles(e,t,n,r,i,o){const a=n?this.ignoredGrid:this.grid,s={bucketInstanceId:r,featureIndex:i,collisionGroupID:o,overlapMode:t};for(let t=0;t<e.length;t+=4)a.insertCircle(s,e[t],e[t+1],e[t+2])}projectAndGetPerspectiveRatio(t,n,r,i){let o;return i?(o=[n,r,i(n,r),1],e.transformMat4(o,o,t)):(o=[n,r,0,1],be(o,o,t)),{point:new e.pointGeometry((o[0]/o[3]+1)/2*this.transform.width+ve,(-o[1]/o[3]+1)/2*this.transform.height+ve),perspectiveRatio:.5+this.transform.cameraToCenterDistance/o[3]*.5}}isOffscreen(e,t,n,r){return n<ve||e>=this.screenRightBoundary||r<ve||t>this.screenBottomBoundary}isInsideGrid(e,t,n,r){return n>=0&&e<this.gridRightBoundary&&r>=0&&t<this.gridBottomBoundary}getViewportMatrix(){const t=e.identity([]);return e.translate(t,t,[-100,-100,0]),t}}function Ee(t,n,r){return n*(e.EXTENT/(t.tileSize*Math.pow(2,r-t.tileID.overscaledZ)))}class Se{constructor(e,t,n,r){this.opacity=e?Math.max(0,Math.min(1,e.opacity+(e.placed?t:-t))):r&&n?1:0,this.placed=n}isHidden(){return 0===this.opacity&&!this.placed}}class we{constructor(e,t,n,r,i){this.text=new Se(e?e.text:null,t,n,i),this.icon=new Se(e?e.icon:null,t,r,i)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Te{constructor(e,t,n){this.text=e,this.icon=t,this.skipFade=n}}class Ce{constructor(){this.invProjMatrix=e.create(),this.viewportMatrix=e.create(),this.circles=[]}}class xe{constructor(e,t,n,r,i){this.bucketInstanceId=e,this.featureIndex=t,this.sourceLayerIndex=n,this.bucketIndex=r,this.tileID=i}}class Fe{constructor(e){this.crossSourceCollisions=e,this.maxGroupID=0,this.collisionGroups={}}get(e){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[e]){const t=++this.maxGroupID;this.collisionGroups[e]={ID:t,predicate:e=>e.collisionGroupID===t}}return this.collisionGroups[e]}}function De(t,n,r,i,o){const{horizontalAlign:a,verticalAlign:s}=e.getAnchorAlignment(t),l=-(a-.5)*n,c=-(s-.5)*r,u=e.evaluateVariableOffset(t,i);return new e.pointGeometry(l+u[0]*o,c+u[1]*o)}function ke(t,n,r,i,o,a){const{x1:s,x2:l,y1:c,y2:u,anchorPointX:d,anchorPointY:h}=t,p=new e.pointGeometry(n,r);return i&&p._rotate(o?a:-a),{x1:s+p.x,y1:c+p.y,x2:l+p.x,y2:u+p.y,anchorPointX:d,anchorPointY:h}}class Oe{constructor(e,t,n,r,i){this.transform=e.clone(),this.terrain=t,this.collisionIndex=new ye(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=n,this.retainedQueryData={},this.collisionGroups=new Fe(r),this.collisionCircleArrays={},this.prevPlacement=i,i&&(i.prevPlacement=void 0),this.placedOrientations={}}getBucketParts(t,n,r,i){const o=r.getBucket(n),a=r.latestFeatureIndex;if(!o||!a||n.id!==o.layerIds[0])return;const s=r.collisionBoxArray,l=o.layers[0].layout,c=Math.pow(2,this.transform.zoom-r.tileID.overscaledZ),u=r.tileSize/e.EXTENT,d=this.transform.calculatePosMatrix(r.tileID.toUnwrapped()),h="map"===l.get("text-pitch-alignment"),p="map"===l.get("text-rotation-alignment"),m=Ee(r,1,this.transform.zoom),g=oe(d,h,p,this.transform,m);let f=null;if(h){const t=ae(d,h,p,this.transform,m);f=e.multiply([],this.transform.labelPlaneMatrix,t)}this.retainedQueryData[o.bucketInstanceId]=new xe(o.bucketInstanceId,a,o.sourceLayerIndex,o.index,r.tileID);const _={bucket:o,layout:l,posMatrix:d,textLabelPlaneMatrix:g,labelToScreenMatrix:f,scale:c,textPixelRatio:u,holdingForFade:r.holdingForFade(),collisionBoxArray:s,partiallyEvaluatedTextSize:e.evaluateSizeForZoom(o.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(o.sourceID)};if(i)for(const e of o.sortKeyRanges){const{sortKey:n,symbolInstanceStart:r,symbolInstanceEnd:i}=e;t.push({sortKey:n,symbolInstanceStart:r,symbolInstanceEnd:i,parameters:_})}else t.push({symbolInstanceStart:0,symbolInstanceEnd:o.symbolInstances.length,parameters:_})}attemptAnchorPlacement(e,t,n,r,i,o,a,s,l,c,u,d,h,p,m,g){const f=[d.textOffset0,d.textOffset1],_=De(e,n,r,f,i),b=this.collisionIndex.placeCollisionBox(ke(t,_.x,_.y,o,a,this.transform.angle),u,s,l,c.predicate,g);if((!m||0!==this.collisionIndex.placeCollisionBox(ke(m,_.x,_.y,o,a,this.transform.angle),u,s,l,c.predicate,g).box.length)&&b.box.length>0){let t;if(this.prevPlacement&&this.prevPlacement.variableOffsets[d.crossTileID]&&this.prevPlacement.placements[d.crossTileID]&&this.prevPlacement.placements[d.crossTileID].text&&(t=this.prevPlacement.variableOffsets[d.crossTileID].anchor),0===d.crossTileID)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[d.crossTileID]={textOffset:f,width:n,height:r,anchor:e,textBoxScale:i,prevAnchor:t},this.markUsedJustification(h,e,d,p),h.allowVerticalPlacement&&(this.markUsedOrientation(h,p,d),this.placedOrientations[d.crossTileID]=p),{shift:_,placedGlyphBoxes:b}}}placeLayerBucketPart(t,n,r){const{bucket:i,layout:o,posMatrix:a,textLabelPlaneMatrix:s,labelToScreenMatrix:l,textPixelRatio:c,holdingForFade:u,collisionBoxArray:d,partiallyEvaluatedTextSize:h,collisionGroup:p}=t.parameters,m=o.get("text-optional"),g=o.get("icon-optional"),f=e.getOverlapMode(o,"text-overlap","text-allow-overlap"),_="always"===f,b=e.getOverlapMode(o,"icon-overlap","icon-allow-overlap"),v="always"===b,y="map"===o.get("text-rotation-alignment"),E="map"===o.get("text-pitch-alignment"),S="none"!==o.get("icon-text-fit"),w="viewport-y"===o.get("symbol-z-order"),T=_&&(v||!i.hasIconData()||g),C=v&&(_||!i.hasTextData()||m);!i.collisionArrays&&d&&i.deserializeCollisionBoxes(d);const x=(t,d)=>{if(n[t.crossTileID])return;if(u)return void(this.placements[t.crossTileID]=new Te(!1,!1,!1));let v=!1,w=!1,x=!0,F=null,D={box:null,offscreen:null},k={box:null,offscreen:null},O=null,I=null,A=null,R=0,N=0,M=0;d.textFeatureIndex?R=d.textFeatureIndex:t.useRuntimeCollisionCircles&&(R=t.featureIndex),d.verticalTextFeatureIndex&&(N=d.verticalTextFeatureIndex);const P=this.retainedQueryData[i.bucketInstanceId].tileID,L=this.terrain?(e,t)=>this.terrain.getElevation(P,e,t):null;for(const e of["textBox","verticalTextBox","iconBox","verticalIconBox"]){const t=d[e];t&&(t.elevation=L?L(t.anchorPointX,t.anchorPointY):0)}const B=d.textBox;if(B){const n=n=>{let r=e.WritingMode.horizontal;if(i.allowVerticalPlacement&&!n&&this.prevPlacement){const e=this.prevPlacement.placedOrientations[t.crossTileID];e&&(this.placedOrientations[t.crossTileID]=e,r=e,this.markUsedOrientation(i,r,t))}return r},r=(n,r)=>{if(i.allowVerticalPlacement&&t.numVerticalGlyphVertices>0&&d.verticalTextBox){for(const t of i.writingModes)if(t===e.WritingMode.vertical?(D=r(),k=D):D=n(),D&&D.box&&D.box.length)break}else D=n()};if(o.get("text-variable-anchor")){let s=o.get("text-variable-anchor");if(this.prevPlacement&&this.prevPlacement.variableOffsets[t.crossTileID]){const e=this.prevPlacement.variableOffsets[t.crossTileID];s.indexOf(e.anchor)>0&&(s=s.filter((t=>t!==e.anchor)),s.unshift(e.anchor))}const l=(e,n,r)=>{const o=e.x2-e.x1,l=e.y2-e.y1,u=t.textBoxScale,d=S&&"never"===b?n:null;let h={box:[],offscreen:!1};const m="never"!==f?2*s.length:s.length;for(let n=0;n<m;++n){const m=this.attemptAnchorPlacement(s[n%s.length],e,o,l,u,y,E,c,a,p,n>=s.length?f:"never",t,i,r,d,L);if(m&&(h=m.placedGlyphBoxes,h&&h.box&&h.box.length)){v=!0,F=m.shift;break}}return h};r((()=>l(B,d.iconBox,e.WritingMode.horizontal)),(()=>{const n=d.verticalTextBox;return i.allowVerticalPlacement&&!(D&&D.box&&D.box.length)&&t.numVerticalGlyphVertices>0&&n?l(n,d.verticalIconBox,e.WritingMode.vertical):{box:null,offscreen:null}})),D&&(v=D.box,x=D.offscreen);const u=n(D&&D.box);if(!v&&this.prevPlacement){const e=this.prevPlacement.variableOffsets[t.crossTileID];e&&(this.variableOffsets[t.crossTileID]=e,this.markUsedJustification(i,e.anchor,t,u))}}else{const o=(e,n)=>{const r=this.collisionIndex.placeCollisionBox(e,f,c,a,p.predicate,L);return r&&r.box&&r.box.length&&(this.markUsedOrientation(i,n,t),this.placedOrientations[t.crossTileID]=n),r};r((()=>o(B,e.WritingMode.horizontal)),(()=>{const n=d.verticalTextBox;return i.allowVerticalPlacement&&t.numVerticalGlyphVertices>0&&n?o(n,e.WritingMode.vertical):{box:null,offscreen:null}})),n(D&&D.box&&D.box.length)}}if(O=D,v=O&&O.box&&O.box.length>0,x=O&&O.offscreen,t.useRuntimeCollisionCircles){const n=i.text.placedSymbolArray.get(t.centerJustifiedTextSymbolIndex),c=e.evaluateSizeForFeature(i.textSizeData,h,n),u=o.get("text-padding");I=this.collisionIndex.placeCollisionCircles(f,n,i.lineVertexArray,i.glyphOffsetArray,c,a,s,l,r,E,p.predicate,t.collisionCircleDiameter,u,L),I.circles.length&&I.collisionDetected&&!r&&e.warnOnce("Collisions detected, but collision boxes are not shown"),v=_||I.circles.length>0&&!I.collisionDetected,x=x&&I.offscreen}if(d.iconFeatureIndex&&(M=d.iconFeatureIndex),d.iconBox){const e=e=>{const t=S&&F?ke(e,F.x,F.y,y,E,this.transform.angle):e;return this.collisionIndex.placeCollisionBox(t,b,c,a,p.predicate,L)};k&&k.box&&k.box.length&&d.verticalIconBox?(A=e(d.verticalIconBox),w=A.box.length>0):(A=e(d.iconBox),w=A.box.length>0),x=x&&A.offscreen}const U=m||0===t.numHorizontalGlyphVertices&&0===t.numVerticalGlyphVertices,j=g||0===t.numIconVertices;if(U||j?j?U||(w=w&&v):v=w&&v:w=v=w&&v,v&&O&&O.box&&this.collisionIndex.insertCollisionBox(O.box,f,o.get("text-ignore-placement"),i.bucketInstanceId,k&&k.box&&N?N:R,p.ID),w&&A&&this.collisionIndex.insertCollisionBox(A.box,b,o.get("icon-ignore-placement"),i.bucketInstanceId,M,p.ID),I&&(v&&this.collisionIndex.insertCollisionCircles(I.circles,f,o.get("text-ignore-placement"),i.bucketInstanceId,R,p.ID),r)){const e=i.bucketInstanceId;let t=this.collisionCircleArrays[e];void 0===t&&(t=this.collisionCircleArrays[e]=new Ce);for(let e=0;e<I.circles.length;e+=4)t.circles.push(I.circles[e+0]),t.circles.push(I.circles[e+1]),t.circles.push(I.circles[e+2]),t.circles.push(I.collisionDetected?1:0)}if(0===t.crossTileID)throw new Error("symbolInstance.crossTileID can't be 0");if(0===i.bucketInstanceId)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[t.crossTileID]=new Te(v||T,w||C,x||i.justReloaded),n[t.crossTileID]=!0};if(w){if(0!==t.symbolInstanceStart)throw new Error("bucket.bucketInstanceId should be 0");const e=i.getSortedSymbolIndexes(this.transform.angle);for(let t=e.length-1;t>=0;--t){const n=e[t];x(i.symbolInstances.get(n),i.collisionArrays[n])}}else for(let e=t.symbolInstanceStart;e<t.symbolInstanceEnd;e++)x(i.symbolInstances.get(e),i.collisionArrays[e]);if(r&&i.bucketInstanceId in this.collisionCircleArrays){const t=this.collisionCircleArrays[i.bucketInstanceId];e.invert(t.invProjMatrix,a),t.viewportMatrix=this.collisionIndex.getViewportMatrix()}i.justReloaded=!1}markUsedJustification(t,n,r,i){let o;o=i===e.WritingMode.vertical?r.verticalPlacedTextSymbolIndex:{left:r.leftJustifiedTextSymbolIndex,center:r.centerJustifiedTextSymbolIndex,right:r.rightJustifiedTextSymbolIndex}[e.getAnchorJustification(n)];const a=[r.leftJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.rightJustifiedTextSymbolIndex,r.verticalPlacedTextSymbolIndex];for(const e of a)e>=0&&(t.text.placedSymbolArray.get(e).crossTileID=o>=0&&e!==o?0:r.crossTileID)}markUsedOrientation(t,n,r){const i=n===e.WritingMode.horizontal||n===e.WritingMode.horizontalOnly?n:0,o=n===e.WritingMode.vertical?n:0,a=[r.leftJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.rightJustifiedTextSymbolIndex];for(const e of a)t.text.placedSymbolArray.get(e).placedOrientation=i;r.verticalPlacedTextSymbolIndex&&(t.text.placedSymbolArray.get(r.verticalPlacedTextSymbolIndex).placedOrientation=o)}commit(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;const t=this.prevPlacement;let n=!1;this.prevZoomAdjustment=t?t.zoomAdjustment(this.transform.zoom):0;const r=t?t.symbolFadeChange(e):1,i=t?t.opacities:{},o=t?t.variableOffsets:{},a=t?t.placedOrientations:{};for(const e in this.placements){const t=this.placements[e],o=i[e];o?(this.opacities[e]=new we(o,r,t.text,t.icon),n=n||t.text!==o.text.placed||t.icon!==o.icon.placed):(this.opacities[e]=new we(null,r,t.text,t.icon,t.skipFade),n=n||t.text||t.icon)}for(const e in i){const t=i[e];if(!this.opacities[e]){const i=new we(t,r,!1,!1);i.isHidden()||(this.opacities[e]=i,n=n||t.text.placed||t.icon.placed)}}for(const e in o)this.variableOffsets[e]||!this.opacities[e]||this.opacities[e].isHidden()||(this.variableOffsets[e]=o[e]);for(const e in a)this.placedOrientations[e]||!this.opacities[e]||this.opacities[e].isHidden()||(this.placedOrientations[e]=a[e]);if(t&&void 0===t.lastPlacementChangeTime)throw new Error("Last placement time for previous placement is not defined");n?this.lastPlacementChangeTime=e:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)}updateLayerOpacities(e,t){const n={};for(const r of t){const t=r.getBucket(e);t&&r.latestFeatureIndex&&e.id===t.layerIds[0]&&this.updateBucketOpacities(t,n,r.collisionBoxArray)}}updateBucketOpacities(t,n,r){t.hasTextData()&&t.text.opacityVertexArray.clear(),t.hasIconData()&&t.icon.opacityVertexArray.clear(),t.hasIconCollisionBoxData()&&t.iconCollisionBox.collisionVertexArray.clear(),t.hasTextCollisionBoxData()&&t.textCollisionBox.collisionVertexArray.clear();const i=t.layers[0].layout,o=new we(null,0,!1,!1,!0),a=i.get("text-allow-overlap"),s=i.get("icon-allow-overlap"),l=i.get("text-variable-anchor"),c="map"===i.get("text-rotation-alignment"),u="map"===i.get("text-pitch-alignment"),d="none"!==i.get("icon-text-fit"),h=new we(null,0,a&&(s||!t.hasIconData()||i.get("icon-optional")),s&&(a||!t.hasTextData()||i.get("text-optional")),!0);!t.collisionArrays&&r&&(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData())&&t.deserializeCollisionBoxes(r);const p=(e,t,n)=>{for(let r=0;r<t/4;r++)e.opacityVertexArray.emplaceBack(n)};for(let r=0;r<t.symbolInstances.length;r++){const i=t.symbolInstances.get(r),{numHorizontalGlyphVertices:a,numVerticalGlyphVertices:s,crossTileID:m}=i;let g=this.opacities[m];n[m]?g=o:g||(g=h,this.opacities[m]=g),n[m]=!0;const f=i.numIconVertices>0,_=this.placedOrientations[i.crossTileID],b=_===e.WritingMode.vertical,v=_===e.WritingMode.horizontal||_===e.WritingMode.horizontalOnly;if(a>0||s>0){const e=Ue(g.text);p(t.text,a,b?je:e),p(t.text,s,v?je:e);const n=g.text.isHidden();[i.rightJustifiedTextSymbolIndex,i.centerJustifiedTextSymbolIndex,i.leftJustifiedTextSymbolIndex].forEach((e=>{e>=0&&(t.text.placedSymbolArray.get(e).hidden=n||b?1:0)})),i.verticalPlacedTextSymbolIndex>=0&&(t.text.placedSymbolArray.get(i.verticalPlacedTextSymbolIndex).hidden=n||v?1:0);const r=this.variableOffsets[i.crossTileID];r&&this.markUsedJustification(t,r.anchor,i,_);const o=this.placedOrientations[i.crossTileID];o&&(this.markUsedJustification(t,"left",i,o),this.markUsedOrientation(t,o,i))}if(f){const e=Ue(g.icon),n=!(d&&i.verticalPlacedIconSymbolIndex&&b);i.placedIconSymbolIndex>=0&&(p(t.icon,i.numIconVertices,n?e:je),t.icon.placedSymbolArray.get(i.placedIconSymbolIndex).hidden=g.icon.isHidden()),i.verticalPlacedIconSymbolIndex>=0&&(p(t.icon,i.numVerticalIconVertices,n?je:e),t.icon.placedSymbolArray.get(i.verticalPlacedIconSymbolIndex).hidden=g.icon.isHidden())}if(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData()){const n=t.collisionArrays[r];if(n){let r=new e.pointGeometry(0,0);if(n.textBox||n.verticalTextBox){let e=!0;if(l){const t=this.variableOffsets[m];t?(r=De(t.anchor,t.width,t.height,t.textOffset,t.textBoxScale),c&&r._rotate(u?this.transform.angle:-this.transform.angle)):e=!1}n.textBox&&Ie(t.textCollisionBox.collisionVertexArray,g.text.placed,!e||b,r.x,r.y),n.verticalTextBox&&Ie(t.textCollisionBox.collisionVertexArray,g.text.placed,!e||v,r.x,r.y)}const i=Boolean(!v&&n.verticalIconBox);n.iconBox&&Ie(t.iconCollisionBox.collisionVertexArray,g.icon.placed,i,d?r.x:0,d?r.y:0),n.verticalIconBox&&Ie(t.iconCollisionBox.collisionVertexArray,g.icon.placed,!i,d?r.x:0,d?r.y:0)}}}if(t.sortFeatures(this.transform.angle),this.retainedQueryData[t.bucketInstanceId]&&(this.retainedQueryData[t.bucketInstanceId].featureSortOrder=t.featureSortOrder),t.hasTextData()&&t.text.opacityVertexBuffer&&t.text.opacityVertexBuffer.updateData(t.text.opacityVertexArray),t.hasIconData()&&t.icon.opacityVertexBuffer&&t.icon.opacityVertexBuffer.updateData(t.icon.opacityVertexArray),t.hasIconCollisionBoxData()&&t.iconCollisionBox.collisionVertexBuffer&&t.iconCollisionBox.collisionVertexBuffer.updateData(t.iconCollisionBox.collisionVertexArray),t.hasTextCollisionBoxData()&&t.textCollisionBox.collisionVertexBuffer&&t.textCollisionBox.collisionVertexBuffer.updateData(t.textCollisionBox.collisionVertexArray),t.text.opacityVertexArray.length!==t.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${t.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${t.text.layoutVertexArray.length}) / 4`);if(t.icon.opacityVertexArray.length!==t.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${t.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${t.icon.layoutVertexArray.length}) / 4`);if(t.bucketInstanceId in this.collisionCircleArrays){const e=this.collisionCircleArrays[t.bucketInstanceId];t.placementInvProjMatrix=e.invProjMatrix,t.placementViewportMatrix=e.viewportMatrix,t.collisionCircleArray=e.circles,delete this.collisionCircleArrays[t.bucketInstanceId]}}symbolFadeChange(e){return 0===this.fadeDuration?1:(e-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(e){return Math.max(0,(this.transform.zoom-e)/1.5)}hasTransitions(e){return this.stale||e-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(e,t){const n=this.zoomAtLastRecencyCheck===t?1-this.zoomAdjustment(t):1;return this.zoomAtLastRecencyCheck=t,this.commitTime+this.fadeDuration*n>e}setStale(){this.stale=!0}}function Ie(e,t,n,r,i){e.emplaceBack(t?1:0,n?1:0,r||0,i||0),e.emplaceBack(t?1:0,n?1:0,r||0,i||0),e.emplaceBack(t?1:0,n?1:0,r||0,i||0),e.emplaceBack(t?1:0,n?1:0,r||0,i||0)}const Ae=Math.pow(2,25),Re=Math.pow(2,24),Ne=Math.pow(2,17),Me=Math.pow(2,16),Pe=Math.pow(2,9),Le=Math.pow(2,8),Be=Math.pow(2,1);function Ue(e){if(0===e.opacity&&!e.placed)return 0;if(1===e.opacity&&e.placed)return 4294967295;const t=e.placed?1:0,n=Math.floor(127*e.opacity);return n*Ae+t*Re+n*Ne+t*Me+n*Pe+t*Le+n*Be+t}const je=0;class Ge{constructor(e){this._sortAcrossTiles="viewport-y"!==e.layout.get("symbol-z-order")&&!e.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(e,t,n,r,i){const o=this._bucketParts;for(;this._currentTileIndex<e.length;)if(t.getBucketParts(o,r,e[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,i())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,o.sort(((e,t)=>e.sortKey-t.sortKey)));this._currentPartIndex<o.length;)if(t.placeLayerBucketPart(o[this._currentPartIndex],this._seenCrossTileIDs,n),this._currentPartIndex++,i())return!0;return!1}}class ze{constructor(e,t,n,r,i,o,a,s){this.placement=new Oe(e,t,o,a,s),this._currentPlacementIndex=n.length-1,this._forceFullPlacement=r,this._showCollisionBoxes=i,this._done=!1}isDone(){return this._done}continuePlacement(t,n,r){const i=e.exported.now(),o=()=>{const t=e.exported.now()-i;return!this._forceFullPlacement&&t>2};for(;this._currentPlacementIndex>=0;){const e=n[t[this._currentPlacementIndex]],i=this.placement.collisionIndex.transform.zoom;if("symbol"===e.type&&(!e.minzoom||e.minzoom<=i)&&(!e.maxzoom||e.maxzoom>i)){if(this._inProgressLayer||(this._inProgressLayer=new Ge(e)),this._inProgressLayer.continuePlacement(r[e.source],this.placement,this._showCollisionBoxes,e,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(e){return this.placement.commit(e),this.placement}}const He=512/e.EXTENT/2;class qe{constructor(e,t,n){this.tileID=e,this.indexedSymbolInstances={},this.bucketInstanceId=n;for(let n=0;n<t.length;n++){const r=t.get(n),i=r.key;this.indexedSymbolInstances[i]||(this.indexedSymbolInstances[i]=[]),this.indexedSymbolInstances[i].push({crossTileID:r.crossTileID,coord:this.getScaledCoordinates(r,e)})}}getScaledCoordinates(t,n){const r=He/Math.pow(2,n.canonical.z-this.tileID.canonical.z);return{x:Math.floor((n.canonical.x*e.EXTENT+t.anchorX)*r),y:Math.floor((n.canonical.y*e.EXTENT+t.anchorY)*r)}}findMatches(e,t,n){const r=this.tileID.canonical.z<t.canonical.z?1:Math.pow(2,this.tileID.canonical.z-t.canonical.z);for(let i=0;i<e.length;i++){const o=e.get(i);if(o.crossTileID)continue;const a=this.indexedSymbolInstances[o.key];if(!a)continue;const s=this.getScaledCoordinates(o,t);for(const e of a)if(Math.abs(e.coord.x-s.x)<=r&&Math.abs(e.coord.y-s.y)<=r&&!n[e.crossTileID]){n[e.crossTileID]=!0,o.crossTileID=e.crossTileID;break}}}}class Ve{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class $e{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(e){const t=Math.round((e-this.lng)/360);if(0!==t)for(const e in this.indexes){const n=this.indexes[e],r={};for(const e in n){const i=n[e];i.tileID=i.tileID.unwrapTo(i.tileID.wrap+t),r[i.tileID.key]=i}this.indexes[e]=r}this.lng=e}addBucket(e,t,n){if(this.indexes[e.overscaledZ]&&this.indexes[e.overscaledZ][e.key]){if(this.indexes[e.overscaledZ][e.key].bucketInstanceId===t.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(e.overscaledZ,this.indexes[e.overscaledZ][e.key])}for(let e=0;e<t.symbolInstances.length;e++)t.symbolInstances.get(e).crossTileID=0;this.usedCrossTileIDs[e.overscaledZ]||(this.usedCrossTileIDs[e.overscaledZ]={});const r=this.usedCrossTileIDs[e.overscaledZ];for(const n in this.indexes){const i=this.indexes[n];if(Number(n)>e.overscaledZ)for(const n in i){const o=i[n];o.tileID.isChildOf(e)&&o.findMatches(t.symbolInstances,e,r)}else{const o=i[e.scaledTo(Number(n)).key];o&&o.findMatches(t.symbolInstances,e,r)}}for(let e=0;e<t.symbolInstances.length;e++){const i=t.symbolInstances.get(e);i.crossTileID||(i.crossTileID=n.generate(),r[i.crossTileID]=!0)}return void 0===this.indexes[e.overscaledZ]&&(this.indexes[e.overscaledZ]={}),this.indexes[e.overscaledZ][e.key]=new qe(e,t.symbolInstances,t.bucketInstanceId),!0}removeBucketCrossTileIDs(e,t){for(const n in t.indexedSymbolInstances)for(const r of t.indexedSymbolInstances[n])delete this.usedCrossTileIDs[e][r.crossTileID]}removeStaleBuckets(e){let t=!1;for(const n in this.indexes){const r=this.indexes[n];for(const i in r)e[r[i].bucketInstanceId]||(this.removeBucketCrossTileIDs(n,r[i]),delete r[i],t=!0)}return t}}class Ke{constructor(){this.layerIndexes={},this.crossTileIDs=new Ve,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(e,t,n){let r=this.layerIndexes[e.id];void 0===r&&(r=this.layerIndexes[e.id]=new $e);let i=!1;const o={};r.handleWrapJump(n);for(const n of t){const t=n.getBucket(e);t&&e.id===t.layerIds[0]&&(t.bucketInstanceId||(t.bucketInstanceId=++this.maxBucketInstanceId),r.addBucket(n.tileID,t,this.crossTileIDs)&&(i=!0),o[t.bucketInstanceId]=!0)}return r.removeStaleBuckets(o)&&(i=!0),i}pruneUnusedLayers(e){const t={};e.forEach((e=>{t[e]=!0}));for(const e in this.layerIndexes)t[e]||delete this.layerIndexes[e]}}var We=e.createLayout([{name:"a_pos",type:"Int16",components:2}]);class Ye extends e.Evented{constructor(e){super(),this.sourceCache=e,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.renderHistory=[],this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,this.renderHistorySize=e._cache.max,e.usedForTerrain=!0,e.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null;for(const e in this._tiles){const t=this._tiles[e];t.textures.forEach((e=>e.destroy())),t.textures=[]}}update(t,n){this.sourceCache.update(t,n),this._renderableTilesKeys=[];for(const r of t.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:n}))this._renderableTilesKeys.push(r.key),this._tiles[r.key]||(r.posMatrix=new Float64Array(16),e.ortho(r.posMatrix,0,e.EXTENT,0,e.EXTENT,0,1),this._tiles[r.key]=new M(r,this.tileSize))}removeOutdated(e){const t={};this.renderHistory=this.renderHistory.filter(((e,t)=>this.renderHistory.indexOf(e)===t)).slice(0,this.renderHistorySize);for(const e of this._renderableTilesKeys)t[e]=!0;for(const e of this.renderHistory)t[e]=!0;for(const n in this._tiles)t[n]||(this._tiles[n].clearTextures(e),delete this._tiles[n])}getRenderableTiles(){return this._renderableTilesKeys.map((e=>this.getTileByID(e)))}getTileByID(e){return this._tiles[e]}getTerrainCoords(t){const n={};for(const r of this._renderableTilesKeys){const i=this._tiles[r].tileID;if(i.canonical.equals(t.canonical)){const i=t.clone();i.posMatrix=new Float64Array(16),e.ortho(i.posMatrix,0,e.EXTENT,0,e.EXTENT,0,1),n[r]=i}else if(i.canonical.isChildOf(t.canonical)){const o=t.clone();o.posMatrix=new Float64Array(16);const a=i.canonical.z-t.canonical.z,s=i.canonical.x-(i.canonical.x>>a<<a),l=i.canonical.y-(i.canonical.y>>a<<a),c=e.EXTENT>>a;e.ortho(o.posMatrix,0,c,0,c,0,1),e.translate(o.posMatrix,o.posMatrix,[-s*c,-l*c,0]),n[r]=o}else if(t.canonical.isChildOf(i.canonical)){const o=t.clone();o.posMatrix=new Float64Array(16);const a=t.canonical.z-i.canonical.z,s=t.canonical.x-(t.canonical.x>>a<<a),l=t.canonical.y-(t.canonical.y>>a<<a),c=e.EXTENT>>a;e.ortho(o.posMatrix,0,e.EXTENT,0,e.EXTENT,0,1),e.translate(o.posMatrix,o.posMatrix,[s*c,l*c,0]),e.scale(o.posMatrix,o.posMatrix,[1/2**a,1/2**a,0]),n[r]=o}}return n}getSourceTile(e,t){const n=this.sourceCache._source;let r=e.overscaledZ-this.deltaZoom;if(r>n.maxzoom&&(r=n.maxzoom),r<n.minzoom)return null;this._sourceTileCache[e.key]||(this._sourceTileCache[e.key]=e.scaledTo(r).key);let i=this.sourceCache.getTileByID(this._sourceTileCache[e.key]);if((!i||!i.dem)&&t)for(;r>=n.minzoom&&(!i||!i.dem);)i=this.sourceCache.getTileByID(e.scaledTo(r--).key);return i}tilesAfterTime(e=Date.now()){return Object.values(this._tiles).filter((t=>t.timeLoaded>=e))}}class Qe{constructor(e,t,n){this.style=e,this.sourceCache=new Ye(t),this.options=n,this.exaggeration="number"==typeof n.exaggeration?n.exaggeration:1,this.elevationOffset="number"==typeof n.elevationOffset?n.elevationOffset:450,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024,this.clearRerenderCache()}getDEMElevation(t,n,r,i=e.EXTENT){if(!(n>=0&&n<i&&r>=0&&r<i))return this.elevationOffset;let o=0;const a=this.getTerrainData(t);if(a.tile&&a.tile.dem){const t=e.transformMat4$1([],[n/i*e.EXTENT,r/i*e.EXTENT],a.u_terrain_matrix),s=[t[0]*a.tile.dem.dim,t[1]*a.tile.dem.dim],l=[Math.floor(s[0]),Math.floor(s[1])],c=a.tile.dem.get(l[0],l[1]),u=a.tile.dem.get(l[0],l[1]+1),d=a.tile.dem.get(l[0]+1,l[1]),h=a.tile.dem.get(l[0]+1,l[1]+1);o=e.number(e.number(c,u,s[0]-l[0]),e.number(d,h,s[0]-l[0]),s[1]-l[1])}return o}rememberForRerender(e,t){for(const n in this.sourceCache._tiles){const r=this.sourceCache._tiles[n];(r.tileID.equals(t)||r.tileID.isChildOf(t))&&(e===this.sourceCache.sourceCache.id&&(r.timeLoaded=Date.now()),this._rerender[e]=this._rerender[e]||{},this._rerender[e][r.tileID.key]=!0)}}needsRerender(e,t){return this._rerender[e]&&this._rerender[e][t.key]}clearRerenderCache(){this._rerender={}}getElevation(t,n,r,i=e.EXTENT){return(this.getDEMElevation(t,n,r,i)+this.elevationOffset)*this.exaggeration}getTerrainData(t){if(!this._emptyDemTexture){const t=this.style.map.painter.context,n=new e.RGBAImage({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new l(t,n,t.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new l(t,new e.RGBAImage({width:1,height:1}),t.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(t.gl.NEAREST,t.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=e.identity([])}const n=this.sourceCache.getSourceTile(t,!0);if(n&&n.dem&&(!n.demTexture||n.needsTerrainPrepare)){const e=this.style.map.painter.context;n.demTexture=this.style.map.painter.getTileTexture(n.dem.stride),n.demTexture?n.demTexture.update(n.dem.getPixels(),{premultiply:!1}):n.demTexture=new l(e,n.dem.getPixels(),e.gl.RGBA,{premultiply:!1}),n.demTexture.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),n.needsTerrainPrepare=!1}const r=n&&n+n.tileID.key+t.key;if(r&&!this._demMatrixCache[r]){const r=this.sourceCache.sourceCache._source.maxzoom;let i=t.canonical.z-n.tileID.canonical.z;t.overscaledZ>t.canonical.z&&(t.canonical.z>=r?i=t.canonical.z-r:e.warnOnce("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const o=t.canonical.x-(t.canonical.x>>i<<i),a=t.canonical.y-(t.canonical.y>>i<<i),s=e.fromScaling(new Float64Array(16),[1/(e.EXTENT<<i),1/(e.EXTENT<<i),0]);e.translate(s,s,[o*e.EXTENT,a*e.EXTENT,0]),this._demMatrixCache[t.key]={matrix:s,coord:t}}return{u_depth:2,u_terrain:3,u_terrain_dim:n&&n.dem&&n.dem.dim||1,u_terrain_matrix:r?this._demMatrixCache[t.key].matrix:this._emptyDemMatrix,u_terrain_unpack:n&&n.dem&&n.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_offset:this.elevationOffset,u_terrain_exaggeration:this.exaggeration,texture:(n&&n.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:n}}getRTTFramebuffer(){const e=this.style.map.painter;if(!this._rttFramebuffer){const t=this.sourceCache.tileSize*this.qualityFactor;this._rttFramebuffer=e.context.createFramebuffer(t,t,!0),this._rttFramebuffer.depthAttachment.set(e.context.createRenderbuffer(e.context.gl.DEPTH_COMPONENT16,t,t))}return this._rttFramebuffer}getFramebuffer(e){const t=this.style.map.painter,n=t.width/devicePixelRatio,r=t.height/devicePixelRatio;return!this._fbo||this._fbo.width===n&&this._fbo.height===r||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new l(t.context,{width:n,height:r,data:null},t.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(t.context.gl.NEAREST,t.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new l(t.context,{width:n,height:r,data:null},t.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(t.context.gl.NEAREST,t.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=t.context.createFramebuffer(n,r,!0),this._fbo.depthAttachment.set(t.context.createRenderbuffer(t.context.gl.DEPTH_COMPONENT16,n,r))),this._fbo.colorAttachment.set("coords"===e?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const t=this.style.map.painter.context;if(this._coordsTexture)return this._coordsTexture;const n=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let e=0,t=0;e<this._coordsTextureSize;e++)for(let r=0;r<this._coordsTextureSize;r++,t+=4)n[t+0]=255&r,n[t+1]=255&e,n[t+2]=r>>8<<4|e>>8,n[t+3]=0;const r=new e.RGBAImage({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(n.buffer)),i=new l(t,r,t.gl.RGBA,{premultiply:!1});return i.bind(t.gl.NEAREST,t.gl.CLAMP_TO_EDGE),this._coordsTexture=i,i}pointCoordinate(t){const n=new Uint8Array(4),r=this.style.map.painter,i=r.context,o=i.gl;i.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),o.readPixels(t.x,r.height/devicePixelRatio-t.y-1,1,1,o.RGBA,o.UNSIGNED_BYTE,n),i.bindFramebuffer.set(null);const a=n[0]+(n[2]>>4<<8),s=n[1]+((15&n[2])<<8),l=this.coordsIndex[255-n[3]],c=l&&this.sourceCache.getTileByID(l);if(!c)return null;const u=this._coordsTextureSize,d=(1<<c.tileID.canonical.z)*u;return new e.MercatorCoordinate((c.tileID.canonical.x*u+a)/d,(c.tileID.canonical.y*u+s)/d,this.getElevation(c.tileID,a,s,u))}getTerrainMesh(){if(this._mesh)return this._mesh;const t=this.style.map.painter.context,n=new e.PosArray,r=new e.TriangleIndexArray,i=this.meshSize,o=e.EXTENT/i,a=i*i;for(let e=0;e<=i;e++)for(let t=0;t<=i;t++)n.emplaceBack(t*o,e*o);for(let e=0;e<a;e+=i+1)for(let t=0;t<i;t++)r.emplaceBack(t+e,i+t+e+1,i+t+e+2),r.emplaceBack(t+e,i+t+e+2,t+e+1);return this._mesh={indexBuffer:t.createIndexBuffer(r),vertexBuffer:t.createVertexBuffer(n,We.members),segments:e.SegmentVector.simpleSegment(0,0,n.length,r.length)},this._mesh}getMinMaxElevation(e){const t=this.getTerrainData(e).tile,n={minElevation:null,maxElevation:null};return t&&t.dem&&(n.minElevation=(t.dem.min+this.elevationOffset)*this.exaggeration,n.maxElevation=(t.dem.max+this.elevationOffset)*this.exaggeration),n}}const Xe=(t,n)=>e.emitValidationErrors(t,n&&n.filter((e=>"source.canvas"!==e.identifier))),Ze=e.pick(W,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),Je=e.pick(W,["setCenter","setZoom","setBearing","setPitch"]),et=function(){const t={},n=e.spec.$version;for(const r in e.spec.$root){const i=e.spec.$root[r];if(i.required){let e=null;e="version"===r?n:"array"===i.type?[]:{},null!=e&&(t[r]=e)}}return t}();class tt extends e.Evented{constructor(t,n={}){super(),this.map=t,this.dispatcher=new v(V(),this),this.imageManager=new u,this.imageManager.setEventedParent(this),this.glyphManager=new m(t._requestManager,n.localIdeographFontFamily),this.lineAtlas=new b(256,512),this.crossTileSymbolIndex=new Ke,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new e.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",e.getReferrer());const r=this;this._rtlTextPluginCallback=tt.registerForPluginStateChange((t=>{r.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:t.pluginStatus,pluginURL:t.pluginURL},((t,n)=>{if(e.triggerPluginCompletionEvent(t),n&&n.every((e=>e)))for(const e in r.sourceCaches)r.sourceCaches[e].reload()}))})),this.on("data",(e=>{if("source"!==e.dataType||"metadata"!==e.sourceDataType)return;const t=this.sourceCaches[e.sourceId];if(!t)return;const n=t.getSource();if(n&&n.vectorLayerIds)for(const e in this._layers){const t=this._layers[e];t.source===n.id&&this._validateLayer(t)}}))}loadURL(t,n={}){this.fire(new e.Event("dataloading",{dataType:"style"}));const r="boolean"!=typeof n.validate||n.validate,i=this.map._requestManager.transformRequest(t,e.ResourceType.Style);this._request=e.getJSON(i,((t,n)=>{this._request=null,t?this.fire(new e.ErrorEvent(t)):n&&this._load(n,r)}))}loadJSON(t,n={}){this.fire(new e.Event("dataloading",{dataType:"style"})),this._request=e.exported.frame((()=>{this._request=null,this._load(t,!1!==n.validate)}))}loadEmpty(){this.fire(new e.Event("dataloading",{dataType:"style"})),this._load(et,!1)}_load(t,n){if(n&&Xe(this,e.validateStyle(t)))return;this._loaded=!0,this.stylesheet=t;for(const e in t.sources)this.addSource(e,t.sources[e],{validate:!1});t.sprite?this._loadSprite(t.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(t.glyphs);const r=K(this.stylesheet.layers);this._order=r.map((e=>e.id)),this._layers={},this._serializedLayers={};for(let t of r)t=e.createStyleLayer(t),t.setEventedParent(this,{layer:{id:t.id}}),this._layers[t.id]=t,this._serializedLayers[t.id]=t.serialize();this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new _(this.stylesheet.light),this.setTerrain(this.stylesheet.terrain),this.fire(new e.Event("data",{dataType:"style"})),this.fire(new e.Event("style.load"))}_loadSprite(t){this._spriteRequest=function(t,n,r,i){let o,a,s;const l=r>1?"@2x":"";let c=e.getJSON(n.transformRequest(n.normalizeSpriteURL(t,l,".json"),e.ResourceType.SpriteJSON),((e,t)=>{c=null,s||(s=e,o=t,d())})),u=e.getImage(n.transformRequest(n.normalizeSpriteURL(t,l,".png"),e.ResourceType.SpriteImage),((e,t)=>{u=null,s||(s=e,a=t,d())}));function d(){if(s)i(s);else if(o&&a){const t=e.exported.getImageData(a),n={};for(const r in o){const{width:i,height:a,x:s,y:l,sdf:c,pixelRatio:u,stretchX:d,stretchY:h,content:p}=o[r],m=new e.RGBAImage({width:i,height:a});e.RGBAImage.copy(t,m,{x:s,y:l},{x:0,y:0},{width:i,height:a}),n[r]={data:m,pixelRatio:u,sdf:c,stretchX:d,stretchY:h,content:p}}i(null,n)}}return{cancel(){c&&(c.cancel(),c=null),u&&(u.cancel(),u=null)}}}(t,this.map._requestManager,this.map.getPixelRatio(),((t,n)=>{if(this._spriteRequest=null,t)this.fire(new e.ErrorEvent(t));else if(n)for(const e in n)this.imageManager.addImage(e,n[e]);this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new e.Event("data",{dataType:"style"}))}))}_validateLayer(t){const n=this.sourceCaches[t.source];if(!n)return;const r=t.sourceLayer;if(!r)return;const i=n.getSource();("geojson"===i.type||i.vectorLayerIds&&-1===i.vectorLayerIds.indexOf(r))&&this.fire(new e.ErrorEvent(new Error(`Source layer "${r}" does not exist on source "${i.id}" as specified by style layer "${t.id}".`)))}loaded(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(const e in this.sourceCaches)if(!this.sourceCaches[e].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeLayers(e){const t=[];for(const n of e){const e=this._layers[n];"custom"!==e.type&&t.push(e.serialize())}return t}hasTransitions(){if(this.light&&this.light.hasTransition())return!0;for(const e in this.sourceCaches)if(this.sourceCaches[e].hasTransition())return!0;for(const e in this._layers)if(this._layers[e].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(t){if(!this._loaded)return;const n=this._changed;if(this._changed){const e=Object.keys(this._updatedLayers),n=Object.keys(this._removedLayers);(e.length||n.length)&&this._updateWorkerLayers(e,n);for(const e in this._updatedSources){const t=this._updatedSources[e];if("reload"===t)this._reloadSource(e);else{if("clear"!==t)throw new Error(`Invalid action ${t}`);this._clearSource(e)}}this._updateTilesForChangedImages();for(const e in this._updatedPaintProps)this._layers[e].updateTransitions(t);this.light.updateTransitions(t),this._resetUpdates()}const r={};for(const e in this.sourceCaches){const t=this.sourceCaches[e];r[e]=t.used,t.used=!1}for(const e of this._order){const n=this._layers[e];n.recalculate(t,this._availableImages),!n.isHidden(t.zoom)&&n.source&&(this.sourceCaches[n.source].used=!0)}for(const t in r){const n=this.sourceCaches[t];r[t]!==n.used&&n.fire(new e.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:t}))}this.light.recalculate(t),this.z=t.zoom,n&&this.fire(new e.Event("data",{dataType:"style"}))}_updateTilesForChangedImages(){const e=Object.keys(this._changedImages);if(e.length){for(const t in this.sourceCaches)this.sourceCaches[t].reloadTilesForDependencies(["icons","patterns"],e);this._changedImages={}}}_updateWorkerLayers(e,t){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(e),removedIds:t})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}}setTerrain(t){if(this._checkLoaded(),this._terrainDataCallback&&this.off("data",this._terrainDataCallback),this._terrainfreezeElevationCallback&&this.map.off("freezeElevation",this._terrainfreezeElevationCallback),t){const e=this.sourceCaches[t.source];if(!e)throw new Error(`cannot load terrain, because there exists no source with ID: ${t.source}`);this.terrain=new Qe(this,e,t),this.map.transform.updateElevation(this.terrain),this._terrainfreezeElevationCallback=e=>{e.freeze?this.map.transform.freezeElevation=!0:(this.map.transform.freezeElevation=!1,this.map.transform.recalculateZoom(this.terrain))},this._terrainDataCallback=e=>{e.tile&&(e.sourceId===t.source?(this.map.transform.updateElevation(this.terrain),this.terrain.rememberForRerender(e.sourceId,e.tile.tileID)):"geojson"===e.source.type&&this.terrain.rememberForRerender(e.sourceId,e.tile.tileID))},this.on("data",this._terrainDataCallback),this.map.on("freezeElevation",this._terrainfreezeElevationCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.map.transform.updateElevation(this.terrain);this.map.fire(new e.Event("terrain",{terrain:t}))}setState(t){if(this._checkLoaded(),Xe(this,e.validateStyle(t)))return!1;(t=e.clone$1(t)).layers=K(t.layers);const n=function(e,t){if(!e)return[{command:W.setStyle,args:[t]}];let n=[];try{if(!i(e.version,t.version))return[{command:W.setStyle,args:[t]}];i(e.center,t.center)||n.push({command:W.setCenter,args:[t.center]}),i(e.zoom,t.zoom)||n.push({command:W.setZoom,args:[t.zoom]}),i(e.bearing,t.bearing)||n.push({command:W.setBearing,args:[t.bearing]}),i(e.pitch,t.pitch)||n.push({command:W.setPitch,args:[t.pitch]}),i(e.sprite,t.sprite)||n.push({command:W.setSprite,args:[t.sprite]}),i(e.glyphs,t.glyphs)||n.push({command:W.setGlyphs,args:[t.glyphs]}),i(e.transition,t.transition)||n.push({command:W.setTransition,args:[t.transition]}),i(e.light,t.light)||n.push({command:W.setLight,args:[t.light]});const r={},o=[];!function(e,t,n,r){let o;for(o in t=t||{},e=e||{})Object.prototype.hasOwnProperty.call(e,o)&&(Object.prototype.hasOwnProperty.call(t,o)||Q(o,n,r));for(o in t)Object.prototype.hasOwnProperty.call(t,o)&&(Object.prototype.hasOwnProperty.call(e,o)?i(e[o],t[o])||("geojson"===e[o].type&&"geojson"===t[o].type&&Z(e,t,o)?n.push({command:W.setGeoJSONSourceData,args:[o,t[o].data]}):X(o,t,n,r)):Y(o,t,n))}(e.sources,t.sources,o,r);const a=[];e.layers&&e.layers.forEach((e=>{r[e.source]?n.push({command:W.removeLayer,args:[e.id]}):a.push(e)})),n=n.concat(o),function(e,t,n){t=t||[];const r=(e=e||[]).map(ee),o=t.map(ee),a=e.reduce(te,{}),s=t.reduce(te,{}),l=r.slice(),c=Object.create(null);let u,d,h,p,m,g,f;for(u=0,d=0;u<r.length;u++)h=r[u],Object.prototype.hasOwnProperty.call(s,h)?d++:(n.push({command:W.removeLayer,args:[h]}),l.splice(l.indexOf(h,d),1));for(u=0,d=0;u<o.length;u++)h=o[o.length-1-u],l[l.length-1-u]!==h&&(Object.prototype.hasOwnProperty.call(a,h)?(n.push({command:W.removeLayer,args:[h]}),l.splice(l.lastIndexOf(h,l.length-d),1)):d++,g=l[l.length-u],n.push({command:W.addLayer,args:[s[h],g]}),l.splice(l.length-u,0,h),c[h]=!0);for(u=0;u<o.length;u++)if(h=o[u],p=a[h],m=s[h],!c[h]&&!i(p,m))if(i(p.source,m.source)&&i(p["source-layer"],m["source-layer"])&&i(p.type,m.type)){for(f in J(p.layout,m.layout,n,h,null,W.setLayoutProperty),J(p.paint,m.paint,n,h,null,W.setPaintProperty),i(p.filter,m.filter)||n.push({command:W.setFilter,args:[h,m.filter]}),i(p.minzoom,m.minzoom)&&i(p.maxzoom,m.maxzoom)||n.push({command:W.setLayerZoomRange,args:[h,m.minzoom,m.maxzoom]}),p)Object.prototype.hasOwnProperty.call(p,f)&&"layout"!==f&&"paint"!==f&&"filter"!==f&&"metadata"!==f&&"minzoom"!==f&&"maxzoom"!==f&&(0===f.indexOf("paint.")?J(p[f],m[f],n,h,f.slice(6),W.setPaintProperty):i(p[f],m[f])||n.push({command:W.setLayerProperty,args:[h,f,m[f]]}));for(f in m)Object.prototype.hasOwnProperty.call(m,f)&&!Object.prototype.hasOwnProperty.call(p,f)&&"layout"!==f&&"paint"!==f&&"filter"!==f&&"metadata"!==f&&"minzoom"!==f&&"maxzoom"!==f&&(0===f.indexOf("paint.")?J(p[f],m[f],n,h,f.slice(6),W.setPaintProperty):i(p[f],m[f])||n.push({command:W.setLayerProperty,args:[h,f,m[f]]}))}else n.push({command:W.removeLayer,args:[h]}),g=l[l.lastIndexOf(h)+1],n.push({command:W.addLayer,args:[m,g]})}(a,t.layers,n)}catch(e){console.warn("Unable to compute style diff:",e),n=[{command:W.setStyle,args:[t]}]}return n}(this.serialize(),t).filter((e=>!(e.command in Je)));if(0===n.length)return!1;const r=n.filter((e=>!(e.command in Ze)));if(r.length>0)throw new Error(`Unimplemented: ${r.map((e=>e.command)).join(", ")}.`);return n.forEach((e=>{"setTransition"!==e.command&&this[e.command].apply(this,e.args)})),this.stylesheet=t,!0}addImage(t,n){if(this.getImage(t))return this.fire(new e.ErrorEvent(new Error(`An image named "${t}" already exists.`)));this.imageManager.addImage(t,n),this._afterImageUpdated(t)}updateImage(e,t){this.imageManager.updateImage(e,t)}getImage(e){return this.imageManager.getImage(e)}removeImage(t){if(!this.getImage(t))return this.fire(new e.ErrorEvent(new Error(`An image named "${t}" does not exist.`)));this.imageManager.removeImage(t),this._afterImageUpdated(t)}_afterImageUpdated(t){this._availableImages=this.imageManager.listImages(),this._changedImages[t]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new e.Event("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(t,n,r={}){if(this._checkLoaded(),void 0!==this.sourceCaches[t])throw new Error(`Source "${t}" already exists.`);if(!n.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(n).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(n.type)>=0&&this._validate(e.validateStyle.source,`sources.${t}`,n,null,r))return;this.map&&this.map._collectResourceTiming&&(n.collectResourceTiming=!0);const i=this.sourceCaches[t]=new B(t,n,this.dispatcher);i.style=this,i.setEventedParent(this,(()=>({isSourceLoaded:this.loaded(),source:i.serialize(),sourceId:t}))),i.onAdd(this.map),this._changed=!0}removeSource(t){if(this._checkLoaded(),void 0===this.sourceCaches[t])throw new Error("There is no source with this ID");for(const n in this._layers)if(this._layers[n].source===t)return this.fire(new e.ErrorEvent(new Error(`Source "${t}" cannot be removed while layer "${n}" is using it.`)));const n=this.sourceCaches[t];delete this.sourceCaches[t],delete this._updatedSources[t],n.fire(new e.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:t})),n.setEventedParent(null),n.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(e,t){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error(`There is no source with this ID=${e}`);const n=this.sourceCaches[e].getSource();if("geojson"!==n.type)throw new Error(`geojsonSource.type is ${n.type}, which is !== 'geojson`);n.setData(t),this._changed=!0}getSource(e){return this.sourceCaches[e]&&this.sourceCaches[e].getSource()}addLayer(t,n,r={}){this._checkLoaded();const i=t.id;if(this.getLayer(i))return void this.fire(new e.ErrorEvent(new Error(`Layer "${i}" already exists on this map.`)));let o;if("custom"===t.type){if(Xe(this,e.validateCustomStyleLayer(t)))return;o=e.createStyleLayer(t)}else{if("object"==typeof t.source&&(this.addSource(i,t.source),t=e.clone$1(t),t=e.extend(t,{source:i})),this._validate(e.validateStyle.layer,`layers.${i}`,t,{arrayIndex:-1},r))return;o=e.createStyleLayer(t),this._validateLayer(o),o.setEventedParent(this,{layer:{id:i}}),this._serializedLayers[o.id]=o.serialize()}const a=n?this._order.indexOf(n):this._order.length;if(n&&-1===a)this.fire(new e.ErrorEvent(new Error(`Cannot add layer "${i}" before non-existing layer "${n}".`)));else{if(this._order.splice(a,0,i),this._layerOrderChanged=!0,this._layers[i]=o,this._removedLayers[i]&&o.source&&"custom"!==o.type){const e=this._removedLayers[i];delete this._removedLayers[i],e.type!==o.type?this._updatedSources[o.source]="clear":(this._updatedSources[o.source]="reload",this.sourceCaches[o.source].pause())}this._updateLayer(o),o.onAdd&&o.onAdd(this.map)}}moveLayer(t,n){if(this._checkLoaded(),this._changed=!0,!this._layers[t])return void this.fire(new e.ErrorEvent(new Error(`The layer '${t}' does not exist in the map's style and cannot be moved.`)));if(t===n)return;const r=this._order.indexOf(t);this._order.splice(r,1);const i=n?this._order.indexOf(n):this._order.length;n&&-1===i?this.fire(new e.ErrorEvent(new Error(`Cannot move layer "${t}" before non-existing layer "${n}".`))):(this._order.splice(i,0,t),this._layerOrderChanged=!0)}removeLayer(t){this._checkLoaded();const n=this._layers[t];if(!n)return void this.fire(new e.ErrorEvent(new Error(`Cannot remove non-existing layer "${t}".`)));n.setEventedParent(null);const r=this._order.indexOf(t);this._order.splice(r,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[t]=n,delete this._layers[t],delete this._serializedLayers[t],delete this._updatedLayers[t],delete this._updatedPaintProps[t],n.onRemove&&n.onRemove(this.map)}getLayer(e){return this._layers[e]}hasLayer(e){return e in this._layers}setLayerZoomRange(t,n,r){this._checkLoaded();const i=this.getLayer(t);i?i.minzoom===n&&i.maxzoom===r||(null!=n&&(i.minzoom=n),null!=r&&(i.maxzoom=r),this._updateLayer(i)):this.fire(new e.ErrorEvent(new Error(`Cannot set the zoom range of non-existing layer "${t}".`)))}setFilter(t,n,r={}){this._checkLoaded();const o=this.getLayer(t);if(o){if(!i(o.filter,n))return null==n?(o.filter=void 0,void this._updateLayer(o)):void(this._validate(e.validateStyle.filter,`layers.${o.id}.filter`,n,null,r)||(o.filter=e.clone$1(n),this._updateLayer(o)))}else this.fire(new e.ErrorEvent(new Error(`Cannot filter non-existing layer "${t}".`)))}getFilter(t){return e.clone$1(this.getLayer(t).filter)}setLayoutProperty(t,n,r,o={}){this._checkLoaded();const a=this.getLayer(t);a?i(a.getLayoutProperty(n),r)||(a.setLayoutProperty(n,r,o),this._updateLayer(a)):this.fire(new e.ErrorEvent(new Error(`Cannot style non-existing layer "${t}".`)))}getLayoutProperty(t,n){const r=this.getLayer(t);if(r)return r.getLayoutProperty(n);this.fire(new e.ErrorEvent(new Error(`Cannot get style of non-existing layer "${t}".`)))}setPaintProperty(t,n,r,o={}){this._checkLoaded();const a=this.getLayer(t);a?i(a.getPaintProperty(n),r)||(a.setPaintProperty(n,r,o)&&this._updateLayer(a),this._changed=!0,this._updatedPaintProps[t]=!0):this.fire(new e.ErrorEvent(new Error(`Cannot style non-existing layer "${t}".`)))}getPaintProperty(e,t){return this.getLayer(e).getPaintProperty(t)}setFeatureState(t,n){this._checkLoaded();const r=t.source,i=t.sourceLayer,o=this.sourceCaches[r];if(void 0===o)return void this.fire(new e.ErrorEvent(new Error(`The source '${r}' does not exist in the map's style.`)));const a=o.getSource().type;"geojson"===a&&i?this.fire(new e.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==a||i?(void 0===t.id&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),o.setFeatureState(i,t.id,n)):this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(t,n){this._checkLoaded();const r=t.source,i=this.sourceCaches[r];if(void 0===i)return void this.fire(new e.ErrorEvent(new Error(`The source '${r}' does not exist in the map's style.`)));const o=i.getSource().type,a="vector"===o?t.sourceLayer:void 0;"vector"!==o||a?n&&"string"!=typeof t.id&&"number"!=typeof t.id?this.fire(new e.ErrorEvent(new Error("A feature id is required to remove its specific state property."))):i.removeFeatureState(a,t.id,n):this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(t){this._checkLoaded();const n=t.source,r=t.sourceLayer,i=this.sourceCaches[n];if(void 0!==i)return"vector"!==i.getSource().type||r?(void 0===t.id&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),i.getFeatureState(r,t.id)):void this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new e.ErrorEvent(new Error(`The source '${n}' does not exist in the map's style.`)))}getTransition(){return e.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){return e.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:e.mapObject(this.sourceCaches,(e=>e.serialize())),layers:this._serializeLayers(this._order)},(e=>void 0!==e))}_updateLayer(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&"raster"!==this.sourceCaches[e.source].getSource().type&&(this._updatedSources[e.source]="reload",this.sourceCaches[e.source].pause()),this._changed=!0}_flattenAndSortRenderedFeatures(e){const t=e=>"fill-extrusion"===this._layers[e].type,n={},r=[];for(let i=this._order.length-1;i>=0;i--){const o=this._order[i];if(t(o)){n[o]=i;for(const t of e){const e=t[o];if(e)for(const t of e)r.push(t)}}}r.sort(((e,t)=>t.intersectionZ-e.intersectionZ));const i=[];for(let o=this._order.length-1;o>=0;o--){const a=this._order[o];if(t(a))for(let e=r.length-1;e>=0;e--){const t=r[e].feature;if(n[t.layer.id]<o)break;i.push(t),r.pop()}else for(const t of e){const e=t[a];if(e)for(const t of e)i.push(t.feature)}}return i}queryRenderedFeatures(t,n,r){n&&n.filter&&this._validate(e.validateStyle.filter,"queryRenderedFeatures.filter",n.filter,null,n);const i={};if(n&&n.layers){if(!Array.isArray(n.layers))return this.fire(new e.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(const t of n.layers){const n=this._layers[t];if(!n)return this.fire(new e.ErrorEvent(new Error(`The layer '${t}' does not exist in the map's style and cannot be queried for features.`))),[];i[n.source]=!0}}const o=[];n.availableImages=this._availableImages;for(const e in this.sourceCaches)n.layers&&!i[e]||o.push(R(this.sourceCaches[e],this._layers,this._serializedLayers,t,n,r));return this.placement&&o.push(function(e,t,n,r,i,o,a){const s={},l=o.queryRenderedSymbols(r),c=[];for(const e of Object.keys(l).map(Number))c.push(a[e]);c.sort(N);for(const n of c){const r=n.featureIndex.lookupSymbolFeatures(l[n.bucketInstanceId],t,n.bucketIndex,n.sourceLayerIndex,i.filter,i.layers,i.availableImages,e);for(const e in r){const t=s[e]=s[e]||[],i=r[e];i.sort(((e,t)=>{const r=n.featureSortOrder;if(r){const n=r.indexOf(e.featureIndex);return r.indexOf(t.featureIndex)-n}return t.featureIndex-e.featureIndex}));for(const e of i)t.push(e)}}for(const t in s)s[t].forEach((r=>{const i=r.feature,o=n[e[t].source].getFeatureState(i.layer["source-layer"],i.id);i.source=i.layer.source,i.layer["source-layer"]&&(i.sourceLayer=i.layer["source-layer"]),i.state=o}));return s}(this._layers,this._serializedLayers,this.sourceCaches,t,n,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(o)}querySourceFeatures(t,n){n&&n.filter&&this._validate(e.validateStyle.filter,"querySourceFeatures.filter",n.filter,null,n);const r=this.sourceCaches[t];return r?function(e,t){const n=e.getRenderableIds().map((t=>e.getTileByID(t))),r=[],i={};for(let e=0;e<n.length;e++){const o=n[e],a=o.tileID.canonical.key;i[a]||(i[a]=!0,o.querySourceFeatures(r,t))}return r}(r,n):[]}addSourceType(e,t,n){return tt.getSourceType(e)?n(new Error(`A source type called "${e}" already exists.`)):(tt.setSourceType(e,t),t.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:e,url:t.workerSourceURL},n):n(null,null))}getLight(){return this.light.getLight()}setLight(t,n={}){this._checkLoaded();const r=this.light.getLight();let o=!1;for(const e in t)if(!i(t[e],r[e])){o=!0;break}if(!o)return;const a={now:e.exported.now(),transition:e.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(t,n),this.light.updateTransitions(a)}_validate(t,n,r,i,o={}){return(!o||!1!==o.validate)&&Xe(this,t.call(e.validateStyle,e.extend({key:n,style:this.serialize(),value:r,styleSpec:e.spec},i)))}_remove(){this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),e.evented.off("pluginStateChange",this._rtlTextPluginCallback);for(const e in this._layers)this._layers[e].setEventedParent(null);for(const e in this.sourceCaches){const t=this.sourceCaches[e];t.setEventedParent(null),t.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()}_clearSource(e){this.sourceCaches[e].clearTiles()}_reloadSource(e){this.sourceCaches[e].resume(),this.sourceCaches[e].reload()}_updateSources(e){for(const t in this.sourceCaches)this.sourceCaches[t].update(e,this.terrain)}_generateCollisionBoxes(){for(const e in this.sourceCaches)this._reloadSource(e)}_updatePlacement(t,n,r,i,o=!1){let a=!1,s=!1;const l={};for(const e of this._order){const n=this._layers[e];if("symbol"!==n.type)continue;if(!l[n.source]){const e=this.sourceCaches[n.source];l[n.source]=e.getRenderableIds(!0).map((t=>e.getTileByID(t))).sort(((e,t)=>t.tileID.overscaledZ-e.tileID.overscaledZ||(e.tileID.isLessThan(t.tileID)?-1:1)))}const r=this.crossTileSymbolIndex.addLayer(n,l[n.source],t.center.lng);a=a||r}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((o=o||this._layerOrderChanged||0===r)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(e.exported.now(),t.zoom))&&(this.pauseablePlacement=new ze(t,this.terrain,this._order,o,n,r,i,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,l),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(e.exported.now()),s=!0),a&&this.pauseablePlacement.placement.setStale()),s||a)for(const e of this._order){const t=this._layers[e];"symbol"===t.type&&this.placement.updateLayerOpacities(t,l[t.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(e.exported.now())}_releaseSymbolFadeTiles(){for(const e in this.sourceCaches)this.sourceCaches[e].releaseSymbolFadeTiles()}getImages(e,t,n){this.imageManager.getImages(t.icons,n),this._updateTilesForChangedImages();const r=this.sourceCaches[t.source];r&&r.setDependencies(t.tileID.key,t.type,t.icons)}getGlyphs(e,t,n){this.glyphManager.getGlyphs(t.stacks,n)}getResource(t,n,r){return e.makeRequest(n,r)}}tt.getSourceType=function(e){return I[e]},tt.setSourceType=function(e,t){I[e]=t},tt.registerForPluginStateChange=e.registerForPluginStateChange;var nt="attribute vec2 a_pos;uniform mat4 u_matrix;varying vec2 v_texture_pos;varying float v_depth;void main() {v_texture_pos=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos,get_elevation(a_pos),1.0);v_depth=gl_Position.z/gl_Position.w;}";const rt={prelude:it("#ifdef GL_ES\nprecision mediump float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif","#ifdef GL_ES\nprecision highp float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}\n#ifdef TERRAIN3D\nuniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_offset;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth;\n#endif\nconst highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) {\n#ifdef TERRAIN3D\nhighp float d=unpack(texture2D(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0));\n#else\nreturn 1.0;\n#endif\n}float calculate_visibility(vec4 pos) {\n#ifdef TERRAIN3D\nvec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0;\n#else\nreturn 1.0;\n#endif\n}float ele(vec2 pos) {\n#ifdef TERRAIN3D\nvec4 rgb=(texture2D(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;\n#else\nreturn 0.0;\n#endif\n}float get_elevation(vec2 pos) {\n#ifdef TERRAIN3D\nvec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return (elevation+u_terrain_offset)*u_terrain_exaggeration;\n#else\nreturn 0.0;\n#endif\n}"),background:it("uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:it("uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:it("varying vec3 v_data;varying float v_visibility;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;varying float v_visibility;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main(void) {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}"),clippingMask:it("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:it("uniform highp float u_intensity;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n#pragma mapbox: initialize highp float weight\nfloat d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\nconst highp float ZERO=1.0/255.0/16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n#pragma mapbox: initialize highp float weight\n#pragma mapbox: initialize mediump float radius\nvec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}"),heatmapTexture:it("uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(0.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:it("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,get_elevation(a_pos),1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:it("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:it("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}"),fill:it("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_FragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);}"),fillOutline:it("varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),fillOutlinePattern:it("uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),fillPattern:it("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}"),fillExtrusion:it("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;\n#ifdef TERRAIN3D\nattribute vec2 a_centroid;\n#endif\nvarying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;\n#ifdef TERRAIN3D\nfloat baseDelta=10.0;float ele=get_elevation(a_centroid);\n#else\nfloat baseDelta=0.0;float ele=0.0;\n#endif\nbase=max(0.0,ele+base-baseDelta);height=max(0.0,ele+height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}"),fillExtrusionPattern:it("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;\n#ifdef TERRAIN3D\nattribute vec2 a_centroid;\n#endif\nvarying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;\n#ifdef TERRAIN3D\nfloat baseDelta=10.0;float ele=get_elevation(a_centroid);\n#else\nfloat baseDelta=0.0;float ele=0.0;\n#endif\nbase=max(0.0,ele+base-baseDelta);height=max(0.0,ele+height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}"),hillshadePrepare:it("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:it("uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\n#define PI 3.141592653589793\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),line:it("uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_width2=vec2(outset,inset);}"),lineGradient:it("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_width2=vec2(outset,inset);}"),linePattern:it("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}"),lineSDF:it("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}"),raster:it("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),symbolIcon:it("uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,ele,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),ele,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,ele,1.0);float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),z,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}"),symbolSDF:it("#define SDF_PX 8.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,ele,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),ele,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,ele,1.0);float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),z,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}"),symbolTextAndIcon:it("#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,ele,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),ele,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,ele,1.0);float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),z,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}"),terrain:it("uniform sampler2D u_texture;varying vec2 v_texture_pos;void main() {gl_FragColor=texture2D(u_texture,v_texture_pos);}",nt),terrainDepth:it("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}",nt),terrainCoords:it("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}",nt)};function it(e,t){const n=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,r=t.match(/attribute ([\w]+) ([\w]+)/g),i=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),o=t.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),a=o?o.concat(i):i,s={};return{fragmentSource:e=e.replace(n,((e,t,n,r,i)=>(s[i]=!0,"define"===t?`\n#ifndef HAS_UNIFORM_u_${i}\nvarying ${n} ${r} ${i};\n#else\nuniform ${n} ${r} u_${i};\n#endif\n`:`\n#ifdef HAS_UNIFORM_u_${i}\n ${n} ${r} ${i} = u_${i};\n#endif\n`))),vertexSource:t=t.replace(n,((e,t,n,r,i)=>{const o="float"===r?"vec2":"vec4",a=i.match(/color/)?"color":o;return s[i]?"define"===t?`\n#ifndef HAS_UNIFORM_u_${i}\nuniform lowp float u_${i}_t;\nattribute ${n} ${o} a_${i};\nvarying ${n} ${r} ${i};\n#else\nuniform ${n} ${r} u_${i};\n#endif\n`:"vec4"===a?`\n#ifndef HAS_UNIFORM_u_${i}\n ${i} = a_${i};\n#else\n ${n} ${r} ${i} = u_${i};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${i}\n ${i} = unpack_mix_${a}(a_${i}, u_${i}_t);\n#else\n ${n} ${r} ${i} = u_${i};\n#endif\n`:"define"===t?`\n#ifndef HAS_UNIFORM_u_${i}\nuniform lowp float u_${i}_t;\nattribute ${n} ${o} a_${i};\n#else\nuniform ${n} ${r} u_${i};\n#endif\n`:"vec4"===a?`\n#ifndef HAS_UNIFORM_u_${i}\n ${n} ${r} ${i} = a_${i};\n#else\n ${n} ${r} ${i} = u_${i};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${i}\n ${n} ${r} ${i} = unpack_mix_${a}(a_${i}, u_${i}_t);\n#else\n ${n} ${r} ${i} = u_${i};\n#endif\n`})),staticAttributes:r,staticUniforms:a}}class ot{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(e,t,n,r,i,o,a,s,l){this.context=e;let c=this.boundPaintVertexBuffers.length!==r.length;for(let e=0;!c&&e<r.length;e++)this.boundPaintVertexBuffers[e]!==r[e]&&(c=!0);e.extVertexArrayObject&&this.vao&&this.boundProgram===t&&this.boundLayoutVertexBuffer===n&&!c&&this.boundIndexBuffer===i&&this.boundVertexOffset===o&&this.boundDynamicVertexBuffer===a&&this.boundDynamicVertexBuffer2===s&&this.boundDynamicVertexBuffer3===l?(e.bindVertexArrayOES.set(this.vao),a&&a.bind(),i&&i.dynamicDraw&&i.bind(),s&&s.bind(),l&&l.bind()):this.freshBind(t,n,r,i,o,a,s,l)}freshBind(e,t,n,r,i,o,a,s){let l;const c=e.numAttributes,u=this.context,d=u.gl;if(u.extVertexArrayObject)this.vao&&this.destroy(),this.vao=u.extVertexArrayObject.createVertexArrayOES(),u.bindVertexArrayOES.set(this.vao),l=0,this.boundProgram=e,this.boundLayoutVertexBuffer=t,this.boundPaintVertexBuffers=n,this.boundIndexBuffer=r,this.boundVertexOffset=i,this.boundDynamicVertexBuffer=o,this.boundDynamicVertexBuffer2=a,this.boundDynamicVertexBuffer3=s;else{l=u.currentNumAttributes||0;for(let e=c;e<l;e++)d.disableVertexAttribArray(e)}t.enableAttributes(d,e);for(const t of n)t.enableAttributes(d,e);o&&o.enableAttributes(d,e),a&&a.enableAttributes(d,e),s&&s.enableAttributes(d,e),t.bind(),t.setVertexAttribPointers(d,e,i);for(const t of n)t.bind(),t.setVertexAttribPointers(d,e,i);o&&(o.bind(),o.setVertexAttribPointers(d,e,i)),r&&r.bind(),a&&(a.bind(),a.setVertexAttribPointers(d,e,i)),s&&(s.bind(),s.setVertexAttribPointers(d,e,i)),u.currentNumAttributes=c}destroy(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)}}function at(e){const t=[];for(let n=0;n<e.length;n++){if(null===e[n])continue;const r=e[n].split(" ");t.push(r.pop())}return t}class st{constructor(t,n,r,i,o,a,s){const l=t.gl;this.program=l.createProgram();const c=at(r.staticAttributes),u=i?i.getBinderAttributes():[],d=c.concat(u),h=rt.prelude.staticUniforms?at(rt.prelude.staticUniforms):[],p=r.staticUniforms?at(r.staticUniforms):[],m=i?i.getBinderUniforms():[],g=h.concat(p).concat(m),f=[];for(const e of g)f.indexOf(e)<0&&f.push(e);const _=i?i.defines():[];a&&_.push("#define OVERDRAW_INSPECTOR;"),s&&_.push("#define TERRAIN3D;");const b=_.concat(rt.prelude.fragmentSource,r.fragmentSource).join("\n"),v=_.concat(rt.prelude.vertexSource,r.vertexSource).join("\n"),y=l.createShader(l.FRAGMENT_SHADER);if(l.isContextLost())return void(this.failedToCreate=!0);l.shaderSource(y,b),l.compileShader(y),l.attachShader(this.program,y);const E=l.createShader(l.VERTEX_SHADER);if(l.isContextLost())return void(this.failedToCreate=!0);l.shaderSource(E,v),l.compileShader(E),l.attachShader(this.program,E),this.attributes={};const S={};this.numAttributes=d.length;for(let e=0;e<this.numAttributes;e++)d[e]&&(l.bindAttribLocation(this.program,e,d[e]),this.attributes[d[e]]=e);l.linkProgram(this.program),l.deleteShader(E),l.deleteShader(y);for(let e=0;e<f.length;e++){const t=f[e];if(t&&!S[t]){const e=l.getUniformLocation(this.program,t);e&&(S[t]=e)}}this.fixedUniforms=o(t,S),this.terrainUniforms=((t,n)=>({u_depth:new e.Uniform1i(t,n.u_depth),u_terrain:new e.Uniform1i(t,n.u_terrain),u_terrain_dim:new e.Uniform1f(t,n.u_terrain_dim),u_terrain_matrix:new e.UniformMatrix4f(t,n.u_terrain_matrix),u_terrain_unpack:new e.Uniform4f(t,n.u_terrain_unpack),u_terrain_offset:new e.Uniform1f(t,n.u_terrain_offset),u_terrain_exaggeration:new e.Uniform1f(t,n.u_terrain_exaggeration)}))(t,S),this.binderUniforms=i?i.getUniforms(t,S):[]}draw(e,t,n,r,i,o,a,s,l,c,u,d,h,p,m,g,f,_){const b=e.gl;if(this.failedToCreate)return;if(e.program.set(this.program),e.setDepthMode(n),e.setStencilMode(r),e.setColorMode(i),e.setCullFace(o),s){e.activeTexture.set(b.TEXTURE2),b.bindTexture(b.TEXTURE_2D,s.depthTexture),e.activeTexture.set(b.TEXTURE3),b.bindTexture(b.TEXTURE_2D,s.texture);for(const e in this.terrainUniforms)this.terrainUniforms[e].set(s[e])}for(const e in this.fixedUniforms)this.fixedUniforms[e].set(a[e]);m&&m.setUniforms(e,this.binderUniforms,h,{zoom:p});let v=0;switch(t){case b.LINES:v=2;break;case b.TRIANGLES:v=3;break;case b.LINE_STRIP:v=1}for(const n of d.get()){const r=n.vaos||(n.vaos={});(r[l]||(r[l]=new ot)).bind(e,this,c,m?m.getPaintVertexBuffers():[],u,n.vertexOffset,g,f,_),b.drawElements(t,n.primitiveLength*v,b.UNSIGNED_SHORT,n.primitiveOffset*v*2)}}}function lt(e,t,n){const r=1/Ee(n,1,t.transform.tileZoom),i=Math.pow(2,n.tileID.overscaledZ),o=n.tileSize*Math.pow(2,t.transform.tileZoom)/i,a=o*(n.tileID.canonical.x+n.tileID.wrap*i),s=o*n.tileID.canonical.y;return{u_image:0,u_texsize:n.imageAtlasTexture.size,u_scale:[r,e.fromScale,e.toScale],u_fade:e.t,u_pixel_coord_upper:[a>>16,s>>16],u_pixel_coord_lower:[65535&a,65535&s]}}const ct=(t,n,r,i)=>{const o=n.style.light,a=o.properties.get("position"),s=[a.x,a.y,a.z],l=e.create$1();"viewport"===o.properties.get("anchor")&&e.fromRotation(l,-n.transform.angle),e.transformMat3(s,s,l);const c=o.properties.get("color");return{u_matrix:t,u_lightpos:s,u_lightintensity:o.properties.get("intensity"),u_lightcolor:[c.r,c.g,c.b],u_vertical_gradient:+r,u_opacity:i}},ut=(t,n,r,i,o,a,s)=>e.extend(ct(t,n,r,i),lt(a,n,s),{u_height_factor:-Math.pow(2,o.overscaledZ)/s.tileSize/8}),dt=e=>({u_matrix:e}),ht=(t,n,r,i)=>e.extend(dt(t),lt(r,n,i)),pt=(e,t)=>({u_matrix:e,u_world:t}),mt=(t,n,r,i,o)=>e.extend(ht(t,n,r,i),{u_world:o}),gt=(e,t,n,r)=>{const i=e.transform;let o,a;if("map"===r.paint.get("circle-pitch-alignment")){const e=Ee(n,1,i.zoom);o=!0,a=[e,e]}else o=!1,a=i.pixelsToGLUnits;return{u_camera_to_center_distance:i.cameraToCenterDistance,u_scale_with_map:+("map"===r.paint.get("circle-pitch-scale")),u_matrix:e.translatePosMatrix(t.posMatrix,n,r.paint.get("circle-translate"),r.paint.get("circle-translate-anchor")),u_pitch_with_map:+o,u_device_pixel_ratio:e.pixelRatio,u_extrude_scale:a}},ft=(e,t,n)=>{const r=Ee(n,1,t.zoom),i=Math.pow(2,t.zoom-n.tileID.overscaledZ),o=n.tileID.overscaleFactor();return{u_matrix:e,u_camera_to_center_distance:t.cameraToCenterDistance,u_pixels_to_tile_units:r,u_extrude_scale:[t.pixelsToGLUnits[0]/(r*i),t.pixelsToGLUnits[1]/(r*i)],u_overscale_factor:o}},_t=(e,t,n=1)=>({u_matrix:e,u_color:t,u_overlay:0,u_overlay_scale:n}),bt=e=>({u_matrix:e}),vt=(e,t,n,r)=>({u_matrix:e,u_extrude_scale:Ee(t,1,n),u_intensity:r});function yt(t,n){const r=Math.pow(2,n.canonical.z),i=n.canonical.y;return[new e.MercatorCoordinate(0,i/r).toLngLat().lat,new e.MercatorCoordinate(0,(i+1)/r).toLngLat().lat]}const Et=(e,t,n,r)=>{const i=e.transform;return{u_matrix:xt(e,t,n,r),u_ratio:1/Ee(t,1,i.zoom),u_device_pixel_ratio:e.pixelRatio,u_units_to_pixels:[1/i.pixelsToGLUnits[0],1/i.pixelsToGLUnits[1]]}},St=(t,n,r,i,o)=>e.extend(Et(t,n,r,o),{u_image:0,u_image_height:i}),wt=(e,t,n,r,i)=>{const o=e.transform,a=Ct(t,o);return{u_matrix:xt(e,t,n,i),u_texsize:t.imageAtlasTexture.size,u_ratio:1/Ee(t,1,o.zoom),u_device_pixel_ratio:e.pixelRatio,u_image:0,u_scale:[a,r.fromScale,r.toScale],u_fade:r.t,u_units_to_pixels:[1/o.pixelsToGLUnits[0],1/o.pixelsToGLUnits[1]]}},Tt=(t,n,r,i,o,a)=>{const s=t.lineAtlas,l=Ct(n,t.transform),c="round"===r.layout.get("line-cap"),u=s.getDash(i.from,c),d=s.getDash(i.to,c),h=u.width*o.fromScale,p=d.width*o.toScale;return e.extend(Et(t,n,r,a),{u_patternscale_a:[l/h,-u.height/2],u_patternscale_b:[l/p,-d.height/2],u_sdfgamma:s.width/(256*Math.min(h,p)*t.pixelRatio)/2,u_image:0,u_tex_y_a:u.y,u_tex_y_b:d.y,u_mix:o.t})};function Ct(e,t){return 1/Ee(e,1,t.tileZoom)}function xt(e,t,n,r){return e.translatePosMatrix(r?r.posMatrix:t.tileID.posMatrix,t,n.paint.get("line-translate"),n.paint.get("line-translate-anchor"))}const Ft=(e,t,n,r,i)=>{return{u_matrix:e,u_tl_parent:t,u_scale_parent:n,u_buffer_scale:1,u_fade_t:r.mix,u_opacity:r.opacity*i.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:i.paint.get("raster-brightness-min"),u_brightness_high:i.paint.get("raster-brightness-max"),u_saturation_factor:(a=i.paint.get("raster-saturation"),a>0?1-1/(1.001-a):-a),u_contrast_factor:(o=i.paint.get("raster-contrast"),o>0?1/(1-o):1+o),u_spin_weights:Dt(i.paint.get("raster-hue-rotate"))};var o,a};function Dt(e){e*=Math.PI/180;const t=Math.sin(e),n=Math.cos(e);return[(2*n+1)/3,(-Math.sqrt(3)*t-n+1)/3,(Math.sqrt(3)*t-n+1)/3]}const kt=(e,t,n,r,i,o,a,s,l,c)=>{const u=i.transform;return{u_is_size_zoom_constant:+("constant"===e||"source"===e),u_is_size_feature_constant:+("constant"===e||"camera"===e),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:u.cameraToCenterDistance,u_pitch:u.pitch/360*2*Math.PI,u_rotate_symbol:+n,u_aspect_ratio:u.width/u.height,u_fade_change:i.options.fadeDuration?i.symbolFadeChange:1,u_matrix:o,u_label_plane_matrix:a,u_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+r,u_texsize:c,u_texture:0}},Ot=(t,n,r,i,o,a,s,l,c,u,d)=>{const h=o.transform;return e.extend(kt(t,n,r,i,o,a,s,l,c,u),{u_gamma_scale:i?Math.cos(h._pitch)*h.cameraToCenterDistance:1,u_device_pixel_ratio:o.pixelRatio,u_is_halo:+d})},It=(t,n,r,i,o,a,s,l,c,u)=>e.extend(Ot(t,n,r,i,o,a,s,l,!0,c,!0),{u_texsize_icon:u,u_texture_icon:1}),At=(e,t,n)=>({u_matrix:e,u_opacity:t,u_color:n}),Rt=(t,n,r,i,o,a)=>e.extend(function(e,t,n,r){const i=n.imageManager.getPattern(e.from.toString()),o=n.imageManager.getPattern(e.to.toString()),{width:a,height:s}=n.imageManager.getPixelSize(),l=Math.pow(2,r.tileID.overscaledZ),c=r.tileSize*Math.pow(2,n.transform.tileZoom)/l,u=c*(r.tileID.canonical.x+r.tileID.wrap*l),d=c*r.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:i.tl,u_pattern_br_a:i.br,u_pattern_tl_b:o.tl,u_pattern_br_b:o.br,u_texsize:[a,s],u_mix:t.t,u_pattern_size_a:i.displaySize,u_pattern_size_b:o.displaySize,u_scale_a:t.fromScale,u_scale_b:t.toScale,u_tile_units_to_pixels:1/Ee(r,1,n.transform.tileZoom),u_pixel_coord_upper:[u>>16,d>>16],u_pixel_coord_lower:[65535&u,65535&d]}}(i,a,r,o),{u_matrix:t,u_opacity:n}),Nt={fillExtrusion:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_lightpos:new e.Uniform3f(t,n.u_lightpos),u_lightintensity:new e.Uniform1f(t,n.u_lightintensity),u_lightcolor:new e.Uniform3f(t,n.u_lightcolor),u_vertical_gradient:new e.Uniform1f(t,n.u_vertical_gradient),u_opacity:new e.Uniform1f(t,n.u_opacity)}),fillExtrusionPattern:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_lightpos:new e.Uniform3f(t,n.u_lightpos),u_lightintensity:new e.Uniform1f(t,n.u_lightintensity),u_lightcolor:new e.Uniform3f(t,n.u_lightcolor),u_vertical_gradient:new e.Uniform1f(t,n.u_vertical_gradient),u_height_factor:new e.Uniform1f(t,n.u_height_factor),u_image:new e.Uniform1i(t,n.u_image),u_texsize:new e.Uniform2f(t,n.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,n.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,n.u_pixel_coord_lower),u_scale:new e.Uniform3f(t,n.u_scale),u_fade:new e.Uniform1f(t,n.u_fade),u_opacity:new e.Uniform1f(t,n.u_opacity)}),fill:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix)}),fillPattern:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_image:new e.Uniform1i(t,n.u_image),u_texsize:new e.Uniform2f(t,n.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,n.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,n.u_pixel_coord_lower),u_scale:new e.Uniform3f(t,n.u_scale),u_fade:new e.Uniform1f(t,n.u_fade)}),fillOutline:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_world:new e.Uniform2f(t,n.u_world)}),fillOutlinePattern:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_world:new e.Uniform2f(t,n.u_world),u_image:new e.Uniform1i(t,n.u_image),u_texsize:new e.Uniform2f(t,n.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,n.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,n.u_pixel_coord_lower),u_scale:new e.Uniform3f(t,n.u_scale),u_fade:new e.Uniform1f(t,n.u_fade)}),circle:(t,n)=>({u_camera_to_center_distance:new e.Uniform1f(t,n.u_camera_to_center_distance),u_scale_with_map:new e.Uniform1i(t,n.u_scale_with_map),u_pitch_with_map:new e.Uniform1i(t,n.u_pitch_with_map),u_extrude_scale:new e.Uniform2f(t,n.u_extrude_scale),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_matrix:new e.UniformMatrix4f(t,n.u_matrix)}),collisionBox:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_camera_to_center_distance:new e.Uniform1f(t,n.u_camera_to_center_distance),u_pixels_to_tile_units:new e.Uniform1f(t,n.u_pixels_to_tile_units),u_extrude_scale:new e.Uniform2f(t,n.u_extrude_scale),u_overscale_factor:new e.Uniform1f(t,n.u_overscale_factor)}),collisionCircle:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_inv_matrix:new e.UniformMatrix4f(t,n.u_inv_matrix),u_camera_to_center_distance:new e.Uniform1f(t,n.u_camera_to_center_distance),u_viewport_size:new e.Uniform2f(t,n.u_viewport_size)}),debug:(t,n)=>({u_color:new e.UniformColor(t,n.u_color),u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_overlay:new e.Uniform1i(t,n.u_overlay),u_overlay_scale:new e.Uniform1f(t,n.u_overlay_scale)}),clippingMask:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix)}),heatmap:(t,n)=>({u_extrude_scale:new e.Uniform1f(t,n.u_extrude_scale),u_intensity:new e.Uniform1f(t,n.u_intensity),u_matrix:new e.UniformMatrix4f(t,n.u_matrix)}),heatmapTexture:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_world:new e.Uniform2f(t,n.u_world),u_image:new e.Uniform1i(t,n.u_image),u_color_ramp:new e.Uniform1i(t,n.u_color_ramp),u_opacity:new e.Uniform1f(t,n.u_opacity)}),hillshade:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_image:new e.Uniform1i(t,n.u_image),u_latrange:new e.Uniform2f(t,n.u_latrange),u_light:new e.Uniform2f(t,n.u_light),u_shadow:new e.UniformColor(t,n.u_shadow),u_highlight:new e.UniformColor(t,n.u_highlight),u_accent:new e.UniformColor(t,n.u_accent)}),hillshadePrepare:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_image:new e.Uniform1i(t,n.u_image),u_dimension:new e.Uniform2f(t,n.u_dimension),u_zoom:new e.Uniform1f(t,n.u_zoom),u_unpack:new e.Uniform4f(t,n.u_unpack)}),line:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_ratio:new e.Uniform1f(t,n.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,n.u_units_to_pixels)}),lineGradient:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_ratio:new e.Uniform1f(t,n.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,n.u_units_to_pixels),u_image:new e.Uniform1i(t,n.u_image),u_image_height:new e.Uniform1f(t,n.u_image_height)}),linePattern:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_texsize:new e.Uniform2f(t,n.u_texsize),u_ratio:new e.Uniform1f(t,n.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_image:new e.Uniform1i(t,n.u_image),u_units_to_pixels:new e.Uniform2f(t,n.u_units_to_pixels),u_scale:new e.Uniform3f(t,n.u_scale),u_fade:new e.Uniform1f(t,n.u_fade)}),lineSDF:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_ratio:new e.Uniform1f(t,n.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,n.u_units_to_pixels),u_patternscale_a:new e.Uniform2f(t,n.u_patternscale_a),u_patternscale_b:new e.Uniform2f(t,n.u_patternscale_b),u_sdfgamma:new e.Uniform1f(t,n.u_sdfgamma),u_image:new e.Uniform1i(t,n.u_image),u_tex_y_a:new e.Uniform1f(t,n.u_tex_y_a),u_tex_y_b:new e.Uniform1f(t,n.u_tex_y_b),u_mix:new e.Uniform1f(t,n.u_mix)}),raster:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_tl_parent:new e.Uniform2f(t,n.u_tl_parent),u_scale_parent:new e.Uniform1f(t,n.u_scale_parent),u_buffer_scale:new e.Uniform1f(t,n.u_buffer_scale),u_fade_t:new e.Uniform1f(t,n.u_fade_t),u_opacity:new e.Uniform1f(t,n.u_opacity),u_image0:new e.Uniform1i(t,n.u_image0),u_image1:new e.Uniform1i(t,n.u_image1),u_brightness_low:new e.Uniform1f(t,n.u_brightness_low),u_brightness_high:new e.Uniform1f(t,n.u_brightness_high),u_saturation_factor:new e.Uniform1f(t,n.u_saturation_factor),u_contrast_factor:new e.Uniform1f(t,n.u_contrast_factor),u_spin_weights:new e.Uniform3f(t,n.u_spin_weights)}),symbolIcon:(t,n)=>({u_is_size_zoom_constant:new e.Uniform1i(t,n.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,n.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,n.u_size_t),u_size:new e.Uniform1f(t,n.u_size),u_camera_to_center_distance:new e.Uniform1f(t,n.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,n.u_pitch),u_rotate_symbol:new e.Uniform1i(t,n.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,n.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,n.u_fade_change),u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,n.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,n.u_coord_matrix),u_is_text:new e.Uniform1i(t,n.u_is_text),u_pitch_with_map:new e.Uniform1i(t,n.u_pitch_with_map),u_texsize:new e.Uniform2f(t,n.u_texsize),u_texture:new e.Uniform1i(t,n.u_texture)}),symbolSDF:(t,n)=>({u_is_size_zoom_constant:new e.Uniform1i(t,n.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,n.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,n.u_size_t),u_size:new e.Uniform1f(t,n.u_size),u_camera_to_center_distance:new e.Uniform1f(t,n.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,n.u_pitch),u_rotate_symbol:new e.Uniform1i(t,n.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,n.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,n.u_fade_change),u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,n.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,n.u_coord_matrix),u_is_text:new e.Uniform1i(t,n.u_is_text),u_pitch_with_map:new e.Uniform1i(t,n.u_pitch_with_map),u_texsize:new e.Uniform2f(t,n.u_texsize),u_texture:new e.Uniform1i(t,n.u_texture),u_gamma_scale:new e.Uniform1f(t,n.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(t,n.u_is_halo)}),symbolTextAndIcon:(t,n)=>({u_is_size_zoom_constant:new e.Uniform1i(t,n.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,n.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,n.u_size_t),u_size:new e.Uniform1f(t,n.u_size),u_camera_to_center_distance:new e.Uniform1f(t,n.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,n.u_pitch),u_rotate_symbol:new e.Uniform1i(t,n.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,n.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,n.u_fade_change),u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,n.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,n.u_coord_matrix),u_is_text:new e.Uniform1i(t,n.u_is_text),u_pitch_with_map:new e.Uniform1i(t,n.u_pitch_with_map),u_texsize:new e.Uniform2f(t,n.u_texsize),u_texsize_icon:new e.Uniform2f(t,n.u_texsize_icon),u_texture:new e.Uniform1i(t,n.u_texture),u_texture_icon:new e.Uniform1i(t,n.u_texture_icon),u_gamma_scale:new e.Uniform1f(t,n.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(t,n.u_is_halo)}),background:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_opacity:new e.Uniform1f(t,n.u_opacity),u_color:new e.UniformColor(t,n.u_color)}),backgroundPattern:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_opacity:new e.Uniform1f(t,n.u_opacity),u_image:new e.Uniform1i(t,n.u_image),u_pattern_tl_a:new e.Uniform2f(t,n.u_pattern_tl_a),u_pattern_br_a:new e.Uniform2f(t,n.u_pattern_br_a),u_pattern_tl_b:new e.Uniform2f(t,n.u_pattern_tl_b),u_pattern_br_b:new e.Uniform2f(t,n.u_pattern_br_b),u_texsize:new e.Uniform2f(t,n.u_texsize),u_mix:new e.Uniform1f(t,n.u_mix),u_pattern_size_a:new e.Uniform2f(t,n.u_pattern_size_a),u_pattern_size_b:new e.Uniform2f(t,n.u_pattern_size_b),u_scale_a:new e.Uniform1f(t,n.u_scale_a),u_scale_b:new e.Uniform1f(t,n.u_scale_b),u_pixel_coord_upper:new e.Uniform2f(t,n.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,n.u_pixel_coord_lower),u_tile_units_to_pixels:new e.Uniform1f(t,n.u_tile_units_to_pixels)}),terrain:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_texture:new e.Uniform1i(t,n.u_texture)}),terrainDepth:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix)}),terrainCoords:(t,n)=>({u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_texture:new e.Uniform1i(t,n.u_texture),u_terrain_coords_id:new e.Uniform1f(t,n.u_terrain_coords_id)})};class Mt{constructor(e,t,n){this.context=e;const r=e.gl;this.buffer=r.createBuffer(),this.dynamicDraw=Boolean(n),this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),r.bufferData(r.ELEMENT_ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?r.DYNAMIC_DRAW:r.STATIC_DRAW),this.dynamicDraw||delete t.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(e){const t=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const Pt={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Lt{constructor(e,t,n,r){this.length=t.length,this.attributes=n,this.itemSize=t.bytesPerElement,this.dynamicDraw=r,this.context=e;const i=e.gl;this.buffer=i.createBuffer(),e.bindVertexBuffer.set(this.buffer),i.bufferData(i.ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||delete t.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(e){if(e.length!==this.length)throw new Error(`Length of new data is ${e.length}, which doesn't match current length of ${this.length}`);const t=this.context.gl;this.bind(),t.bufferSubData(t.ARRAY_BUFFER,0,e.arrayBuffer)}enableAttributes(e,t){for(let n=0;n<this.attributes.length;n++){const r=t.attributes[this.attributes[n].name];void 0!==r&&e.enableVertexAttribArray(r)}}setVertexAttribPointers(e,t,n){for(let r=0;r<this.attributes.length;r++){const i=this.attributes[r],o=t.attributes[i.name];void 0!==o&&e.vertexAttribPointer(o,i.components,e[Pt[i.type]],!1,this.itemSize,i.offset+this.itemSize*(n||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class Bt{constructor(e){this.gl=e.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(e){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class Ut extends Bt{getDefault(){return e.Color.transparent}set(e){const t=this.current;(e.r!==t.r||e.g!==t.g||e.b!==t.b||e.a!==t.a||this.dirty)&&(this.gl.clearColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}}class jt extends Bt{getDefault(){return 1}set(e){(e!==this.current||this.dirty)&&(this.gl.clearDepth(e),this.current=e,this.dirty=!1)}}class Gt extends Bt{getDefault(){return 0}set(e){(e!==this.current||this.dirty)&&(this.gl.clearStencil(e),this.current=e,this.dirty=!1)}}class zt extends Bt{getDefault(){return[!0,!0,!0,!0]}set(e){const t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||this.dirty)&&(this.gl.colorMask(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}}class Ht extends Bt{getDefault(){return!0}set(e){(e!==this.current||this.dirty)&&(this.gl.depthMask(e),this.current=e,this.dirty=!1)}}class qt extends Bt{getDefault(){return 255}set(e){(e!==this.current||this.dirty)&&(this.gl.stencilMask(e),this.current=e,this.dirty=!1)}}class Vt extends Bt{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(e){const t=this.current;(e.func!==t.func||e.ref!==t.ref||e.mask!==t.mask||this.dirty)&&(this.gl.stencilFunc(e.func,e.ref,e.mask),this.current=e,this.dirty=!1)}}class $t extends Bt{getDefault(){const e=this.gl;return[e.KEEP,e.KEEP,e.KEEP]}set(e){const t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||this.dirty)&&(this.gl.stencilOp(e[0],e[1],e[2]),this.current=e,this.dirty=!1)}}class Kt extends Bt{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const t=this.gl;e?t.enable(t.STENCIL_TEST):t.disable(t.STENCIL_TEST),this.current=e,this.dirty=!1}}class Wt extends Bt{getDefault(){return[0,1]}set(e){const t=this.current;(e[0]!==t[0]||e[1]!==t[1]||this.dirty)&&(this.gl.depthRange(e[0],e[1]),this.current=e,this.dirty=!1)}}class Yt extends Bt{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const t=this.gl;e?t.enable(t.DEPTH_TEST):t.disable(t.DEPTH_TEST),this.current=e,this.dirty=!1}}class Qt extends Bt{getDefault(){return this.gl.LESS}set(e){(e!==this.current||this.dirty)&&(this.gl.depthFunc(e),this.current=e,this.dirty=!1)}}class Xt extends Bt{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const t=this.gl;e?t.enable(t.BLEND):t.disable(t.BLEND),this.current=e,this.dirty=!1}}class Zt extends Bt{getDefault(){const e=this.gl;return[e.ONE,e.ZERO]}set(e){const t=this.current;(e[0]!==t[0]||e[1]!==t[1]||this.dirty)&&(this.gl.blendFunc(e[0],e[1]),this.current=e,this.dirty=!1)}}class Jt extends Bt{getDefault(){return e.Color.transparent}set(e){const t=this.current;(e.r!==t.r||e.g!==t.g||e.b!==t.b||e.a!==t.a||this.dirty)&&(this.gl.blendColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}}class en extends Bt{getDefault(){return this.gl.FUNC_ADD}set(e){(e!==this.current||this.dirty)&&(this.gl.blendEquation(e),this.current=e,this.dirty=!1)}}class tn extends Bt{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const t=this.gl;e?t.enable(t.CULL_FACE):t.disable(t.CULL_FACE),this.current=e,this.dirty=!1}}class nn extends Bt{getDefault(){return this.gl.BACK}set(e){(e!==this.current||this.dirty)&&(this.gl.cullFace(e),this.current=e,this.dirty=!1)}}class rn extends Bt{getDefault(){return this.gl.CCW}set(e){(e!==this.current||this.dirty)&&(this.gl.frontFace(e),this.current=e,this.dirty=!1)}}class on extends Bt{getDefault(){return null}set(e){(e!==this.current||this.dirty)&&(this.gl.useProgram(e),this.current=e,this.dirty=!1)}}class an extends Bt{getDefault(){return this.gl.TEXTURE0}set(e){(e!==this.current||this.dirty)&&(this.gl.activeTexture(e),this.current=e,this.dirty=!1)}}class sn extends Bt{getDefault(){const e=this.gl;return[0,0,e.drawingBufferWidth,e.drawingBufferHeight]}set(e){const t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||this.dirty)&&(this.gl.viewport(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}}class ln extends Bt{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;const t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,e),this.current=e,this.dirty=!1}}class cn extends Bt{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;const t=this.gl;t.bindRenderbuffer(t.RENDERBUFFER,e),this.current=e,this.dirty=!1}}class un extends Bt{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;const t=this.gl;t.bindTexture(t.TEXTURE_2D,e),this.current=e,this.dirty=!1}}class dn extends Bt{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;const t=this.gl;t.bindBuffer(t.ARRAY_BUFFER,e),this.current=e,this.dirty=!1}}class hn extends Bt{getDefault(){return null}set(e){const t=this.gl;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e),this.current=e,this.dirty=!1}}class pn extends Bt{constructor(e){super(e),this.vao=e.extVertexArrayObject}getDefault(){return null}set(e){this.vao&&(e!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(e),this.current=e,this.dirty=!1)}}class mn extends Bt{getDefault(){return 4}set(e){if(e===this.current&&!this.dirty)return;const t=this.gl;t.pixelStorei(t.UNPACK_ALIGNMENT,e),this.current=e,this.dirty=!1}}class gn extends Bt{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const t=this.gl;t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e),this.current=e,this.dirty=!1}}class fn extends Bt{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const t=this.gl;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e),this.current=e,this.dirty=!1}}class _n extends Bt{constructor(e,t){super(e),this.context=e,this.parent=t}getDefault(){return null}}class bn extends _n{setDirty(){this.dirty=!0}set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const t=this.gl;t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,e,0),this.current=e,this.dirty=!1}}class vn extends _n{set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const t=this.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e),this.current=e,this.dirty=!1}}class yn{constructor(e,t,n,r){this.context=e,this.width=t,this.height=n;const i=e.gl,o=this.framebuffer=i.createFramebuffer();if(this.colorAttachment=new bn(e,o),r&&(this.depthAttachment=new vn(e,o)),i.checkFramebufferStatus(i.FRAMEBUFFER)!==i.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){const e=this.context.gl,t=this.colorAttachment.get();if(t&&e.deleteTexture(t),this.depthAttachment){const t=this.depthAttachment.get();t&&e.deleteRenderbuffer(t)}e.deleteFramebuffer(this.framebuffer)}}class En{constructor(e,t,n){this.blendFunction=e,this.blendColor=t,this.mask=n}}En.Replace=[1,0],En.disabled=new En(En.Replace,e.Color.transparent,[!1,!1,!1,!1]),En.unblended=new En(En.Replace,e.Color.transparent,[!0,!0,!0,!0]),En.alphaBlended=new En([1,771],e.Color.transparent,[!0,!0,!0,!0]);class Sn{constructor(e){this.gl=e,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new Ut(this),this.clearDepth=new jt(this),this.clearStencil=new Gt(this),this.colorMask=new zt(this),this.depthMask=new Ht(this),this.stencilMask=new qt(this),this.stencilFunc=new Vt(this),this.stencilOp=new $t(this),this.stencilTest=new Kt(this),this.depthRange=new Wt(this),this.depthTest=new Yt(this),this.depthFunc=new Qt(this),this.blend=new Xt(this),this.blendFunc=new Zt(this),this.blendColor=new Jt(this),this.blendEquation=new en(this),this.cullFace=new tn(this),this.cullFaceSide=new nn(this),this.frontFace=new rn(this),this.program=new on(this),this.activeTexture=new an(this),this.viewport=new sn(this),this.bindFramebuffer=new ln(this),this.bindRenderbuffer=new cn(this),this.bindTexture=new un(this),this.bindVertexBuffer=new dn(this),this.bindElementBuffer=new hn(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new pn(this),this.pixelStoreUnpack=new mn(this),this.pixelStoreUnpackPremultiplyAlpha=new gn(this),this.pixelStoreUnpackFlipY=new fn(this),this.extTextureFilterAnisotropic=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=e.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=e.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&(e.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=e.getExtension("EXT_color_buffer_half_float")),this.extTimerQuery=e.getExtension("EXT_disjoint_timer_query"),this.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE)}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.extVertexArrayObject&&(this.bindVertexArrayOES.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(e,t){return new Mt(this,e,t)}createVertexBuffer(e,t,n){return new Lt(this,e,t,n)}createRenderbuffer(e,t,n){const r=this.gl,i=r.createRenderbuffer();return this.bindRenderbuffer.set(i),r.renderbufferStorage(r.RENDERBUFFER,e,t,n),this.bindRenderbuffer.set(null),i}createFramebuffer(e,t,n){return new yn(this,e,t,n)}clear({color:e,depth:t}){const n=this.gl;let r=0;e&&(r|=n.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),void 0!==t&&(r|=n.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(t),this.depthMask.set(!0)),n.clear(r)}setCullFace(e){!1===e.enable?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(e.mode),this.frontFace.set(e.frontFace))}setDepthMode(e){e.func!==this.gl.ALWAYS||e.mask?(this.depthTest.set(!0),this.depthFunc.set(e.func),this.depthMask.set(e.mask),this.depthRange.set(e.range)):this.depthTest.set(!1)}setStencilMode(e){e.test.func!==this.gl.ALWAYS||e.mask?(this.stencilTest.set(!0),this.stencilMask.set(e.mask),this.stencilOp.set([e.fail,e.depthFail,e.pass]),this.stencilFunc.set({func:e.test.func,ref:e.ref,mask:e.test.mask})):this.stencilTest.set(!1)}setColorMode(e){i(e.blendFunction,En.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)}unbindVAO(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)}}class wn{constructor(e,t,n){this.func=e,this.mask=t,this.range=n}}wn.ReadOnly=!1,wn.ReadWrite=!0,wn.disabled=new wn(519,wn.ReadOnly,[0,1]);const Tn=7680;class Cn{constructor(e,t,n,r,i,o){this.test=e,this.ref=t,this.mask=n,this.fail=r,this.depthFail=i,this.pass=o}}Cn.disabled=new Cn({func:519,mask:0},0,0,Tn,Tn,Tn);class xn{constructor(e,t,n){this.enable=e,this.mode=t,this.frontFace=n}}let Fn;function Dn(t,n,r,i,o,a,s){const l=t.context,c=l.gl,u=t.useProgram("collisionBox"),d=[];let h=0,p=0;for(let m=0;m<i.length;m++){const g=i[m],f=n.getTile(g),_=f.getBucket(r);if(!_)continue;let b=g.posMatrix;0===o[0]&&0===o[1]||(b=t.translatePosMatrix(g.posMatrix,f,o,a));const v=s?_.textCollisionBox:_.iconCollisionBox,y=_.collisionCircleArray;if(y.length>0){const n=e.create(),r=b;e.mul(n,_.placementInvProjMatrix,t.transform.glCoordMatrix),e.mul(n,n,_.placementViewportMatrix),d.push({circleArray:y,circleOffset:p,transform:r,invTransform:n,coord:g}),h+=y.length/4,p=h}v&&u.draw(l,c.LINES,wn.disabled,Cn.disabled,t.colorModeForRenderPass(),xn.disabled,ft(b,t.transform,f),t.style.terrain&&t.style.terrain.getTerrainData(g),r.id,v.layoutVertexBuffer,v.indexBuffer,v.segments,null,t.transform.zoom,null,null,v.collisionVertexBuffer)}if(!s||!d.length)return;const m=t.useProgram("collisionCircle"),g=new e.CollisionCircleLayoutArray;g.resize(4*h),g._trim();let f=0;for(const e of d)for(let t=0;t<e.circleArray.length/4;t++){const n=4*t,r=e.circleArray[n+0],i=e.circleArray[n+1],o=e.circleArray[n+2],a=e.circleArray[n+3];g.emplace(f++,r,i,o,a,0),g.emplace(f++,r,i,o,a,1),g.emplace(f++,r,i,o,a,2),g.emplace(f++,r,i,o,a,3)}(!Fn||Fn.length<2*h)&&(Fn=function(t){const n=2*t,r=new e.QuadTriangleArray;r.resize(n),r._trim();for(let e=0;e<n;e++){const t=6*e;r.uint16[t+0]=4*e+0,r.uint16[t+1]=4*e+1,r.uint16[t+2]=4*e+2,r.uint16[t+3]=4*e+2,r.uint16[t+4]=4*e+3,r.uint16[t+5]=4*e+0}return r}(h));const _=l.createIndexBuffer(Fn,!0),b=l.createVertexBuffer(g,e.collisionCircleLayout.members,!0);for(const n of d){const i={u_matrix:n.transform,u_inv_matrix:n.invTransform,u_camera_to_center_distance:(v=t.transform).cameraToCenterDistance,u_viewport_size:[v.width,v.height]};m.draw(l,c.TRIANGLES,wn.disabled,Cn.disabled,t.colorModeForRenderPass(),xn.disabled,i,t.style.terrain&&t.style.terrain.getTerrainData(n.coord),r.id,b,_,e.SegmentVector.simpleSegment(0,2*n.circleOffset,n.circleArray.length,n.circleArray.length/2),null,t.transform.zoom,null,null,null)}var v;b.destroy(),_.destroy()}xn.disabled=new xn(!1,1029,2305),xn.backCCW=new xn(!0,1029,2305);const kn=e.identity(new Float32Array(16));function On(t,n,r,i,o,a){const{horizontalAlign:s,verticalAlign:l}=e.getAnchorAlignment(t),c=-(s-.5)*n,u=-(l-.5)*r,d=e.evaluateVariableOffset(t,i);return new e.pointGeometry((c/o+d[0])*a,(u/o+d[1])*a)}function In(t,n,r,i,o,a,s,l,c,u,d){const h=t.text.placedSymbolArray,p=t.text.dynamicLayoutVertexArray,m=t.icon.dynamicLayoutVertexArray,g={};p.clear();for(let m=0;m<h.length;m++){const f=h.get(m),_=t.allowVerticalPlacement&&!f.placedOrientation,b=f.hidden||!f.crossTileID||_?null:i[f.crossTileID];if(b){const i=new e.pointGeometry(f.anchorX,f.anchorY),h=se(i,r?s:a,d),m=le(o.cameraToCenterDistance,h.signedDistanceFromCamera);let _=e.evaluateSizeForFeature(t.textSizeData,c,f)*m/e.ONE_EM;r&&(_*=t.tilePixelRatio/l);const{width:v,height:y,anchor:E,textOffset:S,textBoxScale:w}=b,T=On(E,v,y,S,w,_),C=r?se(i.add(T),a,d).point:h.point.add(n?T.rotate(-o.angle):T),x=t.allowVerticalPlacement&&f.placedOrientation===e.WritingMode.vertical?Math.PI/2:0;for(let t=0;t<f.numGlyphs;t++)e.addDynamicAttributes(p,C,x);u&&f.associatedIconIndex>=0&&(g[f.associatedIconIndex]={shiftedAnchor:C,angle:x})}else _e(f.numGlyphs,p)}if(u){m.clear();const n=t.icon.placedSymbolArray;for(let t=0;t<n.length;t++){const r=n.get(t);if(r.hidden)_e(r.numGlyphs,m);else{const n=g[t];if(n)for(let t=0;t<r.numGlyphs;t++)e.addDynamicAttributes(m,n.shiftedAnchor,n.angle);else _e(r.numGlyphs,m)}}t.icon.dynamicLayoutVertexBuffer.updateData(m)}t.text.dynamicLayoutVertexBuffer.updateData(p)}function An(e,t,n){return n.iconsInText&&t?"symbolTextAndIcon":e?"symbolSDF":"symbolIcon"}function Rn(t,n,r,i,o,a,s,l,c,u,d,h){const p=t.context,m=p.gl,g=t.transform,f="map"===l,_="map"===c,b="viewport"!==l&&"point"!==r.layout.get("symbol-placement"),v=f&&!_&&!b,y=!r.layout.get("symbol-sort-key").isConstant();let E=!1;const S=t.depthModeForSublayer(0,wn.ReadOnly),w=r.layout.get("text-variable-anchor"),T=[];for(const l of i){const i=n.getTile(l),c=i.getBucket(r);if(!c)continue;const d=o?c.text:c.icon;if(!d||!d.segments.get().length)continue;const h=d.programConfigurations.get(r.id),p=o||c.sdfIcons,S=o?c.textSizeData:c.iconSizeData,C=_||0!==g.pitch,x=t.useProgram(An(p,o,c),h),F=e.evaluateSizeForZoom(S,g.zoom),D=t.style.terrain&&t.style.terrain.getTerrainData(l);let k,O,I,A,R=[0,0],N=null;if(o){if(O=i.glyphAtlasTexture,I=m.LINEAR,k=i.glyphAtlasTexture.size,c.iconsInText){R=i.imageAtlasTexture.size,N=i.imageAtlasTexture;const e="composite"===S.kind||"camera"===S.kind;A=C||t.options.rotating||t.options.zooming||e?m.LINEAR:m.NEAREST}}else{const e=1!==r.layout.get("icon-size").constantOr(0)||c.iconsNeedLinear;O=i.imageAtlasTexture,I=p||t.options.rotating||t.options.zooming||e||C?m.LINEAR:m.NEAREST,k=i.imageAtlasTexture.size}const M=Ee(i,1,t.transform.zoom),P=oe(l.posMatrix,_,f,t.transform,M),L=ae(l.posMatrix,_,f,t.transform,M),B=w&&c.hasTextData(),U="none"!==r.layout.get("icon-text-fit")&&B&&c.hasIconData();if(b){const e=t.style.terrain?(e,n)=>t.style.terrain.getElevation(l,e,n):null,n="map"===r.layout.get("text-rotation-alignment");ue(c,l.posMatrix,t,o,P,L,_,u,n,e)}const j=t.translatePosMatrix(l.posMatrix,i,a,s),G=b||o&&w||U?kn:P,z=t.translatePosMatrix(L,i,a,s,!0),H=p&&0!==r.paint.get(o?"text-halo-width":"icon-halo-width").constantOr(1);let q;q=p?c.iconsInText?It(S.kind,F,v,_,t,j,G,z,k,R):Ot(S.kind,F,v,_,t,j,G,z,o,k,!0):kt(S.kind,F,v,_,t,j,G,z,o,k);const V={program:x,buffers:d,uniformValues:q,atlasTexture:O,atlasTextureIcon:N,atlasInterpolation:I,atlasInterpolationIcon:A,isSDF:p,hasHalo:H};if(y&&c.canOverlap){E=!0;const t=d.segments.get();for(const n of t)T.push({segments:new e.SegmentVector([n]),sortKey:n.sortKey,state:V,terrainData:D})}else T.push({segments:d.segments,sortKey:0,state:V,terrainData:D})}E&&T.sort(((e,t)=>e.sortKey-t.sortKey));for(const e of T){const n=e.state;if(p.activeTexture.set(m.TEXTURE0),n.atlasTexture.bind(n.atlasInterpolation,m.CLAMP_TO_EDGE),n.atlasTextureIcon&&(p.activeTexture.set(m.TEXTURE1),n.atlasTextureIcon&&n.atlasTextureIcon.bind(n.atlasInterpolationIcon,m.CLAMP_TO_EDGE)),n.isSDF){const i=n.uniformValues;n.hasHalo&&(i.u_is_halo=1,Nn(n.buffers,e.segments,r,t,n.program,S,d,h,i,e.terrainData)),i.u_is_halo=0}Nn(n.buffers,e.segments,r,t,n.program,S,d,h,n.uniformValues,e.terrainData)}}function Nn(e,t,n,r,i,o,a,s,l,c){const u=r.context;i.draw(u,u.gl.TRIANGLES,o,a,s,xn.disabled,l,c,n.id,e.layoutVertexBuffer,e.indexBuffer,t,n.paint,r.transform.zoom,e.programConfigurations.get(n.id),e.dynamicLayoutVertexBuffer,e.opacityVertexBuffer)}function Mn(e,t,n,r,i,o,a){const s=e.context.gl,l=n.paint.get("fill-pattern"),c=l&&l.constantOr(1),u=n.getCrossfadeParameters();let d,h,p,m,g;a?(h=c&&!n.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",d=s.LINES):(h=c?"fillPattern":"fill",d=s.TRIANGLES);for(const f of r){const r=t.getTile(f);if(c&&!r.patternsLoaded())continue;const _=r.getBucket(n);if(!_)continue;const b=_.programConfigurations.get(n.id),v=e.useProgram(h,b),y=e.style.terrain&&e.style.terrain.getTerrainData(f);c&&(e.context.activeTexture.set(s.TEXTURE0),r.imageAtlasTexture.bind(s.LINEAR,s.CLAMP_TO_EDGE),b.updatePaintBuffers(u));const E=l.constantOr(null);if(E&&r.imageAtlas){const e=r.imageAtlas,t=e.patternPositions[E.to.toString()],n=e.patternPositions[E.from.toString()];t&&n&&b.setConstantPatternPositions(t,n)}const S=y?f:null,w=e.translatePosMatrix(S?S.posMatrix:f.posMatrix,r,n.paint.get("fill-translate"),n.paint.get("fill-translate-anchor"));if(a){m=_.indexBuffer2,g=_.segments2;const t=[s.drawingBufferWidth,s.drawingBufferHeight];p="fillOutlinePattern"===h&&c?mt(w,e,u,r,t):pt(w,t)}else m=_.indexBuffer,g=_.segments,p=c?ht(w,e,u,r):dt(w);v.draw(e.context,d,i,e.stencilModeForClipping(f),o,xn.disabled,p,y,n.id,_.layoutVertexBuffer,m,g,n.paint,e.transform.zoom,b)}}function Pn(e,t,n,r,i,o,a){const s=e.context,l=s.gl,c=n.paint.get("fill-extrusion-pattern"),u=c.constantOr(1),d=n.getCrossfadeParameters(),h=n.paint.get("fill-extrusion-opacity");for(const p of r){const r=t.getTile(p),m=r.getBucket(n);if(!m)continue;const g=e.style.terrain&&e.style.terrain.getTerrainData(p),f=m.programConfigurations.get(n.id),_=e.useProgram(u?"fillExtrusionPattern":"fillExtrusion",f);u&&(e.context.activeTexture.set(l.TEXTURE0),r.imageAtlasTexture.bind(l.LINEAR,l.CLAMP_TO_EDGE),f.updatePaintBuffers(d));const b=c.constantOr(null);if(b&&r.imageAtlas){const e=r.imageAtlas,t=e.patternPositions[b.to.toString()],n=e.patternPositions[b.from.toString()];t&&n&&f.setConstantPatternPositions(t,n)}const v=e.translatePosMatrix(p.posMatrix,r,n.paint.get("fill-extrusion-translate"),n.paint.get("fill-extrusion-translate-anchor")),y=n.paint.get("fill-extrusion-vertical-gradient"),E=u?ut(v,e,y,h,p,d,r):ct(v,e,y,h);_.draw(s,s.gl.TRIANGLES,i,o,a,xn.backCCW,E,g,n.id,m.layoutVertexBuffer,m.indexBuffer,m.segments,n.paint,e.transform.zoom,f,e.style.terrain&&m.centroidVertexBuffer)}}function Ln(e,t,n,r,i,o,a){const s=e.context,l=s.gl,c=n.fbo;if(!c)return;const u=e.useProgram("hillshade"),d=e.style.terrain&&e.style.terrain.getTerrainData(t);s.activeTexture.set(l.TEXTURE0),l.bindTexture(l.TEXTURE_2D,c.colorAttachment.get()),u.draw(s,l.TRIANGLES,i,o,a,xn.disabled,((e,t,n,r)=>{const i=n.paint.get("hillshade-shadow-color"),o=n.paint.get("hillshade-highlight-color"),a=n.paint.get("hillshade-accent-color");let s=n.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===n.paint.get("hillshade-illumination-anchor")&&(s-=e.transform.angle);const l=!e.options.moving;return{u_matrix:r?r.posMatrix:e.transform.calculatePosMatrix(t.tileID.toUnwrapped(),l),u_image:0,u_latrange:yt(0,t.tileID),u_light:[n.paint.get("hillshade-exaggeration"),s],u_shadow:i,u_highlight:o,u_accent:a}})(e,n,r,d?t:null),d,r.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments)}function Bn(t,n,r,i,o,a){const s=t.context,c=s.gl,u=n.dem;if(u&&u.data){const d=u.dim,h=u.stride,p=u.getPixels();if(s.activeTexture.set(c.TEXTURE1),s.pixelStoreUnpackPremultiplyAlpha.set(!1),n.demTexture=n.demTexture||t.getTileTexture(h),n.demTexture){const e=n.demTexture;e.update(p,{premultiply:!1}),e.bind(c.NEAREST,c.CLAMP_TO_EDGE)}else n.demTexture=new l(s,p,c.RGBA,{premultiply:!1}),n.demTexture.bind(c.NEAREST,c.CLAMP_TO_EDGE);s.activeTexture.set(c.TEXTURE0);let m=n.fbo;if(!m){const e=new l(s,{width:d,height:d,data:null},c.RGBA);e.bind(c.LINEAR,c.CLAMP_TO_EDGE),m=n.fbo=s.createFramebuffer(d,d,!0),m.colorAttachment.set(e.texture)}s.bindFramebuffer.set(m.framebuffer),s.viewport.set([0,0,d,d]),t.useProgram("hillshadePrepare").draw(s,c.TRIANGLES,i,o,a,xn.disabled,((t,n)=>{const r=n.stride,i=e.create();return e.ortho(i,0,e.EXTENT,-e.EXTENT,0,0,1),e.translate(i,i,[0,-e.EXTENT,0]),{u_matrix:i,u_image:1,u_dimension:[r,r],u_zoom:t.overscaledZ,u_unpack:n.getUnpackVector()}})(n.tileID,u),null,r.id,t.rasterBoundsBuffer,t.quadTriangleIndexBuffer,t.rasterBoundsSegments),n.needsHillshadePrepare=!1}}function Un(t,n,r,i,o,a){const s=i.paint.get("raster-fade-duration");if(!a&&s>0){const i=e.exported.now(),a=(i-t.timeAdded)/s,l=n?(i-n.timeAdded)/s:-1,c=r.getSource(),u=o.coveringZoomLevel({tileSize:c.tileSize,roundZoom:c.roundZoom}),d=!n||Math.abs(n.tileID.overscaledZ-u)>Math.abs(t.tileID.overscaledZ-u),h=d&&t.refreshedUponExpiration?1:e.clamp(d?a:1-l,0,1);return t.refreshedUponExpiration&&a>=1&&(t.refreshedUponExpiration=!1),n?{opacity:1,mix:1-h}:{opacity:h,mix:0}}return{opacity:1,mix:0}}const jn=new e.Color(1,0,0,1),Gn=new e.Color(0,1,0,1),zn=new e.Color(0,0,1,1),Hn=new e.Color(1,0,1,1),qn=new e.Color(0,1,1,1);function Vn(e,t,n,r){Kn(e,0,t+n/2,e.transform.width,n,r)}function $n(e,t,n,r){Kn(e,t-n/2,0,n,e.transform.height,r)}function Kn(e,t,n,r,i,o){const a=e.context,s=a.gl;s.enable(s.SCISSOR_TEST),s.scissor(t*e.pixelRatio,n*e.pixelRatio,r*e.pixelRatio,i*e.pixelRatio),a.clear({color:o}),s.disable(s.SCISSOR_TEST)}function Wn(t,n,r){const i=t.context,o=i.gl,a=r.posMatrix,s=t.useProgram("debug"),l=wn.disabled,c=Cn.disabled,u=t.colorModeForRenderPass(),d="$debug",h=t.style.terrain&&t.style.terrain.getTerrainData(r);i.activeTexture.set(o.TEXTURE0),t.emptyTexture.bind(o.LINEAR,o.CLAMP_TO_EDGE);const p=n.getTileByID(r.key).latestRawTileData,m=Math.floor((p&&p.byteLength||0)/1024),g=n.getTile(r).tileSize,f=512/Math.min(g,512)*(r.overscaledZ/t.transform.zoom)*.5;let _=r.canonical.toString();r.overscaledZ!==r.canonical.z&&(_+=` => ${r.overscaledZ}`),function(e,t){e.initDebugOverlayCanvas();const n=e.debugOverlayCanvas,r=e.context.gl,i=e.debugOverlayCanvas.getContext("2d");i.clearRect(0,0,n.width,n.height),i.shadowColor="white",i.shadowBlur=2,i.lineWidth=1.5,i.strokeStyle="white",i.textBaseline="top",i.font="bold 36px Open Sans, sans-serif",i.fillText(t,5,5),i.strokeText(t,5,5),e.debugOverlayTexture.update(n),e.debugOverlayTexture.bind(r.LINEAR,r.CLAMP_TO_EDGE)}(t,`${_} ${m}kB`),s.draw(i,o.TRIANGLES,l,c,En.alphaBlended,xn.disabled,_t(a,e.Color.transparent,f),null,d,t.debugBuffer,t.quadTriangleIndexBuffer,t.debugSegments),s.draw(i,o.LINE_STRIP,l,c,u,xn.disabled,_t(a,e.Color.red),h,d,t.debugBuffer,t.tileBorderIndexBuffer,t.debugSegments)}function Yn(e,t,n){const r=e.context,i=r.gl,o=e.colorModeForRenderPass(),a=new wn(i.LEQUAL,wn.ReadWrite,e.depthRangeFor3D),s=e.useProgram("terrain"),l=t.getTerrainMesh(),c=t.getTerrainData(n.tileID);r.bindFramebuffer.set(null),r.viewport.set([0,0,e.width,e.height]),r.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,t.getRTTFramebuffer().colorAttachment.get());const u=e.transform.calculatePosMatrix(n.tileID.toUnwrapped());s.draw(r,i.TRIANGLES,a,Cn.disabled,o,xn.backCCW,{u_matrix:u,u_texture:0},c,"terrain",l.vertexBuffer,l.indexBuffer,l.segments)}function Qn(e,t,n,r){const i=e.context,o=n.tileSize*t.qualityFactor;n.textures[r]||(n.textures[r]=e.getTileTexture(o)||new l(i,{width:o,height:o,data:null},i.gl.RGBA),n.textures[r].bind(i.gl.LINEAR,i.gl.CLAMP_TO_EDGE),0===r&&t.sourceCache.renderHistory.unshift(n.tileID.key));const a=t.getRTTFramebuffer();a.colorAttachment.set(n.textures[r].texture),i.bindFramebuffer.set(a.framebuffer),i.viewport.set([0,0,o,o])}class Xn{constructor(e){this._coordsDescendingInv={},this._coordsDescendingInvStr={},this.painter=e,this._renderToTexture={background:!0,fill:!0,line:!0,raster:!0},this._coordsDescendingInv={},this._coordsDescendingInvStr={},this._stacks=[],this._prevType=null,this._rerender={},this._renderableTiles=e.style.terrain.sourceCache.getRenderableTiles(),this._init()}_init(){const e=this.painter.style,t=e.terrain;for(const n in e.sourceCaches){this._coordsDescendingInv[n]={};const r=e.sourceCaches[n].getVisibleCoordinates();for(const e of r){const r=t.sourceCache.getTerrainCoords(e);for(const e in r)this._coordsDescendingInv[n][e]||(this._coordsDescendingInv[n][e]=[]),this._coordsDescendingInv[n][e].push(r[e])}}for(const t of e._order){const n=e._layers[t],r=n.source;if(this._renderToTexture[n.type]&&!this._coordsDescendingInvStr[r]){this._coordsDescendingInvStr[r]={};for(const e in this._coordsDescendingInv[r])this._coordsDescendingInvStr[r][e]=this._coordsDescendingInv[r][e].map((e=>e.key)).sort().join()}}return this._renderableTiles.forEach((e=>{for(const n in this._coordsDescendingInvStr){const r=this._coordsDescendingInvStr[n][e.tileID.key];r&&r!==e.textureCoords[n]&&e.clearTextures(this.painter),t.needsRerender(n,e.tileID)&&e.clearTextures(this.painter)}this._rerender[e.tileID.key]=!e.textures.length})),t.clearRerenderCache(),t.sourceCache.removeOutdated(this.painter),this}renderLayer(t){const n=t.type,r=this.painter,i=r.style._order,o=r.currentLayer,a=o+1===i.length;if(this._renderToTexture[n]&&(this._prevType&&this._renderToTexture[this._prevType]||this._stacks.push([]),this._prevType=n,this._stacks[this._stacks.length-1].push(i[o]),!a))return!0;if(this._renderToTexture[this._prevType]||"hillshade"===n||this._renderToTexture[n]&&a){this._prevType=n;const a=this._stacks.length-1,s=this._stacks[a]||[];for(const t of this._renderableTiles){if(Qn(r,r.style.terrain,t,a),this._rerender[t.tileID.key]){r.context.clear({color:e.Color.transparent});for(let e=0;e<s.length;e++){const n=r.style._layers[s[e]],i=n.source?this._coordsDescendingInv[n.source][t.tileID.key]:[t.tileID];r._renderTileClippingMasks(n,i),r.renderLayer(r,r.style.sourceCaches[n.source],n,i),n.source&&(t.textureCoords[n.source]=this._coordsDescendingInvStr[n.source][t.tileID.key])}}Yn(r,r.style.terrain,t)}if("hillshade"===n){this._stacks.push([i[o]]);for(const n of this._renderableTiles){const i=this._coordsDescendingInv[t.source][n.tileID.key];Qn(r,r.style.terrain,n,this._stacks.length-1),r.context.clear({color:e.Color.transparent}),r._renderTileClippingMasks(t,i),r.renderLayer(r,r.style.sourceCaches[t.source],t,i),Yn(r,r.style.terrain,n)}return!0}return this._renderToTexture[n]}return!1}}const Zn={symbol:function(t,n,r,i,o){if("translucent"!==t.renderPass)return;const a=Cn.disabled,s=t.colorModeForRenderPass();r.layout.get("text-variable-anchor")&&function(t,n,r,i,o,a,s){const l=n.transform,c="map"===o,u="map"===a;for(const o of t){const t=i.getTile(o),a=t.getBucket(r);if(!a||!a.text||!a.text.segments.get().length)continue;const d=e.evaluateSizeForZoom(a.textSizeData,l.zoom),h=Ee(t,1,n.transform.zoom),p=oe(o.posMatrix,u,c,n.transform,h),m="none"!==r.layout.get("icon-text-fit")&&a.hasIconData();if(d){const e=Math.pow(2,l.zoom-t.tileID.overscaledZ);In(a,c,u,s,l,p,o.posMatrix,e,d,m,n.style.terrain?(e,t)=>n.style.terrain.getElevation(o,e,t):null)}}}(i,t,r,n,r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),o),0!==r.paint.get("icon-opacity").constantOr(1)&&Rn(t,n,r,i,!1,r.paint.get("icon-translate"),r.paint.get("icon-translate-anchor"),r.layout.get("icon-rotation-alignment"),r.layout.get("icon-pitch-alignment"),r.layout.get("icon-keep-upright"),a,s),0!==r.paint.get("text-opacity").constantOr(1)&&Rn(t,n,r,i,!0,r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),r.layout.get("text-keep-upright"),a,s),n.map.showCollisionBoxes&&(Dn(t,n,r,i,r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),!0),Dn(t,n,r,i,r.paint.get("icon-translate"),r.paint.get("icon-translate-anchor"),!1))},circle:function(t,n,r,i){if("translucent"!==t.renderPass)return;const o=r.paint.get("circle-opacity"),a=r.paint.get("circle-stroke-width"),s=r.paint.get("circle-stroke-opacity"),l=!r.layout.get("circle-sort-key").isConstant();if(0===o.constantOr(1)&&(0===a.constantOr(1)||0===s.constantOr(1)))return;const c=t.context,u=c.gl,d=t.depthModeForSublayer(0,wn.ReadOnly),h=Cn.disabled,p=t.colorModeForRenderPass(),m=[];for(let o=0;o<i.length;o++){const a=i[o],s=n.getTile(a),c=s.getBucket(r);if(!c)continue;const u=c.programConfigurations.get(r.id),d=t.useProgram("circle",u),h=c.layoutVertexBuffer,p=c.indexBuffer,g=t.style.terrain&&t.style.terrain.getTerrainData(a),f={programConfiguration:u,program:d,layoutVertexBuffer:h,indexBuffer:p,uniformValues:gt(t,a,s,r),terrainData:g};if(l){const t=c.segments.get();for(const n of t)m.push({segments:new e.SegmentVector([n]),sortKey:n.sortKey,state:f})}else m.push({segments:c.segments,sortKey:0,state:f})}l&&m.sort(((e,t)=>e.sortKey-t.sortKey));for(const e of m){const{programConfiguration:n,program:i,layoutVertexBuffer:o,indexBuffer:a,uniformValues:s,terrainData:l}=e.state;i.draw(c,u.TRIANGLES,d,h,p,xn.disabled,s,l,r.id,o,a,e.segments,r.paint,t.transform.zoom,n)}},heatmap:function(t,n,r,i){if(0!==r.paint.get("heatmap-opacity"))if("offscreen"===t.renderPass){const o=t.context,a=o.gl,s=Cn.disabled,l=new En([a.ONE,a.ONE],e.Color.transparent,[!0,!0,!0,!0]);!function(e,t,n){const r=e.gl;e.activeTexture.set(r.TEXTURE1),e.viewport.set([0,0,t.width/4,t.height/4]);let i=n.heatmapFbo;if(i)r.bindTexture(r.TEXTURE_2D,i.colorAttachment.get()),e.bindFramebuffer.set(i.framebuffer);else{const o=r.createTexture();r.bindTexture(r.TEXTURE_2D,o),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.LINEAR),i=n.heatmapFbo=e.createFramebuffer(t.width/4,t.height/4,!1),function(e,t,n,r){const i=e.gl;i.texImage2D(i.TEXTURE_2D,0,i.RGBA,t.width/4,t.height/4,0,i.RGBA,e.extRenderToTextureHalfFloat?e.extTextureHalfFloat.HALF_FLOAT_OES:i.UNSIGNED_BYTE,null),r.colorAttachment.set(n)}(e,t,o,i)}}(o,t,r),o.clear({color:e.Color.transparent});for(let e=0;e<i.length;e++){const c=i[e];if(n.hasRenderableParent(c))continue;const u=n.getTile(c),d=u.getBucket(r);if(!d)continue;const h=d.programConfigurations.get(r.id),p=t.useProgram("heatmap",h),{zoom:m}=t.transform;p.draw(o,a.TRIANGLES,wn.disabled,s,l,xn.disabled,vt(c.posMatrix,u,m,r.paint.get("heatmap-intensity")),null,r.id,d.layoutVertexBuffer,d.indexBuffer,d.segments,r.paint,t.transform.zoom,h)}o.viewport.set([0,0,t.width,t.height])}else"translucent"===t.renderPass&&(t.context.setColorMode(t.colorModeForRenderPass()),function(t,n){const r=t.context,i=r.gl,o=n.heatmapFbo;if(!o)return;r.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,o.colorAttachment.get()),r.activeTexture.set(i.TEXTURE1);let a=n.colorRampTexture;a||(a=n.colorRampTexture=new l(r,n.colorRamp,i.RGBA)),a.bind(i.LINEAR,i.CLAMP_TO_EDGE),t.useProgram("heatmapTexture").draw(r,i.TRIANGLES,wn.disabled,Cn.disabled,t.colorModeForRenderPass(),xn.disabled,((t,n,r,i)=>{const o=e.create();e.ortho(o,0,t.width,t.height,0,0,1);const a=t.context.gl;return{u_matrix:o,u_world:[a.drawingBufferWidth,a.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:n.paint.get("heatmap-opacity")}})(t,n),null,n.id,t.viewportBuffer,t.quadTriangleIndexBuffer,t.viewportSegments,n.paint,t.transform.zoom)}(t,r))},line:function(t,n,r,i){if("translucent"!==t.renderPass)return;const o=r.paint.get("line-opacity"),a=r.paint.get("line-width");if(0===o.constantOr(1)||0===a.constantOr(1))return;const s=t.depthModeForSublayer(0,wn.ReadOnly),c=t.colorModeForRenderPass(),u=r.paint.get("line-dasharray"),d=r.paint.get("line-pattern"),h=d.constantOr(1),p=r.paint.get("line-gradient"),m=r.getCrossfadeParameters(),g=h?"linePattern":u?"lineSDF":p?"lineGradient":"line",f=t.context,_=f.gl;let b=!0;for(const o of i){const i=n.getTile(o);if(h&&!i.patternsLoaded())continue;const a=i.getBucket(r);if(!a)continue;const v=a.programConfigurations.get(r.id),y=t.context.program.get(),E=t.useProgram(g,v),S=b||E.program!==y,w=t.style.terrain&&t.style.terrain.getTerrainData(o),T=d.constantOr(null);if(T&&i.imageAtlas){const e=i.imageAtlas,t=e.patternPositions[T.to.toString()],n=e.patternPositions[T.from.toString()];t&&n&&v.setConstantPatternPositions(t,n)}const C=w?o:null,x=h?wt(t,i,r,m,C):u?Tt(t,i,r,u,m,C):p?St(t,i,r,a.lineClipsArray.length,C):Et(t,i,r,C);if(h)f.activeTexture.set(_.TEXTURE0),i.imageAtlasTexture.bind(_.LINEAR,_.CLAMP_TO_EDGE),v.updatePaintBuffers(m);else if(u&&(S||t.lineAtlas.dirty))f.activeTexture.set(_.TEXTURE0),t.lineAtlas.bind(f);else if(p){const i=a.gradients[r.id];let s=i.texture;if(r.gradientVersion!==i.version){let c=256;if(r.stepInterpolant){const r=n.getSource().maxzoom,i=o.canonical.z===r?Math.ceil(1<<t.transform.maxZoom-o.canonical.z):1;c=e.clamp(e.nextPowerOfTwo(a.maxLineLength/e.EXTENT*1024*i),256,f.maxTextureSize)}i.gradient=e.renderColorRamp({expression:r.gradientExpression(),evaluationKey:"lineProgress",resolution:c,image:i.gradient||void 0,clips:a.lineClipsArray}),i.texture?i.texture.update(i.gradient):i.texture=new l(f,i.gradient,_.RGBA),i.version=r.gradientVersion,s=i.texture}f.activeTexture.set(_.TEXTURE0),s.bind(r.stepInterpolant?_.NEAREST:_.LINEAR,_.CLAMP_TO_EDGE)}E.draw(f,_.TRIANGLES,s,t.stencilModeForClipping(o),c,xn.disabled,x,w,r.id,a.layoutVertexBuffer,a.indexBuffer,a.segments,r.paint,t.transform.zoom,v,a.layoutVertexBuffer2),b=!1}},fill:function(t,n,r,i){const o=r.paint.get("fill-color"),a=r.paint.get("fill-opacity");if(0===a.constantOr(1))return;const s=t.colorModeForRenderPass(),l=r.paint.get("fill-pattern"),c=t.opaquePassEnabledForLayer()&&!l.constantOr(1)&&1===o.constantOr(e.Color.transparent).a&&1===a.constantOr(0)?"opaque":"translucent";if(t.renderPass===c){const e=t.depthModeForSublayer(1,"opaque"===t.renderPass?wn.ReadWrite:wn.ReadOnly);Mn(t,n,r,i,e,s,!1)}if("translucent"===t.renderPass&&r.paint.get("fill-antialias")){const e=t.depthModeForSublayer(r.getPaintProperty("fill-outline-color")?2:0,wn.ReadOnly);Mn(t,n,r,i,e,s,!0)}},"fill-extrusion":function(e,t,n,r){const i=n.paint.get("fill-extrusion-opacity");if(0!==i&&"translucent"===e.renderPass){const o=new wn(e.context.gl.LEQUAL,wn.ReadWrite,e.depthRangeFor3D);if(1!==i||n.paint.get("fill-extrusion-pattern").constantOr(1))Pn(e,t,n,r,o,Cn.disabled,En.disabled),Pn(e,t,n,r,o,e.stencilModeFor3D(),e.colorModeForRenderPass());else{const i=e.colorModeForRenderPass();Pn(e,t,n,r,o,Cn.disabled,i)}}},hillshade:function(e,t,n,r){if("offscreen"!==e.renderPass&&"translucent"!==e.renderPass)return;const i=e.context,o=e.depthModeForSublayer(0,wn.ReadOnly),a=e.colorModeForRenderPass(),[s,l]="translucent"===e.renderPass?e.stencilConfigForOverlap(r):[{},r];for(const r of l){const i=t.getTile(r);void 0!==i.needsHillshadePrepare&&i.needsHillshadePrepare&&"offscreen"===e.renderPass?Bn(e,i,n,o,Cn.disabled,a):"translucent"===e.renderPass&&Ln(e,r,i,n,o,s[r.overscaledZ],a)}i.viewport.set([0,0,e.width,e.height])},raster:function(e,t,n,r){if("translucent"!==e.renderPass)return;if(0===n.paint.get("raster-opacity"))return;if(!r.length)return;const i=e.context,o=i.gl,a=t.getSource(),s=e.useProgram("raster"),l=e.colorModeForRenderPass(),[c,u]=a instanceof D?[{},r]:e.stencilConfigForOverlap(r),d=u[u.length-1].overscaledZ,h=!e.options.moving;for(const r of u){const u=e.depthModeForSublayer(r.overscaledZ-d,1===n.paint.get("raster-opacity")?wn.ReadWrite:wn.ReadOnly,o.LESS),p=t.getTile(r);p.registerFadeDuration(n.paint.get("raster-fade-duration"));const m=t.findLoadedParent(r,0),g=Un(p,m,t,n,e.transform,e.style.terrain);let f,_;const b="nearest"===n.paint.get("raster-resampling")?o.NEAREST:o.LINEAR;i.activeTexture.set(o.TEXTURE0),p.texture.bind(b,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),i.activeTexture.set(o.TEXTURE1),m?(m.texture.bind(b,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),f=Math.pow(2,m.tileID.overscaledZ-p.tileID.overscaledZ),_=[p.tileID.canonical.x*f%1,p.tileID.canonical.y*f%1]):p.texture.bind(b,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST);const v=e.style.terrain&&e.style.terrain.getTerrainData(r),y=v?r:null,E=y?y.posMatrix:e.transform.calculatePosMatrix(r.toUnwrapped(),h),S=Ft(E,_||[0,0],f||1,g,n);a instanceof D?s.draw(i,o.TRIANGLES,u,Cn.disabled,l,xn.disabled,S,v,n.id,a.boundsBuffer,e.quadTriangleIndexBuffer,a.boundsSegments):s.draw(i,o.TRIANGLES,u,c[r.overscaledZ],l,xn.disabled,S,v,n.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments)}},background:function(e,t,n,r){const i=n.paint.get("background-color"),o=n.paint.get("background-opacity");if(0===o)return;const a=e.context,s=a.gl,l=e.transform,c=l.tileSize,u=n.paint.get("background-pattern");if(e.isPatternMissing(u))return;const d=!u&&1===i.a&&1===o&&e.opaquePassEnabledForLayer()?"opaque":"translucent";if(e.renderPass!==d)return;const h=Cn.disabled,p=e.depthModeForSublayer(0,"opaque"===d?wn.ReadWrite:wn.ReadOnly),m=e.colorModeForRenderPass(),g=e.useProgram(u?"backgroundPattern":"background"),f=r||l.coveringTiles({tileSize:c,terrain:e.style.terrain});u&&(a.activeTexture.set(s.TEXTURE0),e.imageManager.bind(e.context));const _=n.getCrossfadeParameters();for(const t of f){const l=r?t.posMatrix:e.transform.calculatePosMatrix(t.toUnwrapped()),d=u?Rt(l,o,e,u,{tileID:t,tileSize:c},_):At(l,o,i),f=e.style.terrain&&e.style.terrain.getTerrainData(t);g.draw(a,s.TRIANGLES,p,h,m,xn.disabled,d,f,n.id,e.tileExtentBuffer,e.quadTriangleIndexBuffer,e.tileExtentSegments)}},debug:function(e,t,n){for(let r=0;r<n.length;r++)Wn(e,t,n[r])},custom:function(e,t,n){const r=e.context,i=n.implementation;if("offscreen"===e.renderPass){const t=i.prerender;t&&(e.setCustomLayerDefaults(),r.setColorMode(e.colorModeForRenderPass()),t.call(i,r.gl,e.transform.customLayerMatrix()),r.setDirty(),e.setBaseState())}else if("translucent"===e.renderPass){e.setCustomLayerDefaults(),r.setColorMode(e.colorModeForRenderPass()),r.setStencilMode(Cn.disabled);const t="3d"===i.renderingMode?new wn(e.context.gl.LEQUAL,wn.ReadWrite,e.depthRangeFor3D):e.depthModeForSublayer(0,wn.ReadOnly);r.setDepthMode(t),i.render(r.gl,e.transform.customLayerMatrix()),r.setDirty(),e.setBaseState(),r.bindFramebuffer.set(null)}}};class Jn{constructor(t,n){this.context=new Sn(t),this.transform=n,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:e.create(),renderTime:0},this.setup(),this.numSublayers=B.maxUnderzooming+B.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Ke,this.gpuTimers={}}resize(e,t,n){if(this.width=e*n,this.height=t*n,this.pixelRatio=n,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const e of this.style._order)this.style._layers[e].resize()}setup(){const t=this.context,n=new e.PosArray;n.emplaceBack(0,0),n.emplaceBack(e.EXTENT,0),n.emplaceBack(0,e.EXTENT),n.emplaceBack(e.EXTENT,e.EXTENT),this.tileExtentBuffer=t.createVertexBuffer(n,We.members),this.tileExtentSegments=e.SegmentVector.simpleSegment(0,0,4,2);const r=new e.PosArray;r.emplaceBack(0,0),r.emplaceBack(e.EXTENT,0),r.emplaceBack(0,e.EXTENT),r.emplaceBack(e.EXTENT,e.EXTENT),this.debugBuffer=t.createVertexBuffer(r,We.members),this.debugSegments=e.SegmentVector.simpleSegment(0,0,4,5);const i=new e.RasterBoundsArray;i.emplaceBack(0,0,0,0),i.emplaceBack(e.EXTENT,0,e.EXTENT,0),i.emplaceBack(0,e.EXTENT,0,e.EXTENT),i.emplaceBack(e.EXTENT,e.EXTENT,e.EXTENT,e.EXTENT),this.rasterBoundsBuffer=t.createVertexBuffer(i,F.members),this.rasterBoundsSegments=e.SegmentVector.simpleSegment(0,0,4,2);const o=new e.PosArray;o.emplaceBack(0,0),o.emplaceBack(1,0),o.emplaceBack(0,1),o.emplaceBack(1,1),this.viewportBuffer=t.createVertexBuffer(o,We.members),this.viewportSegments=e.SegmentVector.simpleSegment(0,0,4,2);const a=new e.LineStripIndexArray;a.emplaceBack(0),a.emplaceBack(1),a.emplaceBack(3),a.emplaceBack(2),a.emplaceBack(0),this.tileBorderIndexBuffer=t.createIndexBuffer(a);const s=new e.TriangleIndexArray;s.emplaceBack(0,1,2),s.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=t.createIndexBuffer(s),this.emptyTexture=new l(t,{width:1,height:1,data:new Uint8Array([0,0,0,0])},t.gl.RGBA);const c=this.context.gl;this.stencilClearMode=new Cn({func:c.ALWAYS,mask:0},0,255,c.ZERO,c.ZERO,c.ZERO)}clearStencil(){const t=this.context,n=t.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const r=e.create();e.ortho(r,0,this.width,this.height,0,0,1),e.scale(r,r,[n.drawingBufferWidth,n.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(t,n.TRIANGLES,wn.disabled,this.stencilClearMode,En.disabled,xn.disabled,bt(r),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(e,t){if(this.currentStencilSource===e.source||!e.isTileClipped()||!t||!t.length)return;this.currentStencilSource=e.source;const n=this.context,r=n.gl;this.nextStencilID+t.length>256&&this.clearStencil(),n.setColorMode(En.disabled),n.setDepthMode(wn.disabled);const i=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const e of t){const t=this._tileClippingMaskIDs[e.key]=this.nextStencilID++,o=this.style.terrain&&this.style.terrain.getTerrainData(e);i.draw(n,r.TRIANGLES,wn.disabled,new Cn({func:r.ALWAYS,mask:0},t,255,r.KEEP,r.KEEP,r.REPLACE),En.disabled,xn.disabled,bt(e.posMatrix),o,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const e=this.nextStencilID++,t=this.context.gl;return new Cn({func:t.NOTEQUAL,mask:255},e,255,t.KEEP,t.KEEP,t.REPLACE)}stencilModeForClipping(e){const t=this.context.gl;return new Cn({func:t.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,t.KEEP,t.KEEP,t.REPLACE)}stencilConfigForOverlap(e){const t=this.context.gl,n=e.sort(((e,t)=>t.overscaledZ-e.overscaledZ)),r=n[n.length-1].overscaledZ,i=n[0].overscaledZ-r+1;if(i>1){this.currentStencilSource=void 0,this.nextStencilID+i>256&&this.clearStencil();const e={};for(let n=0;n<i;n++)e[n+r]=new Cn({func:t.GEQUAL,mask:255},n+this.nextStencilID,255,t.KEEP,t.KEEP,t.REPLACE);return this.nextStencilID+=i,[e,n]}return[{[r]:Cn.disabled},n]}colorModeForRenderPass(){const t=this.context.gl;if(this._showOverdrawInspector){const n=1/8;return new En([t.CONSTANT_COLOR,t.ONE],new e.Color(n,n,n,0),[!0,!0,!0,!0])}return"opaque"===this.renderPass?En.unblended:En.alphaBlended}depthModeForSublayer(e,t,n){if(!this.opaquePassEnabledForLayer())return wn.disabled;const r=1-((1+this.currentLayer)*this.numSublayers+e)*this.depthEpsilon;return new wn(n||this.context.gl.LEQUAL,t,[r,r])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(t,n){this.style=t,this.options=n,this.lineAtlas=t.lineAtlas,this.imageManager=t.imageManager,this.glyphManager=t.glyphManager,this.symbolFadeChange=t.placement.symbolFadeChange(e.exported.now()),this.imageManager.beginFrame();const r=this.style._order,i=this.style.sourceCaches,o=this.style.terrain&&new Xn(this);for(const e in i){const t=i[e];t.used&&t.prepare(this.context)}const a={},s={},l={};for(const e in i){const t=i[e];a[e]=t.getVisibleCoordinates(),s[e]=a[e].slice().reverse(),l[e]=t.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let e=0;e<r.length;e++)if(this.style._layers[r[e]].is3D()){this.opaquePassCutoff=e;break}if(o){this.opaquePassCutoff=0;const t=this.style.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime);(this.terrainFacilitator.dirty||!e.equals(this.terrainFacilitator.matrix,this.transform.projMatrix)||t.length)&&(e.copy(this.terrainFacilitator.matrix,this.transform.projMatrix),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(t,n){const r=t.context,i=r.gl,o=En.unblended,a=new wn(i.LEQUAL,wn.ReadWrite,[0,1]),s=n.getTerrainMesh(),l=n.sourceCache.getRenderableTiles(),c=t.useProgram("terrainDepth");r.bindFramebuffer.set(n.getFramebuffer("depth").framebuffer),r.viewport.set([0,0,t.width/devicePixelRatio,t.height/devicePixelRatio]),r.clear({color:e.Color.transparent,depth:1});for(const e of l){const l=n.getTerrainData(e.tileID),u=t.transform.calculatePosMatrix(e.tileID.toUnwrapped());c.draw(r,i.TRIANGLES,a,Cn.disabled,o,xn.backCCW,{u_matrix:u},l,"terrain",s.vertexBuffer,s.indexBuffer,s.segments)}r.bindFramebuffer.set(null),r.viewport.set([0,0,t.width,t.height])}(this,this.style.terrain),function(t,n){const r=t.context,i=r.gl,o=En.unblended,a=new wn(i.LEQUAL,wn.ReadWrite,[0,1]),s=n.getTerrainMesh(),l=n.getCoordsTexture(),c=n.sourceCache.getRenderableTiles(),u=t.useProgram("terrainCoords");r.bindFramebuffer.set(n.getFramebuffer("coords").framebuffer),r.viewport.set([0,0,t.width/devicePixelRatio,t.height/devicePixelRatio]),r.clear({color:e.Color.transparent,depth:1}),n.coordsIndex=[];for(const e of c){const c=n.getTerrainData(e.tileID);r.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,l.texture);const d=t.transform.calculatePosMatrix(e.tileID.toUnwrapped());u.draw(r,i.TRIANGLES,a,Cn.disabled,o,xn.backCCW,{u_matrix:d,u_terrain_coords_id:(255-n.coordsIndex.length)/255,u_texture:0},c,"terrain",s.vertexBuffer,s.indexBuffer,s.segments),n.coordsIndex.push(e.tileID.key)}r.bindFramebuffer.set(null),r.viewport.set([0,0,t.width,t.height])}(this,this.style.terrain))}this.renderPass="offscreen";for(const e of r){const t=this.style._layers[e];if(!t.hasOffscreenPass()||t.isHidden(this.transform.zoom))continue;const n=s[t.source];("custom"===t.type||n.length)&&this.renderLayer(this,i[t.source],t,n)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:n.showOverdrawInspector?e.Color.black:e.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=n.showOverdrawInspector,this.depthRangeFor3D=[0,1-(t._order.length+2)*this.numSublayers*this.depthEpsilon],!o)for(this.renderPass="opaque",this.currentLayer=r.length-1;this.currentLayer>=0;this.currentLayer--){const e=this.style._layers[r[this.currentLayer]],t=i[e.source],n=a[e.source];this._renderTileClippingMasks(e,n),this.renderLayer(this,t,e,n)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<r.length;this.currentLayer++){const e=this.style._layers[r[this.currentLayer]],t=i[e.source];if(o&&o.renderLayer(e))continue;const n=("symbol"===e.type?l:s)[e.source];this._renderTileClippingMasks(e,a[e.source]),this.renderLayer(this,t,e,n)}if(this.options.showTileBoundaries){let e,t;Object.values(this.style._layers).forEach((n=>{n.source&&!n.isHidden(this.transform.zoom)&&(n.source!==(t&&t.id)&&(t=this.style.sourceCaches[n.source]),(!e||e.getSource().maxzoom<t.getSource().maxzoom)&&(e=t))})),e&&Zn.debug(this,e,e.getVisibleCoordinates())}this.options.showPadding&&function(e){const t=e.transform.padding;Vn(e,e.transform.height-(t.top||0),3,jn),Vn(e,t.bottom||0,3,Gn),$n(e,t.left||0,3,zn),$n(e,e.transform.width-(t.right||0),3,Hn);const n=e.transform.centerPoint;!function(e,t,n,r){Kn(e,t-1,n-10,2,20,r),Kn(e,t-10,n-1,20,2,r)}(e,n.x,e.transform.height-n.y,qn)}(this),this.context.setDefault()}renderLayer(e,t,n,r){n.isHidden(this.transform.zoom)||("background"===n.type||"custom"===n.type||(r||[]).length)&&(this.id=n.id,this.gpuTimingStart(n),Zn[n.type](e,t,n,r,this.style.placement.variableOffsets),this.gpuTimingEnd())}gpuTimingStart(e){if(!this.options.gpuTiming)return;const t=this.context.extTimerQuery;let n=this.gpuTimers[e.id];n||(n=this.gpuTimers[e.id]={calls:0,cpuTime:0,query:t.createQueryEXT()}),n.calls++,t.beginQueryEXT(t.TIME_ELAPSED_EXT,n.query)}gpuTimingEnd(){if(!this.options.gpuTiming)return;const e=this.context.extTimerQuery;e.endQueryEXT(e.TIME_ELAPSED_EXT)}collectGpuTimers(){const e=this.gpuTimers;return this.gpuTimers={},e}queryGpuTimers(e){const t={};for(const n in e){const r=e[n],i=this.context.extTimerQuery,o=i.getQueryObjectEXT(r.query,i.QUERY_RESULT_EXT)/1e6;i.deleteQueryEXT(r.query),t[n]=o}return t}translatePosMatrix(t,n,r,i,o){if(!r[0]&&!r[1])return t;const a=o?"map"===i?this.transform.angle:0:"viewport"===i?-this.transform.angle:0;if(a){const e=Math.sin(a),t=Math.cos(a);r=[r[0]*t-r[1]*e,r[0]*e+r[1]*t]}const s=[o?r[0]:Ee(n,r[0],this.transform.zoom),o?r[1]:Ee(n,r[1],this.transform.zoom),0],l=new Float32Array(16);return e.translate(l,t,s),l}saveTileTexture(e){const t=this._tileTextures[e.size[0]];t?t.push(e):this._tileTextures[e.size[0]]=[e]}getTileTexture(e){const t=this._tileTextures[e];return t&&t.length>0?t.pop():null}isPatternMissing(e){if(!e)return!1;if(!e.from||!e.to)return!0;const t=this.imageManager.getPattern(e.from.toString()),n=this.imageManager.getPattern(e.to.toString());return!t||!n}useProgram(e,t){this.cache=this.cache||{};const n=e+(t?t.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.terrain?"/terrain":"");return this.cache[n]||(this.cache[n]=new st(this.context,e,rt[e],t,Nt[e],this._showOverdrawInspector,this.style.terrain)),this.cache[n]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)}initDebugOverlayCanvas(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new l(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}}class er{constructor(e,t){this.points=e,this.planes=t}static fromInvProjectionMatrix(t,n,r){const i=Math.pow(2,r),o=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map((r=>{const o=1/(r=e.transformMat4([],r,t))[3]/n*i;return e.mul$1(r,r,[o,o,1/r[3],o])})),a=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((t=>{const n=e.sub([],o[t[0]],o[t[1]]),r=e.sub([],o[t[2]],o[t[1]]),i=e.normalize([],e.cross([],n,r)),a=-e.dot(i,o[t[1]]);return i.concat(a)}));return new er(o,a)}}class tr{constructor(t,n){this.min=t,this.max=n,this.center=e.scale$1([],e.add([],this.min,this.max),.5)}quadrant(t){const n=[t%2==0,t<2],r=e.clone$2(this.min),i=e.clone$2(this.max);for(let e=0;e<n.length;e++)r[e]=n[e]?this.min[e]:this.center[e],i[e]=n[e]?this.center[e]:this.max[e];return i[2]=this.max[2],new tr(r,i)}distanceX(e){return Math.max(Math.min(this.max[0],e[0]),this.min[0])-e[0]}distanceY(e){return Math.max(Math.min(this.max[1],e[1]),this.min[1])-e[1]}intersects(t){const n=[[this.min[0],this.min[1],this.min[2],1],[this.max[0],this.min[1],this.min[2],1],[this.max[0],this.max[1],this.min[2],1],[this.min[0],this.max[1],this.min[2],1],[this.min[0],this.min[1],this.max[2],1],[this.max[0],this.min[1],this.max[2],1],[this.max[0],this.max[1],this.max[2],1],[this.min[0],this.max[1],this.max[2],1]];let r=!0;for(let i=0;i<t.planes.length;i++){const o=t.planes[i];let a=0;for(let t=0;t<n.length;t++)e.dot$1(o,n[t])>=0&&a++;if(0===a)return 0;a!==n.length&&(r=!1)}if(r)return 2;for(let e=0;e<3;e++){let n=Number.MAX_VALUE,r=-Number.MAX_VALUE;for(let i=0;i<t.points.length;i++){const o=t.points[i][e]-this.min[e];n=Math.min(n,o),r=Math.max(r,o)}if(r<0||n>this.max[e]-this.min[e])return 0}return 1}}class nr{constructor(e=0,t=0,n=0,r=0){if(isNaN(e)||e<0||isNaN(t)||t<0||isNaN(n)||n<0||isNaN(r)||r<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=e,this.bottom=t,this.left=n,this.right=r}interpolate(t,n,r){return null!=n.top&&null!=t.top&&(this.top=e.number(t.top,n.top,r)),null!=n.bottom&&null!=t.bottom&&(this.bottom=e.number(t.bottom,n.bottom,r)),null!=n.left&&null!=t.left&&(this.left=e.number(t.left,n.left,r)),null!=n.right&&null!=t.right&&(this.right=e.number(t.right,n.right,r)),this}getCenter(t,n){const r=e.clamp((this.left+t-this.right)/2,0,t),i=e.clamp((this.top+n-this.bottom)/2,0,n);return new e.pointGeometry(r,i)}equals(e){return this.top===e.top&&this.bottom===e.bottom&&this.left===e.left&&this.right===e.right}clone(){return new nr(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}class rr{constructor(t,n,r,i,o){this.tileSize=512,this.maxValidLatitude=85.051129,this.freezeElevation=!1,this._renderWorldCopies=void 0===o||!!o,this._minZoom=t||0,this._maxZoom=n||22,this._minPitch=null==r?0:r,this._maxPitch=null==i?60:i,this.setMaxBounds(),this.width=0,this.height=0,this._center=new e.LngLat(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new nr,this._posMatrixCache={},this._alignedPosMatrixCache={}}clone(){const e=new rr(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return e.tileSize=this.tileSize,e.latRange=this.latRange,e.width=this.width,e.height=this.height,e._center=this._center,e._elevation=this._elevation,e.zoom=this.zoom,e.angle=this.angle,e._fov=this._fov,e._pitch=this._pitch,e._unmodified=this._unmodified,e._edgeInsets=this._edgeInsets.clone(),e._calcMatrices(),e}get minZoom(){return this._minZoom}set minZoom(e){this._minZoom!==e&&(this._minZoom=e,this.zoom=Math.max(this.zoom,e))}get maxZoom(){return this._maxZoom}set maxZoom(e){this._maxZoom!==e&&(this._maxZoom=e,this.zoom=Math.min(this.zoom,e))}get minPitch(){return this._minPitch}set minPitch(e){this._minPitch!==e&&(this._minPitch=e,this.pitch=Math.max(this.pitch,e))}get maxPitch(){return this._maxPitch}set maxPitch(e){this._maxPitch!==e&&(this._maxPitch=e,this.pitch=Math.min(this.pitch,e))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(e){void 0===e?e=!0:null===e&&(e=!1),this._renderWorldCopies=e}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new e.pointGeometry(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(t){const n=-e.wrap(t,-180,180)*Math.PI/180;var r;this.angle!==n&&(this._unmodified=!1,this.angle=n,this._calcMatrices(),this.rotationMatrix=(r=new e.ARRAY_TYPE(4),e.ARRAY_TYPE!=Float32Array&&(r[1]=0,r[2]=0),r[0]=1,r[3]=1,r),function(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=Math.sin(n),l=Math.cos(n);e[0]=r*l+o*s,e[1]=i*l+a*s,e[2]=r*-s+o*l,e[3]=i*-s+a*l}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(t){const n=e.clamp(t,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==n&&(this._unmodified=!1,this._pitch=n,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(e){e=Math.max(.01,Math.min(60,e)),this._fov!==e&&(this._unmodified=!1,this._fov=e/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(e){const t=Math.min(Math.max(e,this.minZoom),this.maxZoom);this._zoom!==t&&(this._unmodified=!1,this._zoom=t,this.scale=this.zoomScale(t),this.tileZoom=Math.floor(t),this.zoomFraction=t-this.tileZoom,this._constrain(),this._calcMatrices())}get center(){return this._center}set center(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(e){e!==this._elevation&&(this._elevation=e,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(e){this._edgeInsets.equals(e)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,e,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(e){return this._edgeInsets.equals(e)}interpolatePadding(e,t,n){this._unmodified=!1,this._edgeInsets.interpolate(e,t,n),this._constrain(),this._calcMatrices()}coveringZoomLevel(e){const t=(e.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/e.tileSize));return Math.max(0,t)}getVisibleUnwrappedCoordinates(t){const n=[new e.UnwrappedTileID(0,t)];if(this._renderWorldCopies){const r=this.pointCoordinate(new e.pointGeometry(0,0)),i=this.pointCoordinate(new e.pointGeometry(this.width,0)),o=this.pointCoordinate(new e.pointGeometry(this.width,this.height)),a=this.pointCoordinate(new e.pointGeometry(0,this.height)),s=Math.floor(Math.min(r.x,i.x,o.x,a.x)),l=Math.floor(Math.max(r.x,i.x,o.x,a.x)),c=1;for(let r=s-c;r<=l+c;r++)0!==r&&n.push(new e.UnwrappedTileID(r,t))}return n}coveringTiles(t){var n,r;let i=this.coveringZoomLevel(t);const o=i;if(void 0!==t.minzoom&&i<t.minzoom)return[];void 0!==t.maxzoom&&i>t.maxzoom&&(i=t.maxzoom);const a=this.pointCoordinate(this.getCameraPoint()),s=e.MercatorCoordinate.fromLngLat(this.center),l=Math.pow(2,i),c=[l*a.x,l*a.y,0],u=[l*s.x,l*s.y,0],d=er.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,i);let h=t.minzoom||0;!t.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(h=i);const p=t.terrain?2/Math.min(this.tileSize,t.tileSize)*this.tileSize:3,m=e=>({aabb:new tr([e*l,0,0],[(e+1)*l,l,0]),zoom:0,x:0,y:0,wrap:e,fullyVisible:!1}),g=[],f=[],_=i,b=t.reparseOverscaled?o:i;if(this._renderWorldCopies)for(let e=1;e<=3;e++)g.push(m(-e)),g.push(m(e));for(g.push(m(0));g.length>0;){const i=g.pop(),o=i.x,a=i.y;let s=i.fullyVisible;if(!s){const e=i.aabb.intersects(d);if(0===e)continue;s=2===e}const l=t.terrain?c:u,m=i.aabb.distanceX(l),v=i.aabb.distanceY(l),y=Math.max(Math.abs(m),Math.abs(v)),E=p+(1<<_-i.zoom)-2;if(i.zoom===_||y>E&&i.zoom>=h){const t=_-i.zoom,n=c[0]-.5-(o<<t),r=c[1]-.5-(a<<t);f.push({tileID:new e.OverscaledTileID(i.zoom===_?b:i.zoom,i.wrap,i.zoom,o,a),distanceSq:e.sqrLen([u[0]-.5-o,u[1]-.5-a]),tileDistanceToCamera:Math.sqrt(n*n+r*r)})}else for(let l=0;l<4;l++){const c=(o<<1)+l%2,u=(a<<1)+(l>>1),d=i.zoom+1;let h=i.aabb.quadrant(l);if(t.terrain){const o=new e.OverscaledTileID(d,i.wrap,d,c,u),a=t.terrain.getMinMaxElevation(o),s=null!==(n=a.minElevation)&&void 0!==n?n:this.elevation,l=null!==(r=a.maxElevation)&&void 0!==r?r:this.elevation;h=new tr([h.min[0],h.min[1],s],[h.max[0],h.max[1],l])}g.push({aabb:h,zoom:d,x:c,y:u,wrap:i.wrap,fullyVisible:s})}}return f.sort(((e,t)=>e.distanceSq-t.distanceSq)).map((e=>e.tileID))}resize(e,t){this.width=e,this.height=t,this.pixelsToGLUnits=[2/e,-2/t],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(e){return Math.pow(2,e)}scaleZoom(e){return Math.log(e)/Math.LN2}project(t){const n=e.clamp(t.lat,-this.maxValidLatitude,this.maxValidLatitude);return new e.pointGeometry(e.mercatorXfromLng(t.lng)*this.worldSize,e.mercatorYfromLat(n)*this.worldSize)}unproject(t){return new e.MercatorCoordinate(t.x/this.worldSize,t.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}updateElevation(e){this.freezeElevation||(this.elevation=e?this.getElevation(this._center,e):0)}getElevation(t,n){const r=e.MercatorCoordinate.fromLngLat(t),i=(1<<this.tileZoom)*e.EXTENT,o=r.x*i,a=r.y*i,s=Math.floor(o/e.EXTENT),l=Math.floor(a/e.EXTENT),c=new e.OverscaledTileID(this.tileZoom,0,this.tileZoom,s,l);return n.getElevation(c,o%e.EXTENT,a%e.EXTENT,e.EXTENT)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(t){const n=this.pointLocation(this.centerPoint,t),r=this.getElevation(n,t);if(!(this.elevation-r))return;const i=this.getCameraPosition(),o=e.MercatorCoordinate.fromLngLat(i.lngLat,i.altitude),a=e.MercatorCoordinate.fromLngLat(n,r),s=o.x-a.x,l=o.y-a.y,c=o.z-a.z,u=Math.sqrt(s*s+l*l+c*c),d=this.scaleZoom(this.cameraToCenterDistance/u/this.tileSize);this._elevation=r,this._center=n,this.zoom=d}setLocationAtPoint(t,n){const r=this.pointCoordinate(n),i=this.pointCoordinate(this.centerPoint),o=this.locationCoordinate(t),a=new e.MercatorCoordinate(o.x-(r.x-i.x),o.y-(r.y-i.y));this.center=this.coordinateLocation(a),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(e,t){return t?this.coordinatePoint(this.locationCoordinate(e),this.getElevation(e,t),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(e))}pointLocation(e,t){return this.coordinateLocation(this.pointCoordinate(e,t))}locationCoordinate(t){return e.MercatorCoordinate.fromLngLat(t)}coordinateLocation(e){return e&&e.toLngLat()}pointCoordinate(t,n){if(n){const e=n.pointCoordinate(t);if(null!=e)return e}const r=[t.x,t.y,0,1],i=[t.x,t.y,1,1];e.transformMat4(r,r,this.pixelMatrixInverse),e.transformMat4(i,i,this.pixelMatrixInverse);const o=r[3],a=i[3],s=r[1]/o,l=i[1]/a,c=r[2]/o,u=i[2]/a,d=c===u?0:(0-c)/(u-c);return new e.MercatorCoordinate(e.number(r[0]/o,i[0]/a,d)/this.worldSize,e.number(s,l,d)/this.worldSize)}coordinatePoint(t,n=0,r=this.pixelMatrix){const i=[t.x*this.worldSize,t.y*this.worldSize,n,1];return e.transformMat4(i,i,r),new e.pointGeometry(i[0]/i[3],i[1]/i[3])}getBounds(){const t=Math.max(0,this.height/2-this.getHorizon());return(new e.LngLatBounds).extend(this.pointLocation(new e.pointGeometry(0,t))).extend(this.pointLocation(new e.pointGeometry(this.width,t))).extend(this.pointLocation(new e.pointGeometry(this.width,this.height))).extend(this.pointLocation(new e.pointGeometry(0,this.height)))}getMaxBounds(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new e.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(e){e?(this.lngRange=[e.getWest(),e.getEast()],this.latRange=[e.getSouth(),e.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])}calculatePosMatrix(t,n=!1){const r=t.key,i=n?this._alignedPosMatrixCache:this._posMatrixCache;if(i[r])return i[r];const o=t.canonical,a=this.worldSize/this.zoomScale(o.z),s=o.x+Math.pow(2,o.z)*t.wrap,l=e.identity(new Float64Array(16));return e.translate(l,l,[s*a,o.y*a,0]),e.scale(l,l,[a/e.EXTENT,a/e.EXTENT,1]),e.multiply(l,n?this.alignedProjMatrix:this.projMatrix,l),i[r]=new Float32Array(l),i[r]}customLayerMatrix(){return this.mercatorMatrix.slice()}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let t,n,r,i,o=-90,a=90,s=-180,l=180;const c=this.size,u=this._unmodified;if(this.latRange){const n=this.latRange;o=e.mercatorYfromLat(n[1])*this.worldSize,a=e.mercatorYfromLat(n[0])*this.worldSize,t=a-o<c.y?c.y/(a-o):0}if(this.lngRange){const t=this.lngRange;s=e.wrap(e.mercatorXfromLng(t[0])*this.worldSize,0,this.worldSize),l=e.wrap(e.mercatorXfromLng(t[1])*this.worldSize,0,this.worldSize),l<s&&(l+=this.worldSize),n=l-s<c.x?c.x/(l-s):0}const d=this.point,h=Math.max(n||0,t||0);if(h)return this.center=this.unproject(new e.pointGeometry(n?(l+s)/2:d.x,t?(a+o)/2:d.y)),this.zoom+=this.scaleZoom(h),this._unmodified=u,void(this._constraining=!1);if(this.latRange){const e=d.y,t=c.y/2;e-t<o&&(i=o+t),e+t>a&&(i=a-t)}if(this.lngRange){const t=(s+l)/2,n=e.wrap(d.x,t-this.worldSize/2,t+this.worldSize/2),i=c.x/2;n-i<s&&(r=s+i),n+i>l&&(r=l-i)}void 0===r&&void 0===i||(this.center=this.unproject(new e.pointGeometry(void 0!==r?r:d.x,void 0!==i?i:d.y)).wrap()),this._unmodified=u,this._constraining=!1}_calcMatrices(){if(!this.height)return;const t=this.centerOffset,n=this.point.x,r=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=e.mercatorZfromAltitude(1,this.center.lat)*this.worldSize;let i=e.identity(new Float64Array(16));e.scale(i,i,[this.width/2,-this.height/2,1]),e.translate(i,i,[1,-1,0]),this.labelPlaneMatrix=i,i=e.identity(new Float64Array(16)),e.scale(i,i,[1,-1,1]),e.translate(i,i,[-1,-1,0]),e.scale(i,i,[2/this.width,2/this.height,1]),this.glCoordMatrix=i,this.cameraToSeaLevelDistance=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch);const o=Math.PI/2+this._pitch,a=this._fov*(.5+t.y/this.height),s=Math.sin(a)*this.cameraToSeaLevelDistance/Math.sin(e.clamp(Math.PI-o-a,.01,Math.PI-.01)),l=this.getHorizon(),c=2*Math.atan(l/this.cameraToCenterDistance)*(.5+t.y/(2*l)),u=Math.sin(c)*this.cameraToSeaLevelDistance/Math.sin(e.clamp(Math.PI-o-c,.01,Math.PI-.01)),d=Math.cos(Math.PI/2-this._pitch)*s+this.cameraToSeaLevelDistance,h=Math.cos(Math.PI/2-this._pitch)*u+this.cameraToSeaLevelDistance,p=1.01*Math.min(d,h),m=this.height/50;i=new Float64Array(16),e.perspective(i,this._fov,this.width/this.height,m,p),i[8]=2*-t.x/this.width,i[9]=2*t.y/this.height,e.scale(i,i,[1,-1,1]),e.translate(i,i,[0,0,-this.cameraToCenterDistance]),e.rotateX(i,i,this._pitch),e.rotateZ(i,i,this.angle),e.translate(i,i,[-n,-r,0]),this.mercatorMatrix=e.scale([],i,[this.worldSize,this.worldSize,this.worldSize]),e.scale(i,i,[1,1,this._pixelPerMeter]),this.pixelMatrix=e.multiply(new Float64Array(16),this.labelPlaneMatrix,i),e.translate(i,i,[0,0,-this.elevation]),this.projMatrix=i,this.invProjMatrix=e.invert([],i),this.pixelMatrix3D=e.multiply(new Float64Array(16),this.labelPlaneMatrix,i);const g=this.width%2/2,f=this.height%2/2,_=Math.cos(this.angle),b=Math.sin(this.angle),v=n-Math.round(n)+_*g+b*f,y=r-Math.round(r)+_*f+b*g,E=new Float64Array(i);if(e.translate(E,E,[v>.5?v-1:v,y>.5?y-1:y,0]),this.alignedProjMatrix=E,i=e.invert(new Float64Array(16),this.pixelMatrix),!i)throw new Error("failed to invert matrix");this.pixelMatrixInverse=i,this._posMatrixCache={},this._alignedPosMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const t=this.pointCoordinate(new e.pointGeometry(0,0)),n=[t.x*this.worldSize,t.y*this.worldSize,0,1];return e.transformMat4(n,n,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const t=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.pointGeometry(0,t))}getCameraQueryGeometry(t){const n=this.getCameraPoint();if(1===t.length)return[t[0],n];{let r=n.x,i=n.y,o=n.x,a=n.y;for(const e of t)r=Math.min(r,e.x),i=Math.min(i,e.y),o=Math.max(o,e.x),a=Math.max(a,e.y);return[new e.pointGeometry(r,i),new e.pointGeometry(o,i),new e.pointGeometry(o,a),new e.pointGeometry(r,a),new e.pointGeometry(r,i)]}}}class ir{constructor(t){this._hashName=t&&encodeURIComponent(t),e.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=function(e,t){let n=!1,r=null;const i=()=>{r=null,n&&(e(),r=setTimeout(i,300),n=!1)};return()=>(n=!0,r||i(),r)}(this._updateHashUnthrottled.bind(this))}addTo(e){return this._map=e,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this}getHashString(e){const t=this._map.getCenter(),n=Math.round(100*this._map.getZoom())/100,r=Math.ceil((n*Math.LN2+Math.log(512/360/.5))/Math.LN10),i=Math.pow(10,r),o=Math.round(t.lng*i)/i,a=Math.round(t.lat*i)/i,s=this._map.getBearing(),l=this._map.getPitch();let c="";if(c+=e?`/${o}/${a}/${n}`:`${n}/${a}/${o}`,(s||l)&&(c+="/"+Math.round(10*s)/10),l&&(c+=`/${Math.round(l)}`),this._hashName){const e=this._hashName;let t=!1;const n=window.location.hash.slice(1).split("&").map((n=>{const r=n.split("=")[0];return r===e?(t=!0,`${r}=${c}`):n})).filter((e=>e));return t||n.push(`${e}=${c}`),`#${n.join("&")}`}return`#${c}`}_getCurrentHash(){const e=window.location.hash.replace("#","");if(this._hashName){let t;return e.split("&").map((e=>e.split("="))).forEach((e=>{e[0]===this._hashName&&(t=e)})),(t&&t[1]||"").split("/")}return e.split("/")}_onHashChange(){const e=this._getCurrentHash();if(e.length>=3&&!e.some((e=>isNaN(e)))){const t=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(e[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:t,pitch:+(e[4]||0)}),!0}return!1}_updateHashUnthrottled(){const e=window.location.href.replace(/(#.+)?$/,this.getHashString());try{window.history.replaceState(window.history.state,null,e)}catch(e){}}}const or={linearity:.3,easing:e.bezier(0,0,.3,1)},ar=e.extend({deceleration:2500,maxSpeed:1400},or),sr=e.extend({deceleration:20,maxSpeed:1400},or),lr=e.extend({deceleration:1e3,maxSpeed:360},or),cr=e.extend({deceleration:1e3,maxSpeed:90},or);class ur{constructor(e){this._map=e,this.clear()}clear(){this._inertiaBuffer=[]}record(t){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:e.exported.now(),settings:t})}_drainInertiaBuffer(){const t=this._inertiaBuffer,n=e.exported.now();for(;t.length>0&&n-t[0].time>160;)t.shift()}_onMoveEnd(t){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const n={zoom:0,bearing:0,pitch:0,pan:new e.pointGeometry(0,0),pinchAround:void 0,around:void 0};for(const{settings:e}of this._inertiaBuffer)n.zoom+=e.zoomDelta||0,n.bearing+=e.bearingDelta||0,n.pitch+=e.pitchDelta||0,e.panDelta&&n.pan._add(e.panDelta),e.around&&(n.around=e.around),e.pinchAround&&(n.pinchAround=e.pinchAround);const r=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,i={};if(n.pan.mag()){const o=hr(n.pan.mag(),r,e.extend({},ar,t||{}));i.offset=n.pan.mult(o.amount/n.pan.mag()),i.center=this._map.transform.center,dr(i,o)}if(n.zoom){const e=hr(n.zoom,r,sr);i.zoom=this._map.transform.zoom+e.amount,dr(i,e)}if(n.bearing){const t=hr(n.bearing,r,lr);i.bearing=this._map.transform.bearing+e.clamp(t.amount,-179,179),dr(i,t)}if(n.pitch){const e=hr(n.pitch,r,cr);i.pitch=this._map.transform.pitch+e.amount,dr(i,e)}if(i.zoom||i.bearing){const e=void 0===n.pinchAround?n.around:n.pinchAround;i.around=e?this._map.unproject(e):this._map.getCenter()}return this.clear(),e.extend(i,{noMoveStart:!0})}}function dr(e,t){(!e.duration||e.duration<t.duration)&&(e.duration=t.duration,e.easing=t.easing)}function hr(t,n,r){const{maxSpeed:i,linearity:o,deceleration:a}=r,s=e.clamp(t*o/(n/1e3),-i,i),l=Math.abs(s)/(a*o);return{easing:r.easing,duration:1e3*l,amount:s*(l/2)}}class pr extends e.Event{constructor(t,n,r,i={}){const a=o.mousePos(n.getCanvasContainer(),r),s=n.unproject(a);super(t,e.extend({point:a,lngLat:s,originalEvent:r},i)),this._defaultPrevented=!1,this.target=n}preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}}class mr extends e.Event{constructor(t,n,r){const i="touchend"===t?r.changedTouches:r.touches,a=o.touchPos(n.getCanvasContainer(),i),s=a.map((e=>n.unproject(e))),l=a.reduce(((e,t,n,r)=>e.add(t.div(r.length))),new e.pointGeometry(0,0));super(t,{points:a,point:l,lngLats:s,lngLat:n.unproject(l),originalEvent:r}),this._defaultPrevented=!1}preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}}class gr extends e.Event{constructor(e,t,n){super(e,{originalEvent:n}),this._defaultPrevented=!1}preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}}class fr{constructor(e,t){this._map=e,this._clickTolerance=t.clickTolerance}reset(){delete this._mousedownPos}wheel(e){return this._firePreventable(new gr(e.type,this._map,e))}mousedown(e,t){return this._mousedownPos=t,this._firePreventable(new pr(e.type,this._map,e))}mouseup(e){this._map.fire(new pr(e.type,this._map,e))}click(e,t){this._mousedownPos&&this._mousedownPos.dist(t)>=this._clickTolerance||this._map.fire(new pr(e.type,this._map,e))}dblclick(e){return this._firePreventable(new pr(e.type,this._map,e))}mouseover(e){this._map.fire(new pr(e.type,this._map,e))}mouseout(e){this._map.fire(new pr(e.type,this._map,e))}touchstart(e){return this._firePreventable(new mr(e.type,this._map,e))}touchmove(e){this._map.fire(new mr(e.type,this._map,e))}touchend(e){this._map.fire(new mr(e.type,this._map,e))}touchcancel(e){this._map.fire(new mr(e.type,this._map,e))}_firePreventable(e){if(this._map.fire(e),e.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class _r{constructor(e){this._map=e}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(e){this._map.fire(new pr(e.type,this._map,e))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new pr("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(e){this._delayContextMenu?this._contextMenuEvent=e:this._ignoreContextMenu||this._map.fire(new pr(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class br{constructor(e,t){this._map=e,this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=t.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(e,t){this.isEnabled()&&e.shiftKey&&0===e.button&&(o.disableDrag(),this._startPos=this._lastPos=t,this._active=!0)}mousemoveWindow(e,t){if(!this._active)return;const n=t;if(this._lastPos.equals(n)||!this._box&&n.dist(this._startPos)<this._clickTolerance)return;const r=this._startPos;this._lastPos=n,this._box||(this._box=o.create("div","maplibregl-boxzoom mapboxgl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair","mapboxgl-crosshair"),this._fireEvent("boxzoomstart",e));const i=Math.min(r.x,n.x),a=Math.max(r.x,n.x),s=Math.min(r.y,n.y),l=Math.max(r.y,n.y);o.setTransform(this._box,`translate(${i}px,${s}px)`),this._box.style.width=a-i+"px",this._box.style.height=l-s+"px"}mouseupWindow(t,n){if(!this._active)return;if(0!==t.button)return;const r=this._startPos,i=n;if(this.reset(),o.suppressClick(),r.x!==i.x||r.y!==i.y)return this._map.fire(new e.Event("boxzoomend",{originalEvent:t})),{cameraAnimation:e=>e.fitScreenCoordinates(r,i,this._map.getBearing(),{linear:!0})};this._fireEvent("boxzoomcancel",t)}keydown(e){this._active&&27===e.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",e))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair","mapboxgl-crosshair"),this._box&&(o.remove(this._box),this._box=null),o.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(t,n){return this._map.fire(new e.Event(t,{originalEvent:n}))}}function vr(e,t){if(e.length!==t.length)throw new Error(`The number of touches and points are not equal - touches ${e.length}, points ${t.length}`);const n={};for(let r=0;r<e.length;r++)n[e[r].identifier]=t[r];return n}class yr{constructor(e){this.reset(),this.numTouches=e.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(t,n,r){(this.centroid||r.length>this.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=t.timeStamp),r.length===this.numTouches&&(this.centroid=function(t){const n=new e.pointGeometry(0,0);for(const e of t)n._add(e);return n.div(t.length)}(n),this.touches=vr(r,n)))}touchmove(e,t,n){if(this.aborted||!this.centroid)return;const r=vr(n,t);for(const e in this.touches){const t=this.touches[e],n=r[e];(!n||n.dist(t)>30)&&(this.aborted=!0)}}touchend(e,t,n){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),0===n.length){const e=!this.aborted&&this.centroid;if(this.reset(),e)return e}}}class Er{constructor(e){this.singleTap=new yr(e),this.numTaps=e.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(e,t,n){this.singleTap.touchstart(e,t,n)}touchmove(e,t,n){this.singleTap.touchmove(e,t,n)}touchend(e,t,n){const r=this.singleTap.touchend(e,t,n);if(r){const t=e.timeStamp-this.lastTime<500,n=!this.lastTap||this.lastTap.dist(r)<30;if(t&&n||this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=r,this.count===this.numTaps)return this.reset(),r}}}class Sr{constructor(){this._zoomIn=new Er({numTouches:1,numTaps:2}),this._zoomOut=new Er({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(e,t,n){this._zoomIn.touchstart(e,t,n),this._zoomOut.touchstart(e,t,n)}touchmove(e,t,n){this._zoomIn.touchmove(e,t,n),this._zoomOut.touchmove(e,t,n)}touchend(e,t,n){const r=this._zoomIn.touchend(e,t,n),i=this._zoomOut.touchend(e,t,n);return r?(this._active=!0,e.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:t=>t.easeTo({duration:300,zoom:t.getZoom()+1,around:t.unproject(r)},{originalEvent:e})}):i?(this._active=!0,e.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:t=>t.easeTo({duration:300,zoom:t.getZoom()-1,around:t.unproject(i)},{originalEvent:e})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}const wr={0:1,2:2};class Tr{constructor(e){this.reset(),this._clickTolerance=e.clickTolerance||1}reset(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton}_correctButton(e,t){return!1}_move(e,t){return{}}mousedown(e,t){if(this._lastPoint)return;const n=o.mouseButton(e);this._correctButton(e,n)&&(this._lastPoint=t,this._eventButton=n)}mousemoveWindow(e,t){const n=this._lastPoint;if(n)if(e.preventDefault(),function(e,t){const n=wr[t];return void 0===e.buttons||(e.buttons&n)!==n}(e,this._eventButton))this.reset();else if(this._moved||!(t.dist(n)<this._clickTolerance))return this._moved=!0,this._lastPoint=t,this._move(n,t)}mouseupWindow(e){this._lastPoint&&o.mouseButton(e)===this._eventButton&&(this._moved&&o.suppressClick(),this.reset())}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Cr extends Tr{mousedown(e,t){super.mousedown(e,t),this._lastPoint&&(this._active=!0)}_correctButton(e,t){return 0===t&&!e.ctrlKey}_move(e,t){return{around:t,panDelta:t.sub(e)}}}class xr extends Tr{_correctButton(e,t){return 0===t&&e.ctrlKey||2===t}_move(e,t){const n=.8*(t.x-e.x);if(n)return this._active=!0,{bearingDelta:n}}contextmenu(e){e.preventDefault()}}class Fr extends Tr{_correctButton(e,t){return 0===t&&e.ctrlKey||2===t}_move(e,t){const n=-.5*(t.y-e.y);if(n)return this._active=!0,{pitchDelta:n}}contextmenu(e){e.preventDefault()}}class Dr{constructor(e,t){this._minTouches=e.cooperativeGestures?2:1,this._clickTolerance=e.clickTolerance||1,this._map=t,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new e.pointGeometry(0,0),setTimeout((()=>{this._cancelCooperativeMessage=!1}),200)}touchstart(e,t,n){return this._calculateTransform(e,t,n)}touchmove(e,t,n){if(this._map._cooperativeGestures&&(2===this._minTouches&&n.length<2&&!this._cancelCooperativeMessage?this._map._onCooperativeGesture(e,!1,n.length):this._cancelCooperativeMessage||(this._cancelCooperativeMessage=!0)),this._active&&!(n.length<this._minTouches))return e.preventDefault(),this._calculateTransform(e,t,n)}touchend(e,t,n){this._calculateTransform(e,t,n),this._active&&n.length<this._minTouches&&this.reset()}touchcancel(){this.reset()}_calculateTransform(t,n,r){r.length>0&&(this._active=!0);const i=vr(r,n),o=new e.pointGeometry(0,0),a=new e.pointGeometry(0,0);let s=0;for(const e in i){const t=i[e],n=this._touches[e];n&&(o._add(t),a._add(t.sub(n)),s++,i[e]=t)}if(this._touches=i,s<this._minTouches||!a.mag())return;const l=a.div(s);return this._sum._add(l),this._sum.mag()<this._clickTolerance?void 0:{around:o.div(s),panDelta:l}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class kr{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}_start(e){}_move(e,t,n){return{}}touchstart(e,t,n){this._firstTwoTouches||n.length<2||(this._firstTwoTouches=[n[0].identifier,n[1].identifier],this._start([t[0],t[1]]))}touchmove(e,t,n){if(!this._firstTwoTouches)return;e.preventDefault();const[r,i]=this._firstTwoTouches,o=Or(n,t,r),a=Or(n,t,i);if(!o||!a)return;const s=this._aroundCenter?null:o.add(a).div(2);return this._move([o,a],s,e)}touchend(e,t,n){if(!this._firstTwoTouches)return;const[r,i]=this._firstTwoTouches,a=Or(n,t,r),s=Or(n,t,i);a&&s||(this._active&&o.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(e){this._enabled=!0,this._aroundCenter=!!e&&"center"===e.around}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}function Or(e,t,n){for(let r=0;r<e.length;r++)if(e[r].identifier===n)return t[r]}function Ir(e,t){return Math.log(e/t)/Math.LN2}class Ar extends kr{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(e){this._startDistance=this._distance=e[0].dist(e[1])}_move(e,t){const n=this._distance;if(this._distance=e[0].dist(e[1]),this._active||!(Math.abs(Ir(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:Ir(this._distance,n),pinchAround:t}}}function Rr(e,t){return 180*e.angleWith(t)/Math.PI}class Nr extends kr{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(e){this._startVector=this._vector=e[0].sub(e[1]),this._minDiameter=e[0].dist(e[1])}_move(e,t){const n=this._vector;if(this._vector=e[0].sub(e[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Rr(this._vector,n),pinchAround:t}}_isBelowThreshold(e){this._minDiameter=Math.min(this._minDiameter,e.mag());const t=25/(Math.PI*this._minDiameter)*360,n=Rr(e,this._startVector);return Math.abs(n)<t}}function Mr(e){return Math.abs(e.y)>Math.abs(e.x)}class Pr extends kr{constructor(e){super(),this._map=e}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(e,t,n){super.touchstart(e,t,n),this._currentTouchCount=n.length}_start(e){this._lastPoints=e,Mr(e[0].sub(e[1]))&&(this._valid=!1)}_move(e,t,n){if(this._map._cooperativeGestures&&this._currentTouchCount<3)return;const r=e[0].sub(this._lastPoints[0]),i=e[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(r,i,n.timeStamp),this._valid?(this._lastPoints=e,this._active=!0,{pitchDelta:(r.y+i.y)/2*-.5}):void 0}gestureBeginsVertically(e,t,n){if(void 0!==this._valid)return this._valid;const r=e.mag()>=2,i=t.mag()>=2;if(!r&&!i)return;if(!r||!i)return void 0===this._firstMove&&(this._firstMove=n),n-this._firstMove<100&&void 0;const o=e.y>0==t.y>0;return Mr(e)&&Mr(t)&&o}}const Lr={panStep:100,bearingStep:15,pitchStep:10};class Br{constructor(){const e=Lr;this._panStep=e.panStep,this._bearingStep=e.bearingStep,this._pitchStep=e.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let t=0,n=0,r=0,i=0,o=0;switch(e.keyCode){case 61:case 107:case 171:case 187:t=1;break;case 189:case 109:case 173:t=-1;break;case 37:e.shiftKey?n=-1:(e.preventDefault(),i=-1);break;case 39:e.shiftKey?n=1:(e.preventDefault(),i=1);break;case 38:e.shiftKey?r=1:(e.preventDefault(),o=-1);break;case 40:e.shiftKey?r=-1:(e.preventDefault(),o=1);break;default:return}return this._rotationDisabled&&(n=0,r=0),{cameraAnimation:a=>{const s=a.getZoom();a.easeTo({duration:300,easeId:"keyboardHandler",easing:Ur,zoom:t?Math.round(s)+t*(e.shiftKey?2:1):s,bearing:a.getBearing()+n*this._bearingStep,pitch:a.getPitch()+r*this._pitchStep,offset:[-i*this._panStep,-o*this._panStep],center:a.getCenter()},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function Ur(e){return e*(2-e)}const jr=4.000244140625;class Gr{constructor(t,n){this._map=t,this._el=t.getCanvasContainer(),this._handler=n,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222,e.bindAll(["_onTimeout"],this)}setZoomRate(e){this._defaultZoomRate=e}setWheelZoomRate(e){this._wheelZoomRate=e}isEnabled(){return!!this._enabled}isActive(){return!!this._active||void 0!==this._finishTimeout}isZooming(){return!!this._zooming}enable(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=e&&"center"===e.around)}disable(){this.isEnabled()&&(this._enabled=!1)}wheel(t){if(!this.isEnabled())return;if(this._map._cooperativeGestures){if(!this._map._metaPress)return;t.preventDefault()}let n=t.deltaMode===WheelEvent.DOM_DELTA_LINE?40*t.deltaY:t.deltaY;const r=e.exported.now(),i=r-(this._lastWheelEventTime||0);this._lastWheelEventTime=r,0!==n&&n%jr==0?this._type="wheel":0!==n&&Math.abs(n)<4?this._type="trackpad":i>400?(this._type=null,this._lastValue=n,this._timeout=setTimeout(this._onTimeout,40,t)):this._type||(this._type=Math.abs(i*n)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,n+=this._lastValue)),t.shiftKey&&n&&(n/=4),this._type&&(this._lastWheelEvent=t,this._delta-=n,this._active||this._start(t)),t.preventDefault()}_onTimeout(e){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(e)}_start(t){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const n=o.mousePos(this._el,t);this._around=e.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(n)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}renderFrame(){if(!this._frameId)return;if(this._frameId=null,!this.isActive())return;const t=this._map.transform;if(0!==this._delta){const e="wheel"===this._type&&Math.abs(this._delta)>jr?this._wheelZoomRate:this._defaultZoomRate;let n=2/(1+Math.exp(-Math.abs(this._delta*e)));this._delta<0&&0!==n&&(n=1/n);const r="number"==typeof this._targetZoom?t.zoomScale(this._targetZoom):t.scale;this._targetZoom=Math.min(t.maxZoom,Math.max(t.minZoom,t.scaleZoom(r*n))),"wheel"===this._type&&(this._startZoom=t.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const n="number"==typeof this._targetZoom?this._targetZoom:t.zoom,r=this._startZoom,i=this._easing;let o,a=!1;if("wheel"===this._type&&r&&i){const t=Math.min((e.exported.now()-this._lastWheelEventTime)/200,1),s=i(t);o=e.number(r,n,s),t<1?this._frameId||(this._frameId=!0):a=!0}else o=n,a=!0;return this._active=!0,a&&(this._active=!1,this._finishTimeout=setTimeout((()=>{this._zooming=!1,this._handler._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!a,zoomDelta:o-t.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(t){let n=e.ease;if(this._prevEase){const t=this._prevEase,r=(e.exported.now()-t.start)/t.duration,i=t.easing(r+.01)-t.easing(r),o=.27/Math.sqrt(i*i+1e-4)*.01,a=Math.sqrt(.0729-o*o);n=e.bezier(o,a,.25,1)}return this._prevEase={start:e.exported.now(),duration:t,easing:n},n}reset(){this._active=!1}}class zr{constructor(e,t){this._clickZoom=e,this._tapZoom=t}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class Hr{constructor(){this.reset()}reset(){this._active=!1}dblclick(e,t){return e.preventDefault(),{cameraAnimation:n=>{n.easeTo({duration:300,zoom:n.getZoom()+(e.shiftKey?-1:1),around:n.unproject(t)},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class qr{constructor(){this._tap=new Er({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()}touchstart(e,t,n){this._swipePoint||(this._tapTime&&e.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?n.length>0&&(this._swipePoint=t[0],this._swipeTouch=n[0].identifier):this._tap.touchstart(e,t,n))}touchmove(e,t,n){if(this._tapTime){if(this._swipePoint){if(n[0].identifier!==this._swipeTouch)return;const r=t[0],i=r.y-this._swipePoint.y;return this._swipePoint=r,e.preventDefault(),this._active=!0,{zoomDelta:i/128}}}else this._tap.touchmove(e,t,n)}touchend(e,t,n){this._tapTime?this._swipePoint&&0===n.length&&this.reset():this._tap.touchend(e,t,n)&&(this._tapTime=e.timeStamp)}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Vr{constructor(e,t,n){this._el=e,this._mousePan=t,this._touchPan=n}enable(e){this._inertiaOptions=e||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan","mapboxgl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan","mapboxgl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class $r{constructor(e,t,n){this._pitchWithRotate=e.pitchWithRotate,this._mouseRotate=t,this._mousePitch=n}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class Kr{constructor(e,t,n,r){this._el=e,this._touchZoom=t,this._touchRotate=n,this._tapDragZoom=r,this._rotationDisabled=!1,this._enabled=!0}enable(e){this._touchZoom.enable(e),this._rotationDisabled||this._touchRotate.enable(e),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate","mapboxgl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate","mapboxgl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}const Wr=e=>e.zoom||e.drag||e.pitch||e.rotate;class Yr extends e.Event{}function Qr(e){return e.panDelta&&e.panDelta.mag()||e.zoomDelta||e.bearingDelta||e.pitchDelta}class Xr{constructor(t,n){this._map=t,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new ur(t),this._bearingSnap=n.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(n),e.bindAll(["handleEvent","handleWindowEvent"],this);const r=this._el;this._listeners=[[r,"touchstart",{passive:!0}],[r,"touchmove",{passive:!1}],[r,"touchend",void 0],[r,"touchcancel",void 0],[r,"mousedown",void 0],[r,"mousemove",void 0],[r,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[r,"mouseover",void 0],[r,"mouseout",void 0],[r,"dblclick",void 0],[r,"click",void 0],[r,"keydown",{capture:!1}],[r,"keyup",void 0],[r,"wheel",{passive:!1}],[r,"contextmenu",void 0],[window,"blur",void 0]];for(const[e,t,n]of this._listeners)o.addEventListener(e,t,e===document?this.handleWindowEvent:this.handleEvent,n)}destroy(){for(const[e,t,n]of this._listeners)o.removeEventListener(e,t,e===document?this.handleWindowEvent:this.handleEvent,n)}_addDefaultHandlers(e){const t=this._map,n=t.getCanvasContainer();this._add("mapEvent",new fr(t,e));const r=t.boxZoom=new br(t,e);this._add("boxZoom",r);const i=new Sr,o=new Hr;t.doubleClickZoom=new zr(o,i),this._add("tapZoom",i),this._add("clickZoom",o);const a=new qr;this._add("tapDragZoom",a);const s=t.touchPitch=new Pr(t);this._add("touchPitch",s);const l=new xr(e),c=new Fr(e);t.dragRotate=new $r(e,l,c),this._add("mouseRotate",l,["mousePitch"]),this._add("mousePitch",c,["mouseRotate"]);const u=new Cr(e),d=new Dr(e,t);t.dragPan=new Vr(n,u,d),this._add("mousePan",u),this._add("touchPan",d,["touchZoom","touchRotate"]);const h=new Nr,p=new Ar;t.touchZoomRotate=new Kr(n,p,h,a),this._add("touchRotate",h,["touchPan","touchZoom"]),this._add("touchZoom",p,["touchPan","touchRotate"]);const m=t.scrollZoom=new Gr(t,this);this._add("scrollZoom",m,["mousePan"]);const g=t.keyboard=new Br;this._add("keyboard",g),this._add("blockableMapEvent",new _r(t));for(const n of["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"])e.interactive&&e[n]&&t[n].enable(e[n])}_add(e,t,n){this._handlers.push({handlerName:e,handler:t,allowed:n}),this._handlersById[e]=t}stop(e){if(!this._updatingCamera){for(const{handler:e}of this._handlers)e.reset();this._inertia.clear(),this._fireEvents({},{},e),this._changes=[]}}isActive(){for(const{handler:e}of this._handlers)if(e.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return Boolean(Wr(this._eventsInProgress))||this.isZooming()}_blockedByActive(e,t,n){for(const r in e)if(r!==n&&(!t||t.indexOf(r)<0))return!0;return!1}handleWindowEvent(e){this.handleEvent(e,`${e.type}Window`)}_getMapTouches(e){const t=[];for(const n of e)this._el.contains(n.target)&&t.push(n);return t}handleEvent(e,t){if("blur"===e.type)return void this.stop(!0);this._updatingCamera=!0;const n="renderFrame"===e.type?void 0:e,r={needsRenderFrame:!1},i={},a={},s=e.touches,l=s?this._getMapTouches(s):void 0,c=l?o.touchPos(this._el,l):o.mousePos(this._el,e);for(const{handlerName:o,handler:s,allowed:u}of this._handlers){if(!s.isEnabled())continue;let d;this._blockedByActive(a,u,o)?s.reset():s[t||e.type]&&(d=s[t||e.type](e,c,l),this.mergeHandlerResult(r,i,d,o,n),d&&d.needsRenderFrame&&this._triggerRenderFrame()),(d||s.isActive())&&(a[o]=s)}const u={};for(const e in this._previousActiveHandlers)a[e]||(u[e]=n);this._previousActiveHandlers=a,(Object.keys(u).length||Qr(r))&&(this._changes.push([r,i,u]),this._triggerRenderFrame()),(Object.keys(a).length||Qr(r))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:d}=r;d&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],d(this._map))}mergeHandlerResult(t,n,r,i,o){if(!r)return;e.extend(t,r);const a={handlerName:i,originalEvent:r.originalEvent||o};void 0!==r.zoomDelta&&(n.zoom=a),void 0!==r.panDelta&&(n.drag=a),void 0!==r.pitchDelta&&(n.pitch=a),void 0!==r.bearingDelta&&(n.rotate=a)}_applyChanges(){const t={},n={},r={};for(const[i,o,a]of this._changes)i.panDelta&&(t.panDelta=(t.panDelta||new e.pointGeometry(0,0))._add(i.panDelta)),i.zoomDelta&&(t.zoomDelta=(t.zoomDelta||0)+i.zoomDelta),i.bearingDelta&&(t.bearingDelta=(t.bearingDelta||0)+i.bearingDelta),i.pitchDelta&&(t.pitchDelta=(t.pitchDelta||0)+i.pitchDelta),void 0!==i.around&&(t.around=i.around),void 0!==i.pinchAround&&(t.pinchAround=i.pinchAround),i.noInertia&&(t.noInertia=i.noInertia),e.extend(n,o),e.extend(r,a);this._updateMapTransform(t,n,r),this._changes=[]}_updateMapTransform(t,n,r){const i=this._map,o=i.transform,a=i.style&&i.style.terrain;if(!(Qr(t)||a&&this._drag))return this._fireEvents(n,r,!0);let{panDelta:s,zoomDelta:l,bearingDelta:c,pitchDelta:u,around:d,pinchAround:h}=t;void 0!==h&&(d=h),i._stop(!0),d=d||i.transform.centerPoint;const p=o.pointLocation(s?d.sub(s):d);c&&(o.bearing+=c),u&&(o.pitch+=u),l&&(o.zoom+=l),a?n.drag&&!this._drag?(this._drag={center:o.centerPoint,lngLat:o.pointLocation(d),point:d,handlerName:n.drag.handlerName},i.fire(new e.Event("freezeElevation",{freeze:!0}))):this._drag&&r[this._drag.handlerName]?(i.fire(new e.Event("freezeElevation",{freeze:!1})),this._drag=null):n.drag&&this._drag&&(o.center=o.pointLocation(o.centerPoint.sub(s))):o.setLocationAtPoint(p,d),this._map._update(),t.noInertia||this._inertia.record(t),this._fireEvents(n,r,!0)}_fireEvents(t,n,r){const i=Wr(this._eventsInProgress),o=Wr(t),a={};for(const e in t){const{originalEvent:n}=t[e];this._eventsInProgress[e]||(a[`${e}start`]=n),this._eventsInProgress[e]=t[e]}!i&&o&&this._fireEvent("movestart",o.originalEvent);for(const e in a)this._fireEvent(e,a[e]);o&&this._fireEvent("move",o.originalEvent);for(const e in t){const{originalEvent:n}=t[e];this._fireEvent(e,n)}const s={};let l;for(const e in this._eventsInProgress){const{handlerName:t,originalEvent:r}=this._eventsInProgress[e];this._handlersById[t].isActive()||(delete this._eventsInProgress[e],l=n[t]||r,s[`${e}end`]=l)}for(const e in s)this._fireEvent(e,s[e]);const c=Wr(this._eventsInProgress);if(r&&(i||o)&&!c){this._updatingCamera=!0;const t=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),n=e=>0!==e&&-this._bearingSnap<e&&e<this._bearingSnap;t?(n(t.bearing||this._map.getBearing())&&(t.bearing=0),this._map.easeTo(t,{originalEvent:l})):(this._map.fire(new e.Event("moveend",{originalEvent:l})),n(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}}_fireEvent(t,n){this._map.fire(new e.Event(t,n?{originalEvent:n}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add((e=>{delete this._frameId,this.handleEvent(new Yr("renderFrame",{timeStamp:e})),this._applyChanges()}))}_triggerRenderFrame(){void 0===this._frameId&&(this._frameId=this._requestFrame())}}const Zr={extend:(t,...n)=>e.extend(t,...n),run(e){e()},logToElement(e,t=!1,n="log"){const r=window.document.getElementById(n);r&&(t&&(r.innerHTML=""),r.innerHTML+=`<br>${e}`)}};class Jr extends e.Evented{constructor(t,n){super(),this._moving=!1,this._zooming=!1,this.transform=t,this._bearingSnap=n.bearingSnap,e.bindAll(["_renderFrameCallback"],this)}getCenter(){return new e.LngLat(this.transform.center.lng,this.transform.center.lat)}setCenter(e,t){return this.jumpTo({center:e},t)}panBy(t,n,r){return t=e.pointGeometry.convert(t).mult(-1),this.panTo(this.transform.center,e.extend({offset:t},n),r)}panTo(t,n,r){return this.easeTo(e.extend({center:t},n),r)}getZoom(){return this.transform.zoom}setZoom(e,t){return this.jumpTo({zoom:e},t),this}zoomTo(t,n,r){return this.easeTo(e.extend({zoom:t},n),r)}zoomIn(e,t){return this.zoomTo(this.getZoom()+1,e,t),this}zoomOut(e,t){return this.zoomTo(this.getZoom()-1,e,t),this}getBearing(){return this.transform.bearing}setBearing(e,t){return this.jumpTo({bearing:e},t),this}getPadding(){return this.transform.padding}setPadding(e,t){return this.jumpTo({padding:e},t),this}rotateTo(t,n,r){return this.easeTo(e.extend({bearing:t},n),r)}resetNorth(t,n){return this.rotateTo(0,e.extend({duration:1e3},t),n),this}resetNorthPitch(t,n){return this.easeTo(e.extend({bearing:0,pitch:0,duration:1e3},t),n),this}snapToNorth(e,t){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(e,t):this}getPitch(){return this.transform.pitch}setPitch(e,t){return this.jumpTo({pitch:e},t),this}cameraForBounds(t,n){t=e.LngLatBounds.convert(t);const r=n&&n.bearing||0;return this._cameraForBoxAndBearing(t.getNorthWest(),t.getSouthEast(),r,n)}_cameraForBoxAndBearing(t,n,r,i){const o={top:0,bottom:0,right:0,left:0};if("number"==typeof(i=e.extend({padding:o,offset:[0,0],maxZoom:this.transform.maxZoom},i)).padding){const e=i.padding;i.padding={top:e,bottom:e,right:e,left:e}}i.padding=e.extend(o,i.padding);const a=this.transform,s=a.padding,l=a.project(e.LngLat.convert(t)),c=a.project(e.LngLat.convert(n)),u=l.rotate(-r*Math.PI/180),d=c.rotate(-r*Math.PI/180),h=new e.pointGeometry(Math.max(u.x,d.x),Math.max(u.y,d.y)),p=new e.pointGeometry(Math.min(u.x,d.x),Math.min(u.y,d.y)),m=h.sub(p),g=(a.width-(s.left+s.right+i.padding.left+i.padding.right))/m.x,f=(a.height-(s.top+s.bottom+i.padding.top+i.padding.bottom))/m.y;if(f<0||g<0)return void e.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const _=Math.min(a.scaleZoom(a.scale*Math.min(g,f)),i.maxZoom),b=e.pointGeometry.convert(i.offset),v=new e.pointGeometry((i.padding.left-i.padding.right)/2,(i.padding.top-i.padding.bottom)/2).rotate(r*Math.PI/180),y=b.add(v).mult(a.scale/a.zoomScale(_));return{center:a.unproject(l.add(c).div(2).sub(y)),zoom:_,bearing:r}}fitBounds(e,t,n){return this._fitInternal(this.cameraForBounds(e,t),t,n)}fitScreenCoordinates(t,n,r,i,o){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(e.pointGeometry.convert(t)),this.transform.pointLocation(e.pointGeometry.convert(n)),r,i),i,o)}_fitInternal(t,n,r){return t?(delete(n=e.extend(t,n)).padding,n.linear?this.easeTo(n,r):this.flyTo(n,r)):this}jumpTo(t,n){this.stop();const r=this.transform;let i=!1,o=!1,a=!1;return"zoom"in t&&r.zoom!==+t.zoom&&(i=!0,r.zoom=+t.zoom),void 0!==t.center&&(r.center=e.LngLat.convert(t.center)),"bearing"in t&&r.bearing!==+t.bearing&&(o=!0,r.bearing=+t.bearing),"pitch"in t&&r.pitch!==+t.pitch&&(a=!0,r.pitch=+t.pitch),null==t.padding||r.isPaddingEqual(t.padding)||(r.padding=t.padding),this.fire(new e.Event("movestart",n)).fire(new e.Event("move",n)),i&&this.fire(new e.Event("zoomstart",n)).fire(new e.Event("zoom",n)).fire(new e.Event("zoomend",n)),o&&this.fire(new e.Event("rotatestart",n)).fire(new e.Event("rotate",n)).fire(new e.Event("rotateend",n)),a&&this.fire(new e.Event("pitchstart",n)).fire(new e.Event("pitch",n)).fire(new e.Event("pitchend",n)),this.fire(new e.Event("moveend",n))}calculateCameraOptionsFromTo(t,n,r,i=0){const o=e.MercatorCoordinate.fromLngLat(t,n),a=e.MercatorCoordinate.fromLngLat(r,i),s=a.x-o.x,l=a.y-o.y,c=a.z-o.z,u=Math.hypot(s,l,c);if(0===u)throw new Error("Can't calculate camera options with same From and To");const d=Math.hypot(s,l),h=this.transform.scaleZoom(this.transform.cameraToCenterDistance/u/this.transform.tileSize),p=180*Math.atan2(s,-l)/Math.PI;let m=180*Math.acos(d/u)/Math.PI;return m=c<0?90-m:90+m,{center:a.toLngLat(),zoom:h,pitch:m,bearing:p}}easeTo(t,n){this._stop(!1,t.easeId),(!1===(t=e.extend({offset:[0,0],duration:500,easing:e.ease},t)).animate||!t.essential&&e.exported.prefersReducedMotion)&&(t.duration=0);const r=this.transform,i=this.getZoom(),o=this.getBearing(),a=this.getPitch(),s=this.getPadding(),l="zoom"in t?+t.zoom:i,c="bearing"in t?this._normalizeBearing(t.bearing,o):o,u="pitch"in t?+t.pitch:a,d="padding"in t?t.padding:r.padding,h=e.pointGeometry.convert(t.offset);let p=r.centerPoint.add(h);const m=r.pointLocation(p),g=e.LngLat.convert(t.center||m);this._normalizeCenter(g);const f=r.project(m),_=r.project(g).sub(f),b=r.zoomScale(l-i);let v,y;t.around&&(v=e.LngLat.convert(t.around),y=r.locationPoint(v));const E={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||l!==i,this._rotating=this._rotating||o!==c,this._pitching=this._pitching||u!==a,this._padding=!r.isPaddingEqual(d),this._easeId=t.easeId,this._prepareEase(n,t.noMoveStart,E),this._ease((t=>{if(this._zooming&&(r.zoom=e.number(i,l,t)),this._rotating&&(r.bearing=e.number(o,c,t)),this._pitching&&(r.pitch=e.number(a,u,t)),this._padding&&(r.interpolatePadding(s,d,t),p=r.centerPoint.add(h)),v)r.setLocationAtPoint(v,y);else{const e=r.zoomScale(r.zoom-i),n=l>i?Math.min(2,b):Math.max(.5,b),o=Math.pow(n,1-t),a=r.unproject(f.add(_.mult(t*o)).mult(e));r.setLocationAtPoint(r.renderWorldCopies?a.wrap():a,p)}this._fireMoveEvents(n)}),(e=>{this._afterEase(n,e)}),t),this}_prepareEase(t,n,r={}){this._moving=!0,this.fire(new e.Event("freezeElevation",{freeze:!0})),n||r.moving||this.fire(new e.Event("movestart",t)),this._zooming&&!r.zooming&&this.fire(new e.Event("zoomstart",t)),this._rotating&&!r.rotating&&this.fire(new e.Event("rotatestart",t)),this._pitching&&!r.pitching&&this.fire(new e.Event("pitchstart",t))}_fireMoveEvents(t){this.fire(new e.Event("move",t)),this._zooming&&this.fire(new e.Event("zoom",t)),this._rotating&&this.fire(new e.Event("rotate",t)),this._pitching&&this.fire(new e.Event("pitch",t))}_afterEase(t,n){if(this._easeId&&n&&this._easeId===n)return;delete this._easeId,this.fire(new e.Event("freezeElevation",{freeze:!1}));const r=this._zooming,i=this._rotating,o=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,r&&this.fire(new e.Event("zoomend",t)),i&&this.fire(new e.Event("rotateend",t)),o&&this.fire(new e.Event("pitchend",t)),this.fire(new e.Event("moveend",t))}flyTo(t,n){if(!t.essential&&e.exported.prefersReducedMotion){const r=e.pick(t,["center","zoom","bearing","pitch","around"]);return this.jumpTo(r,n)}this.stop(),t=e.extend({offset:[0,0],speed:1.2,curve:1.42,easing:e.ease},t);const r=this.transform,i=this.getZoom(),o=this.getBearing(),a=this.getPitch(),s=this.getPadding(),l="zoom"in t?e.clamp(+t.zoom,r.minZoom,r.maxZoom):i,c="bearing"in t?this._normalizeBearing(t.bearing,o):o,u="pitch"in t?+t.pitch:a,d="padding"in t?t.padding:r.padding,h=r.zoomScale(l-i),p=e.pointGeometry.convert(t.offset);let m=r.centerPoint.add(p);const g=r.pointLocation(m),f=e.LngLat.convert(t.center||g);this._normalizeCenter(f);const _=r.project(g),b=r.project(f).sub(_);let v=t.curve;const y=Math.max(r.width,r.height),E=y/h,S=b.mag();if("minZoom"in t){const n=e.clamp(Math.min(t.minZoom,i,l),r.minZoom,r.maxZoom),o=y/r.zoomScale(n-i);v=Math.sqrt(o/S*2)}const w=v*v;function T(e){const t=(E*E-y*y+(e?-1:1)*w*w*S*S)/(2*(e?E:y)*w*S);return Math.log(Math.sqrt(t*t+1)-t)}function C(e){return(Math.exp(e)-Math.exp(-e))/2}function x(e){return(Math.exp(e)+Math.exp(-e))/2}const F=T(0);let D=function(e){return x(F)/x(F+v*e)},k=function(e){return y*((x(F)*(C(t=F+v*e)/x(t))-C(F))/w)/S;var t},O=(T(1)-F)/v;if(Math.abs(S)<1e-6||!isFinite(O)){if(Math.abs(y-E)<1e-6)return this.easeTo(t,n);const e=E<y?-1:1;O=Math.abs(Math.log(E/y))/v,k=function(){return 0},D=function(t){return Math.exp(e*v*t)}}return t.duration="duration"in t?+t.duration:1e3*O/("screenSpeed"in t?+t.screenSpeed/v:+t.speed),t.maxDuration&&t.duration>t.maxDuration&&(t.duration=0),this._zooming=!0,this._rotating=o!==c,this._pitching=u!==a,this._padding=!r.isPaddingEqual(d),this._prepareEase(n,!1),this._ease((t=>{const h=t*O,g=1/D(h);r.zoom=1===t?l:i+r.scaleZoom(g),this._rotating&&(r.bearing=e.number(o,c,t)),this._pitching&&(r.pitch=e.number(a,u,t)),this._padding&&(r.interpolatePadding(s,d,t),m=r.centerPoint.add(p));const v=1===t?f:r.unproject(_.add(b.mult(k(h))).mult(g));r.setLocationAtPoint(r.renderWorldCopies?v.wrap():v,m),this._fireMoveEvents(n)}),(()=>this._afterEase(n)),t),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(e,t){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const e=this._onEaseEnd;delete this._onEaseEnd,e.call(this,t)}if(!e){const e=this.handlers;e&&e.stop(!1)}return this}_ease(t,n,r){!1===r.animate||0===r.duration?(t(1),n()):(this._easeStart=e.exported.now(),this._easeOptions=r,this._onEaseFrame=t,this._onEaseEnd=n,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_renderFrameCallback(){const t=Math.min((e.exported.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(t)),t<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()}_normalizeBearing(t,n){t=e.wrap(t,-180,180);const r=Math.abs(t-n);return Math.abs(t-360-n)<r&&(t-=360),Math.abs(t+360-n)<r&&(t+=360),t}_normalizeCenter(e){const t=this.transform;if(!t.renderWorldCopies||t.lngRange)return;const n=e.lng-t.center.lng;e.lng+=n>180?-360:n<-180?360:0}}class ei{constructor(t={}){this.options=t,e.bindAll(["_toggleAttribution","_updateData","_updateCompact","_updateCompactMinimize"],this)}getDefaultPosition(){return"bottom-right"}onAdd(e){return this._map=e,this._compact=this.options&&this.options.compact,this._container=o.create("details","maplibregl-ctrl maplibregl-ctrl-attrib mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=o.create("summary","maplibregl-ctrl-attrib-button mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=o.create("div","maplibregl-ctrl-attrib-inner mapboxgl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){o.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(e,t){const n=this._map._getUIString(`AttributionControl.${t}`);e.title=n,e.setAttribute("aria-label",n)}_toggleAttribution(){this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show","mapboxgl-compact-show")):(this._container.classList.add("maplibregl-compact-show","mapboxgl-compact-show"),this._container.removeAttribute("open")))}_updateData(e){!e||"metadata"!==e.sourceDataType&&"visibility"!==e.sourceDataType&&"style"!==e.dataType&&"terrain"!==e.type||this._updateAttributions()}_updateAttributions(){if(!this._map.style)return;let e=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?e=e.concat(this.options.customAttribution.map((e=>"string"!=typeof e?"":e))):"string"==typeof this.options.customAttribution&&e.push(this.options.customAttribution)),this._map.style.stylesheet){const e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id}const t=this._map.style.sourceCaches;for(const n in t){const r=t[n];if(r.used||r.usedForTerrain){const t=r.getSource();t.attribution&&e.indexOf(t.attribution)<0&&e.push(t.attribution)}}e=e.filter((e=>String(e).trim())),e.sort(((e,t)=>e.length-t.length)),e=e.filter(((t,n)=>{for(let r=n+1;r<e.length;r++)if(e[r].indexOf(t)>=0)return!1;return!0}));const n=e.join(" | ");n!==this._attribHTML&&(this._attribHTML=n,e.length?(this._innerContainer.innerHTML=n,this._container.classList.remove("maplibregl-attrib-empty","mapboxgl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty","mapboxgl-attrib-empty"),this._updateCompact(),this._editLink=null)}_updateCompact(){this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1===this._compact?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","mapboxgl-compact","maplibregl-compact-show","mapboxgl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show","mapboxgl-compact","mapboxgl-compact-show"))}_updateCompactMinimize(){this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show","mapboxgl-compact-show")}}class ti{constructor(t={}){this.options=t,e.bindAll(["_updateCompact"],this)}getDefaultPosition(){return"bottom-left"}onAdd(e){this._map=e,this._compact=this.options&&this.options.compact,this._container=o.create("div","maplibregl-ctrl mapboxgl-ctrl");const t=o.create("a","maplibregl-ctrl-logo mapboxgl-ctrl-logo");return t.target="_blank",t.rel="noopener nofollow",t.href="https://maplibre.org/",t.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),t.setAttribute("rel","noopener nofollow"),this._container.appendChild(t),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){o.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}_updateCompact(){const e=this._container.children;if(e.length){const t=e[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1!==this._compact&&t.classList.add("maplibregl-compact","mapboxgl-compact"):t.classList.remove("maplibregl-compact","mapboxgl-compact")}}}class ni{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(e){const t=++this._id;return this._queue.push({callback:e,id:t,cancelled:!1}),t}remove(e){const t=this._currentlyRunning,n=t?this._queue.concat(t):this._queue;for(const t of n)if(t.id===e)return void(t.cancelled=!0)}run(e=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const t=this._currentlyRunning=this._queue;this._queue=[];for(const n of t)if(!n.cancelled&&(n.callback(e),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}const ri={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"Mapbox logo","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","TerrainControl.enableTerrain":"Enable terrain","TerrainControl.disableTerrain":"Disable terrain"},ii={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:void 0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,maplibreLogo:!1,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,localIdeographFontFamily:"sans-serif",transformRequest:null,fadeDuration:300,crossSourceCollisions:!0},oi={showCompass:!0,showZoom:!0,visualizePitch:!1};class ai{constructor(t,n,r=!1){this._clickTolerance=10,this.element=n,this.mouseRotate=new xr({clickTolerance:t.dragRotate._mouseRotate._clickTolerance}),this.map=t,r&&(this.mousePitch=new Fr({clickTolerance:t.dragRotate._mousePitch._clickTolerance})),e.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),o.addEventListener(n,"mousedown",this.mousedown),o.addEventListener(n,"touchstart",this.touchstart,{passive:!1}),o.addEventListener(n,"touchmove",this.touchmove),o.addEventListener(n,"touchend",this.touchend),o.addEventListener(n,"touchcancel",this.reset)}down(e,t){this.mouseRotate.mousedown(e,t),this.mousePitch&&this.mousePitch.mousedown(e,t),o.disableDrag()}move(e,t){const n=this.map,r=this.mouseRotate.mousemoveWindow(e,t);if(r&&r.bearingDelta&&n.setBearing(n.getBearing()+r.bearingDelta),this.mousePitch){const r=this.mousePitch.mousemoveWindow(e,t);r&&r.pitchDelta&&n.setPitch(n.getPitch()+r.pitchDelta)}}off(){const e=this.element;o.removeEventListener(e,"mousedown",this.mousedown),o.removeEventListener(e,"touchstart",this.touchstart,{passive:!1}),o.removeEventListener(e,"touchmove",this.touchmove),o.removeEventListener(e,"touchend",this.touchend),o.removeEventListener(e,"touchcancel",this.reset),this.offTemp()}offTemp(){o.enableDrag(),o.removeEventListener(window,"mousemove",this.mousemove),o.removeEventListener(window,"mouseup",this.mouseup)}mousedown(t){this.down(e.extend({},t,{ctrlKey:!0,preventDefault:()=>t.preventDefault()}),o.mousePos(this.element,t)),o.addEventListener(window,"mousemove",this.mousemove),o.addEventListener(window,"mouseup",this.mouseup)}mousemove(e){this.move(e,o.mousePos(this.element,e))}mouseup(e){this.mouseRotate.mouseupWindow(e),this.mousePitch&&this.mousePitch.mouseupWindow(e),this.offTemp()}touchstart(e){1!==e.targetTouches.length?this.reset():(this._startPos=this._lastPos=o.touchPos(this.element,e.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:()=>e.preventDefault()},this._startPos))}touchmove(e){1!==e.targetTouches.length?this.reset():(this._lastPos=o.touchPos(this.element,e.targetTouches)[0],this.move({preventDefault:()=>e.preventDefault()},this._lastPos))}touchend(e){0===e.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()}reset(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()}}function si(t,n,r){if(t=new e.LngLat(t.lng,t.lat),n){const i=new e.LngLat(t.lng-360,t.lat),o=new e.LngLat(t.lng+360,t.lat),a=r.locationPoint(t).distSqr(n);r.locationPoint(i).distSqr(n)<a?t=i:r.locationPoint(o).distSqr(n)<a&&(t=o)}for(;Math.abs(t.lng-r.center.lng)>180;){const e=r.locationPoint(t);if(e.x>=0&&e.y>=0&&e.x<=r.width&&e.y<=r.height)break;t.lng>r.center.lng?t.lng-=360:t.lng+=360}return t}const li={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function ci(e,t,n){const r=e.classList;for(const e in li)r.remove(`maplibregl-${n}-anchor-${e}`,`mapboxgl-${n}-anchor-${e}`);r.add(`maplibregl-${n}-anchor-${t}`,`mapboxgl-${n}-anchor-${t}`)}class ui extends e.Evented{constructor(t,n){if(super(),(t instanceof HTMLElement||n)&&(t=e.extend({element:t},n)),e.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=t&&t.anchor||"center",this._color=t&&t.color||"#3FB1CE",this._scale=t&&t.scale||1,this._draggable=t&&t.draggable||!1,this._clickTolerance=t&&t.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=t&&t.rotation||0,this._rotationAlignment=t&&t.rotationAlignment||"auto",this._pitchAlignment=t&&t.pitchAlignment&&"auto"!==t.pitchAlignment?t.pitchAlignment:this._rotationAlignment,t&&t.element)this._element=t.element,this._offset=e.pointGeometry.convert(t&&t.offset||[0,0]);else{this._defaultMarker=!0,this._element=o.create("div"),this._element.setAttribute("aria-label","Map marker");const n=o.createNS("http://www.w3.org/2000/svg","svg"),r=41,i=27;n.setAttributeNS(null,"display","block"),n.setAttributeNS(null,"height",`${r}px`),n.setAttributeNS(null,"width",`${i}px`),n.setAttributeNS(null,"viewBox",`0 0 ${i} ${r}`);const a=o.createNS("http://www.w3.org/2000/svg","g");a.setAttributeNS(null,"stroke","none"),a.setAttributeNS(null,"stroke-width","1"),a.setAttributeNS(null,"fill","none"),a.setAttributeNS(null,"fill-rule","evenodd");const s=o.createNS("http://www.w3.org/2000/svg","g");s.setAttributeNS(null,"fill-rule","nonzero");const l=o.createNS("http://www.w3.org/2000/svg","g");l.setAttributeNS(null,"transform","translate(3.0, 29.0)"),l.setAttributeNS(null,"fill","#000000");const c=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const e of c){const t=o.createNS("http://www.w3.org/2000/svg","ellipse");t.setAttributeNS(null,"opacity","0.04"),t.setAttributeNS(null,"cx","10.5"),t.setAttributeNS(null,"cy","5.80029008"),t.setAttributeNS(null,"rx",e.rx),t.setAttributeNS(null,"ry",e.ry),l.appendChild(t)}const u=o.createNS("http://www.w3.org/2000/svg","g");u.setAttributeNS(null,"fill",this._color);const d=o.createNS("http://www.w3.org/2000/svg","path");d.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),u.appendChild(d);const h=o.createNS("http://www.w3.org/2000/svg","g");h.setAttributeNS(null,"opacity","0.25"),h.setAttributeNS(null,"fill","#000000");const p=o.createNS("http://www.w3.org/2000/svg","path");p.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),h.appendChild(p);const m=o.createNS("http://www.w3.org/2000/svg","g");m.setAttributeNS(null,"transform","translate(6.0, 7.0)"),m.setAttributeNS(null,"fill","#FFFFFF");const g=o.createNS("http://www.w3.org/2000/svg","g");g.setAttributeNS(null,"transform","translate(8.0, 8.0)");const f=o.createNS("http://www.w3.org/2000/svg","circle");f.setAttributeNS(null,"fill","#000000"),f.setAttributeNS(null,"opacity","0.25"),f.setAttributeNS(null,"cx","5.5"),f.setAttributeNS(null,"cy","5.5"),f.setAttributeNS(null,"r","5.4999962");const _=o.createNS("http://www.w3.org/2000/svg","circle");_.setAttributeNS(null,"fill","#FFFFFF"),_.setAttributeNS(null,"cx","5.5"),_.setAttributeNS(null,"cy","5.5"),_.setAttributeNS(null,"r","5.4999962"),g.appendChild(f),g.appendChild(_),s.appendChild(l),s.appendChild(u),s.appendChild(h),s.appendChild(m),s.appendChild(g),n.appendChild(s),n.setAttributeNS(null,"height",r*this._scale+"px"),n.setAttributeNS(null,"width",i*this._scale+"px"),this._element.appendChild(n),this._offset=e.pointGeometry.convert(t&&t.offset||[0,-14])}this._element.classList.add("maplibregl-marker","mapboxgl-marker"),this._element.addEventListener("dragstart",(e=>{e.preventDefault()})),this._element.addEventListener("mousedown",(e=>{e.preventDefault()})),ci(this._element,this._anchor,"marker"),this._popup=null}addTo(e){return this.remove(),this._map=e,e.getCanvasContainer().appendChild(this._element),e.on("move",this._update),e.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),o.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(t){return this._lngLat=e.LngLat.convert(t),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(e){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),e){if(!("offset"in e.options)){const t=38.1,n=13.5,r=Math.sqrt(Math.pow(n,2)/2);e.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-t],"bottom-left":[r,-1*(t-n+r)],"bottom-right":[-r,-1*(t-n+r)],left:[n,-1*(t-n)],right:[-n,-1*(t-n)]}:this._offset}this._popup=e,this._lngLat&&this._popup.setLngLat(this._lngLat),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}_onKeyPress(e){const t=e.code,n=e.charCode||e.keyCode;"Space"!==t&&"Enter"!==t&&32!==n&&13!==n||this.togglePopup()}_onMapClick(e){const t=e.originalEvent.target,n=this._element;this._popup&&(t===n||n.contains(t))&&this.togglePopup()}getPopup(){return this._popup}togglePopup(){const e=this._popup;return e?(e.isOpen()?e.remove():e.addTo(this._map),this):this}_update(e){if(!this._map)return;this._map.transform.renderWorldCopies&&(this._lngLat=si(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);let t="";"viewport"===this._rotationAlignment||"auto"===this._rotationAlignment?t=`rotateZ(${this._rotation}deg)`:"map"===this._rotationAlignment&&(t=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let n="";"viewport"===this._pitchAlignment||"auto"===this._pitchAlignment?n="rotateX(0deg)":"map"===this._pitchAlignment&&(n=`rotateX(${this._map.getPitch()}deg)`),e&&"moveend"!==e.type||(this._pos=this._pos.round()),o.setTransform(this._element,`${li[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${n} ${t}`),this._map.style&&this._map.style.terrain&&!this._opacityTimeout&&(this._opacityTimeout=setTimeout((()=>{const e=this._map.unproject(this._pos),t=40075016.686*Math.abs(Math.cos(this._lngLat.lat*Math.PI/180))/Math.pow(2,this._map.transform.tileZoom+8);this._element.style.opacity=e.distanceTo(this._lngLat)>20*t?"0.2":"1.0",this._opacityTimeout=null}),100))}getOffset(){return this._offset}setOffset(t){return this._offset=e.pointGeometry.convert(t),this._update(),this}_onMove(t){if(!this._isDragging){const e=this._clickTolerance||this._map._clickTolerance;this._isDragging=t.point.dist(this._pointerdownPos)>=e}this._isDragging&&(this._pos=t.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new e.Event("dragstart"))),this.fire(new e.Event("drag")))}_onUp(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new e.Event("dragend")),this._state="inactive"}_addDragHandler(e){this._element.contains(e.originalEvent.target)&&(e.preventDefault(),this._positionDelta=e.point.sub(this._pos).add(this._offset),this._pointerdownPos=e.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))}setDraggable(e){return this._draggable=!!e,this._map&&(e?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(e){return this._rotation=e||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(e){return this._rotationAlignment=e||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(e){return this._pitchAlignment=e&&"auto"!==e?e:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}}const di={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let hi,pi=0,mi=!1;const gi={maxWidth:100,unit:"metric"};function fi(e,t,n){const r=n&&n.maxWidth||100,i=e._container.clientHeight/2,o=e.unproject([0,i]),a=e.unproject([r,i]),s=o.distanceTo(a);if(n&&"imperial"===n.unit){const n=3.2808*s;n>5280?_i(t,r,n/5280,e._getUIString("ScaleControl.Miles")):_i(t,r,n,e._getUIString("ScaleControl.Feet"))}else n&&"nautical"===n.unit?_i(t,r,s/1852,e._getUIString("ScaleControl.NauticalMiles")):s>=1e3?_i(t,r,s/1e3,e._getUIString("ScaleControl.Kilometers")):_i(t,r,s,e._getUIString("ScaleControl.Meters"))}function _i(e,t,n,r){const i=function(e){const t=Math.pow(10,`${Math.floor(e)}`.length-1);let n=e/t;return n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:n>=1?1:function(e){const t=Math.pow(10,Math.ceil(-Math.log(e)/Math.LN10));return Math.round(e*t)/t}(n),t*n}(n);e.style.width=t*(i/n)+"px",e.innerHTML=`${i} ${r}`}const bi={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},vi=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function yi(t){if(t){if("number"==typeof t){const n=Math.round(Math.sqrt(.5*Math.pow(t,2)));return{center:new e.pointGeometry(0,0),top:new e.pointGeometry(0,t),"top-left":new e.pointGeometry(n,n),"top-right":new e.pointGeometry(-n,n),bottom:new e.pointGeometry(0,-t),"bottom-left":new e.pointGeometry(n,-n),"bottom-right":new e.pointGeometry(-n,-n),left:new e.pointGeometry(t,0),right:new e.pointGeometry(-t,0)}}if(t instanceof e.pointGeometry||Array.isArray(t)){const n=e.pointGeometry.convert(t);return{center:n,top:n,"top-left":n,"top-right":n,bottom:n,"bottom-left":n,"bottom-right":n,left:n,right:n}}return{center:e.pointGeometry.convert(t.center||[0,0]),top:e.pointGeometry.convert(t.top||[0,0]),"top-left":e.pointGeometry.convert(t["top-left"]||[0,0]),"top-right":e.pointGeometry.convert(t["top-right"]||[0,0]),bottom:e.pointGeometry.convert(t.bottom||[0,0]),"bottom-left":e.pointGeometry.convert(t["bottom-left"]||[0,0]),"bottom-right":e.pointGeometry.convert(t["bottom-right"]||[0,0]),left:e.pointGeometry.convert(t.left||[0,0]),right:e.pointGeometry.convert(t.right||[0,0])}}return yi(new e.pointGeometry(0,0))}const Ei={supported:t,setRTLTextPlugin:e.setRTLTextPlugin,getRTLTextPluginStatus:e.getRTLTextPluginStatus,Map:class extends Jr{constructor(t){var n;if(e.PerformanceUtils.mark(e.PerformanceMarkers.create),null!=(t=e.extend({},ii,t)).minZoom&&null!=t.maxZoom&&t.minZoom>t.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=t.minPitch&&null!=t.maxPitch&&t.minPitch>t.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=t.minPitch&&t.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=t.maxPitch&&t.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new rr(t.minZoom,t.maxZoom,t.minPitch,t.maxPitch,t.renderWorldCopies),{bearingSnap:t.bearingSnap}),this._interactive=t.interactive,this._cooperativeGestures=t.cooperativeGestures,this._maxTileCacheSize=t.maxTileCacheSize,this._failIfMajorPerformanceCaveat=t.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=t.preserveDrawingBuffer,this._antialias=t.antialias,this._trackResize=t.trackResize,this._bearingSnap=t.bearingSnap,this._refreshExpiredTiles=t.refreshExpiredTiles,this._fadeDuration=t.fadeDuration,this._crossSourceCollisions=t.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=t.collectResourceTiming,this._renderTaskQueue=new ni,this._controls=[],this._mapId=e.uniqueId(),this._locale=e.extend({},ri,t.locale),this._clickTolerance=t.clickTolerance,this._pixelRatio=null!==(n=t.pixelRatio)&&void 0!==n?n:devicePixelRatio,this._requestManager=new a(t.transformRequest),"string"==typeof t.container){if(this._container=document.getElementById(t.container),!this._container)throw new Error(`Container '${t.container}' not found.`)}else{if(!(t.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=t.container}if(t.maxBounds&&this.setMaxBounds(t.maxBounds),e.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",(()=>this._update(!1))),this.on("moveend",(()=>this._update(!1))),this.on("zoom",(()=>this._update(!0))),this.on("terrain",(()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)})),"undefined"!=typeof window&&(addEventListener("online",this._onWindowOnline,!1),addEventListener("resize",this._onWindowResize,!1),addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new Xr(this,t),this._cooperativeGestures&&this._setupCooperativeGestures(),this._hash=t.hash&&new ir("string"==typeof t.hash&&t.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:t.center,zoom:t.zoom,bearing:t.bearing,pitch:t.pitch}),t.bounds&&(this.resize(),this.fitBounds(t.bounds,e.extend({},t.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=t.localIdeographFontFamily,t.style&&this.setStyle(t.style,{localIdeographFontFamily:t.localIdeographFontFamily}),t.attributionControl&&this.addControl(new ei({customAttribution:t.customAttribution})),t.maplibreLogo&&this.addControl(new ti,t.logoPosition),this.on("style.load",(()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)})),this.on("data",(t=>{this._update("style"===t.dataType),this.fire(new e.Event(`${t.dataType}data`,t))})),this.on("dataloading",(t=>{this.fire(new e.Event(`${t.dataType}dataloading`,t))})),this.on("dataabort",(t=>{this.fire(new e.Event("sourcedataabort",t))}))}_getMapId(){return this._mapId}addControl(t,n){if(void 0===n&&(n=t.getDefaultPosition?t.getDefaultPosition():"top-right"),!t||!t.onAdd)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const r=t.onAdd(this);this._controls.push(t);const i=this._controlPositions[n];return-1!==n.indexOf("bottom")?i.insertBefore(r,i.firstChild):i.appendChild(r),this}removeControl(t){if(!t||!t.onRemove)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const n=this._controls.indexOf(t);return n>-1&&this._controls.splice(n,1),t.onRemove(this),this}hasControl(e){return this._controls.indexOf(e)>-1}calculateCameraOptionsFromTo(e,t,n,r){return null==r&&this.style.terrain&&(r=this.transform.getElevation(n,this.style.terrain)),super.calculateCameraOptionsFromTo(e,t,n,r)}resize(t){const n=this._containerDimensions(),r=n[0],i=n[1];this._resizeCanvas(r,i,this.getPixelRatio()),this.transform.resize(r,i),this.painter.resize(r,i,this.getPixelRatio());const o=!this._moving;return o&&(this.stop(),this.fire(new e.Event("movestart",t)).fire(new e.Event("move",t))),this.fire(new e.Event("resize",t)),o&&this.fire(new e.Event("moveend",t)),this}getPixelRatio(){return this._pixelRatio}setPixelRatio(e){const[t,n]=this._containerDimensions();this._pixelRatio=e,this._resizeCanvas(t,n,e),this.painter.resize(t,n,e)}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(t){return this.transform.setMaxBounds(e.LngLatBounds.convert(t)),this._update()}setMinZoom(e){if((e=null==e?-2:e)>=-2&&e<=this.transform.maxZoom)return this.transform.minZoom=e,this._update(),this.getZoom()<e&&this.setZoom(e),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(e){if((e=null==e?22:e)>=this.transform.minZoom)return this.transform.maxZoom=e,this._update(),this.getZoom()>e&&this.setZoom(e),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(e){if((e=null==e?0:e)<0)throw new Error("minPitch must be greater than or equal to 0");if(e>=0&&e<=this.transform.maxPitch)return this.transform.minPitch=e,this._update(),this.getPitch()<e&&this.setPitch(e),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(e){if((e=null==e?60:e)>85)throw new Error("maxPitch must be less than or equal to 85");if(e>=this.transform.minPitch)return this.transform.maxPitch=e,this._update(),this.getPitch()>e&&this.setPitch(e),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(e){return this.transform.renderWorldCopies=e,this._update()}project(t){return this.transform.locationPoint(e.LngLat.convert(t),this.style&&this.style.terrain)}unproject(t){return this.transform.pointLocation(e.pointGeometry.convert(t),this.style&&this.style.terrain)}isMoving(){return this._moving||this.handlers.isMoving()}isZooming(){return this._zooming||this.handlers.isZooming()}isRotating(){return this._rotating||this.handlers.isRotating()}_createDelegatedListener(e,t,n){if("mouseenter"===e||"mouseover"===e){let r=!1;const i=i=>{const o=this.getLayer(t)?this.queryRenderedFeatures(i.point,{layers:[t]}):[];o.length?r||(r=!0,n.call(this,new pr(e,this,i.originalEvent,{features:o}))):r=!1};return{layer:t,listener:n,delegates:{mousemove:i,mouseout:()=>{r=!1}}}}if("mouseleave"===e||"mouseout"===e){let r=!1;const i=i=>{(this.getLayer(t)?this.queryRenderedFeatures(i.point,{layers:[t]}):[]).length?r=!0:r&&(r=!1,n.call(this,new pr(e,this,i.originalEvent)))},o=t=>{r&&(r=!1,n.call(this,new pr(e,this,t.originalEvent)))};return{layer:t,listener:n,delegates:{mousemove:i,mouseout:o}}}{const r=e=>{const r=this.getLayer(t)?this.queryRenderedFeatures(e.point,{layers:[t]}):[];r.length&&(e.features=r,n.call(this,e),delete e.features)};return{layer:t,listener:n,delegates:{[e]:r}}}}on(e,t,n){if(void 0===n)return super.on(e,t);const r=this._createDelegatedListener(e,t,n);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[e]=this._delegatedListeners[e]||[],this._delegatedListeners[e].push(r);for(const e in r.delegates)this.on(e,r.delegates[e]);return this}once(e,t,n){if(void 0===n)return super.once(e,t);const r=this._createDelegatedListener(e,t,n);for(const e in r.delegates)this.once(e,r.delegates[e]);return this}off(e,t,n){return void 0===n?super.off(e,t):(this._delegatedListeners&&this._delegatedListeners[e]&&(r=>{const i=this._delegatedListeners[e];for(let e=0;e<i.length;e++){const r=i[e];if(r.layer===t&&r.listener===n){for(const e in r.delegates)this.off(e,r.delegates[e]);return i.splice(e,1),this}}})(),this)}queryRenderedFeatures(t,n){if(!this.style)return[];let r;if(void 0!==n||void 0===t||t instanceof e.pointGeometry||Array.isArray(t)||(n=t,t=void 0),n=n||{},(t=t||[[0,0],[this.transform.width,this.transform.height]])instanceof e.pointGeometry||"number"==typeof t[0])r=[e.pointGeometry.convert(t)];else{const n=e.pointGeometry.convert(t[0]),i=e.pointGeometry.convert(t[1]);r=[n,new e.pointGeometry(i.x,n.y),i,new e.pointGeometry(n.x,i.y),n]}return this.style.queryRenderedFeatures(r,n,this.transform)}querySourceFeatures(e,t){return this.style.querySourceFeatures(e,t)}setStyle(t,n){return!1!==(n=e.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},n)).diff&&n.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&t?(this._diffStyle(t,n),this):(this._localIdeographFontFamily=n.localIdeographFontFamily,this._updateStyle(t,n))}setTransformRequest(e){return this._requestManager.setTransformRequest(e),this}_getUIString(e){const t=this._locale[e];if(null==t)throw new Error(`Missing UI string '${e}'`);return t}_updateStyle(e,t){return this.style&&(this.style.setEventedParent(null),this.style._remove()),e?(this.style=new tt(this,t||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof e?this.style.loadURL(e):this.style.loadJSON(e),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new tt(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(t,n){if("string"==typeof t){const r=this._requestManager.transformRequest(t,e.ResourceType.Style);e.getJSON(r,((t,r)=>{t?this.fire(new e.ErrorEvent(t)):r&&this._updateDiff(r,n)}))}else"object"==typeof t&&this._updateDiff(t,n)}_updateDiff(t,n){try{this.style.setState(t)&&this._update(!0)}catch(r){e.warnOnce(`Unable to perform style diff: ${r.message||r.error||r}. Rebuilding the style from scratch.`),this._updateStyle(t,n)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():e.warnOnce("There is no style added to the map.")}addSource(e,t){return this._lazyInitEmptyStyle(),this.style.addSource(e,t),this._update(!0)}isSourceLoaded(t){const n=this.style&&this.style.sourceCaches[t];if(void 0!==n)return n.loaded();this.fire(new e.ErrorEvent(new Error(`There is no source with ID '${t}'`)))}setTerrain(e){return this.style.setTerrain(e),this}getTerrain(){return this.style.terrain&&this.style.terrain.options}areTilesLoaded(){const e=this.style&&this.style.sourceCaches;for(const t in e){const n=e[t]._tiles;for(const e in n){const t=n[e];if("loaded"!==t.state&&"errored"!==t.state)return!1}}return!0}addSourceType(e,t,n){return this._lazyInitEmptyStyle(),this.style.addSourceType(e,t,n)}removeSource(e){return this.style.removeSource(e),this._update(!0)}getSource(e){return this.style.getSource(e)}addImage(t,n,{pixelRatio:r=1,sdf:i=!1,stretchX:o,stretchY:a,content:s}={}){if(this._lazyInitEmptyStyle(),n instanceof HTMLImageElement||e.isImageBitmap(n)){const{width:l,height:c,data:u}=e.exported.getImageData(n);this.style.addImage(t,{data:new e.RGBAImage({width:l,height:c},u),pixelRatio:r,stretchX:o,stretchY:a,content:s,sdf:i,version:0})}else{if(void 0===n.width||void 0===n.height)return this.fire(new e.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:l,height:c,data:u}=n,d=n;this.style.addImage(t,{data:new e.RGBAImage({width:l,height:c},new Uint8Array(u)),pixelRatio:r,stretchX:o,stretchY:a,content:s,sdf:i,version:0,userImage:d}),d.onAdd&&d.onAdd(this,t)}}}updateImage(t,n){const r=this.style.getImage(t);if(!r)return this.fire(new e.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const i=n instanceof HTMLImageElement||e.isImageBitmap(n)?e.exported.getImageData(n):n,{width:o,height:a,data:s}=i;if(void 0===o||void 0===a)return this.fire(new e.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(o!==r.data.width||a!==r.data.height)return this.fire(new e.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image")));const l=!(n instanceof HTMLImageElement||e.isImageBitmap(n));r.data.replace(s,l),this.style.updateImage(t,r)}hasImage(t){return t?!!this.style.getImage(t):(this.fire(new e.ErrorEvent(new Error("Missing required image id"))),!1)}removeImage(e){this.style.removeImage(e)}loadImage(t,n){e.getImage(this._requestManager.transformRequest(t,e.ResourceType.Image),n)}listImages(){return this.style.listImages()}addLayer(e,t){return this._lazyInitEmptyStyle(),this.style.addLayer(e,t),this._update(!0)}moveLayer(e,t){return this.style.moveLayer(e,t),this._update(!0)}removeLayer(e){return this.style.removeLayer(e),this._update(!0)}getLayer(e){return this.style.getLayer(e)}setLayerZoomRange(e,t,n){return this.style.setLayerZoomRange(e,t,n),this._update(!0)}setFilter(e,t,n={}){return this.style.setFilter(e,t,n),this._update(!0)}getFilter(e){return this.style.getFilter(e)}setPaintProperty(e,t,n,r={}){return this.style.setPaintProperty(e,t,n,r),this._update(!0)}getPaintProperty(e,t){return this.style.getPaintProperty(e,t)}setLayoutProperty(e,t,n,r={}){return this.style.setLayoutProperty(e,t,n,r),this._update(!0)}getLayoutProperty(e,t){return this.style.getLayoutProperty(e,t)}setLight(e,t={}){return this._lazyInitEmptyStyle(),this.style.setLight(e,t),this._update(!0)}getLight(){return this.style.getLight()}setFeatureState(e,t){return this.style.setFeatureState(e,t),this._update()}removeFeatureState(e,t){return this.style.removeFeatureState(e,t),this._update()}getFeatureState(e){return this.style.getFeatureState(e)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let e=0,t=0;return this._container&&(e=this._container.clientWidth||400,t=this._container.clientHeight||300),[e,t]}_setupContainer(){const e=this._container;e.classList.add("maplibregl-map","mapboxgl-map");const t=this._canvasContainer=o.create("div","maplibregl-canvas-container mapboxgl-canvas-container",e);this._interactive&&t.classList.add("maplibregl-interactive","mapboxgl-interactive"),this._canvas=o.create("canvas","maplibregl-canvas mapboxgl-canvas",t),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map"),this._canvas.setAttribute("role","region");const n=this._containerDimensions();this._resizeCanvas(n[0],n[1],this.getPixelRatio());const r=this._controlContainer=o.create("div","maplibregl-control-container mapboxgl-control-container",e),i=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach((e=>{i[e]=o.create("div",`maplibregl-ctrl-${e} mapboxgl-ctrl-${e}`,r)})),this._container.addEventListener("scroll",this._onMapScroll,!1)}_setupCooperativeGestures(){const e=this._container;this._metaPress=!1,this._cooperativeGesturesScreen=o.create("div","maplibregl-cooperative-gesture-screen",e);let t="Control",n="boolean"!=typeof this._cooperativeGestures&&this._cooperativeGestures.windowsHelpText?this._cooperativeGestures.windowsHelpText:"Use Ctrl + scroll to zoom the map";0===navigator.platform.indexOf("Mac")&&(n="boolean"!=typeof this._cooperativeGestures&&this._cooperativeGestures.macHelpText?this._cooperativeGestures.macHelpText:"Use ⌘ + scroll to zoom the map",t="Meta"),this._cooperativeGesturesScreen.innerHTML=`\n <div class="maplibregl-desktop-message">${n}</div>\n <div class="maplibregl-mobile-message">${"boolean"!=typeof this._cooperativeGestures&&this._cooperativeGestures.mobileHelpText?this._cooperativeGestures.mobileHelpText:"Use two fingers to move the map"}</div>\n `,document.addEventListener("keydown",(e=>{e.key===t&&(this._metaPress=!0)})),document.addEventListener("keyup",(e=>{e.key===t&&(this._metaPress=!1)})),this._canvasContainer.addEventListener("wheel",(e=>{this._onCooperativeGesture(e,this._metaPress,1)}),!1),this._canvasContainer.classList.remove("mapboxgl-touch-drag-pan","maplibregl-touch-drag-pan")}_resizeCanvas(e,t,n){this._canvas.width=n*e,this._canvas.height=n*t,this._canvas.style.width=`${e}px`,this._canvas.style.height=`${t}px`}_setupPainter(){const n=e.extend({},t.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),r=this._canvas.getContext("webgl",n)||this._canvas.getContext("experimental-webgl",n);r?(this.painter=new Jn(r,this.transform),e.exported$1.testSupport(r)):this.fire(new e.ErrorEvent(new Error("Failed to initialize WebGL")))}_contextLost(t){t.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new e.Event("webglcontextlost",{originalEvent:t}))}_contextRestored(t){this._setupPainter(),this.resize(),this._update(),this.fire(new e.Event("webglcontextrestored",{originalEvent:t}))}_onMapScroll(e){if(e.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1}_onCooperativeGesture(e,t,n){return!t&&n<2&&(this._cooperativeGesturesScreen.classList.add("maplibregl-show"),setTimeout((()=>{this._cooperativeGesturesScreen.classList.remove("maplibregl-show")}),100)),!1}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(e){return this.style?(this._styleDirty=this._styleDirty||e,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(e){return this._update(),this._renderTaskQueue.add(e)}_cancelRenderFrame(e){this._renderTaskQueue.remove(e)}_render(t){let n,r=0;const i=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(n=i.createQueryEXT(),i.beginQueryEXT(i.TIME_ELAPSED_EXT,n),r=e.exported.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(t),this._removed)return;let o=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const t=this.transform.zoom,n=e.exported.now();this.style.zoomHistory.update(t,n);const r=new e.EvaluationParameters(t,{now:n,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),i=r.crossFadingFactor();1===i&&i===this._crossFadingFactor||(o=!0,this._crossFadingFactor=i),this.style.update(r)}if(this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.style.terrain&&this.style.terrain.sourceCache.update(this.transform,this.style.terrain),this.transform.updateElevation(this.style.terrain),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:this._fadeDuration,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer")}),this.fire(new e.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,e.PerformanceUtils.mark(e.PerformanceMarkers.load),this.fire(new e.Event("load"))),this.style&&(this.style.hasTransitions()||o)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){const t=e.exported.now()-r;i.endQueryEXT(i.TIME_ELAPSED_EXT,n),setTimeout((()=>{const r=i.getQueryObjectEXT(n,i.QUERY_RESULT_EXT)/1e6;i.deleteQueryEXT(n),this.fire(new e.Event("gpu-timing-frame",{cpuTime:t,gpuTime:r}))}),50)}if(this.listens("gpu-timing-layer")){const t=this.painter.collectGpuTimers();setTimeout((()=>{const n=this.painter.queryGpuTimers(t);this.fire(new e.Event("gpu-timing-layer",{layerTimes:n}))}),50)}const a=this._sourcesDirty||this._styleDirty||this._placementDirty;return a||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new e.Event("idle")),!this._loaded||this._fullyLoaded||a||(this._fullyLoaded=!0,e.PerformanceUtils.mark(e.PerformanceMarkers.fullLoad)),this}redraw(){return this.style&&(this._frame&&(this._frame.cancel(),this._frame=null),this._render(0)),this}remove(){this._hash&&this._hash.remove();for(const e of this._controls)e.onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),"undefined"!=typeof window&&(removeEventListener("resize",this._onWindowResize,!1),removeEventListener("orientationchange",this._onWindowResize,!1),removeEventListener("online",this._onWindowOnline,!1));const t=this.painter.context.gl.getExtension("WEBGL_lose_context");t&&t.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),o.remove(this._canvasContainer),o.remove(this._controlContainer),this._cooperativeGestures&&o.remove(this._cooperativeGesturesScreen),this._container.classList.remove("maplibregl-map","mapboxgl-map"),e.PerformanceUtils.clearMetrics(),this._removed=!0,this.fire(new e.Event("remove"))}triggerRepaint(){this.style&&!this._frame&&(this._frame=e.exported.frame((t=>{e.PerformanceUtils.frame(t),this._frame=null,this._render(t)})))}_onWindowOnline(){this._update()}_onWindowResize(e){this._trackResize&&this.resize({originalEvent:e})._update()}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(e){this._showTileBoundaries!==e&&(this._showTileBoundaries=e,this._update())}get showPadding(){return!!this._showPadding}set showPadding(e){this._showPadding!==e&&(this._showPadding=e,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(e){this._showCollisionBoxes!==e&&(this._showCollisionBoxes=e,e?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(e){this._showOverdrawInspector!==e&&(this._showOverdrawInspector=e,this._update())}get repaint(){return!!this._repaint}set repaint(e){this._repaint!==e&&(this._repaint=e,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(e){this._vertices=e,this._update()}_setCacheLimits(t,n){e.setCacheLimits(t,n)}get version(){return"2.4.0"}},NavigationControl:class{constructor(t){this.options=e.extend({},oi,t),this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-group mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",(e=>e.preventDefault())),this.options.showZoom&&(e.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in mapboxgl-ctrl-zoom-in",(e=>this._map.zoomIn({},{originalEvent:e}))),o.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out mapboxgl-ctrl-zoom-out",(e=>this._map.zoomOut({},{originalEvent:e}))),o.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(e.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("maplibregl-ctrl-compass mapboxgl-ctrl-compass",(e=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:e}):this._map.resetNorth({},{originalEvent:e})})),this._compassIcon=o.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}_updateZoomButtons(){const e=this._map.getZoom(),t=e===this._map.getMaxZoom(),n=e===this._map.getMinZoom();this._zoomInButton.disabled=t,this._zoomOutButton.disabled=n,this._zoomInButton.setAttribute("aria-disabled",t.toString()),this._zoomOutButton.setAttribute("aria-disabled",n.toString())}_rotateCompassArrow(){const e=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=e}onAdd(e){return this._map=e,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new ai(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){o.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(e,t){const n=o.create("button",e,this._container);return n.type="button",n.addEventListener("click",t),n}_setButtonTitle(e,t){const n=this._map._getUIString(`NavigationControl.${t}`);e.title=n,e.setAttribute("aria-label",n)}},GeolocateControl:class extends e.Evented{constructor(t){super(),this.options=e.extend({},di,t),e.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}onAdd(e){var t;return this._map=e,this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-group mapboxgl-ctrl mapboxgl-ctrl-group"),t=this._setupUI,void 0!==hi?t(hi):void 0!==window.navigator.permissions?window.navigator.permissions.query({name:"geolocation"}).then((e=>{hi="denied"!==e.state,t(hi)})):(hi=!!window.navigator.geolocation,t(hi)),this._container}onRemove(){void 0!==this._geolocationWatchID&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),o.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,pi=0,mi=!1}_isOutOfMapMaxBounds(e){const t=this._map.getMaxBounds(),n=e.coords;return t&&(n.longitude<t.getWest()||n.longitude>t.getEast()||n.latitude<t.getSouth()||n.latitude>t.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error","mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error","mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background","mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error","mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_onSuccess(t){if(this._map){if(this._isOutOfMapMaxBounds(t))return this._setErrorState(),this.fire(new e.Event("outofmaxbounds",t)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=t,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error","mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error","mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background","mapboxgl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(t),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(t),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale","mapboxgl-user-location-dot-stale"),this.fire(new e.Event("geolocate",t)),this._finish()}}_updateCamera(t){const n=new e.LngLat(t.coords.longitude,t.coords.latitude),r=t.coords.accuracy,i=this._map.getBearing(),o=e.extend({bearing:i},this.options.fitBoundsOptions);this._map.fitBounds(n.toBounds(r),o,{geolocateSource:!0})}_updateMarker(t){if(t){const n=new e.LngLat(t.coords.longitude,t.coords.latitude);this._accuracyCircleMarker.setLngLat(n).addTo(this._map),this._userLocationDotMarker.setLngLat(n).addTo(this._map),this._accuracy=t.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()}_updateCircleRadius(){const e=this._map._container.clientHeight/2,t=this._map.unproject([0,e]),n=this._map.unproject([1,e]),r=t.distanceTo(n),i=Math.ceil(2*this._accuracy/r);this._circleElement.style.width=`${i}px`,this._circleElement.style.height=`${i}px`}_onZoom(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}_onError(t){if(this._map){if(this.options.trackUserLocation)if(1===t.code){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error","mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background","mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error","mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===t.code&&mi)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale","mapboxgl-user-location-dot-stale"),this.fire(new e.Event("error",t)),this._finish()}}_finish(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}_setupUI(t){if(this._container.addEventListener("contextmenu",(e=>e.preventDefault())),this._geolocateButton=o.create("button","maplibregl-ctrl-geolocate mapboxgl-ctrl-geolocate",this._container),o.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",!1===t){e.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");const t=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=t,this._geolocateButton.setAttribute("aria-label",t)}else{const e=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=o.create("div","maplibregl-user-location-dot mapboxgl-user-location-dot"),this._userLocationDotMarker=new ui(this._dotElement),this._circleElement=o.create("div","maplibregl-user-location-accuracy-circle mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new ui({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(t=>{t.geolocateSource||"ACTIVE_LOCK"!==this._watchState||t.originalEvent&&"resize"===t.originalEvent.type||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background","mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active"),this.fire(new e.Event("trackuserlocationend")))}))}trigger(){if(!this._setup)return e.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new e.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":pi--,mi=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error","mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background","mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error","mapboxgl-ctrl-geolocate-background-error"),this.fire(new e.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background","mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new e.Event("trackuserlocationstart"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){let e;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),pi++,pi>1?(e={maximumAge:6e5,timeout:0},mi=!0):(e=this.options.positionOptions,mi=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},AttributionControl:ei,LogoControl:ti,ScaleControl:class{constructor(t){this.options=e.extend({},gi,t),e.bindAll(["_onMove","setUnit"],this)}getDefaultPosition(){return"bottom-left"}_onMove(){fi(this._map,this._container,this.options)}onAdd(e){return this._map=e,this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-scale mapboxgl-ctrl mapboxgl-ctrl-scale",e.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){o.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}setUnit(e){this.options.unit=e,fi(this._map,this._container,this.options)}},FullscreenControl:class{constructor(t){this._fullscreen=!1,t&&t.container&&(t.container instanceof HTMLElement?this._container=t.container:e.warnOnce("Full screen control 'container' must be a DOM element.")),e.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(t){return this._map=t,this._container||(this._container=this._map.getContainer()),this._controlContainer=o.create("div","maplibregl-ctrl maplibregl-ctrl-group mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",e.warnOnce("This device does not support fullscreen mode.")),this._controlContainer}onRemove(){o.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._changeIcon)}_checkFullscreenSupport(){return!!(document.fullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled)}_setupUI(){const e=this._fullscreenButton=o.create("button","maplibregl-ctrl-fullscreen mapboxgl-ctrl-fullscreen",this._controlContainer);o.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",e).setAttribute("aria-hidden","true"),e.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._changeIcon)}_updateTitle(){const e=this._getTitle();this._fullscreenButton.setAttribute("aria-label",e),this._fullscreenButton.title=e}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_changeIcon(){(window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())}_onClickFullscreen(){this._isFullscreen()?window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen&&window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()}},TerrainControl:class{constructor(t){this.options=t,e.bindAll(["_toggleTerrain","_updateTerrainIcon"],this)}onAdd(e){return this._map=e,this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-group mapboxgl-ctrl mapboxgl-ctrl-group"),this._terrainButton=o.create("button","maplibregl-ctrl-terrain mapboxgl-ctrl-terrain",this._container),o.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){o.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}_toggleTerrain(){this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()}_updateTerrainIcon(){this._terrainButton.classList.remove("maplibregl-ctrl-terrain","mapboxgl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled","mapboxgl-ctrl-terrain-enabled"),this._map.style.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled","mapboxgl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.disableTerrain")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain","mapboxgl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.enableTerrain"))}},Popup:class extends e.Evented{constructor(t){super(),this.options=e.extend(Object.create(bi),t),e.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}addTo(t){return this._map&&this.remove(),this._map=t,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer","mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer","mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new e.Event("open")),this}isOpen(){return!!this._map}remove(){return this._content&&o.remove(this._content),this._container&&(o.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new e.Event("close")),this}getLngLat(){return this._lngLat}setLngLat(t){return this._lngLat=e.LngLat.convert(t),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer","mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer","mapboxgl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer","mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer","mapboxgl-track-pointer")),this}getElement(){return this._container}setText(e){return this.setDOMContent(document.createTextNode(e))}setHTML(e){const t=document.createDocumentFragment(),n=document.createElement("body");let r;for(n.innerHTML=e;r=n.firstChild,r;)t.appendChild(r);return this.setDOMContent(t)}getMaxWidth(){return this._container&&this._container.style.maxWidth}setMaxWidth(e){return this.options.maxWidth=e,this._update(),this}setDOMContent(e){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=o.create("div","maplibregl-popup-content mapboxgl-popup-content",this._container);return this._content.appendChild(e),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(e){this._container&&this._container.classList.add(e)}removeClassName(e){this._container&&this._container.classList.remove(e)}setOffset(e){return this.options.offset=e,this._update(),this}toggleClassName(e){if(this._container)return this._container.classList.toggle(e)}_createCloseButton(){this.options.closeButton&&(this._closeButton=o.create("button","maplibregl-popup-close-button mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_onMouseUp(e){this._update(e.point)}_onMouseMove(e){this._update(e.point)}_onDrag(e){this._update(e.point)}_update(e){if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(this._container||(this._container=o.create("div","maplibregl-popup mapboxgl-popup",this._map.getContainer()),this._tip=o.create("div","maplibregl-popup-tip mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach((e=>this._container.classList.add(e))),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer","mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=si(this._lngLat,this._pos,this._map.transform)),this._trackPointer&&!e)return;const t=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat);let n=this.options.anchor;const r=yi(this.options.offset);if(!n){const e=this._container.offsetWidth,i=this._container.offsetHeight;let o;o=t.y+r.bottom.y<i?["top"]:t.y>this._map.transform.height-i?["bottom"]:[],t.x<e/2?o.push("left"):t.x>this._map.transform.width-e/2&&o.push("right"),n=0===o.length?"bottom":o.join("-")}const i=t.add(r[n]).round();o.setTransform(this._container,`${li[n]} translate(${i.x}px,${i.y}px)`),ci(this._container,n,"popup")}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const e=this._container.querySelector(vi);e&&e.focus()}_onClose(){this.remove()}},Marker:ui,Style:tt,LngLat:e.LngLat,LngLatBounds:e.LngLatBounds,Point:e.pointGeometry,MercatorCoordinate:e.MercatorCoordinate,Evented:e.Evented,AJAXError:e.AJAXError,config:e.config,CanvasSource:O,GeoJSONSource:x,ImageSource:D,RasterDEMTileSource:C,RasterTileSource:w,VectorTileSource:S,VideoSource:k,prewarm:function(){V().acquire(G)},clearPrewarmedResources:function(){const e=q;e&&(e.isPreloaded()&&1===e.numActive()?(e.release(G),q=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get version(){return"2.4.0"},get workerCount(){return z.workerCount},set workerCount(e){z.workerCount=e},get maxParallelImageRequests(){return e.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(t){e.config.MAX_PARALLEL_IMAGE_REQUESTS=t},clearStorage(t){e.clearTileCache(t)},workerUrl:"",addProtocol(t,n){e.config.REGISTERED_PROTOCOLS[t]=n},removeProtocol(t){delete e.config.REGISTERED_PROTOCOLS[t]}};return Zr.extend(Ei,{isSafari:e.isSafari,getPerformanceMetrics:e.PerformanceUtils.getPerformanceMetrics}),Ei})),n}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=e=>{function t(e){const t=parseFloat(e);return Number.isNaN(t)?null:t}const n=e.match(/^\s*geo:(.*?)\s*$/);if(!n)return;const r=n[1].split(";"),i=r[0].split(",");let o;for(const e of r.slice(1)){const n=e.match(/u=(.*)/);n&&(o=t(n[1]))}return{latitude:t(i[0]),longitude:t(i[1]),altitude:t(i[2]),accuracy:o,altitudeAccuracy:null,heading:null,speed:null}}},function(e,t,n){"use strict";let r=n(1105),i=n(725);class o extends Error{constructor(e,t,n,r,i,a){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),r&&(this.source=r),a&&(this.plugin=a),void 0!==t&&void 0!==n&&("number"==typeof t?(this.line=t,this.column=n):(this.line=t.line,this.column=t.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,o)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=r.isColorSupported),i&&e&&(t=i(t));let n,o,a=t.split(/\r?\n/),s=Math.max(this.line-3,0),l=Math.min(this.line+2,a.length),c=String(l).length;if(e){let{bold:e,red:t,gray:i}=r.createColors(!0);n=n=>e(t(n)),o=e=>i(e)}else n=o=e=>e;return a.slice(s,l).map(((e,t)=>{let r=s+1+t,i=" "+(" "+r).slice(-c)+" | ";if(r===this.line){let t=o(i.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+o(i)+e+"\n "+t+n("^")}return" "+o(i)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}e.exports=o,o.default=o},function(e,t,n){"use strict";e.exports.isClean=Symbol("isClean"),e.exports.my=Symbol("my")},,,function(e,t,n){"use strict";let r,i,o=n(296);class a extends o{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new r(new i,this,e).stringify()}}a.registerLazyResult=e=>{r=e},a.registerProcessor=e=>{i=e},e.exports=a,a.default=a},function(e,t,n){"use strict";let r=n(732);class i{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new r(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}}e.exports=i,i.default=i},function(e,t,n){"use strict";let r=n(296),i=n(1108),o=n(443);function a(e,t){let n=new o(e,t),r=new i(n);try{r.parse()}catch(e){throw e}return r.root}e.exports=a,a.default=a,r.registerParse(a)},function(e,t,n){"use strict";let r=n(296);class i extends r{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}e.exports=i,i.default=i,r.registerAtRule(i)},function(e,t,n){"use strict";let r=n(296),i=n(733);class o extends r{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return i.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}}e.exports=o,o.default=o,r.registerRule(o)},function(e,t){e.exports=/\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\u2764\uFE0F\u200D\uD83D\uDC8B\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFE])|\uD83C\uDFFE\u200D\u2764\uFE0F\u200D\uD83D\uDC8B\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C\uDFFD\u200D\u2764\uFE0F\u200D\uD83D\uDC8B\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C\uDFFC\u200D\u2764\uFE0F\u200D\uD83D\uDC8B\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C\uDFFB\u200D\u2764\uFE0F\u200D\uD83D\uDC8B\u200D\uD83E\uDDD1(?:\uD83C[\uDFFC-\uDFFF]))|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])\u200D\u2764\uFE0F\u200D\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D\u2764\uFE0F\u200D\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])(?:\uD83C[\uDFFB-\uDFFF])|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\u2764\u200D\uD83D\uDC8B\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFE])|\uD83C\uDFFE\u200D\u2764\u200D\uD83D\uDC8B\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C\uDFFD\u200D\u2764\u200D\uD83D\uDC8B\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C\uDFFC\u200D\u2764\u200D\uD83D\uDC8B\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C\uDFFB\u200D\u2764\u200D\uD83D\uDC8B\u200D\uD83E\uDDD1(?:\uD83C[\uDFFC-\uDFFF]))|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])\u200D\u2764\u200D\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D\u2764\u200D\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\u200D\u2764\uFE0F\u200D\uD83D\uDC8B\u200D\uD83D\uDC68|(?:\uD83C[\uDFFB-\uDFFF])\u200D\u2764\uFE0F\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\u2764\uFE0F\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFE])|\uD83C\uDFFE\u200D\u2764\uFE0F\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C\uDFFD\u200D\u2764\uFE0F\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C\uDFFC\u200D\u2764\uFE0F\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C\uDFFB\u200D\u2764\uFE0F\u200D\uD83E\uDDD1(?:\uD83C[\uDFFC-\uDFFF]))|\uD83D\uDC69(?:\u200D\u2764\uFE0F\u200D\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFB-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D[\uDC68\uDC69])(?:\uD83C[\uDFFB-\uDFFF]))|\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83D\uDC68\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83D\uDC68|\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83D\uDC68\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC68|\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83D\uDC68\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC68|\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83D\uDC68\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC68|\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83D\uDC68\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83D\uDC68|\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC69(?:\u200D(?:\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\u2764\u200D\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69]))|\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69])(?:\uD83C[\uDFFB-\uDFFE])|\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69])(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69])(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69])(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69])(?:\uD83C[\uDFFC-\uDFFF])|\u2764\u200D(?:\uD83D[\uDC68\uDC69])(?:\uD83C[\uDFFB-\uDFFF]))|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\u200D(?:\uD83D[\uDC68\uDC69])(?:\uD83C[\uDFFB-\uDFFF]))|\uD83D\uDC68\u200D\u2764\u200D\uD83D\uDC8B\u200D\uD83D\uDC68|\uD83D\uDC68\u200D(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])\u200D\u2764\u200D\uD83D\uDC68)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68\u200D\u2764\uFE0F\u200D\uD83D\uDC68|\uD83D\uDC69\u200D\u2764\uFE0F\u200D(?:\uD83D[\uDC68\uDC69])|\uD83E\uDDD1\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC68(?:\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\u2764\u200D\uD83D\uDC68|(?:\uD83D[\uDC67-\uDC69])\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]\uFE0F)|\uD83E\uDEF1(?:\uD83C\uDFFF\u200D\uD83E\uDEF2(?:\uD83C[\uDFFB-\uDFFE])|\uD83C\uDFFE\u200D\uD83E\uDEF2(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C\uDFFD\u200D\uD83E\uDEF2(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C\uDFFC\u200D\uD83E\uDEF2(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C\uDFFB\u200D\uD83E\uDEF2(?:\uD83C[\uDFFC-\uDFFF]))|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83C\uDFF3\uFE0F\u200D\u26A7|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642])\uFE0F|\uD83D\uDC69\u200D\u2764\u200D(?:\uD83D[\uDC68\uDC69])|(?:\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF]))\u200D[\u2695\u2696\u2708]\uFE0F|\uD83D\uDC69\u200D(?:\uD83D[\uDC67\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|(?:\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83D\uDC41\u200D\uD83D\uDDE8|\uD83D\uDC3B\u200D\u2744|\uD83C\uDFF4\u200D\u2620|\uD83C\uDFF3\u200D\u26A7|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\u200D[\u2640\u2642])\uFE0F|\uD83C\uDFF3\uFE0F\u200D(?:\u26A7|\uD83C\uDF08)|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:[\u2695\u2696\u2708]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83E\uDDD1\u200D[\u2695\u2696\u2708]\uFE0F|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83D[\uDC68\uDC69])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:[\u2695\u2696\u2708]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D[\u2695\u2696\u2708]\uFE0F)|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC41\u200D\uD83D\uDDE8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC3B\u200D\u2744|\uD83D\uDC08\u200D\u2B1B|\uD83C\uDFF4\u200D\u2620|\uD83C\uDFF3\u200D(?:\u26A7|\uD83C\uDF08)|\uD83E\uDDD1\u200D(?:[\u2695\u2696\u2708]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u2764\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|(?:\u26F9|\uD83C[\uDFC3\uDFC4\uDFCA-\uDFCC]|\uD83D[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDD75\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDF])\u200D[\u2640\u2642]|(?:\uD83D[\uDC68\uDC69])\u200D(?:[\u2695\u2696\u2708]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDC66\uDC67\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\u20E3|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC3\uDFC7]|\uD83D[\uDC43\uDC4A-\uDC4C\uDC4F\uDC50\uDC66-\uDC69\uDC6B-\uDC6E\uDC70-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3D\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD\uDEC3-\uDEC5\uDEF0-\uDEF6])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u26F9\u270C\u270D]|\uD83C[\uDFC2\uDFC4\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC46-\uDC49\uDC4D\uDC4E\uDD74\uDD75\uDD90])(?:[\uFE0E\uFE0F]|\uD83C[\uDFFB-\uDFFF])|(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9\u23EA\u23ED-\u23EF\u23F1-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7\u26F8\u26FA\u26FD\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2753\u2757\u2763\u2764\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE1A\uDE2F\uDE37\uDF0D-\uDF0F\uDF15\uDF1C\uDF21\uDF24-\uDF2C\uDF36\uDF78\uDF7D\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFA7\uDFAC-\uDFAE\uDFC6\uDFCD\uDFCE\uDFD4-\uDFE0\uDFED\uDFF3\uDFF5\uDFF7]|\uD83D[\uDC08\uDC15\uDC1F\uDC26\uDC3F\uDC41\uDC53\uDC6A\uDC7D\uDCA3\uDCB0\uDCB3\uDCBB\uDCBF\uDCCB\uDCDA\uDCDF\uDCE4-\uDCE6\uDCEA-\uDCED\uDCF7\uDCF9-\uDCFB\uDCFD\uDD08\uDD0D\uDD12\uDD13\uDD49\uDD4A\uDD50-\uDD67\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDE10\uDE87\uDE8D\uDE91\uDE94\uDE98\uDEAD\uDEB2\uDEB9\uDEBA\uDEBC\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])[\uFE0E\uFE0F]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEDD-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDDFF\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6]/},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(1113),o=n(1114),a=n(1115),s=r(r({},i.namedReferences),{all:i.namedReferences.html5}),l={specialChars:/[<>'"&]/g,nonAscii:/(?:[<>'"&\u0080-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,nonAsciiPrintable:/(?:[<>'"&\x01-\x08\x11-\x15\x17-\x1F\x7f-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,extensive:/(?:[\x01-\x0c\x0e-\x1f\x21-\x2c\x2e-\x2f\x3a-\x40\x5b-\x60\x7b-\x7d\x7f-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g},c={mode:"specialChars",level:"all",numeric:"decimal"};t.encode=function(e,t){var n=void 0===(u=(o=void 0===t?c:t).mode)?"specialChars":u,r=void 0===(m=o.numeric)?"decimal":m,i=void 0===(g=o.level)?"all":g;if(!e)return"";var o,u,d=l[n],h=s[i].characters,p="hexadecimal"===r;if(d.lastIndex=0,o=d.exec(e)){u="";var m=0;do{m!==o.index&&(u+=e.substring(m,o.index));var g,f=h[g=o[0]];if(!f){var _=g.length>1?a.getCodePoint(g,0):g.charCodeAt(0);f=(p?"&#x"+_.toString(16):"&#"+_)+";"}u+=f,m=o.index+g.length}while(o=d.exec(e));m!==e.length&&(u+=e.substring(m))}else u=e;return u};var u={scope:"body",level:"all"},d=/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);/g,h=/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+)[;=]?/g,p={xml:{strict:d,attribute:h,body:i.bodyRegExps.xml},html4:{strict:d,attribute:h,body:i.bodyRegExps.html4},html5:{strict:d,attribute:h,body:i.bodyRegExps.html5}},m=r(r({},p),{all:p.html5}),g=String.fromCharCode,f=g(65533),_={level:"all"};t.decodeEntity=function(e,t){var n=void 0===(r=(void 0===t?_:t).level)?"all":r;if(!e)return"";var r=e,i=(e[e.length-1],s[n].entities[e]);if(i)r=i;else if("&"===e[0]&&"#"===e[1]){var l=e[2],c="x"==l||"X"==l?parseInt(e.substr(3),16):parseInt(e.substr(2));r=c>=1114111?f:c>65535?a.fromCodePoint(c):g(o.numericUnicodeMap[c]||c)}return r},t.decode=function(e,t){var n=void 0===t?u:t,r=n.level,i=void 0===r?"all":r,l=n.scope,c=void 0===l?"xml"===i?"strict":"body":l;if(!e)return"";var d=m[i][c],h=s[i].entities,p="attribute"===c,_="strict"===c;d.lastIndex=0;var b,v=d.exec(e);if(v){b="";var y=0;do{y!==v.index&&(b+=e.substring(y,v.index));var E=v[0],S=E,w=E[E.length-1];if(p&&"="===w)S=E;else if(_&&";"!==w)S=E;else{var T=h[E];if(T)S=T;else if("&"===E[0]&&"#"===E[1]){var C=E[2],x="x"==C||"X"==C?parseInt(E.substr(3),16):parseInt(E.substr(2));S=x>=1114111?f:x>65535?a.fromCodePoint(x):g(o.numericUnicodeMap[x]||x)}}b+=S,y=v.index+E.length}while(v=d.exec(e));y!==e.length&&(b+=e.substring(y))}else b=e;return b}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(130),i=n.n(r),o=n(132),a=n.n(o),s=n(120),l=n.n(s),c=n(123);const u=["label","isExpanded","children","onClick","onContextMenu"],d=e=>{let{label:t,isExpanded:n,children:r,onClick:o,onContextMenu:s}=e,d=a()(e,u);return l.a.createElement(c.a,i()({},d,{onClick:o,onContextMenu:s||o,title:t,"aria-label":t,"aria-haspopup":!0,"aria-expanded":n}),r)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return y})),n.d(t,"b",(function(){return E}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(126),l=n.n(s),c=n(184),u=n(1),d=n(124),h=n(122),p=n(168),m=n(133),g=n(128),f=n(161),_=n(162),b=n(172),v=n(185);let y;!function(e){e.UserMention="TYPE_USER_MENTION",e.RoomMention="TYPE_ROOM_MENTION",e.AtRoomMention="TYPE_AT_ROOM_MENTION"}(y||(y={}));class E extends a.a.Component{static roomNotifPos(e){return e.indexOf("@room")}static roomNotifLen(){return"@room".length}constructor(e){super(e),i()(this,"unmounted",!0),i()(this,"matrixClient",void 0),i()(this,"onMouseOver",(()=>{this.setState({hover:!0})})),i()(this,"onMouseLeave",(()=>{this.setState({hover:!1})})),i()(this,"onUserPillClicked",(e=>{e.preventDefault(),d.a.dispatch({action:g.a.ViewUser,member:this.state.member})})),this.state={resourceId:null,pillType:null,member:null,room:null,hover:!1}}load(){let e,t;if(this.props.url)if(this.props.inMessage){const n=Object(p.j)(this.props.url);e=n.primaryEntityId,t=n.sigil}else e=Object(p.d)(this.props.url),t=e?e[0]:void 0;const n=this.props.type||{"@":y.UserMention,"#":y.RoomMention,"!":y.RoomMention}[t];let r,i;switch(n){case y.AtRoomMention:i=this.props.room;break;case y.UserMention:{var o;const t=null===(o=this.props.room)||void 0===o?void 0:o.getMember(e);r=t,t||(r=new c.a(null,e),this.doProfileLookup(e,r))}break;case y.RoomMention:{const t="#"===e[0]?h.a.get().getRooms().find((t=>t.getCanonicalAlias()===e||t.getAltAliases().includes(e))):h.a.get().getRoom(e);i=t}}this.setState({resourceId:e,pillType:n,member:r,room:i})}componentDidMount(){this.unmounted=!1,this.matrixClient=h.a.get(),this.load()}componentDidUpdate(e){Object(v.c)(this.props,e)&&this.load()}componentWillUnmount(){this.unmounted=!0}doProfileLookup(e,t){h.a.get().getProfileInfo(e).then((e=>{this.unmounted||(t.name=e.displayname,t.rawDisplayName=e.displayname,t.events.member={getContent:()=>({avatar_url:e.avatar_url}),getDirectionalContent:function(){return this.getContent()}},this.setState({member:t}))})).catch((t=>{u.a.error("Could not retrieve profile data for "+e+":",t)}))}render(){const e=this.state.resourceId;let t,n,r,i=null,o=e,s=this.props.url;switch(this.state.pillType){case y.AtRoomMention:{const e=this.props.room;e&&(o="@room",this.props.shouldShowPillAvatar&&(i=a.a.createElement(_.a,{room:e,width:16,height:16,"aria-hidden":"true"})),t="mx_AtRoomPill")}break;case y.UserMention:{const e=this.state.member;e&&(n=e.userId,e.rawDisplayName=e.rawDisplayName||"",o=e.rawDisplayName,this.props.shouldShowPillAvatar&&(i=a.a.createElement(b.b,{member:e,width:16,height:16,"aria-hidden":"true",hideTitle:!0})),t="mx_UserPill",s=null,r=this.onUserPillClicked)}break;case y.RoomMention:{const n=this.state.room;n&&(o=n.name||e,this.props.shouldShowPillAvatar&&(i=a.a.createElement(_.a,{room:n,width:16,height:16,"aria-hidden":"true"}))),t=null!=n&&n.isSpaceRoom()?"mx_SpacePill":"mx_RoomPill"}}const c=l()("mx_Pill",t,{mx_UserPill_me:n===h.a.get().getUserId()});if(this.state.pillType){let t;return this.state.hover&&e&&(t=a.a.createElement(f.b,{label:e,alignment:f.a.Right})),a.a.createElement("bdi",null,a.a.createElement(m.a.Provider,{value:this.matrixClient},this.props.inMessage?a.a.createElement("a",{className:c,href:s,onClick:r,onMouseOver:this.onMouseOver,onMouseLeave:this.onMouseLeave},i,a.a.createElement("span",{className:"mx_Pill_linkText"},o),t):a.a.createElement("span",{className:c,onMouseOver:this.onMouseOver,onMouseLeave:this.onMouseLeave},i,a.a.createElement("span",{className:"mx_Pill_linkText"},o),t)))}return null}}},function(e,t,n){"use strict";function r(e){return e+"px"}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(354),l=n(129),c=n(920),u=n(122),d=n(124),h=n(128),p=n(138);class m extends a.a.Component{constructor(e,t){super(e,t),i()(this,"context",void 0),i()(this,"onReactionsChange",(()=>{this.setState({selectedEmojis:new Set(Object.keys(this.getReactions()))})})),i()(this,"onChoose",(e=>{this.componentWillUnmount(),this.props.onFinished();const t=this.getReactions();return t.hasOwnProperty(e)?(this.props.mxEvent.isRedacted()||!this.context.canSelfRedact||(u.a.get().redactEvent(this.props.mxEvent.getRoomId(),t[e]),d.a.dispatch({action:h.a.FocusAComposer,context:this.context.timelineRenderingType})),!1):(u.a.get().sendEvent(this.props.mxEvent.getRoomId(),l.b.Reaction,{"m.relates_to":{rel_type:l.h.Annotation,event_id:this.props.mxEvent.getId(),key:e}}),d.a.dispatch({action:"message_sent"}),d.a.dispatch({action:h.a.FocusAComposer,context:this.context.timelineRenderingType}),!0)})),i()(this,"isEmojiDisabled",(e=>!!this.getReactions()[e]&&!this.context.canSelfRedact)),this.state={selectedEmojis:new Set(Object.keys(this.getReactions()))},this.addListeners()}componentDidUpdate(e){e.reactions!==this.props.reactions&&(this.addListeners(),this.onReactionsChange())}addListeners(){this.props.reactions&&(this.props.reactions.on(s.b.Add,this.onReactionsChange),this.props.reactions.on(s.b.Remove,this.onReactionsChange),this.props.reactions.on(s.b.Redaction,this.onReactionsChange))}componentWillUnmount(){this.props.reactions&&(this.props.reactions.removeListener(s.b.Add,this.onReactionsChange),this.props.reactions.removeListener(s.b.Remove,this.onReactionsChange),this.props.reactions.removeListener(s.b.Redaction,this.onReactionsChange))}getReactions(){var e,t;if(!this.props.reactions)return{};const n=u.a.get().getUserId(),r=null!==(e=null===(t=this.props.reactions.getAnnotationsBySender())||void 0===t?void 0:t[n])&&void 0!==e?e:new Set;return Object.fromEntries([...r].filter((e=>!e.isRedacted())).map((e=>[e.getRelation().key,e.getId()])))}render(){return a.a.createElement(c.d,{onChoose:this.onChoose,isEmojiDisabled:this.isEmojiDisabled,selectedEmojis:this.state.selectedEmojis,showQuickReactions:!0})}}i()(m,"contextType",p.b),t.a=m},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(555),l=n(121),c=n(133),u=n(180),d=n(122),h=n(135),p=n(233),m=n(556),g=n(448),f=n(298);class _ extends a.a.Component{constructor(e){super(e),i()(this,"onBack",(()=>{this.setState({isEditing:!1})})),this.state={isEditing:!1}}onEdit(){this.setState({isEditing:!0})}viewSourceContent(){const e=this.props.mxEvent.replacingEvent()||this.props.mxEvent,t=e.isEncrypted(),n=e.clearEvent,r=e.event,i=()=>Object(g.f)(r);if(t){const e=()=>Object(g.f)(n);return a.a.createElement(a.a.Fragment,null,a.a.createElement("details",{open:!0,className:"mx_ViewSource_details"},a.a.createElement("summary",null,a.a.createElement("span",{className:"mx_ViewSource_heading"},Object(l.a)("Decrypted event source"))),n?a.a.createElement(f.a,{getTextToCopy:e},a.a.createElement(s.a,{language:"json"},Object(g.f)(n))):a.a.createElement("div",null,Object(l.a)("Decrypted source unavailable"))),a.a.createElement("details",{className:"mx_ViewSource_details"},a.a.createElement("summary",null,a.a.createElement("span",{className:"mx_ViewSource_heading"},Object(l.a)("Original event source"))),a.a.createElement(f.a,{getTextToCopy:i},a.a.createElement(s.a,{language:"json"},Object(g.f)(r)))))}return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:"mx_ViewSource_heading"},Object(l.a)("Original event source")),a.a.createElement(f.a,{getTextToCopy:i},a.a.createElement(s.a,{language:"json"},Object(g.f)(r))))}editSourceContent(){const e=this.props.mxEvent.replacingEvent()||this.props.mxEvent,t=e.isState(),n=e.getRoomId();return t?a.a.createElement(c.a.Consumer,null,(t=>a.a.createElement(p.a.Provider,{value:{room:t.getRoom(n)}},a.a.createElement(m.b,{onBack:this.onBack,mxEvent:e})))):a.a.createElement(c.a.Consumer,null,(t=>a.a.createElement(p.a.Provider,{value:{room:t.getRoom(n)}},a.a.createElement(g.c,{onBack:this.onBack,mxEvent:e}))))}canSendStateEvent(e){const t=d.a.get(),n=t.getRoom(e.getRoomId());return!(null==n||!n.currentState.mayClientSendStateEvent(e.getType(),t))}render(){const e=this.props.mxEvent.replacingEvent()||this.props.mxEvent,t=this.state.isEditing,n=e.getRoomId(),r=e.getId(),i=e.isState()?this.canSendStateEvent(e):Object(u.c)(this.props.mxEvent);return a.a.createElement(h.a,{className:"mx_ViewSource",onFinished:this.props.onFinished,title:Object(l.a)("View Source")},a.a.createElement("div",{className:"mx_ViewSource_header"},a.a.createElement(f.a,{getTextToCopy:()=>n,border:!1},Object(l.a)("Room ID: %(roomId)s",{roomId:n})),a.a.createElement(f.a,{getTextToCopy:()=>r,border:!1},Object(l.a)("Event ID: %(eventId)s",{eventId:r})),e.threadRootId&&a.a.createElement(f.a,{getTextToCopy:()=>e.threadRootId,border:!1},Object(l.a)("Thread root ID: %(threadRootId)s",{threadRootId:e.threadRootId}))),t?this.editSourceContent():this.viewSourceContent(),!t&&i&&a.a.createElement("div",{className:"mx_Dialog_buttons"},a.a.createElement("button",{onClick:()=>this.onEdit()},Object(l.a)("Edit"))))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(120),i=n.n(r),o=n(748),a=n.n(o);class s extends i.a.PureComponent{render(){const{children:e,language:t}=this.props,n=t?a.a.highlight(e,{language:t}):a.a.highlightAuto(e);return i.a.createElement("pre",{className:`mx_SyntaxHighlight hljs language-${n.language}`},i.a.createElement("code",{dangerouslySetInnerHTML:{__html:n.value}}))}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return h})),n.d(t,"a",(function(){return g}));var r=n(120),i=n.n(r),o=n(126),a=n.n(o),s=n(121),l=n(233),c=n(133),u=n(448),d=n(557);const h=e=>{let{mxEvent:t,onBack:n}=e;const o=Object(r.useContext)(l.a),a=Object(r.useContext)(c.a),s=Object(r.useMemo)((()=>[Object(u.d)(null==t?void 0:t.getType()),Object(u.e)(null==t?void 0:t.getStateKey())]),[t]),d=t?Object(u.f)(t.getContent()):void 0;return i.a.createElement(u.a,{fieldDefs:s,defaultContent:d,onSend:async(e,t)=>{let[n,r]=e;await a.sendStateEvent(o.room.roomId,n,t,r)},onBack:n})},p=e=>{let{label:t,onClick:n}=e;const r=t.trim();return i.a.createElement("button",{className:a()("mx_DevTools_button",{mx_DevTools_RoomStateExplorer_button_hasSpaces:r.length!==t.length,mx_DevTools_RoomStateExplorer_button_emptyString:!r}),onClick:n},r?t:Object(s.a)("<%(count)s spaces>",{count:t.length}))},m=e=>{let{eventType:t,onBack:n}=e;const o=Object(r.useContext)(l.a),[a,s]=Object(r.useState)(""),[c,m]=Object(r.useState)(null),g=o.room.currentState.events.get(t);if(Object(r.useEffect)((()=>{1===g.size&&g.has("")?m(g.get("")):m(null)}),[g]),c){const e=()=>{1===(null==g?void 0:g.size)&&g.has("")?n():m(null)};return i.a.createElement(u.b,{mxEvent:c,onBack:e,Editor:h})}return i.a.createElement(l.b,{onBack:n},i.a.createElement(d.a,{query:a,onChange:s},Array.from(g.entries()).map((e=>{let[t,n]=e;return i.a.createElement(p,{key:t,label:t,onClick:()=>m(n)})}))))},g=e=>{let{onBack:t,setTool:n}=e;const o=Object(r.useContext)(l.a),[a,c]=Object(r.useState)(""),[u,g]=Object(r.useState)(null),f=o.room.currentState.events;if(null!==u){const e=()=>{g(null)};return i.a.createElement(m,{eventType:u,onBack:e})}return i.a.createElement(l.b,{onBack:t,actionLabel:Object(s.a)("Send custom state event"),onAction:async()=>{n(Object(s.a)("Send custom state event"),h)}},i.a.createElement(d.a,{query:a,onChange:c},Array.from(f.keys()).map((e=>i.a.createElement(p,{key:e,label:e,onClick:()=>g(e)})))))}},function(e,t,n){"use strict";var r=n(120),i=n.n(r),o=n(121),a=n(139),s=n(558);t.a=e=>{var t,n;let{children:l,query:c,onChange:u}=e;const[d,h]=Object(r.useState)(20),[p,m]=Object(r.useState)(l);Object(r.useEffect)((()=>{let e=l;if(c){const t=c.toLowerCase();e=l.filter((e=>e.key.toString().toLowerCase().includes(t)))}m(e),h(20)}),[l,c]);return i.a.createElement(i.a.Fragment,null,i.a.createElement(a.a,{label:Object(o.a)("Filter results"),autoFocus:!0,size:64,type:"text",autoComplete:"off",value:c,onChange:e=>u(e.target.value),className:"mx_TextInputDialog_input mx_DevTools_RoomStateExplorer_query",key:null!==(t=null==l||null===(n=l[0])||void 0===n?void 0:n.key)&&void 0!==t?t:""}),p.length<1?Object(o.a)("No results found"):i.a.createElement(s.a,{getChildren:(e,t)=>p.slice(e,t),getChildCount:()=>p.length,truncateAt:d,createOverflowElement:(e,t)=>i.a.createElement("button",{className:"mx_DevTools_button",onClick:()=>{h((e=>e+50))}},Object(o.a)("and %(count)s others...",{count:e}))}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(121);class l extends a.a.Component{getChildren(e,t){return this.props.getChildren&&this.props.getChildCount?this.props.getChildren(e,t):a.a.Children.toArray(this.props.children).filter((e=>null!=e)).slice(e,t)}getChildCount(){return this.props.getChildren&&this.props.getChildCount?this.props.getChildCount():a.a.Children.toArray(this.props.children).filter((e=>null!=e)).length}render(){let e=null;const t=this.getChildCount();let n=t;if(this.props.truncateAt>=0){const r=t-this.props.truncateAt;r>1&&(e=this.props.createOverflowElement(r,t),n=this.props.truncateAt)}const r=this.getChildren(0,n);return a.a.createElement("div",{className:this.props.className},r,e)}}i()(l,"defaultProps",{truncateAt:2,createOverflowElement:(e,t)=>a.a.createElement("div",null,Object(s.a)("And %(count)s more...",{count:e}))})},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(261);const i=e=>{var t;return e.getType()===r.b&&(null===(t=e.getContent())||void 0===t?void 0:t.state)===r.c.Started}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(139),l=n(121),c=n(135),u=n(145);class d extends a.a.Component{constructor(e){super(e),i()(this,"field",Object(o.createRef)()),i()(this,"onOk",(async e=>{if(e.preventDefault(),this.props.validator&&(this.setState({busy:!0}),await this.field.current.validate({allowEmpty:!1}),!this.field.current.state.valid))return this.field.current.focus(),this.field.current.validate({allowEmpty:!1,focused:!0}),void this.setState({busy:!1});this.props.onFinished(!0,this.state.value)})),i()(this,"onCancel",(()=>{this.props.onFinished(!1)})),i()(this,"onChange",(e=>{this.setState({value:e.target.value})})),i()(this,"onValidate",(async e=>{const t=await this.props.validator(e);return this.setState({valid:t.valid}),t})),this.state={value:this.props.value,busy:!1,valid:!1}}componentDidMount(){this.props.focus&&this.field.current.focus()}render(){return a.a.createElement(c.a,{className:"mx_TextInputDialog",onFinished:this.props.onFinished,title:this.props.title,fixedWidth:this.props.fixedWidth},a.a.createElement("form",{onSubmit:this.onOk},a.a.createElement("div",{className:"mx_Dialog_content"},a.a.createElement("div",{className:"mx_TextInputDialog_label"},a.a.createElement("label",{htmlFor:"textinput"}," ",this.props.description," ")),a.a.createElement("div",null,a.a.createElement(s.a,{className:"mx_TextInputDialog_input",ref:this.field,type:"text",label:this.props.placeholder,value:this.state.value,onChange:this.onChange,onValidate:this.props.validator?this.onValidate:void 0})))),a.a.createElement(u.a,{primaryButton:this.state.busy?Object(l.a)(this.props.busyMessage):this.props.button,disabled:this.state.busy,onPrimaryButtonClick:this.onOk,onCancel:this.onCancel,hasCancel:this.props.hasCancel}))}}i()(d,"defaultProps",{title:"",value:"",description:"",busyMessage:Object(l.c)("Loading…"),focus:!0,hasCancel:!0})},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(13),i=n.n(r),o=n(120),a=n(140),s=n(222),l=n(184),c=n(143),u=n(121),d=n(449),h=n(168),p=n(228),m=n(177),g=n(125),f=n(156),_=n(135),b=n(298);const v=[{name:"Facebook",img:n(1331),url:e=>`https://www.facebook.com/sharer/sharer.php?u=${e}`},{name:"Twitter",img:n(1332),url:e=>`https://twitter.com/home?status=${e}`},{name:"LinkedIn",img:n(1333),url:e=>`https://www.linkedin.com/shareArticle?mini=true&url=${e}`},{name:"Reddit",img:n(1334),url:e=>`https://www.reddit.com/submit?url=${e}`},{name:"email",img:n(1335),url:e=>`mailto:?body=${e}`}];class y extends o.PureComponent{constructor(e){super(e),i()(this,"onLinkSpecificEventCheckboxClick",(()=>{this.setState({linkSpecificEvent:!this.state.linkSpecificEvent})}));let t=null;e.target instanceof a.c&&(t=new h.a(e.target),t.load()),this.state={linkSpecificEvent:this.props.target instanceof c.b,permalinkCreator:t}}static onLinkClick(e){e.preventDefault(),Object(p.d)(e.currentTarget)}getUrl(){let e;if(this.props.target instanceof a.c)if(this.state.linkSpecificEvent){const t=this.props.target.getLiveTimeline().getEvents();e=this.state.permalinkCreator.forEvent(t[t.length-1].getId())}else e=this.state.permalinkCreator.forShareableRoom();else this.props.target instanceof s.a||this.props.target instanceof l.a?e=Object(h.i)(this.props.target.userId):this.props.target instanceof c.b&&(e=this.state.linkSpecificEvent?this.props.permalinkCreator.forEvent(this.props.target.getId()):this.props.permalinkCreator.forShareableRoom());return e}render(){let e,t;if(this.props.target instanceof a.c){e=Object(u.a)("Share Room");this.props.target.getLiveTimeline().getEvents().length>0&&(t=o.createElement("div",null,o.createElement(m.b,{checked:this.state.linkSpecificEvent,onChange:this.onLinkSpecificEventCheckboxClick},Object(u.a)("Link to most recent message"))))}else this.props.target instanceof s.a||this.props.target instanceof l.a?e=Object(u.a)("Share User"):this.props.target instanceof c.b&&(e=Object(u.a)("Share Room Message"),t=o.createElement("div",null,o.createElement(m.b,{checked:this.state.linkSpecificEvent,onChange:this.onLinkSpecificEventCheckboxClick},Object(u.a)("Link to selected message"))));const n=this.getUrl(),r=encodeURIComponent(n),i=g.b.getValue(f.b.ShareQRCode),h=g.b.getValue(f.b.ShareSocial);let p;return(i||h)&&(p=o.createElement(o.Fragment,null,o.createElement("hr",null),o.createElement("div",{className:"mx_ShareDialog_split"},i&&o.createElement("div",{className:"mx_ShareDialog_qrcode_container"},o.createElement(d.a,{data:n,width:256})),h&&o.createElement("div",{className:"mx_ShareDialog_social_container"},v.map((e=>o.createElement("a",{rel:"noreferrer noopener",target:"_blank",key:e.name,title:e.name,href:e.url(r),className:"mx_ShareDialog_social_icon"},o.createElement("img",{src:e.img,alt:e.name,height:64,width:64})))))))),o.createElement(_.a,{title:e,className:"mx_ShareDialog",contentId:"mx_Dialog_content",onFinished:this.props.onFinished},o.createElement("div",{className:"mx_ShareDialog_content"},o.createElement(b.a,{getTextToCopy:()=>n},o.createElement("a",{title:Object(u.a)("Link to room"),href:n,onClick:y.onLinkClick},n)),t,p))}}},function(e,t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(e){return n}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(378),i=n(121);function o(e){var t,n;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object(i.a)("Attachment"),a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],l=o;if(null!==(t=e.body)&&void 0!==t&&t.length&&(l=e.body),s&&l.length>19){const e=l.split(".");let t=e.slice(0,e.length-1).join(".").substring(0,15);const n=e[e.length-1];t=t.replace(/\.*$/g,""),l=`${t}...${n}`}return null!==(n=e.info)&&void 0!==n&&n.size&&a&&(l+=" ("+Object(r.filesize)(e.info.size)+")"),l}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(120);function i(){const[e,t]=Object(r.useState)(!1);return[e,{onFocus:()=>t(!0),onBlur:()=>t(!1)}]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(13),i=n.n(r),o=n(1),a=n(147),s=n(131),l=n(122);class c{constructor(){i()(this,"domain",void 0),i()(this,"update",(async e=>{var t,n;let r=(null===(t=s.b.getObject("jitsi"))||void 0===t?void 0:t.get("preferred_domain"))||"meet.element.io";o.a.log("Attempting to get Jitsi conference information from homeserver");const i=null==e||null===(n=e["im.vector.riot.jitsi"])||void 0===n?void 0:n.preferredDomain;i&&(r=i),this.domain=r,o.a.log("Jitsi conference domain:",this.preferredDomain)}))}get preferredDomain(){return this.domain||"meet.element.io"}async getJitsiAuth(){if(!this.preferredDomain)return null;let e;try{const t=await fetch(`https://${this.preferredDomain}/.well-known/element/jitsi`);e=await t.json()}catch(e){return null}return e.auth?e.auth:null}start(){const e=l.a.get();e.on(a.b.ClientWellKnown,this.update),this.update(e.getClientWellKnown())}parsePreferredConferenceUrl(e){const t=new URL(e);return t.hostname!==this.preferredDomain?null:{conferenceId:t.pathname.substring(1),domain:t.hostname,isAudioOnly:!1}}static getInstance(){return c.instance||(c.instance=new c),c.instance}}i()(c,"instance",void 0)},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(13),i=n.n(r),o=n(215),a=n(17),s=n(122),l=n(128);class c extends a.EventEmitter{constructor(e){super(),this.dispatcher=e,i()(this,"matrixClient",null),i()(this,"dispatcherRef",null),i()(this,"onAction",(async e=>{this.onDispatcherAction(e),"MatrixActions.sync"===e.action?e.prevState!==o.b.Prepared&&e.state===o.b.Prepared&&this.matrixClient!==e.matrixClient&&(this.matrixClient&&await this.onNotReady(),this.matrixClient=e.matrixClient,await this.onReady()):"on_client_not_viable"!==e.action&&e.action!==l.a.OnLoggedOut||this.matrixClient&&(await this.onNotReady(),this.matrixClient=null)}))}async start(){this.dispatcherRef=this.dispatcher.register(this.onAction);const e=s.a.get();e&&(this.matrixClient=e,await this.onReady())}get mxClient(){return this.matrixClient}useUnitTestClient(e){this.matrixClient=e}destroy(){null!==this.dispatcherRef&&this.dispatcher.unregister(this.dispatcherRef)}async onReady(){}async onNotReady(){}onDispatcherAction(e){}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(13),i=n.n(r),o=n(451);const a=new o.a;class s{constructor(){}static for(e,t){if(!e||!t)throw new Error("An instance and key must be supplied");return new l(e,t)}static forgetAllFor(e){a.delete(e)}static forgetAll(){for(const e of a.keys())a.remove(e)}}i()(s,"Void",Symbol("void"));class l{constructor(e,t){this.instance=e,this.key=t}forget(){const e=a.get(this.instance);e&&(e.remove(this.key),e.size||a.remove(this.instance))}do(e){const t=a.getOrCreate(this.instance,new o.a);let n=t.get(this.key);return void 0===n&&(n=e(),t.set(this.key,n)),n}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return j}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(548),l=n.n(s),c=n(149),u=n(129),d=n(1),h=n(170),p=n(124),m=n(939),g=n(381),f=n(919),_=n(252),b=n(180),v=n(814),y=n(407),E=n(284),S=n(133),w=n(128),T=n(308),C=n(247),x=n(122),F=n(152),D=n(125),k=n(452),O=n(138),I=n(758),A=n(336),R=n(815),N=n(142),M=n(189),P=n(227),L=n(270);function B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function j(e,t){t&&(e["m.relates_to"]=U(U({},e["m.relates_to"]||{}),t))}class G extends a.a.Component{constructor(e,t){super(e,t),i()(this,"context",void 0),i()(this,"prepareToEncrypt",void 0),i()(this,"editorRef",Object(o.createRef)()),i()(this,"model",void 0),i()(this,"currentlyComposedEditorState",null),i()(this,"dispatcherRef",void 0),i()(this,"sendHistoryManager",void 0),i()(this,"onKeyDown",(e=>{var t,n,r,i;if(null!==(t=this.editorRef.current)&&void 0!==t&&t.isComposing(e))return;const o=(null===(n=this.props.relation)||void 0===n?void 0:n.key)===h.d.name,a=Object(F.a)().getMessageComposerAction(e);switch(a){case N.h.SendMessage:this.sendMessage(),e.preventDefault();break;case N.h.SelectPrevSendHistory:case N.h.SelectNextSendHistory:this.selectSendHistory(a===N.h.SelectPrevSendHistory)&&e.preventDefault();break;case N.h.ShowStickerPicker:if(!D.b.getValue("MessageComposerInput.showStickersButton"))return;this.props.toggleStickerPickerOpen(),e.preventDefault();break;case N.h.EditPrevMessage:if(null!==(r=this.editorRef.current)&&void 0!==r&&r.isSelectionCollapsed()&&null!==(i=this.editorRef.current)&&void 0!==i&&i.isCaretAtStart()){const t=this.context.liveTimeline.getEvents().concat(o?[]:this.props.room.getPendingEvents()),n=Object(b.g)({events:t,isForward:!1});n&&(e.preventDefault(),p.a.dispatch({action:w.a.EditEvent,event:n,timelineRenderingType:this.context.timelineRenderingType}))}break;case N.h.CancelReplyOrEdit:p.a.dispatch({action:"reply_to_event",event:null,context:this.context.timelineRenderingType});break;default:this.prepareToEncrypt&&this.prepareToEncrypt()}})),i()(this,"shouldSaveStoredEditorState",(()=>!this.model.isEmpty||!!this.props.replyToEvent)),i()(this,"saveStoredEditorState",(()=>{if(this.shouldSaveStoredEditorState()){const e=v.a.createItem(this.model,this.props.replyToEvent);localStorage.setItem(this.editorStateKey,JSON.stringify(e))}else this.clearStoredEditorState()})),i()(this,"onAction",(e=>{var t;if(!this.props.disabled)switch(e.action){case"reply_to_event":case w.a.FocusSendMessageComposer:var n;if((null!==(t=e.context)&&void 0!==t?t:O.a.Room)===this.context.timelineRenderingType)null===(n=this.editorRef.current)||void 0===n||n.focus();break;case w.a.ComposerInsert:if(e.timelineRenderingType!==this.context.timelineRenderingType)break;if(e.composerType!==A.a.Send)break;var r;if(e.userId)null===(r=this.editorRef.current)||void 0===r||r.insertMention(e.userId);else if(e.event){var i;null===(i=this.editorRef.current)||void 0===i||i.insertQuotedMessage(e.event)}else if(e.text){var o;null===(o=this.editorRef.current)||void 0===o||o.insertPlaintext(e.text)}}})),i()(this,"onPaste",(e=>{const{clipboardData:t}=e;return!(!t.files.length||t.types.includes("text/rtf"))&&(E.a.sharedInstance().sendContentListToRoom(Array.from(t.files),this.props.room.roomId,this.props.relation,this.props.mxClient,this.context.timelineRenderingType),!0)})),i()(this,"onChange",(()=>{this.props.onChange&&this.props.onChange(this.model)})),i()(this,"focusComposer",(()=>{var e;null===(e=this.editorRef.current)||void 0===e||e.focus()})),this.context=t,this.props.mxClient.isCryptoEnabled()&&this.props.mxClient.isRoomEncrypted(this.props.room.roomId)&&(this.prepareToEncrypt=Object(c.throttle)((()=>{this.props.mxClient.prepareToEncrypt(this.props.room)}),6e4,{leading:!0,trailing:!1})),window.addEventListener("beforeunload",this.saveStoredEditorState);const n=new _.a(this.props.room,this.props.mxClient),r=this.restoreStoredEditorState(n)||[];this.model=new m.a(r,n),this.dispatcherRef=p.a.register(this.onAction),this.sendHistoryManager=new v.a(this.props.room.roomId,"mx_cider_history_")}componentDidUpdate(e){var t,n,r;const i=(null===(t=this.props.relation)||void 0===t?void 0:t.key)===h.d.name,o=(null===(n=this.props.relation)||void 0===n?void 0:n.event_id)!==(null===(r=e.relation)||void 0===r?void 0:r.event_id);if(i&&o){var a;const e=new _.a(this.props.room,this.props.mxClient),t=this.restoreStoredEditorState(e)||[];this.model.reset(t),null===(a=this.editorRef.current)||void 0===a||a.focus()}}selectSendHistory(e){const t=e?-1:1;if(this.sendHistoryManager.currentIndex===this.sendHistoryManager.history.length){if(!e)return!1;this.currentlyComposedEditorState=this.model.serializeParts()}else if(this.sendHistoryManager.currentIndex+t===this.sendHistoryManager.history.length)return this.model.reset(this.currentlyComposedEditorState),this.sendHistoryManager.currentIndex=this.sendHistoryManager.history.length,!0;const{parts:n,replyEventId:r}=this.sendHistoryManager.getItem(t);var i;(p.a.dispatch({action:"reply_to_event",event:r?this.props.room.findEventById(r):null,context:this.context.timelineRenderingType}),n)&&(this.model.reset(n),null===(i=this.editorRef.current)||void 0===i||i.focus());return!0}sendQuickReaction(){const e=this.context.liveTimeline.getEvents(),t=this.model.parts[1].text;for(let n=e.length-1;n>=0;n--)if(e[n].getType()===u.b.RoomMessage){let r=!0;const i=e[n],o=x.a.get().getUserId(),a=this.props.room.relations.getChildEventsForEvent(i.getId(),u.h.Annotation,u.b.Reaction);if(a){r=![...a.getAnnotationsBySender()[o]||new Set].filter((e=>!e.isRedacted())).map((e=>e.getRelation().key)).includes(t)}r&&(x.a.get().sendEvent(i.getRoomId(),u.b.Reaction,{"m.relates_to":{rel_type:u.h.Annotation,event_id:i.getId(),key:t}}),p.a.dispatch({action:"message_sent"}));break}}async sendMessage(){var e,t,n;const r=this.model;if(r.isEmpty)return;const i={eventName:"Composer",isEditing:!1,isReply:!!this.props.replyToEvent,inThread:(null===(e=this.props.relation)||void 0===e?void 0:e.rel_type)===h.d.name};if(i.inThread){var o;const e=this.props.room.findEventById(this.props.relation.event_id);i.startsThread=1===(null==e||null===(o=e.getThread())||void 0===o?void 0:o.events.length)}if(M.a.instance.trackEvent(i),D.b.getValue("MessageComposerInput.autoReplaceEmoji")){var a;const e=r.parts.length-1,t=r.parts[e].text.length;null===(a=this.editorRef.current)||void 0===a||a.replaceEmoticon(new I.a(e,t),f.a)}const s=this.props.replyToEvent;let c=!0,u=null;if(!Object(g.a)(r)&&Object(R.b)(this.model)){const[e,t,n]=Object(R.a)(this.model);if(e){var d,m;const n=(null===(d=this.props.relation)||void 0===d?void 0:d.rel_type)===h.d.name?null===(m=this.props.relation)||void 0===m?void 0:m.event_id:null;let r;if([u,r]=await Object(R.c)(e,t,this.props.room.roomId,null!=n?n:null),!r)return;var _,b;if(e.category===y.a.messages||e.category===y.a.effects){if(j(u,this.props.relation),s)Object(P.a)(u,s,{permalinkCreator:this.props.permalinkCreator,includeLegacyFallback:null===(_=null===(b=u.msgtype)||void 0===b?void 0:b.startsWith("m."))||void 0===_||_})}else c=!1}else{const e=await Object(R.d)(n);if(p.a.dispatch({action:w.a.FocusAComposer,context:this.context.timelineRenderingType}),!e)return}}if(function(e){const t=e.parts;if(0==t.length)return!1;const n=Object(g.g)(e);if(t.length<=2){const e=n.startsWith("+")||n.startsWith("+ "),t=n.match(l.a);if(e&&t&&1==t.length)return t[0]===n.substring(1)||t[0]===n.substring(2)}return!1}(r)&&(c=!1,this.sendQuickReaction()),c){var v;const{roomId:e}=this.props.room;if(u||(u=function(e,t,n,r){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];const o=Object(g.a)(e);o&&(e=Object(g.e)(e)),Object(g.d)(e,"//")&&(e=Object(g.f)(e,"/")),e=Object(g.h)(e);const a={msgtype:o?"m.emote":"m.text",body:Object(g.g)(e)},s=Object(g.c)(e,{forceHTML:!!t,useMarkdown:D.b.getValue("MessageComposerInput.useMarkdown")});return s&&(a.format="org.matrix.custom.html",a.formatted_body=s),j(a,n),t&&Object(P.a)(a,t,{permalinkCreator:r,includeLegacyFallback:i}),a}(r,s,this.props.relation,this.props.permalinkCreator,this.props.includeReplyLegacyFallback)),!u.body.trim())return;D.b.getValue("Performance.addSendMessageTimingMetadata")&&Object(k.a)(u);const t=(null===(v=this.props.relation)||void 0===v?void 0:v.rel_type)===h.d.name?this.props.relation.event_id:null,n=Object(L.a)(e,(e=>this.props.mxClient.sendMessage(e,null!=t?t:null,u)),this.props.mxClient);s&&p.a.dispatch({action:"reply_to_event",event:null,context:this.context.timelineRenderingType}),p.a.dispatch({action:"message_sent"}),C.CHAT_EFFECTS.forEach((e=>{if(Object(T.containsEmoji)(u,e.emojis)){var t;(null===(t=this.props.relation)||void 0===t?void 0:t.rel_type)!==h.d.name&&p.a.dispatch({action:`effects.${e.command}`})}})),D.b.getValue("Performance.addSendMessageTimingMetadata")&&n.then((t=>{Object(k.b)(this.props.mxClient,e,t.event_id)}))}this.sendHistoryManager.save(r,s),r.reset([]),null===(t=this.editorRef.current)||void 0===t||t.clearUndoHistory(),null===(n=this.editorRef.current)||void 0===n||n.focus(),this.clearStoredEditorState(),c&&D.b.getValue("scrollToBottomOnMessageSent")&&p.a.dispatch({action:"scroll_to_bottom",timelineRenderingType:this.context.timelineRenderingType})}componentWillUnmount(){p.a.unregister(this.dispatcherRef),window.removeEventListener("beforeunload",this.saveStoredEditorState),this.saveStoredEditorState()}get editorStateKey(){var e;let t=`mx_cider_state_${this.props.room.roomId}`;return(null===(e=this.props.relation)||void 0===e?void 0:e.rel_type)===h.d.name&&(t+=`_${this.props.relation.event_id}`),t}clearStoredEditorState(){localStorage.removeItem(this.editorStateKey)}restoreStoredEditorState(e){var t;if((null===(t=this.props.relation)||void 0===t?void 0:t.key)===h.d.name)return null;const n=localStorage.getItem(this.editorStateKey);if(n)try{const{parts:t,replyEventId:r}=JSON.parse(n),i=t.map((t=>e.deserializePart(t)));return r&&p.a.dispatch({action:"reply_to_event",event:this.props.room.findEventById(r),context:this.context.timelineRenderingType}),i}catch(e){d.a.error(e)}return null}render(){var e;const t=(null===(e=this.props.relation)||void 0===e?void 0:e.rel_type)===h.d.name?this.props.relation.event_id:void 0;return a.a.createElement("div",{className:"mx_SendMessageComposer",onClick:this.focusComposer,onKeyDown:this.onKeyDown},a.a.createElement(f.b,{onChange:this.onChange,ref:this.editorRef,model:this.model,room:this.props.room,threadId:t,label:this.props.placeholder,placeholder:this.props.placeholder,onPaste:this.onPaste,disabled:this.props.disabled}))}}i()(G,"contextType",O.b),i()(G,"defaultProps",{includeReplyLegacyFallback:!0});const z=Object(S.c)(G);t.b=z},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(13),i=n.n(r);const o=(e,t,n)=>""===n.text[t].trim();class a{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;this.model=e,i()(this,"_start",void 0),i()(this,"_end",void 0),i()(this,"_lastStart",void 0),i()(this,"_initializedEmpty",void 0);const r=t.compare(n)<0;this._start=r?t:n,this._end=r?n:t,this._lastStart=this._start,this._initializedEmpty=this._start.index===this._end.index&&this._start.offset==this._end.offset}moveStartForwards(e){this._start=this._start.forwardsWhile(this.model,(()=>(e-=1)>=0))}wasInitializedEmpty(){return this._initializedEmpty}setWasEmpty(e){this._initializedEmpty=e}getLastStartingPosition(){return this._lastStart}setLastStartingPosition(e){this._lastStart=e}moveEndBackwards(e){this._end=this._end.backwardsWhile(this.model,(()=>(e-=1)>=0))}trim(){""!==this.text.trim()?(this._start=this._start.forwardsWhile(this.model,o),this._end=this._end.backwardsWhile(this.model,o)):this._start=this._end}expandBackwardsWhile(e){this._start=this._start.backwardsWhile(this.model,e)}expandForwardsWhile(e){this._end=this._end.forwardsWhile(this.model,e)}get text(){let e="";return this._start.iteratePartsBetween(this._end,this.model,((t,n,r)=>{const i=t.text.substring(n,r);e+=i})),e}replace(e){const t=e.reduce(((e,t)=>e+t.text.length),0);let n=0;return this._start.iteratePartsBetween(this._end,this.model,((e,t,r)=>{n+=r-t})),this.model.replaceRange(this._start,this._end,e),t-n}get parts(){const e=[];return this._start.iteratePartsBetween(this._end,this.model,((t,n,r)=>{const i=t.serialize();i.text=t.text.substring(n,r);const o=this.model.partCreator.deserializePart(i);e.push(o)})),e}get length(){let e=0;return this._start.iteratePartsBetween(this._end,this.model,((t,n,r)=>{e+=r-n})),e}get start(){return this._start}get end(){return this._end}}},function(e,t,n){"use strict";n.d(t,"d",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return u})),n.d(t,"e",(function(){return h}));var r=n(252);function i(e,t){const n=!t||t.type===r.b.Newline;return!e.acceptsCaret&&(n||!t.acceptsCaret)}function o(e,t){return!e.acceptsCaret&&t}function a(e,t){const n=e.nextSibling;n?e.parentElement.insertBefore(t,n):e.parentElement.appendChild(t)}const s="\ufeff";function l(){const e=document.createElement("span");return e.className="caretNode",e.appendChild(document.createTextNode(s)),e}function c(e){e.textContent!==s&&(e.textContent=s)}function u(e){return!!e&&e instanceof HTMLElement&&"SPAN"===e.tagName&&"caretNode"===e.className}function d(e){if(e)for(e=e.nextSibling;e;){const t=e;e=e.nextSibling,t.remove()}}function h(e,t){const n=t.parts.reduce(((e,t)=>{if(t.type===r.b.Newline)e.push([]);else{e[e.length-1].push(t)}return e}),[[]]);n.forEach(((t,n)=>{let r=e.childNodes[n];for(;r&&("DIV"!==r.tagName||r.className);)e.removeChild(r),r=e.childNodes[n];r||(r=document.createElement("div"),e.appendChild(r)),t.length?function(e,t){let n,r=null;const s=t[t.length-1];for(const d of t){for(r=n?r.nextSibling:e.firstChild,i(d,n)&&(u(r)?(c(r),r=r.nextSibling):e.insertBefore(l(),r));r&&!d.canUpdateDOMNode(r);){const t=r.nextSibling;e.removeChild(r),r=t}var h;if(r&&d?d.updateDOMNode(r):d&&(r=d.toDOMNode(),e.appendChild(r)),o(d,d===s))if(u(null===(h=r)||void 0===h?void 0:h.nextSibling))r=r.nextSibling,c(r);else{const e=l();a(r,e),r=e}n=d}d(r)}(r,t):function(e){let t=!1,n=e.firstChild;for(;n;){const e=n.nextSibling;t||"BR"!==n.tagName?n.remove():t=!0,n=e}t||e.appendChild(document.createElement("br"))}(r)})),n.length?d(e.children[n.length-1]):function(e){const t=e.firstChild;t&&(d(t),t.remove())}(e)}},function(e,t,n){"use strict";const r=[65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111];t.REPLACEMENT_CHARACTER="<22>",t.CODE_POINTS={EOF:-1,NULL:0,TABULATION:9,CARRIAGE_RETURN:13,LINE_FEED:10,FORM_FEED:12,SPACE:32,EXCLAMATION_MARK:33,QUOTATION_MARK:34,NUMBER_SIGN:35,AMPERSAND:38,APOSTROPHE:39,HYPHEN_MINUS:45,SOLIDUS:47,DIGIT_0:48,DIGIT_9:57,SEMICOLON:59,LESS_THAN_SIGN:60,EQUALS_SIGN:61,GREATER_THAN_SIGN:62,QUESTION_MARK:63,LATIN_CAPITAL_A:65,LATIN_CAPITAL_F:70,LATIN_CAPITAL_X:88,LATIN_CAPITAL_Z:90,RIGHT_SQUARE_BRACKET:93,GRAVE_ACCENT:96,LATIN_SMALL_A:97,LATIN_SMALL_F:102,LATIN_SMALL_X:120,LATIN_SMALL_Z:122,REPLACEMENT_CHARACTER:65533},t.CODE_POINT_SEQUENCES={DASH_DASH_STRING:[45,45],DOCTYPE_STRING:[68,79,67,84,89,80,69],CDATA_START_STRING:[91,67,68,65,84,65,91],SCRIPT_STRING:[115,99,114,105,112,116],PUBLIC_STRING:[80,85,66,76,73,67],SYSTEM_STRING:[83,89,83,84,69,77]},t.isSurrogate=function(e){return e>=55296&&e<=57343},t.isSurrogatePair=function(e){return e>=56320&&e<=57343},t.getSurrogatePairCodePoint=function(e,t){return 1024*(e-55296)+9216+t},t.isControlCodePoint=function(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159},t.isUndefinedCodePoint=function(e){return e>=64976&&e<=65007||r.indexOf(e)>-1}},function(e,t,n){"use strict";e.exports={controlCharacterInInputStream:"control-character-in-input-stream",noncharacterInInputStream:"noncharacter-in-input-stream",surrogateInInputStream:"surrogate-in-input-stream",nonVoidHtmlElementStartTagWithTrailingSolidus:"non-void-html-element-start-tag-with-trailing-solidus",endTagWithAttributes:"end-tag-with-attributes",endTagWithTrailingSolidus:"end-tag-with-trailing-solidus",unexpectedSolidusInTag:"unexpected-solidus-in-tag",unexpectedNullCharacter:"unexpected-null-character",unexpectedQuestionMarkInsteadOfTagName:"unexpected-question-mark-instead-of-tag-name",invalidFirstCharacterOfTagName:"invalid-first-character-of-tag-name",unexpectedEqualsSignBeforeAttributeName:"unexpected-equals-sign-before-attribute-name",missingEndTagName:"missing-end-tag-name",unexpectedCharacterInAttributeName:"unexpected-character-in-attribute-name",unknownNamedCharacterReference:"unknown-named-character-reference",missingSemicolonAfterCharacterReference:"missing-semicolon-after-character-reference",unexpectedCharacterAfterDoctypeSystemIdentifier:"unexpected-character-after-doctype-system-identifier",unexpectedCharacterInUnquotedAttributeValue:"unexpected-character-in-unquoted-attribute-value",eofBeforeTagName:"eof-before-tag-name",eofInTag:"eof-in-tag",missingAttributeValue:"missing-attribute-value",missingWhitespaceBetweenAttributes:"missing-whitespace-between-attributes",missingWhitespaceAfterDoctypePublicKeyword:"missing-whitespace-after-doctype-public-keyword",missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:"missing-whitespace-between-doctype-public-and-system-identifiers",missingWhitespaceAfterDoctypeSystemKeyword:"missing-whitespace-after-doctype-system-keyword",missingQuoteBeforeDoctypePublicIdentifier:"missing-quote-before-doctype-public-identifier",missingQuoteBeforeDoctypeSystemIdentifier:"missing-quote-before-doctype-system-identifier",missingDoctypePublicIdentifier:"missing-doctype-public-identifier",missingDoctypeSystemIdentifier:"missing-doctype-system-identifier",abruptDoctypePublicIdentifier:"abrupt-doctype-public-identifier",abruptDoctypeSystemIdentifier:"abrupt-doctype-system-identifier",cdataInHtmlContent:"cdata-in-html-content",incorrectlyOpenedComment:"incorrectly-opened-comment",eofInScriptHtmlCommentLikeText:"eof-in-script-html-comment-like-text",eofInDoctype:"eof-in-doctype",nestedComment:"nested-comment",abruptClosingOfEmptyComment:"abrupt-closing-of-empty-comment",eofInComment:"eof-in-comment",incorrectlyClosedComment:"incorrectly-closed-comment",eofInCdata:"eof-in-cdata",absenceOfDigitsInNumericCharacterReference:"absence-of-digits-in-numeric-character-reference",nullCharacterReference:"null-character-reference",surrogateCharacterReference:"surrogate-character-reference",characterReferenceOutsideUnicodeRange:"character-reference-outside-unicode-range",controlCharacterReference:"control-character-reference",noncharacterCharacterReference:"noncharacter-character-reference",missingWhitespaceBeforeDoctypeName:"missing-whitespace-before-doctype-name",missingDoctypeName:"missing-doctype-name",invalidCharacterSequenceAfterDoctypeName:"invalid-character-sequence-after-doctype-name",duplicateAttribute:"duplicate-attribute",nonConformingDoctype:"non-conforming-doctype",missingDoctype:"missing-doctype",misplacedDoctype:"misplaced-doctype",endTagWithoutMatchingOpenElement:"end-tag-without-matching-open-element",closingOfElementWithOpenChildElements:"closing-of-element-with-open-child-elements",disallowedContentInNoscriptInHead:"disallowed-content-in-noscript-in-head",openElementsLeftAfterEof:"open-elements-left-after-eof",abandonedHeadElementChild:"abandoned-head-element-child",misplacedStartTagForHeadElement:"misplaced-start-tag-for-head-element",nestedNoscriptInHead:"nested-noscript-in-head",eofInElementThatCanContainOnlyText:"eof-in-element-that-can-contain-only-text"}},function(e,t,n){"use strict";const r=n(262);e.exports=class extends r{constructor(e,t){super(e),this.posTracker=null,this.onParseError=t.onParseError}_setErrorLocation(e){e.startLine=e.endLine=this.posTracker.line,e.startCol=e.endCol=this.posTracker.col,e.startOffset=e.endOffset=this.posTracker.offset}_reportError(e){const t={code:e,startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1};this._setErrorLocation(t),this.onParseError(t)}_getOverriddenMethods(e){return{_err(t){e._reportError(t)}}}}},function(e,t,n){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(e,t,n){"use strict";(function(e){n.d(t,"d",(function(){return d})),n.d(t,"e",(function(){return h})),n.d(t,"b",(function(){return p})),n.d(t,"a",(function(){return m})),n.d(t,"c",(function(){return g}));var r=n(13),i=n.n(r),o=n(1),a=n(223),s=n(1370);const l=5242880;class c{constructor(){i()(this,"logs",""),i()(this,"originalFunctions",{})}monkeyPatch(e){var t=this;const n={log:"I",info:"I",warn:"W",error:"E"};Object.keys(n).forEach((r=>{const i=n[r],o=e[r].bind(e);this.originalFunctions[r]=o,e[r]=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.log(i,...n),o(...n)}}))}bypassRageshake(e){for(var t,n,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];null===(t=(n=this.originalFunctions)[e])||void 0===t||t.call(n,...i)}log(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];let i=`${(new Date).toISOString()} ${e} ${(n=n.map((e=>e instanceof DOMException?e.message+` (${e.name} | ${e.code})`:e instanceof Error?e.message+(e.stack?`\n${e.stack}`:""):"object"==typeof e?JSON.stringify(e,Object(s.a)()):e))).join(" ")}\n`;i=i.replace(/token=[a-zA-Z0-9-]+/gm,"token=xxxxx"),this.logs+=i}flush(e){if(e)return this.logs;const t=this.logs;return this.logs="",t}}class u{constructor(e,t){this.indexedDB=e,this.logger=t,i()(this,"id",void 0),i()(this,"index",0),i()(this,"db",null),i()(this,"flushPromise",null),i()(this,"flushAgainPromise",null),this.id="instance-"+Object(a.b)(16)}connect(){const e=this.indexedDB.open("logs");return new Promise(((t,n)=>{e.onsuccess=()=>{this.db=e.result,window.setInterval(this.flush.bind(this),3e4),t()},e.onerror=()=>{var t;const r="Failed to open log database: "+(null===(t=e.error)||void 0===t?void 0:t.name);o.a.error(r),n(new Error(r))},e.onupgradeneeded=()=>{const t=e.result,n=t.createObjectStore("logs",{keyPath:["id","index"]});n.createIndex("id","id",{unique:!1}),n.add(this.generateLogEntry(new Date+" ::: Log database was created."));t.createObjectStore("logslastmod",{keyPath:"id"}).add(this.generateLastModifiedTime())}}))}flush(){return this.flushPromise?(this.flushAgainPromise||(this.flushAgainPromise=this.flushPromise.then((()=>this.flush())).then((()=>{this.flushAgainPromise=null}))),this.flushAgainPromise):(this.flushPromise=new Promise(((e,t)=>{if(!this.db)return void t(new Error("No connected database"));const n=this.logger.flush();if(0===n.length)return void e();const r=this.db.transaction(["logs","logslastmod"],"readwrite"),i=r.objectStore("logs");r.oncomplete=t=>{e()},r.onerror=()=>{var e;o.a.error("Failed to flush logs : ",r.error),t(new Error("Failed to write logs: "+(null===(e=r.error)||void 0===e?void 0:e.message)))},i.add(this.generateLogEntry(n));r.objectStore("logslastmod").put(this.generateLastModifiedTime())})).then((()=>{this.flushPromise=null})),this.flushPromise)}async consume(){const e=this.db;function t(t,n){const r=e.transaction("logs","readonly").objectStore("logs");return new Promise(((e,i)=>{const o=r.index("id").openCursor(IDBKeyRange.only(t),"prev");let a="";o.onerror=()=>{var e;i(new Error("Query failed: "+(null===(e=o.error)||void 0===e?void 0:e.message)))},o.onsuccess=()=>{const t=o.result;t?(a=t.value.lines+a,a.length>=n?e(a):t.continue()):e(a)}}))}const n=await function(e,t,n){const r=e.openCursor(t);return new Promise(((e,t)=>{const i=[];r.onerror=()=>{var e;t(new Error("Query failed: "+(null===(e=r.error)||void 0===e?void 0:e.message)))},r.onsuccess=()=>{const t=r.result;t?(i.push(n(t)),t.continue()):e(i)}}))}(e.transaction("logslastmod","readonly").objectStore("logslastmod"),void 0,(e=>({id:e.value.id,ts:e.value.ts}))).then((e=>e.sort(((e,t)=>t.ts-e.ts)).map((e=>e.id))));let r=[];const i=[];let a=0;for(let e=0;e<n.length;e++){const o=await t(n[e],l-a);if(i.push({lines:o,id:n[e]}),a+=o.length,a>=l){r=n.slice(e+1);break}}return r.length>0&&(o.a.log("Removing logs: ",r),Promise.all(r.map((t=>function(t){return new Promise(((n,r)=>{const i=e.transaction(["logs","logslastmod"],"readwrite"),o=i.objectStore("logs"),a=o.index("id").openKeyCursor(IDBKeyRange.only(t));a.onsuccess=()=>{const e=a.result;e&&(o.delete(e.primaryKey),e.continue())},i.oncomplete=()=>{n()},i.onerror=()=>{var e;r(new Error(`Failed to delete logs for '${t}' : ${null===(e=a.error)||void 0===e?void 0:e.message}`))},i.objectStore("logslastmod").delete(t)}))}(t)))).then((()=>{o.a.log(`Removed ${r.length} old logs.`)}),(e=>{o.a.error(e)}))),i}generateLogEntry(e){return{id:this.id,lines:e,index:this.index++}}generateLastModifiedTime(){return{id:this.id,ts:Date.now()}}}function d(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return e.mx_rage_initPromise?e.mx_rage_initPromise:(e.mx_rage_logger=new c,e.mx_rage_logger.monkeyPatch(window.console),t?h():(e.mx_rage_initPromise=Promise.resolve(),e.mx_rage_initPromise))}function h(){if(e.mx_rage_initStoragePromise)return e.mx_rage_initStoragePromise;let t;o.a.log("Configuring rageshake persistence...");try{t=window.indexedDB}catch(e){}return t?(e.mx_rage_store=new u(t,e.mx_rage_logger),e.mx_rage_initStoragePromise=e.mx_rage_store.connect(),e.mx_rage_initStoragePromise):(e.mx_rage_initStoragePromise=Promise.resolve(),e.mx_rage_initStoragePromise)}function p(){e.mx_rage_store&&e.mx_rage_store.flush()}async function m(){e.mx_rage_store&&await e.mx_rage_store.consume()}async function g(){if(!e.mx_rage_logger)throw new Error("No console logger, did you forget to call init()?");return e.mx_rage_store?(await e.mx_rage_store.flush(),e.mx_rage_store.consume()):[{lines:e.mx_rage_logger.flush(!0),id:"-"}]}}).call(this,n(14))},function(e,t,n){"use strict";n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return m})),n.d(t,"a",(function(){return g}));var r=n(1371),i=n(131),o=n(122),a=n(125);async function s(){const e={};if(navigator.storage&&navigator.storage.persisted)try{e.storageManager_persisted=String(await navigator.storage.persisted())}catch(e){}else if(document.hasStorageAccess)try{e.storageManager_persisted=String(await document.hasStorageAccess())}catch(e){}if(navigator.storage&&navigator.storage.estimate)try{const t=await navigator.storage.estimate();if(e.storageManager_quota=String(t.quota),e.storageManager_usage=String(t.usage),t.usageDetails){const n=[];Object.keys(t.usageDetails).forEach((e=>{n.push(`${e}: ${String(t.usageDetails[e])}`)})),e.storageManager_usage=n.join(", ")}}catch(e){}return e}function l(e){return{username:e.credentials.userId,enabled_labs:c(),low_bandwidth:a.b.getValue("lowBandwidth")?"enabled":"disabled"}}function c(){const e=a.b.getFeatureSettingNames().filter((e=>a.b.getValue(e)));return e.length?e.join(", "):""}async function u(e){if(!e.isCryptoEnabled()||!e.crypto)return{};const t=[`ed25519:${e.getDeviceEd25519Key()}`];e.getDeviceCurve25519Key&&t.push(`curve25519:${e.getDeviceCurve25519Key()}`);const n=e.crypto.crossSigningInfo,r=e.crypto.secretStorage,i=e.getCrossSigningCacheCallbacks(),o=await e.crypto.getSessionBackupPrivateKey();return{device_keys:t.join(", "),cross_signing_ready:String(await e.isCrossSigningReady()),cross_signing_supported_by_hs:String(await e.doesServerSupportUnstableFeature("org.matrix.e2e_cross_signing")),cross_signing_key:n.getId(),cross_signing_privkey_in_secret_storage:String(!!await n.isStoredInSecretStorage(r)),cross_signing_master_privkey_cached:String(!(!i||!await i.getCrossSigningKeyCache("master"))),cross_signing_user_signing_privkey_cached:String(!(!i||!await i.getCrossSigningKeyCache("user_signing"))),secret_storage_ready:String(await e.isSecretStorageReady()),secret_storage_key_in_account:String(!!await r.hasKey()),session_backup_key_in_secret_storage:String(!!await e.isKeyBackupKeyStored()),session_backup_key_cached:String(!!o),session_backup_key_well_formed:String(o instanceof Uint8Array)}}function d(e){const t={device_id:null==e?void 0:e.deviceId,mx_local_settings:localStorage.getItem("mx_local_settings")};if(window.Modernizr){const e=Object.keys(window.Modernizr).filter((e=>!1===window.Modernizr[e]));e.length>0&&(t.modernizr_missing_features=e.join(", "))}return t}async function h(){const e=o.a.get();return{user:l(e),crypto:await u(e),device:d(e),storage:await s()}}async function p(e,t,n){if(!i.b.getObject("sentry"))return;const o={contexts:await h(),extra:{user_text:e,issue_url:t}};n?r.captureException(n,o):t&&r.captureMessage(`Issue: ${t}`,o)}function m(e){i.b.get().sentry&&a.b.getValue("automaticErrorReporting")&&r.setUser({username:e})}async function g(e){if(!e)return;const t=[new r.Integrations.InboundFilters,new r.Integrations.FunctionToString,new r.Integrations.Breadcrumbs,new r.Integrations.HttpContext,new r.Integrations.Dedupe];a.b.getValue("automaticErrorReporting")&&(t.push(new r.Integrations.GlobalHandlers({onerror:!1,onunhandledrejection:!0})),t.push(new r.Integrations.TryCatch)),r.init({dsn:e.dsn,release:"v1.11.28",environment:e.environment,defaultIntegrations:!1,autoSessionTracking:!1,integrations:t,tracesSampleRate:1})}window.mxSendSentryReport=p},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});class n extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}t.SentryError=n},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(263);function i(e,t,n=!1){return!!r.isString(e)&&(r.isRegExp(t)?t.test(e):!!r.isString(t)&&(n?e===t:e.includes(t)))}t.escapeStringForRegex=function(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")},t.isMatchingPattern=i,t.safeJoin=function(e,t){if(!Array.isArray(e))return"";const n=[];for(let t=0;t<e.length;t++){const r=e[t];try{n.push(String(r))}catch(e){n.push("[value cannot be serialized]")}}return n.join(t)},t.snipLine=function(e,t){let n=e;const r=n.length;if(r<=150)return n;t>r&&(t=r);let i=Math.max(t-60,0);i<5&&(i=0);let o=Math.min(i+140,r);return o>r-5&&(o=r),o===r&&(i=Math.max(o-140,0)),n=n.slice(i,o),i>0&&(n=`'{snip} ${n}`),o<r&&(n+=" {snip}"),n},t.stringMatchesSomePattern=function(e,t=[],n=!1){return t.some((t=>i(e,t,n)))},t.truncate=function(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=50;function r(...e){const t=e.sort(((e,t)=>e[0]-t[0])).map((e=>e[1]));return(e,n=0)=>{const r=[];for(const i of e.split("\n").slice(n)){if(i.length>1024)continue;const e=i.replace(/\(error: (.*)\)/,"$1");for(const n of t){const t=n(e);if(t){r.push(t);break}}}return i(r)}}function i(e){if(!e.length)return[];let t=e;const r=t[0].function||"",i=t[t.length-1].function||"";return-1===r.indexOf("captureMessage")&&-1===r.indexOf("captureException")||(t=t.slice(1)),-1!==i.indexOf("sentryWrapped")&&(t=t.slice(0,-1)),t.slice(0,n).map((e=>({...e,filename:e.filename||t[0].filename,function:e.function||"?"}))).reverse()}const o="<anonymous>";function a(e){const t=/^\s*[-]{4,}$/,n=/at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;return r=>{if(r.match(t))return{filename:r};const i=r.match(n);if(!i)return;let o,a,s,l,c;if(i[1]){s=i[1];let e=s.lastIndexOf(".");if("."===s[e-1]&&e--,e>0){o=s.slice(0,e),a=s.slice(e+1);const t=o.indexOf(".Module");t>0&&(s=s.slice(t+1),o=o.slice(0,t))}l=void 0}a&&(l=o,c=a),"<anonymous>"===a&&(c=void 0,s=void 0),void 0===s&&(c=c||"<anonymous>",s=l?`${l}.${c}`:c);const u=i[2]&&i[2].startsWith("file://")?i[2].slice(7):i[2],d=!("native"===i[5]||u&&!u.startsWith("/")&&!u.startsWith(".")&&1!==u.indexOf(":\\"))&&void 0!==u&&!u.includes("node_modules/");return{filename:u,module:e?e(u):void 0,function:s,lineno:parseInt(i[3],10)||void 0,colno:parseInt(i[4],10)||void 0,in_app:d}}}t.createStackParser=r,t.getFunctionName=function(e){try{return e&&"function"==typeof e&&e.name||o}catch(e){return o}},t.nodeStackLineParser=function(e){return[90,a(e)]},t.stackParserFromStackParserOptions=function(e){return Array.isArray(e)?r(...e):e},t.stripSentryFramesAndReverse=i},function(e,t,n){(function(e){Object.defineProperty(t,"__esModule",{value:!0});const r=n(263),i=n(776),o=n(385),a=n(579);function s(e,t=1/0,n=1/0){try{return l("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function l(t,n,s=1/0,c=1/0,u=i.memoBuilder()){const[d,h]=u;if(null===n||["number","boolean","string"].includes(typeof n)&&!r.isNaN(n))return n;const p=function(t,n){try{return"domain"===t&&n&&"object"==typeof n&&n._events?"[Domain]":"domainEmitter"===t?"[DomainEmitter]":void 0!==e&&n===e?"[Global]":"undefined"!=typeof window&&n===window?"[Window]":"undefined"!=typeof document&&n===document?"[Document]":r.isSyntheticEvent(n)?"[SyntheticEvent]":"number"==typeof n&&n!=n?"[NaN]":void 0===n?"[undefined]":"function"==typeof n?`[Function: ${a.getFunctionName(n)}]`:"symbol"==typeof n?`[${String(n)}]`:"bigint"==typeof n?`[BigInt: ${String(n)}]`:`[object ${function(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}(n)}]`}catch(e){return`**non-serializable** (${e})`}}(t,n);if(!p.startsWith("[object "))return p;if(n.__sentry_skip_normalization__)return n;if(0===s)return p.replace("object ","");if(d(n))return"[Circular ~]";const m=n;if(m&&"function"==typeof m.toJSON)try{return l("",m.toJSON(),s-1,c,u)}catch(e){}const g=Array.isArray(n)?[]:{};let f=0;const _=o.convertToPlainObject(n);for(const e in _){if(!Object.prototype.hasOwnProperty.call(_,e))continue;if(f>=c){g[e]="[MaxProperties ~]";break}const t=_[e];g[e]=l(e,t,s-1,c,u),f++}return h(n),g}t.normalize=s,t.normalizeToSize=function e(t,n=3,r=102400){const i=s(t,n);return o=i,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(o))>r?e(t,n-1,r):i;var o},t.walk=l}).call(this,n(14))},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(218),i=n(163),o=n(458),a=n(277);class s{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=s.id}__init2(){this._installFunc={onerror:l,onunhandledrejection:c}}constructor(e){s.prototype.__init.call(this),s.prototype.__init2.call(this),this._options={onerror:!0,onunhandledrejection:!0,...e}}setupOnce(){Error.stackTraceLimit=50;const e=this._options;for(const n in e){const r=this._installFunc[n];r&&e[n]&&(t=n,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.log(`Global Handler attached: ${t}`),r(),this._installFunc[n]=void 0)}var t}}function l(){i.addInstrumentationHandler("error",(e=>{const[t,n,r]=h();if(!t.getIntegration(s))return;const{msg:l,url:c,line:p,column:m,error:g}=e;if(a.shouldIgnoreOnError()||g&&g.__sentry_own_request__)return;const f=void 0===g&&i.isString(l)?function(e,t,n,r){const o=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let a=i.isErrorEvent(e)?e.message:e,s="Error";const l=a.match(o);l&&(s=l[1],a=l[2]);const c={exception:{values:[{type:s,value:a}]}};return u(c,t,n,r)}(l,c,p,m):u(o.eventFromUnknownInput(n,g||l,void 0,r,!1),c,p,m);f.level="error",d(t,g,f,"onerror")}))}function c(){i.addInstrumentationHandler("unhandledrejection",(e=>{const[t,n,r]=h();if(!t.getIntegration(s))return;let l=e;try{"reason"in e?l=e.reason:"detail"in e&&"reason"in e.detail&&(l=e.detail.reason)}catch(e){}if(a.shouldIgnoreOnError()||l&&l.__sentry_own_request__)return!0;const c=i.isPrimitive(l)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(l)}`}]}}:o.eventFromUnknownInput(n,l,void 0,r,!0);c.level="error",d(t,l,c,"onunhandledrejection")}))}function u(e,t,n,r){const o=e.exception=e.exception||{},a=o.values=o.values||[],s=a[0]=a[0]||{},l=s.stacktrace=s.stacktrace||{},c=l.frames=l.frames||[],u=isNaN(parseInt(r,10))?void 0:r,d=isNaN(parseInt(n,10))?void 0:n,h=i.isString(t)&&t.length>0?t:i.getLocationHref();return 0===c.length&&c.push({colno:u,filename:h,function:"?",in_app:!0,lineno:d}),e}function d(e,t,n,r){i.addExceptionMechanism(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function h(){const e=r.getCurrentHub(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}s.__initStatic(),t.GlobalHandlers=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(163),i=n(277),o=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class a{static __initStatic(){this.id="TryCatch"}__init(){this.name=a.id}constructor(e){a.prototype.__init.call(this),this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){this._options.setTimeout&&r.fill(i.WINDOW,"setTimeout",s),this._options.setInterval&&r.fill(i.WINDOW,"setInterval",s),this._options.requestAnimationFrame&&r.fill(i.WINDOW,"requestAnimationFrame",l),this._options.XMLHttpRequest&&"XMLHttpRequest"in i.WINDOW&&r.fill(XMLHttpRequest.prototype,"send",c);const e=this._options.eventTarget;if(e){(Array.isArray(e)?e:o).forEach(u)}}}function s(e){return function(...t){const n=t[0];return t[0]=i.wrap(n,{mechanism:{data:{function:r.getFunctionName(e)},handled:!0,type:"instrument"}}),e.apply(this,t)}}function l(e){return function(t){return e.apply(this,[i.wrap(t,{mechanism:{data:{function:"requestAnimationFrame",handler:r.getFunctionName(e)},handled:!0,type:"instrument"}})])}}function c(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((e=>{e in n&&"function"==typeof n[e]&&r.fill(n,e,(function(t){const n={mechanism:{data:{function:e,handler:r.getFunctionName(t)},handled:!0,type:"instrument"}},o=r.getOriginalFunction(t);return o&&(n.mechanism.data.handler=r.getFunctionName(o)),i.wrap(t,n)}))})),e.apply(this,t)}}function u(e){const t=i.WINDOW,n=t[e]&&t[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(r.fill(n,"addEventListener",(function(t){return function(n,o,a){try{"function"==typeof o.handleEvent&&(o.handleEvent=i.wrap(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:r.getFunctionName(o),target:e},handled:!0,type:"instrument"}}))}catch(e){}return t.apply(this,[n,i.wrap(o,{mechanism:{data:{function:"addEventListener",handler:r.getFunctionName(o),target:e},handled:!0,type:"instrument"}}),a])}})),r.fill(n,"removeEventListener",(function(e){return function(t,n,r){const i=n;try{const n=i&&i.__sentry_wrapped__;n&&e.call(this,t,n,r)}catch(e){}return e.call(this,t,i,r)}})))}a.__initStatic(),t.TryCatch=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(218),i=n(163),o=n(458);class a{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=a.id}constructor(e={}){a.prototype.__init.call(this),this._key=e.key||"cause",this._limit=e.limit||5}setupOnce(){const e=r.getCurrentHub().getClient();e&&r.addGlobalEventProcessor(((t,n)=>{const i=r.getCurrentHub().getIntegration(a);return i?s(e.getOptions().stackParser,i._key,i._limit,t,n):t}))}}function s(e,t,n,r,o){if(!(r.exception&&r.exception.values&&o&&i.isInstanceOf(o.originalException,Error)))return r;const a=l(e,n,o.originalException,t);return r.exception.values=[...a,...r.exception.values],r}function l(e,t,n,r,a=[]){if(!i.isInstanceOf(n[r],Error)||a.length+1>=t)return a;const s=o.exceptionFromError(e,n[r]);return l(e,t,n[r],r,[s,...a])}a.__initStatic(),t.LinkedErrors=a,t._handler=s,t._walkErrorTree=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(218),i=n(277);class o{constructor(){o.prototype.__init.call(this)}static __initStatic(){this.id="HttpContext"}__init(){this.name=o.id}setupOnce(){r.addGlobalEventProcessor((e=>{if(r.getCurrentHub().getIntegration(o)){if(!i.WINDOW.navigator&&!i.WINDOW.location&&!i.WINDOW.document)return e;const t=e.request&&e.request.url||i.WINDOW.location&&i.WINDOW.location.href,{referrer:n}=i.WINDOW.document||{},{userAgent:r}=i.WINDOW.navigator||{},o={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},a={...e.request,...t&&{url:t},headers:o};return{...e,request:a}}return e}))}}o.__initStatic(),t.HttpContext=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(163);class i{constructor(){i.prototype.__init.call(this)}static __initStatic(){this.id="Dedupe"}__init(){this.name=i.id}setupOnce(e,t){const n=e=>{if(e.type)return e;const n=t().getIntegration(i);if(n){try{if(function(e,t){if(!t)return!1;if(function(e,t){const n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!a(e,t))return!1;if(!o(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){const n=s(t),r=s(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!a(e,t))return!1;if(!o(e,t))return!1;return!0}(e,t))return!0;return!1}(e,n._previousEvent))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.logger.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(t){return n._previousEvent=e}return n._previousEvent=e}return e};n.id=this.name,e(n)}}function o(e,t){let n=l(e),r=l(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let e=0;e<r.length;e++){const t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function a(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch(e){return!1}}function s(e){return e.exception&&e.exception.values&&e.exception.values[0]}function l(e){const t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch(e){return}}i.__initStatic(),t.Dedupe=i},function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return r})),function(e){e.Dm="dm",e.Invite="invite",e.CallTransfer="call_transfer"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(6),i=n(125),o=n(137);let a;!function(e){e[e.Allowed=0]="Allowed",e[e.Denied=1]="Denied",e[e.Unknown=2]="Unknown"}(a||(a={}));class s{constructor(e){this.context=e}packSettingKey(e,t,n){let i=n;var o;t!==r.WidgetKind.Room&&(i=null===(o=this.context.client)||void 0===o?void 0:o.getUserId());if(t===r.WidgetKind.Modal&&(i="*MODAL*-"+i),!i)throw new Error("Failed to determine a location to check the widget's OIDC state with");return encodeURIComponent(`${i}::${e.templateUrl}`)}getOIDCState(e,t,n){var r,o;const s=this.packSettingKey(e,t,n),l=i.b.getValue("widgetOpenIDPermissions");return null!=l&&null!==(r=l.deny)&&void 0!==r&&r.includes(s)?a.Denied:null!=l&&null!==(o=l.allow)&&void 0!==o&&o.includes(s)?a.Allowed:a.Unknown}setOIDCState(e,t,n,r){const s=this.packSettingKey(e,t,n);let l=i.b.getValue("widgetOpenIDPermissions");l||(l={}),l.allow||(l.allow=[]),l.deny||(l.deny=[]),r===a.Allowed?l.allow.push(s):r===a.Denied?l.deny.push(s):(l.allow=l.allow.filter((e=>e!==s)),l.deny=l.deny.filter((e=>e!==s))),i.b.setValue("widgetOpenIDPermissions",null,o.a.DEVICE,l)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return S}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(129),l=n(160),c=n(131),u=n(200),d=n(121),h=n(122),p=n(139),m=n(589),g=n(235),f=n(145),_=n(135),b=n(802),v=n(152),y=n(142),E=n(307);class S extends a.a.Component{constructor(e){var t;super(e),i()(this,"supportsRestricted",void 0),i()(this,"nameField",Object(o.createRef)()),i()(this,"aliasField",Object(o.createRef)()),i()(this,"onKeyDown",(e=>{if(Object(v.a)().getAccessibilityAction(e)===y.h.Enter)this.onOk(),e.preventDefault(),e.stopPropagation()})),i()(this,"onOk",(async()=>{const e=document.activeElement;if(e&&e.blur(),await this.nameField.current.validate({allowEmpty:!1}),this.aliasField.current&&await this.aliasField.current.validate({allowEmpty:!1}),await new Promise((e=>this.setState({},e))),!this.state.nameIsValid||this.aliasField.current&&!this.aliasField.current.isValid){let e;this.state.nameIsValid?this.aliasField.current&&!this.aliasField.current.isValid&&(e=this.aliasField.current):e=this.nameField.current,e&&(e.focus(),e.validate({allowEmpty:!1,focused:!0}))}else this.props.onFinished(!0,this.roomCreateOptions())})),i()(this,"onCancel",(()=>{this.props.onFinished(!1)})),i()(this,"onNameChange",(e=>{this.setState({name:e.target.value})})),i()(this,"onTopicChange",(e=>{this.setState({topic:e.target.value})})),i()(this,"onJoinRuleChange",(e=>{this.setState({joinRule:e})})),i()(this,"onEncryptedChange",(e=>{this.setState({isEncrypted:e})})),i()(this,"onAliasChange",(e=>{this.setState({alias:e})})),i()(this,"onDetailsToggled",(e=>{this.setState({detailsOpen:e.target.open})})),i()(this,"onNoFederateChange",(e=>{this.setState({noFederate:e})})),i()(this,"onNameValidate",(async e=>{const t=await S.validateRoomName(e);return this.setState({nameIsValid:t.valid}),t})),this.supportsRestricted=!!this.props.parentSpace;let n=l.c.Invite;this.props.defaultPublic?n=l.c.Public:this.supportsRestricted&&(n=l.c.Restricted),this.state={isPublic:this.props.defaultPublic||!1,isEncrypted:null!==(t=this.props.defaultEncrypted)&&void 0!==t?t:Object(E.a)(),joinRule:n,name:this.props.defaultName||"",topic:"",alias:"",detailsOpen:!1,noFederate:!1===c.b.get().default_federate,nameIsValid:!1,canChangeEncryption:!0},h.a.get().doesServerForceEncryptionForPreset(l.d.PrivateChat).then((e=>this.setState({canChangeEncryption:!e})))}roomCreateOptions(){const e={},t=e.createOpts={};if(e.roomType=this.props.type,t.name=this.state.name,this.state.joinRule===l.c.Public){t.visibility=l.f.Public,t.preset=l.d.PublicChat,e.guestAccess=!1;const{alias:n}=this.state;t.room_alias_name=n.substring(1,n.indexOf(":"))}else e.encryption=!this.state.canChangeEncryption||this.state.isEncrypted;return this.state.topic&&(t.topic=this.state.topic),this.state.noFederate&&(t.creation_content={"m.federate":!1}),e.parentSpace=this.props.parentSpace,this.props.parentSpace&&this.state.joinRule===l.c.Restricted&&(e.joinRule=l.c.Restricted),e}componentDidMount(){this.nameField.current.focus()}render(){const e=this.props.type===s.j.ElementVideo;let t,n,r;if(this.state.joinRule===l.c.Public){const e=h.a.get().getDomain();t=a.a.createElement("div",{className:"mx_CreateRoomDialog_aliasContainer"},a.a.createElement(m.a,{ref:this.aliasField,onChange:this.onAliasChange,domain:e,value:this.state.alias}))}if(this.state.joinRule===l.c.Restricted?n=a.a.createElement("p",null,Object(d.a)("Everyone in <SpaceName/> will be able to find and join this room.",{},{SpaceName:()=>a.a.createElement("b",null,this.props.parentSpace.name)})," ",Object(d.a)("You can change this at any time from room settings.")):this.state.joinRule===l.c.Public&&this.props.parentSpace?n=a.a.createElement("p",null,Object(d.a)("Anyone will be able to find and join this room, not just members of <SpaceName/>.",{},{SpaceName:()=>a.a.createElement("b",null,this.props.parentSpace.name)})," ",Object(d.a)("You can change this at any time from room settings.")):this.state.joinRule===l.c.Public?n=a.a.createElement("p",null,Object(d.a)("Anyone will be able to find and join this room.")," ",Object(d.a)("You can change this at any time from room settings.")):this.state.joinRule===l.c.Invite&&(n=a.a.createElement("p",null,Object(d.a)("Only people invited will be able to find and join this room.")," ",Object(d.a)("You can change this at any time from room settings."))),this.state.joinRule!==l.c.Public){let t;t=Object(E.a)()?this.state.canChangeEncryption?e?Object(d.a)("You can't disable this later. The room will be encrypted but the embedded call will not."):Object(d.a)("You can't disable this later. Bridges & most bots won't work yet."):Object(d.a)("Your server requires encryption to be enabled in private rooms."):Object(d.a)("Your server admin has disabled end-to-end encryption by default in private rooms & Direct Messages."),r=a.a.createElement(a.a.Fragment,null,a.a.createElement(g.a,{label:Object(d.a)("Enable end-to-end encryption"),onChange:this.onEncryptedChange,value:this.state.isEncrypted,className:"mx_CreateRoomDialog_e2eSwitch",disabled:!this.state.canChangeEncryption}),a.a.createElement("p",null,t))}let i,o=Object(d.a)("You might enable this if the room will only be used for collaborating with internal teams on your homeserver. This cannot be changed later.");return!1===c.b.get().default_federate&&(o=Object(d.a)("You might disable this if the room will be used for collaborating with external teams who have their own homeserver. This cannot be changed later.")),i=e?Object(d.a)("Create a video room"):this.props.parentSpace?Object(d.a)("Create a room"):this.state.joinRule===l.c.Public?Object(d.a)("Create a public room"):Object(d.a)("Create a private room"),a.a.createElement(_.a,{className:"mx_CreateRoomDialog",onFinished:this.props.onFinished,title:i,screenName:"CreateRoom"},a.a.createElement("form",{onSubmit:this.onOk,onKeyDown:this.onKeyDown},a.a.createElement("div",{className:"mx_Dialog_content"},a.a.createElement(p.a,{ref:this.nameField,label:Object(d.a)("Name"),onChange:this.onNameChange,onValidate:this.onNameValidate,value:this.state.name,className:"mx_CreateRoomDialog_name"}),a.a.createElement(p.a,{label:Object(d.a)("Topic (optional)"),onChange:this.onTopicChange,value:this.state.topic,className:"mx_CreateRoomDialog_topic"}),a.a.createElement(b.a,{label:Object(d.a)("Room visibility"),labelInvite:Object(d.a)("Private room (invite only)"),labelPublic:Object(d.a)("Public room"),labelRestricted:this.supportsRestricted?Object(d.a)("Visible to space members"):void 0,value:this.state.joinRule,onChange:this.onJoinRuleChange}),n,r,t,a.a.createElement("details",{onToggle:this.onDetailsToggled,className:"mx_CreateRoomDialog_details"},a.a.createElement("summary",{className:"mx_CreateRoomDialog_details_summary"},this.state.detailsOpen?Object(d.a)("Hide advanced"):Object(d.a)("Show advanced")),a.a.createElement(g.a,{label:Object(d.a)("Block anyone not part of %(serverName)s from ever joining this room.",{serverName:h.a.getHomeserverName()}),onChange:this.onNoFederateChange,value:this.state.noFederate}),a.a.createElement("p",null,o)))),a.a.createElement(f.a,{primaryButton:e?Object(d.a)("Create video room"):Object(d.a)("Create room"),onPrimaryButtonClick:this.onOk,onCancel:this.onCancel}))}}i()(S,"validateRoomName",Object(u.a)({rules:[{key:"required",test:async e=>{let{value:t}=e;return!!t},invalid:()=>Object(d.a)("Please enter a name for the room")}]}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(121),l=n(200),c=n(139),u=n(133);class d extends a.a.PureComponent{constructor(e,t){super(e,t),i()(this,"context",void 0),i()(this,"fieldRef",Object(o.createRef)()),i()(this,"onChange",(e=>{var t,n;null===(t=(n=this.props).onChange)||void 0===t||t.call(n,this.asFullAlias(e.target.value))})),i()(this,"onValidate",(async e=>{const t=await this.validationRules(e);return this.setState({isValid:t.valid}),t})),i()(this,"validationRules",Object(l.a)({rules:[{key:"hasDomain",test:async e=>{let{value:t}=e;return!(t&&!this.props.domain)||!(t.split(":").length<2)},invalid:()=>Object(s.a)("Missing domain separator e.g. (:domain.org)")},{key:"hasLocalpart",test:async e=>{let{value:t}=e;if(!t||this.props.domain)return!0;const n=t.split(":");return n.length<2||!(n[0].length<1)},invalid:()=>Object(s.a)("Missing room name or separator e.g. (my-room:domain.org)")},{key:"safeLocalpart",test:async e=>{let{value:t}=e;if(!t)return!0;if(this.props.domain){const e=this.asFullAlias(t),n=!this.props.domain||!t.includes(":");return!t.includes("#")&&n&&!t.includes(",")&&encodeURI(e)===e}return!0},invalid:()=>Object(s.a)("Some characters not allowed")},{key:"required",test:async e=>{let{value:t,allowEmpty:n}=e;return n||!!t},invalid:()=>Object(s.a)("Please provide an address")},this.props.roomId?{key:"matches",final:!0,test:async e=>{let{value:t}=e;if(!t)return!0;const n=this.context;try{return(await n.getRoomIdForAlias(this.asFullAlias(t))).room_id===this.props.roomId}catch(e){return console.log(e),!1}},invalid:()=>Object(s.a)("This address does not point at this room")}:{key:"taken",final:!0,test:async e=>{let{value:t}=e;if(!t)return!0;const n=this.context;try{return await n.getRoomIdForAlias(this.asFullAlias(t)),!1}catch(e){return console.log(e),!!e.errcode}},valid:()=>Object(s.a)("This address is available to use"),invalid:()=>this.props.domain?Object(s.a)("This address is already in use"):Object(s.a)("This address had invalid server or is already in use")}]})),this.state={isValid:!0}}asFullAlias(e){const t=`#${e}`;return this.props.domain?`${t}:${this.props.domain}`:t}get domainProps(){const{domain:e}=this.props,t=a.a.createElement("span",null,"#"),n=e?a.a.createElement("span",{title:`:${e}`},`:${e}`):a.a.createElement("span",null),r=e?255-e.length-2:254;return{prefix:t,postfix:n,value:e?this.props.value.substring(1,this.props.value.length-this.props.domain.length-1):this.props.value.substring(1),maxlength:r}}render(){const{prefix:e,postfix:t,value:n,maxlength:r}=this.domainProps;return a.a.createElement(c.a,{label:this.props.label||Object(s.a)("Room address"),className:"mx_RoomAliasField",prefixComponent:e,postfixComponent:t,ref:this.fieldRef,onValidate:this.onValidate,placeholder:this.props.placeholder||Object(s.a)("e.g. my-room"),onChange:this.onChange,value:n,maxLength:r,disabled:this.props.disabled,autoComplete:"off",onKeyDown:this.props.onKeyDown})}get isValid(){return this.state.isValid}validate(e){var t;return null===(t=this.fieldRef.current)||void 0===t?void 0:t.validate(e)}focus(){var e;null===(e=this.fieldRef.current)||void 0===e||e.focus()}}i()(d,"contextType",u.a)},function(e,t,n){"use strict";n.d(t,"c",(function(){return I})),n.d(t,"b",(function(){return M})),n.d(t,"a",(function(){return P}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(126),l=n.n(s),c=n(129),u=n(160),d=n(1),h=n(121),p=n(148),m=n(150),g=n(219),f=n(133),_=n(805),b=n(123),v=n(139),y=n(200),E=n(589),S=n(127),w=n(804),T=n(125),C=n(152),x=n(142),F=n(122),D=n(462);function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const I=async function(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{};return Object(g.b)(O({createOpts:O({name:e,preset:t?u.d.PublicChat:u.d.PrivateChat,visibility:t&&await F.a.get().doesServerSupportUnstableFeature("org.matrix.msc3827.stable")?u.f.Public:u.f.Private,power_level_content_override:{events_default:100,invite:t?0:50},room_alias_name:t&&n?n.substring(1,n.indexOf(":")):void 0,topic:r},o),avatar:i,roomType:c.j.Space,historyVisibility:t?u.b.WorldReadable:u.b.Invited,spinner:!1,encryption:!1,andView:!0,inlineErrors:!0},a))},A=e=>{let{title:t,description:n,className:r,onClick:i}=e;return a.a.createElement(b.a,{className:l()("mx_SpaceCreateMenuType",r),onClick:i},a.a.createElement("h3",null,t),a.a.createElement("span",null,n))},R=Object(y.a)({rules:[{key:"required",test:async e=>{let{value:t}=e;return!!t},invalid:()=>Object(h.a)("Please enter a name for the space")}]}),N=e=>e.trim().toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9_-]+/gi,""),M=e=>{let{onClick:t}=e;return Object(D.a)()?a.a.createElement("div",{className:"mx_SpaceFeedbackPrompt"},a.a.createElement("span",{className:"mx_SpaceFeedbackPrompt_text"},Object(h.a)("Spaces are a new feature.")),a.a.createElement(b.a,{kind:"link_inline",onClick:()=>{t&&t(),S.b.createDialog(w.a,{title:Object(h.a)("Spaces feedback"),subheading:Object(h.a)("Thank you for trying Spaces. Your feedback will help inform the next versions."),rageshakeLabel:"spaces-feedback",rageshakeData:Object.fromEntries(["Spaces.allRoomsInHome","Spaces.enabledMetaSpaces"].map((e=>[e,String(T.b.getValue(e))])))})}},Object(h.a)("Give feedback."))):null},P=e=>{var t;let{busy:n,onSubmit:r,avatarUrl:i,setAvatar:s,name:l,setName:c,nameFieldRef:u,alias:d,aliasFieldRef:p,setAlias:m,showAliasField:g,topic:b,setTopic:y,children:S}=e;const w=null!==(t=Object(o.useContext)(f.a).getDomain())&&void 0!==t?t:void 0,T=e=>{if(Object(C.a)().getAccessibilityAction(e)===x.h.Enter)r(e)};return a.a.createElement("form",{className:"mx_SpaceBasicSettings",onSubmit:r},a.a.createElement(_.a,{avatarUrl:i,setAvatar:s,avatarDisabled:n}),a.a.createElement(v.a,{name:"spaceName",label:Object(h.a)("Name"),autoFocus:!0,value:l,onChange:e=>{const t=e.target.value;var n;d&&d!==`#${N(l)}:${w}`||(m(`#${N(t)}:${w}`),null===(n=p.current)||void 0===n||n.validate({allowEmpty:!0}));c(t)},onKeyDown:T,ref:u,onValidate:R,disabled:n,autoComplete:"off"}),g?a.a.createElement(E.a,{ref:p,onChange:m,domain:w,value:d,placeholder:l?N(l):Object(h.a)("e.g. my-space"),label:Object(h.a)("Address"),disabled:n,onKeyDown:T}):null,a.a.createElement(v.a,{name:"spaceTopic",element:"textarea",label:Object(h.a)("Description"),value:null!=b?b:"",onChange:e=>y(e.target.value),rows:3,disabled:n}),S)};t.d=e=>{let{onFinished:t}=e;const[n,r]=Object(o.useState)(null),[i,s]=Object(o.useState)(!1),[l,c]=Object(o.useState)(""),g=Object(o.useRef)(),[f,_]=Object(o.useState)(""),v=Object(o.useRef)(),[y,E]=Object(o.useState)(void 0),[S,w]=Object(o.useState)(""),T=async e=>{if(e.preventDefault(),!i){if(s(!0),g.current&&!await g.current.validate({allowEmpty:!1}))return g.current.focus(),g.current.validate({allowEmpty:!1,focused:!0}),void s(!1);if(v.current&&n===u.f.Public&&!await v.current.validate({allowEmpty:!1}))return v.current.focus(),v.current.validate({allowEmpty:!1,focused:!0}),void s(!1);try{await I(l,n===u.f.Public,f,S,y),t()}catch(e){d.a.error(e)}}};let C;return C=null===n?a.a.createElement(a.a.Fragment,null,a.a.createElement("h2",null,Object(h.a)("Create a space")),a.a.createElement("p",null,Object(h.a)("Spaces are a new way to group rooms and people. What kind of Space do you want to create? You can change this later.")),a.a.createElement(A,{title:Object(h.a)("Public"),description:Object(h.a)("Open space for anyone, best for communities"),className:"mx_SpaceCreateMenuType_public",onClick:()=>r(u.f.Public)}),a.a.createElement(A,{title:Object(h.a)("Private"),description:Object(h.a)("Invite only, best for yourself or teams"),className:"mx_SpaceCreateMenuType_private",onClick:()=>r(u.f.Private)}),a.a.createElement("p",null,Object(h.a)("To join a space you'll need an invite.")),a.a.createElement(M,{onClick:t})):a.a.createElement(a.a.Fragment,null,a.a.createElement(p.a,{className:"mx_SpaceCreateMenu_back",onClick:()=>r(null),title:Object(h.a)("Go back")}),a.a.createElement("h2",null,n===u.f.Public?Object(h.a)("Your public space"):Object(h.a)("Your private space")),a.a.createElement("p",null,Object(h.a)("Add some details to help people recognise it.")," ",Object(h.a)("You can change these anytime.")),a.a.createElement(P,{busy:i,onSubmit:T,setAvatar:E,name:l,setName:c,nameFieldRef:g,topic:S,setTopic:w,alias:f,setAlias:_,showAliasField:n===u.f.Public,aliasFieldRef:v}),a.a.createElement(b.a,{kind:"primary",onClick:T,disabled:i},i?Object(h.a)("Creating…"):Object(h.a)("Create"))),a.a.createElement(m.n,{left:72,top:62,chevronOffset:0,chevronFace:m.a.None,onFinished:t,wrapperClassName:"mx_SpaceCreateMenu_wrapper",managed:!1,focusLock:!0},C)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(120),i=n(491),o=n(593),a=n(592),s=n(141);const l=e=>{const t=Object(r.useMemo)((()=>i.a.forRoom(e)),[e]),[n,l]=Object(r.useState)(t.notificationVolume);Object(s.a)(t,o.b,(e=>{e===a.a.NotificationVolume&&l(t.notificationVolume)}));return[n,Object(r.useCallback)((e=>t.notificationVolume=e),[t])]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d}));var r=n(13),i=n.n(r),o=n(129),a=n(136),s=n(593),l=n(264),c=n(121);let u;!function(e){e[e.NotificationVolume=0]="NotificationVolume"}(u||(u={}));class d extends s.a{constructor(e){super(e,(e=>this.properties.get(e))),i()(this,"properties",new Map),i()(this,"onAccountData",(e=>{if(e.getType()===o.b.PushRules){this.properties.get(u.NotificationVolume)!==Object(l.c)(this.matrixClient,this.context.room.roomId)&&this.updateNotificationVolume()}}))}onClientChanged(e,t){this.properties.clear(),null==e||e.removeListener(a.ClientEvent.AccountData,this.onAccountData),t&&(t.on(a.ClientEvent.AccountData,this.onAccountData),this.updateNotificationVolume())}updateNotificationVolume(){const e=this.matrixClient?Object(l.c)(this.matrixClient,this.context.room.roomId):null;e?this.properties.set(u.NotificationVolume,e):this.properties.delete(u.NotificationVolume),this.markEchoReceived(u.NotificationVolume),this.emit(s.b,u.NotificationVolume)}get notificationVolume(){return this.getValue(u.NotificationVolume)}set notificationVolume(e){this.setValue(Object(c.a)("Change notification settings"),u.NotificationVolume,e,(async()=>Object(l.d)(this.context.room.roomId,e)),s.c)}}},function(e,t,n){"use strict";n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return c}));var r=n(13),i=n.n(r),o=n(17),a=n(594);async function s(){}const l="property_updated";class c extends o.EventEmitter{constructor(e,t){super(),this.context=e,this.lookupFn=t,i()(this,"cache",new Map),i()(this,"matrixClient",void 0)}setClient(e){const t=this.matrixClient;this.matrixClient=e,this.onClientChanged(t,e)}getValue(e){return this.cache.has(e)?this.cache.get(e).val:this.lookupFn(e)}cacheVal(e,t,n){this.cache.set(e,{txn:n,val:t}),this.emit(l,e)}decacheKey(e){this.cache.has(e)&&(this.context.disownTransaction(this.cache.get(e).txn),this.cache.delete(e),this.emit(l,e))}markEchoReceived(e){if(this.cache.has(e)){const t=this.cache.get(e).txn;this.context.disownTransaction(t),t.cancel()}this.decacheKey(e)}setValue(e,t,n,r,i){this.cache.has(t)&&this.cache.get(t).txn.cancel();const o=this.context.beginTransaction(e,r);this.cacheVal(t,n,o),o.when(a.b.Pending,(()=>this.cacheVal(t,n,o))).when(a.b.Error,(()=>i())),o.run()}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s}));var r=n(13),i=n.n(r),o=n(808);let a;!function(e){e[e.Pending=0]="Pending",e[e.Success=1]="Success",e[e.Error=2]="Error"}(a||(a={}));class s extends o.a{constructor(e,t){super(),this.auditName=e,this.runFn=t,i()(this,"_status",a.Pending),i()(this,"didFail",!1),i()(this,"startTime",new Date)}get didPreviouslyFail(){return this.didFail}get status(){return this._status}run(){if(this.status===a.Success)throw new Error("Cannot re-run a successful echo transaction");this.setStatus(a.Pending),this.runFn().then((()=>this.setStatus(a.Success))).catch((()=>this.setStatus(a.Error)))}cancel(){this.setStatus(a.Success)}setStatus(e){this._status=e,e===a.Error?this.didFail=!0:e===a.Success&&(this.didFail=!1),this.notifyCondition(e)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(215);const i=e=>(t,n)=>{t!==r.b.Error&&n!==t&&e()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(396),l=n(290);class c extends a.a.PureComponent{constructor(e){super(e),i()(this,"animationFrameFn",new s.a((()=>this.doUpdate()),(()=>requestAnimationFrame((()=>this.animationFrameFn.trigger()))))),i()(this,"onChange",(e=>{this.props.playback.skipTo(Number(e.target.value)*this.props.playback.durationSeconds)})),i()(this,"onMouseDown",(e=>{e.stopPropagation()})),this.state={percentage:Object(l.c)(this.props.playback.timeSeconds,0,this.props.playback.durationSeconds)},this.props.playback.liveData.onUpdate((()=>this.animationFrameFn.mark()))}doUpdate(){this.setState({percentage:Object(l.c)(this.props.playback.timeSeconds,0,this.props.playback.durationSeconds)})}left(){this.props.playback.skipTo(this.props.playback.timeSeconds-5)}right(){this.props.playback.skipTo(this.props.playback.timeSeconds+5)}render(){return a.a.createElement("input",{type:"range",className:"mx_SeekBar",tabIndex:this.props.tabIndex,onChange:this.onChange,onMouseDown:this.onMouseDown,min:0,max:1,value:this.state.percentage,step:.001,style:{"--fillTo":this.state.percentage},disabled:this.props.disabled})}}i()(c,"defaultProps",{tabIndex:0,disabled:!1})},function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return l}));var r=n(13),i=n.n(r),o=n(158),a=n(192);let s;!function(e){e.CurrentChanged="current_changed"}(s||(s={}));class l extends o.b{constructor(e){super(),this.recordings=e,i()(this,"current",null),i()(this,"playbacks",new Map),i()(this,"onPlaybackStateChanged",((e,t)=>{switch(e){case a.m.Buffering:case a.m.Playing:this.pauseExcept(t),this.setCurrent(t);break;case a.m.Stopped:this.clearCurrent()}}))}setCurrent(e){this.current!==e&&(this.current=e,this.addPlayback(e),this.emit(s.CurrentChanged,e))}clearCurrent(){null!==this.current&&(this.current=null,this.emit(s.CurrentChanged,null))}getCurrent(){return this.current}getByInfoEvent(e,t){const n=e.getId();return this.playbacks.has(n)||this.addPlayback(new a.i(e,t,this.recordings)),this.playbacks.get(n)}addPlayback(e){const t=e.infoEvent.getId();this.playbacks.has(t)||(this.playbacks.set(t,e),e.on(a.l.StateChanged,this.onPlaybackStateChanged))}pauseExcept(e){for(const t of this.playbacks.values())t!==e&&t.pause()}destroy(){this.removeAllListeners();for(const e of this.playbacks.values())e.off(a.l.StateChanged,this.onPlaybackStateChanged);this.playbacks=new Map}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(192);const i=e=>{var t,n,i;return(null===(t=e.getType)||void 0===t?void 0:t.call(e))===r.g&&((null===(n=e.getContent)||void 0===n||null===(i=n.call(e))||void 0===i?void 0:i.state)===r.h.Started||e.isRedacted())}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(121),i=n(122),o=n(465);const a=e=>{var t;const n=null===(t=i.a.get())||void 0===t?void 0:t.getUserId();return n&&n===e.getSender()?Object(r.a)("You ended a voice broadcast",{}):Object(r.a)("%(senderName)s ended a voice broadcast",{senderName:Object(o.a)(e)})}},function(e,t,n){"use strict";n.d(t,"c",(function(){return c})),n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d}));var r=n(120),i=n.n(r),o=n(126),a=n.n(o),s=n(121),l=n(280);let c;!function(e){e[e.Video=0]="Video"}(c||(c={}));const u=e=>{let{type:t,text:n,active:r,participantCount:o}=e;return i.a.createElement("span",{className:"mx_LiveContentSummary"},i.a.createElement("span",{className:a()("mx_LiveContentSummary_text",{mx_LiveContentSummary_text_video:t===c.Video,mx_LiveContentSummary_text_active:r})},n),o>0&&i.a.createElement(i.a.Fragment,null," • ",i.a.createElement("span",{className:"mx_LiveContentSummary_participants","aria-label":Object(s.a)("%(count)s participants",{count:o})},o)))},d=e=>{let{call:t}=e;return i.a.createElement(u,{type:c.Video,text:Object(s.a)("Video"),active:!1,participantCount:Object(l.f)(t)})}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n.name="ValidationError",n.message=t,n}return i(t,e),t}(Error);t.ValidationError=o},function(e,t,n){"use strict";n.r(t),n.d(t,"Icon",(function(){return c}));var r,i,o,a,s=n(120);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(this,arguments)}function c(e){return s.createElement("svg",l({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 24 23",role:"presentation","aria-hidden":!0},e),r||(r=s.createElement("defs",null,s.createElement("path",{id:"warning_svg__a",d:"M9.2 2.2c1.6-2.9 4.1-2.9 5.7 0l8.3 15.4c1.6 2.9.2 5.3-3.2 5.3H4c-3.3 0-4.7-2.4-3.2-5.3L9.2 2.2zm0 0"}))),i||(i=s.createElement("clipPath",{id:"warning_svg__b"},s.createElement("use",{xlinkHref:"#warning_svg__a",overflow:"visible"}))),o||(o=s.createElement("path",{clipPath:"url(#warning_svg__b)",fill:"#ff0064",d:"M-4.8-5h33.6v32.9H-4.8z"})),a||(a=s.createElement("g",null,s.createElement("defs",null,s.createElement("path",{id:"warning_svg__c",d:"M12.7 15l.3-9.6h-2l.3 9.6h1.4zm-.7 4.1c.7 0 1.2-.5 1.2-1.2s-.5-1.2-1.2-1.2-1.2.5-1.2 1.2.5 1.2 1.2 1.2zm0 0"})),s.createElement("clipPath",{id:"warning_svg__d"},s.createElement("use",{xlinkHref:"#warning_svg__c",overflow:"visible"})),s.createElement("path",{clipPath:"url(#warning_svg__d)",fill:"#fff",d:"M5.8.4h12.4v23.7H5.8z"}))))}t.default="img/warning.30e1625.svg"},function(e,t,n){"use strict";t.__esModule=!0,t.default=t.EXITING=t.ENTERED=t.ENTERING=t.EXITED=t.UNMOUNTED=void 0;l(n(216));var r=l(n(120)),i=l(n(186)),o=l(n(828)),a=(n(829),l(n(604))),s=n(830);function l(e){return e&&e.__esModule?e:{default:e}}var c="unmounted";t.UNMOUNTED=c;var u="exited";t.EXITED=u;var d="entering";t.ENTERING=d;var h="entered";t.ENTERED=h;var p="exiting";t.EXITING=p;var m=function(e){var t,n;function l(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=u,r.appearStatus=d):i=h:i=t.unmountOnExit||t.mountOnEnter?c:u,r.state={status:i},r.nextCallback=null,r}n=e,(t=l).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,l.getDerivedStateFromProps=function(e,t){return e.in&&t.status===c?{status:u}:null};var m=l.prototype;return m.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},m.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==d&&n!==h&&(t=d):n!==d&&n!==h||(t=p)}this.updateStatus(!1,t)},m.componentWillUnmount=function(){this.cancelNextCallback()},m.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},m.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===d){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:i.default.findDOMNode(this);n&&(0,s.forceReflow)(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===u&&this.setState({status:c})},m.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,a=this.props.nodeRef?[r]:[i.default.findDOMNode(this),r],s=a[0],l=a[1],c=this.getTimeouts(),u=r?c.appear:c.enter;!e&&!n||o.default.disabled?this.safeSetState({status:h},(function(){t.props.onEntered(s)})):(this.props.onEnter(s,l),this.safeSetState({status:d},(function(){t.props.onEntering(s,l),t.onTransitionEnd(u,(function(){t.safeSetState({status:h},(function(){t.props.onEntered(s,l)}))}))})))},m.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:i.default.findDOMNode(this);t&&!o.default.disabled?(this.props.onExit(r),this.safeSetState({status:p},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:u},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:u},(function(){e.props.onExited(r)}))},m.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},m.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},m.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},m.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:i.default.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=o[0],s=o[1];this.props.addEndListener(a,s)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},m.render=function(){var e=this.state.status;if(e===c)return null;var t=this.props,n=t.children,i=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return r.default.createElement(a.default.Provider,{value:null},"function"==typeof n?n(e,i):r.default.cloneElement(r.default.Children.only(n),i))},l}(r.default.Component);function g(){}m.contextType=a.default,m.propTypes={},m.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:g,onEntering:g,onEntered:g,onExit:g,onExiting:g,onExited:g},m.UNMOUNTED=c,m.EXITED=u,m.ENTERING=d,m.ENTERED=h,m.EXITING=p;var f=m;t.default=f},function(e,t,n){"use strict";var r;t.__esModule=!0,t.default=void 0;var i=((r=n(120))&&r.__esModule?r:{default:r}).default.createContext(null);t.default=i,e.exports=t.default},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r,i=n(120);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}function a(e){return i.createElement("svg",o({fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"presentation","aria-hidden":!0},e),r||(r=i.createElement("path",{d:"M3 9.5a.5.5 0 01.5-.5h3a.5.5 0 01.5.5V22H3V9.5zM17 13.5a.5.5 0 01.5-.5h3a.5.5 0 01.5.5V22h-4v-8.5zM10 2.5a.5.5 0 01.5-.5h3a.5.5 0 01.5.5V22h-4V2.5z",fill:"currentColor"})))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r,i=n(120);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}function a(e){return i.createElement("svg",o({fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"presentation","aria-hidden":!0},e),r||(r=i.createElement("path",{d:"M12 2C8.13 2 5 5.215 5 9.19c0 4.284 4.42 10.19 6.24 12.44a.976.976 0 001.53 0C14.58 19.38 19 13.474 19 9.19 19 5.216 15.87 2 12 2zm0 9.759c-1.38 0-2.5-1.15-2.5-2.568 0-1.418 1.12-2.569 2.5-2.569s2.5 1.151 2.5 2.569c0 1.417-1.12 2.568-2.5 2.568z",fill:"currentColor"})))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r,i=n(120);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}function a(e){return i.createElement("svg",o({fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 26 14",role:"presentation","aria-hidden":!0},e),r||(r=i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.654 13.153a.87.87 0 00.063-1.173c-2.41-2.93-2.41-7.185-.007-10.121A.885.885 0 003.654.673a.89.89 0 00-1.318.063c-2.93 3.582-2.93 8.765 0 12.354a.885.885 0 001.318.063zm2.529-2.529a.885.885 0 00.081-1.148 4.432 4.432 0 010-5.12.893.893 0 00-.081-1.148l-.007-.006c-.376-.377-1.016-.352-1.324.081a6.218 6.218 0 000 7.266c.314.433.948.458 1.33.075zm7.132-9.585c-2.429 0-4.392 2.018-4.392 4.512 0 2.688 2.773 6.394 3.915 7.805.25.31.709.31.96 0 1.136-1.411 3.909-5.117 3.909-7.805 0-2.494-1.964-4.512-4.392-4.512zm0 6.123c-.866 0-1.569-.722-1.569-1.611 0-.89.703-1.611 1.569-1.611s1.568.721 1.568 1.61c0 .89-.702 1.612-1.568 1.612zm8.994 4.818a.87.87 0 00.063 1.173.885.885 0 001.318-.063c2.93-3.589 2.93-8.772 0-12.354a.89.89 0 00-1.318-.063.885.885 0 00-.056 1.186c2.403 2.936 2.403 7.19-.007 10.12zm-2.547-2.504a.885.885 0 00.081 1.148c.383.383 1.017.358 1.33-.075a6.217 6.217 0 000-7.266c-.307-.433-.947-.458-1.323-.081l-.007.006a.893.893 0 00-.081 1.148 4.432 4.432 0 010 5.12z",fill:"currentColor"})))}},function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(120);const i=(e,t)=>{const n=Object(r.useRef)();Object(r.useEffect)((()=>{n.current=e}),[e]),Object(r.useEffect)((()=>{const e=window.setTimeout((()=>{var e;null===(e=n.current)||void 0===e||e.call(n)}),t);return()=>clearTimeout(e)}),[t])},o=(e,t)=>{const n=Object(r.useRef)();Object(r.useEffect)((()=>{n.current=e}),[e]),Object(r.useEffect)((()=>{const e=window.setInterval((()=>{var e;null===(e=n.current)||void 0===e||e.call(n)}),t);return()=>clearInterval(e)}),[t])},a=(e,t,n)=>{const[i,a]=Object(r.useState)(n);return o((()=>a((e=>e-1))),t),0===i&&e(),i}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=e=>t=>{null==t||t.stopPropagation(),null==t||t.preventDefault(),e()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(120),i=n.n(r),o=n(126),a=n.n(o),s=n(394),l=n(121),c=n(230),u=n(123),d=n(175);const h=e=>{let{error:t,isMinimised:n,className:r,onFinished:o,onClick:h}=e;return i.a.createElement("div",{"data-testid":"map-rendering-error",className:a()("mx_MapError",r,{mx_MapError_isMinimised:n}),onClick:h},i.a.createElement(s.Icon,{className:"mx_MapError_icon"}),i.a.createElement(d.a,{className:"mx_MapError_heading",size:"h3"},Object(l.a)("Unable to load map")),i.a.createElement("p",{className:"mx_MapError_message"},Object(c.e)(t)),o&&i.a.createElement(u.a,{element:"button",kind:"primary",onClick:o},Object(l.a)("OK")))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var r=n(122),i=n(121);function o(e,t){const n=r.a.get().getRoom(t),i=n&&n.getMember(e);return i?i.name:e}function a(e,t){const n=o(e,t);return n!==e?Object(i.a)("%(name)s (%(userId)s)",{name:n,userId:e}):e}},function(e,t,n){"use strict";var r=n(130),i=n.n(r),o=n(132),a=n.n(o),s=n(120),l=n.n(s),c=n(172),u=n(244),d=n(243);const h=["members","faceSize","overflow","tooltip","children"];t.a=e=>{let{members:t,faceSize:n,overflow:r,tooltip:o,children:s}=e,p=a()(e,h);const m=t.map(o?e=>l.a.createElement(c.b,{key:e.userId,member:e,width:n,height:n,hideTitle:!0}):e=>l.a.createElement(u.a,{key:e.userId,label:e.name},l.a.createElement(c.b,{member:e,width:n,height:n,viewUserOnClick:!p.onClick,hideTitle:!0}))),g=l.a.createElement(l.a.Fragment,null,r?l.a.createElement("span",{className:"mx_FacePile_more"}):null,m);return l.a.createElement("div",i()({},p,{className:"mx_FacePile"}),o?l.a.createElement(d.a,{class:"mx_FacePile_faces",tooltip:o},g):l.a.createElement("div",{className:"mx_FacePile_faces"},g),s)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(120),i=n.n(r),o=n(165);const a=Object(r.memo)((e=>{let{delta:t}=e;return t<=0?null:i.a.createElement("div",{className:"mx_CallDuration"},Object(o.j)(t))})),s=e=>{let{groupCall:t}=e;const[n,o]=Object(r.useState)((()=>Date.now()));return Object(r.useEffect)((()=>{const e=window.setInterval((()=>o(Date.now())),1e3);return()=>clearInterval(e)}),[]),null===t.creationTs?null:i.a.createElement(a,{delta:n-t.creationTs})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(13),i=n.n(r),o=n(120),a=n(123),s=n(121);const l=["1","2","3","4","5","6","7","8","9","*","0","#"],c=["","ABC","DEF","GHI","JKL","MNO","PQRS","TUV","WXYZ","","+",""];var u;!function(e){e[e.Digit=0]="Digit",e[e.Dial=1]="Dial"}(u||(u={}));class d extends o.PureComponent{constructor(){super(...arguments),i()(this,"onClick",(e=>{this.props.onButtonPress(this.props.digit,e)}))}render(){switch(this.props.kind){case u.Digit:return o.createElement(a.a,{className:"mx_DialPad_button",onClick:this.onClick},this.props.digit,o.createElement("div",{className:"mx_DialPad_buttonSubText"},this.props.digitSubtext));case u.Dial:return o.createElement(a.a,{className:"mx_DialPad_button mx_DialPad_dialButton",onClick:this.onClick,"aria-label":Object(s.a)("Dial")})}}}class h extends o.PureComponent{render(){const e=[];for(let t=0;t<l.length;t++){const n=l[t],r=c[t];e.push(o.createElement(d,{key:n,kind:u.Digit,digit:n,digitSubtext:r,onButtonPress:this.props.onDigitPress}))}return this.props.hasDial&&e.push(o.createElement(d,{key:"dial",kind:u.Dial,onButtonPress:this.props.onDialPress})),o.createElement("div",{className:"mx_DialPad"},e)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(525),l=n(121),c=n(139),u=n(142),d=n(152),h=n(185);const p="SELECT_VALUE_CUSTOM";class m extends a.a.Component{constructor(e){super(e),i()(this,"onSelectChange",(e=>{if(e.target.value===p)this.setState({custom:!0});else{const t=parseInt(e.target.value);this.props.onChange(t,this.props.powerLevelKey),this.setState({selectValue:t})}})),i()(this,"onCustomChange",(e=>{this.setState({customValue:parseInt(e.target.value)})})),i()(this,"onCustomBlur",(e=>{e.preventDefault(),e.stopPropagation(),Number.isFinite(this.state.customValue)?this.props.onChange(this.state.customValue,this.props.powerLevelKey):this.initStateFromProps()})),i()(this,"onCustomKeyDown",(e=>{if(Object(d.a)().getAccessibilityAction(e)===u.h.Enter)e.preventDefault(),e.stopPropagation(),e.target.blur()})),this.state={levelRoleMap:{},options:[],customValue:this.props.value,selectValue:0}}componentDidMount(){this.initStateFromProps()}componentDidUpdate(e){Object(h.c)(this.props,e)&&this.initStateFromProps()}initStateFromProps(){const e=s.a(this.props.usersDefault),t=Object.keys(e).filter((e=>void 0===e||parseInt(e)<=this.props.maxValue||parseInt(e)==this.props.value)).map((e=>parseInt(e))),n=void 0===e[this.props.value];this.setState({levelRoleMap:e,options:t,custom:n,customValue:this.props.value,selectValue:n?p:this.props.value})}render(){let e;const t=void 0===this.props.label?Object(l.a)("Power level"):this.props.label;if(this.state.custom)e=a.a.createElement(c.a,{type:"number",label:t,max:this.props.maxValue,onBlur:this.onCustomBlur,onKeyDown:this.onCustomKeyDown,onChange:this.onCustomChange,value:String(this.state.customValue),disabled:this.props.disabled});else{const n=this.state.options.map((e=>({value:String(e),text:s.b(e,this.props.usersDefault)})));n.push({value:p,text:Object(l.a)("Custom level")});const r=n.map((e=>a.a.createElement("option",{value:e.value,key:e.value,"data-testid":`power-level-option-${e.value}`},e.text)));e=a.a.createElement(c.a,{element:"select",label:t,onChange:this.onSelectChange,value:String(this.state.selectValue),disabled:this.props.disabled,"data-testid":"power-level-select-element"},r)}return a.a.createElement("div",{className:"mx_PowerSelector"},e)}}i()(m,"defaultProps",{maxValue:1/0,usersDefault:0})},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(130),i=n.n(r),o=n(132),a=n.n(o),s=n(120),l=n.n(s),c=n(175);const u=["heading","children"],d=e=>{let{heading:t,children:n}=e,r=a()(e,u);return l.a.createElement("div",i()({},r,{className:"mx_SettingsSubsectionHeading"}),l.a.createElement(c.a,{className:"mx_SettingsSubsectionHeading_heading",size:"h3"},t),n)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return h})),n.d(t,"a",(function(){return p}));var r=n(121),i=n(274),o=n(236),a=n(198),s=n(122),l=n(388);const c=()=>{i.default.setEnabled(!0);const e=s.a.get(),t=Object(l.d)(e.deviceId);e.setAccountData(t,{is_silenced:!1})},u=()=>{i.default.setPromptHidden(!0)},d="desktopnotifications",h=e=>{a.a.sharedInstance().addOrReplaceToast({key:d,title:e?Object(r.a)("Don't miss a reply"):Object(r.a)("Notifications"),props:{description:Object(r.a)("Enable desktop notifications"),acceptLabel:Object(r.a)("Enable"),onAccept:c,rejectLabel:Object(r.a)("Dismiss"),onReject:u},component:o.a,priority:30})},p=()=>{a.a.sharedInstance().dismissToast(d)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(13),i=n.n(r),o=n(124),a=n(329);class s{constructor(e,t){this.window=e,this.document=t,i()(this,"activeNowTimeout",void 0),i()(this,"activeRecentlyTimeout",void 0),i()(this,"attachedActiveNowTimers",[]),i()(this,"attachedActiveRecentlyTimers",[]),i()(this,"lastScreenX",0),i()(this,"lastScreenY",0),i()(this,"onPageVisibilityChanged",(e=>{"hidden"===this.document.visibilityState?(this.activeNowTimeout.abort(),this.activeRecentlyTimeout.abort()):this.onUserActivity(e)})),i()(this,"onWindowBlurred",(()=>{this.activeNowTimeout.abort(),this.activeRecentlyTimeout.abort()})),i()(this,"onUserActivity",(e=>{if(this.document.hasFocus()){if("mousemove"===e.type&&this.isMouseEvent(e)){if(e.screenX===this.lastScreenX&&e.screenY===this.lastScreenY)return;this.lastScreenX=e.screenX,this.lastScreenY=e.screenY}o.a.dispatch({action:"user_activity"}),this.activeNowTimeout.isRunning()?this.activeNowTimeout.restart():(this.activeNowTimeout.start(),o.a.dispatch({action:"user_activity_start"}),s.runTimersUntilTimeout(this.attachedActiveNowTimers,this.activeNowTimeout)),this.activeRecentlyTimeout.isRunning()?this.activeRecentlyTimeout.restart():(this.activeRecentlyTimeout.start(),s.runTimersUntilTimeout(this.attachedActiveRecentlyTimers,this.activeRecentlyTimeout))}})),this.activeNowTimeout=new a.a(700),this.activeRecentlyTimeout=new a.a(12e4)}static sharedInstance(){return void 0===window.mxUserActivity&&(window.mxUserActivity=new s(window,document)),window.mxUserActivity}timeWhileActiveNow(e){this.timeWhile(e,this.attachedActiveNowTimers),this.userActiveNow()&&e.start()}timeWhileActiveRecently(e){this.timeWhile(e,this.attachedActiveRecentlyTimers),this.userActiveRecently()&&e.start()}timeWhile(e,t){-1===t.indexOf(e)&&(t.push(e),e.finished().finally((()=>{const n=t.indexOf(e);-1!==n&&t.splice(n,1)})).catch((e=>{})))}start(){this.document.addEventListener("mousedown",this.onUserActivity),this.document.addEventListener("mousemove",this.onUserActivity),this.document.addEventListener("keydown",this.onUserActivity),this.document.addEventListener("visibilitychange",this.onPageVisibilityChanged),this.window.addEventListener("blur",this.onWindowBlurred),this.window.addEventListener("focus",this.onUserActivity),this.window.addEventListener("wheel",this.onUserActivity,{passive:!0,capture:!0})}stop(){this.document.removeEventListener("mousedown",this.onUserActivity),this.document.removeEventListener("mousemove",this.onUserActivity),this.document.removeEventListener("keydown",this.onUserActivity),this.window.removeEventListener("wheel",this.onUserActivity,{capture:!0}),this.document.removeEventListener("visibilitychange",this.onPageVisibilityChanged),this.window.removeEventListener("blur",this.onWindowBlurred),this.window.removeEventListener("focus",this.onUserActivity)}userActiveNow(){return this.activeNowTimeout.isRunning()}userActiveRecently(){return this.activeRecentlyTimeout.isRunning()}static async runTimersUntilTimeout(e,t){e.forEach((e=>e.start()));try{await t.finished()}catch(e){}e.forEach((e=>e.abort()))}isMouseEvent(e){return e.type.startsWith("mouse")}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(13),i=n.n(r),o=n(209),a=n(310);class s extends o.a{getValueOverride(e,t,n,r){if(!n)return null;if(s.isLogin)return"light";return Object(a.b)()[n]?null:a.a}}i()(s,"isLogin",!1)},,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return O}));var r=n(13),i=n.n(r),o=n(16),a=n(187),s=n(202),l=n(124),c=n(129),u=n(121),d=n(122),h=n(190);function p(e){const t=d.a.get().getUserId();return"m.room.member"===e.getType()?e.getStateKey()===t:e.getSender()===t}function m(e,t){if(t!==h.a.DM)return!0;const n=d.a.get().getRoom(e);return!n||2!==n.currentState.getJoinedMemberCount()}function g(e){return e.sender?e.sender.name:e.getSender()}var f=n(196),_=n(227),b=n(261);var v=n(376),y=n(742),E=n(133);class S{constructor(){i()(this,"context",void 0)}getTextFor(e,t,n){let r=e.getContent();if(e.isRelation("m.replace")&&(r=e.getContent()["m.new_content"]),!r)return null;try{let i=new y.a({type:e.getType(),content:r}).question.text.trim();return i=Object(u.k)(i),n||p(e)||!m(e.getRoomId(),t)?i:Object(u.a)("%(senderName)s: %(message)s",{senderName:g(e),message:i})}catch(e){if(e instanceof v.a)return null;throw e}}}i()(S,"contextType",E.a);var w=n(125),T=n(164);var C=n(153),x=n(192),F=n(599);const D={"m.room.message":{isState:!1,previewer:new class{getTextFor(e,t,n){var r,i,o;let a=e.getContent();if(a[b.a])return null;if(e.isRelation(c.h.Replace)&&(a=e.getContent()["m.new_content"]),null===(r=a)||void 0===r||!r.body)return null;let s=a.body.trim();if(!s)return null;const l=null!==(i=a.msgtype)&&void 0!==i?i:c.e.Text,d="org.matrix.custom.html"===a.format&&a.formatted_body;if(d&&(s=a.formatted_body),null!==(o=e.getWireContent()["m.relates_to"])&&void 0!==o&&o["m.in_reply_to"]&&(s=d?(Object(_.d)(s)||"").trim():(Object(_.e)(s)||"").trim(),!s))return null;if(d){const e=Object(f.e)(s.replace(/<br\/?>/gi,"\n"));s=(new DOMParser).parseFromString(e,"text/html").documentElement.textContent}return s=Object(u.k)(s),l===c.e.Emote?Object(u.a)("* %(senderName)s %(emote)s",{senderName:g(e),emote:s}):n||p(e)||!m(e.getRoomId(),t)?s:Object(u.a)("%(senderName)s: %(message)s",{senderName:g(e),message:s})}}},"m.call.invite":{isState:!1,previewer:new class{getTextFor(e,t){return m(e.getRoomId(),t)?p(e)?Object(u.a)("You started a call"):Object(u.a)("%(senderName)s started a call",{senderName:g(e)}):p(e)?Object(u.a)("Waiting for answer"):Object(u.a)("%(senderName)s is calling",{senderName:g(e)})}}},"m.call.answer":{isState:!1,previewer:new class{getTextFor(e,t){return m(e.getRoomId(),t)?p(e)?Object(u.a)("You joined the call"):Object(u.a)("%(senderName)s joined the call",{senderName:g(e)}):Object(u.a)("Call in progress")}}},"m.call.hangup":{isState:!1,previewer:new class{getTextFor(e,t){return m(e.getRoomId(),t)?p(e)?Object(u.a)("You ended the call"):Object(u.a)("%(senderName)s ended the call",{senderName:g(e)}):Object(u.a)("Call ended")}}},"m.sticker":{isState:!1,previewer:new class{getTextFor(e,t,n){const r=e.getContent().body;return r?n||p(e)||!m(e.getRoomId(),t)?r:Object(u.a)("%(senderName)s: %(stickerName)s",{senderName:g(e),stickerName:r}):null}}},"m.reaction":{isState:!1,previewer:new class{getTextFor(e,t,n){const r=w.b.getValue("feature_roomlist_preview_reactions_dms"),i=w.b.getValue("feature_roomlist_preview_reactions_all"),o=e.getRoomId();if(!o)return null;if(!(i||r&&T.a.shared().getUserIdForRoomId(o)))return null;const a=e.getRelation();if(!a)return null;const s=a.key;return s?n||p(e)||!m(o,t)?s:Object(u.a)("%(senderName)s: %(reaction)s",{senderName:g(e),reaction:s}):null}}},[a.e.name]:{isState:!1,previewer:new S},[a.e.altName]:{isState:!1,previewer:new S},[x.g]:{isState:!0,previewer:new class{getTextFor(e,t,n){var r;return e.isRedacted()||(null===(r=e.getContent())||void 0===r?void 0:r.state)!==b.c.Stopped?null:Object(F.a)(e)}}}},k="im.vector.any";class O extends s.a{constructor(){super(l.a,{}),i()(this,"previews",new Map)}static get instance(){return O.internalInstance}static getPreviewChangedEventName(e){return`room_preview_changed:${null==e?void 0:e.roomId}`}async getPreviewForRoom(e,t){var n;if(!e)return null;this.previews.has(e.roomId)||await this.generatePreview(e,t);const r=this.previews.get(e.roomId);return r?r.has(t)?null!==(n=r.get(t))&&void 0!==n?n:null:r.get(k):null}generatePreviewForEvent(e){var t;const n=D[e.getType()];return null!==(t=null==n?void 0:n.previewer.getTextFor(e,void 0,!0))&&void 0!==t?t:""}async generatePreview(e,t){const n=e.timeline;if(!n)return;let r=this.previews.get(e.roomId);r||(r=new Map,this.previews.set(e.roomId,r)),r.has(k)||r.set(k,null),t&&!r.has(t)&&r.set(t,null);let i=!1;for(let t=n.length-1;t>=0&&t!==n.length-50;t--){const a=n[t];await this.matrixClient.decryptEventIfNeeded(a);const s=D[a.getType()];if(!s)continue;if(s.isState&&Object(o.u)(a.getStateKey()))continue;const l=s.previewer.getTextFor(a);if(!l)continue;i=i||l!==r.get(k),r.set(k,l);const c=Array.from(r.keys()).filter((e=>e!==k));for(const e of c){const t=e===k?void 0:e,n=s.previewer.getTextFor(a,t);n===l?(i=i||l!==r.get(e),r.delete(e)):(i=i||n!==r.get(e),r.set(e,n))}return void(i&&(this.previews.set(e.roomId,r),this.emit(C.b,this),this.emit(O.getPreviewChangedEventName(e),e)))}this.previews.set(e.roomId,new Map),this.emit(C.b,this),this.emit(O.getPreviewChangedEventName(e),e)}async onAction(e){if(this.matrixClient&&("MatrixActions.Room.timeline"===e.action||"MatrixActions.Event.decrypted"===e.action)){const t=e.event,n=e.hasOwnProperty("isLiveEvent")&&!e.isLiveEvent;if(!this.previews.has(t.getRoomId())||n)return;await this.generatePreview(this.matrixClient.getRoom(t.getRoomId()),k)}}}i()(O,"internalInstance",(()=>{const e=new O;return e.start(),e})())},,function(e,t,n){"use strict";var r=n(120),i=n.n(r),o=n(121),a=n(133),s=n(135),l=n(448),c=n(129),u=n(233);var d=e=>{let{onBack:t}=e;const n=Object(r.useContext)(u.a),a=Object(r.useMemo)((()=>{const e={};return n.room.currentState.getStateEvents(c.b.RoomMember).forEach((t=>{var n;if("join"!==t.getContent().membership)return;const r=t.getSender().split(":")[1];e[r]=(null!==(n=e[r])&&void 0!==n?n:0)+1})),e}),[n.room]);return i.a.createElement(u.b,{onBack:t},i.a.createElement("table",null,i.a.createElement("thead",null,i.a.createElement("tr",null,i.a.createElement("th",null,Object(o.a)("Server")),i.a.createElement("th",null,Object(o.a)("Number of users")))),i.a.createElement("tbody",null,Object.entries(a).map((e=>{let[t,n]=e;return i.a.createElement("tr",{key:t},i.a.createElement("td",null,t),i.a.createElement("td",null,n))})))))},h=n(239),p=n(174),m=n(141);const g={[h.g.Unsent]:Object(o.c)("Unsent"),[h.g.Requested]:Object(o.c)("Requested"),[h.g.Ready]:Object(o.c)("Ready"),[h.g.Done]:Object(o.c)("Done"),[h.g.Started]:Object(o.c)("Started"),[h.g.Cancelled]:Object(o.c)("Cancelled")},f=e=>{let{txnId:t,request:n}=e;const[,a]=Object(r.useState)(),[s,l]=Object(r.useState)(n.timeout);return Object(m.c)(n,h.l.Change,a),Object(r.useEffect)((()=>{if(0==n.timeout)return;const e=window.setInterval((()=>{l(n.timeout)}),500);return()=>{clearInterval(e)}}),[n]),i.a.createElement("div",{className:"mx_DevTools_VerificationRequest"},i.a.createElement("dl",null,i.a.createElement("dt",null,Object(o.a)("Transaction")),i.a.createElement("dd",null,t),i.a.createElement("dt",null,Object(o.a)("Phase")),i.a.createElement("dd",null,g[n.phase]?Object(o.a)(g[n.phase]):n.phase),i.a.createElement("dt",null,Object(o.a)("Timeout")),i.a.createElement("dd",null,Math.floor(s/1e3)),i.a.createElement("dt",null,Object(o.a)("Methods")),i.a.createElement("dd",null,n.methods&&n.methods.join(", ")),i.a.createElement("dt",null,Object(o.a)("Requester")),i.a.createElement("dd",null,n.requestingUserId),i.a.createElement("dt",null,Object(o.a)("Observe only")),i.a.createElement("dd",null,JSON.stringify(n.observeOnly))))};var _=e=>{let{onBack:t}=e;const n=Object(r.useContext)(a.a),s=Object(r.useContext)(u.a),l=Object(m.d)(n,p.b.VerificationRequest,(()=>{var e,t;return null!==(e=null===(t=n.crypto.inRoomVerificationRequests.requestsByRoomId)||void 0===t?void 0:t.get(s.room.roomId))&&void 0!==e?e:new Map}));return i.a.createElement(u.b,{onBack:t},Array.from(l.entries()).reverse().map((e=>{let[t,n]=e;return i.a.createElement(f,{txnId:t,request:n,key:t})})),l.size<1&&Object(o.a)("No verification requests found"))},b=n(1),v=n(123),y=n(125),E=n(313),S=n(139);var w=e=>{let{onBack:t}=e;const[n,o]=Object(r.useState)(null),[a,s]=Object(r.useState)(!1);if(n&&a){const e=()=>{s(!1)};return i.a.createElement(x,{setting:n,onBack:e})}if(n){const e=()=>{o(null)},t=async()=>{s(!0)};return i.a.createElement(F,{setting:n,onBack:e,onEdit:t})}{const e=e=>{o(e)},n=e=>{o(e),s(!0)};return i.a.createElement(k,{onBack:t,onView:e,onEdit:n})}};const T=e=>{let{setting:t,roomId:n,level:r}=e;const o=y.b.canSetValue(t,n,r),a=o?"mx_DevTools_SettingsExplorer_mutable":"mx_DevTools_SettingsExplorer_immutable";return i.a.createElement("td",{className:a},i.a.createElement("code",null,o.toString()))};function C(e,t){const n={};for(const r of y.a)try{n[r]=y.b.getValueAt(r,e,t,!0,!0),void 0===n[r]&&(n[r]=null)}catch(e){b.a.warn(e)}return JSON.stringify(n,null,4)}const x=e=>{let{setting:t,onBack:n}=e;const a=Object(r.useContext)(u.a),[s,l]=Object(r.useState)(C(t,null)),[c,d]=Object(r.useState)(C(t,a.room.roomId));return i.a.createElement(u.b,{onBack:n,actionLabel:Object(o.a)("Save setting values"),onAction:async()=>{try{const e=JSON.parse(s),r=JSON.parse(c);for(const n of Object.keys(e)){b.a.log(`[Devtools] Setting value of ${t} at ${n} from user input`);try{const r=e[n];await y.b.setValue(t,null,n,r)}catch(e){b.a.warn(e)}}const i=a.room.roomId;for(const n of Object.keys(e)){b.a.log(`[Devtools] Setting value of ${t} at ${n} in ${i} from user input`);try{const e=r[n];await y.b.setValue(t,i,n,e)}catch(e){b.a.warn(e)}}n()}catch(e){return Object(o.a)("Failed to save settings.")+` (${e.message})`}}},i.a.createElement("h3",null,Object(o.a)("Setting:")," ",i.a.createElement("code",null,t)),i.a.createElement("div",{className:"mx_DevTools_SettingsExplorer_warning"},i.a.createElement("b",null,Object(o.a)("Caution:"))," ",Object(o.a)("This UI does NOT check the types of the values. Use at your own risk.")),i.a.createElement("div",null,Object(o.a)("Setting definition:"),i.a.createElement("pre",null,i.a.createElement("code",null,JSON.stringify(E.c[t],null,4)))),i.a.createElement("div",null,i.a.createElement("table",null,i.a.createElement("thead",null,i.a.createElement("tr",null,i.a.createElement("th",null,Object(o.a)("Level")),i.a.createElement("th",null,Object(o.a)("Settable at global")),i.a.createElement("th",null,Object(o.a)("Settable at room")))),i.a.createElement("tbody",null,y.a.map((e=>i.a.createElement("tr",{key:e},i.a.createElement("td",null,i.a.createElement("code",null,e)),i.a.createElement(T,{setting:t,level:e}),i.a.createElement(T,{setting:t,roomId:a.room.roomId,level:e}))))))),i.a.createElement("div",null,i.a.createElement(S.a,{id:"valExpl",label:Object(o.a)("Values at explicit levels"),type:"text",className:"mx_DevTools_textarea",element:"textarea",autoComplete:"off",value:s,onChange:e=>l(e.target.value)})),i.a.createElement("div",null,i.a.createElement(S.a,{id:"valExpl",label:Object(o.a)("Values at explicit levels in this room"),type:"text",className:"mx_DevTools_textarea",element:"textarea",autoComplete:"off",value:c,onChange:e=>d(e.target.value)})))},F=e=>{let{setting:t,onEdit:n,onBack:a}=e;const s=Object(r.useContext)(u.a);return i.a.createElement(u.b,{onBack:a,actionLabel:Object(o.a)("Edit values"),onAction:n},i.a.createElement("h3",null,Object(o.a)("Setting:")," ",i.a.createElement("code",null,t)),i.a.createElement("div",null,Object(o.a)("Setting definition:"),i.a.createElement("pre",null,i.a.createElement("code",null,JSON.stringify(E.c[t],null,4)))),i.a.createElement("div",null,Object(o.a)("Value:")," ",i.a.createElement("code",null,D(y.b.getValue(t)))),i.a.createElement("div",null,Object(o.a)("Value in this room:")," ",i.a.createElement("code",null,D(y.b.getValue(t,s.room.roomId)))),i.a.createElement("div",null,Object(o.a)("Values at explicit levels:"),i.a.createElement("pre",null,i.a.createElement("code",null,C(t,null)))),i.a.createElement("div",null,Object(o.a)("Values at explicit levels in this room:"),i.a.createElement("pre",null,i.a.createElement("code",null,C(t,s.room.roomId)))))};function D(e){return["boolean","number"].includes(typeof e)?e.toString():JSON.stringify(e)}const k=e=>{let{onBack:t,onView:n,onEdit:a}=e;const s=Object(r.useContext)(u.a),[l,c]=Object(r.useState)(""),d=Object(r.useMemo)((()=>{let e=Object.keys(E.c);if(l){const t=l.toLowerCase();e=e.filter((e=>e.toLowerCase().includes(t)))}return e}),[l]);return i.a.createElement(u.b,{onBack:t,className:"mx_DevTools_SettingsExplorer"},i.a.createElement(S.a,{label:Object(o.a)("Filter results"),autoFocus:!0,size:64,type:"text",autoComplete:"off",value:l,onChange:e=>c(e.target.value),className:"mx_TextInputDialog_input mx_DevTools_RoomStateExplorer_query"}),i.a.createElement("table",null,i.a.createElement("thead",null,i.a.createElement("tr",null,i.a.createElement("th",null,Object(o.a)("Setting ID")),i.a.createElement("th",null,Object(o.a)("Value")),i.a.createElement("th",null,Object(o.a)("Value in this room")))),i.a.createElement("tbody",null,d.map((e=>i.a.createElement("tr",{key:e},i.a.createElement("td",null,i.a.createElement(v.a,{kind:"link_inline",className:"mx_DevTools_SettingsExplorer_setting",onClick:()=>n(e)},i.a.createElement("code",null,e)),i.a.createElement(v.a,{alt:Object(o.a)("Edit setting"),onClick:()=>a(e),className:"mx_DevTools_SettingsExplorer_edit"},"✏")),i.a.createElement("td",null,i.a.createElement("code",null,D(y.b.getValue(e)))),i.a.createElement("td",null,i.a.createElement("code",null,D(y.b.getValue(e,s.room.roomId))))))))))};var O=n(556),I=n(234),A=n(153),R=n(557);var N=e=>{let{onBack:t}=e;const n=Object(r.useContext)(u.a),[a,s]=Object(r.useState)(""),[l,c]=Object(r.useState)(null),d=Object(m.b)(I.a.instance,A.b,(()=>I.a.instance.getApps(n.room.roomId)));if(l&&d.includes(l)){const e=()=>{c(null)},t=Array.from(Array.from(n.room.currentState.events.values()).map((e=>e.values()))).reduce(((e,t)=>(e.push(...t),e)),[]).find((e=>e.getId()===l.eventId));return t?i.a.createElement(O.b,{mxEvent:t,onBack:e}):i.a.createElement(u.b,{onBack:e},Object(o.a)("There was an error finding this widget."))}return i.a.createElement(u.b,{onBack:t},i.a.createElement(R.a,{query:a,onChange:s},d.map((e=>i.a.createElement("button",{className:"mx_DevTools_button",key:e.url+e.eventId,onClick:()=>c(e)},e.url)))))};const M=e=>{let{mxEvent:t,onBack:n}=e;const o=Object(r.useContext)(a.a),s=Object(r.useMemo)((()=>[Object(l.d)(null==t?void 0:t.getType())]),[t]),c=t?Object(l.f)(t.getContent()):void 0;return i.a.createElement(l.a,{fieldDefs:s,defaultContent:c,onSend:async(e,t)=>{let[n]=e;await o.setAccountData(n,t)},onBack:n})},P=e=>{let{mxEvent:t,onBack:n}=e;const o=Object(r.useContext)(u.a),s=Object(r.useContext)(a.a),c=Object(r.useMemo)((()=>[Object(l.d)(null==t?void 0:t.getType())]),[t]),d=t?Object(l.f)(t.getContent()):void 0;return i.a.createElement(l.a,{fieldDefs:c,defaultContent:d,onSend:async(e,t)=>{let[n]=e;await s.setRoomAccountData(o.room.roomId,n,t)},onBack:n})},L=e=>{let{events:t,Editor:n,actionLabel:o,onBack:a,setTool:s}=e;const[c,d]=Object(r.useState)(""),[h,p]=Object(r.useState)(null);if(h){const e=()=>{p(null)};return i.a.createElement(l.b,{mxEvent:h,onBack:e,Editor:n})}return i.a.createElement(u.b,{onBack:a,actionLabel:o,onAction:async()=>{s(o,n)}},i.a.createElement(R.a,{query:c,onChange:d},Array.from(t.entries()).map((e=>{let[t,n]=e;return i.a.createElement("button",{className:"mx_DevTools_button",key:t,onClick:()=>{p(n)}},t)}))))};var B=n(229),U=n(137),j=n(248),G=n(134),z=n(555),H=n(122);const q=Symbol("failed-to-load");var V,$=e=>{let{onBack:t}=e;const n=Object(r.useContext)(a.a),s=Object(j.a)((()=>n.getCapabilities(!0).catch((()=>q))),[n]),l=Object(j.a)((()=>n.getVersions().catch((()=>q))),[n]),c=Object(j.a)((async()=>{let e=n.getHomeserverUrl();try{const t=H.a.getHomeserverName(),n=await fetch(`https://${t}/.well-known/matrix/server`),r=await n.json();r["m.server"]&&(e=`https://${r["m.server"]}`)}catch(e){console.warn(e)}try{return(await fetch(`${e}/_matrix/federation/v1/version`)).json()}catch(e){console.warn(e)}return q}),[n]);let d;return d=s&&l&&c?i.a.createElement(i.a.Fragment,null,i.a.createElement("h4",null,Object(o.a)("Capabilities")),s!==q?i.a.createElement(z.a,{language:"json",children:JSON.stringify(s,null,4)}):i.a.createElement("div",null,Object(o.a)("Failed to load.")),i.a.createElement("h4",null,Object(o.a)("Client Versions")),l!==q?i.a.createElement(z.a,{language:"json",children:JSON.stringify(l,null,4)}):i.a.createElement("div",null,Object(o.a)("Failed to load.")),i.a.createElement("h4",null,Object(o.a)("Server Versions")),c!==q?i.a.createElement(z.a,{language:"json",children:JSON.stringify(c,null,4)}):i.a.createElement("div",null,Object(o.a)("Failed to load."))):i.a.createElement(G.a,null),i.a.createElement(u.b,{onBack:t},d)},K=n(298),W=n(140),Y=n(591),Q=n(264),X=n(197),Z=n(436);!function(e){e[e.Room=0]="Room",e[e.Other=1]="Other"}(V||(V={}));const J={[V.Room]:Object(o.c)("Room"),[V.Other]:Object(o.c)("Other")},ee={[V.Room]:[[Object(o.c)("Send custom timeline event"),l.c],[Object(o.c)("Explore room state"),O.a],[Object(o.c)("Explore room account data"),e=>{let{onBack:t,setTool:n}=e;const a=Object(r.useContext)(u.a);return i.a.createElement(L,{events:a.room.accountData,Editor:P,actionLabel:Object(o.a)("Send custom room account data event"),onBack:t,setTool:n})}],[Object(o.c)("View servers in room"),d],[Object(o.c)("Notifications debug"),function(e){var t,n;let{onBack:s}=e;const{room:l}=Object(r.useContext)(u.a),c=Object(r.useContext)(a.a),{color:d,count:h}=Object(Q.b)(l),[p]=Object(Y.a)(l);return i.a.createElement(u.b,{onBack:s},i.a.createElement("section",null,i.a.createElement("h2",null,Object(o.a)("Room status")),i.a.createElement("ul",null,i.a.createElement("li",null,Object(o.a)("Room unread status: <strong>%(status)s</strong>, count: <strong>%(count)s</strong>",{status:Object(X.b)(d),count:h},{strong:e=>i.a.createElement("strong",null,e)})),i.a.createElement("li",null,Object(o.a)("Notification state is <strong>%(notificationState)s</strong>",{notificationState:p},{strong:e=>i.a.createElement("strong",null,e)})),i.a.createElement("li",null,Object(o.a)(c.isRoomEncrypted(l.roomId)?Object(o.c)("Room is <strong>encrypted ✅</strong>"):Object(o.c)("Room is <strong>not encrypted 🚨</strong>"),{},{strong:e=>i.a.createElement("strong",null,e)})))),i.a.createElement("section",null,i.a.createElement("h2",null,Object(o.a)("Main timeline")),i.a.createElement("ul",null,i.a.createElement("li",null,Object(o.a)("Total: ")," ",l.getRoomUnreadNotificationCount(W.b.Total)),i.a.createElement("li",null,Object(o.a)("Highlight: ")," ",l.getRoomUnreadNotificationCount(W.b.Highlight)),i.a.createElement("li",null,Object(o.a)("Dot: ")," ",Object(Z.b)(l)+""),function(e){const t=e.getRoomUnreadNotificationCount(W.b.Total),n=e.getRoomUnreadNotificationCount(W.b.Highlight),r=Object(Z.b)(e);return t>0||n>0||r}(l)&&i.a.createElement(i.a.Fragment,null,i.a.createElement("li",null,Object(o.a)("User read up to: "),i.a.createElement("strong",null,null!==(t=null===(n=l.getReadReceiptForUserId(c.getSafeUserId()))||void 0===n?void 0:n.eventId)&&void 0!==t?t:Object(o.a)("No receipt found"))),i.a.createElement("li",null,Object(o.a)("Last event:"),i.a.createElement("ul",null,i.a.createElement("li",null,Object(o.a)("ID: ")," ",i.a.createElement("strong",null,l.timeline[l.timeline.length-1].getId())),i.a.createElement("li",null,Object(o.a)("Type: ")," ",i.a.createElement("strong",null,l.timeline[l.timeline.length-1].getType())),i.a.createElement("li",null,Object(o.a)("Sender: ")," ",i.a.createElement("strong",null,l.timeline[l.timeline.length-1].getSender()))))))),i.a.createElement("section",null,i.a.createElement("h2",null,Object(o.a)("Threads timeline")),i.a.createElement("ul",null,l.getThreads().filter((e=>function(e){const t=e.room.getThreadUnreadNotificationCount(e.id,W.b.Total),n=e.room.getThreadUnreadNotificationCount(e.id,W.b.Highlight),r=Object(Z.b)(e);return t>0||n>0||r}(e))).map((e=>{var t,n,r,a,s;return i.a.createElement("li",{key:e.id},Object(o.a)("Thread Id: ")," ",e.id,i.a.createElement("ul",null,i.a.createElement("li",null,Object(o.a)("Total: "),i.a.createElement("strong",null,l.getThreadUnreadNotificationCount(e.id,W.b.Total))),i.a.createElement("li",null,Object(o.a)("Highlight: "),i.a.createElement("strong",null,l.getThreadUnreadNotificationCount(e.id,W.b.Highlight))),i.a.createElement("li",null,Object(o.a)("Dot: ")," ",i.a.createElement("strong",null,Object(Z.b)(e)+"")),i.a.createElement("li",null,Object(o.a)("User read up to: "),i.a.createElement("strong",null,null!==(t=null===(n=e.getReadReceiptForUserId(c.getSafeUserId()))||void 0===n?void 0:n.eventId)&&void 0!==t?t:Object(o.a)("No receipt found"))),i.a.createElement("li",null,Object(o.a)("Last event:"),i.a.createElement("ul",null,i.a.createElement("li",null,Object(o.a)("ID: ")," ",i.a.createElement("strong",null,null===(r=e.lastReply())||void 0===r?void 0:r.getId())),i.a.createElement("li",null,Object(o.a)("Type: ")," ",i.a.createElement("strong",null,null===(a=e.lastReply())||void 0===a?void 0:a.getType())),i.a.createElement("li",null,Object(o.a)("Sender: ")," ",i.a.createElement("strong",null,null===(s=e.lastReply())||void 0===s?void 0:s.getSender()))))))})))))}],[Object(o.c)("Verification explorer"),_],[Object(o.c)("Active Widgets"),N]],[V.Other]:[[Object(o.c)("Explore account data"),e=>{let{onBack:t,setTool:n}=e;const s=Object(r.useContext)(a.a);return i.a.createElement(L,{events:s.store.accountData,Editor:M,actionLabel:Object(o.a)("Send custom account data event"),onBack:t,setTool:n})}],[Object(o.c)("Settings explorer"),w],[Object(o.c)("Server info"),$]]};t.a=e=>{let{roomId:t,onFinished:n}=e;const[l,c]=Object(r.useState)(null);let d,h;if(l){h=()=>{c(null)};const e=l[1];d=i.a.createElement(e,{onBack:h,setTool:(e,t)=>c([e,t])})}else{const e=()=>{n(!1)};d=i.a.createElement(u.b,{onBack:e},Object.entries(ee).map((e=>{let[t,n]=e;return i.a.createElement("div",{key:t},i.a.createElement("h3",null,Object(o.a)(J[t])),n.map((e=>{let[t,n]=e;return i.a.createElement("button",{className:"mx_DevTools_button",key:t,onClick:()=>{c([t,n])}},Object(o.a)(t))})))})),i.a.createElement("div",null,i.a.createElement("h3",null,Object(o.a)("Options")),i.a.createElement(B.a,{name:"developerMode",level:U.a.ACCOUNT}),i.a.createElement(B.a,{name:"showHiddenEventsInTimeline",level:U.a.DEVICE}),i.a.createElement(B.a,{name:"enableWidgetScreenshots",level:U.a.ACCOUNT}),i.a.createElement(B.a,{name:E.a.VoiceBroadcastForceSmallChunks,level:U.a.DEVICE})))}const p=l?l[0]:Object(o.a)("Toolbox");return i.a.createElement(s.a,{className:"mx_QuestionDialog",onFinished:n,title:Object(o.a)("Developer Tools")},i.a.createElement(a.a.Consumer,null,(e=>i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:"mx_DevTools_label_left"},p),i.a.createElement(K.a,{className:"mx_DevTools_label_right",getTextToCopy:()=>t,border:!1},Object(o.a)("Room ID: %(roomId)s",{roomId:t})),i.a.createElement("div",{className:"mx_DevTools_label_bottom"}),e.getRoom(t)&&i.a.createElement(u.a.Provider,{value:{room:e.getRoom(t)}},d)))))}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return J}));var r=n(130),i=n.n(r),o=n(132),a=n.n(o),s=n(13),l=n.n(s),c=n(120),u=n.n(c),d=n(143),h=n(129),p=n(184),m=n(187),g=n(170),f=n(122),_=n(124),b=n(121),v=n(127),y=n(446),E=n(125),S=n(196),w=n(180),T=n(176),C=n(745),x=n(128),F=n(228),D=n(150),k=n(553),O=n(554),I=n(377),A=n(561),R=n(138),N=n(55),M=n(447),P=n(376),L=n(743);function B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class j extends M.a{constructor(e){super(e),l()(this,"pollEventId",void 0),l()(this,"closingMessage",void 0);const t=this.wireContent["m.relates_to"];if(!N.d.matches(null==t?void 0:t.rel_type)||"string"!=typeof(null==t?void 0:t.event_id))throw new P.a("Relationship must be a reference to an event");this.pollEventId=t.event_id,this.closingMessage=new L.a(this.wireFormat)}isEquivalentTo(e){return Object(N.e)(e,m.a)}serialize(){return{type:m.a.name,content:U({"m.relates_to":{rel_type:N.d.name,event_id:this.pollEventId},[m.a.name]:{}},this.closingMessage.serialize().content)}}static from(e,t){return new j({type:m.a.name,content:{"m.relates_to":{rel_type:N.d.name,event_id:e},[m.a.name]:{},[N.c.name]:t}})}}var G=n(155),z=n(314),H=n(144);class q extends u.a.Component{constructor(){super(...arguments),l()(this,"onFinished",(async e=>{if(e){const e=this.props.matrixClient.getRoom(this.props.event.getRoomId()),t=null==e?void 0:e.polls.get(this.props.event.getId());if(!t)throw new Error("No poll instance found in room.");try{const e=await t.getResponses(),n=Object(z.e)(this.props.event,e),r=""===n?Object(b.a)("The poll has ended. No votes were cast."):Object(b.a)("The poll has ended. Top answer: %(topAnswer)s",{topAnswer:n}),i=j.from(this.props.event.getId(),r).serialize();await this.props.matrixClient.sendEvent(this.props.event.getRoomId(),i.type,i.content)}catch(e){console.error("Failed to submit poll response event:",e),v.b.createDialog(H.a,{title:Object(b.a)("Failed to end poll"),description:Object(b.a)("Sorry, the poll did not end. Please try again.")})}}this.props.onFinished(e)}))}render(){return u.a.createElement(G.a,{title:Object(b.a)("End Poll"),description:Object(b.a)("Are you sure you want to end this poll? This will show the final results of the poll and stop people from being able to vote."),button:Object(b.a)("End Poll"),onFinished:e=>this.onFinished(e)})}}var V=n(230),$=n(204),K=n(136);const W=(e,t)=>{var n;const r=t.getRoom(e.getRoomId()),i=null==r||null===(n=r.currentState.beacons)||void 0===n?void 0:n.get(Object(K.getBeaconInfoIdentifier)(e)),o=null==i?void 0:i.latestLocationEvent;return null!=i&&i.isLive&&o?o:null};var Y=n(261);var Q=n(375);const X=["mxEvent","rightClick","link","eventTileOps","reactions","collapseReplyChain"],Z=e=>{var t;let{mxEvent:n,closeMenu:r}=e;const i=Object(c.useContext)(Q.a),o=null==n||null===(t=n.getRelation())||void 0===t?void 0:t.rel_type;if(Boolean(o)&&o!==h.h.Thread)return null;return u.a.createElement(T.b,{iconClassName:"mx_MessageContextMenu_iconReplyInThread",label:Object(b.a)("Reply in thread"),onClick:()=>{n.getThread()&&!n.isThreadRoot?_.a.dispatch({action:x.a.ShowThread,rootEvent:n.getThread().rootEvent,initialEvent:n,scroll_into_view:!0,highlighted:!0,push:i.isCard}):_.a.dispatch({action:x.a.ShowThread,rootEvent:n,push:i.isCard}),r()}})};class J extends u.a.Component{constructor(e){super(e),l()(this,"context",void 0),l()(this,"reactButtonRef",Object(c.createRef)()),l()(this,"checkPermissions",(()=>{const e=f.a.get(),t=e.getRoom(this.props.mxEvent.getRoomId()),n=t.currentState.maySendRedactionForEvent(this.props.mxEvent,e.credentials.userId)&&this.props.mxEvent.getType()!==h.b.RoomServerAcl&&this.props.mxEvent.getType()!==h.b.RoomEncryption;let r=t.currentState.mayClientSendStateEvent(h.b.RoomPinnedEvents,e)&&Object(w.d)(this.props.mxEvent);E.b.getValue("feature_pinning")||(r=!1),this.setState({canRedact:n,canPin:r})})),l()(this,"onResendReactionsClick",(()=>{for(const e of this.getUnsentReactions())y.a.resend(e);this.closeMenu()})),l()(this,"onJumpToRelatedEventClick",(e=>{_.a.dispatch({action:"view_room",room_id:this.props.mxEvent.getRoomId(),event_id:e,highlighted:!0})})),l()(this,"onReportEventClick",(()=>{_.a.dispatch({action:x.a.OpenReportEventDialog,event:this.props.mxEvent}),this.closeMenu()})),l()(this,"onViewSourceClick",(()=>{v.b.createDialog(O.a,{mxEvent:this.props.mxEvent},"mx_Dialog_viewsource"),this.closeMenu()})),l()(this,"onRedactClick",(()=>{const{mxEvent:e,onCloseDialog:t}=this.props;Object(I.a)({mxEvent:e,onCloseDialog:t}),this.closeMenu()})),l()(this,"onForwardClick",(e=>()=>{_.a.dispatch({action:x.a.OpenForwardDialog,event:e,permalinkCreator:this.props.permalinkCreator}),this.closeMenu()})),l()(this,"onPinClick",(()=>{var e,t;const n=f.a.get(),r=n.getRoom(this.props.mxEvent.getRoomId()),i=this.props.mxEvent.getId(),o=(null==r||null===(e=r.currentState)||void 0===e||null===(t=e.getStateEvents(h.b.RoomPinnedEvents,""))||void 0===t?void 0:t.getContent().pinned)||[];var a,s;o.includes(i)?o.splice(o.indexOf(i),1):(o.push(i),n.setRoomAccountData(r.roomId,C.a,{event_ids:[...(null===(a=r.getAccountData(C.a))||void 0===a||null===(s=a.getContent())||void 0===s?void 0:s.event_ids)||[],i]}));n.sendStateEvent(this.props.mxEvent.getRoomId(),h.b.RoomPinnedEvents,{pinned:o},""),this.closeMenu()})),l()(this,"closeMenu",(()=>{this.props.onFinished()})),l()(this,"onUnhidePreviewClick",(()=>{var e;null===(e=this.props.eventTileOps)||void 0===e||e.unhideWidget(),this.closeMenu()})),l()(this,"onQuoteClick",(()=>{_.a.dispatch({action:x.a.ComposerInsert,event:this.props.mxEvent,timelineRenderingType:this.context.timelineRenderingType}),this.closeMenu()})),l()(this,"onShareClick",(e=>{e.preventDefault(),v.b.createDialog(A.a,{target:this.props.mxEvent,permalinkCreator:this.props.permalinkCreator}),this.closeMenu()})),l()(this,"onCopyLinkClick",(e=>{e.preventDefault(),Object(F.b)(this.props.link),this.closeMenu()})),l()(this,"onCollapseReplyChainClick",(()=>{this.props.collapseReplyChain(),this.closeMenu()})),l()(this,"onCopyClick",(()=>{Object(F.b)(Object(F.c)()),this.closeMenu()})),l()(this,"onEditClick",(()=>{Object(w.e)(this.props.mxEvent,this.context.timelineRenderingType,this.props.getRelationsForEvent),this.closeMenu()})),l()(this,"onReplyClick",(()=>{_.a.dispatch({action:"reply_to_event",event:this.props.mxEvent,context:this.context.timelineRenderingType}),this.closeMenu()})),l()(this,"onReactClick",(()=>{this.setState({reactionPickerDisplayed:!0})})),l()(this,"onCloseReactionPicker",(()=>{this.setState({reactionPickerDisplayed:!1}),this.closeMenu()})),l()(this,"onEndPollClick",(()=>{const e=f.a.get();v.b.createDialog(q,{matrixClient:e,event:this.props.mxEvent,getRelationsForEvent:this.props.getRelationsForEvent},"mx_Dialog_endPoll"),this.closeMenu()})),l()(this,"viewInRoom",(()=>{_.a.dispatch({action:x.a.ViewRoom,event_id:this.props.mxEvent.getId(),highlighted:!0,room_id:this.props.mxEvent.getRoomId(),metricsTrigger:void 0}),this.closeMenu()})),this.state={canRedact:!1,canPin:!1,reactionPickerDisplayed:!1}}componentDidMount(){f.a.get().on(p.b.PowerLevel,this.checkPermissions),this.checkPermissions()}componentWillUnmount(){const e=f.a.get();e&&e.removeListener(p.b.PowerLevel,this.checkPermissions)}isPinned(){const e=f.a.get().getRoom(this.props.mxEvent.getRoomId()).currentState.getStateEvents(h.b.RoomPinnedEvents,"");if(!e)return!1;const t=e.getContent();return t.pinned&&Array.isArray(t.pinned)&&t.pinned.includes(this.props.mxEvent.getId())}canEndPoll(e){return m.e.matches(e.getType())&&this.state.canRedact&&!Object(z.f)(e,f.a.get())}getReactions(e){const t=f.a.get().getRoom(this.props.mxEvent.getRoomId()),n=this.props.mxEvent.getId();return t.getPendingEvents().filter((t=>{const r=t.getRelation();return(null==r?void 0:r.rel_type)===h.h.Annotation&&r.event_id===n&&e(t)}))}getUnsentReactions(){return this.getReactions((e=>e.status===d.a.NOT_SENT))}render(){var e,t,n,r;const o=f.a.get(),s=o.getUserId(),l=this.props,{mxEvent:c,rightClick:h,link:p,eventTileOps:_,reactions:v,collapseReplyChain:y}=l,C=a()(l,X);delete C.getRelationsForEvent,delete C.permalinkCreator;const x=c.status,O=this.getUnsentReactions().length,I=Object(w.k)(c),A=null===(e=this.props.permalinkCreator)||void 0===e?void 0:e.forEvent(this.props.mxEvent.getId()),N=!x||x===d.a.SENT,{timelineRenderingType:M,canReact:P,canSendMessages:L}=this.context,B=(M===R.a.Thread||M===R.a.ThreadsList)&&(null==c||null===(t=c.getThread())||void 0===t?void 0:t.rootEvent)===c;let U,j,G;c.isRedacted()||0===O||(U=u.a.createElement(T.b,{iconClassName:"mx_MessageContextMenu_iconResend",label:Object(b.a)("Resend %(unsentCount)s reaction(s)",{unsentCount:O}),onClick:this.onResendReactionsClick})),N&&this.state.canRedact&&(j=u.a.createElement(T.b,{iconClassName:"mx_MessageContextMenu_iconRedact",label:Object(b.a)("Remove"),onClick:this.onRedactClick}));const z=((e,t)=>Object(w.l)(e)?e:$.b.matches(e.getType())?W(e,t):null)(c,o);if(z){const e=Object(V.b)(z);G=u.a.createElement(T.b,{iconClassName:"mx_MessageContextMenu_iconOpenInMapSite",onClick:null,label:Object(b.a)("Open in OpenStreetMap"),element:"a",href:e,target:"_blank",rel:"noreferrer noopener"})}let H;const q=((e,t)=>m.e.matches(e.getType())||m.a.matches(e.getType())||e.getType()===Y.b?null:$.b.matches(e.getType())?W(e,t):e)(c,o);let K;I&&q&&(H=u.a.createElement(T.b,{iconClassName:"mx_MessageContextMenu_iconForward",label:Object(b.a)("Forward"),onClick:this.onForwardClick(q)})),I&&this.state.canPin&&(K=u.a.createElement(T.b,{iconClassName:"mx_MessageContextMenu_iconPin",label:this.isPinned()?Object(b.a)("Unpin"):Object(b.a)("Pin"),onClick:this.onPinClick}));const Q=u.a.createElement(T.b,{iconClassName:"mx_MessageContextMenu_iconSource",label:Object(b.a)("View source"),onClick:this.onViewSourceClick});let J,ee,te,ne,re,ie,oe;null!=_&&_.isWidgetHidden()&&(J=u.a.createElement(T.b,{iconClassName:"mx_MessageContextMenu_iconUnhidePreview",label:Object(b.a)("Show preview"),onClick:this.onUnhidePreviewClick})),A&&(ee=u.a.createElement(T.b,{iconClassName:"mx_MessageContextMenu_iconPermalink",onClick:this.onShareClick,label:Object(b.a)("Share"),element:"a",href:A,target:"_blank",rel:"noreferrer noopener"})),this.canEndPoll(c)&&(te=u.a.createElement(T.b,{iconClassName:"mx_MessageContextMenu_iconEndPoll",label:Object(b.a)("End Poll"),onClick:this.onEndPollClick})),_&&L&&(ne=u.a.createElement(T.b,{iconClassName:"mx_MessageContextMenu_iconQuote",label:Object(b.a)("Quote"),onClick:this.onQuoteClick})),"string"==typeof c.getContent().external_url&&Object(S.f)(c.getContent().external_url)&&(re=u.a.createElement(T.b,{iconClassName:"mx_MessageContextMenu_iconLink",onClick:this.closeMenu,label:Object(b.a)("Source URL"),element:"a",target:"_blank",rel:"noreferrer noopener",href:c.getContent().external_url})),y&&(ie=u.a.createElement(T.b,{iconClassName:"mx_MessageContextMenu_iconCollapse",label:Object(b.a)("Collapse reply thread"),onClick:this.onCollapseReplyChainClick}));const ae=null===(n=c.getWireContent())||void 0===n||null===(r=n["m.relates_to"])||void 0===r?void 0:r.event_id;let se,le,ce,ue,de,he,pe,me,ge,fe;ae&&E.b.getValue("developerMode")&&(oe=u.a.createElement(T.b,{iconClassName:"mx_MessageContextMenu_jumpToEvent",label:Object(b.a)("View related event"),onClick:()=>this.onJumpToRelatedEventClick(ae)})),c.getSender()!==s&&(se=u.a.createElement(T.b,{iconClassName:"mx_MessageContextMenu_iconReport",label:Object(b.a)("Report"),onClick:this.onReportEventClick})),p&&(le=u.a.createElement(T.b,{iconClassName:"mx_MessageContextMenu_iconCopy",onClick:this.onCopyLinkClick,label:Object(b.a)("Copy link"),element:"a",href:p,target:"_blank",rel:"noreferrer noopener"})),h&&Object(F.c)()&&(ce=u.a.createElement(T.b,{iconClassName:"mx_MessageContextMenu_iconCopy",label:Object(b.a)("Copy"),triggerOnMouseDown:!0,onClick:this.onCopyClick})),h&&Object(w.c)(c)&&(ue=u.a.createElement(T.b,{iconClassName:"mx_MessageContextMenu_iconEdit",label:Object(b.a)("Edit"),onClick:this.onEditClick})),h&&I&&L&&(de=u.a.createElement(T.b,{iconClassName:"mx_MessageContextMenu_iconReply",label:Object(b.a)("Reply"),onClick:this.onReplyClick})),h&&I&&L&&g.e.hasServerSideSupport&&M!==R.a.Thread&&(he=u.a.createElement(Z,{mxEvent:c,closeMenu:this.closeMenu})),h&&I&&P&&(pe=u.a.createElement(T.b,{iconClassName:"mx_MessageContextMenu_iconReact",label:Object(b.a)("React"),onClick:this.onReactClick,inputRef:this.reactButtonRef})),B&&(me=u.a.createElement(T.b,{iconClassName:"mx_MessageContextMenu_iconViewInRoom",label:Object(b.a)("View in room"),onClick:this.viewInRoom})),(ce||le)&&(ge=u.a.createElement(T.c,null,ce,le)),(ue||de||pe)&&(fe=u.a.createElement(T.c,null,pe,de,he,ue));const _e=u.a.createElement(T.c,null,me,G,te,ne,H,K,ee,se,re,oe,J,Q,U,ie);let be,ve;if(j&&(be=u.a.createElement(T.c,{red:!0},j)),this.state.reactionPickerDisplayed){var ye;const e=null===(ye=this.reactButtonRef.current)||void 0===ye?void 0:ye.getBoundingClientRect();ve=u.a.createElement(D.n,i()({},Object(D.p)(e),{onFinished:this.closeMenu,managed:!1}),u.a.createElement(k.a,{mxEvent:c,onFinished:this.onCloseReactionPicker,reactions:v}))}return u.a.createElement(u.a.Fragment,null,u.a.createElement(T.e,i()({},C,{className:"mx_MessageContextMenu",compact:!0,"data-testid":"mx_MessageContextMenu"}),ge,fe,_e,be),ve)}}l()(J,"contextType",R.b)},,,function(e,t,n){"use strict";n.d(t,"b",(function(){return b})),n.d(t,"a",(function(){return v}));var r=n(120),i=n.n(r),o=n(121),a=n(131),s=n(236),l=n(198),c=n(155),u=n(134);const d=["vector-im/element-web","matrix-org/matrix-react-sdk","matrix-org/matrix-js-sdk"];class h extends i.a.Component{constructor(e){super(e),this.state={}}async fetchChanges(e,t,n){const r=`https://riot.im/github/repos/${e}/compare/${t}...${n}`;try{const t=await fetch(r);if(!t.ok)return void this.setState({[e]:t.statusText});const n=await t.json();this.setState({[e]:n.commits})}catch(t){this.setState({[e]:t.message})}}componentDidMount(){const e=this.props.newVersion.split("-"),t=this.props.version.split("-");if(null!=e&&null!=t)for(let n=0;n<d.length;n++){const r=t[2*n],i=e[2*n];this.fetchChanges(d[n],r,i)}}elementsForCommit(e){return i.a.createElement("li",{key:e.sha,className:"mx_ChangelogDialog_li"},i.a.createElement("a",{href:e.html_url,target:"_blank",rel:"noreferrer noopener"},e.commit.message.split("\n")[0]))}render(){const e=d.map((e=>{let t;return t=null==this.state[e]?i.a.createElement(u.a,{key:e}):"string"==typeof this.state[e]?Object(o.a)("Unable to load commit detail: %(msg)s",{msg:this.state[e]}):this.state[e].map(this.elementsForCommit),i.a.createElement("div",{key:e},i.a.createElement("h2",null,e),i.a.createElement("ul",null,t))})),t=i.a.createElement("div",{className:"mx_ChangelogDialog_content"},null==this.props.version||null==this.props.newVersion?i.a.createElement("h2",null,Object(o.a)("Unavailable")):e);return i.a.createElement(c.a,{title:Object(o.a)("Changelog"),description:t,button:Object(o.a)("Update"),onFinished:this.props.onFinished})}}var p=n(157),m=n(127);const g="update";function f(e){const t=e.split("-");return 5===t.length&&"react"===t[1]&&"js"===t[3]}function _(){var e;null===(e=p.a.get())||void 0===e||e.installUpdate()}const b=(e,t,n)=>{let r,u=Object(o.a)("What's new?");n?r=()=>{m.b.createDialog(c.a,{title:Object(o.a)("What's New"),description:i.a.createElement("pre",null,n),button:Object(o.a)("Update"),onFinished:e=>{e&&p.a.get()&&p.a.get().installUpdate()}})}:f(e)&&f(t)?r=()=>{m.b.createDialog(h,{version:e,newVersion:t,onFinished:e=>{e&&p.a.get()&&p.a.get().installUpdate()}})}:(r=_,u=Object(o.a)("Update"));const d=a.b.get().brand;l.a.sharedInstance().addOrReplaceToast({key:g,title:Object(o.a)("Update %(brand)s",{brand:d}),props:{description:Object(o.a)("New version of %(brand)s is available",{brand:d}),acceptLabel:u,onAccept:r,rejectLabel:Object(o.a)("Dismiss"),onReject:function(){var e;null===(e=p.a.get())||void 0===e||e.deferUpdate(t)}},component:s.a,priority:20})},v=()=>{l.a.sharedInstance().dismissToast(g)}},function(e,t,n){"use strict";n.d(t,"c",(function(){return l.d})),n.d(t,"a",(function(){return l.a})),n.d(t,"b",(function(){return l.c}));var r=n(13),i=n.n(r),o=n(1),a=n(199),s=n(358),l=n(417);const c=s.a.DeviceVerification;class u extends l.e{constructor(){super(...arguments),i()(this,"sessionPrepared",!1),i()(this,"prepPromise",null)}ensureSession(e){return this.prepPromise?this.prepPromise:this.sessionPrepared?Promise.resolve():(this.prepPromise=this.crypto.downloadKeys(e).then((()=>this.crypto.ensureOlmSessionsForUsers(e))).then((()=>{this.sessionPrepared=!0})).finally((()=>{this.prepPromise=null})),this.prepPromise)}async encryptMessage(e,t,n){const r=(await e.getEncryptionTargetMembers()).map((function(e){return e.userId}));await this.ensureSession(r);const i={room_id:e.roomId,type:t,content:n},o={algorithm:a.OLM_ALGORITHM,sender_key:this.olmDevice.deviceCurve25519Key,ciphertext:{}},s=[];for(const e of r){const t=this.crypto.getStoredDevicesForUser(e)||[];for(const n of t){n.getIdentityKey()!=this.olmDevice.deviceCurve25519Key&&(n.verified!=c.BLOCKED&&s.push(a.encryptMessageForDevice(o.ciphertext,this.userId,this.deviceId,this.olmDevice,e,n,i)))}}return Promise.all(s).then((()=>o))}}class d extends l.b{async decryptEvent(e){const t=e.getWireContent(),n=t.sender_key,r=t.ciphertext;if(!r)throw new l.c("OLM_MISSING_CIPHERTEXT","Missing ciphertext");if(!(this.olmDevice.deviceCurve25519Key in r))throw new l.c("OLM_NOT_INCLUDED_IN_RECIPIENTS","Not included in recipients");const i=r[this.olmDevice.deviceCurve25519Key];let o;try{o=await this.decryptMessage(n,i)}catch(e){throw new l.c("OLM_BAD_ENCRYPTED_MESSAGE","Bad Encrypted Message",{sender:n,err:e})}const s=JSON.parse(o);if(s.recipient!=this.userId)throw new l.c("OLM_BAD_RECIPIENT","Message was intented for "+s.recipient);if(s.recipient_keys.ed25519!=this.olmDevice.deviceEd25519Key)throw new l.c("OLM_BAD_RECIPIENT_KEY","Message not intended for this device",{intended:s.recipient_keys.ed25519,our_key:this.olmDevice.deviceEd25519Key});await this.crypto.deviceList.downloadKeys([e.getSender()],!1);const c=this.crypto.deviceList.getUserByIdentityKey(a.OLM_ALGORITHM,n);if(c!==e.getSender()&&null!=c)throw new l.c("OLM_BAD_SENDER","Message claimed to be from "+e.getSender(),{real_sender:c});if(s.sender!=e.getSender())throw new l.c("OLM_FORWARDED_MESSAGE","Message forwarded from "+s.sender,{reported_sender:e.getSender()});if(s.room_id!==e.getRoomId())throw new l.c("OLM_BAD_ROOM","Message intended for room "+s.room_id,{reported_room:e.getRoomId()||"ROOM_ID_UNDEFINED"});return{clearEvent:s,senderCurve25519Key:n,claimedEd25519Key:(s.keys||{}).ed25519||null}}decryptMessage(e,t){if(0!==t.type)return this.reallyDecryptMessage(e,t);{const n=this.olmDevice.olmPrekeyPromise.then((()=>this.reallyDecryptMessage(e,t)));return this.olmDevice.olmPrekeyPromise=n.catch((()=>{})),n}}async reallyDecryptMessage(e,t){const n=await this.olmDevice.getSessionIdsForDevice(e),r={};for(const i of n)try{const n=await this.olmDevice.decryptMessage(e,i,t.type,t.body);return o.a.log("Decrypted Olm message from "+e+" with session "+i),n}catch(n){if(await this.olmDevice.matchesSession(e,i,t.type,t.body))throw new Error("Error decrypting prekey message with existing session id "+i+": "+n.message);r[i]=n.message}if(0!==t.type){if(0===n.length)throw new Error("No existing sessions");throw new Error("Error decrypting non-prekey message with existing sessions: "+JSON.stringify(r))}let i;try{i=await this.olmDevice.createInboundSession(e,t.type,t.body)}catch(e){throw r["(new)"]=e.message,new Error("Error decrypting prekey message: "+JSON.stringify(r))}return o.a.log("created new inbound Olm session ID "+i.session_id+" with "+e),i.payload}}Object(l.g)(a.OLM_ALGORITHM,u,d);n(668)},function(e,t,n){"use strict";n.d(t,"a",(function(){return T}));var r=n(13),i=n.n(r),o=n(193),a=n(16),s=n(1),l=n(129),c=n(160),u=n(122),d=n(434),h=n(121),p=n(127),m=n(125),g=n(120),f=n.n(g),_=n(137),b=n(135);function v(e){let{onFinished:t,onGiveUp:n,onInviteAnyways:r,unknownProfileUsers:i}=e;const o=Object(g.useCallback)((()=>{r(),t(!0)}),[r,t]),a=Object(g.useCallback)((()=>{m.b.setValue("promptBeforeInviteUnknownUsers",null,_.a.ACCOUNT,!1),r(),t(!0)}),[r,t]),s=Object(g.useCallback)((()=>{n(),t(!1)}),[n,t]),l=i.map((e=>f.a.createElement("li",{key:e.userId},e.userId,": ",e.errorText)));return f.a.createElement(b.a,{className:"mx_RetryInvitesDialog",onFinished:s,title:Object(h.a)("The following users may not exist"),contentId:"mx_Dialog_content"},f.a.createElement("div",{id:"mx_Dialog_content"},f.a.createElement("p",null,Object(h.a)("Unable to find profiles for the Matrix IDs listed below - would you like to invite them anyway?")),f.a.createElement("ul",null,l)),f.a.createElement("div",{className:"mx_Dialog_buttons"},f.a.createElement("button",{onClick:s},Object(h.a)("Close")),f.a.createElement("button",{onClick:a},Object(h.a)("Invite anyway and never warn me again")),f.a.createElement("button",{onClick:o,autoFocus:!0},Object(h.a)("Invite anyway"))))}let y;!function(e){e.Invited="invited",e.Error="error"}(y||(y={}));const E=["M_NOT_FOUND","M_USER_NOT_FOUND","M_PROFILE_UNDISCLOSED","M_PROFILE_NOT_FOUND"],S="IO.ELEMENT.ALREADY_JOINED",w="IO.ELEMENT.ALREADY_INVITED";class T{constructor(e,t){this.roomId=e,this.progressCallback=t,i()(this,"matrixClient",void 0),i()(this,"canceled",!1),i()(this,"addresses",[]),i()(this,"busy",!1),i()(this,"_fatal",!1),i()(this,"completionStates",{}),i()(this,"errors",{}),i()(this,"deferred",null),i()(this,"reason",void 0),this.matrixClient=u.a.get()}get fatal(){return this._fatal}invite(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.addresses.length>0)throw new Error("Already inviting/invited");this.addresses.push(...e),this.reason=t;for(const e of this.addresses)null===Object(d.b)(e)&&(this.completionStates[e]=y.Error,this.errors[e]={errcode:"M_INVALID",errorText:Object(h.a)("Unrecognised address")});if(this.deferred=Object(a.m)(),this.inviteMore(0),!n||!this.roomId||!this.matrixClient.isRoomEncrypted(this.roomId))return this.deferred.promise;const r=this.matrixClient.getRoom(this.roomId),i=null==r?void 0:r.currentState.getStateEvents(l.b.RoomHistoryVisibility,""),o=null==i?void 0:i.getContent().history_visibility;return o!==c.b.WorldReadable&&o!==c.b.Shared?this.deferred.promise:this.deferred.promise.then((async e=>{const t=[];for(const[n,r]of Object.entries(e))r===y.Invited&&Object(d.b)(n)===d.a.MatrixUserId&&t.push(n);return s.a.log("Sharing history with",t),this.matrixClient.sendSharedHistoryKeys(this.roomId,t),e}))}cancel(){var e;this.busy&&(this.canceled=!0,null===(e=this.deferred)||void 0===e||e.reject(new Error("canceled")))}getCompletionState(e){return this.completionStates[e]}getErrorText(e){return this.errors[e]?this.errors[e].errorText:null}async inviteToRoom(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=Object(d.b)(t);if(r===d.a.Email)return this.matrixClient.inviteByEmail(e,t);if(r===d.a.MatrixUserId){const r=this.matrixClient.getRoom(e);if(!r)throw new Error("Room not found");const i=r.getMember(t);if("join"===(null==i?void 0:i.membership))throw new o.f({errcode:S,error:"Member already joined"});if("invite"===(null==i?void 0:i.membership))throw new o.f({errcode:w,error:"Member already invited"});if(!n&&m.b.getValue("promptBeforeInviteUnknownUsers",this.roomId))try{await this.matrixClient.getProfileInfo(t)}catch(e){switch(e.errcode){case"M_FORBIDDEN":throw new o.f({errcode:"M_PROFILE_UNDISCLOSED"});case"M_NOT_FOUND":throw new o.f({errcode:"M_USER_NOT_FOUND"});default:throw e}}return this.matrixClient.invite(e,t,this.reason)}throw new Error("Unsupported address")}doInvite(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise(((n,r)=>{s.a.log(`Inviting ${e}`);this.inviteToRoom(this.roomId,e,t).then((()=>{var t;this.canceled||(this.completionStates[e]=y.Invited,delete this.errors[e],n(),null===(t=this.progressCallback)||void 0===t||t.call(this))})).catch((i=>{var o;if(this.canceled)return;s.a.error(i);const a=this.roomId&&(null===(o=this.matrixClient.getRoom(this.roomId))||void 0===o?void 0:o.isSpaceRoom());let l,c=!1;switch(i.errcode){case"M_FORBIDDEN":l=a?Object(h.a)("You do not have permission to invite people to this space."):Object(h.a)("You do not have permission to invite people to this room."),c=!0;break;case w:l=a?Object(h.a)("User is already invited to the space"):Object(h.a)("User is already invited to the room");break;case S:l=a?Object(h.a)("User is already in the space"):Object(h.a)("User is already in the room");break;case"M_LIMIT_EXCEEDED":return void window.setTimeout((()=>{this.doInvite(e,t).then(n,r)}),5e3);case"M_NOT_FOUND":case"M_USER_NOT_FOUND":l=Object(h.a)("User does not exist");break;case"M_PROFILE_UNDISCLOSED":l=Object(h.a)("User may or may not exist");break;case"M_PROFILE_NOT_FOUND":if(!t)return s.a.warn(`User ${e} does not have a profile - inviting anyways automatically`),void this.doInvite(e,!0).then(n,r);break;case"M_BAD_STATE":l=Object(h.a)("The user must be unbanned before they can be invited.");break;case"M_UNSUPPORTED_ROOM_VERSION":l=a?Object(h.a)("The user's homeserver does not support the version of the space."):Object(h.a)("The user's homeserver does not support the version of the room.")}l||(l=Object(h.a)("Unknown server error")),this.completionStates[e]=y.Error,this.errors[e]={errorText:l,errcode:i.errcode},this.busy=!c,this._fatal=c,c?r(i):n()}))}))}inviteMore(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.canceled)return;if(e===this.addresses.length){var n;if(this.busy=!1,Object.keys(this.errors).length>0){const e=Object.keys(this.errors).filter((e=>E.includes(this.errors[e].errcode)));if(e.length>0){const t=()=>{const t=e.map((e=>this.doInvite(e,!0)));Promise.all(t).then((()=>{var e;return null===(e=this.deferred)||void 0===e?void 0:e.resolve(this.completionStates)}))};return m.b.getValue("promptBeforeInviteUnknownUsers",this.roomId)?(s.a.log("Showing failed to invite dialog..."),void p.b.createDialog(v,{unknownProfileUsers:e.map((e=>({userId:e,errorText:this.errors[e].errorText}))),onInviteAnyways:()=>t(),onGiveUp:()=>{var t;for(const t of e)this.completionStates[t]=y.Invited;null===(t=this.deferred)||void 0===t||t.resolve(this.completionStates)}})):void t()}}return void(null===(n=this.deferred)||void 0===n||n.resolve(this.completionStates))}const r=this.addresses[e];null!==Object(d.b)(r)&&this.completionStates[r]!==y.Invited?this.doInvite(r,t).then((()=>{this.inviteMore(e+1,t)})).catch((()=>{var e;return null===(e=this.deferred)||void 0===e?void 0:e.resolve(this.completionStates)})):this.inviteMore(e+1)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(13),i=n.n(r),o=n(183);const a={};var s=n(217),l=n(387);class c{constructor(){}static get instance(){return c.internalInstance||(c.internalInstance=new c),c.internalInstance}async onNewInvitedRoom(e){await l.a.sharedInstance().onNewInvitedRoom(e)}isRoomVisible(e){if(!e)return!1;if(o.b.instance.getSupportsVirtualRooms()&&l.a.sharedInstance().isVirtualRoom(e))return!1;if(e.isSpaceRoom())return!1;if(Object(s.a)(e))return!1;const t=a.isRoomVisible;return!t||t(e)}}i()(c,"internalInstance",void 0)},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return P}));var r=n(130),i=n.n(r),o=n(13),a=n.n(o),s=n(120),l=n.n(s),c=n(1401),u=n(126),d=n.n(u),h=n(827),p=n(1),m=n(147),g=n(338),f=n(127),_=n(121),b=n(125),v=n(134),y=n(166),E=n(495),S=n(406),w=n(466),T=n(122),C=n(138),x=n(146);function F(e){return["image/gif","image/webp","image/png","image/apng","image/avif"].includes(e)}function D(e,t,n){return new Uint8Array(e.slice(t,t+n))}function k(e,t){return new DataView(e,t,4).getUint32(0)}function O(e,t,n){return String.fromCharCode.apply(null,Array.from(D(e,t,n)))}var I,A=n(563),R=n(595),N=n(467),M=n(528);!function(e){e[e.NoImage=0]="NoImage",e[e.Blurhash=1]="Blurhash"}(I||(I={}));class P extends l.a.Component{constructor(e){super(e),a()(this,"context",void 0),a()(this,"unmounted",!0),a()(this,"image",Object(s.createRef)()),a()(this,"timeout",void 0),a()(this,"sizeWatcher",void 0),a()(this,"reconnectedListener",void 0),a()(this,"onClick",(e=>{if(0===e.button&&!e.metaKey){var t;if(e.preventDefault(),!this.state.showImage)return void this.showImage();const n=this.props.mxEvent.getContent(),r={src:this.state.contentUrl,name:(null===(t=n.body)||void 0===t?void 0:t.length)>0?n.body:Object(_.a)("Attachment"),mxEvent:this.props.mxEvent,permalinkCreator:this.props.permalinkCreator};if(n.info&&(r.width=n.info.w,r.height=n.info.h,r.fileSize=n.info.size),this.image.current){const e=this.image.current.getBoundingClientRect();r.thumbnailInfo={width:e.width,height:e.height,positionX:e.x,positionY:e.y}}f.b.createDialog(S.a,r,"mx_Dialog_lightbox",null,!0)}})),a()(this,"onImageEnter",(e=>{if(this.setState({hover:!0}),!this.state.showImage||!this.state.isAnimated||b.b.getValue("autoplayGifs"))return;e.currentTarget.src=this.state.contentUrl})),a()(this,"onImageLeave",(e=>{var t;if(this.setState({hover:!1}),!this.state.showImage||!this.state.isAnimated||b.b.getValue("autoplayGifs"))return;e.currentTarget.src=null!==(t=this.state.thumbUrl)&&void 0!==t?t:this.state.contentUrl})),a()(this,"clearError",(()=>{T.a.get().off(m.b.Sync,this.reconnectedListener),this.setState({imgError:!1})})),a()(this,"onImageError",(()=>{this.clearBlurhashTimeout(),this.setState({imgError:!0}),T.a.get().on(m.b.Sync,this.reconnectedListener)})),a()(this,"onImageLoad",(()=>{let e;if(this.clearBlurhashTimeout(),this.props.onHeightChanged(),this.image.current){const{naturalWidth:t,naturalHeight:n}=this.image.current;e={naturalWidth:t,naturalHeight:n}}this.setState({imgLoaded:!0,loadedImageDimensions:e})})),this.reconnectedListener=Object(R.a)(this.clearError),this.state={imgError:!1,imgLoaded:!1,hover:!1,showImage:b.b.getValue("showImages"),placeholder:I.NoImage}}showImage(){localStorage.setItem("mx_ShowImage_"+this.props.mxEvent.getId(),"true"),this.setState({showImage:!0}),this.downloadImage()}getContentUrl(){return this.props.forExport?this.media.srcMxc:this.media.srcHttp}get media(){return Object(y.a)(this.props.mxEvent.getContent())}getThumbUrl(){const e=800,t=600,n=this.props.mxEvent.getContent(),r=Object(y.a)(n),i=n.info;if("image/svg+xml"===(null==i?void 0:i.mimetype)&&r.hasThumbnail)return r.getThumbnailHttp(e,t,"scale");if(this.state.isAnimated||1===window.devicePixelRatio||!i||!i.w||!i.h||!i.size)return r.getThumbnailOfSourceHttp(e,t);const o=i.w>e||i.h>t;return i.size>1048576&&o?r.getThumbnailOfSourceHttp(e,t):r.srcHttp}async downloadImage(){var e;if(this.state.contentUrl)return;let t,n;if(this.props.mediaEventHelper.media.isEncrypted)try{[n,t]=await Promise.all([this.props.mediaEventHelper.sourceUrl.value,this.props.mediaEventHelper.thumbnailUrl.value])}catch(e){if(this.unmounted)return;return e instanceof M.a?p.a.error("Unable to decrypt attachment: ",e):e instanceof M.b?p.a.error("Unable to download attachment to decrypt it: ",e):p.a.error("Error encountered when downloading encrypted attachment: ",e),void this.setState({error:e})}else t=this.getThumbUrl(),n=this.getContentUrl();const r=this.props.mxEvent.getContent();let i=F(null===(e=r.info)||void 0===e?void 0:e.mimetype);if(i&&!b.b.getValue("autoplayGifs")&&(!t||null==r||!r.info.thumbnail_info||F(r.info.thumbnail_info.mimetype))){const e=document.createElement("img"),a=new Promise(((t,n)=>{e.onload=t,e.onerror=n}));e.crossOrigin="Anonymous",e.src=n;try{await a}catch(e){return p.a.error("Unable to download attachment: ",e),void this.setState({error:e})}try{var o;const n=await this.props.mediaEventHelper.sourceBlob.value;if(await async function(e,t){switch(e){case"image/webp":{const e=await t.slice(0,17).arrayBuffer();if("RIFF"===O(e,0,4)&&"WEBP"===O(e,8,4)&&"VP8X"===O(e,12,4)){const[t]=D(e,16,1);return 0!=(2&t)}break}case"image/gif":{const e=new DataView(await t.arrayBuffer(),10),n=e.getUint8(0);let r=0;128&n&&(r=3*Math.pow(2,1+(7&n)));const i=3+r,o=e.getUint8(i),a=e.getUint8(i+1);let s=0;return 33&o&&249&a&&(s=e.getUint16(i+4)),!!s}case"image/png":case"image/apng":{const e=await t.arrayBuffer();if(Object(x.d)([137,80,78,71,13,10,26,10],Array.from(D(e,0,8))))return!1;for(let n=8;n<t.size;){const t=k(e,n);n+=4;const r=O(e,n,4);switch(n+=4,r){case"acTL":return!0;case"IDAT":return!1}n+=t+4}break}}return!1}(null===(o=r.info)||void 0===o?void 0:o.mimetype,n)||(i=!1),i){const n=await Object(E.b)(e,e.width,e.height,r.info.mimetype,!1);t=URL.createObjectURL(n.thumbnail)}}catch(e){p.a.warn("Unable to generate thumbnail for animated image: ",e)}}this.unmounted||this.setState({contentUrl:n,thumbUrl:t,isAnimated:i})}clearBlurhashTimeout(){this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0)}componentDidMount(){var e;this.unmounted=!1;(this.state.showImage||"true"===localStorage.getItem("mx_ShowImage_"+this.props.mxEvent.getId()))&&(this.downloadImage(),this.setState({showImage:!0})),null!==(e=this.props.mxEvent.getContent().info)&&void 0!==e&&e[E.a]&&(this.clearBlurhashTimeout(),this.timeout=window.setTimeout((()=>{this.state.imgLoaded&&this.state.imgError||this.setState({placeholder:I.Blurhash})}),150)),this.sizeWatcher=b.b.watchSetting("Images.size",null,(()=>{this.forceUpdate()}))}componentWillUnmount(){this.unmounted=!0,T.a.get().off(m.b.Sync,this.reconnectedListener),this.clearBlurhashTimeout(),b.b.unwatchSetting(this.sizeWatcher),this.state.isAnimated&&this.state.thumbUrl&&URL.revokeObjectURL(this.state.thumbUrl)}getBanner(e){return[C.a.ThreadsList,C.a.File].includes(this.context.timelineRenderingType)?null:l.a.createElement("span",{className:"mx_MImageBody_banner"},Object(A.a)(e,Object(_.a)("Image"),!0,!0))}messageContent(e,t,n,r){var i,o;let a,s;t||(t=e);let c=!1;if(null!==(i=n.info)&&void 0!==i&&i.w&&null!==(o=n.info)&&void 0!==o&&o.h)a=n.info.w,s=n.info.h,c="image/svg+xml"===n.info.mimetype;else{if(!this.state.loadedImageDimensions){let r;return r=this.state.showImage?l.a.createElement("img",{style:{display:"none"},src:t,ref:this.image,alt:n.body,onError:this.onImageError,onLoad:this.onImageLoad}):l.a.createElement(L,null),this.wrapImage(e,r)}a=this.state.loadedImageDimensions.naturalWidth,s=this.state.loadedImageDimensions.naturalHeight}const{w:u,h:p}=Object(w.b)(b.b.getValue("Images.size"),{w:a,h:s},null!=r?r:this.props.maxImageHeight);let m,g,f;if(!this.props.forExport&&!this.state.imgLoaded){var _;const e=d()("mx_MImageBody_placeholder",{"mx_MImageBody_placeholder--blurhash":null===(_=this.props.mxEvent.getContent().info)||void 0===_?void 0:_[E.a]});g=l.a.createElement("div",{className:e},this.getPlaceholder(u,p))}let v,y=Boolean(g);t&&!this.state.imgError&&(m=l.a.createElement("img",{className:"mx_MImageBody_thumbnail",src:t,ref:this.image,alt:n.body,onError:this.onImageError,onLoad:this.onImageLoad,onMouseEnter:this.onImageEnter,onMouseLeave:this.onImageLeave})),this.state.showImage||(m=l.a.createElement(L,{maxWidth:u}),y=!1),!this.state.isAnimated||b.b.getValue("autoplayGifs")||this.state.hover||(f=l.a.createElement("p",{className:"mx_MImageBody_gifLabel"},"GIF")),this.state.showImage&&this.state.hover&&(v=this.getBanner(n));const S=c?{maxHeight:p,maxWidth:u,width:u}:{maxHeight:p,maxWidth:u};this.props.forExport||(g=l.a.createElement(h.SwitchTransition,{mode:"out-in"},l.a.createElement(h.CSSTransition,{classNames:"mx_rtg--fade",key:`img-${y}`,timeout:300},y?g:l.a.createElement(l.a.Fragment,null))));const T=l.a.createElement("div",{className:"mx_MImageBody_thumbnail_container",style:{maxHeight:p,maxWidth:u,aspectRatio:`${a}/${s}`}},g,l.a.createElement("div",{style:S},m,f,v),!this.props.forExport&&!this.state.imgLoaded&&l.a.createElement("div",{style:{height:p,width:u}}),this.state.hover&&this.getTooltip());return this.wrapImage(e,T)}wrapImage(e,t){return l.a.createElement("a",{href:e,target:this.props.forExport?"_blank":void 0,onClick:this.onClick},t)}getPlaceholder(e,t){var n;const r=null===(n=this.props.mxEvent.getContent().info)||void 0===n?void 0:n[E.a];if(r){if(this.state.placeholder===I.NoImage)return null;if(this.state.placeholder===I.Blurhash)return l.a.createElement(c.Blurhash,{className:"mx_Blurhash",hash:r,width:e,height:t})}return l.a.createElement(v.a,{w:32,h:32})}getTooltip(){return null}getFileBody(){if(this.props.forExport)return null;return this.context.timelineRenderingType===C.a.Room||this.context.timelineRenderingType===C.a.Pinned||this.context.timelineRenderingType===C.a.Search||this.context.timelineRenderingType===C.a.Thread||this.context.timelineRenderingType===C.a.ThreadsList?void 0:l.a.createElement(g.a,i()({},this.props,{showGenericPlaceholder:!1}))}render(){const e=this.props.mxEvent.getContent();if(this.state.error){let e=Object(_.a)("Unable to show image due to error");return this.state.error instanceof M.a?e=Object(_.a)("Error decrypting image"):this.state.error instanceof M.b&&(e=Object(_.a)("Error downloading image")),l.a.createElement(N.a,{className:"mx_MImageBody"},e)}let t,n=this.state.contentUrl;var r,i;if(this.props.forExport)n=null!==(r=this.props.mxEvent.getContent().url)&&void 0!==r?r:null===(i=this.props.mxEvent.getContent().file)||void 0===i?void 0:i.url,t=n;else if(this.state.isAnimated&&b.b.getValue("autoplayGifs"))t=n;else{var o;t=null!==(o=this.state.thumbUrl)&&void 0!==o?o:this.state.contentUrl}const a=this.messageContent(n,t,e),s=this.getFileBody();return l.a.createElement("div",{className:"mx_MImageBody"},a,s)}}a()(P,"contextType",C.b);class L extends l.a.PureComponent{render(){const e=this.props.maxWidth?this.props.maxWidth+"px":null;let t="mx_HiddenImagePlaceholder";return this.props.hover&&(t+=" mx_HiddenImagePlaceholder_hover"),l.a.createElement("div",{className:t,style:{maxWidth:`min(100%, ${e}px)`}},l.a.createElement("div",{className:"mx_HiddenImagePlaceholder_button"},l.a.createElement("span",{className:"mx_HiddenImagePlaceholder_eye"}),l.a.createElement("span",null,Object(_.a)("Show image"))))}}},function(e,t,n){"use strict";e.exports={__locale:"en",days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviated_days:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviated_months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],am:"AM",pm:"PM"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(13),i=n.n(r),o=n(354),a=n(143);class s{constructor(e,t){this.client=e,this.room=t,i()(this,"relations",new Map)}getChildEventsForEvent(e,t,n){var r,i;return null===(r=this.relations.get(e))||void 0===r||null===(i=r.get(t))||void 0===i?void 0:i.get(n)}getAllChildEventsForEvent(e){var t;const n=null!==(t=this.relations.get(e))&&void 0!==t?t:new Map,r=[];for(const e of n.values())for(const t of e.values())r.push(...t.getRelations());return r}aggregateParentEvent(e){const t=this.relations.get(e.getId());if(t)for(const n of t.values())for(const t of n.values())t.setTargetEvent(e)}aggregateChildEvent(e,t){if(e.isRedacted()||e.status===a.a.CANCELLED)return;const n=e.getRelation();if(!n)return;const r=()=>{e.isDecryptionFailure()?e.once(a.c.Decrypted,r):this.aggregateChildEvent(e,t)};if(e.isBeingDecrypted()||e.shouldAttemptDecryption())return void e.once(a.c.Decrypted,r);const{event_id:i,rel_type:s}=n,l=e.getType();let c=this.relations.get(i);c||(c=new Map,this.relations.set(i,c));let u=c.get(s);u||(u=new Map,c.set(s,u));let d=u.get(l);if(!d){var h,p,m;d=new o.a(s,l,this.client),u.set(l,d);const e=null!==(h=this.room)&&void 0!==h?h:null==t?void 0:t.room,n=null!==(p=null!==(m=null==t?void 0:t.findEventById(i))&&void 0!==m?m:null==e?void 0:e.findEventById(i))&&void 0!==p?p:null==e?void 0:e.getPendingEvent(i);n&&d.setTargetEvent(n)}d.addEvent(e)}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return h}));var r=n(13),i=n.n(r),o=n(18),a=n(158),s=n(16),l=n(143),c=n(129),u=n(140);function d(e,t,n){var r;return new l.b({content:{[t.getId()]:{[n]:{[e]:{ts:t.getTs(),thread_id:null!==(r=t.threadRootId)&&void 0!==r?r:o.a}}}},type:c.b.Receipt,room_id:t.getRoomId()})}class h extends a.b{constructor(){super(...arguments),i()(this,"receipts",new s.b((()=>new Map))),i()(this,"receiptCacheByEventId",new Map),i()(this,"timeline",void 0)}getReadReceiptForUserId(e){var t,n;let r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.b.Read;const[a,s]=null!==(t=null===(n=this.receipts.get(i))||void 0===n?void 0:n.get(e))&&void 0!==t?t:[null,null];return r?a:null!=s?s:a}getEventReadUpTo(e){var t,n,r,i,a;let s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const l=this.getUnfilteredTimelineSet(),c=this.getReadReceiptForUserId(e,s,o.b.Read),u=this.getReadReceiptForUserId(e,s,o.b.ReadPrivate);let d;var h,p;(null!=c&&c.eventId&&null!=u&&u.eventId&&(d=l.compareEventOrdering(null==c?void 0:c.eventId,null==u?void 0:u.eventId)),!d&&null!=c&&null!==(t=c.data)&&void 0!==t&&t.ts&&null!=u&&null!==(n=u.data)&&void 0!==n&&n.ts)&&(d=(null==c||null===(h=c.data)||void 0===h?void 0:h.ts)-(null==u||null===(p=u.data)||void 0===p?void 0:p.ts));return d?null!==(a=d<0?null==u?void 0:u.eventId:null==c?void 0:c.eventId)&&void 0!==a?a:null:null!==(r=null!==(i=null==u?void 0:u.eventId)&&void 0!==i?i:null==c?void 0:c.eventId)&&void 0!==r?r:null}addReceiptToStructure(e,t,n,r,i){var o,a;const s=this.receipts.getOrCreate(t);let l=s.get(n);l||(l=[null,null],s.set(n,l));let c=l[0];var u;i&&(c=null!==(u=l[1])&&void 0!==u?u:l[0]);if(c){const t=this.getUnfilteredTimelineSet().compareEventOrdering(c.eventId,e);if(null!==t&&t>=0)return}const d={eventId:e,data:r},h=i?l[0]:d,p=i?d:l[1];let m=null;h&&p&&(m=this.getUnfilteredTimelineSet().compareEventOrdering(h.eventId,p.eventId));const g=null===m||m<0,f=null!==(o=l[1])&&void 0!==o?o:l[0];i&&g?l[1]=d:i||(l[0]=d,g||(l[1]=null));if(f!==(null!==(a=l[1])&&void 0!==a?a:l[0])){if(f&&this.receiptCacheByEventId.get(f.eventId)){const e=f.eventId;this.receiptCacheByEventId.set(e,this.receiptCacheByEventId.get(e).filter((e=>e.type!==t||e.userId!==n))),this.receiptCacheByEventId.get(e).length<1&&this.receiptCacheByEventId.delete(e)}this.receiptCacheByEventId.get(e)||this.receiptCacheByEventId.set(e,[]),this.receiptCacheByEventId.get(e).push({userId:n,type:t,data:r})}}getReceiptsForEvent(e){return this.receiptCacheByEventId.get(e.getId())||[]}fixupNotifications(e){const t=this.getReadReceiptForUserId(e,!1),n=this.timeline[this.timeline.length-1];n&&(null==t?void 0:t.eventId)===n.getId()&&e===n.getSender()&&(this.setUnread(u.b.Total,0),this.setUnread(u.b.Highlight,0))}addLocalEchoReceipt(e,t,n){this.addReceipt(d(e,t,n),!0)}getUsersReadUpTo(e){return this.getReceiptsForEvent(e).filter((function(e){return s.w(e.type)})).map((function(e){return e.userId}))}hasUserReadEvent(e,t){var n;const r=this.getEventReadUpTo(e,!1);if(r===t)return!0;if(null!==(n=this.timeline)&&void 0!==n&&n.length&&this.timeline[this.timeline.length-1].getSender()&&this.timeline[this.timeline.length-1].getSender()===e)return!0;for(let e=(null===(i=this.timeline)||void 0===i?void 0:i.length)-1;e>=0;--e){var i;const n=this.timeline[e];if(n.getId()===t)return!1;if(n.getId()===r)return!0}return!1}}},function(e,t){var n=e.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(e){return e.encoding?"rtpmap:%d %s/%s/%s":e.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(e){return null!=e.address?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%s trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(e){return null!=e.subtype?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:(\d+)(?:\/(\w+))?(?: (urn:ietf:params:rtp-hdrext:encrypt))? (\S*)(?: (\S*))?/,names:["value","direction","encrypt-uri","uri","config"],format:function(e){return"extmap:%d"+(e.direction?"/%s":"%v")+(e["encrypt-uri"]?" %s":"%v")+" %s"+(e.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(e){return null!=e.sessionConfig?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"connectionType",reg:/^connection:(new|existing)/,format:"connection:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*(?:\.\d*)*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*(?:\.\d*)*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation","network-id","network-cost"],format:function(e){var t="candidate:%s %d %s %d %s %d typ %s";return t+=null!=e.raddr?" raddr %s rport %d":"%v%v",t+=null!=e.tcptype?" tcptype %s":"%v",null!=e.generation&&(t+=" generation %d"),t+=null!=e["network-id"]?" network-id %d":"%v",t+=null!=e["network-cost"]?" network-cost %d":"%v"}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_-]*)(?::(.*))?/,names:["id","attribute","value"],format:function(e){var t="ssrc:%d";return null!=e.attribute&&(t+=" %s",null!=e.value&&(t+=":%s")),t}},{push:"ssrcGroups",reg:/^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{name:"sctpmap",reg:/^sctpmap:([\w_/]*) (\S*)(?: (\S*))?/,names:["sctpmapNumber","app","maxMessageSize"],format:function(e){return null!=e.maxMessageSize?"sctpmap:%s %s %s":"sctpmap:%s %s"}},{name:"xGoogleFlag",reg:/^x-google-flag:([^\s]*)/,format:"x-google-flag:%s"},{push:"rids",reg:/^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,names:["id","direction","params"],format:function(e){return e.params?"rid:%s %s %s":"rid:%s %s"}},{push:"imageattrs",reg:new RegExp("^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"),names:["pt","dir1","attrs1","dir2","attrs2"],format:function(e){return"imageattr:%s %s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast",reg:new RegExp("^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"),names:["dir1","list1","dir2","list2"],format:function(e){return"simulcast:%s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast_03",reg:/^simulcast:[\s\t]+([\S+\s\t]+)$/,names:["value"],format:"simulcast: %s"},{name:"framerate",reg:/^framerate:(\d+(?:$|\.\d+))/,format:"framerate:%s"},{name:"sourceFilter",reg:/^source-filter: *(excl|incl) (\S*) (IP4|IP6|\*) (\S*) (.*)/,names:["filterMode","netType","addressTypes","destAddress","srcList"],format:"source-filter: %s %s %s %s %s"},{name:"bundleOnly",reg:/^(bundle-only)/},{name:"label",reg:/^label:(.+)/,format:"label:%s"},{name:"sctpPort",reg:/^sctp-port:(\d+)$/,format:"sctp-port:%s"},{name:"maxMessageSize",reg:/^max-message-size:(\d+)$/,format:"max-message-size:%s"},{push:"tsRefClocks",reg:/^ts-refclk:([^\s=]*)(?:=(\S*))?/,names:["clksrc","clksrcExt"],format:function(e){return"ts-refclk:%s"+(null!=e.clksrcExt?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(e){var t="mediaclk:";return t+=null!=e.id?"id=%s %s":"%v%s",t+=null!=e.mediaClockValue?"=%s":"",t+=null!=e.rateNumerator?" rate=%s":"",t+=null!=e.rateDenominator?"/%s":""}},{name:"keywords",reg:/^keywds:(.+)$/,format:"keywds:%s"},{name:"content",reg:/^content:(.+)/,format:"content:%s"},{name:"bfcpFloorCtrl",reg:/^floorctrl:(c-only|s-only|c-s)/,format:"floorctrl:%s"},{name:"bfcpConfId",reg:/^confid:(\d+)/,format:"confid:%s"},{name:"bfcpUserId",reg:/^userid:(\d+)/,format:"userid:%s"},{name:"bfcpFloorId",reg:/^floorid:(.+) (?:m-stream|mstrm):(.+)/,names:["id","mStream"],format:"floorid:%s mstrm:%s"},{push:"invalid",names:["value"]}]};Object.keys(n).forEach((function(e){n[e].forEach((function(e){e.reg||(e.reg=/(.*)/),e.format||(e.format="%s")}))}))},function(e,t,n){"use strict";let r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!r&&(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!r))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)};const i=new Uint8Array(16)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0,t.default=function(e,t,n){function r(e,r,a,s){var l;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof r&&(r=(0,o.default)(r)),16!==(null===(l=r)||void 0===l?void 0:l.length))throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let c=new Uint8Array(16+e.length);if(c.set(r),c.set(e,r.length),c=n(c),c[6]=15&c[6]|t,c[8]=63&c[8]|128,a){s=s||0;for(let e=0;e<16;++e)a[s+e]=c[e];return a}return(0,i.unsafeStringify)(c)}try{r.name=e}catch(e){}return r.DNS=a,r.URL=s,r};var r,i=n(414),o=(r=n(666))&&r.__esModule?r:{default:r};const a="6ba7b810-9dad-11d1-80b4-00c04fd430c8";t.DNS=a;const s="6ba7b811-9dad-11d1-80b4-00c04fd430c8";t.URL=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=(r=n(415))&&r.__esModule?r:{default:r};var o=function(e){if(!(0,i.default)(e))throw TypeError("Invalid UUID");let t;const n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n};t.default=o},function(e,t,n){"use strict";function r(e,t){return new Promise(((n,r)=>{let i=!0;const o=e.open(t);o.onupgradeneeded=()=>{i=!1},o.onblocked=()=>r(o.error),o.onsuccess=()=>{o.result.close(),i||e.deleteDatabase(t),n(i)},o.onerror=()=>r(o.error)}))}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(13),i=n.n(r),o=n(359),a=n(1),s=n(199),l=n(417),c=n(511),u=n(129),d=n(669),h=n(16);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e){var t,n;const r=null==e||null===(t=e.currentState)||void 0===t?void 0:t.getStateEvents("m.room.history_visibility",""),i=null==r||null===(n=r.getContent())||void 0===n?void 0:n.history_visibility;return["world_readable","shared"].includes(i)}const f=e=>"string"==typeof e.ciphertext?!!e.ciphertext.length:!!Object.keys(e.ciphertext).length;class _{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.sessionId=e,this.sharedHistory=t,i()(this,"useCount",0),i()(this,"creationTime",void 0),i()(this,"sharedWithDevices",new h.b((()=>new Map))),i()(this,"blockedDevicesNotified",new h.b((()=>new Map))),this.creationTime=(new Date).getTime()}needsRotation(e,t){const n=(new Date).getTime()-this.creationTime;return(this.useCount>=e||n>=t)&&(a.a.log("Rotating megolm session after "+this.useCount+" messages, "+n+"ms"),!0)}markSharedWithDevice(e,t,n,r){this.sharedWithDevices.getOrCreate(e).set(t,{deviceKey:n,messageIndex:r})}markNotifiedBlockedDevice(e,t){this.blockedDevicesNotified.getOrCreate(e).set(t,!0)}sharedWithTooManyDevices(e){for(const[n,r]of this.sharedWithDevices){if(!e.has(n))return a.a.log("Starting new megolm session because we shared with "+n),!0;for(const[i]of r){var t;if(null===(t=e.get(n))||void 0===t||!t.get(i))return a.a.log("Starting new megolm session because we shared with "+n+":"+i),!0}}return!1}}class b extends l.e{constructor(e){var t,n,r,o;super(e),i()(this,"setupPromise",Promise.resolve(null)),i()(this,"outboundSessions",{}),i()(this,"sessionRotationPeriodMsgs",void 0),i()(this,"sessionRotationPeriodMs",void 0),i()(this,"encryptionPreparation",void 0),i()(this,"roomId",void 0),i()(this,"prefixedLogger",void 0),this.roomId=e.roomId,this.prefixedLogger=a.a.withPrefix(`[${this.roomId} encryption]`),this.sessionRotationPeriodMsgs=null!==(t=null===(n=e.config)||void 0===n?void 0:n.rotation_period_msgs)&&void 0!==t?t:100,this.sessionRotationPeriodMs=null!==(r=null===(o=e.config)||void 0===o?void 0:o.rotation_period_ms)&&void 0!==r?r:6048e5}async ensureOutboundSession(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=this.setupPromise.then((async i=>{const o=g(e),a=await this.prepareSession(t,o,i);return await this.shareSession(t,o,r,n,a),a}));return this.setupPromise=i.catch((e=>(this.prefixedLogger.error("Failed to setup outbound session",e),null))),i}async prepareSession(e,t,n){var r,i;return n&&t!==n.sharedHistory&&(n=null),null!==(r=n)&&void 0!==r&&r.needsRotation(this.sessionRotationPeriodMsgs,this.sessionRotationPeriodMs)&&(this.prefixedLogger.log("Starting new megolm session because we need to rotate."),n=null),null!==(i=n)&&void 0!==i&&i.sharedWithTooManyDevices(e)&&(n=null),n||(this.prefixedLogger.log("Starting new megolm session"),n=await this.prepareNewSession(t),this.prefixedLogger.log(`Started new megolm session ${n.sessionId}`),this.outboundSessions[n.sessionId]=n),n}async shareSession(e,t,n,r,i){const o={};for(const[t,n]of e)for(const[e,r]of n){var a;r.getIdentityKey()!=this.olmDevice.deviceCurve25519Key&&(null!==(a=i.sharedWithDevices.get(t))&&void 0!==a&&a.get(e)||(o[t]=o[t]||[],o[t].push(r)))}const l=this.olmDevice.getOutboundGroupSessionKey(i.sessionId),c={type:"m.room_key",content:{algorithm:s.MEGOLM_ALGORITHM,room_id:this.roomId,session_id:i.sessionId,session_key:l.key,chain_index:l.chain_index,"org.matrix.msc3061.shared_history":t}},[u,d]=await s.getExistingOlmSessions(this.olmDevice,this.baseApis,o);await Promise.all([(async()=>{const e=Array.from(d.entries()).map((e=>{let[t,n]=e;return Array.from(n.entries()).map((e=>{let[n,r]=e;return`${t}/${n}: ${r.sessionId}`}))})).flat(1);this.prefixedLogger.debug("Sharing keys with devices with existing Olm sessions:",e),await this.shareKeyWithOlmSessions(i,l,c,d),this.prefixedLogger.debug("Shared keys with existing Olm sessions")})(),(async()=>{const e=Array.from(u.entries()).map((e=>{let[t,n]=e;return n.map((e=>`${t}/${e.deviceId}`))})).flat(1);this.prefixedLogger.debug("Sharing keys (start phase 1) with devices without existing Olm sessions:",e);const t=[],r=Date.now(),o=[];await this.shareKeyWithDevices(i,l,c,u,t,n?1e4:2e3,o),this.prefixedLogger.debug("Shared keys (end phase 1) with devices without existing Olm sessions"),!n&&Date.now()-r<1e4?(async()=>{const e=new h.b((()=>[])),n=new Set;for(const e of o)n.add(e);const r=[];for(const{userId:i,deviceInfo:o}of t){const t=i.slice(i.indexOf(":")+1);n.has(t)?e.getOrCreate(i).push(o):r.push({userId:i,deviceInfo:o})}const a=Array.from(e.entries()).map((e=>{let[t,n]=e;return n.map((e=>`${t}/${e.deviceId}`))})).flat(1);a.length>0&&(this.prefixedLogger.debug("Sharing keys (start phase 2) with devices without existing Olm sessions:",a),await this.shareKeyWithDevices(i,l,c,e,r,3e4),this.prefixedLogger.debug("Shared keys (end phase 2) with devices without existing Olm sessions")),await this.notifyFailedOlmDevices(i,l,r)})():await this.notifyFailedOlmDevices(i,l,t)})(),(async()=>{this.prefixedLogger.debug(`There are ${r.size} blocked devices:`,Array.from(r.entries()).map((e=>{let[t,n]=e;return Array.from(n.entries()).map((e=>{let[n,r]=e;return`${t}/${n}`}))})).flat(1));const e=new h.b((()=>new Map));let t=0;for(const[o,a]of r)for(const[r,s]of a){var n;void 0===(null===(n=i.blockedDevicesNotified.get(o))||void 0===n?void 0:n.get(r))&&(e.getOrCreate(o).set(r,{device:s}),t++)}t&&(this.prefixedLogger.debug(`Notifying ${t} newly blocked devices:`,Array.from(e.entries()).map((e=>{let[t,n]=e;return Object.entries(n).map((e=>{let[n,r]=e;return`${t}/${n}`}))})).flat(1)),await this.notifyBlockedDevices(i,e),this.prefixedLogger.debug(`Notified ${t} newly blocked devices`))})()])}async prepareNewSession(e){const t=this.olmDevice.createOutboundGroupSession(),n=this.olmDevice.getOutboundGroupSessionKey(t);return await this.olmDevice.addInboundGroupSession(this.roomId,this.olmDevice.deviceCurve25519Key,[],t,n.key,{ed25519:this.olmDevice.deviceEd25519Key},!1,{sharedHistory:e}),this.crypto.backupManager.backupGroupSession(this.olmDevice.deviceCurve25519Key,t),new _(t,e)}getDevicesWithoutSessions(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];for(const[r,i]of t){const t=e.get(r);for(const e of i){const i=e.deviceId,o=null==t?void 0:t.get(i);null!=o&&o.sessionId||(n.push({userId:r,deviceInfo:e}),null==t||t.delete(i))}}return n}splitDevices(e){let t=[];const n=[t];for(const[r,i]of e){for(const e of i.values())t.push({userId:r,deviceInfo:e.device});t.length>20&&(t=[],n.push(t))}return 0===t.length&&n.pop(),n}encryptAndSendKeysToDevices(e,t,n,r){return this.crypto.encryptAndSendToDevices(n,r).then((()=>{for(const r of n)e.markSharedWithDevice(r.userId,r.deviceInfo.deviceId,r.deviceInfo.getIdentityKey(),t)})).catch((e=>{throw this.prefixedLogger.error("failed to encryptAndSendToDevices",e),e}))}async sendBlockedNotificationsToDevices(e,t,n){const r=new h.b((()=>new Map));for(const e of t){const t=e.userId,i=e.deviceInfo,a=i.deviceInfo.deviceId,s=m(m({},n),{},{code:i.code,reason:i.reason,[u.k]:Object(o.v4)()});"m.no_olm"===s.code&&(delete s.room_id,delete s.session_id),r.getOrCreate(t).set(a,s)}await this.baseApis.sendToDevice("m.room_key.withheld",r);for(const[t,n]of r)for(const r of n.keys())e.markNotifiedBlockedDevice(t,r)}async reshareKeyWithDevice(e,t,n,r){var i;const a=this.outboundSessions[t];if(!a)return void this.prefixedLogger.debug(`megolm session ${e}|${t} not found: not re-sharing keys`);if(!a.sharedWithDevices.has(n))return void this.prefixedLogger.debug(`megolm session ${e}|${t} never shared with user ${n}`);const l=null===(i=a.sharedWithDevices.get(n))||void 0===i?void 0:i.get(r.deviceId);if(void 0===l)return void this.prefixedLogger.debug(`megolm session ${e}|${t} never shared with device ${n}:${r.deviceId}`);if(l.deviceKey!==r.getIdentityKey())return void this.prefixedLogger.warn(`Megolm session ${e}|${t} has been shared with device ${r.deviceId} but with identity key ${l.deviceKey}. Key is now ${r.getIdentityKey()}!`);const c=await this.olmDevice.getInboundGroupSessionKey(this.roomId,e,t,l.messageIndex);if(!c)return void this.prefixedLogger.warn(`No inbound session key found for megolm session ${e}|${t}: not re-sharing keys`);await s.ensureOlmSessionsForDevices(this.olmDevice,this.baseApis,new Map([[n,[r]]]));const d={type:"m.forwarded_room_key",content:{algorithm:s.MEGOLM_ALGORITHM,room_id:this.roomId,session_id:t,session_key:c.key,chain_index:c.chain_index,sender_key:e,sender_claimed_ed25519_key:c.sender_claimed_ed25519_key,forwarding_curve25519_key_chain:c.forwarding_curve25519_key_chain,"org.matrix.msc3061.shared_history":c.shared_history||!1}},h={algorithm:s.OLM_ALGORITHM,sender_key:this.olmDevice.deviceCurve25519Key,ciphertext:{},[u.k]:Object(o.v4)()};await s.encryptMessageForDevice(h.ciphertext,this.userId,this.deviceId,this.olmDevice,n,r,d),await this.baseApis.sendToDevice("m.room.encrypted",new Map([[n,new Map([[r.deviceId,h]])]])),this.prefixedLogger.debug(`Re-shared key for megolm session ${e}|${t} with ${n}:${r.deviceId}`)}async shareKeyWithDevices(e,t,n,r,i,o,a){const l=await s.ensureOlmSessionsForDevices(this.olmDevice,this.baseApis,r,!1,o,a,this.prefixedLogger);this.getDevicesWithoutSessions(l,r,i),await this.shareKeyWithOlmSessions(e,t,n,l)}async shareKeyWithOlmSessions(e,t,n,r){const i=this.splitDevices(r);for(let r=0;r<i.length;r++){const o=`megolm keys for ${e.sessionId} (slice ${r+1}/${i.length})`;try{this.prefixedLogger.debug(`Sharing ${o}`,i[r].map((e=>`${e.userId}/${e.deviceInfo.deviceId}`))),await this.encryptAndSendKeysToDevices(e,t.chain_index,i[r],n),this.prefixedLogger.debug(`Shared ${o}`)}catch(e){throw this.prefixedLogger.error(`Failed to share ${o}`),e}}}async notifyFailedOlmDevices(e,t,n){this.prefixedLogger.debug(`Notifying ${n.length} devices we failed to create Olm sessions`);for(const{userId:r,deviceInfo:i}of n){const n=i.deviceId;e.markSharedWithDevice(r,n,i.getIdentityKey(),t.chain_index)}const r=await this.olmDevice.filterOutNotifiedErrorDevices(n);this.prefixedLogger.debug(`Need to notify ${r.length} failed devices which haven't been notified before`);const i=new h.b((()=>new Map));for(const{userId:e,deviceInfo:t}of r)i.getOrCreate(e).set(t.deviceId,{device:{code:"m.no_olm",reason:c.b["m.no_olm"],deviceInfo:t}});await this.notifyBlockedDevices(e,i),this.prefixedLogger.debug(`Notified ${r.length} devices we failed to create Olm sessions`)}async notifyBlockedDevices(e,t){const n={room_id:this.roomId,session_id:e.sessionId,algorithm:s.MEGOLM_ALGORITHM,sender_key:this.olmDevice.deviceCurve25519Key},r=this.splitDevices(t);for(let t=0;t<r.length;t++)try{await this.sendBlockedNotificationsToDevices(e,r[t],n),this.prefixedLogger.log(`Completed blacklist notification for ${e.sessionId} (slice ${t+1}/${r.length})`)}catch(n){throw this.prefixedLogger.log(`blacklist notification for ${e.sessionId} (slice ${t+1}/${r.length}) failed`),n}}prepareToEncrypt(e){if(e.roomId!==this.roomId)throw new Error("MegolmEncryption.prepareToEncrypt called on unexpected room");if(null!=this.encryptionPreparation){const e=Date.now()-this.encryptionPreparation.startTime;return this.prefixedLogger.debug(`Already started preparing to encrypt for this room ${e}ms ago, skipping`),this.encryptionPreparation.cancel}this.prefixedLogger.debug("Preparing to encrypt events");let t=!1;const n=()=>t;return this.encryptionPreparation={startTime:Date.now(),promise:(async()=>{try{const t=await this.getDevicesInRoom(e,!1,n);if(null===t)return;const[r,i]=t;this.crypto.globalErrorOnUnknownDevices&&this.removeUnknownDevices(r),this.prefixedLogger.debug("Ensuring outbound megolm session"),await this.ensureOutboundSession(e,r,i,!0),this.prefixedLogger.debug("Ready to encrypt events")}catch(e){this.prefixedLogger.error("Failed to prepare to encrypt events",e)}finally{delete this.encryptionPreparation}})(),cancel:()=>{t=!0,delete this.encryptionPreparation}},this.encryptionPreparation.cancel}async encryptMessage(e,t,n){if(this.prefixedLogger.log("Starting to encrypt event"),null!=this.encryptionPreparation)try{await this.encryptionPreparation.promise}catch(e){}const r=this.isVerificationEvent(t,n),[i,o]=await this.getDevicesInRoom(e,r);this.crypto.globalErrorOnUnknownDevices&&this.checkForUnknownDevices(i);const a=await this.ensureOutboundSession(e,i,o),l={room_id:this.roomId,type:t,content:n},c=this.olmDevice.encryptGroupMessage(a.sessionId,JSON.stringify(l)),u={algorithm:s.MEGOLM_ALGORITHM,sender_key:this.olmDevice.deviceCurve25519Key,ciphertext:c,session_id:a.sessionId,device_id:this.deviceId};return a.useCount++,u}isVerificationEvent(e,t){switch(e){case u.b.KeyVerificationCancel:case u.b.KeyVerificationDone:case u.b.KeyVerificationMac:case u.b.KeyVerificationStart:case u.b.KeyVerificationKey:case u.b.KeyVerificationReady:case u.b.KeyVerificationAccept:return!0;case u.b.RoomMessage:return t.msgtype===u.e.KeyVerificationRequest;default:return!1}}forceDiscardSession(){this.setupPromise=this.setupPromise.then((()=>null))}checkForUnknownDevices(e){const t=new h.b((()=>new Map));for(const[n,r]of e)for(const[e,i]of r)i.isUnverified()&&!i.isKnown()&&t.getOrCreate(n).set(e,i);if(t.size)throw new l.f("This room contains unknown devices which have not been verified. We strongly recommend you verify them before continuing.",t)}removeUnknownDevices(e){for(const[t,n]of e){for(const[e,t]of n)t.isUnverified()&&!t.isKnown()&&n.delete(e);0===n.size&&e.delete(t)}}async getDevicesInRoom(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0;const r=await e.getEncryptionTargetMembers();this.prefixedLogger.debug(`Encrypting for users (shouldEncryptForInvitedMembers: ${e.shouldEncryptForInvitedMembers()}):`,r.map((e=>`${e.userId} (${e.membership})`)));const i=r.map((function(e){return e.userId}));let o=this.crypto.globalBlacklistUnverifiedDevices;const a=e.getBlacklistUnverifiedDevices();"boolean"==typeof a&&(o=a);const s=await this.crypto.downloadKeys(i,!1);if(!0===(null==n?void 0:n()))return null;const l=new h.b((()=>new Map));for(const[e,r]of s)for(const[i,a]of r){if(void 0!==n&&await Object(h.s)(),!0===(null==n?void 0:n()))return null;const s=this.crypto.checkDeviceTrust(e,i);if(a.isBlocked()||!s.isVerified()&&o&&!t){const t=l.getOrCreate(e),n=a.isBlocked();t.set(i,{code:n?"m.blacklisted":"m.unverified",reason:c.b[n?"m.blacklisted":"m.unverified"],deviceInfo:a}),r.delete(i)}}return[s,l]}}class v extends l.b{constructor(e){super(e),i()(this,"pendingEvents",new Map),i()(this,"olmlib",s),i()(this,"roomId",void 0),i()(this,"prefixedLogger",void 0),this.roomId=e.roomId,this.prefixedLogger=a.a.withPrefix(`[${this.roomId} decryption]`)}async decryptEvent(e){const t=e.getWireContent();if(!t.sender_key||!t.session_id||!t.ciphertext)throw new l.c("MEGOLM_MISSING_FIELDS","Missing fields in input");let n;this.addEventToPendingList(e);try{n=await this.olmDevice.decryptGroupMessage(e.getRoomId(),t.sender_key,t.session_id,t.ciphertext,e.getId(),e.getTs())}catch(n){if("DecryptionError"===n.name)throw n;let r="OLM_DECRYPT_GROUP_MESSAGE_ERROR";throw"OLM.UNKNOWN_MESSAGE_INDEX"===(null==n?void 0:n.message)&&(this.requestKeysForEvent(e),r="OLM_UNKNOWN_MESSAGE_INDEX"),new l.c(r,n instanceof Error?n.message:"Unknown Error: Error is undefined",{session:t.sender_key+"|"+t.session_id})}if(null===n){this.crypto.backupManager.queryKeyBackupRateLimited(e.getRoomId(),t.session_id).catch((()=>{})),this.requestKeysForEvent(e);const n=await this.olmDevice.sessionMayHaveProblems(t.sender_key,e.getTs()-12e4);if(n){this.prefixedLogger.info(`When handling UISI from ${e.getSender()} (sender key ${t.sender_key}): recent session problem with that sender:`,n);let r=y[n.type]||y.unknown;throw n.fixed&&(r+=" Trying to create a new secure channel and re-requesting the keys."),new l.c("MEGOLM_UNKNOWN_INBOUND_SESSION_ID",r,{session:t.sender_key+"|"+t.session_id})}throw new l.c("MEGOLM_UNKNOWN_INBOUND_SESSION_ID","The sender's device has not sent us the keys for this message.",{session:t.sender_key+"|"+t.session_id})}n.untrusted||this.removeEventFromPendingList(e);const r=JSON.parse(n.result);if(r.room_id!==e.getRoomId())throw new l.c("MEGOLM_BAD_ROOM","Message intended for room "+r.room_id);return{clearEvent:r,senderCurve25519Key:n.senderKey,claimedEd25519Key:n.keysClaimed.ed25519,forwardingCurve25519KeyChain:n.forwardingCurve25519KeyChain,untrusted:n.untrusted}}requestKeysForEvent(e){const t=e.getWireContent(),n=e.getKeyRequestRecipients(this.userId);this.crypto.requestRoomKey({room_id:e.getRoomId(),algorithm:t.algorithm,sender_key:t.sender_key,session_id:t.session_id},n)}addEventToPendingList(e){var t;const n=e.getWireContent(),r=n.sender_key,i=n.session_id;this.pendingEvents.has(r)||this.pendingEvents.set(r,new Map);const o=this.pendingEvents.get(r);o.has(i)||o.set(i,new Set),null===(t=o.get(i))||void 0===t||t.add(e)}removeEventFromPendingList(e){const t=e.getWireContent(),n=t.sender_key,r=t.session_id,i=this.pendingEvents.get(n),o=null==i?void 0:i.get(r);o&&(o.delete(e),0===o.size&&i.delete(r),0===i.size&&this.pendingEvents.delete(n))}roomKeyFromEvent(e){const t=e.getSenderKey(),n=e.getContent(),r={};if(!(n.room_id&&n.session_key&&n.session_id&&n.algorithm))return void this.prefixedLogger.error("key event is missing fields");if(!s.isOlmEncrypted(e))return void this.prefixedLogger.error("key event not properly encrypted");n["org.matrix.msc3061.shared_history"]&&(r.sharedHistory=!0);return{senderKey:t,sessionId:n.session_id,sessionKey:n.session_key,extraSessionData:r,exportFormat:!1,roomId:n.room_id,algorithm:n.algorithm,forwardingKeyChain:[],keysClaimed:e.getKeysClaimed()}}forwardedRoomKeyFromEvent(e){const t=this.roomKeyFromEvent(e);if(!t)return;const n=e.getSenderKey(),r=e.getContent(),i=this.baseApis.crypto.deviceList.getUserByIdentityKey(s.OLM_ALGORITHM,n),o=r.sender_key,a=r.sender_claimed_ed25519_key;let l=Array.isArray(r.forwarding_curve25519_key_chain)?r.forwarding_curve25519_key_chain:[];if(l=l.slice(),l.push(n),i!==e.getSender())return void this.prefixedLogger.error("sending device does not belong to the user it claims to be from");if(!o)return void this.prefixedLogger.error("forwarded_room_key event is missing sender_key field");if(!a)return void this.prefixedLogger.error("forwarded_room_key_event is missing sender_claimed_ed25519_key field");const c={ed25519:a};return t.senderKey=o,t.keysClaimed=c,t.exportFormat=!0,t.forwardingKeyChain=l,t.extraSessionData.untrusted=!0,t}async shouldAcceptForwardedKey(e,t){var n;const r=e.getSenderKey(),i=null!==(n=this.crypto.deviceList.getDeviceByIdentityKey(s.OLM_ALGORITHM,r))&&void 0!==n?n:void 0,o=this.crypto.checkDeviceInfoTrust(e.getSender(),i),a=e.getSender()===this.baseApis.getUserId(),l=o.isVerified()&&a,c=await this.wasRoomKeyRequested(e,t),u=this.wasRoomKeyForwardedByInviter(e,t),d=this.wasRoomKeyForwardedAsHistory(t);return c&&l||u&&d}async wasRoomKeyRequested(e,t){return(await this.crypto.cryptoStore.getOutgoingRoomKeyRequestsByTarget(e.getSender(),"*",[d.b.Sent])).some((e=>e.requestBody.room_id===t.roomId&&e.requestBody.session_id===t.sessionId))}wasRoomKeyForwardedByInviter(e,t){var n,r,i;const o=this.baseApis.getRoom(t.roomId),a=e.getSenderKey();if(!a)return!1;const l=this.crypto.deviceList.getUserByIdentityKey(s.OLM_ALGORITHM,a);if(!l)return!1;const c=null==o||null===(n=o.getMember(this.userId))||void 0===n?void 0:n.events.member,u=(null==c?void 0:c.getSender())===l||(null==c||null===(r=c.getUnsigned())||void 0===r?void 0:r.prev_sender)===l&&"invite"===(null==c||null===(i=c.getPrevContent())||void 0===i?void 0:i.membership);return!(!o||!u)}wasRoomKeyForwardedAsHistory(e){return!(!this.baseApis.getRoom(e.roomId)||!e.extraSessionData.sharedHistory)}shouldParkForwardedKey(e){return!(this.baseApis.getRoom(e.roomId)||!e.extraSessionData.sharedHistory)}async parkForwardedKey(e,t){const n={senderId:e.getSender(),senderKey:t.senderKey,sessionId:t.sessionId,sessionKey:t.sessionKey,keysClaimed:t.keysClaimed,forwardingCurve25519KeyChain:t.forwardingKeyChain};await this.crypto.cryptoStore.doTxn("readwrite",["parked_shared_history"],(e=>this.crypto.cryptoStore.addParkedSharedHistory(t.roomId,n,e)),a.a.withPrefix("[addParkedSharedHistory]"))}async addRoomKey(e){try{await this.olmDevice.addInboundGroupSession(e.roomId,e.senderKey,e.forwardingKeyChain,e.sessionId,e.sessionKey,e.keysClaimed,e.exportFormat,e.extraSessionData),await this.retryDecryption(e.senderKey,e.sessionId,!e.extraSessionData.untrusted)&&this.crypto.cancelRoomKeyRequest({algorithm:e.algorithm,room_id:e.roomId,session_id:e.sessionId,sender_key:e.senderKey}),await this.crypto.backupManager.backupGroupSession(e.senderKey,e.sessionId)}catch(e){this.prefixedLogger.error(`Error handling m.room_key_event: ${e}`)}}async onForwardedRoomKey(e){const t=this.forwardedRoomKeyFromEvent(e);t&&(await this.shouldAcceptForwardedKey(e,t)?await this.addRoomKey(t):this.shouldParkForwardedKey(t)&&await this.parkForwardedKey(e,t))}async onRoomKeyEvent(e){if("m.forwarded_room_key"==e.getType())await this.onForwardedRoomKey(e);else{const t=this.roomKeyFromEvent(e);if(!t)return;await this.addRoomKey(t)}}async onRoomKeyWithheldEvent(e){const t=e.getContent(),n=t.sender_key;"m.no_olm"===t.code?await this.onNoOlmWithheldEvent(e):"m.unavailable"===t.code||await this.olmDevice.addInboundGroupSessionWithheld(t.room_id,n,t.session_id,t.code,t.reason),t.session_id?await this.retryDecryption(n,t.session_id):await this.retryDecryptionFromSender(n)}async onNoOlmWithheldEvent(e){const t=e.getContent(),n=t.sender_key,r=e.getSender();if(this.prefixedLogger.warn(`${r}:${n} was unable to establish an olm session with us`),await this.olmDevice.getSessionIdForDevice(n))return this.prefixedLogger.debug("New session already created. Not creating a new one."),void await this.olmDevice.recordSessionProblem(n,"no_olm",!0);let i=this.crypto.deviceList.getDeviceByIdentityKey(t.algorithm,n);if(!i&&(await this.crypto.downloadKeys([r],!1),i=this.crypto.deviceList.getDeviceByIdentityKey(t.algorithm,n),!i))return this.prefixedLogger.info("Couldn't find device for identity key "+n+": not establishing session"),void await this.olmDevice.recordSessionProblem(n,"no_olm",!1);await s.ensureOlmSessionsForDevices(this.olmDevice,this.baseApis,new Map([[r,[i]]]),!1);const a={algorithm:s.OLM_ALGORITHM,sender_key:this.olmDevice.deviceCurve25519Key,ciphertext:{},[u.k]:Object(o.v4)()};await s.encryptMessageForDevice(a.ciphertext,this.userId,void 0,this.olmDevice,r,i,{type:"m.dummy"}),await this.olmDevice.recordSessionProblem(n,"no_olm",!0),await this.baseApis.sendToDevice("m.room.encrypted",new Map([[r,new Map([[i.deviceId,a]])]]))}hasKeysForKeyRequest(e){const t=e.requestBody;return this.olmDevice.hasInboundSessionKeys(t.room_id,t.sender_key,t.session_id)}shareKeysWithDevice(e){const t=e.userId,n=e.deviceId,r=this.crypto.getStoredDevice(t,n),i=e.requestBody;this.olmlib.ensureOlmSessionsForDevices(this.olmDevice,this.baseApis,new Map([[t,[r]]])).then((e=>{var r;const o=null===(r=e.get(t))||void 0===r?void 0:r.get(n);return null!=o&&o.sessionId?(this.prefixedLogger.log("sharing keys for session "+i.sender_key+"|"+i.session_id+" with device "+t+":"+n),this.buildKeyForwardingMessage(i.room_id,i.sender_key,i.session_id)):null})).then((e=>{const i={algorithm:s.OLM_ALGORITHM,sender_key:this.olmDevice.deviceCurve25519Key,ciphertext:{},[u.k]:Object(o.v4)()};return this.olmlib.encryptMessageForDevice(i.ciphertext,this.userId,void 0,this.olmDevice,t,r,e).then((()=>this.baseApis.sendToDevice("m.room.encrypted",new Map([[t,new Map([[n,i]])]]))))}))}async buildKeyForwardingMessage(e,t,n){const r=await this.olmDevice.getInboundGroupSessionKey(e,t,n);return{type:"m.forwarded_room_key",content:{algorithm:s.MEGOLM_ALGORITHM,room_id:e,sender_key:t,sender_claimed_ed25519_key:r.sender_claimed_ed25519_key,session_id:n,session_key:r.key,chain_index:r.chain_index,forwarding_curve25519_key_chain:r.forwarding_curve25519_key_chain,"org.matrix.msc3061.shared_history":r.shared_history||!1}}}importRoomKey(e){let{untrusted:t,source:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r={};return(t||e.untrusted)&&(r.untrusted=!0),e["org.matrix.msc3061.shared_history"]&&(r.sharedHistory=!0),this.olmDevice.addInboundGroupSession(e.room_id,e.sender_key,e.forwarding_curve25519_key_chain,e.session_id,e.session_key,e.sender_claimed_keys,!0,r).then((()=>{"backup"!==n&&this.crypto.backupManager.backupGroupSession(e.sender_key,e.session_id).catch((e=>{this.prefixedLogger.log("Failed to back up megolm session",e)})),this.retryDecryption(e.sender_key,e.session_id,!r.untrusted)}))}async retryDecryption(e,t,n){var r;const i=this.pendingEvents.get(e);if(!i)return!0;const o=i.get(t);if(!o)return!0;const a=[...o];return this.prefixedLogger.debug("Retrying decryption on events:",a.map((e=>`${e.getId()}`))),await Promise.all(a.map((async e=>{try{await e.attemptDecryption(this.crypto,{isRetry:!0,forceRedecryptIfUntrusted:n})}catch(e){}}))),!(null!==(r=this.pendingEvents.get(e))&&void 0!==r&&r.has(t))}async retryDecryptionFromSender(e){const t=this.pendingEvents.get(e);return!t||(this.pendingEvents.delete(e),await Promise.all([...t].map((async e=>{let[t,n]=e;await Promise.all([...n].map((async e=>{try{await e.attemptDecryption(this.crypto)}catch(e){}})))}))),!this.pendingEvents.has(e))}async sendSharedHistoryInboundSessions(e){await s.ensureOlmSessionsForDevices(this.olmDevice,this.baseApis,e);const t=await this.olmDevice.getSharedHistoryInboundGroupSessions(this.roomId);this.prefixedLogger.log(`Sharing history in with users ${Array.from(e.keys())}`,t.map((e=>{let[t,n]=e;return`${t}|${n}`})));for(const[n,r]of t){const t=await this.buildKeyForwardingMessage(this.roomId,n,r),i=[],a=new Map;for(const[n,r]of e){const e=new Map;a.set(n,e);for(const a of r){const r={algorithm:s.OLM_ALGORITHM,sender_key:this.olmDevice.deviceCurve25519Key,ciphertext:{},[u.k]:Object(o.v4)()};e.set(a.deviceId,r),i.push(s.encryptMessageForDevice(r.ciphertext,this.userId,void 0,this.olmDevice,n,a,t))}}await Promise.all(i);for(const[e,t]of a){for(const[n,r]of t)f(r)||(this.prefixedLogger.log("No ciphertext for device "+e+":"+n+": pruning"),t.delete(n));0===t.size&&(this.prefixedLogger.log("Pruned all devices for user "+e),a.delete(e))}if(0===a.size)return void this.prefixedLogger.log("No users left to send to: aborting");await this.baseApis.sendToDevice("m.room.encrypted",a)}}}const y={no_olm:"The sender was unable to establish a secure channel.",unknown:"The secure channel with the sender was corrupted."};Object(l.g)(s.MEGOLM_ALGORITHM,b,v)},function(e,t,n){"use strict";n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return h}));var r=n(13),i=n.n(r),o=n(359),a=n(1),s=n(129),l=n(16);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}let d;!function(e){e[e.Unsent=0]="Unsent",e[e.Sent=1]="Sent",e[e.CancellationPending=2]="CancellationPending",e[e.CancellationPendingAndWillResend=3]="CancellationPendingAndWillResend"}(d||(d={}));class h{constructor(e,t,n){this.baseApis=e,this.deviceId=t,this.cryptoStore=n,i()(this,"sendOutgoingRoomKeyRequestsTimer",void 0),i()(this,"sendOutgoingRoomKeyRequestsRunning",!1),i()(this,"clientRunning",!0)}stop(){a.a.log("stopping OutgoingRoomKeyRequestManager"),this.clientRunning=!1}sendQueuedRequests(){this.startTimer()}async queueRoomKeyRequest(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=await this.cryptoStore.getOutgoingRoomKeyRequest(e);if(r)switch(r.state){case d.CancellationPendingAndWillResend:case d.Unsent:return;case d.CancellationPending:{const e=n?d.CancellationPendingAndWillResend:d.Sent;await this.cryptoStore.updateOutgoingRoomKeyRequest(r.requestId,d.CancellationPending,{state:e,cancellationTxnId:this.baseApis.makeTxnId()});break}case d.Sent:if(n){const i=d.CancellationPendingAndWillResend,o=await this.cryptoStore.updateOutgoingRoomKeyRequest(r.requestId,d.Sent,{state:i,cancellationTxnId:this.baseApis.makeTxnId(),requestTxnId:this.baseApis.makeTxnId()});if(!o)return this.queueRoomKeyRequest(e,t,n);try{await this.sendOutgoingRoomKeyRequestCancellation(o,!0)}catch(e){a.a.error("Error sending room key request cancellation; will retry later.",e)}}break;default:throw new Error("unhandled state: "+r.state)}else await this.cryptoStore.getOrAddOutgoingRoomKeyRequest({requestBody:e,recipients:t,requestId:this.baseApis.makeTxnId(),state:d.Unsent})}cancelRoomKeyRequest(e){return this.cryptoStore.getOutgoingRoomKeyRequest(e).then((t=>{if(t)switch(t.state){case d.CancellationPending:case d.CancellationPendingAndWillResend:return;case d.Unsent:return a.a.log("deleting unnecessary room key request for "+p(e)),this.cryptoStore.deleteOutgoingRoomKeyRequest(t.requestId,d.Unsent);case d.Sent:return this.cryptoStore.updateOutgoingRoomKeyRequest(t.requestId,d.Sent,{state:d.CancellationPending,cancellationTxnId:this.baseApis.makeTxnId()}).then((t=>{t?this.sendOutgoingRoomKeyRequestCancellation(t).catch((e=>{a.a.error("Error sending room key request cancellation; will retry later.",e),this.startTimer()})):a.a.log("Tried to cancel room key request for "+p(e)+" but it was already cancelled in another tab")}));default:throw new Error("unhandled state: "+t.state)}}))}getOutgoingSentRoomKeyRequest(e,t){return this.cryptoStore.getOutgoingRoomKeyRequestsByTarget(e,t,[d.Sent])}async cancelAndResendAllOutgoingRequests(){const e=await this.cryptoStore.getAllOutgoingRoomKeyRequestsByState(d.Sent);return Promise.all(e.map((e=>{let{requestBody:t,recipients:n}=e;return this.queueRoomKeyRequest(t,n,!0)})))}startTimer(){if(this.sendOutgoingRoomKeyRequestsTimer)return;this.sendOutgoingRoomKeyRequestsTimer=setTimeout((()=>{if(this.sendOutgoingRoomKeyRequestsRunning)throw new Error("RoomKeyRequestSend already in progress!");this.sendOutgoingRoomKeyRequestsRunning=!0,this.sendOutgoingRoomKeyRequests().finally((()=>{this.sendOutgoingRoomKeyRequestsRunning=!1})).catch((e=>{a.a.warn(`error in OutgoingRoomKeyRequestManager: ${e}`)}))}),500)}async sendOutgoingRoomKeyRequests(){if(!this.clientRunning)return void(this.sendOutgoingRoomKeyRequestsTimer=void 0);const e=await this.cryptoStore.getOutgoingRoomKeyRequestByState([d.CancellationPending,d.CancellationPendingAndWillResend,d.Unsent]);if(e)try{switch(e.state){case d.Unsent:await this.sendOutgoingRoomKeyRequest(e);break;case d.CancellationPending:await this.sendOutgoingRoomKeyRequestCancellation(e);break;case d.CancellationPendingAndWillResend:await this.sendOutgoingRoomKeyRequestCancellation(e,!0)}return this.sendOutgoingRoomKeyRequests()}catch(e){a.a.error("Error sending room key request; will retry later.",e),this.sendOutgoingRoomKeyRequestsTimer=void 0}else this.sendOutgoingRoomKeyRequestsTimer=void 0}sendOutgoingRoomKeyRequest(e){a.a.log(`Requesting keys for ${p(e.requestBody)} from ${m(e.recipients)}(id ${e.requestId})`);const t={action:"request",requesting_device_id:this.deviceId,request_id:e.requestId,body:e.requestBody};return this.sendMessageToDevices(t,e.recipients,e.requestTxnId||e.requestId).then((()=>this.cryptoStore.updateOutgoingRoomKeyRequest(e.requestId,d.Unsent,{state:d.Sent})))}sendOutgoingRoomKeyRequestCancellation(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];a.a.log(`Sending cancellation for key request for ${p(e.requestBody)} to ${m(e.recipients)} (cancellation id ${e.cancellationTxnId})`);const n={action:"request_cancellation",requesting_device_id:this.deviceId,request_id:e.requestId};return this.sendMessageToDevices(n,e.recipients,e.cancellationTxnId).then((()=>t?this.cryptoStore.updateOutgoingRoomKeyRequest(e.requestId,d.CancellationPendingAndWillResend,{state:d.Unsent}):this.cryptoStore.deleteOutgoingRoomKeyRequest(e.requestId,d.CancellationPending)))}sendMessageToDevices(e,t,n){const r=new l.b((()=>new Map));for(const n of t){r.getOrCreate(n.userId).set(n.deviceId,u(u({},e),{},{[s.k]:Object(o.v4)()}))}return this.baseApis.sendToDevice(s.b.RoomKeyRequest,r,n)}}function p(e){return e.room_id+" / "+e.session_id}function m(e){return`[${e.map((e=>`${e.userId}:${e.deviceId}`)).join(",")}]`}},function(e,t,n){"use strict";function r(e){return[1e3+(e[0]<<5|e[1]>>3),1e3+((7&e[1])<<10|e[2]<<2|e[3]>>6),1e3+((63&e[3])<<7|e[4]>>1)]}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";(function(e,r){n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return g}));var i=n(13),o=n.n(i),a=n(416),s=n.n(a),l=n(199),c=n(225),u=n(322),d=n(1),h=n(193);const p="org.matrix.msc2697.v1.olm.libolm_pickle",m=6048e5;class g{constructor(e){this.crypto=e,o()(this,"inProgress",!1),o()(this,"timeoutId",void 0),o()(this,"key",void 0),o()(this,"keyInfo",void 0),o()(this,"deviceDisplayName",void 0),this.getDehydrationKeyFromCache()}getDehydrationKeyFromCache(){return this.crypto.cryptoStore.doTxn("readonly",[c.a.STORE_ACCOUNT],(t=>{this.crypto.cryptoStore.getSecretStorePrivateKey(t,(async t=>{if(t){const{key:n,keyInfo:i,deviceDisplayName:o,time:a}=t,s=e.from(this.crypto.olmDevice.pickleKey),c=await Object(u.b)(n,s,p);this.key=Object(l.decodeBase64)(c),this.keyInfo=i,this.deviceDisplayName=o;const d=Date.now(),h=Math.max(1,a+m-d);this.timeoutId=r.setTimeout(this.dehydrateDevice.bind(this),h)}}),"dehydration")}))}async setKeyAndQueueDehydration(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;await this.setKey(e,t,n)||this.dehydrateDevice()}async setKey(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;if(!e)return this.timeoutId&&(r.clearTimeout(this.timeoutId),this.timeoutId=void 0),await this.crypto.cryptoStore.doTxn("readwrite",[c.a.STORE_ACCOUNT],(e=>{this.crypto.cryptoStore.storeSecretStorePrivateKey(e,"dehydration",null)})),this.key=void 0,void(this.keyInfo=void 0);let i=!!this.key&&e.length==this.key.length;for(let t=0;i&&t<e.length;t++)e[t]!=this.key[t]&&(i=!1);return i||(this.key=e,this.keyInfo=t,this.deviceDisplayName=n),i}async dehydrateDevice(){if(this.inProgress)d.a.log("Dehydration already in progress -- not starting new dehydration");else{this.inProgress=!0,this.timeoutId&&(r.clearTimeout(this.timeoutId),this.timeoutId=void 0);try{const t=e.from(this.crypto.olmDevice.pickleKey),n=await Object(u.c)(Object(l.encodeBase64)(this.key),t,p);await this.crypto.cryptoStore.doTxn("readwrite",[c.a.STORE_ACCOUNT],(e=>{this.crypto.cryptoStore.storeSecretStorePrivateKey(e,"dehydration",{keyInfo:this.keyInfo,key:n,deviceDisplayName:this.deviceDisplayName,time:Date.now()})})),d.a.log("Attempting to dehydrate device"),d.a.log("Creating account");const i=new r.Olm.Account;i.create();const o=JSON.parse(i.identity_keys()),a=i.max_number_of_one_time_keys();i.generate_one_time_keys(a/2),i.generate_fallback_key();const g=JSON.parse(i.one_time_keys()),f=JSON.parse(i.fallback_key());i.mark_keys_as_published();const _=i.pickle(new Uint8Array(this.key)),b={algorithm:p,account:_};this.keyInfo.passphrase&&(b.passphrase=this.keyInfo.passphrase),d.a.log("Uploading account to server");const v=(await this.crypto.baseApis.http.authedRequest(h.i.Put,"/dehydrated_device",void 0,{device_data:b,initial_device_display_name:this.deviceDisplayName},{prefix:"/_matrix/client/unstable/org.matrix.msc2697.v2"})).device_id;d.a.log("Preparing device keys",v);const y={algorithms:this.crypto.supportedAlgorithms,device_id:v,user_id:this.crypto.userId,keys:{[`ed25519:${v}`]:o.ed25519,[`curve25519:${v}`]:o.curve25519}},E=i.sign(s.a.stringify(y));y.signatures={[this.crypto.userId]:{[`ed25519:${v}`]:E}},this.crypto.crossSigningInfo.getId("self_signing")&&await this.crypto.crossSigningInfo.signObject(y,"self_signing"),d.a.log("Preparing one-time keys");const S={};for(const[e,t]of Object.entries(g.curve25519)){const n={key:t},r=i.sign(s.a.stringify(n));n.signatures={[this.crypto.userId]:{[`ed25519:${v}`]:r}},S[`signed_curve25519:${e}`]=n}d.a.log("Preparing fallback keys");const w={};for(const[e,t]of Object.entries(f.curve25519)){const n={key:t,fallback:!0},r=i.sign(s.a.stringify(n));n.signatures={[this.crypto.userId]:{[`ed25519:${v}`]:r}},w[`signed_curve25519:${e}`]=n}return d.a.log("Uploading keys to server"),await this.crypto.baseApis.http.authedRequest(h.i.Post,"/keys/upload/"+encodeURI(v),void 0,{device_keys:y,one_time_keys:S,"org.matrix.msc2732.fallback_keys":w}),d.a.log("Done dehydrating"),this.timeoutId=r.setTimeout(this.dehydrateDevice.bind(this),m),v}finally{this.inProgress=!1}}}stop(){this.timeoutId&&(r.clearTimeout(this.timeoutId),this.timeoutId=void 0)}}}).call(this,n(53).Buffer,n(14))},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return _}));var r=n(13),i=n.n(r),o=n(147),a=n(1),s=n(199),l=n(421),c=n(16),u=n(225),d=n(422),h=n(322),p=n(15),m=n(174),g=n(418),f=n(193);class _{constructor(e,t){this.baseApis=e,this.getKey=t,i()(this,"algorithm",void 0),i()(this,"backupInfo",void 0),i()(this,"checkedForBackup",void 0),i()(this,"sendingBackups",void 0),i()(this,"sessionLastCheckAttemptedTime",{}),this.checkedForBackup=!1,this.sendingBackups=!1}get version(){return this.backupInfo&&this.backupInfo.version}static checkBackupVersion(e){const t=E[e.algorithm];if(!t)throw new Error("Unknown backup algorithm: "+e.algorithm);if("object"!=typeof e.auth_data)throw new Error("Invalid backup data returned");return t.checkBackupVersion(e)}static makeAlgorithm(e,t){const n=E[e.algorithm];if(!n)throw new Error("Unknown backup algorithm");return n.init(e.auth_data,t)}async enableKeyBackup(e){this.backupInfo=e,this.algorithm&&this.algorithm.free(),this.algorithm=await _.makeAlgorithm(e,this.getKey),this.baseApis.emit(m.b.KeyBackupStatus,!0),this.scheduleKeyBackupSend()}disableKeyBackup(){this.algorithm&&this.algorithm.free(),this.algorithm=void 0,this.backupInfo=void 0,this.baseApis.emit(m.b.KeyBackupStatus,!1)}getKeyBackupEnabled(){return this.checkedForBackup?Boolean(this.algorithm):null}async prepareKeyBackupVersion(e,t){const n=t?E[t]:S;if(!n)throw new Error("Unknown backup algorithm");const[r,i]=await n.prepare(e),o=Object(d.b)(r);return{algorithm:n.algorithmName,auth_data:i,recovery_key:o,privateKey:r}}async createKeyBackupVersion(e){this.algorithm=await _.makeAlgorithm(e,this.getKey)}async checkAndStart(){if(a.a.log("Checking key backup status..."),this.baseApis.isGuest())return a.a.log("Skipping key backup check since user is guest"),this.checkedForBackup=!0,null;let e;try{var t;e=null!==(t=await this.baseApis.getKeyBackupVersion())&&void 0!==t?t:void 0}catch(e){return a.a.log("Error checking for active key backup",e),404===e.httpStatus&&(this.checkedForBackup=!0),null}this.checkedForBackup=!0;const n=await this.isKeyBackupTrusted(e);return n.usable&&!this.backupInfo?(a.a.log(`Found usable key backup v${e.version}: enabling key backups`),await this.enableKeyBackup(e)):!n.usable&&this.backupInfo?(a.a.log("No usable key backup: disabling key backup"),this.disableKeyBackup()):n.usable||this.backupInfo?n.usable&&this.backupInfo&&(e.version!==this.backupInfo.version?(a.a.log(`On backup version ${this.backupInfo.version} but found version ${e.version}: switching.`),this.disableKeyBackup(),await this.enableKeyBackup(e),await this.scheduleAllGroupSessionsForBackup()):a.a.log(`Backup version ${e.version} still current`)):a.a.log("No usable key backup: not enabling key backup"),{backupInfo:e,trustInfo:n}}async checkKeyBackup(){return this.checkedForBackup=!1,this.checkAndStart()}async queryKeyBackupRateLimited(e,t){if(!this.backupInfo)return;const n=(new Date).getTime();(!this.sessionLastCheckAttemptedTime[t]||n-this.sessionLastCheckAttemptedTime[t]>5e3)&&(this.sessionLastCheckAttemptedTime[t]=n,await this.baseApis.restoreKeyBackupWithCache(e,t,this.backupInfo,{}))}async isKeyBackupTrusted(e){const t={usable:!1,trusted_locally:!1,sigs:[]};if(!(e&&e.algorithm&&e.auth_data&&e.auth_data.signatures))return a.a.info("Key backup is absent or missing required data"),t;const n=this.baseApis.getUserId(),r=await this.baseApis.crypto.getSessionBackupPrivateKey();if(r){let n=null;try{n=await _.makeAlgorithm(e,(async()=>r)),await n.keyMatches(r)&&(a.a.info("Backup is trusted locally"),t.trusted_locally=!0)}catch{}finally{var i;null===(i=n)||void 0===i||i.free()}}const o=e.auth_data.signatures[n]||{};for(const r of Object.keys(o)){const i=r.split(":");if("ed25519"!==i[0]){a.a.log("Ignoring unknown signature type: "+i[0]);continue}const o={deviceId:i[1]},l=this.baseApis.crypto.crossSigningInfo.getId();if(l===o.deviceId){o.crossSigningId=!0;try{await Object(s.verifySignature)(this.baseApis.crypto.olmDevice,e.auth_data,n,o.deviceId,l),o.valid=!0}catch(e){a.a.warn("Bad signature from cross signing key "+l,e),o.valid=!1}t.sigs.push(o);continue}const c=this.baseApis.crypto.deviceList.getStoredDevice(n,o.deviceId);if(c){o.device=c,o.deviceTrust=this.baseApis.checkDeviceTrust(n,o.deviceId);try{await Object(s.verifySignature)(this.baseApis.crypto.olmDevice,e.auth_data,n,c.deviceId,c.getFingerprint()),o.valid=!0}catch(t){a.a.info("Bad signature from key ID "+r+" userID "+this.baseApis.getUserId()+" device ID "+c.deviceId+" fingerprint: "+c.getFingerprint(),e.auth_data,t),o.valid=!1}}else o.valid=null,a.a.info("Ignoring signature from unknown key "+r);t.sigs.push(o)}return t.usable=t.sigs.some((e=>{var t;return e.valid&&(e.device&&(null===(t=e.deviceTrust)||void 0===t?void 0:t.isVerified())||e.crossSigningId)})),t}async scheduleKeyBackupSend(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e4;if(!this.sendingBackups){this.sendingBackups=!0;try{const t=Math.random()*e;await Object(c.N)(t);let n=0;for(;;){if(!this.algorithm)return;try{if(0===await this.backupPendingKeys(200))return;n=0}catch(e){if(n++,a.a.log("Key backup request failed",e),e.data&&("M_NOT_FOUND"==e.data.errcode||"M_WRONG_ROOM_KEYS_VERSION"==e.data.errcode))throw await this.checkKeyBackup(),this.baseApis.crypto.emit(m.b.KeyBackupFailed,e.data.errcode),e}n&&await Object(c.N)(1e3*Math.pow(2,Math.min(n-1,4)))}}finally{this.sendingBackups=!1}}}async backupPendingKeys(e){const t=await this.baseApis.crypto.cryptoStore.getSessionsNeedingBackup(e);if(!t.length)return 0;let n=await this.baseApis.crypto.cryptoStore.countSessionsNeedingBackup();this.baseApis.crypto.emit(m.b.KeyBackupSessionsRemaining,n);const r={};for(const e of t){var i;const t=e.sessionData.room_id;Object(c.L)(r,t,r[t]||{sessions:{}});const n=this.baseApis.crypto.olmDevice.exportInboundGroupSession(e.senderKey,e.sessionId,e.sessionData);n.algorithm=s.MEGOLM_ALGORITHM;const o=(n.forwarding_curve25519_key_chain||[]).length,a=this.baseApis.crypto.deviceList.getUserByIdentityKey(s.MEGOLM_ALGORITHM,e.senderKey),l=null!==(i=this.baseApis.crypto.deviceList.getDeviceByIdentityKey(s.MEGOLM_ALGORITHM,e.senderKey))&&void 0!==i?i:void 0,u=this.baseApis.crypto.checkDeviceInfoTrust(a,l).isVerified();Object(c.L)(r[t].sessions,e.sessionId,{first_message_index:n.first_known_index,forwarded_count:o,is_verified:u,session_data:await this.algorithm.encryptSession(n)})}return await this.baseApis.sendKeyBackup(void 0,void 0,this.backupInfo.version,{rooms:r}),await this.baseApis.crypto.cryptoStore.unmarkSessionsNeedingBackup(t),n=await this.baseApis.crypto.cryptoStore.countSessionsNeedingBackup(),this.baseApis.crypto.emit(m.b.KeyBackupSessionsRemaining,n),t.length}async backupGroupSession(e,t){await this.baseApis.crypto.cryptoStore.markSessionsNeedingBackup([{senderKey:e,sessionId:t}]),this.backupInfo&&this.scheduleKeyBackupSend()}async scheduleAllGroupSessionsForBackup(){await this.flagAllGroupSessionsForBackup(),this.scheduleKeyBackupSend(0)}async flagAllGroupSessionsForBackup(){await this.baseApis.crypto.cryptoStore.doTxn("readwrite",[u.a.STORE_INBOUND_GROUP_SESSIONS,u.a.STORE_BACKUP],(e=>{this.baseApis.crypto.cryptoStore.getAllEndToEndInboundGroupSessions(e,(t=>{null!==t&&this.baseApis.crypto.cryptoStore.markSessionsNeedingBackup([t],e)}))}));const e=await this.baseApis.crypto.cryptoStore.countSessionsNeedingBackup();return this.baseApis.emit(m.b.KeyBackupSessionsRemaining,e),e}countSessionsNeedingBackup(){return this.baseApis.crypto.cryptoStore.countSessionsNeedingBackup()}}class b{constructor(e,t,n){this.authData=e,this.publicKey=t,this.getKey=n}static async init(t,n){if(!t||!("public_key"in t))throw new Error("auth_data missing required information");const r=new e.Olm.PkEncryption;return r.set_recipient_key(t.public_key),new b(t,r,n)}static async prepare(t){const n=new e.Olm.PkDecryption;try{const r={};if(t)if(t instanceof Uint8Array)r.public_key=n.init_with_private_key(t);else{const e=await Object(l.c)(t);r.private_key_salt=e.salt,r.private_key_iterations=e.iterations,r.public_key=n.init_with_private_key(e.key)}else r.public_key=n.generate_key();return(new e.Olm.PkEncryption).set_recipient_key(r.public_key),[n.get_private_key(),r]}finally{n.free()}}static checkBackupVersion(e){if(!("public_key"in e.auth_data))throw new Error("Invalid backup data returned")}get untrusted(){return!0}async encryptSession(e){const t=Object.assign({},e);return delete t.session_id,delete t.room_id,delete t.first_known_index,this.publicKey.encrypt(JSON.stringify(t))}async decryptSessions(t){const n=await this.getKey(),r=new e.Olm.PkDecryption;try{if(r.init_with_private_key(n)!==this.authData.public_key)throw new f.f({errcode:o.d.RESTORE_BACKUP_ERROR_BAD_KEY});const e=[];for(const[n,i]of Object.entries(t))try{const t=JSON.parse(r.decrypt(i.session_data.ephemeral,i.session_data.mac,i.session_data.ciphertext));t.session_id=n,e.push(t)}catch(e){a.a.log("Failed to decrypt megolm session from backup",e,i)}return e}finally{r.free()}}async keyMatches(t){const n=new e.Olm.PkDecryption;let r;try{r=n.init_with_private_key(t)}finally{n.free()}return r===this.authData.public_key}free(){this.publicKey.free()}}i()(b,"algorithmName","m.megolm_backup.v1.curve25519-aes-sha2");const v=new p.c("m.megolm_backup.v1.aes-hmac-sha2","org.matrix.msc3270.v1.aes-hmac-sha2");class y{constructor(e,t){this.authData=e,this.key=t}static async init(e,t){if(!e)throw new Error("auth_data missing");const n=await t();if(e.mac){const{mac:t}=await Object(h.a)(n,e.iv);if(e.mac.replace(/=+$/g,"")!==t.replace(/=+/g,""))throw new Error("Key does not match")}return new y(e,n)}static async prepare(e){let t;const n={};if(e)if(e instanceof Uint8Array)t=new Uint8Array(e);else{const r=await Object(l.c)(e);n.private_key_salt=r.salt,n.private_key_iterations=r.iterations,t=r.key}else t=function(e){const t=new Uint8Array(e);return g.b.getRandomValues(t),t}(32);const{iv:r,mac:i}=await Object(h.a)(t);return n.iv=r,n.mac=i,[t,n]}static checkBackupVersion(e){if(!("iv"in e.auth_data)||!("mac"in e.auth_data))throw new Error("Invalid backup data returned")}get untrusted(){return!1}encryptSession(e){const t=Object.assign({},e);return delete t.session_id,delete t.room_id,delete t.first_known_index,Object(h.c)(JSON.stringify(t),this.key,e.session_id)}async decryptSessions(e){const t=[];for(const[n,r]of Object.entries(e))try{const e=JSON.parse(await Object(h.b)(r.session_data,this.key,n));e.session_id=n,t.push(e)}catch(e){a.a.log("Failed to decrypt megolm session from backup",e,r)}return t}async keyMatches(e){if(this.authData.mac){const{mac:t}=await Object(h.a)(e,this.authData.iv);return this.authData.mac.replace(/=+$/g,"")===t.replace(/=+/g,"")}return!0}free(){this.key.fill(0)}}i()(y,"algorithmName",v.name);const E={[b.algorithmName]:b,[y.algorithmName]:y},S=b}).call(this,n(14))},function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var r=n(13),i=n.n(r),o=n(140),a=n(1),s=n(16),l=n(179),c=n(147),u=n(215),d=n(193),h=n(513),p=n(129),m=n(151),g=n(184);class f{constructor(e){this.crypto=e}name(){return"e2ee"}when(){return h.a.PreProcess}onRequest(e){if(e)return{enabled:!0}}async onResponse(e){if(e.device_lists&&await this.crypto.handleDeviceListChanges({oldSyncToken:"yep"},e.device_lists),e.device_one_time_keys_count){const t=e.device_one_time_keys_count.signed_curve25519||0;this.crypto.updateOneTimeKeyCount(t)}if(e.device_unused_fallback_key_types||e["org.matrix.msc2732.device_unused_fallback_key_types"]){const t=e.device_unused_fallback_key_types||e["org.matrix.msc2732.device_unused_fallback_key_types"];this.crypto.setNeedsNewFallback(Array.isArray(t)&&!t.includes("signed_curve25519"))}this.crypto.onSyncCompleted({})}}class _{constructor(e,t){this.client=e,this.cryptoCallbacks=t,i()(this,"nextBatch",null)}name(){return"to_device"}when(){return h.a.PreProcess}onRequest(e){const t={since:null!==this.nextBatch?this.nextBatch:void 0};return e&&(t.limit=100,t.enabled=!0),t}async onResponse(e){const t=[];let n=e.events||[];n.length>0&&this.cryptoCallbacks&&(n=await this.cryptoCallbacks.preprocessToDeviceMessages(n)),n.map(this.client.getEventMapper()).map((e=>{if("m.key.verification.cancel"===e.getType()){const n=e.getContent().transaction_id;n&&t.push(n)}return e})).forEach((e=>{const n=e.getContent();if("m.room.message"!=e.getType()||"m.bad.encrypted"!=n.msgtype){if("m.key.verification.start"===e.getType()||"m.key.verification.request"===e.getType()){const r=n.transaction_id;t.includes(r)&&e.flagCancelled()}this.client.emit(c.b.ToDeviceEvent,e)}else a.a.log("Ignoring undecryptable to-device event from "+e.getSender())})),this.nextBatch=e.next_batch}}class b{constructor(e){this.client=e}name(){return"account_data"}when(){return h.a.PostProcess}onRequest(e){if(e)return{enabled:!0}}onResponse(e){e.global&&e.global.length>0&&this.processGlobalAccountData(e.global);for(const t in e.rooms){const n=S(this.client,t,e.rooms[t]),r=this.client.getRoom(t);r?(r.addAccountData(n),n.forEach((e=>{this.client.emit(c.b.Event,e)}))):a.a.warn("got account data for room but room doesn't exist on client:",t)}}processGlobalAccountData(e){const t=S(this.client,void 0,e),n=t.reduce(((e,t)=>(e[t.getType()]=this.client.store.getAccountData(t.getType()),e)),{});this.client.store.storeAccountDataEvents(t),t.forEach((e=>{if(e.getType()===p.b.PushRules){const t=e.getContent();this.client.setPushRules(t)}const t=n[e.getType()];return this.client.emit(c.b.AccountData,e,t),e}))}}class v{constructor(e){this.client=e}name(){return"typing"}when(){return h.a.PostProcess}onRequest(e){if(e)return{enabled:!0}}onResponse(e){if(null!=e&&e.rooms)for(const t in e.rooms)w(this.client,t,[e.rooms[t]])}}class y{constructor(e){this.client=e}name(){return"receipts"}when(){return h.a.PostProcess}onRequest(e){if(e)return{enabled:!0}}onResponse(e){if(null!=e&&e.rooms)for(const t in e.rooms)w(this.client,t,[e.rooms[t]])}}class E{constructor(e,t,n,r){this.slidingSync=e,this.client=t,i()(this,"opts",void 0),i()(this,"syncOpts",void 0),i()(this,"syncState",null),i()(this,"syncStateData",void 0),i()(this,"lastPos",null),i()(this,"failCount",0),i()(this,"notifEvents",[]),this.opts=Object(u.d)(n),this.syncOpts=Object(u.e)(r),t.getNotifTimelineSet()&&t.reEmitter.reEmit(t.getNotifTimelineSet(),[o.d.Timeline,o.d.TimelineReset]),this.slidingSync.on(h.f.Lifecycle,this.onLifecycle.bind(this)),this.slidingSync.on(h.f.RoomData,this.onRoomData.bind(this));const a=[new _(this.client,this.syncOpts.cryptoCallbacks),new b(this.client),new v(this.client),new y(this.client)];this.syncOpts.crypto&&a.push(new f(this.syncOpts.crypto)),a.forEach((e=>{this.slidingSync.registerExtension(e)}))}onRoomData(e,t){let n=this.client.store.getRoom(e);if(!n){if(!t.initial)return void a.a.debug("initial flag not set but no stored room exists for room ",e,t);n=Object(u.c)(this.client,e,this.opts)}this.processRoomData(this.client,n,t)}onLifecycle(e,t,n){switch(n&&a.a.debug("onLifecycle",e,n),e){case h.g.Complete:if(this.purgeNotifications(),!t)break;this.lastPos||this.updateSyncState(u.b.Prepared,{oldSyncToken:void 0,nextSyncToken:t.pos,catchingUp:!1,fromCache:!1}),this.updateSyncState(u.b.Syncing,{oldSyncToken:this.lastPos,nextSyncToken:t.pos,catchingUp:!1,fromCache:!1}),this.lastPos=t.pos;break;case h.g.RequestFinished:if(n){if(this.failCount+=1,this.updateSyncState(this.failCount>3?u.b.Error:u.b.Reconnecting,{error:new d.f(n)}),this.shouldAbortSync(new d.f(n)))return}else this.failCount=0}}async syncLeftRooms(){return[]}async peek(e){return null}stopPeeking(){}getSyncState(){return this.syncState}getSyncStateData(){var e;return null!==(e=this.syncStateData)&&void 0!==e?e:null}createRoom(e){const{timelineSupport:t}=this.client,n=new o.c(e,this.client,this.client.getUserId(),{lazyLoadMembers:this.opts.lazyLoadMembers,pendingEventOrdering:this.opts.pendingEventOrdering,timelineSupport:t});return this.client.reEmitter.reEmit(n,[o.d.Name,o.d.Redaction,o.d.RedactionCancelled,o.d.Receipt,o.d.Tags,o.d.LocalEchoUpdated,o.d.AccountData,o.d.MyMembership,o.d.Timeline,o.d.TimelineReset]),this.registerStateListeners(n),n}registerStateListeners(e){this.client.reEmitter.reEmit(e.currentState,[m.b.Events,m.b.Members,m.b.NewMember,m.b.Update]),e.currentState.on(m.b.NewMember,((e,t,n)=>{var r;n.user=null!==(r=this.client.getUser(n.userId))&&void 0!==r?r:void 0,this.client.reEmitter.reEmit(n,[g.b.Name,g.b.Typing,g.b.PowerLevel,g.b.Membership])}))}shouldAbortSync(e){return"M_UNKNOWN_TOKEN"===e.errcode&&(a.a.warn("Token no longer valid - assuming logout"),this.stop(),this.updateSyncState(u.b.Error,{error:e}),!0)}async processRoomData(e,t,n){n=function(e,t,n){if(!n.name)return n;for(const e of n.required_state)if(e.type===p.b.RoomName&&""===e.state_key)return e.content={name:n.name},n;return n.required_state.push({event_id:"$fake-sliding-sync-name-event-"+t,state_key:"",type:p.b.RoomName,content:{name:n.name},sender:e.getUserId(),origin_server_ts:(new Date).getTime()}),n}(e,t.roomId,n);const r=S(this.client,t.roomId,n.required_state);let i=S(this.client,t.roomId,n.timeline,!1);const a=[];if(n.initial){const e=new Set;t.getLiveTimeline().getEvents().forEach((t=>{e.add(t.getId())}));const r=[],o=[];let a=!1;for(let t=i.length-1;t>=0;t--){const n=i[t];e.has(n.getId())?a=!0:a?r.push(n):o.unshift(n)}i=o,r.length>0&&t.addEventsToTimeline(r,!0,t.getLiveTimeline(),n.prev_batch)}const u=this.client.isRoomEncrypted(t.roomId);if(null!=n.notification_count&&t.setUnreadNotificationCount(o.b.Total,n.notification_count),null!=n.highlight_count&&(!u||u&&t.getUnreadNotificationCount(o.b.Highlight)<=0)&&t.setUnreadNotificationCount(o.b.Highlight,n.highlight_count),Number.isInteger(n.invited_count)&&t.currentState.setInvitedMemberCount(n.invited_count),Number.isInteger(n.joined_count)&&t.currentState.setJoinedMemberCount(n.joined_count),n.invite_state){const e=S(this.client,t.roomId,n.invite_state);return this.injectRoomEvents(t,e),n.initial&&(t.recalculate(),this.client.store.storeRoom(t),this.client.emit(c.b.Room,t)),e.forEach((e=>{this.client.emit(c.b.Event,e)})),void t.updateMyMembership("invite")}var d;n.initial&&t.getLiveTimeline().setPaginationToken(null!==(d=n.prev_batch)&&void 0!==d?d:null,l.b.BACKWARDS);this.injectRoomEvents(t,r,i,n.num_live),t.addEphemeralEvents(a),t.updateMyMembership("join"),t.recalculate(),n.initial&&(e.store.storeRoom(t),e.emit(c.b.Room,t)),this.addNotifications(i);const h=async n=>{e.emit(c.b.Event,n),n.isState()&&n.getType()==p.b.RoomEncryption&&this.syncOpts.cryptoCallbacks&&await this.syncOpts.cryptoCallbacks.onCryptoEvent(t,n)};await s.D(r,h),await s.D(i,h),a.forEach((function(t){e.emit(c.b.Event,t)})),t.decryptCriticalEvents()}injectRoomEvents(e,t,n,r){n=n||[],t=t||[],r=r||0;const i=e.getLiveTimeline(),o=0==i.getEvents().length;if(o){for(const e of t)this.client.getPushActionsForEvent(e);i.initialiseState(t)}o||(e.oldState.setStateEvents(t),e.currentState.setStateEvents(t));let a=[];r>0&&(a=n.slice(-1*r),n=n.slice(0,-1*a.length)),e.addLiveEvents(n,{fromCache:!0}),a.length>0&&e.addLiveEvents(a,{fromCache:!1}),e.recalculate(),this.resolveInvites(e)}resolveInvites(e){if(!e||!this.opts.resolveInvitesToProfiles)return;const t=this.client;e.getMembersWithMembership("invite").forEach((function(n){if(n.requestedProfileInfo)return;n.requestedProfileInfo=!0;const r=t.getUser(n.userId);let i;i=r?Promise.resolve({avatar_url:r.avatarUrl,displayname:r.displayName}):t.getProfileInfo(n.userId),i.then((function(t){const r=n.events.member;"invite"===r.getContent().membership&&(r.getContent().avatar_url=t.avatar_url,r.getContent().displayname=t.displayname,n.setMembershipEvent(r,e.currentState))}),(function(e){}))}))}retryImmediately(){return!0}async sync(){for(a.a.debug("Sliding sync init loop");!this.client.isGuest();)try{a.a.debug("Getting push rules...");const e=await this.client.getPushRules();a.a.debug("Got push rules"),this.client.pushRules=e;break}catch(e){if(a.a.error("Getting push rules failed",e),this.shouldAbortSync(e))return}await this.slidingSync.start()}stop(){a.a.debug("SyncApi.stop"),this.slidingSync.stop()}updateSyncState(e,t){const n=this.syncState;this.syncState=e,this.syncStateData=t,this.client.emit(c.b.Sync,this.syncState,n,t)}addNotifications(e){if(this.client.getNotifTimelineSet())for(const t of e){const e=this.client.getPushActionsForEvent(t);e&&e.notify&&e.tweaks&&e.tweaks.highlight&&this.notifEvents.push(t)}}purgeNotifications(){this.notifEvents.sort((function(e,t){return e.getTs()-t.getTs()})),this.notifEvents.forEach((e=>{var t;null===(t=this.client.getNotifTimelineSet())||void 0===t||t.addLiveEvent(e)})),this.notifEvents=[]}}function S(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const i=e.getEventMapper({decrypt:r});return n.map((function(e){return e.room_id=t,i(e)}))}function w(e,t,n){const r=S(e,t,n),i=e.getRoom(t);i?(i.addEphemeralEvents(r),r.forEach((t=>{e.emit(c.b.Event,t)}))):a.a.warn("got ephemeral events for room but room doesn't exist on client:",t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r="matrix-js-sdk"},function(e,t,n){},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(13),i=n.n(r);class o{get action(){return"NOT_USED"}constructor(e){i()(this,"fn",void 0),this.fn=e}}},function(e,t,n){"use strict";n.d(t,"c",(function(){return c})),n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return h}));var r=n(205),i=n(121),o=n(157),a=n(125),s=n(142);const l=()=>{var e;const t=a.b.getValue("MessageComposerInput.ctrlEnterToSend"),n={[s.h.SendMessage]:{default:{key:r.b.ENTER,ctrlOrCmdKey:t},displayName:Object(i.c)("Send message")},[s.h.NewLine]:{default:{key:r.b.ENTER,shiftKey:!t},displayName:Object(i.c)("New line")},[s.h.CompleteAutocomplete]:{default:{key:r.b.ENTER},displayName:Object(i.c)("Complete")},[s.h.ForceCompleteAutocomplete]:{default:{key:r.b.TAB},displayName:Object(i.c)("Force complete")},[s.h.SearchInRoom]:{default:{ctrlOrCmdKey:!0,key:r.b.F},displayName:Object(i.c)("Search (must be enabled)")}};return null!==(e=o.a.get())&&void 0!==e&&e.overrideBrowserShortcuts()&&(n[s.h.SwitchToSpaceByNumber]={default:{ctrlOrCmdKey:!0,key:s.e},displayName:Object(i.c)("Switch to space by number")}),n},c=()=>{var e;const t=null===(e=o.a.get())||void 0===e?void 0:e.overrideBrowserShortcuts();return Object.keys(s.f).filter((e=>{var n,i;return(null===(n=s.f[e])||void 0===n||null===(i=n.controller)||void 0===i||!i.settingDisabled)&&(!(s.i.includes(e)&&!r.a)&&!(s.d.includes(e)&&!t))})).reduce(((e,t)=>(e[t]=s.f[t],e)),{})},u=()=>[...Object.entries(l()),...Object.entries(c())].reduce(((e,t)=>{let[n,r]=t;return e[n]=r,e}),{}),d=e=>{var t;return null===(t=u()[e])||void 0===t?void 0:t.default},h=e=>{var t;const n=null===(t=u()[e])||void 0===t?void 0:t.displayName;return n&&Object(i.a)(n)}},function(e,t,n){"use strict";var r=n(240),i=n(171);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(130)),a=i(n(13)),s=i(n(31)),l=i(n(998)),c=r(n(120)),u=(n(216),r(n(254))),d=n(1004),h=n(681),p=n(519);function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var g=[],f=c.forwardRef((function(e,t){var n,r=c.useState(),i=(0,l.default)(r,2),f=i[0],_=i[1],b=c.useRef(),v=c.useRef(!1),y=c.useRef(null),E=e.children,S=e.disabled,w=e.noFocusGuards,T=e.persistentFocus,C=e.crossFrame,x=e.autoFocus,F=(e.allowTextSelection,e.group),D=e.className,k=e.whiteList,O=e.hasPositiveIndices,I=e.shards,A=void 0===I?g:I,R=e.as,N=void 0===R?"div":R,M=e.lockProps,P=void 0===M?{}:M,L=e.sideCar,B=e.returnFocus,U=e.focusOptions,j=e.onActivation,G=e.onDeactivation,z=c.useState({}),H=(0,l.default)(z,1)[0],q=c.useCallback((function(){y.current=y.current||document&&document.activeElement,b.current&&j&&j(b.current),v.current=!0}),[j]),V=c.useCallback((function(){v.current=!1,G&&G(b.current)}),[G]);(0,c.useEffect)((function(){S||(y.current=null)}),[]);var $=c.useCallback((function(e){var t=y.current;if(t&&t.focus){var n="function"==typeof B?B(t):B;if(n){var r="object"===(0,s.default)(n)?n:void 0;y.current=null,e?Promise.resolve().then((function(){return t.focus(r)})):t.focus(r)}}}),[B]),K=c.useCallback((function(e){v.current&&p.mediumFocus.useMedium(e)}),[]),W=p.mediumBlur.useMedium,Y=c.useCallback((function(e){b.current!==e&&(b.current=e,_(e))}),[]);var Q=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}((n={},(0,a.default)(n,u.FOCUS_DISABLED,S&&"disabled"),(0,a.default)(n,u.FOCUS_GROUP,F),n),P),X=!0!==w,Z=X&&"tail"!==w,J=(0,d.useMergeRefs)([t,Y]);return c.createElement(c.Fragment,null,X&&[c.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:S?-1:0,style:h.hiddenGuard}),O?c.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:S?-1:1,style:h.hiddenGuard}):null],!S&&c.createElement(L,{id:H,sideCar:p.mediumSidecar,observed:f,disabled:S,persistentFocus:T,crossFrame:C,autoFocus:x,whiteList:k,shards:A,onActivation:q,onDeactivation:V,returnFocus:$,focusOptions:U}),c.createElement(N,(0,o.default)({ref:J},Q,{className:D,onBlur:W,onFocus:K}),E),Z&&c.createElement("div",{"data-focus-guard":!0,tabIndex:S?-1:0,style:h.hiddenGuard}))}));f.propTypes={},f.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};var _=f;t.default=_},function(e,t,n){var r=n(680);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";var r=n(171),i=n(240);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.hiddenGuard=void 0;var o=i(n(120)),a=(r(n(216)),{width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"});t.hiddenGuard=a;var s=function(e){var t=e.children;return o.createElement(o.Fragment,null,o.createElement("div",{key:"guard-first","data-focus-guard":!0,"data-focus-auto-guard":!0,style:a}),t,t&&o.createElement("div",{key:"guard-last","data-focus-guard":!0,"data-focus-auto-guard":!0,style:a}))};s.propTypes={},s.defaultProps={children:null};var l=s;t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useSidecar=void 0;var r=n(120),i=n(1012),o=new WeakMap,a={};t.useSidecar=function(e,t){var n=t&&t.options||a;return i.env.isNode&&!n.ssr?[null,null]:function(e,t){var n=t&&t.options||a,s=i.env.forceCache||i.env.isNode&&!!n.ssr||!n.async,l=(0,r.useState)(s?function(){return o.get(e)}:void 0),c=l[0],u=l[1],d=(0,r.useState)(null),h=d[0],p=d[1];return(0,r.useEffect)((function(){c||e().then((function(n){var r,i=t?t.read():n.default||n;if(!i)throw console.error("Sidecar error: with importer",e),t?(console.error("Sidecar error: with medium",t),r=new Error("Sidecar medium was not found")):r=new Error("Sidecar was not found in exports"),p((function(){return r})),r;o.set(e,i),u((function(){return i}))}),(function(e){return p((function(){return e}))}))}),[]),[c,h]}(e,t)}},function(e,t,n){var r=n(684);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t,r)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFocusMerge=void 0;var r=n(1031),i=n(272),o=n(428),a=n(273),s=n(1032),l=n(429),c=n(323),u=n(688);t.getFocusMerge=function(e,t){var n=(0,l.getActiveElement)((0,a.asArray)(e).length>0?document:(0,a.getFirst)(e).ownerDocument),d=(0,o.getAllAffectedNodes)(e).filter(c.isNotAGuard),h=(0,u.getTopCommonParent)(n||e,e,d),p=new Map,m=(0,i.getAllTabbableNodes)(d,p),g=(0,i.getTabbableNodes)(d,p).filter((function(e){var t=e.node;return(0,c.isNotAGuard)(t)}));if(g[0]||(g=m)[0]){var f,_,b,v=(0,i.getAllTabbableNodes)([h],p).map((function(e){return e.node})),y=(f=v,_=g,b=new Map,_.forEach((function(e){return b.set(e.node,e)})),f.map((function(e){return b.get(e)})).filter(c.isDefined)),E=y.map((function(e){return e.node})),S=(0,r.newFocus)(E,v,n,t);if(S===r.NEW_FOCUS){var w=(0,s.pickAutofocus)(m,E,(0,u.allParentAutofocusables)(d,p));return w?{node:w}:void console.warn("focus-lock: cannot find any node to move focus into")}return void 0===S?S:y[S]}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.correctNodes=t.correctNode=void 0;var r=n(323);t.correctNode=function(e,t){return(0,r.isRadioElement)(e)&&e.name?function(e,t){return t.filter(r.isRadioElement).filter((function(t){return t.name===e.name})).filter((function(e){return e.checked}))[0]||e}(e,t):e};t.correctNodes=function(e){var n=new Set;return e.forEach((function(r){return n.add((0,t.correctNode)(r,e))})),e.filter((function(e){return n.has(e)}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pickFocusable=t.pickFirstFocus=void 0;var r=n(686);t.pickFirstFocus=function(e){return e[0]&&e.length>1?(0,r.correctNode)(e[0],e):e[0]};t.pickFocusable=function(e,t){return e.length>1?e.indexOf((0,r.correctNode)(e[t],e)):t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.allParentAutofocusables=t.getTopCommonParent=t.getCommonParent=void 0;var r=n(272),i=n(272),o=n(273),a=function(e,t){return void 0===t&&(t=[]),t.push(e),e.parentNode&&a(e.parentNode.host||e.parentNode,t),t};t.getCommonParent=function(e,t){for(var n=a(e),r=a(t),i=0;i<n.length;i+=1){var o=n[i];if(r.indexOf(o)>=0)return o}return!1};t.getTopCommonParent=function(e,n,r){var a=(0,o.asArray)(e),s=(0,o.asArray)(n),l=a[0],c=!1;return s.filter(Boolean).forEach((function(e){c=(0,t.getCommonParent)(c||e,e)||c,r.filter(Boolean).forEach((function(e){var n=(0,t.getCommonParent)(l,e);n&&(c=!c||(0,i.contains)(n,c)?n:(0,t.getCommonParent)(n,c))}))})),c};t.allParentAutofocusables=function(e,t){return e.reduce((function(e,n){return e.concat((0,r.parentAutofocusables)(n,t))}),[])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setFocus=t.focusOn=void 0;var r=n(685);t.focusOn=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()};var i=0,o=!1;t.setFocus=function(e,n,a){void 0===a&&(a={});var s=(0,r.getFocusMerge)(e,n);if(!o&&s){if(i>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),o=!0,void setTimeout((function(){o=!1}),1);i++,(0,t.focusOn)(s.node,a.focusOptions),i--}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return l}));var r=n(149),i=n(120),o=n.n(i),a=n(522);let s;function l(e){let{children:t}=e;const[n,l]=Object(i.useReducer)(((e,t)=>{switch(t.type){case s.Add:return[t.value,...e];case s.Remove:return e.length&&Object(r.isEqual)(e[0],t.value)?e.slice(1):e}}),[]);return o.a.createElement(a.a.Provider,{value:{state:n,dispatch:l}},t)}!function(e){e[e.Add=0]="Add",e[e.Remove=1]="Remove"}(s||(s={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(13),i=n.n(r),o=n(209);class a extends o.a{static set matrixClient(e){const t=a._matrixClient;a._matrixClient=e;for(const n of a.instances)n.initMatrixClient(t,e)}constructor(){super(),a.instances.push(this)}get client(){return a._matrixClient}}i()(a,"_matrixClient",void 0),i()(a,"instances",[])},function(e,t,n){"use strict";n.d(t,"c",(function(){return l})),n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return d}));var r=n(1),i=n(320),o=n(231),a=n(209),s=n(122);function l(){const e=new i.a(s.a.get()).getPushRuleById(".m.rule.master");return e?e.enabled&&!e.actions.includes(o.d.Notify):(r.a.warn("No master push rule! Notifications are disabled for this user."),!0)}function c(){let e=n(274);return e.default&&(e=e.default),e}class u extends a.a{getValueOverride(e,t,n,r){return!!c().isPossible()&&(null===n||"default"===r?!l():n)}onChange(e,t,n){c().supportsDesktopNotifications()&&c().setEnabled(n)}}class d extends a.a{getValueOverride(e,t,n){return!!c().isPossible()&&(null===n?!l():n)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r,i,o=n(120);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}function s(e){return o.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 65.631 67.981",role:"presentation","aria-hidden":!0},e),r||(r=o.createElement("defs",null,o.createElement("filter",{x:-.059,y:-.079,width:1.118,height:1.158,filterUnits:"objectBoundingBox",id:"icon-email-pill-avatar_svg__a"},o.createElement("feOffset",{dy:2,in:"SourceAlpha",result:"shadowOffsetOuter1"}),o.createElement("feGaussianBlur",{stdDeviation:16,in:"shadowOffsetOuter1",result:"shadowBlurOuter1"}),o.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0.473684211 0 0 0 0 1 0 0 0 0.241258741 0",in:"shadowBlurOuter1",result:"shadowMatrixOuter1"}),o.createElement("feMerge",null,o.createElement("feMergeNode",{in:"shadowMatrixOuter1"}),o.createElement("feMergeNode",{in:"SourceGraphic"}))))),i||(i=o.createElement("g",{filter:"url(#icon-email-pill-avatar_svg__a)",transform:"translate(-1493.716 -795.144) scale(3.40907)",fill:"none",fillRule:"evenodd",stroke:"#368bd6",strokeLinecap:"round",strokeLinejoin:"round"},o.createElement("g",{transform:"translate(441.5 237.5)"},o.createElement("circle",{r:2.286,cy:5.714,cx:6.286}),o.createElement("path",{d:"M8.571 3.429v2.857a1.714 1.714 0 103.429 0v-.572a5.714 5.714 0 10-2.24 4.537"})))))}t.b="img/icon-email-pill-avatar.5b816b4.svg"},function(e,t,n){"use strict";n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return c}));var r=n(149),i=n(16),o=n(164);const a=(e,t)=>(n,r)=>{var o,a,s,l,c,u,d,h,p,m,g,f;const _=(null!==(o=null===(a=e[n.userId])||void 0===a?void 0:a.score)&&void 0!==o?o:0)+(null!==(s=null===(l=t[n.userId])||void 0===l?void 0:l.score)&&void 0!==s?s:0),b=null!==(c=null===(u=t[n.userId])||void 0===u?void 0:u.numRooms)&&void 0!==c?c:0,v=(null!==(d=null===(h=e[r.userId])||void 0===h?void 0:h.score)&&void 0!==d?d:0)+(null!==(p=null===(m=t[r.userId])||void 0===m?void 0:m.score)&&void 0!==p?p:0),y=null!==(g=null===(f=t[r.userId])||void 0===f?void 0:f.numRooms)&&void 0!==g?g:0;return _===v?b===y?Object(i.h)(n.userId,r.userId):y-b:v-_};function s(e){return e.getRooms().filter((e=>"join"===e.getMyMembership())).filter((e=>!o.a.shared().getUserIdForRoomId(e.roomId))).filter((e=>!Object.keys(e.tags).includes("m.lowpriority")))}function l(e){const t=(new Date).getTime(),n=t-36e5,i=s(e).flatMap((e=>Object(r.takeRight)(e.getLiveTimeline().getEvents(),50))).filter((e=>e.getTs()>n)),o=Object(r.groupBy)(i,(e=>e.getSender()));return Object(r.mapValues)(o,(e=>{if(!e.length)return;const i=Object(r.maxBy)(e,(e=>e.getTs())),o=Math.abs(t-i.getTs()),a=t-n-o;return{lastSpoke:i.getTs(),score:Math.max(1,a/9e5)}}))}function c(e){const t=s(e).filter((e=>e.getJoinedMemberCount()<200)).flatMap((e=>e.getJoinedMembers().map((t=>({member:t,roomSize:e.getJoinedMemberCount()}))))),n=Object(r.groupBy)(t,(e=>{let{member:t}=e;return t.userId}));return Object(r.mapValues)(n,(e=>{if(!e.length)return;const t=200*e.length,n=Object(r.sumBy)(e,(e=>e.roomSize));return{member:Object(r.minBy)(e,(e=>e.roomSize)).member,numRooms:e.length,score:Math.max(0,Math.pow(1-n/t,5))}}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(121);const i=15e3,o=75e3,a=45,s=75,l=23,c=26;function u(e){let t=Date.now()-e;const n=Math.abs(Math.ceil(t/6e4)),u=Math.ceil(n/60),d=Math.ceil(u/24);return t>=0?t<=i?Object(r.a)("a few seconds ago"):t<=o?Object(r.a)("about a minute ago"):n<=a?Object(r.a)("%(num)s minutes ago",{num:n}):n<=s?Object(r.a)("about an hour ago"):u<=l?Object(r.a)("%(num)s hours ago",{num:u}):u<=c?Object(r.a)("about a day ago"):Object(r.a)("%(num)s days ago",{num:d}):(t=Math.abs(t),t<=i?Object(r.a)("a few seconds from now"):t<=o?Object(r.a)("about a minute from now"):n<=a?Object(r.a)("%(num)s minutes from now",{num:n}):n<=s?Object(r.a)("about an hour from now"):u<=l?Object(r.a)("%(num)s hours from now",{num:u}):u<=c?Object(r.a)("about a day from now"):Object(r.a)("%(num)s days from now",{num:d}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(16);function i(e,t){const n=t.getUserId();for(const t of Object.keys(e.getContent()))for(const[i,o]of Object.entries(e.getContent()[t]))if(Object(r.w)(i)&&Object.keys(o||{}).includes(n))return!0;return!1}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r="filter_changed"},function(e,t,n){var r;e.exports=function(){function e(t,n,i){function o(s,l){if(!n[s]){if(!t[s]){if(!l&&"function"==typeof r&&r)return r(s,!0);if(a)return a(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[s]={exports:{}};t[s][0].call(u.exports,(function(e){return o(t[s][1][e]||e)}),u,u.exports,e,t,n,i)}return n[s].exports}for(var a="function"==typeof r&&r,s=0;s<i.length;s++)o(i[s]);return o}return e}()({1:[function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){e.done?n(e.value):i(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return l([e,t])}}function l(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}};function o(e){return r(this,void 0,void 0,(function(){var t,n,r,o,a;return i(this,(function(i){switch(i.label){case 0:return t=new Uint8Array(16),window.crypto.getRandomValues(t.subarray(0,8)),[4,window.crypto.subtle.generateKey({name:"AES-CTR",length:256},!0,["encrypt","decrypt"])];case 1:return n=i.sent(),[4,window.crypto.subtle.exportKey("jwk",n)];case 2:return r=i.sent(),[4,window.crypto.subtle.encrypt({name:"AES-CTR",counter:t,length:64},n,e)];case 3:return o=i.sent(),[4,window.crypto.subtle.digest("SHA-256",o)];case 4:return a=i.sent(),[2,{data:o,info:{v:"v2",key:r,iv:s(t),hashes:{sha256:s(new Uint8Array(a))}}}]}}))}))}function a(e,t){return r(this,void 0,void 0,(function(){var n,r,o,a,c;return i(this,(function(i){switch(i.label){case 0:if(void 0===t||void 0===t.key||void 0===t.iv||void 0===t.hashes||void 0===t.hashes.sha256)throw new Error("Invalid info. Missing info.key, info.iv or info.hashes.sha256 key");if(t.v&&!t.v.match(/^v[1-2]$/))throw new Error("Unsupported protocol version: "+t.v);return n=l(t.iv),r=t.hashes.sha256,[4,window.crypto.subtle.importKey("jwk",t.key,{name:"AES-CTR"},!1,["encrypt","decrypt"])];case 1:return o=i.sent(),[4,window.crypto.subtle.digest("SHA-256",e)];case 2:if(a=i.sent(),s(new Uint8Array(a))!=r)throw new Error("Mismatched SHA-256 digest");return c="v1"==t.v||"v2"==t.v?64:128,[2,window.crypto.subtle.decrypt({name:"AES-CTR",counter:n,length:c},o,e)]}}))}))}function s(e){var t=String.fromCharCode.apply(null,e),n=window.btoa(t),r=e.length,i=4*Math.floor((r+2)/3)+(r+2)%3-2;return n.slice(0,i)}function l(e){for(var t=e+"===".slice(0,(4-e.length%4)%4),n=window.atob(t),r=new Uint8Array(n.length),i=0;i<n.length;i++)r[i]=n.charCodeAt(i);return r}Object.defineProperty(n,"__esModule",{value:!0}),n.decodeBase64=n.encodeBase64=n.decryptAttachment=n.encryptAttachment=void 0,n.encryptAttachment=o,n.decryptAttachment=a,n.encodeBase64=s,n.decodeBase64=l,n.default={encryptAttachment:o,decryptAttachment:a,encodeBase64:s,decodeBase64:l}},{}]},{},[1])(1)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const r=["image/jpeg","image/gif","image/png","image/apng","image/webp","image/avif","video/mp4","video/webm","video/ogg","video/quicktime","audio/mp4","audio/webm","audio/aac","audio/mpeg","audio/ogg","audio/wave","audio/wav","audio/x-wav","audio/x-pn-wav","audio/flac","audio/x-flac"];function i(e){return r.includes(e)?e:"application/octet-stream"}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.root=t.parseHTML=t.merge=t.contains=t.text=t.xml=t.html=t.load=void 0,o(n(1052),t);var l=n(1053),c=n(714),u=n(1082),d=s(n(704)),h=n(720),p=(0,c.getParse)((function(e,t,n,r){return t.xmlMode||t._useHtmlParser2?(0,h.parseDocument)(e,t):(0,u.parseWithParse5)(e,t,n,r)}));t.load=(0,l.getLoad)(p,(function(e,t){return t.xmlMode||t._useHtmlParser2?(0,d.default)(e,t):(0,u.renderWithParse5)(e)})),t.default=(0,t.load)([]);var m=n(326);Object.defineProperty(t,"html",{enumerable:!0,get:function(){return m.html}}),Object.defineProperty(t,"xml",{enumerable:!0,get:function(){return m.xml}}),Object.defineProperty(t,"text",{enumerable:!0,get:function(){return m.text}});var g=a(n(326));t.contains=g.contains,t.merge=g.merge,t.parseHTML=g.parseHTML,t.root=g.root},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.flatten=void 0;t.default={xml:!1,decodeEntities:!0};var i={_useHtmlParser2:!0,xmlMode:!0};t.flatten=function(e){return(null==e?void 0:e.xml)?"boolean"==typeof e.xml?i:r(r({},i),e.xml):null!=e?e:void 0}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.innerText=t.textContent=t.getText=t.getInnerHTML=t.getOuterHTML=void 0;var i=n(210),o=r(n(704)),a=n(371);function s(e,t){return(0,o.default)(e,t)}t.getOuterHTML=s,t.getInnerHTML=function(e,t){return(0,i.hasChildren)(e)?e.children.map((function(e){return s(e,t)})).join(""):""},t.getText=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.isTag)(t)?"br"===t.name?"\n":e(t.children):(0,i.isCDATA)(t)?e(t.children):(0,i.isText)(t)?t.data:""},t.textContent=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.hasChildren)(t)&&!(0,i.isComment)(t)?e(t.children):(0,i.isText)(t)?t.data:""},t.innerText=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.hasChildren)(t)&&(t.type===a.ElementType.Tag||(0,i.isCDATA)(t))?e(t.children):(0,i.isText)(t)?t.data:""}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.CDATA=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var a=n(371),s=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),S(this,e)},e}();t.Node=s;var l=function(e){function t(t){var n=e.call(this)||this;return n.data=t,n}return i(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(s);t.DataNode=l;var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Text,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(l);t.Text=c;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Comment,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(l);t.Comment=u;var d=function(e){function t(t,n){var r=e.call(this,n)||this;return r.name=t,r.type=a.ElementType.Directive,r}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(l);t.ProcessingInstruction=d;var h=function(e){function t(t){var n=e.call(this)||this;return n.children=t,n}return i(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?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}(s);t.NodeWithChildren=h;var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.CDATA,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(h);t.CDATA=p;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Root,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(h);t.Document=m;var g=function(e){function t(t,n,r,i){void 0===r&&(r=[]),void 0===i&&(i="script"===t?a.ElementType.Script:"style"===t?a.ElementType.Style:a.ElementType.Tag);var o=e.call(this,r)||this;return o.name=t,o.attribs=n,o.type=i,o}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),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}(h);function f(e){return(0,a.isTag)(e)}function _(e){return e.type===a.ElementType.CDATA}function b(e){return e.type===a.ElementType.Text}function v(e){return e.type===a.ElementType.Comment}function y(e){return e.type===a.ElementType.Directive}function E(e){return e.type===a.ElementType.Root}function S(e,t){var n;if(void 0===t&&(t=!1),b(e))n=new c(e.data);else if(v(e))n=new u(e.data);else if(f(e)){var r=t?w(e.children):[],i=new g(e.name,o({},e.attribs),r);r.forEach((function(e){return e.parent=i})),null!=e.namespace&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]=o({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]=o({},e["x-attribsPrefix"])),n=i}else if(_(e)){r=t?w(e.children):[];var a=new p(r);r.forEach((function(e){return e.parent=a})),n=a}else if(E(e)){r=t?w(e.children):[];var s=new m(r);r.forEach((function(e){return e.parent=s})),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),n=s}else{if(!y(e))throw new Error("Not implemented yet: ".concat(e.type));var l=new d(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),n=l}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function w(e){for(var t=e.map((function(e){return S(e,!0)})),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}t.Element=g,t.isTag=f,t.isCDATA=_,t.isText=b,t.isComment=v,t.isDirective=y,t.isDocument=E,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=S},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)},i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.render=void 0;var s=a(n(371)),l=n(1054),c=n(1058),u=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function d(e){return e.replace(/"/g,""")}var h=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function p(e,t){void 0===t&&(t={});for(var n=("length"in e?e:[e]),r="",i=0;i<n.length;i++)r+=m(n[i],t);return r}function m(e,t){switch(e.type){case s.Root:return p(e.children,t);case s.Doctype:case s.Directive:return"<".concat(e.data,">");case s.Comment:return function(e){return"\x3c!--".concat(e.data,"--\x3e")}(e);case s.CDATA:return function(e){return"<![CDATA[".concat(e.children[0].data,"]]>")}(e);case s.Script:case s.Style:case s.Tag:return function(e,t){var n;"foreign"===t.xmlMode&&(e.name=null!==(n=c.elementNames.get(e.name))&&void 0!==n?n:e.name,e.parent&&g.has(e.parent.name)&&(t=r(r({},t),{xmlMode:!1})));!t.xmlMode&&f.has(e.name)&&(t=r(r({},t),{xmlMode:"foreign"}));var i="<".concat(e.name),o=function(e,t){var n;if(e){var r=!1===(null!==(n=t.encodeEntities)&&void 0!==n?n:t.decodeEntities)?d:t.xmlMode||"utf8"!==t.encodeEntities?l.encodeXML:l.escapeAttribute;return Object.keys(e).map((function(n){var i,o,a=null!==(i=e[n])&&void 0!==i?i:"";return"foreign"===t.xmlMode&&(n=null!==(o=c.attributeNames.get(n))&&void 0!==o?o:n),t.emptyAttrs||t.xmlMode||""!==a?"".concat(n,'="').concat(r(a),'"'):n})).join(" ")}}(e.attribs,t);o&&(i+=" ".concat(o));0===e.children.length&&(t.xmlMode?!1!==t.selfClosingTags:t.selfClosingTags&&h.has(e.name))?(t.xmlMode||(i+=" "),i+="/>"):(i+=">",e.children.length>0&&(i+=p(e.children,t)),!t.xmlMode&&h.has(e.name)||(i+="</".concat(e.name,">")));return i}(e,t);case s.Text:return function(e,t){var n,r=e.data||"";!1===(null!==(n=t.encodeEntities)&&void 0!==n?n:t.decodeEntities)||!t.xmlMode&&e.parent&&u.has(e.parent.name)||(r=t.xmlMode||"utf8"!==t.encodeEntities?(0,l.encodeXML)(r):(0,l.escapeText)(r));return r}(e,t)}}t.render=p,t.default=p;var g=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),f=new Set(["svg","math"])},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXML=t.decodeHTMLStrict=t.decodeHTML=t.determineBranch=t.BinTrieFlags=t.fromCodePoint=t.replaceCodePoint=t.decodeCodePoint=t.xmlDecodeTree=t.htmlDecodeTree=void 0;var i=r(n(1055));t.htmlDecodeTree=i.default;var o=r(n(1056));t.xmlDecodeTree=o.default;var a=r(n(706));t.decodeCodePoint=a.default;var s,l,c=n(706);function u(e){return function(t,n){for(var r="",i=0,o=0;(o=t.indexOf("&",o))>=0;)if(r+=t.slice(i,o),i=o,o+=1,t.charCodeAt(o)!==s.NUM){for(var c=0,u=1,h=0,p=e[h];o<t.length&&!((h=d(e,p,h+1,t.charCodeAt(o)))<0);o++,u++){var m=(p=e[h])&l.VALUE_LENGTH;if(m){var g;if(n&&t.charCodeAt(o)!==s.SEMI||(c=h,u=0),0===(g=(m>>14)-1))break;h+=g}}if(0!==c)r+=1===(g=(e[c]&l.VALUE_LENGTH)>>14)?String.fromCharCode(e[c]&~l.VALUE_LENGTH):2===g?String.fromCharCode(e[c+1]):String.fromCharCode(e[c+1],e[c+2]),i=o-u+1}else{var f=o+1,_=10,b=t.charCodeAt(f);(b|s.To_LOWER_BIT)===s.LOWER_X&&(_=16,o+=1,f+=1);do{b=t.charCodeAt(++o)}while(b>=s.ZERO&&b<=s.NINE||16===_&&(b|s.To_LOWER_BIT)>=s.LOWER_A&&(b|s.To_LOWER_BIT)<=s.LOWER_F);if(f!==o){var v=t.substring(f,o),y=parseInt(v,_);if(t.charCodeAt(o)===s.SEMI)o+=1;else if(n)continue;r+=(0,a.default)(y),i=o}}return r+t.slice(i)}}function d(e,t,n,r){var i=(t&l.BRANCH_LENGTH)>>7,o=t&l.JUMP_TABLE;if(0===i)return 0!==o&&r===o?n:-1;if(o){var a=r-o;return a<0||a>=i?-1:e[n+a]-1}for(var s=n,c=s+i-1;s<=c;){var u=s+c>>>1,d=e[u];if(d<r)s=u+1;else{if(!(d>r))return e[u+i];c=u-1}}return-1}Object.defineProperty(t,"replaceCodePoint",{enumerable:!0,get:function(){return c.replaceCodePoint}}),Object.defineProperty(t,"fromCodePoint",{enumerable:!0,get:function(){return c.fromCodePoint}}),function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.To_LOWER_BIT=32]="To_LOWER_BIT"}(s||(s={})),function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(l=t.BinTrieFlags||(t.BinTrieFlags={})),t.determineBranch=d;var h=u(i.default),p=u(o.default);t.decodeHTML=function(e){return h(e,!1)},t.decodeHTMLStrict=function(e){return h(e,!0)},t.decodeXML=function(e){return p(e,!0)}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.replaceCodePoint=t.fromCodePoint=void 0;var i=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function o(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=i.get(e))&&void 0!==t?t:e}t.fromCodePoint=null!==(r=String.fromCodePoint)&&void 0!==r?r:function(e){var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e)},t.replaceCodePoint=o,t.default=function(e){return(0,t.fromCodePoint)(o(e))}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.encodeNonAsciiHTML=t.encodeHTML=void 0;var i=r(n(1057)),o=n(529),a=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function s(e,t){for(var n,r="",a=0;null!==(n=e.exec(t));){var s=n.index;r+=t.substring(a,s);var l=t.charCodeAt(s),c=i.default.get(l);if("object"==typeof c){if(s+1<t.length){var u=t.charCodeAt(s+1),d="number"==typeof c.n?c.n===u?c.o:void 0:c.n.get(u);if(void 0!==d){r+=d,a=e.lastIndex+=1;continue}}c=c.v}if(void 0!==c)r+=c,a=s+1;else{var h=(0,o.getCodePoint)(t,s);r+="&#x".concat(h.toString(16),";"),a=e.lastIndex+=Number(h!==l)}}return r+t.substr(a)}t.encodeHTML=function(e){return s(a,e)},t.encodeNonAsciiHTML=function(e){return s(o.xmlReplacer,e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findAll=t.existsOne=t.findOne=t.findOneChild=t.find=t.filter=void 0;var r=n(210);function i(e,t,n,o){for(var a=[],s=0,l=t;s<l.length;s++){var c=l[s];if(e(c)&&(a.push(c),--o<=0))break;if(n&&(0,r.hasChildren)(c)&&c.children.length>0){var u=i(e,c.children,n,o);if(a.push.apply(a,u),(o-=u.length)<=0)break}}return a}t.filter=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=1/0),Array.isArray(t)||(t=[t]),i(e,t,n,r)},t.find=i,t.findOneChild=function(e,t){return t.find(e)},t.findOne=function e(t,n,i){void 0===i&&(i=!0);for(var o=null,a=0;a<n.length&&!o;a++){var s=n[a];(0,r.isTag)(s)&&(t(s)?o=s:i&&s.children.length>0&&(o=e(t,s.children,!0)))}return o},t.existsOne=function e(t,n){return n.some((function(n){return(0,r.isTag)(n)&&(t(n)||n.children.length>0&&e(t,n.children))}))},t.findAll=function(e,t){for(var n,i,o=[],a=t.filter(r.isTag);i=a.shift();){var s=null===(n=i.children)||void 0===n?void 0:n.filter(r.isTag);s&&s.length>0&&a.unshift.apply(a,s),e(i)&&o.push(i)}return o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getElementsByTagType=t.getElementsByTagName=t.getElementById=t.getElements=t.testElement=void 0;var r=n(210),i=n(708),o={tag_name:function(e){return"function"==typeof e?function(t){return(0,r.isTag)(t)&&e(t.name)}:"*"===e?r.isTag:function(t){return(0,r.isTag)(t)&&t.name===e}},tag_type:function(e){return"function"==typeof e?function(t){return e(t.type)}:function(t){return t.type===e}},tag_contains:function(e){return"function"==typeof e?function(t){return(0,r.isText)(t)&&e(t.data)}:function(t){return(0,r.isText)(t)&&t.data===e}}};function a(e,t){return"function"==typeof t?function(n){return(0,r.isTag)(n)&&t(n.attribs[e])}:function(n){return(0,r.isTag)(n)&&n.attribs[e]===t}}function s(e,t){return function(n){return e(n)||t(n)}}function l(e){var t=Object.keys(e).map((function(t){var n=e[t];return Object.prototype.hasOwnProperty.call(o,t)?o[t](n):a(t,n)}));return 0===t.length?null:t.reduce(s)}t.testElement=function(e,t){var n=l(e);return!n||n(t)},t.getElements=function(e,t,n,r){void 0===r&&(r=1/0);var o=l(e);return o?(0,i.filter)(o,t,n,r):[]},t.getElementById=function(e,t,n){return void 0===n&&(n=!0),Array.isArray(t)||(t=[t]),(0,i.findOne)(a("id",e),t,n)},t.getElementsByTagName=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=1/0),(0,i.filter)(o.tag_name(e),t,n,r)},t.getElementsByTagType=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=1/0),(0,i.filter)(o.tag_type(e),t,n,r)}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.aliases=t.pseudos=t.filters=t.is=t.selectOne=t.selectAll=t.prepareContext=t._compileToken=t._compileUnsafe=t.compile=void 0;var s=o(n(257)),l=a(n(295)),c=n(1069),u=n(531),d=function(e,t){return e===t},h={adapter:s,equals:d};function p(e){var t,n,r,i,o=null!=e?e:h;return null!==(t=o.adapter)&&void 0!==t||(o.adapter=s),null!==(n=o.equals)&&void 0!==n||(o.equals=null!==(i=null===(r=o.adapter)||void 0===r?void 0:r.equals)&&void 0!==i?i:d),o}function m(e){return function(t,n,r){var i=p(n);return e(t,i,r)}}function g(e){return function(t,n,r){var i=p(r);"function"!=typeof t&&(t=(0,c.compileUnsafe)(t,i,n));var o=f(n,i.adapter,t.shouldTestNextSiblings);return e(t,o,i)}}function f(e,t,n){return void 0===n&&(n=!1),n&&(e=function(e,t){for(var n=Array.isArray(e)?e.slice(0):[e],r=n.length,i=0;i<r;i++){var o=(0,u.getNextSiblings)(n[i],t);n.push.apply(n,o)}return n}(e,t)),Array.isArray(e)?t.removeSubsets(e):t.getChildren(e)}t.compile=m(c.compile),t._compileUnsafe=m(c.compileUnsafe),t._compileToken=m(c.compileToken),t.prepareContext=f,t.selectAll=g((function(e,t,n){return e!==l.default.falseFunc&&t&&0!==t.length?n.adapter.findAll(e,t):[]})),t.selectOne=g((function(e,t,n){return e!==l.default.falseFunc&&t&&0!==t.length?n.adapter.findOne(e,t):null})),t.is=function(e,t,n){var r=p(n);return("function"==typeof t?t:(0,c.compile)(t,r))(e)},t.default=t.selectAll;var _=n(712);Object.defineProperty(t,"filters",{enumerable:!0,get:function(){return _.filters}}),Object.defineProperty(t,"pseudos",{enumerable:!0,get:function(){return _.pseudos}}),Object.defineProperty(t,"aliases",{enumerable:!0,get:function(){return _.aliases}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isTraversal=void 0;var r=n(372),i=new Map([[r.SelectorType.Universal,50],[r.SelectorType.Tag,30],[r.SelectorType.Attribute,1],[r.SelectorType.Pseudo,0]]);t.isTraversal=function(e){return!i.has(e.type)};var o=new Map([[r.AttributeAction.Exists,10],[r.AttributeAction.Equals,8],[r.AttributeAction.Not,7],[r.AttributeAction.Start,6],[r.AttributeAction.End,6],[r.AttributeAction.Any,5]]);function a(e){var t,n,s=null!==(t=i.get(e.type))&&void 0!==t?t:-1;return e.type===r.SelectorType.Attribute?(s=null!==(n=o.get(e.action))&&void 0!==n?n:4,e.action===r.AttributeAction.Equals&&"id"===e.name&&(s=9),e.ignoreCase&&(s>>=1)):e.type===r.SelectorType.Pseudo&&(e.data?"has"===e.name||"contains"===e.name?s=0:Array.isArray(e.data)?(s=Math.min.apply(Math,e.data.map((function(e){return Math.min.apply(Math,e.map(a))}))))<0&&(s=0):s=2:s=3),s}t.default=function(e){for(var t=e.map(a),n=1;n<e.length;n++){var r=t[n];if(!(r<0))for(var i=n-1;i>=0&&r<t[i];i--){var o=e[i+1];e[i+1]=e[i],e[i]=o,t[i+1]=t[i],t[i]=r}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compilePseudoSelector=t.aliases=t.pseudos=t.filters=void 0;var r=n(372),i=n(1072);Object.defineProperty(t,"filters",{enumerable:!0,get:function(){return i.filters}});var o=n(1076);Object.defineProperty(t,"pseudos",{enumerable:!0,get:function(){return o.pseudos}});var a=n(1077);Object.defineProperty(t,"aliases",{enumerable:!0,get:function(){return a.aliases}});var s=n(531);t.compilePseudoSelector=function(e,t,n,l,c){var u,d=t.name,h=t.data;if(Array.isArray(h)){if(!(d in s.subselects))throw new Error("Unknown pseudo-class :".concat(d,"(").concat(h,")"));return s.subselects[d](e,h,n,l,c)}var p=null===(u=n.pseudos)||void 0===u?void 0:u[d],m="string"==typeof p?p:a.aliases[d];if("string"==typeof m){if(null!=h)throw new Error("Pseudo ".concat(d," doesn't have any arguments"));var g=(0,r.parse)(m);return s.subselects.is(e,g,n,l,c)}if("function"==typeof p)return(0,o.verifyPseudoArgs)(p,d,h,1),function(t){return p(t,h)&&e(t)};if(d in i.filters)return i.filters[d](e,h,n,l);if(d in o.pseudos){var f=o.pseudos[d];return(0,o.verifyPseudoArgs)(f,d,h,2),function(t){return f(t,n,h)&&e(t)}}throw new Error("Unknown pseudo-class :".concat(d))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLimit=t.isFilter=t.filterNames=void 0,t.filterNames=new Set(["first","last","eq","gt","nth","lt","even","odd"]),t.isFilter=function e(n){return"pseudo"===n.type&&(!!t.filterNames.has(n.name)||!("not"!==n.name||!Array.isArray(n.data))&&n.data.some((function(t){return t.some(e)})))},t.getLimit=function(e,t,n){var r=null!=t?parseInt(t,10):NaN;switch(e){case"first":return 1;case"nth":case"eq":return isFinite(r)?r>=0?r+1:1/0:0;case"lt":return isFinite(r)?r>=0?Math.min(r,n):1/0:0;case"gt":return isFinite(r)?1/0:0;case"odd":return 2*n;case"even":return 2*n-1;case"last":case"not":return 1/0}}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.update=t.getParse=void 0;var r=n(257),i=n(210);function o(e,t){var n=Array.isArray(e)?e:[e];t?t.children=n:t=null;for(var i=0;i<n.length;i++){var o=n[i];o.parent&&o.parent.children!==n&&(0,r.removeElement)(o),t?(o.prev=n[i-1]||null,o.next=n[i+1]||null):o.prev=o.next=null,o.parent=t}return t}t.getParse=function(t){return function(n,r,a,s){if(void 0!==e&&e.isBuffer(n)&&(n=n.toString()),"string"==typeof n)return t(n,r,a,s);var l=n;if(!Array.isArray(l)&&(0,i.isDocument)(l))return l;var c=new i.Document([]);return o(l,c),c}},t.update=o}).call(this,n(53).Buffer)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseFragment=t.parse=t.TokenizerMode=t.Tokenizer=t.Token=t.html=t.foreignContent=t.ErrorCodes=t.serializeOuter=t.serialize=t.Parser=t.defaultTreeAdapter=void 0;const r=n(716);var i=n(534);Object.defineProperty(t,"defaultTreeAdapter",{enumerable:!0,get:function(){return i.defaultTreeAdapter}});var o=n(716);Object.defineProperty(t,"Parser",{enumerable:!0,get:function(){return o.Parser}});var a=n(1090);Object.defineProperty(t,"serialize",{enumerable:!0,get:function(){return a.serialize}}),Object.defineProperty(t,"serializeOuter",{enumerable:!0,get:function(){return a.serializeOuter}});var s=n(437);Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return s.ERR}}),t.foreignContent=n(719),t.html=n(275),t.Token=n(533);var l=n(717);Object.defineProperty(t,"Tokenizer",{enumerable:!0,get:function(){return l.Tokenizer}}),Object.defineProperty(t,"TokenizerMode",{enumerable:!0,get:function(){return l.TokenizerMode}}),t.parse=function(e,t){return r.Parser.parse(e,t)},t.parseFragment=function(e,t,n){"string"==typeof e&&(n=t,t=e,e=null);const i=r.Parser.getFragmentParser(e,n);return i.tokenizer.write(t,!0),i.getFragment()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;const r=n(717),i=n(1087),o=n(1088),a=n(534),s=n(1089),l=n(719),c=n(437),u=n(532),d=n(275),h=n(533),p="hidden",m=8,g=3;var f;!function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"}(f||(f={}));const _={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},b=new Set([d.TAG_ID.TABLE,d.TAG_ID.TBODY,d.TAG_ID.TFOOT,d.TAG_ID.THEAD,d.TAG_ID.TR]),v={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:a.defaultTreeAdapter,onParseError:null};function y(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):V(e,t),n}function E(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(r<0?0:r),e.activeFormattingElements.removeEntry(t)),n}function S(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let o=0,a=i;a!==n;o++,a=i){i=e.openElements.getCommonAncestor(a);const n=e.activeFormattingElements.getElementEntry(a),s=n&&o>=g;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(a)):(a=w(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function w(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function T(e,t,n){const r=e.treeAdapter.getTagName(t),i=(0,d.getTagID)(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const r=e.treeAdapter.getNamespaceURI(t);i===d.TAG_ID.TEMPLATE&&r===d.NS.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function C(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,o=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,o),e.treeAdapter.appendChild(t,o),e.activeFormattingElements.insertElementAfterBookmark(o,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,o,i.tagID)}function x(e,t){for(let n=0;n<m;n++){const n=y(e,t);if(!n)break;const r=E(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;const i=S(e,r,n.element),o=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),o&&T(e,o,i),C(e,r,n)}}function F(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function D(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){const n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function k(e,t){e._err(t,c.ERR.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,d.DOCUMENT_MODE.QUIRKS),e.insertionMode=f.BEFORE_HTML,e._processToken(t)}function O(e,t){e._insertFakeRootElement(),e.insertionMode=f.BEFORE_HEAD,e._processToken(t)}function I(e,t){e._insertFakeElement(d.TAG_NAMES.HEAD,d.TAG_ID.HEAD),e.headElement=e.openElements.current,e.insertionMode=f.IN_HEAD,e._processToken(t)}function A(e,t){switch(t.tagID){case d.TAG_ID.HTML:q(e,t);break;case d.TAG_ID.BASE:case d.TAG_ID.BASEFONT:case d.TAG_ID.BGSOUND:case d.TAG_ID.LINK:case d.TAG_ID.META:e._appendElement(t,d.NS.HTML),t.ackSelfClosing=!0;break;case d.TAG_ID.TITLE:e._switchToTextParsing(t,r.TokenizerMode.RCDATA);break;case d.TAG_ID.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,r.TokenizerMode.RAWTEXT):(e._insertElement(t,d.NS.HTML),e.insertionMode=f.IN_HEAD_NO_SCRIPT);break;case d.TAG_ID.NOFRAMES:case d.TAG_ID.STYLE:e._switchToTextParsing(t,r.TokenizerMode.RAWTEXT);break;case d.TAG_ID.SCRIPT:e._switchToTextParsing(t,r.TokenizerMode.SCRIPT_DATA);break;case d.TAG_ID.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=f.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(f.IN_TEMPLATE);break;case d.TAG_ID.HEAD:e._err(t,c.ERR.misplacedStartTagForHeadElement);break;default:N(e,t)}}function R(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==d.TAG_ID.TEMPLATE&&e._err(t,c.ERR.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(d.TAG_ID.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,c.ERR.endTagWithoutMatchingOpenElement)}function N(e,t){e.openElements.pop(),e.insertionMode=f.AFTER_HEAD,e._processToken(t)}function M(e,t){const n=t.type===h.TokenType.EOF?c.ERR.openElementsLeftAfterEof:c.ERR.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=f.IN_HEAD,e._processToken(t)}function P(e,t){e._insertFakeElement(d.TAG_NAMES.BODY,d.TAG_ID.BODY),e.insertionMode=f.IN_BODY,L(e,t)}function L(e,t){switch(t.type){case h.TokenType.CHARACTER:U(e,t);break;case h.TokenType.WHITESPACE_CHARACTER:B(e,t);break;case h.TokenType.COMMENT:F(e,t);break;case h.TokenType.START_TAG:q(e,t);break;case h.TokenType.END_TAG:$(e,t);break;case h.TokenType.EOF:K(e,t)}}function B(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function U(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function j(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,d.NS.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function G(e){const t=(0,h.getTokenAttr)(e,d.ATTRS.TYPE);return null!=t&&t.toLowerCase()===p}function z(e,t){e._switchToTextParsing(t,r.TokenizerMode.RAWTEXT)}function H(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,d.NS.HTML)}function q(e,t){switch(t.tagID){case d.TAG_ID.I:case d.TAG_ID.S:case d.TAG_ID.B:case d.TAG_ID.U:case d.TAG_ID.EM:case d.TAG_ID.TT:case d.TAG_ID.BIG:case d.TAG_ID.CODE:case d.TAG_ID.FONT:case d.TAG_ID.SMALL:case d.TAG_ID.STRIKE:case d.TAG_ID.STRONG:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,d.NS.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case d.TAG_ID.A:!function(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(d.TAG_NAMES.A);n&&(x(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,d.NS.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case d.TAG_ID.H1:case d.TAG_ID.H2:case d.TAG_ID.H3:case d.TAG_ID.H4:case d.TAG_ID.H5:case d.TAG_ID.H6:!function(e,t){e.openElements.hasInButtonScope(d.TAG_ID.P)&&e._closePElement(),(0,d.isNumberedHeader)(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,d.NS.HTML)}(e,t);break;case d.TAG_ID.P:case d.TAG_ID.DL:case d.TAG_ID.OL:case d.TAG_ID.UL:case d.TAG_ID.DIV:case d.TAG_ID.DIR:case d.TAG_ID.NAV:case d.TAG_ID.MAIN:case d.TAG_ID.MENU:case d.TAG_ID.ASIDE:case d.TAG_ID.CENTER:case d.TAG_ID.FIGURE:case d.TAG_ID.FOOTER:case d.TAG_ID.HEADER:case d.TAG_ID.HGROUP:case d.TAG_ID.DIALOG:case d.TAG_ID.DETAILS:case d.TAG_ID.ADDRESS:case d.TAG_ID.ARTICLE:case d.TAG_ID.SECTION:case d.TAG_ID.SUMMARY:case d.TAG_ID.FIELDSET:case d.TAG_ID.BLOCKQUOTE:case d.TAG_ID.FIGCAPTION:!function(e,t){e.openElements.hasInButtonScope(d.TAG_ID.P)&&e._closePElement(),e._insertElement(t,d.NS.HTML)}(e,t);break;case d.TAG_ID.LI:case d.TAG_ID.DD:case d.TAG_ID.DT:!function(e,t){e.framesetOk=!1;const n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){const r=e.openElements.tagIDs[t];if(n===d.TAG_ID.LI&&r===d.TAG_ID.LI||(n===d.TAG_ID.DD||n===d.TAG_ID.DT)&&(r===d.TAG_ID.DD||r===d.TAG_ID.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==d.TAG_ID.ADDRESS&&r!==d.TAG_ID.DIV&&r!==d.TAG_ID.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(d.TAG_ID.P)&&e._closePElement(),e._insertElement(t,d.NS.HTML)}(e,t);break;case d.TAG_ID.BR:case d.TAG_ID.IMG:case d.TAG_ID.WBR:case d.TAG_ID.AREA:case d.TAG_ID.EMBED:case d.TAG_ID.KEYGEN:j(e,t);break;case d.TAG_ID.HR:!function(e,t){e.openElements.hasInButtonScope(d.TAG_ID.P)&&e._closePElement(),e._appendElement(t,d.NS.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}(e,t);break;case d.TAG_ID.RB:case d.TAG_ID.RTC:!function(e,t){e.openElements.hasInScope(d.TAG_ID.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,d.NS.HTML)}(e,t);break;case d.TAG_ID.RT:case d.TAG_ID.RP:!function(e,t){e.openElements.hasInScope(d.TAG_ID.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(d.TAG_ID.RTC),e._insertElement(t,d.NS.HTML)}(e,t);break;case d.TAG_ID.PRE:case d.TAG_ID.LISTING:!function(e,t){e.openElements.hasInButtonScope(d.TAG_ID.P)&&e._closePElement(),e._insertElement(t,d.NS.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}(e,t);break;case d.TAG_ID.XMP:!function(e,t){e.openElements.hasInButtonScope(d.TAG_ID.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,r.TokenizerMode.RAWTEXT)}(e,t);break;case d.TAG_ID.SVG:!function(e,t){e._reconstructActiveFormattingElements(),l.adjustTokenSVGAttrs(t),l.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,d.NS.SVG):e._insertElement(t,d.NS.SVG),t.ackSelfClosing=!0}(e,t);break;case d.TAG_ID.HTML:!function(e,t){0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}(e,t);break;case d.TAG_ID.BASE:case d.TAG_ID.LINK:case d.TAG_ID.META:case d.TAG_ID.STYLE:case d.TAG_ID.TITLE:case d.TAG_ID.SCRIPT:case d.TAG_ID.BGSOUND:case d.TAG_ID.BASEFONT:case d.TAG_ID.TEMPLATE:A(e,t);break;case d.TAG_ID.BODY:!function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}(e,t);break;case d.TAG_ID.FORM:!function(e,t){const n=e.openElements.tmplCount>0;e.formElement&&!n||(e.openElements.hasInButtonScope(d.TAG_ID.P)&&e._closePElement(),e._insertElement(t,d.NS.HTML),n||(e.formElement=e.openElements.current))}(e,t);break;case d.TAG_ID.NOBR:!function(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(d.TAG_ID.NOBR)&&(x(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,d.NS.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case d.TAG_ID.MATH:!function(e,t){e._reconstructActiveFormattingElements(),l.adjustTokenMathMLAttrs(t),l.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,d.NS.MATHML):e._insertElement(t,d.NS.MATHML),t.ackSelfClosing=!0}(e,t);break;case d.TAG_ID.TABLE:!function(e,t){e.treeAdapter.getDocumentMode(e.document)!==d.DOCUMENT_MODE.QUIRKS&&e.openElements.hasInButtonScope(d.TAG_ID.P)&&e._closePElement(),e._insertElement(t,d.NS.HTML),e.framesetOk=!1,e.insertionMode=f.IN_TABLE}(e,t);break;case d.TAG_ID.INPUT:!function(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,d.NS.HTML),G(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}(e,t);break;case d.TAG_ID.PARAM:case d.TAG_ID.TRACK:case d.TAG_ID.SOURCE:!function(e,t){e._appendElement(t,d.NS.HTML),t.ackSelfClosing=!0}(e,t);break;case d.TAG_ID.IMAGE:!function(e,t){t.tagName=d.TAG_NAMES.IMG,t.tagID=d.TAG_ID.IMG,j(e,t)}(e,t);break;case d.TAG_ID.BUTTON:!function(e,t){e.openElements.hasInScope(d.TAG_ID.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(d.TAG_ID.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,d.NS.HTML),e.framesetOk=!1}(e,t);break;case d.TAG_ID.APPLET:case d.TAG_ID.OBJECT:case d.TAG_ID.MARQUEE:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,d.NS.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}(e,t);break;case d.TAG_ID.IFRAME:!function(e,t){e.framesetOk=!1,e._switchToTextParsing(t,r.TokenizerMode.RAWTEXT)}(e,t);break;case d.TAG_ID.SELECT:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,d.NS.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===f.IN_TABLE||e.insertionMode===f.IN_CAPTION||e.insertionMode===f.IN_TABLE_BODY||e.insertionMode===f.IN_ROW||e.insertionMode===f.IN_CELL?f.IN_SELECT_IN_TABLE:f.IN_SELECT}(e,t);break;case d.TAG_ID.OPTION:case d.TAG_ID.OPTGROUP:!function(e,t){e.openElements.currentTagId===d.TAG_ID.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,d.NS.HTML)}(e,t);break;case d.TAG_ID.NOEMBED:z(e,t);break;case d.TAG_ID.FRAMESET:!function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,d.NS.HTML),e.insertionMode=f.IN_FRAMESET)}(e,t);break;case d.TAG_ID.TEXTAREA:!function(e,t){e._insertElement(t,d.NS.HTML),e.skipNextNewLine=!0,e.tokenizer.state=r.TokenizerMode.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=f.TEXT}(e,t);break;case d.TAG_ID.NOSCRIPT:e.options.scriptingEnabled?z(e,t):H(e,t);break;case d.TAG_ID.PLAINTEXT:!function(e,t){e.openElements.hasInButtonScope(d.TAG_ID.P)&&e._closePElement(),e._insertElement(t,d.NS.HTML),e.tokenizer.state=r.TokenizerMode.PLAINTEXT}(e,t);break;case d.TAG_ID.COL:case d.TAG_ID.TH:case d.TAG_ID.TD:case d.TAG_ID.TR:case d.TAG_ID.HEAD:case d.TAG_ID.FRAME:case d.TAG_ID.TBODY:case d.TAG_ID.TFOOT:case d.TAG_ID.THEAD:case d.TAG_ID.CAPTION:case d.TAG_ID.COLGROUP:break;default:H(e,t)}}function V(e,t){const n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){const i=e.openElements.items[t],o=e.openElements.tagIDs[t];if(r===o&&(r!==d.TAG_ID.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,o))break}}function $(e,t){switch(t.tagID){case d.TAG_ID.A:case d.TAG_ID.B:case d.TAG_ID.I:case d.TAG_ID.S:case d.TAG_ID.U:case d.TAG_ID.EM:case d.TAG_ID.TT:case d.TAG_ID.BIG:case d.TAG_ID.CODE:case d.TAG_ID.FONT:case d.TAG_ID.NOBR:case d.TAG_ID.SMALL:case d.TAG_ID.STRIKE:case d.TAG_ID.STRONG:x(e,t);break;case d.TAG_ID.P:!function(e){e.openElements.hasInButtonScope(d.TAG_ID.P)||e._insertFakeElement(d.TAG_NAMES.P,d.TAG_ID.P),e._closePElement()}(e);break;case d.TAG_ID.DL:case d.TAG_ID.UL:case d.TAG_ID.OL:case d.TAG_ID.DIR:case d.TAG_ID.DIV:case d.TAG_ID.NAV:case d.TAG_ID.PRE:case d.TAG_ID.MAIN:case d.TAG_ID.MENU:case d.TAG_ID.ASIDE:case d.TAG_ID.BUTTON:case d.TAG_ID.CENTER:case d.TAG_ID.FIGURE:case d.TAG_ID.FOOTER:case d.TAG_ID.HEADER:case d.TAG_ID.HGROUP:case d.TAG_ID.DIALOG:case d.TAG_ID.ADDRESS:case d.TAG_ID.ARTICLE:case d.TAG_ID.DETAILS:case d.TAG_ID.SECTION:case d.TAG_ID.SUMMARY:case d.TAG_ID.LISTING:case d.TAG_ID.FIELDSET:case d.TAG_ID.BLOCKQUOTE:case d.TAG_ID.FIGCAPTION:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}(e,t);break;case d.TAG_ID.LI:!function(e){e.openElements.hasInListItemScope(d.TAG_ID.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(d.TAG_ID.LI),e.openElements.popUntilTagNamePopped(d.TAG_ID.LI))}(e);break;case d.TAG_ID.DD:case d.TAG_ID.DT:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}(e,t);break;case d.TAG_ID.H1:case d.TAG_ID.H2:case d.TAG_ID.H3:case d.TAG_ID.H4:case d.TAG_ID.H5:case d.TAG_ID.H6:!function(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}(e);break;case d.TAG_ID.BR:!function(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(d.TAG_NAMES.BR,d.TAG_ID.BR),e.openElements.pop(),e.framesetOk=!1}(e);break;case d.TAG_ID.BODY:!function(e,t){if(e.openElements.hasInScope(d.TAG_ID.BODY)&&(e.insertionMode=f.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}(e,t);break;case d.TAG_ID.HTML:!function(e,t){e.openElements.hasInScope(d.TAG_ID.BODY)&&(e.insertionMode=f.AFTER_BODY,de(e,t))}(e,t);break;case d.TAG_ID.FORM:!function(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(d.TAG_ID.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(d.TAG_ID.FORM):n&&e.openElements.remove(n))}(e);break;case d.TAG_ID.APPLET:case d.TAG_ID.OBJECT:case d.TAG_ID.MARQUEE:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}(e,t);break;case d.TAG_ID.TEMPLATE:R(e,t);break;default:V(e,t)}}function K(e,t){e.tmplInsertionModeStack.length>0?ue(e,t):D(e,t)}function W(e,t){if(b.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=f.IN_TABLE_TEXT,t.type){case h.TokenType.CHARACTER:J(e,t);break;case h.TokenType.WHITESPACE_CHARACTER:Z(e,t)}else X(e,t)}function Y(e,t){switch(t.tagID){case d.TAG_ID.TD:case d.TAG_ID.TH:case d.TAG_ID.TR:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(d.TAG_NAMES.TBODY,d.TAG_ID.TBODY),e.insertionMode=f.IN_TABLE_BODY,ie(e,t)}(e,t);break;case d.TAG_ID.STYLE:case d.TAG_ID.SCRIPT:case d.TAG_ID.TEMPLATE:A(e,t);break;case d.TAG_ID.COL:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(d.TAG_NAMES.COLGROUP,d.TAG_ID.COLGROUP),e.insertionMode=f.IN_COLUMN_GROUP,ne(e,t)}(e,t);break;case d.TAG_ID.FORM:!function(e,t){e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,d.NS.HTML),e.formElement=e.openElements.current,e.openElements.pop())}(e,t);break;case d.TAG_ID.TABLE:!function(e,t){e.openElements.hasInTableScope(d.TAG_ID.TABLE)&&(e.openElements.popUntilTagNamePopped(d.TAG_ID.TABLE),e._resetInsertionMode(),e._processStartTag(t))}(e,t);break;case d.TAG_ID.TBODY:case d.TAG_ID.TFOOT:case d.TAG_ID.THEAD:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,d.NS.HTML),e.insertionMode=f.IN_TABLE_BODY}(e,t);break;case d.TAG_ID.INPUT:!function(e,t){G(t)?e._appendElement(t,d.NS.HTML):X(e,t),t.ackSelfClosing=!0}(e,t);break;case d.TAG_ID.CAPTION:!function(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,d.NS.HTML),e.insertionMode=f.IN_CAPTION}(e,t);break;case d.TAG_ID.COLGROUP:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,d.NS.HTML),e.insertionMode=f.IN_COLUMN_GROUP}(e,t);break;default:X(e,t)}}function Q(e,t){switch(t.tagID){case d.TAG_ID.TABLE:e.openElements.hasInTableScope(d.TAG_ID.TABLE)&&(e.openElements.popUntilTagNamePopped(d.TAG_ID.TABLE),e._resetInsertionMode());break;case d.TAG_ID.TEMPLATE:R(e,t);break;case d.TAG_ID.BODY:case d.TAG_ID.CAPTION:case d.TAG_ID.COL:case d.TAG_ID.COLGROUP:case d.TAG_ID.HTML:case d.TAG_ID.TBODY:case d.TAG_ID.TD:case d.TAG_ID.TFOOT:case d.TAG_ID.TH:case d.TAG_ID.THEAD:case d.TAG_ID.TR:break;default:X(e,t)}}function X(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,L(e,t),e.fosterParentingEnabled=n}function Z(e,t){e.pendingCharacterTokens.push(t)}function J(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function ee(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)X(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}t.Parser=class{constructor(e,t,n=null,a=null){this.fragmentContext=n,this.scriptHandler=a,this.currentToken=null,this.stopped=!1,this.insertionMode=f.INITIAL,this.originalInsertionMode=f.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=Object.assign(Object.assign({},v),e),this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=null!=t?t:this.treeAdapter.createDocument(),this.tokenizer=new r.Tokenizer(this.options,this),this.activeFormattingElements=new o.FormattingElementList(this.treeAdapter),this.fragmentContextID=n?(0,d.getTagID)(this.treeAdapter.getTagName(n)):d.TAG_ID.UNKNOWN,this._setContextModes(null!=n?n:this.document,this.fragmentContextID),this.openElements=new i.OpenElementStack(this.document,this.treeAdapter,this)}static parse(e,t){const n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){const n=Object.assign(Object.assign({},v),t);null!=e||(e=n.treeAdapter.createElement(d.TAG_NAMES.TEMPLATE,d.NS.HTML,[]));const r=n.treeAdapter.createElement("documentmock",d.NS.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===d.TAG_ID.TEMPLATE&&i.tmplInsertionModeStack.unshift(f.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){const e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){var r;if(!this.onParseError)return;const i=null!==(r=e.location)&&void 0!==r?r:_,o={code:t,startLine:i.startLine,startCol:i.startCol,startOffset:i.startOffset,endLine:n?i.startLine:i.endLine,endCol:n?i.startCol:i.endCol,endOffset:n?i.startOffset:i.endOffset};this.onParseError(o)}onItemPush(e,t,n){var r,i;null===(i=(r=this.treeAdapter).onItemPush)||void 0===i||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),null===(r=(n=this.treeAdapter).onItemPop)||void 0===r||r.call(n,e,this.openElements.current),t){let e,t;0===this.openElements.stackTop&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):({current:e,currentTagId:t}=this.openElements),this._setContextModes(e,t)}}_setContextModes(e,t){const n=e===this.document||this.treeAdapter.getNamespaceURI(e)===d.NS.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,d.NS.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=f.TEXT}switchToPlaintextParsing(){this.insertionMode=f.TEXT,this.originalInsertionMode=f.IN_BODY,this.tokenizer.state=r.TokenizerMode.PLAINTEXT}_getAdjustedCurrentElement(){return 0===this.openElements.stackTop&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===d.TAG_NAMES.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===d.NS.HTML)switch(this.fragmentContextID){case d.TAG_ID.TITLE:case d.TAG_ID.TEXTAREA:this.tokenizer.state=r.TokenizerMode.RCDATA;break;case d.TAG_ID.STYLE:case d.TAG_ID.XMP:case d.TAG_ID.IFRAME:case d.TAG_ID.NOEMBED:case d.TAG_ID.NOFRAMES:case d.TAG_ID.NOSCRIPT:this.tokenizer.state=r.TokenizerMode.RAWTEXT;break;case d.TAG_ID.SCRIPT:this.tokenizer.state=r.TokenizerMode.SCRIPT_DATA;break;case d.TAG_ID.PLAINTEXT:this.tokenizer.state=r.TokenizerMode.PLAINTEXT}}_setDocumentType(e){const t=e.name||"",n=e.publicId||"",r=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){const t=this.treeAdapter.getChildNodes(this.document).find((e=>this.treeAdapter.isDocumentTypeNode(e)));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){const n=t&&Object.assign(Object.assign({},t),{startTag:t});this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t,e)}}_appendElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){const n=this.treeAdapter.createElement(e,d.NS.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){const t=this.treeAdapter.createElement(e.tagName,d.NS.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(d.TAG_NAMES.HTML,d.NS.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,d.TAG_ID.HTML)}_appendCommentNode(e,t){const n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?(({parent:t,beforeElement:n}=this._findFosterParentingLocation()),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;const r=this.treeAdapter.getChildNodes(t),i=n?r.lastIndexOf(n):r.length,o=r[i-1];if(this.treeAdapter.getNodeSourceCodeLocation(o)){const{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(o,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){const n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===h.TokenType.END_TAG&&r===t.tagName?{endTag:Object.assign({},n),endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return 0===this.openElements.stackTop&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):({current:t,currentTagId:n}=this.openElements),(e.tagID!==d.TAG_ID.SVG||this.treeAdapter.getTagName(t)!==d.TAG_NAMES.ANNOTATION_XML||this.treeAdapter.getNamespaceURI(t)!==d.NS.MATHML)&&(this.tokenizer.inForeignNode||(e.tagID===d.TAG_ID.MGLYPH||e.tagID===d.TAG_ID.MALIGNMARK)&&!this._isIntegrationPoint(n,t,d.NS.HTML))}_processToken(e){switch(e.type){case h.TokenType.CHARACTER:this.onCharacter(e);break;case h.TokenType.NULL_CHARACTER:this.onNullCharacter(e);break;case h.TokenType.COMMENT:this.onComment(e);break;case h.TokenType.DOCTYPE:this.onDoctype(e);break;case h.TokenType.START_TAG:this._processStartTag(e);break;case h.TokenType.END_TAG:this.onEndTag(e);break;case h.TokenType.EOF:this.onEof(e);break;case h.TokenType.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){const r=this.treeAdapter.getNamespaceURI(t),i=this.treeAdapter.getAttrList(t);return l.isIntegrationPoint(e,r,i,n)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.entries.length;if(e){const t=this.activeFormattingElements.entries.findIndex((e=>e.type===o.EntryType.Marker||this.openElements.contains(e.element)));for(let n=t<0?e-1:t-1;n>=0;n--){const e=this.activeFormattingElements.entries[n];this._insertElement(e.token,this.treeAdapter.getNamespaceURI(e.element)),e.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=f.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(d.TAG_ID.P),this.openElements.popUntilTagNamePopped(d.TAG_ID.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(0===e&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case d.TAG_ID.TR:return void(this.insertionMode=f.IN_ROW);case d.TAG_ID.TBODY:case d.TAG_ID.THEAD:case d.TAG_ID.TFOOT:return void(this.insertionMode=f.IN_TABLE_BODY);case d.TAG_ID.CAPTION:return void(this.insertionMode=f.IN_CAPTION);case d.TAG_ID.COLGROUP:return void(this.insertionMode=f.IN_COLUMN_GROUP);case d.TAG_ID.TABLE:return void(this.insertionMode=f.IN_TABLE);case d.TAG_ID.BODY:return void(this.insertionMode=f.IN_BODY);case d.TAG_ID.FRAMESET:return void(this.insertionMode=f.IN_FRAMESET);case d.TAG_ID.SELECT:return void this._resetInsertionModeForSelect(e);case d.TAG_ID.TEMPLATE:return void(this.insertionMode=this.tmplInsertionModeStack[0]);case d.TAG_ID.HTML:return void(this.insertionMode=this.headElement?f.AFTER_HEAD:f.BEFORE_HEAD);case d.TAG_ID.TD:case d.TAG_ID.TH:if(e>0)return void(this.insertionMode=f.IN_CELL);break;case d.TAG_ID.HEAD:if(e>0)return void(this.insertionMode=f.IN_HEAD)}this.insertionMode=f.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){const e=this.openElements.tagIDs[t];if(e===d.TAG_ID.TEMPLATE)break;if(e===d.TAG_ID.TABLE)return void(this.insertionMode=f.IN_SELECT_IN_TABLE)}this.insertionMode=f.IN_SELECT}_isElementCausesFosterParenting(e){return b.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){const t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case d.TAG_ID.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===d.NS.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case d.TAG_ID.TABLE:{const n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){const n=this.treeAdapter.getNamespaceURI(e);return d.SPECIAL_ELEMENTS[n].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)!function(e,t){e._insertCharacters(t),e.framesetOk=!1}(this,e);else switch(this.insertionMode){case f.INITIAL:k(this,e);break;case f.BEFORE_HTML:O(this,e);break;case f.BEFORE_HEAD:I(this,e);break;case f.IN_HEAD:N(this,e);break;case f.IN_HEAD_NO_SCRIPT:M(this,e);break;case f.AFTER_HEAD:P(this,e);break;case f.IN_BODY:case f.IN_CAPTION:case f.IN_CELL:case f.IN_TEMPLATE:U(this,e);break;case f.TEXT:case f.IN_SELECT:case f.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case f.IN_TABLE:case f.IN_TABLE_BODY:case f.IN_ROW:W(this,e);break;case f.IN_TABLE_TEXT:J(this,e);break;case f.IN_COLUMN_GROUP:re(this,e);break;case f.AFTER_BODY:he(this,e);break;case f.AFTER_AFTER_BODY:pe(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)!function(e,t){t.chars=u.REPLACEMENT_CHARACTER,e._insertCharacters(t)}(this,e);else switch(this.insertionMode){case f.INITIAL:k(this,e);break;case f.BEFORE_HTML:O(this,e);break;case f.BEFORE_HEAD:I(this,e);break;case f.IN_HEAD:N(this,e);break;case f.IN_HEAD_NO_SCRIPT:M(this,e);break;case f.AFTER_HEAD:P(this,e);break;case f.TEXT:this._insertCharacters(e);break;case f.IN_TABLE:case f.IN_TABLE_BODY:case f.IN_ROW:W(this,e);break;case f.IN_COLUMN_GROUP:re(this,e);break;case f.AFTER_BODY:he(this,e);break;case f.AFTER_AFTER_BODY:pe(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML)F(this,e);else switch(this.insertionMode){case f.INITIAL:case f.BEFORE_HTML:case f.BEFORE_HEAD:case f.IN_HEAD:case f.IN_HEAD_NO_SCRIPT:case f.AFTER_HEAD:case f.IN_BODY:case f.IN_TABLE:case f.IN_CAPTION:case f.IN_COLUMN_GROUP:case f.IN_TABLE_BODY:case f.IN_ROW:case f.IN_CELL:case f.IN_SELECT:case f.IN_SELECT_IN_TABLE:case f.IN_TEMPLATE:case f.IN_FRAMESET:case f.AFTER_FRAMESET:F(this,e);break;case f.IN_TABLE_TEXT:ee(this,e);break;case f.AFTER_BODY:!function(e,t){e._appendCommentNode(t,e.openElements.items[0])}(this,e);break;case f.AFTER_AFTER_BODY:case f.AFTER_AFTER_FRAMESET:!function(e,t){e._appendCommentNode(t,e.document)}(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case f.INITIAL:!function(e,t){e._setDocumentType(t);const n=t.forceQuirks?d.DOCUMENT_MODE.QUIRKS:s.getDocumentMode(t);s.isConforming(t)||e._err(t,c.ERR.nonConformingDoctype);e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=f.BEFORE_HTML}(this,e);break;case f.BEFORE_HEAD:case f.IN_HEAD:case f.IN_HEAD_NO_SCRIPT:case f.AFTER_HEAD:this._err(e,c.ERR.misplacedDoctype);break;case f.IN_TABLE_TEXT:ee(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,c.ERR.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?function(e,t){if(l.causesExit(t))me(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===d.NS.MATHML?l.adjustTokenMathMLAttrs(t):r===d.NS.SVG&&(l.adjustTokenSVGTagName(t),l.adjustTokenSVGAttrs(t)),l.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case f.INITIAL:k(this,e);break;case f.BEFORE_HTML:!function(e,t){t.tagID===d.TAG_ID.HTML?(e._insertElement(t,d.NS.HTML),e.insertionMode=f.BEFORE_HEAD):O(e,t)}(this,e);break;case f.BEFORE_HEAD:!function(e,t){switch(t.tagID){case d.TAG_ID.HTML:q(e,t);break;case d.TAG_ID.HEAD:e._insertElement(t,d.NS.HTML),e.headElement=e.openElements.current,e.insertionMode=f.IN_HEAD;break;default:I(e,t)}}(this,e);break;case f.IN_HEAD:A(this,e);break;case f.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case d.TAG_ID.HTML:q(e,t);break;case d.TAG_ID.BASEFONT:case d.TAG_ID.BGSOUND:case d.TAG_ID.HEAD:case d.TAG_ID.LINK:case d.TAG_ID.META:case d.TAG_ID.NOFRAMES:case d.TAG_ID.STYLE:A(e,t);break;case d.TAG_ID.NOSCRIPT:e._err(t,c.ERR.nestedNoscriptInHead);break;default:M(e,t)}}(this,e);break;case f.AFTER_HEAD:!function(e,t){switch(t.tagID){case d.TAG_ID.HTML:q(e,t);break;case d.TAG_ID.BODY:e._insertElement(t,d.NS.HTML),e.framesetOk=!1,e.insertionMode=f.IN_BODY;break;case d.TAG_ID.FRAMESET:e._insertElement(t,d.NS.HTML),e.insertionMode=f.IN_FRAMESET;break;case d.TAG_ID.BASE:case d.TAG_ID.BASEFONT:case d.TAG_ID.BGSOUND:case d.TAG_ID.LINK:case d.TAG_ID.META:case d.TAG_ID.NOFRAMES:case d.TAG_ID.SCRIPT:case d.TAG_ID.STYLE:case d.TAG_ID.TEMPLATE:case d.TAG_ID.TITLE:e._err(t,c.ERR.abandonedHeadElementChild),e.openElements.push(e.headElement,d.TAG_ID.HEAD),A(e,t),e.openElements.remove(e.headElement);break;case d.TAG_ID.HEAD:e._err(t,c.ERR.misplacedStartTagForHeadElement);break;default:P(e,t)}}(this,e);break;case f.IN_BODY:q(this,e);break;case f.IN_TABLE:Y(this,e);break;case f.IN_TABLE_TEXT:ee(this,e);break;case f.IN_CAPTION:!function(e,t){const n=t.tagID;te.has(n)?e.openElements.hasInTableScope(d.TAG_ID.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(d.TAG_ID.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=f.IN_TABLE,Y(e,t)):q(e,t)}(this,e);break;case f.IN_COLUMN_GROUP:ne(this,e);break;case f.IN_TABLE_BODY:ie(this,e);break;case f.IN_ROW:ae(this,e);break;case f.IN_CELL:!function(e,t){const n=t.tagID;te.has(n)?(e.openElements.hasInTableScope(d.TAG_ID.TD)||e.openElements.hasInTableScope(d.TAG_ID.TH))&&(e._closeTableCell(),ae(e,t)):q(e,t)}(this,e);break;case f.IN_SELECT:le(this,e);break;case f.IN_SELECT_IN_TABLE:!function(e,t){const n=t.tagID;n===d.TAG_ID.CAPTION||n===d.TAG_ID.TABLE||n===d.TAG_ID.TBODY||n===d.TAG_ID.TFOOT||n===d.TAG_ID.THEAD||n===d.TAG_ID.TR||n===d.TAG_ID.TD||n===d.TAG_ID.TH?(e.openElements.popUntilTagNamePopped(d.TAG_ID.SELECT),e._resetInsertionMode(),e._processStartTag(t)):le(e,t)}(this,e);break;case f.IN_TEMPLATE:!function(e,t){switch(t.tagID){case d.TAG_ID.BASE:case d.TAG_ID.BASEFONT:case d.TAG_ID.BGSOUND:case d.TAG_ID.LINK:case d.TAG_ID.META:case d.TAG_ID.NOFRAMES:case d.TAG_ID.SCRIPT:case d.TAG_ID.STYLE:case d.TAG_ID.TEMPLATE:case d.TAG_ID.TITLE:A(e,t);break;case d.TAG_ID.CAPTION:case d.TAG_ID.COLGROUP:case d.TAG_ID.TBODY:case d.TAG_ID.TFOOT:case d.TAG_ID.THEAD:e.tmplInsertionModeStack[0]=f.IN_TABLE,e.insertionMode=f.IN_TABLE,Y(e,t);break;case d.TAG_ID.COL:e.tmplInsertionModeStack[0]=f.IN_COLUMN_GROUP,e.insertionMode=f.IN_COLUMN_GROUP,ne(e,t);break;case d.TAG_ID.TR:e.tmplInsertionModeStack[0]=f.IN_TABLE_BODY,e.insertionMode=f.IN_TABLE_BODY,ie(e,t);break;case d.TAG_ID.TD:case d.TAG_ID.TH:e.tmplInsertionModeStack[0]=f.IN_ROW,e.insertionMode=f.IN_ROW,ae(e,t);break;default:e.tmplInsertionModeStack[0]=f.IN_BODY,e.insertionMode=f.IN_BODY,q(e,t)}}(this,e);break;case f.AFTER_BODY:!function(e,t){t.tagID===d.TAG_ID.HTML?q(e,t):he(e,t)}(this,e);break;case f.IN_FRAMESET:!function(e,t){switch(t.tagID){case d.TAG_ID.HTML:q(e,t);break;case d.TAG_ID.FRAMESET:e._insertElement(t,d.NS.HTML);break;case d.TAG_ID.FRAME:e._appendElement(t,d.NS.HTML),t.ackSelfClosing=!0;break;case d.TAG_ID.NOFRAMES:A(e,t)}}(this,e);break;case f.AFTER_FRAMESET:!function(e,t){switch(t.tagID){case d.TAG_ID.HTML:q(e,t);break;case d.TAG_ID.NOFRAMES:A(e,t)}}(this,e);break;case f.AFTER_AFTER_BODY:!function(e,t){t.tagID===d.TAG_ID.HTML?q(e,t):pe(e,t)}(this,e);break;case f.AFTER_AFTER_FRAMESET:!function(e,t){switch(t.tagID){case d.TAG_ID.HTML:q(e,t);break;case d.TAG_ID.NOFRAMES:A(e,t)}}(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?function(e,t){if(t.tagID===d.TAG_ID.P||t.tagID===d.TAG_ID.BR)return me(e),void e._endTagOutsideForeignContent(t);for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===d.NS.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case f.INITIAL:k(this,e);break;case f.BEFORE_HTML:!function(e,t){const n=t.tagID;n!==d.TAG_ID.HTML&&n!==d.TAG_ID.HEAD&&n!==d.TAG_ID.BODY&&n!==d.TAG_ID.BR||O(e,t)}(this,e);break;case f.BEFORE_HEAD:!function(e,t){const n=t.tagID;n===d.TAG_ID.HEAD||n===d.TAG_ID.BODY||n===d.TAG_ID.HTML||n===d.TAG_ID.BR?I(e,t):e._err(t,c.ERR.endTagWithoutMatchingOpenElement)}(this,e);break;case f.IN_HEAD:!function(e,t){switch(t.tagID){case d.TAG_ID.HEAD:e.openElements.pop(),e.insertionMode=f.AFTER_HEAD;break;case d.TAG_ID.BODY:case d.TAG_ID.BR:case d.TAG_ID.HTML:N(e,t);break;case d.TAG_ID.TEMPLATE:R(e,t);break;default:e._err(t,c.ERR.endTagWithoutMatchingOpenElement)}}(this,e);break;case f.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case d.TAG_ID.NOSCRIPT:e.openElements.pop(),e.insertionMode=f.IN_HEAD;break;case d.TAG_ID.BR:M(e,t);break;default:e._err(t,c.ERR.endTagWithoutMatchingOpenElement)}}(this,e);break;case f.AFTER_HEAD:!function(e,t){switch(t.tagID){case d.TAG_ID.BODY:case d.TAG_ID.HTML:case d.TAG_ID.BR:P(e,t);break;case d.TAG_ID.TEMPLATE:R(e,t);break;default:e._err(t,c.ERR.endTagWithoutMatchingOpenElement)}}(this,e);break;case f.IN_BODY:$(this,e);break;case f.TEXT:!function(e,t){var n;t.tagID===d.TAG_ID.SCRIPT&&(null===(n=e.scriptHandler)||void 0===n||n.call(e,e.openElements.current));e.openElements.pop(),e.insertionMode=e.originalInsertionMode}(this,e);break;case f.IN_TABLE:Q(this,e);break;case f.IN_TABLE_TEXT:ee(this,e);break;case f.IN_CAPTION:!function(e,t){const n=t.tagID;switch(n){case d.TAG_ID.CAPTION:case d.TAG_ID.TABLE:e.openElements.hasInTableScope(d.TAG_ID.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(d.TAG_ID.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=f.IN_TABLE,n===d.TAG_ID.TABLE&&Q(e,t));break;case d.TAG_ID.BODY:case d.TAG_ID.COL:case d.TAG_ID.COLGROUP:case d.TAG_ID.HTML:case d.TAG_ID.TBODY:case d.TAG_ID.TD:case d.TAG_ID.TFOOT:case d.TAG_ID.TH:case d.TAG_ID.THEAD:case d.TAG_ID.TR:break;default:$(e,t)}}(this,e);break;case f.IN_COLUMN_GROUP:!function(e,t){switch(t.tagID){case d.TAG_ID.COLGROUP:e.openElements.currentTagId===d.TAG_ID.COLGROUP&&(e.openElements.pop(),e.insertionMode=f.IN_TABLE);break;case d.TAG_ID.TEMPLATE:R(e,t);break;case d.TAG_ID.COL:break;default:re(e,t)}}(this,e);break;case f.IN_TABLE_BODY:oe(this,e);break;case f.IN_ROW:se(this,e);break;case f.IN_CELL:!function(e,t){const n=t.tagID;switch(n){case d.TAG_ID.TD:case d.TAG_ID.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=f.IN_ROW);break;case d.TAG_ID.TABLE:case d.TAG_ID.TBODY:case d.TAG_ID.TFOOT:case d.TAG_ID.THEAD:case d.TAG_ID.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),se(e,t));break;case d.TAG_ID.BODY:case d.TAG_ID.CAPTION:case d.TAG_ID.COL:case d.TAG_ID.COLGROUP:case d.TAG_ID.HTML:break;default:$(e,t)}}(this,e);break;case f.IN_SELECT:ce(this,e);break;case f.IN_SELECT_IN_TABLE:!function(e,t){const n=t.tagID;n===d.TAG_ID.CAPTION||n===d.TAG_ID.TABLE||n===d.TAG_ID.TBODY||n===d.TAG_ID.TFOOT||n===d.TAG_ID.THEAD||n===d.TAG_ID.TR||n===d.TAG_ID.TD||n===d.TAG_ID.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(d.TAG_ID.SELECT),e._resetInsertionMode(),e.onEndTag(t)):ce(e,t)}(this,e);break;case f.IN_TEMPLATE:!function(e,t){t.tagID===d.TAG_ID.TEMPLATE&&R(e,t)}(this,e);break;case f.AFTER_BODY:de(this,e);break;case f.IN_FRAMESET:!function(e,t){t.tagID!==d.TAG_ID.FRAMESET||e.openElements.isRootHtmlElementCurrent()||(e.openElements.pop(),e.fragmentContext||e.openElements.currentTagId===d.TAG_ID.FRAMESET||(e.insertionMode=f.AFTER_FRAMESET))}(this,e);break;case f.AFTER_FRAMESET:!function(e,t){t.tagID===d.TAG_ID.HTML&&(e.insertionMode=f.AFTER_AFTER_FRAMESET)}(this,e);break;case f.AFTER_AFTER_BODY:pe(this,e)}}onEof(e){switch(this.insertionMode){case f.INITIAL:k(this,e);break;case f.BEFORE_HTML:O(this,e);break;case f.BEFORE_HEAD:I(this,e);break;case f.IN_HEAD:N(this,e);break;case f.IN_HEAD_NO_SCRIPT:M(this,e);break;case f.AFTER_HEAD:P(this,e);break;case f.IN_BODY:case f.IN_TABLE:case f.IN_CAPTION:case f.IN_COLUMN_GROUP:case f.IN_TABLE_BODY:case f.IN_ROW:case f.IN_CELL:case f.IN_SELECT:case f.IN_SELECT_IN_TABLE:K(this,e);break;case f.TEXT:!function(e,t){e._err(t,c.ERR.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}(this,e);break;case f.IN_TABLE_TEXT:ee(this,e);break;case f.IN_TEMPLATE:ue(this,e);break;case f.AFTER_BODY:case f.IN_FRAMESET:case f.AFTER_FRAMESET:case f.AFTER_AFTER_BODY:case f.AFTER_AFTER_FRAMESET:D(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===u.CODE_POINTS.LINE_FEED)){if(1===e.chars.length)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode)this._insertCharacters(e);else switch(this.insertionMode){case f.IN_HEAD:case f.IN_HEAD_NO_SCRIPT:case f.AFTER_HEAD:case f.TEXT:case f.IN_COLUMN_GROUP:case f.IN_SELECT:case f.IN_SELECT_IN_TABLE:case f.IN_FRAMESET:case f.AFTER_FRAMESET:this._insertCharacters(e);break;case f.IN_BODY:case f.IN_CAPTION:case f.IN_CELL:case f.IN_TEMPLATE:case f.AFTER_BODY:case f.AFTER_AFTER_BODY:case f.AFTER_AFTER_FRAMESET:B(this,e);break;case f.IN_TABLE:case f.IN_TABLE_BODY:case f.IN_ROW:W(this,e);break;case f.IN_TABLE_TEXT:Z(this,e)}}};const te=new Set([d.TAG_ID.CAPTION,d.TAG_ID.COL,d.TAG_ID.COLGROUP,d.TAG_ID.TBODY,d.TAG_ID.TD,d.TAG_ID.TFOOT,d.TAG_ID.TH,d.TAG_ID.THEAD,d.TAG_ID.TR]);function ne(e,t){switch(t.tagID){case d.TAG_ID.HTML:q(e,t);break;case d.TAG_ID.COL:e._appendElement(t,d.NS.HTML),t.ackSelfClosing=!0;break;case d.TAG_ID.TEMPLATE:A(e,t);break;default:re(e,t)}}function re(e,t){e.openElements.currentTagId===d.TAG_ID.COLGROUP&&(e.openElements.pop(),e.insertionMode=f.IN_TABLE,e._processToken(t))}function ie(e,t){switch(t.tagID){case d.TAG_ID.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,d.NS.HTML),e.insertionMode=f.IN_ROW;break;case d.TAG_ID.TH:case d.TAG_ID.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(d.TAG_NAMES.TR,d.TAG_ID.TR),e.insertionMode=f.IN_ROW,ae(e,t);break;case d.TAG_ID.CAPTION:case d.TAG_ID.COL:case d.TAG_ID.COLGROUP:case d.TAG_ID.TBODY:case d.TAG_ID.TFOOT:case d.TAG_ID.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=f.IN_TABLE,Y(e,t));break;default:Y(e,t)}}function oe(e,t){const n=t.tagID;switch(t.tagID){case d.TAG_ID.TBODY:case d.TAG_ID.TFOOT:case d.TAG_ID.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=f.IN_TABLE);break;case d.TAG_ID.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=f.IN_TABLE,Q(e,t));break;case d.TAG_ID.BODY:case d.TAG_ID.CAPTION:case d.TAG_ID.COL:case d.TAG_ID.COLGROUP:case d.TAG_ID.HTML:case d.TAG_ID.TD:case d.TAG_ID.TH:case d.TAG_ID.TR:break;default:Q(e,t)}}function ae(e,t){switch(t.tagID){case d.TAG_ID.TH:case d.TAG_ID.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,d.NS.HTML),e.insertionMode=f.IN_CELL,e.activeFormattingElements.insertMarker();break;case d.TAG_ID.CAPTION:case d.TAG_ID.COL:case d.TAG_ID.COLGROUP:case d.TAG_ID.TBODY:case d.TAG_ID.TFOOT:case d.TAG_ID.THEAD:case d.TAG_ID.TR:e.openElements.hasInTableScope(d.TAG_ID.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=f.IN_TABLE_BODY,ie(e,t));break;default:Y(e,t)}}function se(e,t){switch(t.tagID){case d.TAG_ID.TR:e.openElements.hasInTableScope(d.TAG_ID.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=f.IN_TABLE_BODY);break;case d.TAG_ID.TABLE:e.openElements.hasInTableScope(d.TAG_ID.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=f.IN_TABLE_BODY,oe(e,t));break;case d.TAG_ID.TBODY:case d.TAG_ID.TFOOT:case d.TAG_ID.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(d.TAG_ID.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=f.IN_TABLE_BODY,oe(e,t));break;case d.TAG_ID.BODY:case d.TAG_ID.CAPTION:case d.TAG_ID.COL:case d.TAG_ID.COLGROUP:case d.TAG_ID.HTML:case d.TAG_ID.TD:case d.TAG_ID.TH:break;default:Q(e,t)}}function le(e,t){switch(t.tagID){case d.TAG_ID.HTML:q(e,t);break;case d.TAG_ID.OPTION:e.openElements.currentTagId===d.TAG_ID.OPTION&&e.openElements.pop(),e._insertElement(t,d.NS.HTML);break;case d.TAG_ID.OPTGROUP:e.openElements.currentTagId===d.TAG_ID.OPTION&&e.openElements.pop(),e.openElements.currentTagId===d.TAG_ID.OPTGROUP&&e.openElements.pop(),e._insertElement(t,d.NS.HTML);break;case d.TAG_ID.INPUT:case d.TAG_ID.KEYGEN:case d.TAG_ID.TEXTAREA:case d.TAG_ID.SELECT:e.openElements.hasInSelectScope(d.TAG_ID.SELECT)&&(e.openElements.popUntilTagNamePopped(d.TAG_ID.SELECT),e._resetInsertionMode(),t.tagID!==d.TAG_ID.SELECT&&e._processStartTag(t));break;case d.TAG_ID.SCRIPT:case d.TAG_ID.TEMPLATE:A(e,t)}}function ce(e,t){switch(t.tagID){case d.TAG_ID.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===d.TAG_ID.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===d.TAG_ID.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===d.TAG_ID.OPTGROUP&&e.openElements.pop();break;case d.TAG_ID.OPTION:e.openElements.currentTagId===d.TAG_ID.OPTION&&e.openElements.pop();break;case d.TAG_ID.SELECT:e.openElements.hasInSelectScope(d.TAG_ID.SELECT)&&(e.openElements.popUntilTagNamePopped(d.TAG_ID.SELECT),e._resetInsertionMode());break;case d.TAG_ID.TEMPLATE:R(e,t)}}function ue(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(d.TAG_ID.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):D(e,t)}function de(e,t){var n;if(t.tagID===d.TAG_ID.HTML){if(e.fragmentContext||(e.insertionMode=f.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===d.TAG_ID.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(null===(n=e.treeAdapter.getNodeSourceCodeLocation(r))||void 0===n?void 0:n.endTag)&&e._setEndLocation(r,t)}}else he(e,t)}function he(e,t){e.insertionMode=f.IN_BODY,L(e,t)}function pe(e,t){e.insertionMode=f.IN_BODY,L(e,t)}function me(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==d.NS.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Tokenizer=t.TokenizerMode=void 0;const r=n(1083),i=n(532),o=n(533),a=n(1084),s=n(437),l=n(275),c=new Map([[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);var u;function d(e){return e>=i.CODE_POINTS.DIGIT_0&&e<=i.CODE_POINTS.DIGIT_9}function h(e){return e>=i.CODE_POINTS.LATIN_CAPITAL_A&&e<=i.CODE_POINTS.LATIN_CAPITAL_Z}function p(e){return function(e){return e>=i.CODE_POINTS.LATIN_SMALL_A&&e<=i.CODE_POINTS.LATIN_SMALL_Z}(e)||h(e)}function m(e){return p(e)||d(e)}function g(e){return e>=i.CODE_POINTS.LATIN_CAPITAL_A&&e<=i.CODE_POINTS.LATIN_CAPITAL_F}function f(e){return e>=i.CODE_POINTS.LATIN_SMALL_A&&e<=i.CODE_POINTS.LATIN_SMALL_F}function _(e){return e+32}function b(e){return e===i.CODE_POINTS.SPACE||e===i.CODE_POINTS.LINE_FEED||e===i.CODE_POINTS.TABULATION||e===i.CODE_POINTS.FORM_FEED}function v(e){return b(e)||e===i.CODE_POINTS.SOLIDUS||e===i.CODE_POINTS.GREATER_THAN_SIGN}!function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.NAMED_CHARACTER_REFERENCE=72]="NAMED_CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=73]="AMBIGUOUS_AMPERSAND",e[e.NUMERIC_CHARACTER_REFERENCE=74]="NUMERIC_CHARACTER_REFERENCE",e[e.HEXADEMICAL_CHARACTER_REFERENCE_START=75]="HEXADEMICAL_CHARACTER_REFERENCE_START",e[e.HEXADEMICAL_CHARACTER_REFERENCE=76]="HEXADEMICAL_CHARACTER_REFERENCE",e[e.DECIMAL_CHARACTER_REFERENCE=77]="DECIMAL_CHARACTER_REFERENCE",e[e.NUMERIC_CHARACTER_REFERENCE_END=78]="NUMERIC_CHARACTER_REFERENCE_END"}(u||(u={})),t.TokenizerMode={DATA:u.DATA,RCDATA:u.RCDATA,RAWTEXT:u.RAWTEXT,SCRIPT_DATA:u.SCRIPT_DATA,PLAINTEXT:u.PLAINTEXT,CDATA_SECTION:u.CDATA_SECTION};t.Tokenizer=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=u.DATA,this.returnState=u.DATA,this.charRefCode=-1,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new r.Preprocessor(t),this.currentLocation=this.getCurrentLocation(-1)}_err(e){var t,n;null===(n=(t=this.handler).onParseError)||void 0===n||n.call(t,this.preprocessor.getError(e))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,this.inLoop||(this._runParsingLoop(),this.paused||null==e||e())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||null==n||n()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return!!this.preprocessor.endOfChunkHit&&(this._unconsume(this.consumedAfterSnapshot),this.active=!1,!0)}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(e){this.consumedAfterSnapshot-=e,this.preprocessor.retreat(e)}_reconsumeInState(e,t){this.state=e,this._callState(t)}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return!!this.preprocessor.startsWith(e,t)&&(this._advanceBy(e.length-1),!0)}_createStartTagToken(){this.currentToken={type:o.TokenType.START_TAG,tagName:"",tagID:l.TAG_ID.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:o.TokenType.END_TAG,tagName:"",tagID:l.TAG_ID.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:o.TokenType.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:o.TokenType.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e,t;const n=this.currentToken;if(null===(0,o.getTokenAttr)(n,this.currentAttr.name)){if(n.attrs.push(this.currentAttr),n.location&&this.currentLocation){(null!==(e=(t=n.location).attrs)&&void 0!==e?e:t.attrs=Object.create(null))[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(s.ERR.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const e=this.currentToken;this.prepareToken(e),e.tagID=(0,l.getTagID)(e.tagName),e.type===o.TokenType.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(s.ERR.endTagWithAttributes),e.selfClosing&&this._err(s.ERR.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case o.TokenType.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case o.TokenType.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case o.TokenType.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){const e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:o.TokenType.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken){if(this.currentCharacterToken.type===e)return void(this.currentCharacterToken.chars+=t);this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk()}this._createCharacterToken(e,t)}_emitCodePoint(e){const t=b(e)?o.TokenType.WHITESPACE_CHARACTER:e===i.CODE_POINTS.NULL?o.TokenType.NULL_CHARACTER:o.TokenType.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(o.TokenType.CHARACTER,e)}_matchNamedCharacterReference(e){let t=null,n=0,r=!1;for(let s=0,l=a.htmlDecodeTree[0];s>=0&&(s=(0,a.determineBranch)(a.htmlDecodeTree,l,s+1,e),!(s<0));e=this._consume()){n+=1,l=a.htmlDecodeTree[s];const c=l&a.BinTrieFlags.VALUE_LENGTH;if(c){const l=(c>>14)-1;if(e!==i.CODE_POINTS.SEMICOLON&&this._isCharacterReferenceInAttribute()&&((o=this.preprocessor.peek(1))===i.CODE_POINTS.EQUALS_SIGN||m(o))?(t=[i.CODE_POINTS.AMPERSAND],s+=l):(t=0===l?[a.htmlDecodeTree[s]&~a.BinTrieFlags.VALUE_LENGTH]:1===l?[a.htmlDecodeTree[++s]]:[a.htmlDecodeTree[++s],a.htmlDecodeTree[++s]],n=0,r=e!==i.CODE_POINTS.SEMICOLON),0===l){this._consume();break}}}var o;return this._unconsume(n),r&&!this.preprocessor.endOfChunkHit&&this._err(s.ERR.missingSemicolonAfterCharacterReference),this._unconsume(1),t}_isCharacterReferenceInAttribute(){return this.returnState===u.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===u.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===u.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case u.DATA:this._stateData(e);break;case u.RCDATA:this._stateRcdata(e);break;case u.RAWTEXT:this._stateRawtext(e);break;case u.SCRIPT_DATA:this._stateScriptData(e);break;case u.PLAINTEXT:this._statePlaintext(e);break;case u.TAG_OPEN:this._stateTagOpen(e);break;case u.END_TAG_OPEN:this._stateEndTagOpen(e);break;case u.TAG_NAME:this._stateTagName(e);break;case u.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case u.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case u.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case u.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case u.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case u.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case u.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case u.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case u.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case u.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case u.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case u.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case u.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case u.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case u.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case u.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case u.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case u.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case u.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case u.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case u.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case u.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case u.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case u.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case u.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case u.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case u.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case u.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case u.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case u.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case u.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case u.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case u.BOGUS_COMMENT:this._stateBogusComment(e);break;case u.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case u.COMMENT_START:this._stateCommentStart(e);break;case u.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case u.COMMENT:this._stateComment(e);break;case u.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case u.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case u.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case u.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case u.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case u.COMMENT_END:this._stateCommentEnd(e);break;case u.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case u.DOCTYPE:this._stateDoctype(e);break;case u.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case u.DOCTYPE_NAME:this._stateDoctypeName(e);break;case u.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case u.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case u.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case u.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case u.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case u.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case u.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case u.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case u.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case u.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case u.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case u.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case u.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case u.CDATA_SECTION:this._stateCdataSection(e);break;case u.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case u.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case u.CHARACTER_REFERENCE:this._stateCharacterReference(e);break;case u.NAMED_CHARACTER_REFERENCE:this._stateNamedCharacterReference(e);break;case u.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;case u.NUMERIC_CHARACTER_REFERENCE:this._stateNumericCharacterReference(e);break;case u.HEXADEMICAL_CHARACTER_REFERENCE_START:this._stateHexademicalCharacterReferenceStart(e);break;case u.HEXADEMICAL_CHARACTER_REFERENCE:this._stateHexademicalCharacterReference(e);break;case u.DECIMAL_CHARACTER_REFERENCE:this._stateDecimalCharacterReference(e);break;case u.NUMERIC_CHARACTER_REFERENCE_END:this._stateNumericCharacterReferenceEnd(e);break;default:throw new Error("Unknown state")}}_stateData(e){switch(e){case i.CODE_POINTS.LESS_THAN_SIGN:this.state=u.TAG_OPEN;break;case i.CODE_POINTS.AMPERSAND:this.returnState=u.DATA,this.state=u.CHARACTER_REFERENCE;break;case i.CODE_POINTS.NULL:this._err(s.ERR.unexpectedNullCharacter),this._emitCodePoint(e);break;case i.CODE_POINTS.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case i.CODE_POINTS.AMPERSAND:this.returnState=u.RCDATA,this.state=u.CHARACTER_REFERENCE;break;case i.CODE_POINTS.LESS_THAN_SIGN:this.state=u.RCDATA_LESS_THAN_SIGN;break;case i.CODE_POINTS.NULL:this._err(s.ERR.unexpectedNullCharacter),this._emitChars(i.REPLACEMENT_CHARACTER);break;case i.CODE_POINTS.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case i.CODE_POINTS.LESS_THAN_SIGN:this.state=u.RAWTEXT_LESS_THAN_SIGN;break;case i.CODE_POINTS.NULL:this._err(s.ERR.unexpectedNullCharacter),this._emitChars(i.REPLACEMENT_CHARACTER);break;case i.CODE_POINTS.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case i.CODE_POINTS.LESS_THAN_SIGN:this.state=u.SCRIPT_DATA_LESS_THAN_SIGN;break;case i.CODE_POINTS.NULL:this._err(s.ERR.unexpectedNullCharacter),this._emitChars(i.REPLACEMENT_CHARACTER);break;case i.CODE_POINTS.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case i.CODE_POINTS.NULL:this._err(s.ERR.unexpectedNullCharacter),this._emitChars(i.REPLACEMENT_CHARACTER);break;case i.CODE_POINTS.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(p(e))this._createStartTagToken(),this.state=u.TAG_NAME,this._stateTagName(e);else switch(e){case i.CODE_POINTS.EXCLAMATION_MARK:this.state=u.MARKUP_DECLARATION_OPEN;break;case i.CODE_POINTS.SOLIDUS:this.state=u.END_TAG_OPEN;break;case i.CODE_POINTS.QUESTION_MARK:this._err(s.ERR.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=u.BOGUS_COMMENT,this._stateBogusComment(e);break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break;default:this._err(s.ERR.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=u.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(p(e))this._createEndTagToken(),this.state=u.TAG_NAME,this._stateTagName(e);else switch(e){case i.CODE_POINTS.GREATER_THAN_SIGN:this._err(s.ERR.missingEndTagName),this.state=u.DATA;break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break;default:this._err(s.ERR.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=u.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){const t=this.currentToken;switch(e){case i.CODE_POINTS.SPACE:case i.CODE_POINTS.LINE_FEED:case i.CODE_POINTS.TABULATION:case i.CODE_POINTS.FORM_FEED:this.state=u.BEFORE_ATTRIBUTE_NAME;break;case i.CODE_POINTS.SOLIDUS:this.state=u.SELF_CLOSING_START_TAG;break;case i.CODE_POINTS.GREATER_THAN_SIGN:this.state=u.DATA,this.emitCurrentTagToken();break;case i.CODE_POINTS.NULL:this._err(s.ERR.unexpectedNullCharacter),t.tagName+=i.REPLACEMENT_CHARACTER;break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(h(e)?_(e):e)}}_stateRcdataLessThanSign(e){e===i.CODE_POINTS.SOLIDUS?this.state=u.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=u.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){p(e)?(this.state=u.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars("</"),this.state=u.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();this.currentToken.tagName=this.lastStartTagName;switch(this.preprocessor.peek(this.lastStartTagName.length)){case i.CODE_POINTS.SPACE:case i.CODE_POINTS.LINE_FEED:case i.CODE_POINTS.TABULATION:case i.CODE_POINTS.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=u.BEFORE_ATTRIBUTE_NAME,!1;case i.CODE_POINTS.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=u.SELF_CLOSING_START_TAG,!1;case i.CODE_POINTS.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=u.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=u.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===i.CODE_POINTS.SOLIDUS?this.state=u.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=u.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){p(e)?(this.state=u.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars("</"),this.state=u.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=u.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case i.CODE_POINTS.SOLIDUS:this.state=u.SCRIPT_DATA_END_TAG_OPEN;break;case i.CODE_POINTS.EXCLAMATION_MARK:this.state=u.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break;default:this._emitChars("<"),this.state=u.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){p(e)?(this.state=u.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars("</"),this.state=u.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=u.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===i.CODE_POINTS.HYPHEN_MINUS?(this.state=u.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=u.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===i.CODE_POINTS.HYPHEN_MINUS?(this.state=u.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=u.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case i.CODE_POINTS.HYPHEN_MINUS:this.state=u.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break;case i.CODE_POINTS.LESS_THAN_SIGN:this.state=u.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case i.CODE_POINTS.NULL:this._err(s.ERR.unexpectedNullCharacter),this._emitChars(i.REPLACEMENT_CHARACTER);break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case i.CODE_POINTS.HYPHEN_MINUS:this.state=u.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break;case i.CODE_POINTS.LESS_THAN_SIGN:this.state=u.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case i.CODE_POINTS.NULL:this._err(s.ERR.unexpectedNullCharacter),this.state=u.SCRIPT_DATA_ESCAPED,this._emitChars(i.REPLACEMENT_CHARACTER);break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=u.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case i.CODE_POINTS.HYPHEN_MINUS:this._emitChars("-");break;case i.CODE_POINTS.LESS_THAN_SIGN:this.state=u.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case i.CODE_POINTS.GREATER_THAN_SIGN:this.state=u.SCRIPT_DATA,this._emitChars(">");break;case i.CODE_POINTS.NULL:this._err(s.ERR.unexpectedNullCharacter),this.state=u.SCRIPT_DATA_ESCAPED,this._emitChars(i.REPLACEMENT_CHARACTER);break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=u.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===i.CODE_POINTS.SOLIDUS?this.state=u.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:p(e)?(this._emitChars("<"),this.state=u.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=u.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){p(e)?(this.state=u.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("</"),this.state=u.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=u.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(i.SEQUENCES.SCRIPT,!1)&&v(this.preprocessor.peek(i.SEQUENCES.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<i.SEQUENCES.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=u.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=u.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case i.CODE_POINTS.HYPHEN_MINUS:this.state=u.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break;case i.CODE_POINTS.LESS_THAN_SIGN:this.state=u.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case i.CODE_POINTS.NULL:this._err(s.ERR.unexpectedNullCharacter),this._emitChars(i.REPLACEMENT_CHARACTER);break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case i.CODE_POINTS.HYPHEN_MINUS:this.state=u.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break;case i.CODE_POINTS.LESS_THAN_SIGN:this.state=u.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case i.CODE_POINTS.NULL:this._err(s.ERR.unexpectedNullCharacter),this.state=u.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(i.REPLACEMENT_CHARACTER);break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=u.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case i.CODE_POINTS.HYPHEN_MINUS:this._emitChars("-");break;case i.CODE_POINTS.LESS_THAN_SIGN:this.state=u.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case i.CODE_POINTS.GREATER_THAN_SIGN:this.state=u.SCRIPT_DATA,this._emitChars(">");break;case i.CODE_POINTS.NULL:this._err(s.ERR.unexpectedNullCharacter),this.state=u.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(i.REPLACEMENT_CHARACTER);break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=u.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===i.CODE_POINTS.SOLIDUS?(this.state=u.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=u.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(i.SEQUENCES.SCRIPT,!1)&&v(this.preprocessor.peek(i.SEQUENCES.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<i.SEQUENCES.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=u.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=u.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case i.CODE_POINTS.SPACE:case i.CODE_POINTS.LINE_FEED:case i.CODE_POINTS.TABULATION:case i.CODE_POINTS.FORM_FEED:break;case i.CODE_POINTS.SOLIDUS:case i.CODE_POINTS.GREATER_THAN_SIGN:case i.CODE_POINTS.EOF:this.state=u.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case i.CODE_POINTS.EQUALS_SIGN:this._err(s.ERR.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=u.ATTRIBUTE_NAME;break;default:this._createAttr(""),this.state=u.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case i.CODE_POINTS.SPACE:case i.CODE_POINTS.LINE_FEED:case i.CODE_POINTS.TABULATION:case i.CODE_POINTS.FORM_FEED:case i.CODE_POINTS.SOLIDUS:case i.CODE_POINTS.GREATER_THAN_SIGN:case i.CODE_POINTS.EOF:this._leaveAttrName(),this.state=u.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case i.CODE_POINTS.EQUALS_SIGN:this._leaveAttrName(),this.state=u.BEFORE_ATTRIBUTE_VALUE;break;case i.CODE_POINTS.QUOTATION_MARK:case i.CODE_POINTS.APOSTROPHE:case i.CODE_POINTS.LESS_THAN_SIGN:this._err(s.ERR.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case i.CODE_POINTS.NULL:this._err(s.ERR.unexpectedNullCharacter),this.currentAttr.name+=i.REPLACEMENT_CHARACTER;break;default:this.currentAttr.name+=String.fromCodePoint(h(e)?_(e):e)}}_stateAfterAttributeName(e){switch(e){case i.CODE_POINTS.SPACE:case i.CODE_POINTS.LINE_FEED:case i.CODE_POINTS.TABULATION:case i.CODE_POINTS.FORM_FEED:break;case i.CODE_POINTS.SOLIDUS:this.state=u.SELF_CLOSING_START_TAG;break;case i.CODE_POINTS.EQUALS_SIGN:this.state=u.BEFORE_ATTRIBUTE_VALUE;break;case i.CODE_POINTS.GREATER_THAN_SIGN:this.state=u.DATA,this.emitCurrentTagToken();break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofInTag),this._emitEOFToken();break;default:this._createAttr(""),this.state=u.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case i.CODE_POINTS.SPACE:case i.CODE_POINTS.LINE_FEED:case i.CODE_POINTS.TABULATION:case i.CODE_POINTS.FORM_FEED:break;case i.CODE_POINTS.QUOTATION_MARK:this.state=u.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case i.CODE_POINTS.APOSTROPHE:this.state=u.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case i.CODE_POINTS.GREATER_THAN_SIGN:this._err(s.ERR.missingAttributeValue),this.state=u.DATA,this.emitCurrentTagToken();break;default:this.state=u.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case i.CODE_POINTS.QUOTATION_MARK:this.state=u.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case i.CODE_POINTS.AMPERSAND:this.returnState=u.ATTRIBUTE_VALUE_DOUBLE_QUOTED,this.state=u.CHARACTER_REFERENCE;break;case i.CODE_POINTS.NULL:this._err(s.ERR.unexpectedNullCharacter),this.currentAttr.value+=i.REPLACEMENT_CHARACTER;break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case i.CODE_POINTS.APOSTROPHE:this.state=u.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case i.CODE_POINTS.AMPERSAND:this.returnState=u.ATTRIBUTE_VALUE_SINGLE_QUOTED,this.state=u.CHARACTER_REFERENCE;break;case i.CODE_POINTS.NULL:this._err(s.ERR.unexpectedNullCharacter),this.currentAttr.value+=i.REPLACEMENT_CHARACTER;break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case i.CODE_POINTS.SPACE:case i.CODE_POINTS.LINE_FEED:case i.CODE_POINTS.TABULATION:case i.CODE_POINTS.FORM_FEED:this._leaveAttrValue(),this.state=u.BEFORE_ATTRIBUTE_NAME;break;case i.CODE_POINTS.AMPERSAND:this.returnState=u.ATTRIBUTE_VALUE_UNQUOTED,this.state=u.CHARACTER_REFERENCE;break;case i.CODE_POINTS.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=u.DATA,this.emitCurrentTagToken();break;case i.CODE_POINTS.NULL:this._err(s.ERR.unexpectedNullCharacter),this.currentAttr.value+=i.REPLACEMENT_CHARACTER;break;case i.CODE_POINTS.QUOTATION_MARK:case i.CODE_POINTS.APOSTROPHE:case i.CODE_POINTS.LESS_THAN_SIGN:case i.CODE_POINTS.EQUALS_SIGN:case i.CODE_POINTS.GRAVE_ACCENT:this._err(s.ERR.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case i.CODE_POINTS.SPACE:case i.CODE_POINTS.LINE_FEED:case i.CODE_POINTS.TABULATION:case i.CODE_POINTS.FORM_FEED:this._leaveAttrValue(),this.state=u.BEFORE_ATTRIBUTE_NAME;break;case i.CODE_POINTS.SOLIDUS:this._leaveAttrValue(),this.state=u.SELF_CLOSING_START_TAG;break;case i.CODE_POINTS.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=u.DATA,this.emitCurrentTagToken();break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofInTag),this._emitEOFToken();break;default:this._err(s.ERR.missingWhitespaceBetweenAttributes),this.state=u.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case i.CODE_POINTS.GREATER_THAN_SIGN:this.currentToken.selfClosing=!0,this.state=u.DATA,this.emitCurrentTagToken();break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofInTag),this._emitEOFToken();break;default:this._err(s.ERR.unexpectedSolidusInTag),this.state=u.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){const t=this.currentToken;switch(e){case i.CODE_POINTS.GREATER_THAN_SIGN:this.state=u.DATA,this.emitCurrentComment(t);break;case i.CODE_POINTS.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case i.CODE_POINTS.NULL:this._err(s.ERR.unexpectedNullCharacter),t.data+=i.REPLACEMENT_CHARACTER;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(i.SEQUENCES.DASH_DASH,!0)?(this._createCommentToken(i.SEQUENCES.DASH_DASH.length+1),this.state=u.COMMENT_START):this._consumeSequenceIfMatch(i.SEQUENCES.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(i.SEQUENCES.DOCTYPE.length+1),this.state=u.DOCTYPE):this._consumeSequenceIfMatch(i.SEQUENCES.CDATA_START,!0)?this.inForeignNode?this.state=u.CDATA_SECTION:(this._err(s.ERR.cdataInHtmlContent),this._createCommentToken(i.SEQUENCES.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=u.BOGUS_COMMENT):this._ensureHibernation()||(this._err(s.ERR.incorrectlyOpenedComment),this._createCommentToken(2),this.state=u.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case i.CODE_POINTS.HYPHEN_MINUS:this.state=u.COMMENT_START_DASH;break;case i.CODE_POINTS.GREATER_THAN_SIGN:{this._err(s.ERR.abruptClosingOfEmptyComment),this.state=u.DATA;const e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=u.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){const t=this.currentToken;switch(e){case i.CODE_POINTS.HYPHEN_MINUS:this.state=u.COMMENT_END;break;case i.CODE_POINTS.GREATER_THAN_SIGN:this._err(s.ERR.abruptClosingOfEmptyComment),this.state=u.DATA,this.emitCurrentComment(t);break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=u.COMMENT,this._stateComment(e)}}_stateComment(e){const t=this.currentToken;switch(e){case i.CODE_POINTS.HYPHEN_MINUS:this.state=u.COMMENT_END_DASH;break;case i.CODE_POINTS.LESS_THAN_SIGN:t.data+="<",this.state=u.COMMENT_LESS_THAN_SIGN;break;case i.CODE_POINTS.NULL:this._err(s.ERR.unexpectedNullCharacter),t.data+=i.REPLACEMENT_CHARACTER;break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){const t=this.currentToken;switch(e){case i.CODE_POINTS.EXCLAMATION_MARK:t.data+="!",this.state=u.COMMENT_LESS_THAN_SIGN_BANG;break;case i.CODE_POINTS.LESS_THAN_SIGN:t.data+="<";break;default:this.state=u.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===i.CODE_POINTS.HYPHEN_MINUS?this.state=u.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=u.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===i.CODE_POINTS.HYPHEN_MINUS?this.state=u.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=u.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==i.CODE_POINTS.GREATER_THAN_SIGN&&e!==i.CODE_POINTS.EOF&&this._err(s.ERR.nestedComment),this.state=u.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){const t=this.currentToken;switch(e){case i.CODE_POINTS.HYPHEN_MINUS:this.state=u.COMMENT_END;break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=u.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){const t=this.currentToken;switch(e){case i.CODE_POINTS.GREATER_THAN_SIGN:this.state=u.DATA,this.emitCurrentComment(t);break;case i.CODE_POINTS.EXCLAMATION_MARK:this.state=u.COMMENT_END_BANG;break;case i.CODE_POINTS.HYPHEN_MINUS:t.data+="-";break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--",this.state=u.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){const t=this.currentToken;switch(e){case i.CODE_POINTS.HYPHEN_MINUS:t.data+="--!",this.state=u.COMMENT_END_DASH;break;case i.CODE_POINTS.GREATER_THAN_SIGN:this._err(s.ERR.incorrectlyClosedComment),this.state=u.DATA,this.emitCurrentComment(t);break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--!",this.state=u.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case i.CODE_POINTS.SPACE:case i.CODE_POINTS.LINE_FEED:case i.CODE_POINTS.TABULATION:case i.CODE_POINTS.FORM_FEED:this.state=u.BEFORE_DOCTYPE_NAME;break;case i.CODE_POINTS.GREATER_THAN_SIGN:this.state=u.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case i.CODE_POINTS.EOF:{this._err(s.ERR.eofInDoctype),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(s.ERR.missingWhitespaceBeforeDoctypeName),this.state=u.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(h(e))this._createDoctypeToken(String.fromCharCode(_(e))),this.state=u.DOCTYPE_NAME;else switch(e){case i.CODE_POINTS.SPACE:case i.CODE_POINTS.LINE_FEED:case i.CODE_POINTS.TABULATION:case i.CODE_POINTS.FORM_FEED:break;case i.CODE_POINTS.NULL:this._err(s.ERR.unexpectedNullCharacter),this._createDoctypeToken(i.REPLACEMENT_CHARACTER),this.state=u.DOCTYPE_NAME;break;case i.CODE_POINTS.GREATER_THAN_SIGN:{this._err(s.ERR.missingDoctypeName),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=u.DATA;break}case i.CODE_POINTS.EOF:{this._err(s.ERR.eofInDoctype),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=u.DOCTYPE_NAME}}_stateDoctypeName(e){const t=this.currentToken;switch(e){case i.CODE_POINTS.SPACE:case i.CODE_POINTS.LINE_FEED:case i.CODE_POINTS.TABULATION:case i.CODE_POINTS.FORM_FEED:this.state=u.AFTER_DOCTYPE_NAME;break;case i.CODE_POINTS.GREATER_THAN_SIGN:this.state=u.DATA,this.emitCurrentDoctype(t);break;case i.CODE_POINTS.NULL:this._err(s.ERR.unexpectedNullCharacter),t.name+=i.REPLACEMENT_CHARACTER;break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(h(e)?_(e):e)}}_stateAfterDoctypeName(e){const t=this.currentToken;switch(e){case i.CODE_POINTS.SPACE:case i.CODE_POINTS.LINE_FEED:case i.CODE_POINTS.TABULATION:case i.CODE_POINTS.FORM_FEED:break;case i.CODE_POINTS.GREATER_THAN_SIGN:this.state=u.DATA,this.emitCurrentDoctype(t);break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(i.SEQUENCES.PUBLIC,!1)?this.state=u.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(i.SEQUENCES.SYSTEM,!1)?this.state=u.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(s.ERR.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=u.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){const t=this.currentToken;switch(e){case i.CODE_POINTS.SPACE:case i.CODE_POINTS.LINE_FEED:case i.CODE_POINTS.TABULATION:case i.CODE_POINTS.FORM_FEED:this.state=u.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case i.CODE_POINTS.QUOTATION_MARK:this._err(s.ERR.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=u.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case i.CODE_POINTS.APOSTROPHE:this._err(s.ERR.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=u.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case i.CODE_POINTS.GREATER_THAN_SIGN:this._err(s.ERR.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=u.DATA,this.emitCurrentDoctype(t);break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(s.ERR.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=u.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case i.CODE_POINTS.SPACE:case i.CODE_POINTS.LINE_FEED:case i.CODE_POINTS.TABULATION:case i.CODE_POINTS.FORM_FEED:break;case i.CODE_POINTS.QUOTATION_MARK:t.publicId="",this.state=u.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case i.CODE_POINTS.APOSTROPHE:t.publicId="",this.state=u.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case i.CODE_POINTS.GREATER_THAN_SIGN:this._err(s.ERR.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=u.DATA,this.emitCurrentDoctype(t);break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(s.ERR.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=u.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case i.CODE_POINTS.QUOTATION_MARK:this.state=u.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case i.CODE_POINTS.NULL:this._err(s.ERR.unexpectedNullCharacter),t.publicId+=i.REPLACEMENT_CHARACTER;break;case i.CODE_POINTS.GREATER_THAN_SIGN:this._err(s.ERR.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=u.DATA;break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case i.CODE_POINTS.APOSTROPHE:this.state=u.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case i.CODE_POINTS.NULL:this._err(s.ERR.unexpectedNullCharacter),t.publicId+=i.REPLACEMENT_CHARACTER;break;case i.CODE_POINTS.GREATER_THAN_SIGN:this._err(s.ERR.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=u.DATA;break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case i.CODE_POINTS.SPACE:case i.CODE_POINTS.LINE_FEED:case i.CODE_POINTS.TABULATION:case i.CODE_POINTS.FORM_FEED:this.state=u.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case i.CODE_POINTS.GREATER_THAN_SIGN:this.state=u.DATA,this.emitCurrentDoctype(t);break;case i.CODE_POINTS.QUOTATION_MARK:this._err(s.ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=u.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case i.CODE_POINTS.APOSTROPHE:this._err(s.ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=u.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(s.ERR.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=u.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){const t=this.currentToken;switch(e){case i.CODE_POINTS.SPACE:case i.CODE_POINTS.LINE_FEED:case i.CODE_POINTS.TABULATION:case i.CODE_POINTS.FORM_FEED:break;case i.CODE_POINTS.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=u.DATA;break;case i.CODE_POINTS.QUOTATION_MARK:t.systemId="",this.state=u.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case i.CODE_POINTS.APOSTROPHE:t.systemId="",this.state=u.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(s.ERR.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=u.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){const t=this.currentToken;switch(e){case i.CODE_POINTS.SPACE:case i.CODE_POINTS.LINE_FEED:case i.CODE_POINTS.TABULATION:case i.CODE_POINTS.FORM_FEED:this.state=u.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case i.CODE_POINTS.QUOTATION_MARK:this._err(s.ERR.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=u.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case i.CODE_POINTS.APOSTROPHE:this._err(s.ERR.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=u.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case i.CODE_POINTS.GREATER_THAN_SIGN:this._err(s.ERR.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=u.DATA,this.emitCurrentDoctype(t);break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(s.ERR.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=u.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case i.CODE_POINTS.SPACE:case i.CODE_POINTS.LINE_FEED:case i.CODE_POINTS.TABULATION:case i.CODE_POINTS.FORM_FEED:break;case i.CODE_POINTS.QUOTATION_MARK:t.systemId="",this.state=u.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case i.CODE_POINTS.APOSTROPHE:t.systemId="",this.state=u.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case i.CODE_POINTS.GREATER_THAN_SIGN:this._err(s.ERR.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=u.DATA,this.emitCurrentDoctype(t);break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(s.ERR.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=u.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case i.CODE_POINTS.QUOTATION_MARK:this.state=u.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case i.CODE_POINTS.NULL:this._err(s.ERR.unexpectedNullCharacter),t.systemId+=i.REPLACEMENT_CHARACTER;break;case i.CODE_POINTS.GREATER_THAN_SIGN:this._err(s.ERR.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=u.DATA;break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case i.CODE_POINTS.APOSTROPHE:this.state=u.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case i.CODE_POINTS.NULL:this._err(s.ERR.unexpectedNullCharacter),t.systemId+=i.REPLACEMENT_CHARACTER;break;case i.CODE_POINTS.GREATER_THAN_SIGN:this._err(s.ERR.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=u.DATA;break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case i.CODE_POINTS.SPACE:case i.CODE_POINTS.LINE_FEED:case i.CODE_POINTS.TABULATION:case i.CODE_POINTS.FORM_FEED:break;case i.CODE_POINTS.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=u.DATA;break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(s.ERR.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=u.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){const t=this.currentToken;switch(e){case i.CODE_POINTS.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=u.DATA;break;case i.CODE_POINTS.NULL:this._err(s.ERR.unexpectedNullCharacter);break;case i.CODE_POINTS.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case i.CODE_POINTS.RIGHT_SQUARE_BRACKET:this.state=u.CDATA_SECTION_BRACKET;break;case i.CODE_POINTS.EOF:this._err(s.ERR.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===i.CODE_POINTS.RIGHT_SQUARE_BRACKET?this.state=u.CDATA_SECTION_END:(this._emitChars("]"),this.state=u.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case i.CODE_POINTS.GREATER_THAN_SIGN:this.state=u.DATA;break;case i.CODE_POINTS.RIGHT_SQUARE_BRACKET:this._emitChars("]");break;default:this._emitChars("]]"),this.state=u.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(e){e===i.CODE_POINTS.NUMBER_SIGN?this.state=u.NUMERIC_CHARACTER_REFERENCE:m(e)?(this.state=u.NAMED_CHARACTER_REFERENCE,this._stateNamedCharacterReference(e)):(this._flushCodePointConsumedAsCharacterReference(i.CODE_POINTS.AMPERSAND),this._reconsumeInState(this.returnState,e))}_stateNamedCharacterReference(e){const t=this._matchNamedCharacterReference(e);if(this._ensureHibernation());else if(t){for(let e=0;e<t.length;e++)this._flushCodePointConsumedAsCharacterReference(t[e]);this.state=this.returnState}else this._flushCodePointConsumedAsCharacterReference(i.CODE_POINTS.AMPERSAND),this.state=u.AMBIGUOUS_AMPERSAND}_stateAmbiguousAmpersand(e){m(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===i.CODE_POINTS.SEMICOLON&&this._err(s.ERR.unknownNamedCharacterReference),this._reconsumeInState(this.returnState,e))}_stateNumericCharacterReference(e){this.charRefCode=0,e===i.CODE_POINTS.LATIN_SMALL_X||e===i.CODE_POINTS.LATIN_CAPITAL_X?this.state=u.HEXADEMICAL_CHARACTER_REFERENCE_START:d(e)?(this.state=u.DECIMAL_CHARACTER_REFERENCE,this._stateDecimalCharacterReference(e)):(this._err(s.ERR.absenceOfDigitsInNumericCharacterReference),this._flushCodePointConsumedAsCharacterReference(i.CODE_POINTS.AMPERSAND),this._flushCodePointConsumedAsCharacterReference(i.CODE_POINTS.NUMBER_SIGN),this._reconsumeInState(this.returnState,e))}_stateHexademicalCharacterReferenceStart(e){!function(e){return d(e)||g(e)||f(e)}(e)?(this._err(s.ERR.absenceOfDigitsInNumericCharacterReference),this._flushCodePointConsumedAsCharacterReference(i.CODE_POINTS.AMPERSAND),this._flushCodePointConsumedAsCharacterReference(i.CODE_POINTS.NUMBER_SIGN),this._unconsume(2),this.state=this.returnState):(this.state=u.HEXADEMICAL_CHARACTER_REFERENCE,this._stateHexademicalCharacterReference(e))}_stateHexademicalCharacterReference(e){g(e)?this.charRefCode=16*this.charRefCode+e-55:f(e)?this.charRefCode=16*this.charRefCode+e-87:d(e)?this.charRefCode=16*this.charRefCode+e-48:e===i.CODE_POINTS.SEMICOLON?this.state=u.NUMERIC_CHARACTER_REFERENCE_END:(this._err(s.ERR.missingSemicolonAfterCharacterReference),this.state=u.NUMERIC_CHARACTER_REFERENCE_END,this._stateNumericCharacterReferenceEnd(e))}_stateDecimalCharacterReference(e){d(e)?this.charRefCode=10*this.charRefCode+e-48:e===i.CODE_POINTS.SEMICOLON?this.state=u.NUMERIC_CHARACTER_REFERENCE_END:(this._err(s.ERR.missingSemicolonAfterCharacterReference),this.state=u.NUMERIC_CHARACTER_REFERENCE_END,this._stateNumericCharacterReferenceEnd(e))}_stateNumericCharacterReferenceEnd(e){if(this.charRefCode===i.CODE_POINTS.NULL)this._err(s.ERR.nullCharacterReference),this.charRefCode=i.CODE_POINTS.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(s.ERR.characterReferenceOutsideUnicodeRange),this.charRefCode=i.CODE_POINTS.REPLACEMENT_CHARACTER;else if((0,i.isSurrogate)(this.charRefCode))this._err(s.ERR.surrogateCharacterReference),this.charRefCode=i.CODE_POINTS.REPLACEMENT_CHARACTER;else if((0,i.isUndefinedCodePoint)(this.charRefCode))this._err(s.ERR.noncharacterCharacterReference);else if((0,i.isControlCodePoint)(this.charRefCode)||this.charRefCode===i.CODE_POINTS.CARRIAGE_RETURN){this._err(s.ERR.controlCharacterReference);const e=c.get(this.charRefCode);void 0!==e&&(this.charRefCode=e)}this._flushCodePointConsumedAsCharacterReference(this.charRefCode),this._reconsumeInState(this.returnState,e)}}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.replaceCodePoint=t.fromCodePoint=void 0;var i=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function o(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=i.get(e))&&void 0!==t?t:e}t.fromCodePoint=null!==(r=String.fromCodePoint)&&void 0!==r?r:function(e){var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e)},t.replaceCodePoint=o,t.default=function(e){return(0,t.fromCodePoint)(o(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isIntegrationPoint=t.adjustTokenSVGTagName=t.adjustTokenXMLAttrs=t.adjustTokenSVGAttrs=t.adjustTokenMathMLAttrs=t.causesExit=t.SVG_TAG_NAMES_ADJUSTMENT_MAP=void 0;const r=n(275),i={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},o="definitionurl",a="definitionURL",s=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map((e=>[e.toLowerCase(),e]))),l=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:r.NS.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:r.NS.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:r.NS.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:r.NS.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:r.NS.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:r.NS.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:r.NS.XLINK}],["xml:base",{prefix:"xml",name:"base",namespace:r.NS.XML}],["xml:lang",{prefix:"xml",name:"lang",namespace:r.NS.XML}],["xml:space",{prefix:"xml",name:"space",namespace:r.NS.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:r.NS.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:r.NS.XMLNS}]]);t.SVG_TAG_NAMES_ADJUSTMENT_MAP=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map((e=>[e.toLowerCase(),e])));const c=new Set([r.TAG_ID.B,r.TAG_ID.BIG,r.TAG_ID.BLOCKQUOTE,r.TAG_ID.BODY,r.TAG_ID.BR,r.TAG_ID.CENTER,r.TAG_ID.CODE,r.TAG_ID.DD,r.TAG_ID.DIV,r.TAG_ID.DL,r.TAG_ID.DT,r.TAG_ID.EM,r.TAG_ID.EMBED,r.TAG_ID.H1,r.TAG_ID.H2,r.TAG_ID.H3,r.TAG_ID.H4,r.TAG_ID.H5,r.TAG_ID.H6,r.TAG_ID.HEAD,r.TAG_ID.HR,r.TAG_ID.I,r.TAG_ID.IMG,r.TAG_ID.LI,r.TAG_ID.LISTING,r.TAG_ID.MENU,r.TAG_ID.META,r.TAG_ID.NOBR,r.TAG_ID.OL,r.TAG_ID.P,r.TAG_ID.PRE,r.TAG_ID.RUBY,r.TAG_ID.S,r.TAG_ID.SMALL,r.TAG_ID.SPAN,r.TAG_ID.STRONG,r.TAG_ID.STRIKE,r.TAG_ID.SUB,r.TAG_ID.SUP,r.TAG_ID.TABLE,r.TAG_ID.TT,r.TAG_ID.U,r.TAG_ID.UL,r.TAG_ID.VAR]);t.causesExit=function(e){const t=e.tagID;return t===r.TAG_ID.FONT&&e.attrs.some((({name:e})=>e===r.ATTRS.COLOR||e===r.ATTRS.SIZE||e===r.ATTRS.FACE))||c.has(t)},t.adjustTokenMathMLAttrs=function(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===o){e.attrs[t].name=a;break}},t.adjustTokenSVGAttrs=function(e){for(let t=0;t<e.attrs.length;t++){const n=s.get(e.attrs[t].name);null!=n&&(e.attrs[t].name=n)}},t.adjustTokenXMLAttrs=function(e){for(let t=0;t<e.attrs.length;t++){const n=l.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}},t.adjustTokenSVGTagName=function(e){const n=t.SVG_TAG_NAMES_ADJUSTMENT_MAP.get(e.tagName);null!=n&&(e.tagName=n,e.tagID=(0,r.getTagID)(e.tagName))},t.isIntegrationPoint=function(e,t,n,o){return(!o||o===r.NS.HTML)&&function(e,t,n){if(t===r.NS.MATHML&&e===r.TAG_ID.ANNOTATION_XML)for(let e=0;e<n.length;e++)if(n[e].name===r.ATTRS.ENCODING){const t=n[e].value.toLowerCase();return t===i.TEXT_HTML||t===i.APPLICATION_XML}return t===r.NS.SVG&&(e===r.TAG_ID.FOREIGN_OBJECT||e===r.TAG_ID.DESC||e===r.TAG_ID.TITLE)}(e,t,n)||(!o||o===r.NS.MATHML)&&function(e,t){return t===r.NS.MATHML&&(e===r.TAG_ID.MI||e===r.TAG_ID.MO||e===r.TAG_ID.MN||e===r.TAG_ID.MS||e===r.TAG_ID.MTEXT)}(e,t)}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultHandler=t.DomUtils=t.parseFeed=t.getFeed=t.ElementType=t.Tokenizer=t.createDomStream=t.parseDOM=t.parseDocument=t.DomHandler=t.Parser=void 0;var s=n(1093);Object.defineProperty(t,"Parser",{enumerable:!0,get:function(){return s.Parser}});var l=n(210);function c(e,t){var n=new l.DomHandler(void 0,t);return new s.Parser(n,t).end(e),n.root}function u(e,t){return c(e,t).children}Object.defineProperty(t,"DomHandler",{enumerable:!0,get:function(){return l.DomHandler}}),Object.defineProperty(t,"DefaultHandler",{enumerable:!0,get:function(){return l.DomHandler}}),t.parseDocument=c,t.parseDOM=u,t.createDomStream=function(e,t,n){var r=new l.DomHandler(e,t,n);return new s.Parser(r,t)};var d=n(721);Object.defineProperty(t,"Tokenizer",{enumerable:!0,get:function(){return a(d).default}});var h=o(n(371));t.ElementType=h;var p=n(257);Object.defineProperty(t,"getFeed",{enumerable:!0,get:function(){return p.getFeed}}),t.parseFeed=function(e,t){return void 0===t&&(t={xmlMode:!0}),(0,p.getFeed)(u(e,t))},t.DomUtils=o(n(257))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuoteType=void 0;var r,i,o,a=n(722);function s(e){return e===r.Space||e===r.NewLine||e===r.Tab||e===r.FormFeed||e===r.CarriageReturn}function l(e){return e===r.Slash||e===r.Gt||s(e)}function c(e){return e>=r.Zero&&e<=r.Nine}!function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Num=35]="Num",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"}(r||(r={})),function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.InSpecialComment=20]="InSpecialComment",e[e.InCommentLike=21]="InCommentLike",e[e.BeforeSpecialS=22]="BeforeSpecialS",e[e.SpecialStartSequence=23]="SpecialStartSequence",e[e.InSpecialTag=24]="InSpecialTag",e[e.BeforeEntity=25]="BeforeEntity",e[e.BeforeNumericEntity=26]="BeforeNumericEntity",e[e.InNamedEntity=27]="InNamedEntity",e[e.InNumericEntity=28]="InNumericEntity",e[e.InHexEntity=29]="InHexEntity"}(i||(i={})),function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"}(o=t.QuoteType||(t.QuoteType={}));var u={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])},d=function(){function e(e,t){var n=e.xmlMode,r=void 0!==n&&n,o=e.decodeEntities,s=void 0===o||o;this.cbs=t,this.state=i.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=i.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=r,this.decodeEntities=s,this.entityTrie=r?a.xmlDecodeTree:a.htmlDecodeTree}return e.prototype.reset=function(){this.state=i.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=i.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},e.prototype.write=function(e){this.offset+=this.buffer.length,this.buffer=e,this.parse()},e.prototype.end=function(){this.running&&this.finish()},e.prototype.pause=function(){this.running=!1},e.prototype.resume=function(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()},e.prototype.getIndex=function(){return this.index},e.prototype.getSectionStart=function(){return this.sectionStart},e.prototype.stateText=function(e){e===r.Lt||!this.decodeEntities&&this.fastForwardTo(r.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=i.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&e===r.Amp&&(this.state=i.BeforeEntity)},e.prototype.stateSpecialStartSequence=function(e){var t=this.sequenceIndex===this.currentSequence.length;if(t?l(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t)return void this.sequenceIndex++}else this.isSpecial=!1;this.sequenceIndex=0,this.state=i.InTagName,this.stateInTagName(e)},e.prototype.stateInSpecialTag=function(e){if(this.sequenceIndex===this.currentSequence.length){if(e===r.Gt||s(e)){var t=this.index-this.currentSequence.length;if(this.sectionStart<t){var n=this.index;this.index=t,this.cbs.ontext(this.sectionStart,t),this.index=n}return this.isSpecial=!1,this.sectionStart=t+2,void this.stateInClosingTagName(e)}this.sequenceIndex=0}(32|e)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:0===this.sequenceIndex?this.currentSequence===u.TitleEnd?this.decodeEntities&&e===r.Amp&&(this.state=i.BeforeEntity):this.fastForwardTo(r.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=Number(e===r.Lt)},e.prototype.stateCDATASequence=function(e){e===u.Cdata[this.sequenceIndex]?++this.sequenceIndex===u.Cdata.length&&(this.state=i.InCommentLike,this.currentSequence=u.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=i.InDeclaration,this.stateInDeclaration(e))},e.prototype.fastForwardTo=function(e){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===e)return!0;return this.index=this.buffer.length+this.offset-1,!1},e.prototype.stateInCommentLike=function(e){e===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===u.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=i.Text):0===this.sequenceIndex?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)},e.prototype.isTagStartChar=function(e){return this.xmlMode?!l(e):function(e){return e>=r.LowerA&&e<=r.LowerZ||e>=r.UpperA&&e<=r.UpperZ}(e)},e.prototype.startSpecial=function(e,t){this.isSpecial=!0,this.currentSequence=e,this.sequenceIndex=t,this.state=i.SpecialStartSequence},e.prototype.stateBeforeTagName=function(e){if(e===r.ExclamationMark)this.state=i.BeforeDeclaration,this.sectionStart=this.index+1;else if(e===r.Questionmark)this.state=i.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(e)){var t=32|e;this.sectionStart=this.index,this.xmlMode||t!==u.TitleEnd[2]?this.state=this.xmlMode||t!==u.ScriptEnd[2]?i.InTagName:i.BeforeSpecialS:this.startSpecial(u.TitleEnd,3)}else e===r.Slash?this.state=i.BeforeClosingTagName:(this.state=i.Text,this.stateText(e))},e.prototype.stateInTagName=function(e){l(e)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e))},e.prototype.stateBeforeClosingTagName=function(e){s(e)||(e===r.Gt?this.state=i.Text:(this.state=this.isTagStartChar(e)?i.InClosingTagName:i.InSpecialComment,this.sectionStart=this.index))},e.prototype.stateInClosingTagName=function(e){(e===r.Gt||s(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.AfterClosingTagName,this.stateAfterClosingTagName(e))},e.prototype.stateAfterClosingTagName=function(e){(e===r.Gt||this.fastForwardTo(r.Gt))&&(this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeAttributeName=function(e){e===r.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=i.InSpecialTag,this.sequenceIndex=0):this.state=i.Text,this.baseState=this.state,this.sectionStart=this.index+1):e===r.Slash?this.state=i.InSelfClosingTag:s(e)||(this.state=i.InAttributeName,this.sectionStart=this.index)},e.prototype.stateInSelfClosingTag=function(e){e===r.Gt?(this.cbs.onselfclosingtag(this.index),this.state=i.Text,this.baseState=i.Text,this.sectionStart=this.index+1,this.isSpecial=!1):s(e)||(this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e))},e.prototype.stateInAttributeName=function(e){(e===r.Eq||l(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.AfterAttributeName,this.stateAfterAttributeName(e))},e.prototype.stateAfterAttributeName=function(e){e===r.Eq?this.state=i.BeforeAttributeValue:e===r.Slash||e===r.Gt?(this.cbs.onattribend(o.NoValue,this.index),this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e)):s(e)||(this.cbs.onattribend(o.NoValue,this.index),this.state=i.InAttributeName,this.sectionStart=this.index)},e.prototype.stateBeforeAttributeValue=function(e){e===r.DoubleQuote?(this.state=i.InAttributeValueDq,this.sectionStart=this.index+1):e===r.SingleQuote?(this.state=i.InAttributeValueSq,this.sectionStart=this.index+1):s(e)||(this.sectionStart=this.index,this.state=i.InAttributeValueNq,this.stateInAttributeValueNoQuotes(e))},e.prototype.handleInAttributeValue=function(e,t){e===t||!this.decodeEntities&&this.fastForwardTo(t)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(t===r.DoubleQuote?o.Double:o.Single,this.index),this.state=i.BeforeAttributeName):this.decodeEntities&&e===r.Amp&&(this.baseState=this.state,this.state=i.BeforeEntity)},e.prototype.stateInAttributeValueDoubleQuotes=function(e){this.handleInAttributeValue(e,r.DoubleQuote)},e.prototype.stateInAttributeValueSingleQuotes=function(e){this.handleInAttributeValue(e,r.SingleQuote)},e.prototype.stateInAttributeValueNoQuotes=function(e){s(e)||e===r.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(o.Unquoted,this.index),this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e)):this.decodeEntities&&e===r.Amp&&(this.baseState=this.state,this.state=i.BeforeEntity)},e.prototype.stateBeforeDeclaration=function(e){e===r.OpeningSquareBracket?(this.state=i.CDATASequence,this.sequenceIndex=0):this.state=e===r.Dash?i.BeforeComment:i.InDeclaration},e.prototype.stateInDeclaration=function(e){(e===r.Gt||this.fastForwardTo(r.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateInProcessingInstruction=function(e){(e===r.Gt||this.fastForwardTo(r.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeComment=function(e){e===r.Dash?(this.state=i.InCommentLike,this.currentSequence=u.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=i.InDeclaration},e.prototype.stateInSpecialComment=function(e){(e===r.Gt||this.fastForwardTo(r.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeSpecialS=function(e){var t=32|e;t===u.ScriptEnd[3]?this.startSpecial(u.ScriptEnd,4):t===u.StyleEnd[3]?this.startSpecial(u.StyleEnd,4):(this.state=i.InTagName,this.stateInTagName(e))},e.prototype.stateBeforeEntity=function(e){this.entityExcess=1,this.entityResult=0,e===r.Num?this.state=i.BeforeNumericEntity:e===r.Amp||(this.trieIndex=0,this.trieCurrent=this.entityTrie[0],this.state=i.InNamedEntity,this.stateInNamedEntity(e))},e.prototype.stateInNamedEntity=function(e){if(this.entityExcess+=1,this.trieIndex=(0,a.determineBranch)(this.entityTrie,this.trieCurrent,this.trieIndex+1,e),this.trieIndex<0)return this.emitNamedEntity(),void this.index--;this.trieCurrent=this.entityTrie[this.trieIndex];var t=this.trieCurrent&a.BinTrieFlags.VALUE_LENGTH;if(t){var n=(t>>14)-1;if(this.allowLegacyEntity()||e===r.Semi){var i=this.index-this.entityExcess+1;i>this.sectionStart&&this.emitPartial(this.sectionStart,i),this.entityResult=this.trieIndex,this.trieIndex+=n,this.entityExcess=0,this.sectionStart=this.index+1,0===n&&this.emitNamedEntity()}else this.trieIndex+=n}},e.prototype.emitNamedEntity=function(){if(this.state=this.baseState,0!==this.entityResult)switch((this.entityTrie[this.entityResult]&a.BinTrieFlags.VALUE_LENGTH)>>14){case 1:this.emitCodePoint(this.entityTrie[this.entityResult]&~a.BinTrieFlags.VALUE_LENGTH);break;case 2:this.emitCodePoint(this.entityTrie[this.entityResult+1]);break;case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}},e.prototype.stateBeforeNumericEntity=function(e){(32|e)===r.LowerX?(this.entityExcess++,this.state=i.InHexEntity):(this.state=i.InNumericEntity,this.stateInNumericEntity(e))},e.prototype.emitNumericEntity=function(e){var t=this.index-this.entityExcess-1;t+2+Number(this.state===i.InHexEntity)!==this.index&&(t>this.sectionStart&&this.emitPartial(this.sectionStart,t),this.sectionStart=this.index+Number(e),this.emitCodePoint((0,a.replaceCodePoint)(this.entityResult))),this.state=this.baseState},e.prototype.stateInNumericEntity=function(e){e===r.Semi?this.emitNumericEntity(!0):c(e)?(this.entityResult=10*this.entityResult+(e-r.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},e.prototype.stateInHexEntity=function(e){e===r.Semi?this.emitNumericEntity(!0):c(e)?(this.entityResult=16*this.entityResult+(e-r.Zero),this.entityExcess++):!function(e){return e>=r.UpperA&&e<=r.UpperF||e>=r.LowerA&&e<=r.LowerF}(e)?(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--):(this.entityResult=16*this.entityResult+((32|e)-r.LowerA+10),this.entityExcess++)},e.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===i.Text||this.baseState===i.InSpecialTag)},e.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===i.Text||this.state===i.InSpecialTag&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):this.state!==i.InAttributeValueDq&&this.state!==i.InAttributeValueSq&&this.state!==i.InAttributeValueNq||(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},e.prototype.shouldContinue=function(){return this.index<this.buffer.length+this.offset&&this.running},e.prototype.parse=function(){for(;this.shouldContinue();){var e=this.buffer.charCodeAt(this.index-this.offset);this.state===i.Text?this.stateText(e):this.state===i.SpecialStartSequence?this.stateSpecialStartSequence(e):this.state===i.InSpecialTag?this.stateInSpecialTag(e):this.state===i.CDATASequence?this.stateCDATASequence(e):this.state===i.InAttributeValueDq?this.stateInAttributeValueDoubleQuotes(e):this.state===i.InAttributeName?this.stateInAttributeName(e):this.state===i.InCommentLike?this.stateInCommentLike(e):this.state===i.InSpecialComment?this.stateInSpecialComment(e):this.state===i.BeforeAttributeName?this.stateBeforeAttributeName(e):this.state===i.InTagName?this.stateInTagName(e):this.state===i.InClosingTagName?this.stateInClosingTagName(e):this.state===i.BeforeTagName?this.stateBeforeTagName(e):this.state===i.AfterAttributeName?this.stateAfterAttributeName(e):this.state===i.InAttributeValueSq?this.stateInAttributeValueSingleQuotes(e):this.state===i.BeforeAttributeValue?this.stateBeforeAttributeValue(e):this.state===i.BeforeClosingTagName?this.stateBeforeClosingTagName(e):this.state===i.AfterClosingTagName?this.stateAfterClosingTagName(e):this.state===i.BeforeSpecialS?this.stateBeforeSpecialS(e):this.state===i.InAttributeValueNq?this.stateInAttributeValueNoQuotes(e):this.state===i.InSelfClosingTag?this.stateInSelfClosingTag(e):this.state===i.InDeclaration?this.stateInDeclaration(e):this.state===i.BeforeDeclaration?this.stateBeforeDeclaration(e):this.state===i.BeforeComment?this.stateBeforeComment(e):this.state===i.InProcessingInstruction?this.stateInProcessingInstruction(e):this.state===i.InNamedEntity?this.stateInNamedEntity(e):this.state===i.BeforeEntity?this.stateBeforeEntity(e):this.state===i.InHexEntity?this.stateInHexEntity(e):this.state===i.InNumericEntity?this.stateInNumericEntity(e):this.stateBeforeNumericEntity(e),this.index++}this.cleanup()},e.prototype.finish=function(){this.state===i.InNamedEntity&&this.emitNamedEntity(),this.sectionStart<this.index&&this.handleTrailingData(),this.cbs.onend()},e.prototype.handleTrailingData=function(){var e=this.buffer.length+this.offset;this.state===i.InCommentLike?this.currentSequence===u.CdataEnd?this.cbs.oncdata(this.sectionStart,e,0):this.cbs.oncomment(this.sectionStart,e,0):this.state===i.InNumericEntity&&this.allowLegacyEntity()||this.state===i.InHexEntity&&this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state===i.InTagName||this.state===i.BeforeAttributeName||this.state===i.BeforeAttributeValue||this.state===i.AfterAttributeName||this.state===i.InAttributeName||this.state===i.InAttributeValueSq||this.state===i.InAttributeValueDq||this.state===i.InAttributeValueNq||this.state===i.InClosingTagName||this.cbs.ontext(this.sectionStart,e)},e.prototype.emitPartial=function(e,t){this.baseState!==i.Text&&this.baseState!==i.InSpecialTag?this.cbs.onattribdata(e,t):this.cbs.ontext(e,t)},e.prototype.emitCodePoint=function(e){this.baseState!==i.Text&&this.baseState!==i.InSpecialTag?this.cbs.onattribentity(e):this.cbs.ontextentity(e)},e}();t.default=d},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXML=t.decodeHTMLStrict=t.decodeHTML=t.determineBranch=t.BinTrieFlags=t.fromCodePoint=t.replaceCodePoint=t.decodeCodePoint=t.xmlDecodeTree=t.htmlDecodeTree=void 0;var i=r(n(1094));t.htmlDecodeTree=i.default;var o=r(n(1095));t.xmlDecodeTree=o.default;var a=r(n(723));t.decodeCodePoint=a.default;var s,l,c=n(723);function u(e){return function(t,n){for(var r="",i=0,o=0;(o=t.indexOf("&",o))>=0;)if(r+=t.slice(i,o),i=o,o+=1,t.charCodeAt(o)!==s.NUM){for(var c=0,u=1,h=0,p=e[h];o<t.length&&!((h=d(e,p,h+1,t.charCodeAt(o)))<0);o++,u++){var m=(p=e[h])&l.VALUE_LENGTH;if(m){var g;if(n&&t.charCodeAt(o)!==s.SEMI||(c=h,u=0),0===(g=(m>>14)-1))break;h+=g}}if(0!==c)r+=1===(g=(e[c]&l.VALUE_LENGTH)>>14)?String.fromCharCode(e[c]&~l.VALUE_LENGTH):2===g?String.fromCharCode(e[c+1]):String.fromCharCode(e[c+1],e[c+2]),i=o-u+1}else{var f=o+1,_=10,b=t.charCodeAt(f);(b|s.To_LOWER_BIT)===s.LOWER_X&&(_=16,o+=1,f+=1);do{b=t.charCodeAt(++o)}while(b>=s.ZERO&&b<=s.NINE||16===_&&(b|s.To_LOWER_BIT)>=s.LOWER_A&&(b|s.To_LOWER_BIT)<=s.LOWER_F);if(f!==o){var v=t.substring(f,o),y=parseInt(v,_);if(t.charCodeAt(o)===s.SEMI)o+=1;else if(n)continue;r+=(0,a.default)(y),i=o}}return r+t.slice(i)}}function d(e,t,n,r){var i=(t&l.BRANCH_LENGTH)>>7,o=t&l.JUMP_TABLE;if(0===i)return 0!==o&&r===o?n:-1;if(o){var a=r-o;return a<0||a>=i?-1:e[n+a]-1}for(var s=n,c=s+i-1;s<=c;){var u=s+c>>>1,d=e[u];if(d<r)s=u+1;else{if(!(d>r))return e[u+i];c=u-1}}return-1}Object.defineProperty(t,"replaceCodePoint",{enumerable:!0,get:function(){return c.replaceCodePoint}}),Object.defineProperty(t,"fromCodePoint",{enumerable:!0,get:function(){return c.fromCodePoint}}),function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.To_LOWER_BIT=32]="To_LOWER_BIT"}(s||(s={})),function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(l=t.BinTrieFlags||(t.BinTrieFlags={})),t.determineBranch=d;var h=u(i.default),p=u(o.default);t.decodeHTML=function(e){return h(e,!1)},t.decodeHTMLStrict=function(e){return h(e,!0)},t.decodeXML=function(e){return p(e,!0)}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.replaceCodePoint=t.fromCodePoint=void 0;var i=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function o(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=i.get(e))&&void 0!==t?t:e}t.fromCodePoint=null!==(r=String.fromCodePoint)&&void 0!==r?r:function(e){var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e)},t.replaceCodePoint=o,t.default=function(e){return(0,t.fromCodePoint)(o(e))}},function(e,t,n){"use strict";var r=/["'&<>]/;e.exports=function(e){var t,n=""+e,i=r.exec(n);if(!i)return n;var o="",a=0,s=0;for(a=i.index;a<n.length;a++){switch(n.charCodeAt(a)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}s!==a&&(o+=n.substring(s,a)),s=a+1,o+=t}return s!==a?o+n.substring(s,a):o}},,function(e,t,n){"use strict";const r={colon:": ",indent:" ",beforeDecl:"\n",beforeRule:"\n",beforeOpen:" ",beforeClose:"\n",beforeComment:"\n",after:"\n",emptyBody:"",commentLeft:" ",commentRight:" ",semicolon:!1};class i{constructor(e){this.builder=e}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}document(e){this.body(e)}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}comment(e){let t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}decl(e,t){let n=this.raw(e,"between","colon"),r=e.prop+n+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}atrule(e,t){let n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes)this.block(e,n+r);else{let i=(e.raws.between||"")+(t?";":"");this.builder(n+r+i,e)}}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let n=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let i=e.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==r||n)}}block(e,t){let n,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")}raw(e,t,n){let i;if(n||(n=t),t&&(i=e.raws[t],void 0!==i))return i;let o=e.parent;if("before"===n){if(!o||"root"===o.type&&o.first===e)return"";if(o&&"document"===o.type)return""}if(!o)return r[n];let a=e.root();if(a.rawCache||(a.rawCache={}),void 0!==a.rawCache[n])return a.rawCache[n];if("before"===n||"after"===n)return this.beforeAfter(e,n);{let r="raw"+((s=n)[0].toUpperCase()+s.slice(1));this[r]?i=this[r](a,e):a.walk((e=>{if(i=e.raws[t],void 0!==i)return!1}))}var s;return void 0===i&&(i=r[n]),a.rawCache[n]=i,i}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((n=>{let r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==n.raws.before){let e=n.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawBeforeComment(e,t){let n;return e.walkComments((e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1})),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls((e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1})),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeRule(e){let t;return e.walk((n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return t=n.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}beforeAfter(e,t){let n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let r=e.parent,i=0;for(;r&&"root"!==r.type;)i+=1,r=r.parent;if(n.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<i;e++)n+=t}return n}rawValue(e,t){let n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}}e.exports=i,i.default=i},function(e,t,n){"use strict";let{isClean:r,my:i}=n(540),o=n(728),a=n(442),s=n(296),l=n(543),c=(n(731),n(544)),u=n(545),d=n(374);const h={document:"Document",root:"Root",atrule:"AtRule",rule:"Rule",decl:"Declaration",comment:"Comment"},p={postcssPlugin:!0,prepare:!0,Once:!0,Document:!0,Root:!0,Declaration:!0,Rule:!0,AtRule:!0,Comment:!0,DeclarationExit:!0,RuleExit:!0,AtRuleExit:!0,CommentExit:!0,RootExit:!0,DocumentExit:!0,OnceExit:!0},m={postcssPlugin:!0,prepare:!0,Once:!0},g=0;function f(e){return"object"==typeof e&&"function"==typeof e.then}function _(e){let t=!1,n=h[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,g,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,g,n+"Exit"]:[n,n+"Exit"]}function b(e){let t;return t="document"===e.type?["Document",g,"DocumentExit"]:"root"===e.type?["Root",g,"RootExit"]:_(e),{node:e,events:t,eventIndex:0,visitors:[],visitorIndex:0,iterator:0}}function v(e){return e[r]=!1,e.nodes&&e.nodes.forEach((e=>v(e))),e}let y={};class E{constructor(e,t,n){let r;if(this.stringified=!1,this.processed=!1,"object"!=typeof t||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof E||t instanceof c)r=v(t.root),t.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{let e=u;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{r=e(t,n)}catch(e){this.processed=!0,this.error=e}r&&!r[i]&&s.rebuild(r)}else r=v(t);this.result=new c(e,r,n),this.helpers={...y,result:this.result,postcss:y},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}get[Symbol.toStringTag](){return"LazyResult"}get processor(){return this.result.processor}get opts(){return this.result.opts}get css(){return this.stringify().css}get content(){return this.stringify().content}get map(){return this.stringify().map}get root(){return this.sync().root}get messages(){return this.sync().messages}warnings(){return this.sync().warnings()}toString(){return this.css}then(e,t){return this.async().then(e,t)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(f(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[r];)e[r]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=a;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new o(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}walkSync(e){e[r]=!0;let t=_(e);for(let n of t)if(n===g)e.nodes&&e.each((e=>{e[r]||this.walkSync(e)}));else{let t=this.listeners[n];if(t&&this.visitSync(t,e.toProxy()))return}}visitSync(e,t){for(let[n,r]of e){let e;this.result.lastPlugin=n;try{e=r(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(f(e))throw this.getAsyncError()}}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return f(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?n.postcssVersion:(e.plugin=n.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(f(n))try{await n}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[r];){e[r]=!0;let t=[b(e)];for(;t.length>0;){let e=this.visitTick(t);if(f(e))try{await e}catch(e){let n=t[t.length-1].node;throw this.handleError(e,n)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>n(e,this.helpers)));await Promise.all(t)}else await n(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if("object"==typeof t)for(let n in t){if(!p[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!m[n])if("object"==typeof t[n])for(let r in t[n])e(t,"*"===r?n:n+"-"+r.toLowerCase(),t[n][r]);else"function"==typeof t[n]&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}visitTick(e){let t=e[e.length-1],{node:n,visitors:i}=t;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void e.pop();if(i.length>0&&t.visitorIndex<i.length){let[e,r]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return r(n.toProxy(),this.helpers)}catch(e){throw this.handleError(e,n)}}if(0!==t.iterator){let i,o=t.iterator;for(;i=n.nodes[n.indexes[o]];)if(n.indexes[o]+=1,!i[r])return i[r]=!0,void e.push(b(i));t.iterator=0,delete n.indexes[o]}let o=t.events;for(;t.eventIndex<o.length;){let e=o[t.eventIndex];if(t.eventIndex+=1,e===g)return void(n.nodes&&n.nodes.length&&(n[r]=!0,t.iterator=n.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}}E.registerPostcss=e=>{y=e},e.exports=E,E.default=E,d.registerLazyResult(E),l.registerLazyResult(E)},function(e,t,n){"use strict";(function(t){let{SourceMapConsumer:r,SourceMapGenerator:i}=n(541),{dirname:o,resolve:a,relative:s,sep:l}=n(542),{pathToFileURL:c}=n(729),u=n(443),d=Boolean(r&&i),h=Boolean(o&&a&&s&&l);e.exports=class{constructor(e,t,n,r){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}));else{let e=new u(this.css,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/(\n)?\/\*#[\S\s]*?\*\/$/gm,""))}setSourcesContent(){let e={};if(this.root)this.root.walk((t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,t.source.input.css)}}}));else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}applyPrevMaps(){for(let e of this.previous()){let t,n=this.toUrl(this.path(e.file)),i=e.root||o(e.file);!1===this.mapOpts.sourcesContent?(t=new r(e.text),t.sourcesContent&&(t.sourcesContent=t.sourcesContent.map((()=>null)))):t=e.consumer(),this.map.applySourceMap(t,n,this.toUrl(this.path(i)))}}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}toBase64(e){return t?t.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=i.fromSourceMap(e)}else this.map=new i({file:this.outputFile()}),this.map.addMapping({source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>",generated:{line:1,column:0},original:{line:1,column:0}});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}path(e){if(0===e.indexOf("<"))return e;if(/^\w+:\/\//.test(e))return e;if(this.mapOpts.absolute)return e;let t=this.opts.to?o(this.opts.to):".";return"string"==typeof this.mapOpts.annotation&&(t=o(a(t,this.mapOpts.annotation))),e=s(t,e)}toUrl(e){return"\\"===l&&(e=e.replace(/\\/g,"/")),encodeURI(e).replace(/[#?]/g,encodeURIComponent)}toFileUrl(e){if(c)return c(e).toString();throw new Error("`map.absolute` option is not available in this PostCSS build")}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}generateString(){this.css="",this.map=new i({file:this.outputFile()});let e,t,n=1,r=1,o="<no source>",a={source:"",generated:{line:0,column:0},original:{line:0,column:0}};this.stringify(this.root,((i,s,l)=>{if(this.css+=i,s&&"end"!==l&&(a.generated.line=n,a.generated.column=r-1,s.source&&s.source.start?(a.source=this.sourcePath(s),a.original.line=s.source.start.line,a.original.column=s.source.start.column-1,this.map.addMapping(a)):(a.source=o,a.original.line=1,a.original.column=0,this.map.addMapping(a))),e=i.match(/\n/g),e?(n+=e.length,t=i.lastIndexOf("\n"),r=i.length-t):r+=i.length,s&&"start"!==l){let e=s.parent||{raws:{}};("decl"===s.type||"atrule"===s.type&&!s.nodes)&&s===e.last&&!e.raws.semicolon||(s.source&&s.source.end?(a.source=this.sourcePath(s),a.original.line=s.source.end.line,a.original.column=s.source.end.column-1,a.generated.line=n,a.generated.column=r-2,this.map.addMapping(a)):(a.source=o,a.original.line=1,a.original.column=0,a.generated.line=n,a.generated.column=r-1,this.map.addMapping(a)))}}))}generate(){if(this.clearAnnotation(),h&&d&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}}}).call(this,n(53).Buffer)},,function(e,t,n){"use strict";(function(t){let{SourceMapConsumer:r,SourceMapGenerator:i}=n(541),{existsSync:o,readFileSync:a}=n(1107),{dirname:s,join:l}=n(542);class c{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=s(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new r(this.text)),this.consumerCache}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}startWith(e,t){return!!e&&e.substr(0,t.length)===t}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let n=e.lastIndexOf(t.pop()),r=e.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return n=e.substr(RegExp.lastMatch.length),t?t.from(n,"base64").toString():window.atob(n);var n;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}loadFile(e){if(this.root=s(e),o(e))return this.mapFile=e,a(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof r)return i.fromSourceMap(t).toString();if(t instanceof i)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let n=t(e);if(n){let e=this.loadFile(n);if(!e)throw new Error("Unable to load previous source map: "+n.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=l(s(e),t)),this.loadFile(t)}}}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}}e.exports=c,c.default=c}).call(this,n(53).Buffer)},function(e,t,n){"use strict";let r={};e.exports=function(e){r[e]||(r[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}},function(e,t,n){"use strict";class r{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{plugin:this.plugin,index:this.index,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}e.exports=r,r.default=r},function(e,t,n){"use strict";let r={split(e,t,n){let r=[],i="",o=!1,a=0,s=!1,l="",c=!1;for(let n of e)c?c=!1:"\\"===n?c=!0:s?n===l&&(s=!1):'"'===n||"'"===n?(s=!0,l=n):"("===n?a+=1:")"===n?a>0&&(a-=1):0===a&&t.includes(n)&&(o=!0),o?(""!==i&&r.push(i.trim()),i="",o=!1):i+=n;return(n||""!==i)&&r.push(i.trim()),r},space:e=>r.split(e,[" ","\n","\t"]),comma:e=>r.split(e,[","],!0)};e.exports=r,r.default=r},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(130),i=n.n(r),o=n(132),a=n.n(o),s=n(120),l=n.n(s),c=n(169);const u=["children","label","tooltip"],d=e=>{let{children:t,label:n,tooltip:r}=e,o=a()(e,u);const s=o["aria-label"]||n;return r?l.a.createElement(c.b,i()({},o,{role:"menuitem","aria-label":s,title:r}),t):l.a.createElement(c.a,i()({},o,{role:"menuitem","aria-label":s}),t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(130),i=n.n(r),o=n(132),a=n.n(o),s=n(120),l=n.n(s),c=n(169);const u=["children","label","active","disabled"],d=e=>{let{children:t,label:n,active:r,disabled:o}=e,s=a()(e,u);return l.a.createElement(c.a,i()({},s,{role:"menuitemcheckbox","aria-checked":r,"aria-disabled":o,disabled:o,"aria-label":n}),t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(130),i=n.n(r),o=n(132),a=n.n(o),s=n(120),l=n.n(s),c=n(169),u=n(177),d=n(142),h=n(152);const p=["children","label","onChange","onClose"],m=e=>{let{children:t,label:n,onChange:r,onClose:o}=e,s=a()(e,p);const[m,g,f]=Object(c.i)();return l.a.createElement(u.b,i()({},s,{role:"menuitemcheckbox","aria-label":n,onChange:r,onKeyDown:e=>{let t=!0;switch(Object(h.a)().getAccessibilityAction(e)){case d.h.Space:r();break;case d.h.Enter:r(),o();break;default:t=!1}t&&(e.stopPropagation(),e.preventDefault())},onKeyUp:e=>{switch(Object(h.a)().getAccessibilityAction(e)){case d.h.Space:case d.h.Enter:e.stopPropagation(),e.preventDefault()}},onFocus:m,inputRef:f,tabIndex:g?0:-1}),t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(130),i=n.n(r),o=n(132),a=n.n(o),s=n(120),l=n.n(s),c=n(169),u=n(258),d=n(142),h=n(152);const p=["children","label","onChange","onClose"],m=e=>{let{children:t,label:n,onChange:r,onClose:o}=e,s=a()(e,p);const[m,g,f]=Object(c.i)();return l.a.createElement(u.a,i()({},s,{role:"menuitemradio","aria-label":n,onChange:r,onKeyDown:e=>{let t=!0;switch(Object(h.a)().getAccessibilityAction(e)){case d.h.Space:r();break;case d.h.Enter:r(),o();break;default:t=!1}t&&(e.stopPropagation(),e.preventDefault())},onKeyUp:e=>{switch(Object(h.a)().getAccessibilityAction(e)){case d.h.Enter:case d.h.Space:e.stopPropagation(),e.preventDefault()}},onFocus:m,inputRef:f,tabIndex:g?0:-1}),t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return p}));var r=n(120),i=n.n(r),o=n(186),a=n.n(o),s=n(320),l=n(122),c=n(125),u=n(551),d=n(168);function h(e,t,n){var r;const o=null!==(r=l.a.get().getRoom(t.getRoomId()))&&void 0!==r?r:void 0,p=c.b.getValue("Pill.shouldShowPillAvatar");let m=e[0];for(;m;){let e=!1;if("PRE"===m.tagName||"CODE"===m.tagName||n.includes(m))m=m.nextSibling;else{if("A"===m.tagName&&m.getAttribute("href")){const t=m.getAttribute("href"),r=Object(d.j)(t);if(r&&!r.eventId){const r=document.createElement("span"),s=i.a.createElement(u.b,{url:t,inMessage:!0,room:o,shouldShowPillAvatar:p});a.a.render(s,r),m.parentNode.replaceChild(r,m),n.push(r),e=!0,m=r}}else if(m.nodeType===Node.TEXT_NODE&&!m.parentElement.classList.contains("mx_AtRoomPill")){let e=m;const r=[];for(;null!==e;){const t=u.b.roomNotifPos(e.textContent);let n=null;if(t>-1){let i=e;t>0&&(i=i.splitText(t)),i.textContent.length>u.b.roomNotifLen()&&(n=i.splitText(u.b.roomNotifLen())),r.push(i)}e=n}if(r.length>0){const e=new s.a(l.a.get()),c=e.getPushRuleById(".m.rule.roomnotif");if(c&&e.ruleMatchesEvent(c,t)){for(const e of r){m=e.nextSibling;const t=document.createElement("span"),r=i.a.createElement(u.b,{type:u.a.AtRoomMention,inMessage:!0,room:o,shouldShowPillAvatar:p});a.a.render(r,t),e.parentNode.replaceChild(t,e),n.push(t)}continue}}}m.childNodes&&m.childNodes.length&&!e&&h(m.childNodes,t,n),m=m.nextSibling}}}function p(e){for(const t of e)a.a.unmountComponentAtNode(t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(120),i=n(138),o=n(167);function a(e){let{userId:t="",member:n,forceHistorical:a=!1}=e;const s=Object(r.useContext)(i.b),l=Object(o.b)("useOnlyCurrentProfiles");return Object(r.useMemo)((()=>{const e=[i.a.ThreadsList,i.a.Thread];if(!a&&l||e.includes(s.timelineRenderingType)){var r;const e=null===(r=s.room)||void 0===r?void 0:r.getMember(t);if(e)return e}return n}),[a,n,s.room,s.timelineRenderingType,l,t])}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(120),i=n.n(r);function o(e,t){const n=[];return e.forEach(((r,i)=>{n.push(r,i===e.length-1?null:t)})),i.a.createElement("span",null,n)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var r,i=n(13),o=n.n(i),a=n(120),s=n.n(a),l=n(187),c=n(742),u=n(744),d=n(155),h=n(127),p=n(121),m=n(146),g=n(139),f=n(123),_=n(134),b=n(270);!function(e){e[e.Topic=0]="Topic",e[e.NewOption=1]="NewOption"}(r||(r={}));const v=2;function y(){return{title:Object(p.a)("Create poll"),actionLabel:Object(p.a)("Create Poll"),canSubmit:!1,question:"",options:Object(m.h)("",v),busy:!1,kind:l.b,autoFocusTarget:r.Topic}}class E extends u.a{constructor(e){super(e),o()(this,"addOptionRef",Object(a.createRef)()),o()(this,"onQuestionChange",(e=>{this.setState({question:e.target.value},(()=>this.checkCanSubmit()))})),o()(this,"onOptionChange",((e,t)=>{const n=Object(m.b)(this.state.options);n[e]=t.target.value,this.setState({options:n},(()=>this.checkCanSubmit()))})),o()(this,"onOptionRemove",(e=>{const t=Object(m.b)(this.state.options);t.splice(e,1),this.setState({options:t},(()=>this.checkCanSubmit()))})),o()(this,"onOptionAdd",(()=>{const e=Object(m.b)(this.state.options);e.push(""),this.setState({options:e,autoFocusTarget:r.NewOption},(()=>{var e,t;null===(e=this.addOptionRef.current)||void 0===e||null===(t=e.scrollIntoView)||void 0===t||t.call(e)}))})),o()(this,"onPollTypeChange",(e=>{this.setState({kind:l.b.matches(e.target.value)?l.b:l.c})})),this.state=e.editingMxEvent?function(e){const t=e.unstableExtensibleEvent;return null!=t&&t.isEquivalentTo(l.e)?{title:Object(p.a)("Edit poll"),actionLabel:Object(p.a)("Done"),canSubmit:!0,question:t.question.text,options:t.answers.map((e=>e.text)),busy:!1,kind:t.kind,autoFocusTarget:r.Topic}:y()}(e.editingMxEvent):y()}checkCanSubmit(){this.setState({canSubmit:!this.state.busy&&this.state.question.trim().length>0&&this.state.options.filter((e=>e.trim().length>0)).length>=2})}createEvent(){const e=c.a.from(this.state.question.trim(),this.state.options.map((e=>e.trim())).filter((e=>!!e)),this.state.kind.name).serialize();return this.props.editingMxEvent?{content:{"m.new_content":e.content,"m.relates_to":{rel_type:"m.replace",event_id:this.props.editingMxEvent.getId()}},type:e.type}:e}submit(){this.setState({busy:!0,canSubmit:!1});const e=this.createEvent();Object(b.a)(this.props.room.roomId,(t=>this.matrixClient.sendEvent(t,this.props.threadId,e.type,e.content)),this.matrixClient).then((()=>this.props.onFinished(!0))).catch((e=>{console.error("Failed to post poll:",e),h.b.createDialog(d.a,{title:Object(p.a)("Failed to post poll"),description:Object(p.a)("Sorry, the poll you tried to create was not posted."),button:Object(p.a)("Try again"),cancelButton:Object(p.a)("Cancel"),onFinished:e=>{e?this.setState({busy:!1,canSubmit:!0}):this.cancel()}})}))}cancel(){this.props.onFinished(!1)}renderContent(){return s.a.createElement("div",{className:"mx_PollCreateDialog"},s.a.createElement("h2",null,Object(p.a)("Poll type")),s.a.createElement(g.a,{element:"select",value:this.state.kind.name,onChange:this.onPollTypeChange},s.a.createElement("option",{key:l.b.name,value:l.b.name},Object(p.a)("Open poll")),s.a.createElement("option",{key:l.c.name,value:l.c.name},Object(p.a)("Closed poll"))),s.a.createElement("p",null,(e=this.state.kind,l.b.matches(e.name)?Object(p.a)("Voters see results as soon as they have voted"):Object(p.a)("Results are only revealed when you end the poll"))),s.a.createElement("h2",null,Object(p.a)("What is your poll question or topic?")),s.a.createElement(g.a,{id:"poll-topic-input",value:this.state.question,maxLength:340,label:Object(p.a)("Question or topic"),placeholder:Object(p.a)("Write something…"),onChange:this.onQuestionChange,usePlaceholderAsHint:!0,disabled:this.state.busy,autoFocus:this.state.autoFocusTarget===r.Topic}),s.a.createElement("h2",null,Object(p.a)("Create options")),this.state.options.map(((e,t)=>s.a.createElement("div",{key:`option_${t}`,className:"mx_PollCreateDialog_option"},s.a.createElement(g.a,{id:`pollcreate_option_${t}`,value:e,maxLength:340,label:Object(p.a)("Option %(number)s",{number:t+1}),placeholder:Object(p.a)("Write an option"),onChange:e=>this.onOptionChange(t,e),usePlaceholderAsHint:!0,disabled:this.state.busy,autoFocus:this.state.autoFocusTarget===r.NewOption&&t===this.state.options.length-1}),s.a.createElement(f.a,{onClick:()=>this.onOptionRemove(t),className:"mx_PollCreateDialog_removeOption",disabled:this.state.busy})))),s.a.createElement(f.a,{onClick:this.onOptionAdd,disabled:this.state.busy||this.state.options.length>=20,kind:"secondary",className:"mx_PollCreateDialog_addOption",inputRef:this.addOptionRef},Object(p.a)("Add option")),this.state.busy&&s.a.createElement("div",{className:"mx_PollCreateDialog_busy"},s.a.createElement(_.a,null)));var e}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(13),i=n.n(r),o=n(10),a=n(743),s=n(55),l=n(187),c=n(376),u=n(447);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class p extends a.a{constructor(e){super(e),i()(this,"id",void 0);const t=e.content.id;if(!t||"string"!=typeof t)throw new c.a("Answer ID must be a non-empty string");this.id=t}serialize(){return{type:"org.matrix.sdk.poll.answer",content:h({id:this.id},this.serializeMMessageOnly())}}static from(e,t){return new p({type:"org.matrix.sdk.poll.answer",content:{id:e,[s.c.name]:t}})}}class m extends u.a{constructor(e){super(e),i()(this,"question",void 0),i()(this,"kind",void 0),i()(this,"rawKind",void 0),i()(this,"maxSelections",void 0),i()(this,"answers",void 0);const t=l.e.findIn(this.wireContent);if(null==t||!t.question)throw new c.a("A question is required");if(this.question=new a.a({type:"org.matrix.sdk.poll.question",content:t.question}),this.rawKind=t.kind,l.b.matches(this.rawKind)?this.kind=l.b:this.kind=l.c,this.maxSelections=Number.isFinite(t.max_selections)&&t.max_selections>0?t.max_selections:1,!Array.isArray(t.answers))throw new c.a("Poll answers must be an array");const n=t.answers.slice(0,20).map((e=>new p({type:"org.matrix.sdk.poll.answer",content:e})));if(n.length<=0)throw new c.a("No answers available");this.answers=n}isEquivalentTo(e){return Object(s.e)(e,l.e)}serialize(){return{type:l.e.name,content:{[l.e.name]:{question:this.question.serialize().content,kind:this.rawKind,max_selections:this.maxSelections,answers:this.answers.map((e=>e.serialize().content))},[s.c.name]:`${this.question.text}\n${this.answers.map(((e,t)=>`${t+1}. ${e.text}`)).join("\n")}`}}}static from(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return new m({type:l.e.name,content:{[s.c.name]:e,[l.e.name]:{question:{[s.c.name]:e},kind:n instanceof o.NamespacedValue?n.name:n,max_selections:r,answers:t.map((e=>({id:[...Array(16)].map((()=>g.charAt(Math.floor(Math.random()*g.length)))).join(""),[s.c.name]:e})))}}})}}const g="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(13),i=n.n(r),o=n(447),a=n(55),s=n(41),l=n(376);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class d extends o.a{constructor(e){super(e),i()(this,"text",void 0),i()(this,"html",void 0),i()(this,"renderings",void 0);const t=a.b.findIn(this.wireContent),n=a.c.findIn(this.wireContent),r=a.a.findIn(this.wireContent);if(Object(s.b)(t)){if(!Array.isArray(t))throw new l.a("m.message contents must be an array");const e=t.find((e=>!Object(s.b)(e.mimetype)||"text/plain"===e.mimetype)),n=t.find((e=>"text/html"===e.mimetype));if(!e)throw new l.a("m.message is missing a plain text representation");this.text=e.body,this.html=null==n?void 0:n.body,this.renderings=t}else{if(!Object(s.a)(n))throw new l.a("Missing textual representation for event");this.text=n,this.html=r,this.renderings=[{body:n,mimetype:"text/plain"}],this.html&&this.renderings.push({body:this.html,mimetype:"text/html"})}}isEquivalentTo(e){return Object(a.e)(e,a.b)}serializeMMessageOnly(){let e={[a.b.name]:this.renderings};if(1===this.renderings.length){const t=this.renderings[0].mimetype;void 0!==t&&"text/plain"!==t||(e={[a.c.name]:this.renderings[0].body})}return e}serialize(){var e;return{type:"m.room.message",content:u(u({},this.serializeMMessageOnly()),{},{body:this.text,msgtype:"m.text",format:this.html?"org.matrix.custom.html":void 0,formatted_body:null!==(e=this.html)&&void 0!==e?e:void 0})}}static from(e,t){return new d({type:a.b.name,content:{[a.c.name]:e,[a.a.name]:t}})}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(427),l=n.n(s),c=n(122),u=n(133),d=n(121),h=n(123),p=n(142),m=n(152);class g extends a.a.PureComponent{constructor(e){super(e),i()(this,"onKeyDown",(e=>{if(Object(m.a)().getAccessibilityAction(e)===p.h.Escape)e.stopPropagation(),e.preventDefault(),this.cancel()})),i()(this,"onCancel",(()=>{this.cancel()})),i()(this,"onSubmit",(e=>{e.stopPropagation(),e.preventDefault(),this.state.canSubmit&&this.submit()}))}get matrixClient(){return c.a.get()}render(){return a.a.createElement(u.a.Provider,{value:this.matrixClient},a.a.createElement(l.a,{returnFocus:!0,lockProps:{onKeyDown:this.onKeyDown,role:"dialog","aria-labelledby":"mx_CompoundDialog_title","aria-describedby":"mx_CompoundDialog_content"},className:"mx_CompoundDialog mx_ScrollableBaseDialog"},a.a.createElement("div",{className:"mx_CompoundDialog_header"},a.a.createElement("h1",null,this.state.title),a.a.createElement(h.a,{onClick:this.onCancel,className:"mx_CompoundDialog_cancelButton","aria-label":Object(d.a)("Close dialog")})),a.a.createElement("form",{onSubmit:this.onSubmit,className:"mx_CompoundDialog_form"},a.a.createElement("div",{className:"mx_CompoundDialog_content"},this.renderContent()),a.a.createElement("div",{className:"mx_CompoundDialog_footer"},a.a.createElement(h.a,{onClick:this.onCancel,kind:"primary_outline"},Object(d.a)("Cancel")),a.a.createElement(h.a,{onClick:this.onSubmit,kind:"primary",disabled:!this.state.canSubmit,type:"submit",element:"button",className:"mx_Dialog_nonDialogButton"},this.state.actionLabel)))))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r="im.vector.room.read_pins"},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return u}));var r=n(149),i=n(125),o=n(137);const a="recent_emoji",s=100;function l(){return i.b.getValue(a)||[]}function c(e){const t=l(),n=t.findIndex((t=>{let[n]=t;return n===e}));let r;n>=0?([r]=t.splice(n,1),r[1]++):r=[e,1],i.b.setValue(a,null,o.a.ACCOUNT,[r,...t].slice(0,s))}function u(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:24,t=l();t.length<1&&(!function(){const e=JSON.parse(window.localStorage.mx_reaction_count||"{}"),t=Object.entries(e).sort(((e,t)=>{let[,[n,r]]=e,[,[i,o]]=t;return o-r})).map((e=>{let[t,[n,r]]=e;return[t,n]}));i.b.setValue(a,null,o.a.ACCOUNT,t.slice(0,s))}(),t=l());return Object(r.orderBy)(t,"1","desc").slice(0,e).map((e=>{let[t]=e;return t}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o);class s{constructor(e,t,n){this.topCount=e,this.renderCount=t,this.bottomCount=n}contains(e){return!(!e.renderCount&&this.renderCount)&&(e.topCount>=this.topCount&&e.topCount+e.renderCount<=this.topCount+this.renderCount)}expand(e){if(0===this.renderCount)return this;const t=Math.min(e,this.topCount),n=Math.min(e,this.bottomCount);return new s(this.topCount-t,this.renderCount+t+n,this.bottomCount-n)}totalSize(){return this.topCount+this.renderCount+this.bottomCount}}class l extends a.a.Component{constructor(e){super(e),this.state={renderRange:null}}static getDerivedStateFromProps(e,t){const n=l.getVisibleRangeFromProps(e),r=n.expand(e.overflowMargin),i=n.expand(e.overflowItems);return!(!!t.renderRange&&i.totalSize()!==t.renderRange.totalSize())&&t.renderRange&&t.renderRange.contains(r)?null:{renderRange:i}}static getVisibleRangeFromProps(e){const{items:t,itemHeight:n,scrollTop:r,height:i}=e,o=t?t.length:0,a=Math.min(Math.max(0,Math.floor(r/n)),o),l=o-a,c=0!==i?Math.ceil(i/n):0,u=Math.min(c,l);return new s(a,u,l-u)}render(){const{itemHeight:e,items:t,renderItem:n}=this.props,{renderRange:r}=this.state,{topCount:i,renderCount:o,bottomCount:s}=r,l=i*e,c=s*e,u=(t||[]).slice(i,i+o),d=this.props.element||"div",h={style:{paddingTop:`${l}px`,paddingBottom:`${c}px`},className:this.props.className};return a.a.createElement(d,h,u.map(n))}}i()(l,"defaultProps",{overflowItems:20,overflowMargin:5})},function(e,t,n){var r=n(1116);r.registerLanguage("1c",n(1117)),r.registerLanguage("abnf",n(1118)),r.registerLanguage("accesslog",n(1119)),r.registerLanguage("actionscript",n(1120)),r.registerLanguage("ada",n(1121)),r.registerLanguage("angelscript",n(1122)),r.registerLanguage("apache",n(1123)),r.registerLanguage("applescript",n(1124)),r.registerLanguage("arcade",n(1125)),r.registerLanguage("arduino",n(1126)),r.registerLanguage("armasm",n(1127)),r.registerLanguage("xml",n(1128)),r.registerLanguage("asciidoc",n(1129)),r.registerLanguage("aspectj",n(1130)),r.registerLanguage("autohotkey",n(1131)),r.registerLanguage("autoit",n(1132)),r.registerLanguage("avrasm",n(1133)),r.registerLanguage("awk",n(1134)),r.registerLanguage("axapta",n(1135)),r.registerLanguage("bash",n(1136)),r.registerLanguage("basic",n(1137)),r.registerLanguage("bnf",n(1138)),r.registerLanguage("brainfuck",n(1139)),r.registerLanguage("c",n(1140)),r.registerLanguage("cal",n(1141)),r.registerLanguage("capnproto",n(1142)),r.registerLanguage("ceylon",n(1143)),r.registerLanguage("clean",n(1144)),r.registerLanguage("clojure",n(1145)),r.registerLanguage("clojure-repl",n(1146)),r.registerLanguage("cmake",n(1147)),r.registerLanguage("coffeescript",n(1148)),r.registerLanguage("coq",n(1149)),r.registerLanguage("cos",n(1150)),r.registerLanguage("cpp",n(1151)),r.registerLanguage("crmsh",n(1152)),r.registerLanguage("crystal",n(1153)),r.registerLanguage("csharp",n(1154)),r.registerLanguage("csp",n(1155)),r.registerLanguage("css",n(1156)),r.registerLanguage("d",n(1157)),r.registerLanguage("markdown",n(1158)),r.registerLanguage("dart",n(1159)),r.registerLanguage("delphi",n(1160)),r.registerLanguage("diff",n(1161)),r.registerLanguage("django",n(1162)),r.registerLanguage("dns",n(1163)),r.registerLanguage("dockerfile",n(1164)),r.registerLanguage("dos",n(1165)),r.registerLanguage("dsconfig",n(1166)),r.registerLanguage("dts",n(1167)),r.registerLanguage("dust",n(1168)),r.registerLanguage("ebnf",n(1169)),r.registerLanguage("elixir",n(1170)),r.registerLanguage("elm",n(1171)),r.registerLanguage("ruby",n(1172)),r.registerLanguage("erb",n(1173)),r.registerLanguage("erlang-repl",n(1174)),r.registerLanguage("erlang",n(1175)),r.registerLanguage("excel",n(1176)),r.registerLanguage("fix",n(1177)),r.registerLanguage("flix",n(1178)),r.registerLanguage("fortran",n(1179)),r.registerLanguage("fsharp",n(1180)),r.registerLanguage("gams",n(1181)),r.registerLanguage("gauss",n(1182)),r.registerLanguage("gcode",n(1183)),r.registerLanguage("gherkin",n(1184)),r.registerLanguage("glsl",n(1185)),r.registerLanguage("gml",n(1186)),r.registerLanguage("go",n(1187)),r.registerLanguage("golo",n(1188)),r.registerLanguage("gradle",n(1189)),r.registerLanguage("graphql",n(1190)),r.registerLanguage("groovy",n(1191)),r.registerLanguage("haml",n(1192)),r.registerLanguage("handlebars",n(1193)),r.registerLanguage("haskell",n(1194)),r.registerLanguage("haxe",n(1195)),r.registerLanguage("hsp",n(1196)),r.registerLanguage("http",n(1197)),r.registerLanguage("hy",n(1198)),r.registerLanguage("inform7",n(1199)),r.registerLanguage("ini",n(1200)),r.registerLanguage("irpf90",n(1201)),r.registerLanguage("isbl",n(1202)),r.registerLanguage("java",n(1203)),r.registerLanguage("javascript",n(1204)),r.registerLanguage("jboss-cli",n(1205)),r.registerLanguage("json",n(1206)),r.registerLanguage("julia",n(1207)),r.registerLanguage("julia-repl",n(1208)),r.registerLanguage("kotlin",n(1209)),r.registerLanguage("lasso",n(1210)),r.registerLanguage("latex",n(1211)),r.registerLanguage("ldif",n(1212)),r.registerLanguage("leaf",n(1213)),r.registerLanguage("less",n(1214)),r.registerLanguage("lisp",n(1215)),r.registerLanguage("livecodeserver",n(1216)),r.registerLanguage("livescript",n(1217)),r.registerLanguage("llvm",n(1218)),r.registerLanguage("lsl",n(1219)),r.registerLanguage("lua",n(1220)),r.registerLanguage("makefile",n(1221)),r.registerLanguage("mathematica",n(1222)),r.registerLanguage("matlab",n(1223)),r.registerLanguage("maxima",n(1224)),r.registerLanguage("mel",n(1225)),r.registerLanguage("mercury",n(1226)),r.registerLanguage("mipsasm",n(1227)),r.registerLanguage("mizar",n(1228)),r.registerLanguage("perl",n(1229)),r.registerLanguage("mojolicious",n(1230)),r.registerLanguage("monkey",n(1231)),r.registerLanguage("moonscript",n(1232)),r.registerLanguage("n1ql",n(1233)),r.registerLanguage("nestedtext",n(1234)),r.registerLanguage("nginx",n(1235)),r.registerLanguage("nim",n(1236)),r.registerLanguage("nix",n(1237)),r.registerLanguage("node-repl",n(1238)),r.registerLanguage("nsis",n(1239)),r.registerLanguage("objectivec",n(1240)),r.registerLanguage("ocaml",n(1241)),r.registerLanguage("openscad",n(1242)),r.registerLanguage("oxygene",n(1243)),r.registerLanguage("parser3",n(1244)),r.registerLanguage("pf",n(1245)),r.registerLanguage("pgsql",n(1246)),r.registerLanguage("php",n(1247)),r.registerLanguage("php-template",n(1248)),r.registerLanguage("plaintext",n(1249)),r.registerLanguage("pony",n(1250)),r.registerLanguage("powershell",n(1251)),r.registerLanguage("processing",n(1252)),r.registerLanguage("profile",n(1253)),r.registerLanguage("prolog",n(1254)),r.registerLanguage("properties",n(1255)),r.registerLanguage("protobuf",n(1256)),r.registerLanguage("puppet",n(1257)),r.registerLanguage("purebasic",n(1258)),r.registerLanguage("python",n(1259)),r.registerLanguage("python-repl",n(1260)),r.registerLanguage("q",n(1261)),r.registerLanguage("qml",n(1262)),r.registerLanguage("r",n(1263)),r.registerLanguage("reasonml",n(1264)),r.registerLanguage("rib",n(1265)),r.registerLanguage("roboconf",n(1266)),r.registerLanguage("routeros",n(1267)),r.registerLanguage("rsl",n(1268)),r.registerLanguage("ruleslanguage",n(1269)),r.registerLanguage("rust",n(1270)),r.registerLanguage("sas",n(1271)),r.registerLanguage("scala",n(1272)),r.registerLanguage("scheme",n(1273)),r.registerLanguage("scilab",n(1274)),r.registerLanguage("scss",n(1275)),r.registerLanguage("shell",n(1276)),r.registerLanguage("smali",n(1277)),r.registerLanguage("smalltalk",n(1278)),r.registerLanguage("sml",n(1279)),r.registerLanguage("sqf",n(1280)),r.registerLanguage("sql",n(1281)),r.registerLanguage("stan",n(1282)),r.registerLanguage("stata",n(1283)),r.registerLanguage("step21",n(1284)),r.registerLanguage("stylus",n(1285)),r.registerLanguage("subunit",n(1286)),r.registerLanguage("swift",n(1287)),r.registerLanguage("taggerscript",n(1288)),r.registerLanguage("yaml",n(1289)),r.registerLanguage("tap",n(1290)),r.registerLanguage("tcl",n(1291)),r.registerLanguage("thrift",n(1292)),r.registerLanguage("tp",n(1293)),r.registerLanguage("twig",n(1294)),r.registerLanguage("typescript",n(1295)),r.registerLanguage("vala",n(1296)),r.registerLanguage("vbnet",n(1297)),r.registerLanguage("vbscript",n(1298)),r.registerLanguage("vbscript-html",n(1299)),r.registerLanguage("verilog",n(1300)),r.registerLanguage("vhdl",n(1301)),r.registerLanguage("vim",n(1302)),r.registerLanguage("wasm",n(1303)),r.registerLanguage("wren",n(1304)),r.registerLanguage("x86asm",n(1305)),r.registerLanguage("xl",n(1306)),r.registerLanguage("xquery",n(1307)),r.registerLanguage("zephir",n(1308)),r.HighlightJS=r,r.default=r,e.exports=r},function(e,t,n){const r=n(562),i=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],o=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];t.getBlocksCount=function(e,t){switch(t){case r.L:return i[4*(e-1)+0];case r.M:return i[4*(e-1)+1];case r.Q:return i[4*(e-1)+2];case r.H:return i[4*(e-1)+3];default:return}},t.getTotalCodewordsCount=function(e,t){switch(t){case r.L:return o[4*(e-1)+0];case r.M:return o[4*(e-1)+1];case r.Q:return o[4*(e-1)+2];case r.H:return o[4*(e-1)+3];default:return}}},function(e,t){t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},function(e,t){const n="[0-9]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const i="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+")(?:.|[\r\n]))+";t.KANJI=new RegExp(r,"g"),t.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=new RegExp(i,"g"),t.NUMERIC=new RegExp(n,"g"),t.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const o=new RegExp("^"+r+"$"),a=new RegExp("^"+n+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return o.test(e)},t.testNumeric=function(e){return a.test(e)},t.testAlphanumeric=function(e){return s.test(e)}},function(e,t){function n(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");const n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});const t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:r,scale:r?4:i,margin:t,color:{dark:n(e.color.dark||"#000000ff"),light:n(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,n){const r=t.getScale(e,n);return Math.floor((e+2*n.margin)*r)},t.qrToImageData=function(e,n,r){const i=n.modules.size,o=n.modules.data,a=t.getScale(i,r),s=Math.floor((i+2*r.margin)*a),l=r.margin*a,c=[r.color.light,r.color.dark];for(let t=0;t<s;t++)for(let n=0;n<s;n++){let u=4*(t*s+n),d=r.color.light;if(t>=l&&n>=l&&t<s-l&&n<s-l){d=c[o[Math.floor((t-l)/a)*i+Math.floor((n-l)/a)]?1:0]}e[u++]=d.r,e[u++]=d.g,e[u++]=d.b,e[u]=d.a}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(120),i=n.n(r),o=n(165);class a extends i.a.Component{render(){const e=new Date(this.props.ts);let t;return t=this.props.showRelative?Object(o.k)(e,this.props.showTwelveHour):this.props.showFullDate?Object(o.c)(e,this.props.showTwelveHour,this.props.showSeconds):this.props.showSeconds?Object(o.h)(e,this.props.showTwelveHour):Object(o.m)(e,this.props.showTwelveHour),i.a.createElement("span",{className:"mx_MessageTimestamp",title:Object(o.c)(e,this.props.showTwelveHour),"aria-hidden":!0},t)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return u}));var r=n(120),i=n.n(r),o=n(186),a=n.n(o),s=n(157),l=n(755);function c(e,t,n){var r;if(null===(r=s.a.get())||void 0===r||!r.needsUrlTooltips())return;let o=e[0];for(;o;){var u,d;if(t.includes(o)||n.includes(o))o=o.nextSibling;else{if("A"===o.tagName&&o.getAttribute("href")&&o.getAttribute("href")!==(null===(u=o.textContent)||void 0===u?void 0:u.trim())){let e=o.getAttribute("href");try{e=new URL(e,window.location.href).toString()}catch(e){}const t=i.a.createElement(l.a,{tooltip:e},i.a.createElement("span",{dangerouslySetInnerHTML:{__html:o.innerHTML}}));a.a.render(t,o),n.push(o)}else null!==(d=o.childNodes)&&void 0!==d&&d.length&&c(o.childNodes,t,n);o=o.nextSibling}}}function u(e){for(const t of e)a.a.unmountComponentAtNode(t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(130),i=n.n(r),o=n(132),a=n.n(o),s=n(120),l=n.n(s),c=n(243);const u=["children","tooltip"];class d extends l.a.Component{constructor(e){super(e)}render(){const e=this.props,{children:t,tooltip:n}=e,r=a()(e,u);return l.a.createElement(c.a,i()({tabIndex:-1,tooltip:n,onClick:e=>e.target.blur()},r),t)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(120);function i(e){const[t,n]=Object(r.useState)(!1);return[t,{onMouseOver:()=>n(!0),onMouseLeave:()=>n(!1),onMouseMove:t=>{n(!e(t))}}]}},function(e,t,n){"use strict";function r(e,t,n){var r;if(void 0===n&&(n={}),!t.codes){t.codes={};for(var i=0;i<t.chars.length;++i)t.codes[t.chars[i]]=i}if(!n.loose&&e.length*t.bits&7)throw new SyntaxError("Invalid padding");for(var o=e.length;"="===e[o-1];)if(--o,!(n.loose||(e.length-o)*t.bits&7))throw new SyntaxError("Invalid padding");for(var a=new(null!=(r=n.out)?r:Uint8Array)(o*t.bits/8|0),s=0,l=0,c=0,u=0;u<o;++u){var d=t.codes[e[u]];if(void 0===d)throw new SyntaxError("Invalid character "+e[u]);l=l<<t.bits|d,(s+=t.bits)>=8&&(s-=8,a[c++]=255&l>>s)}if(s>=t.bits||255&l<<8-s)throw new SyntaxError("Unexpected end of data");return a}function i(e,t,n){void 0===n&&(n={});for(var r=n.pad,i=void 0===r||r,o=(1<<t.bits)-1,a="",s=0,l=0,c=0;c<e.length;++c)for(l=l<<8|255&e[c],s+=8;s>t.bits;)s-=t.bits,a+=t.chars[o&l>>s];if(s&&(a+=t.chars[o&l<<t.bits-s]),i)for(;a.length*t.bits&7;)a+="=";return a}Object.defineProperty(t,"__esModule",{value:!0});var o={chars:"0123456789ABCDEF",bits:4},a={chars:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bits:5},s={chars:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bits:5},l={chars:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bits:6},c={chars:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bits:6},u={parse:function(e,t){return r(e.toUpperCase(),o,t)},stringify:function(e,t){return i(e,o,t)}},d={parse:function(e,t){return void 0===t&&(t={}),r(t.loose?e.toUpperCase().replace(/0/g,"O").replace(/1/g,"L").replace(/8/g,"B"):e,a,t)},stringify:function(e,t){return i(e,a,t)}},h={parse:function(e,t){return r(e,s,t)},stringify:function(e,t){return i(e,s,t)}},p={parse:function(e,t){return r(e,l,t)},stringify:function(e,t){return i(e,l,t)}},m={parse:function(e,t){return r(e,c,t)},stringify:function(e,t){return i(e,c,t)}},g={parse:r,stringify:i};t.base16=u,t.base32=d,t.base32hex=h,t.base64=p,t.base64url=m,t.codec=g},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(759);class i{constructor(e,t){this.index=e,this.offset=t}compare(e){return this.index===e.index?this.offset-e.offset:this.index-e.index}iteratePartsBetween(e,t,n){if(-1===this.index||-1===e.index)return;const[r,i]=this.compare(e)<0?[this,e]:[e,this];if(r.index===i.index)n(t.parts[this.index],r.offset,i.offset);else{const e=t.parts[r.index];n(e,r.offset,e.text.length);for(let e=r.index+1;e<i.index;++e){const r=t.parts[e];n(r,0,r.text.length)}n(t.parts[i.index],0,i.offset)}}forwardsWhile(e,t){if(-1===this.index)return this;let{index:n,offset:r}=this;const{parts:o}=e;for(;n<o.length;){const e=o[n];for(;r<e.text.length;){if(!t(n,r,e))return new i(n,r);r+=1}if(n===o.length-1)return new i(n,r);n+=1,r=0}return this}backwardsWhile(e,t){if(-1===this.index)return this;let{index:n,offset:r}=this;const o=e.parts;for(;n>=0;){const e=o[n];for(;r>0;){if(!t(n,r-1,e))return new i(n,r);r-=1}if(0===n)return new i(n,r);n-=1,r=o[n].text.length}return this}asOffset(e){if(-1===this.index)return new r.a(0,!0);let t=0;for(let n=0;n<this.index;++n)t+=e.parts[n].text.length;t+=this.offset;const n=e.parts[this.index],i=!n||t>=n.text.length;return new r.a(t,i)}isAtEnd(e){if(0===e.parts.length)return!0;const t=e.parts.length-1,n=e.parts[t];return this.index===t&&this.offset===n.text.length}isAtStart(){return 0===this.index&&0===this.offset}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));class r{constructor(e,t){this.offset=e,this.atNodeEnd=t}asPosition(e){return e.positionForOffset(this.offset,this.atNodeEnd)}add(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new r(this.offset+e,t)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(149);function i(e){const t=2*Math.PI/e.length;return Object(r.split)(e,"").map(((e,n)=>{if(" "===e)return e;const[r,i]=function(e,t){const n=127*t*Math.cos(e),r=127*t*Math.sin(e);return[n,r]}(n*t,1),[s,l,c]=function(e,t,n){let r=(e+16)/116;const i=.9505*o(r+t/500),s=1.089*o(r-n/200);r=o(r);const l=3.24096994*i-1.53738318*r-.49861076*s,c=-.96924364*i+1.8759675*r+.04155506*s,u=.05563008*i-.20397696*r+1.05697151*s;return[a(l),a(c),a(u)]}(75,r,i);return'<font color="#'+s.toString(16).padStart(2,"0")+l.toString(16).padStart(2,"0")+c.toString(16).padStart(2,"0")+'">'+e+"</font>"})).join("")}function o(e){return e>.2069?Math.pow(e,3):.1284*e-.01771}function a(e){const t=function(e){return e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055}(e),n=Math.min(Math.max(t,0),1);return Math.round(255*n)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return s}));var r=n(570),i=n(759);function o(e,t){const{offset:n,text:r}=a(e,t.focusNode,t.focusOffset);return{caret:n,text:r}}function a(e,t,n){const{node:o,characterOffset:a}=function(e,t){for(;e&&e.nodeType===Node.ELEMENT_NODE;){const n=e.childNodes.length;if(!n)break;t>=n?t=(e=e.lastChild).nodeType===Node.TEXT_NODE?e.textContent.length:Number.MAX_SAFE_INTEGER:(e=e.childNodes[t],t=0)}return{node:e,characterOffset:t}}(t,n),{text:s,offsetToNode:l}=function(e,t){let n=0,i=!1,o="";function a(e){i||e===t&&(i=!0),"BR"===e.tagName&&e.nextSibling&&(i||(n+=1),o+="\n");const a=e.nodeType===Node.TEXT_NODE&&function(e){const t=e.nodeValue;if(!t)return"";if(Object(r.b)(e.parentElement))return 1!==t.length?t.replace(r.a,""):"";return t}(e);return a&&(i||(n+=a.length),o+=a),!0}function s(e){var t;"DIV"===e.tagName&&"DIV"===(null===(t=e.nextSibling)||void 0===t?void 0:t.tagName)&&(o+="\n",i||(n+=1))}return function(e,t,n){let r=e.firstChild;for(;r&&r!==e;)if(t(r)&&r.firstChild)r=r.firstChild;else if(r.nextSibling)r=r.nextSibling;else{for(;r&&!r.nextSibling&&r!==e;)r=r.parentElement,r!==e&&n(r);r!==e&&(r=r.nextSibling)}}(e,a,s),{text:o,offsetToNode:n}}(e,o),c=function(e,t,n){if(!e)return new i.a(0,!1);let o=n===e.textContent.length;if(e.nodeType===Node.TEXT_NODE&&Object(r.b)(e.parentElement)){const t=e.nodeValue.indexOf(r.a);-1!==t&&t<n&&(n-=1),o=!0}return new i.a(t+n,o)}(o,l,a);return{offset:c,text:s}}function s(e,t,n){const r=a(e,n.focusNode,n.focusOffset).offset,i=a(e,n.anchorNode,n.anchorOffset).offset,o=r.asPosition(t),s=i.asPosition(t);return t.startRange(o,s)}},function(e,t,n){"use strict";const r=n(262),i=n(454),o=n(763);e.exports=class extends r{constructor(e){super(e),this.tokenizer=e,this.posTracker=r.install(e.preprocessor,o),this.currentAttrLocation=null,this.ctLoc=null}_getCurrentLocation(){return{startLine:this.posTracker.line,startCol:this.posTracker.col,startOffset:this.posTracker.offset,endLine:-1,endCol:-1,endOffset:-1}}_attachCurrentAttrLocationInfo(){this.currentAttrLocation.endLine=this.posTracker.line,this.currentAttrLocation.endCol=this.posTracker.col,this.currentAttrLocation.endOffset=this.posTracker.offset;const e=this.tokenizer.currentToken,t=this.tokenizer.currentAttr;e.location.attrs||(e.location.attrs=Object.create(null)),e.location.attrs[t.name]=this.currentAttrLocation}_getOverriddenMethods(e,t){const n={_createStartTagToken(){t._createStartTagToken.call(this),this.currentToken.location=e.ctLoc},_createEndTagToken(){t._createEndTagToken.call(this),this.currentToken.location=e.ctLoc},_createCommentToken(){t._createCommentToken.call(this),this.currentToken.location=e.ctLoc},_createDoctypeToken(n){t._createDoctypeToken.call(this,n),this.currentToken.location=e.ctLoc},_createCharacterToken(n,r){t._createCharacterToken.call(this,n,r),this.currentCharacterToken.location=e.ctLoc},_createEOFToken(){t._createEOFToken.call(this),this.currentToken.location=e._getCurrentLocation()},_createAttr(n){t._createAttr.call(this,n),e.currentAttrLocation=e._getCurrentLocation()},_leaveAttrName(n){t._leaveAttrName.call(this,n),e._attachCurrentAttrLocationInfo()},_leaveAttrValue(n){t._leaveAttrValue.call(this,n),e._attachCurrentAttrLocationInfo()},_emitCurrentToken(){const n=this.currentToken.location;this.currentCharacterToken&&(this.currentCharacterToken.location.endLine=n.startLine,this.currentCharacterToken.location.endCol=n.startCol,this.currentCharacterToken.location.endOffset=n.startOffset),this.currentToken.type===i.EOF_TOKEN?(n.endLine=n.startLine,n.endCol=n.startCol,n.endOffset=n.startOffset):(n.endLine=e.posTracker.line,n.endCol=e.posTracker.col+1,n.endOffset=e.posTracker.offset+1),t._emitCurrentToken.call(this)},_emitCurrentCharacterToken(){const n=this.currentCharacterToken&&this.currentCharacterToken.location;n&&-1===n.endOffset&&(n.endLine=e.posTracker.line,n.endCol=e.posTracker.col,n.endOffset=e.posTracker.offset),t._emitCurrentCharacterToken.call(this)}};return Object.keys(i.MODE).forEach((r=>{const o=i.MODE[r];n[o]=function(n){e.ctLoc=e._getCurrentLocation(),t[o].call(this,n)}})),n}}},function(e,t,n){"use strict";const r=n(262);e.exports=class extends r{constructor(e){super(e),this.preprocessor=e,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.offset=0,this.col=0,this.line=1}_getOverriddenMethods(e,t){return{advance(){const n=this.pos+1,r=this.html[n];return e.isEol&&(e.isEol=!1,e.line++,e.lineStartPos=n),("\n"===r||"\r"===r&&"\n"!==this.html[n+1])&&(e.isEol=!0),e.col=n-e.lineStartPos+1,e.offset=e.droppedBufferSize+n,t.advance.call(this)},retreat(){t.retreat.call(this),e.isEol=!1,e.col=this.pos-e.lineStartPos+1},dropParsedChunk(){const n=this.pos;t.dropParsedChunk.call(this);const r=n-this.pos;e.lineStartPos-=r,e.droppedBufferSize+=r,e.offset=e.droppedBufferSize+this.pos}}}}},function(e,t,n){"use strict";const{DOCUMENT_MODE:r}=n(302);t.createDocument=function(){return{nodeName:"#document",mode:r.NO_QUIRKS,childNodes:[]}},t.createDocumentFragment=function(){return{nodeName:"#document-fragment",childNodes:[]}},t.createElement=function(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},t.createCommentNode=function(e){return{nodeName:"#comment",data:e,parentNode:null}};const i=function(e){return{nodeName:"#text",value:e,parentNode:null}},o=t.appendChild=function(e,t){e.childNodes.push(t),t.parentNode=e},a=t.insertBefore=function(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e};t.setTemplateContent=function(e,t){e.content=t},t.getTemplateContent=function(e){return e.content},t.setDocumentType=function(e,t,n,r){let i=null;for(let t=0;t<e.childNodes.length;t++)if("#documentType"===e.childNodes[t].nodeName){i=e.childNodes[t];break}i?(i.name=t,i.publicId=n,i.systemId=r):o(e,{nodeName:"#documentType",name:t,publicId:n,systemId:r})},t.setDocumentMode=function(e,t){e.mode=t},t.getDocumentMode=function(e){return e.mode},t.detachNode=function(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},t.insertText=function(e,t){if(e.childNodes.length){const n=e.childNodes[e.childNodes.length-1];if("#text"===n.nodeName)return void(n.value+=t)}o(e,i(t))},t.insertTextBefore=function(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&"#text"===r.nodeName?r.value+=t:a(e,i(t),n)},t.adoptAttributes=function(e,t){const n=[];for(let t=0;t<e.attrs.length;t++)n.push(e.attrs[t].name);for(let r=0;r<t.length;r++)-1===n.indexOf(t[r].name)&&e.attrs.push(t[r])},t.getFirstChild=function(e){return e.childNodes[0]},t.getChildNodes=function(e){return e.childNodes},t.getParentNode=function(e){return e.parentNode},t.getAttrList=function(e){return e.attrs},t.getTagName=function(e){return e.tagName},t.getNamespaceURI=function(e){return e.namespaceURI},t.getTextNodeContent=function(e){return e.value},t.getCommentNodeContent=function(e){return e.data},t.getDocumentTypeNodeName=function(e){return e.name},t.getDocumentTypeNodePublicId=function(e){return e.publicId},t.getDocumentTypeNodeSystemId=function(e){return e.systemId},t.isTextNode=function(e){return"#text"===e.nodeName},t.isCommentNode=function(e){return"#comment"===e.nodeName},t.isDocumentTypeNode=function(e){return"#documentType"===e.nodeName},t.isElementNode=function(e){return!!e.tagName},t.setNodeSourceCodeLocation=function(e,t){e.sourceCodeLocation=t},t.getNodeSourceCodeLocation=function(e){return e.sourceCodeLocation},t.updateNodeSourceCodeLocation=function(e,t){e.sourceCodeLocation=Object.assign(e.sourceCodeLocation,t)}},function(e,t,n){"use strict";e.exports=function(e,t){return[e,t=t||Object.create(null)].reduce(((e,t)=>(Object.keys(t).forEach((n=>{e[n]=t[n]})),e)),Object.create(null))}},function(e,t,n){"use strict";const{DOCUMENT_MODE:r}=n(302),i="html",o=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],a=o.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]),s=["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"],l=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],c=l.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]);function u(e){const t=-1!==e.indexOf('"')?"'":'"';return t+e+t}function d(e,t){for(let n=0;n<t.length;n++)if(0===e.indexOf(t[n]))return!0;return!1}t.isConforming=function(e){return e.name===i&&null===e.publicId&&(null===e.systemId||"about:legacy-compat"===e.systemId)},t.getDocumentMode=function(e){if(e.name!==i)return r.QUIRKS;const t=e.systemId;if(t&&"http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"===t.toLowerCase())return r.QUIRKS;let n=e.publicId;if(null!==n){if(n=n.toLowerCase(),s.indexOf(n)>-1)return r.QUIRKS;let e=null===t?a:o;if(d(n,e))return r.QUIRKS;if(e=null===t?l:c,d(n,e))return r.LIMITED_QUIRKS}return r.NO_QUIRKS},t.serializeContent=function(e,t,n){let r="!DOCTYPE ";return e&&(r+=e),t?r+=" PUBLIC "+u(t):n&&(r+=" SYSTEM"),null!==n&&(r+=" "+u(n)),r}},function(e,t,n){"use strict";e.exports=(e,t,n,r)=>{let i=65535&e|0,o=e>>>16&65535|0,a=0;for(;0!==n;){a=n>2e3?2e3:n,n-=a;do{i=i+t[r++]|0,o=o+i|0}while(--a);i%=65521,o%=65521}return i|o<<16|0}},function(e,t,n){"use strict";const r=new Uint32Array((()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t})());e.exports=(e,t,n,i)=>{const o=r,a=i+n;e^=-1;for(let n=i;n<a;n++)e=e>>>8^o[255&(e^t[n])];return-1^e}},function(e,t,n){"use strict";const r=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);e.exports.assign=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(const t in n)r(n,t)&&(e[t]=n[t])}}return e},e.exports.flattenChunks=e=>{let t=0;for(let n=0,r=e.length;n<r;n++)t+=e[n].length;const n=new Uint8Array(t);for(let t=0,r=0,i=e.length;t<i;t++){let i=e[t];n.set(i,r),r+=i.length}return n}},function(e,t,n){"use strict";let r=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){r=!1}const i=new Uint8Array(256);for(let e=0;e<256;e++)i[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;i[254]=i[254]=1,e.exports.string2buf=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,n,r,i,o,a=e.length,s=0;for(i=0;i<a;i++)n=e.charCodeAt(i),55296==(64512&n)&&i+1<a&&(r=e.charCodeAt(i+1),56320==(64512&r)&&(n=65536+(n-55296<<10)+(r-56320),i++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),o=0,i=0;o<s;i++)n=e.charCodeAt(i),55296==(64512&n)&&i+1<a&&(r=e.charCodeAt(i+1),56320==(64512&r)&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[o++]=n:n<2048?(t[o++]=192|n>>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t};e.exports.buf2string=(e,t)=>{const n=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let o,a;const s=new Array(2*n);for(a=0,o=0;o<n;){let t=e[o++];if(t<128){s[a++]=t;continue}let r=i[t];if(r>4)s[a++]=65533,o+=r-1;else{for(t&=2===r?31:3===r?15:7;r>1&&o<n;)t=t<<6|63&e[o++],r--;r>1?s[a++]=65533:t<65536?s[a++]=t:(t-=65536,s[a++]=55296|t>>10&1023,s[a++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&r)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n})(s,a)},e.exports.utf8border=(e,t)=>{(t=t||e.length)>e.length&&(t=e.length);let n=t-1;for(;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+i[e[n]]>t?n:t}},function(e,t,n){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},function(e,t){!function(){"use strict";var t=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"];function n(e){var t,n=new Uint8Array(e);for(t=0;t<e;t+=1)n[t]=0;return n}e.exports.clean=n,e.exports.pad=function(e,t,n){return e=e.toString(n||8),"000000000000".substr(e.length+12-t)+e},e.exports.extend=function(e,t,r,i){var o=n((parseInt((t+r)/i)+1)*i);return o.set(e),o},e.exports.stringToUint8=function(e,t,r){var i,o;for(t=t||n(e.length),r=r||0,i=0,o=e.length;i<o;i+=1)t[r]=e.charCodeAt(i),r+=1;return t},e.exports.uint8ToBase64=function(e){var n,r,i,o,a=e.length%3,s="";for(n=0,i=e.length-a;n<i;n+=3)r=(e[n]<<16)+(e[n+1]<<8)+e[n+2],s+=t[(o=r)>>18&63]+t[o>>12&63]+t[o>>6&63]+t[63&o];switch(s.length%4){case 1:s+="=";break;case 2:s+="=="}return s},e.exports.base64ToUint8=function(e){for(var r,i=e.match(/^([^=]+)/)[1],o=e.match(/(=*)$/)[1].length,a=0,s=i.length,l=0,c=n(.75*i.length+o);a<s;)r=0,r|=t.indexOf(i.charAt(a)||"A")<<18,a+=1,r|=t.indexOf(i.charAt(a)||"A")<<12,a+=1,r|=t.indexOf(i.charAt(a)||"A")<<6,a+=1,r|=t.indexOf(i.charAt(a)||"A"),a+=1,c[l]=r>>16&255,c[l+=1]=r>>8&255,c[l+=1]=255&r,l+=1;return c}}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(263),i=n(304).getGlobalObject(),o=80;function a(e,t){const n=e,i=[];let o,a,s,l,c;if(!n||!n.tagName)return"";i.push(n.tagName.toLowerCase());const u=t&&t.length?t.filter((e=>n.getAttribute(e))).map((e=>[e,n.getAttribute(e)])):null;if(u&&u.length)u.forEach((e=>{i.push(`[${e[0]}="${e[1]}"]`)}));else if(n.id&&i.push(`#${n.id}`),o=n.className,o&&r.isString(o))for(a=o.split(/\s+/),c=0;c<a.length;c++)i.push(`.${a[c]}`);const d=["aria-label","type","name","title","alt"];for(c=0;c<d.length;c++)s=d[c],l=n.getAttribute(s),l&&i.push(`[${s}="${l}"]`);return i.join("")}t.getDomElement=function(e){return i.document&&i.document.querySelector?i.document.querySelector(e):null},t.getLocationHref=function(){try{return i.document.location.href}catch(e){return""}},t.htmlTreeAsString=function(e,t={}){try{let n=e;const r=5,i=[];let s=0,l=0;const c=" > ",u=c.length;let d;const h=Array.isArray(t)?t:t.keyAttrs,p=!Array.isArray(t)&&t.maxStringLength||o;for(;n&&s++<r&&(d=a(n,h),!("html"===d||s>1&&l+i.length*u+d.length>=p));)i.push(d),l+=d.length,n=n.parentNode;return i.reverse().join(c)}catch(e){return"<unknown>"}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(577),i=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function o(e){const t=i.exec(e);if(!t)throw new r.SentryError(`Invalid Sentry Dsn: ${e}`);const[n,o,s="",l,c="",u]=t.slice(1);let d="",h=u;const p=h.split("/");if(p.length>1&&(d=p.slice(0,-1).join("/"),h=p.pop()),h){const e=h.match(/^\d+/);e&&(h=e[0])}return a({host:l,pass:s,path:d,projectId:h,port:c,protocol:n,publicKey:o})}function a(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}t.dsnFromString=o,t.dsnToString=function(e,t=!1){const{host:n,path:r,pass:i,port:o,projectId:a,protocol:s,publicKey:l}=e;return`${s}://${l}${t&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r?`${r}/`:r}${a}`},t.makeDsn=function(e){const t="string"==typeof e?o(e):a(e);return function(e){if("undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__)return;const{port:t,projectId:n,protocol:i}=e;if(["protocol","publicKey","host","projectId"].forEach((t=>{if(!e[t])throw new r.SentryError(`Invalid Sentry Dsn: ${t} missing`)})),!n.match(/^\d+$/))throw new r.SentryError(`Invalid Sentry Dsn: Invalid projectId ${n}`);if(!function(e){return"http"===e||"https"===e}(i))throw new r.SentryError(`Invalid Sentry Dsn: Invalid protocol ${i}`);if(t&&isNaN(parseInt(t,10)))throw new r.SentryError(`Invalid Sentry Dsn: Invalid port ${t}`)}(t),t}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(455),i=n(304).getGlobalObject();function o(){if(!("fetch"in i))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function a(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}t.isNativeFetch=a,t.supportsDOMError=function(){try{return new DOMError(""),!0}catch(e){return!1}},t.supportsDOMException=function(){try{return new DOMException(""),!0}catch(e){return!1}},t.supportsErrorEvent=function(){try{return new ErrorEvent(""),!0}catch(e){return!1}},t.supportsFetch=o,t.supportsHistory=function(){const e=i.chrome,t=e&&e.app&&e.app.runtime,n="history"in i&&!!i.history.pushState&&!!i.history.replaceState;return!t&&n},t.supportsNativeFetch=function(){if(!o())return!1;if(a(i.fetch))return!0;let e=!1;const t=i.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=a(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.logger.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e},t.supportsReferrerPolicy=function(){if(!o())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(e){return!1}},t.supportsReportingObserver=function(){return"ReportingObserver"in i}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.memoBuilder=function(){const e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++){if(t[e]===n)return!0}return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}},function(e,t,n){(function(e,r){Object.defineProperty(t,"__esModule",{value:!0});const i=n(778);function o(e,t){return e.require(t)}t.dynamicRequire=o,t.isNodeEnv=function(){return!i.isBrowserBundle()&&"[object process]"===Object.prototype.toString.call(void 0!==e?e:0)},t.loadModule=function(e){let t;try{t=o(r,e)}catch(e){}try{const{cwd:n}=o(r,"process");t=o(r,`${n()}/node_modules/${e}`)}catch(e){}return t}}).call(this,n(56),n(365)(e))},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getSDKSource=function(){return"npm"},t.isBrowserBundle=function(){return"undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(263);var i;!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(i||(i={}));class o{__init(){this._state=i.PENDING}__init2(){this._handlers=[]}constructor(e){o.prototype.__init.call(this),o.prototype.__init2.call(this),o.prototype.__init3.call(this),o.prototype.__init4.call(this),o.prototype.__init5.call(this),o.prototype.__init6.call(this);try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new o(((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new o(((t,n)=>{let r,i;return this.then((t=>{i=!1,r=t,e&&e()}),(t=>{i=!0,r=t,e&&e()})).then((()=>{i?n(r):t(r)}))}))}__init3(){this._resolve=e=>{this._setResult(i.RESOLVED,e)}}__init4(){this._reject=e=>{this._setResult(i.REJECTED,e)}}__init5(){this._setResult=(e,t)=>{this._state===i.PENDING&&(r.isThenable(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init6(){this._executeHandlers=()=>{if(this._state===i.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===i.RESOLVED&&e[1](this._value),this._state===i.REJECTED&&e[2](this._value),e[0]=!0)}))}}}t.SyncPromise=o,t.rejectedSyncPromise=function(e){return new o(((t,n)=>{n(e)}))},t.resolvedSyncPromise=function(e){return new o((t=>{t(e)}))}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getNumberOfUrlSegments=function(e){return e.split(/\\?\//).filter((e=>e.length>0&&","!==e)).length},t.parseUrl=function(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],relative:t[5]+n+r}},t.stripUrlQueryAndFragment=function(e){return e.split(/[\?#]/,1)[0]}},function(e,t,n){(function(e){Object.defineProperty(t,"__esModule",{value:!0});const r=n(777),i=n(304).getGlobalObject(),o={nowSeconds:()=>Date.now()/1e3};const a=r.isNodeEnv()?function(){try{return r.dynamicRequire(e,"perf_hooks").performance}catch(e){return}}():function(){const{performance:e}=i;if(!e||!e.now)return;return{now:()=>e.now(),timeOrigin:Date.now()-e.now()}}(),s=void 0===a?o:{nowSeconds:()=>(a.timeOrigin+a.now())/1e3},l=o.nowSeconds.bind(o),c=s.nowSeconds.bind(s),u=c,d=void 0!==a;t._browserPerformanceTimeOriginMode=void 0;const h=(()=>{const{performance:e}=i;if(!e||!e.now)return void(t._browserPerformanceTimeOriginMode="none");const n=36e5,r=e.now(),o=Date.now(),a=e.timeOrigin?Math.abs(e.timeOrigin+r-o):n,s=a<n,l=e.timing&&e.timing.navigationStart,c="number"==typeof l?Math.abs(l+r-o):n;return s||c<n?a<=c?(t._browserPerformanceTimeOriginMode="timeOrigin",e.timeOrigin):(t._browserPerformanceTimeOriginMode="navigationStart",l):(t._browserPerformanceTimeOriginMode="dateNow",o)})();t.browserPerformanceTimeOrigin=h,t.dateTimestampInSeconds=l,t.timestampInSeconds=c,t.timestampWithMs=u,t.usingPerformanceAPI=d}).call(this,n(365)(e))},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(774),i=n(580),o=n(385);function a(e,t){const n=e[1];for(const e of n){if(t(e,e[0].type))return!0}return!1}function s(e,t){return(t||new TextEncoder).encode(e)}const l={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay"};t.addItemToEnvelope=function(e,t){const[n,r]=e;return[n,[...r,t]]},t.createAttachmentEnvelopeItem=function(e,t){const n="string"==typeof e.data?s(e.data,t):e.data;return[o.dropUndefinedKeys({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]},t.createEnvelope=function(e,t=[]){return[e,t]},t.createEventEnvelopeHeaders=function(e,t,n,i){const a=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&{dsn:r.dsnToString(i)},..."transaction"===e.type&&a&&{trace:o.dropUndefinedKeys({...a})}}},t.envelopeContainsItemType=function(e,t){return a(e,((e,n)=>t.includes(n)))},t.envelopeItemTypeToDataCategory=function(e){return l[e]},t.forEachEnvelopeItem=a,t.getSdkMetadataForEnvelopeHeader=function(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}},t.parseEnvelope=function(e,t,n){let r="string"==typeof e?t.encode(e):e;function i(e){const t=r.subarray(0,e);return r=r.subarray(e+1),t}function o(){let e=r.indexOf(10);return e<0&&(e=r.length),JSON.parse(n.decode(i(e)))}const a=o(),s=[];for(;r.length;){const e=o(),t="number"==typeof e.length?e.length:void 0;s.push([e,t?i(t):o()])}return[a,s]},t.serializeEnvelope=function(e,t){const[n,r]=e;let o=JSON.stringify(n);function a(e){"string"==typeof o?o="string"==typeof e?o+e:[s(o,t),e]:o.push("string"==typeof e?s(e,t):e)}for(const e of r){const[t,n]=e;if(a(`\n${JSON.stringify(t)}\n`),"string"==typeof n||n instanceof Uint8Array)a(n);else{let e;try{e=JSON.stringify(n)}catch(t){e=JSON.stringify(i.normalize(n))}a(e)}}return"string"==typeof o?o:function(e){const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}(o)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(163),i="7";function o(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}t.getEnvelopeEndpointWithUrlEncodedAuth=function(e,t={}){const n="string"==typeof t?t:t.tunnel,a="string"!=typeof t&&t._metadata?t._metadata.sdk:void 0;return n||`${function(e){return`${o(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){return r.urlEncode({sentry_key:e.publicKey,sentry_version:i,...t&&{sentry_client:`${t.name}/${t.version}`}})}(e,a)}`},t.getReportDialogEndpoint=function(e,t){const n=r.makeDsn(e),i=`${o(n)}embed/error-page/`;let a=`dsn=${r.dsnToString(n)}`;for(const e in t)if("dsn"!==e)if("user"===e){const e=t.user;if(!e)continue;e.name&&(a+=`&name=${encodeURIComponent(e.name)}`),e.email&&(a+=`&email=${encodeURIComponent(e.email)}`)}else a+=`&${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`;return`${i}?${a}`}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(163),i=n(330),o=n(456),a=[];function s(e,t){t[e.name]=e,-1===a.indexOf(e.name)&&(e.setupOnce(o.addGlobalEventProcessor,i.getCurrentHub),a.push(e.name),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.logger.log(`Integration installed: ${e.name}`))}t.getIntegrationsToSetup=function(e){const t=e.defaultIntegrations||[],n=e.integrations;let i;t.forEach((e=>{e.isDefaultInstance=!0})),i=Array.isArray(n)?[...t,...n]:"function"==typeof n?r.arrayify(n(t)):t;const o=function(e){const t={};return e.forEach((e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)})),Object.values(t)}(i),a=o.findIndex((e=>"Debug"===e.name));if(-1!==a){const[e]=o.splice(a,1);o.push(e)}return o},t.installedIntegrations=a,t.setupIntegration=s,t.setupIntegrations=function(e){const t={};return e.forEach((e=>{e&&s(e,t)})),t}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(163),i=n(456);function o(e,t){const n=r.GLOBAL_OBJ._sentryDebugIds;if(!n)return;const i=Object.keys(n).reduce(((e,r)=>{const i=t(r);for(const t of i)if(t.abs_path){e[t.abs_path]=n[r];break}return e}),{}),o=new Set;try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.abs_path&&o.add(e.abs_path)}))}))}catch(e){}e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const a=e.debug_meta.images;o.forEach((e=>{i[e]&&a.push({type:"sourcemap",code_file:e,debug_id:i[e]})}))}t.applyDebugMetadata=o,t.prepareEvent=function(e,t,n,a){const{normalizeDepth:s=3,normalizeMaxBreadth:l=1e3}=e,c={...t,event_id:t.event_id||n.event_id||r.uuid4(),timestamp:t.timestamp||r.dateTimestampInSeconds()},u=n.integrations||e.integrations.map((e=>e.name));!function(e,t){const{environment:n,release:i,dist:o,maxValueLength:a=250}=t;"environment"in e||(e.environment="environment"in t?n:"production");void 0===e.release&&void 0!==i&&(e.release=i);void 0===e.dist&&void 0!==o&&(e.dist=o);e.message&&(e.message=r.truncate(e.message,a));const s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=r.truncate(s.value,a));const l=e.request;l&&l.url&&(l.url=r.truncate(l.url,a))}(c,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(c,u),o(c,e.stackParser);let d=a;n.captureContext&&(d=i.Scope.clone(d).update(n.captureContext));let h=r.resolvedSyncPromise(c);if(d){if(d.getAttachments){const e=[...n.attachments||[],...d.getAttachments()];e.length&&(n.attachments=e)}h=d.applyToEvent(c,n)}return h.then((e=>"number"==typeof s&&s>0?function(e,t,n){if(!e)return null;const i={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((e=>({...e,...e.data&&{data:r.normalize(e.data,t,n)}})))},...e.user&&{user:r.normalize(e.user,t,n)},...e.contexts&&{contexts:r.normalize(e.contexts,t,n)},...e.extra&&{extra:r.normalize(e.extra,t,n)}};e.contexts&&e.contexts.trace&&i.contexts&&(i.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(i.contexts.trace.data=r.normalize(e.contexts.trace.data,t,n)));e.spans&&(i.spans=e.spans.map((e=>(e.data&&(e.data=r.normalize(e.data,t,n)),e))));return i}(e,s,l):e))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(163);let i;class o{constructor(){o.prototype.__init.call(this)}static __initStatic(){this.id="FunctionToString"}__init(){this.name=o.id}setupOnce(){i=Function.prototype.toString,Function.prototype.toString=function(...e){const t=r.getOriginalFunction(this)||this;return i.apply(t,e)}}}o.__initStatic(),t.FunctionToString=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(163),i=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/];class o{static __initStatic(){this.id="InboundFilters"}__init(){this.name=o.id}constructor(e={}){this._options=e,o.prototype.__init.call(this)}setupOnce(e,t){const n=e=>{const n=t();if(n){const t=n.getIntegration(o);if(t){const r=n.getClient(),i=r?r.getOptions():{};return s(e,a(t._options,i))?null:e}}return e};n.id=this.name,e(n)}}function a(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...i],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}function s(e,t){return t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(e){}return!1}(e)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.logger.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${r.getEventDescription(e)}`),!0):function(e,t){if(!t||!t.length)return!1;return function(e){if(e.message)return[e.message];if(e.exception)try{const{type:t="",value:n=""}=e.exception.values&&e.exception.values[0]||{};return[`${n}`,`${t}: ${n}`]}catch(t){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.logger.error(`Cannot extract message for event ${r.getEventDescription(e)}`),[]}return[]}(e).some((e=>r.stringMatchesSomePattern(e,t)))}(e,t.ignoreErrors)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.logger.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${r.getEventDescription(e)}`),!0):function(e,t){if(!t||!t.length)return!1;const n=l(e);return!!n&&r.stringMatchesSomePattern(n,t)}(e,t.denyUrls)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.logger.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${r.getEventDescription(e)}.\nUrl: ${l(e)}`),!0):!function(e,t){if(!t||!t.length)return!0;const n=l(e);return!n||r.stringMatchesSomePattern(n,t)}(e,t.allowUrls)&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.logger.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${r.getEventDescription(e)}.\nUrl: ${l(e)}`),!0)}function l(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch(e){}return t?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(t):null}catch(t){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.logger.error(`Cannot extract url for event ${r.getEventDescription(e)}`),null}}o.__initStatic(),t.InboundFilters=o,t._mergeOptions=a,t._shouldDropEvent=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(218),i=n(163),o=n(458),a=n(277),s=n(459);class l extends r.BaseClient{constructor(e){const t=a.WINDOW.SENTRY_SDK_SOURCE||i.getSDKSource();e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:`${t}:@sentry/browser`,version:r.SDK_VERSION}],version:r.SDK_VERSION},super(e),e.sendClientReports&&a.WINDOW.document&&a.WINDOW.document.addEventListener("visibilitychange",(()=>{"hidden"===a.WINDOW.document.visibilityState&&this._flushOutcomes()}))}eventFromException(e,t){return o.eventFromException(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return o.eventFromMessage(this._options.stackParser,e,t,n,this._options.attachStacktrace)}sendEvent(e,t){const n=this.getIntegrationById(s.BREADCRUMB_INTEGRATION_ID);n&&n.addSentryBreadcrumb&&n.addSentryBreadcrumb(e),super.sendEvent(e,t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}_flushOutcomes(){const e=this._clearOutcomes();if(0===e.length)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.log("No outcomes to send"));if(!this._dsn)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.log("No dsn provided, will not send outcomes"));("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.log("Sending outcomes:",e);const t=r.getEnvelopeEndpointWithUrlEncodedAuth(this._dsn,this._options),n=i.createClientReportEnvelope(e,this._options.tunnel&&i.dsnToString(this._dsn));try{const e="[object Navigator]"===Object.prototype.toString.call(a.WINDOW&&a.WINDOW.navigator);if(e&&"function"==typeof a.WINDOW.navigator.sendBeacon&&!this._options.transportOptions){a.WINDOW.navigator.sendBeacon.bind(a.WINDOW.navigator)(t,i.serializeEnvelope(n))}else this._sendEnvelope(n)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.error(e)}}}t.BrowserClient=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(218),i=n(163),o=n(1392);t.makeFetchTransport=function(e,t=o.getNativeFetchImplementation()){return r.createTransport(e,(function(n){const r={body:n.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n.body.length<=65536,...e.fetchOptions};try{return t(e.url,r).then((e=>({statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}})))}catch(e){return o.clearCachedFetchImplementation(),i.rejectedSyncPromise(e)}}))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(218),i=n(163),o=4;t.makeXHRTransport=function(e){return r.createTransport(e,(function(t){return new i.SyncPromise(((n,r)=>{const i=new XMLHttpRequest;i.onerror=r,i.onreadystatechange=()=>{i.readyState===o&&n({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",e.url);for(const t in e.headers)Object.prototype.hasOwnProperty.call(e.headers,t)&&i.setRequestHeader(t,e.headers[t]);i.send(t.body)}))}))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(163),i="?";function o(e,t,n,r){const i={filename:e,abs_path:e,function:t,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}const a=/^\s*at (?:(.*\).*?|.*?) ?\((?:address at )?)?(?:async )?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,s=/\((\S*)(?::(\d+))(?::(\d+))\)/,l=[30,e=>{const t=a.exec(e);if(t){if(t[2]&&0===t[2].indexOf("eval")){const e=s.exec(t[2]);e&&(t[2]=e[1],t[3]=e[2],t[4]=e[3])}const[e,n]=y(t[1]||i,t[2]);return o(n,e,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],c=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|safari-extension|safari-web-extension|capacitor)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,u=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,d=[50,e=>{const t=c.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=u.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||i;return[n,e]=y(n,e),o(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],h=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,p=[40,e=>{const t=h.exec(e);return t?o(t[2],t[1]||i,+t[3],t[4]?+t[4]:void 0):void 0}],m=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,g=[10,e=>{const t=m.exec(e);return t?o(t[2],t[3]||i,+t[1]):void 0}],f=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,_=[20,e=>{const t=f.exec(e);return t?o(t[5],t[3]||t[4]||i,+t[1],+t[2]):void 0}],b=[l,d,p],v=r.createStackParser(...b),y=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:i,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};t.chromeStackLineParser=l,t.defaultStackLineParsers=b,t.defaultStackParser=v,t.geckoStackLineParser=d,t.opera10StackLineParser=g,t.opera11StackLineParser=_,t.winjsStackLineParser=p},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r="im.vector.is_virtual_room"},function(e,t,n){"use strict";n.d(t,"b",(function(){return b})),n.d(t,"a",(function(){return v}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(143),l=n(121),c=n(446),u=n(124),d=n(386),h=n(128),p=n(331),m=n(123),g=n(206),f=n(133),_=n(794);function b(e,t){return e?e.getPendingEvents().filter((function(e){const n=e.status===s.a.NOT_SENT,r=t===e.threadRootId;return n&&(!t||r)})):[]}class v extends a.a.PureComponent{constructor(e,t){super(e,t),i()(this,"unmounted",!1),i()(this,"onSyncStateChange",((e,t,n)=>{"SYNCING"===e&&"SYNCING"===t||this.unmounted||this.setState({syncState:e,syncStateData:n})})),i()(this,"onResendAllClick",(()=>{c.a.resendUnsentEvents(this.props.room).then((()=>{this.setState({isResending:!1})})),this.setState({isResending:!0}),u.a.fire(h.a.FocusSendMessageComposer)})),i()(this,"onCancelAllClick",(()=>{c.a.cancelUnsentEvents(this.props.room),u.a.fire(h.a.FocusSendMessageComposer)})),i()(this,"onRoomLocalEchoUpdated",((e,t)=>{if(t.roomId!==this.props.room.roomId)return;const n=b(this.props.room);this.setState({unsentMessages:n,isResending:n.length>0&&this.state.isResending})})),this.state={syncState:this.context.getSyncState(),syncStateData:this.context.getSyncStateData(),unsentMessages:b(this.props.room),isResending:!1}}componentDidMount(){const e=this.context;e.on("sync",this.onSyncStateChange),e.on("Room.localEchoUpdated",this.onRoomLocalEchoUpdated),this.checkSize()}componentDidUpdate(){this.checkSize()}componentWillUnmount(){this.unmounted=!0;const e=this.context;e&&(e.removeListener("sync",this.onSyncStateChange),e.removeListener("Room.localEchoUpdated",this.onRoomLocalEchoUpdated))}checkSize(){this.getSize()?this.props.onVisible&&this.props.onVisible():this.props.onHidden&&this.props.onHidden()}getSize(){return this.shouldShowConnectionError()?1:this.state.unsentMessages.length>0||this.state.isResending?2:0}shouldShowConnectionError(){const e=Boolean(this.state.syncStateData&&this.state.syncStateData.error&&"M_RESOURCE_LIMIT_EXCEEDED"===this.state.syncStateData.error.name);return"ERROR"===this.state.syncState&&!e}getUnsentMessageContent(){const e=this.state.unsentMessages;let t,n=null,r=null;for(const t of e){if(t.error&&"M_CONSENT_NOT_GIVEN"===t.error.errcode){n=t.error;break}if(t.error&&"M_RESOURCE_LIMIT_EXCEEDED"===t.error.errcode){r=t.error;break}}t=n?Object(l.a)("You can't send any messages until you review and agree to <consentLink>our terms and conditions</consentLink>.",{},{consentLink:e=>{var t;return a.a.createElement("a",{href:null===(t=n.data)||void 0===t?void 0:t.consent_uri,target:"_blank"},e)}}):r?Object(d.a)(r.data.limit_type,r.data.admin_contact,{monthly_active_user:Object(l.c)("Your message wasn't sent because this homeserver has hit its Monthly Active User Limit. Please <a>contact your service administrator</a> to continue using the service."),hs_disabled:Object(l.c)("Your message wasn't sent because this homeserver has been blocked by its administrator. Please <a>contact your service administrator</a> to continue using the service."),"":Object(l.c)("Your message wasn't sent because this homeserver has exceeded a resource limit. Please <a>contact your service administrator</a> to continue using the service.")}):Object(l.a)("Some of your messages have not been sent");let i=a.a.createElement(a.a.Fragment,null,a.a.createElement(m.a,{onClick:this.onCancelAllClick,className:"mx_RoomStatusBar_unsentCancelAllBtn"},Object(l.a)("Delete all")),a.a.createElement(m.a,{onClick:this.onResendAllClick,className:"mx_RoomStatusBar_unsentRetry"},Object(l.a)("Retry all")));return this.state.isResending&&(i=a.a.createElement(a.a.Fragment,null,a.a.createElement(g.a,{w:20,h:20}),a.a.createElement("span",null,Object(l.a)("Sending")))),a.a.createElement(_.a,{title:t,description:Object(l.a)("You can select all or individual messages to retry or delete"),notificationState:p.a.RED_EXCLAMATION,buttons:i})}render(){return this.shouldShowConnectionError()?a.a.createElement("div",{className:"mx_RoomStatusBar"},a.a.createElement("div",{role:"alert"},a.a.createElement("div",{className:"mx_RoomStatusBar_connectionLostBar"},a.a.createElement("img",{src:n(796).default,width:"24",height:"24",title:"/!\\ ",alt:"/!\\ "}),a.a.createElement("div",null,a.a.createElement("div",{className:"mx_RoomStatusBar_connectionLostBar_title"},Object(l.a)("Connectivity to the server has been lost.")),a.a.createElement("div",{className:"mx_RoomStatusBar_connectionLostBar_desc"},Object(l.a)("Sent messages will be stored until your connection has returned.")))))):this.state.unsentMessages.length>0||this.state.isResending?this.getUnsentMessageContent():null}}i()(v,"contextType",f.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(120),i=n.n(r),o=n(246);const a=e=>i.a.createElement("div",{className:"mx_RoomStatusBar mx_RoomStatusBar_unsentMessages"},i.a.createElement("div",{role:"alert"},i.a.createElement("div",{className:"mx_RoomStatusBar_unsentBadge"},i.a.createElement(o.a,{notification:e.notificationState})),i.a.createElement("div",null,i.a.createElement("div",{className:"mx_RoomStatusBar_unsentTitle"},e.title),e.description&&i.a.createElement("div",{className:"mx_RoomStatusBar_unsentDescription"},e.description)),i.a.createElement("div",{className:"mx_RoomStatusBar_unsentButtonBar"},e.buttons)))},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(130),i=n.n(r),o=n(132),a=n.n(o),s=n(120),l=n.n(s),c=n(126),u=n.n(c),d=n(211),h=n(123),p=n(197),m=n(167);const g=["symbol","count","color"];function f(e){let{symbol:t,count:n,color:r}=e,o=a()(e,g);const s=Object(m.b)("feature_hidebold");if(r===p.a.None||s&&r==p.a.Bold)return l.a.createElement(l.a.Fragment,null);const c=r>=p.a.Grey&&(!!n||!!t),f=null===t&&0===n;null===t&&n>0&&(t=Object(d.c)(n));const _=u()({mx_NotificationBadge:!0,mx_NotificationBadge_visible:!!f||c,mx_NotificationBadge_highlighted:r>=p.a.Red,mx_NotificationBadge_dot:f,mx_NotificationBadge_2char:t&&t.length>0&&t.length<3,mx_NotificationBadge_3char:t&&t.length>2});return o.onClick?l.a.createElement(h.a,i()({"aria-label":o.label},o,{className:_,onClick:o.onClick,onMouseOver:o.onMouseOver,onMouseLeave:o.onMouseLeave}),l.a.createElement("span",{className:"mx_NotificationBadge_count"},t),o.children):l.a.createElement("div",{className:_},l.a.createElement("span",{className:"mx_NotificationBadge_count"},t))}},function(e,t,n){"use strict";n.r(t),n.d(t,"Icon",(function(){return s}));var r,i,o=n(120);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}function s(e){return o.createElement("svg",a({id:"warning-triangle_svg__Layer_1",xmlns:"http://www.w3.org/2000/svg",x:0,y:0,viewBox:"0 0 14 12",xmlSpace:"preserve",role:"presentation","aria-hidden":!0},e),r||(r=o.createElement("style",null,".warning-triangle_svg__st0{fill:none;stroke:#454545;stroke-linecap:round;stroke-linejoin:round}")),i||(i=o.createElement("path",{className:"warning-triangle_svg__st0",d:"M6 1.5L1.2 9.3c-.2.3-.2.8 0 1.1.2.3.6.6 1 .6h9.7c.4 0 .8-.2 1-.6.2-.3.2-.8 0-1.1L8 1.5c-.2-.3-.6-.5-1-.5s-.8.2-1 .5zM7 4v3M7 9"})))}t.default="img/feather-customised/warning-triangle.f73f7c8.svg"},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(136);const i=e=>{const[t]=e.currentState.getStateEvents(r.UNSTABLE_ELEMENT_FUNCTIONAL_USERS.name);return Array.isArray(null==t?void 0:t.getContent().service_members)?t.getContent().service_members:[]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(797);const i=e=>{const t=Object(r.a)(e);return e.getJoinedMembers().filter((e=>!t.includes(e.userId)))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(126),l=n.n(s),c=n(121),u=n(135),d=n(145),h=n(123),p=n(333),m=n(157);function g(){return m.a.get().getDesktopCapturerSources({thumbnailSize:{height:176,width:312},types:["screen","window"]})}let f;!function(e){e.Screens="screen",e.Windows="window"}(f||(f={}));class _ extends a.a.Component{constructor(e){super(e),i()(this,"onClick",(()=>{this.props.onSelect(this.props.source)}))}render(){const e=l()({mx_desktopCapturerSourcePicker_source_thumbnail:!0,mx_desktopCapturerSourcePicker_source_thumbnail_selected:this.props.selected});return a.a.createElement(h.a,{className:"mx_desktopCapturerSourcePicker_source",title:this.props.source.name,onClick:this.onClick},a.a.createElement("img",{className:e,src:this.props.source.thumbnailURL}),a.a.createElement("span",{className:"mx_desktopCapturerSourcePicker_source_name"},this.props.source.name))}}class b extends a.a.Component{constructor(e){super(e),i()(this,"interval",void 0),i()(this,"onSelect",(e=>{this.setState({selectedSource:e})})),i()(this,"onShare",(()=>{this.props.onFinished(this.state.selectedSource.id)})),i()(this,"onTabChange",(()=>{this.setState({selectedSource:null})})),i()(this,"onCloseClick",(()=>{this.props.onFinished(null)})),this.state={selectedTab:f.Screens,sources:[],selectedSource:null}}async componentDidMount(){this.setState({sources:await g()}),this.interval=window.setInterval((async()=>{this.setState({sources:await g()})}),500)}componentWillUnmount(){clearInterval(this.interval)}getTab(e,t){const n=this.state.sources.filter((t=>t.id.startsWith(e))).map((e=>{var t;return a.a.createElement(_,{selected:(null===(t=this.state.selectedSource)||void 0===t?void 0:t.id)===e.id,source:e,onSelect:this.onSelect,key:e.id})}));return new p.a(e,t,null,a.a.createElement("div",{className:"mx_desktopCapturerSourcePicker_tab"},n))}render(){const e=[this.getTab("screen",Object(c.a)("Share entire screen")),this.getTab("window",Object(c.a)("Application window"))];return a.a.createElement(u.a,{className:"mx_desktopCapturerSourcePicker",onFinished:this.onCloseClick,title:Object(c.a)("Share content")},a.a.createElement(p.c,{tabs:e,tabLocation:p.b.TOP,onChange:this.onTabChange}),a.a.createElement(d.a,{primaryButton:Object(c.a)("Share"),hasCancel:!0,onCancel:this.onCloseClick,onPrimaryButtonClick:this.onShare,primaryDisabled:!this.state.selectedSource}))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(120),i=n.n(r),o=n(213),a=n(121),s=n(127);const l=()=>{s.b.createDialog(o.a,{title:Object(a.a)("Can’t start a call"),description:i.a.createElement("p",null,Object(a.a)("You can’t start a call as you are currently recording a live broadcast. Please end your live broadcast in order to start a call.")),hasCloseButton:!0})}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o}));var r=n(146);function i(e,t){return e.size!==t.size||(!!Array.from(t).some((t=>!e.has(t)))||!!Array.from(e).some((e=>!t.has(e))))}function o(e,t){return Object(r.a)(Array.from(e),Array.from(t))}},function(e,t,n){"use strict";var r=n(120),i=n.n(r),o=n(160),a=n(279);t.a=e=>{let{label:t,labelInvite:n,labelPublic:r,labelRestricted:s,value:l,width:c=448,onChange:u}=e;const d=[i.a.createElement("div",{key:o.c.Invite,className:"mx_JoinRuleDropdown_invite"},n),i.a.createElement("div",{key:o.c.Public,className:"mx_JoinRuleDropdown_public"},r)];return s&&d.unshift(i.a.createElement("div",{key:o.c.Restricted,className:"mx_JoinRuleDropdown_restricted"},s)),i.a.createElement(a.a,{id:"mx_JoinRuleDropdown",className:"mx_JoinRuleDropdown",onOptionChange:u,menuWidth:c,value:l,label:t},d)}},function(e,t,n){"use strict";var r=n(120),i=n.n(r),o=n(16),a=n(121),s=n(123),l=n(228),c=n(168),u=n(232),d=n(122),h=n(221),p=n(156);t.a=e=>{var t;let{space:n,onFinished:m}=e;const[g,f]=Object(r.useState)(Object(a.a)("Click to copy"));return i.a.createElement("div",{className:"mx_SpacePublicShare"},i.a.createElement(s.a,{className:"mx_SpacePublicShare_shareButton",onClick:async()=>{const e=new c.a(n);e.load();const t=await Object(l.b)(e.forShareableRoom())?Object(a.a)("Copied!"):Object(a.a)("Failed to copy");f(t),await Object(o.N)(5e3),g===t&&f(Object(a.a)("Click to copy"))}},i.a.createElement("h3",null,Object(a.a)("Share invite link")),i.a.createElement("span",null,g)),n.canInvite(null===(t=d.a.get())||void 0===t?void 0:t.getUserId())&&Object(h.a)(p.a.InviteUsers)?i.a.createElement(s.a,{className:"mx_SpacePublicShare_inviteButton",onClick:()=>{m&&m(),Object(u.e)(n.roomId)}},i.a.createElement("h3",null,Object(a.a)("Invite people")),i.a.createElement("span",null,Object(a.a)("Invite with email or username"))):null)}},function(e,t,n){"use strict";var r=n(120),i=n.n(r),o=n(155),a=n(121),s=n(139),l=n(131),c=n(384),u=n(177),d=n(127),h=n(213);t.a=e=>{let{title:t,subheading:n,children:p,rageshakeLabel:m,rageshakeData:g={},onFinished:f}=e;const[_,b]=Object(r.useState)(""),[v,y]=Object(r.useState)(!1);return i.a.createElement(o.a,{className:"mx_GenericFeatureFeedbackDialog",hasCancelButton:!0,title:t,description:i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:"mx_GenericFeatureFeedbackDialog_subheading"},n," ",Object(a.a)("Your platform and username will be noted to help us use your feedback as much as we can.")," ",p),i.a.createElement(s.a,{id:"feedbackComment",label:Object(a.a)("Feedback"),type:"text",autoComplete:"off",value:_,element:"textarea",onChange:e=>{b(e.target.value)},autoFocus:!0}),i.a.createElement(u.b,{checked:v,onChange:e=>y(e.target.checked)},Object(a.a)("You may contact me if you have any follow up questions"))),button:Object(a.a)("Send feedback"),buttonDisabled:!_,onFinished:async e=>{if(!e)return f(!1);Object(c.c)(l.b.get().bug_report_endpoint_url,m,_,v,g),f(!0),d.b.createDialog(h.a,{title:t,description:Object(a.a)("Feedback sent! Thanks, we appreciate it!"),button:Object(a.a)("Close"),hasCloseButton:!1,fixedWidth:!1})}})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(120),i=n.n(r),o=n(121),a=n(123),s=n(139),l=n(291);const c=e=>{let{avatarUrl:t,avatarDisabled:n=!1,setAvatar:s}=e;const c=Object(r.useRef)(),[u,d]=Object(r.useState)(t);let h;return h=n?u?i.a.createElement("img",{className:"mx_SpaceBasicSettings_avatar",src:u,alt:""}):i.a.createElement("div",{className:"mx_SpaceBasicSettings_avatar"}):u?i.a.createElement(i.a.Fragment,null,i.a.createElement(a.a,{className:"mx_SpaceBasicSettings_avatar",onClick:()=>{var e;return null===(e=c.current)||void 0===e?void 0:e.click()},element:"img",src:u,alt:""}),i.a.createElement(a.a,{onClick:()=>{c.current.value="",d(void 0),s(void 0)},kind:"link",className:"mx_SpaceBasicSettings_avatar_remove","aria-label":Object(o.a)("Delete avatar")},Object(o.a)("Delete"))):i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:"mx_SpaceBasicSettings_avatar",onClick:()=>{var e;return null===(e=c.current)||void 0===e?void 0:e.click()}}),i.a.createElement(a.a,{onClick:()=>{var e;return null===(e=c.current)||void 0===e?void 0:e.click()},kind:"link","aria-label":Object(o.a)("Upload avatar")},Object(o.a)("Upload"))),i.a.createElement("div",{className:"mx_SpaceBasicSettings_avatarContainer"},h,i.a.createElement("input",{type:"file",ref:c,onClick:l.a,onChange:e=>{var t;if(null===(t=e.target.files)||void 0===t||!t.length)return;const n=e.target.files[0];s(n);const r=new FileReader;r.onload=e=>{var t;d(null===(t=e.target)||void 0===t?void 0:t.result)},r.readAsDataURL(n)},accept:"image/*"}))};t.b=e=>{let{avatarUrl:t,avatarDisabled:n=!1,setAvatar:r,name:a="",nameDisabled:l=!1,setName:u,topic:d="",topicDisabled:h=!1,setTopic:p}=e;return i.a.createElement("div",{className:"mx_SpaceBasicSettings"},i.a.createElement(c,{avatarUrl:t,avatarDisabled:n,setAvatar:r}),i.a.createElement(s.a,{name:"spaceName",label:Object(o.a)("Name"),autoFocus:!0,value:a,onChange:e=>u(e.target.value),disabled:l}),i.a.createElement(s.a,{name:"spaceTopic",element:"textarea",label:Object(o.a)("Description"),value:d,onChange:e=>p(e.target.value),rows:3,disabled:h}))}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return O})),n.d(t,"b",(function(){return I}));var r=n(13),i=n.n(r),o=n(126),a=n.n(o),s=n(463),l=n(120),c=n(1397),u=n(142),d=n(169),h=n(128),p=n(124),m=n(152),g=n(121),f=n(220),_=n(294),b=n(190),v=n(930),y=n(226),E=n(146),S=n(185),w=n(150),T=n(123),C=n(148),x=n(125),F=n(523),D=n(246),k=n(450);const O=32;Object(c.a)();class I extends l.Component{constructor(t){super(t),i()(this,"headerButton",Object(l.createRef)()),i()(this,"sublistRef",Object(l.createRef)()),i()(this,"tilesRef",Object(l.createRef)()),i()(this,"dispatcherRef",void 0),i()(this,"layout",void 0),i()(this,"heightAtStart",void 0),i()(this,"notificationState",void 0),i()(this,"slidingSyncMode",void 0),i()(this,"onListsLoading",((e,t)=>{this.props.tagId===e&&this.setState({roomsLoading:t})})),i()(this,"onListsUpdated",(()=>{const e={},t=this.state.rooms,n=Object(E.b)(y.c.instance.orderedLists[this.props.tagId]||[]);Object(E.e)(t,n)&&(e.rooms=n),Object.keys(e).length>0&&this.setState(e)})),i()(this,"onAction",(t=>{t.action===h.a.ViewRoom&&t.show_room_tile&&this.state.rooms&&e((()=>{const e=this.state.rooms.findIndex((e=>e.roomId===t.room_id));!this.state.isExpanded&&e>-1&&this.toggleCollapsed(),e>=this.numVisibleTiles&&(this.layout.visibleTiles=this.layout.tilesWithPadding(e+1,32),this.forceUpdate())}))})),i()(this,"onResize",((e,t,n,r)=>{const i=this.heightAtStart+r.height;this.applyHeightChange(i),this.setState({height:i})})),i()(this,"onResizeStart",(()=>{this.heightAtStart=this.state.height,this.setState({isResizing:!0})})),i()(this,"onResizeStop",((e,t,n,r)=>{const i=this.heightAtStart+r.height;this.applyHeightChange(i),this.setState({isResizing:!1,height:i})})),i()(this,"onShowAllClick",(async()=>{if(this.slidingSyncMode){const e=y.c.instance.getCount(this.props.tagId);await F.a.instance.ensureListRegistered(this.props.tagId,{ranges:[[0,e]]})}const e=this.numVisibleTiles,t=this.layout.tilesToPixelsWithPadding(this.numTiles,this.padding);this.applyHeightChange(t),this.setState({height:t},(()=>{this.focusRoomTile(e)}))})),i()(this,"onShowLessClick",(()=>{const e=this.layout.tilesToPixelsWithPadding(this.layout.defaultVisibleTiles,this.padding);this.applyHeightChange(e),this.setState({height:e})})),i()(this,"focusRoomTile",(e=>{if(!this.sublistRef.current)return;const t=this.sublistRef.current.querySelectorAll(".mx_RoomTile"),n=t&&t[e];n&&n.focus()})),i()(this,"onOpenMenuClick",(e=>{e.preventDefault(),e.stopPropagation();const t=e.target;this.setState({contextMenuPosition:t.getBoundingClientRect()})})),i()(this,"onContextMenu",(e=>{e.preventDefault(),e.stopPropagation(),this.setState({contextMenuPosition:{left:e.clientX,top:e.clientY,height:0}})})),i()(this,"onCloseMenu",(()=>{this.setState({contextMenuPosition:void 0})})),i()(this,"onUnreadFirstChanged",(()=>{const e=y.c.instance.getListOrder(this.props.tagId)===_.a.Importance?_.a.Natural:_.a.Importance;y.c.instance.setListOrder(this.props.tagId,e),this.forceUpdate()})),i()(this,"onTagSortChanged",(async e=>{y.c.instance.setTagSorting(this.props.tagId,e),this.forceUpdate()})),i()(this,"onMessagePreviewChanged",(()=>{this.layout.showPreviews=!this.layout.showPreviews,this.forceUpdate()})),i()(this,"onBadgeClick",(e=>{let t;e.preventDefault(),e.stopPropagation(),t=this.props.tagId===b.a.Invite?this.state.rooms&&this.state.rooms[0]:y.c.instance.orderedLists[this.props.tagId].find((e=>{const t=this.notificationState.getForRoom(e);return t.count>0&&t.color===this.notificationState.color})),t&&p.a.dispatch({action:h.a.ViewRoom,room_id:t.roomId,show_room_tile:!0,metricsTrigger:"WebRoomListNotificationBadge",metricsViaKeyboard:"click"!==e.type})})),i()(this,"onHeaderClick",(()=>{const t=this.headerButton.current.parentElement,n=t.parentElement.parentElement,r=n.parentElement.parentElement,i=Math.round(r.scrollTop),o=i<=Math.round(O),a=i>=Math.round(r.scrollHeight-r.offsetHeight),s=t.classList.contains("mx_RoomSublist_headerContainer_stickyTop"),l=t.classList.contains("mx_RoomSublist_headerContainer_stickyBottom");if(l&&!a||s&&!o)n.scrollIntoView({behavior:"smooth"});else{const t=this.state.isExpanded;this.toggleCollapsed(),!t&&l&&e((()=>{n.scrollIntoView({behavior:"smooth"})}))}})),i()(this,"toggleCollapsed",(()=>{this.props.forceExpanded||(this.layout.isCollapsed=this.state.isExpanded,this.setState({isExpanded:!this.layout.isCollapsed}),this.props.onListCollapse&&this.props.onListCollapse(!this.layout.isCollapsed))})),i()(this,"onHeaderKeyDown",(e=>{switch(Object(m.a)().getRoomListAction(e)){case u.h.CollapseRoomListSection:e.stopPropagation(),this.state.isExpanded&&this.toggleCollapsed();break;case u.h.ExpandRoomListSection:if(e.stopPropagation(),this.state.isExpanded){if(this.sublistRef.current){const e=this.sublistRef.current.querySelector(".mx_RoomTile");e&&e.focus()}}else this.toggleCollapsed()}})),i()(this,"onKeyDown",(e=>{var t;switch(Object(m.a)().getAccessibilityAction(e)){case u.h.ArrowLeft:e.stopPropagation(),null===(t=this.headerButton.current)||void 0===t||t.focus();break;case u.h.ArrowRight:e.stopPropagation()}})),this.slidingSyncMode=x.b.getValue("feature_sliding_sync"),this.layout=v.a.instance.getLayoutFor(this.props.tagId),this.heightAtStart=0,this.notificationState=f.a.instance.getListState(this.props.tagId),this.state={isResizing:!1,isExpanded:!this.layout.isCollapsed,height:0,rooms:Object(E.b)(y.c.instance.orderedLists[this.props.tagId]||[]),roomsLoading:!1},this.state=Object.assign(this.state,{height:this.calculateInitialHeight()})}calculateInitialHeight(){const e=Math.max(Math.floor(this.layout.visibleTiles),this.layout.minVisibleTiles),t=Math.min(this.numTiles,e);return this.layout.tilesToPixelsWithPadding(t,this.padding)}get padding(){let e=4;const t=this.numTiles>this.numVisibleTiles,n=this.numTiles>this.layout.defaultVisibleTiles;return(t||n)&&(e+=28),e}get extraTiles(){var e;return null!==(e=this.props.extraTiles)&&void 0!==e?e:null}get numTiles(){return I.calcNumTiles(this.state.rooms,this.extraTiles)}static calcNumTiles(e,t){return(e||[]).length+(t||[]).length}get numVisibleTiles(){if(this.slidingSyncMode)return this.state.rooms.length;const e=Math.ceil(this.layout.visibleTiles);return Math.min(e,this.numTiles)}componentDidUpdate(e,t){const n=e.extraTiles;I.calcNumTiles(t.rooms,n)!==this.numTiles&&this.setState({height:this.calculateInitialHeight()})}shouldComponentUpdate(e,t){if(Object(S.c)(this.props,e))return!0;const n=Object(S.b)(this.state,["rooms"]),r=Object(S.b)(t,["rooms"]);if(Object(S.c)(n,r))return!0;const i=this.props.extraTiles||[],o=e.extraTiles||[];if(i.length>0||o.length>0)return!0;if(I.calcNumTiles(t.rooms,o)!==this.numTiles)return!0;if(!t.isExpanded)return!1;if(this.state.rooms.length!==t.rooms.length)return!0;const a=this.state.rooms.slice(0,this.numVisibleTiles),s=t.rooms.slice(0,this.numVisibleTiles);return!!Object(E.e)(a,s)}componentDidMount(){var e;this.dispatcherRef=p.a.register(this.onAction),y.c.instance.on(y.b,this.onListsUpdated),y.c.instance.on(y.a,this.onListsLoading),null===(e=this.tilesRef.current)||void 0===e||e.addEventListener("scroll",this.onScrollPrevent,{passive:!0})}componentWillUnmount(){var e;p.a.unregister(this.dispatcherRef),y.c.instance.off(y.b,this.onListsUpdated),y.c.instance.off(y.a,this.onListsLoading),null===(e=this.tilesRef.current)||void 0===e||e.removeEventListener("scroll",this.onScrollPrevent)}applyHeightChange(e){const t=Math.ceil(this.layout.pixelsToTiles(e-this.padding));this.layout.visibleTiles=Math.min(this.numTiles,t)}renderVisibleTiles(){if(!this.state.isExpanded&&!this.props.forceExpanded)return[];const e=[];if(this.state.rooms){let t=this.state.rooms;this.props.forceExpanded||(t=t.slice(0,this.numVisibleTiles));for(const n of t)e.push(l.createElement(k.b,{room:n,key:`room-${n.roomId}`,showMessagePreview:this.layout.showPreviews,isMinimized:this.props.isMinimized,tag:this.props.tagId}))}return this.extraTiles&&e.push(...this.extraTiles),e.length>this.numVisibleTiles&&!this.props.forceExpanded?e.slice(0,this.numVisibleTiles):e}renderMenu(){if(this.props.tagId===b.a.Suggested||this.props.tagId===b.a.SavedItems)return null;let e;if(this.state.contextMenuPosition){let t,n=y.c.instance.getTagSorting(this.props.tagId)===_.b.Alphabetic,r=y.c.instance.getListOrder(this.props.tagId)===_.a.Importance;if(this.slidingSyncMode){const e=F.a.instance.slidingSync.getListParams(this.props.tagId);n="by_name"===((null==e?void 0:e.sort)||[])[0],r="by_notification_level"===((null==e?void 0:e.sort)||[])[0]}this.props.tagId!==b.a.Invite&&(t=l.createElement(l.Fragment,null,l.createElement("hr",null),l.createElement("div",null,l.createElement("div",{className:"mx_RoomSublist_contextMenu_title"},Object(g.a)("Appearance")),l.createElement(w.g,{onClose:this.onCloseMenu,onChange:this.onUnreadFirstChanged,checked:r},Object(g.a)("Show rooms with unread messages first")),l.createElement(w.g,{onClose:this.onCloseMenu,onChange:this.onMessagePreviewChanged,checked:this.layout.showPreviews},Object(g.a)("Show previews of messages"))))),e=l.createElement(w.n,{chevronFace:w.a.None,left:this.state.contextMenuPosition.left,top:this.state.contextMenuPosition.top+this.state.contextMenuPosition.height,onFinished:this.onCloseMenu},l.createElement("div",{className:"mx_RoomSublist_contextMenu"},l.createElement("div",null,l.createElement("div",{className:"mx_RoomSublist_contextMenu_title"},Object(g.a)("Sort by")),l.createElement(w.h,{onClose:this.onCloseMenu,onChange:()=>this.onTagSortChanged(_.b.Recent),checked:!n,name:`mx_${this.props.tagId}_sortBy`},Object(g.a)("Activity")),l.createElement(w.h,{onClose:this.onCloseMenu,onChange:()=>this.onTagSortChanged(_.b.Alphabetic),checked:n,name:`mx_${this.props.tagId}_sortBy`},Object(g.a)("A-Z"))),t))}return l.createElement(l.Fragment,null,l.createElement(w.c,{className:"mx_RoomSublist_menuButton",onClick:this.onOpenMenuClick,title:Object(g.a)("List options"),isExpanded:!!this.state.contextMenuPosition}),e)}renderHeader(){return l.createElement(d.e,{inputRef:this.headerButton},(e=>{let{onFocus:t,isActive:n,ref:r}=e;const i=n?0:-1;let o=Object(g.a)("Jump to first unread room.");this.props.tagId===b.a.Invite&&(o=Object(g.a)("Jump to first invite."));const s=l.createElement(D.a,{forceCount:!0,notification:this.notificationState,onClick:this.onBadgeClick,tabIndex:i,"aria-label":o,showUnsentTooltip:!0});let c;if(this.props.AuxButtonComponent){const e=this.props.AuxButtonComponent;c=l.createElement(e,{tabIndex:i})}const u=a()({mx_RoomSublist_collapseBtn:!0,mx_RoomSublist_collapseBtn_collapsed:!this.state.isExpanded&&!this.props.forceExpanded}),d=a()({mx_RoomSublist_headerContainer:!0,mx_RoomSublist_headerContainer_withAux:!!c}),h=l.createElement("div",{className:"mx_RoomSublist_badgeContainer"},s);let p=T.a;return this.props.isMinimized&&(p=C.a),l.createElement("div",{className:d,onKeyDown:this.onHeaderKeyDown,onFocus:t,"aria-label":this.props.label},l.createElement("div",{className:"mx_RoomSublist_stickableContainer"},l.createElement("div",{className:"mx_RoomSublist_stickable"},l.createElement(p,{onFocus:t,inputRef:r,tabIndex:i,className:"mx_RoomSublist_headerText",role:"treeitem","aria-expanded":this.state.isExpanded,"aria-level":1,onClick:this.onHeaderClick,onContextMenu:this.onContextMenu,title:this.props.isMinimized?this.props.label:void 0},l.createElement("span",{className:u}),l.createElement("span",null,this.props.label)),this.renderMenu(),this.props.isMinimized?null:h,this.props.isMinimized?null:c)),this.props.isMinimized?h:null,this.props.isMinimized?c:null)}))}onScrollPrevent(e){e.target.scrollTop=0}render(){var e;const t=this.renderVisibleTiles(),n=!(this.state.rooms.length||null!==(e=this.props.extraTiles)&&void 0!==e&&e.length||!0===this.props.alwaysVisible),r=a()({mx_RoomSublist:!0,mx_RoomSublist_hasMenuOpen:!!this.state.contextMenuPosition,mx_RoomSublist_minimized:this.props.isMinimized,mx_RoomSublist_hidden:n});let i;if(this.state.roomsLoading)i=l.createElement("div",{className:"mx_RoomSublist_skeletonUI"});else if(t.length>0&&this.props.forceExpanded)i=l.createElement("div",{className:"mx_RoomSublist_resizeBox mx_RoomSublist_resizeBox_forceExpanded"},l.createElement("div",{className:"mx_RoomSublist_tiles",ref:this.tilesRef},t));else if(t.length>0){const e=this.layout,n=Math.min(e.minVisibleTiles,this.numTiles),r=4+(n<this.numTiles?28:0),o=e.tilesToPixelsWithPadding(n,r),c=e.tilesToPixelsWithPadding(this.numTiles,this.padding),u=a()({mx_RoomSublist_showNButton:!0});let h;const p=this.slidingSyncMode&&y.c.instance.getCount(this.props.tagId)>this.state.rooms.length;if(c>this.state.height||p){const e=this.state.height-4-28,t=Math.floor(e/this.layout.tileHeight);let n=this.numTiles-t;this.slidingSyncMode&&(n=y.c.instance.getCount(this.props.tagId)-t);const r=Object(g.a)("Show %(count)s more",{count:n});let i=l.createElement("span",{className:"mx_RoomSublist_showNButtonText"},r);this.props.isMinimized&&(i=null),h=l.createElement(d.a,{role:"treeitem",onClick:this.onShowAllClick,className:u,"aria-label":r},l.createElement("span",{className:"mx_RoomSublist_showMoreButtonChevron mx_RoomSublist_showNButtonChevron"}),i)}else if(this.numTiles>this.layout.defaultVisibleTiles){const e=Object(g.a)("Show less");let t=l.createElement("span",{className:"mx_RoomSublist_showNButtonText"},e);this.props.isMinimized&&(t=null),h=l.createElement(d.a,{role:"treeitem",onClick:this.onShowLessClick,className:u,"aria-label":e},l.createElement("span",{className:"mx_RoomSublist_showLessButtonChevron mx_RoomSublist_showNButtonChevron"}),t)}const m={bottom:!0,bottomLeft:!1,bottomRight:!1,left:!1,right:!1,top:!1,topLeft:!1,topRight:!1};e.visibleTiles>=this.numTiles&&this.numTiles<=e.minVisibleTiles&&(m.bottom=!1);const f=a()({mx_RoomSublist_resizerHandles:!0,mx_RoomSublist_resizerHandles_showNButton:!!h});i=l.createElement(l.Fragment,null,l.createElement(s.Resizable,{size:{height:this.state.height},minHeight:o,maxHeight:c,onResizeStart:this.onResizeStart,onResizeStop:this.onResizeStop,onResize:this.onResize,handleWrapperClass:f,handleClasses:{bottom:"mx_RoomSublist_resizerHandle"},className:"mx_RoomSublist_resizeBox",enable:m},l.createElement("div",{className:"mx_RoomSublist_tiles",ref:this.tilesRef},t),h))}else this.props.showSkeleton&&this.state.isExpanded&&(i=l.createElement("div",{className:"mx_RoomSublist_skeletonUI"}));return l.createElement("div",{ref:this.sublistRef,className:r,role:"group","aria-hidden":n,"aria-label":this.props.label,onKeyDown:this.onKeyDown},this.renderHeader(),i)}}}).call(this,n(54).setImmediate)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var r=n(13),i=n.n(r);class o{constructor(){}}function a(e,t){return!!e.match(/[\d.]+/)&&Number(e)>=Number(t)}i()(o,"RestrictedRooms","9")},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(13),i=n.n(r),o=n(1),a=n(146);class s{constructor(){i()(this,"listeners",[])}when(e,t){return this.listeners.push({condition:e,fn:t}),this}whenAnyOf(e,t){for(const n of e)this.when(n,t);return this}whenAnything(e){return this.listeners.push({condition:null,fn:e}),this}notifyCondition(e){const t=Object(a.b)(this.listeners);for(const n of t)if(null===n.condition||n.condition===e)try{n.fn(this)}catch(t){o.a.error(`Error calling whenable listener for ${e}:`,t)}}destroy(){this.listeners=[]}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(13),i=n.n(r),o=n(17),a=n.n(o),s=n(153);class l extends a.a{constructor(){super(...arguments),i()(this,"toasts",new Map)}static get instance(){return l._instance||(l._instance=new l),l._instance}get components(){return Array.from(this.toasts.values())}addToast(e){const t=Symbol();return this.toasts.set(t,e),this.emit(s.b),t}removeToast(e){this.toasts.delete(e),this.emit(s.b)}}i()(l,"_instance",void 0)},function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(129),l=n(160),c=n(121),u=n(131),d=n(235),h=n(122),p=n(127),m=n(276),g=n(135),f=n(145),_=n(494),b=n(123);class v extends a.a.Component{constructor(e){var t;super(e),i()(this,"isPrivate",void 0),i()(this,"currentVersion",void 0),i()(this,"onProgressCallback",((e,t,n)=>{this.setState({progressText:e,progress:t,total:n})})),i()(this,"onContinue",(async()=>{var e,t;const n={continue:!0,invite:this.isPrivate&&this.state.inviteUsersToNewRoom};await(null===(e=(t=this.props).doUpgrade)||void 0===e?void 0:e.call(t,n,this.onProgressCallback)),this.props.onFinished(n)})),i()(this,"onCancel",(()=>{this.props.onFinished({continue:!1,invite:!1})})),i()(this,"onInviteUsersToggle",(e=>{this.setState({inviteUsersToNewRoom:e})})),i()(this,"openBugReportDialog",(e=>{e.preventDefault(),e.stopPropagation(),p.b.createDialog(m.a,{})}));const n=h.a.get().getRoom(this.props.roomId),r=null==n?void 0:n.currentState.getStateEvents(s.b.RoomJoinRules,"");this.isPrivate=null===(t=(null==r?void 0:r.getContent().join_rule)!==l.c.Public)||void 0===t||t,this.currentVersion=null==n?void 0:n.getVersion(),this.state={inviteUsersToNewRoom:!0}}render(){const e=u.b.get().brand;let t=null;this.isPrivate&&(t=a.a.createElement(d.a,{value:this.state.inviteUsersToNewRoom,onChange:this.onInviteUsersToggle,label:Object(c.a)("Automatically invite members from this room to the new one")}));const n=this.isPrivate?Object(c.a)("Upgrade private room"):Object(c.a)("Upgrade public room");let r,i=a.a.createElement("p",null,Object(c.a)("This usually only affects how the room is processed on the server. If you're having problems with your %(brand)s, please report a bug.",{brand:e}));return u.b.get().bug_report_endpoint_url&&(i=a.a.createElement("p",null,Object(c.a)("This usually only affects how the room is processed on the server. If you're having problems with your %(brand)s, please <a>report a bug</a>.",{brand:e},{a:e=>a.a.createElement(b.a,{kind:"link_inline",onClick:this.openBugReportDialog},e)}))),r=this.state.progressText?a.a.createElement("span",{className:"mx_RoomUpgradeWarningDialog_progress"},a.a.createElement(_.a,{value:this.state.progress,max:this.state.total}),a.a.createElement("div",{className:"mx_RoomUpgradeWarningDialog_progressText"},this.state.progressText)):a.a.createElement(f.a,{primaryButton:Object(c.a)("Upgrade"),onPrimaryButtonClick:this.onContinue,cancelButton:Object(c.a)("Cancel"),onCancel:this.onCancel}),a.a.createElement(g.a,{className:"mx_RoomUpgradeWarningDialog",hasCancel:!0,fixedWidth:!1,onFinished:this.props.onFinished,title:n},a.a.createElement("div",null,a.a.createElement("p",null,this.props.description||Object(c.a)("Upgrading a room is an advanced action and is usually recommended when a room is unstable due to bugs, missing features or security vulnerabilities.")),a.a.createElement("p",null,Object(c.a)("<b>Please note upgrading will make a new version of the room</b>. All current messages will stay in this archived room.",{},{b:e=>a.a.createElement("b",null,e)})),i,a.a.createElement("p",null,Object(c.a)("You'll upgrade this room from <oldVersion /> to <newVersion />.",{},{oldVersion:()=>a.a.createElement("code",null,this.currentVersion),newVersion:()=>a.a.createElement("code",null,this.props.targetVersion)})),t),r)}}},function(e,t,n){"use strict";var r,i=n(120),o=n.n(i),a=n(121),s=n(335),l=n(301),c=n(334),u=n(212),d=n(393),h=n(146);!function(e){e.All="All",e.Specific="Specific",e.None="None"}(r||(r={}));const p=e=>{let{filterPlaceholder:t,rooms:n,selected:r,onChange:s}=e;const[p,m]=Object(i.useState)(""),g=p.toLowerCase().trim(),f=Object(i.useMemo)((()=>{if(!g)return n;return new l.a(n,{keys:["name"],funcs:[e=>Object(h.n)([e.getCanonicalAlias(),...e.getAltAliases()])],shouldMatchWordsOnly:!1}).match(g)}),[n,g]);return o.a.createElement("div",{className:"mx_SpaceChildrenPicker"},o.a.createElement(c.a,{className:"mx_textinput_icon mx_textinput_search",placeholder:t,onSearch:m,autoFocus:!0}),o.a.createElement(u.a,null,f.map((e=>o.a.createElement(d.b,{key:e.roomId,room:e,checked:r.has(e),onChange:t=>{s(t,e)}}))),f.length<1?o.a.createElement("span",{className:"mx_SpaceChildrenPicker_noResults"},Object(a.a)("No results")):void 0))};t.a=e=>{let{space:t,spaceChildren:n,selected:l,onChange:c,noneLabel:u,allLabel:d,specificLabel:h}=e;const[m,g]=Object(i.useState)(u?r.None:r.All);return Object(i.useEffect)((()=>{m===r.All?c(n):c([])}),[c,m,n]),o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"mx_SpaceChildrenPicker"},o.a.createElement(s.a,{name:"roomsToLeave",value:m,onChange:g,definitions:[{value:r.None,label:u},{value:r.All,label:d},{value:r.Specific,label:h}].filter((e=>e.label))})),m===r.Specific&&o.a.createElement(p,{filterPlaceholder:Object(a.a)("Search %(spaceName)s",{spaceName:t.name}),rooms:n,selected:l,onChange:(e,t)=>{c(e?[t,...l]:[...l].filter((e=>e!==t)))}}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(149),l=n(140),c=n(151),u=n(122),d=n(301),h=n(383),p=n(382),m=n(121),g=n(168),f=n(172),_=n(260);const b=/\B@\S*/g,v=/[^/,:; \t\n]\S*/g;class y extends p.a{constructor(e,t){super({commandRegex:b,forcedCommandRegex:v,renderingType:t}),i()(this,"matcher",void 0),i()(this,"users",void 0),i()(this,"room",void 0),i()(this,"onRoomTimeline",((e,t,n,r,i)=>{t&&(r||t.roomId===this.room.roomId&&i.timeline.getTimelineSet()===t.getUnfilteredTimelineSet()&&!n&&i&&i.liveEvent&&this.onUserSpoke(e.sender))})),i()(this,"onRoomStateUpdate",(e=>{e.roomId===this.room.roomId&&(this.users=null)})),this.room=e,this.matcher=new d.a([],{keys:["name"],funcs:[e=>e.userId.slice(1)],shouldMatchWordsOnly:!1}),u.a.get().on(l.d.Timeline,this.onRoomTimeline),u.a.get().on(c.b.Update,this.onRoomStateUpdate)}destroy(){u.a.get()&&(u.a.get().removeListener(l.d.Timeline,this.onRoomTimeline),u.a.get().removeListener(c.b.Update,this.onRoomStateUpdate))}async getCompletions(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1;this.users||this.makeUsers();const{command:i,range:o}=this.getCurrentCommand(e,t,n),s=null==i?void 0:i[0];if(s&&"@"!==s){const e=s.startsWith("@")?s.substring(1):s;return this.matcher.match(e,r).map((e=>{var n;const r=null===(n=_.a.getDisplayUserIdentifier)||void 0===n?void 0:n.call(_.a,e.userId,{roomId:this.room.roomId,withDisplayName:!0}),i=e.name||e.userId||"";return{completion:e.rawDisplayName,completionId:e.userId,type:"user",suffix:t.beginning&&0===o.start?": ":" ",href:Object(g.i)(e.userId),component:a.a.createElement(h.a,{title:i,description:r},a.a.createElement(f.b,{member:e,width:24,height:24})),range:o}}))}return[]}getName(){return Object(m.a)("Users")}makeUsers(){const e=this.room.getLiveTimeline().getEvents(),t={};for(const n of e)t[n.getSender()]=n.getTs();const n=u.a.get().credentials.userId;this.users=this.room.getJoinedMembers().filter((e=>{let{userId:t}=e;return t!==n})),this.users=this.users.concat(this.room.getMembersWithMembership("invite")),this.users=Object(s.sortBy)(this.users,(e=>1e20-t[e.userId]||1e20)),this.matcher.setObjects(this.users)}onUserSpoke(e){this.users&&e&&e.userId!==u.a.get().credentials.userId&&(this.users.splice(this.users.findIndex((t=>t.userId===e.userId)),1),this.users=[e,...this.users],this.matcher.setObjects(this.users))}renderCompletions(e){return a.a.createElement("div",{className:"mx_Autocomplete_Completion_container_pill",role:"presentation","aria-label":Object(m.a)("User Autocomplete")},e)}shouldForceComplete(){return!0}}},function(e,t){e.exports=/[:=](?:\'(?:\-[\(\)DO\[\]o\{\}]|[\(\)DO\[\]o\{\}])|\{>|\-[#\$&\(-\*\/3<>-@B-EJLOPSXZ-\]cjlopsxz-\}]|[#\$&\(-\*\/3<>-@B-EJLOPSXZ-\]cjlopsxz\|\}])|[Oo][:=](?:\-[\)\]\}]|[\)\]\}])|>(?:[:=](?:\-[\(\)\/\[-\]\{\}]|[\(\)\/\[-\]\{\}])|0(?:\-[\)\]\}]|[\)\]\}]))|%(?:\-[\(\[\{]|[\(\[\{])|\\[Mm]\/|D(?:\-[:=Xx]|[:=Xx])|8(?:\-[#\)D\]\}]|[#\)D\]\}])|;(?:\-[\)P\]p\}]|[\)P\]p\}])|x(?:\-[\(DP\[op\{]|[\(DP\[op\{])|X(?:\-[\(DOP\[\{]|[\(DOP\[\{])|<\/?3|[:=]\{/},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(13),i=n.n(r),o=n(149),a=n(1);class s{constructor(e,t){i()(this,"history",[]),i()(this,"prefix",void 0),i()(this,"lastIndex",0),i()(this,"currentIndex",0),this.prefix=t+e;let n,r=0;for(;n=sessionStorage.getItem(`${this.prefix}[${r}]`);){try{this.history.push(JSON.parse(n))}catch(e){a.a.warn("Throwing away unserialisable history",e);break}++r}this.lastIndex=this.history.length-1,this.currentIndex=this.lastIndex+1}static createItem(e,t){return{parts:e.serializeParts(),replyEventId:t?t.getId():void 0}}save(e,t){const n=s.createItem(e,t);this.history.push(n),this.currentIndex=this.history.length,this.lastIndex+=1,sessionStorage.setItem(`${this.prefix}[${this.lastIndex}]`,JSON.stringify(n))}getItem(e){return this.currentIndex=Object(o.clamp)(this.currentIndex+e,0,this.history.length-1),this.history[this.currentIndex]}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return h})),n.d(t,"a",(function(){return p})),n.d(t,"c",(function(){return m})),n.d(t,"d",(function(){return g}));var r=n(120),i=n.n(r),o=n(1),a=n(252),s=n(407),l=n(121),c=n(127),u=n(144),d=n(155);function h(e){const t=e.parts[0];if(t){if(t.type===a.b.Command&&t.text.startsWith("/")&&!t.text.startsWith("//"))return!0;if(t.text.startsWith("/")&&!t.text.startsWith("//")&&(t.type===a.b.Plain||t.type===a.b.PillCandidate))return!0}return!1}function p(e){const t=e.parts.reduce(((e,t)=>t.type===a.b.UserPill||t.type===a.b.RoomPill?e+t.resourceId:e+t.text),""),{cmd:n,args:r}=Object(s.d)(t);return[n,r,t]}async function m(e,t,n,r){const i=e.run(n,r,t);let a=null,d=i.error;if(i.promise)try{var h;if(e.category===s.a.messages||e.category===s.a.effects)a=null!==(h=await i.promise)&&void 0!==h?h:null;else await i.promise}catch(e){d=e}if(d){o.a.error("Command failure: %s",d);const e=!!i.promise?Object(l.c)("Server error"):Object(l.c)("Command error");let t;return t="string"==typeof d?d:d.translatedMessage?d.translatedMessage:d.message?d.message:Object(l.a)("Server unavailable, overloaded, or something else went wrong."),c.b.createDialog(u.a,{title:Object(l.a)(e),description:t}),[null,!1]}return o.a.log("Command success."),[a,!0]}async function g(e){const{finished:t}=c.b.createDialog(d.a,{title:Object(l.a)("Unknown Command"),description:i.a.createElement("div",null,i.a.createElement("p",null,Object(l.a)("Unrecognised command: %(commandText)s",{commandText:e})),i.a.createElement("p",null,Object(l.a)("You can use <code>/help</code> to list available commands. Did you mean to send this as a message?",{},{code:e=>i.a.createElement("code",null,e)})),i.a.createElement("p",null,Object(l.a)("Hint: Begin your message with <code>//</code> to start it with a slash.",{},{code:e=>i.a.createElement("code",null,e)}))),button:Object(l.a)("Send as message")}),[n]=await t;return n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(136);const i=(e,t,n,i,o,a)=>({body:"Voice message",msgtype:r.MsgType.Audio,url:e,file:o,info:{duration:n,mimetype:t,size:i},"org.matrix.msc1767.text":"Voice message","org.matrix.msc1767.file":{url:e,file:o,name:"Voice message.ogg",mimetype:t,size:i},"org.matrix.msc1767.audio":{duration:n,waveform:a},"org.matrix.msc3245.voice":{}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(1),i=n(144),o=n(121),a=n(127),s=n(131);const l=async function(){let e,t,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];try{e=await navigator.mediaDevices.getUserMedia({audio:!0,video:n})}catch(r){if(n&&"NotFoundError"===r.name)try{e=await navigator.mediaDevices.getUserMedia({audio:!0})}catch(e){t=e}else t=r}if(t){r.a.log("Failed to list userMedia devices",t);const e=s.b.get().brand;a.b.createDialog(i.a,{title:Object(o.a)("No media permissions"),description:Object(o.a)("You may need to manually permit %(brand)s to access your microphone/webcam",{brand:e})})}return e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(130),i=n.n(r),o=n(132),a=n.n(o),s=n(120),l=n.n(s),c=n(142),u=n(591),d=n(152),h=n(121),p=n(264),m=n(176);const g=["room","onFinished"],f=e=>{let{room:t,onFinished:n}=e,r=a()(e,g);const[o,s]=Object(u.a)(t),f=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return r=>{r.preventDefault(),r.stopPropagation(),e(r);const i=Object(d.a)().getAccessibilityAction(r);t&&i!==c.h.Enter||n()}},_=l.a.createElement(m.d,{label:Object(h.a)("Use default"),active:o===p.a.AllMessages,iconClassName:"mx_RoomNotificationContextMenu_iconBell",onClick:f((()=>s(p.a.AllMessages)))}),b=l.a.createElement(m.d,{label:Object(h.a)("All messages"),active:o===p.a.AllMessagesLoud,iconClassName:"mx_RoomNotificationContextMenu_iconBellDot",onClick:f((()=>s(p.a.AllMessagesLoud)))}),v=l.a.createElement(m.d,{label:Object(h.a)("Mentions & Keywords"),active:o===p.a.MentionsOnly,iconClassName:"mx_RoomNotificationContextMenu_iconBellMentions",onClick:f((()=>s(p.a.MentionsOnly)))}),y=l.a.createElement(m.d,{label:Object(h.a)("Off"),active:o===p.a.Mute,iconClassName:"mx_RoomNotificationContextMenu_iconBellCrossed",onClick:f((()=>s(p.a.Mute)))});return l.a.createElement(m.e,i()({},r,{onFinished:n,className:"mx_RoomNotificationContextMenu",compact:!0}),l.a.createElement(m.c,{first:!0},_,b,v,y))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return C}));var r=n(130),i=n.n(r),o=n(132),a=n.n(o),s=n(1),l=n(120),c=n.n(l),u=n(142),d=n(935),h=n(133),p=n(124),m=n(141),g=n(820),f=n(152),_=n(121),b=n(197),v=n(190),y=n(226),E=n(164),S=n(388),w=n(176);const T=["room","onFinished","onPostFavoriteClick","onPostLowPriorityClick","onPostInviteClick","onPostCopyLinkClick","onPostSettingsClick","onPostLeaveClick","onPostForgetClick"],C=e=>{let{room:t,onFinished:n,onPostFavoriteClick:r,onPostLowPriorityClick:o,onPostInviteClick:C,onPostCopyLinkClick:x,onPostSettingsClick:F,onPostLeaveClick:D,onPostForgetClick:k}=e,O=a()(e,T);const I=Object(l.useContext)(h.a),A=Object(m.b)(y.c.instance,y.b,(()=>y.c.instance.getTagsForRoom(t))),R=E.a.shared().getUserIdForRoomId(t.roomId),N=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return i=>{i.preventDefault(),i.stopPropagation(),e(i);const o=Object(f.a)().getAccessibilityAction(i);r&&o!==u.h.Enter||n(),null==t||t(i)}},M=(e,n)=>{if(n===v.a.Favourite||n===v.a.LowPriority){const e=n===v.a.Favourite?v.a.LowPriority:v.a.Favourite,r=y.c.instance.getTagsForRoom(t).includes(n),i=r?n:e,o=r?null:n;p.a.dispatch(d.a.tagRoom(I,t,i,o,void 0,0))}else s.a.warn(`Unexpected tag ${n} applied to ${t.roomId}`)},P=A.includes(v.a.Favourite),L=c.a.createElement(w.a,{onClick:N((e=>M(0,v.a.Favourite)),r,!0),active:P,label:P?Object(_.a)("Favourited"):Object(_.a)("Favourite"),iconClassName:"mx_RoomGeneralContextMenu_iconStar"}),B=A.includes(v.a.LowPriority),U=c.a.createElement(w.a,{onClick:N((e=>M(0,v.a.LowPriority)),o,!0),active:B,label:Object(_.a)("Low Priority"),iconClassName:"mx_RoomGeneralContextMenu_iconArrowDown"});let j=null;t.canInvite(I.getUserId())&&!R&&(j=c.a.createElement(w.b,{onClick:N((()=>p.a.dispatch({action:"view_invite",roomId:t.roomId})),C),label:Object(_.a)("Invite"),iconClassName:"mx_RoomGeneralContextMenu_iconInvite"}));let G=null;R||(G=c.a.createElement(w.b,{onClick:N((()=>p.a.dispatch({action:"copy_room",room_id:t.roomId})),x),label:Object(_.a)("Copy room link"),iconClassName:"mx_RoomGeneralContextMenu_iconCopyLink"}));const z=c.a.createElement(w.b,{onClick:N((()=>p.a.dispatch({action:"open_room_settings",room_id:t.roomId})),F),label:Object(_.a)("Settings"),iconClassName:"mx_RoomGeneralContextMenu_iconSettings"});let H;H=A.includes(v.a.Archived)?c.a.createElement(w.b,{iconClassName:"mx_RoomGeneralContextMenu_iconSignOut",label:Object(_.a)("Forget Room"),className:"mx_IconizedContextMenu_option_red",onClick:N((()=>p.a.dispatch({action:"forget_room",room_id:t.roomId})),k)}):c.a.createElement(w.b,{onClick:N((()=>p.a.dispatch({action:"leave_room",room_id:t.roomId})),D),label:Object(_.a)("Leave"),className:"mx_IconizedContextMenu_option_red",iconClassName:"mx_RoomGeneralContextMenu_iconSignOut"});const{color:q}=Object(g.a)(t),V=q>b.a.None?c.a.createElement(w.a,{onClick:()=>{Object(S.b)(t,I),null==n||n()},active:!1,label:Object(_.a)("Mark as read"),iconClassName:"mx_RoomGeneralContextMenu_iconMarkAsRead"}):null;return c.a.createElement(w.e,i()({},O,{onFinished:n,className:"mx_RoomGeneralContextMenu",compact:!0}),c.a.createElement(w.c,null,V,!A.includes(v.a.Archived)&&c.a.createElement(c.a.Fragment,null,L,U,j,G,z)),c.a.createElement(w.c,{red:!0},H))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(140),i=n(120),o=n(264),a=n(197),s=n(141);const l=(e,t)=>{const[n,l]=Object(i.useState)(null),[c,u]=Object(i.useState)(0),[d,h]=Object(i.useState)(a.a.None);Object(s.a)(e,r.d.UnreadNotifications,((e,n)=>{t&&t!==n||p()})),Object(s.a)(e,r.d.Receipt,(()=>p())),Object(s.a)(e,r.d.Timeline,(()=>p())),Object(s.a)(e,r.d.Redaction,(()=>p())),Object(s.a)(e,r.d.LocalEchoUpdated,(()=>p())),Object(s.a)(e,r.d.MyMembership,(()=>p()));const p=Object(i.useCallback)((()=>{const{symbol:n,count:r,color:i}=Object(o.b)(e,t);l(n),u(r),h(i)}),[e,t]);return Object(i.useEffect)((()=>{p()}),[p]),{symbol:n,count:c,color:d}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}));const r=(e,t)=>`mx_edit_room_${e}_${t}`,i=e=>`mx_edit_state_${e}`},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1402);t.decode=r.default,t.isBlurhashValid=r.isBlurhashValid;var i=n(1403);t.encode=i.default,function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(601))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","#","$","%","*","+",",","-",".",":",";","=","?","@","[","]","^","_","{","|","}","~"];t.decode83=function(e){for(var t=0,n=0;n<e.length;n++){var i=e[n];t=83*t+r.indexOf(i)}return t},t.encode83=function(e,t){for(var n="",i=1;i<=t;i++){var o=Math.floor(e)/Math.pow(83,t-i)%83;n+=r[Math.floor(o)]}return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sRGBToLinear=function(e){var t=e/255;return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},t.linearTosRGB=function(e){var t=Math.max(0,Math.min(1,e));return t<=.0031308?Math.round(12.92*t*255+.5):Math.round(255*(1.055*Math.pow(t,1/2.4)-.055)+.5)},t.sign=function(e){return e<0?-1:1},t.signPow=function(e,n){return t.sign(e)*Math.pow(Math.abs(e),n)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(13),i=n.n(r);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const s={imgSrc:"",imgStyle:null,style:"",textContent:""};let l,c;class u{constructor(e){this.iframeFn=e,i()(this,"onLoadPromise",void 0)}get iframe(){var e;const t=null===(e=this.iframeFn)||void 0===e?void 0:e.call(this);if(!t){const e=(l||(l=document.createElement("iframe"),document.body.appendChild(l),l.style.display="none",l.sandbox="allow-scripts allow-downloads allow-downloads-without-user-activation",c=new Promise((e=>{l.onload=()=>{e()},l.src="usercontent/"}))),{iframe:l,onLoadPromise:c});return this.onLoadPromise=e.onLoadPromise,e.iframe}return this.onLoadPromise=void 0,t}async download(e){var t;let{blob:n,name:r,autoDownload:i=!0,opts:o=s}=e;const l=this.iframe;this.onLoadPromise&&await this.onLoadPromise,null===(t=l.contentWindow)||void 0===t||t.postMessage(a(a({},o),{},{blob:n,download:r,auto:i}),"*")}}},function(e,t,n){"use strict";n.r(t),n.d(t,"Icon",(function(){return a}));var r,i=n(120);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}function a(e){return i.createElement("svg",o({viewBox:"-1 -1 12 14",xmlns:"http://www.w3.org/2000/svg",role:"presentation","aria-hidden":!0},e),r||(r=i.createElement("path",{d:"M.574 6.473a.573.573 0 00-.406.98l4.38 4.379a.575.575 0 00.812 0L9.745 7.46a.575.575 0 00-.81-.814L5.524 10.05 5.52.574a.575.575 0 00-1.148 0l.001 9.46L.98 6.643a.57.57 0 00-.406-.169z",fill:"currentColor",fillRule:"evenodd"})))}t.default="img/download.a6b50e0.svg"},function(e,t,n){"use strict";t.__esModule=!0,t.config=t.Transition=t.TransitionGroup=t.SwitchTransition=t.ReplaceTransition=t.CSSTransition=void 0;var r=c(n(1404));t.CSSTransition=r.default;var i=c(n(1408));t.ReplaceTransition=i.default;var o=c(n(1410));t.SwitchTransition=o.default;var a=c(n(831));t.TransitionGroup=a.default;var s=c(n(603));t.Transition=s.default;var l=c(n(828));function c(e){return e&&e.__esModule?e:{default:e}}t.config=l.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;t.default={disabled:!1},e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0;var r;(r=n(216))&&r.__esModule;t.timeoutsShape=null;t.classNamesShape=null},function(e,t,n){"use strict";t.__esModule=!0,t.forceReflow=void 0;t.forceReflow=function(e){return e.scrollTop}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;a(n(216));var r=a(n(120)),i=a(n(604)),o=n(1409);function a(e){return e&&e.__esModule?e:{default:e}}function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var l=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},c=function(e){var t,n;function a(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var c=a.prototype;return c.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},c.componentWillUnmount=function(){this.mounted=!1},a.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?(0,o.getInitialChildMapping)(e,r):(0,o.getNextChildMapping)(e,n,r),firstRender:!1}},c.handleExited=function(e,t){var n=(0,o.getChildMapping)(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=s({},t.children);return delete n[e.key],{children:n}})))},c.render=function(){var e=this.props,t=e.component,n=e.childFactory,o=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["component","childFactory"]),a=this.state.contextValue,s=l(this.state.children).map(n);return delete o.appear,delete o.enter,delete o.exit,null===t?r.default.createElement(i.default.Provider,{value:a},s):r.default.createElement(i.default.Provider,{value:a},r.default.createElement(t,o,s))},a}(r.default.Component);c.propTypes={},c.defaultProps={component:"div",childFactory:function(e){return e}};var u=c;t.default=u,e.exports=t.default},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r=n(130),i=n.n(r),o=n(132),a=n.n(o),s=n(13),l=n.n(s),c=n(120),u=n.n(c),d=n(126),h=n.n(d),p=n(148),m=n(121),g=n(251);const f=["playback","playbackPhase"];class _ extends u.a.PureComponent{constructor(e){super(e),l()(this,"onClick",(()=>{this.toggleState()}))}async toggleState(){await this.props.playback.toggle()}render(){const e=this.props,{playback:t,playbackPhase:n}=e,r=a()(e,f),o=t.isPlaying,s=n===g.d.Decoding,l=h()("mx_PlayPauseButton",{mx_PlayPauseButton_play:!o,mx_PlayPauseButton_pause:o,mx_PlayPauseButton_disabled:s});return u.a.createElement(p.a,i()({"data-testid":"play-pause-button",className:l,title:o?Object(m.a)("Pause"):Object(m.a)("Play"),onClick:this.onClick,disabled:s},r))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(337),l=n(251),c=n(153);class u extends a.a.PureComponent{constructor(e){super(e),i()(this,"onPlaybackUpdate",(e=>{e===l.d.Decoding&&(e=l.d.Stopped),this.setState({playbackPhase:e})})),i()(this,"onTimeUpdate",(e=>{this.setState({seconds:e[0],durationSeconds:e[1]})})),this.state={seconds:this.props.playback.clockInfo.timeSeconds,durationSeconds:this.props.playback.clockInfo.durationSeconds,playbackPhase:l.d.Stopped},this.props.playback.on(c.b,this.onPlaybackUpdate),this.props.playback.clockInfo.liveData.onUpdate(this.onTimeUpdate)}render(){let e=this.state.seconds;return this.state.playbackPhase===l.d.Stopped&&(e=Number.isFinite(this.props.defaultDisplaySeconds)?this.props.defaultDisplaySeconds:this.state.durationSeconds),a.a.createElement(s.a,{seconds:e,role:"timer"})}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(1),l=n(153),c=n(121),u=n(152),d=n(142);class h extends a.a.PureComponent{constructor(e){super(e),i()(this,"seekRef",Object(o.createRef)()),i()(this,"playPauseRef",Object(o.createRef)()),i()(this,"onKeyDown",(e=>{var t,n,r;let i=!0;switch(Object(u.a)().getAccessibilityAction(e)){case d.h.Space:null===(t=this.playPauseRef.current)||void 0===t||t.toggleState();break;case d.h.ArrowLeft:null===(n=this.seekRef.current)||void 0===n||n.left();break;case d.h.ArrowRight:null===(r=this.seekRef.current)||void 0===r||r.right();break;default:i=!1}i&&e.stopPropagation()})),i()(this,"onPlaybackUpdate",(e=>{this.setState({playbackPhase:e})})),this.state={playbackPhase:this.props.playback.currentState},this.props.playback.on(l.b,this.onPlaybackUpdate),this.props.playback.prepare().catch((e=>{s.a.error("Error processing audio file:",e),this.setState({error:!0})}))}render(){return a.a.createElement(a.a.Fragment,null,this.renderComponent(),this.state.error&&a.a.createElement("div",{className:"text-warning"},Object(c.a)("Error downloading audio")))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(130),i=n.n(r),o=n(120),a=n.n(o),s=n(206),l=n(121),c=n(940),u=n(924),d=n(338),h=n(467);class p extends u.a{render(){return this.state.error?a.a.createElement(h.a,{className:"mx_MVoiceMessageBody"},Object(l.a)("Error processing voice message")):this.state.playback?a.a.createElement("span",{className:"mx_MVoiceMessageBody"},a.a.createElement(c.b,{playback:this.state.playback}),this.showFileBody&&a.a.createElement(d.a,i()({},this.props,{showGenericPlaceholder:!1}))):a.a.createElement("span",{className:"mx_MVoiceMessageBody"},a.a.createElement(s.a,null))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(126),l=n.n(s);class c extends a.a.PureComponent{render(){return a.a.createElement("div",{className:"mx_Waveform"},this.props.relHeights.map(((e,t)=>{const n=this.props.progress,r=t/this.props.relHeights.length<=n&&n>0,i=l()({mx_Waveform_bar:!0,mx_Waveform_bar_100pct:r});return a.a.createElement("span",{key:t,style:{"--barHeight":e},className:i})})))}}i()(c,"defaultProps",{progress:1})},function(e,t,n){"use strict";var r=n(120),i=n.n(r),o=n(126),a=n.n(o),s=n(606),l=n(211),c=n(172);const u=e=>{let{tooltip:t,children:n}=e;const[o,a]=Object(r.useState)(!1);if(!t)return i.a.createElement(i.a.Fragment,null,n);return i.a.createElement("div",{onMouseEnter:()=>a(!0),onClick:e=>{e.stopPropagation(),a(!o)},onMouseLeave:()=>a(!1)},n,o&&t)},d=i.a.forwardRef(((e,t)=>{let{id:n,roomMember:r,useMemberColor:o,tooltip:d}=e;const h=o&&r?Object(l.f)(r.userId):"";return i.a.createElement("div",{ref:t,id:n,className:a()("mx_Marker",h,{mx_Marker_defaultColor:!h})},i.a.createElement(u,{tooltip:d},i.a.createElement("div",{className:"mx_Marker_border"},r?i.a.createElement(c.b,{member:r,width:36,height:36,viewUserOnClick:!1,hideTitle:!!d}):i.a.createElement(s.a,{className:"mx_Marker_icon"}))))}));t.a=d},function(e,t,n){"use strict";var r=n(120),i=n.n(r),o=n(136),a=n(165),s=n(141),l=n(608),c=n(121),u=n(268);const d=6e4,h=e=>{const t=Object(s.b)(e,o.BeaconEvent.Update,(()=>e.beaconInfo)),[n,i]=Object(r.useState)((()=>t?Object(u.d)(t):0));Object(r.useEffect)((()=>{t&&i(Object(u.d)(t))}),[t]);const a=Object(r.useCallback)((()=>{if(!t)return;const e=Object(u.d)(t);i(e)}),[t]);var c;return Object(l.b)(a,(c=n)>36e5?6e5:c>d?d:1e3),n};t.a=e=>{let{beacon:t}=e;const n=h(t),r=Object(a.b)(n),o=Object(c.a)("%(timeRemaining)s left",{timeRemaining:r});return i.a.createElement("span",{"data-test-id":"room-live-share-expiry",className:"mx_LiveTimeRemaining"},o)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r,i=n(120);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}function a(e){return i.createElement("svg",o({fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",role:"presentation","aria-hidden":!0},e),r||(r=i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.468 2.04A1 1 0 0010.054.627L6.047 4.633 1.811.398A1 1 0 10.397 1.812l4.236 4.236-4.007 4.006A1 1 0 102.04 11.47l4.007-4.007 3.778 3.778a1 1 0 001.415-1.414L7.46 6.048l4.007-4.007z",fill:"#A9B2BC"})))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(120),i=n.n(r),o=n(121);function a(e){let{mxEvent:t}=e;return i.a.createElement("div",{className:"mx_DecryptionFailureBody mx_EventTile_content"},function(e){return null!=e&&e.isEncryptedDisabledForUnverifiedDevices?Object(o.a)("The sender has blocked you from receiving this message"):Object(o.a)("Unable to decrypt message")}(t))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d}));var r=n(120),i=n.n(r),o=n(126),a=n.n(o),s=n(161),l=n(121),c=n(244);let u;!function(e){e.Info="info",e.Warning="warning"}(u||(u={}));class d extends i.a.PureComponent{constructor(e){super(e)}render(){const{tooltip:e,children:t,tooltipClassName:n,className:r,kind:o}=this.props,d=Object(l.a)("Information"),h=o!==u.Warning?"mx_InfoTooltip_icon_info":"mx_InfoTooltip_icon_warning";return i.a.createElement(c.a,{tooltipTargetClassName:a()("mx_InfoTooltip",r),className:"mx_InfoTooltip_container",tooltipClassName:a()("mx_InfoTooltip_tooltip",n),label:e||d,alignment:s.a.Right},i.a.createElement("span",{className:a()("mx_InfoTooltip_icon",h),"aria-label":d}),t)}}},function(e,t,n){"use strict";var r=n(120),i=n.n(r),o=n(121),a=n(122),s=n(281),l=n(133),c=n(164),u=n(185),d=n(217);const h="m.megolm.v1.aes-sha2",p=Object(r.forwardRef)(((e,t)=>{let{mxEvent:n,timestamp:p}=e;const m=Object(r.useContext)(l.a),g=n.getRoomId(),f=a.a.get().isRoomEncrypted(g),_=n.getPrevContent(),b=n.getContent();if(!Object(u.c)(_,b))return null;if(b.algorithm===h&&f){let e;const t=c.a.shared().getUserIdForRoomId(g),n=null==m?void 0:m.getRoom(g);if(_.algorithm===h)e=Object(o.a)("Some encryption parameters have been changed.");else if(t){var v;const r=(null===(v=n.getMember(t))||void 0===v?void 0:v.rawDisplayName)||t;e=Object(o.a)("Messages here are end-to-end encrypted. Verify %(displayName)s in their profile - tap on their avatar.",{displayName:r})}else e=Object(d.a)(n)?Object(o.a)("Messages in this chat will be end-to-end encrypted."):Object(o.a)("Messages in this room are end-to-end encrypted. When people join, you can verify them in their profile, just tap on their avatar.");return i.a.createElement(s.a,{className:"mx_cryptoEvent mx_cryptoEvent_icon",title:Object(o.a)("Encryption enabled"),subtitle:e,timestamp:p})}return f?i.a.createElement(s.a,{className:"mx_cryptoEvent mx_cryptoEvent_icon",title:Object(o.a)("Encryption enabled"),subtitle:Object(o.a)("Ignored attempt to disable encryption"),timestamp:p}):i.a.createElement(s.a,{className:"mx_cryptoEvent mx_cryptoEvent_icon mx_cryptoEvent_icon_warning",title:Object(o.a)("Encryption not enabled"),subtitle:Object(o.a)("The encryption used by this room isn't supported."),ref:t,timestamp:p})}));t.a=p},function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return r})),function(e){e.ListsUpdate="lists_update",e.ListsLoading="lists_loading"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(120),i=n.n(r),o=n(693),a=n(166),s=n(191);function l(e){let{user:t,size:n}=e;if(t.isEmail)return i.a.createElement("img",{className:"mx_SearchResultAvatar mx_SearchResultAvatar_threepidAvatar",alt:"",src:o.b,width:n,height:n});{const e=t.getMxcAvatarUrl();return i.a.createElement(s.a,{className:"mx_SearchResultAvatar",url:e?Object(a.b)(e).getSquareThumbnailHttp(n):null,name:t.name,idName:t.userId,width:n,height:n})}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(120),i=n(121),o=n(123);class a extends r.PureComponent{render(){return r.createElement("div",{className:"mx_DialPadBackspaceButtonWrapper"},r.createElement(o.a,{className:"mx_DialPadBackspaceButton",onClick:this.props.onBackspacePress,"aria-label":Object(i.a)("Backspace")}))}}},function(e,t,n){"use strict";n.r(t),n.d(t,"Icon",(function(){return s}));var r,i,o=n(120);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}function s(e){return o.createElement("svg",a({viewBox:"26 25 6 6",xmlns:"http://www.w3.org/2000/svg",role:"presentation","aria-hidden":!0},e),r||(r=o.createElement("defs",null,o.createElement("filter",{x:"-5.9%",y:"-7.9%",width:"111.8%",height:"115.8%",filterUnits:"objectBoundingBox",id:"icon-pill-remove_svg__a"},o.createElement("feOffset",{dy:2,in:"SourceAlpha",result:"shadowOffsetOuter1"}),o.createElement("feGaussianBlur",{stdDeviation:16,in:"shadowOffsetOuter1",result:"shadowBlurOuter1"}),o.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0.473684211 0 0 0 0 1 0 0 0 0.241258741 0",in:"shadowBlurOuter1",result:"shadowMatrixOuter1"}),o.createElement("feMerge",null,o.createElement("feMergeNode",{in:"shadowMatrixOuter1"}),o.createElement("feMergeNode",{in:"SourceGraphic"}))))),i||(i=o.createElement("g",{filter:"url(#icon-pill-remove_svg__a)",transform:"translate(-406 -215)",stroke:"#61708B"},o.createElement("path",{d:"M438 240l-6 6m0-6l6 6"}))))}t.default="img/icon-pill-remove.e6a9b48.svg"},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(129),l=n(121),c=n(122),u=n(123),d=n(848),h=n(127),p=n(124),m=n(128),g=n(298),f=n(125);function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}class b extends a.a.Component{constructor(e){super(e),i()(this,"upgradeRoom",(()=>{const e=c.a.get().getRoom(this.props.roomId);h.b.createDialog(d.a,{room:e})})),i()(this,"onOldRoomClicked",(e=>{e.preventDefault(),e.stopPropagation(),p.a.dispatch({action:m.a.ViewRoom,room_id:this.state.oldRoomId,event_id:this.state.oldEventId,metricsTrigger:"WebPredecessorSettings",metricsViaKeyboard:"click"!==e.type}),this.props.closeSettingsFn()}));const t=f.b.getValue("feature_dynamic_room_predecessors");this.state={};const n=c.a.get().getRoom(this.props.roomId);null==n||n.getRecommendedVersion().then((e=>{const r=n.currentState.getStateEvents(s.b.RoomTombstone,""),o={},a=n.findPredecessor(t);a&&(o.oldRoomId=a.roomId,o.oldEventId=a.eventId),this.setState(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({upgraded:!(null==r||!r.getContent().replacement_room),upgradeRecommendation:e},o))}))}render(){var e;const t=c.a.get().getRoom(this.props.roomId),n=null==t?void 0:t.isSpaceRoom();let r,i,o;if(!1===(null==t||null===(e=t.currentState.getStateEvents(s.b.RoomCreate,""))||void 0===e?void 0:e.getContent()["m.federate"])&&(r=a.a.createElement("div",null,Object(l.a)("This room is not accessible by remote Matrix servers"))),this.state.upgradeRecommendation&&this.state.upgradeRecommendation.needsUpgrade&&!this.state.upgraded&&(i=a.a.createElement("div",null,a.a.createElement("p",{className:"mx_SettingsTab_warningText"},Object(l.a)("<b>Warning</b>: upgrading a room will <i>not automatically migrate room members to the new version of the room.</i> We'll post a link to the new room in the old version of the room - room members will have to click this link to join the new room.",{},{b:e=>a.a.createElement("b",null,e),i:e=>a.a.createElement("i",null,e)})),a.a.createElement(u.a,{onClick:this.upgradeRoom,kind:"primary"},n?Object(l.a)("Upgrade this space to the recommended room version"):Object(l.a)("Upgrade this room to the recommended room version")))),this.state.oldRoomId){let e;var d,h;if(n)e=Object(l.a)("View older version of %(spaceName)s.",{spaceName:null!==(d=null==t?void 0:t.name)&&void 0!==d?d:this.state.oldRoomId});else e=Object(l.a)("View older messages in %(roomName)s.",{roomName:null!==(h=null==t?void 0:t.name)&&void 0!==h?h:this.state.oldRoomId});o=a.a.createElement(u.a,{element:"a",onClick:this.onOldRoomClicked},e)}return a.a.createElement("div",{className:"mx_SettingsTab"},a.a.createElement("div",{className:"mx_SettingsTab_heading"},Object(l.a)("Advanced")),a.a.createElement("div",{className:"mx_SettingsTab_section mx_SettingsTab_subsectionText"},a.a.createElement("span",{className:"mx_SettingsTab_subheading"},null!=t&&t.isSpaceRoom()?Object(l.a)("Space information"):Object(l.a)("Room information")),a.a.createElement("div",null,a.a.createElement("span",null,Object(l.a)("Internal room ID")),a.a.createElement(g.a,{getTextToCopy:()=>this.props.roomId},this.props.roomId)),r),a.a.createElement("div",{className:"mx_SettingsTab_section mx_SettingsTab_subsectionText"},a.a.createElement("span",{className:"mx_SettingsTab_subheading"},Object(l.a)("Room version")),a.a.createElement("div",null,a.a.createElement("span",null,Object(l.a)("Room version:"))," ",null==t?void 0:t.getVersion()),o,i))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(127),l=n(121),c=n(391),u=n(135),d=n(144),h=n(145),p=n(134);class m extends a.a.Component{constructor(){super(...arguments),i()(this,"targetVersion",void 0),i()(this,"state",{busy:!0}),i()(this,"onCancelClick",(()=>{this.props.onFinished(!1)})),i()(this,"onUpgradeClick",(()=>{this.setState({busy:!0}),Object(c.b)(this.props.room,this.targetVersion,!1,!1).then((()=>{this.props.onFinished(!0)})).catch((e=>{s.b.createDialog(d.a,{title:Object(l.a)("Failed to upgrade room"),description:e&&e.message?e.message:Object(l.a)("The room upgrade could not be completed")})})).finally((()=>{this.setState({busy:!1})}))}))}async componentDidMount(){const e=await this.props.room.getRecommendedVersion();this.targetVersion=e.version,this.setState({busy:!1})}render(){let e;return e=this.state.busy?a.a.createElement(p.a,null):a.a.createElement(h.a,{primaryButton:Object(l.a)("Upgrade this room to version %(version)s",{version:this.targetVersion}),primaryButtonClass:"danger",hasCancel:!0,onPrimaryButtonClick:this.onUpgradeClick,onCancel:this.onCancelClick}),a.a.createElement(u.a,{className:"mx_RoomUpgradeDialog",onFinished:this.props.onFinished,title:Object(l.a)("Upgrade Room Version"),contentId:"mx_Dialog_content",hasCancel:!0},a.a.createElement("p",null,Object(l.a)("Upgrading this room requires closing down the current instance of the room and creating a new room in its place. To give room members the best possible experience, we will:")),a.a.createElement("ol",null,a.a.createElement("li",null,Object(l.a)("Create a new room with the same name, description and avatar")),a.a.createElement("li",null,Object(l.a)("Update any local room aliases to point to the new room")),a.a.createElement("li",null,Object(l.a)("Stop users from speaking in the old version of the room, and post a message advising users to move to the new room")),a.a.createElement("li",null,Object(l.a)("Put a link back to the old room at the start of the new room so people can see old messages"))),e)}}},function(e,t,n){"use strict";var r=n(130),i=n.n(r),o=n(120),a=n.n(o),s=n(126),l=n.n(s),c=n(121),u=n(123);t.a=e=>{let{avatarUrl:t,avatarAltText:n,avatarName:r,uploadAvatar:s,removeAvatar:d}=e;const[h,p]=Object(o.useState)(!1),m={onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1)},g=Object(o.useRef)(`hover-text-${Math.random()}`);let f,_,b=a.a.createElement(u.a,i()({element:"div",onClick:null!=s?s:null,className:"mx_AvatarSetting_avatarPlaceholder","aria-labelledby":g.current},m));t&&(b=a.a.createElement(u.a,i()({element:"img",src:t,alt:n,"aria-label":n,onClick:null!=s?s:null},m))),s&&(f=a.a.createElement(u.a,i()({onClick:s,className:"mx_AvatarSetting_uploadButton","aria-labelledby":g.current},m))),t&&d&&(_=a.a.createElement(u.a,{onClick:d,kind:"link_sm"},Object(c.a)("Remove")));const v=l()({mx_AvatarSetting_avatar:!0,mx_AvatarSetting_avatar_hovering:h&&s});return a.a.createElement("div",{className:v},b,a.a.createElement("div",{className:"mx_AvatarSetting_hover","aria-hidden":"true"},a.a.createElement("div",{className:"mx_AvatarSetting_hoverBg"}),a.a.createElement("span",{id:g.current},Object(c.a)("Upload"))),f,_)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(120);const i=(e,t,n)=>{const[i,o]=Object(r.useState)(e);return[i,async r=>{o(r);try{await t(r)}catch(t){o(e()),n(t)}}]}},function(e,t,n){"use strict";var r=n(120),i=n.n(r),o=n(175);t.a=e=>{let{heading:t,children:n}=e;return i.a.createElement("div",{className:"mx_SettingsTab"},i.a.createElement(o.a,{size:"h2"},t),i.a.createElement("div",{className:"mx_SettingsTab_sections"},n))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(168);function i(e){const t=Object(r.l)(e);if(!t||t===e)throw new Error("Failed to transform URI");window.location.hash=t}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(92);function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i)}}e.exports=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(684);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(31).default,i=n(1418);e.exports=function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r;!function(i,o){"use strict";var a="function",s="undefined",l="object",c="string",u="model",d="name",h="type",p="vendor",m="version",g="architecture",f="console",_="mobile",b="tablet",v="smarttv",y="wearable",E="embedded",S="Amazon",w="Apple",T="ASUS",C="BlackBerry",x="Browser",F="Chrome",D="Firefox",k="Google",O="Huawei",I="LG",A="Microsoft",R="Motorola",N="Opera",M="Samsung",P="Sharp",L="Sony",B="Xiaomi",U="Zebra",j="Facebook",G=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},z=function(e,t){return typeof e===c&&-1!==H(t).indexOf(H(e))},H=function(e){return e.toLowerCase()},q=function(e,t){if(typeof e===c)return e=e.replace(/^\s\s*/,""),typeof t===s?e:e.substring(0,350)},V=function(e,t){for(var n,r,i,s,c,u,d=0;d<t.length&&!c;){var h=t[d],p=t[d+1];for(n=r=0;n<h.length&&!c;)if(c=h[n++].exec(e))for(i=0;i<p.length;i++)u=c[++r],typeof(s=p[i])===l&&s.length>0?2===s.length?typeof s[1]==a?this[s[0]]=s[1].call(this,u):this[s[0]]=s[1]:3===s.length?typeof s[1]!==a||s[1].exec&&s[1].test?this[s[0]]=u?u.replace(s[1],s[2]):o:this[s[0]]=u?s[1].call(this,u,s[2]):o:4===s.length&&(this[s[0]]=u?s[3].call(this,u.replace(s[1],s[2])):o):this[s]=u||o;d+=2}},$=function(e,t){for(var n in t)if(typeof t[n]===l&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(z(t[n][r],e))return"?"===n?o:n}else if(z(t[n],e))return"?"===n?o:n;return e},K={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},W={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[m,[d,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[m,[d,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[d,m],[/opios[\/ ]+([\w\.]+)/i],[m,[d,N+" Mini"]],[/\bopr\/([\w\.]+)/i],[m,[d,N]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[d,m],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[m,[d,"UC"+x]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[m,[d,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[m,[d,"WeChat"]],[/konqueror\/([\w\.]+)/i],[m,[d,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[m,[d,"IE"]],[/yabrowser\/([\w\.]+)/i],[m,[d,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[d,/(.+)/,"$1 Secure "+x],m],[/\bfocus\/([\w\.]+)/i],[m,[d,D+" Focus"]],[/\bopt\/([\w\.]+)/i],[m,[d,N+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[m,[d,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[m,[d,"Dolphin"]],[/coast\/([\w\.]+)/i],[m,[d,N+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[m,[d,"MIUI "+x]],[/fxios\/([-\w\.]+)/i],[m,[d,D]],[/\bqihu|(qi?ho?o?|360)browser/i],[[d,"360 "+x]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[d,/(.+)/,"$1 "+x],m],[/(comodo_dragon)\/([\w\.]+)/i],[[d,/_/g," "],m],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[d,m],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[d],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[d,j],m],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[d,m],[/\bgsa\/([\w\.]+) .*safari\//i],[m,[d,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[m,[d,F+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[d,F+" WebView"],m],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[m,[d,"Android "+x]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[d,m],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[m,[d,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[m,d],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[d,[m,$,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[d,m],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[d,"Netscape"],m],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[m,[d,D+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[d,m],[/(cobalt)\/([\w\.]+)/i],[d,[m,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[g,"amd64"]],[/(ia32(?=;))/i],[[g,H]],[/((?:i[346]|x)86)[;\)]/i],[[g,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[g,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[g,"armhf"]],[/windows (ce|mobile); ppc;/i],[[g,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[g,/ower/,"",H]],[/(sun4\w)[;\)]/i],[[g,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[g,H]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[p,M],[h,b]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[p,M],[h,_]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[p,w],[h,_]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[p,w],[h,b]],[/(macintosh);/i],[u,[p,w]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[p,O],[h,b]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[p,O],[h,_]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[u,/_/g," "],[p,B],[h,_]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[p,B],[h,b]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[p,"OPPO"],[h,_]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[p,"Vivo"],[h,_]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[p,"Realme"],[h,_]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[u,[p,R],[h,_]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[p,R],[h,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[p,I],[h,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[p,I],[h,_]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[p,"Lenovo"],[h,b]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[p,"Nokia"],[h,_]],[/(pixel c)\b/i],[u,[p,k],[h,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[p,k],[h,_]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[p,L],[h,_]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[p,L],[h,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[p,"OnePlus"],[h,_]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[p,S],[h,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[p,S],[h,_]],[/(playbook);[-\w\),; ]+(rim)/i],[u,p,[h,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[p,C],[h,_]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[p,T],[h,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[p,T],[h,_]],[/(nexus 9)/i],[u,[p,"HTC"],[h,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[p,[u,/_/g," "],[h,_]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[p,"Acer"],[h,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[p,"Meizu"],[h,_]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[p,P],[h,_]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[p,u,[h,_]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[p,u,[h,b]],[/(surface duo)/i],[u,[p,A],[h,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[p,"Fairphone"],[h,_]],[/(u304aa)/i],[u,[p,"AT&T"],[h,_]],[/\bsie-(\w*)/i],[u,[p,"Siemens"],[h,_]],[/\b(rct\w+) b/i],[u,[p,"RCA"],[h,b]],[/\b(venue[\d ]{2,7}) b/i],[u,[p,"Dell"],[h,b]],[/\b(q(?:mv|ta)\w+) b/i],[u,[p,"Verizon"],[h,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[p,"Barnes & Noble"],[h,b]],[/\b(tm\d{3}\w+) b/i],[u,[p,"NuVision"],[h,b]],[/\b(k88) b/i],[u,[p,"ZTE"],[h,b]],[/\b(nx\d{3}j) b/i],[u,[p,"ZTE"],[h,_]],[/\b(gen\d{3}) b.+49h/i],[u,[p,"Swiss"],[h,_]],[/\b(zur\d{3}) b/i],[u,[p,"Swiss"],[h,b]],[/\b((zeki)?tb.*\b) b/i],[u,[p,"Zeki"],[h,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[p,"Dragon Touch"],u,[h,b]],[/\b(ns-?\w{0,9}) b/i],[u,[p,"Insignia"],[h,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[p,"NextBook"],[h,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[p,"Voice"],u,[h,_]],[/\b(lvtel\-)?(v1[12]) b/i],[[p,"LvTel"],u,[h,_]],[/\b(ph-1) /i],[u,[p,"Essential"],[h,_]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[p,"Envizen"],[h,b]],[/\b(trio[-\w\. ]+) b/i],[u,[p,"MachSpeed"],[h,b]],[/\btu_(1491) b/i],[u,[p,"Rotor"],[h,b]],[/(shield[\w ]+) b/i],[u,[p,"Nvidia"],[h,b]],[/(sprint) (\w+)/i],[p,u,[h,_]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[p,A],[h,_]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[p,U],[h,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[p,U],[h,_]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[p,u,[h,f]],[/droid.+; (shield) bui/i],[u,[p,"Nvidia"],[h,f]],[/(playstation [345portablevi]+)/i],[u,[p,L],[h,f]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[p,A],[h,f]],[/smart-tv.+(samsung)/i],[p,[h,v]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[p,M],[h,v]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[p,I],[h,v]],[/(apple) ?tv/i],[p,[u,w+" TV"],[h,v]],[/crkey/i],[[u,F+"cast"],[p,k],[h,v]],[/droid.+aft(\w)( bui|\))/i],[u,[p,S],[h,v]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[u,[p,P],[h,v]],[/(bravia[\w ]+)( bui|\))/i],[u,[p,L],[h,v]],[/(mitv-\w{5}) bui/i],[u,[p,B],[h,v]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[p,q],[u,q],[h,v]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[h,v]],[/((pebble))app/i],[p,u,[h,y]],[/droid.+; (glass) \d/i],[u,[p,k],[h,y]],[/droid.+; (wt63?0{2,3})\)/i],[u,[p,U],[h,y]],[/(quest( 2)?)/i],[u,[p,j],[h,y]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[p,[h,E]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[h,_]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[h,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[h,b]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[h,_]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[p,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[m,[d,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[m,[d,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[d,m],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[m,d]],os:[[/microsoft (windows) (vista|xp)/i],[d,m],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[d,[m,$,K]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[d,"Windows"],[m,$,K]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[m,/_/g,"."],[d,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[d,"Mac OS"],[m,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[m,d],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[d,m],[/\(bb(10);/i],[m,[d,C]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[m,[d,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[m,[d,D+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[m,[d,"webOS"]],[/crkey\/([\d\.]+)/i],[m,[d,F+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[d,"Chromium OS"],m],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[d,m],[/(sunos) ?([\w\.\d]*)/i],[[d,"Solaris"],m],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[d,m]]},Y=function(e,t){if(typeof e===l&&(t=e,e=o),!(this instanceof Y))return new Y(e,t).getResult();var n=e||(typeof i!==s&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),r=t?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(W,t):W;return this.getBrowser=function(){var e,t={};return t[d]=o,t[m]=o,V.call(t,n,r.browser),t.major=typeof(e=t.version)===c?e.replace(/[^\d\.]/g,"").split(".")[0]:o,t},this.getCPU=function(){var e={};return e[g]=o,V.call(e,n,r.cpu),e},this.getDevice=function(){var e={};return e[p]=o,e[u]=o,e[h]=o,V.call(e,n,r.device),e},this.getEngine=function(){var e={};return e[d]=o,e[m]=o,V.call(e,n,r.engine),e},this.getOS=function(){var e={};return e[d]=o,e[m]=o,V.call(e,n,r.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n=typeof e===c&&e.length>350?q(e,350):e,this},this.setUA(n),this};Y.VERSION="1.0.33",Y.BROWSER=G([d,m,"major"]),Y.CPU=G([g]),Y.DEVICE=G([u,p,h,f,_,v,b,y,E]),Y.ENGINE=Y.OS=G([d,m]),typeof t!==s?(typeof e!==s&&e.exports&&(t=e.exports=Y),t.UAParser=Y):n(1424)?(r=function(){return Y}.call(t,n,t,e))===o||(e.exports=r):typeof i!==s&&(i.UAParser=Y);var Q=typeof i!==s&&(i.jQuery||i.Zepto);if(Q&&!Q.ua){var X=new Y;Q.ua=X.getResult(),Q.ua.get=function(){return X.getUA()},Q.ua.set=function(e){X.setUA(e);var t=X.getResult();for(var n in t)Q.ua[n]=t[n]}}}("object"==typeof window?window:this)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return bt}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(129),l=n(204),c=n(30),u=n(187),d=n(143),h=n(125),p=n(526),m=n(527),g=Object(o.forwardRef)(((e,t)=>{let{mxEvent:n,children:r}=e;const i=n.getContent().body;return a.a.createElement("div",{className:"mx_UnknownBody",ref:t},i,r)})),f=n(499),_=n(133),b=n(1051),v=n(659),y=n(338),E=n(924),S=n(835),w=n(180);class T extends a.a.PureComponent{render(){return!this.props.forExport&&Object(w.m)(this.props.mxEvent)?a.a.createElement(S.a,this.props):a.a.createElement(E.a,this.props)}}var C=n(130),x=n.n(C),F=n(822),D=n(1),k=n(121),O=n(206),I=n(166),A=n(495),R=n(466),N=n(138),M=n(467);class P extends a.a.PureComponent{constructor(e){super(e),i()(this,"context",void 0),i()(this,"videoRef",a.a.createRef()),i()(this,"sizeWatcher",void 0),i()(this,"videoOnPlay",(async()=>{this.hasContentUrl()||this.state.fetchingData||this.state.error||(this.setState({fetchingData:!0}),this.props.mediaEventHelper.media.isEncrypted?(this.setState({decryptedUrl:await this.props.mediaEventHelper.sourceUrl.value,decryptedBlob:await this.props.mediaEventHelper.sourceBlob.value,fetchingData:!1},(()=>{this.videoRef.current&&this.videoRef.current.play()})),this.props.onHeightChanged()):this.setState({error:"No file given in content"}))})),i()(this,"getFileBody",(()=>this.props.forExport?null:this.showFileBody&&a.a.createElement(y.a,x()({},this.props,{showGenericPlaceholder:!1})))),this.state={fetchingData:!1,decryptedUrl:null,decryptedThumbnailUrl:null,decryptedBlob:null,error:null,posterLoading:!1,blurhashUrl:null}}getContentUrl(){var e;const t=this.props.mxEvent.getContent();if(this.props.forExport)return(null===(e=t.file)||void 0===e?void 0:e.url)||t.url;const n=Object(I.a)(t);return n.isEncrypted?this.state.decryptedUrl:n.srcHttp}hasContentUrl(){const e=this.getContentUrl();return e&&!e.startsWith("data:")}getThumbUrl(){if(this.props.forExport)return null;const e=this.props.mxEvent.getContent(),t=Object(I.a)(e);return t.isEncrypted&&this.state.decryptedThumbnailUrl?this.state.decryptedThumbnailUrl:this.state.posterLoading?this.state.blurhashUrl:t.hasThumbnail?t.thumbnailHttp:null}loadBlurhash(){var e;const t=null===(e=this.props.mxEvent.getContent())||void 0===e?void 0:e.info;if(!t[A.a])return;const n=document.createElement("canvas"),{w:r,h:i}=Object(R.b)(h.b.getValue("Images.size"),{w:t.w,h:t.h});n.width=r,n.height=i;const o=Object(F.decode)(t[A.a],r,i),a=n.getContext("2d"),s=a.createImageData(r,i);s.data.set(o),a.putImageData(s,0,0),this.setState({blurhashUrl:n.toDataURL(),posterLoading:!0});const l=this.props.mxEvent.getContent(),c=Object(I.a)(l);if(c.hasThumbnail){const e=new Image;e.onload=()=>{this.setState({posterLoading:!1})},e.src=c.thumbnailHttp}}async componentDidMount(){this.sizeWatcher=h.b.watchSetting("Images.size",null,(()=>{this.forceUpdate()}));try{this.loadBlurhash()}catch(e){D.a.error("Failed to load blurhash",e)}if(this.props.mediaEventHelper.media.isEncrypted&&null===this.state.decryptedUrl)try{const t=h.b.getValue("autoplayVideo"),n=await this.props.mediaEventHelper.thumbnailUrl.value;if(t)D.a.log("Preloading video"),this.setState({decryptedUrl:await this.props.mediaEventHelper.sourceUrl.value,decryptedThumbnailUrl:n,decryptedBlob:await this.props.mediaEventHelper.sourceBlob.value}),this.props.onHeightChanged();else{var e;D.a.log("NOT preloading video");const t=this.props.mxEvent.getContent();let r=null==t||null===(e=t.info)||void 0===e?void 0:e.mimetype;"video/quicktime"==r&&(r="video/mp4"),this.setState({decryptedUrl:`data:${r},`,decryptedThumbnailUrl:n||`data:${r},`,decryptedBlob:null})}}catch(e){D.a.warn("Unable to decrypt attachment: ",e),this.setState({error:e})}}componentWillUnmount(){h.b.unwatchSetting(this.sizeWatcher)}get showFileBody(){return this.context.timelineRenderingType!==N.a.Room&&this.context.timelineRenderingType!==N.a.Pinned&&this.context.timelineRenderingType!==N.a.Search}render(){var e,t,n,r;const i=this.props.mxEvent.getContent(),o=h.b.getValue("autoplayVideo");let s;null!==(e=i.info)&&void 0!==e&&e.w&&null!==(t=i.info)&&void 0!==t&&t.h&&(s=`${i.info.w}/${i.info.h}`);const{w:l,h:c}=Object(R.b)(h.b.getValue("Images.size"),{w:null===(n=i.info)||void 0===n?void 0:n.w,h:null===(r=i.info)||void 0===r?void 0:r.h}),u=a.a.createElement("div",{style:{width:l,height:c}});if(null!==this.state.error)return a.a.createElement(M.a,{className:"mx_MVideoBody"},Object(k.a)("Error decrypting video"));if(!this.props.forExport&&void 0!==i.file&&null===this.state.decryptedUrl&&o)return a.a.createElement("span",{className:"mx_MVideoBody"},a.a.createElement("div",{className:"mx_MVideoBody_container",style:{maxWidth:l,maxHeight:c,aspectRatio:s}},a.a.createElement(O.a,null)),u);const d=this.getContentUrl(),p=this.getThumbUrl();let m=null,g="metadata";i.info&&p&&(m=p,g="none");const f=this.getFileBody();return a.a.createElement("span",{className:"mx_MVideoBody"},a.a.createElement("div",{className:"mx_MVideoBody_container",style:{maxWidth:l,maxHeight:c,aspectRatio:s}},a.a.createElement("video",{className:"mx_MVideoBody",ref:this.videoRef,src:d,title:i.body,controls:!0,controlsList:"nodownload",preload:g,muted:o,autoPlay:o,poster:m,onPlay:this.videoOnPlay}),u),f)}}i()(P,"contextType",N.b);var L=n(161);class B extends v.a{constructor(){super(...arguments),i()(this,"onClick",(e=>{e.preventDefault(),this.state.showImage||this.showImage()}))}wrapImage(e,t){let n=null;return this.state.showImage||(n=this.onClick),a.a.createElement("div",{className:"mx_MStickerBody_wrapper",onClick:n}," ",t," ")}getPlaceholder(e,t){var r;return null!==(r=this.props.mxEvent.getContent().info)&&void 0!==r&&r[A.a]?super.getPlaceholder(e,t):a.a.createElement("img",{className:"mx_MStickerBody_placeholder",src:n(1411).default,width:"80",height:"80",onMouseEnter:this.onImageEnter,onMouseLeave:this.onImageLeave})}getTooltip(){const e=this.props.mxEvent&&this.props.mxEvent.getContent();return e&&e.body&&e.info&&e.info.w?a.a.createElement("div",{style:{left:e.info.w+"px"},className:"mx_MStickerBody_tooltip"},a.a.createElement(L.b,{label:e.body})):null}getFileBody(){return null}getBanner(e){return null}}var U=n(314),j=n(132),G=n.n(j),z=n(136),H=n(55),q=n(605),V=n(293),$=n(461);const K=["mxEvent"],W=e=>{const t=Object(o.useContext)(_.a),[n,r]=Object(o.useState)(),[i,a]=Object(o.useState)(!1),s=(e=>{const t=e.getRelation();return null==t?void 0:t.event_id})(e);return Object(o.useEffect)((()=>{var i;const o=t.getRoom(e.getRoomId());if(n||!o||!s)return;const l=o.getUnfilteredTimelineSet(),c=null==l||null===(i=l.getTimelineForEvent(s))||void 0===i?void 0:i.getEvents().find((e=>e.getId()===s));c?c.getSender()===e.getSender()&&r(c):(async(n,i)=>{a(!0);try{const a=await t.fetchRoomEvent(n,i),s=new z.MatrixEvent(a);null==o||o.processPollEvents([s,e]),s.getSender()===e.getSender()&&r(s)}catch(e){D.a.error("Failed to fetch related poll start event",e)}finally{a(!1)}})(o.roomId,s)}),[e,s,n,t]),{pollStartEvent:n,isLoadingPollStartEvent:i}},Y=a.a.forwardRef(((e,t)=>{let{mxEvent:n}=e,r=G()(e,K);const{pollStartEvent:i,isLoadingPollStartEvent:o}=W(n);if(!i){const e=H.c.findIn(n.getContent())||Object(V.b)(n);return a.a.createElement(a.a.Fragment,null,a.a.createElement(q.a,{className:"mx_MPollEndBody_icon"}),!o&&e)}return a.a.createElement("div",null,a.a.createElement($.a,null,Object(k.a)("Ended a poll")),a.a.createElement(U.d,x()({mxEvent:i},r)))}));var Q=n(223),X=n(127),Z=n(230),J=n(244),ee=n(135),te=n(126),ne=n.n(te),re=n(537),ie=n(141),oe=n(241),ae=n(536);var se=n(144);const le=e=>{let{id:t,centerGeoUri:n,onError:r,interactive:i,bounds:a,allowGeolocate:s}=e;const l=`mx_Map_${t}`,c=Object(o.useContext)(_.a),u=Object(ie.b)(c,z.ClientEvent.ClientWellKnown,(e=>{var t;return null===(t=Object(oe.h)(e))||void 0===t?void 0:t.map_style_url})),d=(e=>{let{interactive:t,bodyId:n,onError:r}=e;const[i,a]=Object(o.useState)();return Object(o.useEffect)((()=>{try{a(Object(ae.a)(!!t,n,r))}catch(e){null==r||r(e)}return()=>{i&&(i.remove(),a(void 0))}}),[t,n,r]),i})({interactive:i,bodyId:l,onError:r});Object(o.useEffect)((()=>{u&&d&&d.setStyle(u)}),[u,d]),Object(o.useEffect)((()=>{if(d&&n)try{const e=Object(Z.i)(n);if(!e)throw new Error("Invalid geo URI");d.setCenter({lon:e.longitude,lat:e.latitude})}catch(e){D.a.error("Could not set map center")}}),[d,n]),Object(o.useEffect)((()=>{if(d&&a)try{const e=new re.LngLatBounds([a.west,a.south],[a.east,a.north]);d.fitBounds(e,{padding:100,maxZoom:15})}catch(e){D.a.error("Invalid map bounds")}}),[d,a]);const[h,p]=Object(o.useState)(null);return Object(o.useEffect)((()=>{if(d){if(s&&!h){const e=new re.GeolocateControl({positionOptions:{enableHighAccuracy:!0},trackUserLocation:!1});p(e),d.addControl(e)}!s&&h&&(d.removeControl(h),p(null))}}),[d,h,s]),Object(o.useEffect)((()=>{if(h)return h.on("error",ce),()=>{h.off("error",ce)}}),[h]),{map:d,bodyId:l}},ce=e=>{var t;D.a.error("Could not fetch location",e),X.b.createDialog(se.a,{title:Object(k.a)("Could not fetch location"),description:null!==(t=Object(Z.j)(e.code))&&void 0!==t?t:""})};var ue=e=>{let{bounds:t,centerGeoUri:n,children:r,className:i,allowGeolocate:o,id:s,interactive:l,onError:c,onClick:u}=e;const{map:d,bodyId:h}=le({centerGeoUri:n,onError:c,id:s,interactive:l,bounds:t,allowGeolocate:o});return a.a.createElement("div",{className:ne()("mx_Map",i),id:h,onClick:e=>{e.target.classList.contains("maplibregl-ctrl-attrib-button")||u&&u()}},!!r&&!!d&&r({map:d}))},de=n(837);var he,pe=e=>{let{id:t,map:n,geoUri:r,roomMember:i,useMemberColor:s,tooltip:l}=e;const{onElementRef:c}=((e,t)=>{const[n,r]=Object(o.useState)(),i=Object(o.useCallback)((i=>{if(n||!i)return;const o=Object(Z.i)(t);if(o){const t=Object(Z.c)(o,i);t.addTo(e),r(t)}}),[n,t,e]);return Object(o.useEffect)((()=>{if(n){const e=Object(Z.i)(t);e&&n.setLngLat({lon:e.longitude,lat:e.latitude})}}),[n,t]),Object(o.useEffect)((()=>()=>{n&&n.remove()}),[n]),{marker:n,onElementRef:i}})(n,r);return a.a.createElement("span",null,a.a.createElement(de.a,{ref:c,id:t,roomMember:i,useMemberColor:s,tooltip:l}))},me=n(123);function ge(){return ge=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ge.apply(this,arguments)}function fe(e){return o.createElement("svg",ge({fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",role:"presentation","aria-hidden":!0},e),he||(he=o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.783 2.783a.783.783 0 10-1.566 0v4.434H2.783a.783.783 0 000 1.566h4.434v4.435a.783.783 0 001.566 0V8.783h4.435a.783.783 0 000-1.566H8.783V2.783z",fill:"currentColor"})))}var _e;function be(){return be=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},be.apply(this,arguments)}function ve(e){return o.createElement("svg",be({fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",role:"presentation","aria-hidden":!0},e),_e||(_e=o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 8c0-.432.35-.783.783-.783h10.434a.783.783 0 110 1.566H2.783A.783.783 0 012 8z",fill:"currentColor"})))}var ye=e=>{let{map:t}=e;return a.a.createElement("div",{className:"mx_ZoomButtons"},a.a.createElement(me.a,{onClick:()=>{t.zoomIn()},"data-testid":"map-zoom-in-button",title:Object(k.a)("Zoom in"),className:"mx_ZoomButtons_button"},a.a.createElement(fe,{className:"mx_ZoomButtons_icon"})),a.a.createElement(me.a,{onClick:()=>{t.zoomOut()},"data-testid":"map-zoom-out-button",title:Object(k.a)("Zoom out"),className:"mx_ZoomButtons_button"},a.a.createElement(ve,{className:"mx_ZoomButtons_icon"})))};class Ee extends a.a.Component{constructor(e){super(e),i()(this,"getBodyId",(()=>`mx_LocationViewDialog_${this.props.mxEvent.getId()}`)),i()(this,"onError",(e=>{this.setState({error:e})})),this.state={error:void 0}}render(){const{mxEvent:e}=this.props,t=Object(Z.f)(e.getContent())&&e.sender||void 0,n=Object(Z.g)(e);return a.a.createElement(ee.a,{className:"mx_LocationViewDialog",onFinished:this.props.onFinished,fixedWidth:!1},a.a.createElement(ue,{id:this.getBodyId(),centerGeoUri:n,onError:this.onError,interactive:!0,className:"mx_LocationViewDialog_map",allowGeolocate:!0},(e=>{let{map:r}=e;return a.a.createElement(a.a.Fragment,null,a.a.createElement(pe,{map:r,id:`${this.getBodyId()}-marker`,geoUri:n,roomMember:t}),a.a.createElement(ye,{map:r}))})))}}var Se=n(595);class we extends a.a.Component{constructor(e){super(e),i()(this,"context",void 0),i()(this,"unmounted",!1),i()(this,"mapId",void 0),i()(this,"reconnectedListener",void 0),i()(this,"onClick",(()=>{X.b.createDialog(Ee,{matrixClient:this.context,mxEvent:this.props.mxEvent},"mx_LocationViewDialog_wrapper",!1,!0)})),i()(this,"clearError",(()=>{this.context.off(z.ClientEvent.Sync,this.reconnectedListener),this.setState({error:void 0})})),i()(this,"onError",(e=>{this.unmounted||(this.setState({error:e}),this.context.off(z.ClientEvent.Sync,this.reconnectedListener),this.context.on(z.ClientEvent.Sync,this.reconnectedListener))}));const t=`${e.mxEvent.getId()}_${Object(Q.b)(8)}`;this.mapId=`mx_MLocationBody_${t}`,this.reconnectedListener=Object(Se.a)(this.clearError),this.state={error:void 0}}componentWillUnmount(){this.unmounted=!0,this.context.off(z.ClientEvent.Sync,this.reconnectedListener)}render(){return this.state.error?a.a.createElement(Te,{error:this.state.error,event:this.props.mxEvent}):a.a.createElement(Ce,{mxEvent:this.props.mxEvent,mapId:this.mapId,onError:this.onError,tooltip:Object(k.a)("Expand map"),onClick:this.onClick})}}i()(we,"contextType",_.a);const Te=e=>{var t,n;let{error:r,event:i}=e;const o=null==r?void 0:r.message,s=`${Object(k.a)("Unable to load map")}: ${Object(Z.e)(o)}`,l=Object(Z.f)(i.getContent())?Object(k.a)("Shared their location: ")+(null===(t=i.getContent())||void 0===t?void 0:t.body):Object(k.a)("Shared a location: ")+(null===(n=i.getContent())||void 0===n?void 0:n.body);return a.a.createElement("div",{className:"mx_EventTile_body mx_MLocationBody"},a.a.createElement("span",{className:o!==Z.a.MapStyleUrlNotConfigured?"mx_EventTile_tileError":""},s),a.a.createElement("br",null),l)},Ce=e=>{let{mxEvent:t,mapId:n,tooltip:r,onError:i,onClick:o}=e;const s=Object(Z.f)(t.getContent())?t.sender:void 0,l=Object(Z.g)(t),c=a.a.createElement(ue,{id:n,centerGeoUri:l,onClick:o,onError:i,className:"mx_MLocationBody_map"},(e=>{let{map:t}=e;return a.a.createElement(pe,{map:t,id:`${n}-marker`,geoUri:l,roomMember:s})}));return a.a.createElement("div",{className:"mx_MLocationBody"},r?a.a.createElement(J.a,{label:r,alignment:L.a.InnerBottom,maxParentWidth:450},c):c)};class xe extends a.a.Component{constructor(){super(...arguments),i()(this,"onAllowClick",(e=>{e.preventDefault(),e.stopPropagation();const t=`mx_mjolnir_render_${this.props.mxEvent.getRoomId()}__${this.props.mxEvent.getId()}`;localStorage.setItem(t,"true"),this.props.onMessageAllowed()}))}render(){return a.a.createElement("div",{className:"mx_MjolnirBody"},a.a.createElement("i",null,Object(k.a)("You have ignored this user, so their message is hidden. <a>Show anyways.</a>",{},{a:e=>a.a.createElement(me.a,{kind:"link_inline",onClick:this.onAllowClick},e)})))}}var Fe=n(268);let De;!function(e){e.Loading="Loading",e.Error="Error",e.Stopped="Stopped",e.Active="Active"}(De||(De={}));var ke=n(340),Oe=n(838),Ie=n(165);const Ae=["beacon","displayStatus","displayLiveTimeRemaining","label","className","children","withIcon"],Re=e=>{let{beacon:t}=e;const n=Object(Ie.m)(new Date(Object(Fe.c)(t)));return a.a.createElement("span",{className:"mx_BeaconStatus_expiryTime"},Object(k.a)("Live until %(expiryTime)s",{expiryTime:n}))};var Ne=e=>{let{beacon:t,displayStatus:n,displayLiveTimeRemaining:r,label:i,className:o,children:s,withIcon:l}=e,c=G()(e,Ae);const u=n===De.Loading||n===De.Stopped;return a.a.createElement("div",x()({},c,{className:ne()("mx_BeaconStatus",`mx_BeaconStatus_${n}`,o)}),l&&a.a.createElement(ke.a,{className:"mx_BeaconStatus_icon",withError:n===De.Error,isIdle:u}),a.a.createElement("div",{className:"mx_BeaconStatus_description"},n===De.Loading&&a.a.createElement("span",{className:"mx_BeaconStatus_description_status"},Object(k.a)("Loading live location…")),n===De.Stopped&&a.a.createElement("span",{className:"mx_BeaconStatus_description_status"},Object(k.a)("Live location ended")),n===De.Error&&a.a.createElement("span",{className:"mx_BeaconStatus_description_status"},Object(k.a)("Live location error")),n===De.Active&&t&&a.a.createElement(a.a.Fragment,null,a.a.createElement(a.a.Fragment,null,a.a.createElement("span",{className:"mx_BeaconStatus_label"},i),r?a.a.createElement(Oe.a,{beacon:t}):a.a.createElement(Re,{beacon:t})))),s)},Me=n(609);const Pe=["beacon","displayStatus"];var Le,Be,Ue=e=>{let{beacon:t,displayStatus:n}=e,r=G()(e,Pe);const{hasLocationPublishError:i,hasStopSharingError:o,stoppingInProgress:s,onStopSharing:l,onResetLocationPublishError:c}=Object(Fe.k)(null!=t&&t.identifier?[null==t?void 0:t.identifier]:[]),u=i||o?De.Error:n;return a.a.createElement(Ne,x()({beacon:t,displayStatus:u,label:Object(k.a)("Live location enabled"),displayLiveTimeRemaining:!0},r),u===De.Active&&a.a.createElement(me.a,{"data-test-id":"beacon-status-stop-beacon",kind:"link",onClick:Object(Me.a)(l),className:"mx_OwnBeaconStatus_button mx_OwnBeaconStatus_destructiveButton",disabled:s},Object(k.a)("Stop")),i&&a.a.createElement(me.a,{"data-test-id":"beacon-status-reset-wire-error",kind:"link",onClick:Object(Me.a)(c),className:"mx_OwnBeaconStatus_button mx_OwnBeaconStatus_destructiveButton"},Object(k.a)("Retry")),o&&a.a.createElement(me.a,{"data-test-id":"beacon-status-stop-beacon-retry",kind:"link",onClick:Object(Me.a)(l),className:"mx_OwnBeaconStatus_button mx_OwnBeaconStatus_destructiveButton"},Object(k.a)("Retry")))},je=n(610),Ge=n(606);function ze(){return ze=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ze.apply(this,arguments)}function He(e){return o.createElement("svg",ze({fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 848 556",role:"presentation","aria-hidden":!0},e),o.createElement("mask",{id:"map_svg__a",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:848,height:556},Le||(Le=o.createElement("path",{fill:"currentColor",d:"M0 0h847.147v555.685H0z"}))),Be||(Be=o.createElement("g",{mask:"url(#map_svg__a)"},o.createElement("circle",{cx:424.936,cy:277.842,r:495.758}),o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M424.935 874.689c329.63 0 596.845-267.217 596.845-596.847S754.565-319.005 424.935-319.005c-329.629 0-596.846 267.218-596.846 596.847 0 329.63 267.217 596.847 596.846 596.847zM-46.544 6.905L920.48 442.347l-47.338 105.126-434.953-195.856-219.202 482.882-104.982-47.656L333.061 304.28-93.881 112.031-46.544 6.905z",fill:"currentColor"}))))}var qe=n(134);const Ve=["className","isLoading","children"];var $e=e=>{let{className:t,isLoading:n,children:r}=e,i=G()(e,Ve);return a.a.createElement("div",x()({className:ne()("mx_MapFallback",t)},i),a.a.createElement(He,{className:"mx_MapFallback_bg"}),n?a.a.createElement(qe.a,{h:32,w:32}):a.a.createElement(Ge.a,{className:"mx_MapFallback_icon"}),r)},Ke=n(607);var We=e=>{var t;let{map:n,beacon:r,tooltip:i}=e;const s=Object(ie.b)(r,z.BeaconEvent.LocationUpdate,(()=>r.latestLocationState)),l=Object(o.useContext)(_.a).getRoom(r.roomId);if(!s||!r.isLive)return null;const u=s.uri||"",d=(null===(t=r.beaconInfo)||void 0===t?void 0:t.assetType)===c.a.Self,h=null==l?void 0:l.getMember(r.beaconInfoOwner),p=d&&h?h:void 0;return a.a.createElement(pe,{map:n,id:r.identifier,geoUri:u,roomMember:p,tooltip:i,useMemberColor:!0})};const Ye=e=>{const t=e.filter((e=>!!e.latestLocationState)).map((e=>Object(Z.i)(e.latestLocationState.uri)));if(!t.length)return;const n=[...t].sort(((e,t)=>t.latitude-e.latitude)),r=[...t].sort(((e,t)=>t.longitude-e.longitude));return n.length<1||r.length<1?void 0:{north:n[0].latitude,south:n[n.length-1].latitude,east:r[0].longitude,west:r[r.length-1].longitude}};var Qe,Xe=n(839),Ze=n(175),Je=n(695),et=n(172);function tt(){return tt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tt.apply(this,arguments)}function nt(e){return o.createElement("svg",tt({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 11 10",role:"presentation","aria-hidden":!0},e),Qe||(Qe=o.createElement("path",{d:"M8.5 5.5v3a1 1 0 01-1 1H2a1 1 0 01-1-1V3a1 1 0 011-1h3M7 .5h3v3M4.5 6L10 .5",fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})))}var rt=n(298);var it=e=>{let{latestLocationState:t}=e;const[n,r]=Object(o.useState)();if(Object(o.useEffect)((()=>{if(null==t||!t.uri)return;const e=Object(Z.i)(t.uri);r(e)}),[t]),!t||!n)return null;const i=`${n.latitude},${n.longitude}`,s=Object(Z.h)(n);return a.a.createElement(a.a.Fragment,null,a.a.createElement(J.a,{label:Object(k.a)("Open in OpenStreetMap")},a.a.createElement("a",{"data-testid":"open-location-in-osm",href:s,target:"_blank",rel:"noreferrer noopener"},a.a.createElement(nt,{className:"mx_ShareLatestLocation_icon"}))),a.a.createElement(rt.a,{className:"mx_ShareLatestLocation_copy",border:!1,getTextToCopy:()=>i}))};const ot=["beacon"];var at=e=>{var t,n;let{beacon:r}=e,i=G()(e,ot);const s=Object(ie.b)(r,z.BeaconEvent.LocationUpdate,(()=>r.latestLocationState)),l=Object(o.useContext)(_.a).getRoom(r.roomId);if(!s||!r.isLive||!l)return null;const u=(null===(t=r.beaconInfo)||void 0===t?void 0:t.assetType)===c.a.Self,d=u?l.getMember(r.beaconInfoOwner):null,h=s.timestamp&&Object(Je.a)(s.timestamp)||"";return a.a.createElement("li",x()({className:"mx_BeaconListItem"},i),u?a.a.createElement(et.b,{className:"mx_BeaconListItem_avatar",member:d,height:32,width:32}):a.a.createElement(ke.a,{className:"mx_BeaconListItem_avatarIcon"}),a.a.createElement("div",{className:"mx_BeaconListItem_info"},a.a.createElement(Ne,{className:"mx_BeaconListItem_status",beacon:r,label:(null==d?void 0:d.name)||(null===(n=r.beaconInfo)||void 0===n?void 0:n.description)||r.beaconInfoOwner,displayStatus:De.Active},a.a.createElement("div",{className:"mx_BeaconListItem_interactions",onClick:Object(Me.a)((()=>{}))},a.a.createElement(it,{latestLocationState:s}))),a.a.createElement("span",{className:"mx_BeaconListItem_lastUpdated"},Object(k.a)("Updated %(humanizedUpdateTime)s",{humanizedUpdateTime:h}))))};var st=e=>{let{beacons:t,onBeaconClick:n,requestClose:r}=e;return a.a.createElement("div",{className:"mx_DialogSidebar"},a.a.createElement("div",{className:"mx_DialogSidebar_header"},a.a.createElement(Ze.a,{size:"h4"},Object(k.a)("View List")),a.a.createElement(me.a,{className:"mx_DialogSidebar_closeButton",onClick:r,title:Object(k.a)("Close sidebar"),"data-testid":"dialog-sidebar-close"},a.a.createElement(Xe.a,{className:"mx_DialogSidebar_closeButtonIcon"}))),null!=t&&t.length?a.a.createElement("ol",{className:"mx_DialogSidebar_list"},t.map((e=>a.a.createElement(at,{key:e.identifier,beacon:e,onClick:()=>n(e)})))):a.a.createElement("div",{className:"mx_DialogSidebar_noResults"},Object(k.a)("No live locations")))},lt=n(339);var ct=e=>{var t;let{roomId:n}=e;const r=(e=>Object(ie.b)(lt.a.instance,lt.b.LivenessChange,(()=>{const[t]=lt.a.instance.getLiveBeaconIds(e);return lt.a.instance.getBeaconById(t)})))(n),i=Object(o.useContext)(_.a).getRoom(n);if(null==r||!r.isLive||!i)return null;const s=(null===(t=r.beaconInfo)||void 0===t?void 0:t.assetType)===c.a.Self,l=s?i.getMember(r.beaconInfoOwner):null;return a.a.createElement("div",{className:"mx_DialogOwnBeaconStatus"},s?a.a.createElement(et.b,{className:"mx_DialogOwnBeaconStatus_avatar",member:l,height:32,width:32}):a.a.createElement(ke.a,{className:"mx_DialogOwnBeaconStatus_avatarIcon"}),a.a.createElement(Ue,{className:"mx_DialogOwnBeaconStatus_status",beacon:r,displayStatus:De.Active}))};var ut=e=>{let{beacon:t}=e;const n=(e=>{var t;const n=Object(o.useContext)(_.a);var r;if((null===(t=e.beaconInfo)||void 0===t?void 0:t.assetType)!==c.a.Self)return null===(r=e.beaconInfo)||void 0===r?void 0:r.description;const i=n.getRoom(e.roomId),a=null==i?void 0:i.getMember(e.beaconInfoOwner);return(null==a?void 0:a.rawDisplayName)||e.beaconInfoOwner})(t);return a.a.createElement("div",{className:"mx_BeaconStatusTooltip"},a.a.createElement(Ne,{beacon:t,label:n,displayStatus:De.Active,displayLiveTimeRemaining:!0,className:"mx_BeaconStatusTooltip_inner"},a.a.createElement(it,{latestLocationState:t.latestLocationState})))};const dt=(e,t)=>{var n;let{beacon:r,ts:i}=t;const[a,s]=Object(o.useState)(Ye(e)),[l,c]=Object(o.useState)((null==r||null===(n=r.latestLocationState)||void 0===n?void 0:n.uri)||(e=>{if(e)return Object(Fe.f)({latitude:(e.north+e.south)/2,longitude:(e.east+e.west)/2,timestamp:Date.now()})})(a));return Object(o.useEffect)((()=>{var e,t;0!==i&&null!=r&&null!==(e=r.latestLocationState)&&void 0!==e&&e.uri&&(c(`${null==r||null===(t=r.latestLocationState)||void 0===t?void 0:t.uri};mxTs=${Date.now()}`),s(Ye([r])))}),[r,i]),{bounds:a,centerGeoUri:l}};var ht=e=>{let{initialFocusedBeacon:t,roomId:n,matrixClient:r,onFinished:i}=e;const s=((e,t)=>{const n=t.getRoom(e);return Object(ie.b)(null==n?void 0:n.currentState,z.RoomStateEvent.BeaconLiveness,(()=>{var e;return null==n||null===(e=n.currentState)||void 0===e?void 0:e.liveBeaconIds.map((e=>n.currentState.beacons.get(e)))}))})(n,r),[l,c]=Object(o.useState)({beacon:t,ts:0}),[u,d]=Object(o.useState)(!1),{bounds:h,centerGeoUri:p}=dt(s,l),[m,g]=Object(o.useState)();Object(o.useEffect)((()=>{m&&d(!0)}),[m]);const f=s.filter((e=>(null==e?void 0:e.beaconInfoOwner)===r.getUserId())).length>0;return a.a.createElement(ee.a,{className:"mx_BeaconViewDialog",onFinished:i,fixedWidth:!1},a.a.createElement(_.a.Provider,{value:r},p&&!m&&a.a.createElement(ue,{id:"mx_BeaconViewDialog",bounds:h,centerGeoUri:p,interactive:!0,onError:g,className:"mx_BeaconViewDialog_map",allowGeolocate:!f},(e=>{let{map:t}=e;return a.a.createElement(a.a.Fragment,null,s.map((e=>a.a.createElement(We,{key:e.identifier,map:t,beacon:e,tooltip:a.a.createElement(ut,{beacon:e})}))),a.a.createElement(ye,{map:t}))})),m&&a.a.createElement(je.a,{error:m.message,isMinimised:!0}),!p&&!m&&a.a.createElement($e,{"data-testid":"beacon-view-dialog-map-fallback",className:"mx_BeaconViewDialog_map"},a.a.createElement("span",{className:"mx_BeaconViewDialog_mapFallbackMessage"},Object(k.a)("No live locations")),a.a.createElement(me.a,{kind:"primary",onClick:i,"data-testid":"beacon-view-dialog-fallback-close"},Object(k.a)("Close"))),u?a.a.createElement(st,{beacons:s,onBeaconClick:e=>{c({beacon:e,ts:Date.now()})},requestClose:()=>d(!1)}):a.a.createElement(me.a,{kind:"primary",onClick:()=>d(!0),"data-testid":"beacon-view-dialog-open-sidebar",className:"mx_BeaconViewDialog_viewListButton"},a.a.createElement(Ke.a,{height:12})," ",Object(k.a)("View list")),a.a.createElement(ct,{roomId:n})))};var pt=a.a.forwardRef(((e,t)=>{let{mxEvent:n,getRelationsForEvent:r}=e;const{beacon:i,isLive:s,latestLocationState:c,waitingToStart:u}=(e=>{const t=Object(Fe.j)(e),n=Object(ie.b)(t,z.BeaconEvent.LivenessChange,(()=>null==t?void 0:t.isLive)),r=Object(ie.b)(t,z.BeaconEvent.LocationUpdate,(()=>null==t?void 0:t.latestLocationState));if(!t)return{};const i=!!t&&Object(Fe.g)(t),{description:o}=t.beaconInfo;return{beacon:t,description:o,isLive:n,waitingToStart:i,latestLocationState:r}})(n),d=(e=>{const[t,n]=Object(o.useState)(`${e}_${Object(Q.b)(8)}`);return Object(o.useEffect)((()=>{n(`${e}_${Object(Q.b)(8)}`)}),[e]),t})(n.getId()),h=Object(o.useContext)(_.a),[p,m]=Object(o.useState)(),g=(null==p?void 0:p.message)===Z.a.MapStyleUrlNotConfigured||(null==p?void 0:p.message)===Z.a.MapStyleUrlNotReachable,f=((e,t,n,r)=>n?De.Error:r?De.Loading:e?t?De.Active:De.Loading:De.Stopped)(s,c,g?void 0:p,u),b=Object(Z.f)(n.getContent())?n.sender:void 0,v=(null==i?void 0:i.beaconInfoOwner)===h.getUserId();((e,t,n)=>{const r=Object(o.useCallback)(((r,i)=>{var o;const a=n?n(e.getId(),z.RelationType.Reference,l.a.name):void 0;null==a||null===(o=a.getRelations())||void 0===o||o.forEach((e=>{t.redactEvent(e.getRoomId(),e.getId(),void 0,i.getContent())}))}),[e,t,n]);Object(o.useEffect)((()=>(e.addListener(z.MatrixEventEvent.BeforeRedaction,r),()=>{e.removeListener(z.MatrixEventEvent.BeforeRedaction,r)})),[e,r])})(n,h,r);const y=()=>{f===De.Active&&X.b.createDialog(ht,{roomId:n.getRoomId(),matrixClient:h,initialFocusedBeacon:i},"mx_BeaconViewDialog_wrapper",!1,!0)};let E;return E=f!==De.Active||g?g?a.a.createElement(je.a,{error:p.message,onClick:y,className:ne()("mx_MBeaconBody_mapError",{mx_MBeaconBody_mapErrorInteractive:f===De.Active}),isMinimised:!0}):a.a.createElement($e,{isLoading:f===De.Loading,className:"mx_MBeaconBody_map mx_MBeaconBody_mapFallback"}):a.a.createElement(ue,{id:d,centerGeoUri:c.uri,onError:m,onClick:y,className:"mx_MBeaconBody_map"},(e=>{let{map:t}=e;return a.a.createElement(pe,{map:t,id:`${d}-marker`,geoUri:c.uri,roomMember:b,useMemberColor:!0})})),a.a.createElement("div",{className:"mx_MBeaconBody",ref:t},E,v?a.a.createElement(Ue,{className:"mx_MBeaconBody_chin",beacon:i,displayStatus:f,withIcon:!0}):a.a.createElement(Ne,{className:"mx_MBeaconBody_chin",beacon:i,displayStatus:f,label:Object(k.a)("View live location"),withIcon:!0}))})),mt=n(840),gt=n(192);const ft=new Map([[s.e.Text,b.a],[s.e.Notice,b.a],[s.e.Emote,b.a],[s.e.Image,v.a],[s.e.File,y.a],[s.e.Audio,T],[s.e.Video,P]]),_t=new Map([[s.b.Sticker,B],[u.e.name,U.d],[u.e.altName,U.d],[u.a.name,Y],[u.a.altName,Y],[l.b.name,pt],[l.b.altName,pt]]);class bt extends a.a.Component{constructor(e,t){super(e,t),i()(this,"body",Object(o.createRef)()),i()(this,"mediaHelper",void 0),i()(this,"bodyTypes",new Map(ft.entries())),i()(this,"evTypes",new Map(_t.entries())),i()(this,"context",void 0),i()(this,"getEventTileOps",(()=>{var e,t;return(null===(e=this.body.current)||void 0===e||null===(t=e.getEventTileOps)||void 0===t?void 0:t.call(e))||null})),i()(this,"onDecrypted",(()=>{var e;f.a.isEligible(this.props.mxEvent)&&(null===(e=this.mediaHelper)||void 0===e||e.destroy(),this.mediaHelper=new f.a(this.props.mxEvent))})),i()(this,"onTileUpdate",(()=>{this.forceUpdate()})),f.a.isEligible(this.props.mxEvent)&&(this.mediaHelper=new f.a(this.props.mxEvent)),this.updateComponentMaps()}componentDidMount(){this.props.mxEvent.addListener(d.c.Decrypted,this.onDecrypted)}componentWillUnmount(){var e;this.props.mxEvent.removeListener(d.c.Decrypted,this.onDecrypted),null===(e=this.mediaHelper)||void 0===e||e.destroy()}componentDidUpdate(e){var t;this.props.mxEvent!==e.mxEvent&&f.a.isEligible(this.props.mxEvent)&&(null===(t=this.mediaHelper)||void 0===t||t.destroy(),this.mediaHelper=new f.a(this.props.mxEvent));this.updateComponentMaps()}updateComponentMaps(){this.bodyTypes=new Map(ft.entries());for(const[t,n]of Object.entries(null!==(e=this.props.overrideBodyTypes)&&void 0!==e?e:{})){var e;this.bodyTypes.set(t,n)}this.evTypes=new Map(_t.entries());for(const[e,n]of Object.entries(null!==(t=this.props.overrideEventTypes)&&void 0!==t?t:{})){var t;this.evTypes.set(e,n)}}getMediaHelper(){return this.mediaHelper}render(){const e=this.props.mxEvent.getContent(),t=this.props.mxEvent.getType(),n=e.msgtype;let r=m.a;if(this.props.mxEvent.isRedacted()||(r=this.props.mxEvent.isDecryptionFailure()?mt.a:t&&this.evTypes.has(t)?this.evTypes.get(t):n&&this.bodyTypes.has(n)?this.bodyTypes.get(n):e.url?this.bodyTypes.get(s.e.File):g,(c.c.matches(t)||t===s.b.RoomMessage&&n===s.e.Location)&&(r=we),t===gt.g&&(null==e?void 0:e.state)===gt.h.Started&&(r=gt.b)),h.b.getValue("feature_mjolnir")){const e=`mx_mjolnir_render_${this.props.mxEvent.getRoomId()}__${this.props.mxEvent.getId()}`;if(!("true"===localStorage.getItem(e))){const e=this.props.mxEvent.getSender().split(":").slice(1).join(":"),t=p.a.sharedInstance().isUserBanned(this.props.mxEvent.getSender()),n=p.a.sharedInstance().isServerBanned(e);(t||n)&&(r=xe)}}return r?a.a.createElement(r,{ref:this.body,mxEvent:this.props.mxEvent,highlights:this.props.highlights,highlightLink:this.props.highlightLink,showUrlPreview:this.props.showUrlPreview,forExport:this.props.forExport,maxImageHeight:this.props.maxImageHeight,replacingEventId:this.props.replacingEventId,editState:this.props.editState,onHeightChanged:this.props.onHeightChanged,onMessageAllowed:this.onTileUpdate,permalinkCreator:this.props.permalinkCreator,mediaEventHelper:this.mediaHelper,getRelationsForEvent:this.props.getRelationsForEvent,isSeeingThroughMessageHiddenForModeration:this.props.isSeeingThroughMessageHiddenForModeration}):null}}i()(bt,"contextType",_.a)},,function(e,t,n){"use strict";n.d(t,"a",(function(){return _e})),n.d(t,"b",(function(){return Se}));var r=n(13),i=n.n(r),o=n(126),a=n.n(o),s=n(120),l=n.n(s),c=n(813),u=n.n(c),d=n(1);class h{constructor(){i()(this,"stack",[]),i()(this,"newlyTypedCharCount",0),i()(this,"currentIndex",-1),i()(this,"changedSinceLastPush",!1),i()(this,"lastCaret",null),i()(this,"nonWordBoundarySinceLastPush",!1),i()(this,"addedSinceLastPush",!1),i()(this,"removedSinceLastPush",!1)}clear(){this.stack=[],this.newlyTypedCharCount=0,this.currentIndex=-1,this.changedSinceLastPush=!1,this.lastCaret=null,this.nonWordBoundarySinceLastPush=!1,this.addedSinceLastPush=!1,this.removedSinceLastPush=!1}shouldPush(e,t){if(t&&("insertText"===e||"deleteContentForward"===e||"deleteContentBackward"===e)){if(t.added&&(this.addedSinceLastPush=!0),t.removed&&(this.removedSinceLastPush=!0),this.addedSinceLastPush!==this.removedSinceLastPush){const e=t.added?t.added:t.removed,n=" "===e||"\t"===e||"\n"===e;return!(!this.nonWordBoundarySinceLastPush||!n)||(n||(this.nonWordBoundarySinceLastPush=!0),this.newlyTypedCharCount+=e.length,this.newlyTypedCharCount>10)}return!0}return!0}pushState(e,t){for(;this.currentIndex<this.stack.length-1;)this.stack.pop();const n=e.serializeParts();this.stack.push({parts:n,caret:t}),this.currentIndex=this.stack.length-1,this.lastCaret=null,this.changedSinceLastPush=!1,this.newlyTypedCharCount=0,this.nonWordBoundarySinceLastPush=!1,this.addedSinceLastPush=!1,this.removedSinceLastPush=!1}tryPush(e,t,n,r){if("historyUndo"===n||"historyRedo"===n)return!1;const i=this.shouldPush(n,r);return i?this.pushState(e,t):(this.lastCaret=t,this.changedSinceLastPush=!0),i}ensureLastChangesPushed(e){this.changedSinceLastPush&&this.pushState(e,this.lastCaret)}canUndo(){return this.currentIndex>=1||this.changedSinceLastPush}canRedo(){return this.currentIndex<this.stack.length-1}undo(e){if(this.canUndo())return this.ensureLastChangesPushed(e),this.currentIndex-=1,this.stack[this.currentIndex]}redo(){if(this.canRedo())return this.changedSinceLastPush=!1,this.currentIndex+=1,this.stack[this.currentIndex]}}var p=n(570),m=n(569),g=n(252);function f(e,t,n){n instanceof m.a?function(e,t,n){const r=document.getSelection();r.removeAllRanges();const i=document.createRange(),o=_(e,t,n.start);i.setStart(o.node,o.offset);const a=_(e,t,n.end);i.setEnd(a.node,a.offset),r.addRange(i)}(e,t,n):function(e,t,n){if(t.isEmpty)return;const r=document.createRange(),{node:i,offset:o}=_(e,t,n);r.setStart(i,o),r.collapse(!0);const a=document.getSelection();if(1===a.rangeCount){const e=a.getRangeAt(0);if(e.startContainer===r.startContainer&&e.startOffset===r.startOffset&&e.collapsed===r.collapsed)return}a.removeAllRanges(),a.addRange(r)}(e,t,n)}function _(e,t,n){const{offset:r,lineIndex:i,nodeIndex:o}=function(e,t){const{parts:n}=e,r=t.index,i=function(e,t){let n,r=0,i=-1;for(let o=0;o<=t;++o){const a=e[o];if(a.type===g.b.Newline)r+=1,i=-1,n=void 0;else{if(i+=1,Object(p.d)(a,n)&&(i+=1),o<t){const t=e[o+1],n=!t||t.type===g.b.Newline;Object(p.c)(a,n)&&(i+=1)}n=a}}return{lineIndex:r,nodeIndex:i}}(n,r),{lineIndex:o}=i;let{nodeIndex:a}=i,{offset:s}=t;-1===a?s=0:({nodeIndex:a,offset:s}=function(e,t,n,r){const i=e[t];if(i&&!i.acceptsCaret)if(0===r){n-=1;const o=e[t-1];Object(p.d)(i,o)||(r=o.text.length)}else n+=1,r=0;return{nodeIndex:n,offset:r}}(n,r,a,s));return{lineIndex:o,nodeIndex:a,offset:s}}(t,n),a=e.childNodes[i];let s;return-1===o?s=a:(s=a.childNodes[o],s.nodeType===Node.ELEMENT_NODE&&s.firstChild&&(s=s.firstChild)),{node:s,offset:r}}var b=n(121),v=n(148);let y;!function(e){e.Bold="bold",e.Italics="italics",e.Strikethrough="strikethrough",e.Code="code",e.Quote="quote",e.InsertLink="insert_link"}(y||(y={}));class E extends l.a.PureComponent{constructor(e){super(e),i()(this,"formatBarRef",Object(s.createRef)()),this.state={visible:!1}}render(){const e=a()("mx_MessageComposerFormatBar",{mx_MessageComposerFormatBar_shown:this.state.visible});return l.a.createElement("div",{className:e,ref:this.formatBarRef},l.a.createElement(S,{label:Object(b.a)("Bold"),onClick:()=>this.props.onAction(y.Bold),icon:"Bold",shortcut:this.props.shortcuts.bold,visible:this.state.visible}),l.a.createElement(S,{label:Object(b.a)("Italics"),onClick:()=>this.props.onAction(y.Italics),icon:"Italic",shortcut:this.props.shortcuts.italics,visible:this.state.visible}),l.a.createElement(S,{label:Object(b.a)("Strikethrough"),onClick:()=>this.props.onAction(y.Strikethrough),icon:"Strikethrough",visible:this.state.visible}),l.a.createElement(S,{label:Object(b.a)("Code block"),onClick:()=>this.props.onAction(y.Code),icon:"Code",shortcut:this.props.shortcuts.code,visible:this.state.visible}),l.a.createElement(S,{label:Object(b.a)("Quote"),onClick:()=>this.props.onAction(y.Quote),icon:"Quote",shortcut:this.props.shortcuts.quote,visible:this.state.visible}),l.a.createElement(S,{label:Object(b.a)("Insert link"),onClick:()=>this.props.onAction(y.InsertLink),icon:"InsertLink",shortcut:this.props.shortcuts.insert_link,visible:this.state.visible}))}showAt(e){if(!this.formatBarRef.current)return;this.setState({visible:!0});const t=this.formatBarRef.current.parentElement.getBoundingClientRect();this.formatBarRef.current.style.left=e.left-t.left+"px";const n=this.formatBarRef.current.clientHeight/2,r=n+(n+2),i=Math.max(e.top-t.top-r,-r);this.formatBarRef.current.style.top=`${i}px`}hide(){this.setState({visible:!1})}}class S extends l.a.PureComponent{render(){const e=`mx_MessageComposerFormatBar_button mx_MessageComposerFormatBar_buttonIcon${this.props.icon}`;let t;this.props.shortcut&&(t=l.a.createElement("div",{className:"mx_MessageComposerFormatBar_tooltipShortcut"},this.props.shortcut));const n=l.a.createElement("div",null,l.a.createElement("div",{className:"mx_Tooltip_title"},this.props.label),l.a.createElement("div",{className:"mx_Tooltip_sub"},t));return l.a.createElement(v.a,{element:"button",type:"button",onClick:this.props.onClick,title:this.props.label,tooltip:n,className:e})}}var w=n(453);function T(e,t){if(e.wasInitializedEmpty()?function(e){e.expandForwardsWhile(F),e.expandBackwardsWhile(F),e.trim()}(e):e.trim(),0!==e.length)switch(t){case y.Bold:R(e,"**");break;case y.Italics:R(e,"_");break;case y.Strikethrough:R(e,"<del>","</del>");break;case y.Code:!function(e){const{model:t,parts:n}=e,{partCreator:r}=t,i=e.length>0&&e.text.startsWith("```")&&e.text.endsWith("```")&&e.text.includes("\n"),o=n.some((e=>e.type===g.b.Newline));if(i){var a,s;n.shift(),n.pop(),"\n"===(null===(a=n[0])||void 0===a?void 0:a.text)&&"\n"===(null===(s=n[n.length-1])||void 0===s?void 0:s.text)&&(n.shift(),n.pop())}else{if(!o){const t=Object(w.a)(e.text),n=e.text.startsWith("`")&&e.text.endsWith("`");return void R(e,"`".repeat(n?t:t+1))}n.unshift(r.plain("```"),r.newline()),D(e)||n.unshift(r.newline()),n.push(r.newline(),r.plain("```")),k(e)||n.push(r.newline())}C(e,n)}(e);break;case y.Quote:!function(e){const{model:t,parts:n}=e,{partCreator:r}=t;for(let e=0;e<n.length;++e){n[e].type===g.b.Newline&&n.splice(e+1,0,r.plain("> "))}n.unshift(r.plain("> ")),D(e)||n.unshift(r.newline());k(e)||n.push(r.newline());n.push(r.newline()),C(e,n)}(e);break;case y.InsertLink:O(e)}}function C(e,t){const{model:n}=e;n.transform((()=>{const r=e.length,i=e.replace(t),o=e.start.asOffset(n),a=o.add(r+i);return n.startRange(o.asPosition(n),a.asPosition(n))}))}function x(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const{model:i}=e;i.transform((()=>{const o=e.length,a=e.replace(t);return e.start.asOffset(i).add(o+a+n,r).asPosition(i)}))}const F=(e,t,n)=>" "!==n.text[t]&&n.type===g.b.Plain;function D(e){const{model:t}=e,n=0!==e.start.offset,r=0===e.start.index,i=!r&&t.parts[e.start.index-1].type===g.b.Newline;return!n&&(r||i)}function k(e){const{model:t}=e,n=t.parts[e.end.index],r=e.end.offset!==n.text.length,i=e.end.index===t.parts.length-1,o=!i&&t.parts[e.end.index+1].type===g.b.Newline;return!r&&(i||o)}function O(e,t){const{model:n}=e,{partCreator:r}=n,i=/\[(.*?)]\(.*?\)/g;if(i.test(e.text)){const t=e.text.replace(i,"$1");x(e,[r.plain(t)],0)}else x(e,[r.plain("["+e.text+"]("+(null!=t?t:"")+")")],-1)}const I=e=>!e.text||!/\S/.test(e.text),A=e=>e.type===g.b.Newline;function R(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;const{model:r,parts:i}=e,{partCreator:o}=r,a=[];let s=0;for(let e=2;e<i.length;e++)I(i[e-2])&&A(i[e-1])&&!A(i[e])&&!I(i[e])&&(s=e),A(i[e-1])&&A(i[e])?(a.push([s,e-1]),s=e+1):A(i[e-2])&&I(i[e-1])&&A(i[e])&&(a.push([s,e-2]),s=e+1);const l=i.map(I).lastIndexOf(!1);s<=l&&a.push([s,l+1]);let c=0;if(a.forEach((e=>{let[r,a]=e;const s=r+c,l=a+c;if(l-s>0&&i[s].text.startsWith(t)&&i[l-1].text.endsWith(n)){const e=i[s].serialize();e.text=e.text.slice(t.length),i[s]=o.deserializePart(e);const r=i[l-1].serialize(),a=r.text;r.text=a.substring(0,a.length-n.length),i[l-1]=o.deserializePart(r)}else i.splice(l,0,o.plain(n)),i.splice(s,0,o.plain(t)),c+=2})),e.wasInitializedEmpty()&&t===n){const r=e.text.startsWith(t)&&e.text.endsWith(n);!function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:r;const{model:o}=e,a=e.getLastStartingPosition(),s=a.offset-e.start.offset,l=e.length-s;if(n){if(s<r)return void x(e,t,-(e.length-2*i));if(l<i)return void x(e,t,0,!0)}o.transform((()=>{const n=Math.sign(e.replace(t)),s=l===i;return a.asOffset(o).add(n*r,s).asPosition(o)}))}(e,i,r,t.length)}else C(e,i)}var N=n(761),M=n(149),P=n(382),L=n(301),B=n(383),U=n(407);const j=/(^\/\w*)(?: .*)?/g;class G extends P.a{constructor(e,t){super({commandRegex:j,renderingType:t}),i()(this,"matcher",void 0),this.matcher=new L.a(U.c,{keys:["command","args","description"],funcs:[e=>{let{aliases:t}=e;return t.join(" ")}],context:t})}async getCompletions(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1;const{command:i,range:o}=this.getCurrentCommand(e,t);if(!i)return[];let a=[];if(i[0]!==i[1]){const e=i[1].slice(1);if(U.b.has(e)&&U.b.get(e).isEnabled()){if(U.b.get(e).hideCompletionAfterSpace)return[];a=[U.b.get(e)]}}else a="/"===e?U.c:this.matcher.match(i[1],r);return a.filter((e=>{const t=!e.renderingTypes||e.renderingTypes.includes(this.renderingType);return e.isEnabled()&&t})).map((e=>{let t=e.getCommand()+" ";const n=e.aliases.find((e=>`/${e}`===i[1]));return(n||e.getCommand()===i[1])&&(t=i[0]),{completion:t,type:"command",component:l.a.createElement(B.b,{title:`/${n||e.command}`,subtitle:e.args,description:Object(b.a)(e.description)}),range:o}}))}getName(){return"*️⃣ "+Object(b.a)("Commands")}renderCompletions(e){return l.a.createElement("div",{className:"mx_Autocomplete_Completion_container_pill",role:"presentation","aria-label":Object(b.a)("Command Autocomplete")},e)}}var z=n(122),H=n(168),q=n(162);const V=/\B#\S*/g;function $(e,t){return{room:e,matchName:arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",displayedAlias:t}}class K extends P.a{constructor(e,t){super({commandRegex:V,renderingType:t}),i()(this,"matcher",void 0),this.matcher=new L.a([],{keys:["displayedAlias","matchName"]})}getRooms(){return z.a.get().getVisibleRooms().filter((e=>!e.isSpaceRoom()))}async getCompletions(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1;const{command:i,range:o}=this.getCurrentCommand(e,t,n);if(i){let e=this.getRooms().reduce(((e,t)=>{if(t.getCanonicalAlias()&&(e=e.concat($(t,t.getCanonicalAlias(),t.name))),t.getAltAliases().length){const n=t.getAltAliases().map((e=>$(t,e)));e=e.concat(n)}return e}),[]);e=e.filter((t=>{const n=t.room.currentState.getStateEvents("m.room.tombstone","");if(n&&n.getContent()&&n.getContent().replacement_room){return!e.some((e=>e.room.roomId===n.getContent().replacement_room))}return!0})),this.matcher.setObjects(e);const t=i[0];let n=this.matcher.match(t,r);return n=Object(M.sortBy)(n,[e=>{return t=e.displayedAlias,n=e.room,t===n.getCanonicalAlias()?0:1;var t,n},e=>e.displayedAlias.length]),n=Object(M.uniqBy)(n,(e=>e.room)),n.map((e=>({completion:e.displayedAlias,completionId:e.room.roomId,type:"room",suffix:" ",href:Object(H.h)(e.displayedAlias),component:l.a.createElement(B.a,{title:e.room.name,description:e.displayedAlias},l.a.createElement(q.a,{width:24,height:24,room:e.room})),range:o}))).filter((e=>!!e.completion&&e.completion.length>0))}return[]}getName(){return Object(b.a)("Rooms")}renderCompletions(e){return l.a.createElement("div",{className:"mx_Autocomplete_Completion_container_pill mx_Autocomplete_Completion_container_truncate",role:"presentation","aria-label":Object(b.a)("Room Autocomplete")},e)}}var W=n(812),Y=n(125),Q=n(373),X=n(746),Z=n(146);const J=new RegExp("("+u.a.source+"|(?:^|\\s):[+-\\w]*:?)$","g"),ee=Q.b.sort(((e,t)=>e.group===t.group?e.order-t.order:e.group-t.group)).map(((e,t)=>({emoji:e,_orderBy:t})));function te(e,t){if(Array.isArray(t))return Math.min(...t.map((t=>te(e,t))));const n=t.indexOf(e);return-1===n?1/0:n}class ne extends P.a{constructor(e,t){super({commandRegex:J,renderingType:t}),i()(this,"matcher",void 0),i()(this,"nameMatcher",void 0),i()(this,"recentlyUsed",void 0),this.matcher=new L.a(ee,{keys:[],funcs:[e=>e.emoji.shortcodes.map((e=>`:${e}:`))],shouldMatchWordsOnly:!1}),this.nameMatcher=new L.a(ee,{keys:["emoji.label"],shouldMatchWordsOnly:!0}),this.recentlyUsed=Array.from(new Set(Object(Z.n)(X.b().map(Q.d))))}async getCompletions(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1;if(!Y.b.getValue("MessageComposerInput.suggestEmoji"))return[];let i=[];const{command:o,range:a}=this.getCurrentCommand(e,t);if(o&&o[0].length>2){const e=o[0];i=this.matcher.match(e,r),i=i.concat(this.nameMatcher.match(e));const t=[];t.push((t=>te(e,t.emoji.emoticon||""))),t.push((t=>te(e,t.emoji.shortcodes[0])));const n=e.replace(/^:(.*?):?$/,"$1");t.push((e=>Math.min(...e.emoji.shortcodes.map((e=>te(n,e)))))),e.length>1&&t.push((e=>e.emoji.shortcodes[0].length)),t.push((e=>e._orderBy)),i=Object(M.sortBy)(Object(M.uniq)(i),t),i=i.slice(0,20);const s=[];this.recentlyUsed.forEach((e=>{0===e.shortcodes[0].indexOf(n)&&s.push({emoji:e,_orderBy:0})}));for(let e=0;e<s.length;e++)if(s[e].emoji.shortcodes[0]===n){const t=s[e];for(let t=e;t>0;t--)s[t]=s[t-1];s[0]=t;break}return i=s.concat(i),i=Object(M.uniqBy)(i,"emoji"),i.map((e=>({completion:e.emoji.unicode,component:l.a.createElement(B.a,{title:`:${e.emoji.shortcodes[0]}:`,"aria-label":e.emoji.unicode},l.a.createElement("span",null,e.emoji.unicode)),range:a})))}return[]}getName(){return"😃 "+Object(b.a)("Emoji")}renderCompletions(e){return l.a.createElement("div",{className:"mx_Autocomplete_Completion_container_pill",role:"presentation","aria-label":Object(b.a)("Emoji Autocomplete")},e)}}const re=/@\S*/g;class ie extends P.a{constructor(e,t){super({commandRegex:re,renderingType:t}),this.room=e}async getCompletions(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=z.a.get();if(!this.room.currentState.mayTriggerNotifOfType("room",r.credentials.userId))return[];const{command:i,range:o}=this.getCurrentCommand(e,t,n);return null!=i&&i[0]&&i[0].length>1&&["@room","@channel","@everyone","@here"].some((e=>e.startsWith(i[0])))?[{completion:"@room",completionId:"@room",type:"at-room",suffix:" ",component:l.a.createElement(B.a,{title:"@room",description:Object(b.a)("Notify the whole room")},l.a.createElement(q.a,{width:24,height:24,room:this.room})),range:o}]:[]}getName(){return"❗️ "+Object(b.a)("Room Notification")}renderCompletions(e){return l.a.createElement("div",{className:"mx_Autocomplete_Completion_container_pill mx_Autocomplete_Completion_container_truncate",role:"presentation","aria-label":Object(b.a)("Notification Autocomplete")},e)}}var oe=n(390);var ae=n(138);const se=[W.a,K,ne,ie,G,class extends K{getRooms(){return z.a.get().getVisibleRooms().filter((e=>e.isSpaceRoom()))}getName(){return Object(b.a)("Spaces")}renderCompletions(e){return l.a.createElement("div",{className:"mx_Autocomplete_Completion_container_pill mx_Autocomplete_Completion_container_truncate",role:"listbox","aria-label":Object(b.a)("Space Autocomplete")},e)}}];class le{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ae.a.Room;i()(this,"room",void 0),i()(this,"providers",void 0),this.room=e,this.providers=se.map((n=>new n(e,t)))}destroy(){this.providers.forEach((e=>{e.destroy()}))}async getCompletions(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1;const i=await Promise.all(this.providers.map((async i=>Object(oe.b)(i.getCompletions(e,t,n,r),null,3e3))));return Object(Z.n)(i.map(((r,i)=>{if(r&&r.length)return{completions:r,provider:this.providers[i],command:this.providers[i].getCurrentCommand(e,t,n)}})))}}const ce=e=>`mx_Autocomplete_Completion_${e}`;class ue extends l.a.PureComponent{constructor(e){super(e),i()(this,"autocompleter",void 0),i()(this,"queryRequested",void 0),i()(this,"debounceCompletionsRequest",void 0),i()(this,"containerRef",Object(s.createRef)()),i()(this,"hide",(()=>{this.setState({hide:!0,selectionOffset:1,completions:[],completionList:[]})})),i()(this,"onConfirmCompletion",(()=>{this.onCompletionClicked(this.state.selectionOffset)})),i()(this,"onCompletionClicked",(e=>{const t=this.countCompletions();return!(0===t||e<1||e>t)&&(this.props.onConfirm(this.state.completionList[e-1]),this.hide(),!0)})),this.state={completions:[],completionList:[],selectionOffset:1,shouldShowCompletions:!0,hide:!1,forceComplete:!1}}componentDidMount(){this.autocompleter=new le(this.props.room,this.context.timelineRenderingType),this.applyNewProps()}applyNewProps(e,t){t&&this.props.room.roomId!==t.roomId&&(this.autocompleter.destroy(),this.autocompleter=new le(this.props.room)),e!==this.props.query&&this.complete(this.props.query,this.props.selection)}componentWillUnmount(){this.autocompleter.destroy()}complete(e,t){if(this.queryRequested=e,this.debounceCompletionsRequest&&clearTimeout(this.debounceCompletionsRequest),""===e)return this.setState({completions:[],completionList:[],selectionOffset:1,hide:!0}),Promise.resolve(null);let n=Y.b.getValue("autocompleteDelay");return(this.state.completions.length>0||this.state.forceComplete)&&(n=0),new Promise((r=>{this.debounceCompletionsRequest=window.setTimeout((()=>{r(this.processQuery(e,t))}),n)}))}processQuery(e,t){return this.autocompleter.getCompletions(e,t,this.state.forceComplete,20).then((t=>{e===this.queryRequested&&this.processCompletions(t)}))}processCompletions(e){const t=Object(M.flatMap)(e,(e=>e.completions));let n=1;if(t.length>0){const e=this.state.selectionOffset<=1?null:this.state.completionList[this.state.selectionOffset-1].completion;n=t.findIndex((t=>t.completion===e)),-1===n?n=1:n++}let r=!0;e.some((e=>!!e.command.command))&&(r=!1,this.props.onSelectionChange&&this.props.onSelectionChange(n-1)),this.setState({completions:e,completionList:t,selectionOffset:n,hide:r,forceComplete:!1})}hasSelection(){return this.countCompletions()>0&&0!==this.state.selectionOffset}countCompletions(){return this.state.completionList.length}moveSelection(e){const t=this.countCompletions();if(0===t)return;const n=(this.state.selectionOffset+e+t-1)%t;this.setSelection(1+n)}onEscape(e){0!==this.countCompletions()&&(e.preventDefault(),this.hide())}forceComplete(){return new Promise((e=>{this.setState({forceComplete:!0,hide:!1},(()=>{this.complete(this.props.query,this.props.selection).then((()=>{e(this.countCompletions())}))}))}))}setSelection(e){this.setState({selectionOffset:e,hide:!1}),this.props.onSelectionChange&&this.props.onSelectionChange(e-1)}componentDidUpdate(e){this.applyNewProps(e.query,e.room);const t=this.refs[`completion${this.state.selectionOffset}`];t?t.scrollIntoView({behavior:"auto",block:"nearest"}):this.containerRef.current&&this.containerRef.current.scrollTo({top:0})}render(){let e=1;const t=this.state.completions.map(((t,n)=>{const r=t.completions.map(((t,n)=>{const r=e===this.state.selectionOffset,i=a()("mx_Autocomplete_Completion",{selected:r}),o=e;e++;return l.a.cloneElement(t.component,{key:n,ref:`completion${o}`,id:ce(o-1),className:i,onClick:()=>{this.onCompletionClicked(o)},"aria-selected":r})}));return r.length>0?l.a.createElement("div",{key:n,className:"mx_Autocomplete_ProviderSection",role:"presentation"},l.a.createElement("div",{className:"mx_Autocomplete_provider_name"},t.provider.getName()),t.provider.renderCompletions(r)):null})).filter((e=>!!e));return!this.state.hide&&t.length>0?l.a.createElement("div",{id:"mx_Autocomplete",className:"mx_Autocomplete",ref:this.containerRef,role:"listbox"},t):null}}i()(ue,"contextType",ae.b);var de=n(205),he=n(152),pe=n(142),me=n(368),ge=n(154);const fe=new RegExp("(?:^|\\s)("+u.a.source+")\\s|:^$"),_e=new RegExp("(?:^|\\s)("+u.a.source+")$"),be=['"',"_","`","'","*","~","$"],ve=new Map([["(",")"],["[","]"],["{","}"],["<",">"]]);function ye(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(de.a?"⌘":Object(b.a)(pe.a[de.b.CONTROL]))+(t?"+"+Object(b.a)(pe.a[de.b.SHIFT]):"")+(n?"+"+Object(b.a)(pe.a[de.b.ALT]):"")+"+"+e}function Ee(e){return{anchorNode:e.anchorNode,anchorOffset:e.anchorOffset,focusNode:e.focusNode,focusOffset:e.focusOffset,isCollapsed:e.isCollapsed,rangeCount:e.rangeCount,type:e.type}}class Se extends l.a.Component{constructor(e){super(e),i()(this,"editorRef",Object(s.createRef)()),i()(this,"autocompleteRef",Object(s.createRef)()),i()(this,"formatBarRef",Object(s.createRef)()),i()(this,"modifiedFlag",!1),i()(this,"isIMEComposing",!1),i()(this,"hasTextSelected",!1),i()(this,"_isCaretAtEnd",void 0),i()(this,"lastCaret",void 0),i()(this,"lastSelection",void 0),i()(this,"useMarkdownHandle",void 0),i()(this,"emoticonSettingHandle",void 0),i()(this,"shouldShowPillAvatarSettingHandle",void 0),i()(this,"surroundWithHandle",void 0),i()(this,"historyManager",new h),i()(this,"updateEditorState",((e,t,n)=>{if(Object(p.e)(this.editorRef.current,this.props.model),e){try{f(this.editorRef.current,this.props.model,e)}catch(e){d.a.error(e)}const t=e instanceof m.a?e.end:e;this.setLastCaretFromPosition(t)}const{isEmpty:r}=this.props.model;this.props.placeholder&&(r?this.showPlaceholder():this.hidePlaceholder()),r&&this.formatBarRef.current.hide(),this.setState({autoComplete:this.props.model.autoComplete,showVisualBell:!n&&this.state.showVisualBell}),this.historyManager.tryPush(this.props.model,e,t,n);let i=!this.props.model.isEmpty&&!!t;if(i&&"command"===this.props.model.parts[0].type){const{cmd:e}=Object(U.e)(this.props.model.parts[0].text),t=U.b.get(e);t&&t.isEnabled()&&t.category===U.a.messages||(i=!1)}ge.b.instance.typingStore.setSelfTyping(this.props.room.roomId,this.props.threadId,i),this.props.onChange&&this.props.onChange()})),i()(this,"onCompositionStart",(()=>{this.isIMEComposing=!0,this.hidePlaceholder()})),i()(this,"onCompositionEnd",(()=>{this.isIMEComposing=!1;const e=navigator.userAgent.toLowerCase();e.includes("safari/")&&!e.includes("chrome/")?this.onInput({inputType:"insertCompositionText"}):Promise.resolve().then((()=>{this.onInput({inputType:"insertCompositionText"})}))})),i()(this,"onCutCopy",((e,t)=>{const n=document.getSelection(),r=n.toString();if(r){const{model:i}=this.props,o=Object(N.b)(this.editorRef.current,i,n),a=o.parts.map((e=>e.serialize()));e.clipboardData.setData("application/x-element-composer",JSON.stringify(a)),e.clipboardData.setData("text/plain",r),"cut"===t&&(this.modifiedFlag=!0,x(o,[])),e.preventDefault()}})),i()(this,"onCopy",(e=>{this.onCutCopy(e,"copy")})),i()(this,"onCut",(e=>{this.onCutCopy(e,"cut")})),i()(this,"onPaste",(e=>{var t,n;if(e.preventDefault(),null!==(t=(n=this.props).onPaste)&&void 0!==t&&t.call(n,e,this.props.model))return!0;const{model:r}=this.props,{partCreator:i}=r,o=e.clipboardData.getData("text/plain"),a=e.clipboardData.getData("application/x-element-composer");let s;if(a){s=JSON.parse(a).map((e=>i.deserializePart(e)))}else s=Object(w.c)(o,i,{shouldEscape:!1});this.modifiedFlag=!0;const l=Object(N.b)(this.editorRef.current,r,document.getSelection());o&&l.length>0&&me.d.test(o)&&!me.d.test(l.text)?O(l,o):x(l,s)})),i()(this,"onInput",(e=>{if(this.isIMEComposing)return;this.modifiedFlag=!0;const t=document.getSelection(),{caret:n,text:r}=Object(N.a)(this.editorRef.current,t);this.props.model.update(r,e.inputType,n)})),i()(this,"onBlur",(()=>{document.removeEventListener("selectionchange",this.onSelectionChange)})),i()(this,"onFocus",(()=>{document.addEventListener("selectionchange",this.onSelectionChange),this.lastSelection=null,this.refreshLastCaretIfNeeded()})),i()(this,"onSelectionChange",(()=>{const{isEmpty:e}=this.props.model;this.refreshLastCaretIfNeeded();const t=document.getSelection();var n;if(this.hasTextSelected&&t.isCollapsed)this.hasTextSelected=!1,null===(n=this.formatBarRef.current)||void 0===n||n.hide();else if(!t.isCollapsed&&!e){this.hasTextSelected=!0;const e=Object(N.b)(this.editorRef.current,this.props.model,t);if(this.formatBarRef.current&&this.state.useMarkdown&&e.text.trim()){const e=t.getRangeAt(0).getBoundingClientRect();this.formatBarRef.current.showAt(e)}}})),i()(this,"onKeyDown",(e=>{var t;const n=this.props.model;let r=!1;if(this.state.surroundWith&&"Caret"!==document.getSelection().type){const t=Object(N.b)(this.editorRef.current,this.props.model,document.getSelection());t.trim(),[...ve.keys(),...be].includes(e.key)&&(this.historyManager.ensureLastChangesPushed(this.props.model),this.modifiedFlag=!0,R(t,e.key,ve.get(e.key)),r=!0)}const i=Object(he.a)().getAutocompleteAction(e),o=Object(he.a)().getAccessibilityAction(e);if(null!==(t=n.autoComplete)&&void 0!==t&&t.hasCompletions()){const t=n.autoComplete;switch(i){case pe.h.ForceCompleteAutocomplete:case pe.h.CompleteAutocomplete:this.historyManager.ensureLastChangesPushed(this.props.model),this.modifiedFlag=!0,t.confirmCompletion(),r=!0;break;case pe.h.PrevSelectionInAutocomplete:t.selectPreviousSelection(),r=!0;break;case pe.h.NextSelectionInAutocomplete:t.selectNextSelection(),r=!0;break;case pe.h.CancelAutocomplete:t.onEscape(e),r=!0;break;default:return}}else i!==pe.h.ForceCompleteAutocomplete||this.state.showVisualBell?[pe.h.Delete,pe.h.Backspace].includes(o)&&this.formatBarRef.current.hide():(this.tabCompleteName(),r=!0);if(r)return e.preventDefault(),void e.stopPropagation();switch(Object(he.a)().getMessageComposerAction(e)){case pe.h.FormatBold:this.onFormatAction(y.Bold),r=!0;break;case pe.h.FormatItalics:this.onFormatAction(y.Italics),r=!0;break;case pe.h.FormatCode:this.onFormatAction(y.Code),r=!0;break;case pe.h.FormatQuote:this.onFormatAction(y.Quote),r=!0;break;case pe.h.FormatLink:this.onFormatAction(y.InsertLink),r=!0;break;case pe.h.EditRedo:if(this.historyManager.canRedo()){const{parts:e,caret:t}=this.historyManager.redo();n.reset(e,t,"historyRedo")}r=!0;break;case pe.h.EditUndo:if(this.historyManager.canUndo()){const{parts:e,caret:t}=this.historyManager.undo(this.props.model);n.reset(e,t,"historyUndo")}r=!0;break;case pe.h.NewLine:this.insertText("\n"),r=!0;break;case pe.h.MoveCursorToStart:f(this.editorRef.current,n,{index:0,offset:0}),r=!0;break;case pe.h.MoveCursorToEnd:f(this.editorRef.current,n,{index:n.parts.length-1,offset:n.parts[n.parts.length-1].text.length}),r=!0}r&&(e.preventDefault(),e.stopPropagation())})),i()(this,"onAutoCompleteConfirm",(e=>{this.modifiedFlag=!0,this.props.model.autoComplete.onComponentConfirm(e)})),i()(this,"onAutoCompleteSelectionChange",(e=>{this.modifiedFlag=!0,this.setState({completionIndex:e})})),i()(this,"configureUseMarkdown",(()=>{const e=Y.b.getValue("MessageComposerInput.useMarkdown");this.setState({useMarkdown:e}),!e&&this.formatBarRef.current&&this.formatBarRef.current.hide()})),i()(this,"configureEmoticonAutoReplace",(()=>{this.props.model.setTransformCallback(this.transform)})),i()(this,"configureShouldShowPillAvatar",(()=>{const e=Y.b.getValue("Pill.shouldShowPillAvatar");this.setState({showPillAvatar:e})})),i()(this,"surroundWithSettingChanged",(()=>{const e=Y.b.getValue("MessageComposerInput.surroundWith");this.setState({surroundWith:e})})),i()(this,"transform",(e=>{Y.b.getValue("MessageComposerInput.autoReplaceEmoji")&&this.replaceEmoticon(e,fe)})),i()(this,"onFormatAction",(e=>{if(!this.state.useMarkdown)return;const t=Object(N.b)(this.editorRef.current,this.props.model,document.getSelection());this.historyManager.ensureLastChangesPushed(this.props.model),this.modifiedFlag=!0,T(t,e)})),this.state={showPillAvatar:Y.b.getValue("Pill.shouldShowPillAvatar"),useMarkdown:Y.b.getValue("MessageComposerInput.useMarkdown"),surroundWith:Y.b.getValue("MessageComposerInput.surroundWith"),showVisualBell:!1},this.useMarkdownHandle=Y.b.watchSetting("MessageComposerInput.useMarkdown",null,this.configureUseMarkdown),this.emoticonSettingHandle=Y.b.watchSetting("MessageComposerInput.autoReplaceEmoji",null,this.configureEmoticonAutoReplace),this.configureEmoticonAutoReplace(),this.shouldShowPillAvatarSettingHandle=Y.b.watchSetting("Pill.shouldShowPillAvatar",null,this.configureShouldShowPillAvatar),this.surroundWithHandle=Y.b.watchSetting("MessageComposerInput.surroundWith",null,this.surroundWithSettingChanged)}componentDidUpdate(e){const t=this.props.disabled!==e.disabled,n=this.props.placeholder!==e.placeholder;if(this.props.placeholder&&(n||t)){const{isEmpty:e}=this.props.model;e?this.showPlaceholder():this.hidePlaceholder()}}replaceEmoticon(e,t){const{model:n}=this.props,r=n.startRange(e);let i=9;r.expandBackwardsWhile(((e,t)=>{const r=n.parts[e];return i-=1,i>=0&&[g.b.Plain,g.b.PillCandidate,g.b.Newline].includes(r.type)}));const o=t.exec(r.text);if(o&&(i>=0||0!==o.index)){const e=o[1].replace("-",""),t=Q.c.get(e)||Q.c.get(e.toLowerCase());if(t){const{partCreator:e}=n,i=o[0],a=" "===i[0]?1:0;return r.moveStartForwards(o.index+a),["\n"," "].includes(i[i.length-1])&&r.moveEndBackwards(1),r.replace([e.emoji(t.unicode)])}}}showPlaceholder(){const e=this.props.placeholder.replace(/'/g,"\\'");this.editorRef.current.style.setProperty("--placeholder",`'${e}'`),this.editorRef.current.classList.add("mx_BasicMessageComposer_inputEmpty")}hidePlaceholder(){this.editorRef.current.classList.remove("mx_BasicMessageComposer_inputEmpty"),this.editorRef.current.style.removeProperty("--placeholder")}isComposing(e){return!!(this.isIMEComposing||e.nativeEvent&&e.nativeEvent.isComposing)}insertText(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"insertText";const n=document.getSelection(),{caret:r,text:i}=Object(N.a)(this.editorRef.current,n),o=i.slice(0,r.offset)+e+i.slice(r.offset);r.offset+=e.length,this.modifiedFlag=!0,this.props.model.update(o,t,r)}setLastCaretFromPosition(e){const{model:t}=this.props;this._isCaretAtEnd=e.isAtEnd(t),this.lastCaret=e.asOffset(t),this.lastSelection=Ee(document.getSelection())}refreshLastCaretIfNeeded(){if(!this.editorRef.current)return;const e=document.getSelection();if(!this.lastSelection||(t=this.lastSelection,n=e,t.anchorNode!==n.anchorNode||t.anchorOffset!==n.anchorOffset||t.focusNode!==n.focusNode||t.focusOffset!==n.focusOffset||t.isCollapsed!==n.isCollapsed||t.rangeCount!==n.rangeCount||t.type!==n.type)){this.lastSelection=Ee(e);const{caret:t,text:n}=Object(N.a)(this.editorRef.current,e);this.lastCaret=t,this._isCaretAtEnd=t.offset===n.length}var t,n;return this.lastCaret}clearUndoHistory(){this.historyManager.clear()}getCaret(){return this.lastCaret}isSelectionCollapsed(){return!this.lastSelection||this.lastSelection.isCollapsed}isCaretAtStart(){return 0===this.getCaret().offset}isCaretAtEnd(){return this._isCaretAtEnd}async tabCompleteName(){try{await new Promise((e=>this.setState({showVisualBell:!1},e)));const{model:e}=this.props,t=this.getCaret(),n=e.positionForOffset(t.offset,t.atNodeEnd),r=e.startRange(n);r.expandBackwardsWhile(((e,t,n)=>" "!==n.text[t]&&"+"!==n.text[t]&&(n.type===g.b.Plain||n.type===g.b.PillCandidate||n.type===g.b.Command)));const{partCreator:i}=e;await e.transform((()=>{const n=r.replace([i.pillCandidate(r.text)]);return e.positionForOffset(t.offset+n,!0)})),e.autoComplete?(await e.autoComplete.startSelection(),e.autoComplete.hasSelection()||(this.setState({showVisualBell:!0}),e.autoComplete.close())):this.setState({showVisualBell:!0})}catch(e){d.a.error(e)}}isModified(){return this.modifiedFlag}componentWillUnmount(){document.removeEventListener("selectionchange",this.onSelectionChange),this.editorRef.current.removeEventListener("input",this.onInput,!0),this.editorRef.current.removeEventListener("compositionstart",this.onCompositionStart,!0),this.editorRef.current.removeEventListener("compositionend",this.onCompositionEnd,!0),Y.b.unwatchSetting(this.useMarkdownHandle),Y.b.unwatchSetting(this.emoticonSettingHandle),Y.b.unwatchSetting(this.shouldShowPillAvatarSettingHandle),Y.b.unwatchSetting(this.surroundWithHandle)}componentDidMount(){const e=this.props.model;e.setUpdateCallback(this.updateEditorState);e.partCreator.setAutoCompleteCreator(Object(g.c)((()=>this.autocompleteRef.current),(e=>new Promise((t=>this.setState({query:e},t)))))),this.updateEditorState(this.getInitialCaretPosition()),this.editorRef.current.addEventListener("input",this.onInput,!0),this.editorRef.current.addEventListener("compositionstart",this.onCompositionStart,!0),this.editorRef.current.addEventListener("compositionend",this.onCompositionEnd,!0),this.editorRef.current.focus()}getInitialCaretPosition(){let e;if(this.props.initialCaret){const t=this.props.initialCaret;e=this.props.model.positionForOffset(t.offset,t.atNodeEnd)}else e=this.props.model.getPositionAtEnd();return e}render(){let e;if(this.state.autoComplete){const t=this.state.query,n=t.length;e=l.a.createElement("div",{className:"mx_BasicMessageComposer_AutoCompleteWrapper"},l.a.createElement(ue,{ref:this.autocompleteRef,query:t,onConfirm:this.onAutoCompleteConfirm,onSelectionChange:this.onAutoCompleteSelectionChange,selection:{beginning:!0,end:n,start:n},room:this.props.room}))}const t=a()("mx_BasicMessageComposer",{mx_BasicMessageComposer_input_error:this.state.showVisualBell}),n=a()("mx_BasicMessageComposer_input",{mx_BasicMessageComposer_input_shouldShowPillAvatar:this.state.showPillAvatar,mx_BasicMessageComposer_input_disabled:this.props.disabled}),r={[y.Bold]:ye("B"),[y.Italics]:ye("I"),[y.Code]:ye("E"),[y.Quote]:ye(">",!0),[y.InsertLink]:ye("L",!0)},{completionIndex:i}=this.state,o=Boolean(this.state.autoComplete);let s;return o&&i>=0&&(s=ce(i)),l.a.createElement("div",{className:t},e,l.a.createElement(E,{ref:this.formatBarRef,onAction:this.onFormatAction,shortcuts:r}),l.a.createElement("div",{className:n,contentEditable:!this.props.disabled||null,tabIndex:0,onBlur:this.onBlur,onFocus:this.onFocus,onCopy:this.onCopy,onCut:this.onCut,onPaste:this.onPaste,onKeyDown:this.onKeyDown,ref:this.editorRef,"aria-label":this.props.label,role:"textbox","aria-multiline":"true","aria-autocomplete":"list","aria-haspopup":"listbox","aria-expanded":!!o||void 0,"aria-owns":o?"mx_Autocomplete":void 0,"aria-activedescendant":s,dir:"auto","aria-disabled":this.props.disabled,"data-testid":"basicmessagecomposer"}))}focus(){this.editorRef.current.focus()}insertMention(e){this.modifiedFlag=!0;const{model:t}=this.props,{partCreator:n}=t,r=this.props.room.getMember(e),i=r?r.rawDisplayName:e,o=this.getCaret(),a=t.positionForOffset(o.offset,o.atNodeEnd),s=n.createMentionParts(0===o.offset,i,e);t.transform((()=>{const e=t.insert(s,a);return t.positionForOffset(o.offset+e,!0)})),this.focus()}insertQuotedMessage(e){this.modifiedFlag=!0;const{model:t}=this.props,{partCreator:n}=t,r=Object(w.b)(e,n,{isQuotedMessage:!0});r.push(n.newline()),r.push(n.newline()),t.transform((()=>{const e=t.insert(r,t.positionForOffset(0));return t.positionForOffset(e,!0)})),this.focus()}insertPlaintext(e){this.modifiedFlag=!0;const{model:t}=this.props,{partCreator:n}=t,r=this.getCaret(),i=t.positionForOffset(r.offset,r.atNodeEnd);t.transform((()=>{const o=t.insert(n.plainWithEmoji(e),i);return t.positionForOffset(r.offset+o,!0)}))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return A})),n.d(t,"c",(function(){return R})),n.d(t,"b",(function(){return N}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(121),l=n(746),c=n(373),u=n(212),d=n(126),h=n.n(d),p=n(152),m=n(142);class g extends a.a.PureComponent{constructor(){super(...arguments),i()(this,"onKeyDown",(e=>{let t=!0;switch(Object(p.a)().getAccessibilityAction(e)){case m.h.ArrowLeft:this.changeCategoryRelative(-1);break;case m.h.ArrowRight:this.changeCategoryRelative(1);break;case m.h.Home:this.changeCategoryAbsolute(0);break;case m.h.End:this.changeCategoryAbsolute(this.props.categories.length-1,-1);break;default:t=!1}t&&(e.preventDefault(),e.stopPropagation())}))}findNearestEnabled(e,t){e+=this.props.categories.length;const n=[...this.props.categories,...this.props.categories,...this.props.categories];for(;e<n.length&&e>=0;){if(n[e].enabled)return e%this.props.categories.length;e+=t>0?1:-1}}changeCategoryRelative(e){const t=this.props.categories.findIndex((e=>e.visible));this.changeCategoryAbsolute(t+e,e)}changeCategoryAbsolute(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=this.props.categories[this.findNearestEnabled(e,t)];n&&(this.props.onAnchorClick(n.id),n.ref.current.focus())}render(){return a.a.createElement("nav",{className:"mx_EmojiPicker_header",role:"tablist","aria-label":Object(s.a)("Categories"),onKeyDown:this.onKeyDown},this.props.categories.map((e=>{const t=h()(`mx_EmojiPicker_anchor mx_EmojiPicker_anchor_${e.id}`,{mx_EmojiPicker_anchor_visible:e.visible});return a.a.createElement("button",{disabled:!e.enabled,key:e.id,ref:e.ref,className:t,onClick:()=>this.props.onAnchorClick(e.id),title:e.name,role:"tab",tabIndex:e.visible?0:-1,"aria-selected":e.visible,"aria-controls":`mx_EmojiPicker_category_${e.id}`})})))}}var f=g;class _ extends a.a.PureComponent{constructor(){super(...arguments),i()(this,"inputRef",a.a.createRef()),i()(this,"onKeyDown",(e=>{if(Object(p.a)().getAccessibilityAction(e)===m.h.Enter)this.props.onEnter(),e.stopPropagation(),e.preventDefault()}))}componentDidMount(){window.setTimeout((()=>{var e;return null===(e=this.inputRef.current)||void 0===e?void 0:e.focus()}),0)}render(){let e;return e=this.props.query?a.a.createElement("button",{onClick:()=>this.props.onChange(""),className:"mx_EmojiPicker_search_icon mx_EmojiPicker_search_clear",title:Object(s.a)("Cancel search")}):a.a.createElement("span",{className:"mx_EmojiPicker_search_icon"}),a.a.createElement("div",{className:"mx_EmojiPicker_search"},a.a.createElement("input",{autoFocus:!0,type:"text",placeholder:Object(s.a)("Search"),value:this.props.query,onChange:e=>this.props.onChange(e.target.value),onKeyDown:this.onKeyDown,ref:this.inputRef}),e)}}var b=_;class v extends a.a.PureComponent{render(){const{unicode:e,label:t,shortcodes:[n]}=this.props.emoji;return a.a.createElement("div",{className:"mx_EmojiPicker_footer mx_EmojiPicker_preview"},a.a.createElement("div",{className:"mx_EmojiPicker_preview_emoji"},e),a.a.createElement("div",{className:"mx_EmojiPicker_preview_text"},a.a.createElement("div",{className:"mx_EmojiPicker_name mx_EmojiPicker_preview_name"},t),a.a.createElement("div",{className:"mx_EmojiPicker_shortcode"},n)))}}var y=v,E=n(150);class S extends a.a.PureComponent{render(){const{onClick:e,onMouseEnter:t,onMouseLeave:n,emoji:r,selectedEmojis:i}=this.props,o=i&&i.has(r.unicode);return a.a.createElement(E.d,{element:"li",onClick:()=>e(r),onMouseEnter:()=>t(r),onMouseLeave:()=>n(r),className:"mx_EmojiPicker_item_wrapper",label:r.unicode,disabled:this.props.disabled},a.a.createElement("div",{className:"mx_EmojiPicker_item "+(o?"mx_EmojiPicker_item_selected":"")},r.unicode))}}var w=S;const T=["👍","👎","😄","🎉","😕","❤️","🚀","👀"].map((e=>{const t=Object(c.d)(e);if(!t)throw new Error(`Emoji ${e} doesn't exist in emojibase`);return t}));class C extends a.a.Component{constructor(e){super(e),i()(this,"onMouseEnter",(e=>{this.setState({hover:e})})),i()(this,"onMouseLeave",(()=>{this.setState({hover:void 0})})),this.state={}}render(){return a.a.createElement("section",{className:"mx_EmojiPicker_footer mx_EmojiPicker_quick mx_EmojiPicker_category"},a.a.createElement("h2",{className:"mx_EmojiPicker_quick_header mx_EmojiPicker_category_label"},this.state.hover?a.a.createElement(a.a.Fragment,null,a.a.createElement("span",{className:"mx_EmojiPicker_name"},this.state.hover.label),a.a.createElement("span",{className:"mx_EmojiPicker_shortcode"},this.state.hover.shortcodes[0])):Object(s.a)("Quick Reactions")),a.a.createElement("ul",{className:"mx_EmojiPicker_list","aria-label":Object(s.a)("Quick Reactions")},T.map((e=>a.a.createElement(w,{key:e.hexcode,emoji:e,onClick:this.props.onClick,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,selectedEmojis:this.props.selectedEmojis})))))}}var x=C,F=n(747);class D extends a.a.PureComponent{constructor(){super(...arguments),i()(this,"renderEmojiRow",(e=>{const{onClick:t,onMouseEnter:n,onMouseLeave:r,selectedEmojis:i,emojis:o}=this.props,s=o.slice(8*e,8*(e+1));return a.a.createElement("div",{key:e},s.map((e=>{var o,s;return a.a.createElement(w,{key:e.hexcode,emoji:e,selectedEmojis:i,onClick:t,onMouseEnter:n,onMouseLeave:r,disabled:null===(o=(s=this.props).isEmojiDisabled)||void 0===o?void 0:o.call(s,e.unicode)})})))}))}render(){const{emojis:e,name:t,heightBefore:n,viewportHeight:r,scrollTop:i}=this.props;if(!e||0===e.length)return null;const o=new Array(Math.ceil(e.length/N));for(let e=0;e<o.length;++e)o[e]=e;const s=i,l=s+r,c=n+A,u=c+o.length*R,d=Math.max(s,c),h=Math.min(l,u),p=Math.max(0,h-d),m=Math.max(0,i-c);return a.a.createElement("section",{id:`mx_EmojiPicker_category_${this.props.id}`,className:"mx_EmojiPicker_category","data-category-id":this.props.id,role:"tabpanel","aria-label":t},a.a.createElement("h2",{className:"mx_EmojiPicker_category_label"},t),a.a.createElement(F.a,{element:"ul",className:"mx_EmojiPicker_list",itemHeight:R,items:o,scrollTop:m,height:p,overflowItems:3,overflowMargin:0,renderItem:this.renderEmojiRow}))}}var k=D,O=n(146);function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const A=20,R=35,N=8;class M extends a.a.Component{constructor(e){super(e),i()(this,"recentlyUsed",void 0),i()(this,"memoizedDataByCategory",void 0),i()(this,"categories",void 0),i()(this,"scrollRef",a.a.createRef()),i()(this,"onScroll",(()=>{var e;const t=null===(e=this.scrollRef.current)||void 0===e?void 0:e.containerRef.current;this.setState({scrollTop:t.scrollTop,viewportHeight:t.clientHeight}),this.updateVisibility()})),i()(this,"updateVisibility",(()=>{var e;const t=null===(e=this.scrollRef.current)||void 0===e?void 0:e.containerRef.current,n=t.getBoundingClientRect();for(const e of this.categories){const r=t.querySelector(`[data-category-id="${e.id}"]`);if(!r){e.visible=!1,e.ref.current.classList.remove("mx_EmojiPicker_anchor_visible");continue}const i=r.getBoundingClientRect(),o=i.y-n.y,a=i.y+i.height-n.y;e.visible=o<n.height&&a>0,e.visible?(e.ref.current.classList.add("mx_EmojiPicker_anchor_visible"),e.ref.current.setAttribute("aria-selected","true"),e.ref.current.setAttribute("tabindex","0")):(e.ref.current.classList.remove("mx_EmojiPicker_anchor_visible"),e.ref.current.setAttribute("aria-selected","false"),e.ref.current.setAttribute("tabindex","-1"))}})),i()(this,"scrollToCategory",(e=>{var t,n;null===(t=this.scrollRef.current)||void 0===t||null===(n=t.containerRef.current)||void 0===n||n.querySelector(`[data-category-id="${e}"]`).scrollIntoView()})),i()(this,"onChangeFilter",(e=>{const t=e.toLowerCase().trim();for(const e of this.categories){let n;n=t.includes(this.state.filter)?this.memoizedDataByCategory[e.id]:"recent"===e.id?this.recentlyUsed:c.a[e.id],n=n.filter((e=>this.emojiMatchesFilter(e,t))),n=n.sort(((e,n)=>{const r=e.shortcodes[0].indexOf(t),i=n.shortcodes[0].indexOf(t);return-1==r||-1==i?i-r:0==r&&0==i?e.shortcodes[0].length-n.shortcodes[0].length:r-i})),this.memoizedDataByCategory[e.id]=n,e.enabled=n.length>0,e.ref.current&&(e.ref.current.disabled=!e.enabled)}this.setState({filter:e}),window.setTimeout(this.updateVisibility,0)})),i()(this,"emojiMatchesFilter",((e,t)=>{var n;return e.label.toLowerCase().includes(t)||(Array.isArray(e.emoticon)?e.emoticon.some((e=>e.includes(t))):null===(n=e.emoticon)||void 0===n?void 0:n.includes(t))||e.shortcodes.some((e=>e.toLowerCase().includes(t)))||e.unicode.split("").includes(t)})),i()(this,"onEnterFilter",(()=>{var e,t;const n=null===(e=this.scrollRef.current)||void 0===e||null===(t=e.containerRef.current)||void 0===t?void 0:t.querySelector(".mx_EmojiPicker_item");n&&n.click()})),i()(this,"onHoverEmoji",(e=>{this.setState({previewEmoji:e})})),i()(this,"onHoverEmojiEnd",(()=>{this.setState({previewEmoji:void 0})})),i()(this,"onClickEmoji",(e=>{!1!==this.props.onChoose(e.unicode)&&l.a(e.unicode)})),this.state={filter:"",scrollTop:0,viewportHeight:280},this.recentlyUsed=Array.from(new Set(Object(O.n)(l.b().map(c.d)))),this.memoizedDataByCategory=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({recent:this.recentlyUsed},c.a),this.categories=[{id:"recent",name:Object(s.a)("Frequently Used"),enabled:this.recentlyUsed.length>0,visible:this.recentlyUsed.length>0,ref:a.a.createRef()},{id:"people",name:Object(s.a)("Smileys & People"),enabled:!0,visible:!0,ref:a.a.createRef()},{id:"nature",name:Object(s.a)("Animals & Nature"),enabled:!0,visible:!1,ref:a.a.createRef()},{id:"foods",name:Object(s.a)("Food & Drink"),enabled:!0,visible:!1,ref:a.a.createRef()},{id:"activity",name:Object(s.a)("Activities"),enabled:!0,visible:!1,ref:a.a.createRef()},{id:"places",name:Object(s.a)("Travel & Places"),enabled:!0,visible:!1,ref:a.a.createRef()},{id:"objects",name:Object(s.a)("Objects"),enabled:!0,visible:!1,ref:a.a.createRef()},{id:"symbols",name:Object(s.a)("Symbols"),enabled:!0,visible:!1,ref:a.a.createRef()},{id:"flags",name:Object(s.a)("Flags"),enabled:!0,visible:!1,ref:a.a.createRef()}]}static categoryHeightForEmojiCount(e){return 0===e?0:A+Math.ceil(e/N)*R}render(){let e=0;return a.a.createElement("div",{className:"mx_EmojiPicker","data-testid":"mx_EmojiPicker"},a.a.createElement(f,{categories:this.categories,onAnchorClick:this.scrollToCategory}),a.a.createElement(b,{query:this.state.filter,onChange:this.onChangeFilter,onEnter:this.onEnterFilter}),a.a.createElement(u.a,{className:"mx_EmojiPicker_body",ref:this.scrollRef,onScroll:this.onScroll},this.categories.map((t=>{const n=this.memoizedDataByCategory[t.id],r=a.a.createElement(k,{key:t.id,id:t.id,name:t.name,heightBefore:e,viewportHeight:this.state.viewportHeight,scrollTop:this.state.scrollTop,emojis:n,onClick:this.onClickEmoji,onMouseEnter:this.onHoverEmoji,onMouseLeave:this.onHoverEmojiEnd,isEmojiDisabled:this.props.isEmojiDisabled,selectedEmojis:this.props.selectedEmojis}),i=M.categoryHeightForEmojiCount(n.length);return e+=i,r}))),this.state.previewEmoji||!this.props.showQuickReactions?a.a.createElement(y,{emoji:this.state.previewEmoji}):a.a.createElement(x,{onClick:this.onClickEmoji,selectedEmojis:this.props.selectedEmojis}))}}t.d=M},function(e,t,n){"use strict";n.d(t,"a",(function(){return q}));var r,i=n(13),o=n.n(i),a=n(120),s=n.n(a),l=n(129),c=n(151),u=n(1),d=n(149),h=n(16),p=n(121),m=n(122),g=n(123),f=n(127),_=n(144),b=n(615),v=n(341),y=n(125),E=n(192),S=n(203),w=n(131),T=n(812),C=n(130),x=n.n(C),F=n(126),D=n.n(F),k=n(205),O=n(846);function I(){return I=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},I.apply(this,arguments)}function A(e){return a.createElement("svg",I({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18",role:"presentation","aria-hidden":!0},e),r||(r=a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.133 8.067a4.067 4.067 0 11-8.133 0 4.067 4.067 0 018.133 0zM13 11.599a6.067 6.067 0 10-1.4 1.4c.028.038.06.074.094.108l2.6 2.6a1 1 0 101.414-1.414l-2.6-2.6a1.005 1.005 0 00-.108-.094z"})))}var R=n(564);const N=e=>{var t;let{provider:n,renderSuggestion:r,renderSelection:i,maxSuggestions:o=5,placeholder:l,onSelectionChange:c,selection:u,additionalFilter:d}=e;const[h,p]=Object(a.useState)(""),[m,g]=Object(a.useState)([]),[f,_]=Object(R.a)(),b=Object(a.useRef)(null),v=Object(a.useRef)(null),y=()=>{var e;null==v||null===(e=v.current)||void 0===e||e.focus()},E=e=>{const t=[...u],n=u.findIndex((t=>t.completionId===e.completionId));n>=0?t.splice(n,1):t.push(e),c(t),y()},S=e=>{const t=[...u],n=u.findIndex((t=>t.completionId===e.completionId));n>=0&&(t.splice(n,1),c(t))};return s.a.createElement("div",{className:"mx_AutocompleteInput"},s.a.createElement("div",{ref:b,className:D()({mx_AutocompleteInput_editor:!0,"mx_AutocompleteInput_editor--focused":f,"mx_AutocompleteInput_editor--has-suggestions":m.length>0}),onClick:()=>{y()},"data-testid":"autocomplete-editor"},s.a.createElement(A,{className:"mx_AutocompleteInput_search_icon",width:16,height:16}),u.map((e=>s.a.createElement(M,{key:e.completionId,item:e,onClick:S,render:i}))),s.a.createElement("input",x()({ref:v,type:"text",onKeyDown:e=>{const t=e.ctrlKey||e.shiftKey||e.metaKey;!h&&u.length>0&&e.key===k.b.BACKSPACE&&!t&&S(u[u.length-1])},onChange:async e=>{const t=e.target.value.trim();p(t);let r=await n.getCompletions(h,{start:h.length,end:h.length},!0,o);d&&(r=r.filter(d)),g(r)},value:h,autoComplete:"off",placeholder:0===u.length&&0===h.length?l:void 0,"data-testid":"autocomplete-input"},_))),f&&m.length?s.a.createElement("div",{className:"mx_AutocompleteInput_matches",style:{top:null===(t=b.current)||void 0===t?void 0:t.clientHeight},"data-testid":"autocomplete-matches"},m.map((e=>s.a.createElement(P,{key:e.completionId,item:e,selection:u,onClick:E,render:r})))):null)},M=e=>{let{item:t,onClick:n,render:r}=e;const i=e=>s.a.createElement("span",{className:"mx_AutocompleteInput_editor_selection","data-testid":`autocomplete-selection-item-${t.completionId}`},s.a.createElement("span",{className:"mx_AutocompleteInput_editor_selection_pill"},e),s.a.createElement(g.a,{className:"mx_AutocompleteInput_editor_selection_remove_button",onClick:()=>n(t),"data-testid":`autocomplete-selection-remove-button-${t.completionId}`},s.a.createElement(O.Icon,{width:8,height:8})));return i(r?r(t):s.a.createElement("span",{className:"mx_AutocompleteInput_editor_selection_text"},t.completion))},P=e=>{let{item:t,selection:n,onClick:r,render:i}=e;const o=n.some((e=>e.completionId===t.completionId)),a=D()({mx_AutocompleteInput_suggestion:!0,"mx_AutocompleteInput_suggestion--selected":o}),l=e=>s.a.createElement("div",{className:a,onMouseDown:e=>{e.preventDefault(),r(t)},"data-testid":`autocomplete-suggestion-item-${t.completionId}`},e);return l(i?i(t):s.a.createElement(s.a.Fragment,null,s.a.createElement("span",{className:"mx_AutocompleteInput_suggestion_title"},t.completion),s.a.createElement("span",{className:"mx_AutocompleteInput_suggestion_description"},t.completionId)))};var L=n(133);const B=e=>{let{room:t,defaultUserLevel:n}=e;const r=Object(a.useContext)(L.a),i=Object(a.useRef)(new T.a(t)),[o,c]=Object(a.useState)(!1),[u,d]=Object(a.useState)(n),[h,m]=Object(a.useState)([]),y=Object(a.useCallback)((e=>U(t,e,n)),[t,n]);return s.a.createElement("form",{style:{display:"flex"},onSubmit:async e=>{e.preventDefault(),c(!0);const i=j(h),o=t.currentState.getStateEvents(l.b.RoomPowerLevels,"");if(null!==o)try{await r.setPowerLevel(t.roomId,i,u,o),m([]),d(n)}catch(e){f.b.createDialog(_.a,{title:Object(p.a)("Error"),description:Object(p.a)("Failed to change power level")})}finally{c(!1)}else f.b.createDialog(_.a,{title:Object(p.a)("Error"),description:Object(p.a)("Failed to change power level")})}},s.a.createElement(v.a,{legend:Object(p.a)("Add privileged users"),description:Object(p.a)("Give one or multiple users in this room more privileges"),style:{flexGrow:1}},s.a.createElement(N,{provider:i.current,placeholder:Object(p.a)("Search users in this room…"),onSelectionChange:m,selection:h,additionalFilter:y}),s.a.createElement(b.a,{value:u,onChange:d}),s.a.createElement(g.a,{type:"submit",element:"button",kind:"primary",disabled:!h.length||o,onClick:null,"data-testid":"add-privileged-users-submit-button"},Object(p.a)("Apply"))))},U=(e,t,n)=>{if(void 0===t.completionId)return!1;const r=e.getMember(t.completionId);return null!==r&&r.powerLevel<=n},j=e=>e.filter((e=>void 0!==e.completionId)).map((e=>e.completionId)),G={[l.b.RoomAvatar]:{isState:!0},[l.b.RoomName]:{isState:!0},[l.b.RoomCanonicalAlias]:{isState:!0},[l.b.SpaceChild]:{isState:!0,hideForRoom:!0},[l.b.RoomHistoryVisibility]:{isState:!0,hideForSpace:!0},[l.b.RoomPowerLevels]:{isState:!0},[l.b.RoomTopic]:{isState:!0},[l.b.RoomTombstone]:{isState:!0,hideForSpace:!0},[l.b.RoomEncryption]:{isState:!0,hideForSpace:!0},[l.b.RoomServerAcl]:{isState:!0,hideForSpace:!0},[l.b.RoomPinnedEvents]:{isState:!0,hideForSpace:!0},[l.b.Reaction]:{isState:!1,hideForSpace:!0},[l.b.RoomRedaction]:{isState:!1,hideForSpace:!0},[S.d.CALL_EVENT_TYPE.name]:{isState:!0,hideForSpace:!0},[S.d.MEMBER_EVENT_TYPE.name]:{isState:!0,hideForSpace:!0},"im.vector.modular.widgets":{isState:!0,hideForSpace:!0},[E.g]:{isState:!0,hideForSpace:!0}};function z(e,t){const n=parseInt(e);return isNaN(n)?t:n}class H extends s.a.Component{constructor(){super(...arguments),o()(this,"onUnbanClick",(()=>{m.a.get().unban(this.props.member.roomId,this.props.member.userId).catch((e=>{u.a.error("Failed to unban: "+e),f.b.createDialog(_.a,{title:Object(p.a)("Error"),description:Object(p.a)("Failed to unban")})}))}))}render(){let e;this.props.canUnban&&(e=s.a.createElement(g.a,{className:"mx_RolesRoomSettingsTab_unbanBtn",kind:"danger_sm",onClick:this.onUnbanClick},Object(p.a)("Unban")));const t=this.props.member.name===this.props.member.userId?null:this.props.member.userId;return s.a.createElement("li",null,e,s.a.createElement("span",{title:Object(p.a)("Banned by %(displayName)s",{displayName:this.props.by})},s.a.createElement("strong",null,this.props.member.name)," ",t,this.props.reason?" "+Object(p.a)("Reason")+": "+this.props.reason:""))}}class q extends s.a.Component{constructor(){super(...arguments),o()(this,"onRoomStateUpdate",(e=>{e.roomId===this.props.roomId&&this.onThisRoomMembership()})),o()(this,"onThisRoomMembership",Object(d.throttle)((()=>{this.forceUpdate()}),200,{leading:!0,trailing:!0})),o()(this,"onPowerLevelsChanged",((e,t)=>{const n=m.a.get(),r=n.getRoom(this.props.roomId).currentState.getStateEvents(l.b.RoomPowerLevels,"");let i=r&&r.getContent()||{};i=Object.assign({},i);const o="event_levels_";if(t.startsWith(o))i.events=Object.assign({},i.events||{}),i.events[t.slice(o.length)]=e;else{const n=t.split(".");let r,o=i;for(const e of n)o[e]||(o[e]={}),r=o,o=o[e];r[n[n.length-1]]=e}n.sendStateEvent(this.props.roomId,l.b.RoomPowerLevels,i).catch((e=>{u.a.error(e),f.b.createDialog(_.a,{title:Object(p.a)("Error changing power level requirement"),description:Object(p.a)("An error occurred changing the room's power level requirements. Ensure you have sufficient permissions and try again.")})}))})),o()(this,"onUserPowerLevelChanged",((e,t)=>{const n=m.a.get(),r=n.getRoom(this.props.roomId).currentState.getStateEvents(l.b.RoomPowerLevels,"");let i=r&&r.getContent()||{};i=Object.assign({},i),i.users||(i.users={}),i.users[t]=e,n.sendStateEvent(this.props.roomId,l.b.RoomPowerLevels,i).catch((e=>{u.a.error(e),f.b.createDialog(_.a,{title:Object(p.a)("Error changing power level"),description:Object(p.a)("An error occurred changing the user's power level. Ensure you have sufficient permissions and try again.")})}))}))}componentDidMount(){m.a.get().on(c.b.Update,this.onRoomStateUpdate)}componentWillUnmount(){const e=m.a.get();e&&e.removeListener(c.b.Update,this.onRoomStateUpdate)}populateDefaultPlEvents(e,t,n){for(const r of Object.keys(G))r in e||(e[r]=G[r].isState?t:n)}render(){const e=m.a.get(),t=e.getRoom(this.props.roomId),n=null==t?void 0:t.isSpaceRoom(),r=null==t?void 0:t.currentState.getStateEvents(l.b.RoomPowerLevels,""),i=r&&r.getContent()||{},o=null==t?void 0:t.currentState.mayClientSendStateEvent(l.b.RoomPowerLevels,e),a={[l.b.RoomAvatar]:n?Object(p.c)("Change space avatar"):Object(p.c)("Change room avatar"),[l.b.RoomName]:n?Object(p.c)("Change space name"):Object(p.c)("Change room name"),[l.b.RoomCanonicalAlias]:n?Object(p.c)("Change main address for the space"):Object(p.c)("Change main address for the room"),[l.b.SpaceChild]:Object(p.c)("Manage rooms in this space"),[l.b.RoomHistoryVisibility]:Object(p.c)("Change history visibility"),[l.b.RoomPowerLevels]:Object(p.c)("Change permissions"),[l.b.RoomTopic]:n?Object(p.c)("Change description"):Object(p.c)("Change topic"),[l.b.RoomTombstone]:Object(p.c)("Upgrade the room"),[l.b.RoomEncryption]:Object(p.c)("Enable room encryption"),[l.b.RoomServerAcl]:Object(p.c)("Change server ACLs"),[l.b.Reaction]:Object(p.c)("Send reactions"),[l.b.RoomRedaction]:Object(p.c)("Remove messages sent by me"),"im.vector.modular.widgets":n?null:Object(p.c)("Modify widgets"),[E.g]:Object(p.c)("Voice broadcasts")};y.b.getValue("feature_pinning")&&(a[l.b.RoomPinnedEvents]=Object(p.c)("Manage pinned events")),y.b.getValue("feature_group_calls")&&(a[S.d.CALL_EVENT_TYPE.name]=Object(p.c)("Start %(brand)s calls"),a[S.d.MEMBER_EVENT_TYPE.name]=Object(p.c)("Join %(brand)s calls"));const c={users_default:{desc:Object(p.a)("Default role"),defaultValue:0},events_default:{desc:Object(p.a)("Send messages"),defaultValue:0,hideForSpace:!0},invite:{desc:Object(p.a)("Invite users"),defaultValue:0},state_default:{desc:Object(p.a)("Change settings"),defaultValue:50},kick:{desc:Object(p.a)("Remove users"),defaultValue:50},ban:{desc:Object(p.a)("Ban users"),defaultValue:50},redact:{desc:Object(p.a)("Remove messages sent by others"),defaultValue:50,hideForSpace:!0},"notifications.room":{desc:Object(p.a)("Notify everyone"),defaultValue:50,hideForSpace:!0}},u=i.events||{},g=i.users||{},f=z(i.ban,c.ban.defaultValue),_=z(i.users_default,c.users_default.defaultValue);let T=g[e.getUserId()];void 0===T&&(T=_),this.populateDefaultPlEvents(u,z(i.state_default,c.state_default.defaultValue),z(i.events_default,c.events_default.defaultValue));let C,x=s.a.createElement("div",null,Object(p.a)("No users have specific privileges in this room"));if(Object.keys(g).length){const t=[],n=[];Object.keys(g).forEach((r=>{if(!Number.isInteger(g[r]))return;const i=r===e.getUserId(),a=o&&(g[r]<T||i);g[r]>_?t.push(s.a.createElement(b.a,{value:g[r],disabled:!a,label:r,key:r,powerLevelKey:r,onChange:this.onUserPowerLevelChanged})):g[r]<_&&n.push(s.a.createElement(b.a,{value:g[r],disabled:!a,label:r,key:r,powerLevelKey:r,onChange:this.onUserPowerLevelChanged}))}));const r=(e,t)=>{const n=e.key,r=t.key,i=g[r]-g[n];return 0!==i?i:Object(h.h)(n.toLocaleLowerCase(),r.toLocaleLowerCase())};t.sort(r),n.sort(r),t.length&&(x=s.a.createElement(v.a,{legend:Object(p.a)("Privileged Users")},t)),n.length&&(C=s.a.createElement(v.a,{legend:Object(p.a)("Muted Users")},n))}const F=null==t?void 0:t.getMembersWithMembership("ban");let D;if(null!=F&&F.length){const e=T>=f;D=s.a.createElement(v.a,{legend:Object(p.a)("Banned users")},s.a.createElement("ul",null,F.map((n=>{var r;const i=null===(r=n.events.member)||void 0===r?void 0:r.getContent(),o=null==t?void 0:t.getMember(n.events.member.getSender());let a=n.events.member.getSender();return o&&(a=o.name),s.a.createElement(H,{key:n.userId,canUnban:e,member:n,reason:i.reason,by:a})}))))}const k=Object.keys(c).map(((e,t)=>{const r=c[e];if(n&&r.hideForSpace)return null;const a=z(Object(d.get)(i,e),r.defaultValue);return s.a.createElement("div",{key:t,className:""},s.a.createElement(b.a,{label:r.desc,value:a,usersDefault:_,disabled:!o||T<a,powerLevelKey:e,onChange:this.onPowerLevelsChanged}))})).filter(Boolean);e.isRoomEncrypted(this.props.roomId)&&delete u[l.b.RoomEncryption];const O=Object.keys(u).map(((e,t)=>{var r,i;if(n&&null!==(r=G[e])&&void 0!==r&&r.hideForSpace)return null;if(!n&&null!==(i=G[e])&&void 0!==i&&i.hideForRoom)return null;let l=a[e];if(l){var c;const e=null!==(c=w.b.get("element_call").brand)&&void 0!==c?c:w.a.element_call.brand;l=Object(p.a)(l,{brand:e})}else l=Object(p.a)("Send %(eventType)s events",{eventType:e});return s.a.createElement("div",{className:"",key:e},s.a.createElement(b.a,{label:l,value:u[e],usersDefault:_,disabled:!o||T<u[e],powerLevelKey:"event_levels_"+e,onChange:this.onPowerLevelsChanged}))})).filter(Boolean);return s.a.createElement("div",{className:"mx_SettingsTab mx_RolesRoomSettingsTab"},s.a.createElement("div",{className:"mx_SettingsTab_heading"},Object(p.a)("Roles & Permissions")),x,o&&null!==t&&s.a.createElement(B,{room:t,defaultUserLevel:_}),C,D,s.a.createElement(v.a,{legend:Object(p.a)("Permissions"),description:n?Object(p.a)("Select the roles required to change various parts of the space"):Object(p.a)("Select the roles required to change various parts of the room")},k,O))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return c}));var r=n.p+"decoderWorker.min.wasm",i=n.p+"wave-encoderWorker.min.f289977.js",o=n.p+"opus-decoderWorker.min.8653698.js",a=n(1),s=n(348);function l(e){if(window.AudioContext)return new AudioContext(e);if(window.webkitAudioContext)return new window.webkitAudioContext(e);throw new Error("Unsupported browser")}function c(e){return new Promise((t=>{a.a.log("Decoder WASM path: "+r);const n=new Uint8Array(e),l=new Worker(o),c=new Worker(i);l.postMessage({command:"init",decoderSampleRate:s.c,outputBufferSampleRate:s.c}),c.postMessage({command:"init",wavBitDepth:24,wavSampleRate:s.c}),l.onmessage=e=>{null!==e.data?c.postMessage({command:"encode",buffers:e.data},e.data.map((e=>e.buffer))):c.postMessage({command:"done"})},c.onmessage=e=>{"page"===e.data.message&&t(new Blob([e.data.page],{type:"audio/wav"}).arrayBuffer())},l.postMessage({command:"decode",pages:n},[n.buffer])}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return x}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(1),l=n(129),c=n(121),u=n(139),d=n(123);class h extends a.a.Component{constructor(){super(...arguments),i()(this,"state",{verifyRemove:!1}),i()(this,"onRemove",(e=>{e.stopPropagation(),e.preventDefault(),this.setState({verifyRemove:!0})})),i()(this,"onDontRemove",(e=>{e.stopPropagation(),e.preventDefault(),this.setState({verifyRemove:!1})})),i()(this,"onActuallyRemove",(e=>{e.stopPropagation(),e.preventDefault(),this.props.onRemove&&this.props.onRemove(this.props.index),this.setState({verifyRemove:!1})}))}render(){return this.state.verifyRemove?a.a.createElement("div",{className:"mx_EditableItem"},a.a.createElement("span",{className:"mx_EditableItem_promptText"},Object(c.a)("Are you sure?")),a.a.createElement(d.a,{onClick:this.onActuallyRemove,kind:"primary_sm",className:"mx_EditableItem_confirmBtn"},Object(c.a)("Yes")),a.a.createElement(d.a,{onClick:this.onDontRemove,kind:"danger_sm",className:"mx_EditableItem_confirmBtn"},Object(c.a)("No"))):a.a.createElement("div",{className:"mx_EditableItem"},a.a.createElement("div",{onClick:this.onRemove,className:"mx_EditableItem_delete",title:Object(c.a)("Remove"),role:"button"}),a.a.createElement("span",{className:"mx_EditableItem_item"},this.props.value))}}class p extends a.a.PureComponent{constructor(){super(...arguments),i()(this,"onItemAdded",(e=>{var t,n;e.stopPropagation(),e.preventDefault(),null===(t=(n=this.props).onItemAdded)||void 0===t||t.call(n,this.props.newItem)})),i()(this,"onItemRemoved",(e=>{var t,n;null===(t=(n=this.props).onItemRemoved)||void 0===t||t.call(n,e)})),i()(this,"onNewItemChanged",(e=>{var t,n;null===(t=(n=this.props).onNewItemChanged)||void 0===t||t.call(n,e.target.value)}))}renderNewItemField(){return a.a.createElement("form",{onSubmit:this.onItemAdded,autoComplete:"off",noValidate:!0,className:"mx_EditableItemList_newItem"},a.a.createElement(u.a,{label:this.props.placeholder,type:"text",autoComplete:"off",value:this.props.newItem||"",onChange:this.onNewItemChanged,list:this.props.suggestionsListId}),a.a.createElement(d.a,{onClick:this.onItemAdded,kind:"primary",type:"submit",disabled:!this.props.newItem},Object(c.a)("Add")))}render(){const e=this.props.items.map(((e,t)=>this.props.canRemove?a.a.createElement(h,{key:e,index:t,value:e,onRemove:this.onItemRemoved}):a.a.createElement("li",{key:e},e))),t=this.props.canRemove?e:a.a.createElement("ul",null,e),n=this.props.items.length>0?this.props.itemsLabel:this.props.noItemsLabel;return a.a.createElement("div",{className:"mx_EditableItemList",id:this.props.id},a.a.createElement("div",{className:"mx_EditableItemList_label"},n),t,this.props.canEdit?this.renderNewItemField():a.a.createElement("div",null))}}var m=n(134),g=n(144),f=n(127),_=n(160),b=n(235),v=n(122);var y={};class E extends a.a.PureComponent{constructor(e){super(e),i()(this,"onRoomPublishChange",(()=>{const e=this.state.isRoomPublished,t=!e;this.setState({isRoomPublished:t});v.a.get().setRoomDirectoryVisibility(this.props.roomId,t?_.f.Public:_.f.Private).catch((()=>{this.setState({isRoomPublished:e})}))})),this.state={isRoomPublished:!1}}componentDidMount(){v.a.get().getRoomDirectoryVisibility(this.props.roomId).then((e=>{this.setState({isRoomPublished:"public"===e.visibility})}))}render(){var e;const t=v.a.get(),n="invite"!==t.getRoom(this.props.roomId).getJoinRule(),r=(!1===(null===(e=y.requireCanonicalAliasAccessToPublish)||void 0===e?void 0:e.call(y))||this.props.canSetCanonicalAlias)&&(n||this.state.isRoomPublished);return a.a.createElement(b.a,{value:this.state.isRoomPublished,onChange:this.onRoomPublishChange,disabled:!r,label:Object(c.a)("Publish this room to the public in %(domain)s's room directory?",{domain:t.getDomain()})})}}var S=n(589),w=n(133),T=n(341);class C extends p{constructor(){super(...arguments),i()(this,"aliasField",Object(o.createRef)()),i()(this,"onAliasAdded",(async e=>{e.preventDefault(),await this.aliasField.current.validate({allowEmpty:!1}),this.aliasField.current.isValid?this.props.onItemAdded&&this.props.onItemAdded(this.props.newItem):(this.aliasField.current.focus(),this.aliasField.current.validate({allowEmpty:!1,focused:!0}))}))}renderNewItemField(){return a.a.createElement("form",{onSubmit:this.onAliasAdded,autoComplete:"off",noValidate:!0,className:"mx_EditableItemList_newItem"},a.a.createElement(S.a,{ref:this.aliasField,onChange:e=>{var t,n;return null===(t=(n=this.props).onNewItemChanged)||void 0===t?void 0:t.call(n,e)},value:this.props.newItem||"",domain:this.props.domain,roomId:this.props.roomId}),a.a.createElement(d.a,{onClick:this.onAliasAdded,kind:"primary"},Object(c.a)("Add")))}}class x extends a.a.Component{constructor(e,t){super(e,t),i()(this,"context",void 0),i()(this,"onNewAliasChanged",(e=>{this.setState({newAlias:e})})),i()(this,"onLocalAliasAdded",(e=>{if(!e||0===e.length)return;const t=this.context.getDomain();e.includes(":")||(e+=":"+t),this.context.createAlias(e,this.props.roomId).then((()=>{this.setState({localAliases:this.state.localAliases.concat(e),newAlias:null}),this.state.canonicalAlias||this.changeCanonicalAlias(e)})).catch((e=>{s.a.error(e),f.b.createDialog(g.a,{title:Object(c.a)("Error creating address"),description:Object(c.a)("There was an error creating that address. It may not be allowed by the server or a temporary failure occurred.")})}))})),i()(this,"onLocalAliasDeleted",(e=>{const t=this.state.localAliases[e];this.context.deleteAlias(t).then((()=>{const e=this.state.localAliases.filter((e=>e!==t));this.setState({localAliases:e}),this.state.canonicalAlias===t&&this.changeCanonicalAlias(null)})).catch((e=>{let t;s.a.error(e),t="M_FORBIDDEN"===e.errcode?Object(c.a)("You don't have permission to delete the address."):Object(c.a)("There was an error removing that address. It may no longer exist or a temporary error occurred."),f.b.createDialog(g.a,{title:Object(c.a)("Error removing address"),description:t})}))})),i()(this,"onLocalAliasesToggled",(e=>{e.target.open&&(this.props.canSetCanonicalAlias||0!==this.state.localAliases.length||this.loadLocalAliases()),this.setState({detailsOpen:e.currentTarget.open})})),i()(this,"onCanonicalAliasChange",(e=>{this.changeCanonicalAlias(e.target.value)})),i()(this,"onNewAltAliasChanged",(e=>{this.setState({newAltAlias:e})})),i()(this,"onAltAliasAdded",(e=>{const t=this.state.altAliases.slice();t.some((t=>t.trim()===e.trim()))||(t.push(e.trim()),this.changeAltAliases(t),this.setState({newAltAlias:""}))})),i()(this,"onAltAliasDeleted",(e=>{const t=this.state.altAliases.slice();t.splice(e,1),this.changeAltAliases(t)}));const n={altAliases:[],localAliases:[],canonicalAlias:null,updatingCanonicalAlias:!1,localAliasesLoading:!1,detailsOpen:!1};if(e.canonicalAliasEvent){const t=e.canonicalAliasEvent.getContent(),r=t.alt_aliases;Array.isArray(r)&&(n.altAliases=r.slice()),n.canonicalAlias=t.alias}this.state=n}componentDidMount(){this.props.canSetCanonicalAlias&&this.loadLocalAliases()}async loadLocalAliases(){this.setState({localAliasesLoading:!0});try{const e=this.context;let t=[];const n=await e.getLocalAliases(this.props.roomId);Array.isArray(null==n?void 0:n.aliases)&&(t=n.aliases),this.setState({localAliases:t}),0===t.length&&this.setState({detailsOpen:!0})}finally{this.setState({localAliasesLoading:!1})}}changeCanonicalAlias(e){if(!this.props.canSetCanonicalAlias)return;const t=this.state.canonicalAlias;this.setState({canonicalAlias:e,updatingCanonicalAlias:!0});const n={alt_aliases:this.state.altAliases};e&&(n.alias=e),this.context.sendStateEvent(this.props.roomId,l.b.RoomCanonicalAlias,n,"").catch((e=>{s.a.error(e),f.b.createDialog(g.a,{title:Object(c.a)("Error updating main address"),description:Object(c.a)("There was an error updating the room's main address. It may not be allowed by the server or a temporary failure occurred.")}),this.setState({canonicalAlias:t})})).finally((()=>{this.setState({updatingCanonicalAlias:!1})}))}changeAltAliases(e){if(!this.props.canSetCanonicalAlias)return;this.setState({updatingCanonicalAlias:!0});const t={};this.state.canonicalAlias&&(t.alias=this.state.canonicalAlias),e&&(t.alt_aliases=e),this.context.sendStateEvent(this.props.roomId,l.b.RoomCanonicalAlias,t,"").then((()=>{this.setState({altAliases:e})})).catch((e=>{s.a.error(e),f.b.createDialog(g.a,{title:Object(c.a)("Error updating main address"),description:Object(c.a)("There was an error updating the room's alternative addresses. It may not be allowed by the server or a temporary failure occurred.")})})).finally((()=>{this.setState({updatingCanonicalAlias:!1})}))}getAliases(){return this.state.altAliases.concat(this.getLocalNonAltAliases())}getLocalNonAltAliases(){const{altAliases:e}=this.state;return this.state.localAliases.filter((t=>!e.includes(t)))}render(){var e;const t=this.context,n=t.getDomain(),r=null===(e=t.getRoom(this.props.roomId))||void 0===e?void 0:e.isSpaceRoom();let i=!1;const o=this.state.canonicalAlias||"",s=a.a.createElement(u.a,{onChange:this.onCanonicalAliasChange,value:o,disabled:this.state.updatingCanonicalAlias||!this.props.canSetCanonicalAlias,element:"select",id:"canonicalAlias",label:Object(c.a)("Main address")},a.a.createElement("option",{value:"",key:"unset"},Object(c.a)("not specified")),this.getAliases().map(((e,t)=>(e===this.state.canonicalAlias&&(i=!0),a.a.createElement("option",{value:e,key:t},e)))),i||!this.state.canonicalAlias?"":a.a.createElement("option",{value:this.state.canonicalAlias,key:"arbitrary"},this.state.canonicalAlias));let l;return l=this.state.localAliasesLoading?a.a.createElement(m.a,null):a.a.createElement(C,{id:"roomAliases",items:this.state.localAliases,newItem:this.state.newAlias,onNewItemChanged:this.onNewAliasChanged,canRemove:this.props.canSetAliases,canEdit:this.props.canSetAliases,onItemAdded:this.onLocalAliasAdded,onItemRemoved:this.onLocalAliasDeleted,noItemsLabel:r?Object(c.a)("This space has no local addresses"):Object(c.a)("This room has no local addresses"),placeholder:Object(c.a)("Local address"),domain:n}),a.a.createElement("div",{className:"mx_AliasSettings"},a.a.createElement(T.a,{"data-testid":"published-address-fieldset",legend:Object(c.a)("Published Addresses"),description:a.a.createElement(a.a.Fragment,null,r?Object(c.a)("Published addresses can be used by anyone on any server to join your space."):Object(c.a)("Published addresses can be used by anyone on any server to join your room.")," ",Object(c.a)("To publish an address, it needs to be set as a local address first."))},s,this.props.hidePublishSetting?null:a.a.createElement(E,{roomId:this.props.roomId,canSetCanonicalAlias:this.props.canSetCanonicalAlias}),a.a.createElement("datalist",{id:"mx_AliasSettings_altRecommendations"},this.getLocalNonAltAliases().map((e=>a.a.createElement("option",{value:e,key:e}))),";"),a.a.createElement(C,{id:"roomAltAliases",items:this.state.altAliases,newItem:this.state.newAltAlias,onNewItemChanged:this.onNewAltAliasChanged,canRemove:this.props.canSetCanonicalAlias,canEdit:this.props.canSetCanonicalAlias,onItemAdded:this.onAltAliasAdded,onItemRemoved:this.onAltAliasDeleted,suggestionsListId:"mx_AliasSettings_altRecommendations",itemsLabel:Object(c.a)("Other published addresses:"),noItemsLabel:Object(c.a)("No other published addresses yet, add one below"),placeholder:Object(c.a)("New published address (e.g. #alias:server)"),roomId:this.props.roomId})),a.a.createElement(T.a,{"data-testid":"local-address-fieldset",legend:Object(c.a)("Local Addresses"),description:r?Object(c.a)("Set addresses for this space so users can find this space through your homeserver (%(localDomain)s)",{localDomain:n}):Object(c.a)("Set addresses for this room so users can find this room through your homeserver (%(localDomain)s)",{localDomain:n})},a.a.createElement("details",{onToggle:this.onLocalAliasesToggled,open:this.state.detailsOpen},a.a.createElement("summary",null,this.state.detailsOpen?Object(c.a)("Show less"):Object(c.a)("Show more")),l)))}}i()(x,"contextType",w.a),i()(x,"defaultProps",{canSetAliases:!1,canSetCanonicalAlias:!1})},function(e,t,n){"use strict";n.d(t,"a",(function(){return A}));var r=n(130),i=n.n(r),o=n(13),a=n.n(o),s=n(120),l=n.n(s),c=n(1),u=n(206),d=n(121),h=n(832),p=n(211),m=n(337);class g extends l.a.PureComponent{constructor(e){super(e),a()(this,"onTimeUpdate",(e=>{this.setState({durationSeconds:e[1]})})),this.state={durationSeconds:this.props.playback.clockInfo.durationSeconds},this.props.playback.clockInfo.liveData.onUpdate(this.onTimeUpdate)}render(){return l.a.createElement(m.a,{seconds:this.state.durationSeconds})}}var f=n(596),_=n(833),b=n(834),v=n(251);class y extends b.a{renderFileSize(){const e=this.props.playback.sizeBytes;return e?`(${Object(p.a)(e)})`:null}renderComponent(){return l.a.createElement("div",{className:"mx_MediaBody mx_AudioPlayer_container",tabIndex:0,onKeyDown:this.onKeyDown},l.a.createElement("div",{className:"mx_AudioPlayer_primaryContainer"},l.a.createElement(h.a,{playback:this.props.playback,playbackPhase:this.state.playbackPhase,tabIndex:-1,ref:this.playPauseRef}),l.a.createElement("div",{className:"mx_AudioPlayer_mediaInfo"},l.a.createElement("span",{className:"mx_AudioPlayer_mediaName"},this.props.mediaName||Object(d.a)("Unnamed audio")),l.a.createElement("div",{className:"mx_AudioPlayer_byline"},l.a.createElement(g,{playback:this.props.playback})," ",this.renderFileSize()))),l.a.createElement("div",{className:"mx_AudioPlayer_seek"},l.a.createElement(f.a,{playback:this.props.playback,tabIndex:-1,disabled:this.state.playbackPhase===v.d.Decoding,ref:this.seekRef}),l.a.createElement(_.a,{playback:this.props.playback,defaultDisplaySeconds:0})))}}var E=n(338),S=n(500),w=n(180),T=n(129),C=n(153),x=n(122),F=n(146),D=n(154);class k{constructor(e){this.room=e,a()(this,"playbacks",new Map),a()(this,"clockStates",new Map),a()(this,"playbackIdOrder",[]),a()(this,"currentPlaybackId",null),a()(this,"recentFullPlays",new Set),this.loadClocks(),D.b.instance.roomViewStore.addRoomListener(this.room.roomId,(e=>{e&&(this.currentPlaybackId=null,this.recentFullPlays=new Set,this.playbackIdOrder=[])}))}static forRoom(e){const t=x.a.get().getRoom(e);if(!t)throw new Error("Unknown room");if(k.queues.has(t.roomId))return k.queues.get(t.roomId);const n=new k(t);return k.queues.set(t.roomId,n),n}persistClocks(){localStorage.setItem(`mx_voice_message_clocks_${this.room.roomId}`,JSON.stringify(Array.from(this.clockStates.entries())))}loadClocks(){const e=localStorage.getItem(`mx_voice_message_clocks_${this.room.roomId}`);e&&(this.clockStates=new Map(JSON.parse(e)))}unsortedEnqueue(e,t){this.playbacks.set(e.getId(),t),t.on(C.b,(n=>this.onPlaybackStateChange(t,e,n))),t.clockInfo.liveData.onUpdate((n=>this.onPlaybackClock(t,e,n)))}onPlaybackStateChange(e,t,n){const r=this.currentPlaybackId===t.getId();if(n===v.d.Stopped&&this.clockStates.has(t.getId())&&!r)e.skipTo(this.clockStates.get(t.getId()));else if(n===v.d.Stopped&&(this.clockStates.delete(t.getId()),r)){this.recentFullPlays.add(this.currentPlaybackId);const e=Object(F.b)(this.playbackIdOrder),n=e.pop();if(n===this.currentPlaybackId){const r=e.pop();if(r){const t=this.playbacks.get(r);t?(this.playbackIdOrder=e,S.a.instance.pauseAllExcept(t),t.play()):c.a.warn(`Voice message queue desync: Missing playback for next message: Current=${this.currentPlaybackId} Last=${n} Next=${r}`)}else{const n=Object(F.b)(this.room.getLiveTimeline().getEvents());let r,i=!1;for(const e of n){if(e.getId()===t.getId()){i=!0;continue}if(!i)continue;if(!Object(w.m)(e)){const t=e.getType();if(t!==T.b.RoomMessage&&t!==T.b.Sticker)continue;break}const n=this.playbacks.has(e.getId()),o=this.recentFullPlays.has(e.getId());if(n&&!o){r=e;break}}if(r){this.playbackIdOrder=e;const t=this.playbacks.get(r.getId());S.a.instance.pauseAllExcept(t),t.play()}else this.recentFullPlays=new Set,this.playbackIdOrder=[]}}else c.a.warn(`Voice message queue desync: Expected playback stop to be last in order. Current=${this.currentPlaybackId} Last=${n} EventID=${t.getId()}`)}if(n===v.d.Playing){const e=this.playbackIdOrder;if(this.currentPlaybackId!==t.getId()&&this.currentPlaybackId&&(0===e.length||e[e.length-1]!==this.currentPlaybackId)){const t=this.playbacks.get(this.currentPlaybackId);t.currentState!==v.d.Playing&&t.currentState!==v.d.Paused||e.push(this.currentPlaybackId)}this.currentPlaybackId=t.getId(),0!==e.length&&e[e.length-1]===this.currentPlaybackId||e.push(this.currentPlaybackId)}n!==v.d.Paused&&n!==v.d.Stopped||this.persistClocks()}onPlaybackClock(e,t,n){e.currentState!==v.d.Decoding&&e.currentState!==v.d.Stopped&&this.clockStates.set(t.getId(),n[0])}}a()(k,"queues",new Map);var O=n(138),I=n(467);class A extends l.a.PureComponent{constructor(e){super(e),a()(this,"context",void 0),this.state={}}async componentDidMount(){var e,t;let n;try{try{const e=await this.props.mediaEventHelper.sourceBlob.value;n=await e.arrayBuffer()}catch(e){return this.setState({error:e}),void c.a.warn("Unable to decrypt audio message",e)}}catch(e){return this.setState({error:e}),void c.a.warn("Unable to decrypt/download audio message",e)}const r=this.props.mxEvent.getContent(),i=null==r||null===(e=r["org.matrix.msc1767.audio"])||void 0===e||null===(t=e.waveform)||void 0===t?void 0:t.map((e=>e/1024)),o=S.a.instance.createPlaybackInstance(n,i);o.clockInfo.populatePlaceholdersFrom(this.props.mxEvent),this.setState({playback:o}),Object(w.m)(this.props.mxEvent)&&k.forRoom(this.props.mxEvent.getRoomId()).unsortedEnqueue(this.props.mxEvent,o)}componentWillUnmount(){var e;null===(e=this.state.playback)||void 0===e||e.destroy()}get showFileBody(){return this.context.timelineRenderingType!==O.a.Room&&this.context.timelineRenderingType!==O.a.Pinned&&this.context.timelineRenderingType!==O.a.Search}render(){if(this.state.error)return l.a.createElement(I.a,{className:"mx_MAudioBody"},Object(d.a)("Error processing audio message"));if(this.props.forExport){var e;const t=this.props.mxEvent.getContent(),n=(null===(e=t.file)||void 0===e?void 0:e.url)||t.url;return l.a.createElement("span",{className:"mx_MAudioBody"},l.a.createElement("audio",{src:n,controls:!0}))}return this.state.playback?l.a.createElement("span",{className:"mx_MAudioBody"},l.a.createElement(y,{playback:this.state.playback,mediaName:this.props.mxEvent.getContent().body}),this.showFileBody&&l.a.createElement(E.a,i()({},this.props,{showGenericPlaceholder:!1}))):l.a.createElement("span",{className:"mx_MAudioBody"},l.a.createElement(u.a,null))}}a()(A,"contextType",O.b)},function(e,t,n){"use strict";n.d(t,"c",(function(){return T})),n.d(t,"a",(function(){return C})),n.d(t,"d",(function(){return x})),n.d(t,"b",(function(){return D}));var r=n(174),i=n(122),o=n(124),a=n(127),s=n(182),l=n(250),c=n(120),u=n.n(c),d=n(121),h=n(266),p=n(123),m=n(135);var g=e=>{let t,n,{device:r,user:o,onFinished:a}=e;return i.a.get().getUserId()===o.userId?(n=Object(d.a)("You signed in to a new session without verifying it:"),t=Object(d.a)("Verify your other session using one of the options below.")):(n=Object(d.a)("%(name)s (%(userId)s) signed in to a new session without verifying it:",{name:o.displayName,userId:o.userId}),t=Object(d.a)("Ask this user to verify their session, or manually verify it below.")),u.a.createElement(m.a,{onFinished:a,className:"mx_UntrustedDeviceDialog",title:u.a.createElement(u.a.Fragment,null,u.a.createElement(h.b,{status:h.a.Warning,size:24,hideTooltip:!0}),Object(d.a)("Not Trusted"))},u.a.createElement("div",{className:"mx_Dialog_content",id:"mx_Dialog_content"},u.a.createElement("p",null,n),u.a.createElement("p",null,r.getDisplayName()," (",r.deviceId,")"),u.a.createElement("p",null,t)),u.a.createElement("div",{className:"mx_Dialog_buttons"},u.a.createElement(p.a,{kind:"primary_outline",onClick:()=>a("legacy")},Object(d.a)("Manually verify by text")),u.a.createElement(p.a,{kind:"primary_outline",onClick:()=>a("sas")},Object(d.a)("Interactively verify by emoji")),u.a.createElement(p.a,{kind:"primary",onClick:()=>a(!1)},Object(d.a)("Done"))))},f=n(13),_=n.n(f),b=n(211),v=n(155);class y extends u.a.Component{constructor(){super(...arguments),_()(this,"onLegacyFinished",(e=>{e&&i.a.get().setDeviceVerified(this.props.userId,this.props.device.deviceId,!0),this.props.onFinished(e)}))}render(){let e;e=i.a.get().getUserId()===this.props.userId?Object(d.a)("Confirm by comparing the following with the User Settings in your other session:"):Object(d.a)("Confirm this user's session by comparing the following with their User Settings:");const t=b.e(this.props.device.getFingerprint()),n=u.a.createElement("div",null,u.a.createElement("p",null,e),u.a.createElement("div",{className:"mx_DeviceVerifyDialog_cryptoSection"},u.a.createElement("ul",null,u.a.createElement("li",null,u.a.createElement("label",null,Object(d.a)("Session name"),":")," ",u.a.createElement("span",null,this.props.device.getDisplayName())),u.a.createElement("li",null,u.a.createElement("label",null,Object(d.a)("Session ID"),":")," ",u.a.createElement("span",null,u.a.createElement("code",null,this.props.device.deviceId))),u.a.createElement("li",null,u.a.createElement("label",null,Object(d.a)("Session key"),":")," ",u.a.createElement("span",null,u.a.createElement("code",null,u.a.createElement("b",null,t)))))),u.a.createElement("p",null,Object(d.a)("If they don't match, the security of your communication may be compromised.")));return u.a.createElement(v.a,{title:Object(d.a)("Verify session"),description:n,button:Object(d.a)("Verify session"),onFinished:this.onLegacyFinished})}}var E=n(173),S=n(305);async function w(){const e=i.a.get();if(!e.isCryptoEnabled())return!1;return!!e.getCrossSigningId("user_signing")||(await Object(l.b)(),!1)}async function T(e,t){const n=i.a.get();n.isGuest()?o.a.dispatch({action:"require_registration"}):n.getCryptoTrustCrossSignedDevices()&&!await w()||a.b.createDialog(g,{user:e,device:t,onFinished:async i=>{if("sas"===i){const i=n.legacyDeviceVerification(e.userId,t.deviceId,r.e.SAS);F({member:e,verificationRequestPromise:i})}else"legacy"===i&&a.b.createDialog(y,{userId:e.userId,device:t})}})}async function C(e){const t=i.a.get();if(t.isGuest())return void o.a.dispatch({action:"require_registration"});if(t.getCryptoTrustCrossSignedDevices()&&!await w())return;F({member:e,verificationRequestPromise:t.requestVerification(e.userId)})}async function x(e){if(i.a.get().isGuest())return void o.a.dispatch({action:"require_registration"});if(!await w())return;F({member:e,verificationRequest:D(e)})}function F(e){E.a.instance.roomPhaseHistory.some((e=>e.phase==s.a.RoomSummary))?E.a.instance.pushCard({phase:s.a.EncryptionPanel,state:e}):E.a.instance.setCards([{phase:s.a.RoomSummary},{phase:s.a.RoomMemberInfo,state:{member:e.member}},{phase:s.a.EncryptionPanel,state:e}])}function D(e){const t=i.a.get(),n=Object(S.a)(t,e.userId);if(n)return t.findVerificationRequestDMInProgress(n.roomId)}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(13),i=n.n(r),o=n(136),a=n(225),s=n(492),l=n(510);function c(){return new Worker(n.p+"2b0ba77c96f7eb953d3d.worker.js")}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const h=window.localStorage;let p;try{p=window.indexedDB}catch(e){}function m(e){const t={useAuthorizationHeader:!0};return p&&h?t.store=new s.a({indexedDB:p,dbName:"riot-web-sync",localStorage:h,workerFactory:()=>new c}):h&&(t.store=new o.MemoryStore({localStorage:h})),t.cryptoStore=p?new a.a(p,"matrix-js-sdk:crypto"):h?new l.a(h):new o.MemoryCryptoStore,Object(o.createClient)(d(d({},t),e))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return oe}));var r,i,o=n(13),a=n.n(o),s=n(120),l=n.n(s),c=n(126),u=n.n(c),d=n(184),h=n(1);function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}function m(e){return s.createElement("svg",p({fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",role:"presentation","aria-hidden":!0},e),r||(r=s.createElement("circle",{cx:10,cy:10,r:9.5,stroke:"#787878"})),i||(i=s.createElement("path",{d:"M9.792 14h1.415V8H9.791v6zm.711-6.852c.45 0 .817-.343.817-.765 0-.426-.367-.77-.817-.77-.453 0-.82.344-.82.77 0 .422.367.765.82.765z",fill:"#787878"})))}var g=n(693),f=n(121),_=n(122),b=n(168),v=n(164),y=n(131),E=n(325),S=n(433),w=n(694),T=n(366),C=n(289),x=n(695),F=n(232),D=n(128),k=n(190),O=n(226),I=n(125),A=n(156),R=n(166),N=n(191),M=n(844),P=n(123),L=n(228),B=n(139),U=n(333),j=n(614),G=n(155),z=n(134),H=n(135),q=n(845),V=n(183),$=n(260),K=n(298),W=n(142),Y=n(152),Q=n(405),X=n(586),Z=n(127),J=n(124),ee=n(307);var te;!function(e){e.UserDirectory="users",e.DialPad="dialpad"}(te||(te={}));class ne extends l.a.PureComponent{constructor(){super(...arguments),a()(this,"onRemove",(e=>{e.preventDefault(),e.stopPropagation(),this.props.onRemove(this.props.member)}))}render(){const e=l.a.createElement(M.a,{user:this.props.member,size:20});let t;return this.props.onRemove&&(t=l.a.createElement(P.a,{className:"mx_InviteDialog_userTile_remove",onClick:this.onRemove},l.a.createElement("img",{src:n(846).default,alt:Object(f.a)("Remove"),width:8,height:8}))),l.a.createElement("span",{className:"mx_InviteDialog_userTile"},l.a.createElement("span",{className:"mx_InviteDialog_userTile_pill"},e,l.a.createElement("span",{className:"mx_InviteDialog_userTile_name"},this.props.member.name)),t)}}const re=e=>e instanceof d.a?new Q.a({user_id:e.userId,display_name:e.name,avatar_url:e.getMxcAvatarUrl()}):e;class ie extends l.a.PureComponent{constructor(){super(...arguments),a()(this,"onClick",(e=>{e.preventDefault(),e.stopPropagation(),this.props.onToggle(this.props.member)}))}highlightName(e){if(!this.props.highlightWord)return e;const t=e.toLowerCase(),n=this.props.highlightWord.toLowerCase(),r=[];let i,o=0;for(;(i=t.indexOf(n,o))>=0;){i>o&&r.push(l.a.createElement("span",{key:o+"begin"},e.substring(o,i))),o=i;const t=e.substring(o,n.length+o);r.push(l.a.createElement("span",{className:"mx_InviteDialog_tile--room_highlight",key:o+"bold"},t)),o+=t.length}return o<e.length&&r.push(l.a.createElement("span",{key:o+"end"},e.substring(o))),r}render(){let e;if(this.props.lastActiveTs){const t=Object(x.a)(this.props.lastActiveTs);e=l.a.createElement("span",{className:"mx_InviteDialog_tile--room_time"},t)}const t=this.props.member.isEmail?l.a.createElement(g.a,{width:36,height:36}):l.a.createElement(N.a,{url:this.props.member.getMxcAvatarUrl()?Object(R.b)(this.props.member.getMxcAvatarUrl()).getSquareThumbnailHttp(36):null,name:this.props.member.name,idName:this.props.member.userId,width:36,height:36});let n;this.props.isSelected&&(n=l.a.createElement("div",{className:"mx_InviteDialog_tile--room_selected"}));const r=l.a.createElement("span",{className:"mx_InviteDialog_tile_avatarStack"},t,n),i=$.a.getDisplayUserIdentifier(this.props.member.userId,{withDisplayName:!0}),o=this.props.member.isEmail?Object(f.a)("Invite by email"):this.highlightName(i||this.props.member.userId);return l.a.createElement("div",{className:"mx_InviteDialog_tile mx_InviteDialog_tile--room",onClick:this.onClick},r,l.a.createElement("span",{className:"mx_InviteDialog_tile_nameStack"},l.a.createElement("div",{className:"mx_InviteDialog_tile_nameStack_name"},this.highlightName(this.props.member.name)),l.a.createElement("div",{className:"mx_InviteDialog_tile_nameStack_userId"},o)),e)}}class oe extends l.a.PureComponent{constructor(e){if(super(e),a()(this,"debounceTimer",null),a()(this,"editorRef",Object(s.createRef)()),a()(this,"numberEntryFieldRef",Object(s.createRef)()),a()(this,"unmounted",!1),a()(this,"encryptionByDefault",!1),a()(this,"onConsultFirstChange",(e=>{this.setState({consultFirst:e.target.checked})})),a()(this,"startDm",(async()=>{this.setState({busy:!0});try{const e=_.a.get(),t=this.convertFilter();await Object(Q.e)(e,t),this.props.onFinished(!0)}catch(e){h.a.error(e),this.setState({busy:!1,errorText:Object(f.a)("We couldn't create your DM.")})}})),a()(this,"inviteUsers",(async()=>{if(this.props.kind!==X.a.Invite)return;this.setState({busy:!0}),this.convertFilter();const e=this.convertFilter().map((e=>e.userId)),t=_.a.get().getRoom(this.props.roomId);if(!t)return h.a.error("Failed to find the room to invite users to"),void this.setState({busy:!1,errorText:Object(f.a)("Something went wrong trying to invite the users.")});try{const n=await Object(F.a)(this.props.roomId,e,!0);this.shouldAbortAfterInviteError(n,t)||this.props.onFinished(!0)}catch(e){h.a.error(e),this.setState({busy:!1,errorText:Object(f.a)("We couldn't invite those users. Please check the users you want to invite and try again.")})}})),a()(this,"transferCall",(async()=>{if(this.props.kind===X.a.CallTransfer){if(this.state.currentTabId==te.UserDirectory){this.convertFilter();const e=this.convertFilter().map((e=>e.userId));if(e.length>1)return void this.setState({errorText:Object(f.a)("A call can only be transferred to a single user.")});V.b.instance.startTransferToMatrixID(this.props.call,e[0],this.state.consultFirst)}else V.b.instance.startTransferToPhoneNumber(this.props.call,this.state.dialPadValue,this.state.consultFirst);this.props.onFinished(!0)}})),a()(this,"onKeyDown",(e=>{if(this.state.busy)return;let t=!1;const n=e.currentTarget.value.trim();switch(Object(Y.a)().getAccessibilityAction(e)){case W.h.Backspace:if(n||this.state.targets.length<=0)break;this.removeMember(this.state.targets[this.state.targets.length-1]),t=!0;break;case W.h.Space:if(!n||!n.includes("@")||n.includes(" "))break;this.convertFilter(),t=!0;break;case W.h.Enter:if(!n)break;this.convertFilter(),t=!0}t&&e.preventDefault()})),a()(this,"onCancel",(()=>{this.props.onFinished(!1)})),a()(this,"updateSuggestions",(async e=>{if(_.a.get().searchUserDirectory({term:e}).then((async t=>{if(e===this.state.filterText){if(t.results||(t.results=[]),"@"===e[0]&&e.indexOf(":")>1)try{const n=await _.a.get().getProfileInfo(e);n&&t.results.splice(0,0,{user_id:e,display_name:n.displayname,avatar_url:n.avatar_url})}catch(n){h.a.warn("Non-fatal error trying to make an invite for a user ID"),h.a.warn(n);const r=Object(b.e)(e);Object(b.c)(r)&&t.results.splice(0,0,{user_id:e,display_name:e})}this.setState({serverResultsMixin:t.results.map((e=>({userId:e.user_id,user:new Q.a(e)})))})}})).catch((e=>{h.a.error("Error searching user directory:"),h.a.error(e),this.setState({serverResultsMixin:[]})})),this.state.canUseIdentityServer){if(E.a(e)&&this.canInviteThirdParty()&&I.b.getValue(A.b.IdentityServer)){this.setState({threepidResultsMixin:[{user:new Q.b(e),userId:e}]});try{const t=new C.a,n=await t.getAccessToken();if(!n)return;if(e!==this.state.filterText)return;const r=await _.a.get().lookupThreePid("email",e,n);if(e!==this.state.filterText)return;if(!r||!r.mxid)return;const i=await _.a.get().getProfileInfo(r.mxid);if(e!==this.state.filterText||!i)return;this.setState({threepidResultsMixin:[...this.state.threepidResultsMixin,{user:new Q.a({user_id:r.mxid,display_name:i.displayname,avatar_url:i.avatar_url}),userId:e}]})}catch(e){h.a.error("Error searching identity server:"),h.a.error(e),this.setState({threepidResultsMixin:[]})}}}else this.setState({tryingIdentityServer:!0})})),a()(this,"updateFilter",(e=>{const t=e.target.value;this.setState({filterText:t}),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=window.setTimeout((()=>{this.updateSuggestions(t)}),150)})),a()(this,"showMoreRecents",(()=>{this.setState({numRecentsShown:this.state.numRecentsShown+5})})),a()(this,"showMoreSuggestions",(()=>{this.setState({numSuggestionsShown:this.state.numSuggestionsShown+5})})),a()(this,"toggleMember",(e=>{if(!this.state.busy){let t=this.state.filterText,n=this.state.targets.map((e=>e));const r=n.indexOf(e);r>=0?n.splice(r,1):(this.props.kind===X.a.CallTransfer&&n.length>0&&(n=[]),n.push(e),t=""),this.setState({targets:n,filterText:t}),this.editorRef&&this.editorRef.current&&this.editorRef.current.focus()}})),a()(this,"removeMember",(e=>{const t=this.state.targets.map((e=>e)),n=t.indexOf(e);n>=0&&(t.splice(n,1),this.setState({targets:t})),this.editorRef&&this.editorRef.current&&this.editorRef.current.focus()})),a()(this,"onPaste",(async e=>{if(this.state.filterText)return;e.preventDefault();const t=e.clipboardData.getData("text"),n=[...this.state.recents,...this.state.suggestions,...this.state.serverResultsMixin,...this.state.threepidResultsMixin],r=[],i=[],o=[],a=this.parseFilter(t);for(const t of a){const a=n.find((e=>e.userId===t));if(a)this.canInviteMore([...this.state.targets,...r])?r.push(a.user):o.push(t);else if(E.a(t))this.canInviteThirdParty([...this.state.targets,...r])?r.push(new Q.b(t)):o.push(t);else if("@"===t[0])try{const e=await _.a.get().getProfileInfo(t);r.push(new Q.a({user_id:t,display_name:null==e?void 0:e.displayname,avatar_url:null==e?void 0:e.avatar_url}))}catch(e){h.a.error("Error looking up profile for "+t),h.a.error(e),i.push(t)}else i.push(t)}this.unmounted||(i.length>0&&Z.b.createDialog(G.a,{title:Object(f.a)("Failed to find the following users"),description:Object(f.a)("The following users might not exist or are invalid, and cannot be invited: %(csvNames)s",{csvNames:i.join(", ")}),button:Object(f.a)("OK")}),o?this.setState({filterText:o.join(" "),targets:[...this.state.targets,...r]}):this.setState({targets:[...this.state.targets,...r]}))})),a()(this,"onClickInputArea",(e=>{e.preventDefault(),e.stopPropagation(),this.editorRef&&this.editorRef.current&&this.editorRef.current.focus()})),a()(this,"onUseDefaultIdentityServerClick",(e=>{e.preventDefault(),Object(S.d)(),this.setState({canUseIdentityServer:!0,tryingIdentityServer:!1})})),a()(this,"onManageSettingsClick",(e=>{e.preventDefault(),J.a.fire(D.a.ViewUserSettings),this.props.onFinished(!1)})),a()(this,"onDialFormSubmit",(e=>{e.preventDefault(),this.transferCall()})),a()(this,"onDialChange",(e=>{this.setState({dialPadValue:e.currentTarget.value})})),a()(this,"onDigitPress",((e,t)=>{var n;(this.setState({dialPadValue:this.state.dialPadValue+e}),"click"===t.type)&&(null===(n=this.numberEntryFieldRef.current)||void 0===n||n.focus())})),a()(this,"onDeletePress",(e=>{var t;0!==this.state.dialPadValue.length&&(this.setState({dialPadValue:this.state.dialPadValue.slice(0,-1)}),"click"===e.type&&(null===(t=this.numberEntryFieldRef.current)||void 0===t||t.focus()))})),a()(this,"onTabChange",(e=>{this.setState({currentTabId:e})})),e.kind===X.a.Invite&&!e.roomId)throw new Error("When using InviteKind.Invite a roomId is required for an InviteDialog");if(e.kind===X.a.CallTransfer&&!e.call)throw new Error("When using InviteKind.CallTransfer a call is required for an InviteDialog");const t=new Set([_.a.get().getUserId()]),n=y.b.get("welcome_user_id");if(n&&t.add(n),function(e){return e.kind===X.a.Invite}(e)){const n=_.a.get().getRoom(e.roomId);if(!n)throw new Error("Room ID given to InviteDialog does not look like a room");n.getMembersWithMembership("invite").forEach((e=>t.add(e.userId))),n.getMembersWithMembership("join").forEach((e=>t.add(e.userId))),n.getMembersWithMembership("ban").forEach((e=>t.add(e.userId)))}this.state={targets:[],filterText:this.props.initialText||"",recents:oe.buildRecents(t),numRecentsShown:3,suggestions:this.buildSuggestions(t),numSuggestionsShown:3,serverResultsMixin:[],threepidResultsMixin:[],canUseIdentityServer:!!_.a.get().getIdentityServerUrl(),tryingIdentityServer:!1,consultFirst:!1,dialPadValue:"",currentTabId:te.UserDirectory,busy:!1}}componentDidMount(){this.encryptionByDefault=Object(ee.a)(),this.props.initialText&&this.updateSuggestions(this.props.initialText)}componentWillUnmount(){this.unmounted=!0}static buildRecents(e){const t=v.a.shared().getUniqueRoomsWithIndividuals(),n=O.c.instance.orderedLists[k.a.DM]||[],r=_.a.get().getUserId();for(const e of n){const n=e.getJoinedMembers().filter((e=>e.userId!==r));for(const r of n)t[r.userId]||(h.a.warn(`Adding DM room for ${r.userId} as ${e.roomId} from tag, not DM map`),t[r.userId]=e)}const i=[];for(const n in t){if(e.has(n)){h.a.warn(`[Invite:Recents] Excluding ${n} from recents`);continue}const r=t[n],o=r.getMember(n);if(!o){h.a.warn(`[Invite:Recents] ${n} is missing a member object in their own DM (${r.roomId})`);continue}const a=["m.room.message","m.room.encrypted","m.sticker"],s=20;let l=0;if(r.timeline&&r.timeline.length)for(let e=r.timeline.length-1;e>=0;e--){const t=r.timeline[e];if(a.includes(t.getType())){l=t.getTs();break}if(r.timeline.length-e>s)break}l?i.push({userId:n,user:re(o),lastActive:l}):h.a.warn(`[Invite:Recents] ${n} (${r.roomId}) has a weird last timestamp: ${l}`)}return i||h.a.warn("[Invite:Recents] No recents to suggest!"),i.sort(((e,t)=>t.lastActive-e.lastActive)),i}buildSuggestions(e){const t=_.a.get(),n=Object(w.a)(t),r=Object(w.b)(t),i=Object(w.c)(n,r);return Object.values(r).map((e=>{let{member:t}=e;return t})).filter((t=>!e.has(t.userId))).sort(i).map((e=>({userId:e.userId,user:re(e)})))}shouldAbortAfterInviteError(e,t){this.setState({busy:!1});const n=new Map(this.state.targets.map((e=>[e.userId,e])));return!Object(F.d)(e.states,t,e.inviter,n)}convertFilter(){if(!this.state.filterText||!this.state.filterText.includes("@"))return this.state.targets||[];if(!this.canInviteMore())return this.state.targets;let e;if(this.state.filterText.startsWith("@")?e=new Q.a({user_id:this.state.filterText}):I.b.getValue(A.b.IdentityServer)&&this.canInviteThirdParty()&&(e=new Q.b(this.state.filterText)),!e)return this.state.targets;const t=[...this.state.targets||[],e];return this.setState({targets:t,filterText:""}),t}parseFilter(e){return e.split(/[\s,]+/).map((e=>e.trim())).filter((e=>!!e))}renderSection(e){let t="recents"===e?this.state.recents:this.state.suggestions,n="recents"===e?this.state.numRecentsShown:this.state.numSuggestionsShown;const r="recents"===e?this.showMoreRecents.bind(this):this.showMoreSuggestions.bind(this);let i="recents"===e?Object(f.a)("Recent Conversations"):Object(f.a)("Suggestions");this.props.kind===X.a.Invite&&(i="recents"===e?Object(f.a)("Recently Direct Messaged"):Object(f.a)("Suggestions"));let o=[],a=[];const s=this.state.serverResultsMixin||this.state.threepidResultsMixin;if(this.state.filterText&&s&&"suggestions"===e){const e=e=>!t.some((t=>t.userId===e.userId))&&!o.some((t=>t.userId===e.userId))&&!a.some((t=>t.userId===e.userId));a=this.state.serverResultsMixin.filter(e),o=this.state.threepidResultsMixin.filter(e)}const c=o.length>0||a.length>0;if(0===t.length&&!c)return null;if(this.canInviteThirdParty()||(o=o.filter((e=>e instanceof Q.b))),this.state.filterText){const e=this.state.filterText.toLowerCase();if(t=t.filter((t=>t.user.name.toLowerCase().includes(e)||t.userId.toLowerCase().includes(e))),0===t.length&&!c)return l.a.createElement("div",{className:"mx_InviteDialog_section"},l.a.createElement("h3",null,i),l.a.createElement("p",null,Object(f.a)("No results")))}t=[...o,...t,...a],n===t.length-1&&n++;const u=t.slice(0,n);let d;u.length<t.length&&(d=l.a.createElement("div",{className:"mx_InviteDialog_section_showMore"},l.a.createElement(P.a,{onClick:r,kind:"link"},Object(f.a)("Show more"))));const h=u.map((t=>{return l.a.createElement(ie,{member:t.user,lastActiveTs:(n=t,"recents"===e?n.lastActive:void 0),key:t.user.userId,onToggle:this.toggleMember,highlightWord:this.state.filterText,isSelected:this.state.targets.some((e=>e.userId===t.userId))});var n}));return l.a.createElement("div",{className:"mx_InviteDialog_section"},l.a.createElement("h3",null,i),h,d)}renderEditor(){const e=this.props.kind==X.a.CallTransfer&&0===this.state.targets.length&&0===this.state.filterText.length,t=this.state.targets.map((e=>l.a.createElement(ne,{member:e,onRemove:this.state.busy?void 0:this.removeMember,key:e.userId}))),n=l.a.createElement("input",{type:"text",onKeyDown:this.onKeyDown,onChange:this.updateFilter,value:this.state.filterText,ref:this.editorRef,onPaste:this.onPaste,autoFocus:!0,disabled:this.state.busy||this.props.kind==X.a.CallTransfer&&this.state.targets.length>0,autoComplete:"off",placeholder:e?Object(f.a)("Search"):void 0,"data-testid":"invite-dialog-input"});return l.a.createElement("div",{className:"mx_InviteDialog_editor",onClick:this.onClickInputArea},t,n)}renderIdentityServerWarning(){if(!this.state.tryingIdentityServer||this.state.canUseIdentityServer||!I.b.getValue(A.b.IdentityServer))return null;const e=Object(S.c)();return e?l.a.createElement("div",{className:"mx_InviteDialog_identityServer"},Object(f.a)("Use an identity server to invite by email. <default>Use the default (%(defaultIdentityServerName)s)</default> or manage in <settings>Settings</settings>.",{defaultIdentityServerName:Object(T.a)(e)},{default:e=>l.a.createElement(P.a,{kind:"link_inline",onClick:this.onUseDefaultIdentityServerClick},e),settings:e=>l.a.createElement(P.a,{kind:"link_inline",onClick:this.onManageSettingsClick},e)})):l.a.createElement("div",{className:"mx_InviteDialog_identityServer"},Object(f.a)("Use an identity server to invite by email. Manage in <settings>Settings</settings>.",{},{settings:e=>l.a.createElement(P.a,{kind:"link_inline",onClick:this.onManageSettingsClick},e)}))}async onLinkClick(e){e.preventDefault(),Object(L.d)(e.currentTarget)}get screenName(){if(this.props.kind===X.a.Dm)return"StartChat"}canInviteMore(e){return e=e||this.state.targets,this.canInviteThirdParty(e)||!e.some((e=>e instanceof Q.b))}canInviteThirdParty(e){return e=e||this.state.targets,this.props.kind!==X.a.Dm||0===e.length||!this.encryptionByDefault}hasFilterAtLeastOneEmail(){return!!this.state.filterText&&this.parseFilter(this.state.filterText).some((e=>E.a(e)))}render(){let e,t,n,r,i,o,a,s;this.state.busy&&(e=l.a.createElement(z.a,{w:20,h:20}));let c=l.a.createElement("span",null);const d=I.b.getValue(A.b.IdentityServer),h=this.state.targets.length>0||this.state.filterText&&this.state.filterText.includes("@"),p=_.a.get(),g=p.getUserId();if(this.props.kind===X.a.Dm){t=Object(f.a)("Direct Messages"),n=d?Object(f.a)("Start a conversation with someone using their name, email address or username (like <userId/>).",{},{userId:()=>l.a.createElement("a",{href:Object(b.i)(g),rel:"noreferrer noopener",target:"_blank"},g)}):Object(f.a)("Start a conversation with someone using their name or username (like <userId/>).",{},{userId:()=>l.a.createElement("a",{href:Object(b.i)(g),rel:"noreferrer noopener",target:"_blank"},g)}),r=Object(f.a)("Go"),i=this.startDm,a=l.a.createElement("div",{className:"mx_InviteDialog_section_hidden_suggestions_disclaimer"},l.a.createElement("span",null,Object(f.a)("Some suggestions may be hidden for privacy.")),l.a.createElement("p",null,Object(f.a)("If you can't see who you're looking for, send them your invite link below.")));const e=Object(b.i)(_.a.get().getUserId());s=l.a.createElement("div",{className:"mx_InviteDialog_footer"},l.a.createElement("h3",null,Object(f.a)("Or send invite link")),l.a.createElement(K.a,{getTextToCopy:()=>Object(b.i)(_.a.get().getUserId())},l.a.createElement("a",{href:e,onClick:this.onLinkClick},e)))}else if(this.props.kind===X.a.Invite){var v;const e=this.props.roomId,o=null===(v=_.a.get())||void 0===v?void 0:v.getRoom(e),a=null==o?void 0:o.isSpaceRoom();let s;if(t=a?Object(f.a)("Invite to %(spaceName)s",{spaceName:(null==o?void 0:o.name)||Object(f.a)("Unnamed Space")}):Object(f.a)("Invite to %(roomName)s",{roomName:(null==o?void 0:o.name)||Object(f.a)("Unnamed Room")}),s=a?d?Object(f.c)("Invite someone using their name, email address, username (like <userId/>) or <a>share this space</a>."):Object(f.c)("Invite someone using their name, username (like <userId/>) or <a>share this space</a>."):d?Object(f.c)("Invite someone using their name, email address, username (like <userId/>) or <a>share this room</a>."):Object(f.c)("Invite someone using their name, username (like <userId/>) or <a>share this room</a>."),n=Object(f.a)(s,{},{userId:()=>l.a.createElement("a",{href:Object(b.i)(g),rel:"noreferrer noopener",target:"_blank"},g),a:t=>l.a.createElement("a",{href:Object(b.h)(e),rel:"noreferrer noopener",target:"_blank"},t)}),r=Object(f.a)("Invite"),i=this.inviteUsers,p.isRoomEncrypted(this.props.roomId)){const e=p.getRoom(this.props.roomId).currentState.getStateEvents("m.room.history_visibility",""),t=e&&e.getContent()&&e.getContent().history_visibility;"world_readable"!==t&&"shared"!==t||(c=l.a.createElement("p",{className:"mx_InviteDialog_helpText"},l.a.createElement(m,{height:14,width:14})," "+Object(f.a)("Invited people will be able to read old messages.")))}}else this.props.kind===X.a.CallTransfer&&(t=Object(f.a)("Transfer"),o=l.a.createElement("div",{className:"mx_InviteDialog_transferConsultConnect"},l.a.createElement("label",null,l.a.createElement("input",{type:"checkbox",checked:this.state.consultFirst,onChange:this.onConsultFirstChange}),Object(f.a)("Consult first")),l.a.createElement(P.a,{kind:"secondary",onClick:this.onCancel,className:"mx_InviteDialog_transferConsultConnect_pushRight"},Object(f.a)("Cancel")),l.a.createElement(P.a,{kind:"primary",onClick:this.transferCall,className:"mx_InviteDialog_transferButton",disabled:!h&&""===this.state.dialPadValue},Object(f.a)("Transfer"))));const y=this.props.kind==X.a.CallTransfer?null:l.a.createElement(P.a,{kind:"primary",onClick:i,className:"mx_InviteDialog_goButton",disabled:this.state.busy||!h},r);let E=null,S=null;!this.canInviteMore()||this.hasFilterAtLeastOneEmail()&&!this.canInviteThirdParty()?S=l.a.createElement("div",{className:"mx_InviteDialog_oneThreepid"},Object(f.a)("Invites by email can only be sent one at a time")):E=l.a.createElement("div",{className:"mx_InviteDialog_userSections"},this.renderSection("recents"),this.renderSection("suggestions"),a);const w=l.a.createElement(l.a.Fragment,null,l.a.createElement("p",{className:"mx_InviteDialog_helpText"},n),l.a.createElement("div",{className:"mx_InviteDialog_addressBar"},this.renderEditor(),l.a.createElement("div",{className:"mx_InviteDialog_buttonAndSpinner"},y,e)),c,this.renderIdentityServerWarning(),l.a.createElement("div",{className:"error"},this.state.errorText),S,E,s);let T;if(this.props.kind===X.a.CallTransfer){const e=[];e.push(new U.a(te.UserDirectory,Object(f.c)("User Directory"),"mx_InviteDialog_userDirectoryIcon",w));const t=l.a.createElement(q.a,{onBackspacePress:this.onDeletePress});let n;n=0!==this.state.dialPadValue.length?l.a.createElement(B.a,{ref:this.numberEntryFieldRef,className:"mx_InviteDialog_dialPadField",id:"dialpad_number",value:this.state.dialPadValue,autoFocus:!0,onChange:this.onDialChange,postfixComponent:t}):l.a.createElement(B.a,{ref:this.numberEntryFieldRef,className:"mx_InviteDialog_dialPadField",id:"dialpad_number",value:this.state.dialPadValue,autoFocus:!0,onChange:this.onDialChange});const r=l.a.createElement("div",{className:"mx_InviteDialog_dialPad"},l.a.createElement("form",{onSubmit:this.onDialFormSubmit},n),l.a.createElement(j.a,{hasDial:!1,onDigitPress:this.onDigitPress,onDeletePress:this.onDeletePress}));e.push(new U.a(te.DialPad,Object(f.c)("Dial pad"),"mx_InviteDialog_dialPadIcon",r)),T=l.a.createElement(l.a.Fragment,null,l.a.createElement(U.c,{tabs:e,initialTabId:this.state.currentTabId,tabLocation:U.b.TOP,onChange:this.onTabChange}),o)}else T=l.a.createElement(l.a.Fragment,null,w,o);return l.a.createElement(H.a,{className:u()({mx_InviteDialog_transfer:this.props.kind===X.a.CallTransfer,mx_InviteDialog_other:this.props.kind!==X.a.CallTransfer,mx_InviteDialog_hasFooter:!!s}),hasCancel:!0,onFinished:this.props.onFinished,title:t,screenName:this.screenName},l.a.createElement("div",{className:"mx_InviteDialog_content"},T))}}a()(oe,"defaultProps",{kind:X.a.Dm,initialText:""})},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(13),i=n.n(r),o=n(1);class a{constructor(e){this.tagId=e,i()(this,"_n",0),i()(this,"_previews",!1),i()(this,"_collapsed",!1);const t=localStorage.getItem(this.key);if(t){const e=JSON.parse(t);this._n=e.numTiles,this._previews=e.showPreviews,this._collapsed=e.collapsed}}get isCollapsed(){return this._collapsed}set isCollapsed(e){this._collapsed=e,this.save()}get showPreviews(){return this._previews}set showPreviews(e){this._previews=e,this.save()}get tileHeight(){return 44}get key(){return`mx_sublist_layout_${this.tagId}_boxed`}get visibleTiles(){return 0===this._n?this.defaultVisibleTiles:Math.max(this._n,this.minVisibleTiles)}set visibleTiles(e){this._n=e,this.save()}get minVisibleTiles(){return 1}get defaultVisibleTiles(){return 8}tilesWithPadding(e,t){return this.pixelsToTiles(this.tilesToPixelsWithPadding(e,t))}tilesToPixelsWithPadding(e,t){return this.tilesToPixels(e)+t}tilesToPixels(e){return e*this.tileHeight}pixelsToTiles(e){return e/this.tileHeight}reset(){localStorage.removeItem(this.key)}save(){localStorage.setItem(this.key,JSON.stringify(this.serialize()))}serialize(){return{numTiles:this.visibleTiles,showPreviews:this.showPreviews,collapsed:this.isCollapsed}}}var s=n(202),l=n(124);class c extends s.a{constructor(){super(l.a),i()(this,"layoutMap",new Map)}static get instance(){return this.internalInstance||(this.internalInstance=new c,this.internalInstance.start()),c.internalInstance}ensureLayoutExists(e){this.layoutMap.has(e)||this.layoutMap.set(e,new a(e))}getLayoutFor(e){return this.layoutMap.has(e)||this.layoutMap.set(e,new a(e)),this.layoutMap.get(e)}async resetLayouts(){o.a.warn("Resetting layouts for room list");for(const e of this.layoutMap.values())e.reset()}async onNotReady(){this.layoutMap.clear()}async onAction(e){}}i()(c,"internalInstance",void 0),window.mxRoomListLayoutStore=c.instance},,function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(13),i=n.n(r),o=n(1345),a=n(149),s=n(1),l=n(368);const c=["sub","sup","del","u"],u=["text","softbreak","linebreak","paragraph","document"];function d(e){if(null!=e.literal&&null!=e.literal.match('^<((div|span) data-mx-maths="[^"]*"|/(div|span))>$'))return!0;const t=/^<\/?(.*)>$/.exec(e.literal);if(t&&2==t.length){const e=t[1];return c.indexOf(e)>-1}return!1}function h(e){let t=e;for(;t.parent;)t=t.parent;return t.firstChild!=t.lastChild}function p(e){let t=e,n="";for(;null!==t&&"softbreak"!==t.type&&"linebreak"!==t.type;){const{literal:e,type:r}=t;if("text"===r&&e){let t=0,r=e[t];for(;" "!==r&&null!==r&&t<=e.length&&" "!==r;)r&&(n+=r),t+=1,r=e[t];if(" "===r)break}t=t.next}return n}const m={emph:"_",strong:"__"},g=e=>{let t="";const n=e.walker();let r;for(;r=n.next();){const e=r.node,n=e.literal;r.entering&&"text"===e.type&&n&&(t+=n)}return t};class f{constructor(e){i()(this,"input",void 0),i()(this,"parsed",void 0),this.input=e;const t=new o.Parser;this.parsed=t.parse(this.input),this.parsed=this.repairLinks(this.parsed)}repairLinks(e){const t=e.walker();let n=null,r="",i=!1,a=null,c=!1;for(;n=t.next();){const{node:e}=n;if("paragraph"===e.type&&(i=!!n.entering),i){if("softbreak"===e.type||"linebreak"===e.type||"text"===e.type&&" "===e.literal){r="";continue}if("text"===e.type){const[n,...i]=e.literal.split(/( )/);e.literal=n,r+=n,i.reverse().forEach((n=>{if(n){const r=new o.Node("text");r.literal=n,e.insertAfter(r),t.resumeAt(r,!0)}}))}if(("emph"===e.type||"strong"===e.type)&&"text"===a.type)if(n.entering){const t=l.d.find(r);for(const{value:i}of t)if(e.firstChild.literal){const t=m[e.type],u=`${t}${g(e)}${t}`,d=i+u+p(e);if(1===l.d.find(d).length){const t=new o.Node("text");t.literal=u,a.insertAfter(t),e.firstChild.literal="",n=e.walker().next(),e.unlink(),a.insertAfter(n.node),c=!0}else s.a.error("Markdown links escaping found too many links for following text: ",r),s.a.error("Markdown links escaping found too many links for modified text: ",d)}}else c&&(e.unlink(),c=!1)}a=e}return e}isPlainText(){const e=this.parsed.walker();let t;for(;t=e.next();){const e=t.node;if(!(u.indexOf(e.type)>-1)){if("html_inline"!=e.type&&"html_block"!=e.type)return!1;if(d(e))return!1}}return!0}toHTML(){let{externalLinks:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=new o.HtmlRenderer({safe:!1,softbreak:"<br />"}),n=t.paragraph;return t.paragraph=function(e,t){var r;("block_quote"===(null===(r=e.parent)||void 0===r?void 0:r.type)||h(e))&&n.call(this,e,t)},t.link=function(t,n){const r=this.attrs(t);n?(r.push(["href",this.esc(t.destination)]),t.title&&r.push(["title",this.esc(t.title)]),e&&(r.push(["target","_blank"]),r.push(["rel","noreferrer noopener"])),this.tag("a",r)):this.tag("/a")},t.html_inline=function(e){d(e)?this.lit(e.literal):this.lit(Object(a.escape)(e.literal))},t.html_block=function(e){t.html_inline(e)},t.render(this.parsed)}toPlaintext(){const e=new o.HtmlRenderer({safe:!1});return e.paragraph=function(e,t){h(e)&&!t&&e.next&&this.lit("\n\n")},e.html_block=function(e){this.lit(e.literal),h(e)&&e.next&&this.lit("\n\n")},e.render(this.parsed)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return H})),n.d(t,"b",(function(){return K}));var r=n(13),i=n.n(r),o=n(130),a=n.n(o),s=n(129),l=n(120),c=n.n(l),u=n(169),d=n(133),h=n(221),p=n(128),m=n(124),g=n(141),f=n(121),_=n(122),b=n(159),v=n(125),y=n(167),E=n(156),S=n(220),w=n(190),T=n(153),C=n(226),x=n(208),F=n(178),D=n(146),k=n(185),O=n(249),I=n(150),A=n(162),R=n(286),N=n(176),M=n(148),P=n(126),L=n.n(P),B=n(246),U=n(756);function j(e){let{isSelected:t,isMinimized:n,notificationState:r,displayName:i,onClick:o,avatar:a}=e;const[,{onMouseOver:s,onMouseLeave:l}]=Object(U.a)((()=>!1)),d=L()({mx_ExtraTile:!0,mx_RoomTile:!0,mx_RoomTile_selected:t,mx_RoomTile_minimized:n});let h=null;r&&(h=c.a.createElement(B.a,{notification:r,forceCount:!1}));let p=i;"string"!=typeof p&&(p=""),p=p.replace(":",":");const m=L()({mx_RoomTile_title:!0,mx_RoomTile_titleHasUnreadEvents:null==r?void 0:r.isUnread});let g=c.a.createElement("div",{className:"mx_RoomTile_titleContainer"},c.a.createElement("div",{title:p,className:m,tabIndex:-1,dir:"auto"},p));n&&(g=null);let f=u.a;return n&&(f=u.b),c.a.createElement(f,{className:d,onMouseEnter:s,onMouseLeave:l,onClick:o,role:"treeitem",title:n?p:void 0},c.a.createElement("div",{className:"mx_RoomTile_avatarContainer"},a),c.a.createElement("div",{className:"mx_RoomTile_details"},c.a.createElement("div",{className:"mx_RoomTile_primaryDetails"},g,c.a.createElement("div",{className:"mx_RoomTile_badgeContainer"},h))))}var G=n(806),z=n(154);const H=[w.a.Invite,w.a.SavedItems,w.a.Favourite,w.a.DM,w.a.Untagged,w.a.LowPriority,w.a.ServerNotice,w.a.Suggested,w.a.Archived],q=[w.a.DM,w.a.Untagged],V=e=>{const t=e.current.getBoundingClientRect();return{chevronFace:I.a.None,left:t.left-7,top:t.top+t.height}},$={[w.a.Invite]:{sectionLabel:Object(f.c)("Invites"),isInvite:!0,defaultHidden:!1},[w.a.Favourite]:{sectionLabel:Object(f.c)("Favourites"),isInvite:!1,defaultHidden:!1},[w.a.SavedItems]:{sectionLabel:Object(f.c)("Saved Items"),isInvite:!1,defaultHidden:!1},[w.a.DM]:{sectionLabel:Object(f.c)("People"),isInvite:!1,defaultHidden:!1,AuxButtonComponent:e=>{let{tabIndex:t,dispatcher:n=m.a}=e;const[r,i,o,s]=Object(I.q)(),l=Object(g.b)(F.a.instance,x.d,(()=>F.a.instance.activeSpaceRoom)),u=Object(h.a)(E.a.CreateRooms),d=Object(h.a)(E.a.InviteUsers);if(l&&(u||d)){let e;if(r){const t=Object(O.c)(l);e=c.a.createElement(N.e,a()({},V(i),{onFinished:s,compact:!0}),c.a.createElement(N.c,{first:!0},u&&c.a.createElement(N.b,{label:Object(f.a)("Start new chat"),iconClassName:"mx_RoomList_iconStartChat",onClick:e=>{e.preventDefault(),e.stopPropagation(),s(),m.a.dispatch({action:"view_create_chat"}),b.b.trackInteraction("WebRoomListRoomsSublistPlusMenuCreateChatItem",e)}}),d&&c.a.createElement(N.b,{label:Object(f.a)("Invite to space"),iconClassName:"mx_RoomList_iconInvite",onClick:e=>{e.preventDefault(),e.stopPropagation(),s(),Object(O.i)(l)},disabled:!t,tooltip:t?void 0:Object(f.a)("You do not have permissions to invite people to this space")})))}return c.a.createElement(c.a.Fragment,null,c.a.createElement(I.c,{tabIndex:t,onClick:o,className:"mx_RoomSublist_auxButton",tooltipClassName:"mx_RoomSublist_addRoomTooltip","aria-label":Object(f.a)("Add people"),title:Object(f.a)("Add people"),isExpanded:r,inputRef:i}),e)}return!l&&u?c.a.createElement(M.a,{tabIndex:t,onClick:e=>{n.dispatch({action:"view_create_chat"}),b.b.trackInteraction("WebRoomListRoomsSublistPlusMenuCreateChatItem",e)},className:"mx_RoomSublist_auxButton",tooltipClassName:"mx_RoomSublist_addRoomTooltip","aria-label":Object(f.a)("Start chat"),title:Object(f.a)("Start chat")}):null}},[w.a.Untagged]:{sectionLabel:Object(f.c)("Rooms"),isInvite:!1,defaultHidden:!1,AuxButtonComponent:e=>{let{tabIndex:t}=e;const[n,r,i,o]=Object(I.q)(),l=Object(g.b)(F.a.instance,x.d,(()=>F.a.instance.activeSpaceRoom)),u=Object(h.a)(E.a.CreateRooms),d=Object(y.a)("feature_video_rooms"),v=Object(y.a)("feature_element_call_video_rooms");let S;if(n&&l){const e=l.currentState.maySendStateEvent(s.b.SpaceChild,_.a.get().getUserId());S=c.a.createElement(N.c,{first:!0},c.a.createElement(N.b,{label:Object(f.a)("Explore rooms"),iconClassName:"mx_RoomList_iconExplore",onClick:e=>{e.preventDefault(),e.stopPropagation(),o(),m.a.dispatch({action:p.a.ViewRoom,room_id:l.roomId,metricsTrigger:void 0}),b.b.trackInteraction("WebRoomListRoomsSublistPlusMenuExploreRoomsItem",e)}}),u?c.a.createElement(c.a.Fragment,null,c.a.createElement(N.b,{label:Object(f.a)("New room"),iconClassName:"mx_RoomList_iconNewRoom",onClick:e=>{e.preventDefault(),e.stopPropagation(),o(),Object(O.g)(l),b.b.trackInteraction("WebRoomListRoomsSublistPlusMenuCreateRoomItem",e)},disabled:!e,tooltip:e?void 0:Object(f.a)("You do not have permissions to create new rooms in this space")}),d&&c.a.createElement(N.b,{label:Object(f.a)("New video room"),iconClassName:"mx_RoomList_iconNewVideoRoom",onClick:e=>{e.preventDefault(),e.stopPropagation(),o(),Object(O.g)(l,v?s.j.UnstableCall:s.j.ElementVideo)},disabled:!e,tooltip:e?void 0:Object(f.a)("You do not have permissions to create new rooms in this space")},c.a.createElement(R.a,null)),c.a.createElement(N.b,{label:Object(f.a)("Add existing room"),iconClassName:"mx_RoomList_iconAddExistingRoom",onClick:e=>{e.preventDefault(),e.stopPropagation(),o(),Object(O.e)(l)},disabled:!e,tooltip:e?void 0:Object(f.a)("You do not have permissions to add rooms to this space")})):null)}else n&&(S=c.a.createElement(N.c,{first:!0},u&&c.a.createElement(c.a.Fragment,null,c.a.createElement(N.b,{label:Object(f.a)("New room"),iconClassName:"mx_RoomList_iconNewRoom",onClick:e=>{e.preventDefault(),e.stopPropagation(),o(),m.a.dispatch({action:"view_create_room"}),b.b.trackInteraction("WebRoomListRoomsSublistPlusMenuCreateRoomItem",e)}}),d&&c.a.createElement(N.b,{label:Object(f.a)("New video room"),iconClassName:"mx_RoomList_iconNewVideoRoom",onClick:e=>{e.preventDefault(),e.stopPropagation(),o(),m.a.dispatch({action:"view_create_room",type:v?s.j.UnstableCall:s.j.ElementVideo})}},c.a.createElement(R.a,null))),c.a.createElement(N.b,{label:Object(f.a)("Explore public rooms"),iconClassName:"mx_RoomList_iconExplore",onClick:e=>{e.preventDefault(),e.stopPropagation(),o(),b.b.trackInteraction("WebRoomListRoomsSublistPlusMenuExploreRoomsItem",e),m.a.fire(p.a.ViewRoomDirectory)}})));let w=null;return n&&(w=c.a.createElement(N.e,a()({},V(r),{onFinished:o,compact:!0}),S)),c.a.createElement(c.a.Fragment,null,c.a.createElement(I.c,{tabIndex:t,onClick:i,className:"mx_RoomSublist_auxButton",tooltipClassName:"mx_RoomSublist_addRoomTooltip","aria-label":Object(f.a)("Add room"),title:Object(f.a)("Add room"),isExpanded:n,inputRef:r}),w)}},[w.a.LowPriority]:{sectionLabel:Object(f.c)("Low priority"),isInvite:!1,defaultHidden:!1},[w.a.ServerNotice]:{sectionLabel:Object(f.c)("System Alerts"),isInvite:!1,defaultHidden:!1},[w.a.Archived]:{sectionLabel:Object(f.c)("Historical"),isInvite:!1,defaultHidden:!0},[w.a.Suggested]:{sectionLabel:Object(f.c)("Suggested Rooms"),isInvite:!1,defaultHidden:!1}};class K extends c.a.PureComponent{constructor(e){super(e),i()(this,"dispatcherRef",void 0),i()(this,"treeRef",Object(l.createRef)()),i()(this,"favouriteMessageWatcher",void 0),i()(this,"context",void 0),i()(this,"onRoomViewStoreUpdate",(()=>{var e;this.setState({currentRoomId:null!==(e=z.b.instance.roomViewStore.getRoomId())&&void 0!==e?e:void 0})})),i()(this,"onAction",(e=>{if(e.action===p.a.ViewRoomDelta){const t=e,n=z.b.instance.roomViewStore.getRoomId(),r=this.getRoomDelta(n,t.delta,t.unread);r&&m.a.dispatch({action:p.a.ViewRoom,room_id:r.roomId,show_room_tile:!0,metricsTrigger:"WebKeyboardShortcut",metricsViaKeyboard:!0})}else e.action===p.a.PstnSupportUpdated&&this.updateLists()})),i()(this,"getRoomDelta",(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=C.c.instance.orderedLists,i=[];H.forEach((t=>{let o=r[t];n&&(o=o.filter((t=>{const n=S.a.instance.getRoomState(t);return n.room.roomId===e||n.isUnread}))),i.push(...o)}));const o=i.findIndex((t=>t.roomId===e)),[a]=i.slice((o+t)%i.length);return a})),i()(this,"updateSuggestedRooms",(e=>{this.setState({suggestedRooms:e})})),i()(this,"updateLists",(()=>{const e=C.c.instance.orderedLists,t=Object.keys(this.state.sublists),n=Object.keys(e);let r=Object(D.d)(t,n);if(!r)for(const t of n){const n=this.state.sublists[t],i=e[t];if(n.length!==i.length){r=!0;break}}if(r){const t=Object(k.f)(e,n),r=Object(k.e)(t,((e,t)=>Object(D.b)(t)));this.setState({sublists:r},(()=>{this.props.onResize()}))}})),this.state={sublists:{},suggestedRooms:F.a.instance.suggestedRooms,feature_favourite_messages:v.b.getValue("feature_favourite_messages")}}componentDidMount(){var e=this;this.dispatcherRef=m.a.register(this.onAction),z.b.instance.roomViewStore.on(T.b,this.onRoomViewStoreUpdate),F.a.instance.on(x.e,this.updateSuggestedRooms),C.c.instance.on(C.b,this.updateLists),this.favouriteMessageWatcher=v.b.watchSetting("feature_favourite_messages",null,(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];let[,,,i]=n;e.setState({feature_favourite_messages:i})})),this.updateLists()}componentWillUnmount(){F.a.instance.off(x.e,this.updateSuggestedRooms),C.c.instance.off(C.b,this.updateLists),v.b.unwatchSetting(this.favouriteMessageWatcher),this.dispatcherRef&&m.a.unregister(this.dispatcherRef),z.b.instance.roomViewStore.off(T.b,this.onRoomViewStoreUpdate)}renderSuggestedRooms(){return this.state.suggestedRooms.map((e=>{var t;const n=e.name||e.canonical_alias||(null===(t=e.aliases)||void 0===t?void 0:t[0])||Object(f.a)("Empty room"),r=c.a.createElement(A.a,{oobData:{name:n,avatarUrl:e.avatar_url},width:32,height:32,resizeMethod:"crop"});return c.a.createElement(j,{isMinimized:this.props.isMinimized,isSelected:this.state.currentRoomId===e.room_id,displayName:n,avatar:r,onClick:t=>{var r;m.a.dispatch({action:p.a.ViewRoom,room_alias:e.canonical_alias||(null===(r=e.aliases)||void 0===r?void 0:r[0]),room_id:e.room_id,via_servers:e.viaServers,oob_data:{avatarUrl:e.avatar_url,name:n},metricsTrigger:"RoomList",metricsViaKeyboard:"click"!==t.type})},key:`suggestedRoomTile_${e.room_id}`})}))}renderFavoriteMessagesList(){const e=c.a.createElement(A.a,{oobData:{name:"Favourites"},width:32,height:32,resizeMethod:"crop"});return[c.a.createElement(j,{isMinimized:this.props.isMinimized,isSelected:!1,displayName:"Favourite Messages",avatar:e,onClick:()=>"",key:"favMessagesTile_key"})]}renderSublists(){var e;const t=!(null!==(e=this.state.suggestedRooms)&&void 0!==e&&e.length)&&Object.values(C.c.instance.orderedLists).every((e=>!(null!=e&&e.length)));return H.map((e=>{let n;e===w.a.Suggested?n=this.renderSuggestedRooms():this.state.feature_favourite_messages&&e===w.a.SavedItems&&(n=this.renderFavoriteMessagesList());const r=$[e];if(!r)throw new Error(`Tag ${e} does not have aesthetics`);let i=q.includes(e);(this.props.activeSpace===x.a.Favourites&&e!==w.a.Favourite||this.props.activeSpace===x.a.People&&e!==w.a.DM||this.props.activeSpace===x.a.Orphans&&e===w.a.DM||!Object(x.h)(this.props.activeSpace)&&e===w.a.DM&&!v.b.getValue("Spaces.showPeopleInSpace",this.props.activeSpace))&&(i=!1);let o=!1;return(this.props.activeSpace===x.a.Favourites&&e===w.a.Favourite||this.props.activeSpace===x.a.People&&e===w.a.DM)&&(o=!0),c.a.createElement(G.b,{key:`sublist-${e}`,tagId:e,forRooms:!0,startAsHidden:r.defaultHidden,label:r.sectionLabelRaw?r.sectionLabelRaw:Object(f.a)(r.sectionLabel),AuxButtonComponent:r.AuxButtonComponent,isMinimized:this.props.isMinimized,showSkeleton:t,extraTiles:n,resizeNotifier:this.props.resizeNotifier,alwaysVisible:i,onListCollapse:this.props.onListCollapse,forceExpanded:o})}))}focus(){var e,t;const n=null===(e=this.treeRef.current)||void 0===e?void 0:e.querySelectorAll('[role="treeitem"]');n&&(null===(t=[...n].find((e=>null!==e.offsetParent)))||void 0===t||t.focus())}render(){const e=this.renderSublists();return c.a.createElement(u.d,{handleHomeEnd:!0,handleUpDown:!0,onKeyDown:this.props.onKeyDown},(t=>{let{onKeyDownHandler:n}=t;return c.a.createElement("div",{onFocus:this.props.onFocus,onBlur:this.props.onBlur,onKeyDown:n,className:"mx_RoomList",role:"tree","aria-label":Object(f.a)("Rooms"),ref:this.treeRef},e)}))}}i()(K,"contextType",d.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r,i=n(13),o=n.n(i),a=n(120),s=n.n(a),l=n(378);function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}function u(e){return a.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 15 18",role:"presentation","aria-hidden":!0},e),r||(r=a.createElement("g",{stroke:"#B8BEC9",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("path",{d:"M8.313 1H2.625C1.728 1 1 1.716 1 2.6v12.8c0 .884.728 1.6 1.625 1.6h9.75c.897 0 1.625-.716 1.625-1.6V6.6L8.312 1z"}),a.createElement("path",{d:"M8.313 1v5.6H14"}))))}var d=n(121),h=n(699),p=n(135),m=n(145);class g extends s.a.Component{constructor(e){super(e),o()(this,"objectUrl",void 0),o()(this,"mimeType",void 0),o()(this,"onCancelClick",(()=>{this.props.onFinished(!1)})),o()(this,"onUploadClick",(()=>{this.props.onFinished(!0)})),o()(this,"onUploadAllClick",(()=>{this.props.onFinished(!0,!0)})),this.mimeType=Object(h.a)(e.file.type);const t=new Blob([e.file],{type:this.mimeType});this.objectUrl=URL.createObjectURL(t)}componentWillUnmount(){this.objectUrl&&URL.revokeObjectURL(this.objectUrl)}render(){let e;e=this.props.totalFiles>1&&void 0!==this.props.currentIndex?Object(d.a)("Upload files (%(current)s of %(total)s)",{current:this.props.currentIndex+1,total:this.props.totalFiles}):Object(d.a)("Upload files");const t=`mx-uploadconfirmdialog-${this.props.file.name}`;let n,r,i;return this.mimeType.startsWith("image/")?n=s.a.createElement("img",{className:"mx_UploadConfirmDialog_imagePreview",src:this.objectUrl,"aria-labelledby":t}):this.mimeType.startsWith("video/")?n=s.a.createElement("video",{className:"mx_UploadConfirmDialog_imagePreview",src:this.objectUrl,playsInline:!0,controls:!1}):r=s.a.createElement(u,{className:"mx_UploadConfirmDialog_fileIcon",height:18,width:18}),this.props.currentIndex+1<this.props.totalFiles&&(i=s.a.createElement("button",{onClick:this.onUploadAllClick},Object(d.a)("Upload all"))),s.a.createElement(p.a,{className:"mx_UploadConfirmDialog",fixedWidth:!1,onFinished:this.onCancelClick,title:e,contentId:"mx_Dialog_content"},s.a.createElement("div",{id:"mx_Dialog_content"},s.a.createElement("div",{className:"mx_UploadConfirmDialog_previewOuter"},s.a.createElement("div",{className:"mx_UploadConfirmDialog_previewInner"},n&&s.a.createElement("div",null,n),s.a.createElement("div",{id:t},r,this.props.file.name," (",Object(l.filesize)(this.props.file.size),")")))),s.a.createElement(m.a,{primaryButton:Object(d.a)("Upload"),hasCancel:!1,onPrimaryButtonClick:this.onUploadClick,focus:!0},i))}}o()(g,"defaultProps",{totalFiles:1})},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(1),i=n(676);var o=n(127),a=n(285),s=n(121),l=n(226),c=n(294),u=n(190),d=n(144);class h{static tagRoom(e,t,n,h,p,m){let g=null;const f=l.c.instance;if(h&&f.getTagSorting(h)===c.b.Manual){const e=[...f.orderedLists[h]];e.sort(((e,t)=>e.tags[h].order-t.tags[h].order));const t=h===n&&p<m?1:0,r=t+m-1,i=t+m,o=r<=0?0:e[r].tags[h].order,a=i>=e.length?1:e[i].tags[h].order;g={order:(o+a)/2}}return _="RoomListActions.tagRoom",b=()=>{const i=[],l=t.roomId;if(void 0===n&&h===u.a.DM||n===u.a.DM&&void 0===h)return a.c(t,h===u.a.DM).catch((e=>{r.a.error("Failed to set DM tag "+e),o.b.createDialog(d.a,{title:Object(s.a)("Failed to set direct message tag"),description:e&&e.message?e.message:Object(s.a)("Operation failed")})}));const c=n!==h;if(n&&n!==u.a.DM&&c){const t=e.deleteRoomTag(l,n).catch((function(e){r.a.error("Failed to remove tag "+n+" from room: "+e),o.b.createDialog(d.a,{title:Object(s.a)("Failed to remove tag %(tagName)s from room",{tagName:n}),description:e&&e.message?e.message:Object(s.a)("Operation failed")})}));i.push(t)}if(h&&h!==u.a.DM&&(c||g)){g=g||{};const t=e.setRoomTag(l,h,g).catch((function(e){throw r.a.error("Failed to add tag "+h+" to room: "+e),o.b.createDialog(d.a,{title:Object(s.a)("Failed to add tag %(tagName)s to room",{tagName:h}),description:e&&e.message?e.message:Object(s.a)("Operation failed")}),e}));i.push(t)}return Promise.all(i)},v=()=>({room:t,oldTag:n,newTag:h,metaData:g}),new i.a((e=>{e({action:_+".pending",request:"function"==typeof v?v():void 0}),b().then((t=>{e({action:_+".success",result:t})})).catch((t=>{e({action:_+".failure",err:t})}))}));var _,b,v}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return u})),n.d(t,"d",(function(){return s})),n.d(t,"c",(function(){return l}));var r=n(120),i=n.n(r);const o=Object(r.lazy)((()=>Promise.all([n.e(0),n.e(9),n.e(10),n.e(41)]).then(n.bind(null,1568)))),a=Object(r.lazy)((()=>Promise.all([n.e(0),n.e(9),n.e(35)]).then(n.bind(null,1569)))),s=async(e,t,r)=>{const{sendMessage:i}=await Promise.all([n.e(0),n.e(36)]).then(n.bind(null,926));return i(e,t,r)},l=async()=>{const{richToPlain:e,plainToRich:t}=await n.e(0).then(n.t.bind(null,643,7));return{richToPlain:e,plainToRich:t}};function c(e){return i.a.createElement(r.Suspense,{fallback:i.a.createElement("div",null)},i.a.createElement(o,e))}function u(e){return i.a.createElement(r.Suspense,{fallback:i.a.createElement("div",null)},i.a.createElement(a,e))}},function(e,t,n){"use strict";var r=n(120),i=n.n(r),o=n(160),a=n(129),s=n(335),l=n(121),c=n(123),u=n(162),d=n(178),h=n(127),p=n(140),m=n(135),g=n(334),f=n(212),_=n(177),b=n(133);const v=e=>{let{room:t,checked:n,onChange:r}=e;const o=t instanceof p.c;let a;if(o){a=Object(l.a)("%(count)s members",{count:t.getJoinedMemberCount()});const e=d.a.instance.getChildRooms(t.roomId).length;e>0&&(a+=" · "+Object(l.a)("%(count)s rooms",{count:e}))}return i.a.createElement("label",{className:"mx_ManageRestrictedJoinRuleDialog_entry"},i.a.createElement("div",null,i.a.createElement("div",null,o?i.a.createElement(u.a,{room:t,height:20,width:20}):i.a.createElement(u.a,{oobData:t,height:20,width:20}),i.a.createElement("span",{className:"mx_ManageRestrictedJoinRuleDialog_entry_name"},t.name)),a&&i.a.createElement("div",{className:"mx_ManageRestrictedJoinRuleDialog_entry_description"},a)),i.a.createElement(_.b,{onChange:r?e=>r(e.target.checked):null,checked:n,disabled:!r}))},y=(e,t)=>{const n=t.client;Array.from(d.a.instance.getKnownParents(t.roomId)).map((e=>n.getRoom(e))).forEach((t=>{e.has(t)||(e.add(t),y(e,t))}))};var E=e=>{let{room:t,selected:n=[],onFinished:o}=e;const a=t.client,[s,u]=Object(r.useState)(new Set(n)),[d,h]=Object(r.useState)(""),p=d.toLowerCase().trim(),[_,E]=Object(r.useMemo)((()=>{const e=new Set;return y(e,t),[Array.from(e),n.map((e=>{const t=a.getRoom(e);return t?"join"===t.getMyMembership()&&t.isSpaceRoom()?void 0:t:{roomId:e,name:e}})).filter(Boolean)]}),[a,n,t]),[S,w]=Object(r.useMemo)((()=>[_.filter((e=>e.name.toLowerCase().includes(p))),E.filter((e=>e.name.toLowerCase().includes(p)))]),[_,E,p]),T=(e,t)=>{e?s.add(t.roomId):s.delete(t.roomId),u(new Set(s))};let C;return s.size<1&&(C=i.a.createElement("div",{className:"mx_ManageRestrictedJoinRuleDialog_section_info"},Object(l.a)("You're removing all spaces. Access will default to invite only"))),i.a.createElement(m.a,{title:Object(l.a)("Select spaces"),className:"mx_ManageRestrictedJoinRuleDialog",onFinished:o,fixedWidth:!1},i.a.createElement("p",null,Object(l.a)("Decide which spaces can access this room. If a space is selected, its members can find and join <RoomName/>.",{},{RoomName:()=>i.a.createElement("b",null,t.name)})),i.a.createElement(b.a.Provider,{value:a},i.a.createElement(g.a,{className:"mx_textinput_icon mx_textinput_search",placeholder:Object(l.a)("Search spaces"),onSearch:h,autoFocus:!0}),i.a.createElement(f.a,{className:"mx_ManageRestrictedJoinRuleDialog_content"},S.length>0?i.a.createElement("div",{className:"mx_ManageRestrictedJoinRuleDialog_section"},i.a.createElement("h3",null,t.isSpaceRoom()?Object(l.a)("Spaces you know that contain this space"):Object(l.a)("Spaces you know that contain this room")),S.map((e=>i.a.createElement(v,{key:e.roomId,room:e,checked:s.has(e.roomId),onChange:t=>{T(t,e)}})))):void 0,w.length>0?i.a.createElement("div",{className:"mx_ManageRestrictedJoinRuleDialog_section"},i.a.createElement("h3",null,Object(l.a)("Other spaces or rooms you might not know")),i.a.createElement("div",{className:"mx_ManageRestrictedJoinRuleDialog_section_info"},i.a.createElement("div",null,Object(l.a)("These are likely ones other room admins are a part of."))),w.map((e=>i.a.createElement(v,{key:e.roomId,room:e,checked:s.has(e.roomId),onChange:t=>{T(t,e)}})))):null,S.length+w.length<1?i.a.createElement("span",{className:"mx_ManageRestrictedJoinRuleDialog_noResults"},Object(l.a)("No results")):void 0),i.a.createElement("div",{className:"mx_ManageRestrictedJoinRuleDialog_footer"},C,i.a.createElement("div",{className:"mx_ManageRestrictedJoinRuleDialog_footer_buttons"},i.a.createElement(c.a,{kind:"primary_outline",onClick:()=>o()},Object(l.a)("Cancel")),i.a.createElement(c.a,{kind:"primary",onClick:()=>o(Array.from(s))},Object(l.a)("Confirm"))))))},S=n(810),w=n(391),T=n(146),C=n(850),x=n(124),F=n(404),D=n(128),k=n(807);t.a=e=>{var t;let{room:n,promptUpgrade:r,aliasWarning:p,onError:m,beforeChange:g,closeSettingsFn:f}=e;const _=n.client,b=Object(k.b)(n.getVersion(),k.a.RestrictedRooms),v=!b&&r?k.a.RestrictedRooms:void 0,y=!n.currentState.mayClientSendStateEvent(a.b.RoomJoinRules,_),[O,I]=Object(C.a)((()=>{var e;return null===(e=n.currentState.getStateEvents(a.b.RoomJoinRules,""))||void 0===e?void 0:e.getContent()}),(e=>_.sendStateEvent(n.roomId,a.b.RoomJoinRules,e,"")),m),{join_rule:A=o.c.Invite}=O||{},R=A===o.c.Restricted?null===(t=O.allow)||void 0===t?void 0:t.filter((e=>e.type===o.e.RoomMembership)).map((e=>e.room_id)):void 0,N=async()=>{var e;let t=R;null!==(e=t)&&void 0!==e&&e.length||!d.a.instance.activeSpaceRoom||(t=[d.a.instance.activeSpaceRoom.roomId]);const{finished:r}=h.b.createDialog(E,{room:n,selected:t},"mx_ManageRestrictedJoinRuleDialog_wrapper"),[i]=await r;return i},M=[{value:o.c.Invite,label:Object(l.a)("Private (invite only)"),description:Object(l.a)("Only invited people can join."),checked:A===o.c.Invite||A===o.c.Restricted&&!(null!=R&&R.length)},{value:o.c.Public,label:Object(l.a)("Public"),description:i.a.createElement(i.a.Fragment,null,Object(l.a)("Anyone can find and join."),p)}];if(b||v||A===o.c.Restricted){let e,t;if(v&&(e=i.a.createElement("span",{className:"mx_JoinRuleSettings_upgradeRequired"},Object(l.a)("Upgrade required"))),A===o.c.Restricted&&null!=R&&R.length){const e=R.map((e=>_.getRoom(e))).filter((e=>null==e?void 0:e.isSpaceRoom())).slice(0,4);let n;e.length<R.length&&(n=e.length>0?Object(l.a)("& %(count)s more",{count:R.length-e.length}):Object(l.a)("Currently, %(count)s spaces have access",{count:R.length}));const r=e=>{Object(T.d)(R||[],e)&&(e.length?I({join_rule:o.c.Restricted,allow:e.map((e=>({type:o.e.RoomMembership,room_id:e})))}):I({join_rule:o.c.Invite}))},a=async()=>{const e=await N();Array.isArray(e)&&(e.length>0?r(e):P(o.c.Invite))};t=i.a.createElement("div",null,i.a.createElement("span",null,Object(l.a)("Anyone in a space can find and join. <a>Edit which spaces can access here.</a>",{},{a:e=>i.a.createElement(c.a,{disabled:y,onClick:a,kind:"link_inline"},e)})),i.a.createElement("div",{className:"mx_JoinRuleSettings_spacesWithAccess"},i.a.createElement("h4",null,Object(l.a)("Spaces with access")),e.map((e=>i.a.createElement("span",{key:e.roomId},i.a.createElement(u.a,{room:e,height:32,width:32}),e.name))),n&&i.a.createElement("span",null,n)))}else t=d.a.instance.activeSpaceRoom?Object(l.a)("Anyone in <spaceName/> can find and join. You can select other spaces too.",{},{spaceName:()=>i.a.createElement("b",null,d.a.instance.activeSpaceRoom.name)}):Object(l.a)("Anyone in a space can find and join. You can select multiple spaces.");M.splice(1,0,{value:o.c.Restricted,label:i.a.createElement(i.a.Fragment,null,Object(l.a)("Space members"),e),description:t,checked:A===o.c.Restricted&&!(null==R||!R.length)})}const P=async e=>{const t=O.join_rule;let r;if(e===o.c.Restricted){var s;if(t===o.c.Restricted||b){if(r=await N(),!Array.isArray(r))return}else if(v){const e=v;let t;const r=_.getUserId();return Array.from(d.a.instance.getKnownParents(n.roomId)).some((e=>{var t;return!(null!==(t=_.getRoom(e))&&void 0!==t&&t.currentState.maySendStateEvent(a.b.SpaceChild,r))}))&&(t=i.a.createElement("b",null,Object(l.a)("This room is in some spaces you're not an admin of. In those spaces, the old room will still be shown, but people will be prompted to join the new one."))),void h.b.createDialog(S.a,{roomId:n.roomId,targetVersion:e,description:i.a.createElement(i.a.Fragment,null,Object(l.a)("This upgrade will allow members of selected spaces access to this room without an invite."),t),doUpgrade:async(t,r)=>{const i=await Object(w.b)(n,e,t.invite,!0,!0,!0,(e=>{const t=2+e.updateSpacesTotal+e.inviteUsersTotal;e.roomUpgraded?e.roomSynced?e.inviteUsersProgress<e.inviteUsersTotal?r(Object(l.a)("Sending invites... (%(progress)s out of %(count)s)",{progress:e.inviteUsersProgress,count:e.inviteUsersTotal}),2+e.inviteUsersProgress,t):e.updateSpacesProgress<e.updateSpacesTotal&&r(Object(l.a)("Updating spaces... (%(progress)s out of %(count)s)",{progress:e.updateSpacesProgress,count:e.updateSpacesTotal}),2+e.inviteUsersProgress+e.updateSpacesProgress,t):r(Object(l.a)("Loading new room"),1,t):r(Object(l.a)("Upgrading room"),0,t)}));f(),x.a.dispatch({action:D.a.ViewRoom,room_id:i,metricsTrigger:void 0}),x.a.dispatch({action:"open_room_settings",initial_tab_id:F.b})}})}null!==(s=r)&&void 0!==s&&s.length||(e=o.c.Invite)}if(t===e&&!r)return;if(g&&!await g(e))return;const c={join_rule:e};var u;e===o.c.Restricted&&(c.allow=null===(u=r)||void 0===u?void 0:u.map((e=>({type:o.e.RoomMembership,room_id:e}))));I(c)};return i.a.createElement(s.a,{name:"joinRule",value:A,onChange:P,definitions:M,disabled:y,className:"mx_JoinRuleSettings_radioButton"})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r,i=n(120),o=n.n(i),a=n(126),s=n.n(a),l=n(121);function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}function u(e){return i.createElement("svg",c({fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",role:"presentation","aria-hidden":!0},e),r||(r=i.createElement("path",{d:"M10.667 1.333H9.333V.667C9.333.3 9.033 0 8.667 0H3.333c-.366 0-.666.3-.666.667v.666H1.333C.6 1.333 0 1.933 0 2.667v.666c0 1.7 1.28 3.087 2.927 3.294A3.34 3.34 0 005.333 8.6v2.067h-2c-.366 0-.666.3-.666.666 0 .367.3.667.666.667h5.334c.366 0 .666-.3.666-.667 0-.366-.3-.666-.666-.666h-2V8.6a3.34 3.34 0 002.406-1.973C10.72 6.42 12 5.033 12 3.333v-.666c0-.734-.6-1.334-1.333-1.334zm-9.334 2v-.666h1.334v2.546a2.007 2.007 0 01-1.334-1.88zm9.334 0c0 .867-.56 1.6-1.334 1.88V2.667h1.334v.666z",fill:"currentColor"})))}var d=n(258);const h=e=>{let{isWinner:t,answer:n,voteCount:r,displayVoteCount:i}=e;const a=i?Object(l.a)("%(count)s votes",{count:r}):"";return o.a.createElement("div",{className:"mx_PollOption_content"},o.a.createElement("div",{className:"mx_PollOption_optionText"},n.text),o.a.createElement("div",{className:"mx_PollOption_optionVoteCount"},t&&o.a.createElement(u,{className:"mx_PollOption_winnerIcon"}),a))},p=e=>{let{isChecked:t,children:n,answer:r}=e;return o.a.createElement("div",{className:s()("mx_PollOption_endedOption",{mx_PollOption_endedOptionWinner:t}),"data-value":r.id},n)},m=e=>{let{pollId:t,isChecked:n,children:r,answer:i,onOptionSelected:a}=e;return o.a.createElement(d.a,{className:"mx_PollOption_live-option",name:`poll_answer_select-${t}`,value:i.id,checked:n,onChange:()=>null==a?void 0:a(i.id)},r)},g=e=>{let{pollId:t,answer:n,voteCount:r,totalVoteCount:i,displayVoteCount:a,isEnded:l,isChecked:c,onOptionSelected:u}=e;const d=s()({mx_PollOption:!0,mx_PollOption_checked:c,mx_PollOption_ended:l}),g=l&&c,f=0===i?0:Math.round(100*r/i),_=l?p:m;return o.a.createElement("div",{"data-testid":`pollOption-${n.id}`,className:d,onClick:()=>null==u?void 0:u(n.id)},o.a.createElement(_,{pollId:t,answer:n,isChecked:c,onOptionSelected:u},o.a.createElement(h,{isWinner:g,answer:n,voteCount:r,displayVoteCount:a})),o.a.createElement("div",{className:"mx_PollOption_popularityBackground"},o.a.createElement("div",{className:"mx_PollOption_popularityAmount",style:{width:`${f}%`}})))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(13),i=n.n(r);function o(e,t){const n=Math.min(e.length,t.length);for(let r=0;r<n;++r)if(e[r]!==t[r])return r;return n}function a(e,t,n){const r=n-(t.length-e.length);return function(e,t){const n=Math.min(e.length,t.length),r=e.slice(0,n)===t.slice(0,n);if(r&&e.length>t.length)return{removed:e.slice(n),at:n};if(r&&e.length<t.length)return{added:t.slice(n),at:n};{const n=o(e,t);return{removed:e.slice(n),added:t.slice(n),at:n}}}(e.substring(0,r),t.substring(0,n))}var s=n(758),l=n(569);class c{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.updateCallback=n,i()(this,"_parts",void 0),i()(this,"_partCreator",void 0),i()(this,"activePartIdx",null),i()(this,"_autoComplete",null),i()(this,"autoCompletePartIdx",null),i()(this,"autoCompletePartCount",0),i()(this,"transformCallback",null),i()(this,"onAutoComplete",(e=>{var t;let n,{replaceParts:r,close:i}=e;if(r){this._parts.splice(this.autoCompletePartIdx,this.autoCompletePartCount,...r),this.autoCompletePartCount=r.length;const e=r[r.length-1],t=this.autoCompletePartIdx+r.length-1;n=new s.a(t,e.text.length)}i&&(this._autoComplete=null,this.autoCompletePartIdx=null,this.autoCompletePartCount=0),null===(t=this.updateCallback)||void 0===t||t.call(this,n)})),this._parts=e,this._partCreator=t,this.transformCallback=null}setTransformCallback(e){this.transformCallback=e}setUpdateCallback(e){this.updateCallback=e}get partCreator(){return this._partCreator}get isEmpty(){return 0===this._parts.reduce(((e,t)=>e+t.text.length),0)}clone(){const e=this.parts.map((e=>this.partCreator.deserializePart(e.serialize())));return new c(e,this._partCreator,this.updateCallback)}insertPart(e,t){this._parts.splice(e,0,t),this.activePartIdx>=e&&++this.activePartIdx,this.autoCompletePartIdx>=e&&++this.autoCompletePartIdx}removePart(e){this._parts.splice(e,1),e===this.activePartIdx?this.activePartIdx=null:this.activePartIdx>e&&--this.activePartIdx,e===this.autoCompletePartIdx?this.autoCompletePartIdx=null:this.autoCompletePartIdx>e&&--this.autoCompletePartIdx}replacePart(e,t){this._parts.splice(e,1,t)}get parts(){return this._parts}get autoComplete(){return this.activePartIdx===this.autoCompletePartIdx?this._autoComplete:null}getPositionAtEnd(){if(this._parts.length){const e=this._parts.length-1,t=this._parts[e];return new s.a(e,t.text.length)}return new s.a(-1,0)}serializeParts(){return this._parts.map((e=>e.serialize()))}diff(e,t,n){const r=this.parts.reduce(((e,t)=>e+t.text),"");return"deleteByDrag"===t?function(e,t){if(e===t)return{};const n=o(e,t),r=e.length-t.length;return{at:n,removed:e.slice(n,n+r)}}(r,e):a(r,e,n.offset)}reset(e,t,n){this._parts=e.map((e=>this._partCreator.deserializePart(e))),t||(t=this.getPositionAtEnd()),this._autoComplete&&(this._autoComplete=null,this.autoCompletePartIdx=null),this.updateCallback(t,n)}insert(e,t){const n=this.splitAt(t);let r=0;for(let t=0;t<e.length;++t){const i=e[t];r+=i.text.length,this.insertPart(n+t,i)}return r}update(e,t,n){var r;const i=this.diff(e,t,n),o=this.positionForOffset(i.at,n.atNodeEnd);let a=0;i.removed&&(a=this.removeText(o,i.removed.length));let s=0;i.added&&(s=this.addText(o,i.added,t)),this.mergeAdjacentParts();const l=i.at-a+s;let c=this.positionForOffset(l,!0);const u="insertFromPaste"!==t&&"insertFromDrop"!==t,d=this.setActivePart(c,u);if(this.transformCallback){const e=this.getTransformAddedLen(c,t,i);c=this.positionForOffset(l+e,!0)}return null===(r=this.updateCallback)||void 0===r||r.call(this,c,t,i),d}getTransformAddedLen(e,t,n){var r;const i=null===(r=this.transformCallback)||void 0===r?void 0:r.call(this,e,t,n);return Number.isFinite(i)?i:0}setActivePart(e,t){const{index:n}=e,r=this._parts[n];if(r){if(n!==this.activePartIdx&&(this.activePartIdx=n,t&&this.activePartIdx!==this.autoCompletePartIdx)){const e=r.createAutoComplete(this.onAutoComplete);e&&(this._autoComplete=e,this.autoCompletePartIdx=n,this.autoCompletePartCount=1)}if(this.autoComplete)return this.autoComplete.onPartUpdate(r,e)}else this.activePartIdx=null,this._autoComplete=null,this.autoCompletePartIdx=null,this.autoCompletePartCount=0;return Promise.resolve()}mergeAdjacentParts(){let e;for(let r=0;r<this._parts.length;++r){var t,n;let i=this._parts[r];const o=!i.text.length,a=!o&&e&&(null===(t=(n=e).merge)||void 0===t?void 0:t.call(n,i));(o||a)&&(i=e,this.removePart(r),--r),e=i}}removeText(e,t){let{index:n,offset:r}=e,i=0;for(;t>0;){let e=this._parts[n];const o=Math.min(t,e.text.length-r);if(o)if(e.canEdit){const t=e.remove(r,o);"string"==typeof t&&this.replacePart(n,this._partCreator.createDefaultPart(t)),e=this._parts[n],e.text.length?n+=1:this.removePart(n)}else i+=r,this.removePart(n);else n+=1;t-=o,r=0}return i}splitAt(e){if(-1===e.index)return 0;if(0===e.offset)return e.index;const t=this._parts[e.index];if(e.offset>=t.text.length)return e.index+1;const n=t.split(e.offset);return this.insertPart(e.index+1,n),e.index+1}addText(e,t,n){let{index:r}=e;const{offset:i}=e;let o=t.length;const a=this._parts[r];if(a)if(a.canEdit)if(a.validateAndInsert(i,t,n))t=null;else{const e=a.split(i);r+=1,this.insertPart(r,e)}else 0!==i&&(o+=a.text.length-i,r+=1);else r<0&&(r=0);let s=t;for(;s;){const e=this._partCreator.createPartForInput(s,r,n),t=s;if(s=e.appendUntilRejected(s,n),s===t){console.error(`Failed to update model for input (str ${s}) (type ${n})`);break}this.insertPart(r,e),r+=1}return o}positionForOffset(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0;const r=this._parts.findIndex((r=>{const i=r.text.length;return!!(t&&n+i>=e||!t&&n+i>e)||(n+=i,!1)}));return-1===r?this.getPositionAtEnd():new s.a(r,e-n)}startRange(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return new l.a(this,e,t)}replaceRange(e,t,n){const r=t.asOffset(this),i=this.splitAt(e);t=r.asPosition(this);for(let e=this.splitAt(t)-1;e>=i;--e)this.removePart(e);let o=i;for(const e of n)this.insertPart(o,e),o+=1;this.mergeAdjacentParts()}transform(e){var t;const n=e();let r=null;return r=n instanceof l.a?Promise.resolve():this.setActivePart(n,!0),null===(t=this.updateCallback)||void 0===t||t.call(this,n),r}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return _}));var r=n(120),i=n.n(r),o=n(832),a=n(833),s=n(834),l=n(596),c=n(13),u=n.n(c),d=n(146),h=n(836),p=n(251),m=n(290);class g extends i.a.PureComponent{constructor(e){super(e),u()(this,"onWaveformUpdate",(e=>{this.setState({heights:this.toHeights(e)})})),u()(this,"onTimeUpdate",(e=>{const t=Number(Object(m.c)(e[0],0,e[1]).toFixed(3));this.setState({progress:t})})),this.state={heights:this.toHeights(this.props.playback.waveform),progress:0},this.props.playback.waveformData.onUpdate(this.onWaveformUpdate),this.props.playback.clockInfo.liveData.onUpdate(this.onTimeUpdate)}toHeights(e){const t=Object(d.h)(0,p.b);return Object(d.j)(e,p.b,t)}render(){return i.a.createElement(h.a,{relHeights:this.state.heights,progress:this.state.progress})}}let f;!function(e){e[e.Composer=0]="Composer",e[e.Timeline=1]="Timeline"}(f||(f={}));class _ extends s.a{renderComposerLook(){return i.a.createElement(i.a.Fragment,null,i.a.createElement(a.a,{playback:this.props.playback}),i.a.createElement(g,{playback:this.props.playback}))}renderTimelineLook(){return i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:"mx_RecordingPlayback_timelineLayoutMiddle"},i.a.createElement(g,{playback:this.props.playback}),i.a.createElement(l.a,{playback:this.props.playback,tabIndex:0,disabled:this.state.playbackPhase===p.d.Decoding,ref:this.seekRef})),i.a.createElement(a.a,{playback:this.props.playback}))}renderComponent(){let e;switch(this.props.layout){case f.Composer:e=this.renderComposerLook();break;case f.Timeline:default:e=this.renderTimelineLook()}return i.a.createElement("div",{className:"mx_MediaBody mx_VoiceMessagePrimaryContainer",onKeyDown:this.onKeyDown},i.a.createElement(o.a,{playback:this.props.playback,playbackPhase:this.state.playbackPhase,ref:this.playPauseRef}),e)}}},,function(e,t,n){"use strict";t.a=n.p+"olm.4d35bbd.wasm"},function(e,t){var n,r,i,o,a,s,l=(a={},i="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,"undefined"!=typeof __filename&&(i=i||__filename),s=function(t){var o,s,l,c;if(t=t||{},o||(o=void 0!==t?t:{}),o.ready=new Promise((function(e,t){s=e,l=t})),"undefined"!=typeof window)c=function(e){window.crypto.getRandomValues(e)};else{if(!e.exports)throw Error("Cannot find global to attach library to");var u=require("crypto");c=function(e){var t=u.randomBytes(e.length);e.set(t)},process=global.process}if("undefined"!=typeof OLM_OPTIONS)for(var d in OLM_OPTIONS)OLM_OPTIONS.hasOwnProperty(d)&&(o[d]=OLM_OPTIONS[d]);o.onRuntimeInitialized=function(){Se=o._olm_error(),a.PRIVATE_KEY_LENGTH=o._olm_pk_private_key_length(),n&&n()},o.onAbort=function(e){r&&r(e)};var h,p={};for(h in o)o.hasOwnProperty(h)&&(p[h]=o[h]);var m,g,f,_,b,v="object"==typeof window,y="function"==typeof importScripts,E="";"object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node?(E=y?require("path").dirname(E)+"/":__dirname+"/",m=function(e,t){return _||(_=require("fs")),b||(b=require("path")),e=b.normalize(e),_.readFileSync(e,t?null:"utf8")},f=function(e){return(e=m(e,!0)).buffer||(e=new Uint8Array(e)),e.buffer||X("Assertion failed: undefined"),e},g=function(e,t,n){_||(_=require("fs")),b||(b=require("path")),e=b.normalize(e),_.readFile(e,(function(e,r){e?n(e):t(r.buffer)}))},1<process.argv.length&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),process.on("uncaughtException",(function(e){throw e})),process.on("unhandledRejection",(function(e){throw e})),o.inspect=function(){return"[Emscripten Module object]"}):(v||y)&&(y?E=self.location.href:"undefined"!=typeof document&&document.currentScript&&(E=document.currentScript.src),i&&(E=i),E=0!==E.indexOf("blob:")?E.substr(0,E.replace(/[?#].*/,"").lastIndexOf("/")+1):"",m=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},y&&(f=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),g=function(e,t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=function(){200==r.status||0==r.status&&r.response?t(r.response):n()},r.onerror=n,r.send(null)}),o.print||console.log.bind(console);var S,w=o.printErr||console.warn.bind(console);for(h in p)p.hasOwnProperty(h)&&(o[h]=p[h]);function T(e){var t="i8";switch("*"===t.charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":D[e>>0]=0;break;case"i16":O[e>>1]=0;break;case"i32":I[e>>2]=0;break;case"i64":K=[0,1<=+Math.abs(0)?~~+Math.ceil(0)>>>0:0],I[e>>2]=K[0],I[e+4>>2]=K[1];break;case"float":A[e>>2]=0;break;case"double":R[e>>3]=0;break;default:X("invalid type for setValue: "+t)}}function C(e,t){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return D[e>>0];case"i16":return O[e>>1];case"i32":case"i64":return I[e>>2];case"float":return A[e>>2];case"double":return Number(R[e>>3]);default:X("invalid type for getValue: "+t)}return null}p=null,o.wasmBinary&&(S=o.wasmBinary),o.noExitRuntime,"object"!=typeof WebAssembly&&X("no native wasm support detected");var x,F,D,k,O,I,A,R,N=!1,M="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function P(e,t){if(e){var n=k,r=e+t;for(t=e;n[t]&&!(t>=r);)++t;if(16<t-e&&n.subarray&&M)e=M.decode(n.subarray(e,t));else{for(r="";e<t;){var i=n[e++];if(128&i){var o=63&n[e++];if(192==(224&i))r+=String.fromCharCode((31&i)<<6|o);else{var a=63&n[e++];65536>(i=224==(240&i)?(15&i)<<12|o<<6|a:(7&i)<<18|o<<12|a<<6|63&n[e++])?r+=String.fromCharCode(i):(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|1023&i))}}else r+=String.fromCharCode(i)}e=r}}else e="";return e}function L(e,t,n,r){if(!(0<r))return 0;var i=n;r=n+r-1;for(var o=0;o<e.length;++o){var a=e.charCodeAt(o);if(55296<=a&&57343>=a&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o)),127>=a){if(n>=r)break;t[n++]=a}else{if(2047>=a){if(n+1>=r)break;t[n++]=192|a>>6}else{if(65535>=a){if(n+2>=r)break;t[n++]=224|a>>12}else{if(n+3>=r)break;t[n++]=240|a>>18,t[n++]=128|a>>12&63}t[n++]=128|a>>6&63}t[n++]=128|63&a}}return t[n]=0,n-i}function B(e){for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);55296<=r&&57343>=r&&(r=65536+((1023&r)<<10)|1023&e.charCodeAt(++n)),127>=r?++t:t=2047>=r?t+2:65535>=r?t+3:t+4}return t}function U(e,t){for(var n=0;n<e.length;++n)D[t++>>0]=e.charCodeAt(n)}function j(){var e=x.buffer;F=e,o.HEAP8=D=new Int8Array(e),o.HEAP16=O=new Int16Array(e),o.HEAP32=I=new Int32Array(e),o.HEAPU8=k=new Uint8Array(e),o.HEAPU16=new Uint16Array(e),o.HEAPU32=new Uint32Array(e),o.HEAPF32=A=new Float32Array(e),o.HEAPF64=R=new Float64Array(e)}var G,z=[],H=[],q=[];function V(){var e=o.preRun.shift();z.unshift(e)}var $,K,W=0,Y=null,Q=null;function X(e){throw o.onAbort&&o.onAbort(e),w(e="Aborted("+e+")"),N=!0,e=new WebAssembly.RuntimeError(e+". Build with -s ASSERTIONS=1 for more info."),l(e),e}function Z(){return $.startsWith("data:application/octet-stream;base64,")}if(o.preloadedImages={},o.preloadedAudios={},$="olm.wasm",!Z()){var J=$;$=o.locateFile?o.locateFile(J,E):E+J}function ee(){var e=$;try{if(e==$&&S)return new Uint8Array(S);if(f)return f(e);throw"both async and sync fetching of the wasm failed"}catch(e){X(e)}}function te(e){for(;0<e.length;){var t=e.shift();if("function"==typeof t)t(o);else{var n=t.cc;"number"==typeof n?void 0===t.bc?re(n)():re(n)(t.bc):n(void 0===t.bc?null:t.bc)}}}var ne=[];function re(e){var t=ne[e];return t||(e>=ne.length&&(ne.length=e+1),ne[e]=t=G.get(e)),t}var ie={a:function(e,t,n){k.copyWithin(e,t,t+n)},b:function(e){var t=k.length;if(2147483648<(e>>>=0))return!1;for(var n=1;4>=n;n*=2){var r=t*(1+.2/n);r=Math.min(r,e+100663296),0<(r=Math.max(e,r))%65536&&(r+=65536-r%65536);e:{try{x.grow(Math.min(2147483648,r)-F.byteLength+65535>>>16),j();var i=1;break e}catch(e){}i=void 0}if(i)return!0}return!1}};!function(){function e(e){o.asm=e.exports,x=o.asm.c,j(),G=o.asm.e,H.unshift(o.asm.d),W--,o.monitorRunDependencies&&o.monitorRunDependencies(W),0==W&&(null!==Y&&(clearInterval(Y),Y=null),Q&&(e=Q,Q=null,e()))}function t(t){e(t.instance)}function n(e){return function(){if(!S&&(v||y)){if("function"==typeof fetch&&!$.startsWith("file://"))return fetch($,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+$+"'";return e.arrayBuffer()})).catch((function(){return ee()}));if(g)return new Promise((function(e,t){g($,(function(t){e(new Uint8Array(t))}),t)}))}return Promise.resolve().then((function(){return ee()}))}().then((function(e){return WebAssembly.instantiate(e,r)})).then((function(e){return e})).then(e,(function(e){w("failed to asynchronously prepare wasm: "+e),X(e)}))}var r={a:ie};if(W++,o.monitorRunDependencies&&o.monitorRunDependencies(W),o.instantiateWasm)try{return o.instantiateWasm(r,e)}catch(e){return w("Module.instantiateWasm callback failed with error: "+e),!1}(S||"function"!=typeof WebAssembly.instantiateStreaming||Z()||$.startsWith("file://")||"function"!=typeof fetch?n(t):fetch($,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,r).then(t,(function(e){return w("wasm streaming compile failed: "+e),w("falling back to ArrayBuffer instantiation"),n(t)}))}))).catch(l)}(),o.___wasm_call_ctors=function(){return(o.___wasm_call_ctors=o.asm.d).apply(null,arguments)},o._olm_get_library_version=function(){return(o._olm_get_library_version=o.asm.f).apply(null,arguments)},o._olm_error=function(){return(o._olm_error=o.asm.g).apply(null,arguments)},o._olm_account_last_error=function(){return(o._olm_account_last_error=o.asm.h).apply(null,arguments)},o.__olm_error_to_string=function(){return(o.__olm_error_to_string=o.asm.i).apply(null,arguments)},o._olm_account_last_error_code=function(){return(o._olm_account_last_error_code=o.asm.j).apply(null,arguments)},o._olm_session_last_error=function(){return(o._olm_session_last_error=o.asm.k).apply(null,arguments)},o._olm_session_last_error_code=function(){return(o._olm_session_last_error_code=o.asm.l).apply(null,arguments)},o._olm_utility_last_error=function(){return(o._olm_utility_last_error=o.asm.m).apply(null,arguments)},o._olm_utility_last_error_code=function(){return(o._olm_utility_last_error_code=o.asm.n).apply(null,arguments)},o._olm_account_size=function(){return(o._olm_account_size=o.asm.o).apply(null,arguments)},o._olm_session_size=function(){return(o._olm_session_size=o.asm.p).apply(null,arguments)},o._olm_utility_size=function(){return(o._olm_utility_size=o.asm.q).apply(null,arguments)},o._olm_account=function(){return(o._olm_account=o.asm.r).apply(null,arguments)},o._olm_session=function(){return(o._olm_session=o.asm.s).apply(null,arguments)},o._olm_utility=function(){return(o._olm_utility=o.asm.t).apply(null,arguments)},o._olm_clear_account=function(){return(o._olm_clear_account=o.asm.u).apply(null,arguments)},o._olm_clear_session=function(){return(o._olm_clear_session=o.asm.v).apply(null,arguments)},o._olm_clear_utility=function(){return(o._olm_clear_utility=o.asm.w).apply(null,arguments)},o._olm_pickle_account_length=function(){return(o._olm_pickle_account_length=o.asm.x).apply(null,arguments)},o._olm_pickle_session_length=function(){return(o._olm_pickle_session_length=o.asm.y).apply(null,arguments)},o._olm_pickle_account=function(){return(o._olm_pickle_account=o.asm.z).apply(null,arguments)},o._olm_pickle_session=function(){return(o._olm_pickle_session=o.asm.A).apply(null,arguments)},o._olm_unpickle_account=function(){return(o._olm_unpickle_account=o.asm.B).apply(null,arguments)},o._olm_unpickle_session=function(){return(o._olm_unpickle_session=o.asm.C).apply(null,arguments)},o._olm_create_account_random_length=function(){return(o._olm_create_account_random_length=o.asm.D).apply(null,arguments)},o._olm_create_account=function(){return(o._olm_create_account=o.asm.E).apply(null,arguments)},o._olm_account_identity_keys_length=function(){return(o._olm_account_identity_keys_length=o.asm.F).apply(null,arguments)},o._olm_account_identity_keys=function(){return(o._olm_account_identity_keys=o.asm.G).apply(null,arguments)},o._olm_account_signature_length=function(){return(o._olm_account_signature_length=o.asm.H).apply(null,arguments)},o._olm_account_sign=function(){return(o._olm_account_sign=o.asm.I).apply(null,arguments)},o._olm_account_one_time_keys_length=function(){return(o._olm_account_one_time_keys_length=o.asm.J).apply(null,arguments)},o._olm_account_one_time_keys=function(){return(o._olm_account_one_time_keys=o.asm.K).apply(null,arguments)},o._olm_account_mark_keys_as_published=function(){return(o._olm_account_mark_keys_as_published=o.asm.L).apply(null,arguments)},o._olm_account_max_number_of_one_time_keys=function(){return(o._olm_account_max_number_of_one_time_keys=o.asm.M).apply(null,arguments)},o._olm_account_generate_one_time_keys_random_length=function(){return(o._olm_account_generate_one_time_keys_random_length=o.asm.N).apply(null,arguments)},o._olm_account_generate_one_time_keys=function(){return(o._olm_account_generate_one_time_keys=o.asm.O).apply(null,arguments)},o._olm_account_generate_fallback_key_random_length=function(){return(o._olm_account_generate_fallback_key_random_length=o.asm.P).apply(null,arguments)},o._olm_account_generate_fallback_key=function(){return(o._olm_account_generate_fallback_key=o.asm.Q).apply(null,arguments)},o._olm_account_fallback_key_length=function(){return(o._olm_account_fallback_key_length=o.asm.R).apply(null,arguments)},o._olm_account_fallback_key=function(){return(o._olm_account_fallback_key=o.asm.S).apply(null,arguments)},o._olm_account_unpublished_fallback_key_length=function(){return(o._olm_account_unpublished_fallback_key_length=o.asm.T).apply(null,arguments)},o._olm_account_unpublished_fallback_key=function(){return(o._olm_account_unpublished_fallback_key=o.asm.U).apply(null,arguments)},o._olm_account_forget_old_fallback_key=function(){return(o._olm_account_forget_old_fallback_key=o.asm.V).apply(null,arguments)},o._olm_create_outbound_session_random_length=function(){return(o._olm_create_outbound_session_random_length=o.asm.W).apply(null,arguments)},o._olm_create_outbound_session=function(){return(o._olm_create_outbound_session=o.asm.X).apply(null,arguments)},o._olm_create_inbound_session=function(){return(o._olm_create_inbound_session=o.asm.Y).apply(null,arguments)},o._olm_create_inbound_session_from=function(){return(o._olm_create_inbound_session_from=o.asm.Z).apply(null,arguments)},o._olm_session_id_length=function(){return(o._olm_session_id_length=o.asm._).apply(null,arguments)},o._olm_session_id=function(){return(o._olm_session_id=o.asm.$).apply(null,arguments)},o._olm_session_has_received_message=function(){return(o._olm_session_has_received_message=o.asm.aa).apply(null,arguments)},o._olm_session_describe=function(){return(o._olm_session_describe=o.asm.ba).apply(null,arguments)},o._olm_matches_inbound_session=function(){return(o._olm_matches_inbound_session=o.asm.ca).apply(null,arguments)},o._olm_matches_inbound_session_from=function(){return(o._olm_matches_inbound_session_from=o.asm.da).apply(null,arguments)},o._olm_remove_one_time_keys=function(){return(o._olm_remove_one_time_keys=o.asm.ea).apply(null,arguments)},o._olm_encrypt_message_type=function(){return(o._olm_encrypt_message_type=o.asm.fa).apply(null,arguments)},o._olm_encrypt_random_length=function(){return(o._olm_encrypt_random_length=o.asm.ga).apply(null,arguments)},o._olm_encrypt_message_length=function(){return(o._olm_encrypt_message_length=o.asm.ha).apply(null,arguments)},o._olm_encrypt=function(){return(o._olm_encrypt=o.asm.ia).apply(null,arguments)},o._olm_decrypt_max_plaintext_length=function(){return(o._olm_decrypt_max_plaintext_length=o.asm.ja).apply(null,arguments)},o._olm_decrypt=function(){return(o._olm_decrypt=o.asm.ka).apply(null,arguments)},o._olm_sha256_length=function(){return(o._olm_sha256_length=o.asm.la).apply(null,arguments)},o._olm_sha256=function(){return(o._olm_sha256=o.asm.ma).apply(null,arguments)},o._olm_ed25519_verify=function(){return(o._olm_ed25519_verify=o.asm.na).apply(null,arguments)},o._olm_pk_encryption_last_error=function(){return(o._olm_pk_encryption_last_error=o.asm.oa).apply(null,arguments)},o._olm_pk_encryption_last_error_code=function(){return(o._olm_pk_encryption_last_error_code=o.asm.pa).apply(null,arguments)},o._olm_pk_encryption_size=function(){return(o._olm_pk_encryption_size=o.asm.qa).apply(null,arguments)},o._olm_pk_encryption=function(){return(o._olm_pk_encryption=o.asm.ra).apply(null,arguments)},o._olm_clear_pk_encryption=function(){return(o._olm_clear_pk_encryption=o.asm.sa).apply(null,arguments)},o._olm_pk_encryption_set_recipient_key=function(){return(o._olm_pk_encryption_set_recipient_key=o.asm.ta).apply(null,arguments)},o._olm_pk_key_length=function(){return(o._olm_pk_key_length=o.asm.ua).apply(null,arguments)},o._olm_pk_ciphertext_length=function(){return(o._olm_pk_ciphertext_length=o.asm.va).apply(null,arguments)},o._olm_pk_mac_length=function(){return(o._olm_pk_mac_length=o.asm.wa).apply(null,arguments)},o._olm_pk_encrypt_random_length=function(){return(o._olm_pk_encrypt_random_length=o.asm.xa).apply(null,arguments)},o._olm_pk_encrypt=function(){return(o._olm_pk_encrypt=o.asm.ya).apply(null,arguments)},o._olm_pk_decryption_last_error=function(){return(o._olm_pk_decryption_last_error=o.asm.za).apply(null,arguments)},o._olm_pk_decryption_last_error_code=function(){return(o._olm_pk_decryption_last_error_code=o.asm.Aa).apply(null,arguments)},o._olm_pk_decryption_size=function(){return(o._olm_pk_decryption_size=o.asm.Ba).apply(null,arguments)},o._olm_pk_decryption=function(){return(o._olm_pk_decryption=o.asm.Ca).apply(null,arguments)},o._olm_clear_pk_decryption=function(){return(o._olm_clear_pk_decryption=o.asm.Da).apply(null,arguments)},o._olm_pk_private_key_length=function(){return(o._olm_pk_private_key_length=o.asm.Ea).apply(null,arguments)},o._olm_pk_generate_key_random_length=function(){return(o._olm_pk_generate_key_random_length=o.asm.Fa).apply(null,arguments)},o._olm_pk_key_from_private=function(){return(o._olm_pk_key_from_private=o.asm.Ga).apply(null,arguments)},o._olm_pk_generate_key=function(){return(o._olm_pk_generate_key=o.asm.Ha).apply(null,arguments)},o._olm_pickle_pk_decryption_length=function(){return(o._olm_pickle_pk_decryption_length=o.asm.Ia).apply(null,arguments)},o._olm_pickle_pk_decryption=function(){return(o._olm_pickle_pk_decryption=o.asm.Ja).apply(null,arguments)},o._olm_unpickle_pk_decryption=function(){return(o._olm_unpickle_pk_decryption=o.asm.Ka).apply(null,arguments)},o._olm_pk_max_plaintext_length=function(){return(o._olm_pk_max_plaintext_length=o.asm.La).apply(null,arguments)},o._olm_pk_decrypt=function(){return(o._olm_pk_decrypt=o.asm.Ma).apply(null,arguments)},o._olm_pk_get_private_key=function(){return(o._olm_pk_get_private_key=o.asm.Na).apply(null,arguments)},o._olm_pk_signing_size=function(){return(o._olm_pk_signing_size=o.asm.Oa).apply(null,arguments)},o._olm_pk_signing=function(){return(o._olm_pk_signing=o.asm.Pa).apply(null,arguments)},o._olm_pk_signing_last_error=function(){return(o._olm_pk_signing_last_error=o.asm.Qa).apply(null,arguments)},o._olm_pk_signing_last_error_code=function(){return(o._olm_pk_signing_last_error_code=o.asm.Ra).apply(null,arguments)},o._olm_clear_pk_signing=function(){return(o._olm_clear_pk_signing=o.asm.Sa).apply(null,arguments)},o._olm_pk_signing_seed_length=function(){return(o._olm_pk_signing_seed_length=o.asm.Ta).apply(null,arguments)},o._olm_pk_signing_public_key_length=function(){return(o._olm_pk_signing_public_key_length=o.asm.Ua).apply(null,arguments)},o._olm_pk_signing_key_from_seed=function(){return(o._olm_pk_signing_key_from_seed=o.asm.Va).apply(null,arguments)},o._olm_pk_signature_length=function(){return(o._olm_pk_signature_length=o.asm.Wa).apply(null,arguments)},o._olm_pk_sign=function(){return(o._olm_pk_sign=o.asm.Xa).apply(null,arguments)},o._olm_inbound_group_session_size=function(){return(o._olm_inbound_group_session_size=o.asm.Ya).apply(null,arguments)},o._olm_inbound_group_session=function(){return(o._olm_inbound_group_session=o.asm.Za).apply(null,arguments)},o._olm_clear_inbound_group_session=function(){return(o._olm_clear_inbound_group_session=o.asm._a).apply(null,arguments)},o._olm_inbound_group_session_last_error=function(){return(o._olm_inbound_group_session_last_error=o.asm.$a).apply(null,arguments)},o._olm_inbound_group_session_last_error_code=function(){return(o._olm_inbound_group_session_last_error_code=o.asm.ab).apply(null,arguments)},o._olm_init_inbound_group_session=function(){return(o._olm_init_inbound_group_session=o.asm.bb).apply(null,arguments)},o._olm_import_inbound_group_session=function(){return(o._olm_import_inbound_group_session=o.asm.cb).apply(null,arguments)},o._olm_pickle_inbound_group_session_length=function(){return(o._olm_pickle_inbound_group_session_length=o.asm.db).apply(null,arguments)},o._olm_pickle_inbound_group_session=function(){return(o._olm_pickle_inbound_group_session=o.asm.eb).apply(null,arguments)},o._olm_unpickle_inbound_group_session=function(){return(o._olm_unpickle_inbound_group_session=o.asm.fb).apply(null,arguments)},o._olm_group_decrypt_max_plaintext_length=function(){return(o._olm_group_decrypt_max_plaintext_length=o.asm.gb).apply(null,arguments)},o._olm_group_decrypt=function(){return(o._olm_group_decrypt=o.asm.hb).apply(null,arguments)},o._olm_inbound_group_session_id_length=function(){return(o._olm_inbound_group_session_id_length=o.asm.ib).apply(null,arguments)},o._olm_inbound_group_session_id=function(){return(o._olm_inbound_group_session_id=o.asm.jb).apply(null,arguments)},o._olm_inbound_group_session_first_known_index=function(){return(o._olm_inbound_group_session_first_known_index=o.asm.kb).apply(null,arguments)},o._olm_inbound_group_session_is_verified=function(){return(o._olm_inbound_group_session_is_verified=o.asm.lb).apply(null,arguments)},o._olm_export_inbound_group_session_length=function(){return(o._olm_export_inbound_group_session_length=o.asm.mb).apply(null,arguments)},o._olm_export_inbound_group_session=function(){return(o._olm_export_inbound_group_session=o.asm.nb).apply(null,arguments)},o._olm_outbound_group_session_size=function(){return(o._olm_outbound_group_session_size=o.asm.ob).apply(null,arguments)},o._olm_outbound_group_session=function(){return(o._olm_outbound_group_session=o.asm.pb).apply(null,arguments)},o._olm_clear_outbound_group_session=function(){return(o._olm_clear_outbound_group_session=o.asm.qb).apply(null,arguments)},o._olm_outbound_group_session_last_error=function(){return(o._olm_outbound_group_session_last_error=o.asm.rb).apply(null,arguments)},o._olm_outbound_group_session_last_error_code=function(){return(o._olm_outbound_group_session_last_error_code=o.asm.sb).apply(null,arguments)},o._olm_pickle_outbound_group_session_length=function(){return(o._olm_pickle_outbound_group_session_length=o.asm.tb).apply(null,arguments)},o._olm_pickle_outbound_group_session=function(){return(o._olm_pickle_outbound_group_session=o.asm.ub).apply(null,arguments)},o._olm_unpickle_outbound_group_session=function(){return(o._olm_unpickle_outbound_group_session=o.asm.vb).apply(null,arguments)},o._olm_init_outbound_group_session_random_length=function(){return(o._olm_init_outbound_group_session_random_length=o.asm.wb).apply(null,arguments)},o._olm_init_outbound_group_session=function(){return(o._olm_init_outbound_group_session=o.asm.xb).apply(null,arguments)},o._olm_group_encrypt_message_length=function(){return(o._olm_group_encrypt_message_length=o.asm.yb).apply(null,arguments)},o._olm_group_encrypt=function(){return(o._olm_group_encrypt=o.asm.zb).apply(null,arguments)},o._olm_outbound_group_session_id_length=function(){return(o._olm_outbound_group_session_id_length=o.asm.Ab).apply(null,arguments)},o._olm_outbound_group_session_id=function(){return(o._olm_outbound_group_session_id=o.asm.Bb).apply(null,arguments)},o._olm_outbound_group_session_message_index=function(){return(o._olm_outbound_group_session_message_index=o.asm.Cb).apply(null,arguments)},o._olm_outbound_group_session_key_length=function(){return(o._olm_outbound_group_session_key_length=o.asm.Db).apply(null,arguments)},o._olm_outbound_group_session_key=function(){return(o._olm_outbound_group_session_key=o.asm.Eb).apply(null,arguments)},o._olm_sas_last_error=function(){return(o._olm_sas_last_error=o.asm.Fb).apply(null,arguments)},o._olm_sas_last_error_code=function(){return(o._olm_sas_last_error_code=o.asm.Gb).apply(null,arguments)},o._olm_sas_size=function(){return(o._olm_sas_size=o.asm.Hb).apply(null,arguments)},o._olm_sas=function(){return(o._olm_sas=o.asm.Ib).apply(null,arguments)},o._olm_clear_sas=function(){return(o._olm_clear_sas=o.asm.Jb).apply(null,arguments)},o._olm_create_sas_random_length=function(){return(o._olm_create_sas_random_length=o.asm.Kb).apply(null,arguments)},o._olm_create_sas=function(){return(o._olm_create_sas=o.asm.Lb).apply(null,arguments)},o._olm_sas_pubkey_length=function(){return(o._olm_sas_pubkey_length=o.asm.Mb).apply(null,arguments)},o._olm_sas_get_pubkey=function(){return(o._olm_sas_get_pubkey=o.asm.Nb).apply(null,arguments)},o._olm_sas_set_their_key=function(){return(o._olm_sas_set_their_key=o.asm.Ob).apply(null,arguments)},o._olm_sas_is_their_key_set=function(){return(o._olm_sas_is_their_key_set=o.asm.Pb).apply(null,arguments)},o._olm_sas_generate_bytes=function(){return(o._olm_sas_generate_bytes=o.asm.Qb).apply(null,arguments)},o._olm_sas_mac_length=function(){return(o._olm_sas_mac_length=o.asm.Rb).apply(null,arguments)},o._olm_sas_calculate_mac_fixed_base64=function(){return(o._olm_sas_calculate_mac_fixed_base64=o.asm.Sb).apply(null,arguments)},o._olm_sas_calculate_mac=function(){return(o._olm_sas_calculate_mac=o.asm.Tb).apply(null,arguments)},o._olm_sas_calculate_mac_long_kdf=function(){return(o._olm_sas_calculate_mac_long_kdf=o.asm.Ub).apply(null,arguments)},o._malloc=function(){return(o._malloc=o.asm.Vb).apply(null,arguments)},o._free=function(){return(o._free=o.asm.Wb).apply(null,arguments)};var oe,ae=o.stackSave=function(){return(ae=o.stackSave=o.asm.Xb).apply(null,arguments)},se=o.stackRestore=function(){return(se=o.stackRestore=o.asm.Yb).apply(null,arguments)},le=o.stackAlloc=function(){return(le=o.stackAlloc=o.asm.Zb).apply(null,arguments)};function ce(){function e(){if(!oe&&(oe=!0,o.calledRun=!0,!N)){if(te(H),s(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;){var e=o.postRun.shift();q.unshift(e)}te(q)}}if(!(0<W)){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)V();te(z),0<W||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),e()}),1)):e())}}if(o.ALLOC_STACK=1,Q=function e(){oe||ce(),oe||(Q=e)},o.run=ce,o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);0<o.preInit.length;)o.preInit.pop()();function ue(){var e=o._olm_outbound_group_session_size();this.ac=we(e),this.$b=o._olm_outbound_group_session(this.ac)}function de(e){return function(){var t=e.apply(this,arguments);if(t===Se)throw t=P(o._olm_outbound_group_session_last_error(arguments[0])),Error("OLM."+t);return t}}function he(){var e=o._olm_inbound_group_session_size();this.ac=we(e),this.$b=o._olm_inbound_group_session(this.ac)}function pe(e){return function(){var t=e.apply(this,arguments);if(t===Se)throw t=P(o._olm_inbound_group_session_last_error(arguments[0])),Error("OLM."+t);return t}}function me(){var e=o._olm_pk_encryption_size();this.ac=we(e),this.$b=o._olm_pk_encryption(this.ac)}function ge(e){return function(){var t=e.apply(this,arguments);if(t===Se)throw t=P(o._olm_pk_encryption_last_error(arguments[0])),Error("OLM."+t);return t}}function fe(){var e=o._olm_pk_decryption_size();this.ac=we(e),this.$b=o._olm_pk_decryption(this.ac)}function _e(e){return function(){var t=e.apply(this,arguments);if(t===Se)throw t=P(o._olm_pk_decryption_last_error(arguments[0])),Error("OLM."+t);return t}}function be(){var e=o._olm_pk_signing_size();this.ac=we(e),this.$b=o._olm_pk_signing(this.ac)}function ve(e){return function(){var t=e.apply(this,arguments);if(t===Se)throw t=P(o._olm_pk_signing_last_error(arguments[0])),Error("OLM."+t);return t}}function ye(){var e=o._olm_sas_size(),t=o._olm_create_sas_random_length(),n=Ce(t,c);this.ac=we(e),this.$b=o._olm_sas(this.ac),o._olm_create_sas(this.$b,n,t),ke(n,t)}function Ee(e){return function(){var t=e.apply(this,arguments);if(t===Se)throw t=P(o._olm_sas_last_error(arguments[0])),Error("OLM."+t);return t}}ce(),ue.prototype.free=function(){o._olm_clear_outbound_group_session(this.$b),Te(this.$b)},ue.prototype.pickle=De((function(e){e=Fe(e);var t=de(o._olm_pickle_outbound_group_session_length)(this.$b),n=xe(e),r=xe(t+1);try{de(o._olm_pickle_outbound_group_session)(this.$b,n,e.length,r,t)}finally{for(ke(n,e.length),n=0;n<e.length;n++)e[n]=0}return P(r,t)})),ue.prototype.unpickle=De((function(e,t){var n=xe(e=Fe(e)),r=xe(t=Fe(t));try{de(o._olm_unpickle_outbound_group_session)(this.$b,n,e.length,r,t.length)}finally{for(ke(n,e.length),n=0;n<e.length;n++)e[n]=0}})),ue.prototype.create=De((function(){var e=de(o._olm_init_outbound_group_session_random_length)(this.$b),t=Ce(e,c);try{de(o._olm_init_outbound_group_session)(this.$b,t,e)}finally{ke(t,e)}})),ue.prototype.encrypt=function(e){try{var t=B(e),n=de(o._olm_group_encrypt_message_length)(this.$b,t),r=we(t+1);L(e,k,r,t+1);var i=we(n+1);return de(o._olm_group_encrypt)(this.$b,r,t,i,n),T(i+n),P(i,n)}finally{void 0!==r&&(ke(r,t+1),Te(r)),void 0!==i&&Te(i)}},ue.prototype.session_id=De((function(){var e=de(o._olm_outbound_group_session_id_length)(this.$b),t=xe(e+1);return de(o._olm_outbound_group_session_id)(this.$b,t,e),P(t,e)})),ue.prototype.session_key=De((function(){var e=de(o._olm_outbound_group_session_key_length)(this.$b),t=xe(e+1);de(o._olm_outbound_group_session_key)(this.$b,t,e);var n=P(t,e);return ke(t,e),n})),ue.prototype.message_index=function(){return de(o._olm_outbound_group_session_message_index)(this.$b)},a.OutboundGroupSession=ue,he.prototype.free=function(){o._olm_clear_inbound_group_session(this.$b),Te(this.$b)},he.prototype.pickle=De((function(e){e=Fe(e);var t=pe(o._olm_pickle_inbound_group_session_length)(this.$b),n=xe(e),r=xe(t+1);try{pe(o._olm_pickle_inbound_group_session)(this.$b,n,e.length,r,t)}finally{for(ke(n,e.length),n=0;n<e.length;n++)e[n]=0}return P(r,t)})),he.prototype.unpickle=De((function(e,t){var n=xe(e=Fe(e)),r=xe(t=Fe(t));try{pe(o._olm_unpickle_inbound_group_session)(this.$b,n,e.length,r,t.length)}finally{for(ke(n,e.length),n=0;n<e.length;n++)e[n]=0}})),he.prototype.create=De((function(e){var t=xe(e=Fe(e));try{pe(o._olm_init_inbound_group_session)(this.$b,t,e.length)}finally{for(ke(t,e.length),t=0;t<e.length;t++)e[t]=0}})),he.prototype.import_session=De((function(e){var t=xe(e=Fe(e));try{pe(o._olm_import_inbound_group_session)(this.$b,t,e.length)}finally{for(ke(t,e.length),t=0;t<e.length;t++)e[t]=0}})),he.prototype.decrypt=De((function(e){try{var t=we(e.length);U(e,t);var n=pe(o._olm_group_decrypt_max_plaintext_length)(this.$b,t,e.length);U(e,t);var r=we(n+1),i=xe(4),a=pe(o._olm_group_decrypt)(this.$b,t,e.length,r,n,i);return T(r+a),{plaintext:P(r,a),message_index:C(i,"i32")}}finally{void 0!==t&&Te(t),void 0!==r&&(ke(r,a),Te(r))}})),he.prototype.session_id=De((function(){var e=pe(o._olm_inbound_group_session_id_length)(this.$b),t=xe(e+1);return pe(o._olm_inbound_group_session_id)(this.$b,t,e),P(t,e)})),he.prototype.first_known_index=De((function(){return pe(o._olm_inbound_group_session_first_known_index)(this.$b)})),he.prototype.export_session=De((function(e){var t=pe(o._olm_export_inbound_group_session_length)(this.$b),n=xe(t+1);return de(o._olm_export_inbound_group_session)(this.$b,n,t,e),e=P(n,t),ke(n,t),e})),a.InboundGroupSession=he,me.prototype.free=function(){o._olm_clear_pk_encryption(this.$b),Te(this.$b)},me.prototype.set_recipient_key=De((function(e){var t=xe(e=Fe(e));ge(o._olm_pk_encryption_set_recipient_key)(this.$b,t,e.length)})),me.prototype.encrypt=De((function(e){try{var t=B(e),n=we(t+1);L(e,k,n,t+1);var r=ge(o._olm_pk_encrypt_random_length)(),i=Ce(r,c),a=ge(o._olm_pk_ciphertext_length)(this.$b,t),s=we(a+1),l=ge(o._olm_pk_mac_length)(this.$b),u=xe(l+1);T(u+l);var d=ge(o._olm_pk_key_length)(),h=xe(d+1);return T(h+d),ge(o._olm_pk_encrypt)(this.$b,n,t,s,a,u,l,h,d,i,r),T(s+a),{ciphertext:P(s,a),mac:P(u,l),ephemeral:P(h,d)}}finally{void 0!==i&&ke(i,r),void 0!==n&&(ke(n,t+1),Te(n)),void 0!==s&&Te(s)}})),fe.prototype.free=function(){o._olm_clear_pk_decryption(this.$b),Te(this.$b)},fe.prototype.init_with_private_key=De((function(e){var t=xe(e.length);o.HEAPU8.set(e,t);var n=_e(o._olm_pk_key_length)(),r=xe(n+1);try{_e(o._olm_pk_key_from_private)(this.$b,r,n,t,e.length)}finally{ke(t,e.length)}return P(r,n)})),fe.prototype.generate_key=De((function(){var e=_e(o._olm_pk_private_key_length)(),t=Ce(e,c),n=_e(o._olm_pk_key_length)(),r=xe(n+1);try{_e(o._olm_pk_key_from_private)(this.$b,r,n,t,e)}finally{ke(t,e)}return P(r,n)})),fe.prototype.get_private_key=De((function(){var e=ge(o._olm_pk_private_key_length)(),t=xe(e);_e(o._olm_pk_get_private_key)(this.$b,t,e);var n=new Uint8Array(new Uint8Array(o.HEAPU8.buffer,t,e));return ke(t,e),n})),fe.prototype.pickle=De((function(e){e=Fe(e);var t=_e(o._olm_pickle_pk_decryption_length)(this.$b),n=xe(e),r=xe(t+1);try{_e(o._olm_pickle_pk_decryption)(this.$b,n,e.length,r,t)}finally{for(ke(n,e.length),n=0;n<e.length;n++)e[n]=0}return P(r,t)})),fe.prototype.unpickle=De((function(e,t){var n=xe(e=Fe(e)),r=Fe(t),i=xe(r),a=xe((t=_e(o._olm_pk_key_length)())+1);try{_e(o._olm_unpickle_pk_decryption)(this.$b,n,e.length,i,r.length,a,t)}finally{for(ke(n,e.length),n=0;n<e.length;n++)e[n]=0}return P(a,t)})),fe.prototype.decrypt=De((function(e,t,n){try{var r=B(n),i=we(r+1);L(n,k,i,r+1);var a=Fe(e),s=xe(a),l=Fe(t),c=xe(l),u=_e(o._olm_pk_max_plaintext_length)(this.$b,r),d=we(u+1),h=_e(o._olm_pk_decrypt)(this.$b,s,a.length,c,l.length,i,r,d,u);return T(d+h),P(d,h)}finally{void 0!==d&&(ke(d,h+1),Te(d)),void 0!==i&&Te(i)}})),be.prototype.free=function(){o._olm_clear_pk_signing(this.$b),Te(this.$b)},be.prototype.init_with_seed=De((function(e){var t=xe(e.length);o.HEAPU8.set(e,t);var n=ve(o._olm_pk_signing_public_key_length)(),r=xe(n+1);try{ve(o._olm_pk_signing_key_from_seed)(this.$b,r,n,t,e.length)}finally{ke(t,e.length)}return P(r,n)})),be.prototype.generate_seed=De((function(){var e=ve(o._olm_pk_signing_seed_length)(),t=Ce(e,c),n=new Uint8Array(new Uint8Array(o.HEAPU8.buffer,t,e));return ke(t,e),n})),be.prototype.sign=De((function(e){try{var t=B(e),n=we(t+1);L(e,k,n,t+1);var r=ve(o._olm_pk_signature_length)(),i=xe(r+1);return ve(o._olm_pk_sign)(this.$b,n,t,i,r),P(i,r)}finally{void 0!==n&&(ke(n,t+1),Te(n))}})),ye.prototype.free=function(){o._olm_clear_sas(this.$b),Te(this.$b)},ye.prototype.get_pubkey=De((function(){var e=Ee(o._olm_sas_pubkey_length)(this.$b),t=xe(e+1);return Ee(o._olm_sas_get_pubkey)(this.$b,t,e),P(t,e)})),ye.prototype.set_their_key=De((function(e){var t=xe(e=Fe(e));Ee(o._olm_sas_set_their_key)(this.$b,t,e.length)})),ye.prototype.is_their_key_set=De((function(){return!!Ee(o._olm_sas_is_their_key_set)(this.$b)})),ye.prototype.generate_bytes=De((function(e,t){var n=xe(e=Fe(e)),r=xe(t);return Ee(o._olm_sas_generate_bytes)(this.$b,n,e.length,r,t),new Uint8Array(new Uint8Array(o.HEAPU8.buffer,r,t))})),ye.prototype.calculate_mac=De((function(e,t){var n=xe(e=Fe(e)),r=xe(t=Fe(t)),i=Ee(o._olm_sas_mac_length)(this.$b),a=xe(i+1);return Ee(o._olm_sas_calculate_mac)(this.$b,n,e.length,r,t.length,a,i),P(a,i)})),ye.prototype.calculate_mac_fixed_base64=De((function(e,t){var n=xe(e=Fe(e)),r=xe(t=Fe(t)),i=Ee(o._olm_sas_mac_length)(this.$b),a=xe(i+1);return Ee(o._olm_sas_calculate_mac_fixed_base64)(this.$b,n,e.length,r,t.length,a,i),P(a,i)})),ye.prototype.calculate_mac_long_kdf=De((function(e,t){var n=xe(e=Fe(e)),r=xe(t=Fe(t)),i=Ee(o._olm_sas_mac_length)(this.$b),a=xe(i+1);return Ee(o._olm_sas_calculate_mac_long_kdf)(this.$b,n,e.length,r,t.length,a,i),P(a,i)}));var Se,we=o._malloc,Te=o._free;function Ce(e,t){var n=le(e);return t(new Uint8Array(o.HEAPU8.buffer,n,e)),n}function xe(e){return"number"==typeof e?Ce(e,(function(e){e.fill(0)})):Ce(e.length,(function(t){t.set(e)}))}function Fe(e){if(e instanceof Uint8Array)var t=e;else e=L(e,t=Array(B(e)+1),0,t.length),t.length=e;return t}function De(e){return function(){var t=ae();try{return e.apply(this,arguments)}finally{se(t)}}}function ke(e,t){for(;0<t--;)o.HEAP8[e++]=0}function Oe(){var e=o._olm_account_size();this.ac=we(e),this.$b=o._olm_account(this.ac)}function Ie(e){return function(){var t=e.apply(this,arguments);if(t===Se)throw t=P(o._olm_account_last_error(arguments[0])),Error("OLM."+t);return t}}function Ae(){var e=o._olm_session_size();this.ac=we(e),this.$b=o._olm_session(this.ac)}function Re(e){return function(){var t=e.apply(this,arguments);if(t===Se)throw t=P(o._olm_session_last_error(arguments[0])),Error("OLM."+t);return t}}function Ne(){var e=o._olm_utility_size();this.ac=we(e),this.$b=o._olm_utility(this.ac)}function Me(e){return function(){var t=e.apply(this,arguments);if(t===Se)throw t=P(o._olm_utility_last_error(arguments[0])),Error("OLM."+t);return t}}return Oe.prototype.free=function(){o._olm_clear_account(this.$b),Te(this.$b)},Oe.prototype.create=De((function(){var e=Ie(o._olm_create_account_random_length)(this.$b),t=Ce(e,c);try{Ie(o._olm_create_account)(this.$b,t,e)}finally{ke(t,e)}})),Oe.prototype.identity_keys=De((function(){var e=Ie(o._olm_account_identity_keys_length)(this.$b),t=xe(e+1);return Ie(o._olm_account_identity_keys)(this.$b,t,e),P(t,e)})),Oe.prototype.sign=De((function(e){var t=Ie(o._olm_account_signature_length)(this.$b),n=xe(e=Fe(e)),r=xe(t+1);try{Ie(o._olm_account_sign)(this.$b,n,e.length,r,t)}finally{for(ke(n,e.length),n=0;n<e.length;n++)e[n]=0}return P(r,t)})),Oe.prototype.one_time_keys=De((function(){var e=Ie(o._olm_account_one_time_keys_length)(this.$b),t=xe(e+1);return Ie(o._olm_account_one_time_keys)(this.$b,t,e),P(t,e)})),Oe.prototype.mark_keys_as_published=De((function(){Ie(o._olm_account_mark_keys_as_published)(this.$b)})),Oe.prototype.max_number_of_one_time_keys=De((function(){return Ie(o._olm_account_max_number_of_one_time_keys)(this.$b)})),Oe.prototype.generate_one_time_keys=De((function(e){var t=Ie(o._olm_account_generate_one_time_keys_random_length)(this.$b,e),n=Ce(t,c);try{Ie(o._olm_account_generate_one_time_keys)(this.$b,e,n,t)}finally{ke(n,t)}})),Oe.prototype.remove_one_time_keys=De((function(e){Ie(o._olm_remove_one_time_keys)(this.$b,e.$b)})),Oe.prototype.generate_fallback_key=De((function(){var e=Ie(o._olm_account_generate_fallback_key_random_length)(this.$b),t=Ce(e,c);try{Ie(o._olm_account_generate_fallback_key)(this.$b,t,e)}finally{ke(t,e)}})),Oe.prototype.fallback_key=De((function(){var e=Ie(o._olm_account_fallback_key_length)(this.$b),t=xe(e+1);return Ie(o._olm_account_fallback_key)(this.$b,t,e),P(t,e)})),Oe.prototype.unpublished_fallback_key=De((function(){var e=Ie(o._olm_account_unpublished_fallback_key_length)(this.$b),t=xe(e+1);return Ie(o._olm_account_unpublished_fallback_key)(this.$b,t,e),P(t,e)})),Oe.prototype.forget_old_fallback_key=De((function(){Ie(o._olm_account_forget_old_fallback_key)(this.$b)})),Oe.prototype.pickle=De((function(e){e=Fe(e);var t=Ie(o._olm_pickle_account_length)(this.$b),n=xe(e),r=xe(t+1);try{Ie(o._olm_pickle_account)(this.$b,n,e.length,r,t)}finally{for(ke(n,e.length),n=0;n<e.length;n++)e[n]=0}return P(r,t)})),Oe.prototype.unpickle=De((function(e,t){var n=xe(e=Fe(e)),r=xe(t=Fe(t));try{Ie(o._olm_unpickle_account)(this.$b,n,e.length,r,t.length)}finally{for(ke(n,e.length),n=0;n<e.length;n++)e[n]=0}})),Ae.prototype.free=function(){o._olm_clear_session(this.$b),Te(this.$b)},Ae.prototype.pickle=De((function(e){e=Fe(e);var t=Re(o._olm_pickle_session_length)(this.$b),n=xe(e),r=xe(t+1);try{Re(o._olm_pickle_session)(this.$b,n,e.length,r,t)}finally{for(ke(n,e.length),n=0;n<e.length;n++)e[n]=0}return P(r,t)})),Ae.prototype.unpickle=De((function(e,t){var n=xe(e=Fe(e)),r=xe(t=Fe(t));try{Re(o._olm_unpickle_session)(this.$b,n,e.length,r,t.length)}finally{for(ke(n,e.length),n=0;n<e.length;n++)e[n]=0}})),Ae.prototype.create_outbound=De((function(e,t,n){var r=Re(o._olm_create_outbound_session_random_length)(this.$b),i=Ce(r,c);t=Fe(t),n=Fe(n);var a=xe(t),s=xe(n);try{Re(o._olm_create_outbound_session)(this.$b,e.$b,a,t.length,s,n.length,i,r)}finally{ke(i,r)}})),Ae.prototype.create_inbound=De((function(e,t){var n=xe(t=Fe(t));try{Re(o._olm_create_inbound_session)(this.$b,e.$b,n,t.length)}finally{for(ke(n,t.length),e=0;e<t.length;e++)t[e]=0}})),Ae.prototype.create_inbound_from=De((function(e,t,n){var r=xe(t=Fe(t)),i=xe(n=Fe(n));try{Re(o._olm_create_inbound_session_from)(this.$b,e.$b,r,t.length,i,n.length)}finally{for(ke(i,n.length),e=0;e<n.length;e++)n[e]=0}})),Ae.prototype.session_id=De((function(){var e=Re(o._olm_session_id_length)(this.$b),t=xe(e+1);return Re(o._olm_session_id)(this.$b,t,e),P(t,e)})),Ae.prototype.has_received_message=function(){return!!Re(o._olm_session_has_received_message)(this.$b)},Ae.prototype.matches_inbound=De((function(e){var t=xe(e=Fe(e));return!!Re(o._olm_matches_inbound_session)(this.$b,t,e.length)})),Ae.prototype.matches_inbound_from=De((function(e,t){var n=xe(e=Fe(e)),r=xe(t=Fe(t));return!!Re(o._olm_matches_inbound_session_from)(this.$b,n,e.length,r,t.length)})),Ae.prototype.encrypt=De((function(e){try{var t=Re(o._olm_encrypt_random_length)(this.$b),n=Re(o._olm_encrypt_message_type)(this.$b),r=B(e),i=Re(o._olm_encrypt_message_length)(this.$b,r),a=Ce(t,c),s=we(r+1);L(e,k,s,r+1);var l=we(i+1);return Re(o._olm_encrypt)(this.$b,s,r,a,t,l,i),T(l+i),{type:n,body:P(l,i)}}finally{void 0!==a&&ke(a,t),void 0!==s&&(ke(s,r+1),Te(s)),void 0!==l&&Te(l)}})),Ae.prototype.decrypt=De((function(e,t){try{var n=we(t.length);U(t,n);var r=Re(o._olm_decrypt_max_plaintext_length)(this.$b,e,n,t.length);U(t,n);var i=we(r+1),a=Re(o._olm_decrypt)(this.$b,e,n,t.length,i,r);return T(i+a),P(i,a)}finally{void 0!==n&&Te(n),void 0!==i&&(ke(i,r),Te(i))}})),Ae.prototype.describe=De((function(){try{var e=we(256);return Re(o._olm_session_describe)(this.$b,e,256),P(e)}finally{void 0!==e&&Te(e)}})),Ne.prototype.free=function(){o._olm_clear_utility(this.$b),Te(this.$b)},Ne.prototype.sha256=De((function(e){var t=Me(o._olm_sha256_length)(this.$b),n=xe(e=Fe(e)),r=xe(t+1);try{Me(o._olm_sha256)(this.$b,n,e.length,r,t)}finally{for(ke(n,e.length),n=0;n<e.length;n++)e[n]=0}return P(r,t)})),Ne.prototype.ed25519_verify=De((function(e,t,n){var r=xe(e=Fe(e)),i=xe(t=Fe(t)),a=xe(n=Fe(n));try{Me(o._olm_ed25519_verify)(this.$b,r,e.length,i,t.length,a,n.length)}finally{for(ke(i,t.length),e=0;e<t.length;e++)t[e]=0}})),a.Account=Oe,a.Session=Ae,a.Utility=Ne,a.PkEncryption=me,a.PkDecryption=fe,a.PkSigning=be,a.SAS=ye,a.get_library_version=De((function(){var e=xe(3);return o._olm_get_library_version(e,e+1,e+2),[C(e,"i8"),C(e+1,"i8"),C(e+2,"i8")]})),t.ready},"object"==typeof t&&"object"==typeof e?e.exports=s:"function"==typeof define&&define.amd?define([],(function(){return s})):"object"==typeof t&&(t.Module=s),a.init=function(e){return o||(e&&(OLM_OPTIONS=e),o=new Promise((function(e,t){n=function(){e()},r=function(e){t(e)},s()})))},a);"undefined"!=typeof window&&(window.Olm=l),"object"==typeof e&&(e.exports=l)},function(e,t,n){"use strict";var r=n(120),i=n(502),o=n(946);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));var s=new Set,l={};function c(e,t){u(e,t),u(e+"Capture",t)}function u(e,t){for(l[e]=t,e=0;e<t.length;e++)s.add(t[e])}var d=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p=Object.prototype.hasOwnProperty,m={},g={};function f(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var _={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){_[e]=new f(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];_[t]=new f(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){_[e]=new f(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){_[e]=new f(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){_[e]=new f(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){_[e]=new f(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){_[e]=new f(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){_[e]=new f(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){_[e]=new f(e,5,!1,e.toLowerCase(),null,!1,!1)}));var b=/[\-:]([a-z])/g;function v(e){return e[1].toUpperCase()}function y(e,t,n,r){var i=_.hasOwnProperty(t)?_[t]:null;(null!==i?0===i.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!p.call(g,e)||!p.call(m,e)&&(h.test(e)?g[e]=!0:(m[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(b,v);_[t]=new f(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(b,v);_[t]=new f(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(b,v);_[t]=new f(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){_[e]=new f(e,1,!1,e.toLowerCase(),null,!1,!1)})),_.xlinkHref=new f("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){_[e]=new f(e,1,!1,e.toLowerCase(),null,!0,!0)}));var E=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,S=60103,w=60106,T=60107,C=60108,x=60114,F=60109,D=60110,k=60112,O=60113,I=60120,A=60115,R=60116,N=60121,M=60128,P=60129,L=60130,B=60131;if("function"==typeof Symbol&&Symbol.for){var U=Symbol.for;S=U("react.element"),w=U("react.portal"),T=U("react.fragment"),C=U("react.strict_mode"),x=U("react.profiler"),F=U("react.provider"),D=U("react.context"),k=U("react.forward_ref"),O=U("react.suspense"),I=U("react.suspense_list"),A=U("react.memo"),R=U("react.lazy"),N=U("react.block"),U("react.scope"),M=U("react.opaque.id"),P=U("react.debug_trace_mode"),L=U("react.offscreen"),B=U("react.legacy_hidden")}var j,G="function"==typeof Symbol&&Symbol.iterator;function z(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=G&&e[G]||e["@@iterator"])?e:null}function H(e){if(void 0===j)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);j=t&&t[1]||""}return"\n"+j+e}var q=!1;function V(e,t){if(!e||q)return"";q=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(e){if(e&&r&&"string"==typeof e.stack){for(var i=e.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s])return"\n"+i[a].replace(" at new "," at ")}while(1<=a&&0<=s);break}}}finally{q=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?H(e):""}function $(e){switch(e.tag){case 5:return H(e.type);case 16:return H("Lazy");case 13:return H("Suspense");case 19:return H("SuspenseList");case 0:case 2:case 15:return e=V(e.type,!1);case 11:return e=V(e.type.render,!1);case 22:return e=V(e.type._render,!1);case 1:return e=V(e.type,!0);default:return""}}function K(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case T:return"Fragment";case w:return"Portal";case x:return"Profiler";case C:return"StrictMode";case O:return"Suspense";case I:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case D:return(e.displayName||"Context")+".Consumer";case F:return(e._context.displayName||"Context")+".Provider";case k:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case A:return K(e.type);case N:return K(e._render);case R:t=e._payload,e=e._init;try{return K(e(t))}catch(e){}}return null}function W(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Y(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Q(e){e._valueTracker||(e._valueTracker=function(e){var t=Y(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function X(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Y(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Z(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function J(e,t){var n=t.checked;return i({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=W(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&y(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=W(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ie(e,t.type,n):t.hasOwnProperty("defaultValue")&&ie(e,t.type,W(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ie(e,t,n){"number"===t&&Z(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function oe(e,t){return e=i({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function ae(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+W(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function se(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return i({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function le(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:W(n)}}function ce(e,t){var n=W(t.value),r=W(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ue(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var de={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function he(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function pe(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?he(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var me,ge,fe=(ge=function(e,t){if(e.namespaceURI!==de.svg||"innerHTML"in e)e.innerHTML=t;else{for((me=me||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=me.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ge(e,t)}))}:ge);function _e(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var be={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ve=["Webkit","ms","Moz","O"];function ye(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||be.hasOwnProperty(e)&&be[e]?(""+t).trim():t+"px"}function Ee(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=ye(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(be).forEach((function(e){ve.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),be[t]=be[e]}))}));var Se=i({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function we(e,t){if(t){if(Se[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62))}}function Te(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Ce(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var xe=null,Fe=null,De=null;function ke(e){if(e=ni(e)){if("function"!=typeof xe)throw Error(a(280));var t=e.stateNode;t&&(t=ii(t),xe(e.stateNode,e.type,t))}}function Oe(e){Fe?De?De.push(e):De=[e]:Fe=e}function Ie(){if(Fe){var e=Fe,t=De;if(De=Fe=null,ke(e),t)for(e=0;e<t.length;e++)ke(t[e])}}function Ae(e,t){return e(t)}function Re(e,t,n,r,i){return e(t,n,r,i)}function Ne(){}var Me=Ae,Pe=!1,Le=!1;function Be(){null===Fe&&null===De||(Ne(),Ie())}function Ue(e,t){var n=e.stateNode;if(null===n)return null;var r=ii(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}var je=!1;if(d)try{var Ge={};Object.defineProperty(Ge,"passive",{get:function(){je=!0}}),window.addEventListener("test",Ge,Ge),window.removeEventListener("test",Ge,Ge)}catch(ge){je=!1}function ze(e,t,n,r,i,o,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var He=!1,qe=null,Ve=!1,$e=null,Ke={onError:function(e){He=!0,qe=e}};function We(e,t,n,r,i,o,a,s,l){He=!1,qe=null,ze.apply(Ke,arguments)}function Ye(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Qe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Xe(e){if(Ye(e)!==e)throw Error(a(188))}function Ze(e){if(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ye(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return Xe(i),e;if(o===r)return Xe(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e),!e)return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function Je(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var et,tt,nt,rt,it=!1,ot=[],at=null,st=null,lt=null,ct=new Map,ut=new Map,dt=[],ht="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function pt(e,t,n,r,i){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:i,targetContainers:[r]}}function mt(e,t){switch(e){case"focusin":case"focusout":at=null;break;case"dragenter":case"dragleave":st=null;break;case"mouseover":case"mouseout":lt=null;break;case"pointerover":case"pointerout":ct.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ut.delete(t.pointerId)}}function gt(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e=pt(t,n,r,i,o),null!==t&&(null!==(t=ni(t))&&tt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function ft(e){var t=ti(e.target);if(null!==t){var n=Ye(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Qe(n)))return e.blockedOn=t,void rt(e.lanePriority,(function(){o.unstable_runWithPriority(e.priority,(function(){nt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function _t(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=ni(n))&&tt(t),e.blockedOn=n,!1;t.shift()}return!0}function bt(e,t,n){_t(e)&&n.delete(t)}function vt(){for(it=!1;0<ot.length;){var e=ot[0];if(null!==e.blockedOn){null!==(e=ni(e.blockedOn))&&et(e);break}for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&&ot.shift()}null!==at&&_t(at)&&(at=null),null!==st&&_t(st)&&(st=null),null!==lt&&_t(lt)&&(lt=null),ct.forEach(bt),ut.forEach(bt)}function yt(e,t){e.blockedOn===t&&(e.blockedOn=null,it||(it=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,vt)))}function Et(e){function t(t){return yt(t,e)}if(0<ot.length){yt(ot[0],e);for(var n=1;n<ot.length;n++){var r=ot[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==at&&yt(at,e),null!==st&&yt(st,e),null!==lt&&yt(lt,e),ct.forEach(t),ut.forEach(t),n=0;n<dt.length;n++)(r=dt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<dt.length&&null===(n=dt[0]).blockedOn;)ft(n),null===n.blockedOn&&dt.shift()}function St(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var wt={animationend:St("Animation","AnimationEnd"),animationiteration:St("Animation","AnimationIteration"),animationstart:St("Animation","AnimationStart"),transitionend:St("Transition","TransitionEnd")},Tt={},Ct={};function xt(e){if(Tt[e])return Tt[e];if(!wt[e])return e;var t,n=wt[e];for(t in n)if(n.hasOwnProperty(t)&&t in Ct)return Tt[e]=n[t];return e}d&&(Ct=document.createElement("div").style,"AnimationEvent"in window||(delete wt.animationend.animation,delete wt.animationiteration.animation,delete wt.animationstart.animation),"TransitionEvent"in window||delete wt.transitionend.transition);var Ft=xt("animationend"),Dt=xt("animationiteration"),kt=xt("animationstart"),Ot=xt("transitionend"),It=new Map,At=new Map,Rt=["abort","abort",Ft,"animationEnd",Dt,"animationIteration",kt,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Ot,"transitionEnd","waiting","waiting"];function Nt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],i=e[n+1];i="on"+(i[0].toUpperCase()+i.slice(1)),At.set(r,t),It.set(r,i),c(i,[r])}}(0,o.unstable_now)();var Mt=8;function Pt(e){if(0!=(1&e))return Mt=15,1;if(0!=(2&e))return Mt=14,2;if(0!=(4&e))return Mt=13,4;var t=24&e;return 0!==t?(Mt=12,t):0!=(32&e)?(Mt=11,32):0!==(t=192&e)?(Mt=10,t):0!=(256&e)?(Mt=9,256):0!==(t=3584&e)?(Mt=8,t):0!=(4096&e)?(Mt=7,4096):0!==(t=4186112&e)?(Mt=6,t):0!==(t=62914560&e)?(Mt=5,t):67108864&e?(Mt=4,67108864):0!=(134217728&e)?(Mt=3,134217728):0!==(t=805306368&e)?(Mt=2,t):0!=(1073741824&e)?(Mt=1,1073741824):(Mt=8,e)}function Lt(e,t){var n=e.pendingLanes;if(0===n)return Mt=0;var r=0,i=0,o=e.expiredLanes,a=e.suspendedLanes,s=e.pingedLanes;if(0!==o)r=o,i=Mt=15;else if(0!==(o=134217727&n)){var l=o&~a;0!==l?(r=Pt(l),i=Mt):0!==(s&=o)&&(r=Pt(s),i=Mt)}else 0!==(o=n&~a)?(r=Pt(o),i=Mt):0!==s&&(r=Pt(s),i=Mt);if(0===r)return 0;if(r=n&((0>(r=31-Ht(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0==(t&a)){if(Pt(t),i<=Mt)return t;Mt=i}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-Ht(t)),r|=e[n],t&=~i;return r}function Bt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Ut(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=jt(24&~t))?Ut(10,t):e;case 10:return 0===(e=jt(192&~t))?Ut(8,t):e;case 8:return 0===(e=jt(3584&~t))&&(0===(e=jt(4186112&~t))&&(e=512)),e;case 2:return 0===(t=jt(805306368&~t))&&(t=268435456),t}throw Error(a(358,e))}function jt(e){return e&-e}function Gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function zt(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Ht(t)]=n}var Ht=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(qt(e)/Vt|0)|0},qt=Math.log,Vt=Math.LN2;var $t=o.unstable_UserBlockingPriority,Kt=o.unstable_runWithPriority,Wt=!0;function Yt(e,t,n,r){Pe||Ne();var i=Xt,o=Pe;Pe=!0;try{Re(i,e,t,n,r)}finally{(Pe=o)||Be()}}function Qt(e,t,n,r){Kt($t,Xt.bind(null,e,t,n,r))}function Xt(e,t,n,r){var i;if(Wt)if((i=0==(4&t))&&0<ot.length&&-1<ht.indexOf(e))e=pt(null,e,t,n,r),ot.push(e);else{var o=Zt(e,t,n,r);if(null===o)i&&mt(e,r);else{if(i){if(-1<ht.indexOf(e))return e=pt(o,e,t,n,r),void ot.push(e);if(function(e,t,n,r,i){switch(t){case"focusin":return at=gt(at,e,t,n,r,i),!0;case"dragenter":return st=gt(st,e,t,n,r,i),!0;case"mouseover":return lt=gt(lt,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return ct.set(o,gt(ct.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,ut.set(o,gt(ut.get(o)||null,e,t,n,r,i)),!0}return!1}(o,e,t,n,r))return;mt(e,r)}Nr(e,t,r,null,n)}}}function Zt(e,t,n,r){var i=Ce(r);if(null!==(i=ti(i))){var o=Ye(i);if(null===o)i=null;else{var a=o.tag;if(13===a){if(null!==(i=Qe(o)))return i;i=null}else if(3===a){if(o.stateNode.hydrate)return 3===o.tag?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null)}}return Nr(e,t,r,i,n),null}var Jt=null,en=null,tn=null;function nn(){if(tn)return tn;var e,t,n=en,r=n.length,i="value"in Jt?Jt.value:Jt.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return tn=i.slice(e,1<t?1-t:void 0)}function rn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function on(){return!0}function an(){return!1}function sn(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?on:an,this.isPropagationStopped=an,this}return i(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=on)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=on)},persist:function(){},isPersistent:on}),t}var ln,cn,un,dn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hn=sn(dn),pn=i({},dn,{view:0,detail:0}),mn=sn(pn),gn=i({},pn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==un&&(un&&"mousemove"===e.type?(ln=e.screenX-un.screenX,cn=e.screenY-un.screenY):cn=ln=0,un=e),ln)},movementY:function(e){return"movementY"in e?e.movementY:cn}}),fn=sn(gn),_n=sn(i({},gn,{dataTransfer:0})),bn=sn(i({},pn,{relatedTarget:0})),vn=sn(i({},dn,{animationName:0,elapsedTime:0,pseudoElement:0})),yn=i({},dn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),En=sn(yn),Sn=sn(i({},dn,{data:0})),wn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Tn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Cn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Cn[e])&&!!t[e]}function Fn(){return xn}var Dn=i({},pn,{key:function(e){if(e.key){var t=wn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=rn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Tn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fn,charCode:function(e){return"keypress"===e.type?rn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?rn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),kn=sn(Dn),On=sn(i({},gn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),In=sn(i({},pn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fn})),An=sn(i({},dn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Rn=i({},gn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Nn=sn(Rn),Mn=[9,13,27,32],Pn=d&&"CompositionEvent"in window,Ln=null;d&&"documentMode"in document&&(Ln=document.documentMode);var Bn=d&&"TextEvent"in window&&!Ln,Un=d&&(!Pn||Ln&&8<Ln&&11>=Ln),jn=String.fromCharCode(32),Gn=!1;function zn(e,t){switch(e){case"keyup":return-1!==Mn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var qn=!1;var Vn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function $n(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Vn[e.type]:"textarea"===t}function Kn(e,t,n,r){Oe(r),0<(t=Pr(t,"onChange")).length&&(n=new hn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Wn=null,Yn=null;function Qn(e){Dr(e,0)}function Xn(e){if(X(ri(e)))return e}function Zn(e,t){if("change"===e)return t}var Jn=!1;if(d){var er;if(d){var tr="oninput"in document;if(!tr){var nr=document.createElement("div");nr.setAttribute("oninput","return;"),tr="function"==typeof nr.oninput}er=tr}else er=!1;Jn=er&&(!document.documentMode||9<document.documentMode)}function rr(){Wn&&(Wn.detachEvent("onpropertychange",ir),Yn=Wn=null)}function ir(e){if("value"===e.propertyName&&Xn(Yn)){var t=[];if(Kn(t,Yn,e,Ce(e)),e=Qn,Pe)e(t);else{Pe=!0;try{Ae(e,t)}finally{Pe=!1,Be()}}}}function or(e,t,n){"focusin"===e?(rr(),Yn=n,(Wn=t).attachEvent("onpropertychange",ir)):"focusout"===e&&rr()}function ar(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Xn(Yn)}function sr(e,t){if("click"===e)return Xn(t)}function lr(e,t){if("input"===e||"change"===e)return Xn(t)}var cr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},ur=Object.prototype.hasOwnProperty;function dr(e,t){if(cr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!ur.call(t,n[r])||!cr(e[n[r]],t[n[r]]))return!1;return!0}function hr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pr(e,t){var n,r=hr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=hr(r)}}function mr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?mr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function gr(){for(var e=window,t=Z();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=Z((e=t.contentWindow).document)}return t}function fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var _r=d&&"documentMode"in document&&11>=document.documentMode,br=null,vr=null,yr=null,Er=!1;function Sr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;Er||null==br||br!==Z(r)||("selectionStart"in(r=br)&&fr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},yr&&dr(yr,r)||(yr=r,0<(r=Pr(vr,"onSelect")).length&&(t=new hn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=br)))}Nt("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Nt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Nt(Rt,2);for(var wr="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Tr=0;Tr<wr.length;Tr++)At.set(wr[Tr],0);u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Cr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),xr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Cr));function Fr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,s,l,c){if(We.apply(this,arguments),He){if(!He)throw Error(a(198));var u=qe;He=!1,qe=null,Ve||(Ve=!0,$e=u)}}(r,t,void 0,e),e.currentTarget=null}function Dr(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;Fr(i,s,c),o=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,c=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;Fr(i,s,c),o=l}}}if(Ve)throw e=$e,Ve=!1,$e=null,e}function kr(e,t){var n=oi(t),r=e+"__bubble";n.has(r)||(Rr(t,e,2,!1),n.add(r))}var Or="_reactListening"+Math.random().toString(36).slice(2);function Ir(e){e[Or]||(e[Or]=!0,s.forEach((function(t){xr.has(t)||Ar(t,!1,e,null),Ar(t,!0,e,null)})))}function Ar(e,t,n,r){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=n;if("selectionchange"===e&&9!==n.nodeType&&(o=n.ownerDocument),null!==r&&!t&&xr.has(e)){if("scroll"!==e)return;i|=2,o=r}var a=oi(o),s=e+"__"+(t?"capture":"bubble");a.has(s)||(t&&(i|=4),Rr(o,e,i,t),a.add(s))}function Rr(e,t,n,r){var i=At.get(t);switch(void 0===i?2:i){case 0:i=Yt;break;case 1:i=Qt;break;default:i=Xt}n=i.bind(null,t,n,e),i=void 0,!je||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Nr(e,t,n,r,i){var o=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=ti(s)))return;if(5===(l=a.tag)||6===l){r=o=a;continue e}s=s.parentNode}}r=r.return}!function(e,t,n){if(Le)return e(t,n);Le=!0;try{return Me(e,t,n)}finally{Le=!1,Be()}}((function(){var r=o,i=Ce(n),a=[];e:{var s=It.get(e);if(void 0!==s){var l=hn,c=e;switch(e){case"keypress":if(0===rn(n))break e;case"keydown":case"keyup":l=kn;break;case"focusin":c="focus",l=bn;break;case"focusout":c="blur",l=bn;break;case"beforeblur":case"afterblur":l=bn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=fn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=_n;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=In;break;case Ft:case Dt:case kt:l=vn;break;case Ot:l=An;break;case"scroll":l=mn;break;case"wheel":l=Nn;break;case"copy":case"cut":case"paste":l=En;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=On}var u=0!=(4&t),d=!u&&"scroll"===e,h=u?null!==s?s+"Capture":null:s;u=[];for(var p,m=r;null!==m;){var g=(p=m).stateNode;if(5===p.tag&&null!==g&&(p=g,null!==h&&(null!=(g=Ue(m,h))&&u.push(Mr(m,g,p)))),d)break;m=m.return}0<u.length&&(s=new l(s,c,null,n,i),a.push({event:s,listeners:u}))}}if(0==(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||0!=(16&t)||!(c=n.relatedTarget||n.fromElement)||!ti(c)&&!c[Jr])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?ti(c):null)&&(c!==(d=Ye(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=fn,g="onMouseLeave",h="onMouseEnter",m="mouse","pointerout"!==e&&"pointerover"!==e||(u=On,g="onPointerLeave",h="onPointerEnter",m="pointer"),d=null==l?s:ri(l),p=null==c?s:ri(c),(s=new u(g,m+"leave",l,n,i)).target=d,s.relatedTarget=p,g=null,ti(i)===r&&((u=new u(h,m+"enter",c,n,i)).target=p,u.relatedTarget=d,g=u),d=g,l&&c)e:{for(h=c,m=0,p=u=l;p;p=Lr(p))m++;for(p=0,g=h;g;g=Lr(g))p++;for(;0<m-p;)u=Lr(u),m--;for(;0<p-m;)h=Lr(h),p--;for(;m--;){if(u===h||null!==h&&u===h.alternate)break e;u=Lr(u),h=Lr(h)}u=null}else u=null;null!==l&&Br(a,s,l,u,!1),null!==c&&null!==d&&Br(a,d,c,u,!0)}if("select"===(l=(s=r?ri(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var f=Zn;else if($n(s))if(Jn)f=lr;else{f=ar;var _=or}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(f=sr);switch(f&&(f=f(e,r))?Kn(a,f,n,i):(_&&_(e,s,r),"focusout"===e&&(_=s._wrapperState)&&_.controlled&&"number"===s.type&&ie(s,"number",s.value)),_=r?ri(r):window,e){case"focusin":($n(_)||"true"===_.contentEditable)&&(br=_,vr=r,yr=null);break;case"focusout":yr=vr=br=null;break;case"mousedown":Er=!0;break;case"contextmenu":case"mouseup":case"dragend":Er=!1,Sr(a,n,i);break;case"selectionchange":if(_r)break;case"keydown":case"keyup":Sr(a,n,i)}var b;if(Pn)e:{switch(e){case"compositionstart":var v="onCompositionStart";break e;case"compositionend":v="onCompositionEnd";break e;case"compositionupdate":v="onCompositionUpdate";break e}v=void 0}else qn?zn(e,n)&&(v="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(v="onCompositionStart");v&&(Un&&"ko"!==n.locale&&(qn||"onCompositionStart"!==v?"onCompositionEnd"===v&&qn&&(b=nn()):(en="value"in(Jt=i)?Jt.value:Jt.textContent,qn=!0)),0<(_=Pr(r,v)).length&&(v=new Sn(v,e,null,n,i),a.push({event:v,listeners:_}),b?v.data=b:null!==(b=Hn(n))&&(v.data=b))),(b=Bn?function(e,t){switch(e){case"compositionend":return Hn(t);case"keypress":return 32!==t.which?null:(Gn=!0,jn);case"textInput":return(e=t.data)===jn&&Gn?null:e;default:return null}}(e,n):function(e,t){if(qn)return"compositionend"===e||!Pn&&zn(e,t)?(e=nn(),tn=en=Jt=null,qn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Un&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Pr(r,"onBeforeInput")).length&&(i=new Sn("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=b))}Dr(a,t)}))}function Mr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Pr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=Ue(e,n))&&r.unshift(Mr(e,o,i)),null!=(o=Ue(e,t))&&r.push(Mr(e,o,i))),e=e.return}return r}function Lr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Br(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(l=Ue(n,o))&&a.unshift(Mr(n,l,s)):i||null!=(l=Ue(n,o))&&a.push(Mr(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}function Ur(){}var jr=null,Gr=null;function zr(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Hr(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var qr="function"==typeof setTimeout?setTimeout:void 0,Vr="function"==typeof clearTimeout?clearTimeout:void 0;function $r(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function Kr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Wr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Yr=0;var Qr=Math.random().toString(36).slice(2),Xr="__reactFiber$"+Qr,Zr="__reactProps$"+Qr,Jr="__reactContainer$"+Qr,ei="__reactEvents$"+Qr;function ti(e){var t=e[Xr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Jr]||n[Xr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Wr(e);null!==e;){if(n=e[Xr])return n;e=Wr(e)}return t}n=(e=n).parentNode}return null}function ni(e){return!(e=e[Xr]||e[Jr])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ri(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function ii(e){return e[Zr]||null}function oi(e){var t=e[ei];return void 0===t&&(t=e[ei]=new Set),t}var ai=[],si=-1;function li(e){return{current:e}}function ci(e){0>si||(e.current=ai[si],ai[si]=null,si--)}function ui(e,t){si++,ai[si]=e.current,e.current=t}var di={},hi=li(di),pi=li(!1),mi=di;function gi(e,t){var n=e.type.contextTypes;if(!n)return di;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function fi(e){return null!=(e=e.childContextTypes)}function _i(){ci(pi),ci(hi)}function bi(e,t,n){if(hi.current!==di)throw Error(a(168));ui(hi,t),ui(pi,n)}function vi(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in e))throw Error(a(108,K(t)||"Unknown",o));return i({},n,r)}function yi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||di,mi=hi.current,ui(hi,e),ui(pi,pi.current),!0}function Ei(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=vi(e,t,mi),r.__reactInternalMemoizedMergedChildContext=e,ci(pi),ci(hi),ui(hi,e)):ci(pi),ui(pi,n)}var Si=null,wi=null,Ti=o.unstable_runWithPriority,Ci=o.unstable_scheduleCallback,xi=o.unstable_cancelCallback,Fi=o.unstable_shouldYield,Di=o.unstable_requestPaint,ki=o.unstable_now,Oi=o.unstable_getCurrentPriorityLevel,Ii=o.unstable_ImmediatePriority,Ai=o.unstable_UserBlockingPriority,Ri=o.unstable_NormalPriority,Ni=o.unstable_LowPriority,Mi=o.unstable_IdlePriority,Pi={},Li=void 0!==Di?Di:function(){},Bi=null,Ui=null,ji=!1,Gi=ki(),zi=1e4>Gi?ki:function(){return ki()-Gi};function Hi(){switch(Oi()){case Ii:return 99;case Ai:return 98;case Ri:return 97;case Ni:return 96;case Mi:return 95;default:throw Error(a(332))}}function qi(e){switch(e){case 99:return Ii;case 98:return Ai;case 97:return Ri;case 96:return Ni;case 95:return Mi;default:throw Error(a(332))}}function Vi(e,t){return e=qi(e),Ti(e,t)}function $i(e,t,n){return e=qi(e),Ci(e,t,n)}function Ki(){if(null!==Ui){var e=Ui;Ui=null,xi(e)}Wi()}function Wi(){if(!ji&&null!==Bi){ji=!0;var e=0;try{var t=Bi;Vi(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Bi=null}catch(t){throw null!==Bi&&(Bi=Bi.slice(e+1)),Ci(Ii,Ki),t}finally{ji=!1}}}var Yi=E.ReactCurrentBatchConfig;function Qi(e,t){if(e&&e.defaultProps){for(var n in t=i({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Xi=li(null),Zi=null,Ji=null,eo=null;function to(){eo=Ji=Zi=null}function no(e){var t=Xi.current;ci(Xi),e.type._context._currentValue=t}function ro(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function io(e,t){Zi=e,eo=Ji=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(Pa=!0),e.firstContext=null)}function oo(e,t){if(eo!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(eo=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Ji){if(null===Zi)throw Error(a(308));Ji=t,Zi.dependencies={lanes:0,firstContext:t,responders:null}}else Ji=Ji.next=t;return e._currentValue}var ao=!1;function so(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function lo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function co(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function uo(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function ho(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function po(e,t,n,r){var o=e.updateQueue;ao=!1;var a=o.firstBaseUpdate,s=o.lastBaseUpdate,l=o.shared.pending;if(null!==l){o.shared.pending=null;var c=l,u=c.next;c.next=null,null===s?a=u:s.next=u,s=c;var d=e.alternate;if(null!==d){var h=(d=d.updateQueue).lastBaseUpdate;h!==s&&(null===h?d.firstBaseUpdate=u:h.next=u,d.lastBaseUpdate=c)}}if(null!==a){for(h=o.baseState,s=0,d=u=c=null;;){l=a.lane;var p=a.eventTime;if((r&l)===l){null!==d&&(d=d.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,g=a;switch(l=t,p=n,g.tag){case 1:if("function"==typeof(m=g.payload)){h=m.call(p,h,l);break e}h=m;break e;case 3:m.flags=-4097&m.flags|64;case 0:if(null==(l="function"==typeof(m=g.payload)?m.call(p,h,l):m))break e;h=i({},h,l);break e;case 2:ao=!0}}null!==a.callback&&(e.flags|=32,null===(l=o.effects)?o.effects=[a]:l.push(a))}else p={eventTime:p,lane:l,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===d?(u=d=p,c=h):d=d.next=p,s|=l;if(null===(a=a.next)){if(null===(l=o.shared.pending))break;a=l.next,l.next=null,o.lastBaseUpdate=l,o.shared.pending=null}}null===d&&(c=h),o.baseState=c,o.firstBaseUpdate=u,o.lastBaseUpdate=d,Gs|=s,e.lanes=s,e.memoizedState=h}}function mo(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(a(191,i));i.call(r)}}}var go=(new r.Component).refs;function fo(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:i({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var _o={isMounted:function(e){return!!(e=e._reactInternals)&&Ye(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=hl(),i=pl(e),o=co(r,i);o.payload=t,null!=n&&(o.callback=n),uo(e,o),ml(e,i,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=hl(),i=pl(e),o=co(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),uo(e,o),ml(e,i,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=hl(),r=pl(e),i=co(n,r);i.tag=2,null!=t&&(i.callback=t),uo(e,i),ml(e,r,n)}};function bo(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!dr(n,r)||!dr(i,o))}function vo(e,t,n){var r=!1,i=di,o=t.contextType;return"object"==typeof o&&null!==o?o=oo(o):(i=fi(t)?mi:hi.current,o=(r=null!=(r=t.contextTypes))?gi(e,i):di),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=_o,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function yo(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&_o.enqueueReplaceState(t,t.state,null)}function Eo(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=go,so(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=oo(o):(o=fi(t)?mi:hi.current,i.context=gi(e,o)),po(e,n,i,r),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(fo(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&_o.enqueueReplaceState(i,i.state,null),po(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4)}var So=Array.isArray;function wo(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:(t=function(e){var t=r.refs;t===go&&(t=r.refs={}),null===e?delete t[i]:t[i]=e},t._stringRef=i,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function To(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function Co(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=$l(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function s(t){return e&&null===t.alternate&&(t.flags=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Ql(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){return null!==t&&t.elementType===n.type?((r=i(t,n.props)).ref=wo(e,t,n),r.return=e,r):((r=Kl(n.type,n.key,n.props,null,e.mode,r)).ref=wo(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Xl(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function d(e,t,n,r,o){return null===t||7!==t.tag?((t=Wl(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Ql(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case S:return(n=Kl(t.type,t.key,t.props,null,e.mode,n)).ref=wo(e,null,t),n.return=e,n;case w:return(t=Xl(t,e.mode,n)).return=e,t}if(So(t)||z(t))return(t=Wl(t,e.mode,n,null)).return=e,t;To(e,t)}return null}function p(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==i?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case S:return n.key===i?n.type===T?d(e,t,n.props.children,r,i):c(e,t,n,r):null;case w:return n.key===i?u(e,t,n,r):null}if(So(n)||z(n))return null!==i?null:d(e,t,n,r,null);To(e,n)}return null}function m(e,t,n,r,i){if("string"==typeof r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case S:return e=e.get(null===r.key?n:r.key)||null,r.type===T?d(t,e,r.props.children,i,r.key):c(t,e,r,i);case w:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(So(r)||z(r))return d(t,e=e.get(n)||null,r,i,null);To(t,r)}return null}function g(i,a,s,l){for(var c=null,u=null,d=a,g=a=0,f=null;null!==d&&g<s.length;g++){d.index>g?(f=d,d=null):f=d.sibling;var _=p(i,d,s[g],l);if(null===_){null===d&&(d=f);break}e&&d&&null===_.alternate&&t(i,d),a=o(_,a,g),null===u?c=_:u.sibling=_,u=_,d=f}if(g===s.length)return n(i,d),c;if(null===d){for(;g<s.length;g++)null!==(d=h(i,s[g],l))&&(a=o(d,a,g),null===u?c=d:u.sibling=d,u=d);return c}for(d=r(i,d);g<s.length;g++)null!==(f=m(d,i,g,s[g],l))&&(e&&null!==f.alternate&&d.delete(null===f.key?g:f.key),a=o(f,a,g),null===u?c=f:u.sibling=f,u=f);return e&&d.forEach((function(e){return t(i,e)})),c}function f(i,s,l,c){var u=z(l);if("function"!=typeof u)throw Error(a(150));if(null==(l=u.call(l)))throw Error(a(151));for(var d=u=null,g=s,f=s=0,_=null,b=l.next();null!==g&&!b.done;f++,b=l.next()){g.index>f?(_=g,g=null):_=g.sibling;var v=p(i,g,b.value,c);if(null===v){null===g&&(g=_);break}e&&g&&null===v.alternate&&t(i,g),s=o(v,s,f),null===d?u=v:d.sibling=v,d=v,g=_}if(b.done)return n(i,g),u;if(null===g){for(;!b.done;f++,b=l.next())null!==(b=h(i,b.value,c))&&(s=o(b,s,f),null===d?u=b:d.sibling=b,d=b);return u}for(g=r(i,g);!b.done;f++,b=l.next())null!==(b=m(g,i,f,b.value,c))&&(e&&null!==b.alternate&&g.delete(null===b.key?f:b.key),s=o(b,s,f),null===d?u=b:d.sibling=b,d=b);return e&&g.forEach((function(e){return t(i,e)})),u}return function(e,r,o,l){var c="object"==typeof o&&null!==o&&o.type===T&&null===o.key;c&&(o=o.props.children);var u="object"==typeof o&&null!==o;if(u)switch(o.$$typeof){case S:e:{for(u=o.key,c=r;null!==c;){if(c.key===u){if(7===c.tag){if(o.type===T){n(e,c.sibling),(r=i(c,o.props.children)).return=e,e=r;break e}}else if(c.elementType===o.type){n(e,c.sibling),(r=i(c,o.props)).ref=wo(e,c,o),r.return=e,e=r;break e}n(e,c);break}t(e,c),c=c.sibling}o.type===T?((r=Wl(o.props.children,e.mode,l,o.key)).return=e,e=r):((l=Kl(o.type,o.key,o.props,null,e.mode,l)).ref=wo(e,r,o),l.return=e,e=l)}return s(e);case w:e:{for(c=o.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),(r=i(r,o.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Xl(o,e.mode,l)).return=e,e=r}return s(e)}if("string"==typeof o||"number"==typeof o)return o=""+o,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,o)).return=e,e=r):(n(e,r),(r=Ql(o,e.mode,l)).return=e,e=r),s(e);if(So(o))return g(e,r,o,l);if(z(o))return f(e,r,o,l);if(u&&To(e,o),void 0===o&&!c)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(a(152,K(e.type)||"Component"))}return n(e,r)}}var xo=Co(!0),Fo=Co(!1),Do={},ko=li(Do),Oo=li(Do),Io=li(Do);function Ao(e){if(e===Do)throw Error(a(174));return e}function Ro(e,t){switch(ui(Io,t),ui(Oo,e),ui(ko,Do),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:pe(null,"");break;default:t=pe(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ci(ko),ui(ko,t)}function No(){ci(ko),ci(Oo),ci(Io)}function Mo(e){Ao(Io.current);var t=Ao(ko.current),n=pe(t,e.type);t!==n&&(ui(Oo,e),ui(ko,n))}function Po(e){Oo.current===e&&(ci(ko),ci(Oo))}var Lo=li(0);function Bo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Uo=null,jo=null,Go=!1;function zo(e,t){var n=ql(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Ho(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function qo(e){if(Go){var t=jo;if(t){var n=t;if(!Ho(e,t)){if(!(t=Kr(n.nextSibling))||!Ho(e,t))return e.flags=-1025&e.flags|2,Go=!1,void(Uo=e);zo(Uo,n)}Uo=e,jo=Kr(t.firstChild)}else e.flags=-1025&e.flags|2,Go=!1,Uo=e}}function Vo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Uo=e}function $o(e){if(e!==Uo)return!1;if(!Go)return Vo(e),Go=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Hr(t,e.memoizedProps))for(t=jo;t;)zo(e,t),t=Kr(t.nextSibling);if(Vo(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){jo=Kr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}jo=null}}else jo=Uo?Kr(e.stateNode.nextSibling):null;return!0}function Ko(){jo=Uo=null,Go=!1}var Wo=[];function Yo(){for(var e=0;e<Wo.length;e++)Wo[e]._workInProgressVersionPrimary=null;Wo.length=0}var Qo=E.ReactCurrentDispatcher,Xo=E.ReactCurrentBatchConfig,Zo=0,Jo=null,ea=null,ta=null,na=!1,ra=!1;function ia(){throw Error(a(321))}function oa(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!cr(e[n],t[n]))return!1;return!0}function aa(e,t,n,r,i,o){if(Zo=o,Jo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Qo.current=null===e||null===e.memoizedState?Aa:Ra,e=n(r,i),ra){o=0;do{if(ra=!1,!(25>o))throw Error(a(301));o+=1,ta=ea=null,t.updateQueue=null,Qo.current=Na,e=n(r,i)}while(ra)}if(Qo.current=Ia,t=null!==ea&&null!==ea.next,Zo=0,ta=ea=Jo=null,na=!1,t)throw Error(a(300));return e}function sa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ta?Jo.memoizedState=ta=e:ta=ta.next=e,ta}function la(){if(null===ea){var e=Jo.alternate;e=null!==e?e.memoizedState:null}else e=ea.next;var t=null===ta?Jo.memoizedState:ta.next;if(null!==t)ta=t,ea=e;else{if(null===e)throw Error(a(310));e={memoizedState:(ea=e).memoizedState,baseState:ea.baseState,baseQueue:ea.baseQueue,queue:ea.queue,next:null},null===ta?Jo.memoizedState=ta=e:ta=ta.next=e}return ta}function ca(e,t){return"function"==typeof t?t(e):t}function ua(e){var t=la(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=ea,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var l=s=o=null,c=i;do{var u=c.lane;if((Zo&u)===u)null!==l&&(l=l.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),r=c.eagerReducer===e?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===l?(s=l=d,o=r):l=l.next=d,Jo.lanes|=u,Gs|=u}c=c.next}while(null!==c&&c!==i);null===l?o=r:l.next=s,cr(r,t.memoizedState)||(Pa=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function da(e){var t=la(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=e(o,s.action),s=s.next}while(s!==i);cr(o,t.memoizedState)||(Pa=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ha(e,t,n){var r=t._getVersion;r=r(t._source);var i=t._workInProgressVersionPrimary;if(null!==i?e=i===r:(e=e.mutableReadLanes,(e=(Zo&e)===e)&&(t._workInProgressVersionPrimary=r,Wo.push(t))),e)return n(t._source);throw Wo.push(t),Error(a(350))}function pa(e,t,n,r){var i=Rs;if(null===i)throw Error(a(349));var o=t._getVersion,s=o(t._source),l=Qo.current,c=l.useState((function(){return ha(i,t,n)})),u=c[1],d=c[0];c=ta;var h=e.memoizedState,p=h.refs,m=p.getSnapshot,g=h.source;h=h.subscribe;var f=Jo;return e.memoizedState={refs:p,source:t,subscribe:r},l.useEffect((function(){p.getSnapshot=n,p.setSnapshot=u;var e=o(t._source);if(!cr(s,e)){e=n(t._source),cr(d,e)||(u(e),e=pl(f),i.mutableReadLanes|=e&i.pendingLanes),e=i.mutableReadLanes,i.entangledLanes|=e;for(var r=i.entanglements,a=e;0<a;){var l=31-Ht(a),c=1<<l;r[l]|=e,a&=~c}}}),[n,t,r]),l.useEffect((function(){return r(t._source,(function(){var e=p.getSnapshot,n=p.setSnapshot;try{n(e(t._source));var r=pl(f);i.mutableReadLanes|=r&i.pendingLanes}catch(e){n((function(){throw e}))}}))}),[t,r]),cr(m,n)&&cr(g,t)&&cr(h,r)||((e={pending:null,dispatch:null,lastRenderedReducer:ca,lastRenderedState:d}).dispatch=u=Oa.bind(null,Jo,e),c.queue=e,c.baseQueue=null,d=ha(i,t,n),c.memoizedState=c.baseState=d),d}function ma(e,t,n){return pa(la(),e,t,n)}function ga(e){var t=sa();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:ca,lastRenderedState:e}).dispatch=Oa.bind(null,Jo,e),[t.memoizedState,e]}function fa(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Jo.updateQueue)?(t={lastEffect:null},Jo.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function _a(e){return e={current:e},sa().memoizedState=e}function ba(){return la().memoizedState}function va(e,t,n,r){var i=sa();Jo.flags|=e,i.memoizedState=fa(1|t,n,void 0,void 0===r?null:r)}function ya(e,t,n,r){var i=la();r=void 0===r?null:r;var o=void 0;if(null!==ea){var a=ea.memoizedState;if(o=a.destroy,null!==r&&oa(r,a.deps))return void fa(t,n,o,r)}Jo.flags|=e,i.memoizedState=fa(1|t,n,o,r)}function Ea(e,t){return va(516,4,e,t)}function Sa(e,t){return ya(516,4,e,t)}function wa(e,t){return ya(4,2,e,t)}function Ta(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ca(e,t,n){return n=null!=n?n.concat([e]):null,ya(4,2,Ta.bind(null,t,e),n)}function xa(){}function Fa(e,t){var n=la();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&oa(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Da(e,t){var n=la();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&oa(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ka(e,t){var n=Hi();Vi(98>n?98:n,(function(){e(!0)})),Vi(97<n?97:n,(function(){var n=Xo.transition;Xo.transition=1;try{e(!1),t()}finally{Xo.transition=n}}))}function Oa(e,t,n){var r=hl(),i=pl(e),o={lane:i,action:n,eagerReducer:null,eagerState:null,next:null},a=t.pending;if(null===a?o.next=o:(o.next=a.next,a.next=o),t.pending=o,a=e.alternate,e===Jo||null!==a&&a===Jo)ra=na=!0;else{if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var s=t.lastRenderedState,l=a(s,n);if(o.eagerReducer=a,o.eagerState=l,cr(l,s))return}catch(e){}ml(e,i,r)}}var Ia={readContext:oo,useCallback:ia,useContext:ia,useEffect:ia,useImperativeHandle:ia,useLayoutEffect:ia,useMemo:ia,useReducer:ia,useRef:ia,useState:ia,useDebugValue:ia,useDeferredValue:ia,useTransition:ia,useMutableSource:ia,useOpaqueIdentifier:ia,unstable_isNewReconciler:!1},Aa={readContext:oo,useCallback:function(e,t){return sa().memoizedState=[e,void 0===t?null:t],e},useContext:oo,useEffect:Ea,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,va(4,2,Ta.bind(null,t,e),n)},useLayoutEffect:function(e,t){return va(4,2,e,t)},useMemo:function(e,t){var n=sa();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=sa();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Oa.bind(null,Jo,e),[r.memoizedState,e]},useRef:_a,useState:ga,useDebugValue:xa,useDeferredValue:function(e){var t=ga(e),n=t[0],r=t[1];return Ea((function(){var t=Xo.transition;Xo.transition=1;try{r(e)}finally{Xo.transition=t}}),[e]),n},useTransition:function(){var e=ga(!1),t=e[0];return _a(e=ka.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=sa();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},pa(r,e,t,n)},useOpaqueIdentifier:function(){if(Go){var e=!1,t=function(e){return{$$typeof:M,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+(Yr++).toString(36))),Error(a(355))})),n=ga(t)[1];return 0==(2&Jo.mode)&&(Jo.flags|=516,fa(5,(function(){n("r:"+(Yr++).toString(36))}),void 0,null)),t}return ga(t="r:"+(Yr++).toString(36)),t},unstable_isNewReconciler:!1},Ra={readContext:oo,useCallback:Fa,useContext:oo,useEffect:Sa,useImperativeHandle:Ca,useLayoutEffect:wa,useMemo:Da,useReducer:ua,useRef:ba,useState:function(){return ua(ca)},useDebugValue:xa,useDeferredValue:function(e){var t=ua(ca),n=t[0],r=t[1];return Sa((function(){var t=Xo.transition;Xo.transition=1;try{r(e)}finally{Xo.transition=t}}),[e]),n},useTransition:function(){var e=ua(ca)[0];return[ba().current,e]},useMutableSource:ma,useOpaqueIdentifier:function(){return ua(ca)[0]},unstable_isNewReconciler:!1},Na={readContext:oo,useCallback:Fa,useContext:oo,useEffect:Sa,useImperativeHandle:Ca,useLayoutEffect:wa,useMemo:Da,useReducer:da,useRef:ba,useState:function(){return da(ca)},useDebugValue:xa,useDeferredValue:function(e){var t=da(ca),n=t[0],r=t[1];return Sa((function(){var t=Xo.transition;Xo.transition=1;try{r(e)}finally{Xo.transition=t}}),[e]),n},useTransition:function(){var e=da(ca)[0];return[ba().current,e]},useMutableSource:ma,useOpaqueIdentifier:function(){return da(ca)[0]},unstable_isNewReconciler:!1},Ma=E.ReactCurrentOwner,Pa=!1;function La(e,t,n,r){t.child=null===e?Fo(t,null,n,r):xo(t,e.child,n,r)}function Ba(e,t,n,r,i){n=n.render;var o=t.ref;return io(t,i),r=aa(e,t,n,r,o,i),null===e||Pa?(t.flags|=1,La(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,os(e,t,i))}function Ua(e,t,n,r,i,o){if(null===e){var a=n.type;return"function"!=typeof a||Vl(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Kl(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,ja(e,t,a,r,i,o))}return a=e.child,0==(i&o)&&(i=a.memoizedProps,(n=null!==(n=n.compare)?n:dr)(i,r)&&e.ref===t.ref)?os(e,t,o):(t.flags|=1,(e=$l(a,r)).ref=t.ref,e.return=t,t.child=e)}function ja(e,t,n,r,i,o){if(null!==e&&dr(e.memoizedProps,r)&&e.ref===t.ref){if(Pa=!1,0==(o&i))return t.lanes=e.lanes,os(e,t,o);0!=(16384&e.flags)&&(Pa=!0)}return Ha(e,t,n,r,o)}function Ga(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0==(4&t.mode))t.memoizedState={baseLanes:0},Sl(t,n);else{if(0==(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},Sl(t,e),null;t.memoizedState={baseLanes:0},Sl(t,null!==o?o.baseLanes:n)}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Sl(t,r);return La(e,t,i,n),t.child}function za(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function Ha(e,t,n,r,i){var o=fi(n)?mi:hi.current;return o=gi(t,o),io(t,i),n=aa(e,t,n,r,o,i),null===e||Pa?(t.flags|=1,La(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,os(e,t,i))}function qa(e,t,n,r,i){if(fi(n)){var o=!0;yi(t)}else o=!1;if(io(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),vo(t,n,r),Eo(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;"object"==typeof c&&null!==c?c=oo(c):c=gi(t,c=fi(n)?mi:hi.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==c)&&yo(t,a,r,c),ao=!1;var h=t.memoizedState;a.state=h,po(t,r,a,i),l=t.memoizedState,s!==r||h!==l||pi.current||ao?("function"==typeof u&&(fo(t,n,u,r),l=t.memoizedState),(s=ao||bo(t,n,s,r,h,l,c))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4)):("function"==typeof a.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4),r=!1)}else{a=t.stateNode,lo(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:Qi(t.type,s),a.props=c,d=t.pendingProps,h=a.context,"object"==typeof(l=n.contextType)&&null!==l?l=oo(l):l=gi(t,l=fi(n)?mi:hi.current);var p=n.getDerivedStateFromProps;(u="function"==typeof p||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||h!==l)&&yo(t,a,r,l),ao=!1,h=t.memoizedState,a.state=h,po(t,r,a,i);var m=t.memoizedState;s!==d||h!==m||pi.current||ao?("function"==typeof p&&(fo(t,n,p,r),m=t.memoizedState),(c=ao||bo(t,n,c,r,h,m,l))?(u||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,m,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,m,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=m),a.props=r,a.state=m,a.context=l,r=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=256),r=!1)}return Va(e,t,n,r,o,i)}function Va(e,t,n,r,i,o){za(e,t);var a=0!=(64&t.flags);if(!r&&!a)return i&&Ei(t,n,!1),os(e,t,o);r=t.stateNode,Ma.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=xo(t,e.child,null,o),t.child=xo(t,null,s,o)):La(e,t,s,o),t.memoizedState=r.state,i&&Ei(t,n,!0),t.child}function $a(e){var t=e.stateNode;t.pendingContext?bi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&bi(0,t.context,!1),Ro(e,t.containerInfo)}var Ka,Wa,Ya,Qa,Xa={dehydrated:null,retryLane:0};function Za(e,t,n){var r,i=t.pendingProps,o=Lo.current,a=!1;return(r=0!=(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!=(2&o)),r?(a=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(o|=1),ui(Lo,1&o),null===e?(void 0!==i.fallback&&qo(t),e=i.children,o=i.fallback,a?(e=Ja(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Xa,e):"number"==typeof i.unstable_expectedLoadTime?(e=Ja(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Xa,t.lanes=33554432,e):((n=Yl({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,a?(i=ts(e,t,i.children,i.fallback,n),a=t.child,o=e.child.memoizedState,a.memoizedState=null===o?{baseLanes:n}:{baseLanes:o.baseLanes|n},a.childLanes=e.childLanes&~n,t.memoizedState=Xa,i):(n=es(e,t,i.children,n),t.memoizedState=null,n))}function Ja(e,t,n,r){var i=e.mode,o=e.child;return t={mode:"hidden",children:t},0==(2&i)&&null!==o?(o.childLanes=0,o.pendingProps=t):o=Yl(t,i,0,null),n=Wl(n,i,r,null),o.return=e,n.return=e,o.sibling=n,e.child=o,n}function es(e,t,n,r){var i=e.child;return e=i.sibling,n=$l(i,{mode:"visible",children:n}),0==(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function ts(e,t,n,r,i){var o=t.mode,a=e.child;e=a.sibling;var s={mode:"hidden",children:n};return 0==(2&o)&&t.child!==a?((n=t.child).childLanes=0,n.pendingProps=s,null!==(a=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=a,a.nextEffect=null):t.firstEffect=t.lastEffect=null):n=$l(a,s),null!==e?r=$l(e,r):(r=Wl(r,o,i,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function ns(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),ro(e.return,t)}function rs(e,t,n,r,i,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,lastEffect:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i,a.lastEffect=o)}function is(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(La(e,t,r.children,n),0!=(2&(r=Lo.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!=(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&ns(e,n);else if(19===e.tag)ns(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ui(Lo,r),0==(2&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===Bo(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),rs(t,!1,i,n,o,t.lastEffect);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===Bo(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}rs(t,!0,n,null,o,t.lastEffect);break;case"together":rs(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function os(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Gs|=t.lanes,0!=(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=$l(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=$l(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function as(e,t){if(!Go)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ss(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return fi(t.type)&&_i(),null;case 3:return No(),ci(pi),ci(hi),Yo(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||($o(t)?t.flags|=4:r.hydrate||(t.flags|=256)),Wa(t),null;case 5:Po(t);var o=Ao(Io.current);if(n=t.type,null!==e&&null!=t.stateNode)Ya(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=Ao(ko.current),$o(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Xr]=t,r[Zr]=s,n){case"dialog":kr("cancel",r),kr("close",r);break;case"iframe":case"object":case"embed":kr("load",r);break;case"video":case"audio":for(e=0;e<Cr.length;e++)kr(Cr[e],r);break;case"source":kr("error",r);break;case"img":case"image":case"link":kr("error",r),kr("load",r);break;case"details":kr("toggle",r);break;case"input":ee(r,s),kr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},kr("invalid",r);break;case"textarea":le(r,s),kr("invalid",r)}for(var c in we(n,s),e=null,s)s.hasOwnProperty(c)&&(o=s[c],"children"===c?"string"==typeof o?r.textContent!==o&&(e=["children",o]):"number"==typeof o&&r.textContent!==""+o&&(e=["children",""+o]):l.hasOwnProperty(c)&&null!=o&&"onScroll"===c&&kr("scroll",r));switch(n){case"input":Q(r),re(r,s,!0);break;case"textarea":Q(r),ue(r);break;case"select":case"option":break;default:"function"==typeof s.onClick&&(r.onclick=Ur)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(c=9===o.nodeType?o:o.ownerDocument,e===de.html&&(e=he(n)),e===de.html?"script"===n?((e=c.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=c.createElement(n,{is:r.is}):(e=c.createElement(n),"select"===n&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,n),e[Xr]=t,e[Zr]=r,Ka(e,t,!1,!1),t.stateNode=e,c=Te(n,r),n){case"dialog":kr("cancel",e),kr("close",e),o=r;break;case"iframe":case"object":case"embed":kr("load",e),o=r;break;case"video":case"audio":for(o=0;o<Cr.length;o++)kr(Cr[o],e);o=r;break;case"source":kr("error",e),o=r;break;case"img":case"image":case"link":kr("error",e),kr("load",e),o=r;break;case"details":kr("toggle",e),o=r;break;case"input":ee(e,r),o=J(e,r),kr("invalid",e);break;case"option":o=oe(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=i({},r,{value:void 0}),kr("invalid",e);break;case"textarea":le(e,r),o=se(e,r),kr("invalid",e);break;default:o=r}we(n,o);var u=o;for(s in u)if(u.hasOwnProperty(s)){var d=u[s];"style"===s?Ee(e,d):"dangerouslySetInnerHTML"===s?null!=(d=d?d.__html:void 0)&&fe(e,d):"children"===s?"string"==typeof d?("textarea"!==n||""!==d)&&_e(e,d):"number"==typeof d&&_e(e,""+d):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(l.hasOwnProperty(s)?null!=d&&"onScroll"===s&&kr("scroll",e):null!=d&&y(e,s,d,c))}switch(n){case"input":Q(e),re(e,r,!1);break;case"textarea":Q(e),ue(e);break;case"option":null!=r.value&&e.setAttribute("value",""+W(r.value));break;case"select":e.multiple=!!r.multiple,null!=(s=r.value)?ae(e,!!r.multiple,s,!1):null!=r.defaultValue&&ae(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof o.onClick&&(e.onclick=Ur)}zr(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)Qa(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));n=Ao(Io.current),Ao(ko.current),$o(t)?(r=t.stateNode,n=t.memoizedProps,r[Xr]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Xr]=t,t.stateNode=r)}return null;case 13:return ci(Lo),r=t.memoizedState,0!=(64&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&$o(t):n=null!==e.memoizedState,r&&!n&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&Lo.current)?0===Bs&&(Bs=3):(0!==Bs&&3!==Bs||(Bs=4),null===Rs||0==(134217727&Gs)&&0==(134217727&zs)||bl(Rs,Ms))),(r||n)&&(t.flags|=4),null);case 4:return No(),Wa(t),null===e&&Ir(t.stateNode.containerInfo),null;case 10:return no(t),null;case 19:if(ci(Lo),null===(r=t.memoizedState))return null;if(s=0!=(64&t.flags),null===(c=r.rendering))if(s)as(r,!1);else{if(0!==Bs||null!==e&&0!=(64&e.flags))for(e=t.child;null!==e;){if(null!==(c=Bo(e))){for(t.flags|=64,as(r,!1),null!==(s=c.updateQueue)&&(t.updateQueue=s,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(s=n).flags&=2,s.nextEffect=null,s.firstEffect=null,s.lastEffect=null,null===(c=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ui(Lo,1&Lo.current|2),t.child}e=e.sibling}null!==r.tail&&zi()>$s&&(t.flags|=64,s=!0,as(r,!1),t.lanes=33554432)}else{if(!s)if(null!==(e=Bo(c))){if(t.flags|=64,s=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),as(r,!0),null===r.tail&&"hidden"===r.tailMode&&!c.alternate&&!Go)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*zi()-r.renderingStartTime>$s&&1073741824!==n&&(t.flags|=64,s=!0,as(r,!1),t.lanes=33554432);r.isBackwards?(c.sibling=t.child,t.child=c):(null!==(n=r.last)?n.sibling=c:t.child=c,r.last=c)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=zi(),n.sibling=null,t=Lo.current,ui(Lo,s?1&t|2:1&t),n):null;case 23:case 24:return wl(),null!==e&&null!==e.memoizedState!=(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(a(156,t.tag))}function ls(e){switch(e.tag){case 1:fi(e.type)&&_i();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(No(),ci(pi),ci(hi),Yo(),0!=(64&(t=e.flags)))throw Error(a(285));return e.flags=-4097&t|64,e;case 5:return Po(e),null;case 13:return ci(Lo),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return ci(Lo),null;case 4:return No(),null;case 10:return no(e),null;case 23:case 24:return wl(),null;default:return null}}function cs(e,t){try{var n="",r=t;do{n+=$(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i}}function us(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}Ka=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Wa=function(){},Ya=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Ao(ko.current);var a,s=null;switch(n){case"input":o=J(e,o),r=J(e,r),s=[];break;case"option":o=oe(e,o),r=oe(e,r),s=[];break;case"select":o=i({},o,{value:void 0}),r=i({},r,{value:void 0}),s=[];break;case"textarea":o=se(e,o),r=se(e,r),s=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=Ur)}for(d in we(n,r),n=null,o)if(!r.hasOwnProperty(d)&&o.hasOwnProperty(d)&&null!=o[d])if("style"===d){var c=o[d];for(a in c)c.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==d&&"children"!==d&&"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&"autoFocus"!==d&&(l.hasOwnProperty(d)?s||(s=[]):(s=s||[]).push(d,null));for(d in r){var u=r[d];if(c=null!=o?o[d]:void 0,r.hasOwnProperty(d)&&u!==c&&(null!=u||null!=c))if("style"===d)if(c){for(a in c)!c.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&c[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(s||(s=[]),s.push(d,n)),n=u;else"dangerouslySetInnerHTML"===d?(u=u?u.__html:void 0,c=c?c.__html:void 0,null!=u&&c!==u&&(s=s||[]).push(d,u)):"children"===d?"string"!=typeof u&&"number"!=typeof u||(s=s||[]).push(d,""+u):"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&(l.hasOwnProperty(d)?(null!=u&&"onScroll"===d&&kr("scroll",e),s||c===u||(s=[])):"object"==typeof u&&null!==u&&u.$$typeof===M?u.toString():(s=s||[]).push(d,u))}n&&(s=s||[]).push("style",n);var d=s;(t.updateQueue=d)&&(t.flags|=4)}},Qa=function(e,t,n,r){n!==r&&(t.flags|=4)};var ds="function"==typeof WeakMap?WeakMap:Map;function hs(e,t,n){(n=co(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Qs||(Qs=!0,Xs=r),us(0,t)},n}function ps(e,t,n){(n=co(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return us(0,t),r(i)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===Zs?Zs=new Set([this]):Zs.add(this),us(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var ms="function"==typeof WeakSet?WeakSet:Set;function gs(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){jl(e,t)}else t.current=null}function fs(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Qi(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&$r(t.stateNode.containerInfo))}throw Error(a(163))}function _s(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3==(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var i=e;r=i.next,0!=(4&(i=i.tag))&&0!=(1&i)&&(Ll(n,e),Pl(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Qi(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&mo(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}mo(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&zr(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&Et(n)))))}throw Error(a(163))}function bs(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"==typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var i=n.memoizedProps.style;i=null!=i&&i.hasOwnProperty("display")?i.display:null,r.style.display=ye("display",i)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function vs(e,t){if(wi&&"function"==typeof wi.onCommitFiberUnmount)try{wi.onCommitFiberUnmount(Si,t)}catch(e){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,i=r.destroy;if(r=r.tag,void 0!==i)if(0!=(4&r))Ll(t,n);else{r=t;try{i()}catch(e){jl(r,e)}}n=n.next}while(n!==e)}break;case 1:if(gs(t),"function"==typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(e){jl(t,e)}break;case 5:gs(t);break;case 4:Cs(e,t)}}function ys(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function Es(e){return 5===e.tag||3===e.tag||4===e.tag}function Ss(e){e:{for(var t=e.return;null!==t;){if(Es(t))break e;t=t.return}throw Error(a(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.flags&&(_e(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||Es(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?ws(e,n,t):Ts(e,n,t)}function ws(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Ur));else if(4!==r&&null!==(e=e.child))for(ws(e,t,n),e=e.sibling;null!==e;)ws(e,t,n),e=e.sibling}function Ts(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(Ts(e,t,n),e=e.sibling;null!==e;)Ts(e,t,n),e=e.sibling}function Cs(e,t){for(var n,r,i=t,o=!1;;){if(!o){o=i.return;e:for(;;){if(null===o)throw Error(a(160));switch(n=o.stateNode,o.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}o=o.return}o=!0}if(5===i.tag||6===i.tag){e:for(var s=e,l=i,c=l;;)if(vs(s,c),null!==c.child&&4!==c.tag)c.child.return=c,c=c.child;else{if(c===l)break e;for(;null===c.sibling;){if(null===c.return||c.return===l)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}r?(s=n,l=i.stateNode,8===s.nodeType?s.parentNode.removeChild(l):s.removeChild(l)):n.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){n=i.stateNode.containerInfo,r=!0,i.child.return=i,i=i.child;continue}}else if(vs(e,i),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(o=!1)}i.sibling.return=i.return,i=i.sibling}}function xs(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3==(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:case 12:case 17:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var i=null!==e?e.memoizedProps:r;e=t.type;var o=t.updateQueue;if(t.updateQueue=null,null!==o){for(n[Zr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),Te(e,i),t=Te(e,r),i=0;i<o.length;i+=2){var s=o[i],l=o[i+1];"style"===s?Ee(n,l):"dangerouslySetInnerHTML"===s?fe(n,l):"children"===s?_e(n,l):y(n,s,l,t)}switch(e){case"input":ne(n,r);break;case"textarea":ce(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(o=r.value)?ae(n,!!r.multiple,o,!1):e!==!!r.multiple&&(null!=r.defaultValue?ae(n,!!r.multiple,r.defaultValue,!0):ae(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,Et(n.containerInfo)));case 13:return null!==t.memoizedState&&(Vs=zi(),bs(t.child,!0)),void Fs(t);case 19:return void Fs(t);case 23:case 24:return void bs(t,null!==t.memoizedState)}throw Error(a(163))}function Fs(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new ms),t.forEach((function(t){var r=zl.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Ds(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var ks=Math.ceil,Os=E.ReactCurrentDispatcher,Is=E.ReactCurrentOwner,As=0,Rs=null,Ns=null,Ms=0,Ps=0,Ls=li(0),Bs=0,Us=null,js=0,Gs=0,zs=0,Hs=0,qs=null,Vs=0,$s=1/0;function Ks(){$s=zi()+500}var Ws,Ys=null,Qs=!1,Xs=null,Zs=null,Js=!1,el=null,tl=90,nl=[],rl=[],il=null,ol=0,al=null,sl=-1,ll=0,cl=0,ul=null,dl=!1;function hl(){return 0!=(48&As)?zi():-1!==sl?sl:sl=zi()}function pl(e){if(0==(2&(e=e.mode)))return 1;if(0==(4&e))return 99===Hi()?1:2;if(0===ll&&(ll=js),0!==Yi.transition){0!==cl&&(cl=null!==qs?qs.pendingLanes:0),e=ll;var t=4186112&~cl;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=Hi(),0!=(4&As)&&98===e?e=Ut(12,ll):e=Ut(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),ll),e}function ml(e,t,n){if(50<ol)throw ol=0,al=null,Error(a(185));if(null===(e=gl(e,t)))return null;zt(e,t,n),e===Rs&&(zs|=t,4===Bs&&bl(e,Ms));var r=Hi();1===t?0!=(8&As)&&0==(48&As)?vl(e):(fl(e,n),0===As&&(Ks(),Ki())):(0==(4&As)||98!==r&&99!==r||(null===il?il=new Set([e]):il.add(e)),fl(e,n)),qs=e}function gl(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function fl(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,i=e.pingedLanes,o=e.expirationTimes,s=e.pendingLanes;0<s;){var l=31-Ht(s),c=1<<l,u=o[l];if(-1===u){if(0==(c&r)||0!=(c&i)){u=t,Pt(c);var d=Mt;o[l]=10<=d?u+250:6<=d?u+5e3:-1}}else u<=t&&(e.expiredLanes|=c);s&=~c}if(r=Lt(e,e===Rs?Ms:0),t=Mt,0===r)null!==n&&(n!==Pi&&xi(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Pi&&xi(n)}15===t?(n=vl.bind(null,e),null===Bi?(Bi=[n],Ui=Ci(Ii,Wi)):Bi.push(n),n=Pi):14===t?n=$i(99,vl.bind(null,e)):(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(a(358,e))}}(t),n=$i(n,_l.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function _l(e){if(sl=-1,cl=ll=0,0!=(48&As))throw Error(a(327));var t=e.callbackNode;if(Ml()&&e.callbackNode!==t)return null;var n=Lt(e,e===Rs?Ms:0);if(0===n)return null;var r=n,i=As;As|=16;var o=xl();for(Rs===e&&Ms===r||(Ks(),Tl(e,r));;)try{kl();break}catch(t){Cl(e,t)}if(to(),Os.current=o,As=i,null!==Ns?r=0:(Rs=null,Ms=0,r=Bs),0!=(js&zs))Tl(e,0);else if(0!==r){if(2===r&&(As|=64,e.hydrate&&(e.hydrate=!1,$r(e.containerInfo)),0!==(n=Bt(e))&&(r=Fl(e,n))),1===r)throw t=Us,Tl(e,0),bl(e,n),fl(e,zi()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(a(345));case 2:case 5:Al(e);break;case 3:if(bl(e,n),(62914560&n)===n&&10<(r=Vs+500-zi())){if(0!==Lt(e,0))break;if(((i=e.suspendedLanes)&n)!==n){hl(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=qr(Al.bind(null,e),r);break}Al(e);break;case 4:if(bl(e,n),(4186112&n)===n)break;for(r=e.eventTimes,i=-1;0<n;){var s=31-Ht(n);o=1<<s,(s=r[s])>i&&(i=s),n&=~o}if(n=i,10<(n=(120>(n=zi()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*ks(n/1960))-n)){e.timeoutHandle=qr(Al.bind(null,e),n);break}Al(e);break;default:throw Error(a(329))}}return fl(e,zi()),e.callbackNode===t?_l.bind(null,e):null}function bl(e,t){for(t&=~Hs,t&=~zs,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ht(t),r=1<<n;e[n]=-1,t&=~r}}function vl(e){if(0!=(48&As))throw Error(a(327));if(Ml(),e===Rs&&0!=(e.expiredLanes&Ms)){var t=Ms,n=Fl(e,t);0!=(js&zs)&&(n=Fl(e,t=Lt(e,t)))}else n=Fl(e,t=Lt(e,0));if(0!==e.tag&&2===n&&(As|=64,e.hydrate&&(e.hydrate=!1,$r(e.containerInfo)),0!==(t=Bt(e))&&(n=Fl(e,t))),1===n)throw n=Us,Tl(e,0),bl(e,t),fl(e,zi()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Al(e),fl(e,zi()),null}function yl(e,t){var n=As;As|=1;try{return e(t)}finally{0===(As=n)&&(Ks(),Ki())}}function El(e,t){var n=As;As&=-2,As|=8;try{return e(t)}finally{0===(As=n)&&(Ks(),Ki())}}function Sl(e,t){ui(Ls,Ps),Ps|=t,js|=t}function wl(){Ps=Ls.current,ci(Ls)}function Tl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Vr(n)),null!==Ns)for(n=Ns.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&_i();break;case 3:No(),ci(pi),ci(hi),Yo();break;case 5:Po(r);break;case 4:No();break;case 13:case 19:ci(Lo);break;case 10:no(r);break;case 23:case 24:wl()}n=n.return}Rs=e,Ns=$l(e.current,null),Ms=Ps=js=t,Bs=0,Us=null,Hs=zs=Gs=0}function Cl(e,t){for(;;){var n=Ns;try{if(to(),Qo.current=Ia,na){for(var r=Jo.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}na=!1}if(Zo=0,ta=ea=Jo=null,ra=!1,Is.current=null,null===n||null===n.return){Bs=1,Us=t,Ns=null;break}e:{var o=e,a=n.return,s=n,l=t;if(t=Ms,s.flags|=2048,s.firstEffect=s.lastEffect=null,null!==l&&"object"==typeof l&&"function"==typeof l.then){var c=l;if(0==(2&s.mode)){var u=s.alternate;u?(s.updateQueue=u.updateQueue,s.memoizedState=u.memoizedState,s.lanes=u.lanes):(s.updateQueue=null,s.memoizedState=null)}var d=0!=(1&Lo.current),h=a;do{var p;if(p=13===h.tag){var m=h.memoizedState;if(null!==m)p=null!==m.dehydrated;else{var g=h.memoizedProps;p=void 0!==g.fallback&&(!0!==g.unstable_avoidThisFallback||!d)}}if(p){var f=h.updateQueue;if(null===f){var _=new Set;_.add(c),h.updateQueue=_}else f.add(c);if(0==(2&h.mode)){if(h.flags|=64,s.flags|=16384,s.flags&=-2981,1===s.tag)if(null===s.alternate)s.tag=17;else{var b=co(-1,1);b.tag=2,uo(s,b)}s.lanes|=1;break e}l=void 0,s=t;var v=o.pingCache;if(null===v?(v=o.pingCache=new ds,l=new Set,v.set(c,l)):void 0===(l=v.get(c))&&(l=new Set,v.set(c,l)),!l.has(s)){l.add(s);var y=Gl.bind(null,o,c,s);c.then(y,y)}h.flags|=4096,h.lanes=t;break e}h=h.return}while(null!==h);l=Error((K(s.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Bs&&(Bs=2),l=cs(l,s),h=a;do{switch(h.tag){case 3:o=l,h.flags|=4096,t&=-t,h.lanes|=t,ho(h,hs(0,o,t));break e;case 1:o=l;var E=h.type,S=h.stateNode;if(0==(64&h.flags)&&("function"==typeof E.getDerivedStateFromError||null!==S&&"function"==typeof S.componentDidCatch&&(null===Zs||!Zs.has(S)))){h.flags|=4096,t&=-t,h.lanes|=t,ho(h,ps(h,o,t));break e}}h=h.return}while(null!==h)}Il(n)}catch(e){t=e,Ns===n&&null!==n&&(Ns=n=n.return);continue}break}}function xl(){var e=Os.current;return Os.current=Ia,null===e?Ia:e}function Fl(e,t){var n=As;As|=16;var r=xl();for(Rs===e&&Ms===t||Tl(e,t);;)try{Dl();break}catch(t){Cl(e,t)}if(to(),As=n,Os.current=r,null!==Ns)throw Error(a(261));return Rs=null,Ms=0,Bs}function Dl(){for(;null!==Ns;)Ol(Ns)}function kl(){for(;null!==Ns&&!Fi();)Ol(Ns)}function Ol(e){var t=Ws(e.alternate,e,Ps);e.memoizedProps=e.pendingProps,null===t?Il(e):Ns=t,Is.current=null}function Il(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(2048&t.flags)){if(null!==(n=ss(n,t,Ps)))return void(Ns=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!=(1073741824&Ps)||0==(4&n.mode)){for(var r=0,i=n.child;null!==i;)r|=i.lanes|i.childLanes,i=i.sibling;n.childLanes=r}null!==e&&0==(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=ls(t)))return n.flags&=2047,void(Ns=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(Ns=t);Ns=t=e}while(null!==t);0===Bs&&(Bs=5)}function Al(e){var t=Hi();return Vi(99,Rl.bind(null,e,t)),null}function Rl(e,t){do{Ml()}while(null!==el);if(0!=(48&As))throw Error(a(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null;var r=n.lanes|n.childLanes,i=r,o=e.pendingLanes&~i;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=i,e.mutableReadLanes&=i,e.entangledLanes&=i,i=e.entanglements;for(var s=e.eventTimes,l=e.expirationTimes;0<o;){var c=31-Ht(o),u=1<<c;i[c]=0,s[c]=-1,l[c]=-1,o&=~u}if(null!==il&&0==(24&r)&&il.has(e)&&il.delete(e),e===Rs&&(Ns=Rs=null,Ms=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(i=As,As|=32,Is.current=null,jr=Wt,fr(s=gr())){if("selectionStart"in s)l={start:s.selectionStart,end:s.selectionEnd};else e:if(l=(l=s.ownerDocument)&&l.defaultView||window,(u=l.getSelection&&l.getSelection())&&0!==u.rangeCount){l=u.anchorNode,o=u.anchorOffset,c=u.focusNode,u=u.focusOffset;try{l.nodeType,c.nodeType}catch(e){l=null;break e}var d=0,h=-1,p=-1,m=0,g=0,f=s,_=null;t:for(;;){for(var b;f!==l||0!==o&&3!==f.nodeType||(h=d+o),f!==c||0!==u&&3!==f.nodeType||(p=d+u),3===f.nodeType&&(d+=f.nodeValue.length),null!==(b=f.firstChild);)_=f,f=b;for(;;){if(f===s)break t;if(_===l&&++m===o&&(h=d),_===c&&++g===u&&(p=d),null!==(b=f.nextSibling))break;_=(f=_).parentNode}f=b}l=-1===h||-1===p?null:{start:h,end:p}}else l=null;l=l||{start:0,end:0}}else l=null;Gr={focusedElem:s,selectionRange:l},Wt=!1,ul=null,dl=!1,Ys=r;do{try{Nl()}catch(e){if(null===Ys)throw Error(a(330));jl(Ys,e),Ys=Ys.nextEffect}}while(null!==Ys);ul=null,Ys=r;do{try{for(s=e;null!==Ys;){var v=Ys.flags;if(16&v&&_e(Ys.stateNode,""),128&v){var y=Ys.alternate;if(null!==y){var E=y.ref;null!==E&&("function"==typeof E?E(null):E.current=null)}}switch(1038&v){case 2:Ss(Ys),Ys.flags&=-3;break;case 6:Ss(Ys),Ys.flags&=-3,xs(Ys.alternate,Ys);break;case 1024:Ys.flags&=-1025;break;case 1028:Ys.flags&=-1025,xs(Ys.alternate,Ys);break;case 4:xs(Ys.alternate,Ys);break;case 8:Cs(s,l=Ys);var S=l.alternate;ys(l),null!==S&&ys(S)}Ys=Ys.nextEffect}}catch(e){if(null===Ys)throw Error(a(330));jl(Ys,e),Ys=Ys.nextEffect}}while(null!==Ys);if(E=Gr,y=gr(),v=E.focusedElem,s=E.selectionRange,y!==v&&v&&v.ownerDocument&&mr(v.ownerDocument.documentElement,v)){null!==s&&fr(v)&&(y=s.start,void 0===(E=s.end)&&(E=y),"selectionStart"in v?(v.selectionStart=y,v.selectionEnd=Math.min(E,v.value.length)):(E=(y=v.ownerDocument||document)&&y.defaultView||window).getSelection&&(E=E.getSelection(),l=v.textContent.length,S=Math.min(s.start,l),s=void 0===s.end?S:Math.min(s.end,l),!E.extend&&S>s&&(l=s,s=S,S=l),l=pr(v,S),o=pr(v,s),l&&o&&(1!==E.rangeCount||E.anchorNode!==l.node||E.anchorOffset!==l.offset||E.focusNode!==o.node||E.focusOffset!==o.offset)&&((y=y.createRange()).setStart(l.node,l.offset),E.removeAllRanges(),S>s?(E.addRange(y),E.extend(o.node,o.offset)):(y.setEnd(o.node,o.offset),E.addRange(y))))),y=[];for(E=v;E=E.parentNode;)1===E.nodeType&&y.push({element:E,left:E.scrollLeft,top:E.scrollTop});for("function"==typeof v.focus&&v.focus(),v=0;v<y.length;v++)(E=y[v]).element.scrollLeft=E.left,E.element.scrollTop=E.top}Wt=!!jr,Gr=jr=null,e.current=n,Ys=r;do{try{for(v=e;null!==Ys;){var w=Ys.flags;if(36&w&&_s(v,Ys.alternate,Ys),128&w){y=void 0;var T=Ys.ref;if(null!==T){var C=Ys.stateNode;Ys.tag,y=C,"function"==typeof T?T(y):T.current=y}}Ys=Ys.nextEffect}}catch(e){if(null===Ys)throw Error(a(330));jl(Ys,e),Ys=Ys.nextEffect}}while(null!==Ys);Ys=null,Li(),As=i}else e.current=n;if(Js)Js=!1,el=e,tl=t;else for(Ys=r;null!==Ys;)t=Ys.nextEffect,Ys.nextEffect=null,8&Ys.flags&&((w=Ys).sibling=null,w.stateNode=null),Ys=t;if(0===(r=e.pendingLanes)&&(Zs=null),1===r?e===al?ol++:(ol=0,al=e):ol=0,n=n.stateNode,wi&&"function"==typeof wi.onCommitFiberRoot)try{wi.onCommitFiberRoot(Si,n,void 0,64==(64&n.current.flags))}catch(e){}if(fl(e,zi()),Qs)throw Qs=!1,e=Xs,Xs=null,e;return 0!=(8&As)||Ki(),null}function Nl(){for(;null!==Ys;){var e=Ys.alternate;dl||null===ul||(0!=(8&Ys.flags)?Je(Ys,ul)&&(dl=!0):13===Ys.tag&&Ds(e,Ys)&&Je(Ys,ul)&&(dl=!0));var t=Ys.flags;0!=(256&t)&&fs(e,Ys),0==(512&t)||Js||(Js=!0,$i(97,(function(){return Ml(),null}))),Ys=Ys.nextEffect}}function Ml(){if(90!==tl){var e=97<tl?97:tl;return tl=90,Vi(e,Bl)}return!1}function Pl(e,t){nl.push(t,e),Js||(Js=!0,$i(97,(function(){return Ml(),null})))}function Ll(e,t){rl.push(t,e),Js||(Js=!0,$i(97,(function(){return Ml(),null})))}function Bl(){if(null===el)return!1;var e=el;if(el=null,0!=(48&As))throw Error(a(331));var t=As;As|=32;var n=rl;rl=[];for(var r=0;r<n.length;r+=2){var i=n[r],o=n[r+1],s=i.destroy;if(i.destroy=void 0,"function"==typeof s)try{s()}catch(e){if(null===o)throw Error(a(330));jl(o,e)}}for(n=nl,nl=[],r=0;r<n.length;r+=2){i=n[r],o=n[r+1];try{var l=i.create;i.destroy=l()}catch(e){if(null===o)throw Error(a(330));jl(o,e)}}for(l=e.current.firstEffect;null!==l;)e=l.nextEffect,l.nextEffect=null,8&l.flags&&(l.sibling=null,l.stateNode=null),l=e;return As=t,Ki(),!0}function Ul(e,t,n){uo(e,t=hs(0,t=cs(n,t),1)),t=hl(),null!==(e=gl(e,1))&&(zt(e,1,t),fl(e,t))}function jl(e,t){if(3===e.tag)Ul(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Ul(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Zs||!Zs.has(r))){var i=ps(n,e=cs(t,e),1);if(uo(n,i),i=hl(),null!==(n=gl(n,1)))zt(n,1,i),fl(n,i);else if("function"==typeof r.componentDidCatch&&(null===Zs||!Zs.has(r)))try{r.componentDidCatch(t,e)}catch(e){}break}}n=n.return}}function Gl(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=hl(),e.pingedLanes|=e.suspendedLanes&n,Rs===e&&(Ms&n)===n&&(4===Bs||3===Bs&&(62914560&Ms)===Ms&&500>zi()-Vs?Tl(e,0):Hs|=n),fl(e,t)}function zl(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0==(2&(t=e.mode))?t=1:0==(4&t)?t=99===Hi()?1:2:(0===ll&&(ll=js),0===(t=jt(62914560&~ll))&&(t=4194304))),n=hl(),null!==(e=gl(e,t))&&(zt(e,t,n),fl(e,n))}function Hl(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function ql(e,t,n,r){return new Hl(e,t,n,r)}function Vl(e){return!(!(e=e.prototype)||!e.isReactComponent)}function $l(e,t){var n=e.alternate;return null===n?((n=ql(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Kl(e,t,n,r,i,o){var s=2;if(r=e,"function"==typeof e)Vl(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case T:return Wl(n.children,i,o,t);case P:s=8,i|=16;break;case C:s=8,i|=1;break;case x:return(e=ql(12,n,t,8|i)).elementType=x,e.type=x,e.lanes=o,e;case O:return(e=ql(13,n,t,i)).type=O,e.elementType=O,e.lanes=o,e;case I:return(e=ql(19,n,t,i)).elementType=I,e.lanes=o,e;case L:return Yl(n,i,o,t);case B:return(e=ql(24,n,t,i)).elementType=B,e.lanes=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case F:s=10;break e;case D:s=9;break e;case k:s=11;break e;case A:s=14;break e;case R:s=16,r=null;break e;case N:s=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=ql(s,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Wl(e,t,n,r){return(e=ql(7,e,r,t)).lanes=n,e}function Yl(e,t,n,r){return(e=ql(23,e,r,t)).elementType=L,e.lanes=n,e}function Ql(e,t,n){return(e=ql(6,e,null,t)).lanes=n,e}function Xl(e,t,n){return(t=ql(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Zl(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Gt(0),this.expirationTimes=Gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gt(0),this.mutableSourceEagerHydrationData=null}function Jl(e,t,n,r){var i=t.current,o=hl(),s=pl(i);e:if(n){t:{if(Ye(n=n._reactInternals)!==n||1!==n.tag)throw Error(a(170));var l=n;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(fi(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(null!==l);throw Error(a(171))}if(1===n.tag){var c=n.type;if(fi(c)){n=vi(n,c,l);break e}}n=l}else n=di;return null===t.context?t.context=n:t.pendingContext=n,(t=co(o,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),uo(i,t),ml(i,s,o),s}function ec(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function tc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function nc(e,t){tc(e,t),(e=e.alternate)&&tc(e,t)}function rc(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new Zl(e,t,null!=n&&!0===n.hydrate),t=ql(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,so(t),e[Jr]=n.current,Ir(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var i=(t=r[e])._getVersion;i=i(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,i]:n.mutableSourceEagerHydrationData.push(t,i)}this._internalRoot=n}function ic(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function oc(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o._internalRoot;if("function"==typeof i){var s=i;i=function(){var e=ec(a);s.call(e)}}Jl(t,a,e,i)}else{if(o=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new rc(e,0,t?{hydrate:!0}:void 0)}(n,r),a=o._internalRoot,"function"==typeof i){var l=i;i=function(){var e=ec(a);l.call(e)}}El((function(){Jl(t,a,e,i)}))}return ec(a)}function ac(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ic(t))throw Error(a(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:w,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)}Ws=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||pi.current)Pa=!0;else{if(0==(n&r)){switch(Pa=!1,t.tag){case 3:$a(t),Ko();break;case 5:Mo(t);break;case 1:fi(t.type)&&yi(t);break;case 4:Ro(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var i=t.type._context;ui(Xi,i._currentValue),i._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!=(n&t.child.childLanes)?Za(e,t,n):(ui(Lo,1&Lo.current),null!==(t=os(e,t,n))?t.sibling:null);ui(Lo,1&Lo.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(64&e.flags)){if(r)return is(e,t,n);t.flags|=64}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),ui(Lo,Lo.current),r)break;return null;case 23:case 24:return t.lanes=0,Ga(e,t,n)}return os(e,t,n)}Pa=0!=(16384&e.flags)}else Pa=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=gi(t,hi.current),io(t,n),i=aa(null,t,r,e,i,n),t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,fi(r)){var o=!0;yi(t)}else o=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,so(t);var s=r.getDerivedStateFromProps;"function"==typeof s&&fo(t,r,s,e),i.updater=_o,t.stateNode=i,i._reactInternals=t,Eo(t,r,e,n),t=Va(null,t,r,!0,o,n)}else t.tag=0,La(null,t,i,n),t=t.child;return t;case 16:i=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=(o=i._init)(i._payload),t.type=i,o=t.tag=function(e){if("function"==typeof e)return Vl(e)?1:0;if(null!=e){if((e=e.$$typeof)===k)return 11;if(e===A)return 14}return 2}(i),e=Qi(i,e),o){case 0:t=Ha(null,t,i,e,n);break e;case 1:t=qa(null,t,i,e,n);break e;case 11:t=Ba(null,t,i,e,n);break e;case 14:t=Ua(null,t,i,Qi(i.type,e),r,n);break e}throw Error(a(306,i,""))}return t;case 0:return r=t.type,i=t.pendingProps,Ha(e,t,r,i=t.elementType===r?i:Qi(r,i),n);case 1:return r=t.type,i=t.pendingProps,qa(e,t,r,i=t.elementType===r?i:Qi(r,i),n);case 3:if($a(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,lo(e,t),po(t,r,null,n),(r=t.memoizedState.element)===i)Ko(),t=os(e,t,n);else{if((o=(i=t.stateNode).hydrate)&&(jo=Kr(t.stateNode.containerInfo.firstChild),Uo=t,o=Go=!0),o){if(null!=(e=i.mutableSourceEagerHydrationData))for(i=0;i<e.length;i+=2)(o=e[i])._workInProgressVersionPrimary=e[i+1],Wo.push(o);for(n=Fo(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else La(e,t,r,n),Ko();t=t.child}return t;case 5:return Mo(t),null===e&&qo(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,s=i.children,Hr(r,i)?s=null:null!==o&&Hr(r,o)&&(t.flags|=16),za(e,t),La(e,t,s,n),t.child;case 6:return null===e&&qo(t),null;case 13:return Za(e,t,n);case 4:return Ro(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=xo(t,null,r,n):La(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Ba(e,t,r,i=t.elementType===r?i:Qi(r,i),n);case 7:return La(e,t,t.pendingProps,n),t.child;case 8:case 12:return La(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value;var l=t.type._context;if(ui(Xi,l._currentValue),l._currentValue=o,null!==s)if(l=s.value,0===(o=cr(l,o)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(l,o):1073741823))){if(s.children===i.children&&!pi.current){t=os(e,t,n);break e}}else for(null!==(l=t.child)&&(l.return=t);null!==l;){var c=l.dependencies;if(null!==c){s=l.child;for(var u=c.firstContext;null!==u;){if(u.context===r&&0!=(u.observedBits&o)){1===l.tag&&((u=co(-1,n&-n)).tag=2,uo(l,u)),l.lanes|=n,null!==(u=l.alternate)&&(u.lanes|=n),ro(l.return,n),c.lanes|=n;break}u=u.next}}else s=10===l.tag&&l.type===t.type?null:l.child;if(null!==s)s.return=l;else for(s=l;null!==s;){if(s===t){s=null;break}if(null!==(l=s.sibling)){l.return=s.return,s=l;break}s=s.return}l=s}La(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=(o=t.pendingProps).children,io(t,n),r=r(i=oo(i,o.unstable_observedBits)),t.flags|=1,La(e,t,r,n),t.child;case 14:return o=Qi(i=t.type,t.pendingProps),Ua(e,t,i,o=Qi(i.type,o),r,n);case 15:return ja(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Qi(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,fi(r)?(e=!0,yi(t)):e=!1,io(t,n),vo(t,r,i),Eo(t,r,i,n),Va(null,t,r,!0,e,n);case 19:return is(e,t,n);case 23:case 24:return Ga(e,t,n)}throw Error(a(156,t.tag))},rc.prototype.render=function(e){Jl(e,this._internalRoot,null,null)},rc.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Jl(null,e,null,(function(){t[Jr]=null}))},et=function(e){13===e.tag&&(ml(e,4,hl()),nc(e,4))},tt=function(e){13===e.tag&&(ml(e,67108864,hl()),nc(e,67108864))},nt=function(e){if(13===e.tag){var t=hl(),n=pl(e);ml(e,n,t),nc(e,n)}},rt=function(e,t){return t()},xe=function(e,t,n){switch(t){case"input":if(ne(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=ii(r);if(!i)throw Error(a(90));X(r),ne(r,i)}}}break;case"textarea":ce(e,n);break;case"select":null!=(t=n.value)&&ae(e,!!n.multiple,t,!1)}},Ae=yl,Re=function(e,t,n,r,i){var o=As;As|=4;try{return Vi(98,e.bind(null,t,n,r,i))}finally{0===(As=o)&&(Ks(),Ki())}},Ne=function(){0==(49&As)&&(function(){if(null!==il){var e=il;il=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,fl(e,zi())}))}Ki()}(),Ml())},Me=function(e,t){var n=As;As|=2;try{return e(t)}finally{0===(As=n)&&(Ks(),Ki())}};var sc={Events:[ni,ri,ii,Oe,Ie,Ml,{current:!1}]},lc={findFiberByHostInstance:ti,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},cc={bundleType:lc.bundleType,version:lc.version,rendererPackageName:lc.rendererPackageName,rendererConfig:lc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:E.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ze(e))?null:e.stateNode},findFiberByHostInstance:lc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var uc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!uc.isDisabled&&uc.supportsFiber)try{Si=uc.inject(cc),wi=uc}catch(ge){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=sc,t.createPortal=ac,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return e=null===(e=Ze(t))?null:e.stateNode},t.flushSync=function(e,t){var n=As;if(0!=(48&n))return e(t);As|=1;try{if(e)return Vi(99,e.bind(null,t))}finally{As=n,Ki()}},t.hydrate=function(e,t,n){if(!ic(t))throw Error(a(200));return oc(null,e,t,!0,n)},t.render=function(e,t,n){if(!ic(t))throw Error(a(200));return oc(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!ic(e))throw Error(a(40));return!!e._reactRootContainer&&(El((function(){oc(null,null,e,!1,(function(){e._reactRootContainer=null,e[Jr]=null}))})),!0)},t.unstable_batchedUpdates=yl,t.unstable_createPortal=function(e,t){return ac(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ic(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return oc(e,t,n,!1,r)},t.version="17.0.2"},function(e,t,n){"use strict";var r=n(502),i=60103,o=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,s=60110,l=60112;t.Suspense=60113;var c=60115,u=60116;if("function"==typeof Symbol&&Symbol.for){var d=Symbol.for;i=d("react.element"),o=d("react.portal"),t.Fragment=d("react.fragment"),t.StrictMode=d("react.strict_mode"),t.Profiler=d("react.profiler"),a=d("react.provider"),s=d("react.context"),l=d("react.forward_ref"),t.Suspense=d("react.suspense"),c=d("react.memo"),u=d("react.lazy")}var h="function"==typeof Symbol&&Symbol.iterator;function p(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g={};function f(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}function _(){}function b(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}f.prototype.isReactComponent={},f.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(p(85));this.updater.enqueueSetState(this,e,t,"setState")},f.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},_.prototype=f.prototype;var v=b.prototype=new _;v.constructor=b,r(v,f.prototype),v.isPureReactComponent=!0;var y={current:null},E=Object.prototype.hasOwnProperty,S={key:!0,ref:!0,__self:!0,__source:!0};function w(e,t,n){var r,o={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)E.call(t,r)&&!S.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===o[r]&&(o[r]=l[r]);return{$$typeof:i,type:e,key:a,ref:s,props:o,_owner:y.current}}function T(e){return"object"==typeof e&&null!==e&&e.$$typeof===i}var C=/\/+/g;function x(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function F(e,t,n,r,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l=!1;if(null===e)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case i:case o:l=!0}}if(l)return a=a(l=e),e=""===r?"."+x(l,0):r,Array.isArray(a)?(n="",null!=e&&(n=e.replace(C,"$&/")+"/"),F(a,t,n,"",(function(e){return e}))):null!=a&&(T(a)&&(a=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,n+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(C,"$&/")+"/")+e)),t.push(a)),1;if(l=0,r=""===r?".":r+":",Array.isArray(e))for(var c=0;c<e.length;c++){var u=r+x(s=e[c],c);l+=F(s,t,n,u,a)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=h&&e[h]||e["@@iterator"])?e:null}(e),"function"==typeof u)for(e=u.call(e),c=0;!(s=e.next()).done;)l+=F(s=s.value,t,n,u=r+x(s,c++),a);else if("object"===s)throw t=""+e,Error(p(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return l}function D(e,t,n){if(null==e)return e;var r=[],i=0;return F(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function k(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var O={current:null};function I(){var e=O.current;if(null===e)throw Error(p(321));return e}var A={ReactCurrentDispatcher:O,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:y,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:D,forEach:function(e,t,n){D(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return D(e,(function(){t++})),t},toArray:function(e){return D(e,(function(e){return e}))||[]},only:function(e){if(!T(e))throw Error(p(143));return e}},t.Component=f,t.PureComponent=b,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=A,t.cloneElement=function(e,t,n){if(null==e)throw Error(p(267,e));var o=r({},e.props),a=e.key,s=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,l=y.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(u in t)E.call(t,u)&&!S.hasOwnProperty(u)&&(o[u]=void 0===t[u]&&void 0!==c?c[u]:t[u])}var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){c=Array(u);for(var d=0;d<u;d++)c[d]=arguments[d+2];o.children=c}return{$$typeof:i,type:e.type,key:a,ref:s,props:o,_owner:l}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:s,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=w,t.createFactory=function(e){var t=w.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:l,render:e}},t.isValidElement=T,t.lazy=function(e){return{$$typeof:u,_payload:{_status:-1,_result:e},_init:k}},t.memo=function(e,t){return{$$typeof:c,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return I().useCallback(e,t)},t.useContext=function(e,t){return I().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return I().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return I().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return I().useLayoutEffect(e,t)},t.useMemo=function(e,t){return I().useMemo(e,t)},t.useReducer=function(e,t,n){return I().useReducer(e,t,n)},t.useRef=function(e){return I().useRef(e)},t.useState=function(e){return I().useState(e)},t.version="17.0.2"},function(e,t,n){"use strict";e.exports=n(947)},function(e,t,n){"use strict";var r,i,o,a;if("object"==typeof performance&&"function"==typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var l=Date,c=l.now();t.unstable_now=function(){return l.now()-c}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,d=null,h=function(){if(null!==u)try{var e=t.unstable_now();u(!0,e),u=null}catch(e){throw setTimeout(h,0),e}};r=function(e){null!==u?setTimeout(r,0,e):(u=e,setTimeout(h,0))},i=function(e,t){d=setTimeout(e,t)},o=function(){clearTimeout(d)},t.unstable_shouldYield=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var p=window.setTimeout,m=window.clearTimeout;if("undefined"!=typeof console){var g=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof g&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var f=!1,_=null,b=-1,v=5,y=0;t.unstable_shouldYield=function(){return t.unstable_now()>=y},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):v=0<e?Math.floor(1e3/e):5};var E=new MessageChannel,S=E.port2;E.port1.onmessage=function(){if(null!==_){var e=t.unstable_now();y=e+v;try{_(!0,e)?S.postMessage(null):(f=!1,_=null)}catch(e){throw S.postMessage(null),e}}else f=!1},r=function(e){_=e,f||(f=!0,S.postMessage(null))},i=function(e,n){b=p((function(){e(t.unstable_now())}),n)},o=function(){m(b),b=-1}}function w(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,i=e[r];if(!(void 0!==i&&0<x(i,t)))break e;e[r]=t,e[n]=i,n=r}}function T(e){return void 0===(e=e[0])?null:e}function C(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length;r<i;){var o=2*(r+1)-1,a=e[o],s=o+1,l=e[s];if(void 0!==a&&0>x(a,n))void 0!==l&&0>x(l,a)?(e[r]=l,e[s]=n,r=s):(e[r]=a,e[o]=n,r=o);else{if(!(void 0!==l&&0>x(l,n)))break e;e[r]=l,e[s]=n,r=s}}}return t}return null}function x(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var F=[],D=[],k=1,O=null,I=3,A=!1,R=!1,N=!1;function M(e){for(var t=T(D);null!==t;){if(null===t.callback)C(D);else{if(!(t.startTime<=e))break;C(D),t.sortIndex=t.expirationTime,w(F,t)}t=T(D)}}function P(e){if(N=!1,M(e),!R)if(null!==T(F))R=!0,r(L);else{var t=T(D);null!==t&&i(P,t.startTime-e)}}function L(e,n){R=!1,N&&(N=!1,o()),A=!0;var r=I;try{for(M(n),O=T(F);null!==O&&(!(O.expirationTime>n)||e&&!t.unstable_shouldYield());){var a=O.callback;if("function"==typeof a){O.callback=null,I=O.priorityLevel;var s=a(O.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?O.callback=s:O===T(F)&&C(F),M(n)}else C(F);O=T(F)}if(null!==O)var l=!0;else{var c=T(D);null!==c&&i(P,c.startTime-n),l=!1}return l}finally{O=null,I=r,A=!1}}var B=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){R||A||(R=!0,r(L))},t.unstable_getCurrentPriorityLevel=function(){return I},t.unstable_getFirstCallbackNode=function(){return T(F)},t.unstable_next=function(e){switch(I){case 1:case 2:case 3:var t=3;break;default:t=I}var n=I;I=t;try{return e()}finally{I=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=B,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=I;I=e;try{return t()}finally{I=n}},t.unstable_scheduleCallback=function(e,n,a){var s=t.unstable_now();switch("object"==typeof a&&null!==a?a="number"==typeof(a=a.delay)&&0<a?s+a:s:a=s,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return e={id:k++,callback:n,priorityLevel:e,startTime:a,expirationTime:l=a+l,sortIndex:-1},a>s?(e.sortIndex=a,w(D,e),null===T(F)&&e===T(D)&&(N?o():N=!0,i(P,a-s))):(e.sortIndex=l,w(F,e),R||A||(R=!0,r(L))),e},t.unstable_wrapCallback=function(e){var t=I;return function(){var n=I;I=t;try{return e.apply(this,arguments)}finally{I=n}}}},function(e,t,n){"use strict";var r=n(949),i=n(503).isArray,o=n(503).isDate,a=n(952).sprintf,s=n(17),l=n(953),c=n(955),u="counterpart";function d(e){return"string"==typeof e||"[object String]"===Object.prototype.toString.call(e)}function h(e){return d(e)&&":"===e[0]}function p(e,t){return t.reduce((function(e,t){return null!==(n=e)&&"[object Object]"===Object.prototype.toString.call(n)&&function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}(e,t)?e[t]:null;var n}),e)}function m(){s.EventEmitter.apply(this),this._registry={locale:"en",interpolate:!0,fallbackLocales:[],scope:null,translations:{},interpolations:{},normalizedKeys:{},separator:".",keepTrailingDot:!1,keyTransformer:function(e){return e},generateMissingEntry:function(e){return"missing translation: "+e}},this.registerTranslations("en",n(957)),this.setMaxListeners(0)}m.prototype=s.EventEmitter.prototype,m.prototype.constructor=s.EventEmitter,m.prototype.getLocale=function(){return this._registry.locale},m.prototype.setLocale=function(e){var t=this._registry.locale;return t!=e&&(this._registry.locale=e,this.emit("localechange",e,t)),t},m.prototype.getFallbackLocale=function(){return this._registry.fallbackLocales},m.prototype.setFallbackLocale=function(e){var t=this._registry.fallbackLocales;return this._registry.fallbackLocales=[].concat(e||[]),t},m.prototype.getAvailableLocales=function(){return this._registry.availableLocales||Object.keys(this._registry.translations)},m.prototype.setAvailableLocales=function(e){var t=this.getAvailableLocales();return this._registry.availableLocales=e,t},m.prototype.getSeparator=function(){return this._registry.separator},m.prototype.setSeparator=function(e){var t=this._registry.separator;return this._registry.separator=e,t},m.prototype.setInterpolate=function(e){var t=this._registry.interpolate;return this._registry.interpolate=e,t},m.prototype.getInterpolate=function(){return this._registry.interpolate},m.prototype.setKeyTransformer=function(e){var t=this._registry.keyTransformer;return this._registry.keyTransformer=e,t},m.prototype.getKeyTransformer=function(){return this._registry.keyTransformer},m.prototype.setMissingEntryGenerator=function(e){var t=this._registry.generateMissingEntry;return this._registry.generateMissingEntry=e,t},m.prototype.getMissingEntryGenerator=function(){return this._registry.generateMissingEntry},m.prototype.registerTranslations=function(e,t){var n={};return n[e]=t,r(!0,this._registry.translations,n),n},m.prototype.registerInterpolations=function(e){return r(!0,this._registry.interpolations,e)},m.prototype.onLocaleChange=m.prototype.addLocaleChangeListener=function(e){this.addListener("localechange",e)},m.prototype.offLocaleChange=m.prototype.removeLocaleChangeListener=function(e){this.removeListener("localechange",e)},m.prototype.onTranslationNotFound=m.prototype.addTranslationNotFoundListener=function(e){this.addListener("translationnotfound",e)},m.prototype.offTranslationNotFound=m.prototype.removeTranslationNotFoundListener=function(e){this.removeListener("translationnotfound",e)},m.prototype.onError=m.prototype.addErrorListener=function(e){this.addListener("error",e)},m.prototype.offError=m.prototype.removeErrorListener=function(e){this.removeListener("error",e)},m.prototype.translate=function(e,t){if(!i(e)&&!d(e)||!e.length)throw new Error("invalid argument: key");h(e)&&(e=e.substr(1)),e=this._registry.keyTransformer(e,t);var n=(t=r(!0,{},t)).locale||this._registry.locale;delete t.locale;var o=t.scope||this._registry.scope;delete t.scope;var a=t.separator||this._registry.separator;delete t.separator;var s=[].concat(t.fallbackLocale||this._registry.fallbackLocales);delete t.fallbackLocale;var l=this._normalizeKeys(n,o,e,a),c=p(this._registry.translations,l);if(null===c&&(this.emit("translationnotfound",n,e,t.fallback,o),t.fallback&&(c=this._fallback(n,o,e,t.fallback,t))),null===c&&s.length>0&&-1===s.indexOf(n))for(var u=0,m=s.length;u<m;u++){var g=s[u],f=this._normalizeKeys(g,o,e,a);if(c=p(this._registry.translations,f)){n=g;break}}return null===c&&(c=this._registry.generateMissingEntry(l.join(a))),c=this._pluralize(n,c,t.count),!1!==this._registry.interpolate&&!1!==t.interpolate&&(c=this._interpolate(c,t)),c},m.prototype.localize=function(e,t){if(!o(e))throw new Error("invalid argument: object must be a date");var n=(t=r(!0,{},t)).locale||this._registry.locale,i=t.scope||u,a=t.type||"datetime",s=t.format||"default";return t={locale:n,scope:i,interpolate:!1},s=this.translate(["formats",a,s],r(!0,{},t)),c(e,s,this.translate("names",t))},m.prototype._pluralize=function(e,t,n){if("object"!=typeof t||null===t||"number"!=typeof n)return t;var r=this.translate("pluralize",{locale:e,scope:u});return"[object Function]"!==Object.prototype.toString.call(r)?r:r(t,n)},m.prototype.withLocale=function(e,t,n){var r=this._registry.locale;this._registry.locale=e;var i=t.call(n);return this._registry.locale=r,i},m.prototype.withScope=function(e,t,n){var r=this._registry.scope;this._registry.scope=e;var i=t.call(n);return this._registry.scope=r,i},m.prototype.withSeparator=function(e,t,n){var r=this.setSeparator(e),i=t.call(n);return this.setSeparator(r),i},m.prototype._normalizeKeys=function(e,t,n,r){var i=[];return i=(i=(i=i.concat(this._normalizeKey(e,r))).concat(this._normalizeKey(t,r))).concat(this._normalizeKey(n,r))},m.prototype._normalizeKey=function(e,t){return this._registry.normalizedKeys[t]=this._registry.normalizedKeys[t]||{},this._registry.normalizedKeys[t][e]=this._registry.normalizedKeys[t][e]||function(e){if(i(e)){var n=e.map(function(e){return this._normalizeKey(e,t)}.bind(this));return[].concat.apply([],n)}if(null==e)return[];for(var r=e.split(t),o=r.length-1;o>=0;o--)""===r[o]&&(r.splice(o,1),!0===this._registry.keepTrailingDot&&o==r.length&&(r[r.length-1]+=""+t));return r}.bind(this)(e),this._registry.normalizedKeys[t][e]},m.prototype._interpolate=function(e,t){if("string"!=typeof e)return e;try{return a(e,r({},this._registry.interpolations,t))}catch(n){if(!(this.listenerCount("error")>0))throw n;return this.emit("error",n,e,t),null}},m.prototype._resolve=function(e,t,n,i,o){if(!1===(o=o||{}).resolve)return i;var a,s;if(h(i))a=this.translate(i,r({},o,{locale:e,scope:t}));else if("function"==typeof(s=i)||"[object Function]"===Object.prototype.toString.call(s)){var l;o.object?(l=o.object,delete o.object):l=n,a=this._resolve(e,t,n,i(l,o))}else a=i;return/^missing translation:/.test(a)?null:a},m.prototype._fallback=function(e,t,n,r,o){if(o=l(o,"fallback"),i(r)){for(var a=0,s=r.length;a<s;a++){var c=this._resolve(e,t,n,r[a],o);if(c)return c}return null}return this._resolve(e,t,n,r,o)};var g=new m;function f(){return g.translate.apply(g,arguments)}r(f,g,{Instance:m,Translator:m}),e.exports=f},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},l=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,n=r.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!o)return!1;for(t in e);return void 0===t||r.call(e,t)},c=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,n,r,i,o,a,d=arguments[0],h=1,p=arguments.length,m=!1;for("boolean"==typeof d&&(m=d,d=arguments[1]||{},h=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});h<p;++h)if(null!=(t=arguments[h]))for(n in t)r=u(d,n),d!==(i=u(t,n))&&(m&&i&&(l(i)||(o=s(i)))?(o?(o=!1,a=r&&s(r)?r:[]):a=r&&l(r)?r:{},c(d,{name:n,newValue:e(m,a,i)})):void 0!==i&&c(d,{name:n,newValue:i}));return d}},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){var r;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(e){return function(e,t){var n,r,a,s,l,c,u,d,h,p=1,m=e.length,g="";for(r=0;r<m;r++)if("string"==typeof e[r])g+=e[r];else if("object"==typeof e[r]){if((s=e[r]).keys)for(n=t[p],a=0;a<s.keys.length;a++){if(null==n)throw new Error(o('[sprintf] Cannot access property "%s" of undefined value "%s"',s.keys[a],s.keys[a-1]));n=n[s.keys[a]]}else n=s.param_no?t[s.param_no]:t[p++];if(i.not_type.test(s.type)&&i.not_primitive.test(s.type)&&n instanceof Function&&(n=n()),i.numeric_arg.test(s.type)&&"number"!=typeof n&&isNaN(n))throw new TypeError(o("[sprintf] expecting number but found %T",n));switch(i.number.test(s.type)&&(d=n>=0),s.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,s.width?parseInt(s.width):0);break;case"e":n=s.precision?parseFloat(n).toExponential(s.precision):parseFloat(n).toExponential();break;case"f":n=s.precision?parseFloat(n).toFixed(s.precision):parseFloat(n);break;case"g":n=s.precision?String(Number(n.toPrecision(s.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=s.precision?n.substring(0,s.precision):n;break;case"t":n=String(!!n),n=s.precision?n.substring(0,s.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=s.precision?n.substring(0,s.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=s.precision?n.substring(0,s.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?g+=n:(!i.number.test(s.type)||d&&!s.sign?h="":(h=d?"+":"-",n=n.toString().replace(i.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",u=s.width-(h+n).length,l=s.width&&u>0?c.repeat(u):"",g+=s.align?h+n+l:"0"===c?h+l+n:l+h+n)}return g}(function(e){if(s[e])return s[e];var t,n=e,r=[],o=0;for(;n;){if(null!==(t=i.text.exec(n)))r.push(t[0]);else if(null!==(t=i.modulo.exec(n)))r.push("%");else{if(null===(t=i.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){o|=1;var a=[],l=t[2],c=[];if(null===(c=i.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(c[1]);""!==(l=l.substring(c[0].length));)if(null!==(c=i.key_access.exec(l)))a.push(c[1]);else{if(null===(c=i.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(c[1])}t[2]=a}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}n=n.substring(t[0].length)}return s[e]=r}(e),arguments)}function a(e,t){return o.apply(null,[e].concat(t||[]))}var s=Object.create(null);t.sprintf=o,t.vsprintf=a,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=a,void 0===(r=function(){return{sprintf:o,vsprintf:a}}.call(t,n,t,e))||(e.exports=r))}()},function(e,t,n){"use strict";var r=Array.prototype,i=r.concat,o=r.slice,a=n(954);e.exports=function(e){var t={},n=i.apply(r,o.call(arguments,1));for(var s in e)-1===a(n,s)&&(t[s]=e[s]);return t}},function(e,t){var n=[].indexOf;e.exports=function(e,t){if(n)return e.indexOf(t);for(var r=0;r<e.length;++r)if(e[r]===t)return r;return-1}},function(e,t,n){"use strict";var r=n(956);function i(e,t,n){"number"==typeof t&&(n=t,t="0"),null===t&&(t="0"),n=n||2;var r=String(e);if(t)for(;r.length<n;)r=t+r;return r}function o(e){var t=e.getHours();return 0===t?t=12:t>12&&(t-=12),t}function a(e,t){t=t||"sunday";var n=e.getDay();"monday"==t&&(0===n?n=6:n--);var r=new Date(e.getFullYear(),0,1),i=((e-r)/864e5+7-n)/7;return Math.floor(i)}e.exports=function e(t,n,s){var l=t.getTime();return s=s||r,n.replace(/%([-_0]?.)/g,(function(n,r){var c=null;if(2==r.length){switch(r[0]){case"-":c="";break;case"_":c=" ";break;case"0":c="0";break;default:return n}r=r[1]}switch(r){case"A":return s.days[t.getDay()];case"a":return s.abbreviated_days[t.getDay()];case"B":return s.months[t.getMonth()];case"b":case"h":return s.abbreviated_months[t.getMonth()];case"C":return i(Math.floor(t.getFullYear()/100),c);case"D":return e(t,"%m/%d/%y");case"d":return i(t.getDate(),c);case"e":return t.getDate();case"F":return e(t,"%Y-%m-%d");case"H":return i(t.getHours(),c);case"I":return i(o(t),c);case"j":return i(Math.ceil((t.getTime()-new Date(t.getFullYear(),0,1).getTime())/864e5),3);case"k":return i(t.getHours(),null===c?" ":c);case"L":return i(Math.floor(l%1e3),3);case"l":return i(o(t),null===c?" ":c);case"M":return i(t.getMinutes(),c);case"m":return i(t.getMonth()+1,c);case"n":return"\n";case"o":return String(t.getDate())+function(e){var t=e%10,n=e%100;if(n>=11&&n<=13||0===t||t>=4)return"th";switch(t){case 1:return"st";case 2:return"nd";case 3:return"rd"}}(t.getDate());case"P":return t.getHours()<12?s.am.toLowerCase():s.pm.toLowerCase();case"p":return t.getHours()<12?s.am.toUpperCase():s.pm.toUpperCase();case"R":return e(t,"%H:%M");case"r":return e(t,"%I:%M:%S %p");case"S":return i(t.getSeconds(),c);case"s":return Math.floor(l/1e3);case"T":return e(t,"%H:%M:%S");case"t":return"\t";case"U":return i(a(t,"sunday"),c);case"u":return 0===t.getDay()?7:t.getDay();case"v":return e(t,"%e-%b-%Y");case"W":return i(a(t,"monday"),c);case"w":return t.getDay();case"Y":return t.getFullYear();case"y":var u=String(t.getFullYear());return u.slice(u.length-2);case"Z":var d=t.toString().match(/\((\w+)\)/);return d&&d[1]||"";case"z":var h=t.getTimezoneOffset();return(h>0?"-":"+")+i(Math.round(Math.abs(h/60)),2)+":"+i(h%60,2);default:return r}}))}},function(e,t,n){"use strict";e.exports=n(660)},function(e,t,n){"use strict";e.exports={counterpart:{names:n(660),pluralize:n(958),formats:{date:{default:"%a, %e %b %Y",long:"%A, %B %o, %Y",short:"%b %e"},time:{default:"%H:%M",long:"%H:%M:%S %z",short:"%H:%M"},datetime:{default:"%a, %e %b %Y %H:%M",long:"%A, %B %o, %Y %H:%M:%S %z",short:"%e %b %H:%M"}}}}},function(e,t,n){"use strict";e.exports=function(e,t){var n;return 0===t&&"zero"in e&&(n="zero"),e[n=n||(1===t?"one":"other")]}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return u}));var r=n(13),i=n.n(r),o=n(16),a=n(411),s=n(356),l=n(506),c=n(412);class u{constructor(e,t){var n;this.eventEmitter=e,this.opts=t,i()(this,"abortController",new AbortController),o.f(t,["baseUrl","prefix"]),t.onlyData=!!t.onlyData,t.useAuthorizationHeader=null===(n=t.useAuthorizationHeader)||void 0===n||n}abort(){this.abortController.abort(),this.abortController=new AbortController}fetch(t,n){return this.opts.fetchFn?this.opts.fetchFn(t,n):e.fetch(t,n)}setIdBaseUrl(e){this.opts.idBaseUrl=e}idServerRequest(e,t,n,r,i){if(!this.opts.idBaseUrl)throw new Error("No identity server base URL set");let o,s;e===a.a.Get?o=n:s=n;const l=this.getUrl(t,o,r,this.opts.idBaseUrl),c={json:!0,headers:{}};return i&&(c.headers.Authorization=`Bearer ${i}`),this.requestOtherUrl(e,l,s,c)}authedRequest(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};n||(n={}),this.opts.accessToken&&(this.opts.useAuthorizationHeader?(i.headers||(i.headers={}),i.headers.Authorization||(i.headers.Authorization="Bearer "+this.opts.accessToken),n.access_token&&delete n.access_token):n.access_token||(n.access_token=this.opts.accessToken));const o=this.request(e,t,n,r,i);return o.catch((e=>{"M_UNKNOWN_TOKEN"!=e.errcode||null!=i&&i.inhibitLogoutEmit?"M_CONSENT_NOT_GIVEN"==e.errcode&&this.eventEmitter.emit(l.a.NoConsent,e.message,e.data.consent_uri):this.eventEmitter.emit(l.a.SessionLoggedOut,e)})),o}request(e,t,n,r,i){const o=this.getUrl(t,n,null==i?void 0:i.prefix,null==i?void 0:i.baseUrl);return this.requestOtherUrl(e,o,r,i)}async requestOtherUrl(e,t,n){var r,i,o,a;let l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const u=Object.assign({},l.headers||{}),d=null===(r=l.json)||void 0===r||r,h=d&&(null==n||null===(i=n.constructor)||void 0===i?void 0:i.name)===Object.name;d&&(h&&!u["Content-Type"]&&(u["Content-Type"]="application/json"),u.Accept||(u.Accept="application/json"));const p=null!==(o=l.localTimeoutMs)&&void 0!==o?o:this.opts.localTimeoutMs,m=null!==(a=l.keepAlive)&&void 0!==a&&a,g=[this.abortController.signal];let f;void 0!==p&&g.push(Object(c.d)(p)),l.abortSignal&&g.push(l.abortSignal),f=h?JSON.stringify(n):n;const{signal:_,cleanup:b}=Object(c.a)(g);let v;try{v=await this.fetch(t,{signal:_,method:e,body:f,headers:u,mode:"cors",redirect:"follow",referrer:"",referrerPolicy:"no-referrer",cache:"no-cache",credentials:"omit",keepalive:m})}catch(e){if("AbortError"===e.name)throw e;throw new s.a("fetch failed",e)}finally{b()}if(!v.ok)throw Object(c.b)(v,await v.text());return this.opts.onlyData?d?v.json():v.text():v}getUrl(e,t,n,r){const i=new URL((null!=r?r:this.opts.baseUrl)+(null!=n?n:this.opts.prefix)+e);return t&&o.n(t,i.searchParams),i}}}).call(this,n(14))},function(e,t,n){"use strict";var r=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,i=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,o=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,a=/\\([\u000b\u0020-\u00ff])/g,s=/([\\"])/g,l=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function c(e){var t=String(e);if(o.test(t))return t;if(t.length>0&&!i.test(t))throw new TypeError("invalid parameter value");return'"'+t.replace(s,"\\$1")+'"'}function u(e){this.parameters=Object.create(null),this.type=e}t.format=function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var t=e.parameters,n=e.type;if(!n||!l.test(n))throw new TypeError("invalid type");var r=n;if(t&&"object"==typeof t)for(var i,a=Object.keys(t).sort(),s=0;s<a.length;s++){if(i=a[s],!o.test(i))throw new TypeError("invalid parameter name");r+="; "+i+"="+c(t[i])}return r},t.parse=function(e){if(!e)throw new TypeError("argument string is required");var t="object"==typeof e?function(e){var t;"function"==typeof e.getHeader?t=e.getHeader("content-type"):"object"==typeof e.headers&&(t=e.headers&&e.headers["content-type"]);if("string"!=typeof t)throw new TypeError("content-type header is missing from object");return t}(e):e;if("string"!=typeof t)throw new TypeError("argument string is required to be a string");var n=t.indexOf(";"),i=-1!==n?t.slice(0,n).trim():t.trim();if(!l.test(i))throw new TypeError("invalid media type");var o=new u(i.toLowerCase());if(-1!==n){var s,c,d;for(r.lastIndex=n;c=r.exec(t);){if(c.index!==n)throw new TypeError("invalid parameter format");n+=c[0].length,s=c[1].toLowerCase(),34===(d=c[2]).charCodeAt(0)&&-1!==(d=d.slice(1,-1)).indexOf("\\")&&(d=d.replace(a,"$1")),o.parameters[s]=d}if(n!==t.length)throw new TypeError("invalid parameter format")}return o}},function(e,t,n){"use strict";(function(e){n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return u}));var r=n(1);const i=1e3;let o,a=0;const s=[],l=function(){};function c(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];(t=t||0)<0&&(t=0);const o=Date.now()+t,c=a++;l("setTimeout: scheduling cb",c,"at",o,"(delay",t,")");const u={runAt:o,func:e,params:r,key:c},h=function(e,t){let n=0,r=e.length;for(;n<r;){const i=n+r>>1;t(e[i])>0?r=i:n=i+1}return n}(s,(function(e){return e.runAt-o}));return s.splice(h,0,u),d(),c}function u(e){if(0===s.length)return;let t;for(t=0;t<s.length;t++){if(s[t].key==e){s.splice(t,1);break}}0===t&&d()}function d(){o&&e.clearTimeout(o);const t=s[0];if(!t)return void l("scheduleRealCallback: no more callbacks, not rescheduling");const n=Date.now(),r=Math.min(t.runAt-n,i);l("scheduleRealCallback: now:",n,"delay:",r),o=e.setTimeout(h,r)}function h(){const t=Date.now();l("runCallbacks: now:",t);const n=[];for(;;){const e=s[0];if(!e||e.runAt>t)break;const r=s.shift();l("runCallbacks: popping",r.key),n.push(r)}d();for(const t of n)try{t.func.apply(e,t.params)}catch(e){r.a.error("Uncaught exception in callback function",e)}}}).call(this,n(14))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(13),i=n.n(r);class o{constructor(){i()(this,"accountData",new Map),i()(this,"fromToken",null)}isNewlyCreated(){return Promise.resolve(!0)}getSyncToken(){return this.fromToken}setSyncToken(e){this.fromToken=e}storeRoom(e){}getRoom(e){return null}getRooms(){return[]}removeRoom(e){}getRoomSummaries(){return[]}storeUser(e){}getUser(e){return null}getUsers(){return[]}scrollback(e,t){return[]}storeEvents(e,t,n,r){}storeFilter(e){}getFilter(e,t){return null}getFilterIdByName(e){return null}setFilterIdByName(e,t){}storeAccountDataEvents(e){}getAccountData(e){}setSyncData(e){return Promise.resolve()}wantsSave(){return!1}save(){}startup(){return Promise.resolve()}getSavedSync(){return Promise.resolve(null)}getSavedSyncToken(){return Promise.resolve(null)}deleteAllData(){return Promise.resolve()}getOutOfBandMembers(){return Promise.resolve(null)}setOutOfBandMembers(e,t){return Promise.resolve()}clearOutOfBandMembers(){return Promise.resolve()}getClientOptions(){return Promise.resolve(void 0)}storeClientOptions(e){return Promise.resolve()}async getPendingEvents(e){return[]}setPendingEvents(e,t){return Promise.resolve()}async saveToDeviceBatches(e){return Promise.resolve()}getOldestToDeviceBatch(){return Promise.resolve(null)}async removeToDeviceBatch(e){return Promise.resolve()}}},function(e,t,n){var r=n(964),i=n(965);t.write=i,t.parse=r.parse,t.parseParams=r.parseParams,t.parseFmtpConfig=r.parseFmtpConfig,t.parsePayloads=r.parsePayloads,t.parseRemoteCandidates=r.parseRemoteCandidates,t.parseImageAttributes=r.parseImageAttributes,t.parseSimulcastStreamList=r.parseSimulcastStreamList},function(e,t,n){var r=function(e){return String(Number(e))===e?Number(e):e},i=function(e,t,n){var i=e.name&&e.names;e.push&&!t[e.push]?t[e.push]=[]:i&&!t[e.name]&&(t[e.name]={});var o=e.push?{}:i?t[e.name]:t;!function(e,t,n,i){if(i&&!n)t[i]=r(e[1]);else for(var o=0;o<n.length;o+=1)null!=e[o+1]&&(t[n[o]]=r(e[o+1]))}(n.match(e.reg),o,e.names,e.name),e.push&&t[e.push].push(o)},o=n(663),a=RegExp.prototype.test.bind(/^([a-z])=(.*)/);t.parse=function(e){var t={},n=[],r=t;return e.split(/(\r\n|\r|\n)/).filter(a).forEach((function(e){var t=e[0],a=e.slice(2);"m"===t&&(n.push({rtp:[],fmtp:[]}),r=n[n.length-1]);for(var s=0;s<(o[t]||[]).length;s+=1){var l=o[t][s];if(l.reg.test(a))return i(l,r,a)}})),t.media=n,t};var s=function(e,t){var n=t.split(/=(.+)/,2);return 2===n.length?e[n[0]]=r(n[1]):1===n.length&&t.length>1&&(e[n[0]]=void 0),e};t.parseParams=function(e){return e.split(/;\s?/).reduce(s,{})},t.parseFmtpConfig=t.parseParams,t.parsePayloads=function(e){return e.toString().split(" ").map(Number)},t.parseRemoteCandidates=function(e){for(var t=[],n=e.split(" ").map(r),i=0;i<n.length;i+=3)t.push({component:n[i],ip:n[i+1],port:n[i+2]});return t},t.parseImageAttributes=function(e){return e.split(" ").map((function(e){return e.substring(1,e.length-1).split(",").reduce(s,{})}))},t.parseSimulcastStreamList=function(e){return e.split(";").map((function(e){return e.split(",").map((function(e){var t,n=!1;return"~"!==e[0]?t=r(e):(t=r(e.substring(1,e.length)),n=!0),{scid:t,paused:n}}))}))}},function(e,t,n){var r=n(663),i=/%[sdv%]/g,o=function(e){var t=1,n=arguments,r=n.length;return e.replace(i,(function(e){if(t>=r)return e;var i=n[t];switch(t+=1,e){case"%%":return"%";case"%s":return String(i);case"%d":return Number(i);case"%v":return""}}))},a=function(e,t,n){var r=[e+"="+(t.format instanceof Function?t.format(t.push?n:n[t.name]):t.format)];if(t.names)for(var i=0;i<t.names.length;i+=1){var a=t.names[i];t.name?r.push(n[t.name][a]):r.push(n[t.names[i]])}else r.push(n[t.name]);return o.apply(null,r)},s=["v","o","s","i","u","e","p","c","b","t","r","z","a"],l=["i","c","b","a"];e.exports=function(e,t){t=t||{},null==e.version&&(e.version=0),null==e.name&&(e.name=" "),e.media.forEach((function(e){null==e.payloads&&(e.payloads="")}));var n=t.outerOrder||s,i=t.innerOrder||l,o=[];return n.forEach((function(t){r[t].forEach((function(n){n.name in e&&null!=e[n.name]?o.push(a(t,n,e)):n.push in e&&null!=e[n.push]&&e[n.push].forEach((function(e){o.push(a(t,n,e))}))}))})),e.media.forEach((function(e){o.push(a("m",r.m[0],e)),i.forEach((function(t){r[t].forEach((function(n){n.name in e&&null!=e[n.name]?o.push(a(t,n,e)):n.push in e&&null!=e[n.push]&&e[n.push].forEach((function(e){o.push(a(t,n,e))}))}))}))})),o.join("\r\n")+"\r\n"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=(r=n(664))&&r.__esModule?r:{default:r},o=n(414);let a,s,l=0,c=0;var u=function(e,t,n){let r=t&&n||0;const u=t||new Array(16);let d=(e=e||{}).node||a,h=void 0!==e.clockseq?e.clockseq:s;if(null==d||null==h){const t=e.random||(e.rng||i.default)();null==d&&(d=a=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==h&&(h=s=16383&(t[6]<<8|t[7]))}let p=void 0!==e.msecs?e.msecs:Date.now(),m=void 0!==e.nsecs?e.nsecs:c+1;const g=p-l+(m-c)/1e4;if(g<0&&void 0===e.clockseq&&(h=h+1&16383),(g<0||p>l)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");l=p,c=m,s=h,p+=122192928e5;const f=(1e4*(268435455&p)+m)%4294967296;u[r++]=f>>>24&255,u[r++]=f>>>16&255,u[r++]=f>>>8&255,u[r++]=255&f;const _=p/4294967296*1e4&268435455;u[r++]=_>>>8&255,u[r++]=255&_,u[r++]=_>>>24&15|16,u[r++]=_>>>16&255,u[r++]=h>>>8|128,u[r++]=255&h;for(let e=0;e<6;++e)u[r+e]=d[e];return t||(0,o.unsafeStringify)(u)};t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(665)),i=o(n(969));function o(e){return e&&e.__esModule?e:{default:e}}var a=(0,r.default)("v3",48,i.default);t.default=a},function(e,t,n){"use strict";function r(e){return 14+(e+64>>>9<<4)+1}function i(e,t){const n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function o(e,t,n,r,o,a){return i((s=i(i(t,e),i(r,a)))<<(l=o)|s>>>32-l,n);var s,l}function a(e,t,n,r,i,a,s){return o(t&n|~t&r,e,t,i,a,s)}function s(e,t,n,r,i,a,s){return o(t&r|n&~r,e,t,i,a,s)}function l(e,t,n,r,i,a,s){return o(t^n^r,e,t,i,a,s)}function c(e,t,n,r,i,a,s){return o(n^(t|~r),e,t,i,a,s)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var u=function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){const t=[],n=32*e.length,r="0123456789abcdef";for(let i=0;i<n;i+=8){const n=e[i>>5]>>>i%32&255,o=parseInt(r.charAt(n>>>4&15)+r.charAt(15&n),16);t.push(o)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[r(t)-1]=t;let n=1732584193,o=-271733879,u=-1732584194,d=271733878;for(let t=0;t<e.length;t+=16){const r=n,h=o,p=u,m=d;n=a(n,o,u,d,e[t],7,-680876936),d=a(d,n,o,u,e[t+1],12,-389564586),u=a(u,d,n,o,e[t+2],17,606105819),o=a(o,u,d,n,e[t+3],22,-1044525330),n=a(n,o,u,d,e[t+4],7,-176418897),d=a(d,n,o,u,e[t+5],12,1200080426),u=a(u,d,n,o,e[t+6],17,-1473231341),o=a(o,u,d,n,e[t+7],22,-45705983),n=a(n,o,u,d,e[t+8],7,1770035416),d=a(d,n,o,u,e[t+9],12,-1958414417),u=a(u,d,n,o,e[t+10],17,-42063),o=a(o,u,d,n,e[t+11],22,-1990404162),n=a(n,o,u,d,e[t+12],7,1804603682),d=a(d,n,o,u,e[t+13],12,-40341101),u=a(u,d,n,o,e[t+14],17,-1502002290),o=a(o,u,d,n,e[t+15],22,1236535329),n=s(n,o,u,d,e[t+1],5,-165796510),d=s(d,n,o,u,e[t+6],9,-1069501632),u=s(u,d,n,o,e[t+11],14,643717713),o=s(o,u,d,n,e[t],20,-373897302),n=s(n,o,u,d,e[t+5],5,-701558691),d=s(d,n,o,u,e[t+10],9,38016083),u=s(u,d,n,o,e[t+15],14,-660478335),o=s(o,u,d,n,e[t+4],20,-405537848),n=s(n,o,u,d,e[t+9],5,568446438),d=s(d,n,o,u,e[t+14],9,-1019803690),u=s(u,d,n,o,e[t+3],14,-187363961),o=s(o,u,d,n,e[t+8],20,1163531501),n=s(n,o,u,d,e[t+13],5,-1444681467),d=s(d,n,o,u,e[t+2],9,-51403784),u=s(u,d,n,o,e[t+7],14,1735328473),o=s(o,u,d,n,e[t+12],20,-1926607734),n=l(n,o,u,d,e[t+5],4,-378558),d=l(d,n,o,u,e[t+8],11,-2022574463),u=l(u,d,n,o,e[t+11],16,1839030562),o=l(o,u,d,n,e[t+14],23,-35309556),n=l(n,o,u,d,e[t+1],4,-1530992060),d=l(d,n,o,u,e[t+4],11,1272893353),u=l(u,d,n,o,e[t+7],16,-155497632),o=l(o,u,d,n,e[t+10],23,-1094730640),n=l(n,o,u,d,e[t+13],4,681279174),d=l(d,n,o,u,e[t],11,-358537222),u=l(u,d,n,o,e[t+3],16,-722521979),o=l(o,u,d,n,e[t+6],23,76029189),n=l(n,o,u,d,e[t+9],4,-640364487),d=l(d,n,o,u,e[t+12],11,-421815835),u=l(u,d,n,o,e[t+15],16,530742520),o=l(o,u,d,n,e[t+2],23,-995338651),n=c(n,o,u,d,e[t],6,-198630844),d=c(d,n,o,u,e[t+7],10,1126891415),u=c(u,d,n,o,e[t+14],15,-1416354905),o=c(o,u,d,n,e[t+5],21,-57434055),n=c(n,o,u,d,e[t+12],6,1700485571),d=c(d,n,o,u,e[t+3],10,-1894986606),u=c(u,d,n,o,e[t+10],15,-1051523),o=c(o,u,d,n,e[t+1],21,-2054922799),n=c(n,o,u,d,e[t+8],6,1873313359),d=c(d,n,o,u,e[t+15],10,-30611744),u=c(u,d,n,o,e[t+6],15,-1560198380),o=c(o,u,d,n,e[t+13],21,1309151649),n=c(n,o,u,d,e[t+4],6,-145523070),d=c(d,n,o,u,e[t+11],10,-1120210379),u=c(u,d,n,o,e[t+2],15,718787259),o=c(o,u,d,n,e[t+9],21,-343485551),n=i(n,r),o=i(o,h),u=i(u,p),d=i(d,m)}return[n,o,u,d]}(function(e){if(0===e.length)return[];const t=8*e.length,n=new Uint32Array(r(t));for(let r=0;r<t;r+=8)n[r>>5]|=(255&e[r/8])<<r%32;return n}(e),8*e.length))};t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(971)),i=a(n(664)),o=n(414);function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e,t,n){if(r.default.randomUUID&&!t&&!e)return r.default.randomUUID();const a=(e=e||{}).random||(e.rng||i.default)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=a[e];return t}return(0,o.unsafeStringify)(a)};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(665)),i=o(n(973));function o(e){return e&&e.__esModule?e:{default:e}}var a=(0,r.default)("v5",80,i.default);t.default=a},function(e,t,n){"use strict";function r(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function i(e,t){return e<<t|e>>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e){const t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let n=0;n<t.length;++n)e.push(t.charCodeAt(n))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);const o=e.length/4+2,a=Math.ceil(o/16),s=new Array(a);for(let t=0;t<a;++t){const n=new Uint32Array(16);for(let r=0;r<16;++r)n[r]=e[64*t+4*r]<<24|e[64*t+4*r+1]<<16|e[64*t+4*r+2]<<8|e[64*t+4*r+3];s[t]=n}s[a-1][14]=8*(e.length-1)/Math.pow(2,32),s[a-1][14]=Math.floor(s[a-1][14]),s[a-1][15]=8*(e.length-1)&4294967295;for(let e=0;e<a;++e){const o=new Uint32Array(80);for(let t=0;t<16;++t)o[t]=s[e][t];for(let e=16;e<80;++e)o[e]=i(o[e-3]^o[e-8]^o[e-14]^o[e-16],1);let a=n[0],l=n[1],c=n[2],u=n[3],d=n[4];for(let e=0;e<80;++e){const n=Math.floor(e/20),s=i(a,5)+r(n,l,c,u)+d+t[n]+o[e]>>>0;d=u,u=c,c=i(l,30)>>>0,l=a,a=s}n[0]=n[0]+a>>>0,n[1]=n[1]+l>>>0,n[2]=n[2]+c>>>0,n[3]=n[3]+u>>>0,n[4]=n[4]+d>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]};t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default="00000000-0000-0000-0000-000000000000"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=(r=n(415))&&r.__esModule?r:{default:r};var o=function(e){if(!(0,i.default)(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)};t.default=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(13),i=n.n(r),o=n(225);class a{constructor(e){this.cryptoStore=e,i()(this,"roomEncryption",{})}async init(){await this.cryptoStore.doTxn("readwrite",[o.a.STORE_ROOMS],(e=>{this.cryptoStore.getEndToEndRooms(e,(e=>{this.roomEncryption=e}))}))}getRoomEncryption(e){return this.roomEncryption[e]||null}isRoomEncrypted(e){return Boolean(this.getRoomEncryption(e))}async setRoomEncryption(e,t){this.roomEncryption[e]=t,await this.cryptoStore.doTxn("readwrite",[o.a.STORE_ROOMS],(n=>{this.cryptoStore.storeEndToEndRoom(e,t,n)}))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return u}));var r=n(13),i=n.n(r),o=n(1),a=n(16);class s{constructor(e){this.db=e,i()(this,"nextTxnId",0),e.onversionchange=()=>{o.a.log(`versionchange for indexeddb ${this.db.name}: closing`),e.close()}}async startup(){return this}async deleteAllData(){throw Error("This is not implemented, call IDBFactory::deleteDatabase(dbName) instead.")}getOrAddOutgoingRoomKeyRequest(e){const t=e.requestBody;return new Promise(((n,r)=>{const i=this.db.transaction("outgoingRoomKeyRequests","readwrite");i.onerror=r,this._getOutgoingRoomKeyRequest(i,t,(r=>{if(r)return o.a.log(`already have key request outstanding for ${t.room_id} / ${t.session_id}: not sending another`),void n(r);o.a.log(`enqueueing key request for ${t.room_id} / `+t.session_id),i.oncomplete=()=>{n(e)};i.objectStore("outgoingRoomKeyRequests").add(e)}))}))}getOutgoingRoomKeyRequest(e){return new Promise(((t,n)=>{const r=this.db.transaction("outgoingRoomKeyRequests","readonly");r.onerror=n,this._getOutgoingRoomKeyRequest(r,e,(e=>{t(e)}))}))}_getOutgoingRoomKeyRequest(e,t,n){const r=e.objectStore("outgoingRoomKeyRequests").index("session").openCursor([t.room_id,t.session_id]);r.onsuccess=()=>{const e=r.result;if(!e)return void n(null);const i=e.value;a.j(i.requestBody,t)?n(i):e.continue()}}getOutgoingRoomKeyRequestByState(e){if(0===e.length)return Promise.resolve(null);let t,n=0;const r=this.db.transaction("outgoingRoomKeyRequests","readonly"),i=r.objectStore("outgoingRoomKeyRequests"),o=e[n];return i.index("state").openCursor(o).onsuccess=function r(){const i=this.result;if(i)return void(t=i.value);if(n++,n>=e.length)return;const o=e[n];this.source.openCursor(o).onsuccess=r},h(r).then((()=>t))}getAllOutgoingRoomKeyRequestsByState(e){return new Promise(((t,n)=>{const r=this.db.transaction("outgoingRoomKeyRequests","readonly").objectStore("outgoingRoomKeyRequests").index("state").getAll(e);r.onsuccess=()=>t(r.result),r.onerror=()=>n(r.error)}))}getOutgoingRoomKeyRequestsByTarget(e,t,n){let r=0;const i=[];const o=this.db.transaction("outgoingRoomKeyRequests","readonly"),a=o.objectStore("outgoingRoomKeyRequests"),s=n[r];return a.index("state").openCursor(s).onsuccess=function o(){const a=this.result;if(a){const n=a.value;n.recipients.some((n=>n.userId===e&&n.deviceId===t))&&i.push(n),a.continue()}else{if(r++,r>=n.length)return;const e=n[r];this.source.openCursor(e).onsuccess=o}},h(o).then((()=>i))}updateOutgoingRoomKeyRequest(e,t,n){let r=null;const i=this.db.transaction("outgoingRoomKeyRequests","readwrite");return i.objectStore("outgoingRoomKeyRequests").openCursor(e).onsuccess=function(){const e=this.result;if(!e)return;const i=e.value;i.state==t?(Object.assign(i,n),e.update(i),r=i):o.a.warn(`Cannot update room key request from ${t} as it was already updated to ${i.state}`)},h(i).then((()=>r))}deleteOutgoingRoomKeyRequest(e,t){const n=this.db.transaction("outgoingRoomKeyRequests","readwrite"),r=n.objectStore("outgoingRoomKeyRequests").openCursor(e);return r.onsuccess=()=>{const e=r.result;if(!e)return;const n=e.value;n.state==t?e.delete():o.a.warn(`Cannot delete room key request in state ${n.state} (expected ${t})`)},h(n)}getAccount(e,t){const n=e.objectStore("account").get("-");n.onsuccess=function(){try{t(n.result||null)}catch(t){d(e,t)}}}storeAccount(e,t){e.objectStore("account").put(t,"-")}getCrossSigningKeys(e,t){const n=e.objectStore("account").get("crossSigningKeys");n.onsuccess=function(){try{t(n.result||null)}catch(t){d(e,t)}}}getSecretStorePrivateKey(e,t,n){const r=e.objectStore("account").get(`ssss_cache:${n}`);r.onsuccess=function(){try{t(r.result||null)}catch(t){d(e,t)}}}storeCrossSigningKeys(e,t){e.objectStore("account").put(t,"crossSigningKeys")}storeSecretStorePrivateKey(e,t,n){e.objectStore("account").put(n,`ssss_cache:${t}`)}countEndToEndSessions(e,t){const n=e.objectStore("sessions").count();n.onsuccess=function(){try{t(n.result)}catch(t){d(e,t)}}}getEndToEndSessions(e,t,n){const r=t.objectStore("sessions").index("deviceKey").openCursor(e),i={};r.onsuccess=function(){const e=r.result;if(e)i[e.value.sessionId]={session:e.value.session,lastReceivedMessageTs:e.value.lastReceivedMessageTs},e.continue();else try{n(i)}catch(e){d(t,e)}}}getEndToEndSession(e,t,n,r){const i=n.objectStore("sessions").get([e,t]);i.onsuccess=function(){try{i.result?r({session:i.result.session,lastReceivedMessageTs:i.result.lastReceivedMessageTs}):r(null)}catch(e){d(n,e)}}}getAllEndToEndSessions(e,t){const n=e.objectStore("sessions").openCursor();n.onsuccess=function(){try{const e=n.result;e?(t(e.value),e.continue()):t(null)}catch(t){d(e,t)}}}storeEndToEndSession(e,t,n,r){r.objectStore("sessions").put({deviceKey:e,sessionId:t,session:n.session,lastReceivedMessageTs:n.lastReceivedMessageTs})}async storeEndToEndSessionProblem(e,t,n){const r=this.db.transaction("session_problems","readwrite");r.objectStore("session_problems").put({deviceKey:e,type:t,fixed:n,time:Date.now()}),await h(r)}async getEndToEndSessionProblem(e,t){let n=null;const r=this.db.transaction("session_problems","readwrite"),i=r.objectStore("session_problems").index("deviceKey").getAll(e);return i.onsuccess=()=>{const e=i.result;if(!e.length)return void(n=null);e.sort(((e,t)=>e.time-t.time));const r=e[e.length-1];for(const i of e)if(i.time>t)return void(n=Object.assign({},i,{fixed:r.fixed}));n=r.fixed?null:r},await h(r),n}async filterOutNotifiedErrorDevices(e){const t=this.db.transaction("notified_error_devices","readwrite").objectStore("notified_error_devices"),n=[];return await Promise.all(e.map((e=>new Promise((r=>{const{userId:i,deviceInfo:o}=e,a=t.get([i,o.deviceId]);a.onsuccess=function(){a.result||(t.put({userId:i,deviceId:o.deviceId}),n.push(e)),r()}}))))),n}getEndToEndInboundGroupSession(e,t,n,r){let i=!1,o=!1;const a=n.objectStore("inbound_group_sessions").get([e,t]);a.onsuccess=function(){try{i=a.result?a.result.session:null,!1!==o&&r(i,o)}catch(e){d(n,e)}};const s=n.objectStore("inbound_group_sessions_withheld").get([e,t]);s.onsuccess=function(){try{o=s.result?s.result.session:null,!1!==i&&r(i,o)}catch(e){d(n,e)}}}getAllEndToEndInboundGroupSessions(e,t){const n=e.objectStore("inbound_group_sessions").openCursor();n.onsuccess=function(){const r=n.result;if(r){try{t({senderKey:r.value.senderCurve25519Key,sessionId:r.value.sessionId,sessionData:r.value.session})}catch(t){d(e,t)}r.continue()}else try{t(null)}catch(t){d(e,t)}}}addEndToEndInboundGroupSession(e,t,n,r){const i=r.objectStore("inbound_group_sessions").add({senderCurve25519Key:e,sessionId:t,session:n});i.onerror=n=>{var a;"ConstraintError"===(null===(a=i.error)||void 0===a?void 0:a.name)?(n.stopPropagation(),n.preventDefault(),o.a.log("Ignoring duplicate inbound group session: "+e+" / "+t)):d(r,new Error("Failed to add inbound group session: "+i.error))}}storeEndToEndInboundGroupSession(e,t,n,r){r.objectStore("inbound_group_sessions").put({senderCurve25519Key:e,sessionId:t,session:n})}storeEndToEndInboundGroupSessionWithheld(e,t,n,r){r.objectStore("inbound_group_sessions_withheld").put({senderCurve25519Key:e,sessionId:t,session:n})}getEndToEndDeviceData(e,t){const n=e.objectStore("device_data").get("-");n.onsuccess=function(){try{t(n.result||null)}catch(t){d(e,t)}}}storeEndToEndDeviceData(e,t){t.objectStore("device_data").put(e,"-")}storeEndToEndRoom(e,t,n){n.objectStore("rooms").put(t,e)}getEndToEndRooms(e,t){const n={},r=e.objectStore("rooms").openCursor();r.onsuccess=function(){const i=r.result;if(i)n[i.key]=i.value,i.continue();else try{t(n)}catch(t){d(e,t)}}}getSessionsNeedingBackup(e){return new Promise(((t,n)=>{const r=[],i=this.db.transaction(["sessions_needing_backup","inbound_group_sessions"],"readonly");i.onerror=n,i.oncomplete=function(){t(r)};const o=i.objectStore("sessions_needing_backup"),a=i.objectStore("inbound_group_sessions"),s=o.openCursor();s.onsuccess=function(){const t=s.result;if(t){const n=a.get(t.key);n.onsuccess=function(){r.push({senderKey:n.result.senderCurve25519Key,sessionId:n.result.sessionId,sessionData:n.result.session})},(!e||r.length<e)&&t.continue()}}}))}countSessionsNeedingBackup(e){e||(e=this.db.transaction("sessions_needing_backup","readonly"));const t=e.objectStore("sessions_needing_backup");return new Promise(((e,n)=>{const r=t.count();r.onerror=n,r.onsuccess=()=>e(r.result)}))}async unmarkSessionsNeedingBackup(e,t){t||(t=this.db.transaction("sessions_needing_backup","readwrite"));const n=t.objectStore("sessions_needing_backup");await Promise.all(e.map((e=>new Promise(((t,r)=>{const i=n.delete([e.senderKey,e.sessionId]);i.onsuccess=t,i.onerror=r})))))}async markSessionsNeedingBackup(e,t){t||(t=this.db.transaction("sessions_needing_backup","readwrite"));const n=t.objectStore("sessions_needing_backup");await Promise.all(e.map((e=>new Promise(((t,r)=>{const i=n.put({senderCurve25519Key:e.senderKey,sessionId:e.sessionId});i.onsuccess=t,i.onerror=r})))))}addSharedHistoryInboundGroupSession(e,t,n,r){r||(r=this.db.transaction("shared_history_inbound_group_sessions","readwrite"));const i=r.objectStore("shared_history_inbound_group_sessions"),o=i.get([e]);o.onsuccess=()=>{const{sessions:r}=o.result||{sessions:[]};r.push([t,n]),i.put({roomId:e,sessions:r})}}getSharedHistoryInboundGroupSessions(e,t){t||(t=this.db.transaction("shared_history_inbound_group_sessions","readonly"));const n=t.objectStore("shared_history_inbound_group_sessions").get([e]);return new Promise(((e,t)=>{n.onsuccess=()=>{const{sessions:t}=n.result||{sessions:[]};e(t)},n.onerror=t}))}addParkedSharedHistory(e,t,n){n||(n=this.db.transaction("parked_shared_history","readwrite"));const r=n.objectStore("parked_shared_history"),i=r.get([e]);i.onsuccess=()=>{const{parked:n}=i.result||{parked:[]};n.push(t),r.put({roomId:e,parked:n})}}takeParkedSharedHistory(e,t){t||(t=this.db.transaction("parked_shared_history","readwrite"));const n=t.objectStore("parked_shared_history").openCursor(e);return new Promise(((e,t)=>{n.onsuccess=()=>{const t=n.result;if(!t)return void e([]);const r=t.value;t.delete(),e(r)},n.onerror=t}))}doTxn(e,t,n){arguments.length>3&&void 0!==arguments[3]||o.a;const r=this.db.transaction(t,e),i=h(r),a=n(r);return i.then((()=>a))}}const l=[e=>{!function(e){const t=e.createObjectStore("outgoingRoomKeyRequests",{keyPath:"requestId"});t.createIndex("session",["requestBody.room_id","requestBody.session_id"]),t.createIndex("state","state")}(e)},e=>{e.createObjectStore("account")},e=>{e.createObjectStore("sessions",{keyPath:["deviceKey","sessionId"]}).createIndex("deviceKey","deviceKey")},e=>{e.createObjectStore("inbound_group_sessions",{keyPath:["senderCurve25519Key","sessionId"]})},e=>{e.createObjectStore("device_data")},e=>{e.createObjectStore("rooms")},e=>{e.createObjectStore("sessions_needing_backup",{keyPath:["senderCurve25519Key","sessionId"]})},e=>{e.createObjectStore("inbound_group_sessions_withheld",{keyPath:["senderCurve25519Key","sessionId"]})},e=>{e.createObjectStore("session_problems",{keyPath:["deviceKey","time"]}).createIndex("deviceKey","deviceKey"),e.createObjectStore("notified_error_devices",{keyPath:["userId","deviceId"]})},e=>{e.createObjectStore("shared_history_inbound_group_sessions",{keyPath:["roomId"]})},e=>{e.createObjectStore("parked_shared_history",{keyPath:["roomId"]})}],c=l.length;function u(e,t){o.a.log(`Upgrading IndexedDBCryptoStore from version ${t} to ${c}`),l.forEach(((n,r)=>{t<=r&&n(e)}))}function d(e,t){e._mx_abortexception=t;try{e.abort()}catch(t){}}function h(e){return new Promise(((t,n)=>{e.oncomplete=()=>{void 0!==e._mx_abortexception&&n(e._mx_abortexception),t(null)},e.onerror=t=>{void 0!==e._mx_abortexception?n(e._mx_abortexception):(o.a.log("Error performing indexeddb txn",t),n(e.error))},e.onabort=t=>{void 0!==e._mx_abortexception?n(e._mx_abortexception):(o.a.log("Error performing indexeddb txn",t),n(e.error))}}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(13),i=n.n(r),o=n(1),a=n(358),s=n(360),l=n(199),c=n(225),u=n(16),d=n(158),h=n(174);let p;!function(e){e[e.NotTracked=0]="NotTracked",e[e.PendingDownload=1]="PendingDownload",e[e.DownloadInProgress=2]="DownloadInProgress",e[e.UpToDate=3]="UpToDate"}(p||(p={}));class m extends d.b{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:250;super(),this.cryptoStore=t,this.keyDownloadChunkSize=r,i()(this,"devices",{}),i()(this,"crossSigningInfo",{}),i()(this,"userByIdentityKey",{}),i()(this,"deviceTrackingStatus",{}),i()(this,"syncToken",null),i()(this,"keyDownloadsInProgressByUser",new Map),i()(this,"dirty",!1),i()(this,"savePromise",null),i()(this,"resolveSavePromise",null),i()(this,"savePromiseTime",null),i()(this,"saveTimer",null),i()(this,"hasFetched",null),i()(this,"serialiser",void 0),this.serialiser=new g(e,n,this)}async load(){await this.cryptoStore.doTxn("readonly",[c.a.STORE_DEVICE_DATA],(e=>{this.cryptoStore.getEndToEndDeviceData(e,(e=>{var t;this.hasFetched=Boolean(e&&e.devices),this.devices=e?e.devices:{},this.crossSigningInfo=e&&e.crossSigningInfo||{},this.deviceTrackingStatus=e?e.trackingStatus:{},this.syncToken=null!==(t=null==e?void 0:e.syncToken)&&void 0!==t?t:null,this.userByIdentityKey={};for(const e of Object.keys(this.devices)){const t=this.devices[e];for(const n of Object.keys(t)){const r=t[n].keys["curve25519:"+n];void 0!==r&&(this.userByIdentityKey[r]=e)}}}))}));for(const e of Object.keys(this.deviceTrackingStatus))this.deviceTrackingStatus[e]==p.DownloadInProgress&&(this.deviceTrackingStatus[e]=p.PendingDownload)}stop(){null!==this.saveTimer&&clearTimeout(this.saveTimer)}async saveIfDirty(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500;if(!this.dirty)return Promise.resolve(!1);const t=Date.now()+e;this.savePromiseTime&&t<this.savePromiseTime&&(clearTimeout(this.saveTimer),this.saveTimer=null,this.savePromiseTime=null);let n=this.savePromise;if(null===n&&(n=new Promise((e=>{this.resolveSavePromise=e})),this.savePromise=n),null===this.saveTimer){const n=this.resolveSavePromise;this.savePromiseTime=t,this.saveTimer=setTimeout((()=>{o.a.log("Saving device tracking data",this.syncToken),this.savePromiseTime=null,this.saveTimer=null,this.savePromise=null,this.resolveSavePromise=null,this.cryptoStore.doTxn("readwrite",[c.a.STORE_DEVICE_DATA],(e=>{var t;this.cryptoStore.storeEndToEndDeviceData({devices:this.devices,crossSigningInfo:this.crossSigningInfo,trackingStatus:this.deviceTrackingStatus,syncToken:null!==(t=this.syncToken)&&void 0!==t?t:void 0},e)})).then((()=>{this.dirty=!1,null==n||n(!0)}),(e=>{o.a.error("Failed to save device tracking data",this.syncToken),o.a.error(e)}))}),e)}return n}getSyncToken(){return this.syncToken}setSyncToken(e){this.syncToken=e}downloadKeys(e,t){const n=[],r=[];if(e.forEach((e=>{const i=this.deviceTrackingStatus[e];this.keyDownloadsInProgressByUser.has(e)?(o.a.log(`downloadKeys: already have a download in progress for ${e}: awaiting its result`),r.push(this.keyDownloadsInProgressByUser.get(e))):(t||i!=p.UpToDate)&&n.push(e)})),0!=n.length){o.a.log("downloadKeys: downloading for",n);const e=this.doKeyDownload(n);r.push(e)}return 0===r.length&&o.a.log("downloadKeys: already have all necessary keys"),Promise.all(r).then((()=>this.getDevicesFromStore(e)))}getDevicesFromStore(e){const t=new Map;return e.forEach((e=>{var n;const r=new Map;null===(n=this.getStoredDevicesForUser(e))||void 0===n||n.forEach((function(e){r.set(e.deviceId,e)})),t.set(e,r)})),t}getKnownUserIds(){return Object.keys(this.devices)}getStoredDevicesForUser(e){const t=this.devices[e];if(!t)return null;const n=[];for(const e in t)t.hasOwnProperty(e)&&n.push(a.a.fromStorage(t[e],e));return n}getRawStoredDevicesForUser(e){return this.devices[e]}getStoredCrossSigningForUser(e){return this.crossSigningInfo[e]?s.a.fromStorage(this.crossSigningInfo[e],e):null}storeCrossSigningForUser(e,t){this.crossSigningInfo[e]=t,this.dirty=!0}getStoredDevice(e,t){const n=this.devices[e];if(null!=n&&n[t])return a.a.fromStorage(n[t],t)}getUserByIdentityKey(e,t){return e!==l.OLM_ALGORITHM&&e!==l.MEGOLM_ALGORITHM?null:this.userByIdentityKey[t]}getDeviceByIdentityKey(e,t){const n=this.getUserByIdentityKey(e,t);if(!n)return null;const r=this.devices[n];if(!r)return null;for(const e in r){if(!r.hasOwnProperty(e))continue;const n=r[e];for(const r in n.keys){if(!n.keys.hasOwnProperty(r))continue;if(0!==r.indexOf("curve25519:"))continue;if(n.keys[r]==t)return a.a.fromStorage(n,e)}}return null}storeDevicesForUser(e,t){this.setRawStoredDevicesForUser(e,t),this.dirty=!0}startTrackingDeviceList(e){if("string"!=typeof e)throw new Error("userId must be a string; was "+e);this.deviceTrackingStatus[e]||(o.a.log("Now tracking device list for "+e),this.deviceTrackingStatus[e]=p.PendingDownload,this.dirty=!0)}stopTrackingDeviceList(e){this.deviceTrackingStatus[e]&&(o.a.log("No longer tracking device list for "+e),this.deviceTrackingStatus[e]=p.NotTracked,this.dirty=!0)}stopTrackingAllDeviceLists(){for(const e of Object.keys(this.deviceTrackingStatus))this.deviceTrackingStatus[e]=p.NotTracked;this.dirty=!0}invalidateUserDeviceList(e){this.deviceTrackingStatus[e]&&(o.a.log("Marking device list outdated for",e),this.deviceTrackingStatus[e]=p.PendingDownload,this.dirty=!0)}refreshOutdatedDeviceLists(){this.saveIfDirty();const e=[];for(const t of Object.keys(this.deviceTrackingStatus)){this.deviceTrackingStatus[t]==p.PendingDownload&&e.push(t)}return this.doKeyDownload(e)}setRawStoredDevicesForUser(e,t){if(void 0!==this.devices[e])for(const[t,n]of Object.entries(this.devices[e])){const e=n.keys["curve25519:"+t];delete this.userByIdentityKey[e]}this.devices[e]=t;for(const[n,r]of Object.entries(t)){const t=r.keys["curve25519:"+n];this.userByIdentityKey[t]=e}}setRawStoredCrossSigningForUser(e,t){this.crossSigningInfo[e]=t}doKeyDownload(e){if(0===e.length)return Promise.resolve();const t=this.serialiser.updateDevicesForUsers(e,this.syncToken).then((()=>{n(!0)}),(t=>{throw o.a.error("Error downloading keys for "+e+":",t),n(!1),t}));e.forEach((e=>{this.keyDownloadsInProgressByUser.set(e,t);this.deviceTrackingStatus[e]==p.PendingDownload&&(this.deviceTrackingStatus[e]=p.DownloadInProgress)}));const n=n=>{this.emit(h.b.WillUpdateDevices,e,!this.hasFetched),e.forEach((e=>{if(this.dirty=!0,this.keyDownloadsInProgressByUser.get(e)!==t)return void o.a.log("Another update in the queue for",e,"- not marking up-to-date");this.keyDownloadsInProgressByUser.delete(e);this.deviceTrackingStatus[e]==p.DownloadInProgress&&(n?(this.deviceTrackingStatus[e]=p.UpToDate,o.a.log("Device list for",e,"now up to date")):this.deviceTrackingStatus[e]=p.PendingDownload)})),this.saveIfDirty(),this.emit(h.b.DevicesUpdated,e,!this.hasFetched),this.hasFetched=!0};return t}}class g{constructor(e,t,n){this.baseApis=e,this.olmDevice=t,this.deviceList=n,i()(this,"downloadInProgress",!1),i()(this,"keyDownloadsQueuedByUser",{}),i()(this,"queuedQueryDeferred",void 0),i()(this,"syncToken",void 0)}updateDevicesForUsers(e,t){return e.forEach((e=>{this.keyDownloadsQueuedByUser[e]=!0})),this.queuedQueryDeferred||(this.queuedQueryDeferred=Object(u.m)()),this.syncToken=t,this.downloadInProgress?(o.a.log("Queued key download for",e),this.queuedQueryDeferred.promise):this.doQueuedQueries()}doQueuedQueries(){if(this.downloadInProgress)throw new Error("DeviceListUpdateSerialiser.doQueuedQueries called with request active");const e=Object.keys(this.keyDownloadsQueuedByUser);this.keyDownloadsQueuedByUser={};const t=this.queuedQueryDeferred;this.queuedQueryDeferred=void 0,o.a.log("Starting key download for",e),this.downloadInProgress=!0;const n={};this.syncToken&&(n.token=this.syncToken);const r=[];for(let t=0;t<e.length;t+=this.deviceList.keyDownloadChunkSize){const i=e.slice(t,t+this.deviceList.keyDownloadChunkSize);r.push((()=>this.baseApis.downloadKeysForUsers(i,n)))}return Object(u.g)(r,3).then((async t=>{const n=Object.assign({},...t.map((e=>e.device_keys||{}))),r=Object.assign({},...t.map((e=>e.master_keys||{}))),i=Object.assign({},...t.map((e=>e.self_signing_keys||{}))),a=Object.assign({},...t.map((e=>e.user_signing_keys||{})));for(const t of e){await Object(u.N)(5);try{await this.processQueryResponseForUser(t,n[t],{master:null==r?void 0:r[t],self_signing:null==i?void 0:i[t],user_signing:null==a?void 0:a[t]})}catch(e){o.a.error(`Error processing keys for ${t}:`,e)}}})).then((()=>{o.a.log("Completed key download for "+e),this.downloadInProgress=!1,null==t||t.resolve(),this.queuedQueryDeferred&&this.doQueuedQueries()}),(n=>{o.a.warn("Error downloading keys for "+e+":",n),this.downloadInProgress=!1,null==t||t.reject(n)})),t.promise}async processQueryResponseForUser(e,t,n){o.a.log("got device keys for "+e+":",t),o.a.log("got cross-signing keys for "+e+":",n);{const n={},r=this.deviceList.getRawStoredDevicesForUser(e);r&&Object.keys(r).forEach((e=>{const t=a.a.fromStorage(r[e],e);n[e]=t})),await async function(e,t,n,r,i,a){let s=!1;for(const e in n)if(n.hasOwnProperty(e)&&!(e in r)){if(t===i&&e===a){o.a.warn(`Local device ${e} missing from sync, skipping removal`);continue}o.a.log("Device "+t+":"+e+" has been removed"),delete n[e],s=!0}for(const i in r){if(!r.hasOwnProperty(i))continue;const a=r[i];a.user_id===t?a.device_id===i?await f(e,n,a)&&(s=!0):o.a.warn("Mismatched device_id "+a.device_id+" in keys from "+t+":"+i):o.a.warn("Mismatched user_id "+a.user_id+" in keys from "+t+":"+i)}return s}(this.olmDevice,e,n,t||{},this.baseApis.getUserId(),this.baseApis.deviceId);const i={};Object.keys(n).forEach((e=>{i[e]=n[e].toStorage()})),this.deviceList.setRawStoredDevicesForUser(e,i)}if(n&&(n.master||n.self_signing||n.user_signing)){const t=this.deviceList.getStoredCrossSigningForUser(e)||new s.a(e);t.setKeys(n),this.deviceList.setRawStoredCrossSigningForUser(e,t.toStorage()),this.deviceList.emit(h.b.UserCrossSigningUpdated,e)}}}async function f(e,t,n){if(!n.keys)return!1;const r=n.device_id,i=n.user_id,s="ed25519:"+r,c=n.keys[s];if(!c)return o.a.warn("Device "+i+":"+r+" has no ed25519 key"),!1;const u=n.unsigned||{},d=n.signatures||{};try{await l.verifySignature(e,n,i,r,c)}catch(e){return o.a.warn("Unable to verify signature on device "+i+":"+r+":"+e),!1}let h;if(r in t){if(h=t[r],h.getFingerprint()!=c)return o.a.warn("Ed25519 key for device "+i+":"+r+" has changed"),!1}else t[r]=h=new a.a(r);return h.keys=n.keys||{},h.algorithms=n.algorithms||[],h.unsigned=u,h.signatures=d,!0}},function(e,t){},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(13),i=n.n(r),o=n(1),a=n(143),s=n(360),l=n(225),c=n(193),u=n(147),d=n(158);class h{constructor(e,t){i()(this,"accountDataClientAdapter",void 0),i()(this,"crossSigningCallbacks",void 0),i()(this,"ssssCryptoCallbacks",void 0),i()(this,"crossSigningKeys",void 0),i()(this,"keySignatures",void 0),i()(this,"keyBackupInfo",void 0),i()(this,"sessionBackupPrivateKey",void 0),this.accountDataClientAdapter=new m(e),this.crossSigningCallbacks=new g,this.ssssCryptoCallbacks=new f(t)}addCrossSigningKeys(e,t){this.crossSigningKeys={authUpload:e,keys:t}}addSessionBackup(e){this.keyBackupInfo=e}addSessionBackupPrivateKeyToCache(e){this.sessionBackupPrivateKey=e}addKeySignature(e,t,n){this.keySignatures||(this.keySignatures={});const r=this.keySignatures[e]||{};this.keySignatures[e]=r,r[t]=n}async setAccountData(e,t){await this.accountDataClientAdapter.setAccountData(e,t)}buildOperation(){const e=this.accountDataClientAdapter.values;return new p(e,this.crossSigningKeys,this.keyBackupInfo,this.keySignatures)}async persist(e){if(this.crossSigningKeys){const n=Object(s.d)(e.cryptoStore,e.olmDevice);for(const e of["master","self_signing","user_signing"]){var t;o.a.log(`Cache ${e} cross-signing private key locally`);const r=this.crossSigningCallbacks.privateKeys.get(e);await(null===(t=n.storeCrossSigningKeyCache)||void 0===t?void 0:t.call(n,e,r))}await e.cryptoStore.doTxn("readwrite",[l.a.STORE_ACCOUNT],(t=>{e.cryptoStore.storeCrossSigningKeys(t,this.crossSigningKeys.keys)}))}this.sessionBackupPrivateKey&&await e.storeSessionBackupPrivateKey(this.sessionBackupPrivateKey)}}class p{constructor(e,t,n,r){this.accountData=e,this.crossSigningKeys=t,this.keyBackupInfo=n,this.keySignatures=r}async apply(e){const t=e.baseApis;if(this.crossSigningKeys){var n,r;const i={};for(const[e,t]of Object.entries(this.crossSigningKeys.keys))i[e+"_key"]=t;await(null===(n=(r=this.crossSigningKeys).authUpload)||void 0===n?void 0:n.call(r,(e=>t.uploadDeviceSigningKeys(e,i)))),e.crossSigningInfo.setKeys(this.crossSigningKeys.keys)}if(this.accountData)for(const[e,n]of this.accountData)await t.setAccountData(e,n);this.keySignatures&&await t.uploadKeySignatures(this.keySignatures),this.keyBackupInfo&&(this.keyBackupInfo.version?await t.http.authedRequest(c.i.Put,"/room_keys/version/"+this.keyBackupInfo.version,void 0,{algorithm:this.keyBackupInfo.algorithm,auth_data:this.keyBackupInfo.auth_data},{prefix:c.a.V3}):await t.http.authedRequest(c.i.Post,"/room_keys/version",void 0,this.keyBackupInfo,{prefix:c.a.V3}))}}class m extends d.b{constructor(e){super(),this.existingValues=e,i()(this,"values",new Map)}getAccountDataFromServer(e){return Promise.resolve(this.getAccountData(e))}getAccountData(e){const t=this.values.get(e);if(t)return t;const n=this.existingValues.get(e);return n?n.getContent():null}setAccountData(e,t){const n=this.values.get(e);return this.values.set(e,t),Promise.resolve().then((()=>{const r=new a.b({type:e,content:t});return this.emit(u.b.AccountData,r,n),{}}))}}class g{constructor(){i()(this,"privateKeys",new Map)}getCrossSigningKeyCache(e,t){return this.getCrossSigningKey(e,t)}storeCrossSigningKeyCache(e,t){return this.privateKeys.set(e,t),Promise.resolve()}getCrossSigningKey(e,t){var n;return Promise.resolve(null!==(n=this.privateKeys.get(e))&&void 0!==n?n:null)}saveCrossSigningKeys(e){for(const[t,n]of Object.entries(e))this.privateKeys.set(t,n)}}class f{constructor(e){this.delegateCryptoCallbacks=e,i()(this,"privateKeys",new Map)}async getSecretStorageKey(e,t){var n;let{keys:r}=e;for(const e of Object.keys(r)){const t=this.privateKeys.get(e);if(t)return[e,t]}if(null!=this&&null!==(n=this.delegateCryptoCallbacks)&&void 0!==n&&n.getSecretStorageKey){const e=await this.delegateCryptoCallbacks.getSecretStorageKey({keys:r},t);if(e){const[t,n]=e;this.privateKeys.set(t,n)}return e}return null}addPrivateKey(e,t,n){var r,i;this.privateKeys.set(e,n),null===(r=this.delegateCryptoCallbacks)||void 0===r||null===(i=r.cacheSecretStorageKey)||void 0===i||i.call(r,e,t,n)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return m}));var r=n(13),i=n.n(r),o=n(359),a=n(1),s=n(199),l=n(223),c=n(322),u=n(147),d=n(16),h=n(129);const p="m.secret_storage.v1.aes-hmac-sha2";class m{constructor(e,t,n){this.accountDataAdapter=e,this.cryptoCallbacks=t,this.baseApis=n,i()(this,"requests",new Map)}async getDefaultKeyId(){const e=await this.accountDataAdapter.getAccountDataFromServer("m.secret_storage.default_key");return e?e.key:null}setDefaultKeyId(e){return new Promise(((t,n)=>{const r=n=>{"m.secret_storage.default_key"===n.getType()&&n.getContent().key===e&&(this.accountDataAdapter.removeListener(u.b.AccountData,r),t())};this.accountDataAdapter.on(u.b.AccountData,r),this.accountDataAdapter.setAccountData("m.secret_storage.default_key",{key:e}).catch((e=>{this.accountDataAdapter.removeListener(u.b.AccountData,r),n(e)}))}))}async addKey(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r={algorithm:e};if(t.name&&(r.name=t.name),e!==p)throw new Error(`Unknown key algorithm ${e}`);if(t.passphrase&&(r.passphrase=t.passphrase),t.key){const{iv:e,mac:n}=await Object(c.a)(t.key);r.iv=e,r.mac=n}if(!n)do{n=Object(l.b)(32)}while(await this.accountDataAdapter.getAccountDataFromServer(`m.secret_storage.key.${n}`));return await this.accountDataAdapter.setAccountData(`m.secret_storage.key.${n}`,r),{keyId:n,keyInfo:r}}async getKey(e){if(e||(e=await this.getDefaultKeyId()),!e)return null;const t=await this.accountDataAdapter.getAccountDataFromServer("m.secret_storage.key."+e);return t?[e,t]:null}async hasKey(e){return Boolean(await this.getKey(e))}async checkKey(e,t){if(t.algorithm===p){if(t.mac){const{mac:n}=await Object(c.a)(e,t.iv);return t.mac.replace(/=+$/g,"")===n.replace(/=+$/g,"")}return!0}throw new Error("Unknown algorithm")}async store(e,t,n){const r={};if(!n){const e=await this.getDefaultKeyId();if(!e)throw new Error("No keys specified and no default key present");n=[e]}if(0===n.length)throw new Error("Zero keys given to encrypt with!");for(const i of n){const n=await this.accountDataAdapter.getAccountDataFromServer("m.secret_storage.key."+i);if(!n)throw new Error("Unknown key: "+i);if(n.algorithm===p){const o={[i]:n},[,a]=await this.getSecretStorageKey(o,e);r[i]=await a.encrypt(t)}else a.a.warn("unknown algorithm for secret storage key "+i+": "+n.algorithm)}await this.accountDataAdapter.setAccountData(e,{encrypted:r})}async get(e){const t=await this.accountDataAdapter.getAccountDataFromServer(e);if(!t)return;if(!t.encrypted)throw new Error("Content is not encrypted!");const n={};for(const e of Object.keys(t.encrypted)){const r=await this.accountDataAdapter.getAccountDataFromServer("m.secret_storage.key."+e),i=t.encrypted[e];r.algorithm===p&&i.iv&&i.ciphertext&&i.mac&&(n[e]=r)}if(0===Object.keys(n).length)throw new Error(`Could not decrypt ${e} because none of the keys it is encrypted with are for a supported algorithm`);const[r,i]=await this.getSecretStorageKey(n,e),o=t.encrypted[r];return i.decrypt(o)}async isStored(e){const t=await this.accountDataAdapter.getAccountDataFromServer(e);if(null==t||!t.encrypted)return null;const n={};for(const e of Object.keys(t.encrypted)){const r=await this.accountDataAdapter.getAccountDataFromServer("m.secret_storage.key."+e);if(!r)continue;const i=t.encrypted[e];r.algorithm===p&&i.iv&&i.ciphertext&&i.mac&&(n[e]=r)}return Object.keys(n).length?n:null}request(e,t){const n=this.baseApis.makeTxnId(),r=Object(d.m)();this.requests.set(n,{name:e,devices:t,deferred:r});const i={name:e,action:"request",requesting_device_id:this.baseApis.deviceId,request_id:n,[h.k]:Object(o.v4)()},s=new Map;for(const e of t)s.set(e,i);return a.a.info(`Request secret ${e} from ${t}, id ${n}`),this.baseApis.sendToDevice("m.secret.request",new Map([[this.baseApis.getUserId(),s]])),{requestId:n,promise:r.promise,cancel:e=>{const i={action:"request_cancellation",requesting_device_id:this.baseApis.deviceId,request_id:n},o=new Map;for(const e of t)o.set(e,i);this.baseApis.sendToDevice("m.secret.request",new Map([[this.baseApis.getUserId(),o]])),r.reject(new Error(e||"Cancelled"))}}}async onRequestReceived(e){const t=e.getSender(),n=e.getContent();if(t!==this.baseApis.getUserId()||!(n.name&&n.action&&n.requesting_device_id&&n.request_id))return;const r=n.requesting_device_id;if("request_cancellation"===n.action);else if("request"===n.action){if(r===this.baseApis.deviceId)return;if(a.a.info("received request for secret ("+t+", "+r+", "+n.request_id+")"),!this.cryptoCallbacks.onSecretRequested)return;const e=await this.cryptoCallbacks.onSecretRequested(t,r,n.request_id,n.name,this.baseApis.checkDeviceTrust(t,r));if(e){a.a.info(`Preparing ${n.name} secret for ${r}`);const i={type:"m.secret.send",content:{request_id:n.request_id,secret:e}},l={algorithm:s.OLM_ALGORITHM,sender_key:this.baseApis.crypto.olmDevice.deviceCurve25519Key,ciphertext:{},[h.k]:Object(o.v4)()};await s.ensureOlmSessionsForDevices(this.baseApis.crypto.olmDevice,this.baseApis,new Map([[t,[this.baseApis.getStoredDevice(t,r)]]])),await s.encryptMessageForDevice(l.ciphertext,this.baseApis.getUserId(),this.baseApis.deviceId,this.baseApis.crypto.olmDevice,t,this.baseApis.getStoredDevice(t,r),i);const c=new Map([[t,new Map([[r,l]])]]);a.a.info(`Sending ${n.name} secret for ${r}`),this.baseApis.sendToDevice("m.room.encrypted",c)}else a.a.info(`Request denied for ${n.name} secret for ${r}`)}}onSecretReceived(e){if(e.getSender()!==this.baseApis.getUserId())return;if(!s.isOlmEncrypted(e))return void a.a.error("secret event not properly encrypted");const t=e.getContent();if(this.baseApis.crypto.deviceList.getUserByIdentityKey(s.OLM_ALGORITHM,e.getSenderKey()||"")!==e.getSender())return void a.a.error("sending device does not belong to the user it claims to be from");a.a.log("got secret share for request",t.request_id);const n=this.requests.get(t.request_id);if(n){const r=this.baseApis.crypto.deviceList.getDeviceByIdentityKey(s.OLM_ALGORITHM,e.getSenderKey());if(!r)return void a.a.log("secret share from unknown device with key",e.getSenderKey());if(!n.devices.includes(r.deviceId))return void a.a.log("unsolicited secret share from device",r.deviceId);if(!this.baseApis.crypto.checkDeviceInfoTrust(e.getSender(),r).isVerified())return void a.a.log("secret share from unverified device");a.a.log(`Successfully received secret ${n.name} from ${r.deviceId}`),n.deferred.resolve(t.secret)}}async getSecretStorageKey(e,t){if(!this.cryptoCallbacks.getSecretStorageKey)throw new Error("No getSecretStorageKey callback supplied");const n=await this.cryptoCallbacks.getSecretStorageKey({keys:e},t);if(!n)throw new Error("getSecretStorageKey callback returned falsey");if(n.length<2)throw new Error("getSecretStorageKey callback returned invalid data");const[r,i]=n;if(!e[r])throw new Error("App returned unknown key from getSecretStorageKey!");if(e[r].algorithm===p){return[r,{encrypt:function(e){return Object(c.c)(e,i,t)},decrypt:function(e){return Object(c.b)(e,i,t)}}]}throw new Error("Unknown key type: "+e[r].algorithm)}}},function(e,t,n){const r=n(983);e.exports=r("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},function(e,t,n){"use strict";e.exports=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),n=0;n<t.length;n++)t[n]=255;for(var r=0;r<e.length;r++){var i=e.charAt(r),o=i.charCodeAt(0);if(255!==t[o])throw new TypeError(i+" is ambiguous");t[o]=r}var a=e.length,s=e.charAt(0),l=Math.log(a)/Math.log(256),c=Math.log(256)/Math.log(a);function u(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;for(var n=0,r=0,i=0;e[n]===s;)r++,n++;for(var o=(e.length-n)*l+1>>>0,c=new Uint8Array(o);e[n];){var u=t[e.charCodeAt(n)];if(255===u)return;for(var d=0,h=o-1;(0!==u||d<i)&&-1!==h;h--,d++)u+=a*c[h]>>>0,c[h]=u%256>>>0,u=u/256>>>0;if(0!==u)throw new Error("Non-zero carry");i=d,n++}for(var p=o-i;p!==o&&0===c[p];)p++;for(var m=new Uint8Array(r+(o-p)),g=r;p!==o;)m[g++]=c[p++];return m}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var n=0,r=0,i=0,o=t.length;i!==o&&0===t[i];)i++,n++;for(var l=(o-i)*c+1>>>0,u=new Uint8Array(l);i!==o;){for(var d=t[i],h=0,p=l-1;(0!==d||h<r)&&-1!==p;p--,h++)d+=256*u[p]>>>0,u[p]=d%a>>>0,d=d/a>>>0;if(0!==d)throw new Error("Non-zero carry");r=h,i++}for(var m=l-r;m!==l&&0===u[m];)m++;for(var g=s.repeat(n);m<l;++m)g+=e.charAt(u[m]);return g},decodeUnsafe:u,decode:function(e){var t=u(e);if(t)return t;throw new Error("Non-base"+a+" character")}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d}));var r=n(13),i=n.n(r),o=n(239),a=n(1);const s=n(129).b.RoomMessage,l="m.reference",c="m.relates_to";class u{constructor(e,t,n){this.client=e,this.roomId=t,this.userId=n,i()(this,"requestEventId",void 0)}get receiveStartFromOtherDevices(){return!0}get transactionId(){return this.requestEventId}static getOtherPartyUserId(e,t){if(u.getEventType(e)!==o.i)return;const n=t.getUserId(),r=e.getSender(),i=e.getContent().to;return r===n?i:i===n?r:void 0}getTimestamp(e){return e.getTs()}static canCreateRequest(e){return e===o.i}canCreateRequest(e){return u.canCreateRequest(e)}static getTransactionId(e){if(u.getEventType(e)===o.i)return e.getId();{const t=e.getRelation();if((null==t?void 0:t.rel_type)===l)return t.event_id}}static validateEvent(e,t){const n=u.getTransactionId(e);if("string"!=typeof n||0===n.length)return!1;const r=u.getEventType(e),i=e.getContent();if(r===o.i){if(!i||"string"!=typeof i.to||!i.to.length)return a.a.log("InRoomChannel: validateEvent: no valid to "+(i&&i.to)),!1;if(!u.getOtherPartyUserId(e,t))return a.a.log(`InRoomChannel: validateEvent: not directed to or sent by me: ${e.getSender()}, ${i&&i.to}`),!1}return o.k.validateEvent(r,e,t)}static getEventType(e){const t=e.getType();if(t===s){const t=e.getContent();if(t){const{msgtype:e}=t;if(e===o.i)return o.i}}return t&&t!==o.i?t:""}async handleEvent(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t.hasEventId(e.getId()))return;const r=u.getEventType(e);if(e.getRoomId()!==this.roomId)return;if(!this.userId){const t=u.getOtherPartyUserId(e,this.client);t&&(this.userId=t)}const i=this.client.getUserId(),o=e.getSender();if(this.userId&&o!==i&&o!==this.userId)return void a.a.log(`InRoomChannel: ignoring verification event from non-participating sender ${o}`);this.requestEventId||(this.requestEventId=u.getTransactionId(e));const s=!!e.getUnsigned().transaction_id,l=e.getSender()===this.client.getUserId();return t.handleEvent(r,e,n,s,l)}completedContentFromEvent(e){const t=Object.assign({},e.getContent());return t[c]=e.getRelation(),t}completeContent(e,t){return t=Object.assign({},t),e!==o.i&&e!==o.h&&e!==o.j||(t.from_device=this.client.getDeviceId()),e===o.i?t={body:this.client.getUserId()+" is requesting to verify your key, but your client does not support in-chat key verification. You will need to use legacy key verification to verify keys.",msgtype:o.i,to:this.userId,from_device:t.from_device,methods:t.methods}:t[c]={rel_type:l,event_id:this.transactionId},t}send(e,t){const n=this.completeContent(e,t);return this.sendCompleted(e,n)}async sendCompleted(e,t){let n=e;e===o.i&&(n=s);const r=await this.client.sendEvent(this.roomId,n,t);e===o.i&&(this.requestEventId=r.event_id)}}class d{constructor(){i()(this,"requestsByRoomId",new Map)}getRequest(e){const t=e.getRoomId(),n=u.getTransactionId(e);return this.getRequestByTxnId(t,n)}getRequestByChannel(e){return this.getRequestByTxnId(e.roomId,e.transactionId)}getRequestByTxnId(e,t){const n=this.requestsByRoomId.get(e);if(n)return n.get(t)}setRequest(e,t){this.doSetRequest(e.getRoomId(),u.getTransactionId(e),t)}setRequestByChannel(e,t){this.doSetRequest(e.roomId,e.transactionId,t)}doSetRequest(e,t,n){let r=this.requestsByRoomId.get(e);r||(r=new Map,this.requestsByRoomId.set(e,r)),r.set(t,n)}removeRequest(e){const t=e.getRoomId(),n=this.requestsByRoomId.get(t);n&&(n.delete(u.getTransactionId(e)),0===n.size&&this.requestsByRoomId.delete(t))}findRequestInProgress(e){const t=this.requestsByRoomId.get(e);if(t)for(const e of t.values())if(e.pending)return e}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d}));var r=n(13),i=n.n(r),o=n(223),a=n(1),s=n(239),l=n(361),c=n(143);class u{constructor(e,t,n,r,o){this.client=e,this.userId=t,this.devices=n,this.transactionId=r,this.deviceId=o,i()(this,"request",void 0)}isToDevices(e){if(e.length===this.devices.length){for(const t of e)if(!this.devices.includes(t))return!1;return!0}return!1}static getEventType(e){return e.getType()}static getTransactionId(e){const t=e.getContent();return t&&t.transaction_id}static canCreateRequest(e){return e===s.i||e===s.j}canCreateRequest(e){return u.canCreateRequest(e)}static validateEvent(e,t){if(e.isCancelled())return a.a.warn("Ignoring flagged verification request from "+e.getSender()),!1;const n=e.getContent();if(!n)return a.a.warn("ToDeviceChannel.validateEvent: invalid: no content"),!1;if(!n.transaction_id)return a.a.warn("ToDeviceChannel.validateEvent: invalid: no transaction_id"),!1;const r=e.getType();if(r===s.i){if(!Number.isFinite(n.timestamp))return a.a.warn("ToDeviceChannel.validateEvent: invalid: no timestamp"),!1;if(e.getSender()===t.getUserId()&&n.from_device==t.getDeviceId())return a.a.warn("ToDeviceChannel.validateEvent: invalid: from own device"),!1}return s.k.validateEvent(r,e,t)}getTimestamp(e){const t=e.getContent();return t&&t.timestamp}async handleEvent(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=e.getType(),i=e.getContent();if(r===s.i||r===s.h||r===s.j){this.transactionId||(this.transactionId=i.transaction_id);const e=i.from_device;if(!this.deviceId&&this.devices.includes(e)&&(this.deviceId=e),!this.deviceId||this.deviceId!==e){const t=this.completeContent(s.a,Object(l.b)(Object(l.f)()));return this.sendToDevices(s.a,t,[e])}}const o=t.phase===s.e||t.phase===s.c;await t.handleEvent(e.getType(),e,n,!1,!1);const a=t.phase===s.e||t.phase===s.c;if((r===s.j||r===s.h)&&!o&&a&&this.deviceId){const e=this.devices.filter((e=>e!==this.deviceId&&e!==this.client.getDeviceId()));if(e.length){const t=this.completeContent(s.a,{code:"m.accepted",reason:"Verification request accepted by another device"});await this.sendToDevices(s.a,t,e)}}}completedContentFromEvent(e){return e.getContent()}completeContent(e,t){return t=Object.assign({},t),this.transactionId&&(t.transaction_id=this.transactionId),e!==s.i&&e!==s.h&&e!==s.j||(t.from_device=this.client.getDeviceId()),e===s.i&&(t.timestamp=Date.now()),t}send(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e!==s.i&&e!==s.j||this.transactionId||(this.transactionId=u.makeTransactionId());const n=this.completeContent(e,t);return this.sendCompleted(e,n)}async sendCompleted(e,t){let n;n=e===s.i||e===s.a&&!this.deviceId?await this.sendToDevices(e,t,this.devices):await this.sendToDevices(e,t,[this.deviceId]);const r=new c.b({sender:this.client.getUserId(),content:t,type:e});return await this.request.handleEvent(e,r,!0,!0,!0),n}async sendToDevices(e,t,n){if(n.length){const r=new Map;for(const e of n)r.set(e,t);await this.client.sendToDevice(e,new Map([[this.userId,r]]))}}static makeTransactionId(){return Object(o.b)(32)}}class d{constructor(){i()(this,"requestsByUserId",new Map)}getRequest(e){return this.getRequestBySenderAndTxnId(e.getSender(),u.getTransactionId(e))}getRequestByChannel(e){return this.getRequestBySenderAndTxnId(e.userId,e.transactionId)}getRequestBySenderAndTxnId(e,t){const n=this.requestsByUserId.get(e);if(n)return n.get(t)}setRequest(e,t){this.setRequestBySenderAndTxnId(e.getSender(),u.getTransactionId(e),t)}setRequestByChannel(e,t){this.setRequestBySenderAndTxnId(e.userId,e.transactionId,t)}setRequestBySenderAndTxnId(e,t,n){let r=this.requestsByUserId.get(e);r||(r=new Map,this.requestsByUserId.set(e,r)),r.set(t,n)}removeRequest(e){const t=e.getSender(),n=this.requestsByUserId.get(t);n&&(n.delete(u.getTransactionId(e)),0===n.size&&this.requestsByUserId.delete(t))}findRequestInProgress(e,t){const n=this.requestsByUserId.get(e);if(n)for(const e of n.values())if(e.pending&&e.channel.isToDevices(t))return e}getRequestsInProgress(e){const t=this.requestsByUserId.get(e);return t?Array.from(t.values()).filter((e=>e.pending)):[]}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(13),i=n.n(r),o=n(420);class a extends o.b{constructor(){super(...arguments),i()(this,"doVerification",(async()=>{throw new Error("Verification is not possible with this method")}))}static factory(e,t,n,r,i,o){return new a(e,t,n,r,i,o)}static get NAME(){return"org.matrix.illegal_method"}}},function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return r})),function(e){e.Master="master",e.SelfSigning="self_signing",e.UserSigning="user_signing"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(13),i=n.n(r),o=n(143),a=n(129);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t){let n=Boolean(t.preventReEmit);const r=!1!==t.decrypt;return function i(s){t.toDevice&&delete s.room_id;const c=e.getRoom(s.room_id);let u;c&&void 0===s.state_key&&(u=c.findEventById(s.event_id)),!u||u.status?u=new o.b(s):(u.setUnsigned(l(l({},u.getUnsigned()),s.unsigned)),n=!0);const d=u.getServerAggregatedRelation(a.h.Replace);if(null!=d&&d.content){const e=i(d);u.makeReplaced(e)}const h=null==c?void 0:c.findThreadForEvent(u);return h&&u.setThread(h),u.isEncrypted()&&(n||e.reEmitter.reEmit(u,[o.c.Decrypted]),r&&e.decryptEventIfNeeded(u)),n||(e.reEmitter.reEmit(u,[o.c.Replaced,o.c.VisibilityChange]),null==c||c.reEmitter.reEmit(u,[o.c.BeforeRedaction])),u}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(13),i=n.n(r),o=n(158),a=n(224),s=n(1);let l;!function(e){e.LocalStreamsChanged="local_streams_changed"}(l||(l={}));class c extends o.b{constructor(e){super(),this.client=e,i()(this,"audioInput",void 0),i()(this,"audioSettings",void 0),i()(this,"videoInput",void 0),i()(this,"localUserMediaStream",void 0),i()(this,"userMediaStreams",[]),i()(this,"screensharingStreams",[]),i()(this,"getMediaStreamPromise",void 0)}restoreMediaSettings(e,t){this.audioInput=e,this.videoInput=t}async setAudioInput(e){s.a.info(`MediaHandler setAudioInput() running (deviceId=${e})`),this.audioInput!==e&&(this.audioInput=e,await this.updateLocalUsermediaStreams())}async setAudioSettings(e){s.a.info(`MediaHandler setAudioSettings() running (opts=${JSON.stringify(e)})`),this.audioSettings=Object.assign({},e),await this.updateLocalUsermediaStreams()}async setVideoInput(e){s.a.info(`MediaHandler setVideoInput() running (deviceId=${e})`),this.videoInput!==e&&(this.videoInput=e,await this.updateLocalUsermediaStreams())}async setMediaInputs(e,t){s.a.log(`MediaHandler setMediaInputs() running (audioInput: ${e} videoInput: ${t})`),this.audioInput=e,this.videoInput=t,await this.updateLocalUsermediaStreams()}async updateLocalUsermediaStreams(){if(0===this.userMediaStreams.length)return;const e=new Map;for(const t of this.client.callEventHandler.calls.values())e.set(t.callId,{audio:t.hasLocalUserMediaAudioTrack,video:t.hasLocalUserMediaVideoTrack});for(const e of this.userMediaStreams){s.a.log(`MediaHandler updateLocalUsermediaStreams() stopping all tracks (streamId=${e.id})`);for(const t of e.getTracks())t.stop()}this.userMediaStreams=[],this.localUserMediaStream=void 0;for(const t of this.client.callEventHandler.calls.values()){if(t.callHasEnded()||!e.has(t.callId))continue;const{audio:n,video:r}=e.get(t.callId);s.a.log(`MediaHandler updateLocalUsermediaStreams() calling getUserMediaStream() (callId=${t.callId})`);const i=await this.getUserMediaStream(n,r);t.callHasEnded()||await t.updateLocalUsermediaStream(i)}for(const e of this.client.groupCallEventHandler.groupCalls.values()){if(!e.localCallFeed)continue;s.a.log(`MediaHandler updateLocalUsermediaStreams() calling getUserMediaStream() (groupCallId=${e.groupCallId})`);const t=await this.getUserMediaStream(!0,e.type===a.f.Video);e.state!==a.e.Ended&&await e.updateLocalUsermediaStream(t)}this.emit(l.LocalStreamsChanged)}async hasAudioDevice(){try{return(await navigator.mediaDevices.enumerateDevices()).filter((e=>"audioinput"===e.kind)).length>0}catch(e){return s.a.log("MediaHandler hasAudioDevice() calling navigator.mediaDevices.enumerateDevices with error",e),!1}}async hasVideoDevice(){try{return(await navigator.mediaDevices.enumerateDevices()).filter((e=>"videoinput"===e.kind)).length>0}catch(e){return s.a.log("MediaHandler hasVideoDevice() calling navigator.mediaDevices.enumerateDevices with error",e),!1}}async getUserMediaStream(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.getMediaStreamPromise?this.getMediaStreamPromise=this.getMediaStreamPromise.then((()=>this.getUserMediaStreamInternal(e,t,n))):this.getMediaStreamPromise=this.getUserMediaStreamInternal(e,t,n),this.getMediaStreamPromise}async getUserMediaStreamInternal(e,t,n){const r=e&&await this.hasAudioDevice(),i=t&&await this.hasVideoDevice();let o,a=!0;var c,u,d,h;this.localUserMediaStream?(r!==this.localUserMediaStream.getAudioTracks().length>0&&(a=!1),i!==this.localUserMediaStream.getVideoTracks().length>0&&(a=!1),r&&(null===(c=this.localUserMediaStream.getAudioTracks()[0])||void 0===c||null===(u=c.getSettings())||void 0===u?void 0:u.deviceId)!==this.audioInput&&(a=!1),i&&(null===(d=this.localUserMediaStream.getVideoTracks()[0])||void 0===d||null===(h=d.getSettings())||void 0===h?void 0:h.deviceId)!==this.videoInput&&(a=!1)):a=!1;if(a){var p;if(o=this.localUserMediaStream.clone(),s.a.log(`MediaHandler getUserMediaStreamInternal() cloning (oldStreamId=${null===(p=this.localUserMediaStream)||void 0===p?void 0:p.id} newStreamId=${o.id} shouldRequestAudio=${r} shouldRequestVideo=${i})`),!r)for(const e of o.getAudioTracks())o.removeTrack(e);if(!i)for(const e of o.getVideoTracks())o.removeTrack(e)}else{const e=this.getUserMediaContraints(r,i);o=await navigator.mediaDevices.getUserMedia(e),s.a.log(`MediaHandler getUserMediaStreamInternal() calling getUserMediaStream (streamId=${o.id}, shouldRequestAudio=${r}, shouldRequestVideo=${i}, constraints=${JSON.stringify(e)})`);for(const e of o.getTracks()){const t=e.getSettings();"audio"===e.kind?this.audioInput=t.deviceId:"video"===e.kind&&(this.videoInput=t.deviceId)}n&&(this.localUserMediaStream=o)}return n&&this.userMediaStreams.push(o),this.emit(l.LocalStreamsChanged),o}stopUserMediaStream(e){s.a.log(`MediaHandler stopUserMediaStream() stopping (streamId=${e.id})`);for(const t of e.getTracks())t.stop();const t=this.userMediaStreams.indexOf(e);-1!==t&&(s.a.debug(`MediaHandler stopUserMediaStream() splicing usermedia stream out stream array (streamId=${e.id})`,e.id),this.userMediaStreams.splice(t,1)),this.emit(l.LocalStreamsChanged),this.localUserMediaStream===e&&(this.localUserMediaStream=void 0)}async getScreensharingStream(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(0===this.screensharingStreams.length){const n=this.getScreenshareContraints(t);t.desktopCapturerSourceId?(s.a.debug(`MediaHandler getScreensharingStream() calling getUserMedia() (opts=${JSON.stringify(t)})`),e=await navigator.mediaDevices.getUserMedia(n)):(s.a.debug(`MediaHandler getScreensharingStream() calling getDisplayMedia() (opts=${JSON.stringify(t)})`),e=await navigator.mediaDevices.getDisplayMedia(n))}else{const t=this.screensharingStreams[this.screensharingStreams.length-1];s.a.log(`MediaHandler getScreensharingStream() cloning (streamId=${t.id})`),e=t.clone()}return n&&this.screensharingStreams.push(e),this.emit(l.LocalStreamsChanged),e}stopScreensharingStream(e){s.a.debug(`MediaHandler stopScreensharingStream() stopping stream (streamId=${e.id})`);for(const t of e.getTracks())t.stop();const t=this.screensharingStreams.indexOf(e);-1!==t&&(s.a.debug(`MediaHandler stopScreensharingStream() splicing stream out (streamId=${e.id})`),this.screensharingStreams.splice(t,1)),this.emit(l.LocalStreamsChanged)}stopAllStreams(){for(const e of this.userMediaStreams){s.a.log(`MediaHandler stopAllStreams() stopping (streamId=${e.id})`);for(const t of e.getTracks())t.stop()}for(const e of this.screensharingStreams)for(const t of e.getTracks())t.stop();this.userMediaStreams=[],this.screensharingStreams=[],this.localUserMediaStream=void 0,this.emit(l.LocalStreamsChanged)}getUserMediaContraints(e,t){const n=!!navigator.webkitGetUserMedia;return{audio:!!e&&{deviceId:this.audioInput?{ideal:this.audioInput}:void 0,autoGainControl:this.audioSettings?{ideal:this.audioSettings.autoGainControl}:void 0,echoCancellation:this.audioSettings?{ideal:this.audioSettings.echoCancellation}:void 0,noiseSuppression:this.audioSettings?{ideal:this.audioSettings.noiseSuppression}:void 0},video:!!t&&{deviceId:this.videoInput?{ideal:this.videoInput}:void 0,width:n?{exact:640}:{ideal:640},height:n?{exact:360}:{ideal:360}}}}getScreenshareContraints(e){const{desktopCapturerSourceId:t,audio:n}=e;return t?{audio:null!=n&&n,video:{mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:t}}}:{audio:null!=n&&n,video:!0}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(13),i=n.n(r),o=n(129),a=n(1),s=n(147),l=n(424),c=n(215),u=n(16);class d{constructor(e){this.client=e,i()(this,"sending",!1),i()(this,"running",!0),i()(this,"retryTimeout",null),i()(this,"retryAttempts",0),i()(this,"sendQueue",(async()=>{if(null!==this.retryTimeout&&clearTimeout(this.retryTimeout),this.retryTimeout=null,this.sending||!this.running)return;let e;a.a.debug("Attempting to send queued to-device messages"),this.sending=!0;try{for(;this.running&&(e=await this.client.store.getOldestToDeviceBatch(),null!==e);)await this.sendBatch(e),await this.client.store.removeToDeviceBatch(e.id),this.retryAttempts=0;if(!this.running)return;a.a.debug("All queued to-device messages sent")}catch(t){++this.retryAttempts;const n=l.a.RETRY_BACKOFF_RATELIMIT(null,this.retryAttempts,t);if(-1===n)return void(4===Math.floor(t.httpStatus/100)?(a.a.error("Fatal error when sending to-device message - dropping to-device batch!",t),await this.client.store.removeToDeviceBatch(e.id)):a.a.info("Automatic retry limit reached for to-device messages."));a.a.info(`Failed to send batch of to-device messages. Will retry in ${n}ms`,t),this.retryTimeout=setTimeout(this.sendQueue,n)}finally{this.sending=!1}})),i()(this,"onResumedSync",((e,t)=>{e===c.b.Syncing&&t!==c.b.Syncing&&(a.a.info("Resuming queue after resumed sync"),this.sendQueue())}))}start(){this.running=!0,this.sendQueue(),this.client.on(s.b.Sync,this.onResumedSync)}stop(){this.running=!1,null!==this.retryTimeout&&clearTimeout(this.retryTimeout),this.retryTimeout=null,this.client.removeListener(s.b.Sync,this.onResumedSync)}async queueBatch(e){const t=[];for(let n=0;n<e.batch.length;n+=20){const r={eventType:e.eventType,batch:e.batch.slice(n,n+20),txnId:this.client.makeTxnId()};t.push(r);const i=r.batch.map((e=>`${e.userId}/${e.deviceId} (msgid ${e.payload[o.k]})`));a.a.info(`Enqueuing batch of to-device messages. type=${e.eventType} txnid=${r.txnId}`,i)}await this.client.store.saveToDeviceBatches(t),this.sendQueue()}async sendBatch(e){const t=new u.b((()=>new Map));for(const n of e.batch)t.getOrCreate(n.userId).set(n.deviceId,n.payload);a.a.info(`Sending batch of ${e.batch.length} to-device messages with ID ${e.id} and txnId ${e.txnId}`),await this.client.sendToDevice(e.eventType,t,e.txnId)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(10),i=n(179),o=n(160),a=n(16);const s=new r.UnstableValue("m.policies","org.matrix.msc3847.policies"),l=new r.UnstableValue("m.ignore.invites","org.matrix.msc3847.ignore.invites");var c;let u;!function(e){e.Ban="m.ban"}(c||(c={})),function(e){e.User="m.policy.user",e.Room="m.policy.room",e.Server="m.policy.server"}(u||(u={}));class d{constructor(e){this.client=e}async addRule(e,t,n){const r=await this.getOrCreateTargetRoom();return(await this.client.sendStateEvent(r.roomId,e,{entity:t,reason:n,recommendation:c.Ban})).event_id}async removeRule(e){await this.client.redactEvent(e.getRoomId(),e.getId())}async addSource(e){await this.client.joinRoom(e);const t=(await this.getOrCreateSourceRooms()).map((e=>e.roomId));return!t.includes(e)&&(t.push(e),await this.withIgnoreInvitesPolicies((e=>{e.sources=t})),!0)}async getRuleForInvite(e){let{sender:t,roomId:n}=e;const r=await this.getOrCreateSourceRooms(),o=t.split(":")[1],s=n.split(":")[1];for(const e of r){const r=e.getUnfilteredTimelineSet().getLiveTimeline().getState(i.b.FORWARDS);for(const{scope:e,entities:i}of[{scope:u.Room,entities:[n]},{scope:u.User,entities:[t]},{scope:u.Server,entities:[o,s]}]){const t=r.getStateEvents(e);for(const e of t){const t=e.getContent();if((null==t?void 0:t.recommendation)!=c.Ban)continue;const n=null==t?void 0:t.entity;if(!n)continue;let r;try{r=new RegExp(Object(a.r)(n,!1))}catch(e){continue}for(const t of i)if(t&&r.test(t))return e}}}return null}async getOrCreateTargetRoom(){let e=this.getIgnoreInvitesPolicies().target;if("string"!=typeof e&&(e=null),e){const t=this.client.getRoom(e);if(t)return t;e=null}return e=(await this.client.createRoom({name:"Individual Policy Room",preset:o.d.PrivateChat})).room_id,await this.withIgnoreInvitesPolicies((t=>{t.target=e})),this.client.getRoom(e)}async getOrCreateSourceRooms(){let e=this.getIgnoreInvitesPolicies().sources,t=!1;Array.isArray(e)||(t=!0,e=[]);let n=e.filter((e=>"string"==typeof e)).map((e=>this.client.getRoom(e))).filter((e=>!!e));if(n.length!=e.length&&(t=!0),0==n.length){t=!0,n=[await this.getOrCreateTargetRoom()]}return t&&await this.withIgnoreInvitesPolicies((t=>{t.sources=e})),n}getIgnoreInvitesPolicies(){return this.getPoliciesAndIgnoreInvitesPolicies().ignoreInvitesPolicies}async withIgnoreInvitesPolicies(e){const{policies:t,ignoreInvitesPolicies:n}=this.getPoliciesAndIgnoreInvitesPolicies();e(n),t[l.name]=n,await this.client.setAccountData(s.name,t)}getPoliciesAndIgnoreInvitesPolicies(){let e={};for(const n of[s.name,s.altName]){var t;if(!n)continue;const r=null===(t=this.client.getAccountData(n))||void 0===t?void 0:t.getContent();if(r){e=r;break}}let n={},r=!1;for(const t of[l.name,l.altName]){if(!t)continue;const i=e[t];if(i&&"object"==typeof i){n=i,r=!0;break}}return r||(e[l.name]=n),{policies:e,ignoreInvitesPolicies:n}}}},function(e,t,n){e.exports.Dispatcher=n(993)},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i=n(253),o=function(){function e(){r(this,"_callbacks",void 0),r(this,"_isDispatching",void 0),r(this,"_isHandled",void 0),r(this,"_isPending",void 0),r(this,"_lastID",void 0),r(this,"_pendingPayload",void 0),this._callbacks={},this._isDispatching=!1,this._isHandled={},this._isPending={},this._lastID=1}var t=e.prototype;return t.register=function(e){var t="ID_"+this._lastID++;return this._callbacks[t]=e,t},t.unregister=function(e){this._callbacks[e]||i(!1),delete this._callbacks[e]},t.waitFor=function(e){this._isDispatching||i(!1);for(var t=0;t<e.length;t++){var n=e[t];this._isPending[n]?this._isHandled[n]||i(!1):(this._callbacks[n]||i(!1),this._invokeCallback(n))}},t.dispatch=function(e){this._isDispatching&&i(!1),this._startDispatching(e);try{for(var t in this._callbacks)this._isPending[t]||this._invokeCallback(t)}finally{this._stopDispatching()}},t.isDispatching=function(){return this._isDispatching},t._invokeCallback=function(e){this._isPending[e]=!0,this._callbacks[e](this._pendingPayload),this._isHandled[e]=!0},t._startDispatching=function(e){for(var t in this._callbacks)this._isPending[t]=!1,this._isHandled[t]=!1;this._pendingPayload=e,this._isDispatching=!0},t._stopDispatching=function(){delete this._pendingPayload,this._isDispatching=!1},e}();e.exports=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(1),l=n(121),c=n(135),u=n(145),d=n(134);class h extends a.a.Component{constructor(){super(...arguments),i()(this,"unmounted",!1),i()(this,"state",{}),i()(this,"onWrapperCancelClick",(()=>{this.props.onFinished()}))}componentDidMount(){s.a.log("Starting load of AsyncWrapper for modal"),this.props.prom.then((e=>{if(this.unmounted)return;const t=e.default?e.default:e;this.setState({component:t})})).catch((e=>{s.a.warn("AsyncWrapper promise failed",e),this.setState({error:e})}))}componentWillUnmount(){this.unmounted=!0}render(){if(this.state.component){const e=this.state.component;return a.a.createElement(e,this.props)}return this.state.error?a.a.createElement(c.a,{onFinished:this.props.onFinished,title:Object(l.a)("Error")},Object(l.a)("Unable to load! Check your network connectivity and try again."),a.a.createElement(u.a,{primaryButton:Object(l.a)("Dismiss"),onPrimaryButtonClick:this.onWrapperCancelClick,hasCancel:!1})):a.a.createElement(d.a,null)}}},function(e,t,n){"use strict";n.r(t),n.d(t,"Icon",(function(){return d}));var r,i,o,a,s,l,c=n(120);function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}function d(e){return c.createElement("svg",u({fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"presentation","aria-hidden":!0},e),r||(r=c.createElement("g",{filter:"url(#element-desktop-logo_svg__filter0_dd)"},c.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.144 2.344H7.856c-1.917 0-2.612.2-3.312.574-.701.375-1.251.925-1.626 1.626-.375.7-.574 1.395-.574 3.312v8.288c0 1.917.2 2.612.574 3.312.375.701.925 1.251 1.626 1.626.7.375 1.395.574 3.312.574h8.288c1.917 0 2.612-.2 3.312-.574.701-.375 1.251-.925 1.626-1.626.375-.7.574-1.395.574-3.312V7.856c0-1.917-.2-2.612-.574-3.312a3.907 3.907 0 00-1.626-1.626c-.7-.375-1.395-.574-3.312-.574z",fill:"url(#element-desktop-logo_svg__paint0_linear)"}))),i||(i=c.createElement("g",{filter:"url(#element-desktop-logo_svg__filter1_ddddi)"},c.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.097 6.019c0-.45.365-.816.816-.816a5.438 5.438 0 015.437 5.438.816.816 0 11-1.631 0 3.806 3.806 0 00-3.806-3.807.816.816 0 01-.816-.815z",fill:"#fff"}))),o||(o=c.createElement("g",{filter:"url(#element-desktop-logo_svg__filter2_ddddi)"},c.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.903 17.981c0 .45-.365.816-.816.816a5.438 5.438 0 01-5.437-5.438.816.816 0 111.631 0 3.806 3.806 0 003.806 3.807c.451 0 .816.365.816.815z",fill:"#fff"}))),a||(a=c.createElement("g",{filter:"url(#element-desktop-logo_svg__filter3_ddddi)"},c.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.019 13.903a.816.816 0 01-.816-.816 5.438 5.438 0 015.438-5.437.816.816 0 110 1.631 3.806 3.806 0 00-3.807 3.806c0 .451-.365.816-.815.816z",fill:"#fff"}))),s||(s=c.createElement("g",{filter:"url(#element-desktop-logo_svg__filter4_ddddi)"},c.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.981 10.097c.45 0 .816.365.816.816a5.438 5.438 0 01-5.438 5.437.816.816 0 110-1.631 3.806 3.806 0 003.807-3.806c0-.451.365-.816.815-.816z",fill:"#fff"}))),l||(l=c.createElement("defs",null,c.createElement("filter",{id:"element-desktop-logo_svg__filter0_dd",x:1.547,y:1.922,width:20.906,height:20.906,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},c.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),c.createElement("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),c.createElement("feOffset",{dy:.375}),c.createElement("feGaussianBlur",{stdDeviation:.398}),c.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.09 0"}),c.createElement("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow"}),c.createElement("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),c.createElement("feOffset",{dy:.234}),c.createElement("feGaussianBlur",{stdDeviation:.281}),c.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),c.createElement("feBlend",{in2:"effect1_dropShadow",result:"effect2_dropShadow"}),c.createElement("feBlend",{in:"SourceGraphic",in2:"effect2_dropShadow",result:"shape"})),c.createElement("filter",{id:"element-desktop-logo_svg__filter1_ddddi",x:6.956,y:4.031,width:12.534,height:12.534,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},c.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),c.createElement("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),c.createElement("feOffset",{dy:.328}),c.createElement("feGaussianBlur",{stdDeviation:.516}),c.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"}),c.createElement("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow"}),c.createElement("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),c.createElement("feOffset",{dy:1.266}),c.createElement("feGaussianBlur",{stdDeviation:.633}),c.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"}),c.createElement("feBlend",{in2:"effect1_dropShadow",result:"effect2_dropShadow"}),c.createElement("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),c.createElement("feOffset",{dy:1.969}),c.createElement("feGaussianBlur",{stdDeviation:1.57}),c.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"}),c.createElement("feBlend",{mode:"overlay",in2:"effect2_dropShadow",result:"effect3_dropShadow"}),c.createElement("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),c.createElement("feOffset",{dx:-.188,dy:.422}),c.createElement("feGaussianBlur",{stdDeviation:.34}),c.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"}),c.createElement("feBlend",{mode:"overlay",in2:"effect3_dropShadow",result:"effect4_dropShadow"}),c.createElement("feBlend",{in:"SourceGraphic",in2:"effect4_dropShadow",result:"shape"}),c.createElement("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),c.createElement("feOffset",{dy:-.68}),c.createElement("feGaussianBlur",{stdDeviation:.27}),c.createElement("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:-1,k3:1}),c.createElement("feColorMatrix",{values:"0 0 0 0 0.678431 0 0 0 0 0.819608 0 0 0 0 0.726431 0 0 0 1 0"}),c.createElement("feBlend",{in2:"shape",result:"effect5_innerShadow"})),c.createElement("filter",{id:"element-desktop-logo_svg__filter2_ddddi",x:4.509,y:11.372,width:12.534,height:12.534,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},c.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),c.createElement("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),c.createElement("feOffset",{dy:.328}),c.createElement("feGaussianBlur",{stdDeviation:.516}),c.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"}),c.createElement("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow"}),c.createElement("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),c.createElement("feOffset",{dy:1.266}),c.createElement("feGaussianBlur",{stdDeviation:.633}),c.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"}),c.createElement("feBlend",{in2:"effect1_dropShadow",result:"effect2_dropShadow"}),c.createElement("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),c.createElement("feOffset",{dy:1.969}),c.createElement("feGaussianBlur",{stdDeviation:1.57}),c.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"}),c.createElement("feBlend",{mode:"overlay",in2:"effect2_dropShadow",result:"effect3_dropShadow"}),c.createElement("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),c.createElement("feOffset",{dx:-.188,dy:.422}),c.createElement("feGaussianBlur",{stdDeviation:.34}),c.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"}),c.createElement("feBlend",{mode:"overlay",in2:"effect3_dropShadow",result:"effect4_dropShadow"}),c.createElement("feBlend",{in:"SourceGraphic",in2:"effect4_dropShadow",result:"shape"}),c.createElement("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),c.createElement("feOffset",{dy:-.68}),c.createElement("feGaussianBlur",{stdDeviation:.27}),c.createElement("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:-1,k3:1}),c.createElement("feColorMatrix",{values:"0 0 0 0 0.678431 0 0 0 0 0.819608 0 0 0 0 0.726431 0 0 0 1 0"}),c.createElement("feBlend",{in2:"shape",result:"effect5_innerShadow"})),c.createElement("filter",{id:"element-desktop-logo_svg__filter3_ddddi",x:2.063,y:6.478,width:12.534,height:12.534,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},c.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),c.createElement("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),c.createElement("feOffset",{dy:.328}),c.createElement("feGaussianBlur",{stdDeviation:.516}),c.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"}),c.createElement("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow"}),c.createElement("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),c.createElement("feOffset",{dy:1.266}),c.createElement("feGaussianBlur",{stdDeviation:.633}),c.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"}),c.createElement("feBlend",{in2:"effect1_dropShadow",result:"effect2_dropShadow"}),c.createElement("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),c.createElement("feOffset",{dy:1.969}),c.createElement("feGaussianBlur",{stdDeviation:1.57}),c.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"}),c.createElement("feBlend",{mode:"overlay",in2:"effect2_dropShadow",result:"effect3_dropShadow"}),c.createElement("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),c.createElement("feOffset",{dx:-.188,dy:.422}),c.createElement("feGaussianBlur",{stdDeviation:.34}),c.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"}),c.createElement("feBlend",{mode:"overlay",in2:"effect3_dropShadow",result:"effect4_dropShadow"}),c.createElement("feBlend",{in:"SourceGraphic",in2:"effect4_dropShadow",result:"shape"}),c.createElement("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),c.createElement("feOffset",{dy:-.68}),c.createElement("feGaussianBlur",{stdDeviation:.27}),c.createElement("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:-1,k3:1}),c.createElement("feColorMatrix",{values:"0 0 0 0 0.678431 0 0 0 0 0.819608 0 0 0 0 0.726431 0 0 0 1 0"}),c.createElement("feBlend",{in2:"shape",result:"effect5_innerShadow"})),c.createElement("filter",{id:"element-desktop-logo_svg__filter4_ddddi",x:9.403,y:8.925,width:12.534,height:12.534,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},c.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),c.createElement("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),c.createElement("feOffset",{dy:.328}),c.createElement("feGaussianBlur",{stdDeviation:.516}),c.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"}),c.createElement("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow"}),c.createElement("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),c.createElement("feOffset",{dy:1.266}),c.createElement("feGaussianBlur",{stdDeviation:.633}),c.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"}),c.createElement("feBlend",{in2:"effect1_dropShadow",result:"effect2_dropShadow"}),c.createElement("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),c.createElement("feOffset",{dy:1.969}),c.createElement("feGaussianBlur",{stdDeviation:1.57}),c.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"}),c.createElement("feBlend",{mode:"overlay",in2:"effect2_dropShadow",result:"effect3_dropShadow"}),c.createElement("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),c.createElement("feOffset",{dx:-.188,dy:.422}),c.createElement("feGaussianBlur",{stdDeviation:.34}),c.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"}),c.createElement("feBlend",{mode:"overlay",in2:"effect3_dropShadow",result:"effect4_dropShadow"}),c.createElement("feBlend",{in:"SourceGraphic",in2:"effect4_dropShadow",result:"shape"}),c.createElement("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),c.createElement("feOffset",{dy:-.68}),c.createElement("feGaussianBlur",{stdDeviation:.27}),c.createElement("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:-1,k3:1}),c.createElement("feColorMatrix",{values:"0 0 0 0 0.678431 0 0 0 0 0.819608 0 0 0 0 0.726431 0 0 0 1 0"}),c.createElement("feBlend",{in2:"shape",result:"effect5_innerShadow"})),c.createElement("linearGradient",{id:"element-desktop-logo_svg__paint0_linear",x1:12,y1:2.344,x2:12,y2:21.656,gradientUnits:"userSpaceOnUse"},c.createElement("stop",{stopColor:"#1ED9A3"}),c.createElement("stop",{offset:1,stopColor:"#0DBD8B"})))))}t.default="img/element-desktop-logo.9f55f24.svg"},function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||f(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e){return function(e){if(Array.isArray(e))return _(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||f(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){if(e){if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(e,t):void 0}}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function b(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=f(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}Object.defineProperty(t,"__esModule",{value:!0});var v=String.fromCharCode,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",S={};function w(e,t){if(!S[e]){S[e]={};for(var n=0;n<e.length;n++)S[e][e.charAt(n)]=n}return S[e][t]}var T={compressToBase64:function(e){if(null==e)return"";var t=T._compress(e,6,(function(e){return y.charAt(e)}));switch(t.length%4){default:case 0:return t;case 1:return t+"===";case 2:return t+"==";case 3:return t+"="}},decompressFromBase64:function(e){return null==e?"":""==e?null:T._decompress(e.length,32,(function(t){return w(y,e.charAt(t))}))},compressToUTF16:function(e){return null==e?"":T._compress(e,15,(function(e){return v(e+32)}))+" "},decompressFromUTF16:function(e){return null==e?"":""==e?null:T._decompress(e.length,16384,(function(t){return e.charCodeAt(t)-32}))},compressToUint8Array:function(e){for(var t=T.compress(e),n=new Uint8Array(2*t.length),r=0,i=t.length;r<i;r++){var o=t.charCodeAt(r);n[2*r]=o>>>8,n[2*r+1]=o%256}return n},decompressFromUint8Array:function(e){if(null==e)return T.decompress(e);for(var t=new Array(e.length/2),n=0,r=t.length;n<r;n++)t[n]=256*e[2*n]+e[2*n+1];var i=[];return t.forEach((function(e){i.push(v(e))})),T.decompress(i.join(""))},compressToEncodedURIComponent:function(e){return null==e?"":T._compress(e,6,(function(e){return E.charAt(e)}))},decompressFromEncodedURIComponent:function(e){return null==e?"":""==e?null:(e=e.replace(/ /g,"+"),T._decompress(e.length,32,(function(t){return w(E,e.charAt(t))})))},compress:function(e){return T._compress(e,16,(function(e){return v(e)}))},_compress:function(e,t,n){if(null==e)return"";var r,i,o,a="",s="",l="",c=2,u=3,d=2,h=0,p=0,m={},g={},f=[];for(o=0;o<e.length;o+=1)if(a=e.charAt(o),Object.prototype.hasOwnProperty.call(m,a)||(m[a]=u++,g[a]=!0),s=l+a,Object.prototype.hasOwnProperty.call(m,s))l=s;else{if(Object.prototype.hasOwnProperty.call(g,l)){if(l.charCodeAt(0)<256){for(r=0;r<d;r++)h<<=1,p==t-1?(p=0,f.push(n(h)),h=0):p++;for(i=l.charCodeAt(0),r=0;r<8;r++)h=h<<1|1&i,p==t-1?(p=0,f.push(n(h)),h=0):p++,i>>=1}else{for(i=1,r=0;r<d;r++)h=h<<1|i,p==t-1?(p=0,f.push(n(h)),h=0):p++,i=0;for(i=l.charCodeAt(0),r=0;r<16;r++)h=h<<1|1&i,p==t-1?(p=0,f.push(n(h)),h=0):p++,i>>=1}0==--c&&(c=Math.pow(2,d),d++),delete g[l]}else for(i=m[l],r=0;r<d;r++)h=h<<1|1&i,p==t-1?(p=0,f.push(n(h)),h=0):p++,i>>=1;0==--c&&(c=Math.pow(2,d),d++),m[s]=u++,l=String(a)}if(""!==l){if(Object.prototype.hasOwnProperty.call(g,l)){if(l.charCodeAt(0)<256){for(r=0;r<d;r++)h<<=1,p==t-1?(p=0,f.push(n(h)),h=0):p++;for(i=l.charCodeAt(0),r=0;r<8;r++)h=h<<1|1&i,p==t-1?(p=0,f.push(n(h)),h=0):p++,i>>=1}else{for(i=1,r=0;r<d;r++)h=h<<1|i,p==t-1?(p=0,f.push(n(h)),h=0):p++,i=0;for(i=l.charCodeAt(0),r=0;r<16;r++)h=h<<1|1&i,p==t-1?(p=0,f.push(n(h)),h=0):p++,i>>=1}0==--c&&(c=Math.pow(2,d),d++),delete g[l]}else for(i=m[l],r=0;r<d;r++)h=h<<1|1&i,p==t-1?(p=0,f.push(n(h)),h=0):p++,i>>=1;0==--c&&(c=Math.pow(2,d),d++)}for(i=2,r=0;r<d;r++)h=h<<1|1&i,p==t-1?(p=0,f.push(n(h)),h=0):p++,i>>=1;for(;;){if(h<<=1,p==t-1){f.push(n(h));break}p++}return f.join("")},decompress:function(e){return null==e?"":""==e?null:T._decompress(e.length,32768,(function(t){return e.charCodeAt(t)}))},_decompress:function(e,t,n){var r,i,o,a,s,l,c,u=[],d=[],h={val:n(0),position:t,index:1},p=4,m=4,g=3,f="";for(r=0;r<3;r+=1)u[r]=r;for(o=0,s=Math.pow(2,2),l=1;l!=s;)a=h.val&h.position,h.position>>=1,0==h.position&&(h.position=t,h.val=n(h.index++)),o|=(a>0?1:0)*l,l<<=1;switch(o){case 0:for(o=0,s=Math.pow(2,8),l=1;l!=s;)a=h.val&h.position,h.position>>=1,0==h.position&&(h.position=t,h.val=n(h.index++)),o|=(a>0?1:0)*l,l<<=1;c=v(o);break;case 1:for(o=0,s=Math.pow(2,16),l=1;l!=s;)a=h.val&h.position,h.position>>=1,0==h.position&&(h.position=t,h.val=n(h.index++)),o|=(a>0?1:0)*l,l<<=1;c=v(o);break;case 2:return""}for(u[3]=c,i=c,d.push(c);;){if(h.index>e)return"";for(o=0,s=Math.pow(2,g),l=1;l!=s;)a=h.val&h.position,h.position>>=1,0==h.position&&(h.position=t,h.val=n(h.index++)),o|=(a>0?1:0)*l,l<<=1;switch(c=o){case 0:for(o=0,s=Math.pow(2,8),l=1;l!=s;)a=h.val&h.position,h.position>>=1,0==h.position&&(h.position=t,h.val=n(h.index++)),o|=(a>0?1:0)*l,l<<=1;u[m++]=v(o),c=m-1,p--;break;case 1:for(o=0,s=Math.pow(2,16),l=1;l!=s;)a=h.val&h.position,h.position>>=1,0==h.position&&(h.position=t,h.val=n(h.index++)),o|=(a>0?1:0)*l,l<<=1;u[m++]=v(o),c=m-1,p--;break;case 2:return d.join("")}if(0==p&&(p=Math.pow(2,g),g++),u[c])f=u[c];else{if(c!==m)return null;f=i+i.charAt(0)}d.push(f),u[m++]=i+f.charAt(0),i=f,0==--p&&(p=Math.pow(2,g),g++)}}},C={DEBUG:!1,LIB_VERSION:"1.50.3"},x=Array.prototype,F=Object.prototype,D=F.toString,k=F.hasOwnProperty,O="undefined"!=typeof window?window:{},I=O.navigator||{userAgent:""},A=O.document||{},R=I.userAgent,N=x.forEach,M=x.indexOf,P=Array.isArray,L={},B={log:function(){if(C.DEBUG&&!K(window.console)&&window.console){for(var e=("__rrweb_original__"in window.console.log?window.console.log.__rrweb_original__:window.console.log),t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];try{e.apply(window.console,n)}catch(t){G(n,(function(t){e(t)}))}}},error:function(){if(C.DEBUG&&!K(window.console)&&window.console){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=["PostHog error:"].concat(t),i="__rrweb_original__"in window.console.error?window.console.error.__rrweb_original__:window.console.error;try{i.apply(window.console,r)}catch(e){G(r,(function(e){i(e)}))}}},critical:function(){if(!K(window.console)&&window.console){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=["PostHog error:"].concat(t),i="__rrweb_original__"in window.console.error?window.console.error.__rrweb_original__:window.console.error;try{i.apply(window.console,r)}catch(e){G(r,(function(e){i(e)}))}}}},U=function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function j(e,t,n){if(null!=e)if(N&&Array.isArray(e)&&e.forEach===N)e.forEach(t,n);else if("length"in e&&e.length===+e.length){for(var r=0,i=e.length;r<i;r++)if(r in e&&t.call(n,e[r],r)===L)return}else for(var o in e)if(k.call(e,o)&&t.call(n,e[o],o)===L)return}function G(e,t,n){if(Array.isArray(e))if(N&&e.forEach===N)e.forEach(t,n);else if("length"in e&&e.length===+e.length)for(var r=0,i=e.length;r<i;r++)if(r in e&&t.call(n,e[r],r)===L)return}var z=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return G(n,(function(t){for(var n in t)void 0!==t[n]&&(e[n]=t[n])})),e},H=P||function(e){return"[object Array]"===D.call(e)},q=function(e){try{return/^\s*\bfunction\b/.test(e)}catch(e){return!1}};function V(e,t){return-1!==e.indexOf(t)}var $=function(e){return e===Object(e)&&!H(e)},K=function(e){return void 0===e},W=function(e){return"[object String]"==D.call(e)},Y=function(e){return"[object Number]"==D.call(e)},Q=function e(t){return j(t,(function(n,r){!function(e){return"[object Date]"==D.call(e)}(n)?$(n)&&(t[r]=e(n)):t[r]=X(n)})),t},X=function(e){function t(e){return e<10?"0"+e:e}return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())},Z=function(e){return function(){try{for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(this,n)}catch(e){B.critical("Implementation error. Please turn on debug and contact support@posthog.com."),B.critical(e)}}},J=function(e){var t={};return j(e,(function(e,n){W(e)&&e.length>0&&(t[n]=e)})),t},ee=["$performance_raw"];function te(e,t){return n=e,r=function(e,n){return n&&ee.indexOf(n)>-1?e:"string"==typeof e&&null!==t?e.slice(0,t):e},i=new Set,function e(t,n){return t!==Object(t)?r?r(t,n):t:i.has(t)?void 0:(i.add(t),H(t)?(o=[],G(t,(function(t){o.push(e(t))}))):(o={},j(t,(function(t,n){i.has(t)||(o[n]=e(t,n))}))),o);var o}(n);var n,r,i}function ne(e){var t,n,r,i,o,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s=0,l=0,c="",u=[];if(!e)return e;e=ie(e);do{t=(o=e.charCodeAt(s++)<<16|e.charCodeAt(s++)<<8|e.charCodeAt(s++))>>18&63,n=o>>12&63,r=o>>6&63,i=63&o,u[l++]=a.charAt(t)+a.charAt(n)+a.charAt(r)+a.charAt(i)}while(s<e.length);switch(c=u.join(""),e.length%3){case 1:c=c.slice(0,-2)+"==";break;case 2:c=c.slice(0,-1)+"="}return c}var re,ie=function(e){var t,n,r,i,o="";for(t=n=0,r=(e=(e+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,i=0;i<r;i++){var a=e.charCodeAt(i),s=null;a<128?n++:s=a>127&&a<2048?String.fromCharCode(a>>6|192,63&a|128):String.fromCharCode(a>>12|224,a>>6&63|128,63&a|128),null!==s&&(n>t&&(o+=e.substring(t,n)),o+=s,t=n=i+1)}return n>t&&(o+=e.substring(t,e.length)),o},oe=(re=function(){for(var e=(new Date).valueOf(),t=0;e==(new Date).valueOf();)t++;return e.toString(16)+t.toString(16)},function(){var e="undefined"!=typeof window?(window.screen.height*window.screen.width).toString(16):"0";return re()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var e,t,n=R,r=0,i=[];function o(e,t){var n,r=0;for(n=0;n<t.length;n++)r|=i[n]<<8*n;return e^r}for(e=0;e<n.length;e++)t=n.charCodeAt(e),i.unshift(255&t),i.length>=4&&(r=o(r,i),i=[]);return i.length>0&&(r=o(r,i)),r.toString(16)}()+"-"+e+"-"+re()}),ae=function(e){return!!/(google web preview|baiduspider|yandexbot|bingbot|googlebot|yahoo! slurp|ahrefsbot|facebookexternalhit|facebookcatalog|applebot|semrushbot|duckduckbot|twitterbot|rogerbot|linkedinbot|mj12bot|sitebulb|bot.htm|bot.php|hubspot|crawler)/i.test(e)},se=function(e,t){var n=t.replace(/[[]/,"\\[").replace(/[\]]/,"\\]"),r=new RegExp("[\\?&]"+n+"=([^&#]*)").exec(e);if(null===r||r&&"string"!=typeof r[1]&&r[1].length)return"";var i=r[1];try{i=decodeURIComponent(i)}catch(e){B.error("Skipping decoding for malformed query param: "+i)}return i.replace(/\+/g," ")},le=function(e,t){var n=e.match(new RegExp(t+"=([^&]*)"));return n?n[1]:null},ce=function(){function e(t){return t&&(t.preventDefault=e.preventDefault,t.stopPropagation=e.stopPropagation),t}return e.preventDefault=function(){this.returnValue=!1},e.stopPropagation=function(){this.cancelBubble=!0},function(t,n,r,i,o){if(t)if(t.addEventListener&&!i)t.addEventListener(n,r,!!o);else{var a="on"+n,s=t[a];t[a]=function(t,n,r){return function(i){if(i=i||e(window.event)){var o,a=!0;q(r)&&(o=r(i));var s=n.call(t,i);return!1!==o&&!1!==s||(a=!1),a}}}(t,r,s)}else B.error("No valid element provided to register_event")}}(),ue={campaignParams:function(){var e="utm_source utm_medium utm_campaign utm_content utm_term gclid fbclid msclkid".split(" "),t={};return j(e,(function(e){var n=se(A.URL,e);n.length&&(t[e]=n)})),t},searchEngine:function(e){return 0===e.search("https?://(.*)google.([^/?]*)")?"google":0===e.search("https?://(.*)bing.com")?"bing":0===e.search("https?://(.*)yahoo.com")?"yahoo":0===e.search("https?://(.*)duckduckgo.com")?"duckduckgo":null},searchInfo:function(e){var t=ue.searchEngine(e),n="yahoo"!=t?"q":"p",r={};if(null!==t){r.$search_engine=t;var i=se(e,n);i.length&&(r.ph_keyword=i)}return r},browser:function(e,t,n){return t=t||"",n||V(e," OPR/")?V(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":V(e,"IEMobile")||V(e,"WPDesktop")?"Internet Explorer Mobile":V(e,"SamsungBrowser/")?"Samsung Internet":V(e,"Edge")||V(e,"Edg/")?"Microsoft Edge":V(e,"FBIOS")?"Facebook Mobile":V(e,"Chrome")?"Chrome":V(e,"CriOS")?"Chrome iOS":V(e,"UCWEB")||V(e,"UCBrowser")?"UC Browser":V(e,"FxiOS")?"Firefox iOS":V(t,"Apple")?V(e,"Mobile")?"Mobile Safari":"Safari":V(e,"Android")?"Android Mobile":V(e,"Konqueror")?"Konqueror":V(e,"Firefox")?"Firefox":V(e,"MSIE")||V(e,"Trident/")?"Internet Explorer":V(e,"Gecko")?"Mozilla":""},browserVersion:function(e,t,n){var r={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/}[ue.browser(e,t,n)];if(void 0===r)return null;var i=e.match(r);return i?parseFloat(i[i.length-2]):null},browserLanguage:function(){return I.language||I.userLanguage},os:function(){var e=R;return/Windows/i.test(e)?/Phone/.test(e)||/WPDesktop/.test(e)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(e)?"iOS":/Android/.test(e)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Mac/i.test(e)?"Mac OS X":/Linux/.test(e)?"Linux":/CrOS/.test(e)?"Chrome OS":""},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)&&!/Mobile/.test(e)?"Android Tablet":/Android/.test(e)?"Android":""},deviceType:function(e){var t=this.device(e);return"iPad"===t||"Android Tablet"===t?"Tablet":t?"Mobile":"Desktop"},referringDomain:function(e){var t=e.split("/");return t.length>=3?t[2]:""},properties:function(){return z(J({$os:ue.os(),$browser:ue.browser(R,I.vendor,O.opera),$device:ue.device(R),$device_type:ue.deviceType(R)}),{$current_url:null==O?void 0:O.location.href,$host:null==O?void 0:O.location.host,$pathname:null==O?void 0:O.location.pathname,$browser_version:ue.browserVersion(R,I.vendor,O.opera),$browser_language:ue.browserLanguage(),$screen_height:null==O?void 0:O.screen.height,$screen_width:null==O?void 0:O.screen.width,$viewport_height:null==O?void 0:O.innerHeight,$viewport_width:null==O?void 0:O.innerWidth,$lib:"web",$lib_version:C.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:(Date.now=Date.now||function(){return+new Date},Date.now()/1e3)})},people_properties:function(){return z(J({$os:ue.os(),$browser:ue.browser(R,I.vendor,O.opera)}),{$browser_version:ue.browserVersion(R,I.vendor,O.opera)})}};function de(e){switch(o(e.className)){case"string":return e.className;case"object":return("baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";default:return""}}function he(e){var t="";return be(e)&&!ve(e)&&e.childNodes&&e.childNodes.length&&j(e.childNodes,(function(e){ge(e)&&e.textContent&&(t+=U(e.textContent).split(/(\s+)/).filter(ye).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))})),U(t)}function pe(e){return!!e&&1===e.nodeType}function me(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function ge(e){return!!e&&3===e.nodeType}function fe(e){return!!e&&11===e.nodeType}var _e=["a","button","form","input","select","textarea","label"];function be(e){for(var t=e;t.parentNode&&!me(t,"body");t=t.parentNode){var n=de(t).split(" ");if(V(n,"ph-sensitive")||V(n,"ph-no-capture"))return!1}if(V(de(e).split(" "),"ph-include"))return!0;var r=e.type||"";if("string"==typeof r)switch(r.toLowerCase()){case"hidden":case"password":return!1}var i=e.name||e.id||"";return"string"!=typeof i||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,""))}function ve(e){return!!(me(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||me(e,"select")||me(e,"textarea")||"true"===e.getAttribute("contenteditable"))}function ye(e){if(null===e||K(e))return!1;if("string"==typeof e){if(e=U(e),/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test((e||"").replace(/[- ]/g,"")))return!1;if(/(^\d{3}-?\d{2}-?\d{4}$)/.test(e))return!1}return!0}function Ee(e,t){var n=document.createElement("script");n.type="text/javascript",n.src=e,n.onload=t;var r,i=document.querySelectorAll("body > script");i.length>0?null===(r=i[0].parentNode)||void 0===r||r.insertBefore(n,i[0]):document.body.appendChild(n)}function Se(e){var t=he(e);return ye(t=Te([t,we(e)]))?t:""}function we(e){var t,n="";if((null===(t=e.children)||void 0===t?void 0:t.length)>0){var r,i=b(e.children);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(o&&1===o.nodeType&&"span"===o.tagName.toLowerCase()){var a=he(o);ye(a)&&(n=Te([n,a])),o.children.length>0&&(n=Te([n,we(o)]))}}}catch(e){i.e(e)}finally{i.f()}}return n}function Te(e){return e.filter((function(e){return e})).join(" ")}var Ce=function(){function e(t){a(this,e),this.clicks=[],this.enabled=t}return l(e,[{key:"isRageClick",value:function(e,t,n){if(!this.enabled)return!1;var r=this.clicks[this.clicks.length-1];if(r&&Math.abs(e-r.x)+Math.abs(t-r.y)<30&&n-r.timestamp<1e3){if(this.clicks.push({x:e,y:t,timestamp:n}),3===this.clicks.length)return!0}else this.clicks=[{x:e,y:t,timestamp:n}];return!1}}]),e}(),xe={_initializedTokens:[],_previousElementSibling:function(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do{t=t.previousSibling}while(t&&!pe(t));return t},_getAugmentPropertiesFromElement:function(e){if(!be(e))return{};var t={};return j(e.attributes,(function(e){if(e.name.startsWith("data-ph-capture-attribute")){var n=e.name.replace("data-ph-capture-attribute-",""),r=e.value;n&&r&&ye(r)&&(t[n]=r)}})),t},_getPropertiesFromElement:function(e,t,n){var r=e.tagName.toLowerCase(),i={tag_name:r};_e.indexOf(r)>-1&&!n&&("a"===e.tagName.toLowerCase()||"button"===e.tagName.toLowerCase()?i.$el_text=Se(e):i.$el_text=he(e));var o=de(e);o.length>0&&(i.classes=o.split(" ").filter((function(e){return""!==e}))),j(e.attributes,(function(n){var r;ve(e)&&-1===["name","id","class"].indexOf(n.name)||!t&&ye(n.value)&&("string"!=typeof(r=n.name)||"_ngcontent"!==r.substring(0,10)&&"_nghost"!==r.substring(0,7))&&(i["attr__"+n.name]=n.value)}));for(var a=1,s=1,l=e;l=this._previousElementSibling(l);)a++,l.tagName===e.tagName&&s++;return i.nth_child=a,i.nth_of_type=s,i},_getDefaultProperties:function(e){return{$event_type:e,$ce_version:1}},_extractCustomPropertyValue:function(e){var t=[];return j(document.querySelectorAll(e.css_selector),(function(e){var n;["input","select"].indexOf(e.tagName.toLowerCase())>-1?n=e.value:e.textContent&&(n=e.textContent),ye(n)&&t.push(n)})),t.join(", ")},_getCustomProperties:function(e){var t=this,n={};return j(this._customProperties,(function(r){j(r.event_selectors,(function(i){j(document.querySelectorAll(i),(function(i){V(e,i)&&be(i)&&(n[r.name]=t._extractCustomPropertyValue(r))}))}))})),n},_getEventTarget:function(e){return void 0===e.target?e.srcElement||null:null!==(t=e.target)&&void 0!==t&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t},_captureEvent:function(e,t){var n,r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"$autocapture",o=this._getEventTarget(e);if(ge(o)&&(o=o.parentNode||null),"$autocapture"===i&&"click"===e.type&&e instanceof MouseEvent&&null!==(n=this.rageclicks)&&void 0!==n&&n.isRageClick(e.clientX,e.clientY,(new Date).getTime())&&this._captureEvent(e,t,"$rageclick"),o&&function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(!e||me(e,"html")||!pe(e))return!1;if(null!=n&&n.url_allowlist){var r=window.location.href,i=n.url_allowlist;if(i&&!i.some((function(e){return r.match(e)})))return!1}if(null!=n&&n.dom_event_allowlist){var o=n.dom_event_allowlist;if(o&&!o.some((function(e){return t.type===e})))return!1}if(null!=n&&n.element_allowlist){var a=n.element_allowlist;if(a&&!a.some((function(t){return e.tagName.toLowerCase()===t})))return!1}if(null!=n&&n.css_selector_allowlist){var s=n.css_selector_allowlist;if(s&&!s.some((function(t){return e.matches(t)})))return!1}for(var l=!1,c=[e],u=!0,d=e;d.parentNode&&!me(d,"body");)if(fe(d.parentNode))c.push(d.parentNode.host),d=d.parentNode.host;else{if(!(u=d.parentNode||!1))break;if(_e.indexOf(u.tagName.toLowerCase())>-1)l=!0;else{var h=window.getComputedStyle(u);h&&"pointer"===h.getPropertyValue("cursor")&&(l=!0)}c.push(u),d=u}var p=window.getComputedStyle(e);if(p&&"pointer"===p.getPropertyValue("cursor")&&"click"===t.type)return!0;var m=e.tagName.toLowerCase();switch(m){case"html":return!1;case"form":return"submit"===t.type;case"input":case"select":case"textarea":return"change"===t.type||"click"===t.type;default:return l?"click"===t.type:"click"===t.type&&(_e.indexOf(m)>-1||"true"===e.getAttribute("contenteditable"))}}(o,e,this.config)){for(var a=[o],s=o;s.parentNode&&!me(s,"body");)fe(s.parentNode)?(a.push(s.parentNode.host),s=s.parentNode.host):(a.push(s.parentNode),s=s.parentNode);var l,c=[],u={},d=!1;if(j(a,(function(e){var n=be(e);"a"===e.tagName.toLowerCase()&&(l=e.getAttribute("href"),l=n&&ye(l)&&l),V(de(e).split(" "),"ph-no-capture")&&(d=!0),c.push(r._getPropertiesFromElement(e,t.get_config("mask_all_element_attributes"),t.get_config("mask_all_text")));var i=r._getAugmentPropertiesFromElement(e);z(u,i)})),t.get_config("mask_all_text")||("a"===o.tagName.toLowerCase()||"button"===o.tagName.toLowerCase()?c[0].$el_text=Se(o):c[0].$el_text=he(o)),l&&(c[0].attr__href=l),d)return!1;var h=z(this._getDefaultProperties(e.type),{$elements:c},this._getCustomProperties(a),u);return t.capture(i,h),!0}},_navigate:function(e){window.location.href=e},_addDomEventHandlers:function(e){var t=this,n=function(n){n=n||window.event,t._captureEvent(n,e)};ce(document,"submit",n,!1,!0),ce(document,"change",n,!1,!0),ce(document,"click",n,!1,!0)},_customProperties:[],rageclicks:null,config:void 0,init:function(e){var t;"boolean"!=typeof e.__autocapture&&(this.config=e.__autocapture),null!==(t=this.config)&&void 0!==t&&t.url_allowlist&&(this.config.url_allowlist=this.config.url_allowlist.map((function(e){return new RegExp(e)}))),this.rageclicks=new Ce(e.get_config("rageclick"))},afterDecideResponse:function(e,t){var n=t.get_config("token");this._initializedTokens.indexOf(n)>-1?B.log('autocapture already initialized for token "'+n+'"'):(this._initializedTokens.push(n),e&&e.config&&e.config.enable_collect_everything&&t.get_config("autocapture")?(e.custom_properties&&(this._customProperties=e.custom_properties),this._addDomEventHandlers(t)):t.__autocapture=!1)},enabledForProject:function(e,t,n){if(!e)return!0;t=K(t)?10:t,n=K(n)?10:n;for(var r=0,i=0;i<e.length;i++)r+=e.charCodeAt(i);return r%t<n},isBrowserSupported:function(){return q(document.querySelectorAll)}};!function(e){for(var t in e)"function"==typeof e[t]&&(e[t]=e[t].bind(e))}(xe),function(e){for(var t in e)"function"==typeof e[t]&&(e[t]=Z(e[t]))}(xe);var Fe=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,De={is_supported:function(){return!0},error:function(e){B.error("cookieStore error: "+e)},get:function(e){try{for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var i=n[r];" "==i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return decodeURIComponent(i.substring(t.length,i.length))}}catch(e){}return null},parse:function(e){var t;try{t=JSON.parse(De.get(e))||{}}catch(e){}return t},set:function(e,t,n,r,i){try{var o="",a="",s="";if(r){var l=document.location.hostname.match(Fe),c=l?l[0]:"";o=c?"; domain=."+c:""}if(n){var u=new Date;u.setTime(u.getTime()+24*n*60*60*1e3),a="; expires="+u.toUTCString()}i&&(s="; secure");var d=e+"="+encodeURIComponent(JSON.stringify(t))+a+"; path=/"+o+s;return document.cookie=d,d}catch(e){return}},remove:function(e,t){try{De.set(e,"",-1,t)}catch(e){return}}},ke=null,Oe={is_supported:function(){if(null!==ke)return ke;var e=!0;if("undefined"!=typeof window)try{var t="__mplssupport__";Oe.set(t,"xyz"),'"xyz"'!==Oe.get(t)&&(e=!1),Oe.remove(t)}catch(t){e=!1}else e=!1;return e||B.error("localStorage unsupported; falling back to cookie store"),ke=e,e},error:function(e){B.error("localStorage error: "+e)},get:function(e){try{return window.localStorage.getItem(e)}catch(e){Oe.error(e)}return null},parse:function(e){try{return JSON.parse(Oe.get(e))||{}}catch(e){}return null},set:function(e,t){try{window.localStorage.setItem(e,JSON.stringify(t))}catch(e){Oe.error(e)}},remove:function(e){try{window.localStorage.removeItem(e)}catch(e){Oe.error(e)}}},Ie=i(i({},Oe),{},{parse:function(e){try{var t={};try{(t=De.parse(e)||{}).distinct_id&&De.set(e,{distinct_id:t.distinct_id})}catch(e){}var n=z(t,JSON.parse(Oe.get(e)||"{}"));return Oe.set(e,n),n}catch(e){}return null},set:function(e,t,n,r,i){try{Oe.set(e,t),t.distinct_id&&De.set(e,{distinct_id:t.distinct_id},n,r,i)}catch(e){Oe.error(e)}},remove:function(e,t){try{window.localStorage.removeItem(e),De.remove(e,t)}catch(e){Oe.error(e)}}}),Ae={},Re={is_supported:function(){return!0},error:function(e){B.error("memoryStorage error: "+e)},get:function(e){return Ae[e]||null},parse:function(e){return Ae[e]||null},set:function(e,t){Ae[e]=t},remove:function(e){delete Ae[e]}},Ne=null,Me={is_supported:function(){if(null!==Ne)return Ne;if(Ne=!0,"undefined"!=typeof window)try{var e="__support__";Me.set(e,"xyz"),'"xyz"'!==Me.get(e)&&(Ne=!1),Me.remove(e)}catch(e){Ne=!1}else Ne=!1;return Ne},error:function(e){C.DEBUG&&B.error("sessionStorage error: ",e)},get:function(e){try{return window.sessionStorage.getItem(e)}catch(e){Me.error(e)}return null},parse:function(e){try{return JSON.parse(Me.get(e))||null}catch(e){}return null},set:function(e,t){try{window.sessionStorage.setItem(e,JSON.stringify(t))}catch(e){Me.error(e)}},remove:function(e){try{window.sessionStorage.removeItem(e)}catch(e){Me.error(e)}}},Pe="__ph_opt_in_out_";function Le(e,t){Ve(!0,e,t)}function Be(e,t){Ve(!1,e,t)}function Ue(e,t){return"1"===qe(e,t)}function je(e,t){return!!function(e){if(e&&e.respectDnt){var t=e&&e.window||O,n=t.navigator||{},r=!1;return j([n.doNotTrack,n.msDoNotTrack,t.doNotTrack],(function(e){V([!0,1,"1","yes"],e)&&(r=!0)})),r}return!1}(t)||"0"===qe(e,t)}function Ge(e,t){ze(t=t||{}).remove(He(e,t),!!t.crossSubdomainCookie)}function ze(e){return"localStorage"===(e=e||{}).persistenceType?Oe:"localStorage+cookie"===e.persistenceType?Ie:De}function He(e,t){return((t=t||{}).persistencePrefix||Pe)+e}function qe(e,t){return ze(t).get(He(e,t))}function Ve(e,t,n){W(t)&&t.length?(ze(n=n||{}).set(He(t,n),e?1:0,Y(n.cookieExpiration)?n.cookieExpiration:null,n.crossSubdomainCookie,n.secureCookie),n.capture&&e&&n.capture(n.captureEventName||"$opt_in",n.captureProperties||{},{send_instantly:!0})):console.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token")}function $e(e,t){var n=!1;try{var r=e.get_config("token"),i=e.get_config("respect_dnt"),o=e.get_config("opt_out_capturing_persistence_type"),a=e.get_config("opt_out_capturing_cookie_prefix")||void 0,s=e.get_config("window");r&&(n=je(r,{respectDnt:i,persistenceType:o,persistencePrefix:a,window:s}))}catch(e){t||console.error("Unexpected error when checking capturing opt-out status: "+e)}return n}function Ke(e,t,n){return function(){for(var r=$e(e,n),i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];if(!r)return t.apply(this,o);var s=o[o.length-1];"function"==typeof s&&s(0)}}var We="$set",Ye=function(){function e(t){var n=this;a(this,e),this._posthog=t,this.set=Ke(t,(function(e,t,r){var i=n.set_action(e,t);return $(e)&&(r=t),n._get_config("save_referrer")&&n._posthog.persistence.update_referrer_info(document.referrer),i[We]=z({},ue.people_properties(),n._posthog.persistence.get_referrer_info(),i[We]),n._send_request(i,r)})),this.set_once=Ke(t,(function(e,t,r){var i=n.set_once_action(e,t);return $(e)&&(r=t),n._send_request(i,r)}))}return l(e,[{key:"toString",value:function(){return this._posthog.toString()+".people"}},{key:"_send_request",value:function(e,t){e.$token=this._get_config("token"),e.$distinct_id=this._posthog.get_distinct_id();var n=this._posthog.get_property("$device_id"),r=this._posthog.get_property("$user_id"),i=this._posthog.get_property("$had_persisted_distinct_id");n&&(e.$device_id=n),r&&(e.$user_id=r),i&&(e.$had_persisted_distinct_id=i);var o=Q(e),a=te(o,this._get_config("properties_string_max_length")),s=ne(JSON.stringify(o));return this._posthog._send_request(this._get_config("api_host")+"/engage/",{data:s},{},this._posthog._prepare_callback(t,a)),a}},{key:"_get_config",value:function(e){return this._posthog.get_config(e)}},{key:"_is_reserved_property",value:function(e){return"$distinct_id"===e||"$token"===e||"$device_id"===e||"$user_id"===e||"$had_persisted_distinct_id"===e}},{key:"set_action",value:function(e,t){return this.apiActionParser(We,e,t)}},{key:"set_once_action",value:function(e,t){return this.apiActionParser("$set_once",e,t)}},{key:"apiActionParser",value:function(e,t,n){var r=this,i={},o={};return $(t)?j(t,(function(e,t){r._is_reserved_property(t)||(o[t]=e)})):o[t]=n,i[e]=o,i}}]),e}(),Qe="$active_feature_flags",Xe="$enabled_feature_flags",Ze="$override_feature_flags",Je="$feature_flag_payloads",et=function(){function e(t){a(this,e),this.instance=t,this._override_warning=!1,this.flagCallReported={},this.featureFlagEventHandlers=[],this.reloadFeatureFlagsQueued=!1,this.reloadFeatureFlagsInAction=!1}return l(e,[{key:"getFlags",value:function(){return Object.keys(this.getFlagVariants())}},{key:"getFlagVariants",value:function(){var e=this.instance.get_property(Xe),t=this.instance.get_property(Ze);if(!t)return e||{};for(var n=z({},e),r=Object.keys(t),i=0;i<r.length;i++)!1===t[r[i]]?delete n[r[i]]:n[r[i]]=t[r[i]];return this._override_warning||(console.warn("[PostHog] Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:n}),this._override_warning=!0),n}},{key:"getFlagPayloads",value:function(){return this.instance.get_property(Je)||{}}},{key:"reloadFeatureFlags",value:function(){this.reloadFeatureFlagsQueued||(this.reloadFeatureFlagsQueued=!0,this._startReloadTimer())}},{key:"setAnonymousDistinctId",value:function(e){this.$anon_distinct_id=e}},{key:"setReloadingPaused",value:function(e){this.reloadFeatureFlagsInAction=e}},{key:"resetRequestQueue",value:function(){this.reloadFeatureFlagsQueued=!1}},{key:"_startReloadTimer",value:function(){var e=this;this.reloadFeatureFlagsQueued&&!this.reloadFeatureFlagsInAction&&setTimeout((function(){!e.reloadFeatureFlagsInAction&&e.reloadFeatureFlagsQueued&&(e.reloadFeatureFlagsQueued=!1,e._reloadFeatureFlagsRequest())}),5)}},{key:"_reloadFeatureFlagsRequest",value:function(){var e=this;this.setReloadingPaused(!0);var t=this.instance.get_config("token"),n=ne(JSON.stringify({token:t,distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id}));this.instance._send_request(this.instance.get_config("api_host")+"/decide/?v=3",{data:n},{method:"POST"},this.instance._prepare_callback((function(t){e.$anon_distinct_id=void 0,e.receivedFeatureFlags(t),e.setReloadingPaused(!1),e._startReloadTimer()})))}},{key:"getFeatureFlag",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.getFlags())return console.warn('getFeatureFlag for key "'+e+"\" failed. Feature flags didn't load in time."),!1;var n=this.getFlagVariants()[e];return!t.send_event&&"send_event"in t||this.flagCallReported[e]||(this.flagCallReported[e]=!0,this.instance.capture("$feature_flag_called",{$feature_flag:e,$feature_flag_response:n})),n}},{key:"getFeatureFlagPayload",value:function(e){return this.getFlagPayloads()[e]}},{key:"isFeatureEnabled",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.getFlags()?!!this.getFeatureFlag(e,t):(console.warn('isFeatureEnabled for key "'+e+"\" failed. Feature flags didn't load in time."),!1)}},{key:"addFeatureFlagsHandler",value:function(e){this.featureFlagEventHandlers.push(e)}},{key:"removeFeatureFlagsHandler",value:function(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((function(t){return t!==e}))}},{key:"receivedFeatureFlags",value:function(e){this.instance.decideEndpointWasHit=!0;var t=this.getFlagVariants(),n=this.getFlagPayloads();!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=e.featureFlags,a=e.featureFlagPayloads;if(o)if(Array.isArray(o)){var s,l={};if(o)for(var u=0;u<o.length;u++)l[o[u]]=!0;t&&t.register((c(s={},Qe,o),c(s,Xe,l),s))}else{var d,h=o,p=a;e.errorsWhileComputingFlags&&(h=i(i({},n),h),p=i(i({},r),p)),t&&t.register((c(d={},Qe,Object.keys(h||{})),c(d,Xe,h||{}),c(d,Je,p||{}),d))}else t&&(t.unregister(Qe),t.unregister(Xe),t.unregister(Je))}(e,this.instance.persistence,t,n);var r=this._prepareFeatureFlagsForCallbacks(),o=r.flags,a=r.flagVariants;this.featureFlagEventHandlers.forEach((function(e){return e(o,a)}))}},{key:"override",value:function(e){if(this._override_warning=!1,!1===e)this.instance.persistence.unregister(Ze);else if(Array.isArray(e)){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;this.instance.persistence.register(c({},Ze,t))}else this.instance.persistence.register(c({},Ze,e))}},{key:"onFeatureFlags",value:function(e){var t=this;if(this.addFeatureFlagsHandler(e),this.instance.decideEndpointWasHit){var n=this._prepareFeatureFlagsForCallbacks(),r=n.flags,i=n.flagVariants;e(r,i)}return function(){return t.removeFeatureFlagsHandler(e)}}},{key:"_prepareFeatureFlagsForCallbacks",value:function(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter((function(e){return t[e]})),flagVariants:Object.keys(t).filter((function(e){return t[e]})).reduce((function(e,n){return e[n]=t[n],e}),{})}}}]),e}(),tt="$people_distinct_id",nt="__alias",rt="__timers",it="$session_recording_enabled_server_side",ot="$console_log_recording_enabled_server_side",at="$session_recording_recorder_version_server_side",st="$sesid",lt="$enabled_feature_flags",ct="$user_state",ut=["__mps","__mpso","__mpus","__mpa","__mpap","__mpr","__mpu",tt,nt,"__cmpns",rt,it,st,lt,ct],dt=function(){function e(t){a(this,e);var n="";t.token&&(n=t.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),this.props={},this.campaign_params_saved=!1,t.persistence_name?this.name="ph_"+t.persistence_name:this.name="ph_"+n+"_posthog";var r=t.persistence.toLowerCase();"cookie"!==r&&-1===r.indexOf("localstorage")&&"memory"!==r&&(B.critical("Unknown persistence type "+r+"; falling back to cookie"),r=t.persistence="cookie"),"localstorage"===r&&Oe.is_supported()?this.storage=Oe:"localstorage+cookie"===r&&Ie.is_supported()?this.storage=Ie:this.storage="memory"===r?Re:De,this.user_state="anonymous",this.load(),this.update_config(t),this.save()}return l(e,[{key:"properties",value:function(){var e={};return j(this.props,(function(t,n){if(n===lt&&"object"===o(t))for(var r=Object.keys(t),i=0;i<r.length;i++)e["$feature/".concat(r[i])]=t[r[i]];else s=n,l=!1,(null===(a=ut)?l:M&&a.indexOf===M?-1!=a.indexOf(s):(j(a,(function(e){if(l||(l=e===s))return L})),l))||(e[n]=t);var a,s,l})),e}},{key:"load",value:function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=z({},e))}}},{key:"save",value:function(){this.disabled||this.storage.set(this.name,this.props,this.expire_days,this.cross_subdomain,this.secure)}},{key:"remove",value:function(){this.storage.remove(this.name,!1),this.storage.remove(this.name,!0)}},{key:"clear",value:function(){this.remove(),this.props={}}},{key:"register_once",value:function(e,t,n){var r=this;if($(e)){void 0===t&&(t="None"),this.expire_days=void 0===n?this.default_expiry:n;var i=!1;if(j(e,(function(e,n){r.props.hasOwnProperty(n)&&r.props[n]!==t||(r.props[n]=e,i=!0)})),i)return this.save(),!0}return!1}},{key:"register",value:function(e,t){var n=this;if($(e)){this.expire_days=void 0===t?this.default_expiry:t;var r=!1;if(j(e,(function(t,i){e.hasOwnProperty(i)&&n.props[i]!==t&&(n.props[i]=t,r=!0)})),r)return this.save(),!0}return!1}},{key:"unregister",value:function(e){e in this.props&&(delete this.props[e],this.save())}},{key:"update_campaign_params",value:function(){this.campaign_params_saved||(this.register(ue.campaignParams()),this.campaign_params_saved=!0)}},{key:"update_search_keyword",value:function(e){this.register(ue.searchInfo(e))}},{key:"update_referrer_info",value:function(e){this.register({$referrer:e||this.props.$referrer||"$direct",$referring_domain:ue.referringDomain(e)||this.props.$referring_domain||"$direct"})}},{key:"get_referrer_info",value:function(){return J({$referrer:this.props.$referrer,$referring_domain:this.props.$referring_domain})}},{key:"safe_merge",value:function(e){return j(this.props,(function(t,n){n in e||(e[n]=t)})),e}},{key:"update_config",value:function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)}},{key:"set_disabled",value:function(e){this.disabled=e,this.disabled?this.remove():this.save()}},{key:"set_cross_subdomain",value:function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())}},{key:"get_cross_subdomain",value:function(){return!!this.cross_subdomain}},{key:"set_secure",value:function(e){e!==this.secure&&(this.secure=e,this.remove(),this.save())}},{key:"set_event_timer",value:function(e,t){var n=this.props[rt]||{};n[e]=t,this.props[rt]=n,this.save()}},{key:"remove_event_timer",value:function(e){var t=(this.props[rt]||{})[e];return K(t)||(delete this.props[rt][e],this.save()),t}},{key:"get_user_state",value:function(){return this.props[ct]||"anonymous"}},{key:"set_user_state",value:function(e){this.props[ct]=e,this.save()}}]),e}(),ht=2,pt=4,mt="/e/",gt=function(){function e(t){a(this,e),this.instance=t,this.captureStarted=!1,this.snapshots=[],this.emit=!1,this.endpoint=mt,this.stopRrweb=void 0,this.windowId=null,this.sessionId=null,this.receivedDecide=!1}return l(e,[{key:"startRecordingIfEnabled",value:function(){this.isRecordingEnabled()?this.startCaptureAndTrySendingQueuedSnapshots():this.stopRecording()}},{key:"started",value:function(){return this.captureStarted}},{key:"stopRecording",value:function(){this.captureStarted&&this.stopRrweb&&(this.stopRrweb(),this.stopRrweb=void 0,this.captureStarted=!1)}},{key:"isRecordingEnabled",value:function(){var e=!!this.instance.get_property(it),t=!this.instance.get_config("disable_session_recording");return e&&t}},{key:"isConsoleLogCaptureEnabled",value:function(){var e=!!this.instance.get_property(ot),t=this.instance.get_config("enable_recording_console_log");return null!=t?t:e}},{key:"getRecordingVersion",value:function(){var e,t=this.instance.get_property(at);return(null===(e=this.instance.get_config("session_recording"))||void 0===e?void 0:e.recorderVersion)||t||"v1"}},{key:"afterDecideResponse",value:function(e){var t,n,r,i,o,a;this.receivedDecide=!0,this.instance.persistence&&this.instance.persistence.register((c(o={},it,!!e.sessionRecording),c(o,ot,null===(r=e.sessionRecording)||void 0===r?void 0:r.consoleLogRecordingEnabled),c(o,at,null===(i=e.sessionRecording)||void 0===i?void 0:i.recorderVersion),o)),null!==(t=e.sessionRecording)&&void 0!==t&&t.endpoint&&(this.endpoint=null===(a=e.sessionRecording)||void 0===a?void 0:a.endpoint),null!==(n=e.sessionRecording)&&void 0!==n&&n.recorderVersion&&(this.recorderVersion=e.sessionRecording.recorderVersion),this.startRecordingIfEnabled()}},{key:"startCaptureAndTrySendingQueuedSnapshots",value:function(){var e=this;this.receivedDecide&&(this.emit=!0,this.snapshots.forEach((function(t){return e._captureSnapshot(t)}))),this._startCapture()}},{key:"_startCapture",value:function(){if(void 0!==Object.assign&&!this.captureStarted&&!this.instance.get_config("disable_session_recording")){var e="v2"===this.getRecordingVersion()?"recorder-v2.js":"recorder.js";this.captureStarted=!0,this.instance.__loaded_recorder_version!==this.getRecordingVersion()&&Ee(this.instance.get_config("api_host")+"/static/".concat(e,"?v=").concat(C.LIB_VERSION),this._onScriptLoaded.bind(this)),this._onScriptLoaded()}}},{key:"_updateWindowAndSessionIds",value:function(e){var t,n,r=3===e.type&&0===(null===(t=e.data)||void 0===t?void 0:t.source),i=this.instance.sessionManager.checkAndGetSessionAndWindowId(r,e.timestamp),o=i.windowId,a=i.sessionId;this.windowId===o&&this.sessionId===a||-1!==[ht,pt].indexOf(e.type)||null===(n=this.rrwebRecord)||void 0===n||n.takeFullSnapshot(),this.windowId=o,this.sessionId=a}},{key:"_onScriptLoaded",value:function(){var e,t=this,n={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskAllInputs:!0,maskInputOptions:{},maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0,recordCanvas:!1};this.rrwebRecord=window.rrweb?window.rrweb.record:window.rrwebRecord;for(var r=this.instance.get_config("session_recording"),a=0,s=Object.entries(r||{});a<s.length;a++){var l=m(s[a],2),c=l[0],u=l[1];c in n&&(n[c]=u)}this.stopRrweb=null===(e=this.rrwebRecord)||void 0===e?void 0:e.call(this,i({emit:function(e){e=function(e){if(e&&"object"===o(e)&&6===e.type&&"object"===o(e.data)&&"rrweb/console@1"===e.data.plugin){e.data.payload.payload.length>10&&(e.data.payload.payload=e.data.payload.payload.slice(0,10),e.data.payload.payload.push("...[truncated]"));for(var t=[],n=0;n<e.data.payload.payload.length;n++)e.data.payload.payload[n]&&e.data.payload.payload[n].length>2e3?t.push(e.data.payload.payload[n].slice(0,2e3)+"...[truncated]"):t.push(e.data.payload.payload[n]);return e.data.payload.payload=t,e}return e}(function(e){if(e&&"object"===o(e)){var t=JSON.stringify(e);if(t.length>5e6){var n,r=b(t.matchAll(/data:([\w\/\-\.]+);(\w+),([^)"]*)/gim));try{for(r.s();!(n=r.n()).done;){var i=n.value;t="image/"===i[1].toLocaleLowerCase().slice(0,6)?t.replace(i[0],"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJibGFjayIvPgo8cGF0aCBkPSJNOCAwSDE2TDAgMTZWOEw4IDBaIiBmaWxsPSIjMkQyRDJEIi8+CjxwYXRoIGQ9Ik0xNiA4VjE2SDhMMTYgOFoiIGZpbGw9IiMyRDJEMkQiLz4KPC9zdmc+Cg=="):t.replace(i[0],"")}}catch(e){r.e(e)}finally{r.f()}}return JSON.parse(t)}return e}(e)),t._updateWindowAndSessionIds(e);var n={$snapshot_data:e,$session_id:t.sessionId,$window_id:t.windowId};t.instance._captureMetrics.incr("rrweb-record"),t.instance._captureMetrics.incr("rrweb-record-".concat(e.type)),t.emit?t._captureSnapshot(n):t.snapshots.push(n)},plugins:window.rrwebConsoleRecord&&this.isConsoleLogCaptureEnabled()?[window.rrwebConsoleRecord.getRecordConsolePlugin()]:[]},n)),this.instance._addCaptureHook((function(e){var n;"$pageview"===e&&(null===(n=t.rrwebRecord)||void 0===n||n.addCustomEvent("$pageview",{href:window.location.href}))}))}},{key:"_captureSnapshot",value:function(e){this.instance.capture("$snapshot",e,{transport:"XHR",method:"POST",endpoint:this.endpoint,_noTruncate:!0,_batchKey:"sessionRecording",_metrics:{rrweb_full_snapshot:e.$snapshot_data.type===ht}})}}]),e}(),ft={entryType:0,timeOrigin:1,name:2,startTime:3,redirectStart:4,redirectEnd:5,workerStart:6,fetchStart:7,domainLookupStart:8,domainLookupEnd:9,connectStart:10,secureConnectionStart:11,connectEnd:12,requestStart:13,responseStart:14,responseEnd:15,decodedBodySize:16,encodedBodySize:17,initiatorType:18,nextHopProtocol:19,renderBlockingStatus:20,responseStatus:21,transferSize:22,element:23,renderTime:24,loadTime:25,size:26,id:27,url:28,domComplete:29,domContentLoadedEvent:30,domInteractive:31,loadEventEnd:32,loadEventStart:33,redirectCount:34,navigationType:35,unloadEventEnd:36,unloadEventStart:37,duration:39,timestamp:40},_t=["first-input","navigation","paint","resource"],bt=["/s/","/e/"],vt=function(){function e(t){a(this,e),this.instance=t}return l(e,[{key:"startObservingIfEnabled",value:function(){this.isEnabled()?this.startObserving():this.stopObserving()}},{key:"startObserving",value:function(){var e=this;if(!this.observer)try{this.observer=new PerformanceObserver((function(t){t.getEntries().forEach((function(t){e._capturePerformanceEvent(t)}))}));var t=PerformanceObserver.supportedEntryTypes.filter((function(e){return _t.includes(e)}));t.forEach((function(t){var n;null===(n=e.observer)||void 0===n||n.observe({type:t,buffered:!0})}))}catch(e){console.error("PostHog failed to start performance observer",e),this.stopObserving()}}},{key:"stopObserving",value:function(){this.observer&&(this.observer.disconnect(),this.observer=void 0)}},{key:"isObserving",value:function(){return!!this.observer}},{key:"isEnabled",value:function(){var e,t;return null!==(e=null!==(t=this.instance.get_config("capture_performance"))&&void 0!==t?t:this.remoteEnabled)&&void 0!==e&&e}},{key:"afterDecideResponse",value:function(e){this.remoteEnabled=e.capturePerformance||!1,this.isEnabled()&&this.startObserving()}},{key:"_capturePerformanceEvent",value:function(e){if(e.name.startsWith(this.instance.get_config("api_host"))){var t=e.name.replace(this.instance.get_config("api_host"),"");if(bt.find((function(e){return t.startsWith(e)})))return}var n=e.toJSON(),r={},i=Math.floor(Date.now()-performance.now());for(var o in r[ft.timeOrigin]=i,r[ft.timestamp]=Math.floor(i+e.startTime),ft)void 0!==n[o]&&(r[ft[o]]=n[o]);if(this.capturePerformanceEvent(r),yt(e)){var a,s=b(e.serverTiming||[]);try{for(s.s();!(a=s.n()).done;){var l,u=a.value;this.capturePerformanceEvent((c(l={},ft.timeOrigin,i),c(l,ft.timestamp,Math.floor(i+e.startTime)),c(l,ft.name,u.name),c(l,ft.duration,u.duration),c(l,ft.entryType,"serverTiming"),l))}}catch(e){s.e(e)}finally{s.f()}}}},{key:"capturePerformanceEvent",value:function(e){this.instance.capture("$performance_event",e,{transport:"XHR",method:"POST",endpoint:"/e/",_noTruncate:!0,_batchKey:"performanceEvent"})}}]),e}(),yt=function(e){return"navigation"===e.entryType||"resource"===e.entryType},Et=function(){function e(t){a(this,e),this.instance=t,this.instance.decideEndpointWasHit=this.instance._hasBootstrappedFeatureFlags()}return l(e,[{key:"call",value:function(){var e=this,t=ne(JSON.stringify({token:this.instance.get_config("token"),distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups()}));this.instance._send_request("".concat(this.instance.get_config("api_host"),"/decide/?v=3"),{data:t,verbose:!0},{method:"POST"},(function(t){return e.parseDecideResponse(t)}))}},{key:"parseDecideResponse",value:function(e){var t,n,r=this;if(0!==(null==e?void 0:e.status)){if(this.instance.decideEndpointWasHit=!0,!document||!document.body)return console.log("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((function(){r.parseDecideResponse(e)}),500);if(this.instance.toolbar.afterDecideResponse(e),null===(t=this.instance.sessionRecording)||void 0===t||t.afterDecideResponse(e),xe.afterDecideResponse(e,this.instance),null===(n=this.instance.webPerformance)||void 0===n||n.afterDecideResponse(e),this.instance.featureFlags.receivedFeatureFlags(e),this.instance.compression={},e.supportedCompression&&!this.instance.get_config("disable_compression")){var i,o={},a=b(e.supportedCompression);try{for(a.s();!(i=a.n()).done;)o[i.value]=!0}catch(e){a.e(e)}finally{a.f()}this.instance.compression=o}if(e.siteApps)if(this.instance.get_config("opt_in_site_apps")){var s,l=this.instance.get_config("api_host"),c=b(e.siteApps);try{var u=function(){var e=s.value,t=e.id,n=e.url,i=document.createElement("script");i.src=[l,"/"===l[l.length-1]&&"/"===n[0]?n.substring(1):n].join(""),i.onerror=function(e){console.error("Error while initializing PostHog app with config id ".concat(t),e)},window["__$$ph_site_app_".concat(t)]=r.instance,document.body.appendChild(i)};for(c.s();!(s=c.n()).done;)u()}catch(e){c.e(e)}finally{c.f()}}else e.siteApps.length>0&&console.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}else console.error("Failed to fetch feature flags from PostHog.")}}]),e}(),St=["https://app.posthog.com","https://eu.posthog.com"],wt=["source"],Tt=function(){function e(t){a(this,e),this.instance=t}return l(e,[{key:"afterDecideResponse",value:function(e){var t=e.toolbarParams||e.editorParams||(e.toolbarVersion?{toolbarVersion:e.toolbarVersion}:{});e.isAuthenticated&&t.toolbarVersion&&0===t.toolbarVersion.indexOf("toolbar")&&this.loadToolbar(i(i({},t),{},{apiURL:this.instance.get_config("api_host")}))}},{key:"maybeLoadToolbar",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.history;try{if(!t){try{window.localStorage.setItem("test","test"),window.localStorage.removeItem("test")}catch(e){return!1}t=window.localStorage}var r,i=le(e.hash,"__posthog")||le(e.hash,"state"),o=i?JSON.parse(decodeURIComponent(i)):null;return o&&"ph_authorize"===o.action?((r=o).source="url",r&&Object.keys(r).length>0&&(o.desiredHash?e.hash=o.desiredHash:n?n.replaceState("",document.title,e.pathname+e.search):e.hash="")):((r=JSON.parse(t.getItem("_postHogToolbarParams")||"{}")).source="localstorage",delete r.userIntent),r.apiURL||(r.apiURL=this.instance.get_config("api_host")),!(!r.token||this.instance.get_config("token")!==r.token||(this.loadToolbar(r),0))}catch(e){return!1}}},{key:"loadToolbar",value:function(e){var t=this;if(window._postHogToolbarLoaded)return!1;window._postHogToolbarLoaded=!0;var n=(null==e?void 0:e.apiURL)||this.instance.get_config("api_host"),r=3e4*Math.floor(Date.now()/3e4),o="".concat(n).concat(n.endsWith("/")?"":"/","static/toolbar.js?_ts=").concat(r),a=!St.includes(this.instance.get_config("api_host"))&&this.instance.get_config("advanced_disable_toolbar_metrics"),s=i(i({apiURL:n,jsURL:n,token:this.instance.get_config("token")},e),a?{instrument:!1}:{});s.source;var l=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(s,wt);return window.localStorage.setItem("_postHogToolbarParams",JSON.stringify(l)),Ee(o,(function(){(window.ph_load_toolbar||window.ph_load_editor)(s,t.instance)})),ce(window,"turbolinks:load",(function(){window._postHogToolbarLoaded=!1,t.loadToolbar(s)})),!0}},{key:"_loadEditor",value:function(e){return this.loadToolbar(e)}},{key:"maybeLoadEditor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.history;return this.maybeLoadToolbar(e,t,n)}}]),e}(),Ct=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e3;a(this,e),this.isPolling=!0,this._event_queue=[],this._empty_queue_count=0,this._poller=void 0,this._pollInterval=t}return l(e,[{key:"setPollInterval",value:function(e){this._pollInterval=e,this.isPolling&&this.poll()}},{key:"poll",value:function(){}},{key:"unload",value:function(){}},{key:"getTime",value:function(){return(new Date).getTime()}}]),e}(),xt=function(e){u(n,Ct);var t=p(n);function n(e,r){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3e3;return a(this,n),(i=t.call(this,o)).handlePollRequest=r,i.captureMetrics=e,i}return l(n,[{key:"enqueue",value:function(e,t,n){this.captureMetrics.incr("batch-enqueue"),this._event_queue.push({url:e,data:t,options:n}),this.isPolling||(this.isPolling=!0,this.poll())}},{key:"poll",value:function(){var e=this;clearTimeout(this._poller),this._poller=setTimeout((function(){if(e._event_queue.length>0){var t=e.formatQueue(),n=function(n){var r=t[n],i=r.url,o=r.data,a=r.options;j(o,(function(t,n){o[n].offset=Math.abs(o[n].timestamp-e.getTime()),delete o[n].timestamp})),e.handlePollRequest(i,o,a),e.captureMetrics.incr("batch-requests"),e.captureMetrics.incr("batch-requests-".concat(i.slice(i.length-2))),e.captureMetrics.incr("batch-handle",o.length),e.captureMetrics.incr("batch-handle-".concat(i.slice(i.length-2)),o.length)};for(var r in t)n(r);e._event_queue.length=0,e._empty_queue_count=0}else e._empty_queue_count++;e._empty_queue_count>4&&(e.isPolling=!1,e._empty_queue_count=0),e.isPolling&&e.poll()}),this._pollInterval)}},{key:"updateUnloadMetrics",value:function(){var e=this.formatQueue();for(var t in e){var n=e[t],r=n.url,i=n.data;this.captureMetrics.incr("batch-unload-requests"),this.captureMetrics.incr("batch-unload-requests-".concat(r.slice(r.length-2))),this.captureMetrics.incr("batch-unload",i.length),this.captureMetrics.incr("batch-unload-".concat(r.slice(r.length-2)),i.length)}}},{key:"unload",value:function(){var e=this;clearTimeout(this._poller);var t=this._event_queue.length>0?this.formatQueue():{};this._event_queue.length=0;var n=Object.values(t);[].concat(g(n.filter((function(e){return 0===e.url.indexOf("/e")}))),g(n.filter((function(e){return 0!==e.url.indexOf("/e")})))).map((function(t){var n=t.url,r=t.data,o=t.options;e.handlePollRequest(n,r,i(i({},o),{},{transport:"sendBeacon"}))}))}},{key:"formatQueue",value:function(){var e={};return j(this._event_queue,(function(t){var n=t.url,r=t.data,i=t.options,o=(i?i._batchKey:null)||n;void 0===e[o]&&(e[o]={data:[],url:n,options:i}),i&&e[o].options&&e[o].options._metrics&&!e[o].options._metrics.rrweb_full_snapshot&&(e[o].options._metrics.rrweb_full_snapshot=i._metrics.rrweb_full_snapshot),e[o].data.push(r)})),e}}]),n}(),Ft=function(){function e(t){a(this,e),this.enabled=t,this.metrics={}}return l(e,[{key:"incr",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.enabled&&(e="phjs-".concat(e),this.metrics[e]=(this.metrics[e]||0)+t)}},{key:"decr",value:function(e){this.enabled&&(e="phjs-".concat(e),this.metrics[e]=(this.metrics[e]||0)-1)}}]),e}(),Dt=Uint8Array,kt=Uint16Array,Ot=Uint32Array,It=new Dt([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),At=new Dt([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Rt=new Dt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Nt=function(e,t){for(var n=new kt(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var i=new Ot(n[30]);for(r=1;r<30;++r)for(var o=n[r];o<n[r+1];++o)i[o]=o-n[r]<<5|r;return[n,i]},Mt=Nt(It,2),Pt=Mt[0],Lt=Mt[1];Pt[28]=258,Lt[258]=28;for(var Bt=Nt(At,0)[1],Ut=new kt(32768),jt=0;jt<32768;++jt){var Gt=(43690&jt)>>>1|(21845&jt)<<1;Gt=(61680&(Gt=(52428&Gt)>>>2|(13107&Gt)<<2))>>>4|(3855&Gt)<<4,Ut[jt]=((65280&Gt)>>>8|(255&Gt)<<8)>>>1}var zt=function(e,t,n){for(var r=e.length,i=0,o=new kt(t);i<r;++i)++o[e[i]-1];var a,s=new kt(t);for(i=0;i<t;++i)s[i]=s[i-1]+o[i-1]<<1;if(n){a=new kt(1<<t);var l=15-t;for(i=0;i<r;++i)if(e[i])for(var c=i<<4|e[i],u=t-e[i],d=s[e[i]-1]++<<u,h=d|(1<<u)-1;d<=h;++d)a[Ut[d]>>>l]=c}else for(a=new kt(r),i=0;i<r;++i)a[i]=Ut[s[e[i]-1]++]>>>15-e[i];return a},Ht=new Dt(288);for(jt=0;jt<144;++jt)Ht[jt]=8;for(jt=144;jt<256;++jt)Ht[jt]=9;for(jt=256;jt<280;++jt)Ht[jt]=7;for(jt=280;jt<288;++jt)Ht[jt]=8;var qt=new Dt(32);for(jt=0;jt<32;++jt)qt[jt]=5;var Vt,$t=zt(Ht,9,0),Kt=zt(qt,5,0),Wt=function(e){return(e/8>>0)+(7&e&&1)},Yt=function(e,t,n){(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);var r=new(e instanceof kt?kt:e instanceof Ot?Ot:Dt)(n-t);return r.set(e.subarray(t,n)),r},Qt=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8},Xt=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},Zt=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,o=n.slice();if(!i)return[new Dt(0),0];if(1==i){var a=new Dt(n[0].s+1);return a[n[0].s]=1,[a,1]}n.sort((function(e,t){return e.f-t.f})),n.push({s:-1,f:25001});var s=n[0],l=n[1],c=0,u=1,d=2;for(n[0]={s:-1,f:s.f+l.f,l:s,r:l};u!=i-1;)s=n[n[c].f<n[d].f?c++:d++],l=n[c!=u&&n[c].f<n[d].f?c++:d++],n[u++]={s:-1,f:s.f+l.f,l:s,r:l};var h=o[0].s;for(r=1;r<i;++r)o[r].s>h&&(h=o[r].s);var p=new kt(h+1),m=Jt(n[u-1],p,0);if(m>t){r=0;var g=0,f=m-t,_=1<<f;for(o.sort((function(e,t){return p[t.s]-p[e.s]||e.f-t.f}));r<i;++r){var b=o[r].s;if(!(p[b]>t))break;g+=_-(1<<m-p[b]),p[b]=t}for(g>>>=f;g>0;){var v=o[r].s;p[v]<t?g-=1<<t-p[v]++-1:++r}for(;r>=0&&g;--r){var y=o[r].s;p[y]==t&&(--p[y],++g)}m=t}return[new Dt(p),m]},Jt=function e(t,n,r){return-1==t.s?Math.max(e(t.l,n,r+1),e(t.r,n,r+1)):n[t.s]=r},en=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new kt(++t),r=0,i=e[0],o=1,a=function(e){n[r++]=e},s=1;s<=t;++s)if(e[s]==i&&s!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)a(32754);o>2&&(a(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(a(i),--o;o>6;o-=6)a(8304);o>2&&(a(o-3<<5|8208),o=0)}for(;o--;)a(i);o=1,i=e[s]}return[n.subarray(0,r),t]},tn=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},nn=function(e,t,n){var r=n.length,i=Wt(t+2);e[i]=255&r,e[i+1]=r>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var o=0;o<r;++o)e[i+o+4]=n[o];return 8*(i+4+r)},rn=function(e,t,n,r,i,o,a,s,l,c,u){Qt(t,u++,n),++i[256];for(var d=Zt(i,15),h=d[0],p=d[1],m=Zt(o,15),g=m[0],f=m[1],_=en(h),b=_[0],v=_[1],y=en(g),E=y[0],S=y[1],w=new kt(19),T=0;T<b.length;++T)w[31&b[T]]++;for(T=0;T<E.length;++T)w[31&E[T]]++;for(var C=Zt(w,7),x=C[0],F=C[1],D=19;D>4&&!x[Rt[D-1]];--D);var k,O,I,A,R=c+5<<3,N=tn(i,Ht)+tn(o,qt)+a,M=tn(i,h)+tn(o,g)+a+14+3*D+tn(w,x)+(2*w[16]+3*w[17]+7*w[18]);if(R<=N&&R<=M)return nn(t,u,e.subarray(l,l+c));if(Qt(t,u,1+(M<N)),u+=2,M<N){k=zt(h,p,0),O=h,I=zt(g,f,0),A=g;var P=zt(x,F,0);for(Qt(t,u,v-257),Qt(t,u+5,S-1),Qt(t,u+10,D-4),u+=14,T=0;T<D;++T)Qt(t,u+3*T,x[Rt[T]]);u+=3*D;for(var L=[b,E],B=0;B<2;++B){var U=L[B];for(T=0;T<U.length;++T){var j=31&U[T];Qt(t,u,P[j]),u+=x[j],j>15&&(Qt(t,u,U[T]>>>5&127),u+=U[T]>>>12)}}}else k=$t,O=Ht,I=Kt,A=qt;for(T=0;T<s;++T)if(r[T]>255){j=r[T]>>>18&31,Xt(t,u,k[j+257]),u+=O[j+257],j>7&&(Qt(t,u,r[T]>>>23&31),u+=It[j]);var G=31&r[T];Xt(t,u,I[G]),u+=A[G],G>3&&(Xt(t,u,r[T]>>>5&8191),u+=At[G])}else Xt(t,u,k[r[T]]),u+=O[r[T]];return Xt(t,u,k[256]),u+O[256]},on=new Ot([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),an=new Dt(0),sn=function(){for(var e=new Ot(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&3988292384)^n>>>1;e[t]=n}return e}(),ln=function(){var e=4294967295;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=sn[255&n^t[r]]^n>>>8;e=n},d:function(){return 4294967295^e}}},cn=function(e,t,n,r,i){return function(e,t,n,r,i,o){var a=e.length,s=new Dt(r+a+5*(1+Math.floor(a/7e3))+i),l=s.subarray(r,s.length-i),c=0;if(!t||a<8)for(var u=0;u<=a;u+=65535){var d=u+65535;d<a?c=nn(l,c,e.subarray(u,d)):(l[u]=o,c=nn(l,c,e.subarray(u,a)))}else{for(var h=on[t-1],p=h>>>13,m=8191&h,g=(1<<n)-1,f=new kt(32768),_=new kt(g+1),b=Math.ceil(n/3),v=2*b,y=function(t){return(e[t]^e[t+1]<<b^e[t+2]<<v)&g},E=new Ot(25e3),S=new kt(288),w=new kt(32),T=0,C=0,x=(u=0,0),F=0,D=0;u<a;++u){var k=y(u),O=32767&u,I=_[k];if(f[O]=I,_[k]=O,F<=u){var A=a-u;if((T>7e3||x>24576)&&A>423){c=rn(e,l,0,E,S,w,C,x,D,u-D,c),x=T=C=0,D=u;for(var R=0;R<286;++R)S[R]=0;for(R=0;R<30;++R)w[R]=0}var N=2,M=0,P=m,L=O-I&32767;if(A>2&&k==y(u-L))for(var B=Math.min(p,A)-1,U=Math.min(32767,u),j=Math.min(258,A);L<=U&&--P&&O!=I;){if(e[u+N]==e[u+N-L]){for(var G=0;G<j&&e[u+G]==e[u+G-L];++G);if(G>N){if(N=G,M=L,G>B)break;var z=Math.min(L,G-2),H=0;for(R=0;R<z;++R){var q=u-L+R+32768&32767,V=q-f[q]+32768&32767;V>H&&(H=V,I=q)}}}L+=(O=I)-(I=f[O])+32768&32767}if(M){E[x++]=268435456|Lt[N]<<18|Bt[M];var $=31&Lt[N],K=31&Bt[M];C+=It[$]+At[K],++S[257+$],++w[K],F=u+N,++T}else E[x++]=e[u],++S[e[u]]}}c=rn(e,l,o,E,S,w,C,x,D,u-D,c),o||(c=nn(l,c,an))}return Yt(s,0,r+Wt(c)+i)}(e,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,n,r,!i)},un=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},dn=function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&un(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}},hn=function(e){return 10+(e.filename&&e.filename.length+1||0)};function pn(e,t){void 0===t&&(t={});var n=ln(),r=e.length;n.p(e);var i=cn(e,t,hn(t),8),o=i.length;return dn(i,t),un(i,o-8,n.d()),un(i,o-4,r),i}function mn(e,t){var n=e.length;if(!t&&"undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var r=new Dt(e.length+(e.length>>>1)),i=0,o=function(e){r[i++]=e},a=0;a<n;++a){if(i+5>r.length){var s=new Dt(i+8+(n-a<<1));s.set(r),r=s}var l=e.charCodeAt(a);l<128||t?o(l):l<2048?(o(192|l>>>6),o(128|63&l)):l>55295&&l<57344?(o(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++a))>>>18),o(128|l>>>12&63),o(128|l>>>6&63),o(128|63&l)):(o(224|l>>>12),o(128|l>>>6&63),o(128|63&l))}return Yt(r,0,i)}t.Compression=void 0,(Vt=t.Compression||(t.Compression={})).GZipJS="gzip-js",Vt.LZ64="lz64",Vt.Base64="base64";var gn,fn,_n,bn=function e(t,n){if(n.blob&&t.buffer)return new Blob([t.buffer],{type:"text/plain"});if(n.sendBeacon||n.blob){var r=e(t,{method:"POST"});return new Blob([r],{type:"application/x-www-form-urlencoded"})}return"POST"!==n.method?null:(i=Array.isArray(t)||(o=t,"[object Uint8Array]"===Object.prototype.toString.call(o))?"data="+encodeURIComponent(t):"data="+encodeURIComponent(t.data),"compression"in t&&t.compression&&(i+="&compression="+t.compression),i);var i,o},vn=function(e){var t=e.url,n=e.data,r=e.headers,i=e.options,o=e.captureMetrics,a=e.callback,s=e.retriesPerformedSoFar,l=e.retryQueue,c=e.onXHRError,u=e.timeout,d=void 0===u?1e4:u,h=new XMLHttpRequest;h.open(i.method||"GET",t,!0);var p=bn(n,i);o.incr("_send_request"),o.incr("_send_request_inflight"),j(r,(function(e,t){h.setRequestHeader(t,e)})),"POST"!==i.method||i.blob||h.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),h.timeout=d,h.withCredentials=!0,h.onreadystatechange=function(){if(4===h.readyState)if(o.incr("xhr-response"),o.incr("xhr-response-".concat(h.status)),o.decr("_send_request_inflight"),200===h.status){if(a){var e;try{e=JSON.parse(h.responseText)}catch(e){return void B.error(e)}a(e)}}else"function"==typeof c&&c(h),[401,403,404,500].indexOf(h.status)<0&&l.enqueue({url:t,data:n,options:i,headers:r,retriesPerformedSoFar:(s||0)+1,callback:a}),a&&a({status:0})},h.send(p)},yn=function(e){u(n,Ct);var t=p(n);function n(e,r){var i;return a(this,n),(i=t.call(this)).captureMetrics=e,i.isPolling=!1,i.queue=[],i.areWeOnline=!0,i.onXHRError=r,"undefined"!=typeof window&&"onLine"in window.navigator&&(i.areWeOnline=window.navigator.onLine,window.addEventListener("online",(function(){i._handleWeAreNowOnline()})),window.addEventListener("offline",(function(){i.areWeOnline=!1}))),i}return l(n,[{key:"enqueue",value:function(e){var t=e.retriesPerformedSoFar||0;if(!(t>=10)){var n=3e3*Math.pow(2,t),r=new Date(Date.now()+n);console.warn("Enqueued failed request for retry in ".concat(n)),this.queue.push({retryAt:r,requestData:e}),this.isPolling||(this.isPolling=!0,this.poll())}}},{key:"poll",value:function(){var e=this;this._poller&&clearTimeout(this._poller),this._poller=setTimeout((function(){e.areWeOnline&&e.queue.length>0&&e.flush(),e.poll()}),this._pollInterval)}},{key:"flush",value:function(){var e=new Date(Date.now()),t=this.queue.filter((function(t){return t.retryAt<e}));if(t.length>0){this.queue=this.queue.filter((function(t){return t.retryAt>=e}));var n,r=b(t);try{for(r.s();!(n=r.n()).done;){var i=n.value.requestData;this._executeXhrRequest(i)}}catch(e){r.e(e)}finally{r.f()}}}},{key:"unload",value:function(){this._poller&&(clearTimeout(this._poller),this._poller=void 0);var e,t=b(this.queue);try{for(t.s();!(e=t.n()).done;){var n=e.value.requestData,r=n.url,o=n.data,a=n.options;try{window.navigator.sendBeacon(r,bn(o,i(i({},a),{},{sendBeacon:!0})))}catch(e){C.DEBUG&&console.error(e)}}}catch(e){t.e(e)}finally{t.f()}this.queue=[]}},{key:"_executeXhrRequest",value:function(e){var t=e.url,n=e.data,r=e.options,i=e.headers,o=e.callback,a=e.retriesPerformedSoFar;vn({url:t,data:n||{},options:r||{},headers:i||{},retriesPerformedSoFar:a||0,callback:o,captureMetrics:this.captureMetrics,retryQueue:this,onXHRError:this.onXHRError})}},{key:"_handleWeAreNowOnline",value:function(){this.areWeOnline=!0,this.flush()}}]),n}(),En=18e5,Sn=864e5,wn=function(){function e(t,n){a(this,e),this.persistence=n,this._windowId=void 0,this._sessionId=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null;var r=t.persistence_name||t.token;if(this.window_id_storage_key="ph_"+r+"_window_id",this.primary_window_exists_storage_key="ph_"+r+"_primary_window_exists",!this.persistence.disabled&&Me.is_supported()){var i=Me.parse(this.window_id_storage_key),o=Me.parse(this.primary_window_exists_storage_key);i&&!o?this._windowId=i:Me.remove(this.window_id_storage_key),Me.set(this.primary_window_exists_storage_key,!0)}this._listenToReloadWindow()}return l(e,[{key:"_setWindowId",value:function(e){e!==this._windowId&&(this._windowId=e,!this.persistence.disabled&&Me.is_supported()&&Me.set(this.window_id_storage_key,e))}},{key:"_getWindowId",value:function(){return this._windowId?this._windowId:!this.persistence.disabled&&Me.is_supported()?Me.parse(this.window_id_storage_key):null}},{key:"_setSessionId",value:function(e,t,n){e===this._sessionId&&t===this._sessionActivityTimestamp&&n===this._sessionStartTimestamp||(this._sessionStartTimestamp=n,this._sessionActivityTimestamp=t,this._sessionId=e,this.persistence.register(c({},st,[t,e,n])))}},{key:"_getSessionId",value:function(){if(this._sessionId&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this._sessionId,this._sessionStartTimestamp];var e=this.persistence.props[st];return Array.isArray(e)&&2===e.length&&e.push(e[0]),e||[0,null,0]}},{key:"resetSessionId",value:function(){this._setSessionId(null,null,null)}},{key:"_listenToReloadWindow",value:function(){var e=this;window.addEventListener("beforeunload",(function(){!e.persistence.disabled&&Me.is_supported()&&Me.remove(e.primary_window_exists_storage_key)}))}},{key:"checkAndGetSessionAndWindowId",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:null)||(new Date).getTime(),n=m(this._getSessionId(),3),r=n[0],i=n[1],o=n[2],a=this._getWindowId(),s=o&&o>0&&Math.abs(t-o)>Sn;!i||!e&&Math.abs(t-r)>En||s?(i=oe(),a=oe(),o=t):a||(a=oe());var l=0===r||!e||s?t:r,c=0===o?(new Date).getTime():o;return this._setWindowId(a),this._setSessionId(i,l,c),{sessionId:i,windowId:a}}}]),e}(),Tn=l((function e(t,n,r,i){a(this,e),this.name="posthog-js",this.setupOnce=function(e){e((function(e){var o,a,s;if("error"!==e.level||!t.__loaded)return e;e.tags||(e.tags={});var l=t.config.ui_host||t.config.api_host;e.tags["PostHog Person URL"]=l+"/person/"+t.get_distinct_id(),t.sessionRecordingStarted()&&(e.tags["PostHog Recording URL"]=l+"/recordings/"+t.sessionManager.checkAndGetSessionAndWindowId(!0).sessionId);var c=(null===(o=e.exception)||void 0===o?void 0:o.values)||[],u={$sentry_event_id:e.event_id,$sentry_exception:e.exception,$sentry_exception_message:null===(a=c[0])||void 0===a?void 0:a.value,$sentry_exception_type:null===(s=c[0])||void 0===s?void 0:s.type,$sentry_tags:e.tags};return n&&r&&(u.$sentry_url=(i||"https://sentry.io/organizations/")+n+"/issues/?project="+r+"&query="+e.event_id),t.capture("$exception",u),e}))}})),Cn=function(e){var t=function(t,n){t.event.userId||t.event.anonymousId===e.get_distinct_id()||e.reset(),t.event.userId&&t.event.userId!==e.get_distinct_id()&&(e.register({distinct_id:t.event.userId}),e.reloadFeatureFlags());var r=e._calculate_event_properties(n,t.event.properties);return t.event.properties=Object.assign({},r,t.event.properties),t};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:function(e){return t(e,e.event.event)},page:function(e){return t(e,"$pageview")},identify:function(e){return t(e,"$identify")},screen:function(e){return t(e,"$screen")}}},xn=function(){function e(){a(this,e),c(this,"_seenFirstPageView",!1)}return l(e,[{key:"onPageview",value:function(){this._seenFirstPageView&&(this._pageViewId=oe()),this._seenFirstPageView=!0}},{key:"getPageViewId",value:function(){return this._pageViewId||(this._pageViewId=oe()),this._pageViewId}}]),e}();!function(e){e[e.INIT_MODULE=0]="INIT_MODULE",e[e.INIT_SNIPPET=1]="INIT_SNIPPET"}(gn||(gn={}));var Fn=function(){},Dn={},kn="posthog",On=O.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,In=!On&&-1===R.indexOf("MSIE")&&-1===R.indexOf("Mozilla"),An=function(){var e,t,n;return{api_host:"https://app.posthog.com",api_method:"POST",api_transport:"XHR",ui_host:null,token:"",autocapture:!0,rageclick:!0,cross_subdomain_cookie:-1===(null==A||null===(e=A.location)||void 0===e||null===(t=e.hostname)||void 0===t?void 0:t.indexOf("herokuapp.com")),persistence:"cookie",persistence_name:"",cookie_name:"",loaded:Fn,store_google:!0,save_referrer:!0,test:!1,verbose:!1,img:!1,capture_pageview:!0,capture_pageleave:!0,debug:!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_cookie:!1,enable_recording_console_log:void 0,secure_cookie:"https:"===(null==O||null===(n=O.location)||void 0===n?void 0:n.protocol),ip:!0,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_capturing_persistence_type:"localStorage",opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_blacklist:[],respect_dnt:!1,sanitize_properties:null,xhr_headers:{},inapp_protocol:"//",inapp_link_new_window:!1,request_batching:!0,properties_string_max_length:65535,session_recording:{blockClass:"ph-no-capture",blockSelector:null,ignoreClass:"ph-ignore-input",maskAllInputs:!0,maskInputOptions:{},maskInputFn:null,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0},mask_all_element_attributes:!1,mask_all_text:!1,advanced_disable_decide:!1,advanced_disable_toolbar_metrics:!1,on_xhr_error:function(e){var t="Bad HTTP status: "+e.status+" "+e.statusText;console.error(t)},get_device_id:function(e){return e},_onCapture:Fn,_capture_metrics:!1,capture_performance:void 0,name:"posthog",callback_fn:"posthog._jsc",bootstrap:{},disable_compression:!1}},Rn=function(e,t,n){var r,i=n!==kn&&_n?n?_n[n]:void 0:_n;if(i&&fn===gn.INIT_MODULE)r=i;else{if(i&&!H(i))return void console.error("You have already initialized "+n);r=new Nn}return r._init(e,t,n),r.toolbar.maybeLoadToolbar(),r.sessionRecording=new gt(r),r.sessionRecording.startRecordingIfEnabled(),r.webPerformance=new vt(r),r.webPerformance.startObservingIfEnabled(),r.__autocapture=r.get_config("autocapture"),r.get_config("autocapture")&&(r.__autocapture=r.get_config("autocapture"),xe.enabledForProject(r.get_config("token"),100,100)?xe.isBrowserSupported()?xe.init(r):(r.__autocapture=!1,B.log("Disabling Automatic Event Collection because this browser is not supported")):(r.__autocapture=!1,B.log("Not in active bucket: disabling Automatic Event Collection."))),C.DEBUG=C.DEBUG||r.get_config("debug"),void 0!==i&&H(i)&&(r._execute_array.call(r.people,i.people),r._execute_array(i)),r},Nn=function(){function e(){var t=this;a(this,e),this.config=An(),this.compression={},this.decideEndpointWasHit=!1,this.SentryIntegration=Tn,this.segmentIntegration=function(){return Cn(t)},this.__captureHooks=[],this.__request_queue=[],this.__loaded=!1,this.__loaded_recorder_version=void 0,this.__autocapture=void 0,this._jsc=function(){},this.people=new Ye(this),this.featureFlags=new et(this),this.feature_flags=this.featureFlags,this.toolbar=new Tt(this),this.pageViewIdManager=new xn,this._captureMetrics=void 0,this._requestQueue=void 0,this._retryQueue=void 0,this.persistence=void 0,this.sessionManager=void 0}return l(e,[{key:"init",value:function(e,t,n){if(K(n))console.error("You must name your new library: init(token, config, name)");else{if(n!==kn){var r=Rn(e,t,n);return _n[n]=r,r._loaded(),r}console.error("You must initialize the main posthog object right after you include the PostHog js snippet")}}},{key:"_init",value:function(e){var t,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0;if(this.__loaded=!0,this.config={},this._triggered_notifs=[],this.set_config(z({},An(),i,{name:o,token:e,callback_fn:(o===kn?o:kn+"."+o)+"._jsc"})),this._jsc=function(){},(null!=O&&null!==(t=O.rrweb)&&void 0!==t&&t.record||null!=O&&O.rrwebRecord)&&(this.__loaded_recorder_version=null==O||null===(r=O.rrweb)||void 0===r?void 0:r.version),this._captureMetrics=new Ft(this.get_config("_capture_metrics")),this._requestQueue=new xt(this._captureMetrics,this._handle_queued_event.bind(this)),this._retryQueue=new yn(this._captureMetrics,this.get_config("on_xhr_error")),this.__captureHooks=[],this.__request_queue=[],this.persistence=new dt(this.config),this.sessionManager=new wn(this.config,this.persistence),this._gdpr_init(),i.segment&&(this.config.get_device_id=function(){return i.segment.user().anonymousId()},i.segment.user().id()&&(this.register({distinct_id:i.segment.user().id()}),this.persistence.set_user_state("identified")),i.segment.register(this.segmentIntegration())),void 0!==(null===(n=i.bootstrap)||void 0===n?void 0:n.distinctID)){var a,s,l=this.get_config("get_device_id")(oe()),c=null!==(a=i.bootstrap)&&void 0!==a&&a.isIdentifiedID?l:i.bootstrap.distinctID;this.persistence.set_user_state(null!==(s=i.bootstrap)&&void 0!==s&&s.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:i.bootstrap.distinctID,$device_id:c})}if(this._hasBootstrappedFeatureFlags()){var u,d,h=Object.keys((null===(u=i.bootstrap)||void 0===u?void 0:u.featureFlags)||{}).filter((function(e){var t,n;return!(null===(t=i.bootstrap)||void 0===t||null===(n=t.featureFlags)||void 0===n||!n[e])})).reduce((function(e,t){var n,r;return e[t]=(null===(n=i.bootstrap)||void 0===n||null===(r=n.featureFlags)||void 0===r?void 0:r[t])||!1,e}),{}),p=Object.keys((null===(d=i.bootstrap)||void 0===d?void 0:d.featureFlagPayloads)||{}).filter((function(e){return h[e]})).reduce((function(e,t){var n,r,o,a;return null!==(n=i.bootstrap)&&void 0!==n&&null!==(r=n.featureFlagPayloads)&&void 0!==r&&r[t]&&(e[t]=null===(o=i.bootstrap)||void 0===o||null===(a=o.featureFlagPayloads)||void 0===a?void 0:a[t]),e}),{});this.featureFlags.receivedFeatureFlags({featureFlags:h,featureFlagPayloads:p})}if(!this.get_distinct_id()){var m=this.get_config("get_device_id")(oe());this.register_once({distinct_id:m,$device_id:m},""),this.persistence.set_user_state("anonymous")}O.addEventListener&&O.addEventListener("onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this))}},{key:"_loaded",value:function(){this.featureFlags.setReloadingPaused(!0);try{this.get_config("loaded")(this)}catch(e){console.error("`loaded` function failed",e)}this._start_queue_if_opted_in(),this.get_config("capture_pageview")&&this.capture("$pageview",{},{send_instantly:!0}),this.get_config("advanced_disable_decide")||new Et(this).call(),this.featureFlags.resetRequestQueue(),this.featureFlags.setReloadingPaused(!1)}},{key:"_start_queue_if_opted_in",value:function(){this.has_opted_out_capturing()||this.get_config("request_batching")&&this._requestQueue.poll()}},{key:"_dom_loaded",value:function(){var e=this;this.has_opted_out_capturing()||G(this.__request_queue,(function(t){e._send_request.apply(e,g(t))})),this.__request_queue=[],this._start_queue_if_opted_in()}},{key:"_prepare_callback",value:function(e,t){if(K(e))return null;if(On)return function(n){e(n,t)};var n=this._jsc,r=""+Math.floor(1e8*Math.random()),i=this.get_config("callback_fn")+"["+r+"]";return n[r]=function(i){delete n[r],e(i,t)},i}},{key:"_handle_unload",value:function(){this.get_config("request_batching")?(this.get_config("capture_pageview")&&this.get_config("capture_pageleave")&&this.capture("$pageleave"),this.get_config("_capture_metrics")&&(this._requestQueue.updateUnloadMetrics(),this.capture("$capture_metrics",this._captureMetrics.metrics)),this._requestQueue.unload(),this._retryQueue.unload()):this.get_config("capture_pageview")&&this.get_config("capture_pageleave")&&this.capture("$pageleave",null,{transport:"sendBeacon"})}},{key:"_handle_queued_event",value:function(e,t,n){var r=JSON.stringify(t);this.__compress_and_send_json_request(e,r,n||Dn,Fn)}},{key:"__compress_and_send_json_request",value:function(e,n,r,o){var a,s=function(e,n,r){return e===t.Compression.LZ64?[{data:T.compressToBase64(n),compression:t.Compression.LZ64},r]:e===t.Compression.GZipJS?[pn(mn(n),{mtime:0}),i(i({},r),{},{blob:!0,urlQueryArgs:{compression:t.Compression.GZipJS}})]:[{data:ne(n)},r]}((a=this.compression)[t.Compression.GZipJS]?t.Compression.GZipJS:a[t.Compression.LZ64]?t.Compression.LZ64:t.Compression.Base64,n,r),l=m(s,2),c=l[0],u=l[1];this._send_request(e,c,u,o)}},{key:"_send_request",value:function(e,t,n,r){if(In)this.__request_queue.push([e,t,n,r]);else{var o={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")};n=z(o,n||{}),On||(n.method="GET");var a="sendBeacon"in O.navigator&&"sendBeacon"===n.transport;if(e=function(e,t,n){var r=t||{};r.ip=n.ip?1:0,r._=(new Date).getTime().toString(),r.ver=C.LIB_VERSION;var i=e.split("?");if(i.length>1){var o,a=b(i[1].split("&"));try{for(a.s();!(o=a.n()).done;){var s=o.value.split("=")[0];r[s]&&delete r[s]}}catch(e){a.e(e)}finally{a.f()}}var l=e.indexOf("?")>-1?"&":"?";return e+l+function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"&",i=[];return j(e,(function(e,r){t=encodeURIComponent(e.toString()),n=encodeURIComponent(r),i[i.length]=n+"="+t})),i.join(r)}(r)}(e,n.urlQueryArgs||{},{ip:this.get_config("ip")}),$(t)&&this.get_config("img")){var s=A.createElement("img");s.src=e,A.body.appendChild(s)}else if(a)try{O.navigator.sendBeacon(e,bn(t,i(i({},n),{},{sendBeacon:!0})))}catch(e){this.get_config("debug")&&console.error(e)}else if(On)try{vn({url:e,data:t,headers:this.get_config("xhr_headers"),options:n,captureMetrics:this._captureMetrics,callback:r,retriesPerformedSoFar:0,retryQueue:this._retryQueue,onXHRError:this.get_config("on_xhr_error")})}catch(e){console.error(e)}else{var l,c=A.createElement("script");c.type="text/javascript",c.async=!0,c.defer=!0,c.src=e;var u=A.getElementsByTagName("script")[0];null===(l=u.parentNode)||void 0===l||l.insertBefore(c,u)}}}},{key:"_execute_array",value:function(e){var t,n=this,r=[],i=[],o=[];G(e,(function(e){e&&(t=e[0],H(t)?o.push(e):"function"==typeof e?e.call(n):H(e)&&"alias"===t?r.push(e):H(e)&&-1!==t.indexOf("capture")&&"function"==typeof n[t]?o.push(e):i.push(e))}));var a=function(e,t){G(e,(function(e){if(H(e[0])){var n=t;j(e,(function(e){n=n[e[0]].apply(n,e.slice(1))}))}else this[e[0]].apply(this,e.slice(1))}),t)};a(r,this),a(i,this),a(o,this)}},{key:"_hasBootstrappedFeatureFlags",value:function(){var e,t;return(null===(e=this.config.bootstrap)||void 0===e?void 0:e.featureFlags)&&Object.keys(null===(t=this.config.bootstrap)||void 0===t?void 0:t.featureFlags).length>0||!1}},{key:"push",value:function(e){this._execute_array([e])}},{key:"capture",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Dn;if(this.__loaded&&!$e(this,!1)){this._captureMetrics.incr("capture"),"$snapshot"===e&&this._captureMetrics.incr("snapshot");var r=(n=n||Dn).transport;if(r&&(n.transport=r),K(e)||"string"!=typeof e)console.error("No event name provided to posthog.capture");else if(!ae(R)){this.persistence.update_search_keyword(A.referrer),this.get_config("store_google")&&this.persistence.update_campaign_params(),this.get_config("save_referrer")&&this.persistence.update_referrer_info(A.referrer);var i={event:e,properties:this._calculate_event_properties(e,t||{})};"$identify"===e&&n.$set&&(i.$set=n.$set),(i=te(i,n._noTruncate?null:this.get_config("properties_string_max_length"))).timestamp=n.timestamp||new Date,this.get_config("debug")&&B.log("PostHog.js send",i);var o=JSON.stringify(i),a=this.get_config("api_host")+(n.endpoint||"/e/"),s=n!==Dn;return!this.get_config("request_batching")||s&&!n._batchKey||n.send_instantly?this.__compress_and_send_json_request(a,o,n):this._requestQueue.enqueue(a,i,n),this._invokeCaptureHooks(e,i),i}}}},{key:"_addCaptureHook",value:function(e){this.__captureHooks.push(e)}},{key:"_invokeCaptureHooks",value:function(e,t){this.config._onCapture(e,t),j(this.__captureHooks,(function(t){return t(e)}))}},{key:"_calculate_event_properties",value:function(e,t){var n,r=this.persistence.remove_event_timer(e),o=i({},t);if(o.token=this.get_config("token"),"$snapshot"===e){var a=this.persistence.properties();return o.distinct_id=a.distinct_id,o}var s=ue.properties();if(this.sessionManager){var l=this.sessionManager.checkAndGetSessionAndWindowId(),c=l.sessionId,u=l.windowId;o.$session_id=c,o.$window_id=u}if(null!==(n=this.webPerformance)&&void 0!==n&&n.isEnabled&&("$pageview"===e&&this.pageViewIdManager.onPageview(),o=z(o,{$pageview_id:this.pageViewIdManager.getPageViewId()})),"$performance_event"===e){var d=this.persistence.properties();return o.distinct_id=d.distinct_id,o.$current_url=s.$current_url,o}if(void 0!==r){var h=(new Date).getTime()-r;o.$duration=parseFloat((h/1e3).toFixed(3))}o=z({},s,this.persistence.properties(),o);var p=this.get_config("property_blacklist");H(p)?j(p,(function(e){delete o[e]})):console.error("Invalid value for property_blacklist config: "+p);var m=this.get_config("sanitize_properties");return m&&(o=m(o,e)),o}},{key:"register",value:function(e,t){this.persistence.register(e,t)}},{key:"register_once",value:function(e,t,n){this.persistence.register_once(e,t,n)}},{key:"unregister",value:function(e){this.persistence.unregister(e)}},{key:"_register_single",value:function(e,t){this.register(c({},e,t))}},{key:"getFeatureFlag",value:function(e,t){return this.featureFlags.getFeatureFlag(e,t)}},{key:"getFeatureFlagPayload",value:function(e){var t=this.featureFlags.getFeatureFlagPayload(e);try{return JSON.parse(t)}catch(e){return t}}},{key:"isFeatureEnabled",value:function(e,t){return this.featureFlags.isFeatureEnabled(e,t)}},{key:"reloadFeatureFlags",value:function(){this.featureFlags.reloadFeatureFlags()}},{key:"onFeatureFlags",value:function(e){return this.featureFlags.onFeatureFlags(e)}},{key:"identify",value:function(e,t,n){if(e){this._captureMetrics.incr("identify");var r=this.get_distinct_id();if(this.register({$user_id:e}),!this.get_property("$device_id")){var i=r;this.register_once({$had_persisted_distinct_id:!0,$device_id:i},"")}e!==r&&e!==this.get_property(nt)&&(this.unregister(nt),this.register({distinct_id:e}));var o="anonymous"===this.persistence.get_user_state();e!==r&&o?(this.persistence.set_user_state("identified"),this.capture("$identify",{distinct_id:e,$anon_distinct_id:r},{$set:t||{},$set_once:n||{}}),this.featureFlags.setAnonymousDistinctId(r)):(t&&this.people.set(t),n&&this.people.set_once(n)),e!==r&&this.reloadFeatureFlags()}else console.error("Unique user id has not been set in posthog.identify")}},{key:"group",value:function(e,t,n){if(e&&t){this._captureMetrics.incr("group");var r=this.getGroups();this.register({$groups:i(i({},r),{},c({},e,t))}),n&&this.capture("$groupidentify",{$group_type:e,$group_key:t,$group_set:n}),r[e]!==t&&this.reloadFeatureFlags()}else console.error("posthog.group requires a group type and group key")}},{key:"resetGroups",value:function(){this.register({$groups:{}}),this.reloadFeatureFlags()}},{key:"reset",value:function(e){var t=this.get_property("$device_id");this.persistence.clear(),this.persistence.set_user_state("anonymous"),this.sessionManager.resetSessionId();var n=this.get_config("get_device_id")(oe());this.register_once({distinct_id:n,$device_id:e?n:t},"")}},{key:"get_distinct_id",value:function(){return this.get_property("distinct_id")}},{key:"getGroups",value:function(){return this.get_property("$groups")||{}}},{key:"alias",value:function(e,t){return e===this.get_property(tt)?(B.critical("Attempting to create alias for existing People user - aborting."),-2):(K(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(nt,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(console.error("alias matches current distinct_id - skipping api call."),this.identify(e),-1))}},{key:"set_config",value:function(e){var t=i({},this.config);$(e)&&(z(this.config,e),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),Oe.is_supported()&&"true"===Oe.get("ph_debug")&&(this.config.debug=!0),this.get_config("debug")&&(C.DEBUG=!0),this.sessionRecording&&void 0!==e.disable_session_recording&&t.disable_session_recording!==e.disable_session_recording&&(e.disable_session_recording?this.sessionRecording.stopRecording():this.sessionRecording.startRecordingIfEnabled()))}},{key:"startSessionRecording",value:function(){this.set_config({disable_session_recording:!1})}},{key:"stopSessionRecording",value:function(){this.set_config({disable_session_recording:!0})}},{key:"sessionRecordingStarted",value:function(){var e;return!(null===(e=this.sessionRecording)||void 0===e||!e.started())}},{key:"loadToolbar",value:function(e){return this.toolbar.loadToolbar(e)}},{key:"get_config",value:function(e){var t;return null===(t=this.config)||void 0===t?void 0:t[e]}},{key:"get_property",value:function(e){return this.persistence.props[e]}},{key:"toString",value:function(){var e,t=null!==(e=this.get_config("name"))&&void 0!==e?e:kn;return t!==kn&&(t=kn+"."+t),t}},{key:"_gdpr_init",value:function(){"localStorage"===this.get_config("opt_out_capturing_persistence_type")&&Oe.is_supported()&&(!this.has_opted_in_capturing()&&this.has_opted_in_capturing({persistence_type:"cookie"})&&this.opt_in_capturing({enable_persistence:!1}),!this.has_opted_out_capturing()&&this.has_opted_out_capturing({persistence_type:"cookie"})&&this.opt_out_capturing({clear_persistence:!1}),this.clear_opt_in_out_capturing({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_capturing()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_capturing()||!this.get_config("opt_out_capturing_by_default")&&!De.get("ph_optout")||(De.remove("ph_optout"),this.opt_out_capturing({clear_persistence:this.get_config("opt_out_persistence_by_default")}))}},{key:"_gdpr_update_persistence",value:function(e){var t;if(e&&e.clear_persistence)t=!0;else{if(!e||!e.enable_persistence)return;t=!1}this.get_config("disable_persistence")||this.persistence.disabled===t||this.persistence.set_disabled(t)}},{key:"_gdpr_call_func",value:function(e,t){return t=z({capture:this.capture.bind(this),persistence_type:this.get_config("opt_out_capturing_persistence_type"),cookie_prefix:this.get_config("opt_out_capturing_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),secure_cookie:this.get_config("secure_cookie")},t||{}),Oe.is_supported()||"localStorage"!==t.persistence_type||(t.persistence_type="cookie"),e(this.get_config("token"),{capture:t.capture,captureEventName:t.capture_event_name,captureProperties:t.capture_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieExpiration:t.cookie_expiration,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie})}},{key:"opt_in_capturing",value:function(e){e=z({enable_persistence:!0},e||{}),this._gdpr_call_func(Le,e),this._gdpr_update_persistence(e)}},{key:"opt_out_capturing",value:function(e){var t=z({clear_persistence:!0},e||{});this._gdpr_call_func(Be,t),this._gdpr_update_persistence(t)}},{key:"has_opted_in_capturing",value:function(e){return this._gdpr_call_func(Ue,e)}},{key:"has_opted_out_capturing",value:function(e){return this._gdpr_call_func(je,e)}},{key:"clear_opt_in_out_capturing",value:function(e){var t=z({enable_persistence:!0},null!=e?e:{});this._gdpr_call_func(Ge,t),this._gdpr_update_persistence(t)}},{key:"debug",value:function(e){!1===e?(O.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(O.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),localStorage&&localStorage.setItem("ph_debug","true"),this.set_config({debug:!0}))}},{key:"decodeLZ64",value:function(e){return T.decompressFromBase64(e||null)}}]),e}();!function(e,t){for(var n=0;n<t.length;n++)e.prototype[t[n]]=Z(e.prototype[t[n]])}(Nn,["identify"]);var Mn={},Pn=(fn=gn.INIT_MODULE,(_n=new Nn).init=function(e,t,n){if(n)return _n[n]||(_n[n]=Mn[n]=Rn(e||"",t||{},n),_n[n]._loaded()),_n[n];var r=_n;return Mn[kn]?r=Mn[kn]:e&&((r=Rn(e,t||{},kn))._loaded(),Mn[kn]=r),_n=r,fn===gn.INIT_SNIPPET&&(O[kn]=_n),j(Mn,(function(e,t){t!==kn&&(_n[t]=e)})),r},_n.init(),function(){function e(){e.done||(e.done=!0,In=!1,j(Mn,(function(e){e._dom_loaded()})))}A.addEventListener&&("complete"===A.readyState?e():A.addEventListener("DOMContentLoaded",e,!1)),ce(O,"load",e,!0)}(),_n);t.PostHog=Nn,t.default=Pn,t.posthog=Pn},function(e,t,n){"use strict";var r=n(240),i=n(171);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(132)),a=i(n(130)),s=r(n(120)),l=i(n(678)),c=i(n(1018)),u=s.forwardRef((function(e,t){return s.createElement(l.default,(0,a.default)({sideCar:c.default,ref:t},e))})),d=l.default.propTypes||{};d.sideCar,(0,o.default)(d,["sideCar"]);u.propTypes={};var h=u;t.default=h},function(e,t,n){var r=n(999),i=n(1e3),o=n(679),a=n(1001);e.exports=function(e,t){return r(e)||i(e,t)||o(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";var r=n(1003);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,bigint: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}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useRefToCallback=t.refToCallback=t.transformRef=t.useTransformRef=t.useMergeRefs=t.mergeRefs=t.createCallbackRef=t.useCallbackRef=t.assignRef=void 0;var r=n(363);Object.defineProperty(t,"assignRef",{enumerable:!0,get:function(){return r.assignRef}});var i=n(517);Object.defineProperty(t,"useCallbackRef",{enumerable:!0,get:function(){return i.useCallbackRef}});var o=n(518);Object.defineProperty(t,"createCallbackRef",{enumerable:!0,get:function(){return o.createCallbackRef}});var a=n(1005);Object.defineProperty(t,"mergeRefs",{enumerable:!0,get:function(){return a.mergeRefs}});var s=n(1006);Object.defineProperty(t,"useMergeRefs",{enumerable:!0,get:function(){return s.useMergeRefs}});var l=n(1007);Object.defineProperty(t,"useTransformRef",{enumerable:!0,get:function(){return l.useTransformRef}});var c=n(1008);Object.defineProperty(t,"transformRef",{enumerable:!0,get:function(){return c.transformRef}});var u=n(1009);Object.defineProperty(t,"refToCallback",{enumerable:!0,get:function(){return u.refToCallback}}),Object.defineProperty(t,"useRefToCallback",{enumerable:!0,get:function(){return u.useRefToCallback}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeRefs=void 0;var r=n(363),i=n(518);t.mergeRefs=function(e){return(0,i.createCallbackRef)((function(t){return e.forEach((function(e){return(0,r.assignRef)(e,t)}))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useMergeRefs=void 0;var r=n(363),i=n(517);t.useMergeRefs=function(e,t){return(0,i.useCallbackRef)(t||null,(function(t){return e.forEach((function(e){return(0,r.assignRef)(e,t)}))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useTransformRef=void 0;var r=n(363),i=n(517);t.useTransformRef=function(e,t){return(0,i.useCallbackRef)(null,(function(n){return(0,r.assignRef)(e,t(n))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transformRef=void 0;var r=n(363),i=n(518);t.transformRef=function(e,t){return(0,i.createCallbackRef)((function(n){return(0,r.assignRef)(e,t(n))}))}},function(e,t,n){"use strict";function r(e){return function(t){"function"==typeof e?e(t):e&&(e.current=t)}}Object.defineProperty(t,"__esModule",{value:!0}),t.useRefToCallback=t.refToCallback=void 0,t.refToCallback=r;var i=function(){return null},o=new WeakMap,a=function(e){var t=e||i,n=o.get(t);if(n)return n;var a=r(t);return o.set(t,a),a};t.useRefToCallback=function(e){return a(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exportSidecar=t.renderCar=t.createSidecarMedium=t.createMedium=t.setConfig=t.useSidecar=t.sidecar=void 0;var r=n(1011);Object.defineProperty(t,"sidecar",{enumerable:!0,get:function(){return r.sidecar}});var i=n(682);Object.defineProperty(t,"useSidecar",{enumerable:!0,get:function(){return i.useSidecar}});var o=n(1014);Object.defineProperty(t,"setConfig",{enumerable:!0,get:function(){return o.setConfig}});var a=n(1015);Object.defineProperty(t,"createMedium",{enumerable:!0,get:function(){return a.createMedium}}),Object.defineProperty(t,"createSidecarMedium",{enumerable:!0,get:function(){return a.createSidecarMedium}});var s=n(1016);Object.defineProperty(t,"renderCar",{enumerable:!0,get:function(){return s.renderCar}});var l=n(1017);Object.defineProperty(t,"exportSidecar",{enumerable:!0,get:function(){return l.exportSidecar}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sidecar=void 0;var r=n(364),i=r.__importStar(n(120)),o=n(682);t.sidecar=function(e,t){var n=function(){return t};return function(a){var s=(0,o.useSidecar)(e,a.sideCar),l=s[0];return s[1]&&t?n:l?i.createElement(l,r.__assign({},a)):null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.env=void 0;var r=n(1013);t.env={isNode:r.isNode,forceCache:!1}},function(e,t){e.exports.isNode=!1},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setConfig=t.config=void 0,t.config={onError:function(e){return console.error(e)}};t.setConfig=function(e){Object.assign(t.config,e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSidecarMedium=t.createMedium=void 0;var r=n(364);function i(e){return e}function o(e,t){void 0===t&&(t=i);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter((function(e){return e!==i}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var o=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(o)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}}}t.createMedium=function(e,t){return void 0===t&&(t=i),o(e,t)},t.createSidecarMedium=function(e){void 0===e&&(e={});var t=o(null);return t.options=r.__assign({async:!0,ssr:!1},e),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderCar=void 0;var r=n(364),i=r.__importStar(n(120)),o=n(120);t.renderCar=function(e,t){function n(t){var n=t.stateRef,a=t.props,s=(0,o.useCallback)((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0,o.useLayoutEffect)((function(){n.current(e)})),null}),[]);return i.createElement(e,r.__assign({},a,{children:s}))}var a=i.memo((function(e){var t=e.stateRef,n=e.defaultState,r=e.children,i=(0,o.useState)(n.current),a=i[0],s=i[1];return(0,o.useEffect)((function(){t.current=s}),[]),r.apply(void 0,a)}),(function(){return!0}));return function(e){var r=i.useRef(t(e)),o=i.useRef((function(e){return r.current=e}));return i.createElement(i.Fragment,null,i.createElement(n,{stateRef:o,props:e}),i.createElement(a,{stateRef:o,defaultState:r,children:e.children}))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exportSidecar=void 0;var r=n(364),i=r.__importStar(n(120)),o=function(e){var t=e.sideCar,n=r.__rest(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return i.createElement(o,r.__assign({},n))};o.isSideCarExport=!0,t.exportSidecar=function(e,t){return e.useMedium(t),o}},function(e,t,n){"use strict";var r=n(240),i=n(171);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(1019)),a=(r(n(120)),i(n(216)),i(n(1023))),s=r(n(1024)),l=n(430),c=n(519),u=function(){return document&&document.activeElement===document.body||(0,s.focusIsHidden)()},d=null,h=null,p=null,m=!1,g=function(){return!0};function f(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else{if(!a.lockItem)break;if(o!==e)return;i=null}}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var _=function(e){return e&&"current"in e?e.current:e},b=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},v=function(){var e,t=!1;if(d){var n=d,r=n.observed,i=n.persistentFocus,a=n.autoFocus,l=n.shards,c=n.crossFrame,v=n.focusOptions,y=r||p&&p.portaledElement,E=document&&document.activeElement;if(y){var S=[y].concat((0,o.default)(l.map(_).filter(Boolean)));if(E&&!function(e){return(d.whiteList||g)(e)}(E)||(i||(c?Boolean(m):"meanwhile"===m)||!u()||!h&&a)&&(y&&!((0,s.focusInside)(S)||E&&function(e,t){return t.some((function(t){return b(e,t,t)}))}(E,S)||(e=E,p&&p.portaledElement===e))&&(document&&!h&&E&&!a?(E.blur&&E.blur(),document.body.focus()):(t=(0,s.default)(S,h,{focusOptions:v}),p={})),m=!1,h=document&&document.activeElement),document){var w=document&&document.activeElement,T=(0,s.getFocusabledIn)(S),C=T.map((function(e){return e.node})).indexOf(w);C>-1&&(T.filter((function(e){var t=e.guard,n=e.node;return t&&n.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")})),f(C,T.length,1,T),f(C,-1,-1,T))}}}return t},y=function(e){v()&&e&&(e.stopPropagation(),e.preventDefault())},E=function(){return(0,l.deferAction)(v)},S=function(e){var t=e.target,n=e.currentTarget;n.contains(t)||(p={observerNode:n,portaledElement:t})},w=function(){m="just",setTimeout((function(){m="meanwhile"}),0)},T=function(){document.addEventListener("focusin",y),document.addEventListener("focusout",E),window.addEventListener("blur",w)},C=function(){document.removeEventListener("focusin",y),document.removeEventListener("focusout",E),window.removeEventListener("blur",w)};c.mediumFocus.assignSyncMedium(S),c.mediumBlur.assignMedium(E),c.mediumEffect.assignMedium((function(e){return e({moveFocusInside:s.default,focusInside:s.focusInside})}));var x=(0,a.default)((function(e){return e.filter((function(e){return!e.disabled}))}),(function(e){var t=e.slice(-1)[0];t&&!d&&T();var n=d,r=n&&t&&t.id===n.id;d=t,n&&!r&&(n.onDeactivation(),e.filter((function(e){return e.id===n.id})).length||n.returnFocus(!t)),t?(h=null,r&&n.observed===t.observed||t.onActivation(),v(!0),(0,l.deferAction)(v)):(C(),h=null)}))((function(){return null}));t.default=x},function(e,t,n){var r=n(1020),i=n(1021),o=n(679),a=n(1022);e.exports=function(e){return r(e)||i(e)||o(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(680);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var i=r(n(683)),o=r(n(13)),a=n(120),s=r(a);e.exports=function(e,t){return function(n){var r,l=[];function c(){r=e(l.map((function(e){return e.props}))),t(r)}var u=function(e){function t(){return e.apply(this,arguments)||this}i(t,e),t.peek=function(){return r};var o=t.prototype;return o.componentDidMount=function(){l.push(this),c()},o.componentDidUpdate=function(){c()},o.componentWillUnmount=function(){var e=l.indexOf(this);l.splice(e,1),c()},o.render=function(){return s.createElement(n,this.props)},t}(a.PureComponent);return o(u,"displayName","SideEffect("+function(e){return e.displayName||e.name||"Component"}(n)+")"),u}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getActiveElement=t.focusPrevElement=t.focusNextElement=t.getAllAffectedNodes=t.constants=t.getFocusabledIn=t.getFocusableIn=t.focusMerge=t.focusIsHidden=t.focusInside=t.tabHook=void 0;var r=n(364),i=(0,r.__importStar)(n(254));t.constants=i;var o=n(1025);Object.defineProperty(t,"focusInside",{enumerable:!0,get:function(){return o.focusInside}});var a=n(1030);Object.defineProperty(t,"focusIsHidden",{enumerable:!0,get:function(){return a.focusIsHidden}});var s=n(685);Object.defineProperty(t,"focusMerge",{enumerable:!0,get:function(){return s.getFocusMerge}});var l=n(1033);Object.defineProperty(t,"getFocusabledIn",{enumerable:!0,get:function(){return l.getFocusabledIn}}),Object.defineProperty(t,"getFocusableIn",{enumerable:!0,get:function(){return l.getFocusableIn}});var c=n(689),u=n(1034);Object.defineProperty(t,"focusNextElement",{enumerable:!0,get:function(){return u.focusNextElement}}),Object.defineProperty(t,"focusPrevElement",{enumerable:!0,get:function(){return u.focusPrevElement}});var d=(0,r.__importDefault)(n(1035));t.tabHook=d.default;var h=n(428);Object.defineProperty(t,"getAllAffectedNodes",{enumerable:!0,get:function(){return h.getAllAffectedNodes}});var p=n(429);Object.defineProperty(t,"getActiveElement",{enumerable:!0,get:function(){return p.getActiveElement}}),t.default=c.setFocus},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.focusInside=void 0;var r=n(272),i=n(428),o=n(273),a=n(429);t.focusInside=function(e,t){return void 0===t&&(t=(0,a.getActiveElement)((0,o.getFirst)(e).ownerDocument)),!(!t||t.dataset&&t.dataset.focusGuard)&&(0,i.getAllAffectedNodes)(e).some((function(e){return(0,r.contains)(e,t)||function(e,t){return Boolean((0,o.toArray)(e.querySelectorAll("iframe")).some((function(e){return function(e,t){return e===t}(e,t)})))}(e,t)}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.orderByTabIndex=t.tabSort=void 0;var r=n(273);t.tabSort=function(e,t){var n=e.tabIndex-t.tabIndex,r=e.index-t.index;if(n){if(!e.tabIndex)return 1;if(!t.tabIndex)return-1}return n||r};t.orderByTabIndex=function(e,n,i){return(0,r.toArray)(e).map((function(e,t){return{node:e,index:t,tabIndex:i&&-1===e.tabIndex?(e.dataset||{}).focusGuard?0:-1:e.tabIndex}})).filter((function(e){return!n||e.tabIndex>=0})).sort(t.tabSort)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getParentAutofocusables=t.getFocusables=void 0;var r=n(254),i=n(273),o=n(1028).tabbables.join(","),a="".concat(o,", [data-focus-guard]"),s=function(e,t){return(0,i.toArray)((e.shadowRoot||e).children).reduce((function(e,n){return e.concat(n.matches(t?a:o)?[n]:[],s(n))}),[])};t.getFocusables=function(e,n){return e.reduce((function(e,r){var a,l=s(r,n),c=(a=[]).concat.apply(a,l.map((function(e){return function(e,n){var r;return e instanceof HTMLIFrameElement&&(null===(r=e.contentDocument)||void 0===r?void 0:r.body)?(0,t.getFocusables)([e.contentDocument.body],n):[e]}(e,n)})));return e.concat(c,r.parentNode?(0,i.toArray)(r.parentNode.querySelectorAll(o)).filter((function(e){return e===r})):[])}),[])};t.getParentAutofocusables=function(e){var n=e.querySelectorAll("[".concat(r.FOCUS_AUTO,"]"));return(0,i.toArray)(n).map((function(e){return(0,t.getFocusables)([e])})).reduce((function(e,t){return e.concat(t)}),[])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tabbables=void 0,t.tabbables=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.safeProbe=void 0;t.safeProbe=function(e){try{return e()}catch(e){return}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.focusIsHidden=void 0;var r=n(254),i=n(272),o=n(273),a=n(429);t.focusIsHidden=function(e){void 0===e&&(e=document);var t=(0,a.getActiveElement)(e);return!!t&&(0,o.toArray)(e.querySelectorAll("[".concat(r.FOCUS_ALLOW,"]"))).some((function(e){return(0,i.contains)(e,t)}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.newFocus=t.NEW_FOCUS=void 0;var r=n(686),i=n(687),o=n(323);t.NEW_FOCUS="NEW_FOCUS";t.newFocus=function(e,n,a,s){var l=e.length,c=e[0],u=e[l-1],d=(0,o.isGuard)(a);if(!(a&&e.indexOf(a)>=0)){var h=void 0!==a?n.indexOf(a):-1,p=s?n.indexOf(s):h,m=s?e.indexOf(s):-1,g=h-p,f=n.indexOf(c),_=n.indexOf(u),b=(0,r.correctNodes)(n),v=(void 0!==a?b.indexOf(a):-1)-(s?b.indexOf(s):h),y=(0,i.pickFocusable)(e,0),E=(0,i.pickFocusable)(e,l-1);return-1===h||-1===m?t.NEW_FOCUS:!g&&m>=0?m:h<=f&&d&&Math.abs(g)>1?E:h>=_&&d&&Math.abs(g)>1?y:g&&Math.abs(v)>1?m:h<=f?E:h>_?y:g?Math.abs(g)>1?m:(l+m+g)%l:void 0}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pickAutofocus=void 0;var r=n(272),i=n(687),o=n(323);t.pickAutofocus=function(e,t,n){var a,s=e.map((function(e){return e.node})),l=(0,r.filterAutoFocusable)(s.filter((a=n,function(e){var t,n=null===(t=(0,o.getDataset)(e))||void 0===t?void 0:t.autofocus;return e.autofocus||void 0!==n&&"false"!==n||a.indexOf(e)>=0})));return l&&l.length?(0,i.pickFirstFocus)(l):(0,i.pickFirstFocus)((0,r.filterAutoFocusable)(t))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFocusableIn=t.getFocusabledIn=void 0;var r=n(272),i=n(428),o=n(323),a=n(688);t.getFocusabledIn=function(e){var t=(0,i.getAllAffectedNodes)(e).filter(o.isNotAGuard),n=(0,a.getTopCommonParent)(e,e,t),s=new Map,l=(0,r.getTabbableNodes)([n],s,!0),c=(0,r.getTabbableNodes)(t,s).filter((function(e){var t=e.node;return(0,o.isNotAGuard)(t)})).map((function(e){return e.node}));return l.map((function(e){var t=e.node;return{node:t,index:e.index,lockItem:c.indexOf(t)>=0,guard:(0,o.isGuard)(t)}}))},t.getFocusableIn=t.getFocusabledIn},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.focusPrevElement=t.focusNextElement=void 0;var r=n(689),i=n(272),o=function(e,t){if(!e||!t||!(0,i.contains)(t,e))return{};var n=(0,i.getTabbableNodes)([t],new Map),r=n.findIndex((function(t){return t.node===e}));return-1===r?{}:{prev:n[r-1],next:n[r+1],first:n[0],last:n[n.length-1]}},a=function(e){return Object.assign({scope:document.body,cycle:!0},e)};t.focusNextElement=function(e,t){void 0===t&&(t={});var n=a(t),i=n.scope,s=n.cycle,l=o(e,i),c=l.next,u=l.first,d=c||s&&u;d&&(0,r.focusOn)(d.node,t.focusOptions)};t.focusPrevElement=function(e,t){void 0===t&&(t={});var n=a(t),i=n.scope,s=n.cycle,l=o(e,i),c=l.prev,u=l.last,d=c||s&&u;d&&(0,r.focusOn)(d.node,t.focusOptions)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={attach:function(){},detach:function(){}}},function(e,t,n){"use strict";var r=n(240),i=n(171);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"FocusLockUI",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"AutoFocusInside",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"MoveFocusInside",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"useFocusInside",{enumerable:!0,get:function(){return s.useFocusInside}}),Object.defineProperty(t,"FreeFocusInside",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"InFocusGuard",{enumerable:!0,get:function(){return c.default}}),t.default=void 0;var o=i(n(678)),a=i(n(1037)),s=r(n(1038)),l=i(n(1039)),c=i(n(681)),u=o.default;t.default=u},function(e,t,n){"use strict";var r=n(240),i=n(171);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(130)),a=r(n(120)),s=(i(n(216)),r(n(254))),l=n(430),c=function(e){var t=e.disabled,n=void 0!==t&&t,r=e.children,i=e.className,c=void 0===i?void 0:i;return a.createElement("div",(0,o.default)({},(0,l.inlineProp)(s.FOCUS_AUTO,!n),{className:c}),r)};c.propTypes={};var u=c;t.default=u},function(e,t,n){"use strict";var r=n(240),i=n(171);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.useFocusInside=void 0;var o=i(n(130)),a=r(n(120)),s=(i(n(216)),r(n(254))),l=n(430),c=n(519),u=function(e){a.useEffect((function(){var t=!0;return c.mediumEffect.useMedium((function(n){var r=e&&e.current;t&&r&&(n.focusInside(r)||n.moveFocusInside(r,null))})),function(){t=!1}}),[e])};function d(e){var t=e.disabled,n=e.className,r=e.children,i=a.useRef(null);return u(t?void 0:i),a.createElement("div",(0,o.default)({},(0,l.inlineProp)(s.FOCUS_AUTO,!t),{ref:i,className:n}),r)}t.useFocusInside=u,d.propTypes={},d.defaultProps={disabled:!1,className:void 0};var h=d;t.default=h},function(e,t,n){"use strict";var r=n(240),i=n(171);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(130)),a=r(n(120)),s=(i(n(216)),r(n(254))),l=n(430),c=function(e){var t=e.children,n=e.className;return a.createElement("div",(0,o.default)({},(0,l.inlineProp)(s.FOCUS_ALLOW,!0),{className:n}),t)};c.propTypes={},c.defaultProps={className:void 0};var u=c;t.default=u},function(e,t,n){(function(e,r){var i;!function(o){t&&t.nodeType,e&&e.nodeType;var a="object"==typeof r&&r;a.global!==a&&a.window!==a&&a.self;var s,l=2147483647,c=36,u=1,d=26,h=38,p=700,m=72,g=128,f="-",_=/^xn--/,b=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=c-u,S=Math.floor,w=String.fromCharCode;function T(e){throw new RangeError(y[e])}function C(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function x(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+C((e=e.replace(v,".")).split("."),t).join(".")}function F(e){for(var t,n,r=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(n=e.charCodeAt(i++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--):r.push(t);return r}function D(e){return C(e,(function(e){var t="";return e>65535&&(t+=w((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=w(e)})).join("")}function k(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function O(e,t,n){var r=0;for(e=n?S(e/p):e>>1,e+=S(e/t);e>E*d>>1;r+=c)e=S(e/E);return S(r+(E+1)*e/(e+h))}function I(e){var t,n,r,i,o,a,s,h,p,_,b,v=[],y=e.length,E=0,w=g,C=m;for((n=e.lastIndexOf(f))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&T("not-basic"),v.push(e.charCodeAt(r));for(i=n>0?n+1:0;i<y;){for(o=E,a=1,s=c;i>=y&&T("invalid-input"),((h=(b=e.charCodeAt(i++))-48<10?b-22:b-65<26?b-65:b-97<26?b-97:c)>=c||h>S((l-E)/a))&&T("overflow"),E+=h*a,!(h<(p=s<=C?u:s>=C+d?d:s-C));s+=c)a>S(l/(_=c-p))&&T("overflow"),a*=_;C=O(E-o,t=v.length+1,0==o),S(E/t)>l-w&&T("overflow"),w+=S(E/t),E%=t,v.splice(E++,0,w)}return D(v)}function A(e){var t,n,r,i,o,a,s,h,p,_,b,v,y,E,C,x=[];for(v=(e=F(e)).length,t=g,n=0,o=m,a=0;a<v;++a)(b=e[a])<128&&x.push(w(b));for(r=i=x.length,i&&x.push(f);r<v;){for(s=l,a=0;a<v;++a)(b=e[a])>=t&&b<s&&(s=b);for(s-t>S((l-n)/(y=r+1))&&T("overflow"),n+=(s-t)*y,t=s,a=0;a<v;++a)if((b=e[a])<t&&++n>l&&T("overflow"),b==t){for(h=n,p=c;!(h<(_=p<=o?u:p>=o+d?d:p-o));p+=c)C=h-_,E=c-_,x.push(w(k(_+C%E,0))),h=S(C/E);x.push(w(k(h,0))),o=O(n,y,r==i),n=0,++r}++n,++t}return x.join("")}s={version:"1.4.1",ucs2:{decode:F,encode:D},decode:I,encode:A,toASCII:function(e){return x(e,(function(e){return b.test(e)?"xn--"+A(e):e}))},toUnicode:function(e){return x(e,(function(e){return _.test(e)?I(e.slice(4).toLowerCase()):e}))}},void 0===(i=function(){return s}.call(t,n,t,e))||(e.exports=i)}()}).call(this,n(365)(e),n(14))},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";t.decode=t.parse=n(1043),t.encode=t.stringify=n(1044)},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,o){t=t||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var l=1e3;o&&"number"==typeof o.maxKeys&&(l=o.maxKeys);var c=e.length;l>0&&c>l&&(c=l);for(var u=0;u<c;++u){var d,h,p,m,g=e[u].replace(s,"%20"),f=g.indexOf(n);f>=0?(d=g.substr(0,f),h=g.substr(f+1)):(d=g,h=""),p=decodeURIComponent(d),m=decodeURIComponent(h),r(a,p)?i(a[p])?a[p].push(m):a[p]=[a[p],m]:a[p]=m}return a};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,s){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?o(a(e),(function(a){var s=encodeURIComponent(r(a))+n;return i(e[a])?o(e[a],(function(e){return s+encodeURIComponent(r(e))})).join(t):s+encodeURIComponent(r(e[a]))})).join(t):s?encodeURIComponent(r(s))+n+encodeURIComponent(r(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var a=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return u}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(1),l=n(121);const c="mx_recaptcha";class u extends a.a.Component{constructor(e){super(e),i()(this,"captchaWidgetId",void 0),i()(this,"recaptchaContainer",Object(o.createRef)()),this.state={errorText:void 0}}componentDidMount(){if(this.isRecaptchaReady())this.onCaptchaLoaded();else{var e;s.a.log("Loading recaptcha script..."),window.mxOnRecaptchaLoaded=()=>{this.onCaptchaLoaded()};const t=document.createElement("script");t.setAttribute("src","https://www.recaptcha.net/recaptcha/api.js?onload=mxOnRecaptchaLoaded&render=explicit"),null===(e=this.recaptchaContainer.current)||void 0===e||e.appendChild(t)}}componentWillUnmount(){this.resetRecaptcha()}isRecaptchaReady(){return"undefined"!=typeof window&&void 0!==e.grecaptcha&&"function"==typeof e.grecaptcha.render}renderRecaptcha(t){var n;if(!this.isRecaptchaReady())throw s.a.error("grecaptcha not loaded!"),new Error("Recaptcha did not load successfully");const r=this.props.sitePublicKey;if(!r)throw s.a.error("No public key for recaptcha!"),new Error("This server has not supplied enough information for Recaptcha authentication");s.a.info("Rendering to %s",t),this.captchaWidgetId=null===(n=e.grecaptcha)||void 0===n?void 0:n.render(t,{sitekey:r,callback:this.props.onCaptchaResponse})}resetRecaptcha(){var t,n;this.captchaWidgetId&&(null===(t=e)||void 0===t||null===(n=t.grecaptcha)||void 0===n||n.reset(this.captchaWidgetId))}onCaptchaLoaded(){s.a.log("Loaded recaptcha script.");try{this.renderRecaptcha(c),this.setState({errorText:void 0})}catch(e){this.setState({errorText:e.toString()})}}render(){let e;return this.state.errorText&&(e=a.a.createElement("div",{className:"error"},this.state.errorText)),a.a.createElement("div",{ref:this.recaptchaContainer},a.a.createElement("p",null,Object(l.a)("This homeserver would like to make sure you are not a robot.")),a.a.createElement("div",{id:c}),e)}}i()(u,"defaultProps",{onCaptchaResponse:()=>{}})}).call(this,n(14))},function(e,t,n){"use strict";const r=n(1047),i=e=>r({exact:!0}).test(e);i.v4=e=>r.v4({exact:!0}).test(e),i.v6=e=>r.v6({exact:!0}).test(e),i.version=e=>i(e)?i.v4(e)?4:6:void 0,e.exports=i},function(e,t,n){"use strict";const r="[a-fA-F\\d:]",i=e=>e&&e.includeBoundaries?`(?:(?<=\\s|^)(?=${r})|(?<=${r})(?=\\s|$))`:"",o="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",a="[a-fA-F\\d]{1,4}",s=`\n(?:\n(?:${a}:){7}(?:${a}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:${a}:){6}(?:${o}|:${a}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:${a}:){5}(?::${o}|(?::${a}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:${a}:){4}(?:(?::${a}){0,1}:${o}|(?::${a}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:${a}:){3}(?:(?::${a}){0,2}:${o}|(?::${a}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:${a}:){2}(?:(?::${a}){0,3}:${o}|(?::${a}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:${a}:){1}(?:(?::${a}){0,4}:${o}|(?::${a}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::${a}){0,5}:${o}|(?::${a}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),l=new RegExp(`(?:^${o}$)|(?:^${s}$)`),c=new RegExp(`^${o}$`),u=new RegExp(`^${s}$`),d=e=>e&&e.exact?l:new RegExp(`(?:${i(e)}${o}${i(e)})|(?:${i(e)}${s}${i(e)})`,"g");d.v4=e=>e&&e.exact?c:new RegExp(`${i(e)}${o}${i(e)}`,"g"),d.v6=e=>e&&e.exact?u:new RegExp(`${i(e)}${s}${i(e)}`,"g"),e.exports=d},function(e,t,n){"use strict";(function(t){var r=n(369),i=1,o=3;function a(e,t,n){var r=n[n.length-1];e.replaceChild(r,t);for(var i=n.length-2;i>=0;i--)e.insertBefore(n[i],r),r=n[i]}function s(e,t,n){for(var r=[],i=0;i<e.length;i++){var o=e[i];"nl"===o.t&&t.get("nl2br")?r.push(n.createElement("br")):o.isLink&&t.check(o)?r.push(t.render(o)):r.push(n.createTextNode(o.toString()))}return r}function l(e,t,n){if(!e||e.nodeType!==i)throw new Error("Cannot linkify "+e+" - Invalid DOM Node type");if("A"===e.tagName||t.ignoreTags.indexOf(e.tagName)>=0)return e;for(var c=e.firstChild;c;){var u=void 0,d=void 0,h=void 0;switch(c.nodeType){case i:l(c,t,n);break;case o:if(u=c.nodeValue,0===(d=r.tokenize(u)).length||1===d.length&&"text"===d[0].t)break;a(e,c,h=s(d,t,n)),c=h[h.length-1]}c=c.nextSibling}return e}function c(e){return function(t){var n=t.tagName,r=t.attributes,i=t.content,o=t.eventListeners,a=e.createElement(n);for(var s in r)a.setAttribute(s,r[s]);if(o&&a.addEventListener)for(var l in o)a.addEventListener(l,o[l]);return a.appendChild(e.createTextNode(i)),a}}function u(e,n,i){void 0===n&&(n=null),void 0===i&&(i=null);try{i=i||document||window&&window.document||t&&t.document}catch(e){}if(!i)throw new Error("Cannot find document implementation. If you are in a non-browser environment like Node.js, pass the document implementation as the third argument to linkifyElement.");return l(e,new r.Options(n,c(i)),i)}u.helper=l,u.getDefaultRender=c,u.normalize=function(e,t){return new r.Options(e,c(t))},e.exports=u}).call(this,n(14))},function(e,t,n){"use strict";var r=n(369);function i(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function o(e){var t=e.tagName,n=e.attributes,r=e.content;return"<"+t+" "+function(e){var t=[];for(var n in e){var r=e[n]+"";t.push(n+'="'+r.replace(/"/g,""")+'"')}return t.join(" ")}(n)+">"+i(r)+"</"+t+">"}function a(e,t){void 0===t&&(t={}),t=new r.Options(t,o);for(var n=r.tokenize(e),a=[],s=0;s<n.length;s++){var l=n[s];"nl"===l.t&&t.get("nl2br")?a.push("<br>\n"):l.isLink&&t.check(l)?a.push(t.render(l)):a.push(i(l.toString()))}return a.join("")}String.prototype.linkify||Object.defineProperty(String.prototype,"linkify",{writable:!1,value:function(e){return a(this,e)}}),e.exports=a},function(e,t){e.exports=function(e,t){if("string"!=typeof e)throw new TypeError("Expected a string");for(var n,r=String(e),i="",o=!!t&&!!t.extended,a=!!t&&!!t.globstar,s=!1,l=t&&"string"==typeof t.flags?t.flags:"",c=0,u=r.length;c<u;c++)switch(n=r[c]){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":i+="\\"+n;break;case"?":if(o){i+=".";break}case"[":case"]":if(o){i+=n;break}case"{":if(o){s=!0,i+="(";break}case"}":if(o){s=!1,i+=")";break}case",":if(s){i+="|";break}i+="\\"+n;break;case"*":for(var d=r[c-1],h=1;"*"===r[c+1];)h++,c++;var p=r[c+1];if(a)h>1&&("/"===d||void 0===d)&&("/"===p||void 0===p)?(i+="((?:[^/]*(?:/|$))*)",c++):i+="([^/]*)";else i+=".*";break;default:i+=n}return l&&~l.indexOf("g")||(i="^"+i+"$"),new RegExp(i,l)}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return j}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(186),l=n.n(s),c=n(748),u=n.n(c),d=n(129),h=n(196),p=n(165),m=n(127),g=n(124),f=n(121),_=n(150),b=n(125),v=n(738),y=n(754),E=n(283),S=n(168),w=n(228),T=n(148),C=n(195),x=n(128),F=n(1336),D=n(1337),k=n(155),O=n(1551),I=n(1399),A=n(1554),R=n(138),N=n(123),M=n(368),P=n(227),L=n(936);function B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class j extends a.a.Component{constructor(t){super(t),i()(this,"contentRef",Object(o.createRef)()),i()(this,"unmounted",!1),i()(this,"pills",[]),i()(this,"tooltips",[]),i()(this,"context",void 0),i()(this,"onCancelClick",(()=>{this.setState({widgetHidden:!0}),e.localStorage&&e.localStorage.setItem("hide_preview_"+this.props.mxEvent.getId(),"1"),this.forceUpdate()})),i()(this,"onEmoteSenderClick",(()=>{const e=this.props.mxEvent;g.a.dispatch({action:x.a.ComposerInsert,userId:e.getSender(),timelineRenderingType:this.context.timelineRenderingType})})),i()(this,"onBodyLinkClick",(e=>{let t=e.target;if(t.classList.contains(M.e.className))return;if("A"!==t.nodeName&&(t=t.closest("a")),!t)return;const n=Object(S.l)(t.href);n!==t.href&&(e.preventDefault(),window.location.hash=n)})),i()(this,"getEventTileOps",(()=>({isWidgetHidden:()=>this.state.widgetHidden,unhideWidget:()=>{this.setState({widgetHidden:!1}),e.localStorage&&e.localStorage.removeItem("hide_preview_"+this.props.mxEvent.getId())}}))),i()(this,"onStarterLinkClick",((e,t)=>{t.preventDefault();const n=E.a.sharedInstance();if(!n.hasManager())return void n.openNoManagerDialog();const r=n.getPrimaryManager(),i=r.getScalarClient();i.connect().then((()=>{const t=i.getStarterLink(e),n=r.uiUrl;m.b.createDialog(k.a,{title:Object(f.a)("Add an Integration"),description:a.a.createElement("div",null,Object(f.a)("You are about to be taken to a third-party site so you can authenticate your account for use with %(integrationsUrl)s. Do you wish to continue?",{integrationsUrl:n})),button:Object(f.a)("Continue"),onFinished(e){if(!e)return;const n=window.screen.width>1024?1024:window.screen.width,r=window.screen.height>800?800:window.screen.height,i=(window.screen.width-n)/2,o=`height=${r}, width=${n}, top=${(window.screen.height-r)/2}, left=${i},`;window.open(t,"_blank",o).opener=null}})}))})),i()(this,"openHistoryDialog",(async()=>{m.b.createDialog(O.a,{mxEvent:this.props.mxEvent})})),this.state={links:[],widgetHidden:!1}}componentDidMount(){this.props.editState||this.applyFormatting()}applyFormatting(){const e=this.contentRef.current,t=b.b.getValue("showCodeLineNumbers");if(this.activateSpoilers([e]),Object(v.a)([e],this.props.mxEvent,this.pills),h.h(e),this.calculateUrlPreview(),Object(y.a)([e],this.pills,this.tooltips),"org.matrix.custom.html"===this.props.mxEvent.getContent().format){const e=l.a.findDOMNode(this).getElementsByTagName("pre");if(e.length>0)for(let n=0;n<e.length;n++){if("mx_EventTile_pre_container"==e[n].parentElement.className)continue;0==e[n].getElementsByTagName("code").length&&this.addCodeElement(e[n]);const r=this.wrapInDiv(e[n]);this.handleCodeBlockExpansion(e[n]),this.addCodeExpansionButton(r,e[n]),this.addCodeCopyButton(r),t&&this.addLineNumbers(e[n])}const n=l.a.findDOMNode(this).getElementsByTagName("code");n.length>0&&window.setTimeout((()=>{if(!this.unmounted)for(let e=0;e<n.length;e++)this.highlightCode(n[e])}),10)}}addCodeElement(e){const t=document.createElement("code");t.append(...e.childNodes),e.appendChild(t)}addCodeExpansionButton(e,t){if(Math.round(t.offsetHeight/C.b.instance.windowHeight*100)<30)return;const n=document.createElement("span");n.className="mx_EventTile_button ","mx_EventTile_collapsedCodeBlock"==t.className?n.className+="mx_EventTile_expandButton":n.className+="mx_EventTile_collapseButton",n.onclick=async()=>{n.className="mx_EventTile_button ","mx_EventTile_collapsedCodeBlock"==t.className?(t.className="",n.className+="mx_EventTile_collapseButton"):(t.className="mx_EventTile_collapsedCodeBlock",n.className+="mx_EventTile_expandButton"),this.props.onHeightChanged()},e.appendChild(n)}addCodeCopyButton(e){const t=document.createElement("span");t.className="mx_EventTile_button mx_EventTile_copyButton ";e.getElementsByClassName("mx_EventTile_button").length>0&&(t.className+="mx_EventTile_buttonBottom"),t.onclick=async()=>{const e=t.parentElement.getElementsByTagName("code")[0],n=await Object(w.b)(e.textContent),r=t.getBoundingClientRect(),{close:i}=_.m(F.a,U(U({},Object(_.p)(r,0)),{},{chevronFace:_.a.None,message:n?Object(f.a)("Copied!"):Object(f.a)("Failed to copy")}));t.onmouseleave=i},e.appendChild(t)}wrapInDiv(e){const t=document.createElement("div");return t.className="mx_EventTile_pre_container",e.parentNode.replaceChild(t,e),t.appendChild(e),t}handleCodeBlockExpansion(e){b.b.getValue("expandCodeByDefault")||(e.className="mx_EventTile_collapsedCodeBlock")}addLineNumbers(e){const t=e.innerHTML.replace(/\n(<\/code>)?$/,"").split(/\n/).length,n=document.createElement("span");n.className="mx_EventTile_lineNumbers";for(let e=1;e<=t;e++){const t=document.createElement("span");t.textContent=e.toString(),n.appendChild(t)}e.prepend(n),e.append(document.createElement("span"))}highlightCode(e){if(e.textContent.length>4096)return void console.log("Code block is bigger than highlight limit ("+e.textContent.length+" > 4096): not highlighting");let t;for(const n of e.className.split(/\s+/))if(n.startsWith("language-")){const e=n.split("-",2)[1];if(u.a.getLanguage(e)){t=e;break}}t?e.innerHTML=u.a.highlight(e.textContent,{language:t}).value:b.b.getValue("enableSyntaxHighlightLanguageDetection")&&e.parentElement instanceof HTMLPreElement&&(e.innerHTML=u.a.highlightAuto(e.textContent).value)}componentDidUpdate(e){if(!this.props.editState){const t=e.editState&&!this.props.editState;(e.replacingEventId!==this.props.replacingEventId||t)&&this.applyFormatting()}}componentWillUnmount(){this.unmounted=!0,Object(v.b)(this.pills),Object(y.b)(this.tooltips)}shouldComponentUpdate(e,t){return e.mxEvent.getId()!==this.props.mxEvent.getId()||e.highlights!==this.props.highlights||e.replacingEventId!==this.props.replacingEventId||e.highlightLink!==this.props.highlightLink||e.showUrlPreview!==this.props.showUrlPreview||e.editState!==this.props.editState||t.links!==this.state.links||t.widgetHidden!==this.state.widgetHidden||e.isSeeingThroughMessageHiddenForModeration!==this.props.isSeeingThroughMessageHiddenForModeration}calculateUrlPreview(){if(this.props.showUrlPreview){let e=this.findLinks([this.contentRef.current]);if(e.length){if(e=Array.from(new Set(e)),this.setState({links:e}),window.localStorage){const e=!!window.localStorage.getItem("hide_preview_"+this.props.mxEvent.getId());this.setState({widgetHidden:e})}}else this.state.links.length&&this.setState({links:[]})}}activateSpoilers(e){let t=e[0];for(;t;){if("SPAN"===t.tagName&&"string"==typeof t.getAttribute("data-mx-spoiler")){const e=document.createElement("span"),n=t.getAttribute("data-mx-spoiler");t.removeAttribute("data-mx-spoiler");const r=a.a.createElement(D.a,{reason:n,contentHtml:t.outerHTML});l.a.render(r,e),t.parentNode.replaceChild(e,t),t=e}t.childNodes&&t.childNodes.length&&this.activateSpoilers(t.childNodes),t=t.nextSibling}}findLinks(e){let t=[];for(let n=0;n<e.length;n++){const r=e[n];if("A"===r.tagName&&r.getAttribute("href"))this.isLinkPreviewable(r)&&t.push(r.getAttribute("href"));else{if("PRE"===r.tagName||"CODE"===r.tagName||"BLOCKQUOTE"===r.tagName)continue;r.children&&r.children.length&&(t=t.concat(this.findLinks(r.children)))}}return t}isLinkPreviewable(e){if(!e.getAttribute("href").startsWith("http://")&&!e.getAttribute("href").startsWith("https://"))return!1;if(e.textContent.indexOf("/")>-1)return!0;{const t=e.getAttribute("href").match(/^https?:\/\/(.*?)(\/|$)/)[1];return!Object(S.f)(t)&&!e.textContent.toLowerCase().trim().startsWith(t.toLowerCase())}}renderEditedMarker(){const e=this.props.mxEvent.replacingEventDate(),t=e&&Object(p.a)(e),n=a.a.createElement("div",null,a.a.createElement("div",{className:"mx_Tooltip_title"},Object(f.a)("Edited at %(date)s",{date:t})),a.a.createElement("div",{className:"mx_Tooltip_sub"},Object(f.a)("Click to view edits")));return a.a.createElement(T.a,{className:"mx_EventTile_edited",onClick:this.openHistoryDialog,title:Object(f.a)("Edited at %(date)s. Click to view edits.",{date:t}),tooltip:n},a.a.createElement("span",null,`(${Object(f.a)("edited")})`))}renderPendingModerationMarker(){let e;const t=this.props.mxEvent.messageVisibility();switch(t.visible){case!0:throw new Error("renderPendingModerationMarker should only be applied to hidden messages");case!1:e=t.reason?Object(f.a)("Message pending moderation: %(reason)s",{reason:t.reason}):Object(f.a)("Message pending moderation")}return a.a.createElement("span",{className:"mx_EventTile_pendingModeration"},`(${e})`)}render(){if(this.props.editState){return b.b.getValue("feature_wysiwyg_composer")?a.a.createElement(L.a,{editorStateTransfer:this.props.editState,className:"mx_EventTile_content"}):a.a.createElement(I.a,{editState:this.props.editState,className:"mx_EventTile_content"})}const e=this.props.mxEvent,t=e.getContent();let n=!1,r=!1;const i=!e.replacingEvent()&&!!Object(P.b)(e);r=t.msgtype===d.e.Emote,n=t.msgtype===d.e.Notice;let o,s=h.c(t,this.props.highlights,{disableBigEmoji:r||!b.b.getValue("TextualBody.enableBigEmoji"),stripReplyFallback:i,ref:this.contentRef,returnString:!1});return this.props.replacingEventId&&(s=a.a.createElement(a.a.Fragment,null,s,this.renderEditedMarker())),this.props.isSeeingThroughMessageHiddenForModeration&&(s=a.a.createElement(a.a.Fragment,null,s,this.renderPendingModerationMarker())),this.props.highlightLink?s=a.a.createElement("a",{href:this.props.highlightLink},s):t.data&&"string"==typeof t.data["org.matrix.neb.starter_link"]&&(s=a.a.createElement(N.a,{kind:"link_inline",onClick:this.onStarterLinkClick.bind(this,t.data["org.matrix.neb.starter_link"])},s)),this.state.links.length&&!this.state.widgetHidden&&this.props.showUrlPreview&&(o=a.a.createElement(A.a,{links:this.state.links,mxEvent:this.props.mxEvent,onCancelClick:this.onCancelClick,onHeightChanged:this.props.onHeightChanged})),r?a.a.createElement("div",{className:"mx_MEmoteBody mx_EventTile_content",onClick:this.onBodyLinkClick},"* ",a.a.createElement("span",{className:"mx_MEmoteBody_sender",onClick:this.onEmoteSenderClick},e.sender?e.sender.name:e.getSender())," ",s,o):n?a.a.createElement("div",{className:"mx_MNoticeBody mx_EventTile_content",onClick:this.onBodyLinkClick},s,o):a.a.createElement("div",{className:"mx_MTextBody mx_EventTile_content",onClick:this.onBodyLinkClick},s,o)}}i()(j,"contextType",R.b)}).call(this,n(14))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)},a=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return s(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getLoad=void 0;var c=l(n(701)),u=l(n(326)),d=n(1063),h=n(327);t.getLoad=function(e,t){return function n(r,a,s){if(void 0===s&&(s=!0),null==r)throw new Error("cheerio.load() expects a string");var l=o(o({},c.default),(0,c.flatten)(a)),p=e(r,l,s,null),m=function(n){function r(){return null!==n&&n.apply(this,arguments)||this}return i(r,n),r.prototype._make=function(e,t){var n=g(e,t);return n.prevObject=this,n},r.prototype._parse=function(t,n,r,i){return e(t,n,r,i)},r.prototype._render=function(e){return t(e,this.options)},r}(d.Cheerio);function g(t,n,r,i){if(void 0===r&&(r=p),t&&(0,h.isCheerio)(t))return t;var a=o(o({},l),(0,c.flatten)(i)),s="string"==typeof r?[e(r,a,!1,null)]:"length"in r?r:[r],u=(0,h.isCheerio)(s)?s:new m(s,null,a);if(u._root=u,!t)return new m(void 0,u,a);var d,g="string"==typeof t&&(0,h.isHtml)(t)?e(t,a,!1,null).children:(d=t).name||"root"===d.type||"text"===d.type||"comment"===d.type?[t]:Array.isArray(t)?t:void 0,f=new m(g,u,a);if(g)return f;if("string"!=typeof t)throw new Error("Unexpected type of selector");var _=t,b=n?"string"==typeof n?(0,h.isHtml)(n)?new m([e(n,a,!1,null)],u,a):(_="".concat(n," ").concat(_),u):(0,h.isCheerio)(n)?n:new m(Array.isArray(n)?n:[n],u,a):u;return b?b.find(_):f}return Object.assign(g,u,{load:n,_root:p,_options:l,fn:m.prototype,prototype:m.prototype}),g}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXMLStrict=t.decodeHTML5Strict=t.decodeHTML4Strict=t.decodeHTML5=t.decodeHTML4=t.decodeHTMLStrict=t.decodeHTML=t.decodeXML=t.encodeHTML5=t.encodeHTML4=t.encodeNonAsciiHTML=t.encodeHTML=t.escapeText=t.escapeAttribute=t.escapeUTF8=t.escape=t.encodeXML=t.encode=t.decodeStrict=t.decode=t.EncodingMode=t.DecodingMode=t.EntityLevel=void 0;var r,i,o,a=n(705),s=n(707),l=n(529);!function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"}(r=t.EntityLevel||(t.EntityLevel={})),function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict"}(i=t.DecodingMode||(t.DecodingMode={})),function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"}(o=t.EncodingMode||(t.EncodingMode={})),t.decode=function(e,t){void 0===t&&(t=r.XML);var n="number"==typeof t?{level:t}:t;return n.level===r.HTML?n.mode===i.Strict?(0,a.decodeHTMLStrict)(e):(0,a.decodeHTML)(e):(0,a.decodeXML)(e)},t.decodeStrict=function(e,t){void 0===t&&(t=r.XML);var n="number"==typeof t?{level:t}:t;return n.level===r.HTML?n.mode===i.Legacy?(0,a.decodeHTML)(e):(0,a.decodeHTMLStrict)(e):(0,a.decodeXML)(e)},t.encode=function(e,t){void 0===t&&(t=r.XML);var n="number"==typeof t?{level:t}:t;return n.mode===o.UTF8?(0,l.escapeUTF8)(e):n.mode===o.Attribute?(0,l.escapeAttribute)(e):n.mode===o.Text?(0,l.escapeText)(e):n.level===r.HTML?n.mode===o.ASCII?(0,s.encodeNonAsciiHTML)(e):(0,s.encodeHTML)(e):(0,l.encodeXML)(e)};var c=n(529);Object.defineProperty(t,"encodeXML",{enumerable:!0,get:function(){return c.encodeXML}}),Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return c.escape}}),Object.defineProperty(t,"escapeUTF8",{enumerable:!0,get:function(){return c.escapeUTF8}}),Object.defineProperty(t,"escapeAttribute",{enumerable:!0,get:function(){return c.escapeAttribute}}),Object.defineProperty(t,"escapeText",{enumerable:!0,get:function(){return c.escapeText}});var u=n(707);Object.defineProperty(t,"encodeHTML",{enumerable:!0,get:function(){return u.encodeHTML}}),Object.defineProperty(t,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return u.encodeNonAsciiHTML}}),Object.defineProperty(t,"encodeHTML4",{enumerable:!0,get:function(){return u.encodeHTML}}),Object.defineProperty(t,"encodeHTML5",{enumerable:!0,get:function(){return u.encodeHTML}});var d=n(705);Object.defineProperty(t,"decodeXML",{enumerable:!0,get:function(){return d.decodeXML}}),Object.defineProperty(t,"decodeHTML",{enumerable:!0,get:function(){return d.decodeHTML}}),Object.defineProperty(t,"decodeHTMLStrict",{enumerable:!0,get:function(){return d.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML4",{enumerable:!0,get:function(){return d.decodeHTML}}),Object.defineProperty(t,"decodeHTML5",{enumerable:!0,get:function(){return d.decodeHTML}}),Object.defineProperty(t,"decodeHTML4Strict",{enumerable:!0,get:function(){return d.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML5Strict",{enumerable:!0,get:function(){return d.decodeHTMLStrict}}),Object.defineProperty(t,"decodeXMLStrict",{enumerable:!0,get:function(){return d.decodeXML}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((function(e){return e.charCodeAt(0)})))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((function(e){return e.charCodeAt(0)})))},function(e,t,n){"use strict";function r(e){for(var t=1;t<e.length;t++)e[t][0]+=e[t-1][0]+1;return e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=new Map(r([[9,"	"],[0,"
"],[22,"!"],[0,"""],[0,"#"],[0,"$"],[0,"%"],[0,"&"],[0,"'"],[0,"("],[0,")"],[0,"*"],[0,"+"],[0,","],[1,"."],[0,"/"],[10,":"],[0,";"],[0,{v:"<",n:8402,o:"<⃒"}],[0,{v:"=",n:8421,o:"=⃥"}],[0,{v:">",n:8402,o:">⃒"}],[0,"?"],[0,"@"],[26,"["],[0,"\"],[0,"]"],[0,"^"],[0,"_"],[0,"`"],[5,{n:106,o:"fj"}],[20,"{"],[0,"|"],[0,"}"],[34," "],[0,"¡"],[0,"¢"],[0,"£"],[0,"¤"],[0,"¥"],[0,"¦"],[0,"§"],[0,"¨"],[0,"©"],[0,"ª"],[0,"«"],[0,"¬"],[0,"­"],[0,"®"],[0,"¯"],[0,"°"],[0,"±"],[0,"²"],[0,"³"],[0,"´"],[0,"µ"],[0,"¶"],[0,"·"],[0,"¸"],[0,"¹"],[0,"º"],[0,"»"],[0,"¼"],[0,"½"],[0,"¾"],[0,"¿"],[0,"À"],[0,"Á"],[0,"Â"],[0,"Ã"],[0,"Ä"],[0,"Å"],[0,"Æ"],[0,"Ç"],[0,"È"],[0,"É"],[0,"Ê"],[0,"Ë"],[0,"Ì"],[0,"Í"],[0,"Î"],[0,"Ï"],[0,"Ð"],[0,"Ñ"],[0,"Ò"],[0,"Ó"],[0,"Ô"],[0,"Õ"],[0,"Ö"],[0,"×"],[0,"Ø"],[0,"Ù"],[0,"Ú"],[0,"Û"],[0,"Ü"],[0,"Ý"],[0,"Þ"],[0,"ß"],[0,"à"],[0,"á"],[0,"â"],[0,"ã"],[0,"ä"],[0,"å"],[0,"æ"],[0,"ç"],[0,"è"],[0,"é"],[0,"ê"],[0,"ë"],[0,"ì"],[0,"í"],[0,"î"],[0,"ï"],[0,"ð"],[0,"ñ"],[0,"ò"],[0,"ó"],[0,"ô"],[0,"õ"],[0,"ö"],[0,"÷"],[0,"ø"],[0,"ù"],[0,"ú"],[0,"û"],[0,"ü"],[0,"ý"],[0,"þ"],[0,"ÿ"],[0,"Ā"],[0,"ā"],[0,"Ă"],[0,"ă"],[0,"Ą"],[0,"ą"],[0,"Ć"],[0,"ć"],[0,"Ĉ"],[0,"ĉ"],[0,"Ċ"],[0,"ċ"],[0,"Č"],[0,"č"],[0,"Ď"],[0,"ď"],[0,"Đ"],[0,"đ"],[0,"Ē"],[0,"ē"],[2,"Ė"],[0,"ė"],[0,"Ę"],[0,"ę"],[0,"Ě"],[0,"ě"],[0,"Ĝ"],[0,"ĝ"],[0,"Ğ"],[0,"ğ"],[0,"Ġ"],[0,"ġ"],[0,"Ģ"],[1,"Ĥ"],[0,"ĥ"],[0,"Ħ"],[0,"ħ"],[0,"Ĩ"],[0,"ĩ"],[0,"Ī"],[0,"ī"],[2,"Į"],[0,"į"],[0,"İ"],[0,"ı"],[0,"IJ"],[0,"ij"],[0,"Ĵ"],[0,"ĵ"],[0,"Ķ"],[0,"ķ"],[0,"ĸ"],[0,"Ĺ"],[0,"ĺ"],[0,"Ļ"],[0,"ļ"],[0,"Ľ"],[0,"ľ"],[0,"Ŀ"],[0,"ŀ"],[0,"Ł"],[0,"ł"],[0,"Ń"],[0,"ń"],[0,"Ņ"],[0,"ņ"],[0,"Ň"],[0,"ň"],[0,"ʼn"],[0,"Ŋ"],[0,"ŋ"],[0,"Ō"],[0,"ō"],[2,"Ő"],[0,"ő"],[0,"Œ"],[0,"œ"],[0,"Ŕ"],[0,"ŕ"],[0,"Ŗ"],[0,"ŗ"],[0,"Ř"],[0,"ř"],[0,"Ś"],[0,"ś"],[0,"Ŝ"],[0,"ŝ"],[0,"Ş"],[0,"ş"],[0,"Š"],[0,"š"],[0,"Ţ"],[0,"ţ"],[0,"Ť"],[0,"ť"],[0,"Ŧ"],[0,"ŧ"],[0,"Ũ"],[0,"ũ"],[0,"Ū"],[0,"ū"],[0,"Ŭ"],[0,"ŭ"],[0,"Ů"],[0,"ů"],[0,"Ű"],[0,"ű"],[0,"Ų"],[0,"ų"],[0,"Ŵ"],[0,"ŵ"],[0,"Ŷ"],[0,"ŷ"],[0,"Ÿ"],[0,"Ź"],[0,"ź"],[0,"Ż"],[0,"ż"],[0,"Ž"],[0,"ž"],[19,"ƒ"],[34,"Ƶ"],[63,"ǵ"],[65,"ȷ"],[142,"ˆ"],[0,"ˇ"],[16,"˘"],[0,"˙"],[0,"˚"],[0,"˛"],[0,"˜"],[0,"˝"],[51,"̑"],[127,"Α"],[0,"Β"],[0,"Γ"],[0,"Δ"],[0,"Ε"],[0,"Ζ"],[0,"Η"],[0,"Θ"],[0,"Ι"],[0,"Κ"],[0,"Λ"],[0,"Μ"],[0,"Ν"],[0,"Ξ"],[0,"Ο"],[0,"Π"],[0,"Ρ"],[1,"Σ"],[0,"Τ"],[0,"Υ"],[0,"Φ"],[0,"Χ"],[0,"Ψ"],[0,"Ω"],[7,"α"],[0,"β"],[0,"γ"],[0,"δ"],[0,"ε"],[0,"ζ"],[0,"η"],[0,"θ"],[0,"ι"],[0,"κ"],[0,"λ"],[0,"μ"],[0,"ν"],[0,"ξ"],[0,"ο"],[0,"π"],[0,"ρ"],[0,"ς"],[0,"σ"],[0,"τ"],[0,"υ"],[0,"φ"],[0,"χ"],[0,"ψ"],[0,"ω"],[7,"ϑ"],[0,"ϒ"],[2,"ϕ"],[0,"ϖ"],[5,"Ϝ"],[0,"ϝ"],[18,"ϰ"],[0,"ϱ"],[3,"ϵ"],[0,"϶"],[10,"Ё"],[0,"Ђ"],[0,"Ѓ"],[0,"Є"],[0,"Ѕ"],[0,"І"],[0,"Ї"],[0,"Ј"],[0,"Љ"],[0,"Њ"],[0,"Ћ"],[0,"Ќ"],[1,"Ў"],[0,"Џ"],[0,"А"],[0,"Б"],[0,"В"],[0,"Г"],[0,"Д"],[0,"Е"],[0,"Ж"],[0,"З"],[0,"И"],[0,"Й"],[0,"К"],[0,"Л"],[0,"М"],[0,"Н"],[0,"О"],[0,"П"],[0,"Р"],[0,"С"],[0,"Т"],[0,"У"],[0,"Ф"],[0,"Х"],[0,"Ц"],[0,"Ч"],[0,"Ш"],[0,"Щ"],[0,"Ъ"],[0,"Ы"],[0,"Ь"],[0,"Э"],[0,"Ю"],[0,"Я"],[0,"а"],[0,"б"],[0,"в"],[0,"г"],[0,"д"],[0,"е"],[0,"ж"],[0,"з"],[0,"и"],[0,"й"],[0,"к"],[0,"л"],[0,"м"],[0,"н"],[0,"о"],[0,"п"],[0,"р"],[0,"с"],[0,"т"],[0,"у"],[0,"ф"],[0,"х"],[0,"ц"],[0,"ч"],[0,"ш"],[0,"щ"],[0,"ъ"],[0,"ы"],[0,"ь"],[0,"э"],[0,"ю"],[0,"я"],[1,"ё"],[0,"ђ"],[0,"ѓ"],[0,"є"],[0,"ѕ"],[0,"і"],[0,"ї"],[0,"ј"],[0,"љ"],[0,"њ"],[0,"ћ"],[0,"ќ"],[1,"ў"],[0,"џ"],[7074," "],[0," "],[0," "],[0," "],[1," "],[0," "],[0," "],[0," "],[0,"​"],[0,"‌"],[0,"‍"],[0,"‎"],[0,"‏"],[0,"‐"],[2,"–"],[0,"—"],[0,"―"],[0,"‖"],[1,"‘"],[0,"’"],[0,"‚"],[1,"“"],[0,"”"],[0,"„"],[1,"†"],[0,"‡"],[0,"•"],[2,"‥"],[0,"…"],[9,"‰"],[0,"‱"],[0,"′"],[0,"″"],[0,"‴"],[0,"‵"],[3,"‹"],[0,"›"],[3,"‾"],[2,"⁁"],[1,"⁃"],[0,"⁄"],[10,"⁏"],[7,"⁗"],[7,{v:" ",n:8202,o:"  "}],[0,"⁠"],[0,"⁡"],[0,"⁢"],[0,"⁣"],[72,"€"],[46,"⃛"],[0,"⃜"],[37,"ℂ"],[2,"℅"],[4,"ℊ"],[0,"ℋ"],[0,"ℌ"],[0,"ℍ"],[0,"ℎ"],[0,"ℏ"],[0,"ℐ"],[0,"ℑ"],[0,"ℒ"],[0,"ℓ"],[1,"ℕ"],[0,"№"],[0,"℗"],[0,"℘"],[0,"ℙ"],[0,"ℚ"],[0,"ℛ"],[0,"ℜ"],[0,"ℝ"],[0,"℞"],[3,"™"],[1,"ℤ"],[2,"℧"],[0,"ℨ"],[0,"℩"],[2,"ℬ"],[0,"ℭ"],[1,"ℯ"],[0,"ℰ"],[0,"ℱ"],[1,"ℳ"],[0,"ℴ"],[0,"ℵ"],[0,"ℶ"],[0,"ℷ"],[0,"ℸ"],[12,"ⅅ"],[0,"ⅆ"],[0,"ⅇ"],[0,"ⅈ"],[10,"⅓"],[0,"⅔"],[0,"⅕"],[0,"⅖"],[0,"⅗"],[0,"⅘"],[0,"⅙"],[0,"⅚"],[0,"⅛"],[0,"⅜"],[0,"⅝"],[0,"⅞"],[49,"←"],[0,"↑"],[0,"→"],[0,"↓"],[0,"↔"],[0,"↕"],[0,"↖"],[0,"↗"],[0,"↘"],[0,"↙"],[0,"↚"],[0,"↛"],[1,{v:"↝",n:824,o:"↝̸"}],[0,"↞"],[0,"↟"],[0,"↠"],[0,"↡"],[0,"↢"],[0,"↣"],[0,"↤"],[0,"↥"],[0,"↦"],[0,"↧"],[1,"↩"],[0,"↪"],[0,"↫"],[0,"↬"],[0,"↭"],[0,"↮"],[1,"↰"],[0,"↱"],[0,"↲"],[0,"↳"],[1,"↵"],[0,"↶"],[0,"↷"],[2,"↺"],[0,"↻"],[0,"↼"],[0,"↽"],[0,"↾"],[0,"↿"],[0,"⇀"],[0,"⇁"],[0,"⇂"],[0,"⇃"],[0,"⇄"],[0,"⇅"],[0,"⇆"],[0,"⇇"],[0,"⇈"],[0,"⇉"],[0,"⇊"],[0,"⇋"],[0,"⇌"],[0,"⇍"],[0,"⇎"],[0,"⇏"],[0,"⇐"],[0,"⇑"],[0,"⇒"],[0,"⇓"],[0,"⇔"],[0,"⇕"],[0,"⇖"],[0,"⇗"],[0,"⇘"],[0,"⇙"],[0,"⇚"],[0,"⇛"],[1,"⇝"],[6,"⇤"],[0,"⇥"],[15,"⇵"],[7,"⇽"],[0,"⇾"],[0,"⇿"],[0,"∀"],[0,"∁"],[0,{v:"∂",n:824,o:"∂̸"}],[0,"∃"],[0,"∄"],[0,"∅"],[1,"∇"],[0,"∈"],[0,"∉"],[1,"∋"],[0,"∌"],[2,"∏"],[0,"∐"],[0,"∑"],[0,"−"],[0,"∓"],[0,"∔"],[1,"∖"],[0,"∗"],[0,"∘"],[1,"√"],[2,"∝"],[0,"∞"],[0,"∟"],[0,{v:"∠",n:8402,o:"∠⃒"}],[0,"∡"],[0,"∢"],[0,"∣"],[0,"∤"],[0,"∥"],[0,"∦"],[0,"∧"],[0,"∨"],[0,{v:"∩",n:65024,o:"∩︀"}],[0,{v:"∪",n:65024,o:"∪︀"}],[0,"∫"],[0,"∬"],[0,"∭"],[0,"∮"],[0,"∯"],[0,"∰"],[0,"∱"],[0,"∲"],[0,"∳"],[0,"∴"],[0,"∵"],[0,"∶"],[0,"∷"],[0,"∸"],[1,"∺"],[0,"∻"],[0,{v:"∼",n:8402,o:"∼⃒"}],[0,{v:"∽",n:817,o:"∽̱"}],[0,{v:"∾",n:819,o:"∾̳"}],[0,"∿"],[0,"≀"],[0,"≁"],[0,{v:"≂",n:824,o:"≂̸"}],[0,"≃"],[0,"≄"],[0,"≅"],[0,"≆"],[0,"≇"],[0,"≈"],[0,"≉"],[0,"≊"],[0,{v:"≋",n:824,o:"≋̸"}],[0,"≌"],[0,{v:"≍",n:8402,o:"≍⃒"}],[0,{v:"≎",n:824,o:"≎̸"}],[0,{v:"≏",n:824,o:"≏̸"}],[0,{v:"≐",n:824,o:"≐̸"}],[0,"≑"],[0,"≒"],[0,"≓"],[0,"≔"],[0,"≕"],[0,"≖"],[0,"≗"],[1,"≙"],[0,"≚"],[1,"≜"],[2,"≟"],[0,"≠"],[0,{v:"≡",n:8421,o:"≡⃥"}],[0,"≢"],[1,{v:"≤",n:8402,o:"≤⃒"}],[0,{v:"≥",n:8402,o:"≥⃒"}],[0,{v:"≦",n:824,o:"≦̸"}],[0,{v:"≧",n:824,o:"≧̸"}],[0,{v:"≨",n:65024,o:"≨︀"}],[0,{v:"≩",n:65024,o:"≩︀"}],[0,{v:"≪",n:new Map(r([[824,"≪̸"],[7577,"≪⃒"]]))}],[0,{v:"≫",n:new Map(r([[824,"≫̸"],[7577,"≫⃒"]]))}],[0,"≬"],[0,"≭"],[0,"≮"],[0,"≯"],[0,"≰"],[0,"≱"],[0,"≲"],[0,"≳"],[0,"≴"],[0,"≵"],[0,"≶"],[0,"≷"],[0,"≸"],[0,"≹"],[0,"≺"],[0,"≻"],[0,"≼"],[0,"≽"],[0,"≾"],[0,{v:"≿",n:824,o:"≿̸"}],[0,"⊀"],[0,"⊁"],[0,{v:"⊂",n:8402,o:"⊂⃒"}],[0,{v:"⊃",n:8402,o:"⊃⃒"}],[0,"⊄"],[0,"⊅"],[0,"⊆"],[0,"⊇"],[0,"⊈"],[0,"⊉"],[0,{v:"⊊",n:65024,o:"⊊︀"}],[0,{v:"⊋",n:65024,o:"⊋︀"}],[1,"⊍"],[0,"⊎"],[0,{v:"⊏",n:824,o:"⊏̸"}],[0,{v:"⊐",n:824,o:"⊐̸"}],[0,"⊑"],[0,"⊒"],[0,{v:"⊓",n:65024,o:"⊓︀"}],[0,{v:"⊔",n:65024,o:"⊔︀"}],[0,"⊕"],[0,"⊖"],[0,"⊗"],[0,"⊘"],[0,"⊙"],[0,"⊚"],[0,"⊛"],[1,"⊝"],[0,"⊞"],[0,"⊟"],[0,"⊠"],[0,"⊡"],[0,"⊢"],[0,"⊣"],[0,"⊤"],[0,"⊥"],[1,"⊧"],[0,"⊨"],[0,"⊩"],[0,"⊪"],[0,"⊫"],[0,"⊬"],[0,"⊭"],[0,"⊮"],[0,"⊯"],[0,"⊰"],[1,"⊲"],[0,"⊳"],[0,{v:"⊴",n:8402,o:"⊴⃒"}],[0,{v:"⊵",n:8402,o:"⊵⃒"}],[0,"⊶"],[0,"⊷"],[0,"⊸"],[0,"⊹"],[0,"⊺"],[0,"⊻"],[1,"⊽"],[0,"⊾"],[0,"⊿"],[0,"⋀"],[0,"⋁"],[0,"⋂"],[0,"⋃"],[0,"⋄"],[0,"⋅"],[0,"⋆"],[0,"⋇"],[0,"⋈"],[0,"⋉"],[0,"⋊"],[0,"⋋"],[0,"⋌"],[0,"⋍"],[0,"⋎"],[0,"⋏"],[0,"⋐"],[0,"⋑"],[0,"⋒"],[0,"⋓"],[0,"⋔"],[0,"⋕"],[0,"⋖"],[0,"⋗"],[0,{v:"⋘",n:824,o:"⋘̸"}],[0,{v:"⋙",n:824,o:"⋙̸"}],[0,{v:"⋚",n:65024,o:"⋚︀"}],[0,{v:"⋛",n:65024,o:"⋛︀"}],[2,"⋞"],[0,"⋟"],[0,"⋠"],[0,"⋡"],[0,"⋢"],[0,"⋣"],[2,"⋦"],[0,"⋧"],[0,"⋨"],[0,"⋩"],[0,"⋪"],[0,"⋫"],[0,"⋬"],[0,"⋭"],[0,"⋮"],[0,"⋯"],[0,"⋰"],[0,"⋱"],[0,"⋲"],[0,"⋳"],[0,"⋴"],[0,{v:"⋵",n:824,o:"⋵̸"}],[0,"⋶"],[0,"⋷"],[1,{v:"⋹",n:824,o:"⋹̸"}],[0,"⋺"],[0,"⋻"],[0,"⋼"],[0,"⋽"],[0,"⋾"],[6,"⌅"],[0,"⌆"],[1,"⌈"],[0,"⌉"],[0,"⌊"],[0,"⌋"],[0,"⌌"],[0,"⌍"],[0,"⌎"],[0,"⌏"],[0,"⌐"],[1,"⌒"],[0,"⌓"],[1,"⌕"],[0,"⌖"],[5,"⌜"],[0,"⌝"],[0,"⌞"],[0,"⌟"],[2,"⌢"],[0,"⌣"],[9,"⌭"],[0,"⌮"],[7,"⌶"],[6,"⌽"],[1,"⌿"],[60,"⍼"],[51,"⎰"],[0,"⎱"],[2,"⎴"],[0,"⎵"],[0,"⎶"],[37,"⏜"],[0,"⏝"],[0,"⏞"],[0,"⏟"],[2,"⏢"],[4,"⏧"],[59,"␣"],[164,"Ⓢ"],[55,"─"],[1,"│"],[9,"┌"],[3,"┐"],[3,"└"],[3,"┘"],[3,"├"],[7,"┤"],[7,"┬"],[7,"┴"],[7,"┼"],[19,"═"],[0,"║"],[0,"╒"],[0,"╓"],[0,"╔"],[0,"╕"],[0,"╖"],[0,"╗"],[0,"╘"],[0,"╙"],[0,"╚"],[0,"╛"],[0,"╜"],[0,"╝"],[0,"╞"],[0,"╟"],[0,"╠"],[0,"╡"],[0,"╢"],[0,"╣"],[0,"╤"],[0,"╥"],[0,"╦"],[0,"╧"],[0,"╨"],[0,"╩"],[0,"╪"],[0,"╫"],[0,"╬"],[19,"▀"],[3,"▄"],[3,"█"],[8,"░"],[0,"▒"],[0,"▓"],[13,"□"],[8,"▪"],[0,"▫"],[1,"▭"],[0,"▮"],[2,"▱"],[1,"△"],[0,"▴"],[0,"▵"],[2,"▸"],[0,"▹"],[3,"▽"],[0,"▾"],[0,"▿"],[2,"◂"],[0,"◃"],[6,"◊"],[0,"○"],[32,"◬"],[2,"◯"],[8,"◸"],[0,"◹"],[0,"◺"],[0,"◻"],[0,"◼"],[8,"★"],[0,"☆"],[7,"☎"],[49,"♀"],[1,"♂"],[29,"♠"],[2,"♣"],[1,"♥"],[0,"♦"],[3,"♪"],[2,"♭"],[0,"♮"],[0,"♯"],[163,"✓"],[3,"✗"],[8,"✠"],[21,"✶"],[33,"❘"],[25,"❲"],[0,"❳"],[84,"⟈"],[0,"⟉"],[28,"⟦"],[0,"⟧"],[0,"⟨"],[0,"⟩"],[0,"⟪"],[0,"⟫"],[0,"⟬"],[0,"⟭"],[7,"⟵"],[0,"⟶"],[0,"⟷"],[0,"⟸"],[0,"⟹"],[0,"⟺"],[1,"⟼"],[2,"⟿"],[258,"⤂"],[0,"⤃"],[0,"⤄"],[0,"⤅"],[6,"⤌"],[0,"⤍"],[0,"⤎"],[0,"⤏"],[0,"⤐"],[0,"⤑"],[0,"⤒"],[0,"⤓"],[2,"⤖"],[2,"⤙"],[0,"⤚"],[0,"⤛"],[0,"⤜"],[0,"⤝"],[0,"⤞"],[0,"⤟"],[0,"⤠"],[2,"⤣"],[0,"⤤"],[0,"⤥"],[0,"⤦"],[0,"⤧"],[0,"⤨"],[0,"⤩"],[0,"⤪"],[8,{v:"⤳",n:824,o:"⤳̸"}],[1,"⤵"],[0,"⤶"],[0,"⤷"],[0,"⤸"],[0,"⤹"],[2,"⤼"],[0,"⤽"],[7,"⥅"],[2,"⥈"],[0,"⥉"],[0,"⥊"],[0,"⥋"],[2,"⥎"],[0,"⥏"],[0,"⥐"],[0,"⥑"],[0,"⥒"],[0,"⥓"],[0,"⥔"],[0,"⥕"],[0,"⥖"],[0,"⥗"],[0,"⥘"],[0,"⥙"],[0,"⥚"],[0,"⥛"],[0,"⥜"],[0,"⥝"],[0,"⥞"],[0,"⥟"],[0,"⥠"],[0,"⥡"],[0,"⥢"],[0,"⥣"],[0,"⥤"],[0,"⥥"],[0,"⥦"],[0,"⥧"],[0,"⥨"],[0,"⥩"],[0,"⥪"],[0,"⥫"],[0,"⥬"],[0,"⥭"],[0,"⥮"],[0,"⥯"],[0,"⥰"],[0,"⥱"],[0,"⥲"],[0,"⥳"],[0,"⥴"],[0,"⥵"],[0,"⥶"],[1,"⥸"],[0,"⥹"],[1,"⥻"],[0,"⥼"],[0,"⥽"],[0,"⥾"],[0,"⥿"],[5,"⦅"],[0,"⦆"],[4,"⦋"],[0,"⦌"],[0,"⦍"],[0,"⦎"],[0,"⦏"],[0,"⦐"],[0,"⦑"],[0,"⦒"],[0,"⦓"],[0,"⦔"],[0,"⦕"],[0,"⦖"],[3,"⦚"],[1,"⦜"],[0,"⦝"],[6,"⦤"],[0,"⦥"],[0,"⦦"],[0,"⦧"],[0,"⦨"],[0,"⦩"],[0,"⦪"],[0,"⦫"],[0,"⦬"],[0,"⦭"],[0,"⦮"],[0,"⦯"],[0,"⦰"],[0,"⦱"],[0,"⦲"],[0,"⦳"],[0,"⦴"],[0,"⦵"],[0,"⦶"],[0,"⦷"],[1,"⦹"],[1,"⦻"],[0,"⦼"],[1,"⦾"],[0,"⦿"],[0,"⧀"],[0,"⧁"],[0,"⧂"],[0,"⧃"],[0,"⧄"],[0,"⧅"],[3,"⧉"],[3,"⧍"],[0,"⧎"],[0,{v:"⧏",n:824,o:"⧏̸"}],[0,{v:"⧐",n:824,o:"⧐̸"}],[11,"⧜"],[0,"⧝"],[0,"⧞"],[4,"⧣"],[0,"⧤"],[0,"⧥"],[5,"⧫"],[8,"⧴"],[1,"⧶"],[9,"⨀"],[0,"⨁"],[0,"⨂"],[1,"⨄"],[1,"⨆"],[5,"⨌"],[0,"⨍"],[2,"⨐"],[0,"⨑"],[0,"⨒"],[0,"⨓"],[0,"⨔"],[0,"⨕"],[0,"⨖"],[0,"⨗"],[10,"⨢"],[0,"⨣"],[0,"⨤"],[0,"⨥"],[0,"⨦"],[0,"⨧"],[1,"⨩"],[0,"⨪"],[2,"⨭"],[0,"⨮"],[0,"⨯"],[0,"⨰"],[0,"⨱"],[1,"⨳"],[0,"⨴"],[0,"⨵"],[0,"⨶"],[0,"⨷"],[0,"⨸"],[0,"⨹"],[0,"⨺"],[0,"⨻"],[0,"⨼"],[2,"⨿"],[0,"⩀"],[1,"⩂"],[0,"⩃"],[0,"⩄"],[0,"⩅"],[0,"⩆"],[0,"⩇"],[0,"⩈"],[0,"⩉"],[0,"⩊"],[0,"⩋"],[0,"⩌"],[0,"⩍"],[2,"⩐"],[2,"⩓"],[0,"⩔"],[0,"⩕"],[0,"⩖"],[0,"⩗"],[0,"⩘"],[1,"⩚"],[0,"⩛"],[0,"⩜"],[0,"⩝"],[1,"⩟"],[6,"⩦"],[3,"⩪"],[2,{v:"⩭",n:824,o:"⩭̸"}],[0,"⩮"],[0,"⩯"],[0,{v:"⩰",n:824,o:"⩰̸"}],[0,"⩱"],[0,"⩲"],[0,"⩳"],[0,"⩴"],[0,"⩵"],[1,"⩷"],[0,"⩸"],[0,"⩹"],[0,"⩺"],[0,"⩻"],[0,"⩼"],[0,{v:"⩽",n:824,o:"⩽̸"}],[0,{v:"⩾",n:824,o:"⩾̸"}],[0,"⩿"],[0,"⪀"],[0,"⪁"],[0,"⪂"],[0,"⪃"],[0,"⪄"],[0,"⪅"],[0,"⪆"],[0,"⪇"],[0,"⪈"],[0,"⪉"],[0,"⪊"],[0,"⪋"],[0,"⪌"],[0,"⪍"],[0,"⪎"],[0,"⪏"],[0,"⪐"],[0,"⪑"],[0,"⪒"],[0,"⪓"],[0,"⪔"],[0,"⪕"],[0,"⪖"],[0,"⪗"],[0,"⪘"],[0,"⪙"],[0,"⪚"],[2,"⪝"],[0,"⪞"],[0,"⪟"],[0,"⪠"],[0,{v:"⪡",n:824,o:"⪡̸"}],[0,{v:"⪢",n:824,o:"⪢̸"}],[1,"⪤"],[0,"⪥"],[0,"⪦"],[0,"⪧"],[0,"⪨"],[0,"⪩"],[0,"⪪"],[0,"⪫"],[0,{v:"⪬",n:65024,o:"⪬︀"}],[0,{v:"⪭",n:65024,o:"⪭︀"}],[0,"⪮"],[0,{v:"⪯",n:824,o:"⪯̸"}],[0,{v:"⪰",n:824,o:"⪰̸"}],[2,"⪳"],[0,"⪴"],[0,"⪵"],[0,"⪶"],[0,"⪷"],[0,"⪸"],[0,"⪹"],[0,"⪺"],[0,"⪻"],[0,"⪼"],[0,"⪽"],[0,"⪾"],[0,"⪿"],[0,"⫀"],[0,"⫁"],[0,"⫂"],[0,"⫃"],[0,"⫄"],[0,{v:"⫅",n:824,o:"⫅̸"}],[0,{v:"⫆",n:824,o:"⫆̸"}],[0,"⫇"],[0,"⫈"],[2,{v:"⫋",n:65024,o:"⫋︀"}],[0,{v:"⫌",n:65024,o:"⫌︀"}],[2,"⫏"],[0,"⫐"],[0,"⫑"],[0,"⫒"],[0,"⫓"],[0,"⫔"],[0,"⫕"],[0,"⫖"],[0,"⫗"],[0,"⫘"],[0,"⫙"],[0,"⫚"],[0,"⫛"],[8,"⫤"],[1,"⫦"],[0,"⫧"],[0,"⫨"],[0,"⫩"],[1,"⫫"],[0,"⫬"],[0,"⫭"],[0,"⫮"],[0,"⫯"],[0,"⫰"],[0,"⫱"],[0,"⫲"],[0,"⫳"],[9,{v:"⫽",n:8421,o:"⫽⃥"}],[44343,{n:new Map(r([[56476,"𝒜"],[1,"𝒞"],[0,"𝒟"],[2,"𝒢"],[2,"𝒥"],[0,"𝒦"],[2,"𝒩"],[0,"𝒪"],[0,"𝒫"],[0,"𝒬"],[1,"𝒮"],[0,"𝒯"],[0,"𝒰"],[0,"𝒱"],[0,"𝒲"],[0,"𝒳"],[0,"𝒴"],[0,"𝒵"],[0,"𝒶"],[0,"𝒷"],[0,"𝒸"],[0,"𝒹"],[1,"𝒻"],[1,"𝒽"],[0,"𝒾"],[0,"𝒿"],[0,"𝓀"],[0,"𝓁"],[0,"𝓂"],[0,"𝓃"],[1,"𝓅"],[0,"𝓆"],[0,"𝓇"],[0,"𝓈"],[0,"𝓉"],[0,"𝓊"],[0,"𝓋"],[0,"𝓌"],[0,"𝓍"],[0,"𝓎"],[0,"𝓏"],[52,"𝔄"],[0,"𝔅"],[1,"𝔇"],[0,"𝔈"],[0,"𝔉"],[0,"𝔊"],[2,"𝔍"],[0,"𝔎"],[0,"𝔏"],[0,"𝔐"],[0,"𝔑"],[0,"𝔒"],[0,"𝔓"],[0,"𝔔"],[1,"𝔖"],[0,"𝔗"],[0,"𝔘"],[0,"𝔙"],[0,"𝔚"],[0,"𝔛"],[0,"𝔜"],[1,"𝔞"],[0,"𝔟"],[0,"𝔠"],[0,"𝔡"],[0,"𝔢"],[0,"𝔣"],[0,"𝔤"],[0,"𝔥"],[0,"𝔦"],[0,"𝔧"],[0,"𝔨"],[0,"𝔩"],[0,"𝔪"],[0,"𝔫"],[0,"𝔬"],[0,"𝔭"],[0,"𝔮"],[0,"𝔯"],[0,"𝔰"],[0,"𝔱"],[0,"𝔲"],[0,"𝔳"],[0,"𝔴"],[0,"𝔵"],[0,"𝔶"],[0,"𝔷"],[0,"𝔸"],[0,"𝔹"],[1,"𝔻"],[0,"𝔼"],[0,"𝔽"],[0,"𝔾"],[1,"𝕀"],[0,"𝕁"],[0,"𝕂"],[0,"𝕃"],[0,"𝕄"],[1,"𝕆"],[3,"𝕊"],[0,"𝕋"],[0,"𝕌"],[0,"𝕍"],[0,"𝕎"],[0,"𝕏"],[0,"𝕐"],[1,"𝕒"],[0,"𝕓"],[0,"𝕔"],[0,"𝕕"],[0,"𝕖"],[0,"𝕗"],[0,"𝕘"],[0,"𝕙"],[0,"𝕚"],[0,"𝕛"],[0,"𝕜"],[0,"𝕝"],[0,"𝕞"],[0,"𝕟"],[0,"𝕠"],[0,"𝕡"],[0,"𝕢"],[0,"𝕣"],[0,"𝕤"],[0,"𝕥"],[0,"𝕦"],[0,"𝕧"],[0,"𝕨"],[0,"𝕩"],[0,"𝕪"],[0,"𝕫"]]))}],[8906,"ff"],[0,"fi"],[0,"fl"],[0,"ffi"],[0,"ffl"]]))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attributeNames=t.elementNames=void 0,t.elementNames=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map((function(e){return[e.toLowerCase(),e]}))),t.attributeNames=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map((function(e){return[e.toLowerCase(),e]})))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prevElementSibling=t.nextElementSibling=t.getName=t.hasAttrib=t.getAttributeValue=t.getSiblings=t.getParent=t.getChildren=void 0;var r=n(210);function i(e){return(0,r.hasChildren)(e)?e.children:[]}function o(e){return e.parent||null}t.getChildren=i,t.getParent=o,t.getSiblings=function(e){var t=o(e);if(null!=t)return i(t);for(var n=[e],r=e.prev,a=e.next;null!=r;)n.unshift(r),r=r.prev;for(;null!=a;)n.push(a),a=a.next;return n},t.getAttributeValue=function(e,t){var n;return null===(n=e.attribs)||void 0===n?void 0:n[t]},t.hasAttrib=function(e,t){return null!=e.attribs&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&null!=e.attribs[t]},t.getName=function(e){return e.name},t.nextElementSibling=function(e){for(var t=e.next;null!==t&&!(0,r.isTag)(t);)t=t.next;return t},t.prevElementSibling=function(e){for(var t=e.prev;null!==t&&!(0,r.isTag)(t);)t=t.prev;return t}},function(e,t,n){"use strict";function r(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){var t=e.parent.children;t.splice(t.lastIndexOf(e),1)}}Object.defineProperty(t,"__esModule",{value:!0}),t.prepend=t.prependChild=t.append=t.appendChild=t.replaceElement=t.removeElement=void 0,t.removeElement=r,t.replaceElement=function(e,t){var n=t.prev=e.prev;n&&(n.next=t);var r=t.next=e.next;r&&(r.prev=t);var i=t.parent=e.parent;if(i){var o=i.children;o[o.lastIndexOf(e)]=t,e.parent=null}},t.appendChild=function(e,t){if(r(t),t.next=null,t.parent=e,e.children.push(t)>1){var n=e.children[e.children.length-2];n.next=t,t.prev=n}else t.prev=null},t.append=function(e,t){r(t);var n=e.parent,i=e.next;if(t.next=i,t.prev=e,e.next=t,t.parent=n,i){if(i.prev=t,n){var o=n.children;o.splice(o.lastIndexOf(i),0,t)}}else n&&n.children.push(t)},t.prependChild=function(e,t){if(r(t),t.parent=e,t.prev=null,1!==e.children.unshift(t)){var n=e.children[1];n.prev=t,t.next=n}else t.next=null},t.prepend=function(e,t){r(t);var n=e.parent;if(n){var i=n.children;i.splice(i.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=n,t.prev=e.prev,t.next=e,e.prev=t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uniqueSort=t.compareDocumentPosition=t.DocumentPosition=t.removeSubsets=void 0;var r,i=n(210);function o(e,t){var n=[],o=[];if(e===t)return 0;for(var a=(0,i.hasChildren)(e)?e:e.parent;a;)n.unshift(a),a=a.parent;for(a=(0,i.hasChildren)(t)?t:t.parent;a;)o.unshift(a),a=a.parent;for(var s=Math.min(n.length,o.length),l=0;l<s&&n[l]===o[l];)l++;if(0===l)return r.DISCONNECTED;var c=n[l-1],u=c.children,d=n[l],h=o[l];return u.indexOf(d)>u.indexOf(h)?c===t?r.FOLLOWING|r.CONTAINED_BY:r.FOLLOWING:c===e?r.PRECEDING|r.CONTAINS:r.PRECEDING}t.removeSubsets=function(e){for(var t=e.length;--t>=0;){var n=e[t];if(t>0&&e.lastIndexOf(n,t-1)>=0)e.splice(t,1);else for(var r=n.parent;r;r=r.parent)if(e.includes(r)){e.splice(t,1);break}}return e},function(e){e[e.DISCONNECTED=1]="DISCONNECTED",e[e.PRECEDING=2]="PRECEDING",e[e.FOLLOWING=4]="FOLLOWING",e[e.CONTAINS=8]="CONTAINS",e[e.CONTAINED_BY=16]="CONTAINED_BY"}(r=t.DocumentPosition||(t.DocumentPosition={})),t.compareDocumentPosition=o,t.uniqueSort=function(e){return(e=e.filter((function(e,t,n){return!n.includes(e,t+1)}))).sort((function(e,t){var n=o(e,t);return n&r.PRECEDING?-1:n&r.FOLLOWING?1:0})),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFeed=void 0;var r=n(702),i=n(709);t.getFeed=function(e){var t=l(d,e);return t?"feed"===t.name?function(e){var t,n=e.children,r={type:"atom",items:(0,i.getElementsByTagName)("entry",n).map((function(e){var t,n=e.children,r={media:s(n)};u(r,"id","id",n),u(r,"title","title",n);var i=null===(t=l("link",n))||void 0===t?void 0:t.attribs.href;i&&(r.link=i);var o=c("summary",n)||c("content",n);o&&(r.description=o);var a=c("updated",n);return a&&(r.pubDate=new Date(a)),r}))};u(r,"id","id",n),u(r,"title","title",n);var o=null===(t=l("link",n))||void 0===t?void 0:t.attribs.href;o&&(r.link=o);u(r,"description","subtitle",n);var a=c("updated",n);a&&(r.updated=new Date(a));return u(r,"author","email",n,!0),r}(t):function(e){var t,n,r=null!==(n=null===(t=l("channel",e.children))||void 0===t?void 0:t.children)&&void 0!==n?n:[],o={type:e.name.substr(0,3),id:"",items:(0,i.getElementsByTagName)("item",e.children).map((function(e){var t=e.children,n={media:s(t)};u(n,"id","guid",t),u(n,"title","title",t),u(n,"link","link",t),u(n,"description","description",t);var r=c("pubDate",t);return r&&(n.pubDate=new Date(r)),n}))};u(o,"title","title",r),u(o,"link","link",r),u(o,"description","description",r);var a=c("lastBuildDate",r);a&&(o.updated=new Date(a));return u(o,"author","managingEditor",r,!0),o}(t):null};var o=["url","type","lang"],a=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function s(e){return(0,i.getElementsByTagName)("media:content",e).map((function(e){for(var t=e.attribs,n={medium:t.medium,isDefault:!!t.isDefault},r=0,i=o;r<i.length;r++){t[c=i[r]]&&(n[c]=t[c])}for(var s=0,l=a;s<l.length;s++){var c;t[c=l[s]]&&(n[c]=parseInt(t[c],10))}return t.expression&&(n.expression=t.expression),n}))}function l(e,t){return(0,i.getElementsByTagName)(e,t,!0,1)[0]}function c(e,t,n){return void 0===n&&(n=!1),(0,r.textContent)((0,i.getElementsByTagName)(e,t,n,1)).trim()}function u(e,t,n,r,i){void 0===i&&(i=!1);var o=c(n,r,i);o&&(e[t]=o)}function d(e){return"rss"===e||"feed"===e||"rdf:RDF"===e}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Cheerio=void 0;var a=o(n(1064)),s=o(n(1065)),l=o(n(1079)),c=o(n(1080)),u=o(n(1081)),d=function(e,t,n){if(this.length=0,this.options=n,this._root=t,e){for(var r=0;r<e.length;r++)this[r]=e[r];this.length=e.length}};t.Cheerio=d,d.prototype.cheerio="[cheerio object]",d.prototype.splice=Array.prototype.splice,d.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(d.prototype,a,s,l,c,u)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toggleClass=t.removeClass=t.addClass=t.hasClass=t.removeAttr=t.val=t.data=t.prop=t.attr=void 0;var r=n(326),i=n(327),o=n(257),a=Object.prototype.hasOwnProperty,s=/\s+/,l="data-",c={null:null,true:!0,false:!1},u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,d=/^{[^]*}$|^\[[^]*]$/;function h(e,t,n){var o;if(e&&(0,i.isTag)(e))return null!==(o=e.attribs)&&void 0!==o||(e.attribs={}),t?a.call(e.attribs,t)?!n&&u.test(t)?t:e.attribs[t]:"option"===e.name&&"value"===t?(0,r.text)(e.children):"input"!==e.name||"radio"!==e.attribs.type&&"checkbox"!==e.attribs.type||"value"!==t?void 0:"on":e.attribs}function p(e,t,n){null===n?b(e,t):e.attribs[t]="".concat(n)}function m(e,t,n){return t in e?e[t]:!n&&u.test(t)?void 0!==h(e,t,!1):h(e,t,n)}function g(e,t,n,r){t in e?e[t]=n:p(e,t,!r&&u.test(t)?n?"":null:"".concat(n))}function f(e,t,n){var r,i=e;null!==(r=i.data)&&void 0!==r||(i.data={}),"object"==typeof t?Object.assign(i.data,t):"string"==typeof t&&void 0!==n&&(i.data[t]=n)}function _(e,t){var n,r,o;null==t?r=(n=Object.keys(e.attribs).filter((function(e){return e.startsWith(l)}))).map((function(e){return(0,i.camelCase)(e.slice(l.length))})):(n=[l+(0,i.cssCase)(t)],r=[t]);for(var s=0;s<n.length;++s){var u=n[s],h=r[s];if(a.call(e.attribs,u)&&!a.call(e.data,h)){if(o=e.attribs[u],a.call(c,o))o=c[o];else if(o===String(Number(o)))o=Number(o);else if(d.test(o))try{o=JSON.parse(o)}catch(e){}e.data[h]=o}}return null==t?e.data:o}function b(e,t){e.attribs&&a.call(e.attribs,t)&&delete e.attribs[t]}function v(e){return e?e.trim().split(s):[]}t.attr=function(e,t){if("object"==typeof e||void 0!==t){if("function"==typeof t){if("string"!=typeof e)throw new Error("Bad combination of arguments.");return(0,i.domEach)(this,(function(n,r){(0,i.isTag)(n)&&p(n,e,t.call(n,r,n.attribs[e]))}))}return(0,i.domEach)(this,(function(n){(0,i.isTag)(n)&&("object"==typeof e?Object.keys(e).forEach((function(t){var r=e[t];p(n,t,r)})):p(n,e,t))}))}return arguments.length>1?this:h(this[0],e,this.options.xmlMode)},t.prop=function(e,t){var n,r=this;if("string"==typeof e&&void 0===t){var a=this[0];if(!a||!(0,i.isTag)(a))return;switch(e){case"style":var s=this.css(),l=Object.keys(s);return l.forEach((function(e,t){s[t]=e})),s.length=l.length,s;case"tagName":case"nodeName":return a.name.toUpperCase();case"href":case"src":var c=null===(n=a.attribs)||void 0===n?void 0:n[e];return"undefined"==typeof URL||("href"!==e||"a"!==a.tagName&&"link"!==a.name)&&("src"!==e||"img"!==a.tagName&&"iframe"!==a.tagName&&"audio"!==a.tagName&&"video"!==a.tagName&&"source"!==a.tagName)||void 0===c||!this.options.baseURI?c:new URL(c,this.options.baseURI).href;case"innerText":return(0,o.innerText)(a);case"textContent":return(0,o.textContent)(a);case"outerHTML":return this.clone().wrap("<container />").parent().html();case"innerHTML":return this.html();default:return m(a,e,this.options.xmlMode)}}if("object"==typeof e||void 0!==t){if("function"==typeof t){if("object"==typeof e)throw new Error("Bad combination of arguments.");return(0,i.domEach)(this,(function(n,o){(0,i.isTag)(n)&&g(n,e,t.call(n,o,m(n,e,r.options.xmlMode)),r.options.xmlMode)}))}return(0,i.domEach)(this,(function(n){(0,i.isTag)(n)&&("object"==typeof e?Object.keys(e).forEach((function(t){var i=e[t];g(n,t,i,r.options.xmlMode)})):g(n,e,t,r.options.xmlMode))}))}},t.data=function(e,t){var n,r=this[0];if(r&&(0,i.isTag)(r)){var o=r;return null!==(n=o.data)&&void 0!==n||(o.data={}),e?"object"==typeof e||void 0!==t?((0,i.domEach)(this,(function(n){(0,i.isTag)(n)&&("object"==typeof e?f(n,e):f(n,e,t))})),this):a.call(o.data,e)?o.data[e]:_(o,e):_(o)}},t.val=function(e){var t=0===arguments.length,n=this[0];if(!n||!(0,i.isTag)(n))return t?void 0:this;switch(n.name){case"textarea":return this.text(e);case"select":var o=this.find("option:selected");if(!t){if(null==this.attr("multiple")&&"object"==typeof e)return this;this.find("option").removeAttr("selected");for(var a="object"!=typeof e?[e]:e,s=0;s<a.length;s++)this.find('option[value="'.concat(a[s],'"]')).attr("selected","");return this}return this.attr("multiple")?o.toArray().map((function(e){return(0,r.text)(e.children)})):o.attr("value");case"input":case"option":return t?this.attr("value"):this.attr("value",e)}},t.removeAttr=function(e){for(var t=v(e),n=function(e){(0,i.domEach)(r,(function(n){(0,i.isTag)(n)&&b(n,t[e])}))},r=this,o=0;o<t.length;o++)n(o);return this},t.hasClass=function(e){return this.toArray().some((function(t){var n=(0,i.isTag)(t)&&t.attribs.class,r=-1;if(n&&e.length)for(;(r=n.indexOf(e,r+1))>-1;){var o=r+e.length;if((0===r||s.test(n[r-1]))&&(o===n.length||s.test(n[o])))return!0}return!1}))},t.addClass=function e(t){if("function"==typeof t)return(0,i.domEach)(this,(function(n,r){if((0,i.isTag)(n)){var o=n.attribs.class||"";e.call([n],t.call(n,r,o))}}));if(!t||"string"!=typeof t)return this;for(var n=t.split(s),r=this.length,o=0;o<r;o++){var a=this[o];if((0,i.isTag)(a)){var l=h(a,"class",!1);if(l){for(var c=" ".concat(l," "),u=0;u<n.length;u++){var d="".concat(n[u]," ");c.includes(" ".concat(d))||(c+=d)}p(a,"class",c.trim())}else p(a,"class",n.join(" ").trim())}}return this},t.removeClass=function e(t){if("function"==typeof t)return(0,i.domEach)(this,(function(n,r){(0,i.isTag)(n)&&e.call([n],t.call(n,r,n.attribs.class||""))}));var n=v(t),r=n.length,o=0===arguments.length;return(0,i.domEach)(this,(function(e){if((0,i.isTag)(e))if(o)e.attribs.class="";else{for(var t=v(e.attribs.class),a=!1,s=0;s<r;s++){var l=t.indexOf(n[s]);l>=0&&(t.splice(l,1),a=!0,s--)}a&&(e.attribs.class=t.join(" "))}}))},t.toggleClass=function e(t,n){if("function"==typeof t)return(0,i.domEach)(this,(function(r,o){(0,i.isTag)(r)&&e.call([r],t.call(r,o,r.attribs.class||"",n),n)}));if(!t||"string"!=typeof t)return this;for(var r=t.split(s),o=r.length,a="boolean"==typeof n?n?1:-1:0,l=this.length,c=0;c<l;c++){var u=this[c];if((0,i.isTag)(u)){for(var d=v(u.attribs.class),h=0;h<o;h++){var p=d.indexOf(r[h]);a>=0&&p<0?d.push(r[h]):a<=0&&p>=0&&d.splice(p,1)}u.attribs.class=d.join(" ")}}return this}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.addBack=t.add=t.end=t.slice=t.index=t.toArray=t.get=t.eq=t.last=t.first=t.has=t.not=t.is=t.filterArray=t.filter=t.map=t.each=t.contents=t.children=t.siblings=t.prevUntil=t.prevAll=t.prev=t.nextUntil=t.nextAll=t.next=t.closest=t.parentsUntil=t.parents=t.parent=t.find=void 0;var s=n(210),l=o(n(1066)),c=n(327),u=n(326),d=n(257),h=/^\s*[~+]/;function p(e){return function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return function(r){var i,o=e(t,this);return r&&(o=v(o,r,this.options.xmlMode,null===(i=this._root)||void 0===i?void 0:i[0])),this._make(this.length>1&&o.length>1?n.reduce((function(e,t){return t(e)}),o):o)}}}t.find=function(e){var t;if(!e)return this._make([]);var n=this.toArray();if("string"!=typeof e){var r=(0,c.isCheerio)(e)?e.toArray():[e];return this._make(r.filter((function(e){return n.some((function(t){return(0,u.contains)(t,e)}))})))}var i=h.test(e)?n:this.children().toArray(),o={context:n,root:null===(t=this._root)||void 0===t?void 0:t[0],xmlMode:this.options.xmlMode,lowerCaseTags:this.options.lowerCaseTags,lowerCaseAttributeNames:this.options.lowerCaseAttributeNames,pseudos:this.options.pseudos,quirksMode:this.options.quirksMode};return this._make(l.select(e,i,o))};var m=p((function(e,t){for(var n,r=[],i=0;i<t.length;i++){var o=e(t[i]);r.push(o)}return(n=new Array).concat.apply(n,r)})),g=p((function(e,t){for(var n=[],r=0;r<t.length;r++){var i=e(t[r]);null!==i&&n.push(i)}return n}));function f(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=null,i=p((function(e,t){var n=[];return(0,c.domEach)(t,(function(t){for(var i;(i=e(t))&&!(null==r?void 0:r(i,n.length));t=i)n.push(i)})),n})).apply(void 0,a([e],t,!1));return function(e,t){var n=this;r="string"==typeof e?function(t){return l.is(t,e,n.options)}:e?b(e):null;var o=i.call(this,t);return r=null,o}}function _(e){return Array.from(new Set(e))}function b(e){return"function"==typeof e?function(t,n){return e.call(t,n,t)}:(0,c.isCheerio)(e)?function(t){return Array.prototype.includes.call(e,t)}:function(t){return e===t}}function v(e,t,n,r){return"string"==typeof t?l.filter(t,e,{xmlMode:n,root:r}):e.filter(b(t))}t.parent=g((function(e){var t=e.parent;return t&&!(0,s.isDocument)(t)?t:null}),_),t.parents=m((function(e){for(var t=[];e.parent&&!(0,s.isDocument)(e.parent);)t.push(e.parent),e=e.parent;return t}),d.uniqueSort,(function(e){return e.reverse()})),t.parentsUntil=f((function(e){var t=e.parent;return t&&!(0,s.isDocument)(t)?t:null}),d.uniqueSort,(function(e){return e.reverse()})),t.closest=function(e){var t,n=[];if(!e)return this._make(n);var r={xmlMode:this.options.xmlMode,root:null===(t=this._root)||void 0===t?void 0:t[0]},i="string"==typeof e?function(t){return l.is(t,e,r)}:b(e);return(0,c.domEach)(this,(function(e){for(;e&&(0,c.isTag)(e);){if(i(e,0)){n.includes(e)||n.push(e);break}e=e.parent}})),this._make(n)},t.next=g((function(e){return(0,d.nextElementSibling)(e)})),t.nextAll=m((function(e){for(var t=[];e.next;)e=e.next,(0,c.isTag)(e)&&t.push(e);return t}),_),t.nextUntil=f((function(e){return(0,d.nextElementSibling)(e)}),_),t.prev=g((function(e){return(0,d.prevElementSibling)(e)})),t.prevAll=m((function(e){for(var t=[];e.prev;)e=e.prev,(0,c.isTag)(e)&&t.push(e);return t}),_),t.prevUntil=f((function(e){return(0,d.prevElementSibling)(e)}),_),t.siblings=m((function(e){return(0,d.getSiblings)(e).filter((function(t){return(0,c.isTag)(t)&&t!==e}))}),d.uniqueSort),t.children=m((function(e){return(0,d.getChildren)(e).filter(c.isTag)}),_),t.contents=function(){var e=this.toArray().reduce((function(e,t){return(0,s.hasChildren)(t)?e.concat(t.children):e}),[]);return this._make(e)},t.each=function(e){for(var t=0,n=this.length;t<n&&!1!==e.call(this[t],t,this[t]);)++t;return this},t.map=function(e){for(var t=[],n=0;n<this.length;n++){var r=this[n],i=e.call(r,n,r);null!=i&&(t=t.concat(i))}return this._make(t)},t.filter=function(e){var t;return this._make(v(this.toArray(),e,this.options.xmlMode,null===(t=this._root)||void 0===t?void 0:t[0]))},t.filterArray=v,t.is=function(e){var t=this.toArray();return"string"==typeof e?l.some(t.filter(c.isTag),e,this.options):!!e&&t.some(b(e))},t.not=function(e){var t=this.toArray();if("string"==typeof e){var n=new Set(l.filter(e,t,this.options));t=t.filter((function(e){return!n.has(e)}))}else{var r=b(e);t=t.filter((function(e,t){return!r(e,t)}))}return this._make(t)},t.has=function(e){var t=this;return this.filter("string"==typeof e?":has(".concat(e,")"):function(n,r){return t._make(r).find(e).length>0})},t.first=function(){return this.length>1?this._make(this[0]):this},t.last=function(){return this.length>0?this._make(this[this.length-1]):this},t.eq=function(e){var t;return 0===(e=+e)&&this.length<=1?this:(e<0&&(e=this.length+e),this._make(null!==(t=this[e])&&void 0!==t?t:[]))},t.get=function(e){return null==e?this.toArray():this[e<0?this.length+e:e]},t.toArray=function(){return Array.prototype.slice.call(this)},t.index=function(e){var t,n;return null==e?(t=this.parent().children(),n=this[0]):"string"==typeof e?(t=this._make(e),n=this[0]):(t=this,n=(0,c.isCheerio)(e)?e[0]:e),Array.prototype.indexOf.call(t,n)},t.slice=function(e,t){return this._make(Array.prototype.slice.call(this,e,t))},t.end=function(){var e;return null!==(e=this.prevObject)&&void 0!==e?e:this._make([])},t.add=function(e,t){var n=this._make(e,t),r=(0,d.uniqueSort)(a(a([],this.get(),!0),n.get(),!0));return this._make(r)},t.addBack=function(e){return this.prevObject?this.add(e?this.prevObject.filter(e):this.prevObject):this}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)},i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return o(t,e),t},s=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.select=t.filter=t.some=t.is=t.aliases=t.pseudos=t.filters=void 0;var l=n(372),c=n(710),u=a(n(257)),d=a(n(295)),h=n(1078),p=n(713),m=n(710);Object.defineProperty(t,"filters",{enumerable:!0,get:function(){return m.filters}}),Object.defineProperty(t,"pseudos",{enumerable:!0,get:function(){return m.pseudos}}),Object.defineProperty(t,"aliases",{enumerable:!0,get:function(){return m.aliases}});var g={type:l.SelectorType.Universal,namespace:null},f={type:l.SelectorType.Pseudo,name:"scope",data:null};function _(e,t,n){if(void 0===n&&(n={}),"function"==typeof t)return e.some(t);var r=(0,h.groupSelectors)((0,l.parse)(t)),i=r[0],o=r[1];return i.length>0&&e.some((0,c._compileToken)(i,n))||o.some((function(t){return v(t,e,n).length>0}))}function b(e,t,n){if(0===t.length)return[];var r,i=(0,h.groupSelectors)(e),o=i[0],a=i[1];if(o.length){var s=w(t,o,n);if(0===a.length)return s;s.length&&(r=new Set(s))}for(var l=0;l<a.length&&(null==r?void 0:r.size)!==t.length;l++){var c=a[l];if(0===(r?t.filter((function(e){return u.isTag(e)&&!r.has(e)})):t).length)break;if((s=v(c,t,n)).length)if(r)s.forEach((function(e){return r.add(e)}));else{if(l===a.length-1)return s;r=new Set(s)}}return void 0!==r?r.size===t.length?t:t.filter((function(e){return r.has(e)})):[]}function v(e,t,n){var i;if(e.some(l.isTraversal)){var o=null!==(i=n.root)&&void 0!==i?i:(0,h.getDocumentRoot)(t[0]),a=r(r({},n),{context:t,relativeSelector:!1});return e.push(f),y(o,e,a,!0,t.length)}return y(t,e,n,!1,t.length)}function y(e,t,n,i,o){var a=t.findIndex(p.isFilter),s=t.slice(0,a),h=t[a],m=t.length-1===a?o:1/0,f=(0,p.getLimit)(h.name,h.data,m);if(0===f)return[];var _=(0!==s.length||Array.isArray(e)?0===s.length?(Array.isArray(e)?e:[e]).filter(u.isTag):i||s.some(l.isTraversal)?E(e,[s],n,f):w(e,[s],n):u.getChildren(e).filter(u.isTag)).slice(0,f),v=function(e,t,n,r){var i="string"==typeof n?parseInt(n,10):NaN;switch(e){case"first":case"lt":return t;case"last":return t.length>0?[t[t.length-1]]:t;case"nth":case"eq":return isFinite(i)&&Math.abs(i)<t.length?[i<0?t[t.length+i]:t[i]]:[];case"gt":return isFinite(i)?t.slice(i+1):[];case"even":return t.filter((function(e,t){return t%2==0}));case"odd":return t.filter((function(e,t){return t%2==1}));case"not":var o=new Set(b(n,t,r));return t.filter((function(e){return!o.has(e)}))}}(h.name,_,h.data,n);if(0===v.length||t.length===a+1)return v;var S=t.slice(a+1),T=S.some(l.isTraversal);if(T){if((0,l.isTraversal)(S[0])){var C=S[0].type;C!==l.SelectorType.Sibling&&C!==l.SelectorType.Adjacent||(v=(0,c.prepareContext)(v,u,!0)),S.unshift(g)}n=r(r({},n),{relativeSelector:!1,rootFunc:function(e){return v.includes(e)}})}else n.rootFunc&&n.rootFunc!==d.trueFunc&&(n=r(r({},n),{rootFunc:d.trueFunc}));return S.some(p.isFilter)?y(v,S,n,!1,o):T?E(v,[S],n,o):w(v,[S],n)}function E(e,t,n,r){return S(e,(0,c._compileToken)(t,n,e),r)}function S(e,t,n){void 0===n&&(n=1/0);var r=(0,c.prepareContext)(e,u,t.shouldTestNextSiblings);return u.find((function(e){return u.isTag(e)&&t(e)}),r,!0,n)}function w(e,t,n){var r=(Array.isArray(e)?e:[e]).filter(u.isTag);if(0===r.length)return r;var i=(0,c._compileToken)(t,n);return i===d.trueFunc?r:r.filter(i)}t.is=function(e,t,n){return void 0===n&&(n={}),_([e],t,n)},t.some=_,t.filter=function(e,t,n){return void 0===n&&(n={}),b((0,l.parse)(e),t,n)},t.select=function(e,t,n,r){if(void 0===n&&(n={}),void 0===r&&(r=1/0),"function"==typeof e)return S(t,e);var i=(0,h.groupSelectors)((0,l.parse)(e)),o=i[0],a=i[1].map((function(e){return y(t,e,n,!0,r)}));return o.length&&a.push(E(t,o,n,r)),0===a.length?[]:1===a.length?a[0]:u.uniqueSort(a.reduce((function(e,t){return s(s([],e,!0),t,!0)})))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parse=t.isTraversal=void 0;var r=n(530),i=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,o=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,a=new Map([[126,r.AttributeAction.Element],[94,r.AttributeAction.Start],[36,r.AttributeAction.End],[42,r.AttributeAction.Any],[33,r.AttributeAction.Not],[124,r.AttributeAction.Hyphen]]),s=new Set(["has","not","matches","is","where","host","host-context"]);function l(e){switch(e.type){case r.SelectorType.Adjacent:case r.SelectorType.Child:case r.SelectorType.Descendant:case r.SelectorType.Parent:case r.SelectorType.Sibling:case r.SelectorType.ColumnCombinator:return!0;default:return!1}}t.isTraversal=l;var c=new Set(["contains","icontains"]);function u(e,t,n){var r=parseInt(t,16)-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)}function d(e){return e.replace(o,u)}function h(e){return 39===e||34===e}function p(e){return 32===e||9===e||10===e||12===e||13===e}function m(e,t,n){var o=[];function u(e){var r=t.slice(n+e).match(i);if(!r)throw new Error("Expected name, found ".concat(t.slice(n)));var o=r[0];return n+=e+o.length,d(o)}function g(e){for(n+=e;n<t.length&&p(t.charCodeAt(n));)n++}function f(){for(var e=n+=1,r=1;r>0&&n<t.length;n++)40!==t.charCodeAt(n)||_(n)?41!==t.charCodeAt(n)||_(n)||r--:r++;if(r)throw new Error("Parenthesis not matched");return d(t.slice(e,n-1))}function _(e){for(var n=0;92===t.charCodeAt(--e);)n++;return 1==(1&n)}function b(){if(o.length>0&&l(o[o.length-1]))throw new Error("Did not expect successive traversals.")}function v(e){o.length>0&&o[o.length-1].type===r.SelectorType.Descendant?o[o.length-1].type=e:(b(),o.push({type:e}))}function y(e,t){o.push({type:r.SelectorType.Attribute,name:e,action:t,value:u(1),namespace:null,ignoreCase:"quirks"})}function E(){if(o.length&&o[o.length-1].type===r.SelectorType.Descendant&&o.pop(),0===o.length)throw new Error("Empty sub-selector");e.push(o)}if(g(0),t.length===n)return n;e:for(;n<t.length;){var S=t.charCodeAt(n);switch(S){case 32:case 9:case 10:case 12:case 13:0!==o.length&&o[0].type===r.SelectorType.Descendant||(b(),o.push({type:r.SelectorType.Descendant})),g(1);break;case 62:v(r.SelectorType.Child),g(1);break;case 60:v(r.SelectorType.Parent),g(1);break;case 126:v(r.SelectorType.Sibling),g(1);break;case 43:v(r.SelectorType.Adjacent),g(1);break;case 46:y("class",r.AttributeAction.Element);break;case 35:y("id",r.AttributeAction.Equals);break;case 91:g(1);var w=void 0,T=null;124===t.charCodeAt(n)?w=u(1):t.startsWith("*|",n)?(T="*",w=u(2)):(w=u(0),124===t.charCodeAt(n)&&61!==t.charCodeAt(n+1)&&(T=w,w=u(1))),g(0);var C=r.AttributeAction.Exists,x=a.get(t.charCodeAt(n));if(x){if(C=x,61!==t.charCodeAt(n+1))throw new Error("Expected `=`");g(2)}else 61===t.charCodeAt(n)&&(C=r.AttributeAction.Equals,g(1));var F="",D=null;if("exists"!==C){if(h(t.charCodeAt(n))){for(var k=t.charCodeAt(n),O=n+1;O<t.length&&(t.charCodeAt(O)!==k||_(O));)O+=1;if(t.charCodeAt(O)!==k)throw new Error("Attribute value didn't end");F=d(t.slice(n+1,O)),n=O+1}else{for(var I=n;n<t.length&&(!p(t.charCodeAt(n))&&93!==t.charCodeAt(n)||_(n));)n+=1;F=d(t.slice(I,n))}g(0);var A=32|t.charCodeAt(n);115===A?(D=!1,g(1)):105===A&&(D=!0,g(1))}if(93!==t.charCodeAt(n))throw new Error("Attribute selector didn't terminate");n+=1;var R={type:r.SelectorType.Attribute,name:w,action:C,value:F,namespace:T,ignoreCase:D};o.push(R);break;case 58:if(58===t.charCodeAt(n+1)){o.push({type:r.SelectorType.PseudoElement,name:u(2).toLowerCase(),data:40===t.charCodeAt(n)?f():null});continue}var N=u(1).toLowerCase(),M=null;if(40===t.charCodeAt(n))if(s.has(N)){if(h(t.charCodeAt(n+1)))throw new Error("Pseudo-selector ".concat(N," cannot be quoted"));if(n=m(M=[],t,n+1),41!==t.charCodeAt(n))throw new Error("Missing closing parenthesis in :".concat(N," (").concat(t,")"));n+=1}else{if(M=f(),c.has(N)){var P=M.charCodeAt(0);P===M.charCodeAt(M.length-1)&&h(P)&&(M=M.slice(1,-1))}M=d(M)}o.push({type:r.SelectorType.Pseudo,name:N,data:M});break;case 44:E(),o=[],g(1);break;default:if(t.startsWith("/*",n)){var L=t.indexOf("*/",n+2);if(L<0)throw new Error("Comment was not terminated");n=L+2,0===o.length&&g(0);break}T=null;var B=void 0;if(42===S)n+=1,B="*";else if(124===S){if(B="",124===t.charCodeAt(n+1)){v(r.SelectorType.ColumnCombinator),g(2);break}}else{if(!i.test(t.slice(n)))break e;B=u(0)}124===t.charCodeAt(n)&&124!==t.charCodeAt(n+1)&&(T=B,42===t.charCodeAt(n+1)?(B="*",n+=2):B=u(1)),o.push("*"===B?{type:r.SelectorType.Universal,namespace:T}:{type:r.SelectorType.Tag,name:B,namespace:T})}}return E(),n}t.parse=function(e){var t=[],n=m(t,"".concat(e),0);if(n<e.length)throw new Error("Unmatched selector: ".concat(e.slice(n)));return t}},function(e,t,n){"use strict";var r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.stringify=void 0;var i=n(530),o=["\\",'"'],a=r(r([],o,!0),["(",")"],!1),s=new Set(o.map((function(e){return e.charCodeAt(0)}))),l=new Set(a.map((function(e){return e.charCodeAt(0)}))),c=new Set(r(r([],a,!0),["~","^","$","*","+","!","|",":","[","]"," ","."],!1).map((function(e){return e.charCodeAt(0)})));function u(e){return e.map((function(e){return e.map(d).join("")})).join(", ")}function d(e,t,n){switch(e.type){case i.SelectorType.Child:return 0===t?"> ":" > ";case i.SelectorType.Parent:return 0===t?"< ":" < ";case i.SelectorType.Sibling:return 0===t?"~ ":" ~ ";case i.SelectorType.Adjacent:return 0===t?"+ ":" + ";case i.SelectorType.Descendant:return" ";case i.SelectorType.ColumnCombinator:return 0===t?"|| ":" || ";case i.SelectorType.Universal:return"*"===e.namespace&&t+1<n.length&&"name"in n[t+1]?"":"".concat(p(e.namespace),"*");case i.SelectorType.Tag:return h(e);case i.SelectorType.PseudoElement:return"::".concat(m(e.name,c)).concat(null===e.data?"":"(".concat(m(e.data,l),")"));case i.SelectorType.Pseudo:return":".concat(m(e.name,c)).concat(null===e.data?"":"(".concat("string"==typeof e.data?m(e.data,l):u(e.data),")"));case i.SelectorType.Attribute:if("id"===e.name&&e.action===i.AttributeAction.Equals&&"quirks"===e.ignoreCase&&!e.namespace)return"#".concat(m(e.value,c));if("class"===e.name&&e.action===i.AttributeAction.Element&&"quirks"===e.ignoreCase&&!e.namespace)return".".concat(m(e.value,c));var r=h(e);return e.action===i.AttributeAction.Exists?"[".concat(r,"]"):"[".concat(r).concat(function(e){switch(e){case i.AttributeAction.Equals:return"";case i.AttributeAction.Element:return"~";case i.AttributeAction.Start:return"^";case i.AttributeAction.End:return"$";case i.AttributeAction.Any:return"*";case i.AttributeAction.Not:return"!";case i.AttributeAction.Hyphen:return"|";case i.AttributeAction.Exists:throw new Error("Shouldn't be here")}}(e.action),'="').concat(m(e.value,s),'"').concat(null===e.ignoreCase?"":e.ignoreCase?" i":" s","]")}}function h(e){return"".concat(p(e.namespace)).concat(m(e.name,c))}function p(e){return null!==e?"".concat("*"===e?"*":m(e,c),"|"):""}function m(e,t){for(var n=0,r="",i=0;i<e.length;i++)t.has(e.charCodeAt(i))&&(r+="".concat(e.slice(n,i),"\\").concat(e.charAt(i)),n=i+1);return r.length>0?r+e.slice(n):e}t.stringify=u},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.compileToken=t.compileUnsafe=t.compile=void 0;var s=n(372),l=a(n(295)),c=o(n(711)),u=n(1070),d=n(531);function h(e,t,n){return _("string"==typeof e?(0,s.parse)(e):e,t,n)}function p(e){return e.type===s.SelectorType.Pseudo&&("scope"===e.name||Array.isArray(e.data)&&e.data.some((function(e){return e.some(p)})))}t.compile=function(e,t,n){var r=h(e,t,n);return(0,d.ensureIsTag)(r,t.adapter)},t.compileUnsafe=h;var m={type:s.SelectorType.Descendant},g={type:"_flexibleDescendant"},f={type:s.SelectorType.Pseudo,name:"scope",data:null};function _(e,t,n){var r;e.forEach(c.default),n=null!==(r=t.context)&&void 0!==r?r:n;var i=Array.isArray(n),o=n&&(Array.isArray(n)?n:[n]);if(!1!==t.relativeSelector)!function(e,t,n){for(var r=t.adapter,i=!!(null==n?void 0:n.every((function(e){var t=r.isTag(e)&&r.getParent(e);return e===d.PLACEHOLDER_ELEMENT||t&&r.isTag(t)}))),o=0,a=e;o<a.length;o++){var l=a[o];if(l.length>0&&(0,c.isTraversal)(l[0])&&l[0].type!==s.SelectorType.Descendant);else{if(!i||l.some(p))continue;l.unshift(m)}l.unshift(f)}}(e,t,o);else if(e.some((function(e){return e.length>0&&(0,c.isTraversal)(e[0])})))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");var a=!1,h=e.map((function(e){if(e.length>=2){var n=e[0],r=e[1];n.type!==s.SelectorType.Pseudo||"scope"!==n.name||(i&&r.type===s.SelectorType.Descendant?e[1]=g:r.type!==s.SelectorType.Adjacent&&r.type!==s.SelectorType.Sibling||(a=!0))}return function(e,t,n){var r;return e.reduce((function(e,r){return e===l.default.falseFunc?l.default.falseFunc:(0,u.compileGeneralSelector)(e,r,t,n,_)}),null!==(r=t.rootFunc)&&void 0!==r?r:l.default.trueFunc)}(e,t,o)})).reduce(b,l.default.falseFunc);return h.shouldTestNextSiblings=a,h}function b(e,t){return t===l.default.falseFunc||e===l.default.trueFunc?e:e===l.default.falseFunc||t===l.default.trueFunc?t:function(n){return e(n)||t(n)}}t.compileToken=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compileGeneralSelector=void 0;var r=n(1071),i=n(712),o=n(372);function a(e,t){var n=t.getParent(e);return n&&t.isTag(n)?n:null}t.compileGeneralSelector=function(e,t,n,s,l){var c=n.adapter,u=n.equals;switch(t.type){case o.SelectorType.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case o.SelectorType.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case o.SelectorType.Attribute:if(null!=t.namespace)throw new Error("Namespaced attributes are not yet supported by css-select");return n.xmlMode&&!n.lowerCaseAttributeNames||(t.name=t.name.toLowerCase()),r.attributeRules[t.action](e,t,n);case o.SelectorType.Pseudo:return(0,i.compilePseudoSelector)(e,t,n,s,l);case o.SelectorType.Tag:if(null!=t.namespace)throw new Error("Namespaced tag names are not yet supported by css-select");var d=t.name;return n.xmlMode&&!n.lowerCaseTags||(d=d.toLowerCase()),function(t){return c.getName(t)===d&&e(t)};case o.SelectorType.Descendant:if(!1===n.cacheResults||"undefined"==typeof WeakSet)return function(t){for(var n=t;n=a(n,c);)if(e(n))return!0;return!1};var h=new WeakSet;return function(t){for(var n=t;n=a(n,c);)if(!h.has(n)){if(c.isTag(n)&&e(n))return!0;h.add(n)}return!1};case"_flexibleDescendant":return function(t){var n=t;do{if(e(n))return!0}while(n=a(n,c));return!1};case o.SelectorType.Parent:return function(t){return c.getChildren(t).some((function(t){return c.isTag(t)&&e(t)}))};case o.SelectorType.Child:return function(t){var n=c.getParent(t);return null!=n&&c.isTag(n)&&e(n)};case o.SelectorType.Sibling:return function(t){for(var n=c.getSiblings(t),r=0;r<n.length;r++){var i=n[r];if(u(t,i))break;if(c.isTag(i)&&e(i))return!0}return!1};case o.SelectorType.Adjacent:return c.prevElementSibling?function(t){var n=c.prevElementSibling(t);return null!=n&&e(n)}:function(t){for(var n,r=c.getSiblings(t),i=0;i<r.length;i++){var o=r[i];if(u(t,o))break;c.isTag(o)&&(n=o)}return!!n&&e(n)};case o.SelectorType.Universal:if(null!=t.namespace&&"*"!==t.namespace)throw new Error("Namespaced universal selectors are not yet supported by css-select");return e}}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.attributeRules=void 0;var i=r(n(295)),o=/[-[\]{}()*+?.,\\^$|#\s]/g;function a(e){return e.replace(o,"\\$&")}var s=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function l(e,t){return"boolean"==typeof e.ignoreCase?e.ignoreCase:"quirks"===e.ignoreCase?!!t.quirksMode:!t.xmlMode&&s.has(e.name)}t.attributeRules={equals:function(e,t,n){var r=n.adapter,i=t.name,o=t.value;return l(t,n)?(o=o.toLowerCase(),function(t){var n=r.getAttributeValue(t,i);return null!=n&&n.length===o.length&&n.toLowerCase()===o&&e(t)}):function(t){return r.getAttributeValue(t,i)===o&&e(t)}},hyphen:function(e,t,n){var r=n.adapter,i=t.name,o=t.value,a=o.length;return l(t,n)?(o=o.toLowerCase(),function(t){var n=r.getAttributeValue(t,i);return null!=n&&(n.length===a||"-"===n.charAt(a))&&n.substr(0,a).toLowerCase()===o&&e(t)}):function(t){var n=r.getAttributeValue(t,i);return null!=n&&(n.length===a||"-"===n.charAt(a))&&n.substr(0,a)===o&&e(t)}},element:function(e,t,n){var r=n.adapter,o=t.name,s=t.value;if(/\s/.test(s))return i.default.falseFunc;var c=new RegExp("(?:^|\\s)".concat(a(s),"(?:$|\\s)"),l(t,n)?"i":"");return function(t){var n=r.getAttributeValue(t,o);return null!=n&&n.length>=s.length&&c.test(n)&&e(t)}},exists:function(e,t,n){var r=t.name,i=n.adapter;return function(t){return i.hasAttrib(t,r)&&e(t)}},start:function(e,t,n){var r=n.adapter,o=t.name,a=t.value,s=a.length;return 0===s?i.default.falseFunc:l(t,n)?(a=a.toLowerCase(),function(t){var n=r.getAttributeValue(t,o);return null!=n&&n.length>=s&&n.substr(0,s).toLowerCase()===a&&e(t)}):function(t){var n;return!!(null===(n=r.getAttributeValue(t,o))||void 0===n?void 0:n.startsWith(a))&&e(t)}},end:function(e,t,n){var r=n.adapter,o=t.name,a=t.value,s=-a.length;return 0===s?i.default.falseFunc:l(t,n)?(a=a.toLowerCase(),function(t){var n;return(null===(n=r.getAttributeValue(t,o))||void 0===n?void 0:n.substr(s).toLowerCase())===a&&e(t)}):function(t){var n;return!!(null===(n=r.getAttributeValue(t,o))||void 0===n?void 0:n.endsWith(a))&&e(t)}},any:function(e,t,n){var r=n.adapter,o=t.name,s=t.value;if(""===s)return i.default.falseFunc;if(l(t,n)){var c=new RegExp(a(s),"i");return function(t){var n=r.getAttributeValue(t,o);return null!=n&&n.length>=s.length&&c.test(n)&&e(t)}}return function(t){var n;return!!(null===(n=r.getAttributeValue(t,o))||void 0===n?void 0:n.includes(s))&&e(t)}},not:function(e,t,n){var r=n.adapter,i=t.name,o=t.value;return""===o?function(t){return!!r.getAttributeValue(t,i)&&e(t)}:l(t,n)?(o=o.toLowerCase(),function(t){var n=r.getAttributeValue(t,i);return(null==n||n.length!==o.length||n.toLowerCase()!==o)&&e(t)}):function(t){return r.getAttributeValue(t,i)!==o&&e(t)}}}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.filters=void 0;var i=r(n(1073)),o=r(n(295));function a(e,t){return function(n){var r=t.getParent(n);return null!=r&&t.isTag(r)&&e(n)}}function s(e){return function(t,n,r){var i=r.adapter[e];return"function"!=typeof i?o.default.falseFunc:function(e){return i(e)&&t(e)}}}t.filters={contains:function(e,t,n){var r=n.adapter;return function(n){return e(n)&&r.getText(n).includes(t)}},icontains:function(e,t,n){var r=n.adapter,i=t.toLowerCase();return function(t){return e(t)&&r.getText(t).toLowerCase().includes(i)}},"nth-child":function(e,t,n){var r=n.adapter,s=n.equals,l=(0,i.default)(t);return l===o.default.falseFunc?o.default.falseFunc:l===o.default.trueFunc?a(e,r):function(t){for(var n=r.getSiblings(t),i=0,o=0;o<n.length&&!s(t,n[o]);o++)r.isTag(n[o])&&i++;return l(i)&&e(t)}},"nth-last-child":function(e,t,n){var r=n.adapter,s=n.equals,l=(0,i.default)(t);return l===o.default.falseFunc?o.default.falseFunc:l===o.default.trueFunc?a(e,r):function(t){for(var n=r.getSiblings(t),i=0,o=n.length-1;o>=0&&!s(t,n[o]);o--)r.isTag(n[o])&&i++;return l(i)&&e(t)}},"nth-of-type":function(e,t,n){var r=n.adapter,s=n.equals,l=(0,i.default)(t);return l===o.default.falseFunc?o.default.falseFunc:l===o.default.trueFunc?a(e,r):function(t){for(var n=r.getSiblings(t),i=0,o=0;o<n.length;o++){var a=n[o];if(s(t,a))break;r.isTag(a)&&r.getName(a)===r.getName(t)&&i++}return l(i)&&e(t)}},"nth-last-of-type":function(e,t,n){var r=n.adapter,s=n.equals,l=(0,i.default)(t);return l===o.default.falseFunc?o.default.falseFunc:l===o.default.trueFunc?a(e,r):function(t){for(var n=r.getSiblings(t),i=0,o=n.length-1;o>=0;o--){var a=n[o];if(s(t,a))break;r.isTag(a)&&r.getName(a)===r.getName(t)&&i++}return l(i)&&e(t)}},root:function(e,t,n){var r=n.adapter;return function(t){var n=r.getParent(t);return(null==n||!r.isTag(n))&&e(t)}},scope:function(e,n,r,i){var o=r.equals;return i&&0!==i.length?1===i.length?function(t){return o(i[0],t)&&e(t)}:function(t){return i.includes(t)&&e(t)}:t.filters.root(e,n,r)},hover:s("isHovered"),visited:s("isVisited"),active:s("isActive")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sequence=t.generate=t.compile=t.parse=void 0;var r=n(1074);Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return r.parse}});var i=n(1075);Object.defineProperty(t,"compile",{enumerable:!0,get:function(){return i.compile}}),Object.defineProperty(t,"generate",{enumerable:!0,get:function(){return i.generate}}),t.default=function(e){return(0,i.compile)((0,r.parse)(e))},t.sequence=function(e){return(0,i.generate)((0,r.parse)(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parse=void 0;var r=new Set([9,10,12,13,32]),i="0".charCodeAt(0),o="9".charCodeAt(0);t.parse=function(e){if("even"===(e=e.trim().toLowerCase()))return[2,0];if("odd"===e)return[2,1];var t=0,n=0,a=l(),s=c();if(t<e.length&&"n"===e.charAt(t)&&(t++,n=a*(null!=s?s:1),u(),t<e.length?(a=l(),u(),s=c()):a=s=0),null===s||t<e.length)throw new Error("n-th rule couldn't be parsed ('".concat(e,"')"));return[n,a*s];function l(){return"-"===e.charAt(t)?(t++,-1):("+"===e.charAt(t)&&t++,1)}function c(){for(var n=t,r=0;t<e.length&&e.charCodeAt(t)>=i&&e.charCodeAt(t)<=o;)r=10*r+(e.charCodeAt(t)-i),t++;return t===n?null:r}function u(){for(;t<e.length&&r.has(e.charCodeAt(t));)t++}}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.generate=t.compile=void 0;var i=r(n(295));t.compile=function(e){var t=e[0],n=e[1]-1;if(n<0&&t<=0)return i.default.falseFunc;if(-1===t)return function(e){return e<=n};if(0===t)return function(e){return e===n};if(1===t)return n<0?i.default.trueFunc:function(e){return e>=n};var r=Math.abs(t),o=(n%r+r)%r;return t>1?function(e){return e>=n&&e%r===o}:function(e){return e<=n&&e%r===o}},t.generate=function(e){var t=e[0],n=e[1]-1,r=0;if(t<0){var i=-t,o=(n%i+i)%i;return function(){var e=o+i*r++;return e>n?null:e}}return 0===t?n<0?function(){return null}:function(){return 0==r++?n:null}:(n<0&&(n+=t*Math.ceil(-n/t)),function(){return t*r+++n})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyPseudoArgs=t.pseudos=void 0,t.pseudos={empty:function(e,t){var n=t.adapter;return!n.getChildren(e).some((function(e){return n.isTag(e)||""!==n.getText(e)}))},"first-child":function(e,t){var n=t.adapter,r=t.equals;if(n.prevElementSibling)return null==n.prevElementSibling(e);var i=n.getSiblings(e).find((function(e){return n.isTag(e)}));return null!=i&&r(e,i)},"last-child":function(e,t){for(var n=t.adapter,r=t.equals,i=n.getSiblings(e),o=i.length-1;o>=0;o--){if(r(e,i[o]))return!0;if(n.isTag(i[o]))break}return!1},"first-of-type":function(e,t){for(var n=t.adapter,r=t.equals,i=n.getSiblings(e),o=n.getName(e),a=0;a<i.length;a++){var s=i[a];if(r(e,s))return!0;if(n.isTag(s)&&n.getName(s)===o)break}return!1},"last-of-type":function(e,t){for(var n=t.adapter,r=t.equals,i=n.getSiblings(e),o=n.getName(e),a=i.length-1;a>=0;a--){var s=i[a];if(r(e,s))return!0;if(n.isTag(s)&&n.getName(s)===o)break}return!1},"only-of-type":function(e,t){var n=t.adapter,r=t.equals,i=n.getName(e);return n.getSiblings(e).every((function(t){return r(e,t)||!n.isTag(t)||n.getName(t)!==i}))},"only-child":function(e,t){var n=t.adapter,r=t.equals;return n.getSiblings(e).every((function(t){return r(e,t)||!n.isTag(t)}))}},t.verifyPseudoArgs=function(e,t,n,r){if(null===n){if(e.length>r)throw new Error("Pseudo-class :".concat(t," requires an argument"))}else if(e.length===r)throw new Error("Pseudo-class :".concat(t," doesn't have any arguments"))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.aliases=void 0,t.aliases={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:":is(\n :is(button, input, select, textarea, optgroup, option)[disabled],\n optgroup[disabled] > option,\n fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)\n )",enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.groupSelectors=t.getDocumentRoot=void 0;var r=n(713);t.getDocumentRoot=function(e){for(;e.parent;)e=e.parent;return e},t.groupSelectors=function(e){for(var t=[],n=[],i=0,o=e;i<o.length;i++){var a=o[i];a.some(r.isFilter)?t.push(a):n.push(a)}return[n,t]}},function(e,t,n){"use strict";var r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.clone=t.text=t.toString=t.html=t.empty=t.replaceWith=t.remove=t.insertBefore=t.before=t.insertAfter=t.after=t.wrapAll=t.unwrap=t.wrapInner=t.wrap=t.prepend=t.append=t.prependTo=t.appendTo=t._makeDomArray=void 0;var i=n(210),o=n(714),a=n(326),s=n(327),l=n(257);function c(e){return function(){for(var t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=this.length-1;return(0,s.domEach)(this,(function(r,a){if((0,i.hasChildren)(r)){var s="function"==typeof n[0]?n[0].call(r,a,t._render(r.children)):n,l=t._makeDomArray(s,a<o);e(l,r.children,r)}}))}}function u(e,t,n,i,o){for(var a,s,l=r([t,n],i,!0),c=0===t?null:e[t-1],u=t+n>=e.length?null:e[t+n],d=0;d<i.length;++d){var h=i[d],p=h.parent;if(p){var m=p.children.indexOf(h);m>-1&&(p.children.splice(m,1),o===p&&t>m&&l[0]--)}h.parent=o,h.prev&&(h.prev.next=null!==(a=h.next)&&void 0!==a?a:null),h.next&&(h.next.prev=null!==(s=h.prev)&&void 0!==s?s:null),h.prev=0===d?c:i[d-1],h.next=d===i.length-1?u:i[d+1]}return c&&(c.next=i[0]),u&&(u.prev=i[i.length-1]),e.splice.apply(e,l)}function d(e){return function(t){for(var n=this.length-1,r=this.parents().last(),o=0;o<this.length;o++){var a=this[o],l="function"==typeof t?t.call(a,o,a):"string"!=typeof t||(0,s.isHtml)(t)?t:r.find(t).clone(),c=this._makeDomArray(l,o<n)[0];if(c&&(0,i.hasChildren)(c)){for(var u=c,d=0;d<u.children.length;){var h=u.children[d];(0,s.isTag)(h)?(u=h,d=0):d++}e(a,u,[c])}}return this}}t._makeDomArray=function(e,t){var n=this;return null==e?[]:(0,s.isCheerio)(e)?t?(0,s.cloneDom)(e.get()):e.get():Array.isArray(e)?e.reduce((function(e,r){return e.concat(n._makeDomArray(r,t))}),[]):"string"==typeof e?this._parse(e,this.options,!1,null).children:t?(0,s.cloneDom)([e]):[e]},t.appendTo=function(e){return((0,s.isCheerio)(e)?e:this._make(e)).append(this),this},t.prependTo=function(e){return((0,s.isCheerio)(e)?e:this._make(e)).prepend(this),this},t.append=c((function(e,t,n){u(t,t.length,0,e,n)})),t.prepend=c((function(e,t,n){u(t,0,0,e,n)})),t.wrap=d((function(e,t,n){var r=e.parent;if(r){var i=r.children,a=i.indexOf(e);(0,o.update)([e],t),u(i,a,0,n,r)}})),t.wrapInner=d((function(e,t,n){(0,i.hasChildren)(e)&&((0,o.update)(e.children,t),(0,o.update)(n,e))})),t.unwrap=function(e){var t=this;return this.parent(e).not("body").each((function(e,n){t._make(n).replaceWith(n.children)})),this},t.wrapAll=function(e){var t=this[0];if(t){for(var n=this._make("function"==typeof e?e.call(t,0,t):e).insertBefore(t),r=void 0,i=0;i<n.length;i++)"tag"===n[i].type&&(r=n[i]);for(var o=0;r&&o<r.children.length;){var a=r.children[o];"tag"===a.type?(r=a,o=0):o++}r&&this._make(r).append(this)}return this},t.after=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=this.length-1;return(0,s.domEach)(this,(function(n,o){var a=n.parent;if((0,i.hasChildren)(n)&&a){var s=a.children,l=s.indexOf(n);if(!(l<0)){var c="function"==typeof t[0]?t[0].call(n,o,e._render(n.children)):t;u(s,l+1,0,e._makeDomArray(c,o<r),a)}}}))},t.insertAfter=function(e){var t=this;"string"==typeof e&&(e=this._make(e)),this.remove();var n=[];return this._makeDomArray(e).forEach((function(e){var r=t.clone().toArray(),i=e.parent;if(i){var o=i.children,a=o.indexOf(e);a<0||(u(o,a+1,0,r,i),n.push.apply(n,r))}})),this._make(n)},t.before=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=this.length-1;return(0,s.domEach)(this,(function(n,o){var a=n.parent;if((0,i.hasChildren)(n)&&a){var s=a.children,l=s.indexOf(n);if(!(l<0)){var c="function"==typeof t[0]?t[0].call(n,o,e._render(n.children)):t;u(s,l,0,e._makeDomArray(c,o<r),a)}}}))},t.insertBefore=function(e){var t=this,n=this._make(e);this.remove();var r=[];return(0,s.domEach)(n,(function(e){var n=t.clone().toArray(),i=e.parent;if(i){var o=i.children,a=o.indexOf(e);a<0||(u(o,a,0,n,i),r.push.apply(r,n))}})),this._make(r)},t.remove=function(e){var t=e?this.filter(e):this;return(0,s.domEach)(t,(function(e){(0,l.removeElement)(e),e.prev=e.next=e.parent=null})),this},t.replaceWith=function(e){var t=this;return(0,s.domEach)(this,(function(n,r){var i=n.parent;if(i){var a=i.children,s="function"==typeof e?e.call(n,r,n):e,l=t._makeDomArray(s);(0,o.update)(l,null);var c=a.indexOf(n);u(a,c,1,l,i),l.includes(n)||(n.parent=n.prev=n.next=null)}}))},t.empty=function(){return(0,s.domEach)(this,(function(e){(0,i.hasChildren)(e)&&(e.children.forEach((function(e){e.next=e.prev=e.parent=null})),e.children.length=0)}))},t.html=function(e){var t=this;if(void 0===e){var n=this[0];return n&&(0,i.hasChildren)(n)?this._render(n.children):null}return(0,s.domEach)(this,(function(n){if((0,i.hasChildren)(n)){n.children.forEach((function(e){e.next=e.prev=e.parent=null}));var r=(0,s.isCheerio)(e)?e.toArray():t._parse("".concat(e),t.options,!1,n).children;(0,o.update)(r,n)}}))},t.toString=function(){return this._render(this)},t.text=function(e){var t=this;return void 0===e?(0,a.text)(this):"function"==typeof e?(0,s.domEach)(this,(function(n,r){return t._make(n).text(e.call(n,r,(0,a.text)([n])))})):(0,s.domEach)(this,(function(t){if((0,i.hasChildren)(t)){t.children.forEach((function(e){e.next=e.prev=e.parent=null}));var n=new i.Text("".concat(e));(0,o.update)(n,t)}}))},t.clone=function(){return this._make((0,s.cloneDom)(this.get()))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.css=void 0;var r=n(327);function i(e,t,n,r){if("string"==typeof t){var a=o(e),s="function"==typeof n?n.call(e,r,a[t]):n;""===s?delete a[t]:null!=s&&(a[t]=s),e.attribs.style=(l=a,Object.keys(l).reduce((function(e,t){return"".concat(e).concat(e?" ":"").concat(t,": ").concat(l[t],";")}),""))}else"object"==typeof t&&Object.keys(t).forEach((function(n,r){i(e,n,t[n],r)}));var l}function o(e,t){if(e&&(0,r.isTag)(e)){var n=function(e){if(e=(e||"").trim(),!e)return{};for(var t,n={},r=0,i=e.split(";");r<i.length;r++){var o=i[r],a=o.indexOf(":");if(a<1||a===o.length-1){var s=o.trimEnd();s.length>0&&void 0!==t&&(n[t]+=";".concat(s))}else n[t=o.slice(0,a).trim()]=o.slice(a+1).trim()}return n}(e.attribs.style);if("string"==typeof t)return n[t];if(Array.isArray(t)){var i={};return t.forEach((function(e){null!=n[e]&&(i[e]=n[e])})),i}return n}}t.css=function(e,t){return null!=e&&null!=t||"object"==typeof e&&!Array.isArray(e)?(0,r.domEach)(this,(function(n,o){(0,r.isTag)(n)&&i(n,e,t,o)})):0!==this.length?o(this[0],e):void 0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeArray=t.serialize=void 0;var r=n(327),i="input,select,textarea,keygen",o=/%20/g,a=/\r?\n/g;t.serialize=function(){return this.serializeArray().map((function(e){return"".concat(encodeURIComponent(e.name),"=").concat(encodeURIComponent(e.value))})).join("&").replace(o,"+")},t.serializeArray=function(){var e=this;return this.map((function(t,n){var o=e._make(n);return(0,r.isTag)(n)&&"form"===n.name?o.find(i).toArray():o.filter(i).toArray()})).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map((function(t,n){var r,i=e._make(n),o=i.attr("name"),s=null!==(r=i.val())&&void 0!==r?r:"";return Array.isArray(s)?s.map((function(e){return{name:o,value:e.replace(a,"\r\n")}})):{name:o,value:s.replace(a,"\r\n")}})).toArray()}},function(e,t,n){"use strict";var r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.renderWithParse5=t.parseWithParse5=void 0;var i=n(210),o=n(715),a=n(1092);t.parseWithParse5=function(e,t,n,r){var i={scriptingEnabled:"boolean"!=typeof t.scriptingEnabled||t.scriptingEnabled,treeAdapter:a.adapter,sourceCodeLocationInfo:t.sourceCodeLocationInfo};return n?(0,o.parse)(e,i):(0,o.parseFragment)(r,e,i)};var s={treeAdapter:a.adapter};t.renderWithParse5=function(e){for(var t,n=("length"in e?e:[e]),a=0;a<n.length;a+=1){var l=n[a];(0,i.isDocument)(l)&&(t=Array.prototype.splice).call.apply(t,r([n,a,1],l.children,!1))}var c="";for(a=0;a<n.length;a+=1){l=n[a];c+=(0,o.serializeOuter)(l,s)}return c}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Preprocessor=void 0;const r=n(532),i=n(437);t.Preprocessor=class{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=65536,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e){const{line:t,col:n,offset:r}=this;return{code:e,startLine:t,endLine:t,startCol:n,endCol:n,startOffset:r,endOffset:r}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){const t=this.html.charCodeAt(this.pos+1);if((0,r.isSurrogatePair)(t))return this.pos++,this._addGap(),(0,r.getSurrogatePairCodePoint)(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,r.CODE_POINTS.EOF;return this._err(i.ERR.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t<e.length;t++){if((32|this.html.charCodeAt(this.pos+t))!==e.charCodeAt(t))return!1}return!0}peek(e){const t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,r.CODE_POINTS.EOF;const n=this.html.charCodeAt(t);return n===r.CODE_POINTS.CARRIAGE_RETURN?r.CODE_POINTS.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,r.CODE_POINTS.EOF;let e=this.html.charCodeAt(this.pos);if(e===r.CODE_POINTS.CARRIAGE_RETURN)return this.isEol=!0,this.skipNextNewLine=!0,r.CODE_POINTS.LINE_FEED;if(e===r.CODE_POINTS.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine))return this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance();this.skipNextNewLine=!1,(0,r.isSurrogate)(e)&&(e=this._processSurrogate(e));return null===this.handler.onParseError||e>31&&e<127||e===r.CODE_POINTS.LINE_FEED||e===r.CODE_POINTS.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e}_checkForProblematicCharacters(e){(0,r.isControlCodePoint)(e)?this._err(i.ERR.controlCharacterInInputStream):(0,r.isUndefinedCodePoint)(e)&&this._err(i.ERR.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXML=t.decodeHTMLStrict=t.decodeHTML=t.determineBranch=t.BinTrieFlags=t.fromCodePoint=t.replaceCodePoint=t.decodeCodePoint=t.xmlDecodeTree=t.htmlDecodeTree=void 0;var i=r(n(1085));t.htmlDecodeTree=i.default;var o=r(n(1086));t.xmlDecodeTree=o.default;var a=r(n(718));t.decodeCodePoint=a.default;var s,l,c=n(718);function u(e){return function(t,n){for(var r="",i=0,o=0;(o=t.indexOf("&",o))>=0;)if(r+=t.slice(i,o),i=o,o+=1,t.charCodeAt(o)!==s.NUM){for(var c=0,u=1,h=0,p=e[h];o<t.length&&!((h=d(e,p,h+1,t.charCodeAt(o)))<0);o++,u++){var m=(p=e[h])&l.VALUE_LENGTH;if(m){var g;if(n&&t.charCodeAt(o)!==s.SEMI||(c=h,u=0),0===(g=(m>>14)-1))break;h+=g}}if(0!==c)r+=1===(g=(e[c]&l.VALUE_LENGTH)>>14)?String.fromCharCode(e[c]&~l.VALUE_LENGTH):2===g?String.fromCharCode(e[c+1]):String.fromCharCode(e[c+1],e[c+2]),i=o-u+1}else{var f=o+1,_=10,b=t.charCodeAt(f);(b|s.To_LOWER_BIT)===s.LOWER_X&&(_=16,o+=1,f+=1);do{b=t.charCodeAt(++o)}while(b>=s.ZERO&&b<=s.NINE||16===_&&(b|s.To_LOWER_BIT)>=s.LOWER_A&&(b|s.To_LOWER_BIT)<=s.LOWER_F);if(f!==o){var v=t.substring(f,o),y=parseInt(v,_);if(t.charCodeAt(o)===s.SEMI)o+=1;else if(n)continue;r+=(0,a.default)(y),i=o}}return r+t.slice(i)}}function d(e,t,n,r){var i=(t&l.BRANCH_LENGTH)>>7,o=t&l.JUMP_TABLE;if(0===i)return 0!==o&&r===o?n:-1;if(o){var a=r-o;return a<0||a>=i?-1:e[n+a]-1}for(var s=n,c=s+i-1;s<=c;){var u=s+c>>>1,d=e[u];if(d<r)s=u+1;else{if(!(d>r))return e[u+i];c=u-1}}return-1}Object.defineProperty(t,"replaceCodePoint",{enumerable:!0,get:function(){return c.replaceCodePoint}}),Object.defineProperty(t,"fromCodePoint",{enumerable:!0,get:function(){return c.fromCodePoint}}),function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.To_LOWER_BIT=32]="To_LOWER_BIT"}(s||(s={})),function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(l=t.BinTrieFlags||(t.BinTrieFlags={})),t.determineBranch=d;var h=u(i.default),p=u(o.default);t.decodeHTML=function(e){return h(e,!1)},t.decodeHTMLStrict=function(e){return h(e,!0)},t.decodeXML=function(e){return p(e,!0)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((function(e){return e.charCodeAt(0)})))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((function(e){return e.charCodeAt(0)})))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OpenElementStack=void 0;const r=n(275),i=new Set([r.TAG_ID.DD,r.TAG_ID.DT,r.TAG_ID.LI,r.TAG_ID.OPTGROUP,r.TAG_ID.OPTION,r.TAG_ID.P,r.TAG_ID.RB,r.TAG_ID.RP,r.TAG_ID.RT,r.TAG_ID.RTC]),o=new Set([...i,r.TAG_ID.CAPTION,r.TAG_ID.COLGROUP,r.TAG_ID.TBODY,r.TAG_ID.TD,r.TAG_ID.TFOOT,r.TAG_ID.TH,r.TAG_ID.THEAD,r.TAG_ID.TR]),a=new Map([[r.TAG_ID.APPLET,r.NS.HTML],[r.TAG_ID.CAPTION,r.NS.HTML],[r.TAG_ID.HTML,r.NS.HTML],[r.TAG_ID.MARQUEE,r.NS.HTML],[r.TAG_ID.OBJECT,r.NS.HTML],[r.TAG_ID.TABLE,r.NS.HTML],[r.TAG_ID.TD,r.NS.HTML],[r.TAG_ID.TEMPLATE,r.NS.HTML],[r.TAG_ID.TH,r.NS.HTML],[r.TAG_ID.ANNOTATION_XML,r.NS.MATHML],[r.TAG_ID.MI,r.NS.MATHML],[r.TAG_ID.MN,r.NS.MATHML],[r.TAG_ID.MO,r.NS.MATHML],[r.TAG_ID.MS,r.NS.MATHML],[r.TAG_ID.MTEXT,r.NS.MATHML],[r.TAG_ID.DESC,r.NS.SVG],[r.TAG_ID.FOREIGN_OBJECT,r.NS.SVG],[r.TAG_ID.TITLE,r.NS.SVG]]),s=[r.TAG_ID.H1,r.TAG_ID.H2,r.TAG_ID.H3,r.TAG_ID.H4,r.TAG_ID.H5,r.TAG_ID.H6],l=[r.TAG_ID.TR,r.TAG_ID.TEMPLATE,r.TAG_ID.HTML],c=[r.TAG_ID.TBODY,r.TAG_ID.TFOOT,r.TAG_ID.THEAD,r.TAG_ID.TEMPLATE,r.TAG_ID.HTML],u=[r.TAG_ID.TABLE,r.TAG_ID.TEMPLATE,r.TAG_ID.HTML],d=[r.TAG_ID.TD,r.TAG_ID.TH];t.OpenElementStack=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=r.TAG_ID.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===r.TAG_ID.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===r.NS.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){const e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){const n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){const r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do{t=this.tagIDs.lastIndexOf(e,t-1)}while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==r.NS.HTML);this.shortenToLength(t<0?0:t)}shortenToLength(e){for(;this.stackTop>=e;){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){const t=this._indexOf(e);this.shortenToLength(t<0?0:t)}popUntilPopped(e,t){const n=this._indexOfTagNames(e,t);this.shortenToLength(n<0?0:n)}popUntilNumberedHeaderPopped(){this.popUntilPopped(s,r.NS.HTML)}popUntilTableCellPopped(){this.popUntilPopped(d,r.NS.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.includes(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){const n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(u,r.NS.HTML)}clearBackToTableBodyContext(){this.clearBackTo(c,r.NS.HTML)}clearBackToTableRowContext(){this.clearBackTo(l,r.NS.HTML)}remove(e){const t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===r.TAG_ID.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){const t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return 0===this.stackTop&&this.tagIDs[0]===r.TAG_ID.HTML}hasInScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t],i=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&i===r.NS.HTML)return!0;if(a.get(n)===i)return!1}return!0}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e],n=this.treeAdapter.getNamespaceURI(this.items[e]);if((0,r.isNumberedHeader)(t)&&n===r.NS.HTML)return!0;if(a.get(t)===n)return!1}return!0}hasInListItemScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t],i=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&i===r.NS.HTML)return!0;if((n===r.TAG_ID.UL||n===r.TAG_ID.OL)&&i===r.NS.HTML||a.get(n)===i)return!1}return!0}hasInButtonScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t],i=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&i===r.NS.HTML)return!0;if(n===r.TAG_ID.BUTTON&&i===r.NS.HTML||a.get(n)===i)return!1}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];if(this.treeAdapter.getNamespaceURI(this.items[t])===r.NS.HTML){if(n===e)return!0;if(n===r.TAG_ID.TABLE||n===r.TAG_ID.TEMPLATE||n===r.TAG_ID.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e];if(this.treeAdapter.getNamespaceURI(this.items[e])===r.NS.HTML){if(t===r.TAG_ID.TBODY||t===r.TAG_ID.THEAD||t===r.TAG_ID.TFOOT)return!0;if(t===r.TAG_ID.TABLE||t===r.TAG_ID.HTML)return!1}}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];if(this.treeAdapter.getNamespaceURI(this.items[t])===r.NS.HTML){if(n===e)return!0;if(n!==r.TAG_ID.OPTION&&n!==r.TAG_ID.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;i.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;o.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==e&&o.has(this.currentTagId);)this.pop()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FormattingElementList=t.EntryType=void 0;var r;!function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"}(r=t.EntryType||(t.EntryType={}));const i={type:r.Marker};t.FormattingElementList=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){const n=[],i=t.length,o=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){const t=this.entries[e];if(t.type===r.Marker)break;const{element:s}=t;if(this.treeAdapter.getTagName(s)===o&&this.treeAdapter.getNamespaceURI(s)===a){const t=this.treeAdapter.getAttrList(s);t.length===i&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<3)return;const t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<3)return;const r=new Map(t.map((e=>[e.name,e.value])));let i=0;for(let e=0;e<n.length;e++){const t=n[e];t.attrs.every((e=>r.get(e.name)===e.value))&&(i+=1,i>=3&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(i)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:r.Element,element:e,token:t})}insertElementAfterBookmark(e,t){const n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:r.Element,element:e,token:t})}removeEntry(e){const t=this.entries.indexOf(e);t>=0&&this.entries.splice(t,1)}clearToLastMarker(){const e=this.entries.indexOf(i);e>=0?this.entries.splice(0,e+1):this.entries.length=0}getElementEntryInScopeWithTagName(e){const t=this.entries.find((t=>t.type===r.Marker||this.treeAdapter.getTagName(t.element)===e));return t&&t.type===r.Element?t:null}getElementEntry(e){return this.entries.find((t=>t.type===r.Element&&t.element===e))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDocumentMode=t.isConforming=void 0;const r=n(275),i="html",o="about:legacy-compat",a="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",s=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],l=[...s,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],c=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),u=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],d=[...u,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function h(e,t){return t.some((t=>e.startsWith(t)))}t.isConforming=function(e){return e.name===i&&null===e.publicId&&(null===e.systemId||e.systemId===o)},t.getDocumentMode=function(e){if(e.name!==i)return r.DOCUMENT_MODE.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===a)return r.DOCUMENT_MODE.QUIRKS;let{publicId:n}=e;if(null!==n){if(n=n.toLowerCase(),c.has(n))return r.DOCUMENT_MODE.QUIRKS;let e=null===t?l:s;if(h(n,e))return r.DOCUMENT_MODE.QUIRKS;if(e=null===t?u:d,h(n,e))return r.DOCUMENT_MODE.LIMITED_QUIRKS}return r.DOCUMENT_MODE.NO_QUIRKS}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeOuter=t.serialize=void 0;const r=n(275),i=n(1091),o=n(534),a=new Set([r.TAG_NAMES.AREA,r.TAG_NAMES.BASE,r.TAG_NAMES.BASEFONT,r.TAG_NAMES.BGSOUND,r.TAG_NAMES.BR,r.TAG_NAMES.COL,r.TAG_NAMES.EMBED,r.TAG_NAMES.FRAME,r.TAG_NAMES.HR,r.TAG_NAMES.IMG,r.TAG_NAMES.INPUT,r.TAG_NAMES.KEYGEN,r.TAG_NAMES.LINK,r.TAG_NAMES.META,r.TAG_NAMES.PARAM,r.TAG_NAMES.SOURCE,r.TAG_NAMES.TRACK,r.TAG_NAMES.WBR]);function s(e,t){return t.treeAdapter.isElementNode(e)&&t.treeAdapter.getNamespaceURI(e)===r.NS.HTML&&a.has(t.treeAdapter.getTagName(e))}const l={treeAdapter:o.defaultTreeAdapter,scriptingEnabled:!0};function c(e,t){let n="";const i=t.treeAdapter.isElementNode(e)&&t.treeAdapter.getTagName(e)===r.TAG_NAMES.TEMPLATE&&t.treeAdapter.getNamespaceURI(e)===r.NS.HTML?t.treeAdapter.getTemplateContent(e):e,o=t.treeAdapter.getChildNodes(i);if(o)for(const e of o)n+=u(e,t);return n}function u(e,t){return t.treeAdapter.isElementNode(e)?function(e,t){const n=t.treeAdapter.getTagName(e);return`<${n}${function(e,{treeAdapter:t}){let n="";for(const o of t.getAttrList(e)){if(n+=" ",o.namespace)switch(o.namespace){case r.NS.XML:n+=`xml:${o.name}`;break;case r.NS.XMLNS:"xmlns"!==o.name&&(n+="xmlns:"),n+=o.name;break;case r.NS.XLINK:n+=`xlink:${o.name}`;break;default:n+=`${o.prefix}:${o.name}`}else n+=o.name;n+=`="${(0,i.escapeAttribute)(o.value)}"`}return n}(e,t)}>${s(e,t)?"":`${c(e,t)}</${n}>`}`}(e,t):t.treeAdapter.isTextNode(e)?function(e,t){const{treeAdapter:n}=t,o=n.getTextNodeContent(e),a=n.getParentNode(e),s=a&&n.isElementNode(a)&&n.getTagName(a);return s&&n.getNamespaceURI(a)===r.NS.HTML&&(0,r.hasUnescapedText)(s,t.scriptingEnabled)?o:(0,i.escapeText)(o)}(e,t):t.treeAdapter.isCommentNode(e)?function(e,{treeAdapter:t}){return`\x3c!--${t.getCommentNodeContent(e)}--\x3e`}(e,t):t.treeAdapter.isDocumentTypeNode(e)?function(e,{treeAdapter:t}){return`<!DOCTYPE ${t.getDocumentTypeNodeName(e)}>`}(e,t):""}t.serialize=function(e,t){const n=Object.assign(Object.assign({},l),t);return s(e,n)?"":c(e,n)},t.serializeOuter=function(e,t){return u(e,Object.assign(Object.assign({},l),t))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.escapeText=t.escapeAttribute=t.escapeUTF8=t.escape=t.encodeXML=t.getCodePoint=t.xmlReplacer=void 0,t.xmlReplacer=/["&'<>$\x80-\uFFFF]/g;var r=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);function i(e){for(var n,i="",o=0;null!==(n=t.xmlReplacer.exec(e));){var a=n.index,s=e.charCodeAt(a),l=r.get(s);void 0!==l?(i+=e.substring(o,a)+l,o=a+1):(i+="".concat(e.substring(o,a),"&#x").concat((0,t.getCodePoint)(e,a).toString(16),";"),o=t.xmlReplacer.lastIndex+=Number(55296==(64512&s)))}return i+e.substr(o)}function o(e,t){return function(n){for(var r,i=0,o="";r=e.exec(n);)i!==r.index&&(o+=n.substring(i,r.index)),o+=t.get(r[0].charCodeAt(0)),i=r.index+1;return o+n.substring(i)}}t.getCodePoint=null!=String.prototype.codePointAt?function(e,t){return e.codePointAt(t)}:function(e,t){return 55296==(64512&e.charCodeAt(t))?1024*(e.charCodeAt(t)-55296)+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t)},t.encodeXML=i,t.escape=i,t.escapeUTF8=o(/[&<>'"]/g,r),t.escapeAttribute=o(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),t.escapeText=o(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.adapter=t.serializeDoctypeContent=void 0;const r=n(715),i=n(210);function o(e){return new i.Text(e)}function a(e){const t=e.includes('"')?"'":'"';return t+e+t}function s(e,t,n){let r="!DOCTYPE ";return e&&(r+=e),t?r+=` PUBLIC ${a(t)}`:n&&(r+=" SYSTEM"),n&&(r+=` ${a(n)}`),r}t.serializeDoctypeContent=s,t.adapter={isCommentNode:i.isComment,isElementNode:i.isTag,isTextNode:i.isText,createDocument(){const e=new i.Document([]);return e["x-mode"]=r.html.DOCUMENT_MODE.NO_QUIRKS,e},createDocumentFragment:()=>new i.Document([]),createElement(e,t,n){const r=Object.create(null),o=Object.create(null),a=Object.create(null);for(let e=0;e<n.length;e++){const t=n[e].name;r[t]=n[e].value,o[t]=n[e].namespace,a[t]=n[e].prefix}const s=new i.Element(e,r,[]);return s.namespace=t,s["x-attribsNamespace"]=o,s["x-attribsPrefix"]=a,s},createCommentNode:e=>new i.Comment(e),appendChild(e,t){const n=e.children[e.children.length-1];n&&(n.next=t,t.prev=n),e.children.push(t),t.parent=e},insertBefore(e,t,n){const r=e.children.indexOf(n),{prev:i}=n;i&&(i.next=t,t.prev=i),n.prev=t,t.next=n,e.children.splice(r,0,t),t.parent=e},setTemplateContent(e,n){t.adapter.appendChild(e,n)},getTemplateContent:e=>e.children[0],setDocumentType(e,n,r,o){const a=s(n,r,o);let l=e.children.find((e=>(0,i.isDirective)(e)&&"!doctype"===e.name));l?l.data=null!=a?a:null:(l=new i.ProcessingInstruction("!doctype",a),t.adapter.appendChild(e,l)),l["x-name"]=null!=n?n:void 0,l["x-publicId"]=null!=r?r:void 0,l["x-systemId"]=null!=o?o:void 0},setDocumentMode(e,t){e["x-mode"]=t},getDocumentMode:e=>e["x-mode"],detachNode(e){if(e.parent){const t=e.parent.children.indexOf(e),{prev:n,next:r}=e;e.prev=null,e.next=null,n&&(n.next=r),r&&(r.prev=n),e.parent.children.splice(t,1),e.parent=null}},insertText(e,n){const r=e.children[e.children.length-1];r&&(0,i.isText)(r)?r.data+=n:t.adapter.appendChild(e,o(n))},insertTextBefore(e,n,r){const a=e.children[e.children.indexOf(r)-1];a&&(0,i.isText)(a)?a.data+=n:t.adapter.insertBefore(e,o(n),r)},adoptAttributes(e,t){for(let n=0;n<t.length;n++){const r=t[n].name;void 0===e.attribs[r]&&(e.attribs[r]=t[n].value,e["x-attribsNamespace"][r]=t[n].namespace,e["x-attribsPrefix"][r]=t[n].prefix)}},getFirstChild:e=>e.children[0],getChildNodes:e=>e.children,getParentNode:e=>e.parent,getAttrList:e=>e.attributes,getTagName:e=>e.name,getNamespaceURI:e=>e.namespace,getTextNodeContent:e=>e.data,getCommentNodeContent:e=>e.data,getDocumentTypeNodeName(e){var t;return null!==(t=e["x-name"])&&void 0!==t?t:""},getDocumentTypeNodePublicId(e){var t;return null!==(t=e["x-publicId"])&&void 0!==t?t:""},getDocumentTypeNodeSystemId(e){var t;return null!==(t=e["x-systemId"])&&void 0!==t?t:""},isDocumentTypeNode:e=>(0,i.isDirective)(e)&&"!doctype"===e.name,setNodeSourceCodeLocation(e,t){t&&(e.startIndex=t.startOffset,e.endIndex=t.endOffset),e.sourceCodeLocation=t},getNodeSourceCodeLocation:e=>e.sourceCodeLocation,updateNodeSourceCodeLocation(e,t){null!=t.endOffset&&(e.endIndex=t.endOffset),e.sourceCodeLocation=Object.assign(Object.assign({},e.sourceCodeLocation),t)}}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;var a=o(n(721)),s=n(722),l=new Set(["input","option","optgroup","select","button","datalist","textarea"]),c=new Set(["p"]),u=new Set(["thead","tbody"]),d=new Set(["dd","dt"]),h=new Set(["rt","rp"]),p=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",c],["h1",c],["h2",c],["h3",c],["h4",c],["h5",c],["h6",c],["select",l],["input",l],["output",l],["button",l],["datalist",l],["textarea",l],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",d],["dt",d],["address",c],["article",c],["aside",c],["blockquote",c],["details",c],["div",c],["dl",c],["fieldset",c],["figcaption",c],["figure",c],["footer",c],["form",c],["header",c],["hr",c],["main",c],["nav",c],["ol",c],["pre",c],["section",c],["table",c],["ul",c],["rt",h],["rp",h],["tbody",u],["tfoot",u]]),m=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),g=new Set(["math","svg"]),f=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),_=/\s|\//,b=function(){function e(e,t){var n,r,i,o,s;void 0===t&&(t={}),this.options=t,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=null!=e?e:{},this.lowerCaseTagNames=null!==(n=t.lowerCaseTags)&&void 0!==n?n:!t.xmlMode,this.lowerCaseAttributeNames=null!==(r=t.lowerCaseAttributeNames)&&void 0!==r?r:!t.xmlMode,this.tokenizer=new(null!==(i=t.Tokenizer)&&void 0!==i?i:a.default)(this.options,this),null===(s=(o=this.cbs).onparserinit)||void 0===s||s.call(o,this)}return e.prototype.ontext=function(e,t){var n,r,i=this.getSlice(e,t);this.endIndex=t-1,null===(r=(n=this.cbs).ontext)||void 0===r||r.call(n,i),this.startIndex=t},e.prototype.ontextentity=function(e){var t,n,r=this.tokenizer.getSectionStart();this.endIndex=r-1,null===(n=(t=this.cbs).ontext)||void 0===n||n.call(t,(0,s.fromCodePoint)(e)),this.startIndex=r},e.prototype.isVoidElement=function(e){return!this.options.xmlMode&&m.has(e)},e.prototype.onopentagname=function(e,t){this.endIndex=t;var n=this.getSlice(e,t);this.lowerCaseTagNames&&(n=n.toLowerCase()),this.emitOpenTag(n)},e.prototype.emitOpenTag=function(e){var t,n,r,i;this.openTagStart=this.startIndex,this.tagname=e;var o=!this.options.xmlMode&&p.get(e);if(o)for(;this.stack.length>0&&o.has(this.stack[this.stack.length-1]);){var a=this.stack.pop();null===(n=(t=this.cbs).onclosetag)||void 0===n||n.call(t,a,!0)}this.isVoidElement(e)||(this.stack.push(e),g.has(e)?this.foreignContext.push(!0):f.has(e)&&this.foreignContext.push(!1)),null===(i=(r=this.cbs).onopentagname)||void 0===i||i.call(r,e),this.cbs.onopentag&&(this.attribs={})},e.prototype.endOpenTag=function(e){var t,n;this.startIndex=this.openTagStart,this.attribs&&(null===(n=(t=this.cbs).onopentag)||void 0===n||n.call(t,this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},e.prototype.onopentagend=function(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1},e.prototype.onclosetag=function(e,t){var n,r,i,o,a,s;this.endIndex=t;var l=this.getSlice(e,t);if(this.lowerCaseTagNames&&(l=l.toLowerCase()),(g.has(l)||f.has(l))&&this.foreignContext.pop(),this.isVoidElement(l))this.options.xmlMode||"br"!==l||(null===(r=(n=this.cbs).onopentagname)||void 0===r||r.call(n,"br"),null===(o=(i=this.cbs).onopentag)||void 0===o||o.call(i,"br",{},!0),null===(s=(a=this.cbs).onclosetag)||void 0===s||s.call(a,"br",!1));else{var c=this.stack.lastIndexOf(l);if(-1!==c)if(this.cbs.onclosetag)for(var u=this.stack.length-c;u--;)this.cbs.onclosetag(this.stack.pop(),0!==u);else this.stack.length=c;else this.options.xmlMode||"p"!==l||(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=t+1},e.prototype.onselfclosingtag=function(e){this.endIndex=e,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=e+1):this.onopentagend(e)},e.prototype.closeCurrentTag=function(e){var t,n,r=this.tagname;this.endOpenTag(e),this.stack[this.stack.length-1]===r&&(null===(n=(t=this.cbs).onclosetag)||void 0===n||n.call(t,r,!e),this.stack.pop())},e.prototype.onattribname=function(e,t){this.startIndex=e;var n=this.getSlice(e,t);this.attribname=this.lowerCaseAttributeNames?n.toLowerCase():n},e.prototype.onattribdata=function(e,t){this.attribvalue+=this.getSlice(e,t)},e.prototype.onattribentity=function(e){this.attribvalue+=(0,s.fromCodePoint)(e)},e.prototype.onattribend=function(e,t){var n,r;this.endIndex=t,null===(r=(n=this.cbs).onattribute)||void 0===r||r.call(n,this.attribname,this.attribvalue,e===a.QuoteType.Double?'"':e===a.QuoteType.Single?"'":e===a.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},e.prototype.getInstructionName=function(e){var t=e.search(_),n=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(n=n.toLowerCase()),n},e.prototype.ondeclaration=function(e,t){this.endIndex=t;var n=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var r=this.getInstructionName(n);this.cbs.onprocessinginstruction("!".concat(r),"!".concat(n))}this.startIndex=t+1},e.prototype.onprocessinginstruction=function(e,t){this.endIndex=t;var n=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var r=this.getInstructionName(n);this.cbs.onprocessinginstruction("?".concat(r),"?".concat(n))}this.startIndex=t+1},e.prototype.oncomment=function(e,t,n){var r,i,o,a;this.endIndex=t,null===(i=(r=this.cbs).oncomment)||void 0===i||i.call(r,this.getSlice(e,t-n)),null===(a=(o=this.cbs).oncommentend)||void 0===a||a.call(o),this.startIndex=t+1},e.prototype.oncdata=function(e,t,n){var r,i,o,a,s,l,c,u,d,h;this.endIndex=t;var p=this.getSlice(e,t-n);this.options.xmlMode||this.options.recognizeCDATA?(null===(i=(r=this.cbs).oncdatastart)||void 0===i||i.call(r),null===(a=(o=this.cbs).ontext)||void 0===a||a.call(o,p),null===(l=(s=this.cbs).oncdataend)||void 0===l||l.call(s)):(null===(u=(c=this.cbs).oncomment)||void 0===u||u.call(c,"[CDATA[".concat(p,"]]")),null===(h=(d=this.cbs).oncommentend)||void 0===h||h.call(d)),this.startIndex=t+1},e.prototype.onend=function(){var e,t;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var n=this.stack.length;n>0;this.cbs.onclosetag(this.stack[--n],!0));}null===(t=(e=this.cbs).onend)||void 0===t||t.call(e)},e.prototype.reset=function(){var e,t,n,r;null===(t=(e=this.cbs).onreset)||void 0===t||t.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,null===(r=(n=this.cbs).onparserinit)||void 0===r||r.call(n,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},e.prototype.parseComplete=function(e){this.reset(),this.end(e)},e.prototype.getSlice=function(e,t){for(;e-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var n=this.buffers[0].slice(e-this.bufferOffset,t-this.bufferOffset);t-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),n+=this.buffers[0].slice(0,t-this.bufferOffset);return n},e.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},e.prototype.write=function(e){var t,n;this.ended?null===(n=(t=this.cbs).onerror)||void 0===n||n.call(t,new Error(".write() after done!")):(this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++))},e.prototype.end=function(e){var t,n;this.ended?null===(n=(t=this.cbs).onerror)||void 0===n||n.call(t,Error(".end() after done!")):(e&&this.write(e),this.ended=!0,this.tokenizer.end())},e.prototype.pause=function(){this.tokenizer.pause()},e.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()},e.prototype.parseChunk=function(e){this.write(e)},e.prototype.done=function(e){this.end(e)},e}();t.Parser=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((function(e){return e.charCodeAt(0)})))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((function(e){return e.charCodeAt(0)})))},function(e,t,n){var r;"undefined"!=typeof self&&self,r=function(){return function(){"use strict";var e={d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{default:function(){return oi}});var n=function e(t,n){this.position=void 0;var r,i="KaTeX parse error: "+t,o=n&&n.loc;if(o&&o.start<=o.end){var a=o.lexer.input;r=o.start;var s=o.end;r===a.length?i+=" at end of input: ":i+=" at position "+(r+1)+": ";var l=a.slice(r,s).replace(/[^]/g,"$&̲");i+=(r>15?"…"+a.slice(r-15,r):a.slice(0,r))+l+(s+15<a.length?a.slice(s,s+15)+"…":a.slice(s))}var c=new Error(i);return c.name="ParseError",c.__proto__=e.prototype,c.position=r,c};n.prototype.__proto__=Error.prototype;var r=n,i=/([A-Z])/g,o={"&":"&",">":">","<":"<",'"':""","'":"'"},a=/[&><"']/g,s=function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},l={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(a,(function(e){return o[e]}))},hyphenate:function(e){return e.replace(i,"-$1").toLowerCase()},getBaseElem:s,isCharacterBox:function(e){var t=s(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},protocolFromUrl:function(e){var t=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(e);return null!=t?t[1]:"_relative"}},c={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:function(e){return"#"+e}},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:function(e,t){return t.push(e),t}},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:function(e){return Math.max(0,e)},cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:function(e){return Math.max(0,e)},cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:function(e){return Math.max(0,e)},cli:"-e, --max-expand <n>",cliProcessor:function(e){return"Infinity"===e?1/0:parseInt(e)}},globalGroup:{type:"boolean",cli:!1}};function u(e){if(e.default)return e.default;var t=e.type,n=Array.isArray(t)?t[0]:t;if("string"!=typeof n)return n.enum[0];switch(n){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}var d=function(){function e(e){for(var t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},c)if(c.hasOwnProperty(t)){var n=c[t];this[t]=void 0!==e[t]?n.processor?n.processor(e[t]):e[t]:u(n)}}var t=e.prototype;return t.reportNonstrict=function(e,t,n){var i=this.strict;if("function"==typeof i&&(i=i(e,t,n)),i&&"ignore"!==i){if(!0===i||"error"===i)throw new r("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",n);"warn"===i?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+i+"': "+t+" ["+e+"]")}},t.useStrictBehavior=function(e,t,n){var r=this.strict;if("function"==typeof r)try{r=r(e,t,n)}catch(e){r="error"}return!(!r||"ignore"===r||!0!==r&&"error"!==r&&("warn"===r?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+t+" ["+e+"]"),1)))},t.isTrusted=function(e){e.url&&!e.protocol&&(e.protocol=l.protocolFromUrl(e.url));var t="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(t)},e}(),h=function(){function e(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}var t=e.prototype;return t.sup=function(){return p[m[this.id]]},t.sub=function(){return p[g[this.id]]},t.fracNum=function(){return p[f[this.id]]},t.fracDen=function(){return p[_[this.id]]},t.cramp=function(){return p[b[this.id]]},t.text=function(){return p[v[this.id]]},t.isTight=function(){return this.size>=2},e}(),p=[new h(0,0,!1),new h(1,0,!0),new h(2,1,!1),new h(3,1,!0),new h(4,2,!1),new h(5,2,!0),new h(6,3,!1),new h(7,3,!0)],m=[4,5,4,5,6,7,6,7],g=[5,5,5,5,7,7,7,7],f=[2,3,4,5,6,7,6,7],_=[3,3,5,5,7,7,7,7],b=[1,1,3,3,5,5,7,7],v=[0,1,2,3,2,3,2,3],y={DISPLAY:p[0],TEXT:p[2],SCRIPT:p[4],SCRIPTSCRIPT:p[6]},E=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}],S=[];function w(e){for(var t=0;t<S.length;t+=2)if(e>=S[t]&&e<=S[t+1])return!0;return!1}E.forEach((function(e){return e.blocks.forEach((function(e){return S.push.apply(S,e)}))}));var T=80,C={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"},x=function(){function e(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}var t=e.prototype;return t.hasClass=function(e){return l.contains(this.classes,e)},t.toNode=function(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e},t.toMarkup=function(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e},t.toText=function(){var e=function(e){return e.toText()};return this.children.map(e).join("")},e}(),F={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},D={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},k={"Å":"A","Ð":"D","Þ":"o","å":"a","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"};function O(e,t,n){if(!F[t])throw new Error("Font metrics not found for font: "+t+".");var r=e.charCodeAt(0),i=F[t][r];if(!i&&e[0]in k&&(r=k[e[0]].charCodeAt(0),i=F[t][r]),i||"text"!==n||w(r)&&(i=F[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var I={},A=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],R=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],N=function(e,t){return t.size<2?e:A[e-1][t.size-1]},M=function(){function e(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||e.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=R[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}var t=e.prototype;return t.extend=function(t){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);return new e(n)},t.havingStyle=function(e){return this.style===e?this:this.extend({style:e,size:N(this.textSize,e)})},t.havingCrampedStyle=function(){return this.havingStyle(this.style.cramp())},t.havingSize=function(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:R[e-1]})},t.havingBaseStyle=function(t){t=t||this.style.text();var n=N(e.BASESIZE,t);return this.size===n&&this.textSize===e.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})},t.havingBaseSizing=function(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})},t.withColor=function(e){return this.extend({color:e})},t.withPhantom=function(){return this.extend({phantom:!0})},t.withFont=function(e){return this.extend({font:e})},t.withTextFontFamily=function(e){return this.extend({fontFamily:e,font:""})},t.withTextFontWeight=function(e){return this.extend({fontWeight:e,font:""})},t.withTextFontShape=function(e){return this.extend({fontShape:e,font:""})},t.sizingClasses=function(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]},t.baseSizingClasses=function(){return this.size!==e.BASESIZE?["sizing","reset-size"+this.size,"size"+e.BASESIZE]:[]},t.fontMetrics=function(){return this._fontMetrics||(this._fontMetrics=function(e){var t;if(!I[t=e>=5?0:e>=3?1:2]){var n=I[t]={cssEmPerMu:D.quad[t]/18};for(var r in D)D.hasOwnProperty(r)&&(n[r]=D[r][t])}return I[t]}(this.size)),this._fontMetrics},t.getColor=function(){return this.phantom?"transparent":this.color},e}();M.BASESIZE=6;var P=M,L={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},B={ex:!0,em:!0,mu:!0},U=function(e){return"string"!=typeof e&&(e=e.unit),e in L||e in B||"ex"===e},j=function(e,t){var n;if(e.unit in L)n=L[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)n=t.fontMetrics().cssEmPerMu;else{var i;if(i=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)n=i.fontMetrics().xHeight;else{if("em"!==e.unit)throw new r("Invalid unit: '"+e.unit+"'");n=i.fontMetrics().quad}i!==t&&(n*=i.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},G=function(e){return+e.toFixed(4)+"em"},z=function(e){return e.filter((function(e){return e})).join(" ")},H=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push("mtight");var r=t.getColor();r&&(this.style.color=r)}},q=function(e){var t=document.createElement(e);for(var n in t.className=z(this.classes),this.style)this.style.hasOwnProperty(n)&&(t.style[n]=this.style[n]);for(var r in this.attributes)this.attributes.hasOwnProperty(r)&&t.setAttribute(r,this.attributes[r]);for(var i=0;i<this.children.length;i++)t.appendChild(this.children[i].toNode());return t},V=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+l.escape(z(this.classes))+'"');var n="";for(var r in this.style)this.style.hasOwnProperty(r)&&(n+=l.hyphenate(r)+":"+this.style[r]+";");for(var i in n&&(t+=' style="'+l.escape(n)+'"'),this.attributes)this.attributes.hasOwnProperty(i)&&(t+=" "+i+'="'+l.escape(this.attributes[i])+'"');t+=">";for(var o=0;o<this.children.length;o++)t+=this.children[o].toMarkup();return t+="</"+e+">"},$=function(){function e(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,H.call(this,e,n,r),this.children=t||[]}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.hasClass=function(e){return l.contains(this.classes,e)},t.toNode=function(){return q.call(this,"span")},t.toMarkup=function(){return V.call(this,"span")},e}(),K=function(){function e(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,H.call(this,t,r),this.children=n||[],this.setAttribute("href",e)}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.hasClass=function(e){return l.contains(this.classes,e)},t.toNode=function(){return q.call(this,"a")},t.toMarkup=function(){return V.call(this,"a")},e}(),W=function(){function e(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=n}var t=e.prototype;return t.hasClass=function(e){return l.contains(this.classes,e)},t.toNode=function(){var e=document.createElement("img");for(var t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e},t.toMarkup=function(){var e="<img src='"+this.src+" 'alt='"+this.alt+"' ",t="";for(var n in this.style)this.style.hasOwnProperty(n)&&(t+=l.hyphenate(n)+":"+this.style[n]+";");return t&&(e+=' style="'+l.escape(t)+'"'),e+="'/>"},e}(),Y={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"},Q=function(){function e(e,t,n,r,i,o,a,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=i||0,this.width=o||0,this.classes=a||[],this.style=s||{},this.maxFontSize=0;var l=function(e){for(var t=0;t<E.length;t++)for(var n=E[t],r=0;r<n.blocks.length;r++){var i=n.blocks[r];if(e>=i[0]&&e<=i[1])return n.name}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=Y[this.text])}var t=e.prototype;return t.hasClass=function(e){return l.contains(this.classes,e)},t.toNode=function(){var e=document.createTextNode(this.text),t=null;for(var n in this.italic>0&&((t=document.createElement("span")).style.marginRight=G(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=z(this.classes)),this.style)this.style.hasOwnProperty(n)&&((t=t||document.createElement("span")).style[n]=this.style[n]);return t?(t.appendChild(e),t):e},t.toMarkup=function(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=l.escape(z(this.classes)),t+='"');var n="";for(var r in this.italic>0&&(n+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(r)&&(n+=l.hyphenate(r)+":"+this.style[r]+";");n&&(e=!0,t+=' style="'+l.escape(n)+'"');var i=l.escape(this.text);return e?(t+=">",t+=i,t+="</span>"):i},e}(),X=function(){function e(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}var t=e.prototype;return t.toNode=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e},t.toMarkup=function(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+"='"+this.attributes[t]+"'");e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</svg>"},e}(),Z=function(){function e(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}var t=e.prototype;return t.toNode=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",C[this.pathName]),e},t.toMarkup=function(){return this.alternate?"<path d='"+this.alternate+"'/>":"<path d='"+C[this.pathName]+"'/>"},e}(),J=function(){function e(e){this.attributes=void 0,this.attributes=e||{}}var t=e.prototype;return t.toNode=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e},t.toMarkup=function(){var e="<line";for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+"='"+this.attributes[t]+"'");return e+="/>"},e}();function ee(e){if(e instanceof Q)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}var te={bin:1,close:1,inner:1,open:1,punct:1,rel:1},ne={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},re={math:{},text:{}},ie=re;function oe(e,t,n,r,i,o){re[e][i]={font:t,group:n,replace:r},o&&r&&(re[e][r]=re[e][i])}var ae="math",se="text",le="main",ce="ams",ue="accent-token",de="bin",he="close",pe="inner",me="mathord",ge="op-token",fe="open",_e="punct",be="rel",ve="spacing",ye="textord";oe(ae,le,be,"≡","\\equiv",!0),oe(ae,le,be,"≺","\\prec",!0),oe(ae,le,be,"≻","\\succ",!0),oe(ae,le,be,"∼","\\sim",!0),oe(ae,le,be,"⊥","\\perp"),oe(ae,le,be,"⪯","\\preceq",!0),oe(ae,le,be,"⪰","\\succeq",!0),oe(ae,le,be,"≃","\\simeq",!0),oe(ae,le,be,"∣","\\mid",!0),oe(ae,le,be,"≪","\\ll",!0),oe(ae,le,be,"≫","\\gg",!0),oe(ae,le,be,"≍","\\asymp",!0),oe(ae,le,be,"∥","\\parallel"),oe(ae,le,be,"⋈","\\bowtie",!0),oe(ae,le,be,"⌣","\\smile",!0),oe(ae,le,be,"⊑","\\sqsubseteq",!0),oe(ae,le,be,"⊒","\\sqsupseteq",!0),oe(ae,le,be,"≐","\\doteq",!0),oe(ae,le,be,"⌢","\\frown",!0),oe(ae,le,be,"∋","\\ni",!0),oe(ae,le,be,"∝","\\propto",!0),oe(ae,le,be,"⊢","\\vdash",!0),oe(ae,le,be,"⊣","\\dashv",!0),oe(ae,le,be,"∋","\\owns"),oe(ae,le,_e,".","\\ldotp"),oe(ae,le,_e,"⋅","\\cdotp"),oe(ae,le,ye,"#","\\#"),oe(se,le,ye,"#","\\#"),oe(ae,le,ye,"&","\\&"),oe(se,le,ye,"&","\\&"),oe(ae,le,ye,"ℵ","\\aleph",!0),oe(ae,le,ye,"∀","\\forall",!0),oe(ae,le,ye,"ℏ","\\hbar",!0),oe(ae,le,ye,"∃","\\exists",!0),oe(ae,le,ye,"∇","\\nabla",!0),oe(ae,le,ye,"♭","\\flat",!0),oe(ae,le,ye,"ℓ","\\ell",!0),oe(ae,le,ye,"♮","\\natural",!0),oe(ae,le,ye,"♣","\\clubsuit",!0),oe(ae,le,ye,"℘","\\wp",!0),oe(ae,le,ye,"♯","\\sharp",!0),oe(ae,le,ye,"♢","\\diamondsuit",!0),oe(ae,le,ye,"ℜ","\\Re",!0),oe(ae,le,ye,"♡","\\heartsuit",!0),oe(ae,le,ye,"ℑ","\\Im",!0),oe(ae,le,ye,"♠","\\spadesuit",!0),oe(ae,le,ye,"§","\\S",!0),oe(se,le,ye,"§","\\S"),oe(ae,le,ye,"¶","\\P",!0),oe(se,le,ye,"¶","\\P"),oe(ae,le,ye,"†","\\dag"),oe(se,le,ye,"†","\\dag"),oe(se,le,ye,"†","\\textdagger"),oe(ae,le,ye,"‡","\\ddag"),oe(se,le,ye,"‡","\\ddag"),oe(se,le,ye,"‡","\\textdaggerdbl"),oe(ae,le,he,"⎱","\\rmoustache",!0),oe(ae,le,fe,"⎰","\\lmoustache",!0),oe(ae,le,he,"⟯","\\rgroup",!0),oe(ae,le,fe,"⟮","\\lgroup",!0),oe(ae,le,de,"∓","\\mp",!0),oe(ae,le,de,"⊖","\\ominus",!0),oe(ae,le,de,"⊎","\\uplus",!0),oe(ae,le,de,"⊓","\\sqcap",!0),oe(ae,le,de,"∗","\\ast"),oe(ae,le,de,"⊔","\\sqcup",!0),oe(ae,le,de,"◯","\\bigcirc",!0),oe(ae,le,de,"∙","\\bullet",!0),oe(ae,le,de,"‡","\\ddagger"),oe(ae,le,de,"≀","\\wr",!0),oe(ae,le,de,"⨿","\\amalg"),oe(ae,le,de,"&","\\And"),oe(ae,le,be,"⟵","\\longleftarrow",!0),oe(ae,le,be,"⇐","\\Leftarrow",!0),oe(ae,le,be,"⟸","\\Longleftarrow",!0),oe(ae,le,be,"⟶","\\longrightarrow",!0),oe(ae,le,be,"⇒","\\Rightarrow",!0),oe(ae,le,be,"⟹","\\Longrightarrow",!0),oe(ae,le,be,"↔","\\leftrightarrow",!0),oe(ae,le,be,"⟷","\\longleftrightarrow",!0),oe(ae,le,be,"⇔","\\Leftrightarrow",!0),oe(ae,le,be,"⟺","\\Longleftrightarrow",!0),oe(ae,le,be,"↦","\\mapsto",!0),oe(ae,le,be,"⟼","\\longmapsto",!0),oe(ae,le,be,"↗","\\nearrow",!0),oe(ae,le,be,"↩","\\hookleftarrow",!0),oe(ae,le,be,"↪","\\hookrightarrow",!0),oe(ae,le,be,"↘","\\searrow",!0),oe(ae,le,be,"↼","\\leftharpoonup",!0),oe(ae,le,be,"⇀","\\rightharpoonup",!0),oe(ae,le,be,"↙","\\swarrow",!0),oe(ae,le,be,"↽","\\leftharpoondown",!0),oe(ae,le,be,"⇁","\\rightharpoondown",!0),oe(ae,le,be,"↖","\\nwarrow",!0),oe(ae,le,be,"⇌","\\rightleftharpoons",!0),oe(ae,ce,be,"≮","\\nless",!0),oe(ae,ce,be,"","\\@nleqslant"),oe(ae,ce,be,"","\\@nleqq"),oe(ae,ce,be,"⪇","\\lneq",!0),oe(ae,ce,be,"≨","\\lneqq",!0),oe(ae,ce,be,"","\\@lvertneqq"),oe(ae,ce,be,"⋦","\\lnsim",!0),oe(ae,ce,be,"⪉","\\lnapprox",!0),oe(ae,ce,be,"⊀","\\nprec",!0),oe(ae,ce,be,"⋠","\\npreceq",!0),oe(ae,ce,be,"⋨","\\precnsim",!0),oe(ae,ce,be,"⪹","\\precnapprox",!0),oe(ae,ce,be,"≁","\\nsim",!0),oe(ae,ce,be,"","\\@nshortmid"),oe(ae,ce,be,"∤","\\nmid",!0),oe(ae,ce,be,"⊬","\\nvdash",!0),oe(ae,ce,be,"⊭","\\nvDash",!0),oe(ae,ce,be,"⋪","\\ntriangleleft"),oe(ae,ce,be,"⋬","\\ntrianglelefteq",!0),oe(ae,ce,be,"⊊","\\subsetneq",!0),oe(ae,ce,be,"","\\@varsubsetneq"),oe(ae,ce,be,"⫋","\\subsetneqq",!0),oe(ae,ce,be,"","\\@varsubsetneqq"),oe(ae,ce,be,"≯","\\ngtr",!0),oe(ae,ce,be,"","\\@ngeqslant"),oe(ae,ce,be,"","\\@ngeqq"),oe(ae,ce,be,"⪈","\\gneq",!0),oe(ae,ce,be,"≩","\\gneqq",!0),oe(ae,ce,be,"","\\@gvertneqq"),oe(ae,ce,be,"⋧","\\gnsim",!0),oe(ae,ce,be,"⪊","\\gnapprox",!0),oe(ae,ce,be,"⊁","\\nsucc",!0),oe(ae,ce,be,"⋡","\\nsucceq",!0),oe(ae,ce,be,"⋩","\\succnsim",!0),oe(ae,ce,be,"⪺","\\succnapprox",!0),oe(ae,ce,be,"≆","\\ncong",!0),oe(ae,ce,be,"","\\@nshortparallel"),oe(ae,ce,be,"∦","\\nparallel",!0),oe(ae,ce,be,"⊯","\\nVDash",!0),oe(ae,ce,be,"⋫","\\ntriangleright"),oe(ae,ce,be,"⋭","\\ntrianglerighteq",!0),oe(ae,ce,be,"","\\@nsupseteqq"),oe(ae,ce,be,"⊋","\\supsetneq",!0),oe(ae,ce,be,"","\\@varsupsetneq"),oe(ae,ce,be,"⫌","\\supsetneqq",!0),oe(ae,ce,be,"","\\@varsupsetneqq"),oe(ae,ce,be,"⊮","\\nVdash",!0),oe(ae,ce,be,"⪵","\\precneqq",!0),oe(ae,ce,be,"⪶","\\succneqq",!0),oe(ae,ce,be,"","\\@nsubseteqq"),oe(ae,ce,de,"⊴","\\unlhd"),oe(ae,ce,de,"⊵","\\unrhd"),oe(ae,ce,be,"↚","\\nleftarrow",!0),oe(ae,ce,be,"↛","\\nrightarrow",!0),oe(ae,ce,be,"⇍","\\nLeftarrow",!0),oe(ae,ce,be,"⇏","\\nRightarrow",!0),oe(ae,ce,be,"↮","\\nleftrightarrow",!0),oe(ae,ce,be,"⇎","\\nLeftrightarrow",!0),oe(ae,ce,be,"△","\\vartriangle"),oe(ae,ce,ye,"ℏ","\\hslash"),oe(ae,ce,ye,"▽","\\triangledown"),oe(ae,ce,ye,"◊","\\lozenge"),oe(ae,ce,ye,"Ⓢ","\\circledS"),oe(ae,ce,ye,"®","\\circledR"),oe(se,ce,ye,"®","\\circledR"),oe(ae,ce,ye,"∡","\\measuredangle",!0),oe(ae,ce,ye,"∄","\\nexists"),oe(ae,ce,ye,"℧","\\mho"),oe(ae,ce,ye,"Ⅎ","\\Finv",!0),oe(ae,ce,ye,"⅁","\\Game",!0),oe(ae,ce,ye,"‵","\\backprime"),oe(ae,ce,ye,"▲","\\blacktriangle"),oe(ae,ce,ye,"▼","\\blacktriangledown"),oe(ae,ce,ye,"■","\\blacksquare"),oe(ae,ce,ye,"⧫","\\blacklozenge"),oe(ae,ce,ye,"★","\\bigstar"),oe(ae,ce,ye,"∢","\\sphericalangle",!0),oe(ae,ce,ye,"∁","\\complement",!0),oe(ae,ce,ye,"ð","\\eth",!0),oe(se,le,ye,"ð","ð"),oe(ae,ce,ye,"╱","\\diagup"),oe(ae,ce,ye,"╲","\\diagdown"),oe(ae,ce,ye,"□","\\square"),oe(ae,ce,ye,"□","\\Box"),oe(ae,ce,ye,"◊","\\Diamond"),oe(ae,ce,ye,"¥","\\yen",!0),oe(se,ce,ye,"¥","\\yen",!0),oe(ae,ce,ye,"✓","\\checkmark",!0),oe(se,ce,ye,"✓","\\checkmark"),oe(ae,ce,ye,"ℶ","\\beth",!0),oe(ae,ce,ye,"ℸ","\\daleth",!0),oe(ae,ce,ye,"ℷ","\\gimel",!0),oe(ae,ce,ye,"ϝ","\\digamma",!0),oe(ae,ce,ye,"ϰ","\\varkappa"),oe(ae,ce,fe,"┌","\\@ulcorner",!0),oe(ae,ce,he,"┐","\\@urcorner",!0),oe(ae,ce,fe,"└","\\@llcorner",!0),oe(ae,ce,he,"┘","\\@lrcorner",!0),oe(ae,ce,be,"≦","\\leqq",!0),oe(ae,ce,be,"⩽","\\leqslant",!0),oe(ae,ce,be,"⪕","\\eqslantless",!0),oe(ae,ce,be,"≲","\\lesssim",!0),oe(ae,ce,be,"⪅","\\lessapprox",!0),oe(ae,ce,be,"≊","\\approxeq",!0),oe(ae,ce,de,"⋖","\\lessdot"),oe(ae,ce,be,"⋘","\\lll",!0),oe(ae,ce,be,"≶","\\lessgtr",!0),oe(ae,ce,be,"⋚","\\lesseqgtr",!0),oe(ae,ce,be,"⪋","\\lesseqqgtr",!0),oe(ae,ce,be,"≑","\\doteqdot"),oe(ae,ce,be,"≓","\\risingdotseq",!0),oe(ae,ce,be,"≒","\\fallingdotseq",!0),oe(ae,ce,be,"∽","\\backsim",!0),oe(ae,ce,be,"⋍","\\backsimeq",!0),oe(ae,ce,be,"⫅","\\subseteqq",!0),oe(ae,ce,be,"⋐","\\Subset",!0),oe(ae,ce,be,"⊏","\\sqsubset",!0),oe(ae,ce,be,"≼","\\preccurlyeq",!0),oe(ae,ce,be,"⋞","\\curlyeqprec",!0),oe(ae,ce,be,"≾","\\precsim",!0),oe(ae,ce,be,"⪷","\\precapprox",!0),oe(ae,ce,be,"⊲","\\vartriangleleft"),oe(ae,ce,be,"⊴","\\trianglelefteq"),oe(ae,ce,be,"⊨","\\vDash",!0),oe(ae,ce,be,"⊪","\\Vvdash",!0),oe(ae,ce,be,"⌣","\\smallsmile"),oe(ae,ce,be,"⌢","\\smallfrown"),oe(ae,ce,be,"≏","\\bumpeq",!0),oe(ae,ce,be,"≎","\\Bumpeq",!0),oe(ae,ce,be,"≧","\\geqq",!0),oe(ae,ce,be,"⩾","\\geqslant",!0),oe(ae,ce,be,"⪖","\\eqslantgtr",!0),oe(ae,ce,be,"≳","\\gtrsim",!0),oe(ae,ce,be,"⪆","\\gtrapprox",!0),oe(ae,ce,de,"⋗","\\gtrdot"),oe(ae,ce,be,"⋙","\\ggg",!0),oe(ae,ce,be,"≷","\\gtrless",!0),oe(ae,ce,be,"⋛","\\gtreqless",!0),oe(ae,ce,be,"⪌","\\gtreqqless",!0),oe(ae,ce,be,"≖","\\eqcirc",!0),oe(ae,ce,be,"≗","\\circeq",!0),oe(ae,ce,be,"≜","\\triangleq",!0),oe(ae,ce,be,"∼","\\thicksim"),oe(ae,ce,be,"≈","\\thickapprox"),oe(ae,ce,be,"⫆","\\supseteqq",!0),oe(ae,ce,be,"⋑","\\Supset",!0),oe(ae,ce,be,"⊐","\\sqsupset",!0),oe(ae,ce,be,"≽","\\succcurlyeq",!0),oe(ae,ce,be,"⋟","\\curlyeqsucc",!0),oe(ae,ce,be,"≿","\\succsim",!0),oe(ae,ce,be,"⪸","\\succapprox",!0),oe(ae,ce,be,"⊳","\\vartriangleright"),oe(ae,ce,be,"⊵","\\trianglerighteq"),oe(ae,ce,be,"⊩","\\Vdash",!0),oe(ae,ce,be,"∣","\\shortmid"),oe(ae,ce,be,"∥","\\shortparallel"),oe(ae,ce,be,"≬","\\between",!0),oe(ae,ce,be,"⋔","\\pitchfork",!0),oe(ae,ce,be,"∝","\\varpropto"),oe(ae,ce,be,"◀","\\blacktriangleleft"),oe(ae,ce,be,"∴","\\therefore",!0),oe(ae,ce,be,"∍","\\backepsilon"),oe(ae,ce,be,"▶","\\blacktriangleright"),oe(ae,ce,be,"∵","\\because",!0),oe(ae,ce,be,"⋘","\\llless"),oe(ae,ce,be,"⋙","\\gggtr"),oe(ae,ce,de,"⊲","\\lhd"),oe(ae,ce,de,"⊳","\\rhd"),oe(ae,ce,be,"≂","\\eqsim",!0),oe(ae,le,be,"⋈","\\Join"),oe(ae,ce,be,"≑","\\Doteq",!0),oe(ae,ce,de,"∔","\\dotplus",!0),oe(ae,ce,de,"∖","\\smallsetminus"),oe(ae,ce,de,"⋒","\\Cap",!0),oe(ae,ce,de,"⋓","\\Cup",!0),oe(ae,ce,de,"⩞","\\doublebarwedge",!0),oe(ae,ce,de,"⊟","\\boxminus",!0),oe(ae,ce,de,"⊞","\\boxplus",!0),oe(ae,ce,de,"⋇","\\divideontimes",!0),oe(ae,ce,de,"⋉","\\ltimes",!0),oe(ae,ce,de,"⋊","\\rtimes",!0),oe(ae,ce,de,"⋋","\\leftthreetimes",!0),oe(ae,ce,de,"⋌","\\rightthreetimes",!0),oe(ae,ce,de,"⋏","\\curlywedge",!0),oe(ae,ce,de,"⋎","\\curlyvee",!0),oe(ae,ce,de,"⊝","\\circleddash",!0),oe(ae,ce,de,"⊛","\\circledast",!0),oe(ae,ce,de,"⋅","\\centerdot"),oe(ae,ce,de,"⊺","\\intercal",!0),oe(ae,ce,de,"⋒","\\doublecap"),oe(ae,ce,de,"⋓","\\doublecup"),oe(ae,ce,de,"⊠","\\boxtimes",!0),oe(ae,ce,be,"⇢","\\dashrightarrow",!0),oe(ae,ce,be,"⇠","\\dashleftarrow",!0),oe(ae,ce,be,"⇇","\\leftleftarrows",!0),oe(ae,ce,be,"⇆","\\leftrightarrows",!0),oe(ae,ce,be,"⇚","\\Lleftarrow",!0),oe(ae,ce,be,"↞","\\twoheadleftarrow",!0),oe(ae,ce,be,"↢","\\leftarrowtail",!0),oe(ae,ce,be,"↫","\\looparrowleft",!0),oe(ae,ce,be,"⇋","\\leftrightharpoons",!0),oe(ae,ce,be,"↶","\\curvearrowleft",!0),oe(ae,ce,be,"↺","\\circlearrowleft",!0),oe(ae,ce,be,"↰","\\Lsh",!0),oe(ae,ce,be,"⇈","\\upuparrows",!0),oe(ae,ce,be,"↿","\\upharpoonleft",!0),oe(ae,ce,be,"⇃","\\downharpoonleft",!0),oe(ae,le,be,"⊶","\\origof",!0),oe(ae,le,be,"⊷","\\imageof",!0),oe(ae,ce,be,"⊸","\\multimap",!0),oe(ae,ce,be,"↭","\\leftrightsquigarrow",!0),oe(ae,ce,be,"⇉","\\rightrightarrows",!0),oe(ae,ce,be,"⇄","\\rightleftarrows",!0),oe(ae,ce,be,"↠","\\twoheadrightarrow",!0),oe(ae,ce,be,"↣","\\rightarrowtail",!0),oe(ae,ce,be,"↬","\\looparrowright",!0),oe(ae,ce,be,"↷","\\curvearrowright",!0),oe(ae,ce,be,"↻","\\circlearrowright",!0),oe(ae,ce,be,"↱","\\Rsh",!0),oe(ae,ce,be,"⇊","\\downdownarrows",!0),oe(ae,ce,be,"↾","\\upharpoonright",!0),oe(ae,ce,be,"⇂","\\downharpoonright",!0),oe(ae,ce,be,"⇝","\\rightsquigarrow",!0),oe(ae,ce,be,"⇝","\\leadsto"),oe(ae,ce,be,"⇛","\\Rrightarrow",!0),oe(ae,ce,be,"↾","\\restriction"),oe(ae,le,ye,"‘","`"),oe(ae,le,ye,"$","\\$"),oe(se,le,ye,"$","\\$"),oe(se,le,ye,"$","\\textdollar"),oe(ae,le,ye,"%","\\%"),oe(se,le,ye,"%","\\%"),oe(ae,le,ye,"_","\\_"),oe(se,le,ye,"_","\\_"),oe(se,le,ye,"_","\\textunderscore"),oe(ae,le,ye,"∠","\\angle",!0),oe(ae,le,ye,"∞","\\infty",!0),oe(ae,le,ye,"′","\\prime"),oe(ae,le,ye,"△","\\triangle"),oe(ae,le,ye,"Γ","\\Gamma",!0),oe(ae,le,ye,"Δ","\\Delta",!0),oe(ae,le,ye,"Θ","\\Theta",!0),oe(ae,le,ye,"Λ","\\Lambda",!0),oe(ae,le,ye,"Ξ","\\Xi",!0),oe(ae,le,ye,"Π","\\Pi",!0),oe(ae,le,ye,"Σ","\\Sigma",!0),oe(ae,le,ye,"Υ","\\Upsilon",!0),oe(ae,le,ye,"Φ","\\Phi",!0),oe(ae,le,ye,"Ψ","\\Psi",!0),oe(ae,le,ye,"Ω","\\Omega",!0),oe(ae,le,ye,"A","Α"),oe(ae,le,ye,"B","Β"),oe(ae,le,ye,"E","Ε"),oe(ae,le,ye,"Z","Ζ"),oe(ae,le,ye,"H","Η"),oe(ae,le,ye,"I","Ι"),oe(ae,le,ye,"K","Κ"),oe(ae,le,ye,"M","Μ"),oe(ae,le,ye,"N","Ν"),oe(ae,le,ye,"O","Ο"),oe(ae,le,ye,"P","Ρ"),oe(ae,le,ye,"T","Τ"),oe(ae,le,ye,"X","Χ"),oe(ae,le,ye,"¬","\\neg",!0),oe(ae,le,ye,"¬","\\lnot"),oe(ae,le,ye,"⊤","\\top"),oe(ae,le,ye,"⊥","\\bot"),oe(ae,le,ye,"∅","\\emptyset"),oe(ae,ce,ye,"∅","\\varnothing"),oe(ae,le,me,"α","\\alpha",!0),oe(ae,le,me,"β","\\beta",!0),oe(ae,le,me,"γ","\\gamma",!0),oe(ae,le,me,"δ","\\delta",!0),oe(ae,le,me,"ϵ","\\epsilon",!0),oe(ae,le,me,"ζ","\\zeta",!0),oe(ae,le,me,"η","\\eta",!0),oe(ae,le,me,"θ","\\theta",!0),oe(ae,le,me,"ι","\\iota",!0),oe(ae,le,me,"κ","\\kappa",!0),oe(ae,le,me,"λ","\\lambda",!0),oe(ae,le,me,"μ","\\mu",!0),oe(ae,le,me,"ν","\\nu",!0),oe(ae,le,me,"ξ","\\xi",!0),oe(ae,le,me,"ο","\\omicron",!0),oe(ae,le,me,"π","\\pi",!0),oe(ae,le,me,"ρ","\\rho",!0),oe(ae,le,me,"σ","\\sigma",!0),oe(ae,le,me,"τ","\\tau",!0),oe(ae,le,me,"υ","\\upsilon",!0),oe(ae,le,me,"ϕ","\\phi",!0),oe(ae,le,me,"χ","\\chi",!0),oe(ae,le,me,"ψ","\\psi",!0),oe(ae,le,me,"ω","\\omega",!0),oe(ae,le,me,"ε","\\varepsilon",!0),oe(ae,le,me,"ϑ","\\vartheta",!0),oe(ae,le,me,"ϖ","\\varpi",!0),oe(ae,le,me,"ϱ","\\varrho",!0),oe(ae,le,me,"ς","\\varsigma",!0),oe(ae,le,me,"φ","\\varphi",!0),oe(ae,le,de,"∗","*",!0),oe(ae,le,de,"+","+"),oe(ae,le,de,"−","-",!0),oe(ae,le,de,"⋅","\\cdot",!0),oe(ae,le,de,"∘","\\circ",!0),oe(ae,le,de,"÷","\\div",!0),oe(ae,le,de,"±","\\pm",!0),oe(ae,le,de,"×","\\times",!0),oe(ae,le,de,"∩","\\cap",!0),oe(ae,le,de,"∪","\\cup",!0),oe(ae,le,de,"∖","\\setminus",!0),oe(ae,le,de,"∧","\\land"),oe(ae,le,de,"∨","\\lor"),oe(ae,le,de,"∧","\\wedge",!0),oe(ae,le,de,"∨","\\vee",!0),oe(ae,le,ye,"√","\\surd"),oe(ae,le,fe,"⟨","\\langle",!0),oe(ae,le,fe,"∣","\\lvert"),oe(ae,le,fe,"∥","\\lVert"),oe(ae,le,he,"?","?"),oe(ae,le,he,"!","!"),oe(ae,le,he,"⟩","\\rangle",!0),oe(ae,le,he,"∣","\\rvert"),oe(ae,le,he,"∥","\\rVert"),oe(ae,le,be,"=","="),oe(ae,le,be,":",":"),oe(ae,le,be,"≈","\\approx",!0),oe(ae,le,be,"≅","\\cong",!0),oe(ae,le,be,"≥","\\ge"),oe(ae,le,be,"≥","\\geq",!0),oe(ae,le,be,"←","\\gets"),oe(ae,le,be,">","\\gt",!0),oe(ae,le,be,"∈","\\in",!0),oe(ae,le,be,"","\\@not"),oe(ae,le,be,"⊂","\\subset",!0),oe(ae,le,be,"⊃","\\supset",!0),oe(ae,le,be,"⊆","\\subseteq",!0),oe(ae,le,be,"⊇","\\supseteq",!0),oe(ae,ce,be,"⊈","\\nsubseteq",!0),oe(ae,ce,be,"⊉","\\nsupseteq",!0),oe(ae,le,be,"⊨","\\models"),oe(ae,le,be,"←","\\leftarrow",!0),oe(ae,le,be,"≤","\\le"),oe(ae,le,be,"≤","\\leq",!0),oe(ae,le,be,"<","\\lt",!0),oe(ae,le,be,"→","\\rightarrow",!0),oe(ae,le,be,"→","\\to"),oe(ae,ce,be,"≱","\\ngeq",!0),oe(ae,ce,be,"≰","\\nleq",!0),oe(ae,le,ve," ","\\ "),oe(ae,le,ve," ","\\space"),oe(ae,le,ve," ","\\nobreakspace"),oe(se,le,ve," ","\\ "),oe(se,le,ve," "," "),oe(se,le,ve," ","\\space"),oe(se,le,ve," ","\\nobreakspace"),oe(ae,le,ve,null,"\\nobreak"),oe(ae,le,ve,null,"\\allowbreak"),oe(ae,le,_e,",",","),oe(ae,le,_e,";",";"),oe(ae,ce,de,"⊼","\\barwedge",!0),oe(ae,ce,de,"⊻","\\veebar",!0),oe(ae,le,de,"⊙","\\odot",!0),oe(ae,le,de,"⊕","\\oplus",!0),oe(ae,le,de,"⊗","\\otimes",!0),oe(ae,le,ye,"∂","\\partial",!0),oe(ae,le,de,"⊘","\\oslash",!0),oe(ae,ce,de,"⊚","\\circledcirc",!0),oe(ae,ce,de,"⊡","\\boxdot",!0),oe(ae,le,de,"△","\\bigtriangleup"),oe(ae,le,de,"▽","\\bigtriangledown"),oe(ae,le,de,"†","\\dagger"),oe(ae,le,de,"⋄","\\diamond"),oe(ae,le,de,"⋆","\\star"),oe(ae,le,de,"◃","\\triangleleft"),oe(ae,le,de,"▹","\\triangleright"),oe(ae,le,fe,"{","\\{"),oe(se,le,ye,"{","\\{"),oe(se,le,ye,"{","\\textbraceleft"),oe(ae,le,he,"}","\\}"),oe(se,le,ye,"}","\\}"),oe(se,le,ye,"}","\\textbraceright"),oe(ae,le,fe,"{","\\lbrace"),oe(ae,le,he,"}","\\rbrace"),oe(ae,le,fe,"[","\\lbrack",!0),oe(se,le,ye,"[","\\lbrack",!0),oe(ae,le,he,"]","\\rbrack",!0),oe(se,le,ye,"]","\\rbrack",!0),oe(ae,le,fe,"(","\\lparen",!0),oe(ae,le,he,")","\\rparen",!0),oe(se,le,ye,"<","\\textless",!0),oe(se,le,ye,">","\\textgreater",!0),oe(ae,le,fe,"⌊","\\lfloor",!0),oe(ae,le,he,"⌋","\\rfloor",!0),oe(ae,le,fe,"⌈","\\lceil",!0),oe(ae,le,he,"⌉","\\rceil",!0),oe(ae,le,ye,"\\","\\backslash"),oe(ae,le,ye,"∣","|"),oe(ae,le,ye,"∣","\\vert"),oe(se,le,ye,"|","\\textbar",!0),oe(ae,le,ye,"∥","\\|"),oe(ae,le,ye,"∥","\\Vert"),oe(se,le,ye,"∥","\\textbardbl"),oe(se,le,ye,"~","\\textasciitilde"),oe(se,le,ye,"\\","\\textbackslash"),oe(se,le,ye,"^","\\textasciicircum"),oe(ae,le,be,"↑","\\uparrow",!0),oe(ae,le,be,"⇑","\\Uparrow",!0),oe(ae,le,be,"↓","\\downarrow",!0),oe(ae,le,be,"⇓","\\Downarrow",!0),oe(ae,le,be,"↕","\\updownarrow",!0),oe(ae,le,be,"⇕","\\Updownarrow",!0),oe(ae,le,ge,"∐","\\coprod"),oe(ae,le,ge,"⋁","\\bigvee"),oe(ae,le,ge,"⋀","\\bigwedge"),oe(ae,le,ge,"⨄","\\biguplus"),oe(ae,le,ge,"⋂","\\bigcap"),oe(ae,le,ge,"⋃","\\bigcup"),oe(ae,le,ge,"∫","\\int"),oe(ae,le,ge,"∫","\\intop"),oe(ae,le,ge,"∬","\\iint"),oe(ae,le,ge,"∭","\\iiint"),oe(ae,le,ge,"∏","\\prod"),oe(ae,le,ge,"∑","\\sum"),oe(ae,le,ge,"⨂","\\bigotimes"),oe(ae,le,ge,"⨁","\\bigoplus"),oe(ae,le,ge,"⨀","\\bigodot"),oe(ae,le,ge,"∮","\\oint"),oe(ae,le,ge,"∯","\\oiint"),oe(ae,le,ge,"∰","\\oiiint"),oe(ae,le,ge,"⨆","\\bigsqcup"),oe(ae,le,ge,"∫","\\smallint"),oe(se,le,pe,"…","\\textellipsis"),oe(ae,le,pe,"…","\\mathellipsis"),oe(se,le,pe,"…","\\ldots",!0),oe(ae,le,pe,"…","\\ldots",!0),oe(ae,le,pe,"⋯","\\@cdots",!0),oe(ae,le,pe,"⋱","\\ddots",!0),oe(ae,le,ye,"⋮","\\varvdots"),oe(ae,le,ue,"ˊ","\\acute"),oe(ae,le,ue,"ˋ","\\grave"),oe(ae,le,ue,"¨","\\ddot"),oe(ae,le,ue,"~","\\tilde"),oe(ae,le,ue,"ˉ","\\bar"),oe(ae,le,ue,"˘","\\breve"),oe(ae,le,ue,"ˇ","\\check"),oe(ae,le,ue,"^","\\hat"),oe(ae,le,ue,"⃗","\\vec"),oe(ae,le,ue,"˙","\\dot"),oe(ae,le,ue,"˚","\\mathring"),oe(ae,le,me,"","\\@imath"),oe(ae,le,me,"","\\@jmath"),oe(ae,le,ye,"ı","ı"),oe(ae,le,ye,"ȷ","ȷ"),oe(se,le,ye,"ı","\\i",!0),oe(se,le,ye,"ȷ","\\j",!0),oe(se,le,ye,"ß","\\ss",!0),oe(se,le,ye,"æ","\\ae",!0),oe(se,le,ye,"œ","\\oe",!0),oe(se,le,ye,"ø","\\o",!0),oe(se,le,ye,"Æ","\\AE",!0),oe(se,le,ye,"Œ","\\OE",!0),oe(se,le,ye,"Ø","\\O",!0),oe(se,le,ue,"ˊ","\\'"),oe(se,le,ue,"ˋ","\\`"),oe(se,le,ue,"ˆ","\\^"),oe(se,le,ue,"˜","\\~"),oe(se,le,ue,"ˉ","\\="),oe(se,le,ue,"˘","\\u"),oe(se,le,ue,"˙","\\."),oe(se,le,ue,"¸","\\c"),oe(se,le,ue,"˚","\\r"),oe(se,le,ue,"ˇ","\\v"),oe(se,le,ue,"¨",'\\"'),oe(se,le,ue,"˝","\\H"),oe(se,le,ue,"◯","\\textcircled");var Ee={"--":!0,"---":!0,"``":!0,"''":!0};oe(se,le,ye,"–","--",!0),oe(se,le,ye,"–","\\textendash"),oe(se,le,ye,"—","---",!0),oe(se,le,ye,"—","\\textemdash"),oe(se,le,ye,"‘","`",!0),oe(se,le,ye,"‘","\\textquoteleft"),oe(se,le,ye,"’","'",!0),oe(se,le,ye,"’","\\textquoteright"),oe(se,le,ye,"“","``",!0),oe(se,le,ye,"“","\\textquotedblleft"),oe(se,le,ye,"”","''",!0),oe(se,le,ye,"”","\\textquotedblright"),oe(ae,le,ye,"°","\\degree",!0),oe(se,le,ye,"°","\\degree"),oe(se,le,ye,"°","\\textdegree",!0),oe(ae,le,ye,"£","\\pounds"),oe(ae,le,ye,"£","\\mathsterling",!0),oe(se,le,ye,"£","\\pounds"),oe(se,le,ye,"£","\\textsterling",!0),oe(ae,ce,ye,"✠","\\maltese"),oe(se,ce,ye,"✠","\\maltese");for(var Se='0123456789/@."',we=0;we<Se.length;we++){var Te=Se.charAt(we);oe(ae,le,ye,Te,Te)}for(var Ce='0123456789!@*()-=+";:?/.,',xe=0;xe<Ce.length;xe++){var Fe=Ce.charAt(xe);oe(se,le,ye,Fe,Fe)}for(var De="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",ke=0;ke<De.length;ke++){var Oe=De.charAt(ke);oe(ae,le,me,Oe,Oe),oe(se,le,ye,Oe,Oe)}oe(ae,ce,ye,"C","ℂ"),oe(se,ce,ye,"C","ℂ"),oe(ae,ce,ye,"H","ℍ"),oe(se,ce,ye,"H","ℍ"),oe(ae,ce,ye,"N","ℕ"),oe(se,ce,ye,"N","ℕ"),oe(ae,ce,ye,"P","ℙ"),oe(se,ce,ye,"P","ℙ"),oe(ae,ce,ye,"Q","ℚ"),oe(se,ce,ye,"Q","ℚ"),oe(ae,ce,ye,"R","ℝ"),oe(se,ce,ye,"R","ℝ"),oe(ae,ce,ye,"Z","ℤ"),oe(se,ce,ye,"Z","ℤ"),oe(ae,le,me,"h","ℎ"),oe(se,le,me,"h","ℎ");for(var Ie="",Ae=0;Ae<De.length;Ae++){var Re=De.charAt(Ae);oe(ae,le,me,Re,Ie=String.fromCharCode(55349,56320+Ae)),oe(se,le,ye,Re,Ie),oe(ae,le,me,Re,Ie=String.fromCharCode(55349,56372+Ae)),oe(se,le,ye,Re,Ie),oe(ae,le,me,Re,Ie=String.fromCharCode(55349,56424+Ae)),oe(se,le,ye,Re,Ie),oe(ae,le,me,Re,Ie=String.fromCharCode(55349,56580+Ae)),oe(se,le,ye,Re,Ie),oe(ae,le,me,Re,Ie=String.fromCharCode(55349,56736+Ae)),oe(se,le,ye,Re,Ie),oe(ae,le,me,Re,Ie=String.fromCharCode(55349,56788+Ae)),oe(se,le,ye,Re,Ie),oe(ae,le,me,Re,Ie=String.fromCharCode(55349,56840+Ae)),oe(se,le,ye,Re,Ie),oe(ae,le,me,Re,Ie=String.fromCharCode(55349,56944+Ae)),oe(se,le,ye,Re,Ie),Ae<26&&(oe(ae,le,me,Re,Ie=String.fromCharCode(55349,56632+Ae)),oe(se,le,ye,Re,Ie),oe(ae,le,me,Re,Ie=String.fromCharCode(55349,56476+Ae)),oe(se,le,ye,Re,Ie))}oe(ae,le,me,"k",Ie=String.fromCharCode(55349,56668)),oe(se,le,ye,"k",Ie);for(var Ne=0;Ne<10;Ne++){var Me=Ne.toString();oe(ae,le,me,Me,Ie=String.fromCharCode(55349,57294+Ne)),oe(se,le,ye,Me,Ie),oe(ae,le,me,Me,Ie=String.fromCharCode(55349,57314+Ne)),oe(se,le,ye,Me,Ie),oe(ae,le,me,Me,Ie=String.fromCharCode(55349,57324+Ne)),oe(se,le,ye,Me,Ie),oe(ae,le,me,Me,Ie=String.fromCharCode(55349,57334+Ne)),oe(se,le,ye,Me,Ie)}for(var Pe="ÐÞþ",Le=0;Le<Pe.length;Le++){var Be=Pe.charAt(Le);oe(ae,le,me,Be,Be),oe(se,le,ye,Be,Be)}var Ue=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["","",""],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],je=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Ge=function(e,t,n){return ie[n][e]&&ie[n][e].replace&&(e=ie[n][e].replace),{value:e,metrics:O(e,t,n)}},ze=function(e,t,n,r,i){var o,a=Ge(e,t,n),s=a.metrics;if(e=a.value,s){var l=s.italic;("text"===n||r&&"mathit"===r.font)&&(l=0),o=new Q(e,s.height,s.depth,l,s.skew,s.width,i)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+n+"'"),o=new Q(e,0,0,0,0,0,i);if(r){o.maxFontSize=r.sizeMultiplier,r.style.isTight()&&o.classes.push("mtight");var c=r.getColor();c&&(o.style.color=c)}return o},He=function(e,t){if(z(e.classes)!==z(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var n=e.classes[0];if("mbin"===n||"mord"===n)return!1}for(var r in e.style)if(e.style.hasOwnProperty(r)&&e.style[r]!==t.style[r])return!1;for(var i in t.style)if(t.style.hasOwnProperty(i)&&e.style[i]!==t.style[i])return!1;return!0},qe=function(e){for(var t=0,n=0,r=0,i=0;i<e.children.length;i++){var o=e.children[i];o.height>t&&(t=o.height),o.depth>n&&(n=o.depth),o.maxFontSize>r&&(r=o.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},Ve=function(e,t,n,r){var i=new $(e,t,n,r);return qe(i),i},$e=function(e,t,n,r){return new $(e,t,n,r)},Ke=function(e){var t=new x(e);return qe(t),t},We=function(e,t,n){var r="";switch(e){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=e}return r+"-"+("textbf"===t&&"textit"===n?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},Ye={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Qe={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Xe={fontMap:Ye,makeSymbol:ze,mathsym:function(e,t,n,r){return void 0===r&&(r=[]),"boldsymbol"===n.font&&Ge(e,"Main-Bold",t).metrics?ze(e,"Main-Bold",t,n,r.concat(["mathbf"])):"\\"===e||"main"===ie[t][e].font?ze(e,"Main-Regular",t,n,r):ze(e,"AMS-Regular",t,n,r.concat(["amsrm"]))},makeSpan:Ve,makeSvgSpan:$e,makeLineSpan:function(e,t,n){var r=Ve([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=G(r.height),r.maxFontSize=1,r},makeAnchor:function(e,t,n,r){var i=new K(e,t,n,r);return qe(i),i},makeFragment:Ke,wrapFragment:function(e,t){return e instanceof x?Ve([],[e],t):e},makeVList:function(e,t){for(var n=function(e){if("individualShift"===e.positionType){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,i=r,o=1;o<t.length;o++){var a=-t[o].shift-i-t[o].elem.depth,s=a-(t[o-1].elem.height+t[o-1].elem.depth);i+=a,n.push({type:"kern",size:s}),n.push(t[o])}return{children:n,depth:r}}var l;if("top"===e.positionType){for(var c=e.positionData,u=0;u<e.children.length;u++){var d=e.children[u];c-="kern"===d.type?d.size:d.elem.height+d.elem.depth}l=c}else if("bottom"===e.positionType)l=-e.positionData;else{var h=e.children[0];if("elem"!==h.type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)l=-h.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");l=-h.elem.depth}}return{children:e.children,depth:l}}(e),r=n.children,i=n.depth,o=0,a=0;a<r.length;a++){var s=r[a];if("elem"===s.type){var l=s.elem;o=Math.max(o,l.maxFontSize,l.height)}}o+=2;var c=Ve(["pstrut"],[]);c.style.height=G(o);for(var u=[],d=i,h=i,p=i,m=0;m<r.length;m++){var g=r[m];if("kern"===g.type)p+=g.size;else{var f=g.elem,_=g.wrapperClasses||[],b=g.wrapperStyle||{},v=Ve(_,[c,f],void 0,b);v.style.top=G(-o-p-f.depth),g.marginLeft&&(v.style.marginLeft=g.marginLeft),g.marginRight&&(v.style.marginRight=g.marginRight),u.push(v),p+=f.height+f.depth}d=Math.min(d,p),h=Math.max(h,p)}var y,E=Ve(["vlist"],u);if(E.style.height=G(h),d<0){var S=Ve([],[]),w=Ve(["vlist"],[S]);w.style.height=G(-d);var T=Ve(["vlist-s"],[new Q("")]);y=[Ve(["vlist-r"],[E,T]),Ve(["vlist-r"],[w])]}else y=[Ve(["vlist-r"],[E])];var C=Ve(["vlist-t"],y);return 2===y.length&&C.classes.push("vlist-t2"),C.height=h,C.depth=-d,C},makeOrd:function(e,t,n){var i=e.mode,o=e.text,a=["mord"],s="math"===i||"text"===i&&t.font,l=s?t.font:t.fontFamily;if(55349===o.charCodeAt(0)){var c=function(e,t){var n=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,i="math"===t?0:1;if(119808<=n&&n<120484){var o=Math.floor((n-119808)/26);return[Ue[o][2],Ue[o][i]]}if(120782<=n&&n<=120831){var a=Math.floor((n-120782)/10);return[je[a][2],je[a][i]]}if(120485===n||120486===n)return[Ue[0][2],Ue[0][i]];if(120486<n&&n<120782)return["",""];throw new r("Unsupported character: "+e)}(o,i),u=c[0],d=c[1];return ze(o,u,i,t,a.concat(d))}if(l){var h,p;if("boldsymbol"===l){var m=function(e,t,n,r,i){return"textord"!==i&&Ge(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(o,i,0,0,n);h=m.fontName,p=[m.fontClass]}else s?(h=Ye[l].fontName,p=[l]):(h=We(l,t.fontWeight,t.fontShape),p=[l,t.fontWeight,t.fontShape]);if(Ge(o,h,i).metrics)return ze(o,h,i,t,a.concat(p));if(Ee.hasOwnProperty(o)&&"Typewriter"===h.slice(0,10)){for(var g=[],f=0;f<o.length;f++)g.push(ze(o[f],h,i,t,a.concat(p)));return Ke(g)}}if("mathord"===n)return ze(o,"Math-Italic",i,t,a.concat(["mathnormal"]));if("textord"===n){var _=ie[i][o]&&ie[i][o].font;if("ams"===_){var b=We("amsrm",t.fontWeight,t.fontShape);return ze(o,b,i,t,a.concat("amsrm",t.fontWeight,t.fontShape))}if("main"!==_&&_){var v=We(_,t.fontWeight,t.fontShape);return ze(o,v,i,t,a.concat(v,t.fontWeight,t.fontShape))}var y=We("textrm",t.fontWeight,t.fontShape);return ze(o,y,i,t,a.concat(t.fontWeight,t.fontShape))}throw new Error("unexpected type: "+n+" in makeOrd")},makeGlue:function(e,t){var n=Ve(["mspace"],[],t),r=j(e,t);return n.style.marginRight=G(r),n},staticSvg:function(e,t){var n=Qe[e],r=n[0],i=n[1],o=n[2],a=new Z(r),s=new X([a],{width:G(i),height:G(o),style:"width:"+G(i),viewBox:"0 0 "+1e3*i+" "+1e3*o,preserveAspectRatio:"xMinYMin"}),l=$e(["overlay"],[s],t);return l.height=o,l.style.height=G(o),l.style.width=G(i),l},svgData:Qe,tryCombineChars:function(e){for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n instanceof Q&&r instanceof Q&&He(n,r)&&(n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--)}return e}},Ze={number:3,unit:"mu"},Je={number:4,unit:"mu"},et={number:5,unit:"mu"},tt={mord:{mop:Ze,mbin:Je,mrel:et,minner:Ze},mop:{mord:Ze,mop:Ze,mrel:et,minner:Ze},mbin:{mord:Je,mop:Je,mopen:Je,minner:Je},mrel:{mord:et,mop:et,mopen:et,minner:et},mopen:{},mclose:{mop:Ze,mbin:Je,mrel:et,minner:Ze},mpunct:{mord:Ze,mop:Ze,mrel:et,mopen:Ze,mclose:Ze,mpunct:Ze,minner:Ze},minner:{mord:Ze,mop:Ze,mbin:Je,mrel:et,mopen:Ze,mpunct:Ze,minner:Ze}},nt={mord:{mop:Ze},mop:{mord:Ze,mop:Ze},mbin:{},mrel:{},mopen:{},mclose:{mop:Ze},mpunct:{},minner:{mop:Ze}},rt={},it={},ot={};function at(e){for(var t=e.type,n=e.names,r=e.props,i=e.handler,o=e.htmlBuilder,a=e.mathmlBuilder,s={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:void 0===r.allowedInMath||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:i},l=0;l<n.length;++l)rt[n[l]]=s;t&&(o&&(it[t]=o),a&&(ot[t]=a))}function st(e){at({type:e.type,names:[],props:{numArgs:0},handler:function(){throw new Error("Should never be called.")},htmlBuilder:e.htmlBuilder,mathmlBuilder:e.mathmlBuilder})}var lt=function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},ct=function(e){return"ordgroup"===e.type?e.body:[e]},ut=Xe.makeSpan,dt=["leftmost","mbin","mopen","mrel","mop","mpunct"],ht=["rightmost","mrel","mclose","mpunct"],pt={display:y.DISPLAY,text:y.TEXT,script:y.SCRIPT,scriptscript:y.SCRIPTSCRIPT},mt={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},gt=function(e,t,n,r){void 0===r&&(r=[null,null]);for(var i=[],o=0;o<e.length;o++){var a=Et(e[o],t);if(a instanceof x){var s=a.children;i.push.apply(i,s)}else i.push(a)}if(Xe.tryCombineChars(i),!n)return i;var c=t;if(1===e.length){var u=e[0];"sizing"===u.type?c=t.havingSize(u.size):"styling"===u.type&&(c=t.havingStyle(pt[u.style]))}var d=ut([r[0]||"leftmost"],[],t),h=ut([r[1]||"rightmost"],[],t),p="root"===n;return ft(i,(function(e,t){var n=t.classes[0],r=e.classes[0];"mbin"===n&&l.contains(ht,r)?t.classes[0]="mord":"mbin"===r&&l.contains(dt,n)&&(e.classes[0]="mord")}),{node:d},h,p),ft(i,(function(e,t){var n=vt(t),r=vt(e),i=n&&r?e.hasClass("mtight")?nt[n][r]:tt[n][r]:null;if(i)return Xe.makeGlue(i,c)}),{node:d},h,p),i},ft=function e(t,n,r,i,o){i&&t.push(i);for(var a=0;a<t.length;a++){var s=t[a],l=_t(s);if(l)e(l.children,n,r,null,o);else{var c=!s.hasClass("mspace");if(c){var u=n(s,r.node);u&&(r.insertAfter?r.insertAfter(u):(t.unshift(u),a++))}c?r.node=s:o&&s.hasClass("newline")&&(r.node=ut(["leftmost"])),r.insertAfter=function(e){return function(n){t.splice(e+1,0,n),a++}}(a)}}i&&t.pop()},_t=function(e){return e instanceof x||e instanceof K||e instanceof $&&e.hasClass("enclosing")?e:null},bt=function e(t,n){var r=_t(t);if(r){var i=r.children;if(i.length){if("right"===n)return e(i[i.length-1],"right");if("left"===n)return e(i[0],"left")}}return t},vt=function(e,t){return e?(t&&(e=bt(e,t)),mt[e.classes[0]]||null):null},yt=function(e,t){var n=["nulldelimiter"].concat(e.baseSizingClasses());return ut(t.concat(n))},Et=function(e,t,n){if(!e)return ut();if(it[e.type]){var i=it[e.type](e,t);if(n&&t.size!==n.size){i=ut(t.sizingClasses(n),[i],t);var o=t.sizeMultiplier/n.sizeMultiplier;i.height*=o,i.depth*=o}return i}throw new r("Got group of unknown type: '"+e.type+"'")};function St(e,t){var n=ut(["base"],e,t),r=ut(["strut"]);return r.style.height=G(n.height+n.depth),n.depth&&(r.style.verticalAlign=G(-n.depth)),n.children.unshift(r),n}function wt(e,t){var n=null;1===e.length&&"tag"===e[0].type&&(n=e[0].tag,e=e[0].body);var r,i=gt(e,t,"root");2===i.length&&i[1].hasClass("tag")&&(r=i.pop());for(var o,a=[],s=[],l=0;l<i.length;l++)if(s.push(i[l]),i[l].hasClass("mbin")||i[l].hasClass("mrel")||i[l].hasClass("allowbreak")){for(var c=!1;l<i.length-1&&i[l+1].hasClass("mspace")&&!i[l+1].hasClass("newline");)l++,s.push(i[l]),i[l].hasClass("nobreak")&&(c=!0);c||(a.push(St(s,t)),s=[])}else i[l].hasClass("newline")&&(s.pop(),s.length>0&&(a.push(St(s,t)),s=[]),a.push(i[l]));s.length>0&&a.push(St(s,t)),n?((o=St(gt(n,t,!0))).classes=["tag"],a.push(o)):r&&a.push(r);var u=ut(["katex-html"],a);if(u.setAttribute("aria-hidden","true"),o){var d=o.children[0];d.style.height=G(u.height+u.depth),u.depth&&(d.style.verticalAlign=G(-u.depth))}return u}function Tt(e){return new x(e)}var Ct=function(){function e(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.getAttribute=function(e){return this.attributes[e]},t.toNode=function(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=z(this.classes));for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e},t.toMarkup=function(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=l.escape(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+l.escape(z(this.classes))+'"'),e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</"+this.type+">"},t.toText=function(){return this.children.map((function(e){return e.toText()})).join("")},e}(),xt=function(){function e(e){this.text=void 0,this.text=e}var t=e.prototype;return t.toNode=function(){return document.createTextNode(this.text)},t.toMarkup=function(){return l.escape(this.toText())},t.toText=function(){return this.text},e}(),Ft={MathNode:Ct,TextNode:xt,SpaceNode:function(){function e(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?" ":e>=.1666&&e<=.1667?" ":e>=.2222&&e<=.2223?" ":e>=.2777&&e<=.2778?" ":e>=-.05556&&e<=-.05555?" ":e>=-.1667&&e<=-.1666?" ":e>=-.2223&&e<=-.2222?" ":e>=-.2778&&e<=-.2777?" ":null}var t=e.prototype;return t.toNode=function(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",G(this.width)),e},t.toMarkup=function(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+G(this.width)+'"/>'},t.toText=function(){return this.character?this.character:" "},e}(),newDocumentFragment:Tt},Dt=function(e,t,n){return!ie[t][e]||!ie[t][e].replace||55349===e.charCodeAt(0)||Ee.hasOwnProperty(e)&&n&&(n.fontFamily&&"tt"===n.fontFamily.slice(4,6)||n.font&&"tt"===n.font.slice(4,6))||(e=ie[t][e].replace),new Ft.TextNode(e)},kt=function(e){return 1===e.length?e[0]:new Ft.MathNode("mrow",e)},Ot=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var n=t.font;if(!n||"mathnormal"===n)return null;var r=e.mode;if("mathit"===n)return"italic";if("boldsymbol"===n)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===n)return"bold";if("mathbb"===n)return"double-struck";if("mathfrak"===n)return"fraktur";if("mathscr"===n||"mathcal"===n)return"script";if("mathsf"===n)return"sans-serif";if("mathtt"===n)return"monospace";var i=e.text;return l.contains(["\\imath","\\jmath"],i)?null:(ie[r][i]&&ie[r][i].replace&&(i=ie[r][i].replace),O(i,Xe.fontMap[n].fontName,r)?Xe.fontMap[n].variant:null)},It=function(e,t,n){if(1===e.length){var r=Rt(e[0],t);return n&&r instanceof Ct&&"mo"===r.type&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}for(var i,o=[],a=0;a<e.length;a++){var s=Rt(e[a],t);if(s instanceof Ct&&i instanceof Ct){if("mtext"===s.type&&"mtext"===i.type&&s.getAttribute("mathvariant")===i.getAttribute("mathvariant")){var l;(l=i.children).push.apply(l,s.children);continue}if("mn"===s.type&&"mn"===i.type){var c;(c=i.children).push.apply(c,s.children);continue}if("mi"===s.type&&1===s.children.length&&"mn"===i.type){var u=s.children[0];if(u instanceof xt&&"."===u.text){var d;(d=i.children).push.apply(d,s.children);continue}}else if("mi"===i.type&&1===i.children.length){var h=i.children[0];if(h instanceof xt&&"̸"===h.text&&("mo"===s.type||"mi"===s.type||"mn"===s.type)){var p=s.children[0];p instanceof xt&&p.text.length>0&&(p.text=p.text.slice(0,1)+"̸"+p.text.slice(1),o.pop())}}}o.push(s),i=s}return o},At=function(e,t,n){return kt(It(e,t,n))},Rt=function(e,t){if(!e)return new Ft.MathNode("mrow");if(ot[e.type])return ot[e.type](e,t);throw new r("Got group of unknown type: '"+e.type+"'")};function Nt(e,t,n,r,i){var o,a=It(e,n);o=1===a.length&&a[0]instanceof Ct&&l.contains(["mrow","mtable"],a[0].type)?a[0]:new Ft.MathNode("mrow",a);var s=new Ft.MathNode("annotation",[new Ft.TextNode(t)]);s.setAttribute("encoding","application/x-tex");var c=new Ft.MathNode("semantics",[o,s]),u=new Ft.MathNode("math",[c]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&u.setAttribute("display","block");var d=i?"katex":"katex-mathml";return Xe.makeSpan([d],[u])}var Mt=function(e){return new P({style:e.displayMode?y.DISPLAY:y.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Pt=function(e,t){if(t.displayMode){var n=["katex-display"];t.leqno&&n.push("leqno"),t.fleqn&&n.push("fleqn"),e=Xe.makeSpan(n,[e])}return e},Lt={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},Bt={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Ut=function(e){return"ordgroup"===e.type?e.body.length:1},jt=function(e,t,n,r,i){var o,a=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(o=Xe.makeSpan(["stretchy",t],[],i),"fbox"===t){var s=i.color&&i.getColor();s&&(o.style.borderColor=s)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new J({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&l.push(new J({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new X(l,{width:"100%",height:G(a)});o=Xe.makeSvgSpan([],[c],i)}return o.height=a,o.style.height=G(a),o},Gt=function(e){var t=new Ft.MathNode("mo",[new Ft.TextNode(Lt[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},zt=function(e,t){var n=function(){var n=4e5,r=e.label.slice(1);if(l.contains(["widehat","widecheck","widetilde","utilde"],r)){var i,o,a,s=Ut(e.base);if(s>5)"widehat"===r||"widecheck"===r?(i=420,n=2364,a=.42,o=r+"4"):(i=312,n=2340,a=.34,o="tilde4");else{var c=[1,1,2,2,3,3][s];"widehat"===r||"widecheck"===r?(n=[0,1062,2364,2364,2364][c],i=[0,239,300,360,420][c],a=[0,.24,.3,.3,.36,.42][c],o=r+c):(n=[0,600,1033,2339,2340][c],i=[0,260,286,306,312][c],a=[0,.26,.286,.3,.306,.34][c],o="tilde"+c)}var u=new Z(o),d=new X([u],{width:"100%",height:G(a),viewBox:"0 0 "+n+" "+i,preserveAspectRatio:"none"});return{span:Xe.makeSvgSpan([],[d],t),minWidth:0,height:a}}var h,p,m=[],g=Bt[r],f=g[0],_=g[1],b=g[2],v=b/1e3,y=f.length;if(1===y)h=["hide-tail"],p=[g[3]];else if(2===y)h=["halfarrow-left","halfarrow-right"],p=["xMinYMin","xMaxYMin"];else{if(3!==y)throw new Error("Correct katexImagesData or update code here to support\n "+y+" children.");h=["brace-left","brace-center","brace-right"],p=["xMinYMin","xMidYMin","xMaxYMin"]}for(var E=0;E<y;E++){var S=new Z(f[E]),w=new X([S],{width:"400em",height:G(v),viewBox:"0 0 "+n+" "+b,preserveAspectRatio:p[E]+" slice"}),T=Xe.makeSvgSpan([h[E]],[w],t);if(1===y)return{span:T,minWidth:_,height:v};T.style.height=G(v),m.push(T)}return{span:Xe.makeSpan(["stretchy"],m,t),minWidth:_,height:v}}(),r=n.span,i=n.minWidth,o=n.height;return r.height=o,r.style.height=G(o),i>0&&(r.style.minWidth=G(i)),r};function Ht(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function qt(e){var t=Vt(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Vt(e){return e&&("atom"===e.type||ne.hasOwnProperty(e.type))?e:null}var $t=function(e,t){var n,r,i;e&&"supsub"===e.type?(n=(r=Ht(e.base,"accent")).base,e.base=n,i=function(e){if(e instanceof $)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}(Et(e,t)),e.base=r):n=(r=Ht(e,"accent")).base;var o=Et(n,t.havingCrampedStyle()),a=0;if(r.isShifty&&l.isCharacterBox(n)){var s=l.getBaseElem(n);a=ee(Et(s,t.havingCrampedStyle())).skew}var c,u="\\c"===r.label,d=u?o.height+o.depth:Math.min(o.height,t.fontMetrics().xHeight);if(r.isStretchy)c=zt(r,t),c=Xe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"elem",elem:c,wrapperClasses:["svg-align"],wrapperStyle:a>0?{width:"calc(100% - "+G(2*a)+")",marginLeft:G(2*a)}:void 0}]},t);else{var h,p;"\\vec"===r.label?(h=Xe.staticSvg("vec",t),p=Xe.svgData.vec[1]):((h=ee(h=Xe.makeOrd({mode:r.mode,text:r.label},t,"textord"))).italic=0,p=h.width,u&&(d+=h.depth)),c=Xe.makeSpan(["accent-body"],[h]);var m="\\textcircled"===r.label;m&&(c.classes.push("accent-full"),d=o.height);var g=a;m||(g-=p/2),c.style.left=G(g),"\\textcircled"===r.label&&(c.style.top=".2em"),c=Xe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:-d},{type:"elem",elem:c}]},t)}var f=Xe.makeSpan(["mord","accent"],[c],t);return i?(i.children[0]=f,i.height=Math.max(f.height,i.height),i.classes[0]="mord",i):f},Kt=function(e,t){var n=e.isStretchy?Gt(e.label):new Ft.MathNode("mo",[Dt(e.label,e.mode)]),r=new Ft.MathNode("mover",[Rt(e.base,t),n]);return r.setAttribute("accent","true"),r},Wt=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((function(e){return"\\"+e})).join("|"));at({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:function(e,t){var n=lt(t[0]),r=!Wt.test(e.funcName),i=!r||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:$t,mathmlBuilder:Kt}),at({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:function(e,t){var n=t[0],r=e.parser.mode;return"math"===r&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:$t,mathmlBuilder:Kt}),at({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:"accentUnder",mode:n.mode,label:r,base:i}},htmlBuilder:function(e,t){var n=Et(e.base,t),r=zt(e,t),i="\\utilde"===e.label?.12:0,o=Xe.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:n}]},t);return Xe.makeSpan(["mord","accentunder"],[o],t)},mathmlBuilder:function(e,t){var n=Gt(e.label),r=new Ft.MathNode("munder",[Rt(e.base,t),n]);return r.setAttribute("accentunder","true"),r}});var Yt=function(e){var t=new Ft.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};at({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler:function(e,t,n){var r=e.parser,i=e.funcName;return{type:"xArrow",mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder:function(e,t){var n,r=t.style,i=t.havingStyle(r.sup()),o=Xe.wrapFragment(Et(e.body,i,t),t),a="\\x"===e.label.slice(0,2)?"x":"cd";o.classes.push(a+"-arrow-pad"),e.below&&(i=t.havingStyle(r.sub()),(n=Xe.wrapFragment(Et(e.below,i,t),t)).classes.push(a+"-arrow-pad"));var s,l=zt(e,t),c=-t.fontMetrics().axisHeight+.5*l.height,u=-t.fontMetrics().axisHeight-.5*l.height-.111;if((o.depth>.25||"\\xleftequilibrium"===e.label)&&(u-=o.depth),n){var d=-t.fontMetrics().axisHeight+n.height+.5*l.height+.111;s=Xe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:u},{type:"elem",elem:l,shift:c},{type:"elem",elem:n,shift:d}]},t)}else s=Xe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:u},{type:"elem",elem:l,shift:c}]},t);return s.children[0].children[0].children[1].classes.push("svg-align"),Xe.makeSpan(["mrel","x-arrow"],[s],t)},mathmlBuilder:function(e,t){var n,r=Gt(e.label);if(r.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var i=Yt(Rt(e.body,t));if(e.below){var o=Yt(Rt(e.below,t));n=new Ft.MathNode("munderover",[r,o,i])}else n=new Ft.MathNode("mover",[r,i])}else if(e.below){var a=Yt(Rt(e.below,t));n=new Ft.MathNode("munder",[r,a])}else n=Yt(),n=new Ft.MathNode("mover",[r,n]);return n}});var Qt=Xe.makeSpan;function Xt(e,t){var n=gt(e.body,t,!0);return Qt([e.mclass],n,t)}function Zt(e,t){var n,r=It(e.body,t);return"minner"===e.mclass?n=new Ft.MathNode("mpadded",r):"mord"===e.mclass?e.isCharacterBox?(n=r[0]).type="mi":n=new Ft.MathNode("mi",r):(e.isCharacterBox?(n=r[0]).type="mo":n=new Ft.MathNode("mo",r),"mbin"===e.mclass?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):"mpunct"===e.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0em"):"minner"===e.mclass&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}at({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler:function(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:ct(i),isCharacterBox:l.isCharacterBox(i)}},htmlBuilder:Xt,mathmlBuilder:Zt});var Jt=function(e){var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};at({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler:function(e,t){return{type:"mclass",mode:e.parser.mode,mclass:Jt(t[0]),body:ct(t[1]),isCharacterBox:l.isCharacterBox(t[1])}}}),at({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler:function(e,t){var n,r=e.parser,i=e.funcName,o=t[1],a=t[0];n="\\stackrel"!==i?Jt(o):"mrel";var s={type:"op",mode:o.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==i,body:ct(o)},c={type:"supsub",mode:a.mode,base:s,sup:"\\underset"===i?null:a,sub:"\\underset"===i?a:null};return{type:"mclass",mode:r.mode,mclass:n,body:[c],isCharacterBox:l.isCharacterBox(c)}},htmlBuilder:Xt,mathmlBuilder:Zt}),at({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){return{type:"pmb",mode:e.parser.mode,mclass:Jt(t[0]),body:ct(t[0])}},htmlBuilder:function(e,t){var n=gt(e.body,t,!0),r=Xe.makeSpan([e.mclass],n,t);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder:function(e,t){var n=It(e.body,t),r=new Ft.MathNode("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var en={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},tn=function(){return{type:"styling",body:[],mode:"math",style:"display"}},nn=function(e){return"textord"===e.type&&"@"===e.text},rn=function(e,t){return("mathord"===e.type||"atom"===e.type)&&e.text===t};function on(e,t,n){var r=en[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var i={type:"atom",text:r,mode:"math",family:"rel"},o={type:"ordgroup",mode:"math",body:[n.callFunction("\\\\cdleft",[t[0]],[]),n.callFunction("\\Big",[i],[]),n.callFunction("\\\\cdright",[t[1]],[])]};return n.callFunction("\\\\cdparent",[o],[]);case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return n.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}at({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler:function(e,t){var n=e.parser,r=e.funcName;return{type:"cdlabel",mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder:function(e,t){var n=t.havingStyle(t.style.sup()),r=Xe.wrapFragment(Et(e.label,n,t),t);return r.classes.push("cd-label-"+e.side),r.style.bottom=G(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder:function(e,t){var n=new Ft.MathNode("mrow",[Rt(e.label,t)]);return(n=new Ft.MathNode("mpadded",[n])).setAttribute("width","0"),"left"===e.side&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),(n=new Ft.MathNode("mstyle",[n])).setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}}),at({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler:function(e,t){return{type:"cdlabelparent",mode:e.parser.mode,fragment:t[0]}},htmlBuilder:function(e,t){var n=Xe.wrapFragment(Et(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder:function(e,t){return new Ft.MathNode("mrow",[Rt(e.fragment,t)])}}),at({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){for(var n=e.parser,i=Ht(t[0],"ordgroup").body,o="",a=0;a<i.length;a++)o+=Ht(i[a],"textord").text;var s,l=parseInt(o);if(isNaN(l))throw new r("\\@char has non-numeric argument "+o);if(l<0||l>=1114111)throw new r("\\@char with invalid code point "+o);return l<=65535?s=String.fromCharCode(l):(l-=65536,s=String.fromCharCode(55296+(l>>10),56320+(1023&l))),{type:"textord",mode:n.mode,text:s}}});var an=function(e,t){var n=gt(e.body,t.withColor(e.color),!1);return Xe.makeFragment(n)},sn=function(e,t){var n=It(e.body,t.withColor(e.color)),r=new Ft.MathNode("mstyle",n);return r.setAttribute("mathcolor",e.color),r};at({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler:function(e,t){var n=e.parser,r=Ht(t[0],"color-token").color,i=t[1];return{type:"color",mode:n.mode,color:r,body:ct(i)}},htmlBuilder:an,mathmlBuilder:sn}),at({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler:function(e,t){var n=e.parser,r=e.breakOnTokenText,i=Ht(t[0],"color-token").color;n.gullet.macros.set("\\current@color",i);var o=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:i,body:o}},htmlBuilder:an,mathmlBuilder:sn}),at({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler:function(e,t,n){var r=e.parser,i="["===r.gullet.future().text?r.parseSizeGroup(!0):null,o=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:o,size:i&&Ht(i,"size").value}},htmlBuilder:function(e,t){var n=Xe.makeSpan(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=G(j(e.size,t)))),n},mathmlBuilder:function(e,t){var n=new Ft.MathNode("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",G(j(e.size,t)))),n}});var ln={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},cn=function(e){var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new r("Expected a control sequence",e);return t},un=function(e,t,n,r){var i=e.gullet.macros.get(n.text);null==i&&(n.noexpand=!0,i={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};at({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler:function(e){var t=e.parser,n=e.funcName;t.consumeSpaces();var i=t.fetch();if(ln[i.text])return"\\global"!==n&&"\\\\globallong"!==n||(i.text=ln[i.text]),Ht(t.parseFunction(),"internal");throw new r("Invalid token after macro prefix",i)}}),at({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e){var t=e.parser,n=e.funcName,i=t.gullet.popToken(),o=i.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(o))throw new r("Expected a control sequence",i);for(var a,s=0,l=[[]];"{"!==t.gullet.future().text;)if("#"===(i=t.gullet.popToken()).text){if("{"===t.gullet.future().text){a=t.gullet.future(),l[s].push("{");break}if(i=t.gullet.popToken(),!/^[1-9]$/.test(i.text))throw new r('Invalid argument number "'+i.text+'"');if(parseInt(i.text)!==s+1)throw new r('Argument number "'+i.text+'" out of order');s++,l.push([])}else{if("EOF"===i.text)throw new r("Expected a macro definition");l[s].push(i.text)}var c=t.gullet.consumeArg().tokens;return a&&c.unshift(a),"\\edef"!==n&&"\\xdef"!==n||(c=t.gullet.expandTokens(c)).reverse(),t.gullet.macros.set(o,{tokens:c,numArgs:s,delimiters:l},n===ln[n]),{type:"internal",mode:t.mode}}}),at({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e){var t=e.parser,n=e.funcName,r=cn(t.gullet.popToken());t.gullet.consumeSpaces();var i=function(e){var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t}(t);return un(t,r,i,"\\\\globallet"===n),{type:"internal",mode:t.mode}}}),at({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e){var t=e.parser,n=e.funcName,r=cn(t.gullet.popToken()),i=t.gullet.popToken(),o=t.gullet.popToken();return un(t,r,o,"\\\\globalfuture"===n),t.gullet.pushToken(o),t.gullet.pushToken(i),{type:"internal",mode:t.mode}}});var dn=function(e,t,n){var r=O(ie.math[e]&&ie.math[e].replace||e,t,n);if(!r)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return r},hn=function(e,t,n,r){var i=n.havingBaseStyle(t),o=Xe.makeSpan(r.concat(i.sizingClasses(n)),[e],n),a=i.sizeMultiplier/n.sizeMultiplier;return o.height*=a,o.depth*=a,o.maxFontSize=i.sizeMultiplier,o},pn=function(e,t,n){var r=t.havingBaseStyle(n),i=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=G(i),e.height-=i,e.depth+=i},mn=function(e,t,n,r,i,o){var a=function(e,t,n,r){return Xe.makeSymbol(e,"Size"+t+"-Regular",n,r)}(e,t,i,r),s=hn(Xe.makeSpan(["delimsizing","size"+t],[a],r),y.TEXT,r,o);return n&&pn(s,r,y.TEXT),s},gn=function(e,t,n){var r;return r="Size1-Regular"===t?"delim-size1":"delim-size4",{type:"elem",elem:Xe.makeSpan(["delimsizinginner",r],[Xe.makeSpan([],[Xe.makeSymbol(e,t,n)])])}},fn=function(e,t,n){var r=F["Size4-Regular"][e.charCodeAt(0)]?F["Size4-Regular"][e.charCodeAt(0)][4]:F["Size1-Regular"][e.charCodeAt(0)][4],i=new Z("inner",function(e,t){switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"∣":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),o=new X([i],{width:G(r),height:G(t),style:"width:"+G(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),a=Xe.makeSvgSpan([],[o],n);return a.height=t,a.style.height=G(t),a.style.width=G(r),{type:"elem",elem:a}},_n={type:"kern",size:-.008},bn=["|","\\lvert","\\rvert","\\vert"],vn=["\\|","\\lVert","\\rVert","\\Vert"],yn=function(e,t,n,r,i,o){var a,s,c,u,d="",h=0;a=c=u=e,s=null;var p="Size1-Regular";"\\uparrow"===e?c=u="⏐":"\\Uparrow"===e?c=u="‖":"\\downarrow"===e?a=c="⏐":"\\Downarrow"===e?a=c="‖":"\\updownarrow"===e?(a="\\uparrow",c="⏐",u="\\downarrow"):"\\Updownarrow"===e?(a="\\Uparrow",c="‖",u="\\Downarrow"):l.contains(bn,e)?(c="∣",d="vert",h=333):l.contains(vn,e)?(c="∥",d="doublevert",h=556):"["===e||"\\lbrack"===e?(a="⎡",c="⎢",u="⎣",p="Size4-Regular",d="lbrack",h=667):"]"===e||"\\rbrack"===e?(a="⎤",c="⎥",u="⎦",p="Size4-Regular",d="rbrack",h=667):"\\lfloor"===e||"⌊"===e?(c=a="⎢",u="⎣",p="Size4-Regular",d="lfloor",h=667):"\\lceil"===e||"⌈"===e?(a="⎡",c=u="⎢",p="Size4-Regular",d="lceil",h=667):"\\rfloor"===e||"⌋"===e?(c=a="⎥",u="⎦",p="Size4-Regular",d="rfloor",h=667):"\\rceil"===e||"⌉"===e?(a="⎤",c=u="⎥",p="Size4-Regular",d="rceil",h=667):"("===e||"\\lparen"===e?(a="⎛",c="⎜",u="⎝",p="Size4-Regular",d="lparen",h=875):")"===e||"\\rparen"===e?(a="⎞",c="⎟",u="⎠",p="Size4-Regular",d="rparen",h=875):"\\{"===e||"\\lbrace"===e?(a="⎧",s="⎨",u="⎩",c="⎪",p="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(a="⎫",s="⎬",u="⎭",c="⎪",p="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(a="⎧",u="⎩",c="⎪",p="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(a="⎫",u="⎭",c="⎪",p="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(a="⎧",u="⎭",c="⎪",p="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(a="⎫",u="⎩",c="⎪",p="Size4-Regular");var m=dn(a,p,i),g=m.height+m.depth,f=dn(c,p,i),_=f.height+f.depth,b=dn(u,p,i),v=b.height+b.depth,E=0,S=1;if(null!==s){var w=dn(s,p,i);E=w.height+w.depth,S=2}var T=g+v+E,C=T+Math.max(0,Math.ceil((t-T)/(S*_)))*S*_,x=r.fontMetrics().axisHeight;n&&(x*=r.sizeMultiplier);var F=C/2-x,D=[];if(d.length>0){var k=C-g-v,O=Math.round(1e3*C),I=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+t+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(d,Math.round(1e3*k)),A=new Z(d,I),R=(h/1e3).toFixed(3)+"em",N=(O/1e3).toFixed(3)+"em",M=new X([A],{width:R,height:N,viewBox:"0 0 "+h+" "+O}),P=Xe.makeSvgSpan([],[M],r);P.height=O/1e3,P.style.width=R,P.style.height=N,D.push({type:"elem",elem:P})}else{if(D.push(gn(u,p,i)),D.push(_n),null===s){var L=C-g-v+.016;D.push(fn(c,L,r))}else{var B=(C-g-v-E)/2+.016;D.push(fn(c,B,r)),D.push(_n),D.push(gn(s,p,i)),D.push(_n),D.push(fn(c,B,r))}D.push(_n),D.push(gn(a,p,i))}var U=r.havingBaseStyle(y.TEXT),j=Xe.makeVList({positionType:"bottom",positionData:F,children:D},U);return hn(Xe.makeSpan(["delimsizing","mult"],[j],U),y.TEXT,r,o)},En=.08,Sn=function(e,t,n,r,i){var o=function(e,t,n){t*=1e3;var r="";switch(e){case"sqrtMain":r=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,T);break;case"sqrtSize1":r=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,T);break;case"sqrtSize2":r=function(e,t){return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,T);break;case"sqrtSize3":r=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"}(t,T);break;case"sqrtSize4":r=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"}(t,T);break;case"sqrtTall":r=function(e,t,n){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(n-54-t-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"}(t,T,n)}return r}(e,r,n),a=new Z(e,o),s=new X([a],{width:"400em",height:G(t),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return Xe.makeSvgSpan(["hide-tail"],[s],i)},wn=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],Tn=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],Cn=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],xn=[0,1.2,1.8,2.4,3],Fn=[{type:"small",style:y.SCRIPTSCRIPT},{type:"small",style:y.SCRIPT},{type:"small",style:y.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Dn=[{type:"small",style:y.SCRIPTSCRIPT},{type:"small",style:y.SCRIPT},{type:"small",style:y.TEXT},{type:"stack"}],kn=[{type:"small",style:y.SCRIPTSCRIPT},{type:"small",style:y.SCRIPT},{type:"small",style:y.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],On=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},In=function(e,t,n,r){for(var i=Math.min(2,3-r.style.size);i<n.length&&"stack"!==n[i].type;i++){var o=dn(e,On(n[i]),"math"),a=o.height+o.depth;if("small"===n[i].type&&(a*=r.havingBaseStyle(n[i].style).sizeMultiplier),a>t)return n[i]}return n[n.length-1]},An=function(e,t,n,r,i,o){var a;"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),a=l.contains(Cn,e)?Fn:l.contains(wn,e)?kn:Dn;var s=In(e,t,a,r);return"small"===s.type?function(e,t,n,r,i,o){var a=Xe.makeSymbol(e,"Main-Regular",i,r),s=hn(a,t,r,o);return n&&pn(s,r,t),s}(e,s.style,n,r,i,o):"large"===s.type?mn(e,s.size,n,r,i,o):yn(e,t,n,r,i,o)},Rn={sqrtImage:function(e,t){var n,r,i=t.havingBaseSizing(),o=In("\\surd",e*i.sizeMultiplier,kn,i),a=i.sizeMultiplier,s=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),l=0,c=0,u=0;return"small"===o.type?(e<1?a=1:e<1.4&&(a=.7),c=(1+s)/a,(n=Sn("sqrtMain",l=(1+s+En)/a,u=1e3+1e3*s+80,s,t)).style.minWidth="0.853em",r=.833/a):"large"===o.type?(u=1080*xn[o.size],c=(xn[o.size]+s)/a,l=(xn[o.size]+s+En)/a,(n=Sn("sqrtSize"+o.size,l,u,s,t)).style.minWidth="1.02em",r=1/a):(l=e+s+En,c=e+s,u=Math.floor(1e3*e+s)+80,(n=Sn("sqrtTall",l,u,s,t)).style.minWidth="0.742em",r=1.056),n.height=c,n.style.height=G(l),{span:n,advanceWidth:r,ruleWidth:(t.fontMetrics().sqrtRuleThickness+s)*a}},sizedDelim:function(e,t,n,i,o){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),l.contains(wn,e)||l.contains(Cn,e))return mn(e,t,!1,n,i,o);if(l.contains(Tn,e))return yn(e,xn[t],!1,n,i,o);throw new r("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:xn,customSizedDelim:An,leftRightDelim:function(e,t,n,r,i,o){var a=r.fontMetrics().axisHeight*r.sizeMultiplier,s=5/r.fontMetrics().ptPerEm,l=Math.max(t-a,n+a),c=Math.max(l/500*901,2*l-s);return An(e,c,!0,r,i,o)}},Nn={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Mn=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function Pn(e,t){var n=Vt(e);if(n&&l.contains(Mn,n.text))return n;throw new r(n?"Invalid delimiter '"+n.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function Ln(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}at({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:function(e,t){var n=Pn(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:Nn[e.funcName].size,mclass:Nn[e.funcName].mclass,delim:n.text}},htmlBuilder:function(e,t){return"."===e.delim?Xe.makeSpan([e.mclass]):Rn.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass])},mathmlBuilder:function(e){var t=[];"."!==e.delim&&t.push(Dt(e.delim,e.mode));var n=new Ft.MathNode("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var r=G(Rn.sizeToMaxHeight[e.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}}),at({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:function(e,t){var n=e.parser.gullet.macros.get("\\current@color");if(n&&"string"!=typeof n)throw new r("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Pn(t[0],e).text,color:n}}}),at({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:function(e,t){var n=Pn(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var o=Ht(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:i,left:n.text,right:o.delim,rightColor:o.color}},htmlBuilder:function(e,t){Ln(e);for(var n,r,i=gt(e.body,t,!0,["mopen","mclose"]),o=0,a=0,s=!1,l=0;l<i.length;l++)i[l].isMiddle?s=!0:(o=Math.max(i[l].height,o),a=Math.max(i[l].depth,a));if(o*=t.sizeMultiplier,a*=t.sizeMultiplier,n="."===e.left?yt(t,["mopen"]):Rn.leftRightDelim(e.left,o,a,t,e.mode,["mopen"]),i.unshift(n),s)for(var c=1;c<i.length;c++){var u=i[c].isMiddle;u&&(i[c]=Rn.leftRightDelim(u.delim,o,a,u.options,e.mode,[]))}if("."===e.right)r=yt(t,["mclose"]);else{var d=e.rightColor?t.withColor(e.rightColor):t;r=Rn.leftRightDelim(e.right,o,a,d,e.mode,["mclose"])}return i.push(r),Xe.makeSpan(["minner"],i,t)},mathmlBuilder:function(e,t){Ln(e);var n=It(e.body,t);if("."!==e.left){var r=new Ft.MathNode("mo",[Dt(e.left,e.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if("."!==e.right){var i=new Ft.MathNode("mo",[Dt(e.right,e.mode)]);i.setAttribute("fence","true"),e.rightColor&&i.setAttribute("mathcolor",e.rightColor),n.push(i)}return kt(n)}}),at({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:function(e,t){var n=Pn(t[0],e);if(!e.parser.leftrightDepth)throw new r("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:function(e,t){var n;if("."===e.delim)n=yt(t,[]);else{n=Rn.sizedDelim(e.delim,1,t,e.mode,[]);var r={delim:e.delim,options:t};n.isMiddle=r}return n},mathmlBuilder:function(e,t){var n="\\vert"===e.delim||"|"===e.delim?Dt("|","text"):Dt(e.delim,e.mode),r=new Ft.MathNode("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var Bn=function(e,t){var n,r,i,o=Xe.wrapFragment(Et(e.body,t),t),a=e.label.slice(1),s=t.sizeMultiplier,c=0,u=l.isCharacterBox(e.body);if("sout"===a)(n=Xe.makeSpan(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/s,c=-.5*t.fontMetrics().xHeight;else if("phase"===a){var d=j({number:.6,unit:"pt"},t),h=j({number:.35,unit:"ex"},t);s/=t.havingBaseSizing().sizeMultiplier;var p=o.height+o.depth+d+h;o.style.paddingLeft=G(p/2+d);var m=Math.floor(1e3*p*s),g="M400000 "+(r=m)+" H0 L"+r/2+" 0 l65 45 L145 "+(r-80)+" H400000z",f=new X([new Z("phase",g)],{width:"400em",height:G(m/1e3),viewBox:"0 0 400000 "+m,preserveAspectRatio:"xMinYMin slice"});(n=Xe.makeSvgSpan(["hide-tail"],[f],t)).style.height=G(p),c=o.depth+d+h}else{/cancel/.test(a)?u||o.classes.push("cancel-pad"):"angl"===a?o.classes.push("anglpad"):o.classes.push("boxpad");var _=0,b=0,v=0;/box/.test(a)?(v=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),b=_=t.fontMetrics().fboxsep+("colorbox"===a?0:v)):"angl"===a?(_=4*(v=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),b=Math.max(0,.25-o.depth)):b=_=u?.2:0,n=jt(o,a,_,b,t),/fbox|boxed|fcolorbox/.test(a)?(n.style.borderStyle="solid",n.style.borderWidth=G(v)):"angl"===a&&.049!==v&&(n.style.borderTopWidth=G(v),n.style.borderRightWidth=G(v)),c=o.depth+b,e.backgroundColor&&(n.style.backgroundColor=e.backgroundColor,e.borderColor&&(n.style.borderColor=e.borderColor))}if(e.backgroundColor)i=Xe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:c},{type:"elem",elem:o,shift:0}]},t);else{var y=/cancel|phase/.test(a)?["svg-align"]:[];i=Xe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:n,shift:c,wrapperClasses:y}]},t)}return/cancel/.test(a)&&(i.height=o.height,i.depth=o.depth),/cancel/.test(a)&&!u?Xe.makeSpan(["mord","cancel-lap"],[i],t):Xe.makeSpan(["mord"],[i],t)},Un=function(e,t){var n=0,r=new Ft.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Rt(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),"\\fcolorbox"===e.label){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+i+"em solid "+String(e.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};at({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler:function(e,t,n){var r=e.parser,i=e.funcName,o=Ht(t[0],"color-token").color,a=t[1];return{type:"enclose",mode:r.mode,label:i,backgroundColor:o,body:a}},htmlBuilder:Bn,mathmlBuilder:Un}),at({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler:function(e,t,n){var r=e.parser,i=e.funcName,o=Ht(t[0],"color-token").color,a=Ht(t[1],"color-token").color,s=t[2];return{type:"enclose",mode:r.mode,label:i,backgroundColor:a,borderColor:o,body:s}},htmlBuilder:Bn,mathmlBuilder:Un}),at({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler:function(e,t){return{type:"enclose",mode:e.parser.mode,label:"\\fbox",body:t[0]}}}),at({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler:function(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:"enclose",mode:n.mode,label:r,body:i}},htmlBuilder:Bn,mathmlBuilder:Un}),at({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler:function(e,t){return{type:"enclose",mode:e.parser.mode,label:"\\angl",body:t[0]}}});var jn={};function Gn(e){for(var t=e.type,n=e.names,r=e.props,i=e.handler,o=e.htmlBuilder,a=e.mathmlBuilder,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},l=0;l<n.length;++l)jn[n[l]]=s;o&&(it[t]=o),a&&(ot[t]=a)}var zn={};function Hn(e,t){zn[e]=t}var qn=function(){function e(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}return e.range=function(t,n){return n?t&&t.loc&&n.loc&&t.loc.lexer===n.loc.lexer?new e(t.loc.lexer,t.loc.start,n.loc.end):null:t&&t.loc},e}(),Vn=function(){function e(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}return e.prototype.range=function(t,n){return new e(n,qn.range(this,t))},e}();function $n(e){var t=[];e.consumeSpaces();var n=e.fetch().text;for("\\relax"===n&&(e.consume(),e.consumeSpaces(),n=e.fetch().text);"\\hline"===n||"\\hdashline"===n;)e.consume(),t.push("\\hdashline"===n),e.consumeSpaces(),n=e.fetch().text;return t}var Kn=function(e){if(!e.parser.settings.displayMode)throw new r("{"+e.envName+"} can be used only in display mode.")};function Wn(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function Yn(e,t,n){var i=t.hskipBeforeAndAfter,o=t.addJot,a=t.cols,s=t.arraystretch,l=t.colSeparationType,c=t.autoTag,u=t.singleRow,d=t.emptySingleRow,h=t.maxNumCols,p=t.leqno;if(e.gullet.beginGroup(),u||e.gullet.macros.set("\\cr","\\\\\\relax"),!s){var m=e.gullet.expandMacroAsText("\\arraystretch");if(null==m)s=1;else if(!(s=parseFloat(m))||s<0)throw new r("Invalid \\arraystretch: "+m)}e.gullet.beginGroup();var g=[],f=[g],_=[],b=[],v=null!=c?[]:void 0;function y(){c&&e.gullet.macros.set("\\@eqnsw","1",!0)}function E(){v&&(e.gullet.macros.get("\\df@tag")?(v.push(e.subparse([new Vn("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):v.push(Boolean(c)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(y(),b.push($n(e));;){var S=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),S={type:"ordgroup",mode:e.mode,body:S},n&&(S={type:"styling",mode:e.mode,style:n,body:[S]}),g.push(S);var w=e.fetch().text;if("&"===w){if(h&&g.length===h){if(u||l)throw new r("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===w){E(),1===g.length&&"styling"===S.type&&0===S.body[0].body.length&&(f.length>1||!d)&&f.pop(),b.length<f.length+1&&b.push([]);break}if("\\\\"!==w)throw new r("Expected & or \\\\ or \\cr or \\end",e.nextToken);e.consume();var T=void 0;" "!==e.gullet.future().text&&(T=e.parseSizeGroup(!0)),_.push(T?T.value:null),E(),b.push($n(e)),g=[],f.push(g),y()}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:o,arraystretch:s,body:f,cols:a,rowGaps:_,hskipBeforeAndAfter:i,hLinesBeforeRow:b,colSeparationType:l,tags:v,leqno:p}}function Qn(e){return"d"===e.slice(0,1)?"display":"text"}var Xn=function(e,t){var n,i,o=e.body.length,a=e.hLinesBeforeRow,s=0,c=new Array(o),u=[],d=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),h=1/t.fontMetrics().ptPerEm,p=5*h;e.colSeparationType&&"small"===e.colSeparationType&&(p=t.havingStyle(y.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778);var m="CD"===e.colSeparationType?j({number:3,unit:"ex"},t):12*h,g=3*h,f=e.arraystretch*m,_=.7*f,b=.3*f,v=0;function E(e){for(var t=0;t<e.length;++t)t>0&&(v+=.25),u.push({pos:v,isDashed:e[t]})}for(E(a[0]),n=0;n<e.body.length;++n){var S=e.body[n],w=_,T=b;s<S.length&&(s=S.length);var C=new Array(S.length);for(i=0;i<S.length;++i){var x=Et(S[i],t);T<x.depth&&(T=x.depth),w<x.height&&(w=x.height),C[i]=x}var F=e.rowGaps[n],D=0;F&&(D=j(F,t))>0&&(T<(D+=b)&&(T=D),D=0),e.addJot&&(T+=g),C.height=w,C.depth=T,v+=w,C.pos=v,v+=T+D,c[n]=C,E(a[n+1])}var k,O,I=v/2+t.fontMetrics().axisHeight,A=e.cols||[],R=[],N=[];if(e.tags&&e.tags.some((function(e){return e})))for(n=0;n<o;++n){var M=c[n],P=M.pos-I,L=e.tags[n],B=void 0;(B=!0===L?Xe.makeSpan(["eqn-num"],[],t):!1===L?Xe.makeSpan([],[],t):Xe.makeSpan([],gt(L,t,!0),t)).depth=M.depth,B.height=M.height,N.push({type:"elem",elem:B,shift:P})}for(i=0,O=0;i<s||O<A.length;++i,++O){for(var U=A[O]||{},z=!0;"separator"===U.type;){if(z||((k=Xe.makeSpan(["arraycolsep"],[])).style.width=G(t.fontMetrics().doubleRuleSep),R.push(k)),"|"!==U.separator&&":"!==U.separator)throw new r("Invalid separator type: "+U.separator);var H="|"===U.separator?"solid":"dashed",q=Xe.makeSpan(["vertical-separator"],[],t);q.style.height=G(v),q.style.borderRightWidth=G(d),q.style.borderRightStyle=H,q.style.margin="0 "+G(-d/2);var V=v-I;V&&(q.style.verticalAlign=G(-V)),R.push(q),U=A[++O]||{},z=!1}if(!(i>=s)){var $=void 0;(i>0||e.hskipBeforeAndAfter)&&0!==($=l.deflt(U.pregap,p))&&((k=Xe.makeSpan(["arraycolsep"],[])).style.width=G($),R.push(k));var K=[];for(n=0;n<o;++n){var W=c[n],Y=W[i];if(Y){var Q=W.pos-I;Y.depth=W.depth,Y.height=W.height,K.push({type:"elem",elem:Y,shift:Q})}}K=Xe.makeVList({positionType:"individualShift",children:K},t),K=Xe.makeSpan(["col-align-"+(U.align||"c")],[K]),R.push(K),(i<s-1||e.hskipBeforeAndAfter)&&0!==($=l.deflt(U.postgap,p))&&((k=Xe.makeSpan(["arraycolsep"],[])).style.width=G($),R.push(k))}}if(c=Xe.makeSpan(["mtable"],R),u.length>0){for(var X=Xe.makeLineSpan("hline",t,d),Z=Xe.makeLineSpan("hdashline",t,d),J=[{type:"elem",elem:c,shift:0}];u.length>0;){var ee=u.pop(),te=ee.pos-I;ee.isDashed?J.push({type:"elem",elem:Z,shift:te}):J.push({type:"elem",elem:X,shift:te})}c=Xe.makeVList({positionType:"individualShift",children:J},t)}if(0===N.length)return Xe.makeSpan(["mord"],[c],t);var ne=Xe.makeVList({positionType:"individualShift",children:N},t);return ne=Xe.makeSpan(["tag"],[ne],t),Xe.makeFragment([c,ne])},Zn={c:"center ",l:"left ",r:"right "},Jn=function(e,t){for(var n=[],r=new Ft.MathNode("mtd",[],["mtr-glue"]),i=new Ft.MathNode("mtd",[],["mml-eqn-num"]),o=0;o<e.body.length;o++){for(var a=e.body[o],s=[],l=0;l<a.length;l++)s.push(new Ft.MathNode("mtd",[Rt(a[l],t)]));e.tags&&e.tags[o]&&(s.unshift(r),s.push(r),e.leqno?s.unshift(i):s.push(i)),n.push(new Ft.MathNode("mtr",s))}var c=new Ft.MathNode("mtable",n),u=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0);c.setAttribute("rowspacing",G(u));var d="",h="";if(e.cols&&e.cols.length>0){var p=e.cols,m="",g=!1,f=0,_=p.length;"separator"===p[0].type&&(d+="top ",f=1),"separator"===p[p.length-1].type&&(d+="bottom ",_-=1);for(var b=f;b<_;b++)"align"===p[b].type?(h+=Zn[p[b].align],g&&(m+="none "),g=!0):"separator"===p[b].type&&g&&(m+="|"===p[b].separator?"solid ":"dashed ",g=!1);c.setAttribute("columnalign",h.trim()),/[sd]/.test(m)&&c.setAttribute("columnlines",m.trim())}if("align"===e.colSeparationType){for(var v=e.cols||[],y="",E=1;E<v.length;E++)y+=E%2?"0em ":"1em ";c.setAttribute("columnspacing",y.trim())}else"alignat"===e.colSeparationType||"gather"===e.colSeparationType?c.setAttribute("columnspacing","0em"):"small"===e.colSeparationType?c.setAttribute("columnspacing","0.2778em"):"CD"===e.colSeparationType?c.setAttribute("columnspacing","0.5em"):c.setAttribute("columnspacing","1em");var S="",w=e.hLinesBeforeRow;d+=w[0].length>0?"left ":"",d+=w[w.length-1].length>0?"right ":"";for(var T=1;T<w.length-1;T++)S+=0===w[T].length?"none ":w[T][0]?"dashed ":"solid ";return/[sd]/.test(S)&&c.setAttribute("rowlines",S.trim()),""!==d&&(c=new Ft.MathNode("menclose",[c])).setAttribute("notation",d.trim()),e.arraystretch&&e.arraystretch<1&&(c=new Ft.MathNode("mstyle",[c])).setAttribute("scriptlevel","1"),c},er=function(e,t){-1===e.envName.indexOf("ed")&&Kn(e);var n,i=[],o=e.envName.indexOf("at")>-1?"alignat":"align",a="split"===e.envName,s=Yn(e.parser,{cols:i,addJot:!0,autoTag:a?void 0:Wn(e.envName),emptySingleRow:!0,colSeparationType:o,maxNumCols:a?2:void 0,leqno:e.parser.settings.leqno},"display"),l=0,c={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var u="",d=0;d<t[0].body.length;d++)u+=Ht(t[0].body[d],"textord").text;n=Number(u),l=2*n}var h=!l;s.body.forEach((function(e){for(var t=1;t<e.length;t+=2){var i=Ht(e[t],"styling");Ht(i.body[0],"ordgroup").body.unshift(c)}if(h)l<e.length&&(l=e.length);else{var o=e.length/2;if(n<o)throw new r("Too many math in a row: expected "+n+", but got "+o,e[0])}}));for(var p=0;p<l;++p){var m="r",g=0;p%2==1?m="l":p>0&&h&&(g=1),i[p]={type:"align",align:m,pregap:g,postgap:0}}return s.colSeparationType=h?"align":"alignat",s};Gn({type:"array",names:["array","darray"],props:{numArgs:1},handler:function(e,t){var n=(Vt(t[0])?[t[0]]:Ht(t[0],"ordgroup").body).map((function(e){var t=qt(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new r("Unknown column alignment: "+t,e)})),i={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return Yn(e.parser,i,Qn(e.envName))},htmlBuilder:Xn,mathmlBuilder:Jn}),Gn({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler:function(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],n="c",i={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if("*"===e.envName.charAt(e.envName.length-1)){var o=e.parser;if(o.consumeSpaces(),"["===o.fetch().text){if(o.consume(),o.consumeSpaces(),n=o.fetch().text,-1==="lcr".indexOf(n))throw new r("Expected l or c or r",o.nextToken);o.consume(),o.consumeSpaces(),o.expect("]"),o.consume(),i.cols=[{type:"align",align:n}]}}var a=Yn(e.parser,i,Qn(e.envName)),s=Math.max.apply(Math,[0].concat(a.body.map((function(e){return e.length}))));return a.cols=new Array(s).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:Xn,mathmlBuilder:Jn}),Gn({type:"array",names:["smallmatrix"],props:{numArgs:0},handler:function(e){var t=Yn(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:Xn,mathmlBuilder:Jn}),Gn({type:"array",names:["subarray"],props:{numArgs:1},handler:function(e,t){var n=(Vt(t[0])?[t[0]]:Ht(t[0],"ordgroup").body).map((function(e){var t=qt(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new r("Unknown column alignment: "+t,e)}));if(n.length>1)throw new r("{subarray} can contain only one column");var i={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5};if((i=Yn(e.parser,i,"script")).body.length>0&&i.body[0].length>1)throw new r("{subarray} can contain only one column");return i},htmlBuilder:Xn,mathmlBuilder:Jn}),Gn({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler:function(e){var t=Yn(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},Qn(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Xn,mathmlBuilder:Jn}),Gn({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:er,htmlBuilder:Xn,mathmlBuilder:Jn}),Gn({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler:function(e){l.contains(["gather","gather*"],e.envName)&&Kn(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Wn(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Yn(e.parser,t,"display")},htmlBuilder:Xn,mathmlBuilder:Jn}),Gn({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:er,htmlBuilder:Xn,mathmlBuilder:Jn}),Gn({type:"array",names:["equation","equation*"],props:{numArgs:0},handler:function(e){Kn(e);var t={autoTag:Wn(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Yn(e.parser,t,"display")},htmlBuilder:Xn,mathmlBuilder:Jn}),Gn({type:"array",names:["CD"],props:{numArgs:0},handler:function(e){return Kn(e),function(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if("&"!==n&&"\\\\"!==n){if("\\end"===n){0===t[t.length-1].length&&t.pop();break}throw new r("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var i=[],o=[i],a=0;a<t.length;a++){for(var s=t[a],l=tn(),c=0;c<s.length;c++)if(nn(s[c])){i.push(l);var u=qt(s[c+=1]).text,d=new Array(2);if(d[0]={type:"ordgroup",mode:"math",body:[]},d[1]={type:"ordgroup",mode:"math",body:[]},"=|.".indexOf(u)>-1);else{if(!("<>AV".indexOf(u)>-1))throw new r('Expected one of "<>AV=|." after @',s[c]);for(var h=0;h<2;h++){for(var p=!0,m=c+1;m<s.length;m++){if(rn(s[m],u)){p=!1,c=m;break}if(nn(s[m]))throw new r("Missing a "+u+" character to complete a CD arrow.",s[m]);d[h].body.push(s[m])}if(p)throw new r("Missing a "+u+" character to complete a CD arrow.",s[c])}}var g={type:"styling",body:[on(u,d,e)],mode:"math",style:"display"};i.push(g),l=tn()}else l.body.push(s[c]);a%2==0?i.push(l):i.shift(),i=[],o.push(i)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:"math",body:o,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(o[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(o.length+1).fill([])}}(e.parser)},htmlBuilder:Xn,mathmlBuilder:Jn}),Hn("\\nonumber","\\gdef\\@eqnsw{0}"),Hn("\\notag","\\nonumber"),at({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler:function(e,t){throw new r(e.funcName+" valid only within array environment")}});var tr=jn;at({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler:function(e,t){var n=e.parser,i=e.funcName,o=t[0];if("ordgroup"!==o.type)throw new r("Invalid environment name",o);for(var a="",s=0;s<o.body.length;++s)a+=Ht(o.body[s],"textord").text;if("\\begin"===i){if(!tr.hasOwnProperty(a))throw new r("No such environment: "+a,o);var l=tr[a],c=n.parseArguments("\\begin{"+a+"}",l),u=c.args,d=c.optArgs,h={mode:n.mode,envName:a,parser:n},p=l.handler(h,u,d);n.expect("\\end",!1);var m=n.nextToken,g=Ht(n.parseFunction(),"environment");if(g.name!==a)throw new r("Mismatch: \\begin{"+a+"} matched by \\end{"+g.name+"}",m);return p}return{type:"environment",mode:n.mode,name:a,nameGroup:o}}});var nr=function(e,t){var n=e.font,r=t.withFont(n);return Et(e.body,r)},rr=function(e,t){var n=e.font,r=t.withFont(n);return Rt(e.body,r)},ir={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};at({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:function(e,t){var n=e.parser,r=e.funcName,i=lt(t[0]),o=r;return o in ir&&(o=ir[o]),{type:"font",mode:n.mode,font:o.slice(1),body:i}},htmlBuilder:nr,mathmlBuilder:rr}),at({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:function(e,t){var n=e.parser,r=t[0],i=l.isCharacterBox(r);return{type:"mclass",mode:n.mode,mclass:Jt(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:i}}}),at({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:function(e,t){var n=e.parser,r=e.funcName,i=e.breakOnTokenText,o=n.mode,a=n.parseExpression(!0,i);return{type:"font",mode:o,font:"math"+r.slice(1),body:{type:"ordgroup",mode:n.mode,body:a}}},htmlBuilder:nr,mathmlBuilder:rr});var or=function(e,t){var n=t;return"display"===e?n=n.id>=y.SCRIPT.id?n.text():y.DISPLAY:"text"===e&&n.size===y.DISPLAY.size?n=y.TEXT:"script"===e?n=y.SCRIPT:"scriptscript"===e&&(n=y.SCRIPTSCRIPT),n},ar=function(e,t){var n,r=or(e.size,t.style),i=r.fracNum(),o=r.fracDen();n=t.havingStyle(i);var a=Et(e.numer,n,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;a.height=a.height<s?s:a.height,a.depth=a.depth<l?l:a.depth}n=t.havingStyle(o);var c,u,d,h,p,m,g,f,_,b,v=Et(e.denom,n,t);if(e.hasBarLine?(e.barSize?(u=j(e.barSize,t),c=Xe.makeLineSpan("frac-line",t,u)):c=Xe.makeLineSpan("frac-line",t),u=c.height,d=c.height):(c=null,u=0,d=t.fontMetrics().defaultRuleThickness),r.size===y.DISPLAY.size||"display"===e.size?(h=t.fontMetrics().num1,p=u>0?3*d:7*d,m=t.fontMetrics().denom1):(u>0?(h=t.fontMetrics().num2,p=d):(h=t.fontMetrics().num3,p=3*d),m=t.fontMetrics().denom2),c){var E=t.fontMetrics().axisHeight;h-a.depth-(E+.5*u)<p&&(h+=p-(h-a.depth-(E+.5*u))),E-.5*u-(v.height-m)<p&&(m+=p-(E-.5*u-(v.height-m)));var S=-(E-.5*u);g=Xe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:v,shift:m},{type:"elem",elem:c,shift:S},{type:"elem",elem:a,shift:-h}]},t)}else{var w=h-a.depth-(v.height-m);w<p&&(h+=.5*(p-w),m+=.5*(p-w)),g=Xe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:v,shift:m},{type:"elem",elem:a,shift:-h}]},t)}return n=t.havingStyle(r),g.height*=n.sizeMultiplier/t.sizeMultiplier,g.depth*=n.sizeMultiplier/t.sizeMultiplier,f=r.size===y.DISPLAY.size?t.fontMetrics().delim1:r.size===y.SCRIPTSCRIPT.size?t.havingStyle(y.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,_=null==e.leftDelim?yt(t,["mopen"]):Rn.customSizedDelim(e.leftDelim,f,!0,t.havingStyle(r),e.mode,["mopen"]),b=e.continued?Xe.makeSpan([]):null==e.rightDelim?yt(t,["mclose"]):Rn.customSizedDelim(e.rightDelim,f,!0,t.havingStyle(r),e.mode,["mclose"]),Xe.makeSpan(["mord"].concat(n.sizingClasses(t)),[_,Xe.makeSpan(["mfrac"],[g]),b],t)},sr=function(e,t){var n=new Ft.MathNode("mfrac",[Rt(e.numer,t),Rt(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var r=j(e.barSize,t);n.setAttribute("linethickness",G(r))}}else n.setAttribute("linethickness","0px");var i=or(e.size,t.style);if(i.size!==t.style.size){n=new Ft.MathNode("mstyle",[n]);var o=i.size===y.DISPLAY.size?"true":"false";n.setAttribute("displaystyle",o),n.setAttribute("scriptlevel","0")}if(null!=e.leftDelim||null!=e.rightDelim){var a=[];if(null!=e.leftDelim){var s=new Ft.MathNode("mo",[new Ft.TextNode(e.leftDelim.replace("\\",""))]);s.setAttribute("fence","true"),a.push(s)}if(a.push(n),null!=e.rightDelim){var l=new Ft.MathNode("mo",[new Ft.TextNode(e.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),a.push(l)}return kt(a)}return n};at({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:function(e,t){var n,r=e.parser,i=e.funcName,o=t[0],a=t[1],s=null,l=null,c="auto";switch(i){case"\\dfrac":case"\\frac":case"\\tfrac":n=!0;break;case"\\\\atopfrac":n=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":n=!1,s="(",l=")";break;case"\\\\bracefrac":n=!1,s="\\{",l="\\}";break;case"\\\\brackfrac":n=!1,s="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(i){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text"}return{type:"genfrac",mode:r.mode,continued:!1,numer:o,denom:a,hasBarLine:n,leftDelim:s,rightDelim:l,size:c,barSize:null}},htmlBuilder:ar,mathmlBuilder:sr}),at({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:function(e,t){var n=e.parser,r=(e.funcName,t[0]),i=t[1];return{type:"genfrac",mode:n.mode,continued:!0,numer:r,denom:i,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),at({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler:function(e){var t,n=e.parser,r=e.funcName,i=e.token;switch(r){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:n.mode,replaceWith:t,token:i}}});var lr=["display","text","script","scriptscript"],cr=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};at({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler:function(e,t){var n,r=e.parser,i=t[4],o=t[5],a=lt(t[0]),s="atom"===a.type&&"open"===a.family?cr(a.text):null,l=lt(t[1]),c="atom"===l.type&&"close"===l.family?cr(l.text):null,u=Ht(t[2],"size"),d=null;n=!!u.isBlank||(d=u.value).number>0;var h="auto",p=t[3];if("ordgroup"===p.type){if(p.body.length>0){var m=Ht(p.body[0],"textord");h=lr[Number(m.text)]}}else p=Ht(p,"textord"),h=lr[Number(p.text)];return{type:"genfrac",mode:r.mode,numer:i,denom:o,continued:!1,hasBarLine:n,barSize:d,leftDelim:s,rightDelim:c,size:h}},htmlBuilder:ar,mathmlBuilder:sr}),at({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(e,t){var n=e.parser,r=(e.funcName,e.token);return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:Ht(t[0],"size").value,token:r}}}),at({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(e,t){var n=e.parser,r=(e.funcName,t[0]),i=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(Ht(t[1],"infix").size),o=t[2],a=i.number>0;return{type:"genfrac",mode:n.mode,numer:r,denom:o,continued:!1,hasBarLine:a,barSize:i,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:ar,mathmlBuilder:sr});var ur=function(e,t){var n,r,i=t.style;"supsub"===e.type?(n=e.sup?Et(e.sup,t.havingStyle(i.sup()),t):Et(e.sub,t.havingStyle(i.sub()),t),r=Ht(e.base,"horizBrace")):r=Ht(e,"horizBrace");var o,a=Et(r.base,t.havingBaseStyle(y.DISPLAY)),s=zt(r,t);if(r.isOver?(o=Xe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:s}]},t)).children[0].children[0].children[1].classes.push("svg-align"):(o=Xe.makeVList({positionType:"bottom",positionData:a.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a}]},t)).children[0].children[0].children[0].classes.push("svg-align"),n){var l=Xe.makeSpan(["mord",r.isOver?"mover":"munder"],[o],t);o=r.isOver?Xe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]},t):Xe.makeVList({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return Xe.makeSpan(["mord",r.isOver?"mover":"munder"],[o],t)};at({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(e,t){var n=e.parser,r=e.funcName;return{type:"horizBrace",mode:n.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:ur,mathmlBuilder:function(e,t){var n=Gt(e.label);return new Ft.MathNode(e.isOver?"mover":"munder",[Rt(e.base,t),n])}}),at({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(e,t){var n=e.parser,r=t[1],i=Ht(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:n.mode,href:i,body:ct(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:function(e,t){var n=gt(e.body,t,!1);return Xe.makeAnchor(e.href,[],n,t)},mathmlBuilder:function(e,t){var n=At(e.body,t);return n instanceof Ct||(n=new Ct("mrow",[n])),n.setAttribute("href",e.href),n}}),at({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(e,t){var n=e.parser,r=Ht(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var i=[],o=0;o<r.length;o++){var a=r[o];"~"===a&&(a="\\textasciitilde"),i.push({type:"textord",mode:"text",text:a})}var s={type:"text",mode:n.mode,font:"\\texttt",body:i};return{type:"href",mode:n.mode,href:r,body:ct(s)}}}),at({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler:function(e,t){return{type:"hbox",mode:e.parser.mode,body:ct(t[0])}},htmlBuilder:function(e,t){var n=gt(e.body,t,!1);return Xe.makeFragment(n)},mathmlBuilder:function(e,t){return new Ft.MathNode("mrow",It(e.body,t))}}),at({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:function(e,t){var n,i=e.parser,o=e.funcName,a=(e.token,Ht(t[0],"raw").string),s=t[1];i.settings.strict&&i.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l={};switch(o){case"\\htmlClass":l.class=a,n={command:"\\htmlClass",class:a};break;case"\\htmlId":l.id=a,n={command:"\\htmlId",id:a};break;case"\\htmlStyle":l.style=a,n={command:"\\htmlStyle",style:a};break;case"\\htmlData":for(var c=a.split(","),u=0;u<c.length;u++){var d=c[u].split("=");if(2!==d.length)throw new r("Error parsing key-value for \\htmlData");l["data-"+d[0].trim()]=d[1].trim()}n={command:"\\htmlData",attributes:l};break;default:throw new Error("Unrecognized html command")}return i.settings.isTrusted(n)?{type:"html",mode:i.mode,attributes:l,body:ct(s)}:i.formatUnsupportedCmd(o)},htmlBuilder:function(e,t){var n=gt(e.body,t,!1),r=["enclosing"];e.attributes.class&&r.push.apply(r,e.attributes.class.trim().split(/\s+/));var i=Xe.makeSpan(r,n,t);for(var o in e.attributes)"class"!==o&&e.attributes.hasOwnProperty(o)&&i.setAttribute(o,e.attributes[o]);return i},mathmlBuilder:function(e,t){return At(e.body,t)}}),at({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:function(e,t){return{type:"htmlmathml",mode:e.parser.mode,html:ct(t[0]),mathml:ct(t[1])}},htmlBuilder:function(e,t){var n=gt(e.html,t,!1);return Xe.makeFragment(n)},mathmlBuilder:function(e,t){return At(e.mathml,t)}});var dr=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new r("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(t[1]+t[2]),unit:t[3]};if(!U(n))throw new r("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};at({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:function(e,t,n){var i=e.parser,o={number:0,unit:"em"},a={number:.9,unit:"em"},s={number:0,unit:"em"},l="";if(n[0])for(var c=Ht(n[0],"raw").string.split(","),u=0;u<c.length;u++){var d=c[u].split("=");if(2===d.length){var h=d[1].trim();switch(d[0].trim()){case"alt":l=h;break;case"width":o=dr(h);break;case"height":a=dr(h);break;case"totalheight":s=dr(h);break;default:throw new r("Invalid key: '"+d[0]+"' in \\includegraphics.")}}}var p=Ht(t[0],"url").url;return""===l&&(l=(l=(l=p).replace(/^.*[\\/]/,"")).substring(0,l.lastIndexOf("."))),i.settings.isTrusted({command:"\\includegraphics",url:p})?{type:"includegraphics",mode:i.mode,alt:l,width:o,height:a,totalheight:s,src:p}:i.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:function(e,t){var n=j(e.height,t),r=0;e.totalheight.number>0&&(r=j(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=j(e.width,t));var o={height:G(n+r)};i>0&&(o.width=G(i)),r>0&&(o.verticalAlign=G(-r));var a=new W(e.src,e.alt,o);return a.height=n,a.depth=r,a},mathmlBuilder:function(e,t){var n=new Ft.MathNode("mglyph",[]);n.setAttribute("alt",e.alt);var r=j(e.height,t),i=0;if(e.totalheight.number>0&&(i=j(e.totalheight,t)-r,n.setAttribute("valign",G(-i))),n.setAttribute("height",G(r+i)),e.width.number>0){var o=j(e.width,t);n.setAttribute("width",G(o))}return n.setAttribute("src",e.src),n}}),at({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler:function(e,t){var n=e.parser,r=e.funcName,i=Ht(t[0],"size");if(n.settings.strict){var o="m"===r[1],a="mu"===i.value.unit;o?(a||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, not "+i.value.unit+" units"),"math"!==n.mode&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):a&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:i.value}},htmlBuilder:function(e,t){return Xe.makeGlue(e.dimension,t)},mathmlBuilder:function(e,t){var n=j(e.dimension,t);return new Ft.SpaceNode(n)}}),at({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:function(e,t){var n;"clap"===e.alignment?(n=Xe.makeSpan([],[Et(e.body,t)]),n=Xe.makeSpan(["inner"],[n],t)):n=Xe.makeSpan(["inner"],[Et(e.body,t)]);var r=Xe.makeSpan(["fix"],[]),i=Xe.makeSpan([e.alignment],[n,r],t),o=Xe.makeSpan(["strut"]);return o.style.height=G(i.height+i.depth),i.depth&&(o.style.verticalAlign=G(-i.depth)),i.children.unshift(o),i=Xe.makeSpan(["thinbox"],[i],t),Xe.makeSpan(["mord","vbox"],[i],t)},mathmlBuilder:function(e,t){var n=new Ft.MathNode("mpadded",[Rt(e.body,t)]);if("rlap"!==e.alignment){var r="llap"===e.alignment?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}}),at({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(e,t){var n=e.funcName,r=e.parser,i=r.mode;r.switchMode("math");var o="\\("===n?"\\)":"$",a=r.parseExpression(!1,o);return r.expect(o),r.switchMode(i),{type:"styling",mode:r.mode,style:"text",body:a}}}),at({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(e,t){throw new r("Mismatched "+e.funcName)}});var hr=function(e,t){switch(t.style.size){case y.DISPLAY.size:return e.display;case y.TEXT.size:return e.text;case y.SCRIPT.size:return e.script;case y.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};at({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:function(e,t){return{type:"mathchoice",mode:e.parser.mode,display:ct(t[0]),text:ct(t[1]),script:ct(t[2]),scriptscript:ct(t[3])}},htmlBuilder:function(e,t){var n=hr(e,t),r=gt(n,t,!1);return Xe.makeFragment(r)},mathmlBuilder:function(e,t){var n=hr(e,t);return At(n,t)}});var pr=function(e,t,n,r,i,o,a){e=Xe.makeSpan([],[e]);var s,c,u,d=n&&l.isCharacterBox(n);if(t){var h=Et(t,r.havingStyle(i.sup()),r);c={elem:h,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-h.depth)}}if(n){var p=Et(n,r.havingStyle(i.sub()),r);s={elem:p,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-p.height)}}if(c&&s){var m=r.fontMetrics().bigOpSpacing5+s.elem.height+s.elem.depth+s.kern+e.depth+a;u=Xe.makeVList({positionType:"bottom",positionData:m,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:G(-o)},{type:"kern",size:s.kern},{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:G(o)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(s){var g=e.height-a;u=Xe.makeVList({positionType:"top",positionData:g,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:G(-o)},{type:"kern",size:s.kern},{type:"elem",elem:e}]},r)}else{if(!c)return e;var f=e.depth+a;u=Xe.makeVList({positionType:"bottom",positionData:f,children:[{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:G(o)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}var _=[u];if(s&&0!==o&&!d){var b=Xe.makeSpan(["mspace"],[],r);b.style.marginRight=G(o),_.unshift(b)}return Xe.makeSpan(["mop","op-limits"],_,r)},mr=["\\smallint"],gr=function(e,t){var n,r,i,o=!1;"supsub"===e.type?(n=e.sup,r=e.sub,i=Ht(e.base,"op"),o=!0):i=Ht(e,"op");var a,s=t.style,c=!1;if(s.size===y.DISPLAY.size&&i.symbol&&!l.contains(mr,i.name)&&(c=!0),i.symbol){var u=c?"Size2-Regular":"Size1-Regular",d="";if("\\oiint"!==i.name&&"\\oiiint"!==i.name||(d=i.name.slice(1),i.name="oiint"===d?"\\iint":"\\iiint"),a=Xe.makeSymbol(i.name,u,"math",t,["mop","op-symbol",c?"large-op":"small-op"]),d.length>0){var h=a.italic,p=Xe.staticSvg(d+"Size"+(c?"2":"1"),t);a=Xe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:0},{type:"elem",elem:p,shift:c?.08:0}]},t),i.name="\\"+d,a.classes.unshift("mop"),a.italic=h}}else if(i.body){var m=gt(i.body,t,!0);1===m.length&&m[0]instanceof Q?(a=m[0]).classes[0]="mop":a=Xe.makeSpan(["mop"],m,t)}else{for(var g=[],f=1;f<i.name.length;f++)g.push(Xe.mathsym(i.name[f],i.mode,t));a=Xe.makeSpan(["mop"],g,t)}var _=0,b=0;return(a instanceof Q||"\\oiint"===i.name||"\\oiiint"===i.name)&&!i.suppressBaseShift&&(_=(a.height-a.depth)/2-t.fontMetrics().axisHeight,b=a.italic),o?pr(a,n,r,t,s,b,_):(_&&(a.style.position="relative",a.style.top=G(_)),a)},fr=function(e,t){var n;if(e.symbol)n=new Ct("mo",[Dt(e.name,e.mode)]),l.contains(mr,e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new Ct("mo",It(e.body,t));else{n=new Ct("mi",[new xt(e.name.slice(1))]);var r=new Ct("mo",[Dt("","text")]);n=e.parentIsSupSub?new Ct("mrow",[n,r]):Tt([n,r])}return n},_r={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};at({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:function(e,t){var n=e.parser,r=e.funcName;return 1===r.length&&(r=_r[r]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:gr,mathmlBuilder:fr}),at({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:function(e,t){var n=e.parser,r=t[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:ct(r)}},htmlBuilder:gr,mathmlBuilder:fr});var br={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};at({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler:function(e){var t=e.parser,n=e.funcName;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:gr,mathmlBuilder:fr}),at({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler:function(e){var t=e.parser,n=e.funcName;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:gr,mathmlBuilder:fr}),at({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler:function(e){var t=e.parser,n=e.funcName;return 1===n.length&&(n=br[n]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:gr,mathmlBuilder:fr});var vr=function(e,t){var n,r,i,o,a=!1;if("supsub"===e.type?(n=e.sup,r=e.sub,i=Ht(e.base,"operatorname"),a=!0):i=Ht(e,"operatorname"),i.body.length>0){for(var s=i.body.map((function(e){var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e})),l=gt(s,t.withFont("mathrm"),!0),c=0;c<l.length;c++){var u=l[c];u instanceof Q&&(u.text=u.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}o=Xe.makeSpan(["mop"],l,t)}else o=Xe.makeSpan(["mop"],[],t);return a?pr(o,n,r,t,t.style,0,0):o};function yr(e,t,n){for(var r=gt(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,o=0;o<r.length;o++){var a=r[o].classes.indexOf("sizing");a<0?Array.prototype.push.apply(r[o].classes,t.sizingClasses(n)):r[o].classes[a+1]==="reset-size"+t.size&&(r[o].classes[a+1]="reset-size"+n.size),r[o].height*=i,r[o].depth*=i}return Xe.makeFragment(r)}at({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:function(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:"operatorname",mode:n.mode,body:ct(i),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},htmlBuilder:vr,mathmlBuilder:function(e,t){for(var n=It(e.body,t.withFont("mathrm")),r=!0,i=0;i<n.length;i++){var o=n[i];if(o instanceof Ft.SpaceNode);else if(o instanceof Ft.MathNode)switch(o.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":var a=o.children[0];1===o.children.length&&a instanceof Ft.TextNode?a.text=a.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):r=!1;break;default:r=!1}else r=!1}if(r){var s=n.map((function(e){return e.toText()})).join("");n=[new Ft.TextNode(s)]}var l=new Ft.MathNode("mi",n);l.setAttribute("mathvariant","normal");var c=new Ft.MathNode("mo",[Dt("","text")]);return e.parentIsSupSub?new Ft.MathNode("mrow",[l,c]):Ft.newDocumentFragment([l,c])}}),Hn("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),st({type:"ordgroup",htmlBuilder:function(e,t){return e.semisimple?Xe.makeFragment(gt(e.body,t,!1)):Xe.makeSpan(["mord"],gt(e.body,t,!0),t)},mathmlBuilder:function(e,t){return At(e.body,t,!0)}}),at({type:"overline",names:["\\overline"],props:{numArgs:1},handler:function(e,t){var n=e.parser,r=t[0];return{type:"overline",mode:n.mode,body:r}},htmlBuilder:function(e,t){var n=Et(e.body,t.havingCrampedStyle()),r=Xe.makeLineSpan("overline-line",t),i=t.fontMetrics().defaultRuleThickness,o=Xe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r},{type:"kern",size:i}]},t);return Xe.makeSpan(["mord","overline"],[o],t)},mathmlBuilder:function(e,t){var n=new Ft.MathNode("mo",[new Ft.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new Ft.MathNode("mover",[Rt(e.body,t),n]);return r.setAttribute("accent","true"),r}}),at({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){var n=e.parser,r=t[0];return{type:"phantom",mode:n.mode,body:ct(r)}},htmlBuilder:function(e,t){var n=gt(e.body,t.withPhantom(),!1);return Xe.makeFragment(n)},mathmlBuilder:function(e,t){var n=It(e.body,t);return new Ft.MathNode("mphantom",n)}}),at({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){var n=e.parser,r=t[0];return{type:"hphantom",mode:n.mode,body:r}},htmlBuilder:function(e,t){var n=Xe.makeSpan([],[Et(e.body,t.withPhantom())]);if(n.height=0,n.depth=0,n.children)for(var r=0;r<n.children.length;r++)n.children[r].height=0,n.children[r].depth=0;return n=Xe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},t),Xe.makeSpan(["mord"],[n],t)},mathmlBuilder:function(e,t){var n=It(ct(e.body),t),r=new Ft.MathNode("mphantom",n),i=new Ft.MathNode("mpadded",[r]);return i.setAttribute("height","0px"),i.setAttribute("depth","0px"),i}}),at({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){var n=e.parser,r=t[0];return{type:"vphantom",mode:n.mode,body:r}},htmlBuilder:function(e,t){var n=Xe.makeSpan(["inner"],[Et(e.body,t.withPhantom())]),r=Xe.makeSpan(["fix"],[]);return Xe.makeSpan(["mord","rlap"],[n,r],t)},mathmlBuilder:function(e,t){var n=It(ct(e.body),t),r=new Ft.MathNode("mphantom",n),i=new Ft.MathNode("mpadded",[r]);return i.setAttribute("width","0px"),i}}),at({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler:function(e,t){var n=e.parser,r=Ht(t[0],"size").value,i=t[1];return{type:"raisebox",mode:n.mode,dy:r,body:i}},htmlBuilder:function(e,t){var n=Et(e.body,t),r=j(e.dy,t);return Xe.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]},t)},mathmlBuilder:function(e,t){var n=new Ft.MathNode("mpadded",[Rt(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute("voffset",r),n}}),at({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler:function(e){return{type:"internal",mode:e.parser.mode}}}),at({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler:function(e,t,n){var r=e.parser,i=n[0],o=Ht(t[0],"size"),a=Ht(t[1],"size");return{type:"rule",mode:r.mode,shift:i&&Ht(i,"size").value,width:o.value,height:a.value}},htmlBuilder:function(e,t){var n=Xe.makeSpan(["mord","rule"],[],t),r=j(e.width,t),i=j(e.height,t),o=e.shift?j(e.shift,t):0;return n.style.borderRightWidth=G(r),n.style.borderTopWidth=G(i),n.style.bottom=G(o),n.width=r,n.height=i+o,n.depth=-o,n.maxFontSize=1.125*i*t.sizeMultiplier,n},mathmlBuilder:function(e,t){var n=j(e.width,t),r=j(e.height,t),i=e.shift?j(e.shift,t):0,o=t.color&&t.getColor()||"black",a=new Ft.MathNode("mspace");a.setAttribute("mathbackground",o),a.setAttribute("width",G(n)),a.setAttribute("height",G(r));var s=new Ft.MathNode("mpadded",[a]);return i>=0?s.setAttribute("height",G(i)):(s.setAttribute("height",G(i)),s.setAttribute("depth",G(-i))),s.setAttribute("voffset",G(i)),s}});var Er=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];at({type:"sizing",names:Er,props:{numArgs:0,allowedInText:!0},handler:function(e,t){var n=e.breakOnTokenText,r=e.funcName,i=e.parser,o=i.parseExpression(!1,n);return{type:"sizing",mode:i.mode,size:Er.indexOf(r)+1,body:o}},htmlBuilder:function(e,t){var n=t.havingSize(e.size);return yr(e.body,n,t)},mathmlBuilder:function(e,t){var n=t.havingSize(e.size),r=It(e.body,n),i=new Ft.MathNode("mstyle",r);return i.setAttribute("mathsize",G(n.sizeMultiplier)),i}}),at({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:function(e,t,n){var r=e.parser,i=!1,o=!1,a=n[0]&&Ht(n[0],"ordgroup");if(a)for(var s="",l=0;l<a.body.length;++l)if("t"===(s=a.body[l].text))i=!0;else{if("b"!==s){i=!1,o=!1;break}o=!0}else i=!0,o=!0;var c=t[0];return{type:"smash",mode:r.mode,body:c,smashHeight:i,smashDepth:o}},htmlBuilder:function(e,t){var n=Xe.makeSpan([],[Et(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0,n.children))for(var r=0;r<n.children.length;r++)n.children[r].height=0;if(e.smashDepth&&(n.depth=0,n.children))for(var i=0;i<n.children.length;i++)n.children[i].depth=0;var o=Xe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},t);return Xe.makeSpan(["mord"],[o],t)},mathmlBuilder:function(e,t){var n=new Ft.MathNode("mpadded",[Rt(e.body,t)]);return e.smashHeight&&n.setAttribute("height","0px"),e.smashDepth&&n.setAttribute("depth","0px"),n}}),at({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler:function(e,t,n){var r=e.parser,i=n[0],o=t[0];return{type:"sqrt",mode:r.mode,body:o,index:i}},htmlBuilder:function(e,t){var n=Et(e.body,t.havingCrampedStyle());0===n.height&&(n.height=t.fontMetrics().xHeight),n=Xe.wrapFragment(n,t);var r=t.fontMetrics().defaultRuleThickness,i=r;t.style.id<y.TEXT.id&&(i=t.fontMetrics().xHeight);var o=r+i/4,a=n.height+n.depth+o+r,s=Rn.sqrtImage(a,t),l=s.span,c=s.ruleWidth,u=s.advanceWidth,d=l.height-c;d>n.height+n.depth+o&&(o=(o+d-n.height-n.depth)/2);var h=l.height-n.height-o-c;n.style.paddingLeft=G(u);var p=Xe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+h)},{type:"elem",elem:l},{type:"kern",size:c}]},t);if(e.index){var m=t.havingStyle(y.SCRIPTSCRIPT),g=Et(e.index,m,t),f=.6*(p.height-p.depth),_=Xe.makeVList({positionType:"shift",positionData:-f,children:[{type:"elem",elem:g}]},t),b=Xe.makeSpan(["root"],[_]);return Xe.makeSpan(["mord","sqrt"],[b,p],t)}return Xe.makeSpan(["mord","sqrt"],[p],t)},mathmlBuilder:function(e,t){var n=e.body,r=e.index;return r?new Ft.MathNode("mroot",[Rt(n,t),Rt(r,t)]):new Ft.MathNode("msqrt",[Rt(n,t)])}});var Sr={display:y.DISPLAY,text:y.TEXT,script:y.SCRIPT,scriptscript:y.SCRIPTSCRIPT};at({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e,t){var n=e.breakOnTokenText,r=e.funcName,i=e.parser,o=i.parseExpression(!0,n),a=r.slice(1,r.length-5);return{type:"styling",mode:i.mode,style:a,body:o}},htmlBuilder:function(e,t){var n=Sr[e.style],r=t.havingStyle(n).withFont("");return yr(e.body,r,t)},mathmlBuilder:function(e,t){var n=Sr[e.style],r=t.havingStyle(n),i=It(e.body,r),o=new Ft.MathNode("mstyle",i),a={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return o.setAttribute("scriptlevel",a[0]),o.setAttribute("displaystyle",a[1]),o}});var wr=function(e,t){var n=e.base;return n?"op"===n.type?n.limits&&(t.style.size===y.DISPLAY.size||n.alwaysHandleSupSub)?gr:null:"operatorname"===n.type?n.alwaysHandleSupSub&&(t.style.size===y.DISPLAY.size||n.limits)?vr:null:"accent"===n.type?l.isCharacterBox(n.base)?$t:null:"horizBrace"===n.type&&!e.sub===n.isOver?ur:null:null};st({type:"supsub",htmlBuilder:function(e,t){var n=wr(e,t);if(n)return n(e,t);var r,i,o,a=e.base,s=e.sup,c=e.sub,u=Et(a,t),d=t.fontMetrics(),h=0,p=0,m=a&&l.isCharacterBox(a);if(s){var g=t.havingStyle(t.style.sup());r=Et(s,g,t),m||(h=u.height-g.fontMetrics().supDrop*g.sizeMultiplier/t.sizeMultiplier)}if(c){var f=t.havingStyle(t.style.sub());i=Et(c,f,t),m||(p=u.depth+f.fontMetrics().subDrop*f.sizeMultiplier/t.sizeMultiplier)}o=t.style===y.DISPLAY?d.sup1:t.style.cramped?d.sup3:d.sup2;var _,b=t.sizeMultiplier,v=G(.5/d.ptPerEm/b),E=null;if(i){var S=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(u instanceof Q||S)&&(E=G(-u.italic))}if(r&&i){h=Math.max(h,o,r.depth+.25*d.xHeight),p=Math.max(p,d.sub2);var w=4*d.defaultRuleThickness;if(h-r.depth-(i.height-p)<w){p=w-(h-r.depth)+i.height;var T=.8*d.xHeight-(h-r.depth);T>0&&(h+=T,p-=T)}var C=[{type:"elem",elem:i,shift:p,marginRight:v,marginLeft:E},{type:"elem",elem:r,shift:-h,marginRight:v}];_=Xe.makeVList({positionType:"individualShift",children:C},t)}else if(i){p=Math.max(p,d.sub1,i.height-.8*d.xHeight);var x=[{type:"elem",elem:i,marginLeft:E,marginRight:v}];_=Xe.makeVList({positionType:"shift",positionData:p,children:x},t)}else{if(!r)throw new Error("supsub must have either sup or sub.");h=Math.max(h,o,r.depth+.25*d.xHeight),_=Xe.makeVList({positionType:"shift",positionData:-h,children:[{type:"elem",elem:r,marginRight:v}]},t)}var F=vt(u,"right")||"mord";return Xe.makeSpan([F],[u,Xe.makeSpan(["msupsub"],[_])],t)},mathmlBuilder:function(e,t){var n,r=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(r=!0,n=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var i,o=[Rt(e.base,t)];if(e.sub&&o.push(Rt(e.sub,t)),e.sup&&o.push(Rt(e.sup,t)),r)i=n?"mover":"munder";else if(e.sub)if(e.sup){var a=e.base;i=a&&"op"===a.type&&a.limits&&t.style===y.DISPLAY||a&&"operatorname"===a.type&&a.alwaysHandleSupSub&&(t.style===y.DISPLAY||a.limits)?"munderover":"msubsup"}else{var s=e.base;i=s&&"op"===s.type&&s.limits&&(t.style===y.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===y.DISPLAY)?"munder":"msub"}else{var l=e.base;i=l&&"op"===l.type&&l.limits&&(t.style===y.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===y.DISPLAY)?"mover":"msup"}return new Ft.MathNode(i,o)}}),st({type:"atom",htmlBuilder:function(e,t){return Xe.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder:function(e,t){var n=new Ft.MathNode("mo",[Dt(e.text,e.mode)]);if("bin"===e.family){var r=Ot(e,t);"bold-italic"===r&&n.setAttribute("mathvariant",r)}else"punct"===e.family?n.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||n.setAttribute("stretchy","false");return n}});var Tr={mi:"italic",mn:"normal",mtext:"normal"};st({type:"mathord",htmlBuilder:function(e,t){return Xe.makeOrd(e,t,"mathord")},mathmlBuilder:function(e,t){var n=new Ft.MathNode("mi",[Dt(e.text,e.mode,t)]),r=Ot(e,t)||"italic";return r!==Tr[n.type]&&n.setAttribute("mathvariant",r),n}}),st({type:"textord",htmlBuilder:function(e,t){return Xe.makeOrd(e,t,"textord")},mathmlBuilder:function(e,t){var n,r=Dt(e.text,e.mode,t),i=Ot(e,t)||"normal";return n="text"===e.mode?new Ft.MathNode("mtext",[r]):/[0-9]/.test(e.text)?new Ft.MathNode("mn",[r]):"\\prime"===e.text?new Ft.MathNode("mo",[r]):new Ft.MathNode("mi",[r]),i!==Tr[n.type]&&n.setAttribute("mathvariant",i),n}});var Cr={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},xr={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};st({type:"spacing",htmlBuilder:function(e,t){if(xr.hasOwnProperty(e.text)){var n=xr[e.text].className||"";if("text"===e.mode){var i=Xe.makeOrd(e,t,"textord");return i.classes.push(n),i}return Xe.makeSpan(["mspace",n],[Xe.mathsym(e.text,e.mode,t)],t)}if(Cr.hasOwnProperty(e.text))return Xe.makeSpan(["mspace",Cr[e.text]],[],t);throw new r('Unknown type of space "'+e.text+'"')},mathmlBuilder:function(e,t){if(!xr.hasOwnProperty(e.text)){if(Cr.hasOwnProperty(e.text))return new Ft.MathNode("mspace");throw new r('Unknown type of space "'+e.text+'"')}return new Ft.MathNode("mtext",[new Ft.TextNode(" ")])}});var Fr=function(){var e=new Ft.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};st({type:"tag",mathmlBuilder:function(e,t){var n=new Ft.MathNode("mtable",[new Ft.MathNode("mtr",[Fr(),new Ft.MathNode("mtd",[At(e.body,t)]),Fr(),new Ft.MathNode("mtd",[At(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var Dr={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},kr={"\\textbf":"textbf","\\textmd":"textmd"},Or={"\\textit":"textit","\\textup":"textup"},Ir=function(e,t){var n=e.font;return n?Dr[n]?t.withTextFontFamily(Dr[n]):kr[n]?t.withTextFontWeight(kr[n]):t.withTextFontShape(Or[n]):t};at({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler:function(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:"text",mode:n.mode,body:ct(i),font:r}},htmlBuilder:function(e,t){var n=Ir(e,t),r=gt(e.body,n,!0);return Xe.makeSpan(["mord","text"],r,n)},mathmlBuilder:function(e,t){var n=Ir(e,t);return At(e.body,n)}}),at({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){return{type:"underline",mode:e.parser.mode,body:t[0]}},htmlBuilder:function(e,t){var n=Et(e.body,t),r=Xe.makeLineSpan("underline-line",t),i=t.fontMetrics().defaultRuleThickness,o=Xe.makeVList({positionType:"top",positionData:n.height,children:[{type:"kern",size:i},{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n}]},t);return Xe.makeSpan(["mord","underline"],[o],t)},mathmlBuilder:function(e,t){var n=new Ft.MathNode("mo",[new Ft.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new Ft.MathNode("munder",[Rt(e.body,t),n]);return r.setAttribute("accentunder","true"),r}}),at({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler:function(e,t){return{type:"vcenter",mode:e.parser.mode,body:t[0]}},htmlBuilder:function(e,t){var n=Et(e.body,t),r=t.fontMetrics().axisHeight,i=.5*(n.height-r-(n.depth+r));return Xe.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:n}]},t)},mathmlBuilder:function(e,t){return new Ft.MathNode("mpadded",[Rt(e.body,t)],["vcenter"])}}),at({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(e,t,n){throw new r("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(e,t){for(var n=Ar(e),r=[],i=t.havingStyle(t.style.text()),o=0;o<n.length;o++){var a=n[o];"~"===a&&(a="\\textasciitilde"),r.push(Xe.makeSymbol(a,"Typewriter-Regular",e.mode,i,["mord","texttt"]))}return Xe.makeSpan(["mord","text"].concat(i.sizingClasses(t)),Xe.tryCombineChars(r),i)},mathmlBuilder:function(e,t){var n=new Ft.TextNode(Ar(e)),r=new Ft.MathNode("mtext",[n]);return r.setAttribute("mathvariant","monospace"),r}});var Ar=function(e){return e.body.replace(/ /g,e.star?"␣":" ")},Rr=rt,Nr="[ \r\n\t]",Mr="(\\\\[a-zA-Z@]+)"+Nr+"*",Pr="[̀-ͯ]",Lr=new RegExp(Pr+"+$"),Br="("+Nr+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧-豈-]"+Pr+"*|[\ud800-\udbff][\udc00-\udfff]"+Pr+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+Mr+"|\\\\[^\ud800-\udfff])",Ur=function(){function e(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(Br,"g"),this.catcodes={"%":14,"~":13}}var t=e.prototype;return t.setCatcode=function(e,t){this.catcodes[e]=t},t.lex=function(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new Vn("EOF",new qn(this,t,t));var n=this.tokenRegex.exec(e);if(null===n||n.index!==t)throw new r("Unexpected character: '"+e[t]+"'",new Vn(e[t],new qn(this,t,t+1)));var i=n[6]||n[3]||(n[2]?"\\ ":" ");if(14===this.catcodes[i]){var o=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===o?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=o+1,this.lex()}return new Vn(i,new qn(this,t,this.tokenRegex.lastIndex))},e}(),jr=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}var t=e.prototype;return t.beginGroup=function(){this.undefStack.push({})},t.endGroup=function(){if(0===this.undefStack.length)throw new r("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])},t.endGroups=function(){for(;this.undefStack.length>0;)this.endGroup()},t.has=function(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)},t.get=function(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]},t.set=function(e,t,n){if(void 0===n&&(n=!1),n){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(e)&&(i[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t},e}(),Gr=zn;Hn("\\noexpand",(function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),Hn("\\expandafter",(function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),Hn("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),Hn("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),Hn("\\@ifnextchar",(function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return 1===t[0].length&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),Hn("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Hn("\\TextOrMath",(function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));var zr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Hn("\\char",(function(e){var t,n=e.popToken(),i="";if("'"===n.text)t=8,n=e.popToken();else if('"'===n.text)t=16,n=e.popToken();else if("`"===n.text)if("\\"===(n=e.popToken()).text[0])i=n.text.charCodeAt(1);else{if("EOF"===n.text)throw new r("\\char` missing argument");i=n.text.charCodeAt(0)}else t=10;if(t){if(null==(i=zr[n.text])||i>=t)throw new r("Invalid base-"+t+" digit "+n.text);for(var o;null!=(o=zr[e.future().text])&&o<t;)i*=t,i+=o,e.popToken()}return"\\@char{"+i+"}"}));var Hr=function(e,t,n){var i=e.consumeArg().tokens;if(1!==i.length)throw new r("\\newcommand's first argument must be a macro name");var o=i[0].text,a=e.isDefined(o);if(a&&!t)throw new r("\\newcommand{"+o+"} attempting to redefine "+o+"; use \\renewcommand");if(!a&&!n)throw new r("\\renewcommand{"+o+"} when command "+o+" does not yet exist; use \\newcommand");var s=0;if(1===(i=e.consumeArg().tokens).length&&"["===i[0].text){for(var l="",c=e.expandNextToken();"]"!==c.text&&"EOF"!==c.text;)l+=c.text,c=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new r("Invalid number of arguments: "+l);s=parseInt(l),i=e.consumeArg().tokens}return e.macros.set(o,{tokens:i,numArgs:s}),""};Hn("\\newcommand",(function(e){return Hr(e,!1,!0)})),Hn("\\renewcommand",(function(e){return Hr(e,!0,!1)})),Hn("\\providecommand",(function(e){return Hr(e,!0,!0)})),Hn("\\message",(function(e){var t=e.consumeArgs(1)[0];return console.log(t.reverse().map((function(e){return e.text})).join("")),""})),Hn("\\errmessage",(function(e){var t=e.consumeArgs(1)[0];return console.error(t.reverse().map((function(e){return e.text})).join("")),""})),Hn("\\show",(function(e){var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),Rr[n],ie.math[n],ie.text[n]),""})),Hn("\\bgroup","{"),Hn("\\egroup","}"),Hn("~","\\nobreakspace"),Hn("\\lq","`"),Hn("\\rq","'"),Hn("\\aa","\\r a"),Hn("\\AA","\\r A"),Hn("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),Hn("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Hn("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),Hn("ℬ","\\mathscr{B}"),Hn("ℰ","\\mathscr{E}"),Hn("ℱ","\\mathscr{F}"),Hn("ℋ","\\mathscr{H}"),Hn("ℐ","\\mathscr{I}"),Hn("ℒ","\\mathscr{L}"),Hn("ℳ","\\mathscr{M}"),Hn("ℛ","\\mathscr{R}"),Hn("ℭ","\\mathfrak{C}"),Hn("ℌ","\\mathfrak{H}"),Hn("ℨ","\\mathfrak{Z}"),Hn("\\Bbbk","\\Bbb{k}"),Hn("·","\\cdotp"),Hn("\\llap","\\mathllap{\\textrm{#1}}"),Hn("\\rlap","\\mathrlap{\\textrm{#1}}"),Hn("\\clap","\\mathclap{\\textrm{#1}}"),Hn("\\mathstrut","\\vphantom{(}"),Hn("\\underbar","\\underline{\\text{#1}}"),Hn("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),Hn("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),Hn("\\ne","\\neq"),Hn("≠","\\neq"),Hn("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),Hn("∉","\\notin"),Hn("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),Hn("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),Hn("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),Hn("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),Hn("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),Hn("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),Hn("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),Hn("⟂","\\perp"),Hn("‼","\\mathclose{!\\mkern-0.8mu!}"),Hn("∌","\\notni"),Hn("⌜","\\ulcorner"),Hn("⌝","\\urcorner"),Hn("⌞","\\llcorner"),Hn("⌟","\\lrcorner"),Hn("©","\\copyright"),Hn("®","\\textregistered"),Hn("️","\\textregistered"),Hn("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),Hn("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),Hn("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),Hn("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),Hn("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),Hn("⋮","\\vdots"),Hn("\\varGamma","\\mathit{\\Gamma}"),Hn("\\varDelta","\\mathit{\\Delta}"),Hn("\\varTheta","\\mathit{\\Theta}"),Hn("\\varLambda","\\mathit{\\Lambda}"),Hn("\\varXi","\\mathit{\\Xi}"),Hn("\\varPi","\\mathit{\\Pi}"),Hn("\\varSigma","\\mathit{\\Sigma}"),Hn("\\varUpsilon","\\mathit{\\Upsilon}"),Hn("\\varPhi","\\mathit{\\Phi}"),Hn("\\varPsi","\\mathit{\\Psi}"),Hn("\\varOmega","\\mathit{\\Omega}"),Hn("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Hn("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),Hn("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Hn("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Hn("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Hn("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var qr={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};Hn("\\dots",(function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in qr?t=qr[n]:("\\not"===n.slice(0,4)||n in ie.math&&l.contains(["bin","rel"],ie.math[n].group))&&(t="\\dotsb"),t}));var Vr={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Hn("\\dotso",(function(e){return e.future().text in Vr?"\\ldots\\,":"\\ldots"})),Hn("\\dotsc",(function(e){var t=e.future().text;return t in Vr&&","!==t?"\\ldots\\,":"\\ldots"})),Hn("\\cdots",(function(e){return e.future().text in Vr?"\\@cdots\\,":"\\@cdots"})),Hn("\\dotsb","\\cdots"),Hn("\\dotsm","\\cdots"),Hn("\\dotsi","\\!\\cdots"),Hn("\\dotsx","\\ldots\\,"),Hn("\\DOTSI","\\relax"),Hn("\\DOTSB","\\relax"),Hn("\\DOTSX","\\relax"),Hn("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Hn("\\,","\\tmspace+{3mu}{.1667em}"),Hn("\\thinspace","\\,"),Hn("\\>","\\mskip{4mu}"),Hn("\\:","\\tmspace+{4mu}{.2222em}"),Hn("\\medspace","\\:"),Hn("\\;","\\tmspace+{5mu}{.2777em}"),Hn("\\thickspace","\\;"),Hn("\\!","\\tmspace-{3mu}{.1667em}"),Hn("\\negthinspace","\\!"),Hn("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Hn("\\negthickspace","\\tmspace-{5mu}{.277em}"),Hn("\\enspace","\\kern.5em "),Hn("\\enskip","\\hskip.5em\\relax"),Hn("\\quad","\\hskip1em\\relax"),Hn("\\qquad","\\hskip2em\\relax"),Hn("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Hn("\\tag@paren","\\tag@literal{({#1})}"),Hn("\\tag@literal",(function(e){if(e.macros.get("\\df@tag"))throw new r("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),Hn("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Hn("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Hn("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Hn("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Hn("\\newline","\\\\\\relax"),Hn("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var $r=G(F["Main-Regular"]["T".charCodeAt(0)][1]-.7*F["Main-Regular"]["A".charCodeAt(0)][1]);Hn("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+$r+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Hn("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+$r+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Hn("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Hn("\\@hspace","\\hskip #1\\relax"),Hn("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Hn("\\ordinarycolon",":"),Hn("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Hn("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Hn("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Hn("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Hn("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Hn("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Hn("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Hn("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Hn("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Hn("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Hn("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Hn("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Hn("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Hn("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Hn("∷","\\dblcolon"),Hn("∹","\\eqcolon"),Hn("≔","\\coloneqq"),Hn("≕","\\eqqcolon"),Hn("⩴","\\Coloneqq"),Hn("\\ratio","\\vcentcolon"),Hn("\\coloncolon","\\dblcolon"),Hn("\\colonequals","\\coloneqq"),Hn("\\coloncolonequals","\\Coloneqq"),Hn("\\equalscolon","\\eqqcolon"),Hn("\\equalscoloncolon","\\Eqqcolon"),Hn("\\colonminus","\\coloneq"),Hn("\\coloncolonminus","\\Coloneq"),Hn("\\minuscolon","\\eqcolon"),Hn("\\minuscoloncolon","\\Eqcolon"),Hn("\\coloncolonapprox","\\Colonapprox"),Hn("\\coloncolonsim","\\Colonsim"),Hn("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Hn("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Hn("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Hn("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Hn("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),Hn("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Hn("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Hn("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Hn("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Hn("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Hn("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Hn("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Hn("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Hn("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),Hn("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),Hn("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),Hn("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),Hn("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),Hn("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),Hn("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),Hn("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),Hn("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),Hn("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),Hn("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),Hn("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),Hn("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),Hn("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),Hn("\\imath","\\html@mathml{\\@imath}{ı}"),Hn("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),Hn("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),Hn("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),Hn("⟦","\\llbracket"),Hn("⟧","\\rrbracket"),Hn("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),Hn("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),Hn("⦃","\\lBrace"),Hn("⦄","\\rBrace"),Hn("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),Hn("⦵","\\minuso"),Hn("\\darr","\\downarrow"),Hn("\\dArr","\\Downarrow"),Hn("\\Darr","\\Downarrow"),Hn("\\lang","\\langle"),Hn("\\rang","\\rangle"),Hn("\\uarr","\\uparrow"),Hn("\\uArr","\\Uparrow"),Hn("\\Uarr","\\Uparrow"),Hn("\\N","\\mathbb{N}"),Hn("\\R","\\mathbb{R}"),Hn("\\Z","\\mathbb{Z}"),Hn("\\alef","\\aleph"),Hn("\\alefsym","\\aleph"),Hn("\\Alpha","\\mathrm{A}"),Hn("\\Beta","\\mathrm{B}"),Hn("\\bull","\\bullet"),Hn("\\Chi","\\mathrm{X}"),Hn("\\clubs","\\clubsuit"),Hn("\\cnums","\\mathbb{C}"),Hn("\\Complex","\\mathbb{C}"),Hn("\\Dagger","\\ddagger"),Hn("\\diamonds","\\diamondsuit"),Hn("\\empty","\\emptyset"),Hn("\\Epsilon","\\mathrm{E}"),Hn("\\Eta","\\mathrm{H}"),Hn("\\exist","\\exists"),Hn("\\harr","\\leftrightarrow"),Hn("\\hArr","\\Leftrightarrow"),Hn("\\Harr","\\Leftrightarrow"),Hn("\\hearts","\\heartsuit"),Hn("\\image","\\Im"),Hn("\\infin","\\infty"),Hn("\\Iota","\\mathrm{I}"),Hn("\\isin","\\in"),Hn("\\Kappa","\\mathrm{K}"),Hn("\\larr","\\leftarrow"),Hn("\\lArr","\\Leftarrow"),Hn("\\Larr","\\Leftarrow"),Hn("\\lrarr","\\leftrightarrow"),Hn("\\lrArr","\\Leftrightarrow"),Hn("\\Lrarr","\\Leftrightarrow"),Hn("\\Mu","\\mathrm{M}"),Hn("\\natnums","\\mathbb{N}"),Hn("\\Nu","\\mathrm{N}"),Hn("\\Omicron","\\mathrm{O}"),Hn("\\plusmn","\\pm"),Hn("\\rarr","\\rightarrow"),Hn("\\rArr","\\Rightarrow"),Hn("\\Rarr","\\Rightarrow"),Hn("\\real","\\Re"),Hn("\\reals","\\mathbb{R}"),Hn("\\Reals","\\mathbb{R}"),Hn("\\Rho","\\mathrm{P}"),Hn("\\sdot","\\cdot"),Hn("\\sect","\\S"),Hn("\\spades","\\spadesuit"),Hn("\\sub","\\subset"),Hn("\\sube","\\subseteq"),Hn("\\supe","\\supseteq"),Hn("\\Tau","\\mathrm{T}"),Hn("\\thetasym","\\vartheta"),Hn("\\weierp","\\wp"),Hn("\\Zeta","\\mathrm{Z}"),Hn("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Hn("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Hn("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Hn("\\bra","\\mathinner{\\langle{#1}|}"),Hn("\\ket","\\mathinner{|{#1}\\rangle}"),Hn("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Hn("\\Bra","\\left\\langle#1\\right|"),Hn("\\Ket","\\left|#1\\right\\rangle");var Kr=function(e){return function(t){var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,o=t.consumeArg().tokens,a=t.macros.get("|"),s=t.macros.get("\\|");t.macros.beginGroup();var l=function(t){return function(n){e&&(n.macros.set("|",a),i.length&&n.macros.set("\\|",s));var o=t;return!t&&i.length&&"|"===n.future().text&&(n.popToken(),o=!0),{tokens:o?i:r,numArgs:0}}};t.macros.set("|",l(!1)),i.length&&t.macros.set("\\|",l(!0));var c=t.consumeArg().tokens,u=t.expandTokens([].concat(o,c,n));return t.macros.endGroup(),{tokens:u.reverse(),numArgs:0}}};Hn("\\bra@ket",Kr(!1)),Hn("\\bra@set",Kr(!0)),Hn("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),Hn("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),Hn("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),Hn("\\angln","{\\angl n}"),Hn("\\blue","\\textcolor{##6495ed}{#1}"),Hn("\\orange","\\textcolor{##ffa500}{#1}"),Hn("\\pink","\\textcolor{##ff00af}{#1}"),Hn("\\red","\\textcolor{##df0030}{#1}"),Hn("\\green","\\textcolor{##28ae7b}{#1}"),Hn("\\gray","\\textcolor{gray}{#1}"),Hn("\\purple","\\textcolor{##9d38bd}{#1}"),Hn("\\blueA","\\textcolor{##ccfaff}{#1}"),Hn("\\blueB","\\textcolor{##80f6ff}{#1}"),Hn("\\blueC","\\textcolor{##63d9ea}{#1}"),Hn("\\blueD","\\textcolor{##11accd}{#1}"),Hn("\\blueE","\\textcolor{##0c7f99}{#1}"),Hn("\\tealA","\\textcolor{##94fff5}{#1}"),Hn("\\tealB","\\textcolor{##26edd5}{#1}"),Hn("\\tealC","\\textcolor{##01d1c1}{#1}"),Hn("\\tealD","\\textcolor{##01a995}{#1}"),Hn("\\tealE","\\textcolor{##208170}{#1}"),Hn("\\greenA","\\textcolor{##b6ffb0}{#1}"),Hn("\\greenB","\\textcolor{##8af281}{#1}"),Hn("\\greenC","\\textcolor{##74cf70}{#1}"),Hn("\\greenD","\\textcolor{##1fab54}{#1}"),Hn("\\greenE","\\textcolor{##0d923f}{#1}"),Hn("\\goldA","\\textcolor{##ffd0a9}{#1}"),Hn("\\goldB","\\textcolor{##ffbb71}{#1}"),Hn("\\goldC","\\textcolor{##ff9c39}{#1}"),Hn("\\goldD","\\textcolor{##e07d10}{#1}"),Hn("\\goldE","\\textcolor{##a75a05}{#1}"),Hn("\\redA","\\textcolor{##fca9a9}{#1}"),Hn("\\redB","\\textcolor{##ff8482}{#1}"),Hn("\\redC","\\textcolor{##f9685d}{#1}"),Hn("\\redD","\\textcolor{##e84d39}{#1}"),Hn("\\redE","\\textcolor{##bc2612}{#1}"),Hn("\\maroonA","\\textcolor{##ffbde0}{#1}"),Hn("\\maroonB","\\textcolor{##ff92c6}{#1}"),Hn("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Hn("\\maroonD","\\textcolor{##ca337c}{#1}"),Hn("\\maroonE","\\textcolor{##9e034e}{#1}"),Hn("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Hn("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Hn("\\purpleC","\\textcolor{##aa87ff}{#1}"),Hn("\\purpleD","\\textcolor{##7854ab}{#1}"),Hn("\\purpleE","\\textcolor{##543b78}{#1}"),Hn("\\mintA","\\textcolor{##f5f9e8}{#1}"),Hn("\\mintB","\\textcolor{##edf2df}{#1}"),Hn("\\mintC","\\textcolor{##e0e5cc}{#1}"),Hn("\\grayA","\\textcolor{##f6f7f7}{#1}"),Hn("\\grayB","\\textcolor{##f0f1f2}{#1}"),Hn("\\grayC","\\textcolor{##e3e5e6}{#1}"),Hn("\\grayD","\\textcolor{##d6d8da}{#1}"),Hn("\\grayE","\\textcolor{##babec2}{#1}"),Hn("\\grayF","\\textcolor{##888d93}{#1}"),Hn("\\grayG","\\textcolor{##626569}{#1}"),Hn("\\grayH","\\textcolor{##3b3e40}{#1}"),Hn("\\grayI","\\textcolor{##21242c}{#1}"),Hn("\\kaBlue","\\textcolor{##314453}{#1}"),Hn("\\kaGreen","\\textcolor{##71B307}{#1}");var Wr={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},Yr=function(){function e(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new jr(Gr,t.macros),this.mode=n,this.stack=[]}var t=e.prototype;return t.feed=function(e){this.lexer=new Ur(e,this.settings)},t.switchMode=function(e){this.mode=e},t.beginGroup=function(){this.macros.beginGroup()},t.endGroup=function(){this.macros.endGroup()},t.endGroups=function(){this.macros.endGroups()},t.future=function(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]},t.popToken=function(){return this.future(),this.stack.pop()},t.pushToken=function(e){this.stack.push(e)},t.pushTokens=function(e){var t;(t=this.stack).push.apply(t,e)},t.scanArgument=function(e){var t,n,r;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken();var i=this.consumeArg(["]"]);r=i.tokens,n=i.end}else{var o=this.consumeArg();r=o.tokens,t=o.start,n=o.end}return this.pushToken(new Vn("EOF",n.loc)),this.pushTokens(r),t.range(n,"")},t.consumeSpaces=function(){for(;" "===this.future().text;)this.stack.pop()},t.consumeArg=function(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var i,o=this.future(),a=0,s=0;do{if(i=this.popToken(),t.push(i),"{"===i.text)++a;else if("}"===i.text){if(-1==--a)throw new r("Extra }",i)}else if("EOF"===i.text)throw new r("Unexpected end of input in a macro argument, expected '"+(e&&n?e[s]:"}")+"'",i);if(e&&n)if((0===a||1===a&&"{"===e[s])&&i.text===e[s]){if(++s===e.length){t.splice(-s,s);break}}else s=0}while(0!==a||n);return"{"===o.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:o,end:i}},t.consumeArgs=function(e,t){if(t){if(t.length!==e+1)throw new r("The length of delimiters doesn't match the number of args!");for(var n=t[0],i=0;i<n.length;i++){var o=this.popToken();if(n[i]!==o.text)throw new r("Use of the macro doesn't match its definition",o)}}for(var a=[],s=0;s<e;s++)a.push(this.consumeArg(t&&t[s+1]).tokens);return a},t.expandOnce=function(e){var t=this.popToken(),n=t.text,i=t.noexpand?null:this._getExpansion(n);if(null==i||e&&i.unexpandable){if(e&&null==i&&"\\"===n[0]&&!this.isDefined(n))throw new r("Undefined control sequence: "+n);return this.pushToken(t),t}if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new r("Too many expansions: infinite loop or need to increase maxExpand setting");var o=i.tokens,a=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs)for(var s=(o=o.slice()).length-1;s>=0;--s){var l=o[s];if("#"===l.text){if(0===s)throw new r("Incomplete placeholder at end of macro body",l);if("#"===(l=o[--s]).text)o.splice(s+1,1);else{if(!/^[1-9]$/.test(l.text))throw new r("Not a valid argument number",l);var c;(c=o).splice.apply(c,[s,2].concat(a[+l.text-1]))}}}return this.pushTokens(o),o},t.expandAfterFuture=function(){return this.expandOnce(),this.future()},t.expandNextToken=function(){for(;;){var e=this.expandOnce();if(e instanceof Vn)return e.treatAsRelax&&(e.text="\\relax"),this.stack.pop()}throw new Error},t.expandMacro=function(e){return this.macros.has(e)?this.expandTokens([new Vn(e)]):void 0},t.expandTokens=function(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;){var r=this.expandOnce(!0);r instanceof Vn&&(r.treatAsRelax&&(r.noexpand=!1,r.treatAsRelax=!1),t.push(this.stack.pop()))}return t},t.expandMacroAsText=function(e){var t=this.expandMacro(e);return t?t.map((function(e){return e.text})).join(""):t},t._getExpansion=function(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var n=this.lexer.catcodes[e];if(null!=n&&13!==n)return}var r="function"==typeof t?t(this):t;if("string"==typeof r){var i=0;if(-1!==r.indexOf("#"))for(var o=r.replace(/##/g,"");-1!==o.indexOf("#"+(i+1));)++i;for(var a=new Ur(r,this.settings),s=[],l=a.lex();"EOF"!==l.text;)s.push(l),l=a.lex();return s.reverse(),{tokens:s,numArgs:i}}return r},t.isDefined=function(e){return this.macros.has(e)||Rr.hasOwnProperty(e)||ie.math.hasOwnProperty(e)||ie.text.hasOwnProperty(e)||Wr.hasOwnProperty(e)},t.isExpandable=function(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:Rr.hasOwnProperty(e)&&!Rr[e].primitive},e}(),Qr=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Xr=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g","ʰ":"h","ⁱ":"i","ʲ":"j","ᵏ":"k","ˡ":"l","ᵐ":"m","ⁿ":"n","ᵒ":"o","ᵖ":"p","ʳ":"r","ˢ":"s","ᵗ":"t","ᵘ":"u","ᵛ":"v","ʷ":"w","ˣ":"x","ʸ":"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Zr={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},Jr={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"},ei=function(){function e(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Yr(e,t,this.mode),this.settings=t,this.leftrightDepth=0}var t=e.prototype;return t.expect=function(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new r("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()},t.consume=function(){this.nextToken=null},t.fetch=function(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken},t.switchMode=function(e){this.mode=e,this.gullet.switchMode(e)},t.parse=function(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}},t.subparse=function(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new Vn("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,n},t.parseExpression=function(t,n){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var i=this.fetch();if(-1!==e.endOfExpression.indexOf(i.text))break;if(n&&i.text===n)break;if(t&&Rr[i.text]&&Rr[i.text].infix)break;var o=this.parseAtom(n);if(!o)break;"internal"!==o.type&&r.push(o)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)},t.handleInfixNodes=function(e){for(var t,n=-1,i=0;i<e.length;i++)if("infix"===e[i].type){if(-1!==n)throw new r("only one infix operator per group",e[i].token);n=i,t=e[i].replaceWith}if(-1!==n&&t){var o,a,s=e.slice(0,n),l=e.slice(n+1);return o=1===s.length&&"ordgroup"===s[0].type?s[0]:{type:"ordgroup",mode:this.mode,body:s},a=1===l.length&&"ordgroup"===l[0].type?l[0]:{type:"ordgroup",mode:this.mode,body:l},["\\\\abovefrac"===t?this.callFunction(t,[o,e[n],a],[]):this.callFunction(t,[o,a],[])]}return e},t.handleSupSubscript=function(e){var t=this.fetch(),n=t.text;this.consume(),this.consumeSpaces();var i=this.parseGroup(e);if(!i)throw new r("Expected group after '"+n+"'",t);return i},t.formatUnsupportedCmd=function(e){for(var t=[],n=0;n<e.length;n++)t.push({type:"textord",mode:"text",text:e[n]});var r={type:"text",mode:this.mode,body:t};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[r]}},t.parseAtom=function(t){var n,i,o=this.parseGroup("atom",t);if("text"===this.mode)return o;for(;;){this.consumeSpaces();var a=this.fetch();if("\\limits"===a.text||"\\nolimits"===a.text){if(o&&"op"===o.type){var s="\\limits"===a.text;o.limits=s,o.alwaysHandleSupSub=!0}else{if(!o||"operatorname"!==o.type)throw new r("Limit controls must follow a math operator",a);o.alwaysHandleSupSub&&(o.limits="\\limits"===a.text)}this.consume()}else if("^"===a.text){if(n)throw new r("Double superscript",a);n=this.handleSupSubscript("superscript")}else if("_"===a.text){if(i)throw new r("Double subscript",a);i=this.handleSupSubscript("subscript")}else if("'"===a.text){if(n)throw new r("Double superscript",a);var l={type:"textord",mode:this.mode,text:"\\prime"},c=[l];for(this.consume();"'"===this.fetch().text;)c.push(l),this.consume();"^"===this.fetch().text&&c.push(this.handleSupSubscript("superscript")),n={type:"ordgroup",mode:this.mode,body:c}}else{if(!Xr[a.text])break;var u=Xr[a.text],d=Qr.test(a.text);for(this.consume();;){var h=this.fetch().text;if(!Xr[h])break;if(Qr.test(h)!==d)break;this.consume(),u+=Xr[h]}var p=new e(u,this.settings).parse();d?i={type:"ordgroup",mode:"math",body:p}:n={type:"ordgroup",mode:"math",body:p}}}return n||i?{type:"supsub",mode:this.mode,base:o,sup:n,sub:i}:o},t.parseFunction=function(e,t){var n=this.fetch(),i=n.text,o=Rr[i];if(!o)return null;if(this.consume(),t&&"atom"!==t&&!o.allowedInArgument)throw new r("Got function '"+i+"' with no arguments"+(t?" as "+t:""),n);if("text"===this.mode&&!o.allowedInText)throw new r("Can't use function '"+i+"' in text mode",n);if("math"===this.mode&&!1===o.allowedInMath)throw new r("Can't use function '"+i+"' in math mode",n);var a=this.parseArguments(i,o),s=a.args,l=a.optArgs;return this.callFunction(i,s,l,n,e)},t.callFunction=function(e,t,n,i,o){var a={funcName:e,parser:this,token:i,breakOnTokenText:o},s=Rr[e];if(s&&s.handler)return s.handler(a,t,n);throw new r("No function handler for "+e)},t.parseArguments=function(e,t){var n=t.numArgs+t.numOptionalArgs;if(0===n)return{args:[],optArgs:[]};for(var i=[],o=[],a=0;a<n;a++){var s=t.argTypes&&t.argTypes[a],l=a<t.numOptionalArgs;(t.primitive&&null==s||"sqrt"===t.type&&1===a&&null==o[0])&&(s="primitive");var c=this.parseGroupOfType("argument to '"+e+"'",s,l);if(l)o.push(c);else{if(null==c)throw new r("Null argument, please report this as a bug");i.push(c)}}return{args:i,optArgs:o}},t.parseGroupOfType=function(e,t,n){switch(t){case"color":return this.parseColorGroup(n);case"size":return this.parseSizeGroup(n);case"url":return this.parseUrlGroup(n);case"math":case"text":return this.parseArgumentGroup(n,t);case"hbox":var i=this.parseArgumentGroup(n,"text");return null!=i?{type:"styling",mode:i.mode,body:[i],style:"text"}:null;case"raw":var o=this.parseStringGroup("raw",n);return null!=o?{type:"raw",mode:"text",string:o.text}:null;case"primitive":if(n)throw new r("A primitive argument cannot be optional");var a=this.parseGroup(e);if(null==a)throw new r("Expected group as "+e,this.fetch());return a;case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new r("Unknown group type as "+e,this.fetch())}},t.consumeSpaces=function(){for(;" "===this.fetch().text;)this.consume()},t.parseStringGroup=function(e,t){var n=this.gullet.scanArgument(t);if(null==n)return null;for(var r,i="";"EOF"!==(r=this.fetch()).text;)i+=r.text,this.consume();return this.consume(),n.text=i,n},t.parseRegexGroup=function(e,t){for(var n,i=this.fetch(),o=i,a="";"EOF"!==(n=this.fetch()).text&&e.test(a+n.text);)a+=(o=n).text,this.consume();if(""===a)throw new r("Invalid "+t+": '"+i.text+"'",i);return i.range(o,a)},t.parseColorGroup=function(e){var t=this.parseStringGroup("color",e);if(null==t)return null;var n=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new r("Invalid color: '"+t.text+"'",t);var i=n[0];return/^[0-9a-f]{6}$/i.test(i)&&(i="#"+i),{type:"color-token",mode:this.mode,color:i}},t.parseSizeGroup=function(e){var t,n=!1;if(this.gullet.consumeSpaces(),!(t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;e||0!==t.text.length||(t.text="0pt",n=!0);var i=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!i)throw new r("Invalid size: '"+t.text+"'",t);var o={number:+(i[1]+i[2]),unit:i[3]};if(!U(o))throw new r("Invalid unit: '"+o.unit+"'",t);return{type:"size",mode:this.mode,value:o,isBlank:n}},t.parseUrlGroup=function(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==t)return null;var n=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:n}},t.parseArgumentGroup=function(e,t){var n=this.gullet.scanArgument(e);if(null==n)return null;var r=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var i=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var o={type:"ordgroup",mode:this.mode,loc:n.loc,body:i};return t&&this.switchMode(r),o},t.parseGroup=function(e,t){var n,i=this.fetch(),o=i.text;if("{"===o||"\\begingroup"===o){this.consume();var a="{"===o?"}":"\\endgroup";this.gullet.beginGroup();var s=this.parseExpression(!1,a),l=this.fetch();this.expect(a),this.gullet.endGroup(),n={type:"ordgroup",mode:this.mode,loc:qn.range(i,l),body:s,semisimple:"\\begingroup"===o||void 0}}else if(null==(n=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===o[0]&&!Wr.hasOwnProperty(o)){if(this.settings.throwOnError)throw new r("Undefined control sequence: "+o,i);n=this.formatUnsupportedCmd(o),this.consume()}return n},t.formLigatures=function(e){for(var t=e.length-1,n=0;n<t;++n){var r=e[n],i=r.text;"-"===i&&"-"===e[n+1].text&&(n+1<t&&"-"===e[n+2].text?(e.splice(n,3,{type:"textord",mode:"text",loc:qn.range(r,e[n+2]),text:"---"}),t-=2):(e.splice(n,2,{type:"textord",mode:"text",loc:qn.range(r,e[n+1]),text:"--"}),t-=1)),"'"!==i&&"`"!==i||e[n+1].text!==i||(e.splice(n,2,{type:"textord",mode:"text",loc:qn.range(r,e[n+1]),text:i+i}),t-=1)}},t.parseSymbol=function(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var n=t.slice(5),i="*"===n.charAt(0);if(i&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new r("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:n=n.slice(1,-1),star:i}}Jr.hasOwnProperty(t[0])&&!ie[this.mode][t[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=Jr[t[0]]+t.slice(1));var o,a=Lr.exec(t);if(a&&("i"===(t=t.substring(0,a.index))?t="ı":"j"===t&&(t="ȷ")),ie[this.mode][t]){this.settings.strict&&"math"===this.mode&&Pe.indexOf(t)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var s,l=ie[this.mode][t].group,c=qn.range(e);if(te.hasOwnProperty(l)){var u=l;s={type:"atom",mode:this.mode,family:u,loc:c,text:t}}else s={type:l,mode:this.mode,loc:c,text:t};o=s}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(w(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),o={type:"textord",mode:"text",loc:qn.range(e),text:t}}if(this.consume(),a)for(var d=0;d<a[0].length;d++){var h=a[0][d];if(!Zr[h])throw new r("Unknown accent ' "+h+"'",e);var p=Zr[h][this.mode]||Zr[h].text;if(!p)throw new r("Accent "+h+" unsupported in "+this.mode+" mode",e);o={type:"accent",mode:this.mode,loc:qn.range(e),label:p,isStretchy:!1,isShifty:!0,base:o}}return o},e}();ei.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var ti=function(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new ei(e,t);delete n.gullet.macros.current["\\df@tag"];var i=n.parse();if(delete n.gullet.macros.current["\\current@color"],delete n.gullet.macros.current["\\color"],n.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new r("\\tag works only in display equations");i=[{type:"tag",mode:"text",body:i,tag:n.subparse([new Vn("\\df@tag")])}]}return i},ni=function(e,t,n){t.textContent="";var r=ii(e,n).toNode();t.appendChild(r)};"undefined"!=typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!=typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),ni=function(){throw new r("KaTeX doesn't work in quirks mode.")});var ri=function(e,t,n){if(n.throwOnError||!(e instanceof r))throw e;var i=Xe.makeSpan(["katex-error"],[new Q(t)]);return i.setAttribute("title",e.toString()),i.setAttribute("style","color:"+n.errorColor),i},ii=function(e,t){var n=new d(t);try{return function(e,t,n){var r,i=Mt(n);if("mathml"===n.output)return Nt(e,t,i,n.displayMode,!0);if("html"===n.output){var o=wt(e,i);r=Xe.makeSpan(["katex"],[o])}else{var a=Nt(e,t,i,n.displayMode,!1),s=wt(e,i);r=Xe.makeSpan(["katex"],[a,s])}return Pt(r,n)}(ti(e,n),e,n)}catch(t){return ri(t,e,n)}},oi={version:"0.16.4",render:ni,renderToString:function(e,t){return ii(e,t).toMarkup()},ParseError:r,SETTINGS_SCHEMA:c,__parse:function(e,t){var n=new d(t);return ti(e,n)},__renderToDomTree:ii,__renderToHTMLTree:function(e,t){var n=new d(t);try{return function(e,t,n){var r=wt(e,Mt(n)),i=Xe.makeSpan(["katex"],[r]);return Pt(i,n)}(ti(e,n),0,n)}catch(t){return ri(t,e,n)}},__setFontMetrics:function(e,t){F[e]=t},__defineSymbol:oe,__defineMacro:Hn,__domTree:{Span:$,Anchor:K,SymbolNode:Q,SvgNode:X,PathNode:Z,LineNode:J}};return t=t.default}()},e.exports=r()},function(e,t,n){"use strict";var r=n(120),i=n(369);function o(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var a=o(r);function s(e,t,n){if(void 0===n&&(n=0),0===a.Children.count(e.props.children))return e;var r=[];a.Children.forEach(e.props.children,(function(e){"string"==typeof e?r.push.apply(r,function(e,t,n){for(var r=i.tokenize(e),o=[],s=0;s<r.length;s++){var l=r[s],c="__linkify-el-"+n+"-"+s;if("nl"===l.t&&t.get("nl2br"))o.push(a.createElement("br",{key:c}));else if(l.isLink&&t.check(l)){var u=t.render(l);if(!("key"in u.props)){var d=i.options.assign({key:c},u.props);u=a.cloneElement(u,d)}o.push(u)}else o.push(l.toString())}return o}(e,t,n)):a.isValidElement(e)?"string"==typeof e.type&&t.ignoreTags.indexOf(e.type.toUpperCase())>=0?r.push(e):r.push(s(e,t,n+1)):r.push(e)}));var o=i.options.assign({key:"__linkify-el-"+n},e.props);return a.cloneElement(e,o,r)}e.exports=function(e){var t=0,n={key:"__linkify-wrapper"};for(var r in e)"options"!==r&&"as"!==r&&"tagName"!==r&&"children"!==r&&(n[r]=e[r]);var o=new i.Options(e.options,(function(e){var n=e.tagName,r=e.attributes,i=e.content;return r.key="__linkify-lnk-"+ ++t,r.class&&(r.className=r.class,delete r.class),a.createElement(n,r,i)})),l=e.as||e.tagName||a.Fragment||"span",c=e.children;return s(a.createElement(l,n,c),o,0)}},function(e){e.exports=JSON.parse('[{"hexcode":"1F1E6","label":"regional indicator A","unicode":"🇦"},{"hexcode":"1F1E7","label":"regional indicator B","unicode":"🇧"},{"hexcode":"1F1E8","label":"regional indicator C","unicode":"🇨"},{"hexcode":"1F1E9","label":"regional indicator D","unicode":"🇩"},{"hexcode":"1F1EA","label":"regional indicator E","unicode":"🇪"},{"hexcode":"1F1EB","label":"regional indicator F","unicode":"🇫"},{"hexcode":"1F1EC","label":"regional indicator G","unicode":"🇬"},{"hexcode":"1F1ED","label":"regional indicator H","unicode":"🇭"},{"hexcode":"1F1EE","label":"regional indicator I","unicode":"🇮"},{"hexcode":"1F1EF","label":"regional indicator J","unicode":"🇯"},{"hexcode":"1F1F0","label":"regional indicator K","unicode":"🇰"},{"hexcode":"1F1F1","label":"regional indicator L","unicode":"🇱"},{"hexcode":"1F1F2","label":"regional indicator M","unicode":"🇲"},{"hexcode":"1F1F3","label":"regional indicator N","unicode":"🇳"},{"hexcode":"1F1F4","label":"regional indicator O","unicode":"🇴"},{"hexcode":"1F1F5","label":"regional indicator P","unicode":"🇵"},{"hexcode":"1F1F6","label":"regional indicator Q","unicode":"🇶"},{"hexcode":"1F1F7","label":"regional indicator R","unicode":"🇷"},{"hexcode":"1F1F8","label":"regional indicator S","unicode":"🇸"},{"hexcode":"1F1F9","label":"regional indicator T","unicode":"🇹"},{"hexcode":"1F1FA","label":"regional indicator U","unicode":"🇺"},{"hexcode":"1F1FB","label":"regional indicator V","unicode":"🇻"},{"hexcode":"1F1FC","label":"regional indicator W","unicode":"🇼"},{"hexcode":"1F1FD","label":"regional indicator X","unicode":"🇽"},{"hexcode":"1F1FE","label":"regional indicator Y","unicode":"🇾"},{"hexcode":"1F1FF","label":"regional indicator Z","unicode":"🇿"},{"group":0,"hexcode":"1F600","label":"grinning face","order":1,"tags":["face","grin"],"unicode":"😀"},{"group":0,"hexcode":"1F603","label":"grinning face with big eyes","order":2,"tags":["face","mouth","open","smile"],"unicode":"😃"},{"group":0,"hexcode":"1F604","label":"grinning face with smiling eyes","order":3,"tags":["eye","face","mouth","open","smile"],"unicode":"😄","emoticon":":D"},{"group":0,"hexcode":"1F601","label":"beaming face with smiling eyes","order":4,"tags":["eye","face","grin","smile"],"unicode":"😁"},{"group":0,"hexcode":"1F606","label":"grinning squinting face","order":5,"tags":["face","laugh","mouth","satisfied","smile"],"unicode":"😆","emoticon":["xD","XD"]},{"group":0,"hexcode":"1F605","label":"grinning face with sweat","order":6,"tags":["cold","face","open","smile","sweat"],"unicode":"😅"},{"group":0,"hexcode":"1F923","label":"rolling on the floor laughing","order":7,"tags":["face","floor","laugh","rofl","rolling","rotfl"],"unicode":"🤣","emoticon":":\'D"},{"group":0,"hexcode":"1F602","label":"face with tears of joy","order":8,"tags":["face","joy","laugh","tear"],"unicode":"😂","emoticon":":\')"},{"group":0,"hexcode":"1F642","label":"slightly smiling face","order":9,"tags":["face","smile"],"unicode":"🙂","emoticon":":)"},{"group":0,"hexcode":"1F643","label":"upside-down face","order":10,"tags":["face","upside-down"],"unicode":"🙃"},{"group":0,"hexcode":"1FAE0","label":"melting face","order":11,"tags":["disappear","dissolve","liquid","melt"],"unicode":"🫠"},{"group":0,"hexcode":"1F609","label":"winking face","order":12,"tags":["face","wink"],"unicode":"😉","emoticon":";)"},{"group":0,"hexcode":"1F60A","label":"smiling face with smiling eyes","order":13,"tags":["blush","eye","face","smile"],"unicode":"😊","emoticon":":>"},{"group":0,"hexcode":"1F607","label":"smiling face with halo","order":14,"tags":["angel","face","fantasy","halo","innocent"],"unicode":"😇","emoticon":["o:)","O:)"]},{"group":0,"hexcode":"1F970","label":"smiling face with hearts","order":15,"tags":["adore","crush","hearts","in love"],"unicode":"🥰"},{"group":0,"hexcode":"1F60D","label":"smiling face with heart-eyes","order":16,"tags":["eye","face","love","smile"],"unicode":"😍"},{"group":0,"hexcode":"1F929","label":"star-struck","order":17,"tags":["eyes","face","grinning","star"],"unicode":"🤩"},{"group":0,"hexcode":"1F618","label":"face blowing a kiss","order":18,"tags":["face","kiss"],"unicode":"😘","emoticon":[":x",":X"]},{"group":0,"hexcode":"1F617","label":"kissing face","order":19,"tags":["face","kiss"],"unicode":"😗"},{"group":0,"hexcode":"263A","label":"smiling face","order":21,"tags":["face","outlined","relaxed","smile"],"unicode":"☺️"},{"group":0,"hexcode":"1F61A","label":"kissing face with closed eyes","order":22,"tags":["closed","eye","face","kiss"],"unicode":"😚","emoticon":":*"},{"group":0,"hexcode":"1F619","label":"kissing face with smiling eyes","order":23,"tags":["eye","face","kiss","smile"],"unicode":"😙"},{"group":0,"hexcode":"1F972","label":"smiling face with tear","order":24,"tags":["grateful","proud","relieved","smiling","tear","touched"],"unicode":"🥲"},{"group":0,"hexcode":"1F60B","label":"face savoring food","order":25,"tags":["delicious","face","savouring","smile","yum"],"unicode":"😋"},{"group":0,"hexcode":"1F61B","label":"face with tongue","order":26,"tags":["face","tongue"],"unicode":"😛","emoticon":[":p",":P"]},{"group":0,"hexcode":"1F61C","label":"winking face with tongue","order":27,"tags":["eye","face","joke","tongue","wink"],"unicode":"😜","emoticon":[";p",";P"]},{"group":0,"hexcode":"1F92A","label":"zany face","order":28,"tags":["eye","goofy","large","small"],"unicode":"🤪"},{"group":0,"hexcode":"1F61D","label":"squinting face with tongue","order":29,"tags":["eye","face","horrible","taste","tongue"],"unicode":"😝","emoticon":["xp","xP","XP"]},{"group":0,"hexcode":"1F911","label":"money-mouth face","order":30,"tags":["face","money","mouth"],"unicode":"🤑"},{"group":0,"hexcode":"1F917","label":"smiling face with open hands","order":31,"tags":["face","hug","hugging","open hands","smiling face"],"unicode":"🤗"},{"group":0,"hexcode":"1F92D","label":"face with hand over mouth","order":32,"tags":["whoops"],"unicode":"🤭"},{"group":0,"hexcode":"1FAE2","label":"face with open eyes and hand over mouth","order":33,"tags":["amazement","awe","disbelief","embarrass","scared","surprise"],"unicode":"🫢"},{"group":0,"hexcode":"1FAE3","label":"face with peeking eye","order":34,"tags":["captivated","peep","stare"],"unicode":"🫣"},{"group":0,"hexcode":"1F92B","label":"shushing face","order":35,"tags":["quiet","shush"],"unicode":"🤫"},{"group":0,"hexcode":"1F914","label":"thinking face","order":36,"tags":["face","thinking"],"unicode":"🤔","emoticon":[":l",":L"]},{"group":0,"hexcode":"1FAE1","label":"saluting face","order":37,"tags":["ok","salute","sunny","troops","yes"],"unicode":"🫡"},{"group":0,"hexcode":"1F910","label":"zipper-mouth face","order":38,"tags":["face","mouth","zipper"],"unicode":"🤐","emoticon":[":z",":Z"]},{"group":0,"hexcode":"1F928","label":"face with raised eyebrow","order":39,"tags":["distrust","skeptic"],"unicode":"🤨"},{"group":0,"hexcode":"1F610","label":"neutral face","order":40,"tags":["deadpan","face","meh","neutral"],"unicode":"😐️","emoticon":":|"},{"group":0,"hexcode":"1F611","label":"expressionless face","order":41,"tags":["expressionless","face","inexpressive","meh","unexpressive"],"unicode":"😑"},{"group":0,"hexcode":"1F636","label":"face without mouth","order":42,"tags":["face","mouth","quiet","silent"],"unicode":"😶","emoticon":":#"},{"group":0,"hexcode":"1FAE5","label":"dotted line face","order":43,"tags":["depressed","disappear","hide","introvert","invisible"],"unicode":"🫥"},{"group":0,"hexcode":"1F636-200D-1F32B-FE0F","label":"face in clouds","order":44,"tags":["absentminded","face in the fog","head in clouds"],"unicode":"😶🌫️"},{"group":0,"hexcode":"1F60F","label":"smirking face","order":46,"tags":["face","smirk"],"unicode":"😏","emoticon":":j"},{"group":0,"hexcode":"1F612","label":"unamused face","order":47,"tags":["face","unamused","unhappy"],"unicode":"😒","emoticon":":?"},{"group":0,"hexcode":"1F644","label":"face with rolling eyes","order":48,"tags":["eyeroll","eyes","face","rolling"],"unicode":"🙄"},{"group":0,"hexcode":"1F62C","label":"grimacing face","order":49,"tags":["face","grimace"],"unicode":"😬","emoticon":"8D"},{"group":0,"hexcode":"1F62E-200D-1F4A8","label":"face exhaling","order":50,"tags":["exhale","gasp","groan","relief","whisper","whistle"],"unicode":"😮💨"},{"group":0,"hexcode":"1F925","label":"lying face","order":51,"tags":["face","lie","pinocchio"],"unicode":"🤥"},{"group":0,"hexcode":"1F60C","label":"relieved face","order":52,"tags":["face","relieved"],"unicode":"😌"},{"group":0,"hexcode":"1F614","label":"pensive face","order":53,"tags":["dejected","face","pensive"],"unicode":"😔"},{"group":0,"hexcode":"1F62A","label":"sleepy face","order":54,"tags":["face","good night","sleep"],"unicode":"😪"},{"group":0,"hexcode":"1F924","label":"drooling face","order":55,"tags":["drooling","face"],"unicode":"🤤"},{"group":0,"hexcode":"1F634","label":"sleeping face","order":56,"tags":["face","good night","sleep","zzz"],"unicode":"😴"},{"group":0,"hexcode":"1F637","label":"face with medical mask","order":57,"tags":["cold","doctor","face","mask","sick"],"unicode":"😷"},{"group":0,"hexcode":"1F912","label":"face with thermometer","order":58,"tags":["face","ill","sick","thermometer"],"unicode":"🤒"},{"group":0,"hexcode":"1F915","label":"face with head-bandage","order":59,"tags":["bandage","face","hurt","injury"],"unicode":"🤕"},{"group":0,"hexcode":"1F922","label":"nauseated face","order":60,"tags":["face","nauseated","vomit"],"unicode":"🤢","emoticon":"%("},{"group":0,"hexcode":"1F92E","label":"face vomiting","order":61,"tags":["puke","sick","vomit"],"unicode":"🤮"},{"group":0,"hexcode":"1F927","label":"sneezing face","order":62,"tags":["face","gesundheit","sneeze"],"unicode":"🤧"},{"group":0,"hexcode":"1F975","label":"hot face","order":63,"tags":["feverish","heat stroke","hot","red-faced","sweating"],"unicode":"🥵"},{"group":0,"hexcode":"1F976","label":"cold face","order":64,"tags":["blue-faced","cold","freezing","frostbite","icicles"],"unicode":"🥶"},{"group":0,"hexcode":"1F974","label":"woozy face","order":65,"tags":["dizzy","intoxicated","tipsy","uneven eyes","wavy mouth"],"unicode":"🥴","emoticon":":&"},{"group":0,"hexcode":"1F635","label":"face with crossed-out eyes","order":66,"tags":["crossed-out eyes","dead","face","knocked out"],"unicode":"😵","emoticon":["xo","XO"]},{"group":0,"hexcode":"1F635-200D-1F4AB","label":"face with spiral eyes","order":67,"tags":["dizzy","hypnotized","spiral","trouble","whoa"],"unicode":"😵💫"},{"group":0,"hexcode":"1F92F","label":"exploding head","order":68,"tags":["mind blown","shocked"],"unicode":"🤯"},{"group":0,"hexcode":"1F920","label":"cowboy hat face","order":69,"tags":["cowboy","cowgirl","face","hat"],"unicode":"🤠"},{"group":0,"hexcode":"1F973","label":"partying face","order":70,"tags":["celebration","hat","horn","party"],"unicode":"🥳"},{"group":0,"hexcode":"1F978","label":"disguised face","order":71,"tags":["disguise","face","glasses","incognito","nose"],"unicode":"🥸"},{"group":0,"hexcode":"1F60E","label":"smiling face with sunglasses","order":72,"tags":["bright","cool","face","sun","sunglasses"],"unicode":"😎","emoticon":"8)"},{"group":0,"hexcode":"1F913","label":"nerd face","order":73,"tags":["face","geek","nerd"],"unicode":"🤓","emoticon":":B"},{"group":0,"hexcode":"1F9D0","label":"face with monocle","order":74,"tags":["face","monocle","stuffy"],"unicode":"🧐"},{"group":0,"hexcode":"1F615","label":"confused face","order":75,"tags":["confused","face","meh"],"unicode":"😕","emoticon":":/"},{"group":0,"hexcode":"1FAE4","label":"face with diagonal mouth","order":76,"tags":["disappointed","meh","skeptical","unsure"],"unicode":"🫤"},{"group":0,"hexcode":"1F61F","label":"worried face","order":77,"tags":["face","worried"],"unicode":"😟"},{"group":0,"hexcode":"1F641","label":"slightly frowning face","order":78,"tags":["face","frown"],"unicode":"🙁"},{"group":0,"hexcode":"2639","label":"frowning face","order":80,"tags":["face","frown"],"unicode":"☹️","emoticon":":("},{"group":0,"hexcode":"1F62E","label":"face with open mouth","order":81,"tags":["face","mouth","open","sympathy"],"unicode":"😮"},{"group":0,"hexcode":"1F62F","label":"hushed face","order":82,"tags":["face","hushed","stunned","surprised"],"unicode":"😯"},{"group":0,"hexcode":"1F632","label":"astonished face","order":83,"tags":["astonished","face","shocked","totally"],"unicode":"😲","emoticon":[":o",":O"]},{"group":0,"hexcode":"1F633","label":"flushed face","order":84,"tags":["dazed","face","flushed"],"unicode":"😳","emoticon":":$"},{"group":0,"hexcode":"1F97A","label":"pleading face","order":85,"tags":["begging","mercy","puppy eyes"],"unicode":"🥺"},{"group":0,"hexcode":"1F979","label":"face holding back tears","order":86,"tags":["angry","cry","proud","resist","sad"],"unicode":"🥹"},{"group":0,"hexcode":"1F626","label":"frowning face with open mouth","order":87,"tags":["face","frown","mouth","open"],"unicode":"😦"},{"group":0,"hexcode":"1F627","label":"anguished face","order":88,"tags":["anguished","face"],"unicode":"😧","emoticon":[":s",":S"]},{"group":0,"hexcode":"1F628","label":"fearful face","order":89,"tags":["face","fear","fearful","scared"],"unicode":"😨"},{"group":0,"hexcode":"1F630","label":"anxious face with sweat","order":90,"tags":["blue","cold","face","rushed","sweat"],"unicode":"😰"},{"group":0,"hexcode":"1F625","label":"sad but relieved face","order":91,"tags":["disappointed","face","relieved","whew"],"unicode":"😥"},{"group":0,"hexcode":"1F622","label":"crying face","order":92,"tags":["cry","face","sad","tear"],"unicode":"😢","emoticon":":\'("},{"group":0,"hexcode":"1F62D","label":"loudly crying face","order":93,"tags":["cry","face","sad","sob","tear"],"unicode":"😭","emoticon":":\'o"},{"group":0,"hexcode":"1F631","label":"face screaming in fear","order":94,"tags":["face","fear","munch","scared","scream"],"unicode":"😱","emoticon":"Dx"},{"group":0,"hexcode":"1F616","label":"confounded face","order":95,"tags":["confounded","face"],"unicode":"😖","emoticon":["x(","X("]},{"group":0,"hexcode":"1F623","label":"persevering face","order":96,"tags":["face","persevere"],"unicode":"😣"},{"group":0,"hexcode":"1F61E","label":"disappointed face","order":97,"tags":["disappointed","face"],"unicode":"😞"},{"group":0,"hexcode":"1F613","label":"downcast face with sweat","order":98,"tags":["cold","face","sweat"],"unicode":"😓","emoticon":":<"},{"group":0,"hexcode":"1F629","label":"weary face","order":99,"tags":["face","tired","weary"],"unicode":"😩","emoticon":"D:"},{"group":0,"hexcode":"1F62B","label":"tired face","order":100,"tags":["face","tired"],"unicode":"😫","emoticon":[":c",":C"]},{"group":0,"hexcode":"1F971","label":"yawning face","order":101,"tags":["bored","tired","yawn"],"unicode":"🥱"},{"group":0,"hexcode":"1F624","label":"face with steam from nose","order":102,"tags":["face","triumph","won"],"unicode":"😤"},{"group":0,"hexcode":"1F621","label":"enraged face","order":103,"tags":["angry","enraged","face","mad","pouting","rage","red"],"unicode":"😡","emoticon":">:/"},{"group":0,"hexcode":"1F620","label":"angry face","order":104,"tags":["anger","angry","face","mad"],"unicode":"😠"},{"group":0,"hexcode":"1F92C","label":"face with symbols on mouth","order":105,"tags":["swearing"],"unicode":"🤬","emoticon":":@"},{"group":0,"hexcode":"1F608","label":"smiling face with horns","order":106,"tags":["face","fairy tale","fantasy","horns","smile"],"unicode":"😈","emoticon":">:)"},{"group":0,"hexcode":"1F47F","label":"angry face with horns","order":107,"tags":["demon","devil","face","fantasy","imp"],"unicode":"👿","emoticon":">:("},{"group":0,"hexcode":"1F480","label":"skull","order":108,"tags":["death","face","fairy tale","monster"],"unicode":"💀"},{"group":0,"hexcode":"2620","label":"skull and crossbones","order":110,"tags":["crossbones","death","face","monster","skull"],"unicode":"☠️"},{"group":0,"hexcode":"1F4A9","label":"pile of poo","order":111,"tags":["dung","face","monster","poo","poop"],"unicode":"💩"},{"group":0,"hexcode":"1F921","label":"clown face","order":112,"tags":["clown","face"],"unicode":"🤡"},{"group":0,"hexcode":"1F479","label":"ogre","order":113,"tags":["creature","face","fairy tale","fantasy","monster"],"unicode":"👹","emoticon":">0)"},{"group":0,"hexcode":"1F47A","label":"goblin","order":114,"tags":["creature","face","fairy tale","fantasy","monster"],"unicode":"👺"},{"group":0,"hexcode":"1F47B","label":"ghost","order":115,"tags":["creature","face","fairy tale","fantasy","monster"],"unicode":"👻"},{"group":0,"hexcode":"1F47D","label":"alien","order":116,"tags":["creature","extraterrestrial","face","fantasy","ufo"],"unicode":"👽️"},{"group":0,"hexcode":"1F47E","label":"alien monster","order":117,"tags":["alien","creature","extraterrestrial","face","monster","ufo"],"unicode":"👾"},{"group":0,"hexcode":"1F916","label":"robot","order":118,"tags":["face","monster"],"unicode":"🤖"},{"group":0,"hexcode":"1F63A","label":"grinning cat","order":119,"tags":["cat","face","grinning","mouth","open","smile"],"unicode":"😺"},{"group":0,"hexcode":"1F638","label":"grinning cat with smiling eyes","order":120,"tags":["cat","eye","face","grin","smile"],"unicode":"😸"},{"group":0,"hexcode":"1F639","label":"cat with tears of joy","order":121,"tags":["cat","face","joy","tear"],"unicode":"😹"},{"group":0,"hexcode":"1F63B","label":"smiling cat with heart-eyes","order":122,"tags":["cat","eye","face","heart","love","smile"],"unicode":"😻"},{"group":0,"hexcode":"1F63C","label":"cat with wry smile","order":123,"tags":["cat","face","ironic","smile","wry"],"unicode":"😼"},{"group":0,"hexcode":"1F63D","label":"kissing cat","order":124,"tags":["cat","eye","face","kiss"],"unicode":"😽","emoticon":":3"},{"group":0,"hexcode":"1F640","label":"weary cat","order":125,"tags":["cat","face","oh","surprised","weary"],"unicode":"🙀"},{"group":0,"hexcode":"1F63F","label":"crying cat","order":126,"tags":["cat","cry","face","sad","tear"],"unicode":"😿"},{"group":0,"hexcode":"1F63E","label":"pouting cat","order":127,"tags":["cat","face","pouting"],"unicode":"😾"},{"group":0,"hexcode":"1F648","label":"see-no-evil monkey","order":128,"tags":["evil","face","forbidden","monkey","see"],"unicode":"🙈"},{"group":0,"hexcode":"1F649","label":"hear-no-evil monkey","order":129,"tags":["evil","face","forbidden","hear","monkey"],"unicode":"🙉"},{"group":0,"hexcode":"1F64A","label":"speak-no-evil monkey","order":130,"tags":["evil","face","forbidden","monkey","speak"],"unicode":"🙊"},{"group":0,"hexcode":"1F48B","label":"kiss mark","order":131,"tags":["kiss","lips"],"unicode":"💋"},{"group":0,"hexcode":"1F48C","label":"love letter","order":132,"tags":["heart","letter","love","mail"],"unicode":"💌"},{"group":0,"hexcode":"1F498","label":"heart with arrow","order":133,"tags":["arrow","cupid"],"unicode":"💘"},{"group":0,"hexcode":"1F49D","label":"heart with ribbon","order":134,"tags":["ribbon","valentine"],"unicode":"💝"},{"group":0,"hexcode":"1F496","label":"sparkling heart","order":135,"tags":["excited","sparkle"],"unicode":"💖"},{"group":0,"hexcode":"1F497","label":"growing heart","order":136,"tags":["excited","growing","nervous","pulse"],"unicode":"💗"},{"group":0,"hexcode":"1F493","label":"beating heart","order":137,"tags":["beating","heartbeat","pulsating"],"unicode":"💓"},{"group":0,"hexcode":"1F49E","label":"revolving hearts","order":138,"tags":["revolving"],"unicode":"💞"},{"group":0,"hexcode":"1F495","label":"two hearts","order":139,"tags":["love"],"unicode":"💕"},{"group":0,"hexcode":"1F49F","label":"heart decoration","order":140,"tags":["heart"],"unicode":"💟"},{"group":0,"hexcode":"2763","label":"heart exclamation","order":142,"tags":["exclamation","mark","punctuation"],"unicode":"❣️"},{"group":0,"hexcode":"1F494","label":"broken heart","order":143,"tags":["break","broken"],"unicode":"💔","emoticon":"</3"},{"group":0,"hexcode":"2764-FE0F-200D-1F525","label":"heart on fire","order":144,"tags":["burn","heart","love","lust","sacred heart"],"unicode":"❤️🔥"},{"group":0,"hexcode":"2764-FE0F-200D-1FA79","label":"mending heart","order":146,"tags":["healthier","improving","mending","recovering","recuperating","well"],"unicode":"❤️🩹"},{"group":0,"hexcode":"2764","label":"red heart","order":149,"tags":["heart"],"unicode":"❤️","emoticon":"<3"},{"group":0,"hexcode":"1F9E1","label":"orange heart","order":150,"tags":["orange"],"unicode":"🧡"},{"group":0,"hexcode":"1F49B","label":"yellow heart","order":151,"tags":["yellow"],"unicode":"💛"},{"group":0,"hexcode":"1F49A","label":"green heart","order":152,"tags":["green"],"unicode":"💚"},{"group":0,"hexcode":"1F499","label":"blue heart","order":153,"tags":["blue"],"unicode":"💙"},{"group":0,"hexcode":"1F49C","label":"purple heart","order":154,"tags":["purple"],"unicode":"💜"},{"group":0,"hexcode":"1F90E","label":"brown heart","order":155,"tags":["brown","heart"],"unicode":"🤎"},{"group":0,"hexcode":"1F5A4","label":"black heart","order":156,"tags":["black","evil","wicked"],"unicode":"🖤"},{"group":0,"hexcode":"1F90D","label":"white heart","order":157,"tags":["heart","white"],"unicode":"🤍"},{"group":0,"hexcode":"1F4AF","label":"hundred points","order":158,"tags":["100","full","hundred","score"],"unicode":"💯"},{"group":0,"hexcode":"1F4A2","label":"anger symbol","order":159,"tags":["angry","comic","mad"],"unicode":"💢"},{"group":0,"hexcode":"1F4A5","label":"collision","order":160,"tags":["boom","comic"],"unicode":"💥"},{"group":0,"hexcode":"1F4AB","label":"dizzy","order":161,"tags":["comic","star"],"unicode":"💫"},{"group":0,"hexcode":"1F4A6","label":"sweat droplets","order":162,"tags":["comic","splashing","sweat"],"unicode":"💦"},{"group":0,"hexcode":"1F4A8","label":"dashing away","order":163,"tags":["comic","dash","running"],"unicode":"💨"},{"group":0,"hexcode":"1F573","label":"hole","order":165,"tags":["hole"],"unicode":"🕳️"},{"group":0,"hexcode":"1F4A3","label":"bomb","order":166,"tags":["comic"],"unicode":"💣️"},{"group":0,"hexcode":"1F4AC","label":"speech balloon","order":167,"tags":["balloon","bubble","comic","dialog","speech"],"unicode":"💬"},{"group":0,"hexcode":"1F441-FE0F-200D-1F5E8-FE0F","label":"eye in speech bubble","order":168,"tags":["balloon","bubble","eye","speech","witness"],"unicode":"👁️🗨️"},{"group":0,"hexcode":"1F5E8","label":"left speech bubble","order":173,"tags":["balloon","bubble","dialog","speech"],"unicode":"🗨️"},{"group":0,"hexcode":"1F5EF","label":"right anger bubble","order":175,"tags":["angry","balloon","bubble","mad"],"unicode":"🗯️"},{"group":0,"hexcode":"1F4AD","label":"thought balloon","order":176,"tags":["balloon","bubble","comic","thought"],"unicode":"💭"},{"group":0,"hexcode":"1F4A4","label":"ZZZ","order":177,"tags":["comic","good night","sleep","zzz"],"unicode":"💤"},{"group":1,"hexcode":"1F44B","label":"waving hand","order":178,"tags":["hand","wave","waving"],"unicode":"👋","skins":[{"group":1,"hexcode":"1F44B-1F3FB","label":"waving hand: light skin tone","order":179,"unicode":"👋🏻"},{"group":1,"hexcode":"1F44B-1F3FC","label":"waving hand: medium-light skin tone","order":180,"unicode":"👋🏼"},{"group":1,"hexcode":"1F44B-1F3FD","label":"waving hand: medium skin tone","order":181,"unicode":"👋🏽"},{"group":1,"hexcode":"1F44B-1F3FE","label":"waving hand: medium-dark skin tone","order":182,"unicode":"👋🏾"},{"group":1,"hexcode":"1F44B-1F3FF","label":"waving hand: dark skin tone","order":183,"unicode":"👋🏿"}]},{"group":1,"hexcode":"1F91A","label":"raised back of hand","order":184,"tags":["backhand","raised"],"unicode":"🤚","skins":[{"group":1,"hexcode":"1F91A-1F3FB","label":"raised back of hand: light skin tone","order":185,"unicode":"🤚🏻"},{"group":1,"hexcode":"1F91A-1F3FC","label":"raised back of hand: medium-light skin tone","order":186,"unicode":"🤚🏼"},{"group":1,"hexcode":"1F91A-1F3FD","label":"raised back of hand: medium skin tone","order":187,"unicode":"🤚🏽"},{"group":1,"hexcode":"1F91A-1F3FE","label":"raised back of hand: medium-dark skin tone","order":188,"unicode":"🤚🏾"},{"group":1,"hexcode":"1F91A-1F3FF","label":"raised back of hand: dark skin tone","order":189,"unicode":"🤚🏿"}]},{"group":1,"hexcode":"1F590","label":"hand with fingers splayed","order":191,"tags":["finger","hand","splayed"],"unicode":"🖐️","skins":[{"group":1,"hexcode":"1F590-1F3FB","label":"hand with fingers splayed: light skin tone","order":192,"unicode":"🖐🏻"},{"group":1,"hexcode":"1F590-1F3FC","label":"hand with fingers splayed: medium-light skin tone","order":193,"unicode":"🖐🏼"},{"group":1,"hexcode":"1F590-1F3FD","label":"hand with fingers splayed: medium skin tone","order":194,"unicode":"🖐🏽"},{"group":1,"hexcode":"1F590-1F3FE","label":"hand with fingers splayed: medium-dark skin tone","order":195,"unicode":"🖐🏾"},{"group":1,"hexcode":"1F590-1F3FF","label":"hand with fingers splayed: dark skin tone","order":196,"unicode":"🖐🏿"}]},{"group":1,"hexcode":"270B","label":"raised hand","order":197,"tags":["hand","high 5","high five"],"unicode":"✋","skins":[{"group":1,"hexcode":"270B-1F3FB","label":"raised hand: light skin tone","order":198,"unicode":"✋🏻"},{"group":1,"hexcode":"270B-1F3FC","label":"raised hand: medium-light skin tone","order":199,"unicode":"✋🏼"},{"group":1,"hexcode":"270B-1F3FD","label":"raised hand: medium skin tone","order":200,"unicode":"✋🏽"},{"group":1,"hexcode":"270B-1F3FE","label":"raised hand: medium-dark skin tone","order":201,"unicode":"✋🏾"},{"group":1,"hexcode":"270B-1F3FF","label":"raised hand: dark skin tone","order":202,"unicode":"✋🏿"}]},{"group":1,"hexcode":"1F596","label":"vulcan salute","order":203,"tags":["finger","hand","spock","vulcan"],"unicode":"🖖","skins":[{"group":1,"hexcode":"1F596-1F3FB","label":"vulcan salute: light skin tone","order":204,"unicode":"🖖🏻"},{"group":1,"hexcode":"1F596-1F3FC","label":"vulcan salute: medium-light skin tone","order":205,"unicode":"🖖🏼"},{"group":1,"hexcode":"1F596-1F3FD","label":"vulcan salute: medium skin tone","order":206,"unicode":"🖖🏽"},{"group":1,"hexcode":"1F596-1F3FE","label":"vulcan salute: medium-dark skin tone","order":207,"unicode":"🖖🏾"},{"group":1,"hexcode":"1F596-1F3FF","label":"vulcan salute: dark skin tone","order":208,"unicode":"🖖🏿"}]},{"group":1,"hexcode":"1FAF1","label":"rightwards hand","order":209,"tags":["hand","right","rightward"],"unicode":"🫱","skins":[{"group":1,"hexcode":"1FAF1-1F3FB","label":"rightwards hand: light skin tone","order":210,"unicode":"🫱🏻"},{"group":1,"hexcode":"1FAF1-1F3FC","label":"rightwards hand: medium-light skin tone","order":211,"unicode":"🫱🏼"},{"group":1,"hexcode":"1FAF1-1F3FD","label":"rightwards hand: medium skin tone","order":212,"unicode":"🫱🏽"},{"group":1,"hexcode":"1FAF1-1F3FE","label":"rightwards hand: medium-dark skin tone","order":213,"unicode":"🫱🏾"},{"group":1,"hexcode":"1FAF1-1F3FF","label":"rightwards hand: dark skin tone","order":214,"unicode":"🫱🏿"}]},{"group":1,"hexcode":"1FAF2","label":"leftwards hand","order":215,"tags":["hand","left","leftward"],"unicode":"🫲","skins":[{"group":1,"hexcode":"1FAF2-1F3FB","label":"leftwards hand: light skin tone","order":216,"unicode":"🫲🏻"},{"group":1,"hexcode":"1FAF2-1F3FC","label":"leftwards hand: medium-light skin tone","order":217,"unicode":"🫲🏼"},{"group":1,"hexcode":"1FAF2-1F3FD","label":"leftwards hand: medium skin tone","order":218,"unicode":"🫲🏽"},{"group":1,"hexcode":"1FAF2-1F3FE","label":"leftwards hand: medium-dark skin tone","order":219,"unicode":"🫲🏾"},{"group":1,"hexcode":"1FAF2-1F3FF","label":"leftwards hand: dark skin tone","order":220,"unicode":"🫲🏿"}]},{"group":1,"hexcode":"1FAF3","label":"palm down hand","order":221,"tags":["dismiss","drop","shoo"],"unicode":"🫳","skins":[{"group":1,"hexcode":"1FAF3-1F3FB","label":"palm down hand: light skin tone","order":222,"unicode":"🫳🏻"},{"group":1,"hexcode":"1FAF3-1F3FC","label":"palm down hand: medium-light skin tone","order":223,"unicode":"🫳🏼"},{"group":1,"hexcode":"1FAF3-1F3FD","label":"palm down hand: medium skin tone","order":224,"unicode":"🫳🏽"},{"group":1,"hexcode":"1FAF3-1F3FE","label":"palm down hand: medium-dark skin tone","order":225,"unicode":"🫳🏾"},{"group":1,"hexcode":"1FAF3-1F3FF","label":"palm down hand: dark skin tone","order":226,"unicode":"🫳🏿"}]},{"group":1,"hexcode":"1FAF4","label":"palm up hand","order":227,"tags":["beckon","catch","come","offer"],"unicode":"🫴","skins":[{"group":1,"hexcode":"1FAF4-1F3FB","label":"palm up hand: light skin tone","order":228,"unicode":"🫴🏻"},{"group":1,"hexcode":"1FAF4-1F3FC","label":"palm up hand: medium-light skin tone","order":229,"unicode":"🫴🏼"},{"group":1,"hexcode":"1FAF4-1F3FD","label":"palm up hand: medium skin tone","order":230,"unicode":"🫴🏽"},{"group":1,"hexcode":"1FAF4-1F3FE","label":"palm up hand: medium-dark skin tone","order":231,"unicode":"🫴🏾"},{"group":1,"hexcode":"1FAF4-1F3FF","label":"palm up hand: dark skin tone","order":232,"unicode":"🫴🏿"}]},{"group":1,"hexcode":"1F44C","label":"OK hand","order":233,"tags":["hand","ok"],"unicode":"👌","skins":[{"group":1,"hexcode":"1F44C-1F3FB","label":"OK hand: light skin tone","order":234,"unicode":"👌🏻"},{"group":1,"hexcode":"1F44C-1F3FC","label":"OK hand: medium-light skin tone","order":235,"unicode":"👌🏼"},{"group":1,"hexcode":"1F44C-1F3FD","label":"OK hand: medium skin tone","order":236,"unicode":"👌🏽"},{"group":1,"hexcode":"1F44C-1F3FE","label":"OK hand: medium-dark skin tone","order":237,"unicode":"👌🏾"},{"group":1,"hexcode":"1F44C-1F3FF","label":"OK hand: dark skin tone","order":238,"unicode":"👌🏿"}]},{"group":1,"hexcode":"1F90C","label":"pinched fingers","order":239,"tags":["fingers","hand gesture","interrogation","pinched","sarcastic"],"unicode":"🤌","skins":[{"group":1,"hexcode":"1F90C-1F3FB","label":"pinched fingers: light skin tone","order":240,"unicode":"🤌🏻"},{"group":1,"hexcode":"1F90C-1F3FC","label":"pinched fingers: medium-light skin tone","order":241,"unicode":"🤌🏼"},{"group":1,"hexcode":"1F90C-1F3FD","label":"pinched fingers: medium skin tone","order":242,"unicode":"🤌🏽"},{"group":1,"hexcode":"1F90C-1F3FE","label":"pinched fingers: medium-dark skin tone","order":243,"unicode":"🤌🏾"},{"group":1,"hexcode":"1F90C-1F3FF","label":"pinched fingers: dark skin tone","order":244,"unicode":"🤌🏿"}]},{"group":1,"hexcode":"1F90F","label":"pinching hand","order":245,"tags":["small amount"],"unicode":"🤏","skins":[{"group":1,"hexcode":"1F90F-1F3FB","label":"pinching hand: light skin tone","order":246,"unicode":"🤏🏻"},{"group":1,"hexcode":"1F90F-1F3FC","label":"pinching hand: medium-light skin tone","order":247,"unicode":"🤏🏼"},{"group":1,"hexcode":"1F90F-1F3FD","label":"pinching hand: medium skin tone","order":248,"unicode":"🤏🏽"},{"group":1,"hexcode":"1F90F-1F3FE","label":"pinching hand: medium-dark skin tone","order":249,"unicode":"🤏🏾"},{"group":1,"hexcode":"1F90F-1F3FF","label":"pinching hand: dark skin tone","order":250,"unicode":"🤏🏿"}]},{"group":1,"hexcode":"270C","label":"victory hand","order":252,"tags":["hand","v","victory"],"unicode":"✌️","skins":[{"group":1,"hexcode":"270C-1F3FB","label":"victory hand: light skin tone","order":253,"unicode":"✌🏻"},{"group":1,"hexcode":"270C-1F3FC","label":"victory hand: medium-light skin tone","order":254,"unicode":"✌🏼"},{"group":1,"hexcode":"270C-1F3FD","label":"victory hand: medium skin tone","order":255,"unicode":"✌🏽"},{"group":1,"hexcode":"270C-1F3FE","label":"victory hand: medium-dark skin tone","order":256,"unicode":"✌🏾"},{"group":1,"hexcode":"270C-1F3FF","label":"victory hand: dark skin tone","order":257,"unicode":"✌🏿"}]},{"group":1,"hexcode":"1F91E","label":"crossed fingers","order":258,"tags":["cross","finger","hand","luck"],"unicode":"🤞","skins":[{"group":1,"hexcode":"1F91E-1F3FB","label":"crossed fingers: light skin tone","order":259,"unicode":"🤞🏻"},{"group":1,"hexcode":"1F91E-1F3FC","label":"crossed fingers: medium-light skin tone","order":260,"unicode":"🤞🏼"},{"group":1,"hexcode":"1F91E-1F3FD","label":"crossed fingers: medium skin tone","order":261,"unicode":"🤞🏽"},{"group":1,"hexcode":"1F91E-1F3FE","label":"crossed fingers: medium-dark skin tone","order":262,"unicode":"🤞🏾"},{"group":1,"hexcode":"1F91E-1F3FF","label":"crossed fingers: dark skin tone","order":263,"unicode":"🤞🏿"}]},{"group":1,"hexcode":"1FAF0","label":"hand with index finger and thumb crossed","order":264,"tags":["expensive","heart","love","money","snap"],"unicode":"🫰","skins":[{"group":1,"hexcode":"1FAF0-1F3FB","label":"hand with index finger and thumb crossed: light skin tone","order":265,"unicode":"🫰🏻"},{"group":1,"hexcode":"1FAF0-1F3FC","label":"hand with index finger and thumb crossed: medium-light skin tone","order":266,"unicode":"🫰🏼"},{"group":1,"hexcode":"1FAF0-1F3FD","label":"hand with index finger and thumb crossed: medium skin tone","order":267,"unicode":"🫰🏽"},{"group":1,"hexcode":"1FAF0-1F3FE","label":"hand with index finger and thumb crossed: medium-dark skin tone","order":268,"unicode":"🫰🏾"},{"group":1,"hexcode":"1FAF0-1F3FF","label":"hand with index finger and thumb crossed: dark skin tone","order":269,"unicode":"🫰🏿"}]},{"group":1,"hexcode":"1F91F","label":"love-you gesture","order":270,"tags":["hand","ily"],"unicode":"🤟","skins":[{"group":1,"hexcode":"1F91F-1F3FB","label":"love-you gesture: light skin tone","order":271,"unicode":"🤟🏻"},{"group":1,"hexcode":"1F91F-1F3FC","label":"love-you gesture: medium-light skin tone","order":272,"unicode":"🤟🏼"},{"group":1,"hexcode":"1F91F-1F3FD","label":"love-you gesture: medium skin tone","order":273,"unicode":"🤟🏽"},{"group":1,"hexcode":"1F91F-1F3FE","label":"love-you gesture: medium-dark skin tone","order":274,"unicode":"🤟🏾"},{"group":1,"hexcode":"1F91F-1F3FF","label":"love-you gesture: dark skin tone","order":275,"unicode":"🤟🏿"}]},{"group":1,"hexcode":"1F918","label":"sign of the horns","order":276,"tags":["finger","hand","horns","rock-on"],"unicode":"🤘","emoticon":["\\\\m/","\\\\M/"],"skins":[{"group":1,"hexcode":"1F918-1F3FB","label":"sign of the horns: light skin tone","order":277,"unicode":"🤘🏻"},{"group":1,"hexcode":"1F918-1F3FC","label":"sign of the horns: medium-light skin tone","order":278,"unicode":"🤘🏼"},{"group":1,"hexcode":"1F918-1F3FD","label":"sign of the horns: medium skin tone","order":279,"unicode":"🤘🏽"},{"group":1,"hexcode":"1F918-1F3FE","label":"sign of the horns: medium-dark skin tone","order":280,"unicode":"🤘🏾"},{"group":1,"hexcode":"1F918-1F3FF","label":"sign of the horns: dark skin tone","order":281,"unicode":"🤘🏿"}]},{"group":1,"hexcode":"1F919","label":"call me hand","order":282,"tags":["call","hand","hang loose","shaka"],"unicode":"🤙","skins":[{"group":1,"hexcode":"1F919-1F3FB","label":"call me hand: light skin tone","order":283,"unicode":"🤙🏻"},{"group":1,"hexcode":"1F919-1F3FC","label":"call me hand: medium-light skin tone","order":284,"unicode":"🤙🏼"},{"group":1,"hexcode":"1F919-1F3FD","label":"call me hand: medium skin tone","order":285,"unicode":"🤙🏽"},{"group":1,"hexcode":"1F919-1F3FE","label":"call me hand: medium-dark skin tone","order":286,"unicode":"🤙🏾"},{"group":1,"hexcode":"1F919-1F3FF","label":"call me hand: dark skin tone","order":287,"unicode":"🤙🏿"}]},{"group":1,"hexcode":"1F448","label":"backhand index pointing left","order":288,"tags":["backhand","finger","hand","index","point"],"unicode":"👈️","skins":[{"group":1,"hexcode":"1F448-1F3FB","label":"backhand index pointing left: light skin tone","order":289,"unicode":"👈🏻"},{"group":1,"hexcode":"1F448-1F3FC","label":"backhand index pointing left: medium-light skin tone","order":290,"unicode":"👈🏼"},{"group":1,"hexcode":"1F448-1F3FD","label":"backhand index pointing left: medium skin tone","order":291,"unicode":"👈🏽"},{"group":1,"hexcode":"1F448-1F3FE","label":"backhand index pointing left: medium-dark skin tone","order":292,"unicode":"👈🏾"},{"group":1,"hexcode":"1F448-1F3FF","label":"backhand index pointing left: dark skin tone","order":293,"unicode":"👈🏿"}]},{"group":1,"hexcode":"1F449","label":"backhand index pointing right","order":294,"tags":["backhand","finger","hand","index","point"],"unicode":"👉️","skins":[{"group":1,"hexcode":"1F449-1F3FB","label":"backhand index pointing right: light skin tone","order":295,"unicode":"👉🏻"},{"group":1,"hexcode":"1F449-1F3FC","label":"backhand index pointing right: medium-light skin tone","order":296,"unicode":"👉🏼"},{"group":1,"hexcode":"1F449-1F3FD","label":"backhand index pointing right: medium skin tone","order":297,"unicode":"👉🏽"},{"group":1,"hexcode":"1F449-1F3FE","label":"backhand index pointing right: medium-dark skin tone","order":298,"unicode":"👉🏾"},{"group":1,"hexcode":"1F449-1F3FF","label":"backhand index pointing right: dark skin tone","order":299,"unicode":"👉🏿"}]},{"group":1,"hexcode":"1F446","label":"backhand index pointing up","order":300,"tags":["backhand","finger","hand","point","up"],"unicode":"👆️","skins":[{"group":1,"hexcode":"1F446-1F3FB","label":"backhand index pointing up: light skin tone","order":301,"unicode":"👆🏻"},{"group":1,"hexcode":"1F446-1F3FC","label":"backhand index pointing up: medium-light skin tone","order":302,"unicode":"👆🏼"},{"group":1,"hexcode":"1F446-1F3FD","label":"backhand index pointing up: medium skin tone","order":303,"unicode":"👆🏽"},{"group":1,"hexcode":"1F446-1F3FE","label":"backhand index pointing up: medium-dark skin tone","order":304,"unicode":"👆🏾"},{"group":1,"hexcode":"1F446-1F3FF","label":"backhand index pointing up: dark skin tone","order":305,"unicode":"👆🏿"}]},{"group":1,"hexcode":"1F595","label":"middle finger","order":306,"tags":["finger","hand"],"unicode":"🖕","skins":[{"group":1,"hexcode":"1F595-1F3FB","label":"middle finger: light skin tone","order":307,"unicode":"🖕🏻"},{"group":1,"hexcode":"1F595-1F3FC","label":"middle finger: medium-light skin tone","order":308,"unicode":"🖕🏼"},{"group":1,"hexcode":"1F595-1F3FD","label":"middle finger: medium skin tone","order":309,"unicode":"🖕🏽"},{"group":1,"hexcode":"1F595-1F3FE","label":"middle finger: medium-dark skin tone","order":310,"unicode":"🖕🏾"},{"group":1,"hexcode":"1F595-1F3FF","label":"middle finger: dark skin tone","order":311,"unicode":"🖕🏿"}]},{"group":1,"hexcode":"1F447","label":"backhand index pointing down","order":312,"tags":["backhand","down","finger","hand","point"],"unicode":"👇️","skins":[{"group":1,"hexcode":"1F447-1F3FB","label":"backhand index pointing down: light skin tone","order":313,"unicode":"👇🏻"},{"group":1,"hexcode":"1F447-1F3FC","label":"backhand index pointing down: medium-light skin tone","order":314,"unicode":"👇🏼"},{"group":1,"hexcode":"1F447-1F3FD","label":"backhand index pointing down: medium skin tone","order":315,"unicode":"👇🏽"},{"group":1,"hexcode":"1F447-1F3FE","label":"backhand index pointing down: medium-dark skin tone","order":316,"unicode":"👇🏾"},{"group":1,"hexcode":"1F447-1F3FF","label":"backhand index pointing down: dark skin tone","order":317,"unicode":"👇🏿"}]},{"group":1,"hexcode":"261D","label":"index pointing up","order":319,"tags":["finger","hand","index","point","up"],"unicode":"☝️","skins":[{"group":1,"hexcode":"261D-1F3FB","label":"index pointing up: light skin tone","order":320,"unicode":"☝🏻"},{"group":1,"hexcode":"261D-1F3FC","label":"index pointing up: medium-light skin tone","order":321,"unicode":"☝🏼"},{"group":1,"hexcode":"261D-1F3FD","label":"index pointing up: medium skin tone","order":322,"unicode":"☝🏽"},{"group":1,"hexcode":"261D-1F3FE","label":"index pointing up: medium-dark skin tone","order":323,"unicode":"☝🏾"},{"group":1,"hexcode":"261D-1F3FF","label":"index pointing up: dark skin tone","order":324,"unicode":"☝🏿"}]},{"group":1,"hexcode":"1FAF5","label":"index pointing at the viewer","order":325,"tags":["point","you"],"unicode":"🫵","skins":[{"group":1,"hexcode":"1FAF5-1F3FB","label":"index pointing at the viewer: light skin tone","order":326,"unicode":"🫵🏻"},{"group":1,"hexcode":"1FAF5-1F3FC","label":"index pointing at the viewer: medium-light skin tone","order":327,"unicode":"🫵🏼"},{"group":1,"hexcode":"1FAF5-1F3FD","label":"index pointing at the viewer: medium skin tone","order":328,"unicode":"🫵🏽"},{"group":1,"hexcode":"1FAF5-1F3FE","label":"index pointing at the viewer: medium-dark skin tone","order":329,"unicode":"🫵🏾"},{"group":1,"hexcode":"1FAF5-1F3FF","label":"index pointing at the viewer: dark skin tone","order":330,"unicode":"🫵🏿"}]},{"group":1,"hexcode":"1F44D","label":"thumbs up","order":331,"tags":["+1","hand","thumb","up"],"unicode":"👍️","skins":[{"group":1,"hexcode":"1F44D-1F3FB","label":"thumbs up: light skin tone","order":332,"unicode":"👍🏻"},{"group":1,"hexcode":"1F44D-1F3FC","label":"thumbs up: medium-light skin tone","order":333,"unicode":"👍🏼"},{"group":1,"hexcode":"1F44D-1F3FD","label":"thumbs up: medium skin tone","order":334,"unicode":"👍🏽"},{"group":1,"hexcode":"1F44D-1F3FE","label":"thumbs up: medium-dark skin tone","order":335,"unicode":"👍🏾"},{"group":1,"hexcode":"1F44D-1F3FF","label":"thumbs up: dark skin tone","order":336,"unicode":"👍🏿"}]},{"group":1,"hexcode":"1F44E","label":"thumbs down","order":337,"tags":["-1","down","hand","thumb"],"unicode":"👎️","skins":[{"group":1,"hexcode":"1F44E-1F3FB","label":"thumbs down: light skin tone","order":338,"unicode":"👎🏻"},{"group":1,"hexcode":"1F44E-1F3FC","label":"thumbs down: medium-light skin tone","order":339,"unicode":"👎🏼"},{"group":1,"hexcode":"1F44E-1F3FD","label":"thumbs down: medium skin tone","order":340,"unicode":"👎🏽"},{"group":1,"hexcode":"1F44E-1F3FE","label":"thumbs down: medium-dark skin tone","order":341,"unicode":"👎🏾"},{"group":1,"hexcode":"1F44E-1F3FF","label":"thumbs down: dark skin tone","order":342,"unicode":"👎🏿"}]},{"group":1,"hexcode":"270A","label":"raised fist","order":343,"tags":["clenched","fist","hand","punch"],"unicode":"✊","skins":[{"group":1,"hexcode":"270A-1F3FB","label":"raised fist: light skin tone","order":344,"unicode":"✊🏻"},{"group":1,"hexcode":"270A-1F3FC","label":"raised fist: medium-light skin tone","order":345,"unicode":"✊🏼"},{"group":1,"hexcode":"270A-1F3FD","label":"raised fist: medium skin tone","order":346,"unicode":"✊🏽"},{"group":1,"hexcode":"270A-1F3FE","label":"raised fist: medium-dark skin tone","order":347,"unicode":"✊🏾"},{"group":1,"hexcode":"270A-1F3FF","label":"raised fist: dark skin tone","order":348,"unicode":"✊🏿"}]},{"group":1,"hexcode":"1F44A","label":"oncoming fist","order":349,"tags":["clenched","fist","hand","punch"],"unicode":"👊","skins":[{"group":1,"hexcode":"1F44A-1F3FB","label":"oncoming fist: light skin tone","order":350,"unicode":"👊🏻"},{"group":1,"hexcode":"1F44A-1F3FC","label":"oncoming fist: medium-light skin tone","order":351,"unicode":"👊🏼"},{"group":1,"hexcode":"1F44A-1F3FD","label":"oncoming fist: medium skin tone","order":352,"unicode":"👊🏽"},{"group":1,"hexcode":"1F44A-1F3FE","label":"oncoming fist: medium-dark skin tone","order":353,"unicode":"👊🏾"},{"group":1,"hexcode":"1F44A-1F3FF","label":"oncoming fist: dark skin tone","order":354,"unicode":"👊🏿"}]},{"group":1,"hexcode":"1F91B","label":"left-facing fist","order":355,"tags":["fist","leftwards"],"unicode":"🤛","skins":[{"group":1,"hexcode":"1F91B-1F3FB","label":"left-facing fist: light skin tone","order":356,"unicode":"🤛🏻"},{"group":1,"hexcode":"1F91B-1F3FC","label":"left-facing fist: medium-light skin tone","order":357,"unicode":"🤛🏼"},{"group":1,"hexcode":"1F91B-1F3FD","label":"left-facing fist: medium skin tone","order":358,"unicode":"🤛🏽"},{"group":1,"hexcode":"1F91B-1F3FE","label":"left-facing fist: medium-dark skin tone","order":359,"unicode":"🤛🏾"},{"group":1,"hexcode":"1F91B-1F3FF","label":"left-facing fist: dark skin tone","order":360,"unicode":"🤛🏿"}]},{"group":1,"hexcode":"1F91C","label":"right-facing fist","order":361,"tags":["fist","rightwards"],"unicode":"🤜","skins":[{"group":1,"hexcode":"1F91C-1F3FB","label":"right-facing fist: light skin tone","order":362,"unicode":"🤜🏻"},{"group":1,"hexcode":"1F91C-1F3FC","label":"right-facing fist: medium-light skin tone","order":363,"unicode":"🤜🏼"},{"group":1,"hexcode":"1F91C-1F3FD","label":"right-facing fist: medium skin tone","order":364,"unicode":"🤜🏽"},{"group":1,"hexcode":"1F91C-1F3FE","label":"right-facing fist: medium-dark skin tone","order":365,"unicode":"🤜🏾"},{"group":1,"hexcode":"1F91C-1F3FF","label":"right-facing fist: dark skin tone","order":366,"unicode":"🤜🏿"}]},{"group":1,"hexcode":"1F44F","label":"clapping hands","order":367,"tags":["clap","hand"],"unicode":"👏","skins":[{"group":1,"hexcode":"1F44F-1F3FB","label":"clapping hands: light skin tone","order":368,"unicode":"👏🏻"},{"group":1,"hexcode":"1F44F-1F3FC","label":"clapping hands: medium-light skin tone","order":369,"unicode":"👏🏼"},{"group":1,"hexcode":"1F44F-1F3FD","label":"clapping hands: medium skin tone","order":370,"unicode":"👏🏽"},{"group":1,"hexcode":"1F44F-1F3FE","label":"clapping hands: medium-dark skin tone","order":371,"unicode":"👏🏾"},{"group":1,"hexcode":"1F44F-1F3FF","label":"clapping hands: dark skin tone","order":372,"unicode":"👏🏿"}]},{"group":1,"hexcode":"1F64C","label":"raising hands","order":373,"tags":["celebration","gesture","hand","hooray","raised"],"unicode":"🙌","skins":[{"group":1,"hexcode":"1F64C-1F3FB","label":"raising hands: light skin tone","order":374,"unicode":"🙌🏻"},{"group":1,"hexcode":"1F64C-1F3FC","label":"raising hands: medium-light skin tone","order":375,"unicode":"🙌🏼"},{"group":1,"hexcode":"1F64C-1F3FD","label":"raising hands: medium skin tone","order":376,"unicode":"🙌🏽"},{"group":1,"hexcode":"1F64C-1F3FE","label":"raising hands: medium-dark skin tone","order":377,"unicode":"🙌🏾"},{"group":1,"hexcode":"1F64C-1F3FF","label":"raising hands: dark skin tone","order":378,"unicode":"🙌🏿"}]},{"group":1,"hexcode":"1FAF6","label":"heart hands","order":379,"tags":["love"],"unicode":"🫶","skins":[{"group":1,"hexcode":"1FAF6-1F3FB","label":"heart hands: light skin tone","order":380,"unicode":"🫶🏻"},{"group":1,"hexcode":"1FAF6-1F3FC","label":"heart hands: medium-light skin tone","order":381,"unicode":"🫶🏼"},{"group":1,"hexcode":"1FAF6-1F3FD","label":"heart hands: medium skin tone","order":382,"unicode":"🫶🏽"},{"group":1,"hexcode":"1FAF6-1F3FE","label":"heart hands: medium-dark skin tone","order":383,"unicode":"🫶🏾"},{"group":1,"hexcode":"1FAF6-1F3FF","label":"heart hands: dark skin tone","order":384,"unicode":"🫶🏿"}]},{"group":1,"hexcode":"1F450","label":"open hands","order":385,"tags":["hand","open"],"unicode":"👐","skins":[{"group":1,"hexcode":"1F450-1F3FB","label":"open hands: light skin tone","order":386,"unicode":"👐🏻"},{"group":1,"hexcode":"1F450-1F3FC","label":"open hands: medium-light skin tone","order":387,"unicode":"👐🏼"},{"group":1,"hexcode":"1F450-1F3FD","label":"open hands: medium skin tone","order":388,"unicode":"👐🏽"},{"group":1,"hexcode":"1F450-1F3FE","label":"open hands: medium-dark skin tone","order":389,"unicode":"👐🏾"},{"group":1,"hexcode":"1F450-1F3FF","label":"open hands: dark skin tone","order":390,"unicode":"👐🏿"}]},{"group":1,"hexcode":"1F932","label":"palms up together","order":391,"tags":["prayer"],"unicode":"🤲","skins":[{"group":1,"hexcode":"1F932-1F3FB","label":"palms up together: light skin tone","order":392,"unicode":"🤲🏻"},{"group":1,"hexcode":"1F932-1F3FC","label":"palms up together: medium-light skin tone","order":393,"unicode":"🤲🏼"},{"group":1,"hexcode":"1F932-1F3FD","label":"palms up together: medium skin tone","order":394,"unicode":"🤲🏽"},{"group":1,"hexcode":"1F932-1F3FE","label":"palms up together: medium-dark skin tone","order":395,"unicode":"🤲🏾"},{"group":1,"hexcode":"1F932-1F3FF","label":"palms up together: dark skin tone","order":396,"unicode":"🤲🏿"}]},{"group":1,"hexcode":"1F91D","label":"handshake","order":397,"tags":["agreement","hand","meeting","shake"],"unicode":"🤝","skins":[{"group":1,"hexcode":"1F91D-1F3FB","label":"handshake: light skin tone","order":398,"unicode":"🤝🏻"},{"group":1,"hexcode":"1F91D-1F3FC","label":"handshake: medium-light skin tone","order":399,"unicode":"🤝🏼"},{"group":1,"hexcode":"1F91D-1F3FD","label":"handshake: medium skin tone","order":400,"unicode":"🤝🏽"},{"group":1,"hexcode":"1F91D-1F3FE","label":"handshake: medium-dark skin tone","order":401,"unicode":"🤝🏾"},{"group":1,"hexcode":"1F91D-1F3FF","label":"handshake: dark skin tone","order":402,"unicode":"🤝🏿"},{"group":1,"hexcode":"1FAF1-1F3FB-200D-1FAF2-1F3FC","label":"handshake: light skin tone, medium-light skin tone","order":403,"unicode":"🫱🏻🫲🏼"},{"group":1,"hexcode":"1FAF1-1F3FB-200D-1FAF2-1F3FD","label":"handshake: light skin tone, medium skin tone","order":404,"unicode":"🫱🏻🫲🏽"},{"group":1,"hexcode":"1FAF1-1F3FB-200D-1FAF2-1F3FE","label":"handshake: light skin tone, medium-dark skin tone","order":405,"unicode":"🫱🏻🫲🏾"},{"group":1,"hexcode":"1FAF1-1F3FB-200D-1FAF2-1F3FF","label":"handshake: light skin tone, dark skin tone","order":406,"unicode":"🫱🏻🫲🏿"},{"group":1,"hexcode":"1FAF1-1F3FC-200D-1FAF2-1F3FB","label":"handshake: medium-light skin tone, light skin tone","order":407,"unicode":"🫱🏼🫲🏻"},{"group":1,"hexcode":"1FAF1-1F3FC-200D-1FAF2-1F3FD","label":"handshake: medium-light skin tone, medium skin tone","order":408,"unicode":"🫱🏼🫲🏽"},{"group":1,"hexcode":"1FAF1-1F3FC-200D-1FAF2-1F3FE","label":"handshake: medium-light skin tone, medium-dark skin tone","order":409,"unicode":"🫱🏼🫲🏾"},{"group":1,"hexcode":"1FAF1-1F3FC-200D-1FAF2-1F3FF","label":"handshake: medium-light skin tone, dark skin tone","order":410,"unicode":"🫱🏼🫲🏿"},{"group":1,"hexcode":"1FAF1-1F3FD-200D-1FAF2-1F3FB","label":"handshake: medium skin tone, light skin tone","order":411,"unicode":"🫱🏽🫲🏻"},{"group":1,"hexcode":"1FAF1-1F3FD-200D-1FAF2-1F3FC","label":"handshake: medium skin tone, medium-light skin tone","order":412,"unicode":"🫱🏽🫲🏼"},{"group":1,"hexcode":"1FAF1-1F3FD-200D-1FAF2-1F3FE","label":"handshake: medium skin tone, medium-dark skin tone","order":413,"unicode":"🫱🏽🫲🏾"},{"group":1,"hexcode":"1FAF1-1F3FD-200D-1FAF2-1F3FF","label":"handshake: medium skin tone, dark skin tone","order":414,"unicode":"🫱🏽🫲🏿"},{"group":1,"hexcode":"1FAF1-1F3FE-200D-1FAF2-1F3FB","label":"handshake: medium-dark skin tone, light skin tone","order":415,"unicode":"🫱🏾🫲🏻"},{"group":1,"hexcode":"1FAF1-1F3FE-200D-1FAF2-1F3FC","label":"handshake: medium-dark skin tone, medium-light skin tone","order":416,"unicode":"🫱🏾🫲🏼"},{"group":1,"hexcode":"1FAF1-1F3FE-200D-1FAF2-1F3FD","label":"handshake: medium-dark skin tone, medium skin tone","order":417,"unicode":"🫱🏾🫲🏽"},{"group":1,"hexcode":"1FAF1-1F3FE-200D-1FAF2-1F3FF","label":"handshake: medium-dark skin tone, dark skin tone","order":418,"unicode":"🫱🏾🫲🏿"},{"group":1,"hexcode":"1FAF1-1F3FF-200D-1FAF2-1F3FB","label":"handshake: dark skin tone, light skin tone","order":419,"unicode":"🫱🏿🫲🏻"},{"group":1,"hexcode":"1FAF1-1F3FF-200D-1FAF2-1F3FC","label":"handshake: dark skin tone, medium-light skin tone","order":420,"unicode":"🫱🏿🫲🏼"},{"group":1,"hexcode":"1FAF1-1F3FF-200D-1FAF2-1F3FD","label":"handshake: dark skin tone, medium skin tone","order":421,"unicode":"🫱🏿🫲🏽"},{"group":1,"hexcode":"1FAF1-1F3FF-200D-1FAF2-1F3FE","label":"handshake: dark skin tone, medium-dark skin tone","order":422,"unicode":"🫱🏿🫲🏾"}]},{"group":1,"hexcode":"1F64F","label":"folded hands","order":423,"tags":["ask","hand","high 5","high five","please","pray","thanks"],"unicode":"🙏","skins":[{"group":1,"hexcode":"1F64F-1F3FB","label":"folded hands: light skin tone","order":424,"unicode":"🙏🏻"},{"group":1,"hexcode":"1F64F-1F3FC","label":"folded hands: medium-light skin tone","order":425,"unicode":"🙏🏼"},{"group":1,"hexcode":"1F64F-1F3FD","label":"folded hands: medium skin tone","order":426,"unicode":"🙏🏽"},{"group":1,"hexcode":"1F64F-1F3FE","label":"folded hands: medium-dark skin tone","order":427,"unicode":"🙏🏾"},{"group":1,"hexcode":"1F64F-1F3FF","label":"folded hands: dark skin tone","order":428,"unicode":"🙏🏿"}]},{"group":1,"hexcode":"270D","label":"writing hand","order":430,"tags":["hand","write"],"unicode":"✍️","skins":[{"group":1,"hexcode":"270D-1F3FB","label":"writing hand: light skin tone","order":431,"unicode":"✍🏻"},{"group":1,"hexcode":"270D-1F3FC","label":"writing hand: medium-light skin tone","order":432,"unicode":"✍🏼"},{"group":1,"hexcode":"270D-1F3FD","label":"writing hand: medium skin tone","order":433,"unicode":"✍🏽"},{"group":1,"hexcode":"270D-1F3FE","label":"writing hand: medium-dark skin tone","order":434,"unicode":"✍🏾"},{"group":1,"hexcode":"270D-1F3FF","label":"writing hand: dark skin tone","order":435,"unicode":"✍🏿"}]},{"group":1,"hexcode":"1F485","label":"nail polish","order":436,"tags":["care","cosmetics","manicure","nail","polish"],"unicode":"💅","skins":[{"group":1,"hexcode":"1F485-1F3FB","label":"nail polish: light skin tone","order":437,"unicode":"💅🏻"},{"group":1,"hexcode":"1F485-1F3FC","label":"nail polish: medium-light skin tone","order":438,"unicode":"💅🏼"},{"group":1,"hexcode":"1F485-1F3FD","label":"nail polish: medium skin tone","order":439,"unicode":"💅🏽"},{"group":1,"hexcode":"1F485-1F3FE","label":"nail polish: medium-dark skin tone","order":440,"unicode":"💅🏾"},{"group":1,"hexcode":"1F485-1F3FF","label":"nail polish: dark skin tone","order":441,"unicode":"💅🏿"}]},{"group":1,"hexcode":"1F933","label":"selfie","order":442,"tags":["camera","phone"],"unicode":"🤳","skins":[{"group":1,"hexcode":"1F933-1F3FB","label":"selfie: light skin tone","order":443,"unicode":"🤳🏻"},{"group":1,"hexcode":"1F933-1F3FC","label":"selfie: medium-light skin tone","order":444,"unicode":"🤳🏼"},{"group":1,"hexcode":"1F933-1F3FD","label":"selfie: medium skin tone","order":445,"unicode":"🤳🏽"},{"group":1,"hexcode":"1F933-1F3FE","label":"selfie: medium-dark skin tone","order":446,"unicode":"🤳🏾"},{"group":1,"hexcode":"1F933-1F3FF","label":"selfie: dark skin tone","order":447,"unicode":"🤳🏿"}]},{"group":1,"hexcode":"1F4AA","label":"flexed biceps","order":448,"tags":["biceps","comic","flex","muscle"],"unicode":"💪","skins":[{"group":1,"hexcode":"1F4AA-1F3FB","label":"flexed biceps: light skin tone","order":449,"unicode":"💪🏻"},{"group":1,"hexcode":"1F4AA-1F3FC","label":"flexed biceps: medium-light skin tone","order":450,"unicode":"💪🏼"},{"group":1,"hexcode":"1F4AA-1F3FD","label":"flexed biceps: medium skin tone","order":451,"unicode":"💪🏽"},{"group":1,"hexcode":"1F4AA-1F3FE","label":"flexed biceps: medium-dark skin tone","order":452,"unicode":"💪🏾"},{"group":1,"hexcode":"1F4AA-1F3FF","label":"flexed biceps: dark skin tone","order":453,"unicode":"💪🏿"}]},{"group":1,"hexcode":"1F9BE","label":"mechanical arm","order":454,"tags":["accessibility","prosthetic"],"unicode":"🦾"},{"group":1,"hexcode":"1F9BF","label":"mechanical leg","order":455,"tags":["accessibility","prosthetic"],"unicode":"🦿"},{"group":1,"hexcode":"1F9B5","label":"leg","order":456,"tags":["kick","limb"],"unicode":"🦵","skins":[{"group":1,"hexcode":"1F9B5-1F3FB","label":"leg: light skin tone","order":457,"unicode":"🦵🏻"},{"group":1,"hexcode":"1F9B5-1F3FC","label":"leg: medium-light skin tone","order":458,"unicode":"🦵🏼"},{"group":1,"hexcode":"1F9B5-1F3FD","label":"leg: medium skin tone","order":459,"unicode":"🦵🏽"},{"group":1,"hexcode":"1F9B5-1F3FE","label":"leg: medium-dark skin tone","order":460,"unicode":"🦵🏾"},{"group":1,"hexcode":"1F9B5-1F3FF","label":"leg: dark skin tone","order":461,"unicode":"🦵🏿"}]},{"group":1,"hexcode":"1F9B6","label":"foot","order":462,"tags":["kick","stomp"],"unicode":"🦶","skins":[{"group":1,"hexcode":"1F9B6-1F3FB","label":"foot: light skin tone","order":463,"unicode":"🦶🏻"},{"group":1,"hexcode":"1F9B6-1F3FC","label":"foot: medium-light skin tone","order":464,"unicode":"🦶🏼"},{"group":1,"hexcode":"1F9B6-1F3FD","label":"foot: medium skin tone","order":465,"unicode":"🦶🏽"},{"group":1,"hexcode":"1F9B6-1F3FE","label":"foot: medium-dark skin tone","order":466,"unicode":"🦶🏾"},{"group":1,"hexcode":"1F9B6-1F3FF","label":"foot: dark skin tone","order":467,"unicode":"🦶🏿"}]},{"group":1,"hexcode":"1F442","label":"ear","order":468,"tags":["body"],"unicode":"👂️","skins":[{"group":1,"hexcode":"1F442-1F3FB","label":"ear: light skin tone","order":469,"unicode":"👂🏻"},{"group":1,"hexcode":"1F442-1F3FC","label":"ear: medium-light skin tone","order":470,"unicode":"👂🏼"},{"group":1,"hexcode":"1F442-1F3FD","label":"ear: medium skin tone","order":471,"unicode":"👂🏽"},{"group":1,"hexcode":"1F442-1F3FE","label":"ear: medium-dark skin tone","order":472,"unicode":"👂🏾"},{"group":1,"hexcode":"1F442-1F3FF","label":"ear: dark skin tone","order":473,"unicode":"👂🏿"}]},{"group":1,"hexcode":"1F9BB","label":"ear with hearing aid","order":474,"tags":["accessibility","hard of hearing"],"unicode":"🦻","skins":[{"group":1,"hexcode":"1F9BB-1F3FB","label":"ear with hearing aid: light skin tone","order":475,"unicode":"🦻🏻"},{"group":1,"hexcode":"1F9BB-1F3FC","label":"ear with hearing aid: medium-light skin tone","order":476,"unicode":"🦻🏼"},{"group":1,"hexcode":"1F9BB-1F3FD","label":"ear with hearing aid: medium skin tone","order":477,"unicode":"🦻🏽"},{"group":1,"hexcode":"1F9BB-1F3FE","label":"ear with hearing aid: medium-dark skin tone","order":478,"unicode":"🦻🏾"},{"group":1,"hexcode":"1F9BB-1F3FF","label":"ear with hearing aid: dark skin tone","order":479,"unicode":"🦻🏿"}]},{"group":1,"hexcode":"1F443","label":"nose","order":480,"tags":["body"],"unicode":"👃","skins":[{"group":1,"hexcode":"1F443-1F3FB","label":"nose: light skin tone","order":481,"unicode":"👃🏻"},{"group":1,"hexcode":"1F443-1F3FC","label":"nose: medium-light skin tone","order":482,"unicode":"👃🏼"},{"group":1,"hexcode":"1F443-1F3FD","label":"nose: medium skin tone","order":483,"unicode":"👃🏽"},{"group":1,"hexcode":"1F443-1F3FE","label":"nose: medium-dark skin tone","order":484,"unicode":"👃🏾"},{"group":1,"hexcode":"1F443-1F3FF","label":"nose: dark skin tone","order":485,"unicode":"👃🏿"}]},{"group":1,"hexcode":"1F9E0","label":"brain","order":486,"tags":["intelligent"],"unicode":"🧠"},{"group":1,"hexcode":"1FAC0","label":"anatomical heart","order":487,"tags":["anatomical","cardiology","heart","organ","pulse"],"unicode":"🫀"},{"group":1,"hexcode":"1FAC1","label":"lungs","order":488,"tags":["breath","exhalation","inhalation","organ","respiration"],"unicode":"🫁"},{"group":1,"hexcode":"1F9B7","label":"tooth","order":489,"tags":["dentist"],"unicode":"🦷"},{"group":1,"hexcode":"1F9B4","label":"bone","order":490,"tags":["skeleton"],"unicode":"🦴"},{"group":1,"hexcode":"1F440","label":"eyes","order":491,"tags":["eye","face"],"unicode":"👀"},{"group":1,"hexcode":"1F441","label":"eye","order":493,"tags":["body"],"unicode":"👁️"},{"group":1,"hexcode":"1F445","label":"tongue","order":494,"tags":["body"],"unicode":"👅"},{"group":1,"hexcode":"1F444","label":"mouth","order":495,"tags":["lips"],"unicode":"👄"},{"group":1,"hexcode":"1FAE6","label":"biting lip","order":496,"tags":["anxious","fear","flirting","nervous","uncomfortable","worried"],"unicode":"🫦"},{"group":1,"hexcode":"1F476","label":"baby","order":497,"tags":["young"],"unicode":"👶","skins":[{"group":1,"hexcode":"1F476-1F3FB","label":"baby: light skin tone","order":498,"unicode":"👶🏻"},{"group":1,"hexcode":"1F476-1F3FC","label":"baby: medium-light skin tone","order":499,"unicode":"👶🏼"},{"group":1,"hexcode":"1F476-1F3FD","label":"baby: medium skin tone","order":500,"unicode":"👶🏽"},{"group":1,"hexcode":"1F476-1F3FE","label":"baby: medium-dark skin tone","order":501,"unicode":"👶🏾"},{"group":1,"hexcode":"1F476-1F3FF","label":"baby: dark skin tone","order":502,"unicode":"👶🏿"}]},{"group":1,"hexcode":"1F9D2","label":"child","order":503,"tags":["gender-neutral","unspecified gender","young"],"unicode":"🧒","skins":[{"group":1,"hexcode":"1F9D2-1F3FB","label":"child: light skin tone","order":504,"unicode":"🧒🏻"},{"group":1,"hexcode":"1F9D2-1F3FC","label":"child: medium-light skin tone","order":505,"unicode":"🧒🏼"},{"group":1,"hexcode":"1F9D2-1F3FD","label":"child: medium skin tone","order":506,"unicode":"🧒🏽"},{"group":1,"hexcode":"1F9D2-1F3FE","label":"child: medium-dark skin tone","order":507,"unicode":"🧒🏾"},{"group":1,"hexcode":"1F9D2-1F3FF","label":"child: dark skin tone","order":508,"unicode":"🧒🏿"}]},{"group":1,"hexcode":"1F466","label":"boy","order":509,"tags":["young"],"unicode":"👦","skins":[{"group":1,"hexcode":"1F466-1F3FB","label":"boy: light skin tone","order":510,"unicode":"👦🏻"},{"group":1,"hexcode":"1F466-1F3FC","label":"boy: medium-light skin tone","order":511,"unicode":"👦🏼"},{"group":1,"hexcode":"1F466-1F3FD","label":"boy: medium skin tone","order":512,"unicode":"👦🏽"},{"group":1,"hexcode":"1F466-1F3FE","label":"boy: medium-dark skin tone","order":513,"unicode":"👦🏾"},{"group":1,"hexcode":"1F466-1F3FF","label":"boy: dark skin tone","order":514,"unicode":"👦🏿"}]},{"group":1,"hexcode":"1F467","label":"girl","order":515,"tags":["virgo","young","zodiac"],"unicode":"👧","skins":[{"group":1,"hexcode":"1F467-1F3FB","label":"girl: light skin tone","order":516,"unicode":"👧🏻"},{"group":1,"hexcode":"1F467-1F3FC","label":"girl: medium-light skin tone","order":517,"unicode":"👧🏼"},{"group":1,"hexcode":"1F467-1F3FD","label":"girl: medium skin tone","order":518,"unicode":"👧🏽"},{"group":1,"hexcode":"1F467-1F3FE","label":"girl: medium-dark skin tone","order":519,"unicode":"👧🏾"},{"group":1,"hexcode":"1F467-1F3FF","label":"girl: dark skin tone","order":520,"unicode":"👧🏿"}]},{"group":1,"hexcode":"1F9D1","label":"person","order":521,"tags":["adult","gender-neutral","unspecified gender"],"unicode":"🧑","skins":[{"group":1,"hexcode":"1F9D1-1F3FB","label":"person: light skin tone","order":522,"unicode":"🧑🏻"},{"group":1,"hexcode":"1F9D1-1F3FC","label":"person: medium-light skin tone","order":523,"unicode":"🧑🏼"},{"group":1,"hexcode":"1F9D1-1F3FD","label":"person: medium skin tone","order":524,"unicode":"🧑🏽"},{"group":1,"hexcode":"1F9D1-1F3FE","label":"person: medium-dark skin tone","order":525,"unicode":"🧑🏾"},{"group":1,"hexcode":"1F9D1-1F3FF","label":"person: dark skin tone","order":526,"unicode":"🧑🏿"}]},{"group":1,"hexcode":"1F471","label":"person: blond hair","order":527,"tags":["blond","blond-haired person","hair"],"unicode":"👱","skins":[{"group":1,"hexcode":"1F471-1F3FB","label":"person: light skin tone, blond hair","order":528,"unicode":"👱🏻"},{"group":1,"hexcode":"1F471-1F3FC","label":"person: medium-light skin tone, blond hair","order":529,"unicode":"👱🏼"},{"group":1,"hexcode":"1F471-1F3FD","label":"person: medium skin tone, blond hair","order":530,"unicode":"👱🏽"},{"group":1,"hexcode":"1F471-1F3FE","label":"person: medium-dark skin tone, blond hair","order":531,"unicode":"👱🏾"},{"group":1,"hexcode":"1F471-1F3FF","label":"person: dark skin tone, blond hair","order":532,"unicode":"👱🏿"}]},{"group":1,"hexcode":"1F468","label":"man","order":533,"tags":["adult"],"unicode":"👨","skins":[{"group":1,"hexcode":"1F468-1F3FB","label":"man: light skin tone","order":534,"unicode":"👨🏻"},{"group":1,"hexcode":"1F468-1F3FC","label":"man: medium-light skin tone","order":535,"unicode":"👨🏼"},{"group":1,"hexcode":"1F468-1F3FD","label":"man: medium skin tone","order":536,"unicode":"👨🏽"},{"group":1,"hexcode":"1F468-1F3FE","label":"man: medium-dark skin tone","order":537,"unicode":"👨🏾"},{"group":1,"hexcode":"1F468-1F3FF","label":"man: dark skin tone","order":538,"unicode":"👨🏿"}]},{"group":1,"hexcode":"1F9D4","label":"person: beard","order":539,"tags":["beard","person"],"unicode":"🧔","skins":[{"group":1,"hexcode":"1F9D4-1F3FB","label":"person: light skin tone, beard","order":540,"unicode":"🧔🏻"},{"group":1,"hexcode":"1F9D4-1F3FC","label":"person: medium-light skin tone, beard","order":541,"unicode":"🧔🏼"},{"group":1,"hexcode":"1F9D4-1F3FD","label":"person: medium skin tone, beard","order":542,"unicode":"🧔🏽"},{"group":1,"hexcode":"1F9D4-1F3FE","label":"person: medium-dark skin tone, beard","order":543,"unicode":"🧔🏾"},{"group":1,"hexcode":"1F9D4-1F3FF","label":"person: dark skin tone, beard","order":544,"unicode":"🧔🏿"}]},{"group":1,"hexcode":"1F9D4-200D-2642-FE0F","label":"man: beard","order":545,"tags":["beard","man"],"unicode":"🧔♂️","skins":[{"group":1,"hexcode":"1F9D4-1F3FB-200D-2642-FE0F","label":"man: light skin tone, beard","order":547,"unicode":"🧔🏻♂️"},{"group":1,"hexcode":"1F9D4-1F3FC-200D-2642-FE0F","label":"man: medium-light skin tone, beard","order":549,"unicode":"🧔🏼♂️"},{"group":1,"hexcode":"1F9D4-1F3FD-200D-2642-FE0F","label":"man: medium skin tone, beard","order":551,"unicode":"🧔🏽♂️"},{"group":1,"hexcode":"1F9D4-1F3FE-200D-2642-FE0F","label":"man: medium-dark skin tone, beard","order":553,"unicode":"🧔🏾♂️"},{"group":1,"hexcode":"1F9D4-1F3FF-200D-2642-FE0F","label":"man: dark skin tone, beard","order":555,"unicode":"🧔🏿♂️"}]},{"group":1,"hexcode":"1F9D4-200D-2640-FE0F","label":"woman: beard","order":557,"tags":["beard","woman"],"unicode":"🧔♀️","skins":[{"group":1,"hexcode":"1F9D4-1F3FB-200D-2640-FE0F","label":"woman: light skin tone, beard","order":559,"unicode":"🧔🏻♀️"},{"group":1,"hexcode":"1F9D4-1F3FC-200D-2640-FE0F","label":"woman: medium-light skin tone, beard","order":561,"unicode":"🧔🏼♀️"},{"group":1,"hexcode":"1F9D4-1F3FD-200D-2640-FE0F","label":"woman: medium skin tone, beard","order":563,"unicode":"🧔🏽♀️"},{"group":1,"hexcode":"1F9D4-1F3FE-200D-2640-FE0F","label":"woman: medium-dark skin tone, beard","order":565,"unicode":"🧔🏾♀️"},{"group":1,"hexcode":"1F9D4-1F3FF-200D-2640-FE0F","label":"woman: dark skin tone, beard","order":567,"unicode":"🧔🏿♀️"}]},{"group":1,"hexcode":"1F468-200D-1F9B0","label":"man: red hair","order":569,"tags":["adult","man","red hair"],"unicode":"👨🦰","skins":[{"group":1,"hexcode":"1F468-1F3FB-200D-1F9B0","label":"man: light skin tone, red hair","order":570,"unicode":"👨🏻🦰"},{"group":1,"hexcode":"1F468-1F3FC-200D-1F9B0","label":"man: medium-light skin tone, red hair","order":571,"unicode":"👨🏼🦰"},{"group":1,"hexcode":"1F468-1F3FD-200D-1F9B0","label":"man: medium skin tone, red hair","order":572,"unicode":"👨🏽🦰"},{"group":1,"hexcode":"1F468-1F3FE-200D-1F9B0","label":"man: medium-dark skin tone, red hair","order":573,"unicode":"👨🏾🦰"},{"group":1,"hexcode":"1F468-1F3FF-200D-1F9B0","label":"man: dark skin tone, red hair","order":574,"unicode":"👨🏿🦰"}]},{"group":1,"hexcode":"1F468-200D-1F9B1","label":"man: curly hair","order":575,"tags":["adult","curly hair","man"],"unicode":"👨🦱","skins":[{"group":1,"hexcode":"1F468-1F3FB-200D-1F9B1","label":"man: light skin tone, curly hair","order":576,"unicode":"👨🏻🦱"},{"group":1,"hexcode":"1F468-1F3FC-200D-1F9B1","label":"man: medium-light skin tone, curly hair","order":577,"unicode":"👨🏼🦱"},{"group":1,"hexcode":"1F468-1F3FD-200D-1F9B1","label":"man: medium skin tone, curly hair","order":578,"unicode":"👨🏽🦱"},{"group":1,"hexcode":"1F468-1F3FE-200D-1F9B1","label":"man: medium-dark skin tone, curly hair","order":579,"unicode":"👨🏾🦱"},{"group":1,"hexcode":"1F468-1F3FF-200D-1F9B1","label":"man: dark skin tone, curly hair","order":580,"unicode":"👨🏿🦱"}]},{"group":1,"hexcode":"1F468-200D-1F9B3","label":"man: white hair","order":581,"tags":["adult","man","white hair"],"unicode":"👨🦳","skins":[{"group":1,"hexcode":"1F468-1F3FB-200D-1F9B3","label":"man: light skin tone, white hair","order":582,"unicode":"👨🏻🦳"},{"group":1,"hexcode":"1F468-1F3FC-200D-1F9B3","label":"man: medium-light skin tone, white hair","order":583,"unicode":"👨🏼🦳"},{"group":1,"hexcode":"1F468-1F3FD-200D-1F9B3","label":"man: medium skin tone, white hair","order":584,"unicode":"👨🏽🦳"},{"group":1,"hexcode":"1F468-1F3FE-200D-1F9B3","label":"man: medium-dark skin tone, white hair","order":585,"unicode":"👨🏾🦳"},{"group":1,"hexcode":"1F468-1F3FF-200D-1F9B3","label":"man: dark skin tone, white hair","order":586,"unicode":"👨🏿🦳"}]},{"group":1,"hexcode":"1F468-200D-1F9B2","label":"man: bald","order":587,"tags":["adult","bald","man"],"unicode":"👨🦲","skins":[{"group":1,"hexcode":"1F468-1F3FB-200D-1F9B2","label":"man: light skin tone, bald","order":588,"unicode":"👨🏻🦲"},{"group":1,"hexcode":"1F468-1F3FC-200D-1F9B2","label":"man: medium-light skin tone, bald","order":589,"unicode":"👨🏼🦲"},{"group":1,"hexcode":"1F468-1F3FD-200D-1F9B2","label":"man: medium skin tone, bald","order":590,"unicode":"👨🏽🦲"},{"group":1,"hexcode":"1F468-1F3FE-200D-1F9B2","label":"man: medium-dark skin tone, bald","order":591,"unicode":"👨🏾🦲"},{"group":1,"hexcode":"1F468-1F3FF-200D-1F9B2","label":"man: dark skin tone, bald","order":592,"unicode":"👨🏿🦲"}]},{"group":1,"hexcode":"1F469","label":"woman","order":593,"tags":["adult"],"unicode":"👩","skins":[{"group":1,"hexcode":"1F469-1F3FB","label":"woman: light skin tone","order":594,"unicode":"👩🏻"},{"group":1,"hexcode":"1F469-1F3FC","label":"woman: medium-light skin tone","order":595,"unicode":"👩🏼"},{"group":1,"hexcode":"1F469-1F3FD","label":"woman: medium skin tone","order":596,"unicode":"👩🏽"},{"group":1,"hexcode":"1F469-1F3FE","label":"woman: medium-dark skin tone","order":597,"unicode":"👩🏾"},{"group":1,"hexcode":"1F469-1F3FF","label":"woman: dark skin tone","order":598,"unicode":"👩🏿"}]},{"group":1,"hexcode":"1F469-200D-1F9B0","label":"woman: red hair","order":599,"tags":["adult","red hair","woman"],"unicode":"👩🦰","skins":[{"group":1,"hexcode":"1F469-1F3FB-200D-1F9B0","label":"woman: light skin tone, red hair","order":600,"unicode":"👩🏻🦰"},{"group":1,"hexcode":"1F469-1F3FC-200D-1F9B0","label":"woman: medium-light skin tone, red hair","order":601,"unicode":"👩🏼🦰"},{"group":1,"hexcode":"1F469-1F3FD-200D-1F9B0","label":"woman: medium skin tone, red hair","order":602,"unicode":"👩🏽🦰"},{"group":1,"hexcode":"1F469-1F3FE-200D-1F9B0","label":"woman: medium-dark skin tone, red hair","order":603,"unicode":"👩🏾🦰"},{"group":1,"hexcode":"1F469-1F3FF-200D-1F9B0","label":"woman: dark skin tone, red hair","order":604,"unicode":"👩🏿🦰"}]},{"group":1,"hexcode":"1F9D1-200D-1F9B0","label":"person: red hair","order":605,"tags":["adult","gender-neutral","person","red hair","unspecified gender"],"unicode":"🧑🦰","skins":[{"group":1,"hexcode":"1F9D1-1F3FB-200D-1F9B0","label":"person: light skin tone, red hair","order":606,"unicode":"🧑🏻🦰"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-1F9B0","label":"person: medium-light skin tone, red hair","order":607,"unicode":"🧑🏼🦰"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-1F9B0","label":"person: medium skin tone, red hair","order":608,"unicode":"🧑🏽🦰"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-1F9B0","label":"person: medium-dark skin tone, red hair","order":609,"unicode":"🧑🏾🦰"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-1F9B0","label":"person: dark skin tone, red hair","order":610,"unicode":"🧑🏿🦰"}]},{"group":1,"hexcode":"1F469-200D-1F9B1","label":"woman: curly hair","order":611,"tags":["adult","curly hair","woman"],"unicode":"👩🦱","skins":[{"group":1,"hexcode":"1F469-1F3FB-200D-1F9B1","label":"woman: light skin tone, curly hair","order":612,"unicode":"👩🏻🦱"},{"group":1,"hexcode":"1F469-1F3FC-200D-1F9B1","label":"woman: medium-light skin tone, curly hair","order":613,"unicode":"👩🏼🦱"},{"group":1,"hexcode":"1F469-1F3FD-200D-1F9B1","label":"woman: medium skin tone, curly hair","order":614,"unicode":"👩🏽🦱"},{"group":1,"hexcode":"1F469-1F3FE-200D-1F9B1","label":"woman: medium-dark skin tone, curly hair","order":615,"unicode":"👩🏾🦱"},{"group":1,"hexcode":"1F469-1F3FF-200D-1F9B1","label":"woman: dark skin tone, curly hair","order":616,"unicode":"👩🏿🦱"}]},{"group":1,"hexcode":"1F9D1-200D-1F9B1","label":"person: curly hair","order":617,"tags":["adult","curly hair","gender-neutral","person","unspecified gender"],"unicode":"🧑🦱","skins":[{"group":1,"hexcode":"1F9D1-1F3FB-200D-1F9B1","label":"person: light skin tone, curly hair","order":618,"unicode":"🧑🏻🦱"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-1F9B1","label":"person: medium-light skin tone, curly hair","order":619,"unicode":"🧑🏼🦱"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-1F9B1","label":"person: medium skin tone, curly hair","order":620,"unicode":"🧑🏽🦱"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-1F9B1","label":"person: medium-dark skin tone, curly hair","order":621,"unicode":"🧑🏾🦱"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-1F9B1","label":"person: dark skin tone, curly hair","order":622,"unicode":"🧑🏿🦱"}]},{"group":1,"hexcode":"1F469-200D-1F9B3","label":"woman: white hair","order":623,"tags":["adult","white hair","woman"],"unicode":"👩🦳","skins":[{"group":1,"hexcode":"1F469-1F3FB-200D-1F9B3","label":"woman: light skin tone, white hair","order":624,"unicode":"👩🏻🦳"},{"group":1,"hexcode":"1F469-1F3FC-200D-1F9B3","label":"woman: medium-light skin tone, white hair","order":625,"unicode":"👩🏼🦳"},{"group":1,"hexcode":"1F469-1F3FD-200D-1F9B3","label":"woman: medium skin tone, white hair","order":626,"unicode":"👩🏽🦳"},{"group":1,"hexcode":"1F469-1F3FE-200D-1F9B3","label":"woman: medium-dark skin tone, white hair","order":627,"unicode":"👩🏾🦳"},{"group":1,"hexcode":"1F469-1F3FF-200D-1F9B3","label":"woman: dark skin tone, white hair","order":628,"unicode":"👩🏿🦳"}]},{"group":1,"hexcode":"1F9D1-200D-1F9B3","label":"person: white hair","order":629,"tags":["adult","gender-neutral","person","unspecified gender","white hair"],"unicode":"🧑🦳","skins":[{"group":1,"hexcode":"1F9D1-1F3FB-200D-1F9B3","label":"person: light skin tone, white hair","order":630,"unicode":"🧑🏻🦳"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-1F9B3","label":"person: medium-light skin tone, white hair","order":631,"unicode":"🧑🏼🦳"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-1F9B3","label":"person: medium skin tone, white hair","order":632,"unicode":"🧑🏽🦳"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-1F9B3","label":"person: medium-dark skin tone, white hair","order":633,"unicode":"🧑🏾🦳"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-1F9B3","label":"person: dark skin tone, white hair","order":634,"unicode":"🧑🏿🦳"}]},{"group":1,"hexcode":"1F469-200D-1F9B2","label":"woman: bald","order":635,"tags":["adult","bald","woman"],"unicode":"👩🦲","skins":[{"group":1,"hexcode":"1F469-1F3FB-200D-1F9B2","label":"woman: light skin tone, bald","order":636,"unicode":"👩🏻🦲"},{"group":1,"hexcode":"1F469-1F3FC-200D-1F9B2","label":"woman: medium-light skin tone, bald","order":637,"unicode":"👩🏼🦲"},{"group":1,"hexcode":"1F469-1F3FD-200D-1F9B2","label":"woman: medium skin tone, bald","order":638,"unicode":"👩🏽🦲"},{"group":1,"hexcode":"1F469-1F3FE-200D-1F9B2","label":"woman: medium-dark skin tone, bald","order":639,"unicode":"👩🏾🦲"},{"group":1,"hexcode":"1F469-1F3FF-200D-1F9B2","label":"woman: dark skin tone, bald","order":640,"unicode":"👩🏿🦲"}]},{"group":1,"hexcode":"1F9D1-200D-1F9B2","label":"person: bald","order":641,"tags":["adult","bald","gender-neutral","person","unspecified gender"],"unicode":"🧑🦲","skins":[{"group":1,"hexcode":"1F9D1-1F3FB-200D-1F9B2","label":"person: light skin tone, bald","order":642,"unicode":"🧑🏻🦲"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-1F9B2","label":"person: medium-light skin tone, bald","order":643,"unicode":"🧑🏼🦲"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-1F9B2","label":"person: medium skin tone, bald","order":644,"unicode":"🧑🏽🦲"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-1F9B2","label":"person: medium-dark skin tone, bald","order":645,"unicode":"🧑🏾🦲"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-1F9B2","label":"person: dark skin tone, bald","order":646,"unicode":"🧑🏿🦲"}]},{"group":1,"hexcode":"1F471-200D-2640-FE0F","label":"woman: blond hair","order":647,"tags":["blond-haired woman","blonde","hair","woman"],"unicode":"👱♀️","skins":[{"group":1,"hexcode":"1F471-1F3FB-200D-2640-FE0F","label":"woman: light skin tone, blond hair","order":649,"unicode":"👱🏻♀️"},{"group":1,"hexcode":"1F471-1F3FC-200D-2640-FE0F","label":"woman: medium-light skin tone, blond hair","order":651,"unicode":"👱🏼♀️"},{"group":1,"hexcode":"1F471-1F3FD-200D-2640-FE0F","label":"woman: medium skin tone, blond hair","order":653,"unicode":"👱🏽♀️"},{"group":1,"hexcode":"1F471-1F3FE-200D-2640-FE0F","label":"woman: medium-dark skin tone, blond hair","order":655,"unicode":"👱🏾♀️"},{"group":1,"hexcode":"1F471-1F3FF-200D-2640-FE0F","label":"woman: dark skin tone, blond hair","order":657,"unicode":"👱🏿♀️"}]},{"group":1,"hexcode":"1F471-200D-2642-FE0F","label":"man: blond hair","order":659,"tags":["blond","blond-haired man","hair","man"],"unicode":"👱♂️","skins":[{"group":1,"hexcode":"1F471-1F3FB-200D-2642-FE0F","label":"man: light skin tone, blond hair","order":661,"unicode":"👱🏻♂️"},{"group":1,"hexcode":"1F471-1F3FC-200D-2642-FE0F","label":"man: medium-light skin tone, blond hair","order":663,"unicode":"👱🏼♂️"},{"group":1,"hexcode":"1F471-1F3FD-200D-2642-FE0F","label":"man: medium skin tone, blond hair","order":665,"unicode":"👱🏽♂️"},{"group":1,"hexcode":"1F471-1F3FE-200D-2642-FE0F","label":"man: medium-dark skin tone, blond hair","order":667,"unicode":"👱🏾♂️"},{"group":1,"hexcode":"1F471-1F3FF-200D-2642-FE0F","label":"man: dark skin tone, blond hair","order":669,"unicode":"👱🏿♂️"}]},{"group":1,"hexcode":"1F9D3","label":"older person","order":671,"tags":["adult","gender-neutral","old","unspecified gender"],"unicode":"🧓","skins":[{"group":1,"hexcode":"1F9D3-1F3FB","label":"older person: light skin tone","order":672,"unicode":"🧓🏻"},{"group":1,"hexcode":"1F9D3-1F3FC","label":"older person: medium-light skin tone","order":673,"unicode":"🧓🏼"},{"group":1,"hexcode":"1F9D3-1F3FD","label":"older person: medium skin tone","order":674,"unicode":"🧓🏽"},{"group":1,"hexcode":"1F9D3-1F3FE","label":"older person: medium-dark skin tone","order":675,"unicode":"🧓🏾"},{"group":1,"hexcode":"1F9D3-1F3FF","label":"older person: dark skin tone","order":676,"unicode":"🧓🏿"}]},{"group":1,"hexcode":"1F474","label":"old man","order":677,"tags":["adult","man","old"],"unicode":"👴","skins":[{"group":1,"hexcode":"1F474-1F3FB","label":"old man: light skin tone","order":678,"unicode":"👴🏻"},{"group":1,"hexcode":"1F474-1F3FC","label":"old man: medium-light skin tone","order":679,"unicode":"👴🏼"},{"group":1,"hexcode":"1F474-1F3FD","label":"old man: medium skin tone","order":680,"unicode":"👴🏽"},{"group":1,"hexcode":"1F474-1F3FE","label":"old man: medium-dark skin tone","order":681,"unicode":"👴🏾"},{"group":1,"hexcode":"1F474-1F3FF","label":"old man: dark skin tone","order":682,"unicode":"👴🏿"}]},{"group":1,"hexcode":"1F475","label":"old woman","order":683,"tags":["adult","old","woman"],"unicode":"👵","skins":[{"group":1,"hexcode":"1F475-1F3FB","label":"old woman: light skin tone","order":684,"unicode":"👵🏻"},{"group":1,"hexcode":"1F475-1F3FC","label":"old woman: medium-light skin tone","order":685,"unicode":"👵🏼"},{"group":1,"hexcode":"1F475-1F3FD","label":"old woman: medium skin tone","order":686,"unicode":"👵🏽"},{"group":1,"hexcode":"1F475-1F3FE","label":"old woman: medium-dark skin tone","order":687,"unicode":"👵🏾"},{"group":1,"hexcode":"1F475-1F3FF","label":"old woman: dark skin tone","order":688,"unicode":"👵🏿"}]},{"group":1,"hexcode":"1F64D","label":"person frowning","order":689,"tags":["frown","gesture"],"unicode":"🙍","skins":[{"group":1,"hexcode":"1F64D-1F3FB","label":"person frowning: light skin tone","order":690,"unicode":"🙍🏻"},{"group":1,"hexcode":"1F64D-1F3FC","label":"person frowning: medium-light skin tone","order":691,"unicode":"🙍🏼"},{"group":1,"hexcode":"1F64D-1F3FD","label":"person frowning: medium skin tone","order":692,"unicode":"🙍🏽"},{"group":1,"hexcode":"1F64D-1F3FE","label":"person frowning: medium-dark skin tone","order":693,"unicode":"🙍🏾"},{"group":1,"hexcode":"1F64D-1F3FF","label":"person frowning: dark skin tone","order":694,"unicode":"🙍🏿"}]},{"group":1,"hexcode":"1F64D-200D-2642-FE0F","label":"man frowning","order":695,"tags":["frowning","gesture","man"],"unicode":"🙍♂️","skins":[{"group":1,"hexcode":"1F64D-1F3FB-200D-2642-FE0F","label":"man frowning: light skin tone","order":697,"unicode":"🙍🏻♂️"},{"group":1,"hexcode":"1F64D-1F3FC-200D-2642-FE0F","label":"man frowning: medium-light skin tone","order":699,"unicode":"🙍🏼♂️"},{"group":1,"hexcode":"1F64D-1F3FD-200D-2642-FE0F","label":"man frowning: medium skin tone","order":701,"unicode":"🙍🏽♂️"},{"group":1,"hexcode":"1F64D-1F3FE-200D-2642-FE0F","label":"man frowning: medium-dark skin tone","order":703,"unicode":"🙍🏾♂️"},{"group":1,"hexcode":"1F64D-1F3FF-200D-2642-FE0F","label":"man frowning: dark skin tone","order":705,"unicode":"🙍🏿♂️"}]},{"group":1,"hexcode":"1F64D-200D-2640-FE0F","label":"woman frowning","order":707,"tags":["frowning","gesture","woman"],"unicode":"🙍♀️","skins":[{"group":1,"hexcode":"1F64D-1F3FB-200D-2640-FE0F","label":"woman frowning: light skin tone","order":709,"unicode":"🙍🏻♀️"},{"group":1,"hexcode":"1F64D-1F3FC-200D-2640-FE0F","label":"woman frowning: medium-light skin tone","order":711,"unicode":"🙍🏼♀️"},{"group":1,"hexcode":"1F64D-1F3FD-200D-2640-FE0F","label":"woman frowning: medium skin tone","order":713,"unicode":"🙍🏽♀️"},{"group":1,"hexcode":"1F64D-1F3FE-200D-2640-FE0F","label":"woman frowning: medium-dark skin tone","order":715,"unicode":"🙍🏾♀️"},{"group":1,"hexcode":"1F64D-1F3FF-200D-2640-FE0F","label":"woman frowning: dark skin tone","order":717,"unicode":"🙍🏿♀️"}]},{"group":1,"hexcode":"1F64E","label":"person pouting","order":719,"tags":["gesture","pouting"],"unicode":"🙎","skins":[{"group":1,"hexcode":"1F64E-1F3FB","label":"person pouting: light skin tone","order":720,"unicode":"🙎🏻"},{"group":1,"hexcode":"1F64E-1F3FC","label":"person pouting: medium-light skin tone","order":721,"unicode":"🙎🏼"},{"group":1,"hexcode":"1F64E-1F3FD","label":"person pouting: medium skin tone","order":722,"unicode":"🙎🏽"},{"group":1,"hexcode":"1F64E-1F3FE","label":"person pouting: medium-dark skin tone","order":723,"unicode":"🙎🏾"},{"group":1,"hexcode":"1F64E-1F3FF","label":"person pouting: dark skin tone","order":724,"unicode":"🙎🏿"}]},{"group":1,"hexcode":"1F64E-200D-2642-FE0F","label":"man pouting","order":725,"tags":["gesture","man","pouting"],"unicode":"🙎♂️","skins":[{"group":1,"hexcode":"1F64E-1F3FB-200D-2642-FE0F","label":"man pouting: light skin tone","order":727,"unicode":"🙎🏻♂️"},{"group":1,"hexcode":"1F64E-1F3FC-200D-2642-FE0F","label":"man pouting: medium-light skin tone","order":729,"unicode":"🙎🏼♂️"},{"group":1,"hexcode":"1F64E-1F3FD-200D-2642-FE0F","label":"man pouting: medium skin tone","order":731,"unicode":"🙎🏽♂️"},{"group":1,"hexcode":"1F64E-1F3FE-200D-2642-FE0F","label":"man pouting: medium-dark skin tone","order":733,"unicode":"🙎🏾♂️"},{"group":1,"hexcode":"1F64E-1F3FF-200D-2642-FE0F","label":"man pouting: dark skin tone","order":735,"unicode":"🙎🏿♂️"}]},{"group":1,"hexcode":"1F64E-200D-2640-FE0F","label":"woman pouting","order":737,"tags":["gesture","pouting","woman"],"unicode":"🙎♀️","skins":[{"group":1,"hexcode":"1F64E-1F3FB-200D-2640-FE0F","label":"woman pouting: light skin tone","order":739,"unicode":"🙎🏻♀️"},{"group":1,"hexcode":"1F64E-1F3FC-200D-2640-FE0F","label":"woman pouting: medium-light skin tone","order":741,"unicode":"🙎🏼♀️"},{"group":1,"hexcode":"1F64E-1F3FD-200D-2640-FE0F","label":"woman pouting: medium skin tone","order":743,"unicode":"🙎🏽♀️"},{"group":1,"hexcode":"1F64E-1F3FE-200D-2640-FE0F","label":"woman pouting: medium-dark skin tone","order":745,"unicode":"🙎🏾♀️"},{"group":1,"hexcode":"1F64E-1F3FF-200D-2640-FE0F","label":"woman pouting: dark skin tone","order":747,"unicode":"🙎🏿♀️"}]},{"group":1,"hexcode":"1F645","label":"person gesturing NO","order":749,"tags":["forbidden","gesture","hand","person gesturing no","prohibited"],"unicode":"🙅","skins":[{"group":1,"hexcode":"1F645-1F3FB","label":"person gesturing NO: light skin tone","order":750,"unicode":"🙅🏻"},{"group":1,"hexcode":"1F645-1F3FC","label":"person gesturing NO: medium-light skin tone","order":751,"unicode":"🙅🏼"},{"group":1,"hexcode":"1F645-1F3FD","label":"person gesturing NO: medium skin tone","order":752,"unicode":"🙅🏽"},{"group":1,"hexcode":"1F645-1F3FE","label":"person gesturing NO: medium-dark skin tone","order":753,"unicode":"🙅🏾"},{"group":1,"hexcode":"1F645-1F3FF","label":"person gesturing NO: dark skin tone","order":754,"unicode":"🙅🏿"}]},{"group":1,"hexcode":"1F645-200D-2642-FE0F","label":"man gesturing NO","order":755,"tags":["forbidden","gesture","hand","man","man gesturing no","prohibited"],"unicode":"🙅♂️","skins":[{"group":1,"hexcode":"1F645-1F3FB-200D-2642-FE0F","label":"man gesturing NO: light skin tone","order":757,"unicode":"🙅🏻♂️"},{"group":1,"hexcode":"1F645-1F3FC-200D-2642-FE0F","label":"man gesturing NO: medium-light skin tone","order":759,"unicode":"🙅🏼♂️"},{"group":1,"hexcode":"1F645-1F3FD-200D-2642-FE0F","label":"man gesturing NO: medium skin tone","order":761,"unicode":"🙅🏽♂️"},{"group":1,"hexcode":"1F645-1F3FE-200D-2642-FE0F","label":"man gesturing NO: medium-dark skin tone","order":763,"unicode":"🙅🏾♂️"},{"group":1,"hexcode":"1F645-1F3FF-200D-2642-FE0F","label":"man gesturing NO: dark skin tone","order":765,"unicode":"🙅🏿♂️"}]},{"group":1,"hexcode":"1F645-200D-2640-FE0F","label":"woman gesturing NO","order":767,"tags":["forbidden","gesture","hand","prohibited","woman","woman gesturing no"],"unicode":"🙅♀️","skins":[{"group":1,"hexcode":"1F645-1F3FB-200D-2640-FE0F","label":"woman gesturing NO: light skin tone","order":769,"unicode":"🙅🏻♀️"},{"group":1,"hexcode":"1F645-1F3FC-200D-2640-FE0F","label":"woman gesturing NO: medium-light skin tone","order":771,"unicode":"🙅🏼♀️"},{"group":1,"hexcode":"1F645-1F3FD-200D-2640-FE0F","label":"woman gesturing NO: medium skin tone","order":773,"unicode":"🙅🏽♀️"},{"group":1,"hexcode":"1F645-1F3FE-200D-2640-FE0F","label":"woman gesturing NO: medium-dark skin tone","order":775,"unicode":"🙅🏾♀️"},{"group":1,"hexcode":"1F645-1F3FF-200D-2640-FE0F","label":"woman gesturing NO: dark skin tone","order":777,"unicode":"🙅🏿♀️"}]},{"group":1,"hexcode":"1F646","label":"person gesturing OK","order":779,"tags":["gesture","hand","ok","person gesturing ok"],"unicode":"🙆","skins":[{"group":1,"hexcode":"1F646-1F3FB","label":"person gesturing OK: light skin tone","order":780,"unicode":"🙆🏻"},{"group":1,"hexcode":"1F646-1F3FC","label":"person gesturing OK: medium-light skin tone","order":781,"unicode":"🙆🏼"},{"group":1,"hexcode":"1F646-1F3FD","label":"person gesturing OK: medium skin tone","order":782,"unicode":"🙆🏽"},{"group":1,"hexcode":"1F646-1F3FE","label":"person gesturing OK: medium-dark skin tone","order":783,"unicode":"🙆🏾"},{"group":1,"hexcode":"1F646-1F3FF","label":"person gesturing OK: dark skin tone","order":784,"unicode":"🙆🏿"}]},{"group":1,"hexcode":"1F646-200D-2642-FE0F","label":"man gesturing OK","order":785,"tags":["gesture","hand","man","man gesturing ok","ok"],"unicode":"🙆♂️","skins":[{"group":1,"hexcode":"1F646-1F3FB-200D-2642-FE0F","label":"man gesturing OK: light skin tone","order":787,"unicode":"🙆🏻♂️"},{"group":1,"hexcode":"1F646-1F3FC-200D-2642-FE0F","label":"man gesturing OK: medium-light skin tone","order":789,"unicode":"🙆🏼♂️"},{"group":1,"hexcode":"1F646-1F3FD-200D-2642-FE0F","label":"man gesturing OK: medium skin tone","order":791,"unicode":"🙆🏽♂️"},{"group":1,"hexcode":"1F646-1F3FE-200D-2642-FE0F","label":"man gesturing OK: medium-dark skin tone","order":793,"unicode":"🙆🏾♂️"},{"group":1,"hexcode":"1F646-1F3FF-200D-2642-FE0F","label":"man gesturing OK: dark skin tone","order":795,"unicode":"🙆🏿♂️"}]},{"group":1,"hexcode":"1F646-200D-2640-FE0F","label":"woman gesturing OK","order":797,"tags":["gesture","hand","ok","woman","woman gesturing ok"],"unicode":"🙆♀️","skins":[{"group":1,"hexcode":"1F646-1F3FB-200D-2640-FE0F","label":"woman gesturing OK: light skin tone","order":799,"unicode":"🙆🏻♀️"},{"group":1,"hexcode":"1F646-1F3FC-200D-2640-FE0F","label":"woman gesturing OK: medium-light skin tone","order":801,"unicode":"🙆🏼♀️"},{"group":1,"hexcode":"1F646-1F3FD-200D-2640-FE0F","label":"woman gesturing OK: medium skin tone","order":803,"unicode":"🙆🏽♀️"},{"group":1,"hexcode":"1F646-1F3FE-200D-2640-FE0F","label":"woman gesturing OK: medium-dark skin tone","order":805,"unicode":"🙆🏾♀️"},{"group":1,"hexcode":"1F646-1F3FF-200D-2640-FE0F","label":"woman gesturing OK: dark skin tone","order":807,"unicode":"🙆🏿♀️"}]},{"group":1,"hexcode":"1F481","label":"person tipping hand","order":809,"tags":["hand","help","information","sassy","tipping"],"unicode":"💁","skins":[{"group":1,"hexcode":"1F481-1F3FB","label":"person tipping hand: light skin tone","order":810,"unicode":"💁🏻"},{"group":1,"hexcode":"1F481-1F3FC","label":"person tipping hand: medium-light skin tone","order":811,"unicode":"💁🏼"},{"group":1,"hexcode":"1F481-1F3FD","label":"person tipping hand: medium skin tone","order":812,"unicode":"💁🏽"},{"group":1,"hexcode":"1F481-1F3FE","label":"person tipping hand: medium-dark skin tone","order":813,"unicode":"💁🏾"},{"group":1,"hexcode":"1F481-1F3FF","label":"person tipping hand: dark skin tone","order":814,"unicode":"💁🏿"}]},{"group":1,"hexcode":"1F481-200D-2642-FE0F","label":"man tipping hand","order":815,"tags":["man","sassy","tipping hand"],"unicode":"💁♂️","skins":[{"group":1,"hexcode":"1F481-1F3FB-200D-2642-FE0F","label":"man tipping hand: light skin tone","order":817,"unicode":"💁🏻♂️"},{"group":1,"hexcode":"1F481-1F3FC-200D-2642-FE0F","label":"man tipping hand: medium-light skin tone","order":819,"unicode":"💁🏼♂️"},{"group":1,"hexcode":"1F481-1F3FD-200D-2642-FE0F","label":"man tipping hand: medium skin tone","order":821,"unicode":"💁🏽♂️"},{"group":1,"hexcode":"1F481-1F3FE-200D-2642-FE0F","label":"man tipping hand: medium-dark skin tone","order":823,"unicode":"💁🏾♂️"},{"group":1,"hexcode":"1F481-1F3FF-200D-2642-FE0F","label":"man tipping hand: dark skin tone","order":825,"unicode":"💁🏿♂️"}]},{"group":1,"hexcode":"1F481-200D-2640-FE0F","label":"woman tipping hand","order":827,"tags":["sassy","tipping hand","woman"],"unicode":"💁♀️","skins":[{"group":1,"hexcode":"1F481-1F3FB-200D-2640-FE0F","label":"woman tipping hand: light skin tone","order":829,"unicode":"💁🏻♀️"},{"group":1,"hexcode":"1F481-1F3FC-200D-2640-FE0F","label":"woman tipping hand: medium-light skin tone","order":831,"unicode":"💁🏼♀️"},{"group":1,"hexcode":"1F481-1F3FD-200D-2640-FE0F","label":"woman tipping hand: medium skin tone","order":833,"unicode":"💁🏽♀️"},{"group":1,"hexcode":"1F481-1F3FE-200D-2640-FE0F","label":"woman tipping hand: medium-dark skin tone","order":835,"unicode":"💁🏾♀️"},{"group":1,"hexcode":"1F481-1F3FF-200D-2640-FE0F","label":"woman tipping hand: dark skin tone","order":837,"unicode":"💁🏿♀️"}]},{"group":1,"hexcode":"1F64B","label":"person raising hand","order":839,"tags":["gesture","hand","happy","raised"],"unicode":"🙋","skins":[{"group":1,"hexcode":"1F64B-1F3FB","label":"person raising hand: light skin tone","order":840,"unicode":"🙋🏻"},{"group":1,"hexcode":"1F64B-1F3FC","label":"person raising hand: medium-light skin tone","order":841,"unicode":"🙋🏼"},{"group":1,"hexcode":"1F64B-1F3FD","label":"person raising hand: medium skin tone","order":842,"unicode":"🙋🏽"},{"group":1,"hexcode":"1F64B-1F3FE","label":"person raising hand: medium-dark skin tone","order":843,"unicode":"🙋🏾"},{"group":1,"hexcode":"1F64B-1F3FF","label":"person raising hand: dark skin tone","order":844,"unicode":"🙋🏿"}]},{"group":1,"hexcode":"1F64B-200D-2642-FE0F","label":"man raising hand","order":845,"tags":["gesture","man","raising hand"],"unicode":"🙋♂️","skins":[{"group":1,"hexcode":"1F64B-1F3FB-200D-2642-FE0F","label":"man raising hand: light skin tone","order":847,"unicode":"🙋🏻♂️"},{"group":1,"hexcode":"1F64B-1F3FC-200D-2642-FE0F","label":"man raising hand: medium-light skin tone","order":849,"unicode":"🙋🏼♂️"},{"group":1,"hexcode":"1F64B-1F3FD-200D-2642-FE0F","label":"man raising hand: medium skin tone","order":851,"unicode":"🙋🏽♂️"},{"group":1,"hexcode":"1F64B-1F3FE-200D-2642-FE0F","label":"man raising hand: medium-dark skin tone","order":853,"unicode":"🙋🏾♂️"},{"group":1,"hexcode":"1F64B-1F3FF-200D-2642-FE0F","label":"man raising hand: dark skin tone","order":855,"unicode":"🙋🏿♂️"}]},{"group":1,"hexcode":"1F64B-200D-2640-FE0F","label":"woman raising hand","order":857,"tags":["gesture","raising hand","woman"],"unicode":"🙋♀️","skins":[{"group":1,"hexcode":"1F64B-1F3FB-200D-2640-FE0F","label":"woman raising hand: light skin tone","order":859,"unicode":"🙋🏻♀️"},{"group":1,"hexcode":"1F64B-1F3FC-200D-2640-FE0F","label":"woman raising hand: medium-light skin tone","order":861,"unicode":"🙋🏼♀️"},{"group":1,"hexcode":"1F64B-1F3FD-200D-2640-FE0F","label":"woman raising hand: medium skin tone","order":863,"unicode":"🙋🏽♀️"},{"group":1,"hexcode":"1F64B-1F3FE-200D-2640-FE0F","label":"woman raising hand: medium-dark skin tone","order":865,"unicode":"🙋🏾♀️"},{"group":1,"hexcode":"1F64B-1F3FF-200D-2640-FE0F","label":"woman raising hand: dark skin tone","order":867,"unicode":"🙋🏿♀️"}]},{"group":1,"hexcode":"1F9CF","label":"deaf person","order":869,"tags":["accessibility","deaf","ear","hear"],"unicode":"🧏","skins":[{"group":1,"hexcode":"1F9CF-1F3FB","label":"deaf person: light skin tone","order":870,"unicode":"🧏🏻"},{"group":1,"hexcode":"1F9CF-1F3FC","label":"deaf person: medium-light skin tone","order":871,"unicode":"🧏🏼"},{"group":1,"hexcode":"1F9CF-1F3FD","label":"deaf person: medium skin tone","order":872,"unicode":"🧏🏽"},{"group":1,"hexcode":"1F9CF-1F3FE","label":"deaf person: medium-dark skin tone","order":873,"unicode":"🧏🏾"},{"group":1,"hexcode":"1F9CF-1F3FF","label":"deaf person: dark skin tone","order":874,"unicode":"🧏🏿"}]},{"group":1,"hexcode":"1F9CF-200D-2642-FE0F","label":"deaf man","order":875,"tags":["deaf","man"],"unicode":"🧏♂️","skins":[{"group":1,"hexcode":"1F9CF-1F3FB-200D-2642-FE0F","label":"deaf man: light skin tone","order":877,"unicode":"🧏🏻♂️"},{"group":1,"hexcode":"1F9CF-1F3FC-200D-2642-FE0F","label":"deaf man: medium-light skin tone","order":879,"unicode":"🧏🏼♂️"},{"group":1,"hexcode":"1F9CF-1F3FD-200D-2642-FE0F","label":"deaf man: medium skin tone","order":881,"unicode":"🧏🏽♂️"},{"group":1,"hexcode":"1F9CF-1F3FE-200D-2642-FE0F","label":"deaf man: medium-dark skin tone","order":883,"unicode":"🧏🏾♂️"},{"group":1,"hexcode":"1F9CF-1F3FF-200D-2642-FE0F","label":"deaf man: dark skin tone","order":885,"unicode":"🧏🏿♂️"}]},{"group":1,"hexcode":"1F9CF-200D-2640-FE0F","label":"deaf woman","order":887,"tags":["deaf","woman"],"unicode":"🧏♀️","skins":[{"group":1,"hexcode":"1F9CF-1F3FB-200D-2640-FE0F","label":"deaf woman: light skin tone","order":889,"unicode":"🧏🏻♀️"},{"group":1,"hexcode":"1F9CF-1F3FC-200D-2640-FE0F","label":"deaf woman: medium-light skin tone","order":891,"unicode":"🧏🏼♀️"},{"group":1,"hexcode":"1F9CF-1F3FD-200D-2640-FE0F","label":"deaf woman: medium skin tone","order":893,"unicode":"🧏🏽♀️"},{"group":1,"hexcode":"1F9CF-1F3FE-200D-2640-FE0F","label":"deaf woman: medium-dark skin tone","order":895,"unicode":"🧏🏾♀️"},{"group":1,"hexcode":"1F9CF-1F3FF-200D-2640-FE0F","label":"deaf woman: dark skin tone","order":897,"unicode":"🧏🏿♀️"}]},{"group":1,"hexcode":"1F647","label":"person bowing","order":899,"tags":["apology","bow","gesture","sorry"],"unicode":"🙇","skins":[{"group":1,"hexcode":"1F647-1F3FB","label":"person bowing: light skin tone","order":900,"unicode":"🙇🏻"},{"group":1,"hexcode":"1F647-1F3FC","label":"person bowing: medium-light skin tone","order":901,"unicode":"🙇🏼"},{"group":1,"hexcode":"1F647-1F3FD","label":"person bowing: medium skin tone","order":902,"unicode":"🙇🏽"},{"group":1,"hexcode":"1F647-1F3FE","label":"person bowing: medium-dark skin tone","order":903,"unicode":"🙇🏾"},{"group":1,"hexcode":"1F647-1F3FF","label":"person bowing: dark skin tone","order":904,"unicode":"🙇🏿"}]},{"group":1,"hexcode":"1F647-200D-2642-FE0F","label":"man bowing","order":905,"tags":["apology","bowing","favor","gesture","man","sorry"],"unicode":"🙇♂️","skins":[{"group":1,"hexcode":"1F647-1F3FB-200D-2642-FE0F","label":"man bowing: light skin tone","order":907,"unicode":"🙇🏻♂️"},{"group":1,"hexcode":"1F647-1F3FC-200D-2642-FE0F","label":"man bowing: medium-light skin tone","order":909,"unicode":"🙇🏼♂️"},{"group":1,"hexcode":"1F647-1F3FD-200D-2642-FE0F","label":"man bowing: medium skin tone","order":911,"unicode":"🙇🏽♂️"},{"group":1,"hexcode":"1F647-1F3FE-200D-2642-FE0F","label":"man bowing: medium-dark skin tone","order":913,"unicode":"🙇🏾♂️"},{"group":1,"hexcode":"1F647-1F3FF-200D-2642-FE0F","label":"man bowing: dark skin tone","order":915,"unicode":"🙇🏿♂️"}]},{"group":1,"hexcode":"1F647-200D-2640-FE0F","label":"woman bowing","order":917,"tags":["apology","bowing","favor","gesture","sorry","woman"],"unicode":"🙇♀️","skins":[{"group":1,"hexcode":"1F647-1F3FB-200D-2640-FE0F","label":"woman bowing: light skin tone","order":919,"unicode":"🙇🏻♀️"},{"group":1,"hexcode":"1F647-1F3FC-200D-2640-FE0F","label":"woman bowing: medium-light skin tone","order":921,"unicode":"🙇🏼♀️"},{"group":1,"hexcode":"1F647-1F3FD-200D-2640-FE0F","label":"woman bowing: medium skin tone","order":923,"unicode":"🙇🏽♀️"},{"group":1,"hexcode":"1F647-1F3FE-200D-2640-FE0F","label":"woman bowing: medium-dark skin tone","order":925,"unicode":"🙇🏾♀️"},{"group":1,"hexcode":"1F647-1F3FF-200D-2640-FE0F","label":"woman bowing: dark skin tone","order":927,"unicode":"🙇🏿♀️"}]},{"group":1,"hexcode":"1F926","label":"person facepalming","order":929,"tags":["disbelief","exasperation","face","palm"],"unicode":"🤦","skins":[{"group":1,"hexcode":"1F926-1F3FB","label":"person facepalming: light skin tone","order":930,"unicode":"🤦🏻"},{"group":1,"hexcode":"1F926-1F3FC","label":"person facepalming: medium-light skin tone","order":931,"unicode":"🤦🏼"},{"group":1,"hexcode":"1F926-1F3FD","label":"person facepalming: medium skin tone","order":932,"unicode":"🤦🏽"},{"group":1,"hexcode":"1F926-1F3FE","label":"person facepalming: medium-dark skin tone","order":933,"unicode":"🤦🏾"},{"group":1,"hexcode":"1F926-1F3FF","label":"person facepalming: dark skin tone","order":934,"unicode":"🤦🏿"}]},{"group":1,"hexcode":"1F926-200D-2642-FE0F","label":"man facepalming","order":935,"tags":["disbelief","exasperation","facepalm","man"],"unicode":"🤦♂️","skins":[{"group":1,"hexcode":"1F926-1F3FB-200D-2642-FE0F","label":"man facepalming: light skin tone","order":937,"unicode":"🤦🏻♂️"},{"group":1,"hexcode":"1F926-1F3FC-200D-2642-FE0F","label":"man facepalming: medium-light skin tone","order":939,"unicode":"🤦🏼♂️"},{"group":1,"hexcode":"1F926-1F3FD-200D-2642-FE0F","label":"man facepalming: medium skin tone","order":941,"unicode":"🤦🏽♂️"},{"group":1,"hexcode":"1F926-1F3FE-200D-2642-FE0F","label":"man facepalming: medium-dark skin tone","order":943,"unicode":"🤦🏾♂️"},{"group":1,"hexcode":"1F926-1F3FF-200D-2642-FE0F","label":"man facepalming: dark skin tone","order":945,"unicode":"🤦🏿♂️"}]},{"group":1,"hexcode":"1F926-200D-2640-FE0F","label":"woman facepalming","order":947,"tags":["disbelief","exasperation","facepalm","woman"],"unicode":"🤦♀️","skins":[{"group":1,"hexcode":"1F926-1F3FB-200D-2640-FE0F","label":"woman facepalming: light skin tone","order":949,"unicode":"🤦🏻♀️"},{"group":1,"hexcode":"1F926-1F3FC-200D-2640-FE0F","label":"woman facepalming: medium-light skin tone","order":951,"unicode":"🤦🏼♀️"},{"group":1,"hexcode":"1F926-1F3FD-200D-2640-FE0F","label":"woman facepalming: medium skin tone","order":953,"unicode":"🤦🏽♀️"},{"group":1,"hexcode":"1F926-1F3FE-200D-2640-FE0F","label":"woman facepalming: medium-dark skin tone","order":955,"unicode":"🤦🏾♀️"},{"group":1,"hexcode":"1F926-1F3FF-200D-2640-FE0F","label":"woman facepalming: dark skin tone","order":957,"unicode":"🤦🏿♀️"}]},{"group":1,"hexcode":"1F937","label":"person shrugging","order":959,"tags":["doubt","ignorance","indifference","shrug"],"unicode":"🤷","skins":[{"group":1,"hexcode":"1F937-1F3FB","label":"person shrugging: light skin tone","order":960,"unicode":"🤷🏻"},{"group":1,"hexcode":"1F937-1F3FC","label":"person shrugging: medium-light skin tone","order":961,"unicode":"🤷🏼"},{"group":1,"hexcode":"1F937-1F3FD","label":"person shrugging: medium skin tone","order":962,"unicode":"🤷🏽"},{"group":1,"hexcode":"1F937-1F3FE","label":"person shrugging: medium-dark skin tone","order":963,"unicode":"🤷🏾"},{"group":1,"hexcode":"1F937-1F3FF","label":"person shrugging: dark skin tone","order":964,"unicode":"🤷🏿"}]},{"group":1,"hexcode":"1F937-200D-2642-FE0F","label":"man shrugging","order":965,"tags":["doubt","ignorance","indifference","man","shrug"],"unicode":"🤷♂️","skins":[{"group":1,"hexcode":"1F937-1F3FB-200D-2642-FE0F","label":"man shrugging: light skin tone","order":967,"unicode":"🤷🏻♂️"},{"group":1,"hexcode":"1F937-1F3FC-200D-2642-FE0F","label":"man shrugging: medium-light skin tone","order":969,"unicode":"🤷🏼♂️"},{"group":1,"hexcode":"1F937-1F3FD-200D-2642-FE0F","label":"man shrugging: medium skin tone","order":971,"unicode":"🤷🏽♂️"},{"group":1,"hexcode":"1F937-1F3FE-200D-2642-FE0F","label":"man shrugging: medium-dark skin tone","order":973,"unicode":"🤷🏾♂️"},{"group":1,"hexcode":"1F937-1F3FF-200D-2642-FE0F","label":"man shrugging: dark skin tone","order":975,"unicode":"🤷🏿♂️"}]},{"group":1,"hexcode":"1F937-200D-2640-FE0F","label":"woman shrugging","order":977,"tags":["doubt","ignorance","indifference","shrug","woman"],"unicode":"🤷♀️","skins":[{"group":1,"hexcode":"1F937-1F3FB-200D-2640-FE0F","label":"woman shrugging: light skin tone","order":979,"unicode":"🤷🏻♀️"},{"group":1,"hexcode":"1F937-1F3FC-200D-2640-FE0F","label":"woman shrugging: medium-light skin tone","order":981,"unicode":"🤷🏼♀️"},{"group":1,"hexcode":"1F937-1F3FD-200D-2640-FE0F","label":"woman shrugging: medium skin tone","order":983,"unicode":"🤷🏽♀️"},{"group":1,"hexcode":"1F937-1F3FE-200D-2640-FE0F","label":"woman shrugging: medium-dark skin tone","order":985,"unicode":"🤷🏾♀️"},{"group":1,"hexcode":"1F937-1F3FF-200D-2640-FE0F","label":"woman shrugging: dark skin tone","order":987,"unicode":"🤷🏿♀️"}]},{"group":1,"hexcode":"1F9D1-200D-2695-FE0F","label":"health worker","order":989,"tags":["doctor","healthcare","nurse","therapist"],"unicode":"🧑⚕️","skins":[{"group":1,"hexcode":"1F9D1-1F3FB-200D-2695-FE0F","label":"health worker: light skin tone","order":991,"unicode":"🧑🏻⚕️"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-2695-FE0F","label":"health worker: medium-light skin tone","order":993,"unicode":"🧑🏼⚕️"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-2695-FE0F","label":"health worker: medium skin tone","order":995,"unicode":"🧑🏽⚕️"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-2695-FE0F","label":"health worker: medium-dark skin tone","order":997,"unicode":"🧑🏾⚕️"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-2695-FE0F","label":"health worker: dark skin tone","order":999,"unicode":"🧑🏿⚕️"}]},{"group":1,"hexcode":"1F468-200D-2695-FE0F","label":"man health worker","order":1001,"tags":["doctor","healthcare","man","nurse","therapist"],"unicode":"👨⚕️","skins":[{"group":1,"hexcode":"1F468-1F3FB-200D-2695-FE0F","label":"man health worker: light skin tone","order":1003,"unicode":"👨🏻⚕️"},{"group":1,"hexcode":"1F468-1F3FC-200D-2695-FE0F","label":"man health worker: medium-light skin tone","order":1005,"unicode":"👨🏼⚕️"},{"group":1,"hexcode":"1F468-1F3FD-200D-2695-FE0F","label":"man health worker: medium skin tone","order":1007,"unicode":"👨🏽⚕️"},{"group":1,"hexcode":"1F468-1F3FE-200D-2695-FE0F","label":"man health worker: medium-dark skin tone","order":1009,"unicode":"👨🏾⚕️"},{"group":1,"hexcode":"1F468-1F3FF-200D-2695-FE0F","label":"man health worker: dark skin tone","order":1011,"unicode":"👨🏿⚕️"}]},{"group":1,"hexcode":"1F469-200D-2695-FE0F","label":"woman health worker","order":1013,"tags":["doctor","healthcare","nurse","therapist","woman"],"unicode":"👩⚕️","skins":[{"group":1,"hexcode":"1F469-1F3FB-200D-2695-FE0F","label":"woman health worker: light skin tone","order":1015,"unicode":"👩🏻⚕️"},{"group":1,"hexcode":"1F469-1F3FC-200D-2695-FE0F","label":"woman health worker: medium-light skin tone","order":1017,"unicode":"👩🏼⚕️"},{"group":1,"hexcode":"1F469-1F3FD-200D-2695-FE0F","label":"woman health worker: medium skin tone","order":1019,"unicode":"👩🏽⚕️"},{"group":1,"hexcode":"1F469-1F3FE-200D-2695-FE0F","label":"woman health worker: medium-dark skin tone","order":1021,"unicode":"👩🏾⚕️"},{"group":1,"hexcode":"1F469-1F3FF-200D-2695-FE0F","label":"woman health worker: dark skin tone","order":1023,"unicode":"👩🏿⚕️"}]},{"group":1,"hexcode":"1F9D1-200D-1F393","label":"student","order":1025,"tags":["graduate"],"unicode":"🧑🎓","skins":[{"group":1,"hexcode":"1F9D1-1F3FB-200D-1F393","label":"student: light skin tone","order":1026,"unicode":"🧑🏻🎓"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-1F393","label":"student: medium-light skin tone","order":1027,"unicode":"🧑🏼🎓"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-1F393","label":"student: medium skin tone","order":1028,"unicode":"🧑🏽🎓"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-1F393","label":"student: medium-dark skin tone","order":1029,"unicode":"🧑🏾🎓"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-1F393","label":"student: dark skin tone","order":1030,"unicode":"🧑🏿🎓"}]},{"group":1,"hexcode":"1F468-200D-1F393","label":"man student","order":1031,"tags":["graduate","man","student"],"unicode":"👨🎓","skins":[{"group":1,"hexcode":"1F468-1F3FB-200D-1F393","label":"man student: light skin tone","order":1032,"unicode":"👨🏻🎓"},{"group":1,"hexcode":"1F468-1F3FC-200D-1F393","label":"man student: medium-light skin tone","order":1033,"unicode":"👨🏼🎓"},{"group":1,"hexcode":"1F468-1F3FD-200D-1F393","label":"man student: medium skin tone","order":1034,"unicode":"👨🏽🎓"},{"group":1,"hexcode":"1F468-1F3FE-200D-1F393","label":"man student: medium-dark skin tone","order":1035,"unicode":"👨🏾🎓"},{"group":1,"hexcode":"1F468-1F3FF-200D-1F393","label":"man student: dark skin tone","order":1036,"unicode":"👨🏿🎓"}]},{"group":1,"hexcode":"1F469-200D-1F393","label":"woman student","order":1037,"tags":["graduate","student","woman"],"unicode":"👩🎓","skins":[{"group":1,"hexcode":"1F469-1F3FB-200D-1F393","label":"woman student: light skin tone","order":1038,"unicode":"👩🏻🎓"},{"group":1,"hexcode":"1F469-1F3FC-200D-1F393","label":"woman student: medium-light skin tone","order":1039,"unicode":"👩🏼🎓"},{"group":1,"hexcode":"1F469-1F3FD-200D-1F393","label":"woman student: medium skin tone","order":1040,"unicode":"👩🏽🎓"},{"group":1,"hexcode":"1F469-1F3FE-200D-1F393","label":"woman student: medium-dark skin tone","order":1041,"unicode":"👩🏾🎓"},{"group":1,"hexcode":"1F469-1F3FF-200D-1F393","label":"woman student: dark skin tone","order":1042,"unicode":"👩🏿🎓"}]},{"group":1,"hexcode":"1F9D1-200D-1F3EB","label":"teacher","order":1043,"tags":["instructor","professor"],"unicode":"🧑🏫","skins":[{"group":1,"hexcode":"1F9D1-1F3FB-200D-1F3EB","label":"teacher: light skin tone","order":1044,"unicode":"🧑🏻🏫"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-1F3EB","label":"teacher: medium-light skin tone","order":1045,"unicode":"🧑🏼🏫"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-1F3EB","label":"teacher: medium skin tone","order":1046,"unicode":"🧑🏽🏫"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-1F3EB","label":"teacher: medium-dark skin tone","order":1047,"unicode":"🧑🏾🏫"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-1F3EB","label":"teacher: dark skin tone","order":1048,"unicode":"🧑🏿🏫"}]},{"group":1,"hexcode":"1F468-200D-1F3EB","label":"man teacher","order":1049,"tags":["instructor","man","professor","teacher"],"unicode":"👨🏫","skins":[{"group":1,"hexcode":"1F468-1F3FB-200D-1F3EB","label":"man teacher: light skin tone","order":1050,"unicode":"👨🏻🏫"},{"group":1,"hexcode":"1F468-1F3FC-200D-1F3EB","label":"man teacher: medium-light skin tone","order":1051,"unicode":"👨🏼🏫"},{"group":1,"hexcode":"1F468-1F3FD-200D-1F3EB","label":"man teacher: medium skin tone","order":1052,"unicode":"👨🏽🏫"},{"group":1,"hexcode":"1F468-1F3FE-200D-1F3EB","label":"man teacher: medium-dark skin tone","order":1053,"unicode":"👨🏾🏫"},{"group":1,"hexcode":"1F468-1F3FF-200D-1F3EB","label":"man teacher: dark skin tone","order":1054,"unicode":"👨🏿🏫"}]},{"group":1,"hexcode":"1F469-200D-1F3EB","label":"woman teacher","order":1055,"tags":["instructor","professor","teacher","woman"],"unicode":"👩🏫","skins":[{"group":1,"hexcode":"1F469-1F3FB-200D-1F3EB","label":"woman teacher: light skin tone","order":1056,"unicode":"👩🏻🏫"},{"group":1,"hexcode":"1F469-1F3FC-200D-1F3EB","label":"woman teacher: medium-light skin tone","order":1057,"unicode":"👩🏼🏫"},{"group":1,"hexcode":"1F469-1F3FD-200D-1F3EB","label":"woman teacher: medium skin tone","order":1058,"unicode":"👩🏽🏫"},{"group":1,"hexcode":"1F469-1F3FE-200D-1F3EB","label":"woman teacher: medium-dark skin tone","order":1059,"unicode":"👩🏾🏫"},{"group":1,"hexcode":"1F469-1F3FF-200D-1F3EB","label":"woman teacher: dark skin tone","order":1060,"unicode":"👩🏿🏫"}]},{"group":1,"hexcode":"1F9D1-200D-2696-FE0F","label":"judge","order":1061,"tags":["justice","scales"],"unicode":"🧑⚖️","skins":[{"group":1,"hexcode":"1F9D1-1F3FB-200D-2696-FE0F","label":"judge: light skin tone","order":1063,"unicode":"🧑🏻⚖️"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-2696-FE0F","label":"judge: medium-light skin tone","order":1065,"unicode":"🧑🏼⚖️"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-2696-FE0F","label":"judge: medium skin tone","order":1067,"unicode":"🧑🏽⚖️"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-2696-FE0F","label":"judge: medium-dark skin tone","order":1069,"unicode":"🧑🏾⚖️"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-2696-FE0F","label":"judge: dark skin tone","order":1071,"unicode":"🧑🏿⚖️"}]},{"group":1,"hexcode":"1F468-200D-2696-FE0F","label":"man judge","order":1073,"tags":["judge","justice","man","scales"],"unicode":"👨⚖️","skins":[{"group":1,"hexcode":"1F468-1F3FB-200D-2696-FE0F","label":"man judge: light skin tone","order":1075,"unicode":"👨🏻⚖️"},{"group":1,"hexcode":"1F468-1F3FC-200D-2696-FE0F","label":"man judge: medium-light skin tone","order":1077,"unicode":"👨🏼⚖️"},{"group":1,"hexcode":"1F468-1F3FD-200D-2696-FE0F","label":"man judge: medium skin tone","order":1079,"unicode":"👨🏽⚖️"},{"group":1,"hexcode":"1F468-1F3FE-200D-2696-FE0F","label":"man judge: medium-dark skin tone","order":1081,"unicode":"👨🏾⚖️"},{"group":1,"hexcode":"1F468-1F3FF-200D-2696-FE0F","label":"man judge: dark skin tone","order":1083,"unicode":"👨🏿⚖️"}]},{"group":1,"hexcode":"1F469-200D-2696-FE0F","label":"woman judge","order":1085,"tags":["judge","justice","scales","woman"],"unicode":"👩⚖️","skins":[{"group":1,"hexcode":"1F469-1F3FB-200D-2696-FE0F","label":"woman judge: light skin tone","order":1087,"unicode":"👩🏻⚖️"},{"group":1,"hexcode":"1F469-1F3FC-200D-2696-FE0F","label":"woman judge: medium-light skin tone","order":1089,"unicode":"👩🏼⚖️"},{"group":1,"hexcode":"1F469-1F3FD-200D-2696-FE0F","label":"woman judge: medium skin tone","order":1091,"unicode":"👩🏽⚖️"},{"group":1,"hexcode":"1F469-1F3FE-200D-2696-FE0F","label":"woman judge: medium-dark skin tone","order":1093,"unicode":"👩🏾⚖️"},{"group":1,"hexcode":"1F469-1F3FF-200D-2696-FE0F","label":"woman judge: dark skin tone","order":1095,"unicode":"👩🏿⚖️"}]},{"group":1,"hexcode":"1F9D1-200D-1F33E","label":"farmer","order":1097,"tags":["gardener","rancher"],"unicode":"🧑🌾","skins":[{"group":1,"hexcode":"1F9D1-1F3FB-200D-1F33E","label":"farmer: light skin tone","order":1098,"unicode":"🧑🏻🌾"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-1F33E","label":"farmer: medium-light skin tone","order":1099,"unicode":"🧑🏼🌾"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-1F33E","label":"farmer: medium skin tone","order":1100,"unicode":"🧑🏽🌾"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-1F33E","label":"farmer: medium-dark skin tone","order":1101,"unicode":"🧑🏾🌾"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-1F33E","label":"farmer: dark skin tone","order":1102,"unicode":"🧑🏿🌾"}]},{"group":1,"hexcode":"1F468-200D-1F33E","label":"man farmer","order":1103,"tags":["farmer","gardener","man","rancher"],"unicode":"👨🌾","skins":[{"group":1,"hexcode":"1F468-1F3FB-200D-1F33E","label":"man farmer: light skin tone","order":1104,"unicode":"👨🏻🌾"},{"group":1,"hexcode":"1F468-1F3FC-200D-1F33E","label":"man farmer: medium-light skin tone","order":1105,"unicode":"👨🏼🌾"},{"group":1,"hexcode":"1F468-1F3FD-200D-1F33E","label":"man farmer: medium skin tone","order":1106,"unicode":"👨🏽🌾"},{"group":1,"hexcode":"1F468-1F3FE-200D-1F33E","label":"man farmer: medium-dark skin tone","order":1107,"unicode":"👨🏾🌾"},{"group":1,"hexcode":"1F468-1F3FF-200D-1F33E","label":"man farmer: dark skin tone","order":1108,"unicode":"👨🏿🌾"}]},{"group":1,"hexcode":"1F469-200D-1F33E","label":"woman farmer","order":1109,"tags":["farmer","gardener","rancher","woman"],"unicode":"👩🌾","skins":[{"group":1,"hexcode":"1F469-1F3FB-200D-1F33E","label":"woman farmer: light skin tone","order":1110,"unicode":"👩🏻🌾"},{"group":1,"hexcode":"1F469-1F3FC-200D-1F33E","label":"woman farmer: medium-light skin tone","order":1111,"unicode":"👩🏼🌾"},{"group":1,"hexcode":"1F469-1F3FD-200D-1F33E","label":"woman farmer: medium skin tone","order":1112,"unicode":"👩🏽🌾"},{"group":1,"hexcode":"1F469-1F3FE-200D-1F33E","label":"woman farmer: medium-dark skin tone","order":1113,"unicode":"👩🏾🌾"},{"group":1,"hexcode":"1F469-1F3FF-200D-1F33E","label":"woman farmer: dark skin tone","order":1114,"unicode":"👩🏿🌾"}]},{"group":1,"hexcode":"1F9D1-200D-1F373","label":"cook","order":1115,"tags":["chef"],"unicode":"🧑🍳","skins":[{"group":1,"hexcode":"1F9D1-1F3FB-200D-1F373","label":"cook: light skin tone","order":1116,"unicode":"🧑🏻🍳"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-1F373","label":"cook: medium-light skin tone","order":1117,"unicode":"🧑🏼🍳"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-1F373","label":"cook: medium skin tone","order":1118,"unicode":"🧑🏽🍳"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-1F373","label":"cook: medium-dark skin tone","order":1119,"unicode":"🧑🏾🍳"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-1F373","label":"cook: dark skin tone","order":1120,"unicode":"🧑🏿🍳"}]},{"group":1,"hexcode":"1F468-200D-1F373","label":"man cook","order":1121,"tags":["chef","cook","man"],"unicode":"👨🍳","skins":[{"group":1,"hexcode":"1F468-1F3FB-200D-1F373","label":"man cook: light skin tone","order":1122,"unicode":"👨🏻🍳"},{"group":1,"hexcode":"1F468-1F3FC-200D-1F373","label":"man cook: medium-light skin tone","order":1123,"unicode":"👨🏼🍳"},{"group":1,"hexcode":"1F468-1F3FD-200D-1F373","label":"man cook: medium skin tone","order":1124,"unicode":"👨🏽🍳"},{"group":1,"hexcode":"1F468-1F3FE-200D-1F373","label":"man cook: medium-dark skin tone","order":1125,"unicode":"👨🏾🍳"},{"group":1,"hexcode":"1F468-1F3FF-200D-1F373","label":"man cook: dark skin tone","order":1126,"unicode":"👨🏿🍳"}]},{"group":1,"hexcode":"1F469-200D-1F373","label":"woman cook","order":1127,"tags":["chef","cook","woman"],"unicode":"👩🍳","skins":[{"group":1,"hexcode":"1F469-1F3FB-200D-1F373","label":"woman cook: light skin tone","order":1128,"unicode":"👩🏻🍳"},{"group":1,"hexcode":"1F469-1F3FC-200D-1F373","label":"woman cook: medium-light skin tone","order":1129,"unicode":"👩🏼🍳"},{"group":1,"hexcode":"1F469-1F3FD-200D-1F373","label":"woman cook: medium skin tone","order":1130,"unicode":"👩🏽🍳"},{"group":1,"hexcode":"1F469-1F3FE-200D-1F373","label":"woman cook: medium-dark skin tone","order":1131,"unicode":"👩🏾🍳"},{"group":1,"hexcode":"1F469-1F3FF-200D-1F373","label":"woman cook: dark skin tone","order":1132,"unicode":"👩🏿🍳"}]},{"group":1,"hexcode":"1F9D1-200D-1F527","label":"mechanic","order":1133,"tags":["electrician","plumber","tradesperson"],"unicode":"🧑🔧","skins":[{"group":1,"hexcode":"1F9D1-1F3FB-200D-1F527","label":"mechanic: light skin tone","order":1134,"unicode":"🧑🏻🔧"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-1F527","label":"mechanic: medium-light skin tone","order":1135,"unicode":"🧑🏼🔧"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-1F527","label":"mechanic: medium skin tone","order":1136,"unicode":"🧑🏽🔧"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-1F527","label":"mechanic: medium-dark skin tone","order":1137,"unicode":"🧑🏾🔧"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-1F527","label":"mechanic: dark skin tone","order":1138,"unicode":"🧑🏿🔧"}]},{"group":1,"hexcode":"1F468-200D-1F527","label":"man mechanic","order":1139,"tags":["electrician","man","mechanic","plumber","tradesperson"],"unicode":"👨🔧","skins":[{"group":1,"hexcode":"1F468-1F3FB-200D-1F527","label":"man mechanic: light skin tone","order":1140,"unicode":"👨🏻🔧"},{"group":1,"hexcode":"1F468-1F3FC-200D-1F527","label":"man mechanic: medium-light skin tone","order":1141,"unicode":"👨🏼🔧"},{"group":1,"hexcode":"1F468-1F3FD-200D-1F527","label":"man mechanic: medium skin tone","order":1142,"unicode":"👨🏽🔧"},{"group":1,"hexcode":"1F468-1F3FE-200D-1F527","label":"man mechanic: medium-dark skin tone","order":1143,"unicode":"👨🏾🔧"},{"group":1,"hexcode":"1F468-1F3FF-200D-1F527","label":"man mechanic: dark skin tone","order":1144,"unicode":"👨🏿🔧"}]},{"group":1,"hexcode":"1F469-200D-1F527","label":"woman mechanic","order":1145,"tags":["electrician","mechanic","plumber","tradesperson","woman"],"unicode":"👩🔧","skins":[{"group":1,"hexcode":"1F469-1F3FB-200D-1F527","label":"woman mechanic: light skin tone","order":1146,"unicode":"👩🏻🔧"},{"group":1,"hexcode":"1F469-1F3FC-200D-1F527","label":"woman mechanic: medium-light skin tone","order":1147,"unicode":"👩🏼🔧"},{"group":1,"hexcode":"1F469-1F3FD-200D-1F527","label":"woman mechanic: medium skin tone","order":1148,"unicode":"👩🏽🔧"},{"group":1,"hexcode":"1F469-1F3FE-200D-1F527","label":"woman mechanic: medium-dark skin tone","order":1149,"unicode":"👩🏾🔧"},{"group":1,"hexcode":"1F469-1F3FF-200D-1F527","label":"woman mechanic: dark skin tone","order":1150,"unicode":"👩🏿🔧"}]},{"group":1,"hexcode":"1F9D1-200D-1F3ED","label":"factory worker","order":1151,"tags":["assembly","factory","industrial","worker"],"unicode":"🧑🏭","skins":[{"group":1,"hexcode":"1F9D1-1F3FB-200D-1F3ED","label":"factory worker: light skin tone","order":1152,"unicode":"🧑🏻🏭"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-1F3ED","label":"factory worker: medium-light skin tone","order":1153,"unicode":"🧑🏼🏭"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-1F3ED","label":"factory worker: medium skin tone","order":1154,"unicode":"🧑🏽🏭"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-1F3ED","label":"factory worker: medium-dark skin tone","order":1155,"unicode":"🧑🏾🏭"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-1F3ED","label":"factory worker: dark skin tone","order":1156,"unicode":"🧑🏿🏭"}]},{"group":1,"hexcode":"1F468-200D-1F3ED","label":"man factory worker","order":1157,"tags":["assembly","factory","industrial","man","worker"],"unicode":"👨🏭","skins":[{"group":1,"hexcode":"1F468-1F3FB-200D-1F3ED","label":"man factory worker: light skin tone","order":1158,"unicode":"👨🏻🏭"},{"group":1,"hexcode":"1F468-1F3FC-200D-1F3ED","label":"man factory worker: medium-light skin tone","order":1159,"unicode":"👨🏼🏭"},{"group":1,"hexcode":"1F468-1F3FD-200D-1F3ED","label":"man factory worker: medium skin tone","order":1160,"unicode":"👨🏽🏭"},{"group":1,"hexcode":"1F468-1F3FE-200D-1F3ED","label":"man factory worker: medium-dark skin tone","order":1161,"unicode":"👨🏾🏭"},{"group":1,"hexcode":"1F468-1F3FF-200D-1F3ED","label":"man factory worker: dark skin tone","order":1162,"unicode":"👨🏿🏭"}]},{"group":1,"hexcode":"1F469-200D-1F3ED","label":"woman factory worker","order":1163,"tags":["assembly","factory","industrial","woman","worker"],"unicode":"👩🏭","skins":[{"group":1,"hexcode":"1F469-1F3FB-200D-1F3ED","label":"woman factory worker: light skin tone","order":1164,"unicode":"👩🏻🏭"},{"group":1,"hexcode":"1F469-1F3FC-200D-1F3ED","label":"woman factory worker: medium-light skin tone","order":1165,"unicode":"👩🏼🏭"},{"group":1,"hexcode":"1F469-1F3FD-200D-1F3ED","label":"woman factory worker: medium skin tone","order":1166,"unicode":"👩🏽🏭"},{"group":1,"hexcode":"1F469-1F3FE-200D-1F3ED","label":"woman factory worker: medium-dark skin tone","order":1167,"unicode":"👩🏾🏭"},{"group":1,"hexcode":"1F469-1F3FF-200D-1F3ED","label":"woman factory worker: dark skin tone","order":1168,"unicode":"👩🏿🏭"}]},{"group":1,"hexcode":"1F9D1-200D-1F4BC","label":"office worker","order":1169,"tags":["architect","business","manager","white-collar"],"unicode":"🧑💼","skins":[{"group":1,"hexcode":"1F9D1-1F3FB-200D-1F4BC","label":"office worker: light skin tone","order":1170,"unicode":"🧑🏻💼"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-1F4BC","label":"office worker: medium-light skin tone","order":1171,"unicode":"🧑🏼💼"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-1F4BC","label":"office worker: medium skin tone","order":1172,"unicode":"🧑🏽💼"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-1F4BC","label":"office worker: medium-dark skin tone","order":1173,"unicode":"🧑🏾💼"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-1F4BC","label":"office worker: dark skin tone","order":1174,"unicode":"🧑🏿💼"}]},{"group":1,"hexcode":"1F468-200D-1F4BC","label":"man office worker","order":1175,"tags":["architect","business","man","manager","white-collar"],"unicode":"👨💼","skins":[{"group":1,"hexcode":"1F468-1F3FB-200D-1F4BC","label":"man office worker: light skin tone","order":1176,"unicode":"👨🏻💼"},{"group":1,"hexcode":"1F468-1F3FC-200D-1F4BC","label":"man office worker: medium-light skin tone","order":1177,"unicode":"👨🏼💼"},{"group":1,"hexcode":"1F468-1F3FD-200D-1F4BC","label":"man office worker: medium skin tone","order":1178,"unicode":"👨🏽💼"},{"group":1,"hexcode":"1F468-1F3FE-200D-1F4BC","label":"man office worker: medium-dark skin tone","order":1179,"unicode":"👨🏾💼"},{"group":1,"hexcode":"1F468-1F3FF-200D-1F4BC","label":"man office worker: dark skin tone","order":1180,"unicode":"👨🏿💼"}]},{"group":1,"hexcode":"1F469-200D-1F4BC","label":"woman office worker","order":1181,"tags":["architect","business","manager","white-collar","woman"],"unicode":"👩💼","skins":[{"group":1,"hexcode":"1F469-1F3FB-200D-1F4BC","label":"woman office worker: light skin tone","order":1182,"unicode":"👩🏻💼"},{"group":1,"hexcode":"1F469-1F3FC-200D-1F4BC","label":"woman office worker: medium-light skin tone","order":1183,"unicode":"👩🏼💼"},{"group":1,"hexcode":"1F469-1F3FD-200D-1F4BC","label":"woman office worker: medium skin tone","order":1184,"unicode":"👩🏽💼"},{"group":1,"hexcode":"1F469-1F3FE-200D-1F4BC","label":"woman office worker: medium-dark skin tone","order":1185,"unicode":"👩🏾💼"},{"group":1,"hexcode":"1F469-1F3FF-200D-1F4BC","label":"woman office worker: dark skin tone","order":1186,"unicode":"👩🏿💼"}]},{"group":1,"hexcode":"1F9D1-200D-1F52C","label":"scientist","order":1187,"tags":["biologist","chemist","engineer","physicist"],"unicode":"🧑🔬","skins":[{"group":1,"hexcode":"1F9D1-1F3FB-200D-1F52C","label":"scientist: light skin tone","order":1188,"unicode":"🧑🏻🔬"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-1F52C","label":"scientist: medium-light skin tone","order":1189,"unicode":"🧑🏼🔬"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-1F52C","label":"scientist: medium skin tone","order":1190,"unicode":"🧑🏽🔬"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-1F52C","label":"scientist: medium-dark skin tone","order":1191,"unicode":"🧑🏾🔬"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-1F52C","label":"scientist: dark skin tone","order":1192,"unicode":"🧑🏿🔬"}]},{"group":1,"hexcode":"1F468-200D-1F52C","label":"man scientist","order":1193,"tags":["biologist","chemist","engineer","man","physicist","scientist"],"unicode":"👨🔬","skins":[{"group":1,"hexcode":"1F468-1F3FB-200D-1F52C","label":"man scientist: light skin tone","order":1194,"unicode":"👨🏻🔬"},{"group":1,"hexcode":"1F468-1F3FC-200D-1F52C","label":"man scientist: medium-light skin tone","order":1195,"unicode":"👨🏼🔬"},{"group":1,"hexcode":"1F468-1F3FD-200D-1F52C","label":"man scientist: medium skin tone","order":1196,"unicode":"👨🏽🔬"},{"group":1,"hexcode":"1F468-1F3FE-200D-1F52C","label":"man scientist: medium-dark skin tone","order":1197,"unicode":"👨🏾🔬"},{"group":1,"hexcode":"1F468-1F3FF-200D-1F52C","label":"man scientist: dark skin tone","order":1198,"unicode":"👨🏿🔬"}]},{"group":1,"hexcode":"1F469-200D-1F52C","label":"woman scientist","order":1199,"tags":["biologist","chemist","engineer","physicist","scientist","woman"],"unicode":"👩🔬","skins":[{"group":1,"hexcode":"1F469-1F3FB-200D-1F52C","label":"woman scientist: light skin tone","order":1200,"unicode":"👩🏻🔬"},{"group":1,"hexcode":"1F469-1F3FC-200D-1F52C","label":"woman scientist: medium-light skin tone","order":1201,"unicode":"👩🏼🔬"},{"group":1,"hexcode":"1F469-1F3FD-200D-1F52C","label":"woman scientist: medium skin tone","order":1202,"unicode":"👩🏽🔬"},{"group":1,"hexcode":"1F469-1F3FE-200D-1F52C","label":"woman scientist: medium-dark skin tone","order":1203,"unicode":"👩🏾🔬"},{"group":1,"hexcode":"1F469-1F3FF-200D-1F52C","label":"woman scientist: dark skin tone","order":1204,"unicode":"👩🏿🔬"}]},{"group":1,"hexcode":"1F9D1-200D-1F4BB","label":"technologist","order":1205,"tags":["coder","developer","inventor","software"],"unicode":"🧑💻","skins":[{"group":1,"hexcode":"1F9D1-1F3FB-200D-1F4BB","label":"technologist: light skin tone","order":1206,"unicode":"🧑🏻💻"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-1F4BB","label":"technologist: medium-light skin tone","order":1207,"unicode":"🧑🏼💻"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-1F4BB","label":"technologist: medium skin tone","order":1208,"unicode":"🧑🏽💻"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-1F4BB","label":"technologist: medium-dark skin tone","order":1209,"unicode":"🧑🏾💻"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-1F4BB","label":"technologist: dark skin tone","order":1210,"unicode":"🧑🏿💻"}]},{"group":1,"hexcode":"1F468-200D-1F4BB","label":"man technologist","order":1211,"tags":["coder","developer","inventor","man","software","technologist"],"unicode":"👨💻","skins":[{"group":1,"hexcode":"1F468-1F3FB-200D-1F4BB","label":"man technologist: light skin tone","order":1212,"unicode":"👨🏻💻"},{"group":1,"hexcode":"1F468-1F3FC-200D-1F4BB","label":"man technologist: medium-light skin tone","order":1213,"unicode":"👨🏼💻"},{"group":1,"hexcode":"1F468-1F3FD-200D-1F4BB","label":"man technologist: medium skin tone","order":1214,"unicode":"👨🏽💻"},{"group":1,"hexcode":"1F468-1F3FE-200D-1F4BB","label":"man technologist: medium-dark skin tone","order":1215,"unicode":"👨🏾💻"},{"group":1,"hexcode":"1F468-1F3FF-200D-1F4BB","label":"man technologist: dark skin tone","order":1216,"unicode":"👨🏿💻"}]},{"group":1,"hexcode":"1F469-200D-1F4BB","label":"woman technologist","order":1217,"tags":["coder","developer","inventor","software","technologist","woman"],"unicode":"👩💻","skins":[{"group":1,"hexcode":"1F469-1F3FB-200D-1F4BB","label":"woman technologist: light skin tone","order":1218,"unicode":"👩🏻💻"},{"group":1,"hexcode":"1F469-1F3FC-200D-1F4BB","label":"woman technologist: medium-light skin tone","order":1219,"unicode":"👩🏼💻"},{"group":1,"hexcode":"1F469-1F3FD-200D-1F4BB","label":"woman technologist: medium skin tone","order":1220,"unicode":"👩🏽💻"},{"group":1,"hexcode":"1F469-1F3FE-200D-1F4BB","label":"woman technologist: medium-dark skin tone","order":1221,"unicode":"👩🏾💻"},{"group":1,"hexcode":"1F469-1F3FF-200D-1F4BB","label":"woman technologist: dark skin tone","order":1222,"unicode":"👩🏿💻"}]},{"group":1,"hexcode":"1F9D1-200D-1F3A4","label":"singer","order":1223,"tags":["actor","entertainer","rock","star"],"unicode":"🧑🎤","skins":[{"group":1,"hexcode":"1F9D1-1F3FB-200D-1F3A4","label":"singer: light skin tone","order":1224,"unicode":"🧑🏻🎤"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-1F3A4","label":"singer: medium-light skin tone","order":1225,"unicode":"🧑🏼🎤"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-1F3A4","label":"singer: medium skin tone","order":1226,"unicode":"🧑🏽🎤"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-1F3A4","label":"singer: medium-dark skin tone","order":1227,"unicode":"🧑🏾🎤"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-1F3A4","label":"singer: dark skin tone","order":1228,"unicode":"🧑🏿🎤"}]},{"group":1,"hexcode":"1F468-200D-1F3A4","label":"man singer","order":1229,"tags":["actor","entertainer","man","rock","singer","star"],"unicode":"👨🎤","skins":[{"group":1,"hexcode":"1F468-1F3FB-200D-1F3A4","label":"man singer: light skin tone","order":1230,"unicode":"👨🏻🎤"},{"group":1,"hexcode":"1F468-1F3FC-200D-1F3A4","label":"man singer: medium-light skin tone","order":1231,"unicode":"👨🏼🎤"},{"group":1,"hexcode":"1F468-1F3FD-200D-1F3A4","label":"man singer: medium skin tone","order":1232,"unicode":"👨🏽🎤"},{"group":1,"hexcode":"1F468-1F3FE-200D-1F3A4","label":"man singer: medium-dark skin tone","order":1233,"unicode":"👨🏾🎤"},{"group":1,"hexcode":"1F468-1F3FF-200D-1F3A4","label":"man singer: dark skin tone","order":1234,"unicode":"👨🏿🎤"}]},{"group":1,"hexcode":"1F469-200D-1F3A4","label":"woman singer","order":1235,"tags":["actor","entertainer","rock","singer","star","woman"],"unicode":"👩🎤","skins":[{"group":1,"hexcode":"1F469-1F3FB-200D-1F3A4","label":"woman singer: light skin tone","order":1236,"unicode":"👩🏻🎤"},{"group":1,"hexcode":"1F469-1F3FC-200D-1F3A4","label":"woman singer: medium-light skin tone","order":1237,"unicode":"👩🏼🎤"},{"group":1,"hexcode":"1F469-1F3FD-200D-1F3A4","label":"woman singer: medium skin tone","order":1238,"unicode":"👩🏽🎤"},{"group":1,"hexcode":"1F469-1F3FE-200D-1F3A4","label":"woman singer: medium-dark skin tone","order":1239,"unicode":"👩🏾🎤"},{"group":1,"hexcode":"1F469-1F3FF-200D-1F3A4","label":"woman singer: dark skin tone","order":1240,"unicode":"👩🏿🎤"}]},{"group":1,"hexcode":"1F9D1-200D-1F3A8","label":"artist","order":1241,"tags":["palette"],"unicode":"🧑🎨","skins":[{"group":1,"hexcode":"1F9D1-1F3FB-200D-1F3A8","label":"artist: light skin tone","order":1242,"unicode":"🧑🏻🎨"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-1F3A8","label":"artist: medium-light skin tone","order":1243,"unicode":"🧑🏼🎨"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-1F3A8","label":"artist: medium skin tone","order":1244,"unicode":"🧑🏽🎨"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-1F3A8","label":"artist: medium-dark skin tone","order":1245,"unicode":"🧑🏾🎨"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-1F3A8","label":"artist: dark skin tone","order":1246,"unicode":"🧑🏿🎨"}]},{"group":1,"hexcode":"1F468-200D-1F3A8","label":"man artist","order":1247,"tags":["artist","man","palette"],"unicode":"👨🎨","skins":[{"group":1,"hexcode":"1F468-1F3FB-200D-1F3A8","label":"man artist: light skin tone","order":1248,"unicode":"👨🏻🎨"},{"group":1,"hexcode":"1F468-1F3FC-200D-1F3A8","label":"man artist: medium-light skin tone","order":1249,"unicode":"👨🏼🎨"},{"group":1,"hexcode":"1F468-1F3FD-200D-1F3A8","label":"man artist: medium skin tone","order":1250,"unicode":"👨🏽🎨"},{"group":1,"hexcode":"1F468-1F3FE-200D-1F3A8","label":"man artist: medium-dark skin tone","order":1251,"unicode":"👨🏾🎨"},{"group":1,"hexcode":"1F468-1F3FF-200D-1F3A8","label":"man artist: dark skin tone","order":1252,"unicode":"👨🏿🎨"}]},{"group":1,"hexcode":"1F469-200D-1F3A8","label":"woman artist","order":1253,"tags":["artist","palette","woman"],"unicode":"👩🎨","skins":[{"group":1,"hexcode":"1F469-1F3FB-200D-1F3A8","label":"woman artist: light skin tone","order":1254,"unicode":"👩🏻🎨"},{"group":1,"hexcode":"1F469-1F3FC-200D-1F3A8","label":"woman artist: medium-light skin tone","order":1255,"unicode":"👩🏼🎨"},{"group":1,"hexcode":"1F469-1F3FD-200D-1F3A8","label":"woman artist: medium skin tone","order":1256,"unicode":"👩🏽🎨"},{"group":1,"hexcode":"1F469-1F3FE-200D-1F3A8","label":"woman artist: medium-dark skin tone","order":1257,"unicode":"👩🏾🎨"},{"group":1,"hexcode":"1F469-1F3FF-200D-1F3A8","label":"woman artist: dark skin tone","order":1258,"unicode":"👩🏿🎨"}]},{"group":1,"hexcode":"1F9D1-200D-2708-FE0F","label":"pilot","order":1259,"tags":["plane"],"unicode":"🧑✈️","skins":[{"group":1,"hexcode":"1F9D1-1F3FB-200D-2708-FE0F","label":"pilot: light skin tone","order":1261,"unicode":"🧑🏻✈️"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-2708-FE0F","label":"pilot: medium-light skin tone","order":1263,"unicode":"🧑🏼✈️"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-2708-FE0F","label":"pilot: medium skin tone","order":1265,"unicode":"🧑🏽✈️"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-2708-FE0F","label":"pilot: medium-dark skin tone","order":1267,"unicode":"🧑🏾✈️"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-2708-FE0F","label":"pilot: dark skin tone","order":1269,"unicode":"🧑🏿✈️"}]},{"group":1,"hexcode":"1F468-200D-2708-FE0F","label":"man pilot","order":1271,"tags":["man","pilot","plane"],"unicode":"👨✈️","skins":[{"group":1,"hexcode":"1F468-1F3FB-200D-2708-FE0F","label":"man pilot: light skin tone","order":1273,"unicode":"👨🏻✈️"},{"group":1,"hexcode":"1F468-1F3FC-200D-2708-FE0F","label":"man pilot: medium-light skin tone","order":1275,"unicode":"👨🏼✈️"},{"group":1,"hexcode":"1F468-1F3FD-200D-2708-FE0F","label":"man pilot: medium skin tone","order":1277,"unicode":"👨🏽✈️"},{"group":1,"hexcode":"1F468-1F3FE-200D-2708-FE0F","label":"man pilot: medium-dark skin tone","order":1279,"unicode":"👨🏾✈️"},{"group":1,"hexcode":"1F468-1F3FF-200D-2708-FE0F","label":"man pilot: dark skin tone","order":1281,"unicode":"👨🏿✈️"}]},{"group":1,"hexcode":"1F469-200D-2708-FE0F","label":"woman pilot","order":1283,"tags":["pilot","plane","woman"],"unicode":"👩✈️","skins":[{"group":1,"hexcode":"1F469-1F3FB-200D-2708-FE0F","label":"woman pilot: light skin tone","order":1285,"unicode":"👩🏻✈️"},{"group":1,"hexcode":"1F469-1F3FC-200D-2708-FE0F","label":"woman pilot: medium-light skin tone","order":1287,"unicode":"👩🏼✈️"},{"group":1,"hexcode":"1F469-1F3FD-200D-2708-FE0F","label":"woman pilot: medium skin tone","order":1289,"unicode":"👩🏽✈️"},{"group":1,"hexcode":"1F469-1F3FE-200D-2708-FE0F","label":"woman pilot: medium-dark skin tone","order":1291,"unicode":"👩🏾✈️"},{"group":1,"hexcode":"1F469-1F3FF-200D-2708-FE0F","label":"woman pilot: dark skin tone","order":1293,"unicode":"👩🏿✈️"}]},{"group":1,"hexcode":"1F9D1-200D-1F680","label":"astronaut","order":1295,"tags":["rocket"],"unicode":"🧑🚀","skins":[{"group":1,"hexcode":"1F9D1-1F3FB-200D-1F680","label":"astronaut: light skin tone","order":1296,"unicode":"🧑🏻🚀"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-1F680","label":"astronaut: medium-light skin tone","order":1297,"unicode":"🧑🏼🚀"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-1F680","label":"astronaut: medium skin tone","order":1298,"unicode":"🧑🏽🚀"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-1F680","label":"astronaut: medium-dark skin tone","order":1299,"unicode":"🧑🏾🚀"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-1F680","label":"astronaut: dark skin tone","order":1300,"unicode":"🧑🏿🚀"}]},{"group":1,"hexcode":"1F468-200D-1F680","label":"man astronaut","order":1301,"tags":["astronaut","man","rocket"],"unicode":"👨🚀","skins":[{"group":1,"hexcode":"1F468-1F3FB-200D-1F680","label":"man astronaut: light skin tone","order":1302,"unicode":"👨🏻🚀"},{"group":1,"hexcode":"1F468-1F3FC-200D-1F680","label":"man astronaut: medium-light skin tone","order":1303,"unicode":"👨🏼🚀"},{"group":1,"hexcode":"1F468-1F3FD-200D-1F680","label":"man astronaut: medium skin tone","order":1304,"unicode":"👨🏽🚀"},{"group":1,"hexcode":"1F468-1F3FE-200D-1F680","label":"man astronaut: medium-dark skin tone","order":1305,"unicode":"👨🏾🚀"},{"group":1,"hexcode":"1F468-1F3FF-200D-1F680","label":"man astronaut: dark skin tone","order":1306,"unicode":"👨🏿🚀"}]},{"group":1,"hexcode":"1F469-200D-1F680","label":"woman astronaut","order":1307,"tags":["astronaut","rocket","woman"],"unicode":"👩🚀","skins":[{"group":1,"hexcode":"1F469-1F3FB-200D-1F680","label":"woman astronaut: light skin tone","order":1308,"unicode":"👩🏻🚀"},{"group":1,"hexcode":"1F469-1F3FC-200D-1F680","label":"woman astronaut: medium-light skin tone","order":1309,"unicode":"👩🏼🚀"},{"group":1,"hexcode":"1F469-1F3FD-200D-1F680","label":"woman astronaut: medium skin tone","order":1310,"unicode":"👩🏽🚀"},{"group":1,"hexcode":"1F469-1F3FE-200D-1F680","label":"woman astronaut: medium-dark skin tone","order":1311,"unicode":"👩🏾🚀"},{"group":1,"hexcode":"1F469-1F3FF-200D-1F680","label":"woman astronaut: dark skin tone","order":1312,"unicode":"👩🏿🚀"}]},{"group":1,"hexcode":"1F9D1-200D-1F692","label":"firefighter","order":1313,"tags":["firetruck"],"unicode":"🧑🚒","skins":[{"group":1,"hexcode":"1F9D1-1F3FB-200D-1F692","label":"firefighter: light skin tone","order":1314,"unicode":"🧑🏻🚒"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-1F692","label":"firefighter: medium-light skin tone","order":1315,"unicode":"🧑🏼🚒"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-1F692","label":"firefighter: medium skin tone","order":1316,"unicode":"🧑🏽🚒"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-1F692","label":"firefighter: medium-dark skin tone","order":1317,"unicode":"🧑🏾🚒"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-1F692","label":"firefighter: dark skin tone","order":1318,"unicode":"🧑🏿🚒"}]},{"group":1,"hexcode":"1F468-200D-1F692","label":"man firefighter","order":1319,"tags":["firefighter","firetruck","man"],"unicode":"👨🚒","skins":[{"group":1,"hexcode":"1F468-1F3FB-200D-1F692","label":"man firefighter: light skin tone","order":1320,"unicode":"👨🏻🚒"},{"group":1,"hexcode":"1F468-1F3FC-200D-1F692","label":"man firefighter: medium-light skin tone","order":1321,"unicode":"👨🏼🚒"},{"group":1,"hexcode":"1F468-1F3FD-200D-1F692","label":"man firefighter: medium skin tone","order":1322,"unicode":"👨🏽🚒"},{"group":1,"hexcode":"1F468-1F3FE-200D-1F692","label":"man firefighter: medium-dark skin tone","order":1323,"unicode":"👨🏾🚒"},{"group":1,"hexcode":"1F468-1F3FF-200D-1F692","label":"man firefighter: dark skin tone","order":1324,"unicode":"👨🏿🚒"}]},{"group":1,"hexcode":"1F469-200D-1F692","label":"woman firefighter","order":1325,"tags":["firefighter","firetruck","woman"],"unicode":"👩🚒","skins":[{"group":1,"hexcode":"1F469-1F3FB-200D-1F692","label":"woman firefighter: light skin tone","order":1326,"unicode":"👩🏻🚒"},{"group":1,"hexcode":"1F469-1F3FC-200D-1F692","label":"woman firefighter: medium-light skin tone","order":1327,"unicode":"👩🏼🚒"},{"group":1,"hexcode":"1F469-1F3FD-200D-1F692","label":"woman firefighter: medium skin tone","order":1328,"unicode":"👩🏽🚒"},{"group":1,"hexcode":"1F469-1F3FE-200D-1F692","label":"woman firefighter: medium-dark skin tone","order":1329,"unicode":"👩🏾🚒"},{"group":1,"hexcode":"1F469-1F3FF-200D-1F692","label":"woman firefighter: dark skin tone","order":1330,"unicode":"👩🏿🚒"}]},{"group":1,"hexcode":"1F46E","label":"police officer","order":1331,"tags":["cop","officer","police"],"unicode":"👮","skins":[{"group":1,"hexcode":"1F46E-1F3FB","label":"police officer: light skin tone","order":1332,"unicode":"👮🏻"},{"group":1,"hexcode":"1F46E-1F3FC","label":"police officer: medium-light skin tone","order":1333,"unicode":"👮🏼"},{"group":1,"hexcode":"1F46E-1F3FD","label":"police officer: medium skin tone","order":1334,"unicode":"👮🏽"},{"group":1,"hexcode":"1F46E-1F3FE","label":"police officer: medium-dark skin tone","order":1335,"unicode":"👮🏾"},{"group":1,"hexcode":"1F46E-1F3FF","label":"police officer: dark skin tone","order":1336,"unicode":"👮🏿"}]},{"group":1,"hexcode":"1F46E-200D-2642-FE0F","label":"man police officer","order":1337,"tags":["cop","man","officer","police"],"unicode":"👮♂️","skins":[{"group":1,"hexcode":"1F46E-1F3FB-200D-2642-FE0F","label":"man police officer: light skin tone","order":1339,"unicode":"👮🏻♂️"},{"group":1,"hexcode":"1F46E-1F3FC-200D-2642-FE0F","label":"man police officer: medium-light skin tone","order":1341,"unicode":"👮🏼♂️"},{"group":1,"hexcode":"1F46E-1F3FD-200D-2642-FE0F","label":"man police officer: medium skin tone","order":1343,"unicode":"👮🏽♂️"},{"group":1,"hexcode":"1F46E-1F3FE-200D-2642-FE0F","label":"man police officer: medium-dark skin tone","order":1345,"unicode":"👮🏾♂️"},{"group":1,"hexcode":"1F46E-1F3FF-200D-2642-FE0F","label":"man police officer: dark skin tone","order":1347,"unicode":"👮🏿♂️"}]},{"group":1,"hexcode":"1F46E-200D-2640-FE0F","label":"woman police officer","order":1349,"tags":["cop","officer","police","woman"],"unicode":"👮♀️","skins":[{"group":1,"hexcode":"1F46E-1F3FB-200D-2640-FE0F","label":"woman police officer: light skin tone","order":1351,"unicode":"👮🏻♀️"},{"group":1,"hexcode":"1F46E-1F3FC-200D-2640-FE0F","label":"woman police officer: medium-light skin tone","order":1353,"unicode":"👮🏼♀️"},{"group":1,"hexcode":"1F46E-1F3FD-200D-2640-FE0F","label":"woman police officer: medium skin tone","order":1355,"unicode":"👮🏽♀️"},{"group":1,"hexcode":"1F46E-1F3FE-200D-2640-FE0F","label":"woman police officer: medium-dark skin tone","order":1357,"unicode":"👮🏾♀️"},{"group":1,"hexcode":"1F46E-1F3FF-200D-2640-FE0F","label":"woman police officer: dark skin tone","order":1359,"unicode":"👮🏿♀️"}]},{"group":1,"hexcode":"1F575","label":"detective","order":1362,"tags":["sleuth","spy"],"unicode":"🕵️","skins":[{"group":1,"hexcode":"1F575-1F3FB","label":"detective: light skin tone","order":1363,"unicode":"🕵🏻"},{"group":1,"hexcode":"1F575-1F3FC","label":"detective: medium-light skin tone","order":1364,"unicode":"🕵🏼"},{"group":1,"hexcode":"1F575-1F3FD","label":"detective: medium skin tone","order":1365,"unicode":"🕵🏽"},{"group":1,"hexcode":"1F575-1F3FE","label":"detective: medium-dark skin tone","order":1366,"unicode":"🕵🏾"},{"group":1,"hexcode":"1F575-1F3FF","label":"detective: dark skin tone","order":1367,"unicode":"🕵🏿"}]},{"group":1,"hexcode":"1F575-FE0F-200D-2642-FE0F","label":"man detective","order":1368,"tags":["detective","man","sleuth","spy"],"unicode":"🕵️♂️","skins":[{"group":1,"hexcode":"1F575-1F3FB-200D-2642-FE0F","label":"man detective: light skin tone","order":1372,"unicode":"🕵🏻♂️"},{"group":1,"hexcode":"1F575-1F3FC-200D-2642-FE0F","label":"man detective: medium-light skin tone","order":1374,"unicode":"🕵🏼♂️"},{"group":1,"hexcode":"1F575-1F3FD-200D-2642-FE0F","label":"man detective: medium skin tone","order":1376,"unicode":"🕵🏽♂️"},{"group":1,"hexcode":"1F575-1F3FE-200D-2642-FE0F","label":"man detective: medium-dark skin tone","order":1378,"unicode":"🕵🏾♂️"},{"group":1,"hexcode":"1F575-1F3FF-200D-2642-FE0F","label":"man detective: dark skin tone","order":1380,"unicode":"🕵🏿♂️"}]},{"group":1,"hexcode":"1F575-FE0F-200D-2640-FE0F","label":"woman detective","order":1382,"tags":["detective","sleuth","spy","woman"],"unicode":"🕵️♀️","skins":[{"group":1,"hexcode":"1F575-1F3FB-200D-2640-FE0F","label":"woman detective: light skin tone","order":1386,"unicode":"🕵🏻♀️"},{"group":1,"hexcode":"1F575-1F3FC-200D-2640-FE0F","label":"woman detective: medium-light skin tone","order":1388,"unicode":"🕵🏼♀️"},{"group":1,"hexcode":"1F575-1F3FD-200D-2640-FE0F","label":"woman detective: medium skin tone","order":1390,"unicode":"🕵🏽♀️"},{"group":1,"hexcode":"1F575-1F3FE-200D-2640-FE0F","label":"woman detective: medium-dark skin tone","order":1392,"unicode":"🕵🏾♀️"},{"group":1,"hexcode":"1F575-1F3FF-200D-2640-FE0F","label":"woman detective: dark skin tone","order":1394,"unicode":"🕵🏿♀️"}]},{"group":1,"hexcode":"1F482","label":"guard","order":1396,"tags":["guard"],"unicode":"💂","skins":[{"group":1,"hexcode":"1F482-1F3FB","label":"guard: light skin tone","order":1397,"unicode":"💂🏻"},{"group":1,"hexcode":"1F482-1F3FC","label":"guard: medium-light skin tone","order":1398,"unicode":"💂🏼"},{"group":1,"hexcode":"1F482-1F3FD","label":"guard: medium skin tone","order":1399,"unicode":"💂🏽"},{"group":1,"hexcode":"1F482-1F3FE","label":"guard: medium-dark skin tone","order":1400,"unicode":"💂🏾"},{"group":1,"hexcode":"1F482-1F3FF","label":"guard: dark skin tone","order":1401,"unicode":"💂🏿"}]},{"group":1,"hexcode":"1F482-200D-2642-FE0F","label":"man guard","order":1402,"tags":["guard","man"],"unicode":"💂♂️","skins":[{"group":1,"hexcode":"1F482-1F3FB-200D-2642-FE0F","label":"man guard: light skin tone","order":1404,"unicode":"💂🏻♂️"},{"group":1,"hexcode":"1F482-1F3FC-200D-2642-FE0F","label":"man guard: medium-light skin tone","order":1406,"unicode":"💂🏼♂️"},{"group":1,"hexcode":"1F482-1F3FD-200D-2642-FE0F","label":"man guard: medium skin tone","order":1408,"unicode":"💂🏽♂️"},{"group":1,"hexcode":"1F482-1F3FE-200D-2642-FE0F","label":"man guard: medium-dark skin tone","order":1410,"unicode":"💂🏾♂️"},{"group":1,"hexcode":"1F482-1F3FF-200D-2642-FE0F","label":"man guard: dark skin tone","order":1412,"unicode":"💂🏿♂️"}]},{"group":1,"hexcode":"1F482-200D-2640-FE0F","label":"woman guard","order":1414,"tags":["guard","woman"],"unicode":"💂♀️","skins":[{"group":1,"hexcode":"1F482-1F3FB-200D-2640-FE0F","label":"woman guard: light skin tone","order":1416,"unicode":"💂🏻♀️"},{"group":1,"hexcode":"1F482-1F3FC-200D-2640-FE0F","label":"woman guard: medium-light skin tone","order":1418,"unicode":"💂🏼♀️"},{"group":1,"hexcode":"1F482-1F3FD-200D-2640-FE0F","label":"woman guard: medium skin tone","order":1420,"unicode":"💂🏽♀️"},{"group":1,"hexcode":"1F482-1F3FE-200D-2640-FE0F","label":"woman guard: medium-dark skin tone","order":1422,"unicode":"💂🏾♀️"},{"group":1,"hexcode":"1F482-1F3FF-200D-2640-FE0F","label":"woman guard: dark skin tone","order":1424,"unicode":"💂🏿♀️"}]},{"group":1,"hexcode":"1F977","label":"ninja","order":1426,"tags":["fighter","hidden","stealth"],"unicode":"🥷","skins":[{"group":1,"hexcode":"1F977-1F3FB","label":"ninja: light skin tone","order":1427,"unicode":"🥷🏻"},{"group":1,"hexcode":"1F977-1F3FC","label":"ninja: medium-light skin tone","order":1428,"unicode":"🥷🏼"},{"group":1,"hexcode":"1F977-1F3FD","label":"ninja: medium skin tone","order":1429,"unicode":"🥷🏽"},{"group":1,"hexcode":"1F977-1F3FE","label":"ninja: medium-dark skin tone","order":1430,"unicode":"🥷🏾"},{"group":1,"hexcode":"1F977-1F3FF","label":"ninja: dark skin tone","order":1431,"unicode":"🥷🏿"}]},{"group":1,"hexcode":"1F477","label":"construction worker","order":1432,"tags":["construction","hat","worker"],"unicode":"👷","skins":[{"group":1,"hexcode":"1F477-1F3FB","label":"construction worker: light skin tone","order":1433,"unicode":"👷🏻"},{"group":1,"hexcode":"1F477-1F3FC","label":"construction worker: medium-light skin tone","order":1434,"unicode":"👷🏼"},{"group":1,"hexcode":"1F477-1F3FD","label":"construction worker: medium skin tone","order":1435,"unicode":"👷🏽"},{"group":1,"hexcode":"1F477-1F3FE","label":"construction worker: medium-dark skin tone","order":1436,"unicode":"👷🏾"},{"group":1,"hexcode":"1F477-1F3FF","label":"construction worker: dark skin tone","order":1437,"unicode":"👷🏿"}]},{"group":1,"hexcode":"1F477-200D-2642-FE0F","label":"man construction worker","order":1438,"tags":["construction","man","worker"],"unicode":"👷♂️","skins":[{"group":1,"hexcode":"1F477-1F3FB-200D-2642-FE0F","label":"man construction worker: light skin tone","order":1440,"unicode":"👷🏻♂️"},{"group":1,"hexcode":"1F477-1F3FC-200D-2642-FE0F","label":"man construction worker: medium-light skin tone","order":1442,"unicode":"👷🏼♂️"},{"group":1,"hexcode":"1F477-1F3FD-200D-2642-FE0F","label":"man construction worker: medium skin tone","order":1444,"unicode":"👷🏽♂️"},{"group":1,"hexcode":"1F477-1F3FE-200D-2642-FE0F","label":"man construction worker: medium-dark skin tone","order":1446,"unicode":"👷🏾♂️"},{"group":1,"hexcode":"1F477-1F3FF-200D-2642-FE0F","label":"man construction worker: dark skin tone","order":1448,"unicode":"👷🏿♂️"}]},{"group":1,"hexcode":"1F477-200D-2640-FE0F","label":"woman construction worker","order":1450,"tags":["construction","woman","worker"],"unicode":"👷♀️","skins":[{"group":1,"hexcode":"1F477-1F3FB-200D-2640-FE0F","label":"woman construction worker: light skin tone","order":1452,"unicode":"👷🏻♀️"},{"group":1,"hexcode":"1F477-1F3FC-200D-2640-FE0F","label":"woman construction worker: medium-light skin tone","order":1454,"unicode":"👷🏼♀️"},{"group":1,"hexcode":"1F477-1F3FD-200D-2640-FE0F","label":"woman construction worker: medium skin tone","order":1456,"unicode":"👷🏽♀️"},{"group":1,"hexcode":"1F477-1F3FE-200D-2640-FE0F","label":"woman construction worker: medium-dark skin tone","order":1458,"unicode":"👷🏾♀️"},{"group":1,"hexcode":"1F477-1F3FF-200D-2640-FE0F","label":"woman construction worker: dark skin tone","order":1460,"unicode":"👷🏿♀️"}]},{"group":1,"hexcode":"1FAC5","label":"person with crown","order":1462,"tags":["monarch","noble","regal","royalty"],"unicode":"🫅","skins":[{"group":1,"hexcode":"1FAC5-1F3FB","label":"person with crown: light skin tone","order":1463,"unicode":"🫅🏻"},{"group":1,"hexcode":"1FAC5-1F3FC","label":"person with crown: medium-light skin tone","order":1464,"unicode":"🫅🏼"},{"group":1,"hexcode":"1FAC5-1F3FD","label":"person with crown: medium skin tone","order":1465,"unicode":"🫅🏽"},{"group":1,"hexcode":"1FAC5-1F3FE","label":"person with crown: medium-dark skin tone","order":1466,"unicode":"🫅🏾"},{"group":1,"hexcode":"1FAC5-1F3FF","label":"person with crown: dark skin tone","order":1467,"unicode":"🫅🏿"}]},{"group":1,"hexcode":"1F934","label":"prince","order":1468,"tags":["prince"],"unicode":"🤴","skins":[{"group":1,"hexcode":"1F934-1F3FB","label":"prince: light skin tone","order":1469,"unicode":"🤴🏻"},{"group":1,"hexcode":"1F934-1F3FC","label":"prince: medium-light skin tone","order":1470,"unicode":"🤴🏼"},{"group":1,"hexcode":"1F934-1F3FD","label":"prince: medium skin tone","order":1471,"unicode":"🤴🏽"},{"group":1,"hexcode":"1F934-1F3FE","label":"prince: medium-dark skin tone","order":1472,"unicode":"🤴🏾"},{"group":1,"hexcode":"1F934-1F3FF","label":"prince: dark skin tone","order":1473,"unicode":"🤴🏿"}]},{"group":1,"hexcode":"1F478","label":"princess","order":1474,"tags":["fairy tale","fantasy"],"unicode":"👸","skins":[{"group":1,"hexcode":"1F478-1F3FB","label":"princess: light skin tone","order":1475,"unicode":"👸🏻"},{"group":1,"hexcode":"1F478-1F3FC","label":"princess: medium-light skin tone","order":1476,"unicode":"👸🏼"},{"group":1,"hexcode":"1F478-1F3FD","label":"princess: medium skin tone","order":1477,"unicode":"👸🏽"},{"group":1,"hexcode":"1F478-1F3FE","label":"princess: medium-dark skin tone","order":1478,"unicode":"👸🏾"},{"group":1,"hexcode":"1F478-1F3FF","label":"princess: dark skin tone","order":1479,"unicode":"👸🏿"}]},{"group":1,"hexcode":"1F473","label":"person wearing turban","order":1480,"tags":["turban"],"unicode":"👳","skins":[{"group":1,"hexcode":"1F473-1F3FB","label":"person wearing turban: light skin tone","order":1481,"unicode":"👳🏻"},{"group":1,"hexcode":"1F473-1F3FC","label":"person wearing turban: medium-light skin tone","order":1482,"unicode":"👳🏼"},{"group":1,"hexcode":"1F473-1F3FD","label":"person wearing turban: medium skin tone","order":1483,"unicode":"👳🏽"},{"group":1,"hexcode":"1F473-1F3FE","label":"person wearing turban: medium-dark skin tone","order":1484,"unicode":"👳🏾"},{"group":1,"hexcode":"1F473-1F3FF","label":"person wearing turban: dark skin tone","order":1485,"unicode":"👳🏿"}]},{"group":1,"hexcode":"1F473-200D-2642-FE0F","label":"man wearing turban","order":1486,"tags":["man","turban"],"unicode":"👳♂️","skins":[{"group":1,"hexcode":"1F473-1F3FB-200D-2642-FE0F","label":"man wearing turban: light skin tone","order":1488,"unicode":"👳🏻♂️"},{"group":1,"hexcode":"1F473-1F3FC-200D-2642-FE0F","label":"man wearing turban: medium-light skin tone","order":1490,"unicode":"👳🏼♂️"},{"group":1,"hexcode":"1F473-1F3FD-200D-2642-FE0F","label":"man wearing turban: medium skin tone","order":1492,"unicode":"👳🏽♂️"},{"group":1,"hexcode":"1F473-1F3FE-200D-2642-FE0F","label":"man wearing turban: medium-dark skin tone","order":1494,"unicode":"👳🏾♂️"},{"group":1,"hexcode":"1F473-1F3FF-200D-2642-FE0F","label":"man wearing turban: dark skin tone","order":1496,"unicode":"👳🏿♂️"}]},{"group":1,"hexcode":"1F473-200D-2640-FE0F","label":"woman wearing turban","order":1498,"tags":["turban","woman"],"unicode":"👳♀️","skins":[{"group":1,"hexcode":"1F473-1F3FB-200D-2640-FE0F","label":"woman wearing turban: light skin tone","order":1500,"unicode":"👳🏻♀️"},{"group":1,"hexcode":"1F473-1F3FC-200D-2640-FE0F","label":"woman wearing turban: medium-light skin tone","order":1502,"unicode":"👳🏼♀️"},{"group":1,"hexcode":"1F473-1F3FD-200D-2640-FE0F","label":"woman wearing turban: medium skin tone","order":1504,"unicode":"👳🏽♀️"},{"group":1,"hexcode":"1F473-1F3FE-200D-2640-FE0F","label":"woman wearing turban: medium-dark skin tone","order":1506,"unicode":"👳🏾♀️"},{"group":1,"hexcode":"1F473-1F3FF-200D-2640-FE0F","label":"woman wearing turban: dark skin tone","order":1508,"unicode":"👳🏿♀️"}]},{"group":1,"hexcode":"1F472","label":"person with skullcap","order":1510,"tags":["cap","gua pi mao","hat","person","skullcap"],"unicode":"👲","skins":[{"group":1,"hexcode":"1F472-1F3FB","label":"person with skullcap: light skin tone","order":1511,"unicode":"👲🏻"},{"group":1,"hexcode":"1F472-1F3FC","label":"person with skullcap: medium-light skin tone","order":1512,"unicode":"👲🏼"},{"group":1,"hexcode":"1F472-1F3FD","label":"person with skullcap: medium skin tone","order":1513,"unicode":"👲🏽"},{"group":1,"hexcode":"1F472-1F3FE","label":"person with skullcap: medium-dark skin tone","order":1514,"unicode":"👲🏾"},{"group":1,"hexcode":"1F472-1F3FF","label":"person with skullcap: dark skin tone","order":1515,"unicode":"👲🏿"}]},{"group":1,"hexcode":"1F9D5","label":"woman with headscarf","order":1516,"tags":["headscarf","hijab","mantilla","tichel"],"unicode":"🧕","skins":[{"group":1,"hexcode":"1F9D5-1F3FB","label":"woman with headscarf: light skin tone","order":1517,"unicode":"🧕🏻"},{"group":1,"hexcode":"1F9D5-1F3FC","label":"woman with headscarf: medium-light skin tone","order":1518,"unicode":"🧕🏼"},{"group":1,"hexcode":"1F9D5-1F3FD","label":"woman with headscarf: medium skin tone","order":1519,"unicode":"🧕🏽"},{"group":1,"hexcode":"1F9D5-1F3FE","label":"woman with headscarf: medium-dark skin tone","order":1520,"unicode":"🧕🏾"},{"group":1,"hexcode":"1F9D5-1F3FF","label":"woman with headscarf: dark skin tone","order":1521,"unicode":"🧕🏿"}]},{"group":1,"hexcode":"1F935","label":"person in tuxedo","order":1522,"tags":["groom","person","tuxedo"],"unicode":"🤵","skins":[{"group":1,"hexcode":"1F935-1F3FB","label":"person in tuxedo: light skin tone","order":1523,"unicode":"🤵🏻"},{"group":1,"hexcode":"1F935-1F3FC","label":"person in tuxedo: medium-light skin tone","order":1524,"unicode":"🤵🏼"},{"group":1,"hexcode":"1F935-1F3FD","label":"person in tuxedo: medium skin tone","order":1525,"unicode":"🤵🏽"},{"group":1,"hexcode":"1F935-1F3FE","label":"person in tuxedo: medium-dark skin tone","order":1526,"unicode":"🤵🏾"},{"group":1,"hexcode":"1F935-1F3FF","label":"person in tuxedo: dark skin tone","order":1527,"unicode":"🤵🏿"}]},{"group":1,"hexcode":"1F935-200D-2642-FE0F","label":"man in tuxedo","order":1528,"tags":["man","tuxedo"],"unicode":"🤵♂️","skins":[{"group":1,"hexcode":"1F935-1F3FB-200D-2642-FE0F","label":"man in tuxedo: light skin tone","order":1530,"unicode":"🤵🏻♂️"},{"group":1,"hexcode":"1F935-1F3FC-200D-2642-FE0F","label":"man in tuxedo: medium-light skin tone","order":1532,"unicode":"🤵🏼♂️"},{"group":1,"hexcode":"1F935-1F3FD-200D-2642-FE0F","label":"man in tuxedo: medium skin tone","order":1534,"unicode":"🤵🏽♂️"},{"group":1,"hexcode":"1F935-1F3FE-200D-2642-FE0F","label":"man in tuxedo: medium-dark skin tone","order":1536,"unicode":"🤵🏾♂️"},{"group":1,"hexcode":"1F935-1F3FF-200D-2642-FE0F","label":"man in tuxedo: dark skin tone","order":1538,"unicode":"🤵🏿♂️"}]},{"group":1,"hexcode":"1F935-200D-2640-FE0F","label":"woman in tuxedo","order":1540,"tags":["tuxedo","woman"],"unicode":"🤵♀️","skins":[{"group":1,"hexcode":"1F935-1F3FB-200D-2640-FE0F","label":"woman in tuxedo: light skin tone","order":1542,"unicode":"🤵🏻♀️"},{"group":1,"hexcode":"1F935-1F3FC-200D-2640-FE0F","label":"woman in tuxedo: medium-light skin tone","order":1544,"unicode":"🤵🏼♀️"},{"group":1,"hexcode":"1F935-1F3FD-200D-2640-FE0F","label":"woman in tuxedo: medium skin tone","order":1546,"unicode":"🤵🏽♀️"},{"group":1,"hexcode":"1F935-1F3FE-200D-2640-FE0F","label":"woman in tuxedo: medium-dark skin tone","order":1548,"unicode":"🤵🏾♀️"},{"group":1,"hexcode":"1F935-1F3FF-200D-2640-FE0F","label":"woman in tuxedo: dark skin tone","order":1550,"unicode":"🤵🏿♀️"}]},{"group":1,"hexcode":"1F470","label":"person with veil","order":1552,"tags":["bride","person","veil","wedding"],"unicode":"👰","skins":[{"group":1,"hexcode":"1F470-1F3FB","label":"person with veil: light skin tone","order":1553,"unicode":"👰🏻"},{"group":1,"hexcode":"1F470-1F3FC","label":"person with veil: medium-light skin tone","order":1554,"unicode":"👰🏼"},{"group":1,"hexcode":"1F470-1F3FD","label":"person with veil: medium skin tone","order":1555,"unicode":"👰🏽"},{"group":1,"hexcode":"1F470-1F3FE","label":"person with veil: medium-dark skin tone","order":1556,"unicode":"👰🏾"},{"group":1,"hexcode":"1F470-1F3FF","label":"person with veil: dark skin tone","order":1557,"unicode":"👰🏿"}]},{"group":1,"hexcode":"1F470-200D-2642-FE0F","label":"man with veil","order":1558,"tags":["man","veil"],"unicode":"👰♂️","skins":[{"group":1,"hexcode":"1F470-1F3FB-200D-2642-FE0F","label":"man with veil: light skin tone","order":1560,"unicode":"👰🏻♂️"},{"group":1,"hexcode":"1F470-1F3FC-200D-2642-FE0F","label":"man with veil: medium-light skin tone","order":1562,"unicode":"👰🏼♂️"},{"group":1,"hexcode":"1F470-1F3FD-200D-2642-FE0F","label":"man with veil: medium skin tone","order":1564,"unicode":"👰🏽♂️"},{"group":1,"hexcode":"1F470-1F3FE-200D-2642-FE0F","label":"man with veil: medium-dark skin tone","order":1566,"unicode":"👰🏾♂️"},{"group":1,"hexcode":"1F470-1F3FF-200D-2642-FE0F","label":"man with veil: dark skin tone","order":1568,"unicode":"👰🏿♂️"}]},{"group":1,"hexcode":"1F470-200D-2640-FE0F","label":"woman with veil","order":1570,"tags":["veil","woman"],"unicode":"👰♀️","skins":[{"group":1,"hexcode":"1F470-1F3FB-200D-2640-FE0F","label":"woman with veil: light skin tone","order":1572,"unicode":"👰🏻♀️"},{"group":1,"hexcode":"1F470-1F3FC-200D-2640-FE0F","label":"woman with veil: medium-light skin tone","order":1574,"unicode":"👰🏼♀️"},{"group":1,"hexcode":"1F470-1F3FD-200D-2640-FE0F","label":"woman with veil: medium skin tone","order":1576,"unicode":"👰🏽♀️"},{"group":1,"hexcode":"1F470-1F3FE-200D-2640-FE0F","label":"woman with veil: medium-dark skin tone","order":1578,"unicode":"👰🏾♀️"},{"group":1,"hexcode":"1F470-1F3FF-200D-2640-FE0F","label":"woman with veil: dark skin tone","order":1580,"unicode":"👰🏿♀️"}]},{"group":1,"hexcode":"1F930","label":"pregnant woman","order":1582,"tags":["pregnant","woman"],"unicode":"🤰","skins":[{"group":1,"hexcode":"1F930-1F3FB","label":"pregnant woman: light skin tone","order":1583,"unicode":"🤰🏻"},{"group":1,"hexcode":"1F930-1F3FC","label":"pregnant woman: medium-light skin tone","order":1584,"unicode":"🤰🏼"},{"group":1,"hexcode":"1F930-1F3FD","label":"pregnant woman: medium skin tone","order":1585,"unicode":"🤰🏽"},{"group":1,"hexcode":"1F930-1F3FE","label":"pregnant woman: medium-dark skin tone","order":1586,"unicode":"🤰🏾"},{"group":1,"hexcode":"1F930-1F3FF","label":"pregnant woman: dark skin tone","order":1587,"unicode":"🤰🏿"}]},{"group":1,"hexcode":"1FAC3","label":"pregnant man","order":1588,"tags":["belly","bloated","full","pregnant"],"unicode":"🫃","skins":[{"group":1,"hexcode":"1FAC3-1F3FB","label":"pregnant man: light skin tone","order":1589,"unicode":"🫃🏻"},{"group":1,"hexcode":"1FAC3-1F3FC","label":"pregnant man: medium-light skin tone","order":1590,"unicode":"🫃🏼"},{"group":1,"hexcode":"1FAC3-1F3FD","label":"pregnant man: medium skin tone","order":1591,"unicode":"🫃🏽"},{"group":1,"hexcode":"1FAC3-1F3FE","label":"pregnant man: medium-dark skin tone","order":1592,"unicode":"🫃🏾"},{"group":1,"hexcode":"1FAC3-1F3FF","label":"pregnant man: dark skin tone","order":1593,"unicode":"🫃🏿"}]},{"group":1,"hexcode":"1FAC4","label":"pregnant person","order":1594,"tags":["belly","bloated","full","pregnant"],"unicode":"🫄","skins":[{"group":1,"hexcode":"1FAC4-1F3FB","label":"pregnant person: light skin tone","order":1595,"unicode":"🫄🏻"},{"group":1,"hexcode":"1FAC4-1F3FC","label":"pregnant person: medium-light skin tone","order":1596,"unicode":"🫄🏼"},{"group":1,"hexcode":"1FAC4-1F3FD","label":"pregnant person: medium skin tone","order":1597,"unicode":"🫄🏽"},{"group":1,"hexcode":"1FAC4-1F3FE","label":"pregnant person: medium-dark skin tone","order":1598,"unicode":"🫄🏾"},{"group":1,"hexcode":"1FAC4-1F3FF","label":"pregnant person: dark skin tone","order":1599,"unicode":"🫄🏿"}]},{"group":1,"hexcode":"1F931","label":"breast-feeding","order":1600,"tags":["baby","breast","nursing"],"unicode":"🤱","skins":[{"group":1,"hexcode":"1F931-1F3FB","label":"breast-feeding: light skin tone","order":1601,"unicode":"🤱🏻"},{"group":1,"hexcode":"1F931-1F3FC","label":"breast-feeding: medium-light skin tone","order":1602,"unicode":"🤱🏼"},{"group":1,"hexcode":"1F931-1F3FD","label":"breast-feeding: medium skin tone","order":1603,"unicode":"🤱🏽"},{"group":1,"hexcode":"1F931-1F3FE","label":"breast-feeding: medium-dark skin tone","order":1604,"unicode":"🤱🏾"},{"group":1,"hexcode":"1F931-1F3FF","label":"breast-feeding: dark skin tone","order":1605,"unicode":"🤱🏿"}]},{"group":1,"hexcode":"1F469-200D-1F37C","label":"woman feeding baby","order":1606,"tags":["baby","feeding","nursing","woman"],"unicode":"👩🍼","skins":[{"group":1,"hexcode":"1F469-1F3FB-200D-1F37C","label":"woman feeding baby: light skin tone","order":1607,"unicode":"👩🏻🍼"},{"group":1,"hexcode":"1F469-1F3FC-200D-1F37C","label":"woman feeding baby: medium-light skin tone","order":1608,"unicode":"👩🏼🍼"},{"group":1,"hexcode":"1F469-1F3FD-200D-1F37C","label":"woman feeding baby: medium skin tone","order":1609,"unicode":"👩🏽🍼"},{"group":1,"hexcode":"1F469-1F3FE-200D-1F37C","label":"woman feeding baby: medium-dark skin tone","order":1610,"unicode":"👩🏾🍼"},{"group":1,"hexcode":"1F469-1F3FF-200D-1F37C","label":"woman feeding baby: dark skin tone","order":1611,"unicode":"👩🏿🍼"}]},{"group":1,"hexcode":"1F468-200D-1F37C","label":"man feeding baby","order":1612,"tags":["baby","feeding","man","nursing"],"unicode":"👨🍼","skins":[{"group":1,"hexcode":"1F468-1F3FB-200D-1F37C","label":"man feeding baby: light skin tone","order":1613,"unicode":"👨🏻🍼"},{"group":1,"hexcode":"1F468-1F3FC-200D-1F37C","label":"man feeding baby: medium-light skin tone","order":1614,"unicode":"👨🏼🍼"},{"group":1,"hexcode":"1F468-1F3FD-200D-1F37C","label":"man feeding baby: medium skin tone","order":1615,"unicode":"👨🏽🍼"},{"group":1,"hexcode":"1F468-1F3FE-200D-1F37C","label":"man feeding baby: medium-dark skin tone","order":1616,"unicode":"👨🏾🍼"},{"group":1,"hexcode":"1F468-1F3FF-200D-1F37C","label":"man feeding baby: dark skin tone","order":1617,"unicode":"👨🏿🍼"}]},{"group":1,"hexcode":"1F9D1-200D-1F37C","label":"person feeding baby","order":1618,"tags":["baby","feeding","nursing","person"],"unicode":"🧑🍼","skins":[{"group":1,"hexcode":"1F9D1-1F3FB-200D-1F37C","label":"person feeding baby: light skin tone","order":1619,"unicode":"🧑🏻🍼"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-1F37C","label":"person feeding baby: medium-light skin tone","order":1620,"unicode":"🧑🏼🍼"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-1F37C","label":"person feeding baby: medium skin tone","order":1621,"unicode":"🧑🏽🍼"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-1F37C","label":"person feeding baby: medium-dark skin tone","order":1622,"unicode":"🧑🏾🍼"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-1F37C","label":"person feeding baby: dark skin tone","order":1623,"unicode":"🧑🏿🍼"}]},{"group":1,"hexcode":"1F47C","label":"baby angel","order":1624,"tags":["angel","baby","face","fairy tale","fantasy"],"unicode":"👼","skins":[{"group":1,"hexcode":"1F47C-1F3FB","label":"baby angel: light skin tone","order":1625,"unicode":"👼🏻"},{"group":1,"hexcode":"1F47C-1F3FC","label":"baby angel: medium-light skin tone","order":1626,"unicode":"👼🏼"},{"group":1,"hexcode":"1F47C-1F3FD","label":"baby angel: medium skin tone","order":1627,"unicode":"👼🏽"},{"group":1,"hexcode":"1F47C-1F3FE","label":"baby angel: medium-dark skin tone","order":1628,"unicode":"👼🏾"},{"group":1,"hexcode":"1F47C-1F3FF","label":"baby angel: dark skin tone","order":1629,"unicode":"👼🏿"}]},{"group":1,"hexcode":"1F385","label":"Santa Claus","order":1630,"tags":["celebration","christmas","claus","father","santa","santa claus"],"unicode":"🎅","skins":[{"group":1,"hexcode":"1F385-1F3FB","label":"Santa Claus: light skin tone","order":1631,"unicode":"🎅🏻"},{"group":1,"hexcode":"1F385-1F3FC","label":"Santa Claus: medium-light skin tone","order":1632,"unicode":"🎅🏼"},{"group":1,"hexcode":"1F385-1F3FD","label":"Santa Claus: medium skin tone","order":1633,"unicode":"🎅🏽"},{"group":1,"hexcode":"1F385-1F3FE","label":"Santa Claus: medium-dark skin tone","order":1634,"unicode":"🎅🏾"},{"group":1,"hexcode":"1F385-1F3FF","label":"Santa Claus: dark skin tone","order":1635,"unicode":"🎅🏿"}]},{"group":1,"hexcode":"1F936","label":"Mrs. Claus","order":1636,"tags":["celebration","christmas","claus","mother","mrs.","mrs. claus"],"unicode":"🤶","skins":[{"group":1,"hexcode":"1F936-1F3FB","label":"Mrs. Claus: light skin tone","order":1637,"unicode":"🤶🏻"},{"group":1,"hexcode":"1F936-1F3FC","label":"Mrs. Claus: medium-light skin tone","order":1638,"unicode":"🤶🏼"},{"group":1,"hexcode":"1F936-1F3FD","label":"Mrs. Claus: medium skin tone","order":1639,"unicode":"🤶🏽"},{"group":1,"hexcode":"1F936-1F3FE","label":"Mrs. Claus: medium-dark skin tone","order":1640,"unicode":"🤶🏾"},{"group":1,"hexcode":"1F936-1F3FF","label":"Mrs. Claus: dark skin tone","order":1641,"unicode":"🤶🏿"}]},{"group":1,"hexcode":"1F9D1-200D-1F384","label":"mx claus","order":1642,"tags":["claus, christmas"],"unicode":"🧑🎄","skins":[{"group":1,"hexcode":"1F9D1-1F3FB-200D-1F384","label":"mx claus: light skin tone","order":1643,"unicode":"🧑🏻🎄"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-1F384","label":"mx claus: medium-light skin tone","order":1644,"unicode":"🧑🏼🎄"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-1F384","label":"mx claus: medium skin tone","order":1645,"unicode":"🧑🏽🎄"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-1F384","label":"mx claus: medium-dark skin tone","order":1646,"unicode":"🧑🏾🎄"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-1F384","label":"mx claus: dark skin tone","order":1647,"unicode":"🧑🏿🎄"}]},{"group":1,"hexcode":"1F9B8","label":"superhero","order":1648,"tags":["good","hero","heroine","superpower"],"unicode":"🦸","skins":[{"group":1,"hexcode":"1F9B8-1F3FB","label":"superhero: light skin tone","order":1649,"unicode":"🦸🏻"},{"group":1,"hexcode":"1F9B8-1F3FC","label":"superhero: medium-light skin tone","order":1650,"unicode":"🦸🏼"},{"group":1,"hexcode":"1F9B8-1F3FD","label":"superhero: medium skin tone","order":1651,"unicode":"🦸🏽"},{"group":1,"hexcode":"1F9B8-1F3FE","label":"superhero: medium-dark skin tone","order":1652,"unicode":"🦸🏾"},{"group":1,"hexcode":"1F9B8-1F3FF","label":"superhero: dark skin tone","order":1653,"unicode":"🦸🏿"}]},{"group":1,"hexcode":"1F9B8-200D-2642-FE0F","label":"man superhero","order":1654,"tags":["good","hero","man","superpower"],"unicode":"🦸♂️","skins":[{"group":1,"hexcode":"1F9B8-1F3FB-200D-2642-FE0F","label":"man superhero: light skin tone","order":1656,"unicode":"🦸🏻♂️"},{"group":1,"hexcode":"1F9B8-1F3FC-200D-2642-FE0F","label":"man superhero: medium-light skin tone","order":1658,"unicode":"🦸🏼♂️"},{"group":1,"hexcode":"1F9B8-1F3FD-200D-2642-FE0F","label":"man superhero: medium skin tone","order":1660,"unicode":"🦸🏽♂️"},{"group":1,"hexcode":"1F9B8-1F3FE-200D-2642-FE0F","label":"man superhero: medium-dark skin tone","order":1662,"unicode":"🦸🏾♂️"},{"group":1,"hexcode":"1F9B8-1F3FF-200D-2642-FE0F","label":"man superhero: dark skin tone","order":1664,"unicode":"🦸🏿♂️"}]},{"group":1,"hexcode":"1F9B8-200D-2640-FE0F","label":"woman superhero","order":1666,"tags":["good","hero","heroine","superpower","woman"],"unicode":"🦸♀️","skins":[{"group":1,"hexcode":"1F9B8-1F3FB-200D-2640-FE0F","label":"woman superhero: light skin tone","order":1668,"unicode":"🦸🏻♀️"},{"group":1,"hexcode":"1F9B8-1F3FC-200D-2640-FE0F","label":"woman superhero: medium-light skin tone","order":1670,"unicode":"🦸🏼♀️"},{"group":1,"hexcode":"1F9B8-1F3FD-200D-2640-FE0F","label":"woman superhero: medium skin tone","order":1672,"unicode":"🦸🏽♀️"},{"group":1,"hexcode":"1F9B8-1F3FE-200D-2640-FE0F","label":"woman superhero: medium-dark skin tone","order":1674,"unicode":"🦸🏾♀️"},{"group":1,"hexcode":"1F9B8-1F3FF-200D-2640-FE0F","label":"woman superhero: dark skin tone","order":1676,"unicode":"🦸🏿♀️"}]},{"group":1,"hexcode":"1F9B9","label":"supervillain","order":1678,"tags":["criminal","evil","superpower","villain"],"unicode":"🦹","skins":[{"group":1,"hexcode":"1F9B9-1F3FB","label":"supervillain: light skin tone","order":1679,"unicode":"🦹🏻"},{"group":1,"hexcode":"1F9B9-1F3FC","label":"supervillain: medium-light skin tone","order":1680,"unicode":"🦹🏼"},{"group":1,"hexcode":"1F9B9-1F3FD","label":"supervillain: medium skin tone","order":1681,"unicode":"🦹🏽"},{"group":1,"hexcode":"1F9B9-1F3FE","label":"supervillain: medium-dark skin tone","order":1682,"unicode":"🦹🏾"},{"group":1,"hexcode":"1F9B9-1F3FF","label":"supervillain: dark skin tone","order":1683,"unicode":"🦹🏿"}]},{"group":1,"hexcode":"1F9B9-200D-2642-FE0F","label":"man supervillain","order":1684,"tags":["criminal","evil","man","superpower","villain"],"unicode":"🦹♂️","skins":[{"group":1,"hexcode":"1F9B9-1F3FB-200D-2642-FE0F","label":"man supervillain: light skin tone","order":1686,"unicode":"🦹🏻♂️"},{"group":1,"hexcode":"1F9B9-1F3FC-200D-2642-FE0F","label":"man supervillain: medium-light skin tone","order":1688,"unicode":"🦹🏼♂️"},{"group":1,"hexcode":"1F9B9-1F3FD-200D-2642-FE0F","label":"man supervillain: medium skin tone","order":1690,"unicode":"🦹🏽♂️"},{"group":1,"hexcode":"1F9B9-1F3FE-200D-2642-FE0F","label":"man supervillain: medium-dark skin tone","order":1692,"unicode":"🦹🏾♂️"},{"group":1,"hexcode":"1F9B9-1F3FF-200D-2642-FE0F","label":"man supervillain: dark skin tone","order":1694,"unicode":"🦹🏿♂️"}]},{"group":1,"hexcode":"1F9B9-200D-2640-FE0F","label":"woman supervillain","order":1696,"tags":["criminal","evil","superpower","villain","woman"],"unicode":"🦹♀️","skins":[{"group":1,"hexcode":"1F9B9-1F3FB-200D-2640-FE0F","label":"woman supervillain: light skin tone","order":1698,"unicode":"🦹🏻♀️"},{"group":1,"hexcode":"1F9B9-1F3FC-200D-2640-FE0F","label":"woman supervillain: medium-light skin tone","order":1700,"unicode":"🦹🏼♀️"},{"group":1,"hexcode":"1F9B9-1F3FD-200D-2640-FE0F","label":"woman supervillain: medium skin tone","order":1702,"unicode":"🦹🏽♀️"},{"group":1,"hexcode":"1F9B9-1F3FE-200D-2640-FE0F","label":"woman supervillain: medium-dark skin tone","order":1704,"unicode":"🦹🏾♀️"},{"group":1,"hexcode":"1F9B9-1F3FF-200D-2640-FE0F","label":"woman supervillain: dark skin tone","order":1706,"unicode":"🦹🏿♀️"}]},{"group":1,"hexcode":"1F9D9","label":"mage","order":1708,"tags":["sorcerer","sorceress","witch","wizard"],"unicode":"🧙","skins":[{"group":1,"hexcode":"1F9D9-1F3FB","label":"mage: light skin tone","order":1709,"unicode":"🧙🏻"},{"group":1,"hexcode":"1F9D9-1F3FC","label":"mage: medium-light skin tone","order":1710,"unicode":"🧙🏼"},{"group":1,"hexcode":"1F9D9-1F3FD","label":"mage: medium skin tone","order":1711,"unicode":"🧙🏽"},{"group":1,"hexcode":"1F9D9-1F3FE","label":"mage: medium-dark skin tone","order":1712,"unicode":"🧙🏾"},{"group":1,"hexcode":"1F9D9-1F3FF","label":"mage: dark skin tone","order":1713,"unicode":"🧙🏿"}]},{"group":1,"hexcode":"1F9D9-200D-2642-FE0F","label":"man mage","order":1714,"tags":["sorcerer","wizard"],"unicode":"🧙♂️","emoticon":":{>","skins":[{"group":1,"hexcode":"1F9D9-1F3FB-200D-2642-FE0F","label":"man mage: light skin tone","order":1716,"unicode":"🧙🏻♂️"},{"group":1,"hexcode":"1F9D9-1F3FC-200D-2642-FE0F","label":"man mage: medium-light skin tone","order":1718,"unicode":"🧙🏼♂️"},{"group":1,"hexcode":"1F9D9-1F3FD-200D-2642-FE0F","label":"man mage: medium skin tone","order":1720,"unicode":"🧙🏽♂️"},{"group":1,"hexcode":"1F9D9-1F3FE-200D-2642-FE0F","label":"man mage: medium-dark skin tone","order":1722,"unicode":"🧙🏾♂️"},{"group":1,"hexcode":"1F9D9-1F3FF-200D-2642-FE0F","label":"man mage: dark skin tone","order":1724,"unicode":"🧙🏿♂️"}]},{"group":1,"hexcode":"1F9D9-200D-2640-FE0F","label":"woman mage","order":1726,"tags":["sorceress","witch"],"unicode":"🧙♀️","skins":[{"group":1,"hexcode":"1F9D9-1F3FB-200D-2640-FE0F","label":"woman mage: light skin tone","order":1728,"unicode":"🧙🏻♀️"},{"group":1,"hexcode":"1F9D9-1F3FC-200D-2640-FE0F","label":"woman mage: medium-light skin tone","order":1730,"unicode":"🧙🏼♀️"},{"group":1,"hexcode":"1F9D9-1F3FD-200D-2640-FE0F","label":"woman mage: medium skin tone","order":1732,"unicode":"🧙🏽♀️"},{"group":1,"hexcode":"1F9D9-1F3FE-200D-2640-FE0F","label":"woman mage: medium-dark skin tone","order":1734,"unicode":"🧙🏾♀️"},{"group":1,"hexcode":"1F9D9-1F3FF-200D-2640-FE0F","label":"woman mage: dark skin tone","order":1736,"unicode":"🧙🏿♀️"}]},{"group":1,"hexcode":"1F9DA","label":"fairy","order":1738,"tags":["oberon","puck","titania"],"unicode":"🧚","skins":[{"group":1,"hexcode":"1F9DA-1F3FB","label":"fairy: light skin tone","order":1739,"unicode":"🧚🏻"},{"group":1,"hexcode":"1F9DA-1F3FC","label":"fairy: medium-light skin tone","order":1740,"unicode":"🧚🏼"},{"group":1,"hexcode":"1F9DA-1F3FD","label":"fairy: medium skin tone","order":1741,"unicode":"🧚🏽"},{"group":1,"hexcode":"1F9DA-1F3FE","label":"fairy: medium-dark skin tone","order":1742,"unicode":"🧚🏾"},{"group":1,"hexcode":"1F9DA-1F3FF","label":"fairy: dark skin tone","order":1743,"unicode":"🧚🏿"}]},{"group":1,"hexcode":"1F9DA-200D-2642-FE0F","label":"man fairy","order":1744,"tags":["oberon","puck"],"unicode":"🧚♂️","skins":[{"group":1,"hexcode":"1F9DA-1F3FB-200D-2642-FE0F","label":"man fairy: light skin tone","order":1746,"unicode":"🧚🏻♂️"},{"group":1,"hexcode":"1F9DA-1F3FC-200D-2642-FE0F","label":"man fairy: medium-light skin tone","order":1748,"unicode":"🧚🏼♂️"},{"group":1,"hexcode":"1F9DA-1F3FD-200D-2642-FE0F","label":"man fairy: medium skin tone","order":1750,"unicode":"🧚🏽♂️"},{"group":1,"hexcode":"1F9DA-1F3FE-200D-2642-FE0F","label":"man fairy: medium-dark skin tone","order":1752,"unicode":"🧚🏾♂️"},{"group":1,"hexcode":"1F9DA-1F3FF-200D-2642-FE0F","label":"man fairy: dark skin tone","order":1754,"unicode":"🧚🏿♂️"}]},{"group":1,"hexcode":"1F9DA-200D-2640-FE0F","label":"woman fairy","order":1756,"tags":["titania"],"unicode":"🧚♀️","skins":[{"group":1,"hexcode":"1F9DA-1F3FB-200D-2640-FE0F","label":"woman fairy: light skin tone","order":1758,"unicode":"🧚🏻♀️"},{"group":1,"hexcode":"1F9DA-1F3FC-200D-2640-FE0F","label":"woman fairy: medium-light skin tone","order":1760,"unicode":"🧚🏼♀️"},{"group":1,"hexcode":"1F9DA-1F3FD-200D-2640-FE0F","label":"woman fairy: medium skin tone","order":1762,"unicode":"🧚🏽♀️"},{"group":1,"hexcode":"1F9DA-1F3FE-200D-2640-FE0F","label":"woman fairy: medium-dark skin tone","order":1764,"unicode":"🧚🏾♀️"},{"group":1,"hexcode":"1F9DA-1F3FF-200D-2640-FE0F","label":"woman fairy: dark skin tone","order":1766,"unicode":"🧚🏿♀️"}]},{"group":1,"hexcode":"1F9DB","label":"vampire","order":1768,"tags":["dracula","undead"],"unicode":"🧛","emoticon":":E","skins":[{"group":1,"hexcode":"1F9DB-1F3FB","label":"vampire: light skin tone","order":1769,"unicode":"🧛🏻"},{"group":1,"hexcode":"1F9DB-1F3FC","label":"vampire: medium-light skin tone","order":1770,"unicode":"🧛🏼"},{"group":1,"hexcode":"1F9DB-1F3FD","label":"vampire: medium skin tone","order":1771,"unicode":"🧛🏽"},{"group":1,"hexcode":"1F9DB-1F3FE","label":"vampire: medium-dark skin tone","order":1772,"unicode":"🧛🏾"},{"group":1,"hexcode":"1F9DB-1F3FF","label":"vampire: dark skin tone","order":1773,"unicode":"🧛🏿"}]},{"group":1,"hexcode":"1F9DB-200D-2642-FE0F","label":"man vampire","order":1774,"tags":["dracula","undead"],"unicode":"🧛♂️","skins":[{"group":1,"hexcode":"1F9DB-1F3FB-200D-2642-FE0F","label":"man vampire: light skin tone","order":1776,"unicode":"🧛🏻♂️"},{"group":1,"hexcode":"1F9DB-1F3FC-200D-2642-FE0F","label":"man vampire: medium-light skin tone","order":1778,"unicode":"🧛🏼♂️"},{"group":1,"hexcode":"1F9DB-1F3FD-200D-2642-FE0F","label":"man vampire: medium skin tone","order":1780,"unicode":"🧛🏽♂️"},{"group":1,"hexcode":"1F9DB-1F3FE-200D-2642-FE0F","label":"man vampire: medium-dark skin tone","order":1782,"unicode":"🧛🏾♂️"},{"group":1,"hexcode":"1F9DB-1F3FF-200D-2642-FE0F","label":"man vampire: dark skin tone","order":1784,"unicode":"🧛🏿♂️"}]},{"group":1,"hexcode":"1F9DB-200D-2640-FE0F","label":"woman vampire","order":1786,"tags":["undead"],"unicode":"🧛♀️","skins":[{"group":1,"hexcode":"1F9DB-1F3FB-200D-2640-FE0F","label":"woman vampire: light skin tone","order":1788,"unicode":"🧛🏻♀️"},{"group":1,"hexcode":"1F9DB-1F3FC-200D-2640-FE0F","label":"woman vampire: medium-light skin tone","order":1790,"unicode":"🧛🏼♀️"},{"group":1,"hexcode":"1F9DB-1F3FD-200D-2640-FE0F","label":"woman vampire: medium skin tone","order":1792,"unicode":"🧛🏽♀️"},{"group":1,"hexcode":"1F9DB-1F3FE-200D-2640-FE0F","label":"woman vampire: medium-dark skin tone","order":1794,"unicode":"🧛🏾♀️"},{"group":1,"hexcode":"1F9DB-1F3FF-200D-2640-FE0F","label":"woman vampire: dark skin tone","order":1796,"unicode":"🧛🏿♀️"}]},{"group":1,"hexcode":"1F9DC","label":"merperson","order":1798,"tags":["mermaid","merman","merwoman"],"unicode":"🧜","skins":[{"group":1,"hexcode":"1F9DC-1F3FB","label":"merperson: light skin tone","order":1799,"unicode":"🧜🏻"},{"group":1,"hexcode":"1F9DC-1F3FC","label":"merperson: medium-light skin tone","order":1800,"unicode":"🧜🏼"},{"group":1,"hexcode":"1F9DC-1F3FD","label":"merperson: medium skin tone","order":1801,"unicode":"🧜🏽"},{"group":1,"hexcode":"1F9DC-1F3FE","label":"merperson: medium-dark skin tone","order":1802,"unicode":"🧜🏾"},{"group":1,"hexcode":"1F9DC-1F3FF","label":"merperson: dark skin tone","order":1803,"unicode":"🧜🏿"}]},{"group":1,"hexcode":"1F9DC-200D-2642-FE0F","label":"merman","order":1804,"tags":["triton"],"unicode":"🧜♂️","skins":[{"group":1,"hexcode":"1F9DC-1F3FB-200D-2642-FE0F","label":"merman: light skin tone","order":1806,"unicode":"🧜🏻♂️"},{"group":1,"hexcode":"1F9DC-1F3FC-200D-2642-FE0F","label":"merman: medium-light skin tone","order":1808,"unicode":"🧜🏼♂️"},{"group":1,"hexcode":"1F9DC-1F3FD-200D-2642-FE0F","label":"merman: medium skin tone","order":1810,"unicode":"🧜🏽♂️"},{"group":1,"hexcode":"1F9DC-1F3FE-200D-2642-FE0F","label":"merman: medium-dark skin tone","order":1812,"unicode":"🧜🏾♂️"},{"group":1,"hexcode":"1F9DC-1F3FF-200D-2642-FE0F","label":"merman: dark skin tone","order":1814,"unicode":"🧜🏿♂️"}]},{"group":1,"hexcode":"1F9DC-200D-2640-FE0F","label":"mermaid","order":1816,"tags":["merwoman"],"unicode":"🧜♀️","skins":[{"group":1,"hexcode":"1F9DC-1F3FB-200D-2640-FE0F","label":"mermaid: light skin tone","order":1818,"unicode":"🧜🏻♀️"},{"group":1,"hexcode":"1F9DC-1F3FC-200D-2640-FE0F","label":"mermaid: medium-light skin tone","order":1820,"unicode":"🧜🏼♀️"},{"group":1,"hexcode":"1F9DC-1F3FD-200D-2640-FE0F","label":"mermaid: medium skin tone","order":1822,"unicode":"🧜🏽♀️"},{"group":1,"hexcode":"1F9DC-1F3FE-200D-2640-FE0F","label":"mermaid: medium-dark skin tone","order":1824,"unicode":"🧜🏾♀️"},{"group":1,"hexcode":"1F9DC-1F3FF-200D-2640-FE0F","label":"mermaid: dark skin tone","order":1826,"unicode":"🧜🏿♀️"}]},{"group":1,"hexcode":"1F9DD","label":"elf","order":1828,"tags":["magical"],"unicode":"🧝","skins":[{"group":1,"hexcode":"1F9DD-1F3FB","label":"elf: light skin tone","order":1829,"unicode":"🧝🏻"},{"group":1,"hexcode":"1F9DD-1F3FC","label":"elf: medium-light skin tone","order":1830,"unicode":"🧝🏼"},{"group":1,"hexcode":"1F9DD-1F3FD","label":"elf: medium skin tone","order":1831,"unicode":"🧝🏽"},{"group":1,"hexcode":"1F9DD-1F3FE","label":"elf: medium-dark skin tone","order":1832,"unicode":"🧝🏾"},{"group":1,"hexcode":"1F9DD-1F3FF","label":"elf: dark skin tone","order":1833,"unicode":"🧝🏿"}]},{"group":1,"hexcode":"1F9DD-200D-2642-FE0F","label":"man elf","order":1834,"tags":["magical"],"unicode":"🧝♂️","skins":[{"group":1,"hexcode":"1F9DD-1F3FB-200D-2642-FE0F","label":"man elf: light skin tone","order":1836,"unicode":"🧝🏻♂️"},{"group":1,"hexcode":"1F9DD-1F3FC-200D-2642-FE0F","label":"man elf: medium-light skin tone","order":1838,"unicode":"🧝🏼♂️"},{"group":1,"hexcode":"1F9DD-1F3FD-200D-2642-FE0F","label":"man elf: medium skin tone","order":1840,"unicode":"🧝🏽♂️"},{"group":1,"hexcode":"1F9DD-1F3FE-200D-2642-FE0F","label":"man elf: medium-dark skin tone","order":1842,"unicode":"🧝🏾♂️"},{"group":1,"hexcode":"1F9DD-1F3FF-200D-2642-FE0F","label":"man elf: dark skin tone","order":1844,"unicode":"🧝🏿♂️"}]},{"group":1,"hexcode":"1F9DD-200D-2640-FE0F","label":"woman elf","order":1846,"tags":["magical"],"unicode":"🧝♀️","skins":[{"group":1,"hexcode":"1F9DD-1F3FB-200D-2640-FE0F","label":"woman elf: light skin tone","order":1848,"unicode":"🧝🏻♀️"},{"group":1,"hexcode":"1F9DD-1F3FC-200D-2640-FE0F","label":"woman elf: medium-light skin tone","order":1850,"unicode":"🧝🏼♀️"},{"group":1,"hexcode":"1F9DD-1F3FD-200D-2640-FE0F","label":"woman elf: medium skin tone","order":1852,"unicode":"🧝🏽♀️"},{"group":1,"hexcode":"1F9DD-1F3FE-200D-2640-FE0F","label":"woman elf: medium-dark skin tone","order":1854,"unicode":"🧝🏾♀️"},{"group":1,"hexcode":"1F9DD-1F3FF-200D-2640-FE0F","label":"woman elf: dark skin tone","order":1856,"unicode":"🧝🏿♀️"}]},{"group":1,"hexcode":"1F9DE","label":"genie","order":1858,"tags":["djinn"],"unicode":"🧞"},{"group":1,"hexcode":"1F9DE-200D-2642-FE0F","label":"man genie","order":1859,"tags":["djinn"],"unicode":"🧞♂️"},{"group":1,"hexcode":"1F9DE-200D-2640-FE0F","label":"woman genie","order":1861,"tags":["djinn"],"unicode":"🧞♀️"},{"group":1,"hexcode":"1F9DF","label":"zombie","order":1863,"tags":["undead","walking dead"],"unicode":"🧟","emoticon":"8#"},{"group":1,"hexcode":"1F9DF-200D-2642-FE0F","label":"man zombie","order":1864,"tags":["undead","walking dead"],"unicode":"🧟♂️"},{"group":1,"hexcode":"1F9DF-200D-2640-FE0F","label":"woman zombie","order":1866,"tags":["undead","walking dead"],"unicode":"🧟♀️"},{"group":1,"hexcode":"1F9CC","label":"troll","order":1868,"tags":["fairy tale","fantasy","monster"],"unicode":"🧌"},{"group":1,"hexcode":"1F486","label":"person getting massage","order":1869,"tags":["face","massage","salon"],"unicode":"💆","skins":[{"group":1,"hexcode":"1F486-1F3FB","label":"person getting massage: light skin tone","order":1870,"unicode":"💆🏻"},{"group":1,"hexcode":"1F486-1F3FC","label":"person getting massage: medium-light skin tone","order":1871,"unicode":"💆🏼"},{"group":1,"hexcode":"1F486-1F3FD","label":"person getting massage: medium skin tone","order":1872,"unicode":"💆🏽"},{"group":1,"hexcode":"1F486-1F3FE","label":"person getting massage: medium-dark skin tone","order":1873,"unicode":"💆🏾"},{"group":1,"hexcode":"1F486-1F3FF","label":"person getting massage: dark skin tone","order":1874,"unicode":"💆🏿"}]},{"group":1,"hexcode":"1F486-200D-2642-FE0F","label":"man getting massage","order":1875,"tags":["face","man","massage"],"unicode":"💆♂️","skins":[{"group":1,"hexcode":"1F486-1F3FB-200D-2642-FE0F","label":"man getting massage: light skin tone","order":1877,"unicode":"💆🏻♂️"},{"group":1,"hexcode":"1F486-1F3FC-200D-2642-FE0F","label":"man getting massage: medium-light skin tone","order":1879,"unicode":"💆🏼♂️"},{"group":1,"hexcode":"1F486-1F3FD-200D-2642-FE0F","label":"man getting massage: medium skin tone","order":1881,"unicode":"💆🏽♂️"},{"group":1,"hexcode":"1F486-1F3FE-200D-2642-FE0F","label":"man getting massage: medium-dark skin tone","order":1883,"unicode":"💆🏾♂️"},{"group":1,"hexcode":"1F486-1F3FF-200D-2642-FE0F","label":"man getting massage: dark skin tone","order":1885,"unicode":"💆🏿♂️"}]},{"group":1,"hexcode":"1F486-200D-2640-FE0F","label":"woman getting massage","order":1887,"tags":["face","massage","woman"],"unicode":"💆♀️","skins":[{"group":1,"hexcode":"1F486-1F3FB-200D-2640-FE0F","label":"woman getting massage: light skin tone","order":1889,"unicode":"💆🏻♀️"},{"group":1,"hexcode":"1F486-1F3FC-200D-2640-FE0F","label":"woman getting massage: medium-light skin tone","order":1891,"unicode":"💆🏼♀️"},{"group":1,"hexcode":"1F486-1F3FD-200D-2640-FE0F","label":"woman getting massage: medium skin tone","order":1893,"unicode":"💆🏽♀️"},{"group":1,"hexcode":"1F486-1F3FE-200D-2640-FE0F","label":"woman getting massage: medium-dark skin tone","order":1895,"unicode":"💆🏾♀️"},{"group":1,"hexcode":"1F486-1F3FF-200D-2640-FE0F","label":"woman getting massage: dark skin tone","order":1897,"unicode":"💆🏿♀️"}]},{"group":1,"hexcode":"1F487","label":"person getting haircut","order":1899,"tags":["barber","beauty","haircut","parlor"],"unicode":"💇","skins":[{"group":1,"hexcode":"1F487-1F3FB","label":"person getting haircut: light skin tone","order":1900,"unicode":"💇🏻"},{"group":1,"hexcode":"1F487-1F3FC","label":"person getting haircut: medium-light skin tone","order":1901,"unicode":"💇🏼"},{"group":1,"hexcode":"1F487-1F3FD","label":"person getting haircut: medium skin tone","order":1902,"unicode":"💇🏽"},{"group":1,"hexcode":"1F487-1F3FE","label":"person getting haircut: medium-dark skin tone","order":1903,"unicode":"💇🏾"},{"group":1,"hexcode":"1F487-1F3FF","label":"person getting haircut: dark skin tone","order":1904,"unicode":"💇🏿"}]},{"group":1,"hexcode":"1F487-200D-2642-FE0F","label":"man getting haircut","order":1905,"tags":["haircut","man"],"unicode":"💇♂️","skins":[{"group":1,"hexcode":"1F487-1F3FB-200D-2642-FE0F","label":"man getting haircut: light skin tone","order":1907,"unicode":"💇🏻♂️"},{"group":1,"hexcode":"1F487-1F3FC-200D-2642-FE0F","label":"man getting haircut: medium-light skin tone","order":1909,"unicode":"💇🏼♂️"},{"group":1,"hexcode":"1F487-1F3FD-200D-2642-FE0F","label":"man getting haircut: medium skin tone","order":1911,"unicode":"💇🏽♂️"},{"group":1,"hexcode":"1F487-1F3FE-200D-2642-FE0F","label":"man getting haircut: medium-dark skin tone","order":1913,"unicode":"💇🏾♂️"},{"group":1,"hexcode":"1F487-1F3FF-200D-2642-FE0F","label":"man getting haircut: dark skin tone","order":1915,"unicode":"💇🏿♂️"}]},{"group":1,"hexcode":"1F487-200D-2640-FE0F","label":"woman getting haircut","order":1917,"tags":["haircut","woman"],"unicode":"💇♀️","skins":[{"group":1,"hexcode":"1F487-1F3FB-200D-2640-FE0F","label":"woman getting haircut: light skin tone","order":1919,"unicode":"💇🏻♀️"},{"group":1,"hexcode":"1F487-1F3FC-200D-2640-FE0F","label":"woman getting haircut: medium-light skin tone","order":1921,"unicode":"💇🏼♀️"},{"group":1,"hexcode":"1F487-1F3FD-200D-2640-FE0F","label":"woman getting haircut: medium skin tone","order":1923,"unicode":"💇🏽♀️"},{"group":1,"hexcode":"1F487-1F3FE-200D-2640-FE0F","label":"woman getting haircut: medium-dark skin tone","order":1925,"unicode":"💇🏾♀️"},{"group":1,"hexcode":"1F487-1F3FF-200D-2640-FE0F","label":"woman getting haircut: dark skin tone","order":1927,"unicode":"💇🏿♀️"}]},{"group":1,"hexcode":"1F6B6","label":"person walking","order":1929,"tags":["hike","walk","walking"],"unicode":"🚶","skins":[{"group":1,"hexcode":"1F6B6-1F3FB","label":"person walking: light skin tone","order":1930,"unicode":"🚶🏻"},{"group":1,"hexcode":"1F6B6-1F3FC","label":"person walking: medium-light skin tone","order":1931,"unicode":"🚶🏼"},{"group":1,"hexcode":"1F6B6-1F3FD","label":"person walking: medium skin tone","order":1932,"unicode":"🚶🏽"},{"group":1,"hexcode":"1F6B6-1F3FE","label":"person walking: medium-dark skin tone","order":1933,"unicode":"🚶🏾"},{"group":1,"hexcode":"1F6B6-1F3FF","label":"person walking: dark skin tone","order":1934,"unicode":"🚶🏿"}]},{"group":1,"hexcode":"1F6B6-200D-2642-FE0F","label":"man walking","order":1935,"tags":["hike","man","walk"],"unicode":"🚶♂️","skins":[{"group":1,"hexcode":"1F6B6-1F3FB-200D-2642-FE0F","label":"man walking: light skin tone","order":1937,"unicode":"🚶🏻♂️"},{"group":1,"hexcode":"1F6B6-1F3FC-200D-2642-FE0F","label":"man walking: medium-light skin tone","order":1939,"unicode":"🚶🏼♂️"},{"group":1,"hexcode":"1F6B6-1F3FD-200D-2642-FE0F","label":"man walking: medium skin tone","order":1941,"unicode":"🚶🏽♂️"},{"group":1,"hexcode":"1F6B6-1F3FE-200D-2642-FE0F","label":"man walking: medium-dark skin tone","order":1943,"unicode":"🚶🏾♂️"},{"group":1,"hexcode":"1F6B6-1F3FF-200D-2642-FE0F","label":"man walking: dark skin tone","order":1945,"unicode":"🚶🏿♂️"}]},{"group":1,"hexcode":"1F6B6-200D-2640-FE0F","label":"woman walking","order":1947,"tags":["hike","walk","woman"],"unicode":"🚶♀️","skins":[{"group":1,"hexcode":"1F6B6-1F3FB-200D-2640-FE0F","label":"woman walking: light skin tone","order":1949,"unicode":"🚶🏻♀️"},{"group":1,"hexcode":"1F6B6-1F3FC-200D-2640-FE0F","label":"woman walking: medium-light skin tone","order":1951,"unicode":"🚶🏼♀️"},{"group":1,"hexcode":"1F6B6-1F3FD-200D-2640-FE0F","label":"woman walking: medium skin tone","order":1953,"unicode":"🚶🏽♀️"},{"group":1,"hexcode":"1F6B6-1F3FE-200D-2640-FE0F","label":"woman walking: medium-dark skin tone","order":1955,"unicode":"🚶🏾♀️"},{"group":1,"hexcode":"1F6B6-1F3FF-200D-2640-FE0F","label":"woman walking: dark skin tone","order":1957,"unicode":"🚶🏿♀️"}]},{"group":1,"hexcode":"1F9CD","label":"person standing","order":1959,"tags":["stand","standing"],"unicode":"🧍","skins":[{"group":1,"hexcode":"1F9CD-1F3FB","label":"person standing: light skin tone","order":1960,"unicode":"🧍🏻"},{"group":1,"hexcode":"1F9CD-1F3FC","label":"person standing: medium-light skin tone","order":1961,"unicode":"🧍🏼"},{"group":1,"hexcode":"1F9CD-1F3FD","label":"person standing: medium skin tone","order":1962,"unicode":"🧍🏽"},{"group":1,"hexcode":"1F9CD-1F3FE","label":"person standing: medium-dark skin tone","order":1963,"unicode":"🧍🏾"},{"group":1,"hexcode":"1F9CD-1F3FF","label":"person standing: dark skin tone","order":1964,"unicode":"🧍🏿"}]},{"group":1,"hexcode":"1F9CD-200D-2642-FE0F","label":"man standing","order":1965,"tags":["man","standing"],"unicode":"🧍♂️","skins":[{"group":1,"hexcode":"1F9CD-1F3FB-200D-2642-FE0F","label":"man standing: light skin tone","order":1967,"unicode":"🧍🏻♂️"},{"group":1,"hexcode":"1F9CD-1F3FC-200D-2642-FE0F","label":"man standing: medium-light skin tone","order":1969,"unicode":"🧍🏼♂️"},{"group":1,"hexcode":"1F9CD-1F3FD-200D-2642-FE0F","label":"man standing: medium skin tone","order":1971,"unicode":"🧍🏽♂️"},{"group":1,"hexcode":"1F9CD-1F3FE-200D-2642-FE0F","label":"man standing: medium-dark skin tone","order":1973,"unicode":"🧍🏾♂️"},{"group":1,"hexcode":"1F9CD-1F3FF-200D-2642-FE0F","label":"man standing: dark skin tone","order":1975,"unicode":"🧍🏿♂️"}]},{"group":1,"hexcode":"1F9CD-200D-2640-FE0F","label":"woman standing","order":1977,"tags":["standing","woman"],"unicode":"🧍♀️","skins":[{"group":1,"hexcode":"1F9CD-1F3FB-200D-2640-FE0F","label":"woman standing: light skin tone","order":1979,"unicode":"🧍🏻♀️"},{"group":1,"hexcode":"1F9CD-1F3FC-200D-2640-FE0F","label":"woman standing: medium-light skin tone","order":1981,"unicode":"🧍🏼♀️"},{"group":1,"hexcode":"1F9CD-1F3FD-200D-2640-FE0F","label":"woman standing: medium skin tone","order":1983,"unicode":"🧍🏽♀️"},{"group":1,"hexcode":"1F9CD-1F3FE-200D-2640-FE0F","label":"woman standing: medium-dark skin tone","order":1985,"unicode":"🧍🏾♀️"},{"group":1,"hexcode":"1F9CD-1F3FF-200D-2640-FE0F","label":"woman standing: dark skin tone","order":1987,"unicode":"🧍🏿♀️"}]},{"group":1,"hexcode":"1F9CE","label":"person kneeling","order":1989,"tags":["kneel","kneeling"],"unicode":"🧎","skins":[{"group":1,"hexcode":"1F9CE-1F3FB","label":"person kneeling: light skin tone","order":1990,"unicode":"🧎🏻"},{"group":1,"hexcode":"1F9CE-1F3FC","label":"person kneeling: medium-light skin tone","order":1991,"unicode":"🧎🏼"},{"group":1,"hexcode":"1F9CE-1F3FD","label":"person kneeling: medium skin tone","order":1992,"unicode":"🧎🏽"},{"group":1,"hexcode":"1F9CE-1F3FE","label":"person kneeling: medium-dark skin tone","order":1993,"unicode":"🧎🏾"},{"group":1,"hexcode":"1F9CE-1F3FF","label":"person kneeling: dark skin tone","order":1994,"unicode":"🧎🏿"}]},{"group":1,"hexcode":"1F9CE-200D-2642-FE0F","label":"man kneeling","order":1995,"tags":["kneeling","man"],"unicode":"🧎♂️","skins":[{"group":1,"hexcode":"1F9CE-1F3FB-200D-2642-FE0F","label":"man kneeling: light skin tone","order":1997,"unicode":"🧎🏻♂️"},{"group":1,"hexcode":"1F9CE-1F3FC-200D-2642-FE0F","label":"man kneeling: medium-light skin tone","order":1999,"unicode":"🧎🏼♂️"},{"group":1,"hexcode":"1F9CE-1F3FD-200D-2642-FE0F","label":"man kneeling: medium skin tone","order":2001,"unicode":"🧎🏽♂️"},{"group":1,"hexcode":"1F9CE-1F3FE-200D-2642-FE0F","label":"man kneeling: medium-dark skin tone","order":2003,"unicode":"🧎🏾♂️"},{"group":1,"hexcode":"1F9CE-1F3FF-200D-2642-FE0F","label":"man kneeling: dark skin tone","order":2005,"unicode":"🧎🏿♂️"}]},{"group":1,"hexcode":"1F9CE-200D-2640-FE0F","label":"woman kneeling","order":2007,"tags":["kneeling","woman"],"unicode":"🧎♀️","skins":[{"group":1,"hexcode":"1F9CE-1F3FB-200D-2640-FE0F","label":"woman kneeling: light skin tone","order":2009,"unicode":"🧎🏻♀️"},{"group":1,"hexcode":"1F9CE-1F3FC-200D-2640-FE0F","label":"woman kneeling: medium-light skin tone","order":2011,"unicode":"🧎🏼♀️"},{"group":1,"hexcode":"1F9CE-1F3FD-200D-2640-FE0F","label":"woman kneeling: medium skin tone","order":2013,"unicode":"🧎🏽♀️"},{"group":1,"hexcode":"1F9CE-1F3FE-200D-2640-FE0F","label":"woman kneeling: medium-dark skin tone","order":2015,"unicode":"🧎🏾♀️"},{"group":1,"hexcode":"1F9CE-1F3FF-200D-2640-FE0F","label":"woman kneeling: dark skin tone","order":2017,"unicode":"🧎🏿♀️"}]},{"group":1,"hexcode":"1F9D1-200D-1F9AF","label":"person with white cane","order":2019,"tags":["accessibility","blind"],"unicode":"🧑🦯","skins":[{"group":1,"hexcode":"1F9D1-1F3FB-200D-1F9AF","label":"person with white cane: light skin tone","order":2020,"unicode":"🧑🏻🦯"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-1F9AF","label":"person with white cane: medium-light skin tone","order":2021,"unicode":"🧑🏼🦯"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-1F9AF","label":"person with white cane: medium skin tone","order":2022,"unicode":"🧑🏽🦯"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-1F9AF","label":"person with white cane: medium-dark skin tone","order":2023,"unicode":"🧑🏾🦯"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-1F9AF","label":"person with white cane: dark skin tone","order":2024,"unicode":"🧑🏿🦯"}]},{"group":1,"hexcode":"1F468-200D-1F9AF","label":"man with white cane","order":2025,"tags":["accessibility","blind","man"],"unicode":"👨🦯","skins":[{"group":1,"hexcode":"1F468-1F3FB-200D-1F9AF","label":"man with white cane: light skin tone","order":2026,"unicode":"👨🏻🦯"},{"group":1,"hexcode":"1F468-1F3FC-200D-1F9AF","label":"man with white cane: medium-light skin tone","order":2027,"unicode":"👨🏼🦯"},{"group":1,"hexcode":"1F468-1F3FD-200D-1F9AF","label":"man with white cane: medium skin tone","order":2028,"unicode":"👨🏽🦯"},{"group":1,"hexcode":"1F468-1F3FE-200D-1F9AF","label":"man with white cane: medium-dark skin tone","order":2029,"unicode":"👨🏾🦯"},{"group":1,"hexcode":"1F468-1F3FF-200D-1F9AF","label":"man with white cane: dark skin tone","order":2030,"unicode":"👨🏿🦯"}]},{"group":1,"hexcode":"1F469-200D-1F9AF","label":"woman with white cane","order":2031,"tags":["accessibility","blind","woman"],"unicode":"👩🦯","skins":[{"group":1,"hexcode":"1F469-1F3FB-200D-1F9AF","label":"woman with white cane: light skin tone","order":2032,"unicode":"👩🏻🦯"},{"group":1,"hexcode":"1F469-1F3FC-200D-1F9AF","label":"woman with white cane: medium-light skin tone","order":2033,"unicode":"👩🏼🦯"},{"group":1,"hexcode":"1F469-1F3FD-200D-1F9AF","label":"woman with white cane: medium skin tone","order":2034,"unicode":"👩🏽🦯"},{"group":1,"hexcode":"1F469-1F3FE-200D-1F9AF","label":"woman with white cane: medium-dark skin tone","order":2035,"unicode":"👩🏾🦯"},{"group":1,"hexcode":"1F469-1F3FF-200D-1F9AF","label":"woman with white cane: dark skin tone","order":2036,"unicode":"👩🏿🦯"}]},{"group":1,"hexcode":"1F9D1-200D-1F9BC","label":"person in motorized wheelchair","order":2037,"tags":["accessibility","wheelchair"],"unicode":"🧑🦼","skins":[{"group":1,"hexcode":"1F9D1-1F3FB-200D-1F9BC","label":"person in motorized wheelchair: light skin tone","order":2038,"unicode":"🧑🏻🦼"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-1F9BC","label":"person in motorized wheelchair: medium-light skin tone","order":2039,"unicode":"🧑🏼🦼"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-1F9BC","label":"person in motorized wheelchair: medium skin tone","order":2040,"unicode":"🧑🏽🦼"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-1F9BC","label":"person in motorized wheelchair: medium-dark skin tone","order":2041,"unicode":"🧑🏾🦼"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-1F9BC","label":"person in motorized wheelchair: dark skin tone","order":2042,"unicode":"🧑🏿🦼"}]},{"group":1,"hexcode":"1F468-200D-1F9BC","label":"man in motorized wheelchair","order":2043,"tags":["accessibility","man","wheelchair"],"unicode":"👨🦼","skins":[{"group":1,"hexcode":"1F468-1F3FB-200D-1F9BC","label":"man in motorized wheelchair: light skin tone","order":2044,"unicode":"👨🏻🦼"},{"group":1,"hexcode":"1F468-1F3FC-200D-1F9BC","label":"man in motorized wheelchair: medium-light skin tone","order":2045,"unicode":"👨🏼🦼"},{"group":1,"hexcode":"1F468-1F3FD-200D-1F9BC","label":"man in motorized wheelchair: medium skin tone","order":2046,"unicode":"👨🏽🦼"},{"group":1,"hexcode":"1F468-1F3FE-200D-1F9BC","label":"man in motorized wheelchair: medium-dark skin tone","order":2047,"unicode":"👨🏾🦼"},{"group":1,"hexcode":"1F468-1F3FF-200D-1F9BC","label":"man in motorized wheelchair: dark skin tone","order":2048,"unicode":"👨🏿🦼"}]},{"group":1,"hexcode":"1F469-200D-1F9BC","label":"woman in motorized wheelchair","order":2049,"tags":["accessibility","wheelchair","woman"],"unicode":"👩🦼","skins":[{"group":1,"hexcode":"1F469-1F3FB-200D-1F9BC","label":"woman in motorized wheelchair: light skin tone","order":2050,"unicode":"👩🏻🦼"},{"group":1,"hexcode":"1F469-1F3FC-200D-1F9BC","label":"woman in motorized wheelchair: medium-light skin tone","order":2051,"unicode":"👩🏼🦼"},{"group":1,"hexcode":"1F469-1F3FD-200D-1F9BC","label":"woman in motorized wheelchair: medium skin tone","order":2052,"unicode":"👩🏽🦼"},{"group":1,"hexcode":"1F469-1F3FE-200D-1F9BC","label":"woman in motorized wheelchair: medium-dark skin tone","order":2053,"unicode":"👩🏾🦼"},{"group":1,"hexcode":"1F469-1F3FF-200D-1F9BC","label":"woman in motorized wheelchair: dark skin tone","order":2054,"unicode":"👩🏿🦼"}]},{"group":1,"hexcode":"1F9D1-200D-1F9BD","label":"person in manual wheelchair","order":2055,"tags":["accessibility","wheelchair"],"unicode":"🧑🦽","skins":[{"group":1,"hexcode":"1F9D1-1F3FB-200D-1F9BD","label":"person in manual wheelchair: light skin tone","order":2056,"unicode":"🧑🏻🦽"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-1F9BD","label":"person in manual wheelchair: medium-light skin tone","order":2057,"unicode":"🧑🏼🦽"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-1F9BD","label":"person in manual wheelchair: medium skin tone","order":2058,"unicode":"🧑🏽🦽"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-1F9BD","label":"person in manual wheelchair: medium-dark skin tone","order":2059,"unicode":"🧑🏾🦽"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-1F9BD","label":"person in manual wheelchair: dark skin tone","order":2060,"unicode":"🧑🏿🦽"}]},{"group":1,"hexcode":"1F468-200D-1F9BD","label":"man in manual wheelchair","order":2061,"tags":["accessibility","man","wheelchair"],"unicode":"👨🦽","skins":[{"group":1,"hexcode":"1F468-1F3FB-200D-1F9BD","label":"man in manual wheelchair: light skin tone","order":2062,"unicode":"👨🏻🦽"},{"group":1,"hexcode":"1F468-1F3FC-200D-1F9BD","label":"man in manual wheelchair: medium-light skin tone","order":2063,"unicode":"👨🏼🦽"},{"group":1,"hexcode":"1F468-1F3FD-200D-1F9BD","label":"man in manual wheelchair: medium skin tone","order":2064,"unicode":"👨🏽🦽"},{"group":1,"hexcode":"1F468-1F3FE-200D-1F9BD","label":"man in manual wheelchair: medium-dark skin tone","order":2065,"unicode":"👨🏾🦽"},{"group":1,"hexcode":"1F468-1F3FF-200D-1F9BD","label":"man in manual wheelchair: dark skin tone","order":2066,"unicode":"👨🏿🦽"}]},{"group":1,"hexcode":"1F469-200D-1F9BD","label":"woman in manual wheelchair","order":2067,"tags":["accessibility","wheelchair","woman"],"unicode":"👩🦽","skins":[{"group":1,"hexcode":"1F469-1F3FB-200D-1F9BD","label":"woman in manual wheelchair: light skin tone","order":2068,"unicode":"👩🏻🦽"},{"group":1,"hexcode":"1F469-1F3FC-200D-1F9BD","label":"woman in manual wheelchair: medium-light skin tone","order":2069,"unicode":"👩🏼🦽"},{"group":1,"hexcode":"1F469-1F3FD-200D-1F9BD","label":"woman in manual wheelchair: medium skin tone","order":2070,"unicode":"👩🏽🦽"},{"group":1,"hexcode":"1F469-1F3FE-200D-1F9BD","label":"woman in manual wheelchair: medium-dark skin tone","order":2071,"unicode":"👩🏾🦽"},{"group":1,"hexcode":"1F469-1F3FF-200D-1F9BD","label":"woman in manual wheelchair: dark skin tone","order":2072,"unicode":"👩🏿🦽"}]},{"group":1,"hexcode":"1F3C3","label":"person running","order":2073,"tags":["marathon","running"],"unicode":"🏃","skins":[{"group":1,"hexcode":"1F3C3-1F3FB","label":"person running: light skin tone","order":2074,"unicode":"🏃🏻"},{"group":1,"hexcode":"1F3C3-1F3FC","label":"person running: medium-light skin tone","order":2075,"unicode":"🏃🏼"},{"group":1,"hexcode":"1F3C3-1F3FD","label":"person running: medium skin tone","order":2076,"unicode":"🏃🏽"},{"group":1,"hexcode":"1F3C3-1F3FE","label":"person running: medium-dark skin tone","order":2077,"unicode":"🏃🏾"},{"group":1,"hexcode":"1F3C3-1F3FF","label":"person running: dark skin tone","order":2078,"unicode":"🏃🏿"}]},{"group":1,"hexcode":"1F3C3-200D-2642-FE0F","label":"man running","order":2079,"tags":["man","marathon","racing","running"],"unicode":"🏃♂️","skins":[{"group":1,"hexcode":"1F3C3-1F3FB-200D-2642-FE0F","label":"man running: light skin tone","order":2081,"unicode":"🏃🏻♂️"},{"group":1,"hexcode":"1F3C3-1F3FC-200D-2642-FE0F","label":"man running: medium-light skin tone","order":2083,"unicode":"🏃🏼♂️"},{"group":1,"hexcode":"1F3C3-1F3FD-200D-2642-FE0F","label":"man running: medium skin tone","order":2085,"unicode":"🏃🏽♂️"},{"group":1,"hexcode":"1F3C3-1F3FE-200D-2642-FE0F","label":"man running: medium-dark skin tone","order":2087,"unicode":"🏃🏾♂️"},{"group":1,"hexcode":"1F3C3-1F3FF-200D-2642-FE0F","label":"man running: dark skin tone","order":2089,"unicode":"🏃🏿♂️"}]},{"group":1,"hexcode":"1F3C3-200D-2640-FE0F","label":"woman running","order":2091,"tags":["marathon","racing","running","woman"],"unicode":"🏃♀️","skins":[{"group":1,"hexcode":"1F3C3-1F3FB-200D-2640-FE0F","label":"woman running: light skin tone","order":2093,"unicode":"🏃🏻♀️"},{"group":1,"hexcode":"1F3C3-1F3FC-200D-2640-FE0F","label":"woman running: medium-light skin tone","order":2095,"unicode":"🏃🏼♀️"},{"group":1,"hexcode":"1F3C3-1F3FD-200D-2640-FE0F","label":"woman running: medium skin tone","order":2097,"unicode":"🏃🏽♀️"},{"group":1,"hexcode":"1F3C3-1F3FE-200D-2640-FE0F","label":"woman running: medium-dark skin tone","order":2099,"unicode":"🏃🏾♀️"},{"group":1,"hexcode":"1F3C3-1F3FF-200D-2640-FE0F","label":"woman running: dark skin tone","order":2101,"unicode":"🏃🏿♀️"}]},{"group":1,"hexcode":"1F483","label":"woman dancing","order":2103,"tags":["dance","dancing","woman"],"unicode":"💃","skins":[{"group":1,"hexcode":"1F483-1F3FB","label":"woman dancing: light skin tone","order":2104,"unicode":"💃🏻"},{"group":1,"hexcode":"1F483-1F3FC","label":"woman dancing: medium-light skin tone","order":2105,"unicode":"💃🏼"},{"group":1,"hexcode":"1F483-1F3FD","label":"woman dancing: medium skin tone","order":2106,"unicode":"💃🏽"},{"group":1,"hexcode":"1F483-1F3FE","label":"woman dancing: medium-dark skin tone","order":2107,"unicode":"💃🏾"},{"group":1,"hexcode":"1F483-1F3FF","label":"woman dancing: dark skin tone","order":2108,"unicode":"💃🏿"}]},{"group":1,"hexcode":"1F57A","label":"man dancing","order":2109,"tags":["dance","dancing","man"],"unicode":"🕺","skins":[{"group":1,"hexcode":"1F57A-1F3FB","label":"man dancing: light skin tone","order":2110,"unicode":"🕺🏻"},{"group":1,"hexcode":"1F57A-1F3FC","label":"man dancing: medium-light skin tone","order":2111,"unicode":"🕺🏼"},{"group":1,"hexcode":"1F57A-1F3FD","label":"man dancing: medium skin tone","order":2112,"unicode":"🕺🏽"},{"group":1,"hexcode":"1F57A-1F3FE","label":"man dancing: medium-dark skin tone","order":2113,"unicode":"🕺🏾"},{"group":1,"hexcode":"1F57A-1F3FF","label":"man dancing: dark skin tone","order":2114,"unicode":"🕺🏿"}]},{"group":1,"hexcode":"1F574","label":"person in suit levitating","order":2116,"tags":["business","person","suit"],"unicode":"🕴️","skins":[{"group":1,"hexcode":"1F574-1F3FB","label":"person in suit levitating: light skin tone","order":2117,"unicode":"🕴🏻"},{"group":1,"hexcode":"1F574-1F3FC","label":"person in suit levitating: medium-light skin tone","order":2118,"unicode":"🕴🏼"},{"group":1,"hexcode":"1F574-1F3FD","label":"person in suit levitating: medium skin tone","order":2119,"unicode":"🕴🏽"},{"group":1,"hexcode":"1F574-1F3FE","label":"person in suit levitating: medium-dark skin tone","order":2120,"unicode":"🕴🏾"},{"group":1,"hexcode":"1F574-1F3FF","label":"person in suit levitating: dark skin tone","order":2121,"unicode":"🕴🏿"}]},{"group":1,"hexcode":"1F46F","label":"people with bunny ears","order":2122,"tags":["bunny ear","dancer","partying"],"unicode":"👯"},{"group":1,"hexcode":"1F46F-200D-2642-FE0F","label":"men with bunny ears","order":2123,"tags":["bunny ear","dancer","men","partying"],"unicode":"👯♂️"},{"group":1,"hexcode":"1F46F-200D-2640-FE0F","label":"women with bunny ears","order":2125,"tags":["bunny ear","dancer","partying","women"],"unicode":"👯♀️"},{"group":1,"hexcode":"1F9D6","label":"person in steamy room","order":2127,"tags":["sauna","steam room"],"unicode":"🧖","skins":[{"group":1,"hexcode":"1F9D6-1F3FB","label":"person in steamy room: light skin tone","order":2128,"unicode":"🧖🏻"},{"group":1,"hexcode":"1F9D6-1F3FC","label":"person in steamy room: medium-light skin tone","order":2129,"unicode":"🧖🏼"},{"group":1,"hexcode":"1F9D6-1F3FD","label":"person in steamy room: medium skin tone","order":2130,"unicode":"🧖🏽"},{"group":1,"hexcode":"1F9D6-1F3FE","label":"person in steamy room: medium-dark skin tone","order":2131,"unicode":"🧖🏾"},{"group":1,"hexcode":"1F9D6-1F3FF","label":"person in steamy room: dark skin tone","order":2132,"unicode":"🧖🏿"}]},{"group":1,"hexcode":"1F9D6-200D-2642-FE0F","label":"man in steamy room","order":2133,"tags":["sauna","steam room"],"unicode":"🧖♂️","skins":[{"group":1,"hexcode":"1F9D6-1F3FB-200D-2642-FE0F","label":"man in steamy room: light skin tone","order":2135,"unicode":"🧖🏻♂️"},{"group":1,"hexcode":"1F9D6-1F3FC-200D-2642-FE0F","label":"man in steamy room: medium-light skin tone","order":2137,"unicode":"🧖🏼♂️"},{"group":1,"hexcode":"1F9D6-1F3FD-200D-2642-FE0F","label":"man in steamy room: medium skin tone","order":2139,"unicode":"🧖🏽♂️"},{"group":1,"hexcode":"1F9D6-1F3FE-200D-2642-FE0F","label":"man in steamy room: medium-dark skin tone","order":2141,"unicode":"🧖🏾♂️"},{"group":1,"hexcode":"1F9D6-1F3FF-200D-2642-FE0F","label":"man in steamy room: dark skin tone","order":2143,"unicode":"🧖🏿♂️"}]},{"group":1,"hexcode":"1F9D6-200D-2640-FE0F","label":"woman in steamy room","order":2145,"tags":["sauna","steam room"],"unicode":"🧖♀️","skins":[{"group":1,"hexcode":"1F9D6-1F3FB-200D-2640-FE0F","label":"woman in steamy room: light skin tone","order":2147,"unicode":"🧖🏻♀️"},{"group":1,"hexcode":"1F9D6-1F3FC-200D-2640-FE0F","label":"woman in steamy room: medium-light skin tone","order":2149,"unicode":"🧖🏼♀️"},{"group":1,"hexcode":"1F9D6-1F3FD-200D-2640-FE0F","label":"woman in steamy room: medium skin tone","order":2151,"unicode":"🧖🏽♀️"},{"group":1,"hexcode":"1F9D6-1F3FE-200D-2640-FE0F","label":"woman in steamy room: medium-dark skin tone","order":2153,"unicode":"🧖🏾♀️"},{"group":1,"hexcode":"1F9D6-1F3FF-200D-2640-FE0F","label":"woman in steamy room: dark skin tone","order":2155,"unicode":"🧖🏿♀️"}]},{"group":1,"hexcode":"1F9D7","label":"person climbing","order":2157,"tags":["climber"],"unicode":"🧗","skins":[{"group":1,"hexcode":"1F9D7-1F3FB","label":"person climbing: light skin tone","order":2158,"unicode":"🧗🏻"},{"group":1,"hexcode":"1F9D7-1F3FC","label":"person climbing: medium-light skin tone","order":2159,"unicode":"🧗🏼"},{"group":1,"hexcode":"1F9D7-1F3FD","label":"person climbing: medium skin tone","order":2160,"unicode":"🧗🏽"},{"group":1,"hexcode":"1F9D7-1F3FE","label":"person climbing: medium-dark skin tone","order":2161,"unicode":"🧗🏾"},{"group":1,"hexcode":"1F9D7-1F3FF","label":"person climbing: dark skin tone","order":2162,"unicode":"🧗🏿"}]},{"group":1,"hexcode":"1F9D7-200D-2642-FE0F","label":"man climbing","order":2163,"tags":["climber"],"unicode":"🧗♂️","skins":[{"group":1,"hexcode":"1F9D7-1F3FB-200D-2642-FE0F","label":"man climbing: light skin tone","order":2165,"unicode":"🧗🏻♂️"},{"group":1,"hexcode":"1F9D7-1F3FC-200D-2642-FE0F","label":"man climbing: medium-light skin tone","order":2167,"unicode":"🧗🏼♂️"},{"group":1,"hexcode":"1F9D7-1F3FD-200D-2642-FE0F","label":"man climbing: medium skin tone","order":2169,"unicode":"🧗🏽♂️"},{"group":1,"hexcode":"1F9D7-1F3FE-200D-2642-FE0F","label":"man climbing: medium-dark skin tone","order":2171,"unicode":"🧗🏾♂️"},{"group":1,"hexcode":"1F9D7-1F3FF-200D-2642-FE0F","label":"man climbing: dark skin tone","order":2173,"unicode":"🧗🏿♂️"}]},{"group":1,"hexcode":"1F9D7-200D-2640-FE0F","label":"woman climbing","order":2175,"tags":["climber"],"unicode":"🧗♀️","skins":[{"group":1,"hexcode":"1F9D7-1F3FB-200D-2640-FE0F","label":"woman climbing: light skin tone","order":2177,"unicode":"🧗🏻♀️"},{"group":1,"hexcode":"1F9D7-1F3FC-200D-2640-FE0F","label":"woman climbing: medium-light skin tone","order":2179,"unicode":"🧗🏼♀️"},{"group":1,"hexcode":"1F9D7-1F3FD-200D-2640-FE0F","label":"woman climbing: medium skin tone","order":2181,"unicode":"🧗🏽♀️"},{"group":1,"hexcode":"1F9D7-1F3FE-200D-2640-FE0F","label":"woman climbing: medium-dark skin tone","order":2183,"unicode":"🧗🏾♀️"},{"group":1,"hexcode":"1F9D7-1F3FF-200D-2640-FE0F","label":"woman climbing: dark skin tone","order":2185,"unicode":"🧗🏿♀️"}]},{"group":1,"hexcode":"1F93A","label":"person fencing","order":2187,"tags":["fencer","fencing","sword"],"unicode":"🤺"},{"group":1,"hexcode":"1F3C7","label":"horse racing","order":2188,"tags":["horse","jockey","racehorse","racing"],"unicode":"🏇","skins":[{"group":1,"hexcode":"1F3C7-1F3FB","label":"horse racing: light skin tone","order":2189,"unicode":"🏇🏻"},{"group":1,"hexcode":"1F3C7-1F3FC","label":"horse racing: medium-light skin tone","order":2190,"unicode":"🏇🏼"},{"group":1,"hexcode":"1F3C7-1F3FD","label":"horse racing: medium skin tone","order":2191,"unicode":"🏇🏽"},{"group":1,"hexcode":"1F3C7-1F3FE","label":"horse racing: medium-dark skin tone","order":2192,"unicode":"🏇🏾"},{"group":1,"hexcode":"1F3C7-1F3FF","label":"horse racing: dark skin tone","order":2193,"unicode":"🏇🏿"}]},{"group":1,"hexcode":"26F7","label":"skier","order":2195,"tags":["ski","snow"],"unicode":"⛷️"},{"group":1,"hexcode":"1F3C2","label":"snowboarder","order":2196,"tags":["ski","snow","snowboard"],"unicode":"🏂️","skins":[{"group":1,"hexcode":"1F3C2-1F3FB","label":"snowboarder: light skin tone","order":2197,"unicode":"🏂🏻"},{"group":1,"hexcode":"1F3C2-1F3FC","label":"snowboarder: medium-light skin tone","order":2198,"unicode":"🏂🏼"},{"group":1,"hexcode":"1F3C2-1F3FD","label":"snowboarder: medium skin tone","order":2199,"unicode":"🏂🏽"},{"group":1,"hexcode":"1F3C2-1F3FE","label":"snowboarder: medium-dark skin tone","order":2200,"unicode":"🏂🏾"},{"group":1,"hexcode":"1F3C2-1F3FF","label":"snowboarder: dark skin tone","order":2201,"unicode":"🏂🏿"}]},{"group":1,"hexcode":"1F3CC","label":"person golfing","order":2203,"tags":["ball","golf"],"unicode":"🏌️","skins":[{"group":1,"hexcode":"1F3CC-1F3FB","label":"person golfing: light skin tone","order":2204,"unicode":"🏌🏻"},{"group":1,"hexcode":"1F3CC-1F3FC","label":"person golfing: medium-light skin tone","order":2205,"unicode":"🏌🏼"},{"group":1,"hexcode":"1F3CC-1F3FD","label":"person golfing: medium skin tone","order":2206,"unicode":"🏌🏽"},{"group":1,"hexcode":"1F3CC-1F3FE","label":"person golfing: medium-dark skin tone","order":2207,"unicode":"🏌🏾"},{"group":1,"hexcode":"1F3CC-1F3FF","label":"person golfing: dark skin tone","order":2208,"unicode":"🏌🏿"}]},{"group":1,"hexcode":"1F3CC-FE0F-200D-2642-FE0F","label":"man golfing","order":2209,"tags":["golf","man"],"unicode":"🏌️♂️","skins":[{"group":1,"hexcode":"1F3CC-1F3FB-200D-2642-FE0F","label":"man golfing: light skin tone","order":2213,"unicode":"🏌🏻♂️"},{"group":1,"hexcode":"1F3CC-1F3FC-200D-2642-FE0F","label":"man golfing: medium-light skin tone","order":2215,"unicode":"🏌🏼♂️"},{"group":1,"hexcode":"1F3CC-1F3FD-200D-2642-FE0F","label":"man golfing: medium skin tone","order":2217,"unicode":"🏌🏽♂️"},{"group":1,"hexcode":"1F3CC-1F3FE-200D-2642-FE0F","label":"man golfing: medium-dark skin tone","order":2219,"unicode":"🏌🏾♂️"},{"group":1,"hexcode":"1F3CC-1F3FF-200D-2642-FE0F","label":"man golfing: dark skin tone","order":2221,"unicode":"🏌🏿♂️"}]},{"group":1,"hexcode":"1F3CC-FE0F-200D-2640-FE0F","label":"woman golfing","order":2223,"tags":["golf","woman"],"unicode":"🏌️♀️","skins":[{"group":1,"hexcode":"1F3CC-1F3FB-200D-2640-FE0F","label":"woman golfing: light skin tone","order":2227,"unicode":"🏌🏻♀️"},{"group":1,"hexcode":"1F3CC-1F3FC-200D-2640-FE0F","label":"woman golfing: medium-light skin tone","order":2229,"unicode":"🏌🏼♀️"},{"group":1,"hexcode":"1F3CC-1F3FD-200D-2640-FE0F","label":"woman golfing: medium skin tone","order":2231,"unicode":"🏌🏽♀️"},{"group":1,"hexcode":"1F3CC-1F3FE-200D-2640-FE0F","label":"woman golfing: medium-dark skin tone","order":2233,"unicode":"🏌🏾♀️"},{"group":1,"hexcode":"1F3CC-1F3FF-200D-2640-FE0F","label":"woman golfing: dark skin tone","order":2235,"unicode":"🏌🏿♀️"}]},{"group":1,"hexcode":"1F3C4","label":"person surfing","order":2237,"tags":["surfing"],"unicode":"🏄️","skins":[{"group":1,"hexcode":"1F3C4-1F3FB","label":"person surfing: light skin tone","order":2238,"unicode":"🏄🏻"},{"group":1,"hexcode":"1F3C4-1F3FC","label":"person surfing: medium-light skin tone","order":2239,"unicode":"🏄🏼"},{"group":1,"hexcode":"1F3C4-1F3FD","label":"person surfing: medium skin tone","order":2240,"unicode":"🏄🏽"},{"group":1,"hexcode":"1F3C4-1F3FE","label":"person surfing: medium-dark skin tone","order":2241,"unicode":"🏄🏾"},{"group":1,"hexcode":"1F3C4-1F3FF","label":"person surfing: dark skin tone","order":2242,"unicode":"🏄🏿"}]},{"group":1,"hexcode":"1F3C4-200D-2642-FE0F","label":"man surfing","order":2243,"tags":["man","surfing"],"unicode":"🏄♂️","skins":[{"group":1,"hexcode":"1F3C4-1F3FB-200D-2642-FE0F","label":"man surfing: light skin tone","order":2245,"unicode":"🏄🏻♂️"},{"group":1,"hexcode":"1F3C4-1F3FC-200D-2642-FE0F","label":"man surfing: medium-light skin tone","order":2247,"unicode":"🏄🏼♂️"},{"group":1,"hexcode":"1F3C4-1F3FD-200D-2642-FE0F","label":"man surfing: medium skin tone","order":2249,"unicode":"🏄🏽♂️"},{"group":1,"hexcode":"1F3C4-1F3FE-200D-2642-FE0F","label":"man surfing: medium-dark skin tone","order":2251,"unicode":"🏄🏾♂️"},{"group":1,"hexcode":"1F3C4-1F3FF-200D-2642-FE0F","label":"man surfing: dark skin tone","order":2253,"unicode":"🏄🏿♂️"}]},{"group":1,"hexcode":"1F3C4-200D-2640-FE0F","label":"woman surfing","order":2255,"tags":["surfing","woman"],"unicode":"🏄♀️","skins":[{"group":1,"hexcode":"1F3C4-1F3FB-200D-2640-FE0F","label":"woman surfing: light skin tone","order":2257,"unicode":"🏄🏻♀️"},{"group":1,"hexcode":"1F3C4-1F3FC-200D-2640-FE0F","label":"woman surfing: medium-light skin tone","order":2259,"unicode":"🏄🏼♀️"},{"group":1,"hexcode":"1F3C4-1F3FD-200D-2640-FE0F","label":"woman surfing: medium skin tone","order":2261,"unicode":"🏄🏽♀️"},{"group":1,"hexcode":"1F3C4-1F3FE-200D-2640-FE0F","label":"woman surfing: medium-dark skin tone","order":2263,"unicode":"🏄🏾♀️"},{"group":1,"hexcode":"1F3C4-1F3FF-200D-2640-FE0F","label":"woman surfing: dark skin tone","order":2265,"unicode":"🏄🏿♀️"}]},{"group":1,"hexcode":"1F6A3","label":"person rowing boat","order":2267,"tags":["boat","rowboat"],"unicode":"🚣","skins":[{"group":1,"hexcode":"1F6A3-1F3FB","label":"person rowing boat: light skin tone","order":2268,"unicode":"🚣🏻"},{"group":1,"hexcode":"1F6A3-1F3FC","label":"person rowing boat: medium-light skin tone","order":2269,"unicode":"🚣🏼"},{"group":1,"hexcode":"1F6A3-1F3FD","label":"person rowing boat: medium skin tone","order":2270,"unicode":"🚣🏽"},{"group":1,"hexcode":"1F6A3-1F3FE","label":"person rowing boat: medium-dark skin tone","order":2271,"unicode":"🚣🏾"},{"group":1,"hexcode":"1F6A3-1F3FF","label":"person rowing boat: dark skin tone","order":2272,"unicode":"🚣🏿"}]},{"group":1,"hexcode":"1F6A3-200D-2642-FE0F","label":"man rowing boat","order":2273,"tags":["boat","man","rowboat"],"unicode":"🚣♂️","skins":[{"group":1,"hexcode":"1F6A3-1F3FB-200D-2642-FE0F","label":"man rowing boat: light skin tone","order":2275,"unicode":"🚣🏻♂️"},{"group":1,"hexcode":"1F6A3-1F3FC-200D-2642-FE0F","label":"man rowing boat: medium-light skin tone","order":2277,"unicode":"🚣🏼♂️"},{"group":1,"hexcode":"1F6A3-1F3FD-200D-2642-FE0F","label":"man rowing boat: medium skin tone","order":2279,"unicode":"🚣🏽♂️"},{"group":1,"hexcode":"1F6A3-1F3FE-200D-2642-FE0F","label":"man rowing boat: medium-dark skin tone","order":2281,"unicode":"🚣🏾♂️"},{"group":1,"hexcode":"1F6A3-1F3FF-200D-2642-FE0F","label":"man rowing boat: dark skin tone","order":2283,"unicode":"🚣🏿♂️"}]},{"group":1,"hexcode":"1F6A3-200D-2640-FE0F","label":"woman rowing boat","order":2285,"tags":["boat","rowboat","woman"],"unicode":"🚣♀️","skins":[{"group":1,"hexcode":"1F6A3-1F3FB-200D-2640-FE0F","label":"woman rowing boat: light skin tone","order":2287,"unicode":"🚣🏻♀️"},{"group":1,"hexcode":"1F6A3-1F3FC-200D-2640-FE0F","label":"woman rowing boat: medium-light skin tone","order":2289,"unicode":"🚣🏼♀️"},{"group":1,"hexcode":"1F6A3-1F3FD-200D-2640-FE0F","label":"woman rowing boat: medium skin tone","order":2291,"unicode":"🚣🏽♀️"},{"group":1,"hexcode":"1F6A3-1F3FE-200D-2640-FE0F","label":"woman rowing boat: medium-dark skin tone","order":2293,"unicode":"🚣🏾♀️"},{"group":1,"hexcode":"1F6A3-1F3FF-200D-2640-FE0F","label":"woman rowing boat: dark skin tone","order":2295,"unicode":"🚣🏿♀️"}]},{"group":1,"hexcode":"1F3CA","label":"person swimming","order":2297,"tags":["swim"],"unicode":"🏊️","skins":[{"group":1,"hexcode":"1F3CA-1F3FB","label":"person swimming: light skin tone","order":2298,"unicode":"🏊🏻"},{"group":1,"hexcode":"1F3CA-1F3FC","label":"person swimming: medium-light skin tone","order":2299,"unicode":"🏊🏼"},{"group":1,"hexcode":"1F3CA-1F3FD","label":"person swimming: medium skin tone","order":2300,"unicode":"🏊🏽"},{"group":1,"hexcode":"1F3CA-1F3FE","label":"person swimming: medium-dark skin tone","order":2301,"unicode":"🏊🏾"},{"group":1,"hexcode":"1F3CA-1F3FF","label":"person swimming: dark skin tone","order":2302,"unicode":"🏊🏿"}]},{"group":1,"hexcode":"1F3CA-200D-2642-FE0F","label":"man swimming","order":2303,"tags":["man","swim"],"unicode":"🏊♂️","skins":[{"group":1,"hexcode":"1F3CA-1F3FB-200D-2642-FE0F","label":"man swimming: light skin tone","order":2305,"unicode":"🏊🏻♂️"},{"group":1,"hexcode":"1F3CA-1F3FC-200D-2642-FE0F","label":"man swimming: medium-light skin tone","order":2307,"unicode":"🏊🏼♂️"},{"group":1,"hexcode":"1F3CA-1F3FD-200D-2642-FE0F","label":"man swimming: medium skin tone","order":2309,"unicode":"🏊🏽♂️"},{"group":1,"hexcode":"1F3CA-1F3FE-200D-2642-FE0F","label":"man swimming: medium-dark skin tone","order":2311,"unicode":"🏊🏾♂️"},{"group":1,"hexcode":"1F3CA-1F3FF-200D-2642-FE0F","label":"man swimming: dark skin tone","order":2313,"unicode":"🏊🏿♂️"}]},{"group":1,"hexcode":"1F3CA-200D-2640-FE0F","label":"woman swimming","order":2315,"tags":["swim","woman"],"unicode":"🏊♀️","skins":[{"group":1,"hexcode":"1F3CA-1F3FB-200D-2640-FE0F","label":"woman swimming: light skin tone","order":2317,"unicode":"🏊🏻♀️"},{"group":1,"hexcode":"1F3CA-1F3FC-200D-2640-FE0F","label":"woman swimming: medium-light skin tone","order":2319,"unicode":"🏊🏼♀️"},{"group":1,"hexcode":"1F3CA-1F3FD-200D-2640-FE0F","label":"woman swimming: medium skin tone","order":2321,"unicode":"🏊🏽♀️"},{"group":1,"hexcode":"1F3CA-1F3FE-200D-2640-FE0F","label":"woman swimming: medium-dark skin tone","order":2323,"unicode":"🏊🏾♀️"},{"group":1,"hexcode":"1F3CA-1F3FF-200D-2640-FE0F","label":"woman swimming: dark skin tone","order":2325,"unicode":"🏊🏿♀️"}]},{"group":1,"hexcode":"26F9","label":"person bouncing ball","order":2328,"tags":["ball"],"unicode":"⛹️","skins":[{"group":1,"hexcode":"26F9-1F3FB","label":"person bouncing ball: light skin tone","order":2329,"unicode":"⛹🏻"},{"group":1,"hexcode":"26F9-1F3FC","label":"person bouncing ball: medium-light skin tone","order":2330,"unicode":"⛹🏼"},{"group":1,"hexcode":"26F9-1F3FD","label":"person bouncing ball: medium skin tone","order":2331,"unicode":"⛹🏽"},{"group":1,"hexcode":"26F9-1F3FE","label":"person bouncing ball: medium-dark skin tone","order":2332,"unicode":"⛹🏾"},{"group":1,"hexcode":"26F9-1F3FF","label":"person bouncing ball: dark skin tone","order":2333,"unicode":"⛹🏿"}]},{"group":1,"hexcode":"26F9-FE0F-200D-2642-FE0F","label":"man bouncing ball","order":2334,"tags":["ball","man"],"unicode":"⛹️♂️","skins":[{"group":1,"hexcode":"26F9-1F3FB-200D-2642-FE0F","label":"man bouncing ball: light skin tone","order":2338,"unicode":"⛹🏻♂️"},{"group":1,"hexcode":"26F9-1F3FC-200D-2642-FE0F","label":"man bouncing ball: medium-light skin tone","order":2340,"unicode":"⛹🏼♂️"},{"group":1,"hexcode":"26F9-1F3FD-200D-2642-FE0F","label":"man bouncing ball: medium skin tone","order":2342,"unicode":"⛹🏽♂️"},{"group":1,"hexcode":"26F9-1F3FE-200D-2642-FE0F","label":"man bouncing ball: medium-dark skin tone","order":2344,"unicode":"⛹🏾♂️"},{"group":1,"hexcode":"26F9-1F3FF-200D-2642-FE0F","label":"man bouncing ball: dark skin tone","order":2346,"unicode":"⛹🏿♂️"}]},{"group":1,"hexcode":"26F9-FE0F-200D-2640-FE0F","label":"woman bouncing ball","order":2348,"tags":["ball","woman"],"unicode":"⛹️♀️","skins":[{"group":1,"hexcode":"26F9-1F3FB-200D-2640-FE0F","label":"woman bouncing ball: light skin tone","order":2352,"unicode":"⛹🏻♀️"},{"group":1,"hexcode":"26F9-1F3FC-200D-2640-FE0F","label":"woman bouncing ball: medium-light skin tone","order":2354,"unicode":"⛹🏼♀️"},{"group":1,"hexcode":"26F9-1F3FD-200D-2640-FE0F","label":"woman bouncing ball: medium skin tone","order":2356,"unicode":"⛹🏽♀️"},{"group":1,"hexcode":"26F9-1F3FE-200D-2640-FE0F","label":"woman bouncing ball: medium-dark skin tone","order":2358,"unicode":"⛹🏾♀️"},{"group":1,"hexcode":"26F9-1F3FF-200D-2640-FE0F","label":"woman bouncing ball: dark skin tone","order":2360,"unicode":"⛹🏿♀️"}]},{"group":1,"hexcode":"1F3CB","label":"person lifting weights","order":2363,"tags":["lifter","weight"],"unicode":"🏋️","skins":[{"group":1,"hexcode":"1F3CB-1F3FB","label":"person lifting weights: light skin tone","order":2364,"unicode":"🏋🏻"},{"group":1,"hexcode":"1F3CB-1F3FC","label":"person lifting weights: medium-light skin tone","order":2365,"unicode":"🏋🏼"},{"group":1,"hexcode":"1F3CB-1F3FD","label":"person lifting weights: medium skin tone","order":2366,"unicode":"🏋🏽"},{"group":1,"hexcode":"1F3CB-1F3FE","label":"person lifting weights: medium-dark skin tone","order":2367,"unicode":"🏋🏾"},{"group":1,"hexcode":"1F3CB-1F3FF","label":"person lifting weights: dark skin tone","order":2368,"unicode":"🏋🏿"}]},{"group":1,"hexcode":"1F3CB-FE0F-200D-2642-FE0F","label":"man lifting weights","order":2369,"tags":["man","weight lifter"],"unicode":"🏋️♂️","skins":[{"group":1,"hexcode":"1F3CB-1F3FB-200D-2642-FE0F","label":"man lifting weights: light skin tone","order":2373,"unicode":"🏋🏻♂️"},{"group":1,"hexcode":"1F3CB-1F3FC-200D-2642-FE0F","label":"man lifting weights: medium-light skin tone","order":2375,"unicode":"🏋🏼♂️"},{"group":1,"hexcode":"1F3CB-1F3FD-200D-2642-FE0F","label":"man lifting weights: medium skin tone","order":2377,"unicode":"🏋🏽♂️"},{"group":1,"hexcode":"1F3CB-1F3FE-200D-2642-FE0F","label":"man lifting weights: medium-dark skin tone","order":2379,"unicode":"🏋🏾♂️"},{"group":1,"hexcode":"1F3CB-1F3FF-200D-2642-FE0F","label":"man lifting weights: dark skin tone","order":2381,"unicode":"🏋🏿♂️"}]},{"group":1,"hexcode":"1F3CB-FE0F-200D-2640-FE0F","label":"woman lifting weights","order":2383,"tags":["weight lifter","woman"],"unicode":"🏋️♀️","skins":[{"group":1,"hexcode":"1F3CB-1F3FB-200D-2640-FE0F","label":"woman lifting weights: light skin tone","order":2387,"unicode":"🏋🏻♀️"},{"group":1,"hexcode":"1F3CB-1F3FC-200D-2640-FE0F","label":"woman lifting weights: medium-light skin tone","order":2389,"unicode":"🏋🏼♀️"},{"group":1,"hexcode":"1F3CB-1F3FD-200D-2640-FE0F","label":"woman lifting weights: medium skin tone","order":2391,"unicode":"🏋🏽♀️"},{"group":1,"hexcode":"1F3CB-1F3FE-200D-2640-FE0F","label":"woman lifting weights: medium-dark skin tone","order":2393,"unicode":"🏋🏾♀️"},{"group":1,"hexcode":"1F3CB-1F3FF-200D-2640-FE0F","label":"woman lifting weights: dark skin tone","order":2395,"unicode":"🏋🏿♀️"}]},{"group":1,"hexcode":"1F6B4","label":"person biking","order":2397,"tags":["bicycle","biking","cyclist"],"unicode":"🚴","skins":[{"group":1,"hexcode":"1F6B4-1F3FB","label":"person biking: light skin tone","order":2398,"unicode":"🚴🏻"},{"group":1,"hexcode":"1F6B4-1F3FC","label":"person biking: medium-light skin tone","order":2399,"unicode":"🚴🏼"},{"group":1,"hexcode":"1F6B4-1F3FD","label":"person biking: medium skin tone","order":2400,"unicode":"🚴🏽"},{"group":1,"hexcode":"1F6B4-1F3FE","label":"person biking: medium-dark skin tone","order":2401,"unicode":"🚴🏾"},{"group":1,"hexcode":"1F6B4-1F3FF","label":"person biking: dark skin tone","order":2402,"unicode":"🚴🏿"}]},{"group":1,"hexcode":"1F6B4-200D-2642-FE0F","label":"man biking","order":2403,"tags":["bicycle","biking","cyclist","man"],"unicode":"🚴♂️","skins":[{"group":1,"hexcode":"1F6B4-1F3FB-200D-2642-FE0F","label":"man biking: light skin tone","order":2405,"unicode":"🚴🏻♂️"},{"group":1,"hexcode":"1F6B4-1F3FC-200D-2642-FE0F","label":"man biking: medium-light skin tone","order":2407,"unicode":"🚴🏼♂️"},{"group":1,"hexcode":"1F6B4-1F3FD-200D-2642-FE0F","label":"man biking: medium skin tone","order":2409,"unicode":"🚴🏽♂️"},{"group":1,"hexcode":"1F6B4-1F3FE-200D-2642-FE0F","label":"man biking: medium-dark skin tone","order":2411,"unicode":"🚴🏾♂️"},{"group":1,"hexcode":"1F6B4-1F3FF-200D-2642-FE0F","label":"man biking: dark skin tone","order":2413,"unicode":"🚴🏿♂️"}]},{"group":1,"hexcode":"1F6B4-200D-2640-FE0F","label":"woman biking","order":2415,"tags":["bicycle","biking","cyclist","woman"],"unicode":"🚴♀️","skins":[{"group":1,"hexcode":"1F6B4-1F3FB-200D-2640-FE0F","label":"woman biking: light skin tone","order":2417,"unicode":"🚴🏻♀️"},{"group":1,"hexcode":"1F6B4-1F3FC-200D-2640-FE0F","label":"woman biking: medium-light skin tone","order":2419,"unicode":"🚴🏼♀️"},{"group":1,"hexcode":"1F6B4-1F3FD-200D-2640-FE0F","label":"woman biking: medium skin tone","order":2421,"unicode":"🚴🏽♀️"},{"group":1,"hexcode":"1F6B4-1F3FE-200D-2640-FE0F","label":"woman biking: medium-dark skin tone","order":2423,"unicode":"🚴🏾♀️"},{"group":1,"hexcode":"1F6B4-1F3FF-200D-2640-FE0F","label":"woman biking: dark skin tone","order":2425,"unicode":"🚴🏿♀️"}]},{"group":1,"hexcode":"1F6B5","label":"person mountain biking","order":2427,"tags":["bicycle","bicyclist","bike","cyclist","mountain"],"unicode":"🚵","skins":[{"group":1,"hexcode":"1F6B5-1F3FB","label":"person mountain biking: light skin tone","order":2428,"unicode":"🚵🏻"},{"group":1,"hexcode":"1F6B5-1F3FC","label":"person mountain biking: medium-light skin tone","order":2429,"unicode":"🚵🏼"},{"group":1,"hexcode":"1F6B5-1F3FD","label":"person mountain biking: medium skin tone","order":2430,"unicode":"🚵🏽"},{"group":1,"hexcode":"1F6B5-1F3FE","label":"person mountain biking: medium-dark skin tone","order":2431,"unicode":"🚵🏾"},{"group":1,"hexcode":"1F6B5-1F3FF","label":"person mountain biking: dark skin tone","order":2432,"unicode":"🚵🏿"}]},{"group":1,"hexcode":"1F6B5-200D-2642-FE0F","label":"man mountain biking","order":2433,"tags":["bicycle","bike","cyclist","man","mountain"],"unicode":"🚵♂️","skins":[{"group":1,"hexcode":"1F6B5-1F3FB-200D-2642-FE0F","label":"man mountain biking: light skin tone","order":2435,"unicode":"🚵🏻♂️"},{"group":1,"hexcode":"1F6B5-1F3FC-200D-2642-FE0F","label":"man mountain biking: medium-light skin tone","order":2437,"unicode":"🚵🏼♂️"},{"group":1,"hexcode":"1F6B5-1F3FD-200D-2642-FE0F","label":"man mountain biking: medium skin tone","order":2439,"unicode":"🚵🏽♂️"},{"group":1,"hexcode":"1F6B5-1F3FE-200D-2642-FE0F","label":"man mountain biking: medium-dark skin tone","order":2441,"unicode":"🚵🏾♂️"},{"group":1,"hexcode":"1F6B5-1F3FF-200D-2642-FE0F","label":"man mountain biking: dark skin tone","order":2443,"unicode":"🚵🏿♂️"}]},{"group":1,"hexcode":"1F6B5-200D-2640-FE0F","label":"woman mountain biking","order":2445,"tags":["bicycle","bike","biking","cyclist","mountain","woman"],"unicode":"🚵♀️","skins":[{"group":1,"hexcode":"1F6B5-1F3FB-200D-2640-FE0F","label":"woman mountain biking: light skin tone","order":2447,"unicode":"🚵🏻♀️"},{"group":1,"hexcode":"1F6B5-1F3FC-200D-2640-FE0F","label":"woman mountain biking: medium-light skin tone","order":2449,"unicode":"🚵🏼♀️"},{"group":1,"hexcode":"1F6B5-1F3FD-200D-2640-FE0F","label":"woman mountain biking: medium skin tone","order":2451,"unicode":"🚵🏽♀️"},{"group":1,"hexcode":"1F6B5-1F3FE-200D-2640-FE0F","label":"woman mountain biking: medium-dark skin tone","order":2453,"unicode":"🚵🏾♀️"},{"group":1,"hexcode":"1F6B5-1F3FF-200D-2640-FE0F","label":"woman mountain biking: dark skin tone","order":2455,"unicode":"🚵🏿♀️"}]},{"group":1,"hexcode":"1F938","label":"person cartwheeling","order":2457,"tags":["cartwheel","gymnastics"],"unicode":"🤸","skins":[{"group":1,"hexcode":"1F938-1F3FB","label":"person cartwheeling: light skin tone","order":2458,"unicode":"🤸🏻"},{"group":1,"hexcode":"1F938-1F3FC","label":"person cartwheeling: medium-light skin tone","order":2459,"unicode":"🤸🏼"},{"group":1,"hexcode":"1F938-1F3FD","label":"person cartwheeling: medium skin tone","order":2460,"unicode":"🤸🏽"},{"group":1,"hexcode":"1F938-1F3FE","label":"person cartwheeling: medium-dark skin tone","order":2461,"unicode":"🤸🏾"},{"group":1,"hexcode":"1F938-1F3FF","label":"person cartwheeling: dark skin tone","order":2462,"unicode":"🤸🏿"}]},{"group":1,"hexcode":"1F938-200D-2642-FE0F","label":"man cartwheeling","order":2463,"tags":["cartwheel","gymnastics","man"],"unicode":"🤸♂️","skins":[{"group":1,"hexcode":"1F938-1F3FB-200D-2642-FE0F","label":"man cartwheeling: light skin tone","order":2465,"unicode":"🤸🏻♂️"},{"group":1,"hexcode":"1F938-1F3FC-200D-2642-FE0F","label":"man cartwheeling: medium-light skin tone","order":2467,"unicode":"🤸🏼♂️"},{"group":1,"hexcode":"1F938-1F3FD-200D-2642-FE0F","label":"man cartwheeling: medium skin tone","order":2469,"unicode":"🤸🏽♂️"},{"group":1,"hexcode":"1F938-1F3FE-200D-2642-FE0F","label":"man cartwheeling: medium-dark skin tone","order":2471,"unicode":"🤸🏾♂️"},{"group":1,"hexcode":"1F938-1F3FF-200D-2642-FE0F","label":"man cartwheeling: dark skin tone","order":2473,"unicode":"🤸🏿♂️"}]},{"group":1,"hexcode":"1F938-200D-2640-FE0F","label":"woman cartwheeling","order":2475,"tags":["cartwheel","gymnastics","woman"],"unicode":"🤸♀️","skins":[{"group":1,"hexcode":"1F938-1F3FB-200D-2640-FE0F","label":"woman cartwheeling: light skin tone","order":2477,"unicode":"🤸🏻♀️"},{"group":1,"hexcode":"1F938-1F3FC-200D-2640-FE0F","label":"woman cartwheeling: medium-light skin tone","order":2479,"unicode":"🤸🏼♀️"},{"group":1,"hexcode":"1F938-1F3FD-200D-2640-FE0F","label":"woman cartwheeling: medium skin tone","order":2481,"unicode":"🤸🏽♀️"},{"group":1,"hexcode":"1F938-1F3FE-200D-2640-FE0F","label":"woman cartwheeling: medium-dark skin tone","order":2483,"unicode":"🤸🏾♀️"},{"group":1,"hexcode":"1F938-1F3FF-200D-2640-FE0F","label":"woman cartwheeling: dark skin tone","order":2485,"unicode":"🤸🏿♀️"}]},{"group":1,"hexcode":"1F93C","label":"people wrestling","order":2487,"tags":["wrestle","wrestler"],"unicode":"🤼"},{"group":1,"hexcode":"1F93C-200D-2642-FE0F","label":"men wrestling","order":2488,"tags":["men","wrestle"],"unicode":"🤼♂️"},{"group":1,"hexcode":"1F93C-200D-2640-FE0F","label":"women wrestling","order":2490,"tags":["women","wrestle"],"unicode":"🤼♀️"},{"group":1,"hexcode":"1F93D","label":"person playing water polo","order":2492,"tags":["polo","water"],"unicode":"🤽","skins":[{"group":1,"hexcode":"1F93D-1F3FB","label":"person playing water polo: light skin tone","order":2493,"unicode":"🤽🏻"},{"group":1,"hexcode":"1F93D-1F3FC","label":"person playing water polo: medium-light skin tone","order":2494,"unicode":"🤽🏼"},{"group":1,"hexcode":"1F93D-1F3FD","label":"person playing water polo: medium skin tone","order":2495,"unicode":"🤽🏽"},{"group":1,"hexcode":"1F93D-1F3FE","label":"person playing water polo: medium-dark skin tone","order":2496,"unicode":"🤽🏾"},{"group":1,"hexcode":"1F93D-1F3FF","label":"person playing water polo: dark skin tone","order":2497,"unicode":"🤽🏿"}]},{"group":1,"hexcode":"1F93D-200D-2642-FE0F","label":"man playing water polo","order":2498,"tags":["man","water polo"],"unicode":"🤽♂️","skins":[{"group":1,"hexcode":"1F93D-1F3FB-200D-2642-FE0F","label":"man playing water polo: light skin tone","order":2500,"unicode":"🤽🏻♂️"},{"group":1,"hexcode":"1F93D-1F3FC-200D-2642-FE0F","label":"man playing water polo: medium-light skin tone","order":2502,"unicode":"🤽🏼♂️"},{"group":1,"hexcode":"1F93D-1F3FD-200D-2642-FE0F","label":"man playing water polo: medium skin tone","order":2504,"unicode":"🤽🏽♂️"},{"group":1,"hexcode":"1F93D-1F3FE-200D-2642-FE0F","label":"man playing water polo: medium-dark skin tone","order":2506,"unicode":"🤽🏾♂️"},{"group":1,"hexcode":"1F93D-1F3FF-200D-2642-FE0F","label":"man playing water polo: dark skin tone","order":2508,"unicode":"🤽🏿♂️"}]},{"group":1,"hexcode":"1F93D-200D-2640-FE0F","label":"woman playing water polo","order":2510,"tags":["water polo","woman"],"unicode":"🤽♀️","skins":[{"group":1,"hexcode":"1F93D-1F3FB-200D-2640-FE0F","label":"woman playing water polo: light skin tone","order":2512,"unicode":"🤽🏻♀️"},{"group":1,"hexcode":"1F93D-1F3FC-200D-2640-FE0F","label":"woman playing water polo: medium-light skin tone","order":2514,"unicode":"🤽🏼♀️"},{"group":1,"hexcode":"1F93D-1F3FD-200D-2640-FE0F","label":"woman playing water polo: medium skin tone","order":2516,"unicode":"🤽🏽♀️"},{"group":1,"hexcode":"1F93D-1F3FE-200D-2640-FE0F","label":"woman playing water polo: medium-dark skin tone","order":2518,"unicode":"🤽🏾♀️"},{"group":1,"hexcode":"1F93D-1F3FF-200D-2640-FE0F","label":"woman playing water polo: dark skin tone","order":2520,"unicode":"🤽🏿♀️"}]},{"group":1,"hexcode":"1F93E","label":"person playing handball","order":2522,"tags":["ball","handball"],"unicode":"🤾","skins":[{"group":1,"hexcode":"1F93E-1F3FB","label":"person playing handball: light skin tone","order":2523,"unicode":"🤾🏻"},{"group":1,"hexcode":"1F93E-1F3FC","label":"person playing handball: medium-light skin tone","order":2524,"unicode":"🤾🏼"},{"group":1,"hexcode":"1F93E-1F3FD","label":"person playing handball: medium skin tone","order":2525,"unicode":"🤾🏽"},{"group":1,"hexcode":"1F93E-1F3FE","label":"person playing handball: medium-dark skin tone","order":2526,"unicode":"🤾🏾"},{"group":1,"hexcode":"1F93E-1F3FF","label":"person playing handball: dark skin tone","order":2527,"unicode":"🤾🏿"}]},{"group":1,"hexcode":"1F93E-200D-2642-FE0F","label":"man playing handball","order":2528,"tags":["handball","man"],"unicode":"🤾♂️","skins":[{"group":1,"hexcode":"1F93E-1F3FB-200D-2642-FE0F","label":"man playing handball: light skin tone","order":2530,"unicode":"🤾🏻♂️"},{"group":1,"hexcode":"1F93E-1F3FC-200D-2642-FE0F","label":"man playing handball: medium-light skin tone","order":2532,"unicode":"🤾🏼♂️"},{"group":1,"hexcode":"1F93E-1F3FD-200D-2642-FE0F","label":"man playing handball: medium skin tone","order":2534,"unicode":"🤾🏽♂️"},{"group":1,"hexcode":"1F93E-1F3FE-200D-2642-FE0F","label":"man playing handball: medium-dark skin tone","order":2536,"unicode":"🤾🏾♂️"},{"group":1,"hexcode":"1F93E-1F3FF-200D-2642-FE0F","label":"man playing handball: dark skin tone","order":2538,"unicode":"🤾🏿♂️"}]},{"group":1,"hexcode":"1F93E-200D-2640-FE0F","label":"woman playing handball","order":2540,"tags":["handball","woman"],"unicode":"🤾♀️","skins":[{"group":1,"hexcode":"1F93E-1F3FB-200D-2640-FE0F","label":"woman playing handball: light skin tone","order":2542,"unicode":"🤾🏻♀️"},{"group":1,"hexcode":"1F93E-1F3FC-200D-2640-FE0F","label":"woman playing handball: medium-light skin tone","order":2544,"unicode":"🤾🏼♀️"},{"group":1,"hexcode":"1F93E-1F3FD-200D-2640-FE0F","label":"woman playing handball: medium skin tone","order":2546,"unicode":"🤾🏽♀️"},{"group":1,"hexcode":"1F93E-1F3FE-200D-2640-FE0F","label":"woman playing handball: medium-dark skin tone","order":2548,"unicode":"🤾🏾♀️"},{"group":1,"hexcode":"1F93E-1F3FF-200D-2640-FE0F","label":"woman playing handball: dark skin tone","order":2550,"unicode":"🤾🏿♀️"}]},{"group":1,"hexcode":"1F939","label":"person juggling","order":2552,"tags":["balance","juggle","multitask","skill"],"unicode":"🤹","skins":[{"group":1,"hexcode":"1F939-1F3FB","label":"person juggling: light skin tone","order":2553,"unicode":"🤹🏻"},{"group":1,"hexcode":"1F939-1F3FC","label":"person juggling: medium-light skin tone","order":2554,"unicode":"🤹🏼"},{"group":1,"hexcode":"1F939-1F3FD","label":"person juggling: medium skin tone","order":2555,"unicode":"🤹🏽"},{"group":1,"hexcode":"1F939-1F3FE","label":"person juggling: medium-dark skin tone","order":2556,"unicode":"🤹🏾"},{"group":1,"hexcode":"1F939-1F3FF","label":"person juggling: dark skin tone","order":2557,"unicode":"🤹🏿"}]},{"group":1,"hexcode":"1F939-200D-2642-FE0F","label":"man juggling","order":2558,"tags":["juggling","man","multitask"],"unicode":"🤹♂️","skins":[{"group":1,"hexcode":"1F939-1F3FB-200D-2642-FE0F","label":"man juggling: light skin tone","order":2560,"unicode":"🤹🏻♂️"},{"group":1,"hexcode":"1F939-1F3FC-200D-2642-FE0F","label":"man juggling: medium-light skin tone","order":2562,"unicode":"🤹🏼♂️"},{"group":1,"hexcode":"1F939-1F3FD-200D-2642-FE0F","label":"man juggling: medium skin tone","order":2564,"unicode":"🤹🏽♂️"},{"group":1,"hexcode":"1F939-1F3FE-200D-2642-FE0F","label":"man juggling: medium-dark skin tone","order":2566,"unicode":"🤹🏾♂️"},{"group":1,"hexcode":"1F939-1F3FF-200D-2642-FE0F","label":"man juggling: dark skin tone","order":2568,"unicode":"🤹🏿♂️"}]},{"group":1,"hexcode":"1F939-200D-2640-FE0F","label":"woman juggling","order":2570,"tags":["juggling","multitask","woman"],"unicode":"🤹♀️","skins":[{"group":1,"hexcode":"1F939-1F3FB-200D-2640-FE0F","label":"woman juggling: light skin tone","order":2572,"unicode":"🤹🏻♀️"},{"group":1,"hexcode":"1F939-1F3FC-200D-2640-FE0F","label":"woman juggling: medium-light skin tone","order":2574,"unicode":"🤹🏼♀️"},{"group":1,"hexcode":"1F939-1F3FD-200D-2640-FE0F","label":"woman juggling: medium skin tone","order":2576,"unicode":"🤹🏽♀️"},{"group":1,"hexcode":"1F939-1F3FE-200D-2640-FE0F","label":"woman juggling: medium-dark skin tone","order":2578,"unicode":"🤹🏾♀️"},{"group":1,"hexcode":"1F939-1F3FF-200D-2640-FE0F","label":"woman juggling: dark skin tone","order":2580,"unicode":"🤹🏿♀️"}]},{"group":1,"hexcode":"1F9D8","label":"person in lotus position","order":2582,"tags":["meditation","yoga"],"unicode":"🧘","skins":[{"group":1,"hexcode":"1F9D8-1F3FB","label":"person in lotus position: light skin tone","order":2583,"unicode":"🧘🏻"},{"group":1,"hexcode":"1F9D8-1F3FC","label":"person in lotus position: medium-light skin tone","order":2584,"unicode":"🧘🏼"},{"group":1,"hexcode":"1F9D8-1F3FD","label":"person in lotus position: medium skin tone","order":2585,"unicode":"🧘🏽"},{"group":1,"hexcode":"1F9D8-1F3FE","label":"person in lotus position: medium-dark skin tone","order":2586,"unicode":"🧘🏾"},{"group":1,"hexcode":"1F9D8-1F3FF","label":"person in lotus position: dark skin tone","order":2587,"unicode":"🧘🏿"}]},{"group":1,"hexcode":"1F9D8-200D-2642-FE0F","label":"man in lotus position","order":2588,"tags":["meditation","yoga"],"unicode":"🧘♂️","skins":[{"group":1,"hexcode":"1F9D8-1F3FB-200D-2642-FE0F","label":"man in lotus position: light skin tone","order":2590,"unicode":"🧘🏻♂️"},{"group":1,"hexcode":"1F9D8-1F3FC-200D-2642-FE0F","label":"man in lotus position: medium-light skin tone","order":2592,"unicode":"🧘🏼♂️"},{"group":1,"hexcode":"1F9D8-1F3FD-200D-2642-FE0F","label":"man in lotus position: medium skin tone","order":2594,"unicode":"🧘🏽♂️"},{"group":1,"hexcode":"1F9D8-1F3FE-200D-2642-FE0F","label":"man in lotus position: medium-dark skin tone","order":2596,"unicode":"🧘🏾♂️"},{"group":1,"hexcode":"1F9D8-1F3FF-200D-2642-FE0F","label":"man in lotus position: dark skin tone","order":2598,"unicode":"🧘🏿♂️"}]},{"group":1,"hexcode":"1F9D8-200D-2640-FE0F","label":"woman in lotus position","order":2600,"tags":["meditation","yoga"],"unicode":"🧘♀️","skins":[{"group":1,"hexcode":"1F9D8-1F3FB-200D-2640-FE0F","label":"woman in lotus position: light skin tone","order":2602,"unicode":"🧘🏻♀️"},{"group":1,"hexcode":"1F9D8-1F3FC-200D-2640-FE0F","label":"woman in lotus position: medium-light skin tone","order":2604,"unicode":"🧘🏼♀️"},{"group":1,"hexcode":"1F9D8-1F3FD-200D-2640-FE0F","label":"woman in lotus position: medium skin tone","order":2606,"unicode":"🧘🏽♀️"},{"group":1,"hexcode":"1F9D8-1F3FE-200D-2640-FE0F","label":"woman in lotus position: medium-dark skin tone","order":2608,"unicode":"🧘🏾♀️"},{"group":1,"hexcode":"1F9D8-1F3FF-200D-2640-FE0F","label":"woman in lotus position: dark skin tone","order":2610,"unicode":"🧘🏿♀️"}]},{"group":1,"hexcode":"1F6C0","label":"person taking bath","order":2612,"tags":["bath","bathtub"],"unicode":"🛀","skins":[{"group":1,"hexcode":"1F6C0-1F3FB","label":"person taking bath: light skin tone","order":2613,"unicode":"🛀🏻"},{"group":1,"hexcode":"1F6C0-1F3FC","label":"person taking bath: medium-light skin tone","order":2614,"unicode":"🛀🏼"},{"group":1,"hexcode":"1F6C0-1F3FD","label":"person taking bath: medium skin tone","order":2615,"unicode":"🛀🏽"},{"group":1,"hexcode":"1F6C0-1F3FE","label":"person taking bath: medium-dark skin tone","order":2616,"unicode":"🛀🏾"},{"group":1,"hexcode":"1F6C0-1F3FF","label":"person taking bath: dark skin tone","order":2617,"unicode":"🛀🏿"}]},{"group":1,"hexcode":"1F6CC","label":"person in bed","order":2618,"tags":["good night","hotel","sleep"],"unicode":"🛌","skins":[{"group":1,"hexcode":"1F6CC-1F3FB","label":"person in bed: light skin tone","order":2619,"unicode":"🛌🏻"},{"group":1,"hexcode":"1F6CC-1F3FC","label":"person in bed: medium-light skin tone","order":2620,"unicode":"🛌🏼"},{"group":1,"hexcode":"1F6CC-1F3FD","label":"person in bed: medium skin tone","order":2621,"unicode":"🛌🏽"},{"group":1,"hexcode":"1F6CC-1F3FE","label":"person in bed: medium-dark skin tone","order":2622,"unicode":"🛌🏾"},{"group":1,"hexcode":"1F6CC-1F3FF","label":"person in bed: dark skin tone","order":2623,"unicode":"🛌🏿"}]},{"group":1,"hexcode":"1F9D1-200D-1F91D-200D-1F9D1","label":"people holding hands","order":2624,"tags":["couple","hand","hold","holding hands","person"],"unicode":"🧑🤝🧑","skins":[{"group":1,"hexcode":"1F9D1-1F3FB-200D-1F91D-200D-1F9D1-1F3FB","label":"people holding hands: light skin tone","order":2625,"unicode":"🧑🏻🤝🧑🏻"},{"group":1,"hexcode":"1F9D1-1F3FB-200D-1F91D-200D-1F9D1-1F3FC","label":"people holding hands: light skin tone, medium-light skin tone","order":2626,"unicode":"🧑🏻🤝🧑🏼"},{"group":1,"hexcode":"1F9D1-1F3FB-200D-1F91D-200D-1F9D1-1F3FD","label":"people holding hands: light skin tone, medium skin tone","order":2627,"unicode":"🧑🏻🤝🧑🏽"},{"group":1,"hexcode":"1F9D1-1F3FB-200D-1F91D-200D-1F9D1-1F3FE","label":"people holding hands: light skin tone, medium-dark skin tone","order":2628,"unicode":"🧑🏻🤝🧑🏾"},{"group":1,"hexcode":"1F9D1-1F3FB-200D-1F91D-200D-1F9D1-1F3FF","label":"people holding hands: light skin tone, dark skin tone","order":2629,"unicode":"🧑🏻🤝🧑🏿"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-1F91D-200D-1F9D1-1F3FB","label":"people holding hands: medium-light skin tone, light skin tone","order":2630,"unicode":"🧑🏼🤝🧑🏻"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-1F91D-200D-1F9D1-1F3FC","label":"people holding hands: medium-light skin tone","order":2631,"unicode":"🧑🏼🤝🧑🏼"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-1F91D-200D-1F9D1-1F3FD","label":"people holding hands: medium-light skin tone, medium skin tone","order":2632,"unicode":"🧑🏼🤝🧑🏽"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-1F91D-200D-1F9D1-1F3FE","label":"people holding hands: medium-light skin tone, medium-dark skin tone","order":2633,"unicode":"🧑🏼🤝🧑🏾"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-1F91D-200D-1F9D1-1F3FF","label":"people holding hands: medium-light skin tone, dark skin tone","order":2634,"unicode":"🧑🏼🤝🧑🏿"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-1F91D-200D-1F9D1-1F3FB","label":"people holding hands: medium skin tone, light skin tone","order":2635,"unicode":"🧑🏽🤝🧑🏻"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-1F91D-200D-1F9D1-1F3FC","label":"people holding hands: medium skin tone, medium-light skin tone","order":2636,"unicode":"🧑🏽🤝🧑🏼"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-1F91D-200D-1F9D1-1F3FD","label":"people holding hands: medium skin tone","order":2637,"unicode":"🧑🏽🤝🧑🏽"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-1F91D-200D-1F9D1-1F3FE","label":"people holding hands: medium skin tone, medium-dark skin tone","order":2638,"unicode":"🧑🏽🤝🧑🏾"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-1F91D-200D-1F9D1-1F3FF","label":"people holding hands: medium skin tone, dark skin tone","order":2639,"unicode":"🧑🏽🤝🧑🏿"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-1F91D-200D-1F9D1-1F3FB","label":"people holding hands: medium-dark skin tone, light skin tone","order":2640,"unicode":"🧑🏾🤝🧑🏻"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-1F91D-200D-1F9D1-1F3FC","label":"people holding hands: medium-dark skin tone, medium-light skin tone","order":2641,"unicode":"🧑🏾🤝🧑🏼"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-1F91D-200D-1F9D1-1F3FD","label":"people holding hands: medium-dark skin tone, medium skin tone","order":2642,"unicode":"🧑🏾🤝🧑🏽"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-1F91D-200D-1F9D1-1F3FE","label":"people holding hands: medium-dark skin tone","order":2643,"unicode":"🧑🏾🤝🧑🏾"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-1F91D-200D-1F9D1-1F3FF","label":"people holding hands: medium-dark skin tone, dark skin tone","order":2644,"unicode":"🧑🏾🤝🧑🏿"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-1F91D-200D-1F9D1-1F3FB","label":"people holding hands: dark skin tone, light skin tone","order":2645,"unicode":"🧑🏿🤝🧑🏻"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-1F91D-200D-1F9D1-1F3FC","label":"people holding hands: dark skin tone, medium-light skin tone","order":2646,"unicode":"🧑🏿🤝🧑🏼"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-1F91D-200D-1F9D1-1F3FD","label":"people holding hands: dark skin tone, medium skin tone","order":2647,"unicode":"🧑🏿🤝🧑🏽"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-1F91D-200D-1F9D1-1F3FE","label":"people holding hands: dark skin tone, medium-dark skin tone","order":2648,"unicode":"🧑🏿🤝🧑🏾"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-1F91D-200D-1F9D1-1F3FF","label":"people holding hands: dark skin tone","order":2649,"unicode":"🧑🏿🤝🧑🏿"}]},{"group":1,"hexcode":"1F46D","label":"women holding hands","order":2650,"tags":["couple","hand","holding hands","women"],"unicode":"👭","skins":[{"group":1,"hexcode":"1F46D-1F3FB","label":"women holding hands: light skin tone","order":2651,"unicode":"👭🏻"},{"group":1,"hexcode":"1F46D-1F3FC","label":"women holding hands: medium-light skin tone","order":2657,"unicode":"👭🏼"},{"group":1,"hexcode":"1F46D-1F3FD","label":"women holding hands: medium skin tone","order":2663,"unicode":"👭🏽"},{"group":1,"hexcode":"1F46D-1F3FE","label":"women holding hands: medium-dark skin tone","order":2669,"unicode":"👭🏾"},{"group":1,"hexcode":"1F46D-1F3FF","label":"women holding hands: dark skin tone","order":2675,"unicode":"👭🏿"},{"group":1,"hexcode":"1F469-1F3FB-200D-1F91D-200D-1F469-1F3FC","label":"women holding hands: light skin tone, medium-light skin tone","order":2652,"unicode":"👩🏻🤝👩🏼"},{"group":1,"hexcode":"1F469-1F3FB-200D-1F91D-200D-1F469-1F3FD","label":"women holding hands: light skin tone, medium skin tone","order":2653,"unicode":"👩🏻🤝👩🏽"},{"group":1,"hexcode":"1F469-1F3FB-200D-1F91D-200D-1F469-1F3FE","label":"women holding hands: light skin tone, medium-dark skin tone","order":2654,"unicode":"👩🏻🤝👩🏾"},{"group":1,"hexcode":"1F469-1F3FB-200D-1F91D-200D-1F469-1F3FF","label":"women holding hands: light skin tone, dark skin tone","order":2655,"unicode":"👩🏻🤝👩🏿"},{"group":1,"hexcode":"1F469-1F3FC-200D-1F91D-200D-1F469-1F3FB","label":"women holding hands: medium-light skin tone, light skin tone","order":2656,"unicode":"👩🏼🤝👩🏻"},{"group":1,"hexcode":"1F469-1F3FC-200D-1F91D-200D-1F469-1F3FD","label":"women holding hands: medium-light skin tone, medium skin tone","order":2658,"unicode":"👩🏼🤝👩🏽"},{"group":1,"hexcode":"1F469-1F3FC-200D-1F91D-200D-1F469-1F3FE","label":"women holding hands: medium-light skin tone, medium-dark skin tone","order":2659,"unicode":"👩🏼🤝👩🏾"},{"group":1,"hexcode":"1F469-1F3FC-200D-1F91D-200D-1F469-1F3FF","label":"women holding hands: medium-light skin tone, dark skin tone","order":2660,"unicode":"👩🏼🤝👩🏿"},{"group":1,"hexcode":"1F469-1F3FD-200D-1F91D-200D-1F469-1F3FB","label":"women holding hands: medium skin tone, light skin tone","order":2661,"unicode":"👩🏽🤝👩🏻"},{"group":1,"hexcode":"1F469-1F3FD-200D-1F91D-200D-1F469-1F3FC","label":"women holding hands: medium skin tone, medium-light skin tone","order":2662,"unicode":"👩🏽🤝👩🏼"},{"group":1,"hexcode":"1F469-1F3FD-200D-1F91D-200D-1F469-1F3FE","label":"women holding hands: medium skin tone, medium-dark skin tone","order":2664,"unicode":"👩🏽🤝👩🏾"},{"group":1,"hexcode":"1F469-1F3FD-200D-1F91D-200D-1F469-1F3FF","label":"women holding hands: medium skin tone, dark skin tone","order":2665,"unicode":"👩🏽🤝👩🏿"},{"group":1,"hexcode":"1F469-1F3FE-200D-1F91D-200D-1F469-1F3FB","label":"women holding hands: medium-dark skin tone, light skin tone","order":2666,"unicode":"👩🏾🤝👩🏻"},{"group":1,"hexcode":"1F469-1F3FE-200D-1F91D-200D-1F469-1F3FC","label":"women holding hands: medium-dark skin tone, medium-light skin tone","order":2667,"unicode":"👩🏾🤝👩🏼"},{"group":1,"hexcode":"1F469-1F3FE-200D-1F91D-200D-1F469-1F3FD","label":"women holding hands: medium-dark skin tone, medium skin tone","order":2668,"unicode":"👩🏾🤝👩🏽"},{"group":1,"hexcode":"1F469-1F3FE-200D-1F91D-200D-1F469-1F3FF","label":"women holding hands: medium-dark skin tone, dark skin tone","order":2670,"unicode":"👩🏾🤝👩🏿"},{"group":1,"hexcode":"1F469-1F3FF-200D-1F91D-200D-1F469-1F3FB","label":"women holding hands: dark skin tone, light skin tone","order":2671,"unicode":"👩🏿🤝👩🏻"},{"group":1,"hexcode":"1F469-1F3FF-200D-1F91D-200D-1F469-1F3FC","label":"women holding hands: dark skin tone, medium-light skin tone","order":2672,"unicode":"👩🏿🤝👩🏼"},{"group":1,"hexcode":"1F469-1F3FF-200D-1F91D-200D-1F469-1F3FD","label":"women holding hands: dark skin tone, medium skin tone","order":2673,"unicode":"👩🏿🤝👩🏽"},{"group":1,"hexcode":"1F469-1F3FF-200D-1F91D-200D-1F469-1F3FE","label":"women holding hands: dark skin tone, medium-dark skin tone","order":2674,"unicode":"👩🏿🤝👩🏾"}]},{"group":1,"hexcode":"1F46B","label":"woman and man holding hands","order":2676,"tags":["couple","hand","hold","holding hands","man","woman"],"unicode":"👫","skins":[{"group":1,"hexcode":"1F46B-1F3FB","label":"woman and man holding hands: light skin tone","order":2677,"unicode":"👫🏻"},{"group":1,"hexcode":"1F46B-1F3FC","label":"woman and man holding hands: medium-light skin tone","order":2683,"unicode":"👫🏼"},{"group":1,"hexcode":"1F46B-1F3FD","label":"woman and man holding hands: medium skin tone","order":2689,"unicode":"👫🏽"},{"group":1,"hexcode":"1F46B-1F3FE","label":"woman and man holding hands: medium-dark skin tone","order":2695,"unicode":"👫🏾"},{"group":1,"hexcode":"1F46B-1F3FF","label":"woman and man holding hands: dark skin tone","order":2701,"unicode":"👫🏿"},{"group":1,"hexcode":"1F469-1F3FB-200D-1F91D-200D-1F468-1F3FC","label":"woman and man holding hands: light skin tone, medium-light skin tone","order":2678,"unicode":"👩🏻🤝👨🏼"},{"group":1,"hexcode":"1F469-1F3FB-200D-1F91D-200D-1F468-1F3FD","label":"woman and man holding hands: light skin tone, medium skin tone","order":2679,"unicode":"👩🏻🤝👨🏽"},{"group":1,"hexcode":"1F469-1F3FB-200D-1F91D-200D-1F468-1F3FE","label":"woman and man holding hands: light skin tone, medium-dark skin tone","order":2680,"unicode":"👩🏻🤝👨🏾"},{"group":1,"hexcode":"1F469-1F3FB-200D-1F91D-200D-1F468-1F3FF","label":"woman and man holding hands: light skin tone, dark skin tone","order":2681,"unicode":"👩🏻🤝👨🏿"},{"group":1,"hexcode":"1F469-1F3FC-200D-1F91D-200D-1F468-1F3FB","label":"woman and man holding hands: medium-light skin tone, light skin tone","order":2682,"unicode":"👩🏼🤝👨🏻"},{"group":1,"hexcode":"1F469-1F3FC-200D-1F91D-200D-1F468-1F3FD","label":"woman and man holding hands: medium-light skin tone, medium skin tone","order":2684,"unicode":"👩🏼🤝👨🏽"},{"group":1,"hexcode":"1F469-1F3FC-200D-1F91D-200D-1F468-1F3FE","label":"woman and man holding hands: medium-light skin tone, medium-dark skin tone","order":2685,"unicode":"👩🏼🤝👨🏾"},{"group":1,"hexcode":"1F469-1F3FC-200D-1F91D-200D-1F468-1F3FF","label":"woman and man holding hands: medium-light skin tone, dark skin tone","order":2686,"unicode":"👩🏼🤝👨🏿"},{"group":1,"hexcode":"1F469-1F3FD-200D-1F91D-200D-1F468-1F3FB","label":"woman and man holding hands: medium skin tone, light skin tone","order":2687,"unicode":"👩🏽🤝👨🏻"},{"group":1,"hexcode":"1F469-1F3FD-200D-1F91D-200D-1F468-1F3FC","label":"woman and man holding hands: medium skin tone, medium-light skin tone","order":2688,"unicode":"👩🏽🤝👨🏼"},{"group":1,"hexcode":"1F469-1F3FD-200D-1F91D-200D-1F468-1F3FE","label":"woman and man holding hands: medium skin tone, medium-dark skin tone","order":2690,"unicode":"👩🏽🤝👨🏾"},{"group":1,"hexcode":"1F469-1F3FD-200D-1F91D-200D-1F468-1F3FF","label":"woman and man holding hands: medium skin tone, dark skin tone","order":2691,"unicode":"👩🏽🤝👨🏿"},{"group":1,"hexcode":"1F469-1F3FE-200D-1F91D-200D-1F468-1F3FB","label":"woman and man holding hands: medium-dark skin tone, light skin tone","order":2692,"unicode":"👩🏾🤝👨🏻"},{"group":1,"hexcode":"1F469-1F3FE-200D-1F91D-200D-1F468-1F3FC","label":"woman and man holding hands: medium-dark skin tone, medium-light skin tone","order":2693,"unicode":"👩🏾🤝👨🏼"},{"group":1,"hexcode":"1F469-1F3FE-200D-1F91D-200D-1F468-1F3FD","label":"woman and man holding hands: medium-dark skin tone, medium skin tone","order":2694,"unicode":"👩🏾🤝👨🏽"},{"group":1,"hexcode":"1F469-1F3FE-200D-1F91D-200D-1F468-1F3FF","label":"woman and man holding hands: medium-dark skin tone, dark skin tone","order":2696,"unicode":"👩🏾🤝👨🏿"},{"group":1,"hexcode":"1F469-1F3FF-200D-1F91D-200D-1F468-1F3FB","label":"woman and man holding hands: dark skin tone, light skin tone","order":2697,"unicode":"👩🏿🤝👨🏻"},{"group":1,"hexcode":"1F469-1F3FF-200D-1F91D-200D-1F468-1F3FC","label":"woman and man holding hands: dark skin tone, medium-light skin tone","order":2698,"unicode":"👩🏿🤝👨🏼"},{"group":1,"hexcode":"1F469-1F3FF-200D-1F91D-200D-1F468-1F3FD","label":"woman and man holding hands: dark skin tone, medium skin tone","order":2699,"unicode":"👩🏿🤝👨🏽"},{"group":1,"hexcode":"1F469-1F3FF-200D-1F91D-200D-1F468-1F3FE","label":"woman and man holding hands: dark skin tone, medium-dark skin tone","order":2700,"unicode":"👩🏿🤝👨🏾"}]},{"group":1,"hexcode":"1F46C","label":"men holding hands","order":2702,"tags":["couple","gemini","holding hands","man","men","twins","zodiac"],"unicode":"👬","skins":[{"group":1,"hexcode":"1F46C-1F3FB","label":"men holding hands: light skin tone","order":2703,"unicode":"👬🏻"},{"group":1,"hexcode":"1F46C-1F3FC","label":"men holding hands: medium-light skin tone","order":2709,"unicode":"👬🏼"},{"group":1,"hexcode":"1F46C-1F3FD","label":"men holding hands: medium skin tone","order":2715,"unicode":"👬🏽"},{"group":1,"hexcode":"1F46C-1F3FE","label":"men holding hands: medium-dark skin tone","order":2721,"unicode":"👬🏾"},{"group":1,"hexcode":"1F46C-1F3FF","label":"men holding hands: dark skin tone","order":2727,"unicode":"👬🏿"},{"group":1,"hexcode":"1F468-1F3FB-200D-1F91D-200D-1F468-1F3FC","label":"men holding hands: light skin tone, medium-light skin tone","order":2704,"unicode":"👨🏻🤝👨🏼"},{"group":1,"hexcode":"1F468-1F3FB-200D-1F91D-200D-1F468-1F3FD","label":"men holding hands: light skin tone, medium skin tone","order":2705,"unicode":"👨🏻🤝👨🏽"},{"group":1,"hexcode":"1F468-1F3FB-200D-1F91D-200D-1F468-1F3FE","label":"men holding hands: light skin tone, medium-dark skin tone","order":2706,"unicode":"👨🏻🤝👨🏾"},{"group":1,"hexcode":"1F468-1F3FB-200D-1F91D-200D-1F468-1F3FF","label":"men holding hands: light skin tone, dark skin tone","order":2707,"unicode":"👨🏻🤝👨🏿"},{"group":1,"hexcode":"1F468-1F3FC-200D-1F91D-200D-1F468-1F3FB","label":"men holding hands: medium-light skin tone, light skin tone","order":2708,"unicode":"👨🏼🤝👨🏻"},{"group":1,"hexcode":"1F468-1F3FC-200D-1F91D-200D-1F468-1F3FD","label":"men holding hands: medium-light skin tone, medium skin tone","order":2710,"unicode":"👨🏼🤝👨🏽"},{"group":1,"hexcode":"1F468-1F3FC-200D-1F91D-200D-1F468-1F3FE","label":"men holding hands: medium-light skin tone, medium-dark skin tone","order":2711,"unicode":"👨🏼🤝👨🏾"},{"group":1,"hexcode":"1F468-1F3FC-200D-1F91D-200D-1F468-1F3FF","label":"men holding hands: medium-light skin tone, dark skin tone","order":2712,"unicode":"👨🏼🤝👨🏿"},{"group":1,"hexcode":"1F468-1F3FD-200D-1F91D-200D-1F468-1F3FB","label":"men holding hands: medium skin tone, light skin tone","order":2713,"unicode":"👨🏽🤝👨🏻"},{"group":1,"hexcode":"1F468-1F3FD-200D-1F91D-200D-1F468-1F3FC","label":"men holding hands: medium skin tone, medium-light skin tone","order":2714,"unicode":"👨🏽🤝👨🏼"},{"group":1,"hexcode":"1F468-1F3FD-200D-1F91D-200D-1F468-1F3FE","label":"men holding hands: medium skin tone, medium-dark skin tone","order":2716,"unicode":"👨🏽🤝👨🏾"},{"group":1,"hexcode":"1F468-1F3FD-200D-1F91D-200D-1F468-1F3FF","label":"men holding hands: medium skin tone, dark skin tone","order":2717,"unicode":"👨🏽🤝👨🏿"},{"group":1,"hexcode":"1F468-1F3FE-200D-1F91D-200D-1F468-1F3FB","label":"men holding hands: medium-dark skin tone, light skin tone","order":2718,"unicode":"👨🏾🤝👨🏻"},{"group":1,"hexcode":"1F468-1F3FE-200D-1F91D-200D-1F468-1F3FC","label":"men holding hands: medium-dark skin tone, medium-light skin tone","order":2719,"unicode":"👨🏾🤝👨🏼"},{"group":1,"hexcode":"1F468-1F3FE-200D-1F91D-200D-1F468-1F3FD","label":"men holding hands: medium-dark skin tone, medium skin tone","order":2720,"unicode":"👨🏾🤝👨🏽"},{"group":1,"hexcode":"1F468-1F3FE-200D-1F91D-200D-1F468-1F3FF","label":"men holding hands: medium-dark skin tone, dark skin tone","order":2722,"unicode":"👨🏾🤝👨🏿"},{"group":1,"hexcode":"1F468-1F3FF-200D-1F91D-200D-1F468-1F3FB","label":"men holding hands: dark skin tone, light skin tone","order":2723,"unicode":"👨🏿🤝👨🏻"},{"group":1,"hexcode":"1F468-1F3FF-200D-1F91D-200D-1F468-1F3FC","label":"men holding hands: dark skin tone, medium-light skin tone","order":2724,"unicode":"👨🏿🤝👨🏼"},{"group":1,"hexcode":"1F468-1F3FF-200D-1F91D-200D-1F468-1F3FD","label":"men holding hands: dark skin tone, medium skin tone","order":2725,"unicode":"👨🏿🤝👨🏽"},{"group":1,"hexcode":"1F468-1F3FF-200D-1F91D-200D-1F468-1F3FE","label":"men holding hands: dark skin tone, medium-dark skin tone","order":2726,"unicode":"👨🏿🤝👨🏾"}]},{"group":1,"hexcode":"1F48F","label":"kiss","order":2728,"tags":["couple"],"unicode":"💏","skins":[{"group":1,"hexcode":"1F48F-1F3FB","label":"kiss: light skin tone","order":2729,"unicode":"💏🏻"},{"group":1,"hexcode":"1F48F-1F3FC","label":"kiss: medium-light skin tone","order":2730,"unicode":"💏🏼"},{"group":1,"hexcode":"1F48F-1F3FD","label":"kiss: medium skin tone","order":2731,"unicode":"💏🏽"},{"group":1,"hexcode":"1F48F-1F3FE","label":"kiss: medium-dark skin tone","order":2732,"unicode":"💏🏾"},{"group":1,"hexcode":"1F48F-1F3FF","label":"kiss: dark skin tone","order":2733,"unicode":"💏🏿"},{"group":1,"hexcode":"1F9D1-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FC","label":"kiss: person, person, light skin tone, medium-light skin tone","order":2734,"unicode":"🧑🏻❤️💋🧑🏼"},{"group":1,"hexcode":"1F9D1-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FD","label":"kiss: person, person, light skin tone, medium skin tone","order":2736,"unicode":"🧑🏻❤️💋🧑🏽"},{"group":1,"hexcode":"1F9D1-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FE","label":"kiss: person, person, light skin tone, medium-dark skin tone","order":2738,"unicode":"🧑🏻❤️💋🧑🏾"},{"group":1,"hexcode":"1F9D1-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FF","label":"kiss: person, person, light skin tone, dark skin tone","order":2740,"unicode":"🧑🏻❤️💋🧑🏿"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FB","label":"kiss: person, person, medium-light skin tone, light skin tone","order":2742,"unicode":"🧑🏼❤️💋🧑🏻"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FD","label":"kiss: person, person, medium-light skin tone, medium skin tone","order":2744,"unicode":"🧑🏼❤️💋🧑🏽"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FE","label":"kiss: person, person, medium-light skin tone, medium-dark skin tone","order":2746,"unicode":"🧑🏼❤️💋🧑🏾"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FF","label":"kiss: person, person, medium-light skin tone, dark skin tone","order":2748,"unicode":"🧑🏼❤️💋🧑🏿"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FB","label":"kiss: person, person, medium skin tone, light skin tone","order":2750,"unicode":"🧑🏽❤️💋🧑🏻"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FC","label":"kiss: person, person, medium skin tone, medium-light skin tone","order":2752,"unicode":"🧑🏽❤️💋🧑🏼"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FE","label":"kiss: person, person, medium skin tone, medium-dark skin tone","order":2754,"unicode":"🧑🏽❤️💋🧑🏾"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FF","label":"kiss: person, person, medium skin tone, dark skin tone","order":2756,"unicode":"🧑🏽❤️💋🧑🏿"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FB","label":"kiss: person, person, medium-dark skin tone, light skin tone","order":2758,"unicode":"🧑🏾❤️💋🧑🏻"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FC","label":"kiss: person, person, medium-dark skin tone, medium-light skin tone","order":2760,"unicode":"🧑🏾❤️💋🧑🏼"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FD","label":"kiss: person, person, medium-dark skin tone, medium skin tone","order":2762,"unicode":"🧑🏾❤️💋🧑🏽"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FF","label":"kiss: person, person, medium-dark skin tone, dark skin tone","order":2764,"unicode":"🧑🏾❤️💋🧑🏿"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FB","label":"kiss: person, person, dark skin tone, light skin tone","order":2766,"unicode":"🧑🏿❤️💋🧑🏻"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FC","label":"kiss: person, person, dark skin tone, medium-light skin tone","order":2768,"unicode":"🧑🏿❤️💋🧑🏼"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FD","label":"kiss: person, person, dark skin tone, medium skin tone","order":2770,"unicode":"🧑🏿❤️💋🧑🏽"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F9D1-1F3FE","label":"kiss: person, person, dark skin tone, medium-dark skin tone","order":2772,"unicode":"🧑🏿❤️💋🧑🏾"}]},{"group":1,"hexcode":"1F469-200D-2764-FE0F-200D-1F48B-200D-1F468","label":"kiss: woman, man","order":2774,"tags":["couple","kiss","man","woman"],"unicode":"👩❤️💋👨","skins":[{"group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FB","label":"kiss: woman, man, light skin tone","order":2776,"unicode":"👩🏻❤️💋👨🏻"},{"group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FC","label":"kiss: woman, man, light skin tone, medium-light skin tone","order":2778,"unicode":"👩🏻❤️💋👨🏼"},{"group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FD","label":"kiss: woman, man, light skin tone, medium skin tone","order":2780,"unicode":"👩🏻❤️💋👨🏽"},{"group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FE","label":"kiss: woman, man, light skin tone, medium-dark skin tone","order":2782,"unicode":"👩🏻❤️💋👨🏾"},{"group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FF","label":"kiss: woman, man, light skin tone, dark skin tone","order":2784,"unicode":"👩🏻❤️💋👨🏿"},{"group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FB","label":"kiss: woman, man, medium-light skin tone, light skin tone","order":2786,"unicode":"👩🏼❤️💋👨🏻"},{"group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FC","label":"kiss: woman, man, medium-light skin tone","order":2788,"unicode":"👩🏼❤️💋👨🏼"},{"group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FD","label":"kiss: woman, man, medium-light skin tone, medium skin tone","order":2790,"unicode":"👩🏼❤️💋👨🏽"},{"group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FE","label":"kiss: woman, man, medium-light skin tone, medium-dark skin tone","order":2792,"unicode":"👩🏼❤️💋👨🏾"},{"group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FF","label":"kiss: woman, man, medium-light skin tone, dark skin tone","order":2794,"unicode":"👩🏼❤️💋👨🏿"},{"group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FB","label":"kiss: woman, man, medium skin tone, light skin tone","order":2796,"unicode":"👩🏽❤️💋👨🏻"},{"group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FC","label":"kiss: woman, man, medium skin tone, medium-light skin tone","order":2798,"unicode":"👩🏽❤️💋👨🏼"},{"group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FD","label":"kiss: woman, man, medium skin tone","order":2800,"unicode":"👩🏽❤️💋👨🏽"},{"group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FE","label":"kiss: woman, man, medium skin tone, medium-dark skin tone","order":2802,"unicode":"👩🏽❤️💋👨🏾"},{"group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FF","label":"kiss: woman, man, medium skin tone, dark skin tone","order":2804,"unicode":"👩🏽❤️💋👨🏿"},{"group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FB","label":"kiss: woman, man, medium-dark skin tone, light skin tone","order":2806,"unicode":"👩🏾❤️💋👨🏻"},{"group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FC","label":"kiss: woman, man, medium-dark skin tone, medium-light skin tone","order":2808,"unicode":"👩🏾❤️💋👨🏼"},{"group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FD","label":"kiss: woman, man, medium-dark skin tone, medium skin tone","order":2810,"unicode":"👩🏾❤️💋👨🏽"},{"group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FE","label":"kiss: woman, man, medium-dark skin tone","order":2812,"unicode":"👩🏾❤️💋👨🏾"},{"group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FF","label":"kiss: woman, man, medium-dark skin tone, dark skin tone","order":2814,"unicode":"👩🏾❤️💋👨🏿"},{"group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FB","label":"kiss: woman, man, dark skin tone, light skin tone","order":2816,"unicode":"👩🏿❤️💋👨🏻"},{"group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FC","label":"kiss: woman, man, dark skin tone, medium-light skin tone","order":2818,"unicode":"👩🏿❤️💋👨🏼"},{"group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FD","label":"kiss: woman, man, dark skin tone, medium skin tone","order":2820,"unicode":"👩🏿❤️💋👨🏽"},{"group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FE","label":"kiss: woman, man, dark skin tone, medium-dark skin tone","order":2822,"unicode":"👩🏿❤️💋👨🏾"},{"group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FF","label":"kiss: woman, man, dark skin tone","order":2824,"unicode":"👩🏿❤️💋👨🏿"}]},{"group":1,"hexcode":"1F468-200D-2764-FE0F-200D-1F48B-200D-1F468","label":"kiss: man, man","order":2826,"tags":["couple","kiss","man"],"unicode":"👨❤️💋👨","skins":[{"group":1,"hexcode":"1F468-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FB","label":"kiss: man, man, light skin tone","order":2828,"unicode":"👨🏻❤️💋👨🏻"},{"group":1,"hexcode":"1F468-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FC","label":"kiss: man, man, light skin tone, medium-light skin tone","order":2830,"unicode":"👨🏻❤️💋👨🏼"},{"group":1,"hexcode":"1F468-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FD","label":"kiss: man, man, light skin tone, medium skin tone","order":2832,"unicode":"👨🏻❤️💋👨🏽"},{"group":1,"hexcode":"1F468-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FE","label":"kiss: man, man, light skin tone, medium-dark skin tone","order":2834,"unicode":"👨🏻❤️💋👨🏾"},{"group":1,"hexcode":"1F468-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FF","label":"kiss: man, man, light skin tone, dark skin tone","order":2836,"unicode":"👨🏻❤️💋👨🏿"},{"group":1,"hexcode":"1F468-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FB","label":"kiss: man, man, medium-light skin tone, light skin tone","order":2838,"unicode":"👨🏼❤️💋👨🏻"},{"group":1,"hexcode":"1F468-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FC","label":"kiss: man, man, medium-light skin tone","order":2840,"unicode":"👨🏼❤️💋👨🏼"},{"group":1,"hexcode":"1F468-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FD","label":"kiss: man, man, medium-light skin tone, medium skin tone","order":2842,"unicode":"👨🏼❤️💋👨🏽"},{"group":1,"hexcode":"1F468-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FE","label":"kiss: man, man, medium-light skin tone, medium-dark skin tone","order":2844,"unicode":"👨🏼❤️💋👨🏾"},{"group":1,"hexcode":"1F468-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FF","label":"kiss: man, man, medium-light skin tone, dark skin tone","order":2846,"unicode":"👨🏼❤️💋👨🏿"},{"group":1,"hexcode":"1F468-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FB","label":"kiss: man, man, medium skin tone, light skin tone","order":2848,"unicode":"👨🏽❤️💋👨🏻"},{"group":1,"hexcode":"1F468-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FC","label":"kiss: man, man, medium skin tone, medium-light skin tone","order":2850,"unicode":"👨🏽❤️💋👨🏼"},{"group":1,"hexcode":"1F468-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FD","label":"kiss: man, man, medium skin tone","order":2852,"unicode":"👨🏽❤️💋👨🏽"},{"group":1,"hexcode":"1F468-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FE","label":"kiss: man, man, medium skin tone, medium-dark skin tone","order":2854,"unicode":"👨🏽❤️💋👨🏾"},{"group":1,"hexcode":"1F468-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FF","label":"kiss: man, man, medium skin tone, dark skin tone","order":2856,"unicode":"👨🏽❤️💋👨🏿"},{"group":1,"hexcode":"1F468-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FB","label":"kiss: man, man, medium-dark skin tone, light skin tone","order":2858,"unicode":"👨🏾❤️💋👨🏻"},{"group":1,"hexcode":"1F468-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FC","label":"kiss: man, man, medium-dark skin tone, medium-light skin tone","order":2860,"unicode":"👨🏾❤️💋👨🏼"},{"group":1,"hexcode":"1F468-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FD","label":"kiss: man, man, medium-dark skin tone, medium skin tone","order":2862,"unicode":"👨🏾❤️💋👨🏽"},{"group":1,"hexcode":"1F468-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FE","label":"kiss: man, man, medium-dark skin tone","order":2864,"unicode":"👨🏾❤️💋👨🏾"},{"group":1,"hexcode":"1F468-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FF","label":"kiss: man, man, medium-dark skin tone, dark skin tone","order":2866,"unicode":"👨🏾❤️💋👨🏿"},{"group":1,"hexcode":"1F468-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FB","label":"kiss: man, man, dark skin tone, light skin tone","order":2868,"unicode":"👨🏿❤️💋👨🏻"},{"group":1,"hexcode":"1F468-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FC","label":"kiss: man, man, dark skin tone, medium-light skin tone","order":2870,"unicode":"👨🏿❤️💋👨🏼"},{"group":1,"hexcode":"1F468-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FD","label":"kiss: man, man, dark skin tone, medium skin tone","order":2872,"unicode":"👨🏿❤️💋👨🏽"},{"group":1,"hexcode":"1F468-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FE","label":"kiss: man, man, dark skin tone, medium-dark skin tone","order":2874,"unicode":"👨🏿❤️💋👨🏾"},{"group":1,"hexcode":"1F468-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F468-1F3FF","label":"kiss: man, man, dark skin tone","order":2876,"unicode":"👨🏿❤️💋👨🏿"}]},{"group":1,"hexcode":"1F469-200D-2764-FE0F-200D-1F48B-200D-1F469","label":"kiss: woman, woman","order":2878,"tags":["couple","kiss","woman"],"unicode":"👩❤️💋👩","skins":[{"group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FB","label":"kiss: woman, woman, light skin tone","order":2880,"unicode":"👩🏻❤️💋👩🏻"},{"group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FC","label":"kiss: woman, woman, light skin tone, medium-light skin tone","order":2882,"unicode":"👩🏻❤️💋👩🏼"},{"group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FD","label":"kiss: woman, woman, light skin tone, medium skin tone","order":2884,"unicode":"👩🏻❤️💋👩🏽"},{"group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FE","label":"kiss: woman, woman, light skin tone, medium-dark skin tone","order":2886,"unicode":"👩🏻❤️💋👩🏾"},{"group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FF","label":"kiss: woman, woman, light skin tone, dark skin tone","order":2888,"unicode":"👩🏻❤️💋👩🏿"},{"group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FB","label":"kiss: woman, woman, medium-light skin tone, light skin tone","order":2890,"unicode":"👩🏼❤️💋👩🏻"},{"group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FC","label":"kiss: woman, woman, medium-light skin tone","order":2892,"unicode":"👩🏼❤️💋👩🏼"},{"group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FD","label":"kiss: woman, woman, medium-light skin tone, medium skin tone","order":2894,"unicode":"👩🏼❤️💋👩🏽"},{"group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FE","label":"kiss: woman, woman, medium-light skin tone, medium-dark skin tone","order":2896,"unicode":"👩🏼❤️💋👩🏾"},{"group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FF","label":"kiss: woman, woman, medium-light skin tone, dark skin tone","order":2898,"unicode":"👩🏼❤️💋👩🏿"},{"group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FB","label":"kiss: woman, woman, medium skin tone, light skin tone","order":2900,"unicode":"👩🏽❤️💋👩🏻"},{"group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FC","label":"kiss: woman, woman, medium skin tone, medium-light skin tone","order":2902,"unicode":"👩🏽❤️💋👩🏼"},{"group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FD","label":"kiss: woman, woman, medium skin tone","order":2904,"unicode":"👩🏽❤️💋👩🏽"},{"group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FE","label":"kiss: woman, woman, medium skin tone, medium-dark skin tone","order":2906,"unicode":"👩🏽❤️💋👩🏾"},{"group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FF","label":"kiss: woman, woman, medium skin tone, dark skin tone","order":2908,"unicode":"👩🏽❤️💋👩🏿"},{"group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FB","label":"kiss: woman, woman, medium-dark skin tone, light skin tone","order":2910,"unicode":"👩🏾❤️💋👩🏻"},{"group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FC","label":"kiss: woman, woman, medium-dark skin tone, medium-light skin tone","order":2912,"unicode":"👩🏾❤️💋👩🏼"},{"group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FD","label":"kiss: woman, woman, medium-dark skin tone, medium skin tone","order":2914,"unicode":"👩🏾❤️💋👩🏽"},{"group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FE","label":"kiss: woman, woman, medium-dark skin tone","order":2916,"unicode":"👩🏾❤️💋👩🏾"},{"group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FF","label":"kiss: woman, woman, medium-dark skin tone, dark skin tone","order":2918,"unicode":"👩🏾❤️💋👩🏿"},{"group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FB","label":"kiss: woman, woman, dark skin tone, light skin tone","order":2920,"unicode":"👩🏿❤️💋👩🏻"},{"group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FC","label":"kiss: woman, woman, dark skin tone, medium-light skin tone","order":2922,"unicode":"👩🏿❤️💋👩🏼"},{"group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FD","label":"kiss: woman, woman, dark skin tone, medium skin tone","order":2924,"unicode":"👩🏿❤️💋👩🏽"},{"group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FE","label":"kiss: woman, woman, dark skin tone, medium-dark skin tone","order":2926,"unicode":"👩🏿❤️💋👩🏾"},{"group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F48B-200D-1F469-1F3FF","label":"kiss: woman, woman, dark skin tone","order":2928,"unicode":"👩🏿❤️💋👩🏿"}]},{"group":1,"hexcode":"1F491","label":"couple with heart","order":2930,"tags":["couple","love"],"unicode":"💑","skins":[{"group":1,"hexcode":"1F491-1F3FB","label":"couple with heart: light skin tone","order":2931,"unicode":"💑🏻"},{"group":1,"hexcode":"1F491-1F3FC","label":"couple with heart: medium-light skin tone","order":2932,"unicode":"💑🏼"},{"group":1,"hexcode":"1F491-1F3FD","label":"couple with heart: medium skin tone","order":2933,"unicode":"💑🏽"},{"group":1,"hexcode":"1F491-1F3FE","label":"couple with heart: medium-dark skin tone","order":2934,"unicode":"💑🏾"},{"group":1,"hexcode":"1F491-1F3FF","label":"couple with heart: dark skin tone","order":2935,"unicode":"💑🏿"},{"group":1,"hexcode":"1F9D1-1F3FB-200D-2764-FE0F-200D-1F9D1-1F3FC","label":"couple with heart: person, person, light skin tone, medium-light skin tone","order":2936,"unicode":"🧑🏻❤️🧑🏼"},{"group":1,"hexcode":"1F9D1-1F3FB-200D-2764-FE0F-200D-1F9D1-1F3FD","label":"couple with heart: person, person, light skin tone, medium skin tone","order":2938,"unicode":"🧑🏻❤️🧑🏽"},{"group":1,"hexcode":"1F9D1-1F3FB-200D-2764-FE0F-200D-1F9D1-1F3FE","label":"couple with heart: person, person, light skin tone, medium-dark skin tone","order":2940,"unicode":"🧑🏻❤️🧑🏾"},{"group":1,"hexcode":"1F9D1-1F3FB-200D-2764-FE0F-200D-1F9D1-1F3FF","label":"couple with heart: person, person, light skin tone, dark skin tone","order":2942,"unicode":"🧑🏻❤️🧑🏿"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-2764-FE0F-200D-1F9D1-1F3FB","label":"couple with heart: person, person, medium-light skin tone, light skin tone","order":2944,"unicode":"🧑🏼❤️🧑🏻"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-2764-FE0F-200D-1F9D1-1F3FD","label":"couple with heart: person, person, medium-light skin tone, medium skin tone","order":2946,"unicode":"🧑🏼❤️🧑🏽"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-2764-FE0F-200D-1F9D1-1F3FE","label":"couple with heart: person, person, medium-light skin tone, medium-dark skin tone","order":2948,"unicode":"🧑🏼❤️🧑🏾"},{"group":1,"hexcode":"1F9D1-1F3FC-200D-2764-FE0F-200D-1F9D1-1F3FF","label":"couple with heart: person, person, medium-light skin tone, dark skin tone","order":2950,"unicode":"🧑🏼❤️🧑🏿"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-2764-FE0F-200D-1F9D1-1F3FB","label":"couple with heart: person, person, medium skin tone, light skin tone","order":2952,"unicode":"🧑🏽❤️🧑🏻"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-2764-FE0F-200D-1F9D1-1F3FC","label":"couple with heart: person, person, medium skin tone, medium-light skin tone","order":2954,"unicode":"🧑🏽❤️🧑🏼"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-2764-FE0F-200D-1F9D1-1F3FE","label":"couple with heart: person, person, medium skin tone, medium-dark skin tone","order":2956,"unicode":"🧑🏽❤️🧑🏾"},{"group":1,"hexcode":"1F9D1-1F3FD-200D-2764-FE0F-200D-1F9D1-1F3FF","label":"couple with heart: person, person, medium skin tone, dark skin tone","order":2958,"unicode":"🧑🏽❤️🧑🏿"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-2764-FE0F-200D-1F9D1-1F3FB","label":"couple with heart: person, person, medium-dark skin tone, light skin tone","order":2960,"unicode":"🧑🏾❤️🧑🏻"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-2764-FE0F-200D-1F9D1-1F3FC","label":"couple with heart: person, person, medium-dark skin tone, medium-light skin tone","order":2962,"unicode":"🧑🏾❤️🧑🏼"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-2764-FE0F-200D-1F9D1-1F3FD","label":"couple with heart: person, person, medium-dark skin tone, medium skin tone","order":2964,"unicode":"🧑🏾❤️🧑🏽"},{"group":1,"hexcode":"1F9D1-1F3FE-200D-2764-FE0F-200D-1F9D1-1F3FF","label":"couple with heart: person, person, medium-dark skin tone, dark skin tone","order":2966,"unicode":"🧑🏾❤️🧑🏿"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-2764-FE0F-200D-1F9D1-1F3FB","label":"couple with heart: person, person, dark skin tone, light skin tone","order":2968,"unicode":"🧑🏿❤️🧑🏻"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-2764-FE0F-200D-1F9D1-1F3FC","label":"couple with heart: person, person, dark skin tone, medium-light skin tone","order":2970,"unicode":"🧑🏿❤️🧑🏼"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-2764-FE0F-200D-1F9D1-1F3FD","label":"couple with heart: person, person, dark skin tone, medium skin tone","order":2972,"unicode":"🧑🏿❤️🧑🏽"},{"group":1,"hexcode":"1F9D1-1F3FF-200D-2764-FE0F-200D-1F9D1-1F3FE","label":"couple with heart: person, person, dark skin tone, medium-dark skin tone","order":2974,"unicode":"🧑🏿❤️🧑🏾"}]},{"group":1,"hexcode":"1F469-200D-2764-FE0F-200D-1F468","label":"couple with heart: woman, man","order":2976,"tags":["couple","couple with heart","love","man","woman"],"unicode":"👩❤️👨","skins":[{"group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F468-1F3FB","label":"couple with heart: woman, man, light skin tone","order":2978,"unicode":"👩🏻❤️👨🏻"},{"group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F468-1F3FC","label":"couple with heart: woman, man, light skin tone, medium-light skin tone","order":2980,"unicode":"👩🏻❤️👨🏼"},{"group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F468-1F3FD","label":"couple with heart: woman, man, light skin tone, medium skin tone","order":2982,"unicode":"👩🏻❤️👨🏽"},{"group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F468-1F3FE","label":"couple with heart: woman, man, light skin tone, medium-dark skin tone","order":2984,"unicode":"👩🏻❤️👨🏾"},{"group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F468-1F3FF","label":"couple with heart: woman, man, light skin tone, dark skin tone","order":2986,"unicode":"👩🏻❤️👨🏿"},{"group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F468-1F3FB","label":"couple with heart: woman, man, medium-light skin tone, light skin tone","order":2988,"unicode":"👩🏼❤️👨🏻"},{"group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F468-1F3FC","label":"couple with heart: woman, man, medium-light skin tone","order":2990,"unicode":"👩🏼❤️👨🏼"},{"group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F468-1F3FD","label":"couple with heart: woman, man, medium-light skin tone, medium skin tone","order":2992,"unicode":"👩🏼❤️👨🏽"},{"group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F468-1F3FE","label":"couple with heart: woman, man, medium-light skin tone, medium-dark skin tone","order":2994,"unicode":"👩🏼❤️👨🏾"},{"group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F468-1F3FF","label":"couple with heart: woman, man, medium-light skin tone, dark skin tone","order":2996,"unicode":"👩🏼❤️👨🏿"},{"group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F468-1F3FB","label":"couple with heart: woman, man, medium skin tone, light skin tone","order":2998,"unicode":"👩🏽❤️👨🏻"},{"group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F468-1F3FC","label":"couple with heart: woman, man, medium skin tone, medium-light skin tone","order":3000,"unicode":"👩🏽❤️👨🏼"},{"group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F468-1F3FD","label":"couple with heart: woman, man, medium skin tone","order":3002,"unicode":"👩🏽❤️👨🏽"},{"group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F468-1F3FE","label":"couple with heart: woman, man, medium skin tone, medium-dark skin tone","order":3004,"unicode":"👩🏽❤️👨🏾"},{"group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F468-1F3FF","label":"couple with heart: woman, man, medium skin tone, dark skin tone","order":3006,"unicode":"👩🏽❤️👨🏿"},{"group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F468-1F3FB","label":"couple with heart: woman, man, medium-dark skin tone, light skin tone","order":3008,"unicode":"👩🏾❤️👨🏻"},{"group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F468-1F3FC","label":"couple with heart: woman, man, medium-dark skin tone, medium-light skin tone","order":3010,"unicode":"👩🏾❤️👨🏼"},{"group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F468-1F3FD","label":"couple with heart: woman, man, medium-dark skin tone, medium skin tone","order":3012,"unicode":"👩🏾❤️👨🏽"},{"group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F468-1F3FE","label":"couple with heart: woman, man, medium-dark skin tone","order":3014,"unicode":"👩🏾❤️👨🏾"},{"group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F468-1F3FF","label":"couple with heart: woman, man, medium-dark skin tone, dark skin tone","order":3016,"unicode":"👩🏾❤️👨🏿"},{"group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F468-1F3FB","label":"couple with heart: woman, man, dark skin tone, light skin tone","order":3018,"unicode":"👩🏿❤️👨🏻"},{"group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F468-1F3FC","label":"couple with heart: woman, man, dark skin tone, medium-light skin tone","order":3020,"unicode":"👩🏿❤️👨🏼"},{"group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F468-1F3FD","label":"couple with heart: woman, man, dark skin tone, medium skin tone","order":3022,"unicode":"👩🏿❤️👨🏽"},{"group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F468-1F3FE","label":"couple with heart: woman, man, dark skin tone, medium-dark skin tone","order":3024,"unicode":"👩🏿❤️👨🏾"},{"group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F468-1F3FF","label":"couple with heart: woman, man, dark skin tone","order":3026,"unicode":"👩🏿❤️👨🏿"}]},{"group":1,"hexcode":"1F468-200D-2764-FE0F-200D-1F468","label":"couple with heart: man, man","order":3028,"tags":["couple","couple with heart","love","man"],"unicode":"👨❤️👨","skins":[{"group":1,"hexcode":"1F468-1F3FB-200D-2764-FE0F-200D-1F468-1F3FB","label":"couple with heart: man, man, light skin tone","order":3030,"unicode":"👨🏻❤️👨🏻"},{"group":1,"hexcode":"1F468-1F3FB-200D-2764-FE0F-200D-1F468-1F3FC","label":"couple with heart: man, man, light skin tone, medium-light skin tone","order":3032,"unicode":"👨🏻❤️👨🏼"},{"group":1,"hexcode":"1F468-1F3FB-200D-2764-FE0F-200D-1F468-1F3FD","label":"couple with heart: man, man, light skin tone, medium skin tone","order":3034,"unicode":"👨🏻❤️👨🏽"},{"group":1,"hexcode":"1F468-1F3FB-200D-2764-FE0F-200D-1F468-1F3FE","label":"couple with heart: man, man, light skin tone, medium-dark skin tone","order":3036,"unicode":"👨🏻❤️👨🏾"},{"group":1,"hexcode":"1F468-1F3FB-200D-2764-FE0F-200D-1F468-1F3FF","label":"couple with heart: man, man, light skin tone, dark skin tone","order":3038,"unicode":"👨🏻❤️👨🏿"},{"group":1,"hexcode":"1F468-1F3FC-200D-2764-FE0F-200D-1F468-1F3FB","label":"couple with heart: man, man, medium-light skin tone, light skin tone","order":3040,"unicode":"👨🏼❤️👨🏻"},{"group":1,"hexcode":"1F468-1F3FC-200D-2764-FE0F-200D-1F468-1F3FC","label":"couple with heart: man, man, medium-light skin tone","order":3042,"unicode":"👨🏼❤️👨🏼"},{"group":1,"hexcode":"1F468-1F3FC-200D-2764-FE0F-200D-1F468-1F3FD","label":"couple with heart: man, man, medium-light skin tone, medium skin tone","order":3044,"unicode":"👨🏼❤️👨🏽"},{"group":1,"hexcode":"1F468-1F3FC-200D-2764-FE0F-200D-1F468-1F3FE","label":"couple with heart: man, man, medium-light skin tone, medium-dark skin tone","order":3046,"unicode":"👨🏼❤️👨🏾"},{"group":1,"hexcode":"1F468-1F3FC-200D-2764-FE0F-200D-1F468-1F3FF","label":"couple with heart: man, man, medium-light skin tone, dark skin tone","order":3048,"unicode":"👨🏼❤️👨🏿"},{"group":1,"hexcode":"1F468-1F3FD-200D-2764-FE0F-200D-1F468-1F3FB","label":"couple with heart: man, man, medium skin tone, light skin tone","order":3050,"unicode":"👨🏽❤️👨🏻"},{"group":1,"hexcode":"1F468-1F3FD-200D-2764-FE0F-200D-1F468-1F3FC","label":"couple with heart: man, man, medium skin tone, medium-light skin tone","order":3052,"unicode":"👨🏽❤️👨🏼"},{"group":1,"hexcode":"1F468-1F3FD-200D-2764-FE0F-200D-1F468-1F3FD","label":"couple with heart: man, man, medium skin tone","order":3054,"unicode":"👨🏽❤️👨🏽"},{"group":1,"hexcode":"1F468-1F3FD-200D-2764-FE0F-200D-1F468-1F3FE","label":"couple with heart: man, man, medium skin tone, medium-dark skin tone","order":3056,"unicode":"👨🏽❤️👨🏾"},{"group":1,"hexcode":"1F468-1F3FD-200D-2764-FE0F-200D-1F468-1F3FF","label":"couple with heart: man, man, medium skin tone, dark skin tone","order":3058,"unicode":"👨🏽❤️👨🏿"},{"group":1,"hexcode":"1F468-1F3FE-200D-2764-FE0F-200D-1F468-1F3FB","label":"couple with heart: man, man, medium-dark skin tone, light skin tone","order":3060,"unicode":"👨🏾❤️👨🏻"},{"group":1,"hexcode":"1F468-1F3FE-200D-2764-FE0F-200D-1F468-1F3FC","label":"couple with heart: man, man, medium-dark skin tone, medium-light skin tone","order":3062,"unicode":"👨🏾❤️👨🏼"},{"group":1,"hexcode":"1F468-1F3FE-200D-2764-FE0F-200D-1F468-1F3FD","label":"couple with heart: man, man, medium-dark skin tone, medium skin tone","order":3064,"unicode":"👨🏾❤️👨🏽"},{"group":1,"hexcode":"1F468-1F3FE-200D-2764-FE0F-200D-1F468-1F3FE","label":"couple with heart: man, man, medium-dark skin tone","order":3066,"unicode":"👨🏾❤️👨🏾"},{"group":1,"hexcode":"1F468-1F3FE-200D-2764-FE0F-200D-1F468-1F3FF","label":"couple with heart: man, man, medium-dark skin tone, dark skin tone","order":3068,"unicode":"👨🏾❤️👨🏿"},{"group":1,"hexcode":"1F468-1F3FF-200D-2764-FE0F-200D-1F468-1F3FB","label":"couple with heart: man, man, dark skin tone, light skin tone","order":3070,"unicode":"👨🏿❤️👨🏻"},{"group":1,"hexcode":"1F468-1F3FF-200D-2764-FE0F-200D-1F468-1F3FC","label":"couple with heart: man, man, dark skin tone, medium-light skin tone","order":3072,"unicode":"👨🏿❤️👨🏼"},{"group":1,"hexcode":"1F468-1F3FF-200D-2764-FE0F-200D-1F468-1F3FD","label":"couple with heart: man, man, dark skin tone, medium skin tone","order":3074,"unicode":"👨🏿❤️👨🏽"},{"group":1,"hexcode":"1F468-1F3FF-200D-2764-FE0F-200D-1F468-1F3FE","label":"couple with heart: man, man, dark skin tone, medium-dark skin tone","order":3076,"unicode":"👨🏿❤️👨🏾"},{"group":1,"hexcode":"1F468-1F3FF-200D-2764-FE0F-200D-1F468-1F3FF","label":"couple with heart: man, man, dark skin tone","order":3078,"unicode":"👨🏿❤️👨🏿"}]},{"group":1,"hexcode":"1F469-200D-2764-FE0F-200D-1F469","label":"couple with heart: woman, woman","order":3080,"tags":["couple","couple with heart","love","woman"],"unicode":"👩❤️👩","skins":[{"group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F469-1F3FB","label":"couple with heart: woman, woman, light skin tone","order":3082,"unicode":"👩🏻❤️👩🏻"},{"group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F469-1F3FC","label":"couple with heart: woman, woman, light skin tone, medium-light skin tone","order":3084,"unicode":"👩🏻❤️👩🏼"},{"group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F469-1F3FD","label":"couple with heart: woman, woman, light skin tone, medium skin tone","order":3086,"unicode":"👩🏻❤️👩🏽"},{"group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F469-1F3FE","label":"couple with heart: woman, woman, light skin tone, medium-dark skin tone","order":3088,"unicode":"👩🏻❤️👩🏾"},{"group":1,"hexcode":"1F469-1F3FB-200D-2764-FE0F-200D-1F469-1F3FF","label":"couple with heart: woman, woman, light skin tone, dark skin tone","order":3090,"unicode":"👩🏻❤️👩🏿"},{"group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F469-1F3FB","label":"couple with heart: woman, woman, medium-light skin tone, light skin tone","order":3092,"unicode":"👩🏼❤️👩🏻"},{"group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F469-1F3FC","label":"couple with heart: woman, woman, medium-light skin tone","order":3094,"unicode":"👩🏼❤️👩🏼"},{"group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F469-1F3FD","label":"couple with heart: woman, woman, medium-light skin tone, medium skin tone","order":3096,"unicode":"👩🏼❤️👩🏽"},{"group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F469-1F3FE","label":"couple with heart: woman, woman, medium-light skin tone, medium-dark skin tone","order":3098,"unicode":"👩🏼❤️👩🏾"},{"group":1,"hexcode":"1F469-1F3FC-200D-2764-FE0F-200D-1F469-1F3FF","label":"couple with heart: woman, woman, medium-light skin tone, dark skin tone","order":3100,"unicode":"👩🏼❤️👩🏿"},{"group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F469-1F3FB","label":"couple with heart: woman, woman, medium skin tone, light skin tone","order":3102,"unicode":"👩🏽❤️👩🏻"},{"group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F469-1F3FC","label":"couple with heart: woman, woman, medium skin tone, medium-light skin tone","order":3104,"unicode":"👩🏽❤️👩🏼"},{"group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F469-1F3FD","label":"couple with heart: woman, woman, medium skin tone","order":3106,"unicode":"👩🏽❤️👩🏽"},{"group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F469-1F3FE","label":"couple with heart: woman, woman, medium skin tone, medium-dark skin tone","order":3108,"unicode":"👩🏽❤️👩🏾"},{"group":1,"hexcode":"1F469-1F3FD-200D-2764-FE0F-200D-1F469-1F3FF","label":"couple with heart: woman, woman, medium skin tone, dark skin tone","order":3110,"unicode":"👩🏽❤️👩🏿"},{"group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F469-1F3FB","label":"couple with heart: woman, woman, medium-dark skin tone, light skin tone","order":3112,"unicode":"👩🏾❤️👩🏻"},{"group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F469-1F3FC","label":"couple with heart: woman, woman, medium-dark skin tone, medium-light skin tone","order":3114,"unicode":"👩🏾❤️👩🏼"},{"group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F469-1F3FD","label":"couple with heart: woman, woman, medium-dark skin tone, medium skin tone","order":3116,"unicode":"👩🏾❤️👩🏽"},{"group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F469-1F3FE","label":"couple with heart: woman, woman, medium-dark skin tone","order":3118,"unicode":"👩🏾❤️👩🏾"},{"group":1,"hexcode":"1F469-1F3FE-200D-2764-FE0F-200D-1F469-1F3FF","label":"couple with heart: woman, woman, medium-dark skin tone, dark skin tone","order":3120,"unicode":"👩🏾❤️👩🏿"},{"group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F469-1F3FB","label":"couple with heart: woman, woman, dark skin tone, light skin tone","order":3122,"unicode":"👩🏿❤️👩🏻"},{"group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F469-1F3FC","label":"couple with heart: woman, woman, dark skin tone, medium-light skin tone","order":3124,"unicode":"👩🏿❤️👩🏼"},{"group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F469-1F3FD","label":"couple with heart: woman, woman, dark skin tone, medium skin tone","order":3126,"unicode":"👩🏿❤️👩🏽"},{"group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F469-1F3FE","label":"couple with heart: woman, woman, dark skin tone, medium-dark skin tone","order":3128,"unicode":"👩🏿❤️👩🏾"},{"group":1,"hexcode":"1F469-1F3FF-200D-2764-FE0F-200D-1F469-1F3FF","label":"couple with heart: woman, woman, dark skin tone","order":3130,"unicode":"👩🏿❤️👩🏿"}]},{"group":1,"hexcode":"1F46A","label":"family","order":3132,"tags":["family"],"unicode":"👪️"},{"group":1,"hexcode":"1F468-200D-1F469-200D-1F466","label":"family: man, woman, boy","order":3133,"tags":["boy","family","man","woman"],"unicode":"👨👩👦"},{"group":1,"hexcode":"1F468-200D-1F469-200D-1F467","label":"family: man, woman, girl","order":3134,"tags":["family","girl","man","woman"],"unicode":"👨👩👧"},{"group":1,"hexcode":"1F468-200D-1F469-200D-1F467-200D-1F466","label":"family: man, woman, girl, boy","order":3135,"tags":["boy","family","girl","man","woman"],"unicode":"👨👩👧👦"},{"group":1,"hexcode":"1F468-200D-1F469-200D-1F466-200D-1F466","label":"family: man, woman, boy, boy","order":3136,"tags":["boy","family","man","woman"],"unicode":"👨👩👦👦"},{"group":1,"hexcode":"1F468-200D-1F469-200D-1F467-200D-1F467","label":"family: man, woman, girl, girl","order":3137,"tags":["family","girl","man","woman"],"unicode":"👨👩👧👧"},{"group":1,"hexcode":"1F468-200D-1F468-200D-1F466","label":"family: man, man, boy","order":3138,"tags":["boy","family","man"],"unicode":"👨👨👦"},{"group":1,"hexcode":"1F468-200D-1F468-200D-1F467","label":"family: man, man, girl","order":3139,"tags":["family","girl","man"],"unicode":"👨👨👧"},{"group":1,"hexcode":"1F468-200D-1F468-200D-1F467-200D-1F466","label":"family: man, man, girl, boy","order":3140,"tags":["boy","family","girl","man"],"unicode":"👨👨👧👦"},{"group":1,"hexcode":"1F468-200D-1F468-200D-1F466-200D-1F466","label":"family: man, man, boy, boy","order":3141,"tags":["boy","family","man"],"unicode":"👨👨👦👦"},{"group":1,"hexcode":"1F468-200D-1F468-200D-1F467-200D-1F467","label":"family: man, man, girl, girl","order":3142,"tags":["family","girl","man"],"unicode":"👨👨👧👧"},{"group":1,"hexcode":"1F469-200D-1F469-200D-1F466","label":"family: woman, woman, boy","order":3143,"tags":["boy","family","woman"],"unicode":"👩👩👦"},{"group":1,"hexcode":"1F469-200D-1F469-200D-1F467","label":"family: woman, woman, girl","order":3144,"tags":["family","girl","woman"],"unicode":"👩👩👧"},{"group":1,"hexcode":"1F469-200D-1F469-200D-1F467-200D-1F466","label":"family: woman, woman, girl, boy","order":3145,"tags":["boy","family","girl","woman"],"unicode":"👩👩👧👦"},{"group":1,"hexcode":"1F469-200D-1F469-200D-1F466-200D-1F466","label":"family: woman, woman, boy, boy","order":3146,"tags":["boy","family","woman"],"unicode":"👩👩👦👦"},{"group":1,"hexcode":"1F469-200D-1F469-200D-1F467-200D-1F467","label":"family: woman, woman, girl, girl","order":3147,"tags":["family","girl","woman"],"unicode":"👩👩👧👧"},{"group":1,"hexcode":"1F468-200D-1F466","label":"family: man, boy","order":3148,"tags":["boy","family","man"],"unicode":"👨👦"},{"group":1,"hexcode":"1F468-200D-1F466-200D-1F466","label":"family: man, boy, boy","order":3149,"tags":["boy","family","man"],"unicode":"👨👦👦"},{"group":1,"hexcode":"1F468-200D-1F467","label":"family: man, girl","order":3150,"tags":["family","girl","man"],"unicode":"👨👧"},{"group":1,"hexcode":"1F468-200D-1F467-200D-1F466","label":"family: man, girl, boy","order":3151,"tags":["boy","family","girl","man"],"unicode":"👨👧👦"},{"group":1,"hexcode":"1F468-200D-1F467-200D-1F467","label":"family: man, girl, girl","order":3152,"tags":["family","girl","man"],"unicode":"👨👧👧"},{"group":1,"hexcode":"1F469-200D-1F466","label":"family: woman, boy","order":3153,"tags":["boy","family","woman"],"unicode":"👩👦"},{"group":1,"hexcode":"1F469-200D-1F466-200D-1F466","label":"family: woman, boy, boy","order":3154,"tags":["boy","family","woman"],"unicode":"👩👦👦"},{"group":1,"hexcode":"1F469-200D-1F467","label":"family: woman, girl","order":3155,"tags":["family","girl","woman"],"unicode":"👩👧"},{"group":1,"hexcode":"1F469-200D-1F467-200D-1F466","label":"family: woman, girl, boy","order":3156,"tags":["boy","family","girl","woman"],"unicode":"👩👧👦"},{"group":1,"hexcode":"1F469-200D-1F467-200D-1F467","label":"family: woman, girl, girl","order":3157,"tags":["family","girl","woman"],"unicode":"👩👧👧"},{"group":1,"hexcode":"1F5E3","label":"speaking head","order":3159,"tags":["face","head","silhouette","speak","speaking"],"unicode":"🗣️"},{"group":1,"hexcode":"1F464","label":"bust in silhouette","order":3160,"tags":["bust","silhouette"],"unicode":"👤"},{"group":1,"hexcode":"1F465","label":"busts in silhouette","order":3161,"tags":["bust","silhouette"],"unicode":"👥"},{"group":1,"hexcode":"1FAC2","label":"people hugging","order":3162,"tags":["goodbye","hello","hug","thanks"],"unicode":"🫂"},{"group":1,"hexcode":"1F463","label":"footprints","order":3163,"tags":["clothing","footprint","print"],"unicode":"👣"},{"group":2,"hexcode":"1F3FB","label":"light skin tone","order":3164,"tags":["skin tone","type 1–2"],"unicode":"🏻"},{"group":2,"hexcode":"1F3FC","label":"medium-light skin tone","order":3165,"tags":["skin tone","type 3"],"unicode":"🏼"},{"group":2,"hexcode":"1F3FD","label":"medium skin tone","order":3166,"tags":["skin tone","type 4"],"unicode":"🏽"},{"group":2,"hexcode":"1F3FE","label":"medium-dark skin tone","order":3167,"tags":["skin tone","type 5"],"unicode":"🏾"},{"group":2,"hexcode":"1F3FF","label":"dark skin tone","order":3168,"tags":["skin tone","type 6"],"unicode":"🏿"},{"group":2,"hexcode":"1F9B0","label":"red hair","order":3169,"tags":["ginger","redhead"],"unicode":"🦰"},{"group":2,"hexcode":"1F9B1","label":"curly hair","order":3170,"tags":["afro","curly","ringlets"],"unicode":"🦱"},{"group":2,"hexcode":"1F9B3","label":"white hair","order":3171,"tags":["gray","hair","old","white"],"unicode":"🦳"},{"group":2,"hexcode":"1F9B2","label":"bald","order":3172,"tags":["chemotherapy","hairless","no hair","shaven"],"unicode":"🦲"},{"group":3,"hexcode":"1F435","label":"monkey face","order":3173,"tags":["face","monkey"],"unicode":"🐵"},{"group":3,"hexcode":"1F412","label":"monkey","order":3174,"tags":["monkey"],"unicode":"🐒"},{"group":3,"hexcode":"1F98D","label":"gorilla","order":3175,"tags":["gorilla"],"unicode":"🦍"},{"group":3,"hexcode":"1F9A7","label":"orangutan","order":3176,"tags":["ape"],"unicode":"🦧"},{"group":3,"hexcode":"1F436","label":"dog face","order":3177,"tags":["dog","face","pet"],"unicode":"🐶"},{"group":3,"hexcode":"1F415","label":"dog","order":3178,"tags":["pet"],"unicode":"🐕️"},{"group":3,"hexcode":"1F9AE","label":"guide dog","order":3179,"tags":["accessibility","blind","guide"],"unicode":"🦮"},{"group":3,"hexcode":"1F415-200D-1F9BA","label":"service dog","order":3180,"tags":["accessibility","assistance","dog","service"],"unicode":"🐕🦺"},{"group":3,"hexcode":"1F429","label":"poodle","order":3181,"tags":["dog"],"unicode":"🐩"},{"group":3,"hexcode":"1F43A","label":"wolf","order":3182,"tags":["face"],"unicode":"🐺"},{"group":3,"hexcode":"1F98A","label":"fox","order":3183,"tags":["face"],"unicode":"🦊"},{"group":3,"hexcode":"1F99D","label":"raccoon","order":3184,"tags":["curious","sly"],"unicode":"🦝"},{"group":3,"hexcode":"1F431","label":"cat face","order":3185,"tags":["cat","face","pet"],"unicode":"🐱"},{"group":3,"hexcode":"1F408","label":"cat","order":3186,"tags":["pet"],"unicode":"🐈️"},{"group":3,"hexcode":"1F408-200D-2B1B","label":"black cat","order":3187,"tags":["black","cat","unlucky"],"unicode":"🐈⬛"},{"group":3,"hexcode":"1F981","label":"lion","order":3188,"tags":["face","leo","zodiac"],"unicode":"🦁"},{"group":3,"hexcode":"1F42F","label":"tiger face","order":3189,"tags":["face","tiger"],"unicode":"🐯"},{"group":3,"hexcode":"1F405","label":"tiger","order":3190,"tags":["tiger"],"unicode":"🐅"},{"group":3,"hexcode":"1F406","label":"leopard","order":3191,"tags":["leopard"],"unicode":"🐆"},{"group":3,"hexcode":"1F434","label":"horse face","order":3192,"tags":["face","horse"],"unicode":"🐴"},{"group":3,"hexcode":"1F40E","label":"horse","order":3193,"tags":["equestrian","racehorse","racing"],"unicode":"🐎"},{"group":3,"hexcode":"1F984","label":"unicorn","order":3194,"tags":["face"],"unicode":"🦄"},{"group":3,"hexcode":"1F993","label":"zebra","order":3195,"tags":["stripe"],"unicode":"🦓"},{"group":3,"hexcode":"1F98C","label":"deer","order":3196,"tags":["deer"],"unicode":"🦌"},{"group":3,"hexcode":"1F9AC","label":"bison","order":3197,"tags":["buffalo","herd","wisent"],"unicode":"🦬"},{"group":3,"hexcode":"1F42E","label":"cow face","order":3198,"tags":["cow","face"],"unicode":"🐮"},{"group":3,"hexcode":"1F402","label":"ox","order":3199,"tags":["bull","taurus","zodiac"],"unicode":"🐂"},{"group":3,"hexcode":"1F403","label":"water buffalo","order":3200,"tags":["buffalo","water"],"unicode":"🐃"},{"group":3,"hexcode":"1F404","label":"cow","order":3201,"tags":["cow"],"unicode":"🐄"},{"group":3,"hexcode":"1F437","label":"pig face","order":3202,"tags":["face","pig"],"unicode":"🐷"},{"group":3,"hexcode":"1F416","label":"pig","order":3203,"tags":["sow"],"unicode":"🐖"},{"group":3,"hexcode":"1F417","label":"boar","order":3204,"tags":["pig"],"unicode":"🐗"},{"group":3,"hexcode":"1F43D","label":"pig nose","order":3205,"tags":["face","nose","pig"],"unicode":"🐽"},{"group":3,"hexcode":"1F40F","label":"ram","order":3206,"tags":["aries","male","sheep","zodiac"],"unicode":"🐏"},{"group":3,"hexcode":"1F411","label":"ewe","order":3207,"tags":["female","sheep"],"unicode":"🐑"},{"group":3,"hexcode":"1F410","label":"goat","order":3208,"tags":["capricorn","zodiac"],"unicode":"🐐"},{"group":3,"hexcode":"1F42A","label":"camel","order":3209,"tags":["dromedary","hump"],"unicode":"🐪"},{"group":3,"hexcode":"1F42B","label":"two-hump camel","order":3210,"tags":["bactrian","camel","hump"],"unicode":"🐫"},{"group":3,"hexcode":"1F999","label":"llama","order":3211,"tags":["alpaca","guanaco","vicuña","wool"],"unicode":"🦙"},{"group":3,"hexcode":"1F992","label":"giraffe","order":3212,"tags":["spots"],"unicode":"🦒"},{"group":3,"hexcode":"1F418","label":"elephant","order":3213,"tags":["elephant"],"unicode":"🐘"},{"group":3,"hexcode":"1F9A3","label":"mammoth","order":3214,"tags":["extinction","large","tusk","woolly"],"unicode":"🦣"},{"group":3,"hexcode":"1F98F","label":"rhinoceros","order":3215,"tags":["rhinoceros"],"unicode":"🦏"},{"group":3,"hexcode":"1F99B","label":"hippopotamus","order":3216,"tags":["hippo"],"unicode":"🦛"},{"group":3,"hexcode":"1F42D","label":"mouse face","order":3217,"tags":["face","mouse"],"unicode":"🐭"},{"group":3,"hexcode":"1F401","label":"mouse","order":3218,"tags":["mouse"],"unicode":"🐁"},{"group":3,"hexcode":"1F400","label":"rat","order":3219,"tags":["rat"],"unicode":"🐀"},{"group":3,"hexcode":"1F439","label":"hamster","order":3220,"tags":["face","pet"],"unicode":"🐹"},{"group":3,"hexcode":"1F430","label":"rabbit face","order":3221,"tags":["bunny","face","pet","rabbit"],"unicode":"🐰"},{"group":3,"hexcode":"1F407","label":"rabbit","order":3222,"tags":["bunny","pet"],"unicode":"🐇"},{"group":3,"hexcode":"1F43F","label":"chipmunk","order":3224,"tags":["squirrel"],"unicode":"🐿️"},{"group":3,"hexcode":"1F9AB","label":"beaver","order":3225,"tags":["dam"],"unicode":"🦫"},{"group":3,"hexcode":"1F994","label":"hedgehog","order":3226,"tags":["spiny"],"unicode":"🦔"},{"group":3,"hexcode":"1F987","label":"bat","order":3227,"tags":["vampire"],"unicode":"🦇"},{"group":3,"hexcode":"1F43B","label":"bear","order":3228,"tags":["face"],"unicode":"🐻"},{"group":3,"hexcode":"1F43B-200D-2744-FE0F","label":"polar bear","order":3229,"tags":["arctic","bear","white"],"unicode":"🐻❄️"},{"group":3,"hexcode":"1F428","label":"koala","order":3231,"tags":["face","marsupial"],"unicode":"🐨"},{"group":3,"hexcode":"1F43C","label":"panda","order":3232,"tags":["face"],"unicode":"🐼"},{"group":3,"hexcode":"1F9A5","label":"sloth","order":3233,"tags":["lazy","slow"],"unicode":"🦥"},{"group":3,"hexcode":"1F9A6","label":"otter","order":3234,"tags":["fishing","playful"],"unicode":"🦦"},{"group":3,"hexcode":"1F9A8","label":"skunk","order":3235,"tags":["stink"],"unicode":"🦨"},{"group":3,"hexcode":"1F998","label":"kangaroo","order":3236,"tags":["australia","joey","jump","marsupial"],"unicode":"🦘"},{"group":3,"hexcode":"1F9A1","label":"badger","order":3237,"tags":["honey badger","pester"],"unicode":"🦡"},{"group":3,"hexcode":"1F43E","label":"paw prints","order":3238,"tags":["feet","paw","print"],"unicode":"🐾"},{"group":3,"hexcode":"1F983","label":"turkey","order":3239,"tags":["bird"],"unicode":"🦃"},{"group":3,"hexcode":"1F414","label":"chicken","order":3240,"tags":["bird"],"unicode":"🐔"},{"group":3,"hexcode":"1F413","label":"rooster","order":3241,"tags":["bird"],"unicode":"🐓"},{"group":3,"hexcode":"1F423","label":"hatching chick","order":3242,"tags":["baby","bird","chick","hatching"],"unicode":"🐣"},{"group":3,"hexcode":"1F424","label":"baby chick","order":3243,"tags":["baby","bird","chick"],"unicode":"🐤"},{"group":3,"hexcode":"1F425","label":"front-facing baby chick","order":3244,"tags":["baby","bird","chick"],"unicode":"🐥"},{"group":3,"hexcode":"1F426","label":"bird","order":3245,"tags":["bird"],"unicode":"🐦️"},{"group":3,"hexcode":"1F427","label":"penguin","order":3246,"tags":["bird"],"unicode":"🐧"},{"group":3,"hexcode":"1F54A","label":"dove","order":3248,"tags":["bird","fly","peace"],"unicode":"🕊️"},{"group":3,"hexcode":"1F985","label":"eagle","order":3249,"tags":["bird"],"unicode":"🦅"},{"group":3,"hexcode":"1F986","label":"duck","order":3250,"tags":["bird"],"unicode":"🦆"},{"group":3,"hexcode":"1F9A2","label":"swan","order":3251,"tags":["bird","cygnet","ugly duckling"],"unicode":"🦢"},{"group":3,"hexcode":"1F989","label":"owl","order":3252,"tags":["bird","wise"],"unicode":"🦉"},{"group":3,"hexcode":"1F9A4","label":"dodo","order":3253,"tags":["extinction","large","mauritius"],"unicode":"🦤"},{"group":3,"hexcode":"1FAB6","label":"feather","order":3254,"tags":["bird","flight","light","plumage"],"unicode":"🪶"},{"group":3,"hexcode":"1F9A9","label":"flamingo","order":3255,"tags":["flamboyant","tropical"],"unicode":"🦩"},{"group":3,"hexcode":"1F99A","label":"peacock","order":3256,"tags":["bird","ostentatious","peahen","proud"],"unicode":"🦚"},{"group":3,"hexcode":"1F99C","label":"parrot","order":3257,"tags":["bird","pirate","talk"],"unicode":"🦜"},{"group":3,"hexcode":"1F438","label":"frog","order":3258,"tags":["face"],"unicode":"🐸"},{"group":3,"hexcode":"1F40A","label":"crocodile","order":3259,"tags":["crocodile"],"unicode":"🐊"},{"group":3,"hexcode":"1F422","label":"turtle","order":3260,"tags":["terrapin","tortoise"],"unicode":"🐢"},{"group":3,"hexcode":"1F98E","label":"lizard","order":3261,"tags":["reptile"],"unicode":"🦎"},{"group":3,"hexcode":"1F40D","label":"snake","order":3262,"tags":["bearer","ophiuchus","serpent","zodiac"],"unicode":"🐍"},{"group":3,"hexcode":"1F432","label":"dragon face","order":3263,"tags":["dragon","face","fairy tale"],"unicode":"🐲"},{"group":3,"hexcode":"1F409","label":"dragon","order":3264,"tags":["fairy tale"],"unicode":"🐉"},{"group":3,"hexcode":"1F995","label":"sauropod","order":3265,"tags":["brachiosaurus","brontosaurus","diplodocus"],"unicode":"🦕"},{"group":3,"hexcode":"1F996","label":"T-Rex","order":3266,"tags":["t-rex","tyrannosaurus rex"],"unicode":"🦖"},{"group":3,"hexcode":"1F433","label":"spouting whale","order":3267,"tags":["face","spouting","whale"],"unicode":"🐳"},{"group":3,"hexcode":"1F40B","label":"whale","order":3268,"tags":["whale"],"unicode":"🐋"},{"group":3,"hexcode":"1F42C","label":"dolphin","order":3269,"tags":["flipper"],"unicode":"🐬"},{"group":3,"hexcode":"1F9AD","label":"seal","order":3270,"tags":["sea lion"],"unicode":"🦭"},{"group":3,"hexcode":"1F41F","label":"fish","order":3271,"tags":["pisces","zodiac"],"unicode":"🐟️"},{"group":3,"hexcode":"1F420","label":"tropical fish","order":3272,"tags":["fish","tropical"],"unicode":"🐠"},{"group":3,"hexcode":"1F421","label":"blowfish","order":3273,"tags":["fish"],"unicode":"🐡"},{"group":3,"hexcode":"1F988","label":"shark","order":3274,"tags":["fish"],"unicode":"🦈"},{"group":3,"hexcode":"1F419","label":"octopus","order":3275,"tags":["octopus"],"unicode":"🐙"},{"group":3,"hexcode":"1F41A","label":"spiral shell","order":3276,"tags":["shell","spiral"],"unicode":"🐚"},{"group":3,"hexcode":"1FAB8","label":"coral","order":3277,"tags":["ocean","reef"],"unicode":"🪸"},{"group":3,"hexcode":"1F40C","label":"snail","order":3278,"tags":["snail"],"unicode":"🐌"},{"group":3,"hexcode":"1F98B","label":"butterfly","order":3279,"tags":["insect","pretty"],"unicode":"🦋"},{"group":3,"hexcode":"1F41B","label":"bug","order":3280,"tags":["insect"],"unicode":"🐛"},{"group":3,"hexcode":"1F41C","label":"ant","order":3281,"tags":["insect"],"unicode":"🐜"},{"group":3,"hexcode":"1F41D","label":"honeybee","order":3282,"tags":["bee","insect"],"unicode":"🐝"},{"group":3,"hexcode":"1FAB2","label":"beetle","order":3283,"tags":["bug","insect"],"unicode":"🪲"},{"group":3,"hexcode":"1F41E","label":"lady beetle","order":3284,"tags":["beetle","insect","ladybird","ladybug"],"unicode":"🐞"},{"group":3,"hexcode":"1F997","label":"cricket","order":3285,"tags":["grasshopper"],"unicode":"🦗"},{"group":3,"hexcode":"1FAB3","label":"cockroach","order":3286,"tags":["insect","pest","roach"],"unicode":"🪳"},{"group":3,"hexcode":"1F577","label":"spider","order":3288,"tags":["insect"],"unicode":"🕷️"},{"group":3,"hexcode":"1F578","label":"spider web","order":3290,"tags":["spider","web"],"unicode":"🕸️"},{"group":3,"hexcode":"1F982","label":"scorpion","order":3291,"tags":["scorpio","zodiac"],"unicode":"🦂"},{"group":3,"hexcode":"1F99F","label":"mosquito","order":3292,"tags":["disease","fever","malaria","pest","virus"],"unicode":"🦟"},{"group":3,"hexcode":"1FAB0","label":"fly","order":3293,"tags":["disease","maggot","pest","rotting"],"unicode":"🪰"},{"group":3,"hexcode":"1FAB1","label":"worm","order":3294,"tags":["annelid","earthworm","parasite"],"unicode":"🪱"},{"group":3,"hexcode":"1F9A0","label":"microbe","order":3295,"tags":["amoeba","bacteria","virus"],"unicode":"🦠"},{"group":3,"hexcode":"1F490","label":"bouquet","order":3296,"tags":["flower"],"unicode":"💐"},{"group":3,"hexcode":"1F338","label":"cherry blossom","order":3297,"tags":["blossom","cherry","flower"],"unicode":"🌸"},{"group":3,"hexcode":"1F4AE","label":"white flower","order":3298,"tags":["flower"],"unicode":"💮"},{"group":3,"hexcode":"1FAB7","label":"lotus","order":3299,"tags":["buddhism","flower","hinduism","india","purity","vietnam"],"unicode":"🪷"},{"group":3,"hexcode":"1F3F5","label":"rosette","order":3301,"tags":["plant"],"unicode":"🏵️"},{"group":3,"hexcode":"1F339","label":"rose","order":3302,"tags":["flower"],"unicode":"🌹"},{"group":3,"hexcode":"1F940","label":"wilted flower","order":3303,"tags":["flower","wilted"],"unicode":"🥀"},{"group":3,"hexcode":"1F33A","label":"hibiscus","order":3304,"tags":["flower"],"unicode":"🌺"},{"group":3,"hexcode":"1F33B","label":"sunflower","order":3305,"tags":["flower","sun"],"unicode":"🌻"},{"group":3,"hexcode":"1F33C","label":"blossom","order":3306,"tags":["flower"],"unicode":"🌼"},{"group":3,"hexcode":"1F337","label":"tulip","order":3307,"tags":["flower"],"unicode":"🌷"},{"group":3,"hexcode":"1F331","label":"seedling","order":3308,"tags":["young"],"unicode":"🌱"},{"group":3,"hexcode":"1FAB4","label":"potted plant","order":3309,"tags":["boring","grow","house","nurturing","plant","useless"],"unicode":"🪴"},{"group":3,"hexcode":"1F332","label":"evergreen tree","order":3310,"tags":["tree"],"unicode":"🌲"},{"group":3,"hexcode":"1F333","label":"deciduous tree","order":3311,"tags":["deciduous","shedding","tree"],"unicode":"🌳"},{"group":3,"hexcode":"1F334","label":"palm tree","order":3312,"tags":["palm","tree"],"unicode":"🌴"},{"group":3,"hexcode":"1F335","label":"cactus","order":3313,"tags":["plant"],"unicode":"🌵"},{"group":3,"hexcode":"1F33E","label":"sheaf of rice","order":3314,"tags":["ear","grain","rice"],"unicode":"🌾"},{"group":3,"hexcode":"1F33F","label":"herb","order":3315,"tags":["leaf"],"unicode":"🌿"},{"group":3,"hexcode":"2618","label":"shamrock","order":3317,"tags":["plant"],"unicode":"☘️"},{"group":3,"hexcode":"1F340","label":"four leaf clover","order":3318,"tags":["4","clover","four","four-leaf clover","leaf"],"unicode":"🍀"},{"group":3,"hexcode":"1F341","label":"maple leaf","order":3319,"tags":["falling","leaf","maple"],"unicode":"🍁"},{"group":3,"hexcode":"1F342","label":"fallen leaf","order":3320,"tags":["falling","leaf"],"unicode":"🍂"},{"group":3,"hexcode":"1F343","label":"leaf fluttering in wind","order":3321,"tags":["blow","flutter","leaf","wind"],"unicode":"🍃"},{"group":3,"hexcode":"1FAB9","label":"empty nest","order":3322,"tags":["nesting"],"unicode":"🪹"},{"group":3,"hexcode":"1FABA","label":"nest with eggs","order":3323,"tags":["nesting"],"unicode":"🪺"},{"group":4,"hexcode":"1F347","label":"grapes","order":3324,"tags":["fruit","grape"],"unicode":"🍇"},{"group":4,"hexcode":"1F348","label":"melon","order":3325,"tags":["fruit"],"unicode":"🍈"},{"group":4,"hexcode":"1F349","label":"watermelon","order":3326,"tags":["fruit"],"unicode":"🍉"},{"group":4,"hexcode":"1F34A","label":"tangerine","order":3327,"tags":["fruit","orange"],"unicode":"🍊"},{"group":4,"hexcode":"1F34B","label":"lemon","order":3328,"tags":["citrus","fruit"],"unicode":"🍋"},{"group":4,"hexcode":"1F34C","label":"banana","order":3329,"tags":["fruit"],"unicode":"🍌"},{"group":4,"hexcode":"1F34D","label":"pineapple","order":3330,"tags":["fruit"],"unicode":"🍍"},{"group":4,"hexcode":"1F96D","label":"mango","order":3331,"tags":["fruit","tropical"],"unicode":"🥭"},{"group":4,"hexcode":"1F34E","label":"red apple","order":3332,"tags":["apple","fruit","red"],"unicode":"🍎"},{"group":4,"hexcode":"1F34F","label":"green apple","order":3333,"tags":["apple","fruit","green"],"unicode":"🍏"},{"group":4,"hexcode":"1F350","label":"pear","order":3334,"tags":["fruit"],"unicode":"🍐"},{"group":4,"hexcode":"1F351","label":"peach","order":3335,"tags":["fruit"],"unicode":"🍑"},{"group":4,"hexcode":"1F352","label":"cherries","order":3336,"tags":["berries","cherry","fruit","red"],"unicode":"🍒"},{"group":4,"hexcode":"1F353","label":"strawberry","order":3337,"tags":["berry","fruit"],"unicode":"🍓"},{"group":4,"hexcode":"1FAD0","label":"blueberries","order":3338,"tags":["berry","bilberry","blue","blueberry"],"unicode":"🫐"},{"group":4,"hexcode":"1F95D","label":"kiwi fruit","order":3339,"tags":["food","fruit","kiwi"],"unicode":"🥝"},{"group":4,"hexcode":"1F345","label":"tomato","order":3340,"tags":["fruit","vegetable"],"unicode":"🍅"},{"group":4,"hexcode":"1FAD2","label":"olive","order":3341,"tags":["food"],"unicode":"🫒"},{"group":4,"hexcode":"1F965","label":"coconut","order":3342,"tags":["palm","piña colada"],"unicode":"🥥"},{"group":4,"hexcode":"1F951","label":"avocado","order":3343,"tags":["food","fruit"],"unicode":"🥑"},{"group":4,"hexcode":"1F346","label":"eggplant","order":3344,"tags":["aubergine","vegetable"],"unicode":"🍆"},{"group":4,"hexcode":"1F954","label":"potato","order":3345,"tags":["food","vegetable"],"unicode":"🥔"},{"group":4,"hexcode":"1F955","label":"carrot","order":3346,"tags":["food","vegetable"],"unicode":"🥕"},{"group":4,"hexcode":"1F33D","label":"ear of corn","order":3347,"tags":["corn","ear","maize","maze"],"unicode":"🌽"},{"group":4,"hexcode":"1F336","label":"hot pepper","order":3349,"tags":["hot","pepper"],"unicode":"🌶️"},{"group":4,"hexcode":"1FAD1","label":"bell pepper","order":3350,"tags":["capsicum","pepper","vegetable"],"unicode":"🫑"},{"group":4,"hexcode":"1F952","label":"cucumber","order":3351,"tags":["food","pickle","vegetable"],"unicode":"🥒"},{"group":4,"hexcode":"1F96C","label":"leafy green","order":3352,"tags":["bok choy","cabbage","kale","lettuce"],"unicode":"🥬"},{"group":4,"hexcode":"1F966","label":"broccoli","order":3353,"tags":["wild cabbage"],"unicode":"🥦"},{"group":4,"hexcode":"1F9C4","label":"garlic","order":3354,"tags":["flavoring"],"unicode":"🧄"},{"group":4,"hexcode":"1F9C5","label":"onion","order":3355,"tags":["flavoring"],"unicode":"🧅"},{"group":4,"hexcode":"1F344","label":"mushroom","order":3356,"tags":["toadstool"],"unicode":"🍄"},{"group":4,"hexcode":"1F95C","label":"peanuts","order":3357,"tags":["food","nut","peanut","vegetable"],"unicode":"🥜"},{"group":4,"hexcode":"1FAD8","label":"beans","order":3358,"tags":["food","kidney","legume"],"unicode":"🫘"},{"group":4,"hexcode":"1F330","label":"chestnut","order":3359,"tags":["plant"],"unicode":"🌰"},{"group":4,"hexcode":"1F35E","label":"bread","order":3360,"tags":["loaf"],"unicode":"🍞"},{"group":4,"hexcode":"1F950","label":"croissant","order":3361,"tags":["bread","breakfast","food","french","roll"],"unicode":"🥐"},{"group":4,"hexcode":"1F956","label":"baguette bread","order":3362,"tags":["baguette","bread","food","french"],"unicode":"🥖"},{"group":4,"hexcode":"1FAD3","label":"flatbread","order":3363,"tags":["arepa","lavash","naan","pita"],"unicode":"🫓"},{"group":4,"hexcode":"1F968","label":"pretzel","order":3364,"tags":["twisted"],"unicode":"🥨"},{"group":4,"hexcode":"1F96F","label":"bagel","order":3365,"tags":["bakery","breakfast","schmear"],"unicode":"🥯"},{"group":4,"hexcode":"1F95E","label":"pancakes","order":3366,"tags":["breakfast","crêpe","food","hotcake","pancake"],"unicode":"🥞"},{"group":4,"hexcode":"1F9C7","label":"waffle","order":3367,"tags":["breakfast","indecisive","iron"],"unicode":"🧇"},{"group":4,"hexcode":"1F9C0","label":"cheese wedge","order":3368,"tags":["cheese"],"unicode":"🧀"},{"group":4,"hexcode":"1F356","label":"meat on bone","order":3369,"tags":["bone","meat"],"unicode":"🍖"},{"group":4,"hexcode":"1F357","label":"poultry leg","order":3370,"tags":["bone","chicken","drumstick","leg","poultry"],"unicode":"🍗"},{"group":4,"hexcode":"1F969","label":"cut of meat","order":3371,"tags":["chop","lambchop","porkchop","steak"],"unicode":"🥩"},{"group":4,"hexcode":"1F953","label":"bacon","order":3372,"tags":["breakfast","food","meat"],"unicode":"🥓"},{"group":4,"hexcode":"1F354","label":"hamburger","order":3373,"tags":["burger"],"unicode":"🍔"},{"group":4,"hexcode":"1F35F","label":"french fries","order":3374,"tags":["french","fries"],"unicode":"🍟"},{"group":4,"hexcode":"1F355","label":"pizza","order":3375,"tags":["cheese","slice"],"unicode":"🍕"},{"group":4,"hexcode":"1F32D","label":"hot dog","order":3376,"tags":["frankfurter","hotdog","sausage"],"unicode":"🌭"},{"group":4,"hexcode":"1F96A","label":"sandwich","order":3377,"tags":["bread"],"unicode":"🥪"},{"group":4,"hexcode":"1F32E","label":"taco","order":3378,"tags":["mexican"],"unicode":"🌮"},{"group":4,"hexcode":"1F32F","label":"burrito","order":3379,"tags":["mexican","wrap"],"unicode":"🌯"},{"group":4,"hexcode":"1FAD4","label":"tamale","order":3380,"tags":["mexican","wrapped"],"unicode":"🫔"},{"group":4,"hexcode":"1F959","label":"stuffed flatbread","order":3381,"tags":["falafel","flatbread","food","gyro","kebab","stuffed"],"unicode":"🥙"},{"group":4,"hexcode":"1F9C6","label":"falafel","order":3382,"tags":["chickpea","meatball"],"unicode":"🧆"},{"group":4,"hexcode":"1F95A","label":"egg","order":3383,"tags":["breakfast","food"],"unicode":"🥚"},{"group":4,"hexcode":"1F373","label":"cooking","order":3384,"tags":["breakfast","egg","frying","pan"],"unicode":"🍳"},{"group":4,"hexcode":"1F958","label":"shallow pan of food","order":3385,"tags":["casserole","food","paella","pan","shallow"],"unicode":"🥘"},{"group":4,"hexcode":"1F372","label":"pot of food","order":3386,"tags":["pot","stew"],"unicode":"🍲"},{"group":4,"hexcode":"1FAD5","label":"fondue","order":3387,"tags":["cheese","chocolate","melted","pot","swiss"],"unicode":"🫕"},{"group":4,"hexcode":"1F963","label":"bowl with spoon","order":3388,"tags":["breakfast","cereal","congee"],"unicode":"🥣"},{"group":4,"hexcode":"1F957","label":"green salad","order":3389,"tags":["food","green","salad"],"unicode":"🥗"},{"group":4,"hexcode":"1F37F","label":"popcorn","order":3390,"tags":["popcorn"],"unicode":"🍿"},{"group":4,"hexcode":"1F9C8","label":"butter","order":3391,"tags":["dairy"],"unicode":"🧈"},{"group":4,"hexcode":"1F9C2","label":"salt","order":3392,"tags":["condiment","shaker"],"unicode":"🧂"},{"group":4,"hexcode":"1F96B","label":"canned food","order":3393,"tags":["can"],"unicode":"🥫"},{"group":4,"hexcode":"1F371","label":"bento box","order":3394,"tags":["bento","box"],"unicode":"🍱"},{"group":4,"hexcode":"1F358","label":"rice cracker","order":3395,"tags":["cracker","rice"],"unicode":"🍘"},{"group":4,"hexcode":"1F359","label":"rice ball","order":3396,"tags":["ball","japanese","rice"],"unicode":"🍙"},{"group":4,"hexcode":"1F35A","label":"cooked rice","order":3397,"tags":["cooked","rice"],"unicode":"🍚"},{"group":4,"hexcode":"1F35B","label":"curry rice","order":3398,"tags":["curry","rice"],"unicode":"🍛"},{"group":4,"hexcode":"1F35C","label":"steaming bowl","order":3399,"tags":["bowl","noodle","ramen","steaming"],"unicode":"🍜"},{"group":4,"hexcode":"1F35D","label":"spaghetti","order":3400,"tags":["pasta"],"unicode":"🍝"},{"group":4,"hexcode":"1F360","label":"roasted sweet potato","order":3401,"tags":["potato","roasted","sweet"],"unicode":"🍠"},{"group":4,"hexcode":"1F362","label":"oden","order":3402,"tags":["kebab","seafood","skewer","stick"],"unicode":"🍢"},{"group":4,"hexcode":"1F363","label":"sushi","order":3403,"tags":["sushi"],"unicode":"🍣"},{"group":4,"hexcode":"1F364","label":"fried shrimp","order":3404,"tags":["fried","prawn","shrimp","tempura"],"unicode":"🍤"},{"group":4,"hexcode":"1F365","label":"fish cake with swirl","order":3405,"tags":["cake","fish","pastry","swirl"],"unicode":"🍥"},{"group":4,"hexcode":"1F96E","label":"moon cake","order":3406,"tags":["autumn","festival","yuèbǐng"],"unicode":"🥮"},{"group":4,"hexcode":"1F361","label":"dango","order":3407,"tags":["dessert","japanese","skewer","stick","sweet"],"unicode":"🍡"},{"group":4,"hexcode":"1F95F","label":"dumpling","order":3408,"tags":["empanada","gyōza","jiaozi","pierogi","potsticker"],"unicode":"🥟"},{"group":4,"hexcode":"1F960","label":"fortune cookie","order":3409,"tags":["prophecy"],"unicode":"🥠"},{"group":4,"hexcode":"1F961","label":"takeout box","order":3410,"tags":["oyster pail"],"unicode":"🥡"},{"group":4,"hexcode":"1F980","label":"crab","order":3411,"tags":["cancer","zodiac"],"unicode":"🦀"},{"group":4,"hexcode":"1F99E","label":"lobster","order":3412,"tags":["bisque","claws","seafood"],"unicode":"🦞"},{"group":4,"hexcode":"1F990","label":"shrimp","order":3413,"tags":["food","shellfish","small"],"unicode":"🦐"},{"group":4,"hexcode":"1F991","label":"squid","order":3414,"tags":["food","molusc"],"unicode":"🦑"},{"group":4,"hexcode":"1F9AA","label":"oyster","order":3415,"tags":["diving","pearl"],"unicode":"🦪"},{"group":4,"hexcode":"1F366","label":"soft ice cream","order":3416,"tags":["cream","dessert","ice","icecream","soft","sweet"],"unicode":"🍦"},{"group":4,"hexcode":"1F367","label":"shaved ice","order":3417,"tags":["dessert","ice","shaved","sweet"],"unicode":"🍧"},{"group":4,"hexcode":"1F368","label":"ice cream","order":3418,"tags":["cream","dessert","ice","sweet"],"unicode":"🍨"},{"group":4,"hexcode":"1F369","label":"doughnut","order":3419,"tags":["breakfast","dessert","donut","sweet"],"unicode":"🍩"},{"group":4,"hexcode":"1F36A","label":"cookie","order":3420,"tags":["dessert","sweet"],"unicode":"🍪"},{"group":4,"hexcode":"1F382","label":"birthday cake","order":3421,"tags":["birthday","cake","celebration","dessert","pastry","sweet"],"unicode":"🎂"},{"group":4,"hexcode":"1F370","label":"shortcake","order":3422,"tags":["cake","dessert","pastry","slice","sweet"],"unicode":"🍰"},{"group":4,"hexcode":"1F9C1","label":"cupcake","order":3423,"tags":["bakery","sweet"],"unicode":"🧁"},{"group":4,"hexcode":"1F967","label":"pie","order":3424,"tags":["filling","pastry"],"unicode":"🥧"},{"group":4,"hexcode":"1F36B","label":"chocolate bar","order":3425,"tags":["bar","chocolate","dessert","sweet"],"unicode":"🍫"},{"group":4,"hexcode":"1F36C","label":"candy","order":3426,"tags":["dessert","sweet"],"unicode":"🍬"},{"group":4,"hexcode":"1F36D","label":"lollipop","order":3427,"tags":["candy","dessert","sweet"],"unicode":"🍭"},{"group":4,"hexcode":"1F36E","label":"custard","order":3428,"tags":["dessert","pudding","sweet"],"unicode":"🍮"},{"group":4,"hexcode":"1F36F","label":"honey pot","order":3429,"tags":["honey","honeypot","pot","sweet"],"unicode":"🍯"},{"group":4,"hexcode":"1F37C","label":"baby bottle","order":3430,"tags":["baby","bottle","drink","milk"],"unicode":"🍼"},{"group":4,"hexcode":"1F95B","label":"glass of milk","order":3431,"tags":["drink","glass","milk"],"unicode":"🥛"},{"group":4,"hexcode":"2615","label":"hot beverage","order":3432,"tags":["beverage","coffee","drink","hot","steaming","tea"],"unicode":"☕️"},{"group":4,"hexcode":"1FAD6","label":"teapot","order":3433,"tags":["drink","pot","tea"],"unicode":"🫖"},{"group":4,"hexcode":"1F375","label":"teacup without handle","order":3434,"tags":["beverage","cup","drink","tea","teacup"],"unicode":"🍵"},{"group":4,"hexcode":"1F376","label":"sake","order":3435,"tags":["bar","beverage","bottle","cup","drink"],"unicode":"🍶"},{"group":4,"hexcode":"1F37E","label":"bottle with popping cork","order":3436,"tags":["bar","bottle","cork","drink","popping"],"unicode":"🍾"},{"group":4,"hexcode":"1F377","label":"wine glass","order":3437,"tags":["bar","beverage","drink","glass","wine"],"unicode":"🍷"},{"group":4,"hexcode":"1F378","label":"cocktail glass","order":3438,"tags":["bar","cocktail","drink","glass"],"unicode":"🍸️"},{"group":4,"hexcode":"1F379","label":"tropical drink","order":3439,"tags":["bar","drink","tropical"],"unicode":"🍹"},{"group":4,"hexcode":"1F37A","label":"beer mug","order":3440,"tags":["bar","beer","drink","mug"],"unicode":"🍺"},{"group":4,"hexcode":"1F37B","label":"clinking beer mugs","order":3441,"tags":["bar","beer","clink","drink","mug"],"unicode":"🍻"},{"group":4,"hexcode":"1F942","label":"clinking glasses","order":3442,"tags":["celebrate","clink","drink","glass"],"unicode":"🥂"},{"group":4,"hexcode":"1F943","label":"tumbler glass","order":3443,"tags":["glass","liquor","shot","tumbler","whisky"],"unicode":"🥃"},{"group":4,"hexcode":"1FAD7","label":"pouring liquid","order":3444,"tags":["drink","empty","glass","spill"],"unicode":"🫗"},{"group":4,"hexcode":"1F964","label":"cup with straw","order":3445,"tags":["juice","soda"],"unicode":"🥤"},{"group":4,"hexcode":"1F9CB","label":"bubble tea","order":3446,"tags":["bubble","milk","pearl","tea"],"unicode":"🧋"},{"group":4,"hexcode":"1F9C3","label":"beverage box","order":3447,"tags":["beverage","box","juice","straw","sweet"],"unicode":"🧃"},{"group":4,"hexcode":"1F9C9","label":"mate","order":3448,"tags":["drink"],"unicode":"🧉"},{"group":4,"hexcode":"1F9CA","label":"ice","order":3449,"tags":["cold","ice cube","iceberg"],"unicode":"🧊"},{"group":4,"hexcode":"1F962","label":"chopsticks","order":3450,"tags":["hashi"],"unicode":"🥢"},{"group":4,"hexcode":"1F37D","label":"fork and knife with plate","order":3452,"tags":["cooking","fork","knife","plate"],"unicode":"🍽️"},{"group":4,"hexcode":"1F374","label":"fork and knife","order":3453,"tags":["cooking","cutlery","fork","knife"],"unicode":"🍴"},{"group":4,"hexcode":"1F944","label":"spoon","order":3454,"tags":["tableware"],"unicode":"🥄"},{"group":4,"hexcode":"1F52A","label":"kitchen knife","order":3455,"tags":["cooking","hocho","knife","tool","weapon"],"unicode":"🔪"},{"group":4,"hexcode":"1FAD9","label":"jar","order":3456,"tags":["condiment","container","empty","sauce","store"],"unicode":"🫙"},{"group":4,"hexcode":"1F3FA","label":"amphora","order":3457,"tags":["aquarius","cooking","drink","jug","zodiac"],"unicode":"🏺"},{"group":5,"hexcode":"1F30D","label":"globe showing Europe-Africa","order":3458,"tags":["africa","earth","europe","globe","globe showing europe-africa","world"],"unicode":"🌍️"},{"group":5,"hexcode":"1F30E","label":"globe showing Americas","order":3459,"tags":["americas","earth","globe","globe showing americas","world"],"unicode":"🌎️"},{"group":5,"hexcode":"1F30F","label":"globe showing Asia-Australia","order":3460,"tags":["asia","australia","earth","globe","globe showing asia-australia","world"],"unicode":"🌏️"},{"group":5,"hexcode":"1F310","label":"globe with meridians","order":3461,"tags":["earth","globe","meridians","world"],"unicode":"🌐"},{"group":5,"hexcode":"1F5FA","label":"world map","order":3463,"tags":["map","world"],"unicode":"🗺️"},{"group":5,"hexcode":"1F5FE","label":"map of Japan","order":3464,"tags":["japan","map","map of japan"],"unicode":"🗾"},{"group":5,"hexcode":"1F9ED","label":"compass","order":3465,"tags":["magnetic","navigation","orienteering"],"unicode":"🧭"},{"group":5,"hexcode":"1F3D4","label":"snow-capped mountain","order":3467,"tags":["cold","mountain","snow"],"unicode":"🏔️"},{"group":5,"hexcode":"26F0","label":"mountain","order":3469,"tags":["mountain"],"unicode":"⛰️"},{"group":5,"hexcode":"1F30B","label":"volcano","order":3470,"tags":["eruption","mountain"],"unicode":"🌋"},{"group":5,"hexcode":"1F5FB","label":"mount fuji","order":3471,"tags":["fuji","mountain"],"unicode":"🗻"},{"group":5,"hexcode":"1F3D5","label":"camping","order":3473,"tags":["camping"],"unicode":"🏕️"},{"group":5,"hexcode":"1F3D6","label":"beach with umbrella","order":3475,"tags":["beach","umbrella"],"unicode":"🏖️"},{"group":5,"hexcode":"1F3DC","label":"desert","order":3477,"tags":["desert"],"unicode":"🏜️"},{"group":5,"hexcode":"1F3DD","label":"desert island","order":3479,"tags":["desert","island"],"unicode":"🏝️"},{"group":5,"hexcode":"1F3DE","label":"national park","order":3481,"tags":["park"],"unicode":"🏞️"},{"group":5,"hexcode":"1F3DF","label":"stadium","order":3483,"tags":["stadium"],"unicode":"🏟️"},{"group":5,"hexcode":"1F3DB","label":"classical building","order":3485,"tags":["classical"],"unicode":"🏛️"},{"group":5,"hexcode":"1F3D7","label":"building construction","order":3487,"tags":["construction"],"unicode":"🏗️"},{"group":5,"hexcode":"1F9F1","label":"brick","order":3488,"tags":["bricks","clay","mortar","wall"],"unicode":"🧱"},{"group":5,"hexcode":"1FAA8","label":"rock","order":3489,"tags":["boulder","heavy","solid","stone"],"unicode":"🪨"},{"group":5,"hexcode":"1FAB5","label":"wood","order":3490,"tags":["log","lumber","timber"],"unicode":"🪵"},{"group":5,"hexcode":"1F6D6","label":"hut","order":3491,"tags":["house","roundhouse","yurt"],"unicode":"🛖"},{"group":5,"hexcode":"1F3D8","label":"houses","order":3493,"tags":["houses"],"unicode":"🏘️"},{"group":5,"hexcode":"1F3DA","label":"derelict house","order":3495,"tags":["derelict","house"],"unicode":"🏚️"},{"group":5,"hexcode":"1F3E0","label":"house","order":3496,"tags":["home"],"unicode":"🏠️"},{"group":5,"hexcode":"1F3E1","label":"house with garden","order":3497,"tags":["garden","home","house"],"unicode":"🏡"},{"group":5,"hexcode":"1F3E2","label":"office building","order":3498,"tags":["building"],"unicode":"🏢"},{"group":5,"hexcode":"1F3E3","label":"Japanese post office","order":3499,"tags":["japanese","japanese post office","post"],"unicode":"🏣"},{"group":5,"hexcode":"1F3E4","label":"post office","order":3500,"tags":["european","post"],"unicode":"🏤"},{"group":5,"hexcode":"1F3E5","label":"hospital","order":3501,"tags":["doctor","medicine"],"unicode":"🏥"},{"group":5,"hexcode":"1F3E6","label":"bank","order":3502,"tags":["building"],"unicode":"🏦"},{"group":5,"hexcode":"1F3E8","label":"hotel","order":3503,"tags":["building"],"unicode":"🏨"},{"group":5,"hexcode":"1F3E9","label":"love hotel","order":3504,"tags":["hotel","love"],"unicode":"🏩"},{"group":5,"hexcode":"1F3EA","label":"convenience store","order":3505,"tags":["convenience","store"],"unicode":"🏪"},{"group":5,"hexcode":"1F3EB","label":"school","order":3506,"tags":["building"],"unicode":"🏫"},{"group":5,"hexcode":"1F3EC","label":"department store","order":3507,"tags":["department","store"],"unicode":"🏬"},{"group":5,"hexcode":"1F3ED","label":"factory","order":3508,"tags":["building"],"unicode":"🏭️"},{"group":5,"hexcode":"1F3EF","label":"Japanese castle","order":3509,"tags":["castle","japanese"],"unicode":"🏯"},{"group":5,"hexcode":"1F3F0","label":"castle","order":3510,"tags":["european"],"unicode":"🏰"},{"group":5,"hexcode":"1F492","label":"wedding","order":3511,"tags":["chapel","romance"],"unicode":"💒"},{"group":5,"hexcode":"1F5FC","label":"Tokyo tower","order":3512,"tags":["tokyo","tower"],"unicode":"🗼"},{"group":5,"hexcode":"1F5FD","label":"Statue of Liberty","order":3513,"tags":["liberty","statue","statue of liberty"],"unicode":"🗽"},{"group":5,"hexcode":"26EA","label":"church","order":3514,"tags":["christian","cross","religion"],"unicode":"⛪️"},{"group":5,"hexcode":"1F54C","label":"mosque","order":3515,"tags":["islam","muslim","religion"],"unicode":"🕌"},{"group":5,"hexcode":"1F6D5","label":"hindu temple","order":3516,"tags":["hindu","temple"],"unicode":"🛕"},{"group":5,"hexcode":"1F54D","label":"synagogue","order":3517,"tags":["jew","jewish","religion","temple"],"unicode":"🕍"},{"group":5,"hexcode":"26E9","label":"shinto shrine","order":3519,"tags":["religion","shinto","shrine"],"unicode":"⛩️"},{"group":5,"hexcode":"1F54B","label":"kaaba","order":3520,"tags":["islam","muslim","religion"],"unicode":"🕋"},{"group":5,"hexcode":"26F2","label":"fountain","order":3521,"tags":["fountain"],"unicode":"⛲️"},{"group":5,"hexcode":"26FA","label":"tent","order":3522,"tags":["camping"],"unicode":"⛺️"},{"group":5,"hexcode":"1F301","label":"foggy","order":3523,"tags":["fog"],"unicode":"🌁"},{"group":5,"hexcode":"1F303","label":"night with stars","order":3524,"tags":["night","star"],"unicode":"🌃"},{"group":5,"hexcode":"1F3D9","label":"cityscape","order":3526,"tags":["city"],"unicode":"🏙️"},{"group":5,"hexcode":"1F304","label":"sunrise over mountains","order":3527,"tags":["morning","mountain","sun","sunrise"],"unicode":"🌄"},{"group":5,"hexcode":"1F305","label":"sunrise","order":3528,"tags":["morning","sun"],"unicode":"🌅"},{"group":5,"hexcode":"1F306","label":"cityscape at dusk","order":3529,"tags":["city","dusk","evening","landscape","sunset"],"unicode":"🌆"},{"group":5,"hexcode":"1F307","label":"sunset","order":3530,"tags":["dusk","sun"],"unicode":"🌇"},{"group":5,"hexcode":"1F309","label":"bridge at night","order":3531,"tags":["bridge","night"],"unicode":"🌉"},{"group":5,"hexcode":"2668","label":"hot springs","order":3533,"tags":["hot","hotsprings","springs","steaming"],"unicode":"♨️"},{"group":5,"hexcode":"1F3A0","label":"carousel horse","order":3534,"tags":["carousel","horse"],"unicode":"🎠"},{"group":5,"hexcode":"1F6DD","label":"playground slide","order":3535,"tags":["amusement park","play"],"unicode":"🛝"},{"group":5,"hexcode":"1F3A1","label":"ferris wheel","order":3536,"tags":["amusement park","ferris","wheel"],"unicode":"🎡"},{"group":5,"hexcode":"1F3A2","label":"roller coaster","order":3537,"tags":["amusement park","coaster","roller"],"unicode":"🎢"},{"group":5,"hexcode":"1F488","label":"barber pole","order":3538,"tags":["barber","haircut","pole"],"unicode":"💈"},{"group":5,"hexcode":"1F3AA","label":"circus tent","order":3539,"tags":["circus","tent"],"unicode":"🎪"},{"group":5,"hexcode":"1F682","label":"locomotive","order":3540,"tags":["engine","railway","steam","train"],"unicode":"🚂"},{"group":5,"hexcode":"1F683","label":"railway car","order":3541,"tags":["car","electric","railway","train","tram","trolleybus"],"unicode":"🚃"},{"group":5,"hexcode":"1F684","label":"high-speed train","order":3542,"tags":["railway","shinkansen","speed","train"],"unicode":"🚄"},{"group":5,"hexcode":"1F685","label":"bullet train","order":3543,"tags":["bullet","railway","shinkansen","speed","train"],"unicode":"🚅"},{"group":5,"hexcode":"1F686","label":"train","order":3544,"tags":["railway"],"unicode":"🚆"},{"group":5,"hexcode":"1F687","label":"metro","order":3545,"tags":["subway"],"unicode":"🚇️"},{"group":5,"hexcode":"1F688","label":"light rail","order":3546,"tags":["railway"],"unicode":"🚈"},{"group":5,"hexcode":"1F689","label":"station","order":3547,"tags":["railway","train"],"unicode":"🚉"},{"group":5,"hexcode":"1F68A","label":"tram","order":3548,"tags":["trolleybus"],"unicode":"🚊"},{"group":5,"hexcode":"1F69D","label":"monorail","order":3549,"tags":["vehicle"],"unicode":"🚝"},{"group":5,"hexcode":"1F69E","label":"mountain railway","order":3550,"tags":["car","mountain","railway"],"unicode":"🚞"},{"group":5,"hexcode":"1F68B","label":"tram car","order":3551,"tags":["car","tram","trolleybus"],"unicode":"🚋"},{"group":5,"hexcode":"1F68C","label":"bus","order":3552,"tags":["vehicle"],"unicode":"🚌"},{"group":5,"hexcode":"1F68D","label":"oncoming bus","order":3553,"tags":["bus","oncoming"],"unicode":"🚍️"},{"group":5,"hexcode":"1F68E","label":"trolleybus","order":3554,"tags":["bus","tram","trolley"],"unicode":"🚎"},{"group":5,"hexcode":"1F690","label":"minibus","order":3555,"tags":["bus"],"unicode":"🚐"},{"group":5,"hexcode":"1F691","label":"ambulance","order":3556,"tags":["vehicle"],"unicode":"🚑️"},{"group":5,"hexcode":"1F692","label":"fire engine","order":3557,"tags":["engine","fire","truck"],"unicode":"🚒"},{"group":5,"hexcode":"1F693","label":"police car","order":3558,"tags":["car","patrol","police"],"unicode":"🚓"},{"group":5,"hexcode":"1F694","label":"oncoming police car","order":3559,"tags":["car","oncoming","police"],"unicode":"🚔️"},{"group":5,"hexcode":"1F695","label":"taxi","order":3560,"tags":["vehicle"],"unicode":"🚕"},{"group":5,"hexcode":"1F696","label":"oncoming taxi","order":3561,"tags":["oncoming","taxi"],"unicode":"🚖"},{"group":5,"hexcode":"1F697","label":"automobile","order":3562,"tags":["car"],"unicode":"🚗"},{"group":5,"hexcode":"1F698","label":"oncoming automobile","order":3563,"tags":["automobile","car","oncoming"],"unicode":"🚘️"},{"group":5,"hexcode":"1F699","label":"sport utility vehicle","order":3564,"tags":["recreational","sport utility"],"unicode":"🚙"},{"group":5,"hexcode":"1F6FB","label":"pickup truck","order":3565,"tags":["pick-up","pickup","truck"],"unicode":"🛻"},{"group":5,"hexcode":"1F69A","label":"delivery truck","order":3566,"tags":["delivery","truck"],"unicode":"🚚"},{"group":5,"hexcode":"1F69B","label":"articulated lorry","order":3567,"tags":["lorry","semi","truck"],"unicode":"🚛"},{"group":5,"hexcode":"1F69C","label":"tractor","order":3568,"tags":["vehicle"],"unicode":"🚜"},{"group":5,"hexcode":"1F3CE","label":"racing car","order":3570,"tags":["car","racing"],"unicode":"🏎️"},{"group":5,"hexcode":"1F3CD","label":"motorcycle","order":3572,"tags":["racing"],"unicode":"🏍️"},{"group":5,"hexcode":"1F6F5","label":"motor scooter","order":3573,"tags":["motor","scooter"],"unicode":"🛵"},{"group":5,"hexcode":"1F9BD","label":"manual wheelchair","order":3574,"tags":["accessibility"],"unicode":"🦽"},{"group":5,"hexcode":"1F9BC","label":"motorized wheelchair","order":3575,"tags":["accessibility"],"unicode":"🦼"},{"group":5,"hexcode":"1F6FA","label":"auto rickshaw","order":3576,"tags":["tuk tuk"],"unicode":"🛺"},{"group":5,"hexcode":"1F6B2","label":"bicycle","order":3577,"tags":["bike"],"unicode":"🚲️"},{"group":5,"hexcode":"1F6F4","label":"kick scooter","order":3578,"tags":["kick","scooter"],"unicode":"🛴"},{"group":5,"hexcode":"1F6F9","label":"skateboard","order":3579,"tags":["board"],"unicode":"🛹"},{"group":5,"hexcode":"1F6FC","label":"roller skate","order":3580,"tags":["roller","skate"],"unicode":"🛼"},{"group":5,"hexcode":"1F68F","label":"bus stop","order":3581,"tags":["bus","stop"],"unicode":"🚏"},{"group":5,"hexcode":"1F6E3","label":"motorway","order":3583,"tags":["highway","road"],"unicode":"🛣️"},{"group":5,"hexcode":"1F6E4","label":"railway track","order":3585,"tags":["railway","train"],"unicode":"🛤️"},{"group":5,"hexcode":"1F6E2","label":"oil drum","order":3587,"tags":["drum","oil"],"unicode":"🛢️"},{"group":5,"hexcode":"26FD","label":"fuel pump","order":3588,"tags":["diesel","fuel","fuelpump","gas","pump","station"],"unicode":"⛽️"},{"group":5,"hexcode":"1F6DE","label":"wheel","order":3589,"tags":["circle","tire","turn"],"unicode":"🛞"},{"group":5,"hexcode":"1F6A8","label":"police car light","order":3590,"tags":["beacon","car","light","police","revolving"],"unicode":"🚨"},{"group":5,"hexcode":"1F6A5","label":"horizontal traffic light","order":3591,"tags":["light","signal","traffic"],"unicode":"🚥"},{"group":5,"hexcode":"1F6A6","label":"vertical traffic light","order":3592,"tags":["light","signal","traffic"],"unicode":"🚦"},{"group":5,"hexcode":"1F6D1","label":"stop sign","order":3593,"tags":["octagonal","sign","stop"],"unicode":"🛑"},{"group":5,"hexcode":"1F6A7","label":"construction","order":3594,"tags":["barrier"],"unicode":"🚧"},{"group":5,"hexcode":"2693","label":"anchor","order":3595,"tags":["ship","tool"],"unicode":"⚓️"},{"group":5,"hexcode":"1F6DF","label":"ring buoy","order":3596,"tags":["float","life preserver","life saver","rescue","safety"],"unicode":"🛟"},{"group":5,"hexcode":"26F5","label":"sailboat","order":3597,"tags":["boat","resort","sea","yacht"],"unicode":"⛵️"},{"group":5,"hexcode":"1F6F6","label":"canoe","order":3598,"tags":["boat"],"unicode":"🛶"},{"group":5,"hexcode":"1F6A4","label":"speedboat","order":3599,"tags":["boat"],"unicode":"🚤"},{"group":5,"hexcode":"1F6F3","label":"passenger ship","order":3601,"tags":["passenger","ship"],"unicode":"🛳️"},{"group":5,"hexcode":"26F4","label":"ferry","order":3603,"tags":["boat","passenger"],"unicode":"⛴️"},{"group":5,"hexcode":"1F6E5","label":"motor boat","order":3605,"tags":["boat","motorboat"],"unicode":"🛥️"},{"group":5,"hexcode":"1F6A2","label":"ship","order":3606,"tags":["boat","passenger"],"unicode":"🚢"},{"group":5,"hexcode":"2708","label":"airplane","order":3608,"tags":["aeroplane"],"unicode":"✈️"},{"group":5,"hexcode":"1F6E9","label":"small airplane","order":3610,"tags":["aeroplane","airplane"],"unicode":"🛩️"},{"group":5,"hexcode":"1F6EB","label":"airplane departure","order":3611,"tags":["aeroplane","airplane","check-in","departure","departures"],"unicode":"🛫"},{"group":5,"hexcode":"1F6EC","label":"airplane arrival","order":3612,"tags":["aeroplane","airplane","arrivals","arriving","landing"],"unicode":"🛬"},{"group":5,"hexcode":"1FA82","label":"parachute","order":3613,"tags":["hang-glide","parasail","skydive"],"unicode":"🪂"},{"group":5,"hexcode":"1F4BA","label":"seat","order":3614,"tags":["chair"],"unicode":"💺"},{"group":5,"hexcode":"1F681","label":"helicopter","order":3615,"tags":["vehicle"],"unicode":"🚁"},{"group":5,"hexcode":"1F69F","label":"suspension railway","order":3616,"tags":["railway","suspension"],"unicode":"🚟"},{"group":5,"hexcode":"1F6A0","label":"mountain cableway","order":3617,"tags":["cable","gondola","mountain"],"unicode":"🚠"},{"group":5,"hexcode":"1F6A1","label":"aerial tramway","order":3618,"tags":["aerial","cable","car","gondola","tramway"],"unicode":"🚡"},{"group":5,"hexcode":"1F6F0","label":"satellite","order":3620,"tags":["space"],"unicode":"🛰️"},{"group":5,"hexcode":"1F680","label":"rocket","order":3621,"tags":["space"],"unicode":"🚀"},{"group":5,"hexcode":"1F6F8","label":"flying saucer","order":3622,"tags":["ufo"],"unicode":"🛸"},{"group":5,"hexcode":"1F6CE","label":"bellhop bell","order":3624,"tags":["bell","bellhop","hotel"],"unicode":"🛎️"},{"group":5,"hexcode":"1F9F3","label":"luggage","order":3625,"tags":["packing","travel"],"unicode":"🧳"},{"group":5,"hexcode":"231B","label":"hourglass done","order":3626,"tags":["sand","timer"],"unicode":"⌛️"},{"group":5,"hexcode":"23F3","label":"hourglass not done","order":3627,"tags":["hourglass","sand","timer"],"unicode":"⏳️"},{"group":5,"hexcode":"231A","label":"watch","order":3628,"tags":["clock"],"unicode":"⌚️"},{"group":5,"hexcode":"23F0","label":"alarm clock","order":3629,"tags":["alarm","clock"],"unicode":"⏰"},{"group":5,"hexcode":"23F1","label":"stopwatch","order":3631,"tags":["clock"],"unicode":"⏱️"},{"group":5,"hexcode":"23F2","label":"timer clock","order":3633,"tags":["clock","timer"],"unicode":"⏲️"},{"group":5,"hexcode":"1F570","label":"mantelpiece clock","order":3635,"tags":["clock"],"unicode":"🕰️"},{"group":5,"hexcode":"1F55B","label":"twelve o’clock","order":3636,"tags":["00","12","12:00","clock","o’clock","twelve"],"unicode":"🕛️"},{"group":5,"hexcode":"1F567","label":"twelve-thirty","order":3637,"tags":["12","12:30","clock","thirty","twelve"],"unicode":"🕧️"},{"group":5,"hexcode":"1F550","label":"one o’clock","order":3638,"tags":["00","1","1:00","clock","one","o’clock"],"unicode":"🕐️"},{"group":5,"hexcode":"1F55C","label":"one-thirty","order":3639,"tags":["1","1:30","clock","one","thirty"],"unicode":"🕜️"},{"group":5,"hexcode":"1F551","label":"two o’clock","order":3640,"tags":["00","2","2:00","clock","o’clock","two"],"unicode":"🕑️"},{"group":5,"hexcode":"1F55D","label":"two-thirty","order":3641,"tags":["2","2:30","clock","thirty","two"],"unicode":"🕝️"},{"group":5,"hexcode":"1F552","label":"three o’clock","order":3642,"tags":["00","3","3:00","clock","o’clock","three"],"unicode":"🕒️"},{"group":5,"hexcode":"1F55E","label":"three-thirty","order":3643,"tags":["3","3:30","clock","thirty","three"],"unicode":"🕞️"},{"group":5,"hexcode":"1F553","label":"four o’clock","order":3644,"tags":["00","4","4:00","clock","four","o’clock"],"unicode":"🕓️"},{"group":5,"hexcode":"1F55F","label":"four-thirty","order":3645,"tags":["4","4:30","clock","four","thirty"],"unicode":"🕟️"},{"group":5,"hexcode":"1F554","label":"five o’clock","order":3646,"tags":["00","5","5:00","clock","five","o’clock"],"unicode":"🕔️"},{"group":5,"hexcode":"1F560","label":"five-thirty","order":3647,"tags":["5","5:30","clock","five","thirty"],"unicode":"🕠️"},{"group":5,"hexcode":"1F555","label":"six o’clock","order":3648,"tags":["00","6","6:00","clock","o’clock","six"],"unicode":"🕕️"},{"group":5,"hexcode":"1F561","label":"six-thirty","order":3649,"tags":["6","6:30","clock","six","thirty"],"unicode":"🕡️"},{"group":5,"hexcode":"1F556","label":"seven o’clock","order":3650,"tags":["00","7","7:00","clock","o’clock","seven"],"unicode":"🕖️"},{"group":5,"hexcode":"1F562","label":"seven-thirty","order":3651,"tags":["7","7:30","clock","seven","thirty"],"unicode":"🕢️"},{"group":5,"hexcode":"1F557","label":"eight o’clock","order":3652,"tags":["00","8","8:00","clock","eight","o’clock"],"unicode":"🕗️"},{"group":5,"hexcode":"1F563","label":"eight-thirty","order":3653,"tags":["8","8:30","clock","eight","thirty"],"unicode":"🕣️"},{"group":5,"hexcode":"1F558","label":"nine o’clock","order":3654,"tags":["00","9","9:00","clock","nine","o’clock"],"unicode":"🕘️"},{"group":5,"hexcode":"1F564","label":"nine-thirty","order":3655,"tags":["9","9:30","clock","nine","thirty"],"unicode":"🕤️"},{"group":5,"hexcode":"1F559","label":"ten o’clock","order":3656,"tags":["00","10","10:00","clock","o’clock","ten"],"unicode":"🕙️"},{"group":5,"hexcode":"1F565","label":"ten-thirty","order":3657,"tags":["10","10:30","clock","ten","thirty"],"unicode":"🕥️"},{"group":5,"hexcode":"1F55A","label":"eleven o’clock","order":3658,"tags":["00","11","11:00","clock","eleven","o’clock"],"unicode":"🕚️"},{"group":5,"hexcode":"1F566","label":"eleven-thirty","order":3659,"tags":["11","11:30","clock","eleven","thirty"],"unicode":"🕦️"},{"group":5,"hexcode":"1F311","label":"new moon","order":3660,"tags":["dark","moon"],"unicode":"🌑"},{"group":5,"hexcode":"1F312","label":"waxing crescent moon","order":3661,"tags":["crescent","moon","waxing"],"unicode":"🌒"},{"group":5,"hexcode":"1F313","label":"first quarter moon","order":3662,"tags":["moon","quarter"],"unicode":"🌓"},{"group":5,"hexcode":"1F314","label":"waxing gibbous moon","order":3663,"tags":["gibbous","moon","waxing"],"unicode":"🌔"},{"group":5,"hexcode":"1F315","label":"full moon","order":3664,"tags":["full","moon"],"unicode":"🌕️"},{"group":5,"hexcode":"1F316","label":"waning gibbous moon","order":3665,"tags":["gibbous","moon","waning"],"unicode":"🌖"},{"group":5,"hexcode":"1F317","label":"last quarter moon","order":3666,"tags":["moon","quarter"],"unicode":"🌗"},{"group":5,"hexcode":"1F318","label":"waning crescent moon","order":3667,"tags":["crescent","moon","waning"],"unicode":"🌘"},{"group":5,"hexcode":"1F319","label":"crescent moon","order":3668,"tags":["crescent","moon"],"unicode":"🌙"},{"group":5,"hexcode":"1F31A","label":"new moon face","order":3669,"tags":["face","moon"],"unicode":"🌚"},{"group":5,"hexcode":"1F31B","label":"first quarter moon face","order":3670,"tags":["face","moon","quarter"],"unicode":"🌛"},{"group":5,"hexcode":"1F31C","label":"last quarter moon face","order":3671,"tags":["face","moon","quarter"],"unicode":"🌜️"},{"group":5,"hexcode":"1F321","label":"thermometer","order":3673,"tags":["weather"],"unicode":"🌡️"},{"group":5,"hexcode":"2600","label":"sun","order":3675,"tags":["bright","rays","sunny"],"unicode":"☀️"},{"group":5,"hexcode":"1F31D","label":"full moon face","order":3676,"tags":["bright","face","full","moon"],"unicode":"🌝"},{"group":5,"hexcode":"1F31E","label":"sun with face","order":3677,"tags":["bright","face","sun"],"unicode":"🌞"},{"group":5,"hexcode":"1FA90","label":"ringed planet","order":3678,"tags":["saturn","saturnine"],"unicode":"🪐"},{"group":5,"hexcode":"2B50","label":"star","order":3679,"tags":["star"],"unicode":"⭐️"},{"group":5,"hexcode":"1F31F","label":"glowing star","order":3680,"tags":["glittery","glow","shining","sparkle","star"],"unicode":"🌟"},{"group":5,"hexcode":"1F320","label":"shooting star","order":3681,"tags":["falling","shooting","star"],"unicode":"🌠"},{"group":5,"hexcode":"1F30C","label":"milky way","order":3682,"tags":["space"],"unicode":"🌌"},{"group":5,"hexcode":"2601","label":"cloud","order":3684,"tags":["weather"],"unicode":"☁️"},{"group":5,"hexcode":"26C5","label":"sun behind cloud","order":3685,"tags":["cloud","sun"],"unicode":"⛅️"},{"group":5,"hexcode":"26C8","label":"cloud with lightning and rain","order":3687,"tags":["cloud","rain","thunder"],"unicode":"⛈️"},{"group":5,"hexcode":"1F324","label":"sun behind small cloud","order":3689,"tags":["cloud","sun"],"unicode":"🌤️"},{"group":5,"hexcode":"1F325","label":"sun behind large cloud","order":3691,"tags":["cloud","sun"],"unicode":"🌥️"},{"group":5,"hexcode":"1F326","label":"sun behind rain cloud","order":3693,"tags":["cloud","rain","sun"],"unicode":"🌦️"},{"group":5,"hexcode":"1F327","label":"cloud with rain","order":3695,"tags":["cloud","rain"],"unicode":"🌧️"},{"group":5,"hexcode":"1F328","label":"cloud with snow","order":3697,"tags":["cloud","cold","snow"],"unicode":"🌨️"},{"group":5,"hexcode":"1F329","label":"cloud with lightning","order":3699,"tags":["cloud","lightning"],"unicode":"🌩️"},{"group":5,"hexcode":"1F32A","label":"tornado","order":3701,"tags":["cloud","whirlwind"],"unicode":"🌪️"},{"group":5,"hexcode":"1F32B","label":"fog","order":3703,"tags":["cloud"],"unicode":"🌫️"},{"group":5,"hexcode":"1F32C","label":"wind face","order":3705,"tags":["blow","cloud","face","wind"],"unicode":"🌬️"},{"group":5,"hexcode":"1F300","label":"cyclone","order":3706,"tags":["dizzy","hurricane","twister","typhoon"],"unicode":"🌀"},{"group":5,"hexcode":"1F308","label":"rainbow","order":3707,"tags":["rain"],"unicode":"🌈"},{"group":5,"hexcode":"1F302","label":"closed umbrella","order":3708,"tags":["clothing","rain","umbrella"],"unicode":"🌂"},{"group":5,"hexcode":"2602","label":"umbrella","order":3710,"tags":["clothing","rain"],"unicode":"☂️"},{"group":5,"hexcode":"2614","label":"umbrella with rain drops","order":3711,"tags":["clothing","drop","rain","umbrella"],"unicode":"☔️"},{"group":5,"hexcode":"26F1","label":"umbrella on ground","order":3713,"tags":["rain","sun","umbrella"],"unicode":"⛱️"},{"group":5,"hexcode":"26A1","label":"high voltage","order":3714,"tags":["danger","electric","lightning","voltage","zap"],"unicode":"⚡️"},{"group":5,"hexcode":"2744","label":"snowflake","order":3716,"tags":["cold","snow"],"unicode":"❄️"},{"group":5,"hexcode":"2603","label":"snowman","order":3718,"tags":["cold","snow"],"unicode":"☃️"},{"group":5,"hexcode":"26C4","label":"snowman without snow","order":3719,"tags":["cold","snow","snowman"],"unicode":"⛄️"},{"group":5,"hexcode":"2604","label":"comet","order":3721,"tags":["space"],"unicode":"☄️"},{"group":5,"hexcode":"1F525","label":"fire","order":3722,"tags":["flame","tool"],"unicode":"🔥"},{"group":5,"hexcode":"1F4A7","label":"droplet","order":3723,"tags":["cold","comic","drop","sweat"],"unicode":"💧"},{"group":5,"hexcode":"1F30A","label":"water wave","order":3724,"tags":["ocean","water","wave"],"unicode":"🌊"},{"group":6,"hexcode":"1F383","label":"jack-o-lantern","order":3725,"tags":["celebration","halloween","jack","lantern"],"unicode":"🎃"},{"group":6,"hexcode":"1F384","label":"Christmas tree","order":3726,"tags":["celebration","christmas","tree"],"unicode":"🎄"},{"group":6,"hexcode":"1F386","label":"fireworks","order":3727,"tags":["celebration"],"unicode":"🎆"},{"group":6,"hexcode":"1F387","label":"sparkler","order":3728,"tags":["celebration","fireworks","sparkle"],"unicode":"🎇"},{"group":6,"hexcode":"1F9E8","label":"firecracker","order":3729,"tags":["dynamite","explosive","fireworks"],"unicode":"🧨"},{"group":6,"hexcode":"2728","label":"sparkles","order":3730,"tags":["*","sparkle","star"],"unicode":"✨"},{"group":6,"hexcode":"1F388","label":"balloon","order":3731,"tags":["celebration"],"unicode":"🎈"},{"group":6,"hexcode":"1F389","label":"party popper","order":3732,"tags":["celebration","party","popper","tada"],"unicode":"🎉"},{"group":6,"hexcode":"1F38A","label":"confetti ball","order":3733,"tags":["ball","celebration","confetti"],"unicode":"🎊"},{"group":6,"hexcode":"1F38B","label":"tanabata tree","order":3734,"tags":["banner","celebration","japanese","tree"],"unicode":"🎋"},{"group":6,"hexcode":"1F38D","label":"pine decoration","order":3735,"tags":["bamboo","celebration","japanese","pine"],"unicode":"🎍"},{"group":6,"hexcode":"1F38E","label":"Japanese dolls","order":3736,"tags":["celebration","doll","festival","japanese","japanese dolls"],"unicode":"🎎"},{"group":6,"hexcode":"1F38F","label":"carp streamer","order":3737,"tags":["carp","celebration","streamer"],"unicode":"🎏"},{"group":6,"hexcode":"1F390","label":"wind chime","order":3738,"tags":["bell","celebration","chime","wind"],"unicode":"🎐"},{"group":6,"hexcode":"1F391","label":"moon viewing ceremony","order":3739,"tags":["celebration","ceremony","moon"],"unicode":"🎑"},{"group":6,"hexcode":"1F9E7","label":"red envelope","order":3740,"tags":["gift","good luck","hóngbāo","lai see","money"],"unicode":"🧧"},{"group":6,"hexcode":"1F380","label":"ribbon","order":3741,"tags":["celebration"],"unicode":"🎀"},{"group":6,"hexcode":"1F381","label":"wrapped gift","order":3742,"tags":["box","celebration","gift","present","wrapped"],"unicode":"🎁"},{"group":6,"hexcode":"1F397","label":"reminder ribbon","order":3744,"tags":["celebration","reminder","ribbon"],"unicode":"🎗️"},{"group":6,"hexcode":"1F39F","label":"admission tickets","order":3746,"tags":["admission","ticket"],"unicode":"🎟️"},{"group":6,"hexcode":"1F3AB","label":"ticket","order":3747,"tags":["admission"],"unicode":"🎫"},{"group":6,"hexcode":"1F396","label":"military medal","order":3749,"tags":["celebration","medal","military"],"unicode":"🎖️"},{"group":6,"hexcode":"1F3C6","label":"trophy","order":3750,"tags":["prize"],"unicode":"🏆️"},{"group":6,"hexcode":"1F3C5","label":"sports medal","order":3751,"tags":["medal"],"unicode":"🏅"},{"group":6,"hexcode":"1F947","label":"1st place medal","order":3752,"tags":["first","gold","medal"],"unicode":"🥇"},{"group":6,"hexcode":"1F948","label":"2nd place medal","order":3753,"tags":["medal","second","silver"],"unicode":"🥈"},{"group":6,"hexcode":"1F949","label":"3rd place medal","order":3754,"tags":["bronze","medal","third"],"unicode":"🥉"},{"group":6,"hexcode":"26BD","label":"soccer ball","order":3755,"tags":["ball","football","soccer"],"unicode":"⚽️"},{"group":6,"hexcode":"26BE","label":"baseball","order":3756,"tags":["ball"],"unicode":"⚾️"},{"group":6,"hexcode":"1F94E","label":"softball","order":3757,"tags":["ball","glove","underarm"],"unicode":"🥎"},{"group":6,"hexcode":"1F3C0","label":"basketball","order":3758,"tags":["ball","hoop"],"unicode":"🏀"},{"group":6,"hexcode":"1F3D0","label":"volleyball","order":3759,"tags":["ball","game"],"unicode":"🏐"},{"group":6,"hexcode":"1F3C8","label":"american football","order":3760,"tags":["american","ball","football"],"unicode":"🏈"},{"group":6,"hexcode":"1F3C9","label":"rugby football","order":3761,"tags":["ball","football","rugby"],"unicode":"🏉"},{"group":6,"hexcode":"1F3BE","label":"tennis","order":3762,"tags":["ball","racquet"],"unicode":"🎾"},{"group":6,"hexcode":"1F94F","label":"flying disc","order":3763,"tags":["ultimate"],"unicode":"🥏"},{"group":6,"hexcode":"1F3B3","label":"bowling","order":3764,"tags":["ball","game"],"unicode":"🎳"},{"group":6,"hexcode":"1F3CF","label":"cricket game","order":3765,"tags":["ball","bat","game"],"unicode":"🏏"},{"group":6,"hexcode":"1F3D1","label":"field hockey","order":3766,"tags":["ball","field","game","hockey","stick"],"unicode":"🏑"},{"group":6,"hexcode":"1F3D2","label":"ice hockey","order":3767,"tags":["game","hockey","ice","puck","stick"],"unicode":"🏒"},{"group":6,"hexcode":"1F94D","label":"lacrosse","order":3768,"tags":["ball","goal","stick"],"unicode":"🥍"},{"group":6,"hexcode":"1F3D3","label":"ping pong","order":3769,"tags":["ball","bat","game","paddle","table tennis"],"unicode":"🏓"},{"group":6,"hexcode":"1F3F8","label":"badminton","order":3770,"tags":["birdie","game","racquet","shuttlecock"],"unicode":"🏸"},{"group":6,"hexcode":"1F94A","label":"boxing glove","order":3771,"tags":["boxing","glove"],"unicode":"🥊"},{"group":6,"hexcode":"1F94B","label":"martial arts uniform","order":3772,"tags":["judo","karate","martial arts","taekwondo","uniform"],"unicode":"🥋"},{"group":6,"hexcode":"1F945","label":"goal net","order":3773,"tags":["goal","net"],"unicode":"🥅"},{"group":6,"hexcode":"26F3","label":"flag in hole","order":3774,"tags":["golf","hole"],"unicode":"⛳️"},{"group":6,"hexcode":"26F8","label":"ice skate","order":3776,"tags":["ice","skate"],"unicode":"⛸️"},{"group":6,"hexcode":"1F3A3","label":"fishing pole","order":3777,"tags":["fish","pole"],"unicode":"🎣"},{"group":6,"hexcode":"1F93F","label":"diving mask","order":3778,"tags":["diving","scuba","snorkeling"],"unicode":"🤿"},{"group":6,"hexcode":"1F3BD","label":"running shirt","order":3779,"tags":["athletics","running","sash","shirt"],"unicode":"🎽"},{"group":6,"hexcode":"1F3BF","label":"skis","order":3780,"tags":["ski","snow"],"unicode":"🎿"},{"group":6,"hexcode":"1F6F7","label":"sled","order":3781,"tags":["sledge","sleigh"],"unicode":"🛷"},{"group":6,"hexcode":"1F94C","label":"curling stone","order":3782,"tags":["game","rock"],"unicode":"🥌"},{"group":6,"hexcode":"1F3AF","label":"bullseye","order":3783,"tags":["dart","direct hit","game","hit","target"],"unicode":"🎯"},{"group":6,"hexcode":"1FA80","label":"yo-yo","order":3784,"tags":["fluctuate","toy"],"unicode":"🪀"},{"group":6,"hexcode":"1FA81","label":"kite","order":3785,"tags":["fly","soar"],"unicode":"🪁"},{"group":6,"hexcode":"1F3B1","label":"pool 8 ball","order":3786,"tags":["8","ball","billiard","eight","game"],"unicode":"🎱"},{"group":6,"hexcode":"1F52E","label":"crystal ball","order":3787,"tags":["ball","crystal","fairy tale","fantasy","fortune","tool"],"unicode":"🔮"},{"group":6,"hexcode":"1FA84","label":"magic wand","order":3788,"tags":["magic","witch","wizard"],"unicode":"🪄"},{"group":6,"hexcode":"1F9FF","label":"nazar amulet","order":3789,"tags":["bead","charm","evil-eye","nazar","talisman"],"unicode":"🧿"},{"group":6,"hexcode":"1FAAC","label":"hamsa","order":3790,"tags":["amulet","fatima","hand","mary","miriam","protection"],"unicode":"🪬"},{"group":6,"hexcode":"1F3AE","label":"video game","order":3791,"tags":["controller","game"],"unicode":"🎮️"},{"group":6,"hexcode":"1F579","label":"joystick","order":3793,"tags":["game","video game"],"unicode":"🕹️"},{"group":6,"hexcode":"1F3B0","label":"slot machine","order":3794,"tags":["game","slot"],"unicode":"🎰"},{"group":6,"hexcode":"1F3B2","label":"game die","order":3795,"tags":["dice","die","game"],"unicode":"🎲"},{"group":6,"hexcode":"1F9E9","label":"puzzle piece","order":3796,"tags":["clue","interlocking","jigsaw","piece","puzzle"],"unicode":"🧩"},{"group":6,"hexcode":"1F9F8","label":"teddy bear","order":3797,"tags":["plaything","plush","stuffed","toy"],"unicode":"🧸"},{"group":6,"hexcode":"1FA85","label":"piñata","order":3798,"tags":["celebration","party"],"unicode":"🪅"},{"group":6,"hexcode":"1FAA9","label":"mirror ball","order":3799,"tags":["dance","disco","glitter","party"],"unicode":"🪩"},{"group":6,"hexcode":"1FA86","label":"nesting dolls","order":3800,"tags":["doll","nesting","russia"],"unicode":"🪆"},{"group":6,"hexcode":"2660","label":"spade suit","order":3802,"tags":["card","game"],"unicode":"♠️"},{"group":6,"hexcode":"2665","label":"heart suit","order":3804,"tags":["card","game"],"unicode":"♥️"},{"group":6,"hexcode":"2666","label":"diamond suit","order":3806,"tags":["card","game"],"unicode":"♦️"},{"group":6,"hexcode":"2663","label":"club suit","order":3808,"tags":["card","game"],"unicode":"♣️"},{"group":6,"hexcode":"265F","label":"chess pawn","order":3810,"tags":["chess","dupe","expendable"],"unicode":"♟️"},{"group":6,"hexcode":"1F0CF","label":"joker","order":3811,"tags":["card","game","wildcard"],"unicode":"🃏"},{"group":6,"hexcode":"1F004","label":"mahjong red dragon","order":3812,"tags":["game","mahjong","red"],"unicode":"🀄️"},{"group":6,"hexcode":"1F3B4","label":"flower playing cards","order":3813,"tags":["card","flower","game","japanese","playing"],"unicode":"🎴"},{"group":6,"hexcode":"1F3AD","label":"performing arts","order":3814,"tags":["art","mask","performing","theater","theatre"],"unicode":"🎭️"},{"group":6,"hexcode":"1F5BC","label":"framed picture","order":3816,"tags":["art","frame","museum","painting","picture"],"unicode":"🖼️"},{"group":6,"hexcode":"1F3A8","label":"artist palette","order":3817,"tags":["art","museum","painting","palette"],"unicode":"🎨"},{"group":6,"hexcode":"1F9F5","label":"thread","order":3818,"tags":["needle","sewing","spool","string"],"unicode":"🧵"},{"group":6,"hexcode":"1FAA1","label":"sewing needle","order":3819,"tags":["embroidery","needle","sewing","stitches","sutures","tailoring"],"unicode":"🪡"},{"group":6,"hexcode":"1F9F6","label":"yarn","order":3820,"tags":["ball","crochet","knit"],"unicode":"🧶"},{"group":6,"hexcode":"1FAA2","label":"knot","order":3821,"tags":["rope","tangled","tie","twine","twist"],"unicode":"🪢"},{"group":7,"hexcode":"1F453","label":"glasses","order":3822,"tags":["clothing","eye","eyeglasses","eyewear"],"unicode":"👓️"},{"group":7,"hexcode":"1F576","label":"sunglasses","order":3824,"tags":["dark","eye","eyewear","glasses"],"unicode":"🕶️"},{"group":7,"hexcode":"1F97D","label":"goggles","order":3825,"tags":["eye protection","swimming","welding"],"unicode":"🥽"},{"group":7,"hexcode":"1F97C","label":"lab coat","order":3826,"tags":["doctor","experiment","scientist"],"unicode":"🥼"},{"group":7,"hexcode":"1F9BA","label":"safety vest","order":3827,"tags":["emergency","safety","vest"],"unicode":"🦺"},{"group":7,"hexcode":"1F454","label":"necktie","order":3828,"tags":["clothing","tie"],"unicode":"👔"},{"group":7,"hexcode":"1F455","label":"t-shirt","order":3829,"tags":["clothing","shirt","tshirt"],"unicode":"👕"},{"group":7,"hexcode":"1F456","label":"jeans","order":3830,"tags":["clothing","pants","trousers"],"unicode":"👖"},{"group":7,"hexcode":"1F9E3","label":"scarf","order":3831,"tags":["neck"],"unicode":"🧣"},{"group":7,"hexcode":"1F9E4","label":"gloves","order":3832,"tags":["hand"],"unicode":"🧤"},{"group":7,"hexcode":"1F9E5","label":"coat","order":3833,"tags":["jacket"],"unicode":"🧥"},{"group":7,"hexcode":"1F9E6","label":"socks","order":3834,"tags":["stocking"],"unicode":"🧦"},{"group":7,"hexcode":"1F457","label":"dress","order":3835,"tags":["clothing"],"unicode":"👗"},{"group":7,"hexcode":"1F458","label":"kimono","order":3836,"tags":["clothing"],"unicode":"👘"},{"group":7,"hexcode":"1F97B","label":"sari","order":3837,"tags":["clothing","dress"],"unicode":"🥻"},{"group":7,"hexcode":"1FA71","label":"one-piece swimsuit","order":3838,"tags":["bathing suit"],"unicode":"🩱"},{"group":7,"hexcode":"1FA72","label":"briefs","order":3839,"tags":["bathing suit","one-piece","swimsuit","underwear"],"unicode":"🩲"},{"group":7,"hexcode":"1FA73","label":"shorts","order":3840,"tags":["bathing suit","pants","underwear"],"unicode":"🩳"},{"group":7,"hexcode":"1F459","label":"bikini","order":3841,"tags":["clothing","swim"],"unicode":"👙"},{"group":7,"hexcode":"1F45A","label":"woman’s clothes","order":3842,"tags":["clothing","woman"],"unicode":"👚"},{"group":7,"hexcode":"1F45B","label":"purse","order":3843,"tags":["clothing","coin"],"unicode":"👛"},{"group":7,"hexcode":"1F45C","label":"handbag","order":3844,"tags":["bag","clothing","purse"],"unicode":"👜"},{"group":7,"hexcode":"1F45D","label":"clutch bag","order":3845,"tags":["bag","clothing","pouch"],"unicode":"👝"},{"group":7,"hexcode":"1F6CD","label":"shopping bags","order":3847,"tags":["bag","hotel","shopping"],"unicode":"🛍️"},{"group":7,"hexcode":"1F392","label":"backpack","order":3848,"tags":["bag","rucksack","satchel","school"],"unicode":"🎒"},{"group":7,"hexcode":"1FA74","label":"thong sandal","order":3849,"tags":["beach sandals","sandals","thong sandals","thongs","zōri"],"unicode":"🩴"},{"group":7,"hexcode":"1F45E","label":"man’s shoe","order":3850,"tags":["clothing","man","shoe"],"unicode":"👞"},{"group":7,"hexcode":"1F45F","label":"running shoe","order":3851,"tags":["athletic","clothing","shoe","sneaker"],"unicode":"👟"},{"group":7,"hexcode":"1F97E","label":"hiking boot","order":3852,"tags":["backpacking","boot","camping","hiking"],"unicode":"🥾"},{"group":7,"hexcode":"1F97F","label":"flat shoe","order":3853,"tags":["ballet flat","slip-on","slipper"],"unicode":"🥿"},{"group":7,"hexcode":"1F460","label":"high-heeled shoe","order":3854,"tags":["clothing","heel","shoe","woman"],"unicode":"👠"},{"group":7,"hexcode":"1F461","label":"woman’s sandal","order":3855,"tags":["clothing","sandal","shoe","woman"],"unicode":"👡"},{"group":7,"hexcode":"1FA70","label":"ballet shoes","order":3856,"tags":["ballet","dance"],"unicode":"🩰"},{"group":7,"hexcode":"1F462","label":"woman’s boot","order":3857,"tags":["boot","clothing","shoe","woman"],"unicode":"👢"},{"group":7,"hexcode":"1F451","label":"crown","order":3858,"tags":["clothing","king","queen"],"unicode":"👑"},{"group":7,"hexcode":"1F452","label":"woman’s hat","order":3859,"tags":["clothing","hat","woman"],"unicode":"👒"},{"group":7,"hexcode":"1F3A9","label":"top hat","order":3860,"tags":["clothing","hat","top","tophat"],"unicode":"🎩"},{"group":7,"hexcode":"1F393","label":"graduation cap","order":3861,"tags":["cap","celebration","clothing","graduation","hat"],"unicode":"🎓️"},{"group":7,"hexcode":"1F9E2","label":"billed cap","order":3862,"tags":["baseball cap"],"unicode":"🧢"},{"group":7,"hexcode":"1FA96","label":"military helmet","order":3863,"tags":["army","helmet","military","soldier","warrior"],"unicode":"🪖"},{"group":7,"hexcode":"26D1","label":"rescue worker’s helmet","order":3865,"tags":["aid","cross","face","hat","helmet"],"unicode":"⛑️"},{"group":7,"hexcode":"1F4FF","label":"prayer beads","order":3866,"tags":["beads","clothing","necklace","prayer","religion"],"unicode":"📿"},{"group":7,"hexcode":"1F484","label":"lipstick","order":3867,"tags":["cosmetics","makeup"],"unicode":"💄"},{"group":7,"hexcode":"1F48D","label":"ring","order":3868,"tags":["diamond"],"unicode":"💍"},{"group":7,"hexcode":"1F48E","label":"gem stone","order":3869,"tags":["diamond","gem","jewel"],"unicode":"💎"},{"group":7,"hexcode":"1F507","label":"muted speaker","order":3870,"tags":["mute","quiet","silent","speaker"],"unicode":"🔇"},{"group":7,"hexcode":"1F508","label":"speaker low volume","order":3871,"tags":["soft"],"unicode":"🔈️"},{"group":7,"hexcode":"1F509","label":"speaker medium volume","order":3872,"tags":["medium"],"unicode":"🔉"},{"group":7,"hexcode":"1F50A","label":"speaker high volume","order":3873,"tags":["loud"],"unicode":"🔊"},{"group":7,"hexcode":"1F4E2","label":"loudspeaker","order":3874,"tags":["loud","public address"],"unicode":"📢"},{"group":7,"hexcode":"1F4E3","label":"megaphone","order":3875,"tags":["cheering"],"unicode":"📣"},{"group":7,"hexcode":"1F4EF","label":"postal horn","order":3876,"tags":["horn","post","postal"],"unicode":"📯"},{"group":7,"hexcode":"1F514","label":"bell","order":3877,"tags":["bell"],"unicode":"🔔"},{"group":7,"hexcode":"1F515","label":"bell with slash","order":3878,"tags":["bell","forbidden","mute","quiet","silent"],"unicode":"🔕"},{"group":7,"hexcode":"1F3BC","label":"musical score","order":3879,"tags":["music","score"],"unicode":"🎼"},{"group":7,"hexcode":"1F3B5","label":"musical note","order":3880,"tags":["music","note"],"unicode":"🎵"},{"group":7,"hexcode":"1F3B6","label":"musical notes","order":3881,"tags":["music","note","notes"],"unicode":"🎶"},{"group":7,"hexcode":"1F399","label":"studio microphone","order":3883,"tags":["mic","microphone","music","studio"],"unicode":"🎙️"},{"group":7,"hexcode":"1F39A","label":"level slider","order":3885,"tags":["level","music","slider"],"unicode":"🎚️"},{"group":7,"hexcode":"1F39B","label":"control knobs","order":3887,"tags":["control","knobs","music"],"unicode":"🎛️"},{"group":7,"hexcode":"1F3A4","label":"microphone","order":3888,"tags":["karaoke","mic"],"unicode":"🎤"},{"group":7,"hexcode":"1F3A7","label":"headphone","order":3889,"tags":["earbud"],"unicode":"🎧️"},{"group":7,"hexcode":"1F4FB","label":"radio","order":3890,"tags":["video"],"unicode":"📻️"},{"group":7,"hexcode":"1F3B7","label":"saxophone","order":3891,"tags":["instrument","music","sax"],"unicode":"🎷"},{"group":7,"hexcode":"1FA97","label":"accordion","order":3892,"tags":["concertina","squeeze box"],"unicode":"🪗"},{"group":7,"hexcode":"1F3B8","label":"guitar","order":3893,"tags":["instrument","music"],"unicode":"🎸"},{"group":7,"hexcode":"1F3B9","label":"musical keyboard","order":3894,"tags":["instrument","keyboard","music","piano"],"unicode":"🎹"},{"group":7,"hexcode":"1F3BA","label":"trumpet","order":3895,"tags":["instrument","music"],"unicode":"🎺"},{"group":7,"hexcode":"1F3BB","label":"violin","order":3896,"tags":["instrument","music"],"unicode":"🎻"},{"group":7,"hexcode":"1FA95","label":"banjo","order":3897,"tags":["music","stringed"],"unicode":"🪕"},{"group":7,"hexcode":"1F941","label":"drum","order":3898,"tags":["drumsticks","music"],"unicode":"🥁"},{"group":7,"hexcode":"1FA98","label":"long drum","order":3899,"tags":["beat","conga","drum","rhythm"],"unicode":"🪘"},{"group":7,"hexcode":"1F4F1","label":"mobile phone","order":3900,"tags":["cell","mobile","phone","telephone"],"unicode":"📱"},{"group":7,"hexcode":"1F4F2","label":"mobile phone with arrow","order":3901,"tags":["arrow","cell","mobile","phone","receive"],"unicode":"📲"},{"group":7,"hexcode":"260E","label":"telephone","order":3903,"tags":["phone"],"unicode":"☎️"},{"group":7,"hexcode":"1F4DE","label":"telephone receiver","order":3904,"tags":["phone","receiver","telephone"],"unicode":"📞"},{"group":7,"hexcode":"1F4DF","label":"pager","order":3905,"tags":["pager"],"unicode":"📟️"},{"group":7,"hexcode":"1F4E0","label":"fax machine","order":3906,"tags":["fax"],"unicode":"📠"},{"group":7,"hexcode":"1F50B","label":"battery","order":3907,"tags":["battery"],"unicode":"🔋"},{"group":7,"hexcode":"1FAAB","label":"low battery","order":3908,"tags":["electronic","low energy"],"unicode":"🪫"},{"group":7,"hexcode":"1F50C","label":"electric plug","order":3909,"tags":["electric","electricity","plug"],"unicode":"🔌"},{"group":7,"hexcode":"1F4BB","label":"laptop","order":3910,"tags":["computer","pc","personal"],"unicode":"💻️"},{"group":7,"hexcode":"1F5A5","label":"desktop computer","order":3912,"tags":["computer","desktop"],"unicode":"🖥️"},{"group":7,"hexcode":"1F5A8","label":"printer","order":3914,"tags":["computer"],"unicode":"🖨️"},{"group":7,"hexcode":"2328","label":"keyboard","order":3916,"tags":["computer"],"unicode":"⌨️"},{"group":7,"hexcode":"1F5B1","label":"computer mouse","order":3918,"tags":["computer"],"unicode":"🖱️"},{"group":7,"hexcode":"1F5B2","label":"trackball","order":3920,"tags":["computer"],"unicode":"🖲️"},{"group":7,"hexcode":"1F4BD","label":"computer disk","order":3921,"tags":["computer","disk","minidisk","optical"],"unicode":"💽"},{"group":7,"hexcode":"1F4BE","label":"floppy disk","order":3922,"tags":["computer","disk","floppy"],"unicode":"💾"},{"group":7,"hexcode":"1F4BF","label":"optical disk","order":3923,"tags":["cd","computer","disk","optical"],"unicode":"💿️"},{"group":7,"hexcode":"1F4C0","label":"dvd","order":3924,"tags":["blu-ray","computer","disk","optical"],"unicode":"📀"},{"group":7,"hexcode":"1F9EE","label":"abacus","order":3925,"tags":["calculation"],"unicode":"🧮"},{"group":7,"hexcode":"1F3A5","label":"movie camera","order":3926,"tags":["camera","cinema","movie"],"unicode":"🎥"},{"group":7,"hexcode":"1F39E","label":"film frames","order":3928,"tags":["cinema","film","frames","movie"],"unicode":"🎞️"},{"group":7,"hexcode":"1F4FD","label":"film projector","order":3930,"tags":["cinema","film","movie","projector","video"],"unicode":"📽️"},{"group":7,"hexcode":"1F3AC","label":"clapper board","order":3931,"tags":["clapper","movie"],"unicode":"🎬️"},{"group":7,"hexcode":"1F4FA","label":"television","order":3932,"tags":["tv","video"],"unicode":"📺️"},{"group":7,"hexcode":"1F4F7","label":"camera","order":3933,"tags":["video"],"unicode":"📷️"},{"group":7,"hexcode":"1F4F8","label":"camera with flash","order":3934,"tags":["camera","flash","video"],"unicode":"📸"},{"group":7,"hexcode":"1F4F9","label":"video camera","order":3935,"tags":["camera","video"],"unicode":"📹️"},{"group":7,"hexcode":"1F4FC","label":"videocassette","order":3936,"tags":["tape","vhs","video"],"unicode":"📼"},{"group":7,"hexcode":"1F50D","label":"magnifying glass tilted left","order":3937,"tags":["glass","magnifying","search","tool"],"unicode":"🔍️"},{"group":7,"hexcode":"1F50E","label":"magnifying glass tilted right","order":3938,"tags":["glass","magnifying","search","tool"],"unicode":"🔎"},{"group":7,"hexcode":"1F56F","label":"candle","order":3940,"tags":["light"],"unicode":"🕯️"},{"group":7,"hexcode":"1F4A1","label":"light bulb","order":3941,"tags":["bulb","comic","electric","idea","light"],"unicode":"💡"},{"group":7,"hexcode":"1F526","label":"flashlight","order":3942,"tags":["electric","light","tool","torch"],"unicode":"🔦"},{"group":7,"hexcode":"1F3EE","label":"red paper lantern","order":3943,"tags":["bar","lantern","light","red"],"unicode":"🏮"},{"group":7,"hexcode":"1FA94","label":"diya lamp","order":3944,"tags":["diya","lamp","oil"],"unicode":"🪔"},{"group":7,"hexcode":"1F4D4","label":"notebook with decorative cover","order":3945,"tags":["book","cover","decorated","notebook"],"unicode":"📔"},{"group":7,"hexcode":"1F4D5","label":"closed book","order":3946,"tags":["book","closed"],"unicode":"📕"},{"group":7,"hexcode":"1F4D6","label":"open book","order":3947,"tags":["book","open"],"unicode":"📖"},{"group":7,"hexcode":"1F4D7","label":"green book","order":3948,"tags":["book","green"],"unicode":"📗"},{"group":7,"hexcode":"1F4D8","label":"blue book","order":3949,"tags":["blue","book"],"unicode":"📘"},{"group":7,"hexcode":"1F4D9","label":"orange book","order":3950,"tags":["book","orange"],"unicode":"📙"},{"group":7,"hexcode":"1F4DA","label":"books","order":3951,"tags":["book"],"unicode":"📚️"},{"group":7,"hexcode":"1F4D3","label":"notebook","order":3952,"tags":["notebook"],"unicode":"📓"},{"group":7,"hexcode":"1F4D2","label":"ledger","order":3953,"tags":["notebook"],"unicode":"📒"},{"group":7,"hexcode":"1F4C3","label":"page with curl","order":3954,"tags":["curl","document","page"],"unicode":"📃"},{"group":7,"hexcode":"1F4DC","label":"scroll","order":3955,"tags":["paper"],"unicode":"📜"},{"group":7,"hexcode":"1F4C4","label":"page facing up","order":3956,"tags":["document","page"],"unicode":"📄"},{"group":7,"hexcode":"1F4F0","label":"newspaper","order":3957,"tags":["news","paper"],"unicode":"📰"},{"group":7,"hexcode":"1F5DE","label":"rolled-up newspaper","order":3959,"tags":["news","newspaper","paper","rolled"],"unicode":"🗞️"},{"group":7,"hexcode":"1F4D1","label":"bookmark tabs","order":3960,"tags":["bookmark","mark","marker","tabs"],"unicode":"📑"},{"group":7,"hexcode":"1F516","label":"bookmark","order":3961,"tags":["mark"],"unicode":"🔖"},{"group":7,"hexcode":"1F3F7","label":"label","order":3963,"tags":["label"],"unicode":"🏷️"},{"group":7,"hexcode":"1F4B0","label":"money bag","order":3964,"tags":["bag","dollar","money","moneybag"],"unicode":"💰️"},{"group":7,"hexcode":"1FA99","label":"coin","order":3965,"tags":["gold","metal","money","silver","treasure"],"unicode":"🪙"},{"group":7,"hexcode":"1F4B4","label":"yen banknote","order":3966,"tags":["banknote","bill","currency","money","note","yen"],"unicode":"💴"},{"group":7,"hexcode":"1F4B5","label":"dollar banknote","order":3967,"tags":["banknote","bill","currency","dollar","money","note"],"unicode":"💵"},{"group":7,"hexcode":"1F4B6","label":"euro banknote","order":3968,"tags":["banknote","bill","currency","euro","money","note"],"unicode":"💶"},{"group":7,"hexcode":"1F4B7","label":"pound banknote","order":3969,"tags":["banknote","bill","currency","money","note","pound"],"unicode":"💷"},{"group":7,"hexcode":"1F4B8","label":"money with wings","order":3970,"tags":["banknote","bill","fly","money","wings"],"unicode":"💸"},{"group":7,"hexcode":"1F4B3","label":"credit card","order":3971,"tags":["card","credit","money"],"unicode":"💳️"},{"group":7,"hexcode":"1F9FE","label":"receipt","order":3972,"tags":["accounting","bookkeeping","evidence","proof"],"unicode":"🧾"},{"group":7,"hexcode":"1F4B9","label":"chart increasing with yen","order":3973,"tags":["chart","graph","growth","money","yen"],"unicode":"💹"},{"group":7,"hexcode":"2709","label":"envelope","order":3975,"tags":["email","letter"],"unicode":"✉️"},{"group":7,"hexcode":"1F4E7","label":"e-mail","order":3976,"tags":["email","letter","mail"],"unicode":"📧"},{"group":7,"hexcode":"1F4E8","label":"incoming envelope","order":3977,"tags":["e-mail","email","envelope","incoming","letter","receive"],"unicode":"📨"},{"group":7,"hexcode":"1F4E9","label":"envelope with arrow","order":3978,"tags":["arrow","e-mail","email","envelope","outgoing"],"unicode":"📩"},{"group":7,"hexcode":"1F4E4","label":"outbox tray","order":3979,"tags":["box","letter","mail","outbox","sent","tray"],"unicode":"📤️"},{"group":7,"hexcode":"1F4E5","label":"inbox tray","order":3980,"tags":["box","inbox","letter","mail","receive","tray"],"unicode":"📥️"},{"group":7,"hexcode":"1F4E6","label":"package","order":3981,"tags":["box","parcel"],"unicode":"📦️"},{"group":7,"hexcode":"1F4EB","label":"closed mailbox with raised flag","order":3982,"tags":["closed","mail","mailbox","postbox"],"unicode":"📫️"},{"group":7,"hexcode":"1F4EA","label":"closed mailbox with lowered flag","order":3983,"tags":["closed","lowered","mail","mailbox","postbox"],"unicode":"📪️"},{"group":7,"hexcode":"1F4EC","label":"open mailbox with raised flag","order":3984,"tags":["mail","mailbox","open","postbox"],"unicode":"📬️"},{"group":7,"hexcode":"1F4ED","label":"open mailbox with lowered flag","order":3985,"tags":["lowered","mail","mailbox","open","postbox"],"unicode":"📭️"},{"group":7,"hexcode":"1F4EE","label":"postbox","order":3986,"tags":["mail","mailbox"],"unicode":"📮"},{"group":7,"hexcode":"1F5F3","label":"ballot box with ballot","order":3988,"tags":["ballot","box"],"unicode":"🗳️"},{"group":7,"hexcode":"270F","label":"pencil","order":3990,"tags":["pencil"],"unicode":"✏️"},{"group":7,"hexcode":"2712","label":"black nib","order":3992,"tags":["nib","pen"],"unicode":"✒️"},{"group":7,"hexcode":"1F58B","label":"fountain pen","order":3994,"tags":["fountain","pen"],"unicode":"🖋️"},{"group":7,"hexcode":"1F58A","label":"pen","order":3996,"tags":["ballpoint"],"unicode":"🖊️"},{"group":7,"hexcode":"1F58C","label":"paintbrush","order":3998,"tags":["painting"],"unicode":"🖌️"},{"group":7,"hexcode":"1F58D","label":"crayon","order":4000,"tags":["crayon"],"unicode":"🖍️"},{"group":7,"hexcode":"1F4DD","label":"memo","order":4001,"tags":["pencil"],"unicode":"📝"},{"group":7,"hexcode":"1F4BC","label":"briefcase","order":4002,"tags":["briefcase"],"unicode":"💼"},{"group":7,"hexcode":"1F4C1","label":"file folder","order":4003,"tags":["file","folder"],"unicode":"📁"},{"group":7,"hexcode":"1F4C2","label":"open file folder","order":4004,"tags":["file","folder","open"],"unicode":"📂"},{"group":7,"hexcode":"1F5C2","label":"card index dividers","order":4006,"tags":["card","dividers","index"],"unicode":"🗂️"},{"group":7,"hexcode":"1F4C5","label":"calendar","order":4007,"tags":["date"],"unicode":"📅"},{"group":7,"hexcode":"1F4C6","label":"tear-off calendar","order":4008,"tags":["calendar"],"unicode":"📆"},{"group":7,"hexcode":"1F5D2","label":"spiral notepad","order":4010,"tags":["note","pad","spiral"],"unicode":"🗒️"},{"group":7,"hexcode":"1F5D3","label":"spiral calendar","order":4012,"tags":["calendar","pad","spiral"],"unicode":"🗓️"},{"group":7,"hexcode":"1F4C7","label":"card index","order":4013,"tags":["card","index","rolodex"],"unicode":"📇"},{"group":7,"hexcode":"1F4C8","label":"chart increasing","order":4014,"tags":["chart","graph","growth","trend","upward"],"unicode":"📈"},{"group":7,"hexcode":"1F4C9","label":"chart decreasing","order":4015,"tags":["chart","down","graph","trend"],"unicode":"📉"},{"group":7,"hexcode":"1F4CA","label":"bar chart","order":4016,"tags":["bar","chart","graph"],"unicode":"📊"},{"group":7,"hexcode":"1F4CB","label":"clipboard","order":4017,"tags":["clipboard"],"unicode":"📋️"},{"group":7,"hexcode":"1F4CC","label":"pushpin","order":4018,"tags":["pin"],"unicode":"📌"},{"group":7,"hexcode":"1F4CD","label":"round pushpin","order":4019,"tags":["pin","pushpin"],"unicode":"📍"},{"group":7,"hexcode":"1F4CE","label":"paperclip","order":4020,"tags":["paperclip"],"unicode":"📎"},{"group":7,"hexcode":"1F587","label":"linked paperclips","order":4022,"tags":["link","paperclip"],"unicode":"🖇️"},{"group":7,"hexcode":"1F4CF","label":"straight ruler","order":4023,"tags":["ruler","straight edge"],"unicode":"📏"},{"group":7,"hexcode":"1F4D0","label":"triangular ruler","order":4024,"tags":["ruler","set","triangle"],"unicode":"📐"},{"group":7,"hexcode":"2702","label":"scissors","order":4026,"tags":["cutting","tool"],"unicode":"✂️"},{"group":7,"hexcode":"1F5C3","label":"card file box","order":4028,"tags":["box","card","file"],"unicode":"🗃️"},{"group":7,"hexcode":"1F5C4","label":"file cabinet","order":4030,"tags":["cabinet","file","filing"],"unicode":"🗄️"},{"group":7,"hexcode":"1F5D1","label":"wastebasket","order":4032,"tags":["wastebasket"],"unicode":"🗑️"},{"group":7,"hexcode":"1F512","label":"locked","order":4033,"tags":["closed"],"unicode":"🔒️"},{"group":7,"hexcode":"1F513","label":"unlocked","order":4034,"tags":["lock","open","unlock"],"unicode":"🔓️"},{"group":7,"hexcode":"1F50F","label":"locked with pen","order":4035,"tags":["ink","lock","nib","pen","privacy"],"unicode":"🔏"},{"group":7,"hexcode":"1F510","label":"locked with key","order":4036,"tags":["closed","key","lock","secure"],"unicode":"🔐"},{"group":7,"hexcode":"1F511","label":"key","order":4037,"tags":["lock","password"],"unicode":"🔑"},{"group":7,"hexcode":"1F5DD","label":"old key","order":4039,"tags":["clue","key","lock","old"],"unicode":"🗝️"},{"group":7,"hexcode":"1F528","label":"hammer","order":4040,"tags":["tool"],"unicode":"🔨"},{"group":7,"hexcode":"1FA93","label":"axe","order":4041,"tags":["chop","hatchet","split","wood"],"unicode":"🪓"},{"group":7,"hexcode":"26CF","label":"pick","order":4043,"tags":["mining","tool"],"unicode":"⛏️"},{"group":7,"hexcode":"2692","label":"hammer and pick","order":4045,"tags":["hammer","pick","tool"],"unicode":"⚒️"},{"group":7,"hexcode":"1F6E0","label":"hammer and wrench","order":4047,"tags":["hammer","spanner","tool","wrench"],"unicode":"🛠️"},{"group":7,"hexcode":"1F5E1","label":"dagger","order":4049,"tags":["knife","weapon"],"unicode":"🗡️"},{"group":7,"hexcode":"2694","label":"crossed swords","order":4051,"tags":["crossed","swords","weapon"],"unicode":"⚔️"},{"group":7,"hexcode":"1F52B","label":"water pistol","order":4052,"tags":["gun","handgun","pistol","revolver","tool","water","weapon"],"unicode":"🔫"},{"group":7,"hexcode":"1FA83","label":"boomerang","order":4053,"tags":["australia","rebound","repercussion"],"unicode":"🪃"},{"group":7,"hexcode":"1F3F9","label":"bow and arrow","order":4054,"tags":["archer","arrow","bow","sagittarius","zodiac"],"unicode":"🏹"},{"group":7,"hexcode":"1F6E1","label":"shield","order":4056,"tags":["weapon"],"unicode":"🛡️"},{"group":7,"hexcode":"1FA9A","label":"carpentry saw","order":4057,"tags":["carpenter","lumber","saw","tool"],"unicode":"🪚"},{"group":7,"hexcode":"1F527","label":"wrench","order":4058,"tags":["spanner","tool"],"unicode":"🔧"},{"group":7,"hexcode":"1FA9B","label":"screwdriver","order":4059,"tags":["screw","tool"],"unicode":"🪛"},{"group":7,"hexcode":"1F529","label":"nut and bolt","order":4060,"tags":["bolt","nut","tool"],"unicode":"🔩"},{"group":7,"hexcode":"2699","label":"gear","order":4062,"tags":["cog","cogwheel","tool"],"unicode":"⚙️"},{"group":7,"hexcode":"1F5DC","label":"clamp","order":4064,"tags":["compress","tool","vice"],"unicode":"🗜️"},{"group":7,"hexcode":"2696","label":"balance scale","order":4066,"tags":["balance","justice","libra","scale","zodiac"],"unicode":"⚖️"},{"group":7,"hexcode":"1F9AF","label":"white cane","order":4067,"tags":["accessibility","blind"],"unicode":"🦯"},{"group":7,"hexcode":"1F517","label":"link","order":4068,"tags":["link"],"unicode":"🔗"},{"group":7,"hexcode":"26D3","label":"chains","order":4070,"tags":["chain"],"unicode":"⛓️"},{"group":7,"hexcode":"1FA9D","label":"hook","order":4071,"tags":["catch","crook","curve","ensnare","selling point"],"unicode":"🪝"},{"group":7,"hexcode":"1F9F0","label":"toolbox","order":4072,"tags":["chest","mechanic","tool"],"unicode":"🧰"},{"group":7,"hexcode":"1F9F2","label":"magnet","order":4073,"tags":["attraction","horseshoe","magnetic"],"unicode":"🧲"},{"group":7,"hexcode":"1FA9C","label":"ladder","order":4074,"tags":["climb","rung","step"],"unicode":"🪜"},{"group":7,"hexcode":"2697","label":"alembic","order":4076,"tags":["chemistry","tool"],"unicode":"⚗️"},{"group":7,"hexcode":"1F9EA","label":"test tube","order":4077,"tags":["chemist","chemistry","experiment","lab","science"],"unicode":"🧪"},{"group":7,"hexcode":"1F9EB","label":"petri dish","order":4078,"tags":["bacteria","biologist","biology","culture","lab"],"unicode":"🧫"},{"group":7,"hexcode":"1F9EC","label":"dna","order":4079,"tags":["biologist","evolution","gene","genetics","life"],"unicode":"🧬"},{"group":7,"hexcode":"1F52C","label":"microscope","order":4080,"tags":["science","tool"],"unicode":"🔬"},{"group":7,"hexcode":"1F52D","label":"telescope","order":4081,"tags":["science","tool"],"unicode":"🔭"},{"group":7,"hexcode":"1F4E1","label":"satellite antenna","order":4082,"tags":["antenna","dish","satellite"],"unicode":"📡"},{"group":7,"hexcode":"1F489","label":"syringe","order":4083,"tags":["medicine","needle","shot","sick"],"unicode":"💉"},{"group":7,"hexcode":"1FA78","label":"drop of blood","order":4084,"tags":["bleed","blood donation","injury","medicine","menstruation"],"unicode":"🩸"},{"group":7,"hexcode":"1F48A","label":"pill","order":4085,"tags":["doctor","medicine","sick"],"unicode":"💊"},{"group":7,"hexcode":"1FA79","label":"adhesive bandage","order":4086,"tags":["bandage"],"unicode":"🩹"},{"group":7,"hexcode":"1FA7C","label":"crutch","order":4087,"tags":["cane","disability","hurt","mobility aid","stick"],"unicode":"🩼"},{"group":7,"hexcode":"1FA7A","label":"stethoscope","order":4088,"tags":["doctor","heart","medicine"],"unicode":"🩺"},{"group":7,"hexcode":"1FA7B","label":"x-ray","order":4089,"tags":["bones","doctor","medical","skeleton"],"unicode":"🩻"},{"group":7,"hexcode":"1F6AA","label":"door","order":4090,"tags":["door"],"unicode":"🚪"},{"group":7,"hexcode":"1F6D7","label":"elevator","order":4091,"tags":["accessibility","hoist","lift"],"unicode":"🛗"},{"group":7,"hexcode":"1FA9E","label":"mirror","order":4092,"tags":["reflection","reflector","speculum"],"unicode":"🪞"},{"group":7,"hexcode":"1FA9F","label":"window","order":4093,"tags":["frame","fresh air","opening","transparent","view"],"unicode":"🪟"},{"group":7,"hexcode":"1F6CF","label":"bed","order":4095,"tags":["hotel","sleep"],"unicode":"🛏️"},{"group":7,"hexcode":"1F6CB","label":"couch and lamp","order":4097,"tags":["couch","hotel","lamp"],"unicode":"🛋️"},{"group":7,"hexcode":"1FA91","label":"chair","order":4098,"tags":["seat","sit"],"unicode":"🪑"},{"group":7,"hexcode":"1F6BD","label":"toilet","order":4099,"tags":["toilet"],"unicode":"🚽"},{"group":7,"hexcode":"1FAA0","label":"plunger","order":4100,"tags":["force cup","plumber","suction","toilet"],"unicode":"🪠"},{"group":7,"hexcode":"1F6BF","label":"shower","order":4101,"tags":["water"],"unicode":"🚿"},{"group":7,"hexcode":"1F6C1","label":"bathtub","order":4102,"tags":["bath"],"unicode":"🛁"},{"group":7,"hexcode":"1FAA4","label":"mouse trap","order":4103,"tags":["bait","mousetrap","snare","trap"],"unicode":"🪤"},{"group":7,"hexcode":"1FA92","label":"razor","order":4104,"tags":["sharp","shave"],"unicode":"🪒"},{"group":7,"hexcode":"1F9F4","label":"lotion bottle","order":4105,"tags":["lotion","moisturizer","shampoo","sunscreen"],"unicode":"🧴"},{"group":7,"hexcode":"1F9F7","label":"safety pin","order":4106,"tags":["diaper","punk rock"],"unicode":"🧷"},{"group":7,"hexcode":"1F9F9","label":"broom","order":4107,"tags":["cleaning","sweeping","witch"],"unicode":"🧹"},{"group":7,"hexcode":"1F9FA","label":"basket","order":4108,"tags":["farming","laundry","picnic"],"unicode":"🧺"},{"group":7,"hexcode":"1F9FB","label":"roll of paper","order":4109,"tags":["paper towels","toilet paper"],"unicode":"🧻"},{"group":7,"hexcode":"1FAA3","label":"bucket","order":4110,"tags":["cask","pail","vat"],"unicode":"🪣"},{"group":7,"hexcode":"1F9FC","label":"soap","order":4111,"tags":["bar","bathing","cleaning","lather","soapdish"],"unicode":"🧼"},{"group":7,"hexcode":"1FAE7","label":"bubbles","order":4112,"tags":["burp","clean","soap","underwater"],"unicode":"🫧"},{"group":7,"hexcode":"1FAA5","label":"toothbrush","order":4113,"tags":["bathroom","brush","clean","dental","hygiene","teeth"],"unicode":"🪥"},{"group":7,"hexcode":"1F9FD","label":"sponge","order":4114,"tags":["absorbing","cleaning","porous"],"unicode":"🧽"},{"group":7,"hexcode":"1F9EF","label":"fire extinguisher","order":4115,"tags":["extinguish","fire","quench"],"unicode":"🧯"},{"group":7,"hexcode":"1F6D2","label":"shopping cart","order":4116,"tags":["cart","shopping","trolley"],"unicode":"🛒"},{"group":7,"hexcode":"1F6AC","label":"cigarette","order":4117,"tags":["smoking"],"unicode":"🚬"},{"group":7,"hexcode":"26B0","label":"coffin","order":4119,"tags":["death"],"unicode":"⚰️"},{"group":7,"hexcode":"1FAA6","label":"headstone","order":4120,"tags":["cemetery","grave","graveyard","tombstone"],"unicode":"🪦"},{"group":7,"hexcode":"26B1","label":"funeral urn","order":4122,"tags":["ashes","death","funeral","urn"],"unicode":"⚱️"},{"group":7,"hexcode":"1F5FF","label":"moai","order":4123,"tags":["face","moyai","statue"],"unicode":"🗿"},{"group":7,"hexcode":"1FAA7","label":"placard","order":4124,"tags":["demonstration","picket","protest","sign"],"unicode":"🪧"},{"group":7,"hexcode":"1FAAA","label":"identification card","order":4125,"tags":["credentials","id","license","security"],"unicode":"🪪"},{"group":8,"hexcode":"1F3E7","label":"ATM sign","order":4126,"tags":["atm","atm sign","automated","bank","teller"],"unicode":"🏧"},{"group":8,"hexcode":"1F6AE","label":"litter in bin sign","order":4127,"tags":["litter","litter bin"],"unicode":"🚮"},{"group":8,"hexcode":"1F6B0","label":"potable water","order":4128,"tags":["drinking","potable","water"],"unicode":"🚰"},{"group":8,"hexcode":"267F","label":"wheelchair symbol","order":4129,"tags":["access"],"unicode":"♿️"},{"group":8,"hexcode":"1F6B9","label":"men’s room","order":4130,"tags":["bathroom","lavatory","man","restroom","toilet","wc"],"unicode":"🚹️"},{"group":8,"hexcode":"1F6BA","label":"women’s room","order":4131,"tags":["bathroom","lavatory","restroom","toilet","wc","woman"],"unicode":"🚺️"},{"group":8,"hexcode":"1F6BB","label":"restroom","order":4132,"tags":["bathroom","lavatory","toilet","wc"],"unicode":"🚻"},{"group":8,"hexcode":"1F6BC","label":"baby symbol","order":4133,"tags":["baby","changing"],"unicode":"🚼️"},{"group":8,"hexcode":"1F6BE","label":"water closet","order":4134,"tags":["bathroom","closet","lavatory","restroom","toilet","water","wc"],"unicode":"🚾"},{"group":8,"hexcode":"1F6C2","label":"passport control","order":4135,"tags":["control","passport"],"unicode":"🛂"},{"group":8,"hexcode":"1F6C3","label":"customs","order":4136,"tags":["customs"],"unicode":"🛃"},{"group":8,"hexcode":"1F6C4","label":"baggage claim","order":4137,"tags":["baggage","claim"],"unicode":"🛄"},{"group":8,"hexcode":"1F6C5","label":"left luggage","order":4138,"tags":["baggage","locker","luggage"],"unicode":"🛅"},{"group":8,"hexcode":"26A0","label":"warning","order":4140,"tags":["warning"],"unicode":"⚠️"},{"group":8,"hexcode":"1F6B8","label":"children crossing","order":4141,"tags":["child","crossing","pedestrian","traffic"],"unicode":"🚸"},{"group":8,"hexcode":"26D4","label":"no entry","order":4142,"tags":["entry","forbidden","no","not","prohibited","traffic"],"unicode":"⛔️"},{"group":8,"hexcode":"1F6AB","label":"prohibited","order":4143,"tags":["entry","forbidden","no","not"],"unicode":"🚫"},{"group":8,"hexcode":"1F6B3","label":"no bicycles","order":4144,"tags":["bicycle","bike","forbidden","no","prohibited"],"unicode":"🚳"},{"group":8,"hexcode":"1F6AD","label":"no smoking","order":4145,"tags":["forbidden","no","not","prohibited","smoking"],"unicode":"🚭️"},{"group":8,"hexcode":"1F6AF","label":"no littering","order":4146,"tags":["forbidden","litter","no","not","prohibited"],"unicode":"🚯"},{"group":8,"hexcode":"1F6B1","label":"non-potable water","order":4147,"tags":["non-drinking","non-potable","water"],"unicode":"🚱"},{"group":8,"hexcode":"1F6B7","label":"no pedestrians","order":4148,"tags":["forbidden","no","not","pedestrian","prohibited"],"unicode":"🚷"},{"group":8,"hexcode":"1F4F5","label":"no mobile phones","order":4149,"tags":["cell","forbidden","mobile","no","phone"],"unicode":"📵"},{"group":8,"hexcode":"1F51E","label":"no one under eighteen","order":4150,"tags":["18","age restriction","eighteen","prohibited","underage"],"unicode":"🔞"},{"group":8,"hexcode":"2622","label":"radioactive","order":4152,"tags":["sign"],"unicode":"☢️"},{"group":8,"hexcode":"2623","label":"biohazard","order":4154,"tags":["sign"],"unicode":"☣️"},{"group":8,"hexcode":"2B06","label":"up arrow","order":4156,"tags":["arrow","cardinal","direction","north"],"unicode":"⬆️"},{"group":8,"hexcode":"2197","label":"up-right arrow","order":4158,"tags":["arrow","direction","intercardinal","northeast"],"unicode":"↗️"},{"group":8,"hexcode":"27A1","label":"right arrow","order":4160,"tags":["arrow","cardinal","direction","east"],"unicode":"➡️"},{"group":8,"hexcode":"2198","label":"down-right arrow","order":4162,"tags":["arrow","direction","intercardinal","southeast"],"unicode":"↘️"},{"group":8,"hexcode":"2B07","label":"down arrow","order":4164,"tags":["arrow","cardinal","direction","down","south"],"unicode":"⬇️"},{"group":8,"hexcode":"2199","label":"down-left arrow","order":4166,"tags":["arrow","direction","intercardinal","southwest"],"unicode":"↙️"},{"group":8,"hexcode":"2B05","label":"left arrow","order":4168,"tags":["arrow","cardinal","direction","west"],"unicode":"⬅️"},{"group":8,"hexcode":"2196","label":"up-left arrow","order":4170,"tags":["arrow","direction","intercardinal","northwest"],"unicode":"↖️"},{"group":8,"hexcode":"2195","label":"up-down arrow","order":4172,"tags":["arrow"],"unicode":"↕️"},{"group":8,"hexcode":"2194","label":"left-right arrow","order":4174,"tags":["arrow"],"unicode":"↔️"},{"group":8,"hexcode":"21A9","label":"right arrow curving left","order":4176,"tags":["arrow"],"unicode":"↩️"},{"group":8,"hexcode":"21AA","label":"left arrow curving right","order":4178,"tags":["arrow"],"unicode":"↪️"},{"group":8,"hexcode":"2934","label":"right arrow curving up","order":4180,"tags":["arrow"],"unicode":"⤴️"},{"group":8,"hexcode":"2935","label":"right arrow curving down","order":4182,"tags":["arrow","down"],"unicode":"⤵️"},{"group":8,"hexcode":"1F503","label":"clockwise vertical arrows","order":4183,"tags":["arrow","clockwise","reload"],"unicode":"🔃"},{"group":8,"hexcode":"1F504","label":"counterclockwise arrows button","order":4184,"tags":["anticlockwise","arrow","counterclockwise","withershins"],"unicode":"🔄"},{"group":8,"hexcode":"1F519","label":"BACK arrow","order":4185,"tags":["arrow","back"],"unicode":"🔙"},{"group":8,"hexcode":"1F51A","label":"END arrow","order":4186,"tags":["arrow","end"],"unicode":"🔚"},{"group":8,"hexcode":"1F51B","label":"ON! arrow","order":4187,"tags":["arrow","mark","on","on!"],"unicode":"🔛"},{"group":8,"hexcode":"1F51C","label":"SOON arrow","order":4188,"tags":["arrow","soon"],"unicode":"🔜"},{"group":8,"hexcode":"1F51D","label":"TOP arrow","order":4189,"tags":["arrow","top","up"],"unicode":"🔝"},{"group":8,"hexcode":"1F6D0","label":"place of worship","order":4190,"tags":["religion","worship"],"unicode":"🛐"},{"group":8,"hexcode":"269B","label":"atom symbol","order":4192,"tags":["atheist","atom"],"unicode":"⚛️"},{"group":8,"hexcode":"1F549","label":"om","order":4194,"tags":["hindu","religion"],"unicode":"🕉️"},{"group":8,"hexcode":"2721","label":"star of David","order":4196,"tags":["david","jew","jewish","religion","star","star of david"],"unicode":"✡️"},{"group":8,"hexcode":"2638","label":"wheel of dharma","order":4198,"tags":["buddhist","dharma","religion","wheel"],"unicode":"☸️"},{"group":8,"hexcode":"262F","label":"yin yang","order":4200,"tags":["religion","tao","taoist","yang","yin"],"unicode":"☯️"},{"group":8,"hexcode":"271D","label":"latin cross","order":4202,"tags":["christian","cross","religion"],"unicode":"✝️"},{"group":8,"hexcode":"2626","label":"orthodox cross","order":4204,"tags":["christian","cross","religion"],"unicode":"☦️"},{"group":8,"hexcode":"262A","label":"star and crescent","order":4206,"tags":["islam","muslim","religion"],"unicode":"☪️"},{"group":8,"hexcode":"262E","label":"peace symbol","order":4208,"tags":["peace"],"unicode":"☮️"},{"group":8,"hexcode":"1F54E","label":"menorah","order":4209,"tags":["candelabrum","candlestick","religion"],"unicode":"🕎"},{"group":8,"hexcode":"1F52F","label":"dotted six-pointed star","order":4210,"tags":["fortune","star"],"unicode":"🔯"},{"group":8,"hexcode":"2648","label":"Aries","order":4211,"tags":["aries","ram","zodiac"],"unicode":"♈️"},{"group":8,"hexcode":"2649","label":"Taurus","order":4212,"tags":["bull","ox","taurus","zodiac"],"unicode":"♉️"},{"group":8,"hexcode":"264A","label":"Gemini","order":4213,"tags":["gemini","twins","zodiac"],"unicode":"♊️"},{"group":8,"hexcode":"264B","label":"Cancer","order":4214,"tags":["cancer","crab","zodiac"],"unicode":"♋️"},{"group":8,"hexcode":"264C","label":"Leo","order":4215,"tags":["leo","lion","zodiac"],"unicode":"♌️"},{"group":8,"hexcode":"264D","label":"Virgo","order":4216,"tags":["virgo","zodiac"],"unicode":"♍️"},{"group":8,"hexcode":"264E","label":"Libra","order":4217,"tags":["balance","justice","libra","scales","zodiac"],"unicode":"♎️"},{"group":8,"hexcode":"264F","label":"Scorpio","order":4218,"tags":["scorpio","scorpion","scorpius","zodiac"],"unicode":"♏️"},{"group":8,"hexcode":"2650","label":"Sagittarius","order":4219,"tags":["archer","sagittarius","zodiac"],"unicode":"♐️"},{"group":8,"hexcode":"2651","label":"Capricorn","order":4220,"tags":["capricorn","goat","zodiac"],"unicode":"♑️"},{"group":8,"hexcode":"2652","label":"Aquarius","order":4221,"tags":["aquarius","bearer","water","zodiac"],"unicode":"♒️"},{"group":8,"hexcode":"2653","label":"Pisces","order":4222,"tags":["fish","pisces","zodiac"],"unicode":"♓️"},{"group":8,"hexcode":"26CE","label":"Ophiuchus","order":4223,"tags":["bearer","ophiuchus","serpent","snake","zodiac"],"unicode":"⛎"},{"group":8,"hexcode":"1F500","label":"shuffle tracks button","order":4224,"tags":["arrow","crossed"],"unicode":"🔀"},{"group":8,"hexcode":"1F501","label":"repeat button","order":4225,"tags":["arrow","clockwise","repeat"],"unicode":"🔁"},{"group":8,"hexcode":"1F502","label":"repeat single button","order":4226,"tags":["arrow","clockwise","once"],"unicode":"🔂"},{"group":8,"hexcode":"25B6","label":"play button","order":4228,"tags":["arrow","play","right","triangle"],"unicode":"▶️"},{"group":8,"hexcode":"23E9","label":"fast-forward button","order":4229,"tags":["arrow","double","fast","forward"],"unicode":"⏩️"},{"group":8,"hexcode":"23ED","label":"next track button","order":4231,"tags":["arrow","next scene","next track","triangle"],"unicode":"⏭️"},{"group":8,"hexcode":"23EF","label":"play or pause button","order":4233,"tags":["arrow","pause","play","right","triangle"],"unicode":"⏯️"},{"group":8,"hexcode":"25C0","label":"reverse button","order":4235,"tags":["arrow","left","reverse","triangle"],"unicode":"◀️"},{"group":8,"hexcode":"23EA","label":"fast reverse button","order":4236,"tags":["arrow","double","rewind"],"unicode":"⏪️"},{"group":8,"hexcode":"23EE","label":"last track button","order":4238,"tags":["arrow","previous scene","previous track","triangle"],"unicode":"⏮️"},{"group":8,"hexcode":"1F53C","label":"upwards button","order":4239,"tags":["arrow","button","red"],"unicode":"🔼"},{"group":8,"hexcode":"23EB","label":"fast up button","order":4240,"tags":["arrow","double"],"unicode":"⏫"},{"group":8,"hexcode":"1F53D","label":"downwards button","order":4241,"tags":["arrow","button","down","red"],"unicode":"🔽"},{"group":8,"hexcode":"23EC","label":"fast down button","order":4242,"tags":["arrow","double","down"],"unicode":"⏬"},{"group":8,"hexcode":"23F8","label":"pause button","order":4244,"tags":["bar","double","pause","vertical"],"unicode":"⏸️"},{"group":8,"hexcode":"23F9","label":"stop button","order":4246,"tags":["square","stop"],"unicode":"⏹️"},{"group":8,"hexcode":"23FA","label":"record button","order":4248,"tags":["circle","record"],"unicode":"⏺️"},{"group":8,"hexcode":"23CF","label":"eject button","order":4250,"tags":["eject"],"unicode":"⏏️"},{"group":8,"hexcode":"1F3A6","label":"cinema","order":4251,"tags":["camera","film","movie"],"unicode":"🎦"},{"group":8,"hexcode":"1F505","label":"dim button","order":4252,"tags":["brightness","dim","low"],"unicode":"🔅"},{"group":8,"hexcode":"1F506","label":"bright button","order":4253,"tags":["bright","brightness"],"unicode":"🔆"},{"group":8,"hexcode":"1F4F6","label":"antenna bars","order":4254,"tags":["antenna","bar","cell","mobile","phone"],"unicode":"📶"},{"group":8,"hexcode":"1F4F3","label":"vibration mode","order":4255,"tags":["cell","mobile","mode","phone","telephone","vibration"],"unicode":"📳"},{"group":8,"hexcode":"1F4F4","label":"mobile phone off","order":4256,"tags":["cell","mobile","off","phone","telephone"],"unicode":"📴"},{"group":8,"hexcode":"2640","label":"female sign","order":4258,"tags":["woman"],"unicode":"♀️"},{"group":8,"hexcode":"2642","label":"male sign","order":4260,"tags":["man"],"unicode":"♂️"},{"group":8,"hexcode":"26A7","label":"transgender symbol","order":4262,"tags":["transgender"],"unicode":"⚧️"},{"group":8,"hexcode":"2716","label":"multiply","order":4264,"tags":["cancel","multiplication","sign","x","×"],"unicode":"✖️"},{"group":8,"hexcode":"2795","label":"plus","order":4265,"tags":["+","math","sign"],"unicode":"➕"},{"group":8,"hexcode":"2796","label":"minus","order":4266,"tags":["-","math","sign","−"],"unicode":"➖"},{"group":8,"hexcode":"2797","label":"divide","order":4267,"tags":["division","math","sign","÷"],"unicode":"➗"},{"group":8,"hexcode":"1F7F0","label":"heavy equals sign","order":4268,"tags":["equality","math"],"unicode":"🟰"},{"group":8,"hexcode":"267E","label":"infinity","order":4270,"tags":["forever","unbounded","universal"],"unicode":"♾️"},{"group":8,"hexcode":"203C","label":"double exclamation mark","order":4272,"tags":["!","!!","bangbang","exclamation","mark"],"unicode":"‼️"},{"group":8,"hexcode":"2049","label":"exclamation question mark","order":4274,"tags":["!","!?","?","exclamation","interrobang","mark","punctuation","question"],"unicode":"⁉️"},{"group":8,"hexcode":"2753","label":"red question mark","order":4275,"tags":["?","mark","punctuation","question"],"unicode":"❓️"},{"group":8,"hexcode":"2754","label":"white question mark","order":4276,"tags":["?","mark","outlined","punctuation","question"],"unicode":"❔"},{"group":8,"hexcode":"2755","label":"white exclamation mark","order":4277,"tags":["!","exclamation","mark","outlined","punctuation"],"unicode":"❕"},{"group":8,"hexcode":"2757","label":"red exclamation mark","order":4278,"tags":["!","exclamation","mark","punctuation"],"unicode":"❗️"},{"group":8,"hexcode":"3030","label":"wavy dash","order":4280,"tags":["dash","punctuation","wavy"],"unicode":"〰️"},{"group":8,"hexcode":"1F4B1","label":"currency exchange","order":4281,"tags":["bank","currency","exchange","money"],"unicode":"💱"},{"group":8,"hexcode":"1F4B2","label":"heavy dollar sign","order":4282,"tags":["currency","dollar","money"],"unicode":"💲"},{"group":8,"hexcode":"2695","label":"medical symbol","order":4284,"tags":["aesculapius","medicine","staff"],"unicode":"⚕️"},{"group":8,"hexcode":"267B","label":"recycling symbol","order":4286,"tags":["recycle"],"unicode":"♻️"},{"group":8,"hexcode":"269C","label":"fleur-de-lis","order":4288,"tags":["fleur-de-lis"],"unicode":"⚜️"},{"group":8,"hexcode":"1F531","label":"trident emblem","order":4289,"tags":["anchor","emblem","ship","tool","trident"],"unicode":"🔱"},{"group":8,"hexcode":"1F4DB","label":"name badge","order":4290,"tags":["badge","name"],"unicode":"📛"},{"group":8,"hexcode":"1F530","label":"Japanese symbol for beginner","order":4291,"tags":["beginner","chevron","japanese","japanese symbol for beginner","leaf"],"unicode":"🔰"},{"group":8,"hexcode":"2B55","label":"hollow red circle","order":4292,"tags":["circle","large","o","red"],"unicode":"⭕️"},{"group":8,"hexcode":"2705","label":"check mark button","order":4293,"tags":["button","check","mark","✓"],"unicode":"✅"},{"group":8,"hexcode":"2611","label":"check box with check","order":4295,"tags":["box","check","✓"],"unicode":"☑️"},{"group":8,"hexcode":"2714","label":"check mark","order":4297,"tags":["check","mark","✓"],"unicode":"✔️"},{"group":8,"hexcode":"274C","label":"cross mark","order":4298,"tags":["cancel","cross","mark","multiplication","multiply","x","×"],"unicode":"❌"},{"group":8,"hexcode":"274E","label":"cross mark button","order":4299,"tags":["mark","square","x","×"],"unicode":"❎"},{"group":8,"hexcode":"27B0","label":"curly loop","order":4300,"tags":["curl","loop"],"unicode":"➰"},{"group":8,"hexcode":"27BF","label":"double curly loop","order":4301,"tags":["curl","double","loop"],"unicode":"➿"},{"group":8,"hexcode":"303D","label":"part alternation mark","order":4303,"tags":["mark","part"],"unicode":"〽️"},{"group":8,"hexcode":"2733","label":"eight-spoked asterisk","order":4305,"tags":["*","asterisk"],"unicode":"✳️"},{"group":8,"hexcode":"2734","label":"eight-pointed star","order":4307,"tags":["*","star"],"unicode":"✴️"},{"group":8,"hexcode":"2747","label":"sparkle","order":4309,"tags":["*"],"unicode":"❇️"},{"group":8,"hexcode":"00A9","label":"copyright","order":4311,"tags":["c"],"unicode":"©️"},{"group":8,"hexcode":"00AE","label":"registered","order":4313,"tags":["r"],"unicode":"®️"},{"group":8,"hexcode":"2122","label":"trade mark","order":4315,"tags":["mark","tm","trademark"],"unicode":"™️"},{"group":8,"hexcode":"0023-FE0F-20E3","label":"keycap: #","order":4316,"tags":["keycap"],"unicode":"#️⃣"},{"group":8,"hexcode":"002A-FE0F-20E3","label":"keycap: *","order":4318,"tags":["keycap"],"unicode":"*️⃣"},{"group":8,"hexcode":"0030-FE0F-20E3","label":"keycap: 0","order":4320,"tags":["keycap"],"unicode":"0️⃣"},{"group":8,"hexcode":"0031-FE0F-20E3","label":"keycap: 1","order":4322,"tags":["keycap"],"unicode":"1️⃣"},{"group":8,"hexcode":"0032-FE0F-20E3","label":"keycap: 2","order":4324,"tags":["keycap"],"unicode":"2️⃣"},{"group":8,"hexcode":"0033-FE0F-20E3","label":"keycap: 3","order":4326,"tags":["keycap"],"unicode":"3️⃣"},{"group":8,"hexcode":"0034-FE0F-20E3","label":"keycap: 4","order":4328,"tags":["keycap"],"unicode":"4️⃣"},{"group":8,"hexcode":"0035-FE0F-20E3","label":"keycap: 5","order":4330,"tags":["keycap"],"unicode":"5️⃣"},{"group":8,"hexcode":"0036-FE0F-20E3","label":"keycap: 6","order":4332,"tags":["keycap"],"unicode":"6️⃣"},{"group":8,"hexcode":"0037-FE0F-20E3","label":"keycap: 7","order":4334,"tags":["keycap"],"unicode":"7️⃣"},{"group":8,"hexcode":"0038-FE0F-20E3","label":"keycap: 8","order":4336,"tags":["keycap"],"unicode":"8️⃣"},{"group":8,"hexcode":"0039-FE0F-20E3","label":"keycap: 9","order":4338,"tags":["keycap"],"unicode":"9️⃣"},{"group":8,"hexcode":"1F51F","label":"keycap: 10","order":4340,"tags":["keycap"],"unicode":"🔟"},{"group":8,"hexcode":"1F520","label":"input latin uppercase","order":4341,"tags":["abcd","input","latin","letters","uppercase"],"unicode":"🔠"},{"group":8,"hexcode":"1F521","label":"input latin lowercase","order":4342,"tags":["abcd","input","latin","letters","lowercase"],"unicode":"🔡"},{"group":8,"hexcode":"1F522","label":"input numbers","order":4343,"tags":["1234","input","numbers"],"unicode":"🔢"},{"group":8,"hexcode":"1F523","label":"input symbols","order":4344,"tags":["input","〒♪&%"],"unicode":"🔣"},{"group":8,"hexcode":"1F524","label":"input latin letters","order":4345,"tags":["abc","alphabet","input","latin","letters"],"unicode":"🔤"},{"group":8,"hexcode":"1F170","label":"A button (blood type)","order":4347,"tags":["a","a button (blood type)","blood type"],"unicode":"🅰️"},{"group":8,"hexcode":"1F18E","label":"AB button (blood type)","order":4348,"tags":["ab","ab button (blood type)","blood type"],"unicode":"🆎"},{"group":8,"hexcode":"1F171","label":"B button (blood type)","order":4350,"tags":["b","b button (blood type)","blood type"],"unicode":"🅱️"},{"group":8,"hexcode":"1F191","label":"CL button","order":4351,"tags":["cl","cl button"],"unicode":"🆑"},{"group":8,"hexcode":"1F192","label":"COOL button","order":4352,"tags":["cool","cool button"],"unicode":"🆒"},{"group":8,"hexcode":"1F193","label":"FREE button","order":4353,"tags":["free","free button"],"unicode":"🆓"},{"group":8,"hexcode":"2139","label":"information","order":4355,"tags":["i"],"unicode":"ℹ️"},{"group":8,"hexcode":"1F194","label":"ID button","order":4356,"tags":["id","id button","identity"],"unicode":"🆔"},{"group":8,"hexcode":"24C2","label":"circled M","order":4358,"tags":["circle","circled m","m"],"unicode":"Ⓜ️"},{"group":8,"hexcode":"1F195","label":"NEW button","order":4359,"tags":["new","new button"],"unicode":"🆕"},{"group":8,"hexcode":"1F196","label":"NG button","order":4360,"tags":["ng","ng button"],"unicode":"🆖"},{"group":8,"hexcode":"1F17E","label":"O button (blood type)","order":4362,"tags":["blood type","o","o button (blood type)"],"unicode":"🅾️"},{"group":8,"hexcode":"1F197","label":"OK button","order":4363,"tags":["ok","ok button"],"unicode":"🆗"},{"group":8,"hexcode":"1F17F","label":"P button","order":4365,"tags":["p","p button","parking"],"unicode":"🅿️"},{"group":8,"hexcode":"1F198","label":"SOS button","order":4366,"tags":["help","sos","sos button"],"unicode":"🆘"},{"group":8,"hexcode":"1F199","label":"UP! button","order":4367,"tags":["mark","up","up!","up! button"],"unicode":"🆙"},{"group":8,"hexcode":"1F19A","label":"VS button","order":4368,"tags":["versus","vs","vs button"],"unicode":"🆚"},{"group":8,"hexcode":"1F201","label":"Japanese “here” button","order":4369,"tags":["japanese","japanese “here” button","katakana","“here”","ココ"],"unicode":"🈁"},{"group":8,"hexcode":"1F202","label":"Japanese “service charge” button","order":4371,"tags":["japanese","japanese “service charge” button","katakana","“service charge”","サ"],"unicode":"🈂️"},{"group":8,"hexcode":"1F237","label":"Japanese “monthly amount” button","order":4373,"tags":["ideograph","japanese","japanese “monthly amount” button","“monthly amount”","月"],"unicode":"🈷️"},{"group":8,"hexcode":"1F236","label":"Japanese “not free of charge” button","order":4374,"tags":["ideograph","japanese","japanese “not free of charge” button","“not free of charge”","有"],"unicode":"🈶"},{"group":8,"hexcode":"1F22F","label":"Japanese “reserved” button","order":4375,"tags":["ideograph","japanese","japanese “reserved” button","“reserved”","指"],"unicode":"🈯️"},{"group":8,"hexcode":"1F250","label":"Japanese “bargain” button","order":4376,"tags":["ideograph","japanese","japanese “bargain” button","“bargain”","得"],"unicode":"🉐"},{"group":8,"hexcode":"1F239","label":"Japanese “discount” button","order":4377,"tags":["ideograph","japanese","japanese “discount” button","“discount”","割"],"unicode":"🈹"},{"group":8,"hexcode":"1F21A","label":"Japanese “free of charge” button","order":4378,"tags":["ideograph","japanese","japanese “free of charge” button","“free of charge”","無"],"unicode":"🈚️"},{"group":8,"hexcode":"1F232","label":"Japanese “prohibited” button","order":4379,"tags":["ideograph","japanese","japanese “prohibited” button","“prohibited”","禁"],"unicode":"🈲"},{"group":8,"hexcode":"1F251","label":"Japanese “acceptable” button","order":4380,"tags":["ideograph","japanese","japanese “acceptable” button","“acceptable”","可"],"unicode":"🉑"},{"group":8,"hexcode":"1F238","label":"Japanese “application” button","order":4381,"tags":["ideograph","japanese","japanese “application” button","“application”","申"],"unicode":"🈸"},{"group":8,"hexcode":"1F234","label":"Japanese “passing grade” button","order":4382,"tags":["ideograph","japanese","japanese “passing grade” button","“passing grade”","合"],"unicode":"🈴"},{"group":8,"hexcode":"1F233","label":"Japanese “vacancy” button","order":4383,"tags":["ideograph","japanese","japanese “vacancy” button","“vacancy”","空"],"unicode":"🈳"},{"group":8,"hexcode":"3297","label":"Japanese “congratulations” button","order":4385,"tags":["ideograph","japanese","japanese “congratulations” button","“congratulations”","祝"],"unicode":"㊗️"},{"group":8,"hexcode":"3299","label":"Japanese “secret” button","order":4387,"tags":["ideograph","japanese","japanese “secret” button","“secret”","秘"],"unicode":"㊙️"},{"group":8,"hexcode":"1F23A","label":"Japanese “open for business” button","order":4388,"tags":["ideograph","japanese","japanese “open for business” button","“open for business”","営"],"unicode":"🈺"},{"group":8,"hexcode":"1F235","label":"Japanese “no vacancy” button","order":4389,"tags":["ideograph","japanese","japanese “no vacancy” button","“no vacancy”","満"],"unicode":"🈵"},{"group":8,"hexcode":"1F534","label":"red circle","order":4390,"tags":["circle","geometric","red"],"unicode":"🔴"},{"group":8,"hexcode":"1F7E0","label":"orange circle","order":4391,"tags":["circle","orange"],"unicode":"🟠"},{"group":8,"hexcode":"1F7E1","label":"yellow circle","order":4392,"tags":["circle","yellow"],"unicode":"🟡"},{"group":8,"hexcode":"1F7E2","label":"green circle","order":4393,"tags":["circle","green"],"unicode":"🟢"},{"group":8,"hexcode":"1F535","label":"blue circle","order":4394,"tags":["blue","circle","geometric"],"unicode":"🔵"},{"group":8,"hexcode":"1F7E3","label":"purple circle","order":4395,"tags":["circle","purple"],"unicode":"🟣"},{"group":8,"hexcode":"1F7E4","label":"brown circle","order":4396,"tags":["brown","circle"],"unicode":"🟤"},{"group":8,"hexcode":"26AB","label":"black circle","order":4397,"tags":["circle","geometric"],"unicode":"⚫️"},{"group":8,"hexcode":"26AA","label":"white circle","order":4398,"tags":["circle","geometric"],"unicode":"⚪️"},{"group":8,"hexcode":"1F7E5","label":"red square","order":4399,"tags":["red","square"],"unicode":"🟥"},{"group":8,"hexcode":"1F7E7","label":"orange square","order":4400,"tags":["orange","square"],"unicode":"🟧"},{"group":8,"hexcode":"1F7E8","label":"yellow square","order":4401,"tags":["square","yellow"],"unicode":"🟨"},{"group":8,"hexcode":"1F7E9","label":"green square","order":4402,"tags":["green","square"],"unicode":"🟩"},{"group":8,"hexcode":"1F7E6","label":"blue square","order":4403,"tags":["blue","square"],"unicode":"🟦"},{"group":8,"hexcode":"1F7EA","label":"purple square","order":4404,"tags":["purple","square"],"unicode":"🟪"},{"group":8,"hexcode":"1F7EB","label":"brown square","order":4405,"tags":["brown","square"],"unicode":"🟫"},{"group":8,"hexcode":"2B1B","label":"black large square","order":4406,"tags":["geometric","square"],"unicode":"⬛️"},{"group":8,"hexcode":"2B1C","label":"white large square","order":4407,"tags":["geometric","square"],"unicode":"⬜️"},{"group":8,"hexcode":"25FC","label":"black medium square","order":4409,"tags":["geometric","square"],"unicode":"◼️"},{"group":8,"hexcode":"25FB","label":"white medium square","order":4411,"tags":["geometric","square"],"unicode":"◻️"},{"group":8,"hexcode":"25FE","label":"black medium-small square","order":4412,"tags":["geometric","square"],"unicode":"◾️"},{"group":8,"hexcode":"25FD","label":"white medium-small square","order":4413,"tags":["geometric","square"],"unicode":"◽️"},{"group":8,"hexcode":"25AA","label":"black small square","order":4415,"tags":["geometric","square"],"unicode":"▪️"},{"group":8,"hexcode":"25AB","label":"white small square","order":4417,"tags":["geometric","square"],"unicode":"▫️"},{"group":8,"hexcode":"1F536","label":"large orange diamond","order":4418,"tags":["diamond","geometric","orange"],"unicode":"🔶"},{"group":8,"hexcode":"1F537","label":"large blue diamond","order":4419,"tags":["blue","diamond","geometric"],"unicode":"🔷"},{"group":8,"hexcode":"1F538","label":"small orange diamond","order":4420,"tags":["diamond","geometric","orange"],"unicode":"🔸"},{"group":8,"hexcode":"1F539","label":"small blue diamond","order":4421,"tags":["blue","diamond","geometric"],"unicode":"🔹"},{"group":8,"hexcode":"1F53A","label":"red triangle pointed up","order":4422,"tags":["geometric","red"],"unicode":"🔺"},{"group":8,"hexcode":"1F53B","label":"red triangle pointed down","order":4423,"tags":["down","geometric","red"],"unicode":"🔻"},{"group":8,"hexcode":"1F4A0","label":"diamond with a dot","order":4424,"tags":["comic","diamond","geometric","inside"],"unicode":"💠"},{"group":8,"hexcode":"1F518","label":"radio button","order":4425,"tags":["button","geometric","radio"],"unicode":"🔘"},{"group":8,"hexcode":"1F533","label":"white square button","order":4426,"tags":["button","geometric","outlined","square"],"unicode":"🔳"},{"group":8,"hexcode":"1F532","label":"black square button","order":4427,"tags":["button","geometric","square"],"unicode":"🔲"},{"group":9,"hexcode":"1F3C1","label":"chequered flag","order":4428,"tags":["checkered","chequered","racing"],"unicode":"🏁"},{"group":9,"hexcode":"1F6A9","label":"triangular flag","order":4429,"tags":["post"],"unicode":"🚩"},{"group":9,"hexcode":"1F38C","label":"crossed flags","order":4430,"tags":["celebration","cross","crossed","japanese"],"unicode":"🎌"},{"group":9,"hexcode":"1F3F4","label":"black flag","order":4431,"tags":["waving"],"unicode":"🏴"},{"group":9,"hexcode":"1F3F3","label":"white flag","order":4433,"tags":["waving"],"unicode":"🏳️"},{"group":9,"hexcode":"1F3F3-FE0F-200D-1F308","label":"rainbow flag","order":4434,"tags":["pride","rainbow"],"unicode":"🏳️🌈"},{"group":9,"hexcode":"1F3F3-FE0F-200D-26A7-FE0F","label":"transgender flag","order":4436,"tags":["flag","light blue","pink","transgender","white"],"unicode":"🏳️⚧️"},{"group":9,"hexcode":"1F3F4-200D-2620-FE0F","label":"pirate flag","order":4440,"tags":["jolly roger","pirate","plunder","treasure"],"unicode":"🏴☠️"},{"group":9,"hexcode":"1F1E6-1F1E8","label":"flag: Ascension Island","order":4442,"tags":["AC","flag"],"unicode":"🇦🇨"},{"group":9,"hexcode":"1F1E6-1F1E9","label":"flag: Andorra","order":4443,"tags":["AD","flag"],"unicode":"🇦🇩"},{"group":9,"hexcode":"1F1E6-1F1EA","label":"flag: United Arab Emirates","order":4444,"tags":["AE","flag"],"unicode":"🇦🇪"},{"group":9,"hexcode":"1F1E6-1F1EB","label":"flag: Afghanistan","order":4445,"tags":["AF","flag"],"unicode":"🇦🇫"},{"group":9,"hexcode":"1F1E6-1F1EC","label":"flag: Antigua & Barbuda","order":4446,"tags":["AG","flag"],"unicode":"🇦🇬"},{"group":9,"hexcode":"1F1E6-1F1EE","label":"flag: Anguilla","order":4447,"tags":["AI","flag"],"unicode":"🇦🇮"},{"group":9,"hexcode":"1F1E6-1F1F1","label":"flag: Albania","order":4448,"tags":["AL","flag"],"unicode":"🇦🇱"},{"group":9,"hexcode":"1F1E6-1F1F2","label":"flag: Armenia","order":4449,"tags":["AM","flag"],"unicode":"🇦🇲"},{"group":9,"hexcode":"1F1E6-1F1F4","label":"flag: Angola","order":4450,"tags":["AO","flag"],"unicode":"🇦🇴"},{"group":9,"hexcode":"1F1E6-1F1F6","label":"flag: Antarctica","order":4451,"tags":["AQ","flag"],"unicode":"🇦🇶"},{"group":9,"hexcode":"1F1E6-1F1F7","label":"flag: Argentina","order":4452,"tags":["AR","flag"],"unicode":"🇦🇷"},{"group":9,"hexcode":"1F1E6-1F1F8","label":"flag: American Samoa","order":4453,"tags":["AS","flag"],"unicode":"🇦🇸"},{"group":9,"hexcode":"1F1E6-1F1F9","label":"flag: Austria","order":4454,"tags":["AT","flag"],"unicode":"🇦🇹"},{"group":9,"hexcode":"1F1E6-1F1FA","label":"flag: Australia","order":4455,"tags":["AU","flag"],"unicode":"🇦🇺"},{"group":9,"hexcode":"1F1E6-1F1FC","label":"flag: Aruba","order":4456,"tags":["AW","flag"],"unicode":"🇦🇼"},{"group":9,"hexcode":"1F1E6-1F1FD","label":"flag: Åland Islands","order":4457,"tags":["AX","flag"],"unicode":"🇦🇽"},{"group":9,"hexcode":"1F1E6-1F1FF","label":"flag: Azerbaijan","order":4458,"tags":["AZ","flag"],"unicode":"🇦🇿"},{"group":9,"hexcode":"1F1E7-1F1E6","label":"flag: Bosnia & Herzegovina","order":4459,"tags":["BA","flag"],"unicode":"🇧🇦"},{"group":9,"hexcode":"1F1E7-1F1E7","label":"flag: Barbados","order":4460,"tags":["BB","flag"],"unicode":"🇧🇧"},{"group":9,"hexcode":"1F1E7-1F1E9","label":"flag: Bangladesh","order":4461,"tags":["BD","flag"],"unicode":"🇧🇩"},{"group":9,"hexcode":"1F1E7-1F1EA","label":"flag: Belgium","order":4462,"tags":["BE","flag"],"unicode":"🇧🇪"},{"group":9,"hexcode":"1F1E7-1F1EB","label":"flag: Burkina Faso","order":4463,"tags":["BF","flag"],"unicode":"🇧🇫"},{"group":9,"hexcode":"1F1E7-1F1EC","label":"flag: Bulgaria","order":4464,"tags":["BG","flag"],"unicode":"🇧🇬"},{"group":9,"hexcode":"1F1E7-1F1ED","label":"flag: Bahrain","order":4465,"tags":["BH","flag"],"unicode":"🇧🇭"},{"group":9,"hexcode":"1F1E7-1F1EE","label":"flag: Burundi","order":4466,"tags":["BI","flag"],"unicode":"🇧🇮"},{"group":9,"hexcode":"1F1E7-1F1EF","label":"flag: Benin","order":4467,"tags":["BJ","flag"],"unicode":"🇧🇯"},{"group":9,"hexcode":"1F1E7-1F1F1","label":"flag: St. Barthélemy","order":4468,"tags":["BL","flag"],"unicode":"🇧🇱"},{"group":9,"hexcode":"1F1E7-1F1F2","label":"flag: Bermuda","order":4469,"tags":["BM","flag"],"unicode":"🇧🇲"},{"group":9,"hexcode":"1F1E7-1F1F3","label":"flag: Brunei","order":4470,"tags":["BN","flag"],"unicode":"🇧🇳"},{"group":9,"hexcode":"1F1E7-1F1F4","label":"flag: Bolivia","order":4471,"tags":["BO","flag"],"unicode":"🇧🇴"},{"group":9,"hexcode":"1F1E7-1F1F6","label":"flag: Caribbean Netherlands","order":4472,"tags":["BQ","flag"],"unicode":"🇧🇶"},{"group":9,"hexcode":"1F1E7-1F1F7","label":"flag: Brazil","order":4473,"tags":["BR","flag"],"unicode":"🇧🇷"},{"group":9,"hexcode":"1F1E7-1F1F8","label":"flag: Bahamas","order":4474,"tags":["BS","flag"],"unicode":"🇧🇸"},{"group":9,"hexcode":"1F1E7-1F1F9","label":"flag: Bhutan","order":4475,"tags":["BT","flag"],"unicode":"🇧🇹"},{"group":9,"hexcode":"1F1E7-1F1FB","label":"flag: Bouvet Island","order":4476,"tags":["BV","flag"],"unicode":"🇧🇻"},{"group":9,"hexcode":"1F1E7-1F1FC","label":"flag: Botswana","order":4477,"tags":["BW","flag"],"unicode":"🇧🇼"},{"group":9,"hexcode":"1F1E7-1F1FE","label":"flag: Belarus","order":4478,"tags":["BY","flag"],"unicode":"🇧🇾"},{"group":9,"hexcode":"1F1E7-1F1FF","label":"flag: Belize","order":4479,"tags":["BZ","flag"],"unicode":"🇧🇿"},{"group":9,"hexcode":"1F1E8-1F1E6","label":"flag: Canada","order":4480,"tags":["CA","flag"],"unicode":"🇨🇦"},{"group":9,"hexcode":"1F1E8-1F1E8","label":"flag: Cocos (Keeling) Islands","order":4481,"tags":["CC","flag"],"unicode":"🇨🇨"},{"group":9,"hexcode":"1F1E8-1F1E9","label":"flag: Congo - Kinshasa","order":4482,"tags":["CD","flag"],"unicode":"🇨🇩"},{"group":9,"hexcode":"1F1E8-1F1EB","label":"flag: Central African Republic","order":4483,"tags":["CF","flag"],"unicode":"🇨🇫"},{"group":9,"hexcode":"1F1E8-1F1EC","label":"flag: Congo - Brazzaville","order":4484,"tags":["CG","flag"],"unicode":"🇨🇬"},{"group":9,"hexcode":"1F1E8-1F1ED","label":"flag: Switzerland","order":4485,"tags":["CH","flag"],"unicode":"🇨🇭"},{"group":9,"hexcode":"1F1E8-1F1EE","label":"flag: Côte d’Ivoire","order":4486,"tags":["CI","flag"],"unicode":"🇨🇮"},{"group":9,"hexcode":"1F1E8-1F1F0","label":"flag: Cook Islands","order":4487,"tags":["CK","flag"],"unicode":"🇨🇰"},{"group":9,"hexcode":"1F1E8-1F1F1","label":"flag: Chile","order":4488,"tags":["CL","flag"],"unicode":"🇨🇱"},{"group":9,"hexcode":"1F1E8-1F1F2","label":"flag: Cameroon","order":4489,"tags":["CM","flag"],"unicode":"🇨🇲"},{"group":9,"hexcode":"1F1E8-1F1F3","label":"flag: China","order":4490,"tags":["CN","flag"],"unicode":"🇨🇳"},{"group":9,"hexcode":"1F1E8-1F1F4","label":"flag: Colombia","order":4491,"tags":["CO","flag"],"unicode":"🇨🇴"},{"group":9,"hexcode":"1F1E8-1F1F5","label":"flag: Clipperton Island","order":4492,"tags":["CP","flag"],"unicode":"🇨🇵"},{"group":9,"hexcode":"1F1E8-1F1F7","label":"flag: Costa Rica","order":4493,"tags":["CR","flag"],"unicode":"🇨🇷"},{"group":9,"hexcode":"1F1E8-1F1FA","label":"flag: Cuba","order":4494,"tags":["CU","flag"],"unicode":"🇨🇺"},{"group":9,"hexcode":"1F1E8-1F1FB","label":"flag: Cape Verde","order":4495,"tags":["CV","flag"],"unicode":"🇨🇻"},{"group":9,"hexcode":"1F1E8-1F1FC","label":"flag: Curaçao","order":4496,"tags":["CW","flag"],"unicode":"🇨🇼"},{"group":9,"hexcode":"1F1E8-1F1FD","label":"flag: Christmas Island","order":4497,"tags":["CX","flag"],"unicode":"🇨🇽"},{"group":9,"hexcode":"1F1E8-1F1FE","label":"flag: Cyprus","order":4498,"tags":["CY","flag"],"unicode":"🇨🇾"},{"group":9,"hexcode":"1F1E8-1F1FF","label":"flag: Czechia","order":4499,"tags":["CZ","flag"],"unicode":"🇨🇿"},{"group":9,"hexcode":"1F1E9-1F1EA","label":"flag: Germany","order":4500,"tags":["DE","flag"],"unicode":"🇩🇪"},{"group":9,"hexcode":"1F1E9-1F1EC","label":"flag: Diego Garcia","order":4501,"tags":["DG","flag"],"unicode":"🇩🇬"},{"group":9,"hexcode":"1F1E9-1F1EF","label":"flag: Djibouti","order":4502,"tags":["DJ","flag"],"unicode":"🇩🇯"},{"group":9,"hexcode":"1F1E9-1F1F0","label":"flag: Denmark","order":4503,"tags":["DK","flag"],"unicode":"🇩🇰"},{"group":9,"hexcode":"1F1E9-1F1F2","label":"flag: Dominica","order":4504,"tags":["DM","flag"],"unicode":"🇩🇲"},{"group":9,"hexcode":"1F1E9-1F1F4","label":"flag: Dominican Republic","order":4505,"tags":["DO","flag"],"unicode":"🇩🇴"},{"group":9,"hexcode":"1F1E9-1F1FF","label":"flag: Algeria","order":4506,"tags":["DZ","flag"],"unicode":"🇩🇿"},{"group":9,"hexcode":"1F1EA-1F1E6","label":"flag: Ceuta & Melilla","order":4507,"tags":["EA","flag"],"unicode":"🇪🇦"},{"group":9,"hexcode":"1F1EA-1F1E8","label":"flag: Ecuador","order":4508,"tags":["EC","flag"],"unicode":"🇪🇨"},{"group":9,"hexcode":"1F1EA-1F1EA","label":"flag: Estonia","order":4509,"tags":["EE","flag"],"unicode":"🇪🇪"},{"group":9,"hexcode":"1F1EA-1F1EC","label":"flag: Egypt","order":4510,"tags":["EG","flag"],"unicode":"🇪🇬"},{"group":9,"hexcode":"1F1EA-1F1ED","label":"flag: Western Sahara","order":4511,"tags":["EH","flag"],"unicode":"🇪🇭"},{"group":9,"hexcode":"1F1EA-1F1F7","label":"flag: Eritrea","order":4512,"tags":["ER","flag"],"unicode":"🇪🇷"},{"group":9,"hexcode":"1F1EA-1F1F8","label":"flag: Spain","order":4513,"tags":["ES","flag"],"unicode":"🇪🇸"},{"group":9,"hexcode":"1F1EA-1F1F9","label":"flag: Ethiopia","order":4514,"tags":["ET","flag"],"unicode":"🇪🇹"},{"group":9,"hexcode":"1F1EA-1F1FA","label":"flag: European Union","order":4515,"tags":["EU","flag"],"unicode":"🇪🇺"},{"group":9,"hexcode":"1F1EB-1F1EE","label":"flag: Finland","order":4516,"tags":["FI","flag"],"unicode":"🇫🇮"},{"group":9,"hexcode":"1F1EB-1F1EF","label":"flag: Fiji","order":4517,"tags":["FJ","flag"],"unicode":"🇫🇯"},{"group":9,"hexcode":"1F1EB-1F1F0","label":"flag: Falkland Islands","order":4518,"tags":["FK","flag"],"unicode":"🇫🇰"},{"group":9,"hexcode":"1F1EB-1F1F2","label":"flag: Micronesia","order":4519,"tags":["FM","flag"],"unicode":"🇫🇲"},{"group":9,"hexcode":"1F1EB-1F1F4","label":"flag: Faroe Islands","order":4520,"tags":["FO","flag"],"unicode":"🇫🇴"},{"group":9,"hexcode":"1F1EB-1F1F7","label":"flag: France","order":4521,"tags":["FR","flag"],"unicode":"🇫🇷"},{"group":9,"hexcode":"1F1EC-1F1E6","label":"flag: Gabon","order":4522,"tags":["GA","flag"],"unicode":"🇬🇦"},{"group":9,"hexcode":"1F1EC-1F1E7","label":"flag: United Kingdom","order":4523,"tags":["GB","flag"],"unicode":"🇬🇧"},{"group":9,"hexcode":"1F1EC-1F1E9","label":"flag: Grenada","order":4524,"tags":["GD","flag"],"unicode":"🇬🇩"},{"group":9,"hexcode":"1F1EC-1F1EA","label":"flag: Georgia","order":4525,"tags":["GE","flag"],"unicode":"🇬🇪"},{"group":9,"hexcode":"1F1EC-1F1EB","label":"flag: French Guiana","order":4526,"tags":["GF","flag"],"unicode":"🇬🇫"},{"group":9,"hexcode":"1F1EC-1F1EC","label":"flag: Guernsey","order":4527,"tags":["GG","flag"],"unicode":"🇬🇬"},{"group":9,"hexcode":"1F1EC-1F1ED","label":"flag: Ghana","order":4528,"tags":["GH","flag"],"unicode":"🇬🇭"},{"group":9,"hexcode":"1F1EC-1F1EE","label":"flag: Gibraltar","order":4529,"tags":["GI","flag"],"unicode":"🇬🇮"},{"group":9,"hexcode":"1F1EC-1F1F1","label":"flag: Greenland","order":4530,"tags":["GL","flag"],"unicode":"🇬🇱"},{"group":9,"hexcode":"1F1EC-1F1F2","label":"flag: Gambia","order":4531,"tags":["GM","flag"],"unicode":"🇬🇲"},{"group":9,"hexcode":"1F1EC-1F1F3","label":"flag: Guinea","order":4532,"tags":["GN","flag"],"unicode":"🇬🇳"},{"group":9,"hexcode":"1F1EC-1F1F5","label":"flag: Guadeloupe","order":4533,"tags":["GP","flag"],"unicode":"🇬🇵"},{"group":9,"hexcode":"1F1EC-1F1F6","label":"flag: Equatorial Guinea","order":4534,"tags":["GQ","flag"],"unicode":"🇬🇶"},{"group":9,"hexcode":"1F1EC-1F1F7","label":"flag: Greece","order":4535,"tags":["GR","flag"],"unicode":"🇬🇷"},{"group":9,"hexcode":"1F1EC-1F1F8","label":"flag: South Georgia & South Sandwich Islands","order":4536,"tags":["GS","flag"],"unicode":"🇬🇸"},{"group":9,"hexcode":"1F1EC-1F1F9","label":"flag: Guatemala","order":4537,"tags":["GT","flag"],"unicode":"🇬🇹"},{"group":9,"hexcode":"1F1EC-1F1FA","label":"flag: Guam","order":4538,"tags":["GU","flag"],"unicode":"🇬🇺"},{"group":9,"hexcode":"1F1EC-1F1FC","label":"flag: Guinea-Bissau","order":4539,"tags":["GW","flag"],"unicode":"🇬🇼"},{"group":9,"hexcode":"1F1EC-1F1FE","label":"flag: Guyana","order":4540,"tags":["GY","flag"],"unicode":"🇬🇾"},{"group":9,"hexcode":"1F1ED-1F1F0","label":"flag: Hong Kong SAR China","order":4541,"tags":["HK","flag"],"unicode":"🇭🇰"},{"group":9,"hexcode":"1F1ED-1F1F2","label":"flag: Heard & McDonald Islands","order":4542,"tags":["HM","flag"],"unicode":"🇭🇲"},{"group":9,"hexcode":"1F1ED-1F1F3","label":"flag: Honduras","order":4543,"tags":["HN","flag"],"unicode":"🇭🇳"},{"group":9,"hexcode":"1F1ED-1F1F7","label":"flag: Croatia","order":4544,"tags":["HR","flag"],"unicode":"🇭🇷"},{"group":9,"hexcode":"1F1ED-1F1F9","label":"flag: Haiti","order":4545,"tags":["HT","flag"],"unicode":"🇭🇹"},{"group":9,"hexcode":"1F1ED-1F1FA","label":"flag: Hungary","order":4546,"tags":["HU","flag"],"unicode":"🇭🇺"},{"group":9,"hexcode":"1F1EE-1F1E8","label":"flag: Canary Islands","order":4547,"tags":["IC","flag"],"unicode":"🇮🇨"},{"group":9,"hexcode":"1F1EE-1F1E9","label":"flag: Indonesia","order":4548,"tags":["ID","flag"],"unicode":"🇮🇩"},{"group":9,"hexcode":"1F1EE-1F1EA","label":"flag: Ireland","order":4549,"tags":["IE","flag"],"unicode":"🇮🇪"},{"group":9,"hexcode":"1F1EE-1F1F1","label":"flag: Israel","order":4550,"tags":["IL","flag"],"unicode":"🇮🇱"},{"group":9,"hexcode":"1F1EE-1F1F2","label":"flag: Isle of Man","order":4551,"tags":["IM","flag"],"unicode":"🇮🇲"},{"group":9,"hexcode":"1F1EE-1F1F3","label":"flag: India","order":4552,"tags":["IN","flag"],"unicode":"🇮🇳"},{"group":9,"hexcode":"1F1EE-1F1F4","label":"flag: British Indian Ocean Territory","order":4553,"tags":["IO","flag"],"unicode":"🇮🇴"},{"group":9,"hexcode":"1F1EE-1F1F6","label":"flag: Iraq","order":4554,"tags":["IQ","flag"],"unicode":"🇮🇶"},{"group":9,"hexcode":"1F1EE-1F1F7","label":"flag: Iran","order":4555,"tags":["IR","flag"],"unicode":"🇮🇷"},{"group":9,"hexcode":"1F1EE-1F1F8","label":"flag: Iceland","order":4556,"tags":["IS","flag"],"unicode":"🇮🇸"},{"group":9,"hexcode":"1F1EE-1F1F9","label":"flag: Italy","order":4557,"tags":["IT","flag"],"unicode":"🇮🇹"},{"group":9,"hexcode":"1F1EF-1F1EA","label":"flag: Jersey","order":4558,"tags":["JE","flag"],"unicode":"🇯🇪"},{"group":9,"hexcode":"1F1EF-1F1F2","label":"flag: Jamaica","order":4559,"tags":["JM","flag"],"unicode":"🇯🇲"},{"group":9,"hexcode":"1F1EF-1F1F4","label":"flag: Jordan","order":4560,"tags":["JO","flag"],"unicode":"🇯🇴"},{"group":9,"hexcode":"1F1EF-1F1F5","label":"flag: Japan","order":4561,"tags":["JP","flag"],"unicode":"🇯🇵"},{"group":9,"hexcode":"1F1F0-1F1EA","label":"flag: Kenya","order":4562,"tags":["KE","flag"],"unicode":"🇰🇪"},{"group":9,"hexcode":"1F1F0-1F1EC","label":"flag: Kyrgyzstan","order":4563,"tags":["KG","flag"],"unicode":"🇰🇬"},{"group":9,"hexcode":"1F1F0-1F1ED","label":"flag: Cambodia","order":4564,"tags":["KH","flag"],"unicode":"🇰🇭"},{"group":9,"hexcode":"1F1F0-1F1EE","label":"flag: Kiribati","order":4565,"tags":["KI","flag"],"unicode":"🇰🇮"},{"group":9,"hexcode":"1F1F0-1F1F2","label":"flag: Comoros","order":4566,"tags":["KM","flag"],"unicode":"🇰🇲"},{"group":9,"hexcode":"1F1F0-1F1F3","label":"flag: St. Kitts & Nevis","order":4567,"tags":["KN","flag"],"unicode":"🇰🇳"},{"group":9,"hexcode":"1F1F0-1F1F5","label":"flag: North Korea","order":4568,"tags":["KP","flag"],"unicode":"🇰🇵"},{"group":9,"hexcode":"1F1F0-1F1F7","label":"flag: South Korea","order":4569,"tags":["KR","flag"],"unicode":"🇰🇷"},{"group":9,"hexcode":"1F1F0-1F1FC","label":"flag: Kuwait","order":4570,"tags":["KW","flag"],"unicode":"🇰🇼"},{"group":9,"hexcode":"1F1F0-1F1FE","label":"flag: Cayman Islands","order":4571,"tags":["KY","flag"],"unicode":"🇰🇾"},{"group":9,"hexcode":"1F1F0-1F1FF","label":"flag: Kazakhstan","order":4572,"tags":["KZ","flag"],"unicode":"🇰🇿"},{"group":9,"hexcode":"1F1F1-1F1E6","label":"flag: Laos","order":4573,"tags":["LA","flag"],"unicode":"🇱🇦"},{"group":9,"hexcode":"1F1F1-1F1E7","label":"flag: Lebanon","order":4574,"tags":["LB","flag"],"unicode":"🇱🇧"},{"group":9,"hexcode":"1F1F1-1F1E8","label":"flag: St. Lucia","order":4575,"tags":["LC","flag"],"unicode":"🇱🇨"},{"group":9,"hexcode":"1F1F1-1F1EE","label":"flag: Liechtenstein","order":4576,"tags":["LI","flag"],"unicode":"🇱🇮"},{"group":9,"hexcode":"1F1F1-1F1F0","label":"flag: Sri Lanka","order":4577,"tags":["LK","flag"],"unicode":"🇱🇰"},{"group":9,"hexcode":"1F1F1-1F1F7","label":"flag: Liberia","order":4578,"tags":["LR","flag"],"unicode":"🇱🇷"},{"group":9,"hexcode":"1F1F1-1F1F8","label":"flag: Lesotho","order":4579,"tags":["LS","flag"],"unicode":"🇱🇸"},{"group":9,"hexcode":"1F1F1-1F1F9","label":"flag: Lithuania","order":4580,"tags":["LT","flag"],"unicode":"🇱🇹"},{"group":9,"hexcode":"1F1F1-1F1FA","label":"flag: Luxembourg","order":4581,"tags":["LU","flag"],"unicode":"🇱🇺"},{"group":9,"hexcode":"1F1F1-1F1FB","label":"flag: Latvia","order":4582,"tags":["LV","flag"],"unicode":"🇱🇻"},{"group":9,"hexcode":"1F1F1-1F1FE","label":"flag: Libya","order":4583,"tags":["LY","flag"],"unicode":"🇱🇾"},{"group":9,"hexcode":"1F1F2-1F1E6","label":"flag: Morocco","order":4584,"tags":["MA","flag"],"unicode":"🇲🇦"},{"group":9,"hexcode":"1F1F2-1F1E8","label":"flag: Monaco","order":4585,"tags":["MC","flag"],"unicode":"🇲🇨"},{"group":9,"hexcode":"1F1F2-1F1E9","label":"flag: Moldova","order":4586,"tags":["MD","flag"],"unicode":"🇲🇩"},{"group":9,"hexcode":"1F1F2-1F1EA","label":"flag: Montenegro","order":4587,"tags":["ME","flag"],"unicode":"🇲🇪"},{"group":9,"hexcode":"1F1F2-1F1EB","label":"flag: St. Martin","order":4588,"tags":["MF","flag"],"unicode":"🇲🇫"},{"group":9,"hexcode":"1F1F2-1F1EC","label":"flag: Madagascar","order":4589,"tags":["MG","flag"],"unicode":"🇲🇬"},{"group":9,"hexcode":"1F1F2-1F1ED","label":"flag: Marshall Islands","order":4590,"tags":["MH","flag"],"unicode":"🇲🇭"},{"group":9,"hexcode":"1F1F2-1F1F0","label":"flag: North Macedonia","order":4591,"tags":["MK","flag"],"unicode":"🇲🇰"},{"group":9,"hexcode":"1F1F2-1F1F1","label":"flag: Mali","order":4592,"tags":["ML","flag"],"unicode":"🇲🇱"},{"group":9,"hexcode":"1F1F2-1F1F2","label":"flag: Myanmar (Burma)","order":4593,"tags":["MM","flag"],"unicode":"🇲🇲"},{"group":9,"hexcode":"1F1F2-1F1F3","label":"flag: Mongolia","order":4594,"tags":["MN","flag"],"unicode":"🇲🇳"},{"group":9,"hexcode":"1F1F2-1F1F4","label":"flag: Macao SAR China","order":4595,"tags":["MO","flag"],"unicode":"🇲🇴"},{"group":9,"hexcode":"1F1F2-1F1F5","label":"flag: Northern Mariana Islands","order":4596,"tags":["MP","flag"],"unicode":"🇲🇵"},{"group":9,"hexcode":"1F1F2-1F1F6","label":"flag: Martinique","order":4597,"tags":["MQ","flag"],"unicode":"🇲🇶"},{"group":9,"hexcode":"1F1F2-1F1F7","label":"flag: Mauritania","order":4598,"tags":["MR","flag"],"unicode":"🇲🇷"},{"group":9,"hexcode":"1F1F2-1F1F8","label":"flag: Montserrat","order":4599,"tags":["MS","flag"],"unicode":"🇲🇸"},{"group":9,"hexcode":"1F1F2-1F1F9","label":"flag: Malta","order":4600,"tags":["MT","flag"],"unicode":"🇲🇹"},{"group":9,"hexcode":"1F1F2-1F1FA","label":"flag: Mauritius","order":4601,"tags":["MU","flag"],"unicode":"🇲🇺"},{"group":9,"hexcode":"1F1F2-1F1FB","label":"flag: Maldives","order":4602,"tags":["MV","flag"],"unicode":"🇲🇻"},{"group":9,"hexcode":"1F1F2-1F1FC","label":"flag: Malawi","order":4603,"tags":["MW","flag"],"unicode":"🇲🇼"},{"group":9,"hexcode":"1F1F2-1F1FD","label":"flag: Mexico","order":4604,"tags":["MX","flag"],"unicode":"🇲🇽"},{"group":9,"hexcode":"1F1F2-1F1FE","label":"flag: Malaysia","order":4605,"tags":["MY","flag"],"unicode":"🇲🇾"},{"group":9,"hexcode":"1F1F2-1F1FF","label":"flag: Mozambique","order":4606,"tags":["MZ","flag"],"unicode":"🇲🇿"},{"group":9,"hexcode":"1F1F3-1F1E6","label":"flag: Namibia","order":4607,"tags":["NA","flag"],"unicode":"🇳🇦"},{"group":9,"hexcode":"1F1F3-1F1E8","label":"flag: New Caledonia","order":4608,"tags":["NC","flag"],"unicode":"🇳🇨"},{"group":9,"hexcode":"1F1F3-1F1EA","label":"flag: Niger","order":4609,"tags":["NE","flag"],"unicode":"🇳🇪"},{"group":9,"hexcode":"1F1F3-1F1EB","label":"flag: Norfolk Island","order":4610,"tags":["NF","flag"],"unicode":"🇳🇫"},{"group":9,"hexcode":"1F1F3-1F1EC","label":"flag: Nigeria","order":4611,"tags":["NG","flag"],"unicode":"🇳🇬"},{"group":9,"hexcode":"1F1F3-1F1EE","label":"flag: Nicaragua","order":4612,"tags":["NI","flag"],"unicode":"🇳🇮"},{"group":9,"hexcode":"1F1F3-1F1F1","label":"flag: Netherlands","order":4613,"tags":["NL","flag"],"unicode":"🇳🇱"},{"group":9,"hexcode":"1F1F3-1F1F4","label":"flag: Norway","order":4614,"tags":["NO","flag"],"unicode":"🇳🇴"},{"group":9,"hexcode":"1F1F3-1F1F5","label":"flag: Nepal","order":4615,"tags":["NP","flag"],"unicode":"🇳🇵"},{"group":9,"hexcode":"1F1F3-1F1F7","label":"flag: Nauru","order":4616,"tags":["NR","flag"],"unicode":"🇳🇷"},{"group":9,"hexcode":"1F1F3-1F1FA","label":"flag: Niue","order":4617,"tags":["NU","flag"],"unicode":"🇳🇺"},{"group":9,"hexcode":"1F1F3-1F1FF","label":"flag: New Zealand","order":4618,"tags":["NZ","flag"],"unicode":"🇳🇿"},{"group":9,"hexcode":"1F1F4-1F1F2","label":"flag: Oman","order":4619,"tags":["OM","flag"],"unicode":"🇴🇲"},{"group":9,"hexcode":"1F1F5-1F1E6","label":"flag: Panama","order":4620,"tags":["PA","flag"],"unicode":"🇵🇦"},{"group":9,"hexcode":"1F1F5-1F1EA","label":"flag: Peru","order":4621,"tags":["PE","flag"],"unicode":"🇵🇪"},{"group":9,"hexcode":"1F1F5-1F1EB","label":"flag: French Polynesia","order":4622,"tags":["PF","flag"],"unicode":"🇵🇫"},{"group":9,"hexcode":"1F1F5-1F1EC","label":"flag: Papua New Guinea","order":4623,"tags":["PG","flag"],"unicode":"🇵🇬"},{"group":9,"hexcode":"1F1F5-1F1ED","label":"flag: Philippines","order":4624,"tags":["PH","flag"],"unicode":"🇵🇭"},{"group":9,"hexcode":"1F1F5-1F1F0","label":"flag: Pakistan","order":4625,"tags":["PK","flag"],"unicode":"🇵🇰"},{"group":9,"hexcode":"1F1F5-1F1F1","label":"flag: Poland","order":4626,"tags":["PL","flag"],"unicode":"🇵🇱"},{"group":9,"hexcode":"1F1F5-1F1F2","label":"flag: St. Pierre & Miquelon","order":4627,"tags":["PM","flag"],"unicode":"🇵🇲"},{"group":9,"hexcode":"1F1F5-1F1F3","label":"flag: Pitcairn Islands","order":4628,"tags":["PN","flag"],"unicode":"🇵🇳"},{"group":9,"hexcode":"1F1F5-1F1F7","label":"flag: Puerto Rico","order":4629,"tags":["PR","flag"],"unicode":"🇵🇷"},{"group":9,"hexcode":"1F1F5-1F1F8","label":"flag: Palestinian Territories","order":4630,"tags":["PS","flag"],"unicode":"🇵🇸"},{"group":9,"hexcode":"1F1F5-1F1F9","label":"flag: Portugal","order":4631,"tags":["PT","flag"],"unicode":"🇵🇹"},{"group":9,"hexcode":"1F1F5-1F1FC","label":"flag: Palau","order":4632,"tags":["PW","flag"],"unicode":"🇵🇼"},{"group":9,"hexcode":"1F1F5-1F1FE","label":"flag: Paraguay","order":4633,"tags":["PY","flag"],"unicode":"🇵🇾"},{"group":9,"hexcode":"1F1F6-1F1E6","label":"flag: Qatar","order":4634,"tags":["QA","flag"],"unicode":"🇶🇦"},{"group":9,"hexcode":"1F1F7-1F1EA","label":"flag: Réunion","order":4635,"tags":["RE","flag"],"unicode":"🇷🇪"},{"group":9,"hexcode":"1F1F7-1F1F4","label":"flag: Romania","order":4636,"tags":["RO","flag"],"unicode":"🇷🇴"},{"group":9,"hexcode":"1F1F7-1F1F8","label":"flag: Serbia","order":4637,"tags":["RS","flag"],"unicode":"🇷🇸"},{"group":9,"hexcode":"1F1F7-1F1FA","label":"flag: Russia","order":4638,"tags":["RU","flag"],"unicode":"🇷🇺"},{"group":9,"hexcode":"1F1F7-1F1FC","label":"flag: Rwanda","order":4639,"tags":["RW","flag"],"unicode":"🇷🇼"},{"group":9,"hexcode":"1F1F8-1F1E6","label":"flag: Saudi Arabia","order":4640,"tags":["SA","flag"],"unicode":"🇸🇦"},{"group":9,"hexcode":"1F1F8-1F1E7","label":"flag: Solomon Islands","order":4641,"tags":["SB","flag"],"unicode":"🇸🇧"},{"group":9,"hexcode":"1F1F8-1F1E8","label":"flag: Seychelles","order":4642,"tags":["SC","flag"],"unicode":"🇸🇨"},{"group":9,"hexcode":"1F1F8-1F1E9","label":"flag: Sudan","order":4643,"tags":["SD","flag"],"unicode":"🇸🇩"},{"group":9,"hexcode":"1F1F8-1F1EA","label":"flag: Sweden","order":4644,"tags":["SE","flag"],"unicode":"🇸🇪"},{"group":9,"hexcode":"1F1F8-1F1EC","label":"flag: Singapore","order":4645,"tags":["SG","flag"],"unicode":"🇸🇬"},{"group":9,"hexcode":"1F1F8-1F1ED","label":"flag: St. Helena","order":4646,"tags":["SH","flag"],"unicode":"🇸🇭"},{"group":9,"hexcode":"1F1F8-1F1EE","label":"flag: Slovenia","order":4647,"tags":["SI","flag"],"unicode":"🇸🇮"},{"group":9,"hexcode":"1F1F8-1F1EF","label":"flag: Svalbard & Jan Mayen","order":4648,"tags":["SJ","flag"],"unicode":"🇸🇯"},{"group":9,"hexcode":"1F1F8-1F1F0","label":"flag: Slovakia","order":4649,"tags":["SK","flag"],"unicode":"🇸🇰"},{"group":9,"hexcode":"1F1F8-1F1F1","label":"flag: Sierra Leone","order":4650,"tags":["SL","flag"],"unicode":"🇸🇱"},{"group":9,"hexcode":"1F1F8-1F1F2","label":"flag: San Marino","order":4651,"tags":["SM","flag"],"unicode":"🇸🇲"},{"group":9,"hexcode":"1F1F8-1F1F3","label":"flag: Senegal","order":4652,"tags":["SN","flag"],"unicode":"🇸🇳"},{"group":9,"hexcode":"1F1F8-1F1F4","label":"flag: Somalia","order":4653,"tags":["SO","flag"],"unicode":"🇸🇴"},{"group":9,"hexcode":"1F1F8-1F1F7","label":"flag: Suriname","order":4654,"tags":["SR","flag"],"unicode":"🇸🇷"},{"group":9,"hexcode":"1F1F8-1F1F8","label":"flag: South Sudan","order":4655,"tags":["SS","flag"],"unicode":"🇸🇸"},{"group":9,"hexcode":"1F1F8-1F1F9","label":"flag: São Tomé & Príncipe","order":4656,"tags":["ST","flag"],"unicode":"🇸🇹"},{"group":9,"hexcode":"1F1F8-1F1FB","label":"flag: El Salvador","order":4657,"tags":["SV","flag"],"unicode":"🇸🇻"},{"group":9,"hexcode":"1F1F8-1F1FD","label":"flag: Sint Maarten","order":4658,"tags":["SX","flag"],"unicode":"🇸🇽"},{"group":9,"hexcode":"1F1F8-1F1FE","label":"flag: Syria","order":4659,"tags":["SY","flag"],"unicode":"🇸🇾"},{"group":9,"hexcode":"1F1F8-1F1FF","label":"flag: Eswatini","order":4660,"tags":["SZ","flag"],"unicode":"🇸🇿"},{"group":9,"hexcode":"1F1F9-1F1E6","label":"flag: Tristan da Cunha","order":4661,"tags":["TA","flag"],"unicode":"🇹🇦"},{"group":9,"hexcode":"1F1F9-1F1E8","label":"flag: Turks & Caicos Islands","order":4662,"tags":["TC","flag"],"unicode":"🇹🇨"},{"group":9,"hexcode":"1F1F9-1F1E9","label":"flag: Chad","order":4663,"tags":["TD","flag"],"unicode":"🇹🇩"},{"group":9,"hexcode":"1F1F9-1F1EB","label":"flag: French Southern Territories","order":4664,"tags":["TF","flag"],"unicode":"🇹🇫"},{"group":9,"hexcode":"1F1F9-1F1EC","label":"flag: Togo","order":4665,"tags":["TG","flag"],"unicode":"🇹🇬"},{"group":9,"hexcode":"1F1F9-1F1ED","label":"flag: Thailand","order":4666,"tags":["TH","flag"],"unicode":"🇹🇭"},{"group":9,"hexcode":"1F1F9-1F1EF","label":"flag: Tajikistan","order":4667,"tags":["TJ","flag"],"unicode":"🇹🇯"},{"group":9,"hexcode":"1F1F9-1F1F0","label":"flag: Tokelau","order":4668,"tags":["TK","flag"],"unicode":"🇹🇰"},{"group":9,"hexcode":"1F1F9-1F1F1","label":"flag: Timor-Leste","order":4669,"tags":["TL","flag"],"unicode":"🇹🇱"},{"group":9,"hexcode":"1F1F9-1F1F2","label":"flag: Turkmenistan","order":4670,"tags":["TM","flag"],"unicode":"🇹🇲"},{"group":9,"hexcode":"1F1F9-1F1F3","label":"flag: Tunisia","order":4671,"tags":["TN","flag"],"unicode":"🇹🇳"},{"group":9,"hexcode":"1F1F9-1F1F4","label":"flag: Tonga","order":4672,"tags":["TO","flag"],"unicode":"🇹🇴"},{"group":9,"hexcode":"1F1F9-1F1F7","label":"flag: Turkey","order":4673,"tags":["TR","flag"],"unicode":"🇹🇷"},{"group":9,"hexcode":"1F1F9-1F1F9","label":"flag: Trinidad & Tobago","order":4674,"tags":["TT","flag"],"unicode":"🇹🇹"},{"group":9,"hexcode":"1F1F9-1F1FB","label":"flag: Tuvalu","order":4675,"tags":["TV","flag"],"unicode":"🇹🇻"},{"group":9,"hexcode":"1F1F9-1F1FC","label":"flag: Taiwan","order":4676,"tags":["TW","flag"],"unicode":"🇹🇼"},{"group":9,"hexcode":"1F1F9-1F1FF","label":"flag: Tanzania","order":4677,"tags":["TZ","flag"],"unicode":"🇹🇿"},{"group":9,"hexcode":"1F1FA-1F1E6","label":"flag: Ukraine","order":4678,"tags":["UA","flag"],"unicode":"🇺🇦"},{"group":9,"hexcode":"1F1FA-1F1EC","label":"flag: Uganda","order":4679,"tags":["UG","flag"],"unicode":"🇺🇬"},{"group":9,"hexcode":"1F1FA-1F1F2","label":"flag: U.S. Outlying Islands","order":4680,"tags":["UM","flag"],"unicode":"🇺🇲"},{"group":9,"hexcode":"1F1FA-1F1F3","label":"flag: United Nations","order":4681,"tags":["UN","flag"],"unicode":"🇺🇳"},{"group":9,"hexcode":"1F1FA-1F1F8","label":"flag: United States","order":4682,"tags":["US","flag"],"unicode":"🇺🇸"},{"group":9,"hexcode":"1F1FA-1F1FE","label":"flag: Uruguay","order":4683,"tags":["UY","flag"],"unicode":"🇺🇾"},{"group":9,"hexcode":"1F1FA-1F1FF","label":"flag: Uzbekistan","order":4684,"tags":["UZ","flag"],"unicode":"🇺🇿"},{"group":9,"hexcode":"1F1FB-1F1E6","label":"flag: Vatican City","order":4685,"tags":["VA","flag"],"unicode":"🇻🇦"},{"group":9,"hexcode":"1F1FB-1F1E8","label":"flag: St. Vincent & Grenadines","order":4686,"tags":["VC","flag"],"unicode":"🇻🇨"},{"group":9,"hexcode":"1F1FB-1F1EA","label":"flag: Venezuela","order":4687,"tags":["VE","flag"],"unicode":"🇻🇪"},{"group":9,"hexcode":"1F1FB-1F1EC","label":"flag: British Virgin Islands","order":4688,"tags":["VG","flag"],"unicode":"🇻🇬"},{"group":9,"hexcode":"1F1FB-1F1EE","label":"flag: U.S. Virgin Islands","order":4689,"tags":["VI","flag"],"unicode":"🇻🇮"},{"group":9,"hexcode":"1F1FB-1F1F3","label":"flag: Vietnam","order":4690,"tags":["VN","flag"],"unicode":"🇻🇳"},{"group":9,"hexcode":"1F1FB-1F1FA","label":"flag: Vanuatu","order":4691,"tags":["VU","flag"],"unicode":"🇻🇺"},{"group":9,"hexcode":"1F1FC-1F1EB","label":"flag: Wallis & Futuna","order":4692,"tags":["WF","flag"],"unicode":"🇼🇫"},{"group":9,"hexcode":"1F1FC-1F1F8","label":"flag: Samoa","order":4693,"tags":["WS","flag"],"unicode":"🇼🇸"},{"group":9,"hexcode":"1F1FD-1F1F0","label":"flag: Kosovo","order":4694,"tags":["XK","flag"],"unicode":"🇽🇰"},{"group":9,"hexcode":"1F1FE-1F1EA","label":"flag: Yemen","order":4695,"tags":["YE","flag"],"unicode":"🇾🇪"},{"group":9,"hexcode":"1F1FE-1F1F9","label":"flag: Mayotte","order":4696,"tags":["YT","flag"],"unicode":"🇾🇹"},{"group":9,"hexcode":"1F1FF-1F1E6","label":"flag: South Africa","order":4697,"tags":["ZA","flag"],"unicode":"🇿🇦"},{"group":9,"hexcode":"1F1FF-1F1F2","label":"flag: Zambia","order":4698,"tags":["ZM","flag"],"unicode":"🇿🇲"},{"group":9,"hexcode":"1F1FF-1F1FC","label":"flag: Zimbabwe","order":4699,"tags":["ZW","flag"],"unicode":"🇿🇼"},{"group":9,"hexcode":"1F3F4-E0067-E0062-E0065-E006E-E0067-E007F","label":"flag: England","order":4700,"tags":["flag","gbeng"],"unicode":"🏴"},{"group":9,"hexcode":"1F3F4-E0067-E0062-E0073-E0063-E0074-E007F","label":"flag: Scotland","order":4701,"tags":["flag","gbsct"],"unicode":"🏴"},{"group":9,"hexcode":"1F3F4-E0067-E0062-E0077-E006C-E0073-E007F","label":"flag: Wales","order":4702,"tags":["flag","gbwls"],"unicode":"🏴"}]')},function(e){e.exports=JSON.parse('{"2049":"interrobang","2122":"tm","2139":"information_source","2194":"left_right_arrow","2195":"arrow_up_down","2196":"arrow_upper_left","2197":"arrow_upper_right","2198":"arrow_lower_right","2199":"arrow_lower_left","2328":"keyboard","2600":"sunny","2601":"cloud","2602":"umbrella","2603":"snowman","2604":"comet","2611":"ballot_box_with_check","2614":"umbrella_with_rain_drops","2615":"coffee","2618":"shamrock","2620":"skull_and_crossbones","2622":"radioactive_sign","2623":"biohazard_sign","2626":"orthodox_cross","2638":"wheel_of_dharma","2639":"white_frowning_face","2640":"female_sign","2642":"male_sign","2648":"aries","2649":"taurus","2650":"sagittarius","2651":"capricorn","2652":"aquarius","2653":"pisces","2660":"spades","2663":"clubs","2665":"hearts","2666":"diamonds","2668":"hotsprings","2692":"hammer_and_pick","2693":"anchor","2694":"crossed_swords","2695":["medical_symbol","staff_of_aesculapius"],"2696":"scales","2697":"alembic","2699":"gear","2702":"scissors","2705":"white_check_mark","2708":"airplane","2709":["email","envelope"],"2712":"black_nib","2714":"heavy_check_mark","2716":"heavy_multiplication_x","2721":"star_of_david","2728":"sparkles","2733":"eight_spoked_asterisk","2734":"eight_pointed_black_star","2744":"snowflake","2747":"sparkle","2753":"question","2754":"grey_question","2755":"grey_exclamation","2757":["exclamation","heavy_exclamation_mark"],"2763":"heavy_heart_exclamation_mark_ornament","2764":"heart","2795":"heavy_plus_sign","2796":"heavy_minus_sign","2797":"heavy_division_sign","2934":"arrow_heading_up","2935":"arrow_heading_down","3030":"wavy_dash","3297":"congratulations","3299":"secret","0023-FE0F-20E3":"hash","002A-FE0F-20E3":"keycap_star","0030-FE0F-20E3":"zero","0031-FE0F-20E3":"one","0032-FE0F-20E3":"two","0033-FE0F-20E3":"three","0034-FE0F-20E3":"four","0035-FE0F-20E3":"five","0036-FE0F-20E3":"six","0037-FE0F-20E3":"seven","0038-FE0F-20E3":"eight","0039-FE0F-20E3":"nine","00A9":"copyright","00AE":"registered","1F004":"mahjong","1F0CF":"black_joker","1F170":"a","1F171":"b","1F17E":"o2","1F17F":"parking","1F18E":"ab","1F191":"cl","1F192":"cool","1F193":"free","1F194":"id","1F195":"new","1F196":"ng","1F197":"ok","1F198":"sos","1F199":"up","1F19A":"vs","1F1E6-1F1E8":"flag-ac","1F1E6-1F1E9":"flag-ad","1F1E6-1F1EA":"flag-ae","1F1E6-1F1EB":"flag-af","1F1E6-1F1EC":"flag-ag","1F1E6-1F1EE":"flag-ai","1F1E6-1F1F1":"flag-al","1F1E6-1F1F2":"flag-am","1F1E6-1F1F4":"flag-ao","1F1E6-1F1F6":"flag-aq","1F1E6-1F1F7":"flag-ar","1F1E6-1F1F8":"flag-as","1F1E6-1F1F9":"flag-at","1F1E6-1F1FA":"flag-au","1F1E6-1F1FC":"flag-aw","1F1E6-1F1FD":"flag-ax","1F1E6-1F1FF":"flag-az","1F1E7-1F1E6":"flag-ba","1F1E7-1F1E7":"flag-bb","1F1E7-1F1E9":"flag-bd","1F1E7-1F1EA":"flag-be","1F1E7-1F1EB":"flag-bf","1F1E7-1F1EC":"flag-bg","1F1E7-1F1ED":"flag-bh","1F1E7-1F1EE":"flag-bi","1F1E7-1F1EF":"flag-bj","1F1E7-1F1F1":"flag-bl","1F1E7-1F1F2":"flag-bm","1F1E7-1F1F3":"flag-bn","1F1E7-1F1F4":"flag-bo","1F1E7-1F1F6":"flag-bq","1F1E7-1F1F7":"flag-br","1F1E7-1F1F8":"flag-bs","1F1E7-1F1F9":"flag-bt","1F1E7-1F1FB":"flag-bv","1F1E7-1F1FC":"flag-bw","1F1E7-1F1FE":"flag-by","1F1E7-1F1FF":"flag-bz","1F1E8-1F1E6":"flag-ca","1F1E8-1F1E8":"flag-cc","1F1E8-1F1E9":"flag-cd","1F1E8-1F1EB":"flag-cf","1F1E8-1F1EC":"flag-cg","1F1E8-1F1ED":"flag-ch","1F1E8-1F1EE":"flag-ci","1F1E8-1F1F0":"flag-ck","1F1E8-1F1F1":"flag-cl","1F1E8-1F1F2":"flag-cm","1F1E8-1F1F3":["cn","flag-cn"],"1F1E8-1F1F4":"flag-co","1F1E8-1F1F5":"flag-cp","1F1E8-1F1F7":"flag-cr","1F1E8-1F1FA":"flag-cu","1F1E8-1F1FB":"flag-cv","1F1E8-1F1FC":"flag-cw","1F1E8-1F1FD":"flag-cx","1F1E8-1F1FE":"flag-cy","1F1E8-1F1FF":"flag-cz","1F1E9-1F1EA":["de","flag-de"],"1F1E9-1F1EC":"flag-dg","1F1E9-1F1EF":"flag-dj","1F1E9-1F1F0":"flag-dk","1F1E9-1F1F2":"flag-dm","1F1E9-1F1F4":"flag-do","1F1E9-1F1FF":"flag-dz","1F1EA-1F1E6":"flag-ea","1F1EA-1F1E8":"flag-ec","1F1EA-1F1EA":"flag-ee","1F1EA-1F1EC":"flag-eg","1F1EA-1F1ED":"flag-eh","1F1EA-1F1F7":"flag-er","1F1EA-1F1F8":["es","flag-es"],"1F1EA-1F1F9":"flag-et","1F1EA-1F1FA":"flag-eu","1F1EB-1F1EE":"flag-fi","1F1EB-1F1EF":"flag-fj","1F1EB-1F1F0":"flag-fk","1F1EB-1F1F2":"flag-fm","1F1EB-1F1F4":"flag-fo","1F1EB-1F1F7":["fr","flag-fr"],"1F1EC-1F1E6":"flag-ga","1F1EC-1F1E7":["gb","uk","flag-gb"],"1F1EC-1F1E9":"flag-gd","1F1EC-1F1EA":"flag-ge","1F1EC-1F1EB":"flag-gf","1F1EC-1F1EC":"flag-gg","1F1EC-1F1ED":"flag-gh","1F1EC-1F1EE":"flag-gi","1F1EC-1F1F1":"flag-gl","1F1EC-1F1F2":"flag-gm","1F1EC-1F1F3":"flag-gn","1F1EC-1F1F5":"flag-gp","1F1EC-1F1F6":"flag-gq","1F1EC-1F1F7":"flag-gr","1F1EC-1F1F8":"flag-gs","1F1EC-1F1F9":"flag-gt","1F1EC-1F1FA":"flag-gu","1F1EC-1F1FC":"flag-gw","1F1EC-1F1FE":"flag-gy","1F1ED-1F1F0":"flag-hk","1F1ED-1F1F2":"flag-hm","1F1ED-1F1F3":"flag-hn","1F1ED-1F1F7":"flag-hr","1F1ED-1F1F9":"flag-ht","1F1ED-1F1FA":"flag-hu","1F1EE-1F1E8":"flag-ic","1F1EE-1F1E9":"flag-id","1F1EE-1F1EA":"flag-ie","1F1EE-1F1F1":"flag-il","1F1EE-1F1F2":"flag-im","1F1EE-1F1F3":"flag-in","1F1EE-1F1F4":"flag-io","1F1EE-1F1F6":"flag-iq","1F1EE-1F1F7":"flag-ir","1F1EE-1F1F8":"flag-is","1F1EE-1F1F9":["it","flag-it"],"1F1EF-1F1EA":"flag-je","1F1EF-1F1F2":"flag-jm","1F1EF-1F1F4":"flag-jo","1F1EF-1F1F5":["jp","flag-jp"],"1F1F0-1F1EA":"flag-ke","1F1F0-1F1EC":"flag-kg","1F1F0-1F1ED":"flag-kh","1F1F0-1F1EE":"flag-ki","1F1F0-1F1F2":"flag-km","1F1F0-1F1F3":"flag-kn","1F1F0-1F1F5":"flag-kp","1F1F0-1F1F7":["kr","flag-kr"],"1F1F0-1F1FC":"flag-kw","1F1F0-1F1FE":"flag-ky","1F1F0-1F1FF":"flag-kz","1F1F1-1F1E6":"flag-la","1F1F1-1F1E7":"flag-lb","1F1F1-1F1E8":"flag-lc","1F1F1-1F1EE":"flag-li","1F1F1-1F1F0":"flag-lk","1F1F1-1F1F7":"flag-lr","1F1F1-1F1F8":"flag-ls","1F1F1-1F1F9":"flag-lt","1F1F1-1F1FA":"flag-lu","1F1F1-1F1FB":"flag-lv","1F1F1-1F1FE":"flag-ly","1F1F2-1F1E6":"flag-ma","1F1F2-1F1E8":"flag-mc","1F1F2-1F1E9":"flag-md","1F1F2-1F1EA":"flag-me","1F1F2-1F1EB":"flag-mf","1F1F2-1F1EC":"flag-mg","1F1F2-1F1ED":"flag-mh","1F1F2-1F1F0":"flag-mk","1F1F2-1F1F1":"flag-ml","1F1F2-1F1F2":"flag-mm","1F1F2-1F1F3":"flag-mn","1F1F2-1F1F4":"flag-mo","1F1F2-1F1F5":"flag-mp","1F1F2-1F1F6":"flag-mq","1F1F2-1F1F7":"flag-mr","1F1F2-1F1F8":"flag-ms","1F1F2-1F1F9":"flag-mt","1F1F2-1F1FA":"flag-mu","1F1F2-1F1FB":"flag-mv","1F1F2-1F1FC":"flag-mw","1F1F2-1F1FD":"flag-mx","1F1F2-1F1FE":"flag-my","1F1F2-1F1FF":"flag-mz","1F1F3-1F1E6":"flag-na","1F1F3-1F1E8":"flag-nc","1F1F3-1F1EA":"flag-ne","1F1F3-1F1EB":"flag-nf","1F1F3-1F1EC":"flag-ng","1F1F3-1F1EE":"flag-ni","1F1F3-1F1F1":"flag-nl","1F1F3-1F1F4":"flag-no","1F1F3-1F1F5":"flag-np","1F1F3-1F1F7":"flag-nr","1F1F3-1F1FA":"flag-nu","1F1F3-1F1FF":"flag-nz","1F1F4-1F1F2":"flag-om","1F1F5-1F1E6":"flag-pa","1F1F5-1F1EA":"flag-pe","1F1F5-1F1EB":"flag-pf","1F1F5-1F1EC":"flag-pg","1F1F5-1F1ED":"flag-ph","1F1F5-1F1F0":"flag-pk","1F1F5-1F1F1":"flag-pl","1F1F5-1F1F2":"flag-pm","1F1F5-1F1F3":"flag-pn","1F1F5-1F1F7":"flag-pr","1F1F5-1F1F8":"flag-ps","1F1F5-1F1F9":"flag-pt","1F1F5-1F1FC":"flag-pw","1F1F5-1F1FE":"flag-py","1F1F6-1F1E6":"flag-qa","1F1F7-1F1EA":"flag-re","1F1F7-1F1F4":"flag-ro","1F1F7-1F1F8":"flag-rs","1F1F7-1F1FA":["ru","flag-ru"],"1F1F7-1F1FC":"flag-rw","1F1F8-1F1E6":"flag-sa","1F1F8-1F1E7":"flag-sb","1F1F8-1F1E8":"flag-sc","1F1F8-1F1E9":"flag-sd","1F1F8-1F1EA":"flag-se","1F1F8-1F1EC":"flag-sg","1F1F8-1F1ED":"flag-sh","1F1F8-1F1EE":"flag-si","1F1F8-1F1EF":"flag-sj","1F1F8-1F1F0":"flag-sk","1F1F8-1F1F1":"flag-sl","1F1F8-1F1F2":"flag-sm","1F1F8-1F1F3":"flag-sn","1F1F8-1F1F4":"flag-so","1F1F8-1F1F7":"flag-sr","1F1F8-1F1F8":"flag-ss","1F1F8-1F1F9":"flag-st","1F1F8-1F1FB":"flag-sv","1F1F8-1F1FD":"flag-sx","1F1F8-1F1FE":"flag-sy","1F1F8-1F1FF":"flag-sz","1F1F9-1F1E6":"flag-ta","1F1F9-1F1E8":"flag-tc","1F1F9-1F1E9":"flag-td","1F1F9-1F1EB":"flag-tf","1F1F9-1F1EC":"flag-tg","1F1F9-1F1ED":"flag-th","1F1F9-1F1EF":"flag-tj","1F1F9-1F1F0":"flag-tk","1F1F9-1F1F1":"flag-tl","1F1F9-1F1F2":"flag-tm","1F1F9-1F1F3":"flag-tn","1F1F9-1F1F4":"flag-to","1F1F9-1F1F7":"flag-tr","1F1F9-1F1F9":"flag-tt","1F1F9-1F1FB":"flag-tv","1F1F9-1F1FC":"flag-tw","1F1F9-1F1FF":"flag-tz","1F1FA-1F1E6":"flag-ua","1F1FA-1F1EC":"flag-ug","1F1FA-1F1F2":"flag-um","1F1FA-1F1F3":"flag-un","1F1FA-1F1F8":["us","flag-us"],"1F1FA-1F1FE":"flag-uy","1F1FA-1F1FF":"flag-uz","1F1FB-1F1E6":"flag-va","1F1FB-1F1E8":"flag-vc","1F1FB-1F1EA":"flag-ve","1F1FB-1F1EC":"flag-vg","1F1FB-1F1EE":"flag-vi","1F1FB-1F1F3":"flag-vn","1F1FB-1F1FA":"flag-vu","1F1FC-1F1EB":"flag-wf","1F1FC-1F1F8":"flag-ws","1F1FD-1F1F0":"flag-xk","1F1FE-1F1EA":"flag-ye","1F1FE-1F1F9":"flag-yt","1F1FF-1F1E6":"flag-za","1F1FF-1F1F2":"flag-zm","1F1FF-1F1FC":"flag-zw","1F201":"koko","1F202":"sa","1F21A":"u7121","1F22F":"u6307","1F232":"u7981","1F233":"u7a7a","1F234":"u5408","1F235":"u6e80","1F236":"u6709","1F237":"u6708","1F238":"u7533","1F239":"u5272","1F23A":"u55b6","1F250":"ideograph_advantage","1F251":"accept","1F300":"cyclone","1F301":"foggy","1F302":"closed_umbrella","1F303":"night_with_stars","1F304":"sunrise_over_mountains","1F305":"sunrise","1F306":"city_sunset","1F307":"city_sunrise","1F308":"rainbow","1F309":"bridge_at_night","1F30A":"ocean","1F30B":"volcano","1F30C":"milky_way","1F30D":"earth_africa","1F30E":"earth_americas","1F30F":"earth_asia","1F310":"globe_with_meridians","1F311":"new_moon","1F312":"waxing_crescent_moon","1F313":"first_quarter_moon","1F314":["moon","waxing_gibbous_moon"],"1F315":"full_moon","1F316":"waning_gibbous_moon","1F317":"last_quarter_moon","1F318":"waning_crescent_moon","1F319":"crescent_moon","1F31A":"new_moon_with_face","1F31B":"first_quarter_moon_with_face","1F31C":"last_quarter_moon_with_face","1F31D":"full_moon_with_face","1F31E":"sun_with_face","1F31F":"star2","1F320":"stars","1F321":"thermometer","1F324":["mostly_sunny","sun_small_cloud"],"1F325":["barely_sunny","sun_behind_cloud"],"1F326":["partly_sunny_rain","sun_behind_rain_cloud"],"1F327":"rain_cloud","1F328":"snow_cloud","1F329":["lightning","lightning_cloud"],"1F32A":["tornado","tornado_cloud"],"1F32B":"fog","1F32C":"wind_blowing_face","1F32D":"hotdog","1F32E":"taco","1F32F":"burrito","1F330":"chestnut","1F331":"seedling","1F332":"evergreen_tree","1F333":"deciduous_tree","1F334":"palm_tree","1F335":"cactus","1F336":"hot_pepper","1F337":"tulip","1F338":"cherry_blossom","1F339":"rose","1F33A":"hibiscus","1F33B":"sunflower","1F33C":"blossom","1F33D":"corn","1F33E":"ear_of_rice","1F33F":"herb","1F340":"four_leaf_clover","1F341":"maple_leaf","1F342":"fallen_leaf","1F343":"leaves","1F344":"mushroom","1F345":"tomato","1F346":"eggplant","1F347":"grapes","1F348":"melon","1F349":"watermelon","1F34A":"tangerine","1F34B":"lemon","1F34C":"banana","1F34D":"pineapple","1F34E":"apple","1F34F":"green_apple","1F350":"pear","1F351":"peach","1F352":"cherries","1F353":"strawberry","1F354":"hamburger","1F355":"pizza","1F356":"meat_on_bone","1F357":"poultry_leg","1F358":"rice_cracker","1F359":"rice_ball","1F35A":"rice","1F35B":"curry","1F35C":"ramen","1F35D":"spaghetti","1F35E":"bread","1F35F":"fries","1F360":"sweet_potato","1F361":"dango","1F362":"oden","1F363":"sushi","1F364":"fried_shrimp","1F365":"fish_cake","1F366":"icecream","1F367":"shaved_ice","1F368":"ice_cream","1F369":"doughnut","1F36A":"cookie","1F36B":"chocolate_bar","1F36C":"candy","1F36D":"lollipop","1F36E":"custard","1F36F":"honey_pot","1F370":"cake","1F371":"bento","1F372":"stew","1F373":["fried_egg","cooking"],"1F374":"fork_and_knife","1F375":"tea","1F376":"sake","1F377":"wine_glass","1F378":"cocktail","1F379":"tropical_drink","1F37A":"beer","1F37B":"beers","1F37C":"baby_bottle","1F37D":"knife_fork_plate","1F37E":"champagne","1F37F":"popcorn","1F380":"ribbon","1F381":"gift","1F382":"birthday","1F383":"jack_o_lantern","1F384":"christmas_tree","1F385":"santa","1F386":"fireworks","1F387":"sparkler","1F388":"balloon","1F389":"tada","1F38A":"confetti_ball","1F38B":"tanabata_tree","1F38C":"crossed_flags","1F38D":"bamboo","1F38E":"dolls","1F38F":"flags","1F390":"wind_chime","1F391":"rice_scene","1F392":"school_satchel","1F393":"mortar_board","1F396":"medal","1F397":"reminder_ribbon","1F399":"studio_microphone","1F39A":"level_slider","1F39B":"control_knobs","1F39E":"film_frames","1F39F":"admission_tickets","1F3A0":"carousel_horse","1F3A1":"ferris_wheel","1F3A2":"roller_coaster","1F3A3":"fishing_pole_and_fish","1F3A4":"microphone","1F3A5":"movie_camera","1F3A6":"cinema","1F3A7":"headphones","1F3A8":"art","1F3A9":"tophat","1F3AA":"circus_tent","1F3AB":"ticket","1F3AC":"clapper","1F3AD":"performing_arts","1F3AE":"video_game","1F3AF":"dart","1F3B0":"slot_machine","1F3B1":"8ball","1F3B2":"game_die","1F3B3":"bowling","1F3B4":"flower_playing_cards","1F3B5":"musical_note","1F3B6":"notes","1F3B7":"saxophone","1F3B8":"guitar","1F3B9":"musical_keyboard","1F3BA":"trumpet","1F3BB":"violin","1F3BC":"musical_score","1F3BD":"running_shirt_with_sash","1F3BE":"tennis","1F3BF":"ski","1F3C0":"basketball","1F3C1":"checkered_flag","1F3C2":"snowboarder","1F3C3-200D-2640-FE0F":"woman-running","1F3C3-200D-2642-FE0F":"man-running","1F3C3":["runner","running"],"1F3C4-200D-2640-FE0F":"woman-surfing","1F3C4-200D-2642-FE0F":"man-surfing","1F3C4":"surfer","1F3C5":"sports_medal","1F3C6":"trophy","1F3C7":"horse_racing","1F3C8":"football","1F3C9":"rugby_football","1F3CA-200D-2640-FE0F":"woman-swimming","1F3CA-200D-2642-FE0F":"man-swimming","1F3CA":"swimmer","1F3CB-FE0F-200D-2640-FE0F":"woman-lifting-weights","1F3CB-FE0F-200D-2642-FE0F":"man-lifting-weights","1F3CB":"weight_lifter","1F3CC-FE0F-200D-2640-FE0F":"woman-golfing","1F3CC-FE0F-200D-2642-FE0F":"man-golfing","1F3CC":"golfer","1F3CD":"racing_motorcycle","1F3CE":"racing_car","1F3CF":"cricket_bat_and_ball","1F3D0":"volleyball","1F3D1":"field_hockey_stick_and_ball","1F3D2":"ice_hockey_stick_and_puck","1F3D3":"table_tennis_paddle_and_ball","1F3D4":"snow_capped_mountain","1F3D5":"camping","1F3D6":"beach_with_umbrella","1F3D7":"building_construction","1F3D8":"house_buildings","1F3D9":"cityscape","1F3DA":"derelict_house_building","1F3DB":"classical_building","1F3DC":"desert","1F3DD":"desert_island","1F3DE":"national_park","1F3DF":"stadium","1F3E0":"house","1F3E1":"house_with_garden","1F3E2":"office","1F3E3":"post_office","1F3E4":"european_post_office","1F3E5":"hospital","1F3E6":"bank","1F3E7":"atm","1F3E8":"hotel","1F3E9":"love_hotel","1F3EA":"convenience_store","1F3EB":"school","1F3EC":"department_store","1F3ED":"factory","1F3EE":["izakaya_lantern","lantern"],"1F3EF":"japanese_castle","1F3F0":"european_castle","1F3F3-FE0F-200D-1F308":"rainbow-flag","1F3F3-FE0F-200D-26A7-FE0F":"transgender_flag","1F3F3":"waving_white_flag","1F3F4-200D-2620-FE0F":"pirate_flag","1F3F4-E0067-E0062-E0065-E006E-E0067-E007F":"flag-england","1F3F4-E0067-E0062-E0073-E0063-E0074-E007F":"flag-scotland","1F3F4-E0067-E0062-E0077-E006C-E0073-E007F":"flag-wales","1F3F4":"waving_black_flag","1F3F5":"rosette","1F3F7":"label","1F3F8":"badminton_racquet_and_shuttlecock","1F3F9":"bow_and_arrow","1F3FA":"amphora","1F3FB":"skin-tone-2","1F3FC":"skin-tone-3","1F3FD":"skin-tone-4","1F3FE":"skin-tone-5","1F3FF":"skin-tone-6","1F400":"rat","1F401":"mouse2","1F402":"ox","1F403":"water_buffalo","1F404":"cow2","1F405":"tiger2","1F406":"leopard","1F407":"rabbit2","1F408-200D-2B1B":"black_cat","1F408":"cat2","1F409":"dragon","1F40A":"crocodile","1F40B":"whale2","1F40C":"snail","1F40D":"snake","1F40E":"racehorse","1F40F":"ram","1F410":"goat","1F411":"sheep","1F412":"monkey","1F413":"rooster","1F414":"chicken","1F415-200D-1F9BA":"service_dog","1F415":"dog2","1F416":"pig2","1F417":"boar","1F418":"elephant","1F419":"octopus","1F41A":"shell","1F41B":"bug","1F41C":"ant","1F41D":["bee","honeybee"],"1F41E":["ladybug","lady_beetle"],"1F41F":"fish","1F420":"tropical_fish","1F421":"blowfish","1F422":"turtle","1F423":"hatching_chick","1F424":"baby_chick","1F425":"hatched_chick","1F426":"bird","1F427":"penguin","1F428":"koala","1F429":"poodle","1F42A":"dromedary_camel","1F42B":"camel","1F42C":["dolphin","flipper"],"1F42D":"mouse","1F42E":"cow","1F42F":"tiger","1F430":"rabbit","1F431":"cat","1F432":"dragon_face","1F433":"whale","1F434":"horse","1F435":"monkey_face","1F436":"dog","1F437":"pig","1F438":"frog","1F439":"hamster","1F43A":"wolf","1F43B-200D-2744-FE0F":"polar_bear","1F43B":"bear","1F43C":"panda_face","1F43D":"pig_nose","1F43E":["feet","paw_prints"],"1F43F":"chipmunk","1F440":"eyes","1F441-FE0F-200D-1F5E8-FE0F":"eye-in-speech-bubble","1F441":"eye","1F442":"ear","1F443":"nose","1F444":"lips","1F445":"tongue","1F446":"point_up_2","1F447":"point_down","1F448":"point_left","1F449":"point_right","1F44A":["facepunch","punch"],"1F44B":"wave","1F44C":"ok_hand","1F44D":["+1","thumbsup"],"1F44E":["-1","thumbsdown"],"1F44F":"clap","1F450":"open_hands","1F451":"crown","1F452":"womans_hat","1F453":"eyeglasses","1F454":"necktie","1F455":["shirt","tshirt"],"1F456":"jeans","1F457":"dress","1F458":"kimono","1F459":"bikini","1F45A":"womans_clothes","1F45B":"purse","1F45C":"handbag","1F45D":"pouch","1F45E":["mans_shoe","shoe"],"1F45F":"athletic_shoe","1F460":"high_heel","1F461":"sandal","1F462":"boot","1F463":"footprints","1F464":"bust_in_silhouette","1F465":"busts_in_silhouette","1F466":"boy","1F467":"girl","1F468-200D-1F33E":"male-farmer","1F468-200D-1F373":"male-cook","1F468-200D-1F37C":"man_feeding_baby","1F468-200D-1F393":"male-student","1F468-200D-1F3A4":"male-singer","1F468-200D-1F3A8":"male-artist","1F468-200D-1F3EB":"male-teacher","1F468-200D-1F3ED":"male-factory-worker","1F468-200D-1F466-200D-1F466":"man-boy-boy","1F468-200D-1F466":"man-boy","1F468-200D-1F467-200D-1F466":"man-girl-boy","1F468-200D-1F467-200D-1F467":"man-girl-girl","1F468-200D-1F467":"man-girl","1F468-200D-1F468-200D-1F466":"man-man-boy","1F468-200D-1F468-200D-1F466-200D-1F466":"man-man-boy-boy","1F468-200D-1F468-200D-1F467":"man-man-girl","1F468-200D-1F468-200D-1F467-200D-1F466":"man-man-girl-boy","1F468-200D-1F468-200D-1F467-200D-1F467":"man-man-girl-girl","1F468-200D-1F469-200D-1F466":"man-woman-boy","1F468-200D-1F469-200D-1F466-200D-1F466":"man-woman-boy-boy","1F468-200D-1F469-200D-1F467":"man-woman-girl","1F468-200D-1F469-200D-1F467-200D-1F466":"man-woman-girl-boy","1F468-200D-1F469-200D-1F467-200D-1F467":"man-woman-girl-girl","1F468-200D-1F4BB":"male-technologist","1F468-200D-1F4BC":"male-office-worker","1F468-200D-1F527":"male-mechanic","1F468-200D-1F52C":"male-scientist","1F468-200D-1F680":"male-astronaut","1F468-200D-1F692":"male-firefighter","1F468-200D-1F9AF":"man_with_probing_cane","1F468-200D-1F9B0":"red_haired_man","1F468-200D-1F9B1":"curly_haired_man","1F468-200D-1F9B2":"bald_man","1F468-200D-1F9B3":"white_haired_man","1F468-200D-1F9BC":"man_in_motorized_wheelchair","1F468-200D-1F9BD":"man_in_manual_wheelchair","1F468-200D-2695-FE0F":"male-doctor","1F468-200D-2696-FE0F":"male-judge","1F468-200D-2708-FE0F":"male-pilot","1F468-200D-2764-FE0F-200D-1F468":"man-heart-man","1F468-200D-2764-FE0F-200D-1F48B-200D-1F468":"man-kiss-man","1F468":"man","1F469-200D-1F33E":"female-farmer","1F469-200D-1F373":"female-cook","1F469-200D-1F37C":"woman_feeding_baby","1F469-200D-1F393":"female-student","1F469-200D-1F3A4":"female-singer","1F469-200D-1F3A8":"female-artist","1F469-200D-1F3EB":"female-teacher","1F469-200D-1F3ED":"female-factory-worker","1F469-200D-1F466-200D-1F466":"woman-boy-boy","1F469-200D-1F466":"woman-boy","1F469-200D-1F467-200D-1F466":"woman-girl-boy","1F469-200D-1F467-200D-1F467":"woman-girl-girl","1F469-200D-1F467":"woman-girl","1F469-200D-1F469-200D-1F466":"woman-woman-boy","1F469-200D-1F469-200D-1F466-200D-1F466":"woman-woman-boy-boy","1F469-200D-1F469-200D-1F467":"woman-woman-girl","1F469-200D-1F469-200D-1F467-200D-1F466":"woman-woman-girl-boy","1F469-200D-1F469-200D-1F467-200D-1F467":"woman-woman-girl-girl","1F469-200D-1F4BB":"female-technologist","1F469-200D-1F4BC":"female-office-worker","1F469-200D-1F527":"female-mechanic","1F469-200D-1F52C":"female-scientist","1F469-200D-1F680":"female-astronaut","1F469-200D-1F692":"female-firefighter","1F469-200D-1F9AF":"woman_with_probing_cane","1F469-200D-1F9B0":"red_haired_woman","1F469-200D-1F9B1":"curly_haired_woman","1F469-200D-1F9B2":"bald_woman","1F469-200D-1F9B3":"white_haired_woman","1F469-200D-1F9BC":"woman_in_motorized_wheelchair","1F469-200D-1F9BD":"woman_in_manual_wheelchair","1F469-200D-2695-FE0F":"female-doctor","1F469-200D-2696-FE0F":"female-judge","1F469-200D-2708-FE0F":"female-pilot","1F469-200D-2764-FE0F-200D-1F468":"woman-heart-man","1F469-200D-2764-FE0F-200D-1F469":"woman-heart-woman","1F469-200D-2764-FE0F-200D-1F48B-200D-1F468":"woman-kiss-man","1F469-200D-2764-FE0F-200D-1F48B-200D-1F469":"woman-kiss-woman","1F469":"woman","1F46A":"family","1F46B":["man_and_woman_holding_hands","woman_and_man_holding_hands","couple"],"1F46C":["two_men_holding_hands","men_holding_hands"],"1F46D":["two_women_holding_hands","women_holding_hands"],"1F46E-200D-2640-FE0F":"female-police-officer","1F46E-200D-2642-FE0F":"male-police-officer","1F46E":"cop","1F46F-200D-2640-FE0F":["women-with-bunny-ears-partying","woman-with-bunny-ears-partying"],"1F46F-200D-2642-FE0F":["men-with-bunny-ears-partying","man-with-bunny-ears-partying"],"1F46F":"dancers","1F470-200D-2640-FE0F":"woman_with_veil","1F470-200D-2642-FE0F":"man_with_veil","1F470":"bride_with_veil","1F471-200D-2640-FE0F":"blond-haired-woman","1F471-200D-2642-FE0F":"blond-haired-man","1F471":"person_with_blond_hair","1F472":"man_with_gua_pi_mao","1F473-200D-2640-FE0F":"woman-wearing-turban","1F473-200D-2642-FE0F":"man-wearing-turban","1F473":"man_with_turban","1F474":"older_man","1F475":"older_woman","1F476":"baby","1F477-200D-2640-FE0F":"female-construction-worker","1F477-200D-2642-FE0F":"male-construction-worker","1F477":"construction_worker","1F478":"princess","1F479":"japanese_ogre","1F47A":"japanese_goblin","1F47B":"ghost","1F47C":"angel","1F47D":"alien","1F47E":"space_invader","1F47F":"imp","1F480":"skull","1F481-200D-2640-FE0F":"woman-tipping-hand","1F481-200D-2642-FE0F":"man-tipping-hand","1F481":"information_desk_person","1F482-200D-2640-FE0F":"female-guard","1F482-200D-2642-FE0F":"male-guard","1F482":"guardsman","1F483":"dancer","1F484":"lipstick","1F485":"nail_care","1F486-200D-2640-FE0F":"woman-getting-massage","1F486-200D-2642-FE0F":"man-getting-massage","1F486":"massage","1F487-200D-2640-FE0F":"woman-getting-haircut","1F487-200D-2642-FE0F":"man-getting-haircut","1F487":"haircut","1F488":"barber","1F489":"syringe","1F48A":"pill","1F48B":"kiss","1F48C":"love_letter","1F48D":"ring","1F48E":"gem","1F48F":"couplekiss","1F490":"bouquet","1F491":"couple_with_heart","1F492":"wedding","1F493":"heartbeat","1F494":"broken_heart","1F495":"two_hearts","1F496":"sparkling_heart","1F497":"heartpulse","1F498":"cupid","1F499":"blue_heart","1F49A":"green_heart","1F49B":"yellow_heart","1F49C":"purple_heart","1F49D":"gift_heart","1F49E":"revolving_hearts","1F49F":"heart_decoration","1F4A0":"diamond_shape_with_a_dot_inside","1F4A1":"bulb","1F4A2":"anger","1F4A3":"bomb","1F4A4":"zzz","1F4A5":["boom","collision"],"1F4A6":"sweat_drops","1F4A7":"droplet","1F4A8":"dash","1F4A9":["hankey","poop","shit"],"1F4AA":"muscle","1F4AB":"dizzy","1F4AC":"speech_balloon","1F4AD":"thought_balloon","1F4AE":"white_flower","1F4AF":"100","1F4B0":"moneybag","1F4B1":"currency_exchange","1F4B2":"heavy_dollar_sign","1F4B3":"credit_card","1F4B4":"yen","1F4B5":"dollar","1F4B6":"euro","1F4B7":"pound","1F4B8":"money_with_wings","1F4B9":"chart","1F4BA":"seat","1F4BB":"computer","1F4BC":"briefcase","1F4BD":"minidisc","1F4BE":"floppy_disk","1F4BF":"cd","1F4C0":"dvd","1F4C1":"file_folder","1F4C2":"open_file_folder","1F4C3":"page_with_curl","1F4C4":"page_facing_up","1F4C5":"date","1F4C6":"calendar","1F4C7":"card_index","1F4C8":"chart_with_upwards_trend","1F4C9":"chart_with_downwards_trend","1F4CA":"bar_chart","1F4CB":"clipboard","1F4CC":"pushpin","1F4CD":"round_pushpin","1F4CE":"paperclip","1F4CF":"straight_ruler","1F4D0":"triangular_ruler","1F4D1":"bookmark_tabs","1F4D2":"ledger","1F4D3":"notebook","1F4D4":"notebook_with_decorative_cover","1F4D5":"closed_book","1F4D6":["book","open_book"],"1F4D7":"green_book","1F4D8":"blue_book","1F4D9":"orange_book","1F4DA":"books","1F4DB":"name_badge","1F4DC":"scroll","1F4DD":["memo","pencil"],"1F4DE":"telephone_receiver","1F4DF":"pager","1F4E0":"fax","1F4E1":"satellite_antenna","1F4E2":"loudspeaker","1F4E3":"mega","1F4E4":"outbox_tray","1F4E5":"inbox_tray","1F4E6":"package","1F4E7":"e-mail","1F4E8":"incoming_envelope","1F4E9":"envelope_with_arrow","1F4EA":"mailbox_closed","1F4EB":"mailbox","1F4EC":"mailbox_with_mail","1F4ED":"mailbox_with_no_mail","1F4EE":"postbox","1F4EF":"postal_horn","1F4F0":"newspaper","1F4F1":"iphone","1F4F2":"calling","1F4F3":"vibration_mode","1F4F4":"mobile_phone_off","1F4F5":"no_mobile_phones","1F4F6":"signal_strength","1F4F7":"camera","1F4F8":"camera_with_flash","1F4F9":"video_camera","1F4FA":"tv","1F4FB":"radio","1F4FC":"vhs","1F4FD":"film_projector","1F4FF":"prayer_beads","1F500":"twisted_rightwards_arrows","1F501":"repeat","1F502":"repeat_one","1F503":"arrows_clockwise","1F504":"arrows_counterclockwise","1F505":"low_brightness","1F506":"high_brightness","1F507":"mute","1F508":"speaker","1F509":"sound","1F50A":"loud_sound","1F50B":"battery","1F50C":"electric_plug","1F50D":"mag","1F50E":"mag_right","1F50F":"lock_with_ink_pen","1F510":"closed_lock_with_key","1F511":"key","1F512":"lock","1F513":"unlock","1F514":"bell","1F515":"no_bell","1F516":"bookmark","1F517":"link","1F518":"radio_button","1F519":"back","1F51A":"end","1F51B":"on","1F51C":"soon","1F51D":"top","1F51E":"underage","1F51F":"keycap_ten","1F520":"capital_abcd","1F521":"abcd","1F522":"1234","1F523":"symbols","1F524":"abc","1F525":"fire","1F526":"flashlight","1F527":"wrench","1F528":"hammer","1F529":"nut_and_bolt","1F52A":["hocho","knife"],"1F52B":"gun","1F52C":"microscope","1F52D":"telescope","1F52E":"crystal_ball","1F52F":"six_pointed_star","1F530":"beginner","1F531":"trident","1F532":"black_square_button","1F533":"white_square_button","1F534":"red_circle","1F535":"large_blue_circle","1F536":"large_orange_diamond","1F537":"large_blue_diamond","1F538":"small_orange_diamond","1F539":"small_blue_diamond","1F53A":"small_red_triangle","1F53B":"small_red_triangle_down","1F53C":"arrow_up_small","1F53D":"arrow_down_small","1F549":"om_symbol","1F54A":"dove_of_peace","1F54B":"kaaba","1F54C":"mosque","1F54D":"synagogue","1F54E":"menorah_with_nine_branches","1F550":"clock1","1F551":"clock2","1F552":"clock3","1F553":"clock4","1F554":"clock5","1F555":"clock6","1F556":"clock7","1F557":"clock8","1F558":"clock9","1F559":"clock10","1F55A":"clock11","1F55B":"clock12","1F55C":"clock130","1F55D":"clock230","1F55E":"clock330","1F55F":"clock430","1F560":"clock530","1F561":"clock630","1F562":"clock730","1F563":"clock830","1F564":"clock930","1F565":"clock1030","1F566":"clock1130","1F567":"clock1230","1F56F":"candle","1F570":"mantelpiece_clock","1F573":"hole","1F574":"man_in_business_suit_levitating","1F575-FE0F-200D-2640-FE0F":"female-detective","1F575-FE0F-200D-2642-FE0F":"male-detective","1F575":"sleuth_or_spy","1F576":"dark_sunglasses","1F577":"spider","1F578":"spider_web","1F579":"joystick","1F57A":"man_dancing","1F587":"linked_paperclips","1F58A":"lower_left_ballpoint_pen","1F58B":"lower_left_fountain_pen","1F58C":"lower_left_paintbrush","1F58D":"lower_left_crayon","1F590":"raised_hand_with_fingers_splayed","1F595":["middle_finger","reversed_hand_with_middle_finger_extended"],"1F596":"spock-hand","1F5A4":"black_heart","1F5A5":"desktop_computer","1F5A8":"printer","1F5B1":"three_button_mouse","1F5B2":"trackball","1F5BC":"frame_with_picture","1F5C2":"card_index_dividers","1F5C3":"card_file_box","1F5C4":"file_cabinet","1F5D1":"wastebasket","1F5D2":"spiral_note_pad","1F5D3":"spiral_calendar_pad","1F5DC":"compression","1F5DD":"old_key","1F5DE":"rolled_up_newspaper","1F5E1":"dagger_knife","1F5E3":"speaking_head_in_silhouette","1F5E8":"left_speech_bubble","1F5EF":"right_anger_bubble","1F5F3":"ballot_box_with_ballot","1F5FA":"world_map","1F5FB":"mount_fuji","1F5FC":"tokyo_tower","1F5FD":"statue_of_liberty","1F5FE":"japan","1F5FF":"moyai","1F600":"grinning","1F601":"grin","1F602":"joy","1F603":"smiley","1F604":"smile","1F605":"sweat_smile","1F606":["laughing","satisfied"],"1F607":"innocent","1F608":"smiling_imp","1F609":"wink","1F60A":"blush","1F60B":"yum","1F60C":"relieved","1F60D":"heart_eyes","1F60E":"sunglasses","1F60F":"smirk","1F610":"neutral_face","1F611":"expressionless","1F612":"unamused","1F613":"sweat","1F614":"pensive","1F615":"confused","1F616":"confounded","1F617":"kissing","1F618":"kissing_heart","1F619":"kissing_smiling_eyes","1F61A":"kissing_closed_eyes","1F61B":"stuck_out_tongue","1F61C":"stuck_out_tongue_winking_eye","1F61D":"stuck_out_tongue_closed_eyes","1F61E":"disappointed","1F61F":"worried","1F620":"angry","1F621":"rage","1F622":"cry","1F623":"persevere","1F624":"triumph","1F625":"disappointed_relieved","1F626":"frowning","1F627":"anguished","1F628":"fearful","1F629":"weary","1F62A":"sleepy","1F62B":"tired_face","1F62C":"grimacing","1F62D":"sob","1F62E-200D-1F4A8":"face_exhaling","1F62E":"open_mouth","1F62F":"hushed","1F630":"cold_sweat","1F631":"scream","1F632":"astonished","1F633":"flushed","1F634":"sleeping","1F635-200D-1F4AB":"face_with_spiral_eyes","1F635":"dizzy_face","1F636-200D-1F32B-FE0F":"face_in_clouds","1F636":"no_mouth","1F637":"mask","1F638":"smile_cat","1F639":"joy_cat","1F63A":"smiley_cat","1F63B":"heart_eyes_cat","1F63C":"smirk_cat","1F63D":"kissing_cat","1F63E":"pouting_cat","1F63F":"crying_cat_face","1F640":"scream_cat","1F641":"slightly_frowning_face","1F642":"slightly_smiling_face","1F643":"upside_down_face","1F644":"face_with_rolling_eyes","1F645-200D-2640-FE0F":"woman-gesturing-no","1F645-200D-2642-FE0F":"man-gesturing-no","1F645":"no_good","1F646-200D-2640-FE0F":"woman-gesturing-ok","1F646-200D-2642-FE0F":"man-gesturing-ok","1F646":"ok_woman","1F647-200D-2640-FE0F":"woman-bowing","1F647-200D-2642-FE0F":"man-bowing","1F647":"bow","1F648":"see_no_evil","1F649":"hear_no_evil","1F64A":"speak_no_evil","1F64B-200D-2640-FE0F":"woman-raising-hand","1F64B-200D-2642-FE0F":"man-raising-hand","1F64B":"raising_hand","1F64C":"raised_hands","1F64D-200D-2640-FE0F":"woman-frowning","1F64D-200D-2642-FE0F":"man-frowning","1F64D":"person_frowning","1F64E-200D-2640-FE0F":"woman-pouting","1F64E-200D-2642-FE0F":"man-pouting","1F64E":"person_with_pouting_face","1F64F":"pray","1F680":"rocket","1F681":"helicopter","1F682":"steam_locomotive","1F683":"railway_car","1F684":"bullettrain_side","1F685":"bullettrain_front","1F686":"train2","1F687":"metro","1F688":"light_rail","1F689":"station","1F68A":"tram","1F68B":"train","1F68C":"bus","1F68D":"oncoming_bus","1F68E":"trolleybus","1F68F":"busstop","1F690":"minibus","1F691":"ambulance","1F692":"fire_engine","1F693":"police_car","1F694":"oncoming_police_car","1F695":"taxi","1F696":"oncoming_taxi","1F697":["car","red_car"],"1F698":"oncoming_automobile","1F699":"blue_car","1F69A":"truck","1F69B":"articulated_lorry","1F69C":"tractor","1F69D":"monorail","1F69E":"mountain_railway","1F69F":"suspension_railway","1F6A0":"mountain_cableway","1F6A1":"aerial_tramway","1F6A2":"ship","1F6A3-200D-2640-FE0F":"woman-rowing-boat","1F6A3-200D-2642-FE0F":"man-rowing-boat","1F6A3":"rowboat","1F6A4":"speedboat","1F6A5":"traffic_light","1F6A6":"vertical_traffic_light","1F6A7":"construction","1F6A8":"rotating_light","1F6A9":"triangular_flag_on_post","1F6AA":"door","1F6AB":"no_entry_sign","1F6AC":"smoking","1F6AD":"no_smoking","1F6AE":"put_litter_in_its_place","1F6AF":"do_not_litter","1F6B0":"potable_water","1F6B1":"non-potable_water","1F6B2":"bike","1F6B3":"no_bicycles","1F6B4-200D-2640-FE0F":"woman-biking","1F6B4-200D-2642-FE0F":"man-biking","1F6B4":"bicyclist","1F6B5-200D-2640-FE0F":"woman-mountain-biking","1F6B5-200D-2642-FE0F":"man-mountain-biking","1F6B5":"mountain_bicyclist","1F6B6-200D-2640-FE0F":"woman-walking","1F6B6-200D-2642-FE0F":"man-walking","1F6B6":"walking","1F6B7":"no_pedestrians","1F6B8":"children_crossing","1F6B9":"mens","1F6BA":"womens","1F6BB":"restroom","1F6BC":"baby_symbol","1F6BD":"toilet","1F6BE":"wc","1F6BF":"shower","1F6C0":"bath","1F6C1":"bathtub","1F6C2":"passport_control","1F6C3":"customs","1F6C4":"baggage_claim","1F6C5":"left_luggage","1F6CB":"couch_and_lamp","1F6CC":"sleeping_accommodation","1F6CD":"shopping_bags","1F6CE":"bellhop_bell","1F6CF":"bed","1F6D0":"place_of_worship","1F6D1":"octagonal_sign","1F6D2":"shopping_trolley","1F6D5":"hindu_temple","1F6D6":"hut","1F6D7":"elevator","1F6E0":"hammer_and_wrench","1F6E1":"shield","1F6E2":"oil_drum","1F6E3":"motorway","1F6E4":"railway_track","1F6E5":"motor_boat","1F6E9":"small_airplane","1F6EB":"airplane_departure","1F6EC":"airplane_arriving","1F6F0":"satellite","1F6F3":"passenger_ship","1F6F4":"scooter","1F6F5":"motor_scooter","1F6F6":"canoe","1F6F7":"sled","1F6F8":"flying_saucer","1F6F9":"skateboard","1F6FA":"auto_rickshaw","1F6FB":"pickup_truck","1F6FC":"roller_skate","1F7E0":"large_orange_circle","1F7E1":"large_yellow_circle","1F7E2":"large_green_circle","1F7E3":"large_purple_circle","1F7E4":"large_brown_circle","1F7E5":"large_red_square","1F7E6":"large_blue_square","1F7E7":"large_orange_square","1F7E8":"large_yellow_square","1F7E9":"large_green_square","1F7EA":"large_purple_square","1F7EB":"large_brown_square","1F90C":"pinched_fingers","1F90D":"white_heart","1F90E":"brown_heart","1F90F":"pinching_hand","1F910":"zipper_mouth_face","1F911":"money_mouth_face","1F912":"face_with_thermometer","1F913":"nerd_face","1F914":"thinking_face","1F915":"face_with_head_bandage","1F916":"robot_face","1F917":"hugging_face","1F918":["the_horns","sign_of_the_horns"],"1F919":"call_me_hand","1F91A":"raised_back_of_hand","1F91B":"left-facing_fist","1F91C":"right-facing_fist","1F91D":"handshake","1F91E":["crossed_fingers","hand_with_index_and_middle_fingers_crossed"],"1F91F":"i_love_you_hand_sign","1F920":"face_with_cowboy_hat","1F921":"clown_face","1F922":"nauseated_face","1F923":"rolling_on_the_floor_laughing","1F924":"drooling_face","1F925":"lying_face","1F926-200D-2640-FE0F":"woman-facepalming","1F926-200D-2642-FE0F":"man-facepalming","1F926":"face_palm","1F927":"sneezing_face","1F928":["face_with_raised_eyebrow","face_with_one_eyebrow_raised"],"1F929":["star-struck","grinning_face_with_star_eyes"],"1F92A":["zany_face","grinning_face_with_one_large_and_one_small_eye"],"1F92B":["shushing_face","face_with_finger_covering_closed_lips"],"1F92C":["face_with_symbols_on_mouth","serious_face_with_symbols_covering_mouth"],"1F92D":["face_with_hand_over_mouth","smiling_face_with_smiling_eyes_and_hand_covering_mouth"],"1F92E":["face_vomiting","face_with_open_mouth_vomiting"],"1F92F":["exploding_head","shocked_face_with_exploding_head"],"1F930":"pregnant_woman","1F931":"breast-feeding","1F932":"palms_up_together","1F933":"selfie","1F934":"prince","1F935-200D-2640-FE0F":"woman_in_tuxedo","1F935-200D-2642-FE0F":"man_in_tuxedo","1F935":"person_in_tuxedo","1F936":["mrs_claus","mother_christmas"],"1F937-200D-2640-FE0F":"woman-shrugging","1F937-200D-2642-FE0F":"man-shrugging","1F937":"shrug","1F938-200D-2640-FE0F":"woman-cartwheeling","1F938-200D-2642-FE0F":"man-cartwheeling","1F938":"person_doing_cartwheel","1F939-200D-2640-FE0F":"woman-juggling","1F939-200D-2642-FE0F":"man-juggling","1F939":"juggling","1F93A":"fencer","1F93C-200D-2640-FE0F":"woman-wrestling","1F93C-200D-2642-FE0F":"man-wrestling","1F93C":"wrestlers","1F93D-200D-2640-FE0F":"woman-playing-water-polo","1F93D-200D-2642-FE0F":"man-playing-water-polo","1F93D":"water_polo","1F93E-200D-2640-FE0F":"woman-playing-handball","1F93E-200D-2642-FE0F":"man-playing-handball","1F93E":"handball","1F93F":"diving_mask","1F940":"wilted_flower","1F941":"drum_with_drumsticks","1F942":"clinking_glasses","1F943":"tumbler_glass","1F944":"spoon","1F945":"goal_net","1F947":"first_place_medal","1F948":"second_place_medal","1F949":"third_place_medal","1F94A":"boxing_glove","1F94B":"martial_arts_uniform","1F94C":"curling_stone","1F94D":"lacrosse","1F94E":"softball","1F94F":"flying_disc","1F950":"croissant","1F951":"avocado","1F952":"cucumber","1F953":"bacon","1F954":"potato","1F955":"carrot","1F956":"baguette_bread","1F957":"green_salad","1F958":"shallow_pan_of_food","1F959":"stuffed_flatbread","1F95A":"egg","1F95B":"glass_of_milk","1F95C":"peanuts","1F95D":"kiwifruit","1F95E":"pancakes","1F95F":"dumpling","1F960":"fortune_cookie","1F961":"takeout_box","1F962":"chopsticks","1F963":"bowl_with_spoon","1F964":"cup_with_straw","1F965":"coconut","1F966":"broccoli","1F967":"pie","1F968":"pretzel","1F969":"cut_of_meat","1F96A":"sandwich","1F96B":"canned_food","1F96C":"leafy_green","1F96D":"mango","1F96E":"moon_cake","1F96F":"bagel","1F970":"smiling_face_with_3_hearts","1F971":"yawning_face","1F972":"smiling_face_with_tear","1F973":"partying_face","1F974":"woozy_face","1F975":"hot_face","1F976":"cold_face","1F977":"ninja","1F978":"disguised_face","1F97A":"pleading_face","1F97B":"sari","1F97C":"lab_coat","1F97D":"goggles","1F97E":"hiking_boot","1F97F":"womans_flat_shoe","1F980":"crab","1F981":"lion_face","1F982":"scorpion","1F983":"turkey","1F984":"unicorn_face","1F985":"eagle","1F986":"duck","1F987":"bat","1F988":"shark","1F989":"owl","1F98A":"fox_face","1F98B":"butterfly","1F98C":"deer","1F98D":"gorilla","1F98E":"lizard","1F98F":"rhinoceros","1F990":"shrimp","1F991":"squid","1F992":"giraffe_face","1F993":"zebra_face","1F994":"hedgehog","1F995":"sauropod","1F996":"t-rex","1F997":"cricket","1F998":"kangaroo","1F999":"llama","1F99A":"peacock","1F99B":"hippopotamus","1F99C":"parrot","1F99D":"raccoon","1F99E":"lobster","1F99F":"mosquito","1F9A0":"microbe","1F9A1":"badger","1F9A2":"swan","1F9A3":"mammoth","1F9A4":"dodo","1F9A5":"sloth","1F9A6":"otter","1F9A7":"orangutan","1F9A8":"skunk","1F9A9":"flamingo","1F9AA":"oyster","1F9AB":"beaver","1F9AC":"bison","1F9AD":"seal","1F9AE":"guide_dog","1F9AF":"probing_cane","1F9B4":"bone","1F9B5":"leg","1F9B6":"foot","1F9B7":"tooth","1F9B8-200D-2640-FE0F":"female_superhero","1F9B8-200D-2642-FE0F":"male_superhero","1F9B8":"superhero","1F9B9-200D-2640-FE0F":"female_supervillain","1F9B9-200D-2642-FE0F":"male_supervillain","1F9B9":"supervillain","1F9BA":"safety_vest","1F9BB":"ear_with_hearing_aid","1F9BC":"motorized_wheelchair","1F9BD":"manual_wheelchair","1F9BE":"mechanical_arm","1F9BF":"mechanical_leg","1F9C0":"cheese_wedge","1F9C1":"cupcake","1F9C2":"salt","1F9C3":"beverage_box","1F9C4":"garlic","1F9C5":"onion","1F9C6":"falafel","1F9C7":"waffle","1F9C8":"butter","1F9C9":"mate_drink","1F9CA":"ice_cube","1F9CB":"bubble_tea","1F9CD-200D-2640-FE0F":"woman_standing","1F9CD-200D-2642-FE0F":"man_standing","1F9CD":"standing_person","1F9CE-200D-2640-FE0F":"woman_kneeling","1F9CE-200D-2642-FE0F":"man_kneeling","1F9CE":"kneeling_person","1F9CF-200D-2640-FE0F":"deaf_woman","1F9CF-200D-2642-FE0F":"deaf_man","1F9CF":"deaf_person","1F9D0":"face_with_monocle","1F9D1-200D-1F33E":"farmer","1F9D1-200D-1F373":"cook","1F9D1-200D-1F37C":"person_feeding_baby","1F9D1-200D-1F384":"mx_claus","1F9D1-200D-1F393":"student","1F9D1-200D-1F3A4":"singer","1F9D1-200D-1F3A8":"artist","1F9D1-200D-1F3EB":"teacher","1F9D1-200D-1F3ED":"factory_worker","1F9D1-200D-1F4BB":"technologist","1F9D1-200D-1F4BC":"office_worker","1F9D1-200D-1F527":"mechanic","1F9D1-200D-1F52C":"scientist","1F9D1-200D-1F680":"astronaut","1F9D1-200D-1F692":"firefighter","1F9D1-200D-1F91D-200D-1F9D1":"people_holding_hands","1F9D1-200D-1F9AF":"person_with_probing_cane","1F9D1-200D-1F9B0":"red_haired_person","1F9D1-200D-1F9B1":"curly_haired_person","1F9D1-200D-1F9B2":"bald_person","1F9D1-200D-1F9B3":"white_haired_person","1F9D1-200D-1F9BC":"person_in_motorized_wheelchair","1F9D1-200D-1F9BD":"person_in_manual_wheelchair","1F9D1-200D-2695-FE0F":"health_worker","1F9D1-200D-2696-FE0F":"judge","1F9D1-200D-2708-FE0F":"pilot","1F9D1":"adult","1F9D2":"child","1F9D3":"older_adult","1F9D4-200D-2640-FE0F":"woman_with_beard","1F9D4-200D-2642-FE0F":"man_with_beard","1F9D4":"bearded_person","1F9D5":"person_with_headscarf","1F9D6-200D-2640-FE0F":"woman_in_steamy_room","1F9D6-200D-2642-FE0F":"man_in_steamy_room","1F9D6":"person_in_steamy_room","1F9D7-200D-2640-FE0F":"woman_climbing","1F9D7-200D-2642-FE0F":"man_climbing","1F9D7":"person_climbing","1F9D8-200D-2640-FE0F":"woman_in_lotus_position","1F9D8-200D-2642-FE0F":"man_in_lotus_position","1F9D8":"person_in_lotus_position","1F9D9-200D-2640-FE0F":"female_mage","1F9D9-200D-2642-FE0F":"male_mage","1F9D9":"mage","1F9DA-200D-2640-FE0F":"female_fairy","1F9DA-200D-2642-FE0F":"male_fairy","1F9DA":"fairy","1F9DB-200D-2640-FE0F":"female_vampire","1F9DB-200D-2642-FE0F":"male_vampire","1F9DB":"vampire","1F9DC-200D-2640-FE0F":"mermaid","1F9DC-200D-2642-FE0F":"merman","1F9DC":"merperson","1F9DD-200D-2640-FE0F":"female_elf","1F9DD-200D-2642-FE0F":"male_elf","1F9DD":"elf","1F9DE-200D-2640-FE0F":"female_genie","1F9DE-200D-2642-FE0F":"male_genie","1F9DE":"genie","1F9DF-200D-2640-FE0F":"female_zombie","1F9DF-200D-2642-FE0F":"male_zombie","1F9DF":"zombie","1F9E0":"brain","1F9E1":"orange_heart","1F9E2":"billed_cap","1F9E3":"scarf","1F9E4":"gloves","1F9E5":"coat","1F9E6":"socks","1F9E7":"red_envelope","1F9E8":"firecracker","1F9E9":"jigsaw","1F9EA":"test_tube","1F9EB":"petri_dish","1F9EC":"dna","1F9ED":"compass","1F9EE":"abacus","1F9EF":"fire_extinguisher","1F9F0":"toolbox","1F9F1":"bricks","1F9F2":"magnet","1F9F3":"luggage","1F9F4":"lotion_bottle","1F9F5":"thread","1F9F6":"yarn","1F9F7":"safety_pin","1F9F8":"teddy_bear","1F9F9":"broom","1F9FA":"basket","1F9FB":"roll_of_paper","1F9FC":"soap","1F9FD":"sponge","1F9FE":"receipt","1F9FF":"nazar_amulet","1FA70":"ballet_shoes","1FA71":"one-piece_swimsuit","1FA72":"briefs","1FA73":"shorts","1FA74":"thong_sandal","1FA78":"drop_of_blood","1FA79":"adhesive_bandage","1FA7A":"stethoscope","1FA80":"yo-yo","1FA81":"kite","1FA82":"parachute","1FA83":"boomerang","1FA84":"magic_wand","1FA85":"pinata","1FA86":"nesting_dolls","1FA90":"ringed_planet","1FA91":"chair","1FA92":"razor","1FA93":"axe","1FA94":"diya_lamp","1FA95":"banjo","1FA96":"military_helmet","1FA97":"accordion","1FA98":"long_drum","1FA99":"coin","1FA9A":"carpentry_saw","1FA9B":"screwdriver","1FA9C":"ladder","1FA9D":"hook","1FA9E":"mirror","1FA9F":"window","1FAA0":"plunger","1FAA1":"sewing_needle","1FAA2":"knot","1FAA3":"bucket","1FAA4":"mouse_trap","1FAA5":"toothbrush","1FAA6":"headstone","1FAA7":"placard","1FAA8":"rock","1FAB0":"fly","1FAB1":"worm","1FAB2":"beetle","1FAB3":"cockroach","1FAB4":"potted_plant","1FAB5":"wood","1FAB6":"feather","1FAC0":"anatomical_heart","1FAC1":"lungs","1FAC2":"people_hugging","1FAD0":"blueberries","1FAD1":"bell_pepper","1FAD2":"olive","1FAD3":"flatbread","1FAD4":"tamale","1FAD5":"fondue","1FAD6":"teapot","203C":"bangbang","21A9":"leftwards_arrow_with_hook","21AA":"arrow_right_hook","231A":"watch","231B":"hourglass","23CF":"eject","23E9":"fast_forward","23EA":"rewind","23EB":"arrow_double_up","23EC":"arrow_double_down","23ED":"black_right_pointing_double_triangle_with_vertical_bar","23EE":"black_left_pointing_double_triangle_with_vertical_bar","23EF":"black_right_pointing_triangle_with_double_vertical_bar","23F0":"alarm_clock","23F1":"stopwatch","23F2":"timer_clock","23F3":"hourglass_flowing_sand","23F8":"double_vertical_bar","23F9":"black_square_for_stop","23FA":"black_circle_for_record","24C2":"m","25AA":"black_small_square","25AB":"white_small_square","25B6":"arrow_forward","25C0":"arrow_backward","25FB":"white_medium_square","25FC":"black_medium_square","25FD":"white_medium_small_square","25FE":"black_medium_small_square","260E":["phone","telephone"],"261D":"point_up","262A":"star_and_crescent","262E":"peace_symbol","262F":"yin_yang","263A":"relaxed","264A":"gemini","264B":"cancer","264C":"leo","264D":"virgo","264E":"libra","264F":"scorpius","265F":"chess_pawn","267B":"recycle","267E":"infinity","267F":"wheelchair","269B":"atom_symbol","269C":"fleur_de_lis","26A0":"warning","26A1":"zap","26A7":"transgender_symbol","26AA":"white_circle","26AB":"black_circle","26B0":"coffin","26B1":"funeral_urn","26BD":"soccer","26BE":"baseball","26C4":"snowman_without_snow","26C5":"partly_sunny","26C8":"thunder_cloud_and_rain","26CE":"ophiuchus","26CF":"pick","26D1":"helmet_with_white_cross","26D3":"chains","26D4":"no_entry","26E9":"shinto_shrine","26EA":"church","26F0":"mountain","26F1":"umbrella_on_ground","26F2":"fountain","26F3":"golf","26F4":"ferry","26F5":["boat","sailboat"],"26F7":"skier","26F8":"ice_skate","26F9-FE0F-200D-2640-FE0F":"woman-bouncing-ball","26F9-FE0F-200D-2642-FE0F":"man-bouncing-ball","26F9":"person_with_ball","26FA":"tent","26FD":"fuelpump","270A":"fist","270B":["hand","raised_hand"],"270C":"v","270D":"writing_hand","270F":"pencil2","271D":"latin_cross","274C":"x","274E":"negative_squared_cross_mark","2764-FE0F-200D-1F525":"heart_on_fire","2764-FE0F-200D-1FA79":"mending_heart","27A1":"arrow_right","27B0":"curly_loop","27BF":"loop","2B05":"arrow_left","2B06":"arrow_up","2B07":"arrow_down","2B1B":"black_large_square","2B1C":"white_large_square","2B50":"star","2B55":"o","303D":"part_alternation_mark"}')},function(e,t,n){"use strict";e.exports=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}},function(e,t,n){"use strict";function r(e){return"[object Object]"===Object.prototype.toString.call(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=function(e){var t,n;return!1!==r(e)&&(void 0===(t=e.constructor)||!1!==r(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}},function(e,t,n){"use strict";var r=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===i}(e)}(e)};var i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function o(e,t){return!1!==t.clone&&t.isMergeableObject(e)?u((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function a(e,t,n){return e.concat(t).map((function(e){return o(e,n)}))}function s(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function l(e,t){try{return t in e}catch(e){return!1}}function c(e,t,n){var r={};return n.isMergeableObject(e)&&s(e).forEach((function(t){r[t]=o(e[t],n)})),s(t).forEach((function(i){(function(e,t){return l(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(l(e,i)&&n.isMergeableObject(t[i])?r[i]=function(e,t){if(!t.customMerge)return u;var n=t.customMerge(e);return"function"==typeof n?n:u}(i,n)(e[i],t[i],n):r[i]=o(t[i],n))})),r}function u(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||a,n.isMergeableObject=n.isMergeableObject||r,n.cloneUnlessOtherwiseSpecified=o;var i=Array.isArray(t);return i===Array.isArray(e)?i?n.arrayMerge(e,t,n):c(e,t,n):o(t,n)}u.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return u(e,n,t)}),{})};var d=u;e.exports=d},function(e,t,n){var r,i,o;i=[],void 0===(o="function"==typeof(r=function(){return function(e){function t(e){return" "===e||"\t"===e||"\n"===e||"\f"===e||"\r"===e}function n(t){var n,r=t.exec(e.substring(g));if(r)return n=r[0],g+=n.length,n}for(var r,i,o,a,s,l=e.length,c=/^[ \t\n\r\u000c]+/,u=/^[, \t\n\r\u000c]+/,d=/^[^ \t\n\r\u000c]+/,h=/[,]+$/,p=/^\d+$/,m=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,g=0,f=[];;){if(n(u),g>=l)return f;r=n(d),i=[],","===r.slice(-1)?(r=r.replace(h,""),b()):_()}function _(){for(n(c),o="",a="in descriptor";;){if(s=e.charAt(g),"in descriptor"===a)if(t(s))o&&(i.push(o),o="",a="after descriptor");else{if(","===s)return g+=1,o&&i.push(o),void b();if("("===s)o+=s,a="in parens";else{if(""===s)return o&&i.push(o),void b();o+=s}}else if("in parens"===a)if(")"===s)o+=s,a="in descriptor";else{if(""===s)return i.push(o),void b();o+=s}else if("after descriptor"===a)if(t(s));else{if(""===s)return void b();a="in descriptor",g-=1}g+=1}}function b(){var t,n,o,a,s,l,c,u,d,h=!1,g={};for(a=0;a<i.length;a++)l=(s=i[a])[s.length-1],c=s.substring(0,s.length-1),u=parseInt(c,10),d=parseFloat(c),p.test(c)&&"w"===l?((t||n)&&(h=!0),0===u?h=!0:t=u):m.test(c)&&"x"===l?((t||n||o)&&(h=!0),d<0?h=!0:n=d):p.test(c)&&"h"===l?((o||n)&&(h=!0),0===u?h=!0:o=u):h=!0;h?console&&console.log&&console.log("Invalid srcset descriptor found in '"+e+"' at '"+s+"'."):(g.url=r,t&&(g.w=t),n&&(g.d=n),o&&(g.h=o),f.push(g))}}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){"use strict";(function(t){let r=n(539),i=n(440),o=n(727),a=n(296),s=n(1110),l=n(442),c=n(1112),u=n(543),d=n(732),h=n(444),p=n(546),m=n(544),g=n(443),f=n(545),_=n(733),b=n(547),v=n(374),y=n(441);function E(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new s(e)}E.plugin=function(e,n){let r,i=!1;function o(...r){console&&console.warn&&!i&&(i=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),t.env.LANG&&t.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let o=n(...r);return o.postcssPlugin=e,o.postcssVersion=(new s).version,o}return Object.defineProperty(o,"postcss",{get:()=>(r||(r=o()),r)}),o.process=function(e,t,n){return E([o(n)]).process(e,t)},o},E.stringify=l,E.parse=f,E.fromJSON=c,E.list=_,E.comment=e=>new h(e),E.atRule=e=>new p(e),E.decl=e=>new i(e),E.rule=e=>new b(e),E.root=e=>new v(e),E.document=e=>new u(e),E.CssSyntaxError=r,E.Declaration=i,E.Container=a,E.Processor=s,E.Document=u,E.Comment=h,E.Warning=d,E.AtRule=p,E.Result=m,E.Input=g,E.Rule=b,E.Root=v,E.Node=y,o.registerPostcss(E),e.exports=E,E.default=E}).call(this,n(56))},function(e,t){var n=String,r=function(){return{isColorSupported:!1,reset:n,bold:n,dim:n,italic:n,underline:n,inverse:n,hidden:n,strikethrough:n,black:n,red:n,green:n,yellow:n,blue:n,magenta:n,cyan:n,white:n,gray:n,bgBlack:n,bgRed:n,bgGreen:n,bgYellow:n,bgBlue:n,bgMagenta:n,bgCyan:n,bgWhite:n}};e.exports=r(),e.exports.createColors=r},function(e,t){e.exports={nanoid:(e=21)=>{let t="",n=e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let r="",i=n;for(;i--;)r+=e[Math.random()*e.length|0];return r}}},,function(e,t,n){"use strict";let r=n(440),i=n(1109),o=n(444),a=n(546),s=n(374),l=n(547);const c={empty:!0,space:!0};e.exports=class{constructor(e){this.input=e,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.customProperty=!1,this.createTokenizer(),this.root.source={input:e,start:{offset:0,line:1,column:1}}}createTokenizer(){this.tokenizer=i(this.input)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}comment(e){let t=new o;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]);let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let e=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}emptyRule(e){let t=new l;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}other(e){let t=!1,n=null,r=!1,i=null,o=[],a=e[1].startsWith("--"),s=[],l=e;for(;l;){if(n=l[0],s.push(l),"("===n||"["===n)i||(i=l),o.push("("===n?")":"]");else if(a&&r&&"{"===n)i||(i=l),o.push("}");else if(0===o.length){if(";"===n){if(r)return void this.decl(s,a);break}if("{"===n)return void this.rule(s);if("}"===n){this.tokenizer.back(s.pop()),t=!0;break}":"===n&&(r=!0)}else n===o[o.length-1]&&(o.pop(),0===o.length&&(i=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(i),t&&r){if(!a)for(;s.length&&(l=s[s.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(s.pop());this.decl(s,a)}else this.unknownWord(s)}rule(e){e.pop();let t=new l;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}decl(e,t){let n=new r;this.init(n,e[0][2]);let i,o=e[e.length-1];for(";"===o[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(o[3]||o[2]||function(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}(e));"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(i=e.shift(),":"===i[0]){n.raws.between+=i[1];break}"word"===i[0]&&/\w/.test(i[1])&&this.unknownWord([i]),n.raws.between+=i[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let a,s=[];for(;e.length&&(a=e[0][0],"space"===a||"comment"===a);)s.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(i=e[t],"!important"===i[1].toLowerCase()){n.important=!0;let r=this.stringFrom(e,t);r=this.spacesFromEnd(e)+r," !important"!==r&&(n.raws.important=r);break}if("important"===i[1].toLowerCase()){let r=e.slice(0),i="";for(let e=t;e>0;e--){let t=r[e][0];if(0===i.trim().indexOf("!")&&"space"!==t)break;i=r.pop()[1]+i}0===i.trim().indexOf("!")&&(n.important=!0,n.raws.important=i,e=r)}if("space"!==i[0]&&"comment"!==i[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(n.raws.between+=s.map((e=>e[1])).join(""),s=[]),this.raw(n,"value",s.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}atrule(e){let t,n,r,i=new a;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);let o=!1,s=!1,l=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?c.push("("===t?")":"]"):"{"===t&&c.length>0?c.push("}"):t===c[c.length-1]&&c.pop(),0===c.length){if(";"===t){i.source.end=this.getPosition(e[2]),this.semicolon=!0;break}if("{"===t){s=!0;break}if("}"===t){if(l.length>0){for(r=l.length-1,n=l[r];n&&"space"===n[0];)n=l[--r];n&&(i.source.end=this.getPosition(n[3]||n[2]))}this.end(e);break}l.push(e)}else l.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(i.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(i,"params",l),o&&(e=l[l.length-1],i.source.end=this.getPosition(e[3]||e[2]),this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),s&&(i.nodes=[],this.current=i)}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{offset:e,line:t.line,column:t.col}}init(e,t){this.current.push(e),e.source={start:this.getPosition(t),input:this.input},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}raw(e,t,n,r){let i,o,a,s,l=n.length,u="",d=!0;for(let e=0;e<l;e+=1)i=n[e],o=i[0],"space"!==o||e!==l-1||r?"comment"===o?(s=n[e-1]?n[e-1][0]:"empty",a=n[e+1]?n[e+1][0]:"empty",c[s]||c[a]||","===u.slice(-1)?d=!1:u+=i[1]):u+=i[1]:d=!1;if(!d){let r=n.reduce(((e,t)=>e+t[1]),"");e.raws[t]={value:u,raw:r}}e[t]=u}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}colon(e){let t,n,r,i=0;for(let[o,a]of e.entries()){if(t=a,n=t[0],"("===n&&(i+=1),")"===n&&(i-=1),0===i&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return o}this.doubleColon(t)}r=t}return!1}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}precheckMissedSemicolon(){}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let n,r=0;for(let i=t-1;i>=0&&(n=e[i],"space"===n[0]||(r+=1,2!==r));i--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}}},function(e,t,n){"use strict";const r="'".charCodeAt(0),i='"'.charCodeAt(0),o="\\".charCodeAt(0),a="/".charCodeAt(0),s="\n".charCodeAt(0),l=" ".charCodeAt(0),c="\f".charCodeAt(0),u="\t".charCodeAt(0),d="\r".charCodeAt(0),h="[".charCodeAt(0),p="]".charCodeAt(0),m="(".charCodeAt(0),g=")".charCodeAt(0),f="{".charCodeAt(0),_="}".charCodeAt(0),b=";".charCodeAt(0),v="*".charCodeAt(0),y=":".charCodeAt(0),E="@".charCodeAt(0),S=/[\t\n\f\r "#'()/;[\\\]{}]/g,w=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,T=/.[\n"'(/\\]/,C=/[\da-f]/i;e.exports=function(e,t={}){let n,x,F,D,k,O,I,A,R,N,M=e.css.valueOf(),P=t.ignoreErrors,L=M.length,B=0,U=[],j=[];function G(t){throw e.error("Unclosed "+t,B)}return{back:function(e){j.push(e)},nextToken:function(e){if(j.length)return j.pop();if(B>=L)return;let t=!!e&&e.ignoreUnclosed;switch(n=M.charCodeAt(B),n){case s:case l:case u:case d:case c:x=B;do{x+=1,n=M.charCodeAt(x)}while(n===l||n===s||n===u||n===d||n===c);N=["space",M.slice(B,x)],B=x-1;break;case h:case p:case f:case _:case y:case b:case g:{let e=String.fromCharCode(n);N=[e,e,B];break}case m:if(A=U.length?U.pop()[1]:"",R=M.charCodeAt(B+1),"url"===A&&R!==r&&R!==i&&R!==l&&R!==s&&R!==u&&R!==c&&R!==d){x=B;do{if(O=!1,x=M.indexOf(")",x+1),-1===x){if(P||t){x=B;break}G("bracket")}for(I=x;M.charCodeAt(I-1)===o;)I-=1,O=!O}while(O);N=["brackets",M.slice(B,x+1),B,x],B=x}else x=M.indexOf(")",B+1),D=M.slice(B,x+1),-1===x||T.test(D)?N=["(","(",B]:(N=["brackets",D,B,x],B=x);break;case r:case i:F=n===r?"'":'"',x=B;do{if(O=!1,x=M.indexOf(F,x+1),-1===x){if(P||t){x=B+1;break}G("string")}for(I=x;M.charCodeAt(I-1)===o;)I-=1,O=!O}while(O);N=["string",M.slice(B,x+1),B,x],B=x;break;case E:S.lastIndex=B+1,S.test(M),x=0===S.lastIndex?M.length-1:S.lastIndex-2,N=["at-word",M.slice(B,x+1),B,x],B=x;break;case o:for(x=B,k=!0;M.charCodeAt(x+1)===o;)x+=1,k=!k;if(n=M.charCodeAt(x+1),k&&n!==a&&n!==l&&n!==s&&n!==u&&n!==d&&n!==c&&(x+=1,C.test(M.charAt(x)))){for(;C.test(M.charAt(x+1));)x+=1;M.charCodeAt(x+1)===l&&(x+=1)}N=["word",M.slice(B,x+1),B,x],B=x;break;default:n===a&&M.charCodeAt(B+1)===v?(x=M.indexOf("*/",B+2)+1,0===x&&(P||t?x=M.length:G("comment")),N=["comment",M.slice(B,x+1),B,x],B=x):(w.lastIndex=B+1,w.test(M),x=0===w.lastIndex?M.length-1:w.lastIndex-2,N=["word",M.slice(B,x+1),B,x],U.push(N),B=x)}return B++,N},endOfFile:function(){return 0===j.length&&B>=L},position:function(){return B}}}},function(e,t,n){"use strict";let r=n(1111),i=n(727),o=n(543),a=n(374);class s{constructor(e=[]){this.version="8.4.21",this.plugins=this.normalize(e)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}process(e,t={}){return 0===this.plugins.length&&void 0===t.parser&&void 0===t.stringifier&&void 0===t.syntax?new r(this,e,t):new i(this,e,t)}normalize(e){let t=[];for(let n of e)if(!0===n.postcss?n=n():n.postcss&&(n=n.postcss),"object"==typeof n&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if("object"==typeof n&&n.postcssPlugin)t.push(n);else if("function"==typeof n)t.push(n);else{if("object"!=typeof n||!n.parse&&!n.stringify)throw new Error(n+" is not a PostCSS plugin")}return t}}e.exports=s,s.default=s,a.registerProcessor(s),o.registerProcessor(s)},function(e,t,n){"use strict";let r=n(728),i=n(442),o=(n(731),n(545));const a=n(544);class s{constructor(e,t,n){let o;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let s=i;this.result=new a(this._processor,o,this._opts),this.result.css=t;let l=this;Object.defineProperty(this.result,"root",{get:()=>l.root});let c=new r(s,o,this._opts,t);if(c.isMap()){let[e,t]=c.generate();e&&(this.result.css=e),t&&(this.result.map=t)}}get[Symbol.toStringTag](){return"NoWorkResult"}get processor(){return this.result.processor}get opts(){return this.result.opts}get css(){return this.result.css}get content(){return this.result.css}get map(){return this.result.map}get root(){if(this._root)return this._root;let e,t=o;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get messages(){return[]}warnings(){return[]}toString(){return this._css}then(e,t){return this.async().then(e,t)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}sync(){if(this.error)throw this.error;return this.result}}e.exports=s,s.default=s},function(e,t,n){"use strict";let r=n(440),i=n(730),o=n(444),a=n(546),s=n(443),l=n(374),c=n(547);function u(e,t){if(Array.isArray(e))return e.map((e=>u(e)));let{inputs:n,...d}=e;if(n){t=[];for(let e of n){let n={...e,__proto__:s.prototype};n.map&&(n.map={...n.map,__proto__:i.prototype}),t.push(n)}}if(d.nodes&&(d.nodes=e.nodes.map((e=>u(e,t)))),d.source){let{inputId:e,...n}=d.source;d.source=n,null!=e&&(d.source.input=t[e])}if("root"===d.type)return new l(d);if("decl"===d.type)return new r(d);if("rule"===d.type)return new c(d);if("comment"===d.type)return new o(d);if("atrule"===d.type)return new a(d);throw new Error("Unknown node type: "+e.type)}e.exports=u,u.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyRegExps={xml:/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g,html4:/&(?:nbsp|iexcl|cent|pound|curren|yen|brvbar|sect|uml|copy|ordf|laquo|not|shy|reg|macr|deg|plusmn|sup2|sup3|acute|micro|para|middot|cedil|sup1|ordm|raquo|frac14|frac12|frac34|iquest|Agrave|Aacute|Acirc|Atilde|Auml|Aring|AElig|Ccedil|Egrave|Eacute|Ecirc|Euml|Igrave|Iacute|Icirc|Iuml|ETH|Ntilde|Ograve|Oacute|Ocirc|Otilde|Ouml|times|Oslash|Ugrave|Uacute|Ucirc|Uuml|Yacute|THORN|szlig|agrave|aacute|acirc|atilde|auml|aring|aelig|ccedil|egrave|eacute|ecirc|euml|igrave|iacute|icirc|iuml|eth|ntilde|ograve|oacute|ocirc|otilde|ouml|divide|oslash|ugrave|uacute|ucirc|uuml|yacute|thorn|yuml|quot|amp|lt|gt|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g,html5:/&(?:AElig|AMP|Aacute|Acirc|Agrave|Aring|Atilde|Auml|COPY|Ccedil|ETH|Eacute|Ecirc|Egrave|Euml|GT|Iacute|Icirc|Igrave|Iuml|LT|Ntilde|Oacute|Ocirc|Ograve|Oslash|Otilde|Ouml|QUOT|REG|THORN|Uacute|Ucirc|Ugrave|Uuml|Yacute|aacute|acirc|acute|aelig|agrave|amp|aring|atilde|auml|brvbar|ccedil|cedil|cent|copy|curren|deg|divide|eacute|ecirc|egrave|eth|euml|frac12|frac14|frac34|gt|iacute|icirc|iexcl|igrave|iquest|iuml|laquo|lt|macr|micro|middot|nbsp|not|ntilde|oacute|ocirc|ograve|ordf|ordm|oslash|otilde|ouml|para|plusmn|pound|quot|raquo|reg|sect|shy|sup1|sup2|sup3|szlig|thorn|times|uacute|ucirc|ugrave|uml|uuml|yacute|yen|yuml|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g},t.namedReferences={xml:{entities:{"<":"<",">":">",""":'"',"'":"'","&":"&"},characters:{"<":"<",">":">",'"':""","'":"'","&":"&"}},html4:{entities:{"'":"'"," ":" "," ":" ","¡":"¡","¡":"¡","¢":"¢","¢":"¢","£":"£","£":"£","¤":"¤","¤":"¤","¥":"¥","¥":"¥","¦":"¦","¦":"¦","§":"§","§":"§","¨":"¨","¨":"¨","©":"©","©":"©","ª":"ª","ª":"ª","«":"«","«":"«","¬":"¬","¬":"¬","­":"","­":"","®":"®","®":"®","¯":"¯","¯":"¯","°":"°","°":"°","±":"±","±":"±","²":"²","²":"²","³":"³","³":"³","´":"´","´":"´","µ":"µ","µ":"µ","¶":"¶","¶":"¶","·":"·","·":"·","¸":"¸","¸":"¸","¹":"¹","¹":"¹","º":"º","º":"º","»":"»","»":"»","¼":"¼","¼":"¼","½":"½","½":"½","¾":"¾","¾":"¾","¿":"¿","¿":"¿","À":"À","À":"À","Á":"Á","Á":"Á","Â":"Â","Â":"Â","Ã":"Ã","Ã":"Ã","Ä":"Ä","Ä":"Ä","Å":"Å","Å":"Å","Æ":"Æ","Æ":"Æ","Ç":"Ç","Ç":"Ç","È":"È","È":"È","É":"É","É":"É","Ê":"Ê","Ê":"Ê","Ë":"Ë","Ë":"Ë","Ì":"Ì","Ì":"Ì","Í":"Í","Í":"Í","Î":"Î","Î":"Î","Ï":"Ï","Ï":"Ï","Ð":"Ð","Ð":"Ð","Ñ":"Ñ","Ñ":"Ñ","Ò":"Ò","Ò":"Ò","Ó":"Ó","Ó":"Ó","Ô":"Ô","Ô":"Ô","Õ":"Õ","Õ":"Õ","Ö":"Ö","Ö":"Ö","×":"×","×":"×","Ø":"Ø","Ø":"Ø","Ù":"Ù","Ù":"Ù","Ú":"Ú","Ú":"Ú","Û":"Û","Û":"Û","Ü":"Ü","Ü":"Ü","Ý":"Ý","Ý":"Ý","Þ":"Þ","Þ":"Þ","ß":"ß","ß":"ß","à":"à","à":"à","á":"á","á":"á","â":"â","â":"â","ã":"ã","ã":"ã","ä":"ä","ä":"ä","å":"å","å":"å","æ":"æ","æ":"æ","ç":"ç","ç":"ç","è":"è","è":"è","é":"é","é":"é","ê":"ê","ê":"ê","ë":"ë","ë":"ë","ì":"ì","ì":"ì","í":"í","í":"í","î":"î","î":"î","ï":"ï","ï":"ï","ð":"ð","ð":"ð","ñ":"ñ","ñ":"ñ","ò":"ò","ò":"ò","ó":"ó","ó":"ó","ô":"ô","ô":"ô","õ":"õ","õ":"õ","ö":"ö","ö":"ö","÷":"÷","÷":"÷","ø":"ø","ø":"ø","ù":"ù","ù":"ù","ú":"ú","ú":"ú","û":"û","û":"û","ü":"ü","ü":"ü","ý":"ý","ý":"ý","þ":"þ","þ":"þ","ÿ":"ÿ","ÿ":"ÿ",""":'"',""":'"',"&":"&","&":"&","<":"<","<":"<",">":">",">":">","Œ":"Œ","œ":"œ","Š":"Š","š":"š","Ÿ":"Ÿ","ˆ":"ˆ","˜":"˜"," ":" "," ":" "," ":" ","‌":"","‍":"","‎":"","‏":"","–":"–","—":"—","‘":"‘","’":"’","‚":"‚","“":"“","”":"”","„":"„","†":"†","‡":"‡","‰":"‰","‹":"‹","›":"›","€":"€","ƒ":"ƒ","Α":"Α","Β":"Β","Γ":"Γ","Δ":"Δ","Ε":"Ε","Ζ":"Ζ","Η":"Η","Θ":"Θ","Ι":"Ι","Κ":"Κ","Λ":"Λ","Μ":"Μ","Ν":"Ν","Ξ":"Ξ","Ο":"Ο","Π":"Π","Ρ":"Ρ","Σ":"Σ","Τ":"Τ","Υ":"Υ","Φ":"Φ","Χ":"Χ","Ψ":"Ψ","Ω":"Ω","α":"α","β":"β","γ":"γ","δ":"δ","ε":"ε","ζ":"ζ","η":"η","θ":"θ","ι":"ι","κ":"κ","λ":"λ","μ":"μ","ν":"ν","ξ":"ξ","ο":"ο","π":"π","ρ":"ρ","ς":"ς","σ":"σ","τ":"τ","υ":"υ","φ":"φ","χ":"χ","ψ":"ψ","ω":"ω","ϑ":"ϑ","ϒ":"ϒ","ϖ":"ϖ","•":"•","…":"…","′":"′","″":"″","‾":"‾","⁄":"⁄","℘":"℘","ℑ":"ℑ","ℜ":"ℜ","™":"™","ℵ":"ℵ","←":"←","↑":"↑","→":"→","↓":"↓","↔":"↔","↵":"↵","⇐":"⇐","⇑":"⇑","⇒":"⇒","⇓":"⇓","⇔":"⇔","∀":"∀","∂":"∂","∃":"∃","∅":"∅","∇":"∇","∈":"∈","∉":"∉","∋":"∋","∏":"∏","∑":"∑","−":"−","∗":"∗","√":"√","∝":"∝","∞":"∞","∠":"∠","∧":"∧","∨":"∨","∩":"∩","∪":"∪","∫":"∫","∴":"∴","∼":"∼","≅":"≅","≈":"≈","≠":"≠","≡":"≡","≤":"≤","≥":"≥","⊂":"⊂","⊃":"⊃","⊄":"⊄","⊆":"⊆","⊇":"⊇","⊕":"⊕","⊗":"⊗","⊥":"⊥","⋅":"⋅","⌈":"⌈","⌉":"⌉","⌊":"⌊","⌋":"⌋","⟨":"〈","⟩":"〉","◊":"◊","♠":"♠","♣":"♣","♥":"♥","♦":"♦"},characters:{"'":"'"," ":" ","¡":"¡","¢":"¢","£":"£","¤":"¤","¥":"¥","¦":"¦","§":"§","¨":"¨","©":"©","ª":"ª","«":"«","¬":"¬","":"­","®":"®","¯":"¯","°":"°","±":"±","²":"²","³":"³","´":"´","µ":"µ","¶":"¶","·":"·","¸":"¸","¹":"¹","º":"º","»":"»","¼":"¼","½":"½","¾":"¾","¿":"¿","À":"À","Á":"Á","Â":"Â","Ã":"Ã","Ä":"Ä","Å":"Å","Æ":"Æ","Ç":"Ç","È":"È","É":"É","Ê":"Ê","Ë":"Ë","Ì":"Ì","Í":"Í","Î":"Î","Ï":"Ï","Ð":"Ð","Ñ":"Ñ","Ò":"Ò","Ó":"Ó","Ô":"Ô","Õ":"Õ","Ö":"Ö","×":"×","Ø":"Ø","Ù":"Ù","Ú":"Ú","Û":"Û","Ü":"Ü","Ý":"Ý","Þ":"Þ","ß":"ß","à":"à","á":"á","â":"â","ã":"ã","ä":"ä","å":"å","æ":"æ","ç":"ç","è":"è","é":"é","ê":"ê","ë":"ë","ì":"ì","í":"í","î":"î","ï":"ï","ð":"ð","ñ":"ñ","ò":"ò","ó":"ó","ô":"ô","õ":"õ","ö":"ö","÷":"÷","ø":"ø","ù":"ù","ú":"ú","û":"û","ü":"ü","ý":"ý","þ":"þ","ÿ":"ÿ",'"':""","&":"&","<":"<",">":">","Œ":"Œ","œ":"œ","Š":"Š","š":"š","Ÿ":"Ÿ","ˆ":"ˆ","˜":"˜"," ":" "," ":" "," ":" ","":"‌","":"‍","":"‎","":"‏","–":"–","—":"—","‘":"‘","’":"’","‚":"‚","“":"“","”":"”","„":"„","†":"†","‡":"‡","‰":"‰","‹":"‹","›":"›","€":"€","ƒ":"ƒ","Α":"Α","Β":"Β","Γ":"Γ","Δ":"Δ","Ε":"Ε","Ζ":"Ζ","Η":"Η","Θ":"Θ","Ι":"Ι","Κ":"Κ","Λ":"Λ","Μ":"Μ","Ν":"Ν","Ξ":"Ξ","Ο":"Ο","Π":"Π","Ρ":"Ρ","Σ":"Σ","Τ":"Τ","Υ":"Υ","Φ":"Φ","Χ":"Χ","Ψ":"Ψ","Ω":"Ω","α":"α","β":"β","γ":"γ","δ":"δ","ε":"ε","ζ":"ζ","η":"η","θ":"θ","ι":"ι","κ":"κ","λ":"λ","μ":"μ","ν":"ν","ξ":"ξ","ο":"ο","π":"π","ρ":"ρ","ς":"ς","σ":"σ","τ":"τ","υ":"υ","φ":"φ","χ":"χ","ψ":"ψ","ω":"ω","ϑ":"ϑ","ϒ":"ϒ","ϖ":"ϖ","•":"•","…":"…","′":"′","″":"″","‾":"‾","⁄":"⁄","℘":"℘","ℑ":"ℑ","ℜ":"ℜ","™":"™","ℵ":"ℵ","←":"←","↑":"↑","→":"→","↓":"↓","↔":"↔","↵":"↵","⇐":"⇐","⇑":"⇑","⇒":"⇒","⇓":"⇓","⇔":"⇔","∀":"∀","∂":"∂","∃":"∃","∅":"∅","∇":"∇","∈":"∈","∉":"∉","∋":"∋","∏":"∏","∑":"∑","−":"−","∗":"∗","√":"√","∝":"∝","∞":"∞","∠":"∠","∧":"∧","∨":"∨","∩":"∩","∪":"∪","∫":"∫","∴":"∴","∼":"∼","≅":"≅","≈":"≈","≠":"≠","≡":"≡","≤":"≤","≥":"≥","⊂":"⊂","⊃":"⊃","⊄":"⊄","⊆":"⊆","⊇":"⊇","⊕":"⊕","⊗":"⊗","⊥":"⊥","⋅":"⋅","⌈":"⌈","⌉":"⌉","⌊":"⌊","⌋":"⌋","〈":"⟨","〉":"⟩","◊":"◊","♠":"♠","♣":"♣","♥":"♥","♦":"♦"}},html5:{entities:{"Æ":"Æ","Æ":"Æ","&":"&","&":"&","Á":"Á","Á":"Á","Ă":"Ă","Â":"Â","Â":"Â","А":"А","𝔄":"𝔄","À":"À","À":"À","Α":"Α","Ā":"Ā","⩓":"⩓","Ą":"Ą","𝔸":"𝔸","⁡":"","Å":"Å","Å":"Å","𝒜":"𝒜","≔":"≔","Ã":"Ã","Ã":"Ã","Ä":"Ä","Ä":"Ä","∖":"∖","⫧":"⫧","⌆":"⌆","Б":"Б","∵":"∵","ℬ":"ℬ","Β":"Β","𝔅":"𝔅","𝔹":"𝔹","˘":"˘","ℬ":"ℬ","≎":"≎","Ч":"Ч","©":"©","©":"©","Ć":"Ć","⋒":"⋒","ⅅ":"ⅅ","ℭ":"ℭ","Č":"Č","Ç":"Ç","Ç":"Ç","Ĉ":"Ĉ","∰":"∰","Ċ":"Ċ","¸":"¸","·":"·","ℭ":"ℭ","Χ":"Χ","⊙":"⊙","⊖":"⊖","⊕":"⊕","⊗":"⊗","∲":"∲","”":"”","’":"’","∷":"∷","⩴":"⩴","≡":"≡","∯":"∯","∮":"∮","ℂ":"ℂ","∐":"∐","∳":"∳","⨯":"⨯","𝒞":"𝒞","⋓":"⋓","≍":"≍","ⅅ":"ⅅ","⤑":"⤑","Ђ":"Ђ","Ѕ":"Ѕ","Џ":"Џ","‡":"‡","↡":"↡","⫤":"⫤","Ď":"Ď","Д":"Д","∇":"∇","Δ":"Δ","𝔇":"𝔇","´":"´","˙":"˙","˝":"˝","`":"`","˜":"˜","⋄":"⋄","ⅆ":"ⅆ","𝔻":"𝔻","¨":"¨","⃜":"⃜","≐":"≐","∯":"∯","¨":"¨","⇓":"⇓","⇐":"⇐","⇔":"⇔","⫤":"⫤","⟸":"⟸","⟺":"⟺","⟹":"⟹","⇒":"⇒","⊨":"⊨","⇑":"⇑","⇕":"⇕","∥":"∥","↓":"↓","⤓":"⤓","⇵":"⇵","̑":"̑","⥐":"⥐","⥞":"⥞","↽":"↽","⥖":"⥖","⥟":"⥟","⇁":"⇁","⥗":"⥗","⊤":"⊤","↧":"↧","⇓":"⇓","𝒟":"𝒟","Đ":"Đ","Ŋ":"Ŋ","Ð":"Ð","Ð":"Ð","É":"É","É":"É","Ě":"Ě","Ê":"Ê","Ê":"Ê","Э":"Э","Ė":"Ė","𝔈":"𝔈","È":"È","È":"È","∈":"∈","Ē":"Ē","◻":"◻","▫":"▫","Ę":"Ę","𝔼":"𝔼","Ε":"Ε","⩵":"⩵","≂":"≂","⇌":"⇌","ℰ":"ℰ","⩳":"⩳","Η":"Η","Ë":"Ë","Ë":"Ë","∃":"∃","ⅇ":"ⅇ","Ф":"Ф","𝔉":"𝔉","◼":"◼","▪":"▪","𝔽":"𝔽","∀":"∀","ℱ":"ℱ","ℱ":"ℱ","Ѓ":"Ѓ",">":">",">":">","Γ":"Γ","Ϝ":"Ϝ","Ğ":"Ğ","Ģ":"Ģ","Ĝ":"Ĝ","Г":"Г","Ġ":"Ġ","𝔊":"𝔊","⋙":"⋙","𝔾":"𝔾","≥":"≥","⋛":"⋛","≧":"≧","⪢":"⪢","≷":"≷","⩾":"⩾","≳":"≳","𝒢":"𝒢","≫":"≫","Ъ":"Ъ","ˇ":"ˇ","^":"^","Ĥ":"Ĥ","ℌ":"ℌ","ℋ":"ℋ","ℍ":"ℍ","─":"─","ℋ":"ℋ","Ħ":"Ħ","≎":"≎","≏":"≏","Е":"Е","IJ":"IJ","Ё":"Ё","Í":"Í","Í":"Í","Î":"Î","Î":"Î","И":"И","İ":"İ","ℑ":"ℑ","Ì":"Ì","Ì":"Ì","ℑ":"ℑ","Ī":"Ī","ⅈ":"ⅈ","⇒":"⇒","∬":"∬","∫":"∫","⋂":"⋂","⁣":"","⁢":"","Į":"Į","𝕀":"𝕀","Ι":"Ι","ℐ":"ℐ","Ĩ":"Ĩ","І":"І","Ï":"Ï","Ï":"Ï","Ĵ":"Ĵ","Й":"Й","𝔍":"𝔍","𝕁":"𝕁","𝒥":"𝒥","Ј":"Ј","Є":"Є","Х":"Х","Ќ":"Ќ","Κ":"Κ","Ķ":"Ķ","К":"К","𝔎":"𝔎","𝕂":"𝕂","𝒦":"𝒦","Љ":"Љ","<":"<","<":"<","Ĺ":"Ĺ","Λ":"Λ","⟪":"⟪","ℒ":"ℒ","↞":"↞","Ľ":"Ľ","Ļ":"Ļ","Л":"Л","⟨":"⟨","←":"←","⇤":"⇤","⇆":"⇆","⌈":"⌈","⟦":"⟦","⥡":"⥡","⇃":"⇃","⥙":"⥙","⌊":"⌊","↔":"↔","⥎":"⥎","⊣":"⊣","↤":"↤","⥚":"⥚","⊲":"⊲","⧏":"⧏","⊴":"⊴","⥑":"⥑","⥠":"⥠","↿":"↿","⥘":"⥘","↼":"↼","⥒":"⥒","⇐":"⇐","⇔":"⇔","⋚":"⋚","≦":"≦","≶":"≶","⪡":"⪡","⩽":"⩽","≲":"≲","𝔏":"𝔏","⋘":"⋘","⇚":"⇚","Ŀ":"Ŀ","⟵":"⟵","⟷":"⟷","⟶":"⟶","⟸":"⟸","⟺":"⟺","⟹":"⟹","𝕃":"𝕃","↙":"↙","↘":"↘","ℒ":"ℒ","↰":"↰","Ł":"Ł","≪":"≪","⤅":"⤅","М":"М"," ":" ","ℳ":"ℳ","𝔐":"𝔐","∓":"∓","𝕄":"𝕄","ℳ":"ℳ","Μ":"Μ","Њ":"Њ","Ń":"Ń","Ň":"Ň","Ņ":"Ņ","Н":"Н","​":"","​":"","​":"","​":"","≫":"≫","≪":"≪","
":"\n","𝔑":"𝔑","⁠":""," ":" ","ℕ":"ℕ","⫬":"⫬","≢":"≢","≭":"≭","∦":"∦","∉":"∉","≠":"≠","≂̸":"≂̸","∄":"∄","≯":"≯","≱":"≱","≧̸":"≧̸","≫̸":"≫̸","≹":"≹","⩾̸":"⩾̸","≵":"≵","≎̸":"≎̸","≏̸":"≏̸","⋪":"⋪","⧏̸":"⧏̸","⋬":"⋬","≮":"≮","≰":"≰","≸":"≸","≪̸":"≪̸","⩽̸":"⩽̸","≴":"≴","⪢̸":"⪢̸","⪡̸":"⪡̸","⊀":"⊀","⪯̸":"⪯̸","⋠":"⋠","∌":"∌","⋫":"⋫","⧐̸":"⧐̸","⋭":"⋭","⊏̸":"⊏̸","⋢":"⋢","⊐̸":"⊐̸","⋣":"⋣","⊂⃒":"⊂⃒","⊈":"⊈","⊁":"⊁","⪰̸":"⪰̸","⋡":"⋡","≿̸":"≿̸","⊃⃒":"⊃⃒","⊉":"⊉","≁":"≁","≄":"≄","≇":"≇","≉":"≉","∤":"∤","𝒩":"𝒩","Ñ":"Ñ","Ñ":"Ñ","Ν":"Ν","Œ":"Œ","Ó":"Ó","Ó":"Ó","Ô":"Ô","Ô":"Ô","О":"О","Ő":"Ő","𝔒":"𝔒","Ò":"Ò","Ò":"Ò","Ō":"Ō","Ω":"Ω","Ο":"Ο","𝕆":"𝕆","“":"“","‘":"‘","⩔":"⩔","𝒪":"𝒪","Ø":"Ø","Ø":"Ø","Õ":"Õ","Õ":"Õ","⨷":"⨷","Ö":"Ö","Ö":"Ö","‾":"‾","⏞":"⏞","⎴":"⎴","⏜":"⏜","∂":"∂","П":"П","𝔓":"𝔓","Φ":"Φ","Π":"Π","±":"±","ℌ":"ℌ","ℙ":"ℙ","⪻":"⪻","≺":"≺","⪯":"⪯","≼":"≼","≾":"≾","″":"″","∏":"∏","∷":"∷","∝":"∝","𝒫":"𝒫","Ψ":"Ψ",""":'"',""":'"',"𝔔":"𝔔","ℚ":"ℚ","𝒬":"𝒬","⤐":"⤐","®":"®","®":"®","Ŕ":"Ŕ","⟫":"⟫","↠":"↠","⤖":"⤖","Ř":"Ř","Ŗ":"Ŗ","Р":"Р","ℜ":"ℜ","∋":"∋","⇋":"⇋","⥯":"⥯","ℜ":"ℜ","Ρ":"Ρ","⟩":"⟩","→":"→","⇥":"⇥","⇄":"⇄","⌉":"⌉","⟧":"⟧","⥝":"⥝","⇂":"⇂","⥕":"⥕","⌋":"⌋","⊢":"⊢","↦":"↦","⥛":"⥛","⊳":"⊳","⧐":"⧐","⊵":"⊵","⥏":"⥏","⥜":"⥜","↾":"↾","⥔":"⥔","⇀":"⇀","⥓":"⥓","⇒":"⇒","ℝ":"ℝ","⥰":"⥰","⇛":"⇛","ℛ":"ℛ","↱":"↱","⧴":"⧴","Щ":"Щ","Ш":"Ш","Ь":"Ь","Ś":"Ś","⪼":"⪼","Š":"Š","Ş":"Ş","Ŝ":"Ŝ","С":"С","𝔖":"𝔖","↓":"↓","←":"←","→":"→","↑":"↑","Σ":"Σ","∘":"∘","𝕊":"𝕊","√":"√","□":"□","⊓":"⊓","⊏":"⊏","⊑":"⊑","⊐":"⊐","⊒":"⊒","⊔":"⊔","𝒮":"𝒮","⋆":"⋆","⋐":"⋐","⋐":"⋐","⊆":"⊆","≻":"≻","⪰":"⪰","≽":"≽","≿":"≿","∋":"∋","∑":"∑","⋑":"⋑","⊃":"⊃","⊇":"⊇","⋑":"⋑","Þ":"Þ","Þ":"Þ","™":"™","Ћ":"Ћ","Ц":"Ц","	":"\t","Τ":"Τ","Ť":"Ť","Ţ":"Ţ","Т":"Т","𝔗":"𝔗","∴":"∴","Θ":"Θ","  ":" "," ":" ","∼":"∼","≃":"≃","≅":"≅","≈":"≈","𝕋":"𝕋","⃛":"⃛","𝒯":"𝒯","Ŧ":"Ŧ","Ú":"Ú","Ú":"Ú","↟":"↟","⥉":"⥉","Ў":"Ў","Ŭ":"Ŭ","Û":"Û","Û":"Û","У":"У","Ű":"Ű","𝔘":"𝔘","Ù":"Ù","Ù":"Ù","Ū":"Ū","_":"_","⏟":"⏟","⎵":"⎵","⏝":"⏝","⋃":"⋃","⊎":"⊎","Ų":"Ų","𝕌":"𝕌","↑":"↑","⤒":"⤒","⇅":"⇅","↕":"↕","⥮":"⥮","⊥":"⊥","↥":"↥","⇑":"⇑","⇕":"⇕","↖":"↖","↗":"↗","ϒ":"ϒ","Υ":"Υ","Ů":"Ů","𝒰":"𝒰","Ũ":"Ũ","Ü":"Ü","Ü":"Ü","⊫":"⊫","⫫":"⫫","В":"В","⊩":"⊩","⫦":"⫦","⋁":"⋁","‖":"‖","‖":"‖","∣":"∣","|":"|","❘":"❘","≀":"≀"," ":" ","𝔙":"𝔙","𝕍":"𝕍","𝒱":"𝒱","⊪":"⊪","Ŵ":"Ŵ","⋀":"⋀","𝔚":"𝔚","𝕎":"𝕎","𝒲":"𝒲","𝔛":"𝔛","Ξ":"Ξ","𝕏":"𝕏","𝒳":"𝒳","Я":"Я","Ї":"Ї","Ю":"Ю","Ý":"Ý","Ý":"Ý","Ŷ":"Ŷ","Ы":"Ы","𝔜":"𝔜","𝕐":"𝕐","𝒴":"𝒴","Ÿ":"Ÿ","Ж":"Ж","Ź":"Ź","Ž":"Ž","З":"З","Ż":"Ż","​":"","Ζ":"Ζ","ℨ":"ℨ","ℤ":"ℤ","𝒵":"𝒵","á":"á","á":"á","ă":"ă","∾":"∾","∾̳":"∾̳","∿":"∿","â":"â","â":"â","´":"´","´":"´","а":"а","æ":"æ","æ":"æ","⁡":"","𝔞":"𝔞","à":"à","à":"à","ℵ":"ℵ","ℵ":"ℵ","α":"α","ā":"ā","⨿":"⨿","&":"&","&":"&","∧":"∧","⩕":"⩕","⩜":"⩜","⩘":"⩘","⩚":"⩚","∠":"∠","⦤":"⦤","∠":"∠","∡":"∡","⦨":"⦨","⦩":"⦩","⦪":"⦪","⦫":"⦫","⦬":"⦬","⦭":"⦭","⦮":"⦮","⦯":"⦯","∟":"∟","⊾":"⊾","⦝":"⦝","∢":"∢","Å":"Å","⍼":"⍼","ą":"ą","𝕒":"𝕒","≈":"≈","⩰":"⩰","⩯":"⩯","≊":"≊","≋":"≋","'":"'","≈":"≈","≊":"≊","å":"å","å":"å","𝒶":"𝒶","*":"*","≈":"≈","≍":"≍","ã":"ã","ã":"ã","ä":"ä","ä":"ä","∳":"∳","⨑":"⨑","⫭":"⫭","≌":"≌","϶":"϶","‵":"‵","∽":"∽","⋍":"⋍","⊽":"⊽","⌅":"⌅","⌅":"⌅","⎵":"⎵","⎶":"⎶","≌":"≌","б":"б","„":"„","∵":"∵","∵":"∵","⦰":"⦰","϶":"϶","ℬ":"ℬ","β":"β","ℶ":"ℶ","≬":"≬","𝔟":"𝔟","⋂":"⋂","◯":"◯","⋃":"⋃","⨀":"⨀","⨁":"⨁","⨂":"⨂","⨆":"⨆","★":"★","▽":"▽","△":"△","⨄":"⨄","⋁":"⋁","⋀":"⋀","⤍":"⤍","⧫":"⧫","▪":"▪","▴":"▴","▾":"▾","◂":"◂","▸":"▸","␣":"␣","▒":"▒","░":"░","▓":"▓","█":"█","=⃥":"=⃥","≡⃥":"≡⃥","⌐":"⌐","𝕓":"𝕓","⊥":"⊥","⊥":"⊥","⋈":"⋈","╗":"╗","╔":"╔","╖":"╖","╓":"╓","═":"═","╦":"╦","╩":"╩","╤":"╤","╧":"╧","╝":"╝","╚":"╚","╜":"╜","╙":"╙","║":"║","╬":"╬","╣":"╣","╠":"╠","╫":"╫","╢":"╢","╟":"╟","⧉":"⧉","╕":"╕","╒":"╒","┐":"┐","┌":"┌","─":"─","╥":"╥","╨":"╨","┬":"┬","┴":"┴","⊟":"⊟","⊞":"⊞","⊠":"⊠","╛":"╛","╘":"╘","┘":"┘","└":"└","│":"│","╪":"╪","╡":"╡","╞":"╞","┼":"┼","┤":"┤","├":"├","‵":"‵","˘":"˘","¦":"¦","¦":"¦","𝒷":"𝒷","⁏":"⁏","∽":"∽","⋍":"⋍","\":"\\","⧅":"⧅","⟈":"⟈","•":"•","•":"•","≎":"≎","⪮":"⪮","≏":"≏","≏":"≏","ć":"ć","∩":"∩","⩄":"⩄","⩉":"⩉","⩋":"⩋","⩇":"⩇","⩀":"⩀","∩︀":"∩︀","⁁":"⁁","ˇ":"ˇ","⩍":"⩍","č":"č","ç":"ç","ç":"ç","ĉ":"ĉ","⩌":"⩌","⩐":"⩐","ċ":"ċ","¸":"¸","¸":"¸","⦲":"⦲","¢":"¢","¢":"¢","·":"·","𝔠":"𝔠","ч":"ч","✓":"✓","✓":"✓","χ":"χ","○":"○","⧃":"⧃","ˆ":"ˆ","≗":"≗","↺":"↺","↻":"↻","®":"®","Ⓢ":"Ⓢ","⊛":"⊛","⊚":"⊚","⊝":"⊝","≗":"≗","⨐":"⨐","⫯":"⫯","⧂":"⧂","♣":"♣","♣":"♣",":":":","≔":"≔","≔":"≔",",":",","@":"@","∁":"∁","∘":"∘","∁":"∁","ℂ":"ℂ","≅":"≅","⩭":"⩭","∮":"∮","𝕔":"𝕔","∐":"∐","©":"©","©":"©","℗":"℗","↵":"↵","✗":"✗","𝒸":"𝒸","⫏":"⫏","⫑":"⫑","⫐":"⫐","⫒":"⫒","⋯":"⋯","⤸":"⤸","⤵":"⤵","⋞":"⋞","⋟":"⋟","↶":"↶","⤽":"⤽","∪":"∪","⩈":"⩈","⩆":"⩆","⩊":"⩊","⊍":"⊍","⩅":"⩅","∪︀":"∪︀","↷":"↷","⤼":"⤼","⋞":"⋞","⋟":"⋟","⋎":"⋎","⋏":"⋏","¤":"¤","¤":"¤","↶":"↶","↷":"↷","⋎":"⋎","⋏":"⋏","∲":"∲","∱":"∱","⌭":"⌭","⇓":"⇓","⥥":"⥥","†":"†","ℸ":"ℸ","↓":"↓","‐":"‐","⊣":"⊣","⤏":"⤏","˝":"˝","ď":"ď","д":"д","ⅆ":"ⅆ","‡":"‡","⇊":"⇊","⩷":"⩷","°":"°","°":"°","δ":"δ","⦱":"⦱","⥿":"⥿","𝔡":"𝔡","⇃":"⇃","⇂":"⇂","⋄":"⋄","⋄":"⋄","♦":"♦","♦":"♦","¨":"¨","ϝ":"ϝ","⋲":"⋲","÷":"÷","÷":"÷","÷":"÷","⋇":"⋇","⋇":"⋇","ђ":"ђ","⌞":"⌞","⌍":"⌍","$":"$","𝕕":"𝕕","˙":"˙","≐":"≐","≑":"≑","∸":"∸","∔":"∔","⊡":"⊡","⌆":"⌆","↓":"↓","⇊":"⇊","⇃":"⇃","⇂":"⇂","⤐":"⤐","⌟":"⌟","⌌":"⌌","𝒹":"𝒹","ѕ":"ѕ","⧶":"⧶","đ":"đ","⋱":"⋱","▿":"▿","▾":"▾","⇵":"⇵","⥯":"⥯","⦦":"⦦","џ":"џ","⟿":"⟿","⩷":"⩷","≑":"≑","é":"é","é":"é","⩮":"⩮","ě":"ě","≖":"≖","ê":"ê","ê":"ê","≕":"≕","э":"э","ė":"ė","ⅇ":"ⅇ","≒":"≒","𝔢":"𝔢","⪚":"⪚","è":"è","è":"è","⪖":"⪖","⪘":"⪘","⪙":"⪙","⏧":"⏧","ℓ":"ℓ","⪕":"⪕","⪗":"⪗","ē":"ē","∅":"∅","∅":"∅","∅":"∅"," ":" "," ":" "," ":" ","ŋ":"ŋ"," ":" ","ę":"ę","𝕖":"𝕖","⋕":"⋕","⧣":"⧣","⩱":"⩱","ε":"ε","ε":"ε","ϵ":"ϵ","≖":"≖","≕":"≕","≂":"≂","⪖":"⪖","⪕":"⪕","=":"=","≟":"≟","≡":"≡","⩸":"⩸","⧥":"⧥","≓":"≓","⥱":"⥱","ℯ":"ℯ","≐":"≐","≂":"≂","η":"η","ð":"ð","ð":"ð","ë":"ë","ë":"ë","€":"€","!":"!","∃":"∃","ℰ":"ℰ","ⅇ":"ⅇ","≒":"≒","ф":"ф","♀":"♀","ffi":"ffi","ff":"ff","ffl":"ffl","𝔣":"𝔣","fi":"fi","fj":"fj","♭":"♭","fl":"fl","▱":"▱","ƒ":"ƒ","𝕗":"𝕗","∀":"∀","⋔":"⋔","⫙":"⫙","⨍":"⨍","½":"½","½":"½","⅓":"⅓","¼":"¼","¼":"¼","⅕":"⅕","⅙":"⅙","⅛":"⅛","⅔":"⅔","⅖":"⅖","¾":"¾","¾":"¾","⅗":"⅗","⅜":"⅜","⅘":"⅘","⅚":"⅚","⅝":"⅝","⅞":"⅞","⁄":"⁄","⌢":"⌢","𝒻":"𝒻","≧":"≧","⪌":"⪌","ǵ":"ǵ","γ":"γ","ϝ":"ϝ","⪆":"⪆","ğ":"ğ","ĝ":"ĝ","г":"г","ġ":"ġ","≥":"≥","⋛":"⋛","≥":"≥","≧":"≧","⩾":"⩾","⩾":"⩾","⪩":"⪩","⪀":"⪀","⪂":"⪂","⪄":"⪄","⋛︀":"⋛︀","⪔":"⪔","𝔤":"𝔤","≫":"≫","⋙":"⋙","ℷ":"ℷ","ѓ":"ѓ","≷":"≷","⪒":"⪒","⪥":"⪥","⪤":"⪤","≩":"≩","⪊":"⪊","⪊":"⪊","⪈":"⪈","⪈":"⪈","≩":"≩","⋧":"⋧","𝕘":"𝕘","`":"`","ℊ":"ℊ","≳":"≳","⪎":"⪎","⪐":"⪐",">":">",">":">","⪧":"⪧","⩺":"⩺","⋗":"⋗","⦕":"⦕","⩼":"⩼","⪆":"⪆","⥸":"⥸","⋗":"⋗","⋛":"⋛","⪌":"⪌","≷":"≷","≳":"≳","≩︀":"≩︀","≩︀":"≩︀","⇔":"⇔"," ":" ","½":"½","ℋ":"ℋ","ъ":"ъ","↔":"↔","⥈":"⥈","↭":"↭","ℏ":"ℏ","ĥ":"ĥ","♥":"♥","♥":"♥","…":"…","⊹":"⊹","𝔥":"𝔥","⤥":"⤥","⤦":"⤦","⇿":"⇿","∻":"∻","↩":"↩","↪":"↪","𝕙":"𝕙","―":"―","𝒽":"𝒽","ℏ":"ℏ","ħ":"ħ","⁃":"⁃","‐":"‐","í":"í","í":"í","⁣":"","î":"î","î":"î","и":"и","е":"е","¡":"¡","¡":"¡","⇔":"⇔","𝔦":"𝔦","ì":"ì","ì":"ì","ⅈ":"ⅈ","⨌":"⨌","∭":"∭","⧜":"⧜","℩":"℩","ij":"ij","ī":"ī","ℑ":"ℑ","ℐ":"ℐ","ℑ":"ℑ","ı":"ı","⊷":"⊷","Ƶ":"Ƶ","∈":"∈","℅":"℅","∞":"∞","⧝":"⧝","ı":"ı","∫":"∫","⊺":"⊺","ℤ":"ℤ","⊺":"⊺","⨗":"⨗","⨼":"⨼","ё":"ё","į":"į","𝕚":"𝕚","ι":"ι","⨼":"⨼","¿":"¿","¿":"¿","𝒾":"𝒾","∈":"∈","⋹":"⋹","⋵":"⋵","⋴":"⋴","⋳":"⋳","∈":"∈","⁢":"","ĩ":"ĩ","і":"і","ï":"ï","ï":"ï","ĵ":"ĵ","й":"й","𝔧":"𝔧","ȷ":"ȷ","𝕛":"𝕛","𝒿":"𝒿","ј":"ј","є":"є","κ":"κ","ϰ":"ϰ","ķ":"ķ","к":"к","𝔨":"𝔨","ĸ":"ĸ","х":"х","ќ":"ќ","𝕜":"𝕜","𝓀":"𝓀","⇚":"⇚","⇐":"⇐","⤛":"⤛","⤎":"⤎","≦":"≦","⪋":"⪋","⥢":"⥢","ĺ":"ĺ","⦴":"⦴","ℒ":"ℒ","λ":"λ","⟨":"⟨","⦑":"⦑","⟨":"⟨","⪅":"⪅","«":"«","«":"«","←":"←","⇤":"⇤","⤟":"⤟","⤝":"⤝","↩":"↩","↫":"↫","⤹":"⤹","⥳":"⥳","↢":"↢","⪫":"⪫","⤙":"⤙","⪭":"⪭","⪭︀":"⪭︀","⤌":"⤌","❲":"❲","{":"{","[":"[","⦋":"⦋","⦏":"⦏","⦍":"⦍","ľ":"ľ","ļ":"ļ","⌈":"⌈","{":"{","л":"л","⤶":"⤶","“":"“","„":"„","⥧":"⥧","⥋":"⥋","↲":"↲","≤":"≤","←":"←","↢":"↢","↽":"↽","↼":"↼","⇇":"⇇","↔":"↔","⇆":"⇆","⇋":"⇋","↭":"↭","⋋":"⋋","⋚":"⋚","≤":"≤","≦":"≦","⩽":"⩽","⩽":"⩽","⪨":"⪨","⩿":"⩿","⪁":"⪁","⪃":"⪃","⋚︀":"⋚︀","⪓":"⪓","⪅":"⪅","⋖":"⋖","⋚":"⋚","⪋":"⪋","≶":"≶","≲":"≲","⥼":"⥼","⌊":"⌊","𝔩":"𝔩","≶":"≶","⪑":"⪑","↽":"↽","↼":"↼","⥪":"⥪","▄":"▄","љ":"љ","≪":"≪","⇇":"⇇","⌞":"⌞","⥫":"⥫","◺":"◺","ŀ":"ŀ","⎰":"⎰","⎰":"⎰","≨":"≨","⪉":"⪉","⪉":"⪉","⪇":"⪇","⪇":"⪇","≨":"≨","⋦":"⋦","⟬":"⟬","⇽":"⇽","⟦":"⟦","⟵":"⟵","⟷":"⟷","⟼":"⟼","⟶":"⟶","↫":"↫","↬":"↬","⦅":"⦅","𝕝":"𝕝","⨭":"⨭","⨴":"⨴","∗":"∗","_":"_","◊":"◊","◊":"◊","⧫":"⧫","(":"(","⦓":"⦓","⇆":"⇆","⌟":"⌟","⇋":"⇋","⥭":"⥭","‎":"","⊿":"⊿","‹":"‹","𝓁":"𝓁","↰":"↰","≲":"≲","⪍":"⪍","⪏":"⪏","[":"[","‘":"‘","‚":"‚","ł":"ł","<":"<","<":"<","⪦":"⪦","⩹":"⩹","⋖":"⋖","⋋":"⋋","⋉":"⋉","⥶":"⥶","⩻":"⩻","⦖":"⦖","◃":"◃","⊴":"⊴","◂":"◂","⥊":"⥊","⥦":"⥦","≨︀":"≨︀","≨︀":"≨︀","∺":"∺","¯":"¯","¯":"¯","♂":"♂","✠":"✠","✠":"✠","↦":"↦","↦":"↦","↧":"↧","↤":"↤","↥":"↥","▮":"▮","⨩":"⨩","м":"м","—":"—","∡":"∡","𝔪":"𝔪","℧":"℧","µ":"µ","µ":"µ","∣":"∣","*":"*","⫰":"⫰","·":"·","·":"·","−":"−","⊟":"⊟","∸":"∸","⨪":"⨪","⫛":"⫛","…":"…","∓":"∓","⊧":"⊧","𝕞":"𝕞","∓":"∓","𝓂":"𝓂","∾":"∾","μ":"μ","⊸":"⊸","⊸":"⊸","⋙̸":"⋙̸","≫⃒":"≫⃒","≫̸":"≫̸","⇍":"⇍","⇎":"⇎","⋘̸":"⋘̸","≪⃒":"≪⃒","≪̸":"≪̸","⇏":"⇏","⊯":"⊯","⊮":"⊮","∇":"∇","ń":"ń","∠⃒":"∠⃒","≉":"≉","⩰̸":"⩰̸","≋̸":"≋̸","ʼn":"ʼn","≉":"≉","♮":"♮","♮":"♮","ℕ":"ℕ"," ":" "," ":" ","≎̸":"≎̸","≏̸":"≏̸","⩃":"⩃","ň":"ň","ņ":"ņ","≇":"≇","⩭̸":"⩭̸","⩂":"⩂","н":"н","–":"–","≠":"≠","⇗":"⇗","⤤":"⤤","↗":"↗","↗":"↗","≐̸":"≐̸","≢":"≢","⤨":"⤨","≂̸":"≂̸","∄":"∄","∄":"∄","𝔫":"𝔫","≧̸":"≧̸","≱":"≱","≱":"≱","≧̸":"≧̸","⩾̸":"⩾̸","⩾̸":"⩾̸","≵":"≵","≯":"≯","≯":"≯","⇎":"⇎","↮":"↮","⫲":"⫲","∋":"∋","⋼":"⋼","⋺":"⋺","∋":"∋","њ":"њ","⇍":"⇍","≦̸":"≦̸","↚":"↚","‥":"‥","≰":"≰","↚":"↚","↮":"↮","≰":"≰","≦̸":"≦̸","⩽̸":"⩽̸","⩽̸":"⩽̸","≮":"≮","≴":"≴","≮":"≮","⋪":"⋪","⋬":"⋬","∤":"∤","𝕟":"𝕟","¬":"¬","¬":"¬","∉":"∉","⋹̸":"⋹̸","⋵̸":"⋵̸","∉":"∉","⋷":"⋷","⋶":"⋶","∌":"∌","∌":"∌","⋾":"⋾","⋽":"⋽","∦":"∦","∦":"∦","⫽⃥":"⫽⃥","∂̸":"∂̸","⨔":"⨔","⊀":"⊀","⋠":"⋠","⪯̸":"⪯̸","⊀":"⊀","⪯̸":"⪯̸","⇏":"⇏","↛":"↛","⤳̸":"⤳̸","↝̸":"↝̸","↛":"↛","⋫":"⋫","⋭":"⋭","⊁":"⊁","⋡":"⋡","⪰̸":"⪰̸","𝓃":"𝓃","∤":"∤","∦":"∦","≁":"≁","≄":"≄","≄":"≄","∤":"∤","∦":"∦","⋢":"⋢","⋣":"⋣","⊄":"⊄","⫅̸":"⫅̸","⊈":"⊈","⊂⃒":"⊂⃒","⊈":"⊈","⫅̸":"⫅̸","⊁":"⊁","⪰̸":"⪰̸","⊅":"⊅","⫆̸":"⫆̸","⊉":"⊉","⊃⃒":"⊃⃒","⊉":"⊉","⫆̸":"⫆̸","≹":"≹","ñ":"ñ","ñ":"ñ","≸":"≸","⋪":"⋪","⋬":"⋬","⋫":"⋫","⋭":"⋭","ν":"ν","#":"#","№":"№"," ":" ","⊭":"⊭","⤄":"⤄","≍⃒":"≍⃒","⊬":"⊬","≥⃒":"≥⃒",">⃒":">⃒","⧞":"⧞","⤂":"⤂","≤⃒":"≤⃒","<⃒":"<⃒","⊴⃒":"⊴⃒","⤃":"⤃","⊵⃒":"⊵⃒","∼⃒":"∼⃒","⇖":"⇖","⤣":"⤣","↖":"↖","↖":"↖","⤧":"⤧","Ⓢ":"Ⓢ","ó":"ó","ó":"ó","⊛":"⊛","⊚":"⊚","ô":"ô","ô":"ô","о":"о","⊝":"⊝","ő":"ő","⨸":"⨸","⊙":"⊙","⦼":"⦼","œ":"œ","⦿":"⦿","𝔬":"𝔬","˛":"˛","ò":"ò","ò":"ò","⧁":"⧁","⦵":"⦵","Ω":"Ω","∮":"∮","↺":"↺","⦾":"⦾","⦻":"⦻","‾":"‾","⧀":"⧀","ō":"ō","ω":"ω","ο":"ο","⦶":"⦶","⊖":"⊖","𝕠":"𝕠","⦷":"⦷","⦹":"⦹","⊕":"⊕","∨":"∨","↻":"↻","⩝":"⩝","ℴ":"ℴ","ℴ":"ℴ","ª":"ª","ª":"ª","º":"º","º":"º","⊶":"⊶","⩖":"⩖","⩗":"⩗","⩛":"⩛","ℴ":"ℴ","ø":"ø","ø":"ø","⊘":"⊘","õ":"õ","õ":"õ","⊗":"⊗","⨶":"⨶","ö":"ö","ö":"ö","⌽":"⌽","∥":"∥","¶":"¶","¶":"¶","∥":"∥","⫳":"⫳","⫽":"⫽","∂":"∂","п":"п","%":"%",".":".","‰":"‰","⊥":"⊥","‱":"‱","𝔭":"𝔭","φ":"φ","ϕ":"ϕ","ℳ":"ℳ","☎":"☎","π":"π","⋔":"⋔","ϖ":"ϖ","ℏ":"ℏ","ℎ":"ℎ","ℏ":"ℏ","+":"+","⨣":"⨣","⊞":"⊞","⨢":"⨢","∔":"∔","⨥":"⨥","⩲":"⩲","±":"±","±":"±","⨦":"⨦","⨧":"⨧","±":"±","⨕":"⨕","𝕡":"𝕡","£":"£","£":"£","≺":"≺","⪳":"⪳","⪷":"⪷","≼":"≼","⪯":"⪯","≺":"≺","⪷":"⪷","≼":"≼","⪯":"⪯","⪹":"⪹","⪵":"⪵","⋨":"⋨","≾":"≾","′":"′","ℙ":"ℙ","⪵":"⪵","⪹":"⪹","⋨":"⋨","∏":"∏","⌮":"⌮","⌒":"⌒","⌓":"⌓","∝":"∝","∝":"∝","≾":"≾","⊰":"⊰","𝓅":"𝓅","ψ":"ψ"," ":" ","𝔮":"𝔮","⨌":"⨌","𝕢":"𝕢","⁗":"⁗","𝓆":"𝓆","ℍ":"ℍ","⨖":"⨖","?":"?","≟":"≟",""":'"',""":'"',"⇛":"⇛","⇒":"⇒","⤜":"⤜","⤏":"⤏","⥤":"⥤","∽̱":"∽̱","ŕ":"ŕ","√":"√","⦳":"⦳","⟩":"⟩","⦒":"⦒","⦥":"⦥","⟩":"⟩","»":"»","»":"»","→":"→","⥵":"⥵","⇥":"⇥","⤠":"⤠","⤳":"⤳","⤞":"⤞","↪":"↪","↬":"↬","⥅":"⥅","⥴":"⥴","↣":"↣","↝":"↝","⤚":"⤚","∶":"∶","ℚ":"ℚ","⤍":"⤍","❳":"❳","}":"}","]":"]","⦌":"⦌","⦎":"⦎","⦐":"⦐","ř":"ř","ŗ":"ŗ","⌉":"⌉","}":"}","р":"р","⤷":"⤷","⥩":"⥩","”":"”","”":"”","↳":"↳","ℜ":"ℜ","ℛ":"ℛ","ℜ":"ℜ","ℝ":"ℝ","▭":"▭","®":"®","®":"®","⥽":"⥽","⌋":"⌋","𝔯":"𝔯","⇁":"⇁","⇀":"⇀","⥬":"⥬","ρ":"ρ","ϱ":"ϱ","→":"→","↣":"↣","⇁":"⇁","⇀":"⇀","⇄":"⇄","⇌":"⇌","⇉":"⇉","↝":"↝","⋌":"⋌","˚":"˚","≓":"≓","⇄":"⇄","⇌":"⇌","‏":"","⎱":"⎱","⎱":"⎱","⫮":"⫮","⟭":"⟭","⇾":"⇾","⟧":"⟧","⦆":"⦆","𝕣":"𝕣","⨮":"⨮","⨵":"⨵",")":")","⦔":"⦔","⨒":"⨒","⇉":"⇉","›":"›","𝓇":"𝓇","↱":"↱","]":"]","’":"’","’":"’","⋌":"⋌","⋊":"⋊","▹":"▹","⊵":"⊵","▸":"▸","⧎":"⧎","⥨":"⥨","℞":"℞","ś":"ś","‚":"‚","≻":"≻","⪴":"⪴","⪸":"⪸","š":"š","≽":"≽","⪰":"⪰","ş":"ş","ŝ":"ŝ","⪶":"⪶","⪺":"⪺","⋩":"⋩","⨓":"⨓","≿":"≿","с":"с","⋅":"⋅","⊡":"⊡","⩦":"⩦","⇘":"⇘","⤥":"⤥","↘":"↘","↘":"↘","§":"§","§":"§",";":";","⤩":"⤩","∖":"∖","∖":"∖","✶":"✶","𝔰":"𝔰","⌢":"⌢","♯":"♯","щ":"щ","ш":"ш","∣":"∣","∥":"∥","­":"","­":"","σ":"σ","ς":"ς","ς":"ς","∼":"∼","⩪":"⩪","≃":"≃","≃":"≃","⪞":"⪞","⪠":"⪠","⪝":"⪝","⪟":"⪟","≆":"≆","⨤":"⨤","⥲":"⥲","←":"←","∖":"∖","⨳":"⨳","⧤":"⧤","∣":"∣","⌣":"⌣","⪪":"⪪","⪬":"⪬","⪬︀":"⪬︀","ь":"ь","/":"/","⧄":"⧄","⌿":"⌿","𝕤":"𝕤","♠":"♠","♠":"♠","∥":"∥","⊓":"⊓","⊓︀":"⊓︀","⊔":"⊔","⊔︀":"⊔︀","⊏":"⊏","⊑":"⊑","⊏":"⊏","⊑":"⊑","⊐":"⊐","⊒":"⊒","⊐":"⊐","⊒":"⊒","□":"□","□":"□","▪":"▪","▪":"▪","→":"→","𝓈":"𝓈","∖":"∖","⌣":"⌣","⋆":"⋆","☆":"☆","★":"★","ϵ":"ϵ","ϕ":"ϕ","¯":"¯","⊂":"⊂","⫅":"⫅","⪽":"⪽","⊆":"⊆","⫃":"⫃","⫁":"⫁","⫋":"⫋","⊊":"⊊","⪿":"⪿","⥹":"⥹","⊂":"⊂","⊆":"⊆","⫅":"⫅","⊊":"⊊","⫋":"⫋","⫇":"⫇","⫕":"⫕","⫓":"⫓","≻":"≻","⪸":"⪸","≽":"≽","⪰":"⪰","⪺":"⪺","⪶":"⪶","⋩":"⋩","≿":"≿","∑":"∑","♪":"♪","¹":"¹","¹":"¹","²":"²","²":"²","³":"³","³":"³","⊃":"⊃","⫆":"⫆","⪾":"⪾","⫘":"⫘","⊇":"⊇","⫄":"⫄","⟉":"⟉","⫗":"⫗","⥻":"⥻","⫂":"⫂","⫌":"⫌","⊋":"⊋","⫀":"⫀","⊃":"⊃","⊇":"⊇","⫆":"⫆","⊋":"⊋","⫌":"⫌","⫈":"⫈","⫔":"⫔","⫖":"⫖","⇙":"⇙","⤦":"⤦","↙":"↙","↙":"↙","⤪":"⤪","ß":"ß","ß":"ß","⌖":"⌖","τ":"τ","⎴":"⎴","ť":"ť","ţ":"ţ","т":"т","⃛":"⃛","⌕":"⌕","𝔱":"𝔱","∴":"∴","∴":"∴","θ":"θ","ϑ":"ϑ","ϑ":"ϑ","≈":"≈","∼":"∼"," ":" ","≈":"≈","∼":"∼","þ":"þ","þ":"þ","˜":"˜","×":"×","×":"×","⊠":"⊠","⨱":"⨱","⨰":"⨰","∭":"∭","⤨":"⤨","⊤":"⊤","⌶":"⌶","⫱":"⫱","𝕥":"𝕥","⫚":"⫚","⤩":"⤩","‴":"‴","™":"™","▵":"▵","▿":"▿","◃":"◃","⊴":"⊴","≜":"≜","▹":"▹","⊵":"⊵","◬":"◬","≜":"≜","⨺":"⨺","⨹":"⨹","⧍":"⧍","⨻":"⨻","⏢":"⏢","𝓉":"𝓉","ц":"ц","ћ":"ћ","ŧ":"ŧ","≬":"≬","↞":"↞","↠":"↠","⇑":"⇑","⥣":"⥣","ú":"ú","ú":"ú","↑":"↑","ў":"ў","ŭ":"ŭ","û":"û","û":"û","у":"у","⇅":"⇅","ű":"ű","⥮":"⥮","⥾":"⥾","𝔲":"𝔲","ù":"ù","ù":"ù","↿":"↿","↾":"↾","▀":"▀","⌜":"⌜","⌜":"⌜","⌏":"⌏","◸":"◸","ū":"ū","¨":"¨","¨":"¨","ų":"ų","𝕦":"𝕦","↑":"↑","↕":"↕","↿":"↿","↾":"↾","⊎":"⊎","υ":"υ","ϒ":"ϒ","υ":"υ","⇈":"⇈","⌝":"⌝","⌝":"⌝","⌎":"⌎","ů":"ů","◹":"◹","𝓊":"𝓊","⋰":"⋰","ũ":"ũ","▵":"▵","▴":"▴","⇈":"⇈","ü":"ü","ü":"ü","⦧":"⦧","⇕":"⇕","⫨":"⫨","⫩":"⫩","⊨":"⊨","⦜":"⦜","ϵ":"ϵ","ϰ":"ϰ","∅":"∅","ϕ":"ϕ","ϖ":"ϖ","∝":"∝","↕":"↕","ϱ":"ϱ","ς":"ς","⊊︀":"⊊︀","⫋︀":"⫋︀","⊋︀":"⊋︀","⫌︀":"⫌︀","ϑ":"ϑ","⊲":"⊲","⊳":"⊳","в":"в","⊢":"⊢","∨":"∨","⊻":"⊻","≚":"≚","⋮":"⋮","|":"|","|":"|","𝔳":"𝔳","⊲":"⊲","⊂⃒":"⊂⃒","⊃⃒":"⊃⃒","𝕧":"𝕧","∝":"∝","⊳":"⊳","𝓋":"𝓋","⫋︀":"⫋︀","⊊︀":"⊊︀","⫌︀":"⫌︀","⊋︀":"⊋︀","⦚":"⦚","ŵ":"ŵ","⩟":"⩟","∧":"∧","≙":"≙","℘":"℘","𝔴":"𝔴","𝕨":"𝕨","℘":"℘","≀":"≀","≀":"≀","𝓌":"𝓌","⋂":"⋂","◯":"◯","⋃":"⋃","▽":"▽","𝔵":"𝔵","⟺":"⟺","⟷":"⟷","ξ":"ξ","⟸":"⟸","⟵":"⟵","⟼":"⟼","⋻":"⋻","⨀":"⨀","𝕩":"𝕩","⨁":"⨁","⨂":"⨂","⟹":"⟹","⟶":"⟶","𝓍":"𝓍","⨆":"⨆","⨄":"⨄","△":"△","⋁":"⋁","⋀":"⋀","ý":"ý","ý":"ý","я":"я","ŷ":"ŷ","ы":"ы","¥":"¥","¥":"¥","𝔶":"𝔶","ї":"ї","𝕪":"𝕪","𝓎":"𝓎","ю":"ю","ÿ":"ÿ","ÿ":"ÿ","ź":"ź","ž":"ž","з":"з","ż":"ż","ℨ":"ℨ","ζ":"ζ","𝔷":"𝔷","ж":"ж","⇝":"⇝","𝕫":"𝕫","𝓏":"𝓏","‍":"","‌":""},characters:{"Æ":"Æ","&":"&","Á":"Á","Ă":"Ă","Â":"Â","А":"А","𝔄":"𝔄","À":"À","Α":"Α","Ā":"Ā","⩓":"⩓","Ą":"Ą","𝔸":"𝔸","":"⁡","Å":"Å","𝒜":"𝒜","≔":"≔","Ã":"Ã","Ä":"Ä","∖":"∖","⫧":"⫧","⌆":"⌆","Б":"Б","∵":"∵","ℬ":"ℬ","Β":"Β","𝔅":"𝔅","𝔹":"𝔹","˘":"˘","≎":"≎","Ч":"Ч","©":"©","Ć":"Ć","⋒":"⋒","ⅅ":"ⅅ","ℭ":"ℭ","Č":"Č","Ç":"Ç","Ĉ":"Ĉ","∰":"∰","Ċ":"Ċ","¸":"¸","·":"·","Χ":"Χ","⊙":"⊙","⊖":"⊖","⊕":"⊕","⊗":"⊗","∲":"∲","”":"”","’":"’","∷":"∷","⩴":"⩴","≡":"≡","∯":"∯","∮":"∮","ℂ":"ℂ","∐":"∐","∳":"∳","⨯":"⨯","𝒞":"𝒞","⋓":"⋓","≍":"≍","⤑":"⤑","Ђ":"Ђ","Ѕ":"Ѕ","Џ":"Џ","‡":"‡","↡":"↡","⫤":"⫤","Ď":"Ď","Д":"Д","∇":"∇","Δ":"Δ","𝔇":"𝔇","´":"´","˙":"˙","˝":"˝","`":"`","˜":"˜","⋄":"⋄","ⅆ":"ⅆ","𝔻":"𝔻","¨":"¨","⃜":"⃜","≐":"≐","⇓":"⇓","⇐":"⇐","⇔":"⇔","⟸":"⟸","⟺":"⟺","⟹":"⟹","⇒":"⇒","⊨":"⊨","⇑":"⇑","⇕":"⇕","∥":"∥","↓":"↓","⤓":"⤓","⇵":"⇵","̑":"̑","⥐":"⥐","⥞":"⥞","↽":"↽","⥖":"⥖","⥟":"⥟","⇁":"⇁","⥗":"⥗","⊤":"⊤","↧":"↧","𝒟":"𝒟","Đ":"Đ","Ŋ":"Ŋ","Ð":"Ð","É":"É","Ě":"Ě","Ê":"Ê","Э":"Э","Ė":"Ė","𝔈":"𝔈","È":"È","∈":"∈","Ē":"Ē","◻":"◻","▫":"▫","Ę":"Ę","𝔼":"𝔼","Ε":"Ε","⩵":"⩵","≂":"≂","⇌":"⇌","ℰ":"ℰ","⩳":"⩳","Η":"Η","Ë":"Ë","∃":"∃","ⅇ":"ⅇ","Ф":"Ф","𝔉":"𝔉","◼":"◼","▪":"▪","𝔽":"𝔽","∀":"∀","ℱ":"ℱ","Ѓ":"Ѓ",">":">","Γ":"Γ","Ϝ":"Ϝ","Ğ":"Ğ","Ģ":"Ģ","Ĝ":"Ĝ","Г":"Г","Ġ":"Ġ","𝔊":"𝔊","⋙":"⋙","𝔾":"𝔾","≥":"≥","⋛":"⋛","≧":"≧","⪢":"⪢","≷":"≷","⩾":"⩾","≳":"≳","𝒢":"𝒢","≫":"≫","Ъ":"Ъ","ˇ":"ˇ","^":"^","Ĥ":"Ĥ","ℌ":"ℌ","ℋ":"ℋ","ℍ":"ℍ","─":"─","Ħ":"Ħ","≏":"≏","Е":"Е","IJ":"IJ","Ё":"Ё","Í":"Í","Î":"Î","И":"И","İ":"İ","ℑ":"ℑ","Ì":"Ì","Ī":"Ī","ⅈ":"ⅈ","∬":"∬","∫":"∫","⋂":"⋂","":"⁣","":"⁢","Į":"Į","𝕀":"𝕀","Ι":"Ι","ℐ":"ℐ","Ĩ":"Ĩ","І":"І","Ï":"Ï","Ĵ":"Ĵ","Й":"Й","𝔍":"𝔍","𝕁":"𝕁","𝒥":"𝒥","Ј":"Ј","Є":"Є","Х":"Х","Ќ":"Ќ","Κ":"Κ","Ķ":"Ķ","К":"К","𝔎":"𝔎","𝕂":"𝕂","𝒦":"𝒦","Љ":"Љ","<":"<","Ĺ":"Ĺ","Λ":"Λ","⟪":"⟪","ℒ":"ℒ","↞":"↞","Ľ":"Ľ","Ļ":"Ļ","Л":"Л","⟨":"⟨","←":"←","⇤":"⇤","⇆":"⇆","⌈":"⌈","⟦":"⟦","⥡":"⥡","⇃":"⇃","⥙":"⥙","⌊":"⌊","↔":"↔","⥎":"⥎","⊣":"⊣","↤":"↤","⥚":"⥚","⊲":"⊲","⧏":"⧏","⊴":"⊴","⥑":"⥑","⥠":"⥠","↿":"↿","⥘":"⥘","↼":"↼","⥒":"⥒","⋚":"⋚","≦":"≦","≶":"≶","⪡":"⪡","⩽":"⩽","≲":"≲","𝔏":"𝔏","⋘":"⋘","⇚":"⇚","Ŀ":"Ŀ","⟵":"⟵","⟷":"⟷","⟶":"⟶","𝕃":"𝕃","↙":"↙","↘":"↘","↰":"↰","Ł":"Ł","≪":"≪","⤅":"⤅","М":"М"," ":" ","ℳ":"ℳ","𝔐":"𝔐","∓":"∓","𝕄":"𝕄","Μ":"Μ","Њ":"Њ","Ń":"Ń","Ň":"Ň","Ņ":"Ņ","Н":"Н","":"​","\n":"
","𝔑":"𝔑","":"⁠"," ":" ","ℕ":"ℕ","⫬":"⫬","≢":"≢","≭":"≭","∦":"∦","∉":"∉","≠":"≠","≂̸":"≂̸","∄":"∄","≯":"≯","≱":"≱","≧̸":"≧̸","≫̸":"≫̸","≹":"≹","⩾̸":"⩾̸","≵":"≵","≎̸":"≎̸","≏̸":"≏̸","⋪":"⋪","⧏̸":"⧏̸","⋬":"⋬","≮":"≮","≰":"≰","≸":"≸","≪̸":"≪̸","⩽̸":"⩽̸","≴":"≴","⪢̸":"⪢̸","⪡̸":"⪡̸","⊀":"⊀","⪯̸":"⪯̸","⋠":"⋠","∌":"∌","⋫":"⋫","⧐̸":"⧐̸","⋭":"⋭","⊏̸":"⊏̸","⋢":"⋢","⊐̸":"⊐̸","⋣":"⋣","⊂⃒":"⊂⃒","⊈":"⊈","⊁":"⊁","⪰̸":"⪰̸","⋡":"⋡","≿̸":"≿̸","⊃⃒":"⊃⃒","⊉":"⊉","≁":"≁","≄":"≄","≇":"≇","≉":"≉","∤":"∤","𝒩":"𝒩","Ñ":"Ñ","Ν":"Ν","Œ":"Œ","Ó":"Ó","Ô":"Ô","О":"О","Ő":"Ő","𝔒":"𝔒","Ò":"Ò","Ō":"Ō","Ω":"Ω","Ο":"Ο","𝕆":"𝕆","“":"“","‘":"‘","⩔":"⩔","𝒪":"𝒪","Ø":"Ø","Õ":"Õ","⨷":"⨷","Ö":"Ö","‾":"‾","⏞":"⏞","⎴":"⎴","⏜":"⏜","∂":"∂","П":"П","𝔓":"𝔓","Φ":"Φ","Π":"Π","±":"±","ℙ":"ℙ","⪻":"⪻","≺":"≺","⪯":"⪯","≼":"≼","≾":"≾","″":"″","∏":"∏","∝":"∝","𝒫":"𝒫","Ψ":"Ψ",'"':""","𝔔":"𝔔","ℚ":"ℚ","𝒬":"𝒬","⤐":"⤐","®":"®","Ŕ":"Ŕ","⟫":"⟫","↠":"↠","⤖":"⤖","Ř":"Ř","Ŗ":"Ŗ","Р":"Р","ℜ":"ℜ","∋":"∋","⇋":"⇋","⥯":"⥯","Ρ":"Ρ","⟩":"⟩","→":"→","⇥":"⇥","⇄":"⇄","⌉":"⌉","⟧":"⟧","⥝":"⥝","⇂":"⇂","⥕":"⥕","⌋":"⌋","⊢":"⊢","↦":"↦","⥛":"⥛","⊳":"⊳","⧐":"⧐","⊵":"⊵","⥏":"⥏","⥜":"⥜","↾":"↾","⥔":"⥔","⇀":"⇀","⥓":"⥓","ℝ":"ℝ","⥰":"⥰","⇛":"⇛","ℛ":"ℛ","↱":"↱","⧴":"⧴","Щ":"Щ","Ш":"Ш","Ь":"Ь","Ś":"Ś","⪼":"⪼","Š":"Š","Ş":"Ş","Ŝ":"Ŝ","С":"С","𝔖":"𝔖","↑":"↑","Σ":"Σ","∘":"∘","𝕊":"𝕊","√":"√","□":"□","⊓":"⊓","⊏":"⊏","⊑":"⊑","⊐":"⊐","⊒":"⊒","⊔":"⊔","𝒮":"𝒮","⋆":"⋆","⋐":"⋐","⊆":"⊆","≻":"≻","⪰":"⪰","≽":"≽","≿":"≿","∑":"∑","⋑":"⋑","⊃":"⊃","⊇":"⊇","Þ":"Þ","™":"™","Ћ":"Ћ","Ц":"Ц","\t":"	","Τ":"Τ","Ť":"Ť","Ţ":"Ţ","Т":"Т","𝔗":"𝔗","∴":"∴","Θ":"Θ"," ":"  "," ":" ","∼":"∼","≃":"≃","≅":"≅","≈":"≈","𝕋":"𝕋","⃛":"⃛","𝒯":"𝒯","Ŧ":"Ŧ","Ú":"Ú","↟":"↟","⥉":"⥉","Ў":"Ў","Ŭ":"Ŭ","Û":"Û","У":"У","Ű":"Ű","𝔘":"𝔘","Ù":"Ù","Ū":"Ū",_:"_","⏟":"⏟","⎵":"⎵","⏝":"⏝","⋃":"⋃","⊎":"⊎","Ų":"Ų","𝕌":"𝕌","⤒":"⤒","⇅":"⇅","↕":"↕","⥮":"⥮","⊥":"⊥","↥":"↥","↖":"↖","↗":"↗","ϒ":"ϒ","Υ":"Υ","Ů":"Ů","𝒰":"𝒰","Ũ":"Ũ","Ü":"Ü","⊫":"⊫","⫫":"⫫","В":"В","⊩":"⊩","⫦":"⫦","⋁":"⋁","‖":"‖","∣":"∣","|":"|","❘":"❘","≀":"≀"," ":" ","𝔙":"𝔙","𝕍":"𝕍","𝒱":"𝒱","⊪":"⊪","Ŵ":"Ŵ","⋀":"⋀","𝔚":"𝔚","𝕎":"𝕎","𝒲":"𝒲","𝔛":"𝔛","Ξ":"Ξ","𝕏":"𝕏","𝒳":"𝒳","Я":"Я","Ї":"Ї","Ю":"Ю","Ý":"Ý","Ŷ":"Ŷ","Ы":"Ы","𝔜":"𝔜","𝕐":"𝕐","𝒴":"𝒴","Ÿ":"Ÿ","Ж":"Ж","Ź":"Ź","Ž":"Ž","З":"З","Ż":"Ż","Ζ":"Ζ","ℨ":"ℨ","ℤ":"ℤ","𝒵":"𝒵","á":"á","ă":"ă","∾":"∾","∾̳":"∾̳","∿":"∿","â":"â","а":"а","æ":"æ","𝔞":"𝔞","à":"à","ℵ":"ℵ","α":"α","ā":"ā","⨿":"⨿","∧":"∧","⩕":"⩕","⩜":"⩜","⩘":"⩘","⩚":"⩚","∠":"∠","⦤":"⦤","∡":"∡","⦨":"⦨","⦩":"⦩","⦪":"⦪","⦫":"⦫","⦬":"⦬","⦭":"⦭","⦮":"⦮","⦯":"⦯","∟":"∟","⊾":"⊾","⦝":"⦝","∢":"∢","⍼":"⍼","ą":"ą","𝕒":"𝕒","⩰":"⩰","⩯":"⩯","≊":"≊","≋":"≋","'":"'","å":"å","𝒶":"𝒶","*":"*","ã":"ã","ä":"ä","⨑":"⨑","⫭":"⫭","≌":"≌","϶":"϶","‵":"‵","∽":"∽","⋍":"⋍","⊽":"⊽","⌅":"⌅","⎶":"⎶","б":"б","„":"„","⦰":"⦰","β":"β","ℶ":"ℶ","≬":"≬","𝔟":"𝔟","◯":"◯","⨀":"⨀","⨁":"⨁","⨂":"⨂","⨆":"⨆","★":"★","▽":"▽","△":"△","⨄":"⨄","⤍":"⤍","⧫":"⧫","▴":"▴","▾":"▾","◂":"◂","▸":"▸","␣":"␣","▒":"▒","░":"░","▓":"▓","█":"█","=⃥":"=⃥","≡⃥":"≡⃥","⌐":"⌐","𝕓":"𝕓","⋈":"⋈","╗":"╗","╔":"╔","╖":"╖","╓":"╓","═":"═","╦":"╦","╩":"╩","╤":"╤","╧":"╧","╝":"╝","╚":"╚","╜":"╜","╙":"╙","║":"║","╬":"╬","╣":"╣","╠":"╠","╫":"╫","╢":"╢","╟":"╟","⧉":"⧉","╕":"╕","╒":"╒","┐":"┐","┌":"┌","╥":"╥","╨":"╨","┬":"┬","┴":"┴","⊟":"⊟","⊞":"⊞","⊠":"⊠","╛":"╛","╘":"╘","┘":"┘","└":"└","│":"│","╪":"╪","╡":"╡","╞":"╞","┼":"┼","┤":"┤","├":"├","¦":"¦","𝒷":"𝒷","⁏":"⁏","\\":"\","⧅":"⧅","⟈":"⟈","•":"•","⪮":"⪮","ć":"ć","∩":"∩","⩄":"⩄","⩉":"⩉","⩋":"⩋","⩇":"⩇","⩀":"⩀","∩︀":"∩︀","⁁":"⁁","⩍":"⩍","č":"č","ç":"ç","ĉ":"ĉ","⩌":"⩌","⩐":"⩐","ċ":"ċ","⦲":"⦲","¢":"¢","𝔠":"𝔠","ч":"ч","✓":"✓","χ":"χ","○":"○","⧃":"⧃","ˆ":"ˆ","≗":"≗","↺":"↺","↻":"↻","Ⓢ":"Ⓢ","⊛":"⊛","⊚":"⊚","⊝":"⊝","⨐":"⨐","⫯":"⫯","⧂":"⧂","♣":"♣",":":":",",":",","@":"@","∁":"∁","⩭":"⩭","𝕔":"𝕔","℗":"℗","↵":"↵","✗":"✗","𝒸":"𝒸","⫏":"⫏","⫑":"⫑","⫐":"⫐","⫒":"⫒","⋯":"⋯","⤸":"⤸","⤵":"⤵","⋞":"⋞","⋟":"⋟","↶":"↶","⤽":"⤽","∪":"∪","⩈":"⩈","⩆":"⩆","⩊":"⩊","⊍":"⊍","⩅":"⩅","∪︀":"∪︀","↷":"↷","⤼":"⤼","⋎":"⋎","⋏":"⋏","¤":"¤","∱":"∱","⌭":"⌭","⥥":"⥥","†":"†","ℸ":"ℸ","‐":"‐","⤏":"⤏","ď":"ď","д":"д","⇊":"⇊","⩷":"⩷","°":"°","δ":"δ","⦱":"⦱","⥿":"⥿","𝔡":"𝔡","♦":"♦","ϝ":"ϝ","⋲":"⋲","÷":"÷","⋇":"⋇","ђ":"ђ","⌞":"⌞","⌍":"⌍",$:"$","𝕕":"𝕕","≑":"≑","∸":"∸","∔":"∔","⊡":"⊡","⌟":"⌟","⌌":"⌌","𝒹":"𝒹","ѕ":"ѕ","⧶":"⧶","đ":"đ","⋱":"⋱","▿":"▿","⦦":"⦦","џ":"џ","⟿":"⟿","é":"é","⩮":"⩮","ě":"ě","≖":"≖","ê":"ê","≕":"≕","э":"э","ė":"ė","≒":"≒","𝔢":"𝔢","⪚":"⪚","è":"è","⪖":"⪖","⪘":"⪘","⪙":"⪙","⏧":"⏧","ℓ":"ℓ","⪕":"⪕","⪗":"⪗","ē":"ē","∅":"∅"," ":" "," ":" "," ":" ","ŋ":"ŋ"," ":" ","ę":"ę","𝕖":"𝕖","⋕":"⋕","⧣":"⧣","⩱":"⩱","ε":"ε","ϵ":"ϵ","=":"=","≟":"≟","⩸":"⩸","⧥":"⧥","≓":"≓","⥱":"⥱","ℯ":"ℯ","η":"η","ð":"ð","ë":"ë","€":"€","!":"!","ф":"ф","♀":"♀","ffi":"ffi","ff":"ff","ffl":"ffl","𝔣":"𝔣","fi":"fi",fj:"fj","♭":"♭","fl":"fl","▱":"▱","ƒ":"ƒ","𝕗":"𝕗","⋔":"⋔","⫙":"⫙","⨍":"⨍","½":"½","⅓":"⅓","¼":"¼","⅕":"⅕","⅙":"⅙","⅛":"⅛","⅔":"⅔","⅖":"⅖","¾":"¾","⅗":"⅗","⅜":"⅜","⅘":"⅘","⅚":"⅚","⅝":"⅝","⅞":"⅞","⁄":"⁄","⌢":"⌢","𝒻":"𝒻","⪌":"⪌","ǵ":"ǵ","γ":"γ","⪆":"⪆","ğ":"ğ","ĝ":"ĝ","г":"г","ġ":"ġ","⪩":"⪩","⪀":"⪀","⪂":"⪂","⪄":"⪄","⋛︀":"⋛︀","⪔":"⪔","𝔤":"𝔤","ℷ":"ℷ","ѓ":"ѓ","⪒":"⪒","⪥":"⪥","⪤":"⪤","≩":"≩","⪊":"⪊","⪈":"⪈","⋧":"⋧","𝕘":"𝕘","ℊ":"ℊ","⪎":"⪎","⪐":"⪐","⪧":"⪧","⩺":"⩺","⋗":"⋗","⦕":"⦕","⩼":"⩼","⥸":"⥸","≩︀":"≩︀","ъ":"ъ","⥈":"⥈","↭":"↭","ℏ":"ℏ","ĥ":"ĥ","♥":"♥","…":"…","⊹":"⊹","𝔥":"𝔥","⤥":"⤥","⤦":"⤦","⇿":"⇿","∻":"∻","↩":"↩","↪":"↪","𝕙":"𝕙","―":"―","𝒽":"𝒽","ħ":"ħ","⁃":"⁃","í":"í","î":"î","и":"и","е":"е","¡":"¡","𝔦":"𝔦","ì":"ì","⨌":"⨌","∭":"∭","⧜":"⧜","℩":"℩","ij":"ij","ī":"ī","ı":"ı","⊷":"⊷","Ƶ":"Ƶ","℅":"℅","∞":"∞","⧝":"⧝","⊺":"⊺","⨗":"⨗","⨼":"⨼","ё":"ё","į":"į","𝕚":"𝕚","ι":"ι","¿":"¿","𝒾":"𝒾","⋹":"⋹","⋵":"⋵","⋴":"⋴","⋳":"⋳","ĩ":"ĩ","і":"і","ï":"ï","ĵ":"ĵ","й":"й","𝔧":"𝔧","ȷ":"ȷ","𝕛":"𝕛","𝒿":"𝒿","ј":"ј","є":"є","κ":"κ","ϰ":"ϰ","ķ":"ķ","к":"к","𝔨":"𝔨","ĸ":"ĸ","х":"х","ќ":"ќ","𝕜":"𝕜","𝓀":"𝓀","⤛":"⤛","⤎":"⤎","⪋":"⪋","⥢":"⥢","ĺ":"ĺ","⦴":"⦴","λ":"λ","⦑":"⦑","⪅":"⪅","«":"«","⤟":"⤟","⤝":"⤝","↫":"↫","⤹":"⤹","⥳":"⥳","↢":"↢","⪫":"⪫","⤙":"⤙","⪭":"⪭","⪭︀":"⪭︀","⤌":"⤌","❲":"❲","{":"{","[":"[","⦋":"⦋","⦏":"⦏","⦍":"⦍","ľ":"ľ","ļ":"ļ","л":"л","⤶":"⤶","⥧":"⥧","⥋":"⥋","↲":"↲","≤":"≤","⇇":"⇇","⋋":"⋋","⪨":"⪨","⩿":"⩿","⪁":"⪁","⪃":"⪃","⋚︀":"⋚︀","⪓":"⪓","⋖":"⋖","⥼":"⥼","𝔩":"𝔩","⪑":"⪑","⥪":"⥪","▄":"▄","љ":"љ","⥫":"⥫","◺":"◺","ŀ":"ŀ","⎰":"⎰","≨":"≨","⪉":"⪉","⪇":"⪇","⋦":"⋦","⟬":"⟬","⇽":"⇽","⟼":"⟼","↬":"↬","⦅":"⦅","𝕝":"𝕝","⨭":"⨭","⨴":"⨴","∗":"∗","◊":"◊","(":"(","⦓":"⦓","⥭":"⥭","":"‎","⊿":"⊿","‹":"‹","𝓁":"𝓁","⪍":"⪍","⪏":"⪏","‚":"‚","ł":"ł","⪦":"⪦","⩹":"⩹","⋉":"⋉","⥶":"⥶","⩻":"⩻","⦖":"⦖","◃":"◃","⥊":"⥊","⥦":"⥦","≨︀":"≨︀","∺":"∺","¯":"¯","♂":"♂","✠":"✠","▮":"▮","⨩":"⨩","м":"м","—":"—","𝔪":"𝔪","℧":"℧","µ":"µ","⫰":"⫰","−":"−","⨪":"⨪","⫛":"⫛","⊧":"⊧","𝕞":"𝕞","𝓂":"𝓂","μ":"μ","⊸":"⊸","⋙̸":"⋙̸","≫⃒":"≫⃒","⇍":"⇍","⇎":"⇎","⋘̸":"⋘̸","≪⃒":"≪⃒","⇏":"⇏","⊯":"⊯","⊮":"⊮","ń":"ń","∠⃒":"∠⃒","⩰̸":"⩰̸","≋̸":"≋̸","ʼn":"ʼn","♮":"♮","⩃":"⩃","ň":"ň","ņ":"ņ","⩭̸":"⩭̸","⩂":"⩂","н":"н","–":"–","⇗":"⇗","⤤":"⤤","≐̸":"≐̸","⤨":"⤨","𝔫":"𝔫","↮":"↮","⫲":"⫲","⋼":"⋼","⋺":"⋺","њ":"њ","≦̸":"≦̸","↚":"↚","‥":"‥","𝕟":"𝕟","¬":"¬","⋹̸":"⋹̸","⋵̸":"⋵̸","⋷":"⋷","⋶":"⋶","⋾":"⋾","⋽":"⋽","⫽⃥":"⫽⃥","∂̸":"∂̸","⨔":"⨔","↛":"↛","⤳̸":"⤳̸","↝̸":"↝̸","𝓃":"𝓃","⊄":"⊄","⫅̸":"⫅̸","⊅":"⊅","⫆̸":"⫆̸","ñ":"ñ","ν":"ν","#":"#","№":"№"," ":" ","⊭":"⊭","⤄":"⤄","≍⃒":"≍⃒","⊬":"⊬","≥⃒":"≥⃒",">⃒":">⃒","⧞":"⧞","⤂":"⤂","≤⃒":"≤⃒","<⃒":"<⃒","⊴⃒":"⊴⃒","⤃":"⤃","⊵⃒":"⊵⃒","∼⃒":"∼⃒","⇖":"⇖","⤣":"⤣","⤧":"⤧","ó":"ó","ô":"ô","о":"о","ő":"ő","⨸":"⨸","⦼":"⦼","œ":"œ","⦿":"⦿","𝔬":"𝔬","˛":"˛","ò":"ò","⧁":"⧁","⦵":"⦵","⦾":"⦾","⦻":"⦻","⧀":"⧀","ō":"ō","ω":"ω","ο":"ο","⦶":"⦶","𝕠":"𝕠","⦷":"⦷","⦹":"⦹","∨":"∨","⩝":"⩝","ℴ":"ℴ","ª":"ª","º":"º","⊶":"⊶","⩖":"⩖","⩗":"⩗","⩛":"⩛","ø":"ø","⊘":"⊘","õ":"õ","⨶":"⨶","ö":"ö","⌽":"⌽","¶":"¶","⫳":"⫳","⫽":"⫽","п":"п","%":"%",".":".","‰":"‰","‱":"‱","𝔭":"𝔭","φ":"φ","ϕ":"ϕ","☎":"☎","π":"π","ϖ":"ϖ","ℎ":"ℎ","+":"+","⨣":"⨣","⨢":"⨢","⨥":"⨥","⩲":"⩲","⨦":"⨦","⨧":"⨧","⨕":"⨕","𝕡":"𝕡","£":"£","⪳":"⪳","⪷":"⪷","⪹":"⪹","⪵":"⪵","⋨":"⋨","′":"′","⌮":"⌮","⌒":"⌒","⌓":"⌓","⊰":"⊰","𝓅":"𝓅","ψ":"ψ"," ":" ","𝔮":"𝔮","𝕢":"𝕢","⁗":"⁗","𝓆":"𝓆","⨖":"⨖","?":"?","⤜":"⤜","⥤":"⥤","∽̱":"∽̱","ŕ":"ŕ","⦳":"⦳","⦒":"⦒","⦥":"⦥","»":"»","⥵":"⥵","⤠":"⤠","⤳":"⤳","⤞":"⤞","⥅":"⥅","⥴":"⥴","↣":"↣","↝":"↝","⤚":"⤚","∶":"∶","❳":"❳","}":"}","]":"]","⦌":"⦌","⦎":"⦎","⦐":"⦐","ř":"ř","ŗ":"ŗ","р":"р","⤷":"⤷","⥩":"⥩","↳":"↳","▭":"▭","⥽":"⥽","𝔯":"𝔯","⥬":"⥬","ρ":"ρ","ϱ":"ϱ","⇉":"⇉","⋌":"⋌","˚":"˚","":"‏","⎱":"⎱","⫮":"⫮","⟭":"⟭","⇾":"⇾","⦆":"⦆","𝕣":"𝕣","⨮":"⨮","⨵":"⨵",")":")","⦔":"⦔","⨒":"⨒","›":"›","𝓇":"𝓇","⋊":"⋊","▹":"▹","⧎":"⧎","⥨":"⥨","℞":"℞","ś":"ś","⪴":"⪴","⪸":"⪸","š":"š","ş":"ş","ŝ":"ŝ","⪶":"⪶","⪺":"⪺","⋩":"⋩","⨓":"⨓","с":"с","⋅":"⋅","⩦":"⩦","⇘":"⇘","§":"§",";":";","⤩":"⤩","✶":"✶","𝔰":"𝔰","♯":"♯","щ":"щ","ш":"ш","":"­","σ":"σ","ς":"ς","⩪":"⩪","⪞":"⪞","⪠":"⪠","⪝":"⪝","⪟":"⪟","≆":"≆","⨤":"⨤","⥲":"⥲","⨳":"⨳","⧤":"⧤","⌣":"⌣","⪪":"⪪","⪬":"⪬","⪬︀":"⪬︀","ь":"ь","/":"/","⧄":"⧄","⌿":"⌿","𝕤":"𝕤","♠":"♠","⊓︀":"⊓︀","⊔︀":"⊔︀","𝓈":"𝓈","☆":"☆","⊂":"⊂","⫅":"⫅","⪽":"⪽","⫃":"⫃","⫁":"⫁","⫋":"⫋","⊊":"⊊","⪿":"⪿","⥹":"⥹","⫇":"⫇","⫕":"⫕","⫓":"⫓","♪":"♪","¹":"¹","²":"²","³":"³","⫆":"⫆","⪾":"⪾","⫘":"⫘","⫄":"⫄","⟉":"⟉","⫗":"⫗","⥻":"⥻","⫂":"⫂","⫌":"⫌","⊋":"⊋","⫀":"⫀","⫈":"⫈","⫔":"⫔","⫖":"⫖","⇙":"⇙","⤪":"⤪","ß":"ß","⌖":"⌖","τ":"τ","ť":"ť","ţ":"ţ","т":"т","⌕":"⌕","𝔱":"𝔱","θ":"θ","ϑ":"ϑ","þ":"þ","×":"×","⨱":"⨱","⨰":"⨰","⌶":"⌶","⫱":"⫱","𝕥":"𝕥","⫚":"⫚","‴":"‴","▵":"▵","≜":"≜","◬":"◬","⨺":"⨺","⨹":"⨹","⧍":"⧍","⨻":"⨻","⏢":"⏢","𝓉":"𝓉","ц":"ц","ћ":"ћ","ŧ":"ŧ","⥣":"⥣","ú":"ú","ў":"ў","ŭ":"ŭ","û":"û","у":"у","ű":"ű","⥾":"⥾","𝔲":"𝔲","ù":"ù","▀":"▀","⌜":"⌜","⌏":"⌏","◸":"◸","ū":"ū","ų":"ų","𝕦":"𝕦","υ":"υ","⇈":"⇈","⌝":"⌝","⌎":"⌎","ů":"ů","◹":"◹","𝓊":"𝓊","⋰":"⋰","ũ":"ũ","ü":"ü","⦧":"⦧","⫨":"⫨","⫩":"⫩","⦜":"⦜","⊊︀":"⊊︀","⫋︀":"⫋︀","⊋︀":"⊋︀","⫌︀":"⫌︀","в":"в","⊻":"⊻","≚":"≚","⋮":"⋮","𝔳":"𝔳","𝕧":"𝕧","𝓋":"𝓋","⦚":"⦚","ŵ":"ŵ","⩟":"⩟","≙":"≙","℘":"℘","𝔴":"𝔴","𝕨":"𝕨","𝓌":"𝓌","𝔵":"𝔵","ξ":"ξ","⋻":"⋻","𝕩":"𝕩","𝓍":"𝓍","ý":"ý","я":"я","ŷ":"ŷ","ы":"ы","¥":"¥","𝔶":"𝔶","ї":"ї","𝕪":"𝕪","𝓎":"𝓎","ю":"ю","ÿ":"ÿ","ź":"ź","ž":"ž","з":"з","ż":"ż","ζ":"ζ","𝔷":"𝔷","ж":"ж","⇝":"⇝","𝕫":"𝕫","𝓏":"𝓏","":"‍","":"‌"}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numericUnicodeMap={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromCodePoint=String.fromCodePoint||function(e){return String.fromCharCode(Math.floor((e-65536)/1024)+55296,(e-65536)%1024+56320)},t.getCodePoint=String.prototype.codePointAt?function(e,t){return e.codePointAt(t)}:function(e,t){return 1024*(e.charCodeAt(t)-55296)+e.charCodeAt(t+1)-56320+65536},t.highSurrogateFrom=55296,t.highSurrogateTo=56319},function(e,t){var n={exports:{}};function r(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(t){var n=e[t];"object"!=typeof n||Object.isFrozen(n)||r(n)})),e}n.exports=r,n.exports.default=r;class i{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function o(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function a(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t];return t.forEach((function(e){for(const t in e)n[t]=e[t]})),n}const s=e=>!!e.scope||e.sublanguage&&e.language;class l{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=o(e)}openNode(e){if(!s(e))return;let t="";t=e.sublanguage?`language-${e.language}`:((e,{prefix:t})=>{if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map(((e,t)=>`${e}${"_".repeat(t+1)}`))].join(" ")}return`${t}${e}`})(e.scope,{prefix:this.classPrefix}),this.span(t)}closeNode(e){s(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const c=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class u{constructor(){this.rootNode=c(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=c({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{u._collapse(e)})))}}class d extends u{constructor(e){super(),this.options=e}addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root;n.sublanguage=!0,n.language=t,this.add(n)}toHTML(){return new l(this,this.options).value()}finalize(){return!0}}function h(e){return e?"string"==typeof e?e:e.source:null}function p(e){return f("(?=",e,")")}function m(e){return f("(?:",e,")*")}function g(e){return f("(?:",e,")?")}function f(...e){return e.map((e=>h(e))).join("")}function _(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e);return"("+(t.capture?"":"?:")+e.map((e=>h(e))).join("|")+")"}function b(e){return new RegExp(e.toString()+"|").exec("").length-1}const v=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function y(e,{joinWith:t}){let n=0;return e.map((e=>{n+=1;const t=n;let r=h(e),i="";for(;r.length>0;){const e=v.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?i+="\\"+String(Number(e[1])+t):(i+=e[0],"("===e[0]&&n++)}return i})).map((e=>`(${e})`)).join(t)}const E="[a-zA-Z]\\w*",S="[a-zA-Z_]\\w*",w="\\b\\d+(\\.\\d+)?",T="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",C="\\b(0b[01]+)",x={begin:"\\\\[\\s\\S]",relevance:0},F={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[x]},D={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[x]},k=function(e,t,n={}){const r=a({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=_("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:f(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},O=k("//","$"),I=k("/\\*","\\*/"),A=k("#","$"),R={scope:"number",begin:w,relevance:0},N={scope:"number",begin:T,relevance:0},M={scope:"number",begin:C,relevance:0},P={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[x,{begin:/\[/,end:/\]/,relevance:0,contains:[x]}]}]},L={scope:"title",begin:E,relevance:0},B={scope:"title",begin:S,relevance:0},U={begin:"\\.\\s*"+S,relevance:0};var j=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:E,UNDERSCORE_IDENT_RE:S,NUMBER_RE:w,C_NUMBER_RE:T,BINARY_NUMBER_RE:C,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=f(t,/.*\b/,e.binary,/\b.*/)),a({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:x,APOS_STRING_MODE:F,QUOTE_STRING_MODE:D,PHRASAL_WORDS_MODE:{begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},COMMENT:k,C_LINE_COMMENT_MODE:O,C_BLOCK_COMMENT_MODE:I,HASH_COMMENT_MODE:A,NUMBER_MODE:R,C_NUMBER_MODE:N,BINARY_NUMBER_MODE:M,REGEXP_MODE:P,TITLE_MODE:L,UNDERSCORE_TITLE_MODE:B,METHOD_GUARD:U,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})}});function G(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function z(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function H(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=G,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function q(e,t){Array.isArray(e.illegal)&&(e.illegal=_(...e.illegal))}function V(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function $(e,t){void 0===e.relevance&&(e.relevance=1)}const K=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach((t=>{delete e[t]})),e.keywords=n.keywords,e.begin=f(n.beforeMatch,p(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},W=["of","and","for","in","not","or","if","then","parent","list","value"],Y="keyword";function Q(e,t,n=Y){const r=Object.create(null);return"string"==typeof e?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach((function(n){Object.assign(r,Q(e[n],t,n))})),r;function i(e,n){t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((function(t){const n=t.split("|");r[n[0]]=[e,X(n[0],n[1])]}))}}function X(e,t){return t?Number(t):function(e){return W.includes(e.toLowerCase())}(e)?0:1}const Z={},J=e=>{console.error(e)},ee=(e,...t)=>{console.log(`WARN: ${e}`,...t)},te=(e,t)=>{Z[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Z[`${e}/${t}`]=!0)},ne=new Error;function re(e,t,{key:n}){let r=0;const i=e[n],o={},a={};for(let e=1;e<=t.length;e++)a[e+r]=i[e],o[e+r]=!0,r+=b(t[e-1]);e[n]=a,e[n]._emit=o,e[n]._multi=!0}function ie(e){!function(e){e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,delete e.scope)}(e),"string"==typeof e.beginScope&&(e.beginScope={_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope}),function(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw J("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ne;if("object"!=typeof e.beginScope||null===e.beginScope)throw J("beginScope must be object"),ne;re(e,e.begin,{key:"beginScope"}),e.begin=y(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw J("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ne;if("object"!=typeof e.endScope||null===e.endScope)throw J("endScope must be object"),ne;re(e,e.end,{key:"endScope"}),e.end=y(e.end,{joinWith:""})}}(e)}function oe(e){function t(t,n){return new RegExp(h(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(n?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=b(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=t(y(e,{joinWith:"|"}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=a(e.classNameAliases||{}),function n(i,o){const s=i;if(i.isCompiled)return s;[z,V,ie,K].forEach((e=>e(i,o))),e.compilerExtensions.forEach((e=>e(i,o))),i.__beforeBegin=null,[H,q,$].forEach((e=>e(i,o))),i.isCompiled=!0;let l=null;return"object"==typeof i.keywords&&i.keywords.$pattern&&(i.keywords=Object.assign({},i.keywords),l=i.keywords.$pattern,delete i.keywords.$pattern),l=l||/\w+/,i.keywords&&(i.keywords=Q(i.keywords,e.case_insensitive)),s.keywordPatternRe=t(l,!0),o&&(i.begin||(i.begin=/\B|\b/),s.beginRe=t(s.begin),i.end||i.endsWithParent||(i.end=/\B|\b/),i.end&&(s.endRe=t(s.end)),s.terminatorEnd=h(s.end)||"",i.endsWithParent&&o.terminatorEnd&&(s.terminatorEnd+=(i.end?"|":"")+o.terminatorEnd)),i.illegal&&(s.illegalRe=t(i.illegal)),i.contains||(i.contains=[]),i.contains=[].concat(...i.contains.map((function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return a(e,{variants:null},t)})));if(e.cachedVariants)return e.cachedVariants;if(ae(e))return a(e,{starts:e.starts?a(e.starts):null});if(Object.isFrozen(e))return a(e);return e}("self"===e?i:e)}))),i.contains.forEach((function(e){n(e,s)})),i.starts&&n(i.starts,o),s.matcher=function(e){const t=new r;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin"}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(s),s}(e)}function ae(e){return!!e&&(e.endsWithParent||ae(e.starts))}class se extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const le=o,ce=a,ue=Symbol("nomatch"),de=7;var he=function(e){const t=Object.create(null),r=Object.create(null),o=[];let a=!0;const s="Could not find the language '{}', did you forget to load/include a language module?",l={disableAutodetect:!0,name:"Plain text",contains:[]};let c={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:d};function u(e){return c.noHighlightRe.test(e)}function h(e,t,n){let r="",i="";"object"==typeof t?(r=e,n=t.ignoreIllegals,i=t.language):(te("10.7.0","highlight(lang, code, ...args) has been deprecated."),te("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),i=e,r=t),void 0===n&&(n=!0);const o={code:r,language:i};x("before:highlight",o);const a=o.result?o.result:b(o.language,o.code,n);return a.code=o.code,x("after:highlight",a),a}function b(e,n,r,o){const l=Object.create(null);function u(){if(!C.keywords)return void F.addText(D);let e=0;C.keywordPatternRe.lastIndex=0;let t=C.keywordPatternRe.exec(D),n="";for(;t;){n+=D.substring(e,t.index);const i=E.case_insensitive?t[0].toLowerCase():t[0],o=(r=i,C.keywords[r]);if(o){const[e,r]=o;if(F.addText(n),n="",l[i]=(l[i]||0)+1,l[i]<=de&&(k+=r),e.startsWith("_"))n+=t[0];else{const n=E.classNameAliases[e]||e;F.addKeyword(t[0],n)}}else n+=t[0];e=C.keywordPatternRe.lastIndex,t=C.keywordPatternRe.exec(D)}var r;n+=D.substring(e),F.addText(n)}function d(){null!=C.subLanguage?function(){if(""===D)return;let e=null;if("string"==typeof C.subLanguage){if(!t[C.subLanguage])return void F.addText(D);e=b(C.subLanguage,D,!0,x[C.subLanguage]),x[C.subLanguage]=e._top}else e=v(D,C.subLanguage.length?C.subLanguage:null);C.relevance>0&&(k+=e.relevance),F.addSublanguage(e._emitter,e.language)}():u(),D=""}function h(e,t){let n=1;const r=t.length-1;for(;n<=r;){if(!e._emit[n]){n++;continue}const r=E.classNameAliases[e[n]]||e[n],i=t[n];r?F.addKeyword(i,r):(D=i,u(),D=""),n++}}function p(e,t){return e.scope&&"string"==typeof e.scope&&F.openNode(E.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(F.addKeyword(D,E.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),D=""):e.beginScope._multi&&(h(e.beginScope,t),D="")),C=Object.create(e,{parent:{value:C}}),C}function m(e,t,n){let r=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,n);if(r){if(e["on:end"]){const n=new i(e);e["on:end"](t,n),n.isMatchIgnored&&(r=!1)}if(r){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return m(e.parent,t,n)}function g(e){return 0===C.matcher.regexIndex?(D+=e[0],1):(A=!0,0)}function f(e){const t=e[0],r=n.substring(e.index),i=m(C,e,r);if(!i)return ue;const o=C;C.endScope&&C.endScope._wrap?(d(),F.addKeyword(t,C.endScope._wrap)):C.endScope&&C.endScope._multi?(d(),h(C.endScope,e)):o.skip?D+=t:(o.returnEnd||o.excludeEnd||(D+=t),d(),o.excludeEnd&&(D=t));do{C.scope&&F.closeNode(),C.skip||C.subLanguage||(k+=C.relevance),C=C.parent}while(C!==i.parent);return i.starts&&p(i.starts,e),o.returnEnd?0:t.length}let _={};function y(t,o){const s=o&&o[0];if(D+=t,null==s)return d(),0;if("begin"===_.type&&"end"===o.type&&_.index===o.index&&""===s){if(D+=n.slice(o.index,o.index+1),!a){const t=new Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=_.rule,t}return 1}if(_=o,"begin"===o.type)return function(e){const t=e[0],n=e.rule,r=new i(n),o=[n.__beforeBegin,n["on:begin"]];for(const n of o)if(n&&(n(e,r),r.isMatchIgnored))return g(t);return n.skip?D+=t:(n.excludeBegin&&(D+=t),d(),n.returnBegin||n.excludeBegin||(D=t)),p(n,e),n.returnBegin?0:t.length}(o);if("illegal"===o.type&&!r){const e=new Error('Illegal lexeme "'+s+'" for mode "'+(C.scope||"<unnamed>")+'"');throw e.mode=C,e}if("end"===o.type){const e=f(o);if(e!==ue)return e}if("illegal"===o.type&&""===s)return 1;if(I>1e5&&I>3*o.index){throw new Error("potential infinite loop, way more iterations than matches")}return D+=s,s.length}const E=w(e);if(!E)throw J(s.replace("{}",e)),new Error('Unknown language: "'+e+'"');const S=oe(E);let T="",C=o||S;const x={},F=new c.__emitter(c);!function(){const e=[];for(let t=C;t!==E;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach((e=>F.openNode(e)))}();let D="",k=0,O=0,I=0,A=!1;try{for(C.matcher.considerAll();;){I++,A?A=!1:C.matcher.considerAll(),C.matcher.lastIndex=O;const e=C.matcher.exec(n);if(!e)break;const t=y(n.substring(O,e.index),e);O=e.index+t}return y(n.substring(O)),F.closeAllNodes(),F.finalize(),T=F.toHTML(),{language:e,value:T,relevance:k,illegal:!1,_emitter:F,_top:C}}catch(t){if(t.message&&t.message.includes("Illegal"))return{language:e,value:le(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:O,context:n.slice(O-100,O+100),mode:t.mode,resultSoFar:T},_emitter:F};if(a)return{language:e,value:le(n),illegal:!1,relevance:0,errorRaised:t,_emitter:F,_top:C};throw t}}function v(e,n){n=n||c.languages||Object.keys(t);const r=function(e){const t={value:le(e),illegal:!1,relevance:0,_top:l,_emitter:new c.__emitter(c)};return t._emitter.addText(e),t}(e),i=n.filter(w).filter(C).map((t=>b(t,e,!1)));i.unshift(r);const o=i.sort(((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(w(e.language).supersetOf===t.language)return 1;if(w(t.language).supersetOf===e.language)return-1}return 0})),[a,s]=o,u=a;return u.secondBest=s,u}function y(e){let t=null;const n=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=c.languageDetectRe.exec(t);if(n){const t=w(n[1]);return t||(ee(s.replace("{}",n[1])),ee("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find((e=>u(e)||w(e)))}(e);if(u(n))return;if(x("before:highlightElement",{el:e,language:n}),e.children.length>0&&(c.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(e)),c.throwUnescapedHTML)){throw new se("One of your code blocks includes unescaped HTML.",e.innerHTML)}t=e;const i=t.textContent,o=n?h(i,{language:n,ignoreIllegals:!0}):v(i);e.innerHTML=o.value,function(e,t,n){const i=t&&r[t]||n;e.classList.add("hljs"),e.classList.add(`language-${i}`)}(e,n,o.language),e.result={language:o.language,re:o.relevance,relevance:o.relevance},o.secondBest&&(e.secondBest={language:o.secondBest.language,relevance:o.secondBest.relevance}),x("after:highlightElement",{el:e,result:o,text:i})}let E=!1;function S(){if("loading"===document.readyState)return void(E=!0);document.querySelectorAll(c.cssSelector).forEach(y)}function w(e){return e=(e||"").toLowerCase(),t[e]||t[r[e]]}function T(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{r[e.toLowerCase()]=t}))}function C(e){const t=w(e);return t&&!t.disableAutodetect}function x(e,t){const n=e;o.forEach((function(e){e[n]&&e[n](t)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){E&&S()}),!1),Object.assign(e,{highlight:h,highlightAuto:v,highlightAll:S,highlightElement:y,highlightBlock:function(e){return te("10.7.0","highlightBlock will be removed entirely in v12.0"),te("10.7.0","Please use highlightElement now."),y(e)},configure:function(e){c=ce(c,e)},initHighlighting:()=>{S(),te("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){S(),te("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(n,r){let i=null;try{i=r(e)}catch(e){if(J("Language definition for '{}' could not be registered.".replace("{}",n)),!a)throw e;J(e),i=l}i.name||(i.name=n),t[n]=i,i.rawDefinition=r.bind(null,e),i.aliases&&T(i.aliases,{languageName:n})},unregisterLanguage:function(e){delete t[e];for(const t of Object.keys(r))r[t]===e&&delete r[t]},listLanguages:function(){return Object.keys(t)},getLanguage:w,registerAliases:T,autoDetection:C,inherit:ce,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),o.push(e)}}),e.debugMode=function(){a=!1},e.safeMode=function(){a=!0},e.versionString="11.7.0",e.regex={concat:f,lookahead:p,either:_,optional:g,anyNumberOfTimes:m};for(const e in j)"object"==typeof j[e]&&n.exports(j[e]);return Object.assign(e,j),e}({});e.exports=he,he.HighlightJS=he,he.default=he},function(e,t){e.exports=function(e){const t="[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]+",n="далее возврат вызватьисключение выполнить для если и из или иначе иначеесли исключение каждого конецесли конецпопытки конеццикла не новый перейти перем по пока попытка прервать продолжить тогда цикл экспорт ",r="null истина ложь неопределено",i=e.inherit(e.NUMBER_MODE),o={className:"string",begin:'"|\\|',end:'"|$',contains:[{begin:'""'}]},a={begin:"'",end:"'",excludeBegin:!0,excludeEnd:!0,contains:[{className:"number",begin:"\\d{4}([\\.\\\\/:-]?\\d{2}){0,5}"}]},s=e.inherit(e.C_LINE_COMMENT_MODE);return{name:"1C:Enterprise",case_insensitive:!0,keywords:{$pattern:t,keyword:n,built_in:"разделительстраниц разделительстрок символтабуляции ansitooem oemtoansi ввестивидсубконто ввестиперечисление ввестипериод ввестиплансчетов выбранныйплансчетов датагод датамесяц датачисло заголовоксистемы значениевстроку значениеизстроки каталогиб каталогпользователя кодсимв конгода конецпериодаби конецрассчитанногопериодаби конецстандартногоинтервала конквартала конмесяца коннедели лог лог10 максимальноеколичествосубконто названиеинтерфейса названиенабораправ назначитьвид назначитьсчет найтиссылки началопериодаби началостандартногоинтервала начгода начквартала начмесяца начнедели номерднягода номерднянедели номернеделигода обработкаожидания основнойжурналрасчетов основнойплансчетов основнойязык очиститьокносообщений периодстр получитьвремята получитьдатута получитьдокументта получитьзначенияотбора получитьпозициюта получитьпустоезначение получитьта префиксавтонумерации пропись пустоезначение разм разобратьпозициюдокумента рассчитатьрегистрына рассчитатьрегистрыпо симв создатьобъект статусвозврата стрколичествострок сформироватьпозициюдокумента счетпокоду текущеевремя типзначения типзначениястр установитьтана установитьтапо фиксшаблон шаблон acos asin atan base64значение base64строка cos exp log log10 pow sin sqrt tan xmlзначение xmlстрока xmlтип xmlтипзнч активноеокно безопасныйрежим безопасныйрежимразделенияданных булево ввестидату ввестизначение ввестистроку ввестичисло возможностьчтенияxml вопрос восстановитьзначение врег выгрузитьжурналрегистрации выполнитьобработкуоповещения выполнитьпроверкуправдоступа вычислить год данныеформывзначение дата день деньгода деньнедели добавитьмесяц заблокироватьданныедляредактирования заблокироватьработупользователя завершитьработусистемы загрузитьвнешнююкомпоненту закрытьсправку записатьjson записатьxml записатьдатуjson записьжурналарегистрации заполнитьзначениясвойств запроситьразрешениепользователя запуститьприложение запуститьсистему зафиксироватьтранзакцию значениевданныеформы значениевстрокувнутр значениевфайл значениезаполнено значениеизстрокивнутр значениеизфайла изxmlтипа импортмоделиxdto имякомпьютера имяпользователя инициализироватьпредопределенныеданные информацияобошибке каталогбиблиотекимобильногоустройства каталогвременныхфайлов каталогдокументов каталогпрограммы кодироватьстроку кодлокализацииинформационнойбазы кодсимвола командасистемы конецгода конецдня конецквартала конецмесяца конецминуты конецнедели конецчаса конфигурациябазыданныхизмененадинамически конфигурацияизменена копироватьданныеформы копироватьфайл краткоепредставлениеошибки лев макс местноевремя месяц мин минута монопольныйрежим найти найтинедопустимыесимволыxml найтиокнопонавигационнойссылке найтипомеченныенаудаление найтипоссылкам найтифайлы началогода началодня началоквартала началомесяца началоминуты началонедели началочаса начатьзапросразрешенияпользователя начатьзапускприложения начатькопированиефайла начатьперемещениефайла начатьподключениевнешнейкомпоненты начатьподключениерасширенияработыскриптографией начатьподключениерасширенияработысфайлами начатьпоискфайлов начатьполучениекаталогавременныхфайлов начатьполучениекаталогадокументов начатьполучениерабочегокаталогаданныхпользователя начатьполучениефайлов начатьпомещениефайла начатьпомещениефайлов начатьсозданиедвоичныхданныхизфайла начатьсозданиекаталога начатьтранзакцию начатьудалениефайлов начатьустановкувнешнейкомпоненты начатьустановкурасширенияработыскриптографией начатьустановкурасширенияработысфайлами неделягода необходимостьзавершениясоединения номерсеансаинформационнойбазы номерсоединенияинформационнойбазы нрег нстр обновитьинтерфейс обновитьнумерациюобъектов обновитьповторноиспользуемыезначения обработкапрерыванияпользователя объединитьфайлы окр описаниеошибки оповестить оповеститьобизменении отключитьобработчикзапросанастроекклиенталицензирования отключитьобработчикожидания отключитьобработчикоповещения открытьзначение открытьиндекссправки открытьсодержаниесправки открытьсправку открытьформу открытьформумодально отменитьтранзакцию очиститьжурналрегистрации очиститьнастройкипользователя очиститьсообщения параметрыдоступа перейтипонавигационнойссылке переместитьфайл подключитьвнешнююкомпоненту подключитьобработчикзапросанастроекклиенталицензирования подключитьобработчикожидания подключитьобработчикоповещения подключитьрасширениеработыскриптографией подключитьрасширениеработысфайлами подробноепредставлениеошибки показатьвводдаты показатьвводзначения показатьвводстроки показатьвводчисла показатьвопрос показатьзначение показатьинформациюобошибке показатьнакарте показатьоповещениепользователя показатьпредупреждение полноеимяпользователя получитьcomобъект получитьxmlтип получитьадреспоместоположению получитьблокировкусеансов получитьвремязавершенияспящегосеанса получитьвремязасыпанияпассивногосеанса получитьвремяожиданияблокировкиданных получитьданныевыбора получитьдополнительныйпараметрклиенталицензирования получитьдопустимыекодылокализации получитьдопустимыечасовыепояса получитьзаголовокклиентскогоприложения получитьзаголовоксистемы получитьзначенияотборажурналарегистрации получитьидентификаторконфигурации получитьизвременногохранилища получитьимявременногофайла получитьимяклиенталицензирования получитьинформациюэкрановклиента получитьиспользованиежурналарегистрации получитьиспользованиесобытияжурналарегистрации получитькраткийзаголовокприложения получитьмакетоформления получитьмаскувсефайлы получитьмаскувсефайлыклиента получитьмаскувсефайлысервера получитьместоположениепоадресу получитьминимальнуюдлинупаролейпользователей получитьнавигационнуюссылку получитьнавигационнуюссылкуинформационнойбазы получитьобновлениеконфигурациибазыданных получитьобновлениепредопределенныхданныхинформационнойбазы получитьобщиймакет получитьобщуюформу получитьокна получитьоперативнуюотметкувремени получитьотключениебезопасногорежима получитьпараметрыфункциональныхопцийинтерфейса получитьполноеимяпредопределенногозначения получитьпредставлениянавигационныхссылок получитьпроверкусложностипаролейпользователей получитьразделительпути получитьразделительпутиклиента получитьразделительпутисервера получитьсеансыинформационнойбазы получитьскоростьклиентскогосоединения получитьсоединенияинформационнойбазы получитьсообщенияпользователю получитьсоответствиеобъектаиформы получитьсоставстандартногоинтерфейсаodata получитьструктурухранениябазыданных получитьтекущийсеансинформационнойбазы получитьфайл получитьфайлы получитьформу получитьфункциональнуюопцию получитьфункциональнуюопциюинтерфейса получитьчасовойпоясинформационнойбазы пользователиос поместитьвовременноехранилище поместитьфайл поместитьфайлы прав праводоступа предопределенноезначение представлениекодалокализации представлениепериода представлениеправа представлениеприложения представлениесобытияжурналарегистрации представлениечасовогопояса предупреждение прекратитьработусистемы привилегированныйрежим продолжитьвызов прочитатьjson прочитатьxml прочитатьдатуjson пустаястрока рабочийкаталогданныхпользователя разблокироватьданныедляредактирования разделитьфайл разорватьсоединениесвнешнимисточникомданных раскодироватьстроку рольдоступна секунда сигнал символ скопироватьжурналрегистрации смещениелетнеговремени смещениестандартноговремени соединитьбуферыдвоичныхданных создатькаталог создатьфабрикуxdto сокрл сокрлп сокрп сообщить состояние сохранитьзначение сохранитьнастройкипользователя сред стрдлина стрзаканчиваетсяна стрзаменить стрнайти стрначинаетсяс строка строкасоединенияинформационнойбазы стрполучитьстроку стрразделить стрсоединить стрсравнить стрчисловхождений стрчислострок стршаблон текущаядата текущаядатасеанса текущаяуниверсальнаядата текущаяуниверсальнаядатавмиллисекундах текущийвариантинтерфейсаклиентскогоприложения текущийвариантосновногошрифтаклиентскогоприложения текущийкодлокализации текущийрежимзапуска текущийязык текущийязыксистемы тип типзнч транзакцияактивна трег удалитьданныеинформационнойбазы удалитьизвременногохранилища удалитьобъекты удалитьфайлы универсальноевремя установитьбезопасныйрежим установитьбезопасныйрежимразделенияданных установитьблокировкусеансов установитьвнешнююкомпоненту установитьвремязавершенияспящегосеанса установитьвремязасыпанияпассивногосеанса установитьвремяожиданияблокировкиданных установитьзаголовокклиентскогоприложения установитьзаголовоксистемы установитьиспользованиежурналарегистрации установитьиспользованиесобытияжурналарегистрации установитькраткийзаголовокприложения установитьминимальнуюдлинупаролейпользователей установитьмонопольныйрежим установитьнастройкиклиенталицензирования установитьобновлениепредопределенныхданныхинформационнойбазы установитьотключениебезопасногорежима установитьпараметрыфункциональныхопцийинтерфейса установитьпривилегированныйрежим установитьпроверкусложностипаролейпользователей установитьрасширениеработыскриптографией установитьрасширениеработысфайлами установитьсоединениесвнешнимисточникомданных установитьсоответствиеобъектаиформы установитьсоставстандартногоинтерфейсаodata установитьчасовойпоясинформационнойбазы установитьчасовойпояссеанса формат цел час часовойпояс часовойпояссеанса число числопрописью этоадресвременногохранилища wsссылки библиотекакартинок библиотекамакетовоформлениякомпоновкиданных библиотекастилей бизнеспроцессы внешниеисточникиданных внешниеобработки внешниеотчеты встроенныепокупки главныйинтерфейс главныйстиль документы доставляемыеуведомления журналыдокументов задачи информацияобинтернетсоединении использованиерабочейдаты историяработыпользователя константы критерииотбора метаданные обработки отображениерекламы отправкадоставляемыхуведомлений отчеты панельзадачос параметрзапуска параметрысеанса перечисления планывидоврасчета планывидовхарактеристик планыобмена планысчетов полнотекстовыйпоиск пользователиинформационнойбазы последовательности проверкавстроенныхпокупок рабочаядата расширенияконфигурации регистрыбухгалтерии регистрынакопления регистрырасчета регистрысведений регламентныезадания сериализаторxdto справочники средствагеопозиционирования средствакриптографии средствамультимедиа средстваотображениярекламы средствапочты средствателефонии фабрикаxdto файловыепотоки фоновыезадания хранилищанастроек хранилищевариантовотчетов хранилищенастроекданныхформ хранилищеобщихнастроек хранилищепользовательскихнастроекдинамическихсписков хранилищепользовательскихнастроекотчетов хранилищесистемныхнастроек ",class:"webцвета windowsцвета windowsшрифты библиотекакартинок рамкистиля символы цветастиля шрифтыстиля автоматическоесохранениеданныхформывнастройках автонумерациявформе автораздвижениесерий анимациядиаграммы вариантвыравниванияэлементовизаголовков вариантуправлениявысотойтаблицы вертикальнаяпрокруткаформы вертикальноеположение вертикальноеположениеэлемента видгруппыформы виддекорацииформы виддополненияэлементаформы видизмененияданных видкнопкиформы видпереключателя видподписейкдиаграмме видполяформы видфлажка влияниеразмеранапузырекдиаграммы горизонтальноеположение горизонтальноеположениеэлемента группировкаколонок группировкаподчиненныхэлементовформы группыиэлементы действиеперетаскивания дополнительныйрежимотображения допустимыедействияперетаскивания интервалмеждуэлементамиформы использованиевывода использованиеполосыпрокрутки используемоезначениеточкибиржевойдиаграммы историявыборапривводе источникзначенийоситочекдиаграммы источникзначенияразмерапузырькадиаграммы категориягруппыкоманд максимумсерий начальноеотображениедерева начальноеотображениесписка обновлениетекстаредактирования ориентациядендрограммы ориентациядиаграммы ориентацияметокдиаграммы ориентацияметоксводнойдиаграммы ориентацияэлементаформы отображениевдиаграмме отображениевлегендедиаграммы отображениегруппыкнопок отображениезаголовкашкалыдиаграммы отображениезначенийсводнойдиаграммы отображениезначенияизмерительнойдиаграммы отображениеинтерваладиаграммыганта отображениекнопки отображениекнопкивыбора отображениеобсужденийформы отображениеобычнойгруппы отображениеотрицательныхзначенийпузырьковойдиаграммы отображениепанелипоиска отображениеподсказки отображениепредупрежденияприредактировании отображениеразметкиполосырегулирования отображениестраницформы отображениетаблицы отображениетекстазначениядиаграммыганта отображениеуправленияобычнойгруппы отображениефигурыкнопки палитрацветовдиаграммы поведениеобычнойгруппы поддержкамасштабадендрограммы поддержкамасштабадиаграммыганта поддержкамасштабасводнойдиаграммы поисквтаблицепривводе положениезаголовкаэлементаформы положениекартинкикнопкиформы положениекартинкиэлементаграфическойсхемы положениекоманднойпанелиформы положениекоманднойпанелиэлементаформы положениеопорнойточкиотрисовки положениеподписейкдиаграмме положениеподписейшкалызначенийизмерительнойдиаграммы положениесостоянияпросмотра положениестрокипоиска положениетекстасоединительнойлинии положениеуправленияпоиском положениешкалывремени порядокотображенияточекгоризонтальнойгистограммы порядоксерийвлегендедиаграммы размеркартинки расположениезаголовкашкалыдиаграммы растягиваниеповертикалидиаграммыганта режимавтоотображениясостояния режимвводастроктаблицы режимвыборанезаполненного режимвыделениядаты режимвыделениястрокитаблицы режимвыделениятаблицы режимизмененияразмера режимизменениясвязанногозначения режимиспользованиядиалогапечати режимиспользованияпараметракоманды режиммасштабированияпросмотра режимосновногоокнаклиентскогоприложения режимоткрытияокнаформы режимотображениявыделения режимотображениягеографическойсхемы режимотображениязначенийсерии режимотрисовкисеткиграфическойсхемы режимполупрозрачностидиаграммы режимпробеловдиаграммы режимразмещениянастранице режимредактированияколонки режимсглаживаниядиаграммы режимсглаживанияиндикатора режимсписказадач сквозноевыравнивание сохранениеданныхформывнастройках способзаполнениятекстазаголовкашкалыдиаграммы способопределенияограничивающегозначениядиаграммы стандартнаягруппакоманд стандартноеоформление статусоповещенияпользователя стильстрелки типаппроксимациилиниитрендадиаграммы типдиаграммы типединицышкалывремени типимпортасерийслоягеографическойсхемы типлиниигеографическойсхемы типлиниидиаграммы типмаркерагеографическойсхемы типмаркерадиаграммы типобластиоформления типорганизацииисточникаданныхгеографическойсхемы типотображениясериислоягеографическойсхемы типотображенияточечногообъектагеографическойсхемы типотображенияшкалыэлементалегендыгеографическойсхемы типпоискаобъектовгеографическойсхемы типпроекциигеографическойсхемы типразмещенияизмерений типразмещенияреквизитовизмерений типрамкиэлементауправления типсводнойдиаграммы типсвязидиаграммыганта типсоединениязначенийпосериямдиаграммы типсоединенияточекдиаграммы типсоединительнойлинии типстороныэлементаграфическойсхемы типформыотчета типшкалырадарнойдиаграммы факторлиниитрендадиаграммы фигуракнопки фигурыграфическойсхемы фиксациявтаблице форматдняшкалывремени форматкартинки ширинаподчиненныхэлементовформы виддвижениябухгалтерии виддвижениянакопления видпериодарегистрарасчета видсчета видточкимаршрутабизнеспроцесса использованиеагрегатарегистранакопления использованиегруппиэлементов использованиережимапроведения использованиесреза периодичностьагрегатарегистранакопления режимавтовремя режимзаписидокумента режимпроведениядокумента авторегистрацияизменений допустимыйномерсообщения отправкаэлементаданных получениеэлементаданных использованиерасшифровкитабличногодокумента ориентациястраницы положениеитоговколоноксводнойтаблицы положениеитоговстроксводнойтаблицы положениетекстаотносительнокартинки расположениезаголовкагруппировкитабличногодокумента способчтениязначенийтабличногодокумента типдвустороннейпечати типзаполненияобластитабличногодокумента типкурсоровтабличногодокумента типлиниирисункатабличногодокумента типлинииячейкитабличногодокумента типнаправленияпереходатабличногодокумента типотображениявыделениятабличногодокумента типотображениялинийсводнойтаблицы типразмещениятекстатабличногодокумента типрисункатабличногодокумента типсмещениятабличногодокумента типузоратабличногодокумента типфайлатабличногодокумента точностьпечати чередованиерасположениястраниц отображениевремениэлементовпланировщика типфайлаформатированногодокумента обходрезультатазапроса типзаписизапроса видзаполнениярасшифровкипостроителяотчета типдобавленияпредставлений типизмеренияпостроителяотчета типразмещенияитогов доступкфайлу режимдиалогавыборафайла режимоткрытияфайла типизмеренияпостроителязапроса видданныханализа методкластеризации типединицыинтервалавременианализаданных типзаполнениятаблицырезультатаанализаданных типиспользованиячисловыхзначенийанализаданных типисточникаданныхпоискаассоциаций типколонкианализаданныхдереворешений типколонкианализаданныхкластеризация типколонкианализаданныхобщаястатистика типколонкианализаданныхпоискассоциаций типколонкианализаданныхпоискпоследовательностей типколонкимоделипрогноза типмерырасстоянияанализаданных типотсеченияправилассоциации типполяанализаданных типстандартизациианализаданных типупорядочиванияправилассоциациианализаданных типупорядочиванияшаблоновпоследовательностейанализаданных типупрощениядереварешений wsнаправлениепараметра вариантxpathxs вариантзаписидатыjson вариантпростоготипаxs видгруппымоделиxs видфасетаxdto действиепостроителяdom завершенностьпростоготипаxs завершенностьсоставноготипаxs завершенностьсхемыxs запрещенныеподстановкиxs исключениягруппподстановкиxs категорияиспользованияатрибутаxs категорияограниченияидентичностиxs категорияограниченияпространствименxs методнаследованияxs модельсодержимогоxs назначениетипаxml недопустимыеподстановкиxs обработкапробельныхсимволовxs обработкасодержимогоxs ограничениезначенияxs параметрыотбораузловdom переносстрокjson позициявдокументеdom пробельныесимволыxml типатрибутаxml типзначенияjson типканоническогоxml типкомпонентыxs типпроверкиxml типрезультатаdomxpath типузлаdom типузлаxml формаxml формапредставленияxs форматдатыjson экранированиесимволовjson видсравнениякомпоновкиданных действиеобработкирасшифровкикомпоновкиданных направлениесортировкикомпоновкиданных расположениевложенныхэлементоврезультатакомпоновкиданных расположениеитоговкомпоновкиданных расположениегруппировкикомпоновкиданных расположениеполейгруппировкикомпоновкиданных расположениеполякомпоновкиданных расположениереквизитовкомпоновкиданных расположениересурсовкомпоновкиданных типбухгалтерскогоостаткакомпоновкиданных типвыводатекстакомпоновкиданных типгруппировкикомпоновкиданных типгруппыэлементовотборакомпоновкиданных типдополненияпериодакомпоновкиданных типзаголовкаполейкомпоновкиданных типмакетагруппировкикомпоновкиданных типмакетаобластикомпоновкиданных типостаткакомпоновкиданных типпериодакомпоновкиданных типразмещениятекстакомпоновкиданных типсвязинаборовданныхкомпоновкиданных типэлементарезультатакомпоновкиданных расположениелегендыдиаграммыкомпоновкиданных типпримененияотборакомпоновкиданных режимотображенияэлементанастройкикомпоновкиданных режимотображениянастроеккомпоновкиданных состояниеэлементанастройкикомпоновкиданных способвосстановлениянастроеккомпоновкиданных режимкомпоновкирезультата использованиепараметракомпоновкиданных автопозицияресурсовкомпоновкиданных вариантиспользованиягруппировкикомпоновкиданных расположениересурсоввдиаграммекомпоновкиданных фиксациякомпоновкиданных использованиеусловногооформлениякомпоновкиданных важностьинтернетпочтовогосообщения обработкатекстаинтернетпочтовогосообщения способкодированияинтернетпочтовоговложения способкодированиянеasciiсимволовинтернетпочтовогосообщения типтекстапочтовогосообщения протоколинтернетпочты статусразборапочтовогосообщения режимтранзакциизаписижурналарегистрации статустранзакциизаписижурналарегистрации уровеньжурналарегистрации расположениехранилищасертификатовкриптографии режимвключениясертификатовкриптографии режимпроверкисертификатакриптографии типхранилищасертификатовкриптографии кодировкаименфайловвzipфайле методсжатияzip методшифрованияzip режимвосстановленияпутейфайловzip режимобработкиподкаталоговzip режимсохраненияпутейzip уровеньсжатияzip звуковоеоповещение направлениепереходакстроке позициявпотоке порядокбайтов режимблокировкиданных режимуправленияблокировкойданных сервисвстроенныхпокупок состояниефоновогозадания типподписчикадоставляемыхуведомлений уровеньиспользованиязащищенногосоединенияftp направлениепорядкасхемызапроса типдополненияпериодамисхемызапроса типконтрольнойточкисхемызапроса типобъединениясхемызапроса типпараметрадоступнойтаблицысхемызапроса типсоединениясхемызапроса httpметод автоиспользованиеобщегореквизита автопрефиксномеразадачи вариантвстроенногоязыка видиерархии видрегистранакопления видтаблицывнешнегоисточникаданных записьдвиженийприпроведении заполнениепоследовательностей индексирование использованиебазыпланавидоврасчета использованиебыстроговыбора использованиеобщегореквизита использованиеподчинения использованиеполнотекстовогопоиска использованиеразделяемыхданныхобщегореквизита использованиереквизита назначениеиспользованияприложения назначениерасширенияконфигурации направлениепередачи обновлениепредопределенныхданных оперативноепроведение основноепредставлениевидарасчета основноепредставлениевидахарактеристики основноепредставлениезадачи основноепредставлениепланаобмена основноепредставлениесправочника основноепредставлениесчета перемещениеграницыприпроведении периодичностьномерабизнеспроцесса периодичностьномерадокумента периодичностьрегистрарасчета периодичностьрегистрасведений повторноеиспользованиевозвращаемыхзначений полнотекстовыйпоискпривводепостроке принадлежностьобъекта проведение разделениеаутентификацииобщегореквизита разделениеданныхобщегореквизита разделениерасширенийконфигурацииобщегореквизита режимавтонумерацииобъектов режимзаписирегистра режимиспользованиямодальности режимиспользованиясинхронныхвызововрасширенийплатформыивнешнихкомпонент режимповторногоиспользованиясеансов режимполученияданныхвыборапривводепостроке режимсовместимости режимсовместимостиинтерфейса режимуправленияблокировкойданныхпоумолчанию сериикодовпланавидовхарактеристик сериикодовпланасчетов сериикодовсправочника созданиепривводе способвыбора способпоискастрокипривводепостроке способредактирования типданныхтаблицывнешнегоисточникаданных типкодапланавидоврасчета типкодасправочника типмакета типномерабизнеспроцесса типномерадокумента типномеразадачи типформы удалениедвижений важностьпроблемыприменениярасширенияконфигурации вариантинтерфейсаклиентскогоприложения вариантмасштабаформклиентскогоприложения вариантосновногошрифтаклиентскогоприложения вариантстандартногопериода вариантстандартнойдатыначала видграницы видкартинки видотображенияполнотекстовогопоиска видрамки видсравнения видцвета видчисловогозначения видшрифта допустимаядлина допустимыйзнак использованиеbyteordermark использованиеметаданныхполнотекстовогопоиска источникрасширенийконфигурации клавиша кодвозвратадиалога кодировкаxbase кодировкатекста направлениепоиска направлениесортировки обновлениепредопределенныхданных обновлениеприизмененииданных отображениепанелиразделов проверказаполнения режимдиалогавопрос режимзапускаклиентскогоприложения режимокругления режимоткрытияформприложения режимполнотекстовогопоиска скоростьклиентскогосоединения состояниевнешнегоисточникаданных состояниеобновленияконфигурациибазыданных способвыборасертификатаwindows способкодированиястроки статуссообщения типвнешнейкомпоненты типплатформы типповеденияклавишиenter типэлементаинформацииовыполненииобновленияконфигурациибазыданных уровеньизоляциитранзакций хешфункция частидаты",type:"comобъект ftpсоединение httpзапрос httpсервисответ httpсоединение wsопределения wsпрокси xbase анализданных аннотацияxs блокировкаданных буфердвоичныхданных включениеxs выражениекомпоновкиданных генераторслучайныхчисел географическаясхема географическиекоординаты графическаясхема группамоделиxs данныерасшифровкикомпоновкиданных двоичныеданные дендрограмма диаграмма диаграммаганта диалогвыборафайла диалогвыборацвета диалогвыборашрифта диалограсписаниярегламентногозадания диалогредактированиястандартногопериода диапазон документdom документhtml документацияxs доставляемоеуведомление записьdom записьfastinfoset записьhtml записьjson записьxml записьzipфайла записьданных записьтекста записьузловdom запрос защищенноесоединениеopenssl значенияполейрасшифровкикомпоновкиданных извлечениетекста импортxs интернетпочта интернетпочтовоесообщение интернетпочтовыйпрофиль интернетпрокси интернетсоединение информациядляприложенияxs использованиеатрибутаxs использованиесобытияжурналарегистрации источникдоступныхнастроеккомпоновкиданных итераторузловdom картинка квалификаторыдаты квалификаторыдвоичныхданных квалификаторыстроки квалификаторычисла компоновщикмакетакомпоновкиданных компоновщикнастроеккомпоновкиданных конструктормакетаоформлениякомпоновкиданных конструкторнастроеккомпоновкиданных конструкторформатнойстроки линия макеткомпоновкиданных макетобластикомпоновкиданных макетоформлениякомпоновкиданных маскаxs менеджеркриптографии наборсхемxml настройкикомпоновкиданных настройкисериализацииjson обработкакартинок обработкарасшифровкикомпоновкиданных обходдереваdom объявлениеатрибутаxs объявлениенотацииxs объявлениеэлементаxs описаниеиспользованиясобытиядоступжурналарегистрации описаниеиспользованиясобытияотказвдоступежурналарегистрации описаниеобработкирасшифровкикомпоновкиданных описаниепередаваемогофайла описаниетипов определениегруппыатрибутовxs определениегруппымоделиxs определениеограниченияидентичностиxs определениепростоготипаxs определениесоставноготипаxs определениетипадокументаdom определенияxpathxs отборкомпоновкиданных пакетотображаемыхдокументов параметрвыбора параметркомпоновкиданных параметрызаписиjson параметрызаписиxml параметрычтенияxml переопределениеxs планировщик полеанализаданных полекомпоновкиданных построительdom построительзапроса построительотчета построительотчетаанализаданных построительсхемxml поток потоквпамяти почта почтовоесообщение преобразованиеxsl преобразованиекканоническомуxml процессорвыводарезультатакомпоновкиданныхвколлекциюзначений процессорвыводарезультатакомпоновкиданныхвтабличныйдокумент процессоркомпоновкиданных разыменовательпространствименdom рамка расписаниерегламентногозадания расширенноеимяxml результатчтенияданных своднаядиаграмма связьпараметравыбора связьпотипу связьпотипукомпоновкиданных сериализаторxdto сертификатклиентаwindows сертификатклиентафайл сертификаткриптографии сертификатыудостоверяющихцентровwindows сертификатыудостоверяющихцентровфайл сжатиеданных системнаяинформация сообщениепользователю сочетаниеклавиш сравнениезначений стандартнаядатаначала стандартныйпериод схемаxml схемакомпоновкиданных табличныйдокумент текстовыйдокумент тестируемоеприложение типданныхxml уникальныйидентификатор фабрикаxdto файл файловыйпоток фасетдлиныxs фасетколичестваразрядовдробнойчастиxs фасетмаксимальноговключающегозначенияxs фасетмаксимальногоисключающегозначенияxs фасетмаксимальнойдлиныxs фасетминимальноговключающегозначенияxs фасетминимальногоисключающегозначенияxs фасетминимальнойдлиныxs фасетобразцаxs фасетобщегоколичестваразрядовxs фасетперечисленияxs фасетпробельныхсимволовxs фильтрузловdom форматированнаястрока форматированныйдокумент фрагментxs хешированиеданных хранилищезначения цвет чтениеfastinfoset чтениеhtml чтениеjson чтениеxml чтениеzipфайла чтениеданных чтениетекста чтениеузловdom шрифт элементрезультатакомпоновкиданных comsafearray деревозначений массив соответствие списокзначений структура таблицазначений фиксированнаяструктура фиксированноесоответствие фиксированныймассив ",literal:r},contains:[{className:"meta",begin:"#|&",end:"$",keywords:{$pattern:t,keyword:n+"загрузитьизфайла вебклиент вместо внешнеесоединение клиент конецобласти мобильноеприложениеклиент мобильноеприложениесервер наклиенте наклиентенасервере наклиентенасерверебезконтекста насервере насерверебезконтекста область перед после сервер толстыйклиентобычноеприложение толстыйклиентуправляемоеприложение тонкийклиент "},contains:[s]},{className:"function",variants:[{begin:"процедура|функция",end:"\\)",keywords:"процедура функция"},{begin:"конецпроцедуры|конецфункции",keywords:"конецпроцедуры конецфункции"}],contains:[{begin:"\\(",end:"\\)",endsParent:!0,contains:[{className:"params",begin:t,end:",",excludeEnd:!0,endsWithParent:!0,keywords:{$pattern:t,keyword:"знач",literal:r},contains:[i,o,a]},s]},e.inherit(e.TITLE_MODE,{begin:t})]},s,{className:"symbol",begin:"~",end:";|:",excludeEnd:!0},i,o,a]}}},function(e,t){e.exports=function(e){const t=e.regex,n=e.COMMENT(/;/,/$/);return{name:"Augmented Backus-Naur Form",illegal:/[!@#$^&',?+~`|:]/,keywords:["ALPHA","BIT","CHAR","CR","CRLF","CTL","DIGIT","DQUOTE","HEXDIG","HTAB","LF","LWSP","OCTET","SP","VCHAR","WSP"],contains:[{scope:"operator",match:/=\/?/},{scope:"attribute",match:t.concat(/^[a-zA-Z][a-zA-Z0-9-]*/,/(?=\s*=)/)},n,{scope:"symbol",match:/%b[0-1]+(-[0-1]+|(\.[0-1]+)+)?/},{scope:"symbol",match:/%d[0-9]+(-[0-9]+|(\.[0-9]+)+)?/},{scope:"symbol",match:/%x[0-9A-F]+(-[0-9A-F]+|(\.[0-9A-F]+)+)?/},{scope:"symbol",match:/%[si](?=".*")/},e.QUOTE_STRING_MODE,e.NUMBER_MODE]}}},function(e,t){e.exports=function(e){const t=e.regex,n=["GET","POST","HEAD","PUT","DELETE","CONNECT","OPTIONS","PATCH","TRACE"];return{name:"Apache Access Log",contains:[{className:"number",begin:/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(:\d{1,5})?\b/,relevance:5},{className:"number",begin:/\b\d+\b/,relevance:0},{className:"string",begin:t.concat(/"/,t.either(...n)),end:/"/,keywords:n,illegal:/\n/,relevance:5,contains:[{begin:/HTTP\/[12]\.\d'/,relevance:5}]},{className:"string",begin:/\[\d[^\]\n]{8,}\]/,illegal:/\n/,relevance:1},{className:"string",begin:/\[/,end:/\]/,illegal:/\n/,relevance:0},{className:"string",begin:/"Mozilla\/\d\.\d \(/,end:/"/,illegal:/\n/,relevance:3},{className:"string",begin:/"/,end:/"/,illegal:/\n/,relevance:0}]}}},function(e,t){e.exports=function(e){const t=e.regex,n=/[a-zA-Z_$][a-zA-Z0-9_$]*/,r=t.concat(n,t.concat("(\\.",n,")*")),i={className:"rest_arg",begin:/[.]{3}/,end:n,relevance:10};return{name:"ActionScript",aliases:["as"],keywords:{keyword:["as","break","case","catch","class","const","continue","default","delete","do","dynamic","each","else","extends","final","finally","for","function","get","if","implements","import","in","include","instanceof","interface","internal","is","namespace","native","new","override","package","private","protected","public","return","set","static","super","switch","this","throw","try","typeof","use","var","void","while","with"],literal:["true","false","null","undefined"]},contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,{match:[/\bpackage/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{match:[/\b(?:class|interface|extends|implements)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{className:"meta",beginKeywords:"import include",end:/;/,keywords:{keyword:"import include"}},{beginKeywords:"function",end:/[{;]/,excludeEnd:!0,illegal:/\S/,contains:[e.inherit(e.TITLE_MODE,{className:"title.function"}),{className:"params",begin:/\(/,end:/\)/,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,i]},{begin:t.concat(/:\s*/,/([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)/)}]},e.METHOD_GUARD],illegal:/#/}}},function(e,t){e.exports=function(e){const t="\\d(_|\\d)*",n="[eE][-+]?"+t,r="\\b("+(t+"#\\w+(\\.\\w+)?#("+n+")?")+"|"+(t+"(\\."+t+")?("+n+")?")+")",i="[A-Za-z](_?[A-Za-z0-9.])*",o="[]\\{\\}%#'\"",a=e.COMMENT("--","$"),s={begin:"\\s+:\\s+",end:"\\s*(:=|;|\\)|=>|$)",illegal:o,contains:[{beginKeywords:"loop for declare others",endsParent:!0},{className:"keyword",beginKeywords:"not null constant access function procedure in out aliased exception"},{className:"type",begin:i,endsParent:!0,relevance:0}]};return{name:"Ada",case_insensitive:!0,keywords:{keyword:["abort","else","new","return","abs","elsif","not","reverse","abstract","end","accept","entry","select","access","exception","of","separate","aliased","exit","or","some","all","others","subtype","and","for","out","synchronized","array","function","overriding","at","tagged","generic","package","task","begin","goto","pragma","terminate","body","private","then","if","procedure","type","case","in","protected","constant","interface","is","raise","use","declare","range","delay","limited","record","when","delta","loop","rem","while","digits","renames","with","do","mod","requeue","xor"],literal:["True","False"]},contains:[a,{className:"string",begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{className:"string",begin:/'.'/},{className:"number",begin:r,relevance:0},{className:"symbol",begin:"'"+i},{className:"title",begin:"(\\bwith\\s+)?(\\bprivate\\s+)?\\bpackage\\s+(\\bbody\\s+)?",end:"(is|$)",keywords:"package body",excludeBegin:!0,excludeEnd:!0,illegal:o},{begin:"(\\b(with|overriding)\\s+)?\\b(function|procedure)\\s+",end:"(\\bis|\\bwith|\\brenames|\\)\\s*;)",keywords:"overriding function procedure with is renames return",returnBegin:!0,contains:[a,{className:"title",begin:"(\\bwith\\s+)?\\b(function|procedure)\\s+",end:"(\\(|\\s+|$)",excludeBegin:!0,excludeEnd:!0,illegal:o},s,{className:"type",begin:"\\breturn\\s+",end:"(\\s+|;|$)",keywords:"return",excludeBegin:!0,excludeEnd:!0,endsParent:!0,illegal:o}]},{className:"type",begin:"\\b(sub)?type\\s+",end:"\\s+",keywords:"type",excludeBegin:!0,illegal:o},s]}}},function(e,t){e.exports=function(e){const t={className:"built_in",begin:"\\b(void|bool|int8|int16|int32|int64|int|uint8|uint16|uint32|uint64|uint|string|ref|array|double|float|auto|dictionary)"},n={className:"symbol",begin:"[a-zA-Z0-9_]+@"},r={className:"keyword",begin:"<",end:">",contains:[t,n]};return t.contains=[r],n.contains=[r],{name:"AngelScript",aliases:["asc"],keywords:["for","in|0","break","continue","while","do|0","return","if","else","case","switch","namespace","is","cast","or","and","xor","not","get|0","in","inout|10","out","override","set|0","private","public","const","default|0","final","shared","external","mixin|10","enum","typedef","funcdef","this","super","import","from","interface","abstract|0","try","catch","protected","explicit","property"],illegal:"(^using\\s+[A-Za-z0-9_\\.]+;$|\\bfunction\\s*[^\\(])",contains:[{className:"string",begin:"'",end:"'",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE],relevance:0},{className:"string",begin:'"""',end:'"""'},{className:"string",begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE],relevance:0},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",begin:"^\\s*\\[",end:"\\]"},{beginKeywords:"interface namespace",end:/\{/,illegal:"[;.\\-]",contains:[{className:"symbol",begin:"[a-zA-Z0-9_]+"}]},{beginKeywords:"class",end:/\{/,illegal:"[;.\\-]",contains:[{className:"symbol",begin:"[a-zA-Z0-9_]+",contains:[{begin:"[:,]\\s*",contains:[{className:"symbol",begin:"[a-zA-Z0-9_]+"}]}]}]},t,n,{className:"literal",begin:"\\b(null|true|false)"},{className:"number",relevance:0,begin:"(-?)(\\b0[xXbBoOdD][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?f?|\\.\\d+f?)([eE][-+]?\\d+f?)?)"}]}}},function(e,t){e.exports=function(e){const t={className:"number",begin:/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(:\d{1,5})?/};return{name:"Apache config",aliases:["apacheconf"],case_insensitive:!0,contains:[e.HASH_COMMENT_MODE,{className:"section",begin:/<\/?/,end:/>/,contains:[t,{className:"number",begin:/:\d{1,5}/},e.inherit(e.QUOTE_STRING_MODE,{relevance:0})]},{className:"attribute",begin:/\w+/,relevance:0,keywords:{_:["order","deny","allow","setenv","rewriterule","rewriteengine","rewritecond","documentroot","sethandler","errordocument","loadmodule","options","header","listen","serverroot","servername"]},starts:{end:/$/,relevance:0,keywords:{literal:"on off all deny allow"},contains:[{className:"meta",begin:/\s\[/,end:/\]$/},{className:"variable",begin:/[\$%]\{/,end:/\}/,contains:["self",{className:"number",begin:/[$%]\d+/}]},t,{className:"number",begin:/\b\d+/},e.QUOTE_STRING_MODE]}}],illegal:/\S/}}},function(e,t){e.exports=function(e){const t=e.regex,n=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),r={className:"params",begin:/\(/,end:/\)/,contains:["self",e.C_NUMBER_MODE,n]},i=e.COMMENT(/--/,/$/),o=[i,e.COMMENT(/\(\*/,/\*\)/,{contains:["self",i]}),e.HASH_COMMENT_MODE];return{name:"AppleScript",aliases:["osascript"],keywords:{keyword:"about above after against and around as at back before beginning behind below beneath beside between but by considering contain contains continue copy div does eighth else end equal equals error every exit fifth first for fourth from front get given global if ignoring in into is it its last local me middle mod my ninth not of on onto or over prop property put ref reference repeat returning script second set seventh since sixth some tell tenth that the|0 then third through thru timeout times to transaction try until where while whose with without",literal:"AppleScript false linefeed return pi quote result space tab true",built_in:"alias application boolean class constant date file integer list number real record string text activate beep count delay launch log offset read round run say summarize write character characters contents day frontmost id item length month name|0 paragraph paragraphs rest reverse running time version weekday word words year"},contains:[n,e.C_NUMBER_MODE,{className:"built_in",begin:t.concat(/\b/,t.either(/clipboard info/,/the clipboard/,/info for/,/list (disks|folder)/,/mount volume/,/path to/,/(close|open for) access/,/(get|set) eof/,/current date/,/do shell script/,/get volume settings/,/random number/,/set volume/,/system attribute/,/system info/,/time to GMT/,/(load|run|store) script/,/scripting components/,/ASCII (character|number)/,/localized string/,/choose (application|color|file|file name|folder|from list|remote application|URL)/,/display (alert|dialog)/),/\b/)},{className:"built_in",begin:/^\s*return\b/},{className:"literal",begin:/\b(text item delimiters|current application|missing value)\b/},{className:"keyword",begin:t.concat(/\b/,t.either(/apart from/,/aside from/,/instead of/,/out of/,/greater than/,/isn't|(doesn't|does not) (equal|come before|come after|contain)/,/(greater|less) than( or equal)?/,/(starts?|ends|begins?) with/,/contained by/,/comes (before|after)/,/a (ref|reference)/,/POSIX (file|path)/,/(date|time) string/,/quoted form/),/\b/)},{beginKeywords:"on",illegal:/[${=;\n]/,contains:[e.UNDERSCORE_TITLE_MODE,r]},...o],illegal:/\/\/|->|=>|\[\[/}}},function(e,t){e.exports=function(e){const t="[A-Za-z_][0-9A-Za-z_]*",n={keyword:["if","for","while","var","new","function","do","return","void","else","break"],literal:["BackSlash","DoubleQuote","false","ForwardSlash","Infinity","NaN","NewLine","null","PI","SingleQuote","Tab","TextFormatting","true","undefined"],built_in:["Abs","Acos","All","Angle","Any","Area","AreaGeodetic","Array","Asin","Atan","Atan2","Attachments","Average","Back","Bearing","Boolean","Buffer","BufferGeodetic","Ceil","Centroid","Clip","Concatenate","Console","Constrain","Contains","ConvertDirection","Cos","Count","Crosses","Cut","Date","DateAdd","DateDiff","Day","Decode","DefaultValue","Densify","DensifyGeodetic","Dictionary","Difference","Disjoint","Distance","DistanceGeodetic","Distinct","Domain","DomainCode","DomainName","EnvelopeIntersects","Equals","Erase","Exp","Expects","Extent","Feature","FeatureSet","FeatureSetByAssociation","FeatureSetById","FeatureSetByName","FeatureSetByPortalItem","FeatureSetByRelationshipName","Filter","Find","First","Floor","FromCharCode","FromCodePoint","FromJSON","GdbVersion","Generalize","Geometry","GetFeatureSet","GetUser","GroupBy","Guid","Hash","HasKey","Hour","IIf","Includes","IndexOf","Insert","Intersection","Intersects","IsEmpty","IsNan","ISOMonth","ISOWeek","ISOWeekday","ISOYear","IsSelfIntersecting","IsSimple","Left|0","Length","Length3D","LengthGeodetic","Log","Lower","Map","Max","Mean","Mid","Millisecond","Min","Minute","Month","MultiPartToSinglePart","Multipoint","NextSequenceValue","None","Now","Number","Offset|0","OrderBy","Overlaps","Point","Polygon","Polyline","Pop","Portal","Pow","Proper","Push","Random","Reduce","Relate","Replace","Resize","Reverse","Right|0","RingIsClockwise","Rotate","Round","Schema","Second","SetGeometry","Simplify","Sin","Slice","Sort","Splice","Split","Sqrt","Stdev","SubtypeCode","SubtypeName","Subtypes","Sum","SymmetricDifference","Tan","Text","Timestamp","ToCharCode","ToCodePoint","Today","ToHex","ToLocal","Top|0","Touches","ToUTC","TrackAccelerationAt","TrackAccelerationWindow","TrackCurrentAcceleration","TrackCurrentDistance","TrackCurrentSpeed","TrackCurrentTime","TrackDistanceAt","TrackDistanceWindow","TrackDuration","TrackFieldWindow","TrackGeometryWindow","TrackIndex","TrackSpeedAt","TrackSpeedWindow","TrackStartTime","TrackWindow","Trim","TypeOf","Union","Upper","UrlEncode","Variance","Week","Weekday","When","Within","Year"]},r={className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:e.C_NUMBER_RE}],relevance:0},i={className:"subst",begin:"\\$\\{",end:"\\}",keywords:n,contains:[]},o={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,i]};i.contains=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,o,r,e.REGEXP_MODE];const a=i.contains.concat([e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]);return{name:"ArcGIS Arcade",case_insensitive:!0,keywords:n,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,o,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"symbol",begin:"\\$[datastore|feature|layer|map|measure|sourcefeature|sourcelayer|targetfeature|targetlayer|value|view]+"},r,{begin:/[{,]\s*/,relevance:0,contains:[{begin:t+"\\s*:",returnBegin:!0,relevance:0,contains:[{className:"attr",begin:t,relevance:0}]}]},{begin:"("+e.RE_STARTERS_RE+"|\\b(return)\\b)\\s*",keywords:"return",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.REGEXP_MODE,{className:"function",begin:"(\\(.*?\\)|"+t+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t},{begin:/\(\s*\)/},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:n,contains:a}]}]}],relevance:0},{beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{className:"title.function",begin:t}),{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:a}],illegal:/\[|%/},{begin:/\$[(.]/}],illegal:/#(?!!)/}}},function(e,t){e.exports=function(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="(?!struct)("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",a={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},s={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(s,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},u={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},d=t.optional(i)+e.IDENT_RE+"\\s*\\(",h={type:["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],keyword:["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"]},p={className:"function.dispatch",relevance:0,keywords:{_hint:["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"]},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},m=[p,c,a,n,e.C_BLOCK_COMMENT_MODE,l,s],g={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:h,contains:m.concat([{begin:/\(/,end:/\)/,keywords:h,contains:m.concat(["self"]),relevance:0}]),relevance:0},f={className:"function",begin:"("+o+"[\\*&\\s]+)+"+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:h,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:h,relevance:0},{begin:d,returnBegin:!0,contains:[u],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[s,l]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,s,l,a,{begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,s,l,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:h,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(g,f,p,m,[c,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function)\\s*<(?!<)",end:">",keywords:h,contains:["self",a]},{begin:e.IDENT_RE+"::",keywords:h},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}},function(e,t){e.exports=function(e){const t={variants:[e.COMMENT("^[ \\t]*(?=#)","$",{relevance:0,excludeBegin:!0}),e.COMMENT("[;@]","$",{relevance:0}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]};return{name:"ARM Assembly",case_insensitive:!0,aliases:["arm"],keywords:{$pattern:"\\.?"+e.IDENT_RE,meta:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .arm .thumb .code16 .code32 .force_thumb .thumb_func .ltorg ALIAS ALIGN ARM AREA ASSERT ATTR CN CODE CODE16 CODE32 COMMON CP DATA DCB DCD DCDU DCDO DCFD DCFDU DCI DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FUNCTION GBLA GBLL GBLS GET GLOBAL IF IMPORT INCBIN INCLUDE INFO KEEP LCLA LCLL LCLS LTORG MACRO MAP MEND MEXIT NOFP OPT PRESERVE8 PROC QN READONLY RELOC REQUIRE REQUIRE8 RLIST FN ROUT SETA SETL SETS SN SPACE SUBT THUMB THUMBX TTL WHILE WEND ",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 pc lr sp ip sl sb fp a1 a2 a3 a4 v1 v2 v3 v4 v5 v6 v7 v8 f0 f1 f2 f3 f4 f5 f6 f7 p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14 q15 cpsr_c cpsr_x cpsr_s cpsr_f cpsr_cx cpsr_cxs cpsr_xs cpsr_xsf cpsr_sf cpsr_cxsf spsr_c spsr_x spsr_s spsr_f spsr_cx spsr_cxs spsr_xs spsr_xsf spsr_sf spsr_cxsf s0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 {PC} {VAR} {TRUE} {FALSE} {OPT} {CONFIG} {ENDIAN} {CODESIZE} {CPU} {FPU} {ARCHITECTURE} {PCSTOREOFFSET} {ARMASM_VERSION} {INTER} {ROPI} {RWPI} {SWST} {NOSWST} . @"},contains:[{className:"keyword",begin:"\\b(adc|(qd?|sh?|u[qh]?)?add(8|16)?|usada?8|(q|sh?|u[qh]?)?(as|sa)x|and|adrl?|sbc|rs[bc]|asr|b[lx]?|blx|bxj|cbn?z|tb[bh]|bic|bfc|bfi|[su]bfx|bkpt|cdp2?|clz|clrex|cmp|cmn|cpsi[ed]|cps|setend|dbg|dmb|dsb|eor|isb|it[te]{0,3}|lsl|lsr|ror|rrx|ldm(([id][ab])|f[ds])?|ldr((s|ex)?[bhd])?|movt?|mvn|mra|mar|mul|[us]mull|smul[bwt][bt]|smu[as]d|smmul|smmla|mla|umlaal|smlal?([wbt][bt]|d)|mls|smlsl?[ds]|smc|svc|sev|mia([bt]{2}|ph)?|mrr?c2?|mcrr2?|mrs|msr|orr|orn|pkh(tb|bt)|rbit|rev(16|sh)?|sel|[su]sat(16)?|nop|pop|push|rfe([id][ab])?|stm([id][ab])?|str(ex)?[bhd]?|(qd?)?sub|(sh?|q|u[qh]?)?sub(8|16)|[su]xt(a?h|a?b(16)?)|srs([id][ab])?|swpb?|swi|smi|tst|teq|wfe|wfi|yield)(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo)?[sptrx]?(?=\\s)"},t,e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",relevance:0},{className:"title",begin:"\\|",end:"\\|",illegal:"\\n",relevance:0},{className:"number",variants:[{begin:"[#$=]?0x[0-9a-f]+"},{begin:"[#$=]?0b[01]+"},{begin:"[#$=]\\d+"},{begin:"\\b\\d+"}],relevance:0},{className:"symbol",variants:[{begin:"^[ \\t]*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{begin:"^[a-z_\\.\\$][a-z0-9_\\.\\$]+"},{begin:"[=#]\\w+"}],relevance:0}]}}},function(e,t){e.exports=function(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},i={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(i,{begin:/\(/,end:/\)/}),a=e.inherit(e.APOS_STRING_MODE,{className:"string"}),s=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:/[\p{L}0-9._:-]+/u,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[r]},{begin:/'/,end:/'/,contains:[r]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[i,s,a,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[i,o,s,a]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},r,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[s]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:l}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}},function(e,t){e.exports=function(e){const t=e.regex,n=[{className:"strong",begin:/\*{2}([^\n]+?)\*{2}/},{className:"strong",begin:t.concat(/\*\*/,/((\*(?!\*)|\\[^\n]|[^*\n\\])+\n)+/,/(\*(?!\*)|\\[^\n]|[^*\n\\])*/,/\*\*/),relevance:0},{className:"strong",begin:/\B\*(\S|\S[^\n]*?\S)\*(?!\w)/},{className:"strong",begin:/\*[^\s]([^\n]+\n)+([^\n]+)\*/}],r=[{className:"emphasis",begin:/_{2}([^\n]+?)_{2}/},{className:"emphasis",begin:t.concat(/__/,/((_(?!_)|\\[^\n]|[^_\n\\])+\n)+/,/(_(?!_)|\\[^\n]|[^_\n\\])*/,/__/),relevance:0},{className:"emphasis",begin:/\b_(\S|\S[^\n]*?\S)_(?!\w)/},{className:"emphasis",begin:/_[^\s]([^\n]+\n)+([^\n]+)_/},{className:"emphasis",begin:"\\B'(?!['\\s])",end:"(\\n{2}|')",contains:[{begin:"\\\\'\\w",relevance:0}],relevance:0}];return{name:"AsciiDoc",aliases:["adoc"],contains:[e.COMMENT("^/{4,}\\n","\\n/{4,}$",{relevance:10}),e.COMMENT("^//","$",{relevance:0}),{className:"title",begin:"^\\.\\w.*$"},{begin:"^[=\\*]{4,}\\n",end:"\\n^[=\\*]{4,}$",relevance:10},{className:"section",relevance:10,variants:[{begin:"^(={1,6})[ \t].+?([ \t]\\1)?$"},{begin:"^[^\\[\\]\\n]+?\\n[=\\-~\\^\\+]{2,}$"}]},{className:"meta",begin:"^:.+?:",end:"\\s",excludeEnd:!0,relevance:10},{className:"meta",begin:"^\\[.+?\\]$",relevance:0},{className:"quote",begin:"^_{4,}\\n",end:"\\n_{4,}$",relevance:10},{className:"code",begin:"^[\\-\\.]{4,}\\n",end:"\\n[\\-\\.]{4,}$",relevance:10},{begin:"^\\+{4,}\\n",end:"\\n\\+{4,}$",contains:[{begin:"<",end:">",subLanguage:"xml",relevance:0}],relevance:10},{className:"bullet",begin:"^(\\*+|-+|\\.+|[^\\n]+?::)\\s+"},{className:"symbol",begin:"^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\s+",relevance:10},{begin:/\\[*_`]/},{begin:/\\\\\*{2}[^\n]*?\*{2}/},{begin:/\\\\_{2}[^\n]*_{2}/},{begin:/\\\\`{2}[^\n]*`{2}/},{begin:/[:;}][*_`](?![*_`])/},...n,...r,{className:"string",variants:[{begin:"``.+?''"},{begin:"`.+?'"}]},{className:"code",begin:/`{2}/,end:/(\n{2}|`{2})/},{className:"code",begin:"(`.+?`|\\+.+?\\+)",relevance:0},{className:"code",begin:"^[ \\t]",end:"$",relevance:0},{begin:"^'{3,}[ \\t]*$",relevance:10},{begin:"(link:)?(http|https|ftp|file|irc|image:?):\\S+?\\[[^[]*?\\]",returnBegin:!0,contains:[{begin:"(link|image:?):",relevance:0},{className:"link",begin:"\\w",end:"[^\\[]+",relevance:0},{className:"string",begin:"\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0,relevance:0}],relevance:10}]}}},function(e,t){e.exports=function(e){const t=e.regex,n=["false","synchronized","int","abstract","float","private","char","boolean","static","null","if","const","for","true","while","long","throw","strictfp","finally","protected","import","native","final","return","void","enum","else","extends","implements","break","transient","new","catch","instanceof","byte","super","volatile","case","assert","short","package","default","double","public","try","this","switch","continue","throws","privileged","aspectOf","adviceexecution","proceed","cflowbelow","cflow","initialization","preinitialization","staticinitialization","withincode","target","within","execution","getWithinTypeName","handler","thisJoinPoint","thisJoinPointStaticPart","thisEnclosingJoinPointStaticPart","declare","parents","warning","error","soft","precedence","thisAspectInstance"],r=["get","set","args","call"];return{name:"AspectJ",keywords:n,illegal:/<\/|#/,contains:[e.COMMENT(/\/\*\*/,/\*\//,{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:/@[A-Za-z]+/}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"class",beginKeywords:"aspect",end:/[{;=]/,excludeEnd:!0,illegal:/[:;"\[\]]/,contains:[{beginKeywords:"extends implements pertypewithin perthis pertarget percflowbelow percflow issingleton"},e.UNDERSCORE_TITLE_MODE,{begin:/\([^\)]*/,end:/[)]+/,keywords:n.concat(r),excludeEnd:!1}]},{className:"class",beginKeywords:"class interface",end:/[{;=]/,excludeEnd:!0,relevance:0,keywords:"class interface",illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"pointcut after before around throwing returning",end:/[)]/,excludeEnd:!1,illegal:/["\[\]]/,contains:[{begin:t.concat(e.UNDERSCORE_IDENT_RE,/\s*\(/),returnBegin:!0,contains:[e.UNDERSCORE_TITLE_MODE]}]},{begin:/[:]/,returnBegin:!0,end:/[{;]/,relevance:0,excludeEnd:!1,keywords:n,illegal:/["\[\]]/,contains:[{begin:t.concat(e.UNDERSCORE_IDENT_RE,/\s*\(/),keywords:n.concat(r),relevance:0},e.QUOTE_STRING_MODE]},{beginKeywords:"new throw",relevance:0},{className:"function",begin:/\w+ +\w+(\.\w+)?\s*\([^\)]*\)\s*((throws)[\w\s,]+)?[\{;]/,returnBegin:!0,end:/[{;=]/,keywords:n,excludeEnd:!0,contains:[{begin:t.concat(e.UNDERSCORE_IDENT_RE,/\s*\(/),returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,relevance:0,keywords:n,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_NUMBER_MODE,{className:"meta",begin:/@[A-Za-z]+/}]}}},function(e,t){e.exports=function(e){const t={begin:"`[\\s\\S]"};return{name:"AutoHotkey",case_insensitive:!0,aliases:["ahk"],keywords:{keyword:"Break Continue Critical Exit ExitApp Gosub Goto New OnExit Pause return SetBatchLines SetTimer Suspend Thread Throw Until ahk_id ahk_class ahk_pid ahk_exe ahk_group",literal:"true false NOT AND OR",built_in:"ComSpec Clipboard ClipboardAll ErrorLevel"},contains:[t,e.inherit(e.QUOTE_STRING_MODE,{contains:[t]}),e.COMMENT(";","$",{relevance:0}),e.C_BLOCK_COMMENT_MODE,{className:"number",begin:e.NUMBER_RE,relevance:0},{className:"variable",begin:"%[a-zA-Z0-9#_$@]+%"},{className:"built_in",begin:"^\\s*\\w+\\s*(,|%)"},{className:"title",variants:[{begin:'^[^\\n";]+::(?!=)'},{begin:'^[^\\n";]+:(?!=)',relevance:0}]},{className:"meta",begin:"^\\s*#\\w+",end:"$",relevance:0},{className:"built_in",begin:"A_[a-zA-Z0-9]+"},{begin:",\\s*,"}]}}},function(e,t){e.exports=function(e){const t={variants:[e.COMMENT(";","$",{relevance:0}),e.COMMENT("#cs","#ce"),e.COMMENT("#comments-start","#comments-end")]},n={begin:"\\$[A-z0-9_]+"},r={className:"string",variants:[{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]},i={variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]};return{name:"AutoIt",case_insensitive:!0,illegal:/\/\*/,keywords:{keyword:"ByRef Case Const ContinueCase ContinueLoop Dim Do Else ElseIf EndFunc EndIf EndSelect EndSwitch EndWith Enum Exit ExitLoop For Func Global If In Local Next ReDim Return Select Static Step Switch Then To Until Volatile WEnd While With",built_in:"Abs ACos AdlibRegister AdlibUnRegister Asc AscW ASin Assign ATan AutoItSetOption AutoItWinGetTitle AutoItWinSetTitle Beep Binary BinaryLen BinaryMid BinaryToString BitAND BitNOT BitOR BitRotate BitShift BitXOR BlockInput Break Call CDTray Ceiling Chr ChrW ClipGet ClipPut ConsoleRead ConsoleWrite ConsoleWriteError ControlClick ControlCommand ControlDisable ControlEnable ControlFocus ControlGetFocus ControlGetHandle ControlGetPos ControlGetText ControlHide ControlListView ControlMove ControlSend ControlSetText ControlShow ControlTreeView Cos Dec DirCopy DirCreate DirGetSize DirMove DirRemove DllCall DllCallAddress DllCallbackFree DllCallbackGetPtr DllCallbackRegister DllClose DllOpen DllStructCreate DllStructGetData DllStructGetPtr DllStructGetSize DllStructSetData DriveGetDrive DriveGetFileSystem DriveGetLabel DriveGetSerial DriveGetType DriveMapAdd DriveMapDel DriveMapGet DriveSetLabel DriveSpaceFree DriveSpaceTotal DriveStatus EnvGet EnvSet EnvUpdate Eval Execute Exp FileChangeDir FileClose FileCopy FileCreateNTFSLink FileCreateShortcut FileDelete FileExists FileFindFirstFile FileFindNextFile FileFlush FileGetAttrib FileGetEncoding FileGetLongName FileGetPos FileGetShortcut FileGetShortName FileGetSize FileGetTime FileGetVersion FileInstall FileMove FileOpen FileOpenDialog FileRead FileReadLine FileReadToArray FileRecycle FileRecycleEmpty FileSaveDialog FileSelectFolder FileSetAttrib FileSetEnd FileSetPos FileSetTime FileWrite FileWriteLine Floor FtpSetProxy FuncName GUICreate GUICtrlCreateAvi GUICtrlCreateButton GUICtrlCreateCheckbox GUICtrlCreateCombo GUICtrlCreateContextMenu GUICtrlCreateDate GUICtrlCreateDummy GUICtrlCreateEdit GUICtrlCreateGraphic GUICtrlCreateGroup GUICtrlCreateIcon GUICtrlCreateInput GUICtrlCreateLabel GUICtrlCreateList GUICtrlCreateListView GUICtrlCreateListViewItem GUICtrlCreateMenu GUICtrlCreateMenuItem GUICtrlCreateMonthCal GUICtrlCreateObj GUICtrlCreatePic GUICtrlCreateProgress GUICtrlCreateRadio GUICtrlCreateSlider GUICtrlCreateTab GUICtrlCreateTabItem GUICtrlCreateTreeView GUICtrlCreateTreeViewItem GUICtrlCreateUpdown GUICtrlDelete GUICtrlGetHandle GUICtrlGetState GUICtrlRead GUICtrlRecvMsg GUICtrlRegisterListViewSort GUICtrlSendMsg GUICtrlSendToDummy GUICtrlSetBkColor GUICtrlSetColor GUICtrlSetCursor GUICtrlSetData GUICtrlSetDefBkColor GUICtrlSetDefColor GUICtrlSetFont GUICtrlSetGraphic GUICtrlSetImage GUICtrlSetLimit GUICtrlSetOnEvent GUICtrlSetPos GUICtrlSetResizing GUICtrlSetState GUICtrlSetStyle GUICtrlSetTip GUIDelete GUIGetCursorInfo GUIGetMsg GUIGetStyle GUIRegisterMsg GUISetAccelerators GUISetBkColor GUISetCoord GUISetCursor GUISetFont GUISetHelp GUISetIcon GUISetOnEvent GUISetState GUISetStyle GUIStartGroup GUISwitch Hex HotKeySet HttpSetProxy HttpSetUserAgent HWnd InetClose InetGet InetGetInfo InetGetSize InetRead IniDelete IniRead IniReadSection IniReadSectionNames IniRenameSection IniWrite IniWriteSection InputBox Int IsAdmin IsArray IsBinary IsBool IsDeclared IsDllStruct IsFloat IsFunc IsHWnd IsInt IsKeyword IsNumber IsObj IsPtr IsString Log MemGetStats Mod MouseClick MouseClickDrag MouseDown MouseGetCursor MouseGetPos MouseMove MouseUp MouseWheel MsgBox Number ObjCreate ObjCreateInterface ObjEvent ObjGet ObjName OnAutoItExitRegister OnAutoItExitUnRegister Ping PixelChecksum PixelGetColor PixelSearch ProcessClose ProcessExists ProcessGetStats ProcessList ProcessSetPriority ProcessWait ProcessWaitClose ProgressOff ProgressOn ProgressSet Ptr Random RegDelete RegEnumKey RegEnumVal RegRead RegWrite Round Run RunAs RunAsWait RunWait Send SendKeepActive SetError SetExtended ShellExecute ShellExecuteWait Shutdown Sin Sleep SoundPlay SoundSetWaveVolume SplashImageOn SplashOff SplashTextOn Sqrt SRandom StatusbarGetText StderrRead StdinWrite StdioClose StdoutRead String StringAddCR StringCompare StringFormat StringFromASCIIArray StringInStr StringIsAlNum StringIsAlpha StringIsASCII StringIsDigit StringIsFloat StringIsInt StringIsLower StringIsSpace StringIsUpper StringIsXDigit StringLeft StringLen StringLower StringMid StringRegExp StringRegExpReplace StringReplace StringReverse StringRight StringSplit StringStripCR StringStripWS StringToASCIIArray StringToBinary StringTrimLeft StringTrimRight StringUpper Tan TCPAccept TCPCloseSocket TCPConnect TCPListen TCPNameToIP TCPRecv TCPSend TCPShutdown, UDPShutdown TCPStartup, UDPStartup TimerDiff TimerInit ToolTip TrayCreateItem TrayCreateMenu TrayGetMsg TrayItemDelete TrayItemGetHandle TrayItemGetState TrayItemGetText TrayItemSetOnEvent TrayItemSetState TrayItemSetText TraySetClick TraySetIcon TraySetOnEvent TraySetPauseIcon TraySetState TraySetToolTip TrayTip UBound UDPBind UDPCloseSocket UDPOpen UDPRecv UDPSend VarGetType WinActivate WinActive WinClose WinExists WinFlash WinGetCaretPos WinGetClassList WinGetClientSize WinGetHandle WinGetPos WinGetProcess WinGetState WinGetText WinGetTitle WinKill WinList WinMenuSelectItem WinMinimizeAll WinMinimizeAllUndo WinMove WinSetOnTop WinSetState WinSetTitle WinSetTrans WinWait WinWaitActive WinWaitClose WinWaitNotActive",literal:"True False And Null Not Or Default"},contains:[t,n,r,i,{className:"meta",begin:"#",end:"$",keywords:{keyword:["EndRegion","forcedef","forceref","ignorefunc","include","include-once","NoTrayIcon","OnAutoItStartRegister","pragma","Region","RequireAdmin","Tidy_Off","Tidy_On","Tidy_Parameters"]},contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",keywords:{keyword:"include"},end:"$",contains:[r,{className:"string",variants:[{begin:"<",end:">"},{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]}]},r,t]},{className:"symbol",begin:"@[A-z0-9_]+"},{beginKeywords:"Func",end:"$",illegal:"\\$|\\[|%",contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{className:"title.function"}),{className:"params",begin:"\\(",end:"\\)",contains:[n,r,i]}]}]}}},function(e,t){e.exports=function(e){return{name:"AVR Assembly",case_insensitive:!0,keywords:{$pattern:"\\.?"+e.IDENT_RE,keyword:"adc add adiw and andi asr bclr bld brbc brbs brcc brcs break breq brge brhc brhs brid brie brlo brlt brmi brne brpl brsh brtc brts brvc brvs bset bst call cbi cbr clc clh cli cln clr cls clt clv clz com cp cpc cpi cpse dec eicall eijmp elpm eor fmul fmuls fmulsu icall ijmp in inc jmp ld ldd ldi lds lpm lsl lsr mov movw mul muls mulsu neg nop or ori out pop push rcall ret reti rjmp rol ror sbc sbr sbrc sbrs sec seh sbi sbci sbic sbis sbiw sei sen ser ses set sev sez sleep spm st std sts sub subi swap tst wdr",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 r23 r24 r25 r26 r27 r28 r29 r30 r31 x|0 xh xl y|0 yh yl z|0 zh zl ucsr1c udr1 ucsr1a ucsr1b ubrr1l ubrr1h ucsr0c ubrr0h tccr3c tccr3a tccr3b tcnt3h tcnt3l ocr3ah ocr3al ocr3bh ocr3bl ocr3ch ocr3cl icr3h icr3l etimsk etifr tccr1c ocr1ch ocr1cl twcr twdr twar twsr twbr osccal xmcra xmcrb eicra spmcsr spmcr portg ddrg ping portf ddrf sreg sph spl xdiv rampz eicrb eimsk gimsk gicr eifr gifr timsk tifr mcucr mcucsr tccr0 tcnt0 ocr0 assr tccr1a tccr1b tcnt1h tcnt1l ocr1ah ocr1al ocr1bh ocr1bl icr1h icr1l tccr2 tcnt2 ocr2 ocdr wdtcr sfior eearh eearl eedr eecr porta ddra pina portb ddrb pinb portc ddrc pinc portd ddrd pind spdr spsr spcr udr0 ucsr0a ucsr0b ubrr0l acsr admux adcsr adch adcl porte ddre pine pinf",meta:".byte .cseg .db .def .device .dseg .dw .endmacro .equ .eseg .exit .include .list .listmac .macro .nolist .org .set"},contains:[e.C_BLOCK_COMMENT_MODE,e.COMMENT(";","$",{relevance:0}),e.C_NUMBER_MODE,e.BINARY_NUMBER_MODE,{className:"number",begin:"\\b(\\$[a-zA-Z0-9]+|0o[0-7]+)"},e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",illegal:"[^\\\\][^']"},{className:"symbol",begin:"^[A-Za-z0-9_.$]+:"},{className:"meta",begin:"#",end:"$"},{className:"subst",begin:"@[0-9]+"}]}}},function(e,t){e.exports=function(e){return{name:"Awk",keywords:{keyword:"BEGIN END if else while do for in break continue delete next nextfile function func exit|10"},contains:[{className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},{className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/(u|b)?r?'''/,end:/'''/,relevance:10},{begin:/(u|b)?r?"""/,end:/"""/,relevance:10},{begin:/(u|r|ur)'/,end:/'/,relevance:10},{begin:/(u|r|ur)"/,end:/"/,relevance:10},{begin:/(b|br)'/,end:/'/},{begin:/(b|br)"/,end:/"/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},e.REGEXP_MODE,e.HASH_COMMENT_MODE,e.NUMBER_MODE]}}},function(e,t){e.exports=function(e){const t=e.UNDERSCORE_IDENT_RE,n={keyword:["abstract","as","asc","avg","break","breakpoint","by","byref","case","catch","changecompany","class","client","client","common","const","continue","count","crosscompany","delegate","delete_from","desc","display","div","do","edit","else","eventhandler","exists","extends","final","finally","firstfast","firstonly","firstonly1","firstonly10","firstonly100","firstonly1000","flush","for","forceliterals","forcenestedloop","forceplaceholders","forceselectorder","forupdate","from","generateonly","group","hint","if","implements","in","index","insert_recordset","interface","internal","is","join","like","maxof","minof","mod","namespace","new","next","nofetch","notexists","optimisticlock","order","outer","pessimisticlock","print","private","protected","public","readonly","repeatableread","retry","return","reverse","select","server","setting","static","sum","super","switch","this","throw","try","ttsabort","ttsbegin","ttscommit","unchecked","update_recordset","using","validtimestate","void","where","while"],built_in:["anytype","boolean","byte","char","container","date","double","enum","guid","int","int64","long","real","short","str","utcdatetime","var"],literal:["default","false","null","true"]},r={variants:[{match:[/(class|interface)\s+/,t,/\s+(extends|implements)\s+/,t]},{match:[/class\s+/,t]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:n};return{name:"X++",aliases:["x++"],keywords:n,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{className:"meta",begin:"#",end:"$"},r]}}},function(e,t){e.exports=function(e){const t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const i={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},a={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,i]};i.contains.push(a);const s={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},l=e.SHEBANG({binary:`(${["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"].join("|")})`,relevance:10}),c={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{name:"Bash",aliases:["sh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:["if","then","else","elif","fi","for","while","in","do","done","case","esac","function"],literal:["true","false"],built_in:["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset","alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","type","typeset","ulimit","unalias","set","shopt","autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp","chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"]},contains:[l,e.SHEBANG(),c,s,e.HASH_COMMENT_MODE,o,{match:/(\/[a-z._-]+)+/},a,{className:"",begin:/\\"/},{className:"string",begin:/'/,end:/'/},n]}}},function(e,t){e.exports=function(e){return{name:"BASIC",case_insensitive:!0,illegal:"^.",keywords:{$pattern:"[a-zA-Z][a-zA-Z0-9_$%!#]*",keyword:["ABS","ASC","AND","ATN","AUTO|0","BEEP","BLOAD|10","BSAVE|10","CALL","CALLS","CDBL","CHAIN","CHDIR","CHR$|10","CINT","CIRCLE","CLEAR","CLOSE","CLS","COLOR","COM","COMMON","CONT","COS","CSNG","CSRLIN","CVD","CVI","CVS","DATA","DATE$","DEFDBL","DEFINT","DEFSNG","DEFSTR","DEF|0","SEG","USR","DELETE","DIM","DRAW","EDIT","END","ENVIRON","ENVIRON$","EOF","EQV","ERASE","ERDEV","ERDEV$","ERL","ERR","ERROR","EXP","FIELD","FILES","FIX","FOR|0","FRE","GET","GOSUB|10","GOTO","HEX$","IF","THEN","ELSE|0","INKEY$","INP","INPUT","INPUT#","INPUT$","INSTR","IMP","INT","IOCTL","IOCTL$","KEY","ON","OFF","LIST","KILL","LEFT$","LEN","LET","LINE","LLIST","LOAD","LOC","LOCATE","LOF","LOG","LPRINT","USING","LSET","MERGE","MID$","MKDIR","MKD$","MKI$","MKS$","MOD","NAME","NEW","NEXT","NOISE","NOT","OCT$","ON","OR","PEN","PLAY","STRIG","OPEN","OPTION","BASE","OUT","PAINT","PALETTE","PCOPY","PEEK","PMAP","POINT","POKE","POS","PRINT","PRINT]","PSET","PRESET","PUT","RANDOMIZE","READ","REM","RENUM","RESET|0","RESTORE","RESUME","RETURN|0","RIGHT$","RMDIR","RND","RSET","RUN","SAVE","SCREEN","SGN","SHELL","SIN","SOUND","SPACE$","SPC","SQR","STEP","STICK","STOP","STR$","STRING$","SWAP","SYSTEM","TAB","TAN","TIME$","TIMER","TROFF","TRON","TO","USR","VAL","VARPTR","VARPTR$","VIEW","WAIT","WHILE","WEND","WIDTH","WINDOW","WRITE","XOR"]},contains:[e.QUOTE_STRING_MODE,e.COMMENT("REM","$",{relevance:10}),e.COMMENT("'","$",{relevance:0}),{className:"symbol",begin:"^[0-9]+ ",relevance:10},{className:"number",begin:"\\b\\d+(\\.\\d+)?([edED]\\d+)?[#!]?",relevance:0},{className:"number",begin:"(&[hH][0-9a-fA-F]{1,4})"},{className:"number",begin:"(&[oO][0-7]{1,6})"}]}}},function(e,t){e.exports=function(e){return{name:"Backus–Naur Form",contains:[{className:"attribute",begin:/</,end:/>/},{begin:/::=/,end:/$/,contains:[{begin:/</,end:/>/},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]}]}}},function(e,t){e.exports=function(e){const t={className:"literal",begin:/[+-]+/,relevance:0};return{name:"Brainfuck",aliases:["bf"],contains:[e.COMMENT(/[^\[\]\.,\+\-<> \r\n]/,/[\[\]\.,\+\-<> \r\n]/,{contains:[{match:/[ ]+[^\[\]\.,\+\-<> \r\n]/,relevance:0}],returnEnd:!0,relevance:0}),{className:"title",begin:"[\\[\\]]",relevance:0},{className:"string",begin:"[\\.,]",relevance:0},{begin:/(?=\+\+|--)/,contains:[t]},t]}}},function(e,t){e.exports=function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",a={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},s={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(s,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},u={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},d=t.optional(i)+e.IDENT_RE+"\\s*\\(",h={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal128","const","static","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},p=[c,a,n,e.C_BLOCK_COMMENT_MODE,l,s],m={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:h,contains:p.concat([{begin:/\(/,end:/\)/,keywords:h,contains:p.concat(["self"]),relevance:0}]),relevance:0},g={begin:"("+o+"[\\*&\\s]+)+"+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:h,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:h,relevance:0},{begin:d,returnBegin:!0,contains:[e.inherit(u,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,s,l,a,{begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,s,l,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C",aliases:["h"],keywords:h,disableAutodetect:!0,illegal:"</",contains:[].concat(m,g,p,[c,{begin:e.IDENT_RE+"::",keywords:h},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:c,strings:s,keywords:h}}}},function(e,t){e.exports=function(e){const t=e.regex,n=["div","mod","in","and","or","not","xor","asserterror","begin","case","do","downto","else","end","exit","for","local","if","of","repeat","then","to","until","while","with","var"],r=[e.C_LINE_COMMENT_MODE,e.COMMENT(/\{/,/\}/,{relevance:0}),e.COMMENT(/\(\*/,/\*\)/,{relevance:10})],i={className:"string",begin:/'/,end:/'/,contains:[{begin:/''/}]},o={className:"string",begin:/(#\d+)+/},a={match:[/procedure/,/\s+/,/[a-zA-Z_][\w@]*/,/\s*/],scope:{1:"keyword",3:"title.function"},contains:[{className:"params",begin:/\(/,end:/\)/,keywords:n,contains:[i,o,e.NUMBER_MODE]},...r]},s={match:[/OBJECT/,/\s+/,t.either("Table","Form","Report","Dataport","Codeunit","XMLport","MenuSuite","Page","Query"),/\s+/,/\d+/,/\s+(?=[^\s])/,/.*/,/$/],relevance:3,scope:{1:"keyword",3:"type",5:"number",7:"title"}};return{name:"C/AL",case_insensitive:!0,keywords:{keyword:n,literal:"false true"},illegal:/\/\*/,contains:[{match:/[\w]+(?=\=)/,scope:"attribute",relevance:0},i,o,{className:"number",begin:"\\b\\d+(\\.\\d+)?(DT|D|T)",relevance:0},{className:"string",begin:'"',end:'"'},e.NUMBER_MODE,s,a]}}},function(e,t){e.exports=function(e){const t={variants:[{match:[/(struct|enum|interface)/,/\s+/,e.IDENT_RE]},{match:[/extends/,/\s*\(/,e.IDENT_RE,/\s*\)/]}],scope:{1:"keyword",3:"title.class"}};return{name:"Cap’n Proto",aliases:["capnp"],keywords:{keyword:["struct","enum","interface","union","group","import","using","const","annotation","extends","in","of","on","as","with","from","fixed"],type:["Void","Bool","Int8","Int16","Int32","Int64","UInt8","UInt16","UInt32","UInt64","Float32","Float64","Text","Data","AnyPointer","AnyStruct","Capability","List"],literal:["true","false"]},contains:[e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.HASH_COMMENT_MODE,{className:"meta",begin:/@0x[\w\d]{16};/,illegal:/\n/},{className:"symbol",begin:/@\d+\b/},t]}}},function(e,t){e.exports=function(e){const t=["assembly","module","package","import","alias","class","interface","object","given","value","assign","void","function","new","of","extends","satisfies","abstracts","in","out","return","break","continue","throw","assert","dynamic","if","else","switch","case","for","while","try","catch","finally","then","let","this","outer","super","is","exists","nonempty"],n={className:"subst",excludeBegin:!0,excludeEnd:!0,begin:/``/,end:/``/,keywords:t,relevance:10},r=[{className:"string",begin:'"""',end:'"""',relevance:10},{className:"string",begin:'"',end:'"',contains:[n]},{className:"string",begin:"'",end:"'"},{className:"number",begin:"#[0-9a-fA-F_]+|\\$[01_]+|[0-9_]+(?:\\.[0-9_](?:[eE][+-]?\\d+)?)?[kMGTPmunpf]?",relevance:0}];return n.contains=r,{name:"Ceylon",keywords:{keyword:t.concat(["shared","abstract","formal","default","actual","variable","late","native","deprecated","final","sealed","annotation","suppressWarnings","small"]),meta:["doc","by","license","see","throws","tagged"]},illegal:"\\$[^01]|#[^0-9a-fA-F]",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),{className:"meta",begin:'@[a-z]\\w*(?::"[^"]*")?'}].concat(r)}}},function(e,t){e.exports=function(e){return{name:"Clean",aliases:["icl","dcl"],keywords:{keyword:["if","let","in","with","where","case","of","class","instance","otherwise","implementation","definition","system","module","from","import","qualified","as","special","code","inline","foreign","export","ccall","stdcall","generic","derive","infix","infixl","infixr"],built_in:"Int Real Char Bool",literal:"True False"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{begin:"->|<-[|:]?|#!?|>>=|\\{\\||\\|\\}|:==|=:|<>"}]}}},function(e,t){e.exports=function(e){const t="a-zA-Z_\\-!.?+*=<>&'",n="[#]?["+t+"]["+t+"0-9/;:$#]*",r="def defonce defprotocol defstruct defmulti defmethod defn- defn defmacro deftype defrecord",i={$pattern:n,built_in:r+" cond apply if-not if-let if not not= =|0 <|0 >|0 <=|0 >=|0 ==|0 +|0 /|0 *|0 -|0 rem quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last drop-while while intern condp case reduced cycle split-at split-with repeat replicate iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter monitor-exit macroexpand macroexpand-1 for dosync and or when when-not when-let comp juxt partial sequence memoize constantly complement identity assert peek pop doto proxy first rest cons cast coll last butlast sigs reify second ffirst fnext nfirst nnext meta with-meta ns in-ns create-ns import refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize"},o={begin:n,relevance:0},a={scope:"number",relevance:0,variants:[{match:/[-+]?0[xX][0-9a-fA-F]+N?/},{match:/[-+]?0[0-7]+N?/},{match:/[-+]?[1-9][0-9]?[rR][0-9a-zA-Z]+N?/},{match:/[-+]?[0-9]+\/[0-9]+N?/},{match:/[-+]?[0-9]+((\.[0-9]*([eE][+-]?[0-9]+)?M?)|([eE][+-]?[0-9]+M?|M))/},{match:/[-+]?([1-9][0-9]*|0)N?/}]},s={scope:"character",variants:[{match:/\\o[0-3]?[0-7]{1,2}/},{match:/\\u[0-9a-fA-F]{4}/},{match:/\\(newline|space|tab|formfeed|backspace|return)/},{match:/\\\S/,relevance:0}]},l={scope:"regex",begin:/#"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]},c=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),u={scope:"punctuation",match:/,/,relevance:0},d=e.COMMENT(";","$",{relevance:0}),h={className:"literal",begin:/\b(true|false|nil)\b/},p={begin:"\\[|(#::?"+n+")?\\{",end:"[\\]\\}]",relevance:0},m={className:"symbol",begin:"[:]{1,2}"+n},g={begin:"\\(",end:"\\)"},f={endsWithParent:!0,relevance:0},_={keywords:i,className:"name",begin:n,relevance:0,starts:f},b=[u,g,s,l,c,d,m,p,a,h,o],v={beginKeywords:r,keywords:{$pattern:n,keyword:r},end:'(\\[|#|\\d|"|:|\\{|\\)|\\(|$)',contains:[{className:"title",begin:n,relevance:0,excludeEnd:!0,endsParent:!0}].concat(b)};return g.contains=[v,_,f],f.contains=b,p.contains=b,{name:"Clojure",aliases:["clj","edn"],illegal:/\S/,contains:[u,g,s,l,c,d,m,p,a,h]}}},function(e,t){e.exports=function(e){return{name:"Clojure REPL",contains:[{className:"meta.prompt",begin:/^([\w.-]+|\s*#_)?=>/,starts:{end:/$/,subLanguage:"clojure"}}]}}},function(e,t){e.exports=function(e){return{name:"CMake",aliases:["cmake.in"],case_insensitive:!0,keywords:{keyword:"break cmake_host_system_information cmake_minimum_required cmake_parse_arguments cmake_policy configure_file continue elseif else endforeach endfunction endif endmacro endwhile execute_process file find_file find_library find_package find_path find_program foreach function get_cmake_property get_directory_property get_filename_component get_property if include include_guard list macro mark_as_advanced math message option return separate_arguments set_directory_properties set_property set site_name string unset variable_watch while add_compile_definitions add_compile_options add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_link_options add_subdirectory add_test aux_source_directory build_command create_test_sourcelist define_property enable_language enable_testing export fltk_wrap_ui get_source_file_property get_target_property get_test_property include_directories include_external_msproject include_regular_expression install link_directories link_libraries load_cache project qt_wrap_cpp qt_wrap_ui remove_definitions set_source_files_properties set_target_properties set_tests_properties source_group target_compile_definitions target_compile_features target_compile_options target_include_directories target_link_directories target_link_libraries target_link_options target_sources try_compile try_run ctest_build ctest_configure ctest_coverage ctest_empty_binary_directory ctest_memcheck ctest_read_custom_files ctest_run_script ctest_sleep ctest_start ctest_submit ctest_test ctest_update ctest_upload build_name exec_program export_library_dependencies install_files install_programs install_targets load_command make_directory output_required_files remove subdir_depends subdirs use_mangled_mesa utility_source variable_requires write_file qt5_use_modules qt5_use_package qt5_wrap_cpp on off true false and or not command policy target test exists is_newer_than is_directory is_symlink is_absolute matches less greater equal less_equal greater_equal strless strgreater strequal strless_equal strgreater_equal version_less version_greater version_equal version_less_equal version_greater_equal in_list defined"},contains:[{className:"variable",begin:/\$\{/,end:/\}/},e.COMMENT(/#\[\[/,/]]/),e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE]}}},function(e,t){const n=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],r=["true","false","null","undefined","NaN","Infinity"],i=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]);e.exports=function(e){const t={keyword:n.concat(["then","unless","until","loop","by","when","and","or","is","isnt","not"]).filter((o=["var","const","let","function","static"],e=>!o.includes(e))),literal:r.concat(["yes","no","on","off"]),built_in:i.concat(["npm","print"])};var o;const a="[A-Za-z$_][0-9A-Za-z$_]*",s={className:"subst",begin:/#\{/,end:/\}/,keywords:t},l=[e.BINARY_NUMBER_MODE,e.inherit(e.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[e.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,s]},{begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s]}]},{className:"regexp",variants:[{begin:"///",end:"///",contains:[s,e.HASH_COMMENT_MODE]},{begin:"//[gim]{0,3}(?=\\W)",relevance:0},{begin:/\/(?![ *]).*?(?![\\]).\/[gim]{0,3}(?=\W)/}]},{begin:"@"+a},{subLanguage:"javascript",excludeBegin:!0,excludeEnd:!0,variants:[{begin:"```",end:"```"},{begin:"`",end:"`"}]}];s.contains=l;const c=e.inherit(e.TITLE_MODE,{begin:a}),u="(\\(.*\\)\\s*)?\\B[-=]>",d={className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:t,contains:["self"].concat(l)}]},h={variants:[{match:[/class\s+/,a,/\s+extends\s+/,a]},{match:[/class\s+/,a]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:t};return{name:"CoffeeScript",aliases:["coffee","cson","iced"],keywords:t,illegal:/\/\*/,contains:[...l,e.COMMENT("###","###"),e.HASH_COMMENT_MODE,{className:"function",begin:"^\\s*"+a+"\\s*=\\s*"+u,end:"[-=]>",returnBegin:!0,contains:[c,d]},{begin:/[:\(,=]\s*/,relevance:0,contains:[{className:"function",begin:u,end:"[-=]>",returnBegin:!0,contains:[d]}]},h,{begin:a+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}]}}},function(e,t){e.exports=function(e){return{name:"Coq",keywords:{keyword:["_|0","as","at","cofix","else","end","exists","exists2","fix","for","forall","fun","if","IF","in","let","match","mod","Prop","return","Set","then","Type","using","where","with","Abort","About","Add","Admit","Admitted","All","Arguments","Assumptions","Axiom","Back","BackTo","Backtrack","Bind","Blacklist","Canonical","Cd","Check","Class","Classes","Close","Coercion","Coercions","CoFixpoint","CoInductive","Collection","Combined","Compute","Conjecture","Conjectures","Constant","constr","Constraint","Constructors","Context","Corollary","CreateHintDb","Cut","Declare","Defined","Definition","Delimit","Dependencies","Dependent","Derive","Drop","eauto","End","Equality","Eval","Example","Existential","Existentials","Existing","Export","exporting","Extern","Extract","Extraction","Fact","Field","Fields","File","Fixpoint","Focus","for","From","Function","Functional","Generalizable","Global","Goal","Grab","Grammar","Graph","Guarded","Heap","Hint","HintDb","Hints","Hypotheses","Hypothesis","ident","Identity","If","Immediate","Implicit","Import","Include","Inductive","Infix","Info","Initial","Inline","Inspect","Instance","Instances","Intro","Intros","Inversion","Inversion_clear","Language","Left","Lemma","Let","Libraries","Library","Load","LoadPath","Local","Locate","Ltac","ML","Mode","Module","Modules","Monomorphic","Morphism","Next","NoInline","Notation","Obligation","Obligations","Opaque","Open","Optimize","Options","Parameter","Parameters","Parametric","Path","Paths","pattern","Polymorphic","Preterm","Print","Printing","Program","Projections","Proof","Proposition","Pwd","Qed","Quit","Rec","Record","Recursive","Redirect","Relation","Remark","Remove","Require","Reserved","Reset","Resolve","Restart","Rewrite","Right","Ring","Rings","Save","Scheme","Scope","Scopes","Script","Search","SearchAbout","SearchHead","SearchPattern","SearchRewrite","Section","Separate","Set","Setoid","Show","Solve","Sorted","Step","Strategies","Strategy","Structure","SubClass","Table","Tables","Tactic","Term","Test","Theorem","Time","Timeout","Transparent","Type","Typeclasses","Types","Undelimit","Undo","Unfocus","Unfocused","Unfold","Universe","Universes","Unset","Unshelve","using","Variable","Variables","Variant","Verbose","Visibility","where","with"],built_in:["abstract","absurd","admit","after","apply","as","assert","assumption","at","auto","autorewrite","autounfold","before","bottom","btauto","by","case","case_eq","cbn","cbv","change","classical_left","classical_right","clear","clearbody","cofix","compare","compute","congruence","constr_eq","constructor","contradict","contradiction","cut","cutrewrite","cycle","decide","decompose","dependent","destruct","destruction","dintuition","discriminate","discrR","do","double","dtauto","eapply","eassumption","eauto","ecase","econstructor","edestruct","ediscriminate","eelim","eexact","eexists","einduction","einjection","eleft","elim","elimtype","enough","equality","erewrite","eright","esimplify_eq","esplit","evar","exact","exactly_once","exfalso","exists","f_equal","fail","field","field_simplify","field_simplify_eq","first","firstorder","fix","fold","fourier","functional","generalize","generalizing","gfail","give_up","has_evar","hnf","idtac","in","induction","injection","instantiate","intro","intro_pattern","intros","intuition","inversion","inversion_clear","is_evar","is_var","lapply","lazy","left","lia","lra","move","native_compute","nia","nsatz","omega","once","pattern","pose","progress","proof","psatz","quote","record","red","refine","reflexivity","remember","rename","repeat","replace","revert","revgoals","rewrite","rewrite_strat","right","ring","ring_simplify","rtauto","set","setoid_reflexivity","setoid_replace","setoid_rewrite","setoid_symmetry","setoid_transitivity","shelve","shelve_unifiable","simpl","simple","simplify_eq","solve","specialize","split","split_Rabs","split_Rmult","stepl","stepr","subst","sum","swap","symmetry","tactic","tauto","time","timeout","top","transitivity","trivial","try","tryif","unfold","unify","until","using","vm_compute","with"]},contains:[e.QUOTE_STRING_MODE,e.COMMENT("\\(\\*","\\*\\)"),e.C_NUMBER_MODE,{className:"type",excludeBegin:!0,begin:"\\|\\s*",end:"\\w+"},{begin:/[-=]>/}]}}},function(e,t){e.exports=function(e){return{name:"Caché Object Script",case_insensitive:!0,aliases:["cls"],keywords:"property parameter class classmethod clientmethod extends as break catch close continue do d|0 else elseif for goto halt hang h|0 if job j|0 kill k|0 lock l|0 merge new open quit q|0 read r|0 return set s|0 tcommit throw trollback try tstart use view while write w|0 xecute x|0 zkill znspace zn ztrap zwrite zw zzdump zzwrite print zbreak zinsert zload zprint zremove zsave zzprint mv mvcall mvcrt mvdim mvprint zquit zsync ascii",contains:[{className:"number",begin:"\\b(\\d+(\\.\\d*)?|\\.\\d+)",relevance:0},{className:"string",variants:[{begin:'"',end:'"',contains:[{begin:'""',relevance:0}]}]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"comment",begin:/;/,end:"$",relevance:0},{className:"built_in",begin:/(?:\$\$?|\.\.)\^?[a-zA-Z]+/},{className:"built_in",begin:/\$\$\$[a-zA-Z]+/},{className:"built_in",begin:/%[a-z]+(?:\.[a-z]+)*/},{className:"symbol",begin:/\^%?[a-zA-Z][\w]*/},{className:"keyword",begin:/##class|##super|#define|#dim/},{begin:/&sql\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,subLanguage:"sql"},{begin:/&(js|jscript|javascript)</,end:/>/,excludeBegin:!0,excludeEnd:!0,subLanguage:"javascript"},{begin:/&html<\s*</,end:/>\s*>/,subLanguage:"xml"}]}}},function(e,t){e.exports=function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="(?!struct)("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",a={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},s={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(s,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},u={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},d=t.optional(i)+e.IDENT_RE+"\\s*\\(",h={type:["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],keyword:["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"]},p={className:"function.dispatch",relevance:0,keywords:{_hint:["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"]},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},m=[p,c,a,n,e.C_BLOCK_COMMENT_MODE,l,s],g={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:h,contains:m.concat([{begin:/\(/,end:/\)/,keywords:h,contains:m.concat(["self"]),relevance:0}]),relevance:0},f={className:"function",begin:"("+o+"[\\*&\\s]+)+"+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:h,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:h,relevance:0},{begin:d,returnBegin:!0,contains:[u],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[s,l]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,s,l,a,{begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,s,l,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:h,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(g,f,p,m,[c,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function)\\s*<(?!<)",end:">",keywords:h,contains:["self",a]},{begin:e.IDENT_RE+"::",keywords:h},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}},function(e,t){e.exports=function(e){const t="group clone ms master location colocation order fencing_topology rsc_ticket acl_target acl_group user role tag xml";return{name:"crmsh",aliases:["crm","pcmk"],case_insensitive:!0,keywords:{keyword:"params meta operations op rule attributes utilization read write deny defined not_defined in_range date spec in ref reference attribute type xpath version and or lt gt tag lte gte eq ne \\ number string",literal:"Master Started Slave Stopped start promote demote stop monitor true false"},contains:[e.HASH_COMMENT_MODE,{beginKeywords:"node",starts:{end:"\\s*([\\w_-]+:)?",starts:{className:"title",end:"\\s*[\\$\\w_][\\w_-]*"}}},{beginKeywords:"primitive rsc_template",starts:{className:"title",end:"\\s*[\\$\\w_][\\w_-]*",starts:{end:"\\s*@?[\\w_][\\w_\\.:-]*"}}},{begin:"\\b("+t.split(" ").join("|")+")\\s+",keywords:t,starts:{className:"title",end:"[\\$\\w_][\\w_-]*"}},{beginKeywords:"property rsc_defaults op_defaults",starts:{className:"title",end:"\\s*([\\w_-]+:)?"}},e.QUOTE_STRING_MODE,{className:"meta",begin:"(ocf|systemd|service|lsb):[\\w_:-]+",relevance:0},{className:"number",begin:"\\b\\d+(\\.\\d+)?(ms|s|h|m)?",relevance:0},{className:"literal",begin:"[-]?(infinity|inf)",relevance:0},{className:"attr",begin:/([A-Za-z$_#][\w_-]+)=/,relevance:0},{className:"tag",begin:"</?",end:"/?>",relevance:0}]}}},function(e,t){e.exports=function(e){const t="(_?[ui](8|16|32|64|128))?",n="[a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|[=!]~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~|]|//|//=|&[-+*]=?|&\\*\\*|\\[\\][=?]?",r="[A-Za-z_]\\w*(::\\w+)*(\\?|!)?",i={$pattern:"[a-zA-Z_]\\w*[!?=]?",keyword:"abstract alias annotation as as? asm begin break case class def do else elsif end ensure enum extend for fun if include instance_sizeof is_a? lib macro module next nil? of out pointerof private protected rescue responds_to? return require select self sizeof struct super then type typeof union uninitialized unless until verbatim when while with yield __DIR__ __END_LINE__ __FILE__ __LINE__",literal:"false nil true"},o={className:"subst",begin:/#\{/,end:/\}/,keywords:i},a={className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},s={className:"template-variable",variants:[{begin:"\\{\\{",end:"\\}\\}"},{begin:"\\{%",end:"%\\}"}],keywords:i};function l(e,t){const n=[{begin:e,end:t}];return n[0].contains=n,n}const c={className:"string",contains:[e.BACKSLASH_ESCAPE,o],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%[Qwi]?\\(",end:"\\)",contains:l("\\(","\\)")},{begin:"%[Qwi]?\\[",end:"\\]",contains:l("\\[","\\]")},{begin:"%[Qwi]?\\{",end:/\}/,contains:l(/\{/,/\}/)},{begin:"%[Qwi]?<",end:">",contains:l("<",">")},{begin:"%[Qwi]?\\|",end:"\\|"},{begin:/<<-\w+$/,end:/^\s*\w+$/}],relevance:0},u={className:"string",variants:[{begin:"%q\\(",end:"\\)",contains:l("\\(","\\)")},{begin:"%q\\[",end:"\\]",contains:l("\\[","\\]")},{begin:"%q\\{",end:/\}/,contains:l(/\{/,/\}/)},{begin:"%q<",end:">",contains:l("<",">")},{begin:"%q\\|",end:"\\|"},{begin:/<<-'\w+'$/,end:/^\s*\w+$/}],relevance:0},d={begin:"(?!%\\})("+e.RE_STARTERS_RE+"|\\n|\\b(case|if|select|unless|until|when|while)\\b)\\s*",keywords:"case if select unless until when while",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,o],variants:[{begin:"//[a-z]*",relevance:0},{begin:"/(?!\\/)",end:"/[a-z]*"}]}],relevance:0},h=[s,c,u,{className:"regexp",contains:[e.BACKSLASH_ESCAPE,o],variants:[{begin:"%r\\(",end:"\\)",contains:l("\\(","\\)")},{begin:"%r\\[",end:"\\]",contains:l("\\[","\\]")},{begin:"%r\\{",end:/\}/,contains:l(/\{/,/\}/)},{begin:"%r<",end:">",contains:l("<",">")},{begin:"%r\\|",end:"\\|"}],relevance:0},d,{className:"meta",begin:"@\\[",end:"\\]",contains:[e.inherit(e.QUOTE_STRING_MODE,{className:"string"})]},a,e.HASH_COMMENT_MODE,{className:"class",beginKeywords:"class module struct",end:"$|;",illegal:/=/,contains:[e.HASH_COMMENT_MODE,e.inherit(e.TITLE_MODE,{begin:r}),{begin:"<"}]},{className:"class",beginKeywords:"lib enum union",end:"$|;",illegal:/=/,contains:[e.HASH_COMMENT_MODE,e.inherit(e.TITLE_MODE,{begin:r})]},{beginKeywords:"annotation",end:"$|;",illegal:/=/,contains:[e.HASH_COMMENT_MODE,e.inherit(e.TITLE_MODE,{begin:r})],relevance:2},{className:"function",beginKeywords:"def",end:/\B\b/,contains:[e.inherit(e.TITLE_MODE,{begin:n,endsParent:!0})]},{className:"function",beginKeywords:"fun macro",end:/\B\b/,contains:[e.inherit(e.TITLE_MODE,{begin:n,endsParent:!0})],relevance:2},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":",contains:[c,{begin:n}],relevance:0},{className:"number",variants:[{begin:"\\b0b([01_]+)"+t},{begin:"\\b0o([0-7_]+)"+t},{begin:"\\b0x([A-Fa-f0-9_]+)"+t},{begin:"\\b([1-9][0-9_]*[0-9]|[0-9])(\\.[0-9][0-9_]*)?([eE]_?[-+]?[0-9_]*)?(_?f(32|64))?(?!_)"},{begin:"\\b([1-9][0-9_]*|0)"+t}],relevance:0}];return o.contains=h,s.contains=h.slice(1),{name:"Crystal",aliases:["cr"],keywords:i,contains:h}}},function(e,t){e.exports=function(e){const t={keyword:["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"].concat(["add","alias","and","ascending","async","await","by","descending","equals","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","remove","select","set","unmanaged","value|0","var","when","where","with","yield"]),built_in:["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],literal:["default","false","null","true"]},n=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),r={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},i={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},o=e.inherit(i,{illegal:/\n/}),a={className:"subst",begin:/\{/,end:/\}/,keywords:t},s=e.inherit(a,{illegal:/\n/}),l={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,s]},c={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},a]},u=e.inherit(c,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},s]});a.contains=[c,l,i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,r,e.C_BLOCK_COMMENT_MODE],s.contains=[u,l,o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,r,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const d={variants:[c,l,i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},h={begin:"<",end:">",contains:[{beginKeywords:"in out"},n]},p=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",m={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:t,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"\x3c!--|--\x3e"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},d,r,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},n,h,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[n,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[n,h,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+p+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:t,contains:[{beginKeywords:["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"].join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,h],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,relevance:0,contains:[d,r,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},m]}}},function(e,t){e.exports=function(e){return{name:"CSP",case_insensitive:!1,keywords:{$pattern:"[a-zA-Z][a-zA-Z0-9_-]*",keyword:["base-uri","child-src","connect-src","default-src","font-src","form-action","frame-ancestors","frame-src","img-src","manifest-src","media-src","object-src","plugin-types","report-uri","sandbox","script-src","style-src","trusted-types","unsafe-hashes","worker-src"]},contains:[{className:"string",begin:"'",end:"'"},{className:"attribute",begin:"^Content",end:":",excludeEnd:!0}]}}},function(e,t){const n=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}),r=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],i=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],o=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],a=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],s=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();e.exports=function(e){const t=e.regex,l=n(e),c=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[l.BLOCK_COMMENT,{begin:/-(webkit|moz|ms|o)-(?=[a-z])/},l.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\.[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},l.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+o.join("|")+")"},{begin:":(:)?("+a.join("|")+")"}]},l.CSS_VARIABLE,{className:"attribute",begin:"\\b("+s.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[l.BLOCK_COMMENT,l.HEXCOLOR,l.IMPORTANT,l.CSS_NUMBER_MODE,...c,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...c,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},l.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:/@-?\w[\w]*(-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:i.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...c,l.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+r.join("|")+")\\b"}]}}},function(e,t){e.exports=function(e){const t={$pattern:e.UNDERSCORE_IDENT_RE,keyword:"abstract alias align asm assert auto body break byte case cast catch class const continue debug default delete deprecated do else enum export extern final finally for foreach foreach_reverse|10 goto if immutable import in inout int interface invariant is lazy macro mixin module new nothrow out override package pragma private protected public pure ref return scope shared static struct super switch synchronized template this throw try typedef typeid typeof union unittest version void volatile while with __FILE__ __LINE__ __gshared|10 __thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__",built_in:"bool cdouble cent cfloat char creal dchar delegate double dstring float function idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar wstring",literal:"false null true"},n="(0|[1-9][\\d_]*)",r="(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)",i="([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)",o="([eE][+-]?"+r+")",a="("+n+"|0[bB][01_]+|"+("0[xX]"+i)+")",s="\\\\(['\"\\?\\\\abfnrtv]|u[\\dA-Fa-f]{4}|[0-7]{1,3}|x[\\dA-Fa-f]{2}|U[\\dA-Fa-f]{8})|&[a-zA-Z\\d]{2,};",l={className:"number",begin:"\\b"+a+"(L|u|U|Lu|LU|uL|UL)?",relevance:0},c={className:"number",begin:"\\b("+("("+("(0[xX]("+i+"\\."+i+"|\\.?"+i+")[pP][+-]?"+r+")")+"|"+("("+r+"(\\.\\d*|"+o+")|\\d+\\."+r+"|\\."+n+o+"?)")+")")+"([fF]|L|i|[fF]i|Li)?|"+a+"(i|[fF]i|Li))",relevance:0},u={className:"string",begin:"'("+s+"|.)",end:"'",illegal:"."},d={className:"string",begin:'"',contains:[{begin:s,relevance:0}],end:'"[cwd]?'},h=e.COMMENT("\\/\\+","\\+\\/",{contains:["self"],relevance:10});return{name:"D",keywords:t,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,h,{className:"string",begin:'x"[\\da-fA-F\\s\\n\\r]*"[cwd]?',relevance:10},d,{className:"string",begin:'[rq]"',end:'"[cwd]?',relevance:5},{className:"string",begin:"`",end:"`[cwd]?"},{className:"string",begin:'q"\\{',end:'\\}"'},c,l,u,{className:"meta",begin:"^#!",end:"$",relevance:5},{className:"meta",begin:"#(line)",end:"$",relevance:5},{className:"keyword",begin:"@[a-zA-Z_][a-zA-Z_\\d]*"}]}}},function(e,t){e.exports=function(e){const t={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},n={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:e.regex.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},r={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},i={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},o=e.inherit(r,{contains:[]}),a=e.inherit(i,{contains:[]});r.contains.push(a),i.contains.push(o);let s=[t,n];return[r,i,o,a].forEach((e=>{e.contains=e.contains.concat(s)})),s=s.concat(r,i),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:s},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:s}]}]},t,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},r,i,{className:"quote",begin:"^>\\s+",contains:s,end:"$"},{className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{begin:"^[-\\*]{3,}",end:"$"},n,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}}},function(e,t){e.exports=function(e){const t={className:"subst",variants:[{begin:"\\$[A-Za-z0-9_]+"}]},n={className:"subst",variants:[{begin:/\$\{/,end:/\}/}],keywords:"true false null this is new super"},r={className:"string",variants:[{begin:"r'''",end:"'''"},{begin:'r"""',end:'"""'},{begin:"r'",end:"'",illegal:"\\n"},{begin:'r"',end:'"',illegal:"\\n"},{begin:"'''",end:"'''",contains:[e.BACKSLASH_ESCAPE,t,n]},{begin:'"""',end:'"""',contains:[e.BACKSLASH_ESCAPE,t,n]},{begin:"'",end:"'",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,t,n]},{begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,t,n]}]};n.contains=[e.C_NUMBER_MODE,r];const i=["Comparable","DateTime","Duration","Function","Iterable","Iterator","List","Map","Match","Object","Pattern","RegExp","Set","Stopwatch","String","StringBuffer","StringSink","Symbol","Type","Uri","bool","double","int","num","Element","ElementList"],o=i.map((e=>`${e}?`));return{name:"Dart",keywords:{keyword:["abstract","as","assert","async","await","break","case","catch","class","const","continue","covariant","default","deferred","do","dynamic","else","enum","export","extends","extension","external","factory","false","final","finally","for","Function","get","hide","if","implements","import","in","inferface","is","late","library","mixin","new","null","on","operator","part","required","rethrow","return","set","show","static","super","switch","sync","this","throw","true","try","typedef","var","void","while","with","yield"],built_in:i.concat(o).concat(["Never","Null","dynamic","print","document","querySelector","querySelectorAll","window"]),$pattern:/[A-Za-z][A-Za-z0-9_]*\??/},contains:[r,e.COMMENT(/\/\*\*(?!\/)/,/\*\//,{subLanguage:"markdown",relevance:0}),e.COMMENT(/\/{3,} ?/,/$/,{contains:[{subLanguage:"markdown",begin:".",end:"$",relevance:0}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"class interface",end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},e.C_NUMBER_MODE,{className:"meta",begin:"@[A-Za-z]+"},{begin:"=>"}]}}},function(e,t){e.exports=function(e){const t=["exports","register","file","shl","array","record","property","for","mod","while","set","ally","label","uses","raise","not","stored","class","safecall","var","interface","or","private","static","exit","index","inherited","to","else","stdcall","override","shr","asm","far","resourcestring","finalization","packed","virtual","out","and","protected","library","do","xorwrite","goto","near","function","end","div","overload","object","unit","begin","string","on","inline","repeat","until","destructor","write","message","program","with","read","initialization","except","default","nil","if","case","cdecl","in","downto","threadvar","of","try","pascal","const","external","constructor","type","public","then","implementation","finally","published","procedure","absolute","reintroduce","operator","as","is","abstract","alias","assembler","bitpacked","break","continue","cppdecl","cvar","enumerator","experimental","platform","deprecated","unimplemented","dynamic","export","far16","forward","generic","helper","implements","interrupt","iochecks","local","name","nodefault","noreturn","nostackframe","oldfpccall","otherwise","saveregisters","softfloat","specialize","strict","unaligned","varargs"],n=[e.C_LINE_COMMENT_MODE,e.COMMENT(/\{/,/\}/,{relevance:0}),e.COMMENT(/\(\*/,/\*\)/,{relevance:10})],r={className:"meta",variants:[{begin:/\{\$/,end:/\}/},{begin:/\(\*\$/,end:/\*\)/}]},i={className:"string",begin:/'/,end:/'/,contains:[{begin:/''/}]},o={className:"string",begin:/(#\d+)+/},a={begin:e.IDENT_RE+"\\s*=\\s*class\\s*\\(",returnBegin:!0,contains:[e.TITLE_MODE]},s={className:"function",beginKeywords:"function constructor destructor procedure",end:/[:;]/,keywords:"function constructor|10 destructor|10 procedure|10",contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,keywords:t,contains:[i,o,r].concat(n)},r].concat(n)};return{name:"Delphi",aliases:["dpr","dfm","pas","pascal"],case_insensitive:!0,keywords:t,illegal:/"|\$[G-Zg-z]|\/\*|<\/|\|/,contains:[i,o,e.NUMBER_MODE,{className:"number",relevance:0,variants:[{begin:"\\$[0-9A-Fa-f]+"},{begin:"&[0-7]+"},{begin:"%[01]+"}]},a,s,r].concat(n)}}},function(e,t){e.exports=function(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}},function(e,t){e.exports=function(e){const t={begin:/\|[A-Za-z]+:?/,keywords:{name:"truncatewords removetags linebreaksbr yesno get_digit timesince random striptags filesizeformat escape linebreaks length_is ljust rjust cut urlize fix_ampersands title floatformat capfirst pprint divisibleby add make_list unordered_list urlencode timeuntil urlizetrunc wordcount stringformat linenumbers slice date dictsort dictsortreversed default_if_none pluralize lower join center default truncatewords_html upper length phone2numeric wordwrap time addslashes slugify first escapejs force_escape iriencode last safe safeseq truncatechars localize unlocalize localtime utc timezone"},contains:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE]};return{name:"Django",aliases:["jinja"],case_insensitive:!0,subLanguage:"xml",contains:[e.COMMENT(/\{%\s*comment\s*%\}/,/\{%\s*endcomment\s*%\}/),e.COMMENT(/\{#/,/#\}/),{className:"template-tag",begin:/\{%/,end:/%\}/,contains:[{className:"name",begin:/\w+/,keywords:{name:"comment endcomment load templatetag ifchanged endifchanged if endif firstof for endfor ifnotequal endifnotequal widthratio extends include spaceless endspaceless regroup ifequal endifequal ssi now with cycle url filter endfilter debug block endblock else autoescape endautoescape csrf_token empty elif endwith static trans blocktrans endblocktrans get_static_prefix get_media_prefix plural get_current_language language get_available_languages get_current_language_bidi get_language_info get_language_info_list localize endlocalize localtime endlocaltime timezone endtimezone get_current_timezone verbatim"},starts:{endsWithParent:!0,keywords:"in by as",contains:[t],relevance:0}}]},{className:"template-variable",begin:/\{\{/,end:/\}\}/,contains:[t]}]}}},function(e,t){e.exports=function(e){return{name:"DNS Zone",aliases:["bind","zone"],keywords:["IN","A","AAAA","AFSDB","APL","CAA","CDNSKEY","CDS","CERT","CNAME","DHCID","DLV","DNAME","DNSKEY","DS","HIP","IPSECKEY","KEY","KX","LOC","MX","NAPTR","NS","NSEC","NSEC3","NSEC3PARAM","PTR","RRSIG","RP","SIG","SOA","SRV","SSHFP","TA","TKEY","TLSA","TSIG","TXT"],contains:[e.COMMENT(";","$",{relevance:0}),{className:"meta",begin:/^\$(TTL|GENERATE|INCLUDE|ORIGIN)\b/},{className:"number",begin:"((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))\\b"},{className:"number",begin:"((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]).){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\b"},e.inherit(e.NUMBER_MODE,{begin:/\b\d+[dhwm]?/})]}}},function(e,t){e.exports=function(e){return{name:"Dockerfile",aliases:["docker"],case_insensitive:!0,keywords:["from","maintainer","expose","env","arg","user","onbuild","stopsignal"],contains:[e.HASH_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{beginKeywords:"run cmd entrypoint volume add copy workdir label healthcheck shell",starts:{end:/[^\\]$/,subLanguage:"bash"}}],illegal:"</"}}},function(e,t){e.exports=function(e){const t=e.COMMENT(/^\s*@?rem\b/,/$/,{relevance:10});return{name:"Batch file (DOS)",aliases:["bat","cmd"],case_insensitive:!0,illegal:/\/\*/,keywords:{keyword:["if","else","goto","for","in","do","call","exit","not","exist","errorlevel","defined","equ","neq","lss","leq","gtr","geq"],built_in:["prn","nul","lpt3","lpt2","lpt1","con","com4","com3","com2","com1","aux","shift","cd","dir","echo","setlocal","endlocal","set","pause","copy","append","assoc","at","attrib","break","cacls","cd","chcp","chdir","chkdsk","chkntfs","cls","cmd","color","comp","compact","convert","date","dir","diskcomp","diskcopy","doskey","erase","fs","find","findstr","format","ftype","graftabl","help","keyb","label","md","mkdir","mode","more","move","path","pause","print","popd","pushd","promt","rd","recover","rem","rename","replace","restore","rmdir","shift","sort","start","subst","time","title","tree","type","ver","verify","vol","ping","net","ipconfig","taskkill","xcopy","ren","del"]},contains:[{className:"variable",begin:/%%[^ ]|%[^ ]+?%|![^ ]+?!/},{className:"function",begin:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)",end:"goto:eof",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),t]},{className:"number",begin:"\\b\\d+",relevance:0},t]}}},function(e,t){e.exports=function(e){return{keywords:"dsconfig",contains:[{className:"keyword",begin:"^dsconfig",end:/\s/,excludeEnd:!0,relevance:10},{className:"built_in",begin:/(list|create|get|set|delete)-(\w+)/,end:/\s/,excludeEnd:!0,illegal:"!@#$%^&*()",relevance:10},{className:"built_in",begin:/--(\w+)/,end:/\s/,excludeEnd:!0},{className:"string",begin:/"/,end:/"/},{className:"string",begin:/'/,end:/'/},{className:"string",begin:/[\w\-?]+:\w+/,end:/\W/,relevance:0},{className:"string",begin:/\w+(\-\w+)*/,end:/(?=\W)/,relevance:0},e.HASH_COMMENT_MODE]}}},function(e,t){e.exports=function(e){const t={className:"string",variants:[e.inherit(e.QUOTE_STRING_MODE,{begin:'((u8?|U)|L)?"'}),{begin:'(u8?|U)?R"',end:'"',contains:[e.BACKSLASH_ESCAPE]},{begin:"'\\\\?.",end:"'",illegal:"."}]},n={className:"number",variants:[{begin:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},{begin:e.C_NUMBER_RE}],relevance:0},r={className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef ifdef ifndef"},contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",end:"$",keywords:{keyword:"include"},contains:[e.inherit(t,{className:"string"}),{className:"string",begin:"<",end:">",illegal:"\\n"}]},t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},i={className:"variable",begin:/&[a-z\d_]*\b/};return{name:"Device Tree",contains:[{className:"title.class",begin:/^\/(?=\s*\{)/,relevance:10},i,{className:"keyword",begin:"/[a-z][a-z\\d-]*/"},{className:"symbol",begin:"^\\s*[a-zA-Z_][a-zA-Z\\d_]*:"},{className:"title.class",begin:/[a-zA-Z_][a-zA-Z\d_@-]*(?=\s\{)/,relevance:.2},{relevance:0,match:[/[a-z][a-z-,]+/,/\s*/,/=/],scope:{1:"attr",3:"operator"}},{match:/[a-z][a-z-,]+(?=;)/,relevance:0,scope:"attr"},{className:"params",relevance:0,begin:"<",end:">",contains:[n,i]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,t,r,{scope:"punctuation",relevance:0,match:/\};|[;{}]/},{begin:e.IDENT_RE+"::",keywords:""}]}}},function(e,t){e.exports=function(e){return{name:"Dust",aliases:["dst"],case_insensitive:!0,subLanguage:"xml",contains:[{className:"template-tag",begin:/\{[#\/]/,end:/\}/,illegal:/;/,contains:[{className:"name",begin:/[a-zA-Z\.-]+/,starts:{endsWithParent:!0,relevance:0,contains:[e.QUOTE_STRING_MODE]}}]},{className:"template-variable",begin:/\{/,end:/\}/,illegal:/;/,keywords:"if eq ne lt lte gt gte select default math sep"}]}}},function(e,t){e.exports=function(e){const t=e.COMMENT(/\(\*/,/\*\)/);return{name:"Extended Backus-Naur Form",illegal:/\S/,contains:[t,{className:"attribute",begin:/^[ ]*[a-zA-Z]+([\s_-]+[a-zA-Z]+)*/},{begin:/=/,end:/[.;]/,contains:[t,{className:"meta",begin:/\?.*\?/},{className:"string",variants:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:"`",end:"`"}]}]}]}}},function(e,t){e.exports=function(e){const t=e.regex,n="[a-zA-Z_][a-zA-Z0-9_.]*(!|\\?)?",r={$pattern:n,keyword:["after","alias","and","case","catch","cond","defstruct","defguard","do","else","end","fn","for","if","import","in","not","or","quote","raise","receive","require","reraise","rescue","try","unless","unquote","unquote_splicing","use","when","with|0"],literal:["false","nil","true"]},i={className:"subst",begin:/#\{/,end:/\}/,keywords:r},o={match:/\\[\s\S]/,scope:"char.escape",relevance:0},a="[/|([{<\"']",s=[{begin:/"/,end:/"/},{begin:/'/,end:/'/},{begin:/\//,end:/\//},{begin:/\|/,end:/\|/},{begin:/\(/,end:/\)/},{begin:/\[/,end:/\]/},{begin:/\{/,end:/\}/},{begin:/</,end:/>/}],l=e=>({scope:"char.escape",begin:t.concat(/\\/,e),relevance:0}),c={className:"string",begin:"~[a-z](?="+a+")",contains:s.map((t=>e.inherit(t,{contains:[l(t.end),o,i]})))},u={className:"string",begin:"~[A-Z](?="+a+")",contains:s.map((t=>e.inherit(t,{contains:[l(t.end)]})))},d={className:"regex",variants:[{begin:"~r(?="+a+")",contains:s.map((n=>e.inherit(n,{end:t.concat(n.end,/[uismxfU]{0,7}/),contains:[l(n.end),o,i]})))},{begin:"~R(?="+a+")",contains:s.map((n=>e.inherit(n,{end:t.concat(n.end,/[uismxfU]{0,7}/),contains:[l(n.end)]})))}]},h={className:"string",contains:[e.BACKSLASH_ESCAPE,i],variants:[{begin:/"""/,end:/"""/},{begin:/'''/,end:/'''/},{begin:/~S"""/,end:/"""/,contains:[]},{begin:/~S"/,end:/"/,contains:[]},{begin:/~S'''/,end:/'''/,contains:[]},{begin:/~S'/,end:/'/,contains:[]},{begin:/'/,end:/'/},{begin:/"/,end:/"/}]},p={className:"function",beginKeywords:"def defp defmacro defmacrop",end:/\B\b/,contains:[e.inherit(e.TITLE_MODE,{begin:n,endsParent:!0})]},m=e.inherit(p,{className:"class",beginKeywords:"defimpl defmodule defprotocol defrecord",end:/\bdo\b|$|;/}),g=[h,d,u,c,e.HASH_COMMENT_MODE,m,p,{begin:"::"},{className:"symbol",begin:":(?![\\s:])",contains:[h,{begin:"[a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?"}],relevance:0},{className:"symbol",begin:n+":(?!:)",relevance:0},{className:"title.class",begin:/(\b[A-Z][a-zA-Z0-9_]+)/,relevance:0},{className:"number",begin:"(\\b0o[0-7_]+)|(\\b0b[01_]+)|(\\b0x[0-9a-fA-F_]+)|(-?\\b[0-9][0-9_]*(\\.[0-9_]+([eE][-+]?[0-9]+)?)?)",relevance:0},{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))"}];return i.contains=g,{name:"Elixir",aliases:["ex","exs"],keywords:r,contains:g}}},function(e,t){e.exports=function(e){const t={variants:[e.COMMENT("--","$"),e.COMMENT(/\{-/,/-\}/,{contains:["self"]})]},n={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},r={begin:"\\(",end:"\\)",illegal:'"',contains:[{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},t]};return{name:"Elm",keywords:["let","in","if","then","else","case","of","where","module","import","exposing","type","alias","as","infix","infixl","infixr","port","effect","command","subscription"],contains:[{beginKeywords:"port effect module",end:"exposing",keywords:"port effect module where command subscription exposing",contains:[r,t],illegal:"\\W\\.|;"},{begin:"import",end:"$",keywords:"import as exposing",contains:[r,t],illegal:"\\W\\.|;"},{begin:"type",end:"$",keywords:"type alias",contains:[n,r,{begin:/\{/,end:/\}/,contains:r.contains},t]},{beginKeywords:"infix infixl infixr",end:"$",contains:[e.C_NUMBER_MODE,t]},{begin:"port",end:"$",keywords:"port",contains:[t]},{className:"string",begin:"'\\\\?.",end:"'",illegal:"."},e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,n,e.inherit(e.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),t,{begin:"->|<-"}],illegal:/;/}}},function(e,t){e.exports=function(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=t.concat(r,/(::\w+)*/),o={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield","include","extend","prepend","public","private","protected","raise","throw"],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},a={className:"doctag",begin:"@[A-Za-z]+"},s={begin:"#<",end:">"},l=[e.COMMENT("#","$",{contains:[a]}),e.COMMENT("^=begin","^=end",{contains:[a],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],c={className:"subst",begin:/#\{/,end:/\}/,keywords:o},u={className:"string",contains:[e.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,c]})]}]},d="[0-9](_?[0-9])*",h={className:"number",relevance:0,variants:[{begin:`\\b([1-9](_?[0-9])*|0)(\\.(${d}))?([eE][+-]?(${d})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},p={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:o}]},m=[u,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:o},{match:[/(include|extend)\s+/,i],scope:{2:"title.class"},keywords:o},{relevance:0,match:[i,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[p]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[u,{begin:n}],relevance:0},h,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:o},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(s,l),relevance:0}].concat(s,l);c.contains=m,p.contains=m;const g=[{begin:/^\s*=>/,starts:{end:"$",contains:m}},{className:"meta.prompt",begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])",starts:{end:"$",keywords:o,contains:m}}];return l.unshift(s),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:o,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(g).concat(l).concat(m)}}},function(e,t){e.exports=function(e){return{name:"ERB",subLanguage:"xml",contains:[e.COMMENT("<%#","%>"),{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0}]}}},function(e,t){e.exports=function(e){const t=e.regex;return{name:"Erlang REPL",keywords:{built_in:"spawn spawn_link self",keyword:"after and andalso|10 band begin bnot bor bsl bsr bxor case catch cond div end fun if let not of or orelse|10 query receive rem try when xor"},contains:[{className:"meta.prompt",begin:"^[0-9]+> ",relevance:10},e.COMMENT("%","$"),{className:"number",begin:"\\b(\\d+(_\\d+)*#[a-fA-F0-9]+(_[a-fA-F0-9]+)*|\\d+(_\\d+)*(\\.\\d+(_\\d+)*)?([eE][-+]?\\d+)?)",relevance:0},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:t.concat(/\?(::)?/,/([A-Z]\w*)/,/((::)[A-Z]\w*)*/)},{begin:"->"},{begin:"ok"},{begin:"!"},{begin:"(\\b[a-z'][a-zA-Z0-9_']*:[a-z'][a-zA-Z0-9_']*)|(\\b[a-z'][a-zA-Z0-9_']*)",relevance:0},{begin:"[A-Z][a-zA-Z0-9_']*",relevance:0}]}}},function(e,t){e.exports=function(e){const t="[a-z'][a-zA-Z0-9_']*",n="("+t+":"+t+"|"+t+")",r={keyword:"after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun if let not of orelse|10 query receive rem try when xor",literal:"false true"},i=e.COMMENT("%","$"),o={className:"number",begin:"\\b(\\d+(_\\d+)*#[a-fA-F0-9]+(_[a-fA-F0-9]+)*|\\d+(_\\d+)*(\\.\\d+(_\\d+)*)?([eE][-+]?\\d+)?)",relevance:0},a={begin:"fun\\s+"+t+"/\\d+"},s={begin:n+"\\(",end:"\\)",returnBegin:!0,relevance:0,contains:[{begin:n,relevance:0},{begin:"\\(",end:"\\)",endsWithParent:!0,returnEnd:!0,relevance:0}]},l={begin:/\{/,end:/\}/,relevance:0},c={begin:"\\b_([A-Z][A-Za-z0-9_]*)?",relevance:0},u={begin:"[A-Z][a-zA-Z0-9_]*",relevance:0},d={begin:"#"+e.UNDERSCORE_IDENT_RE,relevance:0,returnBegin:!0,contains:[{begin:"#"+e.UNDERSCORE_IDENT_RE,relevance:0},{begin:/\{/,end:/\}/,relevance:0}]},h={beginKeywords:"fun receive if try case",end:"end",keywords:r};h.contains=[i,a,e.inherit(e.APOS_STRING_MODE,{className:""}),h,s,e.QUOTE_STRING_MODE,o,l,c,u,d];const p=[i,a,h,s,e.QUOTE_STRING_MODE,o,l,c,u,d];s.contains[1].contains=p,l.contains=p,d.contains[1].contains=p;const m={className:"params",begin:"\\(",end:"\\)",contains:p};return{name:"Erlang",aliases:["erl"],keywords:r,illegal:"(</|\\*=|\\+=|-=|/\\*|\\*/|\\(\\*|\\*\\))",contains:[{className:"function",begin:"^"+t+"\\s*\\(",end:"->",returnBegin:!0,illegal:"\\(|#|//|/\\*|\\\\|:|;",contains:[m,e.inherit(e.TITLE_MODE,{begin:t})],starts:{end:";|\\.",keywords:r,contains:p}},i,{begin:"^-",end:"\\.",relevance:0,excludeEnd:!0,returnBegin:!0,keywords:{$pattern:"-"+e.IDENT_RE,keyword:["-module","-record","-undef","-export","-ifdef","-ifndef","-author","-copyright","-doc","-vsn","-import","-include","-include_lib","-compile","-define","-else","-endif","-file","-behaviour","-behavior","-spec"].map((e=>`${e}|1.5`)).join(" ")},contains:[m]},o,e.QUOTE_STRING_MODE,d,c,u,l,{begin:/\.$/}]}}},function(e,t){e.exports=function(e){return{name:"Excel formulae",aliases:["xlsx","xls"],case_insensitive:!0,keywords:{$pattern:/[a-zA-Z][\w\.]*/,built_in:["ABS","ACCRINT","ACCRINTM","ACOS","ACOSH","ACOT","ACOTH","AGGREGATE","ADDRESS","AMORDEGRC","AMORLINC","AND","ARABIC","AREAS","ASC","ASIN","ASINH","ATAN","ATAN2","ATANH","AVEDEV","AVERAGE","AVERAGEA","AVERAGEIF","AVERAGEIFS","BAHTTEXT","BASE","BESSELI","BESSELJ","BESSELK","BESSELY","BETADIST","BETA.DIST","BETAINV","BETA.INV","BIN2DEC","BIN2HEX","BIN2OCT","BINOMDIST","BINOM.DIST","BINOM.DIST.RANGE","BINOM.INV","BITAND","BITLSHIFT","BITOR","BITRSHIFT","BITXOR","CALL","CEILING","CEILING.MATH","CEILING.PRECISE","CELL","CHAR","CHIDIST","CHIINV","CHITEST","CHISQ.DIST","CHISQ.DIST.RT","CHISQ.INV","CHISQ.INV.RT","CHISQ.TEST","CHOOSE","CLEAN","CODE","COLUMN","COLUMNS","COMBIN","COMBINA","COMPLEX","CONCAT","CONCATENATE","CONFIDENCE","CONFIDENCE.NORM","CONFIDENCE.T","CONVERT","CORREL","COS","COSH","COT","COTH","COUNT","COUNTA","COUNTBLANK","COUNTIF","COUNTIFS","COUPDAYBS","COUPDAYS","COUPDAYSNC","COUPNCD","COUPNUM","COUPPCD","COVAR","COVARIANCE.P","COVARIANCE.S","CRITBINOM","CSC","CSCH","CUBEKPIMEMBER","CUBEMEMBER","CUBEMEMBERPROPERTY","CUBERANKEDMEMBER","CUBESET","CUBESETCOUNT","CUBEVALUE","CUMIPMT","CUMPRINC","DATE","DATEDIF","DATEVALUE","DAVERAGE","DAY","DAYS","DAYS360","DB","DBCS","DCOUNT","DCOUNTA","DDB","DEC2BIN","DEC2HEX","DEC2OCT","DECIMAL","DEGREES","DELTA","DEVSQ","DGET","DISC","DMAX","DMIN","DOLLAR","DOLLARDE","DOLLARFR","DPRODUCT","DSTDEV","DSTDEVP","DSUM","DURATION","DVAR","DVARP","EDATE","EFFECT","ENCODEURL","EOMONTH","ERF","ERF.PRECISE","ERFC","ERFC.PRECISE","ERROR.TYPE","EUROCONVERT","EVEN","EXACT","EXP","EXPON.DIST","EXPONDIST","FACT","FACTDOUBLE","FALSE|0","F.DIST","FDIST","F.DIST.RT","FILTERXML","FIND","FINDB","F.INV","F.INV.RT","FINV","FISHER","FISHERINV","FIXED","FLOOR","FLOOR.MATH","FLOOR.PRECISE","FORECAST","FORECAST.ETS","FORECAST.ETS.CONFINT","FORECAST.ETS.SEASONALITY","FORECAST.ETS.STAT","FORECAST.LINEAR","FORMULATEXT","FREQUENCY","F.TEST","FTEST","FV","FVSCHEDULE","GAMMA","GAMMA.DIST","GAMMADIST","GAMMA.INV","GAMMAINV","GAMMALN","GAMMALN.PRECISE","GAUSS","GCD","GEOMEAN","GESTEP","GETPIVOTDATA","GROWTH","HARMEAN","HEX2BIN","HEX2DEC","HEX2OCT","HLOOKUP","HOUR","HYPERLINK","HYPGEOM.DIST","HYPGEOMDIST","IF","IFERROR","IFNA","IFS","IMABS","IMAGINARY","IMARGUMENT","IMCONJUGATE","IMCOS","IMCOSH","IMCOT","IMCSC","IMCSCH","IMDIV","IMEXP","IMLN","IMLOG10","IMLOG2","IMPOWER","IMPRODUCT","IMREAL","IMSEC","IMSECH","IMSIN","IMSINH","IMSQRT","IMSUB","IMSUM","IMTAN","INDEX","INDIRECT","INFO","INT","INTERCEPT","INTRATE","IPMT","IRR","ISBLANK","ISERR","ISERROR","ISEVEN","ISFORMULA","ISLOGICAL","ISNA","ISNONTEXT","ISNUMBER","ISODD","ISREF","ISTEXT","ISO.CEILING","ISOWEEKNUM","ISPMT","JIS","KURT","LARGE","LCM","LEFT","LEFTB","LEN","LENB","LINEST","LN","LOG","LOG10","LOGEST","LOGINV","LOGNORM.DIST","LOGNORMDIST","LOGNORM.INV","LOOKUP","LOWER","MATCH","MAX","MAXA","MAXIFS","MDETERM","MDURATION","MEDIAN","MID","MIDBs","MIN","MINIFS","MINA","MINUTE","MINVERSE","MIRR","MMULT","MOD","MODE","MODE.MULT","MODE.SNGL","MONTH","MROUND","MULTINOMIAL","MUNIT","N","NA","NEGBINOM.DIST","NEGBINOMDIST","NETWORKDAYS","NETWORKDAYS.INTL","NOMINAL","NORM.DIST","NORMDIST","NORMINV","NORM.INV","NORM.S.DIST","NORMSDIST","NORM.S.INV","NORMSINV","NOT","NOW","NPER","NPV","NUMBERVALUE","OCT2BIN","OCT2DEC","OCT2HEX","ODD","ODDFPRICE","ODDFYIELD","ODDLPRICE","ODDLYIELD","OFFSET","OR","PDURATION","PEARSON","PERCENTILE.EXC","PERCENTILE.INC","PERCENTILE","PERCENTRANK.EXC","PERCENTRANK.INC","PERCENTRANK","PERMUT","PERMUTATIONA","PHI","PHONETIC","PI","PMT","POISSON.DIST","POISSON","POWER","PPMT","PRICE","PRICEDISC","PRICEMAT","PROB","PRODUCT","PROPER","PV","QUARTILE","QUARTILE.EXC","QUARTILE.INC","QUOTIENT","RADIANS","RAND","RANDBETWEEN","RANK.AVG","RANK.EQ","RANK","RATE","RECEIVED","REGISTER.ID","REPLACE","REPLACEB","REPT","RIGHT","RIGHTB","ROMAN","ROUND","ROUNDDOWN","ROUNDUP","ROW","ROWS","RRI","RSQ","RTD","SEARCH","SEARCHB","SEC","SECH","SECOND","SERIESSUM","SHEET","SHEETS","SIGN","SIN","SINH","SKEW","SKEW.P","SLN","SLOPE","SMALL","SQL.REQUEST","SQRT","SQRTPI","STANDARDIZE","STDEV","STDEV.P","STDEV.S","STDEVA","STDEVP","STDEVPA","STEYX","SUBSTITUTE","SUBTOTAL","SUM","SUMIF","SUMIFS","SUMPRODUCT","SUMSQ","SUMX2MY2","SUMX2PY2","SUMXMY2","SWITCH","SYD","T","TAN","TANH","TBILLEQ","TBILLPRICE","TBILLYIELD","T.DIST","T.DIST.2T","T.DIST.RT","TDIST","TEXT","TEXTJOIN","TIME","TIMEVALUE","T.INV","T.INV.2T","TINV","TODAY","TRANSPOSE","TREND","TRIM","TRIMMEAN","TRUE|0","TRUNC","T.TEST","TTEST","TYPE","UNICHAR","UNICODE","UPPER","VALUE","VAR","VAR.P","VAR.S","VARA","VARP","VARPA","VDB","VLOOKUP","WEBSERVICE","WEEKDAY","WEEKNUM","WEIBULL","WEIBULL.DIST","WORKDAY","WORKDAY.INTL","XIRR","XNPV","XOR","YEAR","YEARFRAC","YIELD","YIELDDISC","YIELDMAT","Z.TEST","ZTEST"]},contains:[{begin:/^=/,end:/[^=]/,returnEnd:!0,illegal:/=/,relevance:10},{className:"symbol",begin:/\b[A-Z]{1,2}\d+\b/,end:/[^\d]/,excludeEnd:!0,relevance:0},{className:"symbol",begin:/[A-Z]{0,2}\d*:[A-Z]{0,2}\d*/,relevance:0},e.BACKSLASH_ESCAPE,e.QUOTE_STRING_MODE,{className:"number",begin:e.NUMBER_RE+"(%)?",relevance:0},e.COMMENT(/\bN\(/,/\)/,{excludeBegin:!0,excludeEnd:!0,illegal:/\n/})]}}},function(e,t){e.exports=function(e){return{name:"FIX",contains:[{begin:/[^\u2401\u0001]+/,end:/[\u2401\u0001]/,excludeEnd:!0,returnBegin:!0,returnEnd:!1,contains:[{begin:/([^\u2401\u0001=]+)/,end:/=([^\u2401\u0001=]+)/,returnEnd:!0,returnBegin:!1,className:"attr"},{begin:/=/,end:/([\u2401\u0001])/,excludeEnd:!0,excludeBegin:!0,className:"string"}]}],case_insensitive:!0}}},function(e,t){e.exports=function(e){const t={className:"function",beginKeywords:"def",end:/[:={\[(\n;]/,excludeEnd:!0,contains:[{className:"title",relevance:0,begin:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/}]};return{name:"Flix",keywords:{keyword:["case","class","def","else","enum","if","impl","import","in","lat","rel","index","let","match","namespace","switch","type","yield","with"],literal:["true","false"]},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",begin:/'(.|\\[xXuU][a-zA-Z0-9]+)'/},{className:"string",variants:[{begin:'"',end:'"'}]},t,e.C_NUMBER_MODE]}}},function(e,t){e.exports=function(e){const t=e.regex,n={variants:[e.COMMENT("!","$",{relevance:0}),e.COMMENT("^C[ ]","$",{relevance:0}),e.COMMENT("^C$","$",{relevance:0})]},r=/(_[a-z_\d]+)?/,i=/([de][+-]?\d+)?/,o={className:"number",variants:[{begin:t.concat(/\b\d+/,/\.(\d*)/,i,r)},{begin:t.concat(/\b\d+/,i,r)},{begin:t.concat(/\.\d+/,i,r)}],relevance:0},a={className:"function",beginKeywords:"subroutine function program",illegal:"[${=\\n]",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"}]};return{name:"Fortran",case_insensitive:!0,aliases:["f90","f95"],keywords:{keyword:["kind","do","concurrent","local","shared","while","private","call","intrinsic","where","elsewhere","type","endtype","endmodule","endselect","endinterface","end","enddo","endif","if","forall","endforall","only","contains","default","return","stop","then","block","endblock","endassociate","public","subroutine|10","function","program",".and.",".or.",".not.",".le.",".eq.",".ge.",".gt.",".lt.","goto","save","else","use","module","select","case","access","blank","direct","exist","file","fmt","form","formatted","iostat","name","named","nextrec","number","opened","rec","recl","sequential","status","unformatted","unit","continue","format","pause","cycle","exit","c_null_char","c_alert","c_backspace","c_form_feed","flush","wait","decimal","round","iomsg","synchronous","nopass","non_overridable","pass","protected","volatile","abstract","extends","import","non_intrinsic","value","deferred","generic","final","enumerator","class","associate","bind","enum","c_int","c_short","c_long","c_long_long","c_signed_char","c_size_t","c_int8_t","c_int16_t","c_int32_t","c_int64_t","c_int_least8_t","c_int_least16_t","c_int_least32_t","c_int_least64_t","c_int_fast8_t","c_int_fast16_t","c_int_fast32_t","c_int_fast64_t","c_intmax_t","C_intptr_t","c_float","c_double","c_long_double","c_float_complex","c_double_complex","c_long_double_complex","c_bool","c_char","c_null_ptr","c_null_funptr","c_new_line","c_carriage_return","c_horizontal_tab","c_vertical_tab","iso_c_binding","c_loc","c_funloc","c_associated","c_f_pointer","c_ptr","c_funptr","iso_fortran_env","character_storage_size","error_unit","file_storage_size","input_unit","iostat_end","iostat_eor","numeric_storage_size","output_unit","c_f_procpointer","ieee_arithmetic","ieee_support_underflow_control","ieee_get_underflow_mode","ieee_set_underflow_mode","newunit","contiguous","recursive","pad","position","action","delim","readwrite","eor","advance","nml","interface","procedure","namelist","include","sequence","elemental","pure","impure","integer","real","character","complex","logical","codimension","dimension","allocatable|10","parameter","external","implicit|10","none","double","precision","assign","intent","optional","pointer","target","in","out","common","equivalence","data"],literal:[".False.",".True."],built_in:["alog","alog10","amax0","amax1","amin0","amin1","amod","cabs","ccos","cexp","clog","csin","csqrt","dabs","dacos","dasin","datan","datan2","dcos","dcosh","ddim","dexp","dint","dlog","dlog10","dmax1","dmin1","dmod","dnint","dsign","dsin","dsinh","dsqrt","dtan","dtanh","float","iabs","idim","idint","idnint","ifix","isign","max0","max1","min0","min1","sngl","algama","cdabs","cdcos","cdexp","cdlog","cdsin","cdsqrt","cqabs","cqcos","cqexp","cqlog","cqsin","cqsqrt","dcmplx","dconjg","derf","derfc","dfloat","dgamma","dimag","dlgama","iqint","qabs","qacos","qasin","qatan","qatan2","qcmplx","qconjg","qcos","qcosh","qdim","qerf","qerfc","qexp","qgamma","qimag","qlgama","qlog","qlog10","qmax1","qmin1","qmod","qnint","qsign","qsin","qsinh","qsqrt","qtan","qtanh","abs","acos","aimag","aint","anint","asin","atan","atan2","char","cmplx","conjg","cos","cosh","exp","ichar","index","int","log","log10","max","min","nint","sign","sin","sinh","sqrt","tan","tanh","print","write","dim","lge","lgt","lle","llt","mod","nullify","allocate","deallocate","adjustl","adjustr","all","allocated","any","associated","bit_size","btest","ceiling","count","cshift","date_and_time","digits","dot_product","eoshift","epsilon","exponent","floor","fraction","huge","iand","ibclr","ibits","ibset","ieor","ior","ishft","ishftc","lbound","len_trim","matmul","maxexponent","maxloc","maxval","merge","minexponent","minloc","minval","modulo","mvbits","nearest","pack","present","product","radix","random_number","random_seed","range","repeat","reshape","rrspacing","scale","scan","selected_int_kind","selected_real_kind","set_exponent","shape","size","spacing","spread","sum","system_clock","tiny","transpose","trim","ubound","unpack","verify","achar","iachar","transfer","dble","entry","dprod","cpu_time","command_argument_count","get_command","get_command_argument","get_environment_variable","is_iostat_end","ieee_arithmetic","ieee_support_underflow_control","ieee_get_underflow_mode","ieee_set_underflow_mode","is_iostat_eor","move_alloc","new_line","selected_char_kind","same_type_as","extends_type_of","acosh","asinh","atanh","bessel_j0","bessel_j1","bessel_jn","bessel_y0","bessel_y1","bessel_yn","erf","erfc","erfc_scaled","gamma","log_gamma","hypot","norm2","atomic_define","atomic_ref","execute_command_line","leadz","trailz","storage_size","merge_bits","bge","bgt","ble","blt","dshiftl","dshiftr","findloc","iall","iany","iparity","image_index","lcobound","ucobound","maskl","maskr","num_images","parity","popcnt","poppar","shifta","shiftl","shiftr","this_image","sync","change","team","co_broadcast","co_max","co_min","co_sum","co_reduce"]},illegal:/\/\*/,contains:[{className:"string",relevance:0,variants:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},a,{begin:/^C\s*=(?!=)/,relevance:0},n,o]}}},function(e,t){function n(e){return new RegExp(e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")}function r(e){return e?"string"==typeof e?e:e.source:null}function i(e){return o("(?=",e,")")}function o(...e){return e.map((e=>r(e))).join("")}function a(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e);return"("+(t.capture?"":"?:")+e.map((e=>r(e))).join("|")+")"}e.exports=function(e){const t={scope:"keyword",match:/\b(yield|return|let|do|match|use)!/},r=["bool","byte","sbyte","int8","int16","int32","uint8","uint16","uint32","int","uint","int64","uint64","nativeint","unativeint","decimal","float","double","float32","single","char","string","unit","bigint","option","voption","list","array","seq","byref","exn","inref","nativeptr","obj","outref","voidptr","Result"],s={keyword:["abstract","and","as","assert","base","begin","class","default","delegate","do","done","downcast","downto","elif","else","end","exception","extern","finally","fixed","for","fun","function","global","if","in","inherit","inline","interface","internal","lazy","let","match","member","module","mutable","namespace","new","of","open","or","override","private","public","rec","return","static","struct","then","to","try","type","upcast","use","val","void","when","while","with","yield"],literal:["true","false","null","Some","None","Ok","Error","infinity","infinityf","nan","nanf"],built_in:["not","ref","raise","reraise","dict","readOnlyDict","set","get","enum","sizeof","typeof","typedefof","nameof","nullArg","invalidArg","invalidOp","id","fst","snd","ignore","lock","using","box","unbox","tryUnbox","printf","printfn","sprintf","eprintf","eprintfn","fprintf","fprintfn","failwith","failwithf"],"variable.constant":["__LINE__","__SOURCE_DIRECTORY__","__SOURCE_FILE__"]},l={variants:[e.COMMENT(/\(\*(?!\))/,/\*\)/,{contains:["self"]}),e.C_LINE_COMMENT_MODE]},c={scope:"variable",begin:/``/,end:/``/},u=/\B('|\^)/,d={scope:"symbol",variants:[{match:o(u,/``.*?``/)},{match:o(u,e.UNDERSCORE_IDENT_RE)}],relevance:0},h=function({includeEqual:e}){let t;t=e?"!%&*+-/<=>@^|~?":"!%&*+-/<>@^|~?";const r=o("[",...Array.from(t).map(n),"]"),s=a(r,/\./),l=o(s,i(s)),c=a(o(l,s,"*"),o(r,"+"));return{scope:"operator",match:a(c,/:\?>/,/:\?/,/:>/,/:=/,/::?/,/\$/),relevance:0}},p=h({includeEqual:!0}),m=h({includeEqual:!1}),g=function(t,n){return{begin:o(t,i(o(/\s*/,a(/\w/,/'/,/\^/,/#/,/``/,/\(/,/{\|/)))),beginScope:n,end:i(a(/\n/,/=/)),relevance:0,keywords:e.inherit(s,{type:r}),contains:[l,d,e.inherit(c,{scope:null}),m]}},f=g(/:/,"operator"),_=g(/\bof\b/,"keyword"),b={begin:[/(^|\s+)/,/type/,/\s+/,/[a-zA-Z_](\w|')*/],beginScope:{2:"keyword",4:"title.class"},end:i(/\(|=|$/),keywords:s,contains:[l,e.inherit(c,{scope:null}),d,{scope:"operator",match:/<|>/},f]},v={scope:"computation-expression",match:/\b[_a-z]\w*(?=\s*\{)/},y={begin:[/^\s*/,o(/#/,a("if","else","endif","line","nowarn","light","r","i","I","load","time","help","quit")),/\b/],beginScope:{2:"meta"},end:i(/\s|$/)},E={variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]},S={scope:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]},w={scope:"string",begin:/@"/,end:/"/,contains:[{match:/""/},e.BACKSLASH_ESCAPE]},T={scope:"string",begin:/"""/,end:/"""/,relevance:2},C={scope:"subst",begin:/\{/,end:/\}/,keywords:s},x={scope:"string",begin:/\$"/,end:/"/,contains:[{match:/\{\{/},{match:/\}\}/},e.BACKSLASH_ESCAPE,C]},F={scope:"string",begin:/(\$@|@\$)"/,end:/"/,contains:[{match:/\{\{/},{match:/\}\}/},{match:/""/},e.BACKSLASH_ESCAPE,C]},D={scope:"string",begin:/\$"""/,end:/"""/,contains:[{match:/\{\{/},{match:/\}\}/},C],relevance:2},k={scope:"string",match:o(/'/,a(/[^\\']/,/\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8})/),/'/)};return C.contains=[F,x,w,S,k,t,l,c,f,v,y,E,d,p],{name:"F#",aliases:["fs","f#"],keywords:s,illegal:/\/\*/,classNameAliases:{"computation-expression":"keyword"},contains:[t,{variants:[D,F,x,T,w,S,k]},l,c,b,{scope:"meta",begin:/\[</,end:/>\]/,relevance:2,contains:[c,T,w,S,k,E]},_,f,v,y,E,d,p]}}},function(e,t){e.exports=function(e){const t=e.regex,n={keyword:"abort acronym acronyms alias all and assign binary card diag display else eq file files for free ge gt if integer le loop lt maximizing minimizing model models ne negative no not option options or ord positive prod put putpage puttl repeat sameas semicont semiint smax smin solve sos1 sos2 sum system table then until using while xor yes",literal:"eps inf na",built_in:"abs arccos arcsin arctan arctan2 Beta betaReg binomial ceil centropy cos cosh cvPower div div0 eDist entropy errorf execSeed exp fact floor frac gamma gammaReg log logBeta logGamma log10 log2 mapVal max min mod ncpCM ncpF ncpVUpow ncpVUsin normal pi poly power randBinomial randLinear randTriangle round rPower sigmoid sign signPower sin sinh slexp sllog10 slrec sqexp sqlog10 sqr sqrec sqrt tan tanh trunc uniform uniformInt vcPower bool_and bool_eqv bool_imp bool_not bool_or bool_xor ifThen rel_eq rel_ge rel_gt rel_le rel_lt rel_ne gday gdow ghour gleap gmillisec gminute gmonth gsecond gyear jdate jnow jstart jtime errorLevel execError gamsRelease gamsVersion handleCollect handleDelete handleStatus handleSubmit heapFree heapLimit heapSize jobHandle jobKill jobStatus jobTerminate licenseLevel licenseStatus maxExecError sleep timeClose timeComp timeElapsed timeExec timeStart"},r={className:"symbol",variants:[{begin:/=[lgenxc]=/},{begin:/\$/}]},i={className:"comment",variants:[{begin:"'",end:"'"},{begin:'"',end:'"'}],illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},o={begin:"/",end:"/",keywords:n,contains:[i,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_NUMBER_MODE]},a=/[a-z0-9&#*=?@\\><:,()$[\]_.{}!+%^-]+/,s={begin:/[a-z][a-z0-9_]*(\([a-z0-9_, ]*\))?[ \t]+/,excludeBegin:!0,end:"$",endsWithParent:!0,contains:[i,o,{className:"comment",begin:t.concat(a,t.anyNumberOfTimes(t.concat(/[ ]+/,a))),relevance:0}]};return{name:"GAMS",aliases:["gms"],case_insensitive:!0,keywords:n,contains:[e.COMMENT(/^\$ontext/,/^\$offtext/),{className:"meta",begin:"^\\$[a-z0-9]+",end:"$",returnBegin:!0,contains:[{className:"keyword",begin:"^\\$[a-z0-9]+"}]},e.COMMENT("^\\*","$"),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{beginKeywords:"set sets parameter parameters variable variables scalar scalars equation equations",end:";",contains:[e.COMMENT("^\\*","$"),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,o,s]},{beginKeywords:"table",end:";",returnBegin:!0,contains:[{beginKeywords:"table",end:"$",contains:[s]},e.COMMENT("^\\*","$"),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_NUMBER_MODE]},{className:"function",begin:/^[a-z][a-z0-9_,\-+' ()$]+\.{2}/,returnBegin:!0,contains:[{className:"title",begin:/^[a-z0-9_]+/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0},r]},e.C_NUMBER_MODE,r]}}},function(e,t){e.exports=function(e){const t={keyword:"bool break call callexe checkinterrupt clear clearg closeall cls comlog compile continue create debug declare delete disable dlibrary dllcall do dos ed edit else elseif enable end endfor endif endp endo errorlog errorlogat expr external fn for format goto gosub graph if keyword let lib library line load loadarray loadexe loadf loadk loadm loadp loads loadx local locate loopnextindex lprint lpwidth lshow matrix msym ndpclex new open output outwidth plot plotsym pop prcsn print printdos proc push retp return rndcon rndmod rndmult rndseed run save saveall screen scroll setarray show sparse stop string struct system trace trap threadfor threadendfor threadbegin threadjoin threadstat threadend until use while winprint ne ge le gt lt and xor or not eq eqv",built_in:"abs acf aconcat aeye amax amean AmericanBinomCall AmericanBinomCall_Greeks AmericanBinomCall_ImpVol AmericanBinomPut AmericanBinomPut_Greeks AmericanBinomPut_ImpVol AmericanBSCall AmericanBSCall_Greeks AmericanBSCall_ImpVol AmericanBSPut AmericanBSPut_Greeks AmericanBSPut_ImpVol amin amult annotationGetDefaults annotationSetBkd annotationSetFont annotationSetLineColor annotationSetLineStyle annotationSetLineThickness annualTradingDays arccos arcsin areshape arrayalloc arrayindex arrayinit arraytomat asciiload asclabel astd astds asum atan atan2 atranspose axmargin balance band bandchol bandcholsol bandltsol bandrv bandsolpd bar base10 begwind besselj bessely beta box boxcox cdfBeta cdfBetaInv cdfBinomial cdfBinomialInv cdfBvn cdfBvn2 cdfBvn2e cdfCauchy cdfCauchyInv cdfChic cdfChii cdfChinc cdfChincInv cdfExp cdfExpInv cdfFc cdfFnc cdfFncInv cdfGam cdfGenPareto cdfHyperGeo cdfLaplace cdfLaplaceInv cdfLogistic cdfLogisticInv cdfmControlCreate cdfMvn cdfMvn2e cdfMvnce cdfMvne cdfMvt2e cdfMvtce cdfMvte cdfN cdfN2 cdfNc cdfNegBinomial cdfNegBinomialInv cdfNi cdfPoisson cdfPoissonInv cdfRayleigh cdfRayleighInv cdfTc cdfTci cdfTnc cdfTvn cdfWeibull cdfWeibullInv cdir ceil ChangeDir chdir chiBarSquare chol choldn cholsol cholup chrs close code cols colsf combinate combinated complex con cond conj cons ConScore contour conv convertsatostr convertstrtosa corrm corrms corrvc corrx corrxs cos cosh counts countwts crossprd crout croutp csrcol csrlin csvReadM csvReadSA cumprodc cumsumc curve cvtos datacreate datacreatecomplex datalist dataload dataloop dataopen datasave date datestr datestring datestrymd dayinyr dayofweek dbAddDatabase dbClose dbCommit dbCreateQuery dbExecQuery dbGetConnectOptions dbGetDatabaseName dbGetDriverName dbGetDrivers dbGetHostName dbGetLastErrorNum dbGetLastErrorText dbGetNumericalPrecPolicy dbGetPassword dbGetPort dbGetTableHeaders dbGetTables dbGetUserName dbHasFeature dbIsDriverAvailable dbIsOpen dbIsOpenError dbOpen dbQueryBindValue dbQueryClear dbQueryCols dbQueryExecPrepared dbQueryFetchAllM dbQueryFetchAllSA dbQueryFetchOneM dbQueryFetchOneSA dbQueryFinish dbQueryGetBoundValue dbQueryGetBoundValues dbQueryGetField dbQueryGetLastErrorNum dbQueryGetLastErrorText dbQueryGetLastInsertID dbQueryGetLastQuery dbQueryGetPosition dbQueryIsActive dbQueryIsForwardOnly dbQueryIsNull dbQueryIsSelect dbQueryIsValid dbQueryPrepare dbQueryRows dbQuerySeek dbQuerySeekFirst dbQuerySeekLast dbQuerySeekNext dbQuerySeekPrevious dbQuerySetForwardOnly dbRemoveDatabase dbRollback dbSetConnectOptions dbSetDatabaseName dbSetHostName dbSetNumericalPrecPolicy dbSetPort dbSetUserName dbTransaction DeleteFile delif delrows denseToSp denseToSpRE denToZero design det detl dfft dffti diag diagrv digamma doswin DOSWinCloseall DOSWinOpen dotfeq dotfeqmt dotfge dotfgemt dotfgt dotfgtmt dotfle dotflemt dotflt dotfltmt dotfne dotfnemt draw drop dsCreate dstat dstatmt dstatmtControlCreate dtdate dtday dttime dttodtv dttostr dttoutc dtvnormal dtvtodt dtvtoutc dummy dummybr dummydn eig eigh eighv eigv elapsedTradingDays endwind envget eof eqSolve eqSolvemt eqSolvemtControlCreate eqSolvemtOutCreate eqSolveset erf erfc erfccplx erfcplx error etdays ethsec etstr EuropeanBinomCall EuropeanBinomCall_Greeks EuropeanBinomCall_ImpVol EuropeanBinomPut EuropeanBinomPut_Greeks EuropeanBinomPut_ImpVol EuropeanBSCall EuropeanBSCall_Greeks EuropeanBSCall_ImpVol EuropeanBSPut EuropeanBSPut_Greeks EuropeanBSPut_ImpVol exctsmpl exec execbg exp extern eye fcheckerr fclearerr feq feqmt fflush fft ffti fftm fftmi fftn fge fgemt fgets fgetsa fgetsat fgetst fgt fgtmt fileinfo filesa fle flemt floor flt fltmt fmod fne fnemt fonts fopen formatcv formatnv fputs fputst fseek fstrerror ftell ftocv ftos ftostrC gamma gammacplx gammaii gausset gdaAppend gdaCreate gdaDStat gdaDStatMat gdaGetIndex gdaGetName gdaGetNames gdaGetOrders gdaGetType gdaGetTypes gdaGetVarInfo gdaIsCplx gdaLoad gdaPack gdaRead gdaReadByIndex gdaReadSome gdaReadSparse gdaReadStruct gdaReportVarInfo gdaSave gdaUpdate gdaUpdateAndPack gdaVars gdaWrite gdaWrite32 gdaWriteSome getarray getdims getf getGAUSShome getmatrix getmatrix4D getname getnamef getNextTradingDay getNextWeekDay getnr getorders getpath getPreviousTradingDay getPreviousWeekDay getRow getscalar3D getscalar4D getTrRow getwind glm gradcplx gradMT gradMTm gradMTT gradMTTm gradp graphprt graphset hasimag header headermt hess hessMT hessMTg hessMTgw hessMTm hessMTmw hessMTT hessMTTg hessMTTgw hessMTTm hessMTw hessp hist histf histp hsec imag indcv indexcat indices indices2 indicesf indicesfn indnv indsav integrate1d integrateControlCreate intgrat2 intgrat3 inthp1 inthp2 inthp3 inthp4 inthpControlCreate intquad1 intquad2 intquad3 intrleav intrleavsa intrsect intsimp inv invpd invswp iscplx iscplxf isden isinfnanmiss ismiss key keyav keyw lag lag1 lagn lapEighb lapEighi lapEighvb lapEighvi lapgEig lapgEigh lapgEighv lapgEigv lapgSchur lapgSvdcst lapgSvds lapgSvdst lapSvdcusv lapSvds lapSvdusv ldlp ldlsol linSolve listwise ln lncdfbvn lncdfbvn2 lncdfmvn lncdfn lncdfn2 lncdfnc lnfact lngammacplx lnpdfmvn lnpdfmvt lnpdfn lnpdft loadd loadstruct loadwind loess loessmt loessmtControlCreate log loglog logx logy lower lowmat lowmat1 ltrisol lu lusol machEpsilon make makevars makewind margin matalloc matinit mattoarray maxbytes maxc maxindc maxv maxvec mbesselei mbesselei0 mbesselei1 mbesseli mbesseli0 mbesseli1 meanc median mergeby mergevar minc minindc minv miss missex missrv moment momentd movingave movingaveExpwgt movingaveWgt nextindex nextn nextnevn nextwind ntos null null1 numCombinations ols olsmt olsmtControlCreate olsqr olsqr2 olsqrmt ones optn optnevn orth outtyp pacf packedToSp packr parse pause pdfCauchy pdfChi pdfExp pdfGenPareto pdfHyperGeo pdfLaplace pdfLogistic pdfn pdfPoisson pdfRayleigh pdfWeibull pi pinv pinvmt plotAddArrow plotAddBar plotAddBox plotAddHist plotAddHistF plotAddHistP plotAddPolar plotAddScatter plotAddShape plotAddTextbox plotAddTS plotAddXY plotArea plotBar plotBox plotClearLayout plotContour plotCustomLayout plotGetDefaults plotHist plotHistF plotHistP plotLayout plotLogLog plotLogX plotLogY plotOpenWindow plotPolar plotSave plotScatter plotSetAxesPen plotSetBar plotSetBarFill plotSetBarStacked plotSetBkdColor plotSetFill plotSetGrid plotSetLegend plotSetLineColor plotSetLineStyle plotSetLineSymbol plotSetLineThickness plotSetNewWindow plotSetTitle plotSetWhichYAxis plotSetXAxisShow plotSetXLabel plotSetXRange plotSetXTicInterval plotSetXTicLabel plotSetYAxisShow plotSetYLabel plotSetYRange plotSetZAxisShow plotSetZLabel plotSurface plotTS plotXY polar polychar polyeval polygamma polyint polymake polymat polymroot polymult polyroot pqgwin previousindex princomp printfm printfmt prodc psi putarray putf putvals pvCreate pvGetIndex pvGetParNames pvGetParVector pvLength pvList pvPack pvPacki pvPackm pvPackmi pvPacks pvPacksi pvPacksm pvPacksmi pvPutParVector pvTest pvUnpack QNewton QNewtonmt QNewtonmtControlCreate QNewtonmtOutCreate QNewtonSet QProg QProgmt QProgmtInCreate qqr qqre qqrep qr qre qrep qrsol qrtsol qtyr qtyre qtyrep quantile quantiled qyr qyre qyrep qz rank rankindx readr real reclassify reclassifyCuts recode recserar recsercp recserrc rerun rescale reshape rets rev rfft rffti rfftip rfftn rfftnp rfftp rndBernoulli rndBeta rndBinomial rndCauchy rndChiSquare rndCon rndCreateState rndExp rndGamma rndGeo rndGumbel rndHyperGeo rndi rndKMbeta rndKMgam rndKMi rndKMn rndKMnb rndKMp rndKMu rndKMvm rndLaplace rndLCbeta rndLCgam rndLCi rndLCn rndLCnb rndLCp rndLCu rndLCvm rndLogNorm rndMTu rndMVn rndMVt rndn rndnb rndNegBinomial rndp rndPoisson rndRayleigh rndStateSkip rndu rndvm rndWeibull rndWishart rotater round rows rowsf rref sampleData satostrC saved saveStruct savewind scale scale3d scalerr scalinfnanmiss scalmiss schtoc schur searchsourcepath seekr select selif seqa seqm setdif setdifsa setvars setvwrmode setwind shell shiftr sin singleindex sinh sleep solpd sortc sortcc sortd sorthc sorthcc sortind sortindc sortmc sortr sortrc spBiconjGradSol spChol spConjGradSol spCreate spDenseSubmat spDiagRvMat spEigv spEye spLDL spline spLU spNumNZE spOnes spreadSheetReadM spreadSheetReadSA spreadSheetWrite spScale spSubmat spToDense spTrTDense spTScalar spZeros sqpSolve sqpSolveMT sqpSolveMTControlCreate sqpSolveMTlagrangeCreate sqpSolveMToutCreate sqpSolveSet sqrt statements stdc stdsc stocv stof strcombine strindx strlen strput strrindx strsect strsplit strsplitPad strtodt strtof strtofcplx strtriml strtrimr strtrunc strtruncl strtruncpad strtruncr submat subscat substute subvec sumc sumr surface svd svd1 svd2 svdcusv svds svdusv sysstate tab tan tanh tempname time timedt timestr timeutc title tkf2eps tkf2ps tocart todaydt toeplitz token topolar trapchk trigamma trimr trunc type typecv typef union unionsa uniqindx uniqindxsa unique uniquesa upmat upmat1 upper utctodt utctodtv utrisol vals varCovMS varCovXS varget vargetl varmall varmares varput varputl vartypef vcm vcms vcx vcxs vec vech vecr vector vget view viewxyz vlist vnamecv volume vput vread vtypecv wait waitc walkindex where window writer xlabel xlsGetSheetCount xlsGetSheetSize xlsGetSheetTypes xlsMakeRange xlsReadM xlsReadSA xlsWrite xlsWriteM xlsWriteSA xpnd xtics xy xyz ylabel ytics zeros zeta zlabel ztics cdfEmpirical dot h5create h5open h5read h5readAttribute h5write h5writeAttribute ldl plotAddErrorBar plotAddSurface plotCDFEmpirical plotSetColormap plotSetContourLabels plotSetLegendFont plotSetTextInterpreter plotSetXTicCount plotSetYTicCount plotSetZLevels powerm strjoin sylvester strtrim",literal:"DB_AFTER_LAST_ROW DB_ALL_TABLES DB_BATCH_OPERATIONS DB_BEFORE_FIRST_ROW DB_BLOB DB_EVENT_NOTIFICATIONS DB_FINISH_QUERY DB_HIGH_PRECISION DB_LAST_INSERT_ID DB_LOW_PRECISION_DOUBLE DB_LOW_PRECISION_INT32 DB_LOW_PRECISION_INT64 DB_LOW_PRECISION_NUMBERS DB_MULTIPLE_RESULT_SETS DB_NAMED_PLACEHOLDERS DB_POSITIONAL_PLACEHOLDERS DB_PREPARED_QUERIES DB_QUERY_SIZE DB_SIMPLE_LOCKING DB_SYSTEM_TABLES DB_TABLES DB_TRANSACTIONS DB_UNICODE DB_VIEWS __STDIN __STDOUT __STDERR __FILE_DIR"},n=e.COMMENT("@","@"),r={className:"meta",begin:"#",end:"$",keywords:{keyword:"define definecs|10 undef ifdef ifndef iflight ifdllcall ifmac ifos2win ifunix else endif lineson linesoff srcfile srcline"},contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",end:"$",keywords:{keyword:"include"},contains:[{className:"string",begin:'"',end:'"',illegal:"\\n"}]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n]},i={begin:/\bstruct\s+/,end:/\s/,keywords:"struct",contains:[{className:"type",begin:e.UNDERSCORE_IDENT_RE,relevance:0}]},o=[{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,endsWithParent:!0,relevance:0,contains:[{className:"literal",begin:/\.\.\./},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,i]}],a={className:"title",begin:e.UNDERSCORE_IDENT_RE,relevance:0},s=function(t,r,i){const s=e.inherit({className:"function",beginKeywords:t,end:r,excludeEnd:!0,contains:[].concat(o)},i||{});return s.contains.push(a),s.contains.push(e.C_NUMBER_MODE),s.contains.push(e.C_BLOCK_COMMENT_MODE),s.contains.push(n),s},l={className:"built_in",begin:"\\b("+t.built_in.split(" ").join("|")+")\\b"},c={className:"string",begin:'"',end:'"',contains:[e.BACKSLASH_ESCAPE],relevance:0},u={begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,keywords:t,relevance:0,contains:[{beginKeywords:t.keyword},l,{className:"built_in",begin:e.UNDERSCORE_IDENT_RE,relevance:0}]},d={begin:/\(/,end:/\)/,relevance:0,keywords:{built_in:t.built_in,literal:t.literal},contains:[e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,l,u,c,"self"]};return u.contains.push(d),{name:"GAUSS",aliases:["gss"],case_insensitive:!0,keywords:t,illegal:/(\{[%#]|[%#]\}| <- )/,contains:[e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,c,r,{className:"keyword",begin:/\bexternal (matrix|string|array|sparse matrix|struct|proc|keyword|fn)/},s("proc keyword",";"),s("fn","="),{beginKeywords:"for threadfor",end:/;/,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE,n,d]},{variants:[{begin:e.UNDERSCORE_IDENT_RE+"\\."+e.UNDERSCORE_IDENT_RE},{begin:e.UNDERSCORE_IDENT_RE+"\\s*="}],relevance:0},u,i]}}},function(e,t){e.exports=function(e){const t={$pattern:"[A-Z_][A-Z0-9_.]*",keyword:"IF DO WHILE ENDWHILE CALL ENDIF SUB ENDSUB GOTO REPEAT ENDREPEAT EQ LT GT NE GE LE OR XOR"},n=e.inherit(e.C_NUMBER_MODE,{begin:"([-+]?((\\.\\d+)|(\\d+)(\\.\\d*)?))|"+e.C_NUMBER_RE}),r=[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT(/\(/,/\)/),n,e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"name",begin:"([G])([0-9]+\\.?[0-9]?)"},{className:"name",begin:"([M])([0-9]+\\.?[0-9]?)"},{className:"attr",begin:"(VC|VS|#)",end:"(\\d+)"},{className:"attr",begin:"(VZOFX|VZOFY|VZOFZ)"},{className:"built_in",begin:"(ATAN|ABS|ACOS|ASIN|SIN|COS|EXP|FIX|FUP|ROUND|LN|TAN)(\\[)",contains:[n],end:"\\]"},{className:"symbol",variants:[{begin:"N",end:"\\d+",illegal:"\\W"}]}];return{name:"G-code (ISO 6983)",aliases:["nc"],case_insensitive:!0,keywords:t,contains:[{className:"meta",begin:"%"},{className:"meta",begin:"([O])([0-9]+)"}].concat(r)}}},function(e,t){e.exports=function(e){return{name:"Gherkin",aliases:["feature"],keywords:"Feature Background Ability Business Need Scenario Scenarios Scenario Outline Scenario Template Examples Given And Then But When",contains:[{className:"symbol",begin:"\\*",relevance:0},{className:"meta",begin:"@[^@\\s]+"},{begin:"\\|",end:"\\|\\w*$",contains:[{className:"string",begin:"[^|]+"}]},{className:"variable",begin:"<",end:">"},e.HASH_COMMENT_MODE,{className:"string",begin:'"""',end:'"""'},e.QUOTE_STRING_MODE]}}},function(e,t){e.exports=function(e){return{name:"GLSL",keywords:{keyword:"break continue discard do else for if return while switch case default attribute binding buffer ccw centroid centroid varying coherent column_major const cw depth_any depth_greater depth_less depth_unchanged early_fragment_tests equal_spacing flat fractional_even_spacing fractional_odd_spacing highp in index inout invariant invocations isolines layout line_strip lines lines_adjacency local_size_x local_size_y local_size_z location lowp max_vertices mediump noperspective offset origin_upper_left out packed patch pixel_center_integer point_mode points precise precision quads r11f_g11f_b10f r16 r16_snorm r16f r16i r16ui r32f r32i r32ui r8 r8_snorm r8i r8ui readonly restrict rg16 rg16_snorm rg16f rg16i rg16ui rg32f rg32i rg32ui rg8 rg8_snorm rg8i rg8ui rgb10_a2 rgb10_a2ui rgba16 rgba16_snorm rgba16f rgba16i rgba16ui rgba32f rgba32i rgba32ui rgba8 rgba8_snorm rgba8i rgba8ui row_major sample shared smooth std140 std430 stream triangle_strip triangles triangles_adjacency uniform varying vertices volatile writeonly",type:"atomic_uint bool bvec2 bvec3 bvec4 dmat2 dmat2x2 dmat2x3 dmat2x4 dmat3 dmat3x2 dmat3x3 dmat3x4 dmat4 dmat4x2 dmat4x3 dmat4x4 double dvec2 dvec3 dvec4 float iimage1D iimage1DArray iimage2D iimage2DArray iimage2DMS iimage2DMSArray iimage2DRect iimage3D iimageBuffer iimageCube iimageCubeArray image1D image1DArray image2D image2DArray image2DMS image2DMSArray image2DRect image3D imageBuffer imageCube imageCubeArray int isampler1D isampler1DArray isampler2D isampler2DArray isampler2DMS isampler2DMSArray isampler2DRect isampler3D isamplerBuffer isamplerCube isamplerCubeArray ivec2 ivec3 ivec4 mat2 mat2x2 mat2x3 mat2x4 mat3 mat3x2 mat3x3 mat3x4 mat4 mat4x2 mat4x3 mat4x4 sampler1D sampler1DArray sampler1DArrayShadow sampler1DShadow sampler2D sampler2DArray sampler2DArrayShadow sampler2DMS sampler2DMSArray sampler2DRect sampler2DRectShadow sampler2DShadow sampler3D samplerBuffer samplerCube samplerCubeArray samplerCubeArrayShadow samplerCubeShadow image1D uimage1DArray uimage2D uimage2DArray uimage2DMS uimage2DMSArray uimage2DRect uimage3D uimageBuffer uimageCube uimageCubeArray uint usampler1D usampler1DArray usampler2D usampler2DArray usampler2DMS usampler2DMSArray usampler2DRect usampler3D samplerBuffer usamplerCube usamplerCubeArray uvec2 uvec3 uvec4 vec2 vec3 vec4 void",built_in:"gl_MaxAtomicCounterBindings gl_MaxAtomicCounterBufferSize gl_MaxClipDistances gl_MaxClipPlanes gl_MaxCombinedAtomicCounterBuffers gl_MaxCombinedAtomicCounters gl_MaxCombinedImageUniforms gl_MaxCombinedImageUnitsAndFragmentOutputs gl_MaxCombinedTextureImageUnits gl_MaxComputeAtomicCounterBuffers gl_MaxComputeAtomicCounters gl_MaxComputeImageUniforms gl_MaxComputeTextureImageUnits gl_MaxComputeUniformComponents gl_MaxComputeWorkGroupCount gl_MaxComputeWorkGroupSize gl_MaxDrawBuffers gl_MaxFragmentAtomicCounterBuffers gl_MaxFragmentAtomicCounters gl_MaxFragmentImageUniforms gl_MaxFragmentInputComponents gl_MaxFragmentInputVectors gl_MaxFragmentUniformComponents gl_MaxFragmentUniformVectors gl_MaxGeometryAtomicCounterBuffers gl_MaxGeometryAtomicCounters gl_MaxGeometryImageUniforms gl_MaxGeometryInputComponents gl_MaxGeometryOutputComponents gl_MaxGeometryOutputVertices gl_MaxGeometryTextureImageUnits gl_MaxGeometryTotalOutputComponents gl_MaxGeometryUniformComponents gl_MaxGeometryVaryingComponents gl_MaxImageSamples gl_MaxImageUnits gl_MaxLights gl_MaxPatchVertices gl_MaxProgramTexelOffset gl_MaxTessControlAtomicCounterBuffers gl_MaxTessControlAtomicCounters gl_MaxTessControlImageUniforms gl_MaxTessControlInputComponents gl_MaxTessControlOutputComponents gl_MaxTessControlTextureImageUnits gl_MaxTessControlTotalOutputComponents gl_MaxTessControlUniformComponents gl_MaxTessEvaluationAtomicCounterBuffers gl_MaxTessEvaluationAtomicCounters gl_MaxTessEvaluationImageUniforms gl_MaxTessEvaluationInputComponents gl_MaxTessEvaluationOutputComponents gl_MaxTessEvaluationTextureImageUnits gl_MaxTessEvaluationUniformComponents gl_MaxTessGenLevel gl_MaxTessPatchComponents gl_MaxTextureCoords gl_MaxTextureImageUnits gl_MaxTextureUnits gl_MaxVaryingComponents gl_MaxVaryingFloats gl_MaxVaryingVectors gl_MaxVertexAtomicCounterBuffers gl_MaxVertexAtomicCounters gl_MaxVertexAttribs gl_MaxVertexImageUniforms gl_MaxVertexOutputComponents gl_MaxVertexOutputVectors gl_MaxVertexTextureImageUnits gl_MaxVertexUniformComponents gl_MaxVertexUniformVectors gl_MaxViewports gl_MinProgramTexelOffset gl_BackColor gl_BackLightModelProduct gl_BackLightProduct gl_BackMaterial gl_BackSecondaryColor gl_ClipDistance gl_ClipPlane gl_ClipVertex gl_Color gl_DepthRange gl_EyePlaneQ gl_EyePlaneR gl_EyePlaneS gl_EyePlaneT gl_Fog gl_FogCoord gl_FogFragCoord gl_FragColor gl_FragCoord gl_FragData gl_FragDepth gl_FrontColor gl_FrontFacing gl_FrontLightModelProduct gl_FrontLightProduct gl_FrontMaterial gl_FrontSecondaryColor gl_GlobalInvocationID gl_InstanceID gl_InvocationID gl_Layer gl_LightModel gl_LightSource gl_LocalInvocationID gl_LocalInvocationIndex gl_ModelViewMatrix gl_ModelViewMatrixInverse gl_ModelViewMatrixInverseTranspose gl_ModelViewMatrixTranspose gl_ModelViewProjectionMatrix gl_ModelViewProjectionMatrixInverse gl_ModelViewProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixTranspose gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_Normal gl_NormalMatrix gl_NormalScale gl_NumSamples gl_NumWorkGroups gl_ObjectPlaneQ gl_ObjectPlaneR gl_ObjectPlaneS gl_ObjectPlaneT gl_PatchVerticesIn gl_Point gl_PointCoord gl_PointSize gl_Position gl_PrimitiveID gl_PrimitiveIDIn gl_ProjectionMatrix gl_ProjectionMatrixInverse gl_ProjectionMatrixInverseTranspose gl_ProjectionMatrixTranspose gl_SampleID gl_SampleMask gl_SampleMaskIn gl_SamplePosition gl_SecondaryColor gl_TessCoord gl_TessLevelInner gl_TessLevelOuter gl_TexCoord gl_TextureEnvColor gl_TextureMatrix gl_TextureMatrixInverse gl_TextureMatrixInverseTranspose gl_TextureMatrixTranspose gl_Vertex gl_VertexID gl_ViewportIndex gl_WorkGroupID gl_WorkGroupSize gl_in gl_out EmitStreamVertex EmitVertex EndPrimitive EndStreamPrimitive abs acos acosh all any asin asinh atan atanh atomicAdd atomicAnd atomicCompSwap atomicCounter atomicCounterDecrement atomicCounterIncrement atomicExchange atomicMax atomicMin atomicOr atomicXor barrier bitCount bitfieldExtract bitfieldInsert bitfieldReverse ceil clamp cos cosh cross dFdx dFdy degrees determinant distance dot equal exp exp2 faceforward findLSB findMSB floatBitsToInt floatBitsToUint floor fma fract frexp ftransform fwidth greaterThan greaterThanEqual groupMemoryBarrier imageAtomicAdd imageAtomicAnd imageAtomicCompSwap imageAtomicExchange imageAtomicMax imageAtomicMin imageAtomicOr imageAtomicXor imageLoad imageSize imageStore imulExtended intBitsToFloat interpolateAtCentroid interpolateAtOffset interpolateAtSample inverse inversesqrt isinf isnan ldexp length lessThan lessThanEqual log log2 matrixCompMult max memoryBarrier memoryBarrierAtomicCounter memoryBarrierBuffer memoryBarrierImage memoryBarrierShared min mix mod modf noise1 noise2 noise3 noise4 normalize not notEqual outerProduct packDouble2x32 packHalf2x16 packSnorm2x16 packSnorm4x8 packUnorm2x16 packUnorm4x8 pow radians reflect refract round roundEven shadow1D shadow1DLod shadow1DProj shadow1DProjLod shadow2D shadow2DLod shadow2DProj shadow2DProjLod sign sin sinh smoothstep sqrt step tan tanh texelFetch texelFetchOffset texture texture1D texture1DLod texture1DProj texture1DProjLod texture2D texture2DLod texture2DProj texture2DProjLod texture3D texture3DLod texture3DProj texture3DProjLod textureCube textureCubeLod textureGather textureGatherOffset textureGatherOffsets textureGrad textureGradOffset textureLod textureLodOffset textureOffset textureProj textureProjGrad textureProjGradOffset textureProjLod textureProjLodOffset textureProjOffset textureQueryLevels textureQueryLod textureSize transpose trunc uaddCarry uintBitsToFloat umulExtended unpackDouble2x32 unpackHalf2x16 unpackSnorm2x16 unpackSnorm4x8 unpackUnorm2x16 unpackUnorm4x8 usubBorrow",literal:"true false"},illegal:'"',contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,{className:"meta",begin:"#",end:"$"}]}}},function(e,t){e.exports=function(e){return{name:"GML",case_insensitive:!1,keywords:{keyword:["#endregion","#macro","#region","and","begin","break","case","constructor","continue","default","delete","div","do","else","end","enum","exit","for","function","globalvar","if","mod","not","or","repeat","return","switch","then","until","var","while","with","xor"],built_in:["abs","achievement_available","achievement_event","achievement_get_challenges","achievement_get_info","achievement_get_pic","achievement_increment","achievement_load_friends","achievement_load_leaderboard","achievement_load_progress","achievement_login","achievement_login_status","achievement_logout","achievement_post","achievement_post_score","achievement_reset","achievement_send_challenge","achievement_show","achievement_show_achievements","achievement_show_challenge_notifications","achievement_show_leaderboards","action_inherited","action_kill_object","ads_disable","ads_enable","ads_engagement_active","ads_engagement_available","ads_engagement_launch","ads_event","ads_event_preload","ads_get_display_height","ads_get_display_width","ads_interstitial_available","ads_interstitial_display","ads_move","ads_set_reward_callback","ads_setup","alarm_get","alarm_set","analytics_event","analytics_event_ext","angle_difference","ansi_char","application_get_position","application_surface_draw_enable","application_surface_enable","application_surface_is_enabled","arccos","arcsin","arctan","arctan2","array_copy","array_create","array_delete","array_equals","array_height_2d","array_insert","array_length","array_length_1d","array_length_2d","array_pop","array_push","array_resize","array_sort","asset_get_index","asset_get_type","audio_channel_num","audio_create_buffer_sound","audio_create_play_queue","audio_create_stream","audio_create_sync_group","audio_debug","audio_destroy_stream","audio_destroy_sync_group","audio_emitter_create","audio_emitter_exists","audio_emitter_falloff","audio_emitter_free","audio_emitter_gain","audio_emitter_get_gain","audio_emitter_get_listener_mask","audio_emitter_get_pitch","audio_emitter_get_vx","audio_emitter_get_vy","audio_emitter_get_vz","audio_emitter_get_x","audio_emitter_get_y","audio_emitter_get_z","audio_emitter_pitch","audio_emitter_position","audio_emitter_set_listener_mask","audio_emitter_velocity","audio_exists","audio_falloff_set_model","audio_free_buffer_sound","audio_free_play_queue","audio_get_listener_count","audio_get_listener_info","audio_get_listener_mask","audio_get_master_gain","audio_get_name","audio_get_recorder_count","audio_get_recorder_info","audio_get_type","audio_group_is_loaded","audio_group_load","audio_group_load_progress","audio_group_name","audio_group_set_gain","audio_group_stop_all","audio_group_unload","audio_is_paused","audio_is_playing","audio_listener_get_data","audio_listener_orientation","audio_listener_position","audio_listener_set_orientation","audio_listener_set_position","audio_listener_set_velocity","audio_listener_velocity","audio_master_gain","audio_music_gain","audio_music_is_playing","audio_pause_all","audio_pause_music","audio_pause_sound","audio_pause_sync_group","audio_play_in_sync_group","audio_play_music","audio_play_sound","audio_play_sound_at","audio_play_sound_on","audio_queue_sound","audio_resume_all","audio_resume_music","audio_resume_sound","audio_resume_sync_group","audio_set_listener_mask","audio_set_master_gain","audio_sound_gain","audio_sound_get_gain","audio_sound_get_listener_mask","audio_sound_get_pitch","audio_sound_get_track_position","audio_sound_length","audio_sound_pitch","audio_sound_set_listener_mask","audio_sound_set_track_position","audio_start_recording","audio_start_sync_group","audio_stop_all","audio_stop_music","audio_stop_recording","audio_stop_sound","audio_stop_sync_group","audio_sync_group_debug","audio_sync_group_get_track_pos","audio_sync_group_is_playing","audio_system","background_get_height","background_get_width","base64_decode","base64_encode","browser_input_capture","buffer_async_group_begin","buffer_async_group_end","buffer_async_group_option","buffer_base64_decode","buffer_base64_decode_ext","buffer_base64_encode","buffer_copy","buffer_copy_from_vertex_buffer","buffer_create","buffer_create_from_vertex_buffer","buffer_create_from_vertex_buffer_ext","buffer_delete","buffer_exists","buffer_fill","buffer_get_address","buffer_get_alignment","buffer_get_size","buffer_get_surface","buffer_get_type","buffer_load","buffer_load_async","buffer_load_ext","buffer_load_partial","buffer_md5","buffer_peek","buffer_poke","buffer_read","buffer_resize","buffer_save","buffer_save_async","buffer_save_ext","buffer_seek","buffer_set_surface","buffer_sha1","buffer_sizeof","buffer_tell","buffer_write","camera_apply","camera_create","camera_create_view","camera_destroy","camera_get_active","camera_get_begin_script","camera_get_default","camera_get_end_script","camera_get_proj_mat","camera_get_update_script","camera_get_view_angle","camera_get_view_border_x","camera_get_view_border_y","camera_get_view_height","camera_get_view_mat","camera_get_view_speed_x","camera_get_view_speed_y","camera_get_view_target","camera_get_view_width","camera_get_view_x","camera_get_view_y","camera_set_begin_script","camera_set_default","camera_set_end_script","camera_set_proj_mat","camera_set_update_script","camera_set_view_angle","camera_set_view_border","camera_set_view_mat","camera_set_view_pos","camera_set_view_size","camera_set_view_speed","camera_set_view_target","ceil","choose","chr","clamp","clickable_add","clickable_add_ext","clickable_change","clickable_change_ext","clickable_delete","clickable_exists","clickable_set_style","clipboard_get_text","clipboard_has_text","clipboard_set_text","cloud_file_save","cloud_string_save","cloud_synchronise","code_is_compiled","collision_circle","collision_circle_list","collision_ellipse","collision_ellipse_list","collision_line","collision_line_list","collision_point","collision_point_list","collision_rectangle","collision_rectangle_list","color_get_blue","color_get_green","color_get_hue","color_get_red","color_get_saturation","color_get_value","colour_get_blue","colour_get_green","colour_get_hue","colour_get_red","colour_get_saturation","colour_get_value","cos","darccos","darcsin","darctan","darctan2","date_compare_date","date_compare_datetime","date_compare_time","date_create_datetime","date_current_datetime","date_date_of","date_date_string","date_datetime_string","date_day_span","date_days_in_month","date_days_in_year","date_get_day","date_get_day_of_year","date_get_hour","date_get_hour_of_year","date_get_minute","date_get_minute_of_year","date_get_month","date_get_second","date_get_second_of_year","date_get_timezone","date_get_week","date_get_weekday","date_get_year","date_hour_span","date_inc_day","date_inc_hour","date_inc_minute","date_inc_month","date_inc_second","date_inc_week","date_inc_year","date_is_today","date_leap_year","date_minute_span","date_month_span","date_second_span","date_set_timezone","date_time_of","date_time_string","date_valid_datetime","date_week_span","date_year_span","dcos","debug_event","debug_get_callstack","degtorad","device_get_tilt_x","device_get_tilt_y","device_get_tilt_z","device_is_keypad_open","device_mouse_check_button","device_mouse_check_button_pressed","device_mouse_check_button_released","device_mouse_dbclick_enable","device_mouse_raw_x","device_mouse_raw_y","device_mouse_x","device_mouse_x_to_gui","device_mouse_y","device_mouse_y_to_gui","directory_create","directory_destroy","directory_exists","display_get_dpi_x","display_get_dpi_y","display_get_gui_height","display_get_gui_width","display_get_height","display_get_orientation","display_get_sleep_margin","display_get_timing_method","display_get_width","display_mouse_get_x","display_mouse_get_y","display_mouse_set","display_reset","display_set_gui_maximise","display_set_gui_maximize","display_set_gui_size","display_set_sleep_margin","display_set_timing_method","display_set_ui_visibility","distance_to_object","distance_to_point","dot_product","dot_product_3d","dot_product_3d_normalised","dot_product_3d_normalized","dot_product_normalised","dot_product_normalized","draw_arrow","draw_background","draw_background_ext","draw_background_part_ext","draw_background_tiled","draw_button","draw_circle","draw_circle_color","draw_circle_colour","draw_clear","draw_clear_alpha","draw_ellipse","draw_ellipse_color","draw_ellipse_colour","draw_enable_alphablend","draw_enable_drawevent","draw_enable_swf_aa","draw_flush","draw_get_alpha","draw_get_color","draw_get_colour","draw_get_lighting","draw_get_swf_aa_level","draw_getpixel","draw_getpixel_ext","draw_healthbar","draw_highscore","draw_light_define_ambient","draw_light_define_direction","draw_light_define_point","draw_light_enable","draw_light_get","draw_light_get_ambient","draw_line","draw_line_color","draw_line_colour","draw_line_width","draw_line_width_color","draw_line_width_colour","draw_path","draw_point","draw_point_color","draw_point_colour","draw_primitive_begin","draw_primitive_begin_texture","draw_primitive_end","draw_rectangle","draw_rectangle_color","draw_rectangle_colour","draw_roundrect","draw_roundrect_color","draw_roundrect_color_ext","draw_roundrect_colour","draw_roundrect_colour_ext","draw_roundrect_ext","draw_self","draw_set_alpha","draw_set_alpha_test","draw_set_alpha_test_ref_value","draw_set_blend_mode","draw_set_blend_mode_ext","draw_set_circle_precision","draw_set_color","draw_set_color_write_enable","draw_set_colour","draw_set_font","draw_set_halign","draw_set_lighting","draw_set_swf_aa_level","draw_set_valign","draw_skeleton","draw_skeleton_collision","draw_skeleton_instance","draw_skeleton_time","draw_sprite","draw_sprite_ext","draw_sprite_general","draw_sprite_part","draw_sprite_part_ext","draw_sprite_pos","draw_sprite_stretched","draw_sprite_stretched_ext","draw_sprite_tiled","draw_sprite_tiled_ext","draw_surface","draw_surface_ext","draw_surface_general","draw_surface_part","draw_surface_part_ext","draw_surface_stretched","draw_surface_stretched_ext","draw_surface_tiled","draw_surface_tiled_ext","draw_text","draw_text_color","draw_text_colour","draw_text_ext","draw_text_ext_color","draw_text_ext_colour","draw_text_ext_transformed","draw_text_ext_transformed_color","draw_text_ext_transformed_colour","draw_text_transformed","draw_text_transformed_color","draw_text_transformed_colour","draw_texture_flush","draw_tile","draw_tilemap","draw_triangle","draw_triangle_color","draw_triangle_colour","draw_vertex","draw_vertex_color","draw_vertex_colour","draw_vertex_texture","draw_vertex_texture_color","draw_vertex_texture_colour","ds_exists","ds_grid_add","ds_grid_add_disk","ds_grid_add_grid_region","ds_grid_add_region","ds_grid_clear","ds_grid_copy","ds_grid_create","ds_grid_destroy","ds_grid_get","ds_grid_get_disk_max","ds_grid_get_disk_mean","ds_grid_get_disk_min","ds_grid_get_disk_sum","ds_grid_get_max","ds_grid_get_mean","ds_grid_get_min","ds_grid_get_sum","ds_grid_height","ds_grid_multiply","ds_grid_multiply_disk","ds_grid_multiply_grid_region","ds_grid_multiply_region","ds_grid_read","ds_grid_resize","ds_grid_set","ds_grid_set_disk","ds_grid_set_grid_region","ds_grid_set_region","ds_grid_shuffle","ds_grid_sort","ds_grid_value_disk_exists","ds_grid_value_disk_x","ds_grid_value_disk_y","ds_grid_value_exists","ds_grid_value_x","ds_grid_value_y","ds_grid_width","ds_grid_write","ds_list_add","ds_list_clear","ds_list_copy","ds_list_create","ds_list_delete","ds_list_destroy","ds_list_empty","ds_list_find_index","ds_list_find_value","ds_list_insert","ds_list_mark_as_list","ds_list_mark_as_map","ds_list_read","ds_list_replace","ds_list_set","ds_list_shuffle","ds_list_size","ds_list_sort","ds_list_write","ds_map_add","ds_map_add_list","ds_map_add_map","ds_map_clear","ds_map_copy","ds_map_create","ds_map_delete","ds_map_destroy","ds_map_empty","ds_map_exists","ds_map_find_first","ds_map_find_last","ds_map_find_next","ds_map_find_previous","ds_map_find_value","ds_map_read","ds_map_replace","ds_map_replace_list","ds_map_replace_map","ds_map_secure_load","ds_map_secure_load_buffer","ds_map_secure_save","ds_map_secure_save_buffer","ds_map_set","ds_map_size","ds_map_write","ds_priority_add","ds_priority_change_priority","ds_priority_clear","ds_priority_copy","ds_priority_create","ds_priority_delete_max","ds_priority_delete_min","ds_priority_delete_value","ds_priority_destroy","ds_priority_empty","ds_priority_find_max","ds_priority_find_min","ds_priority_find_priority","ds_priority_read","ds_priority_size","ds_priority_write","ds_queue_clear","ds_queue_copy","ds_queue_create","ds_queue_dequeue","ds_queue_destroy","ds_queue_empty","ds_queue_enqueue","ds_queue_head","ds_queue_read","ds_queue_size","ds_queue_tail","ds_queue_write","ds_set_precision","ds_stack_clear","ds_stack_copy","ds_stack_create","ds_stack_destroy","ds_stack_empty","ds_stack_pop","ds_stack_push","ds_stack_read","ds_stack_size","ds_stack_top","ds_stack_write","dsin","dtan","effect_clear","effect_create_above","effect_create_below","environment_get_variable","event_inherited","event_perform","event_perform_object","event_user","exp","external_call","external_define","external_free","facebook_accesstoken","facebook_check_permission","facebook_dialog","facebook_graph_request","facebook_init","facebook_launch_offerwall","facebook_login","facebook_logout","facebook_post_message","facebook_request_publish_permissions","facebook_request_read_permissions","facebook_send_invite","facebook_status","facebook_user_id","file_attributes","file_bin_close","file_bin_open","file_bin_position","file_bin_read_byte","file_bin_rewrite","file_bin_seek","file_bin_size","file_bin_write_byte","file_copy","file_delete","file_exists","file_find_close","file_find_first","file_find_next","file_rename","file_text_close","file_text_eof","file_text_eoln","file_text_open_append","file_text_open_from_string","file_text_open_read","file_text_open_write","file_text_read_real","file_text_read_string","file_text_readln","file_text_write_real","file_text_write_string","file_text_writeln","filename_change_ext","filename_dir","filename_drive","filename_ext","filename_name","filename_path","floor","font_add","font_add_enable_aa","font_add_get_enable_aa","font_add_sprite","font_add_sprite_ext","font_delete","font_exists","font_get_bold","font_get_first","font_get_fontname","font_get_italic","font_get_last","font_get_name","font_get_size","font_get_texture","font_get_uvs","font_replace","font_replace_sprite","font_replace_sprite_ext","font_set_cache_size","font_texture_page_size","frac","game_end","game_get_speed","game_load","game_load_buffer","game_restart","game_save","game_save_buffer","game_set_speed","gamepad_axis_count","gamepad_axis_value","gamepad_button_check","gamepad_button_check_pressed","gamepad_button_check_released","gamepad_button_count","gamepad_button_value","gamepad_get_axis_deadzone","gamepad_get_button_threshold","gamepad_get_description","gamepad_get_device_count","gamepad_is_connected","gamepad_is_supported","gamepad_set_axis_deadzone","gamepad_set_button_threshold","gamepad_set_color","gamepad_set_colour","gamepad_set_vibration","gesture_double_tap_distance","gesture_double_tap_time","gesture_drag_distance","gesture_drag_time","gesture_flick_speed","gesture_get_double_tap_distance","gesture_get_double_tap_time","gesture_get_drag_distance","gesture_get_drag_time","gesture_get_flick_speed","gesture_get_pinch_angle_away","gesture_get_pinch_angle_towards","gesture_get_pinch_distance","gesture_get_rotate_angle","gesture_get_rotate_time","gesture_get_tap_count","gesture_pinch_angle_away","gesture_pinch_angle_towards","gesture_pinch_distance","gesture_rotate_angle","gesture_rotate_time","gesture_tap_count","get_integer","get_integer_async","get_login_async","get_open_filename","get_open_filename_ext","get_save_filename","get_save_filename_ext","get_string","get_string_async","get_timer","gml_pragma","gml_release_mode","gpu_get_alphatestenable","gpu_get_alphatestfunc","gpu_get_alphatestref","gpu_get_blendenable","gpu_get_blendmode","gpu_get_blendmode_dest","gpu_get_blendmode_destalpha","gpu_get_blendmode_ext","gpu_get_blendmode_ext_sepalpha","gpu_get_blendmode_src","gpu_get_blendmode_srcalpha","gpu_get_colorwriteenable","gpu_get_colourwriteenable","gpu_get_cullmode","gpu_get_fog","gpu_get_lightingenable","gpu_get_state","gpu_get_tex_filter","gpu_get_tex_filter_ext","gpu_get_tex_max_aniso","gpu_get_tex_max_aniso_ext","gpu_get_tex_max_mip","gpu_get_tex_max_mip_ext","gpu_get_tex_min_mip","gpu_get_tex_min_mip_ext","gpu_get_tex_mip_bias","gpu_get_tex_mip_bias_ext","gpu_get_tex_mip_enable","gpu_get_tex_mip_enable_ext","gpu_get_tex_mip_filter","gpu_get_tex_mip_filter_ext","gpu_get_tex_repeat","gpu_get_tex_repeat_ext","gpu_get_texfilter","gpu_get_texfilter_ext","gpu_get_texrepeat","gpu_get_texrepeat_ext","gpu_get_zfunc","gpu_get_ztestenable","gpu_get_zwriteenable","gpu_pop_state","gpu_push_state","gpu_set_alphatestenable","gpu_set_alphatestfunc","gpu_set_alphatestref","gpu_set_blendenable","gpu_set_blendmode","gpu_set_blendmode_ext","gpu_set_blendmode_ext_sepalpha","gpu_set_colorwriteenable","gpu_set_colourwriteenable","gpu_set_cullmode","gpu_set_fog","gpu_set_lightingenable","gpu_set_state","gpu_set_tex_filter","gpu_set_tex_filter_ext","gpu_set_tex_max_aniso","gpu_set_tex_max_aniso_ext","gpu_set_tex_max_mip","gpu_set_tex_max_mip_ext","gpu_set_tex_min_mip","gpu_set_tex_min_mip_ext","gpu_set_tex_mip_bias","gpu_set_tex_mip_bias_ext","gpu_set_tex_mip_enable","gpu_set_tex_mip_enable_ext","gpu_set_tex_mip_filter","gpu_set_tex_mip_filter_ext","gpu_set_tex_repeat","gpu_set_tex_repeat_ext","gpu_set_texfilter","gpu_set_texfilter_ext","gpu_set_texrepeat","gpu_set_texrepeat_ext","gpu_set_zfunc","gpu_set_ztestenable","gpu_set_zwriteenable","highscore_add","highscore_clear","highscore_name","highscore_value","http_get","http_get_file","http_post_string","http_request","iap_acquire","iap_activate","iap_consume","iap_enumerate_products","iap_product_details","iap_purchase_details","iap_restore_all","iap_status","ini_close","ini_key_delete","ini_key_exists","ini_open","ini_open_from_string","ini_read_real","ini_read_string","ini_section_delete","ini_section_exists","ini_write_real","ini_write_string","instance_activate_all","instance_activate_layer","instance_activate_object","instance_activate_region","instance_change","instance_copy","instance_create","instance_create_depth","instance_create_layer","instance_deactivate_all","instance_deactivate_layer","instance_deactivate_object","instance_deactivate_region","instance_destroy","instance_exists","instance_find","instance_furthest","instance_id_get","instance_nearest","instance_number","instance_place","instance_place_list","instance_position","instance_position_list","int64","io_clear","irandom","irandom_range","is_array","is_bool","is_infinity","is_int32","is_int64","is_matrix","is_method","is_nan","is_numeric","is_ptr","is_real","is_string","is_struct","is_undefined","is_vec3","is_vec4","json_decode","json_encode","keyboard_check","keyboard_check_direct","keyboard_check_pressed","keyboard_check_released","keyboard_clear","keyboard_get_map","keyboard_get_numlock","keyboard_key_press","keyboard_key_release","keyboard_set_map","keyboard_set_numlock","keyboard_unset_map","keyboard_virtual_height","keyboard_virtual_hide","keyboard_virtual_show","keyboard_virtual_status","layer_add_instance","layer_background_alpha","layer_background_blend","layer_background_change","layer_background_create","layer_background_destroy","layer_background_exists","layer_background_get_alpha","layer_background_get_blend","layer_background_get_htiled","layer_background_get_id","layer_background_get_index","layer_background_get_speed","layer_background_get_sprite","layer_background_get_stretch","layer_background_get_visible","layer_background_get_vtiled","layer_background_get_xscale","layer_background_get_yscale","layer_background_htiled","layer_background_index","layer_background_speed","layer_background_sprite","layer_background_stretch","layer_background_visible","layer_background_vtiled","layer_background_xscale","layer_background_yscale","layer_create","layer_depth","layer_destroy","layer_destroy_instances","layer_element_move","layer_exists","layer_force_draw_depth","layer_get_all","layer_get_all_elements","layer_get_depth","layer_get_element_layer","layer_get_element_type","layer_get_forced_depth","layer_get_hspeed","layer_get_id","layer_get_id_at_depth","layer_get_name","layer_get_script_begin","layer_get_script_end","layer_get_shader","layer_get_target_room","layer_get_visible","layer_get_vspeed","layer_get_x","layer_get_y","layer_has_instance","layer_hspeed","layer_instance_get_instance","layer_is_draw_depth_forced","layer_reset_target_room","layer_script_begin","layer_script_end","layer_set_target_room","layer_set_visible","layer_shader","layer_sprite_alpha","layer_sprite_angle","layer_sprite_blend","layer_sprite_change","layer_sprite_create","layer_sprite_destroy","layer_sprite_exists","layer_sprite_get_alpha","layer_sprite_get_angle","layer_sprite_get_blend","layer_sprite_get_id","layer_sprite_get_index","layer_sprite_get_speed","layer_sprite_get_sprite","layer_sprite_get_x","layer_sprite_get_xscale","layer_sprite_get_y","layer_sprite_get_yscale","layer_sprite_index","layer_sprite_speed","layer_sprite_x","layer_sprite_xscale","layer_sprite_y","layer_sprite_yscale","layer_tile_alpha","layer_tile_blend","layer_tile_change","layer_tile_create","layer_tile_destroy","layer_tile_exists","layer_tile_get_alpha","layer_tile_get_blend","layer_tile_get_region","layer_tile_get_sprite","layer_tile_get_visible","layer_tile_get_x","layer_tile_get_xscale","layer_tile_get_y","layer_tile_get_yscale","layer_tile_region","layer_tile_visible","layer_tile_x","layer_tile_xscale","layer_tile_y","layer_tile_yscale","layer_tilemap_create","layer_tilemap_destroy","layer_tilemap_exists","layer_tilemap_get_id","layer_vspeed","layer_x","layer_y","lengthdir_x","lengthdir_y","lerp","ln","load_csv","log10","log2","logn","make_color_hsv","make_color_rgb","make_colour_hsv","make_colour_rgb","math_get_epsilon","math_set_epsilon","matrix_build","matrix_build_identity","matrix_build_lookat","matrix_build_projection_ortho","matrix_build_projection_perspective","matrix_build_projection_perspective_fov","matrix_get","matrix_multiply","matrix_set","matrix_stack_clear","matrix_stack_is_empty","matrix_stack_multiply","matrix_stack_pop","matrix_stack_push","matrix_stack_set","matrix_stack_top","matrix_transform_vertex","max","md5_file","md5_string_unicode","md5_string_utf8","mean","median","merge_color","merge_colour","min","motion_add","motion_set","mouse_check_button","mouse_check_button_pressed","mouse_check_button_released","mouse_clear","mouse_wheel_down","mouse_wheel_up","move_bounce_all","move_bounce_solid","move_contact_all","move_contact_solid","move_outside_all","move_outside_solid","move_random","move_snap","move_towards_point","move_wrap","mp_grid_add_cell","mp_grid_add_instances","mp_grid_add_rectangle","mp_grid_clear_all","mp_grid_clear_cell","mp_grid_clear_rectangle","mp_grid_create","mp_grid_destroy","mp_grid_draw","mp_grid_get_cell","mp_grid_path","mp_grid_to_ds_grid","mp_linear_path","mp_linear_path_object","mp_linear_step","mp_linear_step_object","mp_potential_path","mp_potential_path_object","mp_potential_settings","mp_potential_step","mp_potential_step_object","network_connect","network_connect_raw","network_create_server","network_create_server_raw","network_create_socket","network_create_socket_ext","network_destroy","network_resolve","network_send_broadcast","network_send_packet","network_send_raw","network_send_udp","network_send_udp_raw","network_set_config","network_set_timeout","object_exists","object_get_depth","object_get_mask","object_get_name","object_get_parent","object_get_persistent","object_get_physics","object_get_solid","object_get_sprite","object_get_visible","object_is_ancestor","object_set_mask","object_set_persistent","object_set_solid","object_set_sprite","object_set_visible","ord","os_get_config","os_get_info","os_get_language","os_get_region","os_is_network_connected","os_is_paused","os_lock_orientation","os_powersave_enable","parameter_count","parameter_string","part_emitter_burst","part_emitter_clear","part_emitter_create","part_emitter_destroy","part_emitter_destroy_all","part_emitter_exists","part_emitter_region","part_emitter_stream","part_particles_clear","part_particles_count","part_particles_create","part_particles_create_color","part_particles_create_colour","part_system_automatic_draw","part_system_automatic_update","part_system_clear","part_system_create","part_system_create_layer","part_system_depth","part_system_destroy","part_system_draw_order","part_system_drawit","part_system_exists","part_system_get_layer","part_system_layer","part_system_position","part_system_update","part_type_alpha1","part_type_alpha2","part_type_alpha3","part_type_blend","part_type_clear","part_type_color1","part_type_color2","part_type_color3","part_type_color_hsv","part_type_color_mix","part_type_color_rgb","part_type_colour1","part_type_colour2","part_type_colour3","part_type_colour_hsv","part_type_colour_mix","part_type_colour_rgb","part_type_create","part_type_death","part_type_destroy","part_type_direction","part_type_exists","part_type_gravity","part_type_life","part_type_orientation","part_type_scale","part_type_shape","part_type_size","part_type_speed","part_type_sprite","part_type_step","path_add","path_add_point","path_append","path_assign","path_change_point","path_clear_points","path_delete","path_delete_point","path_duplicate","path_end","path_exists","path_flip","path_get_closed","path_get_kind","path_get_length","path_get_name","path_get_number","path_get_point_speed","path_get_point_x","path_get_point_y","path_get_precision","path_get_speed","path_get_time","path_get_x","path_get_y","path_insert_point","path_mirror","path_rescale","path_reverse","path_rotate","path_set_closed","path_set_kind","path_set_precision","path_shift","path_start","physics_apply_angular_impulse","physics_apply_force","physics_apply_impulse","physics_apply_local_force","physics_apply_local_impulse","physics_apply_torque","physics_draw_debug","physics_fixture_add_point","physics_fixture_bind","physics_fixture_bind_ext","physics_fixture_create","physics_fixture_delete","physics_fixture_set_angular_damping","physics_fixture_set_awake","physics_fixture_set_box_shape","physics_fixture_set_chain_shape","physics_fixture_set_circle_shape","physics_fixture_set_collision_group","physics_fixture_set_density","physics_fixture_set_edge_shape","physics_fixture_set_friction","physics_fixture_set_kinematic","physics_fixture_set_linear_damping","physics_fixture_set_polygon_shape","physics_fixture_set_restitution","physics_fixture_set_sensor","physics_get_density","physics_get_friction","physics_get_restitution","physics_joint_delete","physics_joint_distance_create","physics_joint_enable_motor","physics_joint_friction_create","physics_joint_gear_create","physics_joint_get_value","physics_joint_prismatic_create","physics_joint_pulley_create","physics_joint_revolute_create","physics_joint_rope_create","physics_joint_set_value","physics_joint_weld_create","physics_joint_wheel_create","physics_mass_properties","physics_particle_count","physics_particle_create","physics_particle_delete","physics_particle_delete_region_box","physics_particle_delete_region_circle","physics_particle_delete_region_poly","physics_particle_draw","physics_particle_draw_ext","physics_particle_get_damping","physics_particle_get_data","physics_particle_get_data_particle","physics_particle_get_density","physics_particle_get_gravity_scale","physics_particle_get_group_flags","physics_particle_get_max_count","physics_particle_get_radius","physics_particle_group_add_point","physics_particle_group_begin","physics_particle_group_box","physics_particle_group_circle","physics_particle_group_count","physics_particle_group_delete","physics_particle_group_end","physics_particle_group_get_ang_vel","physics_particle_group_get_angle","physics_particle_group_get_centre_x","physics_particle_group_get_centre_y","physics_particle_group_get_data","physics_particle_group_get_inertia","physics_particle_group_get_mass","physics_particle_group_get_vel_x","physics_particle_group_get_vel_y","physics_particle_group_get_x","physics_particle_group_get_y","physics_particle_group_join","physics_particle_group_polygon","physics_particle_set_category_flags","physics_particle_set_damping","physics_particle_set_density","physics_particle_set_flags","physics_particle_set_gravity_scale","physics_particle_set_group_flags","physics_particle_set_max_count","physics_particle_set_radius","physics_pause_enable","physics_remove_fixture","physics_set_density","physics_set_friction","physics_set_restitution","physics_test_overlap","physics_world_create","physics_world_draw_debug","physics_world_gravity","physics_world_update_iterations","physics_world_update_speed","place_empty","place_free","place_meeting","place_snapped","point_direction","point_distance","point_distance_3d","point_in_circle","point_in_rectangle","point_in_triangle","position_change","position_destroy","position_empty","position_meeting","power","ptr","push_cancel_local_notification","push_get_first_local_notification","push_get_next_local_notification","push_local_notification","radtodeg","random","random_get_seed","random_range","random_set_seed","randomise","randomize","real","rectangle_in_circle","rectangle_in_rectangle","rectangle_in_triangle","room_add","room_assign","room_duplicate","room_exists","room_get_camera","room_get_name","room_get_viewport","room_goto","room_goto_next","room_goto_previous","room_instance_add","room_instance_clear","room_next","room_previous","room_restart","room_set_background_color","room_set_background_colour","room_set_camera","room_set_height","room_set_persistent","room_set_view","room_set_view_enabled","room_set_viewport","room_set_width","round","screen_save","screen_save_part","script_execute","script_exists","script_get_name","sha1_file","sha1_string_unicode","sha1_string_utf8","shader_current","shader_enable_corner_id","shader_get_name","shader_get_sampler_index","shader_get_uniform","shader_is_compiled","shader_reset","shader_set","shader_set_uniform_f","shader_set_uniform_f_array","shader_set_uniform_i","shader_set_uniform_i_array","shader_set_uniform_matrix","shader_set_uniform_matrix_array","shaders_are_supported","shop_leave_rating","show_debug_message","show_debug_overlay","show_error","show_message","show_message_async","show_question","show_question_async","sign","sin","skeleton_animation_clear","skeleton_animation_get","skeleton_animation_get_duration","skeleton_animation_get_ext","skeleton_animation_get_frame","skeleton_animation_get_frames","skeleton_animation_list","skeleton_animation_mix","skeleton_animation_set","skeleton_animation_set_ext","skeleton_animation_set_frame","skeleton_attachment_create","skeleton_attachment_get","skeleton_attachment_set","skeleton_bone_data_get","skeleton_bone_data_set","skeleton_bone_state_get","skeleton_bone_state_set","skeleton_collision_draw_set","skeleton_get_bounds","skeleton_get_minmax","skeleton_get_num_bounds","skeleton_skin_get","skeleton_skin_list","skeleton_skin_set","skeleton_slot_data","sprite_add","sprite_add_from_surface","sprite_assign","sprite_collision_mask","sprite_create_from_surface","sprite_delete","sprite_duplicate","sprite_exists","sprite_flush","sprite_flush_multi","sprite_get_bbox_bottom","sprite_get_bbox_left","sprite_get_bbox_right","sprite_get_bbox_top","sprite_get_height","sprite_get_name","sprite_get_number","sprite_get_speed","sprite_get_speed_type","sprite_get_texture","sprite_get_tpe","sprite_get_uvs","sprite_get_width","sprite_get_xoffset","sprite_get_yoffset","sprite_merge","sprite_prefetch","sprite_prefetch_multi","sprite_replace","sprite_save","sprite_save_strip","sprite_set_alpha_from_sprite","sprite_set_cache_size","sprite_set_cache_size_ext","sprite_set_offset","sprite_set_speed","sqr","sqrt","steam_activate_overlay","steam_activate_overlay_browser","steam_activate_overlay_store","steam_activate_overlay_user","steam_available_languages","steam_clear_achievement","steam_create_leaderboard","steam_current_game_language","steam_download_friends_scores","steam_download_scores","steam_download_scores_around_user","steam_file_delete","steam_file_exists","steam_file_persisted","steam_file_read","steam_file_share","steam_file_size","steam_file_write","steam_file_write_file","steam_get_achievement","steam_get_app_id","steam_get_persona_name","steam_get_quota_free","steam_get_quota_total","steam_get_stat_avg_rate","steam_get_stat_float","steam_get_stat_int","steam_get_user_account_id","steam_get_user_persona_name","steam_get_user_steam_id","steam_initialised","steam_is_cloud_enabled_for_account","steam_is_cloud_enabled_for_app","steam_is_overlay_activated","steam_is_overlay_enabled","steam_is_screenshot_requested","steam_is_user_logged_on","steam_reset_all_stats","steam_reset_all_stats_achievements","steam_send_screenshot","steam_set_achievement","steam_set_stat_avg_rate","steam_set_stat_float","steam_set_stat_int","steam_stats_ready","steam_ugc_create_item","steam_ugc_create_query_all","steam_ugc_create_query_all_ex","steam_ugc_create_query_user","steam_ugc_create_query_user_ex","steam_ugc_download","steam_ugc_get_item_install_info","steam_ugc_get_item_update_info","steam_ugc_get_item_update_progress","steam_ugc_get_subscribed_items","steam_ugc_num_subscribed_items","steam_ugc_query_add_excluded_tag","steam_ugc_query_add_required_tag","steam_ugc_query_set_allow_cached_response","steam_ugc_query_set_cloud_filename_filter","steam_ugc_query_set_match_any_tag","steam_ugc_query_set_ranked_by_trend_days","steam_ugc_query_set_return_long_description","steam_ugc_query_set_return_total_only","steam_ugc_query_set_search_text","steam_ugc_request_item_details","steam_ugc_send_query","steam_ugc_set_item_content","steam_ugc_set_item_description","steam_ugc_set_item_preview","steam_ugc_set_item_tags","steam_ugc_set_item_title","steam_ugc_set_item_visibility","steam_ugc_start_item_update","steam_ugc_submit_item_update","steam_ugc_subscribe_item","steam_ugc_unsubscribe_item","steam_upload_score","steam_upload_score_buffer","steam_upload_score_buffer_ext","steam_upload_score_ext","steam_user_installed_dlc","steam_user_owns_dlc","string","string_byte_at","string_byte_length","string_char_at","string_copy","string_count","string_delete","string_digits","string_format","string_hash_to_newline","string_height","string_height_ext","string_insert","string_length","string_letters","string_lettersdigits","string_lower","string_ord_at","string_pos","string_repeat","string_replace","string_replace_all","string_set_byte_at","string_upper","string_width","string_width_ext","surface_copy","surface_copy_part","surface_create","surface_create_ext","surface_depth_disable","surface_exists","surface_free","surface_get_depth_disable","surface_get_height","surface_get_texture","surface_get_width","surface_getpixel","surface_getpixel_ext","surface_reset_target","surface_resize","surface_save","surface_save_part","surface_set_target","surface_set_target_ext","tan","texture_get_height","texture_get_texel_height","texture_get_texel_width","texture_get_uvs","texture_get_width","texture_global_scale","texture_set_stage","tile_get_empty","tile_get_flip","tile_get_index","tile_get_mirror","tile_get_rotate","tile_set_empty","tile_set_flip","tile_set_index","tile_set_mirror","tile_set_rotate","tilemap_clear","tilemap_get","tilemap_get_at_pixel","tilemap_get_cell_x_at_pixel","tilemap_get_cell_y_at_pixel","tilemap_get_frame","tilemap_get_global_mask","tilemap_get_height","tilemap_get_mask","tilemap_get_tile_height","tilemap_get_tile_width","tilemap_get_tileset","tilemap_get_width","tilemap_get_x","tilemap_get_y","tilemap_set","tilemap_set_at_pixel","tilemap_set_global_mask","tilemap_set_mask","tilemap_tileset","tilemap_x","tilemap_y","timeline_add","timeline_clear","timeline_delete","timeline_exists","timeline_get_name","timeline_max_moment","timeline_moment_add_script","timeline_moment_clear","timeline_size","typeof","url_get_domain","url_open","url_open_ext","url_open_full","variable_global_exists","variable_global_get","variable_global_set","variable_instance_exists","variable_instance_get","variable_instance_get_names","variable_instance_set","variable_struct_exists","variable_struct_get","variable_struct_get_names","variable_struct_names_count","variable_struct_remove","variable_struct_set","vertex_argb","vertex_begin","vertex_color","vertex_colour","vertex_create_buffer","vertex_create_buffer_ext","vertex_create_buffer_from_buffer","vertex_create_buffer_from_buffer_ext","vertex_delete_buffer","vertex_end","vertex_float1","vertex_float2","vertex_float3","vertex_float4","vertex_format_add_color","vertex_format_add_colour","vertex_format_add_custom","vertex_format_add_normal","vertex_format_add_position","vertex_format_add_position_3d","vertex_format_add_texcoord","vertex_format_add_textcoord","vertex_format_begin","vertex_format_delete","vertex_format_end","vertex_freeze","vertex_get_buffer_size","vertex_get_number","vertex_normal","vertex_position","vertex_position_3d","vertex_submit","vertex_texcoord","vertex_ubyte4","view_get_camera","view_get_hport","view_get_surface_id","view_get_visible","view_get_wport","view_get_xport","view_get_yport","view_set_camera","view_set_hport","view_set_surface_id","view_set_visible","view_set_wport","view_set_xport","view_set_yport","virtual_key_add","virtual_key_delete","virtual_key_hide","virtual_key_show","win8_appbar_add_element","win8_appbar_enable","win8_appbar_remove_element","win8_device_touchscreen_available","win8_license_initialize_sandbox","win8_license_trial_version","win8_livetile_badge_clear","win8_livetile_badge_notification","win8_livetile_notification_begin","win8_livetile_notification_end","win8_livetile_notification_expiry","win8_livetile_notification_image_add","win8_livetile_notification_secondary_begin","win8_livetile_notification_tag","win8_livetile_notification_text_add","win8_livetile_queue_enable","win8_livetile_tile_clear","win8_livetile_tile_notification","win8_search_add_suggestions","win8_search_disable","win8_search_enable","win8_secondarytile_badge_notification","win8_secondarytile_delete","win8_secondarytile_pin","win8_settingscharm_add_entry","win8_settingscharm_add_html_entry","win8_settingscharm_add_xaml_entry","win8_settingscharm_get_xaml_property","win8_settingscharm_remove_entry","win8_settingscharm_set_xaml_property","win8_share_file","win8_share_image","win8_share_screenshot","win8_share_text","win8_share_url","window_center","window_device","window_get_caption","window_get_color","window_get_colour","window_get_cursor","window_get_fullscreen","window_get_height","window_get_visible_rects","window_get_width","window_get_x","window_get_y","window_handle","window_has_focus","window_mouse_get_x","window_mouse_get_y","window_mouse_set","window_set_caption","window_set_color","window_set_colour","window_set_cursor","window_set_fullscreen","window_set_max_height","window_set_max_width","window_set_min_height","window_set_min_width","window_set_position","window_set_rectangle","window_set_size","window_view_mouse_get_x","window_view_mouse_get_y","window_views_mouse_get_x","window_views_mouse_get_y","winphone_license_trial_version","winphone_tile_back_content","winphone_tile_back_content_wide","winphone_tile_back_image","winphone_tile_back_image_wide","winphone_tile_back_title","winphone_tile_background_color","winphone_tile_background_colour","winphone_tile_count","winphone_tile_cycle_images","winphone_tile_front_image","winphone_tile_front_image_small","winphone_tile_front_image_wide","winphone_tile_icon_image","winphone_tile_small_background_image","winphone_tile_small_icon_image","winphone_tile_title","winphone_tile_wide_content","zip_unzip"],literal:["all","false","noone","pointer_invalid","pointer_null","true","undefined"],symbol:["ANSI_CHARSET","ARABIC_CHARSET","BALTIC_CHARSET","CHINESEBIG5_CHARSET","DEFAULT_CHARSET","EASTEUROPE_CHARSET","GB2312_CHARSET","GM_build_date","GM_runtime_version","GM_version","GREEK_CHARSET","HANGEUL_CHARSET","HEBREW_CHARSET","JOHAB_CHARSET","MAC_CHARSET","OEM_CHARSET","RUSSIAN_CHARSET","SHIFTJIS_CHARSET","SYMBOL_CHARSET","THAI_CHARSET","TURKISH_CHARSET","VIETNAMESE_CHARSET","achievement_achievement_info","achievement_filter_all_players","achievement_filter_favorites_only","achievement_filter_friends_only","achievement_friends_info","achievement_leaderboard_info","achievement_our_info","achievement_pic_loaded","achievement_show_achievement","achievement_show_bank","achievement_show_friend_picker","achievement_show_leaderboard","achievement_show_profile","achievement_show_purchase_prompt","achievement_show_ui","achievement_type_achievement_challenge","achievement_type_score_challenge","asset_font","asset_object","asset_path","asset_room","asset_script","asset_shader","asset_sound","asset_sprite","asset_tiles","asset_timeline","asset_unknown","audio_3d","audio_falloff_exponent_distance","audio_falloff_exponent_distance_clamped","audio_falloff_inverse_distance","audio_falloff_inverse_distance_clamped","audio_falloff_linear_distance","audio_falloff_linear_distance_clamped","audio_falloff_none","audio_mono","audio_new_system","audio_old_system","audio_stereo","bm_add","bm_complex","bm_dest_alpha","bm_dest_color","bm_dest_colour","bm_inv_dest_alpha","bm_inv_dest_color","bm_inv_dest_colour","bm_inv_src_alpha","bm_inv_src_color","bm_inv_src_colour","bm_max","bm_normal","bm_one","bm_src_alpha","bm_src_alpha_sat","bm_src_color","bm_src_colour","bm_subtract","bm_zero","browser_chrome","browser_edge","browser_firefox","browser_ie","browser_ie_mobile","browser_not_a_browser","browser_opera","browser_safari","browser_safari_mobile","browser_tizen","browser_unknown","browser_windows_store","buffer_bool","buffer_f16","buffer_f32","buffer_f64","buffer_fast","buffer_fixed","buffer_generalerror","buffer_grow","buffer_invalidtype","buffer_network","buffer_outofbounds","buffer_outofspace","buffer_s16","buffer_s32","buffer_s8","buffer_seek_end","buffer_seek_relative","buffer_seek_start","buffer_string","buffer_surface_copy","buffer_text","buffer_u16","buffer_u32","buffer_u64","buffer_u8","buffer_vbuffer","buffer_wrap","button_type","c_aqua","c_black","c_blue","c_dkgray","c_fuchsia","c_gray","c_green","c_lime","c_ltgray","c_maroon","c_navy","c_olive","c_orange","c_purple","c_red","c_silver","c_teal","c_white","c_yellow","cmpfunc_always","cmpfunc_equal","cmpfunc_greater","cmpfunc_greaterequal","cmpfunc_less","cmpfunc_lessequal","cmpfunc_never","cmpfunc_notequal","cr_appstart","cr_arrow","cr_beam","cr_cross","cr_default","cr_drag","cr_handpoint","cr_hourglass","cr_none","cr_size_all","cr_size_nesw","cr_size_ns","cr_size_nwse","cr_size_we","cr_uparrow","cull_clockwise","cull_counterclockwise","cull_noculling","device_emulator","device_ios_ipad","device_ios_ipad_retina","device_ios_iphone","device_ios_iphone5","device_ios_iphone6","device_ios_iphone6plus","device_ios_iphone_retina","device_ios_unknown","device_tablet","display_landscape","display_landscape_flipped","display_portrait","display_portrait_flipped","dll_cdecl","dll_stdcall","ds_type_grid","ds_type_list","ds_type_map","ds_type_priority","ds_type_queue","ds_type_stack","ef_cloud","ef_ellipse","ef_explosion","ef_firework","ef_flare","ef_rain","ef_ring","ef_smoke","ef_smokeup","ef_snow","ef_spark","ef_star","ev_alarm","ev_animation_end","ev_boundary","ev_cleanup","ev_close_button","ev_collision","ev_create","ev_destroy","ev_draw","ev_draw_begin","ev_draw_end","ev_draw_post","ev_draw_pre","ev_end_of_path","ev_game_end","ev_game_start","ev_gesture","ev_gesture_double_tap","ev_gesture_drag_end","ev_gesture_drag_start","ev_gesture_dragging","ev_gesture_flick","ev_gesture_pinch_end","ev_gesture_pinch_in","ev_gesture_pinch_out","ev_gesture_pinch_start","ev_gesture_rotate_end","ev_gesture_rotate_start","ev_gesture_rotating","ev_gesture_tap","ev_global_gesture_double_tap","ev_global_gesture_drag_end","ev_global_gesture_drag_start","ev_global_gesture_dragging","ev_global_gesture_flick","ev_global_gesture_pinch_end","ev_global_gesture_pinch_in","ev_global_gesture_pinch_out","ev_global_gesture_pinch_start","ev_global_gesture_rotate_end","ev_global_gesture_rotate_start","ev_global_gesture_rotating","ev_global_gesture_tap","ev_global_left_button","ev_global_left_press","ev_global_left_release","ev_global_middle_button","ev_global_middle_press","ev_global_middle_release","ev_global_right_button","ev_global_right_press","ev_global_right_release","ev_gui","ev_gui_begin","ev_gui_end","ev_joystick1_button1","ev_joystick1_button2","ev_joystick1_button3","ev_joystick1_button4","ev_joystick1_button5","ev_joystick1_button6","ev_joystick1_button7","ev_joystick1_button8","ev_joystick1_down","ev_joystick1_left","ev_joystick1_right","ev_joystick1_up","ev_joystick2_button1","ev_joystick2_button2","ev_joystick2_button3","ev_joystick2_button4","ev_joystick2_button5","ev_joystick2_button6","ev_joystick2_button7","ev_joystick2_button8","ev_joystick2_down","ev_joystick2_left","ev_joystick2_right","ev_joystick2_up","ev_keyboard","ev_keypress","ev_keyrelease","ev_left_button","ev_left_press","ev_left_release","ev_middle_button","ev_middle_press","ev_middle_release","ev_mouse","ev_mouse_enter","ev_mouse_leave","ev_mouse_wheel_down","ev_mouse_wheel_up","ev_no_button","ev_no_more_health","ev_no_more_lives","ev_other","ev_outside","ev_right_button","ev_right_press","ev_right_release","ev_room_end","ev_room_start","ev_step","ev_step_begin","ev_step_end","ev_step_normal","ev_trigger","ev_user0","ev_user1","ev_user2","ev_user3","ev_user4","ev_user5","ev_user6","ev_user7","ev_user8","ev_user9","ev_user10","ev_user11","ev_user12","ev_user13","ev_user14","ev_user15","fa_archive","fa_bottom","fa_center","fa_directory","fa_hidden","fa_left","fa_middle","fa_readonly","fa_right","fa_sysfile","fa_top","fa_volumeid","fb_login_default","fb_login_fallback_to_webview","fb_login_forcing_safari","fb_login_forcing_webview","fb_login_no_fallback_to_webview","fb_login_use_system_account","gamespeed_fps","gamespeed_microseconds","ge_lose","global","gp_axislh","gp_axislv","gp_axisrh","gp_axisrv","gp_face1","gp_face2","gp_face3","gp_face4","gp_padd","gp_padl","gp_padr","gp_padu","gp_select","gp_shoulderl","gp_shoulderlb","gp_shoulderr","gp_shoulderrb","gp_start","gp_stickl","gp_stickr","iap_available","iap_canceled","iap_ev_consume","iap_ev_product","iap_ev_purchase","iap_ev_restore","iap_ev_storeload","iap_failed","iap_purchased","iap_refunded","iap_status_available","iap_status_loading","iap_status_processing","iap_status_restoring","iap_status_unavailable","iap_status_uninitialised","iap_storeload_failed","iap_storeload_ok","iap_unavailable","input_type","kbv_autocapitalize_characters","kbv_autocapitalize_none","kbv_autocapitalize_sentences","kbv_autocapitalize_words","kbv_returnkey_continue","kbv_returnkey_default","kbv_returnkey_done","kbv_returnkey_emergency","kbv_returnkey_go","kbv_returnkey_google","kbv_returnkey_join","kbv_returnkey_next","kbv_returnkey_route","kbv_returnkey_search","kbv_returnkey_send","kbv_returnkey_yahoo","kbv_type_ascii","kbv_type_default","kbv_type_email","kbv_type_numbers","kbv_type_phone","kbv_type_phone_name","kbv_type_url","layerelementtype_background","layerelementtype_instance","layerelementtype_oldtilemap","layerelementtype_particlesystem","layerelementtype_sprite","layerelementtype_tile","layerelementtype_tilemap","layerelementtype_undefined","lb_disp_none","lb_disp_numeric","lb_disp_time_ms","lb_disp_time_sec","lb_sort_ascending","lb_sort_descending","lb_sort_none","leaderboard_type_number","leaderboard_type_time_mins_secs","lighttype_dir","lighttype_point","local","matrix_projection","matrix_view","matrix_world","mb_any","mb_left","mb_middle","mb_none","mb_right","mip_markedonly","mip_off","mip_on","network_config_connect_timeout","network_config_disable_reliable_udp","network_config_enable_reliable_udp","network_config_use_non_blocking_socket","network_socket_bluetooth","network_socket_tcp","network_socket_udp","network_type_connect","network_type_data","network_type_disconnect","network_type_non_blocking_connect","of_challen","of_challenge_tie","of_challenge_win","os_3ds","os_android","os_bb10","os_ios","os_linux","os_macosx","os_ps3","os_ps4","os_psvita","os_switch","os_symbian","os_tizen","os_tvos","os_unknown","os_uwp","os_wiiu","os_win32","os_win8native","os_windows","os_winphone","os_xbox360","os_xboxone","other","ov_achievements","ov_community","ov_friends","ov_gamegroup","ov_players","ov_settings","path_action_continue","path_action_restart","path_action_reverse","path_action_stop","phy_debug_render_aabb","phy_debug_render_collision_pairs","phy_debug_render_coms","phy_debug_render_core_shapes","phy_debug_render_joints","phy_debug_render_obb","phy_debug_render_shapes","phy_joint_anchor_1_x","phy_joint_anchor_1_y","phy_joint_anchor_2_x","phy_joint_anchor_2_y","phy_joint_angle","phy_joint_angle_limits","phy_joint_damping_ratio","phy_joint_frequency","phy_joint_length_1","phy_joint_length_2","phy_joint_lower_angle_limit","phy_joint_max_force","phy_joint_max_length","phy_joint_max_motor_force","phy_joint_max_motor_torque","phy_joint_max_torque","phy_joint_motor_force","phy_joint_motor_speed","phy_joint_motor_torque","phy_joint_reaction_force_x","phy_joint_reaction_force_y","phy_joint_reaction_torque","phy_joint_speed","phy_joint_translation","phy_joint_upper_angle_limit","phy_particle_data_flag_category","phy_particle_data_flag_color","phy_particle_data_flag_colour","phy_particle_data_flag_position","phy_particle_data_flag_typeflags","phy_particle_data_flag_velocity","phy_particle_flag_colormixing","phy_particle_flag_colourmixing","phy_particle_flag_elastic","phy_particle_flag_powder","phy_particle_flag_spring","phy_particle_flag_tensile","phy_particle_flag_viscous","phy_particle_flag_wall","phy_particle_flag_water","phy_particle_flag_zombie","phy_particle_group_flag_rigid","phy_particle_group_flag_solid","pi","pr_linelist","pr_linestrip","pr_pointlist","pr_trianglefan","pr_trianglelist","pr_trianglestrip","ps_distr_gaussian","ps_distr_invgaussian","ps_distr_linear","ps_shape_diamond","ps_shape_ellipse","ps_shape_line","ps_shape_rectangle","pt_shape_circle","pt_shape_cloud","pt_shape_disk","pt_shape_explosion","pt_shape_flare","pt_shape_line","pt_shape_pixel","pt_shape_ring","pt_shape_smoke","pt_shape_snow","pt_shape_spark","pt_shape_sphere","pt_shape_square","pt_shape_star","spritespeed_framespergameframe","spritespeed_framespersecond","text_type","tf_anisotropic","tf_linear","tf_point","tile_flip","tile_index_mask","tile_mirror","tile_rotate","timezone_local","timezone_utc","tm_countvsyncs","tm_sleep","ty_real","ty_string","ugc_filetype_community","ugc_filetype_microtrans","ugc_list_Favorited","ugc_list_Followed","ugc_list_Published","ugc_list_Subscribed","ugc_list_UsedOrPlayed","ugc_list_VotedDown","ugc_list_VotedOn","ugc_list_VotedUp","ugc_list_WillVoteLater","ugc_match_AllGuides","ugc_match_Artwork","ugc_match_Collections","ugc_match_ControllerBindings","ugc_match_IntegratedGuides","ugc_match_Items","ugc_match_Items_Mtx","ugc_match_Items_ReadyToUse","ugc_match_Screenshots","ugc_match_UsableInGame","ugc_match_Videos","ugc_match_WebGuides","ugc_query_AcceptedForGameRankedByAcceptanceDate","ugc_query_CreatedByFollowedUsersRankedByPublicationDate","ugc_query_CreatedByFriendsRankedByPublicationDate","ugc_query_FavoritedByFriendsRankedByPublicationDate","ugc_query_NotYetRated","ugc_query_RankedByNumTimesReported","ugc_query_RankedByPublicationDate","ugc_query_RankedByTextSearch","ugc_query_RankedByTotalVotesAsc","ugc_query_RankedByTrend","ugc_query_RankedByVote","ugc_query_RankedByVotesUp","ugc_result_success","ugc_sortorder_CreationOrderAsc","ugc_sortorder_CreationOrderDesc","ugc_sortorder_ForModeration","ugc_sortorder_LastUpdatedDesc","ugc_sortorder_SubscriptionDateDesc","ugc_sortorder_TitleAsc","ugc_sortorder_VoteScoreDesc","ugc_visibility_friends_only","ugc_visibility_private","ugc_visibility_public","vertex_type_color","vertex_type_colour","vertex_type_float1","vertex_type_float2","vertex_type_float3","vertex_type_float4","vertex_type_ubyte4","vertex_usage_binormal","vertex_usage_blendindices","vertex_usage_blendweight","vertex_usage_color","vertex_usage_colour","vertex_usage_depth","vertex_usage_fog","vertex_usage_normal","vertex_usage_position","vertex_usage_psize","vertex_usage_sample","vertex_usage_tangent","vertex_usage_texcoord","vertex_usage_textcoord","vk_add","vk_alt","vk_anykey","vk_backspace","vk_control","vk_decimal","vk_delete","vk_divide","vk_down","vk_end","vk_enter","vk_escape","vk_f1","vk_f2","vk_f3","vk_f4","vk_f5","vk_f6","vk_f7","vk_f8","vk_f9","vk_f10","vk_f11","vk_f12","vk_home","vk_insert","vk_lalt","vk_lcontrol","vk_left","vk_lshift","vk_multiply","vk_nokey","vk_numpad0","vk_numpad1","vk_numpad2","vk_numpad3","vk_numpad4","vk_numpad5","vk_numpad6","vk_numpad7","vk_numpad8","vk_numpad9","vk_pagedown","vk_pageup","vk_pause","vk_printscreen","vk_ralt","vk_rcontrol","vk_return","vk_right","vk_rshift","vk_shift","vk_space","vk_subtract","vk_tab","vk_up"],"variable.language":["alarm","application_surface","argument","argument0","argument1","argument2","argument3","argument4","argument5","argument6","argument7","argument8","argument9","argument10","argument11","argument12","argument13","argument14","argument15","argument_count","argument_relative","async_load","background_color","background_colour","background_showcolor","background_showcolour","bbox_bottom","bbox_left","bbox_right","bbox_top","browser_height","browser_width","caption_health","caption_lives","caption_score","current_day","current_hour","current_minute","current_month","current_second","current_time","current_weekday","current_year","cursor_sprite","debug_mode","delta_time","depth","direction","display_aa","error_last","error_occurred","event_action","event_data","event_number","event_object","event_type","fps","fps_real","friction","game_display_name","game_id","game_project_name","game_save_id","gamemaker_pro","gamemaker_registered","gamemaker_version","gravity","gravity_direction","health","hspeed","iap_data","id|0","image_alpha","image_angle","image_blend","image_index","image_number","image_speed","image_xscale","image_yscale","instance_count","instance_id","keyboard_key","keyboard_lastchar","keyboard_lastkey","keyboard_string","layer","lives","mask_index","mouse_button","mouse_lastbutton","mouse_x","mouse_y","object_index","os_browser","os_device","os_type","os_version","path_endaction","path_index","path_orientation","path_position","path_positionprevious","path_scale","path_speed","persistent","phy_active","phy_angular_damping","phy_angular_velocity","phy_bullet","phy_col_normal_x","phy_col_normal_y","phy_collision_points","phy_collision_x","phy_collision_y","phy_com_x","phy_com_y","phy_dynamic","phy_fixed_rotation","phy_inertia","phy_kinematic","phy_linear_damping","phy_linear_velocity_x","phy_linear_velocity_y","phy_mass","phy_position_x","phy_position_xprevious","phy_position_y","phy_position_yprevious","phy_rotation","phy_sleeping","phy_speed","phy_speed_x","phy_speed_y","program_directory","room","room_caption","room_first","room_height","room_last","room_persistent","room_speed","room_width","score","self","show_health","show_lives","show_score","solid","speed","sprite_height","sprite_index","sprite_width","sprite_xoffset","sprite_yoffset","temp_directory","timeline_index","timeline_loop","timeline_position","timeline_running","timeline_speed","view_angle","view_camera","view_current","view_enabled","view_hborder","view_hport","view_hspeed","view_hview","view_object","view_surface_id","view_vborder","view_visible","view_vspeed","view_wport","view_wview","view_xport","view_xview","view_yport","view_yview","visible","vspeed","webgl_enabled","working_directory","xprevious","xstart","x|0","yprevious","ystart","y|0"]},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE]}}},function(e,t){e.exports=function(e){const t={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:t,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{begin:e.C_NUMBER_RE+"[i]",relevance:1},e.C_NUMBER_MODE]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,illegal:/["']/}]}]}}},function(e,t){e.exports=function(e){return{name:"Golo",keywords:{keyword:["println","readln","print","import","module","function","local","return","let","var","while","for","foreach","times","in","case","when","match","with","break","continue","augment","augmentation","each","find","filter","reduce","if","then","else","otherwise","try","catch","finally","raise","throw","orIfNull","DynamicObject|10","DynamicVariable","struct","Observable","map","set","vector","list","array"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{className:"meta",begin:"@[A-Za-z]+"}]}}},function(e,t){e.exports=function(e){return{name:"Gradle",case_insensitive:!0,keywords:["task","project","allprojects","subprojects","artifacts","buildscript","configurations","dependencies","repositories","sourceSets","description","delete","from","into","include","exclude","source","classpath","destinationDir","includes","options","sourceCompatibility","targetCompatibility","group","flatDir","doLast","doFirst","flatten","todir","fromdir","ant","def","abstract","break","case","catch","continue","default","do","else","extends","final","finally","for","if","implements","instanceof","native","new","private","protected","public","return","static","switch","synchronized","throw","throws","transient","try","volatile","while","strictfp","package","import","false","null","super","this","true","antlrtask","checkstyle","codenarc","copy","boolean","byte","char","class","double","float","int","interface","long","short","void","compile","runTime","file","fileTree","abs","any","append","asList","asWritable","call","collect","compareTo","count","div","dump","each","eachByte","eachFile","eachLine","every","find","findAll","flatten","getAt","getErr","getIn","getOut","getText","grep","immutable","inject","inspect","intersect","invokeMethods","isCase","join","leftShift","minus","multiply","newInputStream","newOutputStream","newPrintWriter","newReader","newWriter","next","plus","pop","power","previous","print","println","push","putAt","read","readBytes","readLines","reverse","reverseEach","round","size","sort","splitEachLine","step","subMap","times","toInteger","toList","tokenize","upto","waitForOrKill","withPrintWriter","withReader","withStream","withWriter","withWriterAppend","write","writeLine"],contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.REGEXP_MODE]}}},function(e,t){e.exports=function(e){const t=e.regex;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(/[_A-Za-z][_0-9A-Za-z]*/,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}},function(e,t){function n(e,t={}){return t.variants=e,t}e.exports=function(e){const t=e.regex,r="[A-Za-z0-9_$]+",i=n([e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]})]),o={className:"regexp",begin:/~?\/[^\/\n]+\//,contains:[e.BACKSLASH_ESCAPE]},a=n([e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]),s=n([{begin:/"""/,end:/"""/},{begin:/'''/,end:/'''/},{begin:"\\$/",end:"/\\$",relevance:10},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE],{className:"string"}),l={match:[/(class|interface|trait|enum|extends|implements)/,/\s+/,e.UNDERSCORE_IDENT_RE],scope:{1:"keyword",3:"title.class"}};return{name:"Groovy",keywords:{"variable.language":"this super",literal:"true false null",type:["byte","short","char","int","long","boolean","float","double","void"],keyword:["def","as","in","assert","trait","abstract","static","volatile","transient","public","private","protected","synchronized","final","class","interface","enum","if","else","for","while","switch","case","break","default","continue","throw","throws","try","catch","finally","implements","extends","new","import","package","return","instanceof"]},contains:[e.SHEBANG({binary:"groovy",relevance:10}),i,s,o,a,l,{className:"meta",begin:"@[A-Za-z]+",relevance:0},{className:"attr",begin:r+"[ \t]*:",relevance:0},{begin:/\?/,end:/:/,relevance:0,contains:[i,s,o,a,"self"]},{className:"symbol",begin:"^[ \t]*"+t.lookahead(r+":"),excludeBegin:!0,end:r+":",relevance:0}],illegal:/#|<\//}}},function(e,t){e.exports=function(e){return{name:"HAML",case_insensitive:!0,contains:[{className:"meta",begin:"^!!!( (5|1\\.1|Strict|Frameset|Basic|Mobile|RDFa|XML\\b.*))?$",relevance:10},e.COMMENT("^\\s*(!=#|=#|-#|/).*$",null,{relevance:0}),{begin:"^\\s*(-|=|!=)(?!#)",end:/$/,subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0},{className:"tag",begin:"^\\s*%",contains:[{className:"selector-tag",begin:"\\w+"},{className:"selector-id",begin:"#[\\w-]+"},{className:"selector-class",begin:"\\.[\\w-]+"},{begin:/\{\s*/,end:/\s*\}/,contains:[{begin:":\\w+\\s*=>",end:",\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"attr",begin:":\\w+"},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:"\\w+",relevance:0}]}]},{begin:"\\(\\s*",end:"\\s*\\)",excludeEnd:!0,contains:[{begin:"\\w+\\s*=",end:"\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"attr",begin:"\\w+",relevance:0},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:"\\w+",relevance:0}]}]}]},{begin:"^\\s*[=~]\\s*"},{begin:/#\{/,end:/\}/,subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0}]}}},function(e,t){e.exports=function(e){const t=e.regex,n={$pattern:/[\w.\/]+/,built_in:["action","bindattr","collection","component","concat","debugger","each","each-in","get","hash","if","in","input","link-to","loc","log","lookup","mut","outlet","partial","query-params","render","template","textarea","unbound","unless","view","with","yield"]},r=/\[\]|\[[^\]]+\]/,i=/[^\s!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]+/,o=t.either(/""|"[^"]+"/,/''|'[^']+'/,r,i),a=t.concat(t.optional(/\.|\.\/|\//),o,t.anyNumberOfTimes(t.concat(/(\.|\/)/,o))),s=t.concat("(",r,"|",i,")(?==)"),l={begin:a},c=e.inherit(l,{keywords:{$pattern:/[\w.\/]+/,literal:["true","false","undefined","null"]}}),u={begin:/\(/,end:/\)/},d={className:"attr",begin:s,relevance:0,starts:{begin:/=/,end:/=/,starts:{contains:[e.NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,c,u]}}},h={contains:[e.NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:/as\s+\|/,keywords:{keyword:"as"},end:/\|/,contains:[{begin:/\w+/}]},d,c,u],returnEnd:!0},p=e.inherit(l,{className:"name",keywords:n,starts:e.inherit(h,{end:/\)/})});u.contains=[p];const m=e.inherit(l,{keywords:n,className:"name",starts:e.inherit(h,{end:/\}\}/})}),g=e.inherit(l,{keywords:n,className:"name"}),f=e.inherit(l,{className:"name",keywords:n,starts:e.inherit(h,{end:/\}\}/})});return{name:"Handlebars",aliases:["hbs","html.hbs","html.handlebars","htmlbars"],case_insensitive:!0,subLanguage:"xml",contains:[{begin:/\\\{\{/,skip:!0},{begin:/\\\\(?=\{\{)/,skip:!0},e.COMMENT(/\{\{!--/,/--\}\}/),e.COMMENT(/\{\{!/,/\}\}/),{className:"template-tag",begin:/\{\{\{\{(?!\/)/,end:/\}\}\}\}/,contains:[m],starts:{end:/\{\{\{\{\//,returnEnd:!0,subLanguage:"xml"}},{className:"template-tag",begin:/\{\{\{\{\//,end:/\}\}\}\}/,contains:[g]},{className:"template-tag",begin:/\{\{#/,end:/\}\}/,contains:[m]},{className:"template-tag",begin:/\{\{(?=else\}\})/,end:/\}\}/,keywords:"else"},{className:"template-tag",begin:/\{\{(?=else if)/,end:/\}\}/,keywords:"else if"},{className:"template-tag",begin:/\{\{\//,end:/\}\}/,contains:[g]},{className:"template-variable",begin:/\{\{\{/,end:/\}\}\}/,contains:[f]},{className:"template-variable",begin:/\{\{/,end:/\}\}/,contains:[f]}]}}},function(e,t){e.exports=function(e){const t={variants:[e.COMMENT("--","$"),e.COMMENT(/\{-/,/-\}/,{contains:["self"]})]},n={className:"meta",begin:/\{-#/,end:/#-\}/},r={className:"meta",begin:"^#",end:"$"},i={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},o={begin:"\\(",end:"\\)",illegal:'"',contains:[n,r,{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},e.inherit(e.TITLE_MODE,{begin:"[_a-z][\\w']*"}),t]},a="([0-9]_*)+",s="([0-9a-fA-F]_*)+",l={className:"number",relevance:0,variants:[{match:`\\b(${a})(\\.(${a}))?([eE][+-]?(${a}))?\\b`},{match:`\\b0[xX]_*(${s})(\\.(${s}))?([pP][+-]?(${a}))?\\b`},{match:"\\b0[oO](([0-7]_*)+)\\b"},{match:"\\b0[bB](([01]_*)+)\\b"}]};return{name:"Haskell",aliases:["hs"],keywords:"let in if then else case of where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec",contains:[{beginKeywords:"module",end:"where",keywords:"module where",contains:[o,t],illegal:"\\W\\.|;"},{begin:"\\bimport\\b",end:"$",keywords:"import qualified as hiding",contains:[o,t],illegal:"\\W\\.|;"},{className:"class",begin:"^(\\s*)?(class|instance)\\b",end:"where",keywords:"class family instance where",contains:[i,o,t]},{className:"class",begin:"\\b(data|(new)?type)\\b",end:"$",keywords:"data family type newtype deriving",contains:[n,i,o,{begin:/\{/,end:/\}/,contains:o.contains},t]},{beginKeywords:"default",end:"$",contains:[i,o,t]},{beginKeywords:"infix infixl infixr",end:"$",contains:[e.C_NUMBER_MODE,t]},{begin:"\\bforeign\\b",end:"$",keywords:"foreign import export ccall stdcall cplusplus jvm dotnet safe unsafe",contains:[i,e.QUOTE_STRING_MODE,t]},{className:"meta",begin:"#!\\/usr\\/bin\\/env runhaskell",end:"$"},n,r,e.QUOTE_STRING_MODE,l,i,e.inherit(e.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),t,{begin:"->|<-"}]}}},function(e,t){e.exports=function(e){return{name:"Haxe",aliases:["hx"],keywords:{keyword:"break case cast catch continue default do dynamic else enum extern for function here if import in inline never new override package private get set public return static super switch this throw trace try typedef untyped using var while Int Float String Bool Dynamic Void Array ",built_in:"trace this",literal:"true false null _"},contains:[{className:"string",begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE,{className:"subst",begin:"\\$\\{",end:"\\}"},{className:"subst",begin:"\\$",end:/\W\}/}]},e.QUOTE_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,{className:"meta",begin:"@:",end:"$"},{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elseif end error"}},{className:"type",begin:":[ \t]*",end:"[^A-Za-z0-9_ \t\\->]",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:":[ \t]*",end:"\\W",excludeBegin:!0,excludeEnd:!0},{className:"type",begin:"new *",end:"\\W",excludeBegin:!0,excludeEnd:!0},{className:"class",beginKeywords:"enum",end:"\\{",contains:[e.TITLE_MODE]},{className:"class",beginKeywords:"abstract",end:"[\\{$]",contains:[{className:"type",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"type",begin:"from +",end:"\\W",excludeBegin:!0,excludeEnd:!0},{className:"type",begin:"to +",end:"\\W",excludeBegin:!0,excludeEnd:!0},e.TITLE_MODE],keywords:{keyword:"abstract from to"}},{className:"class",begin:"\\b(class|interface) +",end:"[\\{$]",excludeEnd:!0,keywords:"class interface",contains:[{className:"keyword",begin:"\\b(extends|implements) +",keywords:"extends implements",contains:[{className:"type",begin:e.IDENT_RE,relevance:0}]},e.TITLE_MODE]},{className:"function",beginKeywords:"function",end:"\\(",excludeEnd:!0,illegal:"\\S",contains:[e.TITLE_MODE]}],illegal:/<\//}}},function(e,t){e.exports=function(e){return{name:"HSP",case_insensitive:!0,keywords:{$pattern:/[\w._]+/,keyword:"goto gosub return break repeat loop continue wait await dim sdim foreach dimtype dup dupptr end stop newmod delmod mref run exgoto on mcall assert logmes newlab resume yield onexit onerror onkey onclick oncmd exist delete mkdir chdir dirlist bload bsave bcopy memfile if else poke wpoke lpoke getstr chdpm memexpand memcpy memset notesel noteadd notedel noteload notesave randomize noteunsel noteget split strrep setease button chgdisp exec dialog mmload mmplay mmstop mci pset pget syscolor mes print title pos circle cls font sysfont objsize picload color palcolor palette redraw width gsel gcopy gzoom gmode bmpsave hsvcolor getkey listbox chkbox combox input mesbox buffer screen bgscr mouse objsel groll line clrobj boxf objprm objmode stick grect grotate gsquare gradf objimage objskip objenable celload celdiv celput newcom querycom delcom cnvstow comres axobj winobj sendmsg comevent comevarg sarrayconv callfunc cnvwtos comevdisp libptr system hspstat hspver stat cnt err strsize looplev sublev iparam wparam lparam refstr refdval int rnd strlen length length2 length3 length4 vartype gettime peek wpeek lpeek varptr varuse noteinfo instr abs limit getease str strmid strf getpath strtrim sin cos tan atan sqrt double absf expf logf limitf powf geteasef mousex mousey mousew hwnd hinstance hdc ginfo objinfo dirinfo sysinfo thismod __hspver__ __hsp30__ __date__ __time__ __line__ __file__ _debug __hspdef__ and or xor not screen_normal screen_palette screen_hide screen_fixedsize screen_tool screen_frame gmode_gdi gmode_mem gmode_rgb0 gmode_alpha gmode_rgb0alpha gmode_add gmode_sub gmode_pixela ginfo_mx ginfo_my ginfo_act ginfo_sel ginfo_wx1 ginfo_wy1 ginfo_wx2 ginfo_wy2 ginfo_vx ginfo_vy ginfo_sizex ginfo_sizey ginfo_winx ginfo_winy ginfo_mesx ginfo_mesy ginfo_r ginfo_g ginfo_b ginfo_paluse ginfo_dispx ginfo_dispy ginfo_cx ginfo_cy ginfo_intid ginfo_newid ginfo_sx ginfo_sy objinfo_mode objinfo_bmscr objinfo_hwnd notemax notesize dir_cur dir_exe dir_win dir_sys dir_cmdline dir_desktop dir_mydoc dir_tv font_normal font_bold font_italic font_underline font_strikeout font_antialias objmode_normal objmode_guifont objmode_usefont gsquare_grad msgothic msmincho do until while wend for next _break _continue switch case default swbreak swend ddim ldim alloc m_pi rad2deg deg2rad ease_linear ease_quad_in ease_quad_out ease_quad_inout ease_cubic_in ease_cubic_out ease_cubic_inout ease_quartic_in ease_quartic_out ease_quartic_inout ease_bounce_in ease_bounce_out ease_bounce_inout ease_shake_in ease_shake_out ease_shake_inout ease_loop"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",begin:/\{"/,end:/"\}/,contains:[e.BACKSLASH_ESCAPE]},e.COMMENT(";","$",{relevance:0}),{className:"meta",begin:"#",end:"$",keywords:{keyword:"addion cfunc cmd cmpopt comfunc const defcfunc deffunc define else endif enum epack func global if ifdef ifndef include modcfunc modfunc modinit modterm module pack packopt regcmd runtime undef usecom uselib"},contains:[e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),e.NUMBER_MODE,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"symbol",begin:"^\\*(\\w+|@)"},e.NUMBER_MODE,e.C_NUMBER_MODE]}}},function(e,t){e.exports=function(e){const t="HTTP/(2|1\\.[01])",n={className:"attribute",begin:e.regex.concat("^",/[A-Za-z][A-Za-z0-9-]*/,"(?=\\:\\s)"),starts:{contains:[{className:"punctuation",begin:/: /,relevance:0,starts:{end:"$",relevance:0}}]}},r=[n,{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}];return{name:"HTTP",aliases:["https"],illegal:/\S/,contains:[{begin:"^(?="+t+" \\d{3})",end:/$/,contains:[{className:"meta",begin:t},{className:"number",begin:"\\b\\d{3}\\b"}],starts:{end:/\b\B/,illegal:/\S/,contains:r}},{begin:"(?=^[A-Z]+ (.*?) "+t+"$)",end:/$/,contains:[{className:"string",begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0},{className:"meta",begin:t},{className:"keyword",begin:"[A-Z]+"}],starts:{end:/\b\B/,illegal:/\S/,contains:r}},e.inherit(n,{relevance:0})]}}},function(e,t){e.exports=function(e){const t="a-zA-Z_\\-!.?+*=<>&#'",n="["+t+"]["+t+"0-9/;:]*",r={$pattern:n,built_in:"!= % %= & &= * ** **= *= *map + += , --build-class-- --import-- -= . / // //= /= < << <<= <= = > >= >> >>= @ @= ^ ^= abs accumulate all and any ap-compose ap-dotimes ap-each ap-each-while ap-filter ap-first ap-if ap-last ap-map ap-map-when ap-pipe ap-reduce ap-reject apply as-> ascii assert assoc bin break butlast callable calling-module-name car case cdr chain chr coll? combinations compile compress cond cons cons? continue count curry cut cycle dec def default-method defclass defmacro defmacro-alias defmacro/g! defmain defmethod defmulti defn defn-alias defnc defnr defreader defseq del delattr delete-route dict-comp dir disassemble dispatch-reader-macro distinct divmod do doto drop drop-last drop-while empty? end-sequence eval eval-and-compile eval-when-compile even? every? except exec filter first flatten float? fn fnc fnr for for* format fraction genexpr gensym get getattr global globals group-by hasattr hash hex id identity if if* if-not if-python2 import in inc input instance? integer integer-char? integer? interleave interpose is is-coll is-cons is-empty is-even is-every is-float is-instance is-integer is-integer-char is-iterable is-iterator is-keyword is-neg is-none is-not is-numeric is-odd is-pos is-string is-symbol is-zero isinstance islice issubclass iter iterable? iterate iterator? keyword keyword? lambda last len let lif lif-not list* list-comp locals loop macro-error macroexpand macroexpand-1 macroexpand-all map max merge-with method-decorator min multi-decorator multicombinations name neg? next none? nonlocal not not-in not? nth numeric? oct odd? open or ord partition permutations pos? post-route postwalk pow prewalk print product profile/calls profile/cpu put-route quasiquote quote raise range read read-str recursive-replace reduce remove repeat repeatedly repr require rest round route route-with-methods rwm second seq set-comp setattr setv some sorted string string? sum switch symbol? take take-nth take-while tee try unless unquote unquote-splicing vars walk when while with with* with-decorator with-gensyms xi xor yield yield-from zero? zip zip-longest | |= ~"},i={begin:n,relevance:0},o={className:"number",begin:"[-+]?\\d+(\\.\\d+)?",relevance:0},a=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),s=e.COMMENT(";","$",{relevance:0}),l={className:"literal",begin:/\b([Tt]rue|[Ff]alse|nil|None)\b/},c={begin:"[\\[\\{]",end:"[\\]\\}]",relevance:0},u={className:"comment",begin:"\\^"+n},d=e.COMMENT("\\^\\{","\\}"),h={className:"symbol",begin:"[:]{1,2}"+n},p={begin:"\\(",end:"\\)"},m={endsWithParent:!0,relevance:0},g={className:"name",relevance:0,keywords:r,begin:n,starts:m},f=[p,a,u,d,s,h,c,o,l,i];return p.contains=[e.COMMENT("comment",""),g,m],m.contains=f,c.contains=f,{name:"Hy",aliases:["hylang"],illegal:/\S/,contains:[e.SHEBANG(),p,a,u,d,s,h,c,o,l]}}},function(e,t){e.exports=function(e){return{name:"Inform 7",aliases:["i7"],case_insensitive:!0,keywords:{keyword:"thing room person man woman animal container supporter backdrop door scenery open closed locked inside gender is are say understand kind of rule"},contains:[{className:"string",begin:'"',end:'"',relevance:0,contains:[{className:"subst",begin:"\\[",end:"\\]"}]},{className:"section",begin:/^(Volume|Book|Part|Chapter|Section|Table)\b/,end:"$"},{begin:/^(Check|Carry out|Report|Instead of|To|Rule|When|Before|After)\b/,end:":",contains:[{begin:"\\(This",end:"\\)"}]},{className:"comment",begin:"\\[",end:"\\]",contains:["self"]}]}}},function(e,t){e.exports=function(e){const t=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},r=e.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const i={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},o={className:"literal",begin:/\bon|off|true|false|yes|no\b/},a={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},s={begin:/\[/,end:/\]/,contains:[r,o,i,a,n,"self"],relevance:0},l=t.either(/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/);return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[r,{className:"section",begin:/\[+/,end:/\]+/},{begin:t.concat(l,"(\\s*\\.\\s*",l,")*",t.lookahead(/\s*=\s*[^#\s]/)),className:"attr",starts:{end:/$/,contains:[r,s,o,i,a,n]}}]}}},function(e,t){e.exports=function(e){const t=e.regex,n=/(_[a-z_\d]+)?/,r=/([de][+-]?\d+)?/,i={className:"number",variants:[{begin:t.concat(/\b\d+/,/\.(\d*)/,r,n)},{begin:t.concat(/\b\d+/,r,n)},{begin:t.concat(/\.\d+/,r,n)}],relevance:0};return{name:"IRPF90",case_insensitive:!0,keywords:{literal:".False. .True.",keyword:"kind do while private call intrinsic where elsewhere type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. goto save else use module select case access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit continue format pause cycle exit c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg synchronous nopass non_overridable pass protected volatile abstract extends import non_intrinsic value deferred generic final enumerator class associate bind enum c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated c_f_pointer c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure integer real character complex logical dimension allocatable|10 parameter external implicit|10 none double precision assign intent optional pointer target in out common equivalence data begin_provider &begin_provider end_provider begin_shell end_shell begin_template end_template subst assert touch soft_touch provide no_dep free irp_if irp_else irp_endif irp_write irp_read",built_in:"alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_of acosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image IRP_ALIGN irp_here"},illegal:/\/\*/,contains:[e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{className:"string",relevance:0}),{className:"function",beginKeywords:"subroutine function program",illegal:"[${=\\n]",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"}]},e.COMMENT("!","$",{relevance:0}),e.COMMENT("begin_doc","end_doc",{relevance:10}),i]}}},function(e,t){e.exports=function(e){const t="[A-Za-zА-Яа-яёЁ_!][A-Za-zА-Яа-яёЁ_0-9]*",n={className:"number",begin:e.NUMBER_RE,relevance:0},r={className:"string",variants:[{begin:'"',end:'"'},{begin:"'",end:"'"}]},i={className:"doctag",begin:"\\b(?:TODO|DONE|BEGIN|END|STUB|CHG|FIXME|NOTE|BUG|XXX)\\b",relevance:0},o={variants:[{className:"comment",begin:"//",end:"$",relevance:0,contains:[e.PHRASAL_WORDS_MODE,i]},{className:"comment",begin:"/\\*",end:"\\*/",relevance:0,contains:[e.PHRASAL_WORDS_MODE,i]}]},a={$pattern:t,keyword:"and и else иначе endexcept endfinally endforeach конецвсе endif конецесли endwhile конецпока except exitfor finally foreach все if если in в not не or или try while пока ",built_in:"SYSRES_CONST_ACCES_RIGHT_TYPE_EDIT SYSRES_CONST_ACCES_RIGHT_TYPE_FULL SYSRES_CONST_ACCES_RIGHT_TYPE_VIEW SYSRES_CONST_ACCESS_MODE_REQUISITE_CODE SYSRES_CONST_ACCESS_NO_ACCESS_VIEW SYSRES_CONST_ACCESS_NO_ACCESS_VIEW_CODE SYSRES_CONST_ACCESS_RIGHTS_ADD_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_ADD_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_CHANGE_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_CHANGE_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_DELETE_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_DELETE_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_EXECUTE_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_EXECUTE_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_NO_ACCESS_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_NO_ACCESS_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_RATIFY_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_RATIFY_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_VIEW SYSRES_CONST_ACCESS_RIGHTS_VIEW_CODE SYSRES_CONST_ACCESS_RIGHTS_VIEW_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_VIEW_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_TYPE_CHANGE SYSRES_CONST_ACCESS_TYPE_CHANGE_CODE SYSRES_CONST_ACCESS_TYPE_EXISTS SYSRES_CONST_ACCESS_TYPE_EXISTS_CODE SYSRES_CONST_ACCESS_TYPE_FULL SYSRES_CONST_ACCESS_TYPE_FULL_CODE SYSRES_CONST_ACCESS_TYPE_VIEW SYSRES_CONST_ACCESS_TYPE_VIEW_CODE SYSRES_CONST_ACTION_TYPE_ABORT SYSRES_CONST_ACTION_TYPE_ACCEPT SYSRES_CONST_ACTION_TYPE_ACCESS_RIGHTS SYSRES_CONST_ACTION_TYPE_ADD_ATTACHMENT SYSRES_CONST_ACTION_TYPE_CHANGE_CARD SYSRES_CONST_ACTION_TYPE_CHANGE_KIND SYSRES_CONST_ACTION_TYPE_CHANGE_STORAGE SYSRES_CONST_ACTION_TYPE_CONTINUE SYSRES_CONST_ACTION_TYPE_COPY SYSRES_CONST_ACTION_TYPE_CREATE SYSRES_CONST_ACTION_TYPE_CREATE_VERSION SYSRES_CONST_ACTION_TYPE_DELETE SYSRES_CONST_ACTION_TYPE_DELETE_ATTACHMENT SYSRES_CONST_ACTION_TYPE_DELETE_VERSION SYSRES_CONST_ACTION_TYPE_DISABLE_DELEGATE_ACCESS_RIGHTS SYSRES_CONST_ACTION_TYPE_ENABLE_DELEGATE_ACCESS_RIGHTS SYSRES_CONST_ACTION_TYPE_ENCRYPTION_BY_CERTIFICATE SYSRES_CONST_ACTION_TYPE_ENCRYPTION_BY_CERTIFICATE_AND_PASSWORD SYSRES_CONST_ACTION_TYPE_ENCRYPTION_BY_PASSWORD SYSRES_CONST_ACTION_TYPE_EXPORT_WITH_LOCK SYSRES_CONST_ACTION_TYPE_EXPORT_WITHOUT_LOCK SYSRES_CONST_ACTION_TYPE_IMPORT_WITH_UNLOCK SYSRES_CONST_ACTION_TYPE_IMPORT_WITHOUT_UNLOCK SYSRES_CONST_ACTION_TYPE_LIFE_CYCLE_STAGE SYSRES_CONST_ACTION_TYPE_LOCK SYSRES_CONST_ACTION_TYPE_LOCK_FOR_SERVER SYSRES_CONST_ACTION_TYPE_LOCK_MODIFY SYSRES_CONST_ACTION_TYPE_MARK_AS_READED SYSRES_CONST_ACTION_TYPE_MARK_AS_UNREADED SYSRES_CONST_ACTION_TYPE_MODIFY SYSRES_CONST_ACTION_TYPE_MODIFY_CARD SYSRES_CONST_ACTION_TYPE_MOVE_TO_ARCHIVE SYSRES_CONST_ACTION_TYPE_OFF_ENCRYPTION SYSRES_CONST_ACTION_TYPE_PASSWORD_CHANGE SYSRES_CONST_ACTION_TYPE_PERFORM SYSRES_CONST_ACTION_TYPE_RECOVER_FROM_LOCAL_COPY SYSRES_CONST_ACTION_TYPE_RESTART SYSRES_CONST_ACTION_TYPE_RESTORE_FROM_ARCHIVE SYSRES_CONST_ACTION_TYPE_REVISION SYSRES_CONST_ACTION_TYPE_SEND_BY_MAIL SYSRES_CONST_ACTION_TYPE_SIGN SYSRES_CONST_ACTION_TYPE_START SYSRES_CONST_ACTION_TYPE_UNLOCK SYSRES_CONST_ACTION_TYPE_UNLOCK_FROM_SERVER SYSRES_CONST_ACTION_TYPE_VERSION_STATE SYSRES_CONST_ACTION_TYPE_VERSION_VISIBILITY SYSRES_CONST_ACTION_TYPE_VIEW SYSRES_CONST_ACTION_TYPE_VIEW_SHADOW_COPY SYSRES_CONST_ACTION_TYPE_WORKFLOW_DESCRIPTION_MODIFY SYSRES_CONST_ACTION_TYPE_WRITE_HISTORY SYSRES_CONST_ACTIVE_VERSION_STATE_PICK_VALUE SYSRES_CONST_ADD_REFERENCE_MODE_NAME SYSRES_CONST_ADDITION_REQUISITE_CODE SYSRES_CONST_ADDITIONAL_PARAMS_REQUISITE_CODE SYSRES_CONST_ADITIONAL_JOB_END_DATE_REQUISITE_NAME SYSRES_CONST_ADITIONAL_JOB_READ_REQUISITE_NAME SYSRES_CONST_ADITIONAL_JOB_START_DATE_REQUISITE_NAME SYSRES_CONST_ADITIONAL_JOB_STATE_REQUISITE_NAME SYSRES_CONST_ADMINISTRATION_HISTORY_ADDING_USER_TO_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_ADDING_USER_TO_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_COMP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_COMP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_USER_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_USER_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_CREATION SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_CREATION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_DELETION SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_DELETION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_COMP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_COMP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_FROM_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_FROM_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_RESTRICTION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_RESTRICTION_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_PRIVILEGE_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_PRIVILEGE_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_RIGHTS_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_RIGHTS_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_IS_MAIN_SERVER_CHANGED_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_IS_MAIN_SERVER_CHANGED_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_IS_PUBLIC_CHANGED_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_IS_PUBLIC_CHANGED_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_RESTRICTION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_RESTRICTION_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_PRIVILEGE_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_PRIVILEGE_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_RIGHTS_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_RIGHTS_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_CREATION SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_CREATION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_DELETION SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_DELETION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_CATEGORY_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_CATEGORY_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_COMP_TITLE_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_COMP_TITLE_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_FULL_NAME_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_FULL_NAME_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_PARENT_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_PARENT_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_AUTH_TYPE_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_AUTH_TYPE_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_LOGIN_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_LOGIN_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_STATUS_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_STATUS_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_USER_PASSWORD_CHANGE SYSRES_CONST_ADMINISTRATION_HISTORY_USER_PASSWORD_CHANGE_ACTION SYSRES_CONST_ALL_ACCEPT_CONDITION_RUS SYSRES_CONST_ALL_USERS_GROUP SYSRES_CONST_ALL_USERS_GROUP_NAME SYSRES_CONST_ALL_USERS_SERVER_GROUP_NAME SYSRES_CONST_ALLOWED_ACCESS_TYPE_CODE SYSRES_CONST_ALLOWED_ACCESS_TYPE_NAME SYSRES_CONST_APP_VIEWER_TYPE_REQUISITE_CODE SYSRES_CONST_APPROVING_SIGNATURE_NAME SYSRES_CONST_APPROVING_SIGNATURE_REQUISITE_CODE SYSRES_CONST_ASSISTANT_SUBSTITUE_TYPE SYSRES_CONST_ASSISTANT_SUBSTITUE_TYPE_CODE SYSRES_CONST_ATTACH_TYPE_COMPONENT_TOKEN SYSRES_CONST_ATTACH_TYPE_DOC SYSRES_CONST_ATTACH_TYPE_EDOC SYSRES_CONST_ATTACH_TYPE_FOLDER SYSRES_CONST_ATTACH_TYPE_JOB SYSRES_CONST_ATTACH_TYPE_REFERENCE SYSRES_CONST_ATTACH_TYPE_TASK SYSRES_CONST_AUTH_ENCODED_PASSWORD SYSRES_CONST_AUTH_ENCODED_PASSWORD_CODE SYSRES_CONST_AUTH_NOVELL SYSRES_CONST_AUTH_PASSWORD SYSRES_CONST_AUTH_PASSWORD_CODE SYSRES_CONST_AUTH_WINDOWS SYSRES_CONST_AUTHENTICATING_SIGNATURE_NAME SYSRES_CONST_AUTHENTICATING_SIGNATURE_REQUISITE_CODE SYSRES_CONST_AUTO_ENUM_METHOD_FLAG SYSRES_CONST_AUTO_NUMERATION_CODE SYSRES_CONST_AUTO_STRONG_ENUM_METHOD_FLAG SYSRES_CONST_AUTOTEXT_NAME_REQUISITE_CODE SYSRES_CONST_AUTOTEXT_TEXT_REQUISITE_CODE SYSRES_CONST_AUTOTEXT_USAGE_ALL SYSRES_CONST_AUTOTEXT_USAGE_ALL_CODE SYSRES_CONST_AUTOTEXT_USAGE_SIGN SYSRES_CONST_AUTOTEXT_USAGE_SIGN_CODE SYSRES_CONST_AUTOTEXT_USAGE_WORK SYSRES_CONST_AUTOTEXT_USAGE_WORK_CODE SYSRES_CONST_AUTOTEXT_USE_ANYWHERE_CODE SYSRES_CONST_AUTOTEXT_USE_ON_SIGNING_CODE SYSRES_CONST_AUTOTEXT_USE_ON_WORK_CODE SYSRES_CONST_BEGIN_DATE_REQUISITE_CODE SYSRES_CONST_BLACK_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_BLUE_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_BTN_PART SYSRES_CONST_CALCULATED_ROLE_TYPE_CODE SYSRES_CONST_CALL_TYPE_VARIABLE_BUTTON_VALUE SYSRES_CONST_CALL_TYPE_VARIABLE_PROGRAM_VALUE SYSRES_CONST_CANCEL_MESSAGE_FUNCTION_RESULT SYSRES_CONST_CARD_PART SYSRES_CONST_CARD_REFERENCE_MODE_NAME SYSRES_CONST_CERTIFICATE_TYPE_REQUISITE_ENCRYPT_VALUE SYSRES_CONST_CERTIFICATE_TYPE_REQUISITE_SIGN_AND_ENCRYPT_VALUE SYSRES_CONST_CERTIFICATE_TYPE_REQUISITE_SIGN_VALUE SYSRES_CONST_CHECK_PARAM_VALUE_DATE_PARAM_TYPE SYSRES_CONST_CHECK_PARAM_VALUE_FLOAT_PARAM_TYPE SYSRES_CONST_CHECK_PARAM_VALUE_INTEGER_PARAM_TYPE SYSRES_CONST_CHECK_PARAM_VALUE_PICK_PARAM_TYPE SYSRES_CONST_CHECK_PARAM_VALUE_REEFRENCE_PARAM_TYPE SYSRES_CONST_CLOSED_RECORD_FLAG_VALUE_FEMININE SYSRES_CONST_CLOSED_RECORD_FLAG_VALUE_MASCULINE SYSRES_CONST_CODE_COMPONENT_TYPE_ADMIN SYSRES_CONST_CODE_COMPONENT_TYPE_DEVELOPER SYSRES_CONST_CODE_COMPONENT_TYPE_DOCS SYSRES_CONST_CODE_COMPONENT_TYPE_EDOC_CARDS SYSRES_CONST_CODE_COMPONENT_TYPE_EXTERNAL_EXECUTABLE SYSRES_CONST_CODE_COMPONENT_TYPE_OTHER SYSRES_CONST_CODE_COMPONENT_TYPE_REFERENCE SYSRES_CONST_CODE_COMPONENT_TYPE_REPORT SYSRES_CONST_CODE_COMPONENT_TYPE_SCRIPT SYSRES_CONST_CODE_COMPONENT_TYPE_URL SYSRES_CONST_CODE_REQUISITE_ACCESS SYSRES_CONST_CODE_REQUISITE_CODE SYSRES_CONST_CODE_REQUISITE_COMPONENT SYSRES_CONST_CODE_REQUISITE_DESCRIPTION SYSRES_CONST_CODE_REQUISITE_EXCLUDE_COMPONENT SYSRES_CONST_CODE_REQUISITE_RECORD SYSRES_CONST_COMMENT_REQ_CODE SYSRES_CONST_COMMON_SETTINGS_REQUISITE_CODE SYSRES_CONST_COMP_CODE_GRD SYSRES_CONST_COMPONENT_GROUP_TYPE_REQUISITE_CODE SYSRES_CONST_COMPONENT_TYPE_ADMIN_COMPONENTS SYSRES_CONST_COMPONENT_TYPE_DEVELOPER_COMPONENTS SYSRES_CONST_COMPONENT_TYPE_DOCS SYSRES_CONST_COMPONENT_TYPE_EDOC_CARDS SYSRES_CONST_COMPONENT_TYPE_EDOCS SYSRES_CONST_COMPONENT_TYPE_EXTERNAL_EXECUTABLE SYSRES_CONST_COMPONENT_TYPE_OTHER SYSRES_CONST_COMPONENT_TYPE_REFERENCE_TYPES SYSRES_CONST_COMPONENT_TYPE_REFERENCES SYSRES_CONST_COMPONENT_TYPE_REPORTS SYSRES_CONST_COMPONENT_TYPE_SCRIPTS SYSRES_CONST_COMPONENT_TYPE_URL SYSRES_CONST_COMPONENTS_REMOTE_SERVERS_VIEW_CODE SYSRES_CONST_CONDITION_BLOCK_DESCRIPTION SYSRES_CONST_CONST_FIRM_STATUS_COMMON SYSRES_CONST_CONST_FIRM_STATUS_INDIVIDUAL SYSRES_CONST_CONST_NEGATIVE_VALUE SYSRES_CONST_CONST_POSITIVE_VALUE SYSRES_CONST_CONST_SERVER_STATUS_DONT_REPLICATE SYSRES_CONST_CONST_SERVER_STATUS_REPLICATE SYSRES_CONST_CONTENTS_REQUISITE_CODE SYSRES_CONST_DATA_TYPE_BOOLEAN SYSRES_CONST_DATA_TYPE_DATE SYSRES_CONST_DATA_TYPE_FLOAT SYSRES_CONST_DATA_TYPE_INTEGER SYSRES_CONST_DATA_TYPE_PICK SYSRES_CONST_DATA_TYPE_REFERENCE SYSRES_CONST_DATA_TYPE_STRING SYSRES_CONST_DATA_TYPE_TEXT SYSRES_CONST_DATA_TYPE_VARIANT SYSRES_CONST_DATE_CLOSE_REQ_CODE SYSRES_CONST_DATE_FORMAT_DATE_ONLY_CHAR SYSRES_CONST_DATE_OPEN_REQ_CODE SYSRES_CONST_DATE_REQUISITE SYSRES_CONST_DATE_REQUISITE_CODE SYSRES_CONST_DATE_REQUISITE_NAME SYSRES_CONST_DATE_REQUISITE_TYPE SYSRES_CONST_DATE_TYPE_CHAR SYSRES_CONST_DATETIME_FORMAT_VALUE SYSRES_CONST_DEA_ACCESS_RIGHTS_ACTION_CODE SYSRES_CONST_DESCRIPTION_LOCALIZE_ID_REQUISITE_CODE SYSRES_CONST_DESCRIPTION_REQUISITE_CODE SYSRES_CONST_DET1_PART SYSRES_CONST_DET2_PART SYSRES_CONST_DET3_PART SYSRES_CONST_DET4_PART SYSRES_CONST_DET5_PART SYSRES_CONST_DET6_PART SYSRES_CONST_DETAIL_DATASET_KEY_REQUISITE_CODE SYSRES_CONST_DETAIL_PICK_REQUISITE_CODE SYSRES_CONST_DETAIL_REQ_CODE SYSRES_CONST_DO_NOT_USE_ACCESS_TYPE_CODE SYSRES_CONST_DO_NOT_USE_ACCESS_TYPE_NAME SYSRES_CONST_DO_NOT_USE_ON_VIEW_ACCESS_TYPE_CODE SYSRES_CONST_DO_NOT_USE_ON_VIEW_ACCESS_TYPE_NAME SYSRES_CONST_DOCUMENT_STORAGES_CODE SYSRES_CONST_DOCUMENT_TEMPLATES_TYPE_NAME SYSRES_CONST_DOUBLE_REQUISITE_CODE SYSRES_CONST_EDITOR_CLOSE_FILE_OBSERV_TYPE_CODE SYSRES_CONST_EDITOR_CLOSE_PROCESS_OBSERV_TYPE_CODE SYSRES_CONST_EDITOR_TYPE_REQUISITE_CODE SYSRES_CONST_EDITORS_APPLICATION_NAME_REQUISITE_CODE SYSRES_CONST_EDITORS_CREATE_SEVERAL_PROCESSES_REQUISITE_CODE SYSRES_CONST_EDITORS_EXTENSION_REQUISITE_CODE SYSRES_CONST_EDITORS_OBSERVER_BY_PROCESS_TYPE SYSRES_CONST_EDITORS_REFERENCE_CODE SYSRES_CONST_EDITORS_REPLACE_SPEC_CHARS_REQUISITE_CODE SYSRES_CONST_EDITORS_USE_PLUGINS_REQUISITE_CODE SYSRES_CONST_EDITORS_VIEW_DOCUMENT_OPENED_TO_EDIT_CODE SYSRES_CONST_EDOC_CARD_TYPE_REQUISITE_CODE SYSRES_CONST_EDOC_CARD_TYPES_LINK_REQUISITE_CODE SYSRES_CONST_EDOC_CERTIFICATE_AND_PASSWORD_ENCODE_CODE SYSRES_CONST_EDOC_CERTIFICATE_ENCODE_CODE SYSRES_CONST_EDOC_DATE_REQUISITE_CODE SYSRES_CONST_EDOC_KIND_REFERENCE_CODE SYSRES_CONST_EDOC_KINDS_BY_TEMPLATE_ACTION_CODE SYSRES_CONST_EDOC_MANAGE_ACCESS_CODE SYSRES_CONST_EDOC_NONE_ENCODE_CODE SYSRES_CONST_EDOC_NUMBER_REQUISITE_CODE SYSRES_CONST_EDOC_PASSWORD_ENCODE_CODE SYSRES_CONST_EDOC_READONLY_ACCESS_CODE SYSRES_CONST_EDOC_SHELL_LIFE_TYPE_VIEW_VALUE SYSRES_CONST_EDOC_SIZE_RESTRICTION_PRIORITY_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_CHECK_ACCESS_RIGHTS_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_COMPUTER_NAME_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_DATABASE_NAME_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_EDIT_IN_STORAGE_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_LOCAL_PATH_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_SHARED_SOURCE_NAME_REQUISITE_CODE SYSRES_CONST_EDOC_TEMPLATE_REQUISITE_CODE SYSRES_CONST_EDOC_TYPES_REFERENCE_CODE SYSRES_CONST_EDOC_VERSION_ACTIVE_STAGE_CODE SYSRES_CONST_EDOC_VERSION_DESIGN_STAGE_CODE SYSRES_CONST_EDOC_VERSION_OBSOLETE_STAGE_CODE SYSRES_CONST_EDOC_WRITE_ACCES_CODE SYSRES_CONST_EDOCUMENT_CARD_REQUISITES_REFERENCE_CODE_SELECTED_REQUISITE SYSRES_CONST_ENCODE_CERTIFICATE_TYPE_CODE SYSRES_CONST_END_DATE_REQUISITE_CODE SYSRES_CONST_ENUMERATION_TYPE_REQUISITE_CODE SYSRES_CONST_EXECUTE_ACCESS_RIGHTS_TYPE_CODE SYSRES_CONST_EXECUTIVE_FILE_STORAGE_TYPE SYSRES_CONST_EXIST_CONST SYSRES_CONST_EXIST_VALUE SYSRES_CONST_EXPORT_LOCK_TYPE_ASK SYSRES_CONST_EXPORT_LOCK_TYPE_WITH_LOCK SYSRES_CONST_EXPORT_LOCK_TYPE_WITHOUT_LOCK SYSRES_CONST_EXPORT_VERSION_TYPE_ASK SYSRES_CONST_EXPORT_VERSION_TYPE_LAST SYSRES_CONST_EXPORT_VERSION_TYPE_LAST_ACTIVE SYSRES_CONST_EXTENSION_REQUISITE_CODE SYSRES_CONST_FILTER_NAME_REQUISITE_CODE SYSRES_CONST_FILTER_REQUISITE_CODE SYSRES_CONST_FILTER_TYPE_COMMON_CODE SYSRES_CONST_FILTER_TYPE_COMMON_NAME SYSRES_CONST_FILTER_TYPE_USER_CODE SYSRES_CONST_FILTER_TYPE_USER_NAME SYSRES_CONST_FILTER_VALUE_REQUISITE_NAME SYSRES_CONST_FLOAT_NUMBER_FORMAT_CHAR SYSRES_CONST_FLOAT_REQUISITE_TYPE SYSRES_CONST_FOLDER_AUTHOR_VALUE SYSRES_CONST_FOLDER_KIND_ANY_OBJECTS SYSRES_CONST_FOLDER_KIND_COMPONENTS SYSRES_CONST_FOLDER_KIND_EDOCS SYSRES_CONST_FOLDER_KIND_JOBS SYSRES_CONST_FOLDER_KIND_TASKS SYSRES_CONST_FOLDER_TYPE_COMMON SYSRES_CONST_FOLDER_TYPE_COMPONENT SYSRES_CONST_FOLDER_TYPE_FAVORITES SYSRES_CONST_FOLDER_TYPE_INBOX SYSRES_CONST_FOLDER_TYPE_OUTBOX SYSRES_CONST_FOLDER_TYPE_QUICK_LAUNCH SYSRES_CONST_FOLDER_TYPE_SEARCH SYSRES_CONST_FOLDER_TYPE_SHORTCUTS SYSRES_CONST_FOLDER_TYPE_USER SYSRES_CONST_FROM_DICTIONARY_ENUM_METHOD_FLAG SYSRES_CONST_FULL_SUBSTITUTE_TYPE SYSRES_CONST_FULL_SUBSTITUTE_TYPE_CODE SYSRES_CONST_FUNCTION_CANCEL_RESULT SYSRES_CONST_FUNCTION_CATEGORY_SYSTEM SYSRES_CONST_FUNCTION_CATEGORY_USER SYSRES_CONST_FUNCTION_FAILURE_RESULT SYSRES_CONST_FUNCTION_SAVE_RESULT SYSRES_CONST_GENERATED_REQUISITE SYSRES_CONST_GREEN_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_GROUP_ACCOUNT_TYPE_VALUE_CODE SYSRES_CONST_GROUP_CATEGORY_NORMAL_CODE SYSRES_CONST_GROUP_CATEGORY_NORMAL_NAME SYSRES_CONST_GROUP_CATEGORY_SERVICE_CODE SYSRES_CONST_GROUP_CATEGORY_SERVICE_NAME SYSRES_CONST_GROUP_COMMON_CATEGORY_FIELD_VALUE SYSRES_CONST_GROUP_FULL_NAME_REQUISITE_CODE SYSRES_CONST_GROUP_NAME_REQUISITE_CODE SYSRES_CONST_GROUP_RIGHTS_T_REQUISITE_CODE SYSRES_CONST_GROUP_SERVER_CODES_REQUISITE_CODE SYSRES_CONST_GROUP_SERVER_NAME_REQUISITE_CODE SYSRES_CONST_GROUP_SERVICE_CATEGORY_FIELD_VALUE SYSRES_CONST_GROUP_USER_REQUISITE_CODE SYSRES_CONST_GROUPS_REFERENCE_CODE SYSRES_CONST_GROUPS_REQUISITE_CODE SYSRES_CONST_HIDDEN_MODE_NAME SYSRES_CONST_HIGH_LVL_REQUISITE_CODE SYSRES_CONST_HISTORY_ACTION_CREATE_CODE SYSRES_CONST_HISTORY_ACTION_DELETE_CODE SYSRES_CONST_HISTORY_ACTION_EDIT_CODE SYSRES_CONST_HOUR_CHAR SYSRES_CONST_ID_REQUISITE_CODE SYSRES_CONST_IDSPS_REQUISITE_CODE SYSRES_CONST_IMAGE_MODE_COLOR SYSRES_CONST_IMAGE_MODE_GREYSCALE SYSRES_CONST_IMAGE_MODE_MONOCHROME SYSRES_CONST_IMPORTANCE_HIGH SYSRES_CONST_IMPORTANCE_LOW SYSRES_CONST_IMPORTANCE_NORMAL SYSRES_CONST_IN_DESIGN_VERSION_STATE_PICK_VALUE SYSRES_CONST_INCOMING_WORK_RULE_TYPE_CODE SYSRES_CONST_INT_REQUISITE SYSRES_CONST_INT_REQUISITE_TYPE SYSRES_CONST_INTEGER_NUMBER_FORMAT_CHAR SYSRES_CONST_INTEGER_TYPE_CHAR SYSRES_CONST_IS_GENERATED_REQUISITE_NEGATIVE_VALUE SYSRES_CONST_IS_PUBLIC_ROLE_REQUISITE_CODE SYSRES_CONST_IS_REMOTE_USER_NEGATIVE_VALUE SYSRES_CONST_IS_REMOTE_USER_POSITIVE_VALUE SYSRES_CONST_IS_STORED_REQUISITE_NEGATIVE_VALUE SYSRES_CONST_IS_STORED_REQUISITE_STORED_VALUE SYSRES_CONST_ITALIC_LIFE_CYCLE_STAGE_DRAW_STYLE SYSRES_CONST_JOB_BLOCK_DESCRIPTION SYSRES_CONST_JOB_KIND_CONTROL_JOB SYSRES_CONST_JOB_KIND_JOB SYSRES_CONST_JOB_KIND_NOTICE SYSRES_CONST_JOB_STATE_ABORTED SYSRES_CONST_JOB_STATE_COMPLETE SYSRES_CONST_JOB_STATE_WORKING SYSRES_CONST_KIND_REQUISITE_CODE SYSRES_CONST_KIND_REQUISITE_NAME SYSRES_CONST_KINDS_CREATE_SHADOW_COPIES_REQUISITE_CODE SYSRES_CONST_KINDS_DEFAULT_EDOC_LIFE_STAGE_REQUISITE_CODE SYSRES_CONST_KINDS_EDOC_ALL_TEPLATES_ALLOWED_REQUISITE_CODE SYSRES_CONST_KINDS_EDOC_ALLOW_LIFE_CYCLE_STAGE_CHANGING_REQUISITE_CODE SYSRES_CONST_KINDS_EDOC_ALLOW_MULTIPLE_ACTIVE_VERSIONS_REQUISITE_CODE SYSRES_CONST_KINDS_EDOC_SHARE_ACCES_RIGHTS_BY_DEFAULT_CODE SYSRES_CONST_KINDS_EDOC_TEMPLATE_REQUISITE_CODE SYSRES_CONST_KINDS_EDOC_TYPE_REQUISITE_CODE SYSRES_CONST_KINDS_SIGNERS_REQUISITES_CODE SYSRES_CONST_KOD_INPUT_TYPE SYSRES_CONST_LAST_UPDATE_DATE_REQUISITE_CODE SYSRES_CONST_LIFE_CYCLE_START_STAGE_REQUISITE_CODE SYSRES_CONST_LILAC_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_LINK_OBJECT_KIND_COMPONENT SYSRES_CONST_LINK_OBJECT_KIND_DOCUMENT SYSRES_CONST_LINK_OBJECT_KIND_EDOC SYSRES_CONST_LINK_OBJECT_KIND_FOLDER SYSRES_CONST_LINK_OBJECT_KIND_JOB SYSRES_CONST_LINK_OBJECT_KIND_REFERENCE SYSRES_CONST_LINK_OBJECT_KIND_TASK SYSRES_CONST_LINK_REF_TYPE_REQUISITE_CODE SYSRES_CONST_LIST_REFERENCE_MODE_NAME SYSRES_CONST_LOCALIZATION_DICTIONARY_MAIN_VIEW_CODE SYSRES_CONST_MAIN_VIEW_CODE SYSRES_CONST_MANUAL_ENUM_METHOD_FLAG SYSRES_CONST_MASTER_COMP_TYPE_REQUISITE_CODE SYSRES_CONST_MASTER_TABLE_REC_ID_REQUISITE_CODE SYSRES_CONST_MAXIMIZED_MODE_NAME SYSRES_CONST_ME_VALUE SYSRES_CONST_MESSAGE_ATTENTION_CAPTION SYSRES_CONST_MESSAGE_CONFIRMATION_CAPTION SYSRES_CONST_MESSAGE_ERROR_CAPTION SYSRES_CONST_MESSAGE_INFORMATION_CAPTION SYSRES_CONST_MINIMIZED_MODE_NAME SYSRES_CONST_MINUTE_CHAR SYSRES_CONST_MODULE_REQUISITE_CODE SYSRES_CONST_MONITORING_BLOCK_DESCRIPTION SYSRES_CONST_MONTH_FORMAT_VALUE SYSRES_CONST_NAME_LOCALIZE_ID_REQUISITE_CODE SYSRES_CONST_NAME_REQUISITE_CODE SYSRES_CONST_NAME_SINGULAR_REQUISITE_CODE SYSRES_CONST_NAMEAN_INPUT_TYPE SYSRES_CONST_NEGATIVE_PICK_VALUE SYSRES_CONST_NEGATIVE_VALUE SYSRES_CONST_NO SYSRES_CONST_NO_PICK_VALUE SYSRES_CONST_NO_SIGNATURE_REQUISITE_CODE SYSRES_CONST_NO_VALUE SYSRES_CONST_NONE_ACCESS_RIGHTS_TYPE_CODE SYSRES_CONST_NONOPERATING_RECORD_FLAG_VALUE SYSRES_CONST_NONOPERATING_RECORD_FLAG_VALUE_MASCULINE SYSRES_CONST_NORMAL_ACCESS_RIGHTS_TYPE_CODE SYSRES_CONST_NORMAL_LIFE_CYCLE_STAGE_DRAW_STYLE SYSRES_CONST_NORMAL_MODE_NAME SYSRES_CONST_NOT_ALLOWED_ACCESS_TYPE_CODE SYSRES_CONST_NOT_ALLOWED_ACCESS_TYPE_NAME SYSRES_CONST_NOTE_REQUISITE_CODE SYSRES_CONST_NOTICE_BLOCK_DESCRIPTION SYSRES_CONST_NUM_REQUISITE SYSRES_CONST_NUM_STR_REQUISITE_CODE SYSRES_CONST_NUMERATION_AUTO_NOT_STRONG SYSRES_CONST_NUMERATION_AUTO_STRONG SYSRES_CONST_NUMERATION_FROM_DICTONARY SYSRES_CONST_NUMERATION_MANUAL SYSRES_CONST_NUMERIC_TYPE_CHAR SYSRES_CONST_NUMREQ_REQUISITE_CODE SYSRES_CONST_OBSOLETE_VERSION_STATE_PICK_VALUE SYSRES_CONST_OPERATING_RECORD_FLAG_VALUE SYSRES_CONST_OPERATING_RECORD_FLAG_VALUE_CODE SYSRES_CONST_OPERATING_RECORD_FLAG_VALUE_FEMININE SYSRES_CONST_OPERATING_RECORD_FLAG_VALUE_MASCULINE SYSRES_CONST_OPTIONAL_FORM_COMP_REQCODE_PREFIX SYSRES_CONST_ORANGE_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_ORIGINALREF_REQUISITE_CODE SYSRES_CONST_OURFIRM_REF_CODE SYSRES_CONST_OURFIRM_REQUISITE_CODE SYSRES_CONST_OURFIRM_VAR SYSRES_CONST_OUTGOING_WORK_RULE_TYPE_CODE SYSRES_CONST_PICK_NEGATIVE_RESULT SYSRES_CONST_PICK_POSITIVE_RESULT SYSRES_CONST_PICK_REQUISITE SYSRES_CONST_PICK_REQUISITE_TYPE SYSRES_CONST_PICK_TYPE_CHAR SYSRES_CONST_PLAN_STATUS_REQUISITE_CODE SYSRES_CONST_PLATFORM_VERSION_COMMENT SYSRES_CONST_PLUGINS_SETTINGS_DESCRIPTION_REQUISITE_CODE SYSRES_CONST_POSITIVE_PICK_VALUE SYSRES_CONST_POWER_TO_CREATE_ACTION_CODE SYSRES_CONST_POWER_TO_SIGN_ACTION_CODE SYSRES_CONST_PRIORITY_REQUISITE_CODE SYSRES_CONST_QUALIFIED_TASK_TYPE SYSRES_CONST_QUALIFIED_TASK_TYPE_CODE SYSRES_CONST_RECSTAT_REQUISITE_CODE SYSRES_CONST_RED_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_REF_ID_T_REF_TYPE_REQUISITE_CODE SYSRES_CONST_REF_REQUISITE SYSRES_CONST_REF_REQUISITE_TYPE SYSRES_CONST_REF_REQUISITES_REFERENCE_CODE_SELECTED_REQUISITE SYSRES_CONST_REFERENCE_RECORD_HISTORY_CREATE_ACTION_CODE SYSRES_CONST_REFERENCE_RECORD_HISTORY_DELETE_ACTION_CODE SYSRES_CONST_REFERENCE_RECORD_HISTORY_MODIFY_ACTION_CODE SYSRES_CONST_REFERENCE_TYPE_CHAR SYSRES_CONST_REFERENCE_TYPE_REQUISITE_NAME SYSRES_CONST_REFERENCES_ADD_PARAMS_REQUISITE_CODE SYSRES_CONST_REFERENCES_DISPLAY_REQUISITE_REQUISITE_CODE SYSRES_CONST_REMOTE_SERVER_STATUS_WORKING SYSRES_CONST_REMOTE_SERVER_TYPE_MAIN SYSRES_CONST_REMOTE_SERVER_TYPE_SECONDARY SYSRES_CONST_REMOTE_USER_FLAG_VALUE_CODE SYSRES_CONST_REPORT_APP_EDITOR_INTERNAL SYSRES_CONST_REPORT_BASE_REPORT_ID_REQUISITE_CODE SYSRES_CONST_REPORT_BASE_REPORT_REQUISITE_CODE SYSRES_CONST_REPORT_SCRIPT_REQUISITE_CODE SYSRES_CONST_REPORT_TEMPLATE_REQUISITE_CODE SYSRES_CONST_REPORT_VIEWER_CODE_REQUISITE_CODE SYSRES_CONST_REQ_ALLOW_COMPONENT_DEFAULT_VALUE SYSRES_CONST_REQ_ALLOW_RECORD_DEFAULT_VALUE SYSRES_CONST_REQ_ALLOW_SERVER_COMPONENT_DEFAULT_VALUE SYSRES_CONST_REQ_MODE_AVAILABLE_CODE SYSRES_CONST_REQ_MODE_EDIT_CODE SYSRES_CONST_REQ_MODE_HIDDEN_CODE SYSRES_CONST_REQ_MODE_NOT_AVAILABLE_CODE SYSRES_CONST_REQ_MODE_VIEW_CODE SYSRES_CONST_REQ_NUMBER_REQUISITE_CODE SYSRES_CONST_REQ_SECTION_VALUE SYSRES_CONST_REQ_TYPE_VALUE SYSRES_CONST_REQUISITE_FORMAT_BY_UNIT SYSRES_CONST_REQUISITE_FORMAT_DATE_FULL SYSRES_CONST_REQUISITE_FORMAT_DATE_TIME SYSRES_CONST_REQUISITE_FORMAT_LEFT SYSRES_CONST_REQUISITE_FORMAT_RIGHT SYSRES_CONST_REQUISITE_FORMAT_WITHOUT_UNIT SYSRES_CONST_REQUISITE_NUMBER_REQUISITE_CODE SYSRES_CONST_REQUISITE_SECTION_ACTIONS SYSRES_CONST_REQUISITE_SECTION_BUTTON SYSRES_CONST_REQUISITE_SECTION_BUTTONS SYSRES_CONST_REQUISITE_SECTION_CARD SYSRES_CONST_REQUISITE_SECTION_TABLE SYSRES_CONST_REQUISITE_SECTION_TABLE10 SYSRES_CONST_REQUISITE_SECTION_TABLE11 SYSRES_CONST_REQUISITE_SECTION_TABLE12 SYSRES_CONST_REQUISITE_SECTION_TABLE13 SYSRES_CONST_REQUISITE_SECTION_TABLE14 SYSRES_CONST_REQUISITE_SECTION_TABLE15 SYSRES_CONST_REQUISITE_SECTION_TABLE16 SYSRES_CONST_REQUISITE_SECTION_TABLE17 SYSRES_CONST_REQUISITE_SECTION_TABLE18 SYSRES_CONST_REQUISITE_SECTION_TABLE19 SYSRES_CONST_REQUISITE_SECTION_TABLE2 SYSRES_CONST_REQUISITE_SECTION_TABLE20 SYSRES_CONST_REQUISITE_SECTION_TABLE21 SYSRES_CONST_REQUISITE_SECTION_TABLE22 SYSRES_CONST_REQUISITE_SECTION_TABLE23 SYSRES_CONST_REQUISITE_SECTION_TABLE24 SYSRES_CONST_REQUISITE_SECTION_TABLE3 SYSRES_CONST_REQUISITE_SECTION_TABLE4 SYSRES_CONST_REQUISITE_SECTION_TABLE5 SYSRES_CONST_REQUISITE_SECTION_TABLE6 SYSRES_CONST_REQUISITE_SECTION_TABLE7 SYSRES_CONST_REQUISITE_SECTION_TABLE8 SYSRES_CONST_REQUISITE_SECTION_TABLE9 SYSRES_CONST_REQUISITES_PSEUDOREFERENCE_REQUISITE_NUMBER_REQUISITE_CODE SYSRES_CONST_RIGHT_ALIGNMENT_CODE SYSRES_CONST_ROLES_REFERENCE_CODE SYSRES_CONST_ROUTE_STEP_AFTER_RUS SYSRES_CONST_ROUTE_STEP_AND_CONDITION_RUS SYSRES_CONST_ROUTE_STEP_OR_CONDITION_RUS SYSRES_CONST_ROUTE_TYPE_COMPLEX SYSRES_CONST_ROUTE_TYPE_PARALLEL SYSRES_CONST_ROUTE_TYPE_SERIAL SYSRES_CONST_SBDATASETDESC_NEGATIVE_VALUE SYSRES_CONST_SBDATASETDESC_POSITIVE_VALUE SYSRES_CONST_SBVIEWSDESC_POSITIVE_VALUE SYSRES_CONST_SCRIPT_BLOCK_DESCRIPTION SYSRES_CONST_SEARCH_BY_TEXT_REQUISITE_CODE SYSRES_CONST_SEARCHES_COMPONENT_CONTENT SYSRES_CONST_SEARCHES_CRITERIA_ACTION_NAME SYSRES_CONST_SEARCHES_EDOC_CONTENT SYSRES_CONST_SEARCHES_FOLDER_CONTENT SYSRES_CONST_SEARCHES_JOB_CONTENT SYSRES_CONST_SEARCHES_REFERENCE_CODE SYSRES_CONST_SEARCHES_TASK_CONTENT SYSRES_CONST_SECOND_CHAR SYSRES_CONST_SECTION_REQUISITE_ACTIONS_VALUE SYSRES_CONST_SECTION_REQUISITE_CARD_VALUE SYSRES_CONST_SECTION_REQUISITE_CODE SYSRES_CONST_SECTION_REQUISITE_DETAIL_1_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_2_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_3_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_4_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_5_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_6_VALUE SYSRES_CONST_SELECT_REFERENCE_MODE_NAME SYSRES_CONST_SELECT_TYPE_SELECTABLE SYSRES_CONST_SELECT_TYPE_SELECTABLE_ONLY_CHILD SYSRES_CONST_SELECT_TYPE_SELECTABLE_WITH_CHILD SYSRES_CONST_SELECT_TYPE_UNSLECTABLE SYSRES_CONST_SERVER_TYPE_MAIN SYSRES_CONST_SERVICE_USER_CATEGORY_FIELD_VALUE SYSRES_CONST_SETTINGS_USER_REQUISITE_CODE SYSRES_CONST_SIGNATURE_AND_ENCODE_CERTIFICATE_TYPE_CODE SYSRES_CONST_SIGNATURE_CERTIFICATE_TYPE_CODE SYSRES_CONST_SINGULAR_TITLE_REQUISITE_CODE SYSRES_CONST_SQL_SERVER_AUTHENTIFICATION_FLAG_VALUE_CODE SYSRES_CONST_SQL_SERVER_ENCODE_AUTHENTIFICATION_FLAG_VALUE_CODE SYSRES_CONST_STANDART_ROUTE_REFERENCE_CODE SYSRES_CONST_STANDART_ROUTE_REFERENCE_COMMENT_REQUISITE_CODE SYSRES_CONST_STANDART_ROUTES_GROUPS_REFERENCE_CODE SYSRES_CONST_STATE_REQ_NAME SYSRES_CONST_STATE_REQUISITE_ACTIVE_VALUE SYSRES_CONST_STATE_REQUISITE_CLOSED_VALUE SYSRES_CONST_STATE_REQUISITE_CODE SYSRES_CONST_STATIC_ROLE_TYPE_CODE SYSRES_CONST_STATUS_PLAN_DEFAULT_VALUE SYSRES_CONST_STATUS_VALUE_AUTOCLEANING SYSRES_CONST_STATUS_VALUE_BLUE_SQUARE SYSRES_CONST_STATUS_VALUE_COMPLETE SYSRES_CONST_STATUS_VALUE_GREEN_SQUARE SYSRES_CONST_STATUS_VALUE_ORANGE_SQUARE SYSRES_CONST_STATUS_VALUE_PURPLE_SQUARE SYSRES_CONST_STATUS_VALUE_RED_SQUARE SYSRES_CONST_STATUS_VALUE_SUSPEND SYSRES_CONST_STATUS_VALUE_YELLOW_SQUARE SYSRES_CONST_STDROUTE_SHOW_TO_USERS_REQUISITE_CODE SYSRES_CONST_STORAGE_TYPE_FILE SYSRES_CONST_STORAGE_TYPE_SQL_SERVER SYSRES_CONST_STR_REQUISITE SYSRES_CONST_STRIKEOUT_LIFE_CYCLE_STAGE_DRAW_STYLE SYSRES_CONST_STRING_FORMAT_LEFT_ALIGN_CHAR SYSRES_CONST_STRING_FORMAT_RIGHT_ALIGN_CHAR SYSRES_CONST_STRING_REQUISITE_CODE SYSRES_CONST_STRING_REQUISITE_TYPE SYSRES_CONST_STRING_TYPE_CHAR SYSRES_CONST_SUBSTITUTES_PSEUDOREFERENCE_CODE SYSRES_CONST_SUBTASK_BLOCK_DESCRIPTION SYSRES_CONST_SYSTEM_SETTING_CURRENT_USER_PARAM_VALUE SYSRES_CONST_SYSTEM_SETTING_EMPTY_VALUE_PARAM_VALUE SYSRES_CONST_SYSTEM_VERSION_COMMENT SYSRES_CONST_TASK_ACCESS_TYPE_ALL SYSRES_CONST_TASK_ACCESS_TYPE_ALL_MEMBERS SYSRES_CONST_TASK_ACCESS_TYPE_MANUAL SYSRES_CONST_TASK_ENCODE_TYPE_CERTIFICATION SYSRES_CONST_TASK_ENCODE_TYPE_CERTIFICATION_AND_PASSWORD SYSRES_CONST_TASK_ENCODE_TYPE_NONE SYSRES_CONST_TASK_ENCODE_TYPE_PASSWORD SYSRES_CONST_TASK_ROUTE_ALL_CONDITION SYSRES_CONST_TASK_ROUTE_AND_CONDITION SYSRES_CONST_TASK_ROUTE_OR_CONDITION SYSRES_CONST_TASK_STATE_ABORTED SYSRES_CONST_TASK_STATE_COMPLETE SYSRES_CONST_TASK_STATE_CONTINUED SYSRES_CONST_TASK_STATE_CONTROL SYSRES_CONST_TASK_STATE_INIT SYSRES_CONST_TASK_STATE_WORKING SYSRES_CONST_TASK_TITLE SYSRES_CONST_TASK_TYPES_GROUPS_REFERENCE_CODE SYSRES_CONST_TASK_TYPES_REFERENCE_CODE SYSRES_CONST_TEMPLATES_REFERENCE_CODE SYSRES_CONST_TEST_DATE_REQUISITE_NAME SYSRES_CONST_TEST_DEV_DATABASE_NAME SYSRES_CONST_TEST_DEV_SYSTEM_CODE SYSRES_CONST_TEST_EDMS_DATABASE_NAME SYSRES_CONST_TEST_EDMS_MAIN_CODE SYSRES_CONST_TEST_EDMS_MAIN_DB_NAME SYSRES_CONST_TEST_EDMS_SECOND_CODE SYSRES_CONST_TEST_EDMS_SECOND_DB_NAME SYSRES_CONST_TEST_EDMS_SYSTEM_CODE SYSRES_CONST_TEST_NUMERIC_REQUISITE_NAME SYSRES_CONST_TEXT_REQUISITE SYSRES_CONST_TEXT_REQUISITE_CODE SYSRES_CONST_TEXT_REQUISITE_TYPE SYSRES_CONST_TEXT_TYPE_CHAR SYSRES_CONST_TYPE_CODE_REQUISITE_CODE SYSRES_CONST_TYPE_REQUISITE_CODE SYSRES_CONST_UNDEFINED_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_UNITS_SECTION_ID_REQUISITE_CODE SYSRES_CONST_UNITS_SECTION_REQUISITE_CODE SYSRES_CONST_UNOPERATING_RECORD_FLAG_VALUE_CODE SYSRES_CONST_UNSTORED_DATA_REQUISITE_CODE SYSRES_CONST_UNSTORED_DATA_REQUISITE_NAME SYSRES_CONST_USE_ACCESS_TYPE_CODE SYSRES_CONST_USE_ACCESS_TYPE_NAME SYSRES_CONST_USER_ACCOUNT_TYPE_VALUE_CODE SYSRES_CONST_USER_ADDITIONAL_INFORMATION_REQUISITE_CODE SYSRES_CONST_USER_AND_GROUP_ID_FROM_PSEUDOREFERENCE_REQUISITE_CODE SYSRES_CONST_USER_CATEGORY_NORMAL SYSRES_CONST_USER_CERTIFICATE_REQUISITE_CODE SYSRES_CONST_USER_CERTIFICATE_STATE_REQUISITE_CODE SYSRES_CONST_USER_CERTIFICATE_SUBJECT_NAME_REQUISITE_CODE SYSRES_CONST_USER_CERTIFICATE_THUMBPRINT_REQUISITE_CODE SYSRES_CONST_USER_COMMON_CATEGORY SYSRES_CONST_USER_COMMON_CATEGORY_CODE SYSRES_CONST_USER_FULL_NAME_REQUISITE_CODE SYSRES_CONST_USER_GROUP_TYPE_REQUISITE_CODE SYSRES_CONST_USER_LOGIN_REQUISITE_CODE SYSRES_CONST_USER_REMOTE_CONTROLLER_REQUISITE_CODE SYSRES_CONST_USER_REMOTE_SYSTEM_REQUISITE_CODE SYSRES_CONST_USER_RIGHTS_T_REQUISITE_CODE SYSRES_CONST_USER_SERVER_NAME_REQUISITE_CODE SYSRES_CONST_USER_SERVICE_CATEGORY SYSRES_CONST_USER_SERVICE_CATEGORY_CODE SYSRES_CONST_USER_STATUS_ADMINISTRATOR_CODE SYSRES_CONST_USER_STATUS_ADMINISTRATOR_NAME SYSRES_CONST_USER_STATUS_DEVELOPER_CODE SYSRES_CONST_USER_STATUS_DEVELOPER_NAME SYSRES_CONST_USER_STATUS_DISABLED_CODE SYSRES_CONST_USER_STATUS_DISABLED_NAME SYSRES_CONST_USER_STATUS_SYSTEM_DEVELOPER_CODE SYSRES_CONST_USER_STATUS_USER_CODE SYSRES_CONST_USER_STATUS_USER_NAME SYSRES_CONST_USER_STATUS_USER_NAME_DEPRECATED SYSRES_CONST_USER_TYPE_FIELD_VALUE_USER SYSRES_CONST_USER_TYPE_REQUISITE_CODE SYSRES_CONST_USERS_CONTROLLER_REQUISITE_CODE SYSRES_CONST_USERS_IS_MAIN_SERVER_REQUISITE_CODE SYSRES_CONST_USERS_REFERENCE_CODE SYSRES_CONST_USERS_REGISTRATION_CERTIFICATES_ACTION_NAME SYSRES_CONST_USERS_REQUISITE_CODE SYSRES_CONST_USERS_SYSTEM_REQUISITE_CODE SYSRES_CONST_USERS_USER_ACCESS_RIGHTS_TYPR_REQUISITE_CODE SYSRES_CONST_USERS_USER_AUTHENTICATION_REQUISITE_CODE SYSRES_CONST_USERS_USER_COMPONENT_REQUISITE_CODE SYSRES_CONST_USERS_USER_GROUP_REQUISITE_CODE SYSRES_CONST_USERS_VIEW_CERTIFICATES_ACTION_NAME SYSRES_CONST_VIEW_DEFAULT_CODE SYSRES_CONST_VIEW_DEFAULT_NAME SYSRES_CONST_VIEWER_REQUISITE_CODE SYSRES_CONST_WAITING_BLOCK_DESCRIPTION SYSRES_CONST_WIZARD_FORM_LABEL_TEST_STRING SYSRES_CONST_WIZARD_QUERY_PARAM_HEIGHT_ETALON_STRING SYSRES_CONST_WIZARD_REFERENCE_COMMENT_REQUISITE_CODE SYSRES_CONST_WORK_RULES_DESCRIPTION_REQUISITE_CODE SYSRES_CONST_WORK_TIME_CALENDAR_REFERENCE_CODE SYSRES_CONST_WORK_WORKFLOW_HARD_ROUTE_TYPE_VALUE SYSRES_CONST_WORK_WORKFLOW_HARD_ROUTE_TYPE_VALUE_CODE SYSRES_CONST_WORK_WORKFLOW_HARD_ROUTE_TYPE_VALUE_CODE_RUS SYSRES_CONST_WORK_WORKFLOW_SOFT_ROUTE_TYPE_VALUE_CODE_RUS SYSRES_CONST_WORKFLOW_ROUTE_TYPR_HARD SYSRES_CONST_WORKFLOW_ROUTE_TYPR_SOFT SYSRES_CONST_XML_ENCODING SYSRES_CONST_XREC_STAT_REQUISITE_CODE SYSRES_CONST_XRECID_FIELD_NAME SYSRES_CONST_YES SYSRES_CONST_YES_NO_2_REQUISITE_CODE SYSRES_CONST_YES_NO_REQUISITE_CODE SYSRES_CONST_YES_NO_T_REF_TYPE_REQUISITE_CODE SYSRES_CONST_YES_PICK_VALUE SYSRES_CONST_YES_VALUE CR FALSE nil NO_VALUE NULL TAB TRUE YES_VALUE ADMINISTRATORS_GROUP_NAME CUSTOMIZERS_GROUP_NAME DEVELOPERS_GROUP_NAME SERVICE_USERS_GROUP_NAME DECISION_BLOCK_FIRST_OPERAND_PROPERTY DECISION_BLOCK_NAME_PROPERTY DECISION_BLOCK_OPERATION_PROPERTY DECISION_BLOCK_RESULT_TYPE_PROPERTY DECISION_BLOCK_SECOND_OPERAND_PROPERTY ANY_FILE_EXTENTION COMPRESSED_DOCUMENT_EXTENSION EXTENDED_DOCUMENT_EXTENSION SHORT_COMPRESSED_DOCUMENT_EXTENSION SHORT_EXTENDED_DOCUMENT_EXTENSION JOB_BLOCK_ABORT_DEADLINE_PROPERTY JOB_BLOCK_AFTER_FINISH_EVENT JOB_BLOCK_AFTER_QUERY_PARAMETERS_EVENT JOB_BLOCK_ATTACHMENT_PROPERTY JOB_BLOCK_ATTACHMENTS_RIGHTS_GROUP_PROPERTY JOB_BLOCK_ATTACHMENTS_RIGHTS_TYPE_PROPERTY JOB_BLOCK_BEFORE_QUERY_PARAMETERS_EVENT JOB_BLOCK_BEFORE_START_EVENT JOB_BLOCK_CREATED_JOBS_PROPERTY JOB_BLOCK_DEADLINE_PROPERTY JOB_BLOCK_EXECUTION_RESULTS_PROPERTY JOB_BLOCK_IS_PARALLEL_PROPERTY JOB_BLOCK_IS_RELATIVE_ABORT_DEADLINE_PROPERTY JOB_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY JOB_BLOCK_JOB_TEXT_PROPERTY JOB_BLOCK_NAME_PROPERTY JOB_BLOCK_NEED_SIGN_ON_PERFORM_PROPERTY JOB_BLOCK_PERFORMER_PROPERTY JOB_BLOCK_RELATIVE_ABORT_DEADLINE_TYPE_PROPERTY JOB_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY JOB_BLOCK_SUBJECT_PROPERTY ENGLISH_LANGUAGE_CODE RUSSIAN_LANGUAGE_CODE smHidden smMaximized smMinimized smNormal wmNo wmYes COMPONENT_TOKEN_LINK_KIND DOCUMENT_LINK_KIND EDOCUMENT_LINK_KIND FOLDER_LINK_KIND JOB_LINK_KIND REFERENCE_LINK_KIND TASK_LINK_KIND COMPONENT_TOKEN_LOCK_TYPE EDOCUMENT_VERSION_LOCK_TYPE MONITOR_BLOCK_AFTER_FINISH_EVENT MONITOR_BLOCK_BEFORE_START_EVENT MONITOR_BLOCK_DEADLINE_PROPERTY MONITOR_BLOCK_INTERVAL_PROPERTY MONITOR_BLOCK_INTERVAL_TYPE_PROPERTY MONITOR_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY MONITOR_BLOCK_NAME_PROPERTY MONITOR_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY MONITOR_BLOCK_SEARCH_SCRIPT_PROPERTY NOTICE_BLOCK_AFTER_FINISH_EVENT NOTICE_BLOCK_ATTACHMENT_PROPERTY NOTICE_BLOCK_ATTACHMENTS_RIGHTS_GROUP_PROPERTY NOTICE_BLOCK_ATTACHMENTS_RIGHTS_TYPE_PROPERTY NOTICE_BLOCK_BEFORE_START_EVENT NOTICE_BLOCK_CREATED_NOTICES_PROPERTY NOTICE_BLOCK_DEADLINE_PROPERTY NOTICE_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY NOTICE_BLOCK_NAME_PROPERTY NOTICE_BLOCK_NOTICE_TEXT_PROPERTY NOTICE_BLOCK_PERFORMER_PROPERTY NOTICE_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY NOTICE_BLOCK_SUBJECT_PROPERTY dseAfterCancel dseAfterClose dseAfterDelete dseAfterDeleteOutOfTransaction dseAfterInsert dseAfterOpen dseAfterScroll dseAfterUpdate dseAfterUpdateOutOfTransaction dseBeforeCancel dseBeforeClose dseBeforeDelete dseBeforeDetailUpdate dseBeforeInsert dseBeforeOpen dseBeforeUpdate dseOnAnyRequisiteChange dseOnCloseRecord dseOnDeleteError dseOnOpenRecord dseOnPrepareUpdate dseOnUpdateError dseOnUpdateRatifiedRecord dseOnValidDelete dseOnValidUpdate reOnChange reOnChangeValues SELECTION_BEGIN_ROUTE_EVENT SELECTION_END_ROUTE_EVENT CURRENT_PERIOD_IS_REQUIRED PREVIOUS_CARD_TYPE_NAME SHOW_RECORD_PROPERTIES_FORM ACCESS_RIGHTS_SETTING_DIALOG_CODE ADMINISTRATOR_USER_CODE ANALYTIC_REPORT_TYPE asrtHideLocal asrtHideRemote CALCULATED_ROLE_TYPE_CODE COMPONENTS_REFERENCE_DEVELOPER_VIEW_CODE DCTS_TEST_PROTOCOLS_FOLDER_PATH E_EDOC_VERSION_ALREADY_APPROVINGLY_SIGNED E_EDOC_VERSION_ALREADY_APPROVINGLY_SIGNED_BY_USER E_EDOC_VERSION_ALREDY_SIGNED E_EDOC_VERSION_ALREDY_SIGNED_BY_USER EDOC_TYPES_CODE_REQUISITE_FIELD_NAME EDOCUMENTS_ALIAS_NAME FILES_FOLDER_PATH FILTER_OPERANDS_DELIMITER FILTER_OPERATIONS_DELIMITER FORMCARD_NAME FORMLIST_NAME GET_EXTENDED_DOCUMENT_EXTENSION_CREATION_MODE GET_EXTENDED_DOCUMENT_EXTENSION_IMPORT_MODE INTEGRATED_REPORT_TYPE IS_BUILDER_APPLICATION_ROLE IS_BUILDER_APPLICATION_ROLE2 IS_BUILDER_USERS ISBSYSDEV LOG_FOLDER_PATH mbCancel mbNo mbNoToAll mbOK mbYes mbYesToAll MEMORY_DATASET_DESRIPTIONS_FILENAME mrNo mrNoToAll mrYes mrYesToAll MULTIPLE_SELECT_DIALOG_CODE NONOPERATING_RECORD_FLAG_FEMININE NONOPERATING_RECORD_FLAG_MASCULINE OPERATING_RECORD_FLAG_FEMININE OPERATING_RECORD_FLAG_MASCULINE PROFILING_SETTINGS_COMMON_SETTINGS_CODE_VALUE PROGRAM_INITIATED_LOOKUP_ACTION ratDelete ratEdit ratInsert REPORT_TYPE REQUIRED_PICK_VALUES_VARIABLE rmCard rmList SBRTE_PROGID_DEV SBRTE_PROGID_RELEASE STATIC_ROLE_TYPE_CODE SUPPRESS_EMPTY_TEMPLATE_CREATION SYSTEM_USER_CODE UPDATE_DIALOG_DATASET USED_IN_OBJECT_HINT_PARAM USER_INITIATED_LOOKUP_ACTION USER_NAME_FORMAT USER_SELECTION_RESTRICTIONS WORKFLOW_TEST_PROTOCOLS_FOLDER_PATH ELS_SUBTYPE_CONTROL_NAME ELS_FOLDER_KIND_CONTROL_NAME REPEAT_PROCESS_CURRENT_OBJECT_EXCEPTION_NAME PRIVILEGE_COMPONENT_FULL_ACCESS PRIVILEGE_DEVELOPMENT_EXPORT PRIVILEGE_DEVELOPMENT_IMPORT PRIVILEGE_DOCUMENT_DELETE PRIVILEGE_ESD PRIVILEGE_FOLDER_DELETE PRIVILEGE_MANAGE_ACCESS_RIGHTS PRIVILEGE_MANAGE_REPLICATION PRIVILEGE_MANAGE_SESSION_SERVER PRIVILEGE_OBJECT_FULL_ACCESS PRIVILEGE_OBJECT_VIEW PRIVILEGE_RESERVE_LICENSE PRIVILEGE_SYSTEM_CUSTOMIZE PRIVILEGE_SYSTEM_DEVELOP PRIVILEGE_SYSTEM_INSTALL PRIVILEGE_TASK_DELETE PRIVILEGE_USER_PLUGIN_SETTINGS_CUSTOMIZE PRIVILEGES_PSEUDOREFERENCE_CODE ACCESS_TYPES_PSEUDOREFERENCE_CODE ALL_AVAILABLE_COMPONENTS_PSEUDOREFERENCE_CODE ALL_AVAILABLE_PRIVILEGES_PSEUDOREFERENCE_CODE ALL_REPLICATE_COMPONENTS_PSEUDOREFERENCE_CODE AVAILABLE_DEVELOPERS_COMPONENTS_PSEUDOREFERENCE_CODE COMPONENTS_PSEUDOREFERENCE_CODE FILTRATER_SETTINGS_CONFLICTS_PSEUDOREFERENCE_CODE GROUPS_PSEUDOREFERENCE_CODE RECEIVE_PROTOCOL_PSEUDOREFERENCE_CODE REFERENCE_REQUISITE_PSEUDOREFERENCE_CODE REFERENCE_REQUISITES_PSEUDOREFERENCE_CODE REFTYPES_PSEUDOREFERENCE_CODE REPLICATION_SEANCES_DIARY_PSEUDOREFERENCE_CODE SEND_PROTOCOL_PSEUDOREFERENCE_CODE SUBSTITUTES_PSEUDOREFERENCE_CODE SYSTEM_SETTINGS_PSEUDOREFERENCE_CODE UNITS_PSEUDOREFERENCE_CODE USERS_PSEUDOREFERENCE_CODE VIEWERS_PSEUDOREFERENCE_CODE CERTIFICATE_TYPE_ENCRYPT CERTIFICATE_TYPE_SIGN CERTIFICATE_TYPE_SIGN_AND_ENCRYPT STORAGE_TYPE_FILE STORAGE_TYPE_NAS_CIFS STORAGE_TYPE_SAPERION STORAGE_TYPE_SQL_SERVER COMPTYPE2_REQUISITE_DOCUMENTS_VALUE COMPTYPE2_REQUISITE_TASKS_VALUE COMPTYPE2_REQUISITE_FOLDERS_VALUE COMPTYPE2_REQUISITE_REFERENCES_VALUE SYSREQ_CODE SYSREQ_COMPTYPE2 SYSREQ_CONST_AVAILABLE_FOR_WEB SYSREQ_CONST_COMMON_CODE SYSREQ_CONST_COMMON_VALUE SYSREQ_CONST_FIRM_CODE SYSREQ_CONST_FIRM_STATUS SYSREQ_CONST_FIRM_VALUE SYSREQ_CONST_SERVER_STATUS SYSREQ_CONTENTS SYSREQ_DATE_OPEN SYSREQ_DATE_CLOSE SYSREQ_DESCRIPTION SYSREQ_DESCRIPTION_LOCALIZE_ID SYSREQ_DOUBLE SYSREQ_EDOC_ACCESS_TYPE SYSREQ_EDOC_AUTHOR SYSREQ_EDOC_CREATED SYSREQ_EDOC_DELEGATE_RIGHTS_REQUISITE_CODE SYSREQ_EDOC_EDITOR SYSREQ_EDOC_ENCODE_TYPE SYSREQ_EDOC_ENCRYPTION_PLUGIN_NAME SYSREQ_EDOC_ENCRYPTION_PLUGIN_VERSION SYSREQ_EDOC_EXPORT_DATE SYSREQ_EDOC_EXPORTER SYSREQ_EDOC_KIND SYSREQ_EDOC_LIFE_STAGE_NAME SYSREQ_EDOC_LOCKED_FOR_SERVER_CODE SYSREQ_EDOC_MODIFIED SYSREQ_EDOC_NAME SYSREQ_EDOC_NOTE SYSREQ_EDOC_QUALIFIED_ID SYSREQ_EDOC_SESSION_KEY SYSREQ_EDOC_SESSION_KEY_ENCRYPTION_PLUGIN_NAME SYSREQ_EDOC_SESSION_KEY_ENCRYPTION_PLUGIN_VERSION SYSREQ_EDOC_SIGNATURE_TYPE SYSREQ_EDOC_SIGNED SYSREQ_EDOC_STORAGE SYSREQ_EDOC_STORAGES_ARCHIVE_STORAGE SYSREQ_EDOC_STORAGES_CHECK_RIGHTS SYSREQ_EDOC_STORAGES_COMPUTER_NAME SYSREQ_EDOC_STORAGES_EDIT_IN_STORAGE SYSREQ_EDOC_STORAGES_EXECUTIVE_STORAGE SYSREQ_EDOC_STORAGES_FUNCTION SYSREQ_EDOC_STORAGES_INITIALIZED SYSREQ_EDOC_STORAGES_LOCAL_PATH SYSREQ_EDOC_STORAGES_SAPERION_DATABASE_NAME SYSREQ_EDOC_STORAGES_SEARCH_BY_TEXT SYSREQ_EDOC_STORAGES_SERVER_NAME SYSREQ_EDOC_STORAGES_SHARED_SOURCE_NAME SYSREQ_EDOC_STORAGES_TYPE SYSREQ_EDOC_TEXT_MODIFIED SYSREQ_EDOC_TYPE_ACT_CODE SYSREQ_EDOC_TYPE_ACT_DESCRIPTION SYSREQ_EDOC_TYPE_ACT_DESCRIPTION_LOCALIZE_ID SYSREQ_EDOC_TYPE_ACT_ON_EXECUTE SYSREQ_EDOC_TYPE_ACT_ON_EXECUTE_EXISTS SYSREQ_EDOC_TYPE_ACT_SECTION SYSREQ_EDOC_TYPE_ADD_PARAMS SYSREQ_EDOC_TYPE_COMMENT SYSREQ_EDOC_TYPE_EVENT_TEXT SYSREQ_EDOC_TYPE_NAME_IN_SINGULAR SYSREQ_EDOC_TYPE_NAME_IN_SINGULAR_LOCALIZE_ID SYSREQ_EDOC_TYPE_NAME_LOCALIZE_ID SYSREQ_EDOC_TYPE_NUMERATION_METHOD SYSREQ_EDOC_TYPE_PSEUDO_REQUISITE_CODE SYSREQ_EDOC_TYPE_REQ_CODE SYSREQ_EDOC_TYPE_REQ_DESCRIPTION SYSREQ_EDOC_TYPE_REQ_DESCRIPTION_LOCALIZE_ID SYSREQ_EDOC_TYPE_REQ_IS_LEADING SYSREQ_EDOC_TYPE_REQ_IS_REQUIRED SYSREQ_EDOC_TYPE_REQ_NUMBER SYSREQ_EDOC_TYPE_REQ_ON_CHANGE SYSREQ_EDOC_TYPE_REQ_ON_CHANGE_EXISTS SYSREQ_EDOC_TYPE_REQ_ON_SELECT SYSREQ_EDOC_TYPE_REQ_ON_SELECT_KIND SYSREQ_EDOC_TYPE_REQ_SECTION SYSREQ_EDOC_TYPE_VIEW_CARD SYSREQ_EDOC_TYPE_VIEW_CODE SYSREQ_EDOC_TYPE_VIEW_COMMENT SYSREQ_EDOC_TYPE_VIEW_IS_MAIN SYSREQ_EDOC_TYPE_VIEW_NAME SYSREQ_EDOC_TYPE_VIEW_NAME_LOCALIZE_ID SYSREQ_EDOC_VERSION_AUTHOR SYSREQ_EDOC_VERSION_CRC SYSREQ_EDOC_VERSION_DATA SYSREQ_EDOC_VERSION_EDITOR SYSREQ_EDOC_VERSION_EXPORT_DATE SYSREQ_EDOC_VERSION_EXPORTER SYSREQ_EDOC_VERSION_HIDDEN SYSREQ_EDOC_VERSION_LIFE_STAGE SYSREQ_EDOC_VERSION_MODIFIED SYSREQ_EDOC_VERSION_NOTE SYSREQ_EDOC_VERSION_SIGNATURE_TYPE SYSREQ_EDOC_VERSION_SIGNED SYSREQ_EDOC_VERSION_SIZE SYSREQ_EDOC_VERSION_SOURCE SYSREQ_EDOC_VERSION_TEXT_MODIFIED SYSREQ_EDOCKIND_DEFAULT_VERSION_STATE_CODE SYSREQ_FOLDER_KIND SYSREQ_FUNC_CATEGORY SYSREQ_FUNC_COMMENT SYSREQ_FUNC_GROUP SYSREQ_FUNC_GROUP_COMMENT SYSREQ_FUNC_GROUP_NUMBER SYSREQ_FUNC_HELP SYSREQ_FUNC_PARAM_DEF_VALUE SYSREQ_FUNC_PARAM_IDENT SYSREQ_FUNC_PARAM_NUMBER SYSREQ_FUNC_PARAM_TYPE SYSREQ_FUNC_TEXT SYSREQ_GROUP_CATEGORY SYSREQ_ID SYSREQ_LAST_UPDATE SYSREQ_LEADER_REFERENCE SYSREQ_LINE_NUMBER SYSREQ_MAIN_RECORD_ID SYSREQ_NAME SYSREQ_NAME_LOCALIZE_ID SYSREQ_NOTE SYSREQ_ORIGINAL_RECORD SYSREQ_OUR_FIRM SYSREQ_PROFILING_SETTINGS_BATCH_LOGING SYSREQ_PROFILING_SETTINGS_BATCH_SIZE SYSREQ_PROFILING_SETTINGS_PROFILING_ENABLED SYSREQ_PROFILING_SETTINGS_SQL_PROFILING_ENABLED SYSREQ_PROFILING_SETTINGS_START_LOGGED SYSREQ_RECORD_STATUS SYSREQ_REF_REQ_FIELD_NAME SYSREQ_REF_REQ_FORMAT SYSREQ_REF_REQ_GENERATED SYSREQ_REF_REQ_LENGTH SYSREQ_REF_REQ_PRECISION SYSREQ_REF_REQ_REFERENCE SYSREQ_REF_REQ_SECTION SYSREQ_REF_REQ_STORED SYSREQ_REF_REQ_TOKENS SYSREQ_REF_REQ_TYPE SYSREQ_REF_REQ_VIEW SYSREQ_REF_TYPE_ACT_CODE SYSREQ_REF_TYPE_ACT_DESCRIPTION SYSREQ_REF_TYPE_ACT_DESCRIPTION_LOCALIZE_ID SYSREQ_REF_TYPE_ACT_ON_EXECUTE SYSREQ_REF_TYPE_ACT_ON_EXECUTE_EXISTS SYSREQ_REF_TYPE_ACT_SECTION SYSREQ_REF_TYPE_ADD_PARAMS SYSREQ_REF_TYPE_COMMENT SYSREQ_REF_TYPE_COMMON_SETTINGS SYSREQ_REF_TYPE_DISPLAY_REQUISITE_NAME SYSREQ_REF_TYPE_EVENT_TEXT SYSREQ_REF_TYPE_MAIN_LEADING_REF SYSREQ_REF_TYPE_NAME_IN_SINGULAR SYSREQ_REF_TYPE_NAME_IN_SINGULAR_LOCALIZE_ID SYSREQ_REF_TYPE_NAME_LOCALIZE_ID SYSREQ_REF_TYPE_NUMERATION_METHOD SYSREQ_REF_TYPE_REQ_CODE SYSREQ_REF_TYPE_REQ_DESCRIPTION SYSREQ_REF_TYPE_REQ_DESCRIPTION_LOCALIZE_ID SYSREQ_REF_TYPE_REQ_IS_CONTROL SYSREQ_REF_TYPE_REQ_IS_FILTER SYSREQ_REF_TYPE_REQ_IS_LEADING SYSREQ_REF_TYPE_REQ_IS_REQUIRED SYSREQ_REF_TYPE_REQ_NUMBER SYSREQ_REF_TYPE_REQ_ON_CHANGE SYSREQ_REF_TYPE_REQ_ON_CHANGE_EXISTS SYSREQ_REF_TYPE_REQ_ON_SELECT SYSREQ_REF_TYPE_REQ_ON_SELECT_KIND SYSREQ_REF_TYPE_REQ_SECTION SYSREQ_REF_TYPE_VIEW_CARD SYSREQ_REF_TYPE_VIEW_CODE SYSREQ_REF_TYPE_VIEW_COMMENT SYSREQ_REF_TYPE_VIEW_IS_MAIN SYSREQ_REF_TYPE_VIEW_NAME SYSREQ_REF_TYPE_VIEW_NAME_LOCALIZE_ID SYSREQ_REFERENCE_TYPE_ID SYSREQ_STATE SYSREQ_STATЕ SYSREQ_SYSTEM_SETTINGS_VALUE SYSREQ_TYPE SYSREQ_UNIT SYSREQ_UNIT_ID SYSREQ_USER_GROUPS_GROUP_FULL_NAME SYSREQ_USER_GROUPS_GROUP_NAME SYSREQ_USER_GROUPS_GROUP_SERVER_NAME SYSREQ_USERS_ACCESS_RIGHTS SYSREQ_USERS_AUTHENTICATION SYSREQ_USERS_CATEGORY SYSREQ_USERS_COMPONENT SYSREQ_USERS_COMPONENT_USER_IS_PUBLIC SYSREQ_USERS_DOMAIN SYSREQ_USERS_FULL_USER_NAME SYSREQ_USERS_GROUP SYSREQ_USERS_IS_MAIN_SERVER SYSREQ_USERS_LOGIN SYSREQ_USERS_REFERENCE_USER_IS_PUBLIC SYSREQ_USERS_STATUS SYSREQ_USERS_USER_CERTIFICATE SYSREQ_USERS_USER_CERTIFICATE_INFO SYSREQ_USERS_USER_CERTIFICATE_PLUGIN_NAME SYSREQ_USERS_USER_CERTIFICATE_PLUGIN_VERSION SYSREQ_USERS_USER_CERTIFICATE_STATE SYSREQ_USERS_USER_CERTIFICATE_SUBJECT_NAME SYSREQ_USERS_USER_CERTIFICATE_THUMBPRINT SYSREQ_USERS_USER_DEFAULT_CERTIFICATE SYSREQ_USERS_USER_DESCRIPTION SYSREQ_USERS_USER_GLOBAL_NAME SYSREQ_USERS_USER_LOGIN SYSREQ_USERS_USER_MAIN_SERVER SYSREQ_USERS_USER_TYPE SYSREQ_WORK_RULES_FOLDER_ID RESULT_VAR_NAME RESULT_VAR_NAME_ENG AUTO_NUMERATION_RULE_ID CANT_CHANGE_ID_REQUISITE_RULE_ID CANT_CHANGE_OURFIRM_REQUISITE_RULE_ID CHECK_CHANGING_REFERENCE_RECORD_USE_RULE_ID CHECK_CODE_REQUISITE_RULE_ID CHECK_DELETING_REFERENCE_RECORD_USE_RULE_ID CHECK_FILTRATER_CHANGES_RULE_ID CHECK_RECORD_INTERVAL_RULE_ID CHECK_REFERENCE_INTERVAL_RULE_ID CHECK_REQUIRED_DATA_FULLNESS_RULE_ID CHECK_REQUIRED_REQUISITES_FULLNESS_RULE_ID MAKE_RECORD_UNRATIFIED_RULE_ID RESTORE_AUTO_NUMERATION_RULE_ID SET_FIRM_CONTEXT_FROM_RECORD_RULE_ID SET_FIRST_RECORD_IN_LIST_FORM_RULE_ID SET_IDSPS_VALUE_RULE_ID SET_NEXT_CODE_VALUE_RULE_ID SET_OURFIRM_BOUNDS_RULE_ID SET_OURFIRM_REQUISITE_RULE_ID SCRIPT_BLOCK_AFTER_FINISH_EVENT SCRIPT_BLOCK_BEFORE_START_EVENT SCRIPT_BLOCK_EXECUTION_RESULTS_PROPERTY SCRIPT_BLOCK_NAME_PROPERTY SCRIPT_BLOCK_SCRIPT_PROPERTY SUBTASK_BLOCK_ABORT_DEADLINE_PROPERTY SUBTASK_BLOCK_AFTER_FINISH_EVENT SUBTASK_BLOCK_ASSIGN_PARAMS_EVENT SUBTASK_BLOCK_ATTACHMENTS_PROPERTY SUBTASK_BLOCK_ATTACHMENTS_RIGHTS_GROUP_PROPERTY SUBTASK_BLOCK_ATTACHMENTS_RIGHTS_TYPE_PROPERTY SUBTASK_BLOCK_BEFORE_START_EVENT SUBTASK_BLOCK_CREATED_TASK_PROPERTY SUBTASK_BLOCK_CREATION_EVENT SUBTASK_BLOCK_DEADLINE_PROPERTY SUBTASK_BLOCK_IMPORTANCE_PROPERTY SUBTASK_BLOCK_INITIATOR_PROPERTY SUBTASK_BLOCK_IS_RELATIVE_ABORT_DEADLINE_PROPERTY SUBTASK_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY SUBTASK_BLOCK_JOBS_TYPE_PROPERTY SUBTASK_BLOCK_NAME_PROPERTY SUBTASK_BLOCK_PARALLEL_ROUTE_PROPERTY SUBTASK_BLOCK_PERFORMERS_PROPERTY SUBTASK_BLOCK_RELATIVE_ABORT_DEADLINE_TYPE_PROPERTY SUBTASK_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY SUBTASK_BLOCK_REQUIRE_SIGN_PROPERTY SUBTASK_BLOCK_STANDARD_ROUTE_PROPERTY SUBTASK_BLOCK_START_EVENT SUBTASK_BLOCK_STEP_CONTROL_PROPERTY SUBTASK_BLOCK_SUBJECT_PROPERTY SUBTASK_BLOCK_TASK_CONTROL_PROPERTY SUBTASK_BLOCK_TEXT_PROPERTY SUBTASK_BLOCK_UNLOCK_ATTACHMENTS_ON_STOP_PROPERTY SUBTASK_BLOCK_USE_STANDARD_ROUTE_PROPERTY SUBTASK_BLOCK_WAIT_FOR_TASK_COMPLETE_PROPERTY SYSCOMP_CONTROL_JOBS SYSCOMP_FOLDERS SYSCOMP_JOBS SYSCOMP_NOTICES SYSCOMP_TASKS SYSDLG_CREATE_EDOCUMENT SYSDLG_CREATE_EDOCUMENT_VERSION SYSDLG_CURRENT_PERIOD SYSDLG_EDIT_FUNCTION_HELP SYSDLG_EDOCUMENT_KINDS_FOR_TEMPLATE SYSDLG_EXPORT_MULTIPLE_EDOCUMENTS SYSDLG_EXPORT_SINGLE_EDOCUMENT SYSDLG_IMPORT_EDOCUMENT SYSDLG_MULTIPLE_SELECT SYSDLG_SETUP_ACCESS_RIGHTS SYSDLG_SETUP_DEFAULT_RIGHTS SYSDLG_SETUP_FILTER_CONDITION SYSDLG_SETUP_SIGN_RIGHTS SYSDLG_SETUP_TASK_OBSERVERS SYSDLG_SETUP_TASK_ROUTE SYSDLG_SETUP_USERS_LIST SYSDLG_SIGN_EDOCUMENT SYSDLG_SIGN_MULTIPLE_EDOCUMENTS SYSREF_ACCESS_RIGHTS_TYPES SYSREF_ADMINISTRATION_HISTORY SYSREF_ALL_AVAILABLE_COMPONENTS SYSREF_ALL_AVAILABLE_PRIVILEGES SYSREF_ALL_REPLICATING_COMPONENTS SYSREF_AVAILABLE_DEVELOPERS_COMPONENTS SYSREF_CALENDAR_EVENTS SYSREF_COMPONENT_TOKEN_HISTORY SYSREF_COMPONENT_TOKENS SYSREF_COMPONENTS SYSREF_CONSTANTS SYSREF_DATA_RECEIVE_PROTOCOL SYSREF_DATA_SEND_PROTOCOL SYSREF_DIALOGS SYSREF_DIALOGS_REQUISITES SYSREF_EDITORS SYSREF_EDOC_CARDS SYSREF_EDOC_TYPES SYSREF_EDOCUMENT_CARD_REQUISITES SYSREF_EDOCUMENT_CARD_TYPES SYSREF_EDOCUMENT_CARD_TYPES_REFERENCE SYSREF_EDOCUMENT_CARDS SYSREF_EDOCUMENT_HISTORY SYSREF_EDOCUMENT_KINDS SYSREF_EDOCUMENT_REQUISITES SYSREF_EDOCUMENT_SIGNATURES SYSREF_EDOCUMENT_TEMPLATES SYSREF_EDOCUMENT_TEXT_STORAGES SYSREF_EDOCUMENT_VIEWS SYSREF_FILTERER_SETUP_CONFLICTS SYSREF_FILTRATER_SETTING_CONFLICTS SYSREF_FOLDER_HISTORY SYSREF_FOLDERS SYSREF_FUNCTION_GROUPS SYSREF_FUNCTION_PARAMS SYSREF_FUNCTIONS SYSREF_JOB_HISTORY SYSREF_LINKS SYSREF_LOCALIZATION_DICTIONARY SYSREF_LOCALIZATION_LANGUAGES SYSREF_MODULES SYSREF_PRIVILEGES SYSREF_RECORD_HISTORY SYSREF_REFERENCE_REQUISITES SYSREF_REFERENCE_TYPE_VIEWS SYSREF_REFERENCE_TYPES SYSREF_REFERENCES SYSREF_REFERENCES_REQUISITES SYSREF_REMOTE_SERVERS SYSREF_REPLICATION_SESSIONS_LOG SYSREF_REPLICATION_SESSIONS_PROTOCOL SYSREF_REPORTS SYSREF_ROLES SYSREF_ROUTE_BLOCK_GROUPS SYSREF_ROUTE_BLOCKS SYSREF_SCRIPTS SYSREF_SEARCHES SYSREF_SERVER_EVENTS SYSREF_SERVER_EVENTS_HISTORY SYSREF_STANDARD_ROUTE_GROUPS SYSREF_STANDARD_ROUTES SYSREF_STATUSES SYSREF_SYSTEM_SETTINGS SYSREF_TASK_HISTORY SYSREF_TASK_KIND_GROUPS SYSREF_TASK_KINDS SYSREF_TASK_RIGHTS SYSREF_TASK_SIGNATURES SYSREF_TASKS SYSREF_UNITS SYSREF_USER_GROUPS SYSREF_USER_GROUPS_REFERENCE SYSREF_USER_SUBSTITUTION SYSREF_USERS SYSREF_USERS_REFERENCE SYSREF_VIEWERS SYSREF_WORKING_TIME_CALENDARS ACCESS_RIGHTS_TABLE_NAME EDMS_ACCESS_TABLE_NAME EDOC_TYPES_TABLE_NAME TEST_DEV_DB_NAME TEST_DEV_SYSTEM_CODE TEST_EDMS_DB_NAME TEST_EDMS_MAIN_CODE TEST_EDMS_MAIN_DB_NAME TEST_EDMS_SECOND_CODE TEST_EDMS_SECOND_DB_NAME TEST_EDMS_SYSTEM_CODE TEST_ISB5_MAIN_CODE TEST_ISB5_SECOND_CODE TEST_SQL_SERVER_2005_NAME TEST_SQL_SERVER_NAME ATTENTION_CAPTION cbsCommandLinks cbsDefault CONFIRMATION_CAPTION ERROR_CAPTION INFORMATION_CAPTION mrCancel mrOk EDOC_VERSION_ACTIVE_STAGE_CODE EDOC_VERSION_DESIGN_STAGE_CODE EDOC_VERSION_OBSOLETE_STAGE_CODE cpDataEnciphermentEnabled cpDigitalSignatureEnabled cpID cpIssuer cpPluginVersion cpSerial cpSubjectName cpSubjSimpleName cpValidFromDate cpValidToDate ISBL_SYNTAX NO_SYNTAX XML_SYNTAX WAIT_BLOCK_AFTER_FINISH_EVENT WAIT_BLOCK_BEFORE_START_EVENT WAIT_BLOCK_DEADLINE_PROPERTY WAIT_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY WAIT_BLOCK_NAME_PROPERTY WAIT_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY SYSRES_COMMON SYSRES_CONST SYSRES_MBFUNC SYSRES_SBDATA SYSRES_SBGUI SYSRES_SBINTF SYSRES_SBREFDSC SYSRES_SQLERRORS SYSRES_SYSCOMP atUser atGroup atRole aemEnabledAlways aemDisabledAlways aemEnabledOnBrowse aemEnabledOnEdit aemDisabledOnBrowseEmpty apBegin apEnd alLeft alRight asmNever asmNoButCustomize asmAsLastTime asmYesButCustomize asmAlways cirCommon cirRevoked ctSignature ctEncode ctSignatureEncode clbUnchecked clbChecked clbGrayed ceISB ceAlways ceNever ctDocument ctReference ctScript ctUnknown ctReport ctDialog ctFunction ctFolder ctEDocument ctTask ctJob ctNotice ctControlJob cfInternal cfDisplay ciUnspecified ciWrite ciRead ckFolder ckEDocument ckTask ckJob ckComponentToken ckAny ckReference ckScript ckReport ckDialog ctISBLEditor ctBevel ctButton ctCheckListBox ctComboBox ctComboEdit ctGrid ctDBCheckBox ctDBComboBox ctDBEdit ctDBEllipsis ctDBMemo ctDBNavigator ctDBRadioGroup ctDBStatusLabel ctEdit ctGroupBox ctInplaceHint ctMemo ctPanel ctListBox ctRadioButton ctRichEdit ctTabSheet ctWebBrowser ctImage ctHyperLink ctLabel ctDBMultiEllipsis ctRibbon ctRichView ctInnerPanel ctPanelGroup ctBitButton cctDate cctInteger cctNumeric cctPick cctReference cctString cctText cltInternal cltPrimary cltGUI dseBeforeOpen dseAfterOpen dseBeforeClose dseAfterClose dseOnValidDelete dseBeforeDelete dseAfterDelete dseAfterDeleteOutOfTransaction dseOnDeleteError dseBeforeInsert dseAfterInsert dseOnValidUpdate dseBeforeUpdate dseOnUpdateRatifiedRecord dseAfterUpdate dseAfterUpdateOutOfTransaction dseOnUpdateError dseAfterScroll dseOnOpenRecord dseOnCloseRecord dseBeforeCancel dseAfterCancel dseOnUpdateDeadlockError dseBeforeDetailUpdate dseOnPrepareUpdate dseOnAnyRequisiteChange dssEdit dssInsert dssBrowse dssInActive dftDate dftShortDate dftDateTime dftTimeStamp dotDays dotHours dotMinutes dotSeconds dtkndLocal dtkndUTC arNone arView arEdit arFull ddaView ddaEdit emLock emEdit emSign emExportWithLock emImportWithUnlock emChangeVersionNote emOpenForModify emChangeLifeStage emDelete emCreateVersion emImport emUnlockExportedWithLock emStart emAbort emReInit emMarkAsReaded emMarkAsUnreaded emPerform emAccept emResume emChangeRights emEditRoute emEditObserver emRecoveryFromLocalCopy emChangeWorkAccessType emChangeEncodeTypeToCertificate emChangeEncodeTypeToPassword emChangeEncodeTypeToNone emChangeEncodeTypeToCertificatePassword emChangeStandardRoute emGetText emOpenForView emMoveToStorage emCreateObject emChangeVersionHidden emDeleteVersion emChangeLifeCycleStage emApprovingSign emExport emContinue emLockFromEdit emUnLockForEdit emLockForServer emUnlockFromServer emDelegateAccessRights emReEncode ecotFile ecotProcess eaGet eaCopy eaCreate eaCreateStandardRoute edltAll edltNothing edltQuery essmText essmCard esvtLast esvtLastActive esvtSpecified edsfExecutive edsfArchive edstSQLServer edstFile edvstNone edvstEDocumentVersionCopy edvstFile edvstTemplate edvstScannedFile vsDefault vsDesign vsActive vsObsolete etNone etCertificate etPassword etCertificatePassword ecException ecWarning ecInformation estAll estApprovingOnly evtLast evtLastActive evtQuery fdtString fdtNumeric fdtInteger fdtDate fdtText fdtUnknown fdtWideString fdtLargeInteger ftInbox ftOutbox ftFavorites ftCommonFolder ftUserFolder ftComponents ftQuickLaunch ftShortcuts ftSearch grhAuto grhX1 grhX2 grhX3 hltText hltRTF hltHTML iffBMP iffJPEG iffMultiPageTIFF iffSinglePageTIFF iffTIFF iffPNG im8bGrayscale im24bRGB im1bMonochrome itBMP itJPEG itWMF itPNG ikhInformation ikhWarning ikhError ikhNoIcon icUnknown icScript icFunction icIntegratedReport icAnalyticReport icDataSetEventHandler icActionHandler icFormEventHandler icLookUpEventHandler icRequisiteChangeEventHandler icBeforeSearchEventHandler icRoleCalculation icSelectRouteEventHandler icBlockPropertyCalculation icBlockQueryParamsEventHandler icChangeSearchResultEventHandler icBlockEventHandler icSubTaskInitEventHandler icEDocDataSetEventHandler icEDocLookUpEventHandler icEDocActionHandler icEDocFormEventHandler icEDocRequisiteChangeEventHandler icStructuredConversionRule icStructuredConversionEventBefore icStructuredConversionEventAfter icWizardEventHandler icWizardFinishEventHandler icWizardStepEventHandler icWizardStepFinishEventHandler icWizardActionEnableEventHandler icWizardActionExecuteEventHandler icCreateJobsHandler icCreateNoticesHandler icBeforeLookUpEventHandler icAfterLookUpEventHandler icTaskAbortEventHandler icWorkflowBlockActionHandler icDialogDataSetEventHandler icDialogActionHandler icDialogLookUpEventHandler icDialogRequisiteChangeEventHandler icDialogFormEventHandler icDialogValidCloseEventHandler icBlockFormEventHandler icTaskFormEventHandler icReferenceMethod icEDocMethod icDialogMethod icProcessMessageHandler isShow isHide isByUserSettings jkJob jkNotice jkControlJob jtInner jtLeft jtRight jtFull jtCross lbpAbove lbpBelow lbpLeft lbpRight eltPerConnection eltPerUser sfcUndefined sfcBlack sfcGreen sfcRed sfcBlue sfcOrange sfcLilac sfsItalic sfsStrikeout sfsNormal ldctStandardRoute ldctWizard ldctScript ldctFunction ldctRouteBlock ldctIntegratedReport ldctAnalyticReport ldctReferenceType ldctEDocumentType ldctDialog ldctServerEvents mrcrtNone mrcrtUser mrcrtMaximal mrcrtCustom vtEqual vtGreaterOrEqual vtLessOrEqual vtRange rdYesterday rdToday rdTomorrow rdThisWeek rdThisMonth rdThisYear rdNextMonth rdNextWeek rdLastWeek rdLastMonth rdWindow rdFile rdPrinter rdtString rdtNumeric rdtInteger rdtDate rdtReference rdtAccount rdtText rdtPick rdtUnknown rdtLargeInteger rdtDocument reOnChange reOnChangeValues ttGlobal ttLocal ttUser ttSystem ssmBrowse ssmSelect ssmMultiSelect ssmBrowseModal smSelect smLike smCard stNone stAuthenticating stApproving sctString sctStream sstAnsiSort sstNaturalSort svtEqual svtContain soatString soatNumeric soatInteger soatDatetime soatReferenceRecord soatText soatPick soatBoolean soatEDocument soatAccount soatIntegerCollection soatNumericCollection soatStringCollection soatPickCollection soatDatetimeCollection soatBooleanCollection soatReferenceRecordCollection soatEDocumentCollection soatAccountCollection soatContents soatUnknown tarAbortByUser tarAbortByWorkflowException tvtAllWords tvtExactPhrase tvtAnyWord usNone usCompleted usRedSquare usBlueSquare usYellowSquare usGreenSquare usOrangeSquare usPurpleSquare usFollowUp utUnknown utUser utDeveloper utAdministrator utSystemDeveloper utDisconnected btAnd btDetailAnd btOr btNotOr btOnly vmView vmSelect vmNavigation vsmSingle vsmMultiple vsmMultipleCheck vsmNoSelection wfatPrevious wfatNext wfatCancel wfatFinish wfepUndefined wfepText3 wfepText6 wfepText9 wfepSpinEdit wfepDropDown wfepRadioGroup wfepFlag wfepText12 wfepText15 wfepText18 wfepText21 wfepText24 wfepText27 wfepText30 wfepRadioGroupColumn1 wfepRadioGroupColumn2 wfepRadioGroupColumn3 wfetQueryParameter wfetText wfetDelimiter wfetLabel wptString wptInteger wptNumeric wptBoolean wptDateTime wptPick wptText wptUser wptUserList wptEDocumentInfo wptEDocumentInfoList wptReferenceRecordInfo wptReferenceRecordInfoList wptFolderInfo wptTaskInfo wptContents wptFileName wptDate wsrComplete wsrGoNext wsrGoPrevious wsrCustom wsrCancel wsrGoFinal wstForm wstEDocument wstTaskCard wstReferenceRecordCard wstFinal waAll waPerformers waManual wsbStart wsbFinish wsbNotice wsbStep wsbDecision wsbWait wsbMonitor wsbScript wsbConnector wsbSubTask wsbLifeCycleStage wsbPause wdtInteger wdtFloat wdtString wdtPick wdtDateTime wdtBoolean wdtTask wdtJob wdtFolder wdtEDocument wdtReferenceRecord wdtUser wdtGroup wdtRole wdtIntegerCollection wdtFloatCollection wdtStringCollection wdtPickCollection wdtDateTimeCollection wdtBooleanCollection wdtTaskCollection wdtJobCollection wdtFolderCollection wdtEDocumentCollection wdtReferenceRecordCollection wdtUserCollection wdtGroupCollection wdtRoleCollection wdtContents wdtUserList wdtSearchDescription wdtDeadLine wdtPickSet wdtAccountCollection wiLow wiNormal wiHigh wrtSoft wrtHard wsInit wsRunning wsDone wsControlled wsAborted wsContinued wtmFull wtmFromCurrent wtmOnlyCurrent ",class:"AltState Application CallType ComponentTokens CreatedJobs CreatedNotices ControlState DialogResult Dialogs EDocuments EDocumentVersionSource Folders GlobalIDs Job Jobs InputValue LookUpReference LookUpRequisiteNames LookUpSearch Object ParentComponent Processes References Requisite ReportName Reports Result Scripts Searches SelectedAttachments SelectedItems SelectMode Sender ServerEvents ServiceFactory ShiftState SubTask SystemDialogs Tasks Wizard Wizards Work ВызовСпособ ИмяОтчета РеквЗнач ",literal:"null true false nil "},s={begin:"\\.\\s*"+e.UNDERSCORE_IDENT_RE,keywords:a,relevance:0},l={className:"type",begin:":[ \\t]*("+"IApplication IAccessRights IAccountRepository IAccountSelectionRestrictions IAction IActionList IAdministrationHistoryDescription IAnchors IApplication IArchiveInfo IAttachment IAttachmentList ICheckListBox ICheckPointedList IColumn IComponent IComponentDescription IComponentToken IComponentTokenFactory IComponentTokenInfo ICompRecordInfo IConnection IContents IControl IControlJob IControlJobInfo IControlList ICrypto ICrypto2 ICustomJob ICustomJobInfo ICustomListBox ICustomObjectWizardStep ICustomWork ICustomWorkInfo IDataSet IDataSetAccessInfo IDataSigner IDateCriterion IDateRequisite IDateRequisiteDescription IDateValue IDeaAccessRights IDeaObjectInfo IDevelopmentComponentLock IDialog IDialogFactory IDialogPickRequisiteItems IDialogsFactory IDICSFactory IDocRequisite IDocumentInfo IDualListDialog IECertificate IECertificateInfo IECertificates IEditControl IEditorForm IEdmsExplorer IEdmsObject IEdmsObjectDescription IEdmsObjectFactory IEdmsObjectInfo IEDocument IEDocumentAccessRights IEDocumentDescription IEDocumentEditor IEDocumentFactory IEDocumentInfo IEDocumentStorage IEDocumentVersion IEDocumentVersionListDialog IEDocumentVersionSource IEDocumentWizardStep IEDocVerSignature IEDocVersionState IEnabledMode IEncodeProvider IEncrypter IEvent IEventList IException IExternalEvents IExternalHandler IFactory IField IFileDialog IFolder IFolderDescription IFolderDialog IFolderFactory IFolderInfo IForEach IForm IFormTitle IFormWizardStep IGlobalIDFactory IGlobalIDInfo IGrid IHasher IHistoryDescription IHyperLinkControl IImageButton IImageControl IInnerPanel IInplaceHint IIntegerCriterion IIntegerList IIntegerRequisite IIntegerValue IISBLEditorForm IJob IJobDescription IJobFactory IJobForm IJobInfo ILabelControl ILargeIntegerCriterion ILargeIntegerRequisite ILargeIntegerValue ILicenseInfo ILifeCycleStage IList IListBox ILocalIDInfo ILocalization ILock IMemoryDataSet IMessagingFactory IMetadataRepository INotice INoticeInfo INumericCriterion INumericRequisite INumericValue IObject IObjectDescription IObjectImporter IObjectInfo IObserver IPanelGroup IPickCriterion IPickProperty IPickRequisite IPickRequisiteDescription IPickRequisiteItem IPickRequisiteItems IPickValue IPrivilege IPrivilegeList IProcess IProcessFactory IProcessMessage IProgress IProperty IPropertyChangeEvent IQuery IReference IReferenceCriterion IReferenceEnabledMode IReferenceFactory IReferenceHistoryDescription IReferenceInfo IReferenceRecordCardWizardStep IReferenceRequisiteDescription IReferencesFactory IReferenceValue IRefRequisite IReport IReportFactory IRequisite IRequisiteDescription IRequisiteDescriptionList IRequisiteFactory IRichEdit IRouteStep IRule IRuleList ISchemeBlock IScript IScriptFactory ISearchCriteria ISearchCriterion ISearchDescription ISearchFactory ISearchFolderInfo ISearchForObjectDescription ISearchResultRestrictions ISecuredContext ISelectDialog IServerEvent IServerEventFactory IServiceDialog IServiceFactory ISignature ISignProvider ISignProvider2 ISignProvider3 ISimpleCriterion IStringCriterion IStringList IStringRequisite IStringRequisiteDescription IStringValue ISystemDialogsFactory ISystemInfo ITabSheet ITask ITaskAbortReasonInfo ITaskCardWizardStep ITaskDescription ITaskFactory ITaskInfo ITaskRoute ITextCriterion ITextRequisite ITextValue ITreeListSelectDialog IUser IUserList IValue IView IWebBrowserControl IWizard IWizardAction IWizardFactory IWizardFormElement IWizardParam IWizardPickParam IWizardReferenceParam IWizardStep IWorkAccessRights IWorkDescription IWorkflowAskableParam IWorkflowAskableParams IWorkflowBlock IWorkflowBlockResult IWorkflowEnabledMode IWorkflowParam IWorkflowPickParam IWorkflowReferenceParam IWorkState IWorkTreeCustomNode IWorkTreeJobNode IWorkTreeTaskNode IXMLEditorForm SBCrypto ".trim().replace(/\s/g,"|")+")",end:"[ \\t]*=",excludeEnd:!0},c={className:"variable",keywords:a,begin:t,relevance:0,contains:[l,s]},u="[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]*\\(";return{name:"ISBL",case_insensitive:!0,keywords:a,illegal:"\\$|\\?|%|,|;$|~|#|@|</",contains:[{className:"function",begin:u,end:"\\)$",returnBegin:!0,keywords:a,illegal:"[\\[\\]\\|\\$\\?%,~#@]",contains:[{className:"title",keywords:{$pattern:t,built_in:"AddSubString AdjustLineBreaks AmountInWords Analysis ArrayDimCount ArrayHighBound ArrayLowBound ArrayOf ArrayReDim Assert Assigned BeginOfMonth BeginOfPeriod BuildProfilingOperationAnalysis CallProcedure CanReadFile CArrayElement CDataSetRequisite ChangeDate ChangeReferenceDataset Char CharPos CheckParam CheckParamValue CompareStrings ConstantExists ControlState ConvertDateStr Copy CopyFile CreateArray CreateCachedReference CreateConnection CreateDialog CreateDualListDialog CreateEditor CreateException CreateFile CreateFolderDialog CreateInputDialog CreateLinkFile CreateList CreateLock CreateMemoryDataSet CreateObject CreateOpenDialog CreateProgress CreateQuery CreateReference CreateReport CreateSaveDialog CreateScript CreateSQLPivotFunction CreateStringList CreateTreeListSelectDialog CSelectSQL CSQL CSubString CurrentUserID CurrentUserName CurrentVersion DataSetLocateEx DateDiff DateTimeDiff DateToStr DayOfWeek DeleteFile DirectoryExists DisableCheckAccessRights DisableCheckFullShowingRestriction DisableMassTaskSendingRestrictions DropTable DupeString EditText EnableCheckAccessRights EnableCheckFullShowingRestriction EnableMassTaskSendingRestrictions EndOfMonth EndOfPeriod ExceptionExists ExceptionsOff ExceptionsOn Execute ExecuteProcess Exit ExpandEnvironmentVariables ExtractFileDrive ExtractFileExt ExtractFileName ExtractFilePath ExtractParams FileExists FileSize FindFile FindSubString FirmContext ForceDirectories Format FormatDate FormatNumeric FormatSQLDate FormatString FreeException GetComponent GetComponentLaunchParam GetConstant GetLastException GetReferenceRecord GetRefTypeByRefID GetTableID GetTempFolder IfThen In IndexOf InputDialog InputDialogEx InteractiveMode IsFileLocked IsGraphicFile IsNumeric Length LoadString LoadStringFmt LocalTimeToUTC LowerCase Max MessageBox MessageBoxEx MimeDecodeBinary MimeDecodeString MimeEncodeBinary MimeEncodeString Min MoneyInWords MoveFile NewID Now OpenFile Ord Precision Raise ReadCertificateFromFile ReadFile ReferenceCodeByID ReferenceNumber ReferenceRequisiteMode ReferenceRequisiteValue RegionDateSettings RegionNumberSettings RegionTimeSettings RegRead RegWrite RenameFile Replace Round SelectServerCode SelectSQL ServerDateTime SetConstant SetManagedFolderFieldsState ShowConstantsInputDialog ShowMessage Sleep Split SQL SQL2XLSTAB SQLProfilingSendReport StrToDate SubString SubStringCount SystemSetting Time TimeDiff Today Transliterate Trim UpperCase UserStatus UTCToLocalTime ValidateXML VarIsClear VarIsEmpty VarIsNull WorkTimeDiff WriteFile WriteFileEx WriteObjectHistory Анализ БазаДанных БлокЕсть БлокЕстьРасш БлокИнфо БлокСнять БлокСнятьРасш БлокУстановить Ввод ВводМеню ВедС ВедСпр ВерхняяГраницаМассива ВнешПрогр Восст ВременнаяПапка Время ВыборSQL ВыбратьЗапись ВыделитьСтр Вызвать Выполнить ВыпПрогр ГрафическийФайл ГруппаДополнительно ДатаВремяСерв ДеньНедели ДиалогДаНет ДлинаСтр ДобПодстр ЕПусто ЕслиТо ЕЧисло ЗамПодстр ЗаписьСправочника ЗначПоляСпр ИДТипСпр ИзвлечьДиск ИзвлечьИмяФайла ИзвлечьПуть ИзвлечьРасширение ИзмДат ИзменитьРазмерМассива ИзмеренийМассива ИмяОрг ИмяПоляСпр Индекс ИндикаторЗакрыть ИндикаторОткрыть ИндикаторШаг ИнтерактивныйРежим ИтогТблСпр КодВидВедСпр КодВидСпрПоИД КодПоAnalit КодСимвола КодСпр КолПодстр КолПроп КонМес Конст КонстЕсть КонстЗнач КонТран КопироватьФайл КопияСтр КПериод КСтрТблСпр Макс МаксСтрТблСпр Массив Меню МенюРасш Мин НаборДанныхНайтиРасш НаимВидСпр НаимПоAnalit НаимСпр НастроитьПереводыСтрок НачМес НачТран НижняяГраницаМассива НомерСпр НПериод Окно Окр Окружение ОтлИнфДобавить ОтлИнфУдалить Отчет ОтчетАнал ОтчетИнт ПапкаСуществует Пауза ПВыборSQL ПереименоватьФайл Переменные ПереместитьФайл Подстр ПоискПодстр ПоискСтр ПолучитьИДТаблицы ПользовательДополнительно ПользовательИД ПользовательИмя ПользовательСтатус Прервать ПроверитьПараметр ПроверитьПараметрЗнач ПроверитьУсловие РазбСтр РазнВремя РазнДат РазнДатаВремя РазнРабВремя РегУстВрем РегУстДат РегУстЧсл РедТекст РеестрЗапись РеестрСписокИменПарам РеестрЧтение РеквСпр РеквСпрПр Сегодня Сейчас Сервер СерверПроцессИД СертификатФайлСчитать СжПроб Символ СистемаДиректумКод СистемаИнформация СистемаКод Содержит СоединениеЗакрыть СоединениеОткрыть СоздатьДиалог СоздатьДиалогВыбораИзДвухСписков СоздатьДиалогВыбораПапки СоздатьДиалогОткрытияФайла СоздатьДиалогСохраненияФайла СоздатьЗапрос СоздатьИндикатор СоздатьИсключение СоздатьКэшированныйСправочник СоздатьМассив СоздатьНаборДанных СоздатьОбъект СоздатьОтчет СоздатьПапку СоздатьРедактор СоздатьСоединение СоздатьСписок СоздатьСписокСтрок СоздатьСправочник СоздатьСценарий СоздСпр СостСпр Сохр СохрСпр СписокСистем Спр Справочник СпрБлокЕсть СпрБлокСнять СпрБлокСнятьРасш СпрБлокУстановить СпрИзмНабДан СпрКод СпрНомер СпрОбновить СпрОткрыть СпрОтменить СпрПарам СпрПолеЗнач СпрПолеИмя СпрРекв СпрРеквВведЗн СпрРеквНовые СпрРеквПр СпрРеквПредЗн СпрРеквРежим СпрРеквТипТекст СпрСоздать СпрСост СпрСохранить СпрТблИтог СпрТблСтр СпрТблСтрКол СпрТблСтрМакс СпрТблСтрМин СпрТблСтрПред СпрТблСтрСлед СпрТблСтрСозд СпрТблСтрУд СпрТекПредст СпрУдалить СравнитьСтр СтрВерхРегистр СтрНижнРегистр СтрТблСпр СумПроп Сценарий СценарийПарам ТекВерсия ТекОрг Точн Тран Транслитерация УдалитьТаблицу УдалитьФайл УдСпр УдСтрТблСпр Уст УстановкиКонстант ФайлАтрибутСчитать ФайлАтрибутУстановить ФайлВремя ФайлВремяУстановить ФайлВыбрать ФайлЗанят ФайлЗаписать ФайлИскать ФайлКопировать ФайлМожноЧитать ФайлОткрыть ФайлПереименовать ФайлПерекодировать ФайлПереместить ФайлПросмотреть ФайлРазмер ФайлСоздать ФайлСсылкаСоздать ФайлСуществует ФайлСчитать ФайлУдалить ФмтSQLДат ФмтДат ФмтСтр ФмтЧсл Формат ЦМассивЭлемент ЦНаборДанныхРеквизит ЦПодстр "},begin:u,end:"\\(",returnBegin:!0,excludeEnd:!0},s,c,r,n,o]},l,s,c,r,n,o]}}},function(e,t){var n="[0-9](_*[0-9])*",r=`\\.(${n})`,i="[0-9a-fA-F](_*[0-9a-fA-F])*",o={className:"number",variants:[{begin:`(\\b(${n})((${r})|\\.)?|(${r}))[eE][+-]?(${n})[fFdD]?\\b`},{begin:`\\b(${n})((${r})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${r})[fFdD]?\\b`},{begin:`\\b(${n})[fFdD]\\b`},{begin:`\\b0[xX]((${i})\\.?|(${i})?\\.(${i}))[pP][+-]?(${n})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${i})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function a(e,t,n){return-1===n?"":e.replace(t,(r=>a(e,t,n-1)))}e.exports=function(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+a("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),i={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},s={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},l={className:"params",begin:/\(/,end:/\)/,keywords:i,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:i,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[l,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:i,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:i,relevance:0,contains:[s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,o,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},o,s]}}},function(e,t){const n="[A-Za-z$_][0-9A-Za-z$_]*",r=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],i=["true","false","null","undefined","NaN","Infinity"],o=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],a=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],s=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],l=["arguments","this","super","console","window","document","localStorage","module","global"],c=[].concat(s,o,a);e.exports=function(e){const t=e.regex,u=n,d="<>",h="</>",p={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,r=e.input[n];if("<"===r||","===r)return void t.ignoreMatch();let i;">"===r&&(((e,{after:t})=>{const n="</"+e[0].slice(1);return-1!==e.input.indexOf(n,t)})(e,{after:n})||t.ignoreMatch());const o=e.input.substring(n);((i=o.match(/^\s*=/))||(i=o.match(/^\s+extends\s+/))&&0===i.index)&&t.ignoreMatch()}},m={$pattern:n,keyword:r,literal:i,built_in:c,"variable.language":l},g="[0-9](_?[0-9])*",f=`\\.(${g})`,_="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",b={className:"number",variants:[{begin:`(\\b(${_})((${f})|\\.)?|(${f}))[eE][+-]?(${g})\\b`},{begin:`\\b(${_})\\b((${f})\\b|\\.)?|(${f})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},v={className:"subst",begin:"\\$\\{",end:"\\}",keywords:m,contains:[]},y={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,v],subLanguage:"xml"}},E={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,v],subLanguage:"css"}},S={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,v]},w={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:u+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},T=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,E,S,{match:/\$\d+/},b];v.contains=T.concat({begin:/\{/,end:/\}/,keywords:m,contains:["self"].concat(T)});const C=[].concat(w,v.contains),x=C.concat([{begin:/\(/,end:/\)/,keywords:m,contains:["self"].concat(C)}]),F={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:m,contains:x},D={variants:[{match:[/class/,/\s+/,u,/\s+/,/extends/,/\s+/,t.concat(u,"(",t.concat(/\./,u),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,u],scope:{1:"keyword",3:"title.class"}}]},k={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...o,...a]}},O={variants:[{match:[/function/,/\s+/,u,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[F],illegal:/%/},I={match:t.concat(/\b/,(A=[...s,"super","import"],t.concat("(?!",A.join("|"),")")),u,t.lookahead(/\(/)),className:"title.function",relevance:0};var A;const R={begin:t.concat(/\./,t.lookahead(t.concat(u,/(?![0-9A-Za-z$_(])/))),end:u,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},N={match:[/get|set/,/\s+/,u,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},F]},M="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",P={match:[/const|var|let/,/\s+/,u,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(M)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[F]};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:m,exports:{PARAMS_CONTAINS:x,CLASS_REFERENCE:k},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,E,S,w,{match:/\$\d+/},b,k,{className:"attr",begin:u+t.lookahead(":"),relevance:0},P,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[w,e.REGEXP_MODE,{className:"function",begin:M,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:m,contains:x}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:d,end:h},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:p.begin,"on:begin":p.isTrulyOpeningTag,end:p.end}],subLanguage:"xml",contains:[{begin:p.begin,end:p.end,skip:!0,contains:["self"]}]}]},O,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[F,e.inherit(e.TITLE_MODE,{begin:u,className:"title.function"})]},{match:/\.\.\./,relevance:0},R,{match:"\\$"+u,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[F]},I,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},D,N,{match:/\$[(.]/}]}}},function(e,t){e.exports=function(e){const t={className:"params",begin:/\(/,end:/\)/,contains:[{begin:/[\w-]+ *=/,returnBegin:!0,relevance:0,contains:[{className:"attr",begin:/[\w-]+/}]}],relevance:0};return{name:"JBoss CLI",aliases:["wildfly-cli"],keywords:{$pattern:"[a-z-]+",keyword:"alias batch cd clear command connect connection-factory connection-info data-source deploy deployment-info deployment-overlay echo echo-dmr help history if jdbc-driver-info jms-queue|20 jms-topic|20 ls patch pwd quit read-attribute read-operation reload rollout-plan run-batch set shutdown try unalias undeploy unset version xa-data-source",literal:"true false"},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,{className:"params",begin:/--[\w\-=\/]+/},{className:"function",begin:/:[\w\-.]+/,relevance:0},{className:"string",begin:/\B([\/.])[\w\-.\/=]+/},t]}}},function(e,t){e.exports=function(e){const t=["true","false","null"],n={scope:"literal",beginKeywords:t.join(" ")};return{name:"JSON",keywords:{literal:t},contains:[{className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},{match:/[{}[\],:]/,className:"punctuation",relevance:0},e.QUOTE_STRING_MODE,n,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}},function(e,t){e.exports=function(e){const t="[A-Za-z_\\u00A1-\\uFFFF][A-Za-z_0-9\\u00A1-\\uFFFF]*",n={$pattern:t,keyword:["baremodule","begin","break","catch","ccall","const","continue","do","else","elseif","end","export","false","finally","for","function","global","if","import","in","isa","let","local","macro","module","quote","return","true","try","using","where","while"],literal:["ARGS","C_NULL","DEPOT_PATH","ENDIAN_BOM","ENV","Inf","Inf16","Inf32","Inf64","InsertionSort","LOAD_PATH","MergeSort","NaN","NaN16","NaN32","NaN64","PROGRAM_FILE","QuickSort","RoundDown","RoundFromZero","RoundNearest","RoundNearestTiesAway","RoundNearestTiesUp","RoundToZero","RoundUp","VERSION|0","devnull","false","im","missing","nothing","pi","stderr","stdin","stdout","true","undef","π","ℯ"],built_in:["AbstractArray","AbstractChannel","AbstractChar","AbstractDict","AbstractDisplay","AbstractFloat","AbstractIrrational","AbstractMatrix","AbstractRange","AbstractSet","AbstractString","AbstractUnitRange","AbstractVecOrMat","AbstractVector","Any","ArgumentError","Array","AssertionError","BigFloat","BigInt","BitArray","BitMatrix","BitSet","BitVector","Bool","BoundsError","CapturedException","CartesianIndex","CartesianIndices","Cchar","Cdouble","Cfloat","Channel","Char","Cint","Cintmax_t","Clong","Clonglong","Cmd","Colon","Complex","ComplexF16","ComplexF32","ComplexF64","CompositeException","Condition","Cptrdiff_t","Cshort","Csize_t","Cssize_t","Cstring","Cuchar","Cuint","Cuintmax_t","Culong","Culonglong","Cushort","Cvoid","Cwchar_t","Cwstring","DataType","DenseArray","DenseMatrix","DenseVecOrMat","DenseVector","Dict","DimensionMismatch","Dims","DivideError","DomainError","EOFError","Enum","ErrorException","Exception","ExponentialBackOff","Expr","Float16","Float32","Float64","Function","GlobalRef","HTML","IO","IOBuffer","IOContext","IOStream","IdDict","IndexCartesian","IndexLinear","IndexStyle","InexactError","InitError","Int","Int128","Int16","Int32","Int64","Int8","Integer","InterruptException","InvalidStateException","Irrational","KeyError","LinRange","LineNumberNode","LinearIndices","LoadError","MIME","Matrix","Method","MethodError","Missing","MissingException","Module","NTuple","NamedTuple","Nothing","Number","OrdinalRange","OutOfMemoryError","OverflowError","Pair","PartialQuickSort","PermutedDimsArray","Pipe","ProcessFailedException","Ptr","QuoteNode","Rational","RawFD","ReadOnlyMemoryError","Real","ReentrantLock","Ref","Regex","RegexMatch","RoundingMode","SegmentationFault","Set","Signed","Some","StackOverflowError","StepRange","StepRangeLen","StridedArray","StridedMatrix","StridedVecOrMat","StridedVector","String","StringIndexError","SubArray","SubString","SubstitutionString","Symbol","SystemError","Task","TaskFailedException","Text","TextDisplay","Timer","Tuple","Type","TypeError","TypeVar","UInt","UInt128","UInt16","UInt32","UInt64","UInt8","UndefInitializer","UndefKeywordError","UndefRefError","UndefVarError","Union","UnionAll","UnitRange","Unsigned","Val","Vararg","VecElement","VecOrMat","Vector","VersionNumber","WeakKeyDict","WeakRef"]},r={keywords:n,illegal:/<\//},i={className:"subst",begin:/\$\(/,end:/\)/,keywords:n},o={className:"variable",begin:"\\$"+t},a={className:"string",contains:[e.BACKSLASH_ESCAPE,i,o],variants:[{begin:/\w*"""/,end:/"""\w*/,relevance:10},{begin:/\w*"/,end:/"\w*/}]},s={className:"string",contains:[e.BACKSLASH_ESCAPE,i,o],begin:"`",end:"`"},l={className:"meta",begin:"@"+t};return r.name="Julia",r.contains=[{className:"number",begin:/(\b0x[\d_]*(\.[\d_]*)?|0x\.\d[\d_]*)p[-+]?\d+|\b0[box][a-fA-F0-9][a-fA-F0-9_]*|(\b\d[\d_]*(\.[\d_]*)?|\.\d[\d_]*)([eEfF][-+]?\d+)?/,relevance:0},{className:"string",begin:/'(.|\\[xXuU][a-zA-Z0-9]+)'/},a,s,l,{className:"comment",variants:[{begin:"#=",end:"=#",relevance:10},{begin:"#",end:"$"}]},e.HASH_COMMENT_MODE,{className:"keyword",begin:"\\b(((abstract|primitive)\\s+)type|(mutable\\s+)?struct)\\b"},{begin:/<:/}],i.contains=r.contains,r}},function(e,t){e.exports=function(e){return{name:"Julia REPL",contains:[{className:"meta.prompt",begin:/^julia>/,relevance:10,starts:{end:/^(?![ ]{6})/,subLanguage:"julia"}}],aliases:["jldoctest"]}}},function(e,t){var n="[0-9](_*[0-9])*",r=`\\.(${n})`,i="[0-9a-fA-F](_*[0-9a-fA-F])*",o={className:"number",variants:[{begin:`(\\b(${n})((${r})|\\.)?|(${r}))[eE][+-]?(${n})[fFdD]?\\b`},{begin:`\\b(${n})((${r})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${r})[fFdD]?\\b`},{begin:`\\b(${n})[fFdD]\\b`},{begin:`\\b0[xX]((${i})\\.?|(${i})?\\.(${i}))[pP][+-]?(${n})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${i})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};e.exports=function(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},r={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},i={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},a={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[i,r]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,i,r]}]};r.contains.push(a);const s={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},l={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(a,{className:"string"}),"self"]}]},c=o,u=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},h=d;return h.variants[1].contains=[d],d.variants[1].contains=[h],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,u,{className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},n,s,l,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,e.C_LINE_COMMENT_MODE,u],relevance:0},e.C_LINE_COMMENT_MODE,u,s,l,a,e.C_NUMBER_MODE]},u]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},s,l]},a,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},c]}}},function(e,t){e.exports=function(e){const t="[a-zA-Z_][\\w.]*",n="<\\?(lasso(script)?|=)",r="\\]|\\?>",i={$pattern:t+"|&[lg]t;",literal:"true false none minimal full all void and or not bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft",built_in:"array date decimal duration integer map pair string tag xml null boolean bytes keyword list locale queue set stack staticarray local var variable global data self inherited currentcapture givenblock",keyword:"cache database_names database_schemanames database_tablenames define_tag define_type email_batch encode_set html_comment handle handle_error header if inline iterate ljax_target link link_currentaction link_currentgroup link_currentrecord link_detail link_firstgroup link_firstrecord link_lastgroup link_lastrecord link_nextgroup link_nextrecord link_prevgroup link_prevrecord log loop namespace_using output_none portal private protect records referer referrer repeating resultset rows search_args search_arguments select sort_args sort_arguments thread_atomic value_list while abort case else fail_if fail_ifnot fail if_empty if_false if_null if_true loop_abort loop_continue loop_count params params_up return return_value run_children soap_definetag soap_lastrequest soap_lastresponse tag_name ascending average by define descending do equals frozen group handle_failure import in into join let match max min on order parent protected provide public require returnhome skip split_thread sum take thread to trait type where with yield yieldhome"},o=e.COMMENT("\x3c!--","--\x3e",{relevance:0}),a={className:"meta",begin:"\\[noprocess\\]",starts:{end:"\\[/noprocess\\]",returnEnd:!0,contains:[o]}},s={className:"meta",begin:"\\[/noprocess|"+n},l={className:"symbol",begin:"'"+t+"'"},c=[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.inherit(e.C_NUMBER_MODE,{begin:e.C_NUMBER_RE+"|(-?infinity|NaN)\\b"}),e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"`",end:"`"},{variants:[{begin:"[#$]"+t},{begin:"#",end:"\\d+",illegal:"\\W"}]},{className:"type",begin:"::\\s*",end:t,illegal:"\\W"},{className:"params",variants:[{begin:"-(?!infinity)"+t,relevance:0},{begin:"(\\.\\.\\.)"}]},{begin:/(->|\.)\s*/,relevance:0,contains:[l]},{className:"class",beginKeywords:"define",returnEnd:!0,end:"\\(|=>",contains:[e.inherit(e.TITLE_MODE,{begin:t+"(=(?!>))?|[-+*/%](?!>)"})]}];return{name:"Lasso",aliases:["ls","lassoscript"],case_insensitive:!0,keywords:i,contains:[{className:"meta",begin:r,relevance:0,starts:{end:"\\[|"+n,returnEnd:!0,relevance:0,contains:[o]}},a,s,{className:"meta",begin:"\\[no_square_brackets",starts:{end:"\\[/no_square_brackets\\]",keywords:i,contains:[{className:"meta",begin:r,relevance:0,starts:{end:"\\[noprocess\\]|"+n,returnEnd:!0,contains:[o]}},a,s].concat(c)}},{className:"meta",begin:"\\[",relevance:0},{className:"meta",begin:"^#!",end:"lasso9$",relevance:10}].concat(c)}}},function(e,t){e.exports=function(e){const t=[{begin:/\^{6}[0-9a-f]{6}/},{begin:/\^{5}[0-9a-f]{5}/},{begin:/\^{4}[0-9a-f]{4}/},{begin:/\^{3}[0-9a-f]{3}/},{begin:/\^{2}[0-9a-f]{2}/},{begin:/\^{2}[\u0000-\u007f]/}],n=[{className:"keyword",begin:/\\/,relevance:0,contains:[{endsParent:!0,begin:e.regex.either(...["(?:NeedsTeXFormat|RequirePackage|GetIdInfo)","Provides(?:Expl)?(?:Package|Class|File)","(?:DeclareOption|ProcessOptions)","(?:documentclass|usepackage|input|include)","makeat(?:letter|other)","ExplSyntax(?:On|Off)","(?:new|renew|provide)?command","(?:re)newenvironment","(?:New|Renew|Provide|Declare)(?:Expandable)?DocumentCommand","(?:New|Renew|Provide|Declare)DocumentEnvironment","(?:(?:e|g|x)?def|let)","(?:begin|end)","(?:part|chapter|(?:sub){0,2}section|(?:sub)?paragraph)","caption","(?:label|(?:eq|page|name)?ref|(?:paren|foot|super)?cite)","(?:alpha|beta|[Gg]amma|[Dd]elta|(?:var)?epsilon|zeta|eta|[Tt]heta|vartheta)","(?:iota|(?:var)?kappa|[Ll]ambda|mu|nu|[Xx]i|[Pp]i|varpi|(?:var)rho)","(?:[Ss]igma|varsigma|tau|[Uu]psilon|[Pp]hi|varphi|chi|[Pp]si|[Oo]mega)","(?:frac|sum|prod|lim|infty|times|sqrt|leq|geq|left|right|middle|[bB]igg?)","(?:[lr]angle|q?quad|[lcvdi]?dots|d?dot|hat|tilde|bar)"].map((e=>e+"(?![a-zA-Z@:_])")))},{endsParent:!0,begin:new RegExp(["(?:__)?[a-zA-Z]{2,}_[a-zA-Z](?:_?[a-zA-Z])+:[a-zA-Z]*","[lgc]__?[a-zA-Z](?:_?[a-zA-Z])*_[a-zA-Z]{2,}","[qs]__?[a-zA-Z](?:_?[a-zA-Z])+","use(?:_i)?:[a-zA-Z]*","(?:else|fi|or):","(?:if|cs|exp):w","(?:hbox|vbox):n","::[a-zA-Z]_unbraced","::[a-zA-Z:]"].map((e=>e+"(?![a-zA-Z:_])")).join("|"))},{endsParent:!0,variants:t},{endsParent:!0,relevance:0,variants:[{begin:/[a-zA-Z@]+/},{begin:/[^a-zA-Z@]?/}]}]},{className:"params",relevance:0,begin:/#+\d?/},{variants:t},{className:"built_in",relevance:0,begin:/[$&^_]/},{className:"meta",begin:/% ?!(T[eE]X|tex|BIB|bib)/,end:"$",relevance:10},e.COMMENT("%","$",{relevance:0})],r={begin:/\{/,end:/\}/,relevance:0,contains:["self",...n]},i=e.inherit(r,{relevance:0,endsParent:!0,contains:[r,...n]}),o={begin:/\[/,end:/\]/,endsParent:!0,relevance:0,contains:[r,...n]},a={begin:/\s+/,relevance:0},s=[i],l=[o],c=function(e,t){return{contains:[a],starts:{relevance:0,contains:e,starts:t}}},u=function(e,t){return{begin:"\\\\"+e+"(?![a-zA-Z@:_])",keywords:{$pattern:/\\[a-zA-Z]+/,keyword:"\\"+e},relevance:0,contains:[a],starts:t}},d=function(t,n){return e.inherit({begin:"\\\\begin(?=[ \t]*(\\r?\\n[ \t]*)?\\{"+t+"\\})",keywords:{$pattern:/\\[a-zA-Z]+/,keyword:"\\begin"},relevance:0},c(s,n))},h=(t="string")=>e.END_SAME_AS_BEGIN({className:t,begin:/(.|\r?\n)/,end:/(.|\r?\n)/,excludeBegin:!0,excludeEnd:!0,endsParent:!0}),p=function(e){return{className:"string",end:"(?=\\\\end\\{"+e+"\\})"}},m=(e="string")=>({relevance:0,begin:/\{/,starts:{endsParent:!0,contains:[{className:e,end:/(?=\})/,endsParent:!0,contains:[{begin:/\{/,end:/\}/,relevance:0,contains:["self"]}]}]}});return{name:"LaTeX",aliases:["tex"],contains:[...[...["verb","lstinline"].map((e=>u(e,{contains:[h()]}))),u("mint",c(s,{contains:[h()]})),u("mintinline",c(s,{contains:[m(),h()]})),u("url",{contains:[m("link"),m("link")]}),u("hyperref",{contains:[m("link")]}),u("href",c(l,{contains:[m("link")]})),...[].concat(...["","\\*"].map((e=>[d("verbatim"+e,p("verbatim"+e)),d("filecontents"+e,c(s,p("filecontents"+e))),...["","B","L"].map((t=>d(t+"Verbatim"+e,c(l,p(t+"Verbatim"+e)))))]))),d("minted",c(l,c(s,p("minted"))))],...n]}}},function(e,t){e.exports=function(e){return{name:"LDIF",contains:[{className:"attribute",match:"^dn(?=:)",relevance:10},{className:"attribute",match:"^\\w+(?=:)"},{className:"literal",match:"^-"},e.HASH_COMMENT_MODE]}}},function(e,t){e.exports=function(e){return{name:"Leaf",contains:[{className:"function",begin:"#+[A-Za-z_0-9]*\\(",end:/ \{/,returnBegin:!0,excludeEnd:!0,contains:[{className:"keyword",begin:"#+"},{className:"title",begin:"[A-Za-z_][A-Za-z_0-9]*"},{className:"params",begin:"\\(",end:"\\)",endsParent:!0,contains:[{className:"string",begin:'"',end:'"'},{className:"variable",begin:"[A-Za-z_][A-Za-z_0-9]*"}]}]}]}}},function(e,t){const n=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}),r=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],i=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],o=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],a=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],s=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse(),l=o.concat(a);e.exports=function(e){const t=n(e),c=l,u="[\\w-]+",d="("+u+"|@\\{"+u+"\\})",h=[],p=[],m=function(e){return{className:"string",begin:"~?"+e+".*?"+e}},g=function(e,t,n){return{className:e,begin:t,relevance:n}},f={$pattern:/[a-z-]+/,keyword:"and or not only",attribute:i.join(" ")},_={begin:"\\(",end:"\\)",contains:p,keywords:f,relevance:0};p.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,m("'"),m('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,_,g("variable","@@?"+u,10),g("variable","@\\{"+u+"\\}"),g("built_in","~?`[^`]*?`"),{className:"attribute",begin:u+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const b=p.concat({begin:/\{/,end:/\}/,contains:h}),v={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(p)},y={begin:d+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+s.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:p}}]},E={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:f,returnEnd:!0,contains:p,relevance:0}},S={className:"variable",variants:[{begin:"@"+u+"\\s*:",relevance:15},{begin:"@"+u}],starts:{end:"[;}]",returnEnd:!0,contains:b}},w={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:d,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,v,g("keyword","all\\b"),g("variable","@\\{"+u+"\\}"),{begin:"\\b("+r.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,g("selector-tag",d,0),g("selector-id","#"+d),g("selector-class","\\."+d,0),g("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+o.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+a.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:b},{begin:"!important"},t.FUNCTION_DISPATCH]},T={begin:u+":(:)?"+`(${c.join("|")})`,returnBegin:!0,contains:[w]};return h.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,E,S,T,y,w,v,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:h}}},function(e,t){e.exports=function(e){const t="[a-zA-Z_\\-+\\*\\/<=>&#][a-zA-Z0-9_\\-+*\\/<=>&#!]*",n="\\|[^]*?\\|",r="(-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s|D|E|F|L|S)(\\+|-)?\\d+)?",i={className:"literal",begin:"\\b(t{1}|nil)\\b"},o={className:"number",variants:[{begin:r,relevance:0},{begin:"#(b|B)[0-1]+(/[0-1]+)?"},{begin:"#(o|O)[0-7]+(/[0-7]+)?"},{begin:"#(x|X)[0-9a-fA-F]+(/[0-9a-fA-F]+)?"},{begin:"#(c|C)\\("+r+" +"+r,end:"\\)"}]},a=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),s=e.COMMENT(";","$",{relevance:0}),l={begin:"\\*",end:"\\*"},c={className:"symbol",begin:"[:&]"+t},u={begin:t,relevance:0},d={begin:n},h={contains:[o,a,l,c,{begin:"\\(",end:"\\)",contains:["self",i,a,o,u]},u],variants:[{begin:"['`]\\(",end:"\\)"},{begin:"\\(quote ",end:"\\)",keywords:{name:"quote"}},{begin:"'"+n}]},p={variants:[{begin:"'"+t},{begin:"#'"+t+"(::"+t+")*"}]},m={begin:"\\(\\s*",end:"\\)"},g={endsWithParent:!0,relevance:0};return m.contains=[{className:"name",variants:[{begin:t,relevance:0},{begin:n}]},g],g.contains=[h,p,m,i,o,a,s,l,c,d,u],{name:"Lisp",illegal:/\S/,contains:[o,e.SHEBANG(),i,a,s,h,p,m,u]}}},function(e,t){e.exports=function(e){const t={className:"variable",variants:[{begin:"\\b([gtps][A-Z]{1}[a-zA-Z0-9]*)(\\[.+\\])?(?:\\s*?)"},{begin:"\\$_[A-Z]+"}],relevance:0},n=[e.C_BLOCK_COMMENT_MODE,e.HASH_COMMENT_MODE,e.COMMENT("--","$"),e.COMMENT("[^:]//","$")],r=e.inherit(e.TITLE_MODE,{variants:[{begin:"\\b_*rig[A-Z][A-Za-z0-9_\\-]*"},{begin:"\\b_[a-z0-9\\-]+"}]}),i=e.inherit(e.TITLE_MODE,{begin:"\\b([A-Za-z0-9_\\-]+)\\b"});return{name:"LiveCode",case_insensitive:!1,keywords:{keyword:"$_COOKIE $_FILES $_GET $_GET_BINARY $_GET_RAW $_POST $_POST_BINARY $_POST_RAW $_SESSION $_SERVER codepoint codepoints segment segments codeunit codeunits sentence sentences trueWord trueWords paragraph after byte bytes english the until http forever descending using line real8 with seventh for stdout finally element word words fourth before black ninth sixth characters chars stderr uInt1 uInt1s uInt2 uInt2s stdin string lines relative rel any fifth items from middle mid at else of catch then third it file milliseconds seconds second secs sec int1 int1s int4 int4s internet int2 int2s normal text item last long detailed effective uInt4 uInt4s repeat end repeat URL in try into switch to words https token binfile each tenth as ticks tick system real4 by dateItems without char character ascending eighth whole dateTime numeric short first ftp integer abbreviated abbr abbrev private case while if div mod wrap and or bitAnd bitNot bitOr bitXor among not in a an within contains ends with begins the keys of keys",literal:"SIX TEN FORMFEED NINE ZERO NONE SPACE FOUR FALSE COLON CRLF PI COMMA ENDOFFILE EOF EIGHT FIVE QUOTE EMPTY ONE TRUE RETURN CR LINEFEED RIGHT BACKSLASH NULL SEVEN TAB THREE TWO six ten formfeed nine zero none space four false colon crlf pi comma endoffile eof eight five quote empty one true return cr linefeed right backslash null seven tab three two RIVERSION RISTATE FILE_READ_MODE FILE_WRITE_MODE FILE_WRITE_MODE DIR_WRITE_MODE FILE_READ_UMASK FILE_WRITE_UMASK DIR_READ_UMASK DIR_WRITE_UMASK",built_in:"put abs acos aliasReference annuity arrayDecode arrayEncode asin atan atan2 average avg avgDev base64Decode base64Encode baseConvert binaryDecode binaryEncode byteOffset byteToNum cachedURL cachedURLs charToNum cipherNames codepointOffset codepointProperty codepointToNum codeunitOffset commandNames compound compress constantNames cos date dateFormat decompress difference directories diskSpace DNSServers exp exp1 exp2 exp10 extents files flushEvents folders format functionNames geometricMean global globals hasMemory harmonicMean hostAddress hostAddressToName hostName hostNameToAddress isNumber ISOToMac itemOffset keys len length libURLErrorData libUrlFormData libURLftpCommand libURLLastHTTPHeaders libURLLastRHHeaders libUrlMultipartFormAddPart libUrlMultipartFormData libURLVersion lineOffset ln ln1 localNames log log2 log10 longFilePath lower macToISO matchChunk matchText matrixMultiply max md5Digest median merge messageAuthenticationCode messageDigest millisec millisecs millisecond milliseconds min monthNames nativeCharToNum normalizeText num number numToByte numToChar numToCodepoint numToNativeChar offset open openfiles openProcesses openProcessIDs openSockets paragraphOffset paramCount param params peerAddress pendingMessages platform popStdDev populationStandardDeviation populationVariance popVariance processID random randomBytes replaceText result revCreateXMLTree revCreateXMLTreeFromFile revCurrentRecord revCurrentRecordIsFirst revCurrentRecordIsLast revDatabaseColumnCount revDatabaseColumnIsNull revDatabaseColumnLengths revDatabaseColumnNames revDatabaseColumnNamed revDatabaseColumnNumbered revDatabaseColumnTypes revDatabaseConnectResult revDatabaseCursors revDatabaseID revDatabaseTableNames revDatabaseType revDataFromQuery revdb_closeCursor revdb_columnbynumber revdb_columncount revdb_columnisnull revdb_columnlengths revdb_columnnames revdb_columntypes revdb_commit revdb_connect revdb_connections revdb_connectionerr revdb_currentrecord revdb_cursorconnection revdb_cursorerr revdb_cursors revdb_dbtype revdb_disconnect revdb_execute revdb_iseof revdb_isbof revdb_movefirst revdb_movelast revdb_movenext revdb_moveprev revdb_query revdb_querylist revdb_recordcount revdb_rollback revdb_tablenames revGetDatabaseDriverPath revNumberOfRecords revOpenDatabase revOpenDatabases revQueryDatabase revQueryDatabaseBlob revQueryResult revQueryIsAtStart revQueryIsAtEnd revUnixFromMacPath revXMLAttribute revXMLAttributes revXMLAttributeValues revXMLChildContents revXMLChildNames revXMLCreateTreeFromFileWithNamespaces revXMLCreateTreeWithNamespaces revXMLDataFromXPathQuery revXMLEvaluateXPath revXMLFirstChild revXMLMatchingNode revXMLNextSibling revXMLNodeContents revXMLNumberOfChildren revXMLParent revXMLPreviousSibling revXMLRootNode revXMLRPC_CreateRequest revXMLRPC_Documents revXMLRPC_Error revXMLRPC_GetHost revXMLRPC_GetMethod revXMLRPC_GetParam revXMLText revXMLRPC_Execute revXMLRPC_GetParamCount revXMLRPC_GetParamNode revXMLRPC_GetParamType revXMLRPC_GetPath revXMLRPC_GetPort revXMLRPC_GetProtocol revXMLRPC_GetRequest revXMLRPC_GetResponse revXMLRPC_GetSocket revXMLTree revXMLTrees revXMLValidateDTD revZipDescribeItem revZipEnumerateItems revZipOpenArchives round sampVariance sec secs seconds sentenceOffset sha1Digest shell shortFilePath sin specialFolderPath sqrt standardDeviation statRound stdDev sum sysError systemVersion tan tempName textDecode textEncode tick ticks time to tokenOffset toLower toUpper transpose truewordOffset trunc uniDecode uniEncode upper URLDecode URLEncode URLStatus uuid value variableNames variance version waitDepth weekdayNames wordOffset xsltApplyStylesheet xsltApplyStylesheetFromFile xsltLoadStylesheet xsltLoadStylesheetFromFile add breakpoint cancel clear local variable file word line folder directory URL close socket process combine constant convert create new alias folder directory decrypt delete variable word line folder directory URL dispatch divide do encrypt filter get include intersect kill libURLDownloadToFile libURLFollowHttpRedirects libURLftpUpload libURLftpUploadFile libURLresetAll libUrlSetAuthCallback libURLSetDriver libURLSetCustomHTTPHeaders libUrlSetExpect100 libURLSetFTPListCommand libURLSetFTPMode libURLSetFTPStopTime libURLSetStatusCallback load extension loadedExtensions multiply socket prepare process post seek rel relative read from process rename replace require resetAll resolve revAddXMLNode revAppendXML revCloseCursor revCloseDatabase revCommitDatabase revCopyFile revCopyFolder revCopyXMLNode revDeleteFolder revDeleteXMLNode revDeleteAllXMLTrees revDeleteXMLTree revExecuteSQL revGoURL revInsertXMLNode revMoveFolder revMoveToFirstRecord revMoveToLastRecord revMoveToNextRecord revMoveToPreviousRecord revMoveToRecord revMoveXMLNode revPutIntoXMLNode revRollBackDatabase revSetDatabaseDriverPath revSetXMLAttribute revXMLRPC_AddParam revXMLRPC_DeleteAllDocuments revXMLAddDTD revXMLRPC_Free revXMLRPC_FreeAll revXMLRPC_DeleteDocument revXMLRPC_DeleteParam revXMLRPC_SetHost revXMLRPC_SetMethod revXMLRPC_SetPort revXMLRPC_SetProtocol revXMLRPC_SetSocket revZipAddItemWithData revZipAddItemWithFile revZipAddUncompressedItemWithData revZipAddUncompressedItemWithFile revZipCancel revZipCloseArchive revZipDeleteItem revZipExtractItemToFile revZipExtractItemToVariable revZipSetProgressCallback revZipRenameItem revZipReplaceItemWithData revZipReplaceItemWithFile revZipOpenArchive send set sort split start stop subtract symmetric union unload vectorDotProduct wait write"},contains:[t,{className:"keyword",begin:"\\bend\\sif\\b"},{className:"function",beginKeywords:"function",end:"$",contains:[t,i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE,r]},{className:"function",begin:"\\bend\\s+",end:"$",keywords:"end",contains:[i,r],relevance:0},{beginKeywords:"command on",end:"$",contains:[t,i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE,r]},{className:"meta",variants:[{begin:"<\\?(rev|lc|livecode)",relevance:10},{begin:"<\\?"},{begin:"\\?>"}]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE,r].concat(n),illegal:";$|^\\[|^=|&|\\{"}}},function(e,t){const n=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],r=["true","false","null","undefined","NaN","Infinity"],i=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]);e.exports=function(e){const t={keyword:n.concat(["then","unless","until","loop","of","by","when","and","or","is","isnt","not","it","that","otherwise","from","to","til","fallthrough","case","enum","native","list","map","__hasProp","__extends","__slice","__bind","__indexOf"]),literal:r.concat(["yes","no","on","off","it","that","void"]),built_in:i.concat(["npm","print"])},o="[A-Za-z$_](?:-[0-9A-Za-z$_]|[0-9A-Za-z$_])*",a=e.inherit(e.TITLE_MODE,{begin:o}),s={className:"subst",begin:/#\{/,end:/\}/,keywords:t},l={className:"subst",begin:/#[A-Za-z$_]/,end:/(?:-[0-9A-Za-z$_]|[0-9A-Za-z$_])*/,keywords:t},c=[e.BINARY_NUMBER_MODE,{className:"number",begin:"(\\b0[xX][a-fA-F0-9_]+)|(\\b\\d(\\d|_\\d)*(\\.(\\d(\\d|_\\d)*)?)?(_*[eE]([-+]\\d(_\\d|\\d)*)?)?[_a-z]*)",relevance:0,starts:{end:"(\\s*/)?",relevance:0}},{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[e.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,s,l]},{begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,l]},{begin:/\\/,end:/(\s|$)/,excludeEnd:!0}]},{className:"regexp",variants:[{begin:"//",end:"//[gim]*",contains:[s,e.HASH_COMMENT_MODE]},{begin:/\/(?![ *])(\\.|[^\\\n])*?\/[gim]*(?=\W)/}]},{begin:"@"+o},{begin:"``",end:"``",excludeBegin:!0,excludeEnd:!0,subLanguage:"javascript"}];s.contains=c;const u={className:"params",begin:"\\(",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:t,contains:["self"].concat(c)}]},d={variants:[{match:[/class\s+/,o,/\s+extends\s+/,o]},{match:[/class\s+/,o]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:t};return{name:"LiveScript",aliases:["ls"],keywords:t,illegal:/\/\*/,contains:c.concat([e.COMMENT("\\/\\*","\\*\\/"),e.HASH_COMMENT_MODE,{begin:"(#=>|=>|\\|>>|-?->|!->)"},{className:"function",contains:[a,u],returnBegin:!0,variants:[{begin:"("+o+"\\s*(?:=|:=)\\s*)?(\\(.*\\)\\s*)?\\B->\\*?",end:"->\\*?"},{begin:"("+o+"\\s*(?:=|:=)\\s*)?!?(\\(.*\\)\\s*)?\\B[-~]{1,2}>\\*?",end:"[-~]{1,2}>\\*?"},{begin:"("+o+"\\s*(?:=|:=)\\s*)?(\\(.*\\)\\s*)?\\B!?[-~]{1,2}>\\*?",end:"!?[-~]{1,2}>\\*?"}]},d,{begin:o+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}},function(e,t){e.exports=function(e){const t=e.regex,n=/([-a-zA-Z$._][\w$.-]*)/,r={className:"variable",variants:[{begin:t.concat(/%/,n)},{begin:/%\d+/},{begin:/#\d+/}]},i={className:"title",variants:[{begin:t.concat(/@/,n)},{begin:/@\d+/},{begin:t.concat(/!/,n)},{begin:t.concat(/!\d+/,n)},{begin:/!\d+/}]};return{name:"LLVM IR",keywords:"begin end true false declare define global constant private linker_private internal available_externally linkonce linkonce_odr weak weak_odr appending dllimport dllexport common default hidden protected extern_weak external thread_local zeroinitializer undef null to tail target triple datalayout volatile nuw nsw nnan ninf nsz arcp fast exact inbounds align addrspace section alias module asm sideeffect gc dbg linker_private_weak attributes blockaddress initialexec localdynamic localexec prefix unnamed_addr ccc fastcc coldcc x86_stdcallcc x86_fastcallcc arm_apcscc arm_aapcscc arm_aapcs_vfpcc ptx_device ptx_kernel intel_ocl_bicc msp430_intrcc spir_func spir_kernel x86_64_sysvcc x86_64_win64cc x86_thiscallcc cc c signext zeroext inreg sret nounwind noreturn noalias nocapture byval nest readnone readonly inlinehint noinline alwaysinline optsize ssp sspreq noredzone noimplicitfloat naked builtin cold nobuiltin noduplicate nonlazybind optnone returns_twice sanitize_address sanitize_memory sanitize_thread sspstrong uwtable returned type opaque eq ne slt sgt sle sge ult ugt ule uge oeq one olt ogt ole oge ord uno ueq une x acq_rel acquire alignstack atomic catch cleanup filter inteldialect max min monotonic nand personality release seq_cst singlethread umax umin unordered xchg add fadd sub fsub mul fmul udiv sdiv fdiv urem srem frem shl lshr ashr and or xor icmp fcmp phi call trunc zext sext fptrunc fpext uitofp sitofp fptoui fptosi inttoptr ptrtoint bitcast addrspacecast select va_arg ret br switch invoke unwind unreachable indirectbr landingpad resume malloc alloca free load store getelementptr extractelement insertelement shufflevector getresult extractvalue insertvalue atomicrmw cmpxchg fence argmemonly double",contains:[{className:"type",begin:/\bi\d+(?=\s|\b)/},e.COMMENT(/;\s*$/,null,{relevance:0}),e.COMMENT(/;/,/$/),{className:"string",begin:/"/,end:/"/,contains:[{className:"char.escape",match:/\\\d\d/}]},i,{className:"punctuation",relevance:0,begin:/,/},{className:"operator",relevance:0,begin:/=/},r,{className:"symbol",variants:[{begin:/^\s*[a-z]+:/}],relevance:0},{className:"number",variants:[{begin:/[su]?0[xX][KMLHR]?[a-fA-F0-9]+/},{begin:/[-+]?\d+(?:[.]\d+)?(?:[eE][-+]?\d+(?:[.]\d+)?)?/}],relevance:0}]}}},function(e,t){e.exports=function(e){const t={className:"string",begin:'"',end:'"',contains:[{className:"subst",begin:/\\[tn"\\]/}]},n={className:"number",relevance:0,begin:e.C_NUMBER_RE};return{name:"LSL (Linden Scripting Language)",illegal:":",contains:[t,{className:"comment",variants:[e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/")],relevance:0},n,{className:"section",variants:[{begin:"\\b(state|default)\\b"},{begin:"\\b(state_(entry|exit)|touch(_(start|end))?|(land_)?collision(_(start|end))?|timer|listen|(no_)?sensor|control|(not_)?at_(rot_)?target|money|email|experience_permissions(_denied)?|run_time_permissions|changed|attach|dataserver|moving_(start|end)|link_message|(on|object)_rez|remote_data|http_re(sponse|quest)|path_update|transaction_result)\\b"}]},{className:"built_in",begin:"\\b(ll(AgentInExperience|(Create|DataSize|Delete|KeyCount|Keys|Read|Update)KeyValue|GetExperience(Details|ErrorMessage)|ReturnObjectsBy(ID|Owner)|Json(2List|[GS]etValue|ValueType)|Sin|Cos|Tan|Atan2|Sqrt|Pow|Abs|Fabs|Frand|Floor|Ceil|Round|Vec(Mag|Norm|Dist)|Rot(Between|2(Euler|Fwd|Left|Up))|(Euler|Axes)2Rot|Whisper|(Region|Owner)?Say|Shout|Listen(Control|Remove)?|Sensor(Repeat|Remove)?|Detected(Name|Key|Owner|Type|Pos|Vel|Grab|Rot|Group|LinkNumber)|Die|Ground|Wind|([GS]et)(AnimationOverride|MemoryLimit|PrimMediaParams|ParcelMusicURL|Object(Desc|Name)|PhysicsMaterial|Status|Scale|Color|Alpha|Texture|Pos|Rot|Force|Torque)|ResetAnimationOverride|(Scale|Offset|Rotate)Texture|(Rot)?Target(Remove)?|(Stop)?MoveToTarget|Apply(Rotational)?Impulse|Set(KeyframedMotion|ContentType|RegionPos|(Angular)?Velocity|Buoyancy|HoverHeight|ForceAndTorque|TimerEvent|ScriptState|Damage|TextureAnim|Sound(Queueing|Radius)|Vehicle(Type|(Float|Vector|Rotation)Param)|(Touch|Sit)?Text|Camera(Eye|At)Offset|PrimitiveParams|ClickAction|Link(Alpha|Color|PrimitiveParams(Fast)?|Texture(Anim)?|Camera|Media)|RemoteScriptAccessPin|PayPrice|LocalRot)|ScaleByFactor|Get((Max|Min)ScaleFactor|ClosestNavPoint|StaticPath|SimStats|Env|PrimitiveParams|Link(PrimitiveParams|Number(OfSides)?|Key|Name|Media)|HTTPHeader|FreeURLs|Object(Details|PermMask|PrimCount)|Parcel(MaxPrims|Details|Prim(Count|Owners))|Attached(List)?|(SPMax|Free|Used)Memory|Region(Name|TimeDilation|FPS|Corner|AgentCount)|Root(Position|Rotation)|UnixTime|(Parcel|Region)Flags|(Wall|GMT)clock|SimulatorHostname|BoundingBox|GeometricCenter|Creator|NumberOf(Prims|NotecardLines|Sides)|Animation(List)?|(Camera|Local)(Pos|Rot)|Vel|Accel|Omega|Time(stamp|OfDay)|(Object|CenterOf)?Mass|MassMKS|Energy|Owner|(Owner)?Key|SunDirection|Texture(Offset|Scale|Rot)|Inventory(Number|Name|Key|Type|Creator|PermMask)|Permissions(Key)?|StartParameter|List(Length|EntryType)|Date|Agent(Size|Info|Language|List)|LandOwnerAt|NotecardLine|Script(Name|State))|(Get|Reset|GetAndReset)Time|PlaySound(Slave)?|LoopSound(Master|Slave)?|(Trigger|Stop|Preload)Sound|((Get|Delete)Sub|Insert)String|To(Upper|Lower)|Give(InventoryList|Money)|RezObject|(Stop)?LookAt|Sleep|CollisionFilter|(Take|Release)Controls|DetachFromAvatar|AttachToAvatar(Temp)?|InstantMessage|(GetNext)?Email|StopHover|MinEventDelay|RotLookAt|String(Length|Trim)|(Start|Stop)Animation|TargetOmega|Request(Experience)?Permissions|(Create|Break)Link|BreakAllLinks|(Give|Remove)Inventory|Water|PassTouches|Request(Agent|Inventory)Data|TeleportAgent(Home|GlobalCoords)?|ModifyLand|CollisionSound|ResetScript|MessageLinked|PushObject|PassCollisions|AxisAngle2Rot|Rot2(Axis|Angle)|A(cos|sin)|AngleBetween|AllowInventoryDrop|SubStringIndex|List2(CSV|Integer|Json|Float|String|Key|Vector|Rot|List(Strided)?)|DeleteSubList|List(Statistics|Sort|Randomize|(Insert|Find|Replace)List)|EdgeOfWorld|AdjustSoundVolume|Key2Name|TriggerSoundLimited|EjectFromLand|(CSV|ParseString)2List|OverMyLand|SameGroup|UnSit|Ground(Slope|Normal|Contour)|GroundRepel|(Set|Remove)VehicleFlags|SitOnLink|(AvatarOn)?(Link)?SitTarget|Script(Danger|Profiler)|Dialog|VolumeDetect|ResetOtherScript|RemoteLoadScriptPin|(Open|Close)RemoteDataChannel|SendRemoteData|RemoteDataReply|(Integer|String)ToBase64|XorBase64|Log(10)?|Base64To(String|Integer)|ParseStringKeepNulls|RezAtRoot|RequestSimulatorData|ForceMouselook|(Load|Release|(E|Une)scape)URL|ParcelMedia(CommandList|Query)|ModPow|MapDestination|(RemoveFrom|AddTo|Reset)Land(Pass|Ban)List|(Set|Clear)CameraParams|HTTP(Request|Response)|TextBox|DetectedTouch(UV|Face|Pos|(N|Bin)ormal|ST)|(MD5|SHA1|DumpList2)String|Request(Secure)?URL|Clear(Prim|Link)Media|(Link)?ParticleSystem|(Get|Request)(Username|DisplayName)|RegionSayTo|CastRay|GenerateKey|TransferLindenDollars|ManageEstateAccess|(Create|Delete)Character|ExecCharacterCmd|Evade|FleeFrom|NavigateTo|PatrolPoints|Pursue|UpdateCharacter|WanderWithin))\\b"},{className:"literal",variants:[{begin:"\\b(PI|TWO_PI|PI_BY_TWO|DEG_TO_RAD|RAD_TO_DEG|SQRT2)\\b"},{begin:"\\b(XP_ERROR_(EXPERIENCES_DISABLED|EXPERIENCE_(DISABLED|SUSPENDED)|INVALID_(EXPERIENCE|PARAMETERS)|KEY_NOT_FOUND|MATURITY_EXCEEDED|NONE|NOT_(FOUND|PERMITTED(_LAND)?)|NO_EXPERIENCE|QUOTA_EXCEEDED|RETRY_UPDATE|STORAGE_EXCEPTION|STORE_DISABLED|THROTTLED|UNKNOWN_ERROR)|JSON_APPEND|STATUS_(PHYSICS|ROTATE_[XYZ]|PHANTOM|SANDBOX|BLOCK_GRAB(_OBJECT)?|(DIE|RETURN)_AT_EDGE|CAST_SHADOWS|OK|MALFORMED_PARAMS|TYPE_MISMATCH|BOUNDS_ERROR|NOT_(FOUND|SUPPORTED)|INTERNAL_ERROR|WHITELIST_FAILED)|AGENT(_(BY_(LEGACY_|USER)NAME|FLYING|ATTACHMENTS|SCRIPTED|MOUSELOOK|SITTING|ON_OBJECT|AWAY|WALKING|IN_AIR|TYPING|CROUCHING|BUSY|ALWAYS_RUN|AUTOPILOT|LIST_(PARCEL(_OWNER)?|REGION)))?|CAMERA_(PITCH|DISTANCE|BEHINDNESS_(ANGLE|LAG)|(FOCUS|POSITION)(_(THRESHOLD|LOCKED|LAG))?|FOCUS_OFFSET|ACTIVE)|ANIM_ON|LOOP|REVERSE|PING_PONG|SMOOTH|ROTATE|SCALE|ALL_SIDES|LINK_(ROOT|SET|ALL_(OTHERS|CHILDREN)|THIS)|ACTIVE|PASS(IVE|_(ALWAYS|IF_NOT_HANDLED|NEVER))|SCRIPTED|CONTROL_(FWD|BACK|(ROT_)?(LEFT|RIGHT)|UP|DOWN|(ML_)?LBUTTON)|PERMISSION_(RETURN_OBJECTS|DEBIT|OVERRIDE_ANIMATIONS|SILENT_ESTATE_MANAGEMENT|TAKE_CONTROLS|TRIGGER_ANIMATION|ATTACH|CHANGE_LINKS|(CONTROL|TRACK)_CAMERA|TELEPORT)|INVENTORY_(TEXTURE|SOUND|OBJECT|SCRIPT|LANDMARK|CLOTHING|NOTECARD|BODYPART|ANIMATION|GESTURE|ALL|NONE)|CHANGED_(INVENTORY|COLOR|SHAPE|SCALE|TEXTURE|LINK|ALLOWED_DROP|OWNER|REGION(_START)?|TELEPORT|MEDIA)|OBJECT_(CLICK_ACTION|HOVER_HEIGHT|LAST_OWNER_ID|(PHYSICS|SERVER|STREAMING)_COST|UNKNOWN_DETAIL|CHARACTER_TIME|PHANTOM|PHYSICS|TEMP_(ATTACHED|ON_REZ)|NAME|DESC|POS|PRIM_(COUNT|EQUIVALENCE)|RETURN_(PARCEL(_OWNER)?|REGION)|REZZER_KEY|ROO?T|VELOCITY|OMEGA|OWNER|GROUP(_TAG)?|CREATOR|ATTACHED_(POINT|SLOTS_AVAILABLE)|RENDER_WEIGHT|(BODY_SHAPE|PATHFINDING)_TYPE|(RUNNING|TOTAL)_SCRIPT_COUNT|TOTAL_INVENTORY_COUNT|SCRIPT_(MEMORY|TIME))|TYPE_(INTEGER|FLOAT|STRING|KEY|VECTOR|ROTATION|INVALID)|(DEBUG|PUBLIC)_CHANNEL|ATTACH_(AVATAR_CENTER|CHEST|HEAD|BACK|PELVIS|MOUTH|CHIN|NECK|NOSE|BELLY|[LR](SHOULDER|HAND|FOOT|EAR|EYE|[UL](ARM|LEG)|HIP)|(LEFT|RIGHT)_PEC|HUD_(CENTER_[12]|TOP_(RIGHT|CENTER|LEFT)|BOTTOM(_(RIGHT|LEFT))?)|[LR]HAND_RING1|TAIL_(BASE|TIP)|[LR]WING|FACE_(JAW|[LR]EAR|[LR]EYE|TOUNGE)|GROIN|HIND_[LR]FOOT)|LAND_(LEVEL|RAISE|LOWER|SMOOTH|NOISE|REVERT)|DATA_(ONLINE|NAME|BORN|SIM_(POS|STATUS|RATING)|PAYINFO)|PAYMENT_INFO_(ON_FILE|USED)|REMOTE_DATA_(CHANNEL|REQUEST|REPLY)|PSYS_(PART_(BF_(ZERO|ONE(_MINUS_(DEST_COLOR|SOURCE_(ALPHA|COLOR)))?|DEST_COLOR|SOURCE_(ALPHA|COLOR))|BLEND_FUNC_(DEST|SOURCE)|FLAGS|(START|END)_(COLOR|ALPHA|SCALE|GLOW)|MAX_AGE|(RIBBON|WIND|INTERP_(COLOR|SCALE)|BOUNCE|FOLLOW_(SRC|VELOCITY)|TARGET_(POS|LINEAR)|EMISSIVE)_MASK)|SRC_(MAX_AGE|PATTERN|ANGLE_(BEGIN|END)|BURST_(RATE|PART_COUNT|RADIUS|SPEED_(MIN|MAX))|ACCEL|TEXTURE|TARGET_KEY|OMEGA|PATTERN_(DROP|EXPLODE|ANGLE(_CONE(_EMPTY)?)?)))|VEHICLE_(REFERENCE_FRAME|TYPE_(NONE|SLED|CAR|BOAT|AIRPLANE|BALLOON)|(LINEAR|ANGULAR)_(FRICTION_TIMESCALE|MOTOR_DIRECTION)|LINEAR_MOTOR_OFFSET|HOVER_(HEIGHT|EFFICIENCY|TIMESCALE)|BUOYANCY|(LINEAR|ANGULAR)_(DEFLECTION_(EFFICIENCY|TIMESCALE)|MOTOR_(DECAY_)?TIMESCALE)|VERTICAL_ATTRACTION_(EFFICIENCY|TIMESCALE)|BANKING_(EFFICIENCY|MIX|TIMESCALE)|FLAG_(NO_DEFLECTION_UP|LIMIT_(ROLL_ONLY|MOTOR_UP)|HOVER_((WATER|TERRAIN|UP)_ONLY|GLOBAL_HEIGHT)|MOUSELOOK_(STEER|BANK)|CAMERA_DECOUPLED))|PRIM_(ALLOW_UNSIT|ALPHA_MODE(_(BLEND|EMISSIVE|MASK|NONE))?|NORMAL|SPECULAR|TYPE(_(BOX|CYLINDER|PRISM|SPHERE|TORUS|TUBE|RING|SCULPT))?|HOLE_(DEFAULT|CIRCLE|SQUARE|TRIANGLE)|MATERIAL(_(STONE|METAL|GLASS|WOOD|FLESH|PLASTIC|RUBBER))?|SHINY_(NONE|LOW|MEDIUM|HIGH)|BUMP_(NONE|BRIGHT|DARK|WOOD|BARK|BRICKS|CHECKER|CONCRETE|TILE|STONE|DISKS|GRAVEL|BLOBS|SIDING|LARGETILE|STUCCO|SUCTION|WEAVE)|TEXGEN_(DEFAULT|PLANAR)|SCRIPTED_SIT_ONLY|SCULPT_(TYPE_(SPHERE|TORUS|PLANE|CYLINDER|MASK)|FLAG_(MIRROR|INVERT))|PHYSICS(_(SHAPE_(CONVEX|NONE|PRIM|TYPE)))?|(POS|ROT)_LOCAL|SLICE|TEXT|FLEXIBLE|POINT_LIGHT|TEMP_ON_REZ|PHANTOM|POSITION|SIT_TARGET|SIZE|ROTATION|TEXTURE|NAME|OMEGA|DESC|LINK_TARGET|COLOR|BUMP_SHINY|FULLBRIGHT|TEXGEN|GLOW|MEDIA_(ALT_IMAGE_ENABLE|CONTROLS|(CURRENT|HOME)_URL|AUTO_(LOOP|PLAY|SCALE|ZOOM)|FIRST_CLICK_INTERACT|(WIDTH|HEIGHT)_PIXELS|WHITELIST(_ENABLE)?|PERMS_(INTERACT|CONTROL)|PARAM_MAX|CONTROLS_(STANDARD|MINI)|PERM_(NONE|OWNER|GROUP|ANYONE)|MAX_(URL_LENGTH|WHITELIST_(SIZE|COUNT)|(WIDTH|HEIGHT)_PIXELS)))|MASK_(BASE|OWNER|GROUP|EVERYONE|NEXT)|PERM_(TRANSFER|MODIFY|COPY|MOVE|ALL)|PARCEL_(MEDIA_COMMAND_(STOP|PAUSE|PLAY|LOOP|TEXTURE|URL|TIME|AGENT|UNLOAD|AUTO_ALIGN|TYPE|SIZE|DESC|LOOP_SET)|FLAG_(ALLOW_(FLY|(GROUP_)?SCRIPTS|LANDMARK|TERRAFORM|DAMAGE|CREATE_(GROUP_)?OBJECTS)|USE_(ACCESS_(GROUP|LIST)|BAN_LIST|LAND_PASS_LIST)|LOCAL_SOUND_ONLY|RESTRICT_PUSHOBJECT|ALLOW_(GROUP|ALL)_OBJECT_ENTRY)|COUNT_(TOTAL|OWNER|GROUP|OTHER|SELECTED|TEMP)|DETAILS_(NAME|DESC|OWNER|GROUP|AREA|ID|SEE_AVATARS))|LIST_STAT_(MAX|MIN|MEAN|MEDIAN|STD_DEV|SUM(_SQUARES)?|NUM_COUNT|GEOMETRIC_MEAN|RANGE)|PAY_(HIDE|DEFAULT)|REGION_FLAG_(ALLOW_DAMAGE|FIXED_SUN|BLOCK_TERRAFORM|SANDBOX|DISABLE_(COLLISIONS|PHYSICS)|BLOCK_FLY|ALLOW_DIRECT_TELEPORT|RESTRICT_PUSHOBJECT)|HTTP_(METHOD|MIMETYPE|BODY_(MAXLENGTH|TRUNCATED)|CUSTOM_HEADER|PRAGMA_NO_CACHE|VERBOSE_THROTTLE|VERIFY_CERT)|SIT_(INVALID_(AGENT|LINK_OBJECT)|NO(T_EXPERIENCE|_(ACCESS|EXPERIENCE_PERMISSION|SIT_TARGET)))|STRING_(TRIM(_(HEAD|TAIL))?)|CLICK_ACTION_(NONE|TOUCH|SIT|BUY|PAY|OPEN(_MEDIA)?|PLAY|ZOOM)|TOUCH_INVALID_FACE|PROFILE_(NONE|SCRIPT_MEMORY)|RC_(DATA_FLAGS|DETECT_PHANTOM|GET_(LINK_NUM|NORMAL|ROOT_KEY)|MAX_HITS|REJECT_(TYPES|AGENTS|(NON)?PHYSICAL|LAND))|RCERR_(CAST_TIME_EXCEEDED|SIM_PERF_LOW|UNKNOWN)|ESTATE_ACCESS_(ALLOWED_(AGENT|GROUP)_(ADD|REMOVE)|BANNED_AGENT_(ADD|REMOVE))|DENSITY|FRICTION|RESTITUTION|GRAVITY_MULTIPLIER|KFM_(COMMAND|CMD_(PLAY|STOP|PAUSE)|MODE|FORWARD|LOOP|PING_PONG|REVERSE|DATA|ROTATION|TRANSLATION)|ERR_(GENERIC|PARCEL_PERMISSIONS|MALFORMED_PARAMS|RUNTIME_PERMISSIONS|THROTTLED)|CHARACTER_(CMD_((SMOOTH_)?STOP|JUMP)|DESIRED_(TURN_)?SPEED|RADIUS|STAY_WITHIN_PARCEL|LENGTH|ORIENTATION|ACCOUNT_FOR_SKIPPED_FRAMES|AVOIDANCE_MODE|TYPE(_([ABCD]|NONE))?|MAX_(DECEL|TURN_RADIUS|(ACCEL|SPEED)))|PURSUIT_(OFFSET|FUZZ_FACTOR|GOAL_TOLERANCE|INTERCEPT)|REQUIRE_LINE_OF_SIGHT|FORCE_DIRECT_PATH|VERTICAL|HORIZONTAL|AVOID_(CHARACTERS|DYNAMIC_OBSTACLES|NONE)|PU_(EVADE_(HIDDEN|SPOTTED)|FAILURE_(DYNAMIC_PATHFINDING_DISABLED|INVALID_(GOAL|START)|NO_(NAVMESH|VALID_DESTINATION)|OTHER|TARGET_GONE|(PARCEL_)?UNREACHABLE)|(GOAL|SLOWDOWN_DISTANCE)_REACHED)|TRAVERSAL_TYPE(_(FAST|NONE|SLOW))?|CONTENT_TYPE_(ATOM|FORM|HTML|JSON|LLSD|RSS|TEXT|XHTML|XML)|GCNP_(RADIUS|STATIC)|(PATROL|WANDER)_PAUSE_AT_WAYPOINTS|OPT_(AVATAR|CHARACTER|EXCLUSION_VOLUME|LEGACY_LINKSET|MATERIAL_VOLUME|OTHER|STATIC_OBSTACLE|WALKABLE)|SIM_STAT_PCT_CHARS_STEPPED)\\b"},{begin:"\\b(FALSE|TRUE)\\b"},{begin:"\\b(ZERO_ROTATION)\\b"},{begin:"\\b(EOF|JSON_(ARRAY|DELETE|FALSE|INVALID|NULL|NUMBER|OBJECT|STRING|TRUE)|NULL_KEY|TEXTURE_(BLANK|DEFAULT|MEDIA|PLYWOOD|TRANSPARENT)|URL_REQUEST_(GRANTED|DENIED))\\b"},{begin:"\\b(ZERO_VECTOR|TOUCH_INVALID_(TEXCOORD|VECTOR))\\b"}]},{className:"type",begin:"\\b(integer|float|string|key|vector|quaternion|rotation|list)\\b"}]}}},function(e,t){e.exports=function(e){const t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},i=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{name:"Lua",keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:i.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:i}].concat(i)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}},function(e,t){e.exports=function(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},r={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t]},i={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},o={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,n,r,i,{className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},o]}}},function(e,t){const n=["AASTriangle","AbelianGroup","Abort","AbortKernels","AbortProtect","AbortScheduledTask","Above","Abs","AbsArg","AbsArgPlot","Absolute","AbsoluteCorrelation","AbsoluteCorrelationFunction","AbsoluteCurrentValue","AbsoluteDashing","AbsoluteFileName","AbsoluteOptions","AbsolutePointSize","AbsoluteThickness","AbsoluteTime","AbsoluteTiming","AcceptanceThreshold","AccountingForm","Accumulate","Accuracy","AccuracyGoal","ActionDelay","ActionMenu","ActionMenuBox","ActionMenuBoxOptions","Activate","Active","ActiveClassification","ActiveClassificationObject","ActiveItem","ActivePrediction","ActivePredictionObject","ActiveStyle","AcyclicGraphQ","AddOnHelpPath","AddSides","AddTo","AddToSearchIndex","AddUsers","AdjacencyGraph","AdjacencyList","AdjacencyMatrix","AdjacentMeshCells","AdjustmentBox","AdjustmentBoxOptions","AdjustTimeSeriesForecast","AdministrativeDivisionData","AffineHalfSpace","AffineSpace","AffineStateSpaceModel","AffineTransform","After","AggregatedEntityClass","AggregationLayer","AircraftData","AirportData","AirPressureData","AirTemperatureData","AiryAi","AiryAiPrime","AiryAiZero","AiryBi","AiryBiPrime","AiryBiZero","AlgebraicIntegerQ","AlgebraicNumber","AlgebraicNumberDenominator","AlgebraicNumberNorm","AlgebraicNumberPolynomial","AlgebraicNumberTrace","AlgebraicRules","AlgebraicRulesData","Algebraics","AlgebraicUnitQ","Alignment","AlignmentMarker","AlignmentPoint","All","AllowAdultContent","AllowedCloudExtraParameters","AllowedCloudParameterExtensions","AllowedDimensions","AllowedFrequencyRange","AllowedHeads","AllowGroupClose","AllowIncomplete","AllowInlineCells","AllowKernelInitialization","AllowLooseGrammar","AllowReverseGroupClose","AllowScriptLevelChange","AllowVersionUpdate","AllTrue","Alphabet","AlphabeticOrder","AlphabeticSort","AlphaChannel","AlternateImage","AlternatingFactorial","AlternatingGroup","AlternativeHypothesis","Alternatives","AltitudeMethod","AmbientLight","AmbiguityFunction","AmbiguityList","Analytic","AnatomyData","AnatomyForm","AnatomyPlot3D","AnatomySkinStyle","AnatomyStyling","AnchoredSearch","And","AndersonDarlingTest","AngerJ","AngleBisector","AngleBracket","AnglePath","AnglePath3D","AngleVector","AngularGauge","Animate","AnimationCycleOffset","AnimationCycleRepetitions","AnimationDirection","AnimationDisplayTime","AnimationRate","AnimationRepetitions","AnimationRunning","AnimationRunTime","AnimationTimeIndex","Animator","AnimatorBox","AnimatorBoxOptions","AnimatorElements","Annotate","Annotation","AnnotationDelete","AnnotationKeys","AnnotationRules","AnnotationValue","Annuity","AnnuityDue","Annulus","AnomalyDetection","AnomalyDetector","AnomalyDetectorFunction","Anonymous","Antialiasing","AntihermitianMatrixQ","Antisymmetric","AntisymmetricMatrixQ","Antonyms","AnyOrder","AnySubset","AnyTrue","Apart","ApartSquareFree","APIFunction","Appearance","AppearanceElements","AppearanceRules","AppellF1","Append","AppendCheck","AppendLayer","AppendTo","Apply","ApplySides","ArcCos","ArcCosh","ArcCot","ArcCoth","ArcCsc","ArcCsch","ArcCurvature","ARCHProcess","ArcLength","ArcSec","ArcSech","ArcSin","ArcSinDistribution","ArcSinh","ArcTan","ArcTanh","Area","Arg","ArgMax","ArgMin","ArgumentCountQ","ARIMAProcess","ArithmeticGeometricMean","ARMAProcess","Around","AroundReplace","ARProcess","Array","ArrayComponents","ArrayDepth","ArrayFilter","ArrayFlatten","ArrayMesh","ArrayPad","ArrayPlot","ArrayQ","ArrayResample","ArrayReshape","ArrayRules","Arrays","Arrow","Arrow3DBox","ArrowBox","Arrowheads","ASATriangle","Ask","AskAppend","AskConfirm","AskDisplay","AskedQ","AskedValue","AskFunction","AskState","AskTemplateDisplay","AspectRatio","AspectRatioFixed","Assert","AssociateTo","Association","AssociationFormat","AssociationMap","AssociationQ","AssociationThread","AssumeDeterministic","Assuming","Assumptions","AstronomicalData","Asymptotic","AsymptoticDSolveValue","AsymptoticEqual","AsymptoticEquivalent","AsymptoticGreater","AsymptoticGreaterEqual","AsymptoticIntegrate","AsymptoticLess","AsymptoticLessEqual","AsymptoticOutputTracker","AsymptoticProduct","AsymptoticRSolveValue","AsymptoticSolve","AsymptoticSum","Asynchronous","AsynchronousTaskObject","AsynchronousTasks","Atom","AtomCoordinates","AtomCount","AtomDiagramCoordinates","AtomList","AtomQ","AttentionLayer","Attributes","Audio","AudioAmplify","AudioAnnotate","AudioAnnotationLookup","AudioBlockMap","AudioCapture","AudioChannelAssignment","AudioChannelCombine","AudioChannelMix","AudioChannels","AudioChannelSeparate","AudioData","AudioDelay","AudioDelete","AudioDevice","AudioDistance","AudioEncoding","AudioFade","AudioFrequencyShift","AudioGenerator","AudioIdentify","AudioInputDevice","AudioInsert","AudioInstanceQ","AudioIntervals","AudioJoin","AudioLabel","AudioLength","AudioLocalMeasurements","AudioLooping","AudioLoudness","AudioMeasurements","AudioNormalize","AudioOutputDevice","AudioOverlay","AudioPad","AudioPan","AudioPartition","AudioPause","AudioPitchShift","AudioPlay","AudioPlot","AudioQ","AudioRecord","AudioReplace","AudioResample","AudioReverb","AudioReverse","AudioSampleRate","AudioSpectralMap","AudioSpectralTransformation","AudioSplit","AudioStop","AudioStream","AudioStreams","AudioTimeStretch","AudioTracks","AudioTrim","AudioType","AugmentedPolyhedron","AugmentedSymmetricPolynomial","Authenticate","Authentication","AuthenticationDialog","AutoAction","Autocomplete","AutocompletionFunction","AutoCopy","AutocorrelationTest","AutoDelete","AutoEvaluateEvents","AutoGeneratedPackage","AutoIndent","AutoIndentSpacings","AutoItalicWords","AutoloadPath","AutoMatch","Automatic","AutomaticImageSize","AutoMultiplicationSymbol","AutoNumberFormatting","AutoOpenNotebooks","AutoOpenPalettes","AutoQuoteCharacters","AutoRefreshed","AutoRemove","AutorunSequencing","AutoScaling","AutoScroll","AutoSpacing","AutoStyleOptions","AutoStyleWords","AutoSubmitting","Axes","AxesEdge","AxesLabel","AxesOrigin","AxesStyle","AxiomaticTheory","Axis","BabyMonsterGroupB","Back","Background","BackgroundAppearance","BackgroundTasksSettings","Backslash","Backsubstitution","Backward","Ball","Band","BandpassFilter","BandstopFilter","BarabasiAlbertGraphDistribution","BarChart","BarChart3D","BarcodeImage","BarcodeRecognize","BaringhausHenzeTest","BarLegend","BarlowProschanImportance","BarnesG","BarOrigin","BarSpacing","BartlettHannWindow","BartlettWindow","BaseDecode","BaseEncode","BaseForm","Baseline","BaselinePosition","BaseStyle","BasicRecurrentLayer","BatchNormalizationLayer","BatchSize","BatesDistribution","BattleLemarieWavelet","BayesianMaximization","BayesianMaximizationObject","BayesianMinimization","BayesianMinimizationObject","Because","BeckmannDistribution","Beep","Before","Begin","BeginDialogPacket","BeginFrontEndInteractionPacket","BeginPackage","BellB","BellY","Below","BenfordDistribution","BeniniDistribution","BenktanderGibratDistribution","BenktanderWeibullDistribution","BernoulliB","BernoulliDistribution","BernoulliGraphDistribution","BernoulliProcess","BernsteinBasis","BesselFilterModel","BesselI","BesselJ","BesselJZero","BesselK","BesselY","BesselYZero","Beta","BetaBinomialDistribution","BetaDistribution","BetaNegativeBinomialDistribution","BetaPrimeDistribution","BetaRegularized","Between","BetweennessCentrality","BeveledPolyhedron","BezierCurve","BezierCurve3DBox","BezierCurve3DBoxOptions","BezierCurveBox","BezierCurveBoxOptions","BezierFunction","BilateralFilter","Binarize","BinaryDeserialize","BinaryDistance","BinaryFormat","BinaryImageQ","BinaryRead","BinaryReadList","BinarySerialize","BinaryWrite","BinCounts","BinLists","Binomial","BinomialDistribution","BinomialProcess","BinormalDistribution","BiorthogonalSplineWavelet","BipartiteGraphQ","BiquadraticFilterModel","BirnbaumImportance","BirnbaumSaundersDistribution","BitAnd","BitClear","BitGet","BitLength","BitNot","BitOr","BitSet","BitShiftLeft","BitShiftRight","BitXor","BiweightLocation","BiweightMidvariance","Black","BlackmanHarrisWindow","BlackmanNuttallWindow","BlackmanWindow","Blank","BlankForm","BlankNullSequence","BlankSequence","Blend","Block","BlockchainAddressData","BlockchainBase","BlockchainBlockData","BlockchainContractValue","BlockchainData","BlockchainGet","BlockchainKeyEncode","BlockchainPut","BlockchainTokenData","BlockchainTransaction","BlockchainTransactionData","BlockchainTransactionSign","BlockchainTransactionSubmit","BlockMap","BlockRandom","BlomqvistBeta","BlomqvistBetaTest","Blue","Blur","BodePlot","BohmanWindow","Bold","Bond","BondCount","BondList","BondQ","Bookmarks","Boole","BooleanConsecutiveFunction","BooleanConvert","BooleanCountingFunction","BooleanFunction","BooleanGraph","BooleanMaxterms","BooleanMinimize","BooleanMinterms","BooleanQ","BooleanRegion","Booleans","BooleanStrings","BooleanTable","BooleanVariables","BorderDimensions","BorelTannerDistribution","Bottom","BottomHatTransform","BoundaryDiscretizeGraphics","BoundaryDiscretizeRegion","BoundaryMesh","BoundaryMeshRegion","BoundaryMeshRegionQ","BoundaryStyle","BoundedRegionQ","BoundingRegion","Bounds","Box","BoxBaselineShift","BoxData","BoxDimensions","Boxed","Boxes","BoxForm","BoxFormFormatTypes","BoxFrame","BoxID","BoxMargins","BoxMatrix","BoxObject","BoxRatios","BoxRotation","BoxRotationPoint","BoxStyle","BoxWhiskerChart","Bra","BracketingBar","BraKet","BrayCurtisDistance","BreadthFirstScan","Break","BridgeData","BrightnessEqualize","BroadcastStationData","Brown","BrownForsytheTest","BrownianBridgeProcess","BrowserCategory","BSplineBasis","BSplineCurve","BSplineCurve3DBox","BSplineCurve3DBoxOptions","BSplineCurveBox","BSplineCurveBoxOptions","BSplineFunction","BSplineSurface","BSplineSurface3DBox","BSplineSurface3DBoxOptions","BubbleChart","BubbleChart3D","BubbleScale","BubbleSizes","BuildingData","BulletGauge","BusinessDayQ","ButterflyGraph","ButterworthFilterModel","Button","ButtonBar","ButtonBox","ButtonBoxOptions","ButtonCell","ButtonContents","ButtonData","ButtonEvaluator","ButtonExpandable","ButtonFrame","ButtonFunction","ButtonMargins","ButtonMinHeight","ButtonNote","ButtonNotebook","ButtonSource","ButtonStyle","ButtonStyleMenuListing","Byte","ByteArray","ByteArrayFormat","ByteArrayQ","ByteArrayToString","ByteCount","ByteOrdering","C","CachedValue","CacheGraphics","CachePersistence","CalendarConvert","CalendarData","CalendarType","Callout","CalloutMarker","CalloutStyle","CallPacket","CanberraDistance","Cancel","CancelButton","CandlestickChart","CanonicalGraph","CanonicalizePolygon","CanonicalizePolyhedron","CanonicalName","CanonicalWarpingCorrespondence","CanonicalWarpingDistance","CantorMesh","CantorStaircase","Cap","CapForm","CapitalDifferentialD","Capitalize","CapsuleShape","CaptureRunning","CardinalBSplineBasis","CarlemanLinearize","CarmichaelLambda","CaseOrdering","Cases","CaseSensitive","Cashflow","Casoratian","Catalan","CatalanNumber","Catch","CategoricalDistribution","Catenate","CatenateLayer","CauchyDistribution","CauchyWindow","CayleyGraph","CDF","CDFDeploy","CDFInformation","CDFWavelet","Ceiling","CelestialSystem","Cell","CellAutoOverwrite","CellBaseline","CellBoundingBox","CellBracketOptions","CellChangeTimes","CellContents","CellContext","CellDingbat","CellDynamicExpression","CellEditDuplicate","CellElementsBoundingBox","CellElementSpacings","CellEpilog","CellEvaluationDuplicate","CellEvaluationFunction","CellEvaluationLanguage","CellEventActions","CellFrame","CellFrameColor","CellFrameLabelMargins","CellFrameLabels","CellFrameMargins","CellGroup","CellGroupData","CellGrouping","CellGroupingRules","CellHorizontalScrolling","CellID","CellLabel","CellLabelAutoDelete","CellLabelMargins","CellLabelPositioning","CellLabelStyle","CellLabelTemplate","CellMargins","CellObject","CellOpen","CellPrint","CellProlog","Cells","CellSize","CellStyle","CellTags","CellularAutomaton","CensoredDistribution","Censoring","Center","CenterArray","CenterDot","CentralFeature","CentralMoment","CentralMomentGeneratingFunction","Cepstrogram","CepstrogramArray","CepstrumArray","CForm","ChampernowneNumber","ChangeOptions","ChannelBase","ChannelBrokerAction","ChannelDatabin","ChannelHistoryLength","ChannelListen","ChannelListener","ChannelListeners","ChannelListenerWait","ChannelObject","ChannelPreSendFunction","ChannelReceiverFunction","ChannelSend","ChannelSubscribers","ChanVeseBinarize","Character","CharacterCounts","CharacterEncoding","CharacterEncodingsPath","CharacteristicFunction","CharacteristicPolynomial","CharacterName","CharacterNormalize","CharacterRange","Characters","ChartBaseStyle","ChartElementData","ChartElementDataFunction","ChartElementFunction","ChartElements","ChartLabels","ChartLayout","ChartLegends","ChartStyle","Chebyshev1FilterModel","Chebyshev2FilterModel","ChebyshevDistance","ChebyshevT","ChebyshevU","Check","CheckAbort","CheckAll","Checkbox","CheckboxBar","CheckboxBox","CheckboxBoxOptions","ChemicalData","ChessboardDistance","ChiDistribution","ChineseRemainder","ChiSquareDistribution","ChoiceButtons","ChoiceDialog","CholeskyDecomposition","Chop","ChromaticityPlot","ChromaticityPlot3D","ChromaticPolynomial","Circle","CircleBox","CircleDot","CircleMinus","CirclePlus","CirclePoints","CircleThrough","CircleTimes","CirculantGraph","CircularOrthogonalMatrixDistribution","CircularQuaternionMatrixDistribution","CircularRealMatrixDistribution","CircularSymplecticMatrixDistribution","CircularUnitaryMatrixDistribution","Circumsphere","CityData","ClassifierFunction","ClassifierInformation","ClassifierMeasurements","ClassifierMeasurementsObject","Classify","ClassPriors","Clear","ClearAll","ClearAttributes","ClearCookies","ClearPermissions","ClearSystemCache","ClebschGordan","ClickPane","Clip","ClipboardNotebook","ClipFill","ClippingStyle","ClipPlanes","ClipPlanesStyle","ClipRange","Clock","ClockGauge","ClockwiseContourIntegral","Close","Closed","CloseKernels","ClosenessCentrality","Closing","ClosingAutoSave","ClosingEvent","ClosingSaveDialog","CloudAccountData","CloudBase","CloudConnect","CloudConnections","CloudDeploy","CloudDirectory","CloudDisconnect","CloudEvaluate","CloudExport","CloudExpression","CloudExpressions","CloudFunction","CloudGet","CloudImport","CloudLoggingData","CloudObject","CloudObjectInformation","CloudObjectInformationData","CloudObjectNameFormat","CloudObjects","CloudObjectURLType","CloudPublish","CloudPut","CloudRenderingMethod","CloudSave","CloudShare","CloudSubmit","CloudSymbol","CloudUnshare","CloudUserID","ClusterClassify","ClusterDissimilarityFunction","ClusteringComponents","ClusteringTree","CMYKColor","Coarse","CodeAssistOptions","Coefficient","CoefficientArrays","CoefficientDomain","CoefficientList","CoefficientRules","CoifletWavelet","Collect","Colon","ColonForm","ColorBalance","ColorCombine","ColorConvert","ColorCoverage","ColorData","ColorDataFunction","ColorDetect","ColorDistance","ColorFunction","ColorFunctionScaling","Colorize","ColorNegate","ColorOutput","ColorProfileData","ColorQ","ColorQuantize","ColorReplace","ColorRules","ColorSelectorSettings","ColorSeparate","ColorSetter","ColorSetterBox","ColorSetterBoxOptions","ColorSlider","ColorsNear","ColorSpace","ColorToneMapping","Column","ColumnAlignments","ColumnBackgrounds","ColumnForm","ColumnLines","ColumnsEqual","ColumnSpacings","ColumnWidths","CombinedEntityClass","CombinerFunction","CometData","CommonDefaultFormatTypes","Commonest","CommonestFilter","CommonName","CommonUnits","CommunityBoundaryStyle","CommunityGraphPlot","CommunityLabels","CommunityRegionStyle","CompanyData","CompatibleUnitQ","CompilationOptions","CompilationTarget","Compile","Compiled","CompiledCodeFunction","CompiledFunction","CompilerOptions","Complement","ComplementedEntityClass","CompleteGraph","CompleteGraphQ","CompleteKaryTree","CompletionsListPacket","Complex","ComplexContourPlot","Complexes","ComplexExpand","ComplexInfinity","ComplexityFunction","ComplexListPlot","ComplexPlot","ComplexPlot3D","ComplexRegionPlot","ComplexStreamPlot","ComplexVectorPlot","ComponentMeasurements","ComponentwiseContextMenu","Compose","ComposeList","ComposeSeries","CompositeQ","Composition","CompoundElement","CompoundExpression","CompoundPoissonDistribution","CompoundPoissonProcess","CompoundRenewalProcess","Compress","CompressedData","CompressionLevel","ComputeUncertainty","Condition","ConditionalExpression","Conditioned","Cone","ConeBox","ConfidenceLevel","ConfidenceRange","ConfidenceTransform","ConfigurationPath","ConformAudio","ConformImages","Congruent","ConicHullRegion","ConicHullRegion3DBox","ConicHullRegionBox","ConicOptimization","Conjugate","ConjugateTranspose","Conjunction","Connect","ConnectedComponents","ConnectedGraphComponents","ConnectedGraphQ","ConnectedMeshComponents","ConnectedMoleculeComponents","ConnectedMoleculeQ","ConnectionSettings","ConnectLibraryCallbackFunction","ConnectSystemModelComponents","ConnesWindow","ConoverTest","ConsoleMessage","ConsoleMessagePacket","Constant","ConstantArray","ConstantArrayLayer","ConstantImage","ConstantPlusLayer","ConstantRegionQ","Constants","ConstantTimesLayer","ConstellationData","ConstrainedMax","ConstrainedMin","Construct","Containing","ContainsAll","ContainsAny","ContainsExactly","ContainsNone","ContainsOnly","ContentFieldOptions","ContentLocationFunction","ContentObject","ContentPadding","ContentsBoundingBox","ContentSelectable","ContentSize","Context","ContextMenu","Contexts","ContextToFileName","Continuation","Continue","ContinuedFraction","ContinuedFractionK","ContinuousAction","ContinuousMarkovProcess","ContinuousTask","ContinuousTimeModelQ","ContinuousWaveletData","ContinuousWaveletTransform","ContourDetect","ContourGraphics","ContourIntegral","ContourLabels","ContourLines","ContourPlot","ContourPlot3D","Contours","ContourShading","ContourSmoothing","ContourStyle","ContraharmonicMean","ContrastiveLossLayer","Control","ControlActive","ControlAlignment","ControlGroupContentsBox","ControllabilityGramian","ControllabilityMatrix","ControllableDecomposition","ControllableModelQ","ControllerDuration","ControllerInformation","ControllerInformationData","ControllerLinking","ControllerManipulate","ControllerMethod","ControllerPath","ControllerState","ControlPlacement","ControlsRendering","ControlType","Convergents","ConversionOptions","ConversionRules","ConvertToBitmapPacket","ConvertToPostScript","ConvertToPostScriptPacket","ConvexHullMesh","ConvexPolygonQ","ConvexPolyhedronQ","ConvolutionLayer","Convolve","ConwayGroupCo1","ConwayGroupCo2","ConwayGroupCo3","CookieFunction","Cookies","CoordinateBoundingBox","CoordinateBoundingBoxArray","CoordinateBounds","CoordinateBoundsArray","CoordinateChartData","CoordinatesToolOptions","CoordinateTransform","CoordinateTransformData","CoprimeQ","Coproduct","CopulaDistribution","Copyable","CopyDatabin","CopyDirectory","CopyFile","CopyTag","CopyToClipboard","CornerFilter","CornerNeighbors","Correlation","CorrelationDistance","CorrelationFunction","CorrelationTest","Cos","Cosh","CoshIntegral","CosineDistance","CosineWindow","CosIntegral","Cot","Coth","Count","CountDistinct","CountDistinctBy","CounterAssignments","CounterBox","CounterBoxOptions","CounterClockwiseContourIntegral","CounterEvaluator","CounterFunction","CounterIncrements","CounterStyle","CounterStyleMenuListing","CountRoots","CountryData","Counts","CountsBy","Covariance","CovarianceEstimatorFunction","CovarianceFunction","CoxianDistribution","CoxIngersollRossProcess","CoxModel","CoxModelFit","CramerVonMisesTest","CreateArchive","CreateCellID","CreateChannel","CreateCloudExpression","CreateDatabin","CreateDataStructure","CreateDataSystemModel","CreateDialog","CreateDirectory","CreateDocument","CreateFile","CreateIntermediateDirectories","CreateManagedLibraryExpression","CreateNotebook","CreatePacletArchive","CreatePalette","CreatePalettePacket","CreatePermissionsGroup","CreateScheduledTask","CreateSearchIndex","CreateSystemModel","CreateTemporary","CreateUUID","CreateWindow","CriterionFunction","CriticalityFailureImportance","CriticalitySuccessImportance","CriticalSection","Cross","CrossEntropyLossLayer","CrossingCount","CrossingDetect","CrossingPolygon","CrossMatrix","Csc","Csch","CTCLossLayer","Cube","CubeRoot","Cubics","Cuboid","CuboidBox","Cumulant","CumulantGeneratingFunction","Cup","CupCap","Curl","CurlyDoubleQuote","CurlyQuote","CurrencyConvert","CurrentDate","CurrentImage","CurrentlySpeakingPacket","CurrentNotebookImage","CurrentScreenImage","CurrentValue","Curry","CurryApplied","CurvatureFlowFilter","CurveClosed","Cyan","CycleGraph","CycleIndexPolynomial","Cycles","CyclicGroup","Cyclotomic","Cylinder","CylinderBox","CylindricalDecomposition","D","DagumDistribution","DamData","DamerauLevenshteinDistance","DampingFactor","Darker","Dashed","Dashing","DatabaseConnect","DatabaseDisconnect","DatabaseReference","Databin","DatabinAdd","DatabinRemove","Databins","DatabinUpload","DataCompression","DataDistribution","DataRange","DataReversed","Dataset","DatasetDisplayPanel","DataStructure","DataStructureQ","Date","DateBounds","Dated","DateDelimiters","DateDifference","DatedUnit","DateFormat","DateFunction","DateHistogram","DateInterval","DateList","DateListLogPlot","DateListPlot","DateListStepPlot","DateObject","DateObjectQ","DateOverlapsQ","DatePattern","DatePlus","DateRange","DateReduction","DateString","DateTicksFormat","DateValue","DateWithinQ","DaubechiesWavelet","DavisDistribution","DawsonF","DayCount","DayCountConvention","DayHemisphere","DaylightQ","DayMatchQ","DayName","DayNightTerminator","DayPlus","DayRange","DayRound","DeBruijnGraph","DeBruijnSequence","Debug","DebugTag","Decapitalize","Decimal","DecimalForm","DeclareKnownSymbols","DeclarePackage","Decompose","DeconvolutionLayer","Decrement","Decrypt","DecryptFile","DedekindEta","DeepSpaceProbeData","Default","DefaultAxesStyle","DefaultBaseStyle","DefaultBoxStyle","DefaultButton","DefaultColor","DefaultControlPlacement","DefaultDuplicateCellStyle","DefaultDuration","DefaultElement","DefaultFaceGridsStyle","DefaultFieldHintStyle","DefaultFont","DefaultFontProperties","DefaultFormatType","DefaultFormatTypeForStyle","DefaultFrameStyle","DefaultFrameTicksStyle","DefaultGridLinesStyle","DefaultInlineFormatType","DefaultInputFormatType","DefaultLabelStyle","DefaultMenuStyle","DefaultNaturalLanguage","DefaultNewCellStyle","DefaultNewInlineCellStyle","DefaultNotebook","DefaultOptions","DefaultOutputFormatType","DefaultPrintPrecision","DefaultStyle","DefaultStyleDefinitions","DefaultTextFormatType","DefaultTextInlineFormatType","DefaultTicksStyle","DefaultTooltipStyle","DefaultValue","DefaultValues","Defer","DefineExternal","DefineInputStreamMethod","DefineOutputStreamMethod","DefineResourceFunction","Definition","Degree","DegreeCentrality","DegreeGraphDistribution","DegreeLexicographic","DegreeReverseLexicographic","DEigensystem","DEigenvalues","Deinitialization","Del","DelaunayMesh","Delayed","Deletable","Delete","DeleteAnomalies","DeleteBorderComponents","DeleteCases","DeleteChannel","DeleteCloudExpression","DeleteContents","DeleteDirectory","DeleteDuplicates","DeleteDuplicatesBy","DeleteFile","DeleteMissing","DeleteObject","DeletePermissionsKey","DeleteSearchIndex","DeleteSmallComponents","DeleteStopwords","DeleteWithContents","DeletionWarning","DelimitedArray","DelimitedSequence","Delimiter","DelimiterFlashTime","DelimiterMatching","Delimiters","DeliveryFunction","Dendrogram","Denominator","DensityGraphics","DensityHistogram","DensityPlot","DensityPlot3D","DependentVariables","Deploy","Deployed","Depth","DepthFirstScan","Derivative","DerivativeFilter","DerivedKey","DescriptorStateSpace","DesignMatrix","DestroyAfterEvaluation","Det","DeviceClose","DeviceConfigure","DeviceExecute","DeviceExecuteAsynchronous","DeviceObject","DeviceOpen","DeviceOpenQ","DeviceRead","DeviceReadBuffer","DeviceReadLatest","DeviceReadList","DeviceReadTimeSeries","Devices","DeviceStreams","DeviceWrite","DeviceWriteBuffer","DGaussianWavelet","DiacriticalPositioning","Diagonal","DiagonalizableMatrixQ","DiagonalMatrix","DiagonalMatrixQ","Dialog","DialogIndent","DialogInput","DialogLevel","DialogNotebook","DialogProlog","DialogReturn","DialogSymbols","Diamond","DiamondMatrix","DiceDissimilarity","DictionaryLookup","DictionaryWordQ","DifferenceDelta","DifferenceOrder","DifferenceQuotient","DifferenceRoot","DifferenceRootReduce","Differences","DifferentialD","DifferentialRoot","DifferentialRootReduce","DifferentiatorFilter","DigitalSignature","DigitBlock","DigitBlockMinimum","DigitCharacter","DigitCount","DigitQ","DihedralAngle","DihedralGroup","Dilation","DimensionalCombinations","DimensionalMeshComponents","DimensionReduce","DimensionReducerFunction","DimensionReduction","Dimensions","DiracComb","DiracDelta","DirectedEdge","DirectedEdges","DirectedGraph","DirectedGraphQ","DirectedInfinity","Direction","Directive","Directory","DirectoryName","DirectoryQ","DirectoryStack","DirichletBeta","DirichletCharacter","DirichletCondition","DirichletConvolve","DirichletDistribution","DirichletEta","DirichletL","DirichletLambda","DirichletTransform","DirichletWindow","DisableConsolePrintPacket","DisableFormatting","DiscreteAsymptotic","DiscreteChirpZTransform","DiscreteConvolve","DiscreteDelta","DiscreteHadamardTransform","DiscreteIndicator","DiscreteLimit","DiscreteLQEstimatorGains","DiscreteLQRegulatorGains","DiscreteLyapunovSolve","DiscreteMarkovProcess","DiscreteMaxLimit","DiscreteMinLimit","DiscretePlot","DiscretePlot3D","DiscreteRatio","DiscreteRiccatiSolve","DiscreteShift","DiscreteTimeModelQ","DiscreteUniformDistribution","DiscreteVariables","DiscreteWaveletData","DiscreteWaveletPacketTransform","DiscreteWaveletTransform","DiscretizeGraphics","DiscretizeRegion","Discriminant","DisjointQ","Disjunction","Disk","DiskBox","DiskMatrix","DiskSegment","Dispatch","DispatchQ","DispersionEstimatorFunction","Display","DisplayAllSteps","DisplayEndPacket","DisplayFlushImagePacket","DisplayForm","DisplayFunction","DisplayPacket","DisplayRules","DisplaySetSizePacket","DisplayString","DisplayTemporary","DisplayWith","DisplayWithRef","DisplayWithVariable","DistanceFunction","DistanceMatrix","DistanceTransform","Distribute","Distributed","DistributedContexts","DistributeDefinitions","DistributionChart","DistributionDomain","DistributionFitTest","DistributionParameterAssumptions","DistributionParameterQ","Dithering","Div","Divergence","Divide","DivideBy","Dividers","DivideSides","Divisible","Divisors","DivisorSigma","DivisorSum","DMSList","DMSString","Do","DockedCells","DocumentGenerator","DocumentGeneratorInformation","DocumentGeneratorInformationData","DocumentGenerators","DocumentNotebook","DocumentWeightingRules","Dodecahedron","DomainRegistrationInformation","DominantColors","DOSTextFormat","Dot","DotDashed","DotEqual","DotLayer","DotPlusLayer","Dotted","DoubleBracketingBar","DoubleContourIntegral","DoubleDownArrow","DoubleLeftArrow","DoubleLeftRightArrow","DoubleLeftTee","DoubleLongLeftArrow","DoubleLongLeftRightArrow","DoubleLongRightArrow","DoubleRightArrow","DoubleRightTee","DoubleUpArrow","DoubleUpDownArrow","DoubleVerticalBar","DoublyInfinite","Down","DownArrow","DownArrowBar","DownArrowUpArrow","DownLeftRightVector","DownLeftTeeVector","DownLeftVector","DownLeftVectorBar","DownRightTeeVector","DownRightVector","DownRightVectorBar","Downsample","DownTee","DownTeeArrow","DownValues","DragAndDrop","DrawEdges","DrawFrontFaces","DrawHighlighted","Drop","DropoutLayer","DSolve","DSolveValue","Dt","DualLinearProgramming","DualPolyhedron","DualSystemsModel","DumpGet","DumpSave","DuplicateFreeQ","Duration","Dynamic","DynamicBox","DynamicBoxOptions","DynamicEvaluationTimeout","DynamicGeoGraphics","DynamicImage","DynamicLocation","DynamicModule","DynamicModuleBox","DynamicModuleBoxOptions","DynamicModuleParent","DynamicModuleValues","DynamicName","DynamicNamespace","DynamicReference","DynamicSetting","DynamicUpdating","DynamicWrapper","DynamicWrapperBox","DynamicWrapperBoxOptions","E","EarthImpactData","EarthquakeData","EccentricityCentrality","Echo","EchoFunction","EclipseType","EdgeAdd","EdgeBetweennessCentrality","EdgeCapacity","EdgeCapForm","EdgeColor","EdgeConnectivity","EdgeContract","EdgeCost","EdgeCount","EdgeCoverQ","EdgeCycleMatrix","EdgeDashing","EdgeDelete","EdgeDetect","EdgeForm","EdgeIndex","EdgeJoinForm","EdgeLabeling","EdgeLabels","EdgeLabelStyle","EdgeList","EdgeOpacity","EdgeQ","EdgeRenderingFunction","EdgeRules","EdgeShapeFunction","EdgeStyle","EdgeTaggedGraph","EdgeTaggedGraphQ","EdgeTags","EdgeThickness","EdgeWeight","EdgeWeightedGraphQ","Editable","EditButtonSettings","EditCellTagsSettings","EditDistance","EffectiveInterest","Eigensystem","Eigenvalues","EigenvectorCentrality","Eigenvectors","Element","ElementData","ElementwiseLayer","ElidedForms","Eliminate","EliminationOrder","Ellipsoid","EllipticE","EllipticExp","EllipticExpPrime","EllipticF","EllipticFilterModel","EllipticK","EllipticLog","EllipticNomeQ","EllipticPi","EllipticReducedHalfPeriods","EllipticTheta","EllipticThetaPrime","EmbedCode","EmbeddedHTML","EmbeddedService","EmbeddingLayer","EmbeddingObject","EmitSound","EmphasizeSyntaxErrors","EmpiricalDistribution","Empty","EmptyGraphQ","EmptyRegion","EnableConsolePrintPacket","Enabled","Encode","Encrypt","EncryptedObject","EncryptFile","End","EndAdd","EndDialogPacket","EndFrontEndInteractionPacket","EndOfBuffer","EndOfFile","EndOfLine","EndOfString","EndPackage","EngineEnvironment","EngineeringForm","Enter","EnterExpressionPacket","EnterTextPacket","Entity","EntityClass","EntityClassList","EntityCopies","EntityFunction","EntityGroup","EntityInstance","EntityList","EntityPrefetch","EntityProperties","EntityProperty","EntityPropertyClass","EntityRegister","EntityStore","EntityStores","EntityTypeName","EntityUnregister","EntityValue","Entropy","EntropyFilter","Environment","Epilog","EpilogFunction","Equal","EqualColumns","EqualRows","EqualTilde","EqualTo","EquatedTo","Equilibrium","EquirippleFilterKernel","Equivalent","Erf","Erfc","Erfi","ErlangB","ErlangC","ErlangDistribution","Erosion","ErrorBox","ErrorBoxOptions","ErrorNorm","ErrorPacket","ErrorsDialogSettings","EscapeRadius","EstimatedBackground","EstimatedDistribution","EstimatedProcess","EstimatorGains","EstimatorRegulator","EuclideanDistance","EulerAngles","EulerCharacteristic","EulerE","EulerGamma","EulerianGraphQ","EulerMatrix","EulerPhi","Evaluatable","Evaluate","Evaluated","EvaluatePacket","EvaluateScheduledTask","EvaluationBox","EvaluationCell","EvaluationCompletionAction","EvaluationData","EvaluationElements","EvaluationEnvironment","EvaluationMode","EvaluationMonitor","EvaluationNotebook","EvaluationObject","EvaluationOrder","Evaluator","EvaluatorNames","EvenQ","EventData","EventEvaluator","EventHandler","EventHandlerTag","EventLabels","EventSeries","ExactBlackmanWindow","ExactNumberQ","ExactRootIsolation","ExampleData","Except","ExcludedForms","ExcludedLines","ExcludedPhysicalQuantities","ExcludePods","Exclusions","ExclusionsStyle","Exists","Exit","ExitDialog","ExoplanetData","Exp","Expand","ExpandAll","ExpandDenominator","ExpandFileName","ExpandNumerator","Expectation","ExpectationE","ExpectedValue","ExpGammaDistribution","ExpIntegralE","ExpIntegralEi","ExpirationDate","Exponent","ExponentFunction","ExponentialDistribution","ExponentialFamily","ExponentialGeneratingFunction","ExponentialMovingAverage","ExponentialPowerDistribution","ExponentPosition","ExponentStep","Export","ExportAutoReplacements","ExportByteArray","ExportForm","ExportPacket","ExportString","Expression","ExpressionCell","ExpressionGraph","ExpressionPacket","ExpressionUUID","ExpToTrig","ExtendedEntityClass","ExtendedGCD","Extension","ExtentElementFunction","ExtentMarkers","ExtentSize","ExternalBundle","ExternalCall","ExternalDataCharacterEncoding","ExternalEvaluate","ExternalFunction","ExternalFunctionName","ExternalIdentifier","ExternalObject","ExternalOptions","ExternalSessionObject","ExternalSessions","ExternalStorageBase","ExternalStorageDownload","ExternalStorageGet","ExternalStorageObject","ExternalStoragePut","ExternalStorageUpload","ExternalTypeSignature","ExternalValue","Extract","ExtractArchive","ExtractLayer","ExtractPacletArchive","ExtremeValueDistribution","FaceAlign","FaceForm","FaceGrids","FaceGridsStyle","FacialFeatures","Factor","FactorComplete","Factorial","Factorial2","FactorialMoment","FactorialMomentGeneratingFunction","FactorialPower","FactorInteger","FactorList","FactorSquareFree","FactorSquareFreeList","FactorTerms","FactorTermsList","Fail","Failure","FailureAction","FailureDistribution","FailureQ","False","FareySequence","FARIMAProcess","FeatureDistance","FeatureExtract","FeatureExtraction","FeatureExtractor","FeatureExtractorFunction","FeatureNames","FeatureNearest","FeatureSpacePlot","FeatureSpacePlot3D","FeatureTypes","FEDisableConsolePrintPacket","FeedbackLinearize","FeedbackSector","FeedbackSectorStyle","FeedbackType","FEEnableConsolePrintPacket","FetalGrowthData","Fibonacci","Fibonorial","FieldCompletionFunction","FieldHint","FieldHintStyle","FieldMasked","FieldSize","File","FileBaseName","FileByteCount","FileConvert","FileDate","FileExistsQ","FileExtension","FileFormat","FileHandler","FileHash","FileInformation","FileName","FileNameDepth","FileNameDialogSettings","FileNameDrop","FileNameForms","FileNameJoin","FileNames","FileNameSetter","FileNameSplit","FileNameTake","FilePrint","FileSize","FileSystemMap","FileSystemScan","FileTemplate","FileTemplateApply","FileType","FilledCurve","FilledCurveBox","FilledCurveBoxOptions","Filling","FillingStyle","FillingTransform","FilteredEntityClass","FilterRules","FinancialBond","FinancialData","FinancialDerivative","FinancialIndicator","Find","FindAnomalies","FindArgMax","FindArgMin","FindChannels","FindClique","FindClusters","FindCookies","FindCurvePath","FindCycle","FindDevices","FindDistribution","FindDistributionParameters","FindDivisions","FindEdgeCover","FindEdgeCut","FindEdgeIndependentPaths","FindEquationalProof","FindEulerianCycle","FindExternalEvaluators","FindFaces","FindFile","FindFit","FindFormula","FindFundamentalCycles","FindGeneratingFunction","FindGeoLocation","FindGeometricConjectures","FindGeometricTransform","FindGraphCommunities","FindGraphIsomorphism","FindGraphPartition","FindHamiltonianCycle","FindHamiltonianPath","FindHiddenMarkovStates","FindImageText","FindIndependentEdgeSet","FindIndependentVertexSet","FindInstance","FindIntegerNullVector","FindKClan","FindKClique","FindKClub","FindKPlex","FindLibrary","FindLinearRecurrence","FindList","FindMatchingColor","FindMaximum","FindMaximumCut","FindMaximumFlow","FindMaxValue","FindMeshDefects","FindMinimum","FindMinimumCostFlow","FindMinimumCut","FindMinValue","FindMoleculeSubstructure","FindPath","FindPeaks","FindPermutation","FindPostmanTour","FindProcessParameters","FindRepeat","FindRoot","FindSequenceFunction","FindSettings","FindShortestPath","FindShortestTour","FindSpanningTree","FindSystemModelEquilibrium","FindTextualAnswer","FindThreshold","FindTransientRepeat","FindVertexCover","FindVertexCut","FindVertexIndependentPaths","Fine","FinishDynamic","FiniteAbelianGroupCount","FiniteGroupCount","FiniteGroupData","First","FirstCase","FirstPassageTimeDistribution","FirstPosition","FischerGroupFi22","FischerGroupFi23","FischerGroupFi24Prime","FisherHypergeometricDistribution","FisherRatioTest","FisherZDistribution","Fit","FitAll","FitRegularization","FittedModel","FixedOrder","FixedPoint","FixedPointList","FlashSelection","Flat","Flatten","FlattenAt","FlattenLayer","FlatTopWindow","FlipView","Floor","FlowPolynomial","FlushPrintOutputPacket","Fold","FoldList","FoldPair","FoldPairList","FollowRedirects","Font","FontColor","FontFamily","FontForm","FontName","FontOpacity","FontPostScriptName","FontProperties","FontReencoding","FontSize","FontSlant","FontSubstitutions","FontTracking","FontVariations","FontWeight","For","ForAll","ForceVersionInstall","Format","FormatRules","FormatType","FormatTypeAutoConvert","FormatValues","FormBox","FormBoxOptions","FormControl","FormFunction","FormLayoutFunction","FormObject","FormPage","FormTheme","FormulaData","FormulaLookup","FortranForm","Forward","ForwardBackward","Fourier","FourierCoefficient","FourierCosCoefficient","FourierCosSeries","FourierCosTransform","FourierDCT","FourierDCTFilter","FourierDCTMatrix","FourierDST","FourierDSTMatrix","FourierMatrix","FourierParameters","FourierSequenceTransform","FourierSeries","FourierSinCoefficient","FourierSinSeries","FourierSinTransform","FourierTransform","FourierTrigSeries","FractionalBrownianMotionProcess","FractionalGaussianNoiseProcess","FractionalPart","FractionBox","FractionBoxOptions","FractionLine","Frame","FrameBox","FrameBoxOptions","Framed","FrameInset","FrameLabel","Frameless","FrameMargins","FrameRate","FrameStyle","FrameTicks","FrameTicksStyle","FRatioDistribution","FrechetDistribution","FreeQ","FrenetSerretSystem","FrequencySamplingFilterKernel","FresnelC","FresnelF","FresnelG","FresnelS","Friday","FrobeniusNumber","FrobeniusSolve","FromAbsoluteTime","FromCharacterCode","FromCoefficientRules","FromContinuedFraction","FromDate","FromDigits","FromDMS","FromEntity","FromJulianDate","FromLetterNumber","FromPolarCoordinates","FromRomanNumeral","FromSphericalCoordinates","FromUnixTime","Front","FrontEndDynamicExpression","FrontEndEventActions","FrontEndExecute","FrontEndObject","FrontEndResource","FrontEndResourceString","FrontEndStackSize","FrontEndToken","FrontEndTokenExecute","FrontEndValueCache","FrontEndVersion","FrontFaceColor","FrontFaceOpacity","Full","FullAxes","FullDefinition","FullForm","FullGraphics","FullInformationOutputRegulator","FullOptions","FullRegion","FullSimplify","Function","FunctionCompile","FunctionCompileExport","FunctionCompileExportByteArray","FunctionCompileExportLibrary","FunctionCompileExportString","FunctionDomain","FunctionExpand","FunctionInterpolation","FunctionPeriod","FunctionRange","FunctionSpace","FussellVeselyImportance","GaborFilter","GaborMatrix","GaborWavelet","GainMargins","GainPhaseMargins","GalaxyData","GalleryView","Gamma","GammaDistribution","GammaRegularized","GapPenalty","GARCHProcess","GatedRecurrentLayer","Gather","GatherBy","GaugeFaceElementFunction","GaugeFaceStyle","GaugeFrameElementFunction","GaugeFrameSize","GaugeFrameStyle","GaugeLabels","GaugeMarkers","GaugeStyle","GaussianFilter","GaussianIntegers","GaussianMatrix","GaussianOrthogonalMatrixDistribution","GaussianSymplecticMatrixDistribution","GaussianUnitaryMatrixDistribution","GaussianWindow","GCD","GegenbauerC","General","GeneralizedLinearModelFit","GenerateAsymmetricKeyPair","GenerateConditions","GeneratedCell","GeneratedDocumentBinding","GenerateDerivedKey","GenerateDigitalSignature","GenerateDocument","GeneratedParameters","GeneratedQuantityMagnitudes","GenerateFileSignature","GenerateHTTPResponse","GenerateSecuredAuthenticationKey","GenerateSymmetricKey","GeneratingFunction","GeneratorDescription","GeneratorHistoryLength","GeneratorOutputType","Generic","GenericCylindricalDecomposition","GenomeData","GenomeLookup","GeoAntipode","GeoArea","GeoArraySize","GeoBackground","GeoBoundingBox","GeoBounds","GeoBoundsRegion","GeoBubbleChart","GeoCenter","GeoCircle","GeoContourPlot","GeoDensityPlot","GeodesicClosing","GeodesicDilation","GeodesicErosion","GeodesicOpening","GeoDestination","GeodesyData","GeoDirection","GeoDisk","GeoDisplacement","GeoDistance","GeoDistanceList","GeoElevationData","GeoEntities","GeoGraphics","GeogravityModelData","GeoGridDirectionDifference","GeoGridLines","GeoGridLinesStyle","GeoGridPosition","GeoGridRange","GeoGridRangePadding","GeoGridUnitArea","GeoGridUnitDistance","GeoGridVector","GeoGroup","GeoHemisphere","GeoHemisphereBoundary","GeoHistogram","GeoIdentify","GeoImage","GeoLabels","GeoLength","GeoListPlot","GeoLocation","GeologicalPeriodData","GeomagneticModelData","GeoMarker","GeometricAssertion","GeometricBrownianMotionProcess","GeometricDistribution","GeometricMean","GeometricMeanFilter","GeometricOptimization","GeometricScene","GeometricTransformation","GeometricTransformation3DBox","GeometricTransformation3DBoxOptions","GeometricTransformationBox","GeometricTransformationBoxOptions","GeoModel","GeoNearest","GeoPath","GeoPosition","GeoPositionENU","GeoPositionXYZ","GeoProjection","GeoProjectionData","GeoRange","GeoRangePadding","GeoRegionValuePlot","GeoResolution","GeoScaleBar","GeoServer","GeoSmoothHistogram","GeoStreamPlot","GeoStyling","GeoStylingImageFunction","GeoVariant","GeoVector","GeoVectorENU","GeoVectorPlot","GeoVectorXYZ","GeoVisibleRegion","GeoVisibleRegionBoundary","GeoWithinQ","GeoZoomLevel","GestureHandler","GestureHandlerTag","Get","GetBoundingBoxSizePacket","GetContext","GetEnvironment","GetFileName","GetFrontEndOptionsDataPacket","GetLinebreakInformationPacket","GetMenusPacket","GetPageBreakInformationPacket","Glaisher","GlobalClusteringCoefficient","GlobalPreferences","GlobalSession","Glow","GoldenAngle","GoldenRatio","GompertzMakehamDistribution","GoochShading","GoodmanKruskalGamma","GoodmanKruskalGammaTest","Goto","Grad","Gradient","GradientFilter","GradientOrientationFilter","GrammarApply","GrammarRules","GrammarToken","Graph","Graph3D","GraphAssortativity","GraphAutomorphismGroup","GraphCenter","GraphComplement","GraphData","GraphDensity","GraphDiameter","GraphDifference","GraphDisjointUnion","GraphDistance","GraphDistanceMatrix","GraphElementData","GraphEmbedding","GraphHighlight","GraphHighlightStyle","GraphHub","Graphics","Graphics3D","Graphics3DBox","Graphics3DBoxOptions","GraphicsArray","GraphicsBaseline","GraphicsBox","GraphicsBoxOptions","GraphicsColor","GraphicsColumn","GraphicsComplex","GraphicsComplex3DBox","GraphicsComplex3DBoxOptions","GraphicsComplexBox","GraphicsComplexBoxOptions","GraphicsContents","GraphicsData","GraphicsGrid","GraphicsGridBox","GraphicsGroup","GraphicsGroup3DBox","GraphicsGroup3DBoxOptions","GraphicsGroupBox","GraphicsGroupBoxOptions","GraphicsGrouping","GraphicsHighlightColor","GraphicsRow","GraphicsSpacing","GraphicsStyle","GraphIntersection","GraphLayout","GraphLinkEfficiency","GraphPeriphery","GraphPlot","GraphPlot3D","GraphPower","GraphPropertyDistribution","GraphQ","GraphRadius","GraphReciprocity","GraphRoot","GraphStyle","GraphUnion","Gray","GrayLevel","Greater","GreaterEqual","GreaterEqualLess","GreaterEqualThan","GreaterFullEqual","GreaterGreater","GreaterLess","GreaterSlantEqual","GreaterThan","GreaterTilde","Green","GreenFunction","Grid","GridBaseline","GridBox","GridBoxAlignment","GridBoxBackground","GridBoxDividers","GridBoxFrame","GridBoxItemSize","GridBoxItemStyle","GridBoxOptions","GridBoxSpacings","GridCreationSettings","GridDefaultElement","GridElementStyleOptions","GridFrame","GridFrameMargins","GridGraph","GridLines","GridLinesStyle","GroebnerBasis","GroupActionBase","GroupBy","GroupCentralizer","GroupElementFromWord","GroupElementPosition","GroupElementQ","GroupElements","GroupElementToWord","GroupGenerators","Groupings","GroupMultiplicationTable","GroupOrbits","GroupOrder","GroupPageBreakWithin","GroupSetwiseStabilizer","GroupStabilizer","GroupStabilizerChain","GroupTogetherGrouping","GroupTogetherNestedGrouping","GrowCutComponents","Gudermannian","GuidedFilter","GumbelDistribution","HaarWavelet","HadamardMatrix","HalfLine","HalfNormalDistribution","HalfPlane","HalfSpace","HalftoneShading","HamiltonianGraphQ","HammingDistance","HammingWindow","HandlerFunctions","HandlerFunctionsKeys","HankelH1","HankelH2","HankelMatrix","HankelTransform","HannPoissonWindow","HannWindow","HaradaNortonGroupHN","HararyGraph","HarmonicMean","HarmonicMeanFilter","HarmonicNumber","Hash","HatchFilling","HatchShading","Haversine","HazardFunction","Head","HeadCompose","HeaderAlignment","HeaderBackground","HeaderDisplayFunction","HeaderLines","HeaderSize","HeaderStyle","Heads","HeavisideLambda","HeavisidePi","HeavisideTheta","HeldGroupHe","HeldPart","HelpBrowserLookup","HelpBrowserNotebook","HelpBrowserSettings","Here","HermiteDecomposition","HermiteH","HermitianMatrixQ","HessenbergDecomposition","Hessian","HeunB","HeunBPrime","HeunC","HeunCPrime","HeunD","HeunDPrime","HeunG","HeunGPrime","HeunT","HeunTPrime","HexadecimalCharacter","Hexahedron","HexahedronBox","HexahedronBoxOptions","HiddenItems","HiddenMarkovProcess","HiddenSurface","Highlighted","HighlightGraph","HighlightImage","HighlightMesh","HighpassFilter","HigmanSimsGroupHS","HilbertCurve","HilbertFilter","HilbertMatrix","Histogram","Histogram3D","HistogramDistribution","HistogramList","HistogramTransform","HistogramTransformInterpolation","HistoricalPeriodData","HitMissTransform","HITSCentrality","HjorthDistribution","HodgeDual","HoeffdingD","HoeffdingDTest","Hold","HoldAll","HoldAllComplete","HoldComplete","HoldFirst","HoldForm","HoldPattern","HoldRest","HolidayCalendar","HomeDirectory","HomePage","Horizontal","HorizontalForm","HorizontalGauge","HorizontalScrollPosition","HornerForm","HostLookup","HotellingTSquareDistribution","HoytDistribution","HTMLSave","HTTPErrorResponse","HTTPRedirect","HTTPRequest","HTTPRequestData","HTTPResponse","Hue","HumanGrowthData","HumpDownHump","HumpEqual","HurwitzLerchPhi","HurwitzZeta","HyperbolicDistribution","HypercubeGraph","HyperexponentialDistribution","Hyperfactorial","Hypergeometric0F1","Hypergeometric0F1Regularized","Hypergeometric1F1","Hypergeometric1F1Regularized","Hypergeometric2F1","Hypergeometric2F1Regularized","HypergeometricDistribution","HypergeometricPFQ","HypergeometricPFQRegularized","HypergeometricU","Hyperlink","HyperlinkAction","HyperlinkCreationSettings","Hyperplane","Hyphenation","HyphenationOptions","HypoexponentialDistribution","HypothesisTestData","I","IconData","Iconize","IconizedObject","IconRules","Icosahedron","Identity","IdentityMatrix","If","IgnoreCase","IgnoreDiacritics","IgnorePunctuation","IgnoreSpellCheck","IgnoringInactive","Im","Image","Image3D","Image3DProjection","Image3DSlices","ImageAccumulate","ImageAdd","ImageAdjust","ImageAlign","ImageApply","ImageApplyIndexed","ImageAspectRatio","ImageAssemble","ImageAugmentationLayer","ImageBoundingBoxes","ImageCache","ImageCacheValid","ImageCapture","ImageCaptureFunction","ImageCases","ImageChannels","ImageClip","ImageCollage","ImageColorSpace","ImageCompose","ImageContainsQ","ImageContents","ImageConvolve","ImageCooccurrence","ImageCorners","ImageCorrelate","ImageCorrespondingPoints","ImageCrop","ImageData","ImageDeconvolve","ImageDemosaic","ImageDifference","ImageDimensions","ImageDisplacements","ImageDistance","ImageEffect","ImageExposureCombine","ImageFeatureTrack","ImageFileApply","ImageFileFilter","ImageFileScan","ImageFilter","ImageFocusCombine","ImageForestingComponents","ImageFormattingWidth","ImageForwardTransformation","ImageGraphics","ImageHistogram","ImageIdentify","ImageInstanceQ","ImageKeypoints","ImageLabels","ImageLegends","ImageLevels","ImageLines","ImageMargins","ImageMarker","ImageMarkers","ImageMeasurements","ImageMesh","ImageMultiply","ImageOffset","ImagePad","ImagePadding","ImagePartition","ImagePeriodogram","ImagePerspectiveTransformation","ImagePosition","ImagePreviewFunction","ImagePyramid","ImagePyramidApply","ImageQ","ImageRangeCache","ImageRecolor","ImageReflect","ImageRegion","ImageResize","ImageResolution","ImageRestyle","ImageRotate","ImageRotated","ImageSaliencyFilter","ImageScaled","ImageScan","ImageSize","ImageSizeAction","ImageSizeCache","ImageSizeMultipliers","ImageSizeRaw","ImageSubtract","ImageTake","ImageTransformation","ImageTrim","ImageType","ImageValue","ImageValuePositions","ImagingDevice","ImplicitRegion","Implies","Import","ImportAutoReplacements","ImportByteArray","ImportOptions","ImportString","ImprovementImportance","In","Inactivate","Inactive","IncidenceGraph","IncidenceList","IncidenceMatrix","IncludeAromaticBonds","IncludeConstantBasis","IncludeDefinitions","IncludeDirectories","IncludeFileExtension","IncludeGeneratorTasks","IncludeHydrogens","IncludeInflections","IncludeMetaInformation","IncludePods","IncludeQuantities","IncludeRelatedTables","IncludeSingularTerm","IncludeWindowTimes","Increment","IndefiniteMatrixQ","Indent","IndentingNewlineSpacings","IndentMaxFraction","IndependenceTest","IndependentEdgeSetQ","IndependentPhysicalQuantity","IndependentUnit","IndependentUnitDimension","IndependentVertexSetQ","Indeterminate","IndeterminateThreshold","IndexCreationOptions","Indexed","IndexEdgeTaggedGraph","IndexGraph","IndexTag","Inequality","InexactNumberQ","InexactNumbers","InfiniteFuture","InfiniteLine","InfinitePast","InfinitePlane","Infinity","Infix","InflationAdjust","InflationMethod","Information","InformationData","InformationDataGrid","Inherited","InheritScope","InhomogeneousPoissonProcess","InitialEvaluationHistory","Initialization","InitializationCell","InitializationCellEvaluation","InitializationCellWarning","InitializationObjects","InitializationValue","Initialize","InitialSeeding","InlineCounterAssignments","InlineCounterIncrements","InlineRules","Inner","InnerPolygon","InnerPolyhedron","Inpaint","Input","InputAliases","InputAssumptions","InputAutoReplacements","InputField","InputFieldBox","InputFieldBoxOptions","InputForm","InputGrouping","InputNamePacket","InputNotebook","InputPacket","InputSettings","InputStream","InputString","InputStringPacket","InputToBoxFormPacket","Insert","InsertionFunction","InsertionPointObject","InsertLinebreaks","InsertResults","Inset","Inset3DBox","Inset3DBoxOptions","InsetBox","InsetBoxOptions","Insphere","Install","InstallService","InstanceNormalizationLayer","InString","Integer","IntegerDigits","IntegerExponent","IntegerLength","IntegerName","IntegerPart","IntegerPartitions","IntegerQ","IntegerReverse","Integers","IntegerString","Integral","Integrate","Interactive","InteractiveTradingChart","Interlaced","Interleaving","InternallyBalancedDecomposition","InterpolatingFunction","InterpolatingPolynomial","Interpolation","InterpolationOrder","InterpolationPoints","InterpolationPrecision","Interpretation","InterpretationBox","InterpretationBoxOptions","InterpretationFunction","Interpreter","InterpretTemplate","InterquartileRange","Interrupt","InterruptSettings","IntersectedEntityClass","IntersectingQ","Intersection","Interval","IntervalIntersection","IntervalMarkers","IntervalMarkersStyle","IntervalMemberQ","IntervalSlider","IntervalUnion","Into","Inverse","InverseBetaRegularized","InverseCDF","InverseChiSquareDistribution","InverseContinuousWaveletTransform","InverseDistanceTransform","InverseEllipticNomeQ","InverseErf","InverseErfc","InverseFourier","InverseFourierCosTransform","InverseFourierSequenceTransform","InverseFourierSinTransform","InverseFourierTransform","InverseFunction","InverseFunctions","InverseGammaDistribution","InverseGammaRegularized","InverseGaussianDistribution","InverseGudermannian","InverseHankelTransform","InverseHaversine","InverseImagePyramid","InverseJacobiCD","InverseJacobiCN","InverseJacobiCS","InverseJacobiDC","InverseJacobiDN","InverseJacobiDS","InverseJacobiNC","InverseJacobiND","InverseJacobiNS","InverseJacobiSC","InverseJacobiSD","InverseJacobiSN","InverseLaplaceTransform","InverseMellinTransform","InversePermutation","InverseRadon","InverseRadonTransform","InverseSeries","InverseShortTimeFourier","InverseSpectrogram","InverseSurvivalFunction","InverseTransformedRegion","InverseWaveletTransform","InverseWeierstrassP","InverseWishartMatrixDistribution","InverseZTransform","Invisible","InvisibleApplication","InvisibleTimes","IPAddress","IrreduciblePolynomialQ","IslandData","IsolatingInterval","IsomorphicGraphQ","IsotopeData","Italic","Item","ItemAspectRatio","ItemBox","ItemBoxOptions","ItemDisplayFunction","ItemSize","ItemStyle","ItoProcess","JaccardDissimilarity","JacobiAmplitude","Jacobian","JacobiCD","JacobiCN","JacobiCS","JacobiDC","JacobiDN","JacobiDS","JacobiNC","JacobiND","JacobiNS","JacobiP","JacobiSC","JacobiSD","JacobiSN","JacobiSymbol","JacobiZeta","JankoGroupJ1","JankoGroupJ2","JankoGroupJ3","JankoGroupJ4","JarqueBeraALMTest","JohnsonDistribution","Join","JoinAcross","Joined","JoinedCurve","JoinedCurveBox","JoinedCurveBoxOptions","JoinForm","JordanDecomposition","JordanModelDecomposition","JulianDate","JuliaSetBoettcher","JuliaSetIterationCount","JuliaSetPlot","JuliaSetPoints","K","KagiChart","KaiserBesselWindow","KaiserWindow","KalmanEstimator","KalmanFilter","KarhunenLoeveDecomposition","KaryTree","KatzCentrality","KCoreComponents","KDistribution","KEdgeConnectedComponents","KEdgeConnectedGraphQ","KeepExistingVersion","KelvinBei","KelvinBer","KelvinKei","KelvinKer","KendallTau","KendallTauTest","KernelExecute","KernelFunction","KernelMixtureDistribution","KernelObject","Kernels","Ket","Key","KeyCollisionFunction","KeyComplement","KeyDrop","KeyDropFrom","KeyExistsQ","KeyFreeQ","KeyIntersection","KeyMap","KeyMemberQ","KeypointStrength","Keys","KeySelect","KeySort","KeySortBy","KeyTake","KeyUnion","KeyValueMap","KeyValuePattern","Khinchin","KillProcess","KirchhoffGraph","KirchhoffMatrix","KleinInvariantJ","KnapsackSolve","KnightTourGraph","KnotData","KnownUnitQ","KochCurve","KolmogorovSmirnovTest","KroneckerDelta","KroneckerModelDecomposition","KroneckerProduct","KroneckerSymbol","KuiperTest","KumaraswamyDistribution","Kurtosis","KuwaharaFilter","KVertexConnectedComponents","KVertexConnectedGraphQ","LABColor","Label","Labeled","LabeledSlider","LabelingFunction","LabelingSize","LabelStyle","LabelVisibility","LaguerreL","LakeData","LambdaComponents","LambertW","LaminaData","LanczosWindow","LandauDistribution","Language","LanguageCategory","LanguageData","LanguageIdentify","LanguageOptions","LaplaceDistribution","LaplaceTransform","Laplacian","LaplacianFilter","LaplacianGaussianFilter","Large","Larger","Last","Latitude","LatitudeLongitude","LatticeData","LatticeReduce","Launch","LaunchKernels","LayeredGraphPlot","LayerSizeFunction","LayoutInformation","LCHColor","LCM","LeaderSize","LeafCount","LeapYearQ","LearnDistribution","LearnedDistribution","LearningRate","LearningRateMultipliers","LeastSquares","LeastSquaresFilterKernel","Left","LeftArrow","LeftArrowBar","LeftArrowRightArrow","LeftDownTeeVector","LeftDownVector","LeftDownVectorBar","LeftRightArrow","LeftRightVector","LeftTee","LeftTeeArrow","LeftTeeVector","LeftTriangle","LeftTriangleBar","LeftTriangleEqual","LeftUpDownVector","LeftUpTeeVector","LeftUpVector","LeftUpVectorBar","LeftVector","LeftVectorBar","LegendAppearance","Legended","LegendFunction","LegendLabel","LegendLayout","LegendMargins","LegendMarkers","LegendMarkerSize","LegendreP","LegendreQ","LegendreType","Length","LengthWhile","LerchPhi","Less","LessEqual","LessEqualGreater","LessEqualThan","LessFullEqual","LessGreater","LessLess","LessSlantEqual","LessThan","LessTilde","LetterCharacter","LetterCounts","LetterNumber","LetterQ","Level","LeveneTest","LeviCivitaTensor","LevyDistribution","Lexicographic","LibraryDataType","LibraryFunction","LibraryFunctionError","LibraryFunctionInformation","LibraryFunctionLoad","LibraryFunctionUnload","LibraryLoad","LibraryUnload","LicenseID","LiftingFilterData","LiftingWaveletTransform","LightBlue","LightBrown","LightCyan","Lighter","LightGray","LightGreen","Lighting","LightingAngle","LightMagenta","LightOrange","LightPink","LightPurple","LightRed","LightSources","LightYellow","Likelihood","Limit","LimitsPositioning","LimitsPositioningTokens","LindleyDistribution","Line","Line3DBox","Line3DBoxOptions","LinearFilter","LinearFractionalOptimization","LinearFractionalTransform","LinearGradientImage","LinearizingTransformationData","LinearLayer","LinearModelFit","LinearOffsetFunction","LinearOptimization","LinearProgramming","LinearRecurrence","LinearSolve","LinearSolveFunction","LineBox","LineBoxOptions","LineBreak","LinebreakAdjustments","LineBreakChart","LinebreakSemicolonWeighting","LineBreakWithin","LineColor","LineGraph","LineIndent","LineIndentMaxFraction","LineIntegralConvolutionPlot","LineIntegralConvolutionScale","LineLegend","LineOpacity","LineSpacing","LineWrapParts","LinkActivate","LinkClose","LinkConnect","LinkConnectedQ","LinkCreate","LinkError","LinkFlush","LinkFunction","LinkHost","LinkInterrupt","LinkLaunch","LinkMode","LinkObject","LinkOpen","LinkOptions","LinkPatterns","LinkProtocol","LinkRankCentrality","LinkRead","LinkReadHeld","LinkReadyQ","Links","LinkService","LinkWrite","LinkWriteHeld","LiouvilleLambda","List","Listable","ListAnimate","ListContourPlot","ListContourPlot3D","ListConvolve","ListCorrelate","ListCurvePathPlot","ListDeconvolve","ListDensityPlot","ListDensityPlot3D","Listen","ListFormat","ListFourierSequenceTransform","ListInterpolation","ListLineIntegralConvolutionPlot","ListLinePlot","ListLogLinearPlot","ListLogLogPlot","ListLogPlot","ListPicker","ListPickerBox","ListPickerBoxBackground","ListPickerBoxOptions","ListPlay","ListPlot","ListPlot3D","ListPointPlot3D","ListPolarPlot","ListQ","ListSliceContourPlot3D","ListSliceDensityPlot3D","ListSliceVectorPlot3D","ListStepPlot","ListStreamDensityPlot","ListStreamPlot","ListSurfacePlot3D","ListVectorDensityPlot","ListVectorPlot","ListVectorPlot3D","ListZTransform","Literal","LiteralSearch","LocalAdaptiveBinarize","LocalCache","LocalClusteringCoefficient","LocalizeDefinitions","LocalizeVariables","LocalObject","LocalObjects","LocalResponseNormalizationLayer","LocalSubmit","LocalSymbol","LocalTime","LocalTimeZone","LocationEquivalenceTest","LocationTest","Locator","LocatorAutoCreate","LocatorBox","LocatorBoxOptions","LocatorCentering","LocatorPane","LocatorPaneBox","LocatorPaneBoxOptions","LocatorRegion","Locked","Log","Log10","Log2","LogBarnesG","LogGamma","LogGammaDistribution","LogicalExpand","LogIntegral","LogisticDistribution","LogisticSigmoid","LogitModelFit","LogLikelihood","LogLinearPlot","LogLogisticDistribution","LogLogPlot","LogMultinormalDistribution","LogNormalDistribution","LogPlot","LogRankTest","LogSeriesDistribution","LongEqual","Longest","LongestCommonSequence","LongestCommonSequencePositions","LongestCommonSubsequence","LongestCommonSubsequencePositions","LongestMatch","LongestOrderedSequence","LongForm","Longitude","LongLeftArrow","LongLeftRightArrow","LongRightArrow","LongShortTermMemoryLayer","Lookup","Loopback","LoopFreeGraphQ","Looping","LossFunction","LowerCaseQ","LowerLeftArrow","LowerRightArrow","LowerTriangularize","LowerTriangularMatrixQ","LowpassFilter","LQEstimatorGains","LQGRegulator","LQOutputRegulatorGains","LQRegulatorGains","LUBackSubstitution","LucasL","LuccioSamiComponents","LUDecomposition","LunarEclipse","LUVColor","LyapunovSolve","LyonsGroupLy","MachineID","MachineName","MachineNumberQ","MachinePrecision","MacintoshSystemPageSetup","Magenta","Magnification","Magnify","MailAddressValidation","MailExecute","MailFolder","MailItem","MailReceiverFunction","MailResponseFunction","MailSearch","MailServerConnect","MailServerConnection","MailSettings","MainSolve","MaintainDynamicCaches","Majority","MakeBoxes","MakeExpression","MakeRules","ManagedLibraryExpressionID","ManagedLibraryExpressionQ","MandelbrotSetBoettcher","MandelbrotSetDistance","MandelbrotSetIterationCount","MandelbrotSetMemberQ","MandelbrotSetPlot","MangoldtLambda","ManhattanDistance","Manipulate","Manipulator","MannedSpaceMissionData","MannWhitneyTest","MantissaExponent","Manual","Map","MapAll","MapAt","MapIndexed","MAProcess","MapThread","MarchenkoPasturDistribution","MarcumQ","MardiaCombinedTest","MardiaKurtosisTest","MardiaSkewnessTest","MarginalDistribution","MarkovProcessProperties","Masking","MatchingDissimilarity","MatchLocalNameQ","MatchLocalNames","MatchQ","Material","MathematicalFunctionData","MathematicaNotation","MathieuC","MathieuCharacteristicA","MathieuCharacteristicB","MathieuCharacteristicExponent","MathieuCPrime","MathieuGroupM11","MathieuGroupM12","MathieuGroupM22","MathieuGroupM23","MathieuGroupM24","MathieuS","MathieuSPrime","MathMLForm","MathMLText","Matrices","MatrixExp","MatrixForm","MatrixFunction","MatrixLog","MatrixNormalDistribution","MatrixPlot","MatrixPower","MatrixPropertyDistribution","MatrixQ","MatrixRank","MatrixTDistribution","Max","MaxBend","MaxCellMeasure","MaxColorDistance","MaxDate","MaxDetect","MaxDuration","MaxExtraBandwidths","MaxExtraConditions","MaxFeatureDisplacement","MaxFeatures","MaxFilter","MaximalBy","Maximize","MaxItems","MaxIterations","MaxLimit","MaxMemoryUsed","MaxMixtureKernels","MaxOverlapFraction","MaxPlotPoints","MaxPoints","MaxRecursion","MaxStableDistribution","MaxStepFraction","MaxSteps","MaxStepSize","MaxTrainingRounds","MaxValue","MaxwellDistribution","MaxWordGap","McLaughlinGroupMcL","Mean","MeanAbsoluteLossLayer","MeanAround","MeanClusteringCoefficient","MeanDegreeConnectivity","MeanDeviation","MeanFilter","MeanGraphDistance","MeanNeighborDegree","MeanShift","MeanShiftFilter","MeanSquaredLossLayer","Median","MedianDeviation","MedianFilter","MedicalTestData","Medium","MeijerG","MeijerGReduce","MeixnerDistribution","MellinConvolve","MellinTransform","MemberQ","MemoryAvailable","MemoryConstrained","MemoryConstraint","MemoryInUse","MengerMesh","Menu","MenuAppearance","MenuCommandKey","MenuEvaluator","MenuItem","MenuList","MenuPacket","MenuSortingValue","MenuStyle","MenuView","Merge","MergeDifferences","MergingFunction","MersennePrimeExponent","MersennePrimeExponentQ","Mesh","MeshCellCentroid","MeshCellCount","MeshCellHighlight","MeshCellIndex","MeshCellLabel","MeshCellMarker","MeshCellMeasure","MeshCellQuality","MeshCells","MeshCellShapeFunction","MeshCellStyle","MeshConnectivityGraph","MeshCoordinates","MeshFunctions","MeshPrimitives","MeshQualityGoal","MeshRange","MeshRefinementFunction","MeshRegion","MeshRegionQ","MeshShading","MeshStyle","Message","MessageDialog","MessageList","MessageName","MessageObject","MessageOptions","MessagePacket","Messages","MessagesNotebook","MetaCharacters","MetaInformation","MeteorShowerData","Method","MethodOptions","MexicanHatWavelet","MeyerWavelet","Midpoint","Min","MinColorDistance","MinDate","MinDetect","MineralData","MinFilter","MinimalBy","MinimalPolynomial","MinimalStateSpaceModel","Minimize","MinimumTimeIncrement","MinIntervalSize","MinkowskiQuestionMark","MinLimit","MinMax","MinorPlanetData","Minors","MinRecursion","MinSize","MinStableDistribution","Minus","MinusPlus","MinValue","Missing","MissingBehavior","MissingDataMethod","MissingDataRules","MissingQ","MissingString","MissingStyle","MissingValuePattern","MittagLefflerE","MixedFractionParts","MixedGraphQ","MixedMagnitude","MixedRadix","MixedRadixQuantity","MixedUnit","MixtureDistribution","Mod","Modal","Mode","Modular","ModularInverse","ModularLambda","Module","Modulus","MoebiusMu","Molecule","MoleculeContainsQ","MoleculeEquivalentQ","MoleculeGraph","MoleculeModify","MoleculePattern","MoleculePlot","MoleculePlot3D","MoleculeProperty","MoleculeQ","MoleculeRecognize","MoleculeValue","Moment","Momentary","MomentConvert","MomentEvaluate","MomentGeneratingFunction","MomentOfInertia","Monday","Monitor","MonomialList","MonomialOrder","MonsterGroupM","MoonPhase","MoonPosition","MorletWavelet","MorphologicalBinarize","MorphologicalBranchPoints","MorphologicalComponents","MorphologicalEulerNumber","MorphologicalGraph","MorphologicalPerimeter","MorphologicalTransform","MortalityData","Most","MountainData","MouseAnnotation","MouseAppearance","MouseAppearanceTag","MouseButtons","Mouseover","MousePointerNote","MousePosition","MovieData","MovingAverage","MovingMap","MovingMedian","MoyalDistribution","Multicolumn","MultiedgeStyle","MultigraphQ","MultilaunchWarning","MultiLetterItalics","MultiLetterStyle","MultilineFunction","Multinomial","MultinomialDistribution","MultinormalDistribution","MultiplicativeOrder","Multiplicity","MultiplySides","Multiselection","MultivariateHypergeometricDistribution","MultivariatePoissonDistribution","MultivariateTDistribution","N","NakagamiDistribution","NameQ","Names","NamespaceBox","NamespaceBoxOptions","Nand","NArgMax","NArgMin","NBernoulliB","NBodySimulation","NBodySimulationData","NCache","NDEigensystem","NDEigenvalues","NDSolve","NDSolveValue","Nearest","NearestFunction","NearestMeshCells","NearestNeighborGraph","NearestTo","NebulaData","NeedCurrentFrontEndPackagePacket","NeedCurrentFrontEndSymbolsPacket","NeedlemanWunschSimilarity","Needs","Negative","NegativeBinomialDistribution","NegativeDefiniteMatrixQ","NegativeIntegers","NegativeMultinomialDistribution","NegativeRationals","NegativeReals","NegativeSemidefiniteMatrixQ","NeighborhoodData","NeighborhoodGraph","Nest","NestedGreaterGreater","NestedLessLess","NestedScriptRules","NestGraph","NestList","NestWhile","NestWhileList","NetAppend","NetBidirectionalOperator","NetChain","NetDecoder","NetDelete","NetDrop","NetEncoder","NetEvaluationMode","NetExtract","NetFlatten","NetFoldOperator","NetGANOperator","NetGraph","NetInformation","NetInitialize","NetInsert","NetInsertSharedArrays","NetJoin","NetMapOperator","NetMapThreadOperator","NetMeasurements","NetModel","NetNestOperator","NetPairEmbeddingOperator","NetPort","NetPortGradient","NetPrepend","NetRename","NetReplace","NetReplacePart","NetSharedArray","NetStateObject","NetTake","NetTrain","NetTrainResultsObject","NetworkPacketCapture","NetworkPacketRecording","NetworkPacketRecordingDuring","NetworkPacketTrace","NeumannValue","NevilleThetaC","NevilleThetaD","NevilleThetaN","NevilleThetaS","NewPrimitiveStyle","NExpectation","Next","NextCell","NextDate","NextPrime","NextScheduledTaskTime","NHoldAll","NHoldFirst","NHoldRest","NicholsGridLines","NicholsPlot","NightHemisphere","NIntegrate","NMaximize","NMaxValue","NMinimize","NMinValue","NominalVariables","NonAssociative","NoncentralBetaDistribution","NoncentralChiSquareDistribution","NoncentralFRatioDistribution","NoncentralStudentTDistribution","NonCommutativeMultiply","NonConstants","NondimensionalizationTransform","None","NoneTrue","NonlinearModelFit","NonlinearStateSpaceModel","NonlocalMeansFilter","NonNegative","NonNegativeIntegers","NonNegativeRationals","NonNegativeReals","NonPositive","NonPositiveIntegers","NonPositiveRationals","NonPositiveReals","Nor","NorlundB","Norm","Normal","NormalDistribution","NormalGrouping","NormalizationLayer","Normalize","Normalized","NormalizedSquaredEuclideanDistance","NormalMatrixQ","NormalsFunction","NormFunction","Not","NotCongruent","NotCupCap","NotDoubleVerticalBar","Notebook","NotebookApply","NotebookAutoSave","NotebookClose","NotebookConvertSettings","NotebookCreate","NotebookCreateReturnObject","NotebookDefault","NotebookDelete","NotebookDirectory","NotebookDynamicExpression","NotebookEvaluate","NotebookEventActions","NotebookFileName","NotebookFind","NotebookFindReturnObject","NotebookGet","NotebookGetLayoutInformationPacket","NotebookGetMisspellingsPacket","NotebookImport","NotebookInformation","NotebookInterfaceObject","NotebookLocate","NotebookObject","NotebookOpen","NotebookOpenReturnObject","NotebookPath","NotebookPrint","NotebookPut","NotebookPutReturnObject","NotebookRead","NotebookResetGeneratedCells","Notebooks","NotebookSave","NotebookSaveAs","NotebookSelection","NotebookSetupLayoutInformationPacket","NotebooksMenu","NotebookTemplate","NotebookWrite","NotElement","NotEqualTilde","NotExists","NotGreater","NotGreaterEqual","NotGreaterFullEqual","NotGreaterGreater","NotGreaterLess","NotGreaterSlantEqual","NotGreaterTilde","Nothing","NotHumpDownHump","NotHumpEqual","NotificationFunction","NotLeftTriangle","NotLeftTriangleBar","NotLeftTriangleEqual","NotLess","NotLessEqual","NotLessFullEqual","NotLessGreater","NotLessLess","NotLessSlantEqual","NotLessTilde","NotNestedGreaterGreater","NotNestedLessLess","NotPrecedes","NotPrecedesEqual","NotPrecedesSlantEqual","NotPrecedesTilde","NotReverseElement","NotRightTriangle","NotRightTriangleBar","NotRightTriangleEqual","NotSquareSubset","NotSquareSubsetEqual","NotSquareSuperset","NotSquareSupersetEqual","NotSubset","NotSubsetEqual","NotSucceeds","NotSucceedsEqual","NotSucceedsSlantEqual","NotSucceedsTilde","NotSuperset","NotSupersetEqual","NotTilde","NotTildeEqual","NotTildeFullEqual","NotTildeTilde","NotVerticalBar","Now","NoWhitespace","NProbability","NProduct","NProductFactors","NRoots","NSolve","NSum","NSumTerms","NuclearExplosionData","NuclearReactorData","Null","NullRecords","NullSpace","NullWords","Number","NumberCompose","NumberDecompose","NumberExpand","NumberFieldClassNumber","NumberFieldDiscriminant","NumberFieldFundamentalUnits","NumberFieldIntegralBasis","NumberFieldNormRepresentatives","NumberFieldRegulator","NumberFieldRootsOfUnity","NumberFieldSignature","NumberForm","NumberFormat","NumberLinePlot","NumberMarks","NumberMultiplier","NumberPadding","NumberPoint","NumberQ","NumberSeparator","NumberSigns","NumberString","Numerator","NumeratorDenominator","NumericalOrder","NumericalSort","NumericArray","NumericArrayQ","NumericArrayType","NumericFunction","NumericQ","NuttallWindow","NValues","NyquistGridLines","NyquistPlot","O","ObservabilityGramian","ObservabilityMatrix","ObservableDecomposition","ObservableModelQ","OceanData","Octahedron","OddQ","Off","Offset","OLEData","On","ONanGroupON","Once","OneIdentity","Opacity","OpacityFunction","OpacityFunctionScaling","Open","OpenAppend","Opener","OpenerBox","OpenerBoxOptions","OpenerView","OpenFunctionInspectorPacket","Opening","OpenRead","OpenSpecialOptions","OpenTemporary","OpenWrite","Operate","OperatingSystem","OperatorApplied","OptimumFlowData","Optional","OptionalElement","OptionInspectorSettings","OptionQ","Options","OptionsPacket","OptionsPattern","OptionValue","OptionValueBox","OptionValueBoxOptions","Or","Orange","Order","OrderDistribution","OrderedQ","Ordering","OrderingBy","OrderingLayer","Orderless","OrderlessPatternSequence","OrnsteinUhlenbeckProcess","Orthogonalize","OrthogonalMatrixQ","Out","Outer","OuterPolygon","OuterPolyhedron","OutputAutoOverwrite","OutputControllabilityMatrix","OutputControllableModelQ","OutputForm","OutputFormData","OutputGrouping","OutputMathEditExpression","OutputNamePacket","OutputResponse","OutputSizeLimit","OutputStream","Over","OverBar","OverDot","Overflow","OverHat","Overlaps","Overlay","OverlayBox","OverlayBoxOptions","Overscript","OverscriptBox","OverscriptBoxOptions","OverTilde","OverVector","OverwriteTarget","OwenT","OwnValues","Package","PackingMethod","PackPaclet","PacletDataRebuild","PacletDirectoryAdd","PacletDirectoryLoad","PacletDirectoryRemove","PacletDirectoryUnload","PacletDisable","PacletEnable","PacletFind","PacletFindRemote","PacletInformation","PacletInstall","PacletInstallSubmit","PacletNewerQ","PacletObject","PacletObjectQ","PacletSite","PacletSiteObject","PacletSiteRegister","PacletSites","PacletSiteUnregister","PacletSiteUpdate","PacletUninstall","PacletUpdate","PaddedForm","Padding","PaddingLayer","PaddingSize","PadeApproximant","PadLeft","PadRight","PageBreakAbove","PageBreakBelow","PageBreakWithin","PageFooterLines","PageFooters","PageHeaderLines","PageHeaders","PageHeight","PageRankCentrality","PageTheme","PageWidth","Pagination","PairedBarChart","PairedHistogram","PairedSmoothHistogram","PairedTTest","PairedZTest","PaletteNotebook","PalettePath","PalindromeQ","Pane","PaneBox","PaneBoxOptions","Panel","PanelBox","PanelBoxOptions","Paneled","PaneSelector","PaneSelectorBox","PaneSelectorBoxOptions","PaperWidth","ParabolicCylinderD","ParagraphIndent","ParagraphSpacing","ParallelArray","ParallelCombine","ParallelDo","Parallelepiped","ParallelEvaluate","Parallelization","Parallelize","ParallelMap","ParallelNeeds","Parallelogram","ParallelProduct","ParallelSubmit","ParallelSum","ParallelTable","ParallelTry","Parameter","ParameterEstimator","ParameterMixtureDistribution","ParameterVariables","ParametricFunction","ParametricNDSolve","ParametricNDSolveValue","ParametricPlot","ParametricPlot3D","ParametricRampLayer","ParametricRegion","ParentBox","ParentCell","ParentConnect","ParentDirectory","ParentForm","Parenthesize","ParentList","ParentNotebook","ParetoDistribution","ParetoPickandsDistribution","ParkData","Part","PartBehavior","PartialCorrelationFunction","PartialD","ParticleAcceleratorData","ParticleData","Partition","PartitionGranularity","PartitionsP","PartitionsQ","PartLayer","PartOfSpeech","PartProtection","ParzenWindow","PascalDistribution","PassEventsDown","PassEventsUp","Paste","PasteAutoQuoteCharacters","PasteBoxFormInlineCells","PasteButton","Path","PathGraph","PathGraphQ","Pattern","PatternFilling","PatternSequence","PatternTest","PauliMatrix","PaulWavelet","Pause","PausedTime","PDF","PeakDetect","PeanoCurve","PearsonChiSquareTest","PearsonCorrelationTest","PearsonDistribution","PercentForm","PerfectNumber","PerfectNumberQ","PerformanceGoal","Perimeter","PeriodicBoundaryCondition","PeriodicInterpolation","Periodogram","PeriodogramArray","Permanent","Permissions","PermissionsGroup","PermissionsGroupMemberQ","PermissionsGroups","PermissionsKey","PermissionsKeys","PermutationCycles","PermutationCyclesQ","PermutationGroup","PermutationLength","PermutationList","PermutationListQ","PermutationMax","PermutationMin","PermutationOrder","PermutationPower","PermutationProduct","PermutationReplace","Permutations","PermutationSupport","Permute","PeronaMalikFilter","Perpendicular","PerpendicularBisector","PersistenceLocation","PersistenceTime","PersistentObject","PersistentObjects","PersistentValue","PersonData","PERTDistribution","PetersenGraph","PhaseMargins","PhaseRange","PhysicalSystemData","Pi","Pick","PIDData","PIDDerivativeFilter","PIDFeedforward","PIDTune","Piecewise","PiecewiseExpand","PieChart","PieChart3D","PillaiTrace","PillaiTraceTest","PingTime","Pink","PitchRecognize","Pivoting","PixelConstrained","PixelValue","PixelValuePositions","Placed","Placeholder","PlaceholderReplace","Plain","PlanarAngle","PlanarGraph","PlanarGraphQ","PlanckRadiationLaw","PlaneCurveData","PlanetaryMoonData","PlanetData","PlantData","Play","PlayRange","Plot","Plot3D","Plot3Matrix","PlotDivision","PlotJoined","PlotLabel","PlotLabels","PlotLayout","PlotLegends","PlotMarkers","PlotPoints","PlotRange","PlotRangeClipping","PlotRangeClipPlanesStyle","PlotRangePadding","PlotRegion","PlotStyle","PlotTheme","Pluralize","Plus","PlusMinus","Pochhammer","PodStates","PodWidth","Point","Point3DBox","Point3DBoxOptions","PointBox","PointBoxOptions","PointFigureChart","PointLegend","PointSize","PoissonConsulDistribution","PoissonDistribution","PoissonProcess","PoissonWindow","PolarAxes","PolarAxesOrigin","PolarGridLines","PolarPlot","PolarTicks","PoleZeroMarkers","PolyaAeppliDistribution","PolyGamma","Polygon","Polygon3DBox","Polygon3DBoxOptions","PolygonalNumber","PolygonAngle","PolygonBox","PolygonBoxOptions","PolygonCoordinates","PolygonDecomposition","PolygonHoleScale","PolygonIntersections","PolygonScale","Polyhedron","PolyhedronAngle","PolyhedronCoordinates","PolyhedronData","PolyhedronDecomposition","PolyhedronGenus","PolyLog","PolynomialExtendedGCD","PolynomialForm","PolynomialGCD","PolynomialLCM","PolynomialMod","PolynomialQ","PolynomialQuotient","PolynomialQuotientRemainder","PolynomialReduce","PolynomialRemainder","Polynomials","PoolingLayer","PopupMenu","PopupMenuBox","PopupMenuBoxOptions","PopupView","PopupWindow","Position","PositionIndex","Positive","PositiveDefiniteMatrixQ","PositiveIntegers","PositiveRationals","PositiveReals","PositiveSemidefiniteMatrixQ","PossibleZeroQ","Postfix","PostScript","Power","PowerDistribution","PowerExpand","PowerMod","PowerModList","PowerRange","PowerSpectralDensity","PowersRepresentations","PowerSymmetricPolynomial","Precedence","PrecedenceForm","Precedes","PrecedesEqual","PrecedesSlantEqual","PrecedesTilde","Precision","PrecisionGoal","PreDecrement","Predict","PredictionRoot","PredictorFunction","PredictorInformation","PredictorMeasurements","PredictorMeasurementsObject","PreemptProtect","PreferencesPath","Prefix","PreIncrement","Prepend","PrependLayer","PrependTo","PreprocessingRules","PreserveColor","PreserveImageOptions","Previous","PreviousCell","PreviousDate","PriceGraphDistribution","PrimaryPlaceholder","Prime","PrimeNu","PrimeOmega","PrimePi","PrimePowerQ","PrimeQ","Primes","PrimeZetaP","PrimitivePolynomialQ","PrimitiveRoot","PrimitiveRootList","PrincipalComponents","PrincipalValue","Print","PrintableASCIIQ","PrintAction","PrintForm","PrintingCopies","PrintingOptions","PrintingPageRange","PrintingStartingPageNumber","PrintingStyleEnvironment","Printout3D","Printout3DPreviewer","PrintPrecision","PrintTemporary","Prism","PrismBox","PrismBoxOptions","PrivateCellOptions","PrivateEvaluationOptions","PrivateFontOptions","PrivateFrontEndOptions","PrivateKey","PrivateNotebookOptions","PrivatePaths","Probability","ProbabilityDistribution","ProbabilityPlot","ProbabilityPr","ProbabilityScalePlot","ProbitModelFit","ProcessConnection","ProcessDirectory","ProcessEnvironment","Processes","ProcessEstimator","ProcessInformation","ProcessObject","ProcessParameterAssumptions","ProcessParameterQ","ProcessStateDomain","ProcessStatus","ProcessTimeDomain","Product","ProductDistribution","ProductLog","ProgressIndicator","ProgressIndicatorBox","ProgressIndicatorBoxOptions","Projection","Prolog","PromptForm","ProofObject","Properties","Property","PropertyList","PropertyValue","Proportion","Proportional","Protect","Protected","ProteinData","Pruning","PseudoInverse","PsychrometricPropertyData","PublicKey","PublisherID","PulsarData","PunctuationCharacter","Purple","Put","PutAppend","Pyramid","PyramidBox","PyramidBoxOptions","QBinomial","QFactorial","QGamma","QHypergeometricPFQ","QnDispersion","QPochhammer","QPolyGamma","QRDecomposition","QuadraticIrrationalQ","QuadraticOptimization","Quantile","QuantilePlot","Quantity","QuantityArray","QuantityDistribution","QuantityForm","QuantityMagnitude","QuantityQ","QuantityUnit","QuantityVariable","QuantityVariableCanonicalUnit","QuantityVariableDimensions","QuantityVariableIdentifier","QuantityVariablePhysicalQuantity","Quartics","QuartileDeviation","Quartiles","QuartileSkewness","Query","QueueingNetworkProcess","QueueingProcess","QueueProperties","Quiet","Quit","Quotient","QuotientRemainder","RadialGradientImage","RadialityCentrality","RadicalBox","RadicalBoxOptions","RadioButton","RadioButtonBar","RadioButtonBox","RadioButtonBoxOptions","Radon","RadonTransform","RamanujanTau","RamanujanTauL","RamanujanTauTheta","RamanujanTauZ","Ramp","Random","RandomChoice","RandomColor","RandomComplex","RandomEntity","RandomFunction","RandomGeoPosition","RandomGraph","RandomImage","RandomInstance","RandomInteger","RandomPermutation","RandomPoint","RandomPolygon","RandomPolyhedron","RandomPrime","RandomReal","RandomSample","RandomSeed","RandomSeeding","RandomVariate","RandomWalkProcess","RandomWord","Range","RangeFilter","RangeSpecification","RankedMax","RankedMin","RarerProbability","Raster","Raster3D","Raster3DBox","Raster3DBoxOptions","RasterArray","RasterBox","RasterBoxOptions","Rasterize","RasterSize","Rational","RationalFunctions","Rationalize","Rationals","Ratios","RawArray","RawBoxes","RawData","RawMedium","RayleighDistribution","Re","Read","ReadByteArray","ReadLine","ReadList","ReadProtected","ReadString","Real","RealAbs","RealBlockDiagonalForm","RealDigits","RealExponent","Reals","RealSign","Reap","RebuildPacletData","RecognitionPrior","RecognitionThreshold","Record","RecordLists","RecordSeparators","Rectangle","RectangleBox","RectangleBoxOptions","RectangleChart","RectangleChart3D","RectangularRepeatingElement","RecurrenceFilter","RecurrenceTable","RecurringDigitsForm","Red","Reduce","RefBox","ReferenceLineStyle","ReferenceMarkers","ReferenceMarkerStyle","Refine","ReflectionMatrix","ReflectionTransform","Refresh","RefreshRate","Region","RegionBinarize","RegionBoundary","RegionBoundaryStyle","RegionBounds","RegionCentroid","RegionDifference","RegionDimension","RegionDisjoint","RegionDistance","RegionDistanceFunction","RegionEmbeddingDimension","RegionEqual","RegionFillingStyle","RegionFunction","RegionImage","RegionIntersection","RegionMeasure","RegionMember","RegionMemberFunction","RegionMoment","RegionNearest","RegionNearestFunction","RegionPlot","RegionPlot3D","RegionProduct","RegionQ","RegionResize","RegionSize","RegionSymmetricDifference","RegionUnion","RegionWithin","RegisterExternalEvaluator","RegularExpression","Regularization","RegularlySampledQ","RegularPolygon","ReIm","ReImLabels","ReImPlot","ReImStyle","Reinstall","RelationalDatabase","RelationGraph","Release","ReleaseHold","ReliabilityDistribution","ReliefImage","ReliefPlot","RemoteAuthorizationCaching","RemoteConnect","RemoteConnectionObject","RemoteFile","RemoteRun","RemoteRunProcess","Remove","RemoveAlphaChannel","RemoveAsynchronousTask","RemoveAudioStream","RemoveBackground","RemoveChannelListener","RemoveChannelSubscribers","Removed","RemoveDiacritics","RemoveInputStreamMethod","RemoveOutputStreamMethod","RemoveProperty","RemoveScheduledTask","RemoveUsers","RemoveVideoStream","RenameDirectory","RenameFile","RenderAll","RenderingOptions","RenewalProcess","RenkoChart","RepairMesh","Repeated","RepeatedNull","RepeatedString","RepeatedTiming","RepeatingElement","Replace","ReplaceAll","ReplaceHeldPart","ReplaceImageValue","ReplaceList","ReplacePart","ReplacePixelValue","ReplaceRepeated","ReplicateLayer","RequiredPhysicalQuantities","Resampling","ResamplingAlgorithmData","ResamplingMethod","Rescale","RescalingTransform","ResetDirectory","ResetMenusPacket","ResetScheduledTask","ReshapeLayer","Residue","ResizeLayer","Resolve","ResourceAcquire","ResourceData","ResourceFunction","ResourceObject","ResourceRegister","ResourceRemove","ResourceSearch","ResourceSubmissionObject","ResourceSubmit","ResourceSystemBase","ResourceSystemPath","ResourceUpdate","ResourceVersion","ResponseForm","Rest","RestartInterval","Restricted","Resultant","ResumePacket","Return","ReturnEntersInput","ReturnExpressionPacket","ReturnInputFormPacket","ReturnPacket","ReturnReceiptFunction","ReturnTextPacket","Reverse","ReverseApplied","ReverseBiorthogonalSplineWavelet","ReverseElement","ReverseEquilibrium","ReverseGraph","ReverseSort","ReverseSortBy","ReverseUpEquilibrium","RevolutionAxis","RevolutionPlot3D","RGBColor","RiccatiSolve","RiceDistribution","RidgeFilter","RiemannR","RiemannSiegelTheta","RiemannSiegelZ","RiemannXi","Riffle","Right","RightArrow","RightArrowBar","RightArrowLeftArrow","RightComposition","RightCosetRepresentative","RightDownTeeVector","RightDownVector","RightDownVectorBar","RightTee","RightTeeArrow","RightTeeVector","RightTriangle","RightTriangleBar","RightTriangleEqual","RightUpDownVector","RightUpTeeVector","RightUpVector","RightUpVectorBar","RightVector","RightVectorBar","RiskAchievementImportance","RiskReductionImportance","RogersTanimotoDissimilarity","RollPitchYawAngles","RollPitchYawMatrix","RomanNumeral","Root","RootApproximant","RootIntervals","RootLocusPlot","RootMeanSquare","RootOfUnityQ","RootReduce","Roots","RootSum","Rotate","RotateLabel","RotateLeft","RotateRight","RotationAction","RotationBox","RotationBoxOptions","RotationMatrix","RotationTransform","Round","RoundImplies","RoundingRadius","Row","RowAlignments","RowBackgrounds","RowBox","RowHeights","RowLines","RowMinHeight","RowReduce","RowsEqual","RowSpacings","RSolve","RSolveValue","RudinShapiro","RudvalisGroupRu","Rule","RuleCondition","RuleDelayed","RuleForm","RulePlot","RulerUnits","Run","RunProcess","RunScheduledTask","RunThrough","RuntimeAttributes","RuntimeOptions","RussellRaoDissimilarity","SameQ","SameTest","SameTestProperties","SampledEntityClass","SampleDepth","SampledSoundFunction","SampledSoundList","SampleRate","SamplingPeriod","SARIMAProcess","SARMAProcess","SASTriangle","SatelliteData","SatisfiabilityCount","SatisfiabilityInstances","SatisfiableQ","Saturday","Save","Saveable","SaveAutoDelete","SaveConnection","SaveDefinitions","SavitzkyGolayMatrix","SawtoothWave","Scale","Scaled","ScaleDivisions","ScaledMousePosition","ScaleOrigin","ScalePadding","ScaleRanges","ScaleRangeStyle","ScalingFunctions","ScalingMatrix","ScalingTransform","Scan","ScheduledTask","ScheduledTaskActiveQ","ScheduledTaskInformation","ScheduledTaskInformationData","ScheduledTaskObject","ScheduledTasks","SchurDecomposition","ScientificForm","ScientificNotationThreshold","ScorerGi","ScorerGiPrime","ScorerHi","ScorerHiPrime","ScreenRectangle","ScreenStyleEnvironment","ScriptBaselineShifts","ScriptForm","ScriptLevel","ScriptMinSize","ScriptRules","ScriptSizeMultipliers","Scrollbars","ScrollingOptions","ScrollPosition","SearchAdjustment","SearchIndexObject","SearchIndices","SearchQueryString","SearchResultObject","Sec","Sech","SechDistribution","SecondOrderConeOptimization","SectionGrouping","SectorChart","SectorChart3D","SectorOrigin","SectorSpacing","SecuredAuthenticationKey","SecuredAuthenticationKeys","SeedRandom","Select","Selectable","SelectComponents","SelectedCells","SelectedNotebook","SelectFirst","Selection","SelectionAnimate","SelectionCell","SelectionCellCreateCell","SelectionCellDefaultStyle","SelectionCellParentStyle","SelectionCreateCell","SelectionDebuggerTag","SelectionDuplicateCell","SelectionEvaluate","SelectionEvaluateCreateCell","SelectionMove","SelectionPlaceholder","SelectionSetStyle","SelectWithContents","SelfLoops","SelfLoopStyle","SemanticImport","SemanticImportString","SemanticInterpretation","SemialgebraicComponentInstances","SemidefiniteOptimization","SendMail","SendMessage","Sequence","SequenceAlignment","SequenceAttentionLayer","SequenceCases","SequenceCount","SequenceFold","SequenceFoldList","SequenceForm","SequenceHold","SequenceLastLayer","SequenceMostLayer","SequencePosition","SequencePredict","SequencePredictorFunction","SequenceReplace","SequenceRestLayer","SequenceReverseLayer","SequenceSplit","Series","SeriesCoefficient","SeriesData","SeriesTermGoal","ServiceConnect","ServiceDisconnect","ServiceExecute","ServiceObject","ServiceRequest","ServiceResponse","ServiceSubmit","SessionSubmit","SessionTime","Set","SetAccuracy","SetAlphaChannel","SetAttributes","Setbacks","SetBoxFormNamesPacket","SetCloudDirectory","SetCookies","SetDelayed","SetDirectory","SetEnvironment","SetEvaluationNotebook","SetFileDate","SetFileLoadingContext","SetNotebookStatusLine","SetOptions","SetOptionsPacket","SetPermissions","SetPrecision","SetProperty","SetSecuredAuthenticationKey","SetSelectedNotebook","SetSharedFunction","SetSharedVariable","SetSpeechParametersPacket","SetStreamPosition","SetSystemModel","SetSystemOptions","Setter","SetterBar","SetterBox","SetterBoxOptions","Setting","SetUsers","SetValue","Shading","Shallow","ShannonWavelet","ShapiroWilkTest","Share","SharingList","Sharpen","ShearingMatrix","ShearingTransform","ShellRegion","ShenCastanMatrix","ShiftedGompertzDistribution","ShiftRegisterSequence","Short","ShortDownArrow","Shortest","ShortestMatch","ShortestPathFunction","ShortLeftArrow","ShortRightArrow","ShortTimeFourier","ShortTimeFourierData","ShortUpArrow","Show","ShowAutoConvert","ShowAutoSpellCheck","ShowAutoStyles","ShowCellBracket","ShowCellLabel","ShowCellTags","ShowClosedCellArea","ShowCodeAssist","ShowContents","ShowControls","ShowCursorTracker","ShowGroupOpenCloseIcon","ShowGroupOpener","ShowInvisibleCharacters","ShowPageBreaks","ShowPredictiveInterface","ShowSelection","ShowShortBoxForm","ShowSpecialCharacters","ShowStringCharacters","ShowSyntaxStyles","ShrinkingDelay","ShrinkWrapBoundingBox","SiderealTime","SiegelTheta","SiegelTukeyTest","SierpinskiCurve","SierpinskiMesh","Sign","Signature","SignedRankTest","SignedRegionDistance","SignificanceLevel","SignPadding","SignTest","SimilarityRules","SimpleGraph","SimpleGraphQ","SimplePolygonQ","SimplePolyhedronQ","Simplex","Simplify","Sin","Sinc","SinghMaddalaDistribution","SingleEvaluation","SingleLetterItalics","SingleLetterStyle","SingularValueDecomposition","SingularValueList","SingularValuePlot","SingularValues","Sinh","SinhIntegral","SinIntegral","SixJSymbol","Skeleton","SkeletonTransform","SkellamDistribution","Skewness","SkewNormalDistribution","SkinStyle","Skip","SliceContourPlot3D","SliceDensityPlot3D","SliceDistribution","SliceVectorPlot3D","Slider","Slider2D","Slider2DBox","Slider2DBoxOptions","SliderBox","SliderBoxOptions","SlideView","Slot","SlotSequence","Small","SmallCircle","Smaller","SmithDecomposition","SmithDelayCompensator","SmithWatermanSimilarity","SmoothDensityHistogram","SmoothHistogram","SmoothHistogram3D","SmoothKernelDistribution","SnDispersion","Snippet","SnubPolyhedron","SocialMediaData","Socket","SocketConnect","SocketListen","SocketListener","SocketObject","SocketOpen","SocketReadMessage","SocketReadyQ","Sockets","SocketWaitAll","SocketWaitNext","SoftmaxLayer","SokalSneathDissimilarity","SolarEclipse","SolarSystemFeatureData","SolidAngle","SolidData","SolidRegionQ","Solve","SolveAlways","SolveDelayed","Sort","SortBy","SortedBy","SortedEntityClass","Sound","SoundAndGraphics","SoundNote","SoundVolume","SourceLink","Sow","Space","SpaceCurveData","SpaceForm","Spacer","Spacings","Span","SpanAdjustments","SpanCharacterRounding","SpanFromAbove","SpanFromBoth","SpanFromLeft","SpanLineThickness","SpanMaxSize","SpanMinSize","SpanningCharacters","SpanSymmetric","SparseArray","SpatialGraphDistribution","SpatialMedian","SpatialTransformationLayer","Speak","SpeakerMatchQ","SpeakTextPacket","SpearmanRankTest","SpearmanRho","SpeciesData","SpecificityGoal","SpectralLineData","Spectrogram","SpectrogramArray","Specularity","SpeechCases","SpeechInterpreter","SpeechRecognize","SpeechSynthesize","SpellingCorrection","SpellingCorrectionList","SpellingDictionaries","SpellingDictionariesPath","SpellingOptions","SpellingSuggestionsPacket","Sphere","SphereBox","SpherePoints","SphericalBesselJ","SphericalBesselY","SphericalHankelH1","SphericalHankelH2","SphericalHarmonicY","SphericalPlot3D","SphericalRegion","SphericalShell","SpheroidalEigenvalue","SpheroidalJoiningFactor","SpheroidalPS","SpheroidalPSPrime","SpheroidalQS","SpheroidalQSPrime","SpheroidalRadialFactor","SpheroidalS1","SpheroidalS1Prime","SpheroidalS2","SpheroidalS2Prime","Splice","SplicedDistribution","SplineClosed","SplineDegree","SplineKnots","SplineWeights","Split","SplitBy","SpokenString","Sqrt","SqrtBox","SqrtBoxOptions","Square","SquaredEuclideanDistance","SquareFreeQ","SquareIntersection","SquareMatrixQ","SquareRepeatingElement","SquaresR","SquareSubset","SquareSubsetEqual","SquareSuperset","SquareSupersetEqual","SquareUnion","SquareWave","SSSTriangle","StabilityMargins","StabilityMarginsStyle","StableDistribution","Stack","StackBegin","StackComplete","StackedDateListPlot","StackedListPlot","StackInhibit","StadiumShape","StandardAtmosphereData","StandardDeviation","StandardDeviationFilter","StandardForm","Standardize","Standardized","StandardOceanData","StandbyDistribution","Star","StarClusterData","StarData","StarGraph","StartAsynchronousTask","StartExternalSession","StartingStepSize","StartOfLine","StartOfString","StartProcess","StartScheduledTask","StartupSound","StartWebSession","StateDimensions","StateFeedbackGains","StateOutputEstimator","StateResponse","StateSpaceModel","StateSpaceRealization","StateSpaceTransform","StateTransformationLinearize","StationaryDistribution","StationaryWaveletPacketTransform","StationaryWaveletTransform","StatusArea","StatusCentrality","StepMonitor","StereochemistryElements","StieltjesGamma","StippleShading","StirlingS1","StirlingS2","StopAsynchronousTask","StoppingPowerData","StopScheduledTask","StrataVariables","StratonovichProcess","StreamColorFunction","StreamColorFunctionScaling","StreamDensityPlot","StreamMarkers","StreamPlot","StreamPoints","StreamPosition","Streams","StreamScale","StreamStyle","String","StringBreak","StringByteCount","StringCases","StringContainsQ","StringCount","StringDelete","StringDrop","StringEndsQ","StringExpression","StringExtract","StringForm","StringFormat","StringFreeQ","StringInsert","StringJoin","StringLength","StringMatchQ","StringPadLeft","StringPadRight","StringPart","StringPartition","StringPosition","StringQ","StringRepeat","StringReplace","StringReplaceList","StringReplacePart","StringReverse","StringRiffle","StringRotateLeft","StringRotateRight","StringSkeleton","StringSplit","StringStartsQ","StringTake","StringTemplate","StringToByteArray","StringToStream","StringTrim","StripBoxes","StripOnInput","StripWrapperBoxes","StrokeForm","StructuralImportance","StructuredArray","StructuredArrayHeadQ","StructuredSelection","StruveH","StruveL","Stub","StudentTDistribution","Style","StyleBox","StyleBoxAutoDelete","StyleData","StyleDefinitions","StyleForm","StyleHints","StyleKeyMapping","StyleMenuListing","StyleNameDialogSettings","StyleNames","StylePrint","StyleSheetPath","Subdivide","Subfactorial","Subgraph","SubMinus","SubPlus","SubresultantPolynomialRemainders","SubresultantPolynomials","Subresultants","Subscript","SubscriptBox","SubscriptBoxOptions","Subscripted","Subsequences","Subset","SubsetCases","SubsetCount","SubsetEqual","SubsetMap","SubsetPosition","SubsetQ","SubsetReplace","Subsets","SubStar","SubstitutionSystem","Subsuperscript","SubsuperscriptBox","SubsuperscriptBoxOptions","SubtitleEncoding","SubtitleTracks","Subtract","SubtractFrom","SubtractSides","SubValues","Succeeds","SucceedsEqual","SucceedsSlantEqual","SucceedsTilde","Success","SuchThat","Sum","SumConvergence","SummationLayer","Sunday","SunPosition","Sunrise","Sunset","SuperDagger","SuperMinus","SupernovaData","SuperPlus","Superscript","SuperscriptBox","SuperscriptBoxOptions","Superset","SupersetEqual","SuperStar","Surd","SurdForm","SurfaceAppearance","SurfaceArea","SurfaceColor","SurfaceData","SurfaceGraphics","SurvivalDistribution","SurvivalFunction","SurvivalModel","SurvivalModelFit","SuspendPacket","SuzukiDistribution","SuzukiGroupSuz","SwatchLegend","Switch","Symbol","SymbolName","SymletWavelet","Symmetric","SymmetricGroup","SymmetricKey","SymmetricMatrixQ","SymmetricPolynomial","SymmetricReduction","Symmetrize","SymmetrizedArray","SymmetrizedArrayRules","SymmetrizedDependentComponents","SymmetrizedIndependentComponents","SymmetrizedReplacePart","SynchronousInitialization","SynchronousUpdating","Synonyms","Syntax","SyntaxForm","SyntaxInformation","SyntaxLength","SyntaxPacket","SyntaxQ","SynthesizeMissingValues","SystemCredential","SystemCredentialData","SystemCredentialKey","SystemCredentialKeys","SystemCredentialStoreObject","SystemDialogInput","SystemException","SystemGet","SystemHelpPath","SystemInformation","SystemInformationData","SystemInstall","SystemModel","SystemModeler","SystemModelExamples","SystemModelLinearize","SystemModelParametricSimulate","SystemModelPlot","SystemModelProgressReporting","SystemModelReliability","SystemModels","SystemModelSimulate","SystemModelSimulateSensitivity","SystemModelSimulationData","SystemOpen","SystemOptions","SystemProcessData","SystemProcesses","SystemsConnectionsModel","SystemsModelDelay","SystemsModelDelayApproximate","SystemsModelDelete","SystemsModelDimensions","SystemsModelExtract","SystemsModelFeedbackConnect","SystemsModelLabels","SystemsModelLinearity","SystemsModelMerge","SystemsModelOrder","SystemsModelParallelConnect","SystemsModelSeriesConnect","SystemsModelStateFeedbackConnect","SystemsModelVectorRelativeOrders","SystemStub","SystemTest","Tab","TabFilling","Table","TableAlignments","TableDepth","TableDirections","TableForm","TableHeadings","TableSpacing","TableView","TableViewBox","TableViewBoxBackground","TableViewBoxItemSize","TableViewBoxOptions","TabSpacings","TabView","TabViewBox","TabViewBoxOptions","TagBox","TagBoxNote","TagBoxOptions","TaggingRules","TagSet","TagSetDelayed","TagStyle","TagUnset","Take","TakeDrop","TakeLargest","TakeLargestBy","TakeList","TakeSmallest","TakeSmallestBy","TakeWhile","Tally","Tan","Tanh","TargetDevice","TargetFunctions","TargetSystem","TargetUnits","TaskAbort","TaskExecute","TaskObject","TaskRemove","TaskResume","Tasks","TaskSuspend","TaskWait","TautologyQ","TelegraphProcess","TemplateApply","TemplateArgBox","TemplateBox","TemplateBoxOptions","TemplateEvaluate","TemplateExpression","TemplateIf","TemplateObject","TemplateSequence","TemplateSlot","TemplateSlotSequence","TemplateUnevaluated","TemplateVerbatim","TemplateWith","TemporalData","TemporalRegularity","Temporary","TemporaryVariable","TensorContract","TensorDimensions","TensorExpand","TensorProduct","TensorQ","TensorRank","TensorReduce","TensorSymmetry","TensorTranspose","TensorWedge","TestID","TestReport","TestReportObject","TestResultObject","Tetrahedron","TetrahedronBox","TetrahedronBoxOptions","TeXForm","TeXSave","Text","Text3DBox","Text3DBoxOptions","TextAlignment","TextBand","TextBoundingBox","TextBox","TextCases","TextCell","TextClipboardType","TextContents","TextData","TextElement","TextForm","TextGrid","TextJustification","TextLine","TextPacket","TextParagraph","TextPosition","TextRecognize","TextSearch","TextSearchReport","TextSentences","TextString","TextStructure","TextStyle","TextTranslation","Texture","TextureCoordinateFunction","TextureCoordinateScaling","TextWords","Therefore","ThermodynamicData","ThermometerGauge","Thick","Thickness","Thin","Thinning","ThisLink","ThompsonGroupTh","Thread","ThreadingLayer","ThreeJSymbol","Threshold","Through","Throw","ThueMorse","Thumbnail","Thursday","Ticks","TicksStyle","TideData","Tilde","TildeEqual","TildeFullEqual","TildeTilde","TimeConstrained","TimeConstraint","TimeDirection","TimeFormat","TimeGoal","TimelinePlot","TimeObject","TimeObjectQ","TimeRemaining","Times","TimesBy","TimeSeries","TimeSeriesAggregate","TimeSeriesForecast","TimeSeriesInsert","TimeSeriesInvertibility","TimeSeriesMap","TimeSeriesMapThread","TimeSeriesModel","TimeSeriesModelFit","TimeSeriesResample","TimeSeriesRescale","TimeSeriesShift","TimeSeriesThread","TimeSeriesWindow","TimeUsed","TimeValue","TimeWarpingCorrespondence","TimeWarpingDistance","TimeZone","TimeZoneConvert","TimeZoneOffset","Timing","Tiny","TitleGrouping","TitsGroupT","ToBoxes","ToCharacterCode","ToColor","ToContinuousTimeModel","ToDate","Today","ToDiscreteTimeModel","ToEntity","ToeplitzMatrix","ToExpression","ToFileName","Together","Toggle","ToggleFalse","Toggler","TogglerBar","TogglerBox","TogglerBoxOptions","ToHeldExpression","ToInvertibleTimeSeries","TokenWords","Tolerance","ToLowerCase","Tomorrow","ToNumberField","TooBig","Tooltip","TooltipBox","TooltipBoxOptions","TooltipDelay","TooltipStyle","ToonShading","Top","TopHatTransform","ToPolarCoordinates","TopologicalSort","ToRadicals","ToRules","ToSphericalCoordinates","ToString","Total","TotalHeight","TotalLayer","TotalVariationFilter","TotalWidth","TouchPosition","TouchscreenAutoZoom","TouchscreenControlPlacement","ToUpperCase","Tr","Trace","TraceAbove","TraceAction","TraceBackward","TraceDepth","TraceDialog","TraceForward","TraceInternal","TraceLevel","TraceOff","TraceOn","TraceOriginal","TracePrint","TraceScan","TrackedSymbols","TrackingFunction","TracyWidomDistribution","TradingChart","TraditionalForm","TraditionalFunctionNotation","TraditionalNotation","TraditionalOrder","TrainingProgressCheckpointing","TrainingProgressFunction","TrainingProgressMeasurements","TrainingProgressReporting","TrainingStoppingCriterion","TrainingUpdateSchedule","TransferFunctionCancel","TransferFunctionExpand","TransferFunctionFactor","TransferFunctionModel","TransferFunctionPoles","TransferFunctionTransform","TransferFunctionZeros","TransformationClass","TransformationFunction","TransformationFunctions","TransformationMatrix","TransformedDistribution","TransformedField","TransformedProcess","TransformedRegion","TransitionDirection","TransitionDuration","TransitionEffect","TransitiveClosureGraph","TransitiveReductionGraph","Translate","TranslationOptions","TranslationTransform","Transliterate","Transparent","TransparentColor","Transpose","TransposeLayer","TrapSelection","TravelDirections","TravelDirectionsData","TravelDistance","TravelDistanceList","TravelMethod","TravelTime","TreeForm","TreeGraph","TreeGraphQ","TreePlot","TrendStyle","Triangle","TriangleCenter","TriangleConstruct","TriangleMeasurement","TriangleWave","TriangularDistribution","TriangulateMesh","Trig","TrigExpand","TrigFactor","TrigFactorList","Trigger","TrigReduce","TrigToExp","TrimmedMean","TrimmedVariance","TropicalStormData","True","TrueQ","TruncatedDistribution","TruncatedPolyhedron","TsallisQExponentialDistribution","TsallisQGaussianDistribution","TTest","Tube","TubeBezierCurveBox","TubeBezierCurveBoxOptions","TubeBox","TubeBoxOptions","TubeBSplineCurveBox","TubeBSplineCurveBoxOptions","Tuesday","TukeyLambdaDistribution","TukeyWindow","TunnelData","Tuples","TuranGraph","TuringMachine","TuttePolynomial","TwoWayRule","Typed","TypeSpecifier","UnateQ","Uncompress","UnconstrainedParameters","Undefined","UnderBar","Underflow","Underlined","Underoverscript","UnderoverscriptBox","UnderoverscriptBoxOptions","Underscript","UnderscriptBox","UnderscriptBoxOptions","UnderseaFeatureData","UndirectedEdge","UndirectedGraph","UndirectedGraphQ","UndoOptions","UndoTrackedVariables","Unequal","UnequalTo","Unevaluated","UniformDistribution","UniformGraphDistribution","UniformPolyhedron","UniformSumDistribution","Uninstall","Union","UnionedEntityClass","UnionPlus","Unique","UnitaryMatrixQ","UnitBox","UnitConvert","UnitDimensions","Unitize","UnitRootTest","UnitSimplify","UnitStep","UnitSystem","UnitTriangle","UnitVector","UnitVectorLayer","UnityDimensions","UniverseModelData","UniversityData","UnixTime","Unprotect","UnregisterExternalEvaluator","UnsameQ","UnsavedVariables","Unset","UnsetShared","UntrackedVariables","Up","UpArrow","UpArrowBar","UpArrowDownArrow","Update","UpdateDynamicObjects","UpdateDynamicObjectsSynchronous","UpdateInterval","UpdatePacletSites","UpdateSearchIndex","UpDownArrow","UpEquilibrium","UpperCaseQ","UpperLeftArrow","UpperRightArrow","UpperTriangularize","UpperTriangularMatrixQ","Upsample","UpSet","UpSetDelayed","UpTee","UpTeeArrow","UpTo","UpValues","URL","URLBuild","URLDecode","URLDispatcher","URLDownload","URLDownloadSubmit","URLEncode","URLExecute","URLExpand","URLFetch","URLFetchAsynchronous","URLParse","URLQueryDecode","URLQueryEncode","URLRead","URLResponseTime","URLSave","URLSaveAsynchronous","URLShorten","URLSubmit","UseGraphicsRange","UserDefinedWavelet","Using","UsingFrontEnd","UtilityFunction","V2Get","ValenceErrorHandling","ValidationLength","ValidationSet","Value","ValueBox","ValueBoxOptions","ValueDimensions","ValueForm","ValuePreprocessingFunction","ValueQ","Values","ValuesData","Variables","Variance","VarianceEquivalenceTest","VarianceEstimatorFunction","VarianceGammaDistribution","VarianceTest","VectorAngle","VectorAround","VectorAspectRatio","VectorColorFunction","VectorColorFunctionScaling","VectorDensityPlot","VectorGlyphData","VectorGreater","VectorGreaterEqual","VectorLess","VectorLessEqual","VectorMarkers","VectorPlot","VectorPlot3D","VectorPoints","VectorQ","VectorRange","Vectors","VectorScale","VectorScaling","VectorSizes","VectorStyle","Vee","Verbatim","Verbose","VerboseConvertToPostScriptPacket","VerificationTest","VerifyConvergence","VerifyDerivedKey","VerifyDigitalSignature","VerifyFileSignature","VerifyInterpretation","VerifySecurityCertificates","VerifySolutions","VerifyTestAssumptions","Version","VersionedPreferences","VersionNumber","VertexAdd","VertexCapacity","VertexColors","VertexComponent","VertexConnectivity","VertexContract","VertexCoordinateRules","VertexCoordinates","VertexCorrelationSimilarity","VertexCosineSimilarity","VertexCount","VertexCoverQ","VertexDataCoordinates","VertexDegree","VertexDelete","VertexDiceSimilarity","VertexEccentricity","VertexInComponent","VertexInDegree","VertexIndex","VertexJaccardSimilarity","VertexLabeling","VertexLabels","VertexLabelStyle","VertexList","VertexNormals","VertexOutComponent","VertexOutDegree","VertexQ","VertexRenderingFunction","VertexReplace","VertexShape","VertexShapeFunction","VertexSize","VertexStyle","VertexTextureCoordinates","VertexWeight","VertexWeightedGraphQ","Vertical","VerticalBar","VerticalForm","VerticalGauge","VerticalSeparator","VerticalSlider","VerticalTilde","Video","VideoEncoding","VideoExtractFrames","VideoFrameList","VideoFrameMap","VideoPause","VideoPlay","VideoQ","VideoStop","VideoStream","VideoStreams","VideoTimeSeries","VideoTracks","VideoTrim","ViewAngle","ViewCenter","ViewMatrix","ViewPoint","ViewPointSelectorSettings","ViewPort","ViewProjection","ViewRange","ViewVector","ViewVertical","VirtualGroupData","Visible","VisibleCell","VoiceStyleData","VoigtDistribution","VolcanoData","Volume","VonMisesDistribution","VoronoiMesh","WaitAll","WaitAsynchronousTask","WaitNext","WaitUntil","WakebyDistribution","WalleniusHypergeometricDistribution","WaringYuleDistribution","WarpingCorrespondence","WarpingDistance","WatershedComponents","WatsonUSquareTest","WattsStrogatzGraphDistribution","WaveletBestBasis","WaveletFilterCoefficients","WaveletImagePlot","WaveletListPlot","WaveletMapIndexed","WaveletMatrixPlot","WaveletPhi","WaveletPsi","WaveletScale","WaveletScalogram","WaveletThreshold","WeaklyConnectedComponents","WeaklyConnectedGraphComponents","WeaklyConnectedGraphQ","WeakStationarity","WeatherData","WeatherForecastData","WebAudioSearch","WebElementObject","WeberE","WebExecute","WebImage","WebImageSearch","WebSearch","WebSessionObject","WebSessions","WebWindowObject","Wedge","Wednesday","WeibullDistribution","WeierstrassE1","WeierstrassE2","WeierstrassE3","WeierstrassEta1","WeierstrassEta2","WeierstrassEta3","WeierstrassHalfPeriods","WeierstrassHalfPeriodW1","WeierstrassHalfPeriodW2","WeierstrassHalfPeriodW3","WeierstrassInvariantG2","WeierstrassInvariantG3","WeierstrassInvariants","WeierstrassP","WeierstrassPPrime","WeierstrassSigma","WeierstrassZeta","WeightedAdjacencyGraph","WeightedAdjacencyMatrix","WeightedData","WeightedGraphQ","Weights","WelchWindow","WheelGraph","WhenEvent","Which","While","White","WhiteNoiseProcess","WhitePoint","Whitespace","WhitespaceCharacter","WhittakerM","WhittakerW","WienerFilter","WienerProcess","WignerD","WignerSemicircleDistribution","WikidataData","WikidataSearch","WikipediaData","WikipediaSearch","WilksW","WilksWTest","WindDirectionData","WindingCount","WindingPolygon","WindowClickSelect","WindowElements","WindowFloating","WindowFrame","WindowFrameElements","WindowMargins","WindowMovable","WindowOpacity","WindowPersistentStyles","WindowSelected","WindowSize","WindowStatusArea","WindowTitle","WindowToolbars","WindowWidth","WindSpeedData","WindVectorData","WinsorizedMean","WinsorizedVariance","WishartMatrixDistribution","With","WolframAlpha","WolframAlphaDate","WolframAlphaQuantity","WolframAlphaResult","WolframLanguageData","Word","WordBoundary","WordCharacter","WordCloud","WordCount","WordCounts","WordData","WordDefinition","WordFrequency","WordFrequencyData","WordList","WordOrientation","WordSearch","WordSelectionFunction","WordSeparators","WordSpacings","WordStem","WordTranslation","WorkingPrecision","WrapAround","Write","WriteLine","WriteString","Wronskian","XMLElement","XMLObject","XMLTemplate","Xnor","Xor","XYZColor","Yellow","Yesterday","YuleDissimilarity","ZernikeR","ZeroSymmetric","ZeroTest","ZeroWidthTimes","Zeta","ZetaZero","ZIPCodeData","ZipfDistribution","ZoomCenter","ZoomFactor","ZTest","ZTransform","$Aborted","$ActivationGroupID","$ActivationKey","$ActivationUserRegistered","$AddOnsDirectory","$AllowDataUpdates","$AllowExternalChannelFunctions","$AllowInternet","$AssertFunction","$Assumptions","$AsynchronousTask","$AudioDecoders","$AudioEncoders","$AudioInputDevices","$AudioOutputDevices","$BaseDirectory","$BasePacletsDirectory","$BatchInput","$BatchOutput","$BlockchainBase","$BoxForms","$ByteOrdering","$CacheBaseDirectory","$Canceled","$ChannelBase","$CharacterEncoding","$CharacterEncodings","$CloudAccountName","$CloudBase","$CloudConnected","$CloudConnection","$CloudCreditsAvailable","$CloudEvaluation","$CloudExpressionBase","$CloudObjectNameFormat","$CloudObjectURLType","$CloudRootDirectory","$CloudSymbolBase","$CloudUserID","$CloudUserUUID","$CloudVersion","$CloudVersionNumber","$CloudWolframEngineVersionNumber","$CommandLine","$CompilationTarget","$ConditionHold","$ConfiguredKernels","$Context","$ContextPath","$ControlActiveSetting","$Cookies","$CookieStore","$CreationDate","$CurrentLink","$CurrentTask","$CurrentWebSession","$DataStructures","$DateStringFormat","$DefaultAudioInputDevice","$DefaultAudioOutputDevice","$DefaultFont","$DefaultFrontEnd","$DefaultImagingDevice","$DefaultLocalBase","$DefaultMailbox","$DefaultNetworkInterface","$DefaultPath","$DefaultProxyRules","$DefaultSystemCredentialStore","$Display","$DisplayFunction","$DistributedContexts","$DynamicEvaluation","$Echo","$EmbedCodeEnvironments","$EmbeddableServices","$EntityStores","$Epilog","$EvaluationCloudBase","$EvaluationCloudObject","$EvaluationEnvironment","$ExportFormats","$ExternalIdentifierTypes","$ExternalStorageBase","$Failed","$FinancialDataSource","$FontFamilies","$FormatType","$FrontEnd","$FrontEndSession","$GeoEntityTypes","$GeoLocation","$GeoLocationCity","$GeoLocationCountry","$GeoLocationPrecision","$GeoLocationSource","$HistoryLength","$HomeDirectory","$HTMLExportRules","$HTTPCookies","$HTTPRequest","$IgnoreEOF","$ImageFormattingWidth","$ImageResolution","$ImagingDevice","$ImagingDevices","$ImportFormats","$IncomingMailSettings","$InitialDirectory","$Initialization","$InitializationContexts","$Input","$InputFileName","$InputStreamMethods","$Inspector","$InstallationDate","$InstallationDirectory","$InterfaceEnvironment","$InterpreterTypes","$IterationLimit","$KernelCount","$KernelID","$Language","$LaunchDirectory","$LibraryPath","$LicenseExpirationDate","$LicenseID","$LicenseProcesses","$LicenseServer","$LicenseSubprocesses","$LicenseType","$Line","$Linked","$LinkSupported","$LoadedFiles","$LocalBase","$LocalSymbolBase","$MachineAddresses","$MachineDomain","$MachineDomains","$MachineEpsilon","$MachineID","$MachineName","$MachinePrecision","$MachineType","$MaxExtraPrecision","$MaxLicenseProcesses","$MaxLicenseSubprocesses","$MaxMachineNumber","$MaxNumber","$MaxPiecewiseCases","$MaxPrecision","$MaxRootDegree","$MessageGroups","$MessageList","$MessagePrePrint","$Messages","$MinMachineNumber","$MinNumber","$MinorReleaseNumber","$MinPrecision","$MobilePhone","$ModuleNumber","$NetworkConnected","$NetworkInterfaces","$NetworkLicense","$NewMessage","$NewSymbol","$NotebookInlineStorageLimit","$Notebooks","$NoValue","$NumberMarks","$Off","$OperatingSystem","$Output","$OutputForms","$OutputSizeLimit","$OutputStreamMethods","$Packages","$ParentLink","$ParentProcessID","$PasswordFile","$PatchLevelID","$Path","$PathnameSeparator","$PerformanceGoal","$Permissions","$PermissionsGroupBase","$PersistenceBase","$PersistencePath","$PipeSupported","$PlotTheme","$Post","$Pre","$PreferencesDirectory","$PreInitialization","$PrePrint","$PreRead","$PrintForms","$PrintLiteral","$Printout3DPreviewer","$ProcessID","$ProcessorCount","$ProcessorType","$ProductInformation","$ProgramName","$PublisherID","$RandomState","$RecursionLimit","$RegisteredDeviceClasses","$RegisteredUserName","$ReleaseNumber","$RequesterAddress","$RequesterWolframID","$RequesterWolframUUID","$RootDirectory","$ScheduledTask","$ScriptCommandLine","$ScriptInputString","$SecuredAuthenticationKeyTokens","$ServiceCreditsAvailable","$Services","$SessionID","$SetParentLink","$SharedFunctions","$SharedVariables","$SoundDisplay","$SoundDisplayFunction","$SourceLink","$SSHAuthentication","$SubtitleDecoders","$SubtitleEncoders","$SummaryBoxDataSizeLimit","$SuppressInputFormHeads","$SynchronousEvaluation","$SyntaxHandler","$System","$SystemCharacterEncoding","$SystemCredentialStore","$SystemID","$SystemMemory","$SystemShell","$SystemTimeZone","$SystemWordLength","$TemplatePath","$TemporaryDirectory","$TemporaryPrefix","$TestFileName","$TextStyle","$TimedOut","$TimeUnit","$TimeZone","$TimeZoneEntity","$TopDirectory","$TraceOff","$TraceOn","$TracePattern","$TracePostAction","$TracePreAction","$UnitSystem","$Urgent","$UserAddOnsDirectory","$UserAgentLanguages","$UserAgentMachine","$UserAgentName","$UserAgentOperatingSystem","$UserAgentString","$UserAgentVersion","$UserBaseDirectory","$UserBasePacletsDirectory","$UserDocumentsDirectory","$Username","$UserName","$UserURLBase","$Version","$VersionNumber","$VideoDecoders","$VideoEncoders","$VoiceStyles","$WolframDocumentsDirectory","$WolframID","$WolframUUID"];e.exports=function(e){const t=e.regex,r=t.either(t.concat(/([2-9]|[1-2]\d|[3][0-5])\^\^/,/(\w*\.\w+|\w+\.\w*|\w+)/),/(\d*\.\d+|\d+\.\d*|\d+)/),i=t.either(/``[+-]?(\d*\.\d+|\d+\.\d*|\d+)/,/`([+-]?(\d*\.\d+|\d+\.\d*|\d+))?/),o={className:"number",relevance:0,begin:t.concat(r,t.optional(i),t.optional(/\*\^[+-]?\d+/))},a=/[a-zA-Z$][a-zA-Z0-9$]*/,s=new Set(n),l={variants:[{className:"builtin-symbol",begin:a,"on:begin":(e,t)=>{s.has(e[0])||t.ignoreMatch()}},{className:"symbol",relevance:0,begin:a}]},c={className:"message-name",relevance:0,begin:t.concat("::",a)};return{name:"Mathematica",aliases:["mma","wl"],classNameAliases:{brace:"punctuation",pattern:"type",slot:"type",symbol:"variable","named-character":"variable","builtin-symbol":"built_in","message-name":"string"},contains:[e.COMMENT(/\(\*/,/\*\)/,{contains:["self"]}),{className:"pattern",relevance:0,begin:/([a-zA-Z$][a-zA-Z0-9$]*)?_+([a-zA-Z$][a-zA-Z0-9$]*)?/},{className:"slot",relevance:0,begin:/#[a-zA-Z$][a-zA-Z0-9$]*|#+[0-9]?/},c,l,{className:"named-character",begin:/\\\[[$a-zA-Z][$a-zA-Z0-9]+\]/},e.QUOTE_STRING_MODE,o,{className:"operator",relevance:0,begin:/[+\-*/,;.:@~=><&|_`'^?!%]+/},{className:"brace",relevance:0,begin:/[[\](){}]/}]}}},function(e,t){e.exports=function(e){const t="('|\\.')+",n={relevance:0,contains:[{begin:t}]};return{name:"Matlab",keywords:{keyword:"arguments break case catch classdef continue else elseif end enumeration events for function global if methods otherwise parfor persistent properties return spmd switch try while",built_in:"sin sind sinh asin asind asinh cos cosd cosh acos acosd acosh tan tand tanh atan atand atan2 atanh sec secd sech asec asecd asech csc cscd csch acsc acscd acsch cot cotd coth acot acotd acoth hypot exp expm1 log log1p log10 log2 pow2 realpow reallog realsqrt sqrt nthroot nextpow2 abs angle complex conj imag real unwrap isreal cplxpair fix floor ceil round mod rem sign airy besselj bessely besselh besseli besselk beta betainc betaln ellipj ellipke erf erfc erfcx erfinv expint gamma gammainc gammaln psi legendre cross dot factor isprime primes gcd lcm rat rats perms nchoosek factorial cart2sph cart2pol pol2cart sph2cart hsv2rgb rgb2hsv zeros ones eye repmat rand randn linspace logspace freqspace meshgrid accumarray size length ndims numel disp isempty isequal isequalwithequalnans cat reshape diag blkdiag tril triu fliplr flipud flipdim rot90 find sub2ind ind2sub bsxfun ndgrid permute ipermute shiftdim circshift squeeze isscalar isvector ans eps realmax realmin pi i|0 inf nan isnan isinf isfinite j|0 why compan gallery hadamard hankel hilb invhilb magic pascal rosser toeplitz vander wilkinson max min nanmax nanmin mean nanmean type table readtable writetable sortrows sort figure plot plot3 scatter scatter3 cellfun legend intersect ismember procrustes hold num2cell "},illegal:'(//|"|#|/\\*|\\s+/\\w+)',contains:[{className:"function",beginKeywords:"function",end:"$",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",variants:[{begin:"\\(",end:"\\)"},{begin:"\\[",end:"\\]"}]}]},{className:"built_in",begin:/true|false/,relevance:0,starts:n},{begin:"[a-zA-Z][a-zA-Z_0-9]*"+t,relevance:0},{className:"number",begin:e.C_NUMBER_RE,relevance:0,starts:n},{className:"string",begin:"'",end:"'",contains:[{begin:"''"}]},{begin:/\]|\}|\)/,relevance:0,starts:n},{className:"string",begin:'"',end:'"',contains:[{begin:'""'}],starts:n},e.COMMENT("^\\s*%\\{\\s*$","^\\s*%\\}\\s*$"),e.COMMENT("%","$")]}}},function(e,t){e.exports=function(e){return{name:"Maxima",keywords:{$pattern:"[A-Za-z_%][0-9A-Za-z_%]*",keyword:"if then else elseif for thru do while unless step in and or not",literal:"true false unknown inf minf ind und %e %i %pi %phi %gamma",built_in:" abasep abs absint absolute_real_time acos acosh acot acoth acsc acsch activate addcol add_edge add_edges addmatrices addrow add_vertex add_vertices adjacency_matrix adjoin adjoint af agd airy airy_ai airy_bi airy_dai airy_dbi algsys alg_type alias allroots alphacharp alphanumericp amortization %and annuity_fv annuity_pv antid antidiff AntiDifference append appendfile apply apply1 apply2 applyb1 apropos args arit_amortization arithmetic arithsum array arrayapply arrayinfo arraymake arraysetapply ascii asec asech asin asinh askinteger asksign assoc assoc_legendre_p assoc_legendre_q assume assume_external_byte_order asympa at atan atan2 atanh atensimp atom atvalue augcoefmatrix augmented_lagrangian_method av average_degree backtrace bars barsplot barsplot_description base64 base64_decode bashindices batch batchload bc2 bdvac belln benefit_cost bern bernpoly bernstein_approx bernstein_expand bernstein_poly bessel bessel_i bessel_j bessel_k bessel_simplify bessel_y beta beta_incomplete beta_incomplete_generalized beta_incomplete_regularized bezout bfallroots bffac bf_find_root bf_fmin_cobyla bfhzeta bfloat bfloatp bfpsi bfpsi0 bfzeta biconnected_components bimetric binomial bipartition block blockmatrixp bode_gain bode_phase bothcoef box boxplot boxplot_description break bug_report build_info|10 buildq build_sample burn cabs canform canten cardinality carg cartan cartesian_product catch cauchy_matrix cbffac cdf_bernoulli cdf_beta cdf_binomial cdf_cauchy cdf_chi2 cdf_continuous_uniform cdf_discrete_uniform cdf_exp cdf_f cdf_gamma cdf_general_finite_discrete cdf_geometric cdf_gumbel cdf_hypergeometric cdf_laplace cdf_logistic cdf_lognormal cdf_negative_binomial cdf_noncentral_chi2 cdf_noncentral_student_t cdf_normal cdf_pareto cdf_poisson cdf_rank_sum cdf_rayleigh cdf_signed_rank cdf_student_t cdf_weibull cdisplay ceiling central_moment cequal cequalignore cf cfdisrep cfexpand cgeodesic cgreaterp cgreaterpignore changename changevar chaosgame charat charfun charfun2 charlist charp charpoly chdir chebyshev_t chebyshev_u checkdiv check_overlaps chinese cholesky christof chromatic_index chromatic_number cint circulant_graph clear_edge_weight clear_rules clear_vertex_label clebsch_gordan clebsch_graph clessp clesspignore close closefile cmetric coeff coefmatrix cograd col collapse collectterms columnop columnspace columnswap columnvector combination combine comp2pui compare compfile compile compile_file complement_graph complete_bipartite_graph complete_graph complex_number_p components compose_functions concan concat conjugate conmetderiv connected_components connect_vertices cons constant constantp constituent constvalue cont2part content continuous_freq contortion contour_plot contract contract_edge contragrad contrib_ode convert coord copy copy_file copy_graph copylist copymatrix cor cos cosh cot coth cov cov1 covdiff covect covers crc24sum create_graph create_list csc csch csetup cspline ctaylor ct_coordsys ctransform ctranspose cube_graph cuboctahedron_graph cunlisp cv cycle_digraph cycle_graph cylindrical days360 dblint deactivate declare declare_constvalue declare_dimensions declare_fundamental_dimensions declare_fundamental_units declare_qty declare_translated declare_unit_conversion declare_units declare_weights decsym defcon define define_alt_display define_variable defint defmatch defrule defstruct deftaylor degree_sequence del delete deleten delta demo demoivre denom depends derivdegree derivlist describe desolve determinant dfloat dgauss_a dgauss_b dgeev dgemm dgeqrf dgesv dgesvd diag diagmatrix diag_matrix diagmatrixp diameter diff digitcharp dimacs_export dimacs_import dimension dimensionless dimensions dimensions_as_list direct directory discrete_freq disjoin disjointp disolate disp dispcon dispform dispfun dispJordan display disprule dispterms distrib divide divisors divsum dkummer_m dkummer_u dlange dodecahedron_graph dotproduct dotsimp dpart draw draw2d draw3d drawdf draw_file draw_graph dscalar echelon edge_coloring edge_connectivity edges eigens_by_jacobi eigenvalues eigenvectors eighth einstein eivals eivects elapsed_real_time elapsed_run_time ele2comp ele2polynome ele2pui elem elementp elevation_grid elim elim_allbut eliminate eliminate_using ellipse elliptic_e elliptic_ec elliptic_eu elliptic_f elliptic_kc elliptic_pi ematrix empty_graph emptyp endcons entermatrix entertensor entier equal equalp equiv_classes erf erfc erf_generalized erfi errcatch error errormsg errors euler ev eval_string evenp every evolution evolution2d evundiff example exp expand expandwrt expandwrt_factored expint expintegral_chi expintegral_ci expintegral_e expintegral_e1 expintegral_ei expintegral_e_simplify expintegral_li expintegral_shi expintegral_si explicit explose exponentialize express expt exsec extdiff extract_linear_equations extremal_subset ezgcd %f f90 facsum factcomb factor factorfacsum factorial factorout factorsum facts fast_central_elements fast_linsolve fasttimes featurep fernfale fft fib fibtophi fifth filename_merge file_search file_type fillarray findde find_root find_root_abs find_root_error find_root_rel first fix flatten flength float floatnump floor flower_snark flush flush1deriv flushd flushnd flush_output fmin_cobyla forget fortran fourcos fourexpand fourier fourier_elim fourint fourintcos fourintsin foursimp foursin fourth fposition frame_bracket freeof freshline fresnel_c fresnel_s from_adjacency_matrix frucht_graph full_listify fullmap fullmapl fullratsimp fullratsubst fullsetify funcsolve fundamental_dimensions fundamental_units fundef funmake funp fv g0 g1 gamma gamma_greek gamma_incomplete gamma_incomplete_generalized gamma_incomplete_regularized gauss gauss_a gauss_b gaussprob gcd gcdex gcdivide gcfac gcfactor gd generalized_lambert_w genfact gen_laguerre genmatrix gensym geo_amortization geo_annuity_fv geo_annuity_pv geomap geometric geometric_mean geosum get getcurrentdirectory get_edge_weight getenv get_lu_factors get_output_stream_string get_pixel get_plot_option get_tex_environment get_tex_environment_default get_vertex_label gfactor gfactorsum ggf girth global_variances gn gnuplot_close gnuplot_replot gnuplot_reset gnuplot_restart gnuplot_start go Gosper GosperSum gr2d gr3d gradef gramschmidt graph6_decode graph6_encode graph6_export graph6_import graph_center graph_charpoly graph_eigenvalues graph_flow graph_order graph_periphery graph_product graph_size graph_union great_rhombicosidodecahedron_graph great_rhombicuboctahedron_graph grid_graph grind grobner_basis grotzch_graph hamilton_cycle hamilton_path hankel hankel_1 hankel_2 harmonic harmonic_mean hav heawood_graph hermite hessian hgfred hilbertmap hilbert_matrix hipow histogram histogram_description hodge horner hypergeometric i0 i1 %ibes ic1 ic2 ic_convert ichr1 ichr2 icosahedron_graph icosidodecahedron_graph icurvature ident identfor identity idiff idim idummy ieqn %if ifactors iframes ifs igcdex igeodesic_coords ilt image imagpart imetric implicit implicit_derivative implicit_plot indexed_tensor indices induced_subgraph inferencep inference_result infix info_display init_atensor init_ctensor in_neighbors innerproduct inpart inprod inrt integerp integer_partitions integrate intersect intersection intervalp intopois intosum invariant1 invariant2 inverse_fft inverse_jacobi_cd inverse_jacobi_cn inverse_jacobi_cs inverse_jacobi_dc inverse_jacobi_dn inverse_jacobi_ds inverse_jacobi_nc inverse_jacobi_nd inverse_jacobi_ns inverse_jacobi_sc inverse_jacobi_sd inverse_jacobi_sn invert invert_by_adjoint invert_by_lu inv_mod irr is is_biconnected is_bipartite is_connected is_digraph is_edge_in_graph is_graph is_graph_or_digraph ishow is_isomorphic isolate isomorphism is_planar isqrt isreal_p is_sconnected is_tree is_vertex_in_graph items_inference %j j0 j1 jacobi jacobian jacobi_cd jacobi_cn jacobi_cs jacobi_dc jacobi_dn jacobi_ds jacobi_nc jacobi_nd jacobi_ns jacobi_p jacobi_sc jacobi_sd jacobi_sn JF jn join jordan julia julia_set julia_sin %k kdels kdelta kill killcontext kostka kron_delta kronecker_product kummer_m kummer_u kurtosis kurtosis_bernoulli kurtosis_beta kurtosis_binomial kurtosis_chi2 kurtosis_continuous_uniform kurtosis_discrete_uniform kurtosis_exp kurtosis_f kurtosis_gamma kurtosis_general_finite_discrete kurtosis_geometric kurtosis_gumbel kurtosis_hypergeometric kurtosis_laplace kurtosis_logistic kurtosis_lognormal kurtosis_negative_binomial kurtosis_noncentral_chi2 kurtosis_noncentral_student_t kurtosis_normal kurtosis_pareto kurtosis_poisson kurtosis_rayleigh kurtosis_student_t kurtosis_weibull label labels lagrange laguerre lambda lambert_w laplace laplacian_matrix last lbfgs lc2kdt lcharp lc_l lcm lc_u ldefint ldisp ldisplay legendre_p legendre_q leinstein length let letrules letsimp levi_civita lfreeof lgtreillis lhs li liediff limit Lindstedt linear linearinterpol linear_program linear_regression line_graph linsolve listarray list_correlations listify list_matrix_entries list_nc_monomials listoftens listofvars listp lmax lmin load loadfile local locate_matrix_entry log logcontract log_gamma lopow lorentz_gauge lowercasep lpart lratsubst lreduce lriemann lsquares_estimates lsquares_estimates_approximate lsquares_estimates_exact lsquares_mse lsquares_residual_mse lsquares_residuals lsum ltreillis lu_backsub lucas lu_factor %m macroexpand macroexpand1 make_array makebox makefact makegamma make_graph make_level_picture makelist makeOrders make_poly_continent make_poly_country make_polygon make_random_state make_rgb_picture makeset make_string_input_stream make_string_output_stream make_transform mandelbrot mandelbrot_set map mapatom maplist matchdeclare matchfix mat_cond mat_fullunblocker mat_function mathml_display mat_norm matrix matrixmap matrixp matrix_size mattrace mat_trace mat_unblocker max max_clique max_degree max_flow maximize_lp max_independent_set max_matching maybe md5sum mean mean_bernoulli mean_beta mean_binomial mean_chi2 mean_continuous_uniform mean_deviation mean_discrete_uniform mean_exp mean_f mean_gamma mean_general_finite_discrete mean_geometric mean_gumbel mean_hypergeometric mean_laplace mean_logistic mean_lognormal mean_negative_binomial mean_noncentral_chi2 mean_noncentral_student_t mean_normal mean_pareto mean_poisson mean_rayleigh mean_student_t mean_weibull median median_deviation member mesh metricexpandall mgf1_sha1 min min_degree min_edge_cut minfactorial minimalPoly minimize_lp minimum_spanning_tree minor minpack_lsquares minpack_solve min_vertex_cover min_vertex_cut mkdir mnewton mod mode_declare mode_identity ModeMatrix moebius mon2schur mono monomial_dimensions multibernstein_poly multi_display_for_texinfo multi_elem multinomial multinomial_coeff multi_orbit multiplot_mode multi_pui multsym multthru mycielski_graph nary natural_unit nc_degree ncexpt ncharpoly negative_picture neighbors new newcontext newdet new_graph newline newton new_variable next_prime nicedummies niceindices ninth nofix nonarray noncentral_moment nonmetricity nonnegintegerp nonscalarp nonzeroandfreeof notequal nounify nptetrad npv nroots nterms ntermst nthroot nullity nullspace num numbered_boundaries numberp number_to_octets num_distinct_partitions numerval numfactor num_partitions nusum nzeta nzetai nzetar octets_to_number octets_to_oid odd_girth oddp ode2 ode_check odelin oid_to_octets op opena opena_binary openr openr_binary openw openw_binary operatorp opsubst optimize %or orbit orbits ordergreat ordergreatp orderless orderlessp orthogonal_complement orthopoly_recur orthopoly_weight outermap out_neighbors outofpois pade parabolic_cylinder_d parametric parametric_surface parg parGosper parse_string parse_timedate part part2cont partfrac partition partition_set partpol path_digraph path_graph pathname_directory pathname_name pathname_type pdf_bernoulli pdf_beta pdf_binomial pdf_cauchy pdf_chi2 pdf_continuous_uniform pdf_discrete_uniform pdf_exp pdf_f pdf_gamma pdf_general_finite_discrete pdf_geometric pdf_gumbel pdf_hypergeometric pdf_laplace pdf_logistic pdf_lognormal pdf_negative_binomial pdf_noncentral_chi2 pdf_noncentral_student_t pdf_normal pdf_pareto pdf_poisson pdf_rank_sum pdf_rayleigh pdf_signed_rank pdf_student_t pdf_weibull pearson_skewness permanent permut permutation permutations petersen_graph petrov pickapart picture_equalp picturep piechart piechart_description planar_embedding playback plog plot2d plot3d plotdf ploteq plsquares pochhammer points poisdiff poisexpt poisint poismap poisplus poissimp poissubst poistimes poistrim polar polarform polartorect polar_to_xy poly_add poly_buchberger poly_buchberger_criterion poly_colon_ideal poly_content polydecomp poly_depends_p poly_elimination_ideal poly_exact_divide poly_expand poly_expt poly_gcd polygon poly_grobner poly_grobner_equal poly_grobner_member poly_grobner_subsetp poly_ideal_intersection poly_ideal_polysaturation poly_ideal_polysaturation1 poly_ideal_saturation poly_ideal_saturation1 poly_lcm poly_minimization polymod poly_multiply polynome2ele polynomialp poly_normal_form poly_normalize poly_normalize_list poly_polysaturation_extension poly_primitive_part poly_pseudo_divide poly_reduced_grobner poly_reduction poly_saturation_extension poly_s_polynomial poly_subtract polytocompanion pop postfix potential power_mod powerseries powerset prefix prev_prime primep primes principal_components print printf printfile print_graph printpois printprops prodrac product properties propvars psi psubst ptriangularize pui pui2comp pui2ele pui2polynome pui_direct puireduc push put pv qput qrange qty quad_control quad_qag quad_qagi quad_qagp quad_qags quad_qawc quad_qawf quad_qawo quad_qaws quadrilateral quantile quantile_bernoulli quantile_beta quantile_binomial quantile_cauchy quantile_chi2 quantile_continuous_uniform quantile_discrete_uniform quantile_exp quantile_f quantile_gamma quantile_general_finite_discrete quantile_geometric quantile_gumbel quantile_hypergeometric quantile_laplace quantile_logistic quantile_lognormal quantile_negative_binomial quantile_noncentral_chi2 quantile_noncentral_student_t quantile_normal quantile_pareto quantile_poisson quantile_rayleigh quantile_student_t quantile_weibull quartile_skewness quit qunit quotient racah_v racah_w radcan radius random random_bernoulli random_beta random_binomial random_bipartite_graph random_cauchy random_chi2 random_continuous_uniform random_digraph random_discrete_uniform random_exp random_f random_gamma random_general_finite_discrete random_geometric random_graph random_graph1 random_gumbel random_hypergeometric random_laplace random_logistic random_lognormal random_negative_binomial random_network random_noncentral_chi2 random_noncentral_student_t random_normal random_pareto random_permutation random_poisson random_rayleigh random_regular_graph random_student_t random_tournament random_tree random_weibull range rank rat ratcoef ratdenom ratdiff ratdisrep ratexpand ratinterpol rational rationalize ratnumer ratnump ratp ratsimp ratsubst ratvars ratweight read read_array read_binary_array read_binary_list read_binary_matrix readbyte readchar read_hashed_array readline read_list read_matrix read_nested_list readonly read_xpm real_imagpart_to_conjugate realpart realroots rearray rectangle rectform rectform_log_if_constant recttopolar rediff reduce_consts reduce_order region region_boundaries region_boundaries_plus rem remainder remarray rembox remcomps remcon remcoord remfun remfunction remlet remove remove_constvalue remove_dimensions remove_edge remove_fundamental_dimensions remove_fundamental_units remove_plot_option remove_vertex rempart remrule remsym remvalue rename rename_file reset reset_displays residue resolvante resolvante_alternee1 resolvante_bipartite resolvante_diedrale resolvante_klein resolvante_klein3 resolvante_produit_sym resolvante_unitaire resolvante_vierer rest resultant return reveal reverse revert revert2 rgb2level rhs ricci riemann rinvariant risch rk rmdir rncombine romberg room rootscontract round row rowop rowswap rreduce run_testsuite %s save saving scalarp scaled_bessel_i scaled_bessel_i0 scaled_bessel_i1 scalefactors scanmap scatterplot scatterplot_description scene schur2comp sconcat scopy scsimp scurvature sdowncase sec sech second sequal sequalignore set_alt_display setdifference set_draw_defaults set_edge_weight setelmx setequalp setify setp set_partitions set_plot_option set_prompt set_random_state set_tex_environment set_tex_environment_default setunits setup_autoload set_up_dot_simplifications set_vertex_label seventh sexplode sf sha1sum sha256sum shortest_path shortest_weighted_path show showcomps showratvars sierpinskiale sierpinskimap sign signum similaritytransform simp_inequality simplify_sum simplode simpmetderiv simtran sin sinh sinsert sinvertcase sixth skewness skewness_bernoulli skewness_beta skewness_binomial skewness_chi2 skewness_continuous_uniform skewness_discrete_uniform skewness_exp skewness_f skewness_gamma skewness_general_finite_discrete skewness_geometric skewness_gumbel skewness_hypergeometric skewness_laplace skewness_logistic skewness_lognormal skewness_negative_binomial skewness_noncentral_chi2 skewness_noncentral_student_t skewness_normal skewness_pareto skewness_poisson skewness_rayleigh skewness_student_t skewness_weibull slength smake small_rhombicosidodecahedron_graph small_rhombicuboctahedron_graph smax smin smismatch snowmap snub_cube_graph snub_dodecahedron_graph solve solve_rec solve_rec_rat some somrac sort sparse6_decode sparse6_encode sparse6_export sparse6_import specint spherical spherical_bessel_j spherical_bessel_y spherical_hankel1 spherical_hankel2 spherical_harmonic spherical_to_xyz splice split sposition sprint sqfr sqrt sqrtdenest sremove sremovefirst sreverse ssearch ssort sstatus ssubst ssubstfirst staircase standardize standardize_inverse_trig starplot starplot_description status std std1 std_bernoulli std_beta std_binomial std_chi2 std_continuous_uniform std_discrete_uniform std_exp std_f std_gamma std_general_finite_discrete std_geometric std_gumbel std_hypergeometric std_laplace std_logistic std_lognormal std_negative_binomial std_noncentral_chi2 std_noncentral_student_t std_normal std_pareto std_poisson std_rayleigh std_student_t std_weibull stemplot stirling stirling1 stirling2 strim striml strimr string stringout stringp strong_components struve_h struve_l sublis sublist sublist_indices submatrix subsample subset subsetp subst substinpart subst_parallel substpart substring subvar subvarp sum sumcontract summand_to_rec supcase supcontext symbolp symmdifference symmetricp system take_channel take_inference tan tanh taylor taylorinfo taylorp taylor_simplifier taytorat tcl_output tcontract tellrat tellsimp tellsimpafter tentex tenth test_mean test_means_difference test_normality test_proportion test_proportions_difference test_rank_sum test_sign test_signed_rank test_variance test_variance_ratio tex tex1 tex_display texput %th third throw time timedate timer timer_info tldefint tlimit todd_coxeter toeplitz tokens to_lisp topological_sort to_poly to_poly_solve totaldisrep totalfourier totient tpartpol trace tracematrix trace_options transform_sample translate translate_file transpose treefale tree_reduce treillis treinat triangle triangularize trigexpand trigrat trigreduce trigsimp trunc truncate truncated_cube_graph truncated_dodecahedron_graph truncated_icosahedron_graph truncated_tetrahedron_graph tr_warnings_get tube tutte_graph ueivects uforget ultraspherical underlying_graph undiff union unique uniteigenvectors unitp units unit_step unitvector unorder unsum untellrat untimer untrace uppercasep uricci uriemann uvect vandermonde_matrix var var1 var_bernoulli var_beta var_binomial var_chi2 var_continuous_uniform var_discrete_uniform var_exp var_f var_gamma var_general_finite_discrete var_geometric var_gumbel var_hypergeometric var_laplace var_logistic var_lognormal var_negative_binomial var_noncentral_chi2 var_noncentral_student_t var_normal var_pareto var_poisson var_rayleigh var_student_t var_weibull vector vectorpotential vectorsimp verbify vers vertex_coloring vertex_connectivity vertex_degree vertex_distance vertex_eccentricity vertex_in_degree vertex_out_degree vertices vertices_to_cycle vertices_to_path %w weyl wheel_graph wiener_index wigner_3j wigner_6j wigner_9j with_stdout write_binary_data writebyte write_data writefile wronskian xreduce xthru %y Zeilberger zeroequiv zerofor zeromatrix zeromatrixp zeta zgeev zheev zlange zn_add_table zn_carmichael_lambda zn_characteristic_factors zn_determinant zn_factor_generators zn_invert_by_lu zn_log zn_mult_table absboxchar activecontexts adapt_depth additive adim aform algebraic algepsilon algexact aliases allbut all_dotsimp_denoms allocation allsym alphabetic animation antisymmetric arrays askexp assume_pos assume_pos_pred assumescalar asymbol atomgrad atrig1 axes axis_3d axis_bottom axis_left axis_right axis_top azimuth background background_color backsubst berlefact bernstein_explicit besselexpand beta_args_sum_to_integer beta_expand bftorat bftrunc bindtest border boundaries_array box boxchar breakup %c capping cauchysum cbrange cbtics center cflength cframe_flag cnonmet_flag color color_bar color_bar_tics colorbox columns commutative complex cone context contexts contour contour_levels cosnpiflag ctaypov ctaypt ctayswitch ctayvar ct_coords ctorsion_flag ctrgsimp cube current_let_rule_package cylinder data_file_name debugmode decreasing default_let_rule_package delay dependencies derivabbrev derivsubst detout diagmetric diff dim dimensions dispflag display2d|10 display_format_internal distribute_over doallmxops domain domxexpt domxmxops domxnctimes dontfactor doscmxops doscmxplus dot0nscsimp dot0simp dot1simp dotassoc dotconstrules dotdistrib dotexptsimp dotident dotscrules draw_graph_program draw_realpart edge_color edge_coloring edge_partition edge_type edge_width %edispflag elevation %emode endphi endtheta engineering_format_floats enhanced3d %enumer epsilon_lp erfflag erf_representation errormsg error_size error_syms error_type %e_to_numlog eval even evenfun evflag evfun ev_point expandwrt_denom expintexpand expintrep expon expop exptdispflag exptisolate exptsubst facexpand facsum_combine factlim factorflag factorial_expand factors_only fb feature features file_name file_output_append file_search_demo file_search_lisp file_search_maxima|10 file_search_tests file_search_usage file_type_lisp file_type_maxima|10 fill_color fill_density filled_func fixed_vertices flipflag float2bf font font_size fortindent fortspaces fpprec fpprintprec functions gamma_expand gammalim gdet genindex gensumnum GGFCFMAX GGFINFINITY globalsolve gnuplot_command gnuplot_curve_styles gnuplot_curve_titles gnuplot_default_term_command gnuplot_dumb_term_command gnuplot_file_args gnuplot_file_name gnuplot_out_file gnuplot_pdf_term_command gnuplot_pm3d gnuplot_png_term_command gnuplot_postamble gnuplot_preamble gnuplot_ps_term_command gnuplot_svg_term_command gnuplot_term gnuplot_view_args Gosper_in_Zeilberger gradefs grid grid2d grind halfangles head_angle head_both head_length head_type height hypergeometric_representation %iargs ibase icc1 icc2 icounter idummyx ieqnprint ifb ifc1 ifc2 ifg ifgi ifr iframe_bracket_form ifri igeowedge_flag ikt1 ikt2 imaginary inchar increasing infeval infinity inflag infolists inm inmc1 inmc2 intanalysis integer integervalued integrate_use_rootsof integration_constant integration_constant_counter interpolate_color intfaclim ip_grid ip_grid_in irrational isolate_wrt_times iterations itr julia_parameter %k1 %k2 keepfloat key key_pos kinvariant kt label label_alignment label_orientation labels lassociative lbfgs_ncorrections lbfgs_nfeval_max leftjust legend letrat let_rule_packages lfg lg lhospitallim limsubst linear linear_solver linechar linel|10 linenum line_type linewidth line_width linsolve_params linsolvewarn lispdisp listarith listconstvars listdummyvars lmxchar load_pathname loadprint logabs logarc logcb logconcoeffp logexpand lognegint logsimp logx logx_secondary logy logy_secondary logz lriem m1pbranch macroexpansion macros mainvar manual_demo maperror mapprint matrix_element_add matrix_element_mult matrix_element_transpose maxapplydepth maxapplyheight maxima_tempdir|10 maxima_userdir|10 maxnegex MAX_ORD maxposex maxpsifracdenom maxpsifracnum maxpsinegint maxpsiposint maxtayorder mesh_lines_color method mod_big_prime mode_check_errorp mode_checkp mode_check_warnp mod_test mod_threshold modular_linear_solver modulus multiplicative multiplicities myoptions nary negdistrib negsumdispflag newline newtonepsilon newtonmaxiter nextlayerfactor niceindicespref nm nmc noeval nolabels nonegative_lp noninteger nonscalar noun noundisp nouns np npi nticks ntrig numer numer_pbranch obase odd oddfun opacity opproperties opsubst optimprefix optionset orientation origin orthopoly_returns_intervals outative outchar packagefile palette partswitch pdf_file pfeformat phiresolution %piargs piece pivot_count_sx pivot_max_sx plot_format plot_options plot_realpart png_file pochhammer_max_index points pointsize point_size points_joined point_type poislim poisson poly_coefficient_ring poly_elimination_order polyfactor poly_grobner_algorithm poly_grobner_debug poly_monomial_order poly_primary_elimination_order poly_return_term_list poly_secondary_elimination_order poly_top_reduction_only posfun position powerdisp pred prederror primep_number_of_tests product_use_gamma program programmode promote_float_to_bigfloat prompt proportional_axes props psexpand ps_file radexpand radius radsubstflag rassociative ratalgdenom ratchristof ratdenomdivide rateinstein ratepsilon ratfac rational ratmx ratprint ratriemann ratsimpexpons ratvarswitch ratweights ratweyl ratwtlvl real realonly redraw refcheck resolution restart resultant ric riem rmxchar %rnum_list rombergabs rombergit rombergmin rombergtol rootsconmode rootsepsilon run_viewer same_xy same_xyz savedef savefactors scalar scalarmatrixp scale scale_lp setcheck setcheckbreak setval show_edge_color show_edges show_edge_type show_edge_width show_id show_label showtime show_vertex_color show_vertex_size show_vertex_type show_vertices show_weight simp simplified_output simplify_products simpproduct simpsum sinnpiflag solvedecomposes solveexplicit solvefactors solvenullwarn solveradcan solvetrigwarn space sparse sphere spring_embedding_depth sqrtdispflag stardisp startphi starttheta stats_numer stringdisp structures style sublis_apply_lambda subnumsimp sumexpand sumsplitfact surface surface_hide svg_file symmetric tab taylordepth taylor_logexpand taylor_order_coefficients taylor_truncate_polynomials tensorkill terminal testsuite_files thetaresolution timer_devalue title tlimswitch tr track transcompile transform transform_xy translate_fast_arrays transparent transrun tr_array_as_ref tr_bound_function_applyp tr_file_tty_messagesp tr_float_can_branch_complex tr_function_call_default trigexpandplus trigexpandtimes triginverses trigsign trivial_solutions tr_numer tr_optimize_max_loop tr_semicompile tr_state_vars tr_warn_bad_function_calls tr_warn_fexpr tr_warn_meval tr_warn_mode tr_warn_undeclared tr_warn_undefined_variable tstep ttyoff tube_extremes ufg ug %unitexpand unit_vectors uric uriem use_fast_arrays user_preamble usersetunits values vect_cross verbose vertex_color vertex_coloring vertex_partition vertex_size vertex_type view warnings weyl width windowname windowtitle wired_surface wireframe xaxis xaxis_color xaxis_secondary xaxis_type xaxis_width xlabel xlabel_secondary xlength xrange xrange_secondary xtics xtics_axis xtics_rotate xtics_rotate_secondary xtics_secondary xtics_secondary_axis xu_grid x_voxel xy_file xyplane xy_scale yaxis yaxis_color yaxis_secondary yaxis_type yaxis_width ylabel ylabel_secondary ylength yrange yrange_secondary ytics ytics_axis ytics_rotate ytics_rotate_secondary ytics_secondary ytics_secondary_axis yv_grid y_voxel yx_ratio zaxis zaxis_color zaxis_type zaxis_width zeroa zerob zerobern zeta%pi zlabel zlabel_rotate zlength zmin zn_primroot_limit zn_primroot_pretest",symbol:"_ __ %|0 %%|0"},contains:[{className:"comment",begin:"/\\*",end:"\\*/",contains:["self"]},e.QUOTE_STRING_MODE,{className:"number",relevance:0,variants:[{begin:"\\b(\\d+|\\d+\\.|\\.\\d+|\\d+\\.\\d+)[Ee][-+]?\\d+\\b"},{begin:"\\b(\\d+|\\d+\\.|\\.\\d+|\\d+\\.\\d+)[Bb][-+]?\\d+\\b",relevance:10},{begin:"\\b(\\.\\d+|\\d+\\.\\d+)\\b"},{begin:"\\b(\\d+|0[0-9A-Za-z]+)\\.?\\b"}]}],illegal:/@/}}},function(e,t){e.exports=function(e){return{name:"MEL",keywords:"int float string vector matrix if else switch case default while do for in break continue global proc return about abs addAttr addAttributeEditorNodeHelp addDynamic addNewShelfTab addPP addPanelCategory addPrefixToName advanceToNextDrivenKey affectedNet affects aimConstraint air alias aliasAttr align alignCtx alignCurve alignSurface allViewFit ambientLight angle angleBetween animCone animCurveEditor animDisplay animView annotate appendStringArray applicationName applyAttrPreset applyTake arcLenDimContext arcLengthDimension arclen arrayMapper art3dPaintCtx artAttrCtx artAttrPaintVertexCtx artAttrSkinPaintCtx artAttrTool artBuildPaintMenu artFluidAttrCtx artPuttyCtx artSelectCtx artSetPaintCtx artUserPaintCtx assignCommand assignInputDevice assignViewportFactories attachCurve attachDeviceAttr attachSurface attrColorSliderGrp attrCompatibility attrControlGrp attrEnumOptionMenu attrEnumOptionMenuGrp attrFieldGrp attrFieldSliderGrp attrNavigationControlGrp attrPresetEditWin attributeExists attributeInfo attributeMenu attributeQuery autoKeyframe autoPlace bakeClip bakeFluidShading bakePartialHistory bakeResults bakeSimulation basename basenameEx batchRender bessel bevel bevelPlus binMembership bindSkin blend2 blendShape blendShapeEditor blendShapePanel blendTwoAttr blindDataType boneLattice boundary boxDollyCtx boxZoomCtx bufferCurve buildBookmarkMenu buildKeyframeMenu button buttonManip CBG cacheFile cacheFileCombine cacheFileMerge cacheFileTrack camera cameraView canCreateManip canvas capitalizeString catch catchQuiet ceil changeSubdivComponentDisplayLevel changeSubdivRegion channelBox character characterMap characterOutlineEditor characterize chdir checkBox checkBoxGrp checkDefaultRenderGlobals choice circle circularFillet clamp clear clearCache clip clipEditor clipEditorCurrentTimeCtx clipSchedule clipSchedulerOutliner clipTrimBefore closeCurve closeSurface cluster cmdFileOutput cmdScrollFieldExecuter cmdScrollFieldReporter cmdShell coarsenSubdivSelectionList collision color colorAtPoint colorEditor colorIndex colorIndexSliderGrp colorSliderButtonGrp colorSliderGrp columnLayout commandEcho commandLine commandPort compactHairSystem componentEditor compositingInterop computePolysetVolume condition cone confirmDialog connectAttr connectControl connectDynamic connectJoint connectionInfo constrain constrainValue constructionHistory container containsMultibyte contextInfo control convertFromOldLayers convertIffToPsd convertLightmap convertSolidTx convertTessellation convertUnit copyArray copyFlexor copyKey copySkinWeights cos cpButton cpCache cpClothSet cpCollision cpConstraint cpConvClothToMesh cpForces cpGetSolverAttr cpPanel cpProperty cpRigidCollisionFilter cpSeam cpSetEdit cpSetSolverAttr cpSolver cpSolverTypes cpTool cpUpdateClothUVs createDisplayLayer createDrawCtx createEditor createLayeredPsdFile createMotionField createNewShelf createNode createRenderLayer createSubdivRegion cross crossProduct ctxAbort ctxCompletion ctxEditMode ctxTraverse currentCtx currentTime currentTimeCtx currentUnit curve curveAddPtCtx curveCVCtx curveEPCtx curveEditorCtx curveIntersect curveMoveEPCtx curveOnSurface curveSketchCtx cutKey cycleCheck cylinder dagPose date defaultLightListCheckBox defaultNavigation defineDataServer defineVirtualDevice deformer deg_to_rad delete deleteAttr deleteShadingGroupsAndMaterials deleteShelfTab deleteUI deleteUnusedBrushes delrandstr detachCurve detachDeviceAttr detachSurface deviceEditor devicePanel dgInfo dgdirty dgeval dgtimer dimWhen directKeyCtx directionalLight dirmap dirname disable disconnectAttr disconnectJoint diskCache displacementToPoly displayAffected displayColor displayCull displayLevelOfDetail displayPref displayRGBColor displaySmoothness displayStats displayString displaySurface distanceDimContext distanceDimension doBlur dolly dollyCtx dopeSheetEditor dot dotProduct doubleProfileBirailSurface drag dragAttrContext draggerContext dropoffLocator duplicate duplicateCurve duplicateSurface dynCache dynControl dynExport dynExpression dynGlobals dynPaintEditor dynParticleCtx dynPref dynRelEdPanel dynRelEditor dynamicLoad editAttrLimits editDisplayLayerGlobals editDisplayLayerMembers editRenderLayerAdjustment editRenderLayerGlobals editRenderLayerMembers editor editorTemplate effector emit emitter enableDevice encodeString endString endsWith env equivalent equivalentTol erf error eval evalDeferred evalEcho event exactWorldBoundingBox exclusiveLightCheckBox exec executeForEachObject exists exp expression expressionEditorListen extendCurve extendSurface extrude fcheck fclose feof fflush fgetline fgetword file fileBrowserDialog fileDialog fileExtension fileInfo filetest filletCurve filter filterCurve filterExpand filterStudioImport findAllIntersections findAnimCurves findKeyframe findMenuItem findRelatedSkinCluster finder firstParentOf fitBspline flexor floatEq floatField floatFieldGrp floatScrollBar floatSlider floatSlider2 floatSliderButtonGrp floatSliderGrp floor flow fluidCacheInfo fluidEmitter fluidVoxelInfo flushUndo fmod fontDialog fopen formLayout format fprint frameLayout fread freeFormFillet frewind fromNativePath fwrite gamma gauss geometryConstraint getApplicationVersionAsFloat getAttr getClassification getDefaultBrush getFileList getFluidAttr getInputDeviceRange getMayaPanelTypes getModifiers getPanel getParticleAttr getPluginResource getenv getpid glRender glRenderEditor globalStitch gmatch goal gotoBindPose grabColor gradientControl gradientControlNoAttr graphDollyCtx graphSelectContext graphTrackCtx gravity grid gridLayout group groupObjectsByName HfAddAttractorToAS HfAssignAS HfBuildEqualMap HfBuildFurFiles HfBuildFurImages HfCancelAFR HfConnectASToHF HfCreateAttractor HfDeleteAS HfEditAS HfPerformCreateAS HfRemoveAttractorFromAS HfSelectAttached HfSelectAttractors HfUnAssignAS hardenPointCurve hardware hardwareRenderPanel headsUpDisplay headsUpMessage help helpLine hermite hide hilite hitTest hotBox hotkey hotkeyCheck hsv_to_rgb hudButton hudSlider hudSliderButton hwReflectionMap hwRender hwRenderLoad hyperGraph hyperPanel hyperShade hypot iconTextButton iconTextCheckBox iconTextRadioButton iconTextRadioCollection iconTextScrollList iconTextStaticLabel ikHandle ikHandleCtx ikHandleDisplayScale ikSolver ikSplineHandleCtx ikSystem ikSystemInfo ikfkDisplayMethod illustratorCurves image imfPlugins inheritTransform insertJoint insertJointCtx insertKeyCtx insertKnotCurve insertKnotSurface instance instanceable instancer intField intFieldGrp intScrollBar intSlider intSliderGrp interToUI internalVar intersect iprEngine isAnimCurve isConnected isDirty isParentOf isSameObject isTrue isValidObjectName isValidString isValidUiName isolateSelect itemFilter itemFilterAttr itemFilterRender itemFilterType joint jointCluster jointCtx jointDisplayScale jointLattice keyTangent keyframe keyframeOutliner keyframeRegionCurrentTimeCtx keyframeRegionDirectKeyCtx keyframeRegionDollyCtx keyframeRegionInsertKeyCtx keyframeRegionMoveKeyCtx keyframeRegionScaleKeyCtx keyframeRegionSelectKeyCtx keyframeRegionSetKeyCtx keyframeRegionTrackCtx keyframeStats lassoContext lattice latticeDeformKeyCtx launch launchImageEditor layerButton layeredShaderPort layeredTexturePort layout layoutDialog lightList lightListEditor lightListPanel lightlink lineIntersection linearPrecision linstep listAnimatable listAttr listCameras listConnections listDeviceAttachments listHistory listInputDeviceAxes listInputDeviceButtons listInputDevices listMenuAnnotation listNodeTypes listPanelCategories listRelatives listSets listTransforms listUnselected listerEditor loadFluid loadNewShelf loadPlugin loadPluginLanguageResources loadPrefObjects localizedPanelLabel lockNode loft log longNameOf lookThru ls lsThroughFilter lsType lsUI Mayatomr mag makeIdentity makeLive makePaintable makeRoll makeSingleSurface makeTubeOn makebot manipMoveContext manipMoveLimitsCtx manipOptions manipRotateContext manipRotateLimitsCtx manipScaleContext manipScaleLimitsCtx marker match max memory menu menuBarLayout menuEditor menuItem menuItemToShelf menuSet menuSetPref messageLine min minimizeApp mirrorJoint modelCurrentTimeCtx modelEditor modelPanel mouse movIn movOut move moveIKtoFK moveKeyCtx moveVertexAlongDirection multiProfileBirailSurface mute nParticle nameCommand nameField namespace namespaceInfo newPanelItems newton nodeCast nodeIconButton nodeOutliner nodePreset nodeType noise nonLinear normalConstraint normalize nurbsBoolean nurbsCopyUVSet nurbsCube nurbsEditUV nurbsPlane nurbsSelect nurbsSquare nurbsToPoly nurbsToPolygonsPref nurbsToSubdiv nurbsToSubdivPref nurbsUVSet nurbsViewDirectionVector objExists objectCenter objectLayer objectType objectTypeUI obsoleteProc oceanNurbsPreviewPlane offsetCurve offsetCurveOnSurface offsetSurface openGLExtension openMayaPref optionMenu optionMenuGrp optionVar orbit orbitCtx orientConstraint outlinerEditor outlinerPanel overrideModifier paintEffectsDisplay pairBlend palettePort paneLayout panel panelConfiguration panelHistory paramDimContext paramDimension paramLocator parent parentConstraint particle particleExists particleInstancer particleRenderInfo partition pasteKey pathAnimation pause pclose percent performanceOptions pfxstrokes pickWalk picture pixelMove planarSrf plane play playbackOptions playblast plugAttr plugNode pluginInfo pluginResourceUtil pointConstraint pointCurveConstraint pointLight pointMatrixMult pointOnCurve pointOnSurface pointPosition poleVectorConstraint polyAppend polyAppendFacetCtx polyAppendVertex polyAutoProjection polyAverageNormal polyAverageVertex polyBevel polyBlendColor polyBlindData polyBoolOp polyBridgeEdge polyCacheMonitor polyCheck polyChipOff polyClipboard polyCloseBorder polyCollapseEdge polyCollapseFacet polyColorBlindData polyColorDel polyColorPerVertex polyColorSet polyCompare polyCone polyCopyUV polyCrease polyCreaseCtx polyCreateFacet polyCreateFacetCtx polyCube polyCut polyCutCtx polyCylinder polyCylindricalProjection polyDelEdge polyDelFacet polyDelVertex polyDuplicateAndConnect polyDuplicateEdge polyEditUV polyEditUVShell polyEvaluate polyExtrudeEdge polyExtrudeFacet polyExtrudeVertex polyFlipEdge polyFlipUV polyForceUV polyGeoSampler polyHelix polyInfo polyInstallAction polyLayoutUV polyListComponentConversion polyMapCut polyMapDel polyMapSew polyMapSewMove polyMergeEdge polyMergeEdgeCtx polyMergeFacet polyMergeFacetCtx polyMergeUV polyMergeVertex polyMirrorFace polyMoveEdge polyMoveFacet polyMoveFacetUV polyMoveUV polyMoveVertex polyNormal polyNormalPerVertex polyNormalizeUV polyOptUvs polyOptions polyOutput polyPipe polyPlanarProjection polyPlane polyPlatonicSolid polyPoke polyPrimitive polyPrism polyProjection polyPyramid polyQuad polyQueryBlindData polyReduce polySelect polySelectConstraint polySelectConstraintMonitor polySelectCtx polySelectEditCtx polySeparate polySetToFaceNormal polySewEdge polyShortestPathCtx polySmooth polySoftEdge polySphere polySphericalProjection polySplit polySplitCtx polySplitEdge polySplitRing polySplitVertex polyStraightenUVBorder polySubdivideEdge polySubdivideFacet polyToSubdiv polyTorus polyTransfer polyTriangulate polyUVSet polyUnite polyWedgeFace popen popupMenu pose pow preloadRefEd print progressBar progressWindow projFileViewer projectCurve projectTangent projectionContext projectionManip promptDialog propModCtx propMove psdChannelOutliner psdEditTextureFile psdExport psdTextureFile putenv pwd python querySubdiv quit rad_to_deg radial radioButton radioButtonGrp radioCollection radioMenuItemCollection rampColorPort rand randomizeFollicles randstate rangeControl readTake rebuildCurve rebuildSurface recordAttr recordDevice redo reference referenceEdit referenceQuery refineSubdivSelectionList refresh refreshAE registerPluginResource rehash reloadImage removeJoint removeMultiInstance removePanelCategory rename renameAttr renameSelectionList renameUI render renderGlobalsNode renderInfo renderLayerButton renderLayerParent renderLayerPostProcess renderLayerUnparent renderManip renderPartition renderQualityNode renderSettings renderThumbnailUpdate renderWindowEditor renderWindowSelectContext renderer reorder reorderDeformers requires reroot resampleFluid resetAE resetPfxToPolyCamera resetTool resolutionNode retarget reverseCurve reverseSurface revolve rgb_to_hsv rigidBody rigidSolver roll rollCtx rootOf rot rotate rotationInterpolation roundConstantRadius rowColumnLayout rowLayout runTimeCommand runup sampleImage saveAllShelves saveAttrPreset saveFluid saveImage saveInitialState saveMenu savePrefObjects savePrefs saveShelf saveToolSettings scale scaleBrushBrightness scaleComponents scaleConstraint scaleKey scaleKeyCtx sceneEditor sceneUIReplacement scmh scriptCtx scriptEditorInfo scriptJob scriptNode scriptTable scriptToShelf scriptedPanel scriptedPanelType scrollField scrollLayout sculpt searchPathArray seed selLoadSettings select selectContext selectCurveCV selectKey selectKeyCtx selectKeyframeRegionCtx selectMode selectPref selectPriority selectType selectedNodes selectionConnection separator setAttr setAttrEnumResource setAttrMapping setAttrNiceNameResource setConstraintRestPosition setDefaultShadingGroup setDrivenKeyframe setDynamic setEditCtx setEditor setFluidAttr setFocus setInfinity setInputDeviceMapping setKeyCtx setKeyPath setKeyframe setKeyframeBlendshapeTargetWts setMenuMode setNodeNiceNameResource setNodeTypeFlag setParent setParticleAttr setPfxToPolyCamera setPluginResource setProject setStampDensity setStartupMessage setState setToolTo setUITemplate setXformManip sets shadingConnection shadingGeometryRelCtx shadingLightRelCtx shadingNetworkCompare shadingNode shapeCompare shelfButton shelfLayout shelfTabLayout shellField shortNameOf showHelp showHidden showManipCtx showSelectionInTitle showShadingGroupAttrEditor showWindow sign simplify sin singleProfileBirailSurface size sizeBytes skinCluster skinPercent smoothCurve smoothTangentSurface smoothstep snap2to2 snapKey snapMode snapTogetherCtx snapshot soft softMod softModCtx sort sound soundControl source spaceLocator sphere sphrand spotLight spotLightPreviewPort spreadSheetEditor spring sqrt squareSurface srtContext stackTrace startString startsWith stitchAndExplodeShell stitchSurface stitchSurfacePoints strcmp stringArrayCatenate stringArrayContains stringArrayCount stringArrayInsertAtIndex stringArrayIntersector stringArrayRemove stringArrayRemoveAtIndex stringArrayRemoveDuplicates stringArrayRemoveExact stringArrayToString stringToStringArray strip stripPrefixFromName stroke subdAutoProjection subdCleanTopology subdCollapse subdDuplicateAndConnect subdEditUV subdListComponentConversion subdMapCut subdMapSewMove subdMatchTopology subdMirror subdToBlind subdToPoly subdTransferUVsToCache subdiv subdivCrease subdivDisplaySmoothness substitute substituteAllString substituteGeometry substring surface surfaceSampler surfaceShaderList swatchDisplayPort switchTable symbolButton symbolCheckBox sysFile system tabLayout tan tangentConstraint texLatticeDeformContext texManipContext texMoveContext texMoveUVShellContext texRotateContext texScaleContext texSelectContext texSelectShortestPathCtx texSmudgeUVContext texWinToolCtx text textCurves textField textFieldButtonGrp textFieldGrp textManip textScrollList textToShelf textureDisplacePlane textureHairColor texturePlacementContext textureWindow threadCount threePointArcCtx timeControl timePort timerX toNativePath toggle toggleAxis toggleWindowVisibility tokenize tokenizeList tolerance tolower toolButton toolCollection toolDropped toolHasOptions toolPropertyWindow torus toupper trace track trackCtx transferAttributes transformCompare transformLimits translator trim trunc truncateFluidCache truncateHairCache tumble tumbleCtx turbulence twoPointArcCtx uiRes uiTemplate unassignInputDevice undo undoInfo ungroup uniform unit unloadPlugin untangleUV untitledFileName untrim upAxis updateAE userCtx uvLink uvSnapshot validateShelfName vectorize view2dToolCtx viewCamera viewClipPlane viewFit viewHeadOn viewLookAt viewManip viewPlace viewSet visor volumeAxis vortex waitCursor warning webBrowser webBrowserPrefs whatIs window windowPref wire wireContext workspace wrinkle wrinkleContext writeTake xbmLangPathList xform",illegal:"</",contains:[e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/[$%@](\^\w\b|#\w+|[^\s\w{]|\{\w+\}|\w+)/},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}}},function(e,t){e.exports=function(e){const t=e.COMMENT("%","$"),n=e.inherit(e.APOS_STRING_MODE,{relevance:0}),r=e.inherit(e.QUOTE_STRING_MODE,{relevance:0});return r.contains=r.contains.slice(),r.contains.push({className:"subst",begin:"\\\\[abfnrtv]\\|\\\\x[0-9a-fA-F]*\\\\\\|%[-+# *.0-9]*[dioxXucsfeEgGp]",relevance:0}),{name:"Mercury",aliases:["m","moo"],keywords:{keyword:"module use_module import_module include_module end_module initialise mutable initialize finalize finalise interface implementation pred mode func type inst solver any_pred any_func is semidet det nondet multi erroneous failure cc_nondet cc_multi typeclass instance where pragma promise external trace atomic or_else require_complete_switch require_det require_semidet require_multi require_nondet require_cc_multi require_cc_nondet require_erroneous require_failure",meta:"inline no_inline type_spec source_file fact_table obsolete memo loop_check minimal_model terminates does_not_terminate check_termination promise_equivalent_clauses foreign_proc foreign_decl foreign_code foreign_type foreign_import_module foreign_export_enum foreign_export foreign_enum may_call_mercury will_not_call_mercury thread_safe not_thread_safe maybe_thread_safe promise_pure promise_semipure tabled_for_io local untrailed trailed attach_to_io_state can_pass_as_mercury_type stable will_not_throw_exception may_modify_trail will_not_modify_trail may_duplicate may_not_duplicate affects_liveness does_not_affect_liveness doesnt_affect_liveness no_sharing unknown_sharing sharing",built_in:"some all not if then else true fail false try catch catch_any semidet_true semidet_false semidet_fail impure_true impure semipure"},contains:[{className:"built_in",variants:[{begin:"<=>"},{begin:"<=",relevance:0},{begin:"=>",relevance:0},{begin:"/\\\\"},{begin:"\\\\/"}]},{className:"built_in",variants:[{begin:":-\\|--\x3e"},{begin:"=",relevance:0}]},t,e.C_BLOCK_COMMENT_MODE,{className:"number",begin:"0'.\\|0[box][0-9a-fA-F]*"},e.NUMBER_MODE,n,r,{begin:/:-/},{begin:/\.$/}]}}},function(e,t){e.exports=function(e){return{name:"MIPS Assembly",case_insensitive:!0,aliases:["mips"],keywords:{$pattern:"\\.?"+e.IDENT_RE,meta:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .ltorg ",built_in:"$0 $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 $17 $18 $19 $20 $21 $22 $23 $24 $25 $26 $27 $28 $29 $30 $31 zero at v0 v1 a0 a1 a2 a3 a4 a5 a6 a7 t0 t1 t2 t3 t4 t5 t6 t7 t8 t9 s0 s1 s2 s3 s4 s5 s6 s7 s8 k0 k1 gp sp fp ra $f0 $f1 $f2 $f2 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15 $f16 $f17 $f18 $f19 $f20 $f21 $f22 $f23 $f24 $f25 $f26 $f27 $f28 $f29 $f30 $f31 Context Random EntryLo0 EntryLo1 Context PageMask Wired EntryHi HWREna BadVAddr Count Compare SR IntCtl SRSCtl SRSMap Cause EPC PRId EBase Config Config1 Config2 Config3 LLAddr Debug DEPC DESAVE CacheErr ECC ErrorEPC TagLo DataLo TagHi DataHi WatchLo WatchHi PerfCtl PerfCnt "},contains:[{className:"keyword",begin:"\\b(addi?u?|andi?|b(al)?|beql?|bgez(al)?l?|bgtzl?|blezl?|bltz(al)?l?|bnel?|cl[oz]|divu?|ext|ins|j(al)?|jalr(\\.hb)?|jr(\\.hb)?|lbu?|lhu?|ll|lui|lw[lr]?|maddu?|mfhi|mflo|movn|movz|move|msubu?|mthi|mtlo|mul|multu?|nop|nor|ori?|rotrv?|sb|sc|se[bh]|sh|sllv?|slti?u?|srav?|srlv?|subu?|sw[lr]?|xori?|wsbh|abs\\.[sd]|add\\.[sd]|alnv.ps|bc1[ft]l?|c\\.(s?f|un|u?eq|[ou]lt|[ou]le|ngle?|seq|l[et]|ng[et])\\.[sd]|(ceil|floor|round|trunc)\\.[lw]\\.[sd]|cfc1|cvt\\.d\\.[lsw]|cvt\\.l\\.[dsw]|cvt\\.ps\\.s|cvt\\.s\\.[dlw]|cvt\\.s\\.p[lu]|cvt\\.w\\.[dls]|div\\.[ds]|ldx?c1|luxc1|lwx?c1|madd\\.[sd]|mfc1|mov[fntz]?\\.[ds]|msub\\.[sd]|mth?c1|mul\\.[ds]|neg\\.[ds]|nmadd\\.[ds]|nmsub\\.[ds]|p[lu][lu]\\.ps|recip\\.fmt|r?sqrt\\.[ds]|sdx?c1|sub\\.[ds]|suxc1|swx?c1|break|cache|d?eret|[de]i|ehb|mfc0|mtc0|pause|prefx?|rdhwr|rdpgpr|sdbbp|ssnop|synci?|syscall|teqi?|tgei?u?|tlb(p|r|w[ir])|tlti?u?|tnei?|wait|wrpgpr)",end:"\\s"},e.COMMENT("[;#](?!\\s*$)","$"),e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",relevance:0},{className:"title",begin:"\\|",end:"\\|",illegal:"\\n",relevance:0},{className:"number",variants:[{begin:"0x[0-9a-f]+"},{begin:"\\b-?\\d+"}],relevance:0},{className:"symbol",variants:[{begin:"^\\s*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{begin:"^\\s*[0-9]+:"},{begin:"[0-9]+[bf]"}],relevance:0}],illegal:/\//}}},function(e,t){e.exports=function(e){return{name:"Mizar",keywords:"environ vocabularies notations constructors definitions registrations theorems schemes requirements begin end definition registration cluster existence pred func defpred deffunc theorem proof let take assume then thus hence ex for st holds consider reconsider such that and in provided of as from be being by means equals implies iff redefine define now not or attr is mode suppose per cases set thesis contradiction scheme reserve struct correctness compatibility coherence symmetry assymetry reflexivity irreflexivity connectedness uniqueness commutativity idempotence involutiveness projectivity",contains:[e.COMMENT("::","$")]}}},function(e,t){e.exports=function(e){const t=e.regex,n=/[dualxmsipngr]{0,12}/,r={$pattern:/[\w.]+/,keyword:["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"].join(" ")},i={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:r},o={begin:/->\{/,end:/\}/},a={variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@][^\s\w{]/,relevance:0}]},s=[e.BACKSLASH_ESCAPE,i,a],l=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],c=(e,r,i="\\1")=>{const o="\\1"===i?i:t.concat(i,r);return t.concat(t.concat("(?:",e,")"),r,/(?:\\.|[^\\\/])*?/,o,/(?:\\.|[^\\\/])*?/,i,n)},u=(e,r,i)=>t.concat(t.concat("(?:",e,")"),r,/(?:\\.|[^\\\/])*?/,i,n),d=[a,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),o,{className:"string",contains:s,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:c("s|tr|y",t.either(...l,{capture:!0}))},{begin:c("s|tr|y","\\(","\\)")},{begin:c("s|tr|y","\\[","\\]")},{begin:c("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:u("(?:m|qr)?",/\//,/\//)},{begin:u("m|qr",t.either(...l,{capture:!0}),/\1/)},{begin:u("m|qr",/\(/,/\)/)},{begin:u("m|qr",/\[/,/\]/)},{begin:u("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return i.contains=d,o.contains=d,{name:"Perl",aliases:["pl","pm"],keywords:r,contains:d}}},function(e,t){e.exports=function(e){return{name:"Mojolicious",subLanguage:"xml",contains:[{className:"meta",begin:"^__(END|DATA)__$"},{begin:"^\\s*%{1,2}={0,2}",end:"$",subLanguage:"perl"},{begin:"<%{1,2}={0,2}",end:"={0,1}%>",subLanguage:"perl",excludeBegin:!0,excludeEnd:!0}]}}},function(e,t){e.exports=function(e){const t={className:"number",relevance:0,variants:[{begin:"[$][a-fA-F0-9]+"},e.NUMBER_MODE]},n={variants:[{match:[/(function|method)/,/\s+/,e.UNDERSCORE_IDENT_RE]}],scope:{1:"keyword",3:"title.function"}},r={variants:[{match:[/(class|interface|extends|implements)/,/\s+/,e.UNDERSCORE_IDENT_RE]}],scope:{1:"keyword",3:"title.class"}};return{name:"Monkey",case_insensitive:!0,keywords:{keyword:["public","private","property","continue","exit","extern","new","try","catch","eachin","not","abstract","final","select","case","default","const","local","global","field","end","if","then","else","elseif","endif","while","wend","repeat","until","forever","for","to","step","next","return","module","inline","throw","import","and","or","shl","shr","mod"],built_in:["DebugLog","DebugStop","Error","Print","ACos","ACosr","ASin","ASinr","ATan","ATan2","ATan2r","ATanr","Abs","Abs","Ceil","Clamp","Clamp","Cos","Cosr","Exp","Floor","Log","Max","Max","Min","Min","Pow","Sgn","Sgn","Sin","Sinr","Sqrt","Tan","Tanr","Seed","PI","HALFPI","TWOPI"],literal:["true","false","null"]},illegal:/\/\*/,contains:[e.COMMENT("#rem","#end"),e.COMMENT("'","$",{relevance:0}),n,r,{className:"variable.language",begin:/\b(self|super)\b/},{className:"meta",begin:/\s*#/,end:"$",keywords:{keyword:"if else elseif endif end then"}},{match:[/^\s*/,/strict\b/],scope:{2:"meta"}},{beginKeywords:"alias",end:"=",contains:[e.UNDERSCORE_TITLE_MODE]},e.QUOTE_STRING_MODE,t]}}},function(e,t){e.exports=function(e){const t={keyword:"if then not for in while do return else elseif break continue switch and or unless when class extends super local import export from using",literal:"true false nil",built_in:"_G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug io math os package string table"},n="[A-Za-z$_][0-9A-Za-z$_]*",r={className:"subst",begin:/#\{/,end:/\}/,keywords:t},i=[e.inherit(e.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'/,end:/'/,contains:[e.BACKSLASH_ESCAPE]},{begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,r]}]},{className:"built_in",begin:"@__"+e.IDENT_RE},{begin:"@"+e.IDENT_RE},{begin:e.IDENT_RE+"\\\\"+e.IDENT_RE}];r.contains=i;const o=e.inherit(e.TITLE_MODE,{begin:n}),a="(\\(.*\\)\\s*)?\\B[-=]>",s={className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:t,contains:["self"].concat(i)}]};return{name:"MoonScript",aliases:["moon"],keywords:t,illegal:/\/\*/,contains:i.concat([e.COMMENT("--","$"),{className:"function",begin:"^\\s*"+n+"\\s*=\\s*"+a,end:"[-=]>",returnBegin:!0,contains:[o,s]},{begin:/[\(,:=]\s*/,relevance:0,contains:[{className:"function",begin:a,end:"[-=]>",returnBegin:!0,contains:[s]}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[o]},o]},{className:"name",begin:n+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}},function(e,t){e.exports=function(e){return{name:"N1QL",case_insensitive:!0,contains:[{beginKeywords:"build create index delete drop explain infer|10 insert merge prepare select update upsert|10",end:/;/,keywords:{keyword:["all","alter","analyze","and","any","array","as","asc","begin","between","binary","boolean","break","bucket","build","by","call","case","cast","cluster","collate","collection","commit","connect","continue","correlate","cover","create","database","dataset","datastore","declare","decrement","delete","derived","desc","describe","distinct","do","drop","each","element","else","end","every","except","exclude","execute","exists","explain","fetch","first","flatten","for","force","from","function","grant","group","gsi","having","if","ignore","ilike","in","include","increment","index","infer","inline","inner","insert","intersect","into","is","join","key","keys","keyspace","known","last","left","let","letting","like","limit","lsm","map","mapping","matched","materialized","merge","minus","namespace","nest","not","number","object","offset","on","option","or","order","outer","over","parse","partition","password","path","pool","prepare","primary","private","privilege","procedure","public","raw","realm","reduce","rename","return","returning","revoke","right","role","rollback","satisfies","schema","select","self","semi","set","show","some","start","statistics","string","system","then","to","transaction","trigger","truncate","under","union","unique","unknown","unnest","unset","update","upsert","use","user","using","validate","value","valued","values","via","view","when","where","while","with","within","work","xor"],literal:["true","false","null","missing|5"],built_in:["array_agg","array_append","array_concat","array_contains","array_count","array_distinct","array_ifnull","array_length","array_max","array_min","array_position","array_prepend","array_put","array_range","array_remove","array_repeat","array_replace","array_reverse","array_sort","array_sum","avg","count","max","min","sum","greatest","least","ifmissing","ifmissingornull","ifnull","missingif","nullif","ifinf","ifnan","ifnanorinf","naninf","neginfif","posinfif","clock_millis","clock_str","date_add_millis","date_add_str","date_diff_millis","date_diff_str","date_part_millis","date_part_str","date_trunc_millis","date_trunc_str","duration_to_str","millis","str_to_millis","millis_to_str","millis_to_utc","millis_to_zone_name","now_millis","now_str","str_to_duration","str_to_utc","str_to_zone_name","decode_json","encode_json","encoded_size","poly_length","base64","base64_encode","base64_decode","meta","uuid","abs","acos","asin","atan","atan2","ceil","cos","degrees","e","exp","ln","log","floor","pi","power","radians","random","round","sign","sin","sqrt","tan","trunc","object_length","object_names","object_pairs","object_inner_pairs","object_values","object_inner_values","object_add","object_put","object_remove","object_unwrap","regexp_contains","regexp_like","regexp_position","regexp_replace","contains","initcap","length","lower","ltrim","position","repeat","replace","rtrim","split","substr","title","trim","upper","isarray","isatom","isboolean","isnumber","isobject","isstring","type","toarray","toatom","toboolean","tonumber","toobject","tostring"]},contains:[{className:"string",begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{className:"string",begin:'"',end:'"',contains:[e.BACKSLASH_ESCAPE]},{className:"symbol",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_BLOCK_COMMENT_MODE]}}},function(e,t){e.exports=function(e){return{name:"Nested Text",aliases:["nt"],contains:[e.inherit(e.HASH_COMMENT_MODE,{begin:/^\s*(?=#)/,excludeBegin:!0}),{variants:[{match:[/^\s*/,/-/,/[ ]/,/.*$/]},{match:[/^\s*/,/-$/]}],className:{2:"bullet",4:"string"}},{match:[/^\s*/,/>/,/[ ]/,/.*$/],className:{2:"punctuation",4:"string"}},{match:[/^\s*(?=\S)/,/[^:]+/,/:\s*/,/$/],className:{2:"attribute",3:"punctuation"}},{match:[/^\s*(?=\S)/,/[^:]*[^: ]/,/[ ]*:/,/[ ]/,/.*$/],className:{2:"attribute",3:"punctuation",5:"string"}}]}}},function(e,t){e.exports=function(e){const t=e.regex,n={className:"variable",variants:[{begin:/\$\d+/},{begin:/\$\{\w+\}/},{begin:t.concat(/[$@]/,e.UNDERSCORE_IDENT_RE)}]},r={endsWithParent:!0,keywords:{$pattern:/[a-z_]{2,}|\/dev\/poll/,literal:["on","off","yes","no","true","false","none","blocked","debug","info","notice","warn","error","crit","select","break","last","permanent","redirect","kqueue","rtsig","epoll","poll","/dev/poll"]},relevance:0,illegal:"=>",contains:[e.HASH_COMMENT_MODE,{className:"string",contains:[e.BACKSLASH_ESCAPE,n],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/}]},{begin:"([a-z]+):/",end:"\\s",endsWithParent:!0,excludeEnd:!0,contains:[n]},{className:"regexp",contains:[e.BACKSLASH_ESCAPE,n],variants:[{begin:"\\s\\^",end:"\\s|\\{|;",returnEnd:!0},{begin:"~\\*?\\s+",end:"\\s|\\{|;",returnEnd:!0},{begin:"\\*(\\.[a-z\\-]+)+"},{begin:"([a-z\\-]+\\.)+\\*"}]},{className:"number",begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{className:"number",begin:"\\b\\d+[kKmMgGdshdwy]?\\b",relevance:0},n]};return{name:"Nginx config",aliases:["nginxconf"],contains:[e.HASH_COMMENT_MODE,{beginKeywords:"upstream location",end:/;|\{/,contains:r.contains,keywords:{section:"upstream location"}},{className:"section",begin:t.concat(e.UNDERSCORE_IDENT_RE+t.lookahead(/\s+\{/)),relevance:0},{begin:t.lookahead(e.UNDERSCORE_IDENT_RE+"\\s"),end:";|\\{",contains:[{className:"attribute",begin:e.UNDERSCORE_IDENT_RE,starts:r}],relevance:0}],illegal:"[^\\s\\}\\{]"}}},function(e,t){e.exports=function(e){return{name:"Nim",keywords:{keyword:["addr","and","as","asm","bind","block","break","case","cast","const","continue","converter","discard","distinct","div","do","elif","else","end","enum","except","export","finally","for","from","func","generic","guarded","if","import","in","include","interface","is","isnot","iterator","let","macro","method","mixin","mod","nil","not","notin","object","of","or","out","proc","ptr","raise","ref","return","shared","shl","shr","static","template","try","tuple","type","using","var","when","while","with","without","xor","yield"],literal:["true","false"],type:["int","int8","int16","int32","int64","uint","uint8","uint16","uint32","uint64","float","float32","float64","bool","char","string","cstring","pointer","expr","stmt","void","auto","any","range","array","openarray","varargs","seq","set","clong","culong","cchar","cschar","cshort","cint","csize","clonglong","cfloat","cdouble","clongdouble","cuchar","cushort","cuint","culonglong","cstringarray","semistatic"],built_in:["stdin","stdout","stderr","result"]},contains:[{className:"meta",begin:/\{\./,end:/\.\}/,relevance:10},{className:"string",begin:/[a-zA-Z]\w*"/,end:/"/,contains:[{begin:/""/}]},{className:"string",begin:/([a-zA-Z]\w*)?"""/,end:/"""/},e.QUOTE_STRING_MODE,{className:"type",begin:/\b[A-Z]\w+\b/,relevance:0},{className:"number",relevance:0,variants:[{begin:/\b(0[xX][0-9a-fA-F][_0-9a-fA-F]*)('?[iIuU](8|16|32|64))?/},{begin:/\b(0o[0-7][_0-7]*)('?[iIuUfF](8|16|32|64))?/},{begin:/\b(0(b|B)[01][_01]*)('?[iIuUfF](8|16|32|64))?/},{begin:/\b(\d[_\d]*)('?[iIuUfF](8|16|32|64))?/}]},e.HASH_COMMENT_MODE]}}},function(e,t){e.exports=function(e){const t={keyword:["rec","with","let","in","inherit","assert","if","else","then"],literal:["true","false","or","and","null"],built_in:["import","abort","baseNameOf","dirOf","isNull","builtins","map","removeAttrs","throw","toString","derivation"]},n={className:"subst",begin:/\$\{/,end:/\}/,keywords:t},r={className:"string",contains:[{className:"char.escape",begin:/''\$/},n],variants:[{begin:"''",end:"''"},{begin:'"',end:'"'}]},i=[e.NUMBER_MODE,e.HASH_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,r,{begin:/[a-zA-Z0-9-_]+(\s*=)/,returnBegin:!0,relevance:0,contains:[{className:"attr",begin:/\S+/,relevance:.2}]}];return n.contains=i,{name:"Nix",aliases:["nixos"],keywords:t,contains:i}}},function(e,t){e.exports=function(e){return{name:"Node REPL",contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"javascript"}},variants:[{begin:/^>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}},function(e,t){e.exports=function(e){const t=e.regex,n={className:"variable.constant",begin:t.concat(/\$/,t.either("ADMINTOOLS","APPDATA","CDBURN_AREA","CMDLINE","COMMONFILES32","COMMONFILES64","COMMONFILES","COOKIES","DESKTOP","DOCUMENTS","EXEDIR","EXEFILE","EXEPATH","FAVORITES","FONTS","HISTORY","HWNDPARENT","INSTDIR","INTERNET_CACHE","LANGUAGE","LOCALAPPDATA","MUSIC","NETHOOD","OUTDIR","PICTURES","PLUGINSDIR","PRINTHOOD","PROFILE","PROGRAMFILES32","PROGRAMFILES64","PROGRAMFILES","QUICKLAUNCH","RECENT","RESOURCES_LOCALIZED","RESOURCES","SENDTO","SMPROGRAMS","SMSTARTUP","STARTMENU","SYSDIR","TEMP","TEMPLATES","VIDEOS","WINDIR"))},r={className:"variable",begin:/\$+\{[\!\w.:-]+\}/},i={className:"variable",begin:/\$+\w[\w\.]*/,illegal:/\(\)\{\}/},o={className:"variable",begin:/\$+\([\w^.:!-]+\)/},a={className:"params",begin:t.either("ARCHIVE","FILE_ATTRIBUTE_ARCHIVE","FILE_ATTRIBUTE_NORMAL","FILE_ATTRIBUTE_OFFLINE","FILE_ATTRIBUTE_READONLY","FILE_ATTRIBUTE_SYSTEM","FILE_ATTRIBUTE_TEMPORARY","HKCR","HKCU","HKDD","HKEY_CLASSES_ROOT","HKEY_CURRENT_CONFIG","HKEY_CURRENT_USER","HKEY_DYN_DATA","HKEY_LOCAL_MACHINE","HKEY_PERFORMANCE_DATA","HKEY_USERS","HKLM","HKPD","HKU","IDABORT","IDCANCEL","IDIGNORE","IDNO","IDOK","IDRETRY","IDYES","MB_ABORTRETRYIGNORE","MB_DEFBUTTON1","MB_DEFBUTTON2","MB_DEFBUTTON3","MB_DEFBUTTON4","MB_ICONEXCLAMATION","MB_ICONINFORMATION","MB_ICONQUESTION","MB_ICONSTOP","MB_OK","MB_OKCANCEL","MB_RETRYCANCEL","MB_RIGHT","MB_RTLREADING","MB_SETFOREGROUND","MB_TOPMOST","MB_USERICON","MB_YESNO","NORMAL","OFFLINE","READONLY","SHCTX","SHELL_CONTEXT","SYSTEM|TEMPORARY")},s={className:"keyword",begin:t.concat(/!/,t.either("addincludedir","addplugindir","appendfile","cd","define","delfile","echo","else","endif","error","execute","finalize","getdllversion","gettlbversion","if","ifdef","ifmacrodef","ifmacrondef","ifndef","include","insertmacro","macro","macroend","makensis","packhdr","searchparse","searchreplace","system","tempfile","undef","uninstfinalize","verbose","warning"))},l={className:"string",variants:[{begin:'"',end:'"'},{begin:"'",end:"'"},{begin:"`",end:"`"}],illegal:/\n/,contains:[{className:"char.escape",begin:/\$(\\[nrt]|\$)/},n,r,i,o]},c={match:[/Function/,/\s+/,t.concat(/(\.)?/,e.IDENT_RE)],scope:{1:"keyword",3:"title.function"}},u={match:[/Var/,/\s+/,/(?:\/GLOBAL\s+)?/,/[A-Za-z][\w.]*/],scope:{1:"keyword",3:"params",4:"variable"}};return{name:"NSIS",case_insensitive:!0,keywords:{keyword:["Abort","AddBrandingImage","AddSize","AllowRootDirInstall","AllowSkipFiles","AutoCloseWindow","BGFont","BGGradient","BrandingText","BringToFront","Call","CallInstDLL","Caption","ChangeUI","CheckBitmap","ClearErrors","CompletedText","ComponentText","CopyFiles","CRCCheck","CreateDirectory","CreateFont","CreateShortCut","Delete","DeleteINISec","DeleteINIStr","DeleteRegKey","DeleteRegValue","DetailPrint","DetailsButtonText","DirText","DirVar","DirVerify","EnableWindow","EnumRegKey","EnumRegValue","Exch","Exec","ExecShell","ExecShellWait","ExecWait","ExpandEnvStrings","File","FileBufSize","FileClose","FileErrorText","FileOpen","FileRead","FileReadByte","FileReadUTF16LE","FileReadWord","FileWriteUTF16LE","FileSeek","FileWrite","FileWriteByte","FileWriteWord","FindClose","FindFirst","FindNext","FindWindow","FlushINI","GetCurInstType","GetCurrentAddress","GetDlgItem","GetDLLVersion","GetDLLVersionLocal","GetErrorLevel","GetFileTime","GetFileTimeLocal","GetFullPathName","GetFunctionAddress","GetInstDirError","GetKnownFolderPath","GetLabelAddress","GetTempFileName","GetWinVer","Goto","HideWindow","Icon","IfAbort","IfErrors","IfFileExists","IfRebootFlag","IfRtlLanguage","IfShellVarContextAll","IfSilent","InitPluginsDir","InstallButtonText","InstallColors","InstallDir","InstallDirRegKey","InstProgressFlags","InstType","InstTypeGetText","InstTypeSetText","Int64Cmp","Int64CmpU","Int64Fmt","IntCmp","IntCmpU","IntFmt","IntOp","IntPtrCmp","IntPtrCmpU","IntPtrOp","IsWindow","LangString","LicenseBkColor","LicenseData","LicenseForceSelection","LicenseLangString","LicenseText","LoadAndSetImage","LoadLanguageFile","LockWindow","LogSet","LogText","ManifestDPIAware","ManifestLongPathAware","ManifestMaxVersionTested","ManifestSupportedOS","MessageBox","MiscButtonText","Name|0","Nop","OutFile","Page","PageCallbacks","PEAddResource","PEDllCharacteristics","PERemoveResource","PESubsysVer","Pop","Push","Quit","ReadEnvStr","ReadINIStr","ReadRegDWORD","ReadRegStr","Reboot","RegDLL","Rename","RequestExecutionLevel","ReserveFile","Return","RMDir","SearchPath","SectionGetFlags","SectionGetInstTypes","SectionGetSize","SectionGetText","SectionIn","SectionSetFlags","SectionSetInstTypes","SectionSetSize","SectionSetText","SendMessage","SetAutoClose","SetBrandingImage","SetCompress","SetCompressor","SetCompressorDictSize","SetCtlColors","SetCurInstType","SetDatablockOptimize","SetDateSave","SetDetailsPrint","SetDetailsView","SetErrorLevel","SetErrors","SetFileAttributes","SetFont","SetOutPath","SetOverwrite","SetRebootFlag","SetRegView","SetShellVarContext","SetSilent","ShowInstDetails","ShowUninstDetails","ShowWindow","SilentInstall","SilentUnInstall","Sleep","SpaceTexts","StrCmp","StrCmpS","StrCpy","StrLen","SubCaption","Unicode","UninstallButtonText","UninstallCaption","UninstallIcon","UninstallSubCaption","UninstallText","UninstPage","UnRegDLL","Var","VIAddVersionKey","VIFileVersion","VIProductVersion","WindowIcon","WriteINIStr","WriteRegBin","WriteRegDWORD","WriteRegExpandStr","WriteRegMultiStr","WriteRegNone","WriteRegStr","WriteUninstaller","XPStyle"],literal:["admin","all","auto","both","bottom","bzip2","colored","components","current","custom","directory","false","force","hide","highest","ifdiff","ifnewer","instfiles","lastused","leave","left","license","listonly","lzma","nevershow","none","normal","notset","off","on","open","print","right","show","silent","silentlog","smooth","textonly","top","true","try","un.components","un.custom","un.directory","un.instfiles","un.license","uninstConfirm","user","Win10","Win7","Win8","WinVista","zlib"]},contains:[e.HASH_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT(";","$",{relevance:0}),u,c,{beginKeywords:"Function PageEx Section SectionGroup FunctionEnd SectionEnd"},l,s,r,i,o,a,{className:"title.function",begin:/\w+::\w+/},e.NUMBER_MODE]}}},function(e,t){e.exports=function(e){const t=/[a-zA-Z@][a-zA-Z0-9_]*/,n={$pattern:t,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:{"variable.language":["this","super"],$pattern:t,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},illegal:"</",contains:[{className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+n.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:n,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}},function(e,t){e.exports=function(e){return{name:"OCaml",aliases:["ml"],keywords:{$pattern:"[a-z_]\\w*!?",keyword:"and as assert asr begin class constraint do done downto else end exception external for fun function functor if in include inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method mod module mutable new object of open! open or private rec sig struct then to try type val! val virtual when while with parser value",built_in:"array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit in_channel out_channel ref",literal:"true false"},illegal:/\/\/|>>/,contains:[{className:"literal",begin:"\\[(\\|\\|)?\\]|\\(\\)",relevance:0},e.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"type",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*",relevance:0},e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/->/}]}}},function(e,t){e.exports=function(e){const t={className:"keyword",begin:"\\$(f[asn]|t|vp[rtd]|children)"},n={className:"number",begin:"\\b\\d+(\\.\\d+)?(e-?\\d+)?",relevance:0},r=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),i={className:"function",beginKeywords:"module function",end:/=|\{/,contains:[{className:"params",begin:"\\(",end:"\\)",contains:["self",n,r,t,{className:"literal",begin:"false|true|PI|undef"}]},e.UNDERSCORE_TITLE_MODE]};return{name:"OpenSCAD",aliases:["scad"],keywords:{keyword:"function module include use for intersection_for if else \\%",literal:"false true PI undef",built_in:"circle square polygon text sphere cube cylinder polyhedron translate rotate scale resize mirror multmatrix color offset hull minkowski union difference intersection abs sign sin cos tan acos asin atan atan2 floor round ceil ln log pow sqrt exp rands min max concat lookup str chr search version version_num norm cross parent_module echo import import_dxf dxf_linear_extrude linear_extrude rotate_extrude surface projection render children dxf_cross dxf_dim let assign"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,{className:"meta",keywords:{keyword:"include use"},begin:"include|use <",end:">"},r,t,{begin:"[*!#%]",relevance:0},i]}}},function(e,t){e.exports=function(e){const t={$pattern:/\.?\w+/,keyword:"abstract add and array as asc aspect assembly async begin break block by case class concat const copy constructor continue create default delegate desc distinct div do downto dynamic each else empty end ensure enum equals event except exit extension external false final finalize finalizer finally flags for forward from function future global group has if implementation implements implies in index inherited inline interface into invariants is iterator join locked locking loop matching method mod module namespace nested new nil not notify nullable of old on operator or order out override parallel params partial pinned private procedure property protected public queryable raise read readonly record reintroduce remove repeat require result reverse sealed select self sequence set shl shr skip static step soft take then to true try tuple type union unit unsafe until uses using var virtual raises volatile where while with write xor yield await mapped deprecated stdcall cdecl pascal register safecall overload library platform reference packed strict published autoreleasepool selector strong weak unretained"},n=e.COMMENT(/\{/,/\}/,{relevance:0}),r=e.COMMENT("\\(\\*","\\*\\)",{relevance:10}),i={className:"string",begin:"'",end:"'",contains:[{begin:"''"}]},o={className:"string",begin:"(#\\d+)+"},a={beginKeywords:"function constructor destructor procedure method",end:"[:;]",keywords:"function constructor|10 destructor|10 procedure|10 method|10",contains:[e.inherit(e.TITLE_MODE,{scope:"title.function"}),{className:"params",begin:"\\(",end:"\\)",keywords:t,contains:[i,o]},n,r]};return{name:"Oxygene",case_insensitive:!0,keywords:t,illegal:'("|\\$[G-Zg-z]|\\/\\*|</|=>|->)',contains:[n,r,e.C_LINE_COMMENT_MODE,i,o,e.NUMBER_MODE,a,{scope:"punctuation",match:/;/,relevance:0}]}}},function(e,t){e.exports=function(e){const t=e.COMMENT(/\{/,/\}/,{contains:["self"]});return{name:"Parser3",subLanguage:"xml",relevance:0,contains:[e.COMMENT("^#","$"),e.COMMENT(/\^rem\{/,/\}/,{relevance:10,contains:[t]}),{className:"meta",begin:"^@(?:BASE|USE|CLASS|OPTIONS)$",relevance:10},{className:"title",begin:"@[\\w\\-]+\\[[\\w^;\\-]*\\](?:\\[[\\w^;\\-]*\\])?(?:.*)$"},{className:"variable",begin:/\$\{?[\w\-.:]+\}?/},{className:"keyword",begin:/\^[\w\-.:]+/},{className:"number",begin:"\\^#[0-9a-fA-F]+"},e.C_NUMBER_MODE]}}},function(e,t){e.exports=function(e){return{name:"Packet Filter config",aliases:["pf.conf"],keywords:{$pattern:/[a-z0-9_<>-]+/,built_in:"block match pass load anchor|5 antispoof|10 set table",keyword:"in out log quick on rdomain inet inet6 proto from port os to route allow-opts divert-packet divert-reply divert-to flags group icmp-type icmp6-type label once probability recieved-on rtable prio queue tos tag tagged user keep fragment for os drop af-to|10 binat-to|10 nat-to|10 rdr-to|10 bitmask least-stats random round-robin source-hash static-port dup-to reply-to route-to parent bandwidth default min max qlimit block-policy debug fingerprints hostid limit loginterface optimization reassemble ruleset-optimization basic none profile skip state-defaults state-policy timeout const counters persist no modulate synproxy state|5 floating if-bound no-sync pflow|10 sloppy source-track global rule max-src-nodes max-src-states max-src-conn max-src-conn-rate overload flush scrub|5 max-mss min-ttl no-df|10 random-id",literal:"all any no-route self urpf-failed egress|5 unknown"},contains:[e.HASH_COMMENT_MODE,e.NUMBER_MODE,e.QUOTE_STRING_MODE,{className:"variable",begin:/\$[\w\d#@][\w\d_]*/,relevance:0},{className:"variable",begin:/<(?!\/)/,end:/>/}]}}},function(e,t){e.exports=function(e){const t=e.COMMENT("--","$"),n="\\$([a-zA-Z_]?|[a-zA-Z_][a-zA-Z_0-9]*)\\$",r="BIGINT INT8 BIGSERIAL SERIAL8 BIT VARYING VARBIT BOOLEAN BOOL BOX BYTEA CHARACTER CHAR VARCHAR CIDR CIRCLE DATE DOUBLE PRECISION FLOAT8 FLOAT INET INTEGER INT INT4 INTERVAL JSON JSONB LINE LSEG|10 MACADDR MACADDR8 MONEY NUMERIC DEC DECIMAL PATH POINT POLYGON REAL FLOAT4 SMALLINT INT2 SMALLSERIAL|10 SERIAL2|10 SERIAL|10 SERIAL4|10 TEXT TIME ZONE TIMETZ|10 TIMESTAMP TIMESTAMPTZ|10 TSQUERY|10 TSVECTOR|10 TXID_SNAPSHOT|10 UUID XML NATIONAL NCHAR INT4RANGE|10 INT8RANGE|10 NUMRANGE|10 TSRANGE|10 TSTZRANGE|10 DATERANGE|10 ANYELEMENT ANYARRAY ANYNONARRAY ANYENUM ANYRANGE CSTRING INTERNAL RECORD PG_DDL_COMMAND VOID UNKNOWN OPAQUE REFCURSOR NAME OID REGPROC|10 REGPROCEDURE|10 REGOPER|10 REGOPERATOR|10 REGCLASS|10 REGTYPE|10 REGROLE|10 REGNAMESPACE|10 REGCONFIG|10 REGDICTIONARY|10 ",i=r.trim().split(" ").map((function(e){return e.split("|")[0]})).join("|"),o="ARRAY_AGG AVG BIT_AND BIT_OR BOOL_AND BOOL_OR COUNT EVERY JSON_AGG JSONB_AGG JSON_OBJECT_AGG JSONB_OBJECT_AGG MAX MIN MODE STRING_AGG SUM XMLAGG CORR COVAR_POP COVAR_SAMP REGR_AVGX REGR_AVGY REGR_COUNT REGR_INTERCEPT REGR_R2 REGR_SLOPE REGR_SXX REGR_SXY REGR_SYY STDDEV STDDEV_POP STDDEV_SAMP VARIANCE VAR_POP VAR_SAMP PERCENTILE_CONT PERCENTILE_DISC ROW_NUMBER RANK DENSE_RANK PERCENT_RANK CUME_DIST NTILE LAG LEAD FIRST_VALUE LAST_VALUE NTH_VALUE NUM_NONNULLS NUM_NULLS ABS CBRT CEIL CEILING DEGREES DIV EXP FLOOR LN LOG MOD PI POWER RADIANS ROUND SCALE SIGN SQRT TRUNC WIDTH_BUCKET RANDOM SETSEED ACOS ACOSD ASIN ASIND ATAN ATAND ATAN2 ATAN2D COS COSD COT COTD SIN SIND TAN TAND BIT_LENGTH CHAR_LENGTH CHARACTER_LENGTH LOWER OCTET_LENGTH OVERLAY POSITION SUBSTRING TREAT TRIM UPPER ASCII BTRIM CHR CONCAT CONCAT_WS CONVERT CONVERT_FROM CONVERT_TO DECODE ENCODE INITCAP LEFT LENGTH LPAD LTRIM MD5 PARSE_IDENT PG_CLIENT_ENCODING QUOTE_IDENT|10 QUOTE_LITERAL|10 QUOTE_NULLABLE|10 REGEXP_MATCH REGEXP_MATCHES REGEXP_REPLACE REGEXP_SPLIT_TO_ARRAY REGEXP_SPLIT_TO_TABLE REPEAT REPLACE REVERSE RIGHT RPAD RTRIM SPLIT_PART STRPOS SUBSTR TO_ASCII TO_HEX TRANSLATE OCTET_LENGTH GET_BIT GET_BYTE SET_BIT SET_BYTE TO_CHAR TO_DATE TO_NUMBER TO_TIMESTAMP AGE CLOCK_TIMESTAMP|10 DATE_PART DATE_TRUNC ISFINITE JUSTIFY_DAYS JUSTIFY_HOURS JUSTIFY_INTERVAL MAKE_DATE MAKE_INTERVAL|10 MAKE_TIME MAKE_TIMESTAMP|10 MAKE_TIMESTAMPTZ|10 NOW STATEMENT_TIMESTAMP|10 TIMEOFDAY TRANSACTION_TIMESTAMP|10 ENUM_FIRST ENUM_LAST ENUM_RANGE AREA CENTER DIAMETER HEIGHT ISCLOSED ISOPEN NPOINTS PCLOSE POPEN RADIUS WIDTH BOX BOUND_BOX CIRCLE LINE LSEG PATH POLYGON ABBREV BROADCAST HOST HOSTMASK MASKLEN NETMASK NETWORK SET_MASKLEN TEXT INET_SAME_FAMILY INET_MERGE MACADDR8_SET7BIT ARRAY_TO_TSVECTOR GET_CURRENT_TS_CONFIG NUMNODE PLAINTO_TSQUERY PHRASETO_TSQUERY WEBSEARCH_TO_TSQUERY QUERYTREE SETWEIGHT STRIP TO_TSQUERY TO_TSVECTOR JSON_TO_TSVECTOR JSONB_TO_TSVECTOR TS_DELETE TS_FILTER TS_HEADLINE TS_RANK TS_RANK_CD TS_REWRITE TSQUERY_PHRASE TSVECTOR_TO_ARRAY TSVECTOR_UPDATE_TRIGGER TSVECTOR_UPDATE_TRIGGER_COLUMN XMLCOMMENT XMLCONCAT XMLELEMENT XMLFOREST XMLPI XMLROOT XMLEXISTS XML_IS_WELL_FORMED XML_IS_WELL_FORMED_DOCUMENT XML_IS_WELL_FORMED_CONTENT XPATH XPATH_EXISTS XMLTABLE XMLNAMESPACES TABLE_TO_XML TABLE_TO_XMLSCHEMA TABLE_TO_XML_AND_XMLSCHEMA QUERY_TO_XML QUERY_TO_XMLSCHEMA QUERY_TO_XML_AND_XMLSCHEMA CURSOR_TO_XML CURSOR_TO_XMLSCHEMA SCHEMA_TO_XML SCHEMA_TO_XMLSCHEMA SCHEMA_TO_XML_AND_XMLSCHEMA DATABASE_TO_XML DATABASE_TO_XMLSCHEMA DATABASE_TO_XML_AND_XMLSCHEMA XMLATTRIBUTES TO_JSON TO_JSONB ARRAY_TO_JSON ROW_TO_JSON JSON_BUILD_ARRAY JSONB_BUILD_ARRAY JSON_BUILD_OBJECT JSONB_BUILD_OBJECT JSON_OBJECT JSONB_OBJECT JSON_ARRAY_LENGTH JSONB_ARRAY_LENGTH JSON_EACH JSONB_EACH JSON_EACH_TEXT JSONB_EACH_TEXT JSON_EXTRACT_PATH JSONB_EXTRACT_PATH JSON_OBJECT_KEYS JSONB_OBJECT_KEYS JSON_POPULATE_RECORD JSONB_POPULATE_RECORD JSON_POPULATE_RECORDSET JSONB_POPULATE_RECORDSET JSON_ARRAY_ELEMENTS JSONB_ARRAY_ELEMENTS JSON_ARRAY_ELEMENTS_TEXT JSONB_ARRAY_ELEMENTS_TEXT JSON_TYPEOF JSONB_TYPEOF JSON_TO_RECORD JSONB_TO_RECORD JSON_TO_RECORDSET JSONB_TO_RECORDSET JSON_STRIP_NULLS JSONB_STRIP_NULLS JSONB_SET JSONB_INSERT JSONB_PRETTY CURRVAL LASTVAL NEXTVAL SETVAL COALESCE NULLIF GREATEST LEAST ARRAY_APPEND ARRAY_CAT ARRAY_NDIMS ARRAY_DIMS ARRAY_FILL ARRAY_LENGTH ARRAY_LOWER ARRAY_POSITION ARRAY_POSITIONS ARRAY_PREPEND ARRAY_REMOVE ARRAY_REPLACE ARRAY_TO_STRING ARRAY_UPPER CARDINALITY STRING_TO_ARRAY UNNEST ISEMPTY LOWER_INC UPPER_INC LOWER_INF UPPER_INF RANGE_MERGE GENERATE_SERIES GENERATE_SUBSCRIPTS CURRENT_DATABASE CURRENT_QUERY CURRENT_SCHEMA|10 CURRENT_SCHEMAS|10 INET_CLIENT_ADDR INET_CLIENT_PORT INET_SERVER_ADDR INET_SERVER_PORT ROW_SECURITY_ACTIVE FORMAT_TYPE TO_REGCLASS TO_REGPROC TO_REGPROCEDURE TO_REGOPER TO_REGOPERATOR TO_REGTYPE TO_REGNAMESPACE TO_REGROLE COL_DESCRIPTION OBJ_DESCRIPTION SHOBJ_DESCRIPTION TXID_CURRENT TXID_CURRENT_IF_ASSIGNED TXID_CURRENT_SNAPSHOT TXID_SNAPSHOT_XIP TXID_SNAPSHOT_XMAX TXID_SNAPSHOT_XMIN TXID_VISIBLE_IN_SNAPSHOT TXID_STATUS CURRENT_SETTING SET_CONFIG BRIN_SUMMARIZE_NEW_VALUES BRIN_SUMMARIZE_RANGE BRIN_DESUMMARIZE_RANGE GIN_CLEAN_PENDING_LIST SUPPRESS_REDUNDANT_UPDATES_TRIGGER LO_FROM_BYTEA LO_PUT LO_GET LO_CREAT LO_CREATE LO_UNLINK LO_IMPORT LO_EXPORT LOREAD LOWRITE GROUPING CAST ".trim().split(" ").map((function(e){return e.split("|")[0]})).join("|");return{name:"PostgreSQL",aliases:["postgres","postgresql"],supersetOf:"sql",case_insensitive:!0,keywords:{keyword:"ABORT ALTER ANALYZE BEGIN CALL CHECKPOINT|10 CLOSE CLUSTER COMMENT COMMIT COPY CREATE DEALLOCATE DECLARE DELETE DISCARD DO DROP END EXECUTE EXPLAIN FETCH GRANT IMPORT INSERT LISTEN LOAD LOCK MOVE NOTIFY PREPARE REASSIGN|10 REFRESH REINDEX RELEASE RESET REVOKE ROLLBACK SAVEPOINT SECURITY SELECT SET SHOW START TRUNCATE UNLISTEN|10 UPDATE VACUUM|10 VALUES AGGREGATE COLLATION CONVERSION|10 DATABASE DEFAULT PRIVILEGES DOMAIN TRIGGER EXTENSION FOREIGN WRAPPER|10 TABLE FUNCTION GROUP LANGUAGE LARGE OBJECT MATERIALIZED VIEW OPERATOR CLASS FAMILY POLICY PUBLICATION|10 ROLE RULE SCHEMA SEQUENCE SERVER STATISTICS SUBSCRIPTION SYSTEM TABLESPACE CONFIGURATION DICTIONARY PARSER TEMPLATE TYPE USER MAPPING PREPARED ACCESS METHOD CAST AS TRANSFORM TRANSACTION OWNED TO INTO SESSION AUTHORIZATION INDEX PROCEDURE ASSERTION ALL ANALYSE AND ANY ARRAY ASC ASYMMETRIC|10 BOTH CASE CHECK COLLATE COLUMN CONCURRENTLY|10 CONSTRAINT CROSS DEFERRABLE RANGE DESC DISTINCT ELSE EXCEPT FOR FREEZE|10 FROM FULL HAVING ILIKE IN INITIALLY INNER INTERSECT IS ISNULL JOIN LATERAL LEADING LIKE LIMIT NATURAL NOT NOTNULL NULL OFFSET ON ONLY OR ORDER OUTER OVERLAPS PLACING PRIMARY REFERENCES RETURNING SIMILAR SOME SYMMETRIC TABLESAMPLE THEN TRAILING UNION UNIQUE USING VARIADIC|10 VERBOSE WHEN WHERE WINDOW WITH BY RETURNS INOUT OUT SETOF|10 IF STRICT CURRENT CONTINUE OWNER LOCATION OVER PARTITION WITHIN BETWEEN ESCAPE EXTERNAL INVOKER DEFINER WORK RENAME VERSION CONNECTION CONNECT TABLES TEMP TEMPORARY FUNCTIONS SEQUENCES TYPES SCHEMAS OPTION CASCADE RESTRICT ADD ADMIN EXISTS VALID VALIDATE ENABLE DISABLE REPLICA|10 ALWAYS PASSING COLUMNS PATH REF VALUE OVERRIDING IMMUTABLE STABLE VOLATILE BEFORE AFTER EACH ROW PROCEDURAL ROUTINE NO HANDLER VALIDATOR OPTIONS STORAGE OIDS|10 WITHOUT INHERIT DEPENDS CALLED INPUT LEAKPROOF|10 COST ROWS NOWAIT SEARCH UNTIL ENCRYPTED|10 PASSWORD CONFLICT|10 INSTEAD INHERITS CHARACTERISTICS WRITE CURSOR ALSO STATEMENT SHARE EXCLUSIVE INLINE ISOLATION REPEATABLE READ COMMITTED SERIALIZABLE UNCOMMITTED LOCAL GLOBAL SQL PROCEDURES RECURSIVE SNAPSHOT ROLLUP CUBE TRUSTED|10 INCLUDE FOLLOWING PRECEDING UNBOUNDED RANGE GROUPS UNENCRYPTED|10 SYSID FORMAT DELIMITER HEADER QUOTE ENCODING FILTER OFF FORCE_QUOTE FORCE_NOT_NULL FORCE_NULL COSTS BUFFERS TIMING SUMMARY DISABLE_PAGE_SKIPPING RESTART CYCLE GENERATED IDENTITY DEFERRED IMMEDIATE LEVEL LOGGED UNLOGGED OF NOTHING NONE EXCLUDE ATTRIBUTE USAGE ROUTINES TRUE FALSE NAN INFINITY ALIAS BEGIN CONSTANT DECLARE END EXCEPTION RETURN PERFORM|10 RAISE GET DIAGNOSTICS STACKED|10 FOREACH LOOP ELSIF EXIT WHILE REVERSE SLICE DEBUG LOG INFO NOTICE WARNING ASSERT OPEN SUPERUSER NOSUPERUSER CREATEDB NOCREATEDB CREATEROLE NOCREATEROLE INHERIT NOINHERIT LOGIN NOLOGIN REPLICATION NOREPLICATION BYPASSRLS NOBYPASSRLS ",built_in:"CURRENT_TIME CURRENT_TIMESTAMP CURRENT_USER CURRENT_CATALOG|10 CURRENT_DATE LOCALTIME LOCALTIMESTAMP CURRENT_ROLE|10 CURRENT_SCHEMA|10 SESSION_USER PUBLIC FOUND NEW OLD TG_NAME|10 TG_WHEN|10 TG_LEVEL|10 TG_OP|10 TG_RELID|10 TG_RELNAME|10 TG_TABLE_NAME|10 TG_TABLE_SCHEMA|10 TG_NARGS|10 TG_ARGV|10 TG_EVENT|10 TG_TAG|10 ROW_COUNT RESULT_OID|10 PG_CONTEXT|10 RETURNED_SQLSTATE COLUMN_NAME CONSTRAINT_NAME PG_DATATYPE_NAME|10 MESSAGE_TEXT TABLE_NAME SCHEMA_NAME PG_EXCEPTION_DETAIL|10 PG_EXCEPTION_HINT|10 PG_EXCEPTION_CONTEXT|10 SQLSTATE SQLERRM|10 SUCCESSFUL_COMPLETION WARNING DYNAMIC_RESULT_SETS_RETURNED IMPLICIT_ZERO_BIT_PADDING NULL_VALUE_ELIMINATED_IN_SET_FUNCTION PRIVILEGE_NOT_GRANTED PRIVILEGE_NOT_REVOKED STRING_DATA_RIGHT_TRUNCATION DEPRECATED_FEATURE NO_DATA NO_ADDITIONAL_DYNAMIC_RESULT_SETS_RETURNED SQL_STATEMENT_NOT_YET_COMPLETE CONNECTION_EXCEPTION CONNECTION_DOES_NOT_EXIST CONNECTION_FAILURE SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION SQLSERVER_REJECTED_ESTABLISHMENT_OF_SQLCONNECTION TRANSACTION_RESOLUTION_UNKNOWN PROTOCOL_VIOLATION TRIGGERED_ACTION_EXCEPTION FEATURE_NOT_SUPPORTED INVALID_TRANSACTION_INITIATION LOCATOR_EXCEPTION INVALID_LOCATOR_SPECIFICATION INVALID_GRANTOR INVALID_GRANT_OPERATION INVALID_ROLE_SPECIFICATION DIAGNOSTICS_EXCEPTION STACKED_DIAGNOSTICS_ACCESSED_WITHOUT_ACTIVE_HANDLER CASE_NOT_FOUND CARDINALITY_VIOLATION DATA_EXCEPTION ARRAY_SUBSCRIPT_ERROR CHARACTER_NOT_IN_REPERTOIRE DATETIME_FIELD_OVERFLOW DIVISION_BY_ZERO ERROR_IN_ASSIGNMENT ESCAPE_CHARACTER_CONFLICT INDICATOR_OVERFLOW INTERVAL_FIELD_OVERFLOW INVALID_ARGUMENT_FOR_LOGARITHM INVALID_ARGUMENT_FOR_NTILE_FUNCTION INVALID_ARGUMENT_FOR_NTH_VALUE_FUNCTION INVALID_ARGUMENT_FOR_POWER_FUNCTION INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION INVALID_CHARACTER_VALUE_FOR_CAST INVALID_DATETIME_FORMAT INVALID_ESCAPE_CHARACTER INVALID_ESCAPE_OCTET INVALID_ESCAPE_SEQUENCE NONSTANDARD_USE_OF_ESCAPE_CHARACTER INVALID_INDICATOR_PARAMETER_VALUE INVALID_PARAMETER_VALUE INVALID_REGULAR_EXPRESSION INVALID_ROW_COUNT_IN_LIMIT_CLAUSE INVALID_ROW_COUNT_IN_RESULT_OFFSET_CLAUSE INVALID_TABLESAMPLE_ARGUMENT INVALID_TABLESAMPLE_REPEAT INVALID_TIME_ZONE_DISPLACEMENT_VALUE INVALID_USE_OF_ESCAPE_CHARACTER MOST_SPECIFIC_TYPE_MISMATCH NULL_VALUE_NOT_ALLOWED NULL_VALUE_NO_INDICATOR_PARAMETER NUMERIC_VALUE_OUT_OF_RANGE SEQUENCE_GENERATOR_LIMIT_EXCEEDED STRING_DATA_LENGTH_MISMATCH STRING_DATA_RIGHT_TRUNCATION SUBSTRING_ERROR TRIM_ERROR UNTERMINATED_C_STRING ZERO_LENGTH_CHARACTER_STRING FLOATING_POINT_EXCEPTION INVALID_TEXT_REPRESENTATION INVALID_BINARY_REPRESENTATION BAD_COPY_FILE_FORMAT UNTRANSLATABLE_CHARACTER NOT_AN_XML_DOCUMENT INVALID_XML_DOCUMENT INVALID_XML_CONTENT INVALID_XML_COMMENT INVALID_XML_PROCESSING_INSTRUCTION INTEGRITY_CONSTRAINT_VIOLATION RESTRICT_VIOLATION NOT_NULL_VIOLATION FOREIGN_KEY_VIOLATION UNIQUE_VIOLATION CHECK_VIOLATION EXCLUSION_VIOLATION INVALID_CURSOR_STATE INVALID_TRANSACTION_STATE ACTIVE_SQL_TRANSACTION BRANCH_TRANSACTION_ALREADY_ACTIVE HELD_CURSOR_REQUIRES_SAME_ISOLATION_LEVEL INAPPROPRIATE_ACCESS_MODE_FOR_BRANCH_TRANSACTION INAPPROPRIATE_ISOLATION_LEVEL_FOR_BRANCH_TRANSACTION NO_ACTIVE_SQL_TRANSACTION_FOR_BRANCH_TRANSACTION READ_ONLY_SQL_TRANSACTION SCHEMA_AND_DATA_STATEMENT_MIXING_NOT_SUPPORTED NO_ACTIVE_SQL_TRANSACTION IN_FAILED_SQL_TRANSACTION IDLE_IN_TRANSACTION_SESSION_TIMEOUT INVALID_SQL_STATEMENT_NAME TRIGGERED_DATA_CHANGE_VIOLATION INVALID_AUTHORIZATION_SPECIFICATION INVALID_PASSWORD DEPENDENT_PRIVILEGE_DESCRIPTORS_STILL_EXIST DEPENDENT_OBJECTS_STILL_EXIST INVALID_TRANSACTION_TERMINATION SQL_ROUTINE_EXCEPTION FUNCTION_EXECUTED_NO_RETURN_STATEMENT MODIFYING_SQL_DATA_NOT_PERMITTED PROHIBITED_SQL_STATEMENT_ATTEMPTED READING_SQL_DATA_NOT_PERMITTED INVALID_CURSOR_NAME EXTERNAL_ROUTINE_EXCEPTION CONTAINING_SQL_NOT_PERMITTED MODIFYING_SQL_DATA_NOT_PERMITTED PROHIBITED_SQL_STATEMENT_ATTEMPTED READING_SQL_DATA_NOT_PERMITTED EXTERNAL_ROUTINE_INVOCATION_EXCEPTION INVALID_SQLSTATE_RETURNED NULL_VALUE_NOT_ALLOWED TRIGGER_PROTOCOL_VIOLATED SRF_PROTOCOL_VIOLATED EVENT_TRIGGER_PROTOCOL_VIOLATED SAVEPOINT_EXCEPTION INVALID_SAVEPOINT_SPECIFICATION INVALID_CATALOG_NAME INVALID_SCHEMA_NAME TRANSACTION_ROLLBACK TRANSACTION_INTEGRITY_CONSTRAINT_VIOLATION SERIALIZATION_FAILURE STATEMENT_COMPLETION_UNKNOWN DEADLOCK_DETECTED SYNTAX_ERROR_OR_ACCESS_RULE_VIOLATION SYNTAX_ERROR INSUFFICIENT_PRIVILEGE CANNOT_COERCE GROUPING_ERROR WINDOWING_ERROR INVALID_RECURSION INVALID_FOREIGN_KEY INVALID_NAME NAME_TOO_LONG RESERVED_NAME DATATYPE_MISMATCH INDETERMINATE_DATATYPE COLLATION_MISMATCH INDETERMINATE_COLLATION WRONG_OBJECT_TYPE GENERATED_ALWAYS UNDEFINED_COLUMN UNDEFINED_FUNCTION UNDEFINED_TABLE UNDEFINED_PARAMETER UNDEFINED_OBJECT DUPLICATE_COLUMN DUPLICATE_CURSOR DUPLICATE_DATABASE DUPLICATE_FUNCTION DUPLICATE_PREPARED_STATEMENT DUPLICATE_SCHEMA DUPLICATE_TABLE DUPLICATE_ALIAS DUPLICATE_OBJECT AMBIGUOUS_COLUMN AMBIGUOUS_FUNCTION AMBIGUOUS_PARAMETER AMBIGUOUS_ALIAS INVALID_COLUMN_REFERENCE INVALID_COLUMN_DEFINITION INVALID_CURSOR_DEFINITION INVALID_DATABASE_DEFINITION INVALID_FUNCTION_DEFINITION INVALID_PREPARED_STATEMENT_DEFINITION INVALID_SCHEMA_DEFINITION INVALID_TABLE_DEFINITION INVALID_OBJECT_DEFINITION WITH_CHECK_OPTION_VIOLATION INSUFFICIENT_RESOURCES DISK_FULL OUT_OF_MEMORY TOO_MANY_CONNECTIONS CONFIGURATION_LIMIT_EXCEEDED PROGRAM_LIMIT_EXCEEDED STATEMENT_TOO_COMPLEX TOO_MANY_COLUMNS TOO_MANY_ARGUMENTS OBJECT_NOT_IN_PREREQUISITE_STATE OBJECT_IN_USE CANT_CHANGE_RUNTIME_PARAM LOCK_NOT_AVAILABLE OPERATOR_INTERVENTION QUERY_CANCELED ADMIN_SHUTDOWN CRASH_SHUTDOWN CANNOT_CONNECT_NOW DATABASE_DROPPED SYSTEM_ERROR IO_ERROR UNDEFINED_FILE DUPLICATE_FILE SNAPSHOT_TOO_OLD CONFIG_FILE_ERROR LOCK_FILE_EXISTS FDW_ERROR FDW_COLUMN_NAME_NOT_FOUND FDW_DYNAMIC_PARAMETER_VALUE_NEEDED FDW_FUNCTION_SEQUENCE_ERROR FDW_INCONSISTENT_DESCRIPTOR_INFORMATION FDW_INVALID_ATTRIBUTE_VALUE FDW_INVALID_COLUMN_NAME FDW_INVALID_COLUMN_NUMBER FDW_INVALID_DATA_TYPE FDW_INVALID_DATA_TYPE_DESCRIPTORS FDW_INVALID_DESCRIPTOR_FIELD_IDENTIFIER FDW_INVALID_HANDLE FDW_INVALID_OPTION_INDEX FDW_INVALID_OPTION_NAME FDW_INVALID_STRING_LENGTH_OR_BUFFER_LENGTH FDW_INVALID_STRING_FORMAT FDW_INVALID_USE_OF_NULL_POINTER FDW_TOO_MANY_HANDLES FDW_OUT_OF_MEMORY FDW_NO_SCHEMAS FDW_OPTION_NAME_NOT_FOUND FDW_REPLY_HANDLE FDW_SCHEMA_NOT_FOUND FDW_TABLE_NOT_FOUND FDW_UNABLE_TO_CREATE_EXECUTION FDW_UNABLE_TO_CREATE_REPLY FDW_UNABLE_TO_ESTABLISH_CONNECTION PLPGSQL_ERROR RAISE_EXCEPTION NO_DATA_FOUND TOO_MANY_ROWS ASSERT_FAILURE INTERNAL_ERROR DATA_CORRUPTED INDEX_CORRUPTED "},illegal:/:==|\W\s*\(\*|(^|\s)\$[a-z]|\{\{|[a-z]:\s*$|\.\.\.|TO:|DO:/,contains:[{className:"keyword",variants:[{begin:/\bTEXT\s*SEARCH\b/},{begin:/\b(PRIMARY|FOREIGN|FOR(\s+NO)?)\s+KEY\b/},{begin:/\bPARALLEL\s+(UNSAFE|RESTRICTED|SAFE)\b/},{begin:/\bSTORAGE\s+(PLAIN|EXTERNAL|EXTENDED|MAIN)\b/},{begin:/\bMATCH\s+(FULL|PARTIAL|SIMPLE)\b/},{begin:/\bNULLS\s+(FIRST|LAST)\b/},{begin:/\bEVENT\s+TRIGGER\b/},{begin:/\b(MAPPING|OR)\s+REPLACE\b/},{begin:/\b(FROM|TO)\s+(PROGRAM|STDIN|STDOUT)\b/},{begin:/\b(SHARE|EXCLUSIVE)\s+MODE\b/},{begin:/\b(LEFT|RIGHT)\s+(OUTER\s+)?JOIN\b/},{begin:/\b(FETCH|MOVE)\s+(NEXT|PRIOR|FIRST|LAST|ABSOLUTE|RELATIVE|FORWARD|BACKWARD)\b/},{begin:/\bPRESERVE\s+ROWS\b/},{begin:/\bDISCARD\s+PLANS\b/},{begin:/\bREFERENCING\s+(OLD|NEW)\b/},{begin:/\bSKIP\s+LOCKED\b/},{begin:/\bGROUPING\s+SETS\b/},{begin:/\b(BINARY|INSENSITIVE|SCROLL|NO\s+SCROLL)\s+(CURSOR|FOR)\b/},{begin:/\b(WITH|WITHOUT)\s+HOLD\b/},{begin:/\bWITH\s+(CASCADED|LOCAL)\s+CHECK\s+OPTION\b/},{begin:/\bEXCLUDE\s+(TIES|NO\s+OTHERS)\b/},{begin:/\bFORMAT\s+(TEXT|XML|JSON|YAML)\b/},{begin:/\bSET\s+((SESSION|LOCAL)\s+)?NAMES\b/},{begin:/\bIS\s+(NOT\s+)?UNKNOWN\b/},{begin:/\bSECURITY\s+LABEL\b/},{begin:/\bSTANDALONE\s+(YES|NO|NO\s+VALUE)\b/},{begin:/\bWITH\s+(NO\s+)?DATA\b/},{begin:/\b(FOREIGN|SET)\s+DATA\b/},{begin:/\bSET\s+(CATALOG|CONSTRAINTS)\b/},{begin:/\b(WITH|FOR)\s+ORDINALITY\b/},{begin:/\bIS\s+(NOT\s+)?DOCUMENT\b/},{begin:/\bXML\s+OPTION\s+(DOCUMENT|CONTENT)\b/},{begin:/\b(STRIP|PRESERVE)\s+WHITESPACE\b/},{begin:/\bNO\s+(ACTION|MAXVALUE|MINVALUE)\b/},{begin:/\bPARTITION\s+BY\s+(RANGE|LIST|HASH)\b/},{begin:/\bAT\s+TIME\s+ZONE\b/},{begin:/\bGRANTED\s+BY\b/},{begin:/\bRETURN\s+(QUERY|NEXT)\b/},{begin:/\b(ATTACH|DETACH)\s+PARTITION\b/},{begin:/\bFORCE\s+ROW\s+LEVEL\s+SECURITY\b/},{begin:/\b(INCLUDING|EXCLUDING)\s+(COMMENTS|CONSTRAINTS|DEFAULTS|IDENTITY|INDEXES|STATISTICS|STORAGE|ALL)\b/},{begin:/\bAS\s+(ASSIGNMENT|IMPLICIT|PERMISSIVE|RESTRICTIVE|ENUM|RANGE)\b/}]},{begin:/\b(FORMAT|FAMILY|VERSION)\s*\(/},{begin:/\bINCLUDE\s*\(/,keywords:"INCLUDE"},{begin:/\bRANGE(?!\s*(BETWEEN|UNBOUNDED|CURRENT|[-0-9]+))/},{begin:/\b(VERSION|OWNER|TEMPLATE|TABLESPACE|CONNECTION\s+LIMIT|PROCEDURE|RESTRICT|JOIN|PARSER|COPY|START|END|COLLATION|INPUT|ANALYZE|STORAGE|LIKE|DEFAULT|DELIMITER|ENCODING|COLUMN|CONSTRAINT|TABLE|SCHEMA)\s*=/},{begin:/\b(PG_\w+?|HAS_[A-Z_]+_PRIVILEGE)\b/,relevance:10},{begin:/\bEXTRACT\s*\(/,end:/\bFROM\b/,returnEnd:!0,keywords:{type:"CENTURY DAY DECADE DOW DOY EPOCH HOUR ISODOW ISOYEAR MICROSECONDS MILLENNIUM MILLISECONDS MINUTE MONTH QUARTER SECOND TIMEZONE TIMEZONE_HOUR TIMEZONE_MINUTE WEEK YEAR"}},{begin:/\b(XMLELEMENT|XMLPI)\s*\(\s*NAME/,keywords:{keyword:"NAME"}},{begin:/\b(XMLPARSE|XMLSERIALIZE)\s*\(\s*(DOCUMENT|CONTENT)/,keywords:{keyword:"DOCUMENT CONTENT"}},{beginKeywords:"CACHE INCREMENT MAXVALUE MINVALUE",end:e.C_NUMBER_RE,returnEnd:!0,keywords:"BY CACHE INCREMENT MAXVALUE MINVALUE"},{className:"type",begin:/\b(WITH|WITHOUT)\s+TIME\s+ZONE\b/},{className:"type",begin:/\bINTERVAL\s+(YEAR|MONTH|DAY|HOUR|MINUTE|SECOND)(\s+TO\s+(MONTH|HOUR|MINUTE|SECOND))?\b/},{begin:/\bRETURNS\s+(LANGUAGE_HANDLER|TRIGGER|EVENT_TRIGGER|FDW_HANDLER|INDEX_AM_HANDLER|TSM_HANDLER)\b/,keywords:{keyword:"RETURNS",type:"LANGUAGE_HANDLER TRIGGER EVENT_TRIGGER FDW_HANDLER INDEX_AM_HANDLER TSM_HANDLER"}},{begin:"\\b("+o+")\\s*\\("},{begin:"\\.("+i+")\\b"},{begin:"\\b("+i+")\\s+PATH\\b",keywords:{keyword:"PATH",type:r.replace("PATH ","")}},{className:"type",begin:"\\b("+i+")\\b"},{className:"string",begin:"'",end:"'",contains:[{begin:"''"}]},{className:"string",begin:"(e|E|u&|U&)'",end:"'",contains:[{begin:"\\\\."}],relevance:10},e.END_SAME_AS_BEGIN({begin:n,end:n,contains:[{subLanguage:["pgsql","perl","python","tcl","r","lua","java","php","ruby","bash","scheme","xml","json"],endsWithParent:!0}]}),{begin:'"',end:'"',contains:[{begin:'""'}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,t,{className:"meta",variants:[{begin:"%(ROW)?TYPE",relevance:10},{begin:"\\$\\d+"},{begin:"^#\\w",end:"$"}]},{className:"symbol",begin:"<<\\s*[a-zA-Z_][a-zA-Z_0-9$]*\\s*>>",relevance:10}]}}},function(e,t){e.exports=function(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),i=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),o={scope:"variable",match:"\\$+"+r},a={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},s=e.inherit(e.APOS_STRING_MODE,{illegal:null}),l="[ \t\n]",c={scope:"string",variants:[e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(a)}),s,e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*(\w+)\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(a)})]},u={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},d=["false","null","true"],h=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],p=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],m={keyword:h,literal:(e=>{const t=[];return e.forEach((e=>{t.push(e),e.toLowerCase()===e?t.push(e.toUpperCase()):t.push(e.toLowerCase())})),t})(d),built_in:p},g=e=>e.map((e=>e.replace(/\|\d+$/,""))),f={variants:[{match:[/new/,t.concat(l,"+"),t.concat("(?!",g(p).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},_=t.concat(r,"\\b(?!\\()"),b={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),_],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,t.concat(/::/,t.lookahead(/(?!class\b)/)),_],scope:{1:"title.class",3:"variable.constant"}},{match:[i,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},v={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},y={relevance:0,begin:/\(/,end:/\)/,keywords:m,contains:[v,o,b,e.C_BLOCK_COMMENT_MODE,c,u,f]},E={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",g(h).join("\\b|"),"|",g(p).join("\\b|"),"\\b)"),r,t.concat(l,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[y]};y.contains.push(E);const S=[v,b,e.C_BLOCK_COMMENT_MODE,c,u,f];return{case_insensitive:!1,keywords:m,contains:[{begin:t.concat(/#\[\s*/,i),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:d,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:d,keyword:["new","array"]},contains:["self",...S]},...S,{scope:"meta",match:i}]},e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},{scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},{scope:"variable.language",match:/\$this\b/},o,E,b,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},f,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:m,contains:["self",o,b,e.C_BLOCK_COMMENT_MODE,c,u]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},c,u]}}},function(e,t){e.exports=function(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}},function(e,t){e.exports=function(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}},function(e,t){e.exports=function(e){return{name:"Pony",keywords:{keyword:"actor addressof and as be break class compile_error compile_intrinsic consume continue delegate digestof do else elseif embed end error for fun if ifdef in interface is isnt lambda let match new not object or primitive recover repeat return struct then trait try type until use var where while with xor",meta:"iso val tag trn box ref",literal:"this false true"},contains:[{className:"type",begin:"\\b_?[A-Z][\\w]*",relevance:0},{className:"string",begin:'"""',end:'"""',relevance:10},{className:"string",begin:'"',end:'"',contains:[e.BACKSLASH_ESCAPE]},{className:"string",begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE],relevance:0},{begin:e.IDENT_RE+"'",relevance:0},{className:"number",begin:"(-?)(\\b0[xX][a-fA-F0-9]+|\\b0[bB][01]+|(\\b\\d+(_\\d+)?(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",relevance:0},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}}},function(e,t){e.exports=function(e){const t={$pattern:/-?[A-z\.\-]+\b/,keyword:"if else foreach return do while until elseif begin for trap data dynamicparam end break throw param continue finally in switch exit filter try process catch hidden static parameter",built_in:"ac asnp cat cd CFS chdir clc clear clhy cli clp cls clv cnsn compare copy cp cpi cpp curl cvpa dbp del diff dir dnsn ebp echo|0 epal epcsv epsn erase etsn exsn fc fhx fl ft fw gal gbp gc gcb gci gcm gcs gdr gerr ghy gi gin gjb gl gm gmo gp gps gpv group gsn gsnp gsv gtz gu gv gwmi h history icm iex ihy ii ipal ipcsv ipmo ipsn irm ise iwmi iwr kill lp ls man md measure mi mount move mp mv nal ndr ni nmo npssc nsn nv ogv oh popd ps pushd pwd r rbp rcjb rcsn rd rdr ren ri rjb rm rmdir rmo rni rnp rp rsn rsnp rujb rv rvpa rwmi sajb sal saps sasv sbp sc scb select set shcm si sl sleep sls sort sp spjb spps spsv start stz sujb sv swmi tee trcm type wget where wjb write"},n={begin:"`[\\s\\S]",relevance:0},r={className:"variable",variants:[{begin:/\$\B/},{className:"keyword",begin:/\$this/},{begin:/\$[\w\d][\w\d_:]*/}]},i={className:"string",variants:[{begin:/"/,end:/"/},{begin:/@"/,end:/^"@/}],contains:[n,r,{className:"variable",begin:/\$[A-z]/,end:/[^A-z]/}]},o={className:"string",variants:[{begin:/'/,end:/'/},{begin:/@'/,end:/^'@/}]},a=e.inherit(e.COMMENT(null,null),{variants:[{begin:/#/,end:/$/},{begin:/<#/,end:/#>/}],contains:[{className:"doctag",variants:[{begin:/\.(synopsis|description|example|inputs|outputs|notes|link|component|role|functionality)/},{begin:/\.(parameter|forwardhelptargetname|forwardhelpcategory|remotehelprunspace|externalhelp)\s+\S+/}]}]}),s={className:"built_in",variants:[{begin:"(".concat("Add|Clear|Close|Copy|Enter|Exit|Find|Format|Get|Hide|Join|Lock|Move|New|Open|Optimize|Pop|Push|Redo|Remove|Rename|Reset|Resize|Search|Select|Set|Show|Skip|Split|Step|Switch|Undo|Unlock|Watch|Backup|Checkpoint|Compare|Compress|Convert|ConvertFrom|ConvertTo|Dismount|Edit|Expand|Export|Group|Import|Initialize|Limit|Merge|Mount|Out|Publish|Restore|Save|Sync|Unpublish|Update|Approve|Assert|Build|Complete|Confirm|Deny|Deploy|Disable|Enable|Install|Invoke|Register|Request|Restart|Resume|Start|Stop|Submit|Suspend|Uninstall|Unregister|Wait|Debug|Measure|Ping|Repair|Resolve|Test|Trace|Connect|Disconnect|Read|Receive|Send|Write|Block|Grant|Protect|Revoke|Unblock|Unprotect|Use|ForEach|Sort|Tee|Where",")+(-)[\\w\\d]+")}]},l={className:"class",beginKeywords:"class enum",end:/\s*[{]/,excludeEnd:!0,relevance:0,contains:[e.TITLE_MODE]},c={className:"function",begin:/function\s+/,end:/\s*\{|$/,excludeEnd:!0,returnBegin:!0,relevance:0,contains:[{begin:"function",relevance:0,className:"keyword"},{className:"title",begin:/\w[\w\d]*((-)[\w\d]+)*/,relevance:0},{begin:/\(/,end:/\)/,className:"params",relevance:0,contains:[r]}]},u={begin:/using\s/,end:/$/,returnBegin:!0,contains:[i,o,{className:"keyword",begin:/(using|assembly|command|module|namespace|type)/}]},d={variants:[{className:"operator",begin:"(".concat("-and|-as|-band|-bnot|-bor|-bxor|-casesensitive|-ccontains|-ceq|-cge|-cgt|-cle|-clike|-clt|-cmatch|-cne|-cnotcontains|-cnotlike|-cnotmatch|-contains|-creplace|-csplit|-eq|-exact|-f|-file|-ge|-gt|-icontains|-ieq|-ige|-igt|-ile|-ilike|-ilt|-imatch|-in|-ine|-inotcontains|-inotlike|-inotmatch|-ireplace|-is|-isnot|-isplit|-join|-le|-like|-lt|-match|-ne|-not|-notcontains|-notin|-notlike|-notmatch|-or|-regex|-replace|-shl|-shr|-split|-wildcard|-xor",")\\b")},{className:"literal",begin:/(-){1,2}[\w\d-]+/,relevance:0}]},h={className:"function",begin:/\[.*\]\s*[\w]+[ ]??\(/,end:/$/,returnBegin:!0,relevance:0,contains:[{className:"keyword",begin:"(".concat(t.keyword.toString().replace(/\s/g,"|"),")\\b"),endsParent:!0,relevance:0},e.inherit(e.TITLE_MODE,{endsParent:!0})]},p=[h,a,n,e.NUMBER_MODE,i,o,s,r,{className:"literal",begin:/\$(null|true|false)\b/},{className:"selector-tag",begin:/@\B/,relevance:0}],m={begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[].concat("self",p,{begin:"("+["string","char","byte","int","long","bool","decimal","single","double","DateTime","xml","array","hashtable","void"].join("|")+")",className:"built_in",relevance:0},{className:"type",begin:/[\.\w\d]+/,relevance:0})};return h.contains.unshift(m),{name:"PowerShell",aliases:["pwsh","ps","ps1"],case_insensitive:!0,keywords:t,contains:p.concat(l,c,u,d,m)}}},function(e,t){e.exports=function(e){const t=e.regex,n=["displayHeight","displayWidth","mouseY","mouseX","mousePressed","pmouseX","pmouseY","key","keyCode","pixels","focused","frameCount","frameRate","height","width","size","createGraphics","beginDraw","createShape","loadShape","PShape","arc","ellipse","line","point","quad","rect","triangle","bezier","bezierDetail","bezierPoint","bezierTangent","curve","curveDetail","curvePoint","curveTangent","curveTightness","shape","shapeMode","beginContour","beginShape","bezierVertex","curveVertex","endContour","endShape","quadraticVertex","vertex","ellipseMode","noSmooth","rectMode","smooth","strokeCap","strokeJoin","strokeWeight","mouseClicked","mouseDragged","mouseMoved","mousePressed","mouseReleased","mouseWheel","keyPressed","keyPressedkeyReleased","keyTyped","print","println","save","saveFrame","day","hour","millis","minute","month","second","year","background","clear","colorMode","fill","noFill","noStroke","stroke","alpha","blue","brightness","color","green","hue","lerpColor","red","saturation","modelX","modelY","modelZ","screenX","screenY","screenZ","ambient","emissive","shininess","specular","add","createImage","beginCamera","camera","endCamera","frustum","ortho","perspective","printCamera","printProjection","cursor","frameRate","noCursor","exit","loop","noLoop","popStyle","pushStyle","redraw","binary","boolean","byte","char","float","hex","int","str","unbinary","unhex","join","match","matchAll","nf","nfc","nfp","nfs","split","splitTokens","trim","append","arrayCopy","concat","expand","reverse","shorten","sort","splice","subset","box","sphere","sphereDetail","createInput","createReader","loadBytes","loadJSONArray","loadJSONObject","loadStrings","loadTable","loadXML","open","parseXML","saveTable","selectFolder","selectInput","beginRaw","beginRecord","createOutput","createWriter","endRaw","endRecord","PrintWritersaveBytes","saveJSONArray","saveJSONObject","saveStream","saveStrings","saveXML","selectOutput","popMatrix","printMatrix","pushMatrix","resetMatrix","rotate","rotateX","rotateY","rotateZ","scale","shearX","shearY","translate","ambientLight","directionalLight","lightFalloff","lights","lightSpecular","noLights","normal","pointLight","spotLight","image","imageMode","loadImage","noTint","requestImage","tint","texture","textureMode","textureWrap","blend","copy","filter","get","loadPixels","set","updatePixels","blendMode","loadShader","PShaderresetShader","shader","createFont","loadFont","text","textFont","textAlign","textLeading","textMode","textSize","textWidth","textAscent","textDescent","abs","ceil","constrain","dist","exp","floor","lerp","log","mag","map","max","min","norm","pow","round","sq","sqrt","acos","asin","atan","atan2","cos","degrees","radians","sin","tan","noise","noiseDetail","noiseSeed","random","randomGaussian","randomSeed"],r=e.IDENT_RE,i={variants:[{match:t.concat(t.either(...n),t.lookahead(/\s*\(/)),className:"built_in"},{relevance:0,match:t.concat(/\b(?!for|if|while)/,r,t.lookahead(/\s*\(/)),className:"title.function"}]},o={match:[/new\s+/,r],className:{1:"keyword",2:"class.title"}},a={relevance:0,match:[/\./,r],className:{2:"property"}},s={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,r]},{match:[/class/,/\s+/,r]}],className:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}};return{name:"Processing",aliases:["pde"],keywords:{keyword:["abstract","assert","break","case","catch","const","continue","default","else","enum","final","finally","for","if","import","instanceof","long","native","new","package","private","private","protected","protected","public","public","return","static","strictfp","switch","synchronized","throw","throws","transient","try","void","volatile","while"],literal:"P2D P3D HALF_PI PI QUARTER_PI TAU TWO_PI null true false",title:"setup draw",variable:"super this",built_in:[...n,"BufferedReader","PVector","PFont","PImage","PGraphics","HashMap","String","Array","FloatDict","ArrayList","FloatList","IntDict","IntList","JSONArray","JSONObject","Object","StringDict","StringList","Table","TableRow","XML"],type:["boolean","byte","char","color","double","float","int","long","short"]},contains:[s,o,i,a,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE]}}},function(e,t){e.exports=function(e){return{name:"Python profiler",contains:[e.C_NUMBER_MODE,{begin:"[a-zA-Z_][\\da-zA-Z_]+\\.[\\da-zA-Z_]{1,3}",end:":",excludeEnd:!0},{begin:"(ncalls|tottime|cumtime)",end:"$",keywords:"ncalls tottime|10 cumtime|10 filename",relevance:10},{begin:"function calls",end:"$",contains:[e.C_NUMBER_MODE],relevance:10},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"\\(",end:"\\)$",excludeBegin:!0,excludeEnd:!0,relevance:0}]}}},function(e,t){e.exports=function(e){const t={begin:/\(/,end:/\)/,relevance:0},n={begin:/\[/,end:/\]/},r={className:"comment",begin:/%/,end:/$/,contains:[e.PHRASAL_WORDS_MODE]},i={className:"string",begin:/`/,end:/`/,contains:[e.BACKSLASH_ESCAPE]},o=[{begin:/[a-z][A-Za-z0-9_]*/,relevance:0},{className:"symbol",variants:[{begin:/[A-Z][a-zA-Z0-9_]*/},{begin:/_[A-Za-z0-9_]*/}],relevance:0},t,{begin:/:-/},n,r,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,i,{className:"string",begin:/0'(\\'|.)/},{className:"string",begin:/0'\\s/},e.C_NUMBER_MODE];return t.contains=o,n.contains=o,{name:"Prolog",contains:o.concat([{begin:/\.$/}])}}},function(e,t){e.exports=function(e){const t="[ \\t\\f]*",n=t+"[:=]"+t,r="[ \\t\\f]+",i="([^\\\\:= \\t\\f\\n]|\\\\.)+",o={end:"("+n+"|"+r+")",relevance:0,starts:{className:"string",end:/$/,relevance:0,contains:[{begin:"\\\\\\\\"},{begin:"\\\\\\n"}]}};return{name:".properties",disableAutodetect:!0,case_insensitive:!0,illegal:/\S/,contains:[e.COMMENT("^\\s*[!#]","$"),{returnBegin:!0,variants:[{begin:i+n},{begin:i+r}],contains:[{className:"attr",begin:i,endsParent:!0}],starts:o},{className:"attr",begin:i+t+"$"}]}}},function(e,t){e.exports=function(e){const t={match:[/(message|enum|service)\s+/,e.IDENT_RE],scope:{1:"keyword",2:"title.class"}};return{name:"Protocol Buffers",keywords:{keyword:["package","import","option","optional","required","repeated","group","oneof"],type:["double","float","int32","int64","uint32","uint64","sint32","sint64","fixed32","fixed64","sfixed32","sfixed64","bool","string","bytes"],literal:["true","false"]},contains:[e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t,{className:"function",beginKeywords:"rpc",end:/[{;]/,excludeEnd:!0,keywords:"rpc returns"},{begin:/^\s*[A-Z_]+(?=\s*=[^\n]+;$)/}]}}},function(e,t){e.exports=function(e){const t=e.COMMENT("#","$"),n="([A-Za-z_]|::)(\\w|::)*",r=e.inherit(e.TITLE_MODE,{begin:n}),i={className:"variable",begin:"\\$"+n},o={className:"string",contains:[e.BACKSLASH_ESCAPE,i],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/}]};return{name:"Puppet",aliases:["pp"],contains:[t,i,o,{beginKeywords:"class",end:"\\{|;",illegal:/=/,contains:[r,t]},{beginKeywords:"define",end:/\{/,contains:[{className:"section",begin:e.IDENT_RE,endsParent:!0}]},{begin:e.IDENT_RE+"\\s+\\{",returnBegin:!0,end:/\S/,contains:[{className:"keyword",begin:e.IDENT_RE,relevance:.2},{begin:/\{/,end:/\}/,keywords:{keyword:"and case default else elsif false if in import enherits node or true undef unless main settings $string ",literal:"alias audit before loglevel noop require subscribe tag owner ensure group mode name|0 changes context force incl lens load_path onlyif provider returns root show_diff type_check en_address ip_address realname command environment hour monute month monthday special target weekday creates cwd ogoutput refresh refreshonly tries try_sleep umask backup checksum content ctime force ignore links mtime purge recurse recurselimit replace selinux_ignore_defaults selrange selrole seltype seluser source souirce_permissions sourceselect validate_cmd validate_replacement allowdupe attribute_membership auth_membership forcelocal gid ia_load_module members system host_aliases ip allowed_trunk_vlans description device_url duplex encapsulation etherchannel native_vlan speed principals allow_root auth_class auth_type authenticate_user k_of_n mechanisms rule session_owner shared options device fstype enable hasrestart directory present absent link atboot blockdevice device dump pass remounts poller_tag use message withpath adminfile allow_virtual allowcdrom category configfiles flavor install_options instance package_settings platform responsefile status uninstall_options vendor unless_system_user unless_uid binary control flags hasstatus manifest pattern restart running start stop allowdupe auths expiry gid groups home iterations key_membership keys managehome membership password password_max_age password_min_age profile_membership profiles project purge_ssh_keys role_membership roles salt shell uid baseurl cost descr enabled enablegroups exclude failovermethod gpgcheck gpgkey http_caching include includepkgs keepalive metadata_expire metalink mirrorlist priority protect proxy proxy_password proxy_username repo_gpgcheck s3_enabled skip_if_unavailable sslcacert sslclientcert sslclientkey sslverify mounted",built_in:"architecture augeasversion blockdevices boardmanufacturer boardproductname boardserialnumber cfkey dhcp_servers domain ec2_ ec2_userdata facterversion filesystems ldom fqdn gid hardwareisa hardwaremodel hostname id|0 interfaces ipaddress ipaddress_ ipaddress6 ipaddress6_ iphostnumber is_virtual kernel kernelmajversion kernelrelease kernelversion kernelrelease kernelversion lsbdistcodename lsbdistdescription lsbdistid lsbdistrelease lsbmajdistrelease lsbminordistrelease lsbrelease macaddress macaddress_ macosx_buildversion macosx_productname macosx_productversion macosx_productverson_major macosx_productversion_minor manufacturer memoryfree memorysize netmask metmask_ network_ operatingsystem operatingsystemmajrelease operatingsystemrelease osfamily partitions path physicalprocessorcount processor processorcount productname ps puppetversion rubysitedir rubyversion selinux selinux_config_mode selinux_config_policy selinux_current_mode selinux_current_mode selinux_enforced selinux_policyversion serialnumber sp_ sshdsakey sshecdsakey sshrsakey swapencrypted swapfree swapsize timezone type uniqueid uptime uptime_days uptime_hours uptime_seconds uuid virtual vlans xendomains zfs_version zonenae zones zpool_version"},relevance:0,contains:[o,t,{begin:"[a-zA-Z_]+\\s*=>",returnBegin:!0,end:"=>",contains:[{className:"attr",begin:e.IDENT_RE}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},i]}],relevance:0}]}}},function(e,t){e.exports=function(e){return{name:"PureBASIC",aliases:["pb","pbi"],keywords:"Align And Array As Break CallDebugger Case CompilerCase CompilerDefault CompilerElse CompilerElseIf CompilerEndIf CompilerEndSelect CompilerError CompilerIf CompilerSelect CompilerWarning Continue Data DataSection Debug DebugLevel Declare DeclareC DeclareCDLL DeclareDLL DeclareModule Default Define Dim DisableASM DisableDebugger DisableExplicit Else ElseIf EnableASM EnableDebugger EnableExplicit End EndDataSection EndDeclareModule EndEnumeration EndIf EndImport EndInterface EndMacro EndModule EndProcedure EndSelect EndStructure EndStructureUnion EndWith Enumeration EnumerationBinary Extends FakeReturn For ForEach ForEver Global Gosub Goto If Import ImportC IncludeBinary IncludeFile IncludePath Interface List Macro MacroExpandedCount Map Module NewList NewMap Next Not Or Procedure ProcedureC ProcedureCDLL ProcedureDLL ProcedureReturn Protected Prototype PrototypeC ReDim Read Repeat Restore Return Runtime Select Shared Static Step Structure StructureUnion Swap Threaded To UndefineMacro Until Until UnuseModule UseModule Wend While With XIncludeFile XOr",contains:[e.COMMENT(";","$",{relevance:0}),{className:"function",begin:"\\b(Procedure|Declare)(C|CDLL|DLL)?\\b",end:"\\(",excludeEnd:!0,returnBegin:!0,contains:[{className:"keyword",begin:"(Procedure|Declare)(C|CDLL|DLL)?",excludeEnd:!0},{className:"type",begin:"\\.\\w*"},e.UNDERSCORE_TITLE_MODE]},{className:"string",begin:'(~)?"',end:'"',illegal:"\\n"},{className:"symbol",begin:"#[a-zA-Z_]\\w*\\$?"}]}}},function(e,t){e.exports=function(e){const t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],i={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},o={className:"meta",begin:/^(>>>|\.\.\.) /},a={className:"subst",begin:/\{/,end:/\}/,keywords:i,illegal:/#/},s={begin:/\{\{/,relevance:0},l={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,o],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,o],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,o,s,a]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,o,s,a]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,s,a]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,a]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},c="[0-9](_?[0-9])*",u=`(\\b(${c}))?\\.(${c})|\\b(${c})\\.`,d=`\\b|${r.join("|")}`,h={className:"number",relevance:0,variants:[{begin:`(\\b(${c})|(${u}))[eE][+-]?(${c})[jJ]?(?=${d})`},{begin:`(${u})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${d})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${d})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${d})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${d})`},{begin:`\\b(${c})[jJ](?=${d})`}]},p={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:i,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},m={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:["self",o,h,l,e.HASH_COMMENT_MODE]}]};return a.contains=[l,h,o],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:i,illegal:/(<\/|->|\?)|=>/,contains:[o,h,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},l,p,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[m]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[h,m,l]}]}}},function(e,t){e.exports=function(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}},function(e,t){e.exports=function(e){return{name:"Q",aliases:["k","kdb"],keywords:{$pattern:/(`?)[A-Za-z0-9_]+\b/,keyword:"do while select delete by update from",literal:"0b 1b",built_in:"neg not null string reciprocal floor ceiling signum mod xbar xlog and or each scan over prior mmu lsq inv md5 ltime gtime count first var dev med cov cor all any rand sums prds mins maxs fills deltas ratios avgs differ prev next rank reverse iasc idesc asc desc msum mcount mavg mdev xrank mmin mmax xprev rotate distinct group where flip type key til get value attr cut set upsert raze union inter except cross sv vs sublist enlist read0 read1 hopen hclose hdel hsym hcount peach system ltrim rtrim trim lower upper ssr view tables views cols xcols keys xkey xcol xasc xdesc fkeys meta lj aj aj0 ij pj asof uj ww wj wj1 fby xgroup ungroup ej save load rsave rload show csv parse eval min max avg wavg wsum sin cos tan sum",type:"`float `double int `timestamp `timespan `datetime `time `boolean `symbol `char `byte `short `long `real `month `date `minute `second `guid"},contains:[e.C_LINE_COMMENT_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE]}}},function(e,t){e.exports=function(e){const t="[a-zA-Z_][a-zA-Z0-9\\._]*",n={className:"attribute",begin:"\\bid\\s*:",starts:{className:"string",end:t,returnEnd:!1}},r={begin:t+"\\s*:",returnBegin:!0,contains:[{className:"attribute",begin:t,end:"\\s*:",excludeEnd:!0,relevance:0}],relevance:0},i={begin:e.regex.concat(t,/\s*\{/),end:/\{/,returnBegin:!0,relevance:0,contains:[e.inherit(e.TITLE_MODE,{begin:t})]};return{name:"QML",aliases:["qt"],case_insensitive:!1,keywords:{keyword:"in of on if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await import",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Behavior bool color coordinate date double enumeration font geocircle georectangle geoshape int list matrix4x4 parent point quaternion real rect size string url variant vector2d vector3d vector4d Promise"},contains:[{className:"meta",begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,{className:"subst",begin:"\\$\\{",end:"\\}"}]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:e.C_NUMBER_RE}],relevance:0},{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.REGEXP_MODE,{begin:/</,end:/>\s*[);\]]/,relevance:0,subLanguage:"xml"}],relevance:0},{className:"keyword",begin:"\\bsignal\\b",starts:{className:"string",end:"(\\(|:|=|;|,|//|/\\*|$)",returnEnd:!0}},{className:"keyword",begin:"\\bproperty\\b",starts:{className:"string",end:"(:|=|;|,|//|/\\*|$)",returnEnd:!0}},{className:"function",beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}],illegal:/\[|%/},{begin:"\\."+e.IDENT_RE,relevance:0},n,r,i],illegal:/#/}}},function(e,t){e.exports=function(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,o=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[i,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[o,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:o},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}},function(e,t){e.exports=function(e){const t="~?[a-z$_][0-9a-zA-Z$_]*",n="`?[A-Z$_][0-9a-zA-Z$_]*",r="'?[a-z$_][0-9a-z$_]*",i=t+"("+("\\s*:\\s*[a-z$_][0-9a-z$_]*(\\(\\s*("+r+"\\s*(,"+r+"\\s*)*)?\\))?")+"){0,2}",o="("+(["||","++","**","+.","*","/","*.","/.","..."].map((function(e){return e.split("").map((function(e){return"\\"+e})).join("")})).join("|")+"|\\|>|&&|==|===)"),a="\\s+"+o+"\\s+",s={keyword:"and as asr assert begin class constraint do done downto else end exception external for fun function functor if in include inherit initializer land lazy let lor lsl lsr lxor match method mod module mutable new nonrec object of open or private rec sig struct then to try type val virtual when while with",built_in:"array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 ref string unit ",literal:"true false"},l="\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",c={className:"number",relevance:0,variants:[{begin:l},{begin:"\\(-"+l+"\\)"}]},u={className:"operator",relevance:0,begin:o},d=[{className:"identifier",relevance:0,begin:t},u,c],h=[e.QUOTE_STRING_MODE,u,{className:"module",begin:"\\b"+n,returnBegin:!0,relevance:0,end:".",contains:[{className:"identifier",begin:n,relevance:0}]}],p=[{className:"module",begin:"\\b"+n,returnBegin:!0,end:".",relevance:0,contains:[{className:"identifier",begin:n,relevance:0}]}],m={className:"function",relevance:0,keywords:s,variants:[{begin:"\\s(\\(\\.?.*?\\)|"+t+")\\s*=>",end:"\\s*=>",returnBegin:!0,relevance:0,contains:[{className:"params",variants:[{begin:t},{begin:i},{begin:/\(\s*\)/}]}]},{begin:"\\s\\(\\.?[^;\\|]*\\)\\s*=>",end:"\\s=>",returnBegin:!0,relevance:0,contains:[{className:"params",relevance:0,variants:[{begin:t,end:"(,|\\n|\\))",relevance:0,contains:[u,{className:"typing",begin:":",end:"(,|\\n)",returnBegin:!0,relevance:0,contains:p}]}]}]},{begin:"\\(\\.\\s"+t+"\\)\\s*=>"}]};h.push(m);const g={className:"constructor",begin:n+"\\(",end:"\\)",illegal:"\\n",keywords:s,contains:[e.QUOTE_STRING_MODE,u,{className:"params",begin:"\\b"+t}]},f={className:"pattern-match",begin:"\\|",returnBegin:!0,keywords:s,end:"=>",relevance:0,contains:[g,u,{relevance:0,className:"constructor",begin:n}]},_={className:"module-access",keywords:s,returnBegin:!0,variants:[{begin:"\\b("+n+"\\.)+"+t},{begin:"\\b("+n+"\\.)+\\(",end:"\\)",returnBegin:!0,contains:[m,{begin:"\\(",end:"\\)",relevance:0,skip:!0}].concat(h)},{begin:"\\b("+n+"\\.)+\\{",end:/\}/}],contains:h};return p.push(_),{name:"ReasonML",aliases:["re"],keywords:s,illegal:"(:-|:=|\\$\\{|\\+=)",contains:[e.COMMENT("/\\*","\\*/",{illegal:"^(#,\\/\\/)"}),{className:"character",begin:"'(\\\\[^']+|[^'])'",illegal:"\\n",relevance:0},e.QUOTE_STRING_MODE,{className:"literal",begin:"\\(\\)",relevance:0},{className:"literal",begin:"\\[\\|",end:"\\|\\]",relevance:0,contains:d},{className:"literal",begin:"\\[",end:"\\]",relevance:0,contains:d},g,{className:"operator",begin:a,illegal:"--\x3e",relevance:0},c,e.C_LINE_COMMENT_MODE,f,m,{className:"module-def",begin:"\\bmodule\\s+"+t+"\\s+"+n+"\\s+=\\s+\\{",end:/\}/,returnBegin:!0,keywords:s,relevance:0,contains:[{className:"module",relevance:0,begin:n},{begin:/\{/,end:/\}/,relevance:0,skip:!0}].concat(h)},_]}}},function(e,t){e.exports=function(e){return{name:"RenderMan RIB",keywords:"ArchiveRecord AreaLightSource Atmosphere Attribute AttributeBegin AttributeEnd Basis Begin Blobby Bound Clipping ClippingPlane Color ColorSamples ConcatTransform Cone CoordinateSystem CoordSysTransform CropWindow Curves Cylinder DepthOfField Detail DetailRange Disk Displacement Display End ErrorHandler Exposure Exterior Format FrameAspectRatio FrameBegin FrameEnd GeneralPolygon GeometricApproximation Geometry Hider Hyperboloid Identity Illuminate Imager Interior LightSource MakeCubeFaceEnvironment MakeLatLongEnvironment MakeShadow MakeTexture Matte MotionBegin MotionEnd NuPatch ObjectBegin ObjectEnd ObjectInstance Opacity Option Orientation Paraboloid Patch PatchMesh Perspective PixelFilter PixelSamples PixelVariance Points PointsGeneralPolygons PointsPolygons Polygon Procedural Projection Quantize ReadArchive RelativeDetail ReverseOrientation Rotate Scale ScreenWindow ShadingInterpolation ShadingRate Shutter Sides Skew SolidBegin SolidEnd Sphere SubdivisionMesh Surface TextureCoordinates Torus Transform TransformBegin TransformEnd TransformPoints Translate TrimCurve WorldBegin WorldEnd",illegal:"</",contains:[e.HASH_COMMENT_MODE,e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]}}},function(e,t){e.exports=function(e){const t="[a-zA-Z-_][^\\n{]+\\{",n={className:"attribute",begin:/[a-zA-Z-_]+/,end:/\s*:/,excludeEnd:!0,starts:{end:";",relevance:0,contains:[{className:"variable",begin:/\.[a-zA-Z-_]+/},{className:"keyword",begin:/\(optional\)/}]}};return{name:"Roboconf",aliases:["graph","instances"],case_insensitive:!0,keywords:"import",contains:[{begin:"^facet "+t,end:/\}/,keywords:"facet",contains:[n,e.HASH_COMMENT_MODE]},{begin:"^\\s*instance of "+t,end:/\}/,keywords:"name count channels instance-data instance-state instance of",illegal:/\S/,contains:["self",n,e.HASH_COMMENT_MODE]},{begin:"^"+t,end:/\}/,contains:[n,e.HASH_COMMENT_MODE]},e.HASH_COMMENT_MODE]}}},function(e,t){e.exports=function(e){const t="foreach do while for if from to step else on-error and or not in",n="true false yes no nothing nil null",r={className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},i={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,r,{className:"variable",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]}]},o={className:"string",begin:/'/,end:/'/};return{name:"MikroTik RouterOS script",aliases:["mikrotik"],case_insensitive:!0,keywords:{$pattern:/:?[\w-]+/,literal:n,keyword:t+" :"+t.split(" ").join(" :")+" :"+"global local beep delay put len typeof pick log time set find environment terminal error execute parse resolve toarray tobool toid toip toip6 tonum tostr totime".split(" ").join(" :")},contains:[{variants:[{begin:/\/\*/,end:/\*\//},{begin:/\/\//,end:/$/},{begin:/<\//,end:/>/}],illegal:/./},e.COMMENT("^#","$"),i,o,r,{begin:/[\w-]+=([^\s{}[\]()>]+)/,relevance:0,returnBegin:!0,contains:[{className:"attribute",begin:/[^=]+/},{begin:/=/,endsWithParent:!0,relevance:0,contains:[i,o,r,{className:"literal",begin:"\\b("+n.split(" ").join("|")+")\\b"},{begin:/("[^"]*"|[^\s{}[\]]+)/}]}]},{className:"number",begin:/\*[0-9a-fA-F]+/},{begin:"\\b("+"add remove enable disable set get print export edit find run debug error info warning".split(" ").join("|")+")([\\s[(\\]|])",returnBegin:!0,contains:[{className:"built_in",begin:/\w+/}]},{className:"built_in",variants:[{begin:"(\\.\\./|/|\\s)(("+"traffic-flow traffic-generator firewall scheduler aaa accounting address-list address align area bandwidth-server bfd bgp bridge client clock community config connection console customer default dhcp-client dhcp-server discovery dns e-mail ethernet filter firmware gps graphing group hardware health hotspot identity igmp-proxy incoming instance interface ip ipsec ipv6 irq l2tp-server lcd ldp logging mac-server mac-winbox mangle manual mirror mme mpls nat nd neighbor network note ntp ospf ospf-v3 ovpn-server page peer pim ping policy pool port ppp pppoe-client pptp-server prefix profile proposal proxy queue radius resource rip ripng route routing screen script security-profiles server service service-port settings shares smb sms sniffer snmp snooper socks sstp-server system tool tracking type upgrade upnp user-manager users user vlan secret vrrp watchdog web-access wireless pptp pppoe lan wan layer7-protocol lease simple raw".split(" ").join("|")+");?\\s)+"},{begin:/\.\./,relevance:0}]}]}}},function(e,t){e.exports=function(e){const t={match:[/(surface|displacement|light|volume|imager)/,/\s+/,e.IDENT_RE],scope:{1:"keyword",3:"title.class"}};return{name:"RenderMan RSL",keywords:{keyword:["while","for","if","do","return","else","break","extern","continue"],built_in:["abs","acos","ambient","area","asin","atan","atmosphere","attribute","calculatenormal","ceil","cellnoise","clamp","comp","concat","cos","degrees","depth","Deriv","diffuse","distance","Du","Dv","environment","exp","faceforward","filterstep","floor","format","fresnel","incident","length","lightsource","log","match","max","min","mod","noise","normalize","ntransform","opposite","option","phong","pnoise","pow","printf","ptlined","radians","random","reflect","refract","renderinfo","round","setcomp","setxcomp","setycomp","setzcomp","shadow","sign","sin","smoothstep","specular","specularbrdf","spline","sqrt","step","tan","texture","textureinfo","trace","transform","vtransform","xcomp","ycomp","zcomp"],type:["matrix","float","color","point","normal","vector"]},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_NUMBER_MODE,{className:"meta",begin:"#",end:"$"},t,{beginKeywords:"illuminate illuminance gather",end:"\\("}]}}},function(e,t){e.exports=function(e){return{name:"Oracle Rules Language",keywords:{keyword:"BILL_PERIOD BILL_START BILL_STOP RS_EFFECTIVE_START RS_EFFECTIVE_STOP RS_JURIS_CODE RS_OPCO_CODE INTDADDATTRIBUTE|5 INTDADDVMSG|5 INTDBLOCKOP|5 INTDBLOCKOPNA|5 INTDCLOSE|5 INTDCOUNT|5 INTDCOUNTSTATUSCODE|5 INTDCREATEMASK|5 INTDCREATEDAYMASK|5 INTDCREATEFACTORMASK|5 INTDCREATEHANDLE|5 INTDCREATEOVERRIDEDAYMASK|5 INTDCREATEOVERRIDEMASK|5 INTDCREATESTATUSCODEMASK|5 INTDCREATETOUPERIOD|5 INTDDELETE|5 INTDDIPTEST|5 INTDEXPORT|5 INTDGETERRORCODE|5 INTDGETERRORMESSAGE|5 INTDISEQUAL|5 INTDJOIN|5 INTDLOAD|5 INTDLOADACTUALCUT|5 INTDLOADDATES|5 INTDLOADHIST|5 INTDLOADLIST|5 INTDLOADLISTDATES|5 INTDLOADLISTENERGY|5 INTDLOADLISTHIST|5 INTDLOADRELATEDCHANNEL|5 INTDLOADSP|5 INTDLOADSTAGING|5 INTDLOADUOM|5 INTDLOADUOMDATES|5 INTDLOADUOMHIST|5 INTDLOADVERSION|5 INTDOPEN|5 INTDREADFIRST|5 INTDREADNEXT|5 INTDRECCOUNT|5 INTDRELEASE|5 INTDREPLACE|5 INTDROLLAVG|5 INTDROLLPEAK|5 INTDSCALAROP|5 INTDSCALE|5 INTDSETATTRIBUTE|5 INTDSETDSTPARTICIPANT|5 INTDSETSTRING|5 INTDSETVALUE|5 INTDSETVALUESTATUS|5 INTDSHIFTSTARTTIME|5 INTDSMOOTH|5 INTDSORT|5 INTDSPIKETEST|5 INTDSUBSET|5 INTDTOU|5 INTDTOURELEASE|5 INTDTOUVALUE|5 INTDUPDATESTATS|5 INTDVALUE|5 STDEV INTDDELETEEX|5 INTDLOADEXACTUAL|5 INTDLOADEXCUT|5 INTDLOADEXDATES|5 INTDLOADEX|5 INTDLOADEXRELATEDCHANNEL|5 INTDSAVEEX|5 MVLOAD|5 MVLOADACCT|5 MVLOADACCTDATES|5 MVLOADACCTHIST|5 MVLOADDATES|5 MVLOADHIST|5 MVLOADLIST|5 MVLOADLISTDATES|5 MVLOADLISTHIST|5 IF FOR NEXT DONE SELECT END CALL ABORT CLEAR CHANNEL FACTOR LIST NUMBER OVERRIDE SET WEEK DISTRIBUTIONNODE ELSE WHEN THEN OTHERWISE IENUM CSV INCLUDE LEAVE RIDER SAVE DELETE NOVALUE SECTION WARN SAVE_UPDATE DETERMINANT LABEL REPORT REVENUE EACH IN FROM TOTAL CHARGE BLOCK AND OR CSV_FILE RATE_CODE AUXILIARY_DEMAND UIDACCOUNT RS BILL_PERIOD_SELECT HOURS_PER_MONTH INTD_ERROR_STOP SEASON_SCHEDULE_NAME ACCOUNTFACTOR ARRAYUPPERBOUND CALLSTOREDPROC GETADOCONNECTION GETCONNECT GETDATASOURCE GETQUALIFIER GETUSERID HASVALUE LISTCOUNT LISTOP LISTUPDATE LISTVALUE PRORATEFACTOR RSPRORATE SETBINPATH SETDBMONITOR WQ_OPEN BILLINGHOURS DATE DATEFROMFLOAT DATETIMEFROMSTRING DATETIMETOSTRING DATETOFLOAT DAY DAYDIFF DAYNAME DBDATETIME HOUR MINUTE MONTH MONTHDIFF MONTHHOURS MONTHNAME ROUNDDATE SAMEWEEKDAYLASTYEAR SECOND WEEKDAY WEEKDIFF YEAR YEARDAY YEARSTR COMPSUM HISTCOUNT HISTMAX HISTMIN HISTMINNZ HISTVALUE MAXNRANGE MAXRANGE MINRANGE COMPIKVA COMPKVA COMPKVARFROMKQKW COMPLF IDATTR FLAG LF2KW LF2KWH MAXKW POWERFACTOR READING2USAGE AVGSEASON MAXSEASON MONTHLYMERGE SEASONVALUE SUMSEASON ACCTREADDATES ACCTTABLELOAD CONFIGADD CONFIGGET CREATEOBJECT CREATEREPORT EMAILCLIENT EXPBLKMDMUSAGE EXPMDMUSAGE EXPORT_USAGE FACTORINEFFECT GETUSERSPECIFIEDSTOP INEFFECT ISHOLIDAY RUNRATE SAVE_PROFILE SETREPORTTITLE USEREXIT WATFORRUNRATE TO TABLE ACOS ASIN ATAN ATAN2 BITAND CEIL COS COSECANT COSH COTANGENT DIVQUOT DIVREM EXP FABS FLOOR FMOD FREPM FREXPN LOG LOG10 MAX MAXN MIN MINNZ MODF POW ROUND ROUND2VALUE ROUNDINT SECANT SIN SINH SQROOT TAN TANH FLOAT2STRING FLOAT2STRINGNC INSTR LEFT LEN LTRIM MID RIGHT RTRIM STRING STRINGNC TOLOWER TOUPPER TRIM NUMDAYS READ_DATE STAGING",built_in:"IDENTIFIER OPTIONS XML_ELEMENT XML_OP XML_ELEMENT_OF DOMDOCCREATE DOMDOCLOADFILE DOMDOCLOADXML DOMDOCSAVEFILE DOMDOCGETROOT DOMDOCADDPI DOMNODEGETNAME DOMNODEGETTYPE DOMNODEGETVALUE DOMNODEGETCHILDCT DOMNODEGETFIRSTCHILD DOMNODEGETSIBLING DOMNODECREATECHILDELEMENT DOMNODESETATTRIBUTE DOMNODEGETCHILDELEMENTCT DOMNODEGETFIRSTCHILDELEMENT DOMNODEGETSIBLINGELEMENT DOMNODEGETATTRIBUTECT DOMNODEGETATTRIBUTEI DOMNODEGETATTRIBUTEBYNAME DOMNODEGETBYNAME"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{className:"literal",variants:[{begin:"#\\s+",relevance:0},{begin:"#[a-zA-Z .]+"}]}]}}},function(e,t){e.exports=function(e){const t=e.regex,n={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let\b)/,e.IDENT_RE,t.lookahead(/\s*\(/))},r="([ui](8|16|32|64|128|size)|f(32|64))?",i=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],o=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:o,keyword:["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","unsafe","unsized","use","virtual","where","while","yield"],literal:["true","false","Some","None","Ok","Err"],built_in:i},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'\\?(x\w{2}|u\w{4}|U\w{8}|.)'/}]},{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*/},{className:"number",variants:[{begin:"\\b0b([01_]+)"+r},{begin:"\\b0o([0-7_]+)"+r},{begin:"\\b0x([A-Fa-f0-9_]+)"+r},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+r}],relevance:0},{begin:[/fn/,/\s+/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,e.UNDERSCORE_IDENT_RE,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:i,type:o}},{className:"punctuation",begin:"->"},n]}}},function(e,t){e.exports=function(e){const t=e.regex;return{name:"SAS",case_insensitive:!0,keywords:{literal:["null","missing","_all_","_automatic_","_character_","_infile_","_n_","_name_","_null_","_numeric_","_user_","_webout_"],keyword:["do","if","then","else","end","until","while","abort","array","attrib","by","call","cards","cards4","catname","continue","datalines","datalines4","delete","delim","delimiter","display","dm","drop","endsas","error","file","filename","footnote","format","goto","in","infile","informat","input","keep","label","leave","length","libname","link","list","lostcard","merge","missing","modify","options","output","out","page","put","redirect","remove","rename","replace","retain","return","select","set","skip","startsas","stop","title","update","waitsas","where","window","x|0","systask","add","and","alter","as","cascade","check","create","delete","describe","distinct","drop","foreign","from","group","having","index","insert","into","in","key","like","message","modify","msgtype","not","null","on","or","order","primary","references","reset","restrict","select","set","table","unique","update","validate","view","where"]},contains:[{className:"keyword",begin:/^\s*(proc [\w\d_]+|data|run|quit)[\s;]/},{className:"variable",begin:/&[a-zA-Z_&][a-zA-Z0-9_]*\.?/},{begin:[/^\s*/,/datalines;|cards;/,/(?:.*\n)+/,/^\s*;\s*$/],className:{2:"keyword",3:"string"}},{begin:[/%mend|%macro/,/\s+/,/[a-zA-Z_&][a-zA-Z0-9_]*/],className:{1:"built_in",3:"title.function"}},{className:"built_in",begin:"%"+t.either("bquote","nrbquote","cmpres","qcmpres","compstor","datatyp","display","do","else","end","eval","global","goto","if","index","input","keydef","label","left","length","let","local","lowcase","macro","mend","nrbquote","nrquote","nrstr","put","qcmpres","qleft","qlowcase","qscan","qsubstr","qsysfunc","qtrim","quote","qupcase","scan","str","substr","superq","syscall","sysevalf","sysexec","sysfunc","sysget","syslput","sysprod","sysrc","sysrput","then","to","trim","unquote","until","upcase","verify","while","window")},{className:"title.function",begin:/%[a-zA-Z_][a-zA-Z_0-9]*/},{className:"meta",begin:t.either("abs","addr","airy","arcos","arsin","atan","attrc","attrn","band","betainv","blshift","bnot","bor","brshift","bxor","byte","cdf","ceil","cexist","cinv","close","cnonct","collate","compbl","compound","compress","cos","cosh","css","curobs","cv","daccdb","daccdbsl","daccsl","daccsyd","dacctab","dairy","date","datejul","datepart","datetime","day","dclose","depdb","depdbsl","depdbsl","depsl","depsl","depsyd","depsyd","deptab","deptab","dequote","dhms","dif","digamma","dim","dinfo","dnum","dopen","doptname","doptnum","dread","dropnote","dsname","erf","erfc","exist","exp","fappend","fclose","fcol","fdelete","fetch","fetchobs","fexist","fget","fileexist","filename","fileref","finfo","finv","fipname","fipnamel","fipstate","floor","fnonct","fnote","fopen","foptname","foptnum","fpoint","fpos","fput","fread","frewind","frlen","fsep","fuzz","fwrite","gaminv","gamma","getoption","getvarc","getvarn","hbound","hms","hosthelp","hour","ibessel","index","indexc","indexw","input","inputc","inputn","int","intck","intnx","intrr","irr","jbessel","juldate","kurtosis","lag","lbound","left","length","lgamma","libname","libref","log","log10","log2","logpdf","logpmf","logsdf","lowcase","max","mdy","mean","min","minute","mod","month","mopen","mort","n","netpv","nmiss","normal","note","npv","open","ordinal","pathname","pdf","peek","peekc","pmf","point","poisson","poke","probbeta","probbnml","probchi","probf","probgam","probhypr","probit","probnegb","probnorm","probt","put","putc","putn","qtr","quote","ranbin","rancau","ranexp","rangam","range","rank","rannor","ranpoi","rantbl","rantri","ranuni","repeat","resolve","reverse","rewind","right","round","saving","scan","sdf","second","sign","sin","sinh","skewness","soundex","spedis","sqrt","std","stderr","stfips","stname","stnamel","substr","sum","symget","sysget","sysmsg","sysprod","sysrc","system","tan","tanh","time","timepart","tinv","tnonct","today","translate","tranwrd","trigamma","trim","trimn","trunc","uniform","upcase","uss","var","varfmt","varinfmt","varlabel","varlen","varname","varnum","varray","varrayx","vartype","verify","vformat","vformatd","vformatdx","vformatn","vformatnx","vformatw","vformatwx","vformatx","vinarray","vinarrayx","vinformat","vinformatd","vinformatdx","vinformatn","vinformatnx","vinformatw","vinformatwx","vinformatx","vlabel","vlabelx","vlength","vlengthx","vname","vnamex","vtype","vtypex","weekday","year","yyq","zipfips","zipname","zipnamel","zipstate")+"(?=\\()"},{className:"string",variants:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},e.COMMENT("\\*",";"),e.C_BLOCK_COMMENT_MODE]}}},function(e,t){e.exports=function(e){const t=e.regex,n={className:"subst",variants:[{begin:"\\$[A-Za-z0-9_]+"},{begin:/\$\{/,end:/\}/}]},r={className:"string",variants:[{begin:'"""',end:'"""'},{begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:'[a-z]+"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,n]},{className:"string",begin:'[a-z]+"""',end:'"""',contains:[n],relevance:10}]},i={className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},o={className:"title",begin:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/,relevance:0},a={className:"class",beginKeywords:"class object trait type",end:/[:={\[\n;]/,excludeEnd:!0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{beginKeywords:"extends with",relevance:10},{begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[i]},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[i]},o]},s={className:"function",beginKeywords:"def",end:t.lookahead(/[:={\[(\n;]/),contains:[o]};return{name:"Scala",keywords:{literal:"true false null",keyword:"type yield lazy override def with val var sealed abstract private trait object if then forSome for while do throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit export enum given transparent"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,r,i,s,a,e.C_NUMBER_MODE,{begin:[/^\s*/,"extension",/\s+(?=[[(])/],beginScope:{2:"keyword"}},{begin:[/^\s*/,/end/,/\s+/,/(extension\b)?/],beginScope:{2:"keyword",4:"keyword"}},{match:/\.inline\b/},{begin:/\binline(?=\s)/,keywords:"inline"},{begin:[/\(\s*/,/using/,/\s+(?!\))/],beginScope:{2:"keyword"}},{className:"meta",begin:"@[A-Za-z]+"}]}}},function(e,t){e.exports=function(e){const t="[^\\(\\)\\[\\]\\{\\}\",'`;#|\\\\\\s]+",n="(-|\\+)?\\d+([./]\\d+)?",r={$pattern:t,built_in:"case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules ' * + , ,@ - ... / ; < <= = => > >= ` abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci<? char-ci=? char-ci>=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char<? char=? char>=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci<? string-ci=? string-ci>=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string<? string=? string>=? string>? string? substring symbol->string symbol? tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?"},i={className:"literal",begin:"(#t|#f|#\\\\"+t+"|#\\\\.)"},o={className:"number",variants:[{begin:n,relevance:0},{begin:n+"[+\\-]"+n+"i",relevance:0},{begin:"#b[0-1]+(/[0-1]+)?"},{begin:"#o[0-7]+(/[0-7]+)?"},{begin:"#x[0-9a-f]+(/[0-9a-f]+)?"}]},a=e.QUOTE_STRING_MODE,s=[e.COMMENT(";","$",{relevance:0}),e.COMMENT("#\\|","\\|#")],l={begin:t,relevance:0},c={className:"symbol",begin:"'"+t},u={endsWithParent:!0,relevance:0},d={variants:[{begin:/'/},{begin:"`"}],contains:[{begin:"\\(",end:"\\)",contains:["self",i,a,o,l,c]}]},h={className:"name",relevance:0,begin:t,keywords:r},p={variants:[{begin:"\\(",end:"\\)"},{begin:"\\[",end:"\\]"}],contains:[{begin:/lambda/,endsWithParent:!0,returnBegin:!0,contains:[h,{endsParent:!0,variants:[{begin:/\(/,end:/\)/},{begin:/\[/,end:/\]/}],contains:[l]}]},h,u]};return u.contains=[i,o,a,l,c,d,p].concat(s),{name:"Scheme",aliases:["scm"],illegal:/\S/,contains:[e.SHEBANG(),o,a,c,d,p].concat(s)}}},function(e,t){e.exports=function(e){const t=[e.C_NUMBER_MODE,{className:"string",begin:"'|\"",end:"'|\"",contains:[e.BACKSLASH_ESCAPE,{begin:"''"}]}];return{name:"Scilab",aliases:["sci"],keywords:{$pattern:/%?\w+/,keyword:"abort break case clear catch continue do elseif else endfunction end for function global if pause return resume select try then while",literal:"%f %F %t %T %pi %eps %inf %nan %e %i %z %s",built_in:"abs and acos asin atan ceil cd chdir clearglobal cosh cos cumprod deff disp error exec execstr exists exp eye gettext floor fprintf fread fsolve imag isdef isempty isinfisnan isvector lasterror length load linspace list listfiles log10 log2 log max min msprintf mclose mopen ones or pathconvert poly printf prod pwd rand real round sinh sin size gsort sprintf sqrt strcat strcmps tring sum system tanh tan type typename warning zeros matrix"},illegal:'("|#|/\\*|\\s+/\\w+)',contains:[{className:"function",beginKeywords:"function",end:"$",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"}]},{begin:"[a-zA-Z_][a-zA-Z_0-9]*[\\.']+",relevance:0},{begin:"\\[",end:"\\][\\.']*",relevance:0,contains:t},e.COMMENT("//","$")].concat(t)}}},function(e,t){const n=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}),r=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],i=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],o=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],a=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],s=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();e.exports=function(e){const t=n(e),l=a,c=o,u="@[a-z-]+",d={className:"variable",begin:"(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+r.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+c.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+l.join("|")+")"},d,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+s.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,d,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:u,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:i.join(" ")},contains:[{begin:u,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},d,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}},function(e,t){e.exports=function(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}},function(e,t){e.exports=function(e){const t=["add","and","cmp","cmpg","cmpl","const","div","double","float","goto","if","int","long","move","mul","neg","new","nop","not","or","rem","return","shl","shr","sput","sub","throw","ushr","xor"];return{name:"Smali",contains:[{className:"string",begin:'"',end:'"',relevance:0},e.COMMENT("#","$",{relevance:0}),{className:"keyword",variants:[{begin:"\\s*\\.end\\s[a-zA-Z0-9]*"},{begin:"^[ ]*\\.[a-zA-Z]*",relevance:0},{begin:"\\s:[a-zA-Z_0-9]*",relevance:0},{begin:"\\s("+["transient","constructor","abstract","final","synthetic","public","private","protected","static","bridge","system"].join("|")+")"}]},{className:"built_in",variants:[{begin:"\\s("+t.join("|")+")\\s"},{begin:"\\s("+t.join("|")+")((-|/)[a-zA-Z0-9]+)+\\s",relevance:10},{begin:"\\s("+["aget","aput","array","check","execute","fill","filled","goto/16","goto/32","iget","instance","invoke","iput","monitor","packed","sget","sparse"].join("|")+")((-|/)[a-zA-Z0-9]+)*\\s",relevance:10}]},{className:"class",begin:"L[^(;:\n]*;",relevance:0},{begin:"[vp][0-9]+"}]}}},function(e,t){e.exports=function(e){const t="[a-z][a-zA-Z0-9_]*",n={className:"string",begin:"\\$.{1}"},r={className:"symbol",begin:"#"+e.UNDERSCORE_IDENT_RE};return{name:"Smalltalk",aliases:["st"],keywords:["self","super","nil","true","false","thisContext"],contains:[e.COMMENT('"','"'),e.APOS_STRING_MODE,{className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},{begin:t+":",relevance:0},e.C_NUMBER_MODE,r,n,{begin:"\\|[ ]*"+t+"([ ]+"+t+")*[ ]*\\|",returnBegin:!0,end:/\|/,illegal:/\S/,contains:[{begin:"(\\|[ ]*)?"+t}]},{begin:"#\\(",end:"\\)",contains:[e.APOS_STRING_MODE,n,e.C_NUMBER_MODE,r]}]}}},function(e,t){e.exports=function(e){return{name:"SML (Standard ML)",aliases:["ml"],keywords:{$pattern:"[a-z_]\\w*!?",keyword:"abstype and andalso as case datatype do else end eqtype exception fn fun functor handle if in include infix infixr let local nonfix of op open orelse raise rec sharing sig signature struct structure then type val with withtype where while",built_in:"array bool char exn int list option order real ref string substring vector unit word",literal:"true false NONE SOME LESS EQUAL GREATER nil"},illegal:/\/\/|>>/,contains:[{className:"literal",begin:/\[(\|\|)?\]|\(\)/,relevance:0},e.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"type",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*"},e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/[-=]>/}]}}},function(e,t){e.exports=function(e){const t={className:"string",variants:[{begin:'"',end:'"',contains:[{begin:'""',relevance:0}]},{begin:"'",end:"'",contains:[{begin:"''",relevance:0}]}]},n={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"define undef ifdef ifndef else endif include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(t,{className:"string"}),{className:"string",begin:/<[^\n>]*>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]};return{name:"SQF",case_insensitive:!0,keywords:{keyword:["case","catch","default","do","else","exit","exitWith","for","forEach","from","if","private","switch","then","throw","to","try","waitUntil","while","with"],built_in:["abs","accTime","acos","action","actionIDs","actionKeys","actionKeysImages","actionKeysNames","actionKeysNamesArray","actionName","actionParams","activateAddons","activatedAddons","activateKey","add3DENConnection","add3DENEventHandler","add3DENLayer","addAction","addBackpack","addBackpackCargo","addBackpackCargoGlobal","addBackpackGlobal","addBinocularItem","addCamShake","addCuratorAddons","addCuratorCameraArea","addCuratorEditableObjects","addCuratorEditingArea","addCuratorPoints","addEditorObject","addEventHandler","addForce","addForceGeneratorRTD","addGoggles","addGroupIcon","addHandgunItem","addHeadgear","addItem","addItemCargo","addItemCargoGlobal","addItemPool","addItemToBackpack","addItemToUniform","addItemToVest","addLiveStats","addMagazine","addMagazineAmmoCargo","addMagazineCargo","addMagazineCargoGlobal","addMagazineGlobal","addMagazinePool","addMagazines","addMagazineTurret","addMenu","addMenuItem","addMissionEventHandler","addMPEventHandler","addMusicEventHandler","addonFiles","addOwnedMine","addPlayerScores","addPrimaryWeaponItem","addPublicVariableEventHandler","addRating","addResources","addScore","addScoreSide","addSecondaryWeaponItem","addSwitchableUnit","addTeamMember","addToRemainsCollector","addTorque","addUniform","addVehicle","addVest","addWaypoint","addWeapon","addWeaponCargo","addWeaponCargoGlobal","addWeaponGlobal","addWeaponItem","addWeaponPool","addWeaponTurret","addWeaponWithAttachmentsCargo","addWeaponWithAttachmentsCargoGlobal","admin","agent","agents","AGLToASL","aimedAtTarget","aimPos","airDensityCurveRTD","airDensityRTD","airplaneThrottle","airportSide","AISFinishHeal","alive","all3DENEntities","allActiveTitleEffects","allAddonsInfo","allAirports","allControls","allCurators","allCutLayers","allDead","allDeadMen","allDiarySubjects","allDisplays","allGroups","allMapMarkers","allMines","allMissionObjects","allow3DMode","allowCrewInImmobile","allowCuratorLogicIgnoreAreas","allowDamage","allowDammage","allowFileOperations","allowFleeing","allowGetIn","allowSprint","allPlayers","allSimpleObjects","allSites","allTurrets","allUnits","allUnitsUAV","allVariables","ammo","ammoOnPylon","and","animate","animateBay","animateDoor","animatePylon","animateSource","animationNames","animationPhase","animationSourcePhase","animationState","apertureParams","append","apply","armoryPoints","arrayIntersect","asin","ASLToAGL","ASLToATL","assert","assignAsCargo","assignAsCargoIndex","assignAsCommander","assignAsDriver","assignAsGunner","assignAsTurret","assignCurator","assignedCargo","assignedCommander","assignedDriver","assignedGunner","assignedItems","assignedTarget","assignedTeam","assignedVehicle","assignedVehicleRole","assignItem","assignTeam","assignToAirport","atan","atan2","atg","ATLToASL","attachedObject","attachedObjects","attachedTo","attachObject","attachTo","attackEnabled","backpack","backpackCargo","backpackContainer","backpackItems","backpackMagazines","backpackSpaceFor","batteryChargeRTD","behaviour","benchmark","bezierInterpolation","binocular","binocularItems","binocularMagazine","boundingBox","boundingBoxReal","boundingCenter","break","breakOut","breakTo","breakWith","briefingName","buildingExit","buildingPos","buldozer_EnableRoadDiag","buldozer_IsEnabledRoadDiag","buldozer_LoadNewRoads","buldozer_reloadOperMap","buttonAction","buttonSetAction","cadetMode","calculatePath","calculatePlayerVisibilityByFriendly","call","callExtension","camCommand","camCommit","camCommitPrepared","camCommitted","camConstuctionSetParams","camCreate","camDestroy","cameraEffect","cameraEffectEnableHUD","cameraInterest","cameraOn","cameraView","campaignConfigFile","camPreload","camPreloaded","camPrepareBank","camPrepareDir","camPrepareDive","camPrepareFocus","camPrepareFov","camPrepareFovRange","camPreparePos","camPrepareRelPos","camPrepareTarget","camSetBank","camSetDir","camSetDive","camSetFocus","camSetFov","camSetFovRange","camSetPos","camSetRelPos","camSetTarget","camTarget","camUseNVG","canAdd","canAddItemToBackpack","canAddItemToUniform","canAddItemToVest","cancelSimpleTaskDestination","canFire","canMove","canSlingLoad","canStand","canSuspend","canTriggerDynamicSimulation","canUnloadInCombat","canVehicleCargo","captive","captiveNum","cbChecked","cbSetChecked","ceil","channelEnabled","cheatsEnabled","checkAIFeature","checkVisibility","className","clear3DENAttribute","clear3DENInventory","clearAllItemsFromBackpack","clearBackpackCargo","clearBackpackCargoGlobal","clearForcesRTD","clearGroupIcons","clearItemCargo","clearItemCargoGlobal","clearItemPool","clearMagazineCargo","clearMagazineCargoGlobal","clearMagazinePool","clearOverlay","clearRadio","clearVehicleInit","clearWeaponCargo","clearWeaponCargoGlobal","clearWeaponPool","clientOwner","closeDialog","closeDisplay","closeOverlay","collapseObjectTree","collect3DENHistory","collectiveRTD","combatBehaviour","combatMode","commandArtilleryFire","commandChat","commander","commandFire","commandFollow","commandFSM","commandGetOut","commandingMenu","commandMove","commandRadio","commandStop","commandSuppressiveFire","commandTarget","commandWatch","comment","commitOverlay","compile","compileFinal","compileScript","completedFSM","composeText","configClasses","configFile","configHierarchy","configName","configOf","configProperties","configSourceAddonList","configSourceMod","configSourceModList","confirmSensorTarget","connectTerminalToUAV","connectToServer","continue","continueWith","controlsGroupCtrl","copyFromClipboard","copyToClipboard","copyWaypoints","cos","count","countEnemy","countFriendly","countSide","countType","countUnknown","create3DENComposition","create3DENEntity","createAgent","createCenter","createDialog","createDiaryLink","createDiaryRecord","createDiarySubject","createDisplay","createGearDialog","createGroup","createGuardedPoint","createHashMap","createHashMapFromArray","createLocation","createMarker","createMarkerLocal","createMenu","createMine","createMissionDisplay","createMPCampaignDisplay","createSimpleObject","createSimpleTask","createSite","createSoundSource","createTarget","createTask","createTeam","createTrigger","createUnit","createVehicle","createVehicleCrew","createVehicleLocal","crew","ctAddHeader","ctAddRow","ctClear","ctCurSel","ctData","ctFindHeaderRows","ctFindRowHeader","ctHeaderControls","ctHeaderCount","ctRemoveHeaders","ctRemoveRows","ctrlActivate","ctrlAddEventHandler","ctrlAngle","ctrlAnimateModel","ctrlAnimationPhaseModel","ctrlAutoScrollDelay","ctrlAutoScrollRewind","ctrlAutoScrollSpeed","ctrlChecked","ctrlClassName","ctrlCommit","ctrlCommitted","ctrlCreate","ctrlDelete","ctrlEnable","ctrlEnabled","ctrlFade","ctrlFontHeight","ctrlHTMLLoaded","ctrlIDC","ctrlIDD","ctrlMapAnimAdd","ctrlMapAnimClear","ctrlMapAnimCommit","ctrlMapAnimDone","ctrlMapCursor","ctrlMapMouseOver","ctrlMapScale","ctrlMapScreenToWorld","ctrlMapWorldToScreen","ctrlModel","ctrlModelDirAndUp","ctrlModelScale","ctrlMousePosition","ctrlParent","ctrlParentControlsGroup","ctrlPosition","ctrlRemoveAllEventHandlers","ctrlRemoveEventHandler","ctrlScale","ctrlScrollValues","ctrlSetActiveColor","ctrlSetAngle","ctrlSetAutoScrollDelay","ctrlSetAutoScrollRewind","ctrlSetAutoScrollSpeed","ctrlSetBackgroundColor","ctrlSetChecked","ctrlSetDisabledColor","ctrlSetEventHandler","ctrlSetFade","ctrlSetFocus","ctrlSetFont","ctrlSetFontH1","ctrlSetFontH1B","ctrlSetFontH2","ctrlSetFontH2B","ctrlSetFontH3","ctrlSetFontH3B","ctrlSetFontH4","ctrlSetFontH4B","ctrlSetFontH5","ctrlSetFontH5B","ctrlSetFontH6","ctrlSetFontH6B","ctrlSetFontHeight","ctrlSetFontHeightH1","ctrlSetFontHeightH2","ctrlSetFontHeightH3","ctrlSetFontHeightH4","ctrlSetFontHeightH5","ctrlSetFontHeightH6","ctrlSetFontHeightSecondary","ctrlSetFontP","ctrlSetFontPB","ctrlSetFontSecondary","ctrlSetForegroundColor","ctrlSetModel","ctrlSetModelDirAndUp","ctrlSetModelScale","ctrlSetMousePosition","ctrlSetPixelPrecision","ctrlSetPosition","ctrlSetPositionH","ctrlSetPositionW","ctrlSetPositionX","ctrlSetPositionY","ctrlSetScale","ctrlSetScrollValues","ctrlSetStructuredText","ctrlSetText","ctrlSetTextColor","ctrlSetTextColorSecondary","ctrlSetTextSecondary","ctrlSetTextSelection","ctrlSetTooltip","ctrlSetTooltipColorBox","ctrlSetTooltipColorShade","ctrlSetTooltipColorText","ctrlSetURL","ctrlShow","ctrlShown","ctrlStyle","ctrlText","ctrlTextColor","ctrlTextHeight","ctrlTextSecondary","ctrlTextSelection","ctrlTextWidth","ctrlTooltip","ctrlType","ctrlURL","ctrlVisible","ctRowControls","ctRowCount","ctSetCurSel","ctSetData","ctSetHeaderTemplate","ctSetRowTemplate","ctSetValue","ctValue","curatorAddons","curatorCamera","curatorCameraArea","curatorCameraAreaCeiling","curatorCoef","curatorEditableObjects","curatorEditingArea","curatorEditingAreaType","curatorMouseOver","curatorPoints","curatorRegisteredObjects","curatorSelected","curatorWaypointCost","current3DENOperation","currentChannel","currentCommand","currentMagazine","currentMagazineDetail","currentMagazineDetailTurret","currentMagazineTurret","currentMuzzle","currentNamespace","currentPilot","currentTask","currentTasks","currentThrowable","currentVisionMode","currentWaypoint","currentWeapon","currentWeaponMode","currentWeaponTurret","currentZeroing","cursorObject","cursorTarget","customChat","customRadio","customWaypointPosition","cutFadeOut","cutObj","cutRsc","cutText","damage","date","dateToNumber","daytime","deActivateKey","debriefingText","debugFSM","debugLog","decayGraphValues","deg","delete3DENEntities","deleteAt","deleteCenter","deleteCollection","deleteEditorObject","deleteGroup","deleteGroupWhenEmpty","deleteIdentity","deleteLocation","deleteMarker","deleteMarkerLocal","deleteRange","deleteResources","deleteSite","deleteStatus","deleteTarget","deleteTeam","deleteVehicle","deleteVehicleCrew","deleteWaypoint","detach","detectedMines","diag_activeMissionFSMs","diag_activeScripts","diag_activeSQSScripts","diag_captureFrameToFile","diag_captureSlowFrame","diag_deltaTime","diag_drawMode","diag_enable","diag_enabled","diag_fps","diag_fpsMin","diag_frameNo","diag_list","diag_mergeConfigFile","diag_scope","diag_activeSQFScripts","diag_allMissionEventHandlers","diag_captureFrame","diag_codePerformance","diag_dumpCalltraceToLog","diag_dumpTerrainSynth","diag_dynamicSimulationEnd","diag_exportConfig","diag_exportTerrainSVG","diag_lightNewLoad","diag_localized","diag_log","diag_logSlowFrame","diag_recordTurretLimits","diag_resetShapes","diag_setLightNew","diag_tickTime","diag_toggle","dialog","diaryRecordNull","diarySubjectExists","didJIP","didJIPOwner","difficulty","difficultyEnabled","difficultyEnabledRTD","difficultyOption","direction","directSay","disableAI","disableCollisionWith","disableConversation","disableDebriefingStats","disableMapIndicators","disableNVGEquipment","disableRemoteSensors","disableSerialization","disableTIEquipment","disableUAVConnectability","disableUserInput","displayAddEventHandler","displayCtrl","displayParent","displayRemoveAllEventHandlers","displayRemoveEventHandler","displaySetEventHandler","dissolveTeam","distance","distance2D","distanceSqr","distributionRegion","do3DENAction","doArtilleryFire","doFire","doFollow","doFSM","doGetOut","doMove","doorPhase","doStop","doSuppressiveFire","doTarget","doWatch","drawArrow","drawEllipse","drawIcon","drawIcon3D","drawLine","drawLine3D","drawLink","drawLocation","drawPolygon","drawRectangle","drawTriangle","driver","drop","dynamicSimulationDistance","dynamicSimulationDistanceCoef","dynamicSimulationEnabled","dynamicSimulationSystemEnabled","echo","edit3DENMissionAttributes","editObject","editorSetEventHandler","effectiveCommander","elevatePeriscope","emptyPositions","enableAI","enableAIFeature","enableAimPrecision","enableAttack","enableAudioFeature","enableAutoStartUpRTD","enableAutoTrimRTD","enableCamShake","enableCaustics","enableChannel","enableCollisionWith","enableCopilot","enableDebriefingStats","enableDiagLegend","enableDynamicSimulation","enableDynamicSimulationSystem","enableEndDialog","enableEngineArtillery","enableEnvironment","enableFatigue","enableGunLights","enableInfoPanelComponent","enableIRLasers","enableMimics","enablePersonTurret","enableRadio","enableReload","enableRopeAttach","enableSatNormalOnDetail","enableSaving","enableSentences","enableSimulation","enableSimulationGlobal","enableStamina","enableStressDamage","enableTeamSwitch","enableTraffic","enableUAVConnectability","enableUAVWaypoints","enableVehicleCargo","enableVehicleSensor","enableWeaponDisassembly","endLoadingScreen","endMission","enemy","engineOn","enginesIsOnRTD","enginesPowerRTD","enginesRpmRTD","enginesTorqueRTD","entities","environmentEnabled","environmentVolume","estimatedEndServerTime","estimatedTimeLeft","evalObjectArgument","everyBackpack","everyContainer","exec","execEditorScript","execFSM","execVM","exp","expectedDestination","exportJIPMessages","exportLandscapeXYZ","eyeDirection","eyePos","face","faction","fadeEnvironment","fadeMusic","fadeRadio","fadeSound","fadeSpeech","failMission","fileExists","fillWeaponsFromPool","find","findCover","findDisplay","findEditorObject","findEmptyPosition","findEmptyPositionReady","findIf","findNearestEnemy","finishMissionInit","finite","fire","fireAtTarget","firstBackpack","flag","flagAnimationPhase","flagOwner","flagSide","flagTexture","flatten","fleeing","floor","flyInHeight","flyInHeightASL","focusedCtrl","fog","fogForecast","fogParams","forceAddUniform","forceAtPositionRTD","forceCadetDifficulty","forcedMap","forceEnd","forceFlagTexture","forceFollowRoad","forceGeneratorRTD","forceMap","forceRespawn","forceSpeed","forceUnicode","forceWalk","forceWeaponFire","forceWeatherChange","forEachMember","forEachMemberAgent","forEachMemberTeam","forgetTarget","format","formation","formationDirection","formationLeader","formationMembers","formationPosition","formationTask","formatText","formLeader","freeLook","friendly","fromEditor","fuel","fullCrew","gearIDCAmmoCount","gearSlotAmmoCount","gearSlotData","get","get3DENActionState","get3DENAttribute","get3DENCamera","get3DENConnections","get3DENEntity","get3DENEntityID","get3DENGrid","get3DENIconsVisible","get3DENLayerEntities","get3DENLinesVisible","get3DENMissionAttribute","get3DENMouseOver","get3DENSelected","getAimingCoef","getAllEnvSoundControllers","getAllHitPointsDamage","getAllOwnedMines","getAllPylonsInfo","getAllSoundControllers","getAllUnitTraits","getAmmoCargo","getAnimAimPrecision","getAnimSpeedCoef","getArray","getArtilleryAmmo","getArtilleryComputerSettings","getArtilleryETA","getAssetDLCInfo","getAssignedCuratorLogic","getAssignedCuratorUnit","getAttackTarget","getAudioOptionVolumes","getBackpackCargo","getBleedingRemaining","getBurningValue","getCalculatePlayerVisibilityByFriendly","getCameraViewDirection","getCargoIndex","getCenterOfMass","getClientState","getClientStateNumber","getCompatiblePylonMagazines","getConnectedUAV","getContainerMaxLoad","getCursorObjectParams","getCustomAimCoef","getCustomSoundController","getCustomSoundControllerCount","getDammage","getDescription","getDir","getDirVisual","getDiverState","getDLCAssetsUsage","getDLCAssetsUsageByName","getDLCs","getDLCUsageTime","getEditorCamera","getEditorMode","getEditorObjectScope","getElevationOffset","getEnvSoundController","getFatigue","getFieldManualStartPage","getForcedFlagTexture","getFriend","getFSMVariable","getFuelCargo","getGraphValues","getGroupIcon","getGroupIconParams","getGroupIcons","getHideFrom","getHit","getHitIndex","getHitPointDamage","getItemCargo","getLighting","getLightingAt","getLoadedModsInfo","getMagazineCargo","getMarkerColor","getMarkerPos","getMarkerSize","getMarkerType","getMass","getMissionConfig","getMissionConfigValue","getMissionDLCs","getMissionLayerEntities","getMissionLayers","getMissionPath","getModelInfo","getMousePosition","getMusicPlayedTime","getNumber","getObjectArgument","getObjectChildren","getObjectDLC","getObjectFOV","getObjectMaterials","getObjectProxy","getObjectScale","getObjectTextures","getObjectType","getObjectViewDistance","getOrDefault","getOxygenRemaining","getPersonUsedDLCs","getPilotCameraDirection","getPilotCameraPosition","getPilotCameraRotation","getPilotCameraTarget","getPlateNumber","getPlayerChannel","getPlayerID","getPlayerScores","getPlayerUID","getPlayerUIDOld","getPlayerVoNVolume","getPos","getPosASL","getPosASLVisual","getPosASLW","getPosATL","getPosATLVisual","getPosVisual","getPosWorld","getPosWorldVisual","getPylonMagazines","getRelDir","getRelPos","getRemoteSensorsDisabled","getRepairCargo","getResolution","getRoadInfo","getRotorBrakeRTD","getShadowDistance","getShotParents","getSlingLoad","getSoundController","getSoundControllerResult","getSpeed","getStamina","getStatValue","getSteamFriendsServers","getSubtitleOptions","getSuppression","getTerrainGrid","getTerrainHeightASL","getText","getTextRaw","getTextWidth","getTotalDLCUsageTime","getTrimOffsetRTD","getUnitLoadout","getUnitTrait","getUserMFDText","getUserMFDValue","getVariable","getVehicleCargo","getVehicleTIPars","getWeaponCargo","getWeaponSway","getWingsOrientationRTD","getWingsPositionRTD","getWorld","getWPPos","glanceAt","globalChat","globalRadio","goggles","goto","group","groupChat","groupFromNetId","groupIconSelectable","groupIconsVisible","groupId","groupOwner","groupRadio","groupSelectedUnits","groupSelectUnit","gunner","gusts","halt","handgunItems","handgunMagazine","handgunWeapon","handsHit","hasInterface","hasPilotCamera","hasWeapon","hcAllGroups","hcGroupParams","hcLeader","hcRemoveAllGroups","hcRemoveGroup","hcSelected","hcSelectGroup","hcSetGroup","hcShowBar","hcShownBar","headgear","hideBehindScripted","hideBody","hideObject","hideObjectGlobal","hideSelection","hierarchyObjectsCount","hint","hintC","hintCadet","hintSilent","hmd","hostMission","htmlLoad","HUDMovementLevels","humidity","image","importAllGroups","importance","in","inArea","inAreaArray","incapacitatedState","inflame","inflamed","infoPanel","infoPanelComponentEnabled","infoPanelComponents","infoPanels","inGameUISetEventHandler","inheritsFrom","initAmbientLife","inPolygon","inputAction","inRangeOfArtillery","insert","insertEditorObject","intersect","is3DEN","is3DENMultiplayer","is3DENPreview","isAbleToBreathe","isActionMenuVisible","isAgent","isAimPrecisionEnabled","isArray","isAutoHoverOn","isAutonomous","isAutoStartUpEnabledRTD","isAutotest","isAutoTrimOnRTD","isBleeding","isBurning","isClass","isCollisionLightOn","isCopilotEnabled","isDamageAllowed","isDedicated","isDLCAvailable","isEngineOn","isEqualTo","isEqualType","isEqualTypeAll","isEqualTypeAny","isEqualTypeArray","isEqualTypeParams","isFilePatchingEnabled","isFinal","isFlashlightOn","isFlatEmpty","isForcedWalk","isFormationLeader","isGameFocused","isGamePaused","isGroupDeletedWhenEmpty","isHidden","isHideBehindScripted","isInRemainsCollector","isInstructorFigureEnabled","isIRLaserOn","isKeyActive","isKindOf","isLaserOn","isLightOn","isLocalized","isManualFire","isMarkedForCollection","isMultiplayer","isMultiplayerSolo","isNil","isNotEqualTo","isNull","isNumber","isObjectHidden","isObjectRTD","isOnRoad","isPiPEnabled","isPlayer","isRealTime","isRemoteExecuted","isRemoteExecutedJIP","isSensorTargetConfirmed","isServer","isShowing3DIcons","isSimpleObject","isSprintAllowed","isStaminaEnabled","isSteamMission","isStreamFriendlyUIEnabled","isStressDamageEnabled","isText","isTouchingGround","isTurnedOut","isTutHintsEnabled","isUAVConnectable","isUAVConnected","isUIContext","isUniformAllowed","isVehicleCargo","isVehicleRadarOn","isVehicleSensorEnabled","isWalking","isWeaponDeployed","isWeaponRested","itemCargo","items","itemsWithMagazines","join","joinAs","joinAsSilent","joinSilent","joinString","kbAddDatabase","kbAddDatabaseTargets","kbAddTopic","kbHasTopic","kbReact","kbRemoveTopic","kbTell","kbWasSaid","keyImage","keyName","keys","knowsAbout","land","landAt","landResult","language","laserTarget","lbAdd","lbClear","lbColor","lbColorRight","lbCurSel","lbData","lbDelete","lbIsSelected","lbPicture","lbPictureRight","lbSelection","lbSetColor","lbSetColorRight","lbSetCurSel","lbSetData","lbSetPicture","lbSetPictureColor","lbSetPictureColorDisabled","lbSetPictureColorSelected","lbSetPictureRight","lbSetPictureRightColor","lbSetPictureRightColorDisabled","lbSetPictureRightColorSelected","lbSetSelectColor","lbSetSelectColorRight","lbSetSelected","lbSetText","lbSetTextRight","lbSetTooltip","lbSetValue","lbSize","lbSort","lbSortByValue","lbText","lbTextRight","lbValue","leader","leaderboardDeInit","leaderboardGetRows","leaderboardInit","leaderboardRequestRowsFriends","leaderboardRequestRowsGlobal","leaderboardRequestRowsGlobalAroundUser","leaderboardsRequestUploadScore","leaderboardsRequestUploadScoreKeepBest","leaderboardState","leaveVehicle","libraryCredits","libraryDisclaimers","lifeState","lightAttachObject","lightDetachObject","lightIsOn","lightnings","limitSpeed","linearConversion","lineIntersects","lineIntersectsObjs","lineIntersectsSurfaces","lineIntersectsWith","linkItem","list","listObjects","listRemoteTargets","listVehicleSensors","ln","lnbAddArray","lnbAddColumn","lnbAddRow","lnbClear","lnbColor","lnbColorRight","lnbCurSelRow","lnbData","lnbDeleteColumn","lnbDeleteRow","lnbGetColumnsPosition","lnbPicture","lnbPictureRight","lnbSetColor","lnbSetColorRight","lnbSetColumnsPos","lnbSetCurSelRow","lnbSetData","lnbSetPicture","lnbSetPictureColor","lnbSetPictureColorRight","lnbSetPictureColorSelected","lnbSetPictureColorSelectedRight","lnbSetPictureRight","lnbSetText","lnbSetTextRight","lnbSetTooltip","lnbSetValue","lnbSize","lnbSort","lnbSortByValue","lnbText","lnbTextRight","lnbValue","load","loadAbs","loadBackpack","loadFile","loadGame","loadIdentity","loadMagazine","loadOverlay","loadStatus","loadUniform","loadVest","local","localize","localNamespace","locationPosition","lock","lockCameraTo","lockCargo","lockDriver","locked","lockedCargo","lockedDriver","lockedInventory","lockedTurret","lockIdentity","lockInventory","lockTurret","lockWP","log","logEntities","logNetwork","logNetworkTerminate","lookAt","lookAtPos","magazineCargo","magazines","magazinesAllTurrets","magazinesAmmo","magazinesAmmoCargo","magazinesAmmoFull","magazinesDetail","magazinesDetailBackpack","magazinesDetailUniform","magazinesDetailVest","magazinesTurret","magazineTurretAmmo","mapAnimAdd","mapAnimClear","mapAnimCommit","mapAnimDone","mapCenterOnCamera","mapGridPosition","markAsFinishedOnSteam","markerAlpha","markerBrush","markerChannel","markerColor","markerDir","markerPolyline","markerPos","markerShadow","markerShape","markerSize","markerText","markerType","matrixMultiply","matrixTranspose","max","members","menuAction","menuAdd","menuChecked","menuClear","menuCollapse","menuData","menuDelete","menuEnable","menuEnabled","menuExpand","menuHover","menuPicture","menuSetAction","menuSetCheck","menuSetData","menuSetPicture","menuSetShortcut","menuSetText","menuSetURL","menuSetValue","menuShortcut","menuShortcutText","menuSize","menuSort","menuText","menuURL","menuValue","merge","min","mineActive","mineDetectedBy","missileTarget","missileTargetPos","missionConfigFile","missionDifficulty","missionName","missionNameSource","missionNamespace","missionStart","missionVersion","mod","modelToWorld","modelToWorldVisual","modelToWorldVisualWorld","modelToWorldWorld","modParams","moonIntensity","moonPhase","morale","move","move3DENCamera","moveInAny","moveInCargo","moveInCommander","moveInDriver","moveInGunner","moveInTurret","moveObjectToEnd","moveOut","moveTarget","moveTime","moveTo","moveToCompleted","moveToFailed","musicVolume","name","namedProperties","nameSound","nearEntities","nearestBuilding","nearestLocation","nearestLocations","nearestLocationWithDubbing","nearestObject","nearestObjects","nearestTerrainObjects","nearObjects","nearObjectsReady","nearRoads","nearSupplies","nearTargets","needReload","netId","netObjNull","newOverlay","nextMenuItemIndex","nextWeatherChange","nMenuItems","not","numberOfEnginesRTD","numberToDate","object","objectCurators","objectFromNetId","objectParent","objStatus","onBriefingGear","onBriefingGroup","onBriefingNotes","onBriefingPlan","onBriefingTeamSwitch","onCommandModeChanged","onDoubleClick","onEachFrame","onGroupIconClick","onGroupIconOverEnter","onGroupIconOverLeave","onHCGroupSelectionChanged","onMapSingleClick","onPlayerConnected","onPlayerDisconnected","onPreloadFinished","onPreloadStarted","onShowNewObject","onTeamSwitch","openCuratorInterface","openDLCPage","openDSInterface","openGPS","openMap","openSteamApp","openYoutubeVideo","or","orderGetIn","overcast","overcastForecast","owner","param","params","parseNumber","parseSimpleArray","parseText","parsingNamespace","particlesQuality","periscopeElevation","pickWeaponPool","pitch","pixelGrid","pixelGridBase","pixelGridNoUIScale","pixelH","pixelW","playableSlotsNumber","playableUnits","playAction","playActionNow","player","playerRespawnTime","playerSide","playersNumber","playGesture","playMission","playMove","playMoveNow","playMusic","playScriptedMission","playSound","playSound3D","position","positionCameraToWorld","posScreenToWorld","posWorldToScreen","ppEffectAdjust","ppEffectCommit","ppEffectCommitted","ppEffectCreate","ppEffectDestroy","ppEffectEnable","ppEffectEnabled","ppEffectForceInNVG","precision","preloadCamera","preloadObject","preloadSound","preloadTitleObj","preloadTitleRsc","preprocessFile","preprocessFileLineNumbers","primaryWeapon","primaryWeaponItems","primaryWeaponMagazine","priority","processDiaryLink","processInitCommands","productVersion","profileName","profileNamespace","profileNameSteam","progressLoadingScreen","progressPosition","progressSetPosition","publicVariable","publicVariableClient","publicVariableServer","pushBack","pushBackUnique","putWeaponPool","queryItemsPool","queryMagazinePool","queryWeaponPool","rad","radioChannelAdd","radioChannelCreate","radioChannelInfo","radioChannelRemove","radioChannelSetCallSign","radioChannelSetLabel","radioVolume","rain","rainbow","random","rank","rankId","rating","rectangular","registeredTasks","registerTask","reload","reloadEnabled","remoteControl","remoteExec","remoteExecCall","remoteExecutedOwner","remove3DENConnection","remove3DENEventHandler","remove3DENLayer","removeAction","removeAll3DENEventHandlers","removeAllActions","removeAllAssignedItems","removeAllBinocularItems","removeAllContainers","removeAllCuratorAddons","removeAllCuratorCameraAreas","removeAllCuratorEditingAreas","removeAllEventHandlers","removeAllHandgunItems","removeAllItems","removeAllItemsWithMagazines","removeAllMissionEventHandlers","removeAllMPEventHandlers","removeAllMusicEventHandlers","removeAllOwnedMines","removeAllPrimaryWeaponItems","removeAllSecondaryWeaponItems","removeAllWeapons","removeBackpack","removeBackpackGlobal","removeBinocularItem","removeClothing","removeCuratorAddons","removeCuratorCameraArea","removeCuratorEditableObjects","removeCuratorEditingArea","removeDiaryRecord","removeDiarySubject","removeDrawIcon","removeDrawLinks","removeEventHandler","removeFromRemainsCollector","removeGoggles","removeGroupIcon","removeHandgunItem","removeHeadgear","removeItem","removeItemFromBackpack","removeItemFromUniform","removeItemFromVest","removeItems","removeMagazine","removeMagazineGlobal","removeMagazines","removeMagazinesTurret","removeMagazineTurret","removeMenuItem","removeMissionEventHandler","removeMPEventHandler","removeMusicEventHandler","removeOwnedMine","removePrimaryWeaponItem","removeSecondaryWeaponItem","removeSimpleTask","removeSwitchableUnit","removeTeamMember","removeUniform","removeVest","removeWeapon","removeWeaponAttachmentCargo","removeWeaponCargo","removeWeaponGlobal","removeWeaponTurret","reportRemoteTarget","requiredVersion","resetCamShake","resetSubgroupDirection","resize","resources","respawnVehicle","restartEditorCamera","reveal","revealMine","reverse","reversedMouseY","roadAt","roadsConnectedTo","roleDescription","ropeAttachedObjects","ropeAttachedTo","ropeAttachEnabled","ropeAttachTo","ropeCreate","ropeCut","ropeDestroy","ropeDetach","ropeEndPosition","ropeLength","ropes","ropeSegments","ropeSetCargoMass","ropeUnwind","ropeUnwound","rotorsForcesRTD","rotorsRpmRTD","round","runInitScript","safeZoneH","safeZoneW","safeZoneWAbs","safeZoneX","safeZoneXAbs","safeZoneY","save3DENInventory","saveGame","saveIdentity","saveJoysticks","saveOverlay","saveProfileNamespace","saveStatus","saveVar","savingEnabled","say","say2D","say3D","scopeName","score","scoreSide","screenshot","screenToWorld","scriptDone","scriptName","scudState","secondaryWeapon","secondaryWeaponItems","secondaryWeaponMagazine","select","selectBestPlaces","selectDiarySubject","selectedEditorObjects","selectEditorObject","selectionNames","selectionPosition","selectLeader","selectMax","selectMin","selectNoPlayer","selectPlayer","selectRandom","selectRandomWeighted","selectWeapon","selectWeaponTurret","sendAUMessage","sendSimpleCommand","sendTask","sendTaskResult","sendUDPMessage","serverCommand","serverCommandAvailable","serverCommandExecutable","serverName","serverTime","set","set3DENAttribute","set3DENAttributes","set3DENGrid","set3DENIconsVisible","set3DENLayer","set3DENLinesVisible","set3DENLogicType","set3DENMissionAttribute","set3DENMissionAttributes","set3DENModelsVisible","set3DENObjectType","set3DENSelected","setAccTime","setActualCollectiveRTD","setAirplaneThrottle","setAirportSide","setAmmo","setAmmoCargo","setAmmoOnPylon","setAnimSpeedCoef","setAperture","setApertureNew","setAPURTD","setArmoryPoints","setAttributes","setAutonomous","setBatteryChargeRTD","setBatteryRTD","setBehaviour","setBehaviourStrong","setBleedingRemaining","setBrakesRTD","setCameraEffect","setCameraInterest","setCamShakeDefParams","setCamShakeParams","setCamUseTI","setCaptive","setCenterOfMass","setCollisionLight","setCombatBehaviour","setCombatMode","setCompassOscillation","setConvoySeparation","setCuratorCameraAreaCeiling","setCuratorCoef","setCuratorEditingAreaType","setCuratorWaypointCost","setCurrentChannel","setCurrentTask","setCurrentWaypoint","setCustomAimCoef","setCustomMissionData","setCustomSoundController","setCustomWeightRTD","setDamage","setDammage","setDate","setDebriefingText","setDefaultCamera","setDestination","setDetailMapBlendPars","setDiaryRecordText","setDiarySubjectPicture","setDir","setDirection","setDrawIcon","setDriveOnPath","setDropInterval","setDynamicSimulationDistance","setDynamicSimulationDistanceCoef","setEditorMode","setEditorObjectScope","setEffectCondition","setEffectiveCommander","setEngineRPMRTD","setEngineRpmRTD","setFace","setFaceAnimation","setFatigue","setFeatureType","setFlagAnimationPhase","setFlagOwner","setFlagSide","setFlagTexture","setFog","setForceGeneratorRTD","setFormation","setFormationTask","setFormDir","setFriend","setFromEditor","setFSMVariable","setFuel","setFuelCargo","setGroupIcon","setGroupIconParams","setGroupIconsSelectable","setGroupIconsVisible","setGroupId","setGroupIdGlobal","setGroupOwner","setGusts","setHideBehind","setHit","setHitIndex","setHitPointDamage","setHorizonParallaxCoef","setHUDMovementLevels","setIdentity","setImportance","setInfoPanel","setLeader","setLightAmbient","setLightAttenuation","setLightBrightness","setLightColor","setLightDayLight","setLightFlareMaxDistance","setLightFlareSize","setLightIntensity","setLightnings","setLightUseFlare","setLocalWindParams","setMagazineTurretAmmo","setMarkerAlpha","setMarkerAlphaLocal","setMarkerBrush","setMarkerBrushLocal","setMarkerColor","setMarkerColorLocal","setMarkerDir","setMarkerDirLocal","setMarkerPolyline","setMarkerPolylineLocal","setMarkerPos","setMarkerPosLocal","setMarkerShadow","setMarkerShadowLocal","setMarkerShape","setMarkerShapeLocal","setMarkerSize","setMarkerSizeLocal","setMarkerText","setMarkerTextLocal","setMarkerType","setMarkerTypeLocal","setMass","setMimic","setMissileTarget","setMissileTargetPos","setMousePosition","setMusicEffect","setMusicEventHandler","setName","setNameSound","setObjectArguments","setObjectMaterial","setObjectMaterialGlobal","setObjectProxy","setObjectScale","setObjectTexture","setObjectTextureGlobal","setObjectViewDistance","setOvercast","setOwner","setOxygenRemaining","setParticleCircle","setParticleClass","setParticleFire","setParticleParams","setParticleRandom","setPilotCameraDirection","setPilotCameraRotation","setPilotCameraTarget","setPilotLight","setPiPEffect","setPitch","setPlateNumber","setPlayable","setPlayerRespawnTime","setPlayerVoNVolume","setPos","setPosASL","setPosASL2","setPosASLW","setPosATL","setPosition","setPosWorld","setPylonLoadout","setPylonsPriority","setRadioMsg","setRain","setRainbow","setRandomLip","setRank","setRectangular","setRepairCargo","setRotorBrakeRTD","setShadowDistance","setShotParents","setSide","setSimpleTaskAlwaysVisible","setSimpleTaskCustomData","setSimpleTaskDescription","setSimpleTaskDestination","setSimpleTaskTarget","setSimpleTaskType","setSimulWeatherLayers","setSize","setSkill","setSlingLoad","setSoundEffect","setSpeaker","setSpeech","setSpeedMode","setStamina","setStaminaScheme","setStarterRTD","setStatValue","setSuppression","setSystemOfUnits","setTargetAge","setTaskMarkerOffset","setTaskResult","setTaskState","setTerrainGrid","setText","setThrottleRTD","setTimeMultiplier","setTitleEffect","setToneMapping","setToneMappingParams","setTrafficDensity","setTrafficDistance","setTrafficGap","setTrafficSpeed","setTriggerActivation","setTriggerArea","setTriggerInterval","setTriggerStatements","setTriggerText","setTriggerTimeout","setTriggerType","setType","setUnconscious","setUnitAbility","setUnitCombatMode","setUnitLoadout","setUnitPos","setUnitPosWeak","setUnitRank","setUnitRecoilCoefficient","setUnitTrait","setUnloadInCombat","setUserActionText","setUserMFDText","setUserMFDValue","setVariable","setVectorDir","setVectorDirAndUp","setVectorUp","setVehicleAmmo","setVehicleAmmoDef","setVehicleArmor","setVehicleCargo","setVehicleId","setVehicleInit","setVehicleLock","setVehiclePosition","setVehicleRadar","setVehicleReceiveRemoteTargets","setVehicleReportOwnPosition","setVehicleReportRemoteTargets","setVehicleTIPars","setVehicleVarName","setVelocity","setVelocityModelSpace","setVelocityTransformation","setViewDistance","setVisibleIfTreeCollapsed","setWantedRPMRTD","setWaves","setWaypointBehaviour","setWaypointCombatMode","setWaypointCompletionRadius","setWaypointDescription","setWaypointForceBehaviour","setWaypointFormation","setWaypointHousePosition","setWaypointLoiterAltitude","setWaypointLoiterRadius","setWaypointLoiterType","setWaypointName","setWaypointPosition","setWaypointScript","setWaypointSpeed","setWaypointStatements","setWaypointTimeout","setWaypointType","setWaypointVisible","setWeaponReloadingTime","setWeaponZeroing","setWind","setWindDir","setWindForce","setWindStr","setWingForceScaleRTD","setWPPos","show3DIcons","showChat","showCinemaBorder","showCommandingMenu","showCompass","showCuratorCompass","showGPS","showHUD","showLegend","showMap","shownArtilleryComputer","shownChat","shownCompass","shownCuratorCompass","showNewEditorObject","shownGPS","shownHUD","shownMap","shownPad","shownRadio","shownScoretable","shownUAVFeed","shownWarrant","shownWatch","showPad","showRadio","showScoretable","showSubtitles","showUAVFeed","showWarrant","showWatch","showWaypoint","showWaypoints","side","sideChat","sideEmpty","sideEnemy","sideFriendly","sideRadio","simpleTasks","simulationEnabled","simulCloudDensity","simulCloudOcclusion","simulInClouds","simulSetHumidity","simulWeatherSync","sin","size","sizeOf","skill","skillFinal","skipTime","sleep","sliderPosition","sliderRange","sliderSetPosition","sliderSetRange","sliderSetSpeed","sliderSpeed","slingLoadAssistantShown","soldierMagazines","someAmmo","sort","soundVolume","spawn","speaker","speechVolume","speed","speedMode","splitString","sqrt","squadParams","stance","startLoadingScreen","step","stop","stopEngineRTD","stopped","str","sunOrMoon","supportInfo","suppressFor","surfaceIsWater","surfaceNormal","surfaceTexture","surfaceType","swimInDepth","switchableUnits","switchAction","switchCamera","switchGesture","switchLight","switchMove","synchronizedObjects","synchronizedTriggers","synchronizedWaypoints","synchronizeObjectsAdd","synchronizeObjectsRemove","synchronizeTrigger","synchronizeWaypoint","systemChat","systemOfUnits","systemTime","systemTimeUTC","tan","targetKnowledge","targets","targetsAggregate","targetsQuery","taskAlwaysVisible","taskChildren","taskCompleted","taskCustomData","taskDescription","taskDestination","taskHint","taskMarkerOffset","taskName","taskParent","taskResult","taskState","taskType","teamMember","teamName","teams","teamSwitch","teamSwitchEnabled","teamType","terminate","terrainIntersect","terrainIntersectASL","terrainIntersectAtASL","text","textLog","textLogFormat","tg","throttleRTD","time","timeMultiplier","titleCut","titleFadeOut","titleObj","titleRsc","titleText","toArray","toFixed","toLower","toLowerANSI","toString","toUpper","toUpperANSI","triggerActivated","triggerActivation","triggerAmmo","triggerArea","triggerAttachedVehicle","triggerAttachObject","triggerAttachVehicle","triggerDynamicSimulation","triggerInterval","triggerStatements","triggerText","triggerTimeout","triggerTimeoutCurrent","triggerType","trim","turretLocal","turretOwner","turretUnit","tvAdd","tvClear","tvCollapse","tvCollapseAll","tvCount","tvCurSel","tvData","tvDelete","tvExpand","tvExpandAll","tvIsSelected","tvPicture","tvPictureRight","tvSelection","tvSetColor","tvSetCurSel","tvSetData","tvSetPicture","tvSetPictureColor","tvSetPictureColorDisabled","tvSetPictureColorSelected","tvSetPictureRight","tvSetPictureRightColor","tvSetPictureRightColorDisabled","tvSetPictureRightColorSelected","tvSetSelectColor","tvSetSelected","tvSetText","tvSetTooltip","tvSetValue","tvSort","tvSortAll","tvSortByValue","tvSortByValueAll","tvText","tvTooltip","tvValue","type","typeName","typeOf","UAVControl","uiNamespace","uiSleep","unassignCurator","unassignItem","unassignTeam","unassignVehicle","underwater","uniform","uniformContainer","uniformItems","uniformMagazines","unitAddons","unitAimPosition","unitAimPositionVisual","unitBackpack","unitCombatMode","unitIsUAV","unitPos","unitReady","unitRecoilCoefficient","units","unitsBelowHeight","unitTurret","unlinkItem","unlockAchievement","unregisterTask","updateDrawIcon","updateMenuItem","updateObjectTree","useAIOperMapObstructionTest","useAISteeringComponent","useAudioTimeForMoves","userInputDisabled","vectorAdd","vectorCos","vectorCrossProduct","vectorDiff","vectorDir","vectorDirVisual","vectorDistance","vectorDistanceSqr","vectorDotProduct","vectorFromTo","vectorLinearConversion","vectorMagnitude","vectorMagnitudeSqr","vectorModelToWorld","vectorModelToWorldVisual","vectorMultiply","vectorNormalized","vectorUp","vectorUpVisual","vectorWorldToModel","vectorWorldToModelVisual","vehicle","vehicleCargoEnabled","vehicleChat","vehicleMoveInfo","vehicleRadio","vehicleReceiveRemoteTargets","vehicleReportOwnPosition","vehicleReportRemoteTargets","vehicles","vehicleVarName","velocity","velocityModelSpace","verifySignature","vest","vestContainer","vestItems","vestMagazines","viewDistance","visibleCompass","visibleGPS","visibleMap","visiblePosition","visiblePositionASL","visibleScoretable","visibleWatch","waves","waypointAttachedObject","waypointAttachedVehicle","waypointAttachObject","waypointAttachVehicle","waypointBehaviour","waypointCombatMode","waypointCompletionRadius","waypointDescription","waypointForceBehaviour","waypointFormation","waypointHousePosition","waypointLoiterAltitude","waypointLoiterRadius","waypointLoiterType","waypointName","waypointPosition","waypoints","waypointScript","waypointsEnabledUAV","waypointShow","waypointSpeed","waypointStatements","waypointTimeout","waypointTimeoutCurrent","waypointType","waypointVisible","weaponAccessories","weaponAccessoriesCargo","weaponCargo","weaponDirection","weaponInertia","weaponLowered","weapons","weaponsItems","weaponsItemsCargo","weaponState","weaponsTurret","weightRTD","WFSideText","wind","windDir","windRTD","windStr","wingsForcesRTD","worldName","worldSize","worldToModel","worldToModelVisual","worldToScreen"],literal:["blufor","civilian","configNull","controlNull","displayNull","east","endl","false","grpNull","independent","lineBreak","locationNull","nil","objNull","opfor","pi","resistance","scriptNull","sideAmbientLife","sideEmpty","sideLogic","sideUnknown","taskNull","teamMemberNull","true","west"]},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.NUMBER_MODE,{className:"variable",begin:/\b_+[a-zA-Z]\w*/},{className:"title",begin:/[a-zA-Z]\w+_fnc_\w+/},t,n],illegal:/#|^\$ /}}},function(e,t){e.exports=function(e){const t=e.regex,n=e.COMMENT("--","$"),r=["true","false","unknown"],i=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],o=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],a=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],s=o,l=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year","add","asc","collation","desc","final","first","last","view"].filter((e=>!o.includes(e))),c={begin:t.concat(/\b/,t.either(...s),/\s*\(/),relevance:0,keywords:{built_in:s}};return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:function(e,{exceptions:t,when:n}={}){const r=n;return t=t||[],e.map((e=>e.match(/\|\d+$/)||t.includes(e)?e:r(e)?`${e}|0`:e))}(l,{when:e=>e.length<3}),literal:r,type:i,built_in:["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"]},contains:[{begin:t.either(...a),relevance:0,keywords:{$pattern:/[\w\.]+/,keyword:l.concat(a),literal:r,type:i}},{className:"type",begin:t.either("double precision","large object","with timezone","without timezone")},c,{className:"variable",begin:/@[a-z0-9]+/},{className:"string",variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},{begin:/"/,end:/"/,contains:[{begin:/""/}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,{className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}}},function(e,t){e.exports=function(e){const t=e.regex,n=["bernoulli","bernoulli_logit","bernoulli_logit_glm","beta","beta_binomial","beta_proportion","binomial","binomial_logit","categorical","categorical_logit","categorical_logit_glm","cauchy","chi_square","dirichlet","discrete_range","double_exponential","exp_mod_normal","exponential","frechet","gamma","gaussian_dlm_obs","gumbel","hmm_latent","hypergeometric","inv_chi_square","inv_gamma","inv_wishart","lkj_corr","lkj_corr_cholesky","logistic","lognormal","multi_gp","multi_gp_cholesky","multi_normal","multi_normal_cholesky","multi_normal_prec","multi_student_t","multinomial","multinomial_logit","neg_binomial","neg_binomial_2","neg_binomial_2_log","neg_binomial_2_log_glm","normal","normal_id_glm","ordered_logistic","ordered_logistic_glm","ordered_probit","pareto","pareto_type_2","poisson","poisson_log","poisson_log_glm","rayleigh","scaled_inv_chi_square","skew_double_exponential","skew_normal","std_normal","student_t","uniform","von_mises","weibull","wiener","wishart"],r=e.COMMENT(/\/\*/,/\*\//,{relevance:0,contains:[{scope:"doctag",match:/@(return|param)/}]}),i={scope:"meta",begin:/#include\b/,end:/$/,contains:[{match:/[a-z][a-z-._]+/,scope:"string"},e.C_LINE_COMMENT_MODE]},o=["lower","upper","offset","multiplier"];return{name:"Stan",aliases:["stanfuncs"],keywords:{$pattern:e.IDENT_RE,title:["functions","model","data","parameters","quantities","transformed","generated"],type:["array","complex","int","real","vector","ordered","positive_ordered","simplex","unit_vector","row_vector","matrix","cholesky_factor_corr|10","cholesky_factor_cov|10","corr_matrix|10","cov_matrix|10","void"],keyword:["for","in","if","else","while","break","continue","return"],built_in:["Phi","Phi_approx","abs","acos","acosh","add_diag","algebra_solver","algebra_solver_newton","append_array","append_col","append_row","asin","asinh","atan","atan2","atanh","bessel_first_kind","bessel_second_kind","binary_log_loss","binomial_coefficient_log","block","cbrt","ceil","chol2inv","cholesky_decompose","choose","col","cols","columns_dot_product","columns_dot_self","conj","cos","cosh","cov_exp_quad","crossprod","csr_extract_u","csr_extract_v","csr_extract_w","csr_matrix_times_vector","csr_to_dense_matrix","cumulative_sum","determinant","diag_matrix","diag_post_multiply","diag_pre_multiply","diagonal","digamma","dims","distance","dot_product","dot_self","eigenvalues_sym","eigenvectors_sym","erf","erfc","exp","exp2","expm1","fabs","falling_factorial","fdim","floor","fma","fmax","fmin","fmod","gamma_p","gamma_q","generalized_inverse","get_imag","get_lp","get_real","head","hmm_hidden_state_prob","hmm_marginal","hypot","identity_matrix","inc_beta","int_step","integrate_1d","integrate_ode","integrate_ode_adams","integrate_ode_bdf","integrate_ode_rk45","inv","inv_Phi","inv_cloglog","inv_logit","inv_sqrt","inv_square","inverse","inverse_spd","is_inf","is_nan","lambert_w0","lambert_wm1","lbeta","lchoose","ldexp","lgamma","linspaced_array","linspaced_int_array","linspaced_row_vector","linspaced_vector","lmgamma","lmultiply","log","log1m","log1m_exp","log1m_inv_logit","log1p","log1p_exp","log_determinant","log_diff_exp","log_falling_factorial","log_inv_logit","log_inv_logit_diff","log_mix","log_modified_bessel_first_kind","log_rising_factorial","log_softmax","log_sum_exp","logit","machine_precision","map_rect","matrix_exp","matrix_exp_multiply","matrix_power","max","mdivide_left_spd","mdivide_left_tri_low","mdivide_right_spd","mdivide_right_tri_low","mean","min","modified_bessel_first_kind","modified_bessel_second_kind","multiply_log","multiply_lower_tri_self_transpose","negative_infinity","norm","not_a_number","num_elements","ode_adams","ode_adams_tol","ode_adjoint_tol_ctl","ode_bdf","ode_bdf_tol","ode_ckrk","ode_ckrk_tol","ode_rk45","ode_rk45_tol","one_hot_array","one_hot_int_array","one_hot_row_vector","one_hot_vector","ones_array","ones_int_array","ones_row_vector","ones_vector","owens_t","polar","positive_infinity","pow","print","prod","proj","qr_Q","qr_R","qr_thin_Q","qr_thin_R","quad_form","quad_form_diag","quad_form_sym","quantile","rank","reduce_sum","reject","rep_array","rep_matrix","rep_row_vector","rep_vector","reverse","rising_factorial","round","row","rows","rows_dot_product","rows_dot_self","scale_matrix_exp_multiply","sd","segment","sin","singular_values","sinh","size","softmax","sort_asc","sort_desc","sort_indices_asc","sort_indices_desc","sqrt","square","squared_distance","step","sub_col","sub_row","sum","svd_U","svd_V","symmetrize_from_lower_tri","tail","tan","tanh","target","tcrossprod","tgamma","to_array_1d","to_array_2d","to_complex","to_matrix","to_row_vector","to_vector","trace","trace_gen_quad_form","trace_quad_form","trigamma","trunc","uniform_simplex","variance","zeros_array","zeros_int_array","zeros_row_vector"]},contains:[e.C_LINE_COMMENT_MODE,i,e.HASH_COMMENT_MODE,r,{scope:"built_in",match:/\s(pi|e|sqrt2|log2|log10)(?=\()/,relevance:0},{match:t.concat(/[<,]\s*/,t.either(...o),/\s*=/),keywords:o},{scope:"keyword",match:/\btarget(?=\s*\+=)/},{match:[/~\s*/,t.either(...n),/(?:\(\))/,/\s*T(?=\s*\[)/],scope:{2:"built_in",4:"keyword"}},{scope:"built_in",keywords:n,begin:t.concat(/\w*/,t.either(...n),/(_lpdf|_lupdf|_lpmf|_cdf|_lcdf|_lccdf|_qf)(?=\s*[\(.*\)])/)},{begin:[/~/,/\s*/,t.concat(t.either(...n),/(?=\s*[\(.*\)])/)],scope:{3:"built_in"}},{begin:[/~/,/\s*\w+(?=\s*[\(.*\)])/,"(?!.*/\b("+t.either(...n)+")\b)"],scope:{2:"title.function"}},{scope:"title.function",begin:/\w*(_lpdf|_lupdf|_lpmf|_cdf|_lcdf|_lccdf|_qf)(?=\s*[\(.*\)])/},{scope:"number",match:t.concat(/(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)/,/(?:[eE][+-]?\d+(?:_\d+)*)?i?(?!\w)/),relevance:0},{scope:"string",begin:/"/,end:/"/}]}}},function(e,t){e.exports=function(e){return{name:"Stata",aliases:["do","ado"],case_insensitive:!0,keywords:"if else in foreach for forv forva forval forvalu forvalue forvalues by bys bysort xi quietly qui capture about ac ac_7 acprplot acprplot_7 adjust ado adopath adoupdate alpha ameans an ano anov anova anova_estat anova_terms anovadef aorder ap app appe appen append arch arch_dr arch_estat arch_p archlm areg areg_p args arima arima_dr arima_estat arima_p as asmprobit asmprobit_estat asmprobit_lf asmprobit_mfx__dlg asmprobit_p ass asse asser assert avplot avplot_7 avplots avplots_7 bcskew0 bgodfrey bias binreg bip0_lf biplot bipp_lf bipr_lf bipr_p biprobit bitest bitesti bitowt blogit bmemsize boot bootsamp bootstrap bootstrap_8 boxco_l boxco_p boxcox boxcox_6 boxcox_p bprobit br break brier bro brow brows browse brr brrstat bs bs_7 bsampl_w bsample bsample_7 bsqreg bstat bstat_7 bstat_8 bstrap bstrap_7 bubble bubbleplot ca ca_estat ca_p cabiplot camat canon canon_8 canon_8_p canon_estat canon_p cap caprojection capt captu captur capture cat cc cchart cchart_7 cci cd censobs_table centile cf char chdir checkdlgfiles checkestimationsample checkhlpfiles checksum chelp ci cii cl class classutil clear cli clis clist clo clog clog_lf clog_p clogi clogi_sw clogit clogit_lf clogit_p clogitp clogl_sw cloglog clonevar clslistarray cluster cluster_measures cluster_stop cluster_tree cluster_tree_8 clustermat cmdlog cnr cnre cnreg cnreg_p cnreg_sw cnsreg codebook collaps4 collapse colormult_nb colormult_nw compare compress conf confi confir confirm conren cons const constr constra constrai constrain constraint continue contract copy copyright copysource cor corc corr corr2data corr_anti corr_kmo corr_smc corre correl correla correlat correlate corrgram cou coun count cox cox_p cox_sw coxbase coxhaz coxvar cprplot cprplot_7 crc cret cretu cretur creturn cross cs cscript cscript_log csi ct ct_is ctset ctst_5 ctst_st cttost cumsp cumsp_7 cumul cusum cusum_7 cutil d|0 datasig datasign datasigna datasignat datasignatu datasignatur datasignature datetof db dbeta de dec deco decod decode deff des desc descr descri describ describe destring dfbeta dfgls dfuller di di_g dir dirstats dis discard disp disp_res disp_s displ displa display distinct do doe doed doedi doedit dotplot dotplot_7 dprobit drawnorm drop ds ds_util dstdize duplicates durbina dwstat dydx e|0 ed edi edit egen eivreg emdef en enc enco encod encode eq erase ereg ereg_lf ereg_p ereg_sw ereghet ereghet_glf ereghet_glf_sh ereghet_gp ereghet_ilf ereghet_ilf_sh ereghet_ip eret eretu eretur ereturn err erro error esize est est_cfexist est_cfname est_clickable est_expand est_hold est_table est_unhold est_unholdok estat estat_default estat_summ estat_vce_only esti estimates etodow etof etomdy ex exi exit expand expandcl fac fact facto factor factor_estat factor_p factor_pca_rotated factor_rotate factormat fcast fcast_compute fcast_graph fdades fdadesc fdadescr fdadescri fdadescrib fdadescribe fdasav fdasave fdause fh_st file open file read file close file filefilter fillin find_hlp_file findfile findit findit_7 fit fl fli flis flist for5_0 forest forestplot form forma format fpredict frac_154 frac_adj frac_chk frac_cox frac_ddp frac_dis frac_dv frac_in frac_mun frac_pp frac_pq frac_pv frac_wgt frac_xo fracgen fracplot fracplot_7 fracpoly fracpred fron_ex fron_hn fron_p fron_tn fron_tn2 frontier ftodate ftoe ftomdy ftowdate funnel funnelplot g|0 gamhet_glf gamhet_gp gamhet_ilf gamhet_ip gamma gamma_d2 gamma_p gamma_sw gammahet gdi_hexagon gdi_spokes ge gen gene gener genera generat generate genrank genstd genvmean gettoken gl gladder gladder_7 glim_l01 glim_l02 glim_l03 glim_l04 glim_l05 glim_l06 glim_l07 glim_l08 glim_l09 glim_l10 glim_l11 glim_l12 glim_lf glim_mu glim_nw1 glim_nw2 glim_nw3 glim_p glim_v1 glim_v2 glim_v3 glim_v4 glim_v5 glim_v6 glim_v7 glm glm_6 glm_p glm_sw glmpred glo glob globa global glogit glogit_8 glogit_p gmeans gnbre_lf gnbreg gnbreg_5 gnbreg_p gomp_lf gompe_sw gomper_p gompertz gompertzhet gomphet_glf gomphet_glf_sh gomphet_gp gomphet_ilf gomphet_ilf_sh gomphet_ip gphdot gphpen gphprint gprefs gprobi_p gprobit gprobit_8 gr gr7 gr_copy gr_current gr_db gr_describe gr_dir gr_draw gr_draw_replay gr_drop gr_edit gr_editviewopts gr_example gr_example2 gr_export gr_print gr_qscheme gr_query gr_read gr_rename gr_replay gr_save gr_set gr_setscheme gr_table gr_undo gr_use graph graph7 grebar greigen greigen_7 greigen_8 grmeanby grmeanby_7 gs_fileinfo gs_filetype gs_graphinfo gs_stat gsort gwood h|0 hadimvo hareg hausman haver he heck_d2 heckma_p heckman heckp_lf heckpr_p heckprob hel help hereg hetpr_lf hetpr_p hetprob hettest hexdump hilite hist hist_7 histogram hlogit hlu hmeans hotel hotelling hprobit hreg hsearch icd9 icd9_ff icd9p iis impute imtest inbase include inf infi infil infile infix inp inpu input ins insheet insp inspe inspec inspect integ inten intreg intreg_7 intreg_p intrg2_ll intrg_ll intrg_ll2 ipolate iqreg ir irf irf_create irfm iri is_svy is_svysum isid istdize ivprob_1_lf ivprob_lf ivprobit ivprobit_p ivreg ivreg_footnote ivtob_1_lf ivtob_lf ivtobit ivtobit_p jackknife jacknife jknife jknife_6 jknife_8 jkstat joinby kalarma1 kap kap_3 kapmeier kappa kapwgt kdensity kdensity_7 keep ksm ksmirnov ktau kwallis l|0 la lab labbe labbeplot labe label labelbook ladder levels levelsof leverage lfit lfit_p li lincom line linktest lis list lloghet_glf lloghet_glf_sh lloghet_gp lloghet_ilf lloghet_ilf_sh lloghet_ip llogi_sw llogis_p llogist llogistic llogistichet lnorm_lf lnorm_sw lnorma_p lnormal lnormalhet lnormhet_glf lnormhet_glf_sh lnormhet_gp lnormhet_ilf lnormhet_ilf_sh lnormhet_ip lnskew0 loadingplot loc loca local log logi logis_lf logistic logistic_p logit logit_estat logit_p loglogs logrank loneway lookfor lookup lowess lowess_7 lpredict lrecomp lroc lroc_7 lrtest ls lsens lsens_7 lsens_x lstat ltable ltable_7 ltriang lv lvr2plot lvr2plot_7 m|0 ma mac macr macro makecns man manova manova_estat manova_p manovatest mantel mark markin markout marksample mat mat_capp mat_order mat_put_rr mat_rapp mata mata_clear mata_describe mata_drop mata_matdescribe mata_matsave mata_matuse mata_memory mata_mlib mata_mosave mata_rename mata_which matalabel matcproc matlist matname matr matri matrix matrix_input__dlg matstrik mcc mcci md0_ md1_ md1debug_ md2_ md2debug_ mds mds_estat mds_p mdsconfig mdslong mdsmat mdsshepard mdytoe mdytof me_derd mean means median memory memsize menl meqparse mer merg merge meta mfp mfx mhelp mhodds minbound mixed_ll mixed_ll_reparm mkassert mkdir mkmat mkspline ml ml_5 ml_adjs ml_bhhhs ml_c_d ml_check ml_clear ml_cnt ml_debug ml_defd ml_e0 ml_e0_bfgs ml_e0_cycle ml_e0_dfp ml_e0i ml_e1 ml_e1_bfgs ml_e1_bhhh ml_e1_cycle ml_e1_dfp ml_e2 ml_e2_cycle ml_ebfg0 ml_ebfr0 ml_ebfr1 ml_ebh0q ml_ebhh0 ml_ebhr0 ml_ebr0i ml_ecr0i ml_edfp0 ml_edfr0 ml_edfr1 ml_edr0i ml_eds ml_eer0i ml_egr0i ml_elf ml_elf_bfgs ml_elf_bhhh ml_elf_cycle ml_elf_dfp ml_elfi ml_elfs ml_enr0i ml_enrr0 ml_erdu0 ml_erdu0_bfgs ml_erdu0_bhhh ml_erdu0_bhhhq ml_erdu0_cycle ml_erdu0_dfp ml_erdu0_nrbfgs ml_exde ml_footnote ml_geqnr ml_grad0 ml_graph ml_hbhhh ml_hd0 ml_hold ml_init ml_inv ml_log ml_max ml_mlout ml_mlout_8 ml_model ml_nb0 ml_opt ml_p ml_plot ml_query ml_rdgrd ml_repor ml_s_e ml_score ml_searc ml_technique ml_unhold mleval mlf_ mlmatbysum mlmatsum mlog mlogi mlogit mlogit_footnote mlogit_p mlopts mlsum mlvecsum mnl0_ mor more mov move mprobit mprobit_lf mprobit_p mrdu0_ mrdu1_ mvdecode mvencode mvreg mvreg_estat n|0 nbreg nbreg_al nbreg_lf nbreg_p nbreg_sw nestreg net newey newey_7 newey_p news nl nl_7 nl_9 nl_9_p nl_p nl_p_7 nlcom nlcom_p nlexp2 nlexp2_7 nlexp2a nlexp2a_7 nlexp3 nlexp3_7 nlgom3 nlgom3_7 nlgom4 nlgom4_7 nlinit nllog3 nllog3_7 nllog4 nllog4_7 nlog_rd nlogit nlogit_p nlogitgen nlogittree nlpred no nobreak noi nois noisi noisil noisily note notes notes_dlg nptrend numlabel numlist odbc old_ver olo olog ologi ologi_sw ologit ologit_p ologitp on one onew onewa oneway op_colnm op_comp op_diff op_inv op_str opr opro oprob oprob_sw oprobi oprobi_p oprobit oprobitp opts_exclusive order orthog orthpoly ou out outf outfi outfil outfile outs outsh outshe outshee outsheet ovtest pac pac_7 palette parse parse_dissim pause pca pca_8 pca_display pca_estat pca_p pca_rotate pcamat pchart pchart_7 pchi pchi_7 pcorr pctile pentium pergram pergram_7 permute permute_8 personal peto_st pkcollapse pkcross pkequiv pkexamine pkexamine_7 pkshape pksumm pksumm_7 pl plo plot plugin pnorm pnorm_7 poisgof poiss_lf poiss_sw poisso_p poisson poisson_estat post postclose postfile postutil pperron pr prais prais_e prais_e2 prais_p predict predictnl preserve print pro prob probi probit probit_estat probit_p proc_time procoverlay procrustes procrustes_estat procrustes_p profiler prog progr progra program prop proportion prtest prtesti pwcorr pwd q\\s qby qbys qchi qchi_7 qladder qladder_7 qnorm qnorm_7 qqplot qqplot_7 qreg qreg_c qreg_p qreg_sw qu quadchk quantile quantile_7 que quer query range ranksum ratio rchart rchart_7 rcof recast reclink recode reg reg3 reg3_p regdw regr regre regre_p2 regres regres_p regress regress_estat regriv_p remap ren rena renam rename renpfix repeat replace report reshape restore ret retu retur return rm rmdir robvar roccomp roccomp_7 roccomp_8 rocf_lf rocfit rocfit_8 rocgold rocplot rocplot_7 roctab roctab_7 rolling rologit rologit_p rot rota rotat rotate rotatemat rreg rreg_p ru run runtest rvfplot rvfplot_7 rvpplot rvpplot_7 sa safesum sample sampsi sav save savedresults saveold sc sca scal scala scalar scatter scm_mine sco scob_lf scob_p scobi_sw scobit scor score scoreplot scoreplot_help scree screeplot screeplot_help sdtest sdtesti se search separate seperate serrbar serrbar_7 serset set set_defaults sfrancia sh she shel shell shewhart shewhart_7 signestimationsample signrank signtest simul simul_7 simulate simulate_8 sktest sleep slogit slogit_d2 slogit_p smooth snapspan so sor sort spearman spikeplot spikeplot_7 spikeplt spline_x split sqreg sqreg_p sret sretu sretur sreturn ssc st st_ct st_hc st_hcd st_hcd_sh st_is st_issys st_note st_promo st_set st_show st_smpl st_subid stack statsby statsby_8 stbase stci stci_7 stcox stcox_estat stcox_fr stcox_fr_ll stcox_p stcox_sw stcoxkm stcoxkm_7 stcstat stcurv stcurve stcurve_7 stdes stem stepwise stereg stfill stgen stir stjoin stmc stmh stphplot stphplot_7 stphtest stphtest_7 stptime strate strate_7 streg streg_sw streset sts sts_7 stset stsplit stsum sttocc sttoct stvary stweib su suest suest_8 sum summ summa summar summari summariz summarize sunflower sureg survcurv survsum svar svar_p svmat svy svy_disp svy_dreg svy_est svy_est_7 svy_estat svy_get svy_gnbreg_p svy_head svy_header svy_heckman_p svy_heckprob_p svy_intreg_p svy_ivreg_p svy_logistic_p svy_logit_p svy_mlogit_p svy_nbreg_p svy_ologit_p svy_oprobit_p svy_poisson_p svy_probit_p svy_regress_p svy_sub svy_sub_7 svy_x svy_x_7 svy_x_p svydes svydes_8 svygen svygnbreg svyheckman svyheckprob svyintreg svyintreg_7 svyintrg svyivreg svylc svylog_p svylogit svymarkout svymarkout_8 svymean svymlog svymlogit svynbreg svyolog svyologit svyoprob svyoprobit svyopts svypois svypois_7 svypoisson svyprobit svyprobt svyprop svyprop_7 svyratio svyreg svyreg_p svyregress svyset svyset_7 svyset_8 svytab svytab_7 svytest svytotal sw sw_8 swcnreg swcox swereg swilk swlogis swlogit swologit swoprbt swpois swprobit swqreg swtobit swweib symmetry symmi symplot symplot_7 syntax sysdescribe sysdir sysuse szroeter ta tab tab1 tab2 tab_or tabd tabdi tabdis tabdisp tabi table tabodds tabodds_7 tabstat tabu tabul tabula tabulat tabulate te tempfile tempname tempvar tes test testnl testparm teststd tetrachoric time_it timer tis tob tobi tobit tobit_p tobit_sw token tokeni tokeniz tokenize tostring total translate translator transmap treat_ll treatr_p treatreg trim trimfill trnb_cons trnb_mean trpoiss_d2 trunc_ll truncr_p truncreg tsappend tset tsfill tsline tsline_ex tsreport tsrevar tsrline tsset tssmooth tsunab ttest ttesti tut_chk tut_wait tutorial tw tware_st two twoway twoway__fpfit_serset twoway__function_gen twoway__histogram_gen twoway__ipoint_serset twoway__ipoints_serset twoway__kdensity_gen twoway__lfit_serset twoway__normgen_gen twoway__pci_serset twoway__qfit_serset twoway__scatteri_serset twoway__sunflower_gen twoway_ksm_serset ty typ type typeof u|0 unab unabbrev unabcmd update us use uselabel var var_mkcompanion var_p varbasic varfcast vargranger varirf varirf_add varirf_cgraph varirf_create varirf_ctable varirf_describe varirf_dir varirf_drop varirf_erase varirf_graph varirf_ograph varirf_rename varirf_set varirf_table varlist varlmar varnorm varsoc varstable varstable_w varstable_w2 varwle vce vec vec_fevd vec_mkphi vec_p vec_p_w vecirf_create veclmar veclmar_w vecnorm vecnorm_w vecrank vecstable verinst vers versi versio version view viewsource vif vwls wdatetof webdescribe webseek webuse weib1_lf weib2_lf weib_lf weib_lf0 weibhet_glf weibhet_glf_sh weibhet_glfa weibhet_glfa_sh weibhet_gp weibhet_ilf weibhet_ilf_sh weibhet_ilfa weibhet_ilfa_sh weibhet_ip weibu_sw weibul_p weibull weibull_c weibull_s weibullhet wh whelp whi which whil while wilc_st wilcoxon win wind windo window winexec wntestb wntestb_7 wntestq xchart xchart_7 xcorr xcorr_7 xi xi_6 xmlsav xmlsave xmluse xpose xsh xshe xshel xshell xt_iis xt_tis xtab_p xtabond xtbin_p xtclog xtcloglog xtcloglog_8 xtcloglog_d2 xtcloglog_pa_p xtcloglog_re_p xtcnt_p xtcorr xtdata xtdes xtfront_p xtfrontier xtgee xtgee_elink xtgee_estat xtgee_makeivar xtgee_p xtgee_plink xtgls xtgls_p xthaus xthausman xtht_p xthtaylor xtile xtint_p xtintreg xtintreg_8 xtintreg_d2 xtintreg_p xtivp_1 xtivp_2 xtivreg xtline xtline_ex xtlogit xtlogit_8 xtlogit_d2 xtlogit_fe_p xtlogit_pa_p xtlogit_re_p xtmixed xtmixed_estat xtmixed_p xtnb_fe xtnb_lf xtnbreg xtnbreg_pa_p xtnbreg_refe_p xtpcse xtpcse_p xtpois xtpoisson xtpoisson_d2 xtpoisson_pa_p xtpoisson_refe_p xtpred xtprobit xtprobit_8 xtprobit_d2 xtprobit_re_p xtps_fe xtps_lf xtps_ren xtps_ren_8 xtrar_p xtrc xtrc_p xtrchh xtrefe_p xtreg xtreg_be xtreg_fe xtreg_ml xtreg_pa_p xtreg_re xtregar xtrere_p xtset xtsf_ll xtsf_llti xtsum xttab xttest0 xttobit xttobit_8 xttobit_p xttrans yx yxview__barlike_draw yxview_area_draw yxview_bar_draw yxview_dot_draw yxview_dropline_draw yxview_function_draw yxview_iarrow_draw yxview_ilabels_draw yxview_normal_draw yxview_pcarrow_draw yxview_pcbarrow_draw yxview_pccapsym_draw yxview_pcscatter_draw yxview_pcspike_draw yxview_rarea_draw yxview_rbar_draw yxview_rbarm_draw yxview_rcap_draw yxview_rcapsym_draw yxview_rconnected_draw yxview_rline_draw yxview_rscatter_draw yxview_rspike_draw yxview_spike_draw yxview_sunflower_draw zap_s zinb zinb_llf zinb_plf zip zip_llf zip_p zip_plf zt_ct_5 zt_hc_5 zt_hcd_5 zt_is_5 zt_iss_5 zt_sho_5 zt_smp_5 ztbase_5 ztcox_5 ztdes_5 ztereg_5 ztfill_5 ztgen_5 ztir_5 ztjoin_5 ztnb ztnb_p ztp ztp_p zts_5 ztset_5 ztspli_5 ztsum_5 zttoct_5 ztvary_5 ztweib_5",contains:[{className:"symbol",begin:/`[a-zA-Z0-9_]+'/},{className:"variable",begin:/\$\{?[a-zA-Z0-9_]+\}?/,relevance:0},{className:"string",variants:[{begin:'`"[^\r\n]*?"\''},{begin:'"[^\r\n"]*"'}]},{className:"built_in",variants:[{begin:"\\b(abs|acos|asin|atan|atan2|atanh|ceil|cloglog|comb|cos|digamma|exp|floor|invcloglog|invlogit|ln|lnfact|lnfactorial|lngamma|log|log10|max|min|mod|reldif|round|sign|sin|sqrt|sum|tan|tanh|trigamma|trunc|betaden|Binomial|binorm|binormal|chi2|chi2tail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|F|Fden|Ftail|gammaden|gammap|ibeta|invbinomial|invchi2|invchi2tail|invF|invFtail|invgammap|invibeta|invnchi2|invnFtail|invnibeta|invnorm|invnormal|invttail|nbetaden|nchi2|nFden|nFtail|nibeta|norm|normal|normalden|normd|npnchi2|tden|ttail|uniform|abbrev|char|index|indexnot|length|lower|ltrim|match|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|string|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrtrim|strtrim|strupper|subinstr|subinword|substr|trim|upper|word|wordcount|_caller|autocode|byteorder|chop|clip|cond|e|epsdouble|epsfloat|group|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlong|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|d|date|day|dow|doy|halfyear|mdy|month|quarter|week|year|d|daily|dofd|dofh|dofm|dofq|dofw|dofy|h|halfyearly|hofd|m|mofd|monthly|q|qofd|quarterly|tin|twithin|w|weekly|wofd|y|yearly|yh|ym|yofd|yq|yw|cholesky|colnumb|colsof|corr|det|diag|diag0cnt|el|get|hadamard|I|inv|invsym|issym|issymmetric|J|matmissing|matuniform|mreldif|nullmat|rownumb|rowsof|sweep|syminv|trace|vec|vecdiag)(?=\\()"}]},e.COMMENT("^[ \t]*\\*.*$",!1),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}}},function(e,t){e.exports=function(e){return{name:"STEP Part 21",aliases:["p21","step","stp"],case_insensitive:!0,keywords:{$pattern:"[A-Z_][A-Z0-9_.]*",keyword:["HEADER","ENDSEC","DATA"]},contains:[{className:"meta",begin:"ISO-10303-21;",relevance:10},{className:"meta",begin:"END-ISO-10303-21;",relevance:10},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT("/\\*\\*!","\\*/"),e.C_NUMBER_MODE,e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"'",end:"'"},{className:"symbol",variants:[{begin:"#",end:"\\d+",illegal:"\\W"}]}]}}},function(e,t){const n=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}),r=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],i=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],o=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],a=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],s=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();e.exports=function(e){const t=n(e),l={className:"variable",begin:"\\$"+e.IDENT_RE},c="(?=[.\\s\\n[:,(])";return{name:"Stylus",aliases:["styl"],case_insensitive:!1,keywords:"if else for in",illegal:"("+["\\?","(\\bReturn\\b)","(\\bEnd\\b)","(\\bend\\b)","(\\bdef\\b)",";","#\\s","\\*\\s","===\\s","\\|","%"].join("|")+")",contains:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.HEXCOLOR,{begin:"\\.[a-zA-Z][a-zA-Z0-9_-]*"+c,className:"selector-class"},{begin:"#[a-zA-Z][a-zA-Z0-9_-]*"+c,className:"selector-id"},{begin:"\\b("+r.join("|")+")"+c,className:"selector-tag"},{className:"selector-pseudo",begin:"&?:("+o.join("|")+")"+c},{className:"selector-pseudo",begin:"&?:(:)?("+a.join("|")+")"+c},t.ATTRIBUTE_SELECTOR_MODE,{className:"keyword",begin:/@media/,starts:{end:/[{;}]/,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:i.join(" ")},contains:[t.CSS_NUMBER_MODE]}},{className:"keyword",begin:"@((-(o|moz|ms|webkit)-)?("+["charset","css","debug","extend","font-face","for","import","include","keyframes","media","mixin","page","warn","while"].join("|")+"))\\b"},l,t.CSS_NUMBER_MODE,{className:"function",begin:"^[a-zA-Z][a-zA-Z0-9_-]*\\(.*\\)",illegal:"[\\n]",returnBegin:!0,contains:[{className:"title",begin:"\\b[a-zA-Z][a-zA-Z0-9_-]*"},{className:"params",begin:/\(/,end:/\)/,contains:[t.HEXCOLOR,l,e.APOS_STRING_MODE,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE]}]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+s.join("|")+")\\b",starts:{end:/;|$/,contains:[t.HEXCOLOR,l,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,t.CSS_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH],illegal:/\./,relevance:0}},t.FUNCTION_DISPATCH]}}},function(e,t){e.exports=function(e){return{name:"SubUnit",case_insensitive:!0,contains:[{className:"string",begin:"\\[\n(multipart)?",end:"\\]\n"},{className:"string",begin:"\\d{4}-\\d{2}-\\d{2}(\\s+)\\d{2}:\\d{2}:\\d{2}.\\d+Z"},{className:"string",begin:"(\\+|-)\\d+"},{className:"keyword",relevance:10,variants:[{begin:"^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?)\\s+(test)?"},{begin:"^progress(:?)(\\s+)?(pop|push)?"},{begin:"^tags:"},{begin:"^time:"}]}]}}},function(e,t){function n(e){return e?"string"==typeof e?e:e.source:null}function r(e){return i("(?=",e,")")}function i(...e){return e.map((e=>n(e))).join("")}function o(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e);return"("+(t.capture?"":"?:")+e.map((e=>n(e))).join("|")+")"}const a=e=>i(/\b/,e,/\w$/.test(e)?/\b/:/\B/),s=["Protocol","Type"].map(a),l=["init","self"].map(a),c=["Any","Self"],u=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","distributed","do","dynamic","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],d=["false","nil","true"],h=["assignment","associativity","higherThan","left","lowerThan","none","right"],p=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warn_unqualified_access","#warning"],m=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],g=o(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),f=o(g,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),_=i(g,f,"*"),b=o(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),v=o(b,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),y=i(b,v,"*"),E=i(/[A-Z]/,v,"*"),S=["autoclosure",i(/convention\(/,o("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",i(/objc\(/,y,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","testable","UIApplicationMain","unknown","usableFromInline"],w=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];e.exports=function(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),g=[e.C_LINE_COMMENT_MODE,n],b={match:[/\./,o(...s,...l)],className:{2:"keyword"}},T={match:i(/\./,o(...u)),relevance:0},C=u.filter((e=>"string"==typeof e)).concat(["_|0"]),x={variants:[{className:"keyword",match:o(...u.filter((e=>"string"!=typeof e)).concat(c).map(a),...l)}]},F={$pattern:o(/\b\w+/,/#\w+/),keyword:C.concat(p),literal:d},D=[b,T,x],k=[{match:i(/\./,o(...m)),relevance:0},{className:"built_in",match:i(/\b/,o(...m),/(?=\()/)}],O={match:/->/,relevance:0},I=[O,{className:"operator",relevance:0,variants:[{match:_},{match:`\\.(\\.|${f})+`}]}],A="([0-9]_*)+",R="([0-9a-fA-F]_*)+",N={className:"number",relevance:0,variants:[{match:`\\b(${A})(\\.(${A}))?([eE][+-]?(${A}))?\\b`},{match:`\\b0x(${R})(\\.(${R}))?([pP][+-]?(${A}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},M=(e="")=>({className:"subst",variants:[{match:i(/\\/,e,/[0\\tnr"']/)},{match:i(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}]}),P=(e="")=>({className:"subst",match:i(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/)}),L=(e="")=>({className:"subst",label:"interpol",begin:i(/\\/,e,/\(/),end:/\)/}),B=(e="")=>({begin:i(e,/"""/),end:i(/"""/,e),contains:[M(e),P(e),L(e)]}),U=(e="")=>({begin:i(e,/"/),end:i(/"/,e),contains:[M(e),L(e)]}),j={className:"string",variants:[B(),B("#"),B("##"),B("###"),U(),U("#"),U("##"),U("###")]},G={match:i(/`/,y,/`/)},z=[G,{className:"variable",match:/\$\d+/},{className:"variable",match:`\\$${v}+`}],H=[{match:/(@|#(un)?)available/,className:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:w,contains:[...I,N,j]}]}},{className:"keyword",match:i(/@/,o(...S))},{className:"meta",match:i(/@/,y)}],q={match:r(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:i(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,v,"+")},{className:"type",match:E,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:i(/\s+&\s+/,r(E)),relevance:0}]},V={begin:/</,end:/>/,keywords:F,contains:[...g,...D,...H,O,q]};q.contains.push(V);const $={begin:/\(/,end:/\)/,relevance:0,keywords:F,contains:["self",{match:i(y,/\s*:/),keywords:"_|0",relevance:0},...g,...D,...k,...I,N,j,...z,...H,q]},K={begin:/</,end:/>/,contains:[...g,q]},W={begin:/\(/,end:/\)/,keywords:F,contains:[{begin:o(r(i(y,/\s*:/)),r(i(y,/\s+/,y,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:y}]},...g,...D,...I,N,j,...H,q,$],endsParent:!0,illegal:/["']/},Y={match:[/func/,/\s+/,o(G.match,y,_)],className:{1:"keyword",3:"title.function"},contains:[K,W,t],illegal:[/\[/,/%/]},Q={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[K,W,t],illegal:/\[|%/},X={match:[/operator/,/\s+/,_],className:{1:"keyword",3:"title"}},Z={begin:[/precedencegroup/,/\s+/,E],className:{1:"keyword",3:"title"},contains:[q],keywords:[...h,...d],end:/}/};for(const e of j.variants){const t=e.contains.find((e=>"interpol"===e.label));t.keywords=F;const n=[...D,...k,...I,N,j,...z];t.contains=[...n,{begin:/\(/,end:/\)/,contains:["self",...n]}]}return{name:"Swift",keywords:F,contains:[...g,Y,Q,{beginKeywords:"struct protocol class extension enum actor",end:"\\{",excludeEnd:!0,keywords:F,contains:[e.inherit(e.TITLE_MODE,{className:"title.class",begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),...D]},X,Z,{beginKeywords:"import",end:/$/,contains:[...g],relevance:0},...D,...k,...I,N,j,...z,...H,q,$]}}},function(e,t){e.exports=function(e){return{name:"Tagger Script",contains:[{className:"comment",begin:/\$noop\(/,end:/\)/,contains:[{begin:/\\[()]/},{begin:/\(/,end:/\)/,contains:[{begin:/\\[()]/},"self"]}],relevance:10},{className:"keyword",begin:/\$[_a-zA-Z0-9]+(?=\()/},{className:"variable",begin:/%[_a-zA-Z0-9:]+%/},{className:"symbol",begin:/\\[\\nt$%,()]/},{className:"symbol",begin:/\\u[a-fA-F0-9]{4}/}]}}},function(e,t){e.exports=function(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,{className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]}]},i=e.inherit(r,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),o={className:"number",begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b"},a={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},s={begin:/\{/,end:/\}/,contains:[a],illegal:"\\n",relevance:0},l={begin:"\\[",end:"\\]",contains:[a],illegal:"\\n",relevance:0},c=[{className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ \t]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ \t]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ \t]|$)"}]},{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},o,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},s,l,r],u=[...c];return u.pop(),u.push(i),a.contains=u,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:c}}},function(e,t){e.exports=function(e){return{name:"Test Anything Protocol",case_insensitive:!0,contains:[e.HASH_COMMENT_MODE,{className:"meta",variants:[{begin:"^TAP version (\\d+)$"},{begin:"^1\\.\\.(\\d+)$"}]},{begin:/---$/,end:"\\.\\.\\.$",subLanguage:"yaml",relevance:0},{className:"number",begin:" (\\d+) "},{className:"symbol",variants:[{begin:"^ok"},{begin:"^not ok"}]}]}}},function(e,t){e.exports=function(e){const t=e.regex,n=/[a-zA-Z_][a-zA-Z0-9_]*/,r={className:"number",variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]};return{name:"Tcl",aliases:["tk"],keywords:["after","append","apply","array","auto_execok","auto_import","auto_load","auto_mkindex","auto_mkindex_old","auto_qualify","auto_reset","bgerror","binary","break","catch","cd","chan","clock","close","concat","continue","dde","dict","encoding","eof","error","eval","exec","exit","expr","fblocked","fconfigure","fcopy","file","fileevent","filename","flush","for","foreach","format","gets","glob","global","history","http","if","incr","info","interp","join","lappend|10","lassign|10","lindex|10","linsert|10","list","llength|10","load","lrange|10","lrepeat|10","lreplace|10","lreverse|10","lsearch|10","lset|10","lsort|10","mathfunc","mathop","memory","msgcat","namespace","open","package","parray","pid","pkg::create","pkg_mkIndex","platform","platform::shell","proc","puts","pwd","read","refchan","regexp","registry","regsub|10","rename","return","safe","scan","seek","set","socket","source","split","string","subst","switch","tcl_endOfWord","tcl_findLibrary","tcl_startOfNextWord","tcl_startOfPreviousWord","tcl_wordBreakAfter","tcl_wordBreakBefore","tcltest","tclvars","tell","time","tm","trace","unknown","unload","unset","update","uplevel","upvar","variable","vwait","while"],contains:[e.COMMENT(";[ \\t]*#","$"),e.COMMENT("^[ \\t]*#","$"),{beginKeywords:"proc",end:"[\\{]",excludeEnd:!0,contains:[{className:"title",begin:"[ \\t\\n\\r]+(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"[ \\t\\n\\r]",endsWithParent:!0,excludeEnd:!0}]},{className:"variable",variants:[{begin:t.concat(/\$/,t.optional(/::/),n,"(::",n,")*")},{begin:"\\$\\{(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"\\}",contains:[r]}]},{className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},r]}}},function(e,t){e.exports=function(e){const t=["bool","byte","i16","i32","i64","double","string","binary"];return{name:"Thrift",keywords:{keyword:["namespace","const","typedef","struct","enum","service","exception","void","oneway","set","list","map","required","optional"],type:t,literal:"true false"},contains:[e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"struct enum service exception",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{begin:"\\b(set|list|map)\\s*<",keywords:{type:[...t,"set","list","map"]},end:">",contains:["self"]}]}}},function(e,t){e.exports=function(e){const t={className:"number",begin:"[1-9][0-9]*",relevance:0},n={className:"symbol",begin:":[^\\]]+"};return{name:"TP",keywords:{keyword:["ABORT","ACC","ADJUST","AND","AP_LD","BREAK","CALL","CNT","COL","CONDITION","CONFIG","DA","DB","DIV","DETECT","ELSE","END","ENDFOR","ERR_NUM","ERROR_PROG","FINE","FOR","GP","GUARD","INC","IF","JMP","LINEAR_MAX_SPEED","LOCK","MOD","MONITOR","OFFSET","Offset","OR","OVERRIDE","PAUSE","PREG","PTH","RT_LD","RUN","SELECT","SKIP","Skip","TA","TB","TO","TOOL_OFFSET","Tool_Offset","UF","UT","UFRAME_NUM","UTOOL_NUM","UNLOCK","WAIT","X","Y","Z","W","P","R","STRLEN","SUBSTR","FINDSTR","VOFFSET","PROG","ATTR","MN","POS"],literal:["ON","OFF","max_speed","LPOS","JPOS","ENABLE","DISABLE","START","STOP","RESET"]},contains:[{className:"built_in",begin:"(AR|P|PAYLOAD|PR|R|SR|RSR|LBL|VR|UALM|MESSAGE|UTOOL|UFRAME|TIMER|TIMER_OVERFLOW|JOINT_MAX_SPEED|RESUME_PROG|DIAG_REC)\\[",end:"\\]",contains:["self",t,n]},{className:"built_in",begin:"(AI|AO|DI|DO|F|RI|RO|UI|UO|GI|GO|SI|SO)\\[",end:"\\]",contains:["self",t,e.QUOTE_STRING_MODE,n]},{className:"keyword",begin:"/(PROG|ATTR|MN|POS|END)\\b"},{className:"keyword",begin:"(CALL|RUN|POINT_LOGIC|LBL)\\b"},{className:"keyword",begin:"\\b(ACC|CNT|Skip|Offset|PSPD|RT_LD|AP_LD|Tool_Offset)"},{className:"number",begin:"\\d+(sec|msec|mm/sec|cm/min|inch/min|deg/sec|mm|in|cm)?\\b",relevance:0},e.COMMENT("//","[;$]"),e.COMMENT("!","[;$]"),e.COMMENT("--eg:","$"),e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"'"},e.C_NUMBER_MODE,{className:"variable",begin:"\\$[A-Za-z0-9_]+"}]}}},function(e,t){e.exports=function(e){const t=e.regex,n=["absolute_url","asset|0","asset_version","attribute","block","constant","controller|0","country_timezones","csrf_token","cycle","date","dump","expression","form|0","form_end","form_errors","form_help","form_label","form_rest","form_row","form_start","form_widget","html_classes","include","is_granted","logout_path","logout_url","max","min","parent","path|0","random","range","relative_path","render","render_esi","source","template_from_string","url|0"];let r=["apply","autoescape","block","cache","deprecated","do","embed","extends","filter","flush","for","form_theme","from","if","import","include","macro","sandbox","set","stopwatch","trans","trans_default_domain","transchoice","use","verbatim","with"];r=r.concat(r.map((e=>`end${e}`)));const i={scope:"string",variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/}]},o={scope:"number",match:/\d+/},a={begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:[i,o]},s={beginKeywords:n.join(" "),keywords:{name:n},relevance:0,contains:[a]},l={match:/\|(?=[A-Za-z_]+:?)/,beginScope:"punctuation",relevance:0,contains:[{match:/[A-Za-z_]+:?/,keywords:["abs","abbr_class","abbr_method","batch","capitalize","column","convert_encoding","country_name","currency_name","currency_symbol","data_uri","date","date_modify","default","escape","file_excerpt","file_link","file_relative","filter","first","format","format_args","format_args_as_text","format_currency","format_date","format_datetime","format_file","format_file_from_text","format_number","format_time","html_to_markdown","humanize","inky_to_html","inline_css","join","json_encode","keys","language_name","last","length","locale_name","lower","map","markdown","markdown_to_html","merge","nl2br","number_format","raw","reduce","replace","reverse","round","slice","slug","sort","spaceless","split","striptags","timezone_name","title","trans","transchoice","trim","u|0","upper","url_encode","yaml_dump","yaml_encode"]}]},c=(e,{relevance:n})=>({beginScope:{1:"template-tag",3:"name"},relevance:n||2,endScope:"template-tag",begin:[/\{%/,/\s*/,t.either(...e)],end:/%\}/,keywords:"in",contains:[l,s,i,o]}),u=c(r,{relevance:2}),d=c([/[a-z_]+/],{relevance:1});return{name:"Twig",aliases:["craftcms"],case_insensitive:!0,subLanguage:"xml",contains:[e.COMMENT(/\{#/,/#\}/),u,d,{className:"template-variable",begin:/\{\{/,end:/\}\}/,contains:["self",l,s,i,o]}]}}},function(e,t){const n="[A-Za-z$_][0-9A-Za-z$_]*",r=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],i=["true","false","null","undefined","NaN","Infinity"],o=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],a=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],s=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],l=["arguments","this","super","console","window","document","localStorage","module","global"],c=[].concat(s,o,a);function u(e){const t=e.regex,u=n,d="<>",h="</>",p={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,r=e.input[n];if("<"===r||","===r)return void t.ignoreMatch();let i;">"===r&&(((e,{after:t})=>{const n="</"+e[0].slice(1);return-1!==e.input.indexOf(n,t)})(e,{after:n})||t.ignoreMatch());const o=e.input.substring(n);((i=o.match(/^\s*=/))||(i=o.match(/^\s+extends\s+/))&&0===i.index)&&t.ignoreMatch()}},m={$pattern:n,keyword:r,literal:i,built_in:c,"variable.language":l},g="[0-9](_?[0-9])*",f=`\\.(${g})`,_="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",b={className:"number",variants:[{begin:`(\\b(${_})((${f})|\\.)?|(${f}))[eE][+-]?(${g})\\b`},{begin:`\\b(${_})\\b((${f})\\b|\\.)?|(${f})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},v={className:"subst",begin:"\\$\\{",end:"\\}",keywords:m,contains:[]},y={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,v],subLanguage:"xml"}},E={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,v],subLanguage:"css"}},S={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,v]},w={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:u+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},T=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,E,S,{match:/\$\d+/},b];v.contains=T.concat({begin:/\{/,end:/\}/,keywords:m,contains:["self"].concat(T)});const C=[].concat(w,v.contains),x=C.concat([{begin:/\(/,end:/\)/,keywords:m,contains:["self"].concat(C)}]),F={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:m,contains:x},D={variants:[{match:[/class/,/\s+/,u,/\s+/,/extends/,/\s+/,t.concat(u,"(",t.concat(/\./,u),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,u],scope:{1:"keyword",3:"title.class"}}]},k={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...o,...a]}},O={variants:[{match:[/function/,/\s+/,u,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[F],illegal:/%/};const I={match:t.concat(/\b/,(A=[...s,"super","import"],t.concat("(?!",A.join("|"),")")),u,t.lookahead(/\(/)),className:"title.function",relevance:0};var A;const R={begin:t.concat(/\./,t.lookahead(t.concat(u,/(?![0-9A-Za-z$_(])/))),end:u,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},N={match:[/get|set/,/\s+/,u,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},F]},M="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",P={match:[/const|var|let/,/\s+/,u,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(M)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[F]};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:m,exports:{PARAMS_CONTAINS:x,CLASS_REFERENCE:k},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,E,S,w,{match:/\$\d+/},b,k,{className:"attr",begin:u+t.lookahead(":"),relevance:0},P,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[w,e.REGEXP_MODE,{className:"function",begin:M,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:m,contains:x}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:d,end:h},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:p.begin,"on:begin":p.isTrulyOpeningTag,end:p.end}],subLanguage:"xml",contains:[{begin:p.begin,end:p.end,skip:!0,contains:["self"]}]}]},O,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[F,e.inherit(e.TITLE_MODE,{begin:u,className:"title.function"})]},{match:/\.\.\./,relevance:0},R,{match:"\\$"+u,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[F]},I,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},D,N,{match:/\$[(.]/}]}}e.exports=function(e){const t=u(e),o=n,a=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],s={beginKeywords:"namespace",end:/\{/,excludeEnd:!0,contains:[t.exports.CLASS_REFERENCE]},d={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:a},contains:[t.exports.CLASS_REFERENCE]},h={$pattern:n,keyword:r.concat(["type","namespace","interface","public","private","protected","implements","declare","abstract","readonly","enum","override"]),literal:i,built_in:c.concat(a),"variable.language":l},p={className:"meta",begin:"@"+o},m=(e,t,n)=>{const r=e.contains.findIndex((e=>e.label===t));if(-1===r)throw new Error("can not find mode to replace");e.contains.splice(r,1,n)};return Object.assign(t.keywords,h),t.exports.PARAMS_CONTAINS.push(p),t.contains=t.contains.concat([p,s,d]),m(t,"shebang",e.SHEBANG()),m(t,"use_strict",{className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/}),t.contains.find((e=>"func.def"===e.label)).relevance=0,Object.assign(t,{name:"TypeScript",aliases:["ts","tsx"]}),t}},function(e,t){e.exports=function(e){return{name:"Vala",keywords:{keyword:"char uchar unichar int uint long ulong short ushort int8 int16 int32 int64 uint8 uint16 uint32 uint64 float double bool struct enum string void weak unowned owned async signal static abstract interface override virtual delegate if while do for foreach else switch case break default return try catch public private protected internal using new this get set const stdout stdin stderr var",built_in:"DBus GLib CCode Gee Object Gtk Posix",literal:"false true null"},contains:[{className:"class",beginKeywords:"class interface namespace",end:/\{/,excludeEnd:!0,illegal:"[^,:\\n\\s\\.]",contains:[e.UNDERSCORE_TITLE_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",begin:'"""',end:'"""',relevance:5},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{className:"meta",begin:"^#",end:"$"}]}}},function(e,t){e.exports=function(e){const t=e.regex,n=/\d{1,2}\/\d{1,2}\/\d{4}/,r=/\d{4}-\d{1,2}-\d{1,2}/,i=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,o=/\d{1,2}(:\d{1,2}){1,2}/,a={className:"literal",variants:[{begin:t.concat(/# */,t.either(r,n),/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,i,/ *#/)},{begin:t.concat(/# */,t.either(r,n),/ +/,t.either(i,o),/ *#/)}]},s=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),l=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[{className:"string",begin:/"(""|[^/n])"C\b/},{className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},a,{className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},{className:"label",begin:/^\w+:/},s,l,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[l]}]}}},function(e,t){e.exports=function(e){const t=e.regex,n=["lcase","month","vartype","instrrev","ubound","setlocale","getobject","rgb","getref","string","weekdayname","rnd","dateadd","monthname","now","day","minute","isarray","cbool","round","formatcurrency","conversions","csng","timevalue","second","year","space","abs","clng","timeserial","fixs","len","asc","isempty","maths","dateserial","atn","timer","isobject","filter","weekday","datevalue","ccur","isdate","instr","datediff","formatdatetime","replace","isnull","right","sgn","array","snumeric","log","cdbl","hex","chr","lbound","msgbox","ucase","getlocale","cos","cdate","cbyte","rtrim","join","hour","oct","typename","trim","strcomp","int","createobject","loadpicture","tan","formatnumber","mid","split","cint","sin","datepart","ltrim","sqr","time","derived","eval","date","formatpercent","exp","inputbox","left","ascw","chrw","regexp","cstr","err"];return{name:"VBScript",aliases:["vbs"],case_insensitive:!0,keywords:{keyword:["call","class","const","dim","do","loop","erase","execute","executeglobal","exit","for","each","next","function","if","then","else","on","error","option","explicit","new","private","property","let","get","public","randomize","redim","rem","select","case","set","stop","sub","while","wend","with","end","to","elseif","is","or","xor","and","not","class_initialize","class_terminate","default","preserve","in","me","byval","byref","step","resume","goto"],built_in:["server","response","request","scriptengine","scriptenginebuildversion","scriptengineminorversion","scriptenginemajorversion"],literal:["true","false","null","nothing","empty"]},illegal:"//",contains:[{begin:t.concat(t.either(...n),"\\s*\\("),relevance:0,keywords:{built_in:n}},e.inherit(e.QUOTE_STRING_MODE,{contains:[{begin:'""'}]}),e.COMMENT(/'/,/$/,{relevance:0}),e.C_NUMBER_MODE]}}},function(e,t){e.exports=function(e){return{name:"VBScript in HTML",subLanguage:"xml",contains:[{begin:"<%",end:"%>",subLanguage:"vbscript"}]}}},function(e,t){e.exports=function(e){const t=e.regex,n=["begin_keywords","celldefine","default_nettype","default_decay_time","default_trireg_strength","define","delay_mode_distributed","delay_mode_path","delay_mode_unit","delay_mode_zero","else","elsif","end_keywords","endcelldefine","endif","ifdef","ifndef","include","line","nounconnected_drive","pragma","resetall","timescale","unconnected_drive","undef","undefineall"];return{name:"Verilog",aliases:["v","sv","svh"],case_insensitive:!1,keywords:{$pattern:/\$?[\w]+(\$[\w]+)*/,keyword:["accept_on","alias","always","always_comb","always_ff","always_latch","and","assert","assign","assume","automatic","before","begin","bind","bins","binsof","bit","break","buf|0","bufif0","bufif1","byte","case","casex","casez","cell","chandle","checker","class","clocking","cmos","config","const","constraint","context","continue","cover","covergroup","coverpoint","cross","deassign","default","defparam","design","disable","dist","do","edge","else","end","endcase","endchecker","endclass","endclocking","endconfig","endfunction","endgenerate","endgroup","endinterface","endmodule","endpackage","endprimitive","endprogram","endproperty","endspecify","endsequence","endtable","endtask","enum","event","eventually","expect","export","extends","extern","final","first_match","for","force","foreach","forever","fork","forkjoin","function","generate|5","genvar","global","highz0","highz1","if","iff","ifnone","ignore_bins","illegal_bins","implements","implies","import","incdir","include","initial","inout","input","inside","instance","int","integer","interconnect","interface","intersect","join","join_any","join_none","large","let","liblist","library","local","localparam","logic","longint","macromodule","matches","medium","modport","module","nand","negedge","nettype","new","nexttime","nmos","nor","noshowcancelled","not","notif0","notif1","or","output","package","packed","parameter","pmos","posedge","primitive","priority","program","property","protected","pull0","pull1","pulldown","pullup","pulsestyle_ondetect","pulsestyle_onevent","pure","rand","randc","randcase","randsequence","rcmos","real","realtime","ref","reg","reject_on","release","repeat","restrict","return","rnmos","rpmos","rtran","rtranif0","rtranif1","s_always","s_eventually","s_nexttime","s_until","s_until_with","scalared","sequence","shortint","shortreal","showcancelled","signed","small","soft","solve","specify","specparam","static","string","strong","strong0","strong1","struct","super","supply0","supply1","sync_accept_on","sync_reject_on","table","tagged","task","this","throughout","time","timeprecision","timeunit","tran","tranif0","tranif1","tri","tri0","tri1","triand","trior","trireg","type","typedef","union","unique","unique0","unsigned","until","until_with","untyped","use","uwire","var","vectored","virtual","void","wait","wait_order","wand","weak","weak0","weak1","while","wildcard","wire","with","within","wor","xnor","xor"],literal:["null"],built_in:["$finish","$stop","$exit","$fatal","$error","$warning","$info","$realtime","$time","$printtimescale","$bitstoreal","$bitstoshortreal","$itor","$signed","$cast","$bits","$stime","$timeformat","$realtobits","$shortrealtobits","$rtoi","$unsigned","$asserton","$assertkill","$assertpasson","$assertfailon","$assertnonvacuouson","$assertoff","$assertcontrol","$assertpassoff","$assertfailoff","$assertvacuousoff","$isunbounded","$sampled","$fell","$changed","$past_gclk","$fell_gclk","$changed_gclk","$rising_gclk","$steady_gclk","$coverage_control","$coverage_get","$coverage_save","$set_coverage_db_name","$rose","$stable","$past","$rose_gclk","$stable_gclk","$future_gclk","$falling_gclk","$changing_gclk","$display","$coverage_get_max","$coverage_merge","$get_coverage","$load_coverage_db","$typename","$unpacked_dimensions","$left","$low","$increment","$clog2","$ln","$log10","$exp","$sqrt","$pow","$floor","$ceil","$sin","$cos","$tan","$countbits","$onehot","$isunknown","$fatal","$warning","$dimensions","$right","$high","$size","$asin","$acos","$atan","$atan2","$hypot","$sinh","$cosh","$tanh","$asinh","$acosh","$atanh","$countones","$onehot0","$error","$info","$random","$dist_chi_square","$dist_erlang","$dist_exponential","$dist_normal","$dist_poisson","$dist_t","$dist_uniform","$q_initialize","$q_remove","$q_exam","$async$and$array","$async$nand$array","$async$or$array","$async$nor$array","$sync$and$array","$sync$nand$array","$sync$or$array","$sync$nor$array","$q_add","$q_full","$psprintf","$async$and$plane","$async$nand$plane","$async$or$plane","$async$nor$plane","$sync$and$plane","$sync$nand$plane","$sync$or$plane","$sync$nor$plane","$system","$display","$displayb","$displayh","$displayo","$strobe","$strobeb","$strobeh","$strobeo","$write","$readmemb","$readmemh","$writememh","$value$plusargs","$dumpvars","$dumpon","$dumplimit","$dumpports","$dumpportson","$dumpportslimit","$writeb","$writeh","$writeo","$monitor","$monitorb","$monitorh","$monitoro","$writememb","$dumpfile","$dumpoff","$dumpall","$dumpflush","$dumpportsoff","$dumpportsall","$dumpportsflush","$fclose","$fdisplay","$fdisplayb","$fdisplayh","$fdisplayo","$fstrobe","$fstrobeb","$fstrobeh","$fstrobeo","$swrite","$swriteb","$swriteh","$swriteo","$fscanf","$fread","$fseek","$fflush","$feof","$fopen","$fwrite","$fwriteb","$fwriteh","$fwriteo","$fmonitor","$fmonitorb","$fmonitorh","$fmonitoro","$sformat","$sformatf","$fgetc","$ungetc","$fgets","$sscanf","$rewind","$ftell","$ferror"]},contains:[e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.QUOTE_STRING_MODE,{scope:"number",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/\b((\d+'([bhodBHOD]))[0-9xzXZa-fA-F_]+)/},{begin:/\B(('([bhodBHOD]))[0-9xzXZa-fA-F_]+)/},{begin:/\b[0-9][0-9_]*/,relevance:0}]},{scope:"variable",variants:[{begin:"#\\((?!parameter).+\\)"},{begin:"\\.\\w+",relevance:0}]},{scope:"variable.constant",match:t.concat(/`/,t.either("__FILE__","__LINE__"))},{scope:"meta",begin:t.concat(/`/,t.either(...n)),end:/$|\/\/|\/\*/,returnEnd:!0,keywords:n}]}}},function(e,t){e.exports=function(e){const t="\\d(_|\\d)*",n="[eE][-+]?"+t,r="\\b("+(t+"#\\w+(\\.\\w+)?#("+n+")?")+"|"+(t+"(\\."+t+")?("+n+")?")+")";return{name:"VHDL",case_insensitive:!0,keywords:{keyword:["abs","access","after","alias","all","and","architecture","array","assert","assume","assume_guarantee","attribute","begin","block","body","buffer","bus","case","component","configuration","constant","context","cover","disconnect","downto","default","else","elsif","end","entity","exit","fairness","file","for","force","function","generate","generic","group","guarded","if","impure","in","inertial","inout","is","label","library","linkage","literal","loop","map","mod","nand","new","next","nor","not","null","of","on","open","or","others","out","package","parameter","port","postponed","procedure","process","property","protected","pure","range","record","register","reject","release","rem","report","restrict","restrict_guarantee","return","rol","ror","select","sequence","severity","shared","signal","sla","sll","sra","srl","strong","subtype","then","to","transport","type","unaffected","units","until","use","variable","view","vmode","vprop","vunit","wait","when","while","with","xnor","xor"],built_in:["boolean","bit","character","integer","time","delay_length","natural","positive","string","bit_vector","file_open_kind","file_open_status","std_logic","std_logic_vector","unsigned","signed","boolean_vector","integer_vector","std_ulogic","std_ulogic_vector","unresolved_unsigned","u_unsigned","unresolved_signed","u_signed","real_vector","time_vector"],literal:["false","true","note","warning","error","failure","line","text","side","width"]},illegal:/\{/,contains:[e.C_BLOCK_COMMENT_MODE,e.COMMENT("--","$"),e.QUOTE_STRING_MODE,{className:"number",begin:r,relevance:0},{className:"string",begin:"'(U|X|0|1|Z|W|L|H|-)'",contains:[e.BACKSLASH_ESCAPE]},{className:"symbol",begin:"'[A-Za-z](_?[A-Za-z0-9])*",contains:[e.BACKSLASH_ESCAPE]}]}}},function(e,t){e.exports=function(e){return{name:"Vim Script",keywords:{$pattern:/[!#@\w]+/,keyword:"N|0 P|0 X|0 a|0 ab abc abo al am an|0 ar arga argd arge argdo argg argl argu as au aug aun b|0 bN ba bad bd be bel bf bl bm bn bo bp br brea breaka breakd breakl bro bufdo buffers bun bw c|0 cN cNf ca cabc caddb cad caddf cal cat cb cc ccl cd ce cex cf cfir cgetb cgete cg changes chd che checkt cl cla clo cm cmapc cme cn cnew cnf cno cnorea cnoreme co col colo com comc comp con conf cope cp cpf cq cr cs cst cu cuna cunme cw delm deb debugg delc delf dif diffg diffo diffp diffpu diffs diffthis dig di dl dell dj dli do doautoa dp dr ds dsp e|0 ea ec echoe echoh echom echon el elsei em en endfo endf endt endw ene ex exe exi exu f|0 files filet fin fina fini fir fix fo foldc foldd folddoc foldo for fu go gr grepa gu gv ha helpf helpg helpt hi hid his ia iabc if ij il im imapc ime ino inorea inoreme int is isp iu iuna iunme j|0 ju k|0 keepa kee keepj lN lNf l|0 lad laddb laddf la lan lat lb lc lch lcl lcs le lefta let lex lf lfir lgetb lgete lg lgr lgrepa lh ll lla lli lmak lm lmapc lne lnew lnf ln loadk lo loc lockv lol lope lp lpf lr ls lt lu lua luad luaf lv lvimgrepa lw m|0 ma mak map mapc marks mat me menut mes mk mks mksp mkv mkvie mod mz mzf nbc nb nbs new nm nmapc nme nn nnoreme noa no noh norea noreme norm nu nun nunme ol o|0 om omapc ome on ono onoreme opt ou ounme ow p|0 profd prof pro promptr pc ped pe perld po popu pp pre prev ps pt ptN ptf ptj ptl ptn ptp ptr pts pu pw py3 python3 py3d py3f py pyd pyf quita qa rec red redi redr redraws reg res ret retu rew ri rightb rub rubyd rubyf rund ru rv sN san sa sal sav sb sbN sba sbf sbl sbm sbn sbp sbr scrip scripte scs se setf setg setl sf sfir sh sim sig sil sl sla sm smap smapc sme sn sni sno snor snoreme sor so spelld spe spelli spellr spellu spellw sp spr sre st sta startg startr star stopi stj sts sun sunm sunme sus sv sw sy synti sync tN tabN tabc tabdo tabe tabf tabfir tabl tabm tabnew tabn tabo tabp tabr tabs tab ta tags tc tcld tclf te tf th tj tl tm tn to tp tr try ts tu u|0 undoj undol una unh unl unlo unm unme uns up ve verb vert vim vimgrepa vi viu vie vm vmapc vme vne vn vnoreme vs vu vunme windo w|0 wN wa wh wi winc winp wn wp wq wqa ws wu wv x|0 xa xmapc xm xme xn xnoreme xu xunme y|0 z|0 ~ Next Print append abbreviate abclear aboveleft all amenu anoremenu args argadd argdelete argedit argglobal arglocal argument ascii autocmd augroup aunmenu buffer bNext ball badd bdelete behave belowright bfirst blast bmodified bnext botright bprevious brewind break breakadd breakdel breaklist browse bunload bwipeout change cNext cNfile cabbrev cabclear caddbuffer caddexpr caddfile call catch cbuffer cclose center cexpr cfile cfirst cgetbuffer cgetexpr cgetfile chdir checkpath checktime clist clast close cmap cmapclear cmenu cnext cnewer cnfile cnoremap cnoreabbrev cnoremenu copy colder colorscheme command comclear compiler continue confirm copen cprevious cpfile cquit crewind cscope cstag cunmap cunabbrev cunmenu cwindow delete delmarks debug debuggreedy delcommand delfunction diffupdate diffget diffoff diffpatch diffput diffsplit digraphs display deletel djump dlist doautocmd doautoall deletep drop dsearch dsplit edit earlier echo echoerr echohl echomsg else elseif emenu endif endfor endfunction endtry endwhile enew execute exit exusage file filetype find finally finish first fixdel fold foldclose folddoopen folddoclosed foldopen function global goto grep grepadd gui gvim hardcopy help helpfind helpgrep helptags highlight hide history insert iabbrev iabclear ijump ilist imap imapclear imenu inoremap inoreabbrev inoremenu intro isearch isplit iunmap iunabbrev iunmenu join jumps keepalt keepmarks keepjumps lNext lNfile list laddexpr laddbuffer laddfile last language later lbuffer lcd lchdir lclose lcscope left leftabove lexpr lfile lfirst lgetbuffer lgetexpr lgetfile lgrep lgrepadd lhelpgrep llast llist lmake lmap lmapclear lnext lnewer lnfile lnoremap loadkeymap loadview lockmarks lockvar lolder lopen lprevious lpfile lrewind ltag lunmap luado luafile lvimgrep lvimgrepadd lwindow move mark make mapclear match menu menutranslate messages mkexrc mksession mkspell mkvimrc mkview mode mzscheme mzfile nbclose nbkey nbsart next nmap nmapclear nmenu nnoremap nnoremenu noautocmd noremap nohlsearch noreabbrev noremenu normal number nunmap nunmenu oldfiles open omap omapclear omenu only onoremap onoremenu options ounmap ounmenu ownsyntax print profdel profile promptfind promptrepl pclose pedit perl perldo pop popup ppop preserve previous psearch ptag ptNext ptfirst ptjump ptlast ptnext ptprevious ptrewind ptselect put pwd py3do py3file python pydo pyfile quit quitall qall read recover redo redir redraw redrawstatus registers resize retab return rewind right rightbelow ruby rubydo rubyfile rundo runtime rviminfo substitute sNext sandbox sargument sall saveas sbuffer sbNext sball sbfirst sblast sbmodified sbnext sbprevious sbrewind scriptnames scriptencoding scscope set setfiletype setglobal setlocal sfind sfirst shell simalt sign silent sleep slast smagic smapclear smenu snext sniff snomagic snoremap snoremenu sort source spelldump spellgood spellinfo spellrepall spellundo spellwrong split sprevious srewind stop stag startgreplace startreplace startinsert stopinsert stjump stselect sunhide sunmap sunmenu suspend sview swapname syntax syntime syncbind tNext tabNext tabclose tabedit tabfind tabfirst tablast tabmove tabnext tabonly tabprevious tabrewind tag tcl tcldo tclfile tearoff tfirst throw tjump tlast tmenu tnext topleft tprevious trewind tselect tunmenu undo undojoin undolist unabbreviate unhide unlet unlockvar unmap unmenu unsilent update vglobal version verbose vertical vimgrep vimgrepadd visual viusage view vmap vmapclear vmenu vnew vnoremap vnoremenu vsplit vunmap vunmenu write wNext wall while winsize wincmd winpos wnext wprevious wqall wsverb wundo wviminfo xit xall xmapclear xmap xmenu xnoremap xnoremenu xunmap xunmenu yank",built_in:"synIDtrans atan2 range matcharg did_filetype asin feedkeys xor argv complete_check add getwinposx getqflist getwinposy screencol clearmatches empty extend getcmdpos mzeval garbagecollect setreg ceil sqrt diff_hlID inputsecret get getfperm getpid filewritable shiftwidth max sinh isdirectory synID system inputrestore winline atan visualmode inputlist tabpagewinnr round getregtype mapcheck hasmapto histdel argidx findfile sha256 exists toupper getcmdline taglist string getmatches bufnr strftime winwidth bufexists strtrans tabpagebuflist setcmdpos remote_read printf setloclist getpos getline bufwinnr float2nr len getcmdtype diff_filler luaeval resolve libcallnr foldclosedend reverse filter has_key bufname str2float strlen setline getcharmod setbufvar index searchpos shellescape undofile foldclosed setqflist buflisted strchars str2nr virtcol floor remove undotree remote_expr winheight gettabwinvar reltime cursor tabpagenr finddir localtime acos getloclist search tanh matchend rename gettabvar strdisplaywidth type abs py3eval setwinvar tolower wildmenumode log10 spellsuggest bufloaded synconcealed nextnonblank server2client complete settabwinvar executable input wincol setmatches getftype hlID inputsave searchpair or screenrow line settabvar histadd deepcopy strpart remote_peek and eval getftime submatch screenchar winsaveview matchadd mkdir screenattr getfontname libcall reltimestr getfsize winnr invert pow getbufline byte2line soundfold repeat fnameescape tagfiles sin strwidth spellbadword trunc maparg log lispindent hostname setpos globpath remote_foreground getchar synIDattr fnamemodify cscope_connection stridx winbufnr indent min complete_add nr2char searchpairpos inputdialog values matchlist items hlexists strridx browsedir expand fmod pathshorten line2byte argc count getwinvar glob foldtextresult getreg foreground cosh matchdelete has char2nr simplify histget searchdecl iconv winrestcmd pumvisible writefile foldlevel haslocaldir keys cos matchstr foldtext histnr tan tempname getcwd byteidx getbufvar islocked escape eventhandler remote_send serverlist winrestview synstack pyeval prevnonblank readfile cindent filereadable changenr exp"},illegal:/;/,contains:[e.NUMBER_MODE,{className:"string",begin:"'",end:"'",illegal:"\\n"},{className:"string",begin:/"(\\"|\n\\|[^"\n])*"/},e.COMMENT('"',"$"),{className:"variable",begin:/[bwtglsav]:[\w\d_]+/},{begin:[/\b(?:function|function!)/,/\s+/,e.IDENT_RE],className:{1:"keyword",3:"title"},end:"$",relevance:0,contains:[{className:"params",begin:"\\(",end:"\\)"}]},{className:"symbol",begin:/<[\w-]+>/}]}}},function(e,t){e.exports=function(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);return t.contains.push("self"),{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"]},contains:[e.COMMENT(/;;/,/$/),t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},{className:"variable",begin:/\$[\w_]+/},{match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},{begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},e.QUOTE_STRING_MODE,{match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},{className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/},{className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/}]}}},function(e,t){e.exports=function(e){const t=e.regex,n=/[a-zA-Z]\w*/,r=["as","break","class","construct","continue","else","for","foreign","if","import","in","is","return","static","var","while"],i=["true","false","null"],o=["this","super"],a=["-","~",/\*/,"%",/\.\.\./,/\.\./,/\+/,"<<",">>",">=","<=","<",">",/\^/,/!=/,/!/,/\bis\b/,"==","&&","&",/\|\|/,/\|/,/\?:/,"="],s={relevance:0,match:t.concat(/\b(?!(if|while|for|else|super)\b)/,n,/(?=\s*[({])/),className:"title.function"},l={match:t.concat(t.either(t.concat(/\b(?!(if|while|for|else|super)\b)/,n),t.either(...a)),/(?=\s*\([^)]+\)\s*\{)/),className:"title.function",starts:{contains:[{begin:/\(/,end:/\)/,contains:[{relevance:0,scope:"params",match:n}]}]}},c={variants:[{match:[/class\s+/,n,/\s+is\s+/,n]},{match:[/class\s+/,n]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:r},u={relevance:0,match:t.either(...a),className:"operator"},d={className:"property",begin:t.concat(/\./,t.lookahead(n)),end:n,excludeBegin:!0,relevance:0},h={relevance:0,match:t.concat(/\b_/,n),scope:"variable"},p={relevance:0,match:/\b[A-Z]+[a-z]+([A-Z]+[a-z]+)*/,scope:"title.class",keywords:{_:["Bool","Class","Fiber","Fn","List","Map","Null","Num","Object","Range","Sequence","String","System"]}},m=e.C_NUMBER_MODE,g={match:[n,/\s*/,/=/,/\s*/,/\(/,n,/\)\s*\{/],scope:{1:"title.function",3:"operator",6:"params"}},f=e.COMMENT(/\/\*\*/,/\*\//,{contains:[{match:/@[a-z]+/,scope:"doctag"},"self"]}),_={scope:"subst",begin:/%\(/,end:/\)/,contains:[m,p,s,h,u]},b={scope:"string",begin:/"/,end:/"/,contains:[_,{scope:"char.escape",variants:[{match:/\\\\|\\["0%abefnrtv]/},{match:/\\x[0-9A-F]{2}/},{match:/\\u[0-9A-F]{4}/},{match:/\\U[0-9A-F]{8}/}]}]};_.contains.push(b);const v=[...r,...o,...i],y={relevance:0,match:t.concat("\\b(?!",v.join("|"),"\\b)",/[a-zA-Z_]\w*(?:[?!]|\b)/),className:"variable"};return{name:"Wren",keywords:{keyword:r,"variable.language":o,literal:i},contains:[{scope:"comment",variants:[{begin:[/#!?/,/[A-Za-z_]+(?=\()/],beginScope:{},keywords:{literal:i},contains:[],end:/\)/},{begin:[/#!?/,/[A-Za-z_]+/],beginScope:{},end:/$/}]},m,b,{className:"string",begin:/"""/,end:/"""/},f,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,p,c,g,l,s,u,h,d,y]}}},function(e,t){e.exports=function(e){return{name:"Intel x86 Assembly",case_insensitive:!0,keywords:{$pattern:"[.%]?"+e.IDENT_RE,keyword:"lock rep repe repz repne repnz xaquire xrelease bnd nobnd aaa aad aam aas adc add and arpl bb0_reset bb1_reset bound bsf bsr bswap bt btc btr bts call cbw cdq cdqe clc cld cli clts cmc cmp cmpsb cmpsd cmpsq cmpsw cmpxchg cmpxchg486 cmpxchg8b cmpxchg16b cpuid cpu_read cpu_write cqo cwd cwde daa das dec div dmint emms enter equ f2xm1 fabs fadd faddp fbld fbstp fchs fclex fcmovb fcmovbe fcmove fcmovnb fcmovnbe fcmovne fcmovnu fcmovu fcom fcomi fcomip fcomp fcompp fcos fdecstp fdisi fdiv fdivp fdivr fdivrp femms feni ffree ffreep fiadd ficom ficomp fidiv fidivr fild fimul fincstp finit fist fistp fisttp fisub fisubr fld fld1 fldcw fldenv fldl2e fldl2t fldlg2 fldln2 fldpi fldz fmul fmulp fnclex fndisi fneni fninit fnop fnsave fnstcw fnstenv fnstsw fpatan fprem fprem1 fptan frndint frstor fsave fscale fsetpm fsin fsincos fsqrt fst fstcw fstenv fstp fstsw fsub fsubp fsubr fsubrp ftst fucom fucomi fucomip fucomp fucompp fxam fxch fxtract fyl2x fyl2xp1 hlt ibts icebp idiv imul in inc incbin insb insd insw int int01 int1 int03 int3 into invd invpcid invlpg invlpga iret iretd iretq iretw jcxz jecxz jrcxz jmp jmpe lahf lar lds lea leave les lfence lfs lgdt lgs lidt lldt lmsw loadall loadall286 lodsb lodsd lodsq lodsw loop loope loopne loopnz loopz lsl lss ltr mfence monitor mov movd movq movsb movsd movsq movsw movsx movsxd movzx mul mwait neg nop not or out outsb outsd outsw packssdw packsswb packuswb paddb paddd paddsb paddsiw paddsw paddusb paddusw paddw pand pandn pause paveb pavgusb pcmpeqb pcmpeqd pcmpeqw pcmpgtb pcmpgtd pcmpgtw pdistib pf2id pfacc pfadd pfcmpeq pfcmpge pfcmpgt pfmax pfmin pfmul pfrcp pfrcpit1 pfrcpit2 pfrsqit1 pfrsqrt pfsub pfsubr pi2fd pmachriw pmaddwd pmagw pmulhriw pmulhrwa pmulhrwc pmulhw pmullw pmvgezb pmvlzb pmvnzb pmvzb pop popa popad popaw popf popfd popfq popfw por prefetch prefetchw pslld psllq psllw psrad psraw psrld psrlq psrlw psubb psubd psubsb psubsiw psubsw psubusb psubusw psubw punpckhbw punpckhdq punpckhwd punpcklbw punpckldq punpcklwd push pusha pushad pushaw pushf pushfd pushfq pushfw pxor rcl rcr rdshr rdmsr rdpmc rdtsc rdtscp ret retf retn rol ror rdm rsdc rsldt rsm rsts sahf sal salc sar sbb scasb scasd scasq scasw sfence sgdt shl shld shr shrd sidt sldt skinit smi smint smintold smsw stc std sti stosb stosd stosq stosw str sub svdc svldt svts swapgs syscall sysenter sysexit sysret test ud0 ud1 ud2b ud2 ud2a umov verr verw fwait wbinvd wrshr wrmsr xadd xbts xchg xlatb xlat xor cmove cmovz cmovne cmovnz cmova cmovnbe cmovae cmovnb cmovb cmovnae cmovbe cmovna cmovg cmovnle cmovge cmovnl cmovl cmovnge cmovle cmovng cmovc cmovnc cmovo cmovno cmovs cmovns cmovp cmovpe cmovnp cmovpo je jz jne jnz ja jnbe jae jnb jb jnae jbe jna jg jnle jge jnl jl jnge jle jng jc jnc jo jno js jns jpo jnp jpe jp sete setz setne setnz seta setnbe setae setnb setnc setb setnae setcset setbe setna setg setnle setge setnl setl setnge setle setng sets setns seto setno setpe setp setpo setnp addps addss andnps andps cmpeqps cmpeqss cmpleps cmpless cmpltps cmpltss cmpneqps cmpneqss cmpnleps cmpnless cmpnltps cmpnltss cmpordps cmpordss cmpunordps cmpunordss cmpps cmpss comiss cvtpi2ps cvtps2pi cvtsi2ss cvtss2si cvttps2pi cvttss2si divps divss ldmxcsr maxps maxss minps minss movaps movhps movlhps movlps movhlps movmskps movntps movss movups mulps mulss orps rcpps rcpss rsqrtps rsqrtss shufps sqrtps sqrtss stmxcsr subps subss ucomiss unpckhps unpcklps xorps fxrstor fxrstor64 fxsave fxsave64 xgetbv xsetbv xsave xsave64 xsaveopt xsaveopt64 xrstor xrstor64 prefetchnta prefetcht0 prefetcht1 prefetcht2 maskmovq movntq pavgb pavgw pextrw pinsrw pmaxsw pmaxub pminsw pminub pmovmskb pmulhuw psadbw pshufw pf2iw pfnacc pfpnacc pi2fw pswapd maskmovdqu clflush movntdq movnti movntpd movdqa movdqu movdq2q movq2dq paddq pmuludq pshufd pshufhw pshuflw pslldq psrldq psubq punpckhqdq punpcklqdq addpd addsd andnpd andpd cmpeqpd cmpeqsd cmplepd cmplesd cmpltpd cmpltsd cmpneqpd cmpneqsd cmpnlepd cmpnlesd cmpnltpd cmpnltsd cmpordpd cmpordsd cmpunordpd cmpunordsd cmppd comisd cvtdq2pd cvtdq2ps cvtpd2dq cvtpd2pi cvtpd2ps cvtpi2pd cvtps2dq cvtps2pd cvtsd2si cvtsd2ss cvtsi2sd cvtss2sd cvttpd2pi cvttpd2dq cvttps2dq cvttsd2si divpd divsd maxpd maxsd minpd minsd movapd movhpd movlpd movmskpd movupd mulpd mulsd orpd shufpd sqrtpd sqrtsd subpd subsd ucomisd unpckhpd unpcklpd xorpd addsubpd addsubps haddpd haddps hsubpd hsubps lddqu movddup movshdup movsldup clgi stgi vmcall vmclear vmfunc vmlaunch vmload vmmcall vmptrld vmptrst vmread vmresume vmrun vmsave vmwrite vmxoff vmxon invept invvpid pabsb pabsw pabsd palignr phaddw phaddd phaddsw phsubw phsubd phsubsw pmaddubsw pmulhrsw pshufb psignb psignw psignd extrq insertq movntsd movntss lzcnt blendpd blendps blendvpd blendvps dppd dpps extractps insertps movntdqa mpsadbw packusdw pblendvb pblendw pcmpeqq pextrb pextrd pextrq phminposuw pinsrb pinsrd pinsrq pmaxsb pmaxsd pmaxud pmaxuw pminsb pminsd pminud pminuw pmovsxbw pmovsxbd pmovsxbq pmovsxwd pmovsxwq pmovsxdq pmovzxbw pmovzxbd pmovzxbq pmovzxwd pmovzxwq pmovzxdq pmuldq pmulld ptest roundpd roundps roundsd roundss crc32 pcmpestri pcmpestrm pcmpistri pcmpistrm pcmpgtq popcnt getsec pfrcpv pfrsqrtv movbe aesenc aesenclast aesdec aesdeclast aesimc aeskeygenassist vaesenc vaesenclast vaesdec vaesdeclast vaesimc vaeskeygenassist vaddpd vaddps vaddsd vaddss vaddsubpd vaddsubps vandpd vandps vandnpd vandnps vblendpd vblendps vblendvpd vblendvps vbroadcastss vbroadcastsd vbroadcastf128 vcmpeq_ospd vcmpeqpd vcmplt_ospd vcmpltpd vcmple_ospd vcmplepd vcmpunord_qpd vcmpunordpd vcmpneq_uqpd vcmpneqpd vcmpnlt_uspd vcmpnltpd vcmpnle_uspd vcmpnlepd vcmpord_qpd vcmpordpd vcmpeq_uqpd vcmpnge_uspd vcmpngepd vcmpngt_uspd vcmpngtpd vcmpfalse_oqpd vcmpfalsepd vcmpneq_oqpd vcmpge_ospd vcmpgepd vcmpgt_ospd vcmpgtpd vcmptrue_uqpd vcmptruepd vcmplt_oqpd vcmple_oqpd vcmpunord_spd vcmpneq_uspd vcmpnlt_uqpd vcmpnle_uqpd vcmpord_spd vcmpeq_uspd vcmpnge_uqpd vcmpngt_uqpd vcmpfalse_ospd vcmpneq_ospd vcmpge_oqpd vcmpgt_oqpd vcmptrue_uspd vcmppd vcmpeq_osps vcmpeqps vcmplt_osps vcmpltps vcmple_osps vcmpleps vcmpunord_qps vcmpunordps vcmpneq_uqps vcmpneqps vcmpnlt_usps vcmpnltps vcmpnle_usps vcmpnleps vcmpord_qps vcmpordps vcmpeq_uqps vcmpnge_usps vcmpngeps vcmpngt_usps vcmpngtps vcmpfalse_oqps vcmpfalseps vcmpneq_oqps vcmpge_osps vcmpgeps vcmpgt_osps vcmpgtps vcmptrue_uqps vcmptrueps vcmplt_oqps vcmple_oqps vcmpunord_sps vcmpneq_usps vcmpnlt_uqps vcmpnle_uqps vcmpord_sps vcmpeq_usps vcmpnge_uqps vcmpngt_uqps vcmpfalse_osps vcmpneq_osps vcmpge_oqps vcmpgt_oqps vcmptrue_usps vcmpps vcmpeq_ossd vcmpeqsd vcmplt_ossd vcmpltsd vcmple_ossd vcmplesd vcmpunord_qsd vcmpunordsd vcmpneq_uqsd vcmpneqsd vcmpnlt_ussd vcmpnltsd vcmpnle_ussd vcmpnlesd vcmpord_qsd vcmpordsd vcmpeq_uqsd vcmpnge_ussd vcmpngesd vcmpngt_ussd vcmpngtsd vcmpfalse_oqsd vcmpfalsesd vcmpneq_oqsd vcmpge_ossd vcmpgesd vcmpgt_ossd vcmpgtsd vcmptrue_uqsd vcmptruesd vcmplt_oqsd vcmple_oqsd vcmpunord_ssd vcmpneq_ussd vcmpnlt_uqsd vcmpnle_uqsd vcmpord_ssd vcmpeq_ussd vcmpnge_uqsd vcmpngt_uqsd vcmpfalse_ossd vcmpneq_ossd vcmpge_oqsd vcmpgt_oqsd vcmptrue_ussd vcmpsd vcmpeq_osss vcmpeqss vcmplt_osss vcmpltss vcmple_osss vcmpless vcmpunord_qss vcmpunordss vcmpneq_uqss vcmpneqss vcmpnlt_usss vcmpnltss vcmpnle_usss vcmpnless vcmpord_qss vcmpordss vcmpeq_uqss vcmpnge_usss vcmpngess vcmpngt_usss vcmpngtss vcmpfalse_oqss vcmpfalsess vcmpneq_oqss vcmpge_osss vcmpgess vcmpgt_osss vcmpgtss vcmptrue_uqss vcmptruess vcmplt_oqss vcmple_oqss vcmpunord_sss vcmpneq_usss vcmpnlt_uqss vcmpnle_uqss vcmpord_sss vcmpeq_usss vcmpnge_uqss vcmpngt_uqss vcmpfalse_osss vcmpneq_osss vcmpge_oqss vcmpgt_oqss vcmptrue_usss vcmpss vcomisd vcomiss vcvtdq2pd vcvtdq2ps vcvtpd2dq vcvtpd2ps vcvtps2dq vcvtps2pd vcvtsd2si vcvtsd2ss vcvtsi2sd vcvtsi2ss vcvtss2sd vcvtss2si vcvttpd2dq vcvttps2dq vcvttsd2si vcvttss2si vdivpd vdivps vdivsd vdivss vdppd vdpps vextractf128 vextractps vhaddpd vhaddps vhsubpd vhsubps vinsertf128 vinsertps vlddqu vldqqu vldmxcsr vmaskmovdqu vmaskmovps vmaskmovpd vmaxpd vmaxps vmaxsd vmaxss vminpd vminps vminsd vminss vmovapd vmovaps vmovd vmovq vmovddup vmovdqa vmovqqa vmovdqu vmovqqu vmovhlps vmovhpd vmovhps vmovlhps vmovlpd vmovlps vmovmskpd vmovmskps vmovntdq vmovntqq vmovntdqa vmovntpd vmovntps vmovsd vmovshdup vmovsldup vmovss vmovupd vmovups vmpsadbw vmulpd vmulps vmulsd vmulss vorpd vorps vpabsb vpabsw vpabsd vpacksswb vpackssdw vpackuswb vpackusdw vpaddb vpaddw vpaddd vpaddq vpaddsb vpaddsw vpaddusb vpaddusw vpalignr vpand vpandn vpavgb vpavgw vpblendvb vpblendw vpcmpestri vpcmpestrm vpcmpistri vpcmpistrm vpcmpeqb vpcmpeqw vpcmpeqd vpcmpeqq vpcmpgtb vpcmpgtw vpcmpgtd vpcmpgtq vpermilpd vpermilps vperm2f128 vpextrb vpextrw vpextrd vpextrq vphaddw vphaddd vphaddsw vphminposuw vphsubw vphsubd vphsubsw vpinsrb vpinsrw vpinsrd vpinsrq vpmaddwd vpmaddubsw vpmaxsb vpmaxsw vpmaxsd vpmaxub vpmaxuw vpmaxud vpminsb vpminsw vpminsd vpminub vpminuw vpminud vpmovmskb vpmovsxbw vpmovsxbd vpmovsxbq vpmovsxwd vpmovsxwq vpmovsxdq vpmovzxbw vpmovzxbd vpmovzxbq vpmovzxwd vpmovzxwq vpmovzxdq vpmulhuw vpmulhrsw vpmulhw vpmullw vpmulld vpmuludq vpmuldq vpor vpsadbw vpshufb vpshufd vpshufhw vpshuflw vpsignb vpsignw vpsignd vpslldq vpsrldq vpsllw vpslld vpsllq vpsraw vpsrad vpsrlw vpsrld vpsrlq vptest vpsubb vpsubw vpsubd vpsubq vpsubsb vpsubsw vpsubusb vpsubusw vpunpckhbw vpunpckhwd vpunpckhdq vpunpckhqdq vpunpcklbw vpunpcklwd vpunpckldq vpunpcklqdq vpxor vrcpps vrcpss vrsqrtps vrsqrtss vroundpd vroundps vroundsd vroundss vshufpd vshufps vsqrtpd vsqrtps vsqrtsd vsqrtss vstmxcsr vsubpd vsubps vsubsd vsubss vtestps vtestpd vucomisd vucomiss vunpckhpd vunpckhps vunpcklpd vunpcklps vxorpd vxorps vzeroall vzeroupper pclmullqlqdq pclmulhqlqdq pclmullqhqdq pclmulhqhqdq pclmulqdq vpclmullqlqdq vpclmulhqlqdq vpclmullqhqdq vpclmulhqhqdq vpclmulqdq vfmadd132ps vfmadd132pd vfmadd312ps vfmadd312pd vfmadd213ps vfmadd213pd vfmadd123ps vfmadd123pd vfmadd231ps vfmadd231pd vfmadd321ps vfmadd321pd vfmaddsub132ps vfmaddsub132pd vfmaddsub312ps vfmaddsub312pd vfmaddsub213ps vfmaddsub213pd vfmaddsub123ps vfmaddsub123pd vfmaddsub231ps vfmaddsub231pd vfmaddsub321ps vfmaddsub321pd vfmsub132ps vfmsub132pd vfmsub312ps vfmsub312pd vfmsub213ps vfmsub213pd vfmsub123ps vfmsub123pd vfmsub231ps vfmsub231pd vfmsub321ps vfmsub321pd vfmsubadd132ps vfmsubadd132pd vfmsubadd312ps vfmsubadd312pd vfmsubadd213ps vfmsubadd213pd vfmsubadd123ps vfmsubadd123pd vfmsubadd231ps vfmsubadd231pd vfmsubadd321ps vfmsubadd321pd vfnmadd132ps vfnmadd132pd vfnmadd312ps vfnmadd312pd vfnmadd213ps vfnmadd213pd vfnmadd123ps vfnmadd123pd vfnmadd231ps vfnmadd231pd vfnmadd321ps vfnmadd321pd vfnmsub132ps vfnmsub132pd vfnmsub312ps vfnmsub312pd vfnmsub213ps vfnmsub213pd vfnmsub123ps vfnmsub123pd vfnmsub231ps vfnmsub231pd vfnmsub321ps vfnmsub321pd vfmadd132ss vfmadd132sd vfmadd312ss vfmadd312sd vfmadd213ss vfmadd213sd vfmadd123ss vfmadd123sd vfmadd231ss vfmadd231sd vfmadd321ss vfmadd321sd vfmsub132ss vfmsub132sd vfmsub312ss vfmsub312sd vfmsub213ss vfmsub213sd vfmsub123ss vfmsub123sd vfmsub231ss vfmsub231sd vfmsub321ss vfmsub321sd vfnmadd132ss vfnmadd132sd vfnmadd312ss vfnmadd312sd vfnmadd213ss vfnmadd213sd vfnmadd123ss vfnmadd123sd vfnmadd231ss vfnmadd231sd vfnmadd321ss vfnmadd321sd vfnmsub132ss vfnmsub132sd vfnmsub312ss vfnmsub312sd vfnmsub213ss vfnmsub213sd vfnmsub123ss vfnmsub123sd vfnmsub231ss vfnmsub231sd vfnmsub321ss vfnmsub321sd rdfsbase rdgsbase rdrand wrfsbase wrgsbase vcvtph2ps vcvtps2ph adcx adox rdseed clac stac xstore xcryptecb xcryptcbc xcryptctr xcryptcfb xcryptofb montmul xsha1 xsha256 llwpcb slwpcb lwpval lwpins vfmaddpd vfmaddps vfmaddsd vfmaddss vfmaddsubpd vfmaddsubps vfmsubaddpd vfmsubaddps vfmsubpd vfmsubps vfmsubsd vfmsubss vfnmaddpd vfnmaddps vfnmaddsd vfnmaddss vfnmsubpd vfnmsubps vfnmsubsd vfnmsubss vfrczpd vfrczps vfrczsd vfrczss vpcmov vpcomb vpcomd vpcomq vpcomub vpcomud vpcomuq vpcomuw vpcomw vphaddbd vphaddbq vphaddbw vphadddq vphaddubd vphaddubq vphaddubw vphaddudq vphadduwd vphadduwq vphaddwd vphaddwq vphsubbw vphsubdq vphsubwd vpmacsdd vpmacsdqh vpmacsdql vpmacssdd vpmacssdqh vpmacssdql vpmacsswd vpmacssww vpmacswd vpmacsww vpmadcsswd vpmadcswd vpperm vprotb vprotd vprotq vprotw vpshab vpshad vpshaq vpshaw vpshlb vpshld vpshlq vpshlw vbroadcasti128 vpblendd vpbroadcastb vpbroadcastw vpbroadcastd vpbroadcastq vpermd vpermpd vpermps vpermq vperm2i128 vextracti128 vinserti128 vpmaskmovd vpmaskmovq vpsllvd vpsllvq vpsravd vpsrlvd vpsrlvq vgatherdpd vgatherqpd vgatherdps vgatherqps vpgatherdd vpgatherqd vpgatherdq vpgatherqq xabort xbegin xend xtest andn bextr blci blcic blsi blsic blcfill blsfill blcmsk blsmsk blsr blcs bzhi mulx pdep pext rorx sarx shlx shrx tzcnt tzmsk t1mskc valignd valignq vblendmpd vblendmps vbroadcastf32x4 vbroadcastf64x4 vbroadcasti32x4 vbroadcasti64x4 vcompresspd vcompressps vcvtpd2udq vcvtps2udq vcvtsd2usi vcvtss2usi vcvttpd2udq vcvttps2udq vcvttsd2usi vcvttss2usi vcvtudq2pd vcvtudq2ps vcvtusi2sd vcvtusi2ss vexpandpd vexpandps vextractf32x4 vextractf64x4 vextracti32x4 vextracti64x4 vfixupimmpd vfixupimmps vfixupimmsd vfixupimmss vgetexppd vgetexpps vgetexpsd vgetexpss vgetmantpd vgetmantps vgetmantsd vgetmantss vinsertf32x4 vinsertf64x4 vinserti32x4 vinserti64x4 vmovdqa32 vmovdqa64 vmovdqu32 vmovdqu64 vpabsq vpandd vpandnd vpandnq vpandq vpblendmd vpblendmq vpcmpltd vpcmpled vpcmpneqd vpcmpnltd vpcmpnled vpcmpd vpcmpltq vpcmpleq vpcmpneqq vpcmpnltq vpcmpnleq vpcmpq vpcmpequd vpcmpltud vpcmpleud vpcmpnequd vpcmpnltud vpcmpnleud vpcmpud vpcmpequq vpcmpltuq vpcmpleuq vpcmpnequq vpcmpnltuq vpcmpnleuq vpcmpuq vpcompressd vpcompressq vpermi2d vpermi2pd vpermi2ps vpermi2q vpermt2d vpermt2pd vpermt2ps vpermt2q vpexpandd vpexpandq vpmaxsq vpmaxuq vpminsq vpminuq vpmovdb vpmovdw vpmovqb vpmovqd vpmovqw vpmovsdb vpmovsdw vpmovsqb vpmovsqd vpmovsqw vpmovusdb vpmovusdw vpmovusqb vpmovusqd vpmovusqw vpord vporq vprold vprolq vprolvd vprolvq vprord vprorq vprorvd vprorvq vpscatterdd vpscatterdq vpscatterqd vpscatterqq vpsraq vpsravq vpternlogd vpternlogq vptestmd vptestmq vptestnmd vptestnmq vpxord vpxorq vrcp14pd vrcp14ps vrcp14sd vrcp14ss vrndscalepd vrndscaleps vrndscalesd vrndscaless vrsqrt14pd vrsqrt14ps vrsqrt14sd vrsqrt14ss vscalefpd vscalefps vscalefsd vscalefss vscatterdpd vscatterdps vscatterqpd vscatterqps vshuff32x4 vshuff64x2 vshufi32x4 vshufi64x2 kandnw kandw kmovw knotw kortestw korw kshiftlw kshiftrw kunpckbw kxnorw kxorw vpbroadcastmb2q vpbroadcastmw2d vpconflictd vpconflictq vplzcntd vplzcntq vexp2pd vexp2ps vrcp28pd vrcp28ps vrcp28sd vrcp28ss vrsqrt28pd vrsqrt28ps vrsqrt28sd vrsqrt28ss vgatherpf0dpd vgatherpf0dps vgatherpf0qpd vgatherpf0qps vgatherpf1dpd vgatherpf1dps vgatherpf1qpd vgatherpf1qps vscatterpf0dpd vscatterpf0dps vscatterpf0qpd vscatterpf0qps vscatterpf1dpd vscatterpf1dps vscatterpf1qpd vscatterpf1qps prefetchwt1 bndmk bndcl bndcu bndcn bndmov bndldx bndstx sha1rnds4 sha1nexte sha1msg1 sha1msg2 sha256rnds2 sha256msg1 sha256msg2 hint_nop0 hint_nop1 hint_nop2 hint_nop3 hint_nop4 hint_nop5 hint_nop6 hint_nop7 hint_nop8 hint_nop9 hint_nop10 hint_nop11 hint_nop12 hint_nop13 hint_nop14 hint_nop15 hint_nop16 hint_nop17 hint_nop18 hint_nop19 hint_nop20 hint_nop21 hint_nop22 hint_nop23 hint_nop24 hint_nop25 hint_nop26 hint_nop27 hint_nop28 hint_nop29 hint_nop30 hint_nop31 hint_nop32 hint_nop33 hint_nop34 hint_nop35 hint_nop36 hint_nop37 hint_nop38 hint_nop39 hint_nop40 hint_nop41 hint_nop42 hint_nop43 hint_nop44 hint_nop45 hint_nop46 hint_nop47 hint_nop48 hint_nop49 hint_nop50 hint_nop51 hint_nop52 hint_nop53 hint_nop54 hint_nop55 hint_nop56 hint_nop57 hint_nop58 hint_nop59 hint_nop60 hint_nop61 hint_nop62 hint_nop63",built_in:"ip eip rip al ah bl bh cl ch dl dh sil dil bpl spl r8b r9b r10b r11b r12b r13b r14b r15b ax bx cx dx si di bp sp r8w r9w r10w r11w r12w r13w r14w r15w eax ebx ecx edx esi edi ebp esp eip r8d r9d r10d r11d r12d r13d r14d r15d rax rbx rcx rdx rsi rdi rbp rsp r8 r9 r10 r11 r12 r13 r14 r15 cs ds es fs gs ss st st0 st1 st2 st3 st4 st5 st6 st7 mm0 mm1 mm2 mm3 mm4 mm5 mm6 mm7 xmm0 xmm1 xmm2 xmm3 xmm4 xmm5 xmm6 xmm7 xmm8 xmm9 xmm10 xmm11 xmm12 xmm13 xmm14 xmm15 xmm16 xmm17 xmm18 xmm19 xmm20 xmm21 xmm22 xmm23 xmm24 xmm25 xmm26 xmm27 xmm28 xmm29 xmm30 xmm31 ymm0 ymm1 ymm2 ymm3 ymm4 ymm5 ymm6 ymm7 ymm8 ymm9 ymm10 ymm11 ymm12 ymm13 ymm14 ymm15 ymm16 ymm17 ymm18 ymm19 ymm20 ymm21 ymm22 ymm23 ymm24 ymm25 ymm26 ymm27 ymm28 ymm29 ymm30 ymm31 zmm0 zmm1 zmm2 zmm3 zmm4 zmm5 zmm6 zmm7 zmm8 zmm9 zmm10 zmm11 zmm12 zmm13 zmm14 zmm15 zmm16 zmm17 zmm18 zmm19 zmm20 zmm21 zmm22 zmm23 zmm24 zmm25 zmm26 zmm27 zmm28 zmm29 zmm30 zmm31 k0 k1 k2 k3 k4 k5 k6 k7 bnd0 bnd1 bnd2 bnd3 cr0 cr1 cr2 cr3 cr4 cr8 dr0 dr1 dr2 dr3 dr8 tr3 tr4 tr5 tr6 tr7 r0 r1 r2 r3 r4 r5 r6 r7 r0b r1b r2b r3b r4b r5b r6b r7b r0w r1w r2w r3w r4w r5w r6w r7w r0d r1d r2d r3d r4d r5d r6d r7d r0h r1h r2h r3h r0l r1l r2l r3l r4l r5l r6l r7l r8l r9l r10l r11l r12l r13l r14l r15l db dw dd dq dt ddq do dy dz resb resw resd resq rest resdq reso resy resz incbin equ times byte word dword qword nosplit rel abs seg wrt strict near far a32 ptr",meta:"%define %xdefine %+ %undef %defstr %deftok %assign %strcat %strlen %substr %rotate %elif %else %endif %if %ifmacro %ifctx %ifidn %ifidni %ifid %ifnum %ifstr %iftoken %ifempty %ifenv %error %warning %fatal %rep %endrep %include %push %pop %repl %pathsearch %depend %use %arg %stacksize %local %line %comment %endcomment .nolist __FILE__ __LINE__ __SECT__ __BITS__ __OUTPUT_FORMAT__ __DATE__ __TIME__ __DATE_NUM__ __TIME_NUM__ __UTC_DATE__ __UTC_TIME__ __UTC_DATE_NUM__ __UTC_TIME_NUM__ __PASS__ struc endstruc istruc at iend align alignb sectalign daz nodaz up down zero default option assume public bits use16 use32 use64 default section segment absolute extern global common cpu float __utf16__ __utf16le__ __utf16be__ __utf32__ __utf32le__ __utf32be__ __float8__ __float16__ __float32__ __float64__ __float80m__ __float80e__ __float128l__ __float128h__ __Infinity__ __QNaN__ __SNaN__ Inf NaN QNaN SNaN float8 float16 float32 float64 float80m float80e float128l float128h __FLOAT_DAZ__ __FLOAT_ROUND__ __FLOAT__"},contains:[e.COMMENT(";","$",{relevance:0}),{className:"number",variants:[{begin:"\\b(?:([0-9][0-9_]*)?\\.[0-9_]*(?:[eE][+-]?[0-9_]+)?|(0[Xx])?[0-9][0-9_]*(\\.[0-9_]*)?(?:[pP](?:[+-]?[0-9_]+)?)?)\\b",relevance:0},{begin:"\\$[0-9][0-9A-Fa-f]*",relevance:0},{begin:"\\b(?:[0-9A-Fa-f][0-9A-Fa-f_]*[Hh]|[0-9][0-9_]*[DdTt]?|[0-7][0-7_]*[QqOo]|[0-1][0-1_]*[BbYy])\\b"},{begin:"\\b(?:0[Xx][0-9A-Fa-f_]+|0[DdTt][0-9_]+|0[QqOo][0-7_]+|0[BbYy][0-1_]+)\\b"}]},e.QUOTE_STRING_MODE,{className:"string",variants:[{begin:"'",end:"[^\\\\]'"},{begin:"`",end:"[^\\\\]`"}],relevance:0},{className:"symbol",variants:[{begin:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)"},{begin:"^\\s*%%[A-Za-z0-9_$#@~.?]*:"}],relevance:0},{className:"subst",begin:"%[0-9]+",relevance:0},{className:"subst",begin:"%!S+",relevance:0},{className:"meta",begin:/^\s*\.[\w_-]+/}]}}},function(e,t){e.exports=function(e){const t={$pattern:/[a-zA-Z][a-zA-Z0-9_?]*/,keyword:["if","then","else","do","while","until","for","loop","import","with","is","as","where","when","by","data","constant","integer","real","text","name","boolean","symbol","infix","prefix","postfix","block","tree"],literal:["true","false","nil"],built_in:["in","mod","rem","and","or","xor","not","abs","sign","floor","ceil","sqrt","sin","cos","tan","asin","acos","atan","exp","expm1","log","log2","log10","log1p","pi","at","text_length","text_range","text_find","text_replace","contains","page","slide","basic_slide","title_slide","title","subtitle","fade_in","fade_out","fade_at","clear_color","color","line_color","line_width","texture_wrap","texture_transform","texture","scale_?x","scale_?y","scale_?z?","translate_?x","translate_?y","translate_?z?","rotate_?x","rotate_?y","rotate_?z?","rectangle","circle","ellipse","sphere","path","line_to","move_to","quad_to","curve_to","theme","background","contents","locally","time","mouse_?x","mouse_?y","mouse_buttons"].concat(["ObjectLoader","Animate","MovieCredits","Slides","Filters","Shading","Materials","LensFlare","Mapping","VLCAudioVideo","StereoDecoder","PointCloud","NetworkAccess","RemoteControl","RegExp","ChromaKey","Snowfall","NodeJS","Speech","Charts"])},n={className:"string",begin:'"',end:'"',illegal:"\\n"},r={beginKeywords:"import",end:"$",keywords:t,contains:[n]},i={className:"function",begin:/[a-z][^\n]*->/,returnBegin:!0,end:/->/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,keywords:t}})]};return{name:"XL",aliases:["tao"],keywords:t,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,{className:"string",begin:"'",end:"'",illegal:"\\n"},{className:"string",begin:"<<",end:">>"},i,r,{className:"number",begin:"[0-9]+#[0-9A-Z_]+(\\.[0-9-A-Z_]+)?#?([Ee][+-]?[0-9]+)?"},e.NUMBER_MODE]}}},function(e,t){e.exports=function(e){return{name:"XQuery",aliases:["xpath","xq"],case_insensitive:!1,illegal:/(proc)|(abstract)|(extends)|(until)|(#)/,keywords:{$pattern:/[a-zA-Z$][a-zA-Z0-9_:-]*/,keyword:["module","schema","namespace","boundary-space","preserve","no-preserve","strip","default","collation","base-uri","ordering","context","decimal-format","decimal-separator","copy-namespaces","empty-sequence","except","exponent-separator","external","grouping-separator","inherit","no-inherit","lax","minus-sign","per-mille","percent","schema-attribute","schema-element","strict","unordered","zero-digit","declare","import","option","function","validate","variable","for","at","in","let","where","order","group","by","return","if","then","else","tumbling","sliding","window","start","when","only","end","previous","next","stable","ascending","descending","allowing","empty","greatest","least","some","every","satisfies","switch","case","typeswitch","try","catch","and","or","to","union","intersect","instance","of","treat","as","castable","cast","map","array","delete","insert","into","replace","value","rename","copy","modify","update"],type:["item","document-node","node","attribute","document","element","comment","namespace","namespace-node","processing-instruction","text","construction","xs:anyAtomicType","xs:untypedAtomic","xs:duration","xs:time","xs:decimal","xs:float","xs:double","xs:gYearMonth","xs:gYear","xs:gMonthDay","xs:gMonth","xs:gDay","xs:boolean","xs:base64Binary","xs:hexBinary","xs:anyURI","xs:QName","xs:NOTATION","xs:dateTime","xs:dateTimeStamp","xs:date","xs:string","xs:normalizedString","xs:token","xs:language","xs:NMTOKEN","xs:Name","xs:NCName","xs:ID","xs:IDREF","xs:ENTITY","xs:integer","xs:nonPositiveInteger","xs:negativeInteger","xs:long","xs:int","xs:short","xs:byte","xs:nonNegativeInteger","xs:unisignedLong","xs:unsignedInt","xs:unsignedShort","xs:unsignedByte","xs:positiveInteger","xs:yearMonthDuration","xs:dayTimeDuration"],literal:["eq","ne","lt","le","gt","ge","is","self::","child::","descendant::","descendant-or-self::","attribute::","following::","following-sibling::","parent::","ancestor::","ancestor-or-self::","preceding::","preceding-sibling::","NaN"]},contains:[{className:"variable",begin:/[$][\w\-:]+/},{className:"built_in",variants:[{begin:/\barray:/,end:/(?:append|filter|flatten|fold-(?:left|right)|for-each(?:-pair)?|get|head|insert-before|join|put|remove|reverse|size|sort|subarray|tail)\b/},{begin:/\bmap:/,end:/(?:contains|entry|find|for-each|get|keys|merge|put|remove|size)\b/},{begin:/\bmath:/,end:/(?:a(?:cos|sin|tan[2]?)|cos|exp(?:10)?|log(?:10)?|pi|pow|sin|sqrt|tan)\b/},{begin:/\bop:/,end:/\(/,excludeEnd:!0},{begin:/\bfn:/,end:/\(/,excludeEnd:!0},{begin:/[^</$:'"-]\b(?:abs|accumulator-(?:after|before)|adjust-(?:date(?:Time)?|time)-to-timezone|analyze-string|apply|available-(?:environment-variables|system-properties)|avg|base-uri|boolean|ceiling|codepoints?-(?:equal|to-string)|collation-key|collection|compare|concat|contains(?:-token)?|copy-of|count|current(?:-)?(?:date(?:Time)?|time|group(?:ing-key)?|output-uri|merge-(?:group|key))?data|dateTime|days?-from-(?:date(?:Time)?|duration)|deep-equal|default-(?:collation|language)|distinct-values|document(?:-uri)?|doc(?:-available)?|element-(?:available|with-id)|empty|encode-for-uri|ends-with|environment-variable|error|escape-html-uri|exactly-one|exists|false|filter|floor|fold-(?:left|right)|for-each(?:-pair)?|format-(?:date(?:Time)?|time|integer|number)|function-(?:arity|available|lookup|name)|generate-id|has-children|head|hours-from-(?:dateTime|duration|time)|id(?:ref)?|implicit-timezone|in-scope-prefixes|index-of|innermost|insert-before|iri-to-uri|json-(?:doc|to-xml)|key|lang|last|load-xquery-module|local-name(?:-from-QName)?|(?:lower|upper)-case|matches|max|minutes-from-(?:dateTime|duration|time)|min|months?-from-(?:date(?:Time)?|duration)|name(?:space-uri-?(?:for-prefix|from-QName)?)?|nilled|node-name|normalize-(?:space|unicode)|not|number|one-or-more|outermost|parse-(?:ietf-date|json)|path|position|(?:prefix-from-)?QName|random-number-generator|regex-group|remove|replace|resolve-(?:QName|uri)|reverse|root|round(?:-half-to-even)?|seconds-from-(?:dateTime|duration|time)|snapshot|sort|starts-with|static-base-uri|stream-available|string-?(?:join|length|to-codepoints)?|subsequence|substring-?(?:after|before)?|sum|system-property|tail|timezone-from-(?:date(?:Time)?|time)|tokenize|trace|trans(?:form|late)|true|type-available|unordered|unparsed-(?:entity|text)?-?(?:public-id|uri|available|lines)?|uri-collection|xml-to-json|years?-from-(?:date(?:Time)?|duration)|zero-or-one)\b/},{begin:/\blocal:/,end:/\(/,excludeEnd:!0},{begin:/\bzip:/,end:/(?:zip-file|(?:xml|html|text|binary)-entry| (?:update-)?entries)\b/},{begin:/\b(?:util|db|functx|app|xdmp|xmldb):/,end:/\(/,excludeEnd:!0}]},{className:"string",variants:[{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]},{className:"number",begin:/(\b0[0-7_]+)|(\b0x[0-9a-fA-F_]+)|(\b[1-9][0-9_]*(\.[0-9_]+)?)|[0_]\b/,relevance:0},{className:"comment",begin:/\(:/,end:/:\)/,relevance:10,contains:[{className:"doctag",begin:/@\w+/}]},{className:"meta",begin:/%[\w\-:]+/},{className:"title",begin:/\bxquery version "[13]\.[01]"\s?(?:encoding ".+")?/,end:/;/},{beginKeywords:"element attribute comment document processing-instruction",end:/\{/,excludeEnd:!0},{begin:/<([\w._:-]+)(\s+\S*=('|").*('|"))?>/,end:/(\/[\w._:-]+>)/,subLanguage:"xml",contains:[{begin:/\{/,end:/\}/,subLanguage:"xquery"},"self"]}]}}},function(e,t){e.exports=function(e){const t={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},n=e.UNDERSCORE_TITLE_MODE,r={variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]},i="namespace class interface use extends function return abstract final public protected private static deprecated throw try catch Exception echo empty isset instanceof unset let var new const self require if else elseif switch case default do while loop for continue break likely unlikely __LINE__ __FILE__ __DIR__ __FUNCTION__ __CLASS__ __TRAIT__ __METHOD__ __NAMESPACE__ array boolean float double integer object resource string char long unsigned bool int uint ulong uchar true false null undefined";return{name:"Zephir",aliases:["zep"],keywords:i,contains:[e.C_LINE_COMMENT_MODE,e.COMMENT(/\/\*/,/\*\//,{contains:[{className:"doctag",begin:/@[A-Za-z]+/}]}),{className:"string",begin:/<<<['"]?\w+['"]?$/,end:/^\w+;/,contains:[e.BACKSLASH_ESCAPE]},{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"function fn",end:/[;{]/,excludeEnd:!0,illegal:/\$|\[|%/,contains:[n,{className:"params",begin:/\(/,end:/\)/,keywords:i,contains:["self",e.C_BLOCK_COMMENT_MODE,t,r]}]},{className:"class",beginKeywords:"class interface",end:/\{/,excludeEnd:!0,illegal:/[:($"]/,contains:[{beginKeywords:"extends implements"},n]},{beginKeywords:"namespace",end:/;/,illegal:/[.']/,contains:[n]},{beginKeywords:"use",end:/;/,contains:[n]},{begin:/=>/},t,r]}}},function(e,t,n){const r=n(1310),i=n(1311),o=n(1329),a=n(1330);function s(e,t,n,o,a){const s=[].slice.call(arguments,1),l=s.length,c="function"==typeof s[l-1];if(!c&&!r())throw new Error("Callback required as last argument");if(!c){if(l<1)throw new Error("Too few arguments provided");return 1===l?(n=t,t=o=void 0):2!==l||t.getContext||(o=n,n=t,t=void 0),new Promise((function(r,a){try{const a=i.create(n,o);r(e(a,t,o))}catch(e){a(e)}}))}if(l<2)throw new Error("Too few arguments provided");2===l?(a=n,n=t,t=o=void 0):3===l&&(t.getContext&&void 0===a?(a=o,o=void 0):(a=o,o=n,n=t,t=void 0));try{const r=i.create(n,o);a(null,e(r,t,o))}catch(e){a(e)}}t.create=i.create,t.toCanvas=s.bind(null,o.render),t.toDataURL=s.bind(null,o.renderToDataURL),t.toString=s.bind(null,(function(e,t,n){return a.render(e,n)}))},function(e,t){e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},function(e,t,n){const r=n(299),i=n(562),o=n(1312),a=n(1313),s=n(1314),l=n(1315),c=n(1316),u=n(749),d=n(1317),h=n(1320),p=n(1321),m=n(300),g=n(1322);function f(e,t,n){const r=e.size,i=p.getEncodedBits(t,n);let o,a;for(o=0;o<15;o++)a=1==(i>>o&1),o<6?e.set(o,8,a,!0):o<8?e.set(o+1,8,a,!0):e.set(r-15+o,8,a,!0),o<8?e.set(8,r-o-1,a,!0):o<9?e.set(8,15-o-1+1,a,!0):e.set(8,15-o-1,a,!0);e.set(r-8,8,1,!0)}function _(e,t,n){const i=new o;n.forEach((function(t){i.put(t.mode.bit,4),i.put(t.getLength(),m.getCharCountIndicator(t.mode,e)),t.write(i)}));const a=8*(r.getSymbolTotalCodewords(e)-u.getTotalCodewordsCount(e,t));for(i.getLengthInBits()+4<=a&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);const s=(a-i.getLengthInBits())/8;for(let e=0;e<s;e++)i.put(e%2?17:236,8);return function(e,t,n){const i=r.getSymbolTotalCodewords(t),o=u.getTotalCodewordsCount(t,n),a=i-o,s=u.getBlocksCount(t,n),l=i%s,c=s-l,h=Math.floor(i/s),p=Math.floor(a/s),m=p+1,g=h-p,f=new d(g);let _=0;const b=new Array(s),v=new Array(s);let y=0;const E=new Uint8Array(e.buffer);for(let e=0;e<s;e++){const t=e<c?p:m;b[e]=E.slice(_,_+t),v[e]=f.encode(b[e]),_+=t,y=Math.max(y,t)}const S=new Uint8Array(i);let w,T,C=0;for(w=0;w<y;w++)for(T=0;T<s;T++)w<b[T].length&&(S[C++]=b[T][w]);for(w=0;w<g;w++)for(T=0;T<s;T++)S[C++]=v[T][w];return S}(i,e,t)}function b(e,t,n,i){let o;if(Array.isArray(e))o=g.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let r=t;if(!r){const t=g.rawSplit(e);r=h.getBestVersionForData(t,n)}o=g.fromString(e,r||40)}}const u=h.getBestVersionForData(o,n);if(!u)throw new Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<u)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+u+".\n")}else t=u;const d=_(t,n,o),p=r.getSymbolSize(t),m=new a(p);return function(e,t){const n=e.size,r=l.getPositions(t);for(let t=0;t<r.length;t++){const i=r[t][0],o=r[t][1];for(let t=-1;t<=7;t++)if(!(i+t<=-1||n<=i+t))for(let r=-1;r<=7;r++)o+r<=-1||n<=o+r||(t>=0&&t<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===t||6===t)||t>=2&&t<=4&&r>=2&&r<=4?e.set(i+t,o+r,!0,!0):e.set(i+t,o+r,!1,!0))}}(m,t),function(e){const t=e.size;for(let n=8;n<t-8;n++){const t=n%2==0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}(m),function(e,t){const n=s.getPositions(t);for(let t=0;t<n.length;t++){const r=n[t][0],i=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)-2===t||2===t||-2===n||2===n||0===t&&0===n?e.set(r+t,i+n,!0,!0):e.set(r+t,i+n,!1,!0)}}(m,t),f(m,n,0),t>=7&&function(e,t){const n=e.size,r=h.getEncodedBits(t);let i,o,a;for(let t=0;t<18;t++)i=Math.floor(t/3),o=t%3+n-8-3,a=1==(r>>t&1),e.set(i,o,a,!0),e.set(o,i,a,!0)}(m,t),function(e,t){const n=e.size;let r=-1,i=n-1,o=7,a=0;for(let s=n-1;s>0;s-=2)for(6===s&&s--;;){for(let n=0;n<2;n++)if(!e.isReserved(i,s-n)){let r=!1;a<t.length&&(r=1==(t[a]>>>o&1)),e.set(i,s-n,r),o--,-1===o&&(a++,o=7)}if(i+=r,i<0||n<=i){i-=r,r=-r;break}}}(m,d),isNaN(i)&&(i=c.getBestMask(m,f.bind(null,m,n))),c.applyMask(i,m),f(m,n,i),{modules:m,version:t,errorCorrectionLevel:n,maskPattern:i,segments:o}}t.create=function(e,t){if(void 0===e||""===e)throw new Error("No input text");let n,o,a=i.M;return void 0!==t&&(a=i.from(t.errorCorrectionLevel,i.M),n=h.from(t.version),o=c.from(t.maskPattern),t.toSJISFunc&&r.setToSJISFunction(t.toSJISFunc)),b(e,n,a,o)}},function(e,t){function n(){this.buffer=[],this.length=0}n.prototype={get:function(e){const t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=n},function(e,t){function n(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}n.prototype.set=function(e,t,n,r){const i=e*this.size+t;this.data[i]=n,r&&(this.reservedBit[i]=!0)},n.prototype.get=function(e,t){return this.data[e*this.size+t]},n.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},n.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=n},function(e,t,n){const r=n(299).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];const t=Math.floor(e/7)+2,n=r(e),i=145===n?26:2*Math.ceil((n-13)/(2*t-2)),o=[n-7];for(let e=1;e<t-1;e++)o[e]=o[e-1]-i;return o.push(6),o.reverse()},t.getPositions=function(e){const n=[],r=t.getRowColCoords(e),i=r.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)0===e&&0===t||0===e&&t===i-1||e===i-1&&0===t||n.push([r[e],r[t]]);return n}},function(e,t,n){const r=n(299).getSymbolSize;t.getPositions=function(e){const t=r(e);return[[0,0],[t-7,0],[0,t-7]]}},function(e,t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const n=3,r=3,i=40,o=10;function a(e,n,r){switch(e){case t.Patterns.PATTERN000:return(n+r)%2==0;case t.Patterns.PATTERN001:return n%2==0;case t.Patterns.PATTERN010:return r%3==0;case t.Patterns.PATTERN011:return(n+r)%3==0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case t.Patterns.PATTERN101:return n*r%2+n*r%3==0;case t.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case t.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){const t=e.size;let r=0,i=0,o=0,a=null,s=null;for(let l=0;l<t;l++){i=o=0,a=s=null;for(let c=0;c<t;c++){let t=e.get(l,c);t===a?i++:(i>=5&&(r+=n+(i-5)),a=t,i=1),t=e.get(c,l),t===s?o++:(o>=5&&(r+=n+(o-5)),s=t,o=1)}i>=5&&(r+=n+(i-5)),o>=5&&(r+=n+(o-5))}return r},t.getPenaltyN2=function(e){const t=e.size;let n=0;for(let r=0;r<t-1;r++)for(let i=0;i<t-1;i++){const t=e.get(r,i)+e.get(r,i+1)+e.get(r+1,i)+e.get(r+1,i+1);4!==t&&0!==t||n++}return n*r},t.getPenaltyN3=function(e){const t=e.size;let n=0,r=0,o=0;for(let i=0;i<t;i++){r=o=0;for(let a=0;a<t;a++)r=r<<1&2047|e.get(i,a),a>=10&&(1488===r||93===r)&&n++,o=o<<1&2047|e.get(a,i),a>=10&&(1488===o||93===o)&&n++}return n*i},t.getPenaltyN4=function(e){let t=0;const n=e.data.length;for(let r=0;r<n;r++)t+=e.data[r];return Math.abs(Math.ceil(100*t/n/5)-10)*o},t.applyMask=function(e,t){const n=t.size;for(let r=0;r<n;r++)for(let i=0;i<n;i++)t.isReserved(i,r)||t.xor(i,r,a(e,i,r))},t.getBestMask=function(e,n){const r=Object.keys(t.Patterns).length;let i=0,o=1/0;for(let a=0;a<r;a++){n(a),t.applyMask(a,e);const r=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(a,e),r<o&&(o=r,i=a)}return i}},function(e,t,n){const r=n(1318);function i(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}i.prototype.initialize=function(e){this.degree=e,this.genPoly=r.generateECPolynomial(this.degree)},i.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const n=r.mod(t,this.genPoly),i=this.degree-n.length;if(i>0){const e=new Uint8Array(this.degree);return e.set(n,i),e}return n},e.exports=i},function(e,t,n){const r=n(1319);t.mul=function(e,t){const n=new Uint8Array(e.length+t.length-1);for(let i=0;i<e.length;i++)for(let o=0;o<t.length;o++)n[i+o]^=r.mul(e[i],t[o]);return n},t.mod=function(e,t){let n=new Uint8Array(e);for(;n.length-t.length>=0;){const e=n[0];for(let i=0;i<t.length;i++)n[i]^=r.mul(t[i],e);let i=0;for(;i<n.length&&0===n[i];)i++;n=n.slice(i)}return n},t.generateECPolynomial=function(e){let n=new Uint8Array([1]);for(let i=0;i<e;i++)n=t.mul(n,new Uint8Array([1,r.exp(i)]));return n}},function(e,t){const n=new Uint8Array(512),r=new Uint8Array(256);!function(){let e=1;for(let t=0;t<255;t++)n[t]=e,r[e]=t,e<<=1,256&e&&(e^=285);for(let e=255;e<512;e++)n[e]=n[e-255]}(),t.log=function(e){if(e<1)throw new Error("log("+e+")");return r[e]},t.exp=function(e){return n[e]},t.mul=function(e,t){return 0===e||0===t?0:n[r[e]+r[t]]}},function(e,t,n){const r=n(299),i=n(749),o=n(562),a=n(300),s=n(750),l=r.getBCHDigit(7973);function c(e,t){return a.getCharCountIndicator(e,t)+4}function u(e,t){let n=0;return e.forEach((function(e){const r=c(e.mode,t);n+=r+e.getBitsLength()})),n}t.from=function(e,t){return s.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,n){if(!s.isValid(e))throw new Error("Invalid QR Code version");void 0===n&&(n=a.BYTE);const o=8*(r.getSymbolTotalCodewords(e)-i.getTotalCodewordsCount(e,t));if(n===a.MIXED)return o;const l=o-c(n,e);switch(n){case a.NUMERIC:return Math.floor(l/10*3);case a.ALPHANUMERIC:return Math.floor(l/11*2);case a.KANJI:return Math.floor(l/13);case a.BYTE:default:return Math.floor(l/8)}},t.getBestVersionForData=function(e,n){let r;const i=o.from(n,o.M);if(Array.isArray(e)){if(e.length>1)return function(e,n){for(let r=1;r<=40;r++)if(u(e,r)<=t.getCapacity(r,n,a.MIXED))return r}(e,i);if(0===e.length)return 1;r=e[0]}else r=e;return function(e,n,r){for(let i=1;i<=40;i++)if(n<=t.getCapacity(i,r,e))return i}(r.mode,r.getLength(),i)},t.getEncodedBits=function(e){if(!s.isValid(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;r.getBCHDigit(t)-l>=0;)t^=7973<<r.getBCHDigit(t)-l;return e<<12|t}},function(e,t,n){const r=n(299),i=r.getBCHDigit(1335);t.getEncodedBits=function(e,t){const n=e.bit<<3|t;let o=n<<10;for(;r.getBCHDigit(o)-i>=0;)o^=1335<<r.getBCHDigit(o)-i;return 21522^(n<<10|o)}},function(e,t,n){const r=n(300),i=n(1323),o=n(1324),a=n(1325),s=n(1327),l=n(751),c=n(299),u=n(1328);function d(e){return unescape(encodeURIComponent(e)).length}function h(e,t,n){const r=[];let i;for(;null!==(i=e.exec(n));)r.push({data:i[0],index:i.index,mode:t,length:i[0].length});return r}function p(e){const t=h(l.NUMERIC,r.NUMERIC,e),n=h(l.ALPHANUMERIC,r.ALPHANUMERIC,e);let i,o;c.isKanjiModeEnabled()?(i=h(l.BYTE,r.BYTE,e),o=h(l.KANJI,r.KANJI,e)):(i=h(l.BYTE_KANJI,r.BYTE,e),o=[]);return t.concat(n,i,o).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function m(e,t){switch(t){case r.NUMERIC:return i.getBitsLength(e);case r.ALPHANUMERIC:return o.getBitsLength(e);case r.KANJI:return s.getBitsLength(e);case r.BYTE:return a.getBitsLength(e)}}function g(e,t){let n;const l=r.getBestModeForData(e);if(n=r.from(t,l),n!==r.BYTE&&n.bit<l.bit)throw new Error('"'+e+'" cannot be encoded with mode '+r.toString(n)+".\n Suggested mode is: "+r.toString(l));switch(n!==r.KANJI||c.isKanjiModeEnabled()||(n=r.BYTE),n){case r.NUMERIC:return new i(e);case r.ALPHANUMERIC:return new o(e);case r.KANJI:return new s(e);case r.BYTE:return new a(e)}}t.fromArray=function(e){return e.reduce((function(e,t){return"string"==typeof t?e.push(g(t,null)):t.data&&e.push(g(t.data,t.mode)),e}),[])},t.fromString=function(e,n){const i=function(e){const t=[];for(let n=0;n<e.length;n++){const i=e[n];switch(i.mode){case r.NUMERIC:t.push([i,{data:i.data,mode:r.ALPHANUMERIC,length:i.length},{data:i.data,mode:r.BYTE,length:i.length}]);break;case r.ALPHANUMERIC:t.push([i,{data:i.data,mode:r.BYTE,length:i.length}]);break;case r.KANJI:t.push([i,{data:i.data,mode:r.BYTE,length:d(i.data)}]);break;case r.BYTE:t.push([{data:i.data,mode:r.BYTE,length:d(i.data)}])}}return t}(p(e,c.isKanjiModeEnabled())),o=function(e,t){const n={},i={start:{}};let o=["start"];for(let a=0;a<e.length;a++){const s=e[a],l=[];for(let e=0;e<s.length;e++){const c=s[e],u=""+a+e;l.push(u),n[u]={node:c,lastCount:0},i[u]={};for(let e=0;e<o.length;e++){const a=o[e];n[a]&&n[a].node.mode===c.mode?(i[a][u]=m(n[a].lastCount+c.length,c.mode)-m(n[a].lastCount,c.mode),n[a].lastCount+=c.length):(n[a]&&(n[a].lastCount=c.length),i[a][u]=m(c.length,c.mode)+4+r.getCharCountIndicator(c.mode,t))}}o=l}for(let e=0;e<o.length;e++)i[o[e]].end=0;return{map:i,table:n}}(i,n),a=u.find_path(o.map,"start","end"),s=[];for(let e=1;e<a.length-1;e++)s.push(o.table[a[e]].node);return t.fromArray(function(e){return e.reduce((function(e,t){const n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[])}(s))},t.rawSplit=function(e){return t.fromArray(p(e,c.isKanjiModeEnabled()))}},function(e,t,n){const r=n(300);function i(e){this.mode=r.NUMERIC,this.data=e.toString()}i.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);const i=this.data.length-t;i>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,3*i+1))},e.exports=i},function(e,t,n){const r=n(300),i=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function o(e){this.mode=r.ALPHANUMERIC,this.data=e}o.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=45*i.indexOf(this.data[t]);n+=i.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(i.indexOf(this.data[t]),6)},e.exports=o},function(e,t,n){const r=n(1326),i=n(300);function o(e){this.mode=i.BYTE,"string"==typeof e&&(e=r(e)),this.data=new Uint8Array(e)}o.getBitsLength=function(e){return 8*e},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},e.exports=o},function(e,t,n){"use strict";e.exports=function(e){for(var t=[],n=e.length,r=0;r<n;r++){var i=e.charCodeAt(r);if(i>=55296&&i<=56319&&n>r+1){var o=e.charCodeAt(r+1);o>=56320&&o<=57343&&(i=1024*(i-55296)+o-56320+65536,r+=1)}i<128?t.push(i):i<2048?(t.push(i>>6|192),t.push(63&i|128)):i<55296||i>=57344&&i<65536?(t.push(i>>12|224),t.push(i>>6&63|128),t.push(63&i|128)):i>=65536&&i<=1114111?(t.push(i>>18|240),t.push(i>>12&63|128),t.push(i>>6&63|128),t.push(63&i|128)):t.push(239,191,189)}return new Uint8Array(t).buffer}},function(e,t,n){const r=n(300),i=n(299);function o(e){this.mode=r.KANJI,this.data=e}o.getBitsLength=function(e){return 13*e},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=i.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),e.put(n,13)}},e.exports=o},function(e,t,n){"use strict";var r={single_source_shortest_paths:function(e,t,n){var i={},o={};o[t]=0;var a,s,l,c,u,d,h,p=r.PriorityQueue.make();for(p.push(t,0);!p.empty();)for(l in s=(a=p.pop()).value,c=a.cost,u=e[s]||{})u.hasOwnProperty(l)&&(d=c+u[l],h=o[l],(void 0===o[l]||h>d)&&(o[l]=d,p.push(l,d),i[l]=s));if(void 0!==n&&void 0===o[n]){var m=["Could not find a path from ",t," to ",n,"."].join("");throw new Error(m)}return i},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,t,n){var i=r.single_source_shortest_paths(e,t,n);return r.extract_shortest_path_from_predecessor_list(i,n)},PriorityQueue:{make:function(e){var t,n=r.PriorityQueue,i={};for(t in e=e||{},n)n.hasOwnProperty(t)&&(i[t]=n[t]);return i.queue=[],i.sorter=e.sorter||n.default_sorter,i},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=r},function(e,t,n){const r=n(752);t.render=function(e,t,n){let i=n,o=t;void 0!==i||t&&t.getContext||(i=t,t=void 0),t||(o=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),i=r.getOptions(i);const a=r.getImageWidth(e.modules.size,i),s=o.getContext("2d"),l=s.createImageData(a,a);return r.qrToImageData(l.data,e,i),function(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=n,t.width=n,t.style.height=n+"px",t.style.width=n+"px"}(s,o,a),s.putImageData(l,0,0),o},t.renderToDataURL=function(e,n,r){let i=r;void 0!==i||n&&n.getContext||(i=n,n=void 0),i||(i={});const o=t.render(e,n,i),a=i.type||"image/png",s=i.rendererOpts||{};return o.toDataURL(a,s.quality)}},function(e,t,n){const r=n(752);function i(e,t){const n=e.a/255,r=t+'="'+e.hex+'"';return n<1?r+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function o(e,t,n){let r=e+t;return void 0!==n&&(r+=" "+n),r}t.render=function(e,t,n){const a=r.getOptions(t),s=e.modules.size,l=e.modules.data,c=s+2*a.margin,u=a.color.light.a?"<path "+i(a.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",d="<path "+i(a.color.dark,"stroke")+' d="'+function(e,t,n){let r="",i=0,a=!1,s=0;for(let l=0;l<e.length;l++){const c=Math.floor(l%t),u=Math.floor(l/t);c||a||(a=!0),e[l]?(s++,l>0&&c>0&&e[l-1]||(r+=a?o("M",c+n,.5+u+n):o("m",i,0),i=0,a=!1),c+1<t&&e[l+1]||(r+=o("h",s),s=0)):i++}return r}(l,s,a.margin)+'"/>',h='viewBox="0 0 '+c+" "+c+'"',p='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+h+' shape-rendering="crispEdges">'+u+d+"</svg>\n";return"function"==typeof n&&n(null,p),p}},function(e,t){e.exports="img/social/facebook.c272141.png"},function(e,t){e.exports="img/social/twitter-2.ede880b.png"},function(e,t){e.exports="img/social/linkedin.7f6ba82.png"},function(e,t){e.exports="img/social/reddit.95349c0.png"},function(e,t){e.exports="img/social/email-1.05522c5.png"},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(120),i=n.n(r);class o extends i.a.Component{render(){return i.a.createElement("div",{className:"mx_Tooltip mx_Tooltip_visible",style:{display:"block"}},this.props.message)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o);class s extends a.a.Component{constructor(e){super(e),i()(this,"toggleVisible",(e=>{this.state.visible||(e.preventDefault(),e.stopPropagation()),this.setState({visible:!this.state.visible})})),this.state={visible:!1}}render(){const e=this.props.reason?a.a.createElement("span",{className:"mx_EventTile_spoiler_reason"},"("+this.props.reason+")"):null;return a.a.createElement("span",{className:"mx_EventTile_spoiler"+(this.state.visible?" visible":""),onClick:this.toggleVisible},e," ",a.a.createElement("span",{className:"mx_EventTile_spoiler_content",dangerouslySetInnerHTML:{__html:this.props.contentHtml}}))}}},function(e,t){var n=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},r=-1;n.Diff=function(e,t){return[e,t]},n.prototype.diff_main=function(e,t,r,i){void 0===i&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var o=i;if(null==e||null==t)throw new Error("Null input. (diff_main)");if(e==t)return e?[new n.Diff(0,e)]:[];void 0===r&&(r=!0);var a=r,s=this.diff_commonPrefix(e,t),l=e.substring(0,s);e=e.substring(s),t=t.substring(s),s=this.diff_commonSuffix(e,t);var c=e.substring(e.length-s);e=e.substring(0,e.length-s),t=t.substring(0,t.length-s);var u=this.diff_compute_(e,t,a,o);return l&&u.unshift(new n.Diff(0,l)),c&&u.push(new n.Diff(0,c)),this.diff_cleanupMerge(u),u},n.prototype.diff_compute_=function(e,t,i,o){var a;if(!e)return[new n.Diff(1,t)];if(!t)return[new n.Diff(r,e)];var s=e.length>t.length?e:t,l=e.length>t.length?t:e,c=s.indexOf(l);if(-1!=c)return a=[new n.Diff(1,s.substring(0,c)),new n.Diff(0,l),new n.Diff(1,s.substring(c+l.length))],e.length>t.length&&(a[0][0]=a[2][0]=r),a;if(1==l.length)return[new n.Diff(r,e),new n.Diff(1,t)];var u=this.diff_halfMatch_(e,t);if(u){var d=u[0],h=u[1],p=u[2],m=u[3],g=u[4],f=this.diff_main(d,p,i,o),_=this.diff_main(h,m,i,o);return f.concat([new n.Diff(0,g)],_)}return i&&e.length>100&&t.length>100?this.diff_lineMode_(e,t,o):this.diff_bisect_(e,t,o)},n.prototype.diff_lineMode_=function(e,t,i){var o=this.diff_linesToChars_(e,t);e=o.chars1,t=o.chars2;var a=o.lineArray,s=this.diff_main(e,t,!1,i);this.diff_charsToLines_(s,a),this.diff_cleanupSemantic(s),s.push(new n.Diff(0,""));for(var l=0,c=0,u=0,d="",h="";l<s.length;){switch(s[l][0]){case 1:u++,h+=s[l][1];break;case r:c++,d+=s[l][1];break;case 0:if(c>=1&&u>=1){s.splice(l-c-u,c+u),l=l-c-u;for(var p=this.diff_main(d,h,!1,i),m=p.length-1;m>=0;m--)s.splice(l,0,p[m]);l+=p.length}u=0,c=0,d="",h=""}l++}return s.pop(),s},n.prototype.diff_bisect_=function(e,t,i){for(var o=e.length,a=t.length,s=Math.ceil((o+a)/2),l=s,c=2*s,u=new Array(c),d=new Array(c),h=0;h<c;h++)u[h]=-1,d[h]=-1;u[l+1]=0,d[l+1]=0;for(var p=o-a,m=p%2!=0,g=0,f=0,_=0,b=0,v=0;v<s&&!((new Date).getTime()>i);v++){for(var y=-v+g;y<=v-f;y+=2){for(var E=l+y,S=(F=y==-v||y!=v&&u[E-1]<u[E+1]?u[E+1]:u[E-1]+1)-y;F<o&&S<a&&e.charAt(F)==t.charAt(S);)F++,S++;if(u[E]=F,F>o)f+=2;else if(S>a)g+=2;else if(m){if((C=l+p-y)>=0&&C<c&&-1!=d[C])if(F>=(T=o-d[C]))return this.diff_bisectSplit_(e,t,F,S,i)}}for(var w=-v+_;w<=v-b;w+=2){for(var T,C=l+w,x=(T=w==-v||w!=v&&d[C-1]<d[C+1]?d[C+1]:d[C-1]+1)-w;T<o&&x<a&&e.charAt(o-T-1)==t.charAt(a-x-1);)T++,x++;if(d[C]=T,T>o)b+=2;else if(x>a)_+=2;else if(!m){if((E=l+p-w)>=0&&E<c&&-1!=u[E]){var F;S=l+(F=u[E])-E;if(F>=(T=o-T))return this.diff_bisectSplit_(e,t,F,S,i)}}}}return[new n.Diff(r,e),new n.Diff(1,t)]},n.prototype.diff_bisectSplit_=function(e,t,n,r,i){var o=e.substring(0,n),a=t.substring(0,r),s=e.substring(n),l=t.substring(r),c=this.diff_main(o,a,!1,i),u=this.diff_main(s,l,!1,i);return c.concat(u)},n.prototype.diff_linesToChars_=function(e,t){var n=[],r={};function i(e){for(var t="",i=0,a=-1,s=n.length;a<e.length-1;){-1==(a=e.indexOf("\n",i))&&(a=e.length-1);var l=e.substring(i,a+1);(r.hasOwnProperty?r.hasOwnProperty(l):void 0!==r[l])?t+=String.fromCharCode(r[l]):(s==o&&(l=e.substring(i),a=e.length),t+=String.fromCharCode(s),r[l]=s,n[s++]=l),i=a+1}return t}n[0]="";var o=4e4,a=i(e);return o=65535,{chars1:a,chars2:i(t),lineArray:n}},n.prototype.diff_charsToLines_=function(e,t){for(var n=0;n<e.length;n++){for(var r=e[n][1],i=[],o=0;o<r.length;o++)i[o]=t[r.charCodeAt(o)];e[n][1]=i.join("")}},n.prototype.diff_commonPrefix=function(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(o,i)==t.substring(o,i)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i},n.prototype.diff_commonSuffix=function(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(e.length-i,e.length-o)==t.substring(t.length-i,t.length-o)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i},n.prototype.diff_commonOverlap_=function(e,t){var n=e.length,r=t.length;if(0==n||0==r)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));var i=Math.min(n,r);if(e==t)return i;for(var o=0,a=1;;){var s=e.substring(i-a),l=t.indexOf(s);if(-1==l)return o;a+=l,0!=l&&e.substring(i-a)!=t.substring(0,a)||(o=a,a++)}},n.prototype.diff_halfMatch_=function(e,t){if(this.Diff_Timeout<=0)return null;var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length<n.length)return null;var i=this;function o(e,t,n){for(var r,o,a,s,l=e.substring(n,n+Math.floor(e.length/4)),c=-1,u="";-1!=(c=t.indexOf(l,c+1));){var d=i.diff_commonPrefix(e.substring(n),t.substring(c)),h=i.diff_commonSuffix(e.substring(0,n),t.substring(0,c));u.length<h+d&&(u=t.substring(c-h,c)+t.substring(c,c+d),r=e.substring(0,n-h),o=e.substring(n+d),a=t.substring(0,c-h),s=t.substring(c+d))}return 2*u.length>=e.length?[r,o,a,s,u]:null}var a,s,l,c,u,d=o(n,r,Math.ceil(n.length/4)),h=o(n,r,Math.ceil(n.length/2));return d||h?(a=h?d&&d[4].length>h[4].length?d:h:d,e.length>t.length?(s=a[0],l=a[1],c=a[2],u=a[3]):(c=a[0],u=a[1],s=a[2],l=a[3]),[s,l,c,u,a[4]]):null},n.prototype.diff_cleanupSemantic=function(e){for(var t=!1,i=[],o=0,a=null,s=0,l=0,c=0,u=0,d=0;s<e.length;)0==e[s][0]?(i[o++]=s,l=u,c=d,u=0,d=0,a=e[s][1]):(1==e[s][0]?u+=e[s][1].length:d+=e[s][1].length,a&&a.length<=Math.max(l,c)&&a.length<=Math.max(u,d)&&(e.splice(i[o-1],0,new n.Diff(r,a)),e[i[o-1]+1][0]=1,o--,s=--o>0?i[o-1]:-1,l=0,c=0,u=0,d=0,a=null,t=!0)),s++;for(t&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),s=1;s<e.length;){if(e[s-1][0]==r&&1==e[s][0]){var h=e[s-1][1],p=e[s][1],m=this.diff_commonOverlap_(h,p),g=this.diff_commonOverlap_(p,h);m>=g?(m>=h.length/2||m>=p.length/2)&&(e.splice(s,0,new n.Diff(0,p.substring(0,m))),e[s-1][1]=h.substring(0,h.length-m),e[s+1][1]=p.substring(m),s++):(g>=h.length/2||g>=p.length/2)&&(e.splice(s,0,new n.Diff(0,h.substring(0,g))),e[s-1][0]=1,e[s-1][1]=p.substring(0,p.length-g),e[s+1][0]=r,e[s+1][1]=h.substring(g),s++),s++}s++}},n.prototype.diff_cleanupSemanticLossless=function(e){function t(e,t){if(!e||!t)return 6;var r=e.charAt(e.length-1),i=t.charAt(0),o=r.match(n.nonAlphaNumericRegex_),a=i.match(n.nonAlphaNumericRegex_),s=o&&r.match(n.whitespaceRegex_),l=a&&i.match(n.whitespaceRegex_),c=s&&r.match(n.linebreakRegex_),u=l&&i.match(n.linebreakRegex_),d=c&&e.match(n.blanklineEndRegex_),h=u&&t.match(n.blanklineStartRegex_);return d||h?5:c||u?4:o&&!s&&l?3:s||l?2:o||a?1:0}for(var r=1;r<e.length-1;){if(0==e[r-1][0]&&0==e[r+1][0]){var i=e[r-1][1],o=e[r][1],a=e[r+1][1],s=this.diff_commonSuffix(i,o);if(s){var l=o.substring(o.length-s);i=i.substring(0,i.length-s),o=l+o.substring(0,o.length-s),a=l+a}for(var c=i,u=o,d=a,h=t(i,o)+t(o,a);o.charAt(0)===a.charAt(0);){i+=o.charAt(0),o=o.substring(1)+a.charAt(0),a=a.substring(1);var p=t(i,o)+t(o,a);p>=h&&(h=p,c=i,u=o,d=a)}e[r-1][1]!=c&&(c?e[r-1][1]=c:(e.splice(r-1,1),r--),e[r][1]=u,d?e[r+1][1]=d:(e.splice(r+1,1),r--))}r++}},n.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,n.whitespaceRegex_=/\s/,n.linebreakRegex_=/[\r\n]/,n.blanklineEndRegex_=/\n\r?\n$/,n.blanklineStartRegex_=/^\r?\n\r?\n/,n.prototype.diff_cleanupEfficiency=function(e){for(var t=!1,i=[],o=0,a=null,s=0,l=!1,c=!1,u=!1,d=!1;s<e.length;)0==e[s][0]?(e[s][1].length<this.Diff_EditCost&&(u||d)?(i[o++]=s,l=u,c=d,a=e[s][1]):(o=0,a=null),u=d=!1):(e[s][0]==r?d=!0:u=!0,a&&(l&&c&&u&&d||a.length<this.Diff_EditCost/2&&l+c+u+d==3)&&(e.splice(i[o-1],0,new n.Diff(r,a)),e[i[o-1]+1][0]=1,o--,a=null,l&&c?(u=d=!0,o=0):(s=--o>0?i[o-1]:-1,u=d=!1),t=!0)),s++;t&&this.diff_cleanupMerge(e)},n.prototype.diff_cleanupMerge=function(e){e.push(new n.Diff(0,""));for(var t,i=0,o=0,a=0,s="",l="";i<e.length;)switch(e[i][0]){case 1:a++,l+=e[i][1],i++;break;case r:o++,s+=e[i][1],i++;break;case 0:o+a>1?(0!==o&&0!==a&&(0!==(t=this.diff_commonPrefix(l,s))&&(i-o-a>0&&0==e[i-o-a-1][0]?e[i-o-a-1][1]+=l.substring(0,t):(e.splice(0,0,new n.Diff(0,l.substring(0,t))),i++),l=l.substring(t),s=s.substring(t)),0!==(t=this.diff_commonSuffix(l,s))&&(e[i][1]=l.substring(l.length-t)+e[i][1],l=l.substring(0,l.length-t),s=s.substring(0,s.length-t))),i-=o+a,e.splice(i,o+a),s.length&&(e.splice(i,0,new n.Diff(r,s)),i++),l.length&&(e.splice(i,0,new n.Diff(1,l)),i++),i++):0!==i&&0==e[i-1][0]?(e[i-1][1]+=e[i][1],e.splice(i,1)):i++,a=0,o=0,s="",l=""}""===e[e.length-1][1]&&e.pop();var c=!1;for(i=1;i<e.length-1;)0==e[i-1][0]&&0==e[i+1][0]&&(e[i][1].substring(e[i][1].length-e[i-1][1].length)==e[i-1][1]?(e[i][1]=e[i-1][1]+e[i][1].substring(0,e[i][1].length-e[i-1][1].length),e[i+1][1]=e[i-1][1]+e[i+1][1],e.splice(i-1,1),c=!0):e[i][1].substring(0,e[i+1][1].length)==e[i+1][1]&&(e[i-1][1]+=e[i+1][1],e[i][1]=e[i][1].substring(e[i+1][1].length)+e[i+1][1],e.splice(i+1,1),c=!0)),i++;c&&this.diff_cleanupMerge(e)},n.prototype.diff_xIndex=function(e,t){var n,i=0,o=0,a=0,s=0;for(n=0;n<e.length&&(1!==e[n][0]&&(i+=e[n][1].length),e[n][0]!==r&&(o+=e[n][1].length),!(i>t));n++)a=i,s=o;return e.length!=n&&e[n][0]===r?s:s+(t-a)},n.prototype.diff_prettyHtml=function(e){for(var t=[],n=/&/g,i=/</g,o=/>/g,a=/\n/g,s=0;s<e.length;s++){var l=e[s][0],c=e[s][1].replace(n,"&").replace(i,"<").replace(o,">").replace(a,"¶<br>");switch(l){case 1:t[s]='<ins style="background:#e6ffe6;">'+c+"</ins>";break;case r:t[s]='<del style="background:#ffe6e6;">'+c+"</del>";break;case 0:t[s]="<span>"+c+"</span>"}}return t.join("")},n.prototype.diff_text1=function(e){for(var t=[],n=0;n<e.length;n++)1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")},n.prototype.diff_text2=function(e){for(var t=[],n=0;n<e.length;n++)e[n][0]!==r&&(t[n]=e[n][1]);return t.join("")},n.prototype.diff_levenshtein=function(e){for(var t=0,n=0,i=0,o=0;o<e.length;o++){var a=e[o][0],s=e[o][1];switch(a){case 1:n+=s.length;break;case r:i+=s.length;break;case 0:t+=Math.max(n,i),n=0,i=0}}return t+=Math.max(n,i)},n.prototype.diff_toDelta=function(e){for(var t=[],n=0;n<e.length;n++)switch(e[n][0]){case 1:t[n]="+"+encodeURI(e[n][1]);break;case r:t[n]="-"+e[n][1].length;break;case 0:t[n]="="+e[n][1].length}return t.join("\t").replace(/%20/g," ")},n.prototype.diff_fromDelta=function(e,t){for(var i=[],o=0,a=0,s=t.split(/\t/g),l=0;l<s.length;l++){var c=s[l].substring(1);switch(s[l].charAt(0)){case"+":try{i[o++]=new n.Diff(1,decodeURI(c))}catch(e){throw new Error("Illegal escape in diff_fromDelta: "+c)}break;case"-":case"=":var u=parseInt(c,10);if(isNaN(u)||u<0)throw new Error("Invalid number in diff_fromDelta: "+c);var d=e.substring(a,a+=u);"="==s[l].charAt(0)?i[o++]=new n.Diff(0,d):i[o++]=new n.Diff(r,d);break;default:if(s[l])throw new Error("Invalid diff operation in diff_fromDelta: "+s[l])}}if(a!=e.length)throw new Error("Delta length ("+a+") does not equal source text length ("+e.length+").");return i},n.prototype.match_main=function(e,t,n){if(null==e||null==t||null==n)throw new Error("Null input. (match_main)");return n=Math.max(0,Math.min(n,e.length)),e==t?0:e.length?e.substring(n,n+t.length)==t?n:this.match_bitap_(e,t,n):-1},n.prototype.match_bitap_=function(e,t,n){if(t.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var r=this.match_alphabet_(t),i=this;function o(e,r){var o=e/t.length,a=Math.abs(n-r);return i.Match_Distance?o+a/i.Match_Distance:a?1:o}var a=this.Match_Threshold,s=e.indexOf(t,n);-1!=s&&(a=Math.min(o(0,s),a),-1!=(s=e.lastIndexOf(t,n+t.length))&&(a=Math.min(o(0,s),a)));var l,c,u=1<<t.length-1;s=-1;for(var d,h=t.length+e.length,p=0;p<t.length;p++){for(l=0,c=h;l<c;)o(p,n+c)<=a?l=c:h=c,c=Math.floor((h-l)/2+l);h=c;var m=Math.max(1,n-c+1),g=Math.min(n+c,e.length)+t.length,f=Array(g+2);f[g+1]=(1<<p)-1;for(var _=g;_>=m;_--){var b=r[e.charAt(_-1)];if(f[_]=0===p?(f[_+1]<<1|1)&b:(f[_+1]<<1|1)&b|(d[_+1]|d[_])<<1|1|d[_+1],f[_]&u){var v=o(p,_-1);if(v<=a){if(a=v,!((s=_-1)>n))break;m=Math.max(1,2*n-s)}}}if(o(p+1,n)>a)break;d=f}return s},n.prototype.match_alphabet_=function(e){for(var t={},n=0;n<e.length;n++)t[e.charAt(n)]=0;for(n=0;n<e.length;n++)t[e.charAt(n)]|=1<<e.length-n-1;return t},n.prototype.patch_addContext_=function(e,t){if(0!=t.length){if(null===e.start2)throw Error("patch not initialized");for(var r=t.substring(e.start2,e.start2+e.length1),i=0;t.indexOf(r)!=t.lastIndexOf(r)&&r.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)i+=this.Patch_Margin,r=t.substring(e.start2-i,e.start2+e.length1+i);i+=this.Patch_Margin;var o=t.substring(e.start2-i,e.start2);o&&e.diffs.unshift(new n.Diff(0,o));var a=t.substring(e.start2+e.length1,e.start2+e.length1+i);a&&e.diffs.push(new n.Diff(0,a)),e.start1-=o.length,e.start2-=o.length,e.length1+=o.length+a.length,e.length2+=o.length+a.length}},n.prototype.patch_make=function(e,t,i){var o,a;if("string"==typeof e&&"string"==typeof t&&void 0===i)o=e,(a=this.diff_main(o,t,!0)).length>2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(e&&"object"==typeof e&&void 0===t&&void 0===i)a=e,o=this.diff_text1(a);else if("string"==typeof e&&t&&"object"==typeof t&&void 0===i)o=e,a=t;else{if("string"!=typeof e||"string"!=typeof t||!i||"object"!=typeof i)throw new Error("Unknown call format to patch_make.");o=e,a=i}if(0===a.length)return[];for(var s=[],l=new n.patch_obj,c=0,u=0,d=0,h=o,p=o,m=0;m<a.length;m++){var g=a[m][0],f=a[m][1];switch(c||0===g||(l.start1=u,l.start2=d),g){case 1:l.diffs[c++]=a[m],l.length2+=f.length,p=p.substring(0,d)+f+p.substring(d);break;case r:l.length1+=f.length,l.diffs[c++]=a[m],p=p.substring(0,d)+p.substring(d+f.length);break;case 0:f.length<=2*this.Patch_Margin&&c&&a.length!=m+1?(l.diffs[c++]=a[m],l.length1+=f.length,l.length2+=f.length):f.length>=2*this.Patch_Margin&&c&&(this.patch_addContext_(l,h),s.push(l),l=new n.patch_obj,c=0,h=p,u=d)}1!==g&&(u+=f.length),g!==r&&(d+=f.length)}return c&&(this.patch_addContext_(l,h),s.push(l)),s},n.prototype.patch_deepCopy=function(e){for(var t=[],r=0;r<e.length;r++){var i=e[r],o=new n.patch_obj;o.diffs=[];for(var a=0;a<i.diffs.length;a++)o.diffs[a]=new n.Diff(i.diffs[a][0],i.diffs[a][1]);o.start1=i.start1,o.start2=i.start2,o.length1=i.length1,o.length2=i.length2,t[r]=o}return t},n.prototype.patch_apply=function(e,t){if(0==e.length)return[t,[]];e=this.patch_deepCopy(e);var n=this.patch_addPadding(e);t=n+t+n,this.patch_splitMax(e);for(var i=0,o=[],a=0;a<e.length;a++){var s,l,c=e[a].start2+i,u=this.diff_text1(e[a].diffs),d=-1;if(u.length>this.Match_MaxBits?-1!=(s=this.match_main(t,u.substring(0,this.Match_MaxBits),c))&&(-1==(d=this.match_main(t,u.substring(u.length-this.Match_MaxBits),c+u.length-this.Match_MaxBits))||s>=d)&&(s=-1):s=this.match_main(t,u,c),-1==s)o[a]=!1,i-=e[a].length2-e[a].length1;else if(o[a]=!0,i=s-c,u==(l=-1==d?t.substring(s,s+u.length):t.substring(s,d+this.Match_MaxBits)))t=t.substring(0,s)+this.diff_text2(e[a].diffs)+t.substring(s+u.length);else{var h=this.diff_main(u,l,!1);if(u.length>this.Match_MaxBits&&this.diff_levenshtein(h)/u.length>this.Patch_DeleteThreshold)o[a]=!1;else{this.diff_cleanupSemanticLossless(h);for(var p,m=0,g=0;g<e[a].diffs.length;g++){var f=e[a].diffs[g];0!==f[0]&&(p=this.diff_xIndex(h,m)),1===f[0]?t=t.substring(0,s+p)+f[1]+t.substring(s+p):f[0]===r&&(t=t.substring(0,s+p)+t.substring(s+this.diff_xIndex(h,m+f[1].length))),f[0]!==r&&(m+=f[1].length)}}}}return[t=t.substring(n.length,t.length-n.length),o]},n.prototype.patch_addPadding=function(e){for(var t=this.Patch_Margin,r="",i=1;i<=t;i++)r+=String.fromCharCode(i);for(i=0;i<e.length;i++)e[i].start1+=t,e[i].start2+=t;var o=e[0],a=o.diffs;if(0==a.length||0!=a[0][0])a.unshift(new n.Diff(0,r)),o.start1-=t,o.start2-=t,o.length1+=t,o.length2+=t;else if(t>a[0][1].length){var s=t-a[0][1].length;a[0][1]=r.substring(a[0][1].length)+a[0][1],o.start1-=s,o.start2-=s,o.length1+=s,o.length2+=s}if(0==(a=(o=e[e.length-1]).diffs).length||0!=a[a.length-1][0])a.push(new n.Diff(0,r)),o.length1+=t,o.length2+=t;else if(t>a[a.length-1][1].length){s=t-a[a.length-1][1].length;a[a.length-1][1]+=r.substring(0,s),o.length1+=s,o.length2+=s}return r},n.prototype.patch_splitMax=function(e){for(var t=this.Match_MaxBits,i=0;i<e.length;i++)if(!(e[i].length1<=t)){var o=e[i];e.splice(i--,1);for(var a=o.start1,s=o.start2,l="";0!==o.diffs.length;){var c=new n.patch_obj,u=!0;for(c.start1=a-l.length,c.start2=s-l.length,""!==l&&(c.length1=c.length2=l.length,c.diffs.push(new n.Diff(0,l)));0!==o.diffs.length&&c.length1<t-this.Patch_Margin;){var d=o.diffs[0][0],h=o.diffs[0][1];1===d?(c.length2+=h.length,s+=h.length,c.diffs.push(o.diffs.shift()),u=!1):d===r&&1==c.diffs.length&&0==c.diffs[0][0]&&h.length>2*t?(c.length1+=h.length,a+=h.length,u=!1,c.diffs.push(new n.Diff(d,h)),o.diffs.shift()):(h=h.substring(0,t-c.length1-this.Patch_Margin),c.length1+=h.length,a+=h.length,0===d?(c.length2+=h.length,s+=h.length):u=!1,c.diffs.push(new n.Diff(d,h)),h==o.diffs[0][1]?o.diffs.shift():o.diffs[0][1]=o.diffs[0][1].substring(h.length))}l=(l=this.diff_text2(c.diffs)).substring(l.length-this.Patch_Margin);var p=this.diff_text1(o.diffs).substring(0,this.Patch_Margin);""!==p&&(c.length1+=p.length,c.length2+=p.length,0!==c.diffs.length&&0===c.diffs[c.diffs.length-1][0]?c.diffs[c.diffs.length-1][1]+=p:c.diffs.push(new n.Diff(0,p))),u||e.splice(++i,0,c)}}},n.prototype.patch_toText=function(e){for(var t=[],n=0;n<e.length;n++)t[n]=e[n];return t.join("")},n.prototype.patch_fromText=function(e){var t=[];if(!e)return t;for(var i=e.split("\n"),o=0,a=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;o<i.length;){var s=i[o].match(a);if(!s)throw new Error("Invalid patch string: "+i[o]);var l=new n.patch_obj;for(t.push(l),l.start1=parseInt(s[1],10),""===s[2]?(l.start1--,l.length1=1):"0"==s[2]?l.length1=0:(l.start1--,l.length1=parseInt(s[2],10)),l.start2=parseInt(s[3],10),""===s[4]?(l.start2--,l.length2=1):"0"==s[4]?l.length2=0:(l.start2--,l.length2=parseInt(s[4],10)),o++;o<i.length;){var c=i[o].charAt(0);try{var u=decodeURI(i[o].substring(1))}catch(e){throw new Error("Illegal escape in patch_fromText: "+u)}if("-"==c)l.diffs.push(new n.Diff(r,u));else if("+"==c)l.diffs.push(new n.Diff(1,u));else if(" "==c)l.diffs.push(new n.Diff(0,u));else{if("@"==c)break;if(""!==c)throw new Error('Invalid patch mode "'+c+'" in: '+u)}o++}}return t},n.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},n.patch_obj.prototype.toString=function(){for(var e,t=["@@ -"+(0===this.length1?this.start1+",0":1==this.length1?this.start1+1:this.start1+1+","+this.length1)+" +"+(0===this.length2?this.start2+",0":1==this.length2?this.start2+1:this.start2+1+","+this.length2)+" @@\n"],n=0;n<this.diffs.length;n++){switch(this.diffs[n][0]){case 1:e="+";break;case r:e="-";break;case 0:e=" "}t[n+1]=e+encodeURI(this.diffs[n][1])+"\n"}return t.join("").replace(/%20/g," ")},e.exports=n,e.exports.diff_match_patch=n,e.exports.DIFF_DELETE=r,e.exports.DIFF_INSERT=1,e.exports.DIFF_EQUAL=0},function(e,t,n){"use strict";function r(e,t,n){var i;return"#text"===e.nodeName?i=n.document.createTextNode(e.data):"#comment"===e.nodeName?i=n.document.createComment(e.data):(t?i=n.document.createElementNS("http://www.w3.org/2000/svg",e.nodeName):"svg"===e.nodeName.toLowerCase()?(i=n.document.createElementNS("http://www.w3.org/2000/svg","svg"),t=!0):i=n.document.createElement(e.nodeName),e.attributes&&Object.entries(e.attributes).forEach((function(e){var t=e[0],n=e[1];return i.setAttribute(t,n)})),e.childNodes&&e.childNodes.forEach((function(e){return i.appendChild(r(e,t,n))})),n.valueDiffing&&(e.value&&(i.value=e.value),e.checked&&(i.checked=e.checked),e.selected&&(i.selected=e.selected))),i}function i(e,t){for(t=t.slice();t.length>0;){if(!e.childNodes)return!1;var n=t.splice(0,1)[0];e=e.childNodes[n]}return e}function o(e,t,n){var o,a,s,l,c=i(e,t[n._const.route]),u={diff:t,node:c};if(n.preDiffApply(u))return!0;switch(t[n._const.action]){case n._const.addAttribute:if(!c||!c.setAttribute)return!1;c.setAttribute(t[n._const.name],t[n._const.value]);break;case n._const.modifyAttribute:if(!c||!c.setAttribute)return!1;c.setAttribute(t[n._const.name],t[n._const.newValue]),"INPUT"===c.nodeName&&"value"===t[n._const.name]&&(c.value=t[n._const.newValue]);break;case n._const.removeAttribute:if(!c||!c.removeAttribute)return!1;c.removeAttribute(t[n._const.name]);break;case n._const.modifyTextElement:if(!c||3!==c.nodeType)return!1;n.textDiff(c,c.data,t[n._const.oldValue],t[n._const.newValue]);break;case n._const.modifyValue:if(!c||void 0===c.value)return!1;c.value=t[n._const.newValue];break;case n._const.modifyComment:if(!c||void 0===c.data)return!1;n.textDiff(c,c.data,t[n._const.oldValue],t[n._const.newValue]);break;case n._const.modifyChecked:if(!c||void 0===c.checked)return!1;c.checked=t[n._const.newValue];break;case n._const.modifySelected:if(!c||void 0===c.selected)return!1;c.selected=t[n._const.newValue];break;case n._const.replaceElement:c.parentNode.replaceChild(r(t[n._const.newValue],"svg"===t[n._const.newValue].nodeName.toLowerCase(),n),c);break;case n._const.relocateGroup:Array.apply(void 0,new Array(t.groupLength)).map((function(){return c.removeChild(c.childNodes[t[n._const.from]])})).forEach((function(e,r){0===r&&(a=c.childNodes[t[n._const.to]]),c.insertBefore(e,a||null)}));break;case n._const.removeElement:c.parentNode.removeChild(c);break;case n._const.addElement:l=(s=t[n._const.route].slice()).splice(s.length-1,1)[0],(c=i(e,s)).insertBefore(r(t[n._const.element],"http://www.w3.org/2000/svg"===c.namespaceURI,n),c.childNodes[l]||null);break;case n._const.removeTextElement:if(!c||3!==c.nodeType)return!1;c.parentNode.removeChild(c);break;case n._const.addTextElement:if(l=(s=t[n._const.route].slice()).splice(s.length-1,1)[0],o=n.document.createTextNode(t[n._const.value]),!(c=i(e,s))||!c.childNodes)return!1;c.insertBefore(o,c.childNodes[l]||null);break;default:console.log("unknown action")}return u.newNode=o,n.postDiffApply(u),!0}function a(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}var s=function(e){var t=this;void 0===e&&(e={}),Object.entries(e).forEach((function(e){var n=e[0],r=e[1];return t[n]=r}))};function l(e){var t=[];return t.push(e.nodeName),"#text"!==e.nodeName&&"#comment"!==e.nodeName&&e.attributes&&(e.attributes.class&&t.push(e.nodeName+"."+e.attributes.class.replace(/ /g,".")),e.attributes.id&&t.push(e.nodeName+"#"+e.attributes.id)),t}function c(e){var t={},n={};return e.forEach((function(e){l(e).forEach((function(e){var r=e in t;r||e in n?r&&(delete t[e],n[e]=!0):t[e]=!0}))})),t}function u(e,t){var n=c(e),r=c(t),i={};return Object.keys(n).forEach((function(e){r[e]&&(i[e]=!0)})),i}function d(e){return delete e.outerDone,delete e.innerDone,delete e.valueDone,!e.childNodes||e.childNodes.every(d)}function h(e,t){if(!["nodeName","value","checked","selected","data"].every((function(n){return e[n]===t[n]})))return!1;if(Boolean(e.attributes)!==Boolean(t.attributes))return!1;if(Boolean(e.childNodes)!==Boolean(t.childNodes))return!1;if(e.attributes){var n=Object.keys(e.attributes),r=Object.keys(t.attributes);if(n.length!==r.length)return!1;if(!n.every((function(n){return e.attributes[n]===t.attributes[n]})))return!1}if(e.childNodes){if(e.childNodes.length!==t.childNodes.length)return!1;if(!e.childNodes.every((function(e,n){return h(e,t.childNodes[n])})))return!1}return!0}function p(e,t,n,r,i){if(!e||!t)return!1;if(e.nodeName!==t.nodeName)return!1;if("#text"===e.nodeName)return!!i||e.data===t.data;if(e.nodeName in n)return!0;if(e.attributes&&t.attributes){if(e.attributes.id){if(e.attributes.id!==t.attributes.id)return!1;if(e.nodeName+"#"+e.attributes.id in n)return!0}if(e.attributes.class&&e.attributes.class===t.attributes.class&&e.nodeName+"."+e.attributes.class.replace(/ /g,".")in n)return!0}if(r)return!0;var o=e.childNodes?e.childNodes.slice().reverse():[],a=t.childNodes?t.childNodes.slice().reverse():[];if(o.length!==a.length)return!1;if(i)return o.every((function(e,t){return e.nodeName===a[t].nodeName}));var s=u(o,a);return o.every((function(e,t){return p(e,a[t],s,!0,!0)}))}function m(e){return JSON.parse(JSON.stringify(e))}function g(e,t,n,r){var i=0,o=[],a=e.length,s=t.length,c=Array.apply(void 0,new Array(a+1)).map((function(){return[]})),d=u(e,t),h=a===s;h&&e.some((function(e,n){var r=l(e),i=l(t[n]);return r.length!==i.length?(h=!1,!0):(r.some((function(e,t){if(e!==i[t])return h=!1,!0})),!h||void 0)}));for(var m=0;m<a;m++)for(var g=e[m],f=0;f<s;f++){var _=t[f];n[m]||r[f]||!p(g,_,d,h)?c[m+1][f+1]=0:(c[m+1][f+1]=c[m][f]?c[m][f]+1:1,c[m+1][f+1]>=i&&(i=c[m+1][f+1],o=[m+1,f+1]))}return 0!==i&&{oldValue:o[0]-i,newValue:o[1]-i,length:i}}function f(e,t){return Array.apply(void 0,new Array(e)).map((function(){return t}))}s.prototype.toString=function(){return JSON.stringify(this)},s.prototype.setValue=function(e,t){return this[e]=t,this};var _=function(){this.list=[]};function b(e,t){var n,r,i=e;for(t=t.slice();t.length>0;){if(!i.childNodes)return!1;r=t.splice(0,1)[0],n=i,i=i.childNodes[r]}return{node:i,parentNode:n,nodeIndex:r}}function v(e,t,n){return t.forEach((function(t){!function(e,t,n){var r,i,o,a=b(e,t[n._const.route]),s=a.node,l=a.parentNode,c=a.nodeIndex,u=[],d={diff:t,node:s};if(n.preVirtualDiffApply(d))return!0;switch(t[n._const.action]){case n._const.addAttribute:s.attributes||(s.attributes={}),s.attributes[t[n._const.name]]=t[n._const.value],"checked"===t[n._const.name]?s.checked=!0:"selected"===t[n._const.name]?s.selected=!0:"INPUT"===s.nodeName&&"value"===t[n._const.name]&&(s.value=t[n._const.value]);break;case n._const.modifyAttribute:s.attributes[t[n._const.name]]=t[n._const.newValue];break;case n._const.removeAttribute:delete s.attributes[t[n._const.name]],0===Object.keys(s.attributes).length&&delete s.attributes,"checked"===t[n._const.name]?s.checked=!1:"selected"===t[n._const.name]?delete s.selected:"INPUT"===s.nodeName&&"value"===t[n._const.name]&&delete s.value;break;case n._const.modifyTextElement:s.data=t[n._const.newValue];break;case n._const.modifyValue:s.value=t[n._const.newValue];break;case n._const.modifyComment:s.data=t[n._const.newValue];break;case n._const.modifyChecked:s.checked=t[n._const.newValue];break;case n._const.modifySelected:s.selected=t[n._const.newValue];break;case n._const.replaceElement:(r=m(t[n._const.newValue])).outerDone=!0,r.innerDone=!0,r.valueDone=!0,l.childNodes[c]=r;break;case n._const.relocateGroup:s.childNodes.splice(t[n._const.from],t.groupLength).reverse().forEach((function(e){return s.childNodes.splice(t[n._const.to],0,e)})),s.subsets&&s.subsets.forEach((function(e){if(t[n._const.from]<t[n._const.to]&&e.oldValue<=t[n._const.to]&&e.oldValue>t[n._const.from]){e.oldValue-=t.groupLength;var r=e.oldValue+e.length-t[n._const.to];r>0&&(u.push({oldValue:t[n._const.to]+t.groupLength,newValue:e.newValue+e.length-r,length:r}),e.length-=r)}else if(t[n._const.from]>t[n._const.to]&&e.oldValue>t[n._const.to]&&e.oldValue<t[n._const.from]){e.oldValue+=t.groupLength;var i=e.oldValue+e.length-t[n._const.to];i>0&&(u.push({oldValue:t[n._const.to]+t.groupLength,newValue:e.newValue+e.length-i,length:i}),e.length-=i)}else e.oldValue===t[n._const.from]&&(e.oldValue=t[n._const.to])}));break;case n._const.removeElement:l.childNodes.splice(c,1),l.subsets&&l.subsets.forEach((function(e){e.oldValue>c?e.oldValue-=1:e.oldValue===c?e.delete=!0:e.oldValue<c&&e.oldValue+e.length>c&&(e.oldValue+e.length-1===c?e.length--:(u.push({newValue:e.newValue+c-e.oldValue,oldValue:c,length:e.length-c+e.oldValue-1}),e.length=c-e.oldValue))})),s=l;break;case n._const.addElement:i=t[n._const.route].slice(),o=i.splice(i.length-1,1)[0],s=b(e,i).node,(r=m(t[n._const.element])).outerDone=!0,r.innerDone=!0,r.valueDone=!0,s.childNodes||(s.childNodes=[]),o>=s.childNodes.length?s.childNodes.push(r):s.childNodes.splice(o,0,r),s.subsets&&s.subsets.forEach((function(e){if(e.oldValue>=o)e.oldValue+=1;else if(e.oldValue<o&&e.oldValue+e.length>o){var t=e.oldValue+e.length-o;u.push({newValue:e.newValue+e.length-t,oldValue:o+1,length:t}),e.length-=t}}));break;case n._const.removeTextElement:l.childNodes.splice(c,1),"TEXTAREA"===l.nodeName&&delete l.value,l.subsets&&l.subsets.forEach((function(e){e.oldValue>c?e.oldValue-=1:e.oldValue===c?e.delete=!0:e.oldValue<c&&e.oldValue+e.length>c&&(e.oldValue+e.length-1===c?e.length--:(u.push({newValue:e.newValue+c-e.oldValue,oldValue:c,length:e.length-c+e.oldValue-1}),e.length=c-e.oldValue))})),s=l;break;case n._const.addTextElement:i=t[n._const.route].slice(),o=i.splice(i.length-1,1)[0],(r={}).nodeName="#text",r.data=t[n._const.value],(s=b(e,i).node).childNodes||(s.childNodes=[]),o>=s.childNodes.length?s.childNodes.push(r):s.childNodes.splice(o,0,r),"TEXTAREA"===s.nodeName&&(s.value=t[n._const.newValue]),s.subsets&&s.subsets.forEach((function(e){if(e.oldValue>=o&&(e.oldValue+=1),e.oldValue<o&&e.oldValue+e.length>o){var t=e.oldValue+e.length-o;u.push({newValue:e.newValue+e.length-t,oldValue:o+1,length:t}),e.length-=t}}));break;default:console.log("unknown action")}s.subsets&&(s.subsets=s.subsets.filter((function(e){return!e.delete&&e.oldValue!==e.newValue})),u.length&&(s.subsets=s.subsets.concat(u))),d.newNode=r,n.postVirtualDiffApply(d)}(e,t,n)})),!0}function y(e,t){void 0===t&&(t={});var n={};return n.nodeName=e.nodeName,"#text"===n.nodeName||"#comment"===n.nodeName?n.data=e.data:(e.attributes&&e.attributes.length>0&&(n.attributes={},Array.prototype.slice.call(e.attributes).forEach((function(e){return n.attributes[e.name]=e.value}))),"TEXTAREA"===n.nodeName?n.value=e.value:e.childNodes&&e.childNodes.length>0&&(n.childNodes=[],Array.prototype.slice.call(e.childNodes).forEach((function(e){return n.childNodes.push(y(e,t))}))),t.valueDiffing&&(void 0!==e.checked&&e.type&&["radio","checkbox"].includes(e.type.toLowerCase())?n.checked=e.checked:void 0!==e.value&&(n.value=e.value),void 0!==e.selected&&(n.selected=e.selected))),n}_.prototype.add=function(e){var t;(t=this.list).push.apply(t,e)},_.prototype.forEach=function(e){this.list.forEach((function(t){return e(t)}))};var E=/<(?:"[^"]*"['"]*|'[^']*'['"]*|[^'">])+>/g,S=Object.create?Object.create(null):{},w=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function T(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")}var C={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,menuItem:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};function x(e){var t={nodeName:"",attributes:{}},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.nodeName=n[1].toUpperCase(),(C[n[1]]||"/"===e.charAt(e.length-2))&&(t.voidElement=!0),t.nodeName.startsWith("!--"))){var r=e.indexOf("--\x3e");return{type:"comment",data:-1!==r?e.slice(4,r):""}}for(var i=new RegExp(w),o=null,a=!1;!a;)if(null===(o=i.exec(e)))a=!0;else if(o[0].trim())if(o[1]){var s=o[1].trim(),l=[s,""];s.indexOf("=")>-1&&(l=s.split("=")),t.attributes[l[0]]=l[1],i.lastIndex--}else o[2]&&(t.attributes[o[2]]=o[3].trim().substring(1,o[3].length-1));return t}function F(e){return delete e.voidElement,e.childNodes&&e.childNodes.forEach((function(e){return F(e)})),e}function D(e){return F(function(e,t){void 0===t&&(t={components:S});var n,r=[],i=-1,o=[],a=!1;if(0!==e.indexOf("<")){var s=e.indexOf("<");r.push({nodeName:"#text",data:-1===s?e:e.substring(0,s)})}return e.replace(E,(function(s,l){if(a){if(s!=="</"+n.nodeName+">")return;a=!1}var c,u="/"!==s.charAt(1),d=s.startsWith("\x3c!--"),h=l+s.length,p=e.charAt(h);if(d){var m=x(s);return i<0?(r.push(m),r):((c=o[i])&&(c.childNodes||(c.childNodes=[]),c.childNodes.push(m)),r)}if(u&&(n=x(s),i++,"tag"===n.type&&t.components[n.nodeName]&&(n.type="component",a=!0),n.voidElement||a||!p||"<"===p||(n.childNodes||(n.childNodes=[]),n.childNodes.push({nodeName:"#text",data:T(e.slice(h,e.indexOf("<",h)))})),0===i&&r.push(n),(c=o[i-1])&&(c.childNodes||(c.childNodes=[]),c.childNodes.push(n)),o[i]=n),(!u||n.voidElement)&&(i>-1&&(n.voidElement||n.nodeName===s.slice(2,-1).toUpperCase())&&(i--,n=-1===i?r:o[i]),!a&&"<"!==p&&p)){c=-1===i?r:o[i].childNodes||[];var g=e.indexOf("<",h),f=T(e.slice(h,-1===g?void 0:g));c.push({nodeName:"#text",data:f})}})),r[0]}(e))}var k=function(e,t,n){this.options=n,this.t1="undefined"!=typeof HTMLElement&&e instanceof HTMLElement?y(e,this.options):"string"==typeof e?D(e,this.options):JSON.parse(JSON.stringify(e)),this.t2="undefined"!=typeof HTMLElement&&t instanceof HTMLElement?y(t,this.options):"string"==typeof t?D(t,this.options):JSON.parse(JSON.stringify(t)),this.diffcount=0,this.foundAll=!1,this.debug&&(this.t1Orig=y(e,this.options),this.t2Orig=y(t,this.options)),this.tracker=new _};k.prototype.init=function(){return this.findDiffs(this.t1,this.t2)},k.prototype.findDiffs=function(e,t){var n;do{if(this.options.debug&&(this.diffcount+=1,this.diffcount>this.options.diffcap))throw new Error("surpassed diffcap:"+JSON.stringify(this.t1Orig)+" -> "+JSON.stringify(this.t2Orig));0===(n=this.findNextDiff(e,t,[])).length&&(h(e,t)||(this.foundAll?console.error("Could not find remaining diffs!"):(this.foundAll=!0,d(e),n=this.findNextDiff(e,t,[])))),n.length>0&&(this.foundAll=!1,this.tracker.add(n),v(e,n,this.options))}while(n.length>0);return this.tracker.list},k.prototype.findNextDiff=function(e,t,n){var r,i;if(this.options.maxDepth&&n.length>this.options.maxDepth)return[];if(!e.outerDone){if(r=this.findOuterDiff(e,t,n),this.options.filterOuterDiff&&(i=this.options.filterOuterDiff(e,t,r))&&(r=i),r.length>0)return e.outerDone=!0,r;e.outerDone=!0}if(!e.innerDone){if((r=this.findInnerDiff(e,t,n)).length>0)return r;e.innerDone=!0}if(this.options.valueDiffing&&!e.valueDone){if((r=this.findValueDiff(e,t,n)).length>0)return e.valueDone=!0,r;e.valueDone=!0}return[]},k.prototype.findOuterDiff=function(e,t,n){var r,i,o,a,l,c,u=[];if(e.nodeName!==t.nodeName){if(!n.length)throw new Error("Top level nodes have to be of the same kind.");return[(new s).setValue(this.options._const.action,this.options._const.replaceElement).setValue(this.options._const.oldValue,m(e)).setValue(this.options._const.newValue,m(t)).setValue(this.options._const.route,n)]}if(n.length&&this.options.maxNodeDiffCount<Math.abs((e.childNodes||[]).length-(t.childNodes||[]).length))return[(new s).setValue(this.options._const.action,this.options._const.replaceElement).setValue(this.options._const.oldValue,m(e)).setValue(this.options._const.newValue,m(t)).setValue(this.options._const.route,n)];if(e.data!==t.data)return"#text"===e.nodeName?[(new s).setValue(this.options._const.action,this.options._const.modifyTextElement).setValue(this.options._const.route,n).setValue(this.options._const.oldValue,e.data).setValue(this.options._const.newValue,t.data)]:[(new s).setValue(this.options._const.action,this.options._const.modifyComment).setValue(this.options._const.route,n).setValue(this.options._const.oldValue,e.data).setValue(this.options._const.newValue,t.data)];for(i=e.attributes?Object.keys(e.attributes).sort():[],o=t.attributes?Object.keys(t.attributes).sort():[],a=i.length,c=0;c<a;c++)r=i[c],-1===(l=o.indexOf(r))?u.push((new s).setValue(this.options._const.action,this.options._const.removeAttribute).setValue(this.options._const.route,n).setValue(this.options._const.name,r).setValue(this.options._const.value,e.attributes[r])):(o.splice(l,1),e.attributes[r]!==t.attributes[r]&&u.push((new s).setValue(this.options._const.action,this.options._const.modifyAttribute).setValue(this.options._const.route,n).setValue(this.options._const.name,r).setValue(this.options._const.oldValue,e.attributes[r]).setValue(this.options._const.newValue,t.attributes[r])));for(a=o.length,c=0;c<a;c++)r=o[c],u.push((new s).setValue(this.options._const.action,this.options._const.addAttribute).setValue(this.options._const.route,n).setValue(this.options._const.name,r).setValue(this.options._const.value,t.attributes[r]));return u},k.prototype.findInnerDiff=function(e,t,n){var r=e.childNodes?e.childNodes.slice():[],i=t.childNodes?t.childNodes.slice():[],o=Math.max(r.length,i.length),a=Math.abs(r.length-i.length),l=[],c=0;if(!this.options.maxChildCount||o<this.options.maxChildCount){var u=e.subsets&&e.subsetsAge--,d=u?e.subsets:e.childNodes&&t.childNodes?function(e,t){for(var n=e.childNodes?e.childNodes:[],r=t.childNodes?t.childNodes:[],i=f(n.length,!1),o=f(r.length,!1),a=[],s=!0,l=function(){return arguments[1]};s;)(s=g(n,r,i,o))&&(a.push(s),Array.apply(void 0,new Array(s.length)).map(l).forEach((function(e){return t=e,i[s.oldValue+t]=!0,void(o[s.newValue+t]=!0);var t})));return e.subsets=a,e.subsetsAge=100,a}(e,t):[];if(d.length>0&&(l=this.attemptGroupRelocation(e,t,d,n,u)).length>0)return l}for(var p=0;p<o;p+=1){var _=r[p],b=i[p];a&&(_&&!b?"#text"===_.nodeName?(l.push((new s).setValue(this.options._const.action,this.options._const.removeTextElement).setValue(this.options._const.route,n.concat(c)).setValue(this.options._const.value,_.data)),c-=1):(l.push((new s).setValue(this.options._const.action,this.options._const.removeElement).setValue(this.options._const.route,n.concat(c)).setValue(this.options._const.element,m(_))),c-=1):b&&!_&&("#text"===b.nodeName?l.push((new s).setValue(this.options._const.action,this.options._const.addTextElement).setValue(this.options._const.route,n.concat(c)).setValue(this.options._const.value,b.data)):l.push((new s).setValue(this.options._const.action,this.options._const.addElement).setValue(this.options._const.route,n.concat(c)).setValue(this.options._const.element,m(b))))),_&&b&&(!this.options.maxChildCount||o<this.options.maxChildCount?l=l.concat(this.findNextDiff(_,b,n.concat(c))):h(_,b)||(r.length>i.length?("#text"===_.nodeName?l.push((new s).setValue(this.options._const.action,this.options._const.removeTextElement).setValue(this.options._const.route,n.concat(c)).setValue(this.options._const.value,_.data)):l.push((new s).setValue(this.options._const.action,this.options._const.removeElement).setValue(this.options._const.element,m(_)).setValue(this.options._const.route,n.concat(c))),r.splice(p,1),p-=1,c-=1,a-=1):r.length<i.length?(l=l.concat([(new s).setValue(this.options._const.action,this.options._const.addElement).setValue(this.options._const.element,m(b)).setValue(this.options._const.route,n.concat(c))]),r.splice(p,0,{}),a-=1):l=l.concat([(new s).setValue(this.options._const.action,this.options._const.replaceElement).setValue(this.options._const.oldValue,m(_)).setValue(this.options._const.newValue,m(b)).setValue(this.options._const.route,n.concat(c))]))),c+=1}return e.innerDone=!0,l},k.prototype.attemptGroupRelocation=function(e,t,n,r,i){for(var o,a,l,c,u,d,h=function(e,t,n){var r=e.childNodes?f(e.childNodes.length,!0):[],i=t.childNodes?f(t.childNodes.length,!0):[],o=0;return n.forEach((function(e){for(var t=e.oldValue+e.length,n=e.newValue+e.length,a=e.oldValue;a<t;a+=1)r[a]=o;for(var s=e.newValue;s<n;s+=1)i[s]=o;o+=1})),{gaps1:r,gaps2:i}}(e,t,n),g=h.gaps1,_=h.gaps2,b=Math.min(g.length,_.length),v=[],y=0,E=0;y<b;E+=1,y+=1)if(!i||!0!==g[y]&&!0!==_[y])if(!0===g[y])if("#text"===(c=e.childNodes[E]).nodeName)if("#text"===t.childNodes[y].nodeName){if(c.data!==t.childNodes[y].data){for(d=E;e.childNodes.length>d+1&&"#text"===e.childNodes[d+1].nodeName;)if(d+=1,t.childNodes[y].data===e.childNodes[d].data){u=!0;break}if(!u)return v.push((new s).setValue(this.options._const.action,this.options._const.modifyTextElement).setValue(this.options._const.route,r.concat(y)).setValue(this.options._const.oldValue,c.data).setValue(this.options._const.newValue,t.childNodes[y].data)),v}}else v.push((new s).setValue(this.options._const.action,this.options._const.removeTextElement).setValue(this.options._const.route,r.concat(y)).setValue(this.options._const.value,c.data)),g.splice(y,1),b=Math.min(g.length,_.length),y-=1;else v.push((new s).setValue(this.options._const.action,this.options._const.removeElement).setValue(this.options._const.route,r.concat(y)).setValue(this.options._const.element,m(c))),g.splice(y,1),b=Math.min(g.length,_.length),y-=1;else if(!0===_[y])"#text"===(c=t.childNodes[y]).nodeName?(v.push((new s).setValue(this.options._const.action,this.options._const.addTextElement).setValue(this.options._const.route,r.concat(y)).setValue(this.options._const.value,c.data)),g.splice(y,0,!0),b=Math.min(g.length,_.length),E-=1):(v.push((new s).setValue(this.options._const.action,this.options._const.addElement).setValue(this.options._const.route,r.concat(y)).setValue(this.options._const.element,m(c))),g.splice(y,0,!0),b=Math.min(g.length,_.length),E-=1);else if(g[y]!==_[y]){if(v.length>0)return v;if(l=n[g[y]],(a=Math.min(l.newValue,e.childNodes.length-l.length))!==l.oldValue){o=!1;for(var S=0;S<l.length;S+=1)p(e.childNodes[a+S],e.childNodes[l.oldValue+S],[],!1,!0)||(o=!0);if(o)return[(new s).setValue(this.options._const.action,this.options._const.relocateGroup).setValue("groupLength",l.length).setValue(this.options._const.from,l.oldValue).setValue(this.options._const.to,a).setValue(this.options._const.route,r)]}}return v},k.prototype.findValueDiff=function(e,t,n){var r=[];return e.selected!==t.selected&&r.push((new s).setValue(this.options._const.action,this.options._const.modifySelected).setValue(this.options._const.oldValue,e.selected).setValue(this.options._const.newValue,t.selected).setValue(this.options._const.route,n)),(e.value||t.value)&&e.value!==t.value&&"OPTION"!==e.nodeName&&r.push((new s).setValue(this.options._const.action,this.options._const.modifyValue).setValue(this.options._const.oldValue,e.value||"").setValue(this.options._const.newValue,t.value||"").setValue(this.options._const.route,n)),e.checked!==t.checked&&r.push((new s).setValue(this.options._const.action,this.options._const.modifyChecked).setValue(this.options._const.oldValue,e.checked).setValue(this.options._const.newValue,t.checked).setValue(this.options._const.route,n)),r};var O={debug:!1,diffcap:10,maxDepth:!1,maxChildCount:50,valueDiffing:!0,textDiff:function(e,t,n,r){e.data=r},preVirtualDiffApply:function(){},postVirtualDiffApply:function(){},preDiffApply:function(){},postDiffApply:function(){},filterOuterDiff:null,compress:!1,_const:!1,document:!("undefined"==typeof window||!window.document)&&window.document},I=function(e){var t=this;if(void 0===e&&(e={}),this.options=e,Object.entries(O).forEach((function(e){var n=e[0],r=e[1];Object.prototype.hasOwnProperty.call(t.options,n)||(t.options[n]=r)})),!this.options._const){var n=["addAttribute","modifyAttribute","removeAttribute","modifyTextElement","relocateGroup","removeElement","addElement","removeTextElement","addTextElement","replaceElement","modifyValue","modifyChecked","modifySelected","modifyComment","action","route","oldValue","newValue","element","group","from","to","name","value","data","attributes","nodeName","childNodes","checked","selected"];this.options._const={},this.options.compress?n.forEach((function(e,n){return t.options._const[e]=n})):n.forEach((function(e){return t.options._const[e]=e}))}this.DiffFinder=k};I.prototype.apply=function(e,t){return function(e,t,n){return t.every((function(t){return o(e,t,n)}))}(e,t,this.options)},I.prototype.undo=function(e,t){return function(e,t,n){t.length||(t=[t]),(t=t.slice()).reverse(),t.forEach((function(t){!function(e,t,n){switch(t[n._const.action]){case n._const.addAttribute:t[n._const.action]=n._const.removeAttribute,o(e,t,n);break;case n._const.modifyAttribute:a(t,n._const.oldValue,n._const.newValue),o(e,t,n);break;case n._const.removeAttribute:t[n._const.action]=n._const.addAttribute,o(e,t,n);break;case n._const.modifyTextElement:case n._const.modifyValue:case n._const.modifyComment:case n._const.modifyChecked:case n._const.modifySelected:case n._const.replaceElement:a(t,n._const.oldValue,n._const.newValue),o(e,t,n);break;case n._const.relocateGroup:a(t,n._const.from,n._const.to),o(e,t,n);break;case n._const.removeElement:t[n._const.action]=n._const.addElement,o(e,t,n);break;case n._const.addElement:t[n._const.action]=n._const.removeElement,o(e,t,n);break;case n._const.removeTextElement:t[n._const.action]=n._const.addTextElement,o(e,t,n);break;case n._const.addTextElement:t[n._const.action]=n._const.removeTextElement,o(e,t,n);break;default:console.log("unknown action")}}(e,t,n)}))}(e,t,this.options)},I.prototype.diff=function(e,t){return new this.DiffFinder(e,t,this.options).init()};var A=function(e){var t=this;void 0===e&&(e={}),this.pad="│ ",this.padding="",this.tick=1,this.messages=[];var n=function(e,n){var r=e[n];e[n]=function(){for(var i=[],o=arguments.length;o--;)i[o]=arguments[o];t.fin(n,Array.prototype.slice.call(i));var a=r.apply(e,i);return t.fout(n,a),a}};for(var r in e)"function"==typeof e[r]&&n(e,r);this.log("┌ TRACELOG START")};A.prototype.fin=function(e,t){this.padding+=this.pad,this.log("├─> entering "+e,t)},A.prototype.fout=function(e,t){this.log("│<──┘ generated return value",t),this.padding=this.padding.substring(0,this.padding.length-this.pad.length)},A.prototype.format=function(e,t){return function(e){for(e=""+e;e.length<4;)e="0"+e;return e}(t)+"> "+this.padding+e},A.prototype.log=function(){var e=Array.prototype.slice.call(arguments),t=function(e){return e?"string"==typeof e?e:e instanceof HTMLElement?e.outerHTML||"<empty>":e instanceof Array?"["+e.map(t).join(",")+"]":e.toString()||e.valueOf()||"<unknown>":"<falsey>"};e=e.map(t).join(", "),this.messages.push(this.format(e,this.tick++))},A.prototype.toString=function(){for(var e="└───";e.length<=this.padding.length+this.pad.length;)e+="× ";var t=this.padding;return this.padding="",e=this.format(e,this.tick),this.padding=t,this.messages.join("\n")+"\n"+e},t.DiffDOM=I,t.TraceLogger=A,t.nodeToObj=y,t.stringToObj=D},function(e,t,n){"use strict";var r,i,o=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},a=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n};Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(){r.set(this,!1),i.set(this,new Set)}get acquired(){return o(this,r,"f")}acquireAsync({timeout:e}={}){if(!o(this,r,"f"))return a(this,r,!0,"f"),Promise.resolve();if(null==e)return new Promise((e=>{o(this,i,"f").add(e)}));let t,n;return Promise.race([new Promise((e=>{t=()=>{clearTimeout(n),e()},o(this,i,"f").add(t)})),new Promise(((r,a)=>{n=setTimeout((()=>{o(this,i,"f").delete(t),a(new Error("Timed out waiting for lock"))}),e)}))])}tryAcquire(){return!o(this,r,"f")&&(a(this,r,!0,"f"),!0)}release(){if(!o(this,r,"f"))throw new Error("Cannot release an unacquired lock");if(o(this,i,"f").size>0){const[e]=o(this,i,"f");o(this,i,"f").delete(e),e()}else a(this,r,!1,"f")}},r=new WeakMap,i=new WeakMap},function(e,t,n){"undefined"!=typeof self&&self,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";(function(t){function n(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var r=t.AudioContext||t.webkitAudioContext,i=function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.isRecordingSupported())throw new Error("Recording is not supported in this browser");this.state="inactive",this.config=Object.assign({bufferLength:4096,encoderApplication:2049,encoderFrameSize:20,encoderPath:"encoderWorker.min.js",encoderSampleRate:48e3,maxFramesPerPage:40,mediaTrackConstraints:!0,monitorGain:0,numberOfChannels:1,recordingGain:1,resampleQuality:3,streamPages:!1,wavBitDepth:16,sourceNode:{context:null}},n),this.encodedSamplePosition=0,this.initAudioContext(),this.initialize=this.initWorklet().then((function(){return t.initEncoder()}))};i.isRecordingSupported=function(){var e=t.navigator&&t.navigator.mediaDevices&&t.navigator.mediaDevices.getUserMedia;return r&&e&&t.WebAssembly},i.version="8.0.5",i.prototype.clearStream=function(){this.stream&&(this.stream.getTracks?this.stream.getTracks().forEach((function(e){return e.stop()})):this.stream.stop())},i.prototype.close=function(){return this.monitorGainNode.disconnect(),this.recordingGainNode.disconnect(),this.sourceNode&&this.sourceNode.disconnect(),this.clearStream(),this.encoder&&(this.encoderNode.disconnect(),this.encoder.postMessage({command:"close"})),this.config.sourceNode.context?Promise.resolve():this.audioContext.close()},i.prototype.encodeBuffers=function(e){if("recording"===this.state){for(var t=[],n=0;n<e.numberOfChannels;n++)t[n]=e.getChannelData(n);this.encoder.postMessage({command:"encode",buffers:t})}},i.prototype.initAudioContext=function(){this.audioContext=this.config.sourceNode.context?this.config.sourceNode.context:new r,this.monitorGainNode=this.audioContext.createGain(),this.setMonitorGain(this.config.monitorGain),this.recordingGainNode=this.audioContext.createGain(),this.setRecordingGain(this.config.recordingGain)},i.prototype.initEncoder=function(){var e=this;this.audioContext.audioWorklet?(this.encoderNode=new AudioWorkletNode(this.audioContext,"encoder-worklet",{numberOfOutputs:0}),this.encoder=this.encoderNode.port):(console.log("audioWorklet support not detected. Falling back to scriptProcessor"),this.encodeBuffers=function(){return delete e.encodeBuffers},this.encoderNode=this.audioContext.createScriptProcessor(this.config.bufferLength,this.config.numberOfChannels,this.config.numberOfChannels),this.encoderNode.onaudioprocess=function(t){var n=t.inputBuffer;return e.encodeBuffers(n)},this.encoderNode.connect(this.audioContext.destination),this.encoder=new t.Worker(this.config.encoderPath))},i.prototype.initSourceNode=function(){var e=this;return this.config.sourceNode.context?(this.sourceNode=this.config.sourceNode,Promise.resolve()):t.navigator.mediaDevices.getUserMedia({audio:this.config.mediaTrackConstraints}).then((function(t){e.stream=t,e.sourceNode=e.audioContext.createMediaStreamSource(t)}))},i.prototype.initWorker=function(){var e=this,t=(this.config.streamPages?this.streamPage:this.storePage).bind(this);return this.recordedPages=[],this.totalLength=0,new Promise((function(r){e.encoder.addEventListener("message",(function n(i){var o=i.data;switch(o.message){case"ready":r();break;case"page":e.encodedSamplePosition=o.samplePosition,t(o.page);break;case"done":e.encoder.removeEventListener("message",n),e.finish()}})),e.encoder.start&&e.encoder.start();var i=e.config,o=(i.sourceNode,n(i,["sourceNode"]));e.encoder.postMessage(Object.assign({command:"init",originalSampleRate:e.audioContext.sampleRate,wavSampleRate:e.audioContext.sampleRate},o))}))},i.prototype.initWorklet=function(){return this.audioContext.audioWorklet?this.audioContext.audioWorklet.addModule(this.config.encoderPath):Promise.resolve()},i.prototype.pause=function(e){var t=this;if("recording"===this.state)return this.state="paused",this.recordingGainNode.disconnect(),e&&this.config.streamPages?new Promise((function(e){t.encoder.addEventListener("message",(function n(r){"flushed"===r.data.message&&(t.encoder.removeEventListener("message",n),t.onpause(),e())})),t.encoder.start&&t.encoder.start(),t.encoder.postMessage({command:"flush"})})):(this.onpause(),Promise.resolve())},i.prototype.resume=function(){"paused"===this.state&&(this.state="recording",this.recordingGainNode.connect(this.encoderNode),this.onresume())},i.prototype.setRecordingGain=function(e){this.config.recordingGain=e,this.recordingGainNode&&this.audioContext&&this.recordingGainNode.gain.setTargetAtTime(e,this.audioContext.currentTime,.01)},i.prototype.setMonitorGain=function(e){this.config.monitorGain=e,this.monitorGainNode&&this.audioContext&&this.monitorGainNode.gain.setTargetAtTime(e,this.audioContext.currentTime,.01)},i.prototype.start=function(){var e=this;return"inactive"===this.state?(this.state="loading",this.encodedSamplePosition=0,this.audioContext.resume().then((function(){return e.initialize})).then((function(){return Promise.all([e.initSourceNode(),e.initWorker()])})).then((function(){e.state="recording",e.encoder.postMessage({command:"getHeaderPages"}),e.sourceNode.connect(e.monitorGainNode),e.sourceNode.connect(e.recordingGainNode),e.monitorGainNode.connect(e.audioContext.destination),e.recordingGainNode.connect(e.encoderNode),e.onstart()})).catch((function(t){throw e.state="inactive",t}))):Promise.resolve()},i.prototype.stop=function(){var e=this;return"paused"===this.state||"recording"===this.state?(this.state="inactive",this.recordingGainNode.connect(this.encoderNode),this.monitorGainNode.disconnect(),this.clearStream(),new Promise((function(t){e.encoder.addEventListener("message",(function n(r){"done"===r.data.message&&(e.encoder.removeEventListener("message",n),t())})),e.encoder.start&&e.encoder.start(),e.encoder.postMessage({command:"done"})}))):Promise.resolve()},i.prototype.storePage=function(e){this.recordedPages.push(e),this.totalLength+=e.length},i.prototype.streamPage=function(e){this.ondataavailable(e)},i.prototype.finish=function(){if(!this.config.streamPages){var e=new Uint8Array(this.totalLength);this.recordedPages.reduce((function(t,n){return e.set(n,t),t+n.length}),0),this.ondataavailable(e)}this.onstop()},i.prototype.ondataavailable=function(){},i.prototype.onpause=function(){},i.prototype.onresume=function(){},i.prototype.onstart=function(){},i.prototype.onstop=function(){},e.exports=i}).call(this,n(1))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n}])},function(e,t,n){e.exports=n.p+"recorder-worklet.305bebd.js"},function(e,t,n){var r=n(1344);e.exports=function(e){if(137!==e[0])throw new Error("Invalid .png file header");if(80!==e[1])throw new Error("Invalid .png file header");if(78!==e[2])throw new Error("Invalid .png file header");if(71!==e[3])throw new Error("Invalid .png file header");if(13!==e[4])throw new Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");if(10!==e[5])throw new Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");if(26!==e[6])throw new Error("Invalid .png file header");if(10!==e[7])throw new Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");var t=!1,n=[],s=8;for(;s<e.length;){i[3]=e[s++],i[2]=e[s++],i[1]=e[s++],i[0]=e[s++];var l=a[0]+4,c=new Uint8Array(l);c[0]=e[s++],c[1]=e[s++],c[2]=e[s++],c[3]=e[s++];var u=String.fromCharCode(c[0])+String.fromCharCode(c[1])+String.fromCharCode(c[2])+String.fromCharCode(c[3]);if(!n.length&&"IHDR"!==u)throw new Error("IHDR header missing");if("IEND"===u){t=!0,n.push({name:u,data:new Uint8Array(0)});break}for(var d=4;d<l;d++)c[d]=e[s++];i[3]=e[s++],i[2]=e[s++],i[1]=e[s++],i[0]=e[s++];var h=o[0];if(r.buf(c)!==h)throw new Error("CRC values for "+u+" header do not match, PNG file is likely corrupted");var p=new Uint8Array(c.buffer.slice(4));n.push({name:u,data:p})}if(!t)throw new Error(".png file ended prematurely: no IEND header was found");return n};var i=new Uint8Array(4),o=new Int32Array(i.buffer),a=new Uint32Array(i.buffer)},function(e,t,n){(function(e){var n;n=function(t){t.version="0.3.0";var n=function(){for(var e=0,t=new Array(256),n=0;256!=n;++n)e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=n)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1,t[n]=e;return"undefined"!=typeof Int32Array?new Int32Array(t):t}(),r=void 0!==e;function i(e){for(var t=-1,r=0,i=e.length-7;r<i;)t=(t=(t=(t=(t=(t=(t=(t=t>>>8^n[255&(t^e[r++])])>>>8^n[255&(t^e[r++])])>>>8^n[255&(t^e[r++])])>>>8^n[255&(t^e[r++])])>>>8^n[255&(t^e[r++])])>>>8^n[255&(t^e[r++])])>>>8^n[255&(t^e[r++])])>>>8^n[255&(t^e[r++])];for(;r<i+7;)t=t>>>8^n[255&(t^e[r++])];return-1^t}t.table=n,t.bstr=function(t){if(t.length>32768&&r)return i(new e(t));for(var o=-1,a=t.length-1,s=0;s<a;)o=n[255&(o^t.charCodeAt(s++))]^o>>>8,o=n[255&(o^t.charCodeAt(s++))]^o>>>8;return s===a&&(o=o>>>8^n[255&(o^t.charCodeAt(s))]),-1^o},t.buf=function(e){if(e.length>1e4)return i(e);for(var t=-1,r=0,o=e.length-3;r<o;)t=(t=(t=(t=t>>>8^n[255&(t^e[r++])])>>>8^n[255&(t^e[r++])])>>>8^n[255&(t^e[r++])])>>>8^n[255&(t^e[r++])];for(;r<o+3;)t=t>>>8^n[255&(t^e[r++])];return-1^t},t.str=function(e){for(var t,r,i=-1,o=0,a=e.length;o<a;)(t=e.charCodeAt(o++))<128?i=i>>>8^n[255&(i^t)]:t<2048?i=(i=i>>>8^n[255&(i^(192|t>>6&31))])>>>8^n[255&(i^(128|63&t))]:t>=55296&&t<57344?(t=64+(1023&t),r=1023&e.charCodeAt(o++),i=(i=(i=(i=i>>>8^n[255&(i^(240|t>>8&7))])>>>8^n[255&(i^(128|t>>2&63))])>>>8^n[255&(i^(128|r>>6&15|3&t))])>>>8^n[255&(i^(128|63&r))]):i=(i=(i=i>>>8^n[255&(i^(224|t>>12&15))])>>>8^n[255&(i^(128|t>>6&63))])>>>8^n[255&(i^(128|63&t))];return-1^i}},"undefined"==typeof DO_NOT_EXPORT_CRC?n(t):n({})}).call(this,n(53).Buffer)},function(e,t,n){(function(e){var n;n=function(t){"use strict";function n(e){switch(e._type){case"document":case"block_quote":case"list":case"item":case"paragraph":case"heading":case"emph":case"strong":case"link":case"image":case"custom_inline":case"custom_block":return!0;default:return!1}}var r=function(e,t){this.current=e,this.entering=!0===t},i=function(){var e=this.current,t=this.entering;if(null===e)return null;var r=n(e);return t&&r?e._firstChild?(this.current=e._firstChild,this.entering=!0):this.entering=!1:e===this.root?this.current=null:null===e._next?(this.current=e._parent,this.entering=!1):(this.current=e._next,this.entering=!0),{entering:t,node:e}},o=function(e){return{current:e,root:e,entering:!0,next:i,resumeAt:r}},a=function(e,t){this._type=e,this._parent=null,this._firstChild=null,this._lastChild=null,this._prev=null,this._next=null,this._sourcepos=t,this._lastLineBlank=!1,this._lastLineChecked=!1,this._open=!0,this._string_content=null,this._literal=null,this._listData={},this._info=null,this._destination=null,this._title=null,this._isFenced=!1,this._fenceChar=null,this._fenceLength=0,this._fenceOffset=null,this._level=null,this._onEnter=null,this._onExit=null},s=a.prototype;Object.defineProperty(s,"isContainer",{get:function(){return n(this)}}),Object.defineProperty(s,"type",{get:function(){return this._type}}),Object.defineProperty(s,"firstChild",{get:function(){return this._firstChild}}),Object.defineProperty(s,"lastChild",{get:function(){return this._lastChild}}),Object.defineProperty(s,"next",{get:function(){return this._next}}),Object.defineProperty(s,"prev",{get:function(){return this._prev}}),Object.defineProperty(s,"parent",{get:function(){return this._parent}}),Object.defineProperty(s,"sourcepos",{get:function(){return this._sourcepos}}),Object.defineProperty(s,"literal",{get:function(){return this._literal},set:function(e){this._literal=e}}),Object.defineProperty(s,"destination",{get:function(){return this._destination},set:function(e){this._destination=e}}),Object.defineProperty(s,"title",{get:function(){return this._title},set:function(e){this._title=e}}),Object.defineProperty(s,"info",{get:function(){return this._info},set:function(e){this._info=e}}),Object.defineProperty(s,"level",{get:function(){return this._level},set:function(e){this._level=e}}),Object.defineProperty(s,"listType",{get:function(){return this._listData.type},set:function(e){this._listData.type=e}}),Object.defineProperty(s,"listTight",{get:function(){return this._listData.tight},set:function(e){this._listData.tight=e}}),Object.defineProperty(s,"listStart",{get:function(){return this._listData.start},set:function(e){this._listData.start=e}}),Object.defineProperty(s,"listDelimiter",{get:function(){return this._listData.delimiter},set:function(e){this._listData.delimiter=e}}),Object.defineProperty(s,"onEnter",{get:function(){return this._onEnter},set:function(e){this._onEnter=e}}),Object.defineProperty(s,"onExit",{get:function(){return this._onExit},set:function(e){this._onExit=e}}),a.prototype.appendChild=function(e){e.unlink(),e._parent=this,this._lastChild?(this._lastChild._next=e,e._prev=this._lastChild,this._lastChild=e):(this._firstChild=e,this._lastChild=e)},a.prototype.prependChild=function(e){e.unlink(),e._parent=this,this._firstChild?(this._firstChild._prev=e,e._next=this._firstChild,this._firstChild=e):(this._firstChild=e,this._lastChild=e)},a.prototype.unlink=function(){this._prev?this._prev._next=this._next:this._parent&&(this._parent._firstChild=this._next),this._next?this._next._prev=this._prev:this._parent&&(this._parent._lastChild=this._prev),this._parent=null,this._next=null,this._prev=null},a.prototype.insertAfter=function(e){e.unlink(),e._next=this._next,e._next&&(e._next._prev=e),e._prev=this,this._next=e,e._parent=this._parent,e._next||(e._parent._lastChild=e)},a.prototype.insertBefore=function(e){e.unlink(),e._prev=this._prev,e._prev&&(e._prev._next=e),e._next=this,this._prev=e,e._parent=this._parent,e._prev||(e._parent._firstChild=e)},a.prototype.walker=function(){return new o(this)};var l={};function c(e,t,n){var r,i,o,a,s,u="";for("string"!=typeof t&&(n=t,t=c.defaultChars),void 0===n&&(n=!0),s=function(e){var t,n,r=l[e];if(r)return r;for(r=l[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),/^[0-9a-z]$/i.test(n)?r.push(n):r.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t<e.length;t++)r[e.charCodeAt(t)]=e[t];return r}(t),r=0,i=e.length;r<i;r++)if(o=e.charCodeAt(r),n&&37===o&&r+2<i&&/^[0-9a-f]{2}$/i.test(e.slice(r+1,r+3)))u+=e.slice(r,r+3),r+=2;else if(o<128)u+=s[o];else if(o>=55296&&o<=57343){if(o>=55296&&o<=56319&&r+1<i&&(a=e.charCodeAt(r+1))>=56320&&a<=57343){u+=encodeURIComponent(e[r]+e[r+1]),r++;continue}u+="%EF%BF%BD"}else u+=encodeURIComponent(e[r]);return u}c.defaultChars=";/?:@&=+$,-_.!~*'()#",c.componentChars="-_.!~*'()";var u=c,d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};function h(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function p(e,t){return e(t={exports:{}},t.exports),t.exports}function m(e){return e&&e.default||e}var g={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""},f=Object.freeze({__proto__:null,Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:"",default:g}),_={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ"},b=Object.freeze({__proto__:null,Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ",default:_}),v={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'},y=Object.freeze({__proto__:null,amp:"&",apos:"'",gt:">",lt:"<",quot:'"',default:v}),E=m(Object.freeze({__proto__:null,default:{0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}})),S=p((function(e,t){var n=d&&d.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=n(E);t.default=function(e){if(e>=55296&&e<=57343||e>1114111)return"<22>";e in r.default&&(e=r.default[e]);var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e)}}));h(S);var w=m(f),T=m(b),C=m(y),x=p((function(e,t){var n=d&&d.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeHTML=t.decodeHTMLStrict=t.decodeXML=void 0;var r=n(w),i=n(T),o=n(C),a=n(S);function s(e){var t=Object.keys(e).join("|"),n=c(e),r=new RegExp("&(?:"+(t+="|#[xX][\\da-fA-F]+|#\\d+")+");","g");return function(e){return String(e).replace(r,n)}}t.decodeXML=s(o.default),t.decodeHTMLStrict=s(r.default);var l=function(e,t){return e<t?1:-1};function c(e){return function(t){if("#"===t.charAt(1)){var n=t.charAt(2);return"X"===n||"x"===n?a.default(parseInt(t.substr(3),16)):a.default(parseInt(t.substr(2),10))}return e[t.slice(1,-1)]}}t.decodeHTML=function(){for(var e=Object.keys(i.default).sort(l),t=Object.keys(r.default).sort(l),n=0,o=0;n<t.length;n++)e[o]===t[n]?(t[n]+=";?",o++):t[n]+=";";var a=new RegExp("&(?:"+t.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),s=c(r.default);function u(e){return";"!==e.substr(-1)&&(e+=";"),s(e)}return function(e){return String(e).replace(a,u)}}()}));h(x),x.decodeHTML,x.decodeHTMLStrict,x.decodeXML;var F=p((function(e,t){var n=d&&d.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.escape=t.encodeHTML=t.encodeXML=void 0;var r=s(n(C).default),i=l(r);t.encodeXML=h(r,i);var o=s(n(w).default),a=l(o);function s(e){return Object.keys(e).sort().reduce((function(t,n){return t[e[n]]="&"+n+";",t}),{})}function l(e){for(var t=[],n=[],r=0,i=Object.keys(e);r<i.length;r++){var o=i[r];1===o.length?t.push("\\"+o):n.push(o)}t.sort();for(var a=0;a<t.length-1;a++){for(var s=a;s<t.length-1&&t[s].charCodeAt(1)+1===t[s+1].charCodeAt(1);)s+=1;var l=1+s-a;l<3||t.splice(a,l,t[a]+"-"+t[s])}return n.unshift("["+t.join("")+"]"),new RegExp(n.join("|"),"g")}t.encodeHTML=h(o,a);var c=/(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g;function u(e){return"&#x"+e.codePointAt(0).toString(16).toUpperCase()+";"}function h(e,t){return function(n){return n.replace(t,(function(t){return e[t]})).replace(c,u)}}var p=l(r);t.escape=function(e){return e.replace(p,u).replace(c,u)}}));h(F),F.escape,F.encodeHTML,F.encodeXML;var D=p((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.encode=t.decodeStrict=t.decode=void 0,t.decode=function(e,t){return(!t||t<=0?x.decodeXML:x.decodeHTML)(e)},t.decodeStrict=function(e,t){return(!t||t<=0?x.decodeXML:x.decodeHTMLStrict)(e)},t.encode=function(e,t){return(!t||t<=0?F.encodeXML:F.encodeHTML)(e)};var n=F;Object.defineProperty(t,"encodeXML",{enumerable:!0,get:function(){return n.encodeXML}}),Object.defineProperty(t,"encodeHTML",{enumerable:!0,get:function(){return n.encodeHTML}}),Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return n.escape}}),Object.defineProperty(t,"encodeHTML4",{enumerable:!0,get:function(){return n.encodeHTML}}),Object.defineProperty(t,"encodeHTML5",{enumerable:!0,get:function(){return n.encodeHTML}});var r=x;Object.defineProperty(t,"decodeXML",{enumerable:!0,get:function(){return r.decodeXML}}),Object.defineProperty(t,"decodeHTML",{enumerable:!0,get:function(){return r.decodeHTML}}),Object.defineProperty(t,"decodeHTMLStrict",{enumerable:!0,get:function(){return r.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML4",{enumerable:!0,get:function(){return r.decodeHTML}}),Object.defineProperty(t,"decodeHTML5",{enumerable:!0,get:function(){return r.decodeHTML}}),Object.defineProperty(t,"decodeHTML4Strict",{enumerable:!0,get:function(){return r.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML5Strict",{enumerable:!0,get:function(){return r.decodeHTMLStrict}}),Object.defineProperty(t,"decodeXMLStrict",{enumerable:!0,get:function(){return r.decodeXML}})}));h(D),D.encode,D.decodeStrict,D.decode,D.encodeXML,D.encodeHTML,D.encodeHTML4,D.encodeHTML5,D.decodeXML;var k,O,I,A=D.decodeHTML,R=(D.decodeHTMLStrict,D.decodeHTML4,D.decodeHTML5,D.decodeHTML4Strict,D.decodeHTML5Strict,D.decodeXMLStrict,"&(?:#x[a-f0-9]{1,6}|#[0-9]{1,7}|[a-z][a-z0-9]{1,31});"),N="[A-Za-z][A-Za-z0-9-]*",M="<"+N+"(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*/?>",P="</"+N+"\\s*[>]",L=new RegExp("^(?:"+M+"|"+P+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|[<][?][\\s\\S]*?[?][>]|<![A-Z]+\\s+[^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),B=/[\\&]/,U="[!\"#$%&'()*+,./:;<=>?@[\\\\\\]^_`{|}~-]",j=new RegExp("\\\\"+U+"|"+R,"gi"),G=new RegExp('[&<>"]',"g"),z=function(e){return 92===e.charCodeAt(0)?e.charAt(1):A(e)},H=function(e){return B.test(e)?e.replace(j,z):e},q=function(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";default:return e}},V=function(e){return G.test(e)?e.replace(G,q):e};function $(e){return k(e)}if(String.fromCodePoint)k=function(e){try{return String.fromCodePoint(e)}catch(e){if(e instanceof RangeError)return String.fromCharCode(65533);throw e}};else{var K=String.fromCharCode,W=Math.floor;k=function(){var e,t,n=[],r=-1,i=arguments.length;if(!i)return"";for(var o="";++r<i;){var a=Number(arguments[r]);if(!isFinite(a)||a<0||a>1114111||W(a)!==a)return String.fromCharCode(65533);a<=65535?n.push(a):(e=55296+((a-=65536)>>10),t=a%1024+56320,n.push(e,t)),(r+1===i||n.length>16384)&&(o+=K.apply(null,n),n.length=0)}return o}}String.prototype.repeat||(O=function(){try{var e={},t=Object.defineProperty,n=t(e,e,e)&&t}catch(e){}return n}(),I=function(e){if(null==this)throw TypeError();var t=String(this),n=e?Number(e):0;if(n!=n&&(n=0),n<0||n==1/0)throw RangeError();for(var r="";n;)n%2==1&&(r+=t),n>1&&(t+=t),n>>=1;return r},O?O(String.prototype,"repeat",{value:I,configurable:!0,writable:!0}):String.prototype.repeat=I);var Y=function(e){try{return u(e)}catch(t){return e}},Q=H,X=39,Z=34,J=U,ee="\\\\"+J,te=R,ne=L,re=new RegExp(/^[!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/),ie=new RegExp('^(?:"('+ee+'|[^"\\x00])*"|\'('+ee+"|[^'\\x00])*'|\\(("+ee+"|[^()\\x00])*\\))"),oe=/^(?:<(?:[^<>\n\\\x00]|\\.)*>)/,ae=new RegExp("^"+J),se=new RegExp("^"+te,"i"),le=/`+/,ce=/^`+/,ue=/\.\.\./g,de=/--+/g,he=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,pe=/^<[A-Za-z][A-Za-z0-9.+-]{1,31}:[^<>\x00-\x20]*>/i,me=/^ *(?:\n *)?/,ge=/^[ \t\n\x0b\x0c\x0d]/,fe=/^\s/,_e=/ *$/,be=/^ */,ve=/^ *(?:\n|$)/,ye=/^\[(?:[^\\\[\]]|\\.){0,1000}\]/s,Ee=/^[^\n`\[\]\\!<&*_'"]+/m,Se=function(e){var t=new a("text");return t._literal=e,t},we=function(e){return e.slice(1,e.length-1).trim().replace(/[ \t\r\n]+/," ").toLowerCase().toUpperCase()},Te=function(e){var t=e.exec(this.subject.slice(this.pos));return null===t?null:(this.pos+=t.index+t[0].length,t[0])},Ce=function(){return this.pos<this.subject.length?this.subject.charCodeAt(this.pos):-1},xe=function(){return this.match(me),!0},Fe=function(e){var t=this.match(ce);if(null===t)return!1;for(var n,r,i,o=this.pos;null!==(n=this.match(le));)if(n===t)return r=new a("code"),(i=this.subject.slice(o,this.pos-t.length).replace(/\n/gm," ")).length>0&&null!==i.match(/[^ ]/)&&" "==i[0]&&" "==i[i.length-1]?r._literal=i.slice(1,i.length-1):r._literal=i,e.appendChild(r),!0;return this.pos=o,e.appendChild(Se(t)),!0},De=function(e){var t,n=this.subject;return this.pos+=1,10===this.peek()?(this.pos+=1,t=new a("linebreak"),e.appendChild(t)):ae.test(n.charAt(this.pos))?(e.appendChild(Se(n.charAt(this.pos))),this.pos+=1):e.appendChild(Se("\\")),!0},ke=function(e){var t,n,r;return(t=this.match(he))?(n=t.slice(1,t.length-1),(r=new a("link"))._destination=Y("mailto:"+n),r._title="",r.appendChild(Se(n)),e.appendChild(r),!0):!!(t=this.match(pe))&&(n=t.slice(1,t.length-1),(r=new a("link"))._destination=Y(n),r._title="",r.appendChild(Se(n)),e.appendChild(r),!0)},Oe=function(e){var t=this.match(ne);if(null===t)return!1;var n=new a("html_inline");return n._literal=t,e.appendChild(n),!0},Ie=function(e){var t,n,r,i,o,a,s,l,c,u,d,h=0,p=this.pos;if(e===X||e===Z)h++,this.pos++;else for(;this.peek()===e;)h++,this.pos++;return 0===h?null:(t=0===p?"\n":this.subject.charAt(p-1),n=-1===(r=this.peek())?"\n":$(r),l=fe.test(n),c=re.test(n),u=fe.test(t),d=re.test(t),i=!l&&(!c||u||d),o=!u&&(!d||l||c),95===e?(a=i&&(!o||d),s=o&&(!i||c)):e===X||e===Z?(a=i&&!o,s=o):(a=i,s=o),this.pos=p,{numdelims:h,can_open:a,can_close:s})},Ae=function(e,t){var n=this.scanDelims(e);if(!n)return!1;var r,i=n.numdelims,o=this.pos;this.pos+=i,r=e===X?"’":e===Z?"“":this.subject.slice(o,this.pos);var a=Se(r);return t.appendChild(a),(n.can_open||n.can_close)&&(this.options.smart||e!==X&&e!==Z)&&(this.delimiters={cc:e,numdelims:i,origdelims:i,node:a,previous:this.delimiters,next:null,can_open:n.can_open,can_close:n.can_close},null!==this.delimiters.previous&&(this.delimiters.previous.next=this.delimiters)),!0},Re=function(e){null!==e.previous&&(e.previous.next=e.next),null===e.next?this.delimiters=e.previous:e.next.previous=e.previous},Ne=function(e,t){e.next!==t&&(e.next=t,t.previous=e)},Me=function(e){for(var t,n,r,i,o,s,l,c,u,d,h,p=[],m=!1,g=0;g<8;g++)p[g]=e;for(n=this.delimiters;null!==n&&n.previous!==e;)n=n.previous;for(;null!==n;){var f=n.cc;if(n.can_close){switch(t=n.previous,d=!1,f){case X:h=0;break;case Z:h=1;break;case 95:h=2;break;case 42:h=3+(n.can_open?3:0)+n.origdelims%3}for(;null!==t&&t!==e&&t!==p[h];){if(m=(n.can_open||t.can_close)&&n.origdelims%3!=0&&(t.origdelims+n.origdelims)%3==0,t.cc===n.cc&&t.can_open&&!m){d=!0;break}t=t.previous}if(r=n,42===f||95===f)if(d){l=n.numdelims>=2&&t.numdelims>=2?2:1,i=t.node,o=n.node,t.numdelims-=l,n.numdelims-=l,i._literal=i._literal.slice(0,i._literal.length-l),o._literal=o._literal.slice(0,o._literal.length-l);var _=new a(1===l?"emph":"strong");for(c=i._next;c&&c!==o;)u=c._next,c.unlink(),_.appendChild(c),c=u;i.insertAfter(_),Ne(t,n),0===t.numdelims&&(i.unlink(),this.removeDelimiter(t)),0===n.numdelims&&(o.unlink(),s=n.next,this.removeDelimiter(n),n=s)}else n=n.next;else f===X?(n.node._literal="’",d&&(t.node._literal="‘"),n=n.next):f===Z&&(n.node._literal="”",d&&(t.node.literal="“"),n=n.next);d||(p[h]=r.previous,r.can_open||this.removeDelimiter(r))}else n=n.next}for(;null!==this.delimiters&&this.delimiters!==e;)this.removeDelimiter(this.delimiters)},Pe=function(){var e=this.match(ie);return null===e?null:Q(e.substr(1,e.length-2))},Le=function(){var e=this.match(oe);if(null===e){if(60===this.peek())return null;for(var t,n=this.pos,r=0;-1!==(t=this.peek());)if(92===t&&ae.test(this.subject.charAt(this.pos+1)))this.pos+=1,-1!==this.peek()&&(this.pos+=1);else if(40===t)this.pos+=1,r+=1;else if(41===t){if(r<1)break;this.pos+=1,r-=1}else{if(null!==ge.exec($(t)))break;this.pos+=1}return this.pos===n&&41!==t||0!==r?null:(e=this.subject.substr(n,this.pos-n),Y(Q(e)))}return Y(Q(e.substr(1,e.length-2)))},Be=function(){var e=this.match(ye);return null===e||e.length>1001?0:e.length},Ue=function(e){var t=this.pos;this.pos+=1;var n=Se("[");return e.appendChild(n),this.addBracket(n,t,!1),!0},je=function(e){var t=this.pos;if(this.pos+=1,91===this.peek()){this.pos+=1;var n=Se("![");e.appendChild(n),this.addBracket(n,t+1,!0)}else e.appendChild(Se("!"));return!0},Ge=function(e){var t,n,r,i,o,s,l=!1;if(this.pos+=1,t=this.pos,null===(s=this.brackets))return e.appendChild(Se("]")),!0;if(!s.active)return e.appendChild(Se("]")),this.removeBracket(),!0;n=s.image;var c=this.pos;if(40===this.peek()&&(this.pos++,this.spnl()&&null!==(r=this.parseLinkDestination())&&this.spnl()&&(ge.test(this.subject.charAt(this.pos-1))&&(i=this.parseLinkTitle()),1)&&this.spnl()&&41===this.peek()?(this.pos+=1,l=!0):this.pos=c),!l){var u=this.pos,d=this.parseLinkLabel();if(d>2?o=this.subject.slice(u,u+d):s.bracketAfter||(o=this.subject.slice(s.index,t)),0===d&&(this.pos=c),o){var h=this.refmap[we(o)];h&&(r=h.destination,i=h.title,l=!0)}}if(l){var p,m,g=new a(n?"image":"link");for(g._destination=r,g._title=i||"",p=s.node._next;p;)m=p._next,p.unlink(),g.appendChild(p),p=m;if(e.appendChild(g),this.processEmphasis(s.previousDelimiter),this.removeBracket(),s.node.unlink(),!n)for(s=this.brackets;null!==s;)s.image||(s.active=!1),s=s.previous;return!0}return this.removeBracket(),this.pos=t,e.appendChild(Se("]")),!0},ze=function(e,t,n){null!==this.brackets&&(this.brackets.bracketAfter=!0),this.brackets={node:e,previous:this.brackets,previousDelimiter:this.delimiters,index:t,image:n,active:!0}},He=function(){this.brackets=this.brackets.previous},qe=function(e){var t;return!!(t=this.match(se))&&(e.appendChild(Se(A(t))),!0)},Ve=function(e){var t;return!!(t=this.match(Ee))&&(this.options.smart?e.appendChild(Se(t.replace(ue,"…").replace(de,(function(e){var t=0,n=0;return e.length%3==0?n=e.length/3:e.length%2==0?t=e.length/2:e.length%3==2?(t=1,n=(e.length-2)/3):(t=2,n=(e.length-4)/3),"—".repeat(n)+"–".repeat(t)})))):e.appendChild(Se(t)),!0)},$e=function(e){this.pos+=1;var t=e._lastChild;if(t&&"text"===t.type&&" "===t._literal[t._literal.length-1]){var n=" "===t._literal[t._literal.length-2];t._literal=t._literal.replace(_e,""),e.appendChild(new a(n?"linebreak":"softbreak"))}else e.appendChild(new a("softbreak"));return this.match(be),!0},Ke=function(e,t){var n,r,i,o;this.subject=e,this.pos=0;var a=this.pos;if(0===(o=this.parseLinkLabel()))return 0;if(n=this.subject.substr(0,o),58!==this.peek())return this.pos=a,0;if(this.pos++,this.spnl(),null===(r=this.parseLinkDestination()))return this.pos=a,0;var s=this.pos;this.spnl(),this.pos!==s&&(i=this.parseLinkTitle()),null===i&&(i="",this.pos=s);var l=!0;if(null===this.match(ve)&&(""===i?l=!1:(i="",this.pos=s,l=null!==this.match(ve))),!l)return this.pos=a,0;var c=we(n);return""===c?(this.pos=a,0):(t[c]||(t[c]={destination:r,title:i}),this.pos-a)},We=function(e){var t=!1,n=this.peek();if(-1===n)return!1;switch(n){case 10:t=this.parseNewline(e);break;case 92:t=this.parseBackslash(e);break;case 96:t=this.parseBackticks(e);break;case 42:case 95:t=this.handleDelim(n,e);break;case X:case Z:t=this.options.smart&&this.handleDelim(n,e);break;case 91:t=this.parseOpenBracket(e);break;case 33:t=this.parseBang(e);break;case 93:t=this.parseCloseBracket(e);break;case 60:t=this.parseAutolink(e)||this.parseHtmlTag(e);break;case 38:t=this.parseEntity(e);break;default:t=this.parseString(e)}return t||(this.pos+=1,e.appendChild(Se($(n)))),!0},Ye=function(e){for(this.subject=e._string_content.trim(),this.pos=0,this.delimiters=null,this.brackets=null;this.parseInline(e););e._string_content=null,this.processEmphasis(null)};function Qe(e){return{subject:"",delimiters:null,brackets:null,pos:0,refmap:{},match:Te,peek:Ce,spnl:xe,parseBackticks:Fe,parseBackslash:De,parseAutolink:ke,parseHtmlTag:Oe,scanDelims:Ie,handleDelim:Ae,parseLinkTitle:Pe,parseLinkDestination:Le,parseLinkLabel:Be,parseOpenBracket:Ue,parseBang:je,parseCloseBracket:Ge,addBracket:ze,removeBracket:He,parseEntity:qe,parseString:Ve,parseNewline:$e,parseReference:Ke,parseInline:We,processEmphasis:Me,removeDelimiter:Re,options:e||{},parse:Ye}}var Xe=[/./,/^<(?:script|pre|textarea|style)(?:\s|>|$)/i,/^<!--/,/^<[?]/,/^<![A-Z]/,/^<!\[CDATA\[/,/^<[/]?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[123456]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|[/]?[>]|$)/i,new RegExp("^(?:"+M+"|"+P+")\\s*$","i")],Ze=[/./,/<\/(?:script|pre|textarea|style)>/i,/-->/,/\?>/,/>/,/\]\]>/],Je=/^(?:\*[ \t]*){3,}$|^(?:_[ \t]*){3,}$|^(?:-[ \t]*){3,}$/,et=/^[#`~*+_=<>0-9-]/,tt=/[^ \t\f\v\r\n]/,nt=/^[*+-]/,rt=/^(\d{1,9})([.)])/,it=/^#{1,6}(?:[ \t]+|$)/,ot=/^`{3,}(?!.*`)|^~{3,}/,at=/^(?:`{3,}|~{3,})(?= *$)/,st=/^(?:=+|-+)[ \t]*$/,lt=/\r\n|\n|\r/,ct=function(e){return 32===e||9===e},ut=function(e,t){return t<e.length?e.charCodeAt(t):-1},dt=function(e){for(;e;){if(e._lastLineBlank)return!0;var t=e.type;if(e._lastLineChecked||"list"!==t&&"item"!==t){e._lastLineChecked=!0;break}e._lastLineChecked=!0,e=e._lastChild}return!1},ht=function(){if(this.partiallyConsumedTab){this.offset+=1;var e=4-this.column%4;this.tip._string_content+=" ".repeat(e)}this.tip._string_content+=this.currentLine.slice(this.offset)+"\n"},pt=function(e,t){for(;!this.blocks[this.tip.type].canContain(e);)this.finalize(this.tip,this.lineNumber-1);var n=t+1,r=new a(e,[[this.lineNumber,n],[0,0]]);return r._string_content="",this.tip.appendChild(r),this.tip=r,r},mt=function(){if(!this.allClosed){for(;this.oldtip!==this.lastMatchedContainer;){var e=this.oldtip._parent;this.finalize(this.oldtip,this.lineNumber-1),this.oldtip=e}this.allClosed=!0}},gt={document:{continue:function(){return 0},finalize:function(){},canContain:function(e){return"item"!==e},acceptsLines:!1},list:{continue:function(){return 0},finalize:function(e,t){for(var n=t._firstChild;n;){if(dt(n)&&n._next){t._listData.tight=!1;break}for(var r=n._firstChild;r;){if(dt(r)&&(n._next||r._next)){t._listData.tight=!1;break}r=r._next}n=n._next}},canContain:function(e){return"item"===e},acceptsLines:!1},block_quote:{continue:function(e){var t=e.currentLine;return e.indented||62!==ut(t,e.nextNonspace)?1:(e.advanceNextNonspace(),e.advanceOffset(1,!1),ct(ut(t,e.offset))&&e.advanceOffset(1,!0),0)},finalize:function(){},canContain:function(e){return"item"!==e},acceptsLines:!1},item:{continue:function(e,t){if(e.blank){if(null==t._firstChild)return 1;e.advanceNextNonspace()}else{if(!(e.indent>=t._listData.markerOffset+t._listData.padding))return 1;e.advanceOffset(t._listData.markerOffset+t._listData.padding,!0)}return 0},finalize:function(){},canContain:function(e){return"item"!==e},acceptsLines:!1},heading:{continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},thematic_break:{continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},code_block:{continue:function(e,t){var n=e.currentLine,r=e.indent;if(t._isFenced){var i=r<=3&&n.charAt(e.nextNonspace)===t._fenceChar&&n.slice(e.nextNonspace).match(at);if(i&&i[0].length>=t._fenceLength)return e.lastLineLength=e.offset+r+i[0].length,e.finalize(t,e.lineNumber),2;for(var o=t._fenceOffset;o>0&&ct(ut(n,e.offset));)e.advanceOffset(1,!0),o--}else if(r>=4)e.advanceOffset(4,!0);else{if(!e.blank)return 1;e.advanceNextNonspace()}return 0},finalize:function(e,t){if(t._isFenced){var n=t._string_content,r=n.indexOf("\n"),i=n.slice(0,r),o=n.slice(r+1);t.info=H(i.trim()),t._literal=o}else t._literal=t._string_content.replace(/(\n *)+$/,"\n");t._string_content=null},canContain:function(){return!1},acceptsLines:!0},html_block:{continue:function(e,t){return!e.blank||6!==t._htmlBlockType&&7!==t._htmlBlockType?0:1},finalize:function(e,t){t._literal=t._string_content.replace(/(\n *)+$/,""),t._string_content=null},canContain:function(){return!1},acceptsLines:!0},paragraph:{continue:function(e){return e.blank?1:0},finalize:function(e,t){for(var n,r,i=!1;91===ut(t._string_content,0)&&(n=e.inlineParser.parseReference(t._string_content,e.refmap));)t._string_content=t._string_content.slice(n),i=!0;i&&(r=t._string_content,!tt.test(r))&&t.unlink()},canContain:function(){return!1},acceptsLines:!0}},ft=[function(e){return e.indented||62!==ut(e.currentLine,e.nextNonspace)?0:(e.advanceNextNonspace(),e.advanceOffset(1,!1),ct(ut(e.currentLine,e.offset))&&e.advanceOffset(1,!0),e.closeUnmatchedBlocks(),e.addChild("block_quote",e.nextNonspace),1)},function(e){var t;if(!e.indented&&(t=e.currentLine.slice(e.nextNonspace).match(it))){e.advanceNextNonspace(),e.advanceOffset(t[0].length,!1),e.closeUnmatchedBlocks();var n=e.addChild("heading",e.nextNonspace);return n.level=t[0].trim().length,n._string_content=e.currentLine.slice(e.offset).replace(/^[ \t]*#+[ \t]*$/,"").replace(/[ \t]+#+[ \t]*$/,""),e.advanceOffset(e.currentLine.length-e.offset),2}return 0},function(e){var t;if(!e.indented&&(t=e.currentLine.slice(e.nextNonspace).match(ot))){var n=t[0].length;e.closeUnmatchedBlocks();var r=e.addChild("code_block",e.nextNonspace);return r._isFenced=!0,r._fenceLength=n,r._fenceChar=t[0][0],r._fenceOffset=e.indent,e.advanceNextNonspace(),e.advanceOffset(n,!1),2}return 0},function(e,t){if(!e.indented&&60===ut(e.currentLine,e.nextNonspace)){var n,r=e.currentLine.slice(e.nextNonspace);for(n=1;n<=7;n++)if(Xe[n].test(r)&&(n<7||"paragraph"!==t.type&&(e.allClosed||e.blank||"paragraph"!==e.tip.type)))return e.closeUnmatchedBlocks(),e.addChild("html_block",e.offset)._htmlBlockType=n,2}return 0},function(e,t){var n;if(!e.indented&&"paragraph"===t.type&&(n=e.currentLine.slice(e.nextNonspace).match(st))){var r;for(e.closeUnmatchedBlocks();91===ut(t._string_content,0)&&(r=e.inlineParser.parseReference(t._string_content,e.refmap));)t._string_content=t._string_content.slice(r);if(t._string_content.length>0){var i=new a("heading",t.sourcepos);return i.level="="===n[0][0]?1:2,i._string_content=t._string_content,t.insertAfter(i),t.unlink(),e.tip=i,e.advanceOffset(e.currentLine.length-e.offset,!1),2}return 0}return 0},function(e){return!e.indented&&Je.test(e.currentLine.slice(e.nextNonspace))?(e.closeUnmatchedBlocks(),e.addChild("thematic_break",e.nextNonspace),e.advanceOffset(e.currentLine.length-e.offset,!1),2):0},function(e,t){var n,r,i;return e.indented&&"list"!==t.type||!(n=function(e,t){var n,r,i,o,a=e.currentLine.slice(e.nextNonspace),s={type:null,tight:!0,bulletChar:null,start:null,delimiter:null,padding:null,markerOffset:e.indent};if(e.indent>=4)return null;if(n=a.match(nt))s.type="bullet",s.bulletChar=n[0][0];else{if(!(n=a.match(rt))||"paragraph"===t.type&&1!=n[1])return null;s.type="ordered",s.start=parseInt(n[1]),s.delimiter=n[2]}if(-1!==(r=ut(e.currentLine,e.nextNonspace+n[0].length))&&9!==r&&32!==r)return null;if("paragraph"===t.type&&!e.currentLine.slice(e.nextNonspace+n[0].length).match(tt))return null;e.advanceNextNonspace(),e.advanceOffset(n[0].length,!0),i=e.column,o=e.offset;do{e.advanceOffset(1,!0),r=ut(e.currentLine,e.offset)}while(e.column-i<5&&ct(r));var l=-1===ut(e.currentLine,e.offset),c=e.column-i;return c>=5||c<1||l?(s.padding=n[0].length+1,e.column=i,e.offset=o,ct(ut(e.currentLine,e.offset))&&e.advanceOffset(1,!0)):s.padding=n[0].length+c,s}(e,t))?0:(e.closeUnmatchedBlocks(),"list"===e.tip.type&&(r=t._listData,i=n,r.type===i.type&&r.delimiter===i.delimiter&&r.bulletChar===i.bulletChar)||((t=e.addChild("list",e.nextNonspace))._listData=n),(t=e.addChild("item",e.nextNonspace))._listData=n,1)},function(e){return e.indented&&"paragraph"!==e.tip.type&&!e.blank?(e.advanceOffset(4,!0),e.closeUnmatchedBlocks(),e.addChild("code_block",e.offset),2):0}],_t=function(e,t){for(var n,r,i,o=this.currentLine;e>0&&(i=o[this.offset]);)"\t"===i?(n=4-this.column%4,t?(this.partiallyConsumedTab=n>e,r=n>e?e:n,this.column+=r,this.offset+=this.partiallyConsumedTab?0:1,e-=r):(this.partiallyConsumedTab=!1,this.column+=n,this.offset+=1,e-=1)):(this.partiallyConsumedTab=!1,this.offset+=1,this.column+=1,e-=1)},bt=function(){this.offset=this.nextNonspace,this.column=this.nextNonspaceColumn,this.partiallyConsumedTab=!1},vt=function(){for(var e,t=this.currentLine,n=this.offset,r=this.column;""!==(e=t.charAt(n));)if(" "===e)n++,r++;else{if("\t"!==e)break;n++,r+=4-r%4}this.blank="\n"===e||"\r"===e||""===e,this.nextNonspace=n,this.nextNonspaceColumn=r,this.indent=this.nextNonspaceColumn-this.column,this.indented=this.indent>=4},yt=function(e){var t,n,r=!0,i=this.doc;for(this.oldtip=this.tip,this.offset=0,this.column=0,this.blank=!1,this.partiallyConsumedTab=!1,this.lineNumber+=1,-1!==e.indexOf("\0")&&(e=e.replace(/\0/g,"<22>")),this.currentLine=e;(n=i._lastChild)&&n._open;){switch(i=n,this.findNextNonspace(),this.blocks[i.type].continue(this,i)){case 0:break;case 1:r=!1;break;case 2:return;default:throw"continue returned illegal value, must be 0, 1, or 2"}if(!r){i=i._parent;break}}this.allClosed=i===this.oldtip,this.lastMatchedContainer=i;for(var o="paragraph"!==i.type&>[i.type].acceptsLines,a=this.blockStarts,s=a.length;!o;){if(this.findNextNonspace(),!this.indented&&!et.test(e.slice(this.nextNonspace))){this.advanceNextNonspace();break}for(var l=0;l<s;){var c=a[l](this,i);if(1===c){i=this.tip;break}if(2===c){i=this.tip,o=!0;break}l++}if(l===s){this.advanceNextNonspace();break}}if(this.allClosed||this.blank||"paragraph"!==this.tip.type){this.closeUnmatchedBlocks(),this.blank&&i.lastChild&&(i.lastChild._lastLineBlank=!0),t=i.type;for(var u=this.blank&&!("block_quote"===t||"code_block"===t&&i._isFenced||"item"===t&&!i._firstChild&&i.sourcepos[0][0]===this.lineNumber),d=i;d;)d._lastLineBlank=u,d=d._parent;this.blocks[t].acceptsLines?(this.addLine(),"html_block"===t&&i._htmlBlockType>=1&&i._htmlBlockType<=5&&Ze[i._htmlBlockType].test(this.currentLine.slice(this.offset))&&(this.lastLineLength=e.length,this.finalize(i,this.lineNumber))):this.offset<e.length&&!this.blank&&(i=this.addChild("paragraph",this.offset),this.advanceNextNonspace(),this.addLine())}else this.addLine();this.lastLineLength=e.length},Et=function(e,t){var n=e._parent;e._open=!1,e.sourcepos[1]=[t,this.lastLineLength],this.blocks[e.type].finalize(this,e),this.tip=n},St=function(e){var t,n,r,i=e.walker();for(this.inlineParser.refmap=this.refmap,this.inlineParser.options=this.options;n=i.next();)r=(t=n.node).type,n.entering||"paragraph"!==r&&"heading"!==r||this.inlineParser.parse(t)},wt=function(){return new a("document",[[1,1],[0,0]])},Tt=function(e){this.doc=new wt,this.tip=this.doc,this.refmap={},this.lineNumber=0,this.lastLineLength=0,this.offset=0,this.column=0,this.lastMatchedContainer=this.doc,this.currentLine="",this.options.time&&console.time("preparing input");var t=e.split(lt),n=t.length;10===e.charCodeAt(e.length-1)&&(n-=1),this.options.time&&console.timeEnd("preparing input"),this.options.time&&console.time("block parsing");for(var r=0;r<n;r++)this.incorporateLine(t[r]);for(;this.tip;)this.finalize(this.tip,n);return this.options.time&&console.timeEnd("block parsing"),this.options.time&&console.time("inline parsing"),this.processInlines(this.doc),this.options.time&&console.timeEnd("inline parsing"),this.doc};function Ct(){}Ct.prototype.render=function(e){var t,n,r=e.walker();for(this.buffer="",this.lastOut="\n";t=r.next();)this[n=t.node.type]&&this[n](t.node,t.entering);return this.buffer},Ct.prototype.out=function(e){this.lit(e)},Ct.prototype.lit=function(e){this.buffer+=e,this.lastOut=e},Ct.prototype.cr=function(){"\n"!==this.lastOut&&this.lit("\n")},Ct.prototype.esc=function(e){return e};var xt=/^javascript:|vbscript:|file:|data:/i,Ft=/^data:image\/(?:png|gif|jpeg|webp)/i,Dt=function(e){return xt.test(e)&&!Ft.test(e)};function kt(e){(e=e||{}).softbreak=e.softbreak||"\n",this.esc=e.esc||V,this.disableTags=0,this.lastOut="\n",this.options=e}kt.prototype=Object.create(Ct.prototype),kt.prototype.text=function(e){this.out(e.literal)},kt.prototype.html_inline=function(e){this.options.safe?this.lit("\x3c!-- raw HTML omitted --\x3e"):this.lit(e.literal)},kt.prototype.html_block=function(e){this.cr(),this.options.safe?this.lit("\x3c!-- raw HTML omitted --\x3e"):this.lit(e.literal),this.cr()},kt.prototype.softbreak=function(){this.lit(this.options.softbreak)},kt.prototype.linebreak=function(){this.tag("br",[],!0),this.cr()},kt.prototype.link=function(e,t){var n=this.attrs(e);t?(this.options.safe&&Dt(e.destination)||n.push(["href",this.esc(e.destination)]),e.title&&n.push(["title",this.esc(e.title)]),this.tag("a",n)):this.tag("/a")},kt.prototype.image=function(e,t){t?(0===this.disableTags&&(this.options.safe&&Dt(e.destination)?this.lit('<img src="" alt="'):this.lit('<img src="'+this.esc(e.destination)+'" alt="')),this.disableTags+=1):(this.disableTags-=1,0===this.disableTags&&(e.title&&this.lit('" title="'+this.esc(e.title)),this.lit('" />')))},kt.prototype.emph=function(e,t){this.tag(t?"em":"/em")},kt.prototype.strong=function(e,t){this.tag(t?"strong":"/strong")},kt.prototype.paragraph=function(e,t){var n=e.parent.parent,r=this.attrs(e);null!==n&&"list"===n.type&&n.listTight||(t?(this.cr(),this.tag("p",r)):(this.tag("/p"),this.cr()))},kt.prototype.heading=function(e,t){var n="h"+e.level,r=this.attrs(e);t?(this.cr(),this.tag(n,r)):(this.tag("/"+n),this.cr())},kt.prototype.code=function(e){this.tag("code"),this.out(e.literal),this.tag("/code")},kt.prototype.code_block=function(e){var t=e.info?e.info.split(/\s+/):[],n=this.attrs(e);t.length>0&&t[0].length>0&&n.push(["class","language-"+this.esc(t[0])]),this.cr(),this.tag("pre"),this.tag("code",n),this.out(e.literal),this.tag("/code"),this.tag("/pre"),this.cr()},kt.prototype.thematic_break=function(e){var t=this.attrs(e);this.cr(),this.tag("hr",t,!0),this.cr()},kt.prototype.block_quote=function(e,t){var n=this.attrs(e);t?(this.cr(),this.tag("blockquote",n),this.cr()):(this.cr(),this.tag("/blockquote"),this.cr())},kt.prototype.list=function(e,t){var n="bullet"===e.listType?"ul":"ol",r=this.attrs(e);if(t){var i=e.listStart;null!==i&&1!==i&&r.push(["start",i.toString()]),this.cr(),this.tag(n,r),this.cr()}else this.cr(),this.tag("/"+n),this.cr()},kt.prototype.item=function(e,t){var n=this.attrs(e);t?this.tag("li",n):(this.tag("/li"),this.cr())},kt.prototype.custom_inline=function(e,t){t&&e.onEnter?this.lit(e.onEnter):!t&&e.onExit&&this.lit(e.onExit)},kt.prototype.custom_block=function(e,t){this.cr(),t&&e.onEnter?this.lit(e.onEnter):!t&&e.onExit&&this.lit(e.onExit),this.cr()},kt.prototype.esc=V,kt.prototype.out=function(e){this.lit(this.esc(e))},kt.prototype.tag=function(e,t,n){if(!(this.disableTags>0)){if(this.buffer+="<"+e,t&&t.length>0)for(var r,i=0;void 0!==(r=t[i]);)this.buffer+=" "+r[0]+'="'+r[1]+'"',i++;n&&(this.buffer+=" /"),this.buffer+=">",this.lastOut=">"}},kt.prototype.attrs=function(e){var t=[];if(this.options.sourcepos){var n=e.sourcepos;n&&t.push(["data-sourcepos",String(n[0][0])+":"+String(n[0][1])+"-"+String(n[1][0])+":"+String(n[1][1])])}return t};var Ot=/\<[^>]*\>/;function It(e){e=e||{},this.disableTags=0,this.lastOut="\n",this.indentLevel=0,this.indent=" ",this.esc=e.esc||V,this.options=e}It.prototype=Object.create(Ct.prototype),It.prototype.render=function(e){var t,n;this.buffer="";var r,i,o,a,s,l,c=e.walker(),u=this.options;for(u.time&&console.time("rendering"),this.buffer+='<?xml version="1.0" encoding="UTF-8"?>\n',this.buffer+='<!DOCTYPE document SYSTEM "CommonMark.dtd">\n';r=c.next();)if(o=r.entering,l=(i=r.node).type,a=i.isContainer,s="thematic_break"===l||"linebreak"===l||"softbreak"===l,n=l.replace(/([a-z])([A-Z])/g,"$1_$2").toLowerCase(),o){switch(t=[],l){case"document":t.push(["xmlns","http://commonmark.org/xml/1.0"]);break;case"list":null!==i.listType&&t.push(["type",i.listType.toLowerCase()]),null!==i.listStart&&t.push(["start",String(i.listStart)]),null!==i.listTight&&t.push(["tight",i.listTight?"true":"false"]);var d=i.listDelimiter;if(null!==d){var h="";h="."===d?"period":"paren",t.push(["delimiter",h])}break;case"code_block":i.info&&t.push(["info",i.info]);break;case"heading":t.push(["level",String(i.level)]);break;case"link":case"image":t.push(["destination",i.destination]),t.push(["title",i.title]);break;case"custom_inline":case"custom_block":t.push(["on_enter",i.onEnter]),t.push(["on_exit",i.onExit])}if(u.sourcepos){var p=i.sourcepos;p&&t.push(["sourcepos",String(p[0][0])+":"+String(p[0][1])+"-"+String(p[1][0])+":"+String(p[1][1])])}if(this.cr(),this.out(this.tag(n,t,s)),a)this.indentLevel+=1;else if(!a&&!s){var m=i.literal;m&&this.out(this.esc(m)),this.out(this.tag("/"+n))}}else this.indentLevel-=1,this.cr(),this.out(this.tag("/"+n));return u.time&&console.timeEnd("rendering"),this.buffer+="\n",this.buffer},It.prototype.out=function(e){this.disableTags>0?this.buffer+=e.replace(Ot,""):this.buffer+=e,this.lastOut=e},It.prototype.cr=function(){if("\n"!==this.lastOut){this.buffer+="\n",this.lastOut="\n";for(var e=this.indentLevel;e>0;e--)this.buffer+=this.indent}},It.prototype.tag=function(e,t,n){var r="<"+e;if(t&&t.length>0)for(var i,o=0;void 0!==(i=t[o]);)r+=" "+i[0]+'="'+this.esc(i[1])+'"',o++;return n&&(r+=" /"),r+=">"},It.prototype.esc=V,t.HtmlRenderer=kt,t.Node=a,t.Parser=function(e){return{doc:new wt,blocks:gt,blockStarts:ft,tip:this.doc,oldtip:this.doc,currentLine:"",lineNumber:0,offset:0,column:0,nextNonspace:0,nextNonspaceColumn:0,indent:0,indented:!1,blank:!1,partiallyConsumedTab:!1,allClosed:!0,lastMatchedContainer:this.doc,refmap:{},lastLineLength:0,inlineParser:new Qe(e),findNextNonspace:vt,advanceOffset:_t,advanceNextNonspace:bt,addLine:ht,addChild:pt,incorporateLine:yt,finalize:Et,processInlines:St,closeUnmatchedBlocks:mt,parse:Tt,options:e||{}}},t.Renderer=Ct,t.XmlRenderer=It,Object.defineProperty(t,"__esModule",{value:!0})},n(t)}).call(this,n(14))},function(e,t,n){"use strict";const r=n(1347),i=n(1358);t.parse=function(e,t){return new r(t).parse(e)},t.parseFragment=function(e,t,n){"string"==typeof e&&(n=t,t=e,e=null);return new r(n).parseFragment(t,e)},t.serialize=function(e,t){return new i(e,t).serialize()}},function(e,t,n){"use strict";const r=n(454),i=n(1350),o=n(1351),a=n(1352),s=n(1354),l=n(262),c=n(764),u=n(765),d=n(766),h=n(1357),p=n(572),m=n(571),g=n(302),f=g.TAG_NAMES,_=g.NAMESPACES,b=g.ATTRS,v={scriptingEnabled:!0,sourceCodeLocationInfo:!1,onParseError:null,treeAdapter:c},y="hidden",E=8,S=3,w="INITIAL_MODE",T="BEFORE_HTML_MODE",C="BEFORE_HEAD_MODE",x="IN_HEAD_MODE",F="IN_HEAD_NO_SCRIPT_MODE",D="AFTER_HEAD_MODE",k="IN_BODY_MODE",O="TEXT_MODE",I="IN_TABLE_MODE",A="IN_TABLE_TEXT_MODE",R="IN_CAPTION_MODE",N="IN_COLUMN_GROUP_MODE",M="IN_TABLE_BODY_MODE",P="IN_ROW_MODE",L="IN_CELL_MODE",B="IN_SELECT_MODE",U="IN_SELECT_IN_TABLE_MODE",j="IN_TEMPLATE_MODE",G="AFTER_BODY_MODE",z="IN_FRAMESET_MODE",H="AFTER_FRAMESET_MODE",q="AFTER_AFTER_BODY_MODE",V="AFTER_AFTER_FRAMESET_MODE",$={[f.TR]:P,[f.TBODY]:M,[f.THEAD]:M,[f.TFOOT]:M,[f.CAPTION]:R,[f.COLGROUP]:N,[f.TABLE]:I,[f.BODY]:k,[f.FRAMESET]:z},K={[f.CAPTION]:I,[f.COLGROUP]:I,[f.TBODY]:I,[f.TFOOT]:I,[f.THEAD]:I,[f.COL]:N,[f.TR]:M,[f.TD]:P,[f.TH]:P},W={[w]:{[r.CHARACTER_TOKEN]:le,[r.NULL_CHARACTER_TOKEN]:le,[r.WHITESPACE_CHARACTER_TOKEN]:ne,[r.COMMENT_TOKEN]:ie,[r.DOCTYPE_TOKEN]:function(e,t){e._setDocumentType(t);const n=t.forceQuirks?g.DOCUMENT_MODE.QUIRKS:d.getDocumentMode(t);d.isConforming(t)||e._err(p.nonConformingDoctype);e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=T},[r.START_TAG_TOKEN]:le,[r.END_TAG_TOKEN]:le,[r.EOF_TOKEN]:le},[T]:{[r.CHARACTER_TOKEN]:ce,[r.NULL_CHARACTER_TOKEN]:ce,[r.WHITESPACE_CHARACTER_TOKEN]:ne,[r.COMMENT_TOKEN]:ie,[r.DOCTYPE_TOKEN]:ne,[r.START_TAG_TOKEN]:function(e,t){t.tagName===f.HTML?(e._insertElement(t,_.HTML),e.insertionMode=C):ce(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n!==f.HTML&&n!==f.HEAD&&n!==f.BODY&&n!==f.BR||ce(e,t)},[r.EOF_TOKEN]:ce},[C]:{[r.CHARACTER_TOKEN]:ue,[r.NULL_CHARACTER_TOKEN]:ue,[r.WHITESPACE_CHARACTER_TOKEN]:ne,[r.COMMENT_TOKEN]:ie,[r.DOCTYPE_TOKEN]:re,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.HTML?De(e,t):n===f.HEAD?(e._insertElement(t,_.HTML),e.headElement=e.openElements.current,e.insertionMode=x):ue(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.HEAD||n===f.BODY||n===f.HTML||n===f.BR?ue(e,t):e._err(p.endTagWithoutMatchingOpenElement)},[r.EOF_TOKEN]:ue},[x]:{[r.CHARACTER_TOKEN]:pe,[r.NULL_CHARACTER_TOKEN]:pe,[r.WHITESPACE_CHARACTER_TOKEN]:ae,[r.COMMENT_TOKEN]:ie,[r.DOCTYPE_TOKEN]:re,[r.START_TAG_TOKEN]:de,[r.END_TAG_TOKEN]:he,[r.EOF_TOKEN]:pe},[F]:{[r.CHARACTER_TOKEN]:me,[r.NULL_CHARACTER_TOKEN]:me,[r.WHITESPACE_CHARACTER_TOKEN]:ae,[r.COMMENT_TOKEN]:ie,[r.DOCTYPE_TOKEN]:re,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.HTML?De(e,t):n===f.BASEFONT||n===f.BGSOUND||n===f.HEAD||n===f.LINK||n===f.META||n===f.NOFRAMES||n===f.STYLE?de(e,t):n===f.NOSCRIPT?e._err(p.nestedNoscriptInHead):me(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.NOSCRIPT?(e.openElements.pop(),e.insertionMode=x):n===f.BR?me(e,t):e._err(p.endTagWithoutMatchingOpenElement)},[r.EOF_TOKEN]:me},[D]:{[r.CHARACTER_TOKEN]:ge,[r.NULL_CHARACTER_TOKEN]:ge,[r.WHITESPACE_CHARACTER_TOKEN]:ae,[r.COMMENT_TOKEN]:ie,[r.DOCTYPE_TOKEN]:re,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.HTML?De(e,t):n===f.BODY?(e._insertElement(t,_.HTML),e.framesetOk=!1,e.insertionMode=k):n===f.FRAMESET?(e._insertElement(t,_.HTML),e.insertionMode=z):n===f.BASE||n===f.BASEFONT||n===f.BGSOUND||n===f.LINK||n===f.META||n===f.NOFRAMES||n===f.SCRIPT||n===f.STYLE||n===f.TEMPLATE||n===f.TITLE?(e._err(p.abandonedHeadElementChild),e.openElements.push(e.headElement),de(e,t),e.openElements.remove(e.headElement)):n===f.HEAD?e._err(p.misplacedStartTagForHeadElement):ge(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.BODY||n===f.HTML||n===f.BR?ge(e,t):n===f.TEMPLATE?he(e,t):e._err(p.endTagWithoutMatchingOpenElement)},[r.EOF_TOKEN]:ge},[k]:{[r.CHARACTER_TOKEN]:_e,[r.NULL_CHARACTER_TOKEN]:ne,[r.WHITESPACE_CHARACTER_TOKEN]:fe,[r.COMMENT_TOKEN]:ie,[r.DOCTYPE_TOKEN]:ne,[r.START_TAG_TOKEN]:De,[r.END_TAG_TOKEN]:Ae,[r.EOF_TOKEN]:Re},[O]:{[r.CHARACTER_TOKEN]:ae,[r.NULL_CHARACTER_TOKEN]:ae,[r.WHITESPACE_CHARACTER_TOKEN]:ae,[r.COMMENT_TOKEN]:ne,[r.DOCTYPE_TOKEN]:ne,[r.START_TAG_TOKEN]:ne,[r.END_TAG_TOKEN]:function(e,t){t.tagName===f.SCRIPT&&(e.pendingScript=e.openElements.current);e.openElements.pop(),e.insertionMode=e.originalInsertionMode},[r.EOF_TOKEN]:function(e,t){e._err(p.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e._processToken(t)}},[I]:{[r.CHARACTER_TOKEN]:Ne,[r.NULL_CHARACTER_TOKEN]:Ne,[r.WHITESPACE_CHARACTER_TOKEN]:Ne,[r.COMMENT_TOKEN]:ie,[r.DOCTYPE_TOKEN]:ne,[r.START_TAG_TOKEN]:Me,[r.END_TAG_TOKEN]:Pe,[r.EOF_TOKEN]:Re},[A]:{[r.CHARACTER_TOKEN]:function(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0},[r.NULL_CHARACTER_TOKEN]:ne,[r.WHITESPACE_CHARACTER_TOKEN]:function(e,t){e.pendingCharacterTokens.push(t)},[r.COMMENT_TOKEN]:Be,[r.DOCTYPE_TOKEN]:Be,[r.START_TAG_TOKEN]:Be,[r.END_TAG_TOKEN]:Be,[r.EOF_TOKEN]:Be},[R]:{[r.CHARACTER_TOKEN]:_e,[r.NULL_CHARACTER_TOKEN]:ne,[r.WHITESPACE_CHARACTER_TOKEN]:fe,[r.COMMENT_TOKEN]:ie,[r.DOCTYPE_TOKEN]:ne,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.CAPTION||n===f.COL||n===f.COLGROUP||n===f.TBODY||n===f.TD||n===f.TFOOT||n===f.TH||n===f.THEAD||n===f.TR?e.openElements.hasInTableScope(f.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=I,e._processToken(t)):De(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.CAPTION||n===f.TABLE?e.openElements.hasInTableScope(f.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=I,n===f.TABLE&&e._processToken(t)):n!==f.BODY&&n!==f.COL&&n!==f.COLGROUP&&n!==f.HTML&&n!==f.TBODY&&n!==f.TD&&n!==f.TFOOT&&n!==f.TH&&n!==f.THEAD&&n!==f.TR&&Ae(e,t)},[r.EOF_TOKEN]:Re},[N]:{[r.CHARACTER_TOKEN]:Ue,[r.NULL_CHARACTER_TOKEN]:Ue,[r.WHITESPACE_CHARACTER_TOKEN]:ae,[r.COMMENT_TOKEN]:ie,[r.DOCTYPE_TOKEN]:ne,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.HTML?De(e,t):n===f.COL?(e._appendElement(t,_.HTML),t.ackSelfClosing=!0):n===f.TEMPLATE?de(e,t):Ue(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.COLGROUP?e.openElements.currentTagName===f.COLGROUP&&(e.openElements.pop(),e.insertionMode=I):n===f.TEMPLATE?he(e,t):n!==f.COL&&Ue(e,t)},[r.EOF_TOKEN]:Re},[M]:{[r.CHARACTER_TOKEN]:Ne,[r.NULL_CHARACTER_TOKEN]:Ne,[r.WHITESPACE_CHARACTER_TOKEN]:Ne,[r.COMMENT_TOKEN]:ie,[r.DOCTYPE_TOKEN]:ne,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.TR?(e.openElements.clearBackToTableBodyContext(),e._insertElement(t,_.HTML),e.insertionMode=P):n===f.TH||n===f.TD?(e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(f.TR),e.insertionMode=P,e._processToken(t)):n===f.CAPTION||n===f.COL||n===f.COLGROUP||n===f.TBODY||n===f.TFOOT||n===f.THEAD?e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=I,e._processToken(t)):Me(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.TBODY||n===f.TFOOT||n===f.THEAD?e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=I):n===f.TABLE?e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=I,e._processToken(t)):(n!==f.BODY&&n!==f.CAPTION&&n!==f.COL&&n!==f.COLGROUP||n!==f.HTML&&n!==f.TD&&n!==f.TH&&n!==f.TR)&&Pe(e,t)},[r.EOF_TOKEN]:Re},[P]:{[r.CHARACTER_TOKEN]:Ne,[r.NULL_CHARACTER_TOKEN]:Ne,[r.WHITESPACE_CHARACTER_TOKEN]:Ne,[r.COMMENT_TOKEN]:ie,[r.DOCTYPE_TOKEN]:ne,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.TH||n===f.TD?(e.openElements.clearBackToTableRowContext(),e._insertElement(t,_.HTML),e.insertionMode=L,e.activeFormattingElements.insertMarker()):n===f.CAPTION||n===f.COL||n===f.COLGROUP||n===f.TBODY||n===f.TFOOT||n===f.THEAD||n===f.TR?e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M,e._processToken(t)):Me(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.TR?e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M):n===f.TABLE?e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M,e._processToken(t)):n===f.TBODY||n===f.TFOOT||n===f.THEAD?(e.openElements.hasInTableScope(n)||e.openElements.hasInTableScope(f.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M,e._processToken(t)):(n!==f.BODY&&n!==f.CAPTION&&n!==f.COL&&n!==f.COLGROUP||n!==f.HTML&&n!==f.TD&&n!==f.TH)&&Pe(e,t)},[r.EOF_TOKEN]:Re},[L]:{[r.CHARACTER_TOKEN]:_e,[r.NULL_CHARACTER_TOKEN]:ne,[r.WHITESPACE_CHARACTER_TOKEN]:fe,[r.COMMENT_TOKEN]:ie,[r.DOCTYPE_TOKEN]:ne,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.CAPTION||n===f.COL||n===f.COLGROUP||n===f.TBODY||n===f.TD||n===f.TFOOT||n===f.TH||n===f.THEAD||n===f.TR?(e.openElements.hasInTableScope(f.TD)||e.openElements.hasInTableScope(f.TH))&&(e._closeTableCell(),e._processToken(t)):De(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.TD||n===f.TH?e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P):n===f.TABLE||n===f.TBODY||n===f.TFOOT||n===f.THEAD||n===f.TR?e.openElements.hasInTableScope(n)&&(e._closeTableCell(),e._processToken(t)):n!==f.BODY&&n!==f.CAPTION&&n!==f.COL&&n!==f.COLGROUP&&n!==f.HTML&&Ae(e,t)},[r.EOF_TOKEN]:Re},[B]:{[r.CHARACTER_TOKEN]:ae,[r.NULL_CHARACTER_TOKEN]:ne,[r.WHITESPACE_CHARACTER_TOKEN]:ae,[r.COMMENT_TOKEN]:ie,[r.DOCTYPE_TOKEN]:ne,[r.START_TAG_TOKEN]:je,[r.END_TAG_TOKEN]:Ge,[r.EOF_TOKEN]:Re},[U]:{[r.CHARACTER_TOKEN]:ae,[r.NULL_CHARACTER_TOKEN]:ne,[r.WHITESPACE_CHARACTER_TOKEN]:ae,[r.COMMENT_TOKEN]:ie,[r.DOCTYPE_TOKEN]:ne,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.CAPTION||n===f.TABLE||n===f.TBODY||n===f.TFOOT||n===f.THEAD||n===f.TR||n===f.TD||n===f.TH?(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),e._processToken(t)):je(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.CAPTION||n===f.TABLE||n===f.TBODY||n===f.TFOOT||n===f.THEAD||n===f.TR||n===f.TD||n===f.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),e._processToken(t)):Ge(e,t)},[r.EOF_TOKEN]:Re},[j]:{[r.CHARACTER_TOKEN]:_e,[r.NULL_CHARACTER_TOKEN]:ne,[r.WHITESPACE_CHARACTER_TOKEN]:fe,[r.COMMENT_TOKEN]:ie,[r.DOCTYPE_TOKEN]:ne,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;if(n===f.BASE||n===f.BASEFONT||n===f.BGSOUND||n===f.LINK||n===f.META||n===f.NOFRAMES||n===f.SCRIPT||n===f.STYLE||n===f.TEMPLATE||n===f.TITLE)de(e,t);else{const r=K[n]||k;e._popTmplInsertionMode(),e._pushTmplInsertionMode(r),e.insertionMode=r,e._processToken(t)}},[r.END_TAG_TOKEN]:function(e,t){t.tagName===f.TEMPLATE&&he(e,t)},[r.EOF_TOKEN]:ze},[G]:{[r.CHARACTER_TOKEN]:He,[r.NULL_CHARACTER_TOKEN]:He,[r.WHITESPACE_CHARACTER_TOKEN]:fe,[r.COMMENT_TOKEN]:function(e,t){e._appendCommentNode(t,e.openElements.items[0])},[r.DOCTYPE_TOKEN]:ne,[r.START_TAG_TOKEN]:function(e,t){t.tagName===f.HTML?De(e,t):He(e,t)},[r.END_TAG_TOKEN]:function(e,t){t.tagName===f.HTML?e.fragmentContext||(e.insertionMode=q):He(e,t)},[r.EOF_TOKEN]:se},[z]:{[r.CHARACTER_TOKEN]:ne,[r.NULL_CHARACTER_TOKEN]:ne,[r.WHITESPACE_CHARACTER_TOKEN]:ae,[r.COMMENT_TOKEN]:ie,[r.DOCTYPE_TOKEN]:ne,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.HTML?De(e,t):n===f.FRAMESET?e._insertElement(t,_.HTML):n===f.FRAME?(e._appendElement(t,_.HTML),t.ackSelfClosing=!0):n===f.NOFRAMES&&de(e,t)},[r.END_TAG_TOKEN]:function(e,t){t.tagName!==f.FRAMESET||e.openElements.isRootHtmlElementCurrent()||(e.openElements.pop(),e.fragmentContext||e.openElements.currentTagName===f.FRAMESET||(e.insertionMode=H))},[r.EOF_TOKEN]:se},[H]:{[r.CHARACTER_TOKEN]:ne,[r.NULL_CHARACTER_TOKEN]:ne,[r.WHITESPACE_CHARACTER_TOKEN]:ae,[r.COMMENT_TOKEN]:ie,[r.DOCTYPE_TOKEN]:ne,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.HTML?De(e,t):n===f.NOFRAMES&&de(e,t)},[r.END_TAG_TOKEN]:function(e,t){t.tagName===f.HTML&&(e.insertionMode=V)},[r.EOF_TOKEN]:se},[q]:{[r.CHARACTER_TOKEN]:qe,[r.NULL_CHARACTER_TOKEN]:qe,[r.WHITESPACE_CHARACTER_TOKEN]:fe,[r.COMMENT_TOKEN]:oe,[r.DOCTYPE_TOKEN]:ne,[r.START_TAG_TOKEN]:function(e,t){t.tagName===f.HTML?De(e,t):qe(e,t)},[r.END_TAG_TOKEN]:qe,[r.EOF_TOKEN]:se},[V]:{[r.CHARACTER_TOKEN]:ne,[r.NULL_CHARACTER_TOKEN]:ne,[r.WHITESPACE_CHARACTER_TOKEN]:fe,[r.COMMENT_TOKEN]:oe,[r.DOCTYPE_TOKEN]:ne,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===f.HTML?De(e,t):n===f.NOFRAMES&&de(e,t)},[r.END_TAG_TOKEN]:ne,[r.EOF_TOKEN]:se}};function Y(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagName)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):Ie(e,t),n}function Q(e,t){let n=null;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i)&&(n=i)}return n||(e.openElements.popUntilElementPopped(t.element),e.activeFormattingElements.removeEntry(t)),n}function X(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let o=0,a=i;a!==n;o++,a=i){i=e.openElements.getCommonAncestor(a);const n=e.activeFormattingElements.getElementEntry(a),s=n&&o>=S;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(a)):(a=Z(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function Z(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function J(e,t,n){if(e._isElementCausesFosterParenting(t))e._fosterParentElement(n);else{const r=e.treeAdapter.getTagName(t),i=e.treeAdapter.getNamespaceURI(t);r===f.TEMPLATE&&i===_.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function ee(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),i=n.token,o=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,o),e.treeAdapter.appendChild(t,o),e.activeFormattingElements.insertElementAfterBookmark(o,n.token),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,o)}function te(e,t){let n;for(let r=0;r<E&&(n=Y(e,t),n);r++){const t=Q(e,n);if(!t)break;e.activeFormattingElements.bookmark=n;const r=X(e,t,n.element),i=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(r),J(e,i,r),ee(e,t,n)}}function ne(){}function re(e){e._err(p.misplacedDoctype)}function ie(e,t){e._appendCommentNode(t,e.openElements.currentTmplContent||e.openElements.current)}function oe(e,t){e._appendCommentNode(t,e.document)}function ae(e,t){e._insertCharacters(t)}function se(e){e.stopped=!0}function le(e,t){e._err(p.missingDoctype,{beforeToken:!0}),e.treeAdapter.setDocumentMode(e.document,g.DOCUMENT_MODE.QUIRKS),e.insertionMode=T,e._processToken(t)}function ce(e,t){e._insertFakeRootElement(),e.insertionMode=C,e._processToken(t)}function ue(e,t){e._insertFakeElement(f.HEAD),e.headElement=e.openElements.current,e.insertionMode=x,e._processToken(t)}function de(e,t){const n=t.tagName;n===f.HTML?De(e,t):n===f.BASE||n===f.BASEFONT||n===f.BGSOUND||n===f.LINK||n===f.META?(e._appendElement(t,_.HTML),t.ackSelfClosing=!0):n===f.TITLE?e._switchToTextParsing(t,r.MODE.RCDATA):n===f.NOSCRIPT?e.options.scriptingEnabled?e._switchToTextParsing(t,r.MODE.RAWTEXT):(e._insertElement(t,_.HTML),e.insertionMode=F):n===f.NOFRAMES||n===f.STYLE?e._switchToTextParsing(t,r.MODE.RAWTEXT):n===f.SCRIPT?e._switchToTextParsing(t,r.MODE.SCRIPT_DATA):n===f.TEMPLATE?(e._insertTemplate(t,_.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=j,e._pushTmplInsertionMode(j)):n===f.HEAD?e._err(p.misplacedStartTagForHeadElement):pe(e,t)}function he(e,t){const n=t.tagName;n===f.HEAD?(e.openElements.pop(),e.insertionMode=D):n===f.BODY||n===f.BR||n===f.HTML?pe(e,t):n===f.TEMPLATE&&e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagName!==f.TEMPLATE&&e._err(p.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(f.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e._popTmplInsertionMode(),e._resetInsertionMode()):e._err(p.endTagWithoutMatchingOpenElement)}function pe(e,t){e.openElements.pop(),e.insertionMode=D,e._processToken(t)}function me(e,t){const n=t.type===r.EOF_TOKEN?p.openElementsLeftAfterEof:p.disallowedContentInNoscriptInHead;e._err(n),e.openElements.pop(),e.insertionMode=x,e._processToken(t)}function ge(e,t){e._insertFakeElement(f.BODY),e.insertionMode=k,e._processToken(t)}function fe(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function _e(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function be(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,_.HTML)}function ve(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,_.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function ye(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,_.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Ee(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,_.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Se(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,_.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function we(e,t){e._appendElement(t,_.HTML),t.ackSelfClosing=!0}function Te(e,t){e._switchToTextParsing(t,r.MODE.RAWTEXT)}function Ce(e,t){e.openElements.currentTagName===f.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,_.HTML)}function xe(e,t){e.openElements.hasInScope(f.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,_.HTML)}function Fe(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,_.HTML)}function De(e,t){const n=t.tagName;switch(n.length){case 1:n===f.I||n===f.S||n===f.B||n===f.U?ye(e,t):n===f.P?be(e,t):n===f.A?function(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(f.A);n&&(te(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,_.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t):Fe(e,t);break;case 2:n===f.DL||n===f.OL||n===f.UL?be(e,t):n===f.H1||n===f.H2||n===f.H3||n===f.H4||n===f.H5||n===f.H6?function(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement();const n=e.openElements.currentTagName;n!==f.H1&&n!==f.H2&&n!==f.H3&&n!==f.H4&&n!==f.H5&&n!==f.H6||e.openElements.pop(),e._insertElement(t,_.HTML)}(e,t):n===f.LI||n===f.DD||n===f.DT?function(e,t){e.framesetOk=!1;const n=t.tagName;for(let t=e.openElements.stackTop;t>=0;t--){const r=e.openElements.items[t],i=e.treeAdapter.getTagName(r);let o=null;if(n===f.LI&&i===f.LI?o=f.LI:n!==f.DD&&n!==f.DT||i!==f.DD&&i!==f.DT||(o=i),o){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(i!==f.ADDRESS&&i!==f.DIV&&i!==f.P&&e._isSpecialElement(r))break}e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,_.HTML)}(e,t):n===f.EM||n===f.TT?ye(e,t):n===f.BR?Se(e,t):n===f.HR?function(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._appendElement(t,_.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}(e,t):n===f.RB?xe(e,t):n===f.RT||n===f.RP?function(e,t){e.openElements.hasInScope(f.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(f.RTC),e._insertElement(t,_.HTML)}(e,t):n!==f.TH&&n!==f.TD&&n!==f.TR&&Fe(e,t);break;case 3:n===f.DIV||n===f.DIR||n===f.NAV?be(e,t):n===f.PRE?ve(e,t):n===f.BIG?ye(e,t):n===f.IMG||n===f.WBR?Se(e,t):n===f.XMP?function(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,r.MODE.RAWTEXT)}(e,t):n===f.SVG?function(e,t){e._reconstructActiveFormattingElements(),h.adjustTokenSVGAttrs(t),h.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,_.SVG):e._insertElement(t,_.SVG),t.ackSelfClosing=!0}(e,t):n===f.RTC?xe(e,t):n!==f.COL&&Fe(e,t);break;case 4:n===f.HTML?function(e,t){0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}(e,t):n===f.BASE||n===f.LINK||n===f.META?de(e,t):n===f.BODY?function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}(e,t):n===f.MAIN||n===f.MENU?be(e,t):n===f.FORM?function(e,t){const n=e.openElements.tmplCount>0;e.formElement&&!n||(e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,_.HTML),n||(e.formElement=e.openElements.current))}(e,t):n===f.CODE||n===f.FONT?ye(e,t):n===f.NOBR?function(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(f.NOBR)&&(te(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,_.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t):n===f.AREA?Se(e,t):n===f.MATH?function(e,t){e._reconstructActiveFormattingElements(),h.adjustTokenMathMLAttrs(t),h.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,_.MATHML):e._insertElement(t,_.MATHML),t.ackSelfClosing=!0}(e,t):n===f.MENU?function(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,_.HTML)}(e,t):n!==f.HEAD&&Fe(e,t);break;case 5:n===f.STYLE||n===f.TITLE?de(e,t):n===f.ASIDE?be(e,t):n===f.SMALL?ye(e,t):n===f.TABLE?function(e,t){e.treeAdapter.getDocumentMode(e.document)!==g.DOCUMENT_MODE.QUIRKS&&e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,_.HTML),e.framesetOk=!1,e.insertionMode=I}(e,t):n===f.EMBED?Se(e,t):n===f.INPUT?function(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,_.HTML);const n=r.getTokenAttr(t,b.TYPE);n&&n.toLowerCase()===y||(e.framesetOk=!1),t.ackSelfClosing=!0}(e,t):n===f.PARAM||n===f.TRACK?we(e,t):n===f.IMAGE?function(e,t){t.tagName=f.IMG,Se(e,t)}(e,t):n!==f.FRAME&&n!==f.TBODY&&n!==f.TFOOT&&n!==f.THEAD&&Fe(e,t);break;case 6:n===f.SCRIPT?de(e,t):n===f.CENTER||n===f.FIGURE||n===f.FOOTER||n===f.HEADER||n===f.HGROUP||n===f.DIALOG?be(e,t):n===f.BUTTON?function(e,t){e.openElements.hasInScope(f.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,_.HTML),e.framesetOk=!1}(e,t):n===f.STRIKE||n===f.STRONG?ye(e,t):n===f.APPLET||n===f.OBJECT?Ee(e,t):n===f.KEYGEN?Se(e,t):n===f.SOURCE?we(e,t):n===f.IFRAME?function(e,t){e.framesetOk=!1,e._switchToTextParsing(t,r.MODE.RAWTEXT)}(e,t):n===f.SELECT?function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,_.HTML),e.framesetOk=!1,e.insertionMode===I||e.insertionMode===R||e.insertionMode===M||e.insertionMode===P||e.insertionMode===L?e.insertionMode=U:e.insertionMode=B}(e,t):n===f.OPTION?Ce(e,t):Fe(e,t);break;case 7:n===f.BGSOUND?de(e,t):n===f.DETAILS||n===f.ADDRESS||n===f.ARTICLE||n===f.SECTION||n===f.SUMMARY?be(e,t):n===f.LISTING?ve(e,t):n===f.MARQUEE?Ee(e,t):n===f.NOEMBED?Te(e,t):n!==f.CAPTION&&Fe(e,t);break;case 8:n===f.BASEFONT?de(e,t):n===f.FRAMESET?function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,_.HTML),e.insertionMode=z)}(e,t):n===f.FIELDSET?be(e,t):n===f.TEXTAREA?function(e,t){e._insertElement(t,_.HTML),e.skipNextNewLine=!0,e.tokenizer.state=r.MODE.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=O}(e,t):n===f.TEMPLATE?de(e,t):n===f.NOSCRIPT?e.options.scriptingEnabled?Te(e,t):Fe(e,t):n===f.OPTGROUP?Ce(e,t):n!==f.COLGROUP&&Fe(e,t);break;case 9:n===f.PLAINTEXT?function(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,_.HTML),e.tokenizer.state=r.MODE.PLAINTEXT}(e,t):Fe(e,t);break;case 10:n===f.BLOCKQUOTE||n===f.FIGCAPTION?be(e,t):Fe(e,t);break;default:Fe(e,t)}}function ke(e,t){const n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Oe(e,t){const n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Ie(e,t){const n=t.tagName;for(let t=e.openElements.stackTop;t>0;t--){const r=e.openElements.items[t];if(e.treeAdapter.getTagName(r)===n){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilElementPopped(r);break}if(e._isSpecialElement(r))break}}function Ae(e,t){const n=t.tagName;switch(n.length){case 1:n===f.A||n===f.B||n===f.I||n===f.S||n===f.U?te(e,t):n===f.P?function(e){e.openElements.hasInButtonScope(f.P)||e._insertFakeElement(f.P),e._closePElement()}(e):Ie(e,t);break;case 2:n===f.DL||n===f.UL||n===f.OL?ke(e,t):n===f.LI?function(e){e.openElements.hasInListItemScope(f.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(f.LI),e.openElements.popUntilTagNamePopped(f.LI))}(e):n===f.DD||n===f.DT?function(e,t){const n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}(e,t):n===f.H1||n===f.H2||n===f.H3||n===f.H4||n===f.H5||n===f.H6?function(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}(e):n===f.BR?function(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(f.BR),e.openElements.pop(),e.framesetOk=!1}(e):n===f.EM||n===f.TT?te(e,t):Ie(e,t);break;case 3:n===f.BIG?te(e,t):n===f.DIR||n===f.DIV||n===f.NAV||n===f.PRE?ke(e,t):Ie(e,t);break;case 4:n===f.BODY?function(e){e.openElements.hasInScope(f.BODY)&&(e.insertionMode=G)}(e):n===f.HTML?function(e,t){e.openElements.hasInScope(f.BODY)&&(e.insertionMode=G,e._processToken(t))}(e,t):n===f.FORM?function(e){const t=e.openElements.tmplCount>0,n=e.formElement;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(f.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(f.FORM):e.openElements.remove(n))}(e):n===f.CODE||n===f.FONT||n===f.NOBR?te(e,t):n===f.MAIN||n===f.MENU?ke(e,t):Ie(e,t);break;case 5:n===f.ASIDE?ke(e,t):n===f.SMALL?te(e,t):Ie(e,t);break;case 6:n===f.CENTER||n===f.FIGURE||n===f.FOOTER||n===f.HEADER||n===f.HGROUP||n===f.DIALOG?ke(e,t):n===f.APPLET||n===f.OBJECT?Oe(e,t):n===f.STRIKE||n===f.STRONG?te(e,t):Ie(e,t);break;case 7:n===f.ADDRESS||n===f.ARTICLE||n===f.DETAILS||n===f.SECTION||n===f.SUMMARY||n===f.LISTING?ke(e,t):n===f.MARQUEE?Oe(e,t):Ie(e,t);break;case 8:n===f.FIELDSET?ke(e,t):n===f.TEMPLATE?he(e,t):Ie(e,t);break;case 10:n===f.BLOCKQUOTE||n===f.FIGCAPTION?ke(e,t):Ie(e,t);break;default:Ie(e,t)}}function Re(e,t){e.tmplInsertionModeStackTop>-1?ze(e,t):e.stopped=!0}function Ne(e,t){const n=e.openElements.currentTagName;n===f.TABLE||n===f.TBODY||n===f.TFOOT||n===f.THEAD||n===f.TR?(e.pendingCharacterTokens=[],e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=A,e._processToken(t)):Le(e,t)}function Me(e,t){const n=t.tagName;switch(n.length){case 2:n===f.TD||n===f.TH||n===f.TR?function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(f.TBODY),e.insertionMode=M,e._processToken(t)}(e,t):Le(e,t);break;case 3:n===f.COL?function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(f.COLGROUP),e.insertionMode=N,e._processToken(t)}(e,t):Le(e,t);break;case 4:n===f.FORM?function(e,t){e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,_.HTML),e.formElement=e.openElements.current,e.openElements.pop())}(e,t):Le(e,t);break;case 5:n===f.TABLE?function(e,t){e.openElements.hasInTableScope(f.TABLE)&&(e.openElements.popUntilTagNamePopped(f.TABLE),e._resetInsertionMode(),e._processToken(t))}(e,t):n===f.STYLE?de(e,t):n===f.TBODY||n===f.TFOOT||n===f.THEAD?function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,_.HTML),e.insertionMode=M}(e,t):n===f.INPUT?function(e,t){const n=r.getTokenAttr(t,b.TYPE);n&&n.toLowerCase()===y?e._appendElement(t,_.HTML):Le(e,t),t.ackSelfClosing=!0}(e,t):Le(e,t);break;case 6:n===f.SCRIPT?de(e,t):Le(e,t);break;case 7:n===f.CAPTION?function(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,_.HTML),e.insertionMode=R}(e,t):Le(e,t);break;case 8:n===f.COLGROUP?function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,_.HTML),e.insertionMode=N}(e,t):n===f.TEMPLATE?de(e,t):Le(e,t);break;default:Le(e,t)}}function Pe(e,t){const n=t.tagName;n===f.TABLE?e.openElements.hasInTableScope(f.TABLE)&&(e.openElements.popUntilTagNamePopped(f.TABLE),e._resetInsertionMode()):n===f.TEMPLATE?he(e,t):n!==f.BODY&&n!==f.CAPTION&&n!==f.COL&&n!==f.COLGROUP&&n!==f.HTML&&n!==f.TBODY&&n!==f.TD&&n!==f.TFOOT&&n!==f.TH&&n!==f.THEAD&&n!==f.TR&&Le(e,t)}function Le(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,e._processTokenInBodyMode(t),e.fosterParentingEnabled=n}function Be(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Le(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}function Ue(e,t){e.openElements.currentTagName===f.COLGROUP&&(e.openElements.pop(),e.insertionMode=I,e._processToken(t))}function je(e,t){const n=t.tagName;n===f.HTML?De(e,t):n===f.OPTION?(e.openElements.currentTagName===f.OPTION&&e.openElements.pop(),e._insertElement(t,_.HTML)):n===f.OPTGROUP?(e.openElements.currentTagName===f.OPTION&&e.openElements.pop(),e.openElements.currentTagName===f.OPTGROUP&&e.openElements.pop(),e._insertElement(t,_.HTML)):n===f.INPUT||n===f.KEYGEN||n===f.TEXTAREA||n===f.SELECT?e.openElements.hasInSelectScope(f.SELECT)&&(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),n!==f.SELECT&&e._processToken(t)):n!==f.SCRIPT&&n!==f.TEMPLATE||de(e,t)}function Ge(e,t){const n=t.tagName;if(n===f.OPTGROUP){const t=e.openElements.items[e.openElements.stackTop-1],n=t&&e.treeAdapter.getTagName(t);e.openElements.currentTagName===f.OPTION&&n===f.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagName===f.OPTGROUP&&e.openElements.pop()}else n===f.OPTION?e.openElements.currentTagName===f.OPTION&&e.openElements.pop():n===f.SELECT&&e.openElements.hasInSelectScope(f.SELECT)?(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode()):n===f.TEMPLATE&&he(e,t)}function ze(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(f.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e._popTmplInsertionMode(),e._resetInsertionMode(),e._processToken(t)):e.stopped=!0}function He(e,t){e.insertionMode=k,e._processToken(t)}function qe(e,t){e.insertionMode=k,e._processToken(t)}e.exports=class{constructor(e){this.options=u(v,e),this.treeAdapter=this.options.treeAdapter,this.pendingScript=null,this.options.sourceCodeLocationInfo&&l.install(this,a),this.options.onParseError&&l.install(this,s,{onParseError:this.options.onParseError})}parse(e){const t=this.treeAdapter.createDocument();return this._bootstrap(t,null),this.tokenizer.write(e,!0),this._runParsingLoop(null),t}parseFragment(e,t){t||(t=this.treeAdapter.createElement(f.TEMPLATE,_.HTML,[]));const n=this.treeAdapter.createElement("documentmock",_.HTML,[]);this._bootstrap(n,t),this.treeAdapter.getTagName(t)===f.TEMPLATE&&this._pushTmplInsertionMode(j),this._initTokenizerForFragmentParsing(),this._insertFakeRootElement(),this._resetInsertionMode(),this._findFormInFragmentContext(),this.tokenizer.write(e,!0),this._runParsingLoop(null);const r=this.treeAdapter.getFirstChild(n),i=this.treeAdapter.createDocumentFragment();return this._adoptNodes(r,i),i}_bootstrap(e,t){this.tokenizer=new r(this.options),this.stopped=!1,this.insertionMode=w,this.originalInsertionMode="",this.document=e,this.fragmentContext=t,this.headElement=null,this.formElement=null,this.openElements=new i(this.document,this.treeAdapter),this.activeFormattingElements=new o(this.treeAdapter),this.tmplInsertionModeStack=[],this.tmplInsertionModeStackTop=-1,this.currentTmplInsertionMode=null,this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1}_err(){}_runParsingLoop(e){for(;!this.stopped;){this._setupTokenizerCDATAMode();const t=this.tokenizer.getNextToken();if(t.type===r.HIBERNATION_TOKEN)break;if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.type===r.WHITESPACE_CHARACTER_TOKEN&&"\n"===t.chars[0])){if(1===t.chars.length)continue;t.chars=t.chars.substr(1)}if(this._processInputToken(t),e&&this.pendingScript)break}}runParsingLoopForCurrentChunk(e,t){if(this._runParsingLoop(t),t&&this.pendingScript){const e=this.pendingScript;return this.pendingScript=null,void t(e)}e&&e()}_setupTokenizerCDATAMode(){const e=this._getAdjustedCurrentElement();this.tokenizer.allowCDATA=e&&e!==this.document&&this.treeAdapter.getNamespaceURI(e)!==_.HTML&&!this._isIntegrationPoint(e)}_switchToTextParsing(e,t){this._insertElement(e,_.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=O}switchToPlaintextParsing(){this.insertionMode=O,this.originalInsertionMode=k,this.tokenizer.state=r.MODE.PLAINTEXT}_getAdjustedCurrentElement(){return 0===this.openElements.stackTop&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;do{if(this.treeAdapter.getTagName(e)===f.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}while(e)}_initTokenizerForFragmentParsing(){if(this.treeAdapter.getNamespaceURI(this.fragmentContext)===_.HTML){const e=this.treeAdapter.getTagName(this.fragmentContext);e===f.TITLE||e===f.TEXTAREA?this.tokenizer.state=r.MODE.RCDATA:e===f.STYLE||e===f.XMP||e===f.IFRAME||e===f.NOEMBED||e===f.NOFRAMES||e===f.NOSCRIPT?this.tokenizer.state=r.MODE.RAWTEXT:e===f.SCRIPT?this.tokenizer.state=r.MODE.SCRIPT_DATA:e===f.PLAINTEXT&&(this.tokenizer.state=r.MODE.PLAINTEXT)}}_setDocumentType(e){const t=e.name||"",n=e.publicId||"",r=e.systemId||"";this.treeAdapter.setDocumentType(this.document,t,n,r)}_attachElementToTree(e){if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const t=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.appendChild(t,e)}}_appendElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n)}_insertElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n),this.openElements.push(n)}_insertFakeElement(e){const t=this.treeAdapter.createElement(e,_.HTML,[]);this._attachElementToTree(t),this.openElements.push(t)}_insertTemplate(e){const t=this.treeAdapter.createElement(e.tagName,_.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t),this.openElements.push(t)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(f.HTML,_.HTML,[]);this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e)}_appendCommentNode(e,t){const n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n)}_insertCharacters(e){if(this._shouldFosterParentOnInsertion())this._fosterParentText(e.chars);else{const t=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.insertText(t,e.chars)}}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_shouldProcessTokenInForeignContent(e){const t=this._getAdjustedCurrentElement();if(!t||t===this.document)return!1;const n=this.treeAdapter.getNamespaceURI(t);if(n===_.HTML)return!1;if(this.treeAdapter.getTagName(t)===f.ANNOTATION_XML&&n===_.MATHML&&e.type===r.START_TAG_TOKEN&&e.tagName===f.SVG)return!1;const i=e.type===r.CHARACTER_TOKEN||e.type===r.NULL_CHARACTER_TOKEN||e.type===r.WHITESPACE_CHARACTER_TOKEN;return(!(e.type===r.START_TAG_TOKEN&&e.tagName!==f.MGLYPH&&e.tagName!==f.MALIGNMARK)&&!i||!this._isIntegrationPoint(t,_.MATHML))&&((e.type!==r.START_TAG_TOKEN&&!i||!this._isIntegrationPoint(t,_.HTML))&&e.type!==r.EOF_TOKEN)}_processToken(e){W[this.insertionMode][e.type](this,e)}_processTokenInBodyMode(e){W[k][e.type](this,e)}_processTokenInForeignContent(e){e.type===r.CHARACTER_TOKEN?function(e,t){e._insertCharacters(t),e.framesetOk=!1}(this,e):e.type===r.NULL_CHARACTER_TOKEN?function(e,t){t.chars=m.REPLACEMENT_CHARACTER,e._insertCharacters(t)}(this,e):e.type===r.WHITESPACE_CHARACTER_TOKEN?ae(this,e):e.type===r.COMMENT_TOKEN?ie(this,e):e.type===r.START_TAG_TOKEN?function(e,t){if(h.causesExit(t)&&!e.fragmentContext){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==_.HTML&&!e._isIntegrationPoint(e.openElements.current);)e.openElements.pop();e._processToken(t)}else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===_.MATHML?h.adjustTokenMathMLAttrs(t):r===_.SVG&&(h.adjustTokenSVGTagName(t),h.adjustTokenSVGAttrs(t)),h.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}(this,e):e.type===r.END_TAG_TOKEN&&function(e,t){for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===_.HTML){e._processToken(t);break}if(e.treeAdapter.getTagName(r).toLowerCase()===t.tagName){e.openElements.popUntilElementPopped(r);break}}}(this,e)}_processInputToken(e){this._shouldProcessTokenInForeignContent(e)?this._processTokenInForeignContent(e):this._processToken(e),e.type===r.START_TAG_TOKEN&&e.selfClosing&&!e.ackSelfClosing&&this._err(p.nonVoidHtmlElementStartTagWithTrailingSolidus)}_isIntegrationPoint(e,t){const n=this.treeAdapter.getTagName(e),r=this.treeAdapter.getNamespaceURI(e),i=this.treeAdapter.getAttrList(e);return h.isIntegrationPoint(n,r,i,t)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.length;if(e){let t=e,n=null;do{if(t--,n=this.activeFormattingElements.entries[t],n.type===o.MARKER_ENTRY||this.openElements.contains(n.element)){t++;break}}while(t>0);for(let r=t;r<e;r++)n=this.activeFormattingElements.entries[r],this._insertElement(n.token,this.treeAdapter.getNamespaceURI(n.element)),n.element=this.openElements.current}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=P}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(f.P),this.openElements.popUntilTagNamePopped(f.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop,t=!1;e>=0;e--){let n=this.openElements.items[e];0===e&&(t=!0,this.fragmentContext&&(n=this.fragmentContext));const r=this.treeAdapter.getTagName(n),i=$[r];if(i){this.insertionMode=i;break}if(!(t||r!==f.TD&&r!==f.TH)){this.insertionMode=L;break}if(!t&&r===f.HEAD){this.insertionMode=x;break}if(r===f.SELECT){this._resetInsertionModeForSelect(e);break}if(r===f.TEMPLATE){this.insertionMode=this.currentTmplInsertionMode;break}if(r===f.HTML){this.insertionMode=this.headElement?D:C;break}if(t){this.insertionMode=k;break}}}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){const e=this.openElements.items[t],n=this.treeAdapter.getTagName(e);if(n===f.TEMPLATE)break;if(n===f.TABLE)return void(this.insertionMode=U)}this.insertionMode=B}_pushTmplInsertionMode(e){this.tmplInsertionModeStack.push(e),this.tmplInsertionModeStackTop++,this.currentTmplInsertionMode=e}_popTmplInsertionMode(){this.tmplInsertionModeStack.pop(),this.tmplInsertionModeStackTop--,this.currentTmplInsertionMode=this.tmplInsertionModeStack[this.tmplInsertionModeStackTop]}_isElementCausesFosterParenting(e){const t=this.treeAdapter.getTagName(e);return t===f.TABLE||t===f.TBODY||t===f.TFOOT||t===f.THEAD||t===f.TR}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.current)}_findFosterParentingLocation(){const e={parent:null,beforeElement:null};for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t],r=this.treeAdapter.getTagName(n),i=this.treeAdapter.getNamespaceURI(n);if(r===f.TEMPLATE&&i===_.HTML){e.parent=this.treeAdapter.getTemplateContent(n);break}if(r===f.TABLE){e.parent=this.treeAdapter.getParentNode(n),e.parent?e.beforeElement=n:e.parent=this.openElements.items[t-1];break}}return e.parent||(e.parent=this.openElements.items[0]),e}_fosterParentElement(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_fosterParentText(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertTextBefore(t.parent,e,t.beforeElement):this.treeAdapter.insertText(t.parent,e)}_isSpecialElement(e){const t=this.treeAdapter.getTagName(e),n=this.treeAdapter.getNamespaceURI(e);return g.SPECIAL_ELEMENTS[n][t]}}},function(e,t,n){"use strict";const r=n(571),i=n(572),o=r.CODE_POINTS;e.exports=class{constructor(){this.html=null,this.pos=-1,this.lastGapPos=-1,this.lastCharPos=-1,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=65536}_err(){}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.lastCharPos){const t=this.html.charCodeAt(this.pos+1);if(r.isSurrogatePair(t))return this.pos++,this._addGap(),r.getSurrogatePairCodePoint(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,o.EOF;return this._err(i.surrogateInInputStream),e}dropParsedChunk(){this.pos>this.bufferWaterline&&(this.lastCharPos-=this.pos,this.html=this.html.substring(this.pos),this.pos=0,this.lastGapPos=-1,this.gapStack=[])}write(e,t){this.html?this.html+=e:this.html=e,this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1,this.html.length),this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1}advance(){if(this.pos++,this.pos>this.lastCharPos)return this.endOfChunkHit=!this.lastChunkWritten,o.EOF;let e=this.html.charCodeAt(this.pos);if(this.skipNextNewLine&&e===o.LINE_FEED)return this.skipNextNewLine=!1,this._addGap(),this.advance();if(e===o.CARRIAGE_RETURN)return this.skipNextNewLine=!0,o.LINE_FEED;this.skipNextNewLine=!1,r.isSurrogate(e)&&(e=this._processSurrogate(e));return e>31&&e<127||e===o.LINE_FEED||e===o.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e}_checkForProblematicCharacters(e){r.isControlCodePoint(e)?this._err(i.controlCharacterInInputStream):r.isUndefinedCodePoint(e)&&this._err(i.noncharacterInInputStream)}retreat(){this.pos===this.lastGapPos&&(this.lastGapPos=this.gapStack.pop(),this.pos--),this.pos--}}},function(e,t,n){"use strict";e.exports=new Uint16Array([4,52,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,106,303,412,810,1432,1701,1796,1987,2114,2360,2420,2484,3170,3251,4140,4393,4575,4610,5106,5512,5728,6117,6274,6315,6345,6427,6516,7002,7910,8733,9323,9870,10170,10631,10893,11318,11386,11467,12773,13092,14474,14922,15448,15542,16419,17666,18166,18611,19004,19095,19298,19397,4,16,69,77,97,98,99,102,103,108,109,110,111,112,114,115,116,117,140,150,158,169,176,194,199,210,216,222,226,242,256,266,283,294,108,105,103,5,198,1,59,148,1,198,80,5,38,1,59,156,1,38,99,117,116,101,5,193,1,59,167,1,193,114,101,118,101,59,1,258,4,2,105,121,182,191,114,99,5,194,1,59,189,1,194,59,1,1040,114,59,3,55349,56580,114,97,118,101,5,192,1,59,208,1,192,112,104,97,59,1,913,97,99,114,59,1,256,100,59,1,10835,4,2,103,112,232,237,111,110,59,1,260,102,59,3,55349,56632,112,108,121,70,117,110,99,116,105,111,110,59,1,8289,105,110,103,5,197,1,59,264,1,197,4,2,99,115,272,277,114,59,3,55349,56476,105,103,110,59,1,8788,105,108,100,101,5,195,1,59,292,1,195,109,108,5,196,1,59,301,1,196,4,8,97,99,101,102,111,114,115,117,321,350,354,383,388,394,400,405,4,2,99,114,327,336,107,115,108,97,115,104,59,1,8726,4,2,118,119,342,345,59,1,10983,101,100,59,1,8966,121,59,1,1041,4,3,99,114,116,362,369,379,97,117,115,101,59,1,8757,110,111,117,108,108,105,115,59,1,8492,97,59,1,914,114,59,3,55349,56581,112,102,59,3,55349,56633,101,118,101,59,1,728,99,114,59,1,8492,109,112,101,113,59,1,8782,4,14,72,79,97,99,100,101,102,104,105,108,111,114,115,117,442,447,456,504,542,547,569,573,577,616,678,784,790,796,99,121,59,1,1063,80,89,5,169,1,59,454,1,169,4,3,99,112,121,464,470,497,117,116,101,59,1,262,4,2,59,105,476,478,1,8914,116,97,108,68,105,102,102,101,114,101,110,116,105,97,108,68,59,1,8517,108,101,121,115,59,1,8493,4,4,97,101,105,111,514,520,530,535,114,111,110,59,1,268,100,105,108,5,199,1,59,528,1,199,114,99,59,1,264,110,105,110,116,59,1,8752,111,116,59,1,266,4,2,100,110,553,560,105,108,108,97,59,1,184,116,101,114,68,111,116,59,1,183,114,59,1,8493,105,59,1,935,114,99,108,101,4,4,68,77,80,84,591,596,603,609,111,116,59,1,8857,105,110,117,115,59,1,8854,108,117,115,59,1,8853,105,109,101,115,59,1,8855,111,4,2,99,115,623,646,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8754,101,67,117,114,108,121,4,2,68,81,658,671,111,117,98,108,101,81,117,111,116,101,59,1,8221,117,111,116,101,59,1,8217,4,4,108,110,112,117,688,701,736,753,111,110,4,2,59,101,696,698,1,8759,59,1,10868,4,3,103,105,116,709,717,722,114,117,101,110,116,59,1,8801,110,116,59,1,8751,111,117,114,73,110,116,101,103,114,97,108,59,1,8750,4,2,102,114,742,745,59,1,8450,111,100,117,99,116,59,1,8720,110,116,101,114,67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8755,111,115,115,59,1,10799,99,114,59,3,55349,56478,112,4,2,59,67,803,805,1,8915,97,112,59,1,8781,4,11,68,74,83,90,97,99,101,102,105,111,115,834,850,855,860,865,888,903,916,921,1011,1415,4,2,59,111,840,842,1,8517,116,114,97,104,100,59,1,10513,99,121,59,1,1026,99,121,59,1,1029,99,121,59,1,1039,4,3,103,114,115,873,879,883,103,101,114,59,1,8225,114,59,1,8609,104,118,59,1,10980,4,2,97,121,894,900,114,111,110,59,1,270,59,1,1044,108,4,2,59,116,910,912,1,8711,97,59,1,916,114,59,3,55349,56583,4,2,97,102,927,998,4,2,99,109,933,992,114,105,116,105,99,97,108,4,4,65,68,71,84,950,957,978,985,99,117,116,101,59,1,180,111,4,2,116,117,964,967,59,1,729,98,108,101,65,99,117,116,101,59,1,733,114,97,118,101,59,1,96,105,108,100,101,59,1,732,111,110,100,59,1,8900,102,101,114,101,110,116,105,97,108,68,59,1,8518,4,4,112,116,117,119,1021,1026,1048,1249,102,59,3,55349,56635,4,3,59,68,69,1034,1036,1041,1,168,111,116,59,1,8412,113,117,97,108,59,1,8784,98,108,101,4,6,67,68,76,82,85,86,1065,1082,1101,1189,1211,1236,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8751,111,4,2,116,119,1089,1092,59,1,168,110,65,114,114,111,119,59,1,8659,4,2,101,111,1107,1141,102,116,4,3,65,82,84,1117,1124,1136,114,114,111,119,59,1,8656,105,103,104,116,65,114,114,111,119,59,1,8660,101,101,59,1,10980,110,103,4,2,76,82,1149,1177,101,102,116,4,2,65,82,1158,1165,114,114,111,119,59,1,10232,105,103,104,116,65,114,114,111,119,59,1,10234,105,103,104,116,65,114,114,111,119,59,1,10233,105,103,104,116,4,2,65,84,1199,1206,114,114,111,119,59,1,8658,101,101,59,1,8872,112,4,2,65,68,1218,1225,114,114,111,119,59,1,8657,111,119,110,65,114,114,111,119,59,1,8661,101,114,116,105,99,97,108,66,97,114,59,1,8741,110,4,6,65,66,76,82,84,97,1264,1292,1299,1352,1391,1408,114,114,111,119,4,3,59,66,85,1276,1278,1283,1,8595,97,114,59,1,10515,112,65,114,114,111,119,59,1,8693,114,101,118,101,59,1,785,101,102,116,4,3,82,84,86,1310,1323,1334,105,103,104,116,86,101,99,116,111,114,59,1,10576,101,101,86,101,99,116,111,114,59,1,10590,101,99,116,111,114,4,2,59,66,1345,1347,1,8637,97,114,59,1,10582,105,103,104,116,4,2,84,86,1362,1373,101,101,86,101,99,116,111,114,59,1,10591,101,99,116,111,114,4,2,59,66,1384,1386,1,8641,97,114,59,1,10583,101,101,4,2,59,65,1399,1401,1,8868,114,114,111,119,59,1,8615,114,114,111,119,59,1,8659,4,2,99,116,1421,1426,114,59,3,55349,56479,114,111,107,59,1,272,4,16,78,84,97,99,100,102,103,108,109,111,112,113,115,116,117,120,1466,1470,1478,1489,1515,1520,1525,1536,1544,1593,1609,1617,1650,1664,1668,1677,71,59,1,330,72,5,208,1,59,1476,1,208,99,117,116,101,5,201,1,59,1487,1,201,4,3,97,105,121,1497,1503,1512,114,111,110,59,1,282,114,99,5,202,1,59,1510,1,202,59,1,1069,111,116,59,1,278,114,59,3,55349,56584,114,97,118,101,5,200,1,59,1534,1,200,101,109,101,110,116,59,1,8712,4,2,97,112,1550,1555,99,114,59,1,274,116,121,4,2,83,86,1563,1576,109,97,108,108,83,113,117,97,114,101,59,1,9723,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9643,4,2,103,112,1599,1604,111,110,59,1,280,102,59,3,55349,56636,115,105,108,111,110,59,1,917,117,4,2,97,105,1624,1640,108,4,2,59,84,1631,1633,1,10869,105,108,100,101,59,1,8770,108,105,98,114,105,117,109,59,1,8652,4,2,99,105,1656,1660,114,59,1,8496,109,59,1,10867,97,59,1,919,109,108,5,203,1,59,1675,1,203,4,2,105,112,1683,1689,115,116,115,59,1,8707,111,110,101,110,116,105,97,108,69,59,1,8519,4,5,99,102,105,111,115,1713,1717,1722,1762,1791,121,59,1,1060,114,59,3,55349,56585,108,108,101,100,4,2,83,86,1732,1745,109,97,108,108,83,113,117,97,114,101,59,1,9724,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9642,4,3,112,114,117,1770,1775,1781,102,59,3,55349,56637,65,108,108,59,1,8704,114,105,101,114,116,114,102,59,1,8497,99,114,59,1,8497,4,12,74,84,97,98,99,100,102,103,111,114,115,116,1822,1827,1834,1848,1855,1877,1882,1887,1890,1896,1978,1984,99,121,59,1,1027,5,62,1,59,1832,1,62,109,109,97,4,2,59,100,1843,1845,1,915,59,1,988,114,101,118,101,59,1,286,4,3,101,105,121,1863,1869,1874,100,105,108,59,1,290,114,99,59,1,284,59,1,1043,111,116,59,1,288,114,59,3,55349,56586,59,1,8921,112,102,59,3,55349,56638,101,97,116,101,114,4,6,69,70,71,76,83,84,1915,1933,1944,1953,1959,1971,113,117,97,108,4,2,59,76,1925,1927,1,8805,101,115,115,59,1,8923,117,108,108,69,113,117,97,108,59,1,8807,114,101,97,116,101,114,59,1,10914,101,115,115,59,1,8823,108,97,110,116,69,113,117,97,108,59,1,10878,105,108,100,101,59,1,8819,99,114,59,3,55349,56482,59,1,8811,4,8,65,97,99,102,105,111,115,117,2005,2012,2026,2032,2036,2049,2073,2089,82,68,99,121,59,1,1066,4,2,99,116,2018,2023,101,107,59,1,711,59,1,94,105,114,99,59,1,292,114,59,1,8460,108,98,101,114,116,83,112,97,99,101,59,1,8459,4,2,112,114,2055,2059,102,59,1,8461,105,122,111,110,116,97,108,76,105,110,101,59,1,9472,4,2,99,116,2079,2083,114,59,1,8459,114,111,107,59,1,294,109,112,4,2,68,69,2097,2107,111,119,110,72,117,109,112,59,1,8782,113,117,97,108,59,1,8783,4,14,69,74,79,97,99,100,102,103,109,110,111,115,116,117,2144,2149,2155,2160,2171,2189,2194,2198,2209,2245,2307,2329,2334,2341,99,121,59,1,1045,108,105,103,59,1,306,99,121,59,1,1025,99,117,116,101,5,205,1,59,2169,1,205,4,2,105,121,2177,2186,114,99,5,206,1,59,2184,1,206,59,1,1048,111,116,59,1,304,114,59,1,8465,114,97,118,101,5,204,1,59,2207,1,204,4,3,59,97,112,2217,2219,2238,1,8465,4,2,99,103,2225,2229,114,59,1,298,105,110,97,114,121,73,59,1,8520,108,105,101,115,59,1,8658,4,2,116,118,2251,2281,4,2,59,101,2257,2259,1,8748,4,2,103,114,2265,2271,114,97,108,59,1,8747,115,101,99,116,105,111,110,59,1,8898,105,115,105,98,108,101,4,2,67,84,2293,2300,111,109,109,97,59,1,8291,105,109,101,115,59,1,8290,4,3,103,112,116,2315,2320,2325,111,110,59,1,302,102,59,3,55349,56640,97,59,1,921,99,114,59,1,8464,105,108,100,101,59,1,296,4,2,107,109,2347,2352,99,121,59,1,1030,108,5,207,1,59,2358,1,207,4,5,99,102,111,115,117,2372,2386,2391,2397,2414,4,2,105,121,2378,2383,114,99,59,1,308,59,1,1049,114,59,3,55349,56589,112,102,59,3,55349,56641,4,2,99,101,2403,2408,114,59,3,55349,56485,114,99,121,59,1,1032,107,99,121,59,1,1028,4,7,72,74,97,99,102,111,115,2436,2441,2446,2452,2467,2472,2478,99,121,59,1,1061,99,121,59,1,1036,112,112,97,59,1,922,4,2,101,121,2458,2464,100,105,108,59,1,310,59,1,1050,114,59,3,55349,56590,112,102,59,3,55349,56642,99,114,59,3,55349,56486,4,11,74,84,97,99,101,102,108,109,111,115,116,2508,2513,2520,2562,2585,2981,2986,3004,3011,3146,3167,99,121,59,1,1033,5,60,1,59,2518,1,60,4,5,99,109,110,112,114,2532,2538,2544,2548,2558,117,116,101,59,1,313,98,100,97,59,1,923,103,59,1,10218,108,97,99,101,116,114,102,59,1,8466,114,59,1,8606,4,3,97,101,121,2570,2576,2582,114,111,110,59,1,317,100,105,108,59,1,315,59,1,1051,4,2,102,115,2591,2907,116,4,10,65,67,68,70,82,84,85,86,97,114,2614,2663,2672,2728,2735,2760,2820,2870,2888,2895,4,2,110,114,2620,2633,103,108,101,66,114,97,99,107,101,116,59,1,10216,114,111,119,4,3,59,66,82,2644,2646,2651,1,8592,97,114,59,1,8676,105,103,104,116,65,114,114,111,119,59,1,8646,101,105,108,105,110,103,59,1,8968,111,4,2,117,119,2679,2692,98,108,101,66,114,97,99,107,101,116,59,1,10214,110,4,2,84,86,2699,2710,101,101,86,101,99,116,111,114,59,1,10593,101,99,116,111,114,4,2,59,66,2721,2723,1,8643,97,114,59,1,10585,108,111,111,114,59,1,8970,105,103,104,116,4,2,65,86,2745,2752,114,114,111,119,59,1,8596,101,99,116,111,114,59,1,10574,4,2,101,114,2766,2792,101,4,3,59,65,86,2775,2777,2784,1,8867,114,114,111,119,59,1,8612,101,99,116,111,114,59,1,10586,105,97,110,103,108,101,4,3,59,66,69,2806,2808,2813,1,8882,97,114,59,1,10703,113,117,97,108,59,1,8884,112,4,3,68,84,86,2829,2841,2852,111,119,110,86,101,99,116,111,114,59,1,10577,101,101,86,101,99,116,111,114,59,1,10592,101,99,116,111,114,4,2,59,66,2863,2865,1,8639,97,114,59,1,10584,101,99,116,111,114,4,2,59,66,2881,2883,1,8636,97,114,59,1,10578,114,114,111,119,59,1,8656,105,103,104,116,97,114,114,111,119,59,1,8660,115,4,6,69,70,71,76,83,84,2922,2936,2947,2956,2962,2974,113,117,97,108,71,114,101,97,116,101,114,59,1,8922,117,108,108,69,113,117,97,108,59,1,8806,114,101,97,116,101,114,59,1,8822,101,115,115,59,1,10913,108,97,110,116,69,113,117,97,108,59,1,10877,105,108,100,101,59,1,8818,114,59,3,55349,56591,4,2,59,101,2992,2994,1,8920,102,116,97,114,114,111,119,59,1,8666,105,100,111,116,59,1,319,4,3,110,112,119,3019,3110,3115,103,4,4,76,82,108,114,3030,3058,3070,3098,101,102,116,4,2,65,82,3039,3046,114,114,111,119,59,1,10229,105,103,104,116,65,114,114,111,119,59,1,10231,105,103,104,116,65,114,114,111,119,59,1,10230,101,102,116,4,2,97,114,3079,3086,114,114,111,119,59,1,10232,105,103,104,116,97,114,114,111,119,59,1,10234,105,103,104,116,97,114,114,111,119,59,1,10233,102,59,3,55349,56643,101,114,4,2,76,82,3123,3134,101,102,116,65,114,114,111,119,59,1,8601,105,103,104,116,65,114,114,111,119,59,1,8600,4,3,99,104,116,3154,3158,3161,114,59,1,8466,59,1,8624,114,111,107,59,1,321,59,1,8810,4,8,97,99,101,102,105,111,115,117,3188,3192,3196,3222,3227,3237,3243,3248,112,59,1,10501,121,59,1,1052,4,2,100,108,3202,3213,105,117,109,83,112,97,99,101,59,1,8287,108,105,110,116,114,102,59,1,8499,114,59,3,55349,56592,110,117,115,80,108,117,115,59,1,8723,112,102,59,3,55349,56644,99,114,59,1,8499,59,1,924,4,9,74,97,99,101,102,111,115,116,117,3271,3276,3283,3306,3422,3427,4120,4126,4137,99,121,59,1,1034,99,117,116,101,59,1,323,4,3,97,101,121,3291,3297,3303,114,111,110,59,1,327,100,105,108,59,1,325,59,1,1053,4,3,103,115,119,3314,3380,3415,97,116,105,118,101,4,3,77,84,86,3327,3340,3365,101,100,105,117,109,83,112,97,99,101,59,1,8203,104,105,4,2,99,110,3348,3357,107,83,112,97,99,101,59,1,8203,83,112,97,99,101,59,1,8203,101,114,121,84,104,105,110,83,112,97,99,101,59,1,8203,116,101,100,4,2,71,76,3389,3405,114,101,97,116,101,114,71,114,101,97,116,101,114,59,1,8811,101,115,115,76,101,115,115,59,1,8810,76,105,110,101,59,1,10,114,59,3,55349,56593,4,4,66,110,112,116,3437,3444,3460,3464,114,101,97,107,59,1,8288,66,114,101,97,107,105,110,103,83,112,97,99,101,59,1,160,102,59,1,8469,4,13,59,67,68,69,71,72,76,78,80,82,83,84,86,3492,3494,3517,3536,3578,3657,3685,3784,3823,3860,3915,4066,4107,1,10988,4,2,111,117,3500,3510,110,103,114,117,101,110,116,59,1,8802,112,67,97,112,59,1,8813,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59,1,8742,4,3,108,113,120,3544,3552,3571,101,109,101,110,116,59,1,8713,117,97,108,4,2,59,84,3561,3563,1,8800,105,108,100,101,59,3,8770,824,105,115,116,115,59,1,8708,114,101,97,116,101,114,4,7,59,69,70,71,76,83,84,3600,3602,3609,3621,3631,3637,3650,1,8815,113,117,97,108,59,1,8817,117,108,108,69,113,117,97,108,59,3,8807,824,114,101,97,116,101,114,59,3,8811,824,101,115,115,59,1,8825,108,97,110,116,69,113,117,97,108,59,3,10878,824,105,108,100,101,59,1,8821,117,109,112,4,2,68,69,3666,3677,111,119,110,72,117,109,112,59,3,8782,824,113,117,97,108,59,3,8783,824,101,4,2,102,115,3692,3724,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3709,3711,3717,1,8938,97,114,59,3,10703,824,113,117,97,108,59,1,8940,115,4,6,59,69,71,76,83,84,3739,3741,3748,3757,3764,3777,1,8814,113,117,97,108,59,1,8816,114,101,97,116,101,114,59,1,8824,101,115,115,59,3,8810,824,108,97,110,116,69,113,117,97,108,59,3,10877,824,105,108,100,101,59,1,8820,101,115,116,101,100,4,2,71,76,3795,3812,114,101,97,116,101,114,71,114,101,97,116,101,114,59,3,10914,824,101,115,115,76,101,115,115,59,3,10913,824,114,101,99,101,100,101,115,4,3,59,69,83,3838,3840,3848,1,8832,113,117,97,108,59,3,10927,824,108,97,110,116,69,113,117,97,108,59,1,8928,4,2,101,105,3866,3881,118,101,114,115,101,69,108,101,109,101,110,116,59,1,8716,103,104,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3900,3902,3908,1,8939,97,114,59,3,10704,824,113,117,97,108,59,1,8941,4,2,113,117,3921,3973,117,97,114,101,83,117,4,2,98,112,3933,3952,115,101,116,4,2,59,69,3942,3945,3,8847,824,113,117,97,108,59,1,8930,101,114,115,101,116,4,2,59,69,3963,3966,3,8848,824,113,117,97,108,59,1,8931,4,3,98,99,112,3981,4e3,4045,115,101,116,4,2,59,69,3990,3993,3,8834,8402,113,117,97,108,59,1,8840,99,101,101,100,115,4,4,59,69,83,84,4015,4017,4025,4037,1,8833,113,117,97,108,59,3,10928,824,108,97,110,116,69,113,117,97,108,59,1,8929,105,108,100,101,59,3,8831,824,101,114,115,101,116,4,2,59,69,4056,4059,3,8835,8402,113,117,97,108,59,1,8841,105,108,100,101,4,4,59,69,70,84,4080,4082,4089,4100,1,8769,113,117,97,108,59,1,8772,117,108,108,69,113,117,97,108,59,1,8775,105,108,100,101,59,1,8777,101,114,116,105,99,97,108,66,97,114,59,1,8740,99,114,59,3,55349,56489,105,108,100,101,5,209,1,59,4135,1,209,59,1,925,4,14,69,97,99,100,102,103,109,111,112,114,115,116,117,118,4170,4176,4187,4205,4212,4217,4228,4253,4259,4292,4295,4316,4337,4346,108,105,103,59,1,338,99,117,116,101,5,211,1,59,4185,1,211,4,2,105,121,4193,4202,114,99,5,212,1,59,4200,1,212,59,1,1054,98,108,97,99,59,1,336,114,59,3,55349,56594,114,97,118,101,5,210,1,59,4226,1,210,4,3,97,101,105,4236,4241,4246,99,114,59,1,332,103,97,59,1,937,99,114,111,110,59,1,927,112,102,59,3,55349,56646,101,110,67,117,114,108,121,4,2,68,81,4272,4285,111,117,98,108,101,81,117,111,116,101,59,1,8220,117,111,116,101,59,1,8216,59,1,10836,4,2,99,108,4301,4306,114,59,3,55349,56490,97,115,104,5,216,1,59,4314,1,216,105,4,2,108,109,4323,4332,100,101,5,213,1,59,4330,1,213,101,115,59,1,10807,109,108,5,214,1,59,4344,1,214,101,114,4,2,66,80,4354,4380,4,2,97,114,4360,4364,114,59,1,8254,97,99,4,2,101,107,4372,4375,59,1,9182,101,116,59,1,9140,97,114,101,110,116,104,101,115,105,115,59,1,9180,4,9,97,99,102,104,105,108,111,114,115,4413,4422,4426,4431,4435,4438,4448,4471,4561,114,116,105,97,108,68,59,1,8706,121,59,1,1055,114,59,3,55349,56595,105,59,1,934,59,1,928,117,115,77,105,110,117,115,59,1,177,4,2,105,112,4454,4467,110,99,97,114,101,112,108,97,110,101,59,1,8460,102,59,1,8473,4,4,59,101,105,111,4481,4483,4526,4531,1,10939,99,101,100,101,115,4,4,59,69,83,84,4498,4500,4507,4519,1,8826,113,117,97,108,59,1,10927,108,97,110,116,69,113,117,97,108,59,1,8828,105,108,100,101,59,1,8830,109,101,59,1,8243,4,2,100,112,4537,4543,117,99,116,59,1,8719,111,114,116,105,111,110,4,2,59,97,4555,4557,1,8759,108,59,1,8733,4,2,99,105,4567,4572,114,59,3,55349,56491,59,1,936,4,4,85,102,111,115,4585,4594,4599,4604,79,84,5,34,1,59,4592,1,34,114,59,3,55349,56596,112,102,59,1,8474,99,114,59,3,55349,56492,4,12,66,69,97,99,101,102,104,105,111,114,115,117,4636,4642,4650,4681,4704,4763,4767,4771,5047,5069,5081,5094,97,114,114,59,1,10512,71,5,174,1,59,4648,1,174,4,3,99,110,114,4658,4664,4668,117,116,101,59,1,340,103,59,1,10219,114,4,2,59,116,4675,4677,1,8608,108,59,1,10518,4,3,97,101,121,4689,4695,4701,114,111,110,59,1,344,100,105,108,59,1,342,59,1,1056,4,2,59,118,4710,4712,1,8476,101,114,115,101,4,2,69,85,4722,4748,4,2,108,113,4728,4736,101,109,101,110,116,59,1,8715,117,105,108,105,98,114,105,117,109,59,1,8651,112,69,113,117,105,108,105,98,114,105,117,109,59,1,10607,114,59,1,8476,111,59,1,929,103,104,116,4,8,65,67,68,70,84,85,86,97,4792,4840,4849,4905,4912,4972,5022,5040,4,2,110,114,4798,4811,103,108,101,66,114,97,99,107,101,116,59,1,10217,114,111,119,4,3,59,66,76,4822,4824,4829,1,8594,97,114,59,1,8677,101,102,116,65,114,114,111,119,59,1,8644,101,105,108,105,110,103,59,1,8969,111,4,2,117,119,4856,4869,98,108,101,66,114,97,99,107,101,116,59,1,10215,110,4,2,84,86,4876,4887,101,101,86,101,99,116,111,114,59,1,10589,101,99,116,111,114,4,2,59,66,4898,4900,1,8642,97,114,59,1,10581,108,111,111,114,59,1,8971,4,2,101,114,4918,4944,101,4,3,59,65,86,4927,4929,4936,1,8866,114,114,111,119,59,1,8614,101,99,116,111,114,59,1,10587,105,97,110,103,108,101,4,3,59,66,69,4958,4960,4965,1,8883,97,114,59,1,10704,113,117,97,108,59,1,8885,112,4,3,68,84,86,4981,4993,5004,111,119,110,86,101,99,116,111,114,59,1,10575,101,101,86,101,99,116,111,114,59,1,10588,101,99,116,111,114,4,2,59,66,5015,5017,1,8638,97,114,59,1,10580,101,99,116,111,114,4,2,59,66,5033,5035,1,8640,97,114,59,1,10579,114,114,111,119,59,1,8658,4,2,112,117,5053,5057,102,59,1,8477,110,100,73,109,112,108,105,101,115,59,1,10608,105,103,104,116,97,114,114,111,119,59,1,8667,4,2,99,104,5087,5091,114,59,1,8475,59,1,8625,108,101,68,101,108,97,121,101,100,59,1,10740,4,13,72,79,97,99,102,104,105,109,111,113,115,116,117,5134,5150,5157,5164,5198,5203,5259,5265,5277,5283,5374,5380,5385,4,2,67,99,5140,5146,72,99,121,59,1,1065,121,59,1,1064,70,84,99,121,59,1,1068,99,117,116,101,59,1,346,4,5,59,97,101,105,121,5176,5178,5184,5190,5195,1,10940,114,111,110,59,1,352,100,105,108,59,1,350,114,99,59,1,348,59,1,1057,114,59,3,55349,56598,111,114,116,4,4,68,76,82,85,5216,5227,5238,5250,111,119,110,65,114,114,111,119,59,1,8595,101,102,116,65,114,114,111,119,59,1,8592,105,103,104,116,65,114,114,111,119,59,1,8594,112,65,114,114,111,119,59,1,8593,103,109,97,59,1,931,97,108,108,67,105,114,99,108,101,59,1,8728,112,102,59,3,55349,56650,4,2,114,117,5289,5293,116,59,1,8730,97,114,101,4,4,59,73,83,85,5306,5308,5322,5367,1,9633,110,116,101,114,115,101,99,116,105,111,110,59,1,8851,117,4,2,98,112,5329,5347,115,101,116,4,2,59,69,5338,5340,1,8847,113,117,97,108,59,1,8849,101,114,115,101,116,4,2,59,69,5358,5360,1,8848,113,117,97,108,59,1,8850,110,105,111,110,59,1,8852,99,114,59,3,55349,56494,97,114,59,1,8902,4,4,98,99,109,112,5395,5420,5475,5478,4,2,59,115,5401,5403,1,8912,101,116,4,2,59,69,5411,5413,1,8912,113,117,97,108,59,1,8838,4,2,99,104,5426,5468,101,101,100,115,4,4,59,69,83,84,5440,5442,5449,5461,1,8827,113,117,97,108,59,1,10928,108,97,110,116,69,113,117,97,108,59,1,8829,105,108,100,101,59,1,8831,84,104,97,116,59,1,8715,59,1,8721,4,3,59,101,115,5486,5488,5507,1,8913,114,115,101,116,4,2,59,69,5498,5500,1,8835,113,117,97,108,59,1,8839,101,116,59,1,8913,4,11,72,82,83,97,99,102,104,105,111,114,115,5536,5546,5552,5567,5579,5602,5607,5655,5695,5701,5711,79,82,78,5,222,1,59,5544,1,222,65,68,69,59,1,8482,4,2,72,99,5558,5563,99,121,59,1,1035,121,59,1,1062,4,2,98,117,5573,5576,59,1,9,59,1,932,4,3,97,101,121,5587,5593,5599,114,111,110,59,1,356,100,105,108,59,1,354,59,1,1058,114,59,3,55349,56599,4,2,101,105,5613,5631,4,2,114,116,5619,5627,101,102,111,114,101,59,1,8756,97,59,1,920,4,2,99,110,5637,5647,107,83,112,97,99,101,59,3,8287,8202,83,112,97,99,101,59,1,8201,108,100,101,4,4,59,69,70,84,5668,5670,5677,5688,1,8764,113,117,97,108,59,1,8771,117,108,108,69,113,117,97,108,59,1,8773,105,108,100,101,59,1,8776,112,102,59,3,55349,56651,105,112,108,101,68,111,116,59,1,8411,4,2,99,116,5717,5722,114,59,3,55349,56495,114,111,107,59,1,358,4,14,97,98,99,100,102,103,109,110,111,112,114,115,116,117,5758,5789,5805,5823,5830,5835,5846,5852,5921,5937,6089,6095,6101,6108,4,2,99,114,5764,5774,117,116,101,5,218,1,59,5772,1,218,114,4,2,59,111,5781,5783,1,8607,99,105,114,59,1,10569,114,4,2,99,101,5796,5800,121,59,1,1038,118,101,59,1,364,4,2,105,121,5811,5820,114,99,5,219,1,59,5818,1,219,59,1,1059,98,108,97,99,59,1,368,114,59,3,55349,56600,114,97,118,101,5,217,1,59,5844,1,217,97,99,114,59,1,362,4,2,100,105,5858,5905,101,114,4,2,66,80,5866,5892,4,2,97,114,5872,5876,114,59,1,95,97,99,4,2,101,107,5884,5887,59,1,9183,101,116,59,1,9141,97,114,101,110,116,104,101,115,105,115,59,1,9181,111,110,4,2,59,80,5913,5915,1,8899,108,117,115,59,1,8846,4,2,103,112,5927,5932,111,110,59,1,370,102,59,3,55349,56652,4,8,65,68,69,84,97,100,112,115,5955,5985,5996,6009,6026,6033,6044,6075,114,114,111,119,4,3,59,66,68,5967,5969,5974,1,8593,97,114,59,1,10514,111,119,110,65,114,114,111,119,59,1,8645,111,119,110,65,114,114,111,119,59,1,8597,113,117,105,108,105,98,114,105,117,109,59,1,10606,101,101,4,2,59,65,6017,6019,1,8869,114,114,111,119,59,1,8613,114,114,111,119,59,1,8657,111,119,110,97,114,114,111,119,59,1,8661,101,114,4,2,76,82,6052,6063,101,102,116,65,114,114,111,119,59,1,8598,105,103,104,116,65,114,114,111,119,59,1,8599,105,4,2,59,108,6082,6084,1,978,111,110,59,1,933,105,110,103,59,1,366,99,114,59,3,55349,56496,105,108,100,101,59,1,360,109,108,5,220,1,59,6115,1,220,4,9,68,98,99,100,101,102,111,115,118,6137,6143,6148,6152,6166,6250,6255,6261,6267,97,115,104,59,1,8875,97,114,59,1,10987,121,59,1,1042,97,115,104,4,2,59,108,6161,6163,1,8873,59,1,10982,4,2,101,114,6172,6175,59,1,8897,4,3,98,116,121,6183,6188,6238,97,114,59,1,8214,4,2,59,105,6194,6196,1,8214,99,97,108,4,4,66,76,83,84,6209,6214,6220,6231,97,114,59,1,8739,105,110,101,59,1,124,101,112,97,114,97,116,111,114,59,1,10072,105,108,100,101,59,1,8768,84,104,105,110,83,112,97,99,101,59,1,8202,114,59,3,55349,56601,112,102,59,3,55349,56653,99,114,59,3,55349,56497,100,97,115,104,59,1,8874,4,5,99,101,102,111,115,6286,6292,6298,6303,6309,105,114,99,59,1,372,100,103,101,59,1,8896,114,59,3,55349,56602,112,102,59,3,55349,56654,99,114,59,3,55349,56498,4,4,102,105,111,115,6325,6330,6333,6339,114,59,3,55349,56603,59,1,926,112,102,59,3,55349,56655,99,114,59,3,55349,56499,4,9,65,73,85,97,99,102,111,115,117,6365,6370,6375,6380,6391,6405,6410,6416,6422,99,121,59,1,1071,99,121,59,1,1031,99,121,59,1,1070,99,117,116,101,5,221,1,59,6389,1,221,4,2,105,121,6397,6402,114,99,59,1,374,59,1,1067,114,59,3,55349,56604,112,102,59,3,55349,56656,99,114,59,3,55349,56500,109,108,59,1,376,4,8,72,97,99,100,101,102,111,115,6445,6450,6457,6472,6477,6501,6505,6510,99,121,59,1,1046,99,117,116,101,59,1,377,4,2,97,121,6463,6469,114,111,110,59,1,381,59,1,1047,111,116,59,1,379,4,2,114,116,6483,6497,111,87,105,100,116,104,83,112,97,99,101,59,1,8203,97,59,1,918,114,59,1,8488,112,102,59,1,8484,99,114,59,3,55349,56501,4,16,97,98,99,101,102,103,108,109,110,111,112,114,115,116,117,119,6550,6561,6568,6612,6622,6634,6645,6672,6699,6854,6870,6923,6933,6963,6974,6983,99,117,116,101,5,225,1,59,6559,1,225,114,101,118,101,59,1,259,4,6,59,69,100,105,117,121,6582,6584,6588,6591,6600,6609,1,8766,59,3,8766,819,59,1,8767,114,99,5,226,1,59,6598,1,226,116,101,5,180,1,59,6607,1,180,59,1,1072,108,105,103,5,230,1,59,6620,1,230,4,2,59,114,6628,6630,1,8289,59,3,55349,56606,114,97,118,101,5,224,1,59,6643,1,224,4,2,101,112,6651,6667,4,2,102,112,6657,6663,115,121,109,59,1,8501,104,59,1,8501,104,97,59,1,945,4,2,97,112,6678,6692,4,2,99,108,6684,6688,114,59,1,257,103,59,1,10815,5,38,1,59,6697,1,38,4,2,100,103,6705,6737,4,5,59,97,100,115,118,6717,6719,6724,6727,6734,1,8743,110,100,59,1,10837,59,1,10844,108,111,112,101,59,1,10840,59,1,10842,4,7,59,101,108,109,114,115,122,6753,6755,6758,6762,6814,6835,6848,1,8736,59,1,10660,101,59,1,8736,115,100,4,2,59,97,6770,6772,1,8737,4,8,97,98,99,100,101,102,103,104,6790,6793,6796,6799,6802,6805,6808,6811,59,1,10664,59,1,10665,59,1,10666,59,1,10667,59,1,10668,59,1,10669,59,1,10670,59,1,10671,116,4,2,59,118,6821,6823,1,8735,98,4,2,59,100,6830,6832,1,8894,59,1,10653,4,2,112,116,6841,6845,104,59,1,8738,59,1,197,97,114,114,59,1,9084,4,2,103,112,6860,6865,111,110,59,1,261,102,59,3,55349,56658,4,7,59,69,97,101,105,111,112,6886,6888,6891,6897,6900,6904,6908,1,8776,59,1,10864,99,105,114,59,1,10863,59,1,8778,100,59,1,8779,115,59,1,39,114,111,120,4,2,59,101,6917,6919,1,8776,113,59,1,8778,105,110,103,5,229,1,59,6931,1,229,4,3,99,116,121,6941,6946,6949,114,59,3,55349,56502,59,1,42,109,112,4,2,59,101,6957,6959,1,8776,113,59,1,8781,105,108,100,101,5,227,1,59,6972,1,227,109,108,5,228,1,59,6981,1,228,4,2,99,105,6989,6997,111,110,105,110,116,59,1,8755,110,116,59,1,10769,4,16,78,97,98,99,100,101,102,105,107,108,110,111,112,114,115,117,7036,7041,7119,7135,7149,7155,7219,7224,7347,7354,7463,7489,7786,7793,7814,7866,111,116,59,1,10989,4,2,99,114,7047,7094,107,4,4,99,101,112,115,7058,7064,7073,7080,111,110,103,59,1,8780,112,115,105,108,111,110,59,1,1014,114,105,109,101,59,1,8245,105,109,4,2,59,101,7088,7090,1,8765,113,59,1,8909,4,2,118,119,7100,7105,101,101,59,1,8893,101,100,4,2,59,103,7113,7115,1,8965,101,59,1,8965,114,107,4,2,59,116,7127,7129,1,9141,98,114,107,59,1,9142,4,2,111,121,7141,7146,110,103,59,1,8780,59,1,1073,113,117,111,59,1,8222,4,5,99,109,112,114,116,7167,7181,7188,7193,7199,97,117,115,4,2,59,101,7176,7178,1,8757,59,1,8757,112,116,121,118,59,1,10672,115,105,59,1,1014,110,111,117,59,1,8492,4,3,97,104,119,7207,7210,7213,59,1,946,59,1,8502,101,101,110,59,1,8812,114,59,3,55349,56607,103,4,7,99,111,115,116,117,118,119,7241,7262,7288,7305,7328,7335,7340,4,3,97,105,117,7249,7253,7258,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,4,3,100,112,116,7270,7275,7281,111,116,59,1,10752,108,117,115,59,1,10753,105,109,101,115,59,1,10754,4,2,113,116,7294,7300,99,117,112,59,1,10758,97,114,59,1,9733,114,105,97,110,103,108,101,4,2,100,117,7318,7324,111,119,110,59,1,9661,112,59,1,9651,112,108,117,115,59,1,10756,101,101,59,1,8897,101,100,103,101,59,1,8896,97,114,111,119,59,1,10509,4,3,97,107,111,7362,7436,7458,4,2,99,110,7368,7432,107,4,3,108,115,116,7377,7386,7394,111,122,101,110,103,101,59,1,10731,113,117,97,114,101,59,1,9642,114,105,97,110,103,108,101,4,4,59,100,108,114,7411,7413,7419,7425,1,9652,111,119,110,59,1,9662,101,102,116,59,1,9666,105,103,104,116,59,1,9656,107,59,1,9251,4,2,49,51,7442,7454,4,2,50,52,7448,7451,59,1,9618,59,1,9617,52,59,1,9619,99,107,59,1,9608,4,2,101,111,7469,7485,4,2,59,113,7475,7478,3,61,8421,117,105,118,59,3,8801,8421,116,59,1,8976,4,4,112,116,119,120,7499,7504,7517,7523,102,59,3,55349,56659,4,2,59,116,7510,7512,1,8869,111,109,59,1,8869,116,105,101,59,1,8904,4,12,68,72,85,86,98,100,104,109,112,116,117,118,7549,7571,7597,7619,7655,7660,7682,7708,7715,7721,7728,7750,4,4,76,82,108,114,7559,7562,7565,7568,59,1,9559,59,1,9556,59,1,9558,59,1,9555,4,5,59,68,85,100,117,7583,7585,7588,7591,7594,1,9552,59,1,9574,59,1,9577,59,1,9572,59,1,9575,4,4,76,82,108,114,7607,7610,7613,7616,59,1,9565,59,1,9562,59,1,9564,59,1,9561,4,7,59,72,76,82,104,108,114,7635,7637,7640,7643,7646,7649,7652,1,9553,59,1,9580,59,1,9571,59,1,9568,59,1,9579,59,1,9570,59,1,9567,111,120,59,1,10697,4,4,76,82,108,114,7670,7673,7676,7679,59,1,9557,59,1,9554,59,1,9488,59,1,9484,4,5,59,68,85,100,117,7694,7696,7699,7702,7705,1,9472,59,1,9573,59,1,9576,59,1,9516,59,1,9524,105,110,117,115,59,1,8863,108,117,115,59,1,8862,105,109,101,115,59,1,8864,4,4,76,82,108,114,7738,7741,7744,7747,59,1,9563,59,1,9560,59,1,9496,59,1,9492,4,7,59,72,76,82,104,108,114,7766,7768,7771,7774,7777,7780,7783,1,9474,59,1,9578,59,1,9569,59,1,9566,59,1,9532,59,1,9508,59,1,9500,114,105,109,101,59,1,8245,4,2,101,118,7799,7804,118,101,59,1,728,98,97,114,5,166,1,59,7812,1,166,4,4,99,101,105,111,7824,7829,7834,7846,114,59,3,55349,56503,109,105,59,1,8271,109,4,2,59,101,7841,7843,1,8765,59,1,8909,108,4,3,59,98,104,7855,7857,7860,1,92,59,1,10693,115,117,98,59,1,10184,4,2,108,109,7872,7885,108,4,2,59,101,7879,7881,1,8226,116,59,1,8226,112,4,3,59,69,101,7894,7896,7899,1,8782,59,1,10926,4,2,59,113,7905,7907,1,8783,59,1,8783,4,15,97,99,100,101,102,104,105,108,111,114,115,116,117,119,121,7942,8021,8075,8080,8121,8126,8157,8279,8295,8430,8446,8485,8491,8707,8726,4,3,99,112,114,7950,7956,8007,117,116,101,59,1,263,4,6,59,97,98,99,100,115,7970,7972,7977,7984,7998,8003,1,8745,110,100,59,1,10820,114,99,117,112,59,1,10825,4,2,97,117,7990,7994,112,59,1,10827,112,59,1,10823,111,116,59,1,10816,59,3,8745,65024,4,2,101,111,8013,8017,116,59,1,8257,110,59,1,711,4,4,97,101,105,117,8031,8046,8056,8061,4,2,112,114,8037,8041,115,59,1,10829,111,110,59,1,269,100,105,108,5,231,1,59,8054,1,231,114,99,59,1,265,112,115,4,2,59,115,8069,8071,1,10828,109,59,1,10832,111,116,59,1,267,4,3,100,109,110,8088,8097,8104,105,108,5,184,1,59,8095,1,184,112,116,121,118,59,1,10674,116,5,162,2,59,101,8112,8114,1,162,114,100,111,116,59,1,183,114,59,3,55349,56608,4,3,99,101,105,8134,8138,8154,121,59,1,1095,99,107,4,2,59,109,8146,8148,1,10003,97,114,107,59,1,10003,59,1,967,114,4,7,59,69,99,101,102,109,115,8174,8176,8179,8258,8261,8268,8273,1,9675,59,1,10691,4,3,59,101,108,8187,8189,8193,1,710,113,59,1,8791,101,4,2,97,100,8200,8223,114,114,111,119,4,2,108,114,8210,8216,101,102,116,59,1,8634,105,103,104,116,59,1,8635,4,5,82,83,97,99,100,8235,8238,8241,8246,8252,59,1,174,59,1,9416,115,116,59,1,8859,105,114,99,59,1,8858,97,115,104,59,1,8861,59,1,8791,110,105,110,116,59,1,10768,105,100,59,1,10991,99,105,114,59,1,10690,117,98,115,4,2,59,117,8288,8290,1,9827,105,116,59,1,9827,4,4,108,109,110,112,8305,8326,8376,8400,111,110,4,2,59,101,8313,8315,1,58,4,2,59,113,8321,8323,1,8788,59,1,8788,4,2,109,112,8332,8344,97,4,2,59,116,8339,8341,1,44,59,1,64,4,3,59,102,108,8352,8354,8358,1,8705,110,59,1,8728,101,4,2,109,120,8365,8371,101,110,116,59,1,8705,101,115,59,1,8450,4,2,103,105,8382,8395,4,2,59,100,8388,8390,1,8773,111,116,59,1,10861,110,116,59,1,8750,4,3,102,114,121,8408,8412,8417,59,3,55349,56660,111,100,59,1,8720,5,169,2,59,115,8424,8426,1,169,114,59,1,8471,4,2,97,111,8436,8441,114,114,59,1,8629,115,115,59,1,10007,4,2,99,117,8452,8457,114,59,3,55349,56504,4,2,98,112,8463,8474,4,2,59,101,8469,8471,1,10959,59,1,10961,4,2,59,101,8480,8482,1,10960,59,1,10962,100,111,116,59,1,8943,4,7,100,101,108,112,114,118,119,8507,8522,8536,8550,8600,8697,8702,97,114,114,4,2,108,114,8516,8519,59,1,10552,59,1,10549,4,2,112,115,8528,8532,114,59,1,8926,99,59,1,8927,97,114,114,4,2,59,112,8545,8547,1,8630,59,1,10557,4,6,59,98,99,100,111,115,8564,8566,8573,8587,8592,8596,1,8746,114,99,97,112,59,1,10824,4,2,97,117,8579,8583,112,59,1,10822,112,59,1,10826,111,116,59,1,8845,114,59,1,10821,59,3,8746,65024,4,4,97,108,114,118,8610,8623,8663,8672,114,114,4,2,59,109,8618,8620,1,8631,59,1,10556,121,4,3,101,118,119,8632,8651,8656,113,4,2,112,115,8639,8645,114,101,99,59,1,8926,117,99,99,59,1,8927,101,101,59,1,8910,101,100,103,101,59,1,8911,101,110,5,164,1,59,8670,1,164,101,97,114,114,111,119,4,2,108,114,8684,8690,101,102,116,59,1,8630,105,103,104,116,59,1,8631,101,101,59,1,8910,101,100,59,1,8911,4,2,99,105,8713,8721,111,110,105,110,116,59,1,8754,110,116,59,1,8753,108,99,116,121,59,1,9005,4,19,65,72,97,98,99,100,101,102,104,105,106,108,111,114,115,116,117,119,122,8773,8778,8783,8821,8839,8854,8887,8914,8930,8944,9036,9041,9058,9197,9227,9258,9281,9297,9305,114,114,59,1,8659,97,114,59,1,10597,4,4,103,108,114,115,8793,8799,8805,8809,103,101,114,59,1,8224,101,116,104,59,1,8504,114,59,1,8595,104,4,2,59,118,8816,8818,1,8208,59,1,8867,4,2,107,108,8827,8834,97,114,111,119,59,1,10511,97,99,59,1,733,4,2,97,121,8845,8851,114,111,110,59,1,271,59,1,1076,4,3,59,97,111,8862,8864,8880,1,8518,4,2,103,114,8870,8876,103,101,114,59,1,8225,114,59,1,8650,116,115,101,113,59,1,10871,4,3,103,108,109,8895,8902,8907,5,176,1,59,8900,1,176,116,97,59,1,948,112,116,121,118,59,1,10673,4,2,105,114,8920,8926,115,104,116,59,1,10623,59,3,55349,56609,97,114,4,2,108,114,8938,8941,59,1,8643,59,1,8642,4,5,97,101,103,115,118,8956,8986,8989,8996,9001,109,4,3,59,111,115,8965,8967,8983,1,8900,110,100,4,2,59,115,8975,8977,1,8900,117,105,116,59,1,9830,59,1,9830,59,1,168,97,109,109,97,59,1,989,105,110,59,1,8946,4,3,59,105,111,9009,9011,9031,1,247,100,101,5,247,2,59,111,9020,9022,1,247,110,116,105,109,101,115,59,1,8903,110,120,59,1,8903,99,121,59,1,1106,99,4,2,111,114,9048,9053,114,110,59,1,8990,111,112,59,1,8973,4,5,108,112,116,117,119,9070,9076,9081,9130,9144,108,97,114,59,1,36,102,59,3,55349,56661,4,5,59,101,109,112,115,9093,9095,9109,9116,9122,1,729,113,4,2,59,100,9102,9104,1,8784,111,116,59,1,8785,105,110,117,115,59,1,8760,108,117,115,59,1,8724,113,117,97,114,101,59,1,8865,98,108,101,98,97,114,119,101,100,103,101,59,1,8966,110,4,3,97,100,104,9153,9160,9172,114,114,111,119,59,1,8595,111,119,110,97,114,114,111,119,115,59,1,8650,97,114,112,111,111,110,4,2,108,114,9184,9190,101,102,116,59,1,8643,105,103,104,116,59,1,8642,4,2,98,99,9203,9211,107,97,114,111,119,59,1,10512,4,2,111,114,9217,9222,114,110,59,1,8991,111,112,59,1,8972,4,3,99,111,116,9235,9248,9252,4,2,114,121,9241,9245,59,3,55349,56505,59,1,1109,108,59,1,10742,114,111,107,59,1,273,4,2,100,114,9264,9269,111,116,59,1,8945,105,4,2,59,102,9276,9278,1,9663,59,1,9662,4,2,97,104,9287,9292,114,114,59,1,8693,97,114,59,1,10607,97,110,103,108,101,59,1,10662,4,2,99,105,9311,9315,121,59,1,1119,103,114,97,114,114,59,1,10239,4,18,68,97,99,100,101,102,103,108,109,110,111,112,113,114,115,116,117,120,9361,9376,9398,9439,9444,9447,9462,9495,9531,9585,9598,9614,9659,9755,9771,9792,9808,9826,4,2,68,111,9367,9372,111,116,59,1,10871,116,59,1,8785,4,2,99,115,9382,9392,117,116,101,5,233,1,59,9390,1,233,116,101,114,59,1,10862,4,4,97,105,111,121,9408,9414,9430,9436,114,111,110,59,1,283,114,4,2,59,99,9421,9423,1,8790,5,234,1,59,9428,1,234,108,111,110,59,1,8789,59,1,1101,111,116,59,1,279,59,1,8519,4,2,68,114,9453,9458,111,116,59,1,8786,59,3,55349,56610,4,3,59,114,115,9470,9472,9482,1,10906,97,118,101,5,232,1,59,9480,1,232,4,2,59,100,9488,9490,1,10902,111,116,59,1,10904,4,4,59,105,108,115,9505,9507,9515,9518,1,10905,110,116,101,114,115,59,1,9191,59,1,8467,4,2,59,100,9524,9526,1,10901,111,116,59,1,10903,4,3,97,112,115,9539,9544,9564,99,114,59,1,275,116,121,4,3,59,115,118,9554,9556,9561,1,8709,101,116,59,1,8709,59,1,8709,112,4,2,49,59,9571,9583,4,2,51,52,9577,9580,59,1,8196,59,1,8197,1,8195,4,2,103,115,9591,9594,59,1,331,112,59,1,8194,4,2,103,112,9604,9609,111,110,59,1,281,102,59,3,55349,56662,4,3,97,108,115,9622,9635,9640,114,4,2,59,115,9629,9631,1,8917,108,59,1,10723,117,115,59,1,10865,105,4,3,59,108,118,9649,9651,9656,1,949,111,110,59,1,949,59,1,1013,4,4,99,115,117,118,9669,9686,9716,9747,4,2,105,111,9675,9680,114,99,59,1,8790,108,111,110,59,1,8789,4,2,105,108,9692,9696,109,59,1,8770,97,110,116,4,2,103,108,9705,9710,116,114,59,1,10902,101,115,115,59,1,10901,4,3,97,101,105,9724,9729,9734,108,115,59,1,61,115,116,59,1,8799,118,4,2,59,68,9741,9743,1,8801,68,59,1,10872,112,97,114,115,108,59,1,10725,4,2,68,97,9761,9766,111,116,59,1,8787,114,114,59,1,10609,4,3,99,100,105,9779,9783,9788,114,59,1,8495,111,116,59,1,8784,109,59,1,8770,4,2,97,104,9798,9801,59,1,951,5,240,1,59,9806,1,240,4,2,109,114,9814,9822,108,5,235,1,59,9820,1,235,111,59,1,8364,4,3,99,105,112,9834,9838,9843,108,59,1,33,115,116,59,1,8707,4,2,101,111,9849,9859,99,116,97,116,105,111,110,59,1,8496,110,101,110,116,105,97,108,101,59,1,8519,4,12,97,99,101,102,105,106,108,110,111,112,114,115,9896,9910,9914,9921,9954,9960,9967,9989,9994,10027,10036,10164,108,108,105,110,103,100,111,116,115,101,113,59,1,8786,121,59,1,1092,109,97,108,101,59,1,9792,4,3,105,108,114,9929,9935,9950,108,105,103,59,1,64259,4,2,105,108,9941,9945,103,59,1,64256,105,103,59,1,64260,59,3,55349,56611,108,105,103,59,1,64257,108,105,103,59,3,102,106,4,3,97,108,116,9975,9979,9984,116,59,1,9837,105,103,59,1,64258,110,115,59,1,9649,111,102,59,1,402,4,2,112,114,1e4,10005,102,59,3,55349,56663,4,2,97,107,10011,10016,108,108,59,1,8704,4,2,59,118,10022,10024,1,8916,59,1,10969,97,114,116,105,110,116,59,1,10765,4,2,97,111,10042,10159,4,2,99,115,10048,10155,4,6,49,50,51,52,53,55,10062,10102,10114,10135,10139,10151,4,6,50,51,52,53,54,56,10076,10083,10086,10093,10096,10099,5,189,1,59,10081,1,189,59,1,8531,5,188,1,59,10091,1,188,59,1,8533,59,1,8537,59,1,8539,4,2,51,53,10108,10111,59,1,8532,59,1,8534,4,3,52,53,56,10122,10129,10132,5,190,1,59,10127,1,190,59,1,8535,59,1,8540,53,59,1,8536,4,2,54,56,10145,10148,59,1,8538,59,1,8541,56,59,1,8542,108,59,1,8260,119,110,59,1,8994,99,114,59,3,55349,56507,4,17,69,97,98,99,100,101,102,103,105,106,108,110,111,114,115,116,118,10206,10217,10247,10254,10268,10273,10358,10363,10374,10380,10385,10406,10458,10464,10470,10497,10610,4,2,59,108,10212,10214,1,8807,59,1,10892,4,3,99,109,112,10225,10231,10244,117,116,101,59,1,501,109,97,4,2,59,100,10239,10241,1,947,59,1,989,59,1,10886,114,101,118,101,59,1,287,4,2,105,121,10260,10265,114,99,59,1,285,59,1,1075,111,116,59,1,289,4,4,59,108,113,115,10283,10285,10288,10308,1,8805,59,1,8923,4,3,59,113,115,10296,10298,10301,1,8805,59,1,8807,108,97,110,116,59,1,10878,4,4,59,99,100,108,10318,10320,10324,10345,1,10878,99,59,1,10921,111,116,4,2,59,111,10332,10334,1,10880,4,2,59,108,10340,10342,1,10882,59,1,10884,4,2,59,101,10351,10354,3,8923,65024,115,59,1,10900,114,59,3,55349,56612,4,2,59,103,10369,10371,1,8811,59,1,8921,109,101,108,59,1,8503,99,121,59,1,1107,4,4,59,69,97,106,10395,10397,10400,10403,1,8823,59,1,10898,59,1,10917,59,1,10916,4,4,69,97,101,115,10416,10419,10434,10453,59,1,8809,112,4,2,59,112,10426,10428,1,10890,114,111,120,59,1,10890,4,2,59,113,10440,10442,1,10888,4,2,59,113,10448,10450,1,10888,59,1,8809,105,109,59,1,8935,112,102,59,3,55349,56664,97,118,101,59,1,96,4,2,99,105,10476,10480,114,59,1,8458,109,4,3,59,101,108,10489,10491,10494,1,8819,59,1,10894,59,1,10896,5,62,6,59,99,100,108,113,114,10512,10514,10527,10532,10538,10545,1,62,4,2,99,105,10520,10523,59,1,10919,114,59,1,10874,111,116,59,1,8919,80,97,114,59,1,10645,117,101,115,116,59,1,10876,4,5,97,100,101,108,115,10557,10574,10579,10599,10605,4,2,112,114,10563,10570,112,114,111,120,59,1,10886,114,59,1,10616,111,116,59,1,8919,113,4,2,108,113,10586,10592,101,115,115,59,1,8923,108,101,115,115,59,1,10892,101,115,115,59,1,8823,105,109,59,1,8819,4,2,101,110,10616,10626,114,116,110,101,113,113,59,3,8809,65024,69,59,3,8809,65024,4,10,65,97,98,99,101,102,107,111,115,121,10653,10658,10713,10718,10724,10760,10765,10786,10850,10875,114,114,59,1,8660,4,4,105,108,109,114,10668,10674,10678,10684,114,115,112,59,1,8202,102,59,1,189,105,108,116,59,1,8459,4,2,100,114,10690,10695,99,121,59,1,1098,4,3,59,99,119,10703,10705,10710,1,8596,105,114,59,1,10568,59,1,8621,97,114,59,1,8463,105,114,99,59,1,293,4,3,97,108,114,10732,10748,10754,114,116,115,4,2,59,117,10741,10743,1,9829,105,116,59,1,9829,108,105,112,59,1,8230,99,111,110,59,1,8889,114,59,3,55349,56613,115,4,2,101,119,10772,10779,97,114,111,119,59,1,10533,97,114,111,119,59,1,10534,4,5,97,109,111,112,114,10798,10803,10809,10839,10844,114,114,59,1,8703,116,104,116,59,1,8763,107,4,2,108,114,10816,10827,101,102,116,97,114,114,111,119,59,1,8617,105,103,104,116,97,114,114,111,119,59,1,8618,102,59,3,55349,56665,98,97,114,59,1,8213,4,3,99,108,116,10858,10863,10869,114,59,3,55349,56509,97,115,104,59,1,8463,114,111,107,59,1,295,4,2,98,112,10881,10887,117,108,108,59,1,8259,104,101,110,59,1,8208,4,15,97,99,101,102,103,105,106,109,110,111,112,113,115,116,117,10925,10936,10958,10977,10990,11001,11039,11045,11101,11192,11220,11226,11237,11285,11299,99,117,116,101,5,237,1,59,10934,1,237,4,3,59,105,121,10944,10946,10955,1,8291,114,99,5,238,1,59,10953,1,238,59,1,1080,4,2,99,120,10964,10968,121,59,1,1077,99,108,5,161,1,59,10975,1,161,4,2,102,114,10983,10986,59,1,8660,59,3,55349,56614,114,97,118,101,5,236,1,59,10999,1,236,4,4,59,105,110,111,11011,11013,11028,11034,1,8520,4,2,105,110,11019,11024,110,116,59,1,10764,116,59,1,8749,102,105,110,59,1,10716,116,97,59,1,8489,108,105,103,59,1,307,4,3,97,111,112,11053,11092,11096,4,3,99,103,116,11061,11065,11088,114,59,1,299,4,3,101,108,112,11073,11076,11082,59,1,8465,105,110,101,59,1,8464,97,114,116,59,1,8465,104,59,1,305,102,59,1,8887,101,100,59,1,437,4,5,59,99,102,111,116,11113,11115,11121,11136,11142,1,8712,97,114,101,59,1,8453,105,110,4,2,59,116,11129,11131,1,8734,105,101,59,1,10717,100,111,116,59,1,305,4,5,59,99,101,108,112,11154,11156,11161,11179,11186,1,8747,97,108,59,1,8890,4,2,103,114,11167,11173,101,114,115,59,1,8484,99,97,108,59,1,8890,97,114,104,107,59,1,10775,114,111,100,59,1,10812,4,4,99,103,112,116,11202,11206,11211,11216,121,59,1,1105,111,110,59,1,303,102,59,3,55349,56666,97,59,1,953,114,111,100,59,1,10812,117,101,115,116,5,191,1,59,11235,1,191,4,2,99,105,11243,11248,114,59,3,55349,56510,110,4,5,59,69,100,115,118,11261,11263,11266,11271,11282,1,8712,59,1,8953,111,116,59,1,8949,4,2,59,118,11277,11279,1,8948,59,1,8947,59,1,8712,4,2,59,105,11291,11293,1,8290,108,100,101,59,1,297,4,2,107,109,11305,11310,99,121,59,1,1110,108,5,239,1,59,11316,1,239,4,6,99,102,109,111,115,117,11332,11346,11351,11357,11363,11380,4,2,105,121,11338,11343,114,99,59,1,309,59,1,1081,114,59,3,55349,56615,97,116,104,59,1,567,112,102,59,3,55349,56667,4,2,99,101,11369,11374,114,59,3,55349,56511,114,99,121,59,1,1112,107,99,121,59,1,1108,4,8,97,99,102,103,104,106,111,115,11404,11418,11433,11438,11445,11450,11455,11461,112,112,97,4,2,59,118,11413,11415,1,954,59,1,1008,4,2,101,121,11424,11430,100,105,108,59,1,311,59,1,1082,114,59,3,55349,56616,114,101,101,110,59,1,312,99,121,59,1,1093,99,121,59,1,1116,112,102,59,3,55349,56668,99,114,59,3,55349,56512,4,23,65,66,69,72,97,98,99,100,101,102,103,104,106,108,109,110,111,112,114,115,116,117,118,11515,11538,11544,11555,11560,11721,11780,11818,11868,12136,12160,12171,12203,12208,12246,12275,12327,12509,12523,12569,12641,12732,12752,4,3,97,114,116,11523,11528,11532,114,114,59,1,8666,114,59,1,8656,97,105,108,59,1,10523,97,114,114,59,1,10510,4,2,59,103,11550,11552,1,8806,59,1,10891,97,114,59,1,10594,4,9,99,101,103,109,110,112,113,114,116,11580,11586,11594,11600,11606,11624,11627,11636,11694,117,116,101,59,1,314,109,112,116,121,118,59,1,10676,114,97,110,59,1,8466,98,100,97,59,1,955,103,4,3,59,100,108,11615,11617,11620,1,10216,59,1,10641,101,59,1,10216,59,1,10885,117,111,5,171,1,59,11634,1,171,114,4,8,59,98,102,104,108,112,115,116,11655,11657,11669,11673,11677,11681,11685,11690,1,8592,4,2,59,102,11663,11665,1,8676,115,59,1,10527,115,59,1,10525,107,59,1,8617,112,59,1,8619,108,59,1,10553,105,109,59,1,10611,108,59,1,8610,4,3,59,97,101,11702,11704,11709,1,10923,105,108,59,1,10521,4,2,59,115,11715,11717,1,10925,59,3,10925,65024,4,3,97,98,114,11729,11734,11739,114,114,59,1,10508,114,107,59,1,10098,4,2,97,107,11745,11758,99,4,2,101,107,11752,11755,59,1,123,59,1,91,4,2,101,115,11764,11767,59,1,10635,108,4,2,100,117,11774,11777,59,1,10639,59,1,10637,4,4,97,101,117,121,11790,11796,11811,11815,114,111,110,59,1,318,4,2,100,105,11802,11807,105,108,59,1,316,108,59,1,8968,98,59,1,123,59,1,1083,4,4,99,113,114,115,11828,11832,11845,11864,97,59,1,10550,117,111,4,2,59,114,11840,11842,1,8220,59,1,8222,4,2,100,117,11851,11857,104,97,114,59,1,10599,115,104,97,114,59,1,10571,104,59,1,8626,4,5,59,102,103,113,115,11880,11882,12008,12011,12031,1,8804,116,4,5,97,104,108,114,116,11895,11913,11935,11947,11996,114,114,111,119,4,2,59,116,11905,11907,1,8592,97,105,108,59,1,8610,97,114,112,111,111,110,4,2,100,117,11925,11931,111,119,110,59,1,8637,112,59,1,8636,101,102,116,97,114,114,111,119,115,59,1,8647,105,103,104,116,4,3,97,104,115,11959,11974,11984,114,114,111,119,4,2,59,115,11969,11971,1,8596,59,1,8646,97,114,112,111,111,110,115,59,1,8651,113,117,105,103,97,114,114,111,119,59,1,8621,104,114,101,101,116,105,109,101,115,59,1,8907,59,1,8922,4,3,59,113,115,12019,12021,12024,1,8804,59,1,8806,108,97,110,116,59,1,10877,4,5,59,99,100,103,115,12043,12045,12049,12070,12083,1,10877,99,59,1,10920,111,116,4,2,59,111,12057,12059,1,10879,4,2,59,114,12065,12067,1,10881,59,1,10883,4,2,59,101,12076,12079,3,8922,65024,115,59,1,10899,4,5,97,100,101,103,115,12095,12103,12108,12126,12131,112,112,114,111,120,59,1,10885,111,116,59,1,8918,113,4,2,103,113,12115,12120,116,114,59,1,8922,103,116,114,59,1,10891,116,114,59,1,8822,105,109,59,1,8818,4,3,105,108,114,12144,12150,12156,115,104,116,59,1,10620,111,111,114,59,1,8970,59,3,55349,56617,4,2,59,69,12166,12168,1,8822,59,1,10897,4,2,97,98,12177,12198,114,4,2,100,117,12184,12187,59,1,8637,4,2,59,108,12193,12195,1,8636,59,1,10602,108,107,59,1,9604,99,121,59,1,1113,4,5,59,97,99,104,116,12220,12222,12227,12235,12241,1,8810,114,114,59,1,8647,111,114,110,101,114,59,1,8990,97,114,100,59,1,10603,114,105,59,1,9722,4,2,105,111,12252,12258,100,111,116,59,1,320,117,115,116,4,2,59,97,12267,12269,1,9136,99,104,101,59,1,9136,4,4,69,97,101,115,12285,12288,12303,12322,59,1,8808,112,4,2,59,112,12295,12297,1,10889,114,111,120,59,1,10889,4,2,59,113,12309,12311,1,10887,4,2,59,113,12317,12319,1,10887,59,1,8808,105,109,59,1,8934,4,8,97,98,110,111,112,116,119,122,12345,12359,12364,12421,12446,12467,12474,12490,4,2,110,114,12351,12355,103,59,1,10220,114,59,1,8701,114,107,59,1,10214,103,4,3,108,109,114,12373,12401,12409,101,102,116,4,2,97,114,12382,12389,114,114,111,119,59,1,10229,105,103,104,116,97,114,114,111,119,59,1,10231,97,112,115,116,111,59,1,10236,105,103,104,116,97,114,114,111,119,59,1,10230,112,97,114,114,111,119,4,2,108,114,12433,12439,101,102,116,59,1,8619,105,103,104,116,59,1,8620,4,3,97,102,108,12454,12458,12462,114,59,1,10629,59,3,55349,56669,117,115,59,1,10797,105,109,101,115,59,1,10804,4,2,97,98,12480,12485,115,116,59,1,8727,97,114,59,1,95,4,3,59,101,102,12498,12500,12506,1,9674,110,103,101,59,1,9674,59,1,10731,97,114,4,2,59,108,12517,12519,1,40,116,59,1,10643,4,5,97,99,104,109,116,12535,12540,12548,12561,12564,114,114,59,1,8646,111,114,110,101,114,59,1,8991,97,114,4,2,59,100,12556,12558,1,8651,59,1,10605,59,1,8206,114,105,59,1,8895,4,6,97,99,104,105,113,116,12583,12589,12594,12597,12614,12635,113,117,111,59,1,8249,114,59,3,55349,56513,59,1,8624,109,4,3,59,101,103,12606,12608,12611,1,8818,59,1,10893,59,1,10895,4,2,98,117,12620,12623,59,1,91,111,4,2,59,114,12630,12632,1,8216,59,1,8218,114,111,107,59,1,322,5,60,8,59,99,100,104,105,108,113,114,12660,12662,12675,12680,12686,12692,12698,12705,1,60,4,2,99,105,12668,12671,59,1,10918,114,59,1,10873,111,116,59,1,8918,114,101,101,59,1,8907,109,101,115,59,1,8905,97,114,114,59,1,10614,117,101,115,116,59,1,10875,4,2,80,105,12711,12716,97,114,59,1,10646,4,3,59,101,102,12724,12726,12729,1,9667,59,1,8884,59,1,9666,114,4,2,100,117,12739,12746,115,104,97,114,59,1,10570,104,97,114,59,1,10598,4,2,101,110,12758,12768,114,116,110,101,113,113,59,3,8808,65024,69,59,3,8808,65024,4,14,68,97,99,100,101,102,104,105,108,110,111,112,115,117,12803,12809,12893,12908,12914,12928,12933,12937,13011,13025,13032,13049,13052,13069,68,111,116,59,1,8762,4,4,99,108,112,114,12819,12827,12849,12887,114,5,175,1,59,12825,1,175,4,2,101,116,12833,12836,59,1,9794,4,2,59,101,12842,12844,1,10016,115,101,59,1,10016,4,2,59,115,12855,12857,1,8614,116,111,4,4,59,100,108,117,12869,12871,12877,12883,1,8614,111,119,110,59,1,8615,101,102,116,59,1,8612,112,59,1,8613,107,101,114,59,1,9646,4,2,111,121,12899,12905,109,109,97,59,1,10793,59,1,1084,97,115,104,59,1,8212,97,115,117,114,101,100,97,110,103,108,101,59,1,8737,114,59,3,55349,56618,111,59,1,8487,4,3,99,100,110,12945,12954,12985,114,111,5,181,1,59,12952,1,181,4,4,59,97,99,100,12964,12966,12971,12976,1,8739,115,116,59,1,42,105,114,59,1,10992,111,116,5,183,1,59,12983,1,183,117,115,4,3,59,98,100,12995,12997,13e3,1,8722,59,1,8863,4,2,59,117,13006,13008,1,8760,59,1,10794,4,2,99,100,13017,13021,112,59,1,10971,114,59,1,8230,112,108,117,115,59,1,8723,4,2,100,112,13038,13044,101,108,115,59,1,8871,102,59,3,55349,56670,59,1,8723,4,2,99,116,13058,13063,114,59,3,55349,56514,112,111,115,59,1,8766,4,3,59,108,109,13077,13079,13087,1,956,116,105,109,97,112,59,1,8888,97,112,59,1,8888,4,24,71,76,82,86,97,98,99,100,101,102,103,104,105,106,108,109,111,112,114,115,116,117,118,119,13142,13165,13217,13229,13247,13330,13359,13414,13420,13508,13513,13579,13602,13626,13631,13762,13767,13855,13936,13995,14214,14285,14312,14432,4,2,103,116,13148,13152,59,3,8921,824,4,2,59,118,13158,13161,3,8811,8402,59,3,8811,824,4,3,101,108,116,13173,13200,13204,102,116,4,2,97,114,13181,13188,114,114,111,119,59,1,8653,105,103,104,116,97,114,114,111,119,59,1,8654,59,3,8920,824,4,2,59,118,13210,13213,3,8810,8402,59,3,8810,824,105,103,104,116,97,114,114,111,119,59,1,8655,4,2,68,100,13235,13241,97,115,104,59,1,8879,97,115,104,59,1,8878,4,5,98,99,110,112,116,13259,13264,13270,13275,13308,108,97,59,1,8711,117,116,101,59,1,324,103,59,3,8736,8402,4,5,59,69,105,111,112,13287,13289,13293,13298,13302,1,8777,59,3,10864,824,100,59,3,8779,824,115,59,1,329,114,111,120,59,1,8777,117,114,4,2,59,97,13316,13318,1,9838,108,4,2,59,115,13325,13327,1,9838,59,1,8469,4,2,115,117,13336,13344,112,5,160,1,59,13342,1,160,109,112,4,2,59,101,13352,13355,3,8782,824,59,3,8783,824,4,5,97,101,111,117,121,13371,13385,13391,13407,13411,4,2,112,114,13377,13380,59,1,10819,111,110,59,1,328,100,105,108,59,1,326,110,103,4,2,59,100,13399,13401,1,8775,111,116,59,3,10861,824,112,59,1,10818,59,1,1085,97,115,104,59,1,8211,4,7,59,65,97,100,113,115,120,13436,13438,13443,13466,13472,13478,13494,1,8800,114,114,59,1,8663,114,4,2,104,114,13450,13454,107,59,1,10532,4,2,59,111,13460,13462,1,8599,119,59,1,8599,111,116,59,3,8784,824,117,105,118,59,1,8802,4,2,101,105,13484,13489,97,114,59,1,10536,109,59,3,8770,824,105,115,116,4,2,59,115,13503,13505,1,8708,59,1,8708,114,59,3,55349,56619,4,4,69,101,115,116,13523,13527,13563,13568,59,3,8807,824,4,3,59,113,115,13535,13537,13559,1,8817,4,3,59,113,115,13545,13547,13551,1,8817,59,3,8807,824,108,97,110,116,59,3,10878,824,59,3,10878,824,105,109,59,1,8821,4,2,59,114,13574,13576,1,8815,59,1,8815,4,3,65,97,112,13587,13592,13597,114,114,59,1,8654,114,114,59,1,8622,97,114,59,1,10994,4,3,59,115,118,13610,13612,13623,1,8715,4,2,59,100,13618,13620,1,8956,59,1,8954,59,1,8715,99,121,59,1,1114,4,7,65,69,97,100,101,115,116,13647,13652,13656,13661,13665,13737,13742,114,114,59,1,8653,59,3,8806,824,114,114,59,1,8602,114,59,1,8229,4,4,59,102,113,115,13675,13677,13703,13725,1,8816,116,4,2,97,114,13684,13691,114,114,111,119,59,1,8602,105,103,104,116,97,114,114,111,119,59,1,8622,4,3,59,113,115,13711,13713,13717,1,8816,59,3,8806,824,108,97,110,116,59,3,10877,824,4,2,59,115,13731,13734,3,10877,824,59,1,8814,105,109,59,1,8820,4,2,59,114,13748,13750,1,8814,105,4,2,59,101,13757,13759,1,8938,59,1,8940,105,100,59,1,8740,4,2,112,116,13773,13778,102,59,3,55349,56671,5,172,3,59,105,110,13787,13789,13829,1,172,110,4,4,59,69,100,118,13800,13802,13806,13812,1,8713,59,3,8953,824,111,116,59,3,8949,824,4,3,97,98,99,13820,13823,13826,59,1,8713,59,1,8951,59,1,8950,105,4,2,59,118,13836,13838,1,8716,4,3,97,98,99,13846,13849,13852,59,1,8716,59,1,8958,59,1,8957,4,3,97,111,114,13863,13892,13899,114,4,4,59,97,115,116,13874,13876,13883,13888,1,8742,108,108,101,108,59,1,8742,108,59,3,11005,8421,59,3,8706,824,108,105,110,116,59,1,10772,4,3,59,99,101,13907,13909,13914,1,8832,117,101,59,1,8928,4,2,59,99,13920,13923,3,10927,824,4,2,59,101,13929,13931,1,8832,113,59,3,10927,824,4,4,65,97,105,116,13946,13951,13971,13982,114,114,59,1,8655,114,114,4,3,59,99,119,13961,13963,13967,1,8603,59,3,10547,824,59,3,8605,824,103,104,116,97,114,114,111,119,59,1,8603,114,105,4,2,59,101,13990,13992,1,8939,59,1,8941,4,7,99,104,105,109,112,113,117,14011,14036,14060,14080,14085,14090,14106,4,4,59,99,101,114,14021,14023,14028,14032,1,8833,117,101,59,1,8929,59,3,10928,824,59,3,55349,56515,111,114,116,4,2,109,112,14045,14050,105,100,59,1,8740,97,114,97,108,108,101,108,59,1,8742,109,4,2,59,101,14067,14069,1,8769,4,2,59,113,14075,14077,1,8772,59,1,8772,105,100,59,1,8740,97,114,59,1,8742,115,117,4,2,98,112,14098,14102,101,59,1,8930,101,59,1,8931,4,3,98,99,112,14114,14157,14171,4,4,59,69,101,115,14124,14126,14130,14133,1,8836,59,3,10949,824,59,1,8840,101,116,4,2,59,101,14141,14144,3,8834,8402,113,4,2,59,113,14151,14153,1,8840,59,3,10949,824,99,4,2,59,101,14164,14166,1,8833,113,59,3,10928,824,4,4,59,69,101,115,14181,14183,14187,14190,1,8837,59,3,10950,824,59,1,8841,101,116,4,2,59,101,14198,14201,3,8835,8402,113,4,2,59,113,14208,14210,1,8841,59,3,10950,824,4,4,103,105,108,114,14224,14228,14238,14242,108,59,1,8825,108,100,101,5,241,1,59,14236,1,241,103,59,1,8824,105,97,110,103,108,101,4,2,108,114,14254,14269,101,102,116,4,2,59,101,14263,14265,1,8938,113,59,1,8940,105,103,104,116,4,2,59,101,14279,14281,1,8939,113,59,1,8941,4,2,59,109,14291,14293,1,957,4,3,59,101,115,14301,14303,14308,1,35,114,111,59,1,8470,112,59,1,8199,4,9,68,72,97,100,103,105,108,114,115,14332,14338,14344,14349,14355,14369,14376,14408,14426,97,115,104,59,1,8877,97,114,114,59,1,10500,112,59,3,8781,8402,97,115,104,59,1,8876,4,2,101,116,14361,14365,59,3,8805,8402,59,3,62,8402,110,102,105,110,59,1,10718,4,3,65,101,116,14384,14389,14393,114,114,59,1,10498,59,3,8804,8402,4,2,59,114,14399,14402,3,60,8402,105,101,59,3,8884,8402,4,2,65,116,14414,14419,114,114,59,1,10499,114,105,101,59,3,8885,8402,105,109,59,3,8764,8402,4,3,65,97,110,14440,14445,14468,114,114,59,1,8662,114,4,2,104,114,14452,14456,107,59,1,10531,4,2,59,111,14462,14464,1,8598,119,59,1,8598,101,97,114,59,1,10535,4,18,83,97,99,100,101,102,103,104,105,108,109,111,112,114,115,116,117,118,14512,14515,14535,14560,14597,14603,14618,14643,14657,14662,14701,14741,14747,14769,14851,14877,14907,14916,59,1,9416,4,2,99,115,14521,14531,117,116,101,5,243,1,59,14529,1,243,116,59,1,8859,4,2,105,121,14541,14557,114,4,2,59,99,14548,14550,1,8858,5,244,1,59,14555,1,244,59,1,1086,4,5,97,98,105,111,115,14572,14577,14583,14587,14591,115,104,59,1,8861,108,97,99,59,1,337,118,59,1,10808,116,59,1,8857,111,108,100,59,1,10684,108,105,103,59,1,339,4,2,99,114,14609,14614,105,114,59,1,10687,59,3,55349,56620,4,3,111,114,116,14626,14630,14640,110,59,1,731,97,118,101,5,242,1,59,14638,1,242,59,1,10689,4,2,98,109,14649,14654,97,114,59,1,10677,59,1,937,110,116,59,1,8750,4,4,97,99,105,116,14672,14677,14693,14698,114,114,59,1,8634,4,2,105,114,14683,14687,114,59,1,10686,111,115,115,59,1,10683,110,101,59,1,8254,59,1,10688,4,3,97,101,105,14709,14714,14719,99,114,59,1,333,103,97,59,1,969,4,3,99,100,110,14727,14733,14736,114,111,110,59,1,959,59,1,10678,117,115,59,1,8854,112,102,59,3,55349,56672,4,3,97,101,108,14755,14759,14764,114,59,1,10679,114,112,59,1,10681,117,115,59,1,8853,4,7,59,97,100,105,111,115,118,14785,14787,14792,14831,14837,14841,14848,1,8744,114,114,59,1,8635,4,4,59,101,102,109,14802,14804,14817,14824,1,10845,114,4,2,59,111,14811,14813,1,8500,102,59,1,8500,5,170,1,59,14822,1,170,5,186,1,59,14829,1,186,103,111,102,59,1,8886,114,59,1,10838,108,111,112,101,59,1,10839,59,1,10843,4,3,99,108,111,14859,14863,14873,114,59,1,8500,97,115,104,5,248,1,59,14871,1,248,108,59,1,8856,105,4,2,108,109,14884,14893,100,101,5,245,1,59,14891,1,245,101,115,4,2,59,97,14901,14903,1,8855,115,59,1,10806,109,108,5,246,1,59,14914,1,246,98,97,114,59,1,9021,4,12,97,99,101,102,104,105,108,109,111,114,115,117,14948,14992,14996,15033,15038,15068,15090,15189,15192,15222,15427,15441,114,4,4,59,97,115,116,14959,14961,14976,14989,1,8741,5,182,2,59,108,14968,14970,1,182,108,101,108,59,1,8741,4,2,105,108,14982,14986,109,59,1,10995,59,1,11005,59,1,8706,121,59,1,1087,114,4,5,99,105,109,112,116,15009,15014,15019,15024,15027,110,116,59,1,37,111,100,59,1,46,105,108,59,1,8240,59,1,8869,101,110,107,59,1,8241,114,59,3,55349,56621,4,3,105,109,111,15046,15057,15063,4,2,59,118,15052,15054,1,966,59,1,981,109,97,116,59,1,8499,110,101,59,1,9742,4,3,59,116,118,15076,15078,15087,1,960,99,104,102,111,114,107,59,1,8916,59,1,982,4,2,97,117,15096,15119,110,4,2,99,107,15103,15115,107,4,2,59,104,15110,15112,1,8463,59,1,8462,118,59,1,8463,115,4,9,59,97,98,99,100,101,109,115,116,15140,15142,15148,15151,15156,15168,15171,15179,15184,1,43,99,105,114,59,1,10787,59,1,8862,105,114,59,1,10786,4,2,111,117,15162,15165,59,1,8724,59,1,10789,59,1,10866,110,5,177,1,59,15177,1,177,105,109,59,1,10790,119,111,59,1,10791,59,1,177,4,3,105,112,117,15200,15208,15213,110,116,105,110,116,59,1,10773,102,59,3,55349,56673,110,100,5,163,1,59,15220,1,163,4,10,59,69,97,99,101,105,110,111,115,117,15244,15246,15249,15253,15258,15334,15347,15367,15416,15421,1,8826,59,1,10931,112,59,1,10935,117,101,59,1,8828,4,2,59,99,15264,15266,1,10927,4,6,59,97,99,101,110,115,15280,15282,15290,15299,15303,15329,1,8826,112,112,114,111,120,59,1,10935,117,114,108,121,101,113,59,1,8828,113,59,1,10927,4,3,97,101,115,15311,15319,15324,112,112,114,111,120,59,1,10937,113,113,59,1,10933,105,109,59,1,8936,105,109,59,1,8830,109,101,4,2,59,115,15342,15344,1,8242,59,1,8473,4,3,69,97,115,15355,15358,15362,59,1,10933,112,59,1,10937,105,109,59,1,8936,4,3,100,102,112,15375,15378,15404,59,1,8719,4,3,97,108,115,15386,15392,15398,108,97,114,59,1,9006,105,110,101,59,1,8978,117,114,102,59,1,8979,4,2,59,116,15410,15412,1,8733,111,59,1,8733,105,109,59,1,8830,114,101,108,59,1,8880,4,2,99,105,15433,15438,114,59,3,55349,56517,59,1,968,110,99,115,112,59,1,8200,4,6,102,105,111,112,115,117,15462,15467,15472,15478,15485,15491,114,59,3,55349,56622,110,116,59,1,10764,112,102,59,3,55349,56674,114,105,109,101,59,1,8279,99,114,59,3,55349,56518,4,3,97,101,111,15499,15520,15534,116,4,2,101,105,15506,15515,114,110,105,111,110,115,59,1,8461,110,116,59,1,10774,115,116,4,2,59,101,15528,15530,1,63,113,59,1,8799,116,5,34,1,59,15540,1,34,4,21,65,66,72,97,98,99,100,101,102,104,105,108,109,110,111,112,114,115,116,117,120,15586,15609,15615,15620,15796,15855,15893,15931,15977,16001,16039,16183,16204,16222,16228,16285,16312,16318,16363,16408,16416,4,3,97,114,116,15594,15599,15603,114,114,59,1,8667,114,59,1,8658,97,105,108,59,1,10524,97,114,114,59,1,10511,97,114,59,1,10596,4,7,99,100,101,110,113,114,116,15636,15651,15656,15664,15687,15696,15770,4,2,101,117,15642,15646,59,3,8765,817,116,101,59,1,341,105,99,59,1,8730,109,112,116,121,118,59,1,10675,103,4,4,59,100,101,108,15675,15677,15680,15683,1,10217,59,1,10642,59,1,10661,101,59,1,10217,117,111,5,187,1,59,15694,1,187,114,4,11,59,97,98,99,102,104,108,112,115,116,119,15721,15723,15727,15739,15742,15746,15750,15754,15758,15763,15767,1,8594,112,59,1,10613,4,2,59,102,15733,15735,1,8677,115,59,1,10528,59,1,10547,115,59,1,10526,107,59,1,8618,112,59,1,8620,108,59,1,10565,105,109,59,1,10612,108,59,1,8611,59,1,8605,4,2,97,105,15776,15781,105,108,59,1,10522,111,4,2,59,110,15788,15790,1,8758,97,108,115,59,1,8474,4,3,97,98,114,15804,15809,15814,114,114,59,1,10509,114,107,59,1,10099,4,2,97,107,15820,15833,99,4,2,101,107,15827,15830,59,1,125,59,1,93,4,2,101,115,15839,15842,59,1,10636,108,4,2,100,117,15849,15852,59,1,10638,59,1,10640,4,4,97,101,117,121,15865,15871,15886,15890,114,111,110,59,1,345,4,2,100,105,15877,15882,105,108,59,1,343,108,59,1,8969,98,59,1,125,59,1,1088,4,4,99,108,113,115,15903,15907,15914,15927,97,59,1,10551,100,104,97,114,59,1,10601,117,111,4,2,59,114,15922,15924,1,8221,59,1,8221,104,59,1,8627,4,3,97,99,103,15939,15966,15970,108,4,4,59,105,112,115,15950,15952,15957,15963,1,8476,110,101,59,1,8475,97,114,116,59,1,8476,59,1,8477,116,59,1,9645,5,174,1,59,15975,1,174,4,3,105,108,114,15985,15991,15997,115,104,116,59,1,10621,111,111,114,59,1,8971,59,3,55349,56623,4,2,97,111,16007,16028,114,4,2,100,117,16014,16017,59,1,8641,4,2,59,108,16023,16025,1,8640,59,1,10604,4,2,59,118,16034,16036,1,961,59,1,1009,4,3,103,110,115,16047,16167,16171,104,116,4,6,97,104,108,114,115,116,16063,16081,16103,16130,16143,16155,114,114,111,119,4,2,59,116,16073,16075,1,8594,97,105,108,59,1,8611,97,114,112,111,111,110,4,2,100,117,16093,16099,111,119,110,59,1,8641,112,59,1,8640,101,102,116,4,2,97,104,16112,16120,114,114,111,119,115,59,1,8644,97,114,112,111,111,110,115,59,1,8652,105,103,104,116,97,114,114,111,119,115,59,1,8649,113,117,105,103,97,114,114,111,119,59,1,8605,104,114,101,101,116,105,109,101,115,59,1,8908,103,59,1,730,105,110,103,100,111,116,115,101,113,59,1,8787,4,3,97,104,109,16191,16196,16201,114,114,59,1,8644,97,114,59,1,8652,59,1,8207,111,117,115,116,4,2,59,97,16214,16216,1,9137,99,104,101,59,1,9137,109,105,100,59,1,10990,4,4,97,98,112,116,16238,16252,16257,16278,4,2,110,114,16244,16248,103,59,1,10221,114,59,1,8702,114,107,59,1,10215,4,3,97,102,108,16265,16269,16273,114,59,1,10630,59,3,55349,56675,117,115,59,1,10798,105,109,101,115,59,1,10805,4,2,97,112,16291,16304,114,4,2,59,103,16298,16300,1,41,116,59,1,10644,111,108,105,110,116,59,1,10770,97,114,114,59,1,8649,4,4,97,99,104,113,16328,16334,16339,16342,113,117,111,59,1,8250,114,59,3,55349,56519,59,1,8625,4,2,98,117,16348,16351,59,1,93,111,4,2,59,114,16358,16360,1,8217,59,1,8217,4,3,104,105,114,16371,16377,16383,114,101,101,59,1,8908,109,101,115,59,1,8906,105,4,4,59,101,102,108,16394,16396,16399,16402,1,9657,59,1,8885,59,1,9656,116,114,105,59,1,10702,108,117,104,97,114,59,1,10600,59,1,8478,4,19,97,98,99,100,101,102,104,105,108,109,111,112,113,114,115,116,117,119,122,16459,16466,16472,16572,16590,16672,16687,16746,16844,16850,16924,16963,16988,17115,17121,17154,17206,17614,17656,99,117,116,101,59,1,347,113,117,111,59,1,8218,4,10,59,69,97,99,101,105,110,112,115,121,16494,16496,16499,16513,16518,16531,16536,16556,16564,16569,1,8827,59,1,10932,4,2,112,114,16505,16508,59,1,10936,111,110,59,1,353,117,101,59,1,8829,4,2,59,100,16524,16526,1,10928,105,108,59,1,351,114,99,59,1,349,4,3,69,97,115,16544,16547,16551,59,1,10934,112,59,1,10938,105,109,59,1,8937,111,108,105,110,116,59,1,10771,105,109,59,1,8831,59,1,1089,111,116,4,3,59,98,101,16582,16584,16587,1,8901,59,1,8865,59,1,10854,4,7,65,97,99,109,115,116,120,16606,16611,16634,16642,16646,16652,16668,114,114,59,1,8664,114,4,2,104,114,16618,16622,107,59,1,10533,4,2,59,111,16628,16630,1,8600,119,59,1,8600,116,5,167,1,59,16640,1,167,105,59,1,59,119,97,114,59,1,10537,109,4,2,105,110,16659,16665,110,117,115,59,1,8726,59,1,8726,116,59,1,10038,114,4,2,59,111,16679,16682,3,55349,56624,119,110,59,1,8994,4,4,97,99,111,121,16697,16702,16716,16739,114,112,59,1,9839,4,2,104,121,16708,16713,99,121,59,1,1097,59,1,1096,114,116,4,2,109,112,16724,16729,105,100,59,1,8739,97,114,97,108,108,101,108,59,1,8741,5,173,1,59,16744,1,173,4,2,103,109,16752,16770,109,97,4,3,59,102,118,16762,16764,16767,1,963,59,1,962,59,1,962,4,8,59,100,101,103,108,110,112,114,16788,16790,16795,16806,16817,16828,16832,16838,1,8764,111,116,59,1,10858,4,2,59,113,16801,16803,1,8771,59,1,8771,4,2,59,69,16812,16814,1,10910,59,1,10912,4,2,59,69,16823,16825,1,10909,59,1,10911,101,59,1,8774,108,117,115,59,1,10788,97,114,114,59,1,10610,97,114,114,59,1,8592,4,4,97,101,105,116,16860,16883,16891,16904,4,2,108,115,16866,16878,108,115,101,116,109,105,110,117,115,59,1,8726,104,112,59,1,10803,112,97,114,115,108,59,1,10724,4,2,100,108,16897,16900,59,1,8739,101,59,1,8995,4,2,59,101,16910,16912,1,10922,4,2,59,115,16918,16920,1,10924,59,3,10924,65024,4,3,102,108,112,16932,16938,16958,116,99,121,59,1,1100,4,2,59,98,16944,16946,1,47,4,2,59,97,16952,16954,1,10692,114,59,1,9023,102,59,3,55349,56676,97,4,2,100,114,16970,16985,101,115,4,2,59,117,16978,16980,1,9824,105,116,59,1,9824,59,1,8741,4,3,99,115,117,16996,17028,17089,4,2,97,117,17002,17015,112,4,2,59,115,17009,17011,1,8851,59,3,8851,65024,112,4,2,59,115,17022,17024,1,8852,59,3,8852,65024,117,4,2,98,112,17035,17062,4,3,59,101,115,17043,17045,17048,1,8847,59,1,8849,101,116,4,2,59,101,17056,17058,1,8847,113,59,1,8849,4,3,59,101,115,17070,17072,17075,1,8848,59,1,8850,101,116,4,2,59,101,17083,17085,1,8848,113,59,1,8850,4,3,59,97,102,17097,17099,17112,1,9633,114,4,2,101,102,17106,17109,59,1,9633,59,1,9642,59,1,9642,97,114,114,59,1,8594,4,4,99,101,109,116,17131,17136,17142,17148,114,59,3,55349,56520,116,109,110,59,1,8726,105,108,101,59,1,8995,97,114,102,59,1,8902,4,2,97,114,17160,17172,114,4,2,59,102,17167,17169,1,9734,59,1,9733,4,2,97,110,17178,17202,105,103,104,116,4,2,101,112,17188,17197,112,115,105,108,111,110,59,1,1013,104,105,59,1,981,115,59,1,175,4,5,98,99,109,110,112,17218,17351,17420,17423,17427,4,9,59,69,100,101,109,110,112,114,115,17238,17240,17243,17248,17261,17267,17279,17285,17291,1,8834,59,1,10949,111,116,59,1,10941,4,2,59,100,17254,17256,1,8838,111,116,59,1,10947,117,108,116,59,1,10945,4,2,69,101,17273,17276,59,1,10955,59,1,8842,108,117,115,59,1,10943,97,114,114,59,1,10617,4,3,101,105,117,17299,17335,17339,116,4,3,59,101,110,17308,17310,17322,1,8834,113,4,2,59,113,17317,17319,1,8838,59,1,10949,101,113,4,2,59,113,17330,17332,1,8842,59,1,10955,109,59,1,10951,4,2,98,112,17345,17348,59,1,10965,59,1,10963,99,4,6,59,97,99,101,110,115,17366,17368,17376,17385,17389,17415,1,8827,112,112,114,111,120,59,1,10936,117,114,108,121,101,113,59,1,8829,113,59,1,10928,4,3,97,101,115,17397,17405,17410,112,112,114,111,120,59,1,10938,113,113,59,1,10934,105,109,59,1,8937,105,109,59,1,8831,59,1,8721,103,59,1,9834,4,13,49,50,51,59,69,100,101,104,108,109,110,112,115,17455,17462,17469,17476,17478,17481,17496,17509,17524,17530,17536,17548,17554,5,185,1,59,17460,1,185,5,178,1,59,17467,1,178,5,179,1,59,17474,1,179,1,8835,59,1,10950,4,2,111,115,17487,17491,116,59,1,10942,117,98,59,1,10968,4,2,59,100,17502,17504,1,8839,111,116,59,1,10948,115,4,2,111,117,17516,17520,108,59,1,10185,98,59,1,10967,97,114,114,59,1,10619,117,108,116,59,1,10946,4,2,69,101,17542,17545,59,1,10956,59,1,8843,108,117,115,59,1,10944,4,3,101,105,117,17562,17598,17602,116,4,3,59,101,110,17571,17573,17585,1,8835,113,4,2,59,113,17580,17582,1,8839,59,1,10950,101,113,4,2,59,113,17593,17595,1,8843,59,1,10956,109,59,1,10952,4,2,98,112,17608,17611,59,1,10964,59,1,10966,4,3,65,97,110,17622,17627,17650,114,114,59,1,8665,114,4,2,104,114,17634,17638,107,59,1,10534,4,2,59,111,17644,17646,1,8601,119,59,1,8601,119,97,114,59,1,10538,108,105,103,5,223,1,59,17664,1,223,4,13,97,98,99,100,101,102,104,105,111,112,114,115,119,17694,17709,17714,17737,17742,17749,17754,17860,17905,17957,17964,18090,18122,4,2,114,117,17700,17706,103,101,116,59,1,8982,59,1,964,114,107,59,1,9140,4,3,97,101,121,17722,17728,17734,114,111,110,59,1,357,100,105,108,59,1,355,59,1,1090,111,116,59,1,8411,108,114,101,99,59,1,8981,114,59,3,55349,56625,4,4,101,105,107,111,17764,17805,17836,17851,4,2,114,116,17770,17786,101,4,2,52,102,17777,17780,59,1,8756,111,114,101,59,1,8756,97,4,3,59,115,118,17795,17797,17802,1,952,121,109,59,1,977,59,1,977,4,2,99,110,17811,17831,107,4,2,97,115,17818,17826,112,112,114,111,120,59,1,8776,105,109,59,1,8764,115,112,59,1,8201,4,2,97,115,17842,17846,112,59,1,8776,105,109,59,1,8764,114,110,5,254,1,59,17858,1,254,4,3,108,109,110,17868,17873,17901,100,101,59,1,732,101,115,5,215,3,59,98,100,17884,17886,17898,1,215,4,2,59,97,17892,17894,1,8864,114,59,1,10801,59,1,10800,116,59,1,8749,4,3,101,112,115,17913,17917,17953,97,59,1,10536,4,4,59,98,99,102,17927,17929,17934,17939,1,8868,111,116,59,1,9014,105,114,59,1,10993,4,2,59,111,17945,17948,3,55349,56677,114,107,59,1,10970,97,59,1,10537,114,105,109,101,59,1,8244,4,3,97,105,112,17972,17977,18082,100,101,59,1,8482,4,7,97,100,101,109,112,115,116,17993,18051,18056,18059,18066,18072,18076,110,103,108,101,4,5,59,100,108,113,114,18009,18011,18017,18032,18035,1,9653,111,119,110,59,1,9663,101,102,116,4,2,59,101,18026,18028,1,9667,113,59,1,8884,59,1,8796,105,103,104,116,4,2,59,101,18045,18047,1,9657,113,59,1,8885,111,116,59,1,9708,59,1,8796,105,110,117,115,59,1,10810,108,117,115,59,1,10809,98,59,1,10701,105,109,101,59,1,10811,101,122,105,117,109,59,1,9186,4,3,99,104,116,18098,18111,18116,4,2,114,121,18104,18108,59,3,55349,56521,59,1,1094,99,121,59,1,1115,114,111,107,59,1,359,4,2,105,111,18128,18133,120,116,59,1,8812,104,101,97,100,4,2,108,114,18143,18154,101,102,116,97,114,114,111,119,59,1,8606,105,103,104,116,97,114,114,111,119,59,1,8608,4,18,65,72,97,98,99,100,102,103,104,108,109,111,112,114,115,116,117,119,18204,18209,18214,18234,18250,18268,18292,18308,18319,18343,18379,18397,18413,18504,18547,18553,18584,18603,114,114,59,1,8657,97,114,59,1,10595,4,2,99,114,18220,18230,117,116,101,5,250,1,59,18228,1,250,114,59,1,8593,114,4,2,99,101,18241,18245,121,59,1,1118,118,101,59,1,365,4,2,105,121,18256,18265,114,99,5,251,1,59,18263,1,251,59,1,1091,4,3,97,98,104,18276,18281,18287,114,114,59,1,8645,108,97,99,59,1,369,97,114,59,1,10606,4,2,105,114,18298,18304,115,104,116,59,1,10622,59,3,55349,56626,114,97,118,101,5,249,1,59,18317,1,249,4,2,97,98,18325,18338,114,4,2,108,114,18332,18335,59,1,8639,59,1,8638,108,107,59,1,9600,4,2,99,116,18349,18374,4,2,111,114,18355,18369,114,110,4,2,59,101,18363,18365,1,8988,114,59,1,8988,111,112,59,1,8975,114,105,59,1,9720,4,2,97,108,18385,18390,99,114,59,1,363,5,168,1,59,18395,1,168,4,2,103,112,18403,18408,111,110,59,1,371,102,59,3,55349,56678,4,6,97,100,104,108,115,117,18427,18434,18445,18470,18475,18494,114,114,111,119,59,1,8593,111,119,110,97,114,114,111,119,59,1,8597,97,114,112,111,111,110,4,2,108,114,18457,18463,101,102,116,59,1,8639,105,103,104,116,59,1,8638,117,115,59,1,8846,105,4,3,59,104,108,18484,18486,18489,1,965,59,1,978,111,110,59,1,965,112,97,114,114,111,119,115,59,1,8648,4,3,99,105,116,18512,18537,18542,4,2,111,114,18518,18532,114,110,4,2,59,101,18526,18528,1,8989,114,59,1,8989,111,112,59,1,8974,110,103,59,1,367,114,105,59,1,9721,99,114,59,3,55349,56522,4,3,100,105,114,18561,18566,18572,111,116,59,1,8944,108,100,101,59,1,361,105,4,2,59,102,18579,18581,1,9653,59,1,9652,4,2,97,109,18590,18595,114,114,59,1,8648,108,5,252,1,59,18601,1,252,97,110,103,108,101,59,1,10663,4,15,65,66,68,97,99,100,101,102,108,110,111,112,114,115,122,18643,18648,18661,18667,18847,18851,18857,18904,18909,18915,18931,18937,18943,18949,18996,114,114,59,1,8661,97,114,4,2,59,118,18656,18658,1,10984,59,1,10985,97,115,104,59,1,8872,4,2,110,114,18673,18679,103,114,116,59,1,10652,4,7,101,107,110,112,114,115,116,18695,18704,18711,18720,18742,18754,18810,112,115,105,108,111,110,59,1,1013,97,112,112,97,59,1,1008,111,116,104,105,110,103,59,1,8709,4,3,104,105,114,18728,18732,18735,105,59,1,981,59,1,982,111,112,116,111,59,1,8733,4,2,59,104,18748,18750,1,8597,111,59,1,1009,4,2,105,117,18760,18766,103,109,97,59,1,962,4,2,98,112,18772,18791,115,101,116,110,101,113,4,2,59,113,18784,18787,3,8842,65024,59,3,10955,65024,115,101,116,110,101,113,4,2,59,113,18803,18806,3,8843,65024,59,3,10956,65024,4,2,104,114,18816,18822,101,116,97,59,1,977,105,97,110,103,108,101,4,2,108,114,18834,18840,101,102,116,59,1,8882,105,103,104,116,59,1,8883,121,59,1,1074,97,115,104,59,1,8866,4,3,101,108,114,18865,18884,18890,4,3,59,98,101,18873,18875,18880,1,8744,97,114,59,1,8891,113,59,1,8794,108,105,112,59,1,8942,4,2,98,116,18896,18901,97,114,59,1,124,59,1,124,114,59,3,55349,56627,116,114,105,59,1,8882,115,117,4,2,98,112,18923,18927,59,3,8834,8402,59,3,8835,8402,112,102,59,3,55349,56679,114,111,112,59,1,8733,116,114,105,59,1,8883,4,2,99,117,18955,18960,114,59,3,55349,56523,4,2,98,112,18966,18981,110,4,2,69,101,18973,18977,59,3,10955,65024,59,3,8842,65024,110,4,2,69,101,18988,18992,59,3,10956,65024,59,3,8843,65024,105,103,122,97,103,59,1,10650,4,7,99,101,102,111,112,114,115,19020,19026,19061,19066,19072,19075,19089,105,114,99,59,1,373,4,2,100,105,19032,19055,4,2,98,103,19038,19043,97,114,59,1,10847,101,4,2,59,113,19050,19052,1,8743,59,1,8793,101,114,112,59,1,8472,114,59,3,55349,56628,112,102,59,3,55349,56680,59,1,8472,4,2,59,101,19081,19083,1,8768,97,116,104,59,1,8768,99,114,59,3,55349,56524,4,14,99,100,102,104,105,108,109,110,111,114,115,117,118,119,19125,19146,19152,19157,19173,19176,19192,19197,19202,19236,19252,19269,19286,19291,4,3,97,105,117,19133,19137,19142,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,116,114,105,59,1,9661,114,59,3,55349,56629,4,2,65,97,19163,19168,114,114,59,1,10234,114,114,59,1,10231,59,1,958,4,2,65,97,19182,19187,114,114,59,1,10232,114,114,59,1,10229,97,112,59,1,10236,105,115,59,1,8955,4,3,100,112,116,19210,19215,19230,111,116,59,1,10752,4,2,102,108,19221,19225,59,3,55349,56681,117,115,59,1,10753,105,109,101,59,1,10754,4,2,65,97,19242,19247,114,114,59,1,10233,114,114,59,1,10230,4,2,99,113,19258,19263,114,59,3,55349,56525,99,117,112,59,1,10758,4,2,112,116,19275,19281,108,117,115,59,1,10756,114,105,59,1,9651,101,101,59,1,8897,101,100,103,101,59,1,8896,4,8,97,99,101,102,105,111,115,117,19316,19335,19349,19357,19362,19367,19373,19379,99,4,2,117,121,19323,19332,116,101,5,253,1,59,19330,1,253,59,1,1103,4,2,105,121,19341,19346,114,99,59,1,375,59,1,1099,110,5,165,1,59,19355,1,165,114,59,3,55349,56630,99,121,59,1,1111,112,102,59,3,55349,56682,99,114,59,3,55349,56526,4,2,99,109,19385,19389,121,59,1,1102,108,5,255,1,59,19395,1,255,4,10,97,99,100,101,102,104,105,111,115,119,19419,19426,19441,19446,19462,19467,19472,19480,19486,19492,99,117,116,101,59,1,378,4,2,97,121,19432,19438,114,111,110,59,1,382,59,1,1079,111,116,59,1,380,4,2,101,116,19452,19458,116,114,102,59,1,8488,97,59,1,950,114,59,3,55349,56631,99,121,59,1,1078,103,114,97,114,114,59,1,8669,112,102,59,3,55349,56683,99,114,59,3,55349,56527,4,2,106,110,19498,19501,59,1,8205,106,59,1,8204])},function(e,t,n){"use strict";const r=n(302),i=r.TAG_NAMES,o=r.NAMESPACES;function a(e){switch(e.length){case 1:return e===i.P;case 2:return e===i.RB||e===i.RP||e===i.RT||e===i.DD||e===i.DT||e===i.LI;case 3:return e===i.RTC;case 6:return e===i.OPTION;case 8:return e===i.OPTGROUP}return!1}function s(e){switch(e.length){case 1:return e===i.P;case 2:return e===i.RB||e===i.RP||e===i.RT||e===i.DD||e===i.DT||e===i.LI||e===i.TD||e===i.TH||e===i.TR;case 3:return e===i.RTC;case 5:return e===i.TBODY||e===i.TFOOT||e===i.THEAD;case 6:return e===i.OPTION;case 7:return e===i.CAPTION;case 8:return e===i.OPTGROUP||e===i.COLGROUP}return!1}function l(e,t){switch(e.length){case 2:if(e===i.TD||e===i.TH)return t===o.HTML;if(e===i.MI||e===i.MO||e===i.MN||e===i.MS)return t===o.MATHML;break;case 4:if(e===i.HTML)return t===o.HTML;if(e===i.DESC)return t===o.SVG;break;case 5:if(e===i.TABLE)return t===o.HTML;if(e===i.MTEXT)return t===o.MATHML;if(e===i.TITLE)return t===o.SVG;break;case 6:return(e===i.APPLET||e===i.OBJECT)&&t===o.HTML;case 7:return(e===i.CAPTION||e===i.MARQUEE)&&t===o.HTML;case 8:return e===i.TEMPLATE&&t===o.HTML;case 13:return e===i.FOREIGN_OBJECT&&t===o.SVG;case 14:return e===i.ANNOTATION_XML&&t===o.MATHML}return!1}e.exports=class{constructor(e,t){this.stackTop=-1,this.items=[],this.current=e,this.currentTagName=null,this.currentTmplContent=null,this.tmplCount=0,this.treeAdapter=t}_indexOf(e){let t=-1;for(let n=this.stackTop;n>=0;n--)if(this.items[n]===e){t=n;break}return t}_isInTemplate(){return this.currentTagName===i.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===o.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagName=this.current&&this.treeAdapter.getTagName(this.current),this.currentTmplContent=this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):null}push(e){this.items[++this.stackTop]=e,this._updateCurrentElement(),this._isInTemplate()&&this.tmplCount++}pop(){this.stackTop--,this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this._updateCurrentElement()}replace(e,t){const n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&this._updateCurrentElement()}insertAfter(e,t){const n=this._indexOf(e)+1;this.items.splice(n,0,t),n===++this.stackTop&&this._updateCurrentElement()}popUntilTagNamePopped(e){for(;this.stackTop>-1;){const t=this.currentTagName,n=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),t===e&&n===o.HTML)break}}popUntilElementPopped(e){for(;this.stackTop>-1;){const t=this.current;if(this.pop(),t===e)break}}popUntilNumberedHeaderPopped(){for(;this.stackTop>-1;){const e=this.currentTagName,t=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===i.H1||e===i.H2||e===i.H3||e===i.H4||e===i.H5||e===i.H6&&t===o.HTML)break}}popUntilTableCellPopped(){for(;this.stackTop>-1;){const e=this.currentTagName,t=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===i.TD||e===i.TH&&t===o.HTML)break}}popAllUpToHtmlElement(){this.stackTop=0,this._updateCurrentElement()}clearBackToTableContext(){for(;this.currentTagName!==i.TABLE&&this.currentTagName!==i.TEMPLATE&&this.currentTagName!==i.HTML||this.treeAdapter.getNamespaceURI(this.current)!==o.HTML;)this.pop()}clearBackToTableBodyContext(){for(;this.currentTagName!==i.TBODY&&this.currentTagName!==i.TFOOT&&this.currentTagName!==i.THEAD&&this.currentTagName!==i.TEMPLATE&&this.currentTagName!==i.HTML||this.treeAdapter.getNamespaceURI(this.current)!==o.HTML;)this.pop()}clearBackToTableRowContext(){for(;this.currentTagName!==i.TR&&this.currentTagName!==i.TEMPLATE&&this.currentTagName!==i.HTML||this.treeAdapter.getNamespaceURI(this.current)!==o.HTML;)this.pop()}remove(e){for(let t=this.stackTop;t>=0;t--)if(this.items[t]===e){this.items.splice(t,1),this.stackTop--,this._updateCurrentElement();break}}tryPeekProperlyNestedBodyElement(){const e=this.items[1];return e&&this.treeAdapter.getTagName(e)===i.BODY?e:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e);return--t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return 0===this.stackTop&&this.currentTagName===i.HTML}hasInScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===o.HTML)return!0;if(l(n,r))return!1}return!0}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const t=this.treeAdapter.getTagName(this.items[e]),n=this.treeAdapter.getNamespaceURI(this.items[e]);if((t===i.H1||t===i.H2||t===i.H3||t===i.H4||t===i.H5||t===i.H6)&&n===o.HTML)return!0;if(l(t,n))return!1}return!0}hasInListItemScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===o.HTML)return!0;if((n===i.UL||n===i.OL)&&r===o.HTML||l(n,r))return!1}return!0}hasInButtonScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===o.HTML)return!0;if(n===i.BUTTON&&r===o.HTML||l(n,r))return!1}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===o.HTML){if(n===e)return!0;if(n===i.TABLE||n===i.TEMPLATE||n===i.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--){const t=this.treeAdapter.getTagName(this.items[e]);if(this.treeAdapter.getNamespaceURI(this.items[e])===o.HTML){if(t===i.TBODY||t===i.THEAD||t===i.TFOOT)return!0;if(t===i.TABLE||t===i.HTML)return!1}}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===o.HTML){if(n===e)return!0;if(n!==i.OPTION&&n!==i.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;a(this.currentTagName);)this.pop()}generateImpliedEndTagsThoroughly(){for(;s(this.currentTagName);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;a(this.currentTagName)&&this.currentTagName!==e;)this.pop()}}},function(e,t,n){"use strict";class r{constructor(e){this.length=0,this.entries=[],this.treeAdapter=e,this.bookmark=null}_getNoahArkConditionCandidates(e){const t=[];if(this.length>=3){const n=this.treeAdapter.getAttrList(e).length,i=this.treeAdapter.getTagName(e),o=this.treeAdapter.getNamespaceURI(e);for(let e=this.length-1;e>=0;e--){const a=this.entries[e];if(a.type===r.MARKER_ENTRY)break;const s=a.element,l=this.treeAdapter.getAttrList(s);this.treeAdapter.getTagName(s)===i&&this.treeAdapter.getNamespaceURI(s)===o&&l.length===n&&t.push({idx:e,attrs:l})}}return t.length<3?[]:t}_ensureNoahArkCondition(e){const t=this._getNoahArkConditionCandidates(e);let n=t.length;if(n){const r=this.treeAdapter.getAttrList(e),i=r.length,o=Object.create(null);for(let e=0;e<i;e++){const t=r[e];o[t.name]=t.value}for(let e=0;e<i;e++)for(let r=0;r<n;r++){const i=t[r].attrs[e];if(o[i.name]!==i.value&&(t.splice(r,1),n--),t.length<3)return}for(let e=n-1;e>=2;e--)this.entries.splice(t[e].idx,1),this.length--}}insertMarker(){this.entries.push({type:r.MARKER_ENTRY}),this.length++}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.push({type:r.ELEMENT_ENTRY,element:e,token:t}),this.length++}insertElementAfterBookmark(e,t){let n=this.length-1;for(;n>=0&&this.entries[n]!==this.bookmark;n--);this.entries.splice(n+1,0,{type:r.ELEMENT_ENTRY,element:e,token:t}),this.length++}removeEntry(e){for(let t=this.length-1;t>=0;t--)if(this.entries[t]===e){this.entries.splice(t,1),this.length--;break}}clearToLastMarker(){for(;this.length;){const e=this.entries.pop();if(this.length--,e.type===r.MARKER_ENTRY)break}}getElementEntryInScopeWithTagName(e){for(let t=this.length-1;t>=0;t--){const n=this.entries[t];if(n.type===r.MARKER_ENTRY)return null;if(this.treeAdapter.getTagName(n.element)===e)return n}return null}getElementEntry(e){for(let t=this.length-1;t>=0;t--){const n=this.entries[t];if(n.type===r.ELEMENT_ENTRY&&n.element===e)return n}return null}}r.MARKER_ENTRY="MARKER_ENTRY",r.ELEMENT_ENTRY="ELEMENT_ENTRY",e.exports=r},function(e,t,n){"use strict";const r=n(262),i=n(454),o=n(762),a=n(1353),s=n(302).TAG_NAMES;e.exports=class extends r{constructor(e){super(e),this.parser=e,this.treeAdapter=this.parser.treeAdapter,this.posTracker=null,this.lastStartTagToken=null,this.lastFosterParentingLocation=null,this.currentToken=null}_setStartLocation(e){let t=null;this.lastStartTagToken&&(t=Object.assign({},this.lastStartTagToken.location),t.startTag=this.lastStartTagToken.location),this.treeAdapter.setNodeSourceCodeLocation(e,t)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){const n=t.location,r=this.treeAdapter.getTagName(e),o={};t.type===i.END_TAG_TOKEN&&r===t.tagName?(o.endTag=Object.assign({},n),o.endLine=n.endLine,o.endCol=n.endCol,o.endOffset=n.endOffset):(o.endLine=n.startLine,o.endCol=n.startCol,o.endOffset=n.startOffset),this.treeAdapter.updateNodeSourceCodeLocation(e,o)}}_getOverriddenMethods(e,t){return{_bootstrap(n,i){t._bootstrap.call(this,n,i),e.lastStartTagToken=null,e.lastFosterParentingLocation=null,e.currentToken=null;const s=r.install(this.tokenizer,o);e.posTracker=s.posTracker,r.install(this.openElements,a,{onItemPop:function(t){e._setEndLocation(t,e.currentToken)}})},_runParsingLoop(n){t._runParsingLoop.call(this,n);for(let t=this.openElements.stackTop;t>=0;t--)e._setEndLocation(this.openElements.items[t],e.currentToken)},_processTokenInForeignContent(n){e.currentToken=n,t._processTokenInForeignContent.call(this,n)},_processToken(n){e.currentToken=n,t._processToken.call(this,n);if(n.type===i.END_TAG_TOKEN&&(n.tagName===s.HTML||n.tagName===s.BODY&&this.openElements.hasInScope(s.BODY)))for(let t=this.openElements.stackTop;t>=0;t--){const r=this.openElements.items[t];if(this.treeAdapter.getTagName(r)===n.tagName){e._setEndLocation(r,n);break}}},_setDocumentType(e){t._setDocumentType.call(this,e);const n=this.treeAdapter.getChildNodes(this.document),r=n.length;for(let t=0;t<r;t++){const r=n[t];if(this.treeAdapter.isDocumentTypeNode(r)){this.treeAdapter.setNodeSourceCodeLocation(r,e.location);break}}},_attachElementToTree(n){e._setStartLocation(n),e.lastStartTagToken=null,t._attachElementToTree.call(this,n)},_appendElement(n,r){e.lastStartTagToken=n,t._appendElement.call(this,n,r)},_insertElement(n,r){e.lastStartTagToken=n,t._insertElement.call(this,n,r)},_insertTemplate(n){e.lastStartTagToken=n,t._insertTemplate.call(this,n);const r=this.treeAdapter.getTemplateContent(this.openElements.current);this.treeAdapter.setNodeSourceCodeLocation(r,null)},_insertFakeRootElement(){t._insertFakeRootElement.call(this),this.treeAdapter.setNodeSourceCodeLocation(this.openElements.current,null)},_appendCommentNode(e,n){t._appendCommentNode.call(this,e,n);const r=this.treeAdapter.getChildNodes(n),i=r[r.length-1];this.treeAdapter.setNodeSourceCodeLocation(i,e.location)},_findFosterParentingLocation(){return e.lastFosterParentingLocation=t._findFosterParentingLocation.call(this),e.lastFosterParentingLocation},_insertCharacters(n){t._insertCharacters.call(this,n);const r=this._shouldFosterParentOnInsertion(),i=r&&e.lastFosterParentingLocation.parent||this.openElements.currentTmplContent||this.openElements.current,o=this.treeAdapter.getChildNodes(i),a=r&&e.lastFosterParentingLocation.beforeElement?o.indexOf(e.lastFosterParentingLocation.beforeElement)-1:o.length-1,s=o[a];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:e,endCol:t,endOffset:r}=n.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:e,endCol:t,endOffset:r})}else this.treeAdapter.setNodeSourceCodeLocation(s,n.location)}}}}},function(e,t,n){"use strict";const r=n(262);e.exports=class extends r{constructor(e,t){super(e),this.onItemPop=t.onItemPop}_getOverriddenMethods(e,t){return{pop(){e.onItemPop(this.current),t.pop.call(this)},popAllUpToHtmlElement(){for(let t=this.stackTop;t>0;t--)e.onItemPop(this.items[t]);t.popAllUpToHtmlElement.call(this)},remove(n){e.onItemPop(this.current),t.remove.call(this,n)}}}}},function(e,t,n){"use strict";const r=n(573),i=n(1355),o=n(762),a=n(262);e.exports=class extends r{constructor(e,t){super(e,t),this.opts=t,this.ctLoc=null,this.locBeforeToken=!1}_setErrorLocation(e){this.ctLoc&&(e.startLine=this.ctLoc.startLine,e.startCol=this.ctLoc.startCol,e.startOffset=this.ctLoc.startOffset,e.endLine=this.locBeforeToken?this.ctLoc.startLine:this.ctLoc.endLine,e.endCol=this.locBeforeToken?this.ctLoc.startCol:this.ctLoc.endCol,e.endOffset=this.locBeforeToken?this.ctLoc.startOffset:this.ctLoc.endOffset)}_getOverriddenMethods(e,t){return{_bootstrap(n,r){t._bootstrap.call(this,n,r),a.install(this.tokenizer,i,e.opts),a.install(this.tokenizer,o)},_processInputToken(n){e.ctLoc=n.location,t._processInputToken.call(this,n)},_err(t,n){e.locBeforeToken=n&&n.beforeToken,e._reportError(t)}}}}},function(e,t,n){"use strict";const r=n(573),i=n(1356),o=n(262);e.exports=class extends r{constructor(e,t){super(e,t);const n=o.install(e.preprocessor,i,t);this.posTracker=n.posTracker}}},function(e,t,n){"use strict";const r=n(573),i=n(763),o=n(262);e.exports=class extends r{constructor(e,t){super(e,t),this.posTracker=o.install(e,i),this.lastErrOffset=-1}_reportError(e){this.lastErrOffset!==this.posTracker.offset&&(this.lastErrOffset=this.posTracker.offset,super._reportError(e))}}},function(e,t,n){"use strict";const r=n(454),i=n(302),o=i.TAG_NAMES,a=i.NAMESPACES,s=i.ATTRS,l={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},c={attributename:"attributeName",attributetype:"attributeType",basefrequency:"baseFrequency",baseprofile:"baseProfile",calcmode:"calcMode",clippathunits:"clipPathUnits",diffuseconstant:"diffuseConstant",edgemode:"edgeMode",filterunits:"filterUnits",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",limitingconeangle:"limitingConeAngle",markerheight:"markerHeight",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textlength:"textLength",viewbox:"viewBox",viewtarget:"viewTarget",xchannelselector:"xChannelSelector",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"},u={"xlink:actuate":{prefix:"xlink",name:"actuate",namespace:a.XLINK},"xlink:arcrole":{prefix:"xlink",name:"arcrole",namespace:a.XLINK},"xlink:href":{prefix:"xlink",name:"href",namespace:a.XLINK},"xlink:role":{prefix:"xlink",name:"role",namespace:a.XLINK},"xlink:show":{prefix:"xlink",name:"show",namespace:a.XLINK},"xlink:title":{prefix:"xlink",name:"title",namespace:a.XLINK},"xlink:type":{prefix:"xlink",name:"type",namespace:a.XLINK},"xml:base":{prefix:"xml",name:"base",namespace:a.XML},"xml:lang":{prefix:"xml",name:"lang",namespace:a.XML},"xml:space":{prefix:"xml",name:"space",namespace:a.XML},xmlns:{prefix:"",name:"xmlns",namespace:a.XMLNS},"xmlns:xlink":{prefix:"xmlns",name:"xlink",namespace:a.XMLNS}},d=t.SVG_TAG_NAMES_ADJUSTMENT_MAP={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient",textpath:"textPath"},h={[o.B]:!0,[o.BIG]:!0,[o.BLOCKQUOTE]:!0,[o.BODY]:!0,[o.BR]:!0,[o.CENTER]:!0,[o.CODE]:!0,[o.DD]:!0,[o.DIV]:!0,[o.DL]:!0,[o.DT]:!0,[o.EM]:!0,[o.EMBED]:!0,[o.H1]:!0,[o.H2]:!0,[o.H3]:!0,[o.H4]:!0,[o.H5]:!0,[o.H6]:!0,[o.HEAD]:!0,[o.HR]:!0,[o.I]:!0,[o.IMG]:!0,[o.LI]:!0,[o.LISTING]:!0,[o.MENU]:!0,[o.META]:!0,[o.NOBR]:!0,[o.OL]:!0,[o.P]:!0,[o.PRE]:!0,[o.RUBY]:!0,[o.S]:!0,[o.SMALL]:!0,[o.SPAN]:!0,[o.STRONG]:!0,[o.STRIKE]:!0,[o.SUB]:!0,[o.SUP]:!0,[o.TABLE]:!0,[o.TT]:!0,[o.U]:!0,[o.UL]:!0,[o.VAR]:!0};t.causesExit=function(e){const t=e.tagName;return!!(t===o.FONT&&(null!==r.getTokenAttr(e,s.COLOR)||null!==r.getTokenAttr(e,s.SIZE)||null!==r.getTokenAttr(e,s.FACE)))||h[t]},t.adjustTokenMathMLAttrs=function(e){for(let t=0;t<e.attrs.length;t++)if("definitionurl"===e.attrs[t].name){e.attrs[t].name="definitionURL";break}},t.adjustTokenSVGAttrs=function(e){for(let t=0;t<e.attrs.length;t++){const n=c[e.attrs[t].name];n&&(e.attrs[t].name=n)}},t.adjustTokenXMLAttrs=function(e){for(let t=0;t<e.attrs.length;t++){const n=u[e.attrs[t].name];n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}},t.adjustTokenSVGTagName=function(e){const t=d[e.tagName];t&&(e.tagName=t)},t.isIntegrationPoint=function(e,t,n,r){return!(r&&r!==a.HTML||!function(e,t,n){if(t===a.MATHML&&e===o.ANNOTATION_XML)for(let e=0;e<n.length;e++)if(n[e].name===s.ENCODING){const t=n[e].value.toLowerCase();return t===l.TEXT_HTML||t===l.APPLICATION_XML}return t===a.SVG&&(e===o.FOREIGN_OBJECT||e===o.DESC||e===o.TITLE)}(e,t,n))||!(r&&r!==a.MATHML||!function(e,t){return t===a.MATHML&&(e===o.MI||e===o.MO||e===o.MN||e===o.MS||e===o.MTEXT)}(e,t))}},function(e,t,n){"use strict";const r=n(764),i=n(765),o=n(766),a=n(302),s=a.TAG_NAMES,l=a.NAMESPACES,c={treeAdapter:r},u=/&/g,d=/\u00a0/g,h=/"/g,p=/</g,m=/>/g;class g{constructor(e,t){this.options=i(c,t),this.treeAdapter=this.options.treeAdapter,this.html="",this.startNode=e}serialize(){return this._serializeChildNodes(this.startNode),this.html}_serializeChildNodes(e){const t=this.treeAdapter.getChildNodes(e);if(t)for(let e=0,n=t.length;e<n;e++){const n=t[e];this.treeAdapter.isElementNode(n)?this._serializeElement(n):this.treeAdapter.isTextNode(n)?this._serializeTextNode(n):this.treeAdapter.isCommentNode(n)?this._serializeCommentNode(n):this.treeAdapter.isDocumentTypeNode(n)&&this._serializeDocumentTypeNode(n)}}_serializeElement(e){const t=this.treeAdapter.getTagName(e),n=this.treeAdapter.getNamespaceURI(e);if(this.html+="<"+t,this._serializeAttributes(e),this.html+=">",t!==s.AREA&&t!==s.BASE&&t!==s.BASEFONT&&t!==s.BGSOUND&&t!==s.BR&&t!==s.COL&&t!==s.EMBED&&t!==s.FRAME&&t!==s.HR&&t!==s.IMG&&t!==s.INPUT&&t!==s.KEYGEN&&t!==s.LINK&&t!==s.META&&t!==s.PARAM&&t!==s.SOURCE&&t!==s.TRACK&&t!==s.WBR){const r=t===s.TEMPLATE&&n===l.HTML?this.treeAdapter.getTemplateContent(e):e;this._serializeChildNodes(r),this.html+="</"+t+">"}}_serializeAttributes(e){const t=this.treeAdapter.getAttrList(e);for(let e=0,n=t.length;e<n;e++){const n=t[e],r=g.escapeString(n.value,!0);this.html+=" ",n.namespace?n.namespace===l.XML?this.html+="xml:"+n.name:n.namespace===l.XMLNS?("xmlns"!==n.name&&(this.html+="xmlns:"),this.html+=n.name):n.namespace===l.XLINK?this.html+="xlink:"+n.name:this.html+=n.prefix+":"+n.name:this.html+=n.name,this.html+='="'+r+'"'}}_serializeTextNode(e){const t=this.treeAdapter.getTextNodeContent(e),n=this.treeAdapter.getParentNode(e);let r;n&&this.treeAdapter.isElementNode(n)&&(r=this.treeAdapter.getTagName(n)),r===s.STYLE||r===s.SCRIPT||r===s.XMP||r===s.IFRAME||r===s.NOEMBED||r===s.NOFRAMES||r===s.PLAINTEXT||r===s.NOSCRIPT?this.html+=t:this.html+=g.escapeString(t,!1)}_serializeCommentNode(e){this.html+="\x3c!--"+this.treeAdapter.getCommentNodeContent(e)+"--\x3e"}_serializeDocumentTypeNode(e){const t=this.treeAdapter.getDocumentTypeNodeName(e);this.html+="<"+o.serializeContent(t,null,null)+">"}}g.escapeString=function(e,t){return e=e.replace(u,"&").replace(d," "),e=t?e.replace(h,"""):e.replace(p,"<").replace(m,">")},e.exports=g},function(e,t,n){"use strict";const{Deflate:r,deflate:i,deflateRaw:o,gzip:a}=n(1360),{Inflate:s,inflate:l,inflateRaw:c,ungzip:u}=n(1363),d=n(303);e.exports.Deflate=r,e.exports.deflate=i,e.exports.deflateRaw=o,e.exports.gzip=a,e.exports.Inflate=s,e.exports.inflate=l,e.exports.inflateRaw=c,e.exports.ungzip=u,e.exports.constants=d},function(e,t,n){"use strict";const r=n(1361),i=n(769),o=n(770),a=n(574),s=n(771),l=Object.prototype.toString,{Z_NO_FLUSH:c,Z_SYNC_FLUSH:u,Z_FULL_FLUSH:d,Z_FINISH:h,Z_OK:p,Z_STREAM_END:m,Z_DEFAULT_COMPRESSION:g,Z_DEFAULT_STRATEGY:f,Z_DEFLATED:_}=n(303);function b(e){this.options=i.assign({level:g,method:_,chunkSize:16384,windowBits:15,memLevel:8,strategy:f},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;let n=r.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==p)throw new Error(a[n]);if(t.header&&r.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,n=r.deflateSetDictionary(this.strm,e),n!==p)throw new Error(a[n]);this._dict_set=!0}}function v(e,t){const n=new b(t);if(n.push(e,!0),n.err)throw n.msg||a[n.err];return n.result}b.prototype.push=function(e,t){const n=this.strm,i=this.options.chunkSize;let a,s;if(this.ended)return!1;for(s=t===~~t?t:!0===t?h:c,"string"==typeof e?n.input=o.string2buf(e):"[object ArrayBuffer]"===l.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;)if(0===n.avail_out&&(n.output=new Uint8Array(i),n.next_out=0,n.avail_out=i),(s===u||s===d)&&n.avail_out<=6)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else{if(a=r.deflate(n,s),a===m)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),a=r.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===p;if(0!==n.avail_out){if(s>0&&n.next_out>0)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else if(0===n.avail_in)break}else this.onData(n.output)}return!0},b.prototype.onData=function(e){this.chunks.push(e)},b.prototype.onEnd=function(e){e===p&&(this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},e.exports.Deflate=b,e.exports.deflate=v,e.exports.deflateRaw=function(e,t){return(t=t||{}).raw=!0,v(e,t)},e.exports.gzip=function(e,t){return(t=t||{}).gzip=!0,v(e,t)},e.exports.constants=n(303)},function(e,t,n){"use strict";const{_tr_init:r,_tr_stored_block:i,_tr_flush_block:o,_tr_tally:a,_tr_align:s}=n(1362),l=n(767),c=n(768),u=n(574),{Z_NO_FLUSH:d,Z_PARTIAL_FLUSH:h,Z_FULL_FLUSH:p,Z_FINISH:m,Z_BLOCK:g,Z_OK:f,Z_STREAM_END:_,Z_STREAM_ERROR:b,Z_DATA_ERROR:v,Z_BUF_ERROR:y,Z_DEFAULT_COMPRESSION:E,Z_FILTERED:S,Z_HUFFMAN_ONLY:w,Z_RLE:T,Z_FIXED:C,Z_DEFAULT_STRATEGY:x,Z_UNKNOWN:F,Z_DEFLATED:D}=n(303),k=286,O=30,I=19,A=2*k+1,R=15,N=258,M=262,P=42,L=113,B=666,U=(e,t)=>(e.msg=u[t],t),j=e=>2*e-(e>4?9:0),G=e=>{let t=e.length;for(;--t>=0;)e[t]=0},z=e=>{let t,n,r,i=e.w_size;t=e.hash_size,r=t;do{n=e.head[--r],e.head[r]=n>=i?n-i:0}while(--t);t=i,r=t;do{n=e.prev[--r],e.prev[r]=n>=i?n-i:0}while(--t)};let H=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask;const q=e=>{const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))},V=(e,t)=>{o(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,q(e.strm)},$=(e,t)=>{e.pending_buf[e.pending++]=t},K=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},W=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),0===i?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),1===e.state.wrap?e.adler=l(e.adler,t,i,n):2===e.state.wrap&&(e.adler=c(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},Y=(e,t)=>{let n,r,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match;const l=e.strstart>e.w_size-M?e.strstart-(e.w_size-M):0,c=e.window,u=e.w_mask,d=e.prev,h=e.strstart+N;let p=c[o+a-1],m=c[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(n=t,c[n+a]===m&&c[n+a-1]===p&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&o<h);if(r=N-(h-o),o=h-N,r>a){if(e.match_start=t,a=r,r>=s)break;p=c[o+a-1],m=c[o+a]}}}while((t=d[t&u])>l&&0!=--i);return a<=e.lookahead?a:e.lookahead},Q=e=>{const t=e.w_size;let n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-M)&&(e.window.set(e.window.subarray(t,t+t-r),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),z(e),r+=t),0===e.strm.avail_in)break;if(n=W(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=3)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=H(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=H(e,e.ins_h,e.window[i+3-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<M&&0!==e.strm.avail_in)},X=(e,t)=>{let n,r,o,a=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,s=0,l=e.strm.avail_in;do{if(n=65535,o=e.bi_valid+42>>3,e.strm.avail_out<o)break;if(o=e.strm.avail_out-o,r=e.strstart-e.block_start,n>r+e.strm.avail_in&&(n=r+e.strm.avail_in),n>o&&(n=o),n<a&&(0===n&&t!==m||t===d||n!==r+e.strm.avail_in))break;s=t===m&&n===r+e.strm.avail_in?1:0,i(e,0,0,s),e.pending_buf[e.pending-4]=n,e.pending_buf[e.pending-3]=n>>8,e.pending_buf[e.pending-2]=~n,e.pending_buf[e.pending-1]=~n>>8,q(e.strm),r&&(r>n&&(r=n),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+r),e.strm.next_out),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r,e.block_start+=r,n-=r),n&&(W(e.strm,e.strm.output,e.strm.next_out,n),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n)}while(0===s);return l-=e.strm.avail_in,l&&(l>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=l&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-l,e.strm.next_in),e.strstart),e.strstart+=l,e.insert+=l>e.w_size-e.insert?e.w_size-e.insert:l),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),s?4:t!==d&&t!==m&&0===e.strm.avail_in&&e.strstart===e.block_start?2:(o=e.window_size-e.strstart,e.strm.avail_in>o&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,o+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),o>e.strm.avail_in&&(o=e.strm.avail_in),o&&(W(e.strm,e.window,e.strstart,o),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.high_water<e.strstart&&(e.high_water=e.strstart),o=e.bi_valid+42>>3,o=e.pending_buf_size-o>65535?65535:e.pending_buf_size-o,a=o>e.w_size?e.w_size:o,r=e.strstart-e.block_start,(r>=a||(r||t===m)&&t!==d&&0===e.strm.avail_in&&r<=o)&&(n=r>o?o:r,s=t===m&&0===e.strm.avail_in&&n===r?1:0,i(e,e.block_start,n,s),e.block_start+=n,q(e.strm)),s?3:1)},Z=(e,t)=>{let n,r;for(;;){if(e.lookahead<M){if(Q(e),e.lookahead<M&&t===d)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=H(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-M&&(e.match_length=Y(e,n)),e.match_length>=3)if(r=a(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=H(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=H(e,e.ins_h,e.window[e.strstart+1]);else r=a(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(V(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===m?(V(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(V(e,!1),0===e.strm.avail_out)?1:2},J=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<M){if(Q(e),e.lookahead<M&&t===d)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=H(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-M&&(e.match_length=Y(e,n),e.match_length<=5&&(e.strategy===S||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,r=a(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=H(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(V(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(r=a(e,0,e.window[e.strstart-1]),r&&V(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=a(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===m?(V(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(V(e,!1),0===e.strm.avail_out)?1:2};function ee(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}const te=[new ee(0,0,0,0,X),new ee(4,4,8,4,Z),new ee(4,5,16,8,Z),new ee(4,6,32,32,Z),new ee(4,4,16,16,J),new ee(8,16,32,32,J),new ee(8,16,128,128,J),new ee(8,32,128,256,J),new ee(32,128,258,1024,J),new ee(32,258,258,4096,J)];function ne(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=D,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(2*A),this.dyn_dtree=new Uint16Array(2*(2*O+1)),this.bl_tree=new Uint16Array(2*(2*I+1)),G(this.dyn_ltree),G(this.dyn_dtree),G(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(R+1),this.heap=new Uint16Array(2*k+1),G(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*k+1),G(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const re=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==P&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&t.status!==L&&t.status!==B?1:0},ie=e=>{if(re(e))return U(e,b);e.total_in=e.total_out=0,e.data_type=F;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?P:L,e.adler=2===t.wrap?0:1,t.last_flush=-2,r(t),f},oe=e=>{const t=ie(e);var n;return t===f&&((n=e.state).window_size=2*n.w_size,G(n.head),n.max_lazy_match=te[n.level].max_lazy,n.good_match=te[n.level].good_length,n.nice_match=te[n.level].nice_length,n.max_chain_length=te[n.level].max_chain,n.strstart=0,n.block_start=0,n.lookahead=0,n.insert=0,n.match_length=n.prev_length=2,n.match_available=0,n.ins_h=0),t},ae=(e,t,n,r,i,o)=>{if(!e)return b;let a=1;if(t===E&&(t=6),r<0?(a=0,r=-r):r>15&&(a=2,r-=16),i<1||i>9||n!==D||r<8||r>15||t<0||t>9||o<0||o>C||8===r&&1!==a)return U(e,b);8===r&&(r=9);const s=new ne;return e.state=s,s.strm=e,s.status=P,s.wrap=a,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new Uint8Array(2*s.w_size),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new Uint8Array(s.pending_buf_size),s.sym_buf=s.lit_bufsize,s.sym_end=3*(s.lit_bufsize-1),s.level=t,s.strategy=o,s.method=n,oe(e)};e.exports.deflateInit=(e,t)=>ae(e,t,D,15,8,x),e.exports.deflateInit2=ae,e.exports.deflateReset=oe,e.exports.deflateResetKeep=ie,e.exports.deflateSetHeader=(e,t)=>re(e)||2!==e.state.wrap?b:(e.state.gzhead=t,f),e.exports.deflate=(e,t)=>{if(re(e)||t>g||t<0)return e?U(e,b):b;const n=e.state;if(!e.output||0!==e.avail_in&&!e.input||n.status===B&&t!==m)return U(e,0===e.avail_out?y:b);const r=n.last_flush;if(n.last_flush=t,0!==n.pending){if(q(e),0===e.avail_out)return n.last_flush=-1,f}else if(0===e.avail_in&&j(t)<=j(r)&&t!==m)return U(e,y);if(n.status===B&&0!==e.avail_in)return U(e,y);if(n.status===P&&0===n.wrap&&(n.status=L),n.status===P){let t=D+(n.w_bits-8<<4)<<8,r=-1;if(r=n.strategy>=w||n.level<2?0:n.level<6?1:6===n.level?2:3,t|=r<<6,0!==n.strstart&&(t|=32),t+=31-t%31,K(n,t),0!==n.strstart&&(K(n,e.adler>>>16),K(n,65535&e.adler)),e.adler=1,n.status=L,q(e),0!==n.pending)return n.last_flush=-1,f}if(57===n.status)if(e.adler=0,$(n,31),$(n,139),$(n,8),n.gzhead)$(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),$(n,255&n.gzhead.time),$(n,n.gzhead.time>>8&255),$(n,n.gzhead.time>>16&255),$(n,n.gzhead.time>>24&255),$(n,9===n.level?2:n.strategy>=w||n.level<2?4:0),$(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&($(n,255&n.gzhead.extra.length),$(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=c(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69;else if($(n,0),$(n,0),$(n,0),$(n,0),$(n,0),$(n,9===n.level?2:n.strategy>=w||n.level<2?4:0),$(n,3),n.status=L,q(e),0!==n.pending)return n.last_flush=-1,f;if(69===n.status){if(n.gzhead.extra){let t=n.pending,r=(65535&n.gzhead.extra.length)-n.gzindex;for(;n.pending+r>n.pending_buf_size;){let i=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+i),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>t&&(e.adler=c(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex+=i,q(e),0!==n.pending)return n.last_flush=-1,f;t=0,r-=i}let i=new Uint8Array(n.gzhead.extra);n.pending_buf.set(i.subarray(n.gzindex,n.gzindex+r),n.pending),n.pending+=r,n.gzhead.hcrc&&n.pending>t&&(e.adler=c(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex=0}n.status=73}if(73===n.status){if(n.gzhead.name){let t,r=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>r&&(e.adler=c(e.adler,n.pending_buf,n.pending-r,r)),q(e),0!==n.pending)return n.last_flush=-1,f;r=0}t=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,$(n,t)}while(0!==t);n.gzhead.hcrc&&n.pending>r&&(e.adler=c(e.adler,n.pending_buf,n.pending-r,r)),n.gzindex=0}n.status=91}if(91===n.status){if(n.gzhead.comment){let t,r=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>r&&(e.adler=c(e.adler,n.pending_buf,n.pending-r,r)),q(e),0!==n.pending)return n.last_flush=-1,f;r=0}t=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,$(n,t)}while(0!==t);n.gzhead.hcrc&&n.pending>r&&(e.adler=c(e.adler,n.pending_buf,n.pending-r,r))}n.status=103}if(103===n.status){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(q(e),0!==n.pending))return n.last_flush=-1,f;$(n,255&e.adler),$(n,e.adler>>8&255),e.adler=0}if(n.status=L,q(e),0!==n.pending)return n.last_flush=-1,f}if(0!==e.avail_in||0!==n.lookahead||t!==d&&n.status!==B){let r=0===n.level?X(n,t):n.strategy===w?((e,t)=>{let n;for(;;){if(0===e.lookahead&&(Q(e),0===e.lookahead)){if(t===d)return 1;break}if(e.match_length=0,n=a(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(V(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===m?(V(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(V(e,!1),0===e.strm.avail_out)?1:2})(n,t):n.strategy===T?((e,t)=>{let n,r,i,o;const s=e.window;for(;;){if(e.lookahead<=N){if(Q(e),e.lookahead<=N&&t===d)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(i=e.strstart-1,r=s[i],r===s[++i]&&r===s[++i]&&r===s[++i])){o=e.strstart+N;do{}while(r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&i<o);e.match_length=N-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=a(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=a(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(V(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===m?(V(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(V(e,!1),0===e.strm.avail_out)?1:2})(n,t):te[n.level].func(n,t);if(3!==r&&4!==r||(n.status=B),1===r||3===r)return 0===e.avail_out&&(n.last_flush=-1),f;if(2===r&&(t===h?s(n):t!==g&&(i(n,0,0,!1),t===p&&(G(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),q(e),0===e.avail_out))return n.last_flush=-1,f}return t!==m?f:n.wrap<=0?_:(2===n.wrap?($(n,255&e.adler),$(n,e.adler>>8&255),$(n,e.adler>>16&255),$(n,e.adler>>24&255),$(n,255&e.total_in),$(n,e.total_in>>8&255),$(n,e.total_in>>16&255),$(n,e.total_in>>24&255)):(K(n,e.adler>>>16),K(n,65535&e.adler)),q(e),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?f:_)},e.exports.deflateEnd=e=>{if(re(e))return b;const t=e.state.status;return e.state=null,t===L?U(e,v):f},e.exports.deflateSetDictionary=(e,t)=>{let n=t.length;if(re(e))return b;const r=e.state,i=r.wrap;if(2===i||1===i&&r.status!==P||r.lookahead)return b;if(1===i&&(e.adler=l(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){0===i&&(G(r.head),r.strstart=0,r.block_start=0,r.insert=0);let e=new Uint8Array(r.w_size);e.set(t.subarray(n-r.w_size,n),0),t=e,n=r.w_size}const o=e.avail_in,a=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,Q(r);r.lookahead>=3;){let e=r.strstart,t=r.lookahead-2;do{r.ins_h=H(r,r.ins_h,r.window[e+3-1]),r.prev[e&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=e,e++}while(--t);r.strstart=e,r.lookahead=2,Q(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=a,e.input=s,e.avail_in=o,r.wrap=i,f},e.exports.deflateInfo="pako deflate (from Nodeca project)"},function(e,t,n){"use strict";function r(e){let t=e.length;for(;--t>=0;)e[t]=0}const i=256,o=286,a=30,s=15,l=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),c=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),u=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),d=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),h=new Array(576);r(h);const p=new Array(60);r(p);const m=new Array(512);r(m);const g=new Array(256);r(g);const f=new Array(29);r(f);const _=new Array(a);function b(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}let v,y,E;function S(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}r(_);const w=e=>e<256?m[e]:m[256+(e>>>7)],T=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},C=(e,t,n)=>{e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,T(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},x=(e,t,n)=>{C(e,n[2*t],n[2*t+1])},F=(e,t)=>{let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1},D=(e,t,n)=>{const r=new Array(16);let i,o,a=0;for(i=1;i<=s;i++)a=a+n[i-1]<<1,r[i]=a;for(o=0;o<=t;o++){let t=e[2*o+1];0!==t&&(e[2*o]=F(r[t]++,t))}},k=e=>{let t;for(t=0;t<o;t++)e.dyn_ltree[2*t]=0;for(t=0;t<a;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},O=e=>{e.bi_valid>8?T(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},I=(e,t,n,r)=>{const i=2*t,o=2*n;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]},A=(e,t,n)=>{const r=e.heap[n];let i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&I(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!I(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},R=(e,t,n)=>{let r,o,a,s,u=0;if(0!==e.sym_next)do{r=255&e.pending_buf[e.sym_buf+u++],r+=(255&e.pending_buf[e.sym_buf+u++])<<8,o=e.pending_buf[e.sym_buf+u++],0===r?x(e,o,t):(a=g[o],x(e,a+i+1,t),s=l[a],0!==s&&(o-=f[a],C(e,o,s)),r--,a=w(r),x(e,a,n),s=c[a],0!==s&&(r-=_[a],C(e,r,s)))}while(u<e.sym_next);x(e,256,t)},N=(e,t)=>{const n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems;let a,l,c,u=-1;for(e.heap_len=0,e.heap_max=573,a=0;a<o;a++)0!==n[2*a]?(e.heap[++e.heap_len]=u=a,e.depth[a]=0):n[2*a+1]=0;for(;e.heap_len<2;)c=e.heap[++e.heap_len]=u<2?++u:0,n[2*c]=1,e.depth[c]=0,e.opt_len--,i&&(e.static_len-=r[2*c+1]);for(t.max_code=u,a=e.heap_len>>1;a>=1;a--)A(e,n,a);c=o;do{a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],A(e,n,1),l=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=l,n[2*c]=n[2*a]+n[2*l],e.depth[c]=(e.depth[a]>=e.depth[l]?e.depth[a]:e.depth[l])+1,n[2*a+1]=n[2*l+1]=c,e.heap[1]=c++,A(e,n,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,l=t.stat_desc.extra_base,c=t.stat_desc.max_length;let u,d,h,p,m,g,f=0;for(p=0;p<=s;p++)e.bl_count[p]=0;for(n[2*e.heap[e.heap_max]+1]=0,u=e.heap_max+1;u<573;u++)d=e.heap[u],p=n[2*n[2*d+1]+1]+1,p>c&&(p=c,f++),n[2*d+1]=p,d>r||(e.bl_count[p]++,m=0,d>=l&&(m=a[d-l]),g=n[2*d],e.opt_len+=g*(p+m),o&&(e.static_len+=g*(i[2*d+1]+m)));if(0!==f){do{for(p=c-1;0===e.bl_count[p];)p--;e.bl_count[p]--,e.bl_count[p+1]+=2,e.bl_count[c]--,f-=2}while(f>0);for(p=c;0!==p;p--)for(d=e.bl_count[p];0!==d;)h=e.heap[--u],h>r||(n[2*h+1]!==p&&(e.opt_len+=(p-n[2*h+1])*n[2*h],n[2*h+1]=p),d--)}})(e,t),D(n,u,e.bl_count)},M=(e,t,n)=>{let r,i,o=-1,a=t[1],s=0,l=7,c=4;for(0===a&&(l=138,c=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=a,a=t[2*(r+1)+1],++s<l&&i===a||(s<c?e.bl_tree[2*i]+=s:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,o=i,0===a?(l=138,c=3):i===a?(l=6,c=3):(l=7,c=4))},P=(e,t,n)=>{let r,i,o=-1,a=t[1],s=0,l=7,c=4;for(0===a&&(l=138,c=3),r=0;r<=n;r++)if(i=a,a=t[2*(r+1)+1],!(++s<l&&i===a)){if(s<c)do{x(e,i,e.bl_tree)}while(0!=--s);else 0!==i?(i!==o&&(x(e,i,e.bl_tree),s--),x(e,16,e.bl_tree),C(e,s-3,2)):s<=10?(x(e,17,e.bl_tree),C(e,s-3,3)):(x(e,18,e.bl_tree),C(e,s-11,7));s=0,o=i,0===a?(l=138,c=3):i===a?(l=6,c=3):(l=7,c=4)}};let L=!1;const B=(e,t,n,r)=>{C(e,0+(r?1:0),3),O(e),T(e,n),T(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n};e.exports._tr_init=e=>{L||((()=>{let e,t,n,r,i;const d=new Array(16);for(n=0,r=0;r<28;r++)for(f[r]=n,e=0;e<1<<l[r];e++)g[n++]=r;for(g[n-1]=r,i=0,r=0;r<16;r++)for(_[r]=i,e=0;e<1<<c[r];e++)m[i++]=r;for(i>>=7;r<a;r++)for(_[r]=i<<7,e=0;e<1<<c[r]-7;e++)m[256+i++]=r;for(t=0;t<=s;t++)d[t]=0;for(e=0;e<=143;)h[2*e+1]=8,e++,d[8]++;for(;e<=255;)h[2*e+1]=9,e++,d[9]++;for(;e<=279;)h[2*e+1]=7,e++,d[7]++;for(;e<=287;)h[2*e+1]=8,e++,d[8]++;for(D(h,287,d),e=0;e<a;e++)p[2*e+1]=5,p[2*e]=F(e,5);v=new b(h,l,257,o,s),y=new b(p,c,0,a,s),E=new b(new Array(0),u,0,19,7)})(),L=!0),e.l_desc=new S(e.dyn_ltree,v),e.d_desc=new S(e.dyn_dtree,y),e.bl_desc=new S(e.bl_tree,E),e.bi_buf=0,e.bi_valid=0,k(e)},e.exports._tr_stored_block=B,e.exports._tr_flush_block=(e,t,n,r)=>{let o,a,s=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<i;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),N(e,e.l_desc),N(e,e.d_desc),s=(e=>{let t;for(M(e,e.dyn_ltree,e.l_desc.max_code),M(e,e.dyn_dtree,e.d_desc.max_code),N(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*d[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),o=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=o&&(o=a)):o=a=n+5,n+4<=o&&-1!==t?B(e,t,n,r):4===e.strategy||a===o?(C(e,2+(r?1:0),3),R(e,h,p)):(C(e,4+(r?1:0),3),((e,t,n,r)=>{let i;for(C(e,t-257,5),C(e,n-1,5),C(e,r-4,4),i=0;i<r;i++)C(e,e.bl_tree[2*d[i]+1],3);P(e,e.dyn_ltree,t-1),P(e,e.dyn_dtree,n-1)})(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),R(e,e.dyn_ltree,e.dyn_dtree)),k(e),r&&O(e)},e.exports._tr_tally=(e,t,n)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(g[n]+i+1)]++,e.dyn_dtree[2*w(t)]++),e.sym_next===e.sym_end),e.exports._tr_align=e=>{C(e,2,3),x(e,256,h),(e=>{16===e.bi_valid?(T(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}},function(e,t,n){"use strict";const r=n(1364),i=n(769),o=n(770),a=n(574),s=n(771),l=n(1367),c=Object.prototype.toString,{Z_NO_FLUSH:u,Z_FINISH:d,Z_OK:h,Z_STREAM_END:p,Z_NEED_DICT:m,Z_STREAM_ERROR:g,Z_DATA_ERROR:f,Z_MEM_ERROR:_}=n(303);function b(e){this.options=i.assign({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;let n=r.inflateInit2(this.strm,t.windowBits);if(n!==h)throw new Error(a[n]);if(this.header=new l,r.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=o.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=r.inflateSetDictionary(this.strm,t.dictionary),n!==h)))throw new Error(a[n])}function v(e,t){const n=new b(t);if(n.push(e),n.err)throw n.msg||a[n.err];return n.result}b.prototype.push=function(e,t){const n=this.strm,i=this.options.chunkSize,a=this.options.dictionary;let s,l,b;if(this.ended)return!1;for(l=t===~~t?t:!0===t?d:u,"[object ArrayBuffer]"===c.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(0===n.avail_out&&(n.output=new Uint8Array(i),n.next_out=0,n.avail_out=i),s=r.inflate(n,l),s===m&&a&&(s=r.inflateSetDictionary(n,a),s===h?s=r.inflate(n,l):s===f&&(s=m));n.avail_in>0&&s===p&&n.state.wrap>0&&0!==e[n.next_in];)r.inflateReset(n),s=r.inflate(n,l);switch(s){case g:case f:case m:case _:return this.onEnd(s),this.ended=!0,!1}if(b=n.avail_out,n.next_out&&(0===n.avail_out||s===p))if("string"===this.options.to){let e=o.utf8border(n.output,n.next_out),t=n.next_out-e,r=o.buf2string(n.output,e);n.next_out=t,n.avail_out=i-t,t&&n.output.set(n.output.subarray(e,e+t),0),this.onData(r)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(s!==h||0!==b){if(s===p)return s=r.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===n.avail_in)break}}return!0},b.prototype.onData=function(e){this.chunks.push(e)},b.prototype.onEnd=function(e){e===h&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},e.exports.Inflate=b,e.exports.inflate=v,e.exports.inflateRaw=function(e,t){return(t=t||{}).raw=!0,v(e,t)},e.exports.ungzip=v,e.exports.constants=n(303)},function(e,t,n){"use strict";const r=n(767),i=n(768),o=n(1365),a=n(1366),{Z_FINISH:s,Z_BLOCK:l,Z_TREES:c,Z_OK:u,Z_STREAM_END:d,Z_NEED_DICT:h,Z_STREAM_ERROR:p,Z_DATA_ERROR:m,Z_MEM_ERROR:g,Z_BUF_ERROR:f,Z_DEFLATED:_}=n(303),b=16180,v=16190,y=16191,E=16192,S=16194,w=16199,T=16200,C=16206,x=16209,F=16210,D=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function k(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const O=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<b||t.mode>16211?1:0},I=e=>{if(O(e))return p;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=b,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,u},A=e=>{if(O(e))return p;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,I(e)},R=(e,t)=>{let n;if(O(e))return p;const r=e.state;return t<0?(n=0,t=-t):(n=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?p:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,A(e))},N=(e,t)=>{if(!e)return p;const n=new k;e.state=n,n.strm=e,n.window=null,n.mode=b;const r=R(e,t);return r!==u&&(e.state=null),r};let M,P,L=!0;const B=e=>{if(L){M=new Int32Array(512),P=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(1,e.lens,0,288,M,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(2,e.lens,0,32,P,0,e.work,{bits:5}),L=!1}e.lencode=M,e.lenbits=9,e.distcode=P,e.distbits=5},U=(e,t,n,r)=>{let i;const o=e.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Uint8Array(o.wsize)),r>=o.wsize?(o.window.set(t.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>r&&(i=r),o.window.set(t.subarray(n-r,n-r+i),o.wnext),(r-=i)?(o.window.set(t.subarray(n-r,n),0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0};e.exports.inflateReset=A,e.exports.inflateReset2=R,e.exports.inflateResetKeep=I,e.exports.inflateInit=e=>N(e,15),e.exports.inflateInit2=N,e.exports.inflate=(e,t)=>{let n,k,I,A,R,N,M,P,L,j,G,z,H,q,V,$,K,W,Y,Q,X,Z,J=0;const ee=new Uint8Array(4);let te,ne;const re=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(O(e)||!e.output||!e.input&&0!==e.avail_in)return p;n=e.state,n.mode===y&&(n.mode=E),R=e.next_out,I=e.output,M=e.avail_out,A=e.next_in,k=e.input,N=e.avail_in,P=n.hold,L=n.bits,j=N,G=M,Z=u;e:for(;;)switch(n.mode){case b:if(0===n.wrap){n.mode=E;break}for(;L<16;){if(0===N)break e;N--,P+=k[A++]<<L,L+=8}if(2&n.wrap&&35615===P){0===n.wbits&&(n.wbits=15),n.check=0,ee[0]=255&P,ee[1]=P>>>8&255,n.check=i(n.check,ee,2,0),P=0,L=0,n.mode=16181;break}if(n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&P)<<8)+(P>>8))%31){e.msg="incorrect header check",n.mode=x;break}if((15&P)!==_){e.msg="unknown compression method",n.mode=x;break}if(P>>>=4,L-=4,X=8+(15&P),0===n.wbits&&(n.wbits=X),X>15||X>n.wbits){e.msg="invalid window size",n.mode=x;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=512&P?16189:y,P=0,L=0;break;case 16181:for(;L<16;){if(0===N)break e;N--,P+=k[A++]<<L,L+=8}if(n.flags=P,(255&n.flags)!==_){e.msg="unknown compression method",n.mode=x;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=x;break}n.head&&(n.head.text=P>>8&1),512&n.flags&&4&n.wrap&&(ee[0]=255&P,ee[1]=P>>>8&255,n.check=i(n.check,ee,2,0)),P=0,L=0,n.mode=16182;case 16182:for(;L<32;){if(0===N)break e;N--,P+=k[A++]<<L,L+=8}n.head&&(n.head.time=P),512&n.flags&&4&n.wrap&&(ee[0]=255&P,ee[1]=P>>>8&255,ee[2]=P>>>16&255,ee[3]=P>>>24&255,n.check=i(n.check,ee,4,0)),P=0,L=0,n.mode=16183;case 16183:for(;L<16;){if(0===N)break e;N--,P+=k[A++]<<L,L+=8}n.head&&(n.head.xflags=255&P,n.head.os=P>>8),512&n.flags&&4&n.wrap&&(ee[0]=255&P,ee[1]=P>>>8&255,n.check=i(n.check,ee,2,0)),P=0,L=0,n.mode=16184;case 16184:if(1024&n.flags){for(;L<16;){if(0===N)break e;N--,P+=k[A++]<<L,L+=8}n.length=P,n.head&&(n.head.extra_len=P),512&n.flags&&4&n.wrap&&(ee[0]=255&P,ee[1]=P>>>8&255,n.check=i(n.check,ee,2,0)),P=0,L=0}else n.head&&(n.head.extra=null);n.mode=16185;case 16185:if(1024&n.flags&&(z=n.length,z>N&&(z=N),z&&(n.head&&(X=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(k.subarray(A,A+z),X)),512&n.flags&&4&n.wrap&&(n.check=i(n.check,k,z,A)),N-=z,A+=z,n.length-=z),n.length))break e;n.length=0,n.mode=16186;case 16186:if(2048&n.flags){if(0===N)break e;z=0;do{X=k[A+z++],n.head&&X&&n.length<65536&&(n.head.name+=String.fromCharCode(X))}while(X&&z<N);if(512&n.flags&&4&n.wrap&&(n.check=i(n.check,k,z,A)),N-=z,A+=z,X)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=16187;case 16187:if(4096&n.flags){if(0===N)break e;z=0;do{X=k[A+z++],n.head&&X&&n.length<65536&&(n.head.comment+=String.fromCharCode(X))}while(X&&z<N);if(512&n.flags&&4&n.wrap&&(n.check=i(n.check,k,z,A)),N-=z,A+=z,X)break e}else n.head&&(n.head.comment=null);n.mode=16188;case 16188:if(512&n.flags){for(;L<16;){if(0===N)break e;N--,P+=k[A++]<<L,L+=8}if(4&n.wrap&&P!==(65535&n.check)){e.msg="header crc mismatch",n.mode=x;break}P=0,L=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=y;break;case 16189:for(;L<32;){if(0===N)break e;N--,P+=k[A++]<<L,L+=8}e.adler=n.check=D(P),P=0,L=0,n.mode=v;case v:if(0===n.havedict)return e.next_out=R,e.avail_out=M,e.next_in=A,e.avail_in=N,n.hold=P,n.bits=L,h;e.adler=n.check=1,n.mode=y;case y:if(t===l||t===c)break e;case E:if(n.last){P>>>=7&L,L-=7&L,n.mode=C;break}for(;L<3;){if(0===N)break e;N--,P+=k[A++]<<L,L+=8}switch(n.last=1&P,P>>>=1,L-=1,3&P){case 0:n.mode=16193;break;case 1:if(B(n),n.mode=w,t===c){P>>>=2,L-=2;break e}break;case 2:n.mode=16196;break;case 3:e.msg="invalid block type",n.mode=x}P>>>=2,L-=2;break;case 16193:for(P>>>=7&L,L-=7&L;L<32;){if(0===N)break e;N--,P+=k[A++]<<L,L+=8}if((65535&P)!=(P>>>16^65535)){e.msg="invalid stored block lengths",n.mode=x;break}if(n.length=65535&P,P=0,L=0,n.mode=S,t===c)break e;case S:n.mode=16195;case 16195:if(z=n.length,z){if(z>N&&(z=N),z>M&&(z=M),0===z)break e;I.set(k.subarray(A,A+z),R),N-=z,A+=z,M-=z,R+=z,n.length-=z;break}n.mode=y;break;case 16196:for(;L<14;){if(0===N)break e;N--,P+=k[A++]<<L,L+=8}if(n.nlen=257+(31&P),P>>>=5,L-=5,n.ndist=1+(31&P),P>>>=5,L-=5,n.ncode=4+(15&P),P>>>=4,L-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=x;break}n.have=0,n.mode=16197;case 16197:for(;n.have<n.ncode;){for(;L<3;){if(0===N)break e;N--,P+=k[A++]<<L,L+=8}n.lens[re[n.have++]]=7&P,P>>>=3,L-=3}for(;n.have<19;)n.lens[re[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,te={bits:n.lenbits},Z=a(0,n.lens,0,19,n.lencode,0,n.work,te),n.lenbits=te.bits,Z){e.msg="invalid code lengths set",n.mode=x;break}n.have=0,n.mode=16198;case 16198:for(;n.have<n.nlen+n.ndist;){for(;J=n.lencode[P&(1<<n.lenbits)-1],V=J>>>24,$=J>>>16&255,K=65535&J,!(V<=L);){if(0===N)break e;N--,P+=k[A++]<<L,L+=8}if(K<16)P>>>=V,L-=V,n.lens[n.have++]=K;else{if(16===K){for(ne=V+2;L<ne;){if(0===N)break e;N--,P+=k[A++]<<L,L+=8}if(P>>>=V,L-=V,0===n.have){e.msg="invalid bit length repeat",n.mode=x;break}X=n.lens[n.have-1],z=3+(3&P),P>>>=2,L-=2}else if(17===K){for(ne=V+3;L<ne;){if(0===N)break e;N--,P+=k[A++]<<L,L+=8}P>>>=V,L-=V,X=0,z=3+(7&P),P>>>=3,L-=3}else{for(ne=V+7;L<ne;){if(0===N)break e;N--,P+=k[A++]<<L,L+=8}P>>>=V,L-=V,X=0,z=11+(127&P),P>>>=7,L-=7}if(n.have+z>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=x;break}for(;z--;)n.lens[n.have++]=X}}if(n.mode===x)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=x;break}if(n.lenbits=9,te={bits:n.lenbits},Z=a(1,n.lens,0,n.nlen,n.lencode,0,n.work,te),n.lenbits=te.bits,Z){e.msg="invalid literal/lengths set",n.mode=x;break}if(n.distbits=6,n.distcode=n.distdyn,te={bits:n.distbits},Z=a(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,te),n.distbits=te.bits,Z){e.msg="invalid distances set",n.mode=x;break}if(n.mode=w,t===c)break e;case w:n.mode=T;case T:if(N>=6&&M>=258){e.next_out=R,e.avail_out=M,e.next_in=A,e.avail_in=N,n.hold=P,n.bits=L,o(e,G),R=e.next_out,I=e.output,M=e.avail_out,A=e.next_in,k=e.input,N=e.avail_in,P=n.hold,L=n.bits,n.mode===y&&(n.back=-1);break}for(n.back=0;J=n.lencode[P&(1<<n.lenbits)-1],V=J>>>24,$=J>>>16&255,K=65535&J,!(V<=L);){if(0===N)break e;N--,P+=k[A++]<<L,L+=8}if($&&0==(240&$)){for(W=V,Y=$,Q=K;J=n.lencode[Q+((P&(1<<W+Y)-1)>>W)],V=J>>>24,$=J>>>16&255,K=65535&J,!(W+V<=L);){if(0===N)break e;N--,P+=k[A++]<<L,L+=8}P>>>=W,L-=W,n.back+=W}if(P>>>=V,L-=V,n.back+=V,n.length=K,0===$){n.mode=16205;break}if(32&$){n.back=-1,n.mode=y;break}if(64&$){e.msg="invalid literal/length code",n.mode=x;break}n.extra=15&$,n.mode=16201;case 16201:if(n.extra){for(ne=n.extra;L<ne;){if(0===N)break e;N--,P+=k[A++]<<L,L+=8}n.length+=P&(1<<n.extra)-1,P>>>=n.extra,L-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=16202;case 16202:for(;J=n.distcode[P&(1<<n.distbits)-1],V=J>>>24,$=J>>>16&255,K=65535&J,!(V<=L);){if(0===N)break e;N--,P+=k[A++]<<L,L+=8}if(0==(240&$)){for(W=V,Y=$,Q=K;J=n.distcode[Q+((P&(1<<W+Y)-1)>>W)],V=J>>>24,$=J>>>16&255,K=65535&J,!(W+V<=L);){if(0===N)break e;N--,P+=k[A++]<<L,L+=8}P>>>=W,L-=W,n.back+=W}if(P>>>=V,L-=V,n.back+=V,64&$){e.msg="invalid distance code",n.mode=x;break}n.offset=K,n.extra=15&$,n.mode=16203;case 16203:if(n.extra){for(ne=n.extra;L<ne;){if(0===N)break e;N--,P+=k[A++]<<L,L+=8}n.offset+=P&(1<<n.extra)-1,P>>>=n.extra,L-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=x;break}n.mode=16204;case 16204:if(0===M)break e;if(z=G-M,n.offset>z){if(z=n.offset-z,z>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=x;break}z>n.wnext?(z-=n.wnext,H=n.wsize-z):H=n.wnext-z,z>n.length&&(z=n.length),q=n.window}else q=I,H=R-n.offset,z=n.length;z>M&&(z=M),M-=z,n.length-=z;do{I[R++]=q[H++]}while(--z);0===n.length&&(n.mode=T);break;case 16205:if(0===M)break e;I[R++]=n.length,M--,n.mode=T;break;case C:if(n.wrap){for(;L<32;){if(0===N)break e;N--,P|=k[A++]<<L,L+=8}if(G-=M,e.total_out+=G,n.total+=G,4&n.wrap&&G&&(e.adler=n.check=n.flags?i(n.check,I,G,R-G):r(n.check,I,G,R-G)),G=M,4&n.wrap&&(n.flags?P:D(P))!==n.check){e.msg="incorrect data check",n.mode=x;break}P=0,L=0}n.mode=16207;case 16207:if(n.wrap&&n.flags){for(;L<32;){if(0===N)break e;N--,P+=k[A++]<<L,L+=8}if(4&n.wrap&&P!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=x;break}P=0,L=0}n.mode=16208;case 16208:Z=d;break e;case x:Z=m;break e;case F:return g;default:return p}return e.next_out=R,e.avail_out=M,e.next_in=A,e.avail_in=N,n.hold=P,n.bits=L,(n.wsize||G!==e.avail_out&&n.mode<x&&(n.mode<C||t!==s))&&U(e,e.output,e.next_out,G-e.avail_out)?(n.mode=F,g):(j-=e.avail_in,G-=e.avail_out,e.total_in+=j,e.total_out+=G,n.total+=G,4&n.wrap&&G&&(e.adler=n.check=n.flags?i(n.check,I,G,e.next_out-G):r(n.check,I,G,e.next_out-G)),e.data_type=n.bits+(n.last?64:0)+(n.mode===y?128:0)+(n.mode===w||n.mode===S?256:0),(0===j&&0===G||t===s)&&Z===u&&(Z=f),Z)},e.exports.inflateEnd=e=>{if(O(e))return p;let t=e.state;return t.window&&(t.window=null),e.state=null,u},e.exports.inflateGetHeader=(e,t)=>{if(O(e))return p;const n=e.state;return 0==(2&n.wrap)?p:(n.head=t,t.done=!1,u)},e.exports.inflateSetDictionary=(e,t)=>{const n=t.length;let i,o,a;return O(e)?p:(i=e.state,0!==i.wrap&&i.mode!==v?p:i.mode===v&&(o=1,o=r(o,t,n,0),o!==i.check)?m:(a=U(e,t,n,n),a?(i.mode=F,g):(i.havedict=1,u)))},e.exports.inflateInfo="pako inflate (from Nodeca project)"},function(e,t,n){"use strict";const r=16209;e.exports=function(e,t){let n,i,o,a,s,l,c,u,d,h,p,m,g,f,_,b,v,y,E,S,w,T,C,x;const F=e.state;n=e.next_in,C=e.input,i=n+(e.avail_in-5),o=e.next_out,x=e.output,a=o-(t-e.avail_out),s=o+(e.avail_out-257),l=F.dmax,c=F.wsize,u=F.whave,d=F.wnext,h=F.window,p=F.hold,m=F.bits,g=F.lencode,f=F.distcode,_=(1<<F.lenbits)-1,b=(1<<F.distbits)-1;e:do{m<15&&(p+=C[n++]<<m,m+=8,p+=C[n++]<<m,m+=8),v=g[p&_];t:for(;;){if(y=v>>>24,p>>>=y,m-=y,y=v>>>16&255,0===y)x[o++]=65535&v;else{if(!(16&y)){if(0==(64&y)){v=g[(65535&v)+(p&(1<<y)-1)];continue t}if(32&y){F.mode=16191;break e}e.msg="invalid literal/length code",F.mode=r;break e}E=65535&v,y&=15,y&&(m<y&&(p+=C[n++]<<m,m+=8),E+=p&(1<<y)-1,p>>>=y,m-=y),m<15&&(p+=C[n++]<<m,m+=8,p+=C[n++]<<m,m+=8),v=f[p&b];n:for(;;){if(y=v>>>24,p>>>=y,m-=y,y=v>>>16&255,!(16&y)){if(0==(64&y)){v=f[(65535&v)+(p&(1<<y)-1)];continue n}e.msg="invalid distance code",F.mode=r;break e}if(S=65535&v,y&=15,m<y&&(p+=C[n++]<<m,m+=8,m<y&&(p+=C[n++]<<m,m+=8)),S+=p&(1<<y)-1,S>l){e.msg="invalid distance too far back",F.mode=r;break e}if(p>>>=y,m-=y,y=o-a,S>y){if(y=S-y,y>u&&F.sane){e.msg="invalid distance too far back",F.mode=r;break e}if(w=0,T=h,0===d){if(w+=c-y,y<E){E-=y;do{x[o++]=h[w++]}while(--y);w=o-S,T=x}}else if(d<y){if(w+=c+d-y,y-=d,y<E){E-=y;do{x[o++]=h[w++]}while(--y);if(w=0,d<E){y=d,E-=y;do{x[o++]=h[w++]}while(--y);w=o-S,T=x}}}else if(w+=d-y,y<E){E-=y;do{x[o++]=h[w++]}while(--y);w=o-S,T=x}for(;E>2;)x[o++]=T[w++],x[o++]=T[w++],x[o++]=T[w++],E-=3;E&&(x[o++]=T[w++],E>1&&(x[o++]=T[w++]))}else{w=o-S;do{x[o++]=x[w++],x[o++]=x[w++],x[o++]=x[w++],E-=3}while(E>2);E&&(x[o++]=x[w++],E>1&&(x[o++]=x[w++]))}break}}break}}while(n<i&&o<s);E=m>>3,n-=E,m-=E<<3,p&=(1<<m)-1,e.next_in=n,e.next_out=o,e.avail_in=n<i?i-n+5:5-(n-i),e.avail_out=o<s?s-o+257:257-(o-s),F.hold=p,F.bits=m}},function(e,t,n){"use strict";const r=15,i=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),o=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),a=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),s=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);e.exports=(e,t,n,l,c,u,d,h)=>{const p=h.bits;let m,g,f,_,b,v,y=0,E=0,S=0,w=0,T=0,C=0,x=0,F=0,D=0,k=0,O=null;const I=new Uint16Array(16),A=new Uint16Array(16);let R,N,M,P=null;for(y=0;y<=r;y++)I[y]=0;for(E=0;E<l;E++)I[t[n+E]]++;for(T=p,w=r;w>=1&&0===I[w];w--);if(T>w&&(T=w),0===w)return c[u++]=20971520,c[u++]=20971520,h.bits=1,0;for(S=1;S<w&&0===I[S];S++);for(T<S&&(T=S),F=1,y=1;y<=r;y++)if(F<<=1,F-=I[y],F<0)return-1;if(F>0&&(0===e||1!==w))return-1;for(A[1]=0,y=1;y<r;y++)A[y+1]=A[y]+I[y];for(E=0;E<l;E++)0!==t[n+E]&&(d[A[t[n+E]]++]=E);if(0===e?(O=P=d,v=20):1===e?(O=i,P=o,v=257):(O=a,P=s,v=0),k=0,E=0,y=S,b=u,C=T,x=0,f=-1,D=1<<T,_=D-1,1===e&&D>852||2===e&&D>592)return 1;for(;;){R=y-x,d[E]+1<v?(N=0,M=d[E]):d[E]>=v?(N=P[d[E]-v],M=O[d[E]-v]):(N=96,M=0),m=1<<y-x,g=1<<C,S=g;do{g-=m,c[b+(k>>x)+g]=R<<24|N<<16|M|0}while(0!==g);for(m=1<<y-1;k&m;)m>>=1;if(0!==m?(k&=m-1,k+=m):k=0,E++,0==--I[y]){if(y===w)break;y=t[n+d[E]]}if(y>T&&(k&_)!==f){for(0===x&&(x=T),b+=S,C=y-x,F=1<<C;C+x<w&&(F-=I[C+x],!(F<=0));)C++,F<<=1;if(D+=1<<C,1===e&&D>852||2===e&&D>592)return 1;f=k&_,c[f]=T<<24|C<<16|b-u|0}}return 0!==k&&(c[b+k]=y-x<<24|64<<16|0),h.bits=T,0}},function(e,t,n){"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},function(e,t,n){!function(){"use strict";var t,r=n(1369),i=n(772),o=512;function a(e){this.written=0,t=(e||20)*o,this.out=i.clean(t)}a.prototype.append=function(e,n,a,s){var l,c,u,d,h,p,m;if("string"==typeof n)n=i.stringToUint8(n);else if(n.constructor!==Uint8Array.prototype.constructor)throw"Invalid input type. You gave me: "+n.constructor.toString().match(/function\s*([$A-Za-z_][0-9A-Za-z_]*)\s*\(/)[1];return"function"==typeof a&&(s=a,a={}),u=(a=a||{}).mode||4095&parseInt("777",8),d=a.mtime||Math.floor(+new Date/1e3),h=a.uid||0,p=a.gid||0,l={fileName:e,fileMode:i.pad(u,7),uid:i.pad(h,7),gid:i.pad(p,7),fileSize:i.pad(n.length,11),mtime:i.pad(d,11),checksum:" ",type:"0",ustar:"ustar ",owner:a.owner||"",group:a.group||""},c=0,Object.keys(l).forEach((function(e){var t,n,r=l[e];for(t=0,n=r.length;t<n;t+=1)c+=r.charCodeAt(t)})),l.checksum=i.pad(c,6)+"\0 ",m=r.format(l),this.out.set(m,this.written),this.written+=m.length,this.written+n.length>this.out.length&&(this.out=i.extend(this.out,this.written,n.length,t)),this.out.set(n,this.written),this.written+=n.length+(o-(n.length%o||o)),this.out.length-this.written<2*o&&(this.out=i.extend(this.out,this.written,2*o,t)),"function"==typeof s&&s(this.out),this.out},a.prototype.clear=function(){this.written=0,this.out=i.clean(t)},a.utils=i,a.stringToUint8=i.stringToUint8,a.uint8ToBase64=i.uint8ToBase64,a.base64ToUint8=i.base64ToUint8,e.exports=a}()},function(e,t,n){!function(){"use strict";var t,r=n(772);t=[{field:"fileName",length:100},{field:"fileMode",length:8},{field:"uid",length:8},{field:"gid",length:8},{field:"fileSize",length:12},{field:"mtime",length:12},{field:"checksum",length:8},{field:"type",length:1},{field:"linkName",length:100},{field:"ustar",length:8},{field:"owner",length:32},{field:"group",length:32},{field:"majorNumber",length:8},{field:"minorNumber",length:8},{field:"filenamePrefix",length:155},{field:"padding",length:12}],e.exports.structure=t,e.exports.format=function(e,n){var i=r.clean(512),o=0;return t.forEach((function(t){var n,r,a=e[t.field]||"";for(n=0,r=a.length;n<r;n+=1)i[o]=a.charCodeAt(n),o+=1;o+=t.length-n})),"function"==typeof n?n(i,o):i}}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=()=>{const e=new WeakSet;return(t,n)=>{if("object"==typeof n&&null!==n){if(e.has(n))return"<$ cycle-trimmed $>";e.add(n)}return n}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(218),i=n(277),o=n(788),a=n(789),s=n(790),l=n(791),c=n(458),u=n(1393),d=n(1394),h=n(1395),p=n(1396),m=n(581),g=n(582),f=n(459),_=n(583),b=n(584),v=n(585);let y={};i.WINDOW.Sentry&&i.WINDOW.Sentry.Integrations&&(y=i.WINDOW.Sentry.Integrations);const E={...y,...r.Integrations,...d};t.FunctionToString=r.FunctionToString,t.Hub=r.Hub,t.InboundFilters=r.InboundFilters,t.SDK_VERSION=r.SDK_VERSION,t.Scope=r.Scope,t.addBreadcrumb=r.addBreadcrumb,t.addGlobalEventProcessor=r.addGlobalEventProcessor,t.captureEvent=r.captureEvent,t.captureException=r.captureException,t.captureMessage=r.captureMessage,t.configureScope=r.configureScope,t.createTransport=r.createTransport,t.getCurrentHub=r.getCurrentHub,t.getHubFromCarrier=r.getHubFromCarrier,t.makeMain=r.makeMain,t.setContext=r.setContext,t.setExtra=r.setExtra,t.setExtras=r.setExtras,t.setTag=r.setTag,t.setTags=r.setTags,t.setUser=r.setUser,t.startTransaction=r.startTransaction,t.withScope=r.withScope,t.WINDOW=i.WINDOW,t.BrowserClient=o.BrowserClient,t.makeFetchTransport=a.makeFetchTransport,t.makeXHRTransport=s.makeXHRTransport,t.chromeStackLineParser=l.chromeStackLineParser,t.defaultStackLineParsers=l.defaultStackLineParsers,t.defaultStackParser=l.defaultStackParser,t.geckoStackLineParser=l.geckoStackLineParser,t.opera10StackLineParser=l.opera10StackLineParser,t.opera11StackLineParser=l.opera11StackLineParser,t.winjsStackLineParser=l.winjsStackLineParser,t.eventFromException=c.eventFromException,t.eventFromMessage=c.eventFromMessage,t.close=u.close,t.defaultIntegrations=u.defaultIntegrations,t.flush=u.flush,t.forceLoad=u.forceLoad,t.init=u.init,t.lastEventId=u.lastEventId,t.onLoad=u.onLoad,t.showReportDialog=u.showReportDialog,t.wrap=u.wrap,t.Replay=h.Replay,t.makeBrowserOfflineTransport=p.makeBrowserOfflineTransport,t.GlobalHandlers=m.GlobalHandlers,t.TryCatch=g.TryCatch,t.Breadcrumbs=f.Breadcrumbs,t.LinkedErrors=_.LinkedErrors,t.HttpContext=b.HttpContext,t.Dedupe=v.Dedupe,t.Integrations=E},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(330);t.addBreadcrumb=function(e){r.getCurrentHub().addBreadcrumb(e)},t.captureEvent=function(e,t){return r.getCurrentHub().captureEvent(e,t)},t.captureException=function(e,t){return r.getCurrentHub().captureException(e,{captureContext:t})},t.captureMessage=function(e,t){const n="string"==typeof t?t:void 0,i="string"!=typeof t?{captureContext:t}:void 0;return r.getCurrentHub().captureMessage(e,n,i)},t.configureScope=function(e){r.getCurrentHub().configureScope(e)},t.setContext=function(e,t){r.getCurrentHub().setContext(e,t)},t.setExtra=function(e,t){r.getCurrentHub().setExtra(e,t)},t.setExtras=function(e){r.getCurrentHub().setExtras(e)},t.setTag=function(e,t){r.getCurrentHub().setTag(e,t)},t.setTags=function(e){r.getCurrentHub().setTags(e)},t.setUser=function(e){r.getCurrentHub().setUser(e)},t.startTransaction=function(e,t){return r.getCurrentHub().startTransaction({...e},t)},t.withScope=function(e){r.getCurrentHub().withScope(e)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(263),i=n(455),o=n(385),a=n(579),s=n(775),l=n(304).getGlobalObject(),c={},u={};function d(e){if(!u[e])switch(u[e]=!0,e){case"console":!function(){if(!("console"in l))return;i.CONSOLE_LEVELS.forEach((function(e){e in l.console&&o.fill(l.console,e,(function(t){return function(...n){h("console",{args:n,level:e}),t&&t.apply(l.console,n)}}))}))}();break;case"dom":!function(){if(!("document"in l))return;const e=h.bind(null,"dom"),t=v(e,!0);l.document.addEventListener("click",t,!1),l.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((t=>{const n=l[t]&&l[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(o.fill(n,"addEventListener",(function(t){return function(n,r,i){if("click"===n||"keypress"==n)try{const r=this,o=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},a=o[n]=o[n]||{refCount:0};if(!a.handler){const r=v(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch(e){}return t.call(this,n,r,i)}})),o.fill(n,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this,i=n.__sentry_instrumentation_handlers__||{},o=i[t];o&&(o.refCount--,o.refCount<=0&&(e.call(this,t,o.handler,r),o.handler=void 0,delete i[t]),0===Object.keys(i).length&&delete n.__sentry_instrumentation_handlers__)}catch(e){}return e.call(this,t,n,r)}})))}))}();break;case"xhr":!function(){if(!("XMLHttpRequest"in l))return;const e=XMLHttpRequest.prototype;o.fill(e,"open",(function(e){return function(...t){const n=this,i=t[1],a=n.__sentry_xhr__={method:r.isString(t[0])?t[0].toUpperCase():t[0],url:t[1]};r.isString(i)&&"POST"===a.method&&i.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const s=function(){if(4===n.readyState){try{a.status_code=n.status}catch(e){}h("xhr",{args:t,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:n})}};return"onreadystatechange"in n&&"function"==typeof n.onreadystatechange?o.fill(n,"onreadystatechange",(function(e){return function(...t){return s(),e.apply(n,t)}})):n.addEventListener("readystatechange",s),e.apply(n,t)}})),o.fill(e,"send",(function(e){return function(...t){return this.__sentry_xhr__&&void 0!==t[0]&&(this.__sentry_xhr__.body=t[0]),h("xhr",{args:t,startTimestamp:Date.now(),xhr:this}),e.apply(this,t)}}))}();break;case"fetch":!function(){if(!s.supportsNativeFetch())return;o.fill(l,"fetch",(function(e){return function(...t){const n={args:t,fetchData:{method:p(t),url:m(t)},startTimestamp:Date.now()};return h("fetch",{...n}),e.apply(l,t).then((e=>(h("fetch",{...n,endTimestamp:Date.now(),response:e}),e)),(e=>{throw h("fetch",{...n,endTimestamp:Date.now(),error:e}),e}))}}))}();break;case"history":!function(){if(!s.supportsHistory())return;const e=l.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=g,t=String(n);g=t,h("history",{from:e,to:t})}return e.apply(this,t)}}l.onpopstate=function(...t){const n=l.location.href,r=g;if(g=n,h("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch(e){}},o.fill(l.history,"pushState",t),o.fill(l.history,"replaceState",t)}();break;case"error":y=l.onerror,l.onerror=function(e,t,n,r,i){return h("error",{column:r,error:i,line:n,msg:e,url:t}),!!y&&y.apply(this,arguments)};break;case"unhandledrejection":E=l.onunhandledrejection,l.onunhandledrejection=function(e){return h("unhandledrejection",e),!E||E.apply(this,arguments)};break;default:return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.warn("unknown instrumentation type:",e))}}function h(e,t){if(e&&c[e])for(const n of c[e]||[])try{n(t)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${a.getFunctionName(n)}\nError:`,t)}}function p(e=[]){return"Request"in l&&r.isInstanceOf(e[0],Request)&&e[0].method?String(e[0].method).toUpperCase():e[1]&&e[1].method?String(e[1].method).toUpperCase():"GET"}function m(e=[]){return"string"==typeof e[0]?e[0]:"Request"in l&&r.isInstanceOf(e[0],Request)?e[0].url:String(e[0])}let g;const f=1e3;let _,b;function v(e,t=!1){return n=>{if(!n||b===n)return;if(function(e){if("keypress"!==e.type)return!1;try{const t=e.target;if(!t||!t.tagName)return!0;if("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable)return!1}catch(e){}return!0}(n))return;const r="keypress"===n.type?"input":n.type;(void 0===_||function(e,t){if(!e)return!0;if(e.type!==t.type)return!0;try{if(e.target!==t.target)return!0}catch(e){}return!1}(b,n))&&(e({event:n,name:r,global:t}),b=n),clearTimeout(_),_=l.setTimeout((()=>{_=void 0}),f)}}let y=null;let E=null;t.addInstrumentationHandler=function(e,t){c[e]=c[e]||[],c[e].push(t),d(e)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(385),i=n(578),o=n(304);function a(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}const s=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;t.addContextToFrame=function(e,t,n=5){if(void 0===t.lineno)return;const r=e.length,o=Math.max(Math.min(r,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,o-n),o).map((e=>i.snipLine(e,0))),t.context_line=i.snipLine(e[Math.min(r-1,o)],t.colno||0),t.post_context=e.slice(Math.min(o+1,r),o+1+n).map((e=>i.snipLine(e,0)))},t.addExceptionMechanism=function(e,t){const n=a(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r&&r.data,...t.data};n.mechanism.data=e}},t.addExceptionTypeValue=function(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type=n||"Error")},t.arrayify=function(e){return Array.isArray(e)?e:[e]},t.checkOrSetAlreadyCaught=function(e){if(e&&e.__sentry_captured__)return!0;try{r.addNonEnumerableProperty(e,"__sentry_captured__",!0)}catch(e){}return!1},t.getEventDescription=function(e){const{message:t,event_id:n}=e;if(t)return t;const r=a(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"},t.parseSemver=function(e){const t=e.match(s)||[],n=parseInt(t[1],10),r=parseInt(t[2],10),i=parseInt(t[3],10);return{buildmetadata:t[5],major:isNaN(n)?void 0:n,minor:isNaN(r)?void 0:r,patch:isNaN(i)?void 0:i,prerelease:t[4]}},t.uuid4=function(){const e=o.GLOBAL_OBJ,t=e.crypto||e.msCrypto;if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");const n=t&&t.getRandomValues?()=>t.getRandomValues(new Uint8Array(1))[0]:()=>16*Math.random();return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}},function(e,t){function n(e,t){let n=0;for(let t=e.length-1;t>=0;t--){const r=e[t];"."===r?e.splice(t,1):".."===r?(e.splice(t,1),n++):n&&(e.splice(t,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}Object.defineProperty(t,"__esModule",{value:!0});const r=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^/]+?|)(\.[^./]*|))(?:[/]*)$/;function i(e){const t=r.exec(e);return t?t.slice(1):[]}function o(...e){let t="",r=!1;for(let n=e.length-1;n>=-1&&!r;n--){const i=n>=0?e[n]:"/";i&&(t=`${i}/${t}`,r="/"===i.charAt(0))}return t=n(t.split("/").filter((e=>!!e)),!r).join("/"),(r?"/":"")+t||"."}function a(e){let t=0;for(;t<e.length&&""===e[t];t++);let n=e.length-1;for(;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}function s(e){const t=l(e),r="/"===e.slice(-1);let i=n(e.split("/").filter((e=>!!e)),!t).join("/");return i||t||(i="."),i&&r&&(i+="/"),(t?"/":"")+i}function l(e){return"/"===e.charAt(0)}t.basename=function(e,t){let n=i(e)[2];return t&&n.slice(-1*t.length)===t&&(n=n.slice(0,n.length-t.length)),n},t.dirname=function(e){const t=i(e),n=t[0];let r=t[1];return n||r?(r&&(r=r.slice(0,r.length-1)),n+r):"."},t.isAbsolute=l,t.join=function(...e){return s(e.join("/"))},t.normalizePath=s,t.relative=function(e,t){e=o(e).slice(1),t=o(t).slice(1);const n=a(e.split("/")),r=a(t.split("/")),i=Math.min(n.length,r.length);let s=i;for(let e=0;e<i;e++)if(n[e]!==r[e]){s=e;break}let l=[];for(let e=s;e<n.length;e++)l.push("..");return l=l.concat(r.slice(s)),l.join("/")},t.resolve=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(577),i=n(779);t.makePromiseBuffer=function(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(o){if(!(void 0===e||t.length<e))return i.rejectedSyncPromise(new r.SentryError("Not adding Promise because buffer limit was reached."));const a=o();return-1===t.indexOf(a)&&t.push(a),a.then((()=>n(a))).then(null,(()=>n(a).then(null,(()=>{})))),a},drain:function(e){return new i.SyncPromise(((n,r)=>{let o=t.length;if(!o)return n(!0);const a=setTimeout((()=>{e&&e>0&&n(!1)}),e);t.forEach((e=>{i.resolvedSyncPromise(e).then((()=>{--o||(clearTimeout(a),n(!0))}),r)}))}))}}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(263),i=n(580),o=n(780),a={ip:!1,request:!0,transaction:!0,user:!0},s=["cookies","data","headers","method","query_string","url"],l=["id","username","email"];function c(e,t={}){const n=e.method&&e.method.toUpperCase();let r="",i="url";t.customRoute||e.route?(r=t.customRoute||`${e.baseUrl||""}${e.route&&e.route.path}`,i="route"):(e.originalUrl||e.url)&&(r=o.stripUrlQueryAndFragment(e.originalUrl||e.url||""));let a="";return t.method&&n&&(a+=n),t.method&&t.path&&(a+=" "),t.path&&r&&(a+=r),[a,i]}function u(e,t){const{include:n=s,deps:o}=t||{},a={},l=e.headers||{},c=e.method,u=e.hostname||e.host||l.host||"<no host>",h=`${"https"===e.protocol||e.socket&&e.socket.encrypted?"https":"http"}://${u}${e.originalUrl||e.url||""}`;return n.forEach((t=>{switch(t){case"headers":a.headers=l;break;case"method":a.method=c;break;case"url":a.url=h;break;case"cookies":a.cookies=e.cookies||l.cookie&&o&&o.cookie&&o.cookie.parse(l.cookie)||{};break;case"query_string":a.query_string=d(e,o);break;case"data":if("GET"===c||"HEAD"===c)break;void 0!==e.body&&(a.data=r.isString(e.body)?e.body:JSON.stringify(i.normalize(e.body)));break;default:({}).hasOwnProperty.call(e,t)&&(a[t]=e[t])}})),a}function d(e,t){let n=e.originalUrl||e.url||"";if(n)return n.startsWith("/")&&(n=`http://dogs.are.great${n}`),e.query||void 0!==typeof URL&&new URL(n).search.replace("?","")||t&&t.url&&t.url.parse(n).query||void 0}t.addRequestDataToEvent=function(e,t,n){const i={...a,...n&&n.include};if(i.request){const r=Array.isArray(i.request)?u(t,{include:i.request,deps:n&&n.deps}):u(t,{deps:n&&n.deps});e.request={...e.request,...r}}if(i.user){const n=t.user&&r.isPlainObject(t.user)?function(e,t){const n={};return(Array.isArray(t)?t:l).forEach((t=>{e&&t in e&&(n[t]=e[t])})),n}(t.user,i.user):{};Object.keys(n).length&&(e.user={...e.user,...n})}if(i.ip){const n=t.ip||t.socket&&t.socket.remoteAddress;n&&(e.user={...e.user,ip_address:n})}return i.transaction&&!e.transaction&&(e.transaction=function(e,t){switch(t){case"path":return c(e,{path:!0})[0];case"handler":return e.route&&e.route.stack&&e.route.stack[0]&&e.route.stack[0].name||"<anonymous>";default:return c(e,{path:!0,method:!0})[0]}}(t,i.transaction)),e},t.addRequestDataToTransaction=function(e,t,n){e&&(e.metadata.source&&"url"!==e.metadata.source||e.setName(...c(t,{path:!0,method:!0})),e.setData("url",t.originalUrl||t.url),t.baseUrl&&e.setData("baseUrl",t.baseUrl),e.setData("query",d(t,n)))},t.extractPathForTransaction=c,t.extractRequestData=u},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=["fatal","error","warning","log","info","debug"];function r(e){return"warn"===e?"warning":n.includes(e)?e:"log"}t.severityFromString=function(e){return r(e)},t.severityLevelFromString=r,t.validSeverityLevels=n},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");t.TRACEPARENT_REGEXP=n,t.extractTraceparentData=function(e){const t=e.match(n);if(!e||!t)return;let r;return"1"===t[3]?r=!0:"0"===t[3]&&(r=!1),{traceId:t[1],parentSampled:r,parentSpanId:t[2]}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(782),i=n(781);t.createClientReportEnvelope=function(e,t,n){const o=[{type:"client_report"},{timestamp:n||i.dateTimestampInSeconds(),discarded_events:e}];return r.createEnvelope(t?{dsn:t}:{},[o])}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=6e4;function r(e,t=Date.now()){const r=parseInt(`${e}`,10);if(!isNaN(r))return 1e3*r;const i=Date.parse(`${e}`);return isNaN(i)?n:i-t}function i(e,t){return e[t]||e.all||0}t.DEFAULT_RETRY_AFTER=n,t.disabledUntil=i,t.isRateLimited=function(e,t,n=Date.now()){return i(e,t)>n},t.parseRetryAfterHeader=r,t.updateRateLimits=function(e,{statusCode:t,headers:n},i=Date.now()){const o={...e},a=n&&n["x-sentry-rate-limits"],s=n&&n["retry-after"];if(a)for(const e of a.trim().split(",")){const[t,n]=e.split(":",2),r=parseInt(t,10),a=1e3*(isNaN(r)?60:r);if(n)for(const e of n.split(";"))o[e]=i+a;else o.all=i+a}else s?o.all=i+r(s,i):429===t&&(o.all=i+6e4);return o}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(263),i=n(455),o="sentry-",a=/^sentry-/,s=8192;function l(e){return e.split(",").map((e=>e.split("=").map((e=>decodeURIComponent(e.trim()))))).reduce(((e,[t,n])=>(e[t]=n,e)),{})}t.BAGGAGE_HEADER_NAME="baggage",t.MAX_BAGGAGE_STRING_LENGTH=s,t.SENTRY_BAGGAGE_KEY_PREFIX=o,t.SENTRY_BAGGAGE_KEY_PREFIX_REGEX=a,t.baggageHeaderToDynamicSamplingContext=function(e){if(!r.isString(e)&&!Array.isArray(e))return;let t={};if(Array.isArray(e))t=e.reduce(((e,t)=>({...e,...l(t)})),{});else{if(!e)return;t=l(e)}const n=Object.entries(t).reduce(((e,[t,n])=>{if(t.match(a)){e[t.slice(o.length)]=n}return e}),{});return Object.keys(n).length>0?n:void 0},t.dynamicSamplingContextToSentryBaggageHeader=function(e){return function(e){if(0===Object.keys(e).length)return;return Object.entries(e).reduce(((e,[t,n],r)=>{const o=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`,a=0===r?o:`${e},${o}`;return a.length>s?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.warn(`Not adding key: ${t} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):a}),"")}(Object.entries(e).reduce(((e,[t,n])=>(n&&(e[`${o}${t}`]=n),e)),{}))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(163),i=n(330);class o{__init(){this.flushTimeout=60}__init2(){this._pendingAggregates={}}__init3(){this._isEnabled=!0}constructor(e,t){o.prototype.__init.call(this),o.prototype.__init2.call(this),o.prototype.__init3.call(this),this._client=e,this._intervalId=setInterval((()=>this.flush()),1e3*this.flushTimeout),this._sessionAttrs=t}flush(){const e=this.getSessionAggregates();0!==e.aggregates.length&&(this._pendingAggregates={},this._client.sendSession(e))}getSessionAggregates(){const e=Object.keys(this._pendingAggregates).map((e=>this._pendingAggregates[parseInt(e)])),t={attrs:this._sessionAttrs,aggregates:e};return r.dropUndefinedKeys(t)}close(){clearInterval(this._intervalId),this._isEnabled=!1,this.flush()}incrementSessionStatusCount(){if(!this._isEnabled)return;const e=i.getCurrentHub().getScope(),t=e&&e.getRequestSession();t&&t.status&&(this._incrementSessionStatusCount(t.status,new Date),e&&e.setRequestSession(void 0))}_incrementSessionStatusCount(e,t){const n=new Date(t).setSeconds(0,0);this._pendingAggregates[n]=this._pendingAggregates[n]||{};const r=this._pendingAggregates[n];switch(r.started||(r.started=new Date(n).toISOString()),e){case"errored":return r.errored=(r.errored||0)+1,r.errored;case"ok":return r.exited=(r.exited||0)+1,r.exited;default:return r.crashed=(r.crashed||0)+1,r.crashed}}}t.SessionFlusher=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(163),i=n(783),o=n(1385),a=n(784),s=n(457),l=n(785),c="Not capturing exception because it's already been captured.";class u{__init(){this._integrations={}}__init2(){this._integrationsInitialized=!1}__init3(){this._numProcessing=0}__init4(){this._outcomes={}}constructor(e){if(u.prototype.__init.call(this),u.prototype.__init2.call(this),u.prototype.__init3.call(this),u.prototype.__init4.call(this),this._options=e,e.dsn){this._dsn=r.makeDsn(e.dsn);const t=i.getEnvelopeEndpointWithUrlEncodedAuth(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.logger.warn("No DSN provided, client will not do anything.")}captureException(e,t,n){if(r.checkOrSetAlreadyCaught(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.logger.log(c));let i=t&&t.event_id;return this._process(this.eventFromException(e,t).then((e=>this._captureEvent(e,t,n))).then((e=>{i=e}))),i}captureMessage(e,t,n,i){let o=n&&n.event_id;const a=r.isPrimitive(e)?this.eventFromMessage(String(e),t,n):this.eventFromException(e,n);return this._process(a.then((e=>this._captureEvent(e,n,i))).then((e=>{o=e}))),o}captureEvent(e,t,n){if(t&&t.originalException&&r.checkOrSetAlreadyCaught(t.originalException))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.logger.log(c));let i=t&&t.event_id;return this._process(this._captureEvent(e,t,n).then((e=>{i=e}))),i}captureSession(e){this._isEnabled()?"string"!=typeof e.release?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.logger.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),s.updateSession(e,{init:!1})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.logger.warn("SDK not enabled, will not capture session.")}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?this._isClientDoneProcessing(e).then((n=>t.flush(e).then((e=>n&&e)))):r.resolvedSyncPromise(!0)}close(e){return this.flush(e).then((e=>(this.getOptions().enabled=!1,e)))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=a.setupIntegrations(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch(t){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.logger.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}addIntegration(e){a.setupIntegration(e,this._integrations)}sendEvent(e,t={}){if(this._dsn){let n=o.createEventEnvelope(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=r.addItemToEnvelope(n,r.createAttachmentEnvelopeItem(e,this._options.transportOptions&&this._options.transportOptions.textEncoder));this._sendEnvelope(n)}}sendSession(e){if(this._dsn){const t=o.createSessionEnvelope(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){const n=`${e}:${t}`;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.logger.log(`Adding outcome: "${n}"`),this._outcomes[n]=this._outcomes[n]+1||1}}_updateSessionFromEvent(e,t){let n=!1,r=!1;const i=t.exception&&t.exception.values;if(i){r=!0;for(const e of i){const t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}const o="ok"===e.status;(o&&0===e.errors||o&&n)&&(s.updateSession(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new r.SyncPromise((t=>{let n=0;const r=setInterval((()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._dsn}_prepareEvent(e,t,n){const r=this.getOptions(),i=Object.keys(this._integrations);return!t.integrations&&i.length>0&&(t.integrations=i),l.prepareEvent(r,e,t,n)}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then((e=>e.event_id),(e=>{if("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__){const t=e;"log"===t.logLevel?r.logger.log(t.message):r.logger.warn(t)}}))}_processEvent(e,t,n){const i=this.getOptions(),{sampleRate:o}=i;if(!this._isEnabled())return r.rejectedSyncPromise(new r.SentryError("SDK not enabled, will not capture event.","log"));const a=h(e),s=d(e),l=e.type||"error",c=`before send for type \`${l}\``;if(s&&"number"==typeof o&&Math.random()>o)return this.recordDroppedEvent("sample_rate","error",e),r.rejectedSyncPromise(new r.SentryError(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));const u="replay_event"===l?"replay":l;return this._prepareEvent(e,t,n).then((n=>{if(null===n)throw this.recordDroppedEvent("event_processor",u,e),new r.SentryError("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return n;const o=function(e,t,n){const{beforeSend:r,beforeSendTransaction:i}=e;if(d(t)&&r)return r(t,n);if(h(t)&&i)return i(t,n);return t}(i,n,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(r.isThenable(e))return e.then((e=>{if(!r.isPlainObject(e)&&null!==e)throw new r.SentryError(n);return e}),(e=>{throw new r.SentryError(`${t} rejected with ${e}`)}));if(!r.isPlainObject(e)&&null!==e)throw new r.SentryError(n);return e}(o,c)})).then((i=>{if(null===i)throw this.recordDroppedEvent("before_send",u,e),new r.SentryError(`${c} returned \`null\`, will not send event.`,"log");const o=n&&n.getSession();!a&&o&&this._updateSessionFromEvent(o,i);const s=i.transaction_info;if(a&&s&&i.transaction!==e.transaction){const e="custom";i.transaction_info={...s,source:e}}return this.sendEvent(i,t),i})).then(null,(e=>{if(e instanceof r.SentryError)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new r.SentryError(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)}))}_process(e){this._numProcessing++,e.then((e=>(this._numProcessing--,e)),(e=>(this._numProcessing--,e)))}_sendEnvelope(e){this._transport&&this._dsn?this._transport.send(e).then(null,(e=>{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.logger.error("Error while sending event:",e)})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.logger.error("Transport disabled")}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.keys(e).map((t=>{const[n,r]=t.split(":");return{reason:n,category:r,quantity:e[t]}}))}}function d(e){return void 0===e.type}function h(e){return"transaction"===e.type}t.BaseClient=u},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(163);t.createEventEnvelope=function(e,t,n,i){const o=r.getSdkMetadataForEnvelopeHeader(n),a=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])}(e,n&&n.sdk);const s=r.createEventEnvelopeHeaders(e,o,i,t);delete e.sdkProcessingMetadata;const l=[{type:a},e];return r.createEnvelope(s,[l])},t.createSessionEnvelope=function(e,t,n,i){const o=r.getSdkMetadataForEnvelopeHeader(n),a={sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!i&&{dsn:r.dsnToString(t)}},s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e];return r.createEnvelope(a,[s])}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(163),i=n(330);t.initAndBind=function(e,t){!0===t.debug&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?r.logger.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));const n=i.getCurrentHub(),o=n.getScope();o&&o.update(t.initialScope);const a=new e(t);n.bindClient(a)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(163),i=30;function o(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}t.DEFAULT_TRANSPORT_BUFFER_SIZE=i,t.createTransport=function(e,t,n=r.makePromiseBuffer(e.bufferSize||i)){let a={};return{send:function(i){const s=[];if(r.forEachEnvelopeItem(i,((t,n)=>{const i=r.envelopeItemTypeToDataCategory(n);if(r.isRateLimited(a,i)){const r=o(t,n);e.recordDroppedEvent("ratelimit_backoff",i,r)}else s.push(t)})),0===s.length)return r.resolvedSyncPromise();const l=r.createEnvelope(i[0],s),c=t=>{r.forEachEnvelopeItem(l,((n,i)=>{const a=o(n,i);e.recordDroppedEvent(t,r.envelopeItemTypeToDataCategory(i),a)}))};return n.add((()=>t({body:r.serializeEnvelope(l,e.textEncoder)}).then((e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.logger.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),a=r.updateRateLimits(a,e),e)),(e=>{throw c("network_error"),e})))).then((e=>e),(e=>{if(e instanceof r.SentryError)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.logger.error("Skipped sending event because buffer is full."),c("queue_overflow"),r.resolvedSyncPromise();throw e}))},flush:e=>n.drain(e)}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(163),i=100,o=5e3,a=36e5;function s(e,t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.logger.info(`[Offline]: ${e}`,t)}t.MIN_DELAY=i,t.START_DELAY=o,t.makeOfflineTransport=function(e){return t=>{const n=e(t),l=t.createStore?t.createStore(t):void 0;let c,u=o;function d(e){l&&(c&&clearTimeout(c),c=setTimeout((async()=>{c=void 0;const e=await l.pop();e&&(s("Attempting to send previously queued event"),p(e).catch((e=>{s("Failed to retry sending",e)})))}),e),"number"!=typeof c&&c.unref&&c.unref())}function h(){c||(d(u),u=Math.min(2*u,a))}async function p(e){try{const t=await n.send(e);let a=i;if(t)if(t.headers&&t.headers["retry-after"])a=r.parseRetryAfterHeader(t.headers["retry-after"]);else if((t.statusCode||0)>=400)return t;return d(a),u=o,t}catch(n){if(l&&await function(e,n,i){return!r.envelopeContainsItemType(e,["replay_event","replay_recording","client_report"])&&(!t.shouldStore||t.shouldStore(e,n,i))}(e,n,u))return await l.insert(e),h(),s("Error sending. Event queued",n),{};throw n}}return t.flushAtStartup&&h(),{send:p,flush:e=>n.flush(e)}}}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});t.SDK_VERSION="7.39.0"},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(786),i=n(787);t.FunctionToString=r.FunctionToString,t.InboundFilters=i.InboundFilters},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(330);t.hasTracingEnabled=function(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=r.getCurrentHub().getClient(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(163),i=n(277);let o;t.clearCachedFetchImplementation=function(){o=void 0},t.getNativeFetchImplementation=function(){if(o)return o;if(r.isNativeFetch(i.WINDOW.fetch))return o=i.WINDOW.fetch.bind(i.WINDOW);const e=i.WINDOW.document;let t=i.WINDOW.fetch;if(e&&"function"==typeof e.createElement)try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.logger.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return o=t.bind(i.WINDOW)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(218),i=n(163),o=n(788),a=n(277),s=n(581),l=n(582),c=n(459),u=n(583),d=n(584),h=n(585),p=n(791),m=n(789),g=n(790),f=[new r.Integrations.InboundFilters,new r.Integrations.FunctionToString,new l.TryCatch,new c.Breadcrumbs,new s.GlobalHandlers,new u.LinkedErrors,new h.Dedupe,new d.HttpContext];function _(e){e.startSession({ignoreDuration:!0}),e.captureSession()}t.close=function(e){const t=r.getCurrentHub().getClient();return t?t.close(e):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.warn("Cannot flush events and disable SDK. No client defined."),i.resolvedSyncPromise(!1))},t.defaultIntegrations=f,t.flush=function(e){const t=r.getCurrentHub().getClient();return t?t.flush(e):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.warn("Cannot flush events. No client defined."),i.resolvedSyncPromise(!1))},t.forceLoad=function(){},t.init=function(e={}){void 0===e.defaultIntegrations&&(e.defaultIntegrations=f),void 0===e.release&&("string"==typeof __SENTRY_RELEASE__&&(e.release=__SENTRY_RELEASE__),a.WINDOW.SENTRY_RELEASE&&a.WINDOW.SENTRY_RELEASE.id&&(e.release=a.WINDOW.SENTRY_RELEASE.id)),void 0===e.autoSessionTracking&&(e.autoSessionTracking=!0),void 0===e.sendClientReports&&(e.sendClientReports=!0);const t={...e,stackParser:i.stackParserFromStackParserOptions(e.stackParser||p.defaultStackParser),integrations:r.getIntegrationsToSetup(e),transport:e.transport||(i.supportsFetch()?m.makeFetchTransport:g.makeXHRTransport)};r.initAndBind(o.BrowserClient,t),e.autoSessionTracking&&function(){if(void 0===a.WINDOW.document)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.warn("Session tracking in non-browser environment with @sentry/browser is not supported."));const e=r.getCurrentHub();if(!e.captureSession)return;_(e),i.addInstrumentationHandler("history",(({from:e,to:t})=>{void 0!==e&&e!==t&&_(r.getCurrentHub())}))}()},t.lastEventId=function(){return r.getCurrentHub().lastEventId()},t.onLoad=function(e){e()},t.showReportDialog=function(e={},t=r.getCurrentHub()){if(!a.WINDOW.document)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.error("Global document not defined in showReportDialog call"));const{client:n,scope:o}=t.getStackTop(),s=e.dsn||n&&n.getDsn();if(!s)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.error("DSN not configured for showReportDialog call"));o&&(e.user={...o.getUser(),...e.user}),e.eventId||(e.eventId=t.lastEventId());const l=a.WINDOW.document.createElement("script");l.async=!0,l.src=r.getReportDialogEndpoint(s,e),e.onLoad&&(l.onload=e.onLoad);const c=a.WINDOW.document.head||a.WINDOW.document.body;c?c.appendChild(l):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.error("Not injecting report dialog. No injection point found in HTML")},t.wrap=function(e){return a.wrap(e)()}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(581),i=n(582),o=n(459),a=n(583),s=n(584),l=n(585);t.GlobalHandlers=r.GlobalHandlers,t.TryCatch=i.TryCatch,t.Breadcrumbs=o.Breadcrumbs,t.LinkedErrors=a.LinkedErrors,t.HttpContext=s.HttpContext,t.Dedupe=l.Dedupe},function(e,t,n){(function(e){Object.defineProperty(t,"__esModule",{value:!0});const r=n(218),i=n(163),o=i.GLOBAL_OBJ,a="sentryReplaySession",s="replay_event",l="Unable to send Replay",c=3e5,u=c,d=36e5,h=5e3,p=3;var m;function g(e){const t=null==e?void 0:e.host;return Boolean(t&&t.shadowRoot&&t.shadowRoot===e)}function f({maskInputOptions:e,tagName:t,type:n}){return e[t.toLowerCase()]||e[n]||"input"===t&&!n&&e.text}function _({input:e,maskInputSelector:t,unmaskInputSelector:n,maskInputOptions:r,tagName:i,type:o,value:a,maskInputFn:s}){let l=a||"";return n&&e.matches(n)||(f({maskInputOptions:r,tagName:i,type:o})||t&&e.matches(t))&&(l=s?s(l):"*".repeat(l.length)),l}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(m||(m={}));const b="__rrweb_original__";let v=1;const y=new RegExp("[^a-z0-9-_:]"),E=-2;function S(e){return e?e.replace(/[\S]/g,"*"):""}function w(e){try{const t=e.rules||e.cssRules;return t?Array.from(t).map(T).join(""):null}catch(e){return null}}function T(e){let t=e.cssText;if(function(e){return"styleSheet"in e}(e))try{t=w(e.styleSheet)||t}catch(e){}return t}let C,x;const F=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,D=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,k=/^(data:)([^,]*),(.*)/i;function O(e,t){return(e||"").replace(F,((e,n,r,i,o,a)=>{const s=r||o||a,l=n||i||"";if(!s)return e;if(!D.test(s))return`url(${l}${s}${l})`;if(k.test(s))return`url(${l}${s}${l})`;if("/"===s[0])return`url(${l}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+s}${l})`;const c=t.split("/"),u=s.split("/");c.pop();for(const e of u)"."!==e&&(".."===e?c.pop():c.push(e));return`url(${l}${c.join("/")}${l})`}))}const I=/^[^ \t\n\r\u000c]+/,A=/^[, \t\n\r\u000c]+/;function R(e,t){if(!t||""===t.trim())return t;const n=e.createElement("a");return n.href=t,n.href}function N(){const e=document.createElement("a");return e.href="",e.href}function M(e,t,n,r,i,o){return r?"src"===n||"href"===n||"xlink:href"===n&&"#"!==r[0]?R(e,r):"background"!==n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n?function(e,t){if(""===t.trim())return t;let n=0;function r(e){let r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):""}let i=[];for(;r(A),!(n>=t.length);){let o=r(I);if(","===o.slice(-1))o=R(e,o.substring(0,o.length-1)),i.push(o);else{let r="";o=R(e,o);let a=!1;for(;;){let e=t.charAt(n);if(""===e){i.push((o+r).trim());break}if(a)")"===e&&(a=!1);else{if(","===e){n+=1,i.push((o+r).trim());break}"("===e&&(a=!0)}r+=e,n+=1}}}return i.join(", ")}(e,r):"style"===n?O(r,N()):"object"===t&&"data"===n?R(e,r):i&&["placeholder","title","aria-label"].indexOf(n)>-1?o?o(r):S(r):r:R(e,r):r}function P(e,t,n,r,i){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return P(e.parentNode,t,n,r,i);if(r&&(e.matches(r)||e.closest(r)))return!1;if(i)return!0;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=0;n<e.classList.length;n++){const r=e.classList[n];if(t.test(r))return!0}return!(!n||!e.matches(n))||P(e.parentNode,t,n,r,i)}function L(e,t){var n;const{doc:r,blockClass:i,blockSelector:o,unblockSelector:a,maskTextClass:s,maskTextSelector:l,unmaskTextSelector:c,inlineStylesheet:u,maskInputSelector:d,unmaskInputSelector:h,maskAllText:p,maskInputOptions:g={},maskTextFn:f,maskInputFn:v,dataURLOptions:E={},inlineImages:T,recordCanvas:F,keepIframeSrcFn:D}=t;let k;if(r.__sn){const e=r.__sn.id;k=1===e?void 0:e}switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:m.Document,childNodes:[],compatMode:e.compatMode,rootId:k}:{type:m.Document,childNodes:[],rootId:k};case e.DOCUMENT_TYPE_NODE:return{type:m.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:k};case e.ELEMENT_NODE:const t=function(e,t,n,r){if(r&&e.matches(r))return!1;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=0;n<e.classList.length;n++){const r=e.classList[n];if(t.test(r))return!0}return!!n&&e.matches(n)}(e,i,o,a),R=function(e){if(e instanceof HTMLFormElement)return"form";const t=e.tagName.toLowerCase().trim();return y.test(t)?"div":t}(e);let L={};for(const{name:t,value:n}of Array.from(e.attributes))j(R,t)||(L[t]=M(r,R,t,n,p,f));if("link"===R&&u){const t=Array.from(r.styleSheets).find((t=>t.href===e.href));let n=null;t&&(n=w(t)),n&&(delete L.rel,delete L.href,L._cssText=O(n,t.href))}if("style"===R&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const t=w(e.sheet);t&&(L._cssText=O(t,N()))}if("input"===R||"textarea"===R||"select"===R){const t=e.value;"radio"!==L.type&&"checkbox"!==L.type&&"submit"!==L.type&&"button"!==L.type&&t?L.value=_({input:e,type:L.type,tagName:R,value:t,maskInputSelector:d,unmaskInputSelector:h,maskInputOptions:g,maskInputFn:v}):e.checked&&(L.checked=e.checked)}if("option"===R&&(e.selected&&!g.select?L.selected=!0:delete L.selected),"canvas"===R&&F)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){const i=t.getImageData,o=b in i?i[b]:i;if(new Uint32Array(o.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some((e=>0!==e)))return!1}return!0})(e)||(L.rr_dataURL=e.toDataURL(E.type,E.quality));else if(!("__context"in e)){const t=e.toDataURL(E.type,E.quality),n=document.createElement("canvas");n.width=e.width,n.height=e.height;t!==n.toDataURL(E.type,E.quality)&&(L.rr_dataURL=t)}if("img"===R&&T){C||(C=r.createElement("canvas"),x=C.getContext("2d"));const t=e,n=t.crossOrigin;t.crossOrigin="anonymous";const i=()=>{try{C.width=t.naturalWidth,C.height=t.naturalHeight,x.drawImage(t,0,0),L.rr_dataURL=C.toDataURL(E.type,E.quality)}catch(e){console.warn(`Cannot inline img src=${t.currentSrc}! Error: ${e}`)}n?L.crossOrigin=n:delete L.crossOrigin};t.complete&&0!==t.naturalWidth?i():t.onload=i}if("audio"!==R&&"video"!==R||(L.rr_mediaState=e.paused?"paused":"played",L.rr_mediaCurrentTime=e.currentTime),e.scrollLeft&&(L.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(L.rr_scrollTop=e.scrollTop),t){const{width:t,height:n}=e.getBoundingClientRect();L={class:L.class,rr_width:`${t}px`,rr_height:`${n}px`}}return"iframe"!==R||D(L.src)||(e.contentDocument||(L.rr_src=L.src),delete L.src),{type:m.Element,tagName:R,attributes:L,childNodes:[],isSVG:(A=e,Boolean("svg"===A.tagName||A.ownerSVGElement)||void 0),needBlock:t,rootId:k};case e.TEXT_NODE:const B=e.parentNode&&e.parentNode.tagName;let U=e.textContent;const G="STYLE"===B||void 0,z="SCRIPT"===B||void 0;if(G&&U){try{e.nextSibling||e.previousSibling||(null===(n=e.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(U=(I=e.parentNode.sheet).cssRules?Array.from(I.cssRules).map((e=>e.cssText||"")).join(""):"")}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}U=O(U,N())}return z&&(U="SCRIPT_PLACEHOLDER"),"TEXTAREA"===B&&U?U="":!G&&!z&&P(e,s,l,c,p)&&U&&(U=f?f(U):S(U)),{type:m.Text,textContent:U||"",isStyle:G,rootId:k};case e.CDATA_SECTION_NODE:return{type:m.CDATA,textContent:"",rootId:k};case e.COMMENT_NODE:return{type:m.Comment,textContent:e.textContent||"",rootId:k};default:return!1}var I,A}function B(e){return null==e?"":e.toLowerCase()}function U(e,t){const{doc:n,map:r,blockClass:i,blockSelector:o,unblockSelector:a,maskTextClass:s,maskTextSelector:l,unmaskTextSelector:c,skipChild:u=!1,inlineStylesheet:d=!0,maskInputSelector:h,unmaskInputSelector:p,maskAllText:f,maskInputOptions:_={},maskTextFn:b,maskInputFn:y,slimDOMOptions:S,dataURLOptions:w={},inlineImages:T=!1,recordCanvas:C=!1,onSerialize:x,onIframeLoad:F,iframeLoadTimeout:D=5e3,keepIframeSrcFn:k=(()=>!1)}=t;let{preserveWhiteSpace:O=!0}=t;const I=L(e,{doc:n,blockClass:i,blockSelector:o,unblockSelector:a,maskTextClass:s,maskTextSelector:l,unmaskTextSelector:c,inlineStylesheet:d,maskInputSelector:h,unmaskInputSelector:p,maskAllText:f,maskInputOptions:_,maskTextFn:b,maskInputFn:y,dataURLOptions:w,inlineImages:T,recordCanvas:C,keepIframeSrcFn:k});if(!I)return console.warn(e,"not serialized"),null;let A;A="__sn"in e?e.__sn.id:!function(e,t){if(t.comment&&e.type===m.Comment)return!0;if(e.type===m.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(B(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===B(e.attributes.name)||"icon"===B(e.attributes.rel)||"apple-touch-icon"===B(e.attributes.rel)||"shortcut icon"===B(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&B(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(B(e.attributes.property).match(/^(og|twitter|fb):/)||B(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===B(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===B(e.attributes.name)||"googlebot"===B(e.attributes.name)||"bingbot"===B(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===B(e.attributes.name)||"generator"===B(e.attributes.name)||"framework"===B(e.attributes.name)||"publisher"===B(e.attributes.name)||"progid"===B(e.attributes.name)||B(e.attributes.property).match(/^article:/)||B(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===B(e.attributes.name)||"yandex-verification"===B(e.attributes.name)||"csrf-token"===B(e.attributes.name)||"p:domain_verify"===B(e.attributes.name)||"verify-v1"===B(e.attributes.name)||"verification"===B(e.attributes.name)||"shopify-checkout-api-token"===B(e.attributes.name)))return!0}}return!1}(I,S)&&(O||I.type!==m.Text||I.isStyle||I.textContent.replace(/^\s+|\s+$/gm,"").length)?v++:E;const R=Object.assign(I,{id:A});if(e.__sn=R,A===E)return null;r[A]=e,x&&x(e);let N=!u;if(R.type===m.Element&&(N=N&&!R.needBlock,delete R.needBlock,e.shadowRoot&&(R.isShadowHost=!0)),(R.type===m.Document||R.type===m.Element)&&N){S.headWhitespace&&I.type===m.Element&&"head"===I.tagName&&(O=!1);const t={doc:n,map:r,blockClass:i,blockSelector:o,unblockSelector:a,maskTextClass:s,maskTextSelector:l,unmaskTextSelector:c,skipChild:u,inlineStylesheet:d,maskInputSelector:h,unmaskInputSelector:p,maskAllText:f,maskInputOptions:_,maskTextFn:b,maskInputFn:y,slimDOMOptions:S,dataURLOptions:w,inlineImages:T,recordCanvas:C,preserveWhiteSpace:O,onSerialize:x,onIframeLoad:F,iframeLoadTimeout:D,keepIframeSrcFn:k};for(const n of Array.from(e.childNodes)){const e=U(n,t);e&&R.childNodes.push(e)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(e)&&e.shadowRoot)for(const n of Array.from(e.shadowRoot.childNodes)){const e=U(n,t);e&&(e.isShadow=!0,R.childNodes.push(e))}}return e.parentNode&&g(e.parentNode)&&(R.isShadow=!0),R.type===m.Element&&"iframe"===R.tagName&&function(e,t,n){const r=e.contentWindow;if(!r)return;let i,o=!1;try{i=r.document.readyState}catch(e){return}if("complete"!==i){const r=setTimeout((()=>{o||(t(),o=!0)}),n);return void e.addEventListener("load",(()=>{clearTimeout(r),o=!0,t()}))}const a="about:blank";r.location.href===a&&e.src!==a&&""!==e.src?e.addEventListener("load",t):setTimeout(t,0)}(e,(()=>{const t=e.contentDocument;if(t&&F){const n=U(t,{doc:t,map:r,blockClass:i,blockSelector:o,unblockSelector:a,maskTextClass:s,maskTextSelector:l,unmaskTextSelector:c,skipChild:!1,inlineStylesheet:d,maskInputSelector:h,unmaskInputSelector:p,maskAllText:f,maskInputOptions:_,maskTextFn:b,maskInputFn:y,slimDOMOptions:S,dataURLOptions:w,inlineImages:T,recordCanvas:C,preserveWhiteSpace:O,onSerialize:x,onIframeLoad:F,iframeLoadTimeout:D,keepIframeSrcFn:k});n&&F(e,n)}}),D),R}function j(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}var G,z,H,q,V,$;function K(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}!function(e){e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin"}(G||(G={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration"}(z||(z={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel"}(H||(H={})),function(e){e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2"}(q||(q={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange"}(V||(V={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back"}($||($={}));const W="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let Y={map:{},getId:()=>(console.error(W),-1),getNode:()=>(console.error(W),null),removeNodeFromMap(){console.error(W)},has:()=>(console.error(W),!1),reset(){console.error(W)}};function Q(e,t,n={}){let r=null,i=0;return function(o){let a=Date.now();i||!1!==n.leading||(i=a);let s=t-(a-i),l=this,c=arguments;s<=0||s>t?(r&&(clearTimeout(r),r=null),i=a,e.apply(l,c)):r||!1===n.trailing||(r=setTimeout((()=>{i=!1===n.leading?0:Date.now(),r=null,e.apply(l,c)}),s))}}function X(e,t,n,r,i=window){const o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(e){setTimeout((()=>{n.set.call(this,e)}),0),o&&o.set&&o.set.call(this,e)}}),()=>X(e,t,o||{},!0)}function Z(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],i=n(r);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch(e){return()=>{}}}function J(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ee(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function te(e,t,n,r){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){let i=!1;const o=r&&e.matches(r);return"string"==typeof t?i=void 0!==e.closest?!o&&null!==e.closest("."+t):!o&&e.classList.contains(t):!o&&e.classList.forEach((e=>{t.test(e)&&(i=!0)})),!i&&n&&(i=e.matches(n)),!o&&i||te(e.parentNode,t,n,r)}return e.nodeType,e.TEXT_NODE,te(e.parentNode,t,n,r)}function ne(e){return"__sn"in e&&e.__sn.id===E}function re(e,t){if(g(e))return!1;const n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||re(e.parentNode,t))}function ie(e){return Boolean(e.changedTouches)}function oe(e){return"__sn"in e&&(e.__sn.type===m.Element&&"iframe"===e.__sn.tagName)}function ae(e){return Boolean(null==e?void 0:e.shadowRoot)}function se(e){return"__ln"in e}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Y=new Proxy(Y,{get:(e,t,n)=>("map"===t&&console.error(W),Reflect.get(e,t,n))}));class le{constructor(){this.length=0,this.head=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&se(e.previousSibling)){const n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&se(e.nextSibling)&&e.nextSibling.__ln.previous){const n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next&&(t.next.previous=t.previous)):(this.head=t.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)}}const ce=(e,t)=>`${e}@${t}`;function ue(e){return"__sn"in e}class de{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],t=new le,n=e=>{let t=e,n=E;for(;n===E;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},r=r=>{var i,o,a,s,l;const c=r.getRootNode?null===(i=r.getRootNode())||void 0===i?void 0:i.host:null;let u=c;for(;null===(a=null===(o=null==u?void 0:u.getRootNode)||void 0===o?void 0:o.call(u))||void 0===a?void 0:a.host;)u=(null===(l=null===(s=null==u?void 0:u.getRootNode)||void 0===s?void 0:s.call(u))||void 0===l?void 0:l.host)||null;const d=!(this.doc.contains(r)||u&&this.doc.contains(u));if(!r.parentNode||d)return;const h=g(r.parentNode)?this.mirror.getId(c):this.mirror.getId(r.parentNode),p=n(r);if(-1===h||-1===p)return t.addNode(r);let m=U(r,{doc:this.doc,map:this.mirror.map,blockClass:this.blockClass,blockSelector:this.blockSelector,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,maskInputSelector:this.maskInputSelector,unmaskInputSelector:this.unmaskInputSelector,skipChild:!0,inlineStylesheet:this.inlineStylesheet,maskAllText:this.maskAllText,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{oe(e)&&this.iframeManager.addIframe(e),ae(r)&&this.shadowDomManager.addShadowRoot(r.shadowRoot,document)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)}});m&&e.push({parentId:h,nextId:p,node:m})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)pe(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||r(e);for(const e of this.addedSet)me(this.droppedSet,e)||pe(this.removes,e,this.mirror)?me(this.movedSet,e)?r(e):this.droppedSet.add(e):r(e);let i=null;for(;t.length;){let e=null;if(i){const t=this.mirror.getId(i.value.parentNode),r=n(i.value);-1!==t&&-1!==r&&(e=i)}if(!e)for(let r=t.length-1;r>=0;r--){const i=t.get(r);if(i){const t=this.mirror.getId(i.value.parentNode),r=n(i.value);if(-1!==t&&-1!==r){e=i;break}}}if(!e){for(;t.head;)t.removeNode(t.head.value);break}i=e.previous,t.removeNode(e.value),r(e.value)}const o={texts:this.texts.map((e=>({id:this.mirror.getId(e.node),value:e.value}))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>({id:this.mirror.getId(e.node),attributes:e.attributes}))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};(o.texts.length||o.attributes.length||o.removes.length||o.adds.length)&&(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(o))},this.processMutation=e=>{if(!ne(e.target))switch(e.type){case"characterData":{const t=e.target.textContent;te(e.target,this.blockClass,this.blockSelector,this.unblockSelector)||t===e.oldValue||this.texts.push({value:P(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=e.target.getAttribute(e.attributeName);if("value"===e.attributeName&&(n=_({input:t,maskInputSelector:this.maskInputSelector,unmaskInputSelector:this.unmaskInputSelector,maskInputOptions:this.maskInputOptions,tagName:e.target.tagName,type:e.target.getAttribute("type"),value:n,maskInputFn:this.maskInputFn})),te(e.target,this.blockClass,this.blockSelector,this.unblockSelector)||n===e.oldValue)return;let r=this.attributes.find((t=>t.node===e.target));if(r||(r={node:e.target,attributes:{}},this.attributes.push(r)),"style"===e.attributeName){const n=this.doc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue),void 0!==r.attributes.style&&null!==r.attributes.style||(r.attributes.style={});try{const e=r.attributes.style;for(const r of Array.from(t.style)){const i=t.style.getPropertyValue(r),o=t.style.getPropertyPriority(r);i===n.style.getPropertyValue(r)&&o===n.style.getPropertyPriority(r)||(e[r]=""===o?i:[i,o])}for(const r of Array.from(n.style))""===t.style.getPropertyValue(r)&&(e[r]=!1)}catch(e){console.warn("[rrweb] Error when parsing update to style attribute:",e)}}else r.attributes[e.attributeName]=M(this.doc,e.target.tagName,e.attributeName,n,this.maskAllText,this.maskTextFn);break}case"childList":e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{const n=this.mirror.getId(t),r=g(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);te(e.target,this.blockClass,this.blockSelector,this.unblockSelector)||ne(t)||(this.addedSet.has(t)?(he(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||re(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[ce(n,r)]?he(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!!g(e.target)||void 0})),this.mapRemoves.push(t))}))}},this.genAdds=(e,t)=>{if(!t||!te(t,this.blockClass,this.blockSelector,this.unblockSelector)){if(ue(e)){if(ne(e))return;this.movedSet.add(e);let n=null;t&&ue(t)&&(n=t.__sn.id),n&&(this.movedMap[ce(e.__sn.id,n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);te(e,this.blockClass,this.blockSelector,this.unblockSelector)||e.childNodes.forEach((e=>this.genAdds(e)))}}}init(e){["mutationCb","blockClass","blockSelector","unblockSelector","maskTextClass","maskTextSelector","unmaskTextSelector","maskInputSelector","unmaskInputSelector","inlineStylesheet","maskAllText","maskInputOptions","maskTextFn","maskInputFn","recordCanvas","inlineImages","slimDOMOptions","doc","mirror","iframeManager","shadowDomManager","canvasManager"].forEach((t=>{this[t]=e[t]}))}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function he(e,t){e.delete(t),t.childNodes.forEach((t=>he(e,t)))}function pe(e,t,n){const{parentNode:r}=t;if(!r)return!1;const i=n.getId(r);return!!e.some((e=>e.id===i))||pe(e,r,n)}function me(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||me(e,n))}const ge=e=>(...t)=>{try{return e(...t)}catch(e){try{e.__rrweb__=!0}catch(e){}throw e}},fe=[];function _e(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(e){}return e&&e.target}function be(e,t){var n,r;const i=new de;fe.push(i),i.init(e);let o=window.MutationObserver||window.__rrMutationObserver;const a=null===(r=null===(n=null===window||void 0===window?void 0:window.Zone)||void 0===n?void 0:n.__symbol__)||void 0===r?void 0:r.call(n,"MutationObserver");a&&window[a]&&(o=window[a]);const s=new o(ge(i.processMutations.bind(i)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function ve({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,sampling:a}){if(!1===a.mouseInteraction)return()=>{};const s=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,l=[];return Object.keys(H).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==s[e])).forEach((a=>{const s=a.toLowerCase(),c=ge((t=>a=>{const s=_e(a);if(te(s,r,i,o))return;const l=ie(a)?a.changedTouches[0]:a;if(!l)return;const c=n.getId(s),{clientX:u,clientY:d}=l;ge(e)({type:H[t],id:c,x:u,y:d})})(a));l.push(K(s,c,t))})),ge((()=>{l.forEach((e=>e()))}))}function ye({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,sampling:a}){const s=Q((a=>{const s=_e(a);if(!s||te(s,r,i,o))return;const l=n.getId(s);if(s===t){const n=t.scrollingElement||t.documentElement;ge(e)({id:l,x:n.scrollLeft,y:n.scrollTop})}else ge(e)({id:l,x:s.scrollLeft,y:s.scrollTop})}),a.scroll||100);return K("scroll",ge(s),t)}function Ee(e,t){const n=Object.assign({},e);return t||delete n.userTriggered,n}const Se=["INPUT","TEXTAREA","SELECT"],we=new WeakMap;function Te({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,ignoreClass:a,ignoreSelector:s,maskInputSelector:l,unmaskInputSelector:c,maskInputOptions:u,maskInputFn:d,sampling:h,userTriggeredOnInput:p}){function m(e){let n=_e(e);const h=e.isTrusted;if(n&&"OPTION"===n.tagName&&(n=n.parentElement),!n||!n.tagName||Se.indexOf(n.tagName)<0||te(n,r,i,o))return;const m=n.type;if(n.classList.contains(a)||s&&n.matches(s))return;let b=n.value,v=!1;"radio"===m||"checkbox"===m?v=n.checked:function({tagName:e,type:t,maskInputOptions:n,maskInputSelector:r}){return r||f({maskInputOptions:n,tagName:e,type:t})}({maskInputOptions:u,maskInputSelector:l,tagName:n.tagName,type:m})&&(b=_({input:n,maskInputOptions:u,maskInputSelector:l,unmaskInputSelector:c,tagName:n.tagName,type:m,value:b,maskInputFn:d})),g(n,ge(Ee)({text:b,isChecked:v,userTriggered:h},p));const y=n.name;"radio"===m&&y&&v&&t.querySelectorAll(`input[type="radio"][name="${y}"]`).forEach((e=>{e!==n&&g(e,ge(Ee)({text:e.value,isChecked:!v,userTriggered:!1},p))}))}function g(t,r){const i=we.get(t);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){we.set(t,r);const i=n.getId(t);e(Object.assign(Object.assign({},r),{id:i}))}}const b=("last"===h.input?["change"]:["input","change"]).map((e=>K(e,ge(m),t))),v=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),y=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"],[HTMLOptionElement.prototype,"selected"]];return v&&v.set&&b.push(...y.map((e=>X(e[0],e[1],{set(){ge(m)({target:this})}})))),ge((()=>{b.forEach((e=>e()))}))}function Ce(e){return function(e,t){if(Fe("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||Fe("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||Fe("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||Fe("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else{const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function xe(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};!function(e,t){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:a,inputCb:s,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:d,fontCb:h}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),n(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),r(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),i(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),o(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),a(...e)},e.inputCb=(...e)=>{t.input&&t.input(...e),s(...e)},e.mediaInteractionCb=(...e)=>{t.mediaInteaction&&t.mediaInteaction(...e),l(...e)},e.styleSheetRuleCb=(...e)=>{t.styleSheetRule&&t.styleSheetRule(...e),c(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),u(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),d(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),h(...e)}}(e,t);const r=be(e,e.doc),i=function({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(!1===t.mousemove)return()=>{};const i="number"==typeof t.mousemove?t.mousemove:50,o="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let a,s=[];const l=Q((t=>{const n=Date.now()-a;ge(e)(s.map((e=>(e.timeOffset-=n,e))),t),s=[],a=null}),o),c=Q((e=>{const t=_e(e),{clientX:n,clientY:i}=ie(e)?e.changedTouches[0]:e;a||(a=Date.now()),s.push({x:n,y:i,id:r.getId(t),timeOffset:Date.now()-a}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?z.Drag:e instanceof MouseEvent?z.MouseMove:z.TouchMove)}),i,{trailing:!1}),u=[K("mousemove",ge(c),n),K("touchmove",ge(c),n),K("drag",ge(c),n)];return ge((()=>{u.forEach((e=>e()))}))}(e),o=ve(e),a=ye(e),s=function({viewportResizeCb:e}){let t=-1,n=-1;const r=Q((()=>{const r=J(),i=ee();t===r&&n===i||(ge(e)({width:Number(i),height:Number(r)}),t=r,n=i)}),200);return K("resize",ge(r),window)}(e),l=Te(e),c=function({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:i,sampling:o}){const a=a=>Q(ge((o=>{const s=_e(o);if(!s||te(s,t,n,r))return;const{currentTime:l,volume:c,muted:u}=s;e({type:a,id:i.getId(s),currentTime:l,volume:c,muted:u})})),o.media||500),s=[K("play",a(0)),K("pause",a(1)),K("seeked",a(2)),K("volumechange",a(3))];return ge((()=>{s.forEach((e=>e()))}))}(e),u=function({styleSheetRuleCb:e,mirror:t},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};const r=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(r,{apply:ge(((n,r,i)=>{const[o,a]=i,s=t.getId(r.ownerNode);return-1!==s&&e({id:s,adds:[{rule:o,index:a}]}),n.apply(r,i)}))});const i=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:ge(((n,r,i)=>{const[o]=i,a=t.getId(r.ownerNode);return-1!==a&&e({id:a,removes:[{index:o}]}),n.apply(r,i)}))});const o={};De("CSSGroupingRule")?o.CSSGroupingRule=n.CSSGroupingRule:(De("CSSMediaRule")&&(o.CSSMediaRule=n.CSSMediaRule),De("CSSConditionRule")&&(o.CSSConditionRule=n.CSSConditionRule),De("CSSSupportsRule")&&(o.CSSSupportsRule=n.CSSSupportsRule));const a={};return Object.entries(o).forEach((([n,r])=>{a[n]={insertRule:r.prototype.insertRule,deleteRule:r.prototype.deleteRule},r.prototype.insertRule=new Proxy(a[n].insertRule,{apply:ge(((n,r,i)=>{const[o,a]=i,s=t.getId(r.parentStyleSheet.ownerNode);return-1!==s&&e({id:s,adds:[{rule:o,index:[...Ce(r),a||0]}]}),n.apply(r,i)}))}),r.prototype.deleteRule=new Proxy(a[n].deleteRule,{apply:ge(((n,r,i)=>{const[o]=i,a=t.getId(r.parentStyleSheet.ownerNode);return-1!==a&&e({id:a,removes:[{index:[...Ce(r),o]}]}),n.apply(r,i)}))})})),ge((()=>{n.CSSStyleSheet.prototype.insertRule=r,n.CSSStyleSheet.prototype.deleteRule=i,Object.entries(o).forEach((([e,t])=>{t.prototype.insertRule=a[e].insertRule,t.prototype.deleteRule=a[e].deleteRule}))}))}(e,{win:n}),d=function({styleDeclarationCb:e,mirror:t},{win:n}){const r=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(r,{apply:ge(((n,r,i)=>{var o,a;const[s,l,c]=i,u=t.getId(null===(a=null===(o=r.parentRule)||void 0===o?void 0:o.parentStyleSheet)||void 0===a?void 0:a.ownerNode);return-1!==u&&e({id:u,set:{property:s,value:l,priority:c},index:Ce(r.parentRule)}),n.apply(r,i)}))});const i=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:ge(((n,r,i)=>{var o,a;const[s]=i,l=t.getId(null===(a=null===(o=r.parentRule)||void 0===o?void 0:o.parentStyleSheet)||void 0===a?void 0:a.ownerNode);return-1!==l&&e({id:l,remove:{property:s},index:Ce(r.parentRule)}),n.apply(r,i)}))}),ge((()=>{n.CSSStyleDeclaration.prototype.setProperty=r,n.CSSStyleDeclaration.prototype.removeProperty=i}))}(e,{win:n}),h=e.collectFonts?function({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],i=new WeakMap,o=n.FontFace;n.FontFace=function(e,t,n){const r=new o(e,t,n);return i.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const a=Z(t.fonts,"add",(function(t){return function(n){return setTimeout((()=>{const t=i.get(n);t&&(e(t),i.delete(n))}),0),t.apply(this,[n])}}));return r.push((()=>{n.FontFace=o})),r.push(a),ge((()=>{r.forEach((e=>e()))}))}(e):()=>{},p=[];for(const t of e.plugins)p.push(t.observer(t.callback,n,t.options));return ge((()=>{fe.forEach((e=>e.reset())),r.disconnect(),i(),o(),a(),s(),l(),c();try{u(),d()}catch(e){}h(),p.forEach((e=>e()))}))}function Fe(e){return void 0!==window[e]}function De(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class ke{constructor(e){this.iframes=new WeakMap,this.mutationCb=e.mutationCb}addIframe(e){this.iframes.set(e,!0)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var n;this.mutationCb({adds:[{parentId:e.__sn.id,nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,e)}}class Oe{constructor(e){this.restorePatches=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror;const t=this;this.restorePatches.push(Z(HTMLElement.prototype,"attachShadow",(function(e){return function(){const n=e.apply(this,arguments);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,this.ownerDocument),n}})))}addShadowRoot(e,t){be(Object.assign(Object.assign({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),ye(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))}observeAttachShadow(e){if(e.contentWindow){const t=this;this.restorePatches.push(Z(e.contentWindow.HTMLElement.prototype,"attachShadow",(function(n){return function(){const r=n.apply(this,arguments);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,e.contentDocument),r}})))}}reset(){this.restorePatches.forEach((e=>e()))}}for(var Ie="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ae="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Re=0;Re<Ie.length;Re++)Ae[Ie.charCodeAt(Re)]=Re;var Ne=function(e){var t,n=new Uint8Array(e),r=n.length,i="";for(t=0;t<r;t+=3)i+=Ie[n[t]>>2],i+=Ie[(3&n[t])<<4|n[t+1]>>4],i+=Ie[(15&n[t+1])<<2|n[t+2]>>6],i+=Ie[63&n[t+2]];return r%3==2?i=i.substring(0,i.length-1)+"=":r%3==1&&(i=i.substring(0,i.length-2)+"=="),i};const Me=new Map;const Pe=(e,t,n)=>{if(!e||!Ue(e,t)&&"object"!=typeof e)return;const r=function(e,t){let n=Me.get(e);return n||(n=new Map,Me.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name);let i=r.indexOf(e);return-1===i&&(i=r.length,r.push(e)),i};function Le(e,t,n){if(e instanceof Array)return e.map((e=>Le(e,t,n)));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray){return{rr_type:e.constructor.name,args:[Object.values(e)]}}if(e instanceof ArrayBuffer){return{rr_type:e.constructor.name,base64:Ne(e)}}if(e instanceof DataView){return{rr_type:e.constructor.name,args:[Le(e.buffer,t,n),e.byteOffset,e.byteLength]}}if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:n}=e;return{rr_type:t,src:n}}if(e instanceof ImageData){return{rr_type:e.constructor.name,args:[Le(e.data,t,n),e.width,e.height]}}if(Ue(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:Pe(e,t,n)}}return e}const Be=(e,t,n)=>[...e].map((e=>Le(e,t,n))),Ue=(e,t)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((e=>"function"==typeof t[e]));return Boolean(n.find((n=>e instanceof t[n])))};function je(e,t,n,r,i,o,a,s){const l=[],c=Object.getOwnPropertyNames(e);for(const u of c)try{if("function"!=typeof e[u])continue;const c=Z(e,u,(function(l){return function(...c){const d=l.apply(this,c);if(Pe(d,s,e),!te(this.canvas,r,o,i)){a.getId(this.canvas);const r=Be([...c],s,e),i={type:t,property:u,args:r};n(this.canvas,i)}return d}}));l.push(c)}catch(r){const i=X(e,u,{set(e){n(this.canvas,{type:t,property:u,args:[e],setter:!0})}});l.push(i)}return l}class Ge{reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(e,t){!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)},this.mutationCb=e.mutationCb,this.mirror=e.mirror,!0===e.recordCanvas&&this.initCanvasMutationObserver(e.win,e.blockClass,e.blockSelector,e.unblockSelector)}initCanvasMutationObserver(e,t,n,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=function(e,t,n,r){const i=[];try{const o=Z(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(i,...o){return te(this,t,n,r)||"__context"in this||(this.__context=i),e.apply(this,[i,...o])}}));i.push(o)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach((e=>e()))}}(e,t,r,n),o=function(e,t,n,r,i,o){const a=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const o of s)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[o])continue;const s=Z(t.CanvasRenderingContext2D.prototype,o,(function(t){return function(...a){return te(this.canvas,n,i,r)||setTimeout((()=>{const t=[...a];if("drawImage"===o&&t[0]&&t[0]instanceof HTMLCanvasElement){const e=t[0],n=e.getContext("2d");let r=null==n?void 0:n.getImageData(0,0,e.width,e.height),i=null==r?void 0:r.data;t[0]=JSON.stringify(i)}e(this.canvas,{type:q["2D"],property:o,args:t})}),0),t.apply(this,a)}}));a.push(s)}catch(n){const r=X(t.CanvasRenderingContext2D.prototype,o,{set(t){e(this.canvas,{type:q["2D"],property:o,args:[t],setter:!0})}});a.push(r)}return()=>{a.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,r,n,this.mirror),a=function(e,t,n,r,i,o){const a=[];return a.push(...je(t.WebGLRenderingContext.prototype,q.WebGL,e,n,r,i,o,t)),void 0!==t.WebGL2RenderingContext&&a.push(...je(t.WebGL2RenderingContext.prototype,q.WebGL2,e,n,r,i,o,t)),()=>{a.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,r,n,this.mirror);this.resetObservers=()=>{i(),o(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((e,t)=>{const n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)})),requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(e);if(!n||-1===t)return;const r=n.map((e=>{const t=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["type"]);return t})),{type:i}=n[0];this.mutationCb({id:t,type:i,commands:r}),this.pendingCanvasMutations.delete(e)}}function ze(e){return Object.assign(Object.assign({},e),{timestamp:Date.now()})}let He,qe;const Ve={map:{},getId:e=>e&&e.__sn?e.__sn.id:-1,getNode(e){return this.map[e]||null},removeNodeFromMap(e){const t=e.__sn&&e.__sn.id;delete this.map[t],e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e)))},has(e){return this.map.hasOwnProperty(e)},reset(){this.map={}}};function $e(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:o=null,unblockSelector:a=null,ignoreClass:s="rr-ignore",ignoreSelector:l=null,maskTextClass:c="rr-mask",maskTextSelector:u=null,maskInputSelector:d=null,unmaskTextSelector:h=null,unmaskInputSelector:p=null,inlineStylesheet:m=!0,maskAllText:g=!1,maskAllInputs:f,maskInputOptions:_,slimDOMOptions:b,maskInputFn:v,maskTextFn:y,hooks:E,packFn:S,sampling:w={},mousemoveWait:T,recordCanvas:C=!1,userTriggeredOnInput:x=!1,collectFonts:F=!1,inlineImages:D=!1,plugins:k,keepIframeSrcFn:O=(()=>!1)}=e;if(!t)throw new Error("emit function is required");void 0!==T&&void 0===w.mousemove&&(w.mousemove=T);const I=!0===f?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==_?_:{password:!0},A=!0===b||"all"===b?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===b,headMetaDescKeywords:"all"===b}:b||{};let R;!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(e){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1})}();let N=0;He=(e,i)=>{var o;if(!(null===(o=fe[0])||void 0===o?void 0:o.isFrozen())||e.type===G.FullSnapshot||e.type===G.IncrementalSnapshot&&e.data.source===z.Mutation||fe.forEach((e=>e.unfreeze())),t((e=>{for(const t of k||[])t.eventProcessor&&(e=t.eventProcessor(e));return S&&(e=S(e)),e})(e),i),e.type===G.FullSnapshot)R=e,N=0;else if(e.type===G.IncrementalSnapshot){if(e.data.source===z.Mutation&&e.data.isAttachIframe)return;N++;const t=r&&N>=r,i=n&&e.timestamp-R.timestamp>n;(t||i)&&qe(!0)}};const M=e=>{He(ze({type:G.IncrementalSnapshot,data:Object.assign({source:z.Mutation},e)}))},P=e=>He(ze({type:G.IncrementalSnapshot,data:Object.assign({source:z.Scroll},e)})),L=e=>He(ze({type:G.IncrementalSnapshot,data:Object.assign({source:z.CanvasMutation},e)})),B=new ke({mutationCb:M}),j=new Ge({recordCanvas:C,mutationCb:L,win:window,blockClass:i,blockSelector:o,unblockSelector:a,mirror:Ve}),H=new Oe({mutationCb:M,scrollCb:P,bypassOptions:{blockClass:i,blockSelector:o,unblockSelector:a,maskTextClass:c,maskTextSelector:u,unmaskTextSelector:h,maskInputSelector:d,unmaskInputSelector:p,inlineStylesheet:m,maskAllText:g,maskInputOptions:I,maskTextFn:y,maskInputFn:v,recordCanvas:C,inlineImages:D,sampling:w,slimDOMOptions:A,iframeManager:B,canvasManager:j},mirror:Ve});qe=(e=!1)=>{var t,n,r,s;He(ze({type:G.Meta,data:{href:window.location.href,width:ee(),height:J()}}),e),fe.forEach((e=>e.lock()));const[l,f]=function(e,t){const{blockClass:n="rr-block",blockSelector:r=null,unblockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:a=null,unmaskTextSelector:s=null,inlineStylesheet:l=!0,inlineImages:c=!1,recordCanvas:u=!1,maskInputSelector:d=null,unmaskInputSelector:h=null,maskAllText:p=!1,maskAllInputs:m=!1,maskTextFn:g,maskInputFn:f,slimDOM:_=!1,dataURLOptions:b,preserveWhiteSpace:v,onSerialize:y,onIframeLoad:E,iframeLoadTimeout:S,keepIframeSrcFn:w=(()=>!1)}=t||{},T={};return[U(e,{doc:e,map:T,blockClass:n,blockSelector:r,unblockSelector:i,maskTextClass:o,maskTextSelector:a,unmaskTextSelector:s,skipChild:!1,inlineStylesheet:l,maskInputSelector:d,unmaskInputSelector:h,maskAllText:p,maskInputOptions:!0===m?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===m?{password:!0}:m,maskTextFn:g,maskInputFn:f,slimDOMOptions:!0===_||"all"===_?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===_,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===_?{}:_,dataURLOptions:b,inlineImages:c,recordCanvas:u,preserveWhiteSpace:v,onSerialize:y,onIframeLoad:E,iframeLoadTimeout:S,keepIframeSrcFn:w}),T]}(document,{blockClass:i,blockSelector:o,unblockSelector:a,maskTextClass:c,maskTextSelector:u,unmaskTextSelector:h,maskInputSelector:d,unmaskInputSelector:p,inlineStylesheet:m,maskAllText:g,maskAllInputs:I,maskTextFn:y,slimDOM:A,recordCanvas:C,inlineImages:D,onSerialize:e=>{oe(e)&&B.addIframe(e),ae(e)&&H.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{B.attachIframe(e,t),H.observeAttachShadow(e)},keepIframeSrcFn:O});if(!l)return console.warn("Failed to snapshot the document");Ve.map=f,He(ze({type:G.FullSnapshot,data:{node:l,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===document||void 0===document?void 0:document.documentElement.scrollLeft)||(null===(n=null===(t=null===document||void 0===document?void 0:document.body)||void 0===t?void 0:t.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===document||void 0===document?void 0:document.body.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===document||void 0===document?void 0:document.documentElement.scrollTop)||(null===(s=null===(r=null===document||void 0===document?void 0:document.body)||void 0===r?void 0:r.parentElement)||void 0===s?void 0:s.scrollTop)||(null===document||void 0===document?void 0:document.body.scrollTop)||0}}})),fe.forEach((e=>e.unlock()))};try{const e=[];e.push(K("DOMContentLoaded",(()=>{He(ze({type:G.DomContentLoaded,data:{}}))})));const t=e=>{var t;return ge(xe)({mutationCb:M,mousemoveCb:(e,t)=>He(ze({type:G.IncrementalSnapshot,data:{source:t,positions:e}})),mouseInteractionCb:e=>He(ze({type:G.IncrementalSnapshot,data:Object.assign({source:z.MouseInteraction},e)})),scrollCb:P,viewportResizeCb:e=>He(ze({type:G.IncrementalSnapshot,data:Object.assign({source:z.ViewportResize},e)})),inputCb:e=>He(ze({type:G.IncrementalSnapshot,data:Object.assign({source:z.Input},e)})),mediaInteractionCb:e=>He(ze({type:G.IncrementalSnapshot,data:Object.assign({source:z.MediaInteraction},e)})),styleSheetRuleCb:e=>He(ze({type:G.IncrementalSnapshot,data:Object.assign({source:z.StyleSheetRule},e)})),styleDeclarationCb:e=>He(ze({type:G.IncrementalSnapshot,data:Object.assign({source:z.StyleDeclaration},e)})),canvasMutationCb:L,fontCb:e=>He(ze({type:G.IncrementalSnapshot,data:Object.assign({source:z.Font},e)})),blockClass:i,ignoreClass:s,ignoreSelector:l,maskTextClass:c,maskTextSelector:u,unmaskTextSelector:h,maskInputSelector:d,unmaskInputSelector:p,maskInputOptions:I,inlineStylesheet:m,sampling:w,recordCanvas:C,inlineImages:D,userTriggeredOnInput:x,collectFonts:F,doc:e,maskAllText:g,maskInputFn:v,maskTextFn:y,blockSelector:o,unblockSelector:a,slimDOMOptions:A,mirror:Ve,iframeManager:B,shadowDomManager:H,canvasManager:j,plugins:(null===(t=null==k?void 0:k.filter((e=>e.observer)))||void 0===t?void 0:t.map((e=>({observer:e.observer,options:e.options,callback:t=>He(ze({type:G.Plugin,data:{plugin:e.name,payload:t}}))}))))||[]},E)};B.addLoadListener((n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}}));const n=()=>{qe(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():e.push(K("load",(()=>{He(ze({type:G.Load,data:{}})),n()}),window)),()=>{e.forEach((e=>e()))}}catch(e){console.warn(e)}}$e.addCustomEvent=(e,t)=>{if(!He)throw new Error("please add custom event after start recording");He(ze({type:G.Custom,data:{tag:e,payload:t}}))},$e.freezePage=()=>{fe.forEach((e=>e.freeze()))},$e.takeFullSnapshot=e=>{if(!qe)throw new Error("please take full snapshot after start recording");qe(e)},$e.mirror=Ve;const Ke=["name","type","startTime","transferSize","duration"];function We(e){return function(t){return Ke.every((n=>e[n]===t[n]))}}function Ye(e){const t=new PerformanceObserver((t=>{const n=function(e,t){const[n,r,i]=e.reduce(((e,t)=>("navigation"===t.entryType?e[0].push(t):"largest-contentful-paint"===t.entryType?e[1].push(t):e[2].push(t),e)),[[],[],[]]),o=[],a=[];let s=r.length?r[r.length-1]:void 0;return t.forEach((e=>{if("largest-contentful-paint"!==e.entryType)if("navigation"!==e.entryType)o.push(e);else{const t=e;e.duration>0&&!n.find(We(t))&&!a.find(We(t))&&a.push(t)}else(!s||s.startTime<e.startTime)&&(s=e)})),[...s?[s]:[],...n,...i,...o,...a].sort(((e,t)=>e.startTime-t.startTime))}(e.performanceEvents,t.getEntries());e.performanceEvents=n}));return["element","event","first-input","largest-contentful-paint","layout-shift","longtask","navigation","paint","resource"].forEach((e=>{try{t.observe({type:e,buffered:!0})}catch(e){}})),t}const Qe='/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */\nfunction t(t){let e=t.length;for(;--e>=0;)t[e]=0}const e=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),a=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),i=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),n=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=new Array(576);t(s);const r=new Array(60);t(r);const o=new Array(512);t(o);const l=new Array(256);t(l);const h=new Array(29);t(h);const d=new Array(30);function _(t,e,a,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}let f,c,u;function w(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}t(d);const m=t=>t<256?o[t]:o[256+(t>>>7)],b=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},g=(t,e,a)=>{t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,b(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},p=(t,e,a)=>{g(t,a[2*e],a[2*e+1])},k=(t,e)=>{let a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},v=(t,e,a)=>{const i=new Array(16);let n,s,r=0;for(n=1;n<=15;n++)r=r+a[n-1]<<1,i[n]=r;for(s=0;s<=e;s++){let e=t[2*s+1];0!==e&&(t[2*s]=k(i[e]++,e))}},y=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},x=t=>{t.bi_valid>8?b(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},z=(t,e,a,i)=>{const n=2*e,s=2*a;return t[n]<t[s]||t[n]===t[s]&&i[e]<=i[a]},A=(t,e,a)=>{const i=t.heap[a];let n=a<<1;for(;n<=t.heap_len&&(n<t.heap_len&&z(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!z(e,i,t.heap[n],t.depth));)t.heap[a]=t.heap[n],a=n,n<<=1;t.heap[a]=i},E=(t,i,n)=>{let s,r,o,_,f=0;if(0!==t.sym_next)do{s=255&t.pending_buf[t.sym_buf+f++],s+=(255&t.pending_buf[t.sym_buf+f++])<<8,r=t.pending_buf[t.sym_buf+f++],0===s?p(t,r,i):(o=l[r],p(t,o+256+1,i),_=e[o],0!==_&&(r-=h[o],g(t,r,_)),s--,o=m(s),p(t,o,n),_=a[o],0!==_&&(s-=d[o],g(t,s,_)))}while(f<t.sym_next);p(t,256,i)},R=(t,e)=>{const a=e.dyn_tree,i=e.stat_desc.static_tree,n=e.stat_desc.has_stree,s=e.stat_desc.elems;let r,o,l,h=-1;for(t.heap_len=0,t.heap_max=573,r=0;r<s;r++)0!==a[2*r]?(t.heap[++t.heap_len]=h=r,t.depth[r]=0):a[2*r+1]=0;for(;t.heap_len<2;)l=t.heap[++t.heap_len]=h<2?++h:0,a[2*l]=1,t.depth[l]=0,t.opt_len--,n&&(t.static_len-=i[2*l+1]);for(e.max_code=h,r=t.heap_len>>1;r>=1;r--)A(t,a,r);l=s;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],A(t,a,1),o=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=o,a[2*l]=a[2*r]+a[2*o],t.depth[l]=(t.depth[r]>=t.depth[o]?t.depth[r]:t.depth[o])+1,a[2*r+1]=a[2*o+1]=l,t.heap[1]=l++,A(t,a,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const a=e.dyn_tree,i=e.max_code,n=e.stat_desc.static_tree,s=e.stat_desc.has_stree,r=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,l=e.stat_desc.max_length;let h,d,_,f,c,u,w=0;for(f=0;f<=15;f++)t.bl_count[f]=0;for(a[2*t.heap[t.heap_max]+1]=0,h=t.heap_max+1;h<573;h++)d=t.heap[h],f=a[2*a[2*d+1]+1]+1,f>l&&(f=l,w++),a[2*d+1]=f,d>i||(t.bl_count[f]++,c=0,d>=o&&(c=r[d-o]),u=a[2*d],t.opt_len+=u*(f+c),s&&(t.static_len+=u*(n[2*d+1]+c)));if(0!==w){do{for(f=l-1;0===t.bl_count[f];)f--;t.bl_count[f]--,t.bl_count[f+1]+=2,t.bl_count[l]--,w-=2}while(w>0);for(f=l;0!==f;f--)for(d=t.bl_count[f];0!==d;)_=t.heap[--h],_>i||(a[2*_+1]!==f&&(t.opt_len+=(f-a[2*_+1])*a[2*_],a[2*_+1]=f),d--)}})(t,e),v(a,h,t.bl_count)},Z=(t,e,a)=>{let i,n,s=-1,r=e[1],o=0,l=7,h=4;for(0===r&&(l=138,h=3),e[2*(a+1)+1]=65535,i=0;i<=a;i++)n=r,r=e[2*(i+1)+1],++o<l&&n===r||(o<h?t.bl_tree[2*n]+=o:0!==n?(n!==s&&t.bl_tree[2*n]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=0,s=n,0===r?(l=138,h=3):n===r?(l=6,h=3):(l=7,h=4))},U=(t,e,a)=>{let i,n,s=-1,r=e[1],o=0,l=7,h=4;for(0===r&&(l=138,h=3),i=0;i<=a;i++)if(n=r,r=e[2*(i+1)+1],!(++o<l&&n===r)){if(o<h)do{p(t,n,t.bl_tree)}while(0!=--o);else 0!==n?(n!==s&&(p(t,n,t.bl_tree),o--),p(t,16,t.bl_tree),g(t,o-3,2)):o<=10?(p(t,17,t.bl_tree),g(t,o-3,3)):(p(t,18,t.bl_tree),g(t,o-11,7));o=0,s=n,0===r?(l=138,h=3):n===r?(l=6,h=3):(l=7,h=4)}};let S=!1;const D=(t,e,a,i)=>{g(t,0+(i?1:0),3),x(t),b(t,a),b(t,~a),a&&t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a};var T=(t,e,a,i)=>{let o,l,h=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),R(t,t.l_desc),R(t,t.d_desc),h=(t=>{let e;for(Z(t,t.dyn_ltree,t.l_desc.max_code),Z(t,t.dyn_dtree,t.d_desc.max_code),R(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*n[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),o=t.opt_len+3+7>>>3,l=t.static_len+3+7>>>3,l<=o&&(o=l)):o=l=a+5,a+4<=o&&-1!==e?D(t,e,a,i):4===t.strategy||l===o?(g(t,2+(i?1:0),3),E(t,s,r)):(g(t,4+(i?1:0),3),((t,e,a,i)=>{let s;for(g(t,e-257,5),g(t,a-1,5),g(t,i-4,4),s=0;s<i;s++)g(t,t.bl_tree[2*n[s]+1],3);U(t,t.dyn_ltree,e-1),U(t,t.dyn_dtree,a-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,h+1),E(t,t.dyn_ltree,t.dyn_dtree)),y(t),i&&x(t)},O={_tr_init:t=>{S||((()=>{let t,n,w,m,b;const g=new Array(16);for(w=0,m=0;m<28;m++)for(h[m]=w,t=0;t<1<<e[m];t++)l[w++]=m;for(l[w-1]=m,b=0,m=0;m<16;m++)for(d[m]=b,t=0;t<1<<a[m];t++)o[b++]=m;for(b>>=7;m<30;m++)for(d[m]=b<<7,t=0;t<1<<a[m]-7;t++)o[256+b++]=m;for(n=0;n<=15;n++)g[n]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,g[8]++;for(;t<=255;)s[2*t+1]=9,t++,g[9]++;for(;t<=279;)s[2*t+1]=7,t++,g[7]++;for(;t<=287;)s[2*t+1]=8,t++,g[8]++;for(v(s,287,g),t=0;t<30;t++)r[2*t+1]=5,r[2*t]=k(t,5);f=new _(s,e,257,286,15),c=new _(r,a,0,30,15),u=new _(new Array(0),i,0,19,7)})(),S=!0),t.l_desc=new w(t.dyn_ltree,f),t.d_desc=new w(t.dyn_dtree,c),t.bl_desc=new w(t.bl_tree,u),t.bi_buf=0,t.bi_valid=0,y(t)},_tr_stored_block:D,_tr_flush_block:T,_tr_tally:(t,e,a)=>(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=a,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(l[a]+256+1)]++,t.dyn_dtree[2*m(e)]++),t.sym_next===t.sym_end),_tr_align:t=>{g(t,2,3),p(t,256,s),(t=>{16===t.bi_valid?(b(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}};var F=(t,e,a,i)=>{let n=65535&t|0,s=t>>>16&65535|0,r=0;for(;0!==a;){r=a>2e3?2e3:a,a-=r;do{n=n+e[i++]|0,s=s+n|0}while(--r);n%=65521,s%=65521}return n|s<<16|0};const L=new Uint32Array((()=>{let t,e=[];for(var a=0;a<256;a++){t=a;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e})());var N=(t,e,a,i)=>{const n=L,s=i+a;t^=-1;for(let a=i;a<s;a++)t=t>>>8^n[255&(t^e[a])];return-1^t},I={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},B={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:C,_tr_stored_block:H,_tr_flush_block:M,_tr_tally:j,_tr_align:K}=O,{Z_NO_FLUSH:P,Z_PARTIAL_FLUSH:Y,Z_FULL_FLUSH:G,Z_FINISH:X,Z_BLOCK:W,Z_OK:q,Z_STREAM_END:J,Z_STREAM_ERROR:Q,Z_DATA_ERROR:V,Z_BUF_ERROR:$,Z_DEFAULT_COMPRESSION:tt,Z_FILTERED:et,Z_HUFFMAN_ONLY:at,Z_RLE:it,Z_FIXED:nt,Z_DEFAULT_STRATEGY:st,Z_UNKNOWN:rt,Z_DEFLATED:ot}=B,lt=(t,e)=>(t.msg=I[e],e),ht=t=>2*t-(t>4?9:0),dt=t=>{let e=t.length;for(;--e>=0;)t[e]=0},_t=t=>{let e,a,i,n=t.w_size;e=t.hash_size,i=e;do{a=t.head[--i],t.head[i]=a>=n?a-n:0}while(--e);e=n,i=e;do{a=t.prev[--i],t.prev[i]=a>=n?a-n:0}while(--e)};let ft=(t,e,a)=>(e<<t.hash_shift^a)&t.hash_mask;const ct=t=>{const e=t.state;let a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},ut=(t,e)=>{M(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,ct(t.strm)},wt=(t,e)=>{t.pending_buf[t.pending++]=e},mt=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},bt=(t,e,a,i)=>{let n=t.avail_in;return n>i&&(n=i),0===n?0:(t.avail_in-=n,e.set(t.input.subarray(t.next_in,t.next_in+n),a),1===t.state.wrap?t.adler=F(t.adler,e,n,a):2===t.state.wrap&&(t.adler=N(t.adler,e,n,a)),t.next_in+=n,t.total_in+=n,n)},gt=(t,e)=>{let a,i,n=t.max_chain_length,s=t.strstart,r=t.prev_length,o=t.nice_match;const l=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,h=t.window,d=t.w_mask,_=t.prev,f=t.strstart+258;let c=h[s+r-1],u=h[s+r];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do{if(a=e,h[a+r]===u&&h[a+r-1]===c&&h[a]===h[s]&&h[++a]===h[s+1]){s+=2,a++;do{}while(h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&s<f);if(i=258-(f-s),s=f-258,i>r){if(t.match_start=e,r=i,i>=o)break;c=h[s+r-1],u=h[s+r]}}}while((e=_[e&d])>l&&0!=--n);return r<=t.lookahead?r:t.lookahead},pt=t=>{const e=t.w_size;let a,i,n;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-262)&&(t.window.set(t.window.subarray(e,e+e-i),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),_t(t),i+=e),0===t.strm.avail_in)break;if(a=bt(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=a,t.lookahead+t.insert>=3)for(n=t.strstart-t.insert,t.ins_h=t.window[n],t.ins_h=ft(t,t.ins_h,t.window[n+1]);t.insert&&(t.ins_h=ft(t,t.ins_h,t.window[n+3-1]),t.prev[n&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=n,n++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)},kt=(t,e)=>{let a,i,n,s=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,r=0,o=t.strm.avail_in;do{if(a=65535,n=t.bi_valid+42>>3,t.strm.avail_out<n)break;if(n=t.strm.avail_out-n,i=t.strstart-t.block_start,a>i+t.strm.avail_in&&(a=i+t.strm.avail_in),a>n&&(a=n),a<s&&(0===a&&e!==X||e===P||a!==i+t.strm.avail_in))break;r=e===X&&a===i+t.strm.avail_in?1:0,H(t,0,0,r),t.pending_buf[t.pending-4]=a,t.pending_buf[t.pending-3]=a>>8,t.pending_buf[t.pending-2]=~a,t.pending_buf[t.pending-1]=~a>>8,ct(t.strm),i&&(i>a&&(i=a),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+i),t.strm.next_out),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i,t.block_start+=i,a-=i),a&&(bt(t.strm,t.strm.output,t.strm.next_out,a),t.strm.next_out+=a,t.strm.avail_out-=a,t.strm.total_out+=a)}while(0===r);return o-=t.strm.avail_in,o&&(o>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=o&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-o,t.strm.next_in),t.strstart),t.strstart+=o,t.insert+=o>t.w_size-t.insert?t.w_size-t.insert:o),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),r?4:e!==P&&e!==X&&0===t.strm.avail_in&&t.strstart===t.block_start?2:(n=t.window_size-t.strstart,t.strm.avail_in>n&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,n+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),n>t.strm.avail_in&&(n=t.strm.avail_in),n&&(bt(t.strm,t.window,t.strstart,n),t.strstart+=n,t.insert+=n>t.w_size-t.insert?t.w_size-t.insert:n),t.high_water<t.strstart&&(t.high_water=t.strstart),n=t.bi_valid+42>>3,n=t.pending_buf_size-n>65535?65535:t.pending_buf_size-n,s=n>t.w_size?t.w_size:n,i=t.strstart-t.block_start,(i>=s||(i||e===X)&&e!==P&&0===t.strm.avail_in&&i<=n)&&(a=i>n?n:i,r=e===X&&0===t.strm.avail_in&&a===i?1:0,H(t,t.block_start,a,r),t.block_start+=a,ct(t.strm)),r?3:1)},vt=(t,e)=>{let a,i;for(;;){if(t.lookahead<262){if(pt(t),t.lookahead<262&&e===P)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-262&&(t.match_length=gt(t,a)),t.match_length>=3)if(i=j(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=ft(t,t.ins_h,t.window[t.strstart+1]);else i=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2},yt=(t,e)=>{let a,i,n;for(;;){if(t.lookahead<262){if(pt(t),t.lookahead<262&&e===P)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-262&&(t.match_length=gt(t,a),t.match_length<=5&&(t.strategy===et||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-3,i=j(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=n&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,i&&(ut(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(i=j(t,0,t.window[t.strstart-1]),i&&ut(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=j(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2};function xt(t,e,a,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=i,this.func=n}const zt=[new xt(0,0,0,0,kt),new xt(4,4,8,4,vt),new xt(4,5,16,8,vt),new xt(4,6,32,32,vt),new xt(4,4,16,16,yt),new xt(8,16,32,32,yt),new xt(8,16,128,128,yt),new xt(8,32,128,256,yt),new xt(32,128,258,1024,yt),new xt(32,258,258,4096,yt)];function At(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ot,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),dt(this.dyn_ltree),dt(this.dyn_dtree),dt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),dt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),dt(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Et=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||42!==e.status&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&113!==e.status&&666!==e.status?1:0},Rt=t=>{if(Et(t))return lt(t,Q);t.total_in=t.total_out=0,t.data_type=rt;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=-2,C(e),q},Zt=t=>{const e=Rt(t);var a;return e===q&&((a=t.state).window_size=2*a.w_size,dt(a.head),a.max_lazy_match=zt[a.level].max_lazy,a.good_match=zt[a.level].good_length,a.nice_match=zt[a.level].nice_length,a.max_chain_length=zt[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=2,a.match_available=0,a.ins_h=0),e},Ut=(t,e,a,i,n,s)=>{if(!t)return Q;let r=1;if(e===tt&&(e=6),i<0?(r=0,i=-i):i>15&&(r=2,i-=16),n<1||n>9||a!==ot||i<8||i>15||e<0||e>9||s<0||s>nt||8===i&&1!==r)return lt(t,Q);8===i&&(i=9);const o=new At;return t.state=o,o.strm=t,o.status=42,o.wrap=r,o.gzhead=null,o.w_bits=i,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=n+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+3-1)/3),o.window=new Uint8Array(2*o.w_size),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<n+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=3*(o.lit_bufsize-1),o.level=e,o.strategy=s,o.method=a,Zt(t)};var St={deflateInit:(t,e)=>Ut(t,e,ot,15,8,st),deflateInit2:Ut,deflateReset:Zt,deflateResetKeep:Rt,deflateSetHeader:(t,e)=>Et(t)||2!==t.state.wrap?Q:(t.state.gzhead=e,q),deflate:(t,e)=>{if(Et(t)||e>W||e<0)return t?lt(t,Q):Q;const a=t.state;if(!t.output||0!==t.avail_in&&!t.input||666===a.status&&e!==X)return lt(t,0===t.avail_out?$:Q);const i=a.last_flush;if(a.last_flush=e,0!==a.pending){if(ct(t),0===t.avail_out)return a.last_flush=-1,q}else if(0===t.avail_in&&ht(e)<=ht(i)&&e!==X)return lt(t,$);if(666===a.status&&0!==t.avail_in)return lt(t,$);if(42===a.status&&0===a.wrap&&(a.status=113),42===a.status){let e=ot+(a.w_bits-8<<4)<<8,i=-1;if(i=a.strategy>=at||a.level<2?0:a.level<6?1:6===a.level?2:3,e|=i<<6,0!==a.strstart&&(e|=32),e+=31-e%31,mt(a,e),0!==a.strstart&&(mt(a,t.adler>>>16),mt(a,65535&t.adler)),t.adler=1,a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q}if(57===a.status)if(t.adler=0,wt(a,31),wt(a,139),wt(a,8),a.gzhead)wt(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),wt(a,255&a.gzhead.time),wt(a,a.gzhead.time>>8&255),wt(a,a.gzhead.time>>16&255),wt(a,a.gzhead.time>>24&255),wt(a,9===a.level?2:a.strategy>=at||a.level<2?4:0),wt(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(wt(a,255&a.gzhead.extra.length),wt(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(t.adler=N(t.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69;else if(wt(a,0),wt(a,0),wt(a,0),wt(a,0),wt(a,0),wt(a,9===a.level?2:a.strategy>=at||a.level<2?4:0),wt(a,3),a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q;if(69===a.status){if(a.gzhead.extra){let e=a.pending,i=(65535&a.gzhead.extra.length)-a.gzindex;for(;a.pending+i>a.pending_buf_size;){let n=a.pending_buf_size-a.pending;if(a.pending_buf.set(a.gzhead.extra.subarray(a.gzindex,a.gzindex+n),a.pending),a.pending=a.pending_buf_size,a.gzhead.hcrc&&a.pending>e&&(t.adler=N(t.adler,a.pending_buf,a.pending-e,e)),a.gzindex+=n,ct(t),0!==a.pending)return a.last_flush=-1,q;e=0,i-=n}let n=new Uint8Array(a.gzhead.extra);a.pending_buf.set(n.subarray(a.gzindex,a.gzindex+i),a.pending),a.pending+=i,a.gzhead.hcrc&&a.pending>e&&(t.adler=N(t.adler,a.pending_buf,a.pending-e,e)),a.gzindex=0}a.status=73}if(73===a.status){if(a.gzhead.name){let e,i=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),ct(t),0!==a.pending)return a.last_flush=-1,q;i=0}e=a.gzindex<a.gzhead.name.length?255&a.gzhead.name.charCodeAt(a.gzindex++):0,wt(a,e)}while(0!==e);a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),a.gzindex=0}a.status=91}if(91===a.status){if(a.gzhead.comment){let e,i=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),ct(t),0!==a.pending)return a.last_flush=-1,q;i=0}e=a.gzindex<a.gzhead.comment.length?255&a.gzhead.comment.charCodeAt(a.gzindex++):0,wt(a,e)}while(0!==e);a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i))}a.status=103}if(103===a.status){if(a.gzhead.hcrc){if(a.pending+2>a.pending_buf_size&&(ct(t),0!==a.pending))return a.last_flush=-1,q;wt(a,255&t.adler),wt(a,t.adler>>8&255),t.adler=0}if(a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q}if(0!==t.avail_in||0!==a.lookahead||e!==P&&666!==a.status){let i=0===a.level?kt(a,e):a.strategy===at?((t,e)=>{let a;for(;;){if(0===t.lookahead&&(pt(t),0===t.lookahead)){if(e===P)return 1;break}if(t.match_length=0,a=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2})(a,e):a.strategy===it?((t,e)=>{let a,i,n,s;const r=t.window;for(;;){if(t.lookahead<=258){if(pt(t),t.lookahead<=258&&e===P)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=t.strstart-1,i=r[n],i===r[++n]&&i===r[++n]&&i===r[++n])){s=t.strstart+258;do{}while(i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&n<s);t.match_length=258-(s-n),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=j(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2})(a,e):zt[a.level].func(a,e);if(3!==i&&4!==i||(a.status=666),1===i||3===i)return 0===t.avail_out&&(a.last_flush=-1),q;if(2===i&&(e===Y?K(a):e!==W&&(H(a,0,0,!1),e===G&&(dt(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),ct(t),0===t.avail_out))return a.last_flush=-1,q}return e!==X?q:a.wrap<=0?J:(2===a.wrap?(wt(a,255&t.adler),wt(a,t.adler>>8&255),wt(a,t.adler>>16&255),wt(a,t.adler>>24&255),wt(a,255&t.total_in),wt(a,t.total_in>>8&255),wt(a,t.total_in>>16&255),wt(a,t.total_in>>24&255)):(mt(a,t.adler>>>16),mt(a,65535&t.adler)),ct(t),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?q:J)},deflateEnd:t=>{if(Et(t))return Q;const e=t.state.status;return t.state=null,113===e?lt(t,V):q},deflateSetDictionary:(t,e)=>{let a=e.length;if(Et(t))return Q;const i=t.state,n=i.wrap;if(2===n||1===n&&42!==i.status||i.lookahead)return Q;if(1===n&&(t.adler=F(t.adler,e,a,0)),i.wrap=0,a>=i.w_size){0===n&&(dt(i.head),i.strstart=0,i.block_start=0,i.insert=0);let t=new Uint8Array(i.w_size);t.set(e.subarray(a-i.w_size,a),0),e=t,a=i.w_size}const s=t.avail_in,r=t.next_in,o=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,pt(i);i.lookahead>=3;){let t=i.strstart,e=i.lookahead-2;do{i.ins_h=ft(i,i.ins_h,i.window[t+3-1]),i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++}while(--e);i.strstart=t,i.lookahead=2,pt(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=r,t.input=o,t.avail_in=s,i.wrap=n,q},deflateInfo:"pako deflate (from Nodeca project)"};const Dt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var Tt=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const a=e.shift();if(a){if("object"!=typeof a)throw new TypeError(a+"must be non-object");for(const e in a)Dt(a,e)&&(t[e]=a[e])}}return t},Ot=t=>{let e=0;for(let a=0,i=t.length;a<i;a++)e+=t[a].length;const a=new Uint8Array(e);for(let e=0,i=0,n=t.length;e<n;e++){let n=t[e];a.set(n,i),i+=n.length}return a};let Ft=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){Ft=!1}const Lt=new Uint8Array(256);for(let t=0;t<256;t++)Lt[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Lt[254]=Lt[254]=1;var Nt=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,i,n,s,r=t.length,o=0;for(n=0;n<r;n++)a=t.charCodeAt(n),55296==(64512&a)&&n+1<r&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(a=65536+(a-55296<<10)+(i-56320),n++)),o+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(o),s=0,n=0;s<o;n++)a=t.charCodeAt(n),55296==(64512&a)&&n+1<r&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(a=65536+(a-55296<<10)+(i-56320),n++)),a<128?e[s++]=a:a<2048?(e[s++]=192|a>>>6,e[s++]=128|63&a):a<65536?(e[s++]=224|a>>>12,e[s++]=128|a>>>6&63,e[s++]=128|63&a):(e[s++]=240|a>>>18,e[s++]=128|a>>>12&63,e[s++]=128|a>>>6&63,e[s++]=128|63&a);return e},It=(t,e)=>{const a=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let i,n;const s=new Array(2*a);for(n=0,i=0;i<a;){let e=t[i++];if(e<128){s[n++]=e;continue}let r=Lt[e];if(r>4)s[n++]=65533,i+=r-1;else{for(e&=2===r?31:3===r?15:7;r>1&&i<a;)e=e<<6|63&t[i++],r--;r>1?s[n++]=65533:e<65536?s[n++]=e:(e-=65536,s[n++]=55296|e>>10&1023,s[n++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&Ft)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let a="";for(let i=0;i<e;i++)a+=String.fromCharCode(t[i]);return a})(s,n)},Bt=(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let a=e-1;for(;a>=0&&128==(192&t[a]);)a--;return a<0||0===a?e:a+Lt[t[a]]>e?a:e};var Ct=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Ht=Object.prototype.toString,{Z_NO_FLUSH:Mt,Z_SYNC_FLUSH:jt,Z_FULL_FLUSH:Kt,Z_FINISH:Pt,Z_OK:Yt,Z_STREAM_END:Gt,Z_DEFAULT_COMPRESSION:Xt,Z_DEFAULT_STRATEGY:Wt,Z_DEFLATED:qt}=B;function Jt(t){this.options=Tt({level:Xt,method:qt,chunkSize:16384,windowBits:15,memLevel:8,strategy:Wt},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ct,this.strm.avail_out=0;let a=St.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==Yt)throw new Error(I[a]);if(e.header&&St.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?Nt(e.dictionary):"[object ArrayBuffer]"===Ht.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,a=St.deflateSetDictionary(this.strm,t),a!==Yt)throw new Error(I[a]);this._dict_set=!0}}function Qt(t,e){const a=new Jt(e);if(a.push(t,!0),a.err)throw a.msg||I[a.err];return a.result}Jt.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize;let n,s;if(this.ended)return!1;for(s=e===~~e?e:!0===e?Pt:Mt,"string"==typeof t?a.input=Nt(t):"[object ArrayBuffer]"===Ht.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;)if(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),(s===jt||s===Kt)&&a.avail_out<=6)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else{if(n=St.deflate(a,s),n===Gt)return a.next_out>0&&this.onData(a.output.subarray(0,a.next_out)),n=St.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Yt;if(0!==a.avail_out){if(s>0&&a.next_out>0)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else if(0===a.avail_in)break}else this.onData(a.output)}return!0},Jt.prototype.onData=function(t){this.chunks.push(t)},Jt.prototype.onEnd=function(t){t===Yt&&(this.result=Ot(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Vt={Deflate:Jt,deflate:Qt,deflateRaw:function(t,e){return(e=e||{}).raw=!0,Qt(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,Qt(t,e)},constants:B};var $t=function(t,e){let a,i,n,s,r,o,l,h,d,_,f,c,u,w,m,b,g,p,k,v,y,x,z,A;const E=t.state;a=t.next_in,z=t.input,i=a+(t.avail_in-5),n=t.next_out,A=t.output,s=n-(e-t.avail_out),r=n+(t.avail_out-257),o=E.dmax,l=E.wsize,h=E.whave,d=E.wnext,_=E.window,f=E.hold,c=E.bits,u=E.lencode,w=E.distcode,m=(1<<E.lenbits)-1,b=(1<<E.distbits)-1;t:do{c<15&&(f+=z[a++]<<c,c+=8,f+=z[a++]<<c,c+=8),g=u[f&m];e:for(;;){if(p=g>>>24,f>>>=p,c-=p,p=g>>>16&255,0===p)A[n++]=65535&g;else{if(!(16&p)){if(0==(64&p)){g=u[(65535&g)+(f&(1<<p)-1)];continue e}if(32&p){E.mode=16191;break t}t.msg="invalid literal/length code",E.mode=16209;break t}k=65535&g,p&=15,p&&(c<p&&(f+=z[a++]<<c,c+=8),k+=f&(1<<p)-1,f>>>=p,c-=p),c<15&&(f+=z[a++]<<c,c+=8,f+=z[a++]<<c,c+=8),g=w[f&b];a:for(;;){if(p=g>>>24,f>>>=p,c-=p,p=g>>>16&255,!(16&p)){if(0==(64&p)){g=w[(65535&g)+(f&(1<<p)-1)];continue a}t.msg="invalid distance code",E.mode=16209;break t}if(v=65535&g,p&=15,c<p&&(f+=z[a++]<<c,c+=8,c<p&&(f+=z[a++]<<c,c+=8)),v+=f&(1<<p)-1,v>o){t.msg="invalid distance too far back",E.mode=16209;break t}if(f>>>=p,c-=p,p=n-s,v>p){if(p=v-p,p>h&&E.sane){t.msg="invalid distance too far back",E.mode=16209;break t}if(y=0,x=_,0===d){if(y+=l-p,p<k){k-=p;do{A[n++]=_[y++]}while(--p);y=n-v,x=A}}else if(d<p){if(y+=l+d-p,p-=d,p<k){k-=p;do{A[n++]=_[y++]}while(--p);if(y=0,d<k){p=d,k-=p;do{A[n++]=_[y++]}while(--p);y=n-v,x=A}}}else if(y+=d-p,p<k){k-=p;do{A[n++]=_[y++]}while(--p);y=n-v,x=A}for(;k>2;)A[n++]=x[y++],A[n++]=x[y++],A[n++]=x[y++],k-=3;k&&(A[n++]=x[y++],k>1&&(A[n++]=x[y++]))}else{y=n-v;do{A[n++]=A[y++],A[n++]=A[y++],A[n++]=A[y++],k-=3}while(k>2);k&&(A[n++]=A[y++],k>1&&(A[n++]=A[y++]))}break}}break}}while(a<i&&n<r);k=c>>3,a-=k,c-=k<<3,f&=(1<<c)-1,t.next_in=a,t.next_out=n,t.avail_in=a<i?i-a+5:5-(a-i),t.avail_out=n<r?r-n+257:257-(n-r),E.hold=f,E.bits=c};const te=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),ee=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),ae=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),ie=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var ne=(t,e,a,i,n,s,r,o)=>{const l=o.bits;let h,d,_,f,c,u,w=0,m=0,b=0,g=0,p=0,k=0,v=0,y=0,x=0,z=0,A=null;const E=new Uint16Array(16),R=new Uint16Array(16);let Z,U,S,D=null;for(w=0;w<=15;w++)E[w]=0;for(m=0;m<i;m++)E[e[a+m]]++;for(p=l,g=15;g>=1&&0===E[g];g--);if(p>g&&(p=g),0===g)return n[s++]=20971520,n[s++]=20971520,o.bits=1,0;for(b=1;b<g&&0===E[b];b++);for(p<b&&(p=b),y=1,w=1;w<=15;w++)if(y<<=1,y-=E[w],y<0)return-1;if(y>0&&(0===t||1!==g))return-1;for(R[1]=0,w=1;w<15;w++)R[w+1]=R[w]+E[w];for(m=0;m<i;m++)0!==e[a+m]&&(r[R[e[a+m]]++]=m);if(0===t?(A=D=r,u=20):1===t?(A=te,D=ee,u=257):(A=ae,D=ie,u=0),z=0,m=0,w=b,c=s,k=p,v=0,_=-1,x=1<<p,f=x-1,1===t&&x>852||2===t&&x>592)return 1;for(;;){Z=w-v,r[m]+1<u?(U=0,S=r[m]):r[m]>=u?(U=D[r[m]-u],S=A[r[m]-u]):(U=96,S=0),h=1<<w-v,d=1<<k,b=d;do{d-=h,n[c+(z>>v)+d]=Z<<24|U<<16|S|0}while(0!==d);for(h=1<<w-1;z&h;)h>>=1;if(0!==h?(z&=h-1,z+=h):z=0,m++,0==--E[w]){if(w===g)break;w=e[a+r[m]]}if(w>p&&(z&f)!==_){for(0===v&&(v=p),c+=b,k=w-v,y=1<<k;k+v<g&&(y-=E[k+v],!(y<=0));)k++,y<<=1;if(x+=1<<k,1===t&&x>852||2===t&&x>592)return 1;_=z&f,n[_]=p<<24|k<<16|c-s|0}}return 0!==z&&(n[c+z]=w-v<<24|64<<16|0),o.bits=p,0};const{Z_FINISH:se,Z_BLOCK:re,Z_TREES:oe,Z_OK:le,Z_STREAM_END:he,Z_NEED_DICT:de,Z_STREAM_ERROR:_e,Z_DATA_ERROR:fe,Z_MEM_ERROR:ce,Z_BUF_ERROR:ue,Z_DEFLATED:we}=B,me=16209,be=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function ge(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const pe=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<16180||e.mode>16211?1:0},ke=t=>{if(pe(t))return _e;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=16180,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,le},ve=t=>{if(pe(t))return _e;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,ke(t)},ye=(t,e)=>{let a;if(pe(t))return _e;const i=t.state;return e<0?(a=0,e=-e):(a=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?_e:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=a,i.wbits=e,ve(t))},xe=(t,e)=>{if(!t)return _e;const a=new ge;t.state=a,a.strm=t,a.window=null,a.mode=16180;const i=ye(t,e);return i!==le&&(t.state=null),i};let ze,Ae,Ee=!0;const Re=t=>{if(Ee){ze=new Int32Array(512),Ae=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(ne(1,t.lens,0,288,ze,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;ne(2,t.lens,0,32,Ae,0,t.work,{bits:5}),Ee=!1}t.lencode=ze,t.lenbits=9,t.distcode=Ae,t.distbits=5},Ze=(t,e,a,i)=>{let n;const s=t.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new Uint8Array(s.wsize)),i>=s.wsize?(s.window.set(e.subarray(a-s.wsize,a),0),s.wnext=0,s.whave=s.wsize):(n=s.wsize-s.wnext,n>i&&(n=i),s.window.set(e.subarray(a-i,a-i+n),s.wnext),(i-=n)?(s.window.set(e.subarray(a-i,a),0),s.wnext=i,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=n))),0};var Ue={inflateReset:ve,inflateReset2:ye,inflateResetKeep:ke,inflateInit:t=>xe(t,15),inflateInit2:xe,inflate:(t,e)=>{let a,i,n,s,r,o,l,h,d,_,f,c,u,w,m,b,g,p,k,v,y,x,z=0;const A=new Uint8Array(4);let E,R;const Z=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(pe(t)||!t.output||!t.input&&0!==t.avail_in)return _e;a=t.state,16191===a.mode&&(a.mode=16192),r=t.next_out,n=t.output,l=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,_=o,f=l,x=le;t:for(;;)switch(a.mode){case 16180:if(0===a.wrap){a.mode=16192;break}for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(2&a.wrap&&35615===h){0===a.wbits&&(a.wbits=15),a.check=0,A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0),h=0,d=0,a.mode=16181;break}if(a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",a.mode=me;break}if((15&h)!==we){t.msg="unknown compression method",a.mode=me;break}if(h>>>=4,d-=4,y=8+(15&h),0===a.wbits&&(a.wbits=y),y>15||y>a.wbits){t.msg="invalid window size",a.mode=me;break}a.dmax=1<<a.wbits,a.flags=0,t.adler=a.check=1,a.mode=512&h?16189:16191,h=0,d=0;break;case 16181:for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(a.flags=h,(255&a.flags)!==we){t.msg="unknown compression method",a.mode=me;break}if(57344&a.flags){t.msg="unknown header flags set",a.mode=me;break}a.head&&(a.head.text=h>>8&1),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0,a.mode=16182;case 16182:for(;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.head&&(a.head.time=h),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,A[2]=h>>>16&255,A[3]=h>>>24&255,a.check=N(a.check,A,4,0)),h=0,d=0,a.mode=16183;case 16183:for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.head&&(a.head.xflags=255&h,a.head.os=h>>8),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0,a.mode=16184;case 16184:if(1024&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.length=h,a.head&&(a.head.extra_len=h),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0}else a.head&&(a.head.extra=null);a.mode=16185;case 16185:if(1024&a.flags&&(c=a.length,c>o&&(c=o),c&&(a.head&&(y=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Uint8Array(a.head.extra_len)),a.head.extra.set(i.subarray(s,s+c),y)),512&a.flags&&4&a.wrap&&(a.check=N(a.check,i,c,s)),o-=c,s+=c,a.length-=c),a.length))break t;a.length=0,a.mode=16186;case 16186:if(2048&a.flags){if(0===o)break t;c=0;do{y=i[s+c++],a.head&&y&&a.length<65536&&(a.head.name+=String.fromCharCode(y))}while(y&&c<o);if(512&a.flags&&4&a.wrap&&(a.check=N(a.check,i,c,s)),o-=c,s+=c,y)break t}else a.head&&(a.head.name=null);a.length=0,a.mode=16187;case 16187:if(4096&a.flags){if(0===o)break t;c=0;do{y=i[s+c++],a.head&&y&&a.length<65536&&(a.head.comment+=String.fromCharCode(y))}while(y&&c<o);if(512&a.flags&&4&a.wrap&&(a.check=N(a.check,i,c,s)),o-=c,s+=c,y)break t}else a.head&&(a.head.comment=null);a.mode=16188;case 16188:if(512&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(4&a.wrap&&h!==(65535&a.check)){t.msg="header crc mismatch",a.mode=me;break}h=0,d=0}a.head&&(a.head.hcrc=a.flags>>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=16191;break;case 16189:for(;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}t.adler=a.check=be(h),h=0,d=0,a.mode=16190;case 16190:if(0===a.havedict)return t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,de;t.adler=a.check=1,a.mode=16191;case 16191:if(e===re||e===oe)break t;case 16192:if(a.last){h>>>=7&d,d-=7&d,a.mode=16206;break}for(;d<3;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}switch(a.last=1&h,h>>>=1,d-=1,3&h){case 0:a.mode=16193;break;case 1:if(Re(a),a.mode=16199,e===oe){h>>>=2,d-=2;break t}break;case 2:a.mode=16196;break;case 3:t.msg="invalid block type",a.mode=me}h>>>=2,d-=2;break;case 16193:for(h>>>=7&d,d-=7&d;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if((65535&h)!=(h>>>16^65535)){t.msg="invalid stored block lengths",a.mode=me;break}if(a.length=65535&h,h=0,d=0,a.mode=16194,e===oe)break t;case 16194:a.mode=16195;case 16195:if(c=a.length,c){if(c>o&&(c=o),c>l&&(c=l),0===c)break t;n.set(i.subarray(s,s+c),r),o-=c,s+=c,l-=c,r+=c,a.length-=c;break}a.mode=16191;break;case 16196:for(;d<14;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(a.nlen=257+(31&h),h>>>=5,d-=5,a.ndist=1+(31&h),h>>>=5,d-=5,a.ncode=4+(15&h),h>>>=4,d-=4,a.nlen>286||a.ndist>30){t.msg="too many length or distance symbols",a.mode=me;break}a.have=0,a.mode=16197;case 16197:for(;a.have<a.ncode;){for(;d<3;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.lens[Z[a.have++]]=7&h,h>>>=3,d-=3}for(;a.have<19;)a.lens[Z[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,E={bits:a.lenbits},x=ne(0,a.lens,0,19,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid code lengths set",a.mode=me;break}a.have=0,a.mode=16198;case 16198:for(;a.have<a.nlen+a.ndist;){for(;z=a.lencode[h&(1<<a.lenbits)-1],m=z>>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(g<16)h>>>=m,d-=m,a.lens[a.have++]=g;else{if(16===g){for(R=m+2;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(h>>>=m,d-=m,0===a.have){t.msg="invalid bit length repeat",a.mode=me;break}y=a.lens[a.have-1],c=3+(3&h),h>>>=2,d-=2}else if(17===g){for(R=m+3;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=m,d-=m,y=0,c=3+(7&h),h>>>=3,d-=3}else{for(R=m+7;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=m,d-=m,y=0,c=11+(127&h),h>>>=7,d-=7}if(a.have+c>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=me;break}for(;c--;)a.lens[a.have++]=y}}if(a.mode===me)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=me;break}if(a.lenbits=9,E={bits:a.lenbits},x=ne(1,a.lens,0,a.nlen,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid literal/lengths set",a.mode=me;break}if(a.distbits=6,a.distcode=a.distdyn,E={bits:a.distbits},x=ne(2,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,E),a.distbits=E.bits,x){t.msg="invalid distances set",a.mode=me;break}if(a.mode=16199,e===oe)break t;case 16199:a.mode=16200;case 16200:if(o>=6&&l>=258){t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,$t(t,f),r=t.next_out,n=t.output,l=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,16191===a.mode&&(a.back=-1);break}for(a.back=0;z=a.lencode[h&(1<<a.lenbits)-1],m=z>>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(b&&0==(240&b)){for(p=m,k=b,v=g;z=a.lencode[v+((h&(1<<p+k)-1)>>p)],m=z>>>24,b=z>>>16&255,g=65535&z,!(p+m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,a.length=g,0===b){a.mode=16205;break}if(32&b){a.back=-1,a.mode=16191;break}if(64&b){t.msg="invalid literal/length code",a.mode=me;break}a.extra=15&b,a.mode=16201;case 16201:if(a.extra){for(R=a.extra;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.length+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=16202;case 16202:for(;z=a.distcode[h&(1<<a.distbits)-1],m=z>>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(0==(240&b)){for(p=m,k=b,v=g;z=a.distcode[v+((h&(1<<p+k)-1)>>p)],m=z>>>24,b=z>>>16&255,g=65535&z,!(p+m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,64&b){t.msg="invalid distance code",a.mode=me;break}a.offset=g,a.extra=15&b,a.mode=16203;case 16203:if(a.extra){for(R=a.extra;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.offset+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=me;break}a.mode=16204;case 16204:if(0===l)break t;if(c=f-l,a.offset>c){if(c=a.offset-c,c>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=me;break}c>a.wnext?(c-=a.wnext,u=a.wsize-c):u=a.wnext-c,c>a.length&&(c=a.length),w=a.window}else w=n,u=r-a.offset,c=a.length;c>l&&(c=l),l-=c,a.length-=c;do{n[r++]=w[u++]}while(--c);0===a.length&&(a.mode=16200);break;case 16205:if(0===l)break t;n[r++]=a.length,l--,a.mode=16200;break;case 16206:if(a.wrap){for(;d<32;){if(0===o)break t;o--,h|=i[s++]<<d,d+=8}if(f-=l,t.total_out+=f,a.total+=f,4&a.wrap&&f&&(t.adler=a.check=a.flags?N(a.check,n,f,r-f):F(a.check,n,f,r-f)),f=l,4&a.wrap&&(a.flags?h:be(h))!==a.check){t.msg="incorrect data check",a.mode=me;break}h=0,d=0}a.mode=16207;case 16207:if(a.wrap&&a.flags){for(;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(4&a.wrap&&h!==(4294967295&a.total)){t.msg="incorrect length check",a.mode=me;break}h=0,d=0}a.mode=16208;case 16208:x=he;break t;case me:x=fe;break t;case 16210:return ce;default:return _e}return t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,(a.wsize||f!==t.avail_out&&a.mode<me&&(a.mode<16206||e!==se))&&Ze(t,t.output,t.next_out,f-t.avail_out),_-=t.avail_in,f-=t.avail_out,t.total_in+=_,t.total_out+=f,a.total+=f,4&a.wrap&&f&&(t.adler=a.check=a.flags?N(a.check,n,f,t.next_out-f):F(a.check,n,f,t.next_out-f)),t.data_type=a.bits+(a.last?64:0)+(16191===a.mode?128:0)+(16199===a.mode||16194===a.mode?256:0),(0===_&&0===f||e===se)&&x===le&&(x=ue),x},inflateEnd:t=>{if(pe(t))return _e;let e=t.state;return e.window&&(e.window=null),t.state=null,le},inflateGetHeader:(t,e)=>{if(pe(t))return _e;const a=t.state;return 0==(2&a.wrap)?_e:(a.head=e,e.done=!1,le)},inflateSetDictionary:(t,e)=>{const a=e.length;let i,n,s;return pe(t)?_e:(i=t.state,0!==i.wrap&&16190!==i.mode?_e:16190===i.mode&&(n=1,n=F(n,e,a,0),n!==i.check)?fe:(s=Ze(t,e,a,a),s?(i.mode=16210,ce):(i.havedict=1,le)))},inflateInfo:"pako inflate (from Nodeca project)"};var Se=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const De=Object.prototype.toString,{Z_NO_FLUSH:Te,Z_FINISH:Oe,Z_OK:Fe,Z_STREAM_END:Le,Z_NEED_DICT:Ne,Z_STREAM_ERROR:Ie,Z_DATA_ERROR:Be,Z_MEM_ERROR:Ce}=B;function He(t){this.options=Tt({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ct,this.strm.avail_out=0;let a=Ue.inflateInit2(this.strm,e.windowBits);if(a!==Fe)throw new Error(I[a]);if(this.header=new Se,Ue.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=Nt(e.dictionary):"[object ArrayBuffer]"===De.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(a=Ue.inflateSetDictionary(this.strm,e.dictionary),a!==Fe)))throw new Error(I[a])}He.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize,n=this.options.dictionary;let s,r,o;if(this.ended)return!1;for(r=e===~~e?e:!0===e?Oe:Te,"[object ArrayBuffer]"===De.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;){for(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),s=Ue.inflate(a,r),s===Ne&&n&&(s=Ue.inflateSetDictionary(a,n),s===Fe?s=Ue.inflate(a,r):s===Be&&(s=Ne));a.avail_in>0&&s===Le&&a.state.wrap>0&&0!==t[a.next_in];)Ue.inflateReset(a),s=Ue.inflate(a,r);switch(s){case Ie:case Be:case Ne:case Ce:return this.onEnd(s),this.ended=!0,!1}if(o=a.avail_out,a.next_out&&(0===a.avail_out||s===Le))if("string"===this.options.to){let t=Bt(a.output,a.next_out),e=a.next_out-t,n=It(a.output,t);a.next_out=e,a.avail_out=i-e,e&&a.output.set(a.output.subarray(t,t+e),0),this.onData(n)}else this.onData(a.output.length===a.next_out?a.output:a.output.subarray(0,a.next_out));if(s!==Fe||0!==o){if(s===Le)return s=Ue.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===a.avail_in)break}}return!0},He.prototype.onData=function(t){this.chunks.push(t)},He.prototype.onEnd=function(t){t===Fe&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Ot(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};const{Deflate:Me,deflate:je,deflateRaw:Ke,gzip:Pe}=Vt;var Ye=Me,Ge=je,Xe=B;const We=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const e=this._hasEvents?",":"";this.deflate.push(e+t,Xe.Z_SYNC_FLUSH),this._hasEvents=!0}finish(){if(this.deflate.push("]",Xe.Z_FINISH),this.deflate.err)throw this.deflate.err;const t=this.deflate.result;return this._init(),t}_init(){this._hasEvents=!1,this.deflate=new Ye,this.deflate.push("[",Xe.Z_NO_FLUSH)}},qe={clear:()=>{We.clear()},addEvent:t=>We.addEvent(t),finish:()=>We.finish(),compress:t=>function(t){return Ge(t)}(t)};addEventListener("message",(function(t){const e=t.data.method,a=t.data.id,i=t.data.arg;if(e in qe&&"function"==typeof qe[e])try{const t=qe[e](i);postMessage({id:a,method:e,success:!0,response:t})}catch(t){postMessage({id:a,method:e,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});';class Xe{constructor(){this.events=[]}get hasEvents(){return this.events.length>0}destroy(){this.events=[]}async addEvent(e,t){t?this.events=[e]:this.events.push(e)}finish(){return new Promise((e=>{const t=this.events;this.events=[],e(JSON.stringify(t))}))}}class Ze{constructor(e){this._worker=e,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise(((e,t)=>{this._worker.addEventListener("message",(({data:n})=>{n.success?e():t()}),{once:!0}),this._worker.addEventListener("error",(e=>{t(e)}),{once:!0})}))),this._ensureReadyPromise}destroy(){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.log("[Replay] Destroying compression worker"),this._worker.terminate()}postMessage(e,t){const n=this._getAndIncrementId();return new Promise(((r,o)=>{const a=({data:t})=>{const s=t;if(s.method===e&&s.id===n){if(this._worker.removeEventListener("message",a),!s.success)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.error("[Replay]",s.response),void o(new Error("Error in compression worker"));r(s.response)}};this._worker.addEventListener("message",a),this._worker.postMessage({id:n,method:e,arg:t})}))}_getAndIncrementId(){return this._id++}}class Je{constructor(e){this._worker=new Ze(e),this.hasEvents=!1}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}async addEvent(e,t){return this.hasEvents=!0,t&&await this._clear(),this._sendEventToWorker(e)}finish(){return this._finishRequest()}_sendEventToWorker(e){return this._worker.postMessage("addEvent",JSON.stringify(e))}async _finishRequest(){const e=await this._worker.postMessage("finish");return this.hasEvents=!1,e}_clear(){return this._worker.postMessage("clear")}}class et{constructor(e){this._fallback=new Xe,this._compression=new Je(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get hasEvents(){return this._used.hasEvents}destroy(){this._fallback.destroy(),this._compression.destroy()}addEvent(e,t){return this._used.addEvent(e,t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.log("[Replay] Failed to load the compression worker, falling back to simple buffer"))}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:e}=this._fallback,t=[];for(const n of e)t.push(this._compression.addEvent(n));this._used=this._compression;try{await Promise.all(t)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.warn("[Replay] Failed to add events when switching buffers.",e)}}}function tt({useCompression:e}){if(e&&window.Worker)try{const e=function(){const e=new Blob([Qe]);return URL.createObjectURL(e)}();("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.log("[Replay] Using compression worker");const t=new Worker(e);return new et(t)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.log("[Replay] Failed to create compression worker")}return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.log("[Replay] Using simple buffer"),new Xe}function nt(e,t,n=+new Date){return null===e||void 0===t||t<0||0!==t&&e+t<=n}function rt(e,t,n=+new Date){return nt(e.started,d,n)||nt(e.lastActivity,t,n)}function it(e){if("sessionStorage"in o)try{o.sessionStorage.setItem(a,JSON.stringify(e))}catch(e){}}function ot(e){return void 0!==e&&Math.random()<e}function at(e){const t=(new Date).getTime();return{id:e.id||i.uuid4(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled}}function st({sessionSampleRate:e,errorSampleRate:t,stickySession:n=!1}){const r=function(e,t){return ot(e)?"session":!!ot(t)&&"error"}(e,t),o=at({sampled:r});return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.log(`[Replay] Creating new session: ${o.id}`),n&&it(o),o}function lt({expiry:e,currentSession:t,stickySession:n,sessionSampleRate:r,errorSampleRate:s}){const l=t||n&&function(){if(!("sessionStorage"in o))return null;try{const e=o.sessionStorage.getItem(a);return e?at(JSON.parse(e)):null}catch(e){return null}}();if(l){if(!rt(l,e))return{type:"saved",session:l};if("error"===l.sampled){return{type:"new",session:at({sampled:!1})}}("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.log("[Replay] Session has expired")}return{type:"new",session:st({stickySession:n,sessionSampleRate:r,errorSampleRate:s})}}async function ct(e,t,n){if(!e.eventBuffer)return null;if(e.isPaused())return null;const o=t.timestamp>9999999999?t.timestamp:1e3*t.timestamp;if(o+c<(new Date).getTime())return null;const a=e.getContext().earliestEvent;e.session&&0===e.session.segmentId&&(!a||o<a)&&(e.getContext().earliestEvent=o);try{return await e.eventBuffer.addEvent(t,n)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.error(t),e.stop("addEvent");const n=r.getCurrentHub().getClient();n&&n.recordDroppedEvent("internal_sdk_error","replay")}}function ut(e){return{timestamp:(new Date).getTime()/1e3,type:"default",...e}}function dt(e,t){"sentry.transaction"!==t.category&&("ui.click"===t.category?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate((()=>(ct(e,{type:G.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:t}}),"console"===t.category))))}const ht=e=>t=>{if(!e.isEnabled())return;const n=function(e){let t,n;try{n=function(e){if(t=e.event,t.target)return e.event.target;var t;return e.event}(e),t=i.htmlTreeAsString(n)}catch(e){t="<unknown>"}if(0===t.length)return null;return ut({category:`ui.${e.name}`,message:t,data:{...n?{nodeId:$e.mirror.getId(n)}:{}}})}(t);n&&dt(e,n)};function pt(e,t){return t.map((({type:t,start:n,end:r,name:i,data:o})=>ct(e,{type:G.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:t,description:i,startTimestamp:n,endTimestamp:r,data:o}}})))}function mt(e,t){return("undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__||!e.getOptions()._experiments.traceInternals)&&function(e){const t=r.getCurrentHub().getClient(),n=t&&t.getDsn();return!!n&&e.includes(n.host)}(t)}function gt(e){return(t,n)=>{if(t.type===s)return delete t.breadcrumbs,t;if(function(e,t){return!(e.type||!e.exception||!e.exception.values||!e.exception.values.length)&&(!(!t.originalException||!t.originalException.__rrweb__)||e.exception.values.some((e=>!!(e.stacktrace&&e.stacktrace.frames&&e.stacktrace.frames.length)&&e.stacktrace.frames.some((e=>e.filename&&e.filename.includes("/rrweb/src/"))))))}(t,n)&&!e.getOptions()._experiments.captureExceptions)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.log("[Replay] Ignoring error from rrweb internals",t),null;if(t.type&&"session"!==e.recordingMode||(t.tags={...t.tags,replayId:e.getSessionId()}),"transaction"===t.type&&t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id)return e.getContext().traceIds.add(t.contexts.trace.trace_id),t;if(t.type||e.getContext().errorIds.add(t.event_id),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&e.getOptions()._experiments.traceInternals){const e=function(e){return{type:"Unknown",value:"n/a",...e.exception&&e.exception.values&&e.exception.values[0]}}(t);!function(e){const{category:t,level:n,message:i,...o}=e;r.addBreadcrumb({category:t||"console",level:n||"debug",message:`[debug]: ${i}`,...o})}({message:`Tagging event (${t.event_id}) - ${t.message} - ${e.type}: ${e.value}`})}return"error"===e.recordingMode&&t.exception&&t.message!==l&&setTimeout((async()=>{await e.flushImmediate(),e.stopRecording()&&(e.recordingMode="session",e.startRecording())})),t}}function ft(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{from:t,to:n}=e,r=(new Date).getTime()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}(t);null!==n&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate((()=>(pt(e,[n]),!1))))}}let _t=null;const bt=e=>t=>{if(!e.isEnabled())return;const n=function(e){const t=e.getLastBreadcrumb&&e.getLastBreadcrumb();if(_t===t||!t)return null;if(_t=t,t.category&&(["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui.")))return null;return ut(t)}(t);n&&dt(e,n)};function vt(e){const t=r.getCurrentHub().getScope();t&&t.addScopeListener(bt(e)),i.addInstrumentationHandler("dom",ht(e)),i.addInstrumentationHandler("fetch",function(e){return t=>{if(!e.isEnabled())return;const n=function(e){if(!e.endTimestamp)return null;const{startTimestamp:t,endTimestamp:n,fetchData:r,response:i}=e;return{type:"resource.fetch",start:t/1e3,end:n/1e3,name:r.url,data:{method:r.method,statusCode:i.status}}}(t);null!==n&&(mt(e,n.name)||e.addUpdate((()=>(pt(e,[n]),!0))))}}(e)),i.addInstrumentationHandler("xhr",function(e){return t=>{if(!e.isEnabled())return;const n=function(e){if(e.xhr.__sentry_own_request__)return null;if(e.startTimestamp&&(e.xhr.__sentry_xhr__=e.xhr.__sentry_xhr__||{},e.xhr.__sentry_xhr__.startTimestamp=e.startTimestamp),!e.endTimestamp)return null;const{method:t,url:n,status_code:r}=e.xhr.__sentry_xhr__||{};return void 0===n?null:{type:"resource.xhr",name:n,start:(e.xhr.__sentry_xhr__?e.xhr.__sentry_xhr__.startTimestamp||0:e.endTimestamp)/1e3,end:e.endTimestamp/1e3,data:{method:t,statusCode:r}}}(t);null!==n&&(mt(e,n.name)||e.addUpdate((()=>(pt(e,[n]),!0))))}}(e)),i.addInstrumentationHandler("history",ft(e)),r.addGlobalEventProcessor(gt(e))}function yt(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,i=(new Date).getTime()/1e3;return{type:"memory",name:"memory",start:i,end:i,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}const Et={resource:function(e){const{entryType:t,initiatorType:n,name:r,responseEnd:i,startTime:o,encodedBodySize:a,transferSize:s}=e;if(["fetch","xmlhttprequest"].includes(n))return null;return{type:`${t}.${n}`,start:wt(o),end:wt(i),name:r,data:{size:s,encodedBodySize:a}}},paint:function(e){const{duration:t,entryType:n,name:r,startTime:i}=e,o=wt(i);return{type:n,name:r,start:o,end:o+t}},navigation:function(e){const{entryType:t,name:n,duration:r,domComplete:i,startTime:o,transferSize:a,type:s}=e;if(0===r)return null;return{type:`${t}.${s}`,start:wt(o),end:wt(i),name:n,data:{size:a,duration:r}}},"largest-contentful-paint":function(e){const{entryType:t,startTime:n,size:r}=e;let i=0;if(o.performance){const e=o.performance.getEntriesByType("navigation")[0];i=e&&e.activationStart||0}const a=Math.max(n-i,0),s=wt(i)+a/1e3;return{type:t,name:t,start:s,end:s,data:{value:a,size:r,nodeId:$e.mirror.getId(e.element)}}}};function St(e){return void 0===Et[e.entryType]?null:Et[e.entryType](e)}function wt(e){return((i.browserPerformanceTimeOrigin||o.performance.timeOrigin)+e)/1e3}let Tt;async function Ct({recordingData:e,replayId:t,segmentId:n,includeReplayStartTimestamp:o,eventContext:a,timestamp:c,session:u,options:d}){const h=function({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}\n`;if("string"==typeof e)n=`${r}${e}`;else{const t=(new TextEncoder).encode(r);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}({recordingData:e,headers:{segment_id:n}}),{urls:p,errorIds:m,traceIds:g,initialTimestamp:f}=a,_=r.getCurrentHub(),b=_.getClient(),v=_.getScope(),y=b&&b.getTransport(),E=b&&b.getDsn();if(!(b&&v&&y&&E&&u.sampled))return;const S={type:s,...o?{replay_start_timestamp:f/1e3}:{},timestamp:c/1e3,error_ids:m,trace_ids:g,urls:p,replay_id:t,segment_id:n,replay_type:u.sampled},w=await async function({client:e,scope:t,replayId:n,event:i}){const o="object"!=typeof e._integrations||null===e._integrations||Array.isArray(e._integrations)?void 0:Object.keys(e._integrations),a=await r.prepareEvent(e.getOptions(),i,{event_id:n,integrations:o},t);if(!a)return null;a.platform=a.platform||"javascript";const s=e.getSdkMetadata&&e.getSdkMetadata(),{name:l,version:c}=s&&s.sdk||{};return a.sdk={...a.sdk,name:l||"sentry.javascript.unknown",version:c||"0.0.0"},a}({scope:v,client:b,replayId:t,event:S});if(!w)return b.recordDroppedEvent("event_processor","replay",S),void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.log("An event processor returned `null`, will not send event."));w.contexts={...w.contexts,replay:{...w.contexts&&w.contexts.replay,session_sample_rate:d.sessionSampleRate,error_sample_rate:d.errorSampleRate}};const T=function(e,t,n,r){return i.createEnvelope(i.createEventEnvelopeHeaders(e,i.getSdkMetadataForEnvelopeHeader(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:"string"==typeof t?(new TextEncoder).encode(t).length:t.length},t]])}(w,h,E,b.getOptions().tunnel);let C;try{C=await y.send(T)}catch(e){throw new Error(l)}if(!C)return C;if("number"==typeof C.statusCode&&(C.statusCode<200||C.statusCode>=300))throw new xt(C.statusCode);return C}class xt extends Error{constructor(e){super(`Transport returned status code ${e}`)}}async function Ft(e,t={count:0,interval:h}){const{recordingData:n,options:i}=e;if(n.length)try{return await Ct(e),!0}catch(n){if(n instanceof xt)throw n;if(r.setContext("Replays",{_retryCount:t.count}),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i._experiments&&i._experiments.captureExceptions&&r.captureException(n),t.count>=p)throw new Error(`${l} - max retries exceeded`);return t.interval*=++t.count,await new Promise(((n,r)=>{setTimeout((async()=>{try{await Ft(e,t),n(!0)}catch(e){r(e)}}),t.interval)}))}}class Dt{__init(){this.eventBuffer=null}__init2(){this.performanceEvents=[]}__init3(){this.recordingMode="session"}__init4(){this._performanceObserver=null}__init5(){this._flushLock=null}__init6(){this._lastActivity=(new Date).getTime()}__init7(){this._isEnabled=!1}__init8(){this._isPaused=!1}__init9(){this._hasInitializedCoreListeners=!1}__init10(){this._stopRecording=null}__init11(){this._context={errorIds:new Set,traceIds:new Set,urls:[],earliestEvent:null,initialTimestamp:(new Date).getTime(),initialUrl:""}}constructor({options:e,recordingOptions:t}){Dt.prototype.__init.call(this),Dt.prototype.__init2.call(this),Dt.prototype.__init3.call(this),Dt.prototype.__init4.call(this),Dt.prototype.__init5.call(this),Dt.prototype.__init6.call(this),Dt.prototype.__init7.call(this),Dt.prototype.__init8.call(this),Dt.prototype.__init9.call(this),Dt.prototype.__init10.call(this),Dt.prototype.__init11.call(this),Dt.prototype.__init12.call(this),Dt.prototype.__init13.call(this),Dt.prototype.__init14.call(this),Dt.prototype.__init15.call(this),Dt.prototype.__init16.call(this),this._recordingOptions=t,this._options=e,this._debouncedFlush=function(e,t,n){let r,i,o;const a=n&&n.maxWait?Math.max(n.maxWait,t):0;function s(){return l(),r=e(),r}function l(){void 0!==i&&clearTimeout(i),void 0!==o&&clearTimeout(o),i=o=void 0}function c(){return i&&clearTimeout(i),i=setTimeout(s,t),a&&void 0===o&&(o=setTimeout(s,a)),r}return c.cancel=l,c.flush=function(){return void 0!==i||void 0!==o?s():r},c}((()=>this._flush()),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay})}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}getOptions(){return this._options}start(){this._setInitialState(),this._loadAndCheckSession()&&(this.session?this.session.sampled&&("error"===this.session.sampled&&(this.recordingMode="error"),this._updateSessionActivity(),this.eventBuffer=tt({useCompression:this._options.useCompression}),this._addListeners(),this._isEnabled=!0,this.startRecording()):this._handleException(new Error("No session found")))}startRecording(){try{this._stopRecording=$e({...this._recordingOptions,..."error"===this.recordingMode&&{checkoutEveryNms:6e4},emit:this._handleRecordingEmit})}catch(e){this._handleException(e)}}stopRecording(){try{return!!this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0,!0)}catch(e){return this._handleException(e),!1}}stop(e){if(this._isEnabled)try{if("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__){const t="[Replay] Stopping Replay"+(e?` triggered by ${e}`:"");(this.getOptions()._experiments.traceInternals?console.warn:i.logger.log)(t)}this._isEnabled=!1,this._removeListeners(),this.stopRecording(),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,this._debouncedFlush.cancel()}catch(e){this._handleException(e)}}pause(){this._isPaused=!0,this.stopRecording()}resume(){this._loadAndCheckSession()&&(this._isPaused=!1,this.startRecording())}addUpdate(e){const t=e();"error"!==this.recordingMode&&!0!==t&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._loadAndCheckSession())return;this.resume()}}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(e){const t=this.getSessionId();if(this._lastActivity&&nt(this._lastActivity,d))return void this.pause();if(!this._loadAndCheckSession(e))return;return t===this.getSessionId()||(this._triggerFullSnapshot(),!1)}_handleException(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.error("[Replay]",e),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&this._options._experiments&&this._options._experiments.captureExceptions&&r.captureException(e)}_loadAndCheckSession(e=c){const{type:t,session:n}=lt({expiry:e,stickySession:Boolean(this._options.stickySession),currentSession:this.session,sessionSampleRate:this._options.sessionSampleRate,errorSampleRate:this._options.errorSampleRate});"new"===t&&this._setInitialState();const r=this.getSessionId();return n.id!==r&&(n.previousSessionId=r),this.session=n,!!this.session.sampled||(this.stop("session unsampled"),!1)}_setInitialState(){const e=`${o.location.pathname}${o.location.hash}${o.location.search}`,t=`${o.location.origin}${e}`;this.performanceEvents=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=(new Date).getTime(),this._context.urls.push(t)}_addListeners(){try{o.document.addEventListener("visibilitychange",this._handleVisibilityChange),o.addEventListener("blur",this._handleWindowBlur),o.addEventListener("focus",this._handleWindowFocus),function(e){const t=r.getCurrentHub().getClient();if(!t)return;const n=t.recordDroppedEvent.bind(t);t.recordDroppedEvent=(t,r,i)=>(i&&!i.type&&i.event_id&&e.delete(i.event_id),n(t,r,i)),Tt=n}(this._context.errorIds),this._hasInitializedCoreListeners||(vt(this),this._hasInitializedCoreListeners=!0)}catch(e){this._handleException(e)}"PerformanceObserver"in o&&(this._performanceObserver=Ye(this))}_removeListeners(){try{o.document.removeEventListener("visibilitychange",this._handleVisibilityChange),o.removeEventListener("blur",this._handleWindowBlur),o.removeEventListener("focus",this._handleWindowFocus),function(){const e=r.getCurrentHub().getClient();e&&Tt&&(e.recordDroppedEvent=Tt)}(),this._performanceObserver&&(this._performanceObserver.disconnect(),this._performanceObserver=null)}catch(e){this._handleException(e)}}__init12(){this._handleRecordingEmit=(e,t)=>{this.checkAndHandleExpiredSession()?this.addUpdate((()=>("error"===this.recordingMode&&2===e.type&&this._setInitialState(),ct(this,e,t),2===e.type&&(this.session&&this.session.previousSessionId||("error"===this.recordingMode&&this.session&&this._context.earliestEvent&&(this.session.started=this._context.earliestEvent,this._maybeSaveSession()),"session"===this.recordingMode&&this.flushImmediate()),!0)))):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.error("[Replay] Received replay event after session expired.")}}__init13(){this._handleVisibilityChange=()=>{"visible"===o.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init14(){this._handleWindowBlur=()=>{const e=ut({category:"ui.blur"});this._doChangeToBackgroundTasks(e)}}__init15(){this._handleWindowFocus=()=>{const e=ut({category:"ui.focus"});this._doChangeToForegroundTasks(e)}}_doChangeToBackgroundTasks(e){if(!this.session)return;const t=rt(this.session,u);e&&!t&&this._createCustomBreadcrumb(e),this._conditionalFlush()}_doChangeToForegroundTasks(e){if(!this.session)return;this.checkAndHandleExpiredSession(u)?e&&this._createCustomBreadcrumb(e):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.log("[Replay] Document has become active, but session has expired")}_triggerFullSnapshot(){try{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.log("[Replay] Taking full rrweb snapshot"),$e.takeFullSnapshot(!0)}catch(e){this._handleException(e)}}_updateUserActivity(e=(new Date).getTime()){this._lastActivity=e}_updateSessionActivity(e=(new Date).getTime()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate((()=>{ct(this,{type:G.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})}))}_addPerformanceEntries(){const e=[...this.performanceEvents];return this.performanceEvents=[],Promise.all(pt(this,function(e){return e.map(St).filter(Boolean)}(e)))}_conditionalFlush(){"error"!==this.recordingMode&&this.flushImmediate()}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[],this._context.earliestEvent=null}_popEventContext(){this._context.earliestEvent&&this._context.earliestEvent<this._context.initialTimestamp&&(this._context.initialTimestamp=this._context.earliestEvent);const e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds).filter(Boolean),traceIds:Array.from(this._context.traceIds).filter(Boolean),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){if(this.session&&this.eventBuffer){if(await this._addPerformanceEntries(),this.eventBuffer&&this.eventBuffer.hasEvents&&(await async function(e){try{return Promise.all(pt(e,[yt(o.performance.memory)]))}catch(e){return[]}}(this),this.eventBuffer))try{const e=await this.eventBuffer.finish(),t=this.session.id,n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession(),await Ft({replayId:t,recordingData:e,segmentId:r,includeReplayStartTimestamp:0===r,eventContext:n,session:this.session,options:this.getOptions(),timestamp:(new Date).getTime()})}catch(e){this._handleException(e),this.stop("sendReplay");const t=r.getCurrentHub().getClient();t&&t.recordDroppedEvent("send_error","replay")}}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.error("[Replay] No session or eventBuffer found to flush.")}__init16(){this._flush=async()=>{if(this._isEnabled)if(this.checkAndHandleExpiredSession())if(this.session){if(this._debouncedFlush.cancel(),!this._flushLock)return this._flushLock=this._runFlush(),await this._flushLock,void(this._flushLock=null);try{await this._flushLock}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.error(e)}finally{this._debouncedFlush()}}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.error("[Replay] No session found to flush.");else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.logger.error("[Replay] Attempting to finish replay event after session expired.")}}_maybeSaveSession(){this.session&&this._options.stickySession&&it(this.session)}}function kt(e,t,n,r){const i=[...e,..."string"==typeof r?r.split(","):[],...t];return void 0!==n&&("string"==typeof n&&i.push(`.${n}`),console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")),i.join(",")}function Ot({mask:e,unmask:t,block:n,unblock:r,ignore:i,blockClass:o,blockSelector:a,maskTextClass:s,maskTextSelector:l,ignoreClass:c}){const u=kt(e,[".sentry-mask","[data-sentry-mask]"],s,l),d=kt(t,[".sentry-unmask","[data-sentry-unmask]"]),h={maskTextSelector:u,unmaskTextSelector:d,maskInputSelector:u,unmaskInputSelector:d,blockSelector:kt(n,[".sentry-block","[data-sentry-block]",'base[href="/"]'],o,a),unblockSelector:kt(r,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:kt(i,[".sentry-ignore","[data-sentry-ignore]"],c)};return o instanceof RegExp&&(h.blockClass=o),s instanceof RegExp&&(h.maskTextClass=s),h}function It(){return"undefined"!=typeof window&&(!i.isNodeEnv()||void 0!==e&&"renderer"===e.type)}const At='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]';let Rt=!1;class Nt{static __initStatic(){this.id="Replay"}__init(){this.name=Nt.id}constructor({flushMinDelay:e=5e3,flushMaxDelay:t=5500,stickySession:n=!0,useCompression:r=!0,_experiments:i={},sessionSampleRate:o,errorSampleRate:a,maskAllText:s=!0,maskAllInputs:l=!0,blockAllMedia:c=!0,mask:u=[],unmask:d=[],block:h=[],unblock:p=[],ignore:m=[],maskFn:g,blockClass:f,blockSelector:_,maskInputOptions:b,maskTextClass:v,maskTextSelector:y,ignoreClass:E}={}){if(Nt.prototype.__init.call(this),this._recordingOptions={maskAllInputs:l,maskAllText:s,maskInputOptions:{...b||{},password:!0},maskTextFn:g,maskInputFn:g,...Ot({mask:u,unmask:d,block:h,unblock:p,ignore:m,blockClass:f,blockSelector:_,maskTextClass:v,maskTextSelector:y,ignoreClass:E}),slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,stickySession:n,sessionSampleRate:o,errorSampleRate:a,useCompression:r,blockAllMedia:c,_experiments:i},"number"==typeof o&&(console.warn(`[Replay] You are passing \`sessionSampleRate\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \`replaysSessionSampleRate\` directly in the SDK init options, e.g.:\nSentry.init({ replaysSessionSampleRate: ${o} })`),this._initialOptions.sessionSampleRate=o),"number"==typeof a&&(console.warn(`[Replay] You are passing \`errorSampleRate\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \`replaysOnErrorSampleRate\` directly in the SDK init options, e.g.:\nSentry.init({ replaysOnErrorSampleRate: ${a} })`),this._initialOptions.errorSampleRate=a),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${At}`:At),this._isInitialized&&It())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Rt}set _isInitialized(e){Rt=e}setupOnce(){It()&&(this._setup(),setTimeout((()=>this.start())))}start(){this._replay&&this._replay.start()}stop(){this._replay&&this._replay.stop()}flush(){if(this._replay&&this._replay.isEnabled())return this._replay.flushImmediate()}_setup(){const e=function(e){const t=r.getCurrentHub().getClient(),n=t&&t.getOptions(),o={sessionSampleRate:0,errorSampleRate:0,...i.dropUndefinedKeys(e)};if(!n)return console.warn("SDK client is not available."),o;null==e.sessionSampleRate&&null==e.errorSampleRate&&null==n.replaysSessionSampleRate&&null==n.replaysOnErrorSampleRate&&console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.");"number"==typeof n.replaysSessionSampleRate&&(o.sessionSampleRate=n.replaysSessionSampleRate);"number"==typeof n.replaysOnErrorSampleRate&&(o.errorSampleRate=n.replaysOnErrorSampleRate);return o}(this._initialOptions);this._replay=new Dt({options:e,recordingOptions:this._recordingOptions})}}Nt.__initStatic(),t.Replay=Nt}).call(this,n(56))},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(218),i=n(163);function o(e){return new Promise(((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)}))}function a(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=o(n);return e=>r.then((n=>e(n.transaction(t,"readwrite").objectStore(t))))}function s(e){return o(e.getAllKeys())}function l(e,t,n){return e((e=>s(e).then((r=>{if(!(r.length>=n))return e.put(t,Math.max(...r,0)+1),o(e.transaction)}))))}function c(e){return e((e=>s(e).then((t=>{if(0!==t.length)return o(e.get(t[0])).then((n=>(e.delete(t[0]),o(e.transaction).then((()=>n)))))}))))}function u(e){let t;function n(){return null==t&&(t=a(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{insert:async t=>{try{const r=await i.serializeEnvelope(t,e.textEncoder);await l(n(),r,e.maxQueueSize||30)}catch(e){}},pop:async()=>{try{const t=await c(n());if(t)return i.parseEnvelope(t,e.textEncoder||new TextEncoder,e.textDecoder||new TextDecoder)}catch(e){}}}}t.createStore=a,t.insert=l,t.makeBrowserOfflineTransport=function(e){return function(e){return t=>e({...t,createStore:u})}(r.makeOfflineTransport(e))},t.pop=c},function(e,t,n){"use strict";function r(){window.TouchEvent||(window.TouchEvent=class extends UIEvent{get altKey(){return!1}get changedTouches(){return[]}get ctrlKey(){return!1}get metaKey(){return!1}get shiftKey(){return!1}get targetTouches(){return[]}get touches(){return[]}get rotation(){return 0}get scale(){return 0}constructor(e,t){super(e,t)}})}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(120),i=n.n(r),o=n(121),a=n(280),s=n(203),l=n(600);const c=e=>{let t,n,{call:r}=e;switch(Object(a.c)(r)){case s.c.Disconnected:t=Object(o.a)("Video"),n=!1;break;case s.c.Connecting:t=Object(o.a)("Joining…"),n=!0;break;case s.c.Connected:case s.c.Disconnecting:t=Object(o.a)("Joined"),n=!0}return i.a.createElement(l.a,{type:l.c.Video,text:t,active:n,participantCount:Object(a.f)(r)})}},function(e,t,n){"use strict";var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(126),l=n.n(s),c=n(143),u=n(129),d=n(1),h=n(121),p=n(124),m=n(939),g=n(761),f=n(381),_=n(180),b=n(453),v=n(252),y=n(919),E=n(407),S=n(128),w=n(152),T=n(814),C=n(123),x=n(377),F=n(125),D=n(133),k=n(138),O=n(336),I=n(815),A=n(142),R=n(189),N=n(821);function M(e,t){const n=Object(f.a)(e);n&&(e=Object(f.e)(e));const r=!!t.replyEventId;let i="",o="";r&&(i=function(e){const t=e.getContent().body.split("\n").map((e=>e.trim()));return t.length>2&&t[0].startsWith("> ")&&0===t[1].length?`${t[0]}\n\n`:""}(t),o=function(e){const t=e.getContent().formatted_body;if(!t)return"";const n=(new DOMParser).parseFromString(t,"text/html").body.querySelector("mx-reply");return n&&n.outerHTML||""}(t));const a=Object(f.g)(e),s={msgtype:n?u.e.Emote:u.e.Text,body:a},l={msgtype:s.msgtype,body:`${i} * ${a}`},c=Object(f.c)(e,{forceHTML:r,useMarkdown:F.b.getValue("MessageComposerInput.useMarkdown")});c&&(s.format="org.matrix.custom.html",s.formatted_body=c,l.format=s.format,l.formatted_body=`${o} * ${c}`);const d={"m.new_content":s,"m.relates_to":{rel_type:"m.replace",event_id:t.getId()}};return Object.assign(d,l)}class P extends a.a.Component{constructor(e,t){super(e),i()(this,"context",void 0),i()(this,"editorRef",Object(o.createRef)()),i()(this,"dispatcherRef",void 0),i()(this,"model",null),i()(this,"onKeyDown",(e=>{var t;if(null!==(t=this.editorRef.current)&&void 0!==t&&t.isComposing(e))return;switch(Object(w.a)().getMessageComposerAction(e)){case A.h.SendMessage:this.sendEdit(),e.stopPropagation(),e.preventDefault();break;case A.h.CancelReplyOrEdit:e.stopPropagation(),this.cancelEdit();break;case A.h.EditPrevMessage:{var n,r;if(null!==(n=this.editorRef.current)&&void 0!==n&&n.isModified()||null===(r=this.editorRef.current)||void 0===r||!r.isCaretAtStart())return;const t=Object(_.g)({events:this.events,isForward:!1,fromEventId:this.props.editState.getEvent().getId()});t&&(p.a.dispatch({action:S.a.EditEvent,event:t,timelineRenderingType:this.context.timelineRenderingType}),e.preventDefault());break}case A.h.EditNextMessage:{var i,o;if(null!==(i=this.editorRef.current)&&void 0!==i&&i.isModified()||null===(o=this.editorRef.current)||void 0===o||!o.isCaretAtEnd())return;const t=Object(_.g)({events:this.events,isForward:!0,fromEventId:this.props.editState.getEvent().getId()});t?p.a.dispatch({action:S.a.EditEvent,event:t,timelineRenderingType:this.context.timelineRenderingType}):this.cancelEdit(),e.preventDefault();break}}})),i()(this,"cancelEdit",(()=>{this.endEdit()})),i()(this,"saveStoredEditorState",(()=>{const e=T.a.createItem(this.model);this.clearPreviousEdit(),localStorage.setItem(this.editorRoomKey,this.props.editState.getEvent().getId()),localStorage.setItem(this.editorStateKey,JSON.stringify(e))})),i()(this,"sendEdit",(async()=>{if(this.state.saveDisabled)return;const e=this.props.editState.getEvent();if(R.a.instance.trackEvent({eventName:"Composer",isEditing:!0,inThread:!(null==e||!e.getThread()),isReply:!!e.replyEventId}),F.b.getValue("MessageComposerInput.autoReplaceEmoji")){var t,n;const e=null===(t=this.editorRef.current)||void 0===t?void 0:t.getCaret(),r=this.model.positionForOffset(e.offset,e.atNodeEnd);null===(n=this.editorRef.current)||void 0===n||n.replaceEmoticon(r,y.a)}const r=M(this.model,e),i=r["m.new_content"];let o=!0;if(""===(null==i?void 0:i.body))return this.cancelPreviousPendingEdit(),void Object(x.a)({mxEvent:e,onCloseDialog:()=>{this.cancelEdit()}});if(this.isContentModified(i)){const t=e.getRoomId();if(!Object(f.a)(this.model)&&Object(I.b)(this.model)){const[n,i,s]=Object(I.a)(this.model);if(n){var a;const s=(null==e||null===(a=e.getThread())||void 0===a?void 0:a.id)||null,[l,c]=await Object(I.c)(n,i,t,s);if(!c)return;n.category===E.a.messages||n.category===E.a.effects?r["m.new_content"]=l:o=!1}else{const e=await Object(I.d)(s);if(p.a.dispatch({action:S.a.FocusAComposer,context:this.context.timelineRenderingType}),!e)return}}if(o){this.cancelPreviousPendingEdit();const e=this.props.editState.getEvent().threadRootId||null;this.props.mxClient.sendMessage(t,e,r),p.a.dispatch({action:"message_sent"})}}this.endEdit()})),i()(this,"onChange",(()=>{var e;this.state.saveDisabled&&null!==(e=this.editorRef.current)&&void 0!==e&&e.isModified()&&this.setState({saveDisabled:!1})})),i()(this,"onAction",(e=>{if(this.editorRef.current)if(e.action===S.a.ComposerInsert){if(e.timelineRenderingType!==this.context.timelineRenderingType)return;if(e.composerType!==O.a.Edit)return;var t;if(e.userId)null===(t=this.editorRef.current)||void 0===t||t.insertMention(e.userId);else if(e.event){var n;null===(n=this.editorRef.current)||void 0===n||n.insertQuotedMessage(e.event)}else if(e.text){var r;null===(r=this.editorRef.current)||void 0===r||r.insertPlaintext(e.text)}}else e.action===S.a.FocusEditMessageComposer&&this.editorRef.current.focus()})),this.context=t;const n=this.createEditorModel(),r=this.props.editState.getEvent(),a=M(this.model,r);this.state={saveDisabled:!n||!this.isContentModified(a["m.new_content"])},window.addEventListener("beforeunload",this.saveStoredEditorState),this.dispatcherRef=p.a.register(this.onAction)}getRoom(){return this.props.mxClient.getRoom(this.props.editState.getEvent().getRoomId())}endEdit(){localStorage.removeItem(this.editorRoomKey),localStorage.removeItem(this.editorStateKey),p.a.dispatch({action:S.a.EditEvent,event:null,timelineRenderingType:this.context.timelineRenderingType}),p.a.dispatch({action:S.a.FocusSendMessageComposer,context:this.context.timelineRenderingType})}get editorRoomKey(){return Object(N.a)(this.props.editState.getEvent().getRoomId(),this.context.timelineRenderingType)}get editorStateKey(){return Object(N.b)(this.props.editState.getEvent().getId())}get events(){const e=this.context.liveTimeline.getEvents(),t=this.getRoom().getPendingEvents(),n=Boolean(this.props.editState.getEvent().getThread());return e.concat(n?[]:t)}get shouldSaveStoredEditorState(){return null!==localStorage.getItem(this.editorRoomKey)}restoreStoredEditorState(e){const t=localStorage.getItem(this.editorStateKey);if(t)try{const{parts:n}=JSON.parse(t);return n.map((t=>e.deserializePart(t)))}catch(e){d.a.error("Error parsing editing state: ",e)}}clearPreviousEdit(){localStorage.getItem(this.editorRoomKey)&&localStorage.removeItem(`mx_edit_state_${localStorage.getItem(this.editorRoomKey)}`)}isContentModified(e){const t=this.props.editState.getEvent().getContent();return t.msgtype!==e.msgtype||t.body!==e.body||t.format!==e.format||t.formatted_body!==e.formatted_body}cancelPreviousPendingEdit(){const e=this.props.editState.getEvent().replacingEvent();!e||e.status!==c.a.QUEUED&&e.status!==c.a.NOT_SENT||this.props.mxClient.cancelPendingEvent(e)}componentWillUnmount(){const e=document.getSelection();let t;var n;e.focusNode&&(t=Object(g.a)(null===(n=this.editorRef.current)||void 0===n?void 0:n.editorRef.current,e).caret);const r=this.model.serializeParts();this.props.editState.setEditorState(t,r),window.removeEventListener("beforeunload",this.saveStoredEditorState),this.shouldSaveStoredEditorState&&this.saveStoredEditorState(),p.a.unregister(this.dispatcherRef)}createEditorModel(){const{editState:e}=this.props,t=this.getRoom(),n=new v.a(t,this.props.mxClient);let r,i=!1;if(e.hasEditorState())r=e.getSerializedParts().map((e=>n.deserializePart(e)));else{const t=this.restoreStoredEditorState(n);r=t||Object(b.b)(e.getEvent(),n,{shouldEscape:F.b.getValue("MessageComposerInput.useMarkdown")}),i=!!t}return this.model=new m.a(r,n),this.saveStoredEditorState(),i}render(){var e,t,n;return a.a.createElement("div",{className:l()("mx_EditMessageComposer",this.props.className),onKeyDown:this.onKeyDown},a.a.createElement(y.b,{ref:this.editorRef,model:this.model,room:this.getRoom(),threadId:null===(e=this.props.editState)||void 0===e||null===(t=e.getEvent())||void 0===t||null===(n=t.getThread())||void 0===n?void 0:n.id,initialCaret:this.props.editState.getCaret(),label:Object(h.a)("Edit message"),onChange:this.onChange}),a.a.createElement("div",{className:"mx_EditMessageComposer_buttons"},a.a.createElement(C.a,{kind:"secondary",onClick:this.cancelEdit},Object(h.a)("Cancel")),a.a.createElement(C.a,{kind:"primary",onClick:this.sendEdit,disabled:this.state.saveDisabled},Object(h.a)("Save"))))}}i()(P,"contextType",k.b);const L=Object(D.c)(P);t.a=L},function(e,t,n){"use strict";n.r(t),n.d(t,"Icon",(function(){return a}));var r,i=n(120);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}function a(e){return i.createElement("svg",o({fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"presentation","aria-hidden":!0},e),r||(r=i.createElement("path",{d:"M21.276 4.696a1.579 1.579 0 10-2.233-2.233l-7.151 7.151-7.151-7.15a1.579 1.579 0 10-2.233 2.232l7.15 7.151-7.457 7.458a1.579 1.579 0 002.233 2.233l7.458-7.458 7.457 7.458a1.579 1.579 0 002.233-2.233l-7.458-7.458 7.152-7.15z",fill:"#737D8C"})))}t.default="img/cancel.12c5c12.svg"},function(e,t,n){"use strict";var r,i=Object.create,o=Object.defineProperty,a=Object.defineProperties,s=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,d=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,m=(e,t,n)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,g=(e,t)=>{for(var n in t||(t={}))h.call(t,n)&&m(e,n,t[n]);if(u)for(var n of u(t))p.call(t,n)&&m(e,n,t[n]);return e},f=(e,t)=>a(e,l(t)),_=(e,t)=>{var n={};for(var r in e)h.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&u)for(var r of u(e))t.indexOf(r)<0&&p.call(e,r)&&(n[r]=e[r]);return n},b=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of c(t))!h.call(e,i)&&i!==n&&o(e,i,{get:()=>t[i],enumerable:!(r=s(t,i))||r.enumerable});return e},v=(e,t,n)=>(n=null!=e?i(d(e)):{},b(!t&&e&&e.__esModule?n:o(n,"default",{value:e,enumerable:!0}),e)),y={};((e,t)=>{for(var n in t)o(e,n,{get:t[n],enumerable:!0})})(y,{Blurhash:()=>x,BlurhashCanvas:()=>T}),e.exports=(r=y,b(o({},"__esModule",{value:!0}),r));var E=v(n(120)),S=v(n(120)),w=n(822),T=class extends S.PureComponent{constructor(){super(...arguments),this.canvas=null,this.handleRef=e=>{this.canvas=e,this.draw()},this.draw=()=>{let{hash:e,height:t,punch:n,width:r}=this.props;if(this.canvas){let i=(0,w.decode)(e,r,t,n),o=this.canvas.getContext("2d"),a=o.createImageData(r,t);a.data.set(i),o.putImageData(a,0,0)}}}componentDidUpdate(){this.draw()}render(){let e=this.props,{hash:t,height:n,width:r}=e,i=_(e,["hash","height","width"]);return S.createElement("canvas",f(g({},i),{height:n,width:r,ref:this.handleRef}))}};T.defaultProps={height:128,width:128};var C={position:"absolute",top:0,bottom:0,left:0,right:0,width:"100%",height:"100%"},x=class extends E.PureComponent{componentDidUpdate(){if(this.props.resolutionX<=0)throw new Error("resolutionX must be larger than zero");if(this.props.resolutionY<=0)throw new Error("resolutionY must be larger than zero")}render(){let e=this.props,{hash:t,height:n,width:r,punch:i,resolutionX:o,resolutionY:a,style:s}=e,l=_(e,["hash","height","width","punch","resolutionX","resolutionY","style"]);return E.createElement("div",f(g({},l),{style:f(g({display:"inline-block",height:n,width:r},s),{position:"relative"})}),E.createElement(T,{hash:t,height:a,width:o,punch:i,style:C}))}};x.defaultProps={height:128,width:128,resolutionX:32,resolutionY:32}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(823),i=n(824),o=n(601),a=function(e){if(!e||e.length<6)throw new o.ValidationError("The blurhash string must be at least 6 characters");var t=r.decode83(e[0]),n=Math.floor(t/9)+1,i=t%9+1;if(e.length!==4+2*i*n)throw new o.ValidationError("blurhash length mismatch: length is "+e.length+" but it should be "+(4+2*i*n))};t.isBlurhashValid=function(e){try{a(e)}catch(e){return{result:!1,errorReason:e.message}}return{result:!0}};var s=function(e){var t=e>>16,n=e>>8&255,r=255&e;return[i.sRGBToLinear(t),i.sRGBToLinear(n),i.sRGBToLinear(r)]},l=function(e,t){var n=Math.floor(e/361),r=Math.floor(e/19)%19,o=e%19;return[i.signPow((n-9)/9,2)*t,i.signPow((r-9)/9,2)*t,i.signPow((o-9)/9,2)*t]};t.default=function(e,t,n,o){a(e),o|=1;for(var c=r.decode83(e[0]),u=Math.floor(c/9)+1,d=c%9+1,h=(r.decode83(e[1])+1)/166,p=new Array(d*u),m=0;m<p.length;m++)if(0===m){var g=r.decode83(e.substring(2,6));p[m]=s(g)}else{g=r.decode83(e.substring(4+2*m,6+2*m));p[m]=l(g,h*o)}for(var f=4*t,_=new Uint8ClampedArray(f*n),b=0;b<n;b++)for(var v=0;v<t;v++){for(var y=0,E=0,S=0,w=0;w<u;w++)for(m=0;m<d;m++){var T=Math.cos(Math.PI*v*m/t)*Math.cos(Math.PI*b*w/n),C=p[m+w*d];y+=C[0]*T,E+=C[1]*T,S+=C[2]*T}var x=i.linearTosRGB(y),F=i.linearTosRGB(E),D=i.linearTosRGB(S);_[4*v+0+b*f]=x,_[4*v+1+b*f]=F,_[4*v+2+b*f]=D,_[4*v+3+b*f]=255}return _}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(823),i=n(824),o=n(601);t.default=function(e,t,n,a,s){if(a<1||a>9||s<1||s>9)throw new o.ValidationError("BlurHash must have between 1 and 9 components");if(t*n*4!==e.length)throw new o.ValidationError("Width and height must match the pixels array");for(var l=[],c=function(r){for(var o=function(o){var a=0==o&&0==r?1:2,s=function(e,t,n,r){for(var o=0,a=0,s=0,l=4*t,c=0;c<t;c++)for(var u=0;u<n;u++){var d=r(c,u);o+=d*i.sRGBToLinear(e[4*c+0+u*l]),a+=d*i.sRGBToLinear(e[4*c+1+u*l]),s+=d*i.sRGBToLinear(e[4*c+2+u*l])}var h=1/(t*n);return[o*h,a*h,s*h]}(e,t,n,(function(e,i){return a*Math.cos(Math.PI*o*e/t)*Math.cos(Math.PI*r*i/n)}));l.push(s)},s=0;s<a;s++)o(s)},u=0;u<s;u++)c(u);var d,h,p=l[0],m=l.slice(1),g="",f=a-1+9*(s-1);if(g+=r.encode83(f,1),m.length>0){var _=Math.max.apply(Math,m.map((function(e){return Math.max.apply(Math,e)}))),b=Math.floor(Math.max(0,Math.min(82,Math.floor(166*_-.5))));d=(b+1)/166,g+=r.encode83(b,1)}else d=1,g+=r.encode83(0,1);return g+=r.encode83((h=p,(i.linearTosRGB(h[0])<<16)+(i.linearTosRGB(h[1])<<8)+i.linearTosRGB(h[2])),4),m.forEach((function(e){g+=r.encode83(function(e,t){return 19*Math.floor(Math.max(0,Math.min(18,Math.floor(9*i.signPow(e[0]/t,.5)+9.5))))*19+19*Math.floor(Math.max(0,Math.min(18,Math.floor(9*i.signPow(e[1]/t,.5)+9.5))))+Math.floor(Math.max(0,Math.min(18,Math.floor(9*i.signPow(e[2]/t,.5)+9.5))))}(e,d),2)})),g}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;l(n(216));var r=l(n(1405)),i=l(n(1407)),o=l(n(120)),a=l(n(603)),s=(n(829),n(830));function l(e){return e&&e.__esModule?e:{default:e}}function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}var u=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return(0,i.default)(e,t)}))},d=function(e){var t,n;function i(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1];t.removeClasses(i,"exit"),t.addClass(i,o?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1]?"appear":"enter";t.addClass(i,o,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1]?"appear":"enter";t.removeClasses(i,o),t.addClass(i,o,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,i=r?""+(r&&n?n+"-":"")+e:n[e];return{baseClassName:i,activeClassName:r?i+"-active":n[e+"Active"],doneClassName:r?i+"-done":n[e+"Done"]}},t}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var l=i.prototype;return l.addClass=function(e,t,n){var i=this.getClassNames(t)[n+"ClassName"],o=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&o&&(i+=" "+o),"active"===n&&e&&(0,s.forceReflow)(e),i&&(this.appliedClasses[t][n]=i,function(e,t){e&&t&&t.split(" ").forEach((function(t){return(0,r.default)(e,t)}))}(e,i))},l.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,o=n.done;this.appliedClasses[t]={},r&&u(e,r),i&&u(e,i),o&&u(e,o)},l.render=function(){var e=this.props,t=(e.classNames,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["classNames"]));return o.default.createElement(a.default,c({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},i}(o.default.Component);d.defaultProps={classNames:""},d.propTypes={};var h=d;t.default=h,e.exports=t.default},function(e,t,n){"use strict";var r=n(171);t.__esModule=!0,t.default=function(e,t){e.classList?e.classList.add(t):(0,i.default)(e,t)||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))};var i=r(n(1406));e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")},e.exports=t.default},function(e,t,n){"use strict";function r(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}t.__esModule=!0,t.default=function(e,t){e.classList?e.classList.remove(t):"string"==typeof e.className?e.className=r(e.className,t):e.setAttribute("class",r(e.className&&e.className.baseVal||"",t))},e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;a(n(216));var r=a(n(120)),i=a(n(186)),o=a(n(831));function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){var t,n;function a(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).handleEnter=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEnter",0,n)},t.handleEntering=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntering",0,n)},t.handleEntered=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntered",0,n)},t.handleExit=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExit",1,n)},t.handleExiting=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExiting",1,n)},t.handleExited=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExited",1,n)},t}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var s=a.prototype;return s.handleLifecycle=function(e,t,n){var o,a=this.props.children,s=r.default.Children.toArray(a)[t];if(s.props[e]&&(o=s.props)[e].apply(o,n),this.props[e]){var l=s.props.nodeRef?void 0:i.default.findDOMNode(this);this.props[e](l)}},s.render=function(){var e=this.props,t=e.children,n=e.in,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["children","in"]),a=r.default.Children.toArray(t),s=a[0],l=a[1];return delete i.onEnter,delete i.onEntering,delete i.onEntered,delete i.onExit,delete i.onExiting,delete i.onExited,r.default.createElement(o.default,i,n?r.default.cloneElement(s,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(l,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},a}(r.default.Component);s.propTypes={};var l=s;t.default=l,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=i,t.mergeChildMappings=o,t.getInitialChildMapping=function(e,t){return i(e.children,(function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:a(n,"appear",e),enter:a(n,"enter",e),exit:a(n,"exit",e)})}))},t.getNextChildMapping=function(e,t,n){var s=i(e.children),l=o(t,s);return Object.keys(l).forEach((function(i){var o=l[i];if((0,r.isValidElement)(o)){var c=i in t,u=i in s,d=t[i],h=(0,r.isValidElement)(d)&&!d.props.in;!u||c&&!h?u||!c||h?u&&c&&(0,r.isValidElement)(d)&&(l[i]=(0,r.cloneElement)(o,{onExited:n.bind(null,o),in:d.props.in,exit:a(o,"exit",e),enter:a(o,"enter",e)})):l[i]=(0,r.cloneElement)(o,{in:!1}):l[i]=(0,r.cloneElement)(o,{onExited:n.bind(null,o),in:!0,exit:a(o,"exit",e),enter:a(o,"enter",e)})}})),l};var r=n(120);function i(e,t){var n=Object.create(null);return e&&r.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)})),n}function o(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var l in t){if(i[l])for(r=0;r<i[l].length;r++){var c=i[l][r];s[i[l][r]]=n(c)}s[l]=n(l)}for(r=0;r<o.length;r++)s[o[r]]=n(o[r]);return s}function a(e,t,n){return null!=n[t]?n[t]:e.props[t]}},function(e,t,n){"use strict";t.__esModule=!0,t.default=t.modes=void 0;var r,i,o=l(n(120)),a=(l(n(216)),n(603)),s=l(n(604));function l(e){return e&&e.__esModule?e:{default:e}}var c={out:"out-in",in:"in-out"};t.modes=c;var u=function(e,t,n){return function(){var r;e.props[t]&&(r=e.props)[t].apply(r,arguments),n()}},d=((r={})[c.out]=function(e){var t=e.current,n=e.changeState;return o.default.cloneElement(t,{in:!1,onExited:u(t,"onExited",(function(){n(a.ENTERING,null)}))})},r[c.in]=function(e){var t=e.current,n=e.changeState,r=e.children;return[t,o.default.cloneElement(r,{in:!0,onEntered:u(r,"onEntered",(function(){n(a.ENTERING)}))})]},r),h=((i={})[c.out]=function(e){var t=e.children,n=e.changeState;return o.default.cloneElement(t,{in:!0,onEntered:u(t,"onEntered",(function(){n(a.ENTERED,o.default.cloneElement(t,{in:!0}))}))})},i[c.in]=function(e){var t=e.current,n=e.children,r=e.changeState;return[o.default.cloneElement(t,{in:!1,onExited:u(t,"onExited",(function(){r(a.ENTERED,o.default.cloneElement(n,{in:!0}))}))}),o.default.cloneElement(n,{in:!0})]},i),p=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).state={status:a.ENTERED,current:null},t.appeared=!1,t.changeState=function(e,n){void 0===n&&(n=t.state.current),t.setState({status:e,current:n})},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.appeared=!0},r.getDerivedStateFromProps=function(e,t){return null==e.children?{current:null}:t.status===a.ENTERING&&e.mode===c.in?{status:a.ENTERING}:!t.current||(n=t.current,r=e.children,n===r||o.default.isValidElement(n)&&o.default.isValidElement(r)&&null!=n.key&&n.key===r.key)?{current:o.default.cloneElement(e.children,{in:!0})}:{status:a.EXITING};var n,r},i.render=function(){var e,t=this.props,n=t.children,r=t.mode,i=this.state,l=i.status,c=i.current,u={children:n,current:c,changeState:this.changeState,status:l};switch(l){case a.ENTERING:e=h[r](u);break;case a.EXITING:e=d[r](u);break;case a.ENTERED:e=c}return o.default.createElement(s.default.Provider,{value:{isMounting:!this.appeared}},e)},r}(o.default.Component);p.propTypes={},p.defaultProps={mode:c.out};var m=p;t.default=m},function(e,t,n){"use strict";n.r(t),n.d(t,"Icon",(function(){return s}));var r,i,o=n(120);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}function s(e){return o.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 500 500",role:"presentation","aria-hidden":!0},e),r||(r=o.createElement("path",{fill:"#76CFA6",d:"M250 500c138.571 0 250-111.43 250-250C500 111.429 388.571 0 250 0S0 111.429 0 250c0 138.57 111.429 250 250 250z",opacity:.15})),i||(i=o.createElement("path",{fill:"none",stroke:"#76CFA6",strokeWidth:12,strokeMiterlimit:10,d:"M249 430c-98.996 0-180-81.003-180-180 0-98.998 81.005-180 180-180 98.994 0 180 81.001 180 180 0 98.997-81.005 180-180 180zm72.8-200.8c17.685 0 31.201-13.518 31.201-31.2s-13.519-31.2-31.201-31.2c-17.682 0-31.2 13.518-31.2 31.2s13.518 31.2 31.2 31.2zm-145.6 0c17.682 0 31.2-13.518 31.2-31.2s-13.519-31.2-31.2-31.2c-17.683 0-31.201 13.518-31.201 31.2s13.519 31.2 31.201 31.2zM249 364.4c48.883 0 89.436-30.164 106.081-72.801H142.919C159.564 334.236 200.117 364.4 249 364.4z"})))}t.default="img/icons-show-stickers.ad2f6f2.svg"},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(13),i=n.n(r),o=n(1413),a=n(178),s=n(208);class l{constructor(e){var t=this;this.store=e,i()(this,"filter",new o.a),i()(this,"activeSpace",a.a.instance.activeSpace),i()(this,"allRoomsInHome",a.a.instance.allRoomsInHome),i()(this,"onSelectedSpaceUpdated",(function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.allRoomsInHome;if(e===t.activeSpace&&n===t.allRoomsInHome)return;const r=l.needsFilter(t.activeSpace,t.allRoomsInHome),i=l.needsFilter(e,n);t.activeSpace=e,t.allRoomsInHome=n,i&&t.updateFilter(),!r&&i?t.store.addFilter(t.filter):r&&!i&&t.store.removeFilter(t.filter)})),i()(this,"onHomeBehaviourUpdated",(e=>{this.onSelectedSpaceUpdated(this.activeSpace,e)})),i()(this,"updateFilter",(()=>{this.filter.updateSpace(this.activeSpace)})),l.needsFilter(this.activeSpace,this.allRoomsInHome)&&(this.updateFilter(),e.addFilter(this.filter)),a.a.instance.on(s.d,this.onSelectedSpaceUpdated),a.a.instance.on(s.b,this.onHomeBehaviourUpdated)}static needsFilter(e,t){return!(e===s.a.Home&&t)}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return d}));var r=n(13),i=n.n(r),o=n(17),a=n(697),s=n(178),l=n(208),c=n(801),u=n(125);class d extends o.EventEmitter{constructor(){var t;super(...arguments),t=this,i()(this,"roomIds",new Set),i()(this,"userIds",new Set),i()(this,"showPeopleInSpace",!0),i()(this,"space",l.a.Home),i()(this,"onStoreUpdate",(async function(){let n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const r=t.roomIds;t.roomIds=new Set(s.a.instance.getSpaceFilteredRoomIds(t.space));const i=t.userIds;t.userIds=new Set(s.a.instance.getSpaceFilteredUserIds(t.space));const o=t.showPeopleInSpace;t.showPeopleInSpace=Object(l.h)(t.space[0])||u.b.getValue("Spaces.showPeopleInSpace",t.space),(n||o!==t.showPeopleInSpace||Object(c.b)(r,t.roomIds)||Object(c.b)(i,t.userIds))&&(t.emit(a.a),e((()=>{t.emit(a.a)})))}))}isVisible(e){return s.a.instance.isRoomInSpace(this.space,e.roomId)}updateSpace(e){s.a.instance.off(this.space,this.onStoreUpdate),s.a.instance.on(this.space=e,this.onStoreUpdate),this.onStoreUpdate(!0)}destroy(){s.a.instance.off(this.space,this.onStoreUpdate)}}}).call(this,n(54).setImmediate)},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r=n(13),i=n.n(r),o=n(1),a=n(513),s=n(190),l=n(294),c=n(202),u=n(843),d=n(208),h=n(226),p=n(153);const m={[l.b.Alphabetic]:["by_name","by_recency"],[l.b.Recent]:["by_notification_level","by_recency"],[l.b.Manual]:["by_recency"]},g={[s.a.Invite]:{is_invite:!0},[s.a.Favourite]:{tags:["m.favourite"]},[s.a.DM]:{is_dm:!0,is_invite:!1,not_tags:["m.favourite","m.lowpriority"]},[s.a.Untagged]:{is_dm:!1,is_invite:!1,not_room_types:["m.space"],not_tags:["m.favourite","m.lowpriority"]},[s.a.LowPriority]:{tags:["m.lowpriority"],not_tags:["m.favourite"]}},f=u.a.ListsUpdate;class _ extends c.a{constructor(e,t){super(e),this.context=t,i()(this,"tagIdToSortAlgo",{}),i()(this,"tagMap",{}),i()(this,"counts",{}),i()(this,"stickyRoomId",void 0),i()(this,"onSelectedSpaceUpdated",((e,t)=>{var n;o.a.info("SlidingRoomListStore.onSelectedSpaceUpdated",e);const r=s.a.Untagged,i=g[r],a=null===(n=i.spaces)||void 0===n?void 0:n[0];i.spaces=e&&e!=d.a.Home?[e]:void 0,a!==e&&(this.context.spaceStore.traverseSpace(e,(t=>{t!==e&&(i.spaces||(i.spaces=[]),i.spaces.push(t))}),!1),this.emit(h.a,r,!0),this.context.slidingSyncManager.ensureListRegistered(r,{filters:i}).then((()=>{this.emit(h.a,r,!1)})))})),this.setMaxListeners(20)}async setTagSorting(e,t){switch(o.a.info("SlidingRoomListStore.setTagSorting ",e,t),this.tagIdToSortAlgo[e]=t,t){case l.b.Alphabetic:await this.context.slidingSyncManager.ensureListRegistered(e,{sort:m[l.b.Alphabetic]});break;case l.b.Recent:await this.context.slidingSyncManager.ensureListRegistered(e,{sort:m[l.b.Recent]});break;case l.b.Manual:o.a.error("cannot enable manual sort in sliding sync mode");break;default:o.a.error("unknown sort mode: ",t)}}getTagSorting(e){let t=this.tagIdToSortAlgo[e];return t||(o.a.warn("SlidingRoomListStore.getTagSorting: no sort algorithm for tag ",e),t=l.b.Recent),t}getCount(e){return this.counts[e]||0}setListOrder(e,t){}getListOrder(e){return l.a.Natural}async addFilter(e){}removeFilter(e){}getTagsForRoom(e){const t=[];for(const n in this.tagIdToSortAlgo){const r=this.context.slidingSyncManager.slidingSync.getListData(n);if(r)for(const i in r.roomIndexToRoomId){if(r.roomIndexToRoomId[i]===e.roomId){t.push(n);break}}}return t}async manualRoomUpdate(e,t){}get orderedLists(){return this.tagMap}refreshOrderedLists(e,t){const n=this.tagMap;this.stickyRoomId=this.context.roomViewStore.getRoomId();let r=-1;const i=(n[e]||[]).findIndex((e=>e.roomId===this.stickyRoomId)),a=Object.keys(t).map((e=>Number(e))).sort(((e,t)=>e-t)),s=new Set,l=a.map((e=>{const n=t[e];if(s.has(n)&&o.a.error("room "+n+" already has an index position: duplicate room!"),s.add(n),!n)throw new Error("index "+e+" has no room ID: Map => "+JSON.stringify(t));return n===this.stickyRoomId&&(r=e),n}));if(o.a.debug(`SlidingRoomListStore.refreshOrderedLists ${e} sticky: ${this.stickyRoomId}`,`${i} -> ${r}`,"rooms:",l.length<30?l:l.length),this.stickyRoomId&&i>=0&&r>=0){const e=l[i];l[i]=this.stickyRoomId,l[r]=e}const c=[];l.forEach((e=>{const t=this.matrixClient.getRoom(e);t&&c.push(t)})),n[e]=c,this.tagMap=n}onSlidingSyncListUpdate(e,t,n){this.counts[e]=t,this.refreshOrderedLists(e,n),this.emit(f)}onRoomViewStoreUpdated(){if(this.context.roomViewStore.getRoomId()===this.stickyRoomId)return;let e=!1;const t=this.stickyRoomId;for(const n in this.orderedLists){if(this.orderedLists[n].find((e=>e.roomId===t))){const t=this.context.slidingSyncManager.slidingSync.getListData(n);if(!t)continue;this.refreshOrderedLists(n,t.roomIndexToRoomId),e=!0}}this.stickyRoomId=this.context.roomViewStore.getRoomId(),e&&this.emit(f)}async onReady(){o.a.info("SlidingRoomListStore.onReady"),this.context.slidingSyncManager.slidingSync.on(a.f.List,this.onSlidingSyncListUpdate.bind(this)),this.context.roomViewStore.addListener(p.b,this.onRoomViewStoreUpdated.bind(this)),this.context.spaceStore.on(d.d,this.onSelectedSpaceUpdated.bind(this)),this.context.spaceStore.activeSpace&&this.onSelectedSpaceUpdated(this.context.spaceStore.activeSpace,!1),s.b.forEach((e=>{const t=g[e];if(!t)return void o.a.info("SlidingRoomListStore.onReady unsupported list ",e);const n=l.b.Recent;this.tagIdToSortAlgo[e]=n,this.emit(h.a,e,!0),this.context.slidingSyncManager.ensureListRegistered(e,{filters:t,sort:m[n]}).then((()=>{this.emit(h.a,e,!1)}))}))}async resetStore(){}regenerateAllLists(e){let{trigger:t=!0}=e}async onNotReady(){await this.resetStore()}async onAction(e){}async onDispatchAsync(e){}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return f})),n.d(t,"a",(function(){return b}));var r=n(120),i=n.n(r),o=n(121),a=n(162),s=n(122),l=n(124),c=n(128),u=n(198),d=n(148),h=n(600),p=n(280),m=n(309),g=n(237);const f=e=>`call_${e}`;function _(e){let{onClick:t,call:n}=e;const r=Object(p.d)(n);return i.a.createElement(d.a,{className:"mx_IncomingCallToast_joinButton",onClick:t,disabled:null!==r,tooltip:r,kind:"primary"},Object(o.a)("Join"))}function b(e){var t;let{callEvent:n}=e;const b=n.getRoomId(),v=null!==(t=s.a.get().getRoom(b))&&void 0!==t?t:void 0,y=Object(p.a)(b),E=Object(r.useCallback)((()=>{u.a.sharedInstance().dismissToast(f(n.getStateKey()))}),[n]),S=Object(m.a)(v,Object(r.useCallback)((e=>e.getStateEvents(n.getType(),n.getStateKey())),[n]));Object(r.useEffect)((()=>{"m.terminated"in S.getContent()&&E()}),[S,E]),Object(g.a)(l.a,Object(r.useCallback)((e=>{e.action===c.a.ViewRoom&&e.room_id===b&&e.view_call&&E()}),[b,E]));const w=Object(r.useCallback)((e=>{e.stopPropagation(),l.a.dispatch({action:c.a.ViewRoom,room_id:null==v?void 0:v.roomId,view_call:!0,metricsTrigger:void 0}),E()}),[v,E]),T=Object(r.useCallback)((e=>{e.stopPropagation(),E()}),[E]);return i.a.createElement(i.a.Fragment,null,i.a.createElement(a.a,{room:null!=v?v:void 0,height:24,width:24}),i.a.createElement("div",{className:"mx_IncomingCallToast_content"},i.a.createElement("div",{className:"mx_IncomingCallToast_info"},i.a.createElement("span",{className:"mx_IncomingCallToast_room"},v?v.name:Object(o.a)("Unknown room")),i.a.createElement("div",{className:"mx_IncomingCallToast_message"},Object(o.a)("Video call started")),y?i.a.createElement(h.b,{call:y}):i.a.createElement(h.a,{type:h.c.Video,text:Object(o.a)("Video"),active:!1,participantCount:0})),y?i.a.createElement(_,{onClick:w,call:y}):i.a.createElement(d.a,{className:"mx_IncomingCallToast_joinButton",onClick:w,kind:"primary"},Object(o.a)("Join"))),i.a.createElement(d.a,{className:"mx_IncomingCallToast_closeButton",onClick:T,title:Object(o.a)("Close")}))}},function(e,t){e.exports="img/betas/video_rooms.c485b71.png"},function(e,t,n){"use strict";var r=n(171),i=n(31);Object.defineProperty(t,"__esModule",{value:!0}),t.TextInputField=void 0;var o=r(n(853)),a=r(n(854)),s=r(n(855)),l=r(n(856)),c=r(n(857)),u=r(n(13)),d=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(r,a,s):r[a]=e[a]}r.default=e,n&&n.set(e,r);return r}(n(120));function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,c.default)(e);if(t){var i=(0,c.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,l.default)(this,n)}}var m=function(e){(0,s.default)(n,e);var t=p(n);function n(){return(0,o.default)(this,n),t.apply(this,arguments)}return(0,a.default)(n,[{key:"render",value:function(){return n.renderFactory(this.props)}}]),n}(d.PureComponent);t.TextInputField=m,(0,u.default)(m,"renderFactory",(function(e){return d.createElement("label",null,e.label,d.createElement("input",{type:"text",onChange:function(t){return e.onChange(t.target.value)},value:e.value}))}))},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";var r=n(171),i=n(31);Object.defineProperty(t,"__esModule",{value:!0}),t.Spinner=void 0;var o=r(n(853)),a=r(n(854)),s=r(n(855)),l=r(n(856)),c=r(n(857)),u=r(n(13));function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,c.default)(e);if(t){var i=(0,c.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,l.default)(this,n)}}var p=function(e){(0,s.default)(n,e);var t=h(n);function n(){return(0,o.default)(this,n),t.apply(this,arguments)}return(0,a.default)(n,[{key:"render",value:function(){return n.renderFactory()}}]),n}(function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(r,a,s):r[a]=e[a]}r.default=e,n&&n.set(e,r);return r}(n(120)).PureComponent);t.Spinner=p,(0,u.default)(p,"renderFactory",(function(){return null}))},,function(e,t,n){"use strict";var r=n(120),i=n.n(r),o=n(198),a=n(236),s=n(608);t.a=e=>{let{description:t,acceptLabel:n,dismissLabel:r,onAccept:l,onDismiss:c,toastKey:u,numSeconds:d}=e;const h=()=>{c&&c(),o.a.sharedInstance().dismissToast(u)},p=Object(s.a)(h,1e3,d);let m=r;return p>0&&(m+=` (${p})`),i.a.createElement(a.a,{description:t,acceptLabel:n,onAccept:l,rejectLabel:m,onReject:h})}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));class r{async supportsEventIndexing(){return!0}async initEventIndex(e,t){throw new Error("Unimplemented")}async addEventToIndex(e,t){throw new Error("Unimplemented")}async deleteEvent(e){throw new Error("Unimplemented")}async isEventIndexEmpty(){throw new Error("Unimplemented")}indexIsEmpty(){throw new Error("Unimplemented")}isRoomIndexed(e){throw new Error("Unimplemented")}async getStats(){throw new Error("Unimplemented")}async getUserVersion(){throw new Error("Unimplemented")}async setUserVersion(e){throw new Error("Unimplemented")}async commitLiveEvents(){throw new Error("Unimplemented")}async searchEventIndex(e){throw new Error("Unimplemented")}async addHistoricEvents(e,t,n){throw new Error("Unimplemented")}async addCrawlerCheckpoint(e){throw new Error("Unimplemented")}async removeCrawlerCheckpoint(e){throw new Error("Unimplemented")}async loadCheckpoints(){throw new Error("Unimplemented")}async loadFileEvents(e){throw new Error("Unimplemented")}async closeEventIndex(){throw new Error("Unimplemented")}async deleteEventIndex(){throw new Error("Unimplemented")}}},function(e,t){(function(t){e.exports=t}).call(this,{})},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"b",(function(){return x})),n.d(t,"a",(function(){return D}));var r=n(13),i=n.n(r),o=n(16),a=n(17),s=n(1),l=n(164),c=n(146),u=n(190),d=n(242),h=n(294);var p=n(435);const m={[h.b.Recent]:new p.a,[h.b.Alphabetic]:new class{sortRooms(e,t){return e.sort(((e,t)=>Object(o.h)(e.name,t.name)))}},[h.b.Manual]:new class{sortRooms(e,t){const n=e=>e.tags[t].order||0;return e.sort(((e,t)=>n(e)-n(t)))}}};function g(e,t,n){return function(e){if(!m[e])throw new Error(`${e} is not a known algorithm`);return m[e]}(n).sortRooms(e,t)}class f{constructor(e,t){this.tagId=e,i()(this,"cachedOrderedRooms",void 0),i()(this,"sortingAlgorithm",void 0),this.setSortAlgorithm(t)}get orderedRooms(){return this.cachedOrderedRooms||[]}setSortAlgorithm(e){if(!e)throw new Error("A sorting algorithm must be defined");this.sortingAlgorithm=e,this.setRooms(this.orderedRooms)}getRoomIndex(e){let t=this.cachedOrderedRooms.indexOf(e);return-1===t&&(s.a.warn(`Degrading performance to find missing room in "${this.tagId}": ${e.roomId}`),t=this.cachedOrderedRooms.findIndex((t=>t.roomId===e.roomId))),t}}var _=n(197),b=n(220);const v=[_.a.Unsent,_.a.Red,_.a.Grey,_.a.Bold,_.a.None];class y extends f{constructor(e,t){super(e,t),i()(this,"indices",{})}categorizeRooms(e){const t={[_.a.Unsent]:[],[_.a.Red]:[],[_.a.Grey]:[],[_.a.Bold]:[],[_.a.None]:[]};for(const n of e){t[this.getRoomCategory(n)].push(n)}return t}getRoomCategory(e){return b.a.instance.getRoomState(e).color}setRooms(e){if(this.sortingAlgorithm===h.b.Manual)this.cachedOrderedRooms=g(e,this.tagId,this.sortingAlgorithm);else{const t=this.categorizeRooms(e);for(const e of Object.keys(t)){const n=e,r=t[n];t[n]=g(r,this.tagId,this.sortingAlgorithm)}const n=[],r={};for(const e of v)r[e]=n.length,n.push(...t[e]);this.indices=r,this.cachedOrderedRooms=n}}handleSplice(e,t){if(t===u.c.NewRoom){const t=this.getRoomCategory(e);this.alterCategoryPositionBy(t,1,this.indices),this.cachedOrderedRooms.splice(this.indices[t],0,e),this.sortCategory(t)}else{if(t!==u.c.RoomRemoved)throw new Error(`Unhandled splice: ${t}`);{const t=this.getRoomIndex(e);if(-1===t)return s.a.warn(`Tried to remove unknown room from ${this.tagId}: ${e.roomId}`),!1;const n=this.getCategoryFromIndices(t,this.indices);this.alterCategoryPositionBy(n,-1,this.indices),this.cachedOrderedRooms.splice(t,1)}}return!0}handleRoomUpdate(e,t){if(t===u.c.NewRoom||t===u.c.RoomRemoved)return this.handleSplice(e,t);if(t!==u.c.Timeline&&t!==u.c.ReadReceipt)throw new Error(`Unsupported update cause: ${t}`);const n=this.getRoomCategory(e);if(this.sortingAlgorithm===h.b.Manual)return;const r=this.getRoomIndex(e);if(-1===r)throw new Error(`Room ${e.roomId} has no index in ${this.tagId}`);const i=this.getCategoryFromIndices(r,this.indices);return i!==n&&(this.moveRoomIndexes(1,i,n,this.indices),this.cachedOrderedRooms.splice(r,1),this.cachedOrderedRooms.splice(this.indices[n],0,e)),this.sortCategory(n),!0}sortCategory(e){const t=e===v[v.length-1]?Number.MAX_SAFE_INTEGER:this.indices[v[v.indexOf(e)+1]],n=this.indices[e],r=t-n,i=g(this.cachedOrderedRooms.splice(n,r),this.tagId,this.sortingAlgorithm);this.cachedOrderedRooms.splice(n,0,...i)}getCategoryFromIndices(e,t){for(let n=0;n<v.length;n++){const r=v[n],i=n===v.length-1,o=t[r],a=i?Number.MAX_SAFE_INTEGER:t[v[n+1]];if(e>=o&&e<a)return r}throw new Error("Programming error: somehow you've ended up with an index that isn't in a category")}moveRoomIndexes(e,t,n,r){this.alterCategoryPositionBy(t,-e,r),this.alterCategoryPositionBy(n,+e,r)}alterCategoryPositionBy(e,t,n){const r=v.indexOf(e)+1;if(t>0)for(let e=r;e<v.length;e++){n[v[e]]+=Math.abs(t)}else if(t<0)for(let e=r;e<v.length;e++){n[v[e]]-=Math.abs(t)}for(let e=1;e<=v.length;e++){const t=v[e-1],r=v[e];n[t]>n[r]&&s.a.warn(`!! Room list index corruption: ${t} (i:${n[t]}) is greater than ${r} (i:${n[r]}) - category indices are likely desynced from reality`)}}}class E extends f{constructor(e,t){super(e,t)}setRooms(e){this.cachedOrderedRooms=g(e,this.tagId,this.sortingAlgorithm)}handleRoomUpdate(e,t){const n=t===u.c.NewRoom||t===u.c.RoomRemoved,r=t===u.c.Timeline||t===u.c.ReadReceipt;if(!n&&!r)throw new Error(`Unsupported update cause: ${t}`);if(t===u.c.NewRoom)this.cachedOrderedRooms.push(e);else if(t===u.c.RoomRemoved){const t=this.getRoomIndex(e);t>=0?this.cachedOrderedRooms.splice(t,1):s.a.warn(`Tried to remove unknown room from ${this.tagId}: ${e.roomId}`)}return this.cachedOrderedRooms=g(this.cachedOrderedRooms,this.tagId,this.sortingAlgorithm),!0}}const S={[h.a.Natural]:(e,t)=>new E(e,t),[h.a.Importance]:(e,t)=>new y(e,t)};function w(e,t,n){if(!S[e])throw new Error(`${e} is not a known algorithm`);return S[e](t,n)}var T=n(656),C=n(306);const x="list_updated_event",F=[u.c.Timeline,u.c.ReadReceipt];class D extends a.EventEmitter{constructor(){super(...arguments),i()(this,"_cachedRooms",{}),i()(this,"_cachedStickyRooms",{}),i()(this,"_stickyRoom",null),i()(this,"_lastStickyRoom",null),i()(this,"sortAlgorithms",null),i()(this,"listAlgorithms",null),i()(this,"algorithms",null),i()(this,"rooms",[]),i()(this,"roomIdsToTags",{}),i()(this,"updatesInhibited",!1),i()(this,"onActiveCalls",(()=>{this.recalculateStickyRoom(),this.recalculateActiveCallRooms(),this.updatesInhibited||this.emit(x,!0)}))}start(){C.a.instance.on(C.b.ActiveCalls,this.onActiveCalls)}stop(){C.a.instance.off(C.b.ActiveCalls,this.onActiveCalls)}get stickyRoom(){return this._stickyRoom?this._stickyRoom.room:null}get knownRooms(){return this.rooms}get hasTagSortingMap(){return!!this.sortAlgorithms}set cachedRooms(e){this._cachedRooms=e,this.recalculateStickyRoom(),this.recalculateActiveCallRooms()}get cachedRooms(){return this._cachedRooms}setStickyRoom(e){try{this.updateStickyRoom(e)}catch(e){s.a.warn("Failed to update sticky room",e)}}getTagSorting(e){return this.sortAlgorithms?this.sortAlgorithms[e]:null}setTagSorting(e,t){if(!e)throw new Error("Tag ID must be defined");if(!t)throw new Error("Algorithm must be defined");if(!this.sortAlgorithms)throw new Error("this.sortAlgorithms must be defined before calling setTagSorting");if(!this.algorithms)throw new Error("this.algorithms must be defined before calling setTagSorting");this.sortAlgorithms[e]=t;const n=this.algorithms[e];n.setSortAlgorithm(t),this._cachedRooms[e]=n.orderedRooms,this.recalculateStickyRoom(e),this.recalculateActiveCallRooms(e)}getListOrdering(e){return this.listAlgorithms?this.listAlgorithms[e]:null}setListOrdering(e,t){if(!e)throw new Error("Tag ID must be defined");if(!t)throw new Error("Algorithm must be defined");if(!this.sortAlgorithms)throw new Error("this.sortAlgorithms must be defined before calling setListOrdering");if(!this.listAlgorithms)throw new Error("this.listAlgorithms must be defined before calling setListOrdering");if(!this.algorithms)throw new Error("this.algorithms must be defined before calling setListOrdering");this.listAlgorithms[e]=t;const n=w(t,e,this.sortAlgorithms[e]);this.algorithms[e]=n,n.setRooms(this._cachedRooms[e]),this._cachedRooms[e]=n.orderedRooms,this.recalculateStickyRoom(e),this.recalculateActiveCallRooms(e)}updateStickyRoom(e){this.doUpdateStickyRoom(e),this._lastStickyRoom=null}doUpdateStickyRoom(e){var t,n;if(null!==(t=e)&&void 0!==t&&t.isSpaceRoom()&&"invite"!==e.getMyMembership()&&(e=null),e&&!T.a.instance.isRoomVisible(e)&&(e=null),this._lastStickyRoom=this._stickyRoom||{},!e){if(this._stickyRoom){const e=this._stickyRoom.room;return this._stickyRoom=null,void this.handleRoomUpdate(e,u.c.NewRoom)}return}let r=null===(n=this.roomIdsToTags[e.roomId])||void 0===n?void 0:n[0];if(!r)throw new Error(`${e.roomId} does not belong to a tag and cannot be sticky`);let i=(this.getOrderedRoomsWithoutSticky()[r]||[]).indexOf(e);const o=!!this._lastStickyRoom.room&&this._lastStickyRoom.room.roomId===e.roomId;if(this._lastStickyRoom.tag&&r!==this._lastStickyRoom.tag&&o&&i<0&&(s.a.warn(`Sticky room ${e.roomId} changed tags during sticky room handling`),i=0),i<0)throw new Error(`${e.roomId} does not appear to be known and cannot be sticky`);const a=this._stickyRoom;if(this._stickyRoom=null,this.recalculateStickyRoom(),a&&a.room&&a.room.roomId!==e.roomId&&this.handleRoomUpdate(a.room,u.c.NewRoom),this.handleRoomUpdate(e,u.c.RoomRemoved),this._stickyRoom=this.stickyRoomMightBeModified(),this._stickyRoom){if(this._stickyRoom.room!==e){if(this._stickyRoom.room.roomId!==e.roomId)throw new Error("Sticky room changed while the sticky room was changing");s.a.warn("Sticky room changed references")}s.a.warn(`Sticky room changed tag & position from ${r} / ${i} to ${this._stickyRoom.tag} / ${this._stickyRoom.position}`),r=this._stickyRoom.tag,i=this._stickyRoom.position}a&&a.tag===r&&a.position<=i&&i++,this._stickyRoom={room:e,position:i,tag:r},this.recalculateStickyRoom(),this.recalculateActiveCallRooms(r),a&&a.tag!==r&&this.recalculateActiveCallRooms(a.tag),this.updatesInhibited||this.emit(x)}stickyRoomMightBeModified(){return this._stickyRoom}initCachedStickyRooms(){this._cachedStickyRooms={};for(const e of Object.keys(this.cachedRooms))this._cachedStickyRooms[e]=[...this.cachedRooms[e]]}recalculateStickyRoom(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!this._stickyRoom){if(this._cachedStickyRooms){if(this._cachedStickyRooms=null,this.updatesInhibited)return;this.emit(x)}return}this._cachedStickyRooms&&e||this.initCachedStickyRooms(),e&&this._cachedStickyRooms&&(this._cachedStickyRooms[e]=[...this.cachedRooms[e]]);const t=this._stickyRoom;!t||e&&e!==t.tag||!this._cachedStickyRooms||this._cachedStickyRooms[t.tag].splice(t.position,0,t.room),this.updatesInhibited||this.emit(x)}recalculateActiveCallRooms(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(e){if(C.a.instance.activeCalls.size){this._cachedStickyRooms||this.initCachedStickyRooms();const t=this._cachedStickyRooms[e],n=new Set([...C.a.instance.activeCalls].map((e=>e.roomId))),r=[],i=[];for(const e of t)(n.has(e.roomId)?r:i).push(e);this._cachedStickyRooms[e]=[...r,...i]}}else for(const e of Object.keys(this.cachedRooms)){if(!e)throw new Error("Unexpected recursion: falsy tag");this.recalculateActiveCallRooms(e)}}populateTags(e,t){if(!e)throw new Error("Sorting map cannot be null or empty");if(!t)throw new Error("Ordering ma cannot be null or empty");if(Object(c.d)(Object.keys(e),Object.keys(t)))throw new Error("Both maps must contain the exact same tags");this.sortAlgorithms=e,this.listAlgorithms=t,this.algorithms={};for(const t of Object.keys(e))this.algorithms[t]=w(this.listAlgorithms[t],t,this.sortAlgorithms[t]);return this.setKnownRooms(this.rooms)}getOrderedRooms(){return this._cachedStickyRooms||this.cachedRooms}getOrderedRoomsWithoutSticky(){return this.cachedRooms}setKnownRooms(e){if(Object(o.u)(e))throw new Error("Array of rooms cannot be null");if(!this.sortAlgorithms)throw new Error("Cannot set known rooms without a tag sorting map");this.updatesInhibited||s.a.warn("Resetting known rooms, initiating regeneration");const t=this._stickyRoom;t&&this.updateStickyRoom(null),this.rooms=e;const n={};for(const e in this.sortAlgorithms)n[e]=[];if(!e.length)return this.generateFreshTags(n),void(this.cachedRooms=n);const r=Object(d.d)(e);for(const e of r[d.a.Invite])n[u.a.Invite].push(e);for(const e of r[d.a.Leave])n[u.a.Archived].push(e);for(const e of r[d.a.Join]){const t=this.getTagsOfJoinedRoom(e);let r=!1;if(t.length>0)for(const i of t)Object(o.u)(n[i])||(n[i].push(e),r=!0);r||(l.a.shared().getUserIdForRoomId(e.roomId)?n[u.a.DM].push(e):n[u.a.Untagged].push(e))}this.generateFreshTags(n),this.cachedRooms=n,this.updateTagsFromCache(),t&&t.room&&(this.updateStickyRoom(t.room),this._stickyRoom&&this._stickyRoom.room&&this._stickyRoom.tag!==t.tag&&(this._stickyRoom.position=0,this.recalculateStickyRoom(this._stickyRoom.tag)))}getTagsForRoom(e){const t=[],n=Object(d.b)(e.getMyMembership());return n===d.a.Invite?t.push(u.a.Invite):n===d.a.Leave?t.push(u.a.Archived):t.push(...this.getTagsOfJoinedRoom(e)),t.length||t.push(u.a.Untagged),t}getTagsOfJoinedRoom(e){let t=Object.keys(e.tags||{});return 0===t.length&&l.a.shared().getUserIdForRoomId(e.roomId)&&(t=[u.a.DM]),t}updateTagsFromCache(){const e={},t=Object.keys(this.cachedRooms);for(const n of t){const t=this.cachedRooms[n];for(const r of t)e[r.roomId]||(e[r.roomId]=[]),e[r.roomId].push(n)}this.roomIdsToTags=e}generateFreshTags(e){if(!this.algorithms)throw new Error("Not ready: no algorithms to determine tags from");for(const t of Object.keys(e)){const n=this.algorithms[t];if(!n)throw new Error(`No algorithm for ${t}`);n.setRooms(e[t]),e[t]=n.orderedRooms}}handleRoomUpdate(e,t){var n,r;if(!this.algorithms)throw new Error("Not ready: no algorithms to determine tags from");const i=(null===(n=this._stickyRoom)||void 0===n||null===(r=n.room)||void 0===r?void 0:r.roomId)===e.roomId;if(t===u.c.NewRoom){var a;const n=(null===(a=this._lastStickyRoom)||void 0===a?void 0:a.room)===e,r=this.roomIdsToTags[e.roomId],o=r&&r.length>0;o&&!n&&(s.a.warn(`${e.roomId} is reportedly new but is already known - assuming TagChange instead`),t=u.c.PossibleTagChange);let l=this.rooms.includes(e);if(o&&!l&&(s.a.warn(`${e.roomId} might be a reference change - attempting to update reference`),this.rooms=this.rooms.map((t=>t.roomId===e.roomId?e:t)),l=this.rooms.includes(e),l||s.a.warn(`${e.roomId} is still not referenced. It may be sticky.`)),o&&!l&&!i)throw new Error(`${e.roomId} is missing from room array but is known - trying to find duplicate`);o&&i&&this._stickyRoom&&(this._stickyRoom.room=e),t!==u.c.NewRoom||i||l||this.rooms.push(e)}let l=!1;if(t===u.c.PossibleTagChange){const n=this.roomIdsToTags[e.roomId]||[],r=this.getTagsForRoom(e),o=Object(c.a)(n,r);if(!(o.removed.length>0||o.added.length>0))return!1;for(const t of o.removed){const n=this.algorithms[t];if(!n)throw new Error(`No algorithm for ${t}`);n.handleRoomUpdate(e,u.c.RoomRemoved),this._cachedRooms[t]=n.orderedRooms,this.recalculateStickyRoom(t),this.recalculateActiveCallRooms(t)}for(const t of o.added){const n=this.algorithms[t];if(!n)throw new Error(`No algorithm for ${t}`);n.handleRoomUpdate(e,u.c.NewRoom),this._cachedRooms[t]=n.orderedRooms}this.roomIdsToTags[e.roomId]=r,t=u.c.Timeline,l=!0,l&&i&&(this._lastStickyRoom?this._stickyRoom={room:e,tag:this.roomIdsToTags[e.roomId][0],position:0}:this.setStickyRoom(e))}if(t!==u.c.NewRoom&&t!==u.c.RoomRemoved&&this.stickyRoom===e)return!1;if(!this.roomIdsToTags[e.roomId]){if(F.includes(t))return!1;const n=this.getTagsForRoom(e).filter((e=>!Object(o.u)(this.cachedRooms[e])));if(!n.length)throw new Error(`Tags cannot be determined for ${e.roomId}`);this.roomIdsToTags[e.roomId]=n}const d=this.roomIdsToTags[e.roomId];if(!d)return s.a.warn(`No tags known for "${e.name}" (${e.roomId})`),!1;let h=l;for(const n of d){const r=this.algorithms[n];if(!r)throw new Error(`No algorithm for ${n}`);r.handleRoomUpdate(e,t),this._cachedRooms[n]=r.orderedRooms,this.recalculateStickyRoom(n),this.recalculateActiveCallRooms(n),h=!0}return h}}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return V}));var r=n(13),i=n.n(r),o=n(120),a=n.n(o),s=n(129),l=n(16),c=n(1),u=n(122),d=n(121),h=n(165),p=n(125),m=n(135),g=n(380),f=n(134),_=n(143),b=n(126),v=n.n(b),y=n(196),E=n(1338),S=n(1339);const w=function(){let e;return function(t){return e||(e=document.createElement("textarea")),e.innerHTML=t,e.value}}();function T(e){const t={stripReplyFallback:!0,returnString:!0};return"org.matrix.custom.html"===e.format?Object(y.c)(e,null,t):function(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}(Object(y.c)(e,null,t))}function C(e){const t=document.createElement(Object(y.d)(e)?"div":"span");return t.className="mx_EditHistoryMessage_insertion",t.appendChild(e),t}function x(e){const t=document.createElement(Object(y.d)(e)?"div":"span");return t.className="mx_EditHistoryMessage_deletion",t.appendChild(e),t}function F(e){if("#text"===e.nodeName)return I(e.data);{const t=document.createElement(e.nodeName);for(const[n,r]of Object.entries(e.attributes))t.setAttribute(n,r.value);for(const n of e.childNodes)t.appendChild(F(n));return t}}function D(e,t,n){t?e.insertBefore(n,t):e.appendChild(n)}function k(e,t){for(let n=0;n<e.length-1;++n)if(e[n]!==t[n])return!1;const n=e.length-1;return t[n]>=e[n]}function O(e,t){if("removeTextElement"===e.action||"removeElement"===e.action){const n=1;for(const r of t)k(e.route,r.route)&&(r.route[e.route.length-1]+=n)}}function I(e){return document.createTextNode(w(e))}function A(e,t,n){const{refNode:r,refParentNode:i}=function(e,t){let n,r=e;const i=arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t.length-1:t.length;for(let e=0;e<i;++e){var o;n=r,r=null===(o=r)||void 0===o?void 0:o.childNodes[t[e]]}return{refNode:r,refParentNode:n}}(e,t.route);switch(t.action){case"replaceElement":{if(!r)return void console.warn("Unable to apply replaceElement operation due to missing node");const e=document.createElement("span"),n=x(F(t.oldValue)),i=C(F(t.newValue));e.appendChild(n),e.appendChild(i),r.parentNode.replaceChild(e,r);break}case"removeTextElement":{if(!r)return void console.warn("Unable to apply removeTextElement operation due to missing node");const e=x(I(t.value));r.parentNode.replaceChild(e,r);break}case"removeElement":{if(!r)return void console.warn("Unable to apply removeElement operation due to missing node");const e=x(F(t.element));r.parentNode.replaceChild(e,r);break}case"modifyTextElement":{if(!r)return void console.warn("Unable to apply modifyTextElement operation due to missing node");const e=n.diff_main(t.oldValue,t.newValue);n.diff_cleanupSemantic(e);const i=document.createElement("span");for(const[t,n]of e){let e=I(n);t<0?e=x(e):t>0&&(e=C(e)),i.appendChild(e)}r.parentNode.replaceChild(i,r);break}case"addElement":if(!i)return void console.warn("Unable to apply addElement operation due to missing node");D(i,r,C(F(t.element)));break;case"addTextElement":if(!i)return void console.warn("Unable to apply addTextElement operation due to missing node");D(i,r,C(I("\n"!==t.value?t.value:"")));break;case"removeAttribute":case"addAttribute":case"modifyAttribute":{if(!r)return void console.warn(`Unable to apply ${t.action} operation due to missing node`);const e=x(r.cloneNode(!0)),n=r.cloneNode(!0);"addAttribute"===t.action||"modifyAttribute"===t.action?n.setAttribute(t.name,t.newValue):n.removeAttribute(t.name);const i=C(n),o=document.createElement(Object(y.d)(r)?"div":"span");o.appendChild(e),o.appendChild(i),r.parentNode.replaceChild(o,r);break}default:c.a.warn("MessageDiffUtils::editBodyDiffToHtml: diff action not supported atm",t)}}var R=n(738),N=n(754),M=n(127),P=n(527),L=n(123),B=n(377),U=n(144);class j extends a.a.PureComponent{constructor(e){super(e),i()(this,"onParentFinished",(async e=>{if(e){this.setState({isRedacting:!0});try{await this.props.redact(),this.props.onFinished(!0)}catch(e){const t=e.errcode||e.statusCode;void 0!==t?this.setState({redactionErrorCode:t}):this.props.onFinished(!0)}}else this.props.onFinished(!1)})),this.state={isRedacting:!1,redactionErrorCode:null}}render(){if(this.state.isRedacting){if(this.state.redactionErrorCode){const e=this.state.redactionErrorCode;return a.a.createElement(U.a,{onFinished:this.props.onFinished,title:Object(d.a)("Error"),description:Object(d.a)("You cannot delete this message. (%(code)s)",{code:e})})}return a.a.createElement(m.a,{onFinished:this.props.onFinished,hasCancel:!1,title:Object(d.a)("Removing…")},a.a.createElement(f.a,null))}return a.a.createElement(B.b,{onFinished:this.onParentFinished})}}var G=n(554);function z(e){const t=e.getOriginalContent();return t["m.new_content"]||t}class H extends a.a.PureComponent{constructor(e){super(e),i()(this,"content",Object(o.createRef)()),i()(this,"pills",[]),i()(this,"tooltips",[]),i()(this,"onAssociatedStatusChanged",(()=>{this.setState({sendStatus:this.props.mxEvent.getAssociatedStatus()})})),i()(this,"onRedactClick",(async()=>{const e=this.props.mxEvent,t=u.a.get();M.b.createDialog(j,{redact:async()=>{await t.redactEvent(e.getRoomId(),e.getId())}},"mx_Dialog_confirmredact")})),i()(this,"onViewSourceClick",(()=>{M.b.createDialog(G.a,{mxEvent:this.props.mxEvent},"mx_Dialog_viewsource")}));const t=u.a.get(),{userId:n}=t.credentials,r=this.props.mxEvent,a=t.getRoom(r.getRoomId());r.localRedactionEvent()&&r.localRedactionEvent().on(_.c.Status,this.onAssociatedStatusChanged);const s=a.currentState.maySendRedactionForEvent(r,n);this.state={canRedact:s,sendStatus:r.getAssociatedStatus()}}pillifyLinks(){this.content.current&&Object(R.a)(this.content.current.children,this.props.mxEvent,this.pills)}tooltipifyLinks(){this.content.current&&Object(N.a)(this.content.current.children,this.pills,this.tooltips)}componentDidMount(){this.pillifyLinks(),this.tooltipifyLinks()}componentWillUnmount(){Object(R.b)(this.pills),Object(N.b)(this.tooltips);const e=this.props.mxEvent;e.localRedactionEvent()&&e.localRedactionEvent().off(_.c.Status,this.onAssociatedStatusChanged)}componentDidUpdate(){this.pillifyLinks(),this.tooltipifyLinks()}renderActionBar(){let e,t;return this.props.mxEvent.isRedacted()||this.props.isBaseEvent||!this.state.canRedact||(e=a.a.createElement(L.a,{onClick:this.onRedactClick},Object(d.a)("Remove"))),p.b.getValue("developerMode")&&(t=a.a.createElement(L.a,{onClick:this.onViewSourceClick},Object(d.a)("View Source"))),a.a.createElement("div",{className:"mx_MessageActionBar"},e,t)}render(){const{mxEvent:e}=this.props,t=z(e);let n;if(e.isRedacted())n=a.a.createElement(P.a,{mxEvent:this.props.mxEvent});else{let r;if(r=this.props.previousEdit?function(e,t){const n=`<div>${T(e)}</div>`,r=`<div>${T(t)}</div>`,i=(new S.DiffDOM).diff(n,r),o=new E.diff_match_patch,s=(new DOMParser).parseFromString(n,"text/html").body.children[0];for(let e=0;e<i.length;++e){const t=i[e];A(s,t,o),O(t,i.slice(e+1))}const l=s.innerHTML,c=v()({mx_EventTile_body:!0,"markdown-body":!0});return a.a.createElement("span",{key:"body",className:c,dangerouslySetInnerHTML:{__html:l},dir:"auto"})}(z(this.props.previousEdit),t):y.c(t,null,{stripReplyFallback:!0,returnString:!1}),"m.emote"===e.getContent().msgtype){const t=e.sender?e.sender.name:e.getSender();n=a.a.createElement("div",{className:"mx_EventTile_content",ref:this.content},"* ",a.a.createElement("span",{className:"mx_MEmoteBody_sender"},t)," ",r)}else n=a.a.createElement("div",{className:"mx_EventTile_content",ref:this.content},r)}const r=Object(h.m)(new Date(e.getTs()),this.props.isTwelveHour),i=-1!==["sending","queued","encrypting"].indexOf(this.state.sendStatus),o=v()({mx_EventTile:!0,mx_EventTile_sending:i});return a.a.createElement("li",null,a.a.createElement("div",{className:o},a.a.createElement("div",{className:"mx_EventTile_line"},a.a.createElement("span",{className:"mx_MessageTimestamp"},r),n,this.renderActionBar())))}}var q=n(501);class V extends a.a.PureComponent{constructor(e){super(e),i()(this,"loadMoreEdits",(async e=>{if(e||!this.state.nextBatch&&!this.state.isLoading)return!1;const t={from:this.state.nextBatch},n=this.props.mxEvent.getRoomId(),r=this.props.mxEvent.getId(),i=u.a.get(),{resolve:o,reject:a,promise:d}=Object(l.m)();let h;try{h=await i.relations(n,r,s.h.Replace,s.b.RoomMessage,t)}catch(e){return e.errcode&&c.a.error("fetching /relations failed with error",e),this.setState({error:e},(()=>a(e))),d}const p=h.events;return this.locallyRedactEventsIfNeeded(p),this.setState({originalEvent:this.state.originalEvent||h.originalEvent,events:this.state.events.concat(p),nextBatch:h.nextBatch,isLoading:!1},(()=>{const e=!!this.state.nextBatch;o(e)})),d})),this.state={originalEvent:null,error:null,events:[],nextBatch:null,isLoading:!0,isTwelveHour:p.b.getValue("showTwelveHourTimestamps")}}locallyRedactEventsIfNeeded(e){const t=this.props.mxEvent.getRoomId(),n=u.a.get().getRoom(t).getPendingEvents();for(const t of e){const e=n.find((e=>e.getType()===s.b.RoomRedaction&&e.getAssociatedId()===t.getId()));e&&t.markLocallyRedacted(e)}}componentDidMount(){this.loadMoreEdits()}renderEdits(){const e=[];let t,n=this.state.events;this.state.originalEvent&&!this.state.nextBatch&&(n=n.concat(this.state.originalEvent));const r=this.props.mxEvent.getId();return n.forEach(((i,o)=>{t&&!Object(h.o)(t.getDate()||void 0,i.getDate()||void 0)||e.push(a.a.createElement("li",{key:i.getTs()+"~"},a.a.createElement(q.a,{roomId:i.getRoomId(),ts:i.getTs()})));const s=i.getId()===r;e.push(a.a.createElement(H,{key:i.getId(),previousEdit:s?null:n[o+1],isBaseEvent:s,mxEvent:i,isTwelveHour:this.state.isTwelveHour})),t=i})),e}render(){let e;if(this.state.error){const{error:t}=this.state;e="M_UNRECOGNIZED"===t.errcode?a.a.createElement("p",{className:"mx_MessageEditHistoryDialog_error"},Object(d.a)("Your homeserver doesn't seem to support this feature.")):t.errcode?a.a.createElement("p",{className:"mx_MessageEditHistoryDialog_error"},Object(d.a)("Something went wrong!")):a.a.createElement("p",{className:"mx_MessageEditHistoryDialog_error"},Object(d.a)("Cannot reach homeserver"),a.a.createElement("br",null),Object(d.a)("Ensure you have a stable internet connection, or get in touch with the server admin"))}else e=this.state.isLoading?a.a.createElement(f.a,null):a.a.createElement(g.a,{className:"mx_MessageEditHistoryDialog_scrollPanel",onFillRequest:this.loadMoreEdits,stickyBottom:!1,startAtBottom:!1},a.a.createElement("ul",{className:"mx_MessageEditHistoryDialog_edits"},this.renderEdits()));return a.a.createElement(m.a,{className:"mx_MessageEditHistoryDialog",hasCancel:!0,onFinished:this.props.onFinished,title:Object(d.a)("Message edits")},e)}}},,,function(e,t,n){"use strict";var r=n(120),i=n.n(r),o=n(1),a=n(397),s=n(13),l=n.n(s),c=n(549),u=n(196),d=n(125),h=n(127);var p=n(166),m=n(406),g=n(755),f=n(157);class _ extends i.a.Component{constructor(){super(...arguments),l()(this,"image",Object(r.createRef)()),l()(this,"onImageClick",(e=>{const t=this.props.preview;if(0!=e.button||e.metaKey)return;e.preventDefault();let n=t["og:image"];n&&n.startsWith("mxc://")&&(n=Object(p.b)(n).srcHttp);const r={src:n,width:t["og:image:width"],height:t["og:image:height"],name:t["og:title"]||t["og:description"]||this.props.link,fileSize:t["matrix:image:size"],link:this.props.link};if(this.image.current){const e=this.image.current.getBoundingClientRect();r.thumbnailInfo={width:e.width,height:e.height,positionX:e.x,positionY:e.y}}h.b.createDialog(m.a,r,"mx_Dialog_lightbox",null,!0)}))}render(){var e,t,n;const r=this.props.preview;if(!r||0===Object.keys(r).length)return i.a.createElement("div",null);let o=r["og:image"];d.b.getValue("showImages")||(o=null);const a=100;o&&o.startsWith("mxc://")&&(o=Object(p.b)(o).getThumbnailOfSourceHttp(100,a,"scale"));let s,l=a;r["og:image:width"]&&r["og:image:height"]&&(l=function(e,t,n,r){if(!e||!t)return null;if(e<n&&t<r)return t;const i=n/e,o=r/t;return i<o?Math.floor(i*t):Math.floor(o*t)}(r["og:image:width"],r["og:image:height"],100,a)),o&&(s=i.a.createElement("div",{className:"mx_LinkPreviewWidget_image",style:{height:l}},i.a.createElement("img",{ref:this.image,style:{maxWidth:100,maxHeight:a},src:o,onClick:this.onImageClick,alt:""})));const h=Object(c.decode)(r["og:description"]||""),m=null!==(e=null===(t=r["og:title"])||void 0===t?void 0:t.trim())&&void 0!==e?e:"",_=i.a.createElement("a",{href:this.props.link,target:"_blank",rel:"noreferrer noopener"},m),b=(null===(n=f.a.get())||void 0===n?void 0:n.needsUrlTooltips())&&this.props.link!==m;return i.a.createElement("div",{className:"mx_LinkPreviewWidget"},i.a.createElement("div",{className:"mx_LinkPreviewWidget_wrapImageCaption"},s,i.a.createElement("div",{className:"mx_LinkPreviewWidget_caption"},i.a.createElement("div",{className:"mx_LinkPreviewWidget_title"},b?i.a.createElement(g.a,{tooltip:new URL(this.props.link,window.location.href).toString()},_):_,r["og:site_name"]&&i.a.createElement("span",{className:"mx_LinkPreviewWidget_siteName"}," - "+r["og:site_name"])),i.a.createElement("div",{className:"mx_LinkPreviewWidget_description"},i.a.createElement(u.a,null,h)))),this.props.children)}}var b=n(123),v=n(121),y=n(133),E=n(248);const S=(e,t,n)=>Promise.all(t.map((async t=>{try{const r=await e.getUrlPreview(t,n);if(r&&Object.keys(r).length>0)return[t,r]}catch(e){o.a.error("Failed to get URL preview: "+e)}}))).then((e=>e.filter(Boolean)));t.a=e=>{let{links:t,mxEvent:o,onCancelClick:s,onHeightChanged:l}=e;const c=Object(r.useContext)(y.a),[u,d]=Object(a.a)(),h=o.getTs(),p=Object(E.a)((async()=>S(c,t,h)),[t,h],[]);Object(r.useEffect)((()=>{l()}),[l,u,p]);const m=u?p:p.slice(0,2);let g;return p.length>2&&(g=i.a.createElement(b.a,{onClick:d},u?Object(v.a)("Collapse"):Object(v.a)("Show %(count)s other previews",{count:p.length-m.length}))),i.a.createElement("div",{className:"mx_LinkPreviewGroup"},m.map(((e,t)=>{let[r,a]=e;return i.a.createElement(_,{key:r,link:r,preview:a,mxEvent:o},0===t?i.a.createElement(b.a,{className:"mx_LinkPreviewGroup_hide",onClick:s,"aria-label":Object(v.a)("Close preview")},i.a.createElement("img",{className:"mx_filterFlipColor",alt:"",role:"presentation",src:n(1400).default,width:"18",height:"18"})):void 0)})),g)}},,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(13),i=n.n(r),o=n(179);class a{constructor(e){this.ourEvent=e,i()(this,"timeline",void 0),i()(this,"ourEventIndex",0),i()(this,"paginateTokens",{[o.a.Backward]:null,[o.a.Forward]:null}),this.timeline=[e]}getEvent(){return this.timeline[this.ourEventIndex]}getTimeline(){return this.timeline}getOurEventIndex(){return this.ourEventIndex}getPaginateToken(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.paginateTokens[e?o.a.Backward:o.a.Forward]}setPaginateToken(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.paginateTokens[t?o.a.Backward:o.a.Forward]=null!=e?e:null}addEvents(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]?(this.timeline=e.concat(this.timeline),this.ourEventIndex+=e.length):this.timeline=this.timeline.concat(e)}}class s{static fromJson(e,t){const n=e.context||{};let r=(n.events_before||[]).map(t),i=(n.events_after||[]).map(t);const o=new a(t(e.result)),l=o.ourEvent.threadRootId;return r=r.filter((e=>e.threadRootId===l)),i=i.filter((e=>e.threadRootId===l)),o.setPaginateToken(n.start,!0),o.addEvents(r,!0),o.addEvents(i,!1),o.setPaginateToken(n.end,!1),new s(e.rank,o)}constructor(e,t){this.rank=e,this.context=t}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return _})),n.d(t,"b",(function(){return v}));var r=n(13),i=n.n(r),o=n(42),a=n.n(o),s=n(129),l=n(1),c=n(16),u=n(179);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class p{constructor(e,t,n){this.client=e,this.indexEvent=t,this.directory=n}get id(){const e=this.indexEvent.getStateKey();if(!e)throw new Error("State key not found for branch");return e}get isActive(){return!0===this.indexEvent.getContent().active}get version(){var e;return null!==(e=this.indexEvent.getContent().version)&&void 0!==e?e:1}get roomId(){return this.indexEvent.getRoomId()}async delete(){await this.client.sendStateEvent(this.roomId,s.p.name,{},this.id),await this.client.redactEvent(this.roomId,this.id);const e=(await this.getVersionHistory())[1];e&&await e.delete()}getName(){return this.indexEvent.getContent().name||"Unnamed File"}async setName(e){await this.client.sendStateEvent(this.roomId,s.p.name,h(h({},this.indexEvent.getContent()),{},{name:e}),this.id)}isLocked(){return this.indexEvent.getContent().locked||!1}async setLocked(e){await this.client.sendStateEvent(this.roomId,s.p.name,h(h({},this.indexEvent.getContent()),{},{locked:e}),this.id)}async getFileInfo(){const e=(await this.getFileEvent()).getOriginalContent().file,t=this.client.mxcUrlToHttp(e.url);if(!t)throw new Error(`No HTTP URL available for ${e.url}`);return{info:e,httpUrl:t}}async getFileEvent(){const e=this.client.getRoom(this.roomId);if(!e)throw new Error("Unknown room");let t=e.getUnfilteredTimelineSet().findEventById(this.id);for(;!t&&e.getLiveTimeline().getState(u.b.BACKWARDS).paginationToken;)await this.client.scrollback(e,100),t=e.getUnfilteredTimelineSet().findEventById(this.id);if(!t)throw new Error("Failed to find event");return await this.client.decryptEventIfNeeded(t,{emit:!0,isRetry:!0}),t}async createNewVersion(e,t,n,r){const i=await this.directory.createFile(e,t,n,h(h({},null!=r?r:{}),{},{"m.new_content":!0,"m.relates_to":{rel_type:s.h.Replace,event_id:this.id}}));return await this.client.sendStateEvent(this.roomId,s.p.name,{active:!0,name:e,version:this.version+1},i.event_id),await this.client.sendStateEvent(this.roomId,s.p.name,h(h({},this.indexEvent.getContent()),{},{active:!1}),this.id),i}async getVersionHistory(){const e=[];e.push(this);const t=this.client.getRoom(this.roomId);if(!t)throw new Error("Invalid or unknown room");const n=[...t.getLiveTimeline().getEvents()].reverse();let r,i=await this.getFileEvent();do{if(r=n.find((e=>e.replacingEventId()===i.getId())),r){const t=this.directory.getFile(r.getId());if(!t)break;e.push(t),i=r}}while(r);return e}}var m=n(668);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const _={invite:100,kick:100,ban:100,redact:50,state_default:50,events_default:50,users_default:0,events:{[s.b.RoomPowerLevels]:100,[s.b.RoomHistoryVisibility]:100,[s.b.RoomTombstone]:100,[s.b.RoomEncryption]:100,[s.b.RoomName]:50,[s.b.RoomMessage]:50,[s.b.RoomMessageEncrypted]:50,[s.b.Sticker]:50},users:{}};let b;!function(e){e.Viewer="viewer",e.Editor="editor",e.Owner="owner"}(b||(b={}));class v{constructor(e,t){if(this.client=e,this.roomId=t,i()(this,"room",void 0),this.room=this.client.getRoom(this.roomId),!this.room)throw new Error("Unknown room")}get id(){return this.roomId}get isTopLevel(){const e=this.room.currentState.getStateEvents(s.b.SpaceParent);return null==e||!e.length||e.every((e=>{var t;return!(null!==(t=e.getContent())&&void 0!==t&&t.via)}))}async setName(e){await this.client.sendStateEvent(this.roomId,s.b.RoomName,{name:e},"")}async invite(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=[this.retryInvite(e)];return t&&r.push(...this.getDirectories().map((r=>r.invite(e,t,n)))),Promise.all(r).then((()=>{n&&Object(m.a)(this.room)&&this.client.sendSharedHistoryKeys(this.roomId,[e])}))}retryInvite(e){return Object(c.M)((async()=>{await this.client.invite(this.roomId,e).catch((e=>{if("M_FORBIDDEN"===(null==e?void 0:e.errcode))throw new a.a.AbortError(e);throw e}))}))}async setPermissions(e,t){var n;const r=this.room.currentState.getStateEvents(s.b.RoomPowerLevels,"");if(Array.isArray(r))throw new Error("Unexpected return type for power levels");const i=(null==r?void 0:r.getContent())||{},o=i.users_default||0,a=i.events_default||50,l=(null===(n=i.events)||void 0===n?void 0:n[s.b.RoomPowerLevels])||100,c=i.users||{};switch(t){case b.Viewer:c[e]=o;break;case b.Editor:c[e]=a;break;case b.Owner:c[e]=l;break;default:throw new Error("Invalid role: "+t)}i.users=c,await this.client.sendStateEvent(this.roomId,s.b.RoomPowerLevels,i,"")}getPermissions(e){var t,n;const r=this.room.currentState.getStateEvents(s.b.RoomPowerLevels,"");if(Array.isArray(r))throw new Error("Unexpected return type for power levels");const i=(null==r?void 0:r.getContent())||{},o=i.users_default||0,a=i.events_default||50,l=(null===(t=i.events)||void 0===t?void 0:t[s.b.RoomPowerLevels])||100,c=(null===(n=i.users)||void 0===n?void 0:n[e])||o;return c>=l?b.Owner:c>=a?b.Editor:b.Viewer}async createDirectory(e){const t=await this.client.unstableCreateFileTree(e);return await this.client.sendStateEvent(this.roomId,s.b.SpaceChild,{via:[this.client.getDomain()]},t.roomId),await this.client.sendStateEvent(t.roomId,s.b.SpaceParent,{via:[this.client.getDomain()]},this.roomId),t}getDirectories(){const e=[],t=this.room.currentState.getStateEvents(s.b.SpaceChild);for(const n of t)try{const t=n.getStateKey();if(t){const n=this.client.unstableGetFileTreeSpace(t);n&&e.push(n)}}catch(e){l.a.warn("Unable to create tree space instance for listing. Are we joined?",e)}return e}getDirectory(e){return this.getDirectories().find((t=>t.roomId===e))}async delete(){const e=this.getDirectories();for(const t of e)await t.delete();const t=["invite","knock","join"],n=this.room.currentState.getStateEvents(s.b.RoomMember);for(const e of n){if(e.getStateKey()!==this.client.getUserId()&&t.includes(e.getContent().membership)){const t=e.getStateKey();if(!t)throw new Error("State key not found for branch");await this.client.kick(this.roomId,t,"Room deleted")}}await this.client.leave(this.roomId)}getOrderedChildren(e){const t=e.map((e=>({roomId:e.getStateKey(),order:e.getContent().order}))).filter((e=>e.roomId));return t.sort(((e,t)=>{if(e.order&&!t.order)return-1;if(!e.order&&t.order)return 1;if(e.order||t.order)return Object(c.x)(e.order,t.order);{var n,r,i,o;const a=this.client.getRoom(e.roomId),l=this.client.getRoom(t.roomId);if(!a||!l)return Object(c.x)(e.roomId,t.roomId);const u=null!==(n=null===(r=a.currentState.getStateEvents(s.b.RoomCreate,""))||void 0===r?void 0:r.getTs())&&void 0!==n?n:0,d=null!==(i=null===(o=l.currentState.getStateEvents(s.b.RoomCreate,""))||void 0===o?void 0:o.getTs())&&void 0!==i?i:0;return u===d?Object(c.x)(e.roomId,t.roomId):u-d}})),t}getParentRoom(){const e=this.room.currentState.getStateEvents(s.b.SpaceParent)[0];if(!e)throw new Error("Expected to have a parent in a non-top level space");const t=e.getStateKey();if(!t)throw new Error("No state key found for parent");const n=this.client.getRoom(t);if(!n)throw new Error("Unable to locate room for parent");return n}getOrder(){if(this.isTopLevel)return-1;const e=this.getParentRoom().currentState.getStateEvents(s.b.SpaceChild);return this.getOrderedChildren(e).findIndex((e=>e.roomId===this.roomId))}async setOrder(e){var t;if(this.isTopLevel)throw new Error("Cannot set order of top level spaces currently");const n=this.getParentRoom(),r=n.currentState.getStateEvents(s.b.SpaceChild),i=this.getOrderedChildren(r);e=Math.max(Math.min(e,i.length-1),0);const o=this.getOrder()<e;o&&e===i.length-1?e--:o||0!==e||e++;const a=i[o?e:e-1],l=i[o?e+1:e];let u=c.a[0],d=!1;if(a)if(e===i.length-1)null!=l&&l.order&&(u=Object(c.z)(l.order));else{const e=null==a?void 0:a.order,t=null==l?void 0:l.order;e&&t?u=e===t?Object(c.z)(e):Object(c.d)(e,t):e?u=Object(c.z)(e):t?u=Object(c.C)(t):d=!0}else null!=l&&l.order&&(u=Object(c.C)(l.order));if(d){let t;for(let r=0;r<=e;r++){const e=i[r];if(0===r&&(t=e.order),e.order)t=e.order;else{var h;t=t?Object(c.z)(t):c.a[0];const r=n.currentState.getStateEvents(s.b.SpaceChild,e.roomId),i=null!==(h=null==r?void 0:r.getContent())&&void 0!==h?h:{via:[this.client.getDomain()]};await this.client.sendStateEvent(n.roomId,s.b.SpaceChild,f(f({},i),{},{order:t}),e.roomId)}}t&&(u=Object(c.z)(t))}const p=n.currentState.getStateEvents(s.b.SpaceChild,this.roomId),m=null!==(t=null==p?void 0:p.getContent())&&void 0!==t?t:{via:[this.client.getDomain()]};await this.client.sendStateEvent(n.roomId,s.b.SpaceChild,f(f({},m),{},{order:u}),this.roomId)}async createFile(e,t,n,r){var i;const{content_uri:o}=await this.client.uploadContent(t,{includeFilename:!1});n.url=o;const a={msgtype:s.e.File,body:e,url:o,file:n};(r=null!==(i=r)&&void 0!==i?i:{})["m.new_content"]&&(r["m.new_content"]=a);const l=await this.client.sendMessage(this.roomId,f(f(f({},r),a),{},{[s.q.name]:{}}));return await this.client.sendStateEvent(this.roomId,s.p.name,{active:!0,name:e},l.event_id),l}getFile(e){const t=this.room.currentState.getStateEvents(s.p.name,e);return t?new p(this.client,t,this):null}listFiles(){return this.listAllFiles().filter((e=>e.isActive))}listAllFiles(){var e;return(null!==(e=this.room.currentState.getStateEvents(s.p.name))&&void 0!==e?e:[]).map((e=>new p(this.client,e,this)))}}}]]);
|