@memori.ai/memori-webcomponent 7.0.2 → 7.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/memori-webcomponent.js +1 -1
- package/package.json +2 -2
|
@@ -236,7 +236,7 @@ to {
|
|
|
236
236
|
* Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
|
|
237
237
|
* (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
|
|
238
238
|
*/function Pf(){return Pf=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},Pf.apply(this,arguments)}function kf({bounds:e,boundsOptions:n,center:r,children:i,className:o,id:s,placeholder:a,style:l,whenReady:u,zoom:d,...h},p){const[f]=(0,c.useState)({className:o,id:s,style:l}),[m,g]=(0,c.useState)(null);(0,c.useImperativeHandle)(p,(()=>m?.map??null),[m]);const v=(0,c.useCallback)((t=>{if(null!==t&&null===m){const i=new(0,Rf.Map)(t,h);null!=r&&null!=d?i.setView(r,d):null!=e&&i.fitBounds(e,n),null!=u&&i.whenReady(u),g(Ef(i))}}),[]);(0,c.useEffect)((()=>()=>{m?.map.remove()}),[m]);const y=m?t(c).createElement(Mf,{value:m},i):a??null;return t(c).createElement("div",Pf({},f,{ref:v}),y)}!function(e){"use strict";var t="1.9.4";function n(e){var t,n,r,i;for(n=1,r=arguments.length;n<r;n++)for(t in i=arguments[n])e[t]=i[t];return e}var r=Object.create||function(){function e(){}return function(t){return e.prototype=t,new e}}();function i(e,t){var n=Array.prototype.slice;if(e.bind)return e.bind.apply(e,n.call(arguments,1));var r=n.call(arguments,2);return function(){return e.apply(t,r.length?r.concat(n.call(arguments)):arguments)}}var o=0;function s(e){return"_leaflet_id"in e||(e._leaflet_id=++o),e._leaflet_id}function a(e,t,n){var r,i,o,s;return s=function(){r=!1,i&&(o.apply(n,i),i=!1)},o=function(){r?i=arguments:(e.apply(n,arguments),setTimeout(s,t),r=!0)},o}function l(e,t,n){var r=t[1],i=t[0],o=r-i;return e===r&&n?e:((e-i)%o+o)%o+i}function c(){return!1}function u(e,t){if(!1===t)return e;var n=Math.pow(10,void 0===t?6:t);return Math.round(e*n)/n}function d(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function h(e){return d(e).split(/\s+/)}function p(e,t){for(var n in Object.prototype.hasOwnProperty.call(e,"options")||(e.options=e.options?r(e.options):{}),t)e.options[n]=t[n];return e.options}function f(e,t,n){var r=[];for(var i in e)r.push(encodeURIComponent(n?i.toUpperCase():i)+"="+encodeURIComponent(e[i]));return(t&&-1!==t.indexOf("?")?"&":"?")+r.join("&")}var m=/\{ *([\w_ -]+) *\}/g;function g(e,t){return e.replace(m,(function(e,n){var r=t[n];if(void 0===r)throw new Error("No value provided for variable "+e);return"function"==typeof r&&(r=r(t)),r}))}var v=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function y(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1}var b="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function x(e){return window["webkit"+e]||window["moz"+e]||window["ms"+e]}var S=0;function w(e){var t=+new Date,n=Math.max(0,16-(t-S));return S=t+n,window.setTimeout(e,n)}var _=window.requestAnimationFrame||x("RequestAnimationFrame")||w,C=window.cancelAnimationFrame||x("CancelAnimationFrame")||x("CancelRequestAnimationFrame")||function(e){window.clearTimeout(e)};function A(e,t,n){if(!n||_!==w)return _.call(window,i(e,t));e.call(t)}function E(e){e&&C.call(window,e)}var T={__proto__:null,extend:n,create:r,bind:i,get lastId(){return o},stamp:s,throttle:a,wrapNum:l,falseFn:c,formatNum:u,trim:d,splitWords:h,setOptions:p,getParamString:f,template:g,isArray:v,indexOf:y,emptyImageUrl:b,requestFn:_,cancelFn:C,requestAnimFrame:A,cancelAnimFrame:E};function M(){}function I(e){if("undefined"!=typeof L&&L&&L.Mixin){e=v(e)?e:[e];for(var t=0;t<e.length;t++)e[t]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}M.extend=function(e){var t=function(){p(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},i=t.__super__=this.prototype,o=r(i);for(var s in o.constructor=t,t.prototype=o,this)Object.prototype.hasOwnProperty.call(this,s)&&"prototype"!==s&&"__super__"!==s&&(t[s]=this[s]);return e.statics&&n(t,e.statics),e.includes&&(I(e.includes),n.apply(null,[o].concat(e.includes))),n(o,e),delete o.statics,delete o.includes,o.options&&(o.options=i.options?r(i.options):{},n(o.options,e.options)),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){i.callInitHooks&&i.callInitHooks.call(this),this._initHooksCalled=!0;for(var e=0,t=o._initHooks.length;e<t;e++)o._initHooks[e].call(this)}},t},M.include=function(e){var t=this.prototype.options;return n(this.prototype,e),e.options&&(this.prototype.options=t,this.mergeOptions(e.options)),this},M.mergeOptions=function(e){return n(this.prototype.options,e),this},M.addInitHook=function(e){var t=Array.prototype.slice.call(arguments,1),n="function"==typeof e?e:function(){this[e].apply(this,t)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var R={on:function(e,t,n){if("object"==typeof e)for(var r in e)this._on(r,e[r],t);else for(var i=0,o=(e=h(e)).length;i<o;i++)this._on(e[i],t,n);return this},off:function(e,t,n){if(arguments.length)if("object"==typeof e)for(var r in e)this._off(r,e[r],t);else{e=h(e);for(var i=1===arguments.length,o=0,s=e.length;o<s;o++)i?this._off(e[o]):this._off(e[o],t,n)}else delete this._events;return this},_on:function(e,t,n,r){if("function"==typeof t){if(!1===this._listens(e,t,n)){n===this&&(n=void 0);var i={fn:t,ctx:n};r&&(i.once=!0),this._events=this._events||{},this._events[e]=this._events[e]||[],this._events[e].push(i)}}else console.warn("wrong listener type: "+typeof t)},_off:function(e,t,n){var r,i,o;if(this._events&&(r=this._events[e]))if(1!==arguments.length)if("function"==typeof t){var s=this._listens(e,t,n);if(!1!==s){var a=r[s];this._firingCount&&(a.fn=c,this._events[e]=r=r.slice()),r.splice(s,1)}}else console.warn("wrong listener type: "+typeof t);else{if(this._firingCount)for(i=0,o=r.length;i<o;i++)r[i].fn=c;delete this._events[e]}},fire:function(e,t,r){if(!this.listens(e,r))return this;var i=n({},t,{type:e,target:this,sourceTarget:t&&t.sourceTarget||this});if(this._events){var o=this._events[e];if(o){this._firingCount=this._firingCount+1||1;for(var s=0,a=o.length;s<a;s++){var l=o[s],c=l.fn;l.once&&this.off(e,c,l.ctx),c.call(l.ctx||this,i)}this._firingCount--}}return r&&this._propagateEvent(i),this},listens:function(e,t,n,r){"string"!=typeof e&&console.warn('"string" type argument expected');var i=t;"function"!=typeof t&&(r=!!t,i=void 0,n=void 0);var o=this._events&&this._events[e];if(o&&o.length&&!1!==this._listens(e,i,n))return!0;if(r)for(var s in this._eventParents)if(this._eventParents[s].listens(e,t,n,r))return!0;return!1},_listens:function(e,t,n){if(!this._events)return!1;var r=this._events[e]||[];if(!t)return!!r.length;n===this&&(n=void 0);for(var i=0,o=r.length;i<o;i++)if(r[i].fn===t&&r[i].ctx===n)return i;return!1},once:function(e,t,n){if("object"==typeof e)for(var r in e)this._on(r,e[r],t,!0);else for(var i=0,o=(e=h(e)).length;i<o;i++)this._on(e[i],t,n,!0);return this},addEventParent:function(e){return this._eventParents=this._eventParents||{},this._eventParents[s(e)]=e,this},removeEventParent:function(e){return this._eventParents&&delete this._eventParents[s(e)],this},_propagateEvent:function(e){for(var t in this._eventParents)this._eventParents[t].fire(e.type,n({layer:e.target,propagatedFrom:e.target},e),!0)}};R.addEventListener=R.on,R.removeEventListener=R.clearAllEventListeners=R.off,R.addOneTimeEventListener=R.once,R.fireEvent=R.fire,R.hasEventListeners=R.listens;var P=M.extend(R);function k(e,t,n){this.x=n?Math.round(e):e,this.y=n?Math.round(t):t}var O=Math.trunc||function(e){return e>0?Math.floor(e):Math.ceil(e)};function N(e,t,n){return e instanceof k?e:v(e)?new k(e[0],e[1]):null==e?e:"object"==typeof e&&"x"in e&&"y"in e?new k(e.x,e.y):new k(e,t,n)}function D(e,t){if(e)for(var n=t?[e,t]:e,r=0,i=n.length;r<i;r++)this.extend(n[r])}function B(e,t){return!e||e instanceof D?e:new D(e,t)}function z(e,t){if(e)for(var n=t?[e,t]:e,r=0,i=n.length;r<i;r++)this.extend(n[r])}function F(e,t){return e instanceof z?e:new z(e,t)}function U(e,t,n){if(isNaN(e)||isNaN(t))throw new Error("Invalid LatLng object: ("+e+", "+t+")");this.lat=+e,this.lng=+t,void 0!==n&&(this.alt=+n)}function j(e,t,n){return e instanceof U?e:v(e)&&"object"!=typeof e[0]?3===e.length?new U(e[0],e[1],e[2]):2===e.length?new U(e[0],e[1]):null:null==e?e:"object"==typeof e&&"lat"in e?new U(e.lat,"lng"in e?e.lng:e.lon,e.alt):void 0===t?null:new U(e,t,n)}k.prototype={clone:function(){return new k(this.x,this.y)},add:function(e){return this.clone()._add(N(e))},_add:function(e){return this.x+=e.x,this.y+=e.y,this},subtract:function(e){return this.clone()._subtract(N(e))},_subtract:function(e){return this.x-=e.x,this.y-=e.y,this},divideBy:function(e){return this.clone()._divideBy(e)},_divideBy:function(e){return this.x/=e,this.y/=e,this},multiplyBy:function(e){return this.clone()._multiplyBy(e)},_multiplyBy:function(e){return this.x*=e,this.y*=e,this},scaleBy:function(e){return new k(this.x*e.x,this.y*e.y)},unscaleBy:function(e){return new k(this.x/e.x,this.y/e.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=O(this.x),this.y=O(this.y),this},distanceTo:function(e){var t=(e=N(e)).x-this.x,n=e.y-this.y;return Math.sqrt(t*t+n*n)},equals:function(e){return(e=N(e)).x===this.x&&e.y===this.y},contains:function(e){return e=N(e),Math.abs(e.x)<=Math.abs(this.x)&&Math.abs(e.y)<=Math.abs(this.y)},toString:function(){return"Point("+u(this.x)+", "+u(this.y)+")"}},D.prototype={extend:function(e){var t,n;if(!e)return this;if(e instanceof k||"number"==typeof e[0]||"x"in e)t=n=N(e);else if(t=(e=B(e)).min,n=e.max,!t||!n)return this;return this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(n.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(n.y,this.max.y)):(this.min=t.clone(),this.max=n.clone()),this},getCenter:function(e){return N((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,e)},getBottomLeft:function(){return N(this.min.x,this.max.y)},getTopRight:function(){return N(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(e){var t,n;return(e="number"==typeof e[0]||e instanceof k?N(e):B(e))instanceof D?(t=e.min,n=e.max):t=n=e,t.x>=this.min.x&&n.x<=this.max.x&&t.y>=this.min.y&&n.y<=this.max.y},intersects:function(e){e=B(e);var t=this.min,n=this.max,r=e.min,i=e.max,o=i.x>=t.x&&r.x<=n.x,s=i.y>=t.y&&r.y<=n.y;return o&&s},overlaps:function(e){e=B(e);var t=this.min,n=this.max,r=e.min,i=e.max,o=i.x>t.x&&r.x<n.x,s=i.y>t.y&&r.y<n.y;return o&&s},isValid:function(){return!(!this.min||!this.max)},pad:function(e){var t=this.min,n=this.max,r=Math.abs(t.x-n.x)*e,i=Math.abs(t.y-n.y)*e;return B(N(t.x-r,t.y-i),N(n.x+r,n.y+i))},equals:function(e){return!!e&&(e=B(e),this.min.equals(e.getTopLeft())&&this.max.equals(e.getBottomRight()))}},z.prototype={extend:function(e){var t,n,r=this._southWest,i=this._northEast;if(e instanceof U)t=e,n=e;else{if(!(e instanceof z))return e?this.extend(j(e)||F(e)):this;if(t=e._southWest,n=e._northEast,!t||!n)return this}return r||i?(r.lat=Math.min(t.lat,r.lat),r.lng=Math.min(t.lng,r.lng),i.lat=Math.max(n.lat,i.lat),i.lng=Math.max(n.lng,i.lng)):(this._southWest=new U(t.lat,t.lng),this._northEast=new U(n.lat,n.lng)),this},pad:function(e){var t=this._southWest,n=this._northEast,r=Math.abs(t.lat-n.lat)*e,i=Math.abs(t.lng-n.lng)*e;return new z(new U(t.lat-r,t.lng-i),new U(n.lat+r,n.lng+i))},getCenter:function(){return new U((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new U(this.getNorth(),this.getWest())},getSouthEast:function(){return new U(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(e){e="number"==typeof e[0]||e instanceof U||"lat"in e?j(e):F(e);var t,n,r=this._southWest,i=this._northEast;return e instanceof z?(t=e.getSouthWest(),n=e.getNorthEast()):t=n=e,t.lat>=r.lat&&n.lat<=i.lat&&t.lng>=r.lng&&n.lng<=i.lng},intersects:function(e){e=F(e);var t=this._southWest,n=this._northEast,r=e.getSouthWest(),i=e.getNorthEast(),o=i.lat>=t.lat&&r.lat<=n.lat,s=i.lng>=t.lng&&r.lng<=n.lng;return o&&s},overlaps:function(e){e=F(e);var t=this._southWest,n=this._northEast,r=e.getSouthWest(),i=e.getNorthEast(),o=i.lat>t.lat&&r.lat<n.lat,s=i.lng>t.lng&&r.lng<n.lng;return o&&s},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(e,t){return!!e&&(e=F(e),this._southWest.equals(e.getSouthWest(),t)&&this._northEast.equals(e.getNorthEast(),t))},isValid:function(){return!(!this._southWest||!this._northEast)}},U.prototype={equals:function(e,t){return!!e&&(e=j(e),Math.max(Math.abs(this.lat-e.lat),Math.abs(this.lng-e.lng))<=(void 0===t?1e-9:t))},toString:function(e){return"LatLng("+u(this.lat,e)+", "+u(this.lng,e)+")"},distanceTo:function(e){return G.distance(this,j(e))},wrap:function(){return G.wrapLatLng(this)},toBounds:function(e){var t=180*e/40075017,n=t/Math.cos(Math.PI/180*this.lat);return F([this.lat-t,this.lng-n],[this.lat+t,this.lng+n])},clone:function(){return new U(this.lat,this.lng,this.alt)}};var H,V={latLngToPoint:function(e,t){var n=this.projection.project(e),r=this.scale(t);return this.transformation._transform(n,r)},pointToLatLng:function(e,t){var n=this.scale(t),r=this.transformation.untransform(e,n);return this.projection.unproject(r)},project:function(e){return this.projection.project(e)},unproject:function(e){return this.projection.unproject(e)},scale:function(e){return 256*Math.pow(2,e)},zoom:function(e){return Math.log(e/256)/Math.LN2},getProjectedBounds:function(e){if(this.infinite)return null;var t=this.projection.bounds,n=this.scale(e);return new D(this.transformation.transform(t.min,n),this.transformation.transform(t.max,n))},infinite:!1,wrapLatLng:function(e){var t=this.wrapLng?l(e.lng,this.wrapLng,!0):e.lng;return new U(this.wrapLat?l(e.lat,this.wrapLat,!0):e.lat,t,e.alt)},wrapLatLngBounds:function(e){var t=e.getCenter(),n=this.wrapLatLng(t),r=t.lat-n.lat,i=t.lng-n.lng;if(0===r&&0===i)return e;var o=e.getSouthWest(),s=e.getNorthEast();return new z(new U(o.lat-r,o.lng-i),new U(s.lat-r,s.lng-i))}},G=n({},V,{wrapLng:[-180,180],R:6371e3,distance:function(e,t){var n=Math.PI/180,r=e.lat*n,i=t.lat*n,o=Math.sin((t.lat-e.lat)*n/2),s=Math.sin((t.lng-e.lng)*n/2),a=o*o+Math.cos(r)*Math.cos(i)*s*s,l=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*l}}),W=6378137,q={R:W,MAX_LATITUDE:85.0511287798,project:function(e){var t=Math.PI/180,n=this.MAX_LATITUDE,r=Math.max(Math.min(n,e.lat),-n),i=Math.sin(r*t);return new k(this.R*e.lng*t,this.R*Math.log((1+i)/(1-i))/2)},unproject:function(e){var t=180/Math.PI;return new U((2*Math.atan(Math.exp(e.y/this.R))-Math.PI/2)*t,e.x*t/this.R)},bounds:(H=W*Math.PI,new D([-H,-H],[H,H]))};function K(e,t,n,r){if(v(e))return this._a=e[0],this._b=e[1],this._c=e[2],void(this._d=e[3]);this._a=e,this._b=t,this._c=n,this._d=r}function J(e,t,n,r){return new K(e,t,n,r)}K.prototype={transform:function(e,t){return this._transform(e.clone(),t)},_transform:function(e,t){return t=t||1,e.x=t*(this._a*e.x+this._b),e.y=t*(this._c*e.y+this._d),e},untransform:function(e,t){return t=t||1,new k((e.x/t-this._b)/this._a,(e.y/t-this._d)/this._c)}};var Q=n({},G,{code:"EPSG:3857",projection:q,transformation:function(){var e=.5/(Math.PI*q.R);return J(e,.5,-e,.5)}()}),Y=n({},Q,{code:"EPSG:900913"});function Z(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function X(e,t){var n,r,i,o,s,a,l="";for(n=0,i=e.length;n<i;n++){for(r=0,o=(s=e[n]).length;r<o;r++)l+=(r?"L":"M")+(a=s[r]).x+" "+a.y;l+=t?ze.svg?"z":"x":""}return l||"M0 0"}var $,ee=document.documentElement.style,te="ActiveXObject"in window,ne=te&&!document.addEventListener,re="msLaunchUri"in navigator&&!("documentMode"in document),ie=Be("webkit"),oe=Be("android"),se=Be("android 2")||Be("android 3"),ae=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),le=oe&&Be("Google")&&ae<537&&!("AudioNode"in window),ce=!!window.opera,ue=!re&&Be("chrome"),de=Be("gecko")&&!ie&&!ce&&!te,he=!ue&&Be("safari"),pe=Be("phantom"),fe="OTransition"in ee,me=0===navigator.platform.indexOf("Win"),ge=te&&"transition"in ee,ve="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!se,ye="MozPerspective"in ee,be=!window.L_DISABLE_3D&&(ge||ve||ye)&&!fe&&!pe,xe="undefined"!=typeof orientation||Be("mobile"),Se=xe&&ie,we=xe&&ve,_e=!window.PointerEvent&&window.MSPointerEvent,Ce=!(!window.PointerEvent&&!_e),Ae="ontouchstart"in window||!!window.TouchEvent,Ee=!window.L_NO_TOUCH&&(Ae||Ce),Te=xe&&ce,Me=xe&&de,Ie=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Re=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassiveEventSupport",c,t),window.removeEventListener("testPassiveEventSupport",c,t)}catch(e){}return e}(),Pe=!!document.createElement("canvas").getContext,ke=!(!document.createElementNS||!Z("svg").createSVGRect),Oe=!!ke&&(($=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===($.firstChild&&$.firstChild.namespaceURI)),Ne=!ke&&function(){try{var e=document.createElement("div");e.innerHTML='<v:shape adj="1"/>';var t=e.firstChild;return t.style.behavior="url(#default#VML)",t&&"object"==typeof t.adj}catch(e){return!1}}(),Le=0===navigator.platform.indexOf("Mac"),De=0===navigator.platform.indexOf("Linux");function Be(e){return navigator.userAgent.toLowerCase().indexOf(e)>=0}var ze={ie:te,ielt9:ne,edge:re,webkit:ie,android:oe,android23:se,androidStock:le,opera:ce,chrome:ue,gecko:de,safari:he,phantom:pe,opera12:fe,win:me,ie3d:ge,webkit3d:ve,gecko3d:ye,any3d:be,mobile:xe,mobileWebkit:Se,mobileWebkit3d:we,msPointer:_e,pointer:Ce,touch:Ee,touchNative:Ae,mobileOpera:Te,mobileGecko:Me,retina:Ie,passiveEvents:Re,canvas:Pe,svg:ke,vml:Ne,inlineSvg:Oe,mac:Le,linux:De},Fe=ze.msPointer?"MSPointerDown":"pointerdown",Ue=ze.msPointer?"MSPointerMove":"pointermove",je=ze.msPointer?"MSPointerUp":"pointerup",He=ze.msPointer?"MSPointerCancel":"pointercancel",Ve={touchstart:Fe,touchmove:Ue,touchend:je,touchcancel:He},Ge={touchstart:et,touchmove:$e,touchend:$e,touchcancel:$e},We={},qe=!1;function Ke(e,t,n){return"touchstart"===t&&Xe(),Ge[t]?(n=Ge[t].bind(this,n),e.addEventListener(Ve[t],n,!1),n):(console.warn("wrong event specified:",t),c)}function Je(e,t,n){Ve[t]?e.removeEventListener(Ve[t],n,!1):console.warn("wrong event specified:",t)}function Qe(e){We[e.pointerId]=e}function Ye(e){We[e.pointerId]&&(We[e.pointerId]=e)}function Ze(e){delete We[e.pointerId]}function Xe(){qe||(document.addEventListener(Fe,Qe,!0),document.addEventListener(Ue,Ye,!0),document.addEventListener(je,Ze,!0),document.addEventListener(He,Ze,!0),qe=!0)}function $e(e,t){if(t.pointerType!==(t.MSPOINTER_TYPE_MOUSE||"mouse")){for(var n in t.touches=[],We)t.touches.push(We[n]);t.changedTouches=[t],e(t)}}function et(e,t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&Qt(t),$e(e,t)}function tt(e){var t,n,r={};for(n in e)t=e[n],r[n]=t&&t.bind?t.bind(e):t;return e=r,r.type="dblclick",r.detail=2,r.isTrusted=!1,r._simulated=!0,r}var nt=200;function rt(e,t){e.addEventListener("dblclick",t);var n,r=0;function i(e){if(1===e.detail){if("mouse"!==e.pointerType&&(!e.sourceCapabilities||e.sourceCapabilities.firesTouchEvents)){var i=Zt(e);if(!i.some((function(e){return e instanceof HTMLLabelElement&&e.attributes.for}))||i.some((function(e){return e instanceof HTMLInputElement||e instanceof HTMLSelectElement}))){var o=Date.now();o-r<=nt?2==++n&&t(tt(e)):n=1,r=o}}}else n=e.detail}return e.addEventListener("click",i),{dblclick:t,simDblclick:i}}function it(e,t){e.removeEventListener("dblclick",t.dblclick),e.removeEventListener("click",t.simDblclick)}var ot,st,at,lt,ct,ut=Tt(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),dt=Tt(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ht="webkitTransition"===dt||"OTransition"===dt?dt+"End":"transitionend";function pt(e){return"string"==typeof e?document.getElementById(e):e}function ft(e,t){var n=e.style[t]||e.currentStyle&&e.currentStyle[t];if((!n||"auto"===n)&&document.defaultView){var r=document.defaultView.getComputedStyle(e,null);n=r?r[t]:null}return"auto"===n?null:n}function mt(e,t,n){var r=document.createElement(e);return r.className=t||"",n&&n.appendChild(r),r}function gt(e){var t=e.parentNode;t&&t.removeChild(e)}function vt(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function yt(e){var t=e.parentNode;t&&t.lastChild!==e&&t.appendChild(e)}function bt(e){var t=e.parentNode;t&&t.firstChild!==e&&t.insertBefore(e,t.firstChild)}function xt(e,t){if(void 0!==e.classList)return e.classList.contains(t);var n=Ct(e);return n.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(n)}function St(e,t){if(void 0!==e.classList)for(var n=h(t),r=0,i=n.length;r<i;r++)e.classList.add(n[r]);else if(!xt(e,t)){var o=Ct(e);_t(e,(o?o+" ":"")+t)}}function wt(e,t){void 0!==e.classList?e.classList.remove(t):_t(e,d((" "+Ct(e)+" ").replace(" "+t+" "," ")))}function _t(e,t){void 0===e.className.baseVal?e.className=t:e.className.baseVal=t}function Ct(e){return e.correspondingElement&&(e=e.correspondingElement),void 0===e.className.baseVal?e.className:e.className.baseVal}function At(e,t){"opacity"in e.style?e.style.opacity=t:"filter"in e.style&&Et(e,t)}function Et(e,t){var n=!1,r="DXImageTransform.Microsoft.Alpha";try{n=e.filters.item(r)}catch(e){if(1===t)return}t=Math.round(100*t),n?(n.Enabled=100!==t,n.Opacity=t):e.style.filter+=" progid:"+r+"(opacity="+t+")"}function Tt(e){for(var t=document.documentElement.style,n=0;n<e.length;n++)if(e[n]in t)return e[n];return!1}function Mt(e,t,n){var r=t||new k(0,0);e.style[ut]=(ze.ie3d?"translate("+r.x+"px,"+r.y+"px)":"translate3d("+r.x+"px,"+r.y+"px,0)")+(n?" scale("+n+")":"")}function It(e,t){e._leaflet_pos=t,ze.any3d?Mt(e,t):(e.style.left=t.x+"px",e.style.top=t.y+"px")}function Rt(e){return e._leaflet_pos||new k(0,0)}if("onselectstart"in document)ot=function(){Ft(window,"selectstart",Qt)},st=function(){jt(window,"selectstart",Qt)};else{var Pt=Tt(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);ot=function(){if(Pt){var e=document.documentElement.style;at=e[Pt],e[Pt]="none"}},st=function(){Pt&&(document.documentElement.style[Pt]=at,at=void 0)}}function kt(){Ft(window,"dragstart",Qt)}function Ot(){jt(window,"dragstart",Qt)}function Nt(e){for(;-1===e.tabIndex;)e=e.parentNode;e.style&&(Lt(),lt=e,ct=e.style.outlineStyle,e.style.outlineStyle="none",Ft(window,"keydown",Lt))}function Lt(){lt&&(lt.style.outlineStyle=ct,lt=void 0,ct=void 0,jt(window,"keydown",Lt))}function Dt(e){do{e=e.parentNode}while(!(e.offsetWidth&&e.offsetHeight||e===document.body));return e}function Bt(e){var t=e.getBoundingClientRect();return{x:t.width/e.offsetWidth||1,y:t.height/e.offsetHeight||1,boundingClientRect:t}}var zt={__proto__:null,TRANSFORM:ut,TRANSITION:dt,TRANSITION_END:ht,get:pt,getStyle:ft,create:mt,remove:gt,empty:vt,toFront:yt,toBack:bt,hasClass:xt,addClass:St,removeClass:wt,setClass:_t,getClass:Ct,setOpacity:At,testProp:Tt,setTransform:Mt,setPosition:It,getPosition:Rt,get disableTextSelection(){return ot},get enableTextSelection(){return st},disableImageDrag:kt,enableImageDrag:Ot,preventOutline:Nt,restoreOutline:Lt,getSizedParentNode:Dt,getScale:Bt};function Ft(e,t,n,r){if(t&&"object"==typeof t)for(var i in t)Gt(e,i,t[i],n);else for(var o=0,s=(t=h(t)).length;o<s;o++)Gt(e,t[o],n,r);return this}var Ut="_leaflet_events";function jt(e,t,n,r){if(1===arguments.length)Ht(e),delete e[Ut];else if(t&&"object"==typeof t)for(var i in t)Wt(e,i,t[i],n);else if(t=h(t),2===arguments.length)Ht(e,(function(e){return-1!==y(t,e)}));else for(var o=0,s=t.length;o<s;o++)Wt(e,t[o],n,r);return this}function Ht(e,t){for(var n in e[Ut]){var r=n.split(/\d/)[0];t&&!t(r)||Wt(e,r,null,null,n)}}var Vt={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Gt(e,t,n,r){var i=t+s(n)+(r?"_"+s(r):"");if(e[Ut]&&e[Ut][i])return this;var o=function(t){return n.call(r||e,t||window.event)},a=o;!ze.touchNative&&ze.pointer&&0===t.indexOf("touch")?o=Ke(e,t,o):ze.touch&&"dblclick"===t?o=rt(e,o):"addEventListener"in e?"touchstart"===t||"touchmove"===t||"wheel"===t||"mousewheel"===t?e.addEventListener(Vt[t]||t,o,!!ze.passiveEvents&&{passive:!1}):"mouseenter"===t||"mouseleave"===t?(o=function(t){t=t||window.event,tn(e,t)&&a(t)},e.addEventListener(Vt[t],o,!1)):e.addEventListener(t,a,!1):e.attachEvent("on"+t,o),e[Ut]=e[Ut]||{},e[Ut][i]=o}function Wt(e,t,n,r,i){i=i||t+s(n)+(r?"_"+s(r):"");var o=e[Ut]&&e[Ut][i];if(!o)return this;!ze.touchNative&&ze.pointer&&0===t.indexOf("touch")?Je(e,t,o):ze.touch&&"dblclick"===t?it(e,o):"removeEventListener"in e?e.removeEventListener(Vt[t]||t,o,!1):e.detachEvent("on"+t,o),e[Ut][i]=null}function qt(e){return e.stopPropagation?e.stopPropagation():e.originalEvent?e.originalEvent._stopped=!0:e.cancelBubble=!0,this}function Kt(e){return Gt(e,"wheel",qt),this}function Jt(e){return Ft(e,"mousedown touchstart dblclick contextmenu",qt),e._leaflet_disable_click=!0,this}function Qt(e){return e.preventDefault?e.preventDefault():e.returnValue=!1,this}function Yt(e){return Qt(e),qt(e),this}function Zt(e){if(e.composedPath)return e.composedPath();for(var t=[],n=e.target;n;)t.push(n),n=n.parentNode;return t}function Xt(e,t){if(!t)return new k(e.clientX,e.clientY);var n=Bt(t),r=n.boundingClientRect;return new k((e.clientX-r.left)/n.x-t.clientLeft,(e.clientY-r.top)/n.y-t.clientTop)}var $t=ze.linux&&ze.chrome?window.devicePixelRatio:ze.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function en(e){return ze.edge?e.wheelDeltaY/2:e.deltaY&&0===e.deltaMode?-e.deltaY/$t:e.deltaY&&1===e.deltaMode?20*-e.deltaY:e.deltaY&&2===e.deltaMode?60*-e.deltaY:e.deltaX||e.deltaZ?0:e.wheelDelta?(e.wheelDeltaY||e.wheelDelta)/2:e.detail&&Math.abs(e.detail)<32765?20*-e.detail:e.detail?e.detail/-32765*60:0}function tn(e,t){var n=t.relatedTarget;if(!n)return!0;try{for(;n&&n!==e;)n=n.parentNode}catch(e){return!1}return n!==e}var nn={__proto__:null,on:Ft,off:jt,stopPropagation:qt,disableScrollPropagation:Kt,disableClickPropagation:Jt,preventDefault:Qt,stop:Yt,getPropagationPath:Zt,getMousePosition:Xt,getWheelDelta:en,isExternalTarget:tn,addListener:Ft,removeListener:jt},rn=P.extend({run:function(e,t,n,r){this.stop(),this._el=e,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(r||.5,.2),this._startPos=Rt(e),this._offset=t.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=A(this._animate,this),this._step()},_step:function(e){var t=+new Date-this._startTime,n=1e3*this._duration;t<n?this._runFrame(this._easeOut(t/n),e):(this._runFrame(1),this._complete())},_runFrame:function(e,t){var n=this._startPos.add(this._offset.multiplyBy(e));t&&n._round(),It(this._el,n),this.fire("step")},_complete:function(){E(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(e){return 1-Math.pow(1-e,this._easeOutPower)}}),on=P.extend({options:{crs:Q,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(e,t){t=p(this,t),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(e),this._initLayout(),this._onResize=i(this._onResize,this),this._initEvents(),t.maxBounds&&this.setMaxBounds(t.maxBounds),void 0!==t.zoom&&(this._zoom=this._limitZoom(t.zoom)),t.center&&void 0!==t.zoom&&this.setView(j(t.center),t.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=dt&&ze.any3d&&!ze.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Ft(this._proxy,ht,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(e,t,r){return t=void 0===t?this._zoom:this._limitZoom(t),e=this._limitCenter(j(e),t,this.options.maxBounds),r=r||{},this._stop(),this._loaded&&!r.reset&&!0!==r&&(void 0!==r.animate&&(r.zoom=n({animate:r.animate},r.zoom),r.pan=n({animate:r.animate,duration:r.duration},r.pan)),this._zoom!==t?this._tryAnimatedZoom&&this._tryAnimatedZoom(e,t,r.zoom):this._tryAnimatedPan(e,r.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(e,t,r.pan&&r.pan.noMoveStart),this)},setZoom:function(e,t){return this._loaded?this.setView(this.getCenter(),e,{zoom:t}):(this._zoom=e,this)},zoomIn:function(e,t){return e=e||(ze.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+e,t)},zoomOut:function(e,t){return e=e||(ze.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-e,t)},setZoomAround:function(e,t,n){var r=this.getZoomScale(t),i=this.getSize().divideBy(2),o=(e instanceof k?e:this.latLngToContainerPoint(e)).subtract(i).multiplyBy(1-1/r),s=this.containerPointToLatLng(i.add(o));return this.setView(s,t,{zoom:n})},_getBoundsCenterZoom:function(e,t){t=t||{},e=e.getBounds?e.getBounds():F(e);var n=N(t.paddingTopLeft||t.padding||[0,0]),r=N(t.paddingBottomRight||t.padding||[0,0]),i=this.getBoundsZoom(e,!1,n.add(r));if((i="number"==typeof t.maxZoom?Math.min(t.maxZoom,i):i)===1/0)return{center:e.getCenter(),zoom:i};var o=r.subtract(n).divideBy(2),s=this.project(e.getSouthWest(),i),a=this.project(e.getNorthEast(),i);return{center:this.unproject(s.add(a).divideBy(2).add(o),i),zoom:i}},fitBounds:function(e,t){if(!(e=F(e)).isValid())throw new Error("Bounds are not valid.");var n=this._getBoundsCenterZoom(e,t);return this.setView(n.center,n.zoom,t)},fitWorld:function(e){return this.fitBounds([[-90,-180],[90,180]],e)},panTo:function(e,t){return this.setView(e,this._zoom,{pan:t})},panBy:function(e,t){if(t=t||{},!(e=N(e).round()).x&&!e.y)return this.fire("moveend");if(!0!==t.animate&&!this.getSize().contains(e))return this._resetView(this.unproject(this.project(this.getCenter()).add(e)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new rn,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),t.noMoveStart||this.fire("movestart"),!1!==t.animate){St(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(e).round();this._panAnim.run(this._mapPane,n,t.duration||.25,t.easeLinearity)}else this._rawPanBy(e),this.fire("move").fire("moveend");return this},flyTo:function(e,t,n){if(!1===(n=n||{}).animate||!ze.any3d)return this.setView(e,t,n);this._stop();var r=this.project(this.getCenter()),i=this.project(e),o=this.getSize(),s=this._zoom;e=j(e),t=void 0===t?s:t;var a=Math.max(o.x,o.y),l=a*this.getZoomScale(s,t),c=i.distanceTo(r)||1,u=1.42,d=u*u;function h(e){var t=(l*l-a*a+(e?-1:1)*d*d*c*c)/(2*(e?l:a)*d*c),n=Math.sqrt(t*t+1)-t;return n<1e-9?-18:Math.log(n)}function p(e){return(Math.exp(e)-Math.exp(-e))/2}function f(e){return(Math.exp(e)+Math.exp(-e))/2}function m(e){return p(e)/f(e)}var g=h(0);function v(e){return a*(f(g)/f(g+u*e))}function y(e){return a*(f(g)*m(g+u*e)-p(g))/d}function b(e){return 1-Math.pow(1-e,1.5)}var x=Date.now(),S=(h(1)-g)/u,w=n.duration?1e3*n.duration:1e3*S*.8;function _(){var n=(Date.now()-x)/w,o=b(n)*S;n<=1?(this._flyToFrame=A(_,this),this._move(this.unproject(r.add(i.subtract(r).multiplyBy(y(o)/c)),s),this.getScaleZoom(a/v(o),s),{flyTo:!0})):this._move(e,t)._moveEnd(!0)}return this._moveStart(!0,n.noMoveStart),_.call(this),this},flyToBounds:function(e,t){var n=this._getBoundsCenterZoom(e,t);return this.flyTo(n.center,n.zoom,t)},setMaxBounds:function(e){return e=F(e),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),e.isValid()?(this.options.maxBounds=e,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(e){var t=this.options.minZoom;return this.options.minZoom=e,this._loaded&&t!==e&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(e):this},setMaxZoom:function(e){var t=this.options.maxZoom;return this.options.maxZoom=e,this._loaded&&t!==e&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(e):this},panInsideBounds:function(e,t){this._enforcingBounds=!0;var n=this.getCenter(),r=this._limitCenter(n,this._zoom,F(e));return n.equals(r)||this.panTo(r,t),this._enforcingBounds=!1,this},panInside:function(e,t){var n=N((t=t||{}).paddingTopLeft||t.padding||[0,0]),r=N(t.paddingBottomRight||t.padding||[0,0]),i=this.project(this.getCenter()),o=this.project(e),s=this.getPixelBounds(),a=B([s.min.add(n),s.max.subtract(r)]),l=a.getSize();if(!a.contains(o)){this._enforcingBounds=!0;var c=o.subtract(a.getCenter()),u=a.extend(o).getSize().subtract(l);i.x+=c.x<0?-u.x:u.x,i.y+=c.y<0?-u.y:u.y,this.panTo(this.unproject(i),t),this._enforcingBounds=!1}return this},invalidateSize:function(e){if(!this._loaded)return this;e=n({animate:!1,pan:!0},!0===e?{animate:!0}:e);var t=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var r=this.getSize(),o=t.divideBy(2).round(),s=r.divideBy(2).round(),a=o.subtract(s);return a.x||a.y?(e.animate&&e.pan?this.panBy(a):(e.pan&&this._rawPanBy(a),this.fire("move"),e.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(i(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:t,newSize:r})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(e){if(e=this._locateOptions=n({timeout:1e4,watch:!1},e),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var t=i(this._handleGeolocationResponse,this),r=i(this._handleGeolocationError,this);return e.watch?this._locationWatchId=navigator.geolocation.watchPosition(t,r,e):navigator.geolocation.getCurrentPosition(t,r,e),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(e){if(this._container._leaflet_id){var t=e.code,n=e.message||(1===t?"permission denied":2===t?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:t,message:"Geolocation error: "+n+"."})}},_handleGeolocationResponse:function(e){if(this._container._leaflet_id){var t=new U(e.coords.latitude,e.coords.longitude),n=t.toBounds(2*e.coords.accuracy),r=this._locateOptions;if(r.setView){var i=this.getBoundsZoom(n);this.setView(t,r.maxZoom?Math.min(i,r.maxZoom):i)}var o={latlng:t,bounds:n,timestamp:e.timestamp};for(var s in e.coords)"number"==typeof e.coords[s]&&(o[s]=e.coords[s]);this.fire("locationfound",o)}},addHandler:function(e,t){if(!t)return this;var n=this[e]=new t(this);return this._handlers.push(n),this.options[e]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(e){this._container._leaflet_id=void 0,this._containerId=void 0}var e;for(e in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),gt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(E(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[e].remove();for(e in this._panes)gt(this._panes[e]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(e,t){var n=mt("div","leaflet-pane"+(e?" leaflet-"+e.replace("Pane","")+"-pane":""),t||this._mapPane);return e&&(this._panes[e]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var e=this.getPixelBounds();return new z(this.unproject(e.getBottomLeft()),this.unproject(e.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(e,t,n){e=F(e),n=N(n||[0,0]);var r=this.getZoom()||0,i=this.getMinZoom(),o=this.getMaxZoom(),s=e.getNorthWest(),a=e.getSouthEast(),l=this.getSize().subtract(n),c=B(this.project(a,r),this.project(s,r)).getSize(),u=ze.any3d?this.options.zoomSnap:1,d=l.x/c.x,h=l.y/c.y,p=t?Math.max(d,h):Math.min(d,h);return r=this.getScaleZoom(p,r),u&&(r=Math.round(r/(u/100))*(u/100),r=t?Math.ceil(r/u)*u:Math.floor(r/u)*u),Math.max(i,Math.min(o,r))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new k(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(e,t){var n=this._getTopLeftPoint(e,t);return new D(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(e){return this.options.crs.getProjectedBounds(void 0===e?this.getZoom():e)},getPane:function(e){return"string"==typeof e?this._panes[e]:e},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(e,t){var n=this.options.crs;return t=void 0===t?this._zoom:t,n.scale(e)/n.scale(t)},getScaleZoom:function(e,t){var n=this.options.crs;t=void 0===t?this._zoom:t;var r=n.zoom(e*n.scale(t));return isNaN(r)?1/0:r},project:function(e,t){return t=void 0===t?this._zoom:t,this.options.crs.latLngToPoint(j(e),t)},unproject:function(e,t){return t=void 0===t?this._zoom:t,this.options.crs.pointToLatLng(N(e),t)},layerPointToLatLng:function(e){var t=N(e).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(e){return this.project(j(e))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(e){return this.options.crs.wrapLatLng(j(e))},wrapLatLngBounds:function(e){return this.options.crs.wrapLatLngBounds(F(e))},distance:function(e,t){return this.options.crs.distance(j(e),j(t))},containerPointToLayerPoint:function(e){return N(e).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(e){return N(e).add(this._getMapPanePos())},containerPointToLatLng:function(e){var t=this.containerPointToLayerPoint(N(e));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(j(e)))},mouseEventToContainerPoint:function(e){return Xt(e,this._container)},mouseEventToLayerPoint:function(e){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e))},mouseEventToLatLng:function(e){return this.layerPointToLatLng(this.mouseEventToLayerPoint(e))},_initContainer:function(e){var t=this._container=pt(e);if(!t)throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");Ft(t,"scroll",this._onScroll,this),this._containerId=s(t)},_initLayout:function(){var e=this._container;this._fadeAnimated=this.options.fadeAnimation&&ze.any3d,St(e,"leaflet-container"+(ze.touch?" leaflet-touch":"")+(ze.retina?" leaflet-retina":"")+(ze.ielt9?" leaflet-oldie":"")+(ze.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var t=ft(e,"position");"absolute"!==t&&"relative"!==t&&"fixed"!==t&&"sticky"!==t&&(e.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var e=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),It(this._mapPane,new k(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(St(e.markerPane,"leaflet-zoom-hide"),St(e.shadowPane,"leaflet-zoom-hide"))},_resetView:function(e,t,n){It(this._mapPane,new k(0,0));var r=!this._loaded;this._loaded=!0,t=this._limitZoom(t),this.fire("viewprereset");var i=this._zoom!==t;this._moveStart(i,n)._move(e,t)._moveEnd(i),this.fire("viewreset"),r&&this.fire("load")},_moveStart:function(e,t){return e&&this.fire("zoomstart"),t||this.fire("movestart"),this},_move:function(e,t,n,r){void 0===t&&(t=this._zoom);var i=this._zoom!==t;return this._zoom=t,this._lastCenter=e,this._pixelOrigin=this._getNewPixelOrigin(e),r?n&&n.pinch&&this.fire("zoom",n):((i||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)),this},_moveEnd:function(e){return e&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return E(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(e){It(this._mapPane,this._getMapPanePos().subtract(e))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){this._targets={},this._targets[s(this._container)]=this;var t=e?jt:Ft;t(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&t(window,"resize",this._onResize,this),ze.any3d&&this.options.transform3DLimit&&(e?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){E(this._resizeRequest),this._resizeRequest=A((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var e=this._getMapPanePos();Math.max(Math.abs(e.x),Math.abs(e.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(e,t){for(var n,r=[],i="mouseout"===t||"mouseover"===t,o=e.target||e.srcElement,a=!1;o;){if((n=this._targets[s(o)])&&("click"===t||"preclick"===t)&&this._draggableMoved(n)){a=!0;break}if(n&&n.listens(t,!0)){if(i&&!tn(o,e))break;if(r.push(n),i)break}if(o===this._container)break;o=o.parentNode}return r.length||a||i||!this.listens(t,!0)||(r=[this]),r},_isClickDisabled:function(e){for(;e&&e!==this._container;){if(e._leaflet_disable_click)return!0;e=e.parentNode}},_handleDOMEvent:function(e){var t=e.target||e.srcElement;if(!(!this._loaded||t._leaflet_disable_events||"click"===e.type&&this._isClickDisabled(t))){var n=e.type;"mousedown"===n&&Nt(t),this._fireDOMEvent(e,n)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(e,t,r){if("click"===e.type){var i=n({},e);i.type="preclick",this._fireDOMEvent(i,i.type,r)}var o=this._findEventTargets(e,t);if(r){for(var s=[],a=0;a<r.length;a++)r[a].listens(t,!0)&&s.push(r[a]);o=s.concat(o)}if(o.length){"contextmenu"===t&&Qt(e);var l=o[0],c={originalEvent:e};if("keypress"!==e.type&&"keydown"!==e.type&&"keyup"!==e.type){var u=l.getLatLng&&(!l._radius||l._radius<=10);c.containerPoint=u?this.latLngToContainerPoint(l.getLatLng()):this.mouseEventToContainerPoint(e),c.layerPoint=this.containerPointToLayerPoint(c.containerPoint),c.latlng=u?l.getLatLng():this.layerPointToLatLng(c.layerPoint)}for(a=0;a<o.length;a++)if(o[a].fire(t,c,!0),c.originalEvent._stopped||!1===o[a].options.bubblingMouseEvents&&-1!==y(this._mouseEvents,t))return}},_draggableMoved:function(e){return(e=e.dragging&&e.dragging.enabled()?e:this).dragging&&e.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var e=0,t=this._handlers.length;e<t;e++)this._handlers[e].disable()},whenReady:function(e,t){return this._loaded?e.call(t||this,{target:this}):this.on("load",e,t),this},_getMapPanePos:function(){return Rt(this._mapPane)||new k(0,0)},_moved:function(){var e=this._getMapPanePos();return e&&!e.equals([0,0])},_getTopLeftPoint:function(e,t){return(e&&void 0!==t?this._getNewPixelOrigin(e,t):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(e,t){var n=this.getSize()._divideBy(2);return this.project(e,t)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(e,t,n){var r=this._getNewPixelOrigin(n,t);return this.project(e,t)._subtract(r)},_latLngBoundsToNewLayerBounds:function(e,t,n){var r=this._getNewPixelOrigin(n,t);return B([this.project(e.getSouthWest(),t)._subtract(r),this.project(e.getNorthWest(),t)._subtract(r),this.project(e.getSouthEast(),t)._subtract(r),this.project(e.getNorthEast(),t)._subtract(r)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(e){return this.latLngToLayerPoint(e).subtract(this._getCenterLayerPoint())},_limitCenter:function(e,t,n){if(!n)return e;var r=this.project(e,t),i=this.getSize().divideBy(2),o=new D(r.subtract(i),r.add(i)),s=this._getBoundsOffset(o,n,t);return Math.abs(s.x)<=1&&Math.abs(s.y)<=1?e:this.unproject(r.add(s),t)},_limitOffset:function(e,t){if(!t)return e;var n=this.getPixelBounds(),r=new D(n.min.add(e),n.max.add(e));return e.add(this._getBoundsOffset(r,t))},_getBoundsOffset:function(e,t,n){var r=B(this.project(t.getNorthEast(),n),this.project(t.getSouthWest(),n)),i=r.min.subtract(e.min),o=r.max.subtract(e.max);return new k(this._rebound(i.x,-o.x),this._rebound(i.y,-o.y))},_rebound:function(e,t){return e+t>0?Math.round(e-t)/2:Math.max(0,Math.ceil(e))-Math.max(0,Math.floor(t))},_limitZoom:function(e){var t=this.getMinZoom(),n=this.getMaxZoom(),r=ze.any3d?this.options.zoomSnap:1;return r&&(e=Math.round(e/r)*r),Math.max(t,Math.min(n,e))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){wt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(e,t){var n=this._getCenterOffset(e)._trunc();return!(!0!==(t&&t.animate)&&!this.getSize().contains(n)||(this.panBy(n,t),0))},_createAnimProxy:function(){var e=this._proxy=mt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(e),this.on("zoomanim",(function(e){var t=ut,n=this._proxy.style[t];Mt(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),n===this._proxy.style[t]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){gt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var e=this.getCenter(),t=this.getZoom();Mt(this._proxy,this.project(e,t),this.getZoomScale(t,1))},_catchTransitionEnd:function(e){this._animatingZoom&&e.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(e,t,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(t-this._zoom)>this.options.zoomAnimationThreshold)return!1;var r=this.getZoomScale(t),i=this._getCenterOffset(e)._divideBy(1-1/r);return!(!0!==n.animate&&!this.getSize().contains(i)||(A((function(){this._moveStart(!0,n.noMoveStart||!1)._animateZoom(e,t,!0)}),this),0))},_animateZoom:function(e,t,n,r){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=e,this._animateToZoom=t,St(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:e,zoom:t,noUpdate:r}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(i(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&wt(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function sn(e,t){return new on(e,t)}var an=M.extend({options:{position:"topright"},initialize:function(e){p(this,e)},getPosition:function(){return this.options.position},setPosition:function(e){var t=this._map;return t&&t.removeControl(this),this.options.position=e,t&&t.addControl(this),this},getContainer:function(){return this._container},addTo:function(e){this.remove(),this._map=e;var t=this._container=this.onAdd(e),n=this.getPosition(),r=e._controlCorners[n];return St(t,"leaflet-control"),-1!==n.indexOf("bottom")?r.insertBefore(t,r.firstChild):r.appendChild(t),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(gt(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(e){this._map&&e&&e.screenX>0&&e.screenY>0&&this._map.getContainer().focus()}}),ln=function(e){return new an(e)};on.include({addControl:function(e){return e.addTo(this),this},removeControl:function(e){return e.remove(),this},_initControlPos:function(){var e=this._controlCorners={},t="leaflet-",n=this._controlContainer=mt("div",t+"control-container",this._container);function r(r,i){var o=t+r+" "+t+i;e[r+i]=mt("div",o,n)}r("top","left"),r("top","right"),r("bottom","left"),r("bottom","right")},_clearControlPos:function(){for(var e in this._controlCorners)gt(this._controlCorners[e]);gt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var cn=an.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(e,t,n,r){return n<r?-1:r<n?1:0}},initialize:function(e,t,n){for(var r in p(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,e)this._addLayer(e[r],r);for(r in t)this._addLayer(t[r],r,!0)},onAdd:function(e){this._initLayout(),this._update(),this._map=e,e.on("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(e){return an.prototype.addTo.call(this,e),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(e,t){return this._addLayer(e,t),this._map?this._update():this},addOverlay:function(e,t){return this._addLayer(e,t,!0),this._map?this._update():this},removeLayer:function(e){e.off("add remove",this._onLayerChange,this);var t=this._getLayer(s(e));return t&&this._layers.splice(this._layers.indexOf(t),1),this._map?this._update():this},expand:function(){St(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var e=this._map.getSize().y-(this._container.offsetTop+50);return e<this._section.clientHeight?(St(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=e+"px"):wt(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return wt(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var e="leaflet-control-layers",t=this._container=mt("div",e),n=this.options.collapsed;t.setAttribute("aria-haspopup",!0),Jt(t),Kt(t);var r=this._section=mt("section",e+"-list");n&&(this._map.on("click",this.collapse,this),Ft(t,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var i=this._layersLink=mt("a",e+"-toggle",t);i.href="#",i.title="Layers",i.setAttribute("role","button"),Ft(i,{keydown:function(e){13===e.keyCode&&this._expandSafely()},click:function(e){Qt(e),this._expandSafely()}},this),n||this.expand(),this._baseLayersList=mt("div",e+"-base",r),this._separator=mt("div",e+"-separator",r),this._overlaysList=mt("div",e+"-overlays",r),t.appendChild(r)},_getLayer:function(e){for(var t=0;t<this._layers.length;t++)if(this._layers[t]&&s(this._layers[t].layer)===e)return this._layers[t]},_addLayer:function(e,t,n){this._map&&e.on("add remove",this._onLayerChange,this),this._layers.push({layer:e,name:t,overlay:n}),this.options.sortLayers&&this._layers.sort(i((function(e,t){return this.options.sortFunction(e.layer,t.layer,e.name,t.name)}),this)),this.options.autoZIndex&&e.setZIndex&&(this._lastZIndex++,e.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;vt(this._baseLayersList),vt(this._overlaysList),this._layerControlInputs=[];var e,t,n,r,i=0;for(n=0;n<this._layers.length;n++)r=this._layers[n],this._addItem(r),t=t||r.overlay,e=e||!r.overlay,i+=r.overlay?0:1;return this.options.hideSingleBase&&(e=e&&i>1,this._baseLayersList.style.display=e?"":"none"),this._separator.style.display=t&&e?"":"none",this},_onLayerChange:function(e){this._handlingClick||this._update();var t=this._getLayer(s(e.target)),n=t.overlay?"add"===e.type?"overlayadd":"overlayremove":"add"===e.type?"baselayerchange":null;n&&this._map.fire(n,t)},_createRadioElement:function(e,t){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+e+'"'+(t?' checked="checked"':"")+"/>",r=document.createElement("div");return r.innerHTML=n,r.firstChild},_addItem:function(e){var t,n=document.createElement("label"),r=this._map.hasLayer(e.layer);e.overlay?((t=document.createElement("input")).type="checkbox",t.className="leaflet-control-layers-selector",t.defaultChecked=r):t=this._createRadioElement("leaflet-base-layers_"+s(this),r),this._layerControlInputs.push(t),t.layerId=s(e.layer),Ft(t,"click",this._onInputClick,this);var i=document.createElement("span");i.innerHTML=" "+e.name;var o=document.createElement("span");return n.appendChild(o),o.appendChild(t),o.appendChild(i),(e.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){if(!this._preventClick){var e,t,n=this._layerControlInputs,r=[],i=[];this._handlingClick=!0;for(var o=n.length-1;o>=0;o--)e=n[o],t=this._getLayer(e.layerId).layer,e.checked?r.push(t):e.checked||i.push(t);for(o=0;o<i.length;o++)this._map.hasLayer(i[o])&&this._map.removeLayer(i[o]);for(o=0;o<r.length;o++)this._map.hasLayer(r[o])||this._map.addLayer(r[o]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var e,t,n=this._layerControlInputs,r=this._map.getZoom(),i=n.length-1;i>=0;i--)e=n[i],t=this._getLayer(e.layerId).layer,e.disabled=void 0!==t.options.minZoom&&r<t.options.minZoom||void 0!==t.options.maxZoom&&r>t.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var e=this._section;this._preventClick=!0,Ft(e,"click",Qt),this.expand();var t=this;setTimeout((function(){jt(e,"click",Qt),t._preventClick=!1}))}}),un=function(e,t,n){return new cn(e,t,n)},dn=an.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(e){var t="leaflet-control-zoom",n=mt("div",t+" leaflet-bar"),r=this.options;return this._zoomInButton=this._createButton(r.zoomInText,r.zoomInTitle,t+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(r.zoomOutText,r.zoomOutTitle,t+"-out",n,this._zoomOut),this._updateDisabled(),e.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(e){e.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(e){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(e.shiftKey?3:1))},_zoomOut:function(e){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(e.shiftKey?3:1))},_createButton:function(e,t,n,r,i){var o=mt("a",n,r);return o.innerHTML=e,o.href="#",o.title=t,o.setAttribute("role","button"),o.setAttribute("aria-label",t),Jt(o),Ft(o,"click",Yt),Ft(o,"click",i,this),Ft(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var e=this._map,t="leaflet-disabled";wt(this._zoomInButton,t),wt(this._zoomOutButton,t),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||e._zoom===e.getMinZoom())&&(St(this._zoomOutButton,t),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||e._zoom===e.getMaxZoom())&&(St(this._zoomInButton,t),this._zoomInButton.setAttribute("aria-disabled","true"))}});on.mergeOptions({zoomControl:!0}),on.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new dn,this.addControl(this.zoomControl))}));var hn=function(e){return new dn(e)},pn=an.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(e){var t="leaflet-control-scale",n=mt("div",t),r=this.options;return this._addScales(r,t+"-line",n),e.on(r.updateWhenIdle?"moveend":"move",this._update,this),e.whenReady(this._update,this),n},onRemove:function(e){e.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(e,t,n){e.metric&&(this._mScale=mt("div",t,n)),e.imperial&&(this._iScale=mt("div",t,n))},_update:function(){var e=this._map,t=e.getSize().y/2,n=e.distance(e.containerPointToLatLng([0,t]),e.containerPointToLatLng([this.options.maxWidth,t]));this._updateScales(n)},_updateScales:function(e){this.options.metric&&e&&this._updateMetric(e),this.options.imperial&&e&&this._updateImperial(e)},_updateMetric:function(e){var t=this._getRoundNum(e),n=t<1e3?t+" m":t/1e3+" km";this._updateScale(this._mScale,n,t/e)},_updateImperial:function(e){var t,n,r,i=3.2808399*e;i>5280?(t=i/5280,n=this._getRoundNum(t),this._updateScale(this._iScale,n+" mi",n/t)):(r=this._getRoundNum(i),this._updateScale(this._iScale,r+" ft",r/i))},_updateScale:function(e,t,n){e.style.width=Math.round(this.options.maxWidth*n)+"px",e.innerHTML=t},_getRoundNum:function(e){var t=Math.pow(10,(Math.floor(e)+"").length-1),n=e/t;return t*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),fn=function(e){return new pn(e)},mn='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',gn=an.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(ze.inlineSvg?mn+" ":"")+"Leaflet</a>"},initialize:function(e){p(this,e),this._attributions={}},onAdd:function(e){for(var t in e.attributionControl=this,this._container=mt("div","leaflet-control-attribution"),Jt(this._container),e._layers)e._layers[t].getAttribution&&this.addAttribution(e._layers[t].getAttribution());return this._update(),e.on("layeradd",this._addAttribution,this),this._container},onRemove:function(e){e.off("layeradd",this._addAttribution,this)},_addAttribution:function(e){e.layer.getAttribution&&(this.addAttribution(e.layer.getAttribution()),e.layer.once("remove",(function(){this.removeAttribution(e.layer.getAttribution())}),this))},setPrefix:function(e){return this.options.prefix=e,this._update(),this},addAttribution:function(e){return e?(this._attributions[e]||(this._attributions[e]=0),this._attributions[e]++,this._update(),this):this},removeAttribution:function(e){return e?(this._attributions[e]&&(this._attributions[e]--,this._update()),this):this},_update:function(){if(this._map){var e=[];for(var t in this._attributions)this._attributions[t]&&e.push(t);var n=[];this.options.prefix&&n.push(this.options.prefix),e.length&&n.push(e.join(", ")),this._container.innerHTML=n.join(' <span aria-hidden="true">|</span> ')}}});on.mergeOptions({attributionControl:!0}),on.addInitHook((function(){this.options.attributionControl&&(new gn).addTo(this)}));var vn=function(e){return new gn(e)};an.Layers=cn,an.Zoom=dn,an.Scale=pn,an.Attribution=gn,ln.layers=un,ln.zoom=hn,ln.scale=fn,ln.attribution=vn;var yn=M.extend({initialize:function(e){this._map=e},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});yn.addTo=function(e,t){return e.addHandler(t,this),this};var bn={Events:R},xn=ze.touch?"touchstart mousedown":"mousedown",Sn=P.extend({options:{clickTolerance:3},initialize:function(e,t,n,r){p(this,r),this._element=e,this._dragStartTarget=t||e,this._preventOutline=n},enable:function(){this._enabled||(Ft(this._dragStartTarget,xn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Sn._dragging===this&&this.finishDrag(!0),jt(this._dragStartTarget,xn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(e){if(this._enabled&&(this._moved=!1,!xt(this._element,"leaflet-zoom-anim")))if(e.touches&&1!==e.touches.length)Sn._dragging===this&&this.finishDrag();else if(!(Sn._dragging||e.shiftKey||1!==e.which&&1!==e.button&&!e.touches||(Sn._dragging=this,this._preventOutline&&Nt(this._element),kt(),ot(),this._moving))){this.fire("down");var t=e.touches?e.touches[0]:e,n=Dt(this._element);this._startPoint=new k(t.clientX,t.clientY),this._startPos=Rt(this._element),this._parentScale=Bt(n);var r="mousedown"===e.type;Ft(document,r?"mousemove":"touchmove",this._onMove,this),Ft(document,r?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(e){if(this._enabled)if(e.touches&&e.touches.length>1)this._moved=!0;else{var t=e.touches&&1===e.touches.length?e.touches[0]:e,n=new k(t.clientX,t.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,Qt(e),this._moved||(this.fire("dragstart"),this._moved=!0,St(document.body,"leaflet-dragging"),this._lastTarget=e.target||e.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),St(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,this._lastEvent=e,this._updatePosition()))}},_updatePosition:function(){var e={originalEvent:this._lastEvent};this.fire("predrag",e),It(this._element,this._newPos),this.fire("drag",e)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(e){wt(document.body,"leaflet-dragging"),this._lastTarget&&(wt(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),jt(document,"mousemove touchmove",this._onMove,this),jt(document,"mouseup touchend touchcancel",this._onUp,this),Ot(),st();var t=this._moved&&this._moving;this._moving=!1,Sn._dragging=!1,t&&this.fire("dragend",{noInertia:e,distance:this._newPos.distanceTo(this._startPos)})}});function wn(e,t,n){var r,i,o,s,a,l,c,u,d,h=[1,4,2,8];for(i=0,c=e.length;i<c;i++)e[i]._code=Ln(e[i],t);for(s=0;s<4;s++){for(u=h[s],r=[],i=0,o=(c=e.length)-1;i<c;o=i++)a=e[i],l=e[o],a._code&u?l._code&u||((d=Nn(l,a,u,t,n))._code=Ln(d,t),r.push(d)):(l._code&u&&((d=Nn(l,a,u,t,n))._code=Ln(d,t),r.push(d)),r.push(a));e=r}return e}function _n(e,t){var n,r,i,o,s,a,l,c,u;if(!e||0===e.length)throw new Error("latlngs not passed");zn(e)||(console.warn("latlngs are not flat! Only the first ring will be used"),e=e[0]);var d=j([0,0]),h=F(e);h.getNorthWest().distanceTo(h.getSouthWest())*h.getNorthEast().distanceTo(h.getNorthWest())<1700&&(d=Cn(e));var p=e.length,f=[];for(n=0;n<p;n++){var m=j(e[n]);f.push(t.project(j([m.lat-d.lat,m.lng-d.lng])))}for(a=l=c=0,n=0,r=p-1;n<p;r=n++)i=f[n],o=f[r],s=i.y*o.x-o.y*i.x,l+=(i.x+o.x)*s,c+=(i.y+o.y)*s,a+=3*s;u=0===a?f[0]:[l/a,c/a];var g=t.unproject(N(u));return j([g.lat+d.lat,g.lng+d.lng])}function Cn(e){for(var t=0,n=0,r=0,i=0;i<e.length;i++){var o=j(e[i]);t+=o.lat,n+=o.lng,r++}return j([t/r,n/r])}var An,En={__proto__:null,clipPolygon:wn,polygonCenter:_n,centroid:Cn};function Tn(e,t){if(!t||!e.length)return e.slice();var n=t*t;return e=Rn(e=kn(e,n),n)}function Mn(e,t,n){return Math.sqrt(Bn(e,t,n,!0))}function In(e,t,n){return Bn(e,t,n)}function Rn(e,t){var n=e.length,r=new("undefined"!=typeof Uint8Array?Uint8Array:Array)(n);r[0]=r[n-1]=1,Pn(e,r,t,0,n-1);var i,o=[];for(i=0;i<n;i++)r[i]&&o.push(e[i]);return o}function Pn(e,t,n,r,i){var o,s,a,l=0;for(s=r+1;s<=i-1;s++)(a=Bn(e[s],e[r],e[i],!0))>l&&(o=s,l=a);l>n&&(t[o]=1,Pn(e,t,n,r,o),Pn(e,t,n,o,i))}function kn(e,t){for(var n=[e[0]],r=1,i=0,o=e.length;r<o;r++)Dn(e[r],e[i])>t&&(n.push(e[r]),i=r);return i<o-1&&n.push(e[o-1]),n}function On(e,t,n,r,i){var o,s,a,l=r?An:Ln(e,n),c=Ln(t,n);for(An=c;;){if(!(l|c))return[e,t];if(l&c)return!1;a=Ln(s=Nn(e,t,o=l||c,n,i),n),o===l?(e=s,l=a):(t=s,c=a)}}function Nn(e,t,n,r,i){var o,s,a=t.x-e.x,l=t.y-e.y,c=r.min,u=r.max;return 8&n?(o=e.x+a*(u.y-e.y)/l,s=u.y):4&n?(o=e.x+a*(c.y-e.y)/l,s=c.y):2&n?(o=u.x,s=e.y+l*(u.x-e.x)/a):1&n&&(o=c.x,s=e.y+l*(c.x-e.x)/a),new k(o,s,i)}function Ln(e,t){var n=0;return e.x<t.min.x?n|=1:e.x>t.max.x&&(n|=2),e.y<t.min.y?n|=4:e.y>t.max.y&&(n|=8),n}function Dn(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r}function Bn(e,t,n,r){var i,o=t.x,s=t.y,a=n.x-o,l=n.y-s,c=a*a+l*l;return c>0&&((i=((e.x-o)*a+(e.y-s)*l)/c)>1?(o=n.x,s=n.y):i>0&&(o+=a*i,s+=l*i)),a=e.x-o,l=e.y-s,r?a*a+l*l:new k(o,s)}function zn(e){return!v(e[0])||"object"!=typeof e[0][0]&&void 0!==e[0][0]}function Fn(e){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),zn(e)}function Un(e,t){var n,r,i,o,s,a,l,c;if(!e||0===e.length)throw new Error("latlngs not passed");zn(e)||(console.warn("latlngs are not flat! Only the first ring will be used"),e=e[0]);var u=j([0,0]),d=F(e);d.getNorthWest().distanceTo(d.getSouthWest())*d.getNorthEast().distanceTo(d.getNorthWest())<1700&&(u=Cn(e));var h=e.length,p=[];for(n=0;n<h;n++){var f=j(e[n]);p.push(t.project(j([f.lat-u.lat,f.lng-u.lng])))}for(n=0,r=0;n<h-1;n++)r+=p[n].distanceTo(p[n+1])/2;if(0===r)c=p[0];else for(n=0,o=0;n<h-1;n++)if(s=p[n],a=p[n+1],(o+=i=s.distanceTo(a))>r){l=(o-r)/i,c=[a.x-l*(a.x-s.x),a.y-l*(a.y-s.y)];break}var m=t.unproject(N(c));return j([m.lat+u.lat,m.lng+u.lng])}var jn={__proto__:null,simplify:Tn,pointToSegmentDistance:Mn,closestPointOnSegment:In,clipSegment:On,_getEdgeIntersection:Nn,_getBitCode:Ln,_sqClosestPointOnSegment:Bn,isFlat:zn,_flat:Fn,polylineCenter:Un},Hn={project:function(e){return new k(e.lng,e.lat)},unproject:function(e){return new U(e.y,e.x)},bounds:new D([-180,-90],[180,90])},Vn={R:6378137,R_MINOR:6356752.314245179,bounds:new D([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(e){var t=Math.PI/180,n=this.R,r=e.lat*t,i=this.R_MINOR/n,o=Math.sqrt(1-i*i),s=o*Math.sin(r),a=Math.tan(Math.PI/4-r/2)/Math.pow((1-s)/(1+s),o/2);return r=-n*Math.log(Math.max(a,1e-10)),new k(e.lng*t*n,r)},unproject:function(e){for(var t,n=180/Math.PI,r=this.R,i=this.R_MINOR/r,o=Math.sqrt(1-i*i),s=Math.exp(-e.y/r),a=Math.PI/2-2*Math.atan(s),l=0,c=.1;l<15&&Math.abs(c)>1e-7;l++)t=o*Math.sin(a),t=Math.pow((1-t)/(1+t),o/2),a+=c=Math.PI/2-2*Math.atan(s*t)-a;return new U(a*n,e.x*n/r)}},Gn={__proto__:null,LonLat:Hn,Mercator:Vn,SphericalMercator:q},Wn=n({},G,{code:"EPSG:3395",projection:Vn,transformation:function(){var e=.5/(Math.PI*Vn.R);return J(e,.5,-e,.5)}()}),qn=n({},G,{code:"EPSG:4326",projection:Hn,transformation:J(1/180,1,-1/180,.5)}),Kn=n({},V,{projection:Hn,transformation:J(1,0,-1,0),scale:function(e){return Math.pow(2,e)},zoom:function(e){return Math.log(e)/Math.LN2},distance:function(e,t){var n=t.lng-e.lng,r=t.lat-e.lat;return Math.sqrt(n*n+r*r)},infinite:!0});V.Earth=G,V.EPSG3395=Wn,V.EPSG3857=Q,V.EPSG900913=Y,V.EPSG4326=qn,V.Simple=Kn;var Jn=P.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(e){return e.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(e){return e&&e.removeLayer(this),this},getPane:function(e){return this._map.getPane(e?this.options[e]||e:this.options.pane)},addInteractiveTarget:function(e){return this._map._targets[s(e)]=this,this},removeInteractiveTarget:function(e){return delete this._map._targets[s(e)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(e){var t=e.target;if(t.hasLayer(this)){if(this._map=t,this._zoomAnimated=t._zoomAnimated,this.getEvents){var n=this.getEvents();t.on(n,this),this.once("remove",(function(){t.off(n,this)}),this)}this.onAdd(t),this.fire("add"),t.fire("layeradd",{layer:this})}}});on.include({addLayer:function(e){if(!e._layerAdd)throw new Error("The provided object is not a Layer.");var t=s(e);return this._layers[t]||(this._layers[t]=e,e._mapToAdd=this,e.beforeAdd&&e.beforeAdd(this),this.whenReady(e._layerAdd,e)),this},removeLayer:function(e){var t=s(e);return this._layers[t]?(this._loaded&&e.onRemove(this),delete this._layers[t],this._loaded&&(this.fire("layerremove",{layer:e}),e.fire("remove")),e._map=e._mapToAdd=null,this):this},hasLayer:function(e){return s(e)in this._layers},eachLayer:function(e,t){for(var n in this._layers)e.call(t,this._layers[n]);return this},_addLayers:function(e){for(var t=0,n=(e=e?v(e)?e:[e]:[]).length;t<n;t++)this.addLayer(e[t])},_addZoomLimit:function(e){isNaN(e.options.maxZoom)&&isNaN(e.options.minZoom)||(this._zoomBoundLayers[s(e)]=e,this._updateZoomLevels())},_removeZoomLimit:function(e){var t=s(e);this._zoomBoundLayers[t]&&(delete this._zoomBoundLayers[t],this._updateZoomLevels())},_updateZoomLevels:function(){var e=1/0,t=-1/0,n=this._getZoomSpan();for(var r in this._zoomBoundLayers){var i=this._zoomBoundLayers[r].options;e=void 0===i.minZoom?e:Math.min(e,i.minZoom),t=void 0===i.maxZoom?t:Math.max(t,i.maxZoom)}this._layersMaxZoom=t===-1/0?void 0:t,this._layersMinZoom=e===1/0?void 0:e,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Qn=Jn.extend({initialize:function(e,t){var n,r;if(p(this,t),this._layers={},e)for(n=0,r=e.length;n<r;n++)this.addLayer(e[n])},addLayer:function(e){var t=this.getLayerId(e);return this._layers[t]=e,this._map&&this._map.addLayer(e),this},removeLayer:function(e){var t=e in this._layers?e:this.getLayerId(e);return this._map&&this._layers[t]&&this._map.removeLayer(this._layers[t]),delete this._layers[t],this},hasLayer:function(e){return("number"==typeof e?e:this.getLayerId(e))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(e){var t,n,r=Array.prototype.slice.call(arguments,1);for(t in this._layers)(n=this._layers[t])[e]&&n[e].apply(n,r);return this},onAdd:function(e){this.eachLayer(e.addLayer,e)},onRemove:function(e){this.eachLayer(e.removeLayer,e)},eachLayer:function(e,t){for(var n in this._layers)e.call(t,this._layers[n]);return this},getLayer:function(e){return this._layers[e]},getLayers:function(){var e=[];return this.eachLayer(e.push,e),e},setZIndex:function(e){return this.invoke("setZIndex",e)},getLayerId:function(e){return s(e)}}),Yn=function(e,t){return new Qn(e,t)},Zn=Qn.extend({addLayer:function(e){return this.hasLayer(e)?this:(e.addEventParent(this),Qn.prototype.addLayer.call(this,e),this.fire("layeradd",{layer:e}))},removeLayer:function(e){return this.hasLayer(e)?(e in this._layers&&(e=this._layers[e]),e.removeEventParent(this),Qn.prototype.removeLayer.call(this,e),this.fire("layerremove",{layer:e})):this},setStyle:function(e){return this.invoke("setStyle",e)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var e=new z;for(var t in this._layers){var n=this._layers[t];e.extend(n.getBounds?n.getBounds():n.getLatLng())}return e}}),Xn=function(e,t){return new Zn(e,t)},$n=M.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(e){p(this,e)},createIcon:function(e){return this._createIcon("icon",e)},createShadow:function(e){return this._createIcon("shadow",e)},_createIcon:function(e,t){var n=this._getIconUrl(e);if(!n){if("icon"===e)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var r=this._createImg(n,t&&"IMG"===t.tagName?t:null);return this._setIconStyles(r,e),(this.options.crossOrigin||""===this.options.crossOrigin)&&(r.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),r},_setIconStyles:function(e,t){var n=this.options,r=n[t+"Size"];"number"==typeof r&&(r=[r,r]);var i=N(r),o=N("shadow"===t&&n.shadowAnchor||n.iconAnchor||i&&i.divideBy(2,!0));e.className="leaflet-marker-"+t+" "+(n.className||""),o&&(e.style.marginLeft=-o.x+"px",e.style.marginTop=-o.y+"px"),i&&(e.style.width=i.x+"px",e.style.height=i.y+"px")},_createImg:function(e,t){return(t=t||document.createElement("img")).src=e,t},_getIconUrl:function(e){return ze.retina&&this.options[e+"RetinaUrl"]||this.options[e+"Url"]}});function er(e){return new $n(e)}var tr=$n.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(e){return"string"!=typeof tr.imagePath&&(tr.imagePath=this._detectIconPath()),(this.options.imagePath||tr.imagePath)+$n.prototype._getIconUrl.call(this,e)},_stripUrl:function(e){var t=function(e,t,n){var r=t.exec(e);return r&&r[n]};return(e=t(e,/^url\((['"])?(.+)\1\)$/,2))&&t(e,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var e=mt("div","leaflet-default-icon-path",document.body),t=ft(e,"background-image")||ft(e,"backgroundImage");if(document.body.removeChild(e),t=this._stripUrl(t))return t;var n=document.querySelector('link[href$="leaflet.css"]');return n?n.href.substring(0,n.href.length-11-1):""}}),nr=yn.extend({initialize:function(e){this._marker=e},addHooks:function(){var e=this._marker._icon;this._draggable||(this._draggable=new Sn(e,e,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),St(e,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&wt(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(e){var t=this._marker,n=t._map,r=this._marker.options.autoPanSpeed,i=this._marker.options.autoPanPadding,o=Rt(t._icon),s=n.getPixelBounds(),a=n.getPixelOrigin(),l=B(s.min._subtract(a).add(i),s.max._subtract(a).subtract(i));if(!l.contains(o)){var c=N((Math.max(l.max.x,o.x)-l.max.x)/(s.max.x-l.max.x)-(Math.min(l.min.x,o.x)-l.min.x)/(s.min.x-l.min.x),(Math.max(l.max.y,o.y)-l.max.y)/(s.max.y-l.max.y)-(Math.min(l.min.y,o.y)-l.min.y)/(s.min.y-l.min.y)).multiplyBy(r);n.panBy(c,{animate:!1}),this._draggable._newPos._add(c),this._draggable._startPos._add(c),It(t._icon,this._draggable._newPos),this._onDrag(e),this._panRequest=A(this._adjustPan.bind(this,e))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(e){this._marker.options.autoPan&&(E(this._panRequest),this._panRequest=A(this._adjustPan.bind(this,e)))},_onDrag:function(e){var t=this._marker,n=t._shadow,r=Rt(t._icon),i=t._map.layerPointToLatLng(r);n&&It(n,r),t._latlng=i,e.latlng=i,e.oldLatLng=this._oldLatLng,t.fire("move",e).fire("drag",e)},_onDragEnd:function(e){E(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",e)}}),rr=Jn.extend({options:{icon:new tr,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(e,t){p(this,t),this._latlng=j(e)},onAdd:function(e){this._zoomAnimated=this._zoomAnimated&&e.options.markerZoomAnimation,this._zoomAnimated&&e.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(e){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&e.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(e){var t=this._latlng;return this._latlng=j(e),this.update(),this.fire("move",{oldLatLng:t,latlng:this._latlng})},setZIndexOffset:function(e){return this.options.zIndexOffset=e,this.update()},getIcon:function(){return this.options.icon},setIcon:function(e){return this.options.icon=e,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var e=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(e)}return this},_initIcon:function(){var e=this.options,t="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),n=e.icon.createIcon(this._icon),r=!1;n!==this._icon&&(this._icon&&this._removeIcon(),r=!0,e.title&&(n.title=e.title),"IMG"===n.tagName&&(n.alt=e.alt||"")),St(n,t),e.keyboard&&(n.tabIndex="0",n.setAttribute("role","button")),this._icon=n,e.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Ft(n,"focus",this._panOnFocus,this);var i=e.icon.createShadow(this._shadow),o=!1;i!==this._shadow&&(this._removeShadow(),o=!0),i&&(St(i,t),i.alt=""),this._shadow=i,e.opacity<1&&this._updateOpacity(),r&&this.getPane().appendChild(this._icon),this._initInteraction(),i&&o&&this.getPane(e.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&jt(this._icon,"focus",this._panOnFocus,this),gt(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&>(this._shadow),this._shadow=null},_setPos:function(e){this._icon&&It(this._icon,e),this._shadow&&It(this._shadow,e),this._zIndex=e.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(e){this._icon&&(this._icon.style.zIndex=this._zIndex+e)},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center).round();this._setPos(t)},_initInteraction:function(){if(this.options.interactive&&(St(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),nr)){var e=this.options.draggable;this.dragging&&(e=this.dragging.enabled(),this.dragging.disable()),this.dragging=new nr(this),e&&this.dragging.enable()}},setOpacity:function(e){return this.options.opacity=e,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var e=this.options.opacity;this._icon&&At(this._icon,e),this._shadow&&At(this._shadow,e)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var e=this._map;if(e){var t=this.options.icon.options,n=t.iconSize?N(t.iconSize):N(0,0),r=t.iconAnchor?N(t.iconAnchor):N(0,0);e.panInside(this._latlng,{paddingTopLeft:r,paddingBottomRight:n.subtract(r)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function ir(e,t){return new rr(e,t)}var or=Jn.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(e){this._renderer=e.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(e){return p(this,e),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&e&&Object.prototype.hasOwnProperty.call(e,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),sr=or.extend({options:{fill:!0,radius:10},initialize:function(e,t){p(this,t),this._latlng=j(e),this._radius=this.options.radius},setLatLng:function(e){var t=this._latlng;return this._latlng=j(e),this.redraw(),this.fire("move",{oldLatLng:t,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(e){return this.options.radius=this._radius=e,this.redraw()},getRadius:function(){return this._radius},setStyle:function(e){var t=e&&e.radius||this._radius;return or.prototype.setStyle.call(this,e),this.setRadius(t),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var e=this._radius,t=this._radiusY||e,n=this._clickTolerance(),r=[e+n,t+n];this._pxBounds=new D(this._point.subtract(r),this._point.add(r))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(e){return e.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function ar(e,t){return new sr(e,t)}var lr=sr.extend({initialize:function(e,t,r){if("number"==typeof t&&(t=n({},r,{radius:t})),p(this,t),this._latlng=j(e),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(e){return this._mRadius=e,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var e=[this._radius,this._radiusY||this._radius];return new z(this._map.layerPointToLatLng(this._point.subtract(e)),this._map.layerPointToLatLng(this._point.add(e)))},setStyle:or.prototype.setStyle,_project:function(){var e=this._latlng.lng,t=this._latlng.lat,n=this._map,r=n.options.crs;if(r.distance===G.distance){var i=Math.PI/180,o=this._mRadius/G.R/i,s=n.project([t+o,e]),a=n.project([t-o,e]),l=s.add(a).divideBy(2),c=n.unproject(l).lat,u=Math.acos((Math.cos(o*i)-Math.sin(t*i)*Math.sin(c*i))/(Math.cos(t*i)*Math.cos(c*i)))/i;(isNaN(u)||0===u)&&(u=o/Math.cos(Math.PI/180*t)),this._point=l.subtract(n.getPixelOrigin()),this._radius=isNaN(u)?0:l.x-n.project([c,e-u]).x,this._radiusY=l.y-s.y}else{var d=r.unproject(r.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(d).x}this._updateBounds()}});function cr(e,t,n){return new lr(e,t,n)}var ur=or.extend({options:{smoothFactor:1,noClip:!1},initialize:function(e,t){p(this,t),this._setLatLngs(e)},getLatLngs:function(){return this._latlngs},setLatLngs:function(e){return this._setLatLngs(e),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(e){for(var t,n,r=1/0,i=null,o=Bn,s=0,a=this._parts.length;s<a;s++)for(var l=this._parts[s],c=1,u=l.length;c<u;c++){var d=o(e,t=l[c-1],n=l[c],!0);d<r&&(r=d,i=o(e,t,n))}return i&&(i.distance=Math.sqrt(r)),i},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Un(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(e,t){return t=t||this._defaultShape(),e=j(e),t.push(e),this._bounds.extend(e),this.redraw()},_setLatLngs:function(e){this._bounds=new z,this._latlngs=this._convertLatLngs(e)},_defaultShape:function(){return zn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(e){for(var t=[],n=zn(e),r=0,i=e.length;r<i;r++)n?(t[r]=j(e[r]),this._bounds.extend(t[r])):t[r]=this._convertLatLngs(e[r]);return t},_project:function(){var e=new D;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,e),this._bounds.isValid()&&e.isValid()&&(this._rawPxBounds=e,this._updateBounds())},_updateBounds:function(){var e=this._clickTolerance(),t=new k(e,e);this._rawPxBounds&&(this._pxBounds=new D([this._rawPxBounds.min.subtract(t),this._rawPxBounds.max.add(t)]))},_projectLatlngs:function(e,t,n){var r,i,o=e[0]instanceof U,s=e.length;if(o){for(i=[],r=0;r<s;r++)i[r]=this._map.latLngToLayerPoint(e[r]),n.extend(i[r]);t.push(i)}else for(r=0;r<s;r++)this._projectLatlngs(e[r],t,n)},_clipPoints:function(){var e=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(e))if(this.options.noClip)this._parts=this._rings;else{var t,n,r,i,o,s,a,l=this._parts;for(t=0,r=0,i=this._rings.length;t<i;t++)for(n=0,o=(a=this._rings[t]).length;n<o-1;n++)(s=On(a[n],a[n+1],e,n,!0))&&(l[r]=l[r]||[],l[r].push(s[0]),s[1]===a[n+1]&&n!==o-2||(l[r].push(s[1]),r++))}},_simplifyPoints:function(){for(var e=this._parts,t=this.options.smoothFactor,n=0,r=e.length;n<r;n++)e[n]=Tn(e[n],t)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(e,t){var n,r,i,o,s,a,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(n=0,o=this._parts.length;n<o;n++)for(r=0,i=(s=(a=this._parts[n]).length)-1;r<s;i=r++)if((t||0!==r)&&Mn(e,a[i],a[r])<=l)return!0;return!1}});function dr(e,t){return new ur(e,t)}ur._flat=Fn;var hr=ur.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return _n(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(e){var t=ur.prototype._convertLatLngs.call(this,e),n=t.length;return n>=2&&t[0]instanceof U&&t[0].equals(t[n-1])&&t.pop(),t},_setLatLngs:function(e){ur.prototype._setLatLngs.call(this,e),zn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return zn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var e=this._renderer._bounds,t=this.options.weight,n=new k(t,t);if(e=new D(e.min.subtract(n),e.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(e))if(this.options.noClip)this._parts=this._rings;else for(var r,i=0,o=this._rings.length;i<o;i++)(r=wn(this._rings[i],e,!0)).length&&this._parts.push(r)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(e){var t,n,r,i,o,s,a,l,c=!1;if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(i=0,a=this._parts.length;i<a;i++)for(o=0,s=(l=(t=this._parts[i]).length)-1;o<l;s=o++)n=t[o],r=t[s],n.y>e.y!=r.y>e.y&&e.x<(r.x-n.x)*(e.y-n.y)/(r.y-n.y)+n.x&&(c=!c);return c||ur.prototype._containsPoint.call(this,e,!0)}});function pr(e,t){return new hr(e,t)}var fr=Zn.extend({initialize:function(e,t){p(this,t),this._layers={},e&&this.addData(e)},addData:function(e){var t,n,r,i=v(e)?e:e.features;if(i){for(t=0,n=i.length;t<n;t++)((r=i[t]).geometries||r.geometry||r.features||r.coordinates)&&this.addData(r);return this}var o=this.options;if(o.filter&&!o.filter(e))return this;var s=mr(e,o);return s?(s.feature=wr(e),s.defaultOptions=s.options,this.resetStyle(s),o.onEachFeature&&o.onEachFeature(e,s),this.addLayer(s)):this},resetStyle:function(e){return void 0===e?this.eachLayer(this.resetStyle,this):(e.options=n({},e.defaultOptions),this._setLayerStyle(e,this.options.style),this)},setStyle:function(e){return this.eachLayer((function(t){this._setLayerStyle(t,e)}),this)},_setLayerStyle:function(e,t){e.setStyle&&("function"==typeof t&&(t=t(e.feature)),e.setStyle(t))}});function mr(e,t){var n,r,i,o,s="Feature"===e.type?e.geometry:e,a=s?s.coordinates:null,l=[],c=t&&t.pointToLayer,u=t&&t.coordsToLatLng||vr;if(!a&&!s)return null;switch(s.type){case"Point":return gr(c,e,n=u(a),t);case"MultiPoint":for(i=0,o=a.length;i<o;i++)n=u(a[i]),l.push(gr(c,e,n,t));return new Zn(l);case"LineString":case"MultiLineString":return r=yr(a,"LineString"===s.type?0:1,u),new ur(r,t);case"Polygon":case"MultiPolygon":return r=yr(a,"Polygon"===s.type?1:2,u),new hr(r,t);case"GeometryCollection":for(i=0,o=s.geometries.length;i<o;i++){var d=mr({geometry:s.geometries[i],type:"Feature",properties:e.properties},t);d&&l.push(d)}return new Zn(l);case"FeatureCollection":for(i=0,o=s.features.length;i<o;i++){var h=mr(s.features[i],t);h&&l.push(h)}return new Zn(l);default:throw new Error("Invalid GeoJSON object.")}}function gr(e,t,n,r){return e?e(t,n):new rr(n,r&&r.markersInheritOptions&&r)}function vr(e){return new U(e[1],e[0],e[2])}function yr(e,t,n){for(var r,i=[],o=0,s=e.length;o<s;o++)r=t?yr(e[o],t-1,n):(n||vr)(e[o]),i.push(r);return i}function br(e,t){return void 0!==(e=j(e)).alt?[u(e.lng,t),u(e.lat,t),u(e.alt,t)]:[u(e.lng,t),u(e.lat,t)]}function xr(e,t,n,r){for(var i=[],o=0,s=e.length;o<s;o++)i.push(t?xr(e[o],zn(e[o])?0:t-1,n,r):br(e[o],r));return!t&&n&&i.length>0&&i.push(i[0].slice()),i}function Sr(e,t){return e.feature?n({},e.feature,{geometry:t}):wr(t)}function wr(e){return"Feature"===e.type||"FeatureCollection"===e.type?e:{type:"Feature",properties:{},geometry:e}}var _r={toGeoJSON:function(e){return Sr(this,{type:"Point",coordinates:br(this.getLatLng(),e)})}};function Cr(e,t){return new fr(e,t)}rr.include(_r),lr.include(_r),sr.include(_r),ur.include({toGeoJSON:function(e){var t=!zn(this._latlngs);return Sr(this,{type:(t?"Multi":"")+"LineString",coordinates:xr(this._latlngs,t?1:0,!1,e)})}}),hr.include({toGeoJSON:function(e){var t=!zn(this._latlngs),n=t&&!zn(this._latlngs[0]),r=xr(this._latlngs,n?2:t?1:0,!0,e);return t||(r=[r]),Sr(this,{type:(n?"Multi":"")+"Polygon",coordinates:r})}}),Qn.include({toMultiPoint:function(e){var t=[];return this.eachLayer((function(n){t.push(n.toGeoJSON(e).geometry.coordinates)})),Sr(this,{type:"MultiPoint",coordinates:t})},toGeoJSON:function(e){var t=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===t)return this.toMultiPoint(e);var n="GeometryCollection"===t,r=[];return this.eachLayer((function(t){if(t.toGeoJSON){var i=t.toGeoJSON(e);if(n)r.push(i.geometry);else{var o=wr(i);"FeatureCollection"===o.type?r.push.apply(r,o.features):r.push(o)}}})),n?Sr(this,{geometries:r,type:"GeometryCollection"}):{type:"FeatureCollection",features:r}}});var Ar=Cr,Er=Jn.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(e,t,n){this._url=e,this._bounds=F(t),p(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(St(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){gt(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(e){return this.options.opacity=e,this._image&&this._updateOpacity(),this},setStyle:function(e){return e.opacity&&this.setOpacity(e.opacity),this},bringToFront:function(){return this._map&&yt(this._image),this},bringToBack:function(){return this._map&&bt(this._image),this},setUrl:function(e){return this._url=e,this._image&&(this._image.src=e),this},setBounds:function(e){return this._bounds=F(e),this._map&&this._reset(),this},getEvents:function(){var e={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var e="IMG"===this._url.tagName,t=this._image=e?this._url:mt("img");St(t,"leaflet-image-layer"),this._zoomAnimated&&St(t,"leaflet-zoom-animated"),this.options.className&&St(t,this.options.className),t.onselectstart=c,t.onmousemove=c,t.onload=i(this.fire,this,"load"),t.onerror=i(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(t.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),e?this._url=t.src:(t.src=this._url,t.alt=this.options.alt)},_animateZoom:function(e){var t=this._map.getZoomScale(e.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,e.zoom,e.center).min;Mt(this._image,n,t)},_reset:function(){var e=this._image,t=new D(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=t.getSize();It(e,t.min),e.style.width=n.x+"px",e.style.height=n.y+"px"},_updateOpacity:function(){At(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var e=this.options.errorOverlayUrl;e&&this._url!==e&&(this._url=e,this._image.src=e)},getCenter:function(){return this._bounds.getCenter()}}),Tr=function(e,t,n){return new Er(e,t,n)},Mr=Er.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var e="VIDEO"===this._url.tagName,t=this._image=e?this._url:mt("video");if(St(t,"leaflet-image-layer"),this._zoomAnimated&&St(t,"leaflet-zoom-animated"),this.options.className&&St(t,this.options.className),t.onselectstart=c,t.onmousemove=c,t.onloadeddata=i(this.fire,this,"load"),e){for(var n=t.getElementsByTagName("source"),r=[],o=0;o<n.length;o++)r.push(n[o].src);this._url=n.length>0?r:[t.src]}else{v(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(t.style,"objectFit")&&(t.style.objectFit="fill"),t.autoplay=!!this.options.autoplay,t.loop=!!this.options.loop,t.muted=!!this.options.muted,t.playsInline=!!this.options.playsInline;for(var s=0;s<this._url.length;s++){var a=mt("source");a.src=this._url[s],t.appendChild(a)}}}});function Ir(e,t,n){return new Mr(e,t,n)}var Rr=Er.extend({_initImage:function(){var e=this._image=this._url;St(e,"leaflet-image-layer"),this._zoomAnimated&&St(e,"leaflet-zoom-animated"),this.options.className&&St(e,this.options.className),e.onselectstart=c,e.onmousemove=c}});function Pr(e,t,n){return new Rr(e,t,n)}var kr=Jn.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(e,t){e&&(e instanceof U||v(e))?(this._latlng=j(e),p(this,t)):(p(this,e),this._source=t),this.options.content&&(this._content=this.options.content)},openOn:function(e){return(e=arguments.length?e:this._source._map).hasLayer(this)||e.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(e){return this._map?this.close():(arguments.length?this._source=e:e=this._source,this._prepareOpen(),this.openOn(e._map)),this},onAdd:function(e){this._zoomAnimated=e._zoomAnimated,this._container||this._initLayout(),e._fadeAnimated&&At(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),e._fadeAnimated&&At(this._container,1),this.bringToFront(),this.options.interactive&&(St(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(e){e._fadeAnimated?(At(this._container,0),this._removeTimeout=setTimeout(i(gt,void 0,this._container),200)):gt(this._container),this.options.interactive&&(wt(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(e){return this._latlng=j(e),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(e){return this._content=e,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var e={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&yt(this._container),this},bringToBack:function(){return this._map&&bt(this._container),this},_prepareOpen:function(e){var t=this._source;if(!t._map)return!1;if(t instanceof Zn){t=null;var n=this._source._layers;for(var r in n)if(n[r]._map){t=n[r];break}if(!t)return!1;this._source=t}if(!e)if(t.getCenter)e=t.getCenter();else if(t.getLatLng)e=t.getLatLng();else{if(!t.getBounds)throw new Error("Unable to get source layer LatLng.");e=t.getBounds().getCenter()}return this.setLatLng(e),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var e=this._contentNode,t="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof t)e.innerHTML=t;else{for(;e.hasChildNodes();)e.removeChild(e.firstChild);e.appendChild(t)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var e=this._map.latLngToLayerPoint(this._latlng),t=N(this.options.offset),n=this._getAnchor();this._zoomAnimated?It(this._container,e.add(n)):t=t.add(e).add(n);var r=this._containerBottom=-t.y,i=this._containerLeft=-Math.round(this._containerWidth/2)+t.x;this._container.style.bottom=r+"px",this._container.style.left=i+"px"}},_getAnchor:function(){return[0,0]}});on.include({_initOverlay:function(e,t,n,r){var i=t;return i instanceof e||(i=new e(r).setContent(t)),n&&i.setLatLng(n),i}}),Jn.include({_initOverlay:function(e,t,n,r){var i=n;return i instanceof e?(p(i,r),i._source=this):(i=t&&!r?t:new e(r,this)).setContent(n),i}});var Or=kr.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(e){return!(e=arguments.length?e:this._source._map).hasLayer(this)&&e._popup&&e._popup.options.autoClose&&e.removeLayer(e._popup),e._popup=this,kr.prototype.openOn.call(this,e)},onAdd:function(e){kr.prototype.onAdd.call(this,e),e.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof or||this._source.on("preclick",qt))},onRemove:function(e){kr.prototype.onRemove.call(this,e),e.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof or||this._source.off("preclick",qt))},getEvents:function(){var e=kr.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(e.preclick=this.close),this.options.keepInView&&(e.moveend=this._adjustPan),e},_initLayout:function(){var e="leaflet-popup",t=this._container=mt("div",e+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=mt("div",e+"-content-wrapper",t);if(this._contentNode=mt("div",e+"-content",n),Jt(t),Kt(this._contentNode),Ft(t,"contextmenu",qt),this._tipContainer=mt("div",e+"-tip-container",t),this._tip=mt("div",e+"-tip",this._tipContainer),this.options.closeButton){var r=this._closeButton=mt("a",e+"-close-button",t);r.setAttribute("role","button"),r.setAttribute("aria-label","Close popup"),r.href="#close",r.innerHTML='<span aria-hidden="true">×</span>',Ft(r,"click",(function(e){Qt(e),this.close()}),this)}},_updateLayout:function(){var e=this._contentNode,t=e.style;t.width="",t.whiteSpace="nowrap";var n=e.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),t.width=n+1+"px",t.whiteSpace="",t.height="";var r=e.offsetHeight,i=this.options.maxHeight,o="leaflet-popup-scrolled";i&&r>i?(t.height=i+"px",St(e,o)):wt(e,o),this._containerWidth=this._container.offsetWidth},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center),n=this._getAnchor();It(this._container,t.add(n))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var e=this._map,t=parseInt(ft(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+t,r=this._containerWidth,i=new k(this._containerLeft,-n-this._containerBottom);i._add(Rt(this._container));var o=e.layerPointToContainerPoint(i),s=N(this.options.autoPanPadding),a=N(this.options.autoPanPaddingTopLeft||s),l=N(this.options.autoPanPaddingBottomRight||s),c=e.getSize(),u=0,d=0;o.x+r+l.x>c.x&&(u=o.x+r-c.x+l.x),o.x-u-a.x<0&&(u=o.x-a.x),o.y+n+l.y>c.y&&(d=o.y+n-c.y+l.y),o.y-d-a.y<0&&(d=o.y-a.y),(u||d)&&(this.options.keepInView&&(this._autopanning=!0),e.fire("autopanstart").panBy([u,d]))}},_getAnchor:function(){return N(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Nr=function(e,t){return new Or(e,t)};on.mergeOptions({closePopupOnClick:!0}),on.include({openPopup:function(e,t,n){return this._initOverlay(Or,e,t,n).openOn(this),this},closePopup:function(e){return(e=arguments.length?e:this._popup)&&e.close(),this}}),Jn.include({bindPopup:function(e,t){return this._popup=this._initOverlay(Or,this._popup,e,t),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(e){return this._popup&&(this instanceof Zn||(this._popup._source=this),this._popup._prepareOpen(e||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(e){return this._popup&&this._popup.setContent(e),this},getPopup:function(){return this._popup},_openPopup:function(e){if(this._popup&&this._map){Yt(e);var t=e.layer||e.target;this._popup._source!==t||t instanceof or?(this._popup._source=t,this.openPopup(e.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(e.latlng)}},_movePopup:function(e){this._popup.setLatLng(e.latlng)},_onKeyPress:function(e){13===e.originalEvent.keyCode&&this._openPopup(e)}});var Lr=kr.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(e){kr.prototype.onAdd.call(this,e),this.setOpacity(this.options.opacity),e.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(e){kr.prototype.onRemove.call(this,e),e.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var e=kr.prototype.getEvents.call(this);return this.options.permanent||(e.preclick=this.close),e},_initLayout:function(){var e="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=mt("div",e),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+s(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(e){var t,n,r=this._map,i=this._container,o=r.latLngToContainerPoint(r.getCenter()),s=r.layerPointToContainerPoint(e),a=this.options.direction,l=i.offsetWidth,c=i.offsetHeight,u=N(this.options.offset),d=this._getAnchor();"top"===a?(t=l/2,n=c):"bottom"===a?(t=l/2,n=0):"center"===a?(t=l/2,n=c/2):"right"===a?(t=0,n=c/2):"left"===a?(t=l,n=c/2):s.x<o.x?(a="right",t=0,n=c/2):(a="left",t=l+2*(u.x+d.x),n=c/2),e=e.subtract(N(t,n,!0)).add(u).add(d),wt(i,"leaflet-tooltip-right"),wt(i,"leaflet-tooltip-left"),wt(i,"leaflet-tooltip-top"),wt(i,"leaflet-tooltip-bottom"),St(i,"leaflet-tooltip-"+a),It(i,e)},_updatePosition:function(){var e=this._map.latLngToLayerPoint(this._latlng);this._setPosition(e)},setOpacity:function(e){this.options.opacity=e,this._container&&At(this._container,e)},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center);this._setPosition(t)},_getAnchor:function(){return N(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),Dr=function(e,t){return new Lr(e,t)};on.include({openTooltip:function(e,t,n){return this._initOverlay(Lr,e,t,n).openOn(this),this},closeTooltip:function(e){return e.close(),this}}),Jn.include({bindTooltip:function(e,t){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Lr,this._tooltip,e,t),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(e){if(e||!this._tooltipHandlersAdded){var t=e?"off":"on",n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,n.click=this._openTooltip,this._map?this._addFocusListeners():n.add=this._addFocusListeners),this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),this[t](n),this._tooltipHandlersAdded=!e}},openTooltip:function(e){return this._tooltip&&(this instanceof Zn||(this._tooltip._source=this),this._tooltip._prepareOpen(e)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(e){return this._tooltip&&this._tooltip.setContent(e),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(e){var t="function"==typeof e.getElement&&e.getElement();t&&(Ft(t,"focus",(function(){this._tooltip._source=e,this.openTooltip()}),this),Ft(t,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(e){var t="function"==typeof e.getElement&&e.getElement();t&&t.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(e){if(this._tooltip&&this._map)if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var t=this;this._map.once("moveend",(function(){t._openOnceFlag=!1,t._openTooltip(e)}))}else this._tooltip._source=e.layer||e.target,this.openTooltip(this._tooltip.options.sticky?e.latlng:void 0)},_moveTooltip:function(e){var t,n,r=e.latlng;this._tooltip.options.sticky&&e.originalEvent&&(t=this._map.mouseEventToContainerPoint(e.originalEvent),n=this._map.containerPointToLayerPoint(t),r=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(r)}});var Br=$n.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(e){var t=e&&"DIV"===e.tagName?e:document.createElement("div"),n=this.options;if(n.html instanceof Element?(vt(t),t.appendChild(n.html)):t.innerHTML=!1!==n.html?n.html:"",n.bgPos){var r=N(n.bgPos);t.style.backgroundPosition=-r.x+"px "+-r.y+"px"}return this._setIconStyles(t,"icon"),t},createShadow:function(){return null}});function zr(e){return new Br(e)}$n.Default=tr;var Fr=Jn.extend({options:{tileSize:256,opacity:1,updateWhenIdle:ze.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(e){p(this,e)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(e){e._addZoomLimit(this)},onRemove:function(e){this._removeAllTiles(),gt(this._container),e._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(yt(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(bt(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(e){return this.options.opacity=e,this._updateOpacity(),this},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var e=this._clampZoom(this._map.getZoom());e!==this._tileZoom&&(this._tileZoom=e,this._updateLevels()),this._update()}return this},getEvents:function(){var e={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=a(this._onMoveEnd,this.options.updateInterval,this)),e.move=this._onMove),this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},createTile:function(){return document.createElement("div")},getTileSize:function(){var e=this.options.tileSize;return e instanceof k?e:new k(e,e)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(e){for(var t,n=this.getPane().children,r=-e(-1/0,1/0),i=0,o=n.length;i<o;i++)t=n[i].style.zIndex,n[i]!==this._container&&t&&(r=e(r,+t));isFinite(r)&&(this.options.zIndex=r+e(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!ze.ielt9){At(this._container,this.options.opacity);var e=+new Date,t=!1,n=!1;for(var r in this._tiles){var i=this._tiles[r];if(i.current&&i.loaded){var o=Math.min(1,(e-i.loaded)/200);At(i.el,o),o<1?t=!0:(i.active?n=!0:this._onOpaqueTile(i),i.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),t&&(E(this._fadeFrame),this._fadeFrame=A(this._updateOpacity,this))}},_onOpaqueTile:c,_initContainer:function(){this._container||(this._container=mt("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var e=this._tileZoom,t=this.options.maxZoom;if(void 0!==e){for(var n in this._levels)n=Number(n),this._levels[n].el.children.length||n===e?(this._levels[n].el.style.zIndex=t-Math.abs(e-n),this._onUpdateLevel(n)):(gt(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var r=this._levels[e],i=this._map;return r||((r=this._levels[e]={}).el=mt("div","leaflet-tile-container leaflet-zoom-animated",this._container),r.el.style.zIndex=t,r.origin=i.project(i.unproject(i.getPixelOrigin()),e).round(),r.zoom=e,this._setZoomTransform(r,i.getCenter(),i.getZoom()),c(r.el.offsetWidth),this._onCreateLevel(r)),this._level=r,r}},_onUpdateLevel:c,_onRemoveLevel:c,_onCreateLevel:c,_pruneTiles:function(){if(this._map){var e,t,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(e in this._tiles)(t=this._tiles[e]).retain=t.current;for(e in this._tiles)if((t=this._tiles[e]).current&&!t.active){var r=t.coords;this._retainParent(r.x,r.y,r.z,r.z-5)||this._retainChildren(r.x,r.y,r.z,r.z+2)}for(e in this._tiles)this._tiles[e].retain||this._removeTile(e)}}},_removeTilesAtZoom:function(e){for(var t in this._tiles)this._tiles[t].coords.z===e&&this._removeTile(t)},_removeAllTiles:function(){for(var e in this._tiles)this._removeTile(e)},_invalidateAll:function(){for(var e in this._levels)gt(this._levels[e].el),this._onRemoveLevel(Number(e)),delete this._levels[e];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(e,t,n,r){var i=Math.floor(e/2),o=Math.floor(t/2),s=n-1,a=new k(+i,+o);a.z=+s;var l=this._tileCoordsToKey(a),c=this._tiles[l];return c&&c.active?(c.retain=!0,!0):(c&&c.loaded&&(c.retain=!0),s>r&&this._retainParent(i,o,s,r))},_retainChildren:function(e,t,n,r){for(var i=2*e;i<2*e+2;i++)for(var o=2*t;o<2*t+2;o++){var s=new k(i,o);s.z=n+1;var a=this._tileCoordsToKey(s),l=this._tiles[a];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n+1<r&&this._retainChildren(i,o,n+1,r))}},_resetView:function(e){var t=e&&(e.pinch||e.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),t,t)},_animateZoom:function(e){this._setView(e.center,e.zoom,!0,e.noUpdate)},_clampZoom:function(e){var t=this.options;return void 0!==t.minNativeZoom&&e<t.minNativeZoom?t.minNativeZoom:void 0!==t.maxNativeZoom&&t.maxNativeZoom<e?t.maxNativeZoom:e},_setView:function(e,t,n,r){var i=Math.round(t);i=void 0!==this.options.maxZoom&&i>this.options.maxZoom||void 0!==this.options.minZoom&&i<this.options.minZoom?void 0:this._clampZoom(i);var o=this.options.updateWhenZooming&&i!==this._tileZoom;r&&!o||(this._tileZoom=i,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==i&&this._update(e),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(e,t)},_setZoomTransforms:function(e,t){for(var n in this._levels)this._setZoomTransform(this._levels[n],e,t)},_setZoomTransform:function(e,t,n){var r=this._map.getZoomScale(n,e.zoom),i=e.origin.multiplyBy(r).subtract(this._map._getNewPixelOrigin(t,n)).round();ze.any3d?Mt(e.el,i,r):It(e.el,i)},_resetGrid:function(){var e=this._map,t=e.options.crs,n=this._tileSize=this.getTileSize(),r=this._tileZoom,i=this._map.getPixelWorldBounds(this._tileZoom);i&&(this._globalTileRange=this._pxBoundsToTileRange(i)),this._wrapX=t.wrapLng&&!this.options.noWrap&&[Math.floor(e.project([0,t.wrapLng[0]],r).x/n.x),Math.ceil(e.project([0,t.wrapLng[1]],r).x/n.y)],this._wrapY=t.wrapLat&&!this.options.noWrap&&[Math.floor(e.project([t.wrapLat[0],0],r).y/n.x),Math.ceil(e.project([t.wrapLat[1],0],r).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(e){var t=this._map,n=t._animatingZoom?Math.max(t._animateToZoom,t.getZoom()):t.getZoom(),r=t.getZoomScale(n,this._tileZoom),i=t.project(e,this._tileZoom).floor(),o=t.getSize().divideBy(2*r);return new D(i.subtract(o),i.add(o))},_update:function(e){var t=this._map;if(t){var n=this._clampZoom(t.getZoom());if(void 0===e&&(e=t.getCenter()),void 0!==this._tileZoom){var r=this._getTiledPixelBounds(e),i=this._pxBoundsToTileRange(r),o=i.getCenter(),s=[],a=this.options.keepBuffer,l=new D(i.getBottomLeft().subtract([a,-a]),i.getTopRight().add([a,-a]));if(!(isFinite(i.min.x)&&isFinite(i.min.y)&&isFinite(i.max.x)&&isFinite(i.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var c in this._tiles){var u=this._tiles[c].coords;u.z===this._tileZoom&&l.contains(new k(u.x,u.y))||(this._tiles[c].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(e,n);else{for(var d=i.min.y;d<=i.max.y;d++)for(var h=i.min.x;h<=i.max.x;h++){var p=new k(h,d);if(p.z=this._tileZoom,this._isValidTile(p)){var f=this._tiles[this._tileCoordsToKey(p)];f?f.current=!0:s.push(p)}}if(s.sort((function(e,t){return e.distanceTo(o)-t.distanceTo(o)})),0!==s.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(h=0;h<s.length;h++)this._addTile(s[h],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(e){var t=this._map.options.crs;if(!t.infinite){var n=this._globalTileRange;if(!t.wrapLng&&(e.x<n.min.x||e.x>n.max.x)||!t.wrapLat&&(e.y<n.min.y||e.y>n.max.y))return!1}if(!this.options.bounds)return!0;var r=this._tileCoordsToBounds(e);return F(this.options.bounds).overlaps(r)},_keyToBounds:function(e){return this._tileCoordsToBounds(this._keyToTileCoords(e))},_tileCoordsToNwSe:function(e){var t=this._map,n=this.getTileSize(),r=e.scaleBy(n),i=r.add(n);return[t.unproject(r,e.z),t.unproject(i,e.z)]},_tileCoordsToBounds:function(e){var t=this._tileCoordsToNwSe(e),n=new z(t[0],t[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(e){return e.x+":"+e.y+":"+e.z},_keyToTileCoords:function(e){var t=e.split(":"),n=new k(+t[0],+t[1]);return n.z=+t[2],n},_removeTile:function(e){var t=this._tiles[e];t&&(gt(t.el),delete this._tiles[e],this.fire("tileunload",{tile:t.el,coords:this._keyToTileCoords(e)}))},_initTile:function(e){St(e,"leaflet-tile");var t=this.getTileSize();e.style.width=t.x+"px",e.style.height=t.y+"px",e.onselectstart=c,e.onmousemove=c,ze.ielt9&&this.options.opacity<1&&At(e,this.options.opacity)},_addTile:function(e,t){var n=this._getTilePos(e),r=this._tileCoordsToKey(e),o=this.createTile(this._wrapCoords(e),i(this._tileReady,this,e));this._initTile(o),this.createTile.length<2&&A(i(this._tileReady,this,e,null,o)),It(o,n),this._tiles[r]={el:o,coords:e,current:!0},t.appendChild(o),this.fire("tileloadstart",{tile:o,coords:e})},_tileReady:function(e,t,n){t&&this.fire("tileerror",{error:t,tile:n,coords:e});var r=this._tileCoordsToKey(e);(n=this._tiles[r])&&(n.loaded=+new Date,this._map._fadeAnimated?(At(n.el,0),E(this._fadeFrame),this._fadeFrame=A(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),t||(St(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:e})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),ze.ielt9||!this._map._fadeAnimated?A(this._pruneTiles,this):setTimeout(i(this._pruneTiles,this),250)))},_getTilePos:function(e){return e.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(e){var t=new k(this._wrapX?l(e.x,this._wrapX):e.x,this._wrapY?l(e.y,this._wrapY):e.y);return t.z=e.z,t},_pxBoundsToTileRange:function(e){var t=this.getTileSize();return new D(e.min.unscaleBy(t).floor(),e.max.unscaleBy(t).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var e in this._tiles)if(!this._tiles[e].loaded)return!1;return!0}});function Ur(e){return new Fr(e)}var jr=Fr.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(e,t){this._url=e,(t=p(this,t)).detectRetina&&ze.retina&&t.maxZoom>0?(t.tileSize=Math.floor(t.tileSize/2),t.zoomReverse?(t.zoomOffset--,t.minZoom=Math.min(t.maxZoom,t.minZoom+1)):(t.zoomOffset++,t.maxZoom=Math.max(t.minZoom,t.maxZoom-1)),t.minZoom=Math.max(0,t.minZoom)):t.zoomReverse?t.minZoom=Math.min(t.maxZoom,t.minZoom):t.maxZoom=Math.max(t.minZoom,t.maxZoom),"string"==typeof t.subdomains&&(t.subdomains=t.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(e,t){return this._url===e&&void 0===t&&(t=!0),this._url=e,t||this.redraw(),this},createTile:function(e,t){var n=document.createElement("img");return Ft(n,"load",i(this._tileOnLoad,this,t,n)),Ft(n,"error",i(this._tileOnError,this,t,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(n.referrerPolicy=this.options.referrerPolicy),n.alt="",n.src=this.getTileUrl(e),n},getTileUrl:function(e){var t={r:ze.retina?"@2x":"",s:this._getSubdomain(e),x:e.x,y:e.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var r=this._globalTileRange.max.y-e.y;this.options.tms&&(t.y=r),t["-y"]=r}return g(this._url,n(t,this.options))},_tileOnLoad:function(e,t){ze.ielt9?setTimeout(i(e,this,null,t),0):e(null,t)},_tileOnError:function(e,t,n){var r=this.options.errorTileUrl;r&&t.getAttribute("src")!==r&&(t.src=r),e(n,t)},_onTileRemove:function(e){e.tile.onload=null},_getZoomForUrl:function(){var e=this._tileZoom,t=this.options.maxZoom;return this.options.zoomReverse&&(e=t-e),e+this.options.zoomOffset},_getSubdomain:function(e){var t=Math.abs(e.x+e.y)%this.options.subdomains.length;return this.options.subdomains[t]},_abortLoading:function(){var e,t;for(e in this._tiles)if(this._tiles[e].coords.z!==this._tileZoom&&((t=this._tiles[e].el).onload=c,t.onerror=c,!t.complete)){t.src=b;var n=this._tiles[e].coords;gt(t),delete this._tiles[e],this.fire("tileabort",{tile:t,coords:n})}},_removeTile:function(e){var t=this._tiles[e];if(t)return t.el.setAttribute("src",b),Fr.prototype._removeTile.call(this,e)},_tileReady:function(e,t,n){if(this._map&&(!n||n.getAttribute("src")!==b))return Fr.prototype._tileReady.call(this,e,t,n)}});function Hr(e,t){return new jr(e,t)}var Vr=jr.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(e,t){this._url=e;var r=n({},this.defaultWmsParams);for(var i in t)i in this.options||(r[i]=t[i]);var o=(t=p(this,t)).detectRetina&&ze.retina?2:1,s=this.getTileSize();r.width=s.x*o,r.height=s.y*o,this.wmsParams=r},onAdd:function(e){this._crs=this.options.crs||e.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var t=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[t]=this._crs.code,jr.prototype.onAdd.call(this,e)},getTileUrl:function(e){var t=this._tileCoordsToNwSe(e),n=this._crs,r=B(n.project(t[0]),n.project(t[1])),i=r.min,o=r.max,s=(this._wmsVersion>=1.3&&this._crs===qn?[i.y,i.x,o.y,o.x]:[i.x,i.y,o.x,o.y]).join(","),a=jr.prototype.getTileUrl.call(this,e);return a+f(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+s},setParams:function(e,t){return n(this.wmsParams,e),t||this.redraw(),this}});function Gr(e,t){return new Vr(e,t)}jr.WMS=Vr,Hr.wms=Gr;var Wr=Jn.extend({options:{padding:.1},initialize:function(e){p(this,e),s(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),St(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var e={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(e.zoomanim=this._onAnimZoom),e},_onAnimZoom:function(e){this._updateTransform(e.center,e.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(e,t){var n=this._map.getZoomScale(t,this._zoom),r=this._map.getSize().multiplyBy(.5+this.options.padding),i=this._map.project(this._center,t),o=r.multiplyBy(-n).add(i).subtract(this._map._getNewPixelOrigin(e,t));ze.any3d?Mt(this._container,o,n):It(this._container,o)},_reset:function(){for(var e in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[e]._reset()},_onZoomEnd:function(){for(var e in this._layers)this._layers[e]._project()},_updatePaths:function(){for(var e in this._layers)this._layers[e]._update()},_update:function(){var e=this.options.padding,t=this._map.getSize(),n=this._map.containerPointToLayerPoint(t.multiplyBy(-e)).round();this._bounds=new D(n,n.add(t.multiplyBy(1+2*e)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),qr=Wr.extend({options:{tolerance:0},getEvents:function(){var e=Wr.prototype.getEvents.call(this);return e.viewprereset=this._onViewPreReset,e},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Wr.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var e=this._container=document.createElement("canvas");Ft(e,"mousemove",this._onMouseMove,this),Ft(e,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ft(e,"mouseout",this._handleMouseOut,this),e._leaflet_disable_events=!0,this._ctx=e.getContext("2d")},_destroyContainer:function(){E(this._redrawRequest),delete this._ctx,gt(this._container),jt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var e in this._redrawBounds=null,this._layers)this._layers[e]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){Wr.prototype._update.call(this);var e=this._bounds,t=this._container,n=e.getSize(),r=ze.retina?2:1;It(t,e.min),t.width=r*n.x,t.height=r*n.y,t.style.width=n.x+"px",t.style.height=n.y+"px",ze.retina&&this._ctx.scale(2,2),this._ctx.translate(-e.min.x,-e.min.y),this.fire("update")}},_reset:function(){Wr.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(e){this._updateDashArray(e),this._layers[s(e)]=e;var t=e._order={layer:e,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=t),this._drawLast=t,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(e){this._requestRedraw(e)},_removePath:function(e){var t=e._order,n=t.next,r=t.prev;n?n.prev=r:this._drawLast=r,r?r.next=n:this._drawFirst=n,delete e._order,delete this._layers[s(e)],this._requestRedraw(e)},_updatePath:function(e){this._extendRedrawBounds(e),e._project(),e._update(),this._requestRedraw(e)},_updateStyle:function(e){this._updateDashArray(e),this._requestRedraw(e)},_updateDashArray:function(e){if("string"==typeof e.options.dashArray){var t,n,r=e.options.dashArray.split(/[, ]+/),i=[];for(n=0;n<r.length;n++){if(t=Number(r[n]),isNaN(t))return;i.push(t)}e.options._dashArray=i}else e.options._dashArray=e.options.dashArray},_requestRedraw:function(e){this._map&&(this._extendRedrawBounds(e),this._redrawRequest=this._redrawRequest||A(this._redraw,this))},_extendRedrawBounds:function(e){if(e._pxBounds){var t=(e.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new D,this._redrawBounds.extend(e._pxBounds.min.subtract([t,t])),this._redrawBounds.extend(e._pxBounds.max.add([t,t]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var e=this._redrawBounds;if(e){var t=e.getSize();this._ctx.clearRect(e.min.x,e.min.y,t.x,t.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var e,t=this._redrawBounds;if(this._ctx.save(),t){var n=t.getSize();this._ctx.beginPath(),this._ctx.rect(t.min.x,t.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var r=this._drawFirst;r;r=r.next)e=r.layer,(!t||e._pxBounds&&e._pxBounds.intersects(t))&&e._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(e,t){if(this._drawing){var n,r,i,o,s=e._parts,a=s.length,l=this._ctx;if(a){for(l.beginPath(),n=0;n<a;n++){for(r=0,i=s[n].length;r<i;r++)o=s[n][r],l[r?"lineTo":"moveTo"](o.x,o.y);t&&l.closePath()}this._fillStroke(l,e)}}},_updateCircle:function(e){if(this._drawing&&!e._empty()){var t=e._point,n=this._ctx,r=Math.max(Math.round(e._radius),1),i=(Math.max(Math.round(e._radiusY),1)||r)/r;1!==i&&(n.save(),n.scale(1,i)),n.beginPath(),n.arc(t.x,t.y/i,r,0,2*Math.PI,!1),1!==i&&n.restore(),this._fillStroke(n,e)}},_fillStroke:function(e,t){var n=t.options;n.fill&&(e.globalAlpha=n.fillOpacity,e.fillStyle=n.fillColor||n.color,e.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(e.setLineDash&&e.setLineDash(t.options&&t.options._dashArray||[]),e.globalAlpha=n.opacity,e.lineWidth=n.weight,e.strokeStyle=n.color,e.lineCap=n.lineCap,e.lineJoin=n.lineJoin,e.stroke())},_onClick:function(e){for(var t,n,r=this._map.mouseEventToLayerPoint(e),i=this._drawFirst;i;i=i.next)(t=i.layer).options.interactive&&t._containsPoint(r)&&("click"!==e.type&&"preclick"!==e.type||!this._map._draggableMoved(t))&&(n=t);this._fireEvent(!!n&&[n],e)},_onMouseMove:function(e){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var t=this._map.mouseEventToLayerPoint(e);this._handleMouseHover(e,t)}},_handleMouseOut:function(e){var t=this._hoveredLayer;t&&(wt(this._container,"leaflet-interactive"),this._fireEvent([t],e,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(e,t){if(!this._mouseHoverThrottled){for(var n,r,o=this._drawFirst;o;o=o.next)(n=o.layer).options.interactive&&n._containsPoint(t)&&(r=n);r!==this._hoveredLayer&&(this._handleMouseOut(e),r&&(St(this._container,"leaflet-interactive"),this._fireEvent([r],e,"mouseover"),this._hoveredLayer=r)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],e),this._mouseHoverThrottled=!0,setTimeout(i((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(e,t,n){this._map._fireDOMEvent(t,n||t.type,e)},_bringToFront:function(e){var t=e._order;if(t){var n=t.next,r=t.prev;n&&(n.prev=r,r?r.next=n:n&&(this._drawFirst=n),t.prev=this._drawLast,this._drawLast.next=t,t.next=null,this._drawLast=t,this._requestRedraw(e))}},_bringToBack:function(e){var t=e._order;if(t){var n=t.next,r=t.prev;r&&(r.next=n,n?n.prev=r:r&&(this._drawLast=r),t.prev=null,t.next=this._drawFirst,this._drawFirst.prev=t,this._drawFirst=t,this._requestRedraw(e))}}});function Kr(e){return ze.canvas?new qr(e):null}var Jr=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(e){return document.createElement("<lvml:"+e+' class="lvml">')}}catch(e){}return function(e){return document.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Qr={_initContainer:function(){this._container=mt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Wr.prototype._update.call(this),this.fire("update"))},_initPath:function(e){var t=e._container=Jr("shape");St(t,"leaflet-vml-shape "+(this.options.className||"")),t.coordsize="1 1",e._path=Jr("path"),t.appendChild(e._path),this._updateStyle(e),this._layers[s(e)]=e},_addPath:function(e){var t=e._container;this._container.appendChild(t),e.options.interactive&&e.addInteractiveTarget(t)},_removePath:function(e){var t=e._container;gt(t),e.removeInteractiveTarget(t),delete this._layers[s(e)]},_updateStyle:function(e){var t=e._stroke,n=e._fill,r=e.options,i=e._container;i.stroked=!!r.stroke,i.filled=!!r.fill,r.stroke?(t||(t=e._stroke=Jr("stroke")),i.appendChild(t),t.weight=r.weight+"px",t.color=r.color,t.opacity=r.opacity,r.dashArray?t.dashStyle=v(r.dashArray)?r.dashArray.join(" "):r.dashArray.replace(/( *, *)/g," "):t.dashStyle="",t.endcap=r.lineCap.replace("butt","flat"),t.joinstyle=r.lineJoin):t&&(i.removeChild(t),e._stroke=null),r.fill?(n||(n=e._fill=Jr("fill")),i.appendChild(n),n.color=r.fillColor||r.color,n.opacity=r.fillOpacity):n&&(i.removeChild(n),e._fill=null)},_updateCircle:function(e){var t=e._point.round(),n=Math.round(e._radius),r=Math.round(e._radiusY||n);this._setPath(e,e._empty()?"M0 0":"AL "+t.x+","+t.y+" "+n+","+r+" 0,23592600")},_setPath:function(e,t){e._path.v=t},_bringToFront:function(e){yt(e._container)},_bringToBack:function(e){bt(e._container)}},Yr=ze.vml?Jr:Z,Zr=Wr.extend({_initContainer:function(){this._container=Yr("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Yr("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){gt(this._container),jt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){Wr.prototype._update.call(this);var e=this._bounds,t=e.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(t)||(this._svgSize=t,n.setAttribute("width",t.x),n.setAttribute("height",t.y)),It(n,e.min),n.setAttribute("viewBox",[e.min.x,e.min.y,t.x,t.y].join(" ")),this.fire("update")}},_initPath:function(e){var t=e._path=Yr("path");e.options.className&&St(t,e.options.className),e.options.interactive&&St(t,"leaflet-interactive"),this._updateStyle(e),this._layers[s(e)]=e},_addPath:function(e){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(e._path),e.addInteractiveTarget(e._path)},_removePath:function(e){gt(e._path),e.removeInteractiveTarget(e._path),delete this._layers[s(e)]},_updatePath:function(e){e._project(),e._update()},_updateStyle:function(e){var t=e._path,n=e.options;t&&(n.stroke?(t.setAttribute("stroke",n.color),t.setAttribute("stroke-opacity",n.opacity),t.setAttribute("stroke-width",n.weight),t.setAttribute("stroke-linecap",n.lineCap),t.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?t.setAttribute("stroke-dasharray",n.dashArray):t.removeAttribute("stroke-dasharray"),n.dashOffset?t.setAttribute("stroke-dashoffset",n.dashOffset):t.removeAttribute("stroke-dashoffset")):t.setAttribute("stroke","none"),n.fill?(t.setAttribute("fill",n.fillColor||n.color),t.setAttribute("fill-opacity",n.fillOpacity),t.setAttribute("fill-rule",n.fillRule||"evenodd")):t.setAttribute("fill","none"))},_updatePoly:function(e,t){this._setPath(e,X(e._parts,t))},_updateCircle:function(e){var t=e._point,n=Math.max(Math.round(e._radius),1),r="a"+n+","+(Math.max(Math.round(e._radiusY),1)||n)+" 0 1,0 ",i=e._empty()?"M0 0":"M"+(t.x-n)+","+t.y+r+2*n+",0 "+r+2*-n+",0 ";this._setPath(e,i)},_setPath:function(e,t){e._path.setAttribute("d",t)},_bringToFront:function(e){yt(e._path)},_bringToBack:function(e){bt(e._path)}});function Xr(e){return ze.svg||ze.vml?new Zr(e):null}ze.vml&&Zr.include(Qr),on.include({getRenderer:function(e){var t=e.options.renderer||this._getPaneRenderer(e.options.pane)||this.options.renderer||this._renderer;return t||(t=this._renderer=this._createRenderer()),this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(e){if("overlayPane"===e||void 0===e)return!1;var t=this._paneRenderers[e];return void 0===t&&(t=this._createRenderer({pane:e}),this._paneRenderers[e]=t),t},_createRenderer:function(e){return this.options.preferCanvas&&Kr(e)||Xr(e)}});var $r=hr.extend({initialize:function(e,t){hr.prototype.initialize.call(this,this._boundsToLatLngs(e),t)},setBounds:function(e){return this.setLatLngs(this._boundsToLatLngs(e))},_boundsToLatLngs:function(e){return[(e=F(e)).getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}});function ei(e,t){return new $r(e,t)}Zr.create=Yr,Zr.pointsToPath=X,fr.geometryToLayer=mr,fr.coordsToLatLng=vr,fr.coordsToLatLngs=yr,fr.latLngToCoords=br,fr.latLngsToCoords=xr,fr.getFeature=Sr,fr.asFeature=wr,on.mergeOptions({boxZoom:!0});var ti=yn.extend({initialize:function(e){this._map=e,this._container=e._container,this._pane=e._panes.overlayPane,this._resetStateTimeout=0,e.on("unload",this._destroy,this)},addHooks:function(){Ft(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){jt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){gt(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(e){if(!e.shiftKey||1!==e.which&&1!==e.button)return!1;this._clearDeferredResetState(),this._resetState(),ot(),kt(),this._startPoint=this._map.mouseEventToContainerPoint(e),Ft(document,{contextmenu:Yt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(e){this._moved||(this._moved=!0,this._box=mt("div","leaflet-zoom-box",this._container),St(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(e);var t=new D(this._point,this._startPoint),n=t.getSize();It(this._box,t.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(gt(this._box),wt(this._container,"leaflet-crosshair")),st(),Ot(),jt(document,{contextmenu:Yt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(e){if((1===e.which||1===e.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(i(this._resetState,this),0);var t=new z(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t})}},_onKeyDown:function(e){27===e.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});on.addInitHook("addHandler","boxZoom",ti),on.mergeOptions({doubleClickZoom:!0});var ni=yn.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(e){var t=this._map,n=t.getZoom(),r=t.options.zoomDelta,i=e.originalEvent.shiftKey?n-r:n+r;"center"===t.options.doubleClickZoom?t.setZoom(i):t.setZoomAround(e.containerPoint,i)}});on.addInitHook("addHandler","doubleClickZoom",ni),on.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var ri=yn.extend({addHooks:function(){if(!this._draggable){var e=this._map;this._draggable=new Sn(e._mapPane,e._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),e.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),e.on("zoomend",this._onZoomEnd,this),e.whenReady(this._onZoomEnd,this))}St(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){wt(this._map._container,"leaflet-grab"),wt(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var e=this._map;if(e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var t=F(this._map.options.maxBounds);this._offsetLimit=B(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(e){if(this._map.options.inertia){var t=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(t),this._prunePositions(t)}this._map.fire("move",e).fire("drag",e)},_prunePositions:function(e){for(;this._positions.length>1&&e-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var e=this._map.getSize().divideBy(2),t=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=t.subtract(e).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(e,t){return e-(e-t)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var e=this._draggable._newPos.subtract(this._draggable._startPos),t=this._offsetLimit;e.x<t.min.x&&(e.x=this._viscousLimit(e.x,t.min.x)),e.y<t.min.y&&(e.y=this._viscousLimit(e.y,t.min.y)),e.x>t.max.x&&(e.x=this._viscousLimit(e.x,t.max.x)),e.y>t.max.y&&(e.y=this._viscousLimit(e.y,t.max.y)),this._draggable._newPos=this._draggable._startPos.add(e)}},_onPreDragWrap:function(){var e=this._worldWidth,t=Math.round(e/2),n=this._initialWorldOffset,r=this._draggable._newPos.x,i=(r-t+n)%e+t-n,o=(r+t+n)%e-t-n,s=Math.abs(i+n)<Math.abs(o+n)?i:o;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=s},_onDragEnd:function(e){var t=this._map,n=t.options,r=!n.inertia||e.noInertia||this._times.length<2;if(t.fire("dragend",e),r)t.fire("moveend");else{this._prunePositions(+new Date);var i=this._lastPos.subtract(this._positions[0]),o=(this._lastTime-this._times[0])/1e3,s=n.easeLinearity,a=i.multiplyBy(s/o),l=a.distanceTo([0,0]),c=Math.min(n.inertiaMaxSpeed,l),u=a.multiplyBy(c/l),d=c/(n.inertiaDeceleration*s),h=u.multiplyBy(-d/2).round();h.x||h.y?(h=t._limitOffset(h,t.options.maxBounds),A((function(){t.panBy(h,{duration:d,easeLinearity:s,noMoveStart:!0,animate:!0})}))):t.fire("moveend")}}});on.addInitHook("addHandler","dragging",ri),on.mergeOptions({keyboard:!0,keyboardPanDelta:80});var ii=yn.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(e){this._map=e,this._setPanDelta(e.options.keyboardPanDelta),this._setZoomDelta(e.options.zoomDelta)},addHooks:function(){var e=this._map._container;e.tabIndex<=0&&(e.tabIndex="0"),Ft(e,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),jt(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var e=document.body,t=document.documentElement,n=e.scrollTop||t.scrollTop,r=e.scrollLeft||t.scrollLeft;this._map._container.focus(),window.scrollTo(r,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(e){var t,n,r=this._panKeys={},i=this.keyCodes;for(t=0,n=i.left.length;t<n;t++)r[i.left[t]]=[-1*e,0];for(t=0,n=i.right.length;t<n;t++)r[i.right[t]]=[e,0];for(t=0,n=i.down.length;t<n;t++)r[i.down[t]]=[0,e];for(t=0,n=i.up.length;t<n;t++)r[i.up[t]]=[0,-1*e]},_setZoomDelta:function(e){var t,n,r=this._zoomKeys={},i=this.keyCodes;for(t=0,n=i.zoomIn.length;t<n;t++)r[i.zoomIn[t]]=e;for(t=0,n=i.zoomOut.length;t<n;t++)r[i.zoomOut[t]]=-e},_addHooks:function(){Ft(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){jt(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(e){if(!(e.altKey||e.ctrlKey||e.metaKey)){var t,n=e.keyCode,r=this._map;if(n in this._panKeys){if(!r._panAnim||!r._panAnim._inProgress)if(t=this._panKeys[n],e.shiftKey&&(t=N(t).multiplyBy(3)),r.options.maxBounds&&(t=r._limitOffset(N(t),r.options.maxBounds)),r.options.worldCopyJump){var i=r.wrapLatLng(r.unproject(r.project(r.getCenter()).add(t)));r.panTo(i)}else r.panBy(t)}else if(n in this._zoomKeys)r.setZoom(r.getZoom()+(e.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!r._popup||!r._popup.options.closeOnEscapeKey)return;r.closePopup()}Yt(e)}}});on.addInitHook("addHandler","keyboard",ii),on.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var oi=yn.extend({addHooks:function(){Ft(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){jt(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(e){var t=en(e),n=this._map.options.wheelDebounceTime;this._delta+=t,this._lastMousePos=this._map.mouseEventToContainerPoint(e),this._startTime||(this._startTime=+new Date);var r=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(i(this._performZoom,this),r),Yt(e)},_performZoom:function(){var e=this._map,t=e.getZoom(),n=this._map.options.zoomSnap||0;e._stop();var r=this._delta/(4*this._map.options.wheelPxPerZoomLevel),i=4*Math.log(2/(1+Math.exp(-Math.abs(r))))/Math.LN2,o=n?Math.ceil(i/n)*n:i,s=e._limitZoom(t+(this._delta>0?o:-o))-t;this._delta=0,this._startTime=null,s&&("center"===e.options.scrollWheelZoom?e.setZoom(t+s):e.setZoomAround(this._lastMousePos,t+s))}});on.addInitHook("addHandler","scrollWheelZoom",oi);var si=600;on.mergeOptions({tapHold:ze.touchNative&&ze.safari&&ze.mobile,tapTolerance:15});var ai=yn.extend({addHooks:function(){Ft(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){jt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(e){if(clearTimeout(this._holdTimeout),1===e.touches.length){var t=e.touches[0];this._startPos=this._newPos=new k(t.clientX,t.clientY),this._holdTimeout=setTimeout(i((function(){this._cancel(),this._isTapValid()&&(Ft(document,"touchend",Qt),Ft(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",t))}),this),si),Ft(document,"touchend touchcancel contextmenu",this._cancel,this),Ft(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function e(){jt(document,"touchend",Qt),jt(document,"touchend touchcancel",e)},_cancel:function(){clearTimeout(this._holdTimeout),jt(document,"touchend touchcancel contextmenu",this._cancel,this),jt(document,"touchmove",this._onMove,this)},_onMove:function(e){var t=e.touches[0];this._newPos=new k(t.clientX,t.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(e,t){var n=new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY});n._simulated=!0,t.target.dispatchEvent(n)}});on.addInitHook("addHandler","tapHold",ai),on.mergeOptions({touchZoom:ze.touch,bounceAtZoomLimits:!0});var li=yn.extend({addHooks:function(){St(this._map._container,"leaflet-touch-zoom"),Ft(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){wt(this._map._container,"leaflet-touch-zoom"),jt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(e){var t=this._map;if(e.touches&&2===e.touches.length&&!t._animatingZoom&&!this._zooming){var n=t.mouseEventToContainerPoint(e.touches[0]),r=t.mouseEventToContainerPoint(e.touches[1]);this._centerPoint=t.getSize()._divideBy(2),this._startLatLng=t.containerPointToLatLng(this._centerPoint),"center"!==t.options.touchZoom&&(this._pinchStartLatLng=t.containerPointToLatLng(n.add(r)._divideBy(2))),this._startDist=n.distanceTo(r),this._startZoom=t.getZoom(),this._moved=!1,this._zooming=!0,t._stop(),Ft(document,"touchmove",this._onTouchMove,this),Ft(document,"touchend touchcancel",this._onTouchEnd,this),Qt(e)}},_onTouchMove:function(e){if(e.touches&&2===e.touches.length&&this._zooming){var t=this._map,n=t.mouseEventToContainerPoint(e.touches[0]),r=t.mouseEventToContainerPoint(e.touches[1]),o=n.distanceTo(r)/this._startDist;if(this._zoom=t.getScaleZoom(o,this._startZoom),!t.options.bounceAtZoomLimits&&(this._zoom<t.getMinZoom()&&o<1||this._zoom>t.getMaxZoom()&&o>1)&&(this._zoom=t._limitZoom(this._zoom)),"center"===t.options.touchZoom){if(this._center=this._startLatLng,1===o)return}else{var s=n._add(r)._divideBy(2)._subtract(this._centerPoint);if(1===o&&0===s.x&&0===s.y)return;this._center=t.unproject(t.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(t._moveStart(!0,!1),this._moved=!0),E(this._animRequest);var a=i(t._move,t,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=A(a,this,!0),Qt(e)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,E(this._animRequest),jt(document,"touchmove",this._onTouchMove,this),jt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});on.addInitHook("addHandler","touchZoom",li),on.BoxZoom=ti,on.DoubleClickZoom=ni,on.Drag=ri,on.Keyboard=ii,on.ScrollWheelZoom=oi,on.TapHold=ai,on.TouchZoom=li,e.Bounds=D,e.Browser=ze,e.CRS=V,e.Canvas=qr,e.Circle=lr,e.CircleMarker=sr,e.Class=M,e.Control=an,e.DivIcon=Br,e.DivOverlay=kr,e.DomEvent=nn,e.DomUtil=zt,e.Draggable=Sn,e.Evented=P,e.FeatureGroup=Zn,e.GeoJSON=fr,e.GridLayer=Fr,e.Handler=yn,e.Icon=$n,e.ImageOverlay=Er,e.LatLng=U,e.LatLngBounds=z,e.Layer=Jn,e.LayerGroup=Qn,e.LineUtil=jn,e.Map=on,e.Marker=rr,e.Mixin=bn,e.Path=or,e.Point=k,e.PolyUtil=En,e.Polygon=hr,e.Polyline=ur,e.Popup=Or,e.PosAnimation=rn,e.Projection=Gn,e.Rectangle=$r,e.Renderer=Wr,e.SVG=Zr,e.SVGOverlay=Rr,e.TileLayer=jr,e.Tooltip=Lr,e.Transformation=K,e.Util=T,e.VideoOverlay=Mr,e.bind=i,e.bounds=B,e.canvas=Kr,e.circle=cr,e.circleMarker=ar,e.control=ln,e.divIcon=zr,e.extend=n,e.featureGroup=Xn,e.geoJSON=Cr,e.geoJson=Ar,e.gridLayer=Ur,e.icon=er,e.imageOverlay=Tr,e.latLng=j,e.latLngBounds=F,e.layerGroup=Yn,e.map=sn,e.marker=ir,e.point=N,e.polygon=pr,e.polyline=dr,e.popup=Nr,e.rectangle=ei,e.setOptions=p,e.stamp=s,e.svg=Xr,e.svgOverlay=Pr,e.tileLayer=Hr,e.tooltip=Dr,e.transformation=J,e.version=t,e.videoOverlay=Ir;var ci=window.L;e.noConflict=function(){return window.L=ci,this},window.L=e}(Rf);const Of=(0,(c=o("85Hg2")).forwardRef)(kf);c=o("85Hg2");function Nf(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function Lf(e,t){return null==t?function(t,n){const r=(0,c.useRef)();return r.current||(r.current=e(t,n)),r}:function(n,r){const i=(0,c.useRef)();i.current||(i.current=e(n,r));const o=(0,c.useRef)(n),{instance:s}=i.current;return(0,c.useEffect)((function(){o.current!==n&&(t(s,n,o.current),o.current=n)}),[s,n,r]),i}}c=o("85Hg2");function Df(e){function n(n,r){const{instance:i,context:o}=e(n).current;return(0,c.useImperativeHandle)(r,(()=>i)),null==n.children?null:t(c).createElement(Mf,{value:o},n.children)}return(0,c.forwardRef)(n)}function Bf(e){function t(t,n){const[r,i]=(0,c.useState)(!1),{instance:o}=e(t,i).current;(0,c.useImperativeHandle)(n,(()=>o)),(0,c.useEffect)((function(){r&&o.update()}),[o,r,t.children]);const s=o._contentNode;return s?(0,a.createPortal)(t.children,s):null}return(0,c.forwardRef)(t)}function zf(e){function t(t,n){const{instance:r}=e(t).current;return(0,c.useImperativeHandle)(n,(()=>r)),null}return(0,c.forwardRef)(t)}c=o("85Hg2");c=o("85Hg2"),c=o("85Hg2");function Ff(e,t){const n=(0,c.useRef)(t);(0,c.useEffect)((function(){t!==n.current&&null!=e.attributionControl&&(null!=n.current&&e.attributionControl.removeAttribution(n.current),null!=t&&e.attributionControl.addAttribution(t)),n.current=t}),[e,t])}c=o("85Hg2");function Uf(e,t){const n=(0,c.useRef)();(0,c.useEffect)((function(){return null!=t&&e.instance.on(t),n.current=t,function(){null!=n.current&&e.instance.off(n.current),n.current=null}}),[e,t])}function jf(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function Hf(e,t){(0,c.useEffect)((function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){t.layerContainer?.removeLayer(e.instance),t.map.removeLayer(e.instance)}}),[t,e])}function Vf(e){return function(t){const n=If(),r=e(jf(t,n),n);return Ff(n.map,t.attribution),Uf(r.current,t.eventHandlers),Hf(r.current,n),r}}function Gf(e,t){return function(n,r){const i=If(),o=e(jf(n,i),i);return Ff(i.map,n.attribution),Uf(o.current,n.eventHandlers),t(o.current,i,n,r),o}}c=o("85Hg2");const Wf=(qf=function({position:e,...t},n){const r=new(0,Rf.Marker)(e,t);return Nf(r,(i=n,o={overlayContainer:r},Object.freeze({...i,...o})));var i,o},Df(Vf(Lf(qf,(function(e,t,n){t.position!==n.position&&e.setLatLng(t.position),null!=t.icon&&t.icon!==n.icon&&e.setIcon(t.icon),null!=t.zIndexOffset&&t.zIndexOffset!==n.zIndexOffset&&e.setZIndexOffset(t.zIndexOffset),null!=t.opacity&&t.opacity!==n.opacity&&e.setOpacity(t.opacity),null!=e.dragging&&t.draggable!==n.draggable&&(!0===t.draggable?e.dragging.enable():e.dragging.disable())})))));var qf;c=o("85Hg2");const Kf=function(e,t){return Bf(Gf(Lf(e),t))}((function(e,t){return Nf(new(0,Rf.Popup)(e,t.overlayContainer),t)}),(function(e,t,{position:n},r){(0,c.useEffect)((function(){const{instance:i}=e;function o(e){e.popup===i&&(i.update(),r(!0))}function s(e){e.popup===i&&r(!1)}return t.map.on({popupopen:o,popupclose:s}),null==t.overlayContainer?(null!=n&&i.setLatLng(n),i.openOn(t.map)):t.overlayContainer.bindPopup(i),function(){t.map.off({popupopen:o,popupclose:s}),t.overlayContainer?.unbindPopup(),t.map.removeLayer(i)}}),[e,t,r,n])}));function Jf(e,t,n){const{opacity:r,zIndex:i}=t;null!=r&&r!==n.opacity&&e.setOpacity(r),null!=i&&i!==n.zIndex&&e.setZIndex(i)}const Qf=function(e,t){return zf(Vf(Lf(e,t)))}((function({url:e,...t},n){return Nf(new(0,Rf.TileLayer)(e,jf(t,n)),n)}),(function(e,t,n){Jf(e,t,n);const{url:r}=t;null!=r&&r!==n.url&&e.setUrl(r)}));c=o("85Hg2");function Yf(){return If().map}c=o("85Hg2");const Zf=()=>{let e=!1;if("maxTouchPoints"in navigator)e=navigator.maxTouchPoints>0;else if("msMaxTouchPoints"in navigator)e=navigator.msMaxTouchPoints>0;else{const n=window&&"matchMedia"in window&&matchMedia("(pointer:coarse)");if(n&&"(pointer:coarse)"===n.media)e=!!n.matches;else if("orientation"in window)e=!0;else{var t=null===navigator||void 0===navigator?void 0:navigator.userAgent;e=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(t)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(t)}}return e},Xf=()=>{var e;let t=(null===(e=null===navigator||void 0===navigator?void 0:navigator.userAgentData)||void 0===e?void 0:e.platform)||(null===navigator||void 0===navigator?void 0:navigator.platform)||"unknown",n=(null===navigator||void 0===navigator?void 0:navigator.userAgent)||"unknown";return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(t)||n.includes("Mac")&&"ontouchend"in document},$f=/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$_:;|,~+=\{\}\[\]%^&*-]).{8,}$/,em=/^\w+([.-]?[+]?\w+)*@\w+([.-]?\w+)*(\.\w{2,})+$/,tm=/^(?!.*\.\.)(?!.*\.$)[^\W][\w.+-]{2,32}$/;function nm(e,t){const n=(0,c.useRef)(),r=(0,c.useRef)(null);return(0,c.useEffect)((()=>(r.current=e,()=>{r.current=null})),[e]),(0,c.useEffect)((()=>()=>{clearTimeout(n.current)}),[]),(0,c.useMemo)((()=>(...e)=>{clearTimeout(n.current),n.current=window.setTimeout((()=>{r.current&&r.current(...e)}),t)}),[t])}const rm=e=>e.slice(0,e.length/2).trim().toLowerCase()===e.slice(e.length/2+1).trim().toLowerCase()?e.slice(0,e.length/2):e,im=e=>e.replaceAll(/[^\p{L}\p{N}\p{P}\p{Z}^$\n]/gu,"").trim(),om=e=>e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll(/```[\s\S]*?```/g,"")).replaceAll(/`[^`]*`/g,"")).replaceAll(/!\[[^\]]*\]\([^)]*\)/g,"")).replaceAll(/\[([^\]]*)\]\([^)]*\)/g,"$1")).replaceAll(/^> /gm,"")).replaceAll(/^#+ /gm,"")).replaceAll(/[*_]/g,"")).replaceAll(/---/g,"")).replaceAll(/~~/g,"")).replaceAll(/^\s*[-*+] /gm,"")).replaceAll(/^\s*\d+\.\s+/gm,"")).replaceAll(/^\|.*\|$/gm,"")).replaceAll(/\$\$[\s\S]*?\$\$/g,"")).replaceAll(/\$[\s\S]*?\$/g,"")).replaceAll(/\\\([\s\S]*?\\\)/g,"")).replaceAll(/\\\[[\s\S]*?\\\]/g,"")).replaceAll(/\s+/g," ").trim(),sm=e=>{const t=document.createElement("textarea");return t.textContent=e,t.innerHTML};function am(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return null}return e}c=o("85Hg2"),c=o("85Hg2");function lm(e,t){let[n,r]=(0,c.useState)(e),i=Ah(e);return _h((()=>r(i.current)),[i,r,...t]),n}c=o("85Hg2");function cm(e){var t;if(e.type)return e.type;let n=null!=(t=e.as)?t:"button";return"string"==typeof n&&"button"===n.toLowerCase()?"button":void 0}function um(e,t){let[n,r]=(0,c.useState)((()=>cm(e)));return _h((()=>{r(cm(e))}),[e.type,e.as]),_h((()=>{n||!t.current||t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")}),[n,t]),n}c=o("85Hg2");function dm({container:e,accept:t,walk:n,enabled:r=!0}){let i=(0,c.useRef)(t),o=(0,c.useRef)(n);(0,c.useEffect)((()=>{i.current=t,o.current=n}),[t,n]),_h((()=>{if(!e||!r)return;let t=hp(e);if(!t)return;let n=i.current,s=o.current,a=Object.assign((e=>n(e)),{acceptNode:n}),l=t.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,a,!1);for(;l.nextNode();)s(l.currentNode)}),[e,r,i,o])}var hm=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(hm||{});function pm(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=null!=r?r:-1,o=(()=>{switch(e.focus){case 0:return n.findIndex((e=>!t.resolveDisabled(e)));case 1:{let e=n.slice().reverse().findIndex(((e,n,r)=>!(-1!==i&&r.length-n-1>=i)&&!t.resolveDisabled(e)));return-1===e?e:n.length-1-e}case 2:return n.findIndex(((e,n)=>!(n<=i)&&!t.resolveDisabled(e)));case 3:{let e=n.slice().reverse().findIndex((e=>!t.resolveDisabled(e)));return-1===e?e:n.length-1-e}case 4:return n.findIndex((n=>t.resolveId(n)===e.id));case 5:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}})();return-1===o?r:o}function fm(e={},t=null,n=[]){for(let[r,i]of Object.entries(e))gm(n,mm(t,r),i);return n}function mm(e,t){return e?e+"["+t+"]":t}function gm(e,t,n){if(Array.isArray(n))for(let[r,i]of n.entries())gm(e,mm(t,r.toString()),i);else n instanceof Date?e.push([t,n.toISOString()]):"boolean"==typeof n?e.push([t,n?"1":"0"]):"string"==typeof n?e.push([t,n]):"number"==typeof n?e.push([t,`${n}`]):null==n?e.push([t,""]):fm(n,t,e)}function vm(e){var t;let n=null!=(t=null==e?void 0:e.form)?t:e.closest("form");if(n)for(let e of n.elements)if("INPUT"===e.tagName&&"submit"===e.type||"BUTTON"===e.tagName&&"submit"===e.type||"INPUT"===e.nodeName&&"image"===e.type)return void e.click()}c=o("85Hg2");function ym(e,t,n){let[r,i]=(0,c.useState)(n),o=void 0!==e,s=(0,c.useRef)(o),a=(0,c.useRef)(!1),l=(0,c.useRef)(!1);return!o||s.current||a.current?!o&&s.current&&!l.current&&(l.current=!0,s.current=o,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(a.current=!0,s.current=o,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[o?e:r,Mh((e=>(o||i(e),null==t?void 0:t(e))))]}var bm=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(bm||{}),xm=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(xm||{}),Sm=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Sm||{}),wm=(e=>(e[e.OpenCombobox=0]="OpenCombobox",e[e.CloseCombobox=1]="CloseCombobox",e[e.GoToOption=2]="GoToOption",e[e.RegisterOption=3]="RegisterOption",e[e.UnregisterOption=4]="UnregisterOption",e[e.RegisterLabel=5]="RegisterLabel",e))(wm||{});function _m(e,t=(e=>e)){let n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,r=Cp(t(e.options.slice()),(e=>e.dataRef.current.domRef.current)),i=n?r.indexOf(n):null;return-1===i&&(i=null),{options:r,activeOptionIndex:i}}let Cm={1:e=>e.dataRef.current.disabled||1===e.comboboxState?e:{...e,activeOptionIndex:null,comboboxState:1},0(e){if(e.dataRef.current.disabled||0===e.comboboxState)return e;let t=e.activeOptionIndex,{isSelected:n}=e.dataRef.current,r=e.options.findIndex((e=>n(e.dataRef.current.value)));return-1!==r&&(t=r),{...e,comboboxState:0,activeOptionIndex:t}},2(e,t){var n;if(e.dataRef.current.disabled||e.dataRef.current.optionsRef.current&&!e.dataRef.current.optionsPropsRef.current.static&&1===e.comboboxState)return e;let r=_m(e);if(null===r.activeOptionIndex){let e=r.options.findIndex((e=>!e.dataRef.current.disabled));-1!==e&&(r.activeOptionIndex=e)}let i=pm(t,{resolveItems:()=>r.options,resolveActiveIndex:()=>r.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...e,...r,activeOptionIndex:i,activationTrigger:null!=(n=t.trigger)?n:1}},3:(e,t)=>{let n={id:t.id,dataRef:t.dataRef},r=_m(e,(e=>[...e,n]));null===e.activeOptionIndex&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(r.activeOptionIndex=r.options.indexOf(n));let i={...e,...r,activationTrigger:1};return e.dataRef.current.__demoMode&&void 0===e.dataRef.current.value&&(i.activeOptionIndex=0),i},4:(e,t)=>{let n=_m(e,(e=>{let n=e.findIndex((e=>e.id===t.id));return-1!==n&&e.splice(n,1),e}));return{...e,...n,activationTrigger:1}},5:(e,t)=>({...e,labelId:t.id})},Am=(0,c.createContext)(null);function Em(e){let t=(0,c.useContext)(Am);if(null===t){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Em),t}return t}Am.displayName="ComboboxActionsContext";let Tm=(0,c.createContext)(null);function Mm(e){let t=(0,c.useContext)(Tm);if(null===t){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Mm),t}return t}function Im(e,t){return lh(t.type,Cm,e,t)}Tm.displayName="ComboboxDataContext";let Rm=c.Fragment;let Pm=mh((function(e,n){let{value:r,defaultValue:i,onChange:o,name:s,by:a=((e,t)=>e===t),disabled:l=!1,__demoMode:u=!1,nullable:d=!1,multiple:h=!1,...p}=e,[f,m]=ym(r,o,i),[g,v]=(0,c.useReducer)(Im,{dataRef:(0,c.createRef)(),comboboxState:u?0:1,options:[],activeOptionIndex:null,activationTrigger:1,labelId:null}),y=(0,c.useRef)(!1),b=(0,c.useRef)({static:!1,hold:!1}),x=(0,c.useRef)(null),S=(0,c.useRef)(null),w=(0,c.useRef)(null),_=(0,c.useRef)(null),C=Mh("string"==typeof a?(e,t)=>{let n=a;return(null==e?void 0:e[n])===(null==t?void 0:t[n])}:a),A=(0,c.useCallback)((e=>lh(E.mode,{1:()=>f.some((t=>C(t,e))),0:()=>C(f,e)})),[f]),E=(0,c.useMemo)((()=>({...g,optionsPropsRef:b,labelRef:x,inputRef:S,buttonRef:w,optionsRef:_,value:f,disabled:l,mode:h?1:0,get activeOptionIndex(){if(y.current&&null===g.activeOptionIndex&&g.options.length>0){let e=g.options.findIndex((e=>!e.dataRef.current.disabled));if(-1!==e)return e}return g.activeOptionIndex},compare:C,isSelected:A,nullable:d,__demoMode:u})),[f,l,h,d,u,g]);_h((()=>{g.dataRef.current=E}),[E]),rf([E.buttonRef,E.inputRef,E.optionsRef],(()=>v({type:1})),0===E.comboboxState);let T=(0,c.useMemo)((()=>({open:0===E.comboboxState,disabled:l,activeIndex:E.activeOptionIndex,activeOption:null===E.activeOptionIndex?null:E.options[E.activeOptionIndex].dataRef.current.value,value:f})),[E,l,f]),M=Mh((e=>{let t=E.options.find((t=>t.id===e));!t||L(t.dataRef.current.value)})),I=Mh((()=>{if(null!==E.activeOptionIndex){let{dataRef:e,id:t}=E.options[E.activeOptionIndex];L(e.current.value),v({type:2,focus:hm.Specific,id:t})}})),R=Mh((()=>{v({type:0}),y.current=!0})),P=Mh((()=>{v({type:1}),y.current=!1})),k=Mh(((e,t,n)=>(y.current=!1,e===hm.Specific?v({type:2,focus:hm.Specific,id:t,trigger:n}):v({type:2,focus:e,trigger:n})))),O=Mh(((e,t)=>(v({type:3,id:e,dataRef:t}),()=>v({type:4,id:e})))),N=Mh((e=>(v({type:5,id:e}),()=>v({type:5,id:null})))),L=Mh((e=>lh(E.mode,{0:()=>null==m?void 0:m(e),1(){let t=E.value.slice(),n=t.findIndex((t=>C(t,e)));return-1===n?t.push(e):t.splice(n,1),null==m?void 0:m(t)}}))),D=(0,c.useMemo)((()=>({onChange:L,registerOption:O,registerLabel:N,goToOption:k,closeCombobox:P,openCombobox:R,selectActiveOption:I,selectOption:M})),[]),B=null===n?{}:{ref:n};return t(c).createElement(Am.Provider,{value:D},t(c).createElement(Tm.Provider,{value:E},t(c).createElement(Sh,{value:lh(E.comboboxState,{0:bh.Open,1:bh.Closed})},null!=s&&null!=f&&fm({[s]:f}).map((([e,n])=>t(c).createElement(dp,{features:up.Hidden,...gh({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,name:e,value:n})}))),hh({ourProps:B,theirProps:p,slot:T,defaultTag:Rm,name:"Combobox"}))))})),km=mh((function(e,t){var n,r;let{value:i,onChange:o,displayValue:s,type:a="text",...l}=e,u=Mm("Combobox.Input"),d=Em("Combobox.Input"),h=Ph(u.inputRef,t),p=`headlessui-combobox-input-${cp()}`,f=Uh(),m=!1;kp((([e,t],[n,r])=>{!u.inputRef.current||(0===r&&1===t?function(e){var t;let n=u.inputRef.current;if(!n||n.value===e)return;let r=Object.getOwnPropertyDescriptor(n.constructor.prototype,"value");null==(t=null==r?void 0:r.set)||t.call(n,e),m=!0,n.dispatchEvent(new Event("input",{bubbles:!0})),n.value=e,m=!1}(e):e!==n&&(u.inputRef.current.value=e))}),[(0,c.useMemo)((()=>{var e;return"function"==typeof s?null!=(e=s(u.value))?e:"":"string"==typeof u.value?u.value:""}),[u.value]),u.comboboxState]);let g=(0,c.useRef)(!1),v=Mh((()=>{g.current=!0})),y=Mh((()=>{setTimeout((()=>{g.current=!1}))})),b=Mh((e=>{switch(e.key){case ip.Backspace:case ip.Delete:if(0!==u.mode||!u.nullable)return;let t=e.currentTarget;f.requestAnimationFrame((()=>{""===t.value&&(d.onChange(null),u.optionsRef.current&&(u.optionsRef.current.scrollTop=0),d.goToOption(hm.Nothing))}));break;case ip.Enter:if(0!==u.comboboxState||g.current)return;if(e.preventDefault(),e.stopPropagation(),null===u.activeOptionIndex)return void d.closeCombobox();d.selectActiveOption(),0===u.mode&&d.closeCombobox();break;case ip.ArrowDown:return e.preventDefault(),e.stopPropagation(),lh(u.comboboxState,{0:()=>{d.goToOption(hm.Next)},1:()=>{d.openCombobox()}});case ip.ArrowUp:return e.preventDefault(),e.stopPropagation(),lh(u.comboboxState,{0:()=>{d.goToOption(hm.Previous)},1:()=>{d.openCombobox(),f.nextFrame((()=>{u.value||d.goToOption(hm.Last)}))}});case ip.Home:case ip.PageUp:return e.preventDefault(),e.stopPropagation(),d.goToOption(hm.First);case ip.End:case ip.PageDown:return e.preventDefault(),e.stopPropagation(),d.goToOption(hm.Last);case ip.Escape:return 0!==u.comboboxState?void 0:(e.preventDefault(),u.optionsRef.current&&!u.optionsPropsRef.current.static&&e.stopPropagation(),d.closeCombobox());case ip.Tab:if(0!==u.comboboxState)return;0===u.mode&&d.selectActiveOption(),d.closeCombobox()}})),x=Mh((e=>{m||d.openCombobox(),null==o||o(e)})),S=lm((()=>{if(u.labelId)return[u.labelId].join(" ")}),[u.labelId]),w=(0,c.useMemo)((()=>({open:0===u.comboboxState,disabled:u.disabled})),[u]);return hh({ourProps:{ref:h,id:p,role:"combobox",type:a,"aria-controls":null==(n=u.optionsRef.current)?void 0:n.id,"aria-expanded":u.disabled?void 0:0===u.comboboxState,"aria-activedescendant":null===u.activeOptionIndex||null==(r=u.options[u.activeOptionIndex])?void 0:r.id,"aria-multiselectable":1===u.mode||void 0,"aria-labelledby":S,disabled:u.disabled,onCompositionStart:v,onCompositionEnd:y,onKeyDown:b,onChange:x},theirProps:l,slot:w,defaultTag:"input",name:"Combobox.Input"})})),Om=mh((function(e,t){var n;let r=Mm("Combobox.Button"),i=Em("Combobox.Button"),o=Ph(r.buttonRef,t),s=`headlessui-combobox-button-${cp()}`,a=Uh(),l=Mh((e=>{switch(e.key){case ip.ArrowDown:return e.preventDefault(),e.stopPropagation(),1===r.comboboxState&&i.openCombobox(),a.nextFrame((()=>{var e;return null==(e=r.inputRef.current)?void 0:e.focus({preventScroll:!0})}));case ip.ArrowUp:return e.preventDefault(),e.stopPropagation(),1===r.comboboxState&&(i.openCombobox(),a.nextFrame((()=>{r.value||i.goToOption(hm.Last)}))),a.nextFrame((()=>{var e;return null==(e=r.inputRef.current)?void 0:e.focus({preventScroll:!0})}));case ip.Escape:return 0!==r.comboboxState?void 0:(e.preventDefault(),r.optionsRef.current&&!r.optionsPropsRef.current.static&&e.stopPropagation(),i.closeCombobox(),a.nextFrame((()=>{var e;return null==(e=r.inputRef.current)?void 0:e.focus({preventScroll:!0})})));default:return}})),u=Mh((e=>{if(op(e.currentTarget))return e.preventDefault();0===r.comboboxState?i.closeCombobox():(e.preventDefault(),i.openCombobox()),a.nextFrame((()=>{var e;return null==(e=r.inputRef.current)?void 0:e.focus({preventScroll:!0})}))})),d=lm((()=>{if(r.labelId)return[r.labelId,s].join(" ")}),[r.labelId,s]),h=(0,c.useMemo)((()=>({open:0===r.comboboxState,disabled:r.disabled,value:r.value})),[r]),p=e;return hh({ourProps:{ref:o,id:s,type:um(e,r.buttonRef),tabIndex:-1,"aria-haspopup":!0,"aria-controls":null==(n=r.optionsRef.current)?void 0:n.id,"aria-expanded":r.disabled?void 0:0===r.comboboxState,"aria-labelledby":d,disabled:r.disabled,onClick:u,onKeyDown:l},theirProps:p,slot:h,defaultTag:"button",name:"Combobox.Button"})})),Nm=mh((function(e,t){let n=Mm("Combobox.Label"),r=`headlessui-combobox-label-${cp()}`,i=Em("Combobox.Label"),o=Ph(n.labelRef,t);_h((()=>i.registerLabel(r)),[r]);let s=Mh((()=>{var e;return null==(e=n.inputRef.current)?void 0:e.focus({preventScroll:!0})})),a=(0,c.useMemo)((()=>({open:0===n.comboboxState,disabled:n.disabled})),[n]);return hh({ourProps:{ref:o,id:r,onClick:s},theirProps:e,slot:a,defaultTag:"label",name:"Combobox.Label"})})),Lm=uh.RenderStrategy|uh.Static,Dm=mh((function(e,t){var n;let{hold:r=!1,...i}=e,o=Mm("Combobox.Options"),s=Ph(o.optionsRef,t),a=`headlessui-combobox-options-${cp()}`,l=xh(),u=null!==l?l===bh.Open:0===o.comboboxState;_h((()=>{var t;o.optionsPropsRef.current.static=null!=(t=e.static)&&t}),[o.optionsPropsRef,e.static]),_h((()=>{o.optionsPropsRef.current.hold=r}),[o.optionsPropsRef,r]),dm({container:o.optionsRef.current,enabled:0===o.comboboxState,accept:e=>"option"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let d=lm((()=>{var e,t;return null!=(t=o.labelId)?t:null==(e=o.buttonRef.current)?void 0:e.id}),[o.labelId,o.buttonRef.current]),h=(0,c.useMemo)((()=>({open:0===o.comboboxState})),[o]);return hh({ourProps:{"aria-activedescendant":null===o.activeOptionIndex||null==(n=o.options[o.activeOptionIndex])?void 0:n.id,"aria-labelledby":d,role:"listbox",id:a,ref:s},theirProps:i,slot:h,defaultTag:"ul",features:Lm,visible:u,name:"Combobox.Options"})})),Bm=mh((function(e,t){var n,r;let{disabled:i=!1,value:o,...s}=e,a=Mm("Combobox.Option"),l=Em("Combobox.Option"),u=`headlessui-combobox-option-${cp()}`,d=null!==a.activeOptionIndex&&a.options[a.activeOptionIndex].id===u,h=a.isSelected(o),p=(0,c.useRef)(null),f=Ah({disabled:i,value:o,domRef:p,textValue:null==(r=null==(n=p.current)?void 0:n.textContent)?void 0:r.toLowerCase()}),m=Ph(t,p),g=Mh((()=>l.selectOption(u)));_h((()=>l.registerOption(u,f)),[f,u]);let v=(0,c.useRef)(!a.__demoMode);_h((()=>{if(!a.__demoMode)return;let e=Nh();return e.requestAnimationFrame((()=>{v.current=!0})),e.dispose}),[]),_h((()=>{if(0!==a.comboboxState||!d||!v.current||0===a.activationTrigger)return;let e=Nh();return e.requestAnimationFrame((()=>{var e,t;null==(t=null==(e=p.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})),e.dispose}),[p,d,a.comboboxState,a.activationTrigger,a.activeOptionIndex]);let y=Mh((e=>{if(i)return e.preventDefault();g(),0===a.mode&&l.closeCombobox()})),b=Mh((()=>{if(i)return l.goToOption(hm.Nothing);l.goToOption(hm.Specific,u)})),x=Mh((()=>{i||d||l.goToOption(hm.Specific,u,0)})),S=Mh((()=>{i||!d||a.optionsPropsRef.current.hold||l.goToOption(hm.Nothing)})),w=(0,c.useMemo)((()=>({active:d,selected:h,disabled:i})),[d,h,i]);return hh({ourProps:{id:u,ref:m,role:"option",tabIndex:!0===i?void 0:-1,"aria-disabled":!0===i||void 0,"aria-selected":h,disabled:void 0,onClick:y,onFocus:b,onPointerMove:x,onMouseMove:x,onPointerLeave:S,onMouseLeave:S},theirProps:s,slot:w,defaultTag:"li",name:"Combobox.Option"})})),zm=Object.assign(Pm,{Input:km,Button:Om,Label:Nm,Options:Dm,Option:Bm});const Fm=({center:e,size:n})=>{const r=If();return(0,c.useEffect)((()=>{const i=new(t(Rf).Circle)(e,n),o=r.layerContainer||r.map;return o.addLayer(i),()=>{o.removeLayer(i)}})),null},Um=({center:e,uncertainty:t})=>{const[n,r]=(0,c.useState)(!1),i=Yf(),o=(0,c.useCallback)((()=>{let n=void 0!==t?Math.round(Math.log2(1e7/t)):i.getZoom();i.setView(e,n)}),[e,t,i]);return(0,c.useEffect)((()=>{n||(o(),r(!0))}),[]),(0,c.useEffect)((()=>{o()}),[e,t,o]),null};let jm=t(Rf).icon({iconUrl:"https://unpkg.com/leaflet@1.9.4/dist/images/marker-icon.png",shadowUrl:"https://unpkg.com/leaflet@1.9.4/dist/images/marker-shadow.png",iconSize:[25,41],iconAnchor:[12.5,20.5],shadowAnchor:[12.5,20.5]});t(Rf).Marker.prototype.options.icon=jm;const Hm=e=>{let t="Position";return(null==e?void 0:e.address)?t=[e.address.village||e.address.suburb,e.address.town||e.address.city||e.address.county||e.address.state,e.address.country].filter(Boolean).filter(((e,t,n)=>n.indexOf(e)===t)).join(", "):(null==e?void 0:e.display_name)&&(t=e.display_name),t};var Vm=({venue:e,setVenue:n,showUncertainty:r=!1,showGpsButton:i=!0,saveAndClose:o})=>{var a,l,u;const{t:d}=Se(),[h,p]=(0,c.useState)(!1),[f,m]=(0,c.useState)(!1),[g,v]=(0,c.useState)(!1),[y,b]=(0,c.useState)(""),[x,S]=(0,c.useState)([]),w=nm((async e=>{v(!0);try{let t=await fetch(`https://nominatim.openstreetmap.org/search?q=${e}&format=jsonv2&limit=5&addressdetails=1`),n=await t.json();S(n)}catch(e){console.error(e)}finally{v(!1)}}),1e3);return(0,c.useEffect)((()=>{p(!0)}),[]),(0,c.useEffect)((()=>{const e=document.createElement("link");return e.href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css",e.rel="stylesheet",e.integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=",e.crossOrigin="",document.head.appendChild(e),()=>{document.head.removeChild(e)}}),[]),(0,s.jsxs)("fieldset",{className:"memori--venue-widget",children:[(0,s.jsx)("legend",{className:"sr-only",children:"Venue"}),(0,s.jsxs)("div",{className:"memori--venue-widget__form-item",children:[(0,s.jsx)("div",{className:"memori--venue-widget__geosuggest",children:f?(0,s.jsx)("p",{children:d("write_and_speak.updatingPosition")}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"memori--venue-widget-search",children:(0,s.jsxs)(zm,{value:(null==e?void 0:e.latitude)&&(null==e?void 0:e.longitude)?{place_id:0,lat:null==e?void 0:e.latitude,lon:null==e?void 0:e.longitude,display_name:null==e?void 0:e.placeName}:void 0,onChange:e=>{console.log(e);const t=Hm(e);n({latitude:e.lat,longitude:e.lon,placeName:t,uncertainty:(null==e?void 0:e.boundingbox)?Af(e.boundingbox):2})},children:[(0,s.jsx)(zm.Input,{className:"memori--venue-widget-search--input",displayValue:e=>e?Hm(e):"",placeholder:d("searchVenue"),onChange:e=>{return t=e.target.value,b(t),void w(t);var t}}),(g||x.length>0||0===x.length&&""!==y)&&(0,s.jsx)(np,{as:c.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)(zm.Options,{className:"memori--venue-widget-search--options",children:g?(0,s.jsx)(xf,{spinning:!0,children:(0,s.jsxs)("center",{className:"memori--venue-widget-search--option",children:[d("loading"),"..."]})}):0===x.length&&""!==y?(0,s.jsx)("center",{className:"memori--venue-widget-search--option",children:d("nothingFound")}):null==x?void 0:x.map((e=>(0,s.jsx)(zm.Option,{as:c.Fragment,value:e,children:({active:n,selected:r})=>(0,s.jsx)("li",{className:t(ws)("memori--venue-widget-search--option",{"memori--venue-widget-search--option-active":n,"memori--venue-widget-search--option-selected":r}),children:e.display_name})},e.place_id)))})})]})}),i&&(0,s.jsx)(Sf,{className:"memori--venue-widget__gps-button",primary:!0,loading:f,onClick:()=>{m(!0),(async()=>{m(!0),navigator.geolocation.getCurrentPosition((async e=>{let r={latitude:e.coords.latitude,longitude:e.coords.longitude,placeName:"Position",uncertainty:e.coords.accuracy/1e3};try{const t=await fetch(`https://nominatim.openstreetmap.org/reverse?lat=${e.coords.latitude}&lon=${e.coords.longitude}&format=jsonv2&addressdetails=1`),i=await t.json(),s=Hm(i);r={latitude:e.coords.latitude,longitude:e.coords.longitude,placeName:s,uncertainty:e.coords.accuracy/1e3},n(r)}catch(e){let i=e;console.error("[POSITION ERROR]",i),(null==i?void 0:i.message)&&t(Ju).error(i.message),n(r)}finally{o&&o(r)}m(!1)}),(e=>{console.error("[POSITION ERROR]",e),t(Ju).error(e.message),m(!1)}))})()},children:d("write_and_speak.useMyPosition")})]})}),(0,s.jsx)("div",{children:(0,s.jsx)(Sf,{outlined:!0,className:"memori--venue-widget__no-location-button",onClick:()=>{let e={latitude:0,longitude:0,placeName:"Position",uncertainty:0};n(e),o&&o(e)},children:d("write_and_speak.dontWantToProvidePosition")})}),r&&(0,s.jsxs)("label",{className:"memori--venue-widget__select-label",children:[(0,s.jsxs)("span",{children:[d("uncertain"),": "]}),(0,s.jsxs)("select",{className:"memori-select--button memori--venue-widget__uncertainty",value:parseFloat((null!==(a=null==e?void 0:e.uncertainty)&&void 0!==a?a:0).toFixed(2)),disabled:!(e&&e.placeName&&e.latitude&&e.longitude),onChange:t=>{n({...e,uncertainty:parseFloat(t.target.value)})},children:[(null==e?void 0:e.uncertainty)&&![0,1,2,5,10,20,50,100].includes(e.uncertainty)&&(0,s.jsxs)("option",{value:e.uncertainty,children:[e.uncertainty," Km"]}),(0,s.jsx)("option",{value:0,children:d("exactPosition")}),(0,s.jsx)("option",{value:1,children:"1 km"}),(0,s.jsx)("option",{value:2,children:"2 km"}),(0,s.jsx)("option",{value:5,children:"5 km"}),(0,s.jsx)("option",{value:10,children:"10 km"}),(0,s.jsx)("option",{value:20,children:"20 km"}),(0,s.jsx)("option",{value:50,children:"50 km"}),(0,s.jsx)("option",{value:100,children:"100 km"})]})]})]}),(0,s.jsxs)("div",{className:"memori--venue-widget__form-item",children:[(null==e?void 0:e.placeName)&&"Position"!==e.placeName&&(0,s.jsxs)("p",{className:"memori--venue--widget__place-name",children:[(0,s.jsx)("strong",{children:d("venue")}),": ",e.placeName]}),(0,s.jsx)("div",{className:"memori--venue-widget__map",children:h&&(0,s.jsxs)(Of,{className:"memori--venue-widget__map",center:(null==e?void 0:e.latitude)&&(null==e?void 0:e.longitude)?[e.latitude,e.longitude]:[44.66579,11.48823],zoom:13,scrollWheelZoom:!0,children:[(0,s.jsx)(Qf,{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),(0,s.jsx)(Um,{center:(null==e?void 0:e.latitude)&&(null==e?void 0:e.longitude)?[e.latitude,e.longitude]:[44.66579,11.48823],uncertainty:1e3*(null!==(l=null==e?void 0:e.uncertainty)&&void 0!==l?l:0)}),(null==e?void 0:e.latitude)&&(null==e?void 0:e.longitude)&&(0,s.jsx)(Wf,{position:[e.latitude,e.longitude],icon:jm,children:(0,s.jsx)(Kf,{children:null!==(u=e.placeName)&&void 0!==u?u:""})}),(null==e?void 0:e.latitude)&&(null==e?void 0:e.longitude)&&void 0!==(null==e?void 0:e.uncertainty)&&(0,s.jsx)(Fm,{center:[e.latitude,e.longitude],size:1e3*e.uncertainty})]})})]})]})};var Gm=({memori:e,open:t,onClose:n,venue:r,setVenue:i})=>{const{t:o}=Se();return(0,s.jsxs)(_f,{className:"memori-position-drawer",open:t,onClose:()=>n(r),title:o("widget.position")||"Position",animated:!1,children:[(0,s.jsx)("p",{children:o("write_and_speak.requirePositionHelp",{name:e.name})}),(0,s.jsx)(Vm,{venue:r,setVenue:i,showUncertainty:!1,saveAndClose:e=>{i(e),n(e)}})]})};c=o("85Hg2"),c=o("85Hg2");var Wm=({open:e=!1,onClose:n,className:r,title:i,description:o,children:a,footer:l,loading:u=!1,closable:d=!0,width:h="100%",widthMd:p="100%"})=>{const{t:f}=Se();return(0,s.jsx)(np,{appear:!0,show:e,as:t(c).Fragment,children:(0,s.jsxs)(yf,{open:e,onClose:n,className:t(ws)("memori-modal",r),children:[(0,s.jsx)(np.Child,{as:t(c).Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)("div",{className:"memori-modal--backdrop"})}),(0,s.jsx)("div",{className:"memori-modal--container",children:(0,s.jsx)("div",{className:"memori-modal--container-scrollable",children:(0,s.jsx)(np.Child,{as:t(c).Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:(0,s.jsxs)(yf.Panel,{className:"memori-modal--panel",children:[(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n .memori-modal--panel {\n --memori-modal--width: ${h};\n --memori-modal--width-md: ${p};\n }\n `}}),d&&(0,s.jsx)("div",{className:"memori-modal--close",children:(0,s.jsx)(Sf,{ghost:!0,padded:!0,shape:"circle",icon:(0,s.jsx)(wf,{}),title:f("close")||"Close",onClick:()=>n(!1)})}),(0,s.jsxs)(xf,{spinning:u,children:[i&&(0,s.jsx)(yf.Title,{className:"memori-modal--title",children:i}),o&&(0,s.jsx)(yf.Description,{className:"memori-modal--description",children:o}),a,l&&(0,s.jsx)("div",{className:"memori-modal--footer",children:l})]})]})})})})]})})},qm=(c=o("85Hg2"),e=>"checkbox"===e.type),Km=e=>e instanceof Date,Jm=e=>null==e;const Qm=e=>"object"==typeof e;var Ym=e=>!Jm(e)&&!Array.isArray(e)&&Qm(e)&&!Km(e),Zm=e=>Ym(e)&&e.target?qm(e.target)?e.target.checked:e.target.value:e,Xm=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),$m=e=>Array.isArray(e)?e.filter(Boolean):[],eg=e=>void 0===e,tg=(e,t,n)=>{if(!t||!Ym(e))return n;const r=$m(t.split(/[,[\].]+?/)).reduce(((e,t)=>Jm(e)?e:e[t]),e);return eg(r)||r===e?eg(e[t])?n:e[t]:r};const ng="blur",rg="focusout",ig="onBlur",og="onChange",sg="onSubmit",ag="onTouched",lg="all",cg="max",ug="min",dg="maxLength",hg="minLength",pg="pattern",fg="required",mg="validate";t(c).createContext(null);var gg=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const i=o;return t._proxyFormState[i]!==lg&&(t._proxyFormState[i]=!r||lg),n&&(n[i]=!0),e[i]}});return i},vg=e=>Ym(e)&&!Object.keys(e).length,yg=(e,t,n)=>{const{name:r,...i}=e;return vg(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find((e=>t[e]===(!n||lg)))},bg=e=>Array.isArray(e)?e:[e];function xg(e){const n=t(c).useRef(e);n.current=e,t(c).useEffect((()=>{const t=!e.disabled&&n.current.subject.subscribe({next:n.current.callback});return()=>{t&&t.unsubscribe()}}),[e.disabled])}var Sg=e=>"string"==typeof e,wg=(e,t,n,r)=>Sg(e)?(r&&t.watch.add(e),tg(n,e)):Array.isArray(e)?e.map((e=>(r&&t.watch.add(e),tg(n,e)))):(t.watchAll=!!r,n),_g="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function Cg(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(_g&&(e instanceof Blob||e instanceof FileList)||!n&&!Ym(e))return e;if(t=n?[]:{},Array.isArray(e)||(e=>{const t=e.constructor&&e.constructor.prototype;return Ym(t)&&t.hasOwnProperty("isPrototypeOf")})(e))for(const n in e)t[n]=Cg(e[n]);else t=e}return t}var Ag=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},Eg=e=>/^\w*$/.test(e),Tg=e=>$m(e.replace(/["|']|\]/g,"").split(/\.|\[/));function Mg(e,t,n){let r=-1;const i=Eg(t)?[t]:Tg(t),o=i.length,s=o-1;for(;++r<o;){const t=i[r];let o=n;if(r!==s){const n=e[t];o=Ym(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}e[t]=o,e=e[t]}return e}const Ig=(e,t,n)=>{for(const r of n||Object.keys(e)){const n=tg(e,r);if(n){const{_f:e,...r}=n;if(e&&t(e.name)){if(e.ref.focus){e.ref.focus();break}if(e.refs&&e.refs[0].focus){e.refs[0].focus();break}}else Ym(r)&&Ig(r,t)}}};var Rg=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some((t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))))),Pg=(e,t,n)=>{const r=$m(tg(e,n));return Mg(r,"root",t[n]),Mg(e,n,r),e},kg=e=>"boolean"==typeof e,Og=e=>"file"===e.type,Ng=e=>"function"==typeof e,Lg=e=>Sg(e)||t(c).isValidElement(e),Dg=e=>"radio"===e.type,Bg=e=>e instanceof RegExp;const zg={value:!1,isValid:!1},Fg={value:!0,isValid:!0};var Ug=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter((e=>e&&e.checked&&!e.disabled)).map((e=>e.value));return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!eg(e[0].attributes.value)?eg(e[0].value)||""===e[0].value?Fg:{value:e[0].value,isValid:!0}:Fg:zg}return zg};const jg={isValid:!1,value:null};var Hg=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e),jg):jg;function Vg(e,t,n="validate"){if(Lg(e)||Array.isArray(e)&&e.every(Lg)||kg(e)&&!e)return{type:n,message:Lg(e)?e:"",ref:t}}var Gg=e=>Ym(e)&&!Bg(e)?e:{value:e,message:""},Wg=async(e,t,n,r,i)=>{const{ref:o,refs:s,required:a,maxLength:l,minLength:c,min:u,max:d,pattern:h,validate:p,name:f,valueAsNumber:m,mount:g,disabled:v}=e._f;if(!g||v)return{};const y=s?s[0]:o,b=e=>{r&&y.reportValidity&&(y.setCustomValidity(kg(e)?"":e||""),y.reportValidity())},x={},S=Dg(o),w=qm(o),_=S||w,C=(m||Og(o))&&!o.value||""===t||Array.isArray(t)&&!t.length,A=Ag.bind(null,f,n,x),E=(e,t,n,r=dg,i=hg)=>{const s=e?t:n;x[f]={type:e?r:i,message:s,ref:o,...A(e?r:i,s)}};if(i?!Array.isArray(t)||!t.length:a&&(!_&&(C||Jm(t))||kg(t)&&!t||w&&!Ug(s).isValid||S&&!Hg(s).isValid)){const{value:e,message:t}=Lg(a)?{value:!!a,message:a}:Gg(a);if(e&&(x[f]={type:fg,message:t,ref:y,...A(fg,t)},!n))return b(t),x}if(!(C||Jm(u)&&Jm(d))){let e,r;const i=Gg(d),s=Gg(u);if(Jm(t)||isNaN(t)){const n=o.valueAsDate||new Date(t),a=e=>new Date((new Date).toDateString()+" "+e),l="time"==o.type,c="week"==o.type;Sg(i.value)&&t&&(e=l?a(t)>a(i.value):c?t>i.value:n>new Date(i.value)),Sg(s.value)&&t&&(r=l?a(t)<a(s.value):c?t<s.value:n<new Date(s.value))}else{const n=o.valueAsNumber||(t?+t:t);Jm(i.value)||(e=n>i.value),Jm(s.value)||(r=n<s.value)}if((e||r)&&(E(!!e,i.message,s.message,cg,ug),!n))return b(x[f].message),x}if((l||c)&&!C&&(Sg(t)||i&&Array.isArray(t))){const e=Gg(l),r=Gg(c),i=!Jm(e.value)&&t.length>e.value,o=!Jm(r.value)&&t.length<r.value;if((i||o)&&(E(i,e.message,r.message),!n))return b(x[f].message),x}if(h&&!C&&Sg(t)){const{value:e,message:r}=Gg(h);if(Bg(e)&&!t.match(e)&&(x[f]={type:pg,message:r,ref:o,...A(pg,r)},!n))return b(r),x}if(p)if(Ng(p)){const e=Vg(await p(t),y);if(e&&(x[f]={...e,...A(mg,e.message)},!n))return b(e.message),x}else if(Ym(p)){let e={};for(const r in p){if(!vg(e)&&!n)break;const i=Vg(await p[r](t),y,r);i&&(e={...i,...A(r,i.message)},b(i.message),n&&(x[f]=e))}if(!vg(e)&&(x[f]={ref:y,...e},!n))return x}return b(!0),x};var qg=e=>({isOnSubmit:!e||e===sg,isOnBlur:e===ig,isOnChange:e===og,isOnAll:e===lg,isOnTouch:e===ag});function Kg(e){for(const t in e)if(!eg(e[t]))return!1;return!0}function Jg(e,t){const n=Eg(t)?[t]:Tg(t),r=1==n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=eg(e)?r++:e[t[r++]];return e}(e,n),i=n[n.length-1];let o;r&&delete r[i];for(let t=0;t<n.slice(0,-1).length;t++){let r,i=-1;const s=n.slice(0,-(t+1)),a=s.length-1;for(t>0&&(o=e);++i<s.length;){const t=s[i];r=r?r[t]:e[t],a===i&&(Ym(r)&&vg(r)||Array.isArray(r)&&Kg(r))&&(o?delete o[t]:delete e[t]),o=r}}return e}function Qg(){let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter((e=>e!==t))}}),unsubscribe:()=>{e=[]}}}var Yg=e=>Jm(e)||!Qm(e);function Zg(e,t){if(Yg(e)||Yg(t))return e===t;if(Km(e)&&Km(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const n=e[i];if(!r.includes(i))return!1;if("ref"!==i){const e=t[i];if(Km(n)&&Km(e)||Ym(n)&&Ym(e)||Array.isArray(n)&&Array.isArray(e)?!Zg(n,e):n!==e)return!1}}return!0}var Xg=e=>{const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},$g=e=>"select-multiple"===e.type,ev=e=>Xg(e)&&e.isConnected,tv=e=>{for(const t in e)if(Ng(e[t]))return!0;return!1};function nv(e,t={}){const n=Array.isArray(e);if(Ym(e)||n)for(const n in e)Array.isArray(e[n])||Ym(e[n])&&!tv(e[n])?(t[n]=Array.isArray(e[n])?[]:{},nv(e[n],t[n])):Jm(e[n])||(t[n]=!0);return t}function rv(e,t,n){const r=Array.isArray(e);if(Ym(e)||r)for(const r in e)Array.isArray(e[r])||Ym(e[r])&&!tv(e[r])?eg(t)||Yg(n[r])?n[r]=Array.isArray(e[r])?nv(e[r],[]):{...nv(e[r])}:rv(e[r],Jm(t)?{}:t[r],n[r]):Zg(e[r],t[r])?delete n[r]:n[r]=!0;return n}var iv=(e,t)=>rv(e,t,nv(t)),ov=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>eg(e)?e:t?""===e?NaN:e?+e:e:n&&Sg(e)?new Date(e):r?r(e):e;function sv(e){const t=e.ref;if(!(e.refs?e.refs.every((e=>e.disabled)):t.disabled))return Og(t)?t.files:Dg(t)?Hg(e.refs).value:$g(t)?[...t.selectedOptions].map((({value:e})=>e)):qm(t)?Ug(e.refs).value:ov(eg(t.value)?e.ref.value:t.value,e)}var av=e=>eg(e)?e:Bg(e)?e.source:Ym(e)?Bg(e.value)?e.value.source:e.value:e;function lv(e,t,n){const r=tg(e,n);if(r||Eg(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const r=i.join("."),o=tg(t,r),s=tg(e,r);if(o&&!Array.isArray(o)&&n!==r)return{name:n};if(s&&s.type)return{name:r,error:s};i.pop()}return{name:n}}const cv={mode:sg,reValidateMode:og,shouldFocusError:!0};function uv(e={}){let t,n={...cv,...e},r={submitCount:0,isDirty:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},i={},o=Cg(n.defaultValues)||{},s=n.shouldUnregister?{}:Cg(o),a={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c=0,u={};const d={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},h={watch:Qg(),array:Qg(),state:Qg()},p=qg(n.mode),f=qg(n.reValidateMode),m=n.criteriaMode===lg,g=async()=>{let e=!1;return d.isValid&&(e=n.resolver?vg((await x()).errors):await S(i,!0),e!==r.isValid&&(r.isValid=e,h.state.next({isValid:e}))),e},v=(e,t,n,r)=>{const l=tg(i,e);if(l){const i=tg(s,e,eg(n)?tg(o,e):n);eg(i)||r&&r.defaultChecked||t?Mg(s,e,t?i:sv(l._f)):C(e,i),a.mount&&g()}},y=(e,t,n,i,s)=>{let a=!1,l=!1;const c={name:e};if(d.isDirty&&(l=r.isDirty,r.isDirty=c.isDirty=w(),a=l!==c.isDirty),d.dirtyFields&&(!n||i)){l=tg(r.dirtyFields,e);const n=Zg(tg(o,e),t);n?Jg(r.dirtyFields,e):Mg(r.dirtyFields,e,!0),c.dirtyFields=r.dirtyFields,a=a||l!==!n}if(n){const t=tg(r.touchedFields,e);t||(Mg(r.touchedFields,e,n),c.touchedFields=r.touchedFields,a=a||d.touchedFields&&t!==n)}return a&&s&&h.state.next(c),a?c:{}},b=(n,i,o,s)=>{const a=tg(r.errors,n),l=d.isValid&&kg(i)&&r.isValid!==i;var p;if(e.delayError&&o?(p=()=>((e,t)=>{Mg(r.errors,e,t),h.state.next({errors:r.errors})})(n,o),t=e=>{clearTimeout(c),c=window.setTimeout(p,e)},t(e.delayError)):(clearTimeout(c),t=null,o?Mg(r.errors,n,o):Jg(r.errors,n)),(o?!Zg(a,o):a)||!vg(s)||l){const e={...s,...l&&kg(i)?{isValid:i}:{},errors:r.errors,name:n};r={...r,...e},h.state.next(e)}u[n]--,d.isValidating&&!Object.values(u).some((e=>e))&&(h.state.next({isValidating:!1}),u={})},x=async e=>n.resolver?await n.resolver({...s},n.context,((e,t,n,r)=>{const i={};for(const n of e){const e=tg(t,n);e&&Mg(i,n,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}})(e||l.mount,i,n.criteriaMode,n.shouldUseNativeValidation)):{},S=async(e,t,i={valid:!0})=>{for(const o in e){const a=e[o];if(a){const{_f:e,...o}=a;if(e){const o=l.array.has(e.name),c=await Wg(a,tg(s,e.name),m,n.shouldUseNativeValidation,o);if(c[e.name]&&(i.valid=!1,t))break;!t&&(tg(c,e.name)?o?Pg(r.errors,c,e.name):Mg(r.errors,e.name,c[e.name]):Jg(r.errors,e.name))}o&&await S(o,t,i)}}return i.valid},w=(e,t)=>(e&&t&&Mg(s,e,t),!Zg(I(),o)),_=(e,t,n)=>wg(e,l,{...a.mount?s:eg(t)?o:Sg(e)?{[e]:t}:t},n),C=(e,t,n={})=>{const r=tg(i,e);let o=t;if(r){const n=r._f;n&&(!n.disabled&&Mg(s,e,ov(t,n)),o=_g&&Xg(n.ref)&&Jm(t)?"":t,$g(n.ref)?[...n.ref.options].forEach((e=>e.selected=o.includes(e.value))):n.refs?qm(n.ref)?n.refs.length>1?n.refs.forEach((e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(o)?!!o.find((t=>t===e.value)):o===e.value))):n.refs[0]&&(n.refs[0].checked=!!o):n.refs.forEach((e=>e.checked=e.value===o)):Og(n.ref)?n.ref.value="":(n.ref.value=o,n.ref.type||h.watch.next({name:e})))}(n.shouldDirty||n.shouldTouch)&&y(e,o,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&M(e)},A=(e,t,n)=>{for(const r in t){const o=t[r],s=`${e}.${r}`,a=tg(i,s);!l.array.has(e)&&Yg(o)&&(!a||a._f)||Km(o)?C(s,o,n):A(s,o,n)}},E=(e,t,n={})=>{const a=tg(i,e),c=l.array.has(e),u=Cg(t);Mg(s,e,u),c?(h.array.next({name:e,values:s}),(d.isDirty||d.dirtyFields)&&n.shouldDirty&&(r.dirtyFields=iv(o,s),h.state.next({name:e,dirtyFields:r.dirtyFields,isDirty:w(e,u)}))):!a||a._f||Jm(u)?C(e,u,n):A(e,u,n),Rg(e,l)&&h.state.next({}),h.watch.next({name:e})},T=async e=>{const o=e.target;let a=o.name;const c=tg(i,a);if(c){let S,w;const _=o.type?sv(c._f):Zm(e),C=e.type===ng||e.type===rg,A=!((v=c._f).mount&&(v.required||v.min||v.max||v.maxLength||v.minLength||v.pattern||v.validate)||n.resolver||tg(r.errors,a)||c._f.deps)||((e,t,n,r,i)=>!i.isOnAll&&(!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:!(n?r.isOnChange:i.isOnChange)||e))(C,tg(r.touchedFields,a),r.isSubmitted,f,p),E=Rg(a,l,C);Mg(s,a,_),C?(c._f.onBlur&&c._f.onBlur(e),t&&t(0)):c._f.onChange&&c._f.onChange(e);const T=y(a,_,C,!1),I=!vg(T)||E;if(!C&&h.watch.next({name:a,type:e.type}),A)return d.isValid&&g(),I&&h.state.next({name:a,...E?{}:T});if(!C&&E&&h.state.next({}),u[a]=u[a]?u[a]+1:1,h.state.next({isValidating:!0}),n.resolver){const{errors:e}=await x([a]),t=lv(r.errors,i,a),n=lv(e,i,t.name||a);S=n.error,a=n.name,w=vg(e)}else S=(await Wg(c,tg(s,a),m,n.shouldUseNativeValidation))[a],g();c._f.deps&&M(c._f.deps),b(a,w,S,T)}var v},M=async(e,t={})=>{let o,s;const a=bg(e);if(h.state.next({isValidating:!0}),n.resolver){const t=await(async e=>{const{errors:t}=await x();if(e)for(const n of e){const e=tg(t,n);e?Mg(r.errors,n,e):Jg(r.errors,n)}else r.errors=t;return t})(eg(e)?e:a);o=vg(t),s=e?!a.some((e=>tg(t,e))):o}else e?(s=(await Promise.all(a.map((async e=>{const t=tg(i,e);return await S(t&&t._f?{[e]:t}:t)})))).every(Boolean),(s||r.isValid)&&g()):s=o=await S(i);return h.state.next({...!Sg(e)||d.isValid&&o!==r.isValid?{}:{name:e},...n.resolver||!e?{isValid:o}:{},errors:r.errors,isValidating:!1}),t.shouldFocus&&!s&&Ig(i,(e=>e&&tg(r.errors,e)),e?a:l.mount),s},I=e=>{const t={...o,...a.mount?s:{}};return eg(e)?t:Sg(e)?tg(t,e):e.map((e=>tg(t,e)))},R=(e,t)=>({invalid:!!tg((t||r).errors,e),isDirty:!!tg((t||r).dirtyFields,e),isTouched:!!tg((t||r).touchedFields,e),error:tg((t||r).errors,e)}),P=(e,t={})=>{for(const a of e?bg(e):l.mount)l.mount.delete(a),l.array.delete(a),tg(i,a)&&(t.keepValue||(Jg(i,a),Jg(s,a)),!t.keepError&&Jg(r.errors,a),!t.keepDirty&&Jg(r.dirtyFields,a),!t.keepTouched&&Jg(r.touchedFields,a),!n.shouldUnregister&&!t.keepDefaultValue&&Jg(o,a));h.watch.next({}),h.state.next({...r,...t.keepDirty?{isDirty:w()}:{}}),!t.keepIsValid&&g()},k=(e,t={})=>{let r=tg(i,e);const c=kg(t.disabled);return Mg(i,e,{...r||{},_f:{...r&&r._f?r._f:{ref:{name:e}},name:e,mount:!0,...t}}),l.mount.add(e),r?c&&Mg(s,e,t.disabled?void 0:tg(s,e,sv(r._f))):v(e,!0,t.value),{...c?{disabled:t.disabled}:{},...n.shouldUseNativeValidation?{required:!!t.required,min:av(t.min),max:av(t.max),minLength:av(t.minLength),maxLength:av(t.maxLength),pattern:av(t.pattern)}:{},name:e,onChange:T,onBlur:T,ref:s=>{if(s){k(e,t),r=tg(i,e);const n=eg(s.value)&&s.querySelectorAll&&s.querySelectorAll("input,select,textarea")[0]||s,a=(e=>Dg(e)||qm(e))(n),l=r._f.refs||[];if(a?l.find((e=>e===n)):n===r._f.ref)return;Mg(i,e,{_f:{...r._f,...a?{refs:[...l.filter(ev),n,...Array.isArray(tg(o,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),v(e,!1,void 0,n)}else r=tg(i,e,{}),r._f&&(r._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!Xm(l.array,e)||!a.action)&&l.unMount.add(e)}}},O=()=>n.shouldFocusError&&Ig(i,(e=>e&&tg(r.errors,e)),l.mount);return{control:{register:k,unregister:P,getFieldState:R,_executeSchema:x,_focusError:O,_getWatch:_,_getDirty:w,_updateValid:g,_removeUnmounted:()=>{for(const e of l.unMount){const t=tg(i,e);t&&(t._f.refs?t._f.refs.every((e=>!ev(e))):!ev(t._f.ref))&&P(e)}l.unMount=new Set},_updateFieldArray:(e,t=[],n,l,c=!0,u=!0)=>{if(l&&n){if(a.action=!0,u&&Array.isArray(tg(i,e))){const t=n(tg(i,e),l.argA,l.argB);c&&Mg(i,e,t)}if(u&&Array.isArray(tg(r.errors,e))){const t=n(tg(r.errors,e),l.argA,l.argB);c&&Mg(r.errors,e,t),((e,t)=>{!$m(tg(e,t)).length&&Jg(e,t)})(r.errors,e)}if(d.touchedFields&&u&&Array.isArray(tg(r.touchedFields,e))){const t=n(tg(r.touchedFields,e),l.argA,l.argB);c&&Mg(r.touchedFields,e,t)}d.dirtyFields&&(r.dirtyFields=iv(o,s)),h.state.next({isDirty:w(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Mg(s,e,t)},_getFieldArray:t=>$m(tg(a.mount?s:o,t,e.shouldUnregister?tg(o,t,[]):[])),_subjects:h,_proxyFormState:d,get _fields(){return i},get _formValues(){return s},get _stateFlags(){return a},set _stateFlags(e){a=e},get _defaultValues(){return o},get _names(){return l},set _names(e){l=e},get _formState(){return r},set _formState(e){r=e},get _options(){return n},set _options(e){n={...n,...e}}},trigger:M,register:k,handleSubmit:(e,t)=>async o=>{o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let a=!0,l=Cg(s);h.state.next({isSubmitting:!0});try{if(n.resolver){const{errors:e,values:t}=await x();r.errors=e,l=t}else await S(i);vg(r.errors)?(h.state.next({errors:{},isSubmitting:!0}),await e(l,o)):(t&&await t({...r.errors},o),O())}catch(e){throw a=!1,e}finally{r.isSubmitted=!0,h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:vg(r.errors)&&a,submitCount:r.submitCount+1,errors:r.errors})}},watch:(e,t)=>Ng(e)?h.watch.subscribe({next:n=>e(_(void 0,t),n)}):_(e,t,!0),setValue:E,getValues:I,reset:(t,n)=>((t,n={})=>{const c=t||o,u=Cg(c),p=t&&!vg(t)?u:o;if(n.keepDefaultValues||(o=c),!n.keepValues){if(n.keepDirtyValues)for(const e of l.mount)tg(r.dirtyFields,e)?Mg(p,e,tg(s,e)):E(e,tg(p,e));else{if(_g&&eg(t))for(const e of l.mount){const t=tg(i,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(Xg(e)){const t=e.closest("form");if(t){t.reset();break}}}}i={}}s=e.shouldUnregister?n.keepDefaultValues?Cg(o):{}:u,h.array.next({values:p}),h.watch.next({values:p})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!d.isValid||!!n.keepIsValid,a.watch=!!e.shouldUnregister,h.state.next({submitCount:n.keepSubmitCount?r.submitCount:0,isDirty:n.keepDirty||n.keepDirtyValues?r.isDirty:!(!n.keepDefaultValues||Zg(t,o)),isSubmitted:!!n.keepIsSubmitted&&r.isSubmitted,dirtyFields:n.keepDirty||n.keepDirtyValues?r.dirtyFields:n.keepDefaultValues&&t?iv(o,t):{},touchedFields:n.keepTouched?r.touchedFields:{},errors:n.keepErrors?r.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})})(Ng(t)?t(s):t,n),resetField:(e,t={})=>{tg(i,e)&&(eg(t.defaultValue)?E(e,tg(o,e)):(E(e,t.defaultValue),Mg(o,e,t.defaultValue)),t.keepTouched||Jg(r.touchedFields,e),t.keepDirty||(Jg(r.dirtyFields,e),r.isDirty=t.defaultValue?w(e,tg(o,e)):w()),t.keepError||(Jg(r.errors,e),d.isValid&&g()),h.state.next({...r}))},clearErrors:e=>{e?bg(e).forEach((e=>Jg(r.errors,e))):r.errors={},h.state.next({errors:r.errors})},unregister:P,setError:(e,t,n)=>{const o=(tg(i,e,{_f:{}})._f||{}).ref;Mg(r.errors,e,{...t,ref:o}),h.state.next({name:e,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&o&&o.focus&&o.focus()},setFocus:(e,t={})=>{const n=tg(i,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&(e.focus(),t.shouldSelect&&e.select())}},getFieldState:R}}function dv(e={}){const n=t(c).useRef(),[r,i]=t(c).useState({isDirty:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:e.defaultValues});n.current||(n.current={...uv(e),formState:r});const o=n.current.control;return o._options=e,xg({subject:o._subjects.state,callback:t(c).useCallback((e=>{yg(e,o._proxyFormState,!0)&&(o._formState={...o._formState,...e},i({...o._formState}))}),[o])}),t(c).useEffect((()=>{o._stateFlags.mount||(o._proxyFormState.isValid&&o._updateValid(),o._stateFlags.mount=!0),o._stateFlags.watch&&(o._stateFlags.watch=!1,o._subjects.state.next({})),o._removeUnmounted()})),t(c).useEffect((()=>{r.submitCount&&o._focusError()}),[o,r.submitCount]),n.current.formState=gg(r,o),n.current}var hv=({className:e,title:t})=>(0,s.jsxs)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:[(0,s.jsx)("path",{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}),(0,s.jsx)("path",{d:"M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z"})]});var pv=({pwdOrTokens:e,setPwdOrTokens:t,onFinish:n,minimumNumberOfRecoveryTokens:r=1,showTokens:i=!0,openModal:o=!1,withModal:a=!1})=>{var l;const{t:u}=Se(),{register:d,handleSubmit:h,formState:{errors:p},setError:f}=dv(),[m,g]=(0,c.useState)(1),[v,y]=(0,c.useState)(!!e),b=(0,s.jsxs)("form",{name:"memoriAuth",onSubmit:h((t=>{var i,o,s;"password"===e&&!(null===(i=t.password)||void 0===i?void 0:i.length)||"tokens"===e&&(((null===(o=null==t?void 0:t.tokens)||void 0===o?void 0:o.length)||0)<r||!(null===(s=null==t?void 0:t.tokens)||void 0===s?void 0:s.every((e=>e.length))))?f("tokens",{type:"minLength",message:"Tokens"}):n&&n(t).then((()=>{y(!1)}))})),className:"memori-auth-widget--form",children:[("password"===e||!i)&&(0,s.jsxs)("fieldset",{className:"memori-auth-widget--password-fieldset",children:[(0,s.jsxs)("label",{children:["Password:"," ",(0,s.jsx)("input",{className:"memori-auth-widget--input",required:!0,type:"password",placeholder:"Password",...d("password",{required:!0})})]}),i&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("hr",{}),(0,s.jsx)(Sf,{outlined:!0,onClick:()=>t("tokens"),children:u("auth.useRecoveryTokens")||"Recovery tokens"})]})]}),"tokens"===e&&i&&(0,s.jsxs)("fieldset",{className:"memori-auth-widget--tokens-fieldset",name:"tokens",children:[(0,s.jsxs)("legend",{children:[u("auth.tokens"),": "]}),(x=m,Array.from({length:x},((e,t)=>t))).map((e=>(0,s.jsx)("label",{className:"memori-auth-widget--token",children:(0,s.jsx)("input",{type:"password",className:"memori-auth-widget--input",placeholder:"Recovery token",required:!0,autoComplete:"off",...d(`tokens.${e}`,{required:!0})})},e))),(0,s.jsx)(Sf,{onClick:()=>g((e=>e+1)),className:"memori-auth-widget--token-add",icon:(0,s.jsx)(hv,{}),children:u("auth.addToken")||"Add token"}),(0,s.jsx)("hr",{}),(0,s.jsx)(Sf,{outlined:!0,onClick:()=>t("password"),children:u("auth.usePassword")||"Password"})]}),"minLength"===(null===(l=p.tokens)||void 0===l?void 0:l.type)&&(0,s.jsxs)("div",{className:"memori-auth-widget--error",children:[u("auth.atLeast")||"At least"," ",r]}),(0,s.jsx)(Sf,{htmlType:"submit",primary:!0,className:"memori-auth-widget--submit",children:u("confirm")||"Submit"})]});var x;return a?(0,s.jsx)(Wm,{open:o||v,title:u("auth.title")||"Authentication",onClose:()=>t(null),closable:!1,children:b}):b};c=o("85Hg2");const fv=({type:e,resourceURI:t,sessionID:n,baseURL:r="",apiURL:i=""})=>{let o="cover"===e?`${r}/images/memoriCover.png`:`${r}/images/memoriAvatar.png?v=20231208`;try{return t&&0!==t.length?t.includes("memoriai/memory")&&!t.includes("memori-ai-session-id")&&n?`${t}?memori-ai-session-id=${n}`:(t.startsWith("https://")||t.startsWith("http://"))&&(new URL(t).hostname.includes("memori.ai")||new URL(t).hostname.includes("aclambda.online")||new URL(t).hostname.includes("localhost"))?`${t}${t.endsWith("/")||!n?"":"/"}${n||""}`:t.startsWith("cloud://")?`${(null==i?void 0:i.replace(/v2/,"v1"))||""}/CloudAsset/${t.replace("cloud://","")}`:t.startsWith("guid://")?`${(null==i?void 0:i.replace(/v2/,"v1"))||""}/GuidAsset/${t.replace("guid://","")}`:t||o:o}catch(e){return t||o}};c=o("85Hg2");var mv=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M858.5 763.6a374 374 0 0 0-80.6-119.5 375.63 375.63 0 0 0-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 0 0-80.6 119.5A371.7 371.7 0 0 0 136 901.8a8 8 0 0 0 8 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 0 0 8-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"})});var gv=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",className:e,"aria-label":t,children:(0,s.jsxs)("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",children:[(0,s.jsx)("path",{fillRule:"evenodd",d:"M0 4a4 4 0 014-4h16a4 4 0 014 4v16a4 4 0 01-4 4H4a4 4 0 01-4-4zm4-2.4A2.4 2.4 0 001.6 4v16A2.4 2.4 0 004 22.4h16a2.4 2.4 0 002.4-2.4V4A2.4 2.4 0 0020 1.6z",clipRule:"evenodd"}),(0,s.jsx)("path",{fillRule:"evenodd",d:"M9.715 8.442a.798.798 0 00-1.43 0l-3.2 6.4a.799.799 0 101.431.716l.579-1.158h3.811l.578 1.158a.8.8 0 001.431-.716zm.391 4.358L9 10.589 7.894 12.8z",clipRule:"evenodd"}),(0,s.jsx)("path",{fillRule:"evenodd",d:"M17 8c.552 0 1 .358 1 .8v6.4c0 .442-.448.8-1 .8s-1-.358-1-.8V8.8c0-.442.448-.8 1-.8z",clipRule:"evenodd"})]})});var vv=({content:e,className:n,align:r="right",disabled:i=!1,visible:o=!1,children:a})=>(0,s.jsxs)("div",{className:t(ws)("memori-tooltip",`memori-tooltip--align-${r}`,n,{"memori-tooltip--disabled":i,"memori-tooltip--visible":o}),children:[(0,s.jsx)("div",{className:"memori-tooltip--content",children:e}),(0,s.jsx)("div",{className:"memori-tooltip--trigger",children:a})]}),yv=(c=o("85Hg2"),c=o("85Hg2"),(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(yv||{})),bv=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(bv||{}),xv=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItem=5]="RegisterItem",e[e.UnregisterItem=6]="UnregisterItem",e))(xv||{});function Sv(e,t=(e=>e)){let n=null!==e.activeItemIndex?e.items[e.activeItemIndex]:null,r=Cp(t(e.items.slice()),(e=>e.dataRef.current.domRef.current)),i=n?r.indexOf(n):null;return-1===i&&(i=null),{items:r,activeItemIndex:i}}let wv={1:e=>1===e.menuState?e:{...e,activeItemIndex:null,menuState:1},0:e=>0===e.menuState?e:{...e,menuState:0},2:(e,t)=>{var n;let r=Sv(e),i=pm(t,{resolveItems:()=>r.items,resolveActiveIndex:()=>r.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeItemIndex:i,activationTrigger:null!=(n=t.trigger)?n:1}},3:(e,t)=>{let n=""!==e.searchQuery?0:1,r=e.searchQuery+t.value.toLowerCase(),i=(null!==e.activeItemIndex?e.items.slice(e.activeItemIndex+n).concat(e.items.slice(0,e.activeItemIndex+n)):e.items).find((e=>{var t;return(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(r))&&!e.dataRef.current.disabled})),o=i?e.items.indexOf(i):-1;return-1===o||o===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:o,activationTrigger:1}},4:e=>""===e.searchQuery?e:{...e,searchQuery:"",searchActiveItemIndex:null},5:(e,t)=>{let n=Sv(e,(e=>[...e,{id:t.id,dataRef:t.dataRef}]));return{...e,...n}},6:(e,t)=>{let n=Sv(e,(e=>{let n=e.findIndex((e=>e.id===t.id));return-1!==n&&e.splice(n,1),e}));return{...e,...n,activationTrigger:1}}},_v=(0,c.createContext)(null);function Cv(e){let t=(0,c.useContext)(_v);if(null===t){let t=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Cv),t}return t}function Av(e,t){return lh(t.type,wv,e,t)}_v.displayName="MenuContext";let Ev=c.Fragment,Tv=mh((function(e,n){let r=(0,c.useReducer)(Av,{menuState:1,buttonRef:(0,c.createRef)(),itemsRef:(0,c.createRef)(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:i,itemsRef:o,buttonRef:s},a]=r,l=Ph(n);rf([s,o],((e,t)=>{var n;a({type:1}),xp(t,bp.Loose)||(e.preventDefault(),null==(n=s.current)||n.focus())}),0===i);let u=Mh((()=>{a({type:1})})),d=(0,c.useMemo)((()=>({open:0===i,close:u})),[i,u]),h=e,p={ref:l};return t(c).createElement(_v.Provider,{value:r},t(c).createElement(Sh,{value:lh(i,{0:bh.Open,1:bh.Closed})},hh({ourProps:p,theirProps:h,slot:d,defaultTag:Ev,name:"Menu"})))})),Mv=mh((function(e,t){var n;let[r,i]=Cv("Menu.Button"),o=Ph(r.buttonRef,t),s=`headlessui-menu-button-${cp()}`,a=Uh(),l=Mh((e=>{switch(e.key){case ip.Space:case ip.Enter:case ip.ArrowDown:e.preventDefault(),e.stopPropagation(),i({type:0}),a.nextFrame((()=>i({type:2,focus:hm.First})));break;case ip.ArrowUp:e.preventDefault(),e.stopPropagation(),i({type:0}),a.nextFrame((()=>i({type:2,focus:hm.Last})))}})),u=Mh((e=>{if(e.key===ip.Space)e.preventDefault()})),d=Mh((t=>{if(op(t.currentTarget))return t.preventDefault();e.disabled||(0===r.menuState?(i({type:1}),a.nextFrame((()=>{var e;return null==(e=r.buttonRef.current)?void 0:e.focus({preventScroll:!0})}))):(t.preventDefault(),i({type:0})))})),h=(0,c.useMemo)((()=>({open:0===r.menuState})),[r]),p=e;return hh({ourProps:{ref:o,id:s,type:um(e,r.buttonRef),"aria-haspopup":!0,"aria-controls":null==(n=r.itemsRef.current)?void 0:n.id,"aria-expanded":e.disabled?void 0:0===r.menuState,onKeyDown:l,onKeyUp:u,onClick:d},theirProps:p,slot:h,defaultTag:"button",name:"Menu.Button"})})),Iv=uh.RenderStrategy|uh.Static,Rv=mh((function(e,t){var n,r;let[i,o]=Cv("Menu.Items"),s=Ph(i.itemsRef,t),a=Rp(i.itemsRef),l=`headlessui-menu-items-${cp()}`,u=Uh(),d=xh(),h=null!==d?d===bh.Open:0===i.menuState;(0,c.useEffect)((()=>{let e=i.itemsRef.current;!e||0===i.menuState&&e!==(null==a?void 0:a.activeElement)&&e.focus({preventScroll:!0})}),[i.menuState,i.itemsRef,a]),dm({container:i.itemsRef.current,enabled:0===i.menuState,accept:e=>"menuitem"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let p=Mh((e=>{var t,n;switch(u.dispose(),e.key){case ip.Space:if(""!==i.searchQuery)return e.preventDefault(),e.stopPropagation(),o({type:3,value:e.key});case ip.Enter:if(e.preventDefault(),e.stopPropagation(),o({type:1}),null!==i.activeItemIndex){let{dataRef:e}=i.items[i.activeItemIndex];null==(n=null==(t=e.current)?void 0:t.domRef.current)||n.click()}Sp(i.buttonRef.current);break;case ip.ArrowDown:return e.preventDefault(),e.stopPropagation(),o({type:2,focus:hm.Next});case ip.ArrowUp:return e.preventDefault(),e.stopPropagation(),o({type:2,focus:hm.Previous});case ip.Home:case ip.PageUp:return e.preventDefault(),e.stopPropagation(),o({type:2,focus:hm.First});case ip.End:case ip.PageDown:return e.preventDefault(),e.stopPropagation(),o({type:2,focus:hm.Last});case ip.Escape:e.preventDefault(),e.stopPropagation(),o({type:1}),Nh().nextFrame((()=>{var e;return null==(e=i.buttonRef.current)?void 0:e.focus({preventScroll:!0})}));break;case ip.Tab:e.preventDefault(),e.stopPropagation(),o({type:1}),Nh().nextFrame((()=>{Ap(i.buttonRef.current,e.shiftKey?mp.Previous:mp.Next)}));break;default:1===e.key.length&&(o({type:3,value:e.key}),u.setTimeout((()=>o({type:4})),350))}})),f=Mh((e=>{if(e.key===ip.Space)e.preventDefault()})),m=(0,c.useMemo)((()=>({open:0===i.menuState})),[i]),g=e;return hh({ourProps:{"aria-activedescendant":null===i.activeItemIndex||null==(n=i.items[i.activeItemIndex])?void 0:n.id,"aria-labelledby":null==(r=i.buttonRef.current)?void 0:r.id,id:l,onKeyDown:p,onKeyUp:f,role:"menu",tabIndex:0,ref:s},theirProps:g,slot:m,defaultTag:"div",features:Iv,visible:h,name:"Menu.Items"})})),Pv=c.Fragment,kv=mh((function(e,t){let{disabled:n=!1,...r}=e,[i,o]=Cv("Menu.Item"),s=`headlessui-menu-item-${cp()}`,a=null!==i.activeItemIndex&&i.items[i.activeItemIndex].id===s,l=(0,c.useRef)(null),u=Ph(t,l);_h((()=>{if(0!==i.menuState||!a||0===i.activationTrigger)return;let e=Nh();return e.requestAnimationFrame((()=>{var e,t;null==(t=null==(e=l.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})),e.dispose}),[l,a,i.menuState,i.activationTrigger,i.activeItemIndex]);let d=(0,c.useRef)({disabled:n,domRef:l});_h((()=>{d.current.disabled=n}),[d,n]),_h((()=>{var e,t;d.current.textValue=null==(t=null==(e=l.current)?void 0:e.textContent)?void 0:t.toLowerCase()}),[d,l]),_h((()=>(o({type:5,id:s,dataRef:d}),()=>o({type:6,id:s}))),[d,s]);let h=Mh((()=>{o({type:1})})),p=Mh((e=>{if(n)return e.preventDefault();o({type:1}),Sp(i.buttonRef.current)})),f=Mh((()=>{if(n)return o({type:2,focus:hm.Nothing});o({type:2,focus:hm.Specific,id:s})})),m=Mh((()=>{n||a||o({type:2,focus:hm.Specific,id:s,trigger:0})})),g=Mh((()=>{n||!a||o({type:2,focus:hm.Nothing})})),v=(0,c.useMemo)((()=>({active:a,disabled:n,close:h})),[a,n,h]);return hh({ourProps:{id:s,ref:u,role:"menuitem",tabIndex:!0===n?void 0:-1,"aria-disabled":!0===n||void 0,disabled:void 0,onClick:p,onFocus:f,onPointerMove:m,onMouseMove:m,onPointerLeave:g,onMouseLeave:g},theirProps:r,slot:v,defaultTag:Pv,name:"Menu.Item"})})),Ov=Object.assign(Tv,{Button:Mv,Items:Rv,Item:kv});var Nv=({className:e,title:t})=>(0,s.jsxs)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:e,"aria-label":t,children:[(0,s.jsx)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),(0,s.jsx)("path",{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H5.17l-.59.59-.58.58V4h16v12zm-9-4h2v2h-2zm0-6h2v4h-2z"})]});const Lv={"it-IT":"Non è quello che ti ho chiesto","fr-FR":"Ce n'est pas ce que je t'ai demandé","en-GB":"It's not what I asked"},Dv={"it-IT":"La risposta non era corretta","fr-FR":"La réponse n'était pas correcte","en-GB":"The answer was not correct"},Bv={"it-IT":"Non mi è piaciuta la risposta","fr-FR":"Je n'ai pas aimé la réponse","en-GB":"I didn't like the answer"};var zv=({memori:e,className:n,onNegativeClick:r,toggle:i=!1,dropdown:o=!1})=>{const[a,l]=(0,c.useState)(),u="it-IT"===e.culture?"it-IT":"fr-FR"===e.culture?"fr-FR":"en-GB",d=Lv[u],h=Dv[u],p=Bv[u];return(0,s.jsx)("div",{className:"memori-chat--feedback"+(n?` ${n}`:""),children:o?(0,s.jsxs)(Ov,{as:"div",className:"memori-chat--feedback-menu",children:[(0,s.jsx)(Ov.Button,{as:t(c).Fragment,children:(0,s.jsx)(Sf,{ghost:!0,shape:"circle",title:"Feedback",className:"memori-chat--feedback-menu-button",disabled:!!a,icon:(0,s.jsx)(Nv,{className:a?"memori-chat--feedback-clicked":void 0})})}),(0,s.jsx)(np,{as:t(c).Fragment,enter:"transition ease-out duration-200",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:(0,s.jsx)(Ov.Items,{className:"memori-chat--feedback-menu-items",children:(0,s.jsxs)("div",{className:"memori-chat--feedback-menu-items-container",children:[(0,s.jsx)(Ov.Item,{children:({active:e})=>(0,s.jsx)("button",{className:"memori-chat--feedback-menu-item"+(e?" memori-chat--feedback-menu-item-active":""),onClick:()=>{l("up"===a&&i?void 0:"up")},children:p})},"ok"),(0,s.jsx)(Ov.Item,{children:({active:e})=>(0,s.jsx)("button",{className:"memori-chat--feedback-menu-item"+(e?" memori-chat--feedback-menu-item-active":""),onClick:()=>{l("down"===a&&i?void 0:"down"),r(d)},children:h})},"no")]})})})]}):(0,s.jsx)(vv,{align:"left",content:"Feedback",children:(0,s.jsx)(Sf,{title:"Feedback",onClick:()=>{l("down"===a&&i?void 0:"down"),r(d)},ghost:!0,shape:"circle",icon:(0,s.jsx)(Nv,{className:a?"memori-chat--feedback-clicked":void 0})})})})},Fv={};!function(e){"use strict";function t(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function n(t){e.defaults=t}e.defaults=t();const r=/[&<>"']/,i=new RegExp(r.source,"g"),o=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,s=new RegExp(o.source,"g"),a={"&":"&","<":"<",">":">",'"':""","'":"'"},l=e=>a[e];function c(e,t){if(t){if(r.test(e))return e.replace(i,l)}else if(o.test(e))return e.replace(s,l);return e}const u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function d(e){return e.replace(u,((e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const h=/(^|[^\[])\^/g;function p(e,t){let n="string"==typeof e?e:e.source;t=t||"";const r={replace:(e,t)=>{let i="string"==typeof t?t:t.source;return i=i.replace(h,"$1"),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}function f(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return null}return e}const m={exec:()=>null};function g(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let r=!1,i=t;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n}function v(e,t,n){const r=e.length;if(0===r)return"";let i=0;for(;i<r;){const o=e.charAt(r-i-1);if(o!==t||n){if(o===t||!n)break;i++}else i++}return e.slice(0,r-i)}function y(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r<e.length;r++)if("\\"===e[r])r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return-1}function b(e,t,n,r){const i=t.href,o=t.title?c(t.title):null,s=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;const e={type:"link",raw:n,href:i,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,e}return{type:"image",raw:n,href:i,title:o,text:c(s)}}function x(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}class S{options;rules;lexer;constructor(t){this.options=t||e.defaults}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:v(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=x(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=v(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const e=v(t[0].replace(/^ *>[ \t]?/gm,""),"\n"),n=this.lexer.state.top;this.lexer.state.top=!0;const r=this.lexer.blockTokens(e);return this.lexer.state.top=n,{type:"blockquote",raw:t[0],tokens:r,text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const o=new RegExp(`^( {0,3}${n})((?:[\t ][^\\n]*)?(?:\\n|$))`);let s="",a="",l=!1;for(;e;){let n=!1;if(!(t=o.exec(e)))break;if(this.rules.block.hr.test(e))break;s=t[0],e=e.substring(s.length);let r=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),c=e.split("\n",1)[0],u=0;this.options.pedantic?(u=2,a=r.trimStart()):(u=t[2].search(/[^ ]/),u=u>4?1:u,a=r.slice(u),u+=t[1].length);let d=!1;if(!r&&/^ *$/.test(c)&&(s+=c+"\n",e=e.substring(c.length+1),n=!0),!n){const t=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),n=new RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),i=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),o=new RegExp(`^ {0,${Math.min(3,u-1)}}#`);for(;e;){const l=e.split("\n",1)[0];if(c=l,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),i.test(c))break;if(o.test(c))break;if(t.test(c))break;if(n.test(e))break;if(c.search(/[^ ]/)>=u||!c.trim())a+="\n"+c.slice(u);else{if(d)break;if(r.search(/[^ ]/)>=4)break;if(i.test(r))break;if(o.test(r))break;if(n.test(r))break;a+="\n"+c}d||c.trim()||(d=!0),s+=l+"\n",e=e.substring(l.length+1),r=c.slice(u)}}i.loose||(l?i.loose=!0:/\n *\n *$/.test(s)&&(l=!0));let h,p=null;this.options.gfm&&(p=/^\[[ xX]\] /.exec(a),p&&(h="[ ] "!==p[0],a=a.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:s,task:!!p,checked:h,loose:!1,text:a,tokens:[]}),i.raw+=s}i.items[i.items.length-1].raw=s.trimEnd(),i.items[i.items.length-1].text=a.trimEnd(),i.raw=i.raw.trimEnd();for(let e=0;e<i.items.length;e++)if(this.lexer.state.top=!1,i.items[e].tokens=this.lexer.blockTokens(i.items[e].text,[]),!i.loose){const t=i.items[e].tokens.filter((e=>"space"===e.type)),n=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));i.loose=n}if(i.loose)for(let e=0;e<i.items.length;e++)i.items[e].loose=!0;return i}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(/\s+/g," "),n=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const n=g(t[1]),r=t[2].replace(/^\||\| *$/g,"").split("|"),i=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const e of r)/^ *-+: *$/.test(e)?o.align.push("right"):/^ *:-+: *$/.test(e)?o.align.push("center"):/^ *:-+ *$/.test(e)?o.align.push("left"):o.align.push(null);for(const e of n)o.header.push({text:e,tokens:this.lexer.inline(e)});for(const e of i)o.rows.push(g(e,o.header.length).map((e=>({text:e,tokens:this.lexer.inline(e)}))));return o}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:c(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const t=v(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=y(t[2],"()");if(e>-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^</.test(n)&&(n=this.options.pedantic&&!/>$/.test(e)?n.slice(1):n.slice(1,-1)),b(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return b(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(r&&(!r[3]||!n.match(/[\p{L}\p{N}]/u))&&(!r[1]&&!r[2]||!n||this.rules.inline.punctuation.exec(n))){const n=[...r[0]].length-1;let i,o,s=n,a=0;const l="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=l.exec(t));){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(o=[...i].length,r[3]||r[4]){s+=o;continue}if((r[5]||r[6])&&n%3&&!((n+o)%3)){a+=o;continue}if(s-=o,s>0)continue;o=Math.min(o,o+s+a);const t=[...r[0]][0].length,l=e.slice(0,n+r.index+t+o);if(Math.min(n,o)%2){const e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}const c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=c(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=c(t[1]),n="mailto:"+e):(e=c(t[1]),n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=c(t[0]),n="mailto:"+e;else{let r;do{r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(r!==t[0]);e=c(t[0]),n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:c(t[0]),{type:"text",raw:t[0],text:e}}}}const w=/^(?: *(?:\n|$))+/,_=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,C=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,A=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,E=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,T=/(?:[*+-]|\d{1,9}[.)])/,M=p(/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,T).getRegex(),I=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,R=/^[^\n]+/,P=/(?!\s*\])(?:\\.|[^\[\]\\])+/,k=p(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",P).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),O=p(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,T).getRegex(),N="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[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",L=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,D=p("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",L).replace("tag",N).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),B=p(I).replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",N).getRegex(),z={blockquote:p(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",B).getRegex(),code:_,def:k,fences:C,heading:E,hr:A,html:D,lheading:M,list:O,newline:w,paragraph:B,table:m,text:R},F=p("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",N).getRegex(),U={...z,table:F,paragraph:p(I).replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",F).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",N).getRegex()},j={...z,html:p("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",L).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:m,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:p(I).replace("hr",A).replace("heading"," *#{1,6} *[^\n]").replace("lheading",M).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},H=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,V=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,G=/^( {2,}|\\)\n(?!\s*$)/,W=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,q="\\p{P}$+<=>`^|~",K=p(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,q).getRegex(),J=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,Q=p(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,q).getRegex(),Y=p("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,q).getRegex(),Z=p("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,q).getRegex(),X=p(/\\([punct])/,"gu").replace(/punct/g,q).getRegex(),$=p(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[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])?)+(?![-_])/).getRegex(),ee=p(L).replace("(?:--\x3e|$)","--\x3e").getRegex(),te=p("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",ee).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ne=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,re=p(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",ne).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ie=p(/^!?\[(label)\]\[(ref)\]/).replace("label",ne).replace("ref",P).getRegex(),oe=p(/^!?\[(ref)\](?:\[\])?/).replace("ref",P).getRegex(),se=p("reflink|nolink(?!\\()","g").replace("reflink",ie).replace("nolink",oe).getRegex(),ae={_backpedal:m,anyPunctuation:X,autolink:$,blockSkip:J,br:G,code:V,del:m,emStrongLDelim:Q,emStrongRDelimAst:Y,emStrongRDelimUnd:Z,escape:H,link:re,nolink:oe,punctuation:K,reflink:ie,reflinkSearch:se,tag:te,text:W,url:m},le={...ae,link:p(/^!?\[(label)\]\((.*?)\)/).replace("label",ne).getRegex(),reflink:p(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ne).getRegex()},ce={...ae,escape:p(H).replace("])","~|])").getRegex(),url:p(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},ue={...ce,br:p(G).replace("{2,}","*").getRegex(),text:p(ce.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},de={normal:z,gfm:U,pedantic:j},he={normal:ae,gfm:ce,breaks:ue,pedantic:le};class pe{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||e.defaults,this.options.tokenizer=this.options.tokenizer||new S,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={block:de.normal,inline:he.normal};this.options.pedantic?(n.block=de.pedantic,n.inline=he.pedantic):this.options.gfm&&(n.block=de.gfm,this.options.breaks?n.inline=he.breaks:n.inline=he.gfm),this.tokenizer.rules=n}static get rules(){return{block:de,inline:he}}static lex(e,t){return new pe(t).lex(e)}static lexInline(e,t){return new pe(t).inlineTokens(e)}lex(e){let t;for(e=e.replace(/\r\n|\r/g,"\n"),this.blockTokens(e,this.tokens);t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens}blockTokens(e,t=[]){let n,r,i,o;for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,((e,t,n)=>t+" ".repeat(n.length)));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?t.push(n):(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(r.raw+="\n"+n.raw,r.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else{if(i=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(i)))r=t[t.length-1],o&&"paragraph"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n),o=i.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,r,i,o,s,a,l=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(l));)e.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(l));)l=l.slice(0,o.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(s||(a=""),s=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,l,a))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e))){if(i=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(i))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(a=n.raw.slice(-1)),s=!0,r=t[t.length-1],r&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(n.raw.length),t.push(n);return t}}class fe{options;constructor(t){this.options=t||e.defaults}code(e,t,n){const r=(t||"").match(/^\S*/)?.[0];return e=e.replace(/\n$/,"")+"\n",r?'<pre><code class="language-'+c(r)+'">'+(n?e:c(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:c(e,!0))+"</code></pre>\n"}blockquote(e){return`<blockquote>\n${e}</blockquote>\n`}html(e,t){return e}heading(e,t,n){return`<h${t}>${e}</h${t}>\n`}hr(){return"<hr>\n"}list(e,t,n){const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"}listitem(e,t,n){return`<li>${e}</li>\n`}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(e){return`<p>${e}</p>\n`}table(e,t){return t&&(t=`<tbody>${t}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return`<tr>\n${e}</tr>\n`}tablecell(e,t){const n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>\n`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return"<br>"}del(e){return`<del>${e}</del>`}link(e,t,n){const r=f(e);if(null===r)return n;let i='<a href="'+(e=r)+'"';return t&&(i+=' title="'+t+'"'),i+=">"+n+"</a>",i}image(e,t,n){const r=f(e);if(null===r)return n;let i=`<img src="${e=r}" alt="${n}"`;return t&&(i+=` title="${t}"`),i+=">",i}text(e){return e}}class me{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class ge{options;renderer;textRenderer;constructor(t){this.options=t||e.defaults,this.options.renderer=this.options.renderer||new fe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new me}static parse(e,t){return new ge(t).parse(e)}static parseInline(e,t){return new ge(t).parseInline(e)}parse(e,t=!0){let n="";for(let r=0;r<e.length;r++){const i=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const e=i,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){n+=t||"";continue}}switch(i.type){case"space":continue;case"hr":n+=this.renderer.hr();continue;case"heading":{const e=i;n+=this.renderer.heading(this.parseInline(e.tokens),e.depth,d(this.parseInline(e.tokens,this.textRenderer)));continue}case"code":{const e=i;n+=this.renderer.code(e.text,e.lang,!!e.escaped);continue}case"table":{const e=i;let t="",r="";for(let t=0;t<e.header.length;t++)r+=this.renderer.tablecell(this.parseInline(e.header[t].tokens),{header:!0,align:e.align[t]});t+=this.renderer.tablerow(r);let o="";for(let t=0;t<e.rows.length;t++){const n=e.rows[t];r="";for(let t=0;t<n.length;t++)r+=this.renderer.tablecell(this.parseInline(n[t].tokens),{header:!1,align:e.align[t]});o+=this.renderer.tablerow(r)}n+=this.renderer.table(t,o);continue}case"blockquote":{const e=i,t=this.parse(e.tokens);n+=this.renderer.blockquote(t);continue}case"list":{const e=i,t=e.ordered,r=e.start,o=e.loose;let s="";for(let t=0;t<e.items.length;t++){const n=e.items[t],r=n.checked,i=n.task;let a="";if(n.task){const e=this.renderer.checkbox(!!r);o?n.tokens.length>0&&"paragraph"===n.tokens[0].type?(n.tokens[0].text=e+" "+n.tokens[0].text,n.tokens[0].tokens&&n.tokens[0].tokens.length>0&&"text"===n.tokens[0].tokens[0].type&&(n.tokens[0].tokens[0].text=e+" "+n.tokens[0].tokens[0].text)):n.tokens.unshift({type:"text",text:e+" "}):a+=e+" "}a+=this.parse(n.tokens,o),s+=this.renderer.listitem(a,i,!!r)}n+=this.renderer.list(s,t,r);continue}case"html":{const e=i;n+=this.renderer.html(e.text,e.block);continue}case"paragraph":{const e=i;n+=this.renderer.paragraph(this.parseInline(e.tokens));continue}case"text":{let o=i,s=o.tokens?this.parseInline(o.tokens):o.text;for(;r+1<e.length&&"text"===e[r+1].type;)o=e[++r],s+="\n"+(o.tokens?this.parseInline(o.tokens):o.text);n+=t?this.renderer.paragraph(s):s;continue}default:{const e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}parseInline(e,t){t=t||this.renderer;let n="";for(let r=0;r<e.length;r++){const i=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const e=this.options.extensions.renderers[i.type].call({parser:this},i);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){n+=e||"";continue}}switch(i.type){case"escape":{const e=i;n+=t.text(e.text);break}case"html":{const e=i;n+=t.html(e.text);break}case"link":{const e=i;n+=t.link(e.href,e.title,this.parseInline(e.tokens,t));break}case"image":{const e=i;n+=t.image(e.href,e.title,e.text);break}case"strong":{const e=i;n+=t.strong(this.parseInline(e.tokens,t));break}case"em":{const e=i;n+=t.em(this.parseInline(e.tokens,t));break}case"codespan":{const e=i;n+=t.codespan(e.text);break}case"br":n+=t.br();break;case"del":{const e=i;n+=t.del(this.parseInline(e.tokens,t));break}case"text":{const e=i;n+=t.text(e.text);break}default:{const e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}}class ve{options;constructor(t){this.options=t||e.defaults}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}}class ye{defaults=t();options=this.setOptions;parse=this.#e(pe.lex,ge.parse);parseInline=this.#e(pe.lexInline,ge.parseInline);Parser=ge;Renderer=fe;TextRenderer=me;Lexer=pe;Tokenizer=S;Hooks=ve;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{const e=r;for(const r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(const r of e.rows)for(const e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{const e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach((r=>{n=n.concat(this.walkTokens(e[r],t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{const n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){const t=this.defaults.renderer||new fe(this.defaults);for(const n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if("options"===n)continue;const r=n,i=e.renderer[r],o=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return!1===n&&(n=o.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new S(this.defaults);for(const n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const r=n,i=e.tokenizer[r],o=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return!1===n&&(n=o.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new ve;for(const n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if("options"===n)continue;const r=n,i=e.hooks[r],o=t[r];ve.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async)return Promise.resolve(i.call(t,e)).then((e=>o.call(t,e)));const n=i.call(t,e);return o.call(t,n)}:t[r]=(...e)=>{let n=i.apply(t,e);return!1===n&&(n=o.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return pe.lex(e,t??this.defaults)}parser(e,t){return ge.parse(e,t??this.defaults)}#e(e,t){return(n,r)=>{const i={...r},o={...this.defaults,...i};!0===this.defaults.async&&!1===i.async&&(o.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),o.async=!0);const s=this.#t(!!o.silent,!!o.async);if(null==n)return s(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof n)return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(o.hooks&&(o.hooks.options=o),o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(n):n).then((t=>e(t,o))).then((e=>o.hooks?o.hooks.processAllTokens(e):e)).then((e=>o.walkTokens?Promise.all(this.walkTokens(e,o.walkTokens)).then((()=>e)):e)).then((e=>t(e,o))).then((e=>o.hooks?o.hooks.postprocess(e):e)).catch(s);try{o.hooks&&(n=o.hooks.preprocess(n));let r=e(n,o);o.hooks&&(r=o.hooks.processAllTokens(r)),o.walkTokens&&this.walkTokens(r,o.walkTokens);let i=t(r,o);return o.hooks&&(i=o.hooks.postprocess(i)),i}catch(e){return s(e)}}}#t(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+c(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}}const be=new ye;function xe(e,t){return be.parse(e,t)}xe.options=xe.setOptions=function(e){return be.setOptions(e),xe.defaults=be.defaults,n(xe.defaults),xe},xe.getDefaults=t,xe.defaults=e.defaults,xe.use=function(...e){return be.use(...e),xe.defaults=be.defaults,n(xe.defaults),xe},xe.walkTokens=function(e,t){return be.walkTokens(e,t)},xe.parseInline=be.parseInline,xe.Parser=ge,xe.parser=ge.parse,xe.Renderer=fe,xe.TextRenderer=me,xe.Lexer=pe,xe.lexer=pe.lex,xe.Tokenizer=S,xe.Hooks=ve,xe.parse=xe;const Se=xe.options,we=xe.setOptions,_e=xe.use,Ce=xe.walkTokens,Ae=xe.parseInline,Ee=xe,Te=ge.parse,Me=pe.lex;e.Hooks=ve,e.Lexer=pe,e.Marked=ye,e.Parser=ge,e.Renderer=fe,e.TextRenderer=me,e.Tokenizer=S,e.getDefaults=t,e.lexer=Me,e.marked=xe,e.options=Se,e.parse=Ee,e.parseInline=Ae,e.parser=Te,e.setOptions=we,e.use=_e,e.walkTokens=Ce}(Fv);var Uv={};
|
|
239
|
-
/*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE */Uv=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:i}=Object;let{freeze:o,seal:s,create:a}=Object,{apply:l,construct:c}="undefined"!=typeof Reflect&&Reflect;o||(o=function(e){return e}),s||(s=function(e){return e}),l||(l=function(e,t,n){return e.apply(t,n)}),c||(c=function(e,t){return new e(...t)});const u=S(Array.prototype.forEach),d=S(Array.prototype.pop),h=S(Array.prototype.push),p=S(String.prototype.toLowerCase),f=S(String.prototype.toString),m=S(String.prototype.match),g=S(String.prototype.replace),v=S(String.prototype.indexOf),y=S(String.prototype.trim),b=S(RegExp.prototype.test),x=w(TypeError);function S(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return l(e,t,r)}}function w(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return c(e,n)}}function _(e,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p;t&&t(e,null);let o=r.length;for(;o--;){let t=r[o];if("string"==typeof t){const e=i(t);e!==t&&(n(r)||(r[o]=e),t=e)}e[t]=!0}return e}function C(t){const n=a(null);for(const[r,o]of e(t))void 0!==i(t,r)&&(n[r]=o);return n}function A(e,t){for(;null!==e;){const n=i(e,t);if(n){if(n.get)return S(n.get);if("function"==typeof n.value)return S(n.value)}e=r(e)}function n(e){return console.warn("fallback value for",e),null}return n}const E=o(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),T=o(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),M=o(["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"]),I=o(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),R=o(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),P=o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),k=o(["#text"]),O=o(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),N=o(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),L=o(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),D=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B=s(/\{\{[\w\W]*|[\w\W]*\}\}/gm),z=s(/<%[\w\W]*|[\w\W]*%>/gm),F=s(/\${[\w\W]*}/gm),U=s(/^data-[\-\w.\u00B7-\uFFFF]/),j=s(/^aria-[\-\w]+$/),H=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),V=s(/^(?:\w+script|data):/i),G=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),W=s(/^html$/i);var q=Object.freeze({__proto__:null,MUSTACHE_EXPR:B,ERB_EXPR:z,TMPLIT_EXPR:F,DATA_ATTR:U,ARIA_ATTR:j,IS_ALLOWED_URI:H,IS_SCRIPT_OR_DATA:V,ATTR_WHITESPACE:G,DOCTYPE_NAME:W});const K=function(){return"undefined"==typeof window?null:window},J=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function Q(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K();const n=e=>Q(e);if(n.version="3.0.6",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;let{document:r}=t;const i=r,s=i.currentScript,{DocumentFragment:l,HTMLTemplateElement:c,Node:S,Element:w,NodeFilter:B,NamedNodeMap:z=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:F,DOMParser:U,trustedTypes:j}=t,V=w.prototype,G=A(V,"cloneNode"),Y=A(V,"nextSibling"),Z=A(V,"childNodes"),X=A(V,"parentNode");if("function"==typeof c){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let $,ee="";const{implementation:te,createNodeIterator:ne,createDocumentFragment:re,getElementsByTagName:ie}=r,{importNode:oe}=i;let se={};n.isSupported="function"==typeof e&&"function"==typeof X&&te&&void 0!==te.createHTMLDocument;const{MUSTACHE_EXPR:ae,ERB_EXPR:le,TMPLIT_EXPR:ce,DATA_ATTR:ue,ARIA_ATTR:de,IS_SCRIPT_OR_DATA:he,ATTR_WHITESPACE:pe}=q;let{IS_ALLOWED_URI:fe}=q,me=null;const ge=_({},[...E,...T,...M,...R,...k]);let ve=null;const ye=_({},[...O,...N,...L,...D]);let be=Object.seal(a(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),xe=null,Se=null,we=!0,_e=!0,Ce=!1,Ae=!0,Ee=!1,Te=!1,Me=!1,Ie=!1,Re=!1,Pe=!1,ke=!1,Oe=!0,Ne=!1;const Le="user-content-";let De=!0,Be=!1,ze={},Fe=null;const Ue=_({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let je=null;const He=_({},["audio","video","img","source","image","track"]);let Ve=null;const Ge=_({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),We="http://www.w3.org/1998/Math/MathML",qe="http://www.w3.org/2000/svg",Ke="http://www.w3.org/1999/xhtml";let Je=Ke,Qe=!1,Ye=null;const Ze=_({},[We,qe,Ke],f);let Xe=null;const $e=["application/xhtml+xml","text/html"],et="text/html";let tt=null,nt=null;const rt=r.createElement("form"),it=function(e){return e instanceof RegExp||e instanceof Function},ot=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!nt||nt!==e){if(e&&"object"==typeof e||(e={}),e=C(e),Xe=Xe=-1===$e.indexOf(e.PARSER_MEDIA_TYPE)?et:e.PARSER_MEDIA_TYPE,tt="application/xhtml+xml"===Xe?f:p,me="ALLOWED_TAGS"in e?_({},e.ALLOWED_TAGS,tt):ge,ve="ALLOWED_ATTR"in e?_({},e.ALLOWED_ATTR,tt):ye,Ye="ALLOWED_NAMESPACES"in e?_({},e.ALLOWED_NAMESPACES,f):Ze,Ve="ADD_URI_SAFE_ATTR"in e?_(C(Ge),e.ADD_URI_SAFE_ATTR,tt):Ge,je="ADD_DATA_URI_TAGS"in e?_(C(He),e.ADD_DATA_URI_TAGS,tt):He,Fe="FORBID_CONTENTS"in e?_({},e.FORBID_CONTENTS,tt):Ue,xe="FORBID_TAGS"in e?_({},e.FORBID_TAGS,tt):{},Se="FORBID_ATTR"in e?_({},e.FORBID_ATTR,tt):{},ze="USE_PROFILES"in e&&e.USE_PROFILES,we=!1!==e.ALLOW_ARIA_ATTR,_e=!1!==e.ALLOW_DATA_ATTR,Ce=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ae=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ee=e.SAFE_FOR_TEMPLATES||!1,Te=e.WHOLE_DOCUMENT||!1,Re=e.RETURN_DOM||!1,Pe=e.RETURN_DOM_FRAGMENT||!1,ke=e.RETURN_TRUSTED_TYPE||!1,Ie=e.FORCE_BODY||!1,Oe=!1!==e.SANITIZE_DOM,Ne=e.SANITIZE_NAMED_PROPS||!1,De=!1!==e.KEEP_CONTENT,Be=e.IN_PLACE||!1,fe=e.ALLOWED_URI_REGEXP||H,Je=e.NAMESPACE||Ke,be=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&it(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(be.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&it(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(be.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(be.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ee&&(_e=!1),Pe&&(Re=!0),ze&&(me=_({},[...k]),ve=[],!0===ze.html&&(_(me,E),_(ve,O)),!0===ze.svg&&(_(me,T),_(ve,N),_(ve,D)),!0===ze.svgFilters&&(_(me,M),_(ve,N),_(ve,D)),!0===ze.mathMl&&(_(me,R),_(ve,L),_(ve,D))),e.ADD_TAGS&&(me===ge&&(me=C(me)),_(me,e.ADD_TAGS,tt)),e.ADD_ATTR&&(ve===ye&&(ve=C(ve)),_(ve,e.ADD_ATTR,tt)),e.ADD_URI_SAFE_ATTR&&_(Ve,e.ADD_URI_SAFE_ATTR,tt),e.FORBID_CONTENTS&&(Fe===Ue&&(Fe=C(Fe)),_(Fe,e.FORBID_CONTENTS,tt)),De&&(me["#text"]=!0),Te&&_(me,["html","head","body"]),me.table&&(_(me,["tbody"]),delete xe.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw x('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw x('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');$=e.TRUSTED_TYPES_POLICY,ee=$.createHTML("")}else void 0===$&&($=J(j,s)),null!==$&&"string"==typeof ee&&(ee=$.createHTML(""));o&&o(e),nt=e}},st=_({},["mi","mo","mn","ms","mtext"]),at=_({},["foreignobject","desc","title","annotation-xml"]),lt=_({},["title","style","font","a","script"]),ct=_({},T);_(ct,M),_(ct,I);const ut=_({},R);_(ut,P);const dt=function(e){let t=X(e);t&&t.tagName||(t={namespaceURI:Je,tagName:"template"});const n=p(e.tagName),r=p(t.tagName);return!!Ye[e.namespaceURI]&&(e.namespaceURI===qe?t.namespaceURI===Ke?"svg"===n:t.namespaceURI===We?"svg"===n&&("annotation-xml"===r||st[r]):Boolean(ct[n]):e.namespaceURI===We?t.namespaceURI===Ke?"math"===n:t.namespaceURI===qe?"math"===n&&at[r]:Boolean(ut[n]):e.namespaceURI===Ke?!(t.namespaceURI===qe&&!at[r])&&!(t.namespaceURI===We&&!st[r])&&!ut[n]&&(lt[n]||!ct[n]):!("application/xhtml+xml"!==Xe||!Ye[e.namespaceURI]))},ht=function(e){h(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},pt=function(e,t){try{h(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){h(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ve[e])if(Re||Pe)try{ht(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},ft=function(e){let t=null,n=null;if(Ie)e="<remove></remove>"+e;else{const t=m(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Xe&&Je===Ke&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const i=$?$.createHTML(e):e;if(Je===Ke)try{t=(new U).parseFromString(i,Xe)}catch(e){}if(!t||!t.documentElement){t=te.createDocument(Je,"template",null);try{t.documentElement.innerHTML=Qe?ee:i}catch(e){}}const o=t.body||t.documentElement;return e&&n&&o.insertBefore(r.createTextNode(n),o.childNodes[0]||null),Je===Ke?ie.call(t,Te?"html":"body")[0]:Te?t.documentElement:o},mt=function(e){return ne.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT,null)},gt=function(e){return e instanceof F&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof z)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},vt=function(e){return"function"==typeof S&&e instanceof S},yt=function(e,t,r){se[e]&&u(se[e],(e=>{e.call(n,t,r,nt)}))},bt=function(e){let t=null;if(yt("beforeSanitizeElements",e,null),gt(e))return ht(e),!0;const r=tt(e.nodeName);if(yt("uponSanitizeElement",e,{tagName:r,allowedTags:me}),e.hasChildNodes()&&!vt(e.firstElementChild)&&b(/<[/\w]/g,e.innerHTML)&&b(/<[/\w]/g,e.textContent))return ht(e),!0;if(!me[r]||xe[r]){if(!xe[r]&&St(r)){if(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,r))return!1;if(be.tagNameCheck instanceof Function&&be.tagNameCheck(r))return!1}if(De&&!Fe[r]){const t=X(e)||e.parentNode,n=Z(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(G(n[r],!0),Y(e))}return ht(e),!0}return e instanceof w&&!dt(e)?(ht(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!b(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ee&&3===e.nodeType&&(t=e.textContent,u([ae,le,ce],(e=>{t=g(t,e," ")})),e.textContent!==t&&(h(n.removed,{element:e.cloneNode()}),e.textContent=t)),yt("afterSanitizeElements",e,null),!1):(ht(e),!0)},xt=function(e,t,n){if(Oe&&("id"===t||"name"===t)&&(n in r||n in rt))return!1;if(_e&&!Se[t]&&b(ue,t));else if(we&&b(de,t));else if(!ve[t]||Se[t]){if(!(St(e)&&(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,e)||be.tagNameCheck instanceof Function&&be.tagNameCheck(e))&&(be.attributeNameCheck instanceof RegExp&&b(be.attributeNameCheck,t)||be.attributeNameCheck instanceof Function&&be.attributeNameCheck(t))||"is"===t&&be.allowCustomizedBuiltInElements&&(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,n)||be.tagNameCheck instanceof Function&&be.tagNameCheck(n))))return!1}else if(Ve[t]);else if(b(fe,g(n,pe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==v(n,"data:")||!je[e])if(Ce&&!b(he,g(n,pe,"")));else if(n)return!1;return!0},St=function(e){return e.indexOf("-")>0},wt=function(e){yt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ve};let i=t.length;for(;i--;){const o=t[i],{name:s,namespaceURI:a,value:l}=o,c=tt(s);let h="value"===s?l:y(l);if(r.attrName=c,r.attrValue=h,r.keepAttr=!0,r.forceKeepAttr=void 0,yt("uponSanitizeAttribute",e,r),h=r.attrValue,r.forceKeepAttr)continue;if(pt(s,e),!r.keepAttr)continue;if(!Ae&&b(/\/>/i,h)){pt(s,e);continue}Ee&&u([ae,le,ce],(e=>{h=g(h,e," ")}));const p=tt(e.nodeName);if(xt(p,c,h)){if(!Ne||"id"!==c&&"name"!==c||(pt(s,e),h=Le+h),$&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(a);else switch(j.getAttributeType(p,c)){case"TrustedHTML":h=$.createHTML(h);break;case"TrustedScriptURL":h=$.createScriptURL(h)}try{a?e.setAttributeNS(a,s,h):e.setAttribute(s,h),d(n.removed)}catch(e){}}}yt("afterSanitizeAttributes",e,null)},_t=function e(t){let n=null;const r=mt(t);for(yt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)yt("uponSanitizeShadowNode",n,null),bt(n)||(n.content instanceof l&&e(n.content),wt(n));yt("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,o=null,s=null,a=null;if(Qe=!e,Qe&&(e="\x3c!--\x3e"),"string"!=typeof e&&!vt(e)){if("function"!=typeof e.toString)throw x("toString is not a function");if("string"!=typeof(e=e.toString()))throw x("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Me||ot(t),n.removed=[],"string"==typeof e&&(Be=!1),Be){if(e.nodeName){const t=tt(e.nodeName);if(!me[t]||xe[t])throw x("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof S)r=ft("\x3c!----\x3e"),o=r.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?r=o:r.appendChild(o);else{if(!Re&&!Ee&&!Te&&-1===e.indexOf("<"))return $&&ke?$.createHTML(e):e;if(r=ft(e),!r)return Re?null:ke?ee:""}r&&Ie&&ht(r.firstChild);const c=mt(Be?e:r);for(;s=c.nextNode();)bt(s)||(s.content instanceof l&&_t(s.content),wt(s));if(Be)return e;if(Re){if(Pe)for(a=re.call(r.ownerDocument);r.firstChild;)a.appendChild(r.firstChild);else a=r;return(ve.shadowroot||ve.shadowrootmode)&&(a=oe.call(i,a,!0)),a}let d=Te?r.outerHTML:r.innerHTML;return Te&&me["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&b(W,r.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+d),Ee&&u([ae,le,ce],(e=>{d=g(d,e," ")})),$&&ke?$.createHTML(d):d},n.setConfig=function(){ot(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Me=!0},n.clearConfig=function(){nt=null,Me=!1},n.isValidAttribute=function(e,t,n){nt||ot({});const r=tt(e),i=tt(t);return xt(r,i,n)},n.addHook=function(e,t){"function"==typeof t&&(se[e]=se[e]||[],h(se[e],t))},n.removeHook=function(e){if(se[e])return d(se[e])},n.removeHooks=function(e){se[e]&&(se[e]=[])},n.removeAllHooks=function(){se={}},n}return Q()}();var jv=({className:e,title:t})=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",viewBox:"0 0 24 24",className:e,"aria-label":t,children:[(0,s.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,s.jsx)("path",{d:"M9.09 9a3 3 0 015.83 1c0 2-3 3-3 3"}),(0,s.jsx)("path",{d:"M12 17L12.01 17"})]});c=o("85Hg2"),c=o("85Hg2");var Hv=({rows:e,className:n,innerClassName:r,btnClassName:i,lineHeightMultiplier:o=1.2,defaultExpanded:a=!1,expandSymbol:l=(()=>"..."),collapseSymbol:u=(e=>"it"===e?"Mostra meno":"Show less"),children:d})=>{const{i18n:h}=Se(),p=h.language,f=u(p),m=l(p),[g,v]=(0,c.useState)(a),[y,b]=(0,c.useState)(!1),[x,S]=(0,c.useState)(16),w=(0,c.useRef)(null);return(0,c.useEffect)((()=>{if(w.current){let t=w.current.getBoundingClientRect().height,n=getComputedStyle(w.current),r=n.lineHeight,i="normal"!==r&&(null==r?void 0:r.length)?parseInt(r,10):o*parseInt(n.fontSize,10);console.table({rows:e,lineHeight:i,height:t,maxHeight:e*i,needsExpanding:t>e*i}),S(i),t&&t>e*i&&b(!0)}}),[e,w.current]),(0,s.jsxs)("div",{className:t(ws)("memori-expandable",n),children:[(0,s.jsx)("div",{ref:w,className:t(ws)("memori-expandable--inner",r),style:{maxHeight:g||!y?"9999px":x*e+"px"},children:d}),y&&!g&&(0,s.jsx)(Sf,{ghost:!0,padded:!1,className:i,onClick:()=>v(!0),children:m}),y&&g&&(0,s.jsx)(Sf,{ghost:!0,padded:!1,className:i,onClick:()=>v(!1),children:f})]})};const Vv=new Map(Object.entries({TENANT_NOT_FOUND:-1,TENANT_REGISTRATION_DISABLED:-2,TENANT_MISSING_NAME:-3,TENANT_MAX_USERS_REACHED:-4,TENANT_MAX_ADMINS_REACHED:-5,TENANT_ALREADY_EXISTS:-6,TENANT_MISSING_DESCRIPTION:-7,TENANT_CANT_SET_COMPLETION_PROVIDER:-8,USER_NOT_CONFIRMED:-11,USER_NOT_FOUND:-12,USER_OR_PASSWORD_INVALID:-13,USER_MUST_CHANGE_PASSWORD:-14,USER_MUST_ENTER_VERIFICATION_CODE:-15,USER_MISSING_TENANT:-21,USER_MISSING_NAME:-22,USER_MISSING_PASSWORD:-23,USER_MISSING_EMAIL:-24,USER_MISSING_VERIFICATION_CODE:-25,USER_NAME_ALREADY_USED:-26,USER_PASSWORD_NOT_CONFORMING_TO_POLICY:-27,USER_EMAIL_ALREADY_USED:-28,USER_EMAIL_INVALID:-29,USER_VERIFICATION_CODE_INVALID:-30,USER_MISSING_NAME_OR_EMAIL:-31,USER_NAME_INVALID:-32,USER_HAS_ONE_OR_MORE_MEMORI:-33,USER_MISSING_NEW_PASSWORD:-34,USER_CANT_CREATE_MEMORI:-35,USER_MAX_MEMORI_REACHED:-36,USER_TOO_MANY_ATTEMPTS:-38,USER_MUST_ACCEPT_TNC_AND_PP:-39,USER_BIRTH_DATE_CANT_BE_CHANGED:-40,USER_CANT_SET_COMPLETION_PROVIDER:-41,USER_CANT_ENABLE_DEEP_THOUGHT:-42,USER_CANT_ENABLE_DCM_INTEGRATION:-43,USER_CANT_ENABLE_CHAINING_OR_BOARD_OF_EXPERTS:-44,USER_CREATION_BILLING_DENIED_PERMISSION:-46,MEMORI_NOT_FOUND:-51,MEMORI_NOT_ACCESSIBLE:-52,MEMORI_ONLY_OWNER_CAN_CHANGE_GIVER_TAG_AND_PIN:-53,SESSION_NOT_FOUND:-101,SESSION_IS_NOT_ADMINISTRATIVE:-102,SESSION_EXPIRED:-103,MEMORI_MISSING_CONFIGURATION:-201,MEMORI_CONFIGURATION_NOT_FOUND:-202,MEMORI_INVALID_PRIVACY_TYPE:-203,MEMORI_MISSING_PASSWORD:-204,MEMORI_INVALID_TOTAL_NUMBER_OF_RECOVERY_TOKENS:-205,MEMORI_INVALID_MINIMUM_NUMBER_OF_RECOVERY_TOKENS:-206,MEMORI_INVALID_VOICE_TYPE:-207,MEMORI_MISSING_NAME:-208,MEMORI_MISSING_PASSWORD_OR_RECOVERY_TOKENS:-209,MEMORI_INVALID_ID:-210,MEMORI_NAME_ALREADY_USED:-211,MEMORI_INVALID_PIN:-212,MEMORI_GIVER_TAG_PIN_CHANGE_REQUIRES_SEPARATE_OPERATION:-213,MEMORI_NO_PASSWORD_WHEN_PUBLIC:-214,MEMORI_DEEP_THOUGHT_REQUIRES_COMPLETIONS:-215,MEMORI_BOARD_OF_EXPERTS_REQUIRES_COMPLETIONS:-216,MEMORI_TRANSFER_MISSING_DESTINATION_USER:-231,MEMORI_TRANSFER_INVALID_DESTINATION_USER_ID:-232,MEMORI_TRANSFER_DESTINATION_USER_DATA_INCONSISTENT:-233,MEMORI_TRANSFER_NOTHING_TO_DO:-234,MEMORI_CONFIGURATION_CANT_BE_CHANGED:-251,MEMORI_MISSING_NEW_PASSWORD:-252,MEMORI_SESSIONS_INVALID_DATE_FROM_FORMAT:-261,MEMORI_SESSIONS_INVALID_DATE_TO_FORMAT:-262,MEMORI_FEATURE_REQUIRES_SUBSCRIPTION:-271,INTEGRATION_NOT_FOUND:-301,INTEGRATION_INVALID_TYPE:-401,INTEGRATION_ALREADY_EXISTS:-402,INTEGRATION_MEMORI_IS_NOT_PUBLIC:-403,INTEGRATION_MISSING_INVOCATION_TEXT:-404,INTEGRATION_MISSING_DEVICE_EMAILS:-405,INTEGRATION_MEMORI_IS_EMPTY:-406,INTEGRATION_MISSING_PRIVACY_POLICY:-407,INTEGRATION_MISSING_CATEGORY:-408,INTEGRATION_MISSING_DESCRIPTION:-409,INTEGRATION_INVALID_INVOCATION_TEXT:-410,INTEGRATION_GOOGLE_NO_MORE_AVAILABLE:-411,UPLOAD_REQUIRES_MULTIPART_ENCODING:-501,UPLOAD_MISSING_CONTENT_TYPE_BOUNDARY:-502,UPLOAD_MAX_LENGTH_EXCEEDED:-503,UPLOAD_FILE_IS_EMPTY:-504,UPLOAD_INVALID_FILE_TYPE_OR_SIGNATURE:-505,UPLOAD_MISSING_FILE_NAME:-506,UPLOAD_INVALID_MEMORY_ID:-507,UPLOAD_MISSING_FILE_CONTENT:-508,ASSET_NOT_FOUND:-601,ASSET_NOT_ACCESSIBLE:-602,ASSET_MISSING_SESSION_ID:-603,ASSET_INVALID_FILE_NAME:-604,INVITATION_NOT_FOUND:-701,INVITATION_NOT_ACCESSIBLE:-702,INVITATION_ALREADY_ACCEPTED:-703,INVITATION_ALREADY_REJECTED:-704,INVITATION_MISSING_DESTINATION_EMAIL:-705,INVITATION_DESTINATION_EMAIL_INVALID:-706,INVITATION_MISSING_TAG:-707,INVITATION_MISSING_PIN:-708,INVITATION_INVALID_PIN:-709,INVITATION_INVALID_TYPE:-710,INVITATION_MISSING_DESTINATION_NAME:-711,INVITATION_TAG_PIN_CANT_BE_CHANGED:-712,INVITATION_CANT_BE_CHANGED:-713,ACTIONLOG_INVALID_USER_ID:-801,ACTIONLOG_INVALID_DATE_FROM_FORMAT:-802,ACTIONLOG_INVALID_DATE_TO_FORMAT:-803,ACTIONLOG_INVALID_MEMORI_ID:-804,CONSUMPTIONLOG_INVALID_TYPE:-901,CONSUMPTIONLOG_INVALID_DATE_FROM_FORMAT:-902,CONSUMPTIONLOG_INVALID_DATE_TO_FORMAT:-903,CONSUMPTIONLOG_INVALID_USER_ID:-904,CONSUMPTIONLOG_INVALID_MEMORI_ID:-905,NOTIFICATIONPREFS_INVALID_CHATLOG_EXTRACTION_PERIOD:-1001,PROCESS_INVALID_TYPE:-1401,PROCESS_ALREADY_RUNNING:-1401,PROCESS_NOT_FOUND:-1402,IMPORTCSV_MISSING_ROWS:-1501,IMPORTCSV_MISSING_CSV:-1502,IMPORTCSV_MISSING_SEPARATOR:-1503,IMPORTCSV_INVALID_SEPARATOR:-1504,IMPORTCSV_MISSING_HEADERS:-1505,IMPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR:-1506,IMPORTCSV_INVALID_RECEIVER_ID:-1507,IMPORTCSV_INVALID_MEDIA_LINK:-1508,IMPORTCSV_UNDETECTABLE_CHAR_ENCODING:-1521,IMPORTCSV_CANT_IMPORT_TO_SECRET_MEMORI:-1531,IMPORTTXT_MISSING_ROWS:-1601,IMPORTTXT_INVALID_GRANULARITY:-1602,IMPORTTXT_INVALID_RECEIVER_ID:-1603,IMPORTTXT_INVALID_MEDIA_LINK:-1604,IMPORTTXT_UNDETECTABLE_CHAR_ENCODING:-1621,IMPORTTXT_CANT_IMPORT_TO_SECRET_MEMORI:-1631,IMPORTTXT_IMPORT_LIMIT_EXCEEDED:-1632,IMPORTTXT_IMPORT_ON_GPT4_REQUIRES_API_KEY:-1633,IMPORTTXT_IMPORT_REQUIRES_PAYING:-1634,IMPORTTXT_BILLING_DENIED_PERMISSION:-1635,EXPORTCSV_MISSING_CSV_SPECS:-1801,EXPORTCSV_MISSING_SEPARATOR:-1802,EXPORTCSV_INVALID_SEPARATOR:-1803,EXPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR:-1804,EXPORTCSV_MISSING_NEW_LINE_CHAR:-1805,EXPORTCSV_INVALID_NEW_LINE_CHAR:-1806,EXPORTCSV_MISSING_PASSWORD:-1811,EXPORTJSONL_MISSING_JSONL_SPECS:-1821,EXPORTJSONL_MISSING_PLATFORM:-1822,EXPORTJSONL_INVALID_PLATFORM:-1823,EXPORTJSONL_MISSING_PASSWORD:-1831,EXPORTJSONL_EXPORT_REQUIRES_PAYING:-1832,ANALYSIS_MISSING_QUERY:-1901,ANALYSIS_CANT_ANALYZE_SECRET_MEMORI:-1902,ANALYSIS_USER_QUERY_MATCH_REQUIRES_DEEP_THOUGHT:-1903,BADGE_ASSIGNMENT_WRONG_OR_MISSING_CREDENTIALS:-2001,BADGE_ASSIGNMENT_MISSING_REF_ID:-2002,BADGE_ASSIGNMENT_OUTCOME_NOT_FOUND:-2003,BADGE_ASSIGNMENT_MISSING_ASSERTION_URL:-2004,BADGE_ASSIGNMENT_MISSING_BADGE_URL:-2005,BADGE_ASSIGNMENT_MISSING_ISSUER_URL:-2006,BADGE_ASSIGNMENT_INVALID_URL:-2007,BADGE_ASSIGNMENT_MISSING_RECIPIENT:-2021,BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_TYPE:-2022,BADGE_ASSIGNMENT_MISSING_RECIPIENT_IDENTITY:-2023,BADGE_ASSIGNMENT_MISSING_RECIPIENT_HASH_TYPE:-2024,BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_HASH_TYPE:-2025,BADGE_ASSIGNMENT_WRONG_RECIPIENT_IDENTITY:-2026,BADGE_NOT_FOUND:-2051,OUTCOME_NO_DCM_CONFIGURED:-2071,OUTCOME_USER_BADGES_DISABLED:-2072}).map((([e,t])=>[t,e]))),Gv=e=>{if(!e)return"error.generic";if(401===e||403===e)return"error.unauthorized";if(404===e)return"error.notFound";if(422===e)return"error.unprocessableEntity";if(500===e)return"internal server error";let t=Vv.get(e);return t?`errors.${t}`:"error.generic"};var Wv=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"})});const qv=[{value:"IT",label:"Italiano"},{value:"EN",label:"English"},{value:"DE",label:"Deutsch"},{value:"ES",label:"Español"},{value:"FR",label:"Français"},{value:"PT",label:"Português"},{value:"UK",label:"Українська"},{value:"RU",label:"Русский"},{value:"PL",label:"Polski"},{value:"FI",label:"Suomi"},{value:"EL",label:"Ελληνικά"},{value:"AR",label:"العربية"},{value:"ZH",label:"中文"},{value:"JA",label:"日本語"}],Kv="👤",Jv=[{name:"text",lang:"text",mimeType:"text/plain",monacoLang:"plaintext",executable:!0},{name:"javascript/jsx",lang:"jsx",mimeType:"text/javascript",monacoLang:"javascript",executable:!0},{name:"typescript/tsx",lang:"tsx",mimeType:"text/ecmascript",monacoLang:"typescript",executable:!0},{name:"json",lang:"json",mimeType:"application/json",monacoLang:"json",executable:!0},{name:"css",lang:"scss",mimeType:"text/css",monacoLang:"css",executable:!0},{name:"html/xml",lang:"tsx",mimeType:"application/xml",monacoLang:"xml"},{name:"bash",lang:"bash",mimeType:"application/x-sh",monacoLang:"shell"},{name:"python",lang:"python",mimeType:"text/x-python",monacoLang:"python"},{name:"cpp/csharp",lang:"cpp",mimeType:"text/x-c++src",monacoLang:"cpp"},{name:"php",lang:"php",mimeType:"application/x-php",monacoLang:"php"},{name:"ruby",lang:"ruby",mimeType:"text/x-ruby",monacoLang:"ruby"},{name:"sql",lang:"sql",mimeType:"text/x-sql",monacoLang:"sql"}],Qv={it:[{text:"",delayAfter:10},{text:"Cerco l'esperto più adatto",delayAfter:5},{text:"Contatto l'esperto",delayAfter:3},{text:"Spiego all'esperto la domanda",delayAfter:2},{text:"L'esperto sta preparando una risposta",delayAfter:6},{text:"Genero una risposta adatta",delayAfter:3}],en:[{text:"",delayAfter:10},{text:"I'm looking for the most suitable expert",delayAfter:5},{text:"I'm contacting the expert",delayAfter:3},{text:"I'm explaining the question to the expert",delayAfter:2},{text:"The expert is preparing an answer",delayAfter:6},{text:"I am generating a suitable answer",delayAfter:3}]};var Yv={};function Zv(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}(Yv=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){Zv(o,r,i,s,a,"next",e)}function a(e){Zv(o,r,i,s,a,"throw",e)}s(void 0)}))}}).__esModule=!0,Yv.default=Yv;var Xv={};function $v(){return Xv=$v=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},Xv.__esModule=!0,Xv.default=Xv,$v.apply(this,arguments)}(Xv=$v).__esModule=!0,Xv.default=Xv;ee=o("ffgrs"),te=o("22y1y");var ey={},ty={};function ny(e,t){return ty=ny=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ty.__esModule=!0,ty.default=ty,ny(e,t)}(ty=ny).__esModule=!0,ty.default=ty,(ey=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&&ty(e,t)}).__esModule=!0,ey.default=ey;var ry={},iy=o("lEJSL").default,oy={};(oy=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}).__esModule=!0,oy.default=oy,(ry=function(e,t){if(t&&("object"===iy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return oy(e)}).__esModule=!0,ry.default=ry;var sy={};function ay(e){return sy=ay=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sy.__esModule=!0,sy.default=sy,ay(e)}(sy=ay).__esModule=!0,sy.default=sy;var ly,cy=o("7qcgS")();ly=cy;try{regeneratorRuntime=cy}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=cy:Function("r","regeneratorRuntime = r")(cy)}c=o("85Hg2");var uy={},dy={};(dy=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}).__esModule=!0,dy.default=dy,(uy=function(e,t){if(null==e)return{};var n,r,i=dy(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}).__esModule=!0,uy.default=uy;var hy={},py={},fy=o("e3mvX");(py=function(e){if(Array.isArray(e))return fy(e)}).__esModule=!0,py.default=py;var my={};(my=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}).__esModule=!0,my.default=my;var gy=o("8xD61"),vy={};(vy=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.")}).__esModule=!0,vy.default=vy,(hy=function(e){return py(e)||my(e)||gy(e)||vy()}).__esModule=!0,hy.default=hy;c=o("85Hg2"),c=o("85Hg2");function yy(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 by(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?yy(Object(r),!0).forEach((function(n){t(X)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yy(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var xy={};function Sy(e){if(0===e.length||1===e.length)return e;var t,n,r=e.join(".");return xy[r]||(xy[r]=0===(n=(t=e).length)||1===n?t:2===n?[t[0],t[1],"".concat(t[0],".").concat(t[1]),"".concat(t[1],".").concat(t[0])]:3===n?[t[0],t[1],t[2],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0])]:n>=4?[t[0],t[1],t[2],t[3],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[2],".").concat(t[3]),"".concat(t[3],".").concat(t[0]),"".concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[0]),"".concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[3],".").concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[2],".").concat(t[1],".").concat(t[0])]:void 0),xy[r]}function wy(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=e.filter((function(e){return"token"!==e})),i=Sy(r);return i.reduce((function(e,t){return by(by({},e),n[t])}),t)}function _y(e){return e.join(" ")}function Cy(e){var n=e.node,r=e.stylesheet,i=e.style,o=void 0===i?{}:i,s=e.useInlineStyles,a=e.key,l=n.properties,u=n.type,d=n.tagName,h=n.value;if("text"===u)return h;if(d){var p,f=function(e,t){var n=0;return function(r){return n+=1,r.map((function(r,i){return Cy({node:r,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(i)})}))}}(r,s);if(s){var m=Object.keys(r).reduce((function(e,t){return t.split(".").forEach((function(t){e.includes(t)||e.push(t)})),e}),[]),g=l.className&&l.className.includes("token")?["token"]:[],v=l.className&&g.concat(l.className.filter((function(e){return!m.includes(e)})));p=by(by({},l),{},{className:_y(v)||void 0,style:wy(l.className,Object.assign({},l.style,o),r)})}else p=by(by({},l),{},{className:_y(l.className)});var y=f(n.children);return t(c).createElement(d,t(Xv)({key:a},p),y)}}var Ay=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function Ey(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 Ty(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?Ey(Object(r),!0).forEach((function(n){t(X)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ey(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var My=/\n/g;function Iy(e){var n=e.codeString,r=e.codeStyle,i=e.containerStyle,o=void 0===i?{float:"left",paddingRight:"10px"}:i,s=e.numberStyle,a=void 0===s?{}:s,l=e.startingLineNumber;return t(c).createElement("code",{style:Object.assign({},r,o)},function(e){var n=e.lines,r=e.startingLineNumber,i=e.style;return n.map((function(e,n){var o=n+r;return t(c).createElement("span",{key:"line-".concat(n),className:"react-syntax-highlighter-line-number",style:"function"==typeof i?i(o):i},"".concat(o,"\n"))}))}({lines:n.replace(/\n$/,"").split("\n"),style:a,startingLineNumber:l}))}function Ry(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function Py(e,t,n){var r,i={display:"inline-block",minWidth:(r=n,"".concat(r.toString().length,".25em")),paddingRight:"1em",textAlign:"right",userSelect:"none"},o="function"==typeof e?e(t):e;return Ty(Ty({},i),o)}function ky(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,i=e.largestLineNumber,o=e.showInlineLineNumbers,s=e.lineProps,a=void 0===s?{}:s,l=e.className,c=void 0===l?[]:l,u=e.showLineNumbers,d=e.wrapLongLines,h="function"==typeof a?a(n):a;if(h.className=c,n&&o){var p=Py(r,n,i);t.unshift(Ry(n,p))}return d&u&&(h.style=Ty(Ty({},h.style),{},{display:"flex"})),{type:"element",tagName:"span",properties:h,children:t}}function Oy(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=0;i<e.length;i++){var o=e[i];if("text"===o.type)r.push(ky({children:[o],className:t(hy)(new Set(n))}));else if(o.children){var s=n.concat(o.properties.className);Oy(o.children,s).forEach((function(e){return r.push(e)}))}}return r}function Ny(e,t,n,r,i,o,s,a,l){var c,u=Oy(e.value),d=[],h=-1,p=0;function f(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return ky({children:e,lineNumber:t,lineNumberStyle:a,largestLineNumber:s,showInlineLineNumbers:i,lineProps:n,className:o,showLineNumbers:r,wrapLongLines:l})}function m(e,t){if(r&&t&&i){var n=Py(a,t,s);e.unshift(Ry(t,n))}return e}function g(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return t||r.length>0?f(e,n,r):m(e,n)}for(var v=function(){var e=u[p],t=e.children[0].value;if(t.match(My)){var n=t.split("\n");n.forEach((function(t,i){var s=r&&d.length+o,a={type:"text",value:"".concat(t,"\n")};if(0===i){var l=g(u.slice(h+1,p).concat(ky({children:[a],className:e.properties.className})),s);d.push(l)}else if(i===n.length-1){var c=u[p+1]&&u[p+1].children&&u[p+1].children[0],f={type:"text",value:"".concat(t)};if(c){var m=ky({children:[f],className:e.properties.className});u.splice(p+1,0,m)}else{var v=g([f],s,e.properties.className);d.push(v)}}else{var y=g([a],s,e.properties.className);d.push(y)}})),h=p}p++};p<u.length;)v();if(h!==u.length-1){var y=u.slice(h+1,u.length);if(y&&y.length){var b=g(y,r&&d.length+o);d.push(b)}}return t?d:(c=[]).concat.apply(c,d)}function Ly(e){var t=e.rows,n=e.stylesheet,r=e.useInlineStyles;return t.map((function(e,t){return Cy({node:e,stylesheet:n,useInlineStyles:r,key:"code-segement".concat(t)})}))}function Dy(e){return e&&void 0!==e.highlightAuto}function By(e,n){return function(r){var i=r.language,o=r.children,s=r.style,a=void 0===s?n:s,l=r.customStyle,u=void 0===l?{}:l,d=r.codeTagProps,h=void 0===d?{className:i?"language-".concat(i):void 0,style:Ty(Ty({},a['code[class*="language-"]']),a['code[class*="language-'.concat(i,'"]')])}:d,p=r.useInlineStyles,f=void 0===p||p,m=r.showLineNumbers,g=void 0!==m&&m,v=r.showInlineLineNumbers,y=void 0===v||v,b=r.startingLineNumber,x=void 0===b?1:b,S=r.lineNumberContainerStyle,w=r.lineNumberStyle,_=void 0===w?{}:w,C=r.wrapLines,A=r.wrapLongLines,E=void 0!==A&&A,T=r.lineProps,M=void 0===T?{}:T,I=r.renderer,R=r.PreTag,P=void 0===R?"pre":R,k=r.CodeTag,O=void 0===k?"code":k,N=r.code,L=void 0===N?(Array.isArray(o)?o[0]:o)||"":N,D=r.astGenerator,B=t(uy)(r,Ay);D=D||e;var z=g?t(c).createElement(Iy,{containerStyle:S,codeStyle:h.style||{},numberStyle:_,startingLineNumber:x,codeString:L}):null,F=a.hljs||a['pre[class*="language-"]']||{backgroundColor:"#fff"},U=Dy(D)?"hljs":"prismjs",j=f?Object.assign({},B,{style:Object.assign({},F,u)}):Object.assign({},B,{className:B.className?"".concat(U," ").concat(B.className):U,style:Object.assign({},u)});if(h.style=Ty(Ty({},h.style),{},E?{whiteSpace:"pre-wrap"}:{whiteSpace:"pre"}),!D)return t(c).createElement(P,j,z,t(c).createElement(O,h,L));(void 0===C&&I||E)&&(C=!0),I=I||Ly;var H=[{type:"text",value:L}],V=function(e){var t=e.astGenerator,n=e.language,r=e.code,i=e.defaultCodeValue;if(Dy(t)){var o=function(e,t){return-1!==e.listLanguages().indexOf(t)}(t,n);return"text"===n?{value:i,language:"text"}:o?t.highlight(n,r):t.highlightAuto(r)}try{return n&&"text"!==n?{value:t.highlight(r,n)}:{value:i}}catch(e){return{value:i}}}({astGenerator:D,language:i,code:L,defaultCodeValue:H});null===V.language&&(V.value=H);var G=Ny(V,C,M,g,y,x,V.value.length+x,_,E);return t(c).createElement(P,j,t(c).createElement(O,h,!y&&z,I({rows:G,stylesheet:a,useInlineStyles:f})))}}function zy(e){var n=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 r,i=t(sy)(e);if(n){var o=t(sy)(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return t(ry)(this,r)}}var Fy,Uy,jy,Hy,Vy,Gy,Wy,qy=function(e,n){return function(){var r=t(Yv)(t(ly).mark((function r(i){var o;return t(ly).wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n();case 2:o=t.sent,i(e,o.default||o);case 4:case"end":return t.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}()},Ky={abap:qy("abap",(function(){return o("bwHpE")})),abnf:qy("abnf",(function(){return o("daD87")})),actionscript:qy("actionscript",(function(){return o("lpEgO")})),ada:qy("ada",(function(){return o("1sGW9")})),agda:qy("agda",(function(){return o("e9VyR")})),al:qy("al",(function(){return o("kMFSe")})),antlr4:qy("antlr4",(function(){return o("8HlsP")})),apacheconf:qy("apacheconf",(function(){return o("isFCh")})),apex:qy("apex",(function(){return o("gUXVM")})),apl:qy("apl",(function(){return o("2L15v")})),applescript:qy("applescript",(function(){return o("8XyFT")})),aql:qy("aql",(function(){return o("gFWTI")})),arduino:qy("arduino",(function(){return o("jI3VB")})),arff:qy("arff",(function(){return o("6uYTH")})),asciidoc:qy("asciidoc",(function(){return o("gdYKH")})),asm6502:qy("asm6502",(function(){return o("ahFLg")})),asmatmel:qy("asmatmel",(function(){return o("4irIu")})),aspnet:qy("aspnet",(function(){return o("yDC6n")})),autohotkey:qy("autohotkey",(function(){return o("a4xpy")})),autoit:qy("autoit",(function(){return o("iNSix")})),avisynth:qy("avisynth",(function(){return o("kEBnk")})),avroIdl:qy("avroIdl",(function(){return o("lzthi")})),bash:qy("bash",(function(){return Promise.resolve(o("3aDLI"))})),basic:qy("basic",(function(){return o("cxDu6")})),batch:qy("batch",(function(){return o("6zDll")})),bbcode:qy("bbcode",(function(){return o("bPS87")})),bicep:qy("bicep",(function(){return o("8dy5f")})),birb:qy("birb",(function(){return o("3vHrY")})),bison:qy("bison",(function(){return o("bCjBS")})),bnf:qy("bnf",(function(){return o("4NqDW")})),brainfuck:qy("brainfuck",(function(){return o("4s0KX")})),brightscript:qy("brightscript",(function(){return o("jTsQ4")})),bro:qy("bro",(function(){return o("5lMc2")})),bsl:qy("bsl",(function(){return o("jBYxC")})),c:qy("c",(function(){return Promise.resolve(o("lyZgY"))})),cfscript:qy("cfscript",(function(){return o("coZDy")})),chaiscript:qy("chaiscript",(function(){return o("e1zEN")})),cil:qy("cil",(function(){return o("crKoM")})),clike:qy("clike",(function(){return o("4kO9t")})),clojure:qy("clojure",(function(){return o("01SpB")})),cmake:qy("cmake",(function(){return o("9yG4p")})),cobol:qy("cobol",(function(){return o("967Hn")})),coffeescript:qy("coffeescript",(function(){return o("7Yi6H")})),concurnas:qy("concurnas",(function(){return o("5tXmX")})),coq:qy("coq",(function(){return o("ektdr")})),cpp:qy("cpp",(function(){return Promise.resolve(o("lR39A"))})),crystal:qy("crystal",(function(){return o("8gt4L")})),csharp:qy("csharp",(function(){return o("7K6eJ")})),cshtml:qy("cshtml",(function(){return o("cVu4i")})),csp:qy("csp",(function(){return o("ecKo1")})),cssExtras:qy("cssExtras",(function(){return o("gnpv8")})),css:qy("css",(function(){return o("jx0H8")})),csv:qy("csv",(function(){return o("f9kmW")})),cypher:qy("cypher",(function(){return o("lojor")})),d:qy("d",(function(){return o("6Qa0U")})),dart:qy("dart",(function(){return o("74K1B")})),dataweave:qy("dataweave",(function(){return o("93H6c")})),dax:qy("dax",(function(){return o("cf9Y9")})),dhall:qy("dhall",(function(){return o("f6UWv")})),diff:qy("diff",(function(){return o("klPVo")})),django:qy("django",(function(){return o("jfxe9")})),dnsZoneFile:qy("dnsZoneFile",(function(){return o("5aMz5")})),docker:qy("docker",(function(){return o("kOauC")})),dot:qy("dot",(function(){return o("btE6k")})),ebnf:qy("ebnf",(function(){return o("aT88c")})),editorconfig:qy("editorconfig",(function(){return o("jWOl8")})),eiffel:qy("eiffel",(function(){return o("kHJaX")})),ejs:qy("ejs",(function(){return o("frfnA")})),elixir:qy("elixir",(function(){return o("hcrJ2")})),elm:qy("elm",(function(){return o("jd271")})),erb:qy("erb",(function(){return o("gczXL")})),erlang:qy("erlang",(function(){return o("FsabW")})),etlua:qy("etlua",(function(){return o("9DI9l")})),excelFormula:qy("excelFormula",(function(){return o("3QVue")})),factor:qy("factor",(function(){return o("ltNCT")})),falselang:qy("falselang",(function(){return o("g0Q6p")})),firestoreSecurityRules:qy("firestoreSecurityRules",(function(){return o("ukA2V")})),flow:qy("flow",(function(){return o("e5prn")})),fortran:qy("fortran",(function(){return o("gIEL6")})),fsharp:qy("fsharp",(function(){return o("3wQkt")})),ftl:qy("ftl",(function(){return o("7ZVWs")})),gap:qy("gap",(function(){return o("hOFj6")})),gcode:qy("gcode",(function(){return o("95BzQ")})),gdscript:qy("gdscript",(function(){return o("iul6t")})),gedcom:qy("gedcom",(function(){return o("e0qJM")})),gherkin:qy("gherkin",(function(){return o("2SHak")})),git:qy("git",(function(){return o("l6VFH")})),glsl:qy("glsl",(function(){return o("cEMfJ")})),gml:qy("gml",(function(){return o("8UVTr")})),gn:qy("gn",(function(){return o("kvibD")})),goModule:qy("goModule",(function(){return o("icqjF")})),go:qy("go",(function(){return o("jLkg8")})),graphql:qy("graphql",(function(){return o("aYGNi")})),groovy:qy("groovy",(function(){return o("4bTmH")})),haml:qy("haml",(function(){return o("h2A6V")})),handlebars:qy("handlebars",(function(){return o("79YVJ")})),haskell:qy("haskell",(function(){return o("bsiLW")})),haxe:qy("haxe",(function(){return o("94Kdj")})),hcl:qy("hcl",(function(){return o("9CheR")})),hlsl:qy("hlsl",(function(){return o("h3dqW")})),hoon:qy("hoon",(function(){return o("9WbsW")})),hpkp:qy("hpkp",(function(){return o("GiPN3")})),hsts:qy("hsts",(function(){return o("eaSn9")})),http:qy("http",(function(){return o("1uj7b")})),ichigojam:qy("ichigojam",(function(){return o("ge562")})),icon:qy("icon",(function(){return o("lVHUf")})),icuMessageFormat:qy("icuMessageFormat",(function(){return o("aYoUL")})),idris:qy("idris",(function(){return o("1RVAE")})),iecst:qy("iecst",(function(){return o("bi7Dr")})),ignore:qy("ignore",(function(){return o("cq0Pi")})),inform7:qy("inform7",(function(){return o("31K4E")})),ini:qy("ini",(function(){return o("l05OZ")})),io:qy("io",(function(){return o("6bY1b")})),j:qy("j",(function(){return o("1ebDS")})),java:qy("java",(function(){return o("iEZZI")})),javadoc:qy("javadoc",(function(){return o("aHy5a")})),javadoclike:qy("javadoclike",(function(){return o("5f3rE")})),javascript:qy("javascript",(function(){return o("7JDFI")})),javastacktrace:qy("javastacktrace",(function(){return o("gdCGE")})),jexl:qy("jexl",(function(){return o("cqMb9")})),jolie:qy("jolie",(function(){return o("cEDX4")})),jq:qy("jq",(function(){return o("kEWsh")})),jsExtras:qy("jsExtras",(function(){return o("74PI8")})),jsTemplates:qy("jsTemplates",(function(){return o("30TPr")})),jsdoc:qy("jsdoc",(function(){return o("9DH5c")})),json:qy("json",(function(){return Promise.resolve(o("l1Rj1"))})),json5:qy("json5",(function(){return o("920rv")})),jsonp:qy("jsonp",(function(){return o("9AwS1")})),jsstacktrace:qy("jsstacktrace",(function(){return o("bYXMr")})),jsx:qy("jsx",(function(){return Promise.resolve(o("6ho3O"))})),julia:qy("julia",(function(){return o("g0ibH")})),keepalived:qy("keepalived",(function(){return o("2hdnH")})),keyman:qy("keyman",(function(){return o("cIufI")})),kotlin:qy("kotlin",(function(){return o("c26dU")})),kumir:qy("kumir",(function(){return o("iYAha")})),kusto:qy("kusto",(function(){return o("9z1oX")})),latex:qy("latex",(function(){return o("lCPLU")})),latte:qy("latte",(function(){return o("c9oN0")})),less:qy("less",(function(){return o("hA3V9")})),lilypond:qy("lilypond",(function(){return o("hpHTA")})),liquid:qy("liquid",(function(){return o("kpZTm")})),lisp:qy("lisp",(function(){return o("chgK5")})),livescript:qy("livescript",(function(){return o("2gdiv")})),llvm:qy("llvm",(function(){return o("jUeFO")})),log:qy("log",(function(){return o("3BFSQ")})),lolcode:qy("lolcode",(function(){return o("lG9br")})),lua:qy("lua",(function(){return o("cVGpd")})),magma:qy("magma",(function(){return o("4LVzY")})),makefile:qy("makefile",(function(){return o("2NviD")})),markdown:qy("markdown",(function(){return o("jUFCF")})),markupTemplating:qy("markupTemplating",(function(){return Promise.resolve(o("t3W0d"))})),markup:qy("markup",(function(){return o("5hIXu")})),matlab:qy("matlab",(function(){return o("kPAC0")})),maxscript:qy("maxscript",(function(){return o("gHOJy")})),mel:qy("mel",(function(){return o("9mj6e")})),mermaid:qy("mermaid",(function(){return o("kozw5")})),mizar:qy("mizar",(function(){return o("2bN6W")})),mongodb:qy("mongodb",(function(){return o("eHKWX")})),monkey:qy("monkey",(function(){return o("7Fh0C")})),moonscript:qy("moonscript",(function(){return o("hDXwC")})),n1ql:qy("n1ql",(function(){return o("j9bkC")})),n4js:qy("n4js",(function(){return o("eTmBF")})),nand2tetrisHdl:qy("nand2tetrisHdl",(function(){return o("ezjCf")})),naniscript:qy("naniscript",(function(){return o("VxHk1")})),nasm:qy("nasm",(function(){return o("ly95T")})),neon:qy("neon",(function(){return o("7Fk34")})),nevod:qy("nevod",(function(){return o("3U8Qv")})),nginx:qy("nginx",(function(){return o("c6qVk")})),nim:qy("nim",(function(){return o("1JdCk")})),nix:qy("nix",(function(){return o("jcstS")})),nsis:qy("nsis",(function(){return o("kEJqW")})),objectivec:qy("objectivec",(function(){return o("lUP8A")})),ocaml:qy("ocaml",(function(){return o("lhTAD")})),opencl:qy("opencl",(function(){return o("8rxKO")})),openqasm:qy("openqasm",(function(){return o("ib0uL")})),oz:qy("oz",(function(){return o("csCUS")})),parigp:qy("parigp",(function(){return o("2DkHE")})),parser:qy("parser",(function(){return o("2cp75")})),pascal:qy("pascal",(function(){return o("fViVl")})),pascaligo:qy("pascaligo",(function(){return o("9Uuxa")})),pcaxis:qy("pcaxis",(function(){return o("jUdnN")})),peoplecode:qy("peoplecode",(function(){return o("l8w4e")})),perl:qy("perl",(function(){return o("aX7dM")})),phpExtras:qy("phpExtras",(function(){return o("3cMZl")})),php:qy("php",(function(){return Promise.resolve(o("5li5P"))})),phpdoc:qy("phpdoc",(function(){return o("bDyJN")})),plsql:qy("plsql",(function(){return o("cPuMN")})),powerquery:qy("powerquery",(function(){return o("jE1gU")})),powershell:qy("powershell",(function(){return o("k7t0j")})),processing:qy("processing",(function(){return o("jr8hV")})),prolog:qy("prolog",(function(){return o("hpuat")})),promql:qy("promql",(function(){return o("ckXC5")})),properties:qy("properties",(function(){return o("fAh6P")})),protobuf:qy("protobuf",(function(){return o("R6WqB")})),psl:qy("psl",(function(){return o("Al65w")})),pug:qy("pug",(function(){return o("dxbNS")})),puppet:qy("puppet",(function(){return o("lrSuh")})),pure:qy("pure",(function(){return o("6DKQK")})),purebasic:qy("purebasic",(function(){return o("7ZkSb")})),purescript:qy("purescript",(function(){return o("dBTYx")})),python:qy("python",(function(){return Promise.resolve(o("kiy5M"))})),q:qy("q",(function(){return o("4FXyy")})),qml:qy("qml",(function(){return o("2zZFj")})),qore:qy("qore",(function(){return o("iCK1Y")})),qsharp:qy("qsharp",(function(){return o("dvH9H")})),r:qy("r",(function(){return o("lQqRt")})),racket:qy("racket",(function(){return o("eHKmq")})),reason:qy("reason",(function(){return o("kkeLT")})),regex:qy("regex",(function(){return o("llX50")})),rego:qy("rego",(function(){return o("9hKdZ")})),renpy:qy("renpy",(function(){return o("cJgw5")})),rest:qy("rest",(function(){return o("867DK")})),rip:qy("rip",(function(){return o("3Odjx")})),roboconf:qy("roboconf",(function(){return o("gQ0Us")})),robotframework:qy("robotframework",(function(){return o("bLCgx")})),ruby:qy("ruby",(function(){return Promise.resolve(o("ch1PX"))})),rust:qy("rust",(function(){return o("cInT8")})),sas:qy("sas",(function(){return o("iz7eP")})),sass:qy("sass",(function(){return o("hrDC3")})),scala:qy("scala",(function(){return o("ub8Bf")})),scheme:qy("scheme",(function(){return o("7NAAt")})),scss:qy("scss",(function(){return Promise.resolve(o("fU6a0"))})),shellSession:qy("shellSession",(function(){return o("7kKCv")})),smali:qy("smali",(function(){return o("2lkCb")})),smalltalk:qy("smalltalk",(function(){return o("4280y")})),smarty:qy("smarty",(function(){return o("4hXYK")})),sml:qy("sml",(function(){return o("jh2E8")})),solidity:qy("solidity",(function(){return o("dTdF2")})),solutionFile:qy("solutionFile",(function(){return o("iI5tm")})),soy:qy("soy",(function(){return o("aoU5C")})),sparql:qy("sparql",(function(){return o("ggrvb")})),splunkSpl:qy("splunkSpl",(function(){return o("8LhCX")})),sqf:qy("sqf",(function(){return o("3tDsu")})),sql:qy("sql",(function(){return Promise.resolve(o("bnDV9"))})),squirrel:qy("squirrel",(function(){return o("bxaUV")})),stan:qy("stan",(function(){return o("dBqrq")})),stylus:qy("stylus",(function(){return o("JlHVK")})),swift:qy("swift",(function(){return o("c7NBs")})),systemd:qy("systemd",(function(){return o("jprZl")})),t4Cs:qy("t4Cs",(function(){return o("edsMI")})),t4Templating:qy("t4Templating",(function(){return o("bS9Wa")})),t4Vb:qy("t4Vb",(function(){return o("gYk20")})),tap:qy("tap",(function(){return o("byv7d")})),tcl:qy("tcl",(function(){return o("lUAIZ")})),textile:qy("textile",(function(){return o("7J2LO")})),toml:qy("toml",(function(){return o("eXtdM")})),tremor:qy("tremor",(function(){return o("vyajH")})),tsx:qy("tsx",(function(){return Promise.resolve(o("7cTnl"))})),tt2:qy("tt2",(function(){return o("8XOOm")})),turtle:qy("turtle",(function(){return o("1XvLQ")})),twig:qy("twig",(function(){return o("i9Fpp")})),typescript:qy("typescript",(function(){return Promise.resolve(o("fzL8k"))})),typoscript:qy("typoscript",(function(){return o("kKk69")})),unrealscript:qy("unrealscript",(function(){return o("jgq8Y")})),uorazor:qy("uorazor",(function(){return o("dsZ00")})),uri:qy("uri",(function(){return o("fqJRp")})),v:qy("v",(function(){return o("bgfyB")})),vala:qy("vala",(function(){return o("68x4q")})),vbnet:qy("vbnet",(function(){return o("eUhQs")})),velocity:qy("velocity",(function(){return o("fPNdV")})),verilog:qy("verilog",(function(){return o("2fM1V")})),vhdl:qy("vhdl",(function(){return o("hNF6q")})),vim:qy("vim",(function(){return o("75TCr")})),visualBasic:qy("visualBasic",(function(){return o("fc93z")})),warpscript:qy("warpscript",(function(){return o("jgHlG")})),wasm:qy("wasm",(function(){return o("dVZkI")})),webIdl:qy("webIdl",(function(){return o("9Jnxv")})),wiki:qy("wiki",(function(){return o("1Gimo")})),wolfram:qy("wolfram",(function(){return o("4SyRT")})),wren:qy("wren",(function(){return o("gaIVs")})),xeora:qy("xeora",(function(){return o("lagad")})),xmlDoc:qy("xmlDoc",(function(){return o("9DNYE")})),xojo:qy("xojo",(function(){return o("ksF4f")})),xquery:qy("xquery",(function(){return o("gXxHJ")})),yaml:qy("yaml",(function(){return o("6rk3j")})),yang:qy("yang",(function(){return o("kTyrQ")})),zig:qy("zig",(function(){return o("d3mFC")}))},Jy=(Uy=(Fy={loader:function(){return o("bB2YF").then((function(e){return e.default||e}))},isLanguageRegistered:function(e,t){return e.registered(t)},languageLoaders:Ky,registerLanguage:function(e,t,n){return e.register(n)}}).loader,jy=Fy.isLanguageRegistered,Hy=Fy.registerLanguage,Vy=Fy.languageLoaders,Gy=Fy.noAsyncLoadingLanguages,Wy=function(e){t(ey)(i,e);var n,r=zy(i);function i(){return t(ee)(this,i),r.apply(this,arguments)}return t(te)(i,[{key:"componentDidUpdate",value:function(){!i.isRegistered(this.props.language)&&Vy&&this.loadLanguage()}},{key:"componentDidMount",value:function(){var e=this;i.astGeneratorPromise||i.loadAstGenerator(),i.astGenerator||i.astGeneratorPromise.then((function(){e.forceUpdate()})),!i.isRegistered(this.props.language)&&Vy&&this.loadLanguage()}},{key:"loadLanguage",value:function(){var e=this,t=this.props.language;"text"!==t&&i.loadLanguage(t).then((function(){return e.forceUpdate()})).catch((function(){}))}},{key:"normalizeLanguage",value:function(e){return i.isSupportedLanguage(e)?e:"text"}},{key:"render",value:function(){return t(c).createElement(i.highlightInstance,t(Xv)({},this.props,{language:this.normalizeLanguage(this.props.language),astGenerator:i.astGenerator}))}}],[{key:"preload",value:function(){return i.loadAstGenerator()}},{key:"loadLanguage",value:(n=t(Yv)(t(ly).mark((function e(n){var r;return t(ly).wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof(r=Vy[n])){e.next=5;break}return e.abrupt("return",r(i.registerLanguage));case 5:throw new Error("Language ".concat(n," not supported"));case 6:case"end":return e.stop()}}),e)}))),function(e){return n.apply(this,arguments)})},{key:"isSupportedLanguage",value:function(e){return i.isRegistered(e)||"function"==typeof Vy[e]}},{key:"loadAstGenerator",value:function(){return i.astGeneratorPromise=Uy().then((function(e){i.astGenerator=e,Hy&&i.languages.forEach((function(t,n){return Hy(e,n,t)}))})),i.astGeneratorPromise}}]),i}(t(c).PureComponent),t(X)(Wy,"astGenerator",null),t(X)(Wy,"highlightInstance",By(null,{})),t(X)(Wy,"astGeneratorPromise",null),t(X)(Wy,"languages",new Map),t(X)(Wy,"supportedLanguages",Fy.supportedLanguages||Object.keys(Vy||{})),t(X)(Wy,"isRegistered",(function(e){if(Gy)return!0;if(!Hy)throw new Error("Current syntax highlighter doesn't support registration of languages");return Wy.astGenerator?jy(Wy.astGenerator,e):Wy.languages.has(e)})),t(X)(Wy,"registerLanguage",(function(e,t){if(!Hy)throw new Error("Current syntax highlighter doesn't support registration of languages");if(Wy.astGenerator)return Hy(Wy.astGenerator,e,t);Wy.languages.set(e,t)})),Wy),Qy={},Yy={};(Yy=function(e){return e&&e.__esModule?e:{default:e}}).__esModule=!0,Yy.default=Yy,Object.defineProperty(Qy,"__esModule",{value:!0}),Object.defineProperty(Qy,"a11yDark",{enumerable:!0,get:function(){return ob.default}}),Object.defineProperty(Qy,"atomDark",{enumerable:!0,get:function(){return sb.default}}),Object.defineProperty(Qy,"base16AteliersulphurpoolLight",{enumerable:!0,get:function(){return ab.default}}),Object.defineProperty(Qy,"cb",{enumerable:!0,get:function(){return lb.default}}),Object.defineProperty(Qy,"coldarkCold",{enumerable:!0,get:function(){return cb.default}}),Object.defineProperty(Qy,"coldarkDark",{enumerable:!0,get:function(){return ub.default}}),Object.defineProperty(Qy,"coy",{enumerable:!0,get:function(){return Zy.default}}),Object.defineProperty(Qy,"coyWithoutShadows",{enumerable:!0,get:function(){return db.default}}),Object.defineProperty(Qy,"darcula",{enumerable:!0,get:function(){return hb.default}}),Object.defineProperty(Qy,"dark",{enumerable:!0,get:function(){return Xy.default}}),Object.defineProperty(Qy,"dracula",{enumerable:!0,get:function(){return pb.default}}),Object.defineProperty(Qy,"duotoneDark",{enumerable:!0,get:function(){return fb.default}}),Object.defineProperty(Qy,"duotoneEarth",{enumerable:!0,get:function(){return mb.default}}),Object.defineProperty(Qy,"duotoneForest",{enumerable:!0,get:function(){return gb.default}}),Object.defineProperty(Qy,"duotoneLight",{enumerable:!0,get:function(){return vb.default}}),Object.defineProperty(Qy,"duotoneSea",{enumerable:!0,get:function(){return yb.default}}),Object.defineProperty(Qy,"duotoneSpace",{enumerable:!0,get:function(){return bb.default}}),Object.defineProperty(Qy,"funky",{enumerable:!0,get:function(){return $y.default}}),Object.defineProperty(Qy,"ghcolors",{enumerable:!0,get:function(){return xb.default}}),Object.defineProperty(Qy,"gruvboxDark",{enumerable:!0,get:function(){return Sb.default}}),Object.defineProperty(Qy,"gruvboxLight",{enumerable:!0,get:function(){return wb.default}}),Object.defineProperty(Qy,"holiTheme",{enumerable:!0,get:function(){return _b.default}}),Object.defineProperty(Qy,"hopscotch",{enumerable:!0,get:function(){return Cb.default}}),Object.defineProperty(Qy,"lucario",{enumerable:!0,get:function(){return Ab.default}}),Object.defineProperty(Qy,"materialDark",{enumerable:!0,get:function(){return Eb.default}}),Object.defineProperty(Qy,"materialLight",{enumerable:!0,get:function(){return Tb.default}}),Object.defineProperty(Qy,"materialOceanic",{enumerable:!0,get:function(){return Mb.default}}),Object.defineProperty(Qy,"nightOwl",{enumerable:!0,get:function(){return Ib.default}}),Object.defineProperty(Qy,"nord",{enumerable:!0,get:function(){return Rb.default}}),Object.defineProperty(Qy,"okaidia",{enumerable:!0,get:function(){return eb.default}}),Object.defineProperty(Qy,"oneDark",{enumerable:!0,get:function(){return Pb.default}}),Object.defineProperty(Qy,"oneLight",{enumerable:!0,get:function(){return kb.default}}),Object.defineProperty(Qy,"pojoaque",{enumerable:!0,get:function(){return Ob.default}}),Object.defineProperty(Qy,"prism",{enumerable:!0,get:function(){return ib.default}}),Object.defineProperty(Qy,"shadesOfPurple",{enumerable:!0,get:function(){return Nb.default}}),Object.defineProperty(Qy,"solarizedDarkAtom",{enumerable:!0,get:function(){return Lb.default}}),Object.defineProperty(Qy,"solarizedlight",{enumerable:!0,get:function(){return tb.default}}),Object.defineProperty(Qy,"synthwave84",{enumerable:!0,get:function(){return Db.default}}),Object.defineProperty(Qy,"tomorrow",{enumerable:!0,get:function(){return nb.default}}),Object.defineProperty(Qy,"twilight",{enumerable:!0,get:function(){return rb.default}}),Object.defineProperty(Qy,"vs",{enumerable:!0,get:function(){return Bb.default}}),Object.defineProperty(Qy,"vscDarkPlus",{enumerable:!0,get:function(){return zb.default}}),Object.defineProperty(Qy,"xonokai",{enumerable:!0,get:function(){return Fb.default}}),Object.defineProperty(Qy,"zTouch",{enumerable:!0,get:function(){return Ub.default}});var Zy=Yy(o("jcF8U")),Xy=Yy(o("3Tppx")),$y=Yy(o("dBuK7")),eb=Yy(o("eEjWK")),tb=Yy(o("awG2g")),nb=Yy(o("2oFzQ")),rb=Yy(o("4Au6Q")),ib=Yy(o("dAPqs")),ob=Yy(o("8eAql")),sb=Yy(o("cv2QE")),ab=Yy(o("h5I9g")),lb=Yy(o("i4C5w")),cb=Yy(o("3kFKo")),ub=Yy(o("17zK0")),db=Yy(o("5Avqr")),hb=Yy(o("1jHMv")),pb=Yy(o("7Q8CE")),fb=Yy(o("jKUos")),mb=Yy(o("Uzm4J")),gb=Yy(o("7yfkN")),vb=Yy(o("lT2l1")),yb=Yy(o("fZ9um")),bb=Yy(o("1MoQL")),xb=Yy(o("4uys7")),Sb=Yy(o("kaYsk")),wb=Yy(o("kN6Vu")),_b=Yy(o("2Z6pG")),Cb=Yy(o("4jQJK")),Ab=Yy(o("bpXw0")),Eb=Yy(o("i4S8s")),Tb=Yy(o("5bNr4")),Mb=Yy(o("5ZYWT")),Ib=Yy(o("ihJCU")),Rb=Yy(o("8iIbg")),Pb=Yy(o("424u7")),kb=Yy(o("jPiNI")),Ob=Yy(o("OHVOA")),Nb=Yy(o("2OKTL")),Lb=Yy(o("2Mg8H")),Db=Yy(o("9Kud0")),Bb=Yy(o("eCrmR")),zb=Yy(o("8UhcQ")),Fb=Yy(o("dtU9z")),Ub=Yy(o("4xtLO")),jb={};Object.defineProperty(jb,"__esModule",{value:!0}),jb.default=void 0;var Hb=Yy(o("7cTnl")).default;jb.default=Hb;var Vb={};Object.defineProperty(Vb,"__esModule",{value:!0}),Vb.default=void 0;var Gb=Yy(o("l1Rj1")).default;Vb.default=Gb;var Wb={};Object.defineProperty(Wb,"__esModule",{value:!0}),Wb.default=void 0;var qb=Yy(o("fU6a0")).default;Wb.default=qb;var Kb={};Object.defineProperty(Kb,"__esModule",{value:!0}),Kb.default=void 0;var Jb=Yy(o("3aDLI")).default;Kb.default=Jb;var Qb={};Object.defineProperty(Qb,"__esModule",{value:!0}),Qb.default=void 0;var Yb=Yy(o("kiy5M")).default;Qb.default=Yb;var Zb={};Object.defineProperty(Zb,"__esModule",{value:!0}),Zb.default=void 0;var Xb=Yy(o("lR39A")).default;Zb.default=Xb;var $b={};Object.defineProperty($b,"__esModule",{value:!0}),$b.default=void 0;var ex=Yy(o("5li5P")).default;$b.default=ex;var tx={};Object.defineProperty(tx,"__esModule",{value:!0}),tx.default=void 0;var nx=Yy(o("ch1PX")).default;tx.default=nx;var rx={};Object.defineProperty(rx,"__esModule",{value:!0}),rx.default=void 0;var ix=Yy(o("bnDV9")).default;rx.default=ix,Jy.registerLanguage("tsx",t(jb)),Jy.registerLanguage("json",t(Vb)),Jy.registerLanguage("scss",t(Wb)),Jy.registerLanguage("bash",t(Kb)),Jy.registerLanguage("python",t(Qb)),Jy.registerLanguage("cpp",t(Zb)),Jy.registerLanguage("php",t($b)),Jy.registerLanguage("ruby",t(tx)),Jy.registerLanguage("sql",t(rx));var ox=({medium:e,className:t,preview:n=!1,showLineNumbers:r=!0,showCopyButton:i=!0})=>{var o,a,l,c;const{t:u}=Se();return(0,s.jsxs)("div",{className:"memori-snippet",children:[(0,s.jsxs)("div",{className:"memori-snippet--content",children:[(0,s.jsx)(Jy,{"aria-labelledby":`#snippet-${e.mediumID}`,className:t,style:Qy.atomDark,showLineNumbers:r,language:null!==(a=null===(o=Jv.find((t=>e.mimeType===t.mimeType)))||void 0===o?void 0:o.lang)&&void 0!==a?a:"text",children:(null===(l=e.content)||void 0===l?void 0:l.length)&&e.content.length>200&&n?`${e.content.slice(0,200)}\n...`:`${e.content}`}),i&&(0,s.jsx)(Sf,{padded:!1,ghost:!0,className:"memori-snippet--copy-button",title:u("copy")||"Copy",icon:(0,s.jsx)(Wv,{}),onClick:()=>{var t;return navigator.clipboard.writeText(null!==(t=e.content)&&void 0!==t?t:"")}})]}),!!(null===(c=e.title)||void 0===c?void 0:c.length)&&(0,s.jsx)("p",{id:`snippet-${e.mediumID}`,className:"memori-snippet--caption",children:e.title})]})};c=o("85Hg2"),c=o("85Hg2");var sx,ax=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M574 665.4a8.03 8.03 0 0 0-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 0 0-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 0 0 0 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 0 0 0 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 0 0-11.3 0L372.3 598.7a8.03 8.03 0 0 0 0 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z"})}),lx={};sx=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=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};function n(e,n){var r=e.el,i=e.elStyle,o=e.elHeight,s=e.rowsLimit,a=e.rowsWrapped,l=e.options,c=e.buffer,u=c;if(a===s+1)return t({},e);var d=c,h=a,p=o;return r.innerHTML=u=c.length?""+c+l.delimiter+n+l.replaceStr:""+n+l.replaceStr,parseFloat(i.height)>parseFloat(o)&&(h++,p=i.height,h===s+1)?(r.innerHTML=u="."===d[d.length-1]&&"..."===l.replaceStr?d+"..":""+d+l.replaceStr,t({},e,{elHeight:p,rowsWrapped:h})):(r.innerHTML=u=d.length?""+d+l.delimiter+n:""+n,t({},e,{buffer:u,elHeight:p,rowsWrapped:h}))}e.disableResponsive=function(e){window.removeEventListener("resize",e)},e.ellipsis=function e(){for(var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s={replaceStr:"...",responsive:!1,debounceDelay:250,delimiter:" "},a=t({},s,o),l=r&&(r instanceof NodeList?r:1===r.nodeType?[r]:document.querySelectorAll(r)),c=[],u=0;u<l.length;u++){var d=l[u];c[u]=d.innerHTML;var h=d.innerHTML.split(a.delimiter);d.innerHTML="";var p=window.getComputedStyle(d);h.reduce(n,{el:d,buffer:d.innerHTML,elStyle:p,elHeight:0,rowsLimit:i,rowsWrapped:0,options:a})}if(a.responsive){var f=!1,m=window.innerWidth,g=function(){if(window.innerWidth!==m){m=window.innerWidth;for(var n=0;n<l.length;n++)l[n].innerHTML=c[n];e(r,i,t({},o,{responsive:!1}))}},v=function(){clearTimeout(f),f=setTimeout(g,a.debounceDelay)};return window.addEventListener("resize",v),v}}},"function"==typeof define&&define.amd?define(["exports"],sx):sx(lx);var cx=({loading:e=!1,className:n,title:r,description:i,cover:o,hoverable:a=!1,children:l})=>(0,s.jsx)("div",{className:t(ws)("memori-card",n,{"memori-card--loading":e,"memori-card--with-cover":o,"memori-card--hoverable":a}),children:(0,s.jsxs)(xf,{spinning:e,children:[o&&(0,s.jsx)("div",{className:"memori-card--cover",children:o}),(0,s.jsxs)("div",{className:"memori-card--content",children:[r&&(0,s.jsx)("h3",{className:"memori-card--title",children:r}),i&&(0,s.jsx)("p",{className:"memori-card--description",children:i}),(0,s.jsx)("div",{className:"memori-card--children",children:l})]})]})});const ux=({isChild:e=!1,item:n,baseUrl:r,onLinkPreviewInfo:i,descriptionOneLine:o=!1})=>{var a,l,u,d;const[h,p]=(0,c.useState)(null),f=(null===(a=n.url)||void 0===a?void 0:a.startsWith("http"))||!n.url||0===(null===(l=n.url)||void 0===l?void 0:l.length)?n.url:`https://${n.url}`;(0,c.useEffect)((()=>{var e,t;let o=(null===(e=n.url)||void 0===e?void 0:e.startsWith("http"))||!n.url||0===(null===(t=n.url)||void 0===t?void 0:t.length)?n.url:`https://${n.url}`;o&&o!==(null==h?void 0:h.urlKey)&&(async(e,t)=>{try{const n=await fetch(`${t||"https://aisuru.com"}/api/linkpreview/${encodeURIComponent(e)}`);return await n.json()}catch(e){return console.error("getSiteInfo",e),null}})(o,r).then((e=>{p(e?{...e,urlKey:o}:null),i&&e&&i(e)}))}),[null==n?void 0:n.url,r,i]);const m=n.title&&n.title.length>0?n.title:null==h?void 0:h.title,g=null==h?void 0:h.description,v=null==h?void 0:h.video,y=null!==(u=null==h?void 0:h.image)&&void 0!==u?u:null===(d=null==h?void 0:h.images)||void 0===d?void 0:d[0];return(0,c.useEffect)((()=>{setTimeout((()=>{(0,lx.ellipsis)(".memori-link-item--card .memori-card--description",3,{responsive:!0})}),300)}),[g,n.mediumID]),(0,s.jsx)("a",{href:f,target:"_blank",rel:"noopener noreferrer",className:t(ws)("memori-link-item--link",{"memori-link-item--link--child":e}),onClick:t=>{e||(t.preventDefault(),t.stopPropagation(),window.open(f,"_blank",`toolbar=yes,top=${.1*window.innerHeight},left=${.1*window.innerWidth},width=${.8*window.innerWidth},height=${.8*window.innerHeight}`))},children:(0,s.jsx)(cx,{hoverable:!0,className:t(ws)("memori-link-item--card",{"memori-link-item--card-description-oneline":o,"memori-link-item--card-has-image":y,"memori-link-item--card-has-video":v}),cover:v?(0,s.jsx)("iframe",{width:"100%",height:"100%",src:v,title:"Video player",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}):y?(0,s.jsx)("img",{className:"memori-link-item--card-cover-img",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg==",srcSet:y.includes("data:image")?void 0:y.startsWith("https")?y:`https://${y.replace("http://","")}`,alt:n.title}):(0,s.jsx)("div",{className:"memori-link-item--card-cover-icon",children:(0,s.jsx)(ax,{className:"memori-link-item--icon"})}),title:m,description:g})})};var dx=({items:e,baseUrl:t,descriptionOneLine:n=!1,onLinkPreviewInfo:r})=>(0,s.jsx)(np,{appear:!0,show:!0,as:"div",className:"memori-link-items",children:(0,s.jsx)("div",{className:"memori-link-items--grid",children:e.map(((e,i)=>(0,s.jsx)(np.Child,{as:"div",className:"memori-link-item",enter:"ease-out duration-500 delay-"+100*i,enterFrom:"opacity-0 scale-95",enterTo:"opacity-1 scale-100",leave:"ease-in duration-300",leaveFrom:"opacity-1 scale-100",leaveTo:"opacity-0 scale-95",children:(0,s.jsx)(ux,{item:e,baseUrl:t,descriptionOneLine:n,onLinkPreviewInfo:r})},e.mediumID)))})});c=o("85Hg2");const hx=["va bene","no grazie","si","no","sì","arrivederci","non c'entrava","non mi è piaciuto"],px=async(e,t,n,r)=>{var i;const o=hx.indexOf(e.toLowerCase())>-1?"IT":null==n?void 0:n.toUpperCase(),s=await fetch(`${r||"https://aisuru.com"}/api/translate?text=${encodeURIComponent(e)}&target_lang=${t.toUpperCase()}${o?`&source_lang=${o}`:""}`,{method:"GET",headers:{Accept:"*/*"}}),a=await s.json();return null===(i=null==a?void 0:a.translations)||void 0===i?void 0:i[0]};c=o("85Hg2");var fx=({src:e,poster:t,alt:n=""})=>((0,c.useEffect)((()=>{const e=document.createElement("script");return e.src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js",e.type="module",document.head.appendChild(e),()=>{document.head.removeChild(e)}}),[]),(0,s.jsx)("div",{className:"model-viewer",children:(0,s.jsx)("model-viewer",{src:e,"ios-src":"",poster:t,alt:n,"shadow-intensity":"1","disable-zoom":!0,"camera-controls":!0,autoplay:!0})}));var mx=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494z"})});var gx=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M531.3 574.4l.3-1.4c5.8-23.9 13.1-53.7 7.4-80.7-3.8-21.3-19.5-29.6-32.9-30.2-15.8-.7-29.9 8.3-33.4 21.4-6.6 24-.7 56.8 10.1 98.6-13.6 32.4-35.3 79.5-51.2 107.5-29.6 15.3-69.3 38.9-75.2 68.7-1.2 5.5.2 12.5 3.5 18.8 3.7 7 9.6 12.4 16.5 15 3 1.1 6.6 2 10.8 2 17.6 0 46.1-14.2 84.1-79.4 5.8-1.9 11.8-3.9 17.6-5.9 27.2-9.2 55.4-18.8 80.9-23.1 28.2 15.1 60.3 24.8 82.1 24.8 21.6 0 30.1-12.8 33.3-20.5 5.6-13.5 2.9-30.5-6.2-39.6-13.2-13-45.3-16.4-95.3-10.2-24.6-15-40.7-35.4-52.4-65.8zM421.6 726.3c-13.9 20.2-24.4 30.3-30.1 34.7 6.7-12.3 19.8-25.3 30.1-34.7zm87.6-235.5c5.2 8.9 4.5 35.8.5 49.4-4.9-19.9-5.6-48.1-2.7-51.4.8.1 1.5.7 2.2 2zm-1.6 120.5c10.7 18.5 24.2 34.4 39.1 46.2-21.6 4.9-41.3 13-58.9 20.2-4.2 1.7-8.3 3.4-12.3 5 13.3-24.1 24.4-51.4 32.1-71.4zm155.6 65.5c.1.2.2.5-.4.9h-.2l-.2.3c-.8.5-9 5.3-44.3-8.6 40.6-1.9 45 7.3 45.1 7.4zm191.4-388.2L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494z"})});var vx=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494zM514.1 580.1l-61.8-102.4c-2.2-3.6-6.1-5.8-10.3-5.8h-38.4c-2.3 0-4.5.6-6.4 1.9-5.6 3.5-7.3 10.9-3.7 16.6l82.3 130.4-83.4 132.8a12.04 12.04 0 0 0 10.2 18.4h34.5c4.2 0 8-2.2 10.2-5.7L510 664.8l62.3 101.4c2.2 3.6 6.1 5.7 10.2 5.7H620c2.3 0 4.5-.7 6.5-1.9 5.6-3.6 7.2-11 3.6-16.6l-84-130.4 85.3-132.5a12.04 12.04 0 0 0-10.1-18.5h-35.7c-4.2 0-8.1 2.2-10.3 5.8l-61.2 102.3z"})});var yx=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494zM528.1 472h-32.2c-5.5 0-10.3 3.7-11.6 9.1L434.6 680l-46.1-198.7c-1.3-5.4-6.1-9.3-11.7-9.3h-35.4a12.02 12.02 0 0 0-11.6 15.1l74.2 276c1.4 5.2 6.2 8.9 11.6 8.9h32c5.4 0 10.2-3.6 11.6-8.9l52.8-197 52.8 197c1.4 5.2 6.2 8.9 11.6 8.9h31.8c5.4 0 10.2-3.6 11.6-8.9l74.4-276a12.04 12.04 0 0 0-11.6-15.1H647c-5.6 0-10.4 3.9-11.7 9.3l-45.8 199.1-49.8-199.3c-1.3-5.4-6.1-9.1-11.6-9.1z"})});const bx=({isChild:e=!1,item:t,sessionID:n,tenantID:r,preview:i=!1,baseURL:o,apiURL:a,onClick:l,customMediaRenderer:c})=>{var u,d;const h=fv({resourceURI:t.url,sessionID:n,tenantID:r,baseURL:o,apiURL:a}),p=null==c?void 0:c(t.mimeType);if(p)return p;const f=(null===(u=t.url)||void 0===u?void 0:u.startsWith("rgb("))||(null===(d=t.url)||void 0===d?void 0:d.startsWith("rgba("));switch(t.mimeType){case"image/jpeg":case"image/png":case"image/jpg":case"image/gif":return(0,s.jsx)("a",{className:"memori-media-item--link",href:h,onClick:n=>{e&&n.preventDefault(),l&&(n.preventDefault(),l(t.mediumID))},target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(cx,{hoverable:!0,className:"memori-media-item--card memori-media-item--image",cover:(0,s.jsxs)("picture",{className:"memori-media-item--figure",children:[!i&&!f&&(0,s.jsx)("source",{srcSet:[h,t.url,t.content].join(", "),type:t.mimeType}),f?(0,s.jsx)("div",{style:{minHeight:"150px",width:"100%",backgroundColor:t.url}}):(0,s.jsx)("img",{alt:t.title,src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg=="}),t.title&&(0,s.jsx)("figcaption",{className:"memori-media-item--figure-caption",children:t.title})]})})});case"application/msword":case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return(0,s.jsx)("a",{className:"memori-media-item--link",href:h,target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(cx,{hoverable:!0,cover:(0,s.jsx)(yx,{className:"memori-media-item--icon"}),title:t.title})});case"application/vnd.ms-excel":case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":return(0,s.jsx)("a",{className:"memori-media-item--link",href:h,target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(cx,{hoverable:!0,cover:(0,s.jsx)(vx,{className:"memori-media-item--icon"}),title:t.title})});case"application/pdf":return(0,s.jsx)("a",{className:"memori-media-item--link",href:h,target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(cx,{hoverable:!0,cover:(0,s.jsx)(gx,{className:"memori-media-item--icon"}),title:t.title})});case"video/mp4":case"video/quicktime":case"video/avi":case"video/mpeg":return(0,s.jsx)("a",{className:"memori-media-item--link",href:h,onClick:n=>{e&&n.preventDefault(),l&&(n.preventDefault(),l(t.mediumID))},target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(cx,{hoverable:!0,cover:(0,s.jsxs)("video",{style:{width:"100%",height:"100%"},controls:!0,src:h,title:t.title,children:["video/quicktime"===t.mimeType&&(0,s.jsx)("source",{src:t.url,type:"video/mp4"}),(0,s.jsx)("source",{src:t.url,type:t.mimeType}),"Your browser does not support this video format.",(0,s.jsx)("br",{}),(0,s.jsx)("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",children:"Download the video"})]}),title:t.title})});case"audio/mpeg3":case"audio/wav":case"audio/mpeg":return(0,s.jsx)("a",{className:"memori-media-item--link",href:h,target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(cx,{hoverable:!0,cover:(0,s.jsx)("audio",{style:{width:"100%",height:"100%"},controls:!0,src:h}),title:t.title})});case"model/gltf-binary":return(0,s.jsx)(fx,{src:h,alt:"",poster:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg=="});default:return(0,s.jsx)("a",{className:"memori-media-item--link",href:h,target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(cx,{hoverable:!0,cover:(0,s.jsx)(mx,{className:"memori-media-item--icon"}),title:t.title})})}};var xx=(0,c.memo)((({items:e,sessionID:t,tenantID:n,translateTo:r,baseURL:i,apiURL:o,customMediaRenderer:a})=>{const[l,u]=(0,c.useState)(e),[d,h]=(0,c.useState)(),p=(0,c.useCallback)((async()=>{if(!r)return;const t=await Promise.all((null!=e?e:[]).map((async e=>{var t;if(!e.title)return e;try{const n=await px(e.title,r);return{...e,title:null!==(t=n.text)&&void 0!==t?t:e.title}}catch(t){return console.error(t),e}})));u(t)}),[r,e]);return(0,c.useEffect)((()=>{r&&p()}),[r,p]),(0,s.jsxs)(np,{appear:!0,show:!0,as:"div",className:"memori-media-items",children:[(0,s.jsx)("div",{className:"memori-media-items--grid",children:l.filter((e=>{var t;return!(null===(t=e.properties)||void 0===t?void 0:t.executable)&&!Jv.map((e=>e.mimeType)).includes(e.mimeType)})).sort(((e,t)=>e.creationTimestamp>t.creationTimestamp?1:e.creationTimestamp<t.creationTimestamp?-1:0)).map(((e,r)=>(0,s.jsx)(np.Child,{as:"div",className:"memori-media-item",enter:"ease-out duration-500 delay-"+100*r,enterFrom:"opacity-0 scale-95",enterTo:"opacity-1 scale-100",leave:"ease-in duration-300",leaveFrom:"opacity-1 scale-100",leaveTo:"opacity-0 scale-95",children:(0,s.jsx)(bx,{isChild:!0,sessionID:t,tenantID:n,baseURL:i,apiURL:o,onClick:e=>{h(l.find((t=>t.mediumID===e)))},item:{...e,title:e.title,url:e.url,content:e.content},customMediaRenderer:a})},e.url+"&index="+r)))}),l.filter((e=>{var t;return!(null===(t=e.properties)||void 0===t?void 0:t.executable)&&Jv.map((e=>e.mimeType)).includes(e.mimeType)})).map((e=>(0,s.jsx)(np.Child,{as:"div",className:"memori-media-item--snippet",enter:"ease-out duration-500",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-1 translate-y-0",leave:"ease-in duration-300",leaveFrom:"opacity-1",leaveTo:"opacity-0",children:(0,s.jsx)(ox,{medium:e},e.mediumID)},e.mediumID))),l.filter((e=>{var t;return"text/css"===e.mimeType&&!!(null===(t=e.properties)||void 0===t?void 0:t.executable)})).map((e=>(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:e.content||""}},e.mediumID))),(null==d?void 0:d.mediumID)&&(0,s.jsx)(Wm,{width:"100%",widthMd:"100%",className:"memori-media-item--modal",open:!!d,onClose:()=>h(void 0),footer:null,children:(0,s.jsx)(bx,{isChild:!0,sessionID:t,tenantID:n,baseURL:i,apiURL:o,item:{...d,title:d.title,url:d.url,content:d.content},customMediaRenderer:a})})]})}));var Sx=(0,c.memo)((({hints:e=[],links:n=[],media:r=[],simulateUserPrompt:i=(()=>{}),sessionID:o,baseUrl:a,apiUrl:l,translateTo:u,customMediaRenderer:d})=>{const{t:h}=Se(),[p,f]=(0,c.useState)(!0),[m,g]=(0,c.useState)(6);return(0,c.useEffect)((()=>{f(!0)}),[e]),(0,s.jsxs)("div",{className:"memori-media-widget",children:[(null==r?void 0:r.length)>0&&(0,s.jsx)(xx,{items:r,sessionID:o,translateTo:u,baseURL:a,apiURL:l,customMediaRenderer:d}),(null==n?void 0:n.length)>0&&(0,s.jsx)(dx,{items:n,baseUrl:a}),(null==e?void 0:e.length)>0&&p&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(np,{appear:!0,show:!0,as:"ul",className:"memori-media--hints",children:e.slice(0,m).map(((e,n)=>(0,s.jsx)(np.Child,{as:"li",enter:"ease-out duration-500",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-1 translate-y-0",leave:"ease-in duration-300",leaveFrom:"opacity-1",leaveTo:"opacity-0",children:(0,s.jsx)(Sf,{className:t(ws)("memori-media--hint"),primary:!0,onClick:()=>{i(e.originalText,e.text),f(!1)},onTouchEnd:()=>{i(e.originalText,e.text),f(!1)},children:e.text},e.text+n)},e.text+n)))}),e.length>m&&(0,s.jsx)("div",{className:"memori-hints--show-more",children:(0,s.jsx)(Sf,{className:"memori-hints--show-more-button",id:"showMoreHints",onClick:()=>g(m+6),children:h("expand")||"Expand"})})]})]})}));const wx=e=>e.endsWith("?")?e:`${e}?`;var _x=({message:e,apiURL:n,sessionID:r,visible:i=!0,initialMatches:o=[],closeDrawer:a,_TEST_loading:l=!1})=>{const{t:u}=Se(),d=Y(n).search.searchMemory,[h,p]=(0,c.useState)(o),[f,m]=(0,c.useState)(l),g=(0,c.useCallback)((async()=>{if(m(!0),!l){try{const{matches:n,...i}=await d(r,{searchType:"Semantic",numberOfResults:3,text:e.questionAnswered,date:e.date,placeName:e.placeName,placeLatitude:e.placeLatitude,placeLongitude:e.placeLongitude,placeUncertaintyKm:e.placeUncertaintyKm,contextVars:e.contextVars,tag:e.tag,memoryTags:e.memoryTags});0!==i.resultCode?(console.error(i),t(Ju).error(u(Gv(i.resultCode)))):p(null!=n?n:[])}catch(e){console.error("WHYTHISANSWER/FETCH",e),p(null!=o?o:[])}m(!1)}}),[e,r]);return(0,c.useEffect)((()=>{g()}),[g,e,r]),(0,s.jsxs)(_f,{open:i,width:"80%",animated:!1,className:"memori-whythisanswer-drawer",onClose:()=>a(),title:u("whyThisAnswer"),children:[(0,s.jsx)("p",{children:u("whyThisAnswerHelper")}),e.questionAnswered&&(0,s.jsxs)("p",{className:"memori--whythisanswer-question-answered",children:[(0,s.jsxs)("strong",{children:[u("question")||"Question",":"]})," ",e.questionAnswered]}),(0,s.jsxs)(xf,{primary:!0,spinning:f,children:[!f&&0===h.length&&(0,s.jsx)("p",{role:"info",className:"memori--whythisanswer-no-results",children:u("nothingFound")}),f&&0===h.length&&(0,s.jsxs)("ul",{className:"memori--whythisanswer-list memori--whythisanswer-skeleton",children:[(0,s.jsxs)("li",{children:[(0,s.jsxs)("div",{className:"memori--whythisanswer-title",children:[(0,s.jsx)("span",{className:"memori--whythisanswer-confidence",children:(0,s.jsx)("span",{className:"memori--whythisanswer-skeleton-text"})}),(0,s.jsx)("div",{className:"memori--whythisanswer-title-text",children:(0,s.jsx)("p",{className:"memori--whythisanswer-skeleton-text"})})]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("div",{className:"memori--whythisanswer-skeleton-text"}),(0,s.jsx)("div",{className:"memori--whythisanswer-skeleton-text"}),(0,s.jsx)("div",{className:"memori--whythisanswer-skeleton-text"})]}),(0,s.jsx)("div",{className:"memori--whythisanswer-skeleton-block"})]}),(0,s.jsxs)("li",{children:[(0,s.jsxs)("div",{className:"memori--whythisanswer-title",children:[(0,s.jsx)("span",{className:"memori--whythisanswer-confidence",children:(0,s.jsx)("span",{className:"memori--whythisanswer-skeleton-text"})}),(0,s.jsxs)("div",{className:"memori--whythisanswer-title-text",children:[(0,s.jsx)("p",{className:"memori--whythisanswer-skeleton-text"}),(0,s.jsx)("p",{className:"memori--whythisanswer-skeleton-text"})]})]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("div",{className:"memori--whythisanswer-skeleton-text"}),(0,s.jsx)("div",{className:"memori--whythisanswer-skeleton-text"})]}),(0,s.jsx)("div",{className:"memori--whythisanswer-skeleton-block"})]})]}),h.length>0&&(0,s.jsx)("ul",{className:"memori--whythisanswer-list",children:h.map((e=>{var t,n,r,i,o,a,l;return(0,s.jsxs)("li",{children:[(0,s.jsxs)("div",{className:"memori--whythisanswer-title",children:[(0,s.jsx)("span",{className:"memori--whythisanswer-confidence",children:e.confidenceLevel}),(0,s.jsxs)("div",{className:"memori--whythisanswer-title-text",children:[(0,s.jsx)("p",{children:(0,s.jsx)("strong",{children:wx(null!==(t=e.memory.title)&&void 0!==t?t:"")})}),(0,s.jsx)("p",{children:null===(r=null===(n=e.memory.titleVariants)||void 0===n?void 0:n.map((e=>wx(e))))||void 0===r?void 0:r.join(" | ")})]})]}),null===(i=e.memory.answers)||void 0===i?void 0:i.map(((e,t)=>(0,s.jsx)("p",{className:"memori--whythisanswer-answer",children:(0,s.jsx)(Hv,{rows:3,children:e.text})},t))),(0,s.jsx)(Sx,{links:null===(o=e.memory.media)||void 0===o?void 0:o.filter((e=>"text/html"===e.mimeType))}),null===(l=null===(a=e.memory.media)||void 0===a?void 0:a.filter((e=>"text/plain"===e.mimeType)))||void 0===l?void 0:l.map((e=>(0,s.jsx)(Hv,{rows:2,lineHeightMultiplier:2,innerClassName:"memori--whythisanswer-snippet-expandable",children:(0,s.jsx)(ox,{medium:e,showCopyButton:!1,showLineNumbers:!1},e.mediumID)},e.mediumID)))]},e.memory.memoryID)}))})]})]})},Cx={};Cx=function(){"use strict";var e=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,t=/[\0-\x1F\x7F-\x9F]/,n=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\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-\u2E4F\u2E52-\u2E5D\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]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,r=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;function i(i){const o={};i=i||{},o.src_Any=e.source,o.src_Cc=t.source,o.src_Z=r.source,o.src_P=n.source,o.src_ZPCc=[o.src_Z,o.src_P,o.src_Cc].join("|"),o.src_ZCc=[o.src_Z,o.src_Cc].join("|");const s="[><|]";return o.src_pseudo_letter="(?:(?!"+s+"|"+o.src_ZPCc+")"+o.src_Any+")",o.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",o.src_auth="(?:(?:(?!"+o.src_ZCc+"|[@/\\[\\]()]).)+@)?",o.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",o.src_host_terminator="(?=$|"+s+"|"+o.src_ZPCc+")(?!"+(i["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+o.src_ZPCc+"))",o.src_path="(?:[/?#](?:(?!"+o.src_ZCc+"|"+s+"|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+o.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+o.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+o.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+o.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+o.src_ZCc+"|[']).)+\\'|\\'(?="+o.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+o.src_ZCc+"|[.]|$)|"+(i["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+o.src_ZCc+"|$)|;(?!"+o.src_ZCc+"|$)|\\!+(?!"+o.src_ZCc+"|[!]|$)|\\?(?!"+o.src_ZCc+"|[?]|$))+|\\/)?",o.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',o.src_xn="xn--[a-z0-9\\-]{1,59}",o.src_domain_root="(?:"+o.src_xn+"|"+o.src_pseudo_letter+"{1,63})",o.src_domain="(?:"+o.src_xn+"|(?:"+o.src_pseudo_letter+")|(?:"+o.src_pseudo_letter+"(?:-|"+o.src_pseudo_letter+"){0,61}"+o.src_pseudo_letter+"))",o.src_host="(?:(?:(?:(?:"+o.src_domain+")\\.)*"+o.src_domain+"))",o.tpl_host_fuzzy="(?:"+o.src_ip4+"|(?:(?:(?:"+o.src_domain+")\\.)+(?:%TLDS%)))",o.tpl_host_no_ip_fuzzy="(?:(?:(?:"+o.src_domain+")\\.)+(?:%TLDS%))",o.src_host_strict=o.src_host+o.src_host_terminator,o.tpl_host_fuzzy_strict=o.tpl_host_fuzzy+o.src_host_terminator,o.src_host_port_strict=o.src_host+o.src_port+o.src_host_terminator,o.tpl_host_port_fuzzy_strict=o.tpl_host_fuzzy+o.src_port+o.src_host_terminator,o.tpl_host_port_no_ip_fuzzy_strict=o.tpl_host_no_ip_fuzzy+o.src_port+o.src_host_terminator,o.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+o.src_ZPCc+"|>|$))",o.tpl_email_fuzzy="(^|"+s+'|"|\\(|'+o.src_ZCc+")("+o.src_email_name+"@"+o.tpl_host_fuzzy_strict+")",o.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+o.src_ZPCc+"))((?![$+<=>^`||])"+o.tpl_host_port_fuzzy_strict+o.src_path+")",o.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+o.src_ZPCc+"))((?![$+<=>^`||])"+o.tpl_host_port_no_ip_fuzzy_strict+o.src_path+")",o}function o(e){return Array.prototype.slice.call(arguments,1).forEach((function(t){t&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e}function s(e){return Object.prototype.toString.call(e)}function a(e){return"[object String]"===s(e)}function l(e){return"[object Object]"===s(e)}function c(e){return"[object RegExp]"===s(e)}function u(e){return"[object Function]"===s(e)}function d(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const h={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function p(e){return Object.keys(e||{}).reduce((function(e,t){return e||h.hasOwnProperty(t)}),!1)}const f={"http:":{validate:function(e,t,n){const r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},m="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",g="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function v(e){e.__index__=-1,e.__text_cache__=""}function y(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function b(){return function(e,t){t.normalize(e)}}function x(e){const t=e.re=i(e.__opts__),n=e.__tlds__.slice();function r(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||n.push(m),n.push(t.src_xn),t.src_tlds=n.join("|"),t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");const o=[];function s(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){const n=e.__schemas__[t];if(null===n)return;const r={validate:null,link:null};if(e.__compiled__[t]=r,l(n))return c(n.validate)?r.validate=y(n.validate):u(n.validate)?r.validate=n.validate:s(t,n),void(u(n.normalize)?r.normalize=n.normalize:n.normalize?s(t,n):r.normalize=b());a(n)?o.push(t):s(t,n)})),o.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:b()};const h=Object.keys(e.__compiled__).filter((function(t){return t.length>0&&e.__compiled__[t]})).map(d).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+h+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+h+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),v(e)}function S(e,t){const n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function w(e,t){const n=new S(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function _(e,t){if(!(this instanceof _))return new _(e,t);t||p(e)&&(t=e,e={}),this.__opts__=o({},h,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=o({},f,e),this.__compiled__={},this.__tlds__=g,this.__tlds_replaced__=!1,this.re={},x(this)}function C(e={},t={}){const n=new _(e,t);return E(n,t),{extensions:[{name:"autolink",level:"inline",start:e=>{const t=A(n,e);if(t)return t.index},tokenizer(e){if(this.lexer.state.inLink)return;const t=A(n,e);if(!t)return;let r;return 0===t.index?r=t.raw:1===t.index&&"<"===e.charAt(0)&&">"===e.charAt(t.lastIndex)&&(r=`<${t.raw}>`),r?{type:"link",raw:r,text:t.text,href:t.url,tokens:[{type:"text",raw:t.text,text:t.text}]}:void 0}}]}}function A(e,t){const n=e.match(t);if(n&&n.length)return n[0]}function E(e,t){const n=t.tlds;delete t.tlds;const r=t.tldsKeepOld;delete t.tldsKeepOld,n&&e.tlds(n,r)}return _.prototype.add=function(e,t){return this.__schemas__[e]=t,x(this),this},_.prototype.set=function(e){return this.__opts__=o(this.__opts__,e),this},_.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let t,n,r,i,o,s,a,l,c;if(this.re.schema_test.test(e))for(a=this.re.schema_search,a.lastIndex=0;null!==(t=a.exec(e));)if(i=this.testSchemaAt(e,t[2],a.lastIndex),i){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(o=n.index+n[1].length,(this.__index__<0||o<this.__index__)&&(this.__schema__="",this.__index__=o,this.__last_index__=n.index+n[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(c=e.indexOf("@"),c>=0&&null!==(r=e.match(this.re.email_fuzzy))&&(o=r.index+r[1].length,s=r.index+r[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&s>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=s))),this.__index__>=0},_.prototype.pretest=function(e){return this.re.pretest.test(e)},_.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},_.prototype.match=function(e){const t=[];let n=0;this.__index__>=0&&this.__text_cache__===e&&(t.push(w(this,n)),n=this.__last_index__);let r=n?e.slice(n):e;for(;this.test(r);)t.push(w(this,n)),r=r.slice(this.__last_index__),n+=this.__last_index__;return t.length?t:null},_.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;const t=this.re.schema_at_start.exec(e);if(!t)return null;const n=this.testSchemaAt(e,t[2],t[0].length);return n?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+n,w(this,0)):null},_.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,n){return e!==n[t-1]})).reverse(),x(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,x(this),this)},_.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},_.prototype.onCompile=function(){},C}();var Ax={};Ax=function(e){"use strict";const t=/^(\${1,2})(?!\$)((?:\\.|[^\\\n])*?(?:\\.|[^\\\n\$]))\1(?=[\s?!\.,:?!。,:]|$)/,n=/^(\${1,2})\n((?:\\[^]|[^\\])+?)\n\1(?:\n|$)/;function r(e={}){return{extensions:[o(e,i(e,!1)),s(e,i(e,!0))]}}function i(t,n){return r=>e.renderToString(r.text,{...t,displayMode:r.displayMode})+(n?"\n":"")}function o(e,n){return{name:"inlineKatex",level:"inline",start(e){let n,r=e;for(;r;){if(n=r.indexOf("$"),-1===n)return;if((0===n||" "===r.charAt(n-1))&&r.substring(n).match(t))return n;r=r.substring(n+1).replace(/^\$+/,"")}},tokenizer(e,n){const r=e.match(t);if(r)return{type:"inlineKatex",raw:r[0],text:r[2].trim(),displayMode:2===r[1].length}},renderer:n}}function s(e,t){return{name:"blockKatex",level:"block",tokenizer(e,t){const r=e.match(n);if(r)return{type:"blockKatex",raw:r[0],text:r[2].trim(),displayMode:2===r[1].length}},renderer:t}}return r}(o("kqAxc"));const Ex=(e,t,n,r)=>{if(!t.rowspan)return"";return`${`<${n}`+(t.colspan>1?` colspan=${t.colspan}`:"")+(t.rowspan>1?` rowspan=${t.rowspan}`:"")+(r?` align=${r}`:"")+">"+e}</${n}>\n`},Tx=(e,t,n=[])=>{var r,i,o;const s=[...e.matchAll(/(?:[^|\\]|\\.?)+(?:\|+|$)/g)].map((e=>e[0]));(null===(r=s[0])||void 0===r?void 0:r.trim())||s.shift(),(null===(i=s[s.length-1])||void 0===i?void 0:i.trim())||s.pop();let a,l,c,u,d,h=0;for(a=0;a<s.length;a++){if(c=s[a].split(/\|+$/)[0],s[a]={rowspan:1,colspan:Math.max(s[a].length-c.length,1),text:c.trim().replace(/\\\|/g,"|")},"^"===c.slice(-1)&&n.length)for(d=0,l=0;l<n.length;l++){if(u=n[l],d===h&&u.colspan===s[a].colspan){s[a].rowSpanTarget=null!==(o=u.rowSpanTarget)&&void 0!==o?o:u,s[a].rowSpanTarget.text+=` ${s[a].text.slice(0,-1)}`,s[a].rowSpanTarget.rowspan+=1,s[a].rowspan=0;break}if(d+=u.colspan,d>h)break}h+=s[a].colspan}if(h>t)s.splice(t);else for(;h<t;)s.push({colspan:1,text:""}),h+=1;return s};Fv.marked.use({async:!1,gfm:!0,pedantic:!0,renderer:{link(e,t,n){const r=am(e);if(null===r)return n;let i='<a href="'+(e=r)+'"';return t&&(i+=' title="'+t+'"'),i+=' target="_blank" rel="noopener noreferrer">'+n+"</a>",i}}}),Fv.marked.use(t(Cx)()),Fv.marked.use(t(Ax)({throwOnError:!0,output:"htmlAndMathml"})),Fv.marked.use({extensions:[{name:"spanTable",level:"block",start(e){var t;return null===(t=e.match(/^\n *([^\n ].*\|.*)\n/))||void 0===t?void 0:t.index},tokenizer(e,t){const n=new RegExp("^ *([^\\n ].*\\|.*\\n(?: *[^\\s].*\\n)*?) {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n| {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)| {0,3}#{1,6} | {0,3}>| {4}[^\\n]| {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n| {0,3}(?:[*+-]|1[.)]) |<\\/?(?: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[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?: +|\\n|\\/?>)|<(?:script|pre|style|textarea|!--)).*(?:\\n|$))*)\\n*|$)").exec(e);if(n){const e={type:"spanTable",header:n[1].replace(/\n$/,"").split("\n"),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]?n[3].replace(/\n$/,"").split("\n"):[]};e.header[0]=Tx(e.header[0]);const t=e.header[0].reduce(((e,t)=>e+t.colspan),0);if(t===e.align.length){let r,i,o,s;e.raw=n[0];let a=e.align.length;for(r=0;r<a;r++)/^ *-+: *$/.test(e.align[r])?e.align[r]="right":/^ *:-+: *$/.test(e.align[r])?e.align[r]="center":/^ *:-+ *$/.test(e.align[r])?e.align[r]="left":e.align[r]=null;for(a=e.header.length,r=1;r<a;r++)e.header[r]=Tx(e.header[r],t,e.header[r-1]);for(a=e.rows.length,r=0;r<a;r++)e.rows[r]=Tx(e.rows[r],t,e.rows[r-1]);for(a=e.header.length,i=0;i<a;i++)for(s=e.header[i],o=0;o<s.length;o++)s[o].tokens=[],this.lexer.inline(s[o].text,s[o].tokens);for(a=e.rows.length,i=0;i<a;i++)for(s=e.rows[i],o=0;o<s.length;o++)s[o].tokens=[],this.lexer.inline(s[o].text,s[o].tokens);return e}}},renderer(e){let t,n,r,i,o,s,a='<div class="memori--responsive-table-wrapper"><table class="memori--table">';for(a+="<thead>",t=0;t<e.header.length;t++){r=e.header[t];let o=0;for(a+="<tr>",n=0;n<r.length;n++)i=r[n],s=this.parser.parseInline(i.tokens),a+=Ex(s,i,"th",e.align[o]),o+=i.colspan;a+="</tr>"}if(a+="</thead>",e.rows.length){for(a+="<tbody>",t=0;t<e.rows.length;t++){for(r=e.rows[t],o=0,a+="<tr>",n=0;n<r.length;n++)i=r[n],s=this.parser.parseInline(i.tokens),a+=Ex(s,i,"td",e.align[o]),o+=i.colspan;a+="</tr>"}a+="</tbody>"}return a+="</table></div>",a}}]});var Mx=({message:e,memori:n,tenant:r,baseUrl:i,apiUrl:o,sessionID:a,showFeedback:l,showWhyThisAnswer:u=!0,simulateUserPrompt:d,showAIicon:h=!0,isFirst:p=!1,user:f,userAvatar:m,experts:g})=>{var v,y,b,x,S,w;const{t:_}=Se(),[C,A]=(0,c.useState)(!1),E=e.fromUser?e.translatedText||e.text:(0,Uv.sanitize)(Fv.marked.parse((e.translatedText||e.text).replaceAll(/\[([^\]]+)\]\(([^\)]+)\)/g,'<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>').replaceAll(/```markdown([^```]+)```/g,"$1").replaceAll("(","\\(").replaceAll(")","\\)").replaceAll(/(?<!\\)\(/g,"\\(").replaceAll(/(?<!\\)\)/g,"\\)")).trim().replace(/\n/g,"<br>").replace(/(<br>)+/g,"<br><br>"),{ADD_ATTR:["target"]}).replaceAll(/(?<!\\)\[/g,"\\[").replaceAll(/(?<!\\)\]/g,"\\]").replace(/(<br>)+/g,"<br>");return(0,c.useLayoutEffect)((()=>{"undefined"==typeof window||e.fromUser||"MathJax"in window&&window.MathJax.typesetPromise&&window.MathJax.typesetPromise([".memori-chat--bubble-content"])}),[e.text,e.fromUser]),(0,s.jsxs)(s.Fragment,{children:[(e.initial||p)&&(0,s.jsx)("div",{className:"memori-chat--bubble-initial"}),(0,s.jsxs)(np,{show:!0,appear:!0,as:"div",className:t(ws)("memori-chat--bubble-container",{"memori-chat--bubble-from-user":!!e.fromUser,"memori-chat--with-addon":e.generatedByAI&&h||l&&d}),children:[!e.fromUser&&(0,s.jsx)(np.Child,{as:"picture",className:"memori-chat--bubble-avatar",enter:"transition ease-in-out duration-300",enterFrom:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),enterTo:"opacity-1 scale-1 translate-x-0",leave:"transition ease-in-out duration-300",leaveFrom:"opacity-1 scale-1 translate-x-0",leaveTo:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),title:(null===(v=e.emitter)||void 0===v?void 0:v.length)&&n.enableBoardOfExperts?e.emitter:n.name,children:(0,s.jsx)("img",{className:"memori-chat--bubble-avatar-img",alt:(null===(y=e.emitter)||void 0===y?void 0:y.length)&&n.enableBoardOfExperts?e.emitter:n.name,src:(null===(b=e.emitter)||void 0===b?void 0:b.length)&&n.enableBoardOfExperts&&(null==g?void 0:g.find((t=>t.name===e.emitter)))?`${o}/api/v1/memoriai/memori/avatar/${null===(x=g.find((t=>t.name===e.emitter)))||void 0===x?void 0:x.expertMemoriID}`:n.avatarURL&&n.avatarURL.length>0?fv({type:"avatar",tenantID:null==r?void 0:r.id,resourceURI:n.avatarURL,baseURL:i,apiURL:o}):fv({tenantID:null==r?void 0:r.id,type:"avatar",baseURL:i||"https://www.aisuru.com",apiURL:o}),onError:e=>{e.currentTarget.src=n.avatarURL&&n.avatarURL.length>0?fv({type:"avatar",tenantID:null==r?void 0:r.id,resourceURI:n.avatarURL,baseURL:i}):fv({tenantID:null==r?void 0:r.id,type:"avatar",baseURL:i}),e.currentTarget.onerror=null}})}),(0,s.jsxs)(np.Child,{as:"div",className:t(ws)("memori-chat--bubble",{"memori-chat--user-bubble":!!e.fromUser,"memori-chat--with-addon":e.generatedByAI&&h||l&&d,"memori-chat--ai-generated":e.generatedByAI&&h,"memori-chat--with-feedback":l}),enter:"transition ease-in-out duration-300",enterFrom:"opacity-0 scale-09 translate-x-"+(e.fromUser?"30":"-30"),enterTo:"opacity-1 scale-1 translate-x-0",leave:"transition ease-in-out duration-300",leaveFrom:"opacity-1 scale-1 translate-x-0",leaveTo:"opacity-0 scale-09 translate-x-"+(e.fromUser?"30":"-30"),children:[(0,s.jsx)("div",{dir:"auto",className:"memori-chat--bubble-content",dangerouslySetInnerHTML:{__html:E}}),(e.generatedByAI&&h||l&&d)&&(0,s.jsxs)("div",{className:"memori-chat--bubble-addon",children:[l&&!!d&&(0,s.jsx)(zv,{memori:n,className:"memori-chat--bubble-feedback",dropdown:!0,onNegativeClick:e=>{e&&d(e)}}),e.generatedByAI&&h&&(0,s.jsx)(vv,{align:"left",content:_("generatedByAI"),className:"memori-chat--bubble-action-icon memori-chat--bubble-action-icon--ai",children:(0,s.jsx)("span",{children:(0,s.jsx)(gv,{title:_("generatedByAI")||void 0})})}),!e.fromUser&&e.questionAnswered&&o&&u&&(0,s.jsx)(Sf,{ghost:!0,shape:"circle",title:_("whyThisAnswer")||void 0,className:"memori-chat--bubble-action-icon",onClick:()=>A(!0),disabled:C,icon:(0,s.jsx)(jv,{title:_("whyThisAnswer")||void 0})})]})]}),e.fromUser&&(0,s.jsx)(s.Fragment,{children:m&&"string"==typeof m||!m&&(null===(S=null==f?void 0:f.avatarURL)||void 0===S?void 0:S.length)?(0,s.jsx)(np.Child,{as:"picture",className:"memori-chat--bubble-avatar",enter:"transition ease-in-out duration-300",enterFrom:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),enterTo:"opacity-1 scale-1 translate-x-0",leave:"transition ease-in-out duration-300",leaveFrom:"opacity-1 scale-1 translate-x-0",leaveTo:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),children:(0,s.jsx)("img",{className:"memori-chat--bubble-avatar-img",alt:null!==(w=null==f?void 0:f.userName)&&void 0!==w?w:"User",src:null!=m?m:null==f?void 0:f.avatarURL})}):m?(0,s.jsx)(np.Child,{as:"div",className:"memori-chat--bubble-avatar",enter:"transition ease-in-out duration-300",enterFrom:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),enterTo:"opacity-1 scale-1 translate-x-0",leave:"transition ease-in-out duration-300",leaveFrom:"opacity-1 scale-1 translate-x-0",leaveTo:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),children:m}):(0,s.jsx)(np.Child,{as:"div",className:"memori-chat--bubble-avatar",enter:"transition ease-in-out duration-300",enterFrom:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),enterTo:"opacity-1 scale-1 translate-x-0",leave:"transition ease-in-out duration-300",leaveFrom:"opacity-1 scale-1 translate-x-0",leaveTo:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),children:(0,s.jsx)(mv,{})})})]}),C&&o&&(0,s.jsx)(_x,{visible:C,message:e,closeDrawer:()=>A(!1),apiURL:o,sessionID:a})]})};c=o("85Hg2"),c=o("85Hg2");function Ix(e=0){let[t,n]=(0,c.useState)(e),r=(0,c.useCallback)((e=>n((t=>t|e))),[t]),i=(0,c.useCallback)((e=>Boolean(t&e)),[t]),o=(0,c.useCallback)((e=>n((t=>t&~e))),[n]),s=(0,c.useCallback)((e=>n((t=>t^e))),[n]);return{addFlag:r,hasFlag:i,removeFlag:o,toggleFlag:s}}let Rx=(0,(c=o("85Hg2")).createContext)(null);function Px(){let e=(0,c.useContext)(Rx);if(null===e){let e=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,Px),e}return e}function kx(){let[e,n]=(0,c.useState)([]);return[e.length>0?e.join(" "):void 0,(0,c.useMemo)((()=>function(e){let r=Mh((e=>(n((t=>[...t,e])),()=>n((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),i=(0,c.useMemo)((()=>({register:r,slot:e.slot,name:e.name,props:e.props})),[r,e.slot,e.name,e.props]);return t(c).createElement(Rx.Provider,{value:i},e.children)}),[n])]}let Ox=mh((function(e,t){let{passive:n=!1,...r}=e,i=Px(),o=`headlessui-label-${cp()}`,s=Ph(t);_h((()=>i.register(o)),[o,i.register]);let a={ref:s,...i.props,id:o};return n&&("onClick"in a&&delete a.onClick,"onClick"in r&&delete r.onClick),hh({ourProps:a,theirProps:r,slot:i.slot||{},defaultTag:"label",name:i.name||"Label"})}));var Nx,Lx=((Nx=Lx||{})[Nx.RegisterOption=0]="RegisterOption",Nx[Nx.UnregisterOption=1]="UnregisterOption",Nx);let Dx={0(e,t){let n=[...e.options,{id:t.id,element:t.element,propsRef:t.propsRef}];return{...e,options:Cp(n,(e=>e.element.current))}},1(e,t){let n=e.options.slice(),r=e.options.findIndex((e=>e.id===t.id));return-1===r?e:(n.splice(r,1),{...e,options:n})}},Bx=(0,c.createContext)(null);function zx(e){let t=(0,c.useContext)(Bx);if(null===t){let t=new Error(`<${e} /> is missing a parent <RadioGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,zx),t}return t}function Fx(e,t){return lh(t.type,Dx,e,t)}Bx.displayName="RadioGroupContext";let Ux=mh((function(e,n){let{value:r,defaultValue:i,name:o,onChange:s,by:a=((e,t)=>e===t),disabled:l=!1,...u}=e,d=Mh("string"==typeof a?(e,t)=>{let n=a;return(null==e?void 0:e[n])===(null==t?void 0:t[n])}:a),[h,p]=(0,c.useReducer)(Fx,{options:[]}),f=h.options,[m,g]=kx(),[v,y]=Zp(),b=`headlessui-radiogroup-${cp()}`,x=(0,c.useRef)(null),S=Ph(x,n),[w,_]=ym(r,s,i),C=(0,c.useMemo)((()=>f.find((e=>!e.propsRef.current.disabled))),[f]),A=(0,c.useMemo)((()=>f.some((e=>d(e.propsRef.current.value,w)))),[f,w]),E=Mh((e=>{var t;if(l||d(e,w))return!1;let n=null==(t=f.find((t=>d(t.propsRef.current.value,e))))?void 0:t.propsRef.current;return(null==n||!n.disabled)&&(null==_||_(e),!0)}));dm({container:x.current,accept:e=>"radio"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let T=Mh((e=>{let t=x.current;if(!t)return;let n=hp(t),r=f.filter((e=>!1===e.propsRef.current.disabled)).map((e=>e.element.current));switch(e.key){case ip.Enter:vm(e.currentTarget);break;case ip.ArrowLeft:case ip.ArrowUp:if(e.preventDefault(),e.stopPropagation(),Ep(r,mp.Previous|mp.WrapAround)===gp.Success){let e=f.find((e=>e.element.current===(null==n?void 0:n.activeElement)));e&&E(e.propsRef.current.value)}break;case ip.ArrowRight:case ip.ArrowDown:if(e.preventDefault(),e.stopPropagation(),Ep(r,mp.Next|mp.WrapAround)===gp.Success){let e=f.find((e=>e.element.current===(null==n?void 0:n.activeElement)));e&&E(e.propsRef.current.value)}break;case ip.Space:{e.preventDefault(),e.stopPropagation();let t=f.find((e=>e.element.current===(null==n?void 0:n.activeElement)));t&&E(t.propsRef.current.value)}}})),M=Mh((e=>(p({type:0,...e}),()=>p({type:1,id:e.id})))),I=(0,c.useMemo)((()=>({registerOption:M,firstOption:C,containsCheckedOption:A,change:E,disabled:l,value:w,compare:d})),[M,C,A,E,l,w,d]),R={ref:S,id:b,role:"radiogroup","aria-labelledby":m,"aria-describedby":v,onKeyDown:T},P=(0,c.useMemo)((()=>({value:w})),[w]);return t(c).createElement(y,{name:"RadioGroup.Description"},t(c).createElement(g,{name:"RadioGroup.Label"},t(c).createElement(Bx.Provider,{value:I},null!=o&&null!=w&&fm({[o]:w}).map((([e,n])=>t(c).createElement(dp,{features:up.Hidden,...gh({key:e,as:"input",type:"radio",checked:null!=n,hidden:!0,readOnly:!0,name:e,value:n})}))),hh({ourProps:R,theirProps:u,slot:P,defaultTag:"div",name:"RadioGroup"}))))}));var jx=(e=>(e[e.Empty=1]="Empty",e[e.Active=2]="Active",e))(jx||{});let Hx=mh((function(e,n){let r=(0,c.useRef)(null),i=Ph(r,n),o=`headlessui-radiogroup-option-${cp()}`,[s,a]=kx(),[l,u]=Zp(),{addFlag:d,removeFlag:h,hasFlag:p}=Ix(1),{value:f,disabled:m=!1,...g}=e,v=(0,c.useRef)({value:f,disabled:m});_h((()=>{v.current.value=f}),[f,v]),_h((()=>{v.current.disabled=m}),[m,v]);let{registerOption:y,disabled:b,change:x,firstOption:S,containsCheckedOption:w,value:_,compare:C}=zx("RadioGroup.Option");_h((()=>y({id:o,element:r,propsRef:v})),[o,y,r,e]);let A=Mh((e=>{var t;if(op(e.currentTarget))return e.preventDefault();!x(f)||(d(2),null==(t=r.current)||t.focus())})),E=Mh((e=>{if(op(e.currentTarget))return e.preventDefault();d(2)})),T=Mh((()=>h(2))),M=(null==S?void 0:S.id)===o,I=b||m,R=C(_,f),P={ref:i,id:o,role:"radio","aria-checked":R?"true":"false","aria-labelledby":s,"aria-describedby":l,"aria-disabled":!!I||void 0,tabIndex:I?-1:R||!w&&M?0:-1,onClick:I?void 0:A,onFocus:I?void 0:E,onBlur:I?void 0:T},k=(0,c.useMemo)((()=>({checked:R,disabled:I,active:p(2)})),[R,I,p]);return t(c).createElement(u,{name:"RadioGroup.Description"},t(c).createElement(a,{name:"RadioGroup.Label"},hh({ourProps:P,theirProps:g,slot:k,defaultTag:"div",name:"RadioGroup.Option"})))})),Vx=Object.assign(Ux,{Option:Hx,Label:Ox,Description:Xp});var Gx=({sendOnEnter:e,setSendOnEnter:n})=>{const{t:r}=Se();return(0,s.jsxs)(Ov,{as:"div",className:"memori-send-on-enter-menu",children:[(0,s.jsx)(Ov.Button,{className:t(ws)("memori-button","memori-button--circle","memori-button--icon-only","memori-share-button--button","memori--conversation-button"),children:(0,s.jsx)("div",{className:"memori-button--icon",children:(0,s.jsx)("span",{style:{display:"block",width:"1rem",height:"1rem"},children:"…"})})}),(0,s.jsx)(Ov.Items,{className:"memori-menu--overlay",children:(0,s.jsxs)(Vx,{value:e,onChange:n,children:[(0,s.jsx)(Vx.Option,{value:"keypress",className:"memori-menu--option",children:({checked:e})=>(0,s.jsx)(Ov.Item,{children:(0,s.jsx)(Sf,{className:"memori-menu--button",ghost:!0,outlined:e,icon:(0,s.jsx)("span",{className:"memori-menu--icon",children:e?"✓":""}),children:r("widget.sendOnKeypress")})})}),(0,s.jsx)(Vx.Option,{value:"click",className:"memori-menu--option",children:({checked:e})=>(0,s.jsx)(Ov.Item,{children:(0,s.jsx)(Sf,{className:"memori-menu--button",ghost:!0,outlined:e,icon:(0,s.jsx)("span",{className:"memori-menu--icon",children:e?"✓":""}),children:r("widget.sendOnClick")})})})]})})]})};c=o("85Hg2");var Wx=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M855 160.1l-189.2 23.5c-6.6.8-9.3 8.8-4.7 13.5l54.7 54.7-153.5 153.5a8.03 8.03 0 0 0 0 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l153.6-153.6 54.7 54.7a7.94 7.94 0 0 0 13.5-4.7L863.9 169a7.9 7.9 0 0 0-8.9-8.9zM416.6 562.3a8.03 8.03 0 0 0-11.3 0L251.8 715.9l-54.7-54.7a7.94 7.94 0 0 0-13.5 4.7L160.1 855c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 153.6-153.6c3.1-3.1 3.1-8.2 0-11.3l-45.2-45z"})});var qx=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M391 240.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L200 146.3a8.03 8.03 0 0 0-11.3 0l-42.4 42.3a8.03 8.03 0 0 0 0 11.3L280 333.6l-43.9 43.9a8.01 8.01 0 0 0 4.7 13.6L401 410c5.1.6 9.5-3.7 8.9-8.9L391 240.9zm10.1 373.2L240.8 633c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L146.3 824a8.03 8.03 0 0 0 0 11.3l42.4 42.3c3.1 3.1 8.2 3.1 11.3 0L333.7 744l43.7 43.7A8.01 8.01 0 0 0 391 783l18.9-160.1c.6-5.1-3.7-9.4-8.8-8.8zm221.8-204.2L783.2 391c6.6-.8 9.4-8.9 4.7-13.6L744 333.6 877.7 200c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.3a8.03 8.03 0 0 0-11.3 0L690.3 279.9l-43.7-43.7a8.01 8.01 0 0 0-13.6 4.7L614.1 401c-.6 5.2 3.7 9.5 8.8 8.9zM744 690.4l43.9-43.9a8.01 8.01 0 0 0-4.7-13.6L623 614c-5.1-.6-9.5 3.7-8.9 8.9L633 783.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L824 877.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L744 690.4z"})});var Kx=({disabled:e=!1,value:n,onChange:r,onPressEnter:i,onFocus:o,onBlur:a})=>{const{t:l}=Se(),[u,d]=(0,c.useState)(!1);return(0,s.jsx)("div",{"data-testid":"chat-textarea",className:t(ws)("memori-chat-textarea",{"memori-chat-textarea--expanded":u,"memori-chat-textarea--disabled":e}),children:(0,s.jsxs)("div",{className:"memori-chat-textarea--inner",children:[(0,s.jsx)("textarea",{className:"memori-chat-textarea--input",disabled:e,value:n,onChange:e=>{r(e.target.value)},onKeyDownCapture:e=>{"Enter"===e.key&&!e.shiftKey&&i&&i(e)},onFocus:o,onBlur:a}),(0,s.jsx)("div",{className:"memori-chat-textarea--expand",children:(0,s.jsx)(Sf,{className:t(ws)("memori-chat-textarea--expand-button"),onClick:()=>d(!u),padded:!1,ghost:!0,title:u?l("collapse")||"Collapse":l("expand")||"Expand",icon:u?(0,s.jsx)(qx,{}):(0,s.jsx)(Wx,{})})})]})})};var Jx=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2-8.5 2.1-13.8 10.7-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"})});c=o("85Hg2");var Qx=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z"})});var Yx=({listening:e,stopAudio:n,startListening:r,stopListening:i})=>{const{t:o}=Se(),[a,l]=(0,c.useState)(),u=(0,c.useRef)(null),d=e=>{e.preventDefault(),l(o("write_and_speak.holdToSpeak")||"Hold to record"),u.current||(u.current=setTimeout((()=>{n(),l(o("write_and_speak.releaseToEndListening")||"Release to end listening"),r()}),300))},h=()=>{u.current&&(clearTimeout(u.current),u.current=null),i(),l(void 0)};return(0,c.useEffect)((()=>()=>h()),[]),(0,s.jsx)(vv,{visible:!!a,content:(0,s.jsx)("span",{children:a||o("write_and_speak.pressAndHoldToSpeak")||"Press and hold to speak"}),align:"topLeft",className:"memori-mic-btn-tooltip",children:(0,s.jsx)(Sf,{primary:!0,className:t(ws)("memori-chat-inputs--mic",{"memori-chat-inputs--mic--listening":e}),title:e?o("write_and_speak.micButtonPopoverListening")||"Listening":o("write_and_speak.micButtonPopover")||"Start listening",onMouseDown:d,onTouchStart:d,onMouseUp:h,onMouseLeave:h,onTouchEnd:h,shape:"circle",icon:(0,s.jsx)(Qx,{})})})};var Zx=({dialogState:e,sendOnEnter:n="click",setSendOnEnter:r,userMessage:i="",onChangeUserMessage:o,sendMessage:a,onTextareaFocus:l,onTextareaBlur:c,onTextareaPressEnter:u,showMicrophone:d=!1,microphoneMode:h="HOLD_TO_TALK",listening:p=!1,stopAudio:f,startListening:m,stopListening:g})=>{const{t:v}=Se();return(0,s.jsxs)("fieldset",{id:"chat-fieldset",className:"memori-chat-inputs",disabled:"X2a"===(null==e?void 0:e.state)||"X3"===(null==e?void 0:e.state),children:[(0,s.jsx)(Gx,{sendOnEnter:n,setSendOnEnter:r}),(0,s.jsx)(Kx,{value:i,onChange:o,onPressEnter:u,onFocus:l,onBlur:c,disabled:["R2","R3","R4","R5","G3","X3"].includes((null==e?void 0:e.state)||"")}),(0,s.jsx)(Sf,{shape:"circle",primary:!!(null==i?void 0:i.length),disabled:!i||0===i.length,className:"memori-chat-inputs--send",onClick:()=>{a(i),f(),speechSynthesis.speak(new SpeechSynthesisUtterance(""))},title:v("send")||"Send",icon:(0,s.jsx)(Jx,{})}),d&&"HOLD_TO_TALK"===h&&(0,s.jsx)(Yx,{listening:p,startListening:m,stopListening:()=>{g(),(null==i?void 0:i.length)&&a(i)},stopAudio:f}),d&&"CONTINUOUS"===h&&(0,s.jsx)(Sf,{primary:!0,className:t(ws)("memori-chat-inputs--mic",{"memori-chat-inputs--mic--listening":p}),title:p?v("write_and_speak.micButtonPopoverListening")||"Listening":v("write_and_speak.micButtonPopover")||"Start listening",onClick:()=>{p?g():(f(),m())},shape:"circle",icon:(0,s.jsx)(Qx,{})})]})};c=o("85Hg2");const Xx={en:[{delayAfter:3,text:"Generating an accurate and fancy response..."},{delayAfter:3,text:"Generating a response that will blow your mind..."},{delayAfter:3,text:"Generating a response that will make you smile..."},{delayAfter:3,text:"Thinking of a response..."},{delayAfter:3,text:"Thinking of a response that will make you smile..."},{delayAfter:3,text:"Gathering my thoughts..."},{delayAfter:3,text:"Gathering my thoughts to give you a response..."}],it:[{delayAfter:3,text:"Sto generando una risposta accurata e fantasiosa..."},{delayAfter:3,text:"Sto generando una risposta che ti farà impazzire..."},{delayAfter:3,text:"Sto generando una risposta che ti farà sorridere..."},{delayAfter:3,text:"Sto pensando ad una risposta..."},{delayAfter:3,text:"Sto pensando ad una risposta che ti farà sorridere..."},{delayAfter:3,text:"Sto raccogliendo i miei pensieri..."},{delayAfter:3,text:"Sto raccogliendo i miei pensieri per darti una risposta..."}]},$x=(e=3)=>new Array(20*e).fill(" ").join("");var eS=({useDefaultSentences:e=!1,lang:t="en",sentence:n,sentences:r})=>{var i;const[o,a]=(0,c.useState)(0),[l,u]=(0,c.useState)((null===(i=null==r?void 0:r[t])||void 0===i?void 0:i.length)?`${r[t][0].text.endsWith("...")||!r[t][0].text.length?r[t][0].text:`${r[t][0].text}...`}${$x(r[t][0].delayAfter)}`:n?`${n.endsWith("...")||!n.length?n:`${n}...`}${$x()}`:""),[d,h]=(0,c.useState)("");return(0,c.useEffect)((()=>{const i=setInterval((()=>{var i;const s=l[d.length];if(void 0!==s&&l.length>0)h((e=>e+s));else if((null===(i=null==r?void 0:r[t])||void 0===i?void 0:i.length)&&o<r[t].length-1){const e=o+1,n=r[t][e];u(`${n.text.endsWith("...")||!n.text.length?n.text:`${n.text}...`}${$x(n.delayAfter)}`),h(""),a(e)}else if(!r&&!n&&e){const e=Xx[t][Math.floor(Math.random()*Xx[t].length)];u(`${e.text}${$x(e.delayAfter)}`),h("")}}),50);return()=>clearInterval(i)})),(0,s.jsx)("div",{className:"memori-chat--bubble",children:(0,s.jsxs)("div",{className:"memori-chat--bubble-typing",children:[(0,s.jsxs)("div",{id:"wave",children:[(0,s.jsx)("span",{className:"dot"}),(0,s.jsx)("span",{className:"dot"}),(0,s.jsx)("span",{className:"dot"})]}),l.length>0&&(0,s.jsx)("p",{children:d})]})})};var tS=(0,c.memo)((({memori:e,tenant:n,sessionID:r,baseUrl:i,apiUrl:o,translateTo:a,memoriTyping:l,typingText:u,showTypingText:d=!1,history:h=[],authToken:p,dialogState:f,simulateUserPrompt:m,showDates:g=!1,showContextPerLine:v=!1,showAIicon:y=!0,showWhyThisAnswer:b=!0,selectReceiverTag:x,preview:S=!1,instruct:w=!1,showInputs:_=!0,showMicrophone:C=!1,microphoneMode:A="HOLD_TO_TALK",sendOnEnter:E,setSendOnEnter:T,attachmentsMenuOpen:M,setAttachmentsMenuOpen:I,userMessage:R="",onChangeUserMessage:P,sendMessage:k,listening:O,isPlayingAudio:N,stopAudio:L,startListening:D,stopListening:B,resetTranscript:z,customMediaRenderer:F,user:U,userAvatar:j,experts:H})=>{var V,G,W,q,K,J,Q,Y;const Z=()=>{setTimeout((()=>{var e,t,n;null===(e=document.querySelector(".memori-chat--content"))||void 0===e||e.scrollTo(0,null!==(n=null===(t=document.querySelector(".memori-chat--content"))||void 0===t?void 0:t.scrollHeight)&&void 0!==n?n:0)}),200)};(0,c.useEffect)((()=>{!S&&Z()}),[h,S]);return(0,s.jsxs)("div",{className:t(ws)("memori-chat--wrapper",{"memori-chat-wrapper--translate":a}),id:"chat-wrapper",lang:null==a?void 0:a.toUpperCase(),"data-memori-lang":null!==(q=null===(W=null===(G=null===(V=e.culture)||void 0===V?void 0:V.split("-"))||void 0===G?void 0:G[0])||void 0===W?void 0:W.toUpperCase())&&void 0!==q?q:"EN",children:[(0,s.jsx)("div",{className:t(ws)("memori-chat--history",{"memori-chat--history-touch":Zf()}),children:(0,s.jsxs)("div",{className:t(ws)("memori-chat--content",{"memori-chat--content-touch":Zf()}),children:[(0,s.jsx)("div",{className:t(ws)("memori-chat--cover"),style:{backgroundImage:`url("${fv({type:"cover",tenantID:null==n?void 0:n.id,resourceURI:e.coverURL,baseURL:i,apiURL:o})}"), url("${fv({type:"cover",tenantID:null==n?void 0:n.id,baseURL:i||"https://www.aisuru.com",apiURL:o})}")`}}),h.map(((l,u)=>{var d,p,x,S;return(0,s.jsxs)(t(c).Fragment,{children:[(0,s.jsx)(Mx,{isFirst:0===u,message:l,memori:e,tenant:n,baseUrl:i,apiUrl:o,sessionID:r,simulateUserPrompt:m,showAIicon:y,showWhyThisAnswer:b,showFeedback:u===h.length-1&&!l.fromUser&&(null==f?void 0:f.acceptsFeedback),user:U,userAvatar:j,experts:H}),g&&!!l.timestamp&&(0,s.jsx)("small",{className:"memori-chat--timestamp "+(l.fromUser?"text-right":"text-left"),children:new Intl.DateTimeFormat("it",{hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date(l.timestamp.endsWith("Z")?l.timestamp:`${l.timestamp}Z`))}),v&&!!Object.keys(null!==(d=l.contextVars)&&void 0!==d?d:{}).length&&(0,s.jsx)("div",{className:"memori-chat--context-vars",children:Object.keys(null!==(p=l.contextVars)&&void 0!==p?p:{}).map((e=>{var t,n,r;return"-"===(null===(t=l.contextVars)||void 0===t?void 0:t[e])?(0,s.jsx)("div",{className:"memori-chat--context-tag memori-chat--context-tag-canceled",children:(0,s.jsx)("span",{className:"memori-chat--context-tag-text",children:e})},e):"✔️"===(null===(n=l.contextVars)||void 0===n?void 0:n[e])?(0,s.jsx)("div",{className:"memori-chat--context-tag",children:(0,s.jsx)("span",{className:"memori-chat--context-tag-text",children:e})},e):(0,s.jsx)("div",{className:"memori-chat--context-tag",children:(0,s.jsxs)("span",{className:"memori-chat--context-tag-text",children:[e,": ",null===(r=l.contextVars)||void 0===r?void 0:r[e]]})},e)}))}),(0,s.jsx)(Sx,{simulateUserPrompt:m,media:null===(x=null==l?void 0:l.media)||void 0===x?void 0:x.filter((e=>"text/html"!==e.mimeType&&"text/plain"!==e.mimeType)),links:null===(S=null==l?void 0:l.media)||void 0===S?void 0:S.filter((e=>"text/html"===e.mimeType)),sessionID:r,baseUrl:i,apiUrl:o,translateTo:a,customMediaRenderer:F})]},u)})),(null==f?void 0:f.hints)&&f.hints.length>0&&!l&&(0,s.jsx)(Sx,{simulateUserPrompt:m,hints:f.translatedHints?f.translatedHints:f.hints.map((e=>({text:e,originalText:e})))}),!!l&&(0,s.jsx)(eS,{useDefaultSentences:d,lang:a?"it"===a.toLowerCase()?"it":"en":"it"===(null===(Q=null===(J=null===(K=e.culture)||void 0===K?void 0:K.split("-"))||void 0===J?void 0:J[0])||void 0===Q?void 0:Q.toLowerCase())?"it":"en",sentence:u,sentences:e.enableBoardOfExperts?Qv:void 0},u),(0,s.jsx)("div",{id:"end-messages-ref"})]})}),"X3"===(null==f?void 0:f.state)&&r&&(0,s.jsx)("div",{className:"memori-chat--known-tags",children:Object.keys(null!==(Y=f.knownTags)&&void 0!==Y?Y:{}).filter((t=>t!==e.giverTag)).map((e=>{var t;return(0,s.jsx)(Sf,{icon:(0,s.jsx)("span",{className:"memori-chat--known-tag-icon",children:e}),className:"memori-chat--known-tag",onClick:()=>x(e),children:null===(t=f.knownTags)||void 0===t?void 0:t[e]},e)}))}),_&&(0,s.jsx)(Zx,{userMessage:R,onChangeUserMessage:P,dialogState:f,instruct:w,authToken:p,sendMessage:k,microphoneMode:A,sendOnEnter:E,setSendOnEnter:T,attachmentsMenuOpen:M,setAttachmentsMenuOpen:I,onTextareaPressEnter:()=>{"keypress"===E&&(null==R?void 0:R.length)>0&&(B(),k(R),P(""),z())},onTextareaFocus:()=>{var e,t,n,r;B(),Zf()&&window.innerWidth<=768&&(null===(t=null===(e=document.getElementById("chat-wrapper"))||void 0===e?void 0:e.classList)||void 0===t||t.add("chat-focused"),null===(r=null===(n=document.querySelector(".memori.memori-widget"))||void 0===n?void 0:n.classList)||void 0===r||r.add("chat-focused"),setTimeout((()=>{Z()}),300))},onTextareaBlur:()=>{var e,t,n,r,i;(null===(t=null===(e=document.getElementById("chat-wrapper"))||void 0===e?void 0:e.classList)||void 0===t?void 0:t.contains("chat-focused"))&&(null===(n=document.getElementById("chat-wrapper"))||void 0===n||n.classList.remove("chat-focused"),null===(i=null===(r=document.querySelector(".memori.memori-widget"))||void 0===r?void 0:r.classList)||void 0===i||i.remove("chat-focused"),Z())},startListening:D,stopListening:B,stopAudio:L,listening:O,isPlayingAudio:N,showMicrophone:C})]})}));c=o("85Hg2");var nS=({className:e,title:t})=>(0,s.jsxs)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:[(0,s.jsx)("path",{d:"M140 188h584v164h76V144c0-17.7-14.3-32-32-32H96c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h544v-76H140V188z"}),(0,s.jsx)("path",{d:"M414.3 256h-60.6c-3.4 0-6.4 2.2-7.6 5.4L219 629.4c-.3.8-.4 1.7-.4 2.6 0 4.4 3.6 8 8 8h55.1c3.4 0 6.4-2.2 7.6-5.4L322 540h196.2L422 261.4c-1.3-3.2-4.3-5.4-7.7-5.4zm12.4 228h-85.5L384 360.2 426.7 484zM936 528H800v-93c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v93H592c-13.3 0-24 10.7-24 24v176c0 13.3 10.7 24 24 24h136v152c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V752h136c13.3 0 24-10.7 24-24V552c0-13.3-10.7-24-24-24zM728 680h-88v-80h88v80zm160 0h-88v-80h88v80z"})]});var rS=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M464 720a48 48 0 1096 0 48 48 0 10-96 0zm16-304v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8zm475.7 440l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-783.5-27.9L512 239.9l339.8 588.2H172.2z"})});var iS=({memoriName:e,blockedUntil:t,notEnoughCredits:n=!1,showGiverInfo:r=!1,showTitle:i=!1,marginLeft:o=!1})=>{const{t:a}=Se(),l=new Date(t||Date.now());return n||l>new Date(Date.now())?(0,s.jsx)(vv,{className:"blocked-memori-badge--tooltip",content:n?(0,s.jsx)(s.Fragment,{children:a("notEnoughCredits")}):(0,s.jsxs)(s.Fragment,{children:[!r&&a("memoriBlockedAnon",{name:e,date:new Intl.DateTimeFormat("it",{day:"numeric",month:"long",year:"numeric"}).format(l)}),r&&a("memoriBlockedUntil",{date:new Intl.DateTimeFormat("it",{day:"numeric",month:"long",year:"numeric"}).format(l)}),r&&` ${a("memoriBlockedReasonExceedChats")}`,r&&(0,s.jsx)("br",{}),r&&`\n${a("memoriBlockedGiverHelper")}`]}),children:(0,s.jsxs)("div",{className:"blocked-memori-badge--wrapper",children:[(0,s.jsx)("div",{className:"blocked-memori-badge "+(o?" margin-left":""),children:(0,s.jsx)(rS,{className:"blocked-memori-badge--icon"})}),i&&(0,s.jsx)("span",{className:"blocked-memori-badge--title",children:a("memoriBlockedTitle")})]})}):null};var oS=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",width:"20",height:"16",viewBox:"0 0 640 512",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M211.2 96a64 64 0 10-128 0 64 64 0 10128 0zM32 256c0 17.7 14.3 32 32 32h85.6c10.1-39.4 38.6-71.5 75.8-86.6-9.7-6-21.2-9.4-33.4-9.4H96c-35.3 0-64 28.7-64 64zm461.6 32H576c17.7 0 32-14.3 32-32 0-35.3-28.7-64-64-64h-96c-11.7 0-22.7 3.1-32.1 8.6 38.1 14.8 67.4 47.3 77.7 87.4zm-102.4-61.6c-6.9-1.6-14.2-2.4-21.6-2.4h-96c-8.5 0-16.7 1.1-24.5 3.1-30.8 8.1-55.6 31.1-66.1 60.9-3.5 10-5.5 20.8-5.5 32 0 17.7 14.3 32 32 32h224c17.7 0 32-14.3 32-32 0-11.2-1.9-22-5.5-32-10.8-30.7-36.8-54.2-68.9-61.6zM563.2 96a64 64 0 10-128 0 64 64 0 10128 0zm-241.6 96a80 80 0 100-160 80 80 0 100 160zM32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32h576c17.7 0 32-14.3 32-32s-14.3-32-32-32H32z"})});var sS=({className:e,title:t})=>(0,s.jsxs)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",width:"20",height:"20",viewBox:"0 0 48 48",className:e,"aria-label":t,children:[(0,s.jsx)("path",{d:"M30.106 48v-2.745a2.213 2.213 0 012.213-2.212h6.11a2.392 2.392 0 002.326-2.466v-3.223a1.834 1.834 0 01.459-1.145 2.912 2.912 0 00.712-1.926l-.007-.667a1.016 1.016 0 01.651-.952h1.067a1.363 1.363 0 001.051-.456 1.304 1.304 0 00.19-1.395 67.032 67.032 0 01-3.037-7.51 4.767 4.767 0 01-.217-1.507l-.002-4.994a14.513 14.513 0 00-.552-3.963l-.006-.022a13.959 13.959 0 00-3.137-5.702q-.479-.516-1.006-1.003a17.67 17.67 0 00-.677-.623A18.303 18.303 0 0024.194 1a19.617 19.617 0 00-12.539 4.489 17.555 17.555 0 00-3.945 21.69C9.945 31.507 11.694 38.622 12.14 46v2",strokeMiterlimit:10}),(0,s.jsx)("path",{d:"M27.917 12L31.417 12"}),(0,s.jsx)("path",{d:"M27.917 26L31.417 26"}),(0,s.jsx)("path",{d:"M29.667 12L29.667 26"}),(0,s.jsx)("path",{d:"M23.992 26L19.904 12 19.226 12 15.159 26"}),(0,s.jsx)("path",{d:"M16.854 21.133L22.276 21.133"})]});c=o("85Hg2");var aS=({forceStatus:e,provider:t})=>{var n;const{t:r}=Se(),[i,o]=(0,c.useState)(null!=e?e:"operational"),a=(e=>{switch(e){case"DEFAULT":case"OpenAI":return{getStatus:async()=>{var e;const t=await fetch("https://status.openai.com/api/v2/summary.json"),n=null===(e=(await t.json()).components.find((e=>"API"===e.name)))||void 0===e?void 0:e.status;return null!=n?n:"operational"},statusPage:"https://status.openai.com/"};default:return{getStatus:async()=>"operational",statusPage:""}}})(t);return(0,c.useEffect)((()=>{e||a.getStatus().then((e=>o(e))).catch(console.log)}),[e,t]),"operational"!==i?(0,s.jsx)(vv,{className:"memori--completion-provider-status--tooltip",align:"topLeft",content:(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{children:r("completionProviderDown",{provider:null!=t?t:r("completionProviderFallbackName")})}),!!(null===(n=a.statusPage)||void 0===n?void 0:n.length)&&(0,s.jsx)("p",{children:(0,s.jsx)("a",{href:a.statusPage,rel:"noopener noreferrer",target:"_blank",children:r("completionProviderCheckStatusPage")})})]}),children:(0,s.jsx)(rS,{className:"memori--completion-provider-status--icon"})}):null};var lS=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",className:e,"aria-label":t,children:(0,s.jsx)("path",{fill:"currentColor",d:"M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0zM192 272c44.183 0 80-35.817 80-80s-35.817-80-80-80-80 35.817-80 80 35.817 80 80 80z"})});var cS=({memori:e,tenant:t,gamificationLevel:n,language:r,userLang:i,setUserLang:o,baseUrl:a,apiUrl:l,position:u,openPositionDrawer:d,integrationConfig:h,instruct:p=!1,clickedStart:f,onClickStart:m,initializeTTS:g,_TEST_forceProviderStatus:v,isUserLoggedIn:y=!1,user:b,showLogin:x=!1,setShowLoginDrawer:S,notEnoughCredits:w=!1})=>{var _,C;const{t:A,i18n:E}=Se(),[T,M]=(0,c.useState)(e.description),[I,R]=(0,c.useState)(!0);return(0,c.useEffect)((()=>{var t,n,i,o,s,l;(null!==(n=null===(t=E.language)||void 0===t?void 0:t.toUpperCase())&&void 0!==n?n:"IT")!==(null!==(i=null==r?void 0:r.toUpperCase())&&void 0!==i?i:"IT")&&(null===(o=e.description)||void 0===o?void 0:o.length)&&px(e.description,null!==(l=null===(s=E.language)||void 0===s?void 0:s.toUpperCase())&&void 0!==l?l:"IT",r,a).then((e=>{M(e.text)})).catch(console.error)}),[E.language,r,e.description,a]),(0,s.jsxs)("div",{className:"memori--start-panel",children:[(0,s.jsxs)("div",{className:"memori--cover",style:{backgroundImage:`url("${fv({type:"cover",tenantID:null==t?void 0:t.id,resourceURI:e.coverURL,baseURL:a,apiURL:l})}"), url("${fv({type:"cover",tenantID:null==t?void 0:t.id,baseURL:a,apiURL:l})}")`},children:[!!(null===(_=null==n?void 0:n.badge)||void 0===_?void 0:_.length)&&!e.enableBoardOfExperts&&(0,s.jsx)("div",{className:"memori--gamification-badge",children:(0,s.jsx)(vv,{align:"left",content:`${A("gamification.level")} ${n.badge}, ${n.points} ${A("gamification.points")}`,children:(0,s.jsx)("span",{"aria-label":`${A("gamification.level")} ${n.badge}, ${n.points} ${A("gamification.points")}`,children:n.badge})})}),!!e.enableCompletions&&!e.enableBoardOfExperts&&(0,s.jsx)("div",{className:"memori--completions-enabled",children:(0,s.jsx)(vv,{align:"left",content:A("completionsEnabled"),children:(0,s.jsx)("span",{"aria-label":A("completionsEnabled")||"Completions",children:(0,s.jsx)(gv,{})})})}),!!e.enableBoardOfExperts&&(0,s.jsx)("div",{className:"memori--board-of-experts",children:(0,s.jsx)(vv,{align:"left",content:A("boardOfExperts"),children:(0,s.jsx)("span",{"aria-label":A("boardOfExperts")||"Board of Experts",children:(0,s.jsx)(oS,{})})})}),!!e.nsfw&&(0,s.jsx)("div",{className:"memori--nsfw",children:(0,s.jsx)(vv,{align:"left",content:A("nsfw"),children:(0,s.jsx)("span",{title:A("nsfw")||"NSFW",children:"🔞"})})})]}),(0,s.jsxs)("picture",{className:"memori--avatar",children:[(0,s.jsx)("source",{src:null!==(C=e.avatarURL)&&void 0!==C?C:fv({type:"avatar",tenantID:null==t?void 0:t.id,resourceURI:e.avatarURL,baseURL:a,apiURL:l})}),(0,s.jsx)("img",{alt:e.name,src:e.avatarURL&&e.avatarURL.length>0?fv({type:"avatar",tenantID:null==t?void 0:t.id,resourceURI:e.avatarURL,baseURL:a,apiURL:l}):fv({type:"avatar",tenantID:null==t?void 0:t.id,baseURL:a,apiURL:l})})]}),(0,s.jsx)("h2",{className:"memori--title",children:e.name}),e.needsPosition&&!u&&(0,s.jsxs)("div",{className:"memori--needsPosition",children:[(0,s.jsx)("p",{children:A("write_and_speak.requirePositionHelp",{name:e.name})}),(0,s.jsx)(Sf,{primary:!0,onClick:()=>d(),className:"memori--start-button",icon:(0,s.jsx)(lS,{}),children:A("widget.position")})]}),(e.needsPosition&&u||!e.needsPosition)&&(0,s.jsxs)("div",{className:"memori--description",children:[(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"memori--description-text",children:T&&I?T:e.description}),T!==e.description&&(0,s.jsx)(Sf,{ghost:!0,className:"memori--translation-toggle",icon:(0,s.jsx)(nS,{}),onClick:()=>{R((e=>!e))},children:A(I?"showOriginalText":"showTranslatedText")})]}),(null==h?void 0:h.multilanguage)&&!p&&(0,s.jsxs)("div",{className:"memori--language-chooser",children:[(0,s.jsx)("label",{id:"user-lang-pref-label",htmlFor:"user-lang-pref",children:A("write_and_speak.iWantToTalkToIn",{name:e.name})}),(0,s.jsx)("select",{id:"user-lang-pref",className:"memori-select--button",value:(null!=i?i:E.language).toUpperCase(),"aria-labelledby":"user-lang-pref-label",onChange:e=>{o(e.target.value)},children:qv.map((e=>(0,s.jsx)("option",{value:e.value,"aria-label":e.label,children:e.label},e.value)))})]}),(0,s.jsx)(Sf,{primary:!0,disabled:!!e.blockedUntil&&!e.isGiver||w,loading:f,onClick:e=>{try{window.speechSynthesis.speak(new SpeechSynthesisUtterance(""))}catch(e){console.error(e)}g&&g(),m&&m()},className:"memori--start-button",children:A("write_and_speak."+(p?"instructButton":"tryMeButton"))}),(0,s.jsx)(aS,{provider:e.completionProvider,forceStatus:v}),(0,s.jsx)("p",{className:"memori--start-description",children:A(p?"write_and_speak.pageInstructExplanation":"write_and_speak.pageTryMeExplanation")}),(e.blockedUntil||w)&&(0,s.jsx)(iS,{memoriName:e.name,blockedUntil:e.blockedUntil,notEnoughCredits:w,showGiverInfo:e.isGiver,showTitle:!0,marginLeft:!0}),!!e.enableDeepThought&&!p&&(0,s.jsxs)("div",{className:"memori--deep-thought-disclaimer",children:[(0,s.jsx)(vv,{align:"left",content:A("deepThoughtHelper"),children:(0,s.jsx)(sS,{})}),(0,s.jsx)("h2",{children:y&&(null==b?void 0:b.pAndCUAccepted)?A("deepThoughtDisclaimerTitle"):A("deepThought")}),y&&!(null==b?void 0:b.pAndCUAccepted)&&(0,s.jsx)("p",{children:A("deepThoughtPreDisclaimerNotAllowed")}),!y&&(0,s.jsx)("p",{children:A("deepThoughtPreDisclaimerUnlogged")}),!y&&x&&(0,s.jsx)("p",{children:(0,s.jsx)(Sf,{outlined:!0,padded:!1,onClick:()=>S(!0),children:"Login"})}),(0,s.jsx)("p",{className:"memori--deep-thought-disclaimer-text",children:A("deepThoughtDisclaimer")})]})]})]})},uS=(c=o("85Hg2"),c=o("85Hg2"),Z=o("hcaHr"),c=o("85Hg2"),["forwardedRef"]);function dS(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 hS(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?dS(Object(r),!0).forEach((function(n){t(X)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dS(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}class pS extends c.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){console.error("Uncaught error:",e,t)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:(0,s.jsxs)("div",{style:{background:"rgba(255, 255, 255, 0.4)",color:"#000",padding:"2rem",borderRadius:"10px"},children:[(0,s.jsx)("h2",{children:this.props.t("error.generic")}),(0,s.jsx)(Sf,{primary:!0,onClick:()=>this.setState({hasError:!1}),children:this.props.t("error.tryAgain")||"Try again"})]}):this.props.children}}var fS=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(r){function i(i){var o=i.forwardedRef,s=t(uy)(i,uS),a=Se(e,hS(hS({},s),{},{keyPrefix:n.keyPrefix})),l=t(Z)(a,3),u=l[0],d=l[1],h=l[2],p=hS(hS({},s),{},{t:u,i18n:d,tReady:h});return n.withRef&&o?p.ref=o:!n.withRef&&o&&(p.forwardedRef=o),(0,c.createElement)(r,p)}i.displayName="withI18nextTranslation(".concat(ve(r),")"),i.WrappedComponent=r;return n.withRef?(0,c.forwardRef)((function(e,t){return(0,c.createElement)(i,Object.assign({},e,{forwardedRef:t}))})):i}}(["common"])(pS),mS=(c=o("85Hg2"),c=o("85Hg2"),{});e(mS,"REVISION",(()=>gS)),e(mS,"MOUSE",(()=>vS)),e(mS,"TOUCH",(()=>yS)),e(mS,"CullFaceNone",(()=>bS)),e(mS,"CullFaceBack",(()=>xS)),e(mS,"CullFaceFront",(()=>SS)),e(mS,"CullFaceFrontBack",(()=>wS)),e(mS,"BasicShadowMap",(()=>_S)),e(mS,"PCFShadowMap",(()=>CS)),e(mS,"PCFSoftShadowMap",(()=>AS)),e(mS,"VSMShadowMap",(()=>ES)),e(mS,"FrontSide",(()=>TS)),e(mS,"BackSide",(()=>MS)),e(mS,"DoubleSide",(()=>IS)),e(mS,"NoBlending",(()=>RS)),e(mS,"NormalBlending",(()=>PS)),e(mS,"AdditiveBlending",(()=>kS)),e(mS,"SubtractiveBlending",(()=>OS)),e(mS,"MultiplyBlending",(()=>NS)),e(mS,"CustomBlending",(()=>LS)),e(mS,"AddEquation",(()=>DS)),e(mS,"SubtractEquation",(()=>BS)),e(mS,"ReverseSubtractEquation",(()=>zS)),e(mS,"MinEquation",(()=>FS)),e(mS,"MaxEquation",(()=>US)),e(mS,"ZeroFactor",(()=>jS)),e(mS,"OneFactor",(()=>HS)),e(mS,"SrcColorFactor",(()=>VS)),e(mS,"OneMinusSrcColorFactor",(()=>GS)),e(mS,"SrcAlphaFactor",(()=>WS)),e(mS,"OneMinusSrcAlphaFactor",(()=>qS)),e(mS,"DstAlphaFactor",(()=>KS)),e(mS,"OneMinusDstAlphaFactor",(()=>JS)),e(mS,"DstColorFactor",(()=>QS)),e(mS,"OneMinusDstColorFactor",(()=>YS)),e(mS,"SrcAlphaSaturateFactor",(()=>ZS)),e(mS,"NeverDepth",(()=>XS)),e(mS,"AlwaysDepth",(()=>$S)),e(mS,"LessDepth",(()=>ew)),e(mS,"LessEqualDepth",(()=>tw)),e(mS,"EqualDepth",(()=>nw)),e(mS,"GreaterEqualDepth",(()=>rw)),e(mS,"GreaterDepth",(()=>iw)),e(mS,"NotEqualDepth",(()=>ow)),e(mS,"MultiplyOperation",(()=>sw)),e(mS,"MixOperation",(()=>aw)),e(mS,"AddOperation",(()=>lw)),e(mS,"NoToneMapping",(()=>cw)),e(mS,"LinearToneMapping",(()=>uw)),e(mS,"ReinhardToneMapping",(()=>dw)),e(mS,"CineonToneMapping",(()=>hw)),e(mS,"ACESFilmicToneMapping",(()=>pw)),e(mS,"CustomToneMapping",(()=>fw)),e(mS,"UVMapping",(()=>mw)),e(mS,"CubeReflectionMapping",(()=>gw)),e(mS,"CubeRefractionMapping",(()=>vw)),e(mS,"EquirectangularReflectionMapping",(()=>yw)),e(mS,"EquirectangularRefractionMapping",(()=>bw)),e(mS,"CubeUVReflectionMapping",(()=>xw)),e(mS,"RepeatWrapping",(()=>Sw)),e(mS,"ClampToEdgeWrapping",(()=>ww)),e(mS,"MirroredRepeatWrapping",(()=>_w)),e(mS,"NearestFilter",(()=>Cw)),e(mS,"NearestMipmapNearestFilter",(()=>Aw)),e(mS,"NearestMipMapNearestFilter",(()=>Ew)),e(mS,"NearestMipmapLinearFilter",(()=>Tw)),e(mS,"NearestMipMapLinearFilter",(()=>Mw)),e(mS,"LinearFilter",(()=>Iw)),e(mS,"LinearMipmapNearestFilter",(()=>Rw)),e(mS,"LinearMipMapNearestFilter",(()=>Pw)),e(mS,"LinearMipmapLinearFilter",(()=>kw)),e(mS,"LinearMipMapLinearFilter",(()=>Ow)),e(mS,"UnsignedByteType",(()=>Nw)),e(mS,"ByteType",(()=>Lw)),e(mS,"ShortType",(()=>Dw)),e(mS,"UnsignedShortType",(()=>Bw)),e(mS,"IntType",(()=>zw)),e(mS,"UnsignedIntType",(()=>Fw)),e(mS,"FloatType",(()=>Uw)),e(mS,"HalfFloatType",(()=>jw)),e(mS,"UnsignedShort4444Type",(()=>Hw)),e(mS,"UnsignedShort5551Type",(()=>Vw)),e(mS,"UnsignedInt248Type",(()=>Gw)),e(mS,"AlphaFormat",(()=>Ww)),e(mS,"RGBFormat",(()=>qw)),e(mS,"RGBAFormat",(()=>Kw)),e(mS,"LuminanceFormat",(()=>Jw)),e(mS,"LuminanceAlphaFormat",(()=>Qw)),e(mS,"DepthFormat",(()=>Yw)),e(mS,"DepthStencilFormat",(()=>Zw)),e(mS,"RedFormat",(()=>Xw)),e(mS,"RedIntegerFormat",(()=>$w)),e(mS,"RGFormat",(()=>e_)),e(mS,"RGIntegerFormat",(()=>t_)),e(mS,"RGBAIntegerFormat",(()=>n_)),e(mS,"RGB_S3TC_DXT1_Format",(()=>r_)),e(mS,"RGBA_S3TC_DXT1_Format",(()=>i_)),e(mS,"RGBA_S3TC_DXT3_Format",(()=>o_)),e(mS,"RGBA_S3TC_DXT5_Format",(()=>s_)),e(mS,"RGB_PVRTC_4BPPV1_Format",(()=>a_)),e(mS,"RGB_PVRTC_2BPPV1_Format",(()=>l_)),e(mS,"RGBA_PVRTC_4BPPV1_Format",(()=>c_)),e(mS,"RGBA_PVRTC_2BPPV1_Format",(()=>u_)),e(mS,"RGB_ETC1_Format",(()=>d_)),e(mS,"RGB_ETC2_Format",(()=>h_)),e(mS,"RGBA_ETC2_EAC_Format",(()=>p_)),e(mS,"RGBA_ASTC_4x4_Format",(()=>f_)),e(mS,"RGBA_ASTC_5x4_Format",(()=>m_)),e(mS,"RGBA_ASTC_5x5_Format",(()=>g_)),e(mS,"RGBA_ASTC_6x5_Format",(()=>v_)),e(mS,"RGBA_ASTC_6x6_Format",(()=>y_)),e(mS,"RGBA_ASTC_8x5_Format",(()=>b_)),e(mS,"RGBA_ASTC_8x6_Format",(()=>x_)),e(mS,"RGBA_ASTC_8x8_Format",(()=>S_)),e(mS,"RGBA_ASTC_10x5_Format",(()=>w_)),e(mS,"RGBA_ASTC_10x6_Format",(()=>__)),e(mS,"RGBA_ASTC_10x8_Format",(()=>C_)),e(mS,"RGBA_ASTC_10x10_Format",(()=>A_)),e(mS,"RGBA_ASTC_12x10_Format",(()=>E_)),e(mS,"RGBA_ASTC_12x12_Format",(()=>T_)),e(mS,"RGBA_BPTC_Format",(()=>M_)),e(mS,"LoopOnce",(()=>I_)),e(mS,"LoopRepeat",(()=>R_)),e(mS,"LoopPingPong",(()=>P_)),e(mS,"InterpolateDiscrete",(()=>k_)),e(mS,"InterpolateLinear",(()=>O_)),e(mS,"InterpolateSmooth",(()=>N_)),e(mS,"ZeroCurvatureEnding",(()=>L_)),e(mS,"ZeroSlopeEnding",(()=>D_)),e(mS,"WrapAroundEnding",(()=>B_)),e(mS,"NormalAnimationBlendMode",(()=>z_)),e(mS,"AdditiveAnimationBlendMode",(()=>F_)),e(mS,"TrianglesDrawMode",(()=>U_)),e(mS,"TriangleStripDrawMode",(()=>j_)),e(mS,"TriangleFanDrawMode",(()=>H_)),e(mS,"LinearEncoding",(()=>V_)),e(mS,"sRGBEncoding",(()=>G_)),e(mS,"BasicDepthPacking",(()=>W_)),e(mS,"RGBADepthPacking",(()=>q_)),e(mS,"TangentSpaceNormalMap",(()=>K_)),e(mS,"ObjectSpaceNormalMap",(()=>J_)),e(mS,"NoColorSpace",(()=>Q_)),e(mS,"SRGBColorSpace",(()=>Y_)),e(mS,"LinearSRGBColorSpace",(()=>Z_)),e(mS,"ZeroStencilOp",(()=>X_)),e(mS,"KeepStencilOp",(()=>$_)),e(mS,"ReplaceStencilOp",(()=>eC)),e(mS,"IncrementStencilOp",(()=>tC)),e(mS,"DecrementStencilOp",(()=>nC)),e(mS,"IncrementWrapStencilOp",(()=>rC)),e(mS,"DecrementWrapStencilOp",(()=>iC)),e(mS,"InvertStencilOp",(()=>oC)),e(mS,"NeverStencilFunc",(()=>sC)),e(mS,"LessStencilFunc",(()=>aC)),e(mS,"EqualStencilFunc",(()=>lC)),e(mS,"LessEqualStencilFunc",(()=>cC)),e(mS,"GreaterStencilFunc",(()=>uC)),e(mS,"NotEqualStencilFunc",(()=>dC)),e(mS,"GreaterEqualStencilFunc",(()=>hC)),e(mS,"AlwaysStencilFunc",(()=>pC)),e(mS,"StaticDrawUsage",(()=>fC)),e(mS,"DynamicDrawUsage",(()=>mC)),e(mS,"StreamDrawUsage",(()=>gC)),e(mS,"StaticReadUsage",(()=>vC)),e(mS,"DynamicReadUsage",(()=>yC)),e(mS,"StreamReadUsage",(()=>bC)),e(mS,"StaticCopyUsage",(()=>xC)),e(mS,"DynamicCopyUsage",(()=>SC)),e(mS,"StreamCopyUsage",(()=>wC)),e(mS,"GLSL1",(()=>_C)),e(mS,"GLSL3",(()=>CC)),e(mS,"_SRGBAFormat",(()=>AC)),e(mS,"EventDispatcher",(()=>EC)),e(mS,"MathUtils",(()=>UC)),e(mS,"Vector2",(()=>jC)),e(mS,"Matrix3",(()=>HC)),e(mS,"ColorManagement",(()=>YC)),e(mS,"Color",(()=>rA)),e(mS,"ImageUtils",(()=>oA)),e(mS,"Source",(()=>sA)),e(mS,"Texture",(()=>cA)),e(mS,"Vector4",(()=>uA)),e(mS,"WebGLRenderTarget",(()=>dA)),e(mS,"DataArrayTexture",(()=>hA)),e(mS,"WebGLArrayRenderTarget",(()=>pA)),e(mS,"Data3DTexture",(()=>fA)),e(mS,"WebGL3DRenderTarget",(()=>mA)),e(mS,"WebGLMultipleRenderTargets",(()=>gA)),e(mS,"Quaternion",(()=>vA)),e(mS,"Vector3",(()=>yA)),e(mS,"Box3",(()=>SA)),e(mS,"Sphere",(()=>UA)),e(mS,"Ray",(()=>JA)),e(mS,"Matrix4",(()=>QA)),e(mS,"Euler",(()=>oE)),e(mS,"Layers",(()=>sE)),e(mS,"Object3D",(()=>xE)),e(mS,"Triangle",(()=>PE)),e(mS,"Material",(()=>OE)),e(mS,"MeshBasicMaterial",(()=>NE)),e(mS,"BufferAttribute",(()=>BE)),e(mS,"Int8BufferAttribute",(()=>zE)),e(mS,"Uint8BufferAttribute",(()=>FE)),e(mS,"Uint8ClampedBufferAttribute",(()=>UE)),e(mS,"Int16BufferAttribute",(()=>jE)),e(mS,"Uint16BufferAttribute",(()=>HE)),e(mS,"Int32BufferAttribute",(()=>VE)),e(mS,"Uint32BufferAttribute",(()=>GE)),e(mS,"Float16BufferAttribute",(()=>WE)),e(mS,"Float32BufferAttribute",(()=>qE)),e(mS,"Float64BufferAttribute",(()=>KE)),e(mS,"BufferGeometry",(()=>tT)),e(mS,"Mesh",(()=>bT)),e(mS,"BoxGeometry",(()=>ST)),e(mS,"UniformsUtils",(()=>CT)),e(mS,"ShaderMaterial",(()=>AT)),e(mS,"Camera",(()=>ET)),e(mS,"PerspectiveCamera",(()=>TT)),e(mS,"CubeCamera",(()=>IT)),e(mS,"CubeTexture",(()=>RT)),e(mS,"WebGLCubeRenderTarget",(()=>PT)),e(mS,"Plane",(()=>LT)),e(mS,"Frustum",(()=>zT)),e(mS,"PlaneGeometry",(()=>jT)),e(mS,"ShaderChunk",(()=>HT)),e(mS,"UniformsLib",(()=>VT)),e(mS,"ShaderLib",(()=>GT)),e(mS,"OrthographicCamera",(()=>ZT)),e(mS,"PMREMGenerator",(()=>sM)),e(mS,"MeshDepthMaterial",(()=>nR)),e(mS,"MeshDistanceMaterial",(()=>rR)),e(mS,"WebGLUtils",(()=>aR)),e(mS,"ArrayCamera",(()=>lR)),e(mS,"Group",(()=>cR)),e(mS,"DepthTexture",(()=>hR)),e(mS,"WebGLRenderer",(()=>gR)),e(mS,"WebGL1Renderer",(()=>vR)),e(mS,"FogExp2",(()=>yR)),e(mS,"Fog",(()=>bR)),e(mS,"Scene",(()=>xR)),e(mS,"InterleavedBuffer",(()=>SR)),e(mS,"InterleavedBufferAttribute",(()=>_R)),e(mS,"SpriteMaterial",(()=>CR)),e(mS,"Sprite",(()=>zR)),e(mS,"LOD",(()=>HR)),e(mS,"SkinnedMesh",(()=>JR)),e(mS,"Bone",(()=>QR)),e(mS,"DataTexture",(()=>YR)),e(mS,"Skeleton",(()=>$R)),e(mS,"InstancedBufferAttribute",(()=>eP)),e(mS,"InstancedMesh",(()=>oP)),e(mS,"LineBasicMaterial",(()=>sP)),e(mS,"Line",(()=>hP)),e(mS,"LineSegments",(()=>mP)),e(mS,"LineLoop",(()=>gP)),e(mS,"PointsMaterial",(()=>vP)),e(mS,"Points",(()=>wP)),e(mS,"VideoTexture",(()=>CP)),e(mS,"FramebufferTexture",(()=>AP)),e(mS,"CompressedTexture",(()=>EP)),e(mS,"CanvasTexture",(()=>TP)),e(mS,"Curve",(()=>MP)),e(mS,"EllipseCurve",(()=>IP)),e(mS,"ArcCurve",(()=>RP)),e(mS,"CatmullRomCurve3",(()=>DP)),e(mS,"CubicBezierCurve",(()=>UP)),e(mS,"CubicBezierCurve3",(()=>jP)),e(mS,"LineCurve",(()=>HP)),e(mS,"LineCurve3",(()=>VP)),e(mS,"QuadraticBezierCurve",(()=>GP)),e(mS,"QuadraticBezierCurve3",(()=>WP)),e(mS,"SplineCurve",(()=>qP)),e(mS,"CurvePath",(()=>JP)),e(mS,"Path",(()=>QP)),e(mS,"LatheGeometry",(()=>YP)),e(mS,"CapsuleGeometry",(()=>ZP)),e(mS,"CircleGeometry",(()=>XP)),e(mS,"CylinderGeometry",(()=>$P)),e(mS,"ConeGeometry",(()=>ek)),e(mS,"PolyhedronGeometry",(()=>tk)),e(mS,"DodecahedronGeometry",(()=>nk)),e(mS,"EdgesGeometry",(()=>ak)),e(mS,"Shape",(()=>lk)),e(mS,"ShapeUtils",(()=>Nk)),e(mS,"ExtrudeGeometry",(()=>Bk)),e(mS,"IcosahedronGeometry",(()=>Fk)),e(mS,"OctahedronGeometry",(()=>Uk)),e(mS,"RingGeometry",(()=>jk)),e(mS,"ShapeGeometry",(()=>Hk)),e(mS,"SphereGeometry",(()=>Vk)),e(mS,"TetrahedronGeometry",(()=>Gk)),e(mS,"TorusGeometry",(()=>Wk)),e(mS,"TorusKnotGeometry",(()=>qk)),e(mS,"TubeGeometry",(()=>Kk)),e(mS,"WireframeGeometry",(()=>Jk)),e(mS,"ShadowMaterial",(()=>Zk)),e(mS,"RawShaderMaterial",(()=>Xk)),e(mS,"MeshStandardMaterial",(()=>$k)),e(mS,"MeshPhysicalMaterial",(()=>eO)),e(mS,"MeshPhongMaterial",(()=>tO)),e(mS,"MeshToonMaterial",(()=>nO)),e(mS,"MeshNormalMaterial",(()=>rO)),e(mS,"MeshLambertMaterial",(()=>iO)),e(mS,"MeshMatcapMaterial",(()=>oO)),e(mS,"LineDashedMaterial",(()=>sO)),e(mS,"AnimationUtils",(()=>pO)),e(mS,"Interpolant",(()=>fO)),e(mS,"CubicInterpolant",(()=>mO)),e(mS,"LinearInterpolant",(()=>gO)),e(mS,"DiscreteInterpolant",(()=>vO)),e(mS,"KeyframeTrack",(()=>yO)),e(mS,"BooleanKeyframeTrack",(()=>bO)),e(mS,"ColorKeyframeTrack",(()=>xO)),e(mS,"NumberKeyframeTrack",(()=>SO)),e(mS,"QuaternionLinearInterpolant",(()=>wO)),e(mS,"QuaternionKeyframeTrack",(()=>_O)),e(mS,"StringKeyframeTrack",(()=>CO)),e(mS,"VectorKeyframeTrack",(()=>AO)),e(mS,"AnimationClip",(()=>EO)),e(mS,"Cache",(()=>MO)),e(mS,"LoadingManager",(()=>IO)),e(mS,"DefaultLoadingManager",(()=>RO)),e(mS,"Loader",(()=>PO)),e(mS,"FileLoader",(()=>NO)),e(mS,"AnimationLoader",(()=>LO)),e(mS,"CompressedTextureLoader",(()=>DO)),e(mS,"ImageLoader",(()=>BO)),e(mS,"CubeTextureLoader",(()=>zO)),e(mS,"DataTextureLoader",(()=>FO)),e(mS,"TextureLoader",(()=>UO)),e(mS,"Light",(()=>jO)),e(mS,"HemisphereLight",(()=>HO)),e(mS,"SpotLight",(()=>JO)),e(mS,"PointLight",(()=>$O)),e(mS,"DirectionalLight",(()=>tN)),e(mS,"AmbientLight",(()=>nN)),e(mS,"RectAreaLight",(()=>rN)),e(mS,"SphericalHarmonics3",(()=>iN)),e(mS,"LightProbe",(()=>oN)),e(mS,"MaterialLoader",(()=>sN)),e(mS,"LoaderUtils",(()=>aN)),e(mS,"InstancedBufferGeometry",(()=>lN)),e(mS,"BufferGeometryLoader",(()=>cN)),e(mS,"ObjectLoader",(()=>uN)),e(mS,"ImageBitmapLoader",(()=>fN)),e(mS,"AudioContext",(()=>gN)),e(mS,"AudioLoader",(()=>vN)),e(mS,"HemisphereLightProbe",(()=>yN)),e(mS,"AmbientLightProbe",(()=>bN)),e(mS,"StereoCamera",(()=>_N)),e(mS,"Clock",(()=>CN)),e(mS,"AudioListener",(()=>RN)),e(mS,"Audio",(()=>PN)),e(mS,"PositionalAudio",(()=>DN)),e(mS,"AudioAnalyser",(()=>BN)),e(mS,"PropertyMixer",(()=>zN)),e(mS,"PropertyBinding",(()=>WN)),e(mS,"AnimationObjectGroup",(()=>qN)),e(mS,"AnimationMixer",(()=>QN)),e(mS,"Uniform",(()=>YN)),e(mS,"UniformsGroup",(()=>XN)),e(mS,"InstancedInterleavedBuffer",(()=>$N)),e(mS,"GLBufferAttribute",(()=>eL)),e(mS,"Raycaster",(()=>tL)),e(mS,"Spherical",(()=>iL)),e(mS,"Cylindrical",(()=>oL)),e(mS,"Box2",(()=>aL)),e(mS,"Line3",(()=>uL)),e(mS,"SpotLightHelper",(()=>hL)),e(mS,"SkeletonHelper",(()=>gL)),e(mS,"PointLightHelper",(()=>yL)),e(mS,"HemisphereLightHelper",(()=>wL)),e(mS,"GridHelper",(()=>_L)),e(mS,"PolarGridHelper",(()=>CL)),e(mS,"DirectionalLightHelper",(()=>ML)),e(mS,"CameraHelper",(()=>PL)),e(mS,"BoxHelper",(()=>NL)),e(mS,"Box3Helper",(()=>LL)),e(mS,"PlaneHelper",(()=>DL)),e(mS,"ArrowHelper",(()=>UL)),e(mS,"AxesHelper",(()=>jL)),e(mS,"ShapePath",(()=>HL)),e(mS,"DataUtils",(()=>WL)),e(mS,"ImmediateRenderObject",(()=>qL)),e(mS,"WebGLMultisampleRenderTarget",(()=>KL)),e(mS,"DataTexture2DArray",(()=>JL)),e(mS,"DataTexture3D",(()=>QL)),e(mS,"BoxBufferGeometry",(()=>YL)),e(mS,"CapsuleBufferGeometry",(()=>ZL)),e(mS,"CircleBufferGeometry",(()=>XL)),e(mS,"ConeBufferGeometry",(()=>$L)),e(mS,"CylinderBufferGeometry",(()=>eD)),e(mS,"DodecahedronBufferGeometry",(()=>tD)),e(mS,"ExtrudeBufferGeometry",(()=>nD)),e(mS,"IcosahedronBufferGeometry",(()=>rD)),e(mS,"LatheBufferGeometry",(()=>iD)),e(mS,"OctahedronBufferGeometry",(()=>oD)),e(mS,"PlaneBufferGeometry",(()=>sD)),e(mS,"PolyhedronBufferGeometry",(()=>aD)),e(mS,"RingBufferGeometry",(()=>lD)),e(mS,"ShapeBufferGeometry",(()=>cD)),e(mS,"SphereBufferGeometry",(()=>uD)),e(mS,"TetrahedronBufferGeometry",(()=>dD)),e(mS,"TorusBufferGeometry",(()=>hD)),e(mS,"TorusKnotBufferGeometry",(()=>pD)),e(mS,"TubeBufferGeometry",(()=>fD));
|
|
239
|
+
/*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE */Uv=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:i}=Object;let{freeze:o,seal:s,create:a}=Object,{apply:l,construct:c}="undefined"!=typeof Reflect&&Reflect;o||(o=function(e){return e}),s||(s=function(e){return e}),l||(l=function(e,t,n){return e.apply(t,n)}),c||(c=function(e,t){return new e(...t)});const u=S(Array.prototype.forEach),d=S(Array.prototype.pop),h=S(Array.prototype.push),p=S(String.prototype.toLowerCase),f=S(String.prototype.toString),m=S(String.prototype.match),g=S(String.prototype.replace),v=S(String.prototype.indexOf),y=S(String.prototype.trim),b=S(RegExp.prototype.test),x=w(TypeError);function S(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return l(e,t,r)}}function w(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return c(e,n)}}function _(e,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p;t&&t(e,null);let o=r.length;for(;o--;){let t=r[o];if("string"==typeof t){const e=i(t);e!==t&&(n(r)||(r[o]=e),t=e)}e[t]=!0}return e}function C(t){const n=a(null);for(const[r,o]of e(t))void 0!==i(t,r)&&(n[r]=o);return n}function A(e,t){for(;null!==e;){const n=i(e,t);if(n){if(n.get)return S(n.get);if("function"==typeof n.value)return S(n.value)}e=r(e)}function n(e){return console.warn("fallback value for",e),null}return n}const E=o(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),T=o(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),M=o(["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"]),I=o(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),R=o(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),P=o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),k=o(["#text"]),O=o(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),N=o(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),L=o(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),D=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B=s(/\{\{[\w\W]*|[\w\W]*\}\}/gm),z=s(/<%[\w\W]*|[\w\W]*%>/gm),F=s(/\${[\w\W]*}/gm),U=s(/^data-[\-\w.\u00B7-\uFFFF]/),j=s(/^aria-[\-\w]+$/),H=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),V=s(/^(?:\w+script|data):/i),G=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),W=s(/^html$/i);var q=Object.freeze({__proto__:null,MUSTACHE_EXPR:B,ERB_EXPR:z,TMPLIT_EXPR:F,DATA_ATTR:U,ARIA_ATTR:j,IS_ALLOWED_URI:H,IS_SCRIPT_OR_DATA:V,ATTR_WHITESPACE:G,DOCTYPE_NAME:W});const K=function(){return"undefined"==typeof window?null:window},J=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function Q(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K();const n=e=>Q(e);if(n.version="3.0.6",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;let{document:r}=t;const i=r,s=i.currentScript,{DocumentFragment:l,HTMLTemplateElement:c,Node:S,Element:w,NodeFilter:B,NamedNodeMap:z=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:F,DOMParser:U,trustedTypes:j}=t,V=w.prototype,G=A(V,"cloneNode"),Y=A(V,"nextSibling"),Z=A(V,"childNodes"),X=A(V,"parentNode");if("function"==typeof c){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let $,ee="";const{implementation:te,createNodeIterator:ne,createDocumentFragment:re,getElementsByTagName:ie}=r,{importNode:oe}=i;let se={};n.isSupported="function"==typeof e&&"function"==typeof X&&te&&void 0!==te.createHTMLDocument;const{MUSTACHE_EXPR:ae,ERB_EXPR:le,TMPLIT_EXPR:ce,DATA_ATTR:ue,ARIA_ATTR:de,IS_SCRIPT_OR_DATA:he,ATTR_WHITESPACE:pe}=q;let{IS_ALLOWED_URI:fe}=q,me=null;const ge=_({},[...E,...T,...M,...R,...k]);let ve=null;const ye=_({},[...O,...N,...L,...D]);let be=Object.seal(a(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),xe=null,Se=null,we=!0,_e=!0,Ce=!1,Ae=!0,Ee=!1,Te=!1,Me=!1,Ie=!1,Re=!1,Pe=!1,ke=!1,Oe=!0,Ne=!1;const Le="user-content-";let De=!0,Be=!1,ze={},Fe=null;const Ue=_({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let je=null;const He=_({},["audio","video","img","source","image","track"]);let Ve=null;const Ge=_({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),We="http://www.w3.org/1998/Math/MathML",qe="http://www.w3.org/2000/svg",Ke="http://www.w3.org/1999/xhtml";let Je=Ke,Qe=!1,Ye=null;const Ze=_({},[We,qe,Ke],f);let Xe=null;const $e=["application/xhtml+xml","text/html"],et="text/html";let tt=null,nt=null;const rt=r.createElement("form"),it=function(e){return e instanceof RegExp||e instanceof Function},ot=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!nt||nt!==e){if(e&&"object"==typeof e||(e={}),e=C(e),Xe=Xe=-1===$e.indexOf(e.PARSER_MEDIA_TYPE)?et:e.PARSER_MEDIA_TYPE,tt="application/xhtml+xml"===Xe?f:p,me="ALLOWED_TAGS"in e?_({},e.ALLOWED_TAGS,tt):ge,ve="ALLOWED_ATTR"in e?_({},e.ALLOWED_ATTR,tt):ye,Ye="ALLOWED_NAMESPACES"in e?_({},e.ALLOWED_NAMESPACES,f):Ze,Ve="ADD_URI_SAFE_ATTR"in e?_(C(Ge),e.ADD_URI_SAFE_ATTR,tt):Ge,je="ADD_DATA_URI_TAGS"in e?_(C(He),e.ADD_DATA_URI_TAGS,tt):He,Fe="FORBID_CONTENTS"in e?_({},e.FORBID_CONTENTS,tt):Ue,xe="FORBID_TAGS"in e?_({},e.FORBID_TAGS,tt):{},Se="FORBID_ATTR"in e?_({},e.FORBID_ATTR,tt):{},ze="USE_PROFILES"in e&&e.USE_PROFILES,we=!1!==e.ALLOW_ARIA_ATTR,_e=!1!==e.ALLOW_DATA_ATTR,Ce=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ae=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ee=e.SAFE_FOR_TEMPLATES||!1,Te=e.WHOLE_DOCUMENT||!1,Re=e.RETURN_DOM||!1,Pe=e.RETURN_DOM_FRAGMENT||!1,ke=e.RETURN_TRUSTED_TYPE||!1,Ie=e.FORCE_BODY||!1,Oe=!1!==e.SANITIZE_DOM,Ne=e.SANITIZE_NAMED_PROPS||!1,De=!1!==e.KEEP_CONTENT,Be=e.IN_PLACE||!1,fe=e.ALLOWED_URI_REGEXP||H,Je=e.NAMESPACE||Ke,be=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&it(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(be.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&it(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(be.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(be.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ee&&(_e=!1),Pe&&(Re=!0),ze&&(me=_({},[...k]),ve=[],!0===ze.html&&(_(me,E),_(ve,O)),!0===ze.svg&&(_(me,T),_(ve,N),_(ve,D)),!0===ze.svgFilters&&(_(me,M),_(ve,N),_(ve,D)),!0===ze.mathMl&&(_(me,R),_(ve,L),_(ve,D))),e.ADD_TAGS&&(me===ge&&(me=C(me)),_(me,e.ADD_TAGS,tt)),e.ADD_ATTR&&(ve===ye&&(ve=C(ve)),_(ve,e.ADD_ATTR,tt)),e.ADD_URI_SAFE_ATTR&&_(Ve,e.ADD_URI_SAFE_ATTR,tt),e.FORBID_CONTENTS&&(Fe===Ue&&(Fe=C(Fe)),_(Fe,e.FORBID_CONTENTS,tt)),De&&(me["#text"]=!0),Te&&_(me,["html","head","body"]),me.table&&(_(me,["tbody"]),delete xe.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw x('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw x('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');$=e.TRUSTED_TYPES_POLICY,ee=$.createHTML("")}else void 0===$&&($=J(j,s)),null!==$&&"string"==typeof ee&&(ee=$.createHTML(""));o&&o(e),nt=e}},st=_({},["mi","mo","mn","ms","mtext"]),at=_({},["foreignobject","desc","title","annotation-xml"]),lt=_({},["title","style","font","a","script"]),ct=_({},T);_(ct,M),_(ct,I);const ut=_({},R);_(ut,P);const dt=function(e){let t=X(e);t&&t.tagName||(t={namespaceURI:Je,tagName:"template"});const n=p(e.tagName),r=p(t.tagName);return!!Ye[e.namespaceURI]&&(e.namespaceURI===qe?t.namespaceURI===Ke?"svg"===n:t.namespaceURI===We?"svg"===n&&("annotation-xml"===r||st[r]):Boolean(ct[n]):e.namespaceURI===We?t.namespaceURI===Ke?"math"===n:t.namespaceURI===qe?"math"===n&&at[r]:Boolean(ut[n]):e.namespaceURI===Ke?!(t.namespaceURI===qe&&!at[r])&&!(t.namespaceURI===We&&!st[r])&&!ut[n]&&(lt[n]||!ct[n]):!("application/xhtml+xml"!==Xe||!Ye[e.namespaceURI]))},ht=function(e){h(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},pt=function(e,t){try{h(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){h(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ve[e])if(Re||Pe)try{ht(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},ft=function(e){let t=null,n=null;if(Ie)e="<remove></remove>"+e;else{const t=m(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Xe&&Je===Ke&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const i=$?$.createHTML(e):e;if(Je===Ke)try{t=(new U).parseFromString(i,Xe)}catch(e){}if(!t||!t.documentElement){t=te.createDocument(Je,"template",null);try{t.documentElement.innerHTML=Qe?ee:i}catch(e){}}const o=t.body||t.documentElement;return e&&n&&o.insertBefore(r.createTextNode(n),o.childNodes[0]||null),Je===Ke?ie.call(t,Te?"html":"body")[0]:Te?t.documentElement:o},mt=function(e){return ne.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT,null)},gt=function(e){return e instanceof F&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof z)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},vt=function(e){return"function"==typeof S&&e instanceof S},yt=function(e,t,r){se[e]&&u(se[e],(e=>{e.call(n,t,r,nt)}))},bt=function(e){let t=null;if(yt("beforeSanitizeElements",e,null),gt(e))return ht(e),!0;const r=tt(e.nodeName);if(yt("uponSanitizeElement",e,{tagName:r,allowedTags:me}),e.hasChildNodes()&&!vt(e.firstElementChild)&&b(/<[/\w]/g,e.innerHTML)&&b(/<[/\w]/g,e.textContent))return ht(e),!0;if(!me[r]||xe[r]){if(!xe[r]&&St(r)){if(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,r))return!1;if(be.tagNameCheck instanceof Function&&be.tagNameCheck(r))return!1}if(De&&!Fe[r]){const t=X(e)||e.parentNode,n=Z(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(G(n[r],!0),Y(e))}return ht(e),!0}return e instanceof w&&!dt(e)?(ht(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!b(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ee&&3===e.nodeType&&(t=e.textContent,u([ae,le,ce],(e=>{t=g(t,e," ")})),e.textContent!==t&&(h(n.removed,{element:e.cloneNode()}),e.textContent=t)),yt("afterSanitizeElements",e,null),!1):(ht(e),!0)},xt=function(e,t,n){if(Oe&&("id"===t||"name"===t)&&(n in r||n in rt))return!1;if(_e&&!Se[t]&&b(ue,t));else if(we&&b(de,t));else if(!ve[t]||Se[t]){if(!(St(e)&&(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,e)||be.tagNameCheck instanceof Function&&be.tagNameCheck(e))&&(be.attributeNameCheck instanceof RegExp&&b(be.attributeNameCheck,t)||be.attributeNameCheck instanceof Function&&be.attributeNameCheck(t))||"is"===t&&be.allowCustomizedBuiltInElements&&(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,n)||be.tagNameCheck instanceof Function&&be.tagNameCheck(n))))return!1}else if(Ve[t]);else if(b(fe,g(n,pe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==v(n,"data:")||!je[e])if(Ce&&!b(he,g(n,pe,"")));else if(n)return!1;return!0},St=function(e){return e.indexOf("-")>0},wt=function(e){yt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ve};let i=t.length;for(;i--;){const o=t[i],{name:s,namespaceURI:a,value:l}=o,c=tt(s);let h="value"===s?l:y(l);if(r.attrName=c,r.attrValue=h,r.keepAttr=!0,r.forceKeepAttr=void 0,yt("uponSanitizeAttribute",e,r),h=r.attrValue,r.forceKeepAttr)continue;if(pt(s,e),!r.keepAttr)continue;if(!Ae&&b(/\/>/i,h)){pt(s,e);continue}Ee&&u([ae,le,ce],(e=>{h=g(h,e," ")}));const p=tt(e.nodeName);if(xt(p,c,h)){if(!Ne||"id"!==c&&"name"!==c||(pt(s,e),h=Le+h),$&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(a);else switch(j.getAttributeType(p,c)){case"TrustedHTML":h=$.createHTML(h);break;case"TrustedScriptURL":h=$.createScriptURL(h)}try{a?e.setAttributeNS(a,s,h):e.setAttribute(s,h),d(n.removed)}catch(e){}}}yt("afterSanitizeAttributes",e,null)},_t=function e(t){let n=null;const r=mt(t);for(yt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)yt("uponSanitizeShadowNode",n,null),bt(n)||(n.content instanceof l&&e(n.content),wt(n));yt("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,o=null,s=null,a=null;if(Qe=!e,Qe&&(e="\x3c!--\x3e"),"string"!=typeof e&&!vt(e)){if("function"!=typeof e.toString)throw x("toString is not a function");if("string"!=typeof(e=e.toString()))throw x("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Me||ot(t),n.removed=[],"string"==typeof e&&(Be=!1),Be){if(e.nodeName){const t=tt(e.nodeName);if(!me[t]||xe[t])throw x("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof S)r=ft("\x3c!----\x3e"),o=r.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?r=o:r.appendChild(o);else{if(!Re&&!Ee&&!Te&&-1===e.indexOf("<"))return $&&ke?$.createHTML(e):e;if(r=ft(e),!r)return Re?null:ke?ee:""}r&&Ie&&ht(r.firstChild);const c=mt(Be?e:r);for(;s=c.nextNode();)bt(s)||(s.content instanceof l&&_t(s.content),wt(s));if(Be)return e;if(Re){if(Pe)for(a=re.call(r.ownerDocument);r.firstChild;)a.appendChild(r.firstChild);else a=r;return(ve.shadowroot||ve.shadowrootmode)&&(a=oe.call(i,a,!0)),a}let d=Te?r.outerHTML:r.innerHTML;return Te&&me["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&b(W,r.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+d),Ee&&u([ae,le,ce],(e=>{d=g(d,e," ")})),$&&ke?$.createHTML(d):d},n.setConfig=function(){ot(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Me=!0},n.clearConfig=function(){nt=null,Me=!1},n.isValidAttribute=function(e,t,n){nt||ot({});const r=tt(e),i=tt(t);return xt(r,i,n)},n.addHook=function(e,t){"function"==typeof t&&(se[e]=se[e]||[],h(se[e],t))},n.removeHook=function(e){if(se[e])return d(se[e])},n.removeHooks=function(e){se[e]&&(se[e]=[])},n.removeAllHooks=function(){se={}},n}return Q()}();var jv=({className:e,title:t})=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",viewBox:"0 0 24 24",className:e,"aria-label":t,children:[(0,s.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,s.jsx)("path",{d:"M9.09 9a3 3 0 015.83 1c0 2-3 3-3 3"}),(0,s.jsx)("path",{d:"M12 17L12.01 17"})]});c=o("85Hg2"),c=o("85Hg2");var Hv=({rows:e,className:n,innerClassName:r,btnClassName:i,lineHeightMultiplier:o=1.2,defaultExpanded:a=!1,expandSymbol:l=(()=>"..."),collapseSymbol:u=(e=>"it"===e?"Mostra meno":"Show less"),children:d})=>{const{i18n:h}=Se(),p=h.language,f=u(p),m=l(p),[g,v]=(0,c.useState)(a),[y,b]=(0,c.useState)(!1),[x,S]=(0,c.useState)(16),w=(0,c.useRef)(null);return(0,c.useEffect)((()=>{if(w.current){let t=w.current.getBoundingClientRect().height,n=getComputedStyle(w.current),r=n.lineHeight,i="normal"!==r&&(null==r?void 0:r.length)?parseInt(r,10):o*parseInt(n.fontSize,10);console.table({rows:e,lineHeight:i,height:t,maxHeight:e*i,needsExpanding:t>e*i}),S(i),t&&t>e*i&&b(!0)}}),[e,w.current]),(0,s.jsxs)("div",{className:t(ws)("memori-expandable",n),children:[(0,s.jsx)("div",{ref:w,className:t(ws)("memori-expandable--inner",r),style:{maxHeight:g||!y?"9999px":x*e+"px"},children:d}),y&&!g&&(0,s.jsx)(Sf,{ghost:!0,padded:!1,className:i,onClick:()=>v(!0),children:m}),y&&g&&(0,s.jsx)(Sf,{ghost:!0,padded:!1,className:i,onClick:()=>v(!1),children:f})]})};const Vv=new Map(Object.entries({TENANT_NOT_FOUND:-1,TENANT_REGISTRATION_DISABLED:-2,TENANT_MISSING_NAME:-3,TENANT_MAX_USERS_REACHED:-4,TENANT_MAX_ADMINS_REACHED:-5,TENANT_ALREADY_EXISTS:-6,TENANT_MISSING_DESCRIPTION:-7,TENANT_CANT_SET_COMPLETION_PROVIDER:-8,USER_NOT_CONFIRMED:-11,USER_NOT_FOUND:-12,USER_OR_PASSWORD_INVALID:-13,USER_MUST_CHANGE_PASSWORD:-14,USER_MUST_ENTER_VERIFICATION_CODE:-15,USER_MISSING_TENANT:-21,USER_MISSING_NAME:-22,USER_MISSING_PASSWORD:-23,USER_MISSING_EMAIL:-24,USER_MISSING_VERIFICATION_CODE:-25,USER_NAME_ALREADY_USED:-26,USER_PASSWORD_NOT_CONFORMING_TO_POLICY:-27,USER_EMAIL_ALREADY_USED:-28,USER_EMAIL_INVALID:-29,USER_VERIFICATION_CODE_INVALID:-30,USER_MISSING_NAME_OR_EMAIL:-31,USER_NAME_INVALID:-32,USER_HAS_ONE_OR_MORE_MEMORI:-33,USER_MISSING_NEW_PASSWORD:-34,USER_CANT_CREATE_MEMORI:-35,USER_MAX_MEMORI_REACHED:-36,USER_TOO_MANY_ATTEMPTS:-38,USER_MUST_ACCEPT_TNC_AND_PP:-39,USER_BIRTH_DATE_CANT_BE_CHANGED:-40,USER_CANT_SET_COMPLETION_PROVIDER:-41,USER_CANT_ENABLE_DEEP_THOUGHT:-42,USER_CANT_ENABLE_DCM_INTEGRATION:-43,USER_CANT_ENABLE_CHAINING_OR_BOARD_OF_EXPERTS:-44,USER_CREATION_BILLING_DENIED_PERMISSION:-46,MEMORI_NOT_FOUND:-51,MEMORI_NOT_ACCESSIBLE:-52,MEMORI_ONLY_OWNER_CAN_CHANGE_GIVER_TAG_AND_PIN:-53,SESSION_NOT_FOUND:-101,SESSION_IS_NOT_ADMINISTRATIVE:-102,SESSION_EXPIRED:-103,MEMORI_MISSING_CONFIGURATION:-201,MEMORI_CONFIGURATION_NOT_FOUND:-202,MEMORI_INVALID_PRIVACY_TYPE:-203,MEMORI_MISSING_PASSWORD:-204,MEMORI_INVALID_TOTAL_NUMBER_OF_RECOVERY_TOKENS:-205,MEMORI_INVALID_MINIMUM_NUMBER_OF_RECOVERY_TOKENS:-206,MEMORI_INVALID_VOICE_TYPE:-207,MEMORI_MISSING_NAME:-208,MEMORI_MISSING_PASSWORD_OR_RECOVERY_TOKENS:-209,MEMORI_INVALID_ID:-210,MEMORI_NAME_ALREADY_USED:-211,MEMORI_INVALID_PIN:-212,MEMORI_GIVER_TAG_PIN_CHANGE_REQUIRES_SEPARATE_OPERATION:-213,MEMORI_NO_PASSWORD_WHEN_PUBLIC:-214,MEMORI_DEEP_THOUGHT_REQUIRES_COMPLETIONS:-215,MEMORI_BOARD_OF_EXPERTS_REQUIRES_COMPLETIONS:-216,MEMORI_TRANSFER_MISSING_DESTINATION_USER:-231,MEMORI_TRANSFER_INVALID_DESTINATION_USER_ID:-232,MEMORI_TRANSFER_DESTINATION_USER_DATA_INCONSISTENT:-233,MEMORI_TRANSFER_NOTHING_TO_DO:-234,MEMORI_CONFIGURATION_CANT_BE_CHANGED:-251,MEMORI_MISSING_NEW_PASSWORD:-252,MEMORI_SESSIONS_INVALID_DATE_FROM_FORMAT:-261,MEMORI_SESSIONS_INVALID_DATE_TO_FORMAT:-262,MEMORI_FEATURE_REQUIRES_SUBSCRIPTION:-271,INTEGRATION_NOT_FOUND:-301,INTEGRATION_INVALID_TYPE:-401,INTEGRATION_ALREADY_EXISTS:-402,INTEGRATION_MEMORI_IS_NOT_PUBLIC:-403,INTEGRATION_MISSING_INVOCATION_TEXT:-404,INTEGRATION_MISSING_DEVICE_EMAILS:-405,INTEGRATION_MEMORI_IS_EMPTY:-406,INTEGRATION_MISSING_PRIVACY_POLICY:-407,INTEGRATION_MISSING_CATEGORY:-408,INTEGRATION_MISSING_DESCRIPTION:-409,INTEGRATION_INVALID_INVOCATION_TEXT:-410,INTEGRATION_GOOGLE_NO_MORE_AVAILABLE:-411,UPLOAD_REQUIRES_MULTIPART_ENCODING:-501,UPLOAD_MISSING_CONTENT_TYPE_BOUNDARY:-502,UPLOAD_MAX_LENGTH_EXCEEDED:-503,UPLOAD_FILE_IS_EMPTY:-504,UPLOAD_INVALID_FILE_TYPE_OR_SIGNATURE:-505,UPLOAD_MISSING_FILE_NAME:-506,UPLOAD_INVALID_MEMORY_ID:-507,UPLOAD_MISSING_FILE_CONTENT:-508,ASSET_NOT_FOUND:-601,ASSET_NOT_ACCESSIBLE:-602,ASSET_MISSING_SESSION_ID:-603,ASSET_INVALID_FILE_NAME:-604,INVITATION_NOT_FOUND:-701,INVITATION_NOT_ACCESSIBLE:-702,INVITATION_ALREADY_ACCEPTED:-703,INVITATION_ALREADY_REJECTED:-704,INVITATION_MISSING_DESTINATION_EMAIL:-705,INVITATION_DESTINATION_EMAIL_INVALID:-706,INVITATION_MISSING_TAG:-707,INVITATION_MISSING_PIN:-708,INVITATION_INVALID_PIN:-709,INVITATION_INVALID_TYPE:-710,INVITATION_MISSING_DESTINATION_NAME:-711,INVITATION_TAG_PIN_CANT_BE_CHANGED:-712,INVITATION_CANT_BE_CHANGED:-713,ACTIONLOG_INVALID_USER_ID:-801,ACTIONLOG_INVALID_DATE_FROM_FORMAT:-802,ACTIONLOG_INVALID_DATE_TO_FORMAT:-803,ACTIONLOG_INVALID_MEMORI_ID:-804,CONSUMPTIONLOG_INVALID_TYPE:-901,CONSUMPTIONLOG_INVALID_DATE_FROM_FORMAT:-902,CONSUMPTIONLOG_INVALID_DATE_TO_FORMAT:-903,CONSUMPTIONLOG_INVALID_USER_ID:-904,CONSUMPTIONLOG_INVALID_MEMORI_ID:-905,NOTIFICATIONPREFS_INVALID_CHATLOG_EXTRACTION_PERIOD:-1001,PROCESS_INVALID_TYPE:-1401,PROCESS_ALREADY_RUNNING:-1401,PROCESS_NOT_FOUND:-1402,IMPORTCSV_MISSING_ROWS:-1501,IMPORTCSV_MISSING_CSV:-1502,IMPORTCSV_MISSING_SEPARATOR:-1503,IMPORTCSV_INVALID_SEPARATOR:-1504,IMPORTCSV_MISSING_HEADERS:-1505,IMPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR:-1506,IMPORTCSV_INVALID_RECEIVER_ID:-1507,IMPORTCSV_INVALID_MEDIA_LINK:-1508,IMPORTCSV_UNDETECTABLE_CHAR_ENCODING:-1521,IMPORTCSV_CANT_IMPORT_TO_SECRET_MEMORI:-1531,IMPORTTXT_MISSING_ROWS:-1601,IMPORTTXT_INVALID_GRANULARITY:-1602,IMPORTTXT_INVALID_RECEIVER_ID:-1603,IMPORTTXT_INVALID_MEDIA_LINK:-1604,IMPORTTXT_UNDETECTABLE_CHAR_ENCODING:-1621,IMPORTTXT_CANT_IMPORT_TO_SECRET_MEMORI:-1631,IMPORTTXT_IMPORT_LIMIT_EXCEEDED:-1632,IMPORTTXT_IMPORT_ON_GPT4_REQUIRES_API_KEY:-1633,IMPORTTXT_IMPORT_REQUIRES_PAYING:-1634,IMPORTTXT_BILLING_DENIED_PERMISSION:-1635,EXPORTCSV_MISSING_CSV_SPECS:-1801,EXPORTCSV_MISSING_SEPARATOR:-1802,EXPORTCSV_INVALID_SEPARATOR:-1803,EXPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR:-1804,EXPORTCSV_MISSING_NEW_LINE_CHAR:-1805,EXPORTCSV_INVALID_NEW_LINE_CHAR:-1806,EXPORTCSV_MISSING_PASSWORD:-1811,EXPORTJSONL_MISSING_JSONL_SPECS:-1821,EXPORTJSONL_MISSING_PLATFORM:-1822,EXPORTJSONL_INVALID_PLATFORM:-1823,EXPORTJSONL_MISSING_PASSWORD:-1831,EXPORTJSONL_EXPORT_REQUIRES_PAYING:-1832,ANALYSIS_MISSING_QUERY:-1901,ANALYSIS_CANT_ANALYZE_SECRET_MEMORI:-1902,ANALYSIS_USER_QUERY_MATCH_REQUIRES_DEEP_THOUGHT:-1903,BADGE_ASSIGNMENT_WRONG_OR_MISSING_CREDENTIALS:-2001,BADGE_ASSIGNMENT_MISSING_REF_ID:-2002,BADGE_ASSIGNMENT_OUTCOME_NOT_FOUND:-2003,BADGE_ASSIGNMENT_MISSING_ASSERTION_URL:-2004,BADGE_ASSIGNMENT_MISSING_BADGE_URL:-2005,BADGE_ASSIGNMENT_MISSING_ISSUER_URL:-2006,BADGE_ASSIGNMENT_INVALID_URL:-2007,BADGE_ASSIGNMENT_MISSING_RECIPIENT:-2021,BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_TYPE:-2022,BADGE_ASSIGNMENT_MISSING_RECIPIENT_IDENTITY:-2023,BADGE_ASSIGNMENT_MISSING_RECIPIENT_HASH_TYPE:-2024,BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_HASH_TYPE:-2025,BADGE_ASSIGNMENT_WRONG_RECIPIENT_IDENTITY:-2026,BADGE_NOT_FOUND:-2051,OUTCOME_NO_DCM_CONFIGURED:-2071,OUTCOME_USER_BADGES_DISABLED:-2072}).map((([e,t])=>[t,e]))),Gv=e=>{if(!e)return"error.generic";if(401===e||403===e)return"error.unauthorized";if(404===e)return"error.notFound";if(422===e)return"error.unprocessableEntity";if(500===e)return"internal server error";let t=Vv.get(e);return t?`errors.${t}`:"error.generic"};var Wv=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"})});const qv=[{value:"IT",label:"Italiano"},{value:"EN",label:"English"},{value:"DE",label:"Deutsch"},{value:"ES",label:"Español"},{value:"FR",label:"Français"},{value:"PT",label:"Português"},{value:"UK",label:"Українська"},{value:"RU",label:"Русский"},{value:"PL",label:"Polski"},{value:"FI",label:"Suomi"},{value:"EL",label:"Ελληνικά"},{value:"AR",label:"العربية"},{value:"ZH",label:"中文"},{value:"JA",label:"日本語"}],Kv="👤",Jv=[{name:"text",lang:"text",mimeType:"text/plain",monacoLang:"plaintext",executable:!0},{name:"javascript/jsx",lang:"jsx",mimeType:"text/javascript",monacoLang:"javascript",executable:!0},{name:"typescript/tsx",lang:"tsx",mimeType:"text/ecmascript",monacoLang:"typescript",executable:!0},{name:"json",lang:"json",mimeType:"application/json",monacoLang:"json",executable:!0},{name:"css",lang:"scss",mimeType:"text/css",monacoLang:"css",executable:!0},{name:"html/xml",lang:"tsx",mimeType:"application/xml",monacoLang:"xml"},{name:"bash",lang:"bash",mimeType:"application/x-sh",monacoLang:"shell"},{name:"python",lang:"python",mimeType:"text/x-python",monacoLang:"python"},{name:"cpp/csharp",lang:"cpp",mimeType:"text/x-c++src",monacoLang:"cpp"},{name:"php",lang:"php",mimeType:"application/x-php",monacoLang:"php"},{name:"ruby",lang:"ruby",mimeType:"text/x-ruby",monacoLang:"ruby"},{name:"sql",lang:"sql",mimeType:"text/x-sql",monacoLang:"sql"}],Qv={it:[{text:"",delayAfter:10},{text:"Cerco l'esperto più adatto",delayAfter:5},{text:"Contatto l'esperto",delayAfter:3},{text:"Spiego all'esperto la domanda",delayAfter:2},{text:"L'esperto sta preparando una risposta",delayAfter:6},{text:"Genero una risposta adatta",delayAfter:3}],en:[{text:"",delayAfter:10},{text:"I'm looking for the most suitable expert",delayAfter:5},{text:"I'm contacting the expert",delayAfter:3},{text:"I'm explaining the question to the expert",delayAfter:2},{text:"The expert is preparing an answer",delayAfter:6},{text:"I am generating a suitable answer",delayAfter:3}]};var Yv={};function Zv(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}(Yv=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){Zv(o,r,i,s,a,"next",e)}function a(e){Zv(o,r,i,s,a,"throw",e)}s(void 0)}))}}).__esModule=!0,Yv.default=Yv;var Xv={};function $v(){return Xv=$v=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},Xv.__esModule=!0,Xv.default=Xv,$v.apply(this,arguments)}(Xv=$v).__esModule=!0,Xv.default=Xv;ee=o("ffgrs"),te=o("22y1y");var ey={},ty={};function ny(e,t){return ty=ny=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ty.__esModule=!0,ty.default=ty,ny(e,t)}(ty=ny).__esModule=!0,ty.default=ty,(ey=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&&ty(e,t)}).__esModule=!0,ey.default=ey;var ry={},iy=o("lEJSL").default,oy={};(oy=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}).__esModule=!0,oy.default=oy,(ry=function(e,t){if(t&&("object"===iy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return oy(e)}).__esModule=!0,ry.default=ry;var sy={};function ay(e){return sy=ay=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sy.__esModule=!0,sy.default=sy,ay(e)}(sy=ay).__esModule=!0,sy.default=sy;var ly,cy=o("7qcgS")();ly=cy;try{regeneratorRuntime=cy}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=cy:Function("r","regeneratorRuntime = r")(cy)}c=o("85Hg2");var uy={},dy={};(dy=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}).__esModule=!0,dy.default=dy,(uy=function(e,t){if(null==e)return{};var n,r,i=dy(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}).__esModule=!0,uy.default=uy;var hy={},py={},fy=o("e3mvX");(py=function(e){if(Array.isArray(e))return fy(e)}).__esModule=!0,py.default=py;var my={};(my=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}).__esModule=!0,my.default=my;var gy=o("8xD61"),vy={};(vy=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.")}).__esModule=!0,vy.default=vy,(hy=function(e){return py(e)||my(e)||gy(e)||vy()}).__esModule=!0,hy.default=hy;c=o("85Hg2"),c=o("85Hg2");function yy(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 by(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?yy(Object(r),!0).forEach((function(n){t(X)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yy(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var xy={};function Sy(e){if(0===e.length||1===e.length)return e;var t,n,r=e.join(".");return xy[r]||(xy[r]=0===(n=(t=e).length)||1===n?t:2===n?[t[0],t[1],"".concat(t[0],".").concat(t[1]),"".concat(t[1],".").concat(t[0])]:3===n?[t[0],t[1],t[2],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0])]:n>=4?[t[0],t[1],t[2],t[3],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[2],".").concat(t[3]),"".concat(t[3],".").concat(t[0]),"".concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[0]),"".concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[3],".").concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[2],".").concat(t[1],".").concat(t[0])]:void 0),xy[r]}function wy(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=e.filter((function(e){return"token"!==e})),i=Sy(r);return i.reduce((function(e,t){return by(by({},e),n[t])}),t)}function _y(e){return e.join(" ")}function Cy(e){var n=e.node,r=e.stylesheet,i=e.style,o=void 0===i?{}:i,s=e.useInlineStyles,a=e.key,l=n.properties,u=n.type,d=n.tagName,h=n.value;if("text"===u)return h;if(d){var p,f=function(e,t){var n=0;return function(r){return n+=1,r.map((function(r,i){return Cy({node:r,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(i)})}))}}(r,s);if(s){var m=Object.keys(r).reduce((function(e,t){return t.split(".").forEach((function(t){e.includes(t)||e.push(t)})),e}),[]),g=l.className&&l.className.includes("token")?["token"]:[],v=l.className&&g.concat(l.className.filter((function(e){return!m.includes(e)})));p=by(by({},l),{},{className:_y(v)||void 0,style:wy(l.className,Object.assign({},l.style,o),r)})}else p=by(by({},l),{},{className:_y(l.className)});var y=f(n.children);return t(c).createElement(d,t(Xv)({key:a},p),y)}}var Ay=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function Ey(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 Ty(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?Ey(Object(r),!0).forEach((function(n){t(X)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ey(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var My=/\n/g;function Iy(e){var n=e.codeString,r=e.codeStyle,i=e.containerStyle,o=void 0===i?{float:"left",paddingRight:"10px"}:i,s=e.numberStyle,a=void 0===s?{}:s,l=e.startingLineNumber;return t(c).createElement("code",{style:Object.assign({},r,o)},function(e){var n=e.lines,r=e.startingLineNumber,i=e.style;return n.map((function(e,n){var o=n+r;return t(c).createElement("span",{key:"line-".concat(n),className:"react-syntax-highlighter-line-number",style:"function"==typeof i?i(o):i},"".concat(o,"\n"))}))}({lines:n.replace(/\n$/,"").split("\n"),style:a,startingLineNumber:l}))}function Ry(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function Py(e,t,n){var r,i={display:"inline-block",minWidth:(r=n,"".concat(r.toString().length,".25em")),paddingRight:"1em",textAlign:"right",userSelect:"none"},o="function"==typeof e?e(t):e;return Ty(Ty({},i),o)}function ky(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,i=e.largestLineNumber,o=e.showInlineLineNumbers,s=e.lineProps,a=void 0===s?{}:s,l=e.className,c=void 0===l?[]:l,u=e.showLineNumbers,d=e.wrapLongLines,h="function"==typeof a?a(n):a;if(h.className=c,n&&o){var p=Py(r,n,i);t.unshift(Ry(n,p))}return d&u&&(h.style=Ty(Ty({},h.style),{},{display:"flex"})),{type:"element",tagName:"span",properties:h,children:t}}function Oy(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=0;i<e.length;i++){var o=e[i];if("text"===o.type)r.push(ky({children:[o],className:t(hy)(new Set(n))}));else if(o.children){var s=n.concat(o.properties.className);Oy(o.children,s).forEach((function(e){return r.push(e)}))}}return r}function Ny(e,t,n,r,i,o,s,a,l){var c,u=Oy(e.value),d=[],h=-1,p=0;function f(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return ky({children:e,lineNumber:t,lineNumberStyle:a,largestLineNumber:s,showInlineLineNumbers:i,lineProps:n,className:o,showLineNumbers:r,wrapLongLines:l})}function m(e,t){if(r&&t&&i){var n=Py(a,t,s);e.unshift(Ry(t,n))}return e}function g(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return t||r.length>0?f(e,n,r):m(e,n)}for(var v=function(){var e=u[p],t=e.children[0].value;if(t.match(My)){var n=t.split("\n");n.forEach((function(t,i){var s=r&&d.length+o,a={type:"text",value:"".concat(t,"\n")};if(0===i){var l=g(u.slice(h+1,p).concat(ky({children:[a],className:e.properties.className})),s);d.push(l)}else if(i===n.length-1){var c=u[p+1]&&u[p+1].children&&u[p+1].children[0],f={type:"text",value:"".concat(t)};if(c){var m=ky({children:[f],className:e.properties.className});u.splice(p+1,0,m)}else{var v=g([f],s,e.properties.className);d.push(v)}}else{var y=g([a],s,e.properties.className);d.push(y)}})),h=p}p++};p<u.length;)v();if(h!==u.length-1){var y=u.slice(h+1,u.length);if(y&&y.length){var b=g(y,r&&d.length+o);d.push(b)}}return t?d:(c=[]).concat.apply(c,d)}function Ly(e){var t=e.rows,n=e.stylesheet,r=e.useInlineStyles;return t.map((function(e,t){return Cy({node:e,stylesheet:n,useInlineStyles:r,key:"code-segement".concat(t)})}))}function Dy(e){return e&&void 0!==e.highlightAuto}function By(e,n){return function(r){var i=r.language,o=r.children,s=r.style,a=void 0===s?n:s,l=r.customStyle,u=void 0===l?{}:l,d=r.codeTagProps,h=void 0===d?{className:i?"language-".concat(i):void 0,style:Ty(Ty({},a['code[class*="language-"]']),a['code[class*="language-'.concat(i,'"]')])}:d,p=r.useInlineStyles,f=void 0===p||p,m=r.showLineNumbers,g=void 0!==m&&m,v=r.showInlineLineNumbers,y=void 0===v||v,b=r.startingLineNumber,x=void 0===b?1:b,S=r.lineNumberContainerStyle,w=r.lineNumberStyle,_=void 0===w?{}:w,C=r.wrapLines,A=r.wrapLongLines,E=void 0!==A&&A,T=r.lineProps,M=void 0===T?{}:T,I=r.renderer,R=r.PreTag,P=void 0===R?"pre":R,k=r.CodeTag,O=void 0===k?"code":k,N=r.code,L=void 0===N?(Array.isArray(o)?o[0]:o)||"":N,D=r.astGenerator,B=t(uy)(r,Ay);D=D||e;var z=g?t(c).createElement(Iy,{containerStyle:S,codeStyle:h.style||{},numberStyle:_,startingLineNumber:x,codeString:L}):null,F=a.hljs||a['pre[class*="language-"]']||{backgroundColor:"#fff"},U=Dy(D)?"hljs":"prismjs",j=f?Object.assign({},B,{style:Object.assign({},F,u)}):Object.assign({},B,{className:B.className?"".concat(U," ").concat(B.className):U,style:Object.assign({},u)});if(h.style=Ty(Ty({},h.style),{},E?{whiteSpace:"pre-wrap"}:{whiteSpace:"pre"}),!D)return t(c).createElement(P,j,z,t(c).createElement(O,h,L));(void 0===C&&I||E)&&(C=!0),I=I||Ly;var H=[{type:"text",value:L}],V=function(e){var t=e.astGenerator,n=e.language,r=e.code,i=e.defaultCodeValue;if(Dy(t)){var o=function(e,t){return-1!==e.listLanguages().indexOf(t)}(t,n);return"text"===n?{value:i,language:"text"}:o?t.highlight(n,r):t.highlightAuto(r)}try{return n&&"text"!==n?{value:t.highlight(r,n)}:{value:i}}catch(e){return{value:i}}}({astGenerator:D,language:i,code:L,defaultCodeValue:H});null===V.language&&(V.value=H);var G=Ny(V,C,M,g,y,x,V.value.length+x,_,E);return t(c).createElement(P,j,t(c).createElement(O,h,!y&&z,I({rows:G,stylesheet:a,useInlineStyles:f})))}}function zy(e){var n=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 r,i=t(sy)(e);if(n){var o=t(sy)(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return t(ry)(this,r)}}var Fy,Uy,jy,Hy,Vy,Gy,Wy,qy=function(e,n){return function(){var r=t(Yv)(t(ly).mark((function r(i){var o;return t(ly).wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n();case 2:o=t.sent,i(e,o.default||o);case 4:case"end":return t.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}()},Ky={abap:qy("abap",(function(){return o("bwHpE")})),abnf:qy("abnf",(function(){return o("daD87")})),actionscript:qy("actionscript",(function(){return o("lpEgO")})),ada:qy("ada",(function(){return o("1sGW9")})),agda:qy("agda",(function(){return o("e9VyR")})),al:qy("al",(function(){return o("kMFSe")})),antlr4:qy("antlr4",(function(){return o("8HlsP")})),apacheconf:qy("apacheconf",(function(){return o("isFCh")})),apex:qy("apex",(function(){return o("gUXVM")})),apl:qy("apl",(function(){return o("2L15v")})),applescript:qy("applescript",(function(){return o("8XyFT")})),aql:qy("aql",(function(){return o("gFWTI")})),arduino:qy("arduino",(function(){return o("jI3VB")})),arff:qy("arff",(function(){return o("6uYTH")})),asciidoc:qy("asciidoc",(function(){return o("gdYKH")})),asm6502:qy("asm6502",(function(){return o("ahFLg")})),asmatmel:qy("asmatmel",(function(){return o("4irIu")})),aspnet:qy("aspnet",(function(){return o("yDC6n")})),autohotkey:qy("autohotkey",(function(){return o("a4xpy")})),autoit:qy("autoit",(function(){return o("iNSix")})),avisynth:qy("avisynth",(function(){return o("kEBnk")})),avroIdl:qy("avroIdl",(function(){return o("lzthi")})),bash:qy("bash",(function(){return Promise.resolve(o("3aDLI"))})),basic:qy("basic",(function(){return o("cxDu6")})),batch:qy("batch",(function(){return o("6zDll")})),bbcode:qy("bbcode",(function(){return o("bPS87")})),bicep:qy("bicep",(function(){return o("8dy5f")})),birb:qy("birb",(function(){return o("3vHrY")})),bison:qy("bison",(function(){return o("bCjBS")})),bnf:qy("bnf",(function(){return o("4NqDW")})),brainfuck:qy("brainfuck",(function(){return o("4s0KX")})),brightscript:qy("brightscript",(function(){return o("jTsQ4")})),bro:qy("bro",(function(){return o("5lMc2")})),bsl:qy("bsl",(function(){return o("jBYxC")})),c:qy("c",(function(){return Promise.resolve(o("lyZgY"))})),cfscript:qy("cfscript",(function(){return o("coZDy")})),chaiscript:qy("chaiscript",(function(){return o("e1zEN")})),cil:qy("cil",(function(){return o("crKoM")})),clike:qy("clike",(function(){return o("4kO9t")})),clojure:qy("clojure",(function(){return o("01SpB")})),cmake:qy("cmake",(function(){return o("9yG4p")})),cobol:qy("cobol",(function(){return o("967Hn")})),coffeescript:qy("coffeescript",(function(){return o("7Yi6H")})),concurnas:qy("concurnas",(function(){return o("5tXmX")})),coq:qy("coq",(function(){return o("ektdr")})),cpp:qy("cpp",(function(){return Promise.resolve(o("lR39A"))})),crystal:qy("crystal",(function(){return o("8gt4L")})),csharp:qy("csharp",(function(){return o("7K6eJ")})),cshtml:qy("cshtml",(function(){return o("cVu4i")})),csp:qy("csp",(function(){return o("ecKo1")})),cssExtras:qy("cssExtras",(function(){return o("gnpv8")})),css:qy("css",(function(){return o("jx0H8")})),csv:qy("csv",(function(){return o("f9kmW")})),cypher:qy("cypher",(function(){return o("lojor")})),d:qy("d",(function(){return o("6Qa0U")})),dart:qy("dart",(function(){return o("74K1B")})),dataweave:qy("dataweave",(function(){return o("93H6c")})),dax:qy("dax",(function(){return o("cf9Y9")})),dhall:qy("dhall",(function(){return o("f6UWv")})),diff:qy("diff",(function(){return o("klPVo")})),django:qy("django",(function(){return o("jfxe9")})),dnsZoneFile:qy("dnsZoneFile",(function(){return o("5aMz5")})),docker:qy("docker",(function(){return o("kOauC")})),dot:qy("dot",(function(){return o("btE6k")})),ebnf:qy("ebnf",(function(){return o("aT88c")})),editorconfig:qy("editorconfig",(function(){return o("jWOl8")})),eiffel:qy("eiffel",(function(){return o("kHJaX")})),ejs:qy("ejs",(function(){return o("frfnA")})),elixir:qy("elixir",(function(){return o("hcrJ2")})),elm:qy("elm",(function(){return o("jd271")})),erb:qy("erb",(function(){return o("gczXL")})),erlang:qy("erlang",(function(){return o("FsabW")})),etlua:qy("etlua",(function(){return o("9DI9l")})),excelFormula:qy("excelFormula",(function(){return o("3QVue")})),factor:qy("factor",(function(){return o("ltNCT")})),falselang:qy("falselang",(function(){return o("g0Q6p")})),firestoreSecurityRules:qy("firestoreSecurityRules",(function(){return o("ukA2V")})),flow:qy("flow",(function(){return o("e5prn")})),fortran:qy("fortran",(function(){return o("gIEL6")})),fsharp:qy("fsharp",(function(){return o("3wQkt")})),ftl:qy("ftl",(function(){return o("7ZVWs")})),gap:qy("gap",(function(){return o("hOFj6")})),gcode:qy("gcode",(function(){return o("95BzQ")})),gdscript:qy("gdscript",(function(){return o("iul6t")})),gedcom:qy("gedcom",(function(){return o("e0qJM")})),gherkin:qy("gherkin",(function(){return o("2SHak")})),git:qy("git",(function(){return o("l6VFH")})),glsl:qy("glsl",(function(){return o("cEMfJ")})),gml:qy("gml",(function(){return o("8UVTr")})),gn:qy("gn",(function(){return o("kvibD")})),goModule:qy("goModule",(function(){return o("icqjF")})),go:qy("go",(function(){return o("jLkg8")})),graphql:qy("graphql",(function(){return o("aYGNi")})),groovy:qy("groovy",(function(){return o("4bTmH")})),haml:qy("haml",(function(){return o("h2A6V")})),handlebars:qy("handlebars",(function(){return o("79YVJ")})),haskell:qy("haskell",(function(){return o("bsiLW")})),haxe:qy("haxe",(function(){return o("94Kdj")})),hcl:qy("hcl",(function(){return o("9CheR")})),hlsl:qy("hlsl",(function(){return o("h3dqW")})),hoon:qy("hoon",(function(){return o("9WbsW")})),hpkp:qy("hpkp",(function(){return o("GiPN3")})),hsts:qy("hsts",(function(){return o("eaSn9")})),http:qy("http",(function(){return o("1uj7b")})),ichigojam:qy("ichigojam",(function(){return o("ge562")})),icon:qy("icon",(function(){return o("lVHUf")})),icuMessageFormat:qy("icuMessageFormat",(function(){return o("aYoUL")})),idris:qy("idris",(function(){return o("1RVAE")})),iecst:qy("iecst",(function(){return o("bi7Dr")})),ignore:qy("ignore",(function(){return o("cq0Pi")})),inform7:qy("inform7",(function(){return o("31K4E")})),ini:qy("ini",(function(){return o("l05OZ")})),io:qy("io",(function(){return o("6bY1b")})),j:qy("j",(function(){return o("1ebDS")})),java:qy("java",(function(){return o("iEZZI")})),javadoc:qy("javadoc",(function(){return o("aHy5a")})),javadoclike:qy("javadoclike",(function(){return o("5f3rE")})),javascript:qy("javascript",(function(){return o("7JDFI")})),javastacktrace:qy("javastacktrace",(function(){return o("gdCGE")})),jexl:qy("jexl",(function(){return o("cqMb9")})),jolie:qy("jolie",(function(){return o("cEDX4")})),jq:qy("jq",(function(){return o("kEWsh")})),jsExtras:qy("jsExtras",(function(){return o("74PI8")})),jsTemplates:qy("jsTemplates",(function(){return o("30TPr")})),jsdoc:qy("jsdoc",(function(){return o("9DH5c")})),json:qy("json",(function(){return Promise.resolve(o("l1Rj1"))})),json5:qy("json5",(function(){return o("920rv")})),jsonp:qy("jsonp",(function(){return o("9AwS1")})),jsstacktrace:qy("jsstacktrace",(function(){return o("bYXMr")})),jsx:qy("jsx",(function(){return Promise.resolve(o("6ho3O"))})),julia:qy("julia",(function(){return o("g0ibH")})),keepalived:qy("keepalived",(function(){return o("2hdnH")})),keyman:qy("keyman",(function(){return o("cIufI")})),kotlin:qy("kotlin",(function(){return o("c26dU")})),kumir:qy("kumir",(function(){return o("iYAha")})),kusto:qy("kusto",(function(){return o("9z1oX")})),latex:qy("latex",(function(){return o("lCPLU")})),latte:qy("latte",(function(){return o("c9oN0")})),less:qy("less",(function(){return o("hA3V9")})),lilypond:qy("lilypond",(function(){return o("hpHTA")})),liquid:qy("liquid",(function(){return o("kpZTm")})),lisp:qy("lisp",(function(){return o("chgK5")})),livescript:qy("livescript",(function(){return o("2gdiv")})),llvm:qy("llvm",(function(){return o("jUeFO")})),log:qy("log",(function(){return o("3BFSQ")})),lolcode:qy("lolcode",(function(){return o("lG9br")})),lua:qy("lua",(function(){return o("cVGpd")})),magma:qy("magma",(function(){return o("4LVzY")})),makefile:qy("makefile",(function(){return o("2NviD")})),markdown:qy("markdown",(function(){return o("jUFCF")})),markupTemplating:qy("markupTemplating",(function(){return Promise.resolve(o("t3W0d"))})),markup:qy("markup",(function(){return o("5hIXu")})),matlab:qy("matlab",(function(){return o("kPAC0")})),maxscript:qy("maxscript",(function(){return o("gHOJy")})),mel:qy("mel",(function(){return o("9mj6e")})),mermaid:qy("mermaid",(function(){return o("kozw5")})),mizar:qy("mizar",(function(){return o("2bN6W")})),mongodb:qy("mongodb",(function(){return o("eHKWX")})),monkey:qy("monkey",(function(){return o("7Fh0C")})),moonscript:qy("moonscript",(function(){return o("hDXwC")})),n1ql:qy("n1ql",(function(){return o("j9bkC")})),n4js:qy("n4js",(function(){return o("eTmBF")})),nand2tetrisHdl:qy("nand2tetrisHdl",(function(){return o("ezjCf")})),naniscript:qy("naniscript",(function(){return o("VxHk1")})),nasm:qy("nasm",(function(){return o("ly95T")})),neon:qy("neon",(function(){return o("7Fk34")})),nevod:qy("nevod",(function(){return o("3U8Qv")})),nginx:qy("nginx",(function(){return o("c6qVk")})),nim:qy("nim",(function(){return o("1JdCk")})),nix:qy("nix",(function(){return o("jcstS")})),nsis:qy("nsis",(function(){return o("kEJqW")})),objectivec:qy("objectivec",(function(){return o("lUP8A")})),ocaml:qy("ocaml",(function(){return o("lhTAD")})),opencl:qy("opencl",(function(){return o("8rxKO")})),openqasm:qy("openqasm",(function(){return o("ib0uL")})),oz:qy("oz",(function(){return o("csCUS")})),parigp:qy("parigp",(function(){return o("2DkHE")})),parser:qy("parser",(function(){return o("2cp75")})),pascal:qy("pascal",(function(){return o("fViVl")})),pascaligo:qy("pascaligo",(function(){return o("9Uuxa")})),pcaxis:qy("pcaxis",(function(){return o("jUdnN")})),peoplecode:qy("peoplecode",(function(){return o("l8w4e")})),perl:qy("perl",(function(){return o("aX7dM")})),phpExtras:qy("phpExtras",(function(){return o("3cMZl")})),php:qy("php",(function(){return Promise.resolve(o("5li5P"))})),phpdoc:qy("phpdoc",(function(){return o("bDyJN")})),plsql:qy("plsql",(function(){return o("cPuMN")})),powerquery:qy("powerquery",(function(){return o("jE1gU")})),powershell:qy("powershell",(function(){return o("k7t0j")})),processing:qy("processing",(function(){return o("jr8hV")})),prolog:qy("prolog",(function(){return o("hpuat")})),promql:qy("promql",(function(){return o("ckXC5")})),properties:qy("properties",(function(){return o("fAh6P")})),protobuf:qy("protobuf",(function(){return o("R6WqB")})),psl:qy("psl",(function(){return o("Al65w")})),pug:qy("pug",(function(){return o("dxbNS")})),puppet:qy("puppet",(function(){return o("lrSuh")})),pure:qy("pure",(function(){return o("6DKQK")})),purebasic:qy("purebasic",(function(){return o("7ZkSb")})),purescript:qy("purescript",(function(){return o("dBTYx")})),python:qy("python",(function(){return Promise.resolve(o("kiy5M"))})),q:qy("q",(function(){return o("4FXyy")})),qml:qy("qml",(function(){return o("2zZFj")})),qore:qy("qore",(function(){return o("iCK1Y")})),qsharp:qy("qsharp",(function(){return o("dvH9H")})),r:qy("r",(function(){return o("lQqRt")})),racket:qy("racket",(function(){return o("eHKmq")})),reason:qy("reason",(function(){return o("kkeLT")})),regex:qy("regex",(function(){return o("llX50")})),rego:qy("rego",(function(){return o("9hKdZ")})),renpy:qy("renpy",(function(){return o("cJgw5")})),rest:qy("rest",(function(){return o("867DK")})),rip:qy("rip",(function(){return o("3Odjx")})),roboconf:qy("roboconf",(function(){return o("gQ0Us")})),robotframework:qy("robotframework",(function(){return o("bLCgx")})),ruby:qy("ruby",(function(){return Promise.resolve(o("ch1PX"))})),rust:qy("rust",(function(){return o("cInT8")})),sas:qy("sas",(function(){return o("iz7eP")})),sass:qy("sass",(function(){return o("hrDC3")})),scala:qy("scala",(function(){return o("ub8Bf")})),scheme:qy("scheme",(function(){return o("7NAAt")})),scss:qy("scss",(function(){return Promise.resolve(o("fU6a0"))})),shellSession:qy("shellSession",(function(){return o("7kKCv")})),smali:qy("smali",(function(){return o("2lkCb")})),smalltalk:qy("smalltalk",(function(){return o("4280y")})),smarty:qy("smarty",(function(){return o("4hXYK")})),sml:qy("sml",(function(){return o("jh2E8")})),solidity:qy("solidity",(function(){return o("dTdF2")})),solutionFile:qy("solutionFile",(function(){return o("iI5tm")})),soy:qy("soy",(function(){return o("aoU5C")})),sparql:qy("sparql",(function(){return o("ggrvb")})),splunkSpl:qy("splunkSpl",(function(){return o("8LhCX")})),sqf:qy("sqf",(function(){return o("3tDsu")})),sql:qy("sql",(function(){return Promise.resolve(o("bnDV9"))})),squirrel:qy("squirrel",(function(){return o("bxaUV")})),stan:qy("stan",(function(){return o("dBqrq")})),stylus:qy("stylus",(function(){return o("JlHVK")})),swift:qy("swift",(function(){return o("c7NBs")})),systemd:qy("systemd",(function(){return o("jprZl")})),t4Cs:qy("t4Cs",(function(){return o("edsMI")})),t4Templating:qy("t4Templating",(function(){return o("bS9Wa")})),t4Vb:qy("t4Vb",(function(){return o("gYk20")})),tap:qy("tap",(function(){return o("byv7d")})),tcl:qy("tcl",(function(){return o("lUAIZ")})),textile:qy("textile",(function(){return o("7J2LO")})),toml:qy("toml",(function(){return o("eXtdM")})),tremor:qy("tremor",(function(){return o("vyajH")})),tsx:qy("tsx",(function(){return Promise.resolve(o("7cTnl"))})),tt2:qy("tt2",(function(){return o("8XOOm")})),turtle:qy("turtle",(function(){return o("1XvLQ")})),twig:qy("twig",(function(){return o("i9Fpp")})),typescript:qy("typescript",(function(){return Promise.resolve(o("fzL8k"))})),typoscript:qy("typoscript",(function(){return o("kKk69")})),unrealscript:qy("unrealscript",(function(){return o("jgq8Y")})),uorazor:qy("uorazor",(function(){return o("dsZ00")})),uri:qy("uri",(function(){return o("fqJRp")})),v:qy("v",(function(){return o("bgfyB")})),vala:qy("vala",(function(){return o("68x4q")})),vbnet:qy("vbnet",(function(){return o("eUhQs")})),velocity:qy("velocity",(function(){return o("fPNdV")})),verilog:qy("verilog",(function(){return o("2fM1V")})),vhdl:qy("vhdl",(function(){return o("hNF6q")})),vim:qy("vim",(function(){return o("75TCr")})),visualBasic:qy("visualBasic",(function(){return o("fc93z")})),warpscript:qy("warpscript",(function(){return o("jgHlG")})),wasm:qy("wasm",(function(){return o("dVZkI")})),webIdl:qy("webIdl",(function(){return o("9Jnxv")})),wiki:qy("wiki",(function(){return o("1Gimo")})),wolfram:qy("wolfram",(function(){return o("4SyRT")})),wren:qy("wren",(function(){return o("gaIVs")})),xeora:qy("xeora",(function(){return o("lagad")})),xmlDoc:qy("xmlDoc",(function(){return o("9DNYE")})),xojo:qy("xojo",(function(){return o("ksF4f")})),xquery:qy("xquery",(function(){return o("gXxHJ")})),yaml:qy("yaml",(function(){return o("6rk3j")})),yang:qy("yang",(function(){return o("kTyrQ")})),zig:qy("zig",(function(){return o("d3mFC")}))},Jy=(Uy=(Fy={loader:function(){return o("bB2YF").then((function(e){return e.default||e}))},isLanguageRegistered:function(e,t){return e.registered(t)},languageLoaders:Ky,registerLanguage:function(e,t,n){return e.register(n)}}).loader,jy=Fy.isLanguageRegistered,Hy=Fy.registerLanguage,Vy=Fy.languageLoaders,Gy=Fy.noAsyncLoadingLanguages,Wy=function(e){t(ey)(i,e);var n,r=zy(i);function i(){return t(ee)(this,i),r.apply(this,arguments)}return t(te)(i,[{key:"componentDidUpdate",value:function(){!i.isRegistered(this.props.language)&&Vy&&this.loadLanguage()}},{key:"componentDidMount",value:function(){var e=this;i.astGeneratorPromise||i.loadAstGenerator(),i.astGenerator||i.astGeneratorPromise.then((function(){e.forceUpdate()})),!i.isRegistered(this.props.language)&&Vy&&this.loadLanguage()}},{key:"loadLanguage",value:function(){var e=this,t=this.props.language;"text"!==t&&i.loadLanguage(t).then((function(){return e.forceUpdate()})).catch((function(){}))}},{key:"normalizeLanguage",value:function(e){return i.isSupportedLanguage(e)?e:"text"}},{key:"render",value:function(){return t(c).createElement(i.highlightInstance,t(Xv)({},this.props,{language:this.normalizeLanguage(this.props.language),astGenerator:i.astGenerator}))}}],[{key:"preload",value:function(){return i.loadAstGenerator()}},{key:"loadLanguage",value:(n=t(Yv)(t(ly).mark((function e(n){var r;return t(ly).wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof(r=Vy[n])){e.next=5;break}return e.abrupt("return",r(i.registerLanguage));case 5:throw new Error("Language ".concat(n," not supported"));case 6:case"end":return e.stop()}}),e)}))),function(e){return n.apply(this,arguments)})},{key:"isSupportedLanguage",value:function(e){return i.isRegistered(e)||"function"==typeof Vy[e]}},{key:"loadAstGenerator",value:function(){return i.astGeneratorPromise=Uy().then((function(e){i.astGenerator=e,Hy&&i.languages.forEach((function(t,n){return Hy(e,n,t)}))})),i.astGeneratorPromise}}]),i}(t(c).PureComponent),t(X)(Wy,"astGenerator",null),t(X)(Wy,"highlightInstance",By(null,{})),t(X)(Wy,"astGeneratorPromise",null),t(X)(Wy,"languages",new Map),t(X)(Wy,"supportedLanguages",Fy.supportedLanguages||Object.keys(Vy||{})),t(X)(Wy,"isRegistered",(function(e){if(Gy)return!0;if(!Hy)throw new Error("Current syntax highlighter doesn't support registration of languages");return Wy.astGenerator?jy(Wy.astGenerator,e):Wy.languages.has(e)})),t(X)(Wy,"registerLanguage",(function(e,t){if(!Hy)throw new Error("Current syntax highlighter doesn't support registration of languages");if(Wy.astGenerator)return Hy(Wy.astGenerator,e,t);Wy.languages.set(e,t)})),Wy),Qy={},Yy={};(Yy=function(e){return e&&e.__esModule?e:{default:e}}).__esModule=!0,Yy.default=Yy,Object.defineProperty(Qy,"__esModule",{value:!0}),Object.defineProperty(Qy,"a11yDark",{enumerable:!0,get:function(){return ob.default}}),Object.defineProperty(Qy,"atomDark",{enumerable:!0,get:function(){return sb.default}}),Object.defineProperty(Qy,"base16AteliersulphurpoolLight",{enumerable:!0,get:function(){return ab.default}}),Object.defineProperty(Qy,"cb",{enumerable:!0,get:function(){return lb.default}}),Object.defineProperty(Qy,"coldarkCold",{enumerable:!0,get:function(){return cb.default}}),Object.defineProperty(Qy,"coldarkDark",{enumerable:!0,get:function(){return ub.default}}),Object.defineProperty(Qy,"coy",{enumerable:!0,get:function(){return Zy.default}}),Object.defineProperty(Qy,"coyWithoutShadows",{enumerable:!0,get:function(){return db.default}}),Object.defineProperty(Qy,"darcula",{enumerable:!0,get:function(){return hb.default}}),Object.defineProperty(Qy,"dark",{enumerable:!0,get:function(){return Xy.default}}),Object.defineProperty(Qy,"dracula",{enumerable:!0,get:function(){return pb.default}}),Object.defineProperty(Qy,"duotoneDark",{enumerable:!0,get:function(){return fb.default}}),Object.defineProperty(Qy,"duotoneEarth",{enumerable:!0,get:function(){return mb.default}}),Object.defineProperty(Qy,"duotoneForest",{enumerable:!0,get:function(){return gb.default}}),Object.defineProperty(Qy,"duotoneLight",{enumerable:!0,get:function(){return vb.default}}),Object.defineProperty(Qy,"duotoneSea",{enumerable:!0,get:function(){return yb.default}}),Object.defineProperty(Qy,"duotoneSpace",{enumerable:!0,get:function(){return bb.default}}),Object.defineProperty(Qy,"funky",{enumerable:!0,get:function(){return $y.default}}),Object.defineProperty(Qy,"ghcolors",{enumerable:!0,get:function(){return xb.default}}),Object.defineProperty(Qy,"gruvboxDark",{enumerable:!0,get:function(){return Sb.default}}),Object.defineProperty(Qy,"gruvboxLight",{enumerable:!0,get:function(){return wb.default}}),Object.defineProperty(Qy,"holiTheme",{enumerable:!0,get:function(){return _b.default}}),Object.defineProperty(Qy,"hopscotch",{enumerable:!0,get:function(){return Cb.default}}),Object.defineProperty(Qy,"lucario",{enumerable:!0,get:function(){return Ab.default}}),Object.defineProperty(Qy,"materialDark",{enumerable:!0,get:function(){return Eb.default}}),Object.defineProperty(Qy,"materialLight",{enumerable:!0,get:function(){return Tb.default}}),Object.defineProperty(Qy,"materialOceanic",{enumerable:!0,get:function(){return Mb.default}}),Object.defineProperty(Qy,"nightOwl",{enumerable:!0,get:function(){return Ib.default}}),Object.defineProperty(Qy,"nord",{enumerable:!0,get:function(){return Rb.default}}),Object.defineProperty(Qy,"okaidia",{enumerable:!0,get:function(){return eb.default}}),Object.defineProperty(Qy,"oneDark",{enumerable:!0,get:function(){return Pb.default}}),Object.defineProperty(Qy,"oneLight",{enumerable:!0,get:function(){return kb.default}}),Object.defineProperty(Qy,"pojoaque",{enumerable:!0,get:function(){return Ob.default}}),Object.defineProperty(Qy,"prism",{enumerable:!0,get:function(){return ib.default}}),Object.defineProperty(Qy,"shadesOfPurple",{enumerable:!0,get:function(){return Nb.default}}),Object.defineProperty(Qy,"solarizedDarkAtom",{enumerable:!0,get:function(){return Lb.default}}),Object.defineProperty(Qy,"solarizedlight",{enumerable:!0,get:function(){return tb.default}}),Object.defineProperty(Qy,"synthwave84",{enumerable:!0,get:function(){return Db.default}}),Object.defineProperty(Qy,"tomorrow",{enumerable:!0,get:function(){return nb.default}}),Object.defineProperty(Qy,"twilight",{enumerable:!0,get:function(){return rb.default}}),Object.defineProperty(Qy,"vs",{enumerable:!0,get:function(){return Bb.default}}),Object.defineProperty(Qy,"vscDarkPlus",{enumerable:!0,get:function(){return zb.default}}),Object.defineProperty(Qy,"xonokai",{enumerable:!0,get:function(){return Fb.default}}),Object.defineProperty(Qy,"zTouch",{enumerable:!0,get:function(){return Ub.default}});var Zy=Yy(o("jcF8U")),Xy=Yy(o("3Tppx")),$y=Yy(o("dBuK7")),eb=Yy(o("eEjWK")),tb=Yy(o("awG2g")),nb=Yy(o("2oFzQ")),rb=Yy(o("4Au6Q")),ib=Yy(o("dAPqs")),ob=Yy(o("8eAql")),sb=Yy(o("cv2QE")),ab=Yy(o("h5I9g")),lb=Yy(o("i4C5w")),cb=Yy(o("3kFKo")),ub=Yy(o("17zK0")),db=Yy(o("5Avqr")),hb=Yy(o("1jHMv")),pb=Yy(o("7Q8CE")),fb=Yy(o("jKUos")),mb=Yy(o("Uzm4J")),gb=Yy(o("7yfkN")),vb=Yy(o("lT2l1")),yb=Yy(o("fZ9um")),bb=Yy(o("1MoQL")),xb=Yy(o("4uys7")),Sb=Yy(o("kaYsk")),wb=Yy(o("kN6Vu")),_b=Yy(o("2Z6pG")),Cb=Yy(o("4jQJK")),Ab=Yy(o("bpXw0")),Eb=Yy(o("i4S8s")),Tb=Yy(o("5bNr4")),Mb=Yy(o("5ZYWT")),Ib=Yy(o("ihJCU")),Rb=Yy(o("8iIbg")),Pb=Yy(o("424u7")),kb=Yy(o("jPiNI")),Ob=Yy(o("OHVOA")),Nb=Yy(o("2OKTL")),Lb=Yy(o("2Mg8H")),Db=Yy(o("9Kud0")),Bb=Yy(o("eCrmR")),zb=Yy(o("8UhcQ")),Fb=Yy(o("dtU9z")),Ub=Yy(o("4xtLO")),jb={};Object.defineProperty(jb,"__esModule",{value:!0}),jb.default=void 0;var Hb=Yy(o("7cTnl")).default;jb.default=Hb;var Vb={};Object.defineProperty(Vb,"__esModule",{value:!0}),Vb.default=void 0;var Gb=Yy(o("l1Rj1")).default;Vb.default=Gb;var Wb={};Object.defineProperty(Wb,"__esModule",{value:!0}),Wb.default=void 0;var qb=Yy(o("fU6a0")).default;Wb.default=qb;var Kb={};Object.defineProperty(Kb,"__esModule",{value:!0}),Kb.default=void 0;var Jb=Yy(o("3aDLI")).default;Kb.default=Jb;var Qb={};Object.defineProperty(Qb,"__esModule",{value:!0}),Qb.default=void 0;var Yb=Yy(o("kiy5M")).default;Qb.default=Yb;var Zb={};Object.defineProperty(Zb,"__esModule",{value:!0}),Zb.default=void 0;var Xb=Yy(o("lR39A")).default;Zb.default=Xb;var $b={};Object.defineProperty($b,"__esModule",{value:!0}),$b.default=void 0;var ex=Yy(o("5li5P")).default;$b.default=ex;var tx={};Object.defineProperty(tx,"__esModule",{value:!0}),tx.default=void 0;var nx=Yy(o("ch1PX")).default;tx.default=nx;var rx={};Object.defineProperty(rx,"__esModule",{value:!0}),rx.default=void 0;var ix=Yy(o("bnDV9")).default;rx.default=ix,Jy.registerLanguage("tsx",t(jb)),Jy.registerLanguage("json",t(Vb)),Jy.registerLanguage("scss",t(Wb)),Jy.registerLanguage("bash",t(Kb)),Jy.registerLanguage("python",t(Qb)),Jy.registerLanguage("cpp",t(Zb)),Jy.registerLanguage("php",t($b)),Jy.registerLanguage("ruby",t(tx)),Jy.registerLanguage("sql",t(rx));var ox=({medium:e,className:t,preview:n=!1,showLineNumbers:r=!0,showCopyButton:i=!0})=>{var o,a,l,c;const{t:u}=Se();return(0,s.jsxs)("div",{className:"memori-snippet",children:[(0,s.jsxs)("div",{className:"memori-snippet--content",children:[(0,s.jsx)(Jy,{"aria-labelledby":`#snippet-${e.mediumID}`,className:t,style:Qy.atomDark,showLineNumbers:r,language:null!==(a=null===(o=Jv.find((t=>e.mimeType===t.mimeType)))||void 0===o?void 0:o.lang)&&void 0!==a?a:"text",children:(null===(l=e.content)||void 0===l?void 0:l.length)&&e.content.length>200&&n?`${e.content.slice(0,200)}\n...`:`${e.content}`}),i&&(0,s.jsx)(Sf,{padded:!1,ghost:!0,className:"memori-snippet--copy-button",title:u("copy")||"Copy",icon:(0,s.jsx)(Wv,{}),onClick:()=>{var t;return navigator.clipboard.writeText(null!==(t=e.content)&&void 0!==t?t:"")}})]}),!!(null===(c=e.title)||void 0===c?void 0:c.length)&&(0,s.jsx)("p",{id:`snippet-${e.mediumID}`,className:"memori-snippet--caption",children:e.title})]})};c=o("85Hg2"),c=o("85Hg2");var sx,ax=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M574 665.4a8.03 8.03 0 0 0-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 0 0-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 0 0 0 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 0 0 0 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 0 0-11.3 0L372.3 598.7a8.03 8.03 0 0 0 0 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z"})}),lx={};sx=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=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};function n(e,n){var r=e.el,i=e.elStyle,o=e.elHeight,s=e.rowsLimit,a=e.rowsWrapped,l=e.options,c=e.buffer,u=c;if(a===s+1)return t({},e);var d=c,h=a,p=o;return r.innerHTML=u=c.length?""+c+l.delimiter+n+l.replaceStr:""+n+l.replaceStr,parseFloat(i.height)>parseFloat(o)&&(h++,p=i.height,h===s+1)?(r.innerHTML=u="."===d[d.length-1]&&"..."===l.replaceStr?d+"..":""+d+l.replaceStr,t({},e,{elHeight:p,rowsWrapped:h})):(r.innerHTML=u=d.length?""+d+l.delimiter+n:""+n,t({},e,{buffer:u,elHeight:p,rowsWrapped:h}))}e.disableResponsive=function(e){window.removeEventListener("resize",e)},e.ellipsis=function e(){for(var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s={replaceStr:"...",responsive:!1,debounceDelay:250,delimiter:" "},a=t({},s,o),l=r&&(r instanceof NodeList?r:1===r.nodeType?[r]:document.querySelectorAll(r)),c=[],u=0;u<l.length;u++){var d=l[u];c[u]=d.innerHTML;var h=d.innerHTML.split(a.delimiter);d.innerHTML="";var p=window.getComputedStyle(d);h.reduce(n,{el:d,buffer:d.innerHTML,elStyle:p,elHeight:0,rowsLimit:i,rowsWrapped:0,options:a})}if(a.responsive){var f=!1,m=window.innerWidth,g=function(){if(window.innerWidth!==m){m=window.innerWidth;for(var n=0;n<l.length;n++)l[n].innerHTML=c[n];e(r,i,t({},o,{responsive:!1}))}},v=function(){clearTimeout(f),f=setTimeout(g,a.debounceDelay)};return window.addEventListener("resize",v),v}}},"function"==typeof define&&define.amd?define(["exports"],sx):sx(lx);var cx=({loading:e=!1,className:n,title:r,description:i,cover:o,hoverable:a=!1,children:l})=>(0,s.jsx)("div",{className:t(ws)("memori-card",n,{"memori-card--loading":e,"memori-card--with-cover":o,"memori-card--hoverable":a}),children:(0,s.jsxs)(xf,{spinning:e,children:[o&&(0,s.jsx)("div",{className:"memori-card--cover",children:o}),(0,s.jsxs)("div",{className:"memori-card--content",children:[r&&(0,s.jsx)("h3",{className:"memori-card--title",children:r}),i&&(0,s.jsx)("p",{className:"memori-card--description",children:i}),(0,s.jsx)("div",{className:"memori-card--children",children:l})]})]})});const ux=({isChild:e=!1,item:n,baseUrl:r,onLinkPreviewInfo:i,descriptionOneLine:o=!1})=>{var a,l,u,d;const[h,p]=(0,c.useState)(null),f=(null===(a=n.url)||void 0===a?void 0:a.startsWith("http"))||!n.url||0===(null===(l=n.url)||void 0===l?void 0:l.length)?n.url:`https://${n.url}`;(0,c.useEffect)((()=>{var e,t;let o=(null===(e=n.url)||void 0===e?void 0:e.startsWith("http"))||!n.url||0===(null===(t=n.url)||void 0===t?void 0:t.length)?n.url:`https://${n.url}`;o&&o!==(null==h?void 0:h.urlKey)&&(async(e,t)=>{try{const n=await fetch(`${t||"https://aisuru.com"}/api/linkpreview/${encodeURIComponent(e)}`);return await n.json()}catch(e){return console.error("getSiteInfo",e),null}})(o,r).then((e=>{p(e?{...e,urlKey:o}:null),i&&e&&i(e)}))}),[null==n?void 0:n.url,r,i]);const m=n.title&&n.title.length>0?n.title:null==h?void 0:h.title,g=null==h?void 0:h.description,v=null==h?void 0:h.video,y=null!==(u=null==h?void 0:h.image)&&void 0!==u?u:null===(d=null==h?void 0:h.images)||void 0===d?void 0:d[0];return(0,c.useEffect)((()=>{setTimeout((()=>{(0,lx.ellipsis)(".memori-link-item--card .memori-card--description",3,{responsive:!0})}),300)}),[g,n.mediumID]),(0,s.jsx)("a",{href:f,target:"_blank",rel:"noopener noreferrer",className:t(ws)("memori-link-item--link",{"memori-link-item--link--child":e}),onClick:t=>{e||(t.preventDefault(),t.stopPropagation(),window.open(f,"_blank",`toolbar=yes,top=${.1*window.innerHeight},left=${.1*window.innerWidth},width=${.8*window.innerWidth},height=${.8*window.innerHeight}`))},children:(0,s.jsx)(cx,{hoverable:!0,className:t(ws)("memori-link-item--card",{"memori-link-item--card-description-oneline":o,"memori-link-item--card-has-image":y,"memori-link-item--card-has-video":v}),cover:v?(0,s.jsx)("iframe",{width:"100%",height:"100%",src:v,title:"Video player",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}):y?(0,s.jsx)("img",{className:"memori-link-item--card-cover-img",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg==",srcSet:y.includes("data:image")?void 0:y.startsWith("https")?y:`https://${y.replace("http://","")}`,alt:n.title}):(0,s.jsx)("div",{className:"memori-link-item--card-cover-icon",children:(0,s.jsx)(ax,{className:"memori-link-item--icon"})}),title:m,description:g})})};var dx=({items:e,baseUrl:t,descriptionOneLine:n=!1,onLinkPreviewInfo:r})=>(0,s.jsx)(np,{appear:!0,show:!0,as:"div",className:"memori-link-items",children:(0,s.jsx)("div",{className:"memori-link-items--grid",children:e.map(((e,i)=>(0,s.jsx)(np.Child,{as:"div",className:"memori-link-item",enter:"ease-out duration-500 delay-"+100*i,enterFrom:"opacity-0 scale-95",enterTo:"opacity-1 scale-100",leave:"ease-in duration-300",leaveFrom:"opacity-1 scale-100",leaveTo:"opacity-0 scale-95",children:(0,s.jsx)(ux,{item:e,baseUrl:t,descriptionOneLine:n,onLinkPreviewInfo:r})},e.mediumID)))})});c=o("85Hg2");const hx=["va bene","no grazie","si","no","sì","arrivederci","non c'entrava","non mi è piaciuto"],px=async(e,t,n,r)=>{var i;const o=hx.indexOf(e.toLowerCase())>-1?"IT":null==n?void 0:n.toUpperCase(),s=await fetch(`${r||"https://aisuru.com"}/api/translate?text=${encodeURIComponent(e)}&target_lang=${t.toUpperCase()}${o?`&source_lang=${o}`:""}`,{method:"GET",headers:{Accept:"*/*"}}),a=await s.json();return null===(i=null==a?void 0:a.translations)||void 0===i?void 0:i[0]};c=o("85Hg2");var fx=({src:e,poster:t,alt:n=""})=>((0,c.useEffect)((()=>{const e=document.createElement("script");return e.src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js",e.type="module",document.head.appendChild(e),()=>{document.head.removeChild(e)}}),[]),(0,s.jsx)("div",{className:"model-viewer",children:(0,s.jsx)("model-viewer",{src:e,"ios-src":"",poster:t,alt:n,"shadow-intensity":"1","disable-zoom":!0,"camera-controls":!0,autoplay:!0})}));var mx=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494z"})});var gx=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M531.3 574.4l.3-1.4c5.8-23.9 13.1-53.7 7.4-80.7-3.8-21.3-19.5-29.6-32.9-30.2-15.8-.7-29.9 8.3-33.4 21.4-6.6 24-.7 56.8 10.1 98.6-13.6 32.4-35.3 79.5-51.2 107.5-29.6 15.3-69.3 38.9-75.2 68.7-1.2 5.5.2 12.5 3.5 18.8 3.7 7 9.6 12.4 16.5 15 3 1.1 6.6 2 10.8 2 17.6 0 46.1-14.2 84.1-79.4 5.8-1.9 11.8-3.9 17.6-5.9 27.2-9.2 55.4-18.8 80.9-23.1 28.2 15.1 60.3 24.8 82.1 24.8 21.6 0 30.1-12.8 33.3-20.5 5.6-13.5 2.9-30.5-6.2-39.6-13.2-13-45.3-16.4-95.3-10.2-24.6-15-40.7-35.4-52.4-65.8zM421.6 726.3c-13.9 20.2-24.4 30.3-30.1 34.7 6.7-12.3 19.8-25.3 30.1-34.7zm87.6-235.5c5.2 8.9 4.5 35.8.5 49.4-4.9-19.9-5.6-48.1-2.7-51.4.8.1 1.5.7 2.2 2zm-1.6 120.5c10.7 18.5 24.2 34.4 39.1 46.2-21.6 4.9-41.3 13-58.9 20.2-4.2 1.7-8.3 3.4-12.3 5 13.3-24.1 24.4-51.4 32.1-71.4zm155.6 65.5c.1.2.2.5-.4.9h-.2l-.2.3c-.8.5-9 5.3-44.3-8.6 40.6-1.9 45 7.3 45.1 7.4zm191.4-388.2L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494z"})});var vx=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494zM514.1 580.1l-61.8-102.4c-2.2-3.6-6.1-5.8-10.3-5.8h-38.4c-2.3 0-4.5.6-6.4 1.9-5.6 3.5-7.3 10.9-3.7 16.6l82.3 130.4-83.4 132.8a12.04 12.04 0 0 0 10.2 18.4h34.5c4.2 0 8-2.2 10.2-5.7L510 664.8l62.3 101.4c2.2 3.6 6.1 5.7 10.2 5.7H620c2.3 0 4.5-.7 6.5-1.9 5.6-3.6 7.2-11 3.6-16.6l-84-130.4 85.3-132.5a12.04 12.04 0 0 0-10.1-18.5h-35.7c-4.2 0-8.1 2.2-10.3 5.8l-61.2 102.3z"})});var yx=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494zM528.1 472h-32.2c-5.5 0-10.3 3.7-11.6 9.1L434.6 680l-46.1-198.7c-1.3-5.4-6.1-9.3-11.7-9.3h-35.4a12.02 12.02 0 0 0-11.6 15.1l74.2 276c1.4 5.2 6.2 8.9 11.6 8.9h32c5.4 0 10.2-3.6 11.6-8.9l52.8-197 52.8 197c1.4 5.2 6.2 8.9 11.6 8.9h31.8c5.4 0 10.2-3.6 11.6-8.9l74.4-276a12.04 12.04 0 0 0-11.6-15.1H647c-5.6 0-10.4 3.9-11.7 9.3l-45.8 199.1-49.8-199.3c-1.3-5.4-6.1-9.1-11.6-9.1z"})});const bx=({isChild:e=!1,item:t,sessionID:n,tenantID:r,preview:i=!1,baseURL:o,apiURL:a,onClick:l,customMediaRenderer:c})=>{var u,d;const h=fv({resourceURI:t.url,sessionID:n,tenantID:r,baseURL:o,apiURL:a}),p=null==c?void 0:c(t.mimeType);if(p)return p;const f=(null===(u=t.url)||void 0===u?void 0:u.startsWith("rgb("))||(null===(d=t.url)||void 0===d?void 0:d.startsWith("rgba("));switch(t.mimeType){case"image/jpeg":case"image/png":case"image/jpg":case"image/gif":return f?(0,s.jsx)(cx,{hoverable:!0,className:"memori-media-item--card memori-media-item--image",cover:(0,s.jsxs)("picture",{className:"memori-media-item--figure",children:[(0,s.jsx)("div",{className:"memori-media-item--rgb-item",style:{backgroundColor:t.url}}),t.title&&(0,s.jsx)("figcaption",{className:"memori-media-item--figure-caption",children:t.title})]})}):(0,s.jsx)("a",{className:"memori-media-item--link",href:t.url,onClick:n=>{e&&n.preventDefault(),l&&(n.preventDefault(),l(t.mediumID))},target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(cx,{hoverable:!0,className:"memori-media-item--card memori-media-item--image",cover:(0,s.jsxs)("picture",{className:"memori-media-item--figure",children:[!i&&(0,s.jsx)("source",{srcSet:[h,t.url,t.content].join(", "),type:t.mimeType}),(0,s.jsx)("img",{alt:t.title,src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg=="}),t.title&&(0,s.jsx)("figcaption",{className:"memori-media-item--figure-caption",children:t.title})]})})});case"application/msword":case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return(0,s.jsx)("a",{className:"memori-media-item--link",href:h,target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(cx,{hoverable:!0,cover:(0,s.jsx)(yx,{className:"memori-media-item--icon"}),title:t.title})});case"application/vnd.ms-excel":case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":return(0,s.jsx)("a",{className:"memori-media-item--link",href:h,target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(cx,{hoverable:!0,cover:(0,s.jsx)(vx,{className:"memori-media-item--icon"}),title:t.title})});case"application/pdf":return(0,s.jsx)("a",{className:"memori-media-item--link",href:h,target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(cx,{hoverable:!0,cover:(0,s.jsx)(gx,{className:"memori-media-item--icon"}),title:t.title})});case"video/mp4":case"video/quicktime":case"video/avi":case"video/mpeg":return(0,s.jsx)("a",{className:"memori-media-item--link",href:h,onClick:n=>{e&&n.preventDefault(),l&&(n.preventDefault(),l(t.mediumID))},target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(cx,{hoverable:!0,cover:(0,s.jsxs)("video",{style:{width:"100%",height:"100%"},controls:!0,src:h,title:t.title,children:["video/quicktime"===t.mimeType&&(0,s.jsx)("source",{src:t.url,type:"video/mp4"}),(0,s.jsx)("source",{src:t.url,type:t.mimeType}),"Your browser does not support this video format.",(0,s.jsx)("br",{}),(0,s.jsx)("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",children:"Download the video"})]}),title:t.title})});case"audio/mpeg3":case"audio/wav":case"audio/mpeg":return(0,s.jsx)("a",{className:"memori-media-item--link",href:h,target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(cx,{hoverable:!0,cover:(0,s.jsx)("audio",{style:{width:"100%",height:"100%"},controls:!0,src:h}),title:t.title})});case"model/gltf-binary":return(0,s.jsx)(fx,{src:h,alt:"",poster:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg=="});default:return(0,s.jsx)("a",{className:"memori-media-item--link",href:h,target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(cx,{hoverable:!0,cover:(0,s.jsx)(mx,{className:"memori-media-item--icon"}),title:t.title})})}};var xx=(0,c.memo)((({items:e,sessionID:t,tenantID:n,translateTo:r,baseURL:i,apiURL:o,customMediaRenderer:a})=>{const[l,u]=(0,c.useState)(e),[d,h]=(0,c.useState)(),p=(0,c.useCallback)((async()=>{if(!r)return;const t=await Promise.all((null!=e?e:[]).map((async e=>{var t;if(!e.title)return e;try{const n=await px(e.title,r);return{...e,title:null!==(t=n.text)&&void 0!==t?t:e.title}}catch(t){return console.error(t),e}})));u(t)}),[r,e]);return(0,c.useEffect)((()=>{r&&p()}),[r,p]),(0,s.jsxs)(np,{appear:!0,show:!0,as:"div",className:"memori-media-items",children:[(0,s.jsx)("div",{className:"memori-media-items--grid",children:l.filter((e=>{var t;return!(null===(t=e.properties)||void 0===t?void 0:t.executable)&&!Jv.map((e=>e.mimeType)).includes(e.mimeType)})).sort(((e,t)=>e.creationTimestamp>t.creationTimestamp?1:e.creationTimestamp<t.creationTimestamp?-1:0)).map(((e,r)=>(0,s.jsx)(np.Child,{as:"div",className:"memori-media-item",enter:"ease-out duration-500 delay-"+100*r,enterFrom:"opacity-0 scale-95",enterTo:"opacity-1 scale-100",leave:"ease-in duration-300",leaveFrom:"opacity-1 scale-100",leaveTo:"opacity-0 scale-95",children:(0,s.jsx)(bx,{isChild:!0,sessionID:t,tenantID:n,baseURL:i,apiURL:o,onClick:e=>{h(l.find((t=>t.mediumID===e)))},item:{...e,title:e.title,url:e.url,content:e.content},customMediaRenderer:a})},e.url+"&index="+r)))}),l.filter((e=>{var t;return!(null===(t=e.properties)||void 0===t?void 0:t.executable)&&Jv.map((e=>e.mimeType)).includes(e.mimeType)})).map((e=>(0,s.jsx)(np.Child,{as:"div",className:"memori-media-item--snippet",enter:"ease-out duration-500",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-1 translate-y-0",leave:"ease-in duration-300",leaveFrom:"opacity-1",leaveTo:"opacity-0",children:(0,s.jsx)(ox,{medium:e},e.mediumID)},e.mediumID))),l.filter((e=>{var t;return"text/css"===e.mimeType&&!!(null===(t=e.properties)||void 0===t?void 0:t.executable)})).map((e=>(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:e.content||""}},e.mediumID))),(null==d?void 0:d.mediumID)&&(0,s.jsx)(Wm,{width:"100%",widthMd:"100%",className:"memori-media-item--modal",open:!!d,onClose:()=>h(void 0),footer:null,children:(0,s.jsx)(bx,{isChild:!0,sessionID:t,tenantID:n,baseURL:i,apiURL:o,item:{...d,title:d.title,url:d.url,content:d.content},customMediaRenderer:a})})]})}));var Sx=(0,c.memo)((({hints:e=[],links:n=[],media:r=[],simulateUserPrompt:i=(()=>{}),sessionID:o,baseUrl:a,apiUrl:l,translateTo:u,customMediaRenderer:d})=>{const{t:h}=Se(),[p,f]=(0,c.useState)(!0),[m,g]=(0,c.useState)(6);return(0,c.useEffect)((()=>{f(!0)}),[e]),(0,s.jsxs)("div",{className:"memori-media-widget",children:[(null==r?void 0:r.length)>0&&(0,s.jsx)(xx,{items:r,sessionID:o,translateTo:u,baseURL:a,apiURL:l,customMediaRenderer:d}),(null==n?void 0:n.length)>0&&(0,s.jsx)(dx,{items:n,baseUrl:a}),(null==e?void 0:e.length)>0&&p&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(np,{appear:!0,show:!0,as:"ul",className:"memori-media--hints",children:e.slice(0,m).map(((e,n)=>(0,s.jsx)(np.Child,{as:"li",enter:"ease-out duration-500",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-1 translate-y-0",leave:"ease-in duration-300",leaveFrom:"opacity-1",leaveTo:"opacity-0",children:(0,s.jsx)(Sf,{className:t(ws)("memori-media--hint"),primary:!0,onClick:()=>{i(e.originalText,e.text),f(!1)},onTouchEnd:()=>{i(e.originalText,e.text),f(!1)},children:e.text},e.text+n)},e.text+n)))}),e.length>m&&(0,s.jsx)("div",{className:"memori-hints--show-more",children:(0,s.jsx)(Sf,{className:"memori-hints--show-more-button",id:"showMoreHints",onClick:()=>g(m+6),children:h("expand")||"Expand"})})]})]})}));const wx=e=>e.endsWith("?")?e:`${e}?`;var _x=({message:e,apiURL:n,sessionID:r,visible:i=!0,initialMatches:o=[],closeDrawer:a,_TEST_loading:l=!1})=>{const{t:u}=Se(),d=Y(n).search.searchMemory,[h,p]=(0,c.useState)(o),[f,m]=(0,c.useState)(l),g=(0,c.useCallback)((async()=>{if(m(!0),!l){try{const{matches:n,...i}=await d(r,{searchType:"Semantic",numberOfResults:3,text:e.questionAnswered,date:e.date,placeName:e.placeName,placeLatitude:e.placeLatitude,placeLongitude:e.placeLongitude,placeUncertaintyKm:e.placeUncertaintyKm,contextVars:e.contextVars,tag:e.tag,memoryTags:e.memoryTags});0!==i.resultCode?(console.error(i),t(Ju).error(u(Gv(i.resultCode)))):p(null!=n?n:[])}catch(e){console.error("WHYTHISANSWER/FETCH",e),p(null!=o?o:[])}m(!1)}}),[e,r]);return(0,c.useEffect)((()=>{g()}),[g,e,r]),(0,s.jsxs)(_f,{open:i,width:"80%",animated:!1,className:"memori-whythisanswer-drawer",onClose:()=>a(),title:u("whyThisAnswer"),children:[(0,s.jsx)("p",{children:u("whyThisAnswerHelper")}),e.questionAnswered&&(0,s.jsxs)("p",{className:"memori--whythisanswer-question-answered",children:[(0,s.jsxs)("strong",{children:[u("question")||"Question",":"]})," ",e.questionAnswered]}),(0,s.jsxs)(xf,{primary:!0,spinning:f,children:[!f&&0===h.length&&(0,s.jsx)("p",{role:"info",className:"memori--whythisanswer-no-results",children:u("nothingFound")}),f&&0===h.length&&(0,s.jsxs)("ul",{className:"memori--whythisanswer-list memori--whythisanswer-skeleton",children:[(0,s.jsxs)("li",{children:[(0,s.jsxs)("div",{className:"memori--whythisanswer-title",children:[(0,s.jsx)("span",{className:"memori--whythisanswer-confidence",children:(0,s.jsx)("span",{className:"memori--whythisanswer-skeleton-text"})}),(0,s.jsx)("div",{className:"memori--whythisanswer-title-text",children:(0,s.jsx)("p",{className:"memori--whythisanswer-skeleton-text"})})]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("div",{className:"memori--whythisanswer-skeleton-text"}),(0,s.jsx)("div",{className:"memori--whythisanswer-skeleton-text"}),(0,s.jsx)("div",{className:"memori--whythisanswer-skeleton-text"})]}),(0,s.jsx)("div",{className:"memori--whythisanswer-skeleton-block"})]}),(0,s.jsxs)("li",{children:[(0,s.jsxs)("div",{className:"memori--whythisanswer-title",children:[(0,s.jsx)("span",{className:"memori--whythisanswer-confidence",children:(0,s.jsx)("span",{className:"memori--whythisanswer-skeleton-text"})}),(0,s.jsxs)("div",{className:"memori--whythisanswer-title-text",children:[(0,s.jsx)("p",{className:"memori--whythisanswer-skeleton-text"}),(0,s.jsx)("p",{className:"memori--whythisanswer-skeleton-text"})]})]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("div",{className:"memori--whythisanswer-skeleton-text"}),(0,s.jsx)("div",{className:"memori--whythisanswer-skeleton-text"})]}),(0,s.jsx)("div",{className:"memori--whythisanswer-skeleton-block"})]})]}),h.length>0&&(0,s.jsx)("ul",{className:"memori--whythisanswer-list",children:h.map((e=>{var t,n,r,i,o,a,l;return(0,s.jsxs)("li",{children:[(0,s.jsxs)("div",{className:"memori--whythisanswer-title",children:[(0,s.jsx)("span",{className:"memori--whythisanswer-confidence",children:e.confidenceLevel}),(0,s.jsxs)("div",{className:"memori--whythisanswer-title-text",children:[(0,s.jsx)("p",{children:(0,s.jsx)("strong",{children:wx(null!==(t=e.memory.title)&&void 0!==t?t:"")})}),(0,s.jsx)("p",{children:null===(r=null===(n=e.memory.titleVariants)||void 0===n?void 0:n.map((e=>wx(e))))||void 0===r?void 0:r.join(" | ")})]})]}),null===(i=e.memory.answers)||void 0===i?void 0:i.map(((e,t)=>(0,s.jsx)("p",{className:"memori--whythisanswer-answer",children:(0,s.jsx)(Hv,{rows:3,children:e.text})},t))),(0,s.jsx)(Sx,{links:null===(o=e.memory.media)||void 0===o?void 0:o.filter((e=>"text/html"===e.mimeType))}),null===(l=null===(a=e.memory.media)||void 0===a?void 0:a.filter((e=>"text/plain"===e.mimeType)))||void 0===l?void 0:l.map((e=>(0,s.jsx)(Hv,{rows:2,lineHeightMultiplier:2,innerClassName:"memori--whythisanswer-snippet-expandable",children:(0,s.jsx)(ox,{medium:e,showCopyButton:!1,showLineNumbers:!1},e.mediumID)},e.mediumID)))]},e.memory.memoryID)}))})]})]})},Cx={};Cx=function(){"use strict";var e=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,t=/[\0-\x1F\x7F-\x9F]/,n=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\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-\u2E4F\u2E52-\u2E5D\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]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,r=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;function i(i){const o={};i=i||{},o.src_Any=e.source,o.src_Cc=t.source,o.src_Z=r.source,o.src_P=n.source,o.src_ZPCc=[o.src_Z,o.src_P,o.src_Cc].join("|"),o.src_ZCc=[o.src_Z,o.src_Cc].join("|");const s="[><|]";return o.src_pseudo_letter="(?:(?!"+s+"|"+o.src_ZPCc+")"+o.src_Any+")",o.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",o.src_auth="(?:(?:(?!"+o.src_ZCc+"|[@/\\[\\]()]).)+@)?",o.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",o.src_host_terminator="(?=$|"+s+"|"+o.src_ZPCc+")(?!"+(i["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+o.src_ZPCc+"))",o.src_path="(?:[/?#](?:(?!"+o.src_ZCc+"|"+s+"|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+o.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+o.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+o.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+o.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+o.src_ZCc+"|[']).)+\\'|\\'(?="+o.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+o.src_ZCc+"|[.]|$)|"+(i["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+o.src_ZCc+"|$)|;(?!"+o.src_ZCc+"|$)|\\!+(?!"+o.src_ZCc+"|[!]|$)|\\?(?!"+o.src_ZCc+"|[?]|$))+|\\/)?",o.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',o.src_xn="xn--[a-z0-9\\-]{1,59}",o.src_domain_root="(?:"+o.src_xn+"|"+o.src_pseudo_letter+"{1,63})",o.src_domain="(?:"+o.src_xn+"|(?:"+o.src_pseudo_letter+")|(?:"+o.src_pseudo_letter+"(?:-|"+o.src_pseudo_letter+"){0,61}"+o.src_pseudo_letter+"))",o.src_host="(?:(?:(?:(?:"+o.src_domain+")\\.)*"+o.src_domain+"))",o.tpl_host_fuzzy="(?:"+o.src_ip4+"|(?:(?:(?:"+o.src_domain+")\\.)+(?:%TLDS%)))",o.tpl_host_no_ip_fuzzy="(?:(?:(?:"+o.src_domain+")\\.)+(?:%TLDS%))",o.src_host_strict=o.src_host+o.src_host_terminator,o.tpl_host_fuzzy_strict=o.tpl_host_fuzzy+o.src_host_terminator,o.src_host_port_strict=o.src_host+o.src_port+o.src_host_terminator,o.tpl_host_port_fuzzy_strict=o.tpl_host_fuzzy+o.src_port+o.src_host_terminator,o.tpl_host_port_no_ip_fuzzy_strict=o.tpl_host_no_ip_fuzzy+o.src_port+o.src_host_terminator,o.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+o.src_ZPCc+"|>|$))",o.tpl_email_fuzzy="(^|"+s+'|"|\\(|'+o.src_ZCc+")("+o.src_email_name+"@"+o.tpl_host_fuzzy_strict+")",o.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+o.src_ZPCc+"))((?![$+<=>^`||])"+o.tpl_host_port_fuzzy_strict+o.src_path+")",o.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+o.src_ZPCc+"))((?![$+<=>^`||])"+o.tpl_host_port_no_ip_fuzzy_strict+o.src_path+")",o}function o(e){return Array.prototype.slice.call(arguments,1).forEach((function(t){t&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e}function s(e){return Object.prototype.toString.call(e)}function a(e){return"[object String]"===s(e)}function l(e){return"[object Object]"===s(e)}function c(e){return"[object RegExp]"===s(e)}function u(e){return"[object Function]"===s(e)}function d(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const h={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function p(e){return Object.keys(e||{}).reduce((function(e,t){return e||h.hasOwnProperty(t)}),!1)}const f={"http:":{validate:function(e,t,n){const r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},m="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",g="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function v(e){e.__index__=-1,e.__text_cache__=""}function y(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function b(){return function(e,t){t.normalize(e)}}function x(e){const t=e.re=i(e.__opts__),n=e.__tlds__.slice();function r(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||n.push(m),n.push(t.src_xn),t.src_tlds=n.join("|"),t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");const o=[];function s(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){const n=e.__schemas__[t];if(null===n)return;const r={validate:null,link:null};if(e.__compiled__[t]=r,l(n))return c(n.validate)?r.validate=y(n.validate):u(n.validate)?r.validate=n.validate:s(t,n),void(u(n.normalize)?r.normalize=n.normalize:n.normalize?s(t,n):r.normalize=b());a(n)?o.push(t):s(t,n)})),o.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:b()};const h=Object.keys(e.__compiled__).filter((function(t){return t.length>0&&e.__compiled__[t]})).map(d).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+h+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+h+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),v(e)}function S(e,t){const n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function w(e,t){const n=new S(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function _(e,t){if(!(this instanceof _))return new _(e,t);t||p(e)&&(t=e,e={}),this.__opts__=o({},h,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=o({},f,e),this.__compiled__={},this.__tlds__=g,this.__tlds_replaced__=!1,this.re={},x(this)}function C(e={},t={}){const n=new _(e,t);return E(n,t),{extensions:[{name:"autolink",level:"inline",start:e=>{const t=A(n,e);if(t)return t.index},tokenizer(e){if(this.lexer.state.inLink)return;const t=A(n,e);if(!t)return;let r;return 0===t.index?r=t.raw:1===t.index&&"<"===e.charAt(0)&&">"===e.charAt(t.lastIndex)&&(r=`<${t.raw}>`),r?{type:"link",raw:r,text:t.text,href:t.url,tokens:[{type:"text",raw:t.text,text:t.text}]}:void 0}}]}}function A(e,t){const n=e.match(t);if(n&&n.length)return n[0]}function E(e,t){const n=t.tlds;delete t.tlds;const r=t.tldsKeepOld;delete t.tldsKeepOld,n&&e.tlds(n,r)}return _.prototype.add=function(e,t){return this.__schemas__[e]=t,x(this),this},_.prototype.set=function(e){return this.__opts__=o(this.__opts__,e),this},_.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let t,n,r,i,o,s,a,l,c;if(this.re.schema_test.test(e))for(a=this.re.schema_search,a.lastIndex=0;null!==(t=a.exec(e));)if(i=this.testSchemaAt(e,t[2],a.lastIndex),i){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(o=n.index+n[1].length,(this.__index__<0||o<this.__index__)&&(this.__schema__="",this.__index__=o,this.__last_index__=n.index+n[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(c=e.indexOf("@"),c>=0&&null!==(r=e.match(this.re.email_fuzzy))&&(o=r.index+r[1].length,s=r.index+r[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&s>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=s))),this.__index__>=0},_.prototype.pretest=function(e){return this.re.pretest.test(e)},_.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},_.prototype.match=function(e){const t=[];let n=0;this.__index__>=0&&this.__text_cache__===e&&(t.push(w(this,n)),n=this.__last_index__);let r=n?e.slice(n):e;for(;this.test(r);)t.push(w(this,n)),r=r.slice(this.__last_index__),n+=this.__last_index__;return t.length?t:null},_.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;const t=this.re.schema_at_start.exec(e);if(!t)return null;const n=this.testSchemaAt(e,t[2],t[0].length);return n?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+n,w(this,0)):null},_.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,n){return e!==n[t-1]})).reverse(),x(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,x(this),this)},_.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},_.prototype.onCompile=function(){},C}();var Ax={};Ax=function(e){"use strict";const t=/^(\${1,2})(?!\$)((?:\\.|[^\\\n])*?(?:\\.|[^\\\n\$]))\1(?=[\s?!\.,:?!。,:]|$)/,n=/^(\${1,2})\n((?:\\[^]|[^\\])+?)\n\1(?:\n|$)/;function r(e={}){return{extensions:[o(e,i(e,!1)),s(e,i(e,!0))]}}function i(t,n){return r=>e.renderToString(r.text,{...t,displayMode:r.displayMode})+(n?"\n":"")}function o(e,n){return{name:"inlineKatex",level:"inline",start(e){let n,r=e;for(;r;){if(n=r.indexOf("$"),-1===n)return;if((0===n||" "===r.charAt(n-1))&&r.substring(n).match(t))return n;r=r.substring(n+1).replace(/^\$+/,"")}},tokenizer(e,n){const r=e.match(t);if(r)return{type:"inlineKatex",raw:r[0],text:r[2].trim(),displayMode:2===r[1].length}},renderer:n}}function s(e,t){return{name:"blockKatex",level:"block",tokenizer(e,t){const r=e.match(n);if(r)return{type:"blockKatex",raw:r[0],text:r[2].trim(),displayMode:2===r[1].length}},renderer:t}}return r}(o("kqAxc"));const Ex=(e,t,n,r)=>{if(!t.rowspan)return"";return`${`<${n}`+(t.colspan>1?` colspan=${t.colspan}`:"")+(t.rowspan>1?` rowspan=${t.rowspan}`:"")+(r?` align=${r}`:"")+">"+e}</${n}>\n`},Tx=(e,t,n=[])=>{var r,i,o;const s=[...e.matchAll(/(?:[^|\\]|\\.?)+(?:\|+|$)/g)].map((e=>e[0]));(null===(r=s[0])||void 0===r?void 0:r.trim())||s.shift(),(null===(i=s[s.length-1])||void 0===i?void 0:i.trim())||s.pop();let a,l,c,u,d,h=0;for(a=0;a<s.length;a++){if(c=s[a].split(/\|+$/)[0],s[a]={rowspan:1,colspan:Math.max(s[a].length-c.length,1),text:c.trim().replace(/\\\|/g,"|")},"^"===c.slice(-1)&&n.length)for(d=0,l=0;l<n.length;l++){if(u=n[l],d===h&&u.colspan===s[a].colspan){s[a].rowSpanTarget=null!==(o=u.rowSpanTarget)&&void 0!==o?o:u,s[a].rowSpanTarget.text+=` ${s[a].text.slice(0,-1)}`,s[a].rowSpanTarget.rowspan+=1,s[a].rowspan=0;break}if(d+=u.colspan,d>h)break}h+=s[a].colspan}if(h>t)s.splice(t);else for(;h<t;)s.push({colspan:1,text:""}),h+=1;return s};Fv.marked.use({async:!1,gfm:!0,pedantic:!0,renderer:{link(e,t,n){const r=am(e);if(null===r)return n;let i='<a href="'+(e=r)+'"';return t&&(i+=' title="'+t+'"'),i+=' target="_blank" rel="noopener noreferrer">'+n+"</a>",i}}}),Fv.marked.use(t(Cx)()),Fv.marked.use(t(Ax)({throwOnError:!0,output:"htmlAndMathml"})),Fv.marked.use({extensions:[{name:"spanTable",level:"block",start(e){var t;return null===(t=e.match(/^\n *([^\n ].*\|.*)\n/))||void 0===t?void 0:t.index},tokenizer(e,t){const n=new RegExp("^ *([^\\n ].*\\|.*\\n(?: *[^\\s].*\\n)*?) {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n| {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)| {0,3}#{1,6} | {0,3}>| {4}[^\\n]| {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n| {0,3}(?:[*+-]|1[.)]) |<\\/?(?: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[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?: +|\\n|\\/?>)|<(?:script|pre|style|textarea|!--)).*(?:\\n|$))*)\\n*|$)").exec(e);if(n){const e={type:"spanTable",header:n[1].replace(/\n$/,"").split("\n"),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]?n[3].replace(/\n$/,"").split("\n"):[]};e.header[0]=Tx(e.header[0]);const t=e.header[0].reduce(((e,t)=>e+t.colspan),0);if(t===e.align.length){let r,i,o,s;e.raw=n[0];let a=e.align.length;for(r=0;r<a;r++)/^ *-+: *$/.test(e.align[r])?e.align[r]="right":/^ *:-+: *$/.test(e.align[r])?e.align[r]="center":/^ *:-+ *$/.test(e.align[r])?e.align[r]="left":e.align[r]=null;for(a=e.header.length,r=1;r<a;r++)e.header[r]=Tx(e.header[r],t,e.header[r-1]);for(a=e.rows.length,r=0;r<a;r++)e.rows[r]=Tx(e.rows[r],t,e.rows[r-1]);for(a=e.header.length,i=0;i<a;i++)for(s=e.header[i],o=0;o<s.length;o++)s[o].tokens=[],this.lexer.inline(s[o].text,s[o].tokens);for(a=e.rows.length,i=0;i<a;i++)for(s=e.rows[i],o=0;o<s.length;o++)s[o].tokens=[],this.lexer.inline(s[o].text,s[o].tokens);return e}}},renderer(e){let t,n,r,i,o,s,a='<div class="memori--responsive-table-wrapper"><table class="memori--table memori--table--compact">';for(a+="<thead>",t=0;t<e.header.length;t++){r=e.header[t];let o=0;for(a+="<tr>",n=0;n<r.length;n++)i=r[n],s=this.parser.parseInline(i.tokens),a+=Ex(s,i,"th",e.align[o]),o+=i.colspan;a+="</tr>"}if(a+="</thead>",e.rows.length){for(a+="<tbody>",t=0;t<e.rows.length;t++){for(r=e.rows[t],o=0,a+="<tr>",n=0;n<r.length;n++)i=r[n],s=this.parser.parseInline(i.tokens),a+=Ex(s,i,"td",e.align[o]),o+=i.colspan;a+="</tr>"}a+="</tbody>"}return a+="</table></div>",a}}]});var Mx=({message:e,memori:n,tenant:r,baseUrl:i,apiUrl:o,sessionID:a,showFeedback:l,showWhyThisAnswer:u=!0,simulateUserPrompt:d,showAIicon:h=!0,isFirst:p=!1,user:f,userAvatar:m,experts:g})=>{var v,y,b,x,S,w;const{t:_}=Se(),[C,A]=(0,c.useState)(!1),E=e.fromUser?e.translatedText||e.text:t(Uv).sanitize(Fv.marked.parse((e.translatedText||e.text).replaceAll(/\[([^\]]+)\]\(([^\)]+)\)/g,'<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>').replaceAll(/```markdown([^```]+)```/g,"$1").replaceAll("(","\\(").replaceAll(")","\\)").replaceAll(/(?<!\\)\(/g,"\\(").replaceAll(/(?<!\\)\)/g,"\\)")).trim().replace(/\n/g,"<br>").replace(/(<br>)+/g,"<br><br>"),{ADD_ATTR:["target"]}).replaceAll(/(?<!\\)\[/g,"\\[").replaceAll(/(?<!\\)\]/g,"\\]").replace(/(<br>)+/g,"<br>");return(0,c.useLayoutEffect)((()=>{"undefined"==typeof window||e.fromUser||"MathJax"in window&&window.MathJax.typesetPromise&&window.MathJax.typesetPromise([".memori-chat--bubble-content"])}),[e.text,e.fromUser]),(0,s.jsxs)(s.Fragment,{children:[(e.initial||p)&&(0,s.jsx)("div",{className:"memori-chat--bubble-initial"}),(0,s.jsxs)(np,{show:!0,appear:!0,as:"div",className:t(ws)("memori-chat--bubble-container",{"memori-chat--bubble-from-user":!!e.fromUser,"memori-chat--with-addon":e.generatedByAI&&h||l&&d}),children:[!e.fromUser&&(0,s.jsx)(np.Child,{as:"picture",className:"memori-chat--bubble-avatar",enter:"transition ease-in-out duration-300",enterFrom:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),enterTo:"opacity-1 scale-1 translate-x-0",leave:"transition ease-in-out duration-300",leaveFrom:"opacity-1 scale-1 translate-x-0",leaveTo:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),title:(null===(v=e.emitter)||void 0===v?void 0:v.length)&&n.enableBoardOfExperts?e.emitter:n.name,children:(0,s.jsx)("img",{className:"memori-chat--bubble-avatar-img",alt:(null===(y=e.emitter)||void 0===y?void 0:y.length)&&n.enableBoardOfExperts?e.emitter:n.name,src:(null===(b=e.emitter)||void 0===b?void 0:b.length)&&n.enableBoardOfExperts&&(null==g?void 0:g.find((t=>t.name===e.emitter)))?`${o}/api/v1/memoriai/memori/avatar/${null===(x=g.find((t=>t.name===e.emitter)))||void 0===x?void 0:x.expertMemoriID}`:n.avatarURL&&n.avatarURL.length>0?fv({type:"avatar",tenantID:null==r?void 0:r.id,resourceURI:n.avatarURL,baseURL:i,apiURL:o}):fv({tenantID:null==r?void 0:r.id,type:"avatar",baseURL:i||"https://www.aisuru.com",apiURL:o}),onError:e=>{e.currentTarget.src=n.avatarURL&&n.avatarURL.length>0?fv({type:"avatar",tenantID:null==r?void 0:r.id,resourceURI:n.avatarURL,baseURL:i}):fv({tenantID:null==r?void 0:r.id,type:"avatar",baseURL:i}),e.currentTarget.onerror=null}})}),(0,s.jsxs)(np.Child,{as:"div",className:t(ws)("memori-chat--bubble",{"memori-chat--user-bubble":!!e.fromUser,"memori-chat--with-addon":e.generatedByAI&&h||l&&d,"memori-chat--ai-generated":e.generatedByAI&&h,"memori-chat--with-feedback":l}),enter:"transition ease-in-out duration-300",enterFrom:"opacity-0 scale-09 translate-x-"+(e.fromUser?"30":"-30"),enterTo:"opacity-1 scale-1 translate-x-0",leave:"transition ease-in-out duration-300",leaveFrom:"opacity-1 scale-1 translate-x-0",leaveTo:"opacity-0 scale-09 translate-x-"+(e.fromUser?"30":"-30"),children:[(0,s.jsx)("div",{dir:"auto",className:"memori-chat--bubble-content",dangerouslySetInnerHTML:{__html:E}}),(e.generatedByAI&&h||l&&d)&&(0,s.jsxs)("div",{className:"memori-chat--bubble-addon",children:[l&&!!d&&(0,s.jsx)(zv,{memori:n,className:"memori-chat--bubble-feedback",dropdown:!0,onNegativeClick:e=>{e&&d(e)}}),e.generatedByAI&&h&&(0,s.jsx)(vv,{align:"left",content:_("generatedByAI"),className:"memori-chat--bubble-action-icon memori-chat--bubble-action-icon--ai",children:(0,s.jsx)("span",{children:(0,s.jsx)(gv,{title:_("generatedByAI")||void 0})})}),!e.fromUser&&e.questionAnswered&&o&&u&&(0,s.jsx)(Sf,{ghost:!0,shape:"circle",title:_("whyThisAnswer")||void 0,className:"memori-chat--bubble-action-icon",onClick:()=>A(!0),disabled:C,icon:(0,s.jsx)(jv,{title:_("whyThisAnswer")||void 0})})]})]}),e.fromUser&&(0,s.jsx)(s.Fragment,{children:m&&"string"==typeof m||!m&&(null===(S=null==f?void 0:f.avatarURL)||void 0===S?void 0:S.length)?(0,s.jsx)(np.Child,{as:"picture",className:"memori-chat--bubble-avatar",enter:"transition ease-in-out duration-300",enterFrom:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),enterTo:"opacity-1 scale-1 translate-x-0",leave:"transition ease-in-out duration-300",leaveFrom:"opacity-1 scale-1 translate-x-0",leaveTo:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),children:(0,s.jsx)("img",{className:"memori-chat--bubble-avatar-img",alt:null!==(w=null==f?void 0:f.userName)&&void 0!==w?w:"User",src:null!=m?m:null==f?void 0:f.avatarURL})}):m?(0,s.jsx)(np.Child,{as:"div",className:"memori-chat--bubble-avatar",enter:"transition ease-in-out duration-300",enterFrom:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),enterTo:"opacity-1 scale-1 translate-x-0",leave:"transition ease-in-out duration-300",leaveFrom:"opacity-1 scale-1 translate-x-0",leaveTo:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),children:m}):(0,s.jsx)(np.Child,{as:"div",className:"memori-chat--bubble-avatar",enter:"transition ease-in-out duration-300",enterFrom:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),enterTo:"opacity-1 scale-1 translate-x-0",leave:"transition ease-in-out duration-300",leaveFrom:"opacity-1 scale-1 translate-x-0",leaveTo:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),children:(0,s.jsx)(mv,{})})})]}),C&&o&&(0,s.jsx)(_x,{visible:C,message:e,closeDrawer:()=>A(!1),apiURL:o,sessionID:a})]})};c=o("85Hg2"),c=o("85Hg2");function Ix(e=0){let[t,n]=(0,c.useState)(e),r=(0,c.useCallback)((e=>n((t=>t|e))),[t]),i=(0,c.useCallback)((e=>Boolean(t&e)),[t]),o=(0,c.useCallback)((e=>n((t=>t&~e))),[n]),s=(0,c.useCallback)((e=>n((t=>t^e))),[n]);return{addFlag:r,hasFlag:i,removeFlag:o,toggleFlag:s}}let Rx=(0,(c=o("85Hg2")).createContext)(null);function Px(){let e=(0,c.useContext)(Rx);if(null===e){let e=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,Px),e}return e}function kx(){let[e,n]=(0,c.useState)([]);return[e.length>0?e.join(" "):void 0,(0,c.useMemo)((()=>function(e){let r=Mh((e=>(n((t=>[...t,e])),()=>n((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),i=(0,c.useMemo)((()=>({register:r,slot:e.slot,name:e.name,props:e.props})),[r,e.slot,e.name,e.props]);return t(c).createElement(Rx.Provider,{value:i},e.children)}),[n])]}let Ox=mh((function(e,t){let{passive:n=!1,...r}=e,i=Px(),o=`headlessui-label-${cp()}`,s=Ph(t);_h((()=>i.register(o)),[o,i.register]);let a={ref:s,...i.props,id:o};return n&&("onClick"in a&&delete a.onClick,"onClick"in r&&delete r.onClick),hh({ourProps:a,theirProps:r,slot:i.slot||{},defaultTag:"label",name:i.name||"Label"})}));var Nx,Lx=((Nx=Lx||{})[Nx.RegisterOption=0]="RegisterOption",Nx[Nx.UnregisterOption=1]="UnregisterOption",Nx);let Dx={0(e,t){let n=[...e.options,{id:t.id,element:t.element,propsRef:t.propsRef}];return{...e,options:Cp(n,(e=>e.element.current))}},1(e,t){let n=e.options.slice(),r=e.options.findIndex((e=>e.id===t.id));return-1===r?e:(n.splice(r,1),{...e,options:n})}},Bx=(0,c.createContext)(null);function zx(e){let t=(0,c.useContext)(Bx);if(null===t){let t=new Error(`<${e} /> is missing a parent <RadioGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,zx),t}return t}function Fx(e,t){return lh(t.type,Dx,e,t)}Bx.displayName="RadioGroupContext";let Ux=mh((function(e,n){let{value:r,defaultValue:i,name:o,onChange:s,by:a=((e,t)=>e===t),disabled:l=!1,...u}=e,d=Mh("string"==typeof a?(e,t)=>{let n=a;return(null==e?void 0:e[n])===(null==t?void 0:t[n])}:a),[h,p]=(0,c.useReducer)(Fx,{options:[]}),f=h.options,[m,g]=kx(),[v,y]=Zp(),b=`headlessui-radiogroup-${cp()}`,x=(0,c.useRef)(null),S=Ph(x,n),[w,_]=ym(r,s,i),C=(0,c.useMemo)((()=>f.find((e=>!e.propsRef.current.disabled))),[f]),A=(0,c.useMemo)((()=>f.some((e=>d(e.propsRef.current.value,w)))),[f,w]),E=Mh((e=>{var t;if(l||d(e,w))return!1;let n=null==(t=f.find((t=>d(t.propsRef.current.value,e))))?void 0:t.propsRef.current;return(null==n||!n.disabled)&&(null==_||_(e),!0)}));dm({container:x.current,accept:e=>"radio"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let T=Mh((e=>{let t=x.current;if(!t)return;let n=hp(t),r=f.filter((e=>!1===e.propsRef.current.disabled)).map((e=>e.element.current));switch(e.key){case ip.Enter:vm(e.currentTarget);break;case ip.ArrowLeft:case ip.ArrowUp:if(e.preventDefault(),e.stopPropagation(),Ep(r,mp.Previous|mp.WrapAround)===gp.Success){let e=f.find((e=>e.element.current===(null==n?void 0:n.activeElement)));e&&E(e.propsRef.current.value)}break;case ip.ArrowRight:case ip.ArrowDown:if(e.preventDefault(),e.stopPropagation(),Ep(r,mp.Next|mp.WrapAround)===gp.Success){let e=f.find((e=>e.element.current===(null==n?void 0:n.activeElement)));e&&E(e.propsRef.current.value)}break;case ip.Space:{e.preventDefault(),e.stopPropagation();let t=f.find((e=>e.element.current===(null==n?void 0:n.activeElement)));t&&E(t.propsRef.current.value)}}})),M=Mh((e=>(p({type:0,...e}),()=>p({type:1,id:e.id})))),I=(0,c.useMemo)((()=>({registerOption:M,firstOption:C,containsCheckedOption:A,change:E,disabled:l,value:w,compare:d})),[M,C,A,E,l,w,d]),R={ref:S,id:b,role:"radiogroup","aria-labelledby":m,"aria-describedby":v,onKeyDown:T},P=(0,c.useMemo)((()=>({value:w})),[w]);return t(c).createElement(y,{name:"RadioGroup.Description"},t(c).createElement(g,{name:"RadioGroup.Label"},t(c).createElement(Bx.Provider,{value:I},null!=o&&null!=w&&fm({[o]:w}).map((([e,n])=>t(c).createElement(dp,{features:up.Hidden,...gh({key:e,as:"input",type:"radio",checked:null!=n,hidden:!0,readOnly:!0,name:e,value:n})}))),hh({ourProps:R,theirProps:u,slot:P,defaultTag:"div",name:"RadioGroup"}))))}));var jx=(e=>(e[e.Empty=1]="Empty",e[e.Active=2]="Active",e))(jx||{});let Hx=mh((function(e,n){let r=(0,c.useRef)(null),i=Ph(r,n),o=`headlessui-radiogroup-option-${cp()}`,[s,a]=kx(),[l,u]=Zp(),{addFlag:d,removeFlag:h,hasFlag:p}=Ix(1),{value:f,disabled:m=!1,...g}=e,v=(0,c.useRef)({value:f,disabled:m});_h((()=>{v.current.value=f}),[f,v]),_h((()=>{v.current.disabled=m}),[m,v]);let{registerOption:y,disabled:b,change:x,firstOption:S,containsCheckedOption:w,value:_,compare:C}=zx("RadioGroup.Option");_h((()=>y({id:o,element:r,propsRef:v})),[o,y,r,e]);let A=Mh((e=>{var t;if(op(e.currentTarget))return e.preventDefault();!x(f)||(d(2),null==(t=r.current)||t.focus())})),E=Mh((e=>{if(op(e.currentTarget))return e.preventDefault();d(2)})),T=Mh((()=>h(2))),M=(null==S?void 0:S.id)===o,I=b||m,R=C(_,f),P={ref:i,id:o,role:"radio","aria-checked":R?"true":"false","aria-labelledby":s,"aria-describedby":l,"aria-disabled":!!I||void 0,tabIndex:I?-1:R||!w&&M?0:-1,onClick:I?void 0:A,onFocus:I?void 0:E,onBlur:I?void 0:T},k=(0,c.useMemo)((()=>({checked:R,disabled:I,active:p(2)})),[R,I,p]);return t(c).createElement(u,{name:"RadioGroup.Description"},t(c).createElement(a,{name:"RadioGroup.Label"},hh({ourProps:P,theirProps:g,slot:k,defaultTag:"div",name:"RadioGroup.Option"})))})),Vx=Object.assign(Ux,{Option:Hx,Label:Ox,Description:Xp});var Gx=({sendOnEnter:e,setSendOnEnter:n})=>{const{t:r}=Se();return(0,s.jsxs)(Ov,{as:"div",className:"memori-send-on-enter-menu",children:[(0,s.jsx)(Ov.Button,{className:t(ws)("memori-button","memori-button--circle","memori-button--icon-only","memori-share-button--button","memori--conversation-button"),children:(0,s.jsx)("div",{className:"memori-button--icon",children:(0,s.jsx)("span",{style:{display:"block",width:"1rem",height:"1rem"},children:"…"})})}),(0,s.jsx)(Ov.Items,{className:"memori-menu--overlay",children:(0,s.jsxs)(Vx,{value:e,onChange:n,children:[(0,s.jsx)(Vx.Option,{value:"keypress",className:"memori-menu--option",children:({checked:e})=>(0,s.jsx)(Ov.Item,{children:(0,s.jsx)(Sf,{className:"memori-menu--button",ghost:!0,outlined:e,icon:(0,s.jsx)("span",{className:"memori-menu--icon",children:e?"✓":""}),children:r("widget.sendOnKeypress")})})}),(0,s.jsx)(Vx.Option,{value:"click",className:"memori-menu--option",children:({checked:e})=>(0,s.jsx)(Ov.Item,{children:(0,s.jsx)(Sf,{className:"memori-menu--button",ghost:!0,outlined:e,icon:(0,s.jsx)("span",{className:"memori-menu--icon",children:e?"✓":""}),children:r("widget.sendOnClick")})})})]})})]})};c=o("85Hg2");var Wx=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M855 160.1l-189.2 23.5c-6.6.8-9.3 8.8-4.7 13.5l54.7 54.7-153.5 153.5a8.03 8.03 0 0 0 0 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l153.6-153.6 54.7 54.7a7.94 7.94 0 0 0 13.5-4.7L863.9 169a7.9 7.9 0 0 0-8.9-8.9zM416.6 562.3a8.03 8.03 0 0 0-11.3 0L251.8 715.9l-54.7-54.7a7.94 7.94 0 0 0-13.5 4.7L160.1 855c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 153.6-153.6c3.1-3.1 3.1-8.2 0-11.3l-45.2-45z"})});var qx=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M391 240.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L200 146.3a8.03 8.03 0 0 0-11.3 0l-42.4 42.3a8.03 8.03 0 0 0 0 11.3L280 333.6l-43.9 43.9a8.01 8.01 0 0 0 4.7 13.6L401 410c5.1.6 9.5-3.7 8.9-8.9L391 240.9zm10.1 373.2L240.8 633c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L146.3 824a8.03 8.03 0 0 0 0 11.3l42.4 42.3c3.1 3.1 8.2 3.1 11.3 0L333.7 744l43.7 43.7A8.01 8.01 0 0 0 391 783l18.9-160.1c.6-5.1-3.7-9.4-8.8-8.8zm221.8-204.2L783.2 391c6.6-.8 9.4-8.9 4.7-13.6L744 333.6 877.7 200c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.3a8.03 8.03 0 0 0-11.3 0L690.3 279.9l-43.7-43.7a8.01 8.01 0 0 0-13.6 4.7L614.1 401c-.6 5.2 3.7 9.5 8.8 8.9zM744 690.4l43.9-43.9a8.01 8.01 0 0 0-4.7-13.6L623 614c-5.1-.6-9.5 3.7-8.9 8.9L633 783.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L824 877.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L744 690.4z"})});var Kx=({disabled:e=!1,value:n,onChange:r,onPressEnter:i,onFocus:o,onBlur:a})=>{const{t:l}=Se(),[u,d]=(0,c.useState)(!1);return(0,s.jsx)("div",{"data-testid":"chat-textarea",className:t(ws)("memori-chat-textarea",{"memori-chat-textarea--expanded":u,"memori-chat-textarea--disabled":e}),children:(0,s.jsxs)("div",{className:"memori-chat-textarea--inner",children:[(0,s.jsx)("textarea",{className:"memori-chat-textarea--input",disabled:e,value:n,onChange:e=>{r(e.target.value)},onKeyDownCapture:e=>{"Enter"===e.key&&!e.shiftKey&&i&&i(e)},onFocus:o,onBlur:a}),(0,s.jsx)("div",{className:"memori-chat-textarea--expand",children:(0,s.jsx)(Sf,{className:t(ws)("memori-chat-textarea--expand-button"),onClick:()=>d(!u),padded:!1,ghost:!0,title:u?l("collapse")||"Collapse":l("expand")||"Expand",icon:u?(0,s.jsx)(qx,{}):(0,s.jsx)(Wx,{})})})]})})};var Jx=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2-8.5 2.1-13.8 10.7-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"})});c=o("85Hg2");var Qx=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z"})});var Yx=({listening:e,stopAudio:n,startListening:r,stopListening:i})=>{const{t:o}=Se(),[a,l]=(0,c.useState)(),u=(0,c.useRef)(null),d=e=>{e.preventDefault(),l(o("write_and_speak.holdToSpeak")||"Hold to record"),u.current||(u.current=setTimeout((()=>{n(),l(o("write_and_speak.releaseToEndListening")||"Release to end listening"),r()}),300))},h=()=>{u.current&&(clearTimeout(u.current),u.current=null),i(),l(void 0)};return(0,c.useEffect)((()=>()=>h()),[]),(0,s.jsx)(vv,{visible:!!a,content:(0,s.jsx)("span",{children:a||o("write_and_speak.pressAndHoldToSpeak")||"Press and hold to speak"}),align:"topLeft",className:"memori-mic-btn-tooltip",children:(0,s.jsx)(Sf,{primary:!0,className:t(ws)("memori-chat-inputs--mic",{"memori-chat-inputs--mic--listening":e}),title:e?o("write_and_speak.micButtonPopoverListening")||"Listening":o("write_and_speak.micButtonPopover")||"Start listening",onMouseDown:d,onTouchStart:d,onMouseUp:h,onMouseLeave:h,onTouchEnd:h,shape:"circle",icon:(0,s.jsx)(Qx,{})})})};var Zx=({dialogState:e,sendOnEnter:n="click",setSendOnEnter:r,userMessage:i="",onChangeUserMessage:o,sendMessage:a,onTextareaFocus:l,onTextareaBlur:c,onTextareaPressEnter:u,showMicrophone:d=!1,microphoneMode:h="HOLD_TO_TALK",listening:p=!1,stopAudio:f,startListening:m,stopListening:g})=>{const{t:v}=Se();return(0,s.jsxs)("fieldset",{id:"chat-fieldset",className:"memori-chat-inputs",disabled:"X2a"===(null==e?void 0:e.state)||"X3"===(null==e?void 0:e.state),children:[(0,s.jsx)(Gx,{sendOnEnter:n,setSendOnEnter:r}),(0,s.jsx)(Kx,{value:i,onChange:o,onPressEnter:u,onFocus:l,onBlur:c,disabled:["R2","R3","R4","R5","G3","X3"].includes((null==e?void 0:e.state)||"")}),(0,s.jsx)(Sf,{shape:"circle",primary:!!(null==i?void 0:i.length),disabled:!i||0===i.length,className:"memori-chat-inputs--send",onClick:()=>{a(i),f(),speechSynthesis.speak(new SpeechSynthesisUtterance(""))},title:v("send")||"Send",icon:(0,s.jsx)(Jx,{})}),d&&"HOLD_TO_TALK"===h&&(0,s.jsx)(Yx,{listening:p,startListening:m,stopListening:()=>{g(),(null==i?void 0:i.length)&&a(i)},stopAudio:f}),d&&"CONTINUOUS"===h&&(0,s.jsx)(Sf,{primary:!0,className:t(ws)("memori-chat-inputs--mic",{"memori-chat-inputs--mic--listening":p}),title:p?v("write_and_speak.micButtonPopoverListening")||"Listening":v("write_and_speak.micButtonPopover")||"Start listening",onClick:()=>{p?g():(f(),m())},shape:"circle",icon:(0,s.jsx)(Qx,{})})]})};c=o("85Hg2");const Xx={en:[{delayAfter:3,text:"Generating an accurate and fancy response..."},{delayAfter:3,text:"Generating a response that will blow your mind..."},{delayAfter:3,text:"Generating a response that will make you smile..."},{delayAfter:3,text:"Thinking of a response..."},{delayAfter:3,text:"Thinking of a response that will make you smile..."},{delayAfter:3,text:"Gathering my thoughts..."},{delayAfter:3,text:"Gathering my thoughts to give you a response..."}],it:[{delayAfter:3,text:"Sto generando una risposta accurata e fantasiosa..."},{delayAfter:3,text:"Sto generando una risposta che ti farà impazzire..."},{delayAfter:3,text:"Sto generando una risposta che ti farà sorridere..."},{delayAfter:3,text:"Sto pensando ad una risposta..."},{delayAfter:3,text:"Sto pensando ad una risposta che ti farà sorridere..."},{delayAfter:3,text:"Sto raccogliendo i miei pensieri..."},{delayAfter:3,text:"Sto raccogliendo i miei pensieri per darti una risposta..."}]},$x=(e=3)=>new Array(20*e).fill(" ").join("");var eS=({useDefaultSentences:e=!1,lang:t="en",sentence:n,sentences:r})=>{var i;const[o,a]=(0,c.useState)(0),[l,u]=(0,c.useState)((null===(i=null==r?void 0:r[t])||void 0===i?void 0:i.length)?`${r[t][0].text.endsWith("...")||!r[t][0].text.length?r[t][0].text:`${r[t][0].text}...`}${$x(r[t][0].delayAfter)}`:n?`${n.endsWith("...")||!n.length?n:`${n}...`}${$x()}`:""),[d,h]=(0,c.useState)("");return(0,c.useEffect)((()=>{const i=setInterval((()=>{var i;const s=l[d.length];if(void 0!==s&&l.length>0)h((e=>e+s));else if((null===(i=null==r?void 0:r[t])||void 0===i?void 0:i.length)&&o<r[t].length-1){const e=o+1,n=r[t][e];u(`${n.text.endsWith("...")||!n.text.length?n.text:`${n.text}...`}${$x(n.delayAfter)}`),h(""),a(e)}else if(!r&&!n&&e){const e=Xx[t][Math.floor(Math.random()*Xx[t].length)];u(`${e.text}${$x(e.delayAfter)}`),h("")}}),50);return()=>clearInterval(i)})),(0,s.jsx)("div",{className:"memori-chat--bubble",children:(0,s.jsxs)("div",{className:"memori-chat--bubble-typing",children:[(0,s.jsxs)("div",{id:"wave",children:[(0,s.jsx)("span",{className:"dot"}),(0,s.jsx)("span",{className:"dot"}),(0,s.jsx)("span",{className:"dot"})]}),l.length>0&&(0,s.jsx)("p",{children:d})]})})};var tS=(0,c.memo)((({memori:e,tenant:n,sessionID:r,baseUrl:i,apiUrl:o,translateTo:a,memoriTyping:l,typingText:u,showTypingText:d=!1,history:h=[],authToken:p,dialogState:f,simulateUserPrompt:m,showDates:g=!1,showContextPerLine:v=!1,showAIicon:y=!0,showWhyThisAnswer:b=!0,selectReceiverTag:x,preview:S=!1,instruct:w=!1,showInputs:_=!0,showMicrophone:C=!1,microphoneMode:A="HOLD_TO_TALK",sendOnEnter:E,setSendOnEnter:T,attachmentsMenuOpen:M,setAttachmentsMenuOpen:I,userMessage:R="",onChangeUserMessage:P,sendMessage:k,listening:O,isPlayingAudio:N,stopAudio:L,startListening:D,stopListening:B,resetTranscript:z,customMediaRenderer:F,user:U,userAvatar:j,experts:H})=>{var V,G,W,q,K,J,Q,Y;const Z=()=>{setTimeout((()=>{var e,t,n;null===(e=document.querySelector(".memori-chat--content"))||void 0===e||e.scrollTo(0,null!==(n=null===(t=document.querySelector(".memori-chat--content"))||void 0===t?void 0:t.scrollHeight)&&void 0!==n?n:0)}),200)};(0,c.useEffect)((()=>{!S&&Z()}),[h,S]);return(0,s.jsxs)("div",{className:t(ws)("memori-chat--wrapper",{"memori-chat-wrapper--translate":a}),id:"chat-wrapper",lang:null==a?void 0:a.toUpperCase(),"data-memori-lang":null!==(q=null===(W=null===(G=null===(V=e.culture)||void 0===V?void 0:V.split("-"))||void 0===G?void 0:G[0])||void 0===W?void 0:W.toUpperCase())&&void 0!==q?q:"EN",children:[(0,s.jsx)("div",{className:t(ws)("memori-chat--history",{"memori-chat--history-touch":Zf()}),children:(0,s.jsxs)("div",{className:t(ws)("memori-chat--content",{"memori-chat--content-touch":Zf()}),children:[(0,s.jsx)("div",{className:t(ws)("memori-chat--cover"),style:{backgroundImage:`url("${fv({type:"cover",tenantID:null==n?void 0:n.id,resourceURI:e.coverURL,baseURL:i,apiURL:o})}"), url("${fv({type:"cover",tenantID:null==n?void 0:n.id,baseURL:i||"https://www.aisuru.com",apiURL:o})}")`}}),h.map(((l,u)=>{var d,p,x,S;return(0,s.jsxs)(t(c).Fragment,{children:[(0,s.jsx)(Mx,{isFirst:0===u,message:l,memori:e,tenant:n,baseUrl:i,apiUrl:o,sessionID:r,simulateUserPrompt:m,showAIicon:y,showWhyThisAnswer:b,showFeedback:u===h.length-1&&!l.fromUser&&(null==f?void 0:f.acceptsFeedback),user:U,userAvatar:j,experts:H}),g&&!!l.timestamp&&(0,s.jsx)("small",{className:"memori-chat--timestamp "+(l.fromUser?"text-right":"text-left"),children:new Intl.DateTimeFormat("it",{hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date(l.timestamp.endsWith("Z")?l.timestamp:`${l.timestamp}Z`))}),v&&!!Object.keys(null!==(d=l.contextVars)&&void 0!==d?d:{}).length&&(0,s.jsx)("div",{className:"memori-chat--context-vars",children:Object.keys(null!==(p=l.contextVars)&&void 0!==p?p:{}).map((e=>{var t,n,r;return"-"===(null===(t=l.contextVars)||void 0===t?void 0:t[e])?(0,s.jsx)("div",{className:"memori-chat--context-tag memori-chat--context-tag-canceled",children:(0,s.jsx)("span",{className:"memori-chat--context-tag-text",children:e})},e):"✔️"===(null===(n=l.contextVars)||void 0===n?void 0:n[e])?(0,s.jsx)("div",{className:"memori-chat--context-tag",children:(0,s.jsx)("span",{className:"memori-chat--context-tag-text",children:e})},e):(0,s.jsx)("div",{className:"memori-chat--context-tag",children:(0,s.jsxs)("span",{className:"memori-chat--context-tag-text",children:[e,": ",null===(r=l.contextVars)||void 0===r?void 0:r[e]]})},e)}))}),(0,s.jsx)(Sx,{simulateUserPrompt:m,media:null===(x=null==l?void 0:l.media)||void 0===x?void 0:x.filter((e=>"text/html"!==e.mimeType&&"text/plain"!==e.mimeType)),links:null===(S=null==l?void 0:l.media)||void 0===S?void 0:S.filter((e=>"text/html"===e.mimeType)),sessionID:r,baseUrl:i,apiUrl:o,translateTo:a,customMediaRenderer:F})]},u)})),(null==f?void 0:f.hints)&&f.hints.length>0&&!l&&(0,s.jsx)(Sx,{simulateUserPrompt:m,hints:f.translatedHints?f.translatedHints:f.hints.map((e=>({text:e,originalText:e})))}),!!l&&(0,s.jsx)(eS,{useDefaultSentences:d,lang:a?"it"===a.toLowerCase()?"it":"en":"it"===(null===(Q=null===(J=null===(K=e.culture)||void 0===K?void 0:K.split("-"))||void 0===J?void 0:J[0])||void 0===Q?void 0:Q.toLowerCase())?"it":"en",sentence:u,sentences:e.enableBoardOfExperts?Qv:void 0},u),(0,s.jsx)("div",{id:"end-messages-ref"})]})}),"X3"===(null==f?void 0:f.state)&&r&&(0,s.jsx)("div",{className:"memori-chat--known-tags",children:Object.keys(null!==(Y=f.knownTags)&&void 0!==Y?Y:{}).filter((t=>t!==e.giverTag)).map((e=>{var t;return(0,s.jsx)(Sf,{icon:(0,s.jsx)("span",{className:"memori-chat--known-tag-icon",children:e}),className:"memori-chat--known-tag",onClick:()=>x(e),children:null===(t=f.knownTags)||void 0===t?void 0:t[e]},e)}))}),_&&(0,s.jsx)(Zx,{userMessage:R,onChangeUserMessage:P,dialogState:f,instruct:w,authToken:p,sendMessage:k,microphoneMode:A,sendOnEnter:E,setSendOnEnter:T,attachmentsMenuOpen:M,setAttachmentsMenuOpen:I,onTextareaPressEnter:()=>{"keypress"===E&&(null==R?void 0:R.length)>0&&(B(),k(R),P(""),z())},onTextareaFocus:()=>{var e,t,n,r;B(),Zf()&&window.innerWidth<=768&&(null===(t=null===(e=document.getElementById("chat-wrapper"))||void 0===e?void 0:e.classList)||void 0===t||t.add("chat-focused"),null===(r=null===(n=document.querySelector(".memori.memori-widget"))||void 0===n?void 0:n.classList)||void 0===r||r.add("chat-focused"),setTimeout((()=>{Z()}),300))},onTextareaBlur:()=>{var e,t,n,r,i;(null===(t=null===(e=document.getElementById("chat-wrapper"))||void 0===e?void 0:e.classList)||void 0===t?void 0:t.contains("chat-focused"))&&(null===(n=document.getElementById("chat-wrapper"))||void 0===n||n.classList.remove("chat-focused"),null===(i=null===(r=document.querySelector(".memori.memori-widget"))||void 0===r?void 0:r.classList)||void 0===i||i.remove("chat-focused"),Z())},startListening:D,stopListening:B,stopAudio:L,listening:O,isPlayingAudio:N,showMicrophone:C})]})}));c=o("85Hg2");var nS=({className:e,title:t})=>(0,s.jsxs)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:[(0,s.jsx)("path",{d:"M140 188h584v164h76V144c0-17.7-14.3-32-32-32H96c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h544v-76H140V188z"}),(0,s.jsx)("path",{d:"M414.3 256h-60.6c-3.4 0-6.4 2.2-7.6 5.4L219 629.4c-.3.8-.4 1.7-.4 2.6 0 4.4 3.6 8 8 8h55.1c3.4 0 6.4-2.2 7.6-5.4L322 540h196.2L422 261.4c-1.3-3.2-4.3-5.4-7.7-5.4zm12.4 228h-85.5L384 360.2 426.7 484zM936 528H800v-93c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v93H592c-13.3 0-24 10.7-24 24v176c0 13.3 10.7 24 24 24h136v152c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V752h136c13.3 0 24-10.7 24-24V552c0-13.3-10.7-24-24-24zM728 680h-88v-80h88v80zm160 0h-88v-80h88v80z"})]});var rS=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M464 720a48 48 0 1096 0 48 48 0 10-96 0zm16-304v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8zm475.7 440l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-783.5-27.9L512 239.9l339.8 588.2H172.2z"})});var iS=({memoriName:e,blockedUntil:t,notEnoughCredits:n=!1,showGiverInfo:r=!1,showTitle:i=!1,marginLeft:o=!1})=>{const{t:a}=Se(),l=new Date(t||Date.now());return n||l>new Date(Date.now())?(0,s.jsx)(vv,{className:"blocked-memori-badge--tooltip",content:n?(0,s.jsx)(s.Fragment,{children:a("notEnoughCredits")}):(0,s.jsxs)(s.Fragment,{children:[!r&&a("memoriBlockedAnon",{name:e,date:new Intl.DateTimeFormat("it",{day:"numeric",month:"long",year:"numeric"}).format(l)}),r&&a("memoriBlockedUntil",{date:new Intl.DateTimeFormat("it",{day:"numeric",month:"long",year:"numeric"}).format(l)}),r&&` ${a("memoriBlockedReasonExceedChats")}`,r&&(0,s.jsx)("br",{}),r&&`\n${a("memoriBlockedGiverHelper")}`]}),children:(0,s.jsxs)("div",{className:"blocked-memori-badge--wrapper",children:[(0,s.jsx)("div",{className:"blocked-memori-badge "+(o?" margin-left":""),children:(0,s.jsx)(rS,{className:"blocked-memori-badge--icon"})}),i&&(0,s.jsx)("span",{className:"blocked-memori-badge--title",children:a("memoriBlockedTitle")})]})}):null};var oS=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",width:"20",height:"16",viewBox:"0 0 640 512",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M211.2 96a64 64 0 10-128 0 64 64 0 10128 0zM32 256c0 17.7 14.3 32 32 32h85.6c10.1-39.4 38.6-71.5 75.8-86.6-9.7-6-21.2-9.4-33.4-9.4H96c-35.3 0-64 28.7-64 64zm461.6 32H576c17.7 0 32-14.3 32-32 0-35.3-28.7-64-64-64h-96c-11.7 0-22.7 3.1-32.1 8.6 38.1 14.8 67.4 47.3 77.7 87.4zm-102.4-61.6c-6.9-1.6-14.2-2.4-21.6-2.4h-96c-8.5 0-16.7 1.1-24.5 3.1-30.8 8.1-55.6 31.1-66.1 60.9-3.5 10-5.5 20.8-5.5 32 0 17.7 14.3 32 32 32h224c17.7 0 32-14.3 32-32 0-11.2-1.9-22-5.5-32-10.8-30.7-36.8-54.2-68.9-61.6zM563.2 96a64 64 0 10-128 0 64 64 0 10128 0zm-241.6 96a80 80 0 100-160 80 80 0 100 160zM32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32h576c17.7 0 32-14.3 32-32s-14.3-32-32-32H32z"})});var sS=({className:e,title:t})=>(0,s.jsxs)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",width:"20",height:"20",viewBox:"0 0 48 48",className:e,"aria-label":t,children:[(0,s.jsx)("path",{d:"M30.106 48v-2.745a2.213 2.213 0 012.213-2.212h6.11a2.392 2.392 0 002.326-2.466v-3.223a1.834 1.834 0 01.459-1.145 2.912 2.912 0 00.712-1.926l-.007-.667a1.016 1.016 0 01.651-.952h1.067a1.363 1.363 0 001.051-.456 1.304 1.304 0 00.19-1.395 67.032 67.032 0 01-3.037-7.51 4.767 4.767 0 01-.217-1.507l-.002-4.994a14.513 14.513 0 00-.552-3.963l-.006-.022a13.959 13.959 0 00-3.137-5.702q-.479-.516-1.006-1.003a17.67 17.67 0 00-.677-.623A18.303 18.303 0 0024.194 1a19.617 19.617 0 00-12.539 4.489 17.555 17.555 0 00-3.945 21.69C9.945 31.507 11.694 38.622 12.14 46v2",strokeMiterlimit:10}),(0,s.jsx)("path",{d:"M27.917 12L31.417 12"}),(0,s.jsx)("path",{d:"M27.917 26L31.417 26"}),(0,s.jsx)("path",{d:"M29.667 12L29.667 26"}),(0,s.jsx)("path",{d:"M23.992 26L19.904 12 19.226 12 15.159 26"}),(0,s.jsx)("path",{d:"M16.854 21.133L22.276 21.133"})]});c=o("85Hg2");var aS=({forceStatus:e,provider:t})=>{var n;const{t:r}=Se(),[i,o]=(0,c.useState)(null!=e?e:"operational"),a=(e=>{switch(e){case"DEFAULT":case"OpenAI":return{getStatus:async()=>{var e;const t=await fetch("https://status.openai.com/api/v2/summary.json"),n=null===(e=(await t.json()).components.find((e=>"API"===e.name)))||void 0===e?void 0:e.status;return null!=n?n:"operational"},statusPage:"https://status.openai.com/"};default:return{getStatus:async()=>"operational",statusPage:""}}})(t);return(0,c.useEffect)((()=>{e||a.getStatus().then((e=>o(e))).catch(console.log)}),[e,t]),"operational"!==i?(0,s.jsx)(vv,{className:"memori--completion-provider-status--tooltip",align:"topLeft",content:(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{children:r("completionProviderDown",{provider:null!=t?t:r("completionProviderFallbackName")})}),!!(null===(n=a.statusPage)||void 0===n?void 0:n.length)&&(0,s.jsx)("p",{children:(0,s.jsx)("a",{href:a.statusPage,rel:"noopener noreferrer",target:"_blank",children:r("completionProviderCheckStatusPage")})})]}),children:(0,s.jsx)(rS,{className:"memori--completion-provider-status--icon"})}):null};var lS=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",className:e,"aria-label":t,children:(0,s.jsx)("path",{fill:"currentColor",d:"M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0zM192 272c44.183 0 80-35.817 80-80s-35.817-80-80-80-80 35.817-80 80 35.817 80 80 80z"})});var cS=({memori:e,tenant:t,gamificationLevel:n,language:r,userLang:i,setUserLang:o,baseUrl:a,apiUrl:l,position:u,openPositionDrawer:d,integrationConfig:h,instruct:p=!1,clickedStart:f,onClickStart:m,initializeTTS:g,_TEST_forceProviderStatus:v,isUserLoggedIn:y=!1,user:b,showLogin:x=!1,setShowLoginDrawer:S,notEnoughCredits:w=!1})=>{var _,C;const{t:A,i18n:E}=Se(),[T,M]=(0,c.useState)(e.description),[I,R]=(0,c.useState)(!0);return(0,c.useEffect)((()=>{var t,n,i,o,s,l;(null!==(n=null===(t=E.language)||void 0===t?void 0:t.toUpperCase())&&void 0!==n?n:"IT")!==(null!==(i=null==r?void 0:r.toUpperCase())&&void 0!==i?i:"IT")&&(null===(o=e.description)||void 0===o?void 0:o.length)&&px(e.description,null!==(l=null===(s=E.language)||void 0===s?void 0:s.toUpperCase())&&void 0!==l?l:"IT",r,a).then((e=>{M(e.text)})).catch(console.error)}),[E.language,r,e.description,a]),(0,s.jsxs)("div",{className:"memori--start-panel",children:[(0,s.jsxs)("div",{className:"memori--cover",style:{backgroundImage:`url("${fv({type:"cover",tenantID:null==t?void 0:t.id,resourceURI:e.coverURL,baseURL:a,apiURL:l})}"), url("${fv({type:"cover",tenantID:null==t?void 0:t.id,baseURL:a,apiURL:l})}")`},children:[!!(null===(_=null==n?void 0:n.badge)||void 0===_?void 0:_.length)&&!e.enableBoardOfExperts&&(0,s.jsx)("div",{className:"memori--gamification-badge",children:(0,s.jsx)(vv,{align:"left",content:`${A("gamification.level")} ${n.badge}, ${n.points} ${A("gamification.points")}`,children:(0,s.jsx)("span",{"aria-label":`${A("gamification.level")} ${n.badge}, ${n.points} ${A("gamification.points")}`,children:n.badge})})}),!!e.enableCompletions&&!e.enableBoardOfExperts&&(0,s.jsx)("div",{className:"memori--completions-enabled",children:(0,s.jsx)(vv,{align:"left",content:A("completionsEnabled"),children:(0,s.jsx)("span",{"aria-label":A("completionsEnabled")||"Completions",children:(0,s.jsx)(gv,{})})})}),!!e.enableBoardOfExperts&&(0,s.jsx)("div",{className:"memori--board-of-experts",children:(0,s.jsx)(vv,{align:"left",content:A("boardOfExperts"),children:(0,s.jsx)("span",{"aria-label":A("boardOfExperts")||"Board of Experts",children:(0,s.jsx)(oS,{})})})}),!!e.nsfw&&(0,s.jsx)("div",{className:"memori--nsfw",children:(0,s.jsx)(vv,{align:"left",content:A("nsfw"),children:(0,s.jsx)("span",{title:A("nsfw")||"NSFW",children:"🔞"})})})]}),(0,s.jsxs)("picture",{className:"memori--avatar",children:[(0,s.jsx)("source",{src:null!==(C=e.avatarURL)&&void 0!==C?C:fv({type:"avatar",tenantID:null==t?void 0:t.id,resourceURI:e.avatarURL,baseURL:a,apiURL:l})}),(0,s.jsx)("img",{alt:e.name,src:e.avatarURL&&e.avatarURL.length>0?fv({type:"avatar",tenantID:null==t?void 0:t.id,resourceURI:e.avatarURL,baseURL:a,apiURL:l}):fv({type:"avatar",tenantID:null==t?void 0:t.id,baseURL:a,apiURL:l})})]}),(0,s.jsx)("h2",{className:"memori--title",children:e.name}),e.needsPosition&&!u&&(0,s.jsxs)("div",{className:"memori--needsPosition",children:[(0,s.jsx)("p",{children:A("write_and_speak.requirePositionHelp",{name:e.name})}),(0,s.jsx)(Sf,{primary:!0,onClick:()=>d(),className:"memori--start-button",icon:(0,s.jsx)(lS,{}),children:A("widget.position")})]}),(e.needsPosition&&u||!e.needsPosition)&&(0,s.jsxs)("div",{className:"memori--description",children:[(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"memori--description-text",children:T&&I?T:e.description}),T!==e.description&&(0,s.jsx)(Sf,{ghost:!0,className:"memori--translation-toggle",icon:(0,s.jsx)(nS,{}),onClick:()=>{R((e=>!e))},children:A(I?"showOriginalText":"showTranslatedText")})]}),(null==h?void 0:h.multilanguage)&&!p&&(0,s.jsxs)("div",{className:"memori--language-chooser",children:[(0,s.jsx)("label",{id:"user-lang-pref-label",htmlFor:"user-lang-pref",children:A("write_and_speak.iWantToTalkToIn",{name:e.name})}),(0,s.jsx)("select",{id:"user-lang-pref",className:"memori-select--button",value:(null!=i?i:E.language).toUpperCase(),"aria-labelledby":"user-lang-pref-label",onChange:e=>{o(e.target.value)},children:qv.map((e=>(0,s.jsx)("option",{value:e.value,"aria-label":e.label,children:e.label},e.value)))})]}),(0,s.jsx)(Sf,{primary:!0,disabled:!!e.blockedUntil&&!e.isGiver||w,loading:f,onClick:e=>{try{window.speechSynthesis.speak(new SpeechSynthesisUtterance(""))}catch(e){console.error(e)}g&&g(),m&&m()},className:"memori--start-button",children:A("write_and_speak."+(p?"instructButton":"tryMeButton"))}),(0,s.jsx)(aS,{provider:e.completionProvider,forceStatus:v}),(0,s.jsx)("p",{className:"memori--start-description",children:A(p?"write_and_speak.pageInstructExplanation":"write_and_speak.pageTryMeExplanation")}),(e.blockedUntil||w)&&(0,s.jsx)(iS,{memoriName:e.name,blockedUntil:e.blockedUntil,notEnoughCredits:w,showGiverInfo:e.isGiver,showTitle:!0,marginLeft:!0}),!!e.enableDeepThought&&!p&&(0,s.jsxs)("div",{className:"memori--deep-thought-disclaimer",children:[(0,s.jsx)(vv,{align:"left",content:A("deepThoughtHelper"),children:(0,s.jsx)(sS,{})}),(0,s.jsx)("h2",{children:y&&(null==b?void 0:b.pAndCUAccepted)?A("deepThoughtDisclaimerTitle"):A("deepThought")}),y&&!(null==b?void 0:b.pAndCUAccepted)&&(0,s.jsx)("p",{children:A("deepThoughtPreDisclaimerNotAllowed")}),!y&&(0,s.jsx)("p",{children:A("deepThoughtPreDisclaimerUnlogged")}),!y&&x&&(0,s.jsx)("p",{children:(0,s.jsx)(Sf,{outlined:!0,padded:!1,onClick:()=>S(!0),children:"Login"})}),(0,s.jsx)("p",{className:"memori--deep-thought-disclaimer-text",children:A("deepThoughtDisclaimer")})]})]})]})},uS=(c=o("85Hg2"),c=o("85Hg2"),Z=o("hcaHr"),c=o("85Hg2"),["forwardedRef"]);function dS(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 hS(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?dS(Object(r),!0).forEach((function(n){t(X)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dS(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}class pS extends c.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){console.error("Uncaught error:",e,t)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:(0,s.jsxs)("div",{style:{background:"rgba(255, 255, 255, 0.4)",color:"#000",padding:"2rem",borderRadius:"10px"},children:[(0,s.jsx)("h2",{children:this.props.t("error.generic")}),(0,s.jsx)(Sf,{primary:!0,onClick:()=>this.setState({hasError:!1}),children:this.props.t("error.tryAgain")||"Try again"})]}):this.props.children}}var fS=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(r){function i(i){var o=i.forwardedRef,s=t(uy)(i,uS),a=Se(e,hS(hS({},s),{},{keyPrefix:n.keyPrefix})),l=t(Z)(a,3),u=l[0],d=l[1],h=l[2],p=hS(hS({},s),{},{t:u,i18n:d,tReady:h});return n.withRef&&o?p.ref=o:!n.withRef&&o&&(p.forwardedRef=o),(0,c.createElement)(r,p)}i.displayName="withI18nextTranslation(".concat(ve(r),")"),i.WrappedComponent=r;return n.withRef?(0,c.forwardRef)((function(e,t){return(0,c.createElement)(i,Object.assign({},e,{forwardedRef:t}))})):i}}(["common"])(pS),mS=(c=o("85Hg2"),c=o("85Hg2"),{});e(mS,"REVISION",(()=>gS)),e(mS,"MOUSE",(()=>vS)),e(mS,"TOUCH",(()=>yS)),e(mS,"CullFaceNone",(()=>bS)),e(mS,"CullFaceBack",(()=>xS)),e(mS,"CullFaceFront",(()=>SS)),e(mS,"CullFaceFrontBack",(()=>wS)),e(mS,"BasicShadowMap",(()=>_S)),e(mS,"PCFShadowMap",(()=>CS)),e(mS,"PCFSoftShadowMap",(()=>AS)),e(mS,"VSMShadowMap",(()=>ES)),e(mS,"FrontSide",(()=>TS)),e(mS,"BackSide",(()=>MS)),e(mS,"DoubleSide",(()=>IS)),e(mS,"NoBlending",(()=>RS)),e(mS,"NormalBlending",(()=>PS)),e(mS,"AdditiveBlending",(()=>kS)),e(mS,"SubtractiveBlending",(()=>OS)),e(mS,"MultiplyBlending",(()=>NS)),e(mS,"CustomBlending",(()=>LS)),e(mS,"AddEquation",(()=>DS)),e(mS,"SubtractEquation",(()=>BS)),e(mS,"ReverseSubtractEquation",(()=>zS)),e(mS,"MinEquation",(()=>FS)),e(mS,"MaxEquation",(()=>US)),e(mS,"ZeroFactor",(()=>jS)),e(mS,"OneFactor",(()=>HS)),e(mS,"SrcColorFactor",(()=>VS)),e(mS,"OneMinusSrcColorFactor",(()=>GS)),e(mS,"SrcAlphaFactor",(()=>WS)),e(mS,"OneMinusSrcAlphaFactor",(()=>qS)),e(mS,"DstAlphaFactor",(()=>KS)),e(mS,"OneMinusDstAlphaFactor",(()=>JS)),e(mS,"DstColorFactor",(()=>QS)),e(mS,"OneMinusDstColorFactor",(()=>YS)),e(mS,"SrcAlphaSaturateFactor",(()=>ZS)),e(mS,"NeverDepth",(()=>XS)),e(mS,"AlwaysDepth",(()=>$S)),e(mS,"LessDepth",(()=>ew)),e(mS,"LessEqualDepth",(()=>tw)),e(mS,"EqualDepth",(()=>nw)),e(mS,"GreaterEqualDepth",(()=>rw)),e(mS,"GreaterDepth",(()=>iw)),e(mS,"NotEqualDepth",(()=>ow)),e(mS,"MultiplyOperation",(()=>sw)),e(mS,"MixOperation",(()=>aw)),e(mS,"AddOperation",(()=>lw)),e(mS,"NoToneMapping",(()=>cw)),e(mS,"LinearToneMapping",(()=>uw)),e(mS,"ReinhardToneMapping",(()=>dw)),e(mS,"CineonToneMapping",(()=>hw)),e(mS,"ACESFilmicToneMapping",(()=>pw)),e(mS,"CustomToneMapping",(()=>fw)),e(mS,"UVMapping",(()=>mw)),e(mS,"CubeReflectionMapping",(()=>gw)),e(mS,"CubeRefractionMapping",(()=>vw)),e(mS,"EquirectangularReflectionMapping",(()=>yw)),e(mS,"EquirectangularRefractionMapping",(()=>bw)),e(mS,"CubeUVReflectionMapping",(()=>xw)),e(mS,"RepeatWrapping",(()=>Sw)),e(mS,"ClampToEdgeWrapping",(()=>ww)),e(mS,"MirroredRepeatWrapping",(()=>_w)),e(mS,"NearestFilter",(()=>Cw)),e(mS,"NearestMipmapNearestFilter",(()=>Aw)),e(mS,"NearestMipMapNearestFilter",(()=>Ew)),e(mS,"NearestMipmapLinearFilter",(()=>Tw)),e(mS,"NearestMipMapLinearFilter",(()=>Mw)),e(mS,"LinearFilter",(()=>Iw)),e(mS,"LinearMipmapNearestFilter",(()=>Rw)),e(mS,"LinearMipMapNearestFilter",(()=>Pw)),e(mS,"LinearMipmapLinearFilter",(()=>kw)),e(mS,"LinearMipMapLinearFilter",(()=>Ow)),e(mS,"UnsignedByteType",(()=>Nw)),e(mS,"ByteType",(()=>Lw)),e(mS,"ShortType",(()=>Dw)),e(mS,"UnsignedShortType",(()=>Bw)),e(mS,"IntType",(()=>zw)),e(mS,"UnsignedIntType",(()=>Fw)),e(mS,"FloatType",(()=>Uw)),e(mS,"HalfFloatType",(()=>jw)),e(mS,"UnsignedShort4444Type",(()=>Hw)),e(mS,"UnsignedShort5551Type",(()=>Vw)),e(mS,"UnsignedInt248Type",(()=>Gw)),e(mS,"AlphaFormat",(()=>Ww)),e(mS,"RGBFormat",(()=>qw)),e(mS,"RGBAFormat",(()=>Kw)),e(mS,"LuminanceFormat",(()=>Jw)),e(mS,"LuminanceAlphaFormat",(()=>Qw)),e(mS,"DepthFormat",(()=>Yw)),e(mS,"DepthStencilFormat",(()=>Zw)),e(mS,"RedFormat",(()=>Xw)),e(mS,"RedIntegerFormat",(()=>$w)),e(mS,"RGFormat",(()=>e_)),e(mS,"RGIntegerFormat",(()=>t_)),e(mS,"RGBAIntegerFormat",(()=>n_)),e(mS,"RGB_S3TC_DXT1_Format",(()=>r_)),e(mS,"RGBA_S3TC_DXT1_Format",(()=>i_)),e(mS,"RGBA_S3TC_DXT3_Format",(()=>o_)),e(mS,"RGBA_S3TC_DXT5_Format",(()=>s_)),e(mS,"RGB_PVRTC_4BPPV1_Format",(()=>a_)),e(mS,"RGB_PVRTC_2BPPV1_Format",(()=>l_)),e(mS,"RGBA_PVRTC_4BPPV1_Format",(()=>c_)),e(mS,"RGBA_PVRTC_2BPPV1_Format",(()=>u_)),e(mS,"RGB_ETC1_Format",(()=>d_)),e(mS,"RGB_ETC2_Format",(()=>h_)),e(mS,"RGBA_ETC2_EAC_Format",(()=>p_)),e(mS,"RGBA_ASTC_4x4_Format",(()=>f_)),e(mS,"RGBA_ASTC_5x4_Format",(()=>m_)),e(mS,"RGBA_ASTC_5x5_Format",(()=>g_)),e(mS,"RGBA_ASTC_6x5_Format",(()=>v_)),e(mS,"RGBA_ASTC_6x6_Format",(()=>y_)),e(mS,"RGBA_ASTC_8x5_Format",(()=>b_)),e(mS,"RGBA_ASTC_8x6_Format",(()=>x_)),e(mS,"RGBA_ASTC_8x8_Format",(()=>S_)),e(mS,"RGBA_ASTC_10x5_Format",(()=>w_)),e(mS,"RGBA_ASTC_10x6_Format",(()=>__)),e(mS,"RGBA_ASTC_10x8_Format",(()=>C_)),e(mS,"RGBA_ASTC_10x10_Format",(()=>A_)),e(mS,"RGBA_ASTC_12x10_Format",(()=>E_)),e(mS,"RGBA_ASTC_12x12_Format",(()=>T_)),e(mS,"RGBA_BPTC_Format",(()=>M_)),e(mS,"LoopOnce",(()=>I_)),e(mS,"LoopRepeat",(()=>R_)),e(mS,"LoopPingPong",(()=>P_)),e(mS,"InterpolateDiscrete",(()=>k_)),e(mS,"InterpolateLinear",(()=>O_)),e(mS,"InterpolateSmooth",(()=>N_)),e(mS,"ZeroCurvatureEnding",(()=>L_)),e(mS,"ZeroSlopeEnding",(()=>D_)),e(mS,"WrapAroundEnding",(()=>B_)),e(mS,"NormalAnimationBlendMode",(()=>z_)),e(mS,"AdditiveAnimationBlendMode",(()=>F_)),e(mS,"TrianglesDrawMode",(()=>U_)),e(mS,"TriangleStripDrawMode",(()=>j_)),e(mS,"TriangleFanDrawMode",(()=>H_)),e(mS,"LinearEncoding",(()=>V_)),e(mS,"sRGBEncoding",(()=>G_)),e(mS,"BasicDepthPacking",(()=>W_)),e(mS,"RGBADepthPacking",(()=>q_)),e(mS,"TangentSpaceNormalMap",(()=>K_)),e(mS,"ObjectSpaceNormalMap",(()=>J_)),e(mS,"NoColorSpace",(()=>Q_)),e(mS,"SRGBColorSpace",(()=>Y_)),e(mS,"LinearSRGBColorSpace",(()=>Z_)),e(mS,"ZeroStencilOp",(()=>X_)),e(mS,"KeepStencilOp",(()=>$_)),e(mS,"ReplaceStencilOp",(()=>eC)),e(mS,"IncrementStencilOp",(()=>tC)),e(mS,"DecrementStencilOp",(()=>nC)),e(mS,"IncrementWrapStencilOp",(()=>rC)),e(mS,"DecrementWrapStencilOp",(()=>iC)),e(mS,"InvertStencilOp",(()=>oC)),e(mS,"NeverStencilFunc",(()=>sC)),e(mS,"LessStencilFunc",(()=>aC)),e(mS,"EqualStencilFunc",(()=>lC)),e(mS,"LessEqualStencilFunc",(()=>cC)),e(mS,"GreaterStencilFunc",(()=>uC)),e(mS,"NotEqualStencilFunc",(()=>dC)),e(mS,"GreaterEqualStencilFunc",(()=>hC)),e(mS,"AlwaysStencilFunc",(()=>pC)),e(mS,"StaticDrawUsage",(()=>fC)),e(mS,"DynamicDrawUsage",(()=>mC)),e(mS,"StreamDrawUsage",(()=>gC)),e(mS,"StaticReadUsage",(()=>vC)),e(mS,"DynamicReadUsage",(()=>yC)),e(mS,"StreamReadUsage",(()=>bC)),e(mS,"StaticCopyUsage",(()=>xC)),e(mS,"DynamicCopyUsage",(()=>SC)),e(mS,"StreamCopyUsage",(()=>wC)),e(mS,"GLSL1",(()=>_C)),e(mS,"GLSL3",(()=>CC)),e(mS,"_SRGBAFormat",(()=>AC)),e(mS,"EventDispatcher",(()=>EC)),e(mS,"MathUtils",(()=>UC)),e(mS,"Vector2",(()=>jC)),e(mS,"Matrix3",(()=>HC)),e(mS,"ColorManagement",(()=>YC)),e(mS,"Color",(()=>rA)),e(mS,"ImageUtils",(()=>oA)),e(mS,"Source",(()=>sA)),e(mS,"Texture",(()=>cA)),e(mS,"Vector4",(()=>uA)),e(mS,"WebGLRenderTarget",(()=>dA)),e(mS,"DataArrayTexture",(()=>hA)),e(mS,"WebGLArrayRenderTarget",(()=>pA)),e(mS,"Data3DTexture",(()=>fA)),e(mS,"WebGL3DRenderTarget",(()=>mA)),e(mS,"WebGLMultipleRenderTargets",(()=>gA)),e(mS,"Quaternion",(()=>vA)),e(mS,"Vector3",(()=>yA)),e(mS,"Box3",(()=>SA)),e(mS,"Sphere",(()=>UA)),e(mS,"Ray",(()=>JA)),e(mS,"Matrix4",(()=>QA)),e(mS,"Euler",(()=>oE)),e(mS,"Layers",(()=>sE)),e(mS,"Object3D",(()=>xE)),e(mS,"Triangle",(()=>PE)),e(mS,"Material",(()=>OE)),e(mS,"MeshBasicMaterial",(()=>NE)),e(mS,"BufferAttribute",(()=>BE)),e(mS,"Int8BufferAttribute",(()=>zE)),e(mS,"Uint8BufferAttribute",(()=>FE)),e(mS,"Uint8ClampedBufferAttribute",(()=>UE)),e(mS,"Int16BufferAttribute",(()=>jE)),e(mS,"Uint16BufferAttribute",(()=>HE)),e(mS,"Int32BufferAttribute",(()=>VE)),e(mS,"Uint32BufferAttribute",(()=>GE)),e(mS,"Float16BufferAttribute",(()=>WE)),e(mS,"Float32BufferAttribute",(()=>qE)),e(mS,"Float64BufferAttribute",(()=>KE)),e(mS,"BufferGeometry",(()=>tT)),e(mS,"Mesh",(()=>bT)),e(mS,"BoxGeometry",(()=>ST)),e(mS,"UniformsUtils",(()=>CT)),e(mS,"ShaderMaterial",(()=>AT)),e(mS,"Camera",(()=>ET)),e(mS,"PerspectiveCamera",(()=>TT)),e(mS,"CubeCamera",(()=>IT)),e(mS,"CubeTexture",(()=>RT)),e(mS,"WebGLCubeRenderTarget",(()=>PT)),e(mS,"Plane",(()=>LT)),e(mS,"Frustum",(()=>zT)),e(mS,"PlaneGeometry",(()=>jT)),e(mS,"ShaderChunk",(()=>HT)),e(mS,"UniformsLib",(()=>VT)),e(mS,"ShaderLib",(()=>GT)),e(mS,"OrthographicCamera",(()=>ZT)),e(mS,"PMREMGenerator",(()=>sM)),e(mS,"MeshDepthMaterial",(()=>nR)),e(mS,"MeshDistanceMaterial",(()=>rR)),e(mS,"WebGLUtils",(()=>aR)),e(mS,"ArrayCamera",(()=>lR)),e(mS,"Group",(()=>cR)),e(mS,"DepthTexture",(()=>hR)),e(mS,"WebGLRenderer",(()=>gR)),e(mS,"WebGL1Renderer",(()=>vR)),e(mS,"FogExp2",(()=>yR)),e(mS,"Fog",(()=>bR)),e(mS,"Scene",(()=>xR)),e(mS,"InterleavedBuffer",(()=>SR)),e(mS,"InterleavedBufferAttribute",(()=>_R)),e(mS,"SpriteMaterial",(()=>CR)),e(mS,"Sprite",(()=>zR)),e(mS,"LOD",(()=>HR)),e(mS,"SkinnedMesh",(()=>JR)),e(mS,"Bone",(()=>QR)),e(mS,"DataTexture",(()=>YR)),e(mS,"Skeleton",(()=>$R)),e(mS,"InstancedBufferAttribute",(()=>eP)),e(mS,"InstancedMesh",(()=>oP)),e(mS,"LineBasicMaterial",(()=>sP)),e(mS,"Line",(()=>hP)),e(mS,"LineSegments",(()=>mP)),e(mS,"LineLoop",(()=>gP)),e(mS,"PointsMaterial",(()=>vP)),e(mS,"Points",(()=>wP)),e(mS,"VideoTexture",(()=>CP)),e(mS,"FramebufferTexture",(()=>AP)),e(mS,"CompressedTexture",(()=>EP)),e(mS,"CanvasTexture",(()=>TP)),e(mS,"Curve",(()=>MP)),e(mS,"EllipseCurve",(()=>IP)),e(mS,"ArcCurve",(()=>RP)),e(mS,"CatmullRomCurve3",(()=>DP)),e(mS,"CubicBezierCurve",(()=>UP)),e(mS,"CubicBezierCurve3",(()=>jP)),e(mS,"LineCurve",(()=>HP)),e(mS,"LineCurve3",(()=>VP)),e(mS,"QuadraticBezierCurve",(()=>GP)),e(mS,"QuadraticBezierCurve3",(()=>WP)),e(mS,"SplineCurve",(()=>qP)),e(mS,"CurvePath",(()=>JP)),e(mS,"Path",(()=>QP)),e(mS,"LatheGeometry",(()=>YP)),e(mS,"CapsuleGeometry",(()=>ZP)),e(mS,"CircleGeometry",(()=>XP)),e(mS,"CylinderGeometry",(()=>$P)),e(mS,"ConeGeometry",(()=>ek)),e(mS,"PolyhedronGeometry",(()=>tk)),e(mS,"DodecahedronGeometry",(()=>nk)),e(mS,"EdgesGeometry",(()=>ak)),e(mS,"Shape",(()=>lk)),e(mS,"ShapeUtils",(()=>Nk)),e(mS,"ExtrudeGeometry",(()=>Bk)),e(mS,"IcosahedronGeometry",(()=>Fk)),e(mS,"OctahedronGeometry",(()=>Uk)),e(mS,"RingGeometry",(()=>jk)),e(mS,"ShapeGeometry",(()=>Hk)),e(mS,"SphereGeometry",(()=>Vk)),e(mS,"TetrahedronGeometry",(()=>Gk)),e(mS,"TorusGeometry",(()=>Wk)),e(mS,"TorusKnotGeometry",(()=>qk)),e(mS,"TubeGeometry",(()=>Kk)),e(mS,"WireframeGeometry",(()=>Jk)),e(mS,"ShadowMaterial",(()=>Zk)),e(mS,"RawShaderMaterial",(()=>Xk)),e(mS,"MeshStandardMaterial",(()=>$k)),e(mS,"MeshPhysicalMaterial",(()=>eO)),e(mS,"MeshPhongMaterial",(()=>tO)),e(mS,"MeshToonMaterial",(()=>nO)),e(mS,"MeshNormalMaterial",(()=>rO)),e(mS,"MeshLambertMaterial",(()=>iO)),e(mS,"MeshMatcapMaterial",(()=>oO)),e(mS,"LineDashedMaterial",(()=>sO)),e(mS,"AnimationUtils",(()=>pO)),e(mS,"Interpolant",(()=>fO)),e(mS,"CubicInterpolant",(()=>mO)),e(mS,"LinearInterpolant",(()=>gO)),e(mS,"DiscreteInterpolant",(()=>vO)),e(mS,"KeyframeTrack",(()=>yO)),e(mS,"BooleanKeyframeTrack",(()=>bO)),e(mS,"ColorKeyframeTrack",(()=>xO)),e(mS,"NumberKeyframeTrack",(()=>SO)),e(mS,"QuaternionLinearInterpolant",(()=>wO)),e(mS,"QuaternionKeyframeTrack",(()=>_O)),e(mS,"StringKeyframeTrack",(()=>CO)),e(mS,"VectorKeyframeTrack",(()=>AO)),e(mS,"AnimationClip",(()=>EO)),e(mS,"Cache",(()=>MO)),e(mS,"LoadingManager",(()=>IO)),e(mS,"DefaultLoadingManager",(()=>RO)),e(mS,"Loader",(()=>PO)),e(mS,"FileLoader",(()=>NO)),e(mS,"AnimationLoader",(()=>LO)),e(mS,"CompressedTextureLoader",(()=>DO)),e(mS,"ImageLoader",(()=>BO)),e(mS,"CubeTextureLoader",(()=>zO)),e(mS,"DataTextureLoader",(()=>FO)),e(mS,"TextureLoader",(()=>UO)),e(mS,"Light",(()=>jO)),e(mS,"HemisphereLight",(()=>HO)),e(mS,"SpotLight",(()=>JO)),e(mS,"PointLight",(()=>$O)),e(mS,"DirectionalLight",(()=>tN)),e(mS,"AmbientLight",(()=>nN)),e(mS,"RectAreaLight",(()=>rN)),e(mS,"SphericalHarmonics3",(()=>iN)),e(mS,"LightProbe",(()=>oN)),e(mS,"MaterialLoader",(()=>sN)),e(mS,"LoaderUtils",(()=>aN)),e(mS,"InstancedBufferGeometry",(()=>lN)),e(mS,"BufferGeometryLoader",(()=>cN)),e(mS,"ObjectLoader",(()=>uN)),e(mS,"ImageBitmapLoader",(()=>fN)),e(mS,"AudioContext",(()=>gN)),e(mS,"AudioLoader",(()=>vN)),e(mS,"HemisphereLightProbe",(()=>yN)),e(mS,"AmbientLightProbe",(()=>bN)),e(mS,"StereoCamera",(()=>_N)),e(mS,"Clock",(()=>CN)),e(mS,"AudioListener",(()=>RN)),e(mS,"Audio",(()=>PN)),e(mS,"PositionalAudio",(()=>DN)),e(mS,"AudioAnalyser",(()=>BN)),e(mS,"PropertyMixer",(()=>zN)),e(mS,"PropertyBinding",(()=>WN)),e(mS,"AnimationObjectGroup",(()=>qN)),e(mS,"AnimationMixer",(()=>QN)),e(mS,"Uniform",(()=>YN)),e(mS,"UniformsGroup",(()=>XN)),e(mS,"InstancedInterleavedBuffer",(()=>$N)),e(mS,"GLBufferAttribute",(()=>eL)),e(mS,"Raycaster",(()=>tL)),e(mS,"Spherical",(()=>iL)),e(mS,"Cylindrical",(()=>oL)),e(mS,"Box2",(()=>aL)),e(mS,"Line3",(()=>uL)),e(mS,"SpotLightHelper",(()=>hL)),e(mS,"SkeletonHelper",(()=>gL)),e(mS,"PointLightHelper",(()=>yL)),e(mS,"HemisphereLightHelper",(()=>wL)),e(mS,"GridHelper",(()=>_L)),e(mS,"PolarGridHelper",(()=>CL)),e(mS,"DirectionalLightHelper",(()=>ML)),e(mS,"CameraHelper",(()=>PL)),e(mS,"BoxHelper",(()=>NL)),e(mS,"Box3Helper",(()=>LL)),e(mS,"PlaneHelper",(()=>DL)),e(mS,"ArrowHelper",(()=>UL)),e(mS,"AxesHelper",(()=>jL)),e(mS,"ShapePath",(()=>HL)),e(mS,"DataUtils",(()=>WL)),e(mS,"ImmediateRenderObject",(()=>qL)),e(mS,"WebGLMultisampleRenderTarget",(()=>KL)),e(mS,"DataTexture2DArray",(()=>JL)),e(mS,"DataTexture3D",(()=>QL)),e(mS,"BoxBufferGeometry",(()=>YL)),e(mS,"CapsuleBufferGeometry",(()=>ZL)),e(mS,"CircleBufferGeometry",(()=>XL)),e(mS,"ConeBufferGeometry",(()=>$L)),e(mS,"CylinderBufferGeometry",(()=>eD)),e(mS,"DodecahedronBufferGeometry",(()=>tD)),e(mS,"ExtrudeBufferGeometry",(()=>nD)),e(mS,"IcosahedronBufferGeometry",(()=>rD)),e(mS,"LatheBufferGeometry",(()=>iD)),e(mS,"OctahedronBufferGeometry",(()=>oD)),e(mS,"PlaneBufferGeometry",(()=>sD)),e(mS,"PolyhedronBufferGeometry",(()=>aD)),e(mS,"RingBufferGeometry",(()=>lD)),e(mS,"ShapeBufferGeometry",(()=>cD)),e(mS,"SphereBufferGeometry",(()=>uD)),e(mS,"TetrahedronBufferGeometry",(()=>dD)),e(mS,"TorusBufferGeometry",(()=>hD)),e(mS,"TorusKnotBufferGeometry",(()=>pD)),e(mS,"TubeBufferGeometry",(()=>fD));
|
|
240
240
|
/**
|
|
241
241
|
* @license
|
|
242
242
|
* Copyright 2010-2022 Three.js Authors
|