Files
cours/.obsidian/plugins/extended-graph/main.js
oskar 41087fc864 2025-06-21 14:34:56 update from obsidian (7 file·s changed)
Affected files:
.obsidian/community-plugins.json
.obsidian/graph.json
.obsidian/plugins/extended-graph/data.json
.obsidian/plugins/extended-graph/main.js
.obsidian/plugins/extended-graph/manifest.json
.obsidian/plugins/extended-graph/styles.css
.obsidian/plugins/lazy-plugins/data.json
2025-06-21 14:34:56 +02:00

1289 lines
1.3 MiB

/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
var Mp=Object.create;var Oo=Object.defineProperty;var Pp=Object.getOwnPropertyDescriptor;var Np=Object.getOwnPropertyNames;var Bp=Object.getPrototypeOf,Rp=Object.prototype.hasOwnProperty;var _8=r=>{throw TypeError(r)};var Lp=(r,e,t)=>e in r?Oo(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var Ie=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),C8=(r,e)=>{for(var t in e)Oo(r,t,{get:e[t],enumerable:!0})},T8=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Np(e))!Rp.call(r,s)&&s!==t&&Oo(r,s,{get:()=>e[s],enumerable:!(i=Pp(e,s))||i.enumerable});return r};var h0=(r,e,t)=>(t=r!=null?Mp(Bp(r)):{},T8(e||!r||!r.__esModule?Oo(t,"default",{value:r,enumerable:!0}):t,r)),Op=r=>T8(Oo({},"__esModule",{value:!0}),r);var ut=(r,e,t)=>Lp(r,typeof e!="symbol"?e+"":e,t),F8=(r,e,t)=>e.has(r)||_8("Cannot "+t);var A8=(r,e,t)=>(F8(r,e,"read from private field"),t?t.call(r):e.get(r)),I8=(r,e,t)=>e.has(r)?_8("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),k8=(r,e,t,i)=>(F8(r,e,"write to private field"),i?i.call(r,t):e.set(r,t),t);var M8=Ie((BD,Up)=>{Up.exports={plugin:{default:"D\xE9faut",folder:"Dossier",filter:"Filtre",nodeName:"Nom de noeud",info:"Info",name:"Extended graph",nodes:"Noeuds",options:"Options",source:"Source",target:"Cible",valuePlaceholder:"valeur..."},controls:{add:"Ajouter",apply:"Appliquer",cancel:"Annuler",delete:"Supprimer",disable:"D\xE9sactiver",disableAll:"Tout d\xE9sactiver",enable:"Activer",enabled:"Activ\xE9",enableAll:"Tout activer",manage:"G\xE9rer",moveUp:"Monter",moveDown:"Descendre",openLegend:"Ouvrir la l\xE9gende (tags, liens, propri\xE9t\xE9s)",page:"Page",pageCurrent:"Page actuelle",pageFirst:"Premi\xE8re page",pageLast:"Derni\xE8re page",pathRegexPlaceholder:'Entrer un chemin ou un "/regex/"...',resetGraph:"R\xE9initialiser le graphe",save:"Sauvegarder",show:"Montrer",rows:"lignes"},features:{arrows:"Fl\xE8ches",arrowsDesc:"Personnalise la fa\xE7on dont les fl\xE8ches sont affich\xE9es",arrowsInvert:"Inverser les fl\xE8ches",arrowsInvertDesc:"Inverse les fl\xE8ches des liens",arrowsFlat:"Fl\xE8ches triangulaires",arrowsFlatDesc:"Utilise des fl\xE8ches triangulaires au lieu de fl\xE8ches courb\xE9es",automation:"Automatisation",autoEnable:"Activation auto",autoEnableDesc:"Active automatiquement le module dans la vue graphique",autoReset:"R\xE9initialise les vues graphiques apr\xE8s changements",autoResetDesc:"R\xE9initialise le module dans les les vues graphiques o\xF9 il est activ\xE9, si les param\xE8tres ont chang\xE9 apr\xE8s avoir ferm\xE9 cet onglet",borderUnresolved:"Bordure des noeuds non-r\xE9solus",borderUnresolvedDesc:"Si la valeur est entre 0 et 1 (exclus), les noeuds non-r\xE9solus seront repr\xE9sent\xE9s par un cercle vide plut\xF4t qu'un disque plein",disableNodes:"Enl\xE8ve les noeuds",disableNodesDesc:"Wuand tous les arcs d'un noeud sont d\xE9sactiv\xE9s, enl\xE8ve le noeud du graphe",excludedFolders:"Dossiers exclus",noExclusionFilter:"Aucun filtre d'exclusion n'est appliqu\xE9 pour le moment. Ajoutez-en un en dessous.",focus:"Focus",focusDesc:"Augmente la taille du noeud correspondant \xE0 la note active",focusScale:"Facteur de mise \xE0 l'\xE9chelle",focusScaleDesc:"La taille du noeud correspondant \xE0 la note active sera mulitpli\xE9e par ce facteur",folders:"Dossiers",foldersDesc:"Affiche des bo\xEEtes englobantes pour les dossiers",globalFilter:"Filtre global",globalFilterDesc:"Ce filtre sera ajout\xE9 au d\xE9but de chaque filtre des vues graphiques",icons:"Ic\xF4nes",iconsDesc:"Utilise des ic\xF4nes ou emojis pour les noeuds du graphe",iconProperty:"Propri\xE9t\xE9 pour l'ic\xF4ne",iconPropertyDesc:"Cl\xE9 (nom) de la propri\xE9t\xE9 utilis\xE9e pour r\xE9cup\xE9rer l'ic\xF4ne de la note. Les valeurs support\xE9es peuvent \xEAtre soit des emojis Unicode, soit des identifiants d'ic\xF4nes provenant de Lucide.",iconUsePlugin:'Utilise "Iconic" ou "Iconize"',iconUsePluginDesc:`Utilise les ic\xF4nes appliqu\xE9s dans l'explorateur de fichier via les modules communautaires "Iconic" ou "Iconize"`,iconUsePluginColor:'Utilise "Iconic" ou "Iconize" pour les couleurs',iconUsePluginColorDesc:`Utilise la couleur des ic\xF4nes appliqu\xE9s dans l'explorateur de fichier via "Iconic" ou "Iconize"`,iconUseParentIcon:"Utilise l'ic\xF4ne d'un dossier parent",iconUseParentIconDesc:`Si aucun ic\xF4ne n'est appliqu\xE9 sur le fichier lui-m\xEAme avec "Iconic" ou "Iconize", le plugin essaiera d'en trouver un sur un dossier parent`,image:"Image",imageDesc:"Affiche les images dans les noeuds",imagesAllowExternal:"Autorise les images web",imagesAllowExternalDesc:"Autorise le chargement d'images externes via les protocoles http: et https:",imagesAllowExternalLocal:"Autorise les images externes au coffre",imagesAllowExternalLocalDesc:"Autorise le chargement d'images externes via les protocoles file: and app:",imagesFromProperty:"Depuis une propri\xE9t\xE9",imagesFromPropertyDesc:"Affiche une image r\xE9cup\xE9r\xE9e depuis une propri\xE9t\xE9 des m\xE9tadonn\xE9es",imagesFromEmbeds:"Depuis une int\xE9gration",imagesFromEmbedsDesc:`Affiche une image r\xE9cup\xE9r\xE9e parmi les int\xE9grations de la note. L'option "Depuis une propri\xE9t\xE9" est prioritaire.`,imagesForAttachments:"Pour les pi\xE8ces jointes",imagesForAttachmentsDesc:"Affiche une image sur les noeuds des pi\xE8ces jointes",imageProperty:"Priori\xE9t\xE9 pour l'image",imagePropertyDesc:"Nom de la propri\xE9t\xE9 utilis\xE9e pour trouver une image pour le noeud",imageBorderWidth:"\xC9paisseur de la bordure (%)",imageBorderWidthDesc:"Pourcentage de la couleur de fond du noeud qui sera visible comme une border",interactives:{arcsAdd:"Ajouter les arcs",arcsAddPropertyDesc:"Ajouter des arcs autour des noeuds pour visualiser les valeurs des propri\xE9t\xE9s",arcsAddTagDesc:"Ajouter des arcs autour des noeuds pour visualiser les valeurs des tags",colorLinks:"Coloriser les liens",colorLinksDesc:"Ajouter des couleurs aux liens rendus",curvedLinks:"Liens courb\xE9s",curvedLinksDesc:"Utilise des liens courb\xE9s au lieu de lignes droites",links:"Liens",linksDesc:"Affiche et filtre les liens par type",noneTypeID:"ID pour les sans-type",noneTypeIDDesc:"L'identifiant qui sera donn\xE9 is aucune valeur n'est trouv\xE9e pour ",palette:"Palette de couleur",paletteDesc:"Choix de la palette de couleur pour ",paletteMatplotlibDesc:"Ces palettes viennent de matplotlib. Vous pouvez en apprendre plus ici: ",palettePickGradient:"Choix du d\xE9grad\xE9",properties:"Propri\xE9t\xE9s",propertiesDesc:"Affiche et filtre les noeuds par propri\xE9t\xE9s",property:"Propri\xE9t\xE9",propertyDesc:"Affiche et filtre la propri\xE9t\xE9 ",propertyAlreadyExists:"Cette propri\xE9t\xE9 existe d\xE9j\xE0",propertyReservedFolders:"Cette valeur de propri\xE9t\xE9 est r\xE9serv\xE9e pour les dossiers",propertyReservedLinks:"Cette valeur de propri\xE9t\xE9 est r\xE9serv\xE9e pour les liens",propertyReservedTags:"Cette valeur de propri\xE9t\xE9 est r\xE9serv\xE9e pour les tags",selection:"S\xE9lection",selectionDesc:"S\xE9lectionnez quelles valeurs devraient \xEAtre prises en compte par le module",selectionFor:"S\xE9lection pour",specificColors:"Couleurs sp\xE9cifiques",specificColorsDesc:"Choisissez des couleurs sp\xE9cifiques rempla\xE7ant la palette",tags:"Tags",tagsDesc:"Affiche et filtre les noeuds par tags"},linksFeatureRequired:"La fonctionnalit\xE9 des liens doit \xEAtre activ\xE9e.",pinnedNodes:"Noeuds \xE9pingl\xE9s",pinNode:"\xC9pingler le noeud",unpinNode:"D\xE9s\xE9pingler le noeud",unpinAllNodes:"D\xE9s\xE9pingler tous les noeuds",pinMultipleNodes:"\xC9pingler plusieurs noeuds",pinMultipleShape:"Forme",pinMultipleGap:"Espace entre les noeuds \xE9pingl\xE9s",pinMultipleCenter:"Centre",pinMultipleGridSize:"Nombre de colonnes",pinMultipleGridSizeDesc:'Les valeurs peuvent \xEAtre "N" (une seule ligne), "auto" (grille carr\xE9e) ou un entier positif',size:"Taille",elementsStats:"Stastiques des noeuds et liens",elementsStatsDesc:"Choisissez comment couleurs/tailles des noeuds et des liens sont calcul\xE9es",linkSizesFunction:"Fonction pour la taille des liens",linkSizesFunctionDesc:"S\xE9lectionne comment le moteur du graphe doit calculer l'\xE9paisseur des liens",linkColorsFunction:"Fonction pour la couleur des liens",linkColorsFunctionDesc:"S\xE9lectionne comment le moteur du graphe doit calculer la couleur des liens",linkColorsPaletteDesc:"Choisissez la palette de couleur pour les liens",names:"Noms des noeuds",namesDesc:"Personnalise l'affichage des noms des noeuds",namesNumberOfCharacters:"Nombre de caract\xE8res",namesNumberOfCharactersDesc:"Nombre maximum de caract\xE8res \xE0 afficher pour le nom du noeud. Laissez vide pour afficher le nom complet",namesShowOnlyFileName:"Nom de fichier",namesShowOnlyFileNameDesc:"Afficher seulement le nom de fichier sans le chemin",namesNoExtension:"Sans extension",namesNoExtensionDesc:"Afficher le nom de fichier sans l'extension",namesUseProperty:"Utiliser une propri\xE9t\xE9",namesUsePropertyDesc:"Utiliser une propri\xE9t\xE9 pour le nom du noeud plut\xF4t que le nom de fichier",namesBackground:"Ajoute un fond",namesBackgroundDesc:"Ajoute un fond au nom du noeud pour le rendre plus lisible en cachant les \xE9l\xE9ments derri\xE8re",namesVerticalOffset:"D\xE9calage vertical",namesVerticalOffsetDesc:"D\xE9calage vertical du texte. Une valeur de 15 est recommand\xE9e pour \xE9viter un chevauchement avec la fl\xE8che",nodeSizesFunction:"Fonction pour la taille des noeuds",nodeSizesFunctionDesc:"S\xE9lectionne comment le moteur du graphe doit calculer la taille des noeuds",nodeSizesProperty:"Propri\xE9t\xE9 pour la taille d'un noeud",nodeSizesPropertyDesc:"Nom de la propri\xE9t\xE9 utilis\xE9e pour sp\xE9cifier la taille d'un noeud. Elle doit \xEAtre de type nombre. Par d\xE9faut, la taille est de 100. Laissez vide s'il n'y a pas besoin d'une granularit\xE9 par noeud.",nodeColorsFunction:"Fonction pour la couleur des noeuds",nodeColorsFunctionDesc:"\xE9lectionne comment le moteur du graphe doit calculer la couleur des noeuds",nodeColorsPaletteDesc:"Choisissez la palette de couleur pour les noeuds",namesInterfaceFont:"Utilise la police d'interface",namesInterfaceFontDesc:"Utilisa la m\xEAme police de caract\xE8res que celle pour l'interface de votre coffre",performance:"Performances",performanceDelay:"D\xE9lai d'initialisation (millisecondes)",performanceDelayDesc:"Il peut \xEAtre n\xE9cessaire d'attendre quelques fractions de secondes avant d'initialiser le module dans une vue graphique \xE0 cause de m\xE9caniques asynchrones",performanceMaxNodes:"Nombre maximum de noeuds",performanceMaxNodesDesc:"Si le graphe contient plus de noeuds que cette valeur, le module sera d\xE9sactiv\xE9 dans la vue graphique",removeSources:"D\xE9sactiver les sources",removeSourcesDesc:"D\xE9sactive les sources des liens lorsque ceux-ci sont d\xE9sactiv\xE9s",removeTargets:"D\xE9sactiver les cibles",removeTargetsDesc:"D\xE9sactive les cibles des liens lorsque ceux-ci sont d\xE9sactiv\xE9s",shape:"Forme",shapes:"Formes",shapesDesc:"Utilise diff\xE9rentes formes pour les noeuds",shapePick:"Choisissez une forme",shapesNames:{circle:"cercle",square:"carr\xE9",triangle:"triangle",diamond:"diamand",pentagon:"pentagone",hexagon:"hexagone",octagon:"octogone",decagon:"d\xE9cagone",star4:"\xE9toile (4)",star5:"\xE9toile (5)",star6:"\xE9toile (6)",star8:"\xE9toile (8)",star10:"\xE9toile (10)",polygon:"polygone",starburst:"starburst",grid:"grille",line:"ligne",unknown:"inconnu"},svgScreenshotArcs:"Affiche les arcs (tags et/ou propri\xE9t\xE9s)",svgScreenshotCopy:"Capture d'\xE9cran CVG",svgScreenshotCopyCode:"Copie le code SVG dans le presse-papier",svgScreenshotCopyImage:"Copie l'image SVG dans le presse-papier",svgScreenshotCurvedLinks:"Utiliser les liens courbes",svgScreenshotNodeNames:"Afficher les noms des noeuds",svgScreenshotNodeShapes:"Utiliser les formes des noeuds",svgScreenshotOptions:"Options de la capture d'\xE9cran SVG",svgScreenshotVisibleArea:"Exporter seulement la zone visible",zoomOnNode:"Zoom sur le noeud",zoomScale:"Mise \xE0 l'\xE9chelle du zoom",zoomScaleDesc:"Nouvelle mise \xE9chelle de la vue graphique lorsqu'un zoom est r\xE9alis\xE9 sur un noeud"},notices:{changeInSettings:"Vous pouvez changer cette valeur dans les r\xE9glages",disabled:"d\xE9sactiv\xE9",graphAnalysisPluginRequired:"Le module communautaire Graph Analysis doit \xEAtre activ\xE9 pour utiliser cette fonction",invalidCharacter:"Caract\xE8re invalide",nlpPluginRequired:"Le module communautaire NLP doit \xEAtre activ\xE9 pour utiliser cette fonction",nodeLimiteExceeded:"Tentative de g\xE9rer trop de noeuds",nodeLimitIs:"La limite est",nodeStatSizeFailed:"Echec lors du calcul des statistiques pour les tailles des noeuds",nodeStatColorFailed:"Echec lors du calcul des statistiques pour les couleurs des noeuds",linkStatSizeFailed:"Echec lors du calcul des statistiques pour les \xE9paisseurs des liens",linkStatColorFailed:"Echec lors du calcul des statistiques pour les couleurs des liens",functionToDefault:"La fonction par d\xE9faut est utilis\xE9e \xE0 la place.",stateDeleted:"L'\xE9tat a \xE9t\xE9 supprim\xE9",stateSaved:"L'\xE9tat a \xE9t\xE9 sauvegard\xE9",svgCopied:"SVG copi\xE9 dans le presse-papier"},query:{AND:"ET",OR:"OU",combinationLogic:"Logique combinatoire",editShapeQuery:"\xC9diter la requ\xEAte pour la forme",setShapeQueryFor:"Cr\xE9er la requ\xEAte de forme pour",files:"Fichiers",logicKey:{contains:"contient",containsNot:"ne contient pas",is:"est",isNot:"n'est pas",containsRegex:"contient regex",containsRegexNot:"ne contient pas regex",matchesRegex:"correspond regex",matchesRegexNot:"ne correspond pas regex",isEmpty:"est vide",isEmptyNot:"n'est pas vide"},matchingFiles:"Fichiers correspondants",query:"Requ\xEAte",rules:"R\xE8gles",source:{all:"Tout",tag:"Tags",link:"Liens",property:"Propri\xE9t\xE9",file:"Fichier",folder:"Dossier",folderRec:"Dossier et sous-dossiers",path:"Chemin"},viewMatches:"Voire les correspondances"},states:{graphState:"\xC9tat du graphe",newStateName:"Nom du nouvel \xE9tat",openSettings:"Afficher les \xE9tats",saveForDefaultState:"Sauvegarder pour l'\xE9tat par d\xE9faut",saveForDefaultStateDesc:"Sauvegarde les r\xE9glages actuels comme les r\xE9glages pour l'\xE9tat par d\xE9faut",saveForNormalState:"Sauvegarder pour l'\xE9tat normal",saveForNormalStateDesc:"Sauvegarde les r\xE9glages actuels comme les r\xE9glages pour l'\xE9tat normal (pas de module activ\xE9)",showGraphState:"Affiche l'\xE9tat du graphe",startingState:"\xC9tat de d\xE9part",startingStateDesc:"S\xE9lectionne quel \xE9tat doit \xEAtre utilis\xE9 pour initialiser le plugin",states:"\xC9tats"},statsFunctions:{AdamicAdar:"Adamic Adar",authority:"Authority centrality (from HITS)",backlinksCount:"Nombre de r\xE9troliens",betweenness:"Betweenness centrality",BoW:"Bag of Words",closeness:"Closeness centrality",clusteringCoefficient:"Clustering coefficient",coCitations:"Co-citations",constant:"Constante",creationTime:"Dur\xE9e depuis la cr\xE9ation du fichier",degree:"Degree centrality",eccentricity:"Eccentricity in the connected graph",eigenvector:"Eigenvector centrality",filenameLength:"Longueur du nom de fichier",forwardlinksCount:"Nombre de liens sortants",forwardUniquelinksCount:"Nombre de liens sortants uniques",hub:"Hub centrality (from HITS)",Jaccard:"Jaccard similarity",modifiedTime:"Temps depuis la derni\xE8re modification",OtsukaOchiai:"Otsuka-Ochiai coefficient",overlap:"Overlap coefficient",tagsCount:"Nombre de tags",warningUnreliableOS:"Ce calcul n'est pas fiable et peut varier selon l'OS.",sentiment:"Sentiment"}}});var J8=Ie((s_,_1)=>{"use strict";var Yp=Object.prototype.hasOwnProperty,ct="~";function Wo(){}Object.create&&(Wo.prototype=Object.create(null),new Wo().__proto__||(ct=!1));function Xp(r,e,t){this.fn=r,this.context=e,this.once=t||!1}function Q8(r,e,t,i,s){if(typeof t!="function")throw new TypeError("The listener must be a function");var n=new Xp(t,i||r,s),o=ct?ct+e:e;return r._events[o]?r._events[o].fn?r._events[o]=[r._events[o],n]:r._events[o].push(n):(r._events[o]=n,r._eventsCount++),r}function iu(r,e){--r._eventsCount===0?r._events=new Wo:delete r._events[e]}function tt(){this._events=new Wo,this._eventsCount=0}tt.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)Yp.call(t,i)&&e.push(ct?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e};tt.prototype.listeners=function(e){var t=ct?ct+e:e,i=this._events[t];if(!i)return[];if(i.fn)return[i.fn];for(var s=0,n=i.length,o=new Array(n);s<n;s++)o[s]=i[s].fn;return o};tt.prototype.listenerCount=function(e){var t=ct?ct+e:e,i=this._events[t];return i?i.fn?1:i.length:0};tt.prototype.emit=function(e,t,i,s,n,o){var a=ct?ct+e:e;if(!this._events[a])return!1;var l=this._events[a],u=arguments.length,h,d;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),u){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,i),!0;case 4:return l.fn.call(l.context,t,i,s),!0;case 5:return l.fn.call(l.context,t,i,s,n),!0;case 6:return l.fn.call(l.context,t,i,s,n,o),!0}for(d=1,h=new Array(u-1);d<u;d++)h[d-1]=arguments[d];l.fn.apply(l.context,h)}else{var p=l.length,m;for(d=0;d<p;d++)switch(l[d].once&&this.removeListener(e,l[d].fn,void 0,!0),u){case 1:l[d].fn.call(l[d].context);break;case 2:l[d].fn.call(l[d].context,t);break;case 3:l[d].fn.call(l[d].context,t,i);break;case 4:l[d].fn.call(l[d].context,t,i,s);break;default:if(!h)for(m=1,h=new Array(u-1);m<u;m++)h[m-1]=arguments[m];l[d].fn.apply(l[d].context,h)}}return!0};tt.prototype.on=function(e,t,i){return Q8(this,e,t,i,!1)};tt.prototype.once=function(e,t,i){return Q8(this,e,t,i,!0)};tt.prototype.removeListener=function(e,t,i,s){var n=ct?ct+e:e;if(!this._events[n])return this;if(!t)return iu(this,n),this;var o=this._events[n];if(o.fn)o.fn===t&&(!s||o.once)&&(!i||o.context===i)&&iu(this,n);else{for(var a=0,l=[],u=o.length;a<u;a++)(o[a].fn!==t||s&&!o[a].once||i&&o[a].context!==i)&&l.push(o[a]);l.length?this._events[n]=l.length===1?l[0]:l:iu(this,n)}return this};tt.prototype.removeAllListeners=function(e){var t;return e?(t=ct?ct+e:e,this._events[t]&&iu(this,t)):(this._events=new Wo,this._eventsCount=0),this};tt.prototype.off=tt.prototype.removeListener;tt.prototype.addListener=tt.prototype.on;tt.prefixed=ct;tt.EventEmitter=tt;typeof _1<"u"&&(_1.exports=tt)});var s2=Ie((n_,A1)=>{"use strict";A1.exports=ou;A1.exports.default=ou;function ou(r,e,t){t=t||2;var i=e&&e.length,s=i?e[0]*t:r.length,n=t2(r,0,s,t,!0),o=[];if(!n||n.next===n.prev)return o;var a,l,u,h,d,p,m;if(i&&(n=Jp(r,e,n,t)),r.length>80*t){a=u=r[0],l=h=r[1];for(var x=t;x<s;x+=t)d=r[x],p=r[x+1],d<a&&(a=d),p<l&&(l=p),d>u&&(u=d),p>h&&(h=p);m=Math.max(u-a,h-l),m=m!==0?32767/m:0}return Ho(n,o,t,a,l,m,0),o}function t2(r,e,t,i,s){var n,o;if(s===F1(r,e,t,i)>0)for(n=e;n<t;n+=i)o=e2(n,r[n],r[n+1],o);else for(n=t-i;n>=e;n-=i)o=e2(n,r[n],r[n+1],o);return o&&au(o,o.next)&&($o(o),o=o.next),o}function Es(r,e){if(!r)return r;e||(e=r);var t=r,i;do if(i=!1,!t.steiner&&(au(t,t.next)||c0(t.prev,t,t.next)===0)){if($o(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function Ho(r,e,t,i,s,n,o){if(r){!o&&n&&nf(r,i,s,n);for(var a=r,l,u;r.prev!==r.next;){if(l=r.prev,u=r.next,n?Kp(r,i,s,n):qp(r)){e.push(l.i/t|0),e.push(r.i/t|0),e.push(u.i/t|0),$o(r),r=u.next,a=u.next;continue}if(r=u,r===a){o?o===1?(r=Zp(Es(r),e,t),Ho(r,e,t,i,s,n,2)):o===2&&Qp(r,e,t,i,s,n):Ho(Es(r),e,t,i,s,n,1);break}}}}function qp(r){var e=r.prev,t=r,i=r.next;if(c0(e,t,i)>=0)return!1;for(var s=e.x,n=t.x,o=i.x,a=e.y,l=t.y,u=i.y,h=s<n?s<o?s:o:n<o?n:o,d=a<l?a<u?a:u:l<u?l:u,p=s>n?s>o?s:o:n>o?n:o,m=a>l?a>u?a:u:l>u?l:u,x=i.next;x!==e;){if(x.x>=h&&x.x<=p&&x.y>=d&&x.y<=m&&yn(s,a,n,l,o,u,x.x,x.y)&&c0(x.prev,x,x.next)>=0)return!1;x=x.next}return!0}function Kp(r,e,t,i){var s=r.prev,n=r,o=r.next;if(c0(s,n,o)>=0)return!1;for(var a=s.x,l=n.x,u=o.x,h=s.y,d=n.y,p=o.y,m=a<l?a<u?a:u:l<u?l:u,x=h<d?h<p?h:p:d<p?d:p,C=a>l?a>u?a:u:l>u?l:u,A=h>d?h>p?h:p:d>p?d:p,P=C1(m,x,e,t,i),L=C1(C,A,e,t,i),I=r.prevZ,T=r.nextZ;I&&I.z>=P&&T&&T.z<=L;){if(I.x>=m&&I.x<=C&&I.y>=x&&I.y<=A&&I!==s&&I!==o&&yn(a,h,l,d,u,p,I.x,I.y)&&c0(I.prev,I,I.next)>=0||(I=I.prevZ,T.x>=m&&T.x<=C&&T.y>=x&&T.y<=A&&T!==s&&T!==o&&yn(a,h,l,d,u,p,T.x,T.y)&&c0(T.prev,T,T.next)>=0))return!1;T=T.nextZ}for(;I&&I.z>=P;){if(I.x>=m&&I.x<=C&&I.y>=x&&I.y<=A&&I!==s&&I!==o&&yn(a,h,l,d,u,p,I.x,I.y)&&c0(I.prev,I,I.next)>=0)return!1;I=I.prevZ}for(;T&&T.z<=L;){if(T.x>=m&&T.x<=C&&T.y>=x&&T.y<=A&&T!==s&&T!==o&&yn(a,h,l,d,u,p,T.x,T.y)&&c0(T.prev,T,T.next)>=0)return!1;T=T.nextZ}return!0}function Zp(r,e,t){var i=r;do{var s=i.prev,n=i.next.next;!au(s,n)&&r2(s,i,i.next,n)&&jo(s,n)&&jo(n,s)&&(e.push(s.i/t|0),e.push(i.i/t|0),e.push(n.i/t|0),$o(i),$o(i.next),i=r=n),i=i.next}while(i!==r);return Es(i)}function Qp(r,e,t,i,s,n){var o=r;do{for(var a=o.next.next;a!==o.prev;){if(o.i!==a.i&&lf(o,a)){var l=i2(o,a);o=Es(o,o.next),l=Es(l,l.next),Ho(o,e,t,i,s,n,0),Ho(l,e,t,i,s,n,0);return}a=a.next}o=o.next}while(o!==r)}function Jp(r,e,t,i){var s=[],n,o,a,l,u;for(n=0,o=e.length;n<o;n++)a=e[n]*i,l=n<o-1?e[n+1]*i:r.length,u=t2(r,a,l,i,!1),u===u.next&&(u.steiner=!0),s.push(af(u));for(s.sort(ef),n=0;n<s.length;n++)t=tf(s[n],t);return t}function ef(r,e){return r.x-e.x}function tf(r,e){var t=rf(r,e);if(!t)return e;var i=i2(t,r);return Es(i,i.next),Es(t,t.next)}function rf(r,e){var t=e,i=r.x,s=r.y,n=-1/0,o;do{if(s<=t.y&&s>=t.next.y&&t.next.y!==t.y){var a=t.x+(s-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(a<=i&&a>n&&(n=a,o=t.x<t.next.x?t:t.next,a===i))return o}t=t.next}while(t!==e);if(!o)return null;var l=o,u=o.x,h=o.y,d=1/0,p;t=o;do i>=t.x&&t.x>=u&&i!==t.x&&yn(s<h?i:n,s,u,h,s<h?n:i,s,t.x,t.y)&&(p=Math.abs(s-t.y)/(i-t.x),jo(t,r)&&(p<d||p===d&&(t.x>o.x||t.x===o.x&&sf(o,t)))&&(o=t,d=p)),t=t.next;while(t!==l);return o}function sf(r,e){return c0(r.prev,r,e.prev)<0&&c0(e.next,r,r.next)<0}function nf(r,e,t,i){var s=r;do s.z===0&&(s.z=C1(s.x,s.y,e,t,i)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next;while(s!==r);s.prevZ.nextZ=null,s.prevZ=null,of(s)}function of(r){var e,t,i,s,n,o,a,l,u=1;do{for(t=r,r=null,n=null,o=0;t;){for(o++,i=t,a=0,e=0;e<u&&(a++,i=i.nextZ,!!i);e++);for(l=u;a>0||l>0&&i;)a!==0&&(l===0||!i||t.z<=i.z)?(s=t,t=t.nextZ,a--):(s=i,i=i.nextZ,l--),n?n.nextZ=s:r=s,s.prevZ=n,n=s;t=i}n.nextZ=null,u*=2}while(o>1);return r}function C1(r,e,t,i,s){return r=(r-t)*s|0,e=(e-i)*s|0,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,r=(r|r<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,r|e<<1}function af(r){var e=r,t=r;do(e.x<t.x||e.x===t.x&&e.y<t.y)&&(t=e),e=e.next;while(e!==r);return t}function yn(r,e,t,i,s,n,o,a){return(s-o)*(e-a)>=(r-o)*(n-a)&&(r-o)*(i-a)>=(t-o)*(e-a)&&(t-o)*(n-a)>=(s-o)*(i-a)}function lf(r,e){return r.next.i!==e.i&&r.prev.i!==e.i&&!uf(r,e)&&(jo(r,e)&&jo(e,r)&&hf(r,e)&&(c0(r.prev,r,e.prev)||c0(r,e.prev,e))||au(r,e)&&c0(r.prev,r,r.next)>0&&c0(e.prev,e,e.next)>0)}function c0(r,e,t){return(e.y-r.y)*(t.x-e.x)-(e.x-r.x)*(t.y-e.y)}function au(r,e){return r.x===e.x&&r.y===e.y}function r2(r,e,t,i){var s=nu(c0(r,e,t)),n=nu(c0(r,e,i)),o=nu(c0(t,i,r)),a=nu(c0(t,i,e));return!!(s!==n&&o!==a||s===0&&su(r,t,e)||n===0&&su(r,i,e)||o===0&&su(t,r,i)||a===0&&su(t,e,i))}function su(r,e,t){return e.x<=Math.max(r.x,t.x)&&e.x>=Math.min(r.x,t.x)&&e.y<=Math.max(r.y,t.y)&&e.y>=Math.min(r.y,t.y)}function nu(r){return r>0?1:r<0?-1:0}function uf(r,e){var t=r;do{if(t.i!==r.i&&t.next.i!==r.i&&t.i!==e.i&&t.next.i!==e.i&&r2(t,t.next,r,e))return!0;t=t.next}while(t!==r);return!1}function jo(r,e){return c0(r.prev,r,r.next)<0?c0(r,e,r.next)>=0&&c0(r,r.prev,e)>=0:c0(r,e,r.prev)<0||c0(r,r.next,e)<0}function hf(r,e){var t=r,i=!1,s=(r.x+e.x)/2,n=(r.y+e.y)/2;do t.y>n!=t.next.y>n&&t.next.y!==t.y&&s<(t.next.x-t.x)*(n-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==r);return i}function i2(r,e){var t=new T1(r.i,r.x,r.y),i=new T1(e.i,e.x,e.y),s=r.next,n=e.prev;return r.next=e,e.prev=r,t.next=s,s.prev=t,i.next=t,t.prev=i,n.next=i,i.prev=n,i}function e2(r,e,t,i){var s=new T1(r,e,t);return i?(s.next=i.next,s.prev=i,i.next.prev=s,i.next=s):(s.prev=s,s.next=s),s}function $o(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ)}function T1(r,e,t){this.i=r,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}ou.deviation=function(r,e,t,i){var s=e&&e.length,n=s?e[0]*t:r.length,o=Math.abs(F1(r,0,n,t));if(s)for(var a=0,l=e.length;a<l;a++){var u=e[a]*t,h=a<l-1?e[a+1]*t:r.length;o-=Math.abs(F1(r,u,h,t))}var d=0;for(a=0;a<i.length;a+=3){var p=i[a]*t,m=i[a+1]*t,x=i[a+2]*t;d+=Math.abs((r[p]-r[x])*(r[m+1]-r[p+1])-(r[p]-r[m])*(r[x+1]-r[p+1]))}return o===0&&d===0?0:Math.abs((d-o)/o)};function F1(r,e,t,i){for(var s=0,n=e,o=t-i;n<t;n+=i)s+=(r[o]-r[n])*(r[n+1]+r[o+1]),o=n;return s}ou.flatten=function(r){for(var e=r[0][0].length,t={vertices:[],holes:[],dimensions:e},i=0,s=0;s<r.length;s++){for(var n=0;n<r[s].length;n++)for(var o=0;o<e;o++)t.vertices.push(r[s][n][o]);s>0&&(i+=r[s-1].length,t.holes.push(i))}return t}});var Pd=Ie(Lr=>{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0});require("obsidian");var Si=class extends Error{},nd=class extends Si{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}},od=class extends Si{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}},ad=class extends Si{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}},Hs=class extends Si{},Dh=class extends Si{constructor(e){super(`Invalid unit ${e}`)}},_t=class extends Si{},Br=class extends Si{constructor(){super("Zone is an abstract class")}},ce="numeric",Sr="short",zt="long",Eh={year:ce,month:ce,day:ce},z4={year:ce,month:Sr,day:ce},fm={year:ce,month:Sr,day:ce,weekday:Sr},W4={year:ce,month:zt,day:ce},H4={year:ce,month:zt,day:ce,weekday:zt},j4={hour:ce,minute:ce},$4={hour:ce,minute:ce,second:ce},Y4={hour:ce,minute:ce,second:ce,timeZoneName:Sr},X4={hour:ce,minute:ce,second:ce,timeZoneName:zt},q4={hour:ce,minute:ce,hourCycle:"h23"},K4={hour:ce,minute:ce,second:ce,hourCycle:"h23"},Z4={hour:ce,minute:ce,second:ce,hourCycle:"h23",timeZoneName:Sr},Q4={hour:ce,minute:ce,second:ce,hourCycle:"h23",timeZoneName:zt},J4={year:ce,month:ce,day:ce,hour:ce,minute:ce},e7={year:ce,month:ce,day:ce,hour:ce,minute:ce,second:ce},t7={year:ce,month:Sr,day:ce,hour:ce,minute:ce},r7={year:ce,month:Sr,day:ce,hour:ce,minute:ce,second:ce},gm={year:ce,month:Sr,day:ce,weekday:Sr,hour:ce,minute:ce},i7={year:ce,month:zt,day:ce,hour:ce,minute:ce,timeZoneName:Sr},s7={year:ce,month:zt,day:ce,hour:ce,minute:ce,second:ce,timeZoneName:Sr},n7={year:ce,month:zt,day:ce,weekday:zt,hour:ce,minute:ce,timeZoneName:zt},o7={year:ce,month:zt,day:ce,weekday:zt,hour:ce,minute:ce,second:ce,timeZoneName:zt},Ys=class{get type(){throw new Br}get name(){throw new Br}get ianaName(){return this.name}get isUniversal(){throw new Br}offsetName(e,t){throw new Br}formatOffset(e,t){throw new Br}offset(e){throw new Br}equals(e){throw new Br}get isValid(){throw new Br}},Z9=null,bh=class r extends Ys{static get instance(){return Z9===null&&(Z9=new r),Z9}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return l7(e,t,i)}formatOffset(e,t){return Qa(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}},xh={};function mm(r){return xh[r]||(xh[r]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:r,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),xh[r]}var ym={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function xm(r,e){let t=r.format(e).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,s,n,o,a,l,u,h]=i;return[o,s,n,a,l,u,h]}function vm(r,e){let t=r.formatToParts(e),i=[];for(let s=0;s<t.length;s++){let{type:n,value:o}=t[s],a=ym[n];n==="era"?i[a]=o:Ve(a)||(i[a]=parseInt(o,10))}return i}var dh={},as=class r extends Ys{static create(e){return dh[e]||(dh[e]=new r(e)),dh[e]}static resetCache(){dh={},xh={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=r.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return l7(e,t,i,this.name)}formatOffset(e,t){return Qa(this.offset(e),t)}offset(e){let t=new Date(e);if(isNaN(t))return NaN;let i=mm(this.name),[s,n,o,a,l,u,h]=i.formatToParts?vm(i,t):xm(i,t);a==="BC"&&(s=-Math.abs(s)+1);let p=kh({year:s,month:n,day:o,hour:l===24?0:l,minute:u,second:h,millisecond:0}),m=+t,x=m%1e3;return m-=x>=0?x:1e3+x,(p-m)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}},c4={};function Dm(r,e={}){let t=JSON.stringify([r,e]),i=c4[t];return i||(i=new Intl.ListFormat(r,e),c4[t]=i),i}var ld={};function ud(r,e={}){let t=JSON.stringify([r,e]),i=ld[t];return i||(i=new Intl.DateTimeFormat(r,e),ld[t]=i),i}var hd={};function Em(r,e={}){let t=JSON.stringify([r,e]),i=hd[t];return i||(i=new Intl.NumberFormat(r,e),hd[t]=i),i}var cd={};function bm(r,e={}){let{base:t,...i}=e,s=JSON.stringify([r,i]),n=cd[s];return n||(n=new Intl.RelativeTimeFormat(r,e),cd[s]=n),n}var Ka=null;function wm(){return Ka||(Ka=new Intl.DateTimeFormat().resolvedOptions().locale,Ka)}function Sm(r){let e=r.indexOf("-x-");e!==-1&&(r=r.substring(0,e));let t=r.indexOf("-u-");if(t===-1)return[r];{let i,s;try{i=ud(r).resolvedOptions(),s=r}catch{let l=r.substring(0,t);i=ud(l).resolvedOptions(),s=l}let{numberingSystem:n,calendar:o}=i;return[s,n,o]}}function _m(r,e,t){return(t||e)&&(r.includes("-u-")||(r+="-u"),t&&(r+=`-ca-${t}`),e&&(r+=`-nu-${e}`)),r}function Cm(r){let e=[];for(let t=1;t<=12;t++){let i=Oe.utc(2009,t,1);e.push(r(i))}return e}function Tm(r){let e=[];for(let t=1;t<=7;t++){let i=Oe.utc(2016,11,13+t);e.push(r(i))}return e}function ph(r,e,t,i){let s=r.listingMode();return s==="error"?null:s==="en"?t(e):i(e)}function Fm(r){return r.numberingSystem&&r.numberingSystem!=="latn"?!1:r.numberingSystem==="latn"||!r.locale||r.locale.startsWith("en")||new Intl.DateTimeFormat(r.intl).resolvedOptions().numberingSystem==="latn"}var dd=class{constructor(e,t,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;let{padTo:s,floor:n,...o}=i;if(!t||Object.keys(o).length>0){let a={useGrouping:!1,...i};i.padTo>0&&(a.minimumIntegerDigits=i.padTo),this.inf=Em(e,a)}}format(e){if(this.inf){let t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{let t=this.floor?Math.floor(e):Cd(e,3);return I0(t,this.padTo)}}},pd=class{constructor(e,t,i){this.opts=i,this.originalZone=void 0;let s;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){let o=-1*(e.offset/60),a=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&as.create(a).valid?(s=a,this.dt=e):(s="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,s=e.zone.name):(s="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);let n={...this.opts};n.timeZone=n.timeZone||s,this.dtf=ud(t,n)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){let e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(t=>{if(t.type==="timeZoneName"){let i=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...t,value:i}}else return t}):e}resolvedOptions(){return this.dtf.resolvedOptions()}},fd=class{constructor(e,t,i){this.opts={style:"long",...i},!t&&a7()&&(this.rtf=bm(e,i))}format(e,t){return this.rtf?this.rtf.format(e,t):Hm(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}},y0=class r{static fromOpts(e){return r.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,t,i,s=!1){let n=e||m0.defaultLocale,o=n||(s?"en-US":wm()),a=t||m0.defaultNumberingSystem,l=i||m0.defaultOutputCalendar;return new r(o,a,l,n)}static resetCache(){Ka=null,ld={},hd={},cd={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:i}={}){return r.create(e,t,i)}constructor(e,t,i,s){let[n,o,a]=Sm(e);this.locale=n,this.numberingSystem=t||o||null,this.outputCalendar=i||a||null,this.intl=_m(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Fm(this)),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:r.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return ph(this,e,c7,()=>{let i=t?{month:e,day:"numeric"}:{month:e},s=t?"format":"standalone";return this.monthsCache[s][e]||(this.monthsCache[s][e]=Cm(n=>this.extract(n,i,"month"))),this.monthsCache[s][e]})}weekdays(e,t=!1){return ph(this,e,f7,()=>{let i=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},s=t?"format":"standalone";return this.weekdaysCache[s][e]||(this.weekdaysCache[s][e]=Tm(n=>this.extract(n,i,"weekday"))),this.weekdaysCache[s][e]})}meridiems(){return ph(this,void 0,()=>g7,()=>{if(!this.meridiemCache){let e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Oe.utc(2016,11,13,9),Oe.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return ph(this,e,m7,()=>{let t={era:e};return this.eraCache[e]||(this.eraCache[e]=[Oe.utc(-40,1,1),Oe.utc(2017,1,1)].map(i=>this.extract(i,t,"era"))),this.eraCache[e]})}extract(e,t,i){let s=this.dtFormatter(e,t),n=s.formatToParts(),o=n.find(a=>a.type.toLowerCase()===i);return o?o.value:null}numberFormatter(e={}){return new dd(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new pd(e,this.intl,t)}relFormatter(e={}){return new fd(this.intl,this.isEnglish(),e)}listFormatter(e={}){return Dm(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}},Q9=null,sr=class r extends Ys{static get utcInstance(){return Q9===null&&(Q9=new r(0)),Q9}static instance(e){return e===0?r.utcInstance:new r(e)}static parseSpecifier(e){if(e){let t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new r(Mh(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Qa(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Qa(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return Qa(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}},gd=class extends Ys{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}};function os(r,e){if(Ve(r)||r===null)return e;if(r instanceof Ys)return r;if(Am(r)){let t=r.toLowerCase();return t==="default"?e:t==="local"||t==="system"?bh.instance:t==="utc"||t==="gmt"?sr.utcInstance:sr.parseSpecifier(t)||as.create(r)}else return $s(r)?sr.instance(r):typeof r=="object"&&"offset"in r&&typeof r.offset=="function"?r:new gd(r)}var d4=()=>Date.now(),p4="system",f4=null,g4=null,m4=null,y4=60,x4,m0=class{static get now(){return d4}static set now(e){d4=e}static set defaultZone(e){p4=e}static get defaultZone(){return os(p4,bh.instance)}static get defaultLocale(){return f4}static set defaultLocale(e){f4=e}static get defaultNumberingSystem(){return g4}static set defaultNumberingSystem(e){g4=e}static get defaultOutputCalendar(){return m4}static set defaultOutputCalendar(e){m4=e}static get twoDigitCutoffYear(){return y4}static set twoDigitCutoffYear(e){y4=e%100}static get throwOnInvalid(){return x4}static set throwOnInvalid(e){x4=e}static resetCaches(){y0.resetCache(),as.resetCache()}};function Ve(r){return typeof r>"u"}function $s(r){return typeof r=="number"}function Ih(r){return typeof r=="number"&&r%1===0}function Am(r){return typeof r=="string"}function Im(r){return Object.prototype.toString.call(r)==="[object Date]"}function a7(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function km(r){return Array.isArray(r)?r:[r]}function v4(r,e,t){if(r.length!==0)return r.reduce((i,s)=>{let n=[e(s),s];return i&&t(i[0],n[0])===i[0]?i:n},null)[1]}function Mm(r,e){return e.reduce((t,i)=>(t[i]=r[i],t),{})}function ho(r,e){return Object.prototype.hasOwnProperty.call(r,e)}function wi(r,e,t){return Ih(r)&&r>=e&&r<=t}function Pm(r,e){return r-e*Math.floor(r/e)}function I0(r,e=2){let t=r<0,i;return t?i="-"+(""+-r).padStart(e,"0"):i=(""+r).padStart(e,"0"),i}function ns(r){if(!(Ve(r)||r===null||r===""))return parseInt(r,10)}function zs(r){if(!(Ve(r)||r===null||r===""))return parseFloat(r)}function _d(r){if(!(Ve(r)||r===null||r==="")){let e=parseFloat("0."+r)*1e3;return Math.floor(e)}}function Cd(r,e,t=!1){let i=10**e;return(t?Math.trunc:Math.round)(r*i)/i}function tl(r){return r%4===0&&(r%100!==0||r%400===0)}function Za(r){return tl(r)?366:365}function wh(r,e){let t=Pm(e-1,12)+1,i=r+(e-t)/12;return t===2?tl(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function kh(r){let e=Date.UTC(r.year,r.month-1,r.day,r.hour,r.minute,r.second,r.millisecond);return r.year<100&&r.year>=0&&(e=new Date(e),e.setUTCFullYear(r.year,r.month-1,r.day)),+e}function Sh(r){let e=(r+Math.floor(r/4)-Math.floor(r/100)+Math.floor(r/400))%7,t=r-1,i=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7;return e===4||i===3?53:52}function md(r){return r>99?r:r>m0.twoDigitCutoffYear?1900+r:2e3+r}function l7(r,e,t,i=null){let s=new Date(r),n={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(n.timeZone=i);let o={timeZoneName:e,...n},a=new Intl.DateTimeFormat(t,o).formatToParts(s).find(l=>l.type.toLowerCase()==="timezonename");return a?a.value:null}function Mh(r,e){let t=parseInt(r,10);Number.isNaN(t)&&(t=0);let i=parseInt(e,10)||0,s=t<0||Object.is(t,-0)?-i:i;return t*60+s}function u7(r){let e=Number(r);if(typeof r=="boolean"||r===""||Number.isNaN(e))throw new _t(`Invalid unit value ${r}`);return e}function _h(r,e){let t={};for(let i in r)if(ho(r,i)){let s=r[i];if(s==null)continue;t[e(i)]=u7(s)}return t}function Qa(r,e){let t=Math.trunc(Math.abs(r/60)),i=Math.trunc(Math.abs(r%60)),s=r>=0?"+":"-";switch(e){case"short":return`${s}${I0(t,2)}:${I0(i,2)}`;case"narrow":return`${s}${t}${i>0?`:${i}`:""}`;case"techie":return`${s}${I0(t,2)}${I0(i,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Ph(r){return Mm(r,["hour","minute","second","millisecond"])}var Nm=["January","February","March","April","May","June","July","August","September","October","November","December"],h7=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Bm=["J","F","M","A","M","J","J","A","S","O","N","D"];function c7(r){switch(r){case"narrow":return[...Bm];case"short":return[...h7];case"long":return[...Nm];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var d7=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],p7=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Rm=["M","T","W","T","F","S","S"];function f7(r){switch(r){case"narrow":return[...Rm];case"short":return[...p7];case"long":return[...d7];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var g7=["AM","PM"],Lm=["Before Christ","Anno Domini"],Om=["BC","AD"],Gm=["B","A"];function m7(r){switch(r){case"narrow":return[...Gm];case"short":return[...Om];case"long":return[...Lm];default:return null}}function Um(r){return g7[r.hour<12?0:1]}function Vm(r,e){return f7(e)[r.weekday-1]}function zm(r,e){return c7(e)[r.month-1]}function Wm(r,e){return m7(e)[r.year<0?0:1]}function Hm(r,e,t="always",i=!1){let s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},n=["hours","minutes","seconds"].indexOf(r)===-1;if(t==="auto"&&n){let d=r==="days";switch(e){case 1:return d?"tomorrow":`next ${s[r][0]}`;case-1:return d?"yesterday":`last ${s[r][0]}`;case 0:return d?"today":`this ${s[r][0]}`}}let o=Object.is(e,-0)||e<0,a=Math.abs(e),l=a===1,u=s[r],h=i?l?u[1]:u[2]||u[1]:l?s[r][0]:r;return o?`${a} ${h} ago`:`in ${a} ${h}`}function D4(r,e){let t="";for(let i of r)i.literal?t+=i.val:t+=e(i.val);return t}var jm={D:Eh,DD:z4,DDD:W4,DDDD:H4,t:j4,tt:$4,ttt:Y4,tttt:X4,T:q4,TT:K4,TTT:Z4,TTTT:Q4,f:J4,ff:t7,fff:i7,ffff:n7,F:e7,FF:r7,FFF:s7,FFFF:o7},Ut=class r{static create(e,t={}){return new r(e,t)}static parseFormat(e){let t=null,i="",s=!1,n=[];for(let o=0;o<e.length;o++){let a=e.charAt(o);a==="'"?(i.length>0&&n.push({literal:s||/^\s+$/.test(i),val:i}),t=null,i="",s=!s):s||a===t?i+=a:(i.length>0&&n.push({literal:/^\s+$/.test(i),val:i}),i=a,t=a)}return i.length>0&&n.push({literal:s||/^\s+$/.test(i),val:i}),n}static macroTokenToFormatOpts(e){return jm[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return I0(e,t);let i={...this.opts};return t>0&&(i.padTo=t),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,t){let i=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",n=(m,x)=>this.loc.extract(e,m,x),o=m=>e.isOffsetFixed&&e.offset===0&&m.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,m.format):"",a=()=>i?Um(e):n({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(m,x)=>i?zm(e,m):n(x?{month:m}:{month:m,day:"numeric"},"month"),u=(m,x)=>i?Vm(e,m):n(x?{weekday:m}:{weekday:m,month:"long",day:"numeric"},"weekday"),h=m=>{let x=r.macroTokenToFormatOpts(m);return x?this.formatWithSystemDefault(e,x):m},d=m=>i?Wm(e,m):n({era:m},"era"),p=m=>{switch(m){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return a();case"d":return s?n({day:"numeric"},"day"):this.num(e.day);case"dd":return s?n({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return s?n({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?n({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return s?n({month:"numeric"},"month"):this.num(e.month);case"MM":return s?n({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return s?n({year:"numeric"},"year"):this.num(e.year);case"yy":return s?n({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?n({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?n({year:"numeric"},"year"):this.num(e.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return h(m)}};return D4(r.parseFormat(t),p)}formatDurationFromString(e,t){let i=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},s=l=>u=>{let h=i(u);return h?this.num(l.get(h),u.length):u},n=r.parseFormat(t),o=n.reduce((l,{literal:u,val:h})=>u?l:l.concat(h),[]),a=e.shiftTo(...o.map(i).filter(l=>l));return D4(n,s(a))}},Vt=class{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}},y7=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function co(...r){let e=r.reduce((t,i)=>t+i.source,"");return RegExp(`^${e}$`)}function po(...r){return e=>r.reduce(([t,i,s],n)=>{let[o,a,l]=n(e,s);return[{...t,...o},a||i,l]},[{},null,1]).slice(0,2)}function fo(r,...e){if(r==null)return[null,null];for(let[t,i]of e){let s=t.exec(r);if(s)return i(s)}return[null,null]}function x7(...r){return(e,t)=>{let i={},s;for(s=0;s<r.length;s++)i[r[s]]=ns(e[t+s]);return[i,null,t+s]}}var v7=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,$m=`(?:${v7.source}?(?:\\[(${y7.source})\\])?)?`,Td=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,D7=RegExp(`${Td.source}${$m}`),Fd=RegExp(`(?:T${D7.source})?`),Ym=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Xm=/(\d{4})-?W(\d\d)(?:-?(\d))?/,qm=/(\d{4})-?(\d{3})/,Km=x7("weekYear","weekNumber","weekDay"),Zm=x7("year","ordinal"),Qm=/(\d{4})-(\d\d)-(\d\d)/,E7=RegExp(`${Td.source} ?(?:${v7.source}|(${y7.source}))?`),Jm=RegExp(`(?: ${E7.source})?`);function lo(r,e,t){let i=r[e];return Ve(i)?t:ns(i)}function ey(r,e){return[{year:lo(r,e),month:lo(r,e+1,1),day:lo(r,e+2,1)},null,e+3]}function go(r,e){return[{hours:lo(r,e,0),minutes:lo(r,e+1,0),seconds:lo(r,e+2,0),milliseconds:_d(r[e+3])},null,e+4]}function rl(r,e){let t=!r[e]&&!r[e+1],i=Mh(r[e+1],r[e+2]),s=t?null:sr.instance(i);return[{},s,e+3]}function il(r,e){let t=r[e]?as.create(r[e]):null;return[{},t,e+1]}var ty=RegExp(`^T?${Td.source}$`),ry=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function iy(r){let[e,t,i,s,n,o,a,l,u]=r,h=e[0]==="-",d=l&&l[0]==="-",p=(m,x=!1)=>m!==void 0&&(x||m&&h)?-m:m;return[{years:p(zs(t)),months:p(zs(i)),weeks:p(zs(s)),days:p(zs(n)),hours:p(zs(o)),minutes:p(zs(a)),seconds:p(zs(l),l==="-0"),milliseconds:p(_d(u),d)}]}var sy={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Ad(r,e,t,i,s,n,o){let a={year:e.length===2?md(ns(e)):ns(e),month:h7.indexOf(t)+1,day:ns(i),hour:ns(s),minute:ns(n)};return o&&(a.second=ns(o)),r&&(a.weekday=r.length>3?d7.indexOf(r)+1:p7.indexOf(r)+1),a}var ny=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function oy(r){let[,e,t,i,s,n,o,a,l,u,h,d]=r,p=Ad(e,s,i,t,n,o,a),m;return l?m=sy[l]:u?m=0:m=Mh(h,d),[p,new sr(m)]}function ay(r){return r.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var ly=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,uy=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,hy=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function E4(r){let[,e,t,i,s,n,o,a]=r;return[Ad(e,s,i,t,n,o,a),sr.utcInstance]}function cy(r){let[,e,t,i,s,n,o,a]=r;return[Ad(e,a,t,i,s,n,o),sr.utcInstance]}var dy=co(Ym,Fd),py=co(Xm,Fd),fy=co(qm,Fd),gy=co(D7),b7=po(ey,go,rl,il),my=po(Km,go,rl,il),yy=po(Zm,go,rl,il),xy=po(go,rl,il);function vy(r){return fo(r,[dy,b7],[py,my],[fy,yy],[gy,xy])}function Dy(r){return fo(ay(r),[ny,oy])}function Ey(r){return fo(r,[ly,E4],[uy,E4],[hy,cy])}function by(r){return fo(r,[ry,iy])}var wy=po(go);function Sy(r){return fo(r,[ty,wy])}var _y=co(Qm,Jm),Cy=co(E7),Ty=po(go,rl,il);function Fy(r){return fo(r,[_y,b7],[Cy,Ty])}var b4="Invalid Duration",w7={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Ay={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...w7},rr=146097/400,no=146097/4800,Iy={years:{quarters:4,months:12,weeks:rr/7,days:rr,hours:rr*24,minutes:rr*24*60,seconds:rr*24*60*60,milliseconds:rr*24*60*60*1e3},quarters:{months:3,weeks:rr/28,days:rr/4,hours:rr*24/4,minutes:rr*24*60/4,seconds:rr*24*60*60/4,milliseconds:rr*24*60*60*1e3/4},months:{weeks:no/7,days:no,hours:no*24,minutes:no*24*60,seconds:no*24*60*60,milliseconds:no*24*60*60*1e3},...w7},js=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],ky=js.slice(0).reverse();function ss(r,e,t=!1){let i={values:t?e.values:{...r.values,...e.values||{}},loc:r.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||r.conversionAccuracy,matrix:e.matrix||r.matrix};return new _e(i)}function S7(r,e){let t=e.milliseconds??0;for(let i of ky.slice(1))e[i]&&(t+=e[i]*r[i].milliseconds);return t}function w4(r,e){let t=S7(r,e)<0?-1:1;js.reduceRight((i,s)=>{if(Ve(e[s]))return i;if(i){let n=e[i]*t,o=r[s][i],a=Math.floor(n/o);e[s]+=a*t,e[i]-=a*o*t}return s},null),js.reduce((i,s)=>{if(Ve(e[s]))return i;if(i){let n=e[i]%1;e[i]-=n,e[s]+=n*r[i][s]}return s},null)}function My(r){let e={};for(let[t,i]of Object.entries(r))i!==0&&(e[t]=i);return e}var _e=class r{constructor(e){let t=e.conversionAccuracy==="longterm"||!1,i=t?Iy:Ay;e.matrix&&(i=e.matrix),this.values=e.values,this.loc=e.loc||y0.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=i,this.isLuxonDuration=!0}static fromMillis(e,t){return r.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new _t(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new r({values:_h(e,r.normalizeUnit),loc:y0.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if($s(e))return r.fromMillis(e);if(r.isDuration(e))return e;if(typeof e=="object")return r.fromObject(e);throw new _t(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){let[i]=by(e);return i?r.fromObject(i,t):r.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){let[i]=Sy(e);return i?r.fromObject(i,t):r.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new _t("need to specify a reason the Duration is invalid");let i=e instanceof Vt?e:new Vt(e,t);if(m0.throwOnInvalid)throw new ad(i);return new r({invalid:i})}static normalizeUnit(e){let t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!t)throw new Dh(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){let i={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?Ut.create(this.loc,i).formatDurationFromString(this,e):b4}toHuman(e={}){if(!this.isValid)return b4;let t=js.map(i=>{let s=this.values[i];return Ve(s)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:i.slice(0,-1)}).format(s)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=Cd(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;let t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},Oe.fromMillis(t,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.isValid?S7(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;let t=r.fromDurationLike(e),i={};for(let s of js)(ho(t.values,s)||ho(this.values,s))&&(i[s]=t.get(s)+this.get(s));return ss(this,{values:i},!0)}minus(e){if(!this.isValid)return this;let t=r.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;let t={};for(let i of Object.keys(this.values))t[i]=u7(e(this.values[i],i));return ss(this,{values:t},!0)}get(e){return this[r.normalizeUnit(e)]}set(e){if(!this.isValid)return this;let t={...this.values,..._h(e,r.normalizeUnit)};return ss(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:i,matrix:s}={}){let o={loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:s,conversionAccuracy:i};return ss(this,o)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return w4(this.matrix,e),ss(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=My(this.normalize().shiftToAll().toObject());return ss(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>r.normalizeUnit(o));let t={},i={},s=this.toObject(),n;for(let o of js)if(e.indexOf(o)>=0){n=o;let a=0;for(let u in i)a+=this.matrix[u][o]*i[u],i[u]=0;$s(s[o])&&(a+=s[o]);let l=Math.trunc(a);t[o]=l,i[o]=(a*1e3-l*1e3)/1e3}else $s(s[o])&&(i[o]=s[o]);for(let o in i)i[o]!==0&&(t[n]+=o===n?i[o]:i[o]/this.matrix[n][o]);return w4(this.matrix,t),ss(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;let e={};for(let t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return ss(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(i,s){return i===void 0||i===0?s===void 0||s===0:i===s}for(let i of js)if(!t(this.values[i],e.values[i]))return!1;return!0}},oo="Invalid Interval";function Py(r,e){return!r||!r.isValid?uo.invalid("missing or invalid start"):!e||!e.isValid?uo.invalid("missing or invalid end"):e<r?uo.invalid("end before start",`The end of an interval must be after its start, but you had start=${r.toISO()} and end=${e.toISO()}`):null}var uo=class r{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new _t("need to specify a reason the Interval is invalid");let i=e instanceof Vt?e:new Vt(e,t);if(m0.throwOnInvalid)throw new od(i);return new r({invalid:i})}static fromDateTimes(e,t){let i=Xa(e),s=Xa(t),n=Py(i,s);return n??new r({start:i,end:s})}static after(e,t){let i=_e.fromDurationLike(t),s=Xa(e);return r.fromDateTimes(s,s.plus(i))}static before(e,t){let i=_e.fromDurationLike(t),s=Xa(e);return r.fromDateTimes(s.minus(i),s)}static fromISO(e,t){let[i,s]=(e||"").split("/",2);if(i&&s){let n,o;try{n=Oe.fromISO(i,t),o=n.isValid}catch{o=!1}let a,l;try{a=Oe.fromISO(s,t),l=a.isValid}catch{l=!1}if(o&&l)return r.fromDateTimes(n,a);if(o){let u=_e.fromISO(s,t);if(u.isValid)return r.after(n,u)}else if(l){let u=_e.fromISO(i,t);if(u.isValid)return r.before(a,u)}}return r.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds"){if(!this.isValid)return NaN;let t=this.start.startOf(e),i=this.end.startOf(e);return Math.floor(i.diff(t,e).get(e))+(i.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:t}={}){return this.isValid?r.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];let t=e.map(Xa).filter(o=>this.contains(o)).sort(),i=[],{s}=this,n=0;for(;s<this.e;){let o=t[n]||this.e,a=+o>+this.e?this.e:o;i.push(r.fromDateTimes(s,a)),s=a,n+=1}return i}splitBy(e){let t=_e.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:i}=this,s=1,n,o=[];for(;i<this.e;){let a=this.start.plus(t.mapUnits(l=>l*s));n=+a>+this.e?this.e:a,o.push(r.fromDateTimes(i,n)),i=n,s+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;let t=this.s>e.s?this.s:e.s,i=this.e<e.e?this.e:e.e;return t>=i?null:r.fromDateTimes(t,i)}union(e){if(!this.isValid)return this;let t=this.s<e.s?this.s:e.s,i=this.e>e.e?this.e:e.e;return r.fromDateTimes(t,i)}static merge(e){let[t,i]=e.sort((s,n)=>s.s-n.s).reduce(([s,n],o)=>n?n.overlaps(o)||n.abutsStart(o)?[s,n.union(o)]:[s.concat([n]),o]:[s,o],[[],null]);return i&&t.push(i),t}static xor(e){let t=null,i=0,s=[],n=e.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),o=Array.prototype.concat(...n),a=o.sort((l,u)=>l.time-u.time);for(let l of a)i+=l.type==="s"?1:-1,i===1?t=l.time:(t&&+t!=+l.time&&s.push(r.fromDateTimes(t,l.time)),t=null);return r.merge(s)}difference(...e){return r.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:oo}toLocaleString(e=Eh,t={}){return this.isValid?Ut.create(this.s.loc.clone(t),e).formatInterval(this):oo}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:oo}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:oo}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:oo}toFormat(e,{separator:t=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:oo}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):_e.invalid(this.invalidReason)}mapEndpoints(e){return r.fromDateTimes(e(this.s),e(this.e))}},ao=class{static hasDST(e=m0.defaultZone){let t=Oe.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return as.isValidZone(e)}static normalizeZone(e){return os(e,m0.defaultZone)}static months(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:n="gregory"}={}){return(s||y0.create(t,i,n)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:n="gregory"}={}){return(s||y0.create(t,i,n)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||y0.create(t,i,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||y0.create(t,i,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return y0.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return y0.create(t,null,"gregory").eras(e)}static features(){return{relative:a7()}}};function S4(r,e){let t=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=t(e)-t(r);return Math.floor(_e.fromMillis(i).as("days"))}function Ny(r,e,t){let i=[["years",(l,u)=>u.year-l.year],["quarters",(l,u)=>u.quarter-l.quarter+(u.year-l.year)*4],["months",(l,u)=>u.month-l.month+(u.year-l.year)*12],["weeks",(l,u)=>{let h=S4(l,u);return(h-h%7)/7}],["days",S4]],s={},n=r,o,a;for(let[l,u]of i)t.indexOf(l)>=0&&(o=l,s[l]=u(r,e),a=n.plus(s),a>e?(s[l]--,r=n.plus(s),r>e&&(a=r,s[l]--,r=n.plus(s))):r=a);return[r,s,a,o]}function By(r,e,t,i){let[s,n,o,a]=Ny(r,e,t),l=e-s,u=t.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);u.length===0&&(o<e&&(o=s.plus({[a]:1})),o!==s&&(n[a]=(n[a]||0)+l/(o-s)));let h=_e.fromObject(n,i);return u.length>0?_e.fromMillis(l,i).shiftTo(...u).plus(h):h}var Id={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},_4={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Ry=Id.hanidec.replace(/[\[|\]]/g,"").split("");function Ly(r){let e=parseInt(r,10);if(isNaN(e)){e="";for(let t=0;t<r.length;t++){let i=r.charCodeAt(t);if(r[t].search(Id.hanidec)!==-1)e+=Ry.indexOf(r[t]);else for(let s in _4){let[n,o]=_4[s];i>=n&&i<=o&&(e+=i-n)}}return parseInt(e,10)}else return e}function Er({numberingSystem:r},e=""){return new RegExp(`${Id[r||"latn"]}${e}`)}var Oy="missing Intl.DateTimeFormat.formatToParts support";function je(r,e=t=>t){return{regex:r,deser:([t])=>e(Ly(t))}}var Gy="\xA0",_7=`[ ${Gy}]`,C7=new RegExp(_7,"g");function Uy(r){return r.replace(/\./g,"\\.?").replace(C7,_7)}function C4(r){return r.replace(/\./g,"").replace(C7," ").toLowerCase()}function br(r,e){return r===null?null:{regex:RegExp(r.map(Uy).join("|")),deser:([t])=>r.findIndex(i=>C4(t)===C4(i))+e}}function T4(r,e){return{regex:r,deser:([,t,i])=>Mh(t,i),groups:e}}function fh(r){return{regex:r,deser:([e])=>e}}function Vy(r){return r.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function zy(r,e){let t=Er(e),i=Er(e,"{2}"),s=Er(e,"{3}"),n=Er(e,"{4}"),o=Er(e,"{6}"),a=Er(e,"{1,2}"),l=Er(e,"{1,3}"),u=Er(e,"{1,6}"),h=Er(e,"{1,9}"),d=Er(e,"{2,4}"),p=Er(e,"{4,6}"),m=A=>({regex:RegExp(Vy(A.val)),deser:([P])=>P,literal:!0}),C=(A=>{if(r.literal)return m(A);switch(A.val){case"G":return br(e.eras("short"),0);case"GG":return br(e.eras("long"),0);case"y":return je(u);case"yy":return je(d,md);case"yyyy":return je(n);case"yyyyy":return je(p);case"yyyyyy":return je(o);case"M":return je(a);case"MM":return je(i);case"MMM":return br(e.months("short",!0),1);case"MMMM":return br(e.months("long",!0),1);case"L":return je(a);case"LL":return je(i);case"LLL":return br(e.months("short",!1),1);case"LLLL":return br(e.months("long",!1),1);case"d":return je(a);case"dd":return je(i);case"o":return je(l);case"ooo":return je(s);case"HH":return je(i);case"H":return je(a);case"hh":return je(i);case"h":return je(a);case"mm":return je(i);case"m":return je(a);case"q":return je(a);case"qq":return je(i);case"s":return je(a);case"ss":return je(i);case"S":return je(l);case"SSS":return je(s);case"u":return fh(h);case"uu":return fh(a);case"uuu":return je(t);case"a":return br(e.meridiems(),0);case"kkkk":return je(n);case"kk":return je(d,md);case"W":return je(a);case"WW":return je(i);case"E":case"c":return je(t);case"EEE":return br(e.weekdays("short",!1),1);case"EEEE":return br(e.weekdays("long",!1),1);case"ccc":return br(e.weekdays("short",!0),1);case"cccc":return br(e.weekdays("long",!0),1);case"Z":case"ZZ":return T4(new RegExp(`([+-]${a.source})(?::(${i.source}))?`),2);case"ZZZ":return T4(new RegExp(`([+-]${a.source})(${i.source})?`),2);case"z":return fh(/[a-z_+-/]{1,256}?/i);case" ":return fh(/[^\S\n\r]/);default:return m(A)}})(r)||{invalidReason:Oy};return C.token=r,C}var Wy={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Hy(r,e,t){let{type:i,value:s}=r;if(i==="literal"){let l=/^\s+$/.test(s);return{literal:!l,val:l?" ":s}}let n=e[i],o=i;i==="hour"&&(e.hour12!=null?o=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?o="hour12":o="hour24":o=t.hour12?"hour12":"hour24");let a=Wy[o];if(typeof a=="object"&&(a=a[n]),a)return{literal:!1,val:a}}function jy(r){return[`^${r.map(t=>t.regex).reduce((t,i)=>`${t}(${i.source})`,"")}$`,r]}function $y(r,e,t){let i=r.match(e);if(i){let s={},n=1;for(let o in t)if(ho(t,o)){let a=t[o],l=a.groups?a.groups+1:1;!a.literal&&a.token&&(s[a.token.val[0]]=a.deser(i.slice(n,n+l))),n+=l}return[i,s]}else return[i,{}]}function Yy(r){let e=n=>{switch(n){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}},t=null,i;return Ve(r.z)||(t=as.create(r.z)),Ve(r.Z)||(t||(t=new sr(r.Z)),i=r.Z),Ve(r.q)||(r.M=(r.q-1)*3+1),Ve(r.h)||(r.h<12&&r.a===1?r.h+=12:r.h===12&&r.a===0&&(r.h=0)),r.G===0&&r.y&&(r.y=-r.y),Ve(r.u)||(r.S=_d(r.u)),[Object.keys(r).reduce((n,o)=>{let a=e(o);return a&&(n[a]=r[o]),n},{}),t,i]}var J9=null;function Xy(){return J9||(J9=Oe.fromMillis(1555555555555)),J9}function qy(r,e){if(r.literal)return r;let t=Ut.macroTokenToFormatOpts(r.val),i=A7(t,e);return i==null||i.includes(void 0)?r:i}function T7(r,e){return Array.prototype.concat(...r.map(t=>qy(t,e)))}function F7(r,e,t){let i=T7(Ut.parseFormat(t),r),s=i.map(o=>zy(o,r)),n=s.find(o=>o.invalidReason);if(n)return{input:e,tokens:i,invalidReason:n.invalidReason};{let[o,a]=jy(s),l=RegExp(o,"i"),[u,h]=$y(e,l,a),[d,p,m]=h?Yy(h):[null,null,void 0];if(ho(h,"a")&&ho(h,"H"))throw new Hs("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:i,regex:l,rawMatches:u,matches:h,result:d,zone:p,specificOffset:m}}}function Ky(r,e,t){let{result:i,zone:s,specificOffset:n,invalidReason:o}=F7(r,e,t);return[i,s,n,o]}function A7(r,e){if(!r)return null;let i=Ut.create(e,r).dtFormatter(Xy()),s=i.formatToParts(),n=i.resolvedOptions();return s.map(o=>Hy(o,r,n))}var I7=[0,31,59,90,120,151,181,212,243,273,304,334],k7=[0,31,60,91,121,152,182,213,244,274,305,335];function ir(r,e){return new Vt("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${r}, which is invalid`)}function M7(r,e,t){let i=new Date(Date.UTC(r,e-1,t));r<100&&r>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);let s=i.getUTCDay();return s===0?7:s}function P7(r,e,t){return t+(tl(r)?k7:I7)[e-1]}function N7(r,e){let t=tl(r)?k7:I7,i=t.findIndex(n=>n<e),s=e-t[i];return{month:i+1,day:s}}function yd(r){let{year:e,month:t,day:i}=r,s=P7(e,t,i),n=M7(e,t,i),o=Math.floor((s-n+10)/7),a;return o<1?(a=e-1,o=Sh(a)):o>Sh(e)?(a=e+1,o=1):a=e,{weekYear:a,weekNumber:o,weekday:n,...Ph(r)}}function F4(r){let{weekYear:e,weekNumber:t,weekday:i}=r,s=M7(e,1,4),n=Za(e),o=t*7+i-s-3,a;o<1?(a=e-1,o+=Za(a)):o>n?(a=e+1,o-=Za(e)):a=e;let{month:l,day:u}=N7(a,o);return{year:a,month:l,day:u,...Ph(r)}}function ed(r){let{year:e,month:t,day:i}=r,s=P7(e,t,i);return{year:e,ordinal:s,...Ph(r)}}function A4(r){let{year:e,ordinal:t}=r,{month:i,day:s}=N7(e,t);return{year:e,month:i,day:s,...Ph(r)}}function Zy(r){let e=Ih(r.weekYear),t=wi(r.weekNumber,1,Sh(r.weekYear)),i=wi(r.weekday,1,7);return e?t?i?!1:ir("weekday",r.weekday):ir("week",r.week):ir("weekYear",r.weekYear)}function Qy(r){let e=Ih(r.year),t=wi(r.ordinal,1,Za(r.year));return e?t?!1:ir("ordinal",r.ordinal):ir("year",r.year)}function B7(r){let e=Ih(r.year),t=wi(r.month,1,12),i=wi(r.day,1,wh(r.year,r.month));return e?t?i?!1:ir("day",r.day):ir("month",r.month):ir("year",r.year)}function R7(r){let{hour:e,minute:t,second:i,millisecond:s}=r,n=wi(e,0,23)||e===24&&t===0&&i===0&&s===0,o=wi(t,0,59),a=wi(i,0,59),l=wi(s,0,999);return n?o?a?l?!1:ir("millisecond",s):ir("second",i):ir("minute",t):ir("hour",e)}var td="Invalid DateTime",I4=864e13;function gh(r){return new Vt("unsupported zone",`the zone "${r.name}" is not supported`)}function rd(r){return r.weekData===null&&(r.weekData=yd(r.c)),r.weekData}function Ws(r,e){let t={ts:r.ts,zone:r.zone,c:r.c,o:r.o,loc:r.loc,invalid:r.invalid};return new Oe({...t,...e,old:t})}function L7(r,e,t){let i=r-e*60*1e3,s=t.offset(i);if(e===s)return[i,e];i-=(s-e)*60*1e3;let n=t.offset(i);return s===n?[i,s]:[r-Math.min(s,n)*60*1e3,Math.max(s,n)]}function mh(r,e){r+=e*60*1e3;let t=new Date(r);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function vh(r,e,t){return L7(kh(r),e,t)}function k4(r,e){let t=r.o,i=r.c.year+Math.trunc(e.years),s=r.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,n={...r.c,year:i,month:s,day:Math.min(r.c.day,wh(i,s))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=_e.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),a=kh(n),[l,u]=L7(a,t,r.zone);return o!==0&&(l+=o,u=r.zone.offset(l)),{ts:l,o:u}}function Ya(r,e,t,i,s,n){let{setZone:o,zone:a}=t;if(r&&Object.keys(r).length!==0||e){let l=e||a,u=Oe.fromObject(r,{...t,zone:l,specificOffset:n});return o?u:u.setZone(a)}else return Oe.invalid(new Vt("unparsable",`the input "${s}" can't be parsed as ${i}`))}function yh(r,e,t=!0){return r.isValid?Ut.create(y0.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(r,e):null}function id(r,e){let t=r.c.year>9999||r.c.year<0,i="";return t&&r.c.year>=0&&(i+="+"),i+=I0(r.c.year,t?6:4),e?(i+="-",i+=I0(r.c.month),i+="-",i+=I0(r.c.day)):(i+=I0(r.c.month),i+=I0(r.c.day)),i}function M4(r,e,t,i,s,n){let o=I0(r.c.hour);return e?(o+=":",o+=I0(r.c.minute),(r.c.millisecond!==0||r.c.second!==0||!t)&&(o+=":")):o+=I0(r.c.minute),(r.c.millisecond!==0||r.c.second!==0||!t)&&(o+=I0(r.c.second),(r.c.millisecond!==0||!i)&&(o+=".",o+=I0(r.c.millisecond,3))),s&&(r.isOffsetFixed&&r.offset===0&&!n?o+="Z":r.o<0?(o+="-",o+=I0(Math.trunc(-r.o/60)),o+=":",o+=I0(Math.trunc(-r.o%60))):(o+="+",o+=I0(Math.trunc(r.o/60)),o+=":",o+=I0(Math.trunc(r.o%60)))),n&&(o+="["+r.zone.ianaName+"]"),o}var O7={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Jy={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ex={ordinal:1,hour:0,minute:0,second:0,millisecond:0},G7=["year","month","day","hour","minute","second","millisecond"],tx=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],rx=["year","ordinal","hour","minute","second","millisecond"];function P4(r){let e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[r.toLowerCase()];if(!e)throw new Dh(r);return e}function N4(r,e){let t=os(e.zone,m0.defaultZone),i=y0.fromObject(e),s=m0.now(),n,o;if(Ve(r.year))n=s;else{for(let u of G7)Ve(r[u])&&(r[u]=O7[u]);let a=B7(r)||R7(r);if(a)return Oe.invalid(a);let l=t.offset(s);[n,o]=vh(r,l,t)}return new Oe({ts:n,zone:t,loc:i,o})}function B4(r,e,t){let i=Ve(t.round)?!0:t.round,s=(o,a)=>(o=Cd(o,i||t.calendary?0:2,!0),e.loc.clone(t).relFormatter(t).format(o,a)),n=o=>t.calendary?e.hasSame(r,o)?0:e.startOf(o).diff(r.startOf(o),o).get(o):e.diff(r,o).get(o);if(t.unit)return s(n(t.unit),t.unit);for(let o of t.units){let a=n(o);if(Math.abs(a)>=1)return s(a,o)}return s(r>e?-0:0,t.units[t.units.length-1])}function R4(r){let e={},t;return r.length>0&&typeof r[r.length-1]=="object"?(e=r[r.length-1],t=Array.from(r).slice(0,r.length-1)):t=Array.from(r),[e,t]}var Oe=class r{constructor(e){let t=e.zone||m0.defaultZone,i=e.invalid||(Number.isNaN(e.ts)?new Vt("invalid input"):null)||(t.isValid?null:gh(t));this.ts=Ve(e.ts)?m0.now():e.ts;let s=null,n=null;if(!i)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[s,n]=[e.old.c,e.old.o];else{let a=t.offset(this.ts);s=mh(this.ts,a),i=Number.isNaN(s.year)?new Vt("invalid input"):null,s=i?null:s,n=i?null:a}this._zone=t,this.loc=e.loc||y0.create(),this.invalid=i,this.weekData=null,this.c=s,this.o=n,this.isLuxonDateTime=!0}static now(){return new r({})}static local(){let[e,t]=R4(arguments),[i,s,n,o,a,l,u]=t;return N4({year:i,month:s,day:n,hour:o,minute:a,second:l,millisecond:u},e)}static utc(){let[e,t]=R4(arguments),[i,s,n,o,a,l,u]=t;return e.zone=sr.utcInstance,N4({year:i,month:s,day:n,hour:o,minute:a,second:l,millisecond:u},e)}static fromJSDate(e,t={}){let i=Im(e)?e.valueOf():NaN;if(Number.isNaN(i))return r.invalid("invalid input");let s=os(t.zone,m0.defaultZone);return s.isValid?new r({ts:i,zone:s,loc:y0.fromObject(t)}):r.invalid(gh(s))}static fromMillis(e,t={}){if($s(e))return e<-I4||e>I4?r.invalid("Timestamp out of range"):new r({ts:e,zone:os(t.zone,m0.defaultZone),loc:y0.fromObject(t)});throw new _t(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if($s(e))return new r({ts:e*1e3,zone:os(t.zone,m0.defaultZone),loc:y0.fromObject(t)});throw new _t("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};let i=os(t.zone,m0.defaultZone);if(!i.isValid)return r.invalid(gh(i));let s=m0.now(),n=Ve(t.specificOffset)?i.offset(s):t.specificOffset,o=_h(e,P4),a=!Ve(o.ordinal),l=!Ve(o.year),u=!Ve(o.month)||!Ve(o.day),h=l||u,d=o.weekYear||o.weekNumber,p=y0.fromObject(t);if((h||a)&&d)throw new Hs("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&a)throw new Hs("Can't mix ordinal dates with month/day");let m=d||o.weekday&&!h,x,C,A=mh(s,n);m?(x=tx,C=Jy,A=yd(A)):a?(x=rx,C=ex,A=ed(A)):(x=G7,C=O7);let P=!1;for(let z of x){let oe=o[z];Ve(oe)?P?o[z]=C[z]:o[z]=A[z]:P=!0}let L=m?Zy(o):a?Qy(o):B7(o),I=L||R7(o);if(I)return r.invalid(I);let T=m?F4(o):a?A4(o):o,[W,Q]=vh(T,n,i),O=new r({ts:W,zone:i,o:Q,loc:p});return o.weekday&&h&&e.weekday!==O.weekday?r.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${O.toISO()}`):O}static fromISO(e,t={}){let[i,s]=vy(e);return Ya(i,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){let[i,s]=Dy(e);return Ya(i,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){let[i,s]=Ey(e);return Ya(i,s,t,"HTTP",t)}static fromFormat(e,t,i={}){if(Ve(e)||Ve(t))throw new _t("fromFormat requires an input string and a format");let{locale:s=null,numberingSystem:n=null}=i,o=y0.fromOpts({locale:s,numberingSystem:n,defaultToEN:!0}),[a,l,u,h]=Ky(o,e,t);return h?r.invalid(h):Ya(a,l,i,`format ${t}`,e,u)}static fromString(e,t,i={}){return r.fromFormat(e,t,i)}static fromSQL(e,t={}){let[i,s]=Fy(e);return Ya(i,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new _t("need to specify a reason the DateTime is invalid");let i=e instanceof Vt?e:new Vt(e,t);if(m0.throwOnInvalid)throw new nd(i);return new r({invalid:i})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){let i=A7(e,y0.fromObject(t));return i?i.map(s=>s?s.val:null).join(""):null}static expandFormat(e,t={}){return T7(Ut.parseFormat(e),y0.fromObject(t)).map(s=>s.val).join("")}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?rd(this).weekYear:NaN}get weekNumber(){return this.isValid?rd(this).weekNumber:NaN}get weekday(){return this.isValid?rd(this).weekday:NaN}get ordinal(){return this.isValid?ed(this.c).ordinal:NaN}get monthShort(){return this.isValid?ao.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?ao.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?ao.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?ao.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let e=864e5,t=6e4,i=kh(this.c),s=this.zone.offset(i-e),n=this.zone.offset(i+e),o=this.zone.offset(i-s*t),a=this.zone.offset(i-n*t);if(o===a)return[this];let l=i-o*t,u=i-a*t,h=mh(l,o),d=mh(u,a);return h.hour===d.hour&&h.minute===d.minute&&h.second===d.second&&h.millisecond===d.millisecond?[Ws(this,{ts:l}),Ws(this,{ts:u})]:[this]}get isInLeapYear(){return tl(this.year)}get daysInMonth(){return wh(this.year,this.month)}get daysInYear(){return this.isValid?Za(this.year):NaN}get weeksInWeekYear(){return this.isValid?Sh(this.weekYear):NaN}resolvedLocaleOptions(e={}){let{locale:t,numberingSystem:i,calendar:s}=Ut.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:i,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(sr.instance(e),t)}toLocal(){return this.setZone(m0.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:i=!1}={}){if(e=os(e,m0.defaultZone),e.equals(this.zone))return this;if(e.isValid){let s=this.ts;if(t||i){let n=e.offset(this.ts),o=this.toObject();[s]=vh(o,n,e)}return Ws(this,{ts:s,zone:e})}else return r.invalid(gh(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:i}={}){let s=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:i});return Ws(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let t=_h(e,P4),i=!Ve(t.weekYear)||!Ve(t.weekNumber)||!Ve(t.weekday),s=!Ve(t.ordinal),n=!Ve(t.year),o=!Ve(t.month)||!Ve(t.day),a=n||o,l=t.weekYear||t.weekNumber;if((a||s)&&l)throw new Hs("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&s)throw new Hs("Can't mix ordinal dates with month/day");let u;i?u=F4({...yd(this.c),...t}):Ve(t.ordinal)?(u={...this.toObject(),...t},Ve(t.day)&&(u.day=Math.min(wh(u.year,u.month),u.day))):u=A4({...ed(this.c),...t});let[h,d]=vh(u,this.o,this.zone);return Ws(this,{ts:h,o:d})}plus(e){if(!this.isValid)return this;let t=_e.fromDurationLike(e);return Ws(this,k4(this,t))}minus(e){if(!this.isValid)return this;let t=_e.fromDurationLike(e).negate();return Ws(this,k4(this,t))}startOf(e){if(!this.isValid)return this;let t={},i=_e.normalizeUnit(e);switch(i){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0;break}if(i==="weeks"&&(t.weekday=1),i==="quarters"){let s=Math.ceil(this.month/3);t.month=(s-1)*3+1}return this.set(t)}endOf(e){return this.isValid?this.plus({[e]:1}).startOf(e).minus(1):this}toFormat(e,t={}){return this.isValid?Ut.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):td}toLocaleString(e=Eh,t={}){return this.isValid?Ut.create(this.loc.clone(t),e).formatDateTime(this):td}toLocaleParts(e={}){return this.isValid?Ut.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:i=!1,includeOffset:s=!0,extendedZone:n=!1}={}){if(!this.isValid)return null;let o=e==="extended",a=id(this,o);return a+="T",a+=M4(this,o,t,i,s,n),a}toISODate({format:e="extended"}={}){return this.isValid?id(this,e==="extended"):null}toISOWeekDate(){return yh(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:i=!0,includePrefix:s=!1,extendedZone:n=!1,format:o="extended"}={}){return this.isValid?(s?"T":"")+M4(this,o==="extended",t,e,i,n):null}toRFC2822(){return yh(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return yh(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?id(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:i=!0}={}){let s="HH:mm:ss.SSS";return(t||e)&&(i&&(s+=" "),t?s+="z":e&&(s+="ZZ")),yh(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():td}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};let t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",i={}){if(!this.isValid||!e.isValid)return _e.invalid("created by diffing an invalid DateTime");let s={locale:this.locale,numberingSystem:this.numberingSystem,...i},n=km(t).map(_e.normalizeUnit),o=e.valueOf()>this.valueOf(),a=o?this:e,l=o?e:this,u=By(a,l,n,s);return o?u.negate():u}diffNow(e="milliseconds",t={}){return this.diff(r.now(),e,t)}until(e){return this.isValid?uo.fromDateTimes(this,e):this}hasSame(e,t){if(!this.isValid)return!1;let i=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(t)<=i&&i<=s.endOf(t)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;let t=e.base||r.fromObject({},{zone:this.zone}),i=e.padding?this<t?-e.padding:e.padding:0,s=["years","months","days","hours","minutes","seconds"],n=e.unit;return Array.isArray(e.unit)&&(s=e.unit,n=void 0),B4(t,this.plus(i),{...e,numeric:"always",units:s,unit:n})}toRelativeCalendar(e={}){return this.isValid?B4(e.base||r.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(r.isDateTime))throw new _t("min requires all arguments be DateTimes");return v4(e,t=>t.valueOf(),Math.min)}static max(...e){if(!e.every(r.isDateTime))throw new _t("max requires all arguments be DateTimes");return v4(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,i={}){let{locale:s=null,numberingSystem:n=null}=i,o=y0.fromOpts({locale:s,numberingSystem:n,defaultToEN:!0});return F7(o,e,t)}static fromStringExplain(e,t,i={}){return r.fromFormatExplain(e,t,i)}static get DATE_SHORT(){return Eh}static get DATE_MED(){return z4}static get DATE_MED_WITH_WEEKDAY(){return fm}static get DATE_FULL(){return W4}static get DATE_HUGE(){return H4}static get TIME_SIMPLE(){return j4}static get TIME_WITH_SECONDS(){return $4}static get TIME_WITH_SHORT_OFFSET(){return Y4}static get TIME_WITH_LONG_OFFSET(){return X4}static get TIME_24_SIMPLE(){return q4}static get TIME_24_WITH_SECONDS(){return K4}static get TIME_24_WITH_SHORT_OFFSET(){return Z4}static get TIME_24_WITH_LONG_OFFSET(){return Q4}static get DATETIME_SHORT(){return J4}static get DATETIME_SHORT_WITH_SECONDS(){return e7}static get DATETIME_MED(){return t7}static get DATETIME_MED_WITH_SECONDS(){return r7}static get DATETIME_MED_WITH_WEEKDAY(){return gm}static get DATETIME_FULL(){return i7}static get DATETIME_FULL_WITH_SECONDS(){return s7}static get DATETIME_HUGE(){return n7}static get DATETIME_HUGE_WITH_SECONDS(){return o7}};function Xa(r){if(Oe.isDateTime(r))return r;if(r&&r.valueOf&&$s(r.valueOf()))return Oe.fromJSDate(r);if(r&&typeof r=="object")return Oe.fromObject(r);throw new _t(`Unknown datetime argument: ${r}, of type ${typeof r}`)}var kd={renderNullAs:"\\-",taskCompletionTracking:!1,taskCompletionUseEmojiShorthand:!1,taskCompletionText:"completion",taskCompletionDateFormat:"yyyy-MM-dd",recursiveSubTaskCompletion:!1,warnOnEmptyResult:!0,refreshEnabled:!0,refreshInterval:2500,defaultDateFormat:"MMMM dd, yyyy",defaultDateTimeFormat:"h:mm a - MMMM dd, yyyy",maxRecursiveRenderDepth:4,tableIdColumnName:"File",tableGroupColumnName:"Group",showResultCount:!0},ix={allowHtml:!0};({...kd,...ix});var xd=class r{constructor(e){ut(this,"value");ut(this,"successful");this.value=e,this.successful=!0}map(e){return new r(e(this.value))}flatMap(e){return e(this.value)}mapErr(e){return this}bimap(e,t){return this.map(e)}orElse(e){return this.value}cast(){return this}orElseThrow(e){return this.value}},vd=class r{constructor(e){ut(this,"error");ut(this,"successful");this.error=e,this.successful=!1}map(e){return this}flatMap(e){return this}mapErr(e){return new r(e(this.error))}bimap(e,t){return this.mapErr(t)}orElse(e){return e}cast(){return this}orElseThrow(e){throw e?new Error(e(this.error)):new Error(""+this.error)}},Ch;(function(r){function e(n){return new xd(n)}r.success=e;function t(n){return new vd(n)}r.failure=t;function i(n,o,a){return n.successful?o.successful?a(n.value,o.value):t(o.error):t(n.error)}r.flatMap2=i;function s(n,o,a){return i(n,o,(l,u)=>e(a(l,u)))}r.map2=s})(Ch||(Ch={}));var sx=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Th={exports:{}};Th.exports;(function(r,e){(function(t,i){r.exports=i()})(typeof self<"u"?self:sx,function(){return function(t){var i={};function s(n){if(i[n])return i[n].exports;var o=i[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,s),o.l=!0,o.exports}return s.m=t,s.c=i,s.d=function(n,o,a){s.o(n,o)||Object.defineProperty(n,o,{configurable:!1,enumerable:!0,get:a})},s.r=function(n){Object.defineProperty(n,"__esModule",{value:!0})},s.n=function(n){var o=n&&n.__esModule?function(){return n.default}:function(){return n};return s.d(o,"a",o),o},s.o=function(n,o){return Object.prototype.hasOwnProperty.call(n,o)},s.p="",s(s.s=0)}([function(t,i,s){function n(v){if(!(this instanceof n))return new n(v);this._=v}var o=n.prototype;function a(v,_){for(var M=0;M<v;M++)_(M)}function l(v,_,M){return function(R,G){a(G.length,function(H){R(G[H],H,G)})}(function(R,G,H){_=v(_,R,G,H)},M),_}function u(v,_){return l(function(M,R,G,H){return M.concat([v(R,G,H)])},[],_)}function h(v,_){var M={v:0,buf:_};return a(v,function(){var R;M={v:M.v<<1|(R=M.buf,R[0]>>7),buf:function(G){var H=l(function(X,ge,Ne,e0){return X.concat(Ne===e0.length-1?Buffer.from([ge,0]).readUInt16BE(0):e0.readUInt16BE(Ne))},[],G);return Buffer.from(u(function(X){return(X<<1&65535)>>8},H))}(M.buf)}}),M}function d(){return typeof Buffer<"u"}function p(){if(!d())throw new Error("Buffer global does not exist; please use webpack if you need to parse Buffers in the browser.")}function m(v){p();var _=l(function(H,X){return H+X},0,v);if(_%8!=0)throw new Error("The bits ["+v.join(", ")+"] add up to "+_+" which is not an even number of bytes; the total should be divisible by 8");var M,R=_/8,G=(M=function(H){return H>48},l(function(H,X){return H||(M(X)?X:H)},null,v));if(G)throw new Error(G+" bit range requested exceeds 48 bit (6 byte) Number max.");return new n(function(H,X){var ge=R+X;return ge>H.length?z(X,R.toString()+" bytes"):O(ge,l(function(Ne,e0){var ze=h(e0,Ne.buf);return{coll:Ne.coll.concat(ze.v),buf:ze.buf}},{coll:[],buf:H.slice(X,ge)},v).coll)})}function x(v,_){return new n(function(M,R){return p(),R+_>M.length?z(R,_+" bytes for "+v):O(R+_,M.slice(R,R+_))})}function C(v,_){if(typeof(M=_)!="number"||Math.floor(M)!==M||_<0||_>6)throw new Error(v+" requires integer length in range [0, 6].");var M}function A(v){return C("uintBE",v),x("uintBE("+v+")",v).map(function(_){return _.readUIntBE(0,v)})}function P(v){return C("uintLE",v),x("uintLE("+v+")",v).map(function(_){return _.readUIntLE(0,v)})}function L(v){return C("intBE",v),x("intBE("+v+")",v).map(function(_){return _.readIntBE(0,v)})}function I(v){return C("intLE",v),x("intLE("+v+")",v).map(function(_){return _.readIntLE(0,v)})}function T(v){return v instanceof n}function W(v){return{}.toString.call(v)==="[object Array]"}function Q(v){return d()&&Buffer.isBuffer(v)}function O(v,_){return{status:!0,index:v,value:_,furthest:-1,expected:[]}}function z(v,_){return W(_)||(_=[_]),{status:!1,index:-1,value:null,furthest:v,expected:_}}function oe(v,_){if(!_||v.furthest>_.furthest)return v;var M=v.furthest===_.furthest?function(R,G){if(function(){if(n._supportsSet!==void 0)return n._supportsSet;var xt=typeof Set<"u";return n._supportsSet=xt,xt}()&&Array.from){for(var H=new Set(R),X=0;X<G.length;X++)H.add(G[X]);var ge=Array.from(H);return ge.sort(),ge}for(var Ne={},e0=0;e0<R.length;e0++)Ne[R[e0]]=!0;for(var ze=0;ze<G.length;ze++)Ne[G[ze]]=!0;var E0=[];for(var u0 in Ne)({}).hasOwnProperty.call(Ne,u0)&&E0.push(u0);return E0.sort(),E0}(v.expected,_.expected):_.expected;return{status:v.status,index:v.index,value:v.value,furthest:_.furthest,expected:M}}var J={};function ne(v,_){if(Q(v))return{offset:_,line:-1,column:-1};v in J||(J[v]={});for(var M=J[v],R=0,G=0,H=0,X=_;X>=0;){if(X in M){R=M[X].line,H===0&&(H=M[X].lineStart);break}(v.charAt(X)===`
`||v.charAt(X)==="\r"&&v.charAt(X+1)!==`
`)&&(G++,H===0&&(H=X+1)),X--}var ge=R+G,Ne=_-H;return M[_]={line:ge,lineStart:H},{offset:_,line:ge+1,column:Ne+1}}function Ee(v){if(!T(v))throw new Error("not a parser: "+v)}function q(v,_){return typeof v=="string"?v.charAt(_):v[_]}function Z(v){if(typeof v!="number")throw new Error("not a number: "+v)}function Ce(v){if(typeof v!="function")throw new Error("not a function: "+v)}function pe(v){if(typeof v!="string")throw new Error("not a string: "+v)}var ve=2,Ge=3,Fe=8,nt=5*Fe,n0=4*Fe,k0=" ";function yt(v,_){return new Array(_+1).join(v)}function ot(v,_,M){var R=_-v.length;return R<=0?v:yt(M,R)+v}function $t(v,_,M,R){return{from:v-_>0?v-_:0,to:v+M>R?R:v+M}}function ue(v,_){var M,R,G,H,X,ge=_.index,Ne=ge.offset,e0=1;if(Ne===v.length)return"Got the end of the input";if(Q(v)){var ze=Ne-Ne%Fe,E0=Ne-ze,u0=$t(ze,nt,n0+Fe,v.length),xt=u(function(Te){return u(function(z0){return ot(z0.toString(16),2,"0")},Te)},function(Te,z0){var et=Te.length,W0=[],ei=0;if(et<=z0)return[Te.slice()];for(var ti=0;ti<et;ti++)W0[ei]||W0.push([]),W0[ei].push(Te[ti]),(ti+1)%z0==0&&ei++;return W0}(v.slice(u0.from,u0.to).toJSON().data,Fe));H=function(Te){return Te.from===0&&Te.to===1?{from:Te.from,to:Te.to}:{from:Te.from/Fe,to:Math.floor(Te.to/Fe)}}(u0),R=ze/Fe,M=3*E0,E0>=4&&(M+=1),e0=2,G=u(function(Te){return Te.length<=4?Te.join(" "):Te.slice(0,4).join(" ")+" "+Te.slice(4).join(" ")},xt),(X=(8*(H.to>0?H.to-1:H.to)).toString(16).length)<2&&(X=2)}else{var Ze=v.split(/\r\n|[\n\r\u2028\u2029]/);M=ge.column-1,R=ge.line-1,H=$t(R,ve,Ge,Ze.length),G=Ze.slice(H.from,H.to),X=H.to.toString().length}var lt=R-H.from;return Q(v)&&(X=(8*(H.to>0?H.to-1:H.to)).toString(16).length)<2&&(X=2),l(function(Te,z0,et){var W0,ei=et===lt,ti=ei?"> ":k0;return W0=Q(v)?ot((8*(H.from+et)).toString(16),X,"0"):ot((H.from+et+1).toString(),X," "),[].concat(Te,[ti+W0+" | "+z0],ei?[k0+yt(" ",X)+" | "+ot("",M," ")+yt("^",e0)]:[])},[],G).join(`
`)}function re(v,_){return[`
`,"-- PARSING FAILED "+yt("-",50),`
`,ue(v,_),`
`,(M=_.expected,M.length===1?`Expected:
`+M[0]:`Expected one of the following:
`+M.join(", ")),`
`].join("");var M}function fe(v){return v.flags!==void 0?v.flags:[v.global?"g":"",v.ignoreCase?"i":"",v.multiline?"m":"",v.unicode?"u":"",v.sticky?"y":""].join("")}function at(){for(var v=[].slice.call(arguments),_=v.length,M=0;M<_;M+=1)Ee(v[M]);return n(function(R,G){for(var H,X=new Array(_),ge=0;ge<_;ge+=1){if(!(H=oe(v[ge]._(R,G),H)).status)return H;X[ge]=H.value,G=H.index}return oe(O(G,X),H)})}function D0(){var v=[].slice.call(arguments);if(v.length===0)throw new Error("seqMap needs at least one argument");var _=v.pop();return Ce(_),at.apply(null,v).map(function(M){return _.apply(null,M)})}function M0(){var v=[].slice.call(arguments),_=v.length;if(_===0)return ur("zero alternates");for(var M=0;M<_;M+=1)Ee(v[M]);return n(function(R,G){for(var H,X=0;X<v.length;X+=1)if((H=oe(v[X]._(R,G),H)).status)return H;return H})}function l0(v,_){return He(v,_).or(J0([]))}function He(v,_){return Ee(v),Ee(_),D0(v,_.then(v).many(),function(M,R){return[M].concat(R)})}function V0(v){pe(v);var _="'"+v+"'";return n(function(M,R){var G=R+v.length,H=M.slice(R,G);return H===v?O(G,H):z(R,_)})}function P0(v,_){(function(G){if(!(G instanceof RegExp))throw new Error("not a regexp: "+G);for(var H=fe(G),X=0;X<H.length;X++){var ge=H.charAt(X);if(ge!=="i"&&ge!=="m"&&ge!=="u"&&ge!=="s")throw new Error('unsupported regexp flag "'+ge+'": '+G)}})(v),arguments.length>=2?Z(_):_=0;var M=function(G){return RegExp("^(?:"+G.source+")",fe(G))}(v),R=""+v;return n(function(G,H){var X=M.exec(G.slice(H));if(X){if(0<=_&&_<=X.length){var ge=X[0],Ne=X[_];return O(H+ge.length,Ne)}return z(H,"valid match group (0 to "+X.length+") in "+R)}return z(H,R)})}function J0(v){return n(function(_,M){return O(M,v)})}function ur(v){return n(function(_,M){return z(M,v)})}function o0(v){if(T(v))return n(function(_,M){var R=v._(_,M);return R.index=M,R.value="",R});if(typeof v=="string")return o0(V0(v));if(v instanceof RegExp)return o0(P0(v));throw new Error("not a string, regexp, or parser: "+v)}function fs(v){return Ee(v),n(function(_,M){var R=v._(_,M),G=_.slice(M,R.index);return R.status?z(M,'not "'+G+'"'):O(M,null)})}function _r(v){return Ce(v),n(function(_,M){var R=q(_,M);return M<_.length&&v(R)?O(M+1,R):z(M,"a character/byte matching "+v)})}function Cr(v,_){arguments.length<2&&(_=v,v=void 0);var M=n(function(R,G){return M._=_()._,M._(R,G)});return v?M.desc(v):M}function Qr(){return ur("fantasy-land/empty")}o.parse=function(v){if(typeof v!="string"&&!Q(v))throw new Error(".parse must be called with a string or Buffer as its argument");var _,M=this.skip(ys)._(v,0);return _=M.status?{status:!0,value:M.value}:{status:!1,index:ne(v,M.furthest),expected:M.expected},delete J[v],_},o.tryParse=function(v){var _=this.parse(v);if(_.status)return _.value;var M=re(v,_),R=new Error(M);throw R.type="ParsimmonError",R.result=_,R},o.assert=function(v,_){return this.chain(function(M){return v(M)?J0(M):ur(_)})},o.or=function(v){return M0(this,v)},o.trim=function(v){return this.wrap(v,v)},o.wrap=function(v,_){return D0(v,this,_,function(M,R){return R})},o.thru=function(v){return v(this)},o.then=function(v){return Ee(v),at(this,v).map(function(_){return _[1]})},o.many=function(){var v=this;return n(function(_,M){for(var R=[],G=void 0;;){if(!(G=oe(v._(_,M),G)).status)return oe(O(M,R),G);if(M===G.index)throw new Error("infinite loop detected in .many() parser --- calling .many() on a parser which can accept zero characters is usually the cause");M=G.index,R.push(G.value)}})},o.tieWith=function(v){return pe(v),this.map(function(_){if(function(G){if(!W(G))throw new Error("not an array: "+G)}(_),_.length){pe(_[0]);for(var M=_[0],R=1;R<_.length;R++)pe(_[R]),M+=v+_[R];return M}return""})},o.tie=function(){return this.tieWith("")},o.times=function(v,_){var M=this;return arguments.length<2&&(_=v),Z(v),Z(_),n(function(R,G){for(var H=[],X=void 0,ge=void 0,Ne=0;Ne<v;Ne+=1){if(ge=oe(X=M._(R,G),ge),!X.status)return ge;G=X.index,H.push(X.value)}for(;Ne<_&&(ge=oe(X=M._(R,G),ge),X.status);Ne+=1)G=X.index,H.push(X.value);return oe(O(G,H),ge)})},o.result=function(v){return this.map(function(){return v})},o.atMost=function(v){return this.times(0,v)},o.atLeast=function(v){return D0(this.times(v),this.many(),function(_,M){return _.concat(M)})},o.map=function(v){Ce(v);var _=this;return n(function(M,R){var G=_._(M,R);return G.status?oe(O(G.index,v(G.value)),G):G})},o.contramap=function(v){Ce(v);var _=this;return n(function(M,R){var G=_.parse(v(M.slice(R)));return G.status?O(R+M.length,G.value):G})},o.promap=function(v,_){return Ce(v),Ce(_),this.contramap(v).map(_)},o.skip=function(v){return at(this,v).map(function(_){return _[0]})},o.mark=function(){return D0(Jr,this,Jr,function(v,_,M){return{start:v,value:_,end:M}})},o.node=function(v){return D0(Jr,this,Jr,function(_,M,R){return{name:v,value:M,start:_,end:R}})},o.sepBy=function(v){return l0(this,v)},o.sepBy1=function(v){return He(this,v)},o.lookahead=function(v){return this.skip(o0(v))},o.notFollowedBy=function(v){return this.skip(fs(v))},o.desc=function(v){W(v)||(v=[v]);var _=this;return n(function(M,R){var G=_._(M,R);return G.status||(G.expected=v),G})},o.fallback=function(v){return this.or(J0(v))},o.ap=function(v){return D0(v,this,function(_,M){return _(M)})},o.chain=function(v){var _=this;return n(function(M,R){var G=_._(M,R);return G.status?oe(v(G.value)._(M,G.index),G):G})},o.concat=o.or,o.empty=Qr,o.of=J0,o["fantasy-land/ap"]=o.ap,o["fantasy-land/chain"]=o.chain,o["fantasy-land/concat"]=o.concat,o["fantasy-land/empty"]=o.empty,o["fantasy-land/of"]=o.of,o["fantasy-land/map"]=o.map;var Jr=n(function(v,_){return O(_,ne(v,_))}),gs=n(function(v,_){return _>=v.length?z(_,"any character/byte"):O(_+1,q(v,_))}),ms=n(function(v,_){return O(v.length,v.slice(_))}),ys=n(function(v,_){return _<v.length?z(_,"EOF"):O(_,null)}),on=P0(/[0-9]/).desc("a digit"),Ro=P0(/[0-9]*/).desc("optional digits"),xs=P0(/[a-z]/i).desc("a letter"),Lo=P0(/[a-z]*/i).desc("optional letters"),an=P0(/\s*/).desc("optional whitespace"),ki=P0(/\s+/).desc("whitespace"),vs=V0("\r"),Ds=V0(`
`),ln=V0(`\r
`),F=M0(ln,Ds,vs).desc("newline"),B=M0(F,ys);n.all=ms,n.alt=M0,n.any=gs,n.cr=vs,n.createLanguage=function(v){var _={};for(var M in v)({}).hasOwnProperty.call(v,M)&&function(R){_[R]=Cr(function(){return v[R](_)})}(M);return _},n.crlf=ln,n.custom=function(v){return n(v(O,z))},n.digit=on,n.digits=Ro,n.empty=Qr,n.end=B,n.eof=ys,n.fail=ur,n.formatError=re,n.index=Jr,n.isParser=T,n.lazy=Cr,n.letter=xs,n.letters=Lo,n.lf=Ds,n.lookahead=o0,n.makeFailure=z,n.makeSuccess=O,n.newline=F,n.noneOf=function(v){return _r(function(_){return v.indexOf(_)<0}).desc("none of '"+v+"'")},n.notFollowedBy=fs,n.of=J0,n.oneOf=function(v){for(var _=v.split(""),M=0;M<_.length;M++)_[M]="'"+_[M]+"'";return _r(function(R){return v.indexOf(R)>=0}).desc(_)},n.optWhitespace=an,n.Parser=n,n.range=function(v,_){return _r(function(M){return v<=M&&M<=_}).desc(v+"-"+_)},n.regex=P0,n.regexp=P0,n.sepBy=l0,n.sepBy1=He,n.seq=at,n.seqMap=D0,n.seqObj=function(){for(var v,_={},M=0,R=(v=arguments,Array.prototype.slice.call(v)),G=R.length,H=0;H<G;H+=1){var X=R[H];if(!T(X)){if(W(X)&&X.length===2&&typeof X[0]=="string"&&T(X[1])){var ge=X[0];if(Object.prototype.hasOwnProperty.call(_,ge))throw new Error("seqObj: duplicate key "+ge);_[ge]=!0,M++;continue}throw new Error("seqObj arguments must be parsers or [string, parser] array pairs.")}}if(M===0)throw new Error("seqObj expects at least one named parser, found zero");return n(function(Ne,e0){for(var ze,E0={},u0=0;u0<G;u0+=1){var xt,Ze;if(W(R[u0])?(xt=R[u0][0],Ze=R[u0][1]):(xt=null,Ze=R[u0]),!(ze=oe(Ze._(Ne,e0),ze)).status)return ze;xt&&(E0[xt]=ze.value),e0=ze.index}return oe(O(e0,E0),ze)})},n.string=V0,n.succeed=J0,n.takeWhile=function(v){return Ce(v),n(function(_,M){for(var R=M;R<_.length&&v(q(_,R));)R++;return O(R,_.slice(M,R))})},n.test=_r,n.whitespace=ki,n["fantasy-land/empty"]=Qr,n["fantasy-land/of"]=J0,n.Binary={bitSeq:m,bitSeqObj:function(v){p();var _={},M=0,R=u(function(H){if(W(H)){var X=H;if(X.length!==2)throw new Error("["+X.join(", ")+"] should be length 2, got length "+X.length);if(pe(X[0]),Z(X[1]),Object.prototype.hasOwnProperty.call(_,X[0]))throw new Error("duplicate key in bitSeqObj: "+X[0]);return _[X[0]]=!0,M++,X}return Z(H),[null,H]},v);if(M<1)throw new Error("bitSeqObj expects at least one named pair, got ["+v.join(", ")+"]");var G=u(function(H){return H[0]},R);return m(u(function(H){return H[1]},R)).map(function(H){return l(function(X,ge){return ge[0]!==null&&(X[ge[0]]=ge[1]),X},{},u(function(X,ge){return[X,H[ge]]},G))})},byte:function(v){if(p(),Z(v),v>255)throw new Error("Value specified to byte constructor ("+v+"=0x"+v.toString(16)+") is larger in value than a single byte.");var _=(v>15?"0x":"0x0")+v.toString(16);return n(function(M,R){var G=q(M,R);return G===v?O(R+1,G):z(R,_)})},buffer:function(v){return x("buffer",v).map(function(_){return Buffer.from(_)})},encodedString:function(v,_){return x("string",_).map(function(M){return M.toString(v)})},uintBE:A,uint8BE:A(1),uint16BE:A(2),uint32BE:A(4),uintLE:P,uint8LE:P(1),uint16LE:P(2),uint32LE:P(4),intBE:L,int8BE:L(1),int16BE:L(2),int32BE:L(4),intLE:I,int8LE:I(1),int16LE:I(2),int32LE:I(4),floatBE:x("floatBE",4).map(function(v){return v.readFloatBE(0)}),floatLE:x("floatLE",4).map(function(v){return v.readFloatLE(0)}),doubleBE:x("doubleBE",8).map(function(v){return v.readDoubleBE(0)}),doubleLE:x("doubleLE",8).map(function(v){return v.readDoubleLE(0)})},t.exports=n}])})})(Th,Th.exports);var N=Th.exports,Md=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function U7(r){return r==null?r:r.shiftToAll().normalize()}function L4(r){return r.includes("/")&&(r=r.substring(r.lastIndexOf("/")+1)),r.endsWith(".md")&&(r=r.substring(0,r.length-3)),r}N.alt(N.regex(new RegExp(Md(),"")),N.regex(/[0-9\p{Letter}_-]+/u).map(r=>r.toLocaleLowerCase()),N.whitespace.map(r=>"-"),N.any.map(r=>"")).many().map(r=>r.join(""));var nx=N.alt(N.regex(new RegExp(Md(),"")),N.regex(/[0-9\p{Letter}_-]+/u),N.whitespace.map(r=>" "),N.any.map(r=>" ")).many().map(r=>r.join("").split(/\s+/).join(" ").trim());function ox(r){return nx.tryParse(r)}function ax(r){return r=U7(r),r=_e.fromObject(Object.fromEntries(Object.entries(r.toObject()).filter(([,e])=>e!=0))),r.toHuman()}var Ja;(function(r){function e(T,W=kd,Q=!1){let O=t(T);if(!O)return W.renderNullAs;switch(O.type){case"null":return W.renderNullAs;case"string":return O.value;case"number":case"boolean":return""+O.value;case"html":return O.value.outerHTML;case"widget":return O.value.markdown();case"link":return O.value.markdown();case"function":return"<function>";case"array":let z="";return Q&&(z+="["),z+=O.value.map(oe=>e(oe,W,!0)).join(", "),Q&&(z+="]"),z;case"object":return"{ "+Object.entries(O.value).map(oe=>oe[0]+": "+e(oe[1],W,!0)).join(", ")+" }";case"date":return O.value.second==0&&O.value.hour==0&&O.value.minute==0?O.value.toFormat(W.defaultDateFormat):O.value.toFormat(W.defaultDateTimeFormat);case"duration":return ax(O.value)}}r.toString=e;function t(T){return p(T)?{type:"null",value:T}:u(T)?{type:"number",value:T}:l(T)?{type:"string",value:T}:x(T)?{type:"boolean",value:T}:d(T)?{type:"duration",value:T}:h(T)?{type:"date",value:T}:A(T)?{type:"widget",value:T}:m(T)?{type:"array",value:T}:C(T)?{type:"link",value:T}:I(T)?{type:"function",value:T}:P(T)?{type:"html",value:T}:L(T)?{type:"object",value:T}:void 0}r.wrapValue=t;function i(T,W){if(L(T)){let Q={};for(let[O,z]of Object.entries(T))Q[O]=i(z,W);return Q}else if(m(T)){let Q=[];for(let O of T)Q.push(i(O,W));return Q}else return W(T)}r.mapLeaves=i;function s(T,W,Q){if(T===void 0&&(T=null),W===void 0&&(W=null),T===null&&W===null)return 0;if(T===null)return-1;if(W===null)return 1;let O=t(T),z=t(W);if(O===void 0&&z===void 0)return 0;if(O===void 0)return-1;if(z===void 0)return 1;if(O.type!=z.type)return O.type.localeCompare(z.type);if(O.value===z.value)return 0;switch(O.type){case"string":return O.value.localeCompare(z.value);case"number":return O.value<z.value?-1:O.value==z.value?0:1;case"null":return 0;case"boolean":return O.value==z.value?0:O.value?1:-1;case"link":let oe=O.value,J=z.value,ne=Q??(n0=>n0),Ee=ne(oe.path).localeCompare(ne(J.path));if(Ee!=0)return Ee;let q=oe.type.localeCompare(J.type);return q!=0?q:oe.subpath&&!J.subpath?1:!oe.subpath&&J.subpath?-1:!oe.subpath&&!J.subpath?0:(oe.subpath??"").localeCompare(J.subpath??"");case"date":return O.value<z.value?-1:O.value.equals(z.value)?0:1;case"duration":return O.value<z.value?-1:O.value.equals(z.value)?0:1;case"array":let Z=O.value,Ce=z.value;for(let n0=0;n0<Math.min(Z.length,Ce.length);n0++){let k0=s(Z[n0],Ce[n0]);if(k0!=0)return k0}return Z.length-Ce.length;case"object":let pe=O.value,ve=z.value,Ge=Array.from(Object.keys(pe)),Fe=Array.from(Object.keys(ve));Ge.sort(),Fe.sort();let nt=s(Ge,Fe);if(nt!=0)return nt;for(let n0 of Ge){let k0=s(pe[n0],ve[n0]);if(k0!=0)return k0}return 0;case"widget":case"html":case"function":return 0}}r.compareValue=s;function n(T){return t(T)?.type}r.typeOf=n;function o(T){let W=t(T);if(!W)return!1;switch(W.type){case"number":return W.value!=0;case"string":return W.value.length>0;case"boolean":return W.value;case"link":return!!W.value.path;case"date":return W.value.toMillis()!=0;case"duration":return W.value.as("seconds")!=0;case"object":return Object.keys(W.value).length>0;case"array":return W.value.length>0;case"null":return!1;case"html":case"widget":case"function":return!0}}r.isTruthy=o;function a(T){if(T==null)return T;if(r.isArray(T))return[].concat(T.map(W=>a(W)));if(r.isObject(T)){let W={};for(let[Q,O]of Object.entries(T))W[Q]=a(O);return W}else return T}r.deepCopy=a;function l(T){return typeof T=="string"}r.isString=l;function u(T){return typeof T=="number"}r.isNumber=u;function h(T){return T instanceof Oe}r.isDate=h;function d(T){return T instanceof _e}r.isDuration=d;function p(T){return T==null}r.isNull=p;function m(T){return Array.isArray(T)}r.isArray=m;function x(T){return typeof T=="boolean"}r.isBoolean=x;function C(T){return T instanceof Fh}r.isLink=C;function A(T){return T instanceof el}r.isWidget=A;function P(T){return typeof HTMLElement<"u"?T instanceof HTMLElement:!1}r.isHtml=P;function L(T){return typeof T=="object"&&!P(T)&&!A(T)&&!m(T)&&!d(T)&&!h(T)&&!C(T)&&T!==void 0&&!p(T)}r.isObject=L;function I(T){return typeof T=="function"}r.isFunction=I})(Ja||(Ja={}));var O4;(function(r){function e(s){return Ja.isObject(s)&&Object.keys(s).length==2&&"key"in s&&"rows"in s}r.isElementGroup=e;function t(s){for(let n of s)if(!e(n))return!1;return!0}r.isGrouping=t;function i(s){if(t(s)){let n=0;for(let o of s)n+=i(o.rows);return n}else return s.length}r.count=i})(O4||(O4={}));var Fh=class r{constructor(e){ut(this,"path");ut(this,"display");ut(this,"subpath");ut(this,"embed");ut(this,"type");Object.assign(this,e)}static file(e,t=!1,i){return new r({path:e,embed:t,display:i,subpath:void 0,type:"file"})}static infer(e,t=!1,i){if(e.includes("#^")){let s=e.split("#^");return r.block(s[0],s[1],t,i)}else if(e.includes("#")){let s=e.split("#");return r.header(s[0],s[1],t,i)}else return r.file(e,t,i)}static header(e,t,i,s){return new r({path:e,embed:i,display:s,subpath:ox(t),type:"header"})}static block(e,t,i,s){return new r({path:e,embed:i,display:s,subpath:t,type:"block"})}static fromObject(e){return new r(e)}equals(e){return e==null||e==null?!1:this.path==e.path&&this.type==e.type&&this.subpath==e.subpath}toString(){return this.markdown()}toObject(){return{path:this.path,type:this.type,subpath:this.subpath,display:this.display,embed:this.embed}}withPath(e){return new r(Object.assign({},this,{path:e}))}withDisplay(e){return new r(Object.assign({},this,{display:e}))}withHeader(e){return r.header(this.path,e,this.embed,this.display)}toFile(){return r.file(this.path,this.embed,this.display)}toEmbed(){if(this.embed)return this;{let e=new r(this);return e.embed=!0,e}}fromEmbed(){if(this.embed){let e=new r(this);return e.embed=!1,e}else return this}markdown(){let e=(this.embed?"!":"")+"[["+this.obsidianLink();return this.display?e+="|"+this.display:(e+="|"+L4(this.path),(this.type=="header"||this.type=="block")&&(e+=" > "+this.subpath)),e+="]]",e}obsidianLink(){let e=this.path.replaceAll("|","\\|");return this.type=="header"?e+"#"+this.subpath?.replaceAll("|","\\|"):this.type=="block"?e+"#^"+this.subpath?.replaceAll("|","\\|"):e}fileName(){return L4(this.path).replace(".md","")}},el=class{constructor(e){ut(this,"$widget");this.$widget=e}},Dd=class extends el{constructor(t,i){super("dataview:list-pair");ut(this,"key");ut(this,"value");this.key=t,this.value=i}markdown(){return`${Ja.toString(this.key)}: ${Ja.toString(this.value)}`}},Ed=class extends el{constructor(t,i){super("dataview:external-link");ut(this,"url");ut(this,"display");this.url=t,this.display=i}markdown(){return`[${this.display??this.url}](${this.url})`}},G4;(function(r){function e(o,a){return new Dd(o,a)}r.listPair=e;function t(o,a){return new Ed(o,a)}r.externalLink=t;function i(o){return o.$widget==="dataview:list-pair"}r.isListPair=i;function s(o){return o.$widget==="dataview:external-link"}r.isExternalLink=s;function n(o){return i(o)||s(o)}r.isBuiltin=n})(G4||(G4={}));var g0;(function(r){function e(p){return{type:"variable",name:p}}r.variable=e;function t(p){return{type:"literal",value:p}}r.literal=t;function i(p,m,x){return{type:"binaryop",left:p,op:m,right:x}}r.binaryOp=i;function s(p,m){return{type:"index",object:p,index:m}}r.index=s;function n(p){let m=p.split("."),x=r.variable(m[0]);for(let C=1;C<m.length;C++)x=r.index(x,r.literal(m[C]));return x}r.indexVariable=n;function o(p,m){return{type:"lambda",arguments:p,value:m}}r.lambda=o;function a(p,m){return{type:"function",func:p,arguments:m}}r.func=a;function l(p){return{type:"list",values:p}}r.list=l;function u(p){return{type:"object",values:p}}r.object=u;function h(p){return{type:"negated",child:p}}r.negate=h;function d(p){return p=="<="||p=="<"||p==">"||p==">="||p=="!="||p=="="}r.isCompareOp=d,r.NULL=r.literal(null)})(g0||(g0={}));var Rr;(function(r){function e(h){return{type:"tag",tag:h}}r.tag=e;function t(h){return{type:"csv",path:h}}r.csv=t;function i(h){return{type:"folder",folder:h}}r.folder=i;function s(h,d){return{type:"link",file:h,direction:d?"incoming":"outgoing"}}r.link=s;function n(h,d,p){return{type:"binaryop",left:h,op:d,right:p}}r.binaryOp=n;function o(h,d){return{type:"binaryop",left:h,op:"&",right:d}}r.and=o;function a(h,d){return{type:"binaryop",left:h,op:"|",right:d}}r.or=a;function l(h){return{type:"negate",child:h}}r.negate=l;function u(){return{type:"empty"}}r.empty=u})(Rr||(Rr={}));var U4=new RegExp(Md(),""),bd={year:_e.fromObject({years:1}),years:_e.fromObject({years:1}),yr:_e.fromObject({years:1}),yrs:_e.fromObject({years:1}),month:_e.fromObject({months:1}),months:_e.fromObject({months:1}),mo:_e.fromObject({months:1}),mos:_e.fromObject({months:1}),week:_e.fromObject({weeks:1}),weeks:_e.fromObject({weeks:1}),wk:_e.fromObject({weeks:1}),wks:_e.fromObject({weeks:1}),w:_e.fromObject({weeks:1}),day:_e.fromObject({days:1}),days:_e.fromObject({days:1}),d:_e.fromObject({days:1}),hour:_e.fromObject({hours:1}),hours:_e.fromObject({hours:1}),hr:_e.fromObject({hours:1}),hrs:_e.fromObject({hours:1}),h:_e.fromObject({hours:1}),minute:_e.fromObject({minutes:1}),minutes:_e.fromObject({minutes:1}),min:_e.fromObject({minutes:1}),mins:_e.fromObject({minutes:1}),m:_e.fromObject({minutes:1}),second:_e.fromObject({seconds:1}),seconds:_e.fromObject({seconds:1}),sec:_e.fromObject({seconds:1}),secs:_e.fromObject({seconds:1}),s:_e.fromObject({seconds:1})},wd={now:()=>Oe.local(),today:()=>Oe.local().startOf("day"),yesterday:()=>Oe.local().startOf("day").minus(_e.fromObject({days:1})),tomorrow:()=>Oe.local().startOf("day").plus(_e.fromObject({days:1})),sow:()=>Oe.local().startOf("week"),"start-of-week":()=>Oe.local().startOf("week"),eow:()=>Oe.local().endOf("week"),"end-of-week":()=>Oe.local().endOf("week"),soy:()=>Oe.local().startOf("year"),"start-of-year":()=>Oe.local().startOf("year"),eoy:()=>Oe.local().endOf("year"),"end-of-year":()=>Oe.local().endOf("year"),som:()=>Oe.local().startOf("month"),"start-of-month":()=>Oe.local().startOf("month"),eom:()=>Oe.local().endOf("month"),"end-of-month":()=>Oe.local().endOf("month")},Sd=["FROM","WHERE","LIMIT","GROUP","FLATTEN"];function lx(r){let e=-1;for(;(e=r.indexOf("|",e+1))>=0;)if(!(e>0&&r[e-1]=="\\"))return[r.substring(0,e).replace(/\\\|/g,"|"),r.substring(e+1)];return[r.replace(/\\\|/g,"|"),void 0]}function ux(r){let[e,t]=lx(r);return Fh.infer(e,!1,t)}function qa(r,e,t){return N.seqMap(r,N.seq(N.optWhitespace,e,N.optWhitespace,r).many(),(i,s)=>{if(s.length==0)return i;let n=t(i,s[0][1],s[0][3]);for(let o=1;o<s.length;o++)n=t(n,s[o][1],s[o][3]);return n})}function hx(r,...e){return N.custom((t,i)=>(s,n)=>{let o=r._(s,n);if(!o.status)return o;for(let a of e){let l=a(o.value)._(s,o.index);if(!l.status)return o;o=l}return o})}var wr=N.createLanguage({number:r=>N.regexp(/-?[0-9]+(\.[0-9]+)?/).map(e=>Number.parseFloat(e)).desc("number"),string:r=>N.string('"').then(N.alt(r.escapeCharacter,N.noneOf('"\\')).atLeast(0).map(e=>e.join(""))).skip(N.string('"')).desc("string"),escapeCharacter:r=>N.string("\\").then(N.any).map(e=>e==='"'?'"':e==="\\"?"\\":"\\"+e),bool:r=>N.regexp(/true|false|True|False/).map(e=>e.toLowerCase()=="true").desc("boolean ('true' or 'false')"),tag:r=>N.seqMap(N.string("#"),N.alt(N.regexp(/[^\u2000-\u206F\u2E00-\u2E7F'!"#$%&()*+,.:;<=>?@^`{|}~\[\]\\\s]/).desc("text")).many(),(e,t)=>e+t.join("")).desc("tag ('#hello/stuff')"),identifier:r=>N.seqMap(N.alt(N.regexp(/\p{Letter}/u),N.regexp(U4).desc("text")),N.alt(N.regexp(/[0-9\p{Letter}_-]/u),N.regexp(U4).desc("text")).many(),(e,t)=>e+t.join("")).desc("variable identifier"),link:r=>N.regexp(/\[\[([^\[\]]*?)\]\]/u,1).map(e=>ux(e)).desc("file link"),embedLink:r=>N.seqMap(N.string("!").atMost(1),r.link,(e,t)=>(e.length>0&&(t.embed=!0),t)).desc("file link"),binaryPlusMinus:r=>N.regexp(/\+|-/).map(e=>e).desc("'+' or '-'"),binaryMulDiv:r=>N.regexp(/\*|\/|%/).map(e=>e).desc("'*' or '/' or '%'"),binaryCompareOp:r=>N.regexp(/>=|<=|!=|>|<|=/).map(e=>e).desc("'>=' or '<=' or '!=' or '=' or '>' or '<'"),binaryBooleanOp:r=>N.regexp(/and|or|&|\|/i).map(e=>e.toLowerCase()=="and"?"&":e.toLowerCase()=="or"?"|":e).desc("'and' or 'or'"),rootDate:r=>N.seqMap(N.regexp(/\d{4}/),N.string("-"),N.regexp(/\d{2}/),(e,t,i)=>Oe.fromObject({year:Number.parseInt(e),month:Number.parseInt(i)})).desc("date in format YYYY-MM[-DDTHH-MM-SS.MS]"),dateShorthand:r=>N.alt(...Object.keys(wd).sort((e,t)=>t.length-e.length).map(N.string)),date:r=>hx(r.rootDate,e=>N.seqMap(N.string("-"),N.regexp(/\d{2}/),(t,i)=>e.set({day:Number.parseInt(i)})),e=>N.seqMap(N.string("T"),N.regexp(/\d{2}/),(t,i)=>e.set({hour:Number.parseInt(i)})),e=>N.seqMap(N.string(":"),N.regexp(/\d{2}/),(t,i)=>e.set({minute:Number.parseInt(i)})),e=>N.seqMap(N.string(":"),N.regexp(/\d{2}/),(t,i)=>e.set({second:Number.parseInt(i)})),e=>N.alt(N.seqMap(N.string("."),N.regexp(/\d{3}/),(t,i)=>e.set({millisecond:Number.parseInt(i)})),N.succeed(e)),e=>N.alt(N.seqMap(N.string("+").or(N.string("-")),N.regexp(/\d{1,2}(:\d{2})?/),(t,i)=>e.setZone("UTC"+t+i,{keepLocalTime:!0})),N.seqMap(N.string("Z"),()=>e.setZone("utc",{keepLocalTime:!0})),N.seqMap(N.string("["),N.regexp(/[0-9A-Za-z+-\/]+/u),N.string("]"),(t,i,s)=>e.setZone(i,{keepLocalTime:!0})))).assert(e=>e.isValid,"valid date").desc("date in format YYYY-MM[-DDTHH-MM-SS.MS]"),datePlus:r=>N.alt(r.dateShorthand.map(e=>wd[e]()),r.date).desc("date in format YYYY-MM[-DDTHH-MM-SS.MS] or in shorthand"),durationType:r=>N.alt(...Object.keys(bd).sort((e,t)=>t.length-e.length).map(N.string)),duration:r=>N.seqMap(r.number,N.optWhitespace,r.durationType,(e,t,i)=>bd[i].mapUnits(s=>s*e)).sepBy1(N.string(",").trim(N.optWhitespace).or(N.optWhitespace)).map(e=>e.reduce((t,i)=>t.plus(i))).desc("duration like 4hr2min"),rawNull:r=>N.string("null"),tagSource:r=>r.tag.map(e=>Rr.tag(e)),csvSource:r=>N.seqMap(N.string("csv(").skip(N.optWhitespace),r.string,N.string(")"),(e,t,i)=>Rr.csv(t)),linkIncomingSource:r=>r.link.map(e=>Rr.link(e.path,!0)),linkOutgoingSource:r=>N.seqMap(N.string("outgoing(").skip(N.optWhitespace),r.link,N.string(")"),(e,t,i)=>Rr.link(t.path,!1)),folderSource:r=>r.string.map(e=>Rr.folder(e)),parensSource:r=>N.seqMap(N.string("("),N.optWhitespace,r.source,N.optWhitespace,N.string(")"),(e,t,i,s,n)=>i),negateSource:r=>N.seqMap(N.alt(N.string("-"),N.string("!")),r.atomSource,(e,t)=>Rr.negate(t)),atomSource:r=>N.alt(r.parensSource,r.negateSource,r.linkOutgoingSource,r.linkIncomingSource,r.folderSource,r.tagSource,r.csvSource),binaryOpSource:r=>qa(r.atomSource,r.binaryBooleanOp.map(e=>e),Rr.binaryOp),source:r=>r.binaryOpSource,variableField:r=>r.identifier.chain(e=>Sd.includes(e.toUpperCase())?N.fail("Variable fields cannot be a keyword ("+Sd.join(" or ")+")"):N.succeed(g0.variable(e))).desc("variable"),numberField:r=>r.number.map(e=>g0.literal(e)).desc("number"),stringField:r=>r.string.map(e=>g0.literal(e)).desc("string"),boolField:r=>r.bool.map(e=>g0.literal(e)).desc("boolean"),dateField:r=>N.seqMap(N.string("date("),N.optWhitespace,r.datePlus,N.optWhitespace,N.string(")"),(e,t,i,s,n)=>g0.literal(i)).desc("date"),durationField:r=>N.seqMap(N.string("dur("),N.optWhitespace,r.duration,N.optWhitespace,N.string(")"),(e,t,i,s,n)=>g0.literal(i)).desc("duration"),nullField:r=>r.rawNull.map(e=>g0.NULL),linkField:r=>r.link.map(e=>g0.literal(e)),listField:r=>r.field.sepBy(N.string(",").trim(N.optWhitespace)).wrap(N.string("[").skip(N.optWhitespace),N.optWhitespace.then(N.string("]"))).map(e=>g0.list(e)).desc("list ('[1, 2, 3]')"),objectField:r=>N.seqMap(r.identifier.or(r.string),N.string(":").trim(N.optWhitespace),r.field,(e,t,i)=>({name:e,value:i})).sepBy(N.string(",").trim(N.optWhitespace)).wrap(N.string("{").skip(N.optWhitespace),N.optWhitespace.then(N.string("}"))).map(e=>{let t={};for(let i of e)t[i.name]=i.value;return g0.object(t)}).desc("object ('{ a: 1, b: 2 }')"),atomInlineField:r=>N.alt(r.date,r.duration.map(e=>U7(e)),r.string,r.tag,r.embedLink,r.bool,r.number,r.rawNull),inlineFieldList:r=>r.atomInlineField.sepBy(N.string(",").trim(N.optWhitespace).lookahead(r.atomInlineField)),inlineField:r=>N.alt(N.seqMap(r.atomInlineField,N.string(",").trim(N.optWhitespace),r.inlineFieldList,(e,t,i)=>[e].concat(i)),r.atomInlineField),atomField:r=>N.alt(r.embedLink.map(e=>g0.literal(e)),r.negatedField,r.linkField,r.listField,r.objectField,r.lambdaField,r.parensField,r.boolField,r.numberField,r.stringField,r.dateField,r.durationField,r.nullField,r.variableField),indexField:r=>N.seqMap(r.atomField,N.alt(r.dotPostfix,r.indexPostfix,r.functionPostfix).many(),(e,t)=>{let i=e;for(let s of t)switch(s.type){case"dot":i=g0.index(i,g0.literal(s.field));break;case"index":i=g0.index(i,s.field);break;case"function":i=g0.func(i,s.fields);break}return i}),negatedField:r=>N.seqMap(N.string("!"),r.indexField,(e,t)=>g0.negate(t)).desc("negated field"),parensField:r=>N.seqMap(N.string("("),N.optWhitespace,r.field,N.optWhitespace,N.string(")"),(e,t,i,s,n)=>i),lambdaField:r=>N.seqMap(r.identifier.sepBy(N.string(",").trim(N.optWhitespace)).wrap(N.string("(").trim(N.optWhitespace),N.string(")").trim(N.optWhitespace)),N.string("=>").trim(N.optWhitespace),r.field,(e,t,i)=>({type:"lambda",arguments:e,value:i})),dotPostfix:r=>N.seqMap(N.string("."),r.identifier,(e,t)=>({type:"dot",field:t})),indexPostfix:r=>N.seqMap(N.string("["),N.optWhitespace,r.field,N.optWhitespace,N.string("]"),(e,t,i,s,n)=>({type:"index",field:i})),functionPostfix:r=>N.seqMap(N.string("("),N.optWhitespace,r.field.sepBy(N.string(",").trim(N.optWhitespace)),N.optWhitespace,N.string(")"),(e,t,i,s,n)=>({type:"function",fields:i})),binaryMulDivField:r=>qa(r.indexField,r.binaryMulDiv,g0.binaryOp),binaryPlusMinusField:r=>qa(r.binaryMulDivField,r.binaryPlusMinus,g0.binaryOp),binaryCompareField:r=>qa(r.binaryPlusMinusField,r.binaryCompareOp,g0.binaryOp),binaryBooleanField:r=>qa(r.binaryCompareField,r.binaryBooleanOp,g0.binaryOp),binaryOpField:r=>r.binaryBooleanField,field:r=>r.binaryOpField});function cx(r){try{return Ch.success(wr.field.tryParse(r))}catch(e){return Ch.failure(""+e)}}var Ah;(function(r){function e(i,s){return{name:i,field:s}}r.named=e;function t(i,s){return{field:i,direction:s}}r.sortBy=t})(Ah||(Ah={}));function dx(r){return N.custom((e,t)=>(i,s)=>{let n=r._(i,s);return n.status?Object.assign({},n,{value:[n.value,i.substring(s,n.index)]}):n})}function px(r){return r.split(/[\r\n]+/).map(e=>e.trim()).join("")}function V4(r,e){return N.eof.map(r).or(N.whitespace.then(e))}var V7=N.createLanguage({queryType:r=>N.alt(N.regexp(/TABLE|LIST|TASK|CALENDAR/i)).map(e=>e.toLowerCase()).desc("query type ('TABLE', 'LIST', 'TASK', or 'CALENDAR')"),explicitNamedField:r=>N.seqMap(wr.field.skip(N.whitespace),N.regexp(/AS/i).skip(N.whitespace),wr.identifier.or(wr.string),(e,t,i)=>Ah.named(i,e)),comment:()=>N.Parser((r,e)=>{let t=r.substring(e);if(!t.startsWith("//"))return N.makeFailure(e,"Not a comment");t=t.split(`
`)[0];let i=t.substring(2).trim();return N.makeSuccess(e+t.length,i)}),namedField:r=>N.alt(r.explicitNamedField,dx(wr.field).map(([e,t])=>Ah.named(px(t),e))),sortField:r=>N.seqMap(wr.field.skip(N.optWhitespace),N.regexp(/ASCENDING|DESCENDING|ASC|DESC/i).atMost(1),(e,t)=>{let i=t.length==0?"ascending":t[0].toLowerCase();return i=="desc"&&(i="descending"),i=="asc"&&(i="ascending"),{field:e,direction:i}}),headerClause:r=>r.queryType.chain(e=>{switch(e){case"table":return V4(()=>({type:e,fields:[],showId:!0}),N.seqMap(N.regexp(/WITHOUT\s+ID/i).skip(N.optWhitespace).atMost(1),N.sepBy(r.namedField,N.string(",").trim(N.optWhitespace)),(t,i)=>({type:e,fields:i,showId:t.length==0})));case"list":return V4(()=>({type:e,format:void 0,showId:!0}),N.seqMap(N.regexp(/WITHOUT\s+ID/i).skip(N.optWhitespace).atMost(1),wr.field.atMost(1),(t,i)=>({type:e,format:i.length==1?i[0]:void 0,showId:t.length==0})));case"task":return N.succeed({type:e});case"calendar":return N.whitespace.then(N.seqMap(r.namedField,t=>({type:e,showId:!0,field:t})));default:return N.fail(`Unrecognized query type '${e}'`)}}).desc("TABLE or LIST or TASK or CALENDAR"),fromClause:r=>N.seqMap(N.regexp(/FROM/i),N.whitespace,wr.source,(e,t,i)=>i),whereClause:r=>N.seqMap(N.regexp(/WHERE/i),N.whitespace,wr.field,(e,t,i)=>({type:"where",clause:i})).desc("WHERE <expression>"),sortByClause:r=>N.seqMap(N.regexp(/SORT/i),N.whitespace,r.sortField.sepBy1(N.string(",").trim(N.optWhitespace)),(e,t,i)=>({type:"sort",fields:i})).desc("SORT field [ASC/DESC]"),limitClause:r=>N.seqMap(N.regexp(/LIMIT/i),N.whitespace,wr.field,(e,t,i)=>({type:"limit",amount:i})).desc("LIMIT <value>"),flattenClause:r=>N.seqMap(N.regexp(/FLATTEN/i).skip(N.whitespace),r.namedField,(e,t)=>({type:"flatten",field:t})).desc("FLATTEN <value> [AS <name>]"),groupByClause:r=>N.seqMap(N.regexp(/GROUP BY/i).skip(N.whitespace),r.namedField,(e,t)=>({type:"group",field:t})).desc("GROUP BY <value> [AS <name>]"),clause:r=>N.alt(r.fromClause,r.whereClause,r.sortByClause,r.limitClause,r.groupByClause,r.flattenClause),query:r=>N.seqMap(r.headerClause.trim(sd),r.fromClause.trim(sd).atMost(1),r.clause.trim(sd).many(),(e,t,i)=>({header:e,source:t.length==0?Rr.folder(""):t[0],operations:i,settings:kd}))}),sd=N.alt(N.whitespace,V7.comment).many().map(r=>r.join("")),fx=r=>r?r.plugins.plugins.dataview?.api:window.DataviewAPI,gx=r=>r.plugins.enabledPlugins.has("dataview");Lr.DATE_SHORTHANDS=wd;Lr.DURATION_TYPES=bd;Lr.EXPRESSION=wr;Lr.KEYWORDS=Sd;Lr.QUERY_LANGUAGE=V7;Lr.getAPI=fx;Lr.isPluginEnabled=gx;Lr.parseField=cx});var zd=Ie((Ud,Vd)=>{(function(r,e){typeof Ud=="object"&&typeof Vd<"u"?Vd.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis<"u"?globalThis:r||self).graphology=e()})(Ud,function(){"use strict";function r(y){return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(w){return typeof w}:function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w},r(y)}function e(y,w){y.prototype=Object.create(w.prototype),y.prototype.constructor=y,i(y,w)}function t(y){return t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(w){return w.__proto__||Object.getPrototypeOf(w)},t(y)}function i(y,w){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(D,c){return D.__proto__=c,D},i(y,w)}function s(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function n(y,w,D){return n=s()?Reflect.construct.bind():function(c,g,b){var S=[null];S.push.apply(S,g);var k=new(Function.bind.apply(c,S));return b&&i(k,b.prototype),k},n.apply(null,arguments)}function o(y){var w=typeof Map=="function"?new Map:void 0;return o=function(D){if(D===null||(c=D,Function.toString.call(c).indexOf("[native code]")===-1))return D;var c;if(typeof D!="function")throw new TypeError("Super expression must either be null or a function");if(w!==void 0){if(w.has(D))return w.get(D);w.set(D,g)}function g(){return n(D,arguments,t(this).constructor)}return g.prototype=Object.create(D.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),i(g,D)},o(y)}function a(y){if(y===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y}var l=function(){for(var y=arguments[0],w=1,D=arguments.length;w<D;w++)if(arguments[w])for(var c in arguments[w])y[c]=arguments[w][c];return y};function u(y,w,D,c){var g=y._nodes.get(w),b=null;return g?b=c==="mixed"?g.out&&g.out[D]||g.undirected&&g.undirected[D]:c==="directed"?g.out&&g.out[D]:g.undirected&&g.undirected[D]:b}function h(y){return r(y)==="object"&&y!==null}function d(y){var w;for(w in y)return!1;return!0}function p(y,w,D){Object.defineProperty(y,w,{enumerable:!1,configurable:!1,writable:!0,value:D})}function m(y,w,D){var c={enumerable:!0,configurable:!0};typeof D=="function"?c.get=D:(c.value=D,c.writable=!1),Object.defineProperty(y,w,c)}function x(y){return!!h(y)&&!(y.attributes&&!Array.isArray(y.attributes))}typeof Object.assign=="function"&&(l=Object.assign);var C,A={exports:{}},P=typeof Reflect=="object"?Reflect:null,L=P&&typeof P.apply=="function"?P.apply:function(y,w,D){return Function.prototype.apply.call(y,w,D)};C=P&&typeof P.ownKeys=="function"?P.ownKeys:Object.getOwnPropertySymbols?function(y){return Object.getOwnPropertyNames(y).concat(Object.getOwnPropertySymbols(y))}:function(y){return Object.getOwnPropertyNames(y)};var I=Number.isNaN||function(y){return y!=y};function T(){T.init.call(this)}A.exports=T,A.exports.once=function(y,w){return new Promise(function(D,c){function g(S){y.removeListener(w,b),c(S)}function b(){typeof y.removeListener=="function"&&y.removeListener("error",g),D([].slice.call(arguments))}Z(y,w,b,{once:!0}),w!=="error"&&function(S,k,U){typeof S.on=="function"&&Z(S,"error",k,U)}(y,g,{once:!0})})},T.EventEmitter=T,T.prototype._events=void 0,T.prototype._eventsCount=0,T.prototype._maxListeners=void 0;var W=10;function Q(y){if(typeof y!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof y)}function O(y){return y._maxListeners===void 0?T.defaultMaxListeners:y._maxListeners}function z(y,w,D,c){var g,b,S,k;if(Q(D),(b=y._events)===void 0?(b=y._events=Object.create(null),y._eventsCount=0):(b.newListener!==void 0&&(y.emit("newListener",w,D.listener?D.listener:D),b=y._events),S=b[w]),S===void 0)S=b[w]=D,++y._eventsCount;else if(typeof S=="function"?S=b[w]=c?[D,S]:[S,D]:c?S.unshift(D):S.push(D),(g=O(y))>0&&S.length>g&&!S.warned){S.warned=!0;var U=new Error("Possible EventEmitter memory leak detected. "+S.length+" "+String(w)+" listeners added. Use emitter.setMaxListeners() to increase limit");U.name="MaxListenersExceededWarning",U.emitter=y,U.type=w,U.count=S.length,k=U,console&&console.warn&&console.warn(k)}return y}function oe(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function J(y,w,D){var c={fired:!1,wrapFn:void 0,target:y,type:w,listener:D},g=oe.bind(c);return g.listener=D,c.wrapFn=g,g}function ne(y,w,D){var c=y._events;if(c===void 0)return[];var g=c[w];return g===void 0?[]:typeof g=="function"?D?[g.listener||g]:[g]:D?function(b){for(var S=new Array(b.length),k=0;k<S.length;++k)S[k]=b[k].listener||b[k];return S}(g):q(g,g.length)}function Ee(y){var w=this._events;if(w!==void 0){var D=w[y];if(typeof D=="function")return 1;if(D!==void 0)return D.length}return 0}function q(y,w){for(var D=new Array(w),c=0;c<w;++c)D[c]=y[c];return D}function Z(y,w,D,c){if(typeof y.on=="function")c.once?y.once(w,D):y.on(w,D);else{if(typeof y.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof y);y.addEventListener(w,function g(b){c.once&&y.removeEventListener(w,g),D(b)})}}function Ce(y){if(typeof y!="function")throw new Error("obliterator/iterator: expecting a function!");this.next=y}Object.defineProperty(T,"defaultMaxListeners",{enumerable:!0,get:function(){return W},set:function(y){if(typeof y!="number"||y<0||I(y))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+y+".");W=y}}),T.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},T.prototype.setMaxListeners=function(y){if(typeof y!="number"||y<0||I(y))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+y+".");return this._maxListeners=y,this},T.prototype.getMaxListeners=function(){return O(this)},T.prototype.emit=function(y){for(var w=[],D=1;D<arguments.length;D++)w.push(arguments[D]);var c=y==="error",g=this._events;if(g!==void 0)c=c&&g.error===void 0;else if(!c)return!1;if(c){var b;if(w.length>0&&(b=w[0]),b instanceof Error)throw b;var S=new Error("Unhandled error."+(b?" ("+b.message+")":""));throw S.context=b,S}var k=g[y];if(k===void 0)return!1;if(typeof k=="function")L(k,this,w);else{var U=k.length,te=q(k,U);for(D=0;D<U;++D)L(te[D],this,w)}return!0},T.prototype.addListener=function(y,w){return z(this,y,w,!1)},T.prototype.on=T.prototype.addListener,T.prototype.prependListener=function(y,w){return z(this,y,w,!0)},T.prototype.once=function(y,w){return Q(w),this.on(y,J(this,y,w)),this},T.prototype.prependOnceListener=function(y,w){return Q(w),this.prependListener(y,J(this,y,w)),this},T.prototype.removeListener=function(y,w){var D,c,g,b,S;if(Q(w),(c=this._events)===void 0)return this;if((D=c[y])===void 0)return this;if(D===w||D.listener===w)--this._eventsCount==0?this._events=Object.create(null):(delete c[y],c.removeListener&&this.emit("removeListener",y,D.listener||w));else if(typeof D!="function"){for(g=-1,b=D.length-1;b>=0;b--)if(D[b]===w||D[b].listener===w){S=D[b].listener,g=b;break}if(g<0)return this;g===0?D.shift():function(k,U){for(;U+1<k.length;U++)k[U]=k[U+1];k.pop()}(D,g),D.length===1&&(c[y]=D[0]),c.removeListener!==void 0&&this.emit("removeListener",y,S||w)}return this},T.prototype.off=T.prototype.removeListener,T.prototype.removeAllListeners=function(y){var w,D,c;if((D=this._events)===void 0)return this;if(D.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):D[y]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete D[y]),this;if(arguments.length===0){var g,b=Object.keys(D);for(c=0;c<b.length;++c)(g=b[c])!=="removeListener"&&this.removeAllListeners(g);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(w=D[y])=="function")this.removeListener(y,w);else if(w!==void 0)for(c=w.length-1;c>=0;c--)this.removeListener(y,w[c]);return this},T.prototype.listeners=function(y){return ne(this,y,!0)},T.prototype.rawListeners=function(y){return ne(this,y,!1)},T.listenerCount=function(y,w){return typeof y.listenerCount=="function"?y.listenerCount(w):Ee.call(y,w)},T.prototype.listenerCount=Ee,T.prototype.eventNames=function(){return this._eventsCount>0?C(this._events):[]},typeof Symbol<"u"&&(Ce.prototype[Symbol.iterator]=function(){return this}),Ce.of=function(){var y=arguments,w=y.length,D=0;return new Ce(function(){return D>=w?{done:!0}:{done:!1,value:y[D++]}})},Ce.empty=function(){return new Ce(function(){return{done:!0}})},Ce.fromSequence=function(y){var w=0,D=y.length;return new Ce(function(){return w>=D?{done:!0}:{done:!1,value:y[w++]}})},Ce.is=function(y){return y instanceof Ce||typeof y=="object"&&y!==null&&typeof y.next=="function"};var pe=Ce,ve={};ve.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<"u",ve.SYMBOL_SUPPORT=typeof Symbol<"u";var Ge=pe,Fe=ve,nt=Fe.ARRAY_BUFFER_SUPPORT,n0=Fe.SYMBOL_SUPPORT,k0=function(y){var w=function(D){return typeof D=="string"||Array.isArray(D)||nt&&ArrayBuffer.isView(D)?Ge.fromSequence(D):typeof D!="object"||D===null?null:n0&&typeof D[Symbol.iterator]=="function"?D[Symbol.iterator]():typeof D.next=="function"?D:null}(y);if(!w)throw new Error("obliterator: target is not iterable nor a valid iterator.");return w},yt=k0,ot=function(y,w){for(var D,c=arguments.length>1?w:1/0,g=c!==1/0?new Array(c):[],b=0,S=yt(y);;){if(b===c)return g;if((D=S.next()).done)return b!==w&&(g.length=b),g;g[b++]=D.value}},$t=function(y){function w(D){var c;return(c=y.call(this)||this).name="GraphError",c.message=D,c}return e(w,y),w}(o(Error)),ue=function(y){function w(D){var c;return(c=y.call(this,D)||this).name="InvalidArgumentsGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(a(c),w.prototype.constructor),c}return e(w,y),w}($t),re=function(y){function w(D){var c;return(c=y.call(this,D)||this).name="NotFoundGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(a(c),w.prototype.constructor),c}return e(w,y),w}($t),fe=function(y){function w(D){var c;return(c=y.call(this,D)||this).name="UsageGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(a(c),w.prototype.constructor),c}return e(w,y),w}($t);function at(y,w){this.key=y,this.attributes=w,this.clear()}function D0(y,w){this.key=y,this.attributes=w,this.clear()}function M0(y,w){this.key=y,this.attributes=w,this.clear()}function l0(y,w,D,c,g){this.key=w,this.attributes=g,this.undirected=y,this.source=D,this.target=c}at.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=0,this.in={},this.out={},this.undirected={}},D0.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}},M0.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}},l0.prototype.attach=function(){var y="out",w="in";this.undirected&&(y=w="undirected");var D=this.source.key,c=this.target.key;this.source[y][c]=this,this.undirected&&D===c||(this.target[w][D]=this)},l0.prototype.attachMulti=function(){var y="out",w="in",D=this.source.key,c=this.target.key;this.undirected&&(y=w="undirected");var g=this.source[y],b=g[c];if(b===void 0)return g[c]=this,void(this.undirected&&D===c||(this.target[w][D]=this));b.previous=this,this.next=b,g[c]=this,this.target[w][D]=this},l0.prototype.detach=function(){var y=this.source.key,w=this.target.key,D="out",c="in";this.undirected&&(D=c="undirected"),delete this.source[D][w],delete this.target[c][y]},l0.prototype.detachMulti=function(){var y=this.source.key,w=this.target.key,D="out",c="in";this.undirected&&(D=c="undirected"),this.previous===void 0?this.next===void 0?(delete this.source[D][w],delete this.target[c][y]):(this.next.previous=void 0,this.source[D][w]=this.next,this.target[c][y]=this.next):(this.previous.next=this.next,this.next!==void 0&&(this.next.previous=this.previous))};function He(y,w,D,c,g,b,S){var k,U,te,ee;if(c=""+c,D===0){if(!(k=y._nodes.get(c)))throw new re("Graph.".concat(w,': could not find the "').concat(c,'" node in the graph.'));te=g,ee=b}else if(D===3){if(g=""+g,!(U=y._edges.get(g)))throw new re("Graph.".concat(w,': could not find the "').concat(g,'" edge in the graph.'));var Y=U.source.key,ae=U.target.key;if(c===Y)k=U.target;else{if(c!==ae)throw new re("Graph.".concat(w,': the "').concat(c,'" node is not attached to the "').concat(g,'" edge (').concat(Y,", ").concat(ae,")."));k=U.source}te=b,ee=S}else{if(!(U=y._edges.get(c)))throw new re("Graph.".concat(w,': could not find the "').concat(c,'" edge in the graph.'));k=D===1?U.source:U.target,te=g,ee=b}return[k,te,ee]}var V0=[{name:function(y){return"get".concat(y,"Attribute")},attacher:function(y,w,D){y.prototype[w]=function(c,g,b){var S=He(this,w,D,c,g,b),k=S[0],U=S[1];return k.attributes[U]}}},{name:function(y){return"get".concat(y,"Attributes")},attacher:function(y,w,D){y.prototype[w]=function(c,g){return He(this,w,D,c,g)[0].attributes}}},{name:function(y){return"has".concat(y,"Attribute")},attacher:function(y,w,D){y.prototype[w]=function(c,g,b){var S=He(this,w,D,c,g,b),k=S[0],U=S[1];return k.attributes.hasOwnProperty(U)}}},{name:function(y){return"set".concat(y,"Attribute")},attacher:function(y,w,D){y.prototype[w]=function(c,g,b,S){var k=He(this,w,D,c,g,b,S),U=k[0],te=k[1],ee=k[2];return U.attributes[te]=ee,this.emit("nodeAttributesUpdated",{key:U.key,type:"set",attributes:U.attributes,name:te}),this}}},{name:function(y){return"update".concat(y,"Attribute")},attacher:function(y,w,D){y.prototype[w]=function(c,g,b,S){var k=He(this,w,D,c,g,b,S),U=k[0],te=k[1],ee=k[2];if(typeof ee!="function")throw new ue("Graph.".concat(w,": updater should be a function."));var Y=U.attributes,ae=ee(Y[te]);return Y[te]=ae,this.emit("nodeAttributesUpdated",{key:U.key,type:"set",attributes:U.attributes,name:te}),this}}},{name:function(y){return"remove".concat(y,"Attribute")},attacher:function(y,w,D){y.prototype[w]=function(c,g,b){var S=He(this,w,D,c,g,b),k=S[0],U=S[1];return delete k.attributes[U],this.emit("nodeAttributesUpdated",{key:k.key,type:"remove",attributes:k.attributes,name:U}),this}}},{name:function(y){return"replace".concat(y,"Attributes")},attacher:function(y,w,D){y.prototype[w]=function(c,g,b){var S=He(this,w,D,c,g,b),k=S[0],U=S[1];if(!h(U))throw new ue("Graph.".concat(w,": provided attributes are not a plain object."));return k.attributes=U,this.emit("nodeAttributesUpdated",{key:k.key,type:"replace",attributes:k.attributes}),this}}},{name:function(y){return"merge".concat(y,"Attributes")},attacher:function(y,w,D){y.prototype[w]=function(c,g,b){var S=He(this,w,D,c,g,b),k=S[0],U=S[1];if(!h(U))throw new ue("Graph.".concat(w,": provided attributes are not a plain object."));return l(k.attributes,U),this.emit("nodeAttributesUpdated",{key:k.key,type:"merge",attributes:k.attributes,data:U}),this}}},{name:function(y){return"update".concat(y,"Attributes")},attacher:function(y,w,D){y.prototype[w]=function(c,g,b){var S=He(this,w,D,c,g,b),k=S[0],U=S[1];if(typeof U!="function")throw new ue("Graph.".concat(w,": provided updater is not a function."));return k.attributes=U(k.attributes),this.emit("nodeAttributesUpdated",{key:k.key,type:"update",attributes:k.attributes}),this}}}],P0=[{name:function(y){return"get".concat(y,"Attribute")},attacher:function(y,w,D){y.prototype[w]=function(c,g){var b;if(this.type!=="mixed"&&D!=="mixed"&&D!==this.type)throw new fe("Graph.".concat(w,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new fe("Graph.".concat(w,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var S=""+c,k=""+g;if(g=arguments[2],!(b=u(this,S,k,D)))throw new re("Graph.".concat(w,': could not find an edge for the given path ("').concat(S,'" - "').concat(k,'").'))}else{if(D!=="mixed")throw new fe("Graph.".concat(w,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(c=""+c,!(b=this._edges.get(c)))throw new re("Graph.".concat(w,': could not find the "').concat(c,'" edge in the graph.'))}return b.attributes[g]}}},{name:function(y){return"get".concat(y,"Attributes")},attacher:function(y,w,D){y.prototype[w]=function(c){var g;if(this.type!=="mixed"&&D!=="mixed"&&D!==this.type)throw new fe("Graph.".concat(w,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>1){if(this.multi)throw new fe("Graph.".concat(w,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var b=""+c,S=""+arguments[1];if(!(g=u(this,b,S,D)))throw new re("Graph.".concat(w,': could not find an edge for the given path ("').concat(b,'" - "').concat(S,'").'))}else{if(D!=="mixed")throw new fe("Graph.".concat(w,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(c=""+c,!(g=this._edges.get(c)))throw new re("Graph.".concat(w,': could not find the "').concat(c,'" edge in the graph.'))}return g.attributes}}},{name:function(y){return"has".concat(y,"Attribute")},attacher:function(y,w,D){y.prototype[w]=function(c,g){var b;if(this.type!=="mixed"&&D!=="mixed"&&D!==this.type)throw new fe("Graph.".concat(w,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new fe("Graph.".concat(w,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var S=""+c,k=""+g;if(g=arguments[2],!(b=u(this,S,k,D)))throw new re("Graph.".concat(w,': could not find an edge for the given path ("').concat(S,'" - "').concat(k,'").'))}else{if(D!=="mixed")throw new fe("Graph.".concat(w,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(c=""+c,!(b=this._edges.get(c)))throw new re("Graph.".concat(w,': could not find the "').concat(c,'" edge in the graph.'))}return b.attributes.hasOwnProperty(g)}}},{name:function(y){return"set".concat(y,"Attribute")},attacher:function(y,w,D){y.prototype[w]=function(c,g,b){var S;if(this.type!=="mixed"&&D!=="mixed"&&D!==this.type)throw new fe("Graph.".concat(w,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>3){if(this.multi)throw new fe("Graph.".concat(w,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var k=""+c,U=""+g;if(g=arguments[2],b=arguments[3],!(S=u(this,k,U,D)))throw new re("Graph.".concat(w,': could not find an edge for the given path ("').concat(k,'" - "').concat(U,'").'))}else{if(D!=="mixed")throw new fe("Graph.".concat(w,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(c=""+c,!(S=this._edges.get(c)))throw new re("Graph.".concat(w,': could not find the "').concat(c,'" edge in the graph.'))}return S.attributes[g]=b,this.emit("edgeAttributesUpdated",{key:S.key,type:"set",attributes:S.attributes,name:g}),this}}},{name:function(y){return"update".concat(y,"Attribute")},attacher:function(y,w,D){y.prototype[w]=function(c,g,b){var S;if(this.type!=="mixed"&&D!=="mixed"&&D!==this.type)throw new fe("Graph.".concat(w,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>3){if(this.multi)throw new fe("Graph.".concat(w,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var k=""+c,U=""+g;if(g=arguments[2],b=arguments[3],!(S=u(this,k,U,D)))throw new re("Graph.".concat(w,': could not find an edge for the given path ("').concat(k,'" - "').concat(U,'").'))}else{if(D!=="mixed")throw new fe("Graph.".concat(w,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(c=""+c,!(S=this._edges.get(c)))throw new re("Graph.".concat(w,': could not find the "').concat(c,'" edge in the graph.'))}if(typeof b!="function")throw new ue("Graph.".concat(w,": updater should be a function."));return S.attributes[g]=b(S.attributes[g]),this.emit("edgeAttributesUpdated",{key:S.key,type:"set",attributes:S.attributes,name:g}),this}}},{name:function(y){return"remove".concat(y,"Attribute")},attacher:function(y,w,D){y.prototype[w]=function(c,g){var b;if(this.type!=="mixed"&&D!=="mixed"&&D!==this.type)throw new fe("Graph.".concat(w,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new fe("Graph.".concat(w,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var S=""+c,k=""+g;if(g=arguments[2],!(b=u(this,S,k,D)))throw new re("Graph.".concat(w,': could not find an edge for the given path ("').concat(S,'" - "').concat(k,'").'))}else{if(D!=="mixed")throw new fe("Graph.".concat(w,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(c=""+c,!(b=this._edges.get(c)))throw new re("Graph.".concat(w,': could not find the "').concat(c,'" edge in the graph.'))}return delete b.attributes[g],this.emit("edgeAttributesUpdated",{key:b.key,type:"remove",attributes:b.attributes,name:g}),this}}},{name:function(y){return"replace".concat(y,"Attributes")},attacher:function(y,w,D){y.prototype[w]=function(c,g){var b;if(this.type!=="mixed"&&D!=="mixed"&&D!==this.type)throw new fe("Graph.".concat(w,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new fe("Graph.".concat(w,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var S=""+c,k=""+g;if(g=arguments[2],!(b=u(this,S,k,D)))throw new re("Graph.".concat(w,': could not find an edge for the given path ("').concat(S,'" - "').concat(k,'").'))}else{if(D!=="mixed")throw new fe("Graph.".concat(w,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(c=""+c,!(b=this._edges.get(c)))throw new re("Graph.".concat(w,': could not find the "').concat(c,'" edge in the graph.'))}if(!h(g))throw new ue("Graph.".concat(w,": provided attributes are not a plain object."));return b.attributes=g,this.emit("edgeAttributesUpdated",{key:b.key,type:"replace",attributes:b.attributes}),this}}},{name:function(y){return"merge".concat(y,"Attributes")},attacher:function(y,w,D){y.prototype[w]=function(c,g){var b;if(this.type!=="mixed"&&D!=="mixed"&&D!==this.type)throw new fe("Graph.".concat(w,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new fe("Graph.".concat(w,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var S=""+c,k=""+g;if(g=arguments[2],!(b=u(this,S,k,D)))throw new re("Graph.".concat(w,': could not find an edge for the given path ("').concat(S,'" - "').concat(k,'").'))}else{if(D!=="mixed")throw new fe("Graph.".concat(w,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(c=""+c,!(b=this._edges.get(c)))throw new re("Graph.".concat(w,': could not find the "').concat(c,'" edge in the graph.'))}if(!h(g))throw new ue("Graph.".concat(w,": provided attributes are not a plain object."));return l(b.attributes,g),this.emit("edgeAttributesUpdated",{key:b.key,type:"merge",attributes:b.attributes,data:g}),this}}},{name:function(y){return"update".concat(y,"Attributes")},attacher:function(y,w,D){y.prototype[w]=function(c,g){var b;if(this.type!=="mixed"&&D!=="mixed"&&D!==this.type)throw new fe("Graph.".concat(w,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new fe("Graph.".concat(w,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var S=""+c,k=""+g;if(g=arguments[2],!(b=u(this,S,k,D)))throw new re("Graph.".concat(w,': could not find an edge for the given path ("').concat(S,'" - "').concat(k,'").'))}else{if(D!=="mixed")throw new fe("Graph.".concat(w,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(c=""+c,!(b=this._edges.get(c)))throw new re("Graph.".concat(w,': could not find the "').concat(c,'" edge in the graph.'))}if(typeof g!="function")throw new ue("Graph.".concat(w,": provided updater is not a function."));return b.attributes=g(b.attributes),this.emit("edgeAttributesUpdated",{key:b.key,type:"update",attributes:b.attributes}),this}}}],J0=pe,ur=k0,o0=function(){var y=arguments,w=null,D=-1;return new J0(function(){for(var c=null;;){if(w===null){if(++D>=y.length)return{done:!0};w=ur(y[D])}if((c=w.next()).done!==!0)break;w=null}return c})},fs=[{name:"edges",type:"mixed"},{name:"inEdges",type:"directed",direction:"in"},{name:"outEdges",type:"directed",direction:"out"},{name:"inboundEdges",type:"mixed",direction:"in"},{name:"outboundEdges",type:"mixed",direction:"out"},{name:"directedEdges",type:"directed"},{name:"undirectedEdges",type:"undirected"}];function _r(y,w,D,c){var g=!1;for(var b in w)if(b!==c){var S=w[b];if(g=D(S.key,S.attributes,S.source.key,S.target.key,S.source.attributes,S.target.attributes,S.undirected),y&&g)return S.key}}function Cr(y,w,D,c){var g,b,S,k=!1;for(var U in w)if(U!==c){g=w[U];do{if(b=g.source,S=g.target,k=D(g.key,g.attributes,b.key,S.key,b.attributes,S.attributes,g.undirected),y&&k)return g.key;g=g.next}while(g!==void 0)}}function Qr(y,w){var D,c=Object.keys(y),g=c.length,b=0;return new pe(function(){do if(D)D=D.next;else{if(b>=g)return{done:!0};var S=c[b++];if(S===w){D=void 0;continue}D=y[S]}while(!D);return{done:!1,value:{edge:D.key,attributes:D.attributes,source:D.source.key,target:D.target.key,sourceAttributes:D.source.attributes,targetAttributes:D.target.attributes,undirected:D.undirected}}})}function Jr(y,w,D,c){var g=w[D];if(g){var b=g.source,S=g.target;return c(g.key,g.attributes,b.key,S.key,b.attributes,S.attributes,g.undirected)&&y?g.key:void 0}}function gs(y,w,D,c){var g=w[D];if(g){var b=!1;do{if(b=c(g.key,g.attributes,g.source.key,g.target.key,g.source.attributes,g.target.attributes,g.undirected),y&&b)return g.key;g=g.next}while(g!==void 0)}}function ms(y,w){var D=y[w];return D.next!==void 0?new pe(function(){if(!D)return{done:!0};var c={edge:D.key,attributes:D.attributes,source:D.source.key,target:D.target.key,sourceAttributes:D.source.attributes,targetAttributes:D.target.attributes,undirected:D.undirected};return D=D.next,{done:!1,value:c}}):pe.of({edge:D.key,attributes:D.attributes,source:D.source.key,target:D.target.key,sourceAttributes:D.source.attributes,targetAttributes:D.target.attributes,undirected:D.undirected})}function ys(y,w){if(y.size===0)return[];if(w==="mixed"||w===y.type)return typeof Array.from=="function"?Array.from(y._edges.keys()):ot(y._edges.keys(),y._edges.size);for(var D,c,g=w==="undirected"?y.undirectedSize:y.directedSize,b=new Array(g),S=w==="undirected",k=y._edges.values(),U=0;(D=k.next()).done!==!0;)(c=D.value).undirected===S&&(b[U++]=c.key);return b}function on(y,w,D,c){if(w.size!==0){for(var g,b,S=D!=="mixed"&&D!==w.type,k=D==="undirected",U=!1,te=w._edges.values();(g=te.next()).done!==!0;)if(b=g.value,!S||b.undirected===k){var ee=b,Y=ee.key,ae=ee.attributes,le=ee.source,ke=ee.target;if(U=c(Y,ae,le.key,ke.key,le.attributes,ke.attributes,b.undirected),y&&U)return Y}}}function Ro(y,w){if(y.size===0)return pe.empty();var D=w!=="mixed"&&w!==y.type,c=w==="undirected",g=y._edges.values();return new pe(function(){for(var b,S;;){if((b=g.next()).done)return b;if(S=b.value,!D||S.undirected===c)break}return{value:{edge:S.key,attributes:S.attributes,source:S.source.key,target:S.target.key,sourceAttributes:S.source.attributes,targetAttributes:S.target.attributes,undirected:S.undirected},done:!1}})}function xs(y,w,D,c,g,b){var S,k=w?Cr:_r;if(D!=="undirected"&&(c!=="out"&&(S=k(y,g.in,b),y&&S)||c!=="in"&&(S=k(y,g.out,b,c?void 0:g.key),y&&S))||D!=="directed"&&(S=k(y,g.undirected,b),y&&S))return S}function Lo(y,w,D,c){var g=[];return xs(!1,y,w,D,c,function(b){g.push(b)}),g}function an(y,w,D){var c=pe.empty();return y!=="undirected"&&(w!=="out"&&D.in!==void 0&&(c=o0(c,Qr(D.in))),w!=="in"&&D.out!==void 0&&(c=o0(c,Qr(D.out,w?void 0:D.key)))),y!=="directed"&&D.undirected!==void 0&&(c=o0(c,Qr(D.undirected))),c}function ki(y,w,D,c,g,b,S){var k,U=D?gs:Jr;if(w!=="undirected"&&(g.in!==void 0&&c!=="out"&&(k=U(y,g.in,b,S),y&&k)||g.out!==void 0&&c!=="in"&&(c||g.key!==b)&&(k=U(y,g.out,b,S),y&&k))||w!=="directed"&&g.undirected!==void 0&&(k=U(y,g.undirected,b,S),y&&k))return k}function vs(y,w,D,c,g){var b=[];return ki(!1,y,w,D,c,g,function(S){b.push(S)}),b}function Ds(y,w,D,c){var g=pe.empty();return y!=="undirected"&&(D.in!==void 0&&w!=="out"&&c in D.in&&(g=o0(g,ms(D.in,c))),D.out!==void 0&&w!=="in"&&c in D.out&&(w||D.key!==c)&&(g=o0(g,ms(D.out,c)))),y!=="directed"&&D.undirected!==void 0&&c in D.undirected&&(g=o0(g,ms(D.undirected,c))),g}var ln=[{name:"neighbors",type:"mixed"},{name:"inNeighbors",type:"directed",direction:"in"},{name:"outNeighbors",type:"directed",direction:"out"},{name:"inboundNeighbors",type:"mixed",direction:"in"},{name:"outboundNeighbors",type:"mixed",direction:"out"},{name:"directedNeighbors",type:"directed"},{name:"undirectedNeighbors",type:"undirected"}];function F(){this.A=null,this.B=null}function B(y,w,D,c,g){for(var b in c){var S=c[b],k=S.source,U=S.target,te=k===D?U:k;if(!w||!w.has(te.key)){var ee=g(te.key,te.attributes);if(y&&ee)return te.key}}}function v(y,w,D,c,g){if(w!=="mixed"){if(w==="undirected")return B(y,null,c,c.undirected,g);if(typeof D=="string")return B(y,null,c,c[D],g)}var b,S=new F;if(w!=="undirected"){if(D!=="out"){if(b=B(y,null,c,c.in,g),y&&b)return b;S.wrap(c.in)}if(D!=="in"){if(b=B(y,S,c,c.out,g),y&&b)return b;S.wrap(c.out)}}if(w!=="directed"&&(b=B(y,S,c,c.undirected,g),y&&b))return b}function _(y,w,D){var c=Object.keys(D),g=c.length,b=0;return new pe(function(){var S=null;do{if(b>=g)return y&&y.wrap(D),{done:!0};var k=D[c[b++]],U=k.source,te=k.target;S=U===w?te:U,y&&y.has(S.key)&&(S=null)}while(S===null);return{done:!1,value:{neighbor:S.key,attributes:S.attributes}}})}function M(y,w){var D=w.name,c=w.type,g=w.direction;y.prototype[D]=function(b){if(c!=="mixed"&&this.type!=="mixed"&&c!==this.type)return[];b=""+b;var S=this._nodes.get(b);if(S===void 0)throw new re("Graph.".concat(D,': could not find the "').concat(b,'" node in the graph.'));return function(k,U,te){if(k!=="mixed"){if(k==="undirected")return Object.keys(te.undirected);if(typeof U=="string")return Object.keys(te[U])}var ee=[];return v(!1,k,U,te,function(Y){ee.push(Y)}),ee}(c==="mixed"?this.type:c,g,S)}}function R(y,w){var D=w.name,c=w.type,g=w.direction,b=D.slice(0,-1)+"Entries";y.prototype[b]=function(S){if(c!=="mixed"&&this.type!=="mixed"&&c!==this.type)return pe.empty();S=""+S;var k=this._nodes.get(S);if(k===void 0)throw new re("Graph.".concat(b,': could not find the "').concat(S,'" node in the graph.'));return function(U,te,ee){if(U!=="mixed"){if(U==="undirected")return _(null,ee,ee.undirected);if(typeof te=="string")return _(null,ee,ee[te])}var Y=pe.empty(),ae=new F;return U!=="undirected"&&(te!=="out"&&(Y=o0(Y,_(ae,ee,ee.in))),te!=="in"&&(Y=o0(Y,_(ae,ee,ee.out)))),U!=="directed"&&(Y=o0(Y,_(ae,ee,ee.undirected))),Y}(c==="mixed"?this.type:c,g,k)}}function G(y,w,D,c,g){for(var b,S,k,U,te,ee,Y,ae=c._nodes.values(),le=c.type;(b=ae.next()).done!==!0;){var ke=!1;if(S=b.value,le!=="undirected")for(k in U=S.out){te=U[k];do{if(ee=te.target,ke=!0,Y=g(S.key,ee.key,S.attributes,ee.attributes,te.key,te.attributes,te.undirected),y&&Y)return te;te=te.next}while(te)}if(le!=="directed"){for(k in U=S.undirected)if(!(w&&S.key>k)){te=U[k];do{if((ee=te.target).key!==k&&(ee=te.source),ke=!0,Y=g(S.key,ee.key,S.attributes,ee.attributes,te.key,te.attributes,te.undirected),y&&Y)return te;te=te.next}while(te)}}if(D&&!ke&&(Y=g(S.key,null,S.attributes,null,null,null,null),y&&Y))return null}}function H(y){if(!h(y))throw new ue('Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.');if(!("key"in y))throw new ue("Graph.import: serialized node is missing its key.");if("attributes"in y&&(!h(y.attributes)||y.attributes===null))throw new ue("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}function X(y){if(!h(y))throw new ue('Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.');if(!("source"in y))throw new ue("Graph.import: serialized edge is missing its source.");if(!("target"in y))throw new ue("Graph.import: serialized edge is missing its target.");if("attributes"in y&&(!h(y.attributes)||y.attributes===null))throw new ue("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");if("undirected"in y&&typeof y.undirected!="boolean")throw new ue("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}F.prototype.wrap=function(y){this.A===null?this.A=y:this.B===null&&(this.B=y)},F.prototype.has=function(y){return this.A!==null&&y in this.A||this.B!==null&&y in this.B};var ge,Ne=(ge=255&Math.floor(256*Math.random()),function(){return ge++}),e0=new Set(["directed","undirected","mixed"]),ze=new Set(["domain","_events","_eventsCount","_maxListeners"]),E0={allowSelfLoops:!0,multi:!1,type:"mixed"};function u0(y,w,D){var c=new y.NodeDataClass(w,D);return y._nodes.set(w,c),y.emit("nodeAdded",{key:w,attributes:D}),c}function xt(y,w,D,c,g,b,S,k){if(!c&&y.type==="undirected")throw new fe("Graph.".concat(w,": you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead."));if(c&&y.type==="directed")throw new fe("Graph.".concat(w,": you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead."));if(k&&!h(k))throw new ue("Graph.".concat(w,': invalid attributes. Expecting an object but got "').concat(k,'"'));if(b=""+b,S=""+S,k=k||{},!y.allowSelfLoops&&b===S)throw new fe("Graph.".concat(w,': source & target are the same ("').concat(b,`"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`));var U=y._nodes.get(b),te=y._nodes.get(S);if(!U)throw new re("Graph.".concat(w,': source node "').concat(b,'" not found.'));if(!te)throw new re("Graph.".concat(w,': target node "').concat(S,'" not found.'));var ee={key:null,undirected:c,source:b,target:S,attributes:k};if(D)g=y._edgeKeyGenerator();else if(g=""+g,y._edges.has(g))throw new fe("Graph.".concat(w,': the "').concat(g,'" edge already exists in the graph.'));if(!y.multi&&(c?U.undirected[S]!==void 0:U.out[S]!==void 0))throw new fe("Graph.".concat(w,': an edge linking "').concat(b,'" to "').concat(S,`" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option.`));var Y=new l0(c,g,U,te,k);y._edges.set(g,Y);var ae=b===S;return c?(U.undirectedDegree++,te.undirectedDegree++,ae&&(U.undirectedLoops++,y._undirectedSelfLoopCount++)):(U.outDegree++,te.inDegree++,ae&&(U.directedLoops++,y._directedSelfLoopCount++)),y.multi?Y.attachMulti():Y.attach(),c?y._undirectedSize++:y._directedSize++,ee.key=g,y.emit("edgeAdded",ee),g}function Ze(y,w,D,c,g,b,S,k,U){if(!c&&y.type==="undirected")throw new fe("Graph.".concat(w,": you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead."));if(c&&y.type==="directed")throw new fe("Graph.".concat(w,": you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead."));if(k){if(U){if(typeof k!="function")throw new ue("Graph.".concat(w,': invalid updater function. Expecting a function but got "').concat(k,'"'))}else if(!h(k))throw new ue("Graph.".concat(w,': invalid attributes. Expecting an object but got "').concat(k,'"'))}var te;if(b=""+b,S=""+S,U&&(te=k,k=void 0),!y.allowSelfLoops&&b===S)throw new fe("Graph.".concat(w,': source & target are the same ("').concat(b,`"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`));var ee,Y,ae=y._nodes.get(b),le=y._nodes.get(S);if(!D&&(ee=y._edges.get(g))){if(!(ee.source.key===b&&ee.target.key===S||c&&ee.source.key===S&&ee.target.key===b))throw new fe("Graph.".concat(w,': inconsistency detected when attempting to merge the "').concat(g,'" edge with "').concat(b,'" source & "').concat(S,'" target vs. ("').concat(ee.source.key,'", "').concat(ee.target.key,'").'));Y=ee}if(Y||y.multi||!ae||(Y=c?ae.undirected[S]:ae.out[S]),Y){var ke=[Y.key,!1,!1,!1];if(U?!te:!k)return ke;if(U){var $e=Y.attributes;Y.attributes=te($e),y.emit("edgeAttributesUpdated",{type:"replace",key:Y.key,attributes:Y.attributes})}else l(Y.attributes,k),y.emit("edgeAttributesUpdated",{type:"merge",key:Y.key,attributes:Y.attributes,data:k});return ke}k=k||{},U&&te&&(k=te(k));var i0={key:null,undirected:c,source:b,target:S,attributes:k};if(D)g=y._edgeKeyGenerator();else if(g=""+g,y._edges.has(g))throw new fe("Graph.".concat(w,': the "').concat(g,'" edge already exists in the graph.'));var H0=!1,R0=!1;ae||(ae=u0(y,b,{}),H0=!0,b===S&&(le=ae,R0=!0)),le||(le=u0(y,S,{}),R0=!0),ee=new l0(c,g,ae,le,k),y._edges.set(g,ee);var It=b===S;return c?(ae.undirectedDegree++,le.undirectedDegree++,It&&(ae.undirectedLoops++,y._undirectedSelfLoopCount++)):(ae.outDegree++,le.inDegree++,It&&(ae.directedLoops++,y._directedSelfLoopCount++)),y.multi?ee.attachMulti():ee.attach(),c?y._undirectedSize++:y._directedSize++,i0.key=g,y.emit("edgeAdded",i0),[g,!0,H0,R0]}function lt(y,w){y._edges.delete(w.key);var D=w.source,c=w.target,g=w.attributes,b=w.undirected,S=D===c;b?(D.undirectedDegree--,c.undirectedDegree--,S&&(D.undirectedLoops--,y._undirectedSelfLoopCount--)):(D.outDegree--,c.inDegree--,S&&(D.directedLoops--,y._directedSelfLoopCount--)),y.multi?w.detachMulti():w.detach(),b?y._undirectedSize--:y._directedSize--,y.emit("edgeDropped",{key:w.key,attributes:g,source:D.key,target:c.key,undirected:b})}var Te=function(y){function w(c){var g;if(g=y.call(this)||this,typeof(c=l({},E0,c)).multi!="boolean")throw new ue(`Graph.constructor: invalid 'multi' option. Expecting a boolean but got "`.concat(c.multi,'".'));if(!e0.has(c.type))throw new ue(`Graph.constructor: invalid 'type' option. Should be one of "mixed", "directed" or "undirected" but got "`.concat(c.type,'".'));if(typeof c.allowSelfLoops!="boolean")throw new ue(`Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got "`.concat(c.allowSelfLoops,'".'));var b=c.type==="mixed"?at:c.type==="directed"?D0:M0;p(a(g),"NodeDataClass",b);var S="geid_"+Ne()+"_",k=0;return p(a(g),"_attributes",{}),p(a(g),"_nodes",new Map),p(a(g),"_edges",new Map),p(a(g),"_directedSize",0),p(a(g),"_undirectedSize",0),p(a(g),"_directedSelfLoopCount",0),p(a(g),"_undirectedSelfLoopCount",0),p(a(g),"_edgeKeyGenerator",function(){var U;do U=S+k++;while(g._edges.has(U));return U}),p(a(g),"_options",c),ze.forEach(function(U){return p(a(g),U,g[U])}),m(a(g),"order",function(){return g._nodes.size}),m(a(g),"size",function(){return g._edges.size}),m(a(g),"directedSize",function(){return g._directedSize}),m(a(g),"undirectedSize",function(){return g._undirectedSize}),m(a(g),"selfLoopCount",function(){return g._directedSelfLoopCount+g._undirectedSelfLoopCount}),m(a(g),"directedSelfLoopCount",function(){return g._directedSelfLoopCount}),m(a(g),"undirectedSelfLoopCount",function(){return g._undirectedSelfLoopCount}),m(a(g),"multi",g._options.multi),m(a(g),"type",g._options.type),m(a(g),"allowSelfLoops",g._options.allowSelfLoops),m(a(g),"implementation",function(){return"graphology"}),g}e(w,y);var D=w.prototype;return D._resetInstanceCounters=function(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0},D.hasNode=function(c){return this._nodes.has(""+c)},D.hasDirectedEdge=function(c,g){if(this.type==="undirected")return!1;if(arguments.length===1){var b=""+c,S=this._edges.get(b);return!!S&&!S.undirected}if(arguments.length===2){c=""+c,g=""+g;var k=this._nodes.get(c);return!!k&&k.out.hasOwnProperty(g)}throw new ue("Graph.hasDirectedEdge: invalid arity (".concat(arguments.length,", instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target."))},D.hasUndirectedEdge=function(c,g){if(this.type==="directed")return!1;if(arguments.length===1){var b=""+c,S=this._edges.get(b);return!!S&&S.undirected}if(arguments.length===2){c=""+c,g=""+g;var k=this._nodes.get(c);return!!k&&k.undirected.hasOwnProperty(g)}throw new ue("Graph.hasDirectedEdge: invalid arity (".concat(arguments.length,", instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target."))},D.hasEdge=function(c,g){if(arguments.length===1){var b=""+c;return this._edges.has(b)}if(arguments.length===2){c=""+c,g=""+g;var S=this._nodes.get(c);return!!S&&(S.out!==void 0&&S.out.hasOwnProperty(g)||S.undirected!==void 0&&S.undirected.hasOwnProperty(g))}throw new ue("Graph.hasEdge: invalid arity (".concat(arguments.length,", instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target."))},D.directedEdge=function(c,g){if(this.type!=="undirected"){if(c=""+c,g=""+g,this.multi)throw new fe("Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.");var b=this._nodes.get(c);if(!b)throw new re('Graph.directedEdge: could not find the "'.concat(c,'" source node in the graph.'));if(!this._nodes.has(g))throw new re('Graph.directedEdge: could not find the "'.concat(g,'" target node in the graph.'));var S=b.out&&b.out[g]||void 0;return S?S.key:void 0}},D.undirectedEdge=function(c,g){if(this.type!=="directed"){if(c=""+c,g=""+g,this.multi)throw new fe("Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.");var b=this._nodes.get(c);if(!b)throw new re('Graph.undirectedEdge: could not find the "'.concat(c,'" source node in the graph.'));if(!this._nodes.has(g))throw new re('Graph.undirectedEdge: could not find the "'.concat(g,'" target node in the graph.'));var S=b.undirected&&b.undirected[g]||void 0;return S?S.key:void 0}},D.edge=function(c,g){if(this.multi)throw new fe("Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.");c=""+c,g=""+g;var b=this._nodes.get(c);if(!b)throw new re('Graph.edge: could not find the "'.concat(c,'" source node in the graph.'));if(!this._nodes.has(g))throw new re('Graph.edge: could not find the "'.concat(g,'" target node in the graph.'));var S=b.out&&b.out[g]||b.undirected&&b.undirected[g]||void 0;if(S)return S.key},D.areDirectedNeighbors=function(c,g){c=""+c,g=""+g;var b=this._nodes.get(c);if(!b)throw new re('Graph.areDirectedNeighbors: could not find the "'.concat(c,'" node in the graph.'));return this.type!=="undirected"&&(g in b.in||g in b.out)},D.areOutNeighbors=function(c,g){c=""+c,g=""+g;var b=this._nodes.get(c);if(!b)throw new re('Graph.areOutNeighbors: could not find the "'.concat(c,'" node in the graph.'));return this.type!=="undirected"&&g in b.out},D.areInNeighbors=function(c,g){c=""+c,g=""+g;var b=this._nodes.get(c);if(!b)throw new re('Graph.areInNeighbors: could not find the "'.concat(c,'" node in the graph.'));return this.type!=="undirected"&&g in b.in},D.areUndirectedNeighbors=function(c,g){c=""+c,g=""+g;var b=this._nodes.get(c);if(!b)throw new re('Graph.areUndirectedNeighbors: could not find the "'.concat(c,'" node in the graph.'));return this.type!=="directed"&&g in b.undirected},D.areNeighbors=function(c,g){c=""+c,g=""+g;var b=this._nodes.get(c);if(!b)throw new re('Graph.areNeighbors: could not find the "'.concat(c,'" node in the graph.'));return this.type!=="undirected"&&(g in b.in||g in b.out)||this.type!=="directed"&&g in b.undirected},D.areInboundNeighbors=function(c,g){c=""+c,g=""+g;var b=this._nodes.get(c);if(!b)throw new re('Graph.areInboundNeighbors: could not find the "'.concat(c,'" node in the graph.'));return this.type!=="undirected"&&g in b.in||this.type!=="directed"&&g in b.undirected},D.areOutboundNeighbors=function(c,g){c=""+c,g=""+g;var b=this._nodes.get(c);if(!b)throw new re('Graph.areOutboundNeighbors: could not find the "'.concat(c,'" node in the graph.'));return this.type!=="undirected"&&g in b.out||this.type!=="directed"&&g in b.undirected},D.inDegree=function(c){c=""+c;var g=this._nodes.get(c);if(!g)throw new re('Graph.inDegree: could not find the "'.concat(c,'" node in the graph.'));return this.type==="undirected"?0:g.inDegree},D.outDegree=function(c){c=""+c;var g=this._nodes.get(c);if(!g)throw new re('Graph.outDegree: could not find the "'.concat(c,'" node in the graph.'));return this.type==="undirected"?0:g.outDegree},D.directedDegree=function(c){c=""+c;var g=this._nodes.get(c);if(!g)throw new re('Graph.directedDegree: could not find the "'.concat(c,'" node in the graph.'));return this.type==="undirected"?0:g.inDegree+g.outDegree},D.undirectedDegree=function(c){c=""+c;var g=this._nodes.get(c);if(!g)throw new re('Graph.undirectedDegree: could not find the "'.concat(c,'" node in the graph.'));return this.type==="directed"?0:g.undirectedDegree},D.inboundDegree=function(c){c=""+c;var g=this._nodes.get(c);if(!g)throw new re('Graph.inboundDegree: could not find the "'.concat(c,'" node in the graph.'));var b=0;return this.type!=="directed"&&(b+=g.undirectedDegree),this.type!=="undirected"&&(b+=g.inDegree),b},D.outboundDegree=function(c){c=""+c;var g=this._nodes.get(c);if(!g)throw new re('Graph.outboundDegree: could not find the "'.concat(c,'" node in the graph.'));var b=0;return this.type!=="directed"&&(b+=g.undirectedDegree),this.type!=="undirected"&&(b+=g.outDegree),b},D.degree=function(c){c=""+c;var g=this._nodes.get(c);if(!g)throw new re('Graph.degree: could not find the "'.concat(c,'" node in the graph.'));var b=0;return this.type!=="directed"&&(b+=g.undirectedDegree),this.type!=="undirected"&&(b+=g.inDegree+g.outDegree),b},D.inDegreeWithoutSelfLoops=function(c){c=""+c;var g=this._nodes.get(c);if(!g)throw new re('Graph.inDegreeWithoutSelfLoops: could not find the "'.concat(c,'" node in the graph.'));return this.type==="undirected"?0:g.inDegree-g.directedLoops},D.outDegreeWithoutSelfLoops=function(c){c=""+c;var g=this._nodes.get(c);if(!g)throw new re('Graph.outDegreeWithoutSelfLoops: could not find the "'.concat(c,'" node in the graph.'));return this.type==="undirected"?0:g.outDegree-g.directedLoops},D.directedDegreeWithoutSelfLoops=function(c){c=""+c;var g=this._nodes.get(c);if(!g)throw new re('Graph.directedDegreeWithoutSelfLoops: could not find the "'.concat(c,'" node in the graph.'));return this.type==="undirected"?0:g.inDegree+g.outDegree-2*g.directedLoops},D.undirectedDegreeWithoutSelfLoops=function(c){c=""+c;var g=this._nodes.get(c);if(!g)throw new re('Graph.undirectedDegreeWithoutSelfLoops: could not find the "'.concat(c,'" node in the graph.'));return this.type==="directed"?0:g.undirectedDegree-2*g.undirectedLoops},D.inboundDegreeWithoutSelfLoops=function(c){c=""+c;var g=this._nodes.get(c);if(!g)throw new re('Graph.inboundDegreeWithoutSelfLoops: could not find the "'.concat(c,'" node in the graph.'));var b=0,S=0;return this.type!=="directed"&&(b+=g.undirectedDegree,S+=2*g.undirectedLoops),this.type!=="undirected"&&(b+=g.inDegree,S+=g.directedLoops),b-S},D.outboundDegreeWithoutSelfLoops=function(c){c=""+c;var g=this._nodes.get(c);if(!g)throw new re('Graph.outboundDegreeWithoutSelfLoops: could not find the "'.concat(c,'" node in the graph.'));var b=0,S=0;return this.type!=="directed"&&(b+=g.undirectedDegree,S+=2*g.undirectedLoops),this.type!=="undirected"&&(b+=g.outDegree,S+=g.directedLoops),b-S},D.degreeWithoutSelfLoops=function(c){c=""+c;var g=this._nodes.get(c);if(!g)throw new re('Graph.degreeWithoutSelfLoops: could not find the "'.concat(c,'" node in the graph.'));var b=0,S=0;return this.type!=="directed"&&(b+=g.undirectedDegree,S+=2*g.undirectedLoops),this.type!=="undirected"&&(b+=g.inDegree+g.outDegree,S+=2*g.directedLoops),b-S},D.source=function(c){c=""+c;var g=this._edges.get(c);if(!g)throw new re('Graph.source: could not find the "'.concat(c,'" edge in the graph.'));return g.source.key},D.target=function(c){c=""+c;var g=this._edges.get(c);if(!g)throw new re('Graph.target: could not find the "'.concat(c,'" edge in the graph.'));return g.target.key},D.extremities=function(c){c=""+c;var g=this._edges.get(c);if(!g)throw new re('Graph.extremities: could not find the "'.concat(c,'" edge in the graph.'));return[g.source.key,g.target.key]},D.opposite=function(c,g){c=""+c,g=""+g;var b=this._edges.get(g);if(!b)throw new re('Graph.opposite: could not find the "'.concat(g,'" edge in the graph.'));var S=b.source.key,k=b.target.key;if(c===S)return k;if(c===k)return S;throw new re('Graph.opposite: the "'.concat(c,'" node is not attached to the "').concat(g,'" edge (').concat(S,", ").concat(k,")."))},D.hasExtremity=function(c,g){c=""+c,g=""+g;var b=this._edges.get(c);if(!b)throw new re('Graph.hasExtremity: could not find the "'.concat(c,'" edge in the graph.'));return b.source.key===g||b.target.key===g},D.isUndirected=function(c){c=""+c;var g=this._edges.get(c);if(!g)throw new re('Graph.isUndirected: could not find the "'.concat(c,'" edge in the graph.'));return g.undirected},D.isDirected=function(c){c=""+c;var g=this._edges.get(c);if(!g)throw new re('Graph.isDirected: could not find the "'.concat(c,'" edge in the graph.'));return!g.undirected},D.isSelfLoop=function(c){c=""+c;var g=this._edges.get(c);if(!g)throw new re('Graph.isSelfLoop: could not find the "'.concat(c,'" edge in the graph.'));return g.source===g.target},D.addNode=function(c,g){var b=function(S,k,U){if(U&&!h(U))throw new ue('Graph.addNode: invalid attributes. Expecting an object but got "'.concat(U,'"'));if(k=""+k,U=U||{},S._nodes.has(k))throw new fe('Graph.addNode: the "'.concat(k,'" node already exist in the graph.'));var te=new S.NodeDataClass(k,U);return S._nodes.set(k,te),S.emit("nodeAdded",{key:k,attributes:U}),te}(this,c,g);return b.key},D.mergeNode=function(c,g){if(g&&!h(g))throw new ue('Graph.mergeNode: invalid attributes. Expecting an object but got "'.concat(g,'"'));c=""+c,g=g||{};var b=this._nodes.get(c);return b?(g&&(l(b.attributes,g),this.emit("nodeAttributesUpdated",{type:"merge",key:c,attributes:b.attributes,data:g})),[c,!1]):(b=new this.NodeDataClass(c,g),this._nodes.set(c,b),this.emit("nodeAdded",{key:c,attributes:g}),[c,!0])},D.updateNode=function(c,g){if(g&&typeof g!="function")throw new ue('Graph.updateNode: invalid updater function. Expecting a function but got "'.concat(g,'"'));c=""+c;var b=this._nodes.get(c);if(b){if(g){var S=b.attributes;b.attributes=g(S),this.emit("nodeAttributesUpdated",{type:"replace",key:c,attributes:b.attributes})}return[c,!1]}var k=g?g({}):{};return b=new this.NodeDataClass(c,k),this._nodes.set(c,b),this.emit("nodeAdded",{key:c,attributes:k}),[c,!0]},D.dropNode=function(c){c=""+c;var g,b=this._nodes.get(c);if(!b)throw new re('Graph.dropNode: could not find the "'.concat(c,'" node in the graph.'));if(this.type!=="undirected"){for(var S in b.out){g=b.out[S];do lt(this,g),g=g.next;while(g)}for(var k in b.in){g=b.in[k];do lt(this,g),g=g.next;while(g)}}if(this.type!=="directed")for(var U in b.undirected){g=b.undirected[U];do lt(this,g),g=g.next;while(g)}this._nodes.delete(c),this.emit("nodeDropped",{key:c,attributes:b.attributes})},D.dropEdge=function(c){var g;if(arguments.length>1){var b=""+arguments[0],S=""+arguments[1];if(!(g=u(this,b,S,this.type)))throw new re('Graph.dropEdge: could not find the "'.concat(b,'" -> "').concat(S,'" edge in the graph.'))}else if(c=""+c,!(g=this._edges.get(c)))throw new re('Graph.dropEdge: could not find the "'.concat(c,'" edge in the graph.'));return lt(this,g),this},D.dropDirectedEdge=function(c,g){if(arguments.length<2)throw new fe("Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new fe("Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");var b=u(this,c=""+c,g=""+g,"directed");if(!b)throw new re('Graph.dropDirectedEdge: could not find a "'.concat(c,'" -> "').concat(g,'" edge in the graph.'));return lt(this,b),this},D.dropUndirectedEdge=function(c,g){if(arguments.length<2)throw new fe("Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new fe("Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");var b=u(this,c,g,"undirected");if(!b)throw new re('Graph.dropUndirectedEdge: could not find a "'.concat(c,'" -> "').concat(g,'" edge in the graph.'));return lt(this,b),this},D.clear=function(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit("cleared")},D.clearEdges=function(){for(var c,g=this._nodes.values();(c=g.next()).done!==!0;)c.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit("edgesCleared")},D.getAttribute=function(c){return this._attributes[c]},D.getAttributes=function(){return this._attributes},D.hasAttribute=function(c){return this._attributes.hasOwnProperty(c)},D.setAttribute=function(c,g){return this._attributes[c]=g,this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:c}),this},D.updateAttribute=function(c,g){if(typeof g!="function")throw new ue("Graph.updateAttribute: updater should be a function.");var b=this._attributes[c];return this._attributes[c]=g(b),this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:c}),this},D.removeAttribute=function(c){return delete this._attributes[c],this.emit("attributesUpdated",{type:"remove",attributes:this._attributes,name:c}),this},D.replaceAttributes=function(c){if(!h(c))throw new ue("Graph.replaceAttributes: provided attributes are not a plain object.");return this._attributes=c,this.emit("attributesUpdated",{type:"replace",attributes:this._attributes}),this},D.mergeAttributes=function(c){if(!h(c))throw new ue("Graph.mergeAttributes: provided attributes are not a plain object.");return l(this._attributes,c),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:c}),this},D.updateAttributes=function(c){if(typeof c!="function")throw new ue("Graph.updateAttributes: provided updater is not a function.");return this._attributes=c(this._attributes),this.emit("attributesUpdated",{type:"update",attributes:this._attributes}),this},D.updateEachNodeAttributes=function(c,g){if(typeof c!="function")throw new ue("Graph.updateEachNodeAttributes: expecting an updater function.");if(g&&!x(g))throw new ue("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");for(var b,S,k=this._nodes.values();(b=k.next()).done!==!0;)(S=b.value).attributes=c(S.key,S.attributes);this.emit("eachNodeAttributesUpdated",{hints:g||null})},D.updateEachEdgeAttributes=function(c,g){if(typeof c!="function")throw new ue("Graph.updateEachEdgeAttributes: expecting an updater function.");if(g&&!x(g))throw new ue("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");for(var b,S,k,U,te=this._edges.values();(b=te.next()).done!==!0;)k=(S=b.value).source,U=S.target,S.attributes=c(S.key,S.attributes,k.key,U.key,k.attributes,U.attributes,S.undirected);this.emit("eachEdgeAttributesUpdated",{hints:g||null})},D.forEachAdjacencyEntry=function(c){if(typeof c!="function")throw new ue("Graph.forEachAdjacencyEntry: expecting a callback.");G(!1,!1,!1,this,c)},D.forEachAdjacencyEntryWithOrphans=function(c){if(typeof c!="function")throw new ue("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");G(!1,!1,!0,this,c)},D.forEachAssymetricAdjacencyEntry=function(c){if(typeof c!="function")throw new ue("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");G(!1,!0,!1,this,c)},D.forEachAssymetricAdjacencyEntryWithOrphans=function(c){if(typeof c!="function")throw new ue("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");G(!1,!0,!0,this,c)},D.nodes=function(){return typeof Array.from=="function"?Array.from(this._nodes.keys()):ot(this._nodes.keys(),this._nodes.size)},D.forEachNode=function(c){if(typeof c!="function")throw new ue("Graph.forEachNode: expecting a callback.");for(var g,b,S=this._nodes.values();(g=S.next()).done!==!0;)c((b=g.value).key,b.attributes)},D.findNode=function(c){if(typeof c!="function")throw new ue("Graph.findNode: expecting a callback.");for(var g,b,S=this._nodes.values();(g=S.next()).done!==!0;)if(c((b=g.value).key,b.attributes))return b.key},D.mapNodes=function(c){if(typeof c!="function")throw new ue("Graph.mapNode: expecting a callback.");for(var g,b,S=this._nodes.values(),k=new Array(this.order),U=0;(g=S.next()).done!==!0;)b=g.value,k[U++]=c(b.key,b.attributes);return k},D.someNode=function(c){if(typeof c!="function")throw new ue("Graph.someNode: expecting a callback.");for(var g,b,S=this._nodes.values();(g=S.next()).done!==!0;)if(c((b=g.value).key,b.attributes))return!0;return!1},D.everyNode=function(c){if(typeof c!="function")throw new ue("Graph.everyNode: expecting a callback.");for(var g,b,S=this._nodes.values();(g=S.next()).done!==!0;)if(!c((b=g.value).key,b.attributes))return!1;return!0},D.filterNodes=function(c){if(typeof c!="function")throw new ue("Graph.filterNodes: expecting a callback.");for(var g,b,S=this._nodes.values(),k=[];(g=S.next()).done!==!0;)c((b=g.value).key,b.attributes)&&k.push(b.key);return k},D.reduceNodes=function(c,g){if(typeof c!="function")throw new ue("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new ue("Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.");for(var b,S,k=g,U=this._nodes.values();(b=U.next()).done!==!0;)k=c(k,(S=b.value).key,S.attributes);return k},D.nodeEntries=function(){var c=this._nodes.values();return new pe(function(){var g=c.next();if(g.done)return g;var b=g.value;return{value:{node:b.key,attributes:b.attributes},done:!1}})},D.export=function(){var c=this,g=new Array(this._nodes.size),b=0;this._nodes.forEach(function(k,U){g[b++]=function(te,ee){var Y={key:te};return d(ee.attributes)||(Y.attributes=l({},ee.attributes)),Y}(U,k)});var S=new Array(this._edges.size);return b=0,this._edges.forEach(function(k,U){S[b++]=function(te,ee,Y){var ae={key:ee,source:Y.source.key,target:Y.target.key};return d(Y.attributes)||(ae.attributes=l({},Y.attributes)),te==="mixed"&&Y.undirected&&(ae.undirected=!0),ae}(c.type,U,k)}),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:g,edges:S}},D.import=function(c){var g,b,S,k,U,te=this,ee=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(c instanceof w)return c.forEachNode(function(kt,hr){ee?te.mergeNode(kt,hr):te.addNode(kt,hr)}),c.forEachEdge(function(kt,hr,Fl,Al,pD,fD,S8){ee?S8?te.mergeUndirectedEdgeWithKey(kt,Fl,Al,hr):te.mergeDirectedEdgeWithKey(kt,Fl,Al,hr):S8?te.addUndirectedEdgeWithKey(kt,Fl,Al,hr):te.addDirectedEdgeWithKey(kt,Fl,Al,hr)}),this;if(!h(c))throw new ue("Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.");if(c.attributes){if(!h(c.attributes))throw new ue("Graph.import: invalid attributes. Expecting a plain object.");ee?this.mergeAttributes(c.attributes):this.replaceAttributes(c.attributes)}if(c.nodes){if(S=c.nodes,!Array.isArray(S))throw new ue("Graph.import: invalid nodes. Expecting an array.");for(g=0,b=S.length;g<b;g++){H(k=S[g]);var Y=k,ae=Y.key,le=Y.attributes;ee?this.mergeNode(ae,le):this.addNode(ae,le)}}if(c.edges){var ke=!1;if(this.type==="undirected"&&(ke=!0),S=c.edges,!Array.isArray(S))throw new ue("Graph.import: invalid edges. Expecting an array.");for(g=0,b=S.length;g<b;g++){X(U=S[g]);var $e=U,i0=$e.source,H0=$e.target,R0=$e.attributes,It=$e.undirected,Yt=It===void 0?ke:It;"key"in U?(ee?Yt?this.mergeUndirectedEdgeWithKey:this.mergeDirectedEdgeWithKey:Yt?this.addUndirectedEdgeWithKey:this.addDirectedEdgeWithKey).call(this,U.key,i0,H0,R0):(ee?Yt?this.mergeUndirectedEdge:this.mergeDirectedEdge:Yt?this.addUndirectedEdge:this.addDirectedEdge).call(this,i0,H0,R0)}}return this},D.nullCopy=function(c){var g=new w(l({},this._options,c));return g.replaceAttributes(l({},this.getAttributes())),g},D.emptyCopy=function(c){var g=this.nullCopy(c);return this._nodes.forEach(function(b,S){var k=l({},b.attributes);b=new g.NodeDataClass(S,k),g._nodes.set(S,b)}),g},D.copy=function(c){if(typeof(c=c||{}).type=="string"&&c.type!==this.type&&c.type!=="mixed")throw new fe('Graph.copy: cannot create an incompatible copy from "'.concat(this.type,'" type to "').concat(c.type,'" because this would mean losing information about the current graph.'));if(typeof c.multi=="boolean"&&c.multi!==this.multi&&c.multi!==!0)throw new fe("Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.");if(typeof c.allowSelfLoops=="boolean"&&c.allowSelfLoops!==this.allowSelfLoops&&c.allowSelfLoops!==!0)throw new fe("Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not because this would mean losing information about the current graph.");for(var g,b,S=this.emptyCopy(c),k=this._edges.values();(g=k.next()).done!==!0;)xt(S,"copy",!1,(b=g.value).undirected,b.key,b.source.key,b.target.key,l({},b.attributes));return S},D.toJSON=function(){return this.export()},D.toString=function(){return"[object Graph]"},D.inspect=function(){var c=this,g={};this._nodes.forEach(function(te,ee){g[ee]=te.attributes});var b={},S={};this._edges.forEach(function(te,ee){var Y,ae=te.undirected?"--":"->",le="",ke=te.source.key,$e=te.target.key;te.undirected&&ke>$e&&(Y=ke,ke=$e,$e=Y);var i0="(".concat(ke,")").concat(ae,"(").concat($e,")");ee.startsWith("geid_")?c.multi&&(S[i0]===void 0?S[i0]=0:S[i0]++,le+="".concat(S[i0],". ")):le+="[".concat(ee,"]: "),b[le+=i0]=te.attributes});var k={};for(var U in this)this.hasOwnProperty(U)&&!ze.has(U)&&typeof this[U]!="function"&&r(U)!=="symbol"&&(k[U]=this[U]);return k.attributes=this._attributes,k.nodes=g,k.edges=b,p(k,"constructor",this.constructor),k},w}(A.exports.EventEmitter);typeof Symbol<"u"&&(Te.prototype[Symbol.for("nodejs.util.inspect.custom")]=Te.prototype.inspect),[{name:function(y){return"".concat(y,"Edge")},generateKey:!0},{name:function(y){return"".concat(y,"DirectedEdge")},generateKey:!0,type:"directed"},{name:function(y){return"".concat(y,"UndirectedEdge")},generateKey:!0,type:"undirected"},{name:function(y){return"".concat(y,"EdgeWithKey")}},{name:function(y){return"".concat(y,"DirectedEdgeWithKey")},type:"directed"},{name:function(y){return"".concat(y,"UndirectedEdgeWithKey")},type:"undirected"}].forEach(function(y){["add","merge","update"].forEach(function(w){var D=y.name(w),c=w==="add"?xt:Ze;y.generateKey?Te.prototype[D]=function(g,b,S){return c(this,D,!0,(y.type||this.type)==="undirected",null,g,b,S,w==="update")}:Te.prototype[D]=function(g,b,S,k){return c(this,D,!1,(y.type||this.type)==="undirected",g,b,S,k,w==="update")}})}),function(y){V0.forEach(function(w){var D=w.name,c=w.attacher;c(y,D("Node"),0),c(y,D("Source"),1),c(y,D("Target"),2),c(y,D("Opposite"),3)})}(Te),function(y){P0.forEach(function(w){var D=w.name,c=w.attacher;c(y,D("Edge"),"mixed"),c(y,D("DirectedEdge"),"directed"),c(y,D("UndirectedEdge"),"undirected")})}(Te),function(y){fs.forEach(function(w){(function(D,c){var g=c.name,b=c.type,S=c.direction;D.prototype[g]=function(k,U){if(b!=="mixed"&&this.type!=="mixed"&&b!==this.type)return[];if(!arguments.length)return ys(this,b);if(arguments.length===1){k=""+k;var te=this._nodes.get(k);if(te===void 0)throw new re("Graph.".concat(g,': could not find the "').concat(k,'" node in the graph.'));return Lo(this.multi,b==="mixed"?this.type:b,S,te)}if(arguments.length===2){k=""+k,U=""+U;var ee=this._nodes.get(k);if(!ee)throw new re("Graph.".concat(g,': could not find the "').concat(k,'" source node in the graph.'));if(!this._nodes.has(U))throw new re("Graph.".concat(g,': could not find the "').concat(U,'" target node in the graph.'));return vs(b,this.multi,S,ee,U)}throw new ue("Graph.".concat(g,": too many arguments (expecting 0, 1 or 2 and got ").concat(arguments.length,")."))}})(y,w),function(D,c){var g=c.name,b=c.type,S=c.direction,k="forEach"+g[0].toUpperCase()+g.slice(1,-1);D.prototype[k]=function(Y,ae,le){if(b==="mixed"||this.type==="mixed"||b===this.type){if(arguments.length===1)return on(!1,this,b,le=Y);if(arguments.length===2){Y=""+Y,le=ae;var ke=this._nodes.get(Y);if(ke===void 0)throw new re("Graph.".concat(k,': could not find the "').concat(Y,'" node in the graph.'));return xs(!1,this.multi,b==="mixed"?this.type:b,S,ke,le)}if(arguments.length===3){Y=""+Y,ae=""+ae;var $e=this._nodes.get(Y);if(!$e)throw new re("Graph.".concat(k,': could not find the "').concat(Y,'" source node in the graph.'));if(!this._nodes.has(ae))throw new re("Graph.".concat(k,': could not find the "').concat(ae,'" target node in the graph.'));return ki(!1,b,this.multi,S,$e,ae,le)}throw new ue("Graph.".concat(k,": too many arguments (expecting 1, 2 or 3 and got ").concat(arguments.length,")."))}};var U="map"+g[0].toUpperCase()+g.slice(1);D.prototype[U]=function(){var Y,ae=Array.prototype.slice.call(arguments),le=ae.pop();if(ae.length===0){var ke=0;b!=="directed"&&(ke+=this.undirectedSize),b!=="undirected"&&(ke+=this.directedSize),Y=new Array(ke);var $e=0;ae.push(function(i0,H0,R0,It,Yt,kt,hr){Y[$e++]=le(i0,H0,R0,It,Yt,kt,hr)})}else Y=[],ae.push(function(i0,H0,R0,It,Yt,kt,hr){Y.push(le(i0,H0,R0,It,Yt,kt,hr))});return this[k].apply(this,ae),Y};var te="filter"+g[0].toUpperCase()+g.slice(1);D.prototype[te]=function(){var Y=Array.prototype.slice.call(arguments),ae=Y.pop(),le=[];return Y.push(function(ke,$e,i0,H0,R0,It,Yt){ae(ke,$e,i0,H0,R0,It,Yt)&&le.push(ke)}),this[k].apply(this,Y),le};var ee="reduce"+g[0].toUpperCase()+g.slice(1);D.prototype[ee]=function(){var Y,ae,le=Array.prototype.slice.call(arguments);if(le.length<2||le.length>4)throw new ue("Graph.".concat(ee,": invalid number of arguments (expecting 2, 3 or 4 and got ").concat(le.length,")."));if(typeof le[le.length-1]=="function"&&typeof le[le.length-2]!="function")throw new ue("Graph.".concat(ee,": missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array."));le.length===2?(Y=le[0],ae=le[1],le=[]):le.length===3?(Y=le[1],ae=le[2],le=[le[0]]):le.length===4&&(Y=le[2],ae=le[3],le=[le[0],le[1]]);var ke=ae;return le.push(function($e,i0,H0,R0,It,Yt,kt){ke=Y(ke,$e,i0,H0,R0,It,Yt,kt)}),this[k].apply(this,le),ke}}(y,w),function(D,c){var g=c.name,b=c.type,S=c.direction,k="find"+g[0].toUpperCase()+g.slice(1,-1);D.prototype[k]=function(ee,Y,ae){if(b!=="mixed"&&this.type!=="mixed"&&b!==this.type)return!1;if(arguments.length===1)return on(!0,this,b,ae=ee);if(arguments.length===2){ee=""+ee,ae=Y;var le=this._nodes.get(ee);if(le===void 0)throw new re("Graph.".concat(k,': could not find the "').concat(ee,'" node in the graph.'));return xs(!0,this.multi,b==="mixed"?this.type:b,S,le,ae)}if(arguments.length===3){ee=""+ee,Y=""+Y;var ke=this._nodes.get(ee);if(!ke)throw new re("Graph.".concat(k,': could not find the "').concat(ee,'" source node in the graph.'));if(!this._nodes.has(Y))throw new re("Graph.".concat(k,': could not find the "').concat(Y,'" target node in the graph.'));return ki(!0,b,this.multi,S,ke,Y,ae)}throw new ue("Graph.".concat(k,": too many arguments (expecting 1, 2 or 3 and got ").concat(arguments.length,")."))};var U="some"+g[0].toUpperCase()+g.slice(1,-1);D.prototype[U]=function(){var ee=Array.prototype.slice.call(arguments),Y=ee.pop();return ee.push(function(ae,le,ke,$e,i0,H0,R0){return Y(ae,le,ke,$e,i0,H0,R0)}),!!this[k].apply(this,ee)};var te="every"+g[0].toUpperCase()+g.slice(1,-1);D.prototype[te]=function(){var ee=Array.prototype.slice.call(arguments),Y=ee.pop();return ee.push(function(ae,le,ke,$e,i0,H0,R0){return!Y(ae,le,ke,$e,i0,H0,R0)}),!this[k].apply(this,ee)}}(y,w),function(D,c){var g=c.name,b=c.type,S=c.direction,k=g.slice(0,-1)+"Entries";D.prototype[k]=function(U,te){if(b!=="mixed"&&this.type!=="mixed"&&b!==this.type)return pe.empty();if(!arguments.length)return Ro(this,b);if(arguments.length===1){U=""+U;var ee=this._nodes.get(U);if(!ee)throw new re("Graph.".concat(k,': could not find the "').concat(U,'" node in the graph.'));return an(b,S,ee)}if(arguments.length===2){U=""+U,te=""+te;var Y=this._nodes.get(U);if(!Y)throw new re("Graph.".concat(k,': could not find the "').concat(U,'" source node in the graph.'));if(!this._nodes.has(te))throw new re("Graph.".concat(k,': could not find the "').concat(te,'" target node in the graph.'));return Ds(b,S,Y,te)}throw new ue("Graph.".concat(k,": too many arguments (expecting 0, 1 or 2 and got ").concat(arguments.length,")."))}}(y,w)})}(Te),function(y){ln.forEach(function(w){M(y,w),function(D,c){var g=c.name,b=c.type,S=c.direction,k="forEach"+g[0].toUpperCase()+g.slice(1,-1);D.prototype[k]=function(Y,ae){if(b==="mixed"||this.type==="mixed"||b===this.type){Y=""+Y;var le=this._nodes.get(Y);if(le===void 0)throw new re("Graph.".concat(k,': could not find the "').concat(Y,'" node in the graph.'));v(!1,b==="mixed"?this.type:b,S,le,ae)}};var U="map"+g[0].toUpperCase()+g.slice(1);D.prototype[U]=function(Y,ae){var le=[];return this[k](Y,function(ke,$e){le.push(ae(ke,$e))}),le};var te="filter"+g[0].toUpperCase()+g.slice(1);D.prototype[te]=function(Y,ae){var le=[];return this[k](Y,function(ke,$e){ae(ke,$e)&&le.push(ke)}),le};var ee="reduce"+g[0].toUpperCase()+g.slice(1);D.prototype[ee]=function(Y,ae,le){if(arguments.length<3)throw new ue("Graph.".concat(ee,": missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array."));var ke=le;return this[k](Y,function($e,i0){ke=ae(ke,$e,i0)}),ke}}(y,w),function(D,c){var g=c.name,b=c.type,S=c.direction,k=g[0].toUpperCase()+g.slice(1,-1),U="find"+k;D.prototype[U]=function(Y,ae){if(b==="mixed"||this.type==="mixed"||b===this.type){Y=""+Y;var le=this._nodes.get(Y);if(le===void 0)throw new re("Graph.".concat(U,': could not find the "').concat(Y,'" node in the graph.'));return v(!0,b==="mixed"?this.type:b,S,le,ae)}};var te="some"+k;D.prototype[te]=function(Y,ae){return!!this[U](Y,ae)};var ee="every"+k;D.prototype[ee]=function(Y,ae){return!this[U](Y,function(le,ke){return!ae(le,ke)})}}(y,w),R(y,w)})}(Te);var z0=function(y){function w(D){var c=l({type:"directed"},D);if("multi"in c&&c.multi!==!1)throw new ue("DirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(c.type!=="directed")throw new ue('DirectedGraph.from: inconsistent "'+c.type+'" type in given options!');return y.call(this,c)||this}return e(w,y),w}(Te),et=function(y){function w(D){var c=l({type:"undirected"},D);if("multi"in c&&c.multi!==!1)throw new ue("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(c.type!=="undirected")throw new ue('UndirectedGraph.from: inconsistent "'+c.type+'" type in given options!');return y.call(this,c)||this}return e(w,y),w}(Te),W0=function(y){function w(D){var c=l({multi:!0},D);if("multi"in c&&c.multi!==!0)throw new ue("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");return y.call(this,c)||this}return e(w,y),w}(Te),ei=function(y){function w(D){var c=l({type:"directed",multi:!0},D);if("multi"in c&&c.multi!==!0)throw new ue("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(c.type!=="directed")throw new ue('MultiDirectedGraph.from: inconsistent "'+c.type+'" type in given options!');return y.call(this,c)||this}return e(w,y),w}(Te),ti=function(y){function w(D){var c=l({type:"undirected",multi:!0},D);if("multi"in c&&c.multi!==!0)throw new ue("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(c.type!=="undirected")throw new ue('MultiUndirectedGraph.from: inconsistent "'+c.type+'" type in given options!');return y.call(this,c)||this}return e(w,y),w}(Te);function un(y){y.from=function(w,D){var c=l({},w.options,D),g=new y(c);return g.import(w),g}}return un(Te),un(z0),un(et),un(W0),un(ei),un(ti),Te.Graph=Te,Te.DirectedGraph=z0,Te.UndirectedGraph=et,Te.MultiGraph=W0,Te.MultiDirectedGraph=ei,Te.MultiUndirectedGraph=ti,Te.InvalidArgumentsGraphError=ue,Te.NotFoundGraphError=re,Te.UsageGraphError=fe,Te})});var x0=Ie((_Q,J7)=>{J7.exports=function(e){return e!==null&&typeof e=="object"&&typeof e.addUndirectedEdgeWithKey=="function"&&typeof e.dropNode=="function"&&typeof e.multi=="boolean"}});var Wd=Ie((CQ,e3)=>{function ls(r){this.graph=r,this.stack=new Array(r.order),this.seen=new Set,this.size=0}ls.prototype.hasAlreadySeenEverything=function(){return this.seen.size===this.graph.order};ls.prototype.countUnseenNodes=function(){return this.graph.order-this.seen.size};ls.prototype.forEachNodeYetUnseen=function(r){var e=this.seen,t=this.graph;t.someNode(function(i,s){if(e.size===t.order)return!0;if(e.has(i))return!1;var n=r(i,s);return!!n})};ls.prototype.has=function(r){return this.seen.has(r)};ls.prototype.push=function(r){var e=this.seen.size;return this.seen.add(r),e===this.seen.size?!1:(this.stack[this.size++]=r,!0)};ls.prototype.pushWith=function(r,e){var t=this.seen.size;return this.seen.add(r),t===this.seen.size?!1:(this.stack[this.size++]=e,!0)};ls.prototype.pop=function(){if(this.size!==0)return this.stack[--this.size]};e3.exports=ls});var t3=Ie(Hd=>{function _x(r,e,t){this.node=r,this.attributes=e,this.depth=t}function Cx(r){return r[0].toUpperCase()+r.slice(1)}Hd.TraversalRecord=_x;Hd.capitalize=Cx});var n3=Ie(jd=>{var Tx=x0(),Fx=Wd(),i3=t3(),r3=i3.TraversalRecord,Ax=i3.capitalize;function s3(r,e,t,i){if(i=i||{},!Tx(r))throw new Error("graphology-traversal/dfs: expecting a graphology instance.");if(typeof t!="function")throw new Error("graphology-traversal/dfs: given callback is not a function.");if(r.order===0)return;var s=new Fx(r),n=r["forEach"+Ax(i.mode||"outbound")+"Neighbor"].bind(r),o;e===null?o=s.forEachNodeYetUnseen.bind(s):o=function(h){e=""+e,h(e,r.getNodeAttributes(e))};var a,l;function u(h,d){s.pushWith(h,new r3(h,d,a.depth+1))}o(function(h,d){for(s.pushWith(h,new r3(h,d,0));s.size!==0;)a=s.pop(),l=t(a.node,a.attributes,a.depth),l!==!0&&n(a.node,u)})}jd.dfs=function(r,e,t){return s3(r,null,e,t)};jd.dfsFromNode=s3});var Jh=Ie(o3=>{o3.copyNode=function(r,e,t){return t=Object.assign({},t),r.addNode(e,t)}});var us=Ie(ol=>{ol.addEdge=function(e,t,i,s,n,o){return t?i==null?e.addUndirectedEdge(s,n,o):e.addUndirectedEdgeWithKey(i,s,n,o):i==null?e.addDirectedEdge(s,n,o):e.addDirectedEdgeWithKey(i,s,n,o)};ol.copyEdge=function(e,t,i,s,n,o){return o=Object.assign({},o),t?i==null?e.addUndirectedEdge(s,n,o):e.addUndirectedEdgeWithKey(i,s,n,o):i==null?e.addDirectedEdge(s,n,o):e.addDirectedEdgeWithKey(i,s,n,o)};ol.mergeEdge=function(e,t,i,s,n,o){return t?i==null?e.mergeUndirectedEdge(s,n,o):e.mergeUndirectedEdgeWithKey(i,s,n,o):i==null?e.mergeDirectedEdge(s,n,o):e.mergeDirectedEdgeWithKey(i,s,n,o)};ol.updateEdge=function(e,t,i,s,n,o){return t?i==null?e.updateUndirectedEdge(s,n,o):e.updateUndirectedEdgeWithKey(i,s,n,o):i==null?e.updateDirectedEdge(s,n,o):e.updateDirectedEdgeWithKey(i,s,n,o)}});var c3=Ie((kQ,h3)=>{var a3=x0(),l3=Jh().copyNode,u3=us().copyEdge;h3.exports=function(e,t){if(!a3(e)||!a3(t))throw new Error("graphology-operators/disjoint-union: invalid graph.");if(e.multi!==t.multi)throw new Error("graphology-operators/disjoint-union: both graph should be simple or multi.");var i=e.nullCopy();i.mergeAttributes(e.getAttributes());var s={},n={},o=0;return e.forEachNode(function(a,l){s[a]=o,l3(i,o,l),o++}),t.forEachNode(function(a,l){n[a]=o,l3(i,o,l),o++}),o=0,e.forEachEdge(function(a,l,u,h,d,p,m){u3(i,m,o++,s[u],s[h],h,l)}),t.forEachEdge(function(a,l,u,h,d,p,m){u3(i,m,o++,n[u],n[h],h,l)}),i}});var f3=Ie((MQ,p3)=>{var Ix=x0(),d3=us().copyEdge;p3.exports=function(e){if(!Ix(e))throw new Error("graphology-operators/reverse: invalid graph.");var t=e.emptyCopy();return e.forEachEdge(function(i,s,n,o,a,l,u){u?d3(t,!0,i,n,o,s):d3(t,!1,i,o,n,s)}),t}});var y3=Ie((PQ,m3)=>{var kx=x0(),g3=Jh().copyNode,Mx=us().copyEdge;m3.exports=function(e,t){if(!kx(e))throw new Error("graphology-operators/subgraph: invalid graph instance.");var i=e.nullCopy(),s=t;if(Array.isArray(t)){if(t.length===0)return i;t=new Set(t)}if(t instanceof Set){if(t.size===0)return i;s=function(o){return t.has(o)};var n=t;t=new Set,n.forEach(function(o){t.add(""+o)})}if(typeof s!="function")throw new Error("graphology-operators/subgraph: invalid nodes. Expecting an array or a set or a filtering function.");if(typeof t=="function"){if(e.forEachNode(function(o,a){s(o,a)&&g3(i,o,a)}),i.order===0)return i}else t.forEach(function(o){if(!e.hasNode(o))throw new Error('graphology-operators/subgraph: the "'+o+'" node was not found in the graph.');g3(i,o,e.getNodeAttributes(o))});return e.forEachEdge(function(o,a,l,u,h,d,p){s(l,h)&&(u!==l&&!s(u,d)||Mx(i,p,o,l,u,a))}),i}});var v3=Ie((NQ,x3)=>{var Px=x0(),$d=us().copyEdge;x3.exports=function(e,t){if(!Px(e))throw new Error("graphology-operators/to-directed: expecting a valid graphology instance.");typeof t=="function"&&(t={mergeEdge:t}),t=t||{};var i=typeof t.mergeEdge=="function"?t.mergeEdge:null;if(e.type==="directed")return e.copy();var s=e.emptyCopy({type:"directed"});return e.forEachDirectedEdge(function(n,o,a,l){$d(s,!1,n,a,l,o)}),e.forEachUndirectedEdge(function(n,o,a,l){var u=!e.multi&&e.type==="mixed"&&s.edge(a,l),h=!e.multi&&e.type==="mixed"&&s.edge(l,a);u?s.replaceEdgeAttributes(u,i(s.getEdgeAttributes(u),o)):$d(s,!1,null,a,l,o),a!==l&&(h?s.replaceEdgeAttributes(h,i(s.getEdgeAttributes(h),o)):$d(s,!1,null,l,a,o))}),s}});var E3=Ie((BQ,D3)=>{var Nx=x0();D3.exports=function(e){if(!Nx(e))throw new Error("graphology-operators/to-mixed: expecting a valid graphology instance.");return e.copy({type:"mixed"})}});var w3=Ie((RQ,b3)=>{var Bx=x0();b3.exports=function(e){if(!Bx(e))throw new Error("graphology-operators/to-multi: expecting a valid graphology instance.");return e.copy({multi:!0})}});var _3=Ie((LQ,S3)=>{var Rx=x0(),Lx=us().copyEdge;S3.exports=function(e,t){if(!Rx(e))throw new Error("graphology-operators/to-simple: expecting a valid graphology instance.");typeof t=="function"&&(t={mergeEdge:t}),t=t||{};var i=typeof t.mergeEdge=="function"?t.mergeEdge:null;if(!e.multi)return e.copy();var s=e.emptyCopy({multi:!1});return e.forEachEdge(function(n,o,a,l,u,h,d){var p=d?s.undirectedEdge(a,l):s.directedEdge(a,l);if(p){i&&s.replaceEdgeAttributes(p,i(s.getEdgeAttributes(p),o));return}Lx(s,d,n,a,l,o)}),s}});var F3=Ie((OQ,T3)=>{var Ox=x0(),C3=us().copyEdge;T3.exports=function(e,t){if(!Ox(e))throw new Error("graphology-operators/to-undirected: expecting a valid graphology instance.");typeof t=="function"&&(t={mergeEdge:t}),t=t||{};var i=typeof t.mergeEdge=="function"?t.mergeEdge:null;if(e.type==="undirected")return e.copy();var s=e.emptyCopy({type:"undirected"});return e.forEachUndirectedEdge(function(n,o,a,l){C3(s,!0,n,a,l,o)}),e.forEachDirectedEdge(function(n,o,a,l){if(!e.multi){var u=s.edge(a,l);if(u){i&&s.replaceEdgeAttributes(u,i(s.getEdgeAttributes(u),o));return}}C3(s,!0,null,a,l,o)}),s}});var k3=Ie((GQ,I3)=>{var A3=x0();I3.exports=function(e,t){if(!A3(e)||!A3(t))throw new Error("graphology-operators/union: invalid graph.");if(e.multi!==t.multi)throw new Error("graphology-operators/union: both graph should be simple or multi.");var i=e.copy();return i.import(t,!0),i}});var ec=Ie(Vr=>{Vr.disjointUnion=c3();Vr.reverse=f3();Vr.subgraph=y3();Vr.toDirected=v3();Vr.toMixed=E3();Vr.toMulti=w3();Vr.toSimple=_3();Vr.toUndirected=F3();Vr.union=k3()});var L3=Ie(tc=>{var Gx=x0();function wo(r,e,t,i){var s=e+"Centrality";if(!Gx(t))throw new Error("graphology-centrality/"+s+": the given graph is not a valid graphology instance.");if(e!=="degree"&&t.type==="undirected")throw new Error("graphology-centrality/"+s+": cannot compute "+e+" centrality on an undirected graph.");i=i||{};var n=i.nodeCentralityAttribute||s,o=t.order-1,a=t[e].bind(t);if(r){t.updateEachNodeAttributes(function(u,h){return h[n]=a(u)/o,h},{attributes:[n]});return}var l={};return t.forEachNode(function(u){l[u]=a(u)/o}),l}var N3=wo.bind(null,!1,"degree"),B3=wo.bind(null,!1,"inDegree"),R3=wo.bind(null,!1,"outDegree");N3.assign=wo.bind(null,!0,"degree");B3.assign=wo.bind(null,!0,"inDegree");R3.assign=wo.bind(null,!0,"outDegree");tc.degreeCentrality=N3;tc.inDegreeCentrality=B3;tc.outDegreeCentrality=R3});var al=Ie((QQ,G3)=>{function Ux(r){return!r||typeof r!="object"||typeof r=="function"||Array.isArray(r)||r instanceof Set||r instanceof Map||r instanceof RegExp||r instanceof Date}function O3(r,e){r=r||{};var t={};for(var i in e){var s=r[i],n=e[i];if(!Ux(n)){t[i]=O3(s,n);continue}s===void 0?t[i]=n:t[i]=s}return t}G3.exports=O3});var ll=Ie(zr=>{var Vx=Math.pow(2,8)-1,zx=Math.pow(2,16)-1,Wx=Math.pow(2,32)-1,Hx=Math.pow(2,7)-1,jx=Math.pow(2,15)-1,$x=Math.pow(2,31)-1;zr.getPointerArray=function(r){var e=r-1;if(e<=Vx)return Uint8Array;if(e<=zx)return Uint16Array;if(e<=Wx)return Uint32Array;throw new Error("mnemonist: Pointer Array of size > 4294967295 is not supported.")};zr.getSignedPointerArray=function(r){var e=r-1;return e<=Hx?Int8Array:e<=jx?Int16Array:e<=$x?Int32Array:Float64Array};zr.getNumberType=function(r){return r===(r|0)?Math.sign(r)===-1?r<=127&&r>=-128?Int8Array:r<=32767&&r>=-32768?Int16Array:Int32Array:r<=255?Uint8Array:r<=65535?Uint16Array:Uint32Array:Float64Array};var Yx={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};zr.getMinimalRepresentation=function(r,e){var t=null,i=0,s,n,o,a,l;for(a=0,l=r.length;a<l;a++)o=e?e(r[a]):r[a],n=zr.getNumberType(o),s=Yx[n.name],s>i&&(i=s,t=n);return t};zr.isTypedArray=function(r){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView(r)};zr.concat=function(){var r=0,e,t,i;for(e=0,i=arguments.length;e<i;e++)r+=arguments[e].length;var s=new arguments[0].constructor(r);for(e=0,t=0;e<i;e++)s.set(arguments[e],t),t+=arguments[e].length;return s};zr.indices=function(r){for(var e=zr.getPointerArray(r),t=new e(r),i=0;i<r;i++)t[i]=i;return t}});var Xd=Ie(rc=>{function Xx(r){return typeof r!="number"||isNaN(r)?1:r}function qx(r,e){var t={},i=function(o){return typeof o>"u"?e:o};typeof e=="function"&&(i=e);var s=function(o){return i(o[r])},n=function(){return i(void 0)};return typeof r=="string"?(t.fromAttributes=s,t.fromGraph=function(o,a){return s(o.getNodeAttributes(a))},t.fromEntry=function(o,a){return s(a)}):typeof r=="function"?(t.fromAttributes=function(){throw new Error("graphology-utils/getters/createNodeValueGetter: irrelevant usage.")},t.fromGraph=function(o,a){return i(r(a,o.getNodeAttributes(a)))},t.fromEntry=function(o,a){return i(r(o,a))}):(t.fromAttributes=n,t.fromGraph=n,t.fromEntry=n),t}function U3(r,e){var t={},i=function(o){return typeof o>"u"?e:o};typeof e=="function"&&(i=e);var s=function(o){return i(o[r])},n=function(){return i(void 0)};return typeof r=="string"?(t.fromAttributes=s,t.fromGraph=function(o,a){return s(o.getEdgeAttributes(a))},t.fromEntry=function(o,a){return s(a)},t.fromPartialEntry=t.fromEntry,t.fromMinimalEntry=t.fromEntry):typeof r=="function"?(t.fromAttributes=function(){throw new Error("graphology-utils/getters/createEdgeValueGetter: irrelevant usage.")},t.fromGraph=function(o,a){var l=o.extremities(a);return i(r(a,o.getEdgeAttributes(a),l[0],l[1],o.getNodeAttributes(l[0]),o.getNodeAttributes(l[1]),o.isUndirected(a)))},t.fromEntry=function(o,a,l,u,h,d,p){return i(r(o,a,l,u,h,d,p))},t.fromPartialEntry=function(o,a,l,u){return i(r(o,a,l,u))},t.fromMinimalEntry=function(o,a){return i(r(o,a))}):(t.fromAttributes=n,t.fromGraph=n,t.fromEntry=n,t.fromMinimalEntry=n),t}rc.createNodeValueGetter=qx;rc.createEdgeValueGetter=U3;rc.createEdgeWeightGetter=function(r){return U3(r,Xx)}});var sc=Ie(qd=>{var ic=ll(),Kx=Xd().createEdgeWeightGetter;function V3(r,e){return r==="outbound"||r==="inbound"?e.directedSize+e.undirectedSize*2:r==="in"||r==="out"||r==="directed"?e.directedSize:e.undirectedSize*2}function _i(r,e){e=e||"outbound";var t=r[e+"Neighbors"].bind(r),i=V3(e,r),s=ic.getPointerArray(i),n=ic.getPointerArray(r.order);this.graph=r,this.neighborhood=new n(i),this.starts=new s(r.order+1),this.nodes=r.nodes();var o={},a,l,u,h,d,p,m=0;for(a=0,l=r.order;a<l;a++)o[this.nodes[a]]=a;for(a=0,l=r.order;a<l;a++)for(d=this.nodes[a],p=t(d),this.starts[a]=m,u=0,h=p.length;u<h;u++)this.neighborhood[m++]=o[p[u]];this.starts[a]=i}_i.prototype.bounds=function(r){return[this.starts[r],this.starts[r+1]]};_i.prototype.project=function(){var r=this,e={};return r.nodes.forEach(function(t,i){e[t]=Array.from(r.neighborhood.slice(r.starts[i],r.starts[i+1])).map(function(s){return r.nodes[s]})}),e};_i.prototype.collect=function(r){var e,t,i={};for(e=0,t=r.length;e<t;e++)i[this.nodes[e]]=r[e];return i};_i.prototype.assign=function(r,e){var t=0;this.graph.updateEachNodeAttributes(function(i,s){return s[r]=e[t++],s},{attributes:[r]})};qd.NeighborhoodIndex=_i;function ul(r,e,t){t=t||"outbound";var i=r[t+"Edges"].bind(r),s=V3(t,r),n=ic.getPointerArray(s),o=ic.getPointerArray(r.order),a=Kx(e).fromMinimalEntry;this.graph=r,this.neighborhood=new o(s),this.weights=new Float64Array(s),this.outDegrees=new Float64Array(r.order),this.starts=new n(r.order+1),this.nodes=r.nodes();var l={},u,h,d,p,m,x,C,A,P,L=0;for(u=0,h=r.order;u<h;u++)l[this.nodes[u]]=u;for(u=0,h=r.order;u<h;u++)for(m=this.nodes[u],C=i(m),this.starts[u]=L,d=0,p=C.length;d<p;d++)A=C[d],x=r.opposite(m,A),P=a(A,r.getEdgeAttributes(A)),this.neighborhood[L]=l[x],this.weights[L++]=P,this.outDegrees[u]+=P;this.starts[u]=s}ul.prototype.bounds=_i.prototype.bounds;ul.prototype.project=_i.prototype.project;ul.prototype.collect=_i.prototype.collect;ul.prototype.assign=_i.prototype.assign;qd.WeightedNeighborhoodIndex=ul});var j3=Ie((rJ,H3)=>{var Zx=x0(),Qx=al(),Jx=sc().WeightedNeighborhoodIndex,ev={nodeCentralityAttribute:"eigenvectorCentrality",getEdgeWeight:"weight",maxIterations:100,tolerance:1e-6};function tv(r){for(var e=0,t=0,i=0,s=r.length;i<s;i++){var n=Math.abs(r[i]);n>e&&(t*=e/n*(e/n),e=n),t+=n===0&&e===0?0:n/e*(n/e)}return e===1/0?1:e*Math.sqrt(t)}function z3(r,e,t){if(!Zx(e))throw new Error("graphology-metrics/centrality/eigenvector: the given graph is not a valid graphology instance.");t=Qx(t,ev);var i=t.maxIterations,s=t.tolerance,n=e.order,o=new Jx(e,t.getEdgeWeight),a,l,u,h,d=new Float64Array(e.order);for(a=0;a<n;a++)d[a]=1/n;for(var p=0,m=0,x,C,A,P=!1;p<i;){for(C=d,d=new Float64Array(C),a=0;a<n;a++)for(u=o.starts[a+1],l=o.starts[a];l<u;l++)x=o.neighborhood[l],h=o.weights[l],d[x]+=C[a]*h;for(A=tv(d),a=0;a<n;a++)d[a]/=A;for(m=0,a=0;a<n;a++)m+=Math.abs(d[a]-C[a]);if(m<n*s){P=!0;break}p++}if(!P)throw Error("graphology-metrics/centrality/eigenvector: failed to converge.");if(r){o.assign(t.nodeCentralityAttribute,d);return}return o.collect(d)}var W3=z3.bind(null,!1);W3.assign=z3.bind(null,!0);H3.exports=W3});var $3=Ie(Kd=>{Kd.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<"u";Kd.SYMBOL_SUPPORT=typeof Symbol<"u"});var nc=Ie((sJ,X3)=>{var Y3=$3(),rv=Y3.ARRAY_BUFFER_SUPPORT,iv=Y3.SYMBOL_SUPPORT;X3.exports=function(e,t){var i,s,n,o,a;if(!e)throw new Error("obliterator/forEach: invalid iterable.");if(typeof t!="function")throw new Error("obliterator/forEach: expecting a callback.");if(Array.isArray(e)||rv&&ArrayBuffer.isView(e)||typeof e=="string"||e.toString()==="[object Arguments]"){for(n=0,o=e.length;n<o;n++)t(e[n],n);return}if(typeof e.forEach=="function"){e.forEach(t);return}if(iv&&Symbol.iterator in e&&typeof e.next!="function"&&(e=e[Symbol.iterator]()),typeof e.next=="function"){for(i=e,n=0;a=i.next(),a.done!==!0;)t(a.value,n),n++;return}for(s in e)e.hasOwnProperty(s)&&t(e[s],s)}});var oc=Ie(hl=>{var q3=nc(),K3=ll();function sv(r){return Array.isArray(r)||K3.isTypedArray(r)}function Zd(r){if(typeof r.length=="number")return r.length;if(typeof r.size=="number")return r.size}function nv(r){var e=Zd(r),t=typeof e=="number"?new Array(e):[],i=0;return q3(r,function(s){t[i++]=s}),t}function ov(r){var e=Zd(r),t=typeof e=="number"?K3.getPointerArray(e):Array,i=typeof e=="number"?new Array(e):[],s=typeof e=="number"?new t(e):[],n=0;return q3(r,function(o){i[n]=o,s[n]=n++}),[i,s]}hl.isArrayLike=sv;hl.guessLength=Zd;hl.toArray=nv;hl.toArrayWithIndices=ov});var cl=Ie((oJ,Z3)=>{function Wr(r){if(typeof r!="function")throw new Error("obliterator/iterator: expecting a function!");this.next=r}typeof Symbol<"u"&&(Wr.prototype[Symbol.iterator]=function(){return this});Wr.of=function(){var r=arguments,e=r.length,t=0;return new Wr(function(){return t>=e?{done:!0}:{done:!1,value:r[t++]}})};Wr.empty=function(){var r=new Wr(function(){return{done:!0}});return r};Wr.fromSequence=function(r){var e=0,t=r.length;return new Wr(function(){return e>=t?{done:!0}:{done:!1,value:r[e++]}})};Wr.is=function(r){return r instanceof Wr?!0:typeof r=="object"&&r!==null&&typeof r.next=="function"};Z3.exports=Wr});var ac=Ie((aJ,J3)=>{var Qd=oc(),Q3=cl();function _0(r,e){if(arguments.length<2)throw new Error("mnemonist/fixed-deque: expecting an Array class and a capacity.");if(typeof e!="number"||e<=0)throw new Error("mnemonist/fixed-deque: `capacity` should be a positive number.");this.ArrayClass=r,this.capacity=e,this.items=new r(this.capacity),this.clear()}_0.prototype.clear=function(){this.start=0,this.size=0};_0.prototype.push=function(r){if(this.size===this.capacity)throw new Error("mnemonist/fixed-deque.push: deque capacity ("+this.capacity+") exceeded!");var e=this.start+this.size;return e>=this.capacity&&(e-=this.capacity),this.items[e]=r,++this.size};_0.prototype.unshift=function(r){if(this.size===this.capacity)throw new Error("mnemonist/fixed-deque.unshift: deque capacity ("+this.capacity+") exceeded!");var e=this.start-1;return this.start===0&&(e=this.capacity-1),this.items[e]=r,this.start=e,++this.size};_0.prototype.pop=function(){if(this.size!==0){this.size--;var r=this.start+this.size;return r>=this.capacity&&(r-=this.capacity),this.items[r]}};_0.prototype.shift=function(){if(this.size!==0){var r=this.start;return this.size--,this.start++,this.start===this.capacity&&(this.start=0),this.items[r]}};_0.prototype.peekFirst=function(){if(this.size!==0)return this.items[this.start]};_0.prototype.peekLast=function(){if(this.size!==0){var r=this.start+this.size-1;return r>=this.capacity&&(r-=this.capacity),this.items[r]}};_0.prototype.get=function(r){if(!(this.size===0||r>=this.capacity))return r=this.start+r,r>=this.capacity&&(r-=this.capacity),this.items[r]};_0.prototype.forEach=function(r,e){e=arguments.length>1?e:this;for(var t=this.capacity,i=this.size,s=this.start,n=0;n<i;)r.call(e,this.items[s],n,this),s++,n++,s===t&&(s=0)};_0.prototype.toArray=function(){var r=this.start+this.size;if(r<this.capacity)return this.items.slice(this.start,r);for(var e=new this.ArrayClass(this.size),t=this.capacity,i=this.size,s=this.start,n=0;n<i;)e[n]=this.items[s],s++,n++,s===t&&(s=0);return e};_0.prototype.values=function(){var r=this.items,e=this.capacity,t=this.size,i=this.start,s=0;return new Q3(function(){if(s>=t)return{done:!0};var n=r[i];return i++,s++,i===e&&(i=0),{value:n,done:!1}})};_0.prototype.entries=function(){var r=this.items,e=this.capacity,t=this.size,i=this.start,s=0;return new Q3(function(){if(s>=t)return{done:!0};var n=r[i];return i++,i===e&&(i=0),{value:[s++,n],done:!1}})};typeof Symbol<"u"&&(_0.prototype[Symbol.iterator]=_0.prototype.values);_0.prototype.inspect=function(){var r=this.toArray();return r.type=this.ArrayClass.name,r.capacity=this.capacity,Object.defineProperty(r,"constructor",{value:_0,enumerable:!1}),r};typeof Symbol<"u"&&(_0.prototype[Symbol.for("nodejs.util.inspect.custom")]=_0.prototype.inspect);_0.from=function(r,e,t){if(arguments.length<3&&(t=Qd.guessLength(r),typeof t!="number"))throw new Error("mnemonist/fixed-deque.from: could not guess iterable length. Please provide desired capacity as last argument.");var i=new _0(e,t);if(Qd.isArrayLike(r)){var s,n;for(s=0,n=r.length;s<n;s++)i.items[s]=r[s];return i.size=n,i}return Qd.forEach(r,function(o){i.push(o)}),i};J3.exports=_0});var t5=Ie((lJ,e5)=>{var av=cl(),lv=ll().getPointerArray;function Wt(r){var e=lv(r);this.size=0,this.length=r,this.dense=new e(r),this.sparse=new e(r)}Wt.prototype.clear=function(){this.size=0};Wt.prototype.has=function(r){var e=this.sparse[r];return e<this.size&&this.dense[e]===r};Wt.prototype.add=function(r){var e=this.sparse[r];return e<this.size&&this.dense[e]===r?this:(this.dense[this.size]=r,this.sparse[r]=this.size,this.size++,this)};Wt.prototype.delete=function(r){var e=this.sparse[r];return e>=this.size||this.dense[e]!==r?!1:(e=this.dense[this.size-1],this.dense[this.sparse[r]]=e,this.sparse[e]=this.sparse[r],this.size--,!0)};Wt.prototype.forEach=function(r,e){e=arguments.length>1?e:this;for(var t,i=0;i<this.size;i++)t=this.dense[i],r.call(e,t,t)};Wt.prototype.values=function(){var r=this.size,e=this.dense,t=0;return new av(function(){if(t<r){var i=e[t];return t++,{value:i}}return{done:!0}})};typeof Symbol<"u"&&(Wt.prototype[Symbol.iterator]=Wt.prototype.values);Wt.prototype.inspect=function(){for(var r=new Set,e=0;e<this.size;e++)r.add(this.dense[e]);return Object.defineProperty(r,"constructor",{value:Wt,enumerable:!1}),r.length=this.length,r};typeof Symbol<"u"&&(Wt.prototype[Symbol.for("nodejs.util.inspect.custom")]=Wt.prototype.inspect);e5.exports=Wt});var o5=Ie((uJ,n5)=>{var uv=x0(),hv=al(),cv=ac(),dv=t5(),pv=sc().NeighborhoodIndex,fv={nodeCentralityAttribute:"closenessCentrality",wassermanFaust:!1};function r5(r){this.index=new pv(r,"inbound"),this.queue=new cv(Array,r.order),this.seen=new dv(r.order)}r5.prototype.fromNode=function(r){var e=this.index,t=this.queue,i=this.seen;i.clear(),t.clear(),i.add(r),t.push([r,0]);for(var s,n,o,a,l,u,h=0,d=0;t.size!==0;)for(s=t.shift(),n=s[0],o=s[1],o!==0&&(h+=o,d+=1),l=e.starts[n+1],a=e.starts[n];a<l;a++)u=e.neighborhood[a],!i.has(u)&&(i.add(u),t.push([u,o+1]));return[d,h]};function i5(r,e,t){if(!uv(e))throw new Error("graphology-metrics/centrality/closeness: the given graph is not a valid graphology instance.");t=hv(t,fv);var i=t.wassermanFaust,s=new r5(e),n=e.order,o,a,l,u,h,d=new Float64Array(n);for(o=0;o<n;o++)a=s.fromNode(o),l=a[0],u=a[1],h=0,u>0&&n>1&&(h=l/u,i&&(h*=l/(n-1))),d[o]=h;return r?s.index.assign(t.nodeCentralityAttribute,d):s.index.collect(d)}var s5=i5.bind(null,!1);s5.assign=i5.bind(null,!0);n5.exports=s5});var u5=Ie((hJ,l5)=>{var a5=cl(),Jd=oc();function B0(r,e){if(arguments.length<2)throw new Error("mnemonist/fixed-stack: expecting an Array class and a capacity.");if(typeof e!="number"||e<=0)throw new Error("mnemonist/fixed-stack: `capacity` should be a positive number.");this.capacity=e,this.ArrayClass=r,this.items=new this.ArrayClass(this.capacity),this.clear()}B0.prototype.clear=function(){this.size=0};B0.prototype.push=function(r){if(this.size===this.capacity)throw new Error("mnemonist/fixed-stack.push: stack capacity ("+this.capacity+") exceeded!");return this.items[this.size++]=r,this.size};B0.prototype.pop=function(){if(this.size!==0)return this.items[--this.size]};B0.prototype.peek=function(){return this.items[this.size-1]};B0.prototype.forEach=function(r,e){e=arguments.length>1?e:this;for(var t=0,i=this.items.length;t<i;t++)r.call(e,this.items[i-t-1],t,this)};B0.prototype.toArray=function(){for(var r=new this.ArrayClass(this.size),e=this.size-1,t=this.size;t--;)r[t]=this.items[e-t];return r};B0.prototype.values=function(){var r=this.items,e=this.size,t=0;return new a5(function(){if(t>=e)return{done:!0};var i=r[e-t-1];return t++,{value:i,done:!1}})};B0.prototype.entries=function(){var r=this.items,e=this.size,t=0;return new a5(function(){if(t>=e)return{done:!0};var i=r[e-t-1];return{value:[t++,i],done:!1}})};typeof Symbol<"u"&&(B0.prototype[Symbol.iterator]=B0.prototype.values);B0.prototype.toString=function(){return this.toArray().join(",")};B0.prototype.toJSON=function(){return this.toArray()};B0.prototype.inspect=function(){var r=this.toArray();return r.type=this.ArrayClass.name,r.capacity=this.capacity,Object.defineProperty(r,"constructor",{value:B0,enumerable:!1}),r};typeof Symbol<"u"&&(B0.prototype[Symbol.for("nodejs.util.inspect.custom")]=B0.prototype.inspect);B0.from=function(r,e,t){if(arguments.length<3&&(t=Jd.guessLength(r),typeof t!="number"))throw new Error("mnemonist/fixed-stack.from: could not guess iterable length. Please provide desired capacity as last argument.");var i=new B0(e,t);if(Jd.isArrayLike(r)){var s,n;for(s=0,n=r.length;s<n;s++)i.items[s]=r[s];return i.size=n,i}return Jd.forEach(r,function(o){i.push(o)}),i};l5.exports=B0});var h5=Ie(dl=>{var gv=function(r,e){return r<e?-1:r>e?1:0},mv=function(r,e){return r<e?1:r>e?-1:0};function yv(r){return function(e,t){return r(t,e)}}function xv(r){return r===2?function(e,t){return e[0]<t[0]?-1:e[0]>t[0]?1:e[1]<t[1]?-1:e[1]>t[1]?1:0}:function(e,t){for(var i=0;i<r;){if(e[i]<t[i])return-1;if(e[i]>t[i])return 1;i++}return 0}}dl.DEFAULT_COMPARATOR=gv;dl.DEFAULT_REVERSE_COMPARATOR=mv;dl.reverseComparator=yv;dl.createTupleComparator=xv});var g5=Ie((dJ,f5)=>{var lc=nc(),c5=h5(),Hr=oc(),hc=c5.DEFAULT_COMPARATOR,e8=c5.reverseComparator;function t8(r,e,t,i){for(var s=e[i],n,o;i>t;){if(n=i-1>>1,o=e[n],r(s,o)<0){e[i]=o,i=n;continue}break}e[i]=s}function pl(r,e,t){for(var i=e.length,s=t,n=e[t],o=2*t+1,a;o<i;)a=o+1,a<i&&r(e[o],e[a])>=0&&(o=a),e[t]=e[o],t=o,o=2*t+1;e[t]=n,t8(r,e,s,t)}function d5(r,e,t){e.push(t),t8(r,e,0,e.length-1)}function r8(r,e){var t=e.pop();if(e.length!==0){var i=e[0];return e[0]=t,pl(r,e,0),i}return t}function So(r,e,t){if(e.length===0)throw new Error("mnemonist/heap.replace: cannot pop an empty heap.");var i=e[0];return e[0]=t,pl(r,e,0),i}function p5(r,e,t){var i;return e.length!==0&&r(e[0],t)<0&&(i=e[0],e[0]=t,t=i,pl(r,e,0)),t}function qs(r,e){for(var t=e.length,i=t>>1,s=i;--s>=0;)pl(r,e,s)}function i8(r,e){for(var t=e.length,i=0,s=new Array(t);i<t;)s[i++]=r8(r,e);return s}function vv(r,e,t){arguments.length===2&&(t=e,e=r,r=hc);var i=e8(r),s,n,o,a=1/0,l;if(e===1){if(Hr.isArrayLike(t)){for(s=0,n=t.length;s<n;s++)o=t[s],(a===1/0||r(o,a)<0)&&(a=o);return l=new t.constructor(1),l[0]=a,l}return lc(t,function(h){(a===1/0||r(h,a)<0)&&(a=h)}),[a]}if(Hr.isArrayLike(t)){if(e>=t.length)return t.slice().sort(r);for(l=t.slice(0,e),qs(i,l),s=e,n=t.length;s<n;s++)i(t[s],l[0])>0&&So(i,l,t[s]);return l.sort(r)}var u=Hr.guessLength(t);return u!==null&&u<e&&(e=u),l=new Array(e),s=0,lc(t,function(h){s<e?l[s]=h:(s===e&&qs(i,l),i(h,l[0])>0&&So(i,l,h)),s++}),l.length>s&&(l.length=s),l.sort(r)}function Dv(r,e,t){arguments.length===2&&(t=e,e=r,r=hc);var i=e8(r),s,n,o,a=-1/0,l;if(e===1){if(Hr.isArrayLike(t)){for(s=0,n=t.length;s<n;s++)o=t[s],(a===-1/0||r(o,a)>0)&&(a=o);return l=new t.constructor(1),l[0]=a,l}return lc(t,function(h){(a===-1/0||r(h,a)>0)&&(a=h)}),[a]}if(Hr.isArrayLike(t)){if(e>=t.length)return t.slice().sort(i);for(l=t.slice(0,e),qs(r,l),s=e,n=t.length;s<n;s++)r(t[s],l[0])>0&&So(r,l,t[s]);return l.sort(i)}var u=Hr.guessLength(t);return u!==null&&u<e&&(e=u),l=new Array(e),s=0,lc(t,function(h){s<e?l[s]=h:(s===e&&qs(r,l),r(h,l[0])>0&&So(r,l,h)),s++}),l.length>s&&(l.length=s),l.sort(i)}function Ke(r){if(this.clear(),this.comparator=r||hc,typeof this.comparator!="function")throw new Error("mnemonist/Heap.constructor: given comparator should be a function.")}Ke.prototype.clear=function(){this.items=[],this.size=0};Ke.prototype.push=function(r){return d5(this.comparator,this.items,r),++this.size};Ke.prototype.peek=function(){return this.items[0]};Ke.prototype.pop=function(){return this.size!==0&&this.size--,r8(this.comparator,this.items)};Ke.prototype.replace=function(r){return So(this.comparator,this.items,r)};Ke.prototype.pushpop=function(r){return p5(this.comparator,this.items,r)};Ke.prototype.consume=function(){return this.size=0,i8(this.comparator,this.items)};Ke.prototype.toArray=function(){return i8(this.comparator,this.items.slice())};Ke.prototype.inspect=function(){var r=this.toArray();return Object.defineProperty(r,"constructor",{value:Ke,enumerable:!1}),r};typeof Symbol<"u"&&(Ke.prototype[Symbol.for("nodejs.util.inspect.custom")]=Ke.prototype.inspect);function uc(r){if(this.clear(),this.comparator=r||hc,typeof this.comparator!="function")throw new Error("mnemonist/MaxHeap.constructor: given comparator should be a function.");this.comparator=e8(this.comparator)}uc.prototype=Ke.prototype;Ke.from=function(r,e){var t=new Ke(e),i;return Hr.isArrayLike(r)?i=r.slice():i=Hr.toArray(r),qs(t.comparator,i),t.items=i,t.size=i.length,t};uc.from=function(r,e){var t=new uc(e),i;return Hr.isArrayLike(r)?i=r.slice():i=Hr.toArray(r),qs(t.comparator,i),t.items=i,t.size=i.length,t};Ke.siftUp=pl;Ke.siftDown=t8;Ke.push=d5;Ke.pop=r8;Ke.replace=So;Ke.pushpop=p5;Ke.heapify=qs;Ke.consume=i8;Ke.nsmallest=vv;Ke.nlargest=Dv;Ke.MinHeap=Ke;Ke.MaxHeap=uc;f5.exports=Ke});var v5=Ie(s8=>{var Ev=ac(),m5=u5(),bv=g5(),y5=ll(),x5=sc(),wv=x5.NeighborhoodIndex,Sv=x5.WeightedNeighborhoodIndex;s8.createUnweightedIndexedBrandes=function(e){var t=new wv(e),i=t.neighborhood,s=t.starts,n=e.order,o=new m5(y5.getPointerArray(n),n),a=new Uint32Array(n),l=new Array(n),u=new Int32Array(n),h=new Ev(Uint32Array,n),d=function(p){var m,x,C,A,P,L,I;for(L=0;L<n;L++)l[L]=[],a[L]=0,u[L]=-1;for(a[p]=1,u[p]=0,h.push(p);h.size!==0;)for(L=h.shift(),o.push(L),m=u[L],x=a[L],C=s[L],A=s[L+1],P=C;P<A;P++)I=i[P],u[I]===-1&&(h.push(I),u[I]=m+1),u[I]===m+1&&(a[I]+=x,l[I].push(L));return[o,l,a]};return d.index=t,d};function _v(r,e){return r[0]>e[0]?1:r[0]<e[0]?-1:r[1]>e[1]?1:r[1]<e[1]?-1:r[2]>e[2]?1:r[2]<e[2]?-1:r[3]>e[3]?1:r[3]<e[3]?-1:0}s8.createDijkstraIndexedBrandes=function(e,t){var i=new Sv(e,t||"weight"),s=i.neighborhood,n=i.weights,o=i.starts,a=e.order,l=new m5(y5.getPointerArray(a),a),u=new Uint32Array(a),h=new Array(a),d=new Float64Array(a),p=new Float64Array(a),m=new bv(_v),x=function(C){var A,P,L,I,T,W,Q,O,z,oe=0;for(O=0;O<a;O++)h[O]=[],u[O]=0,d[O]=-1,p[O]=-1;for(u[C]=1,p[C]=0,m.push([0,oe++,C,C]);m.size!==0;)if(L=m.pop(),I=L[0],T=L[2],O=L[3],d[O]===-1)for(l.push(O),d[O]=I,u[O]+=u[T],A=o[O],P=o[O+1],Q=A;Q<P;Q++)z=s[Q],W=I+n[Q],d[z]===-1&&(p[z]===-1||W<p[z])?(p[z]=W,m.push([W,oe++,O,z]),u[z]=0,h[z]=[O]):W===p[z]&&(u[z]+=u[O],h[z].push(O));return[l,h,u]};return x.index=i,x}});var S5=Ie((fJ,w5)=>{var Cv=x0(),D5=v5(),Tv=al(),Fv=D5.createUnweightedIndexedBrandes,Av=D5.createDijkstraIndexedBrandes,Iv={nodeCentralityAttribute:"betweennessCentrality",getEdgeWeight:"weight",normalized:!0};function E5(r,e,t){if(!Cv(e))throw new Error("graphology-centrality/beetweenness-centrality: the given graph is not a valid graphology instance.");t=Tv(t,Iv);var i=t.nodeCentralityAttribute,s=t.normalized,n=t.getEdgeWeight?Av(e,t.getEdgeWeight):Fv(e),o=e.order,a,l,u,h,d,p,m,x,C,A,P=new Float64Array(o),L=new Float64Array(o);for(p=0;p<o;p++){for(a=n(p),l=a[0],u=a[1],h=a[2],m=l.size;m--;)P[l.items[l.size-m]]=0;for(;l.size!==0;){for(A=l.pop(),d=(1+P[A])/h[A],m=0,x=u[A].length;m<x;m++)C=u[A][m],P[C]+=h[C]*d;A!==p&&(L[A]+=P[A])}}var I=null;if(s?I=o<=2?null:1/((o-1)*(o-2)):I=e.type==="undirected"?.5:null,I!==null)for(p=0;p<o;p++)L[p]*=I;return r?n.index.assign(i,L):n.index.collect(L)}var b5=E5.bind(null,!1);b5.assign=E5.bind(null,!0);w5.exports=b5});var A5=Ie((gJ,F5)=>{var kv=al(),Mv=x0(),Pv=Xd().createEdgeWeightGetter,Nv={nodeAuthorityAttribute:"authority",nodeHubAttribute:"hub",getEdgeWeight:"weight",maxIterations:100,normalize:!0,tolerance:1e-8};function n8(r,e){var t=Object.create(null),i,s;for(i=0,s=r.length;i<s;i++)t[r[i]]=e;return t}function _5(r){var e=0;for(var t in r)e+=r[t];return e}function C5(r,e,t){if(!Mv(e))throw new Error("graphology-hits: the given graph is not a valid graphology instance.");if(e.multi)throw new Error("graphology-hits: the HITS algorithm does not work with MultiGraphs.");t=kv(t,Nv);var i=Pv(t.getEdgeWeight).fromEntry,s=e.order,n=e.nodes(),o,a=n8(n,1/s),l={},u=!1,h,d,p,m,x,C,A,P,L,I,T,W,Q;for(e.forEachEdge(function(O,z,oe,J,ne,Ee,q){l[O]=i(O,z,oe,J,ne,Ee,q)}),C=0;C<t.maxIterations;C++){for(h=a,a=n8(n,0),d=n8(n,0),P=0,A=0,T=0;T<s;T++)for(p=n[T],o=e.outboundEdges(p),W=0,Q=o.length;W<Q;W++)x=o[W],m=e.opposite(p,x),d[m]+=h[p]*l[x],d[m]>A&&(A=d[m]);for(T=0;T<s;T++)for(p=n[T],o=e.outboundEdges(p),W=0,Q=o.length;W<Q;W++)x=o[W],m=e.opposite(p,x),a[p]+=d[m]*l[x],a[m]>P&&(P=a[m]);I=1/P;for(p in a)a[p]*=I;I=1/A;for(p in d)d[p]*=I;L=0;for(p in a)L+=Math.abs(a[p]-h[p]);if(L<t.tolerance){u=!0;break}}if(!u)throw Error("graphology-metrics/centrality/hits: failed to converge.");if(t.normalize){I=1/_5(d);for(p in d)d[p]*=I;I=1/_5(a);for(p in a)a[p]*=I}if(r){e.updateEachNodeAttributes(function(O,z){return z[t.nodeAuthorityAttribute]=d[O],z[t.nodeHubAttribute]=a[O],z},{attributes:[t.nodeAuthorityAttribute,t.nodeHubAttribute]});return}return{hubs:a,authorities:d}}var T5=C5.bind(null,!1);T5.assign=C5.bind(null,!0);F5.exports=T5});var L5=Ie((IJ,R5)=>{var B5=cl(),Rv=nc();function C0(){this.clear()}C0.prototype.clear=function(){this.items=[],this.offset=0,this.size=0};C0.prototype.enqueue=function(r){return this.items.push(r),++this.size};C0.prototype.dequeue=function(){if(this.size){var r=this.items[this.offset];return++this.offset*2>=this.items.length&&(this.items=this.items.slice(this.offset),this.offset=0),this.size--,r}};C0.prototype.peek=function(){if(this.size)return this.items[this.offset]};C0.prototype.forEach=function(r,e){e=arguments.length>1?e:this;for(var t=this.offset,i=0,s=this.items.length;t<s;t++,i++)r.call(e,this.items[t],i,this)};C0.prototype.toArray=function(){return this.items.slice(this.offset)};C0.prototype.values=function(){var r=this.items,e=this.offset;return new B5(function(){if(e>=r.length)return{done:!0};var t=r[e];return e++,{value:t,done:!1}})};C0.prototype.entries=function(){var r=this.items,e=this.offset,t=0;return new B5(function(){if(e>=r.length)return{done:!0};var i=r[e];return e++,{value:[t++,i],done:!1}})};typeof Symbol<"u"&&(C0.prototype[Symbol.iterator]=C0.prototype.values);C0.prototype.toString=function(){return this.toArray().join(",")};C0.prototype.toJSON=function(){return this.toArray()};C0.prototype.inspect=function(){var r=this.toArray();return Object.defineProperty(r,"constructor",{value:C0,enumerable:!1}),r};typeof Symbol<"u"&&(C0.prototype[Symbol.for("nodejs.util.inspect.custom")]=C0.prototype.inspect);C0.from=function(r){var e=new C0;return Rv(r,function(t){e.enqueue(t)}),e};C0.of=function(){return C0.from(arguments)};R5.exports=C0});var G5=Ie((kJ,O5)=>{O5.exports=function(e,t){var i=t.length;if(i!==0){var s=e.length;e.length+=i;for(var n=0;n<i;n++)e[s+n]=t[n]}}});var V5=Ie(_o=>{var a8=x0(),Lv=L5(),Ov=G5();function Gv(r,e,t){if(!a8(r))throw new Error("graphology-shortest-path: invalid graphology instance.");if(arguments.length<3)throw new Error("graphology-shortest-path: invalid number of arguments. Expecting at least 3.");if(!r.hasNode(e))throw new Error('graphology-shortest-path: the "'+e+'" source node does not exist in the given graph.');if(!r.hasNode(t))throw new Error('graphology-shortest-path: the "'+t+'" target node does not exist in the given graph.');if(e=""+e,t=""+t,e===t)return[e];var i=r.inboundNeighbors.bind(r),s=r.outboundNeighbors.bind(r),n={},o={};n[e]=null,o[t]=null;var a=[e],l=[t],u,h,d,p,m,x,C,A,P=!1;e:for(;a.length&&l.length;)if(a.length<=l.length){for(u=a,a=[],m=0,C=u.length;m<C;m++)for(h=u[m],d=s(h),x=0,A=d.length;x<A;x++)if(p=d[x],p in n||(a.push(p),n[p]=h),p in o){P=!0;break e}}else for(u=l,l=[],m=0,C=u.length;m<C;m++)for(h=u[m],d=i(h),x=0,A=d.length;x<A;x++)if(p=d[x],p in o||(l.push(p),o[p]=h),p in n){P=!0;break e}if(!P)return null;for(var L=[];p;)L.unshift(p),p=n[p];for(p=o[L[L.length-1]];p;)L.push(p),p=o[p];return L.length?L:null}function Uv(r,e){if(!a8(r))throw new Error("graphology-shortest-path: invalid graphology instance.");if(arguments.length<2)throw new Error("graphology-shortest-path: invalid number of arguments. Expecting at least 2.");if(!r.hasNode(e))throw new Error('graphology-shortest-path: the "'+e+'" source node does not exist in the given graph.');e=""+e;var t={},i={},s,n,o,a,l,u;for(t[e]=!0,i[e]=[e];Object.keys(t).length;){s=t,t={};for(o in s)for(n=r.outboundNeighbors(o),l=0,u=n.length;l<u;l++)a=n[l],i[a]||(i[a]=i[o].concat(a),t[a]=!0)}return i}function U5(r,e,t){if(!a8(e))throw new Error("graphology-shortest-path: invalid graphology instance.");if(!e.hasNode(t))throw new Error('graphology-shortest-path: the "'+t+'" source node does not exist in the given graph.');t=""+t;var i=new Set,s={},n=0;s[t]=0;for(var o=[t],a,l,u;o.length!==0;){var h=[];for(a=0,l=o.length;a<l;a++)u=o[a],!i.has(u)&&(i.add(u),Ov(h,e[r](u)),s[u]=n);n++,o=h}return s}var Vv=U5.bind(null,"outboundNeighbors"),zv=U5.bind(null,"neighbors");function Wv(r,e){e=""+e;var t=[],i={},s={},n=r.nodes(),o,a,l,u,h,d,p,m,x;for(d=0,m=n.length;d<m;d++)u=n[d],i[u]=[],s[u]=0;var C={};s[e]=1,C[e]=0;for(var A=Lv.of(e);A.size;)for(u=A.dequeue(),t.push(u),o=C[u],a=s[u],l=r.outboundNeighbors(u),p=0,x=l.length;p<x;p++)h=l[p],h in C||(A.enqueue(h),C[h]=o+1),C[h]===o+1&&(s[h]+=a,i[h].push(u));return[t,i,s]}_o.bidirectional=Gv;_o.singleSource=Uv;_o.singleSourceLength=Vv;_o.undirectedSingleSourceLength=zv;_o.brandes=Wv});var W5=Ie((PJ,z5)=>{var Hv=x0(),jv=V5().singleSourceLength;z5.exports=function(e,t){if(!Hv(e))throw new Error("graphology-metrics/eccentricity: given graph is not a valid graphology instance.");if(e.size===0)return 1/0;var i=-1/0,s=jv(e,t),n,o,a=0;for(n in s)o=s[n],o>i&&(i=o),a++;return a<e.order?1/0:i}});var Y5=Ie(jr=>{var gl=x0(),$v=Jh().copyNode,Yv=us().copyEdge,_c=Wd();function j5(r,e){if(!gl(r))throw new Error("graphology-components: the given graph is not a valid graphology instance.");if(r.order){var t=new _c(r),i=t.push.bind(t);t.forEachNodeYetUnseen(function(s){var n=[];t.push(s);for(var o;t.size!==0;)o=t.pop(),n.push(o),r.forEachNeighbor(o,i);e(n)})}}function $5(r,e){if(!gl(r))throw new Error("graphology-components: the given graph is not a valid graphology instance.");if(r.order){var t=new _c(r),i=t.push.bind(t);t.forEachNodeYetUnseen(function(s){var n=0;t.push(s);for(var o;t.size!==0;)o=t.pop(),n++,r.forEachNeighbor(o,i);e(n)})}}function Xv(r,e,t){if(!gl(r))throw new Error("graphology-components: the given graph is not a valid graphology instance.");if(!r.order)return;var i=new _c(r),s;function n(o,a,l,u,h,d,p){s===u&&(u=l),e(o,a,l,u,h,d,p)&&i.push(u)}i.forEachNodeYetUnseen(function(o){var a=0;for(i.push(o);i.size!==0;)s=i.pop(),a++,r.forEachEdge(s,n);t(a)})}function qv(r){var e=0;return $5(r,function(){e++}),e}function Kv(r){var e=[];return j5(r,function(t){e.push(t)}),e}function l8(r){if(!gl(r))throw new Error("graphology-components: the given graph is not a valid graphology instance.");if(!r.order)return[];var e=new _c(r),t=e.push.bind(e),i=[],s;return e.forEachNodeYetUnseen(function(n){s=[],e.push(n);for(var o;e.size!==0;)o=e.pop(),s.push(o),r.forEachNeighbor(o,t);return s.length>i.length&&(i=s),i.length>e.countUnseenNodes()}),i}function Zv(r){var e=l8(r),t=r.nullCopy();return e.forEach(function(i){$v(t,i,r.getNodeAttributes(i))}),r.forEachEdge(function(i,s,n,o,a,l,u){t.hasNode(n)&&Yv(t,u,i,n,o,s)}),t}function Qv(r){var e=new Set(l8(r));r.forEachNode(function(t){e.has(t)||r.dropNode(t)})}function Jv(r){if(!gl(r))throw new Error("graphology-components: the given graph is not a valid graphology instance.");if(!r.order)return[];if(r.type==="undirected")throw new Error("graphology-components: the given graph is undirected");var e=r.nodes(),t=[],i,s;if(!r.size){for(i=0,s=e.length;i<s;i++)t.push([e[i]]);return t}var n=1,o=[],a=[],l=new Map,u=new Set,h,d,p,m=function(x){var C,A=r.outboundNeighbors(x),P;l.set(x,n++),o.push(x),a.push(x);for(var L=0,I=A.length;L<I;L++)if(C=A[L],l.has(C)){if(P=l.get(C),!u.has(C))for(;l.get(o[o.length-1])>P;)o.pop()}else m(C);if(l.get(o[o.length-1])===l.get(x)){h=[];do d=a.pop(),h.push(d),u.add(d);while(d!==x);t.push(h),o.pop()}};for(i=0,s=e.length;i<s;i++)p=e[i],u.has(p)||m(p);return t}jr.forEachConnectedComponent=j5;jr.forEachConnectedComponentOrder=$5;jr.forEachConnectedComponentOrderWithEdgeFilter=Xv;jr.countConnectedComponents=qv;jr.connectedComponents=Kv;jr.largestConnectedComponent=l8;jr.largestConnectedComponentSubgraph=Zv;jr.cropToLargestConnectedComponent=Qv;jr.stronglyConnectedComponents=Jv});var K5=Ie((XJ,q5)=>{var eD=x0(),tD=void 0,Cc=0,X5=1;q5.exports=function(e){if(!eD(e))throw new Error("graphology-dag/has-cycle: the given graph is not a valid graphology instance.");if(e.size===0)return!1;if(e.selfLoopCount!==0)return!0;let t={},i=[];function s(n){let o=t[n];if(o===tD)i.push(n);else if(o===Cc)return!0;return!1}return e.someNode(n=>{if(t[n]===X5)return!1;for(i.push(n);i.length!==0;){let o=i[i.length-1],a=t[o];if(a!==Cc){if(t[o]=Cc,e.someOutboundNeighbor(o,s))return!0}else a===Cc&&(i.pop(),t[o]=X5)}return!1})}});var Q5=Ie((qJ,Z5)=>{var rD=x0();Z5.exports=function(e,t,i){if(!rD(e))throw new Error("graphology-dag/will-create-cycle: the given graph is not a valid graphology instance.");if(t=""+t,i=""+i,t===i)return!0;if(!e.hasNode(t)||!e.hasNode(i)||e.hasDirectedEdge(t,i))return!1;if(e.hasDirectedEdge(i,t))return!0;let s=e.outNeighbors(i);function n(o){s.push(o)}for(;s.length!==0;){let o=s.pop();if(o===t)return!0;e.forEachOutNeighbor(o,n)}return!1}});var ep=Ie(ml=>{var Tc=x0(),iD=ac();function sD(r,e){let t=0;return r.forEachInNeighbor(e,()=>{t++}),t}function u8(r,e){if(!Tc(r))throw new Error("graphology-dag/topological-sort: the given graph is not a valid graphology instance.");if(r.type==="undirected"||r.undirectedSize!==0)throw new Error("graphology-dag/topological-sort: cannot work if graph is not directed.");if(r.order===0)return;let t=new iD(Array,r.order),i={},s=0;r.forEachNode((a,l)=>{let u=r.multi?sD(r,a):r.inDegree(a);u===0?t.push([a,l,0]):(i[a]=u,s+=u)});let n=0;function o(a,l){let u=--i[a];s--,u===0&&t.push([a,l,n+1]),i[a]=u}for(;t.size!==0;){let[a,l,u]=t.shift();n=u,e(a,l,u),r.forEachOutNeighbor(a,o)}if(s!==0)throw new Error("graphology-dag/topological-sort: given graph is not acyclic.")}function nD(r){if(!Tc(r))throw new Error("graphology-dag/topological-sort: the given graph is not a valid graphology instance.");let e=new Array(r.order),t=0;return u8(r,i=>{e[t++]=i}),e}function J5(r,e){if(!Tc(r))throw new Error("graphology-dag/topological-generations: the given graph is not a valid graphology instance.");if(r.order===0)return;let t=0,i=[];u8(r,(s,n,o)=>{o>t&&(e(i),t=o,i=[]),i.push(s)}),e(i)}function oD(r){if(!Tc(r))throw new Error("graphology-dag/topological-generations: the given graph is not a valid graphology instance.");let e=[];return J5(r,t=>{e.push(t)}),e}ml.topologicalSort=nD;ml.forEachNodeInTopologicalOrder=u8;ml.topologicalGenerations=oD;ml.forEachTopologicalGeneration=J5});var tp=Ie(Ks=>{Ks.hasCycle=K5();Ks.willCreateCycle=Q5();var Fc=ep();Ks.forEachNodeInTopologicalOrder=Fc.forEachNodeInTopologicalOrder;Ks.topologicalSort=Fc.topologicalSort;Ks.topologicalGenerations=Fc.topologicalGenerations;Ks.forEachTopologicalGeneration=Fc.forEachTopologicalGeneration});var Ip=Ie((Tl,b8)=>{(function(r,e){typeof Tl=="object"&&typeof b8=="object"?b8.exports=e():typeof define=="function"&&define.amd?define([],e):typeof Tl=="object"?Tl.Parsimmon=e():r.Parsimmon=e()})(typeof self<"u"?self:Tl,function(){return function(r){var e={};function t(i){if(e[i])return e[i].exports;var s=e[i]={i,l:!1,exports:{}};return r[i].call(s.exports,s,s.exports,t),s.l=!0,s.exports}return t.m=r,t.c=e,t.d=function(i,s,n){t.o(i,s)||Object.defineProperty(i,s,{configurable:!1,enumerable:!0,get:n})},t.r=function(i){Object.defineProperty(i,"__esModule",{value:!0})},t.n=function(i){var s=i&&i.__esModule?function(){return i.default}:function(){return i};return t.d(s,"a",s),s},t.o=function(i,s){return Object.prototype.hasOwnProperty.call(i,s)},t.p="",t(t.s=0)}([function(r,e,t){"use strict";function i(F){if(!(this instanceof i))return new i(F);this._=F}var s=i.prototype;function n(F,B){for(var v=0;v<F;v++)B(v)}function o(F,B,v){return function(_,M){n(M.length,function(R){_(M[R],R,M)})}(function(_,M,R){B=F(B,_,M,R)},v),B}function a(F,B){return o(function(v,_,M,R){return v.concat([F(_,M,R)])},[],B)}function l(F,B){var v={v:0,buf:B};return n(F,function(){var _;v={v:v.v<<1|(_=v.buf,_[0]>>7),buf:function(M){var R=o(function(G,H,X,ge){return G.concat(X===ge.length-1?Buffer.from([H,0]).readUInt16BE(0):ge.readUInt16BE(X))},[],M);return Buffer.from(a(function(G){return(G<<1&65535)>>8},R))}(v.buf)}}),v}function u(){return typeof Buffer<"u"}function h(){if(!u())throw new Error("Buffer global does not exist; please use webpack if you need to parse Buffers in the browser.")}function d(F){h();var B=o(function(R,G){return R+G},0,F);if(B%8!=0)throw new Error("The bits ["+F.join(", ")+"] add up to "+B+" which is not an even number of bytes; the total should be divisible by 8");var v,_=B/8,M=(v=function(R){return R>48},o(function(R,G){return R||(v(G)?G:R)},null,F));if(M)throw new Error(M+" bit range requested exceeds 48 bit (6 byte) Number max.");return new i(function(R,G){var H=_+G;return H>R.length?Q(G,_.toString()+" bytes"):W(H,o(function(X,ge){var Ne=l(ge,X.buf);return{coll:X.coll.concat(Ne.v),buf:Ne.buf}},{coll:[],buf:R.slice(G,H)},F).coll)})}function p(F,B){return new i(function(v,_){return h(),_+B>v.length?Q(_,B+" bytes for "+F):W(_+B,v.slice(_,_+B))})}function m(F,B){if(typeof(v=B)!="number"||Math.floor(v)!==v||B<0||B>6)throw new Error(F+" requires integer length in range [0, 6].");var v}function x(F){return m("uintBE",F),p("uintBE("+F+")",F).map(function(B){return B.readUIntBE(0,F)})}function C(F){return m("uintLE",F),p("uintLE("+F+")",F).map(function(B){return B.readUIntLE(0,F)})}function A(F){return m("intBE",F),p("intBE("+F+")",F).map(function(B){return B.readIntBE(0,F)})}function P(F){return m("intLE",F),p("intLE("+F+")",F).map(function(B){return B.readIntLE(0,F)})}function L(F){return F instanceof i}function I(F){return{}.toString.call(F)==="[object Array]"}function T(F){return u()&&Buffer.isBuffer(F)}function W(F,B){return{status:!0,index:F,value:B,furthest:-1,expected:[]}}function Q(F,B){return I(B)||(B=[B]),{status:!1,index:-1,value:null,furthest:F,expected:B}}function O(F,B){if(!B||F.furthest>B.furthest)return F;var v=F.furthest===B.furthest?function(_,M){if(function(){if(i._supportsSet!==void 0)return i._supportsSet;var E0=typeof Set<"u";return i._supportsSet=E0,E0}()&&Array.from){for(var R=new Set(_),G=0;G<M.length;G++)R.add(M[G]);var H=Array.from(R);return H.sort(),H}for(var X={},ge=0;ge<_.length;ge++)X[_[ge]]=!0;for(var Ne=0;Ne<M.length;Ne++)X[M[Ne]]=!0;var e0=[];for(var ze in X)({}).hasOwnProperty.call(X,ze)&&e0.push(ze);return e0.sort(),e0}(F.expected,B.expected):B.expected;return{status:F.status,index:F.index,value:F.value,furthest:B.furthest,expected:v}}var z={};function oe(F,B){if(T(F))return{offset:B,line:-1,column:-1};F in z||(z[F]={});for(var v=z[F],_=0,M=0,R=0,G=B;G>=0;){if(G in v){_=v[G].line,R===0&&(R=v[G].lineStart);break}(F.charAt(G)===`
`||F.charAt(G)==="\r"&&F.charAt(G+1)!==`
`)&&(M++,R===0&&(R=G+1)),G--}var H=_+M,X=B-R;return v[B]={line:H,lineStart:R},{offset:B,line:H+1,column:X+1}}function J(F){if(!L(F))throw new Error("not a parser: "+F)}function ne(F,B){return typeof F=="string"?F.charAt(B):F[B]}function Ee(F){if(typeof F!="number")throw new Error("not a number: "+F)}function q(F){if(typeof F!="function")throw new Error("not a function: "+F)}function Z(F){if(typeof F!="string")throw new Error("not a string: "+F)}var Ce=2,pe=3,ve=8,Ge=5*ve,Fe=4*ve,nt=" ";function n0(F,B){return new Array(B+1).join(F)}function k0(F,B,v){var _=B-F.length;return _<=0?F:n0(v,_)+F}function yt(F,B,v,_){return{from:F-B>0?F-B:0,to:F+v>_?_:F+v}}function ot(F,B){var v,_,M,R,G,H=B.index,X=H.offset,ge=1;if(X===F.length)return"Got the end of the input";if(T(F)){var Ne=X-X%ve,e0=X-Ne,ze=yt(Ne,Ge,Fe+ve,F.length),E0=a(function(Ze){return a(function(lt){return k0(lt.toString(16),2,"0")},Ze)},function(Ze,lt){var Te=Ze.length,z0=[],et=0;if(Te<=lt)return[Ze.slice()];for(var W0=0;W0<Te;W0++)z0[et]||z0.push([]),z0[et].push(Ze[W0]),(W0+1)%lt==0&&et++;return z0}(F.slice(ze.from,ze.to).toJSON().data,ve));R=function(Ze){return Ze.from===0&&Ze.to===1?{from:Ze.from,to:Ze.to}:{from:Ze.from/ve,to:Math.floor(Ze.to/ve)}}(ze),_=Ne/ve,v=3*e0,e0>=4&&(v+=1),ge=2,M=a(function(Ze){return Ze.length<=4?Ze.join(" "):Ze.slice(0,4).join(" ")+" "+Ze.slice(4).join(" ")},E0),(G=(8*(R.to>0?R.to-1:R.to)).toString(16).length)<2&&(G=2)}else{var u0=F.split(/\r\n|[\n\r\u2028\u2029]/);v=H.column-1,_=H.line-1,R=yt(_,Ce,pe,u0.length),M=u0.slice(R.from,R.to),G=R.to.toString().length}var xt=_-R.from;return T(F)&&(G=(8*(R.to>0?R.to-1:R.to)).toString(16).length)<2&&(G=2),o(function(Ze,lt,Te){var z0,et=Te===xt,W0=et?"> ":nt;return z0=T(F)?k0((8*(R.from+Te)).toString(16),G,"0"):k0((R.from+Te+1).toString(),G," "),[].concat(Ze,[W0+z0+" | "+lt],et?[nt+n0(" ",G)+" | "+k0("",v," ")+n0("^",ge)]:[])},[],M).join(`
`)}function $t(F,B){return[`
`,"-- PARSING FAILED "+n0("-",50),`
`,ot(F,B),`
`,(v=B.expected,v.length===1?`Expected:
`+v[0]:`Expected one of the following:
`+v.join(", ")),`
`].join("");var v}function ue(F){return F.flags!==void 0?F.flags:[F.global?"g":"",F.ignoreCase?"i":"",F.multiline?"m":"",F.unicode?"u":"",F.sticky?"y":""].join("")}function re(){for(var F=[].slice.call(arguments),B=F.length,v=0;v<B;v+=1)J(F[v]);return i(function(_,M){for(var R,G=new Array(B),H=0;H<B;H+=1){if(!(R=O(F[H]._(_,M),R)).status)return R;G[H]=R.value,M=R.index}return O(W(M,G),R)})}function fe(){var F=[].slice.call(arguments);if(F.length===0)throw new Error("seqMap needs at least one argument");var B=F.pop();return q(B),re.apply(null,F).map(function(v){return B.apply(null,v)})}function at(){var F=[].slice.call(arguments),B=F.length;if(B===0)return P0("zero alternates");for(var v=0;v<B;v+=1)J(F[v]);return i(function(_,M){for(var R,G=0;G<F.length;G+=1)if((R=O(F[G]._(_,M),R)).status)return R;return R})}function D0(F,B){return M0(F,B).or(V0([]))}function M0(F,B){return J(F),J(B),fe(F,B.then(F).many(),function(v,_){return[v].concat(_)})}function l0(F){Z(F);var B="'"+F+"'";return i(function(v,_){var M=_+F.length,R=v.slice(_,M);return R===F?W(M,R):Q(_,B)})}function He(F,B){(function(M){if(!(M instanceof RegExp))throw new Error("not a regexp: "+M);for(var R=ue(M),G=0;G<R.length;G++){var H=R.charAt(G);if(H!=="i"&&H!=="m"&&H!=="u"&&H!=="s")throw new Error('unsupported regexp flag "'+H+'": '+M)}})(F),arguments.length>=2?Ee(B):B=0;var v=function(M){return RegExp("^(?:"+M.source+")",ue(M))}(F),_=""+F;return i(function(M,R){var G=v.exec(M.slice(R));if(G){if(0<=B&&B<=G.length){var H=G[0],X=G[B];return W(R+H.length,X)}return Q(R,"valid match group (0 to "+G.length+") in "+_)}return Q(R,_)})}function V0(F){return i(function(B,v){return W(v,F)})}function P0(F){return i(function(B,v){return Q(v,F)})}function J0(F){if(L(F))return i(function(B,v){var _=F._(B,v);return _.index=v,_.value="",_});if(typeof F=="string")return J0(l0(F));if(F instanceof RegExp)return J0(He(F));throw new Error("not a string, regexp, or parser: "+F)}function ur(F){return J(F),i(function(B,v){var _=F._(B,v),M=B.slice(v,_.index);return _.status?Q(v,'not "'+M+'"'):W(v,null)})}function o0(F){return q(F),i(function(B,v){var _=ne(B,v);return v<B.length&&F(_)?W(v+1,_):Q(v,"a character/byte matching "+F)})}function fs(F,B){arguments.length<2&&(B=F,F=void 0);var v=i(function(_,M){return v._=B()._,v._(_,M)});return F?v.desc(F):v}function _r(){return P0("fantasy-land/empty")}s.parse=function(F){if(typeof F!="string"&&!T(F))throw new Error(".parse must be called with a string or Buffer as its argument");var B,v=this.skip(gs)._(F,0);return B=v.status?{status:!0,value:v.value}:{status:!1,index:oe(F,v.furthest),expected:v.expected},delete z[F],B},s.tryParse=function(F){var B=this.parse(F);if(B.status)return B.value;var v=$t(F,B),_=new Error(v);throw _.type="ParsimmonError",_.result=B,_},s.assert=function(F,B){return this.chain(function(v){return F(v)?V0(v):P0(B)})},s.or=function(F){return at(this,F)},s.trim=function(F){return this.wrap(F,F)},s.wrap=function(F,B){return fe(F,this,B,function(v,_){return _})},s.thru=function(F){return F(this)},s.then=function(F){return J(F),re(this,F).map(function(B){return B[1]})},s.many=function(){var F=this;return i(function(B,v){for(var _=[],M=void 0;;){if(!(M=O(F._(B,v),M)).status)return O(W(v,_),M);if(v===M.index)throw new Error("infinite loop detected in .many() parser --- calling .many() on a parser which can accept zero characters is usually the cause");v=M.index,_.push(M.value)}})},s.tieWith=function(F){return Z(F),this.map(function(B){if(function(M){if(!I(M))throw new Error("not an array: "+M)}(B),B.length){Z(B[0]);for(var v=B[0],_=1;_<B.length;_++)Z(B[_]),v+=F+B[_];return v}return""})},s.tie=function(){return this.tieWith("")},s.times=function(F,B){var v=this;return arguments.length<2&&(B=F),Ee(F),Ee(B),i(function(_,M){for(var R=[],G=void 0,H=void 0,X=0;X<F;X+=1){if(H=O(G=v._(_,M),H),!G.status)return H;M=G.index,R.push(G.value)}for(;X<B&&(H=O(G=v._(_,M),H),G.status);X+=1)M=G.index,R.push(G.value);return O(W(M,R),H)})},s.result=function(F){return this.map(function(){return F})},s.atMost=function(F){return this.times(0,F)},s.atLeast=function(F){return fe(this.times(F),this.many(),function(B,v){return B.concat(v)})},s.map=function(F){q(F);var B=this;return i(function(v,_){var M=B._(v,_);return M.status?O(W(M.index,F(M.value)),M):M})},s.contramap=function(F){q(F);var B=this;return i(function(v,_){var M=B.parse(F(v.slice(_)));return M.status?W(_+v.length,M.value):M})},s.promap=function(F,B){return q(F),q(B),this.contramap(F).map(B)},s.skip=function(F){return re(this,F).map(function(B){return B[0]})},s.mark=function(){return fe(Cr,this,Cr,function(F,B,v){return{start:F,value:B,end:v}})},s.node=function(F){return fe(Cr,this,Cr,function(B,v,_){return{name:F,value:v,start:B,end:_}})},s.sepBy=function(F){return D0(this,F)},s.sepBy1=function(F){return M0(this,F)},s.lookahead=function(F){return this.skip(J0(F))},s.notFollowedBy=function(F){return this.skip(ur(F))},s.desc=function(F){I(F)||(F=[F]);var B=this;return i(function(v,_){var M=B._(v,_);return M.status||(M.expected=F),M})},s.fallback=function(F){return this.or(V0(F))},s.ap=function(F){return fe(F,this,function(B,v){return B(v)})},s.chain=function(F){var B=this;return i(function(v,_){var M=B._(v,_);return M.status?O(F(M.value)._(v,M.index),M):M})},s.concat=s.or,s.empty=_r,s.of=V0,s["fantasy-land/ap"]=s.ap,s["fantasy-land/chain"]=s.chain,s["fantasy-land/concat"]=s.concat,s["fantasy-land/empty"]=s.empty,s["fantasy-land/of"]=s.of,s["fantasy-land/map"]=s.map;var Cr=i(function(F,B){return W(B,oe(F,B))}),Qr=i(function(F,B){return B>=F.length?Q(B,"any character/byte"):W(B+1,ne(F,B))}),Jr=i(function(F,B){return W(F.length,F.slice(B))}),gs=i(function(F,B){return B<F.length?Q(B,"EOF"):W(B,null)}),ms=He(/[0-9]/).desc("a digit"),ys=He(/[0-9]*/).desc("optional digits"),on=He(/[a-z]/i).desc("a letter"),Ro=He(/[a-z]*/i).desc("optional letters"),xs=He(/\s*/).desc("optional whitespace"),Lo=He(/\s+/).desc("whitespace"),an=l0("\r"),ki=l0(`
`),vs=l0(`\r
`),Ds=at(vs,ki,an).desc("newline"),ln=at(Ds,gs);i.all=Jr,i.alt=at,i.any=Qr,i.cr=an,i.createLanguage=function(F){var B={};for(var v in F)({}).hasOwnProperty.call(F,v)&&function(_){B[_]=fs(function(){return F[_](B)})}(v);return B},i.crlf=vs,i.custom=function(F){return i(F(W,Q))},i.digit=ms,i.digits=ys,i.empty=_r,i.end=ln,i.eof=gs,i.fail=P0,i.formatError=$t,i.index=Cr,i.isParser=L,i.lazy=fs,i.letter=on,i.letters=Ro,i.lf=ki,i.lookahead=J0,i.makeFailure=Q,i.makeSuccess=W,i.newline=Ds,i.noneOf=function(F){return o0(function(B){return F.indexOf(B)<0}).desc("none of '"+F+"'")},i.notFollowedBy=ur,i.of=V0,i.oneOf=function(F){for(var B=F.split(""),v=0;v<B.length;v++)B[v]="'"+B[v]+"'";return o0(function(_){return F.indexOf(_)>=0}).desc(B)},i.optWhitespace=xs,i.Parser=i,i.range=function(F,B){return o0(function(v){return F<=v&&v<=B}).desc(F+"-"+B)},i.regex=He,i.regexp=He,i.sepBy=D0,i.sepBy1=M0,i.seq=re,i.seqMap=fe,i.seqObj=function(){for(var F,B={},v=0,_=(F=arguments,Array.prototype.slice.call(F)),M=_.length,R=0;R<M;R+=1){var G=_[R];if(!L(G)){if(I(G)&&G.length===2&&typeof G[0]=="string"&&L(G[1])){var H=G[0];if(Object.prototype.hasOwnProperty.call(B,H))throw new Error("seqObj: duplicate key "+H);B[H]=!0,v++;continue}throw new Error("seqObj arguments must be parsers or [string, parser] array pairs.")}}if(v===0)throw new Error("seqObj expects at least one named parser, found zero");return i(function(X,ge){for(var Ne,e0={},ze=0;ze<M;ze+=1){var E0,u0;if(I(_[ze])?(E0=_[ze][0],u0=_[ze][1]):(E0=null,u0=_[ze]),!(Ne=O(u0._(X,ge),Ne)).status)return Ne;E0&&(e0[E0]=Ne.value),ge=Ne.index}return O(W(ge,e0),Ne)})},i.string=l0,i.succeed=V0,i.takeWhile=function(F){return q(F),i(function(B,v){for(var _=v;_<B.length&&F(ne(B,_));)_++;return W(_,B.slice(v,_))})},i.test=o0,i.whitespace=Lo,i["fantasy-land/empty"]=_r,i["fantasy-land/of"]=V0,i.Binary={bitSeq:d,bitSeqObj:function(F){h();var B={},v=0,_=a(function(R){if(I(R)){var G=R;if(G.length!==2)throw new Error("["+G.join(", ")+"] should be length 2, got length "+G.length);if(Z(G[0]),Ee(G[1]),Object.prototype.hasOwnProperty.call(B,G[0]))throw new Error("duplicate key in bitSeqObj: "+G[0]);return B[G[0]]=!0,v++,G}return Ee(R),[null,R]},F);if(v<1)throw new Error("bitSeqObj expects at least one named pair, got ["+F.join(", ")+"]");var M=a(function(R){return R[0]},_);return d(a(function(R){return R[1]},_)).map(function(R){return o(function(G,H){return H[0]!==null&&(G[H[0]]=H[1]),G},{},a(function(G,H){return[G,R[H]]},M))})},byte:function(F){if(h(),Ee(F),F>255)throw new Error("Value specified to byte constructor ("+F+"=0x"+F.toString(16)+") is larger in value than a single byte.");var B=(F>15?"0x":"0x0")+F.toString(16);return i(function(v,_){var M=ne(v,_);return M===F?W(_+1,M):Q(_,B)})},buffer:function(F){return p("buffer",F).map(function(B){return Buffer.from(B)})},encodedString:function(F,B){return p("string",B).map(function(v){return v.toString(F)})},uintBE:x,uint8BE:x(1),uint16BE:x(2),uint32BE:x(4),uintLE:C,uint8LE:C(1),uint16LE:C(2),uint32LE:C(4),intBE:A,int8BE:A(1),int16BE:A(2),int32BE:A(4),intLE:P,int8LE:P(1),int16LE:P(2),int32LE:P(4),floatBE:p("floatBE",4).map(function(F){return F.readFloatBE(0)}),floatLE:p("floatLE",4).map(function(F){return F.readFloatLE(0)}),doubleBE:p("doubleBE",8).map(function(F){return F.readDoubleBE(0)}),doubleLE:p("doubleLE",8).map(function(F){return F.readDoubleLE(0)})},r.exports=i}])})});var dD={};C8(dD,{default:()=>g1});module.exports=Op(dD);var Zr=require("obsidian");var f=class{},Il=class{constructor(e){this.interactiveManagers=new Map;this.legendUI=null;this.foldersUI=null;this.colorGroupHaveChanged=!1;this.statePinnedNodes=null;this.view=e,this.settings=structuredClone(f.settings),this.type=this.view.getViewType()==="graph"?"graph":"localgraph",this.engine=ri(this.view),this.renderer=this.view.renderer}};var Gp=require("util"),kl=class{constructor(){this.coreTargets=new Map}registerProxy(e,t,i){if(!(t in e)){console.warn("Invalid property while creating proxy:",t);return}let s=e[t];if(!s){console.warn("Trying to create a proxy for a undefined or null property:",t);return}if(this.isProxy(s))return;let n=new Proxy(e[t],i);return e[t]=n,this.coreTargets.set(n,{owner:e,property:t,coreTarget:s}),n}isProxy(e){return Gp.types.isProxy(e)}getTargetForOwner(e,t){return[...this.coreTargets.values()].find(i=>i.owner===e&&t===t)}unregisterProxy(e){if(e==null||!this.isProxy(e))return;let t=this.coreTargets.get(e);if(t){let{owner:i,property:s,coreTarget:n}=t;this.coreTargets.delete(e),i[s]===e?i[s]=n:(console.warn("The core reference is no longer pointing to the proxy. Instead :"),console.warn(i[s]))}else console.warn("Proxy not found")}unregisterAll(){for(let[e,t]of this.coreTargets){let{owner:i,property:s,coreTarget:n}=t;this.coreTargets.delete(e),i[s]===e&&(i[s]=n)}}};var j0=require("obsidian");var vt=class vt{static async localize(){let e;switch(window.localStorage.language){case"fr":e=await Promise.resolve().then(()=>h0(M8()));break;default:return}this.localizeDefaultStrings(this,e)}static localizeDefaultStrings(e,t){for(let[i,s]of Object.entries(t))typeof e[i]=="object"?typeof s=="object"&&this.localizeDefaultStrings(e[i],s):typeof s=="string"&&(e[i]=s)}};vt.plugin={default:"Default",folder:"Folder",filter:"Filter",nodeName:"Node name",info:"Info",name:"Extended graph",nodes:"Nodes",options:"Options",source:"Source",target:"Target",valuePlaceholder:"value..."},vt.controls={add:"Add",apply:"Apply",back:"Back",cancel:"Cancel",delete:"Delete",disable:"Disable",disableAll:"Disable all",edit:"Edit",enable:"Enable",enabled:"Enabled",enableAll:"Enable all",hideRow:"Hide row",manage:"Manage",moveUp:"Move up",moveDown:"Move down",no:"No",openLegend:"Open legend (tags, links, properties)",page:"Page",pageCurrent:"Current page",pageFirst:"First page",pageLast:"Last page",pathRegexPlaceholder:'Enter path or "/regex/"...',resetGraph:"Reset graph",save:"Save",show:"Show",toggle:"Toggle",toggleAll:"Toggle all",toggleAllWithAtLeastOneNode:"Toggle all (at least one node)",rows:"rows",yes:"Yes"},vt.errors={uri401:"Unauthorized URL (Code 401) while trying to get an image for a node. This probably means that the URL is invalid. No image will be loaded and this message can safely be ignored.",issueNeedView:"There was an issue with the plugin "+vt.plugin.name+". Please close the graph view and open it again."},vt.beta={beta:"Beta features",enableCSS:"Enable CSS customization",enableCSSDesc:"Allows the plugin to inject custom CSS into the graph view for further customization. Write the name of the CSS snippet to use.",radialMenu:"Enable the node radial context menu",radialMenuDesc:"When doing a right click on a node while holding the Shift key down, it will show a radial context menu with data from the extended graph plugin, rather than the usual context menu.",revertAction:"Revert action",revertActionDesc:"If the max number of nodes is reached, try to reverse last action instead of disabling the plugin"},vt.features={animateDotsOnLinks:"Animate dots on links",animateDotsOnLinksDesc:"Animate dots on links when a node is hovered to show the flow of information",animateDotsOnLinksSpeed:"Animation speed",animateDotsOnLinksSpeedDesc:"Speed of the animation of the dots on links",arrows:"Arrows",arrowsDesc:"Customize how arrows are displayed",arrowsColoredFronLinks:"Color from links",arrowsColoredFromLinksDesc:"Use the links colors for the arrows",arrowsColor:"Custom color",arrowsColorDesc:"Pick a custom color for the links arrows",arrowsInvert:"Invert arrows",arrowsInvertDesc:"Invert the direction of the arrows on the links",arrowsFixedSize:"Fixed size",arrowsFixedSizeDesc:"Prevent the arrows to scale down or up when zooming",arrowsFlat:"Triangle arrows",arrowsFlatDesc:"Use triangle arrows instead of the default curved ones",arrowsOpaque:"Opaque arrows",arrowsOpaqueDesc:"Remove any transparency from the arrow so they are fully opaque",arrowsOpaqueAlways:"Always",arrowsOpaqueKeepFading:"Only when zoomed",arrowsScale:"Scale",arrowsScaleDesc:"Increase or decrease the scale of arrows",automation:"Automation",autoEnable:"Auto enable",autoEnableDesc:"Auto enable the plugin in graph views",autoReset:"Reset graph views after changes",autoResetDesc:"Reset the plugin in the graph views where it is enabled, if settings have changed after closing this tab",borderUnresolved:"Border of unresolved nodes",borderUnresolvedDesc:"If between 0 and 1 (excluded), unresolved nodes will only show an outside circle border instead of a full disk",disableNodes:"Disable nodes",disableNodesDesc:"When all arcs are disabled on the node, remove it from the graph",excludeSourceFolders:"Exclude source folders",excludeSourceFoldersDesc:"Exclude forward links with source inside some folders (i.e. links coming out one of these folders)",excludeTargetFolders:"Exclude target folders",excludeTargetFoldersDesc:"Exclude backward links with target inside some folders (i.e. links going in one of these folders)",excludedFolders:"Excluded folders",noExclusionFilter:"No excluded filter is applied right now. Add one below.",withExclusionFilter:"Files matching the following filters are currently excluded:",focus:"Focus",focusDesc:"Scale up the node corresponding to the active note",focusScale:"Scale factor",focusScaleDesc:"The node corresponding to the currently active note will be scaled up by this factor",folders:"Folders",foldersDesc:"Display folder boxes",folderShowFullPath:"Show full path",folderShowFullPathDesc:"If enable, the full path of the folder will be displayed ; if disabled, only the folder name will be displayed",foldersRadius:"Radius",foldersRadiusDesc:"Radius of the rounded corners of the folder boxes",globalFilter:"Global filter",globalFilterDesc:"This filter query will be prepend at the beginning of every graph filter",icons:"Icons",iconsDesc:"Use icons or emoji for nodes",iconProperties:"Icon properties",iconPropertiesDesc:"Keys (names) of the properties that can be used to query the icon of the node's note. Supported values in the frontmatter can be either unicode emojis or Lucide icon identifiers.",iconPropertiesAdd:"Add icon property",iconUsePlugin:'Use "Iconic" or "Iconize"',iconUsePluginDesc:'Use the icons set in the file explorer via "Iconic" or "Iconize" community plugins',iconUsePluginColor:'Use "Iconic" or "Iconize" for color',iconUsePluginColorDesc:'Use the color of the icons set in the file explorer via "Iconic" or "Iconize"',iconUseParentIcon:"Use the icon of a parent folder",iconUseParentIconDesc:'If no icon is set on the file itself with "Iconic" or "Iconize", it will try to find one set on a parent folder',image:"Image",imageDesc:"Display image on top of nodes",imagesAllowExternal:"Allow images from the web",imagesAllowExternalDesc:"Allow the loading of external images via http: and https: protocols",imagesAllowExternalLocal:"Allow local images outside of the vault",imagesAllowExternalLocalDesc:"Allow the loading of external images via file: and app: protocols",imagesFromProperty:"From a property",imagesFromPropertyDesc:"Display image from a property in the frontmatter",imagesFromEmbeds:"From embeds",imagesFromEmbedsDesc:'Display an image if one is found among the embeds in the note. The setting "From a property" has priority.',imagesForAttachments:"For attachments",imagesForAttachmentsDesc:"Display image for attachment nodes",imageProperties:"Image properties",imagePropertiesDesc:"Names of the properties that can be used to query the image of the node's note",imagePropertiesAdd:"Add image property",imageBorderWidth:"Border width (%)",imageBorderWidthDesc:"Percentage of the node's background that will stay visible as a border",interactives:{arcsAdd:"Add arcs",arcsAddPropertyDesc:"Add arcs around the nodes to visualize the property values",arcsAddTagDesc:"Add arcs around the nodes to visualize the tags",arcsSpread:"Spread arcs",arcsSpreadDesc:"Spread the arcs around the nodes to fill the available space",arcWeight:"Weight arc length",arcWeightDesc:"Use the number of time the value is found to determine arcs lengths (requires 'Spread arcs' to be enabled)",colorLinks:"Color links",colorLinksDesc:"Add colors to the link rendered in the graph view",curvedLinks:"Curved links",curvedLinksDesc:"Use curved links instead of straight lines",links:"Links",linksDesc:"Display and filter link types",noneTypeID:"None type id",noneTypeIDDesc:"The id which will be given if nothing is found for ",palette:"Color palette",paletteDesc:"Choose the color palette for ",paletteMatplotlibDesc:"These colormaps come from matplotlib. You can see more about them here: ",palettePickGradient:"Pick palette gradient",properties:"Properties",propertiesDesc:"Display and filter by property values",property:"Property",propertyDesc:"Display and filter property ",propertyAlreadyExists:"This property already exists",propertyReservedFolders:"This property key is reserved for folders",propertyReservedLinks:"This property key is reserved for links",propertyReservedTags:"This property key is reserved for tags",selection:"Selection",selectionDesc:"Choose which values should be considered by the plugin",selectionFor:"Selection for",specificColors:"Specific colors",specificColorsDesc:"Choose specific colors to override the color palette",tags:"Tags",tagsDesc:"Display and filter by tags"},linksAllowMultipleTypes:"Draw multiple types",linksAllowMultipleTypesDesc:"Allow the graph to draw multiple types of links between two nodes",linksOutline:"Outline links",linksOutlineDesc:"Add a thin outline to the links and the arrows (when opaque)",linksSameColorAsNode:"Color link based on source",linksSameColorAsNodeDesc:"Use the color of the source node to color links",linksFeatureRequired:"The Links feature needs to be enabled.",pinnedNodes:"Pinned nodes",pinNode:"Pin node",unpinNode:"Unpin node",unpinAllNodes:"Unpin all nodes",pinMultipleNodes:"Pin multiple nodes",pinMultipleShape:"Shape",pinMultipleGap:"Gap between nodes",pinMultipleCenter:"Center",pinMultipleGridSize:"Number of columns",pinMultipleGridSizeDesc:"Values can be 'N' (single row), 'auto' (square grid) or a positive integer",size:"Size",elementsStats:"Nodes and links statistics",elementsStatsDesc:"Choose how nodes and links sizes/colors must be computed",linkSizesFunction:"Link size function",linkSizesFunctionDesc:"Select how the graph engine should compute the thickness of the links",linkColorsFunction:"Link color function",linkColorsFunctionDesc:"Select how the graph engine should compute the color of the links",linkColorsPaletteDesc:"Choose the color palette for the links",names:"Nodes names",namesDesc:"Customize how nodes names are displayed",namesNumberOfCharacters:"Characters limit",namesNumberOfCharactersDesc:"Maximum number of characters to display for the node name. Leave empty to display the full name.",namesShowOnlyFileName:"Filename only",namesShowOnlyFileNameDesc:"Show only the file name without the path",namesNoExtension:"Hide extension",namesNoExtensionDesc:"Remove the file extension from the name",namesUseProperties:"Use properties",namesUsePropertiesDesc:"Use one of the desired properties as the node name instead of the filename",namesUsePropertiesAdd:"Add node name property",namesBackground:"Add a background",namesBackgroundDesc:"Add a background to the node name in order to make it more readable by hiding elements behind it",namesInterfaceFont:"Use interface font",namesInterfaceFontDesc:"Use the same font as the one for your vault's interface",namesShowWhenNeighborHighlighted:"Always show when hovering neighbor node",namesShowWhenNeighborHighlightedDesc:"Shows the text even when fully zoomed out if a connected neighbor node is highlighted",namesVerticalOffset:"Vertical offset",namesVerticalOffsetDesc:"Vertical offset of the text. Positive value will push the text lower, and positive value will move it higher.",namesDynamicVerticalOffset:"Dynamic vertical offset",namesDynamicVerticalOffsetDesc:"Dynamically adapt the vertical position of the text to the size of the arrows.",nodeSizesFunction:"Node size function",nodeSizesFunctionDesc:"Select how the graph engine should compute the size of the nodes",nodeSizeProperties:"Node size properties",nodeSizePropertiesDesc:"Names of the properties that can be used to specify the size of the node. They must be of type number. A value of 100 is the default.",nodeSizePropertiesAdd:"Add node size property",nodeColorsFunction:"Node color function",nodeColorsFunctionDesc:"Select how the graph engine should compute the color of the nodes",nodeColorsPaletteDesc:"Choose the color palette for the nodes",nodeStatsInvert:"Reverse graph to compute node statistics",nodeStatsInvertDesc:"When computing the node statistics, reverse the graph so that the source nodes become targets and vice versa",openInNewTab:"Open nodes in new tab",openInNewTabDesc:"Always open the nodes in a new tab when left clicking on them",otherDisplay:"Other display options",performance:"Performances",performanceDelay:"Initialization delay (milliseconds)",performanceDelayDesc:"Because of asynchronous mechanics, it can be needed to wait a time before starting initializing the extended features",performanceMaxNodes:"Maximum number of nodes",performanceMaxNodesDesc:"If the graph contains more nodes than this setting, the plugin will be disabled",removeSources:"Remove sources",removeSourcesDesc:"When disabling a link type, also disable the source nodes",removeTargets:"Remove targets",removeTargetsDesc:"When disabling a link type, also disable the source nodes",shape:"Shape",shapes:"Shapes",shapesDesc:"Use nodes of various shapes",shapePick:"Pick shape",shapesNames:{circle:"circle",square:"square",triangle:"triangle",diamond:"diamond",pentagon:"pentagon",hexagon:"hexagon",octagon:"octagon",decagon:"decagon",star4:"star (4)",star5:"star (5)",star6:"star (6)",star8:"star (8)",star10:"star (10)",polygon:"polygon",starburst:"starburst",grid:"grid",line:"line",unknown:"unknown"},svgScreenshotArcs:"Show arcs (tags and/or types)",svgScreenshotCopy:"Copy SVG screenshot",svgScreenshotCopyCode:"Copy SVG code to clipboard",svgScreenshotCopyImage:"Copy SVG image to clipboard",svgScreenshotCurvedLinks:"Use curved links",svgScreenshotNodeNames:"Show node names",svgScreenshotNodeShapes:"Use nodes shapes",svgScreenshotOptions:"SVG Screenshot options",svgScreenshotVisibleArea:"Export only visible area",zoomOnNode:"Zoom on node",zoomScale:"Zoom scale",zoomScaleDesc:"When zooming on a node, set the used scale"},vt.notices={changeInSettings:"You can change this in the settings",disabled:"disabled",graphAnalysisPluginRequired:"Graph Analysis community plugin must be enabled to use this function",invalidCharacter:"Invalid character",nlpPluginRequired:"NLP community plugin must be enabled to use this function",nodeLimiteExceeded:"Try to handle too many nodes",nodeLimitIs:"The limit is",nodeStatSizeFailed:"Failed to compute the statistics for the nodes sizes",nodeStatColorFailed:"Failed to compute the statistics for the nodes colors",linkStatSizeFailed:"Failed to compute the statistics for the links thickness",linkStatColorFailed:"Failed to compute the statistics for the links colors",functionToDefault:"The default function has been set instead.",stateDeleted:"State has been removed",stateRenamed:"State has been renamed",stateSaved:"State has been saved",normalStateSave:"Engine options have been saved for the normal state",svgCopied:"SVG copied to clipboard"},vt.query={AND:"AND",OR:"OR",combinationLogic:"Combination logic",editShapeQuery:"Edit shape query",setShapeQueryFor:"Set shape query for",files:"Files",logicKey:{contains:"contains",containsNot:"doesn't contain",is:"is",isNot:"is not",containsRegex:"contains regex",containsRegexNot:"doesn't contain regex",matchesRegex:"matches regex",matchesRegexNot:"doesn't match regex",isEmpty:"is empty",isEmptyNot:"is not empty"},matchingFiles:"Matching files",query:"Query",rules:"Rules",source:{all:"All",tag:"Tags",link:"Links",property:"Property",file:"File",folder:"Folder",folderRec:"Folder and subfolders",path:"Path"},viewMatches:"View matches"},vt.states={graphState:"Graph state",newStateName:"New state name",editStateName:"Edit state name",openSettings:"Open state settings",saveForDefaultState:"Save for default state",saveForDefaultStateDesc:"Save the current settings as the default state settings",saveForNormalState:"Save for normal state",saveForNormalStateDesc:"Save the current settings as the normal state settings (no plugin enabled)",showGraphState:"Show graph state",startingState:"Starting state",startingStateDesc:"Select which state should be used to initiate the plugin",states:"States"},vt.statsFunctions={AdamicAdar:"Adamic Adar",authority:"Authority centrality (from HITS)",backlinksCount:"Number of backlinks",betweenness:"Betweenness centrality",BoW:"Bag of words",closeness:"Closeness centrality",clusteringCoefficient:"Clustering coefficient",coCitations:"Co-citations",constant:"Constant",creationTime:"Time since file creation",degree:"Degree centrality",eccentricity:"Eccentricity in the connected graph",eigenvector:"Eigenvector centrality",filenameLength:"File name length",forwardlinksCount:"Number of forward links",forwardUniquelinksCount:"Number of unique forward links",hub:"Hub centrality (from HITS)",Jaccard:"Jaccard similarity",modifiedTime:"Time since last modification",OtsukaOchiai:"Otsuka-Ochiai coefficient",overlap:"Overlap coefficient",tagsCount:"Number of tags",topological:"Topological propagation",warningUnreliableOS:"This calculation is unreliable and might vary between OS.",sentiment:"Sentiment"},vt.UI={horizontalLegend:"Horizontal legend",horizontalLegendDesc:"Use a horizontal layout for the legend container (with tags, properties and tags toggle buttons)"},vt.localize();var E=vt;var Ml=class extends j0.Component{constructor(){super();this.globalUIs=new Map;this.optionsBackup=new Map;this.allInstances=new Map;this.activeFile=null;this.localGraphID=null;this.isHandlingMarkdownViewChange=!1}onload(){this.initiliazesNodeSizeCalculator(),this.initializeNodesColorCalculator(),this.initializeLinksSizeCalculator(),this.initializeLinksColorCalculator(),this.addStatusBarItem(),this.registerEvents()}registerEvents(){this.onMetadataCacheChange=this.onMetadataCacheChange.bind(this),this.registerEvent(f.app.metadataCache.on("changed",(t,i,s)=>{this.isCoreGraphLoaded()&&this.onMetadataCacheChange(t,i,s)})),this.onDelete=this.onDelete.bind(this),this.registerEvent(f.app.vault.on("delete",t=>{this.isCoreGraphLoaded()&&this.onDelete(t)})),this.onRename=this.onRename.bind(this),this.registerEvent(f.app.vault.on("rename",(t,i)=>{this.isCoreGraphLoaded()&&this.onRename(t,i)})),this.onCSSChange=this.onCSSChange.bind(this),this.registerEvent(f.app.workspace.on("css-change",()=>{this.isCoreGraphLoaded()&&this.onCSSChange()})),this.registerEvent(f.app.workspace.on("layout-change",()=>{this.isCoreGraphLoaded()&&f.plugin.onLayoutChange()})),this.onActiveLeafChange=this.onActiveLeafChange.bind(this),this.registerEvent(f.app.workspace.on("active-leaf-change",t=>{this.isCoreGraphLoaded()&&this.onActiveLeafChange(t)})),this.onFileOpen=this.onFileOpen.bind(this),this.registerEvent(f.app.workspace.on("file-open",t=>{this.isCoreGraphLoaded()&&this.onFileOpen(t)})),this.updatePaletteForInteractive=this.updatePaletteForInteractive.bind(this),this.registerEvent(f.app.workspace.on("extended-graph:settings-colorpalette-changed",t=>{this.isCoreGraphLoaded()&&this.updatePaletteForInteractive(t)})),this.updateColorForInteractiveType=this.updateColorForInteractiveType.bind(this),this.registerEvent(f.app.workspace.on("extended-graph:settings-interactive-color-changed",(t,i)=>{this.isCoreGraphLoaded()&&this.updateColorForInteractiveType(t,i)})),this.onNodeMenuOpened=this.onNodeMenuOpened.bind(this),this.registerEvent(f.app.workspace.on("file-menu",(t,i,s,n)=>{this.isCoreGraphLoaded()&&this.onNodeMenuOpened(t,i,s,n)}))}addStatusBarItem(){this.statusBarItem=f.plugin.addStatusBarItem(),this.statusBarItem.addClasses(["plugin-extended-graph"])}isCoreGraphLoaded(){return!!f.app.internalPlugins.getPluginById("graph")?._loaded}initiliazesNodeSizeCalculator(){try{this.nodesSizeCalculator=Ni.getCalculator("size")}catch(t){console.error(t),f.settings.nodesSizeFunction="default",f.plugin.saveSettings(),new Notice(`${E.notices.nodeStatSizeFailed} (${cn[f.settings.nodesSizeFunction]}). ${E.notices.functionToDefault}`),this.nodesSizeCalculator=void 0}this.nodesSizeCalculator?.computeStats(f.settings.invertNodeStats)}initializeNodesColorCalculator(){try{this.nodesColorCalculator=Ni.getCalculator("color")}catch(t){console.error(t),f.settings.nodesColorFunction="default",f.plugin.saveSettings(),new Notice(`${E.notices.nodeStatColorFailed} (${cn[f.settings.nodesColorFunction]}). ${E.notices.functionToDefault}`),this.nodesColorCalculator=void 0}this.nodesColorCalculator?.computeStats(f.settings.invertNodeStats)}initializeLinksSizeCalculator(){try{let t=this.getGraphAnalysis(),i=t["graph-analysis"]?.g;if(!i){this.linksSizeCalculator=void 0;return}if(!t.nlp&&Mi[f.settings.linksSizeFunction]){new Notice(`${E.notices.nlpPluginRequired} (${f.settings.linksSizeFunction})`),this.linksSizeCalculator=void 0,f.settings.linksSizeFunction="default",f.plugin.saveSettings();return}this.linksSizeCalculator=new Pi("size",i)}catch(t){console.error(t),f.settings.linksSizeFunction="default",f.plugin.saveSettings(),new Notice(`${E.notices.linkStatSizeFailed} (${hn[f.settings.linksSizeFunction]}). ${E.notices.functionToDefault}`),this.linksSizeCalculator=void 0}this.linksSizeCalculator?.computeStats(f.settings.linksSizeFunction)}initializeLinksColorCalculator(){try{let t=this.getGraphAnalysis(),i=t["graph-analysis"]?.g;if(!i){this.linksColorCalculator=void 0;return}if(!t.nlp&&Mi[f.settings.linksColorFunction]){new Notice(`${E.notices.nlpPluginRequired} (${f.settings.linksColorFunction})`),this.linksColorCalculator=void 0,f.settings.linksColorFunction="default",f.plugin.saveSettings();return}this.linksColorCalculator=new Pi("color",i)}catch(t){console.error(t),f.settings.linksColorFunction="default",f.plugin.saveSettings(),new Notice(`${E.notices.linkStatColorFailed} (${hn[f.settings.linksColorFunction]}). ${E.notices.functionToDefault}`),this.linksColorCalculator=void 0}this.linksColorCalculator?.computeStats(f.settings.linksColorFunction)}onCSSChange(){for(let t of this.allInstances.values())t.dispatcher.onCSSChange()}onMetadataCacheChange(t,i,s){for(let n of this.allInstances.values()){if(!n.graph||!n.renderer)return;let o=n.nodesSet.extendedElementsMap.get(t.path);if(!o)return;for(let[d,p]of n.nodesSet.managers){let m=[...r0(d,t)];m=m.filter(I=>!$0[d]?.includes(I)&&!f.settings.interactiveSettings[d].unselected.includes(I)),m.length===0&&m.push(n.settings.interactiveSettings[d].noneType);let{typesToRemove:x,typesToAdd:C}=o.matchesTypes(d,[...m]);for(let I of x)n.nodesSet.typesMap[d][I].delete(o.id);for(let I of C)n.nodesSet.typesMap[d][I]||(n.nodesSet.typesMap[d][I]=new Set),n.nodesSet.typesMap[d][I].add(o.id);o.setTypes(d,new Set(m));let A=x.filter(I=>n.nodesSet.typesMap[d][I].size===0);A.length>0&&p.removeTypes(A);let P=p.getTypes(),L=C.filter(I=>!P.includes(I));L.length>0&&p.addTypes(L),A.length===0&&L.length===0&&(x.length>0||C.length>0)&&o.graphicsWrapper.resetManagerGraphics(p)}let a=Bi(n.settings,t),l=n.linksSet.managers.get(de);if(!l)return;for(let[d,p]of a){let m=n.linksSet.extendedElementsMap.get(Dt({source:{id:t.path},target:{id:d}}));if(!m)continue;p=new Set([...p].filter(I=>!$0[de]?.includes(I)&&!f.settings.interactiveSettings[de].unselected.includes(I))),p.size===0&&p.add(n.settings.interactiveSettings[de].noneType);let{typesToRemove:x,typesToAdd:C}=m.matchesTypes(de,[...p]);for(let I of x)n.linksSet.typesMap[de][I].delete(m.id);for(let I of C)n.linksSet.typesMap[de][I]||(n.linksSet.typesMap[de][I]=new Set),n.linksSet.typesMap[de][I].add(m.id);m.setTypes(de,new Set(p));let A=x.filter(I=>n.nodesSet.typesMap[de][I].size===0);A.length>0&&l.removeTypes(A);let P=l.getTypes(),L=C.filter(I=>!P.includes(I));L.length>0&&l.addTypes(L),A.length===0&&L.length===0&&(x.length>0||C.length>0)&&m.graphicsWrapper?.resetManagerGraphics(l)}let u=Array.from(n.linksSet.extendedElementsMap.values()).filter(d=>d.coreElement.source.id===t.path),h=[];for(let d of u)a.has(d.coreElement.target.id)||(d.graphicsWrapper?.disconnect(),h.push(d.id));for(let d of h)n.linksSet.extendedElementsMap.delete(d)}}onDelete(t){let i=t.path;if(t instanceof j0.TFile)for(let[s,n]of this.allInstances){let o=n.nodesSet,a=o.extendedElementsMap.get(i);if(!a)continue;for(let[h,d]of o.managers){let p=a.getTypes(h),m=[];for(let x of p)o.typesMap[h][x].delete(i),o.typesMap[h][x]?.size===0&&m.push(x);d.removeTypes(m)}o.extendedElementsMap.delete(i),o.connectedIDs.delete(i),a?.graphicsWrapper?.disconnect(),a?.graphicsWrapper?.destroyGraphics();let l=n.linksSet,u=[...l.extendedElementsMap.values()].filter(h=>h.coreElement.source.id===i);for(let h of u){let d=h.id,p=h.getTypes(de),m=[];for(let x of p)l.typesMap[de][x].delete(d),l.typesMap[de][x]?.size===0&&m.push(x);l.managers.get(de)?.removeTypes(m),l.extendedElementsMap.delete(d),l.connectedIDs.delete(d),h?.graphicsWrapper?.disconnect(),h?.graphicsWrapper?.destroyGraphics()}}else if(t instanceof j0.TFolder)for(let[s,n]of this.allInstances)n.foldersSet?.managers.get(he)?.removeTypes([i])}onRename(t,i){let s=t.path,n;t instanceof j0.TFile?n=function(o,a){return o===a}:n=function(o,a){return a.startsWith(o+"/")};for(let[o,a]of this.allInstances){for(let[u,h]of a.nodesSet.managers)a.nodesSet.typesMap[u]=Object.fromEntries(Object.entries(a.nodesSet.typesMap[u]).map(([d,p])=>[d,new Set([...p].filter(m=>!n(i,m)))]));for(let[u,h]of a.linksSet.managers)a.linksSet.typesMap[u]=Object.fromEntries(Object.entries(a.linksSet.typesMap[u]).map(([d,p])=>[d,new Set([...p].filter(m=>{let x=a.linksSet.extendedElementsMap.get(m);return x&&!n(i,x.coreElement.source.id)&&!n(i,x.coreElement.target.id)}))]));a.nodesSet.connectedIDs=new Set([...a.nodesSet.connectedIDs].filter(u=>!n(i,u))),a.linksSet.connectedIDs=new Set([...a.linksSet.connectedIDs].filter(u=>{let h=a.linksSet.extendedElementsMap.get(u);return h&&!n(i,h.coreElement.source.id)&&!n(i,h.coreElement.target.id)}));let l=new T0(a);for(let[u,h]of a.nodesSet.extendedElementsMap)h.isPinned&&n(i,u)&&l.pinNode(s,h.coreElement.x,h.coreElement.y);for(let u of f.settings.states){if(!u.pinNodes)break;let h=structuredClone(Object.entries(u.pinNodes));for(let[d,p]of h)n(i,d)&&(delete u.pinNodes[d],u.pinNodes[s]=p);f.plugin.saveSettings()}a.nodesSet.extendedElementsMap=new Map([...a.nodesSet.extendedElementsMap].filter(([u,h])=>n(i,u)?(h.graphicsWrapper?.destroyGraphics(),h.graphicsWrapper?.disconnect(),h.coreElement.clearGraphics(),!1):!0)),a.linksSet.extendedElementsMap=new Map([...a.linksSet.extendedElementsMap].filter(([u,h])=>n(i,h.coreElement.source.id)||n(i,h.coreElement.target.id)?(h.graphicsWrapper?.destroyGraphics(),h.graphicsWrapper?.disconnect(),h.coreElement.clearGraphics(),!1):!0))}}onNewLeafOpen(t){let i=P8(t);if(i){try{this.setGlobalUI(i)}catch{}this.isPluginAlreadyEnabled(i)||(this.isGlobalGraphAlreadyOpened(i)||this.backupOptions(i),f.settings.enableFeatures[i.getViewType()]["auto-enabled"]&&this.enablePlugin(i,f.settings.startingStateID))}}isPluginAlreadyEnabled(t){return this.allInstances.has(t.leaf.id)}isGlobalGraphAlreadyOpened(t){return this.optionsBackup.has(t.leaf.id)&&t.getViewType()==="graph"}syncWithLeaves(t){let i=t.map(l=>l.id),s=t.find(l=>l.view.getViewType()==="localgraph"&&l.view instanceof j0.View&&!m1(l.view));this.localGraphID=s?s.id:null;let n=[...this.allInstances.keys()];for(let l of n)i.includes(l)||this.disablePluginFromLeafID(l);let o=[...this.optionsBackup.keys()];for(let l of o)!i.includes(l)&&this.lastBackup!==l&&this.optionsBackup.delete(l);let a=[...this.globalUIs.keys()];for(let l of a)i.includes(l)||this.globalUIs.delete(l)}setGlobalUI(t){let i=this.globalUIs.get(t.leaf.id);if(i)return i;let s=new Rl(t);t.addChild(s);let n=new Ll(t);return n.onPluginDisabled(),t.addChild(n),i={menu:s,control:n},this.globalUIs.set(t.leaf.id,i),i}updatePaletteForInteractive(t){this.allInstances.forEach(i=>{i.interactiveManagers.get(t)?.recomputeColors()})}updateColorForInteractiveType(t,i){this.allInstances.forEach(s=>{s.interactiveManagers.get(t)?.recomputeColor(i)})}updateSizeFunctionForNodesStat(){for(let[t,i]of this.allInstances)i.settings.nodesSizeFunction=f.settings.nodesSizeFunction,i.renderer.changed()}updatePaletteForNodesStat(){for(let[t,i]of this.allInstances)i.settings.nodesColorFunction=f.settings.nodesColorFunction,i.renderer.changed()}updateSizeFunctionForLinksStat(){for(let[t,i]of this.allInstances){if(!i.settings.curvedLinks)for(let[s,n]of i.linksSet.extendedElementsMap)n.changeCoreLinkThickness();i.renderer.changed()}}updatePaletteForLinksStat(){for(let[t,i]of this.allInstances){for(let[s,n]of i.linksSet.extendedElementsMap)n.graphicsWrapper?.updateGraphics();i.renderer.changed()}}enablePlugin(t,i){if(this.backupOptions(t),this.isPluginAlreadyEnabled(t)||this.isNodeLimitExceededForView(t))return;this.getGraphAnalysis()["graph-analysis"]?(this.linksSizeCalculator||this.initializeLinksSizeCalculator(),this.linksColorCalculator||this.initializeLinksColorCalculator()):this.linksSizeCalculator=void 0;let s=this.addGraph(t,i??f.settings.startingStateID),n=this.setGlobalUI(t);n.menu.setEnableUIState(),n.control.onPluginEnabled(s),this.updateStatusBarItem(t.leaf)}addGraph(t,i){let s=this.allInstances.get(t.leaf.id);return s||(s=new Il(t),new Pl(s),i&&s.statesUI.setValue(i),this.allInstances.set(t.leaf.id,s),s.dispatcher.load(),t.addChild(s.dispatcher),t.getViewType()==="localgraph"&&!m1(t)&&(this.localGraphID=t.leaf.id),s)}isNodeLimitExceededForView(t){return t.renderer.nodes.length>f.settings.maxNodes?(new Notice(`${E.notices.nodeLimiteExceeded} (${t.renderer.nodes.length}). ${E.notices.nodeLimitIs} ${f.settings.maxNodes}. ${E.notices.changeInSettings}.`),!0):!1}isNodeLimitExceededForData(t,i=!0){return Object.keys(t.nodes).length>f.settings.maxNodes?(i&&new Notice(`${E.notices.nodeLimiteExceeded} (${Object.keys(t.nodes).length}). ${E.notices.nodeLimitIs} ${f.settings.maxNodes}. ${E.plugin.name} ${E.notices.disabled}. ${E.notices.changeInSettings}.`),!0):!1}getGraphAnalysis(){let t=f.app.plugins.getPlugin("graph-analysis");if(t&&t._loaded){let i=f.app.plugins.getPlugin("nlp");return{"graph-analysis":t,nlp:i&&i.settings?.refreshDocsOnLoad?i:null}}else return{"graph-analysis":null,nlp:null}}disablePlugin(t){this.disablePluginFromLeafID(t.leaf.id),t.renderer.changed()}disablePluginFromLeafID(t){this.disableUI(t),this.unloadDispatcher(t)}disableUI(t){let i=this.globalUIs.get(t);i&&(i.menu.setDisableUIState(),i.control.onPluginDisabled())}unloadDispatcher(t){let i=this.allInstances.get(t);i&&i.dispatcher.unload()}onPluginUnloaded(t){this.allInstances.delete(t.leaf.id),this.localGraphID===t.leaf.id&&(this.localGraphID=null),t._loaded&&this.applyNormalState(t),this.restoreBackup(),this.updateStatusBarItem(t.leaf)}resetAllPlugins(t){let i=[...this.allInstances.values()].filter(s=>s.type===t).map(s=>s.view);for(let s of i)this.resetPlugin(s)}resetPlugin(t){let i=this.allInstances.get(t.leaf.id),s=i?.statesUI.currentStateID,n=i?.renderer.targetScale??!1;this.disablePlugin(t),this.enablePlugin(t,s);let o=this.allInstances.get(t.leaf.id);o&&n&&(o.renderer.targetScale=n)}onActiveLeafChange(t){t&&(this.isMarkdownLeaf(t)?this.changeActiveFile(null):this.changeActiveFile(t.view.file)),this.updateStatusBarItem(t)}isMarkdownLeaf(t){return t.view.getViewType()==="markdown"&&t.view instanceof j0.FileView}onFileOpen(t){if(!this.isHandlingMarkdownViewChange){if(this.isHandlingMarkdownViewChange=!0,this.activeFile!==t){if(this.changeActiveFile(t),this.localGraphID){let i=this.allInstances.get(this.localGraphID);i&&this.resetPlugin(i.view)}if(t&&dn()){let s=f.app.workspace.getLeavesOfType("markdown").filter(n=>n.view instanceof j0.MarkdownView&&n.view.file===t);for(let n of s){if(!(n.view instanceof j0.MarkdownView))continue;let o=n.view,a=dn()?.graphViews.find(l=>l.node===o.contentEl.querySelector(`.${Go()}`))?.leaf.view;if(a&&this.allInstances.get(a.leaf.id)){let l=a;this.zoomOnNode(l,t.path,l.renderer.targetScale)}}}}this.isHandlingMarkdownViewChange=!1}}changeActiveFile(t){if(!(!this.activeFile&&!t)){for(let i of this.allInstances.values()){if(!i.settings.enableFeatures.graph.focus)return;i.type==="graph"&&(this.deEmphasizePreviousActiveFile(i),this.emphasizeActiveFile(i,t),i.renderer.changed())}this.activeFile=t}}deEmphasizePreviousActiveFile(t){this.activeFile&&t.nodesSet.emphasizeNode(this.activeFile,!1)}emphasizeActiveFile(t,i){i&&t.nodesSet.emphasizeNode(i,!0)}backupOptions(t){let i=ri(t),s=structuredClone(i.getOptions());this.optionsBackup.set(t.leaf.id,s),delete s.search,this.lastBackup=t.leaf.id,f.settings.backupGraphOptions=s,f.plugin.saveSettings()}restoreBackup(){let t=this.optionsBackup.get(this.lastBackup),i=this.getCorePluginInstance();i&&t&&(i.options.colorGroups=t.colorGroups,i.options.hideUnresolved=t.hideUnresolved,i.options.showAttachments=t.showAttachments,i.options.showOrphans=t.showOrphans,i.options.showTags=t.showTags,i.options.localBacklinks=t.localBacklinks,i.options.localForelinks=t.localForelinks,i.options.localInterlinks=t.localInterlinks,i.options.localJumps=t.localJumps,i.options.lineSizeMultiplier=t.lineSizeMultiplier,i.options.nodeSizeMultiplier=t.nodeSizeMultiplier,i.options.showArrow=t.showArrow,i.options.textFadeMultiplier=t.textFadeMultiplier,i.options.centerStrength=t.centerStrength,i.options.linkDistance=t.linkDistance,i.options.linkStrength=t.linkStrength,i.options.repelStrength=t.repelStrength,i.saveOptions())}getCorePluginInstance(){return f.app.internalPlugins.getPluginById("graph")?.instance}applyNormalState(t){let i=ri(t),s=this.optionsBackup.get(t.leaf.id);if(i&&s){i.setOptions(s);for(let n of i.renderer.nodes)n.fontDirty=!0}}onNodeMenuOpened(t,i,s,n){s==="graph-context-menu"&&n&&i instanceof j0.TFile&&this.allInstances.get(n.id)?.dispatcher.onNodeMenuOpened(t,i)}getSVGScreenshot(t){let i=this.allInstances.get(t.leaf.id),s;i?s=new Nl(i):s=new Bl(ri(t)),s.toClipboard()}zoomOnNode(t,i,s){let n=t.renderer,o=n.nodes.find(m=>m.id===i);if(!o)return;let a=n.scale;s===void 0&&(s=f.settings.zoomFactor);let l=n.panX,u=n.panY;n.targetScale=Math.min(8,Math.max(1/128,s));let h=n.zoomCenterX,d=n.zoomCenterY;if(h===0&&d===0){let m=window.devicePixelRatio;h=n.width/2*m,d=n.height/2*m}let p=.85;a=a*p+s*(1-p),l-=o.x*a+l-h,u-=o.y*a+u-d,n.setPan(l,u),n.setScale(a),n.changed()}updateStatusBarItem(t,i){if(this.statusBarItem.innerHTML="",this.statusBarItem.removeClass("mod-clickable"),t&&(t.view.getViewType()==="graph"||t.view.getViewType()==="localgraph")){i===void 0&&(i=t.view.renderer.nodes.length),i!==void 0&&this.statusBarItem.createSpan({text:i.toString()+" "+E.plugin.nodes,cls:"status-bar-item-segment"});let s=this.allInstances.get(t.id);if(s){this.statusBarItem.addClass("mod-clickable");let n=createSpan({cls:"status-bar-item-icon status-bar-item-segment"});(0,j0.setIcon)(n,"info"),n.addEventListener("click",()=>{new Ri(s).open()}),this.statusBarItem.appendChild(n)}}}};var N8=new Uint8Array([125,125,125]),ii="default-vault",Ue="tag",de="link",he="folder",$0={};$0[Ue]=[];$0[de]=["tags","file"];$0[he]=[];var Li=class{constructor(e){this.data=new Ol;this.data.name=e}setID(e){this.data.id=e||crypto.randomUUID()}saveGraph(e){this.data.toggleTypes={};let t=e.linksSet.managers.get(de);this.data.toggleTypes[de]=t?.getTypes().filter(s=>f.settings.interactiveSettings[de].enableByDefault!==t.isActive(s))??[];let i=e.foldersSet?.managers.get(he);this.data.toggleTypes[he]=i?.getTypes().filter(s=>f.settings.interactiveSettings[he].enableByDefault!==i.isActive(s))??[];for(let[s,n]of e.nodesSet.managers)this.data.toggleTypes[s]=n.getTypes().filter(o=>f.settings.interactiveSettings[s].enableByDefault!==n.isActive(o));this.data.pinNodes={};for(let[s,n]of e.nodesSet.extendedElementsMap)n.isPinned&&(this.data.pinNodes[s]={x:n.coreElement.x,y:n.coreElement.y});if(this.data.engineOptions=new cr(e.engine.getOptions()),this.data.hiddenLegendRows=[],e.legendUI)for(let[s,n]of e.legendUI.legendRows)n.row.isVisible||this.data.hiddenLegendRows?.push(s);if(this.data.collapsedLegendRows=[],e.legendUI)for(let[s,n]of e.legendUI.legendRows)n.row.isCollapsed||this.data.collapsedLegendRows?.push(s)}saveState(e){return this.data=e,this.completeDefaultOptions()}isValidProperty(e){return["id","name","toggleTypes","pinNodes","engineOptions","hiddenLegendRows","collapsedLegendRows"].includes(e)}completeDefaultOptions(){let e=!1;this.data.toggleTypes||(this.data.toggleTypes={},e=!0),this.data.toggleTypes[Ue]||(this.data.toggleTypes[Ue]=[],e=!0),this.data.toggleTypes[de]||(this.data.toggleTypes[de]=[],e=!0),this.data.toggleTypes[he]||(this.data.toggleTypes[he]=[],e=!0),this.data.pinNodes||(this.data.pinNodes={},e=!0),this.data.engineOptions||(this.data.engineOptions=new cr,e=!0),this.data.hiddenLegendRows||(this.data.hiddenLegendRows=[],e=!0),this.data.collapsedLegendRows||(this.data.collapsedLegendRows=[],e=!0);for(let t in this.data)this.isValidProperty(t)||(this.data=this.excludeKey(this.data,t),e=!0);return e}excludeKey(e,t){let{[t]:i,...s}=e;return s}};var cr=class{constructor(e){this.colorGroups=[];this.hideUnresolved=!1;this.showAttachments=!1;this.showOrphans=!0;this.showTags=!1;this.localBacklinks=!0;this.localForelinks=!0;this.localInterlinks=!1;this.localJumps=1;this.lineSizeMultiplier=1;this.nodeSizeMultiplier=1;this.showArrow=!1;this.textFadeMultiplier=0;this.centerStrength=1-Math.log(.109)/Math.log(.01);this.linkDistance=250;this.linkStrength=1;this.repelStrength=10;e&&(this.colorGroups=e.colorGroups,this.hideUnresolved=e.hideUnresolved,this.showAttachments=e.showAttachments,this.showOrphans=e.showOrphans,this.showTags=e.showTags,this.localBacklinks=e.localBacklinks,this.localForelinks=e.localForelinks,this.localInterlinks=e.localInterlinks,this.localJumps=e.localJumps,this.lineSizeMultiplier=e.lineSizeMultiplier,this.nodeSizeMultiplier=e.nodeSizeMultiplier,this.showArrow=e.showArrow,this.textFadeMultiplier=e.textFadeMultiplier,this.centerStrength=e.centerStrength,this.linkDistance=e.linkDistance,this.linkStrength=e.linkStrength,this.repelStrength=e.repelStrength)}},Ol=class{constructor(){this.id="";this.name="";this.toggleTypes={},this.toggleTypes[Ue]=[],this.toggleTypes[de]=[],this.toggleTypes[he]=[],this.pinNodes={},this.hiddenLegendRows=[],this.collapsedLegendRows=[],this.engineOptions=new cr}};var Gl=class{getStateDataById(e){return f.settings.states.find(t=>t.id===e)}newState(e,t){let i=new Li(t);return i.setID(),i.saveGraph(e),this.onStateNeedsSaving(i.data),i.data.id}changeState(e,t){let i=this.getStateDataById(t);i&&(i=this.validateStateData(i),i&&(e.dispatcher.lastFilteringAction&&(e.dispatcher.lastFilteringAction.record=!1),setTimeout(()=>{if(this.updateInteractiveManagers(i,e),i.engineOptions){e.colorGroupHaveChanged=i.engineOptions.colorGroups!==e.engine.options.colorGroups,e.engine.setOptions(i.engineOptions);for(let s of e.renderer.nodes)s.fontDirty=!0}i.hiddenLegendRows&&e.legendUI?.hideRows(i.hiddenLegendRows),i.collapsedLegendRows&&e.legendUI?.collapseRows(i.collapsedLegendRows),e.statePinnedNodes=structuredClone(i.pinNodes)??{},e.statesUI.currentStateID===t&&e.dispatcher.lastFilteringAction&&(e.dispatcher.lastFilteringAction.record=!0)},200)))}validateStateData(e){let t=new Li(e.name);return t.saveState(e)&&this.onStateNeedsSaving(t.data),t.data}updateInteractiveManagers(e,t){this.updateManagers(e,t.nodesSet.managers,t.legendUI),this.updateManagers(e,t.linksSet.managers,t.legendUI),t.foldersSet&&this.updateManagers(e,t.foldersSet.managers,t.foldersUI)}updateManagers(e,t,i){for(let[s,n]of t){f.settings.interactiveSettings[s].hasOwnProperty("enableByDefault")||(f.settings.interactiveSettings[s].enableByDefault=s!==he,f.plugin.saveSettings());let o=f.settings.interactiveSettings[s].enableByDefault;if(this.loadStateForInteractiveManager(n,e),i&&e.toggleTypes&&(o?i.enableAllUI(s):i.disableAllUI(s),e.toggleTypes.hasOwnProperty(s)))for(let a of e.toggleTypes[s])o?i.disableUI(s,a):i.enableUI(s,a)}}loadStateForInteractiveManager(e,t){if(!t.toggleTypes)return;let i=f.settings.interactiveSettings[e.name].enableByDefault,s=t.toggleTypes[e.name]??[],n=[],o=[];e.getTypes().forEach(a=>{let l=e.interactives.get(a);l&&(i===l.isActive&&s.includes(a)?(l.isActive=!i,i?n.push(a):o.push(a)):i!==l.isActive&&!s.includes(a)&&(l.isActive=i,i?o.push(a):n.push(a)))}),n.length>0&&e.instances.dispatcher.onInteractivesDisabled(e.name,n),o.length>0&&e.instances.dispatcher.onInteractivesEnabled(e.name,o)}saveState(e,t){if(t===ii)return;let i=f.settings.states.find(n=>n.id==t);if(!i)return;let s=new Li(i?.name);s.setID(t),s.saveGraph(e),this.onStateNeedsSaving(s.data)}onStateNeedsSaving(e,t=!1){this.updateStateArray(e),f.plugin.saveSettings().then(()=>{t&&new Notice(`${E.plugin.name}: ${E.notices.stateSaved} (${e.name})`),this.updateAllStates()})}updateStateArray(e){let t=f.settings.states.findIndex(i=>i.name===e.name);t>=0?f.settings.states[t]=e:f.settings.states.push(e)}updateAllStates(){f.graphsManager.allInstances.forEach(e=>{e.statesUI.updateStatesList()})}renameState(e,t){let i=this.getStateDataById(e);!i||i.name===t||(i.name=t,f.plugin.saveSettings().then(()=>{new Notice(`${E.plugin.name}: ${E.notices.stateRenamed} (${t})`),this.updateAllStates()}))}deleteState(e){let t=this.getStateDataById(e);t&&(f.settings.states.remove(t),f.plugin.saveSettings().then(()=>{new Notice(`${E.plugin.name}: ${E.notices.stateDeleted} (${t.name})`),this.updateAllStates()}))}};var Ul={"Perceptually Uniform Sequential":["viridis","plasma","inferno","magma","cividis"],"Sequential colormaps":["Greys","Purples","Blues","Greens","Oranges","Reds","YlOrBr","YlOrRd","OrRd","PuRd","RdPu","BuPu","GnBu","PuBu","YlGnBu","PuBuGn","BuGn","YlGn"],"Sequential (2)":["binary","gist_yarg","gist_gray","gray","bone","pink","spring","summer","autumn","winter","cool","Wistia","hot","afmhot","gist_heat","copper"],Diverging:["PiYG","PRGn","BrBG","PuOr","RdGy","RdBu","RdYlBu","RdYlGn","Spectral","coolwarm","bwr","seismic"],Cyclic:["twilight","twilight_shifted","hsv"],Miscellaneous:["ocean","gist_earth","terrain","gist_stern","gnuplot","gnuplot2","CMRmap","cubehelix","brg","gist_rainbow","rainbow","jet","turbo","nipy_spectral","gist_ncar"]},y1={Accent:{interpolate:!1,colors:[[.498,.7882,.498],[.7451,.6824,.8314],[.9922,.7529,.5255],[1,1,.6],[.2196,.4235,.6902],[.9412,.0078,.498],[.749,.3569,.0902],[.4,.4,.4]]},Blues:{interpolate:!0,colors:[[.9686,.9843,1],[.9656,.9823,.999],[.9625,.9804,.998],[.9594,.9784,.997],[.9563,.9764,.9961],[.9532,.9745,.9951],[.9502,.9725,.9941],[.9471,.9705,.9931],[.944,.9686,.9921],[.9409,.9666,.9911],[.9379,.9646,.9902],[.9348,.9627,.9892],[.9317,.9607,.9882],[.9286,.9587,.9872],[.9256,.9568,.9862],[.9225,.9548,.9852],[.9194,.9528,.9843],[.9163,.9508,.9833],[.9133,.9489,.9823],[.9102,.9469,.9813],[.9071,.9449,.9803],[.904,.943,.9793],[.901,.941,.9783],[.8979,.939,.9774],[.8948,.9371,.9764],[.8917,.9351,.9754],[.8887,.9331,.9744],[.8856,.9312,.9734],[.8825,.9292,.9724],[.8794,.9272,.9715],[.8764,.9253,.9705],[.8733,.9233,.9695],[.8702,.9213,.9685],[.8673,.9194,.9675],[.8643,.9174,.9665],[.8614,.9154,.9656],[.8584,.9134,.9646],[.8555,.9115,.9636],[.8525,.9095,.9626],[.8496,.9075,.9616],[.8466,.9056,.9606],[.8436,.9036,.9596],[.8407,.9016,.9587],[.8377,.8997,.9577],[.8348,.8977,.9567],[.8318,.8957,.9557],[.8289,.8938,.9547],[.8259,.8918,.9537],[.823,.8898,.9528],[.82,.8879,.9518],[.8171,.8859,.9508],[.8141,.8839,.9498],[.8112,.882,.9488],[.8082,.88,.9478],[.8053,.878,.9469],[.8023,.876,.9459],[.7994,.8741,.9449],[.7964,.8721,.9439],[.7934,.8701,.9429],[.7905,.8682,.9419],[.7875,.8662,.9409],[.7846,.8642,.94],[.7816,.8623,.939],[.7787,.8603,.938],[.7752,.8583,.9368],[.7703,.8562,.9351],[.7654,.8541,.9334],[.7605,.852,.9317],[.7556,.8499,.9299],[.7506,.8478,.9282],[.7457,.8458,.9265],[.7408,.8437,.9248],[.7359,.8416,.923],[.7309,.8395,.9213],[.726,.8374,.9196],[.7211,.8353,.9179],[.7162,.8332,.9162],[.7113,.8311,.9144],[.7063,.829,.9127],[.7014,.8269,.911],[.6965,.8248,.9093],[.6916,.8227,.9075],[.6867,.8207,.9058],[.6817,.8186,.9041],[.6768,.8165,.9024],[.6719,.8144,.9007],[.667,.8123,.8989],[.6621,.8102,.8972],[.6571,.8081,.8955],[.6522,.806,.8938],[.6473,.8039,.892],[.6424,.8018,.8903],[.6374,.7997,.8886],[.6325,.7976,.8869],[.6276,.7956,.8852],[.6227,.7935,.8834],[.6173,.7909,.8818],[.611,.7874,.8805],[.6047,.784,.8791],[.5984,.7805,.8778],[.5922,.7771,.8764],[.5859,.7736,.8751],[.5796,.7702,.8737],[.5733,.7668,.8724],[.5671,.7633,.871],[.5608,.7599,.8697],[.5545,.7564,.8683],[.5482,.753,.867],[.542,.7495,.8656],[.5357,.7461,.8643],[.5294,.7426,.8629],[.5231,.7392,.8615],[.5169,.7357,.8602],[.5106,.7323,.8588],[.5043,.7289,.8575],[.498,.7254,.8561],[.4918,.722,.8548],[.4855,.7185,.8534],[.4792,.7151,.8521],[.4729,.7116,.8507],[.4667,.7082,.8494],[.4604,.7047,.848],[.4541,.7013,.8467],[.4478,.6979,.8453],[.4416,.6944,.844],[.4353,.691,.8426],[.429,.6875,.8412],[.4227,.6841,.8399],[.4171,.6806,.8382],[.412,.6772,.8363],[.407,.6737,.8343],[.402,.6703,.8323],[.3969,.6669,.8304],[.3919,.6634,.8284],[.3868,.66,.8264],[.3818,.6565,.8245],[.3767,.6531,.8225],[.3717,.6496,.8205],[.3666,.6462,.8185],[.3616,.6427,.8166],[.3566,.6393,.8146],[.3515,.6358,.8126],[.3465,.6324,.8107],[.3414,.629,.8087],[.3364,.6255,.8067],[.3313,.6221,.8048],[.3263,.6186,.8028],[.3212,.6152,.8008],[.3162,.6117,.7989],[.3112,.6083,.7969],[.3061,.6048,.7949],[.3011,.6014,.793],[.296,.598,.791],[.291,.5945,.789],[.2859,.5911,.7871],[.2809,.5876,.7851],[.2758,.5842,.7831],[.2708,.5807,.7811],[.2658,.5773,.7792],[.2607,.5738,.7772],[.2563,.57,.7752],[.2522,.566,.7731],[.2482,.5619,.771],[.2441,.5578,.7689],[.24,.5538,.7668],[.236,.5497,.7647],[.2319,.5457,.7626],[.2279,.5416,.7605],[.2238,.5375,.7584],[.2197,.5335,.7563],[.2157,.5294,.7542],[.2116,.5254,.7522],[.2076,.5213,.7501],[.2035,.5172,.748],[.1994,.5132,.7459],[.1954,.5091,.7438],[.1913,.5051,.7417],[.1873,.501,.7396],[.1832,.4969,.7375],[.1791,.4929,.7354],[.1751,.4888,.7333],[.171,.4848,.7312],[.167,.4807,.7292],[.1629,.4766,.7271],[.1588,.4726,.725],[.1548,.4685,.7229],[.1507,.4645,.7208],[.1467,.4604,.7187],[.1426,.4563,.7166],[.1385,.4523,.7145],[.1345,.4482,.7124],[.1304,.4442,.7103],[.1271,.4402,.7075],[.124,.4362,.7044],[.121,.4323,.7013],[.1179,.4284,.6983],[.1148,.4244,.6952],[.1117,.4205,.6921],[.1087,.4166,.689],[.1056,.4126,.686],[.1025,.4087,.6829],[.0994,.4048,.6798],[.0963,.4008,.6767],[.0933,.3969,.6737],[.0902,.3929,.6706],[.0871,.389,.6675],[.084,.3851,.6644],[.081,.3811,.6614],[.0779,.3772,.6583],[.0748,.3733,.6552],[.0717,.3693,.6521],[.0687,.3654,.6491],[.0656,.3614,.646],[.0625,.3575,.6429],[.0594,.3536,.6398],[.0564,.3496,.6368],[.0533,.3457,.6337],[.0502,.3418,.6306],[.0471,.3378,.6275],[.0441,.3339,.6245],[.041,.33,.6214],[.0379,.326,.6183],[.0348,.3221,.6152],[.0318,.3181,.6121],[.0314,.3141,.6065],[.0314,.31,.6005],[.0314,.306,.5944],[.0314,.3019,.5884],[.0314,.2979,.5824],[.0314,.2938,.5763],[.0314,.2897,.5703],[.0314,.2857,.5643],[.0314,.2816,.5583],[.0314,.2776,.5522],[.0314,.2735,.5462],[.0314,.2694,.5402],[.0314,.2654,.5341],[.0314,.2613,.5281],[.0314,.2573,.5221],[.0314,.2532,.5161],[.0314,.2491,.51],[.0314,.2451,.504],[.0314,.241,.498],[.0314,.237,.4919],[.0314,.2329,.4859],[.0314,.2288,.4799],[.0314,.2248,.4739],[.0314,.2207,.4678],[.0314,.2167,.4618],[.0314,.2126,.4558],[.0314,.2085,.4498],[.0314,.2045,.4437],[.0314,.2004,.4377],[.0314,.1964,.4317],[.0314,.1923,.4256],[.0314,.1882,.4196]]},BrBG:{interpolate:!0,colors:[[.3294,.1882,.0196],[.338,.1933,.0204],[.3466,.1984,.0211],[.3552,.2035,.0219],[.3639,.2085,.0227],[.3725,.2136,.0235],[.3811,.2187,.0242],[.3897,.2238,.025],[.3983,.2288,.0258],[.4069,.2339,.0265],[.4155,.239,.0273],[.4241,.2441,.0281],[.4328,.2491,.0288],[.4414,.2542,.0296],[.45,.2593,.0304],[.4586,.2644,.0311],[.4672,.2694,.0319],[.4758,.2745,.0327],[.4844,.2796,.0334],[.493,.2847,.0342],[.5017,.2897,.035],[.5103,.2948,.0358],[.5189,.2999,.0365],[.5275,.305,.0373],[.5361,.31,.0381],[.5447,.3151,.0388],[.5529,.3213,.0419],[.5608,.3287,.0473],[.5686,.3361,.0527],[.5765,.3435,.0581],[.5843,.3509,.0634],[.5922,.3582,.0688],[.6,.3656,.0742],[.6078,.373,.0796],[.6157,.3804,.085],[.6235,.3878,.0903],[.6314,.3952,.0957],[.6392,.4025,.1011],[.6471,.4099,.1065],[.6549,.4173,.1119],[.6627,.4247,.1173],[.6706,.4321,.1226],[.6784,.4394,.128],[.6863,.4468,.1334],[.6941,.4542,.1388],[.702,.4616,.1442],[.7098,.469,.1496],[.7176,.4764,.1549],[.7255,.4837,.1603],[.7333,.4911,.1657],[.7412,.4985,.1711],[.749,.5059,.1765],[.7539,.5159,.1888],[.7589,.5259,.2011],[.7638,.5359,.2134],[.7687,.5459,.2257],[.7736,.5559,.238],[.7785,.5659,.2503],[.7835,.5759,.2626],[.7884,.5859,.2749],[.7933,.5958,.2872],[.7982,.6058,.2995],[.8032,.6158,.3118],[.8081,.6258,.3241],[.813,.6358,.3364],[.8179,.6458,.3487],[.8228,.6558,.361],[.8278,.6658,.3733],[.8327,.6758,.3856],[.8376,.6858,.3979],[.8425,.6958,.4102],[.8474,.7058,.4225],[.8524,.7158,.4348],[.8573,.7258,.4471],[.8622,.7358,.4594],[.8671,.7458,.4717],[.872,.7558,.484],[.8763,.7637,.4956],[.8798,.7696,.5063],[.8834,.7754,.5171],[.8869,.7812,.5279],[.8904,.7871,.5386],[.894,.7929,.5494],[.8975,.7988,.5602],[.901,.8046,.5709],[.9046,.8105,.5817],[.9081,.8163,.5925],[.9116,.8221,.6032],[.9152,.828,.614],[.9187,.8338,.6248],[.9223,.8397,.6355],[.9258,.8455,.6463],[.9293,.8514,.6571],[.9329,.8572,.6678],[.9364,.8631,.6786],[.9399,.8689,.6894],[.9435,.8747,.7001],[.947,.8806,.7109],[.9506,.8864,.7216],[.9541,.8923,.7324],[.9576,.8981,.7432],[.9612,.904,.7539],[.9647,.9098,.7647],[.9646,.9118,.7724],[.9644,.9138,.7801],[.9642,.9158,.7878],[.9641,.9178,.7955],[.9639,.9198,.8032],[.9638,.9218,.8108],[.9636,.9238,.8185],[.9635,.9258,.8262],[.9633,.9278,.8339],[.9632,.9298,.8416],[.963,.9318,.8493],[.9629,.9338,.857],[.9627,.9358,.8647],[.9626,.9378,.8724],[.9624,.9398,.88],[.9622,.9418,.8877],[.9621,.9438,.8954],[.9619,.9458,.9031],[.9618,.9478,.9108],[.9616,.9498,.9185],[.9615,.9518,.9262],[.9613,.9538,.9339],[.9612,.9558,.9416],[.961,.9578,.9493],[.9609,.9598,.9569],[.9572,.9599,.9596],[.9502,.9582,.9571],[.9431,.9566,.9546],[.936,.9549,.9522],[.929,.9532,.9497],[.9219,.9515,.9473],[.9148,.9498,.9448],[.9077,.9481,.9423],[.9007,.9464,.9399],[.8936,.9447,.9374],[.8865,.943,.9349],[.8794,.9413,.9325],[.8724,.9396,.93],[.8653,.9379,.9276],[.8582,.9363,.9251],[.8511,.9346,.9226],[.8441,.9329,.9202],[.837,.9312,.9177],[.8299,.9295,.9153],[.8228,.9278,.9128],[.8158,.9261,.9103],[.8087,.9244,.9079],[.8016,.9227,.9054],[.7945,.921,.903],[.7875,.9193,.9005],[.7804,.9176,.898],[.7695,.9132,.8925],[.7586,.9087,.887],[.7476,.9043,.8814],[.7367,.8998,.8759],[.7258,.8953,.8704],[.7149,.8909,.8648],[.704,.8864,.8593],[.693,.882,.8537],[.6821,.8775,.8482],[.6712,.873,.8427],[.6603,.8686,.8371],[.6494,.8641,.8316],[.6384,.8597,.8261],[.6275,.8552,.8205],[.6166,.8507,.815],[.6057,.8463,.8095],[.5948,.8418,.8039],[.5839,.8374,.7984],[.5729,.8329,.7928],[.562,.8285,.7873],[.5511,.824,.7818],[.5402,.8195,.7762],[.5293,.8151,.7707],[.5183,.8106,.7652],[.5074,.8062,.7596],[.4962,.7998,.753],[.4847,.7915,.7453],[.4731,.7832,.7376],[.4616,.7749,.73],[.4501,.7666,.7223],[.4385,.7582,.7146],[.427,.7499,.7069],[.4155,.7416,.6992],[.4039,.7333,.6915],[.3924,.725,.6838],[.3809,.7167,.6761],[.3693,.7084,.6684],[.3578,.7001,.6607],[.3463,.6918,.6531],[.3347,.6835,.6454],[.3232,.6752,.6377],[.3116,.6669,.63],[.3001,.6586,.6223],[.2886,.6503,.6146],[.277,.642,.6069],[.2655,.6337,.5992],[.254,.6254,.5915],[.2424,.6171,.5839],[.2309,.6088,.5762],[.2194,.6005,.5685],[.2078,.5922,.5608],[.1998,.5846,.5532],[.1918,.5771,.5457],[.1839,.5696,.5382],[.1759,.562,.5306],[.1679,.5545,.5231],[.1599,.5469,.5156],[.1519,.5394,.508],[.1439,.5319,.5005],[.1359,.5243,.493],[.1279,.5168,.4854],[.1199,.5093,.4779],[.1119,.5017,.4704],[.1039,.4942,.4628],[.0959,.4867,.4553],[.0879,.4791,.4478],[.0799,.4716,.4402],[.0719,.4641,.4327],[.0639,.4565,.4251],[.0559,.449,.4176],[.0479,.4414,.4101],[.0399,.4339,.4025],[.0319,.4264,.395],[.0239,.4188,.3875],[.0159,.4113,.3799],[.0079,.4038,.3724],[.0038,.3968,.3651],[.0037,.3903,.358],[.0035,.3839,.3509],[.0034,.3774,.3439],[.0032,.3709,.3368],[.0031,.3645,.3297],[.0029,.358,.3226],[.0028,.3516,.3156],[.0026,.3451,.3085],[.0025,.3386,.3014],[.0023,.3322,.2943],[.0022,.3257,.2873],[.002,.3193,.2802],[.0018,.3128,.2731],[.0017,.3063,.2661],[.0015,.2999,.259],[.0014,.2934,.2519],[.0012,.287,.2448],[.0011,.2805,.2378],[9e-4,.274,.2307],[8e-4,.2676,.2236],[6e-4,.2611,.2165],[5e-4,.2547,.2095],[3e-4,.2482,.2024],[2e-4,.2418,.1953],[0,.2353,.1882]]},BuGn:{interpolate:!0,colors:[[.9686,.9882,.9922],[.9664,.9874,.9917],[.9642,.9865,.9912],[.962,.9857,.9907],[.9598,.9848,.9902],[.9576,.9839,.9897],[.9553,.9831,.9892],[.9531,.9822,.9887],[.9509,.9813,.9882],[.9487,.9805,.9877],[.9465,.9796,.9872],[.9443,.9788,.9867],[.9421,.9779,.9863],[.9398,.977,.9858],[.9376,.9762,.9853],[.9354,.9753,.9848],[.9332,.9745,.9843],[.931,.9736,.9838],[.9288,.9727,.9833],[.9266,.9719,.9828],[.9243,.971,.9823],[.9221,.9701,.9818],[.9199,.9693,.9813],[.9177,.9684,.9808],[.9155,.9676,.9803],[.9133,.9667,.9799],[.911,.9658,.9794],[.9088,.965,.9789],[.9066,.9641,.9784],[.9044,.9633,.9779],[.9022,.9624,.9774],[.9,.9615,.9769],[.8977,.9606,.9762],[.8946,.9595,.9738],[.8915,.9584,.9715],[.8884,.9573,.9692],[.8854,.9562,.9668],[.8823,.9551,.9645],[.8792,.954,.9622],[.8761,.9529,.9598],[.873,.9518,.9575],[.87,.9507,.9551],[.8669,.9496,.9528],[.8638,.9485,.9505],[.8607,.9474,.9481],[.8577,.9463,.9458],[.8546,.9451,.9435],[.8515,.944,.9411],[.8484,.9429,.9388],[.8454,.9418,.9364],[.8423,.9407,.9341],[.8392,.9396,.9318],[.8361,.9385,.9294],[.8331,.9374,.9271],[.83,.9363,.9248],[.8269,.9352,.9224],[.8238,.9341,.9201],[.8208,.933,.9177],[.8177,.9319,.9154],[.8146,.9307,.9131],[.8115,.9296,.9107],[.8085,.9285,.9084],[.8054,.9274,.9061],[.8023,.9263,.9037],[.7984,.9249,.9011],[.7922,.9224,.8975],[.7859,.92,.8939],[.7796,.9175,.8904],[.7733,.915,.8868],[.7671,.9126,.8832],[.7608,.9101,.8797],[.7545,.9077,.8761],[.7482,.9052,.8725],[.742,.9027,.869],[.7357,.9003,.8654],[.7294,.8978,.8618],[.7231,.8953,.8583],[.7169,.8929,.8547],[.7106,.8904,.8511],[.7043,.888,.8476],[.698,.8855,.844],[.6918,.883,.8404],[.6855,.8806,.8368],[.6792,.8781,.8333],[.6729,.8757,.8297],[.6667,.8732,.8261],[.6604,.8707,.8226],[.6541,.8683,.819],[.6478,.8658,.8154],[.6416,.8634,.8119],[.6353,.8609,.8083],[.629,.8584,.8047],[.6227,.856,.8012],[.6165,.8535,.7976],[.6102,.8511,.794],[.6039,.8486,.7905],[.5976,.846,.7865],[.5914,.8433,.782],[.5851,.8406,.7774],[.5788,.8379,.7729],[.5725,.8352,.7683],[.5663,.8325,.7638],[.56,.8298,.7592],[.5537,.8271,.7547],[.5475,.8244,.7501],[.5412,.8217,.7456],[.5349,.819,.741],[.5286,.8163,.7365],[.5224,.8136,.7319],[.5161,.8109,.7274],[.5098,.8082,.7228],[.5035,.8054,.7182],[.4973,.8027,.7137],[.491,.8,.7091],[.4847,.7973,.7046],[.4784,.7946,.7],[.4722,.7919,.6955],[.4659,.7892,.6909],[.4596,.7865,.6864],[.4533,.7838,.6818],[.4471,.7811,.6773],[.4408,.7784,.6727],[.4345,.7757,.6682],[.4282,.773,.6636],[.422,.7703,.6591],[.4157,.7676,.6545],[.4094,.7648,.65],[.4031,.7621,.6454],[.3977,.7596,.6403],[.3932,.7571,.6346],[.3886,.7546,.629],[.3841,.7522,.6233],[.3795,.7497,.6177],[.375,.7473,.612],[.3704,.7448,.6064],[.3659,.7423,.6007],[.3613,.7399,.595],[.3568,.7374,.5894],[.3522,.7349,.5837],[.3477,.7325,.5781],[.3431,.73,.5724],[.3385,.7276,.5667],[.334,.7251,.5611],[.3294,.7226,.5554],[.3249,.7202,.5498],[.3203,.7177,.5441],[.3158,.7153,.5384],[.3112,.7128,.5328],[.3067,.7103,.5271],[.3021,.7079,.5215],[.2976,.7054,.5158],[.293,.703,.5101],[.2885,.7005,.5045],[.2839,.698,.4988],[.2794,.6956,.4932],[.2748,.6931,.4875],[.2703,.6907,.4818],[.2657,.6882,.4762],[.2612,.6857,.4705],[.2566,.6833,.4649],[.2526,.6797,.459],[.2489,.6754,.4529],[.2452,.671,.4469],[.2415,.6667,.4409],[.2378,.6624,.4349],[.2341,.6581,.4288],[.2304,.6538,.4228],[.2268,.6495,.4168],[.2231,.6452,.4107],[.2194,.6409,.4047],[.2157,.6366,.3987],[.212,.6323,.3927],[.2083,.628,.3866],[.2046,.6237,.3806],[.2009,.6194,.3746],[.1972,.6151,.3686],[.1935,.6108,.3625],[.1899,.6065,.3565],[.1862,.6022,.3505],[.1825,.5978,.3444],[.1788,.5935,.3384],[.1751,.5892,.3324],[.1714,.5849,.3264],[.1677,.5806,.3203],[.164,.5763,.3143],[.1603,.572,.3083],[.1566,.5677,.3022],[.1529,.5634,.2962],[.1493,.5591,.2902],[.1456,.5548,.2842],[.1419,.5505,.2781],[.1382,.5462,.2721],[.134,.5423,.2683],[.1297,.5386,.2652],[.1254,.5349,.2621],[.1211,.5313,.2591],[.1168,.5276,.256],[.1125,.5239,.2529],[.1082,.5202,.2498],[.1039,.5165,.2468],[.0996,.5128,.2437],[.0953,.5091,.2406],[.091,.5054,.2375],[.0867,.5017,.2344],[.0824,.498,.2314],[.078,.4943,.2283],[.0737,.4907,.2252],[.0694,.487,.2221],[.0651,.4833,.2191],[.0608,.4796,.216],[.0565,.4759,.2129],[.0522,.4722,.2098],[.0479,.4685,.2068],[.0436,.4648,.2037],[.0393,.4611,.2006],[.035,.4574,.1975],[.0307,.4537,.1945],[.0264,.4501,.1914],[.0221,.4464,.1883],[.0178,.4427,.1852],[.0135,.439,.1822],[.0092,.4353,.1791],[.0048,.4316,.176],[5e-4,.4279,.1729],[0,.423,.1707],[0,.418,.1686],[0,.4129,.1665],[0,.4079,.1644],[0,.4029,.1624],[0,.3978,.1603],[0,.3928,.1582],[0,.3877,.1561],[0,.3827,.154],[0,.3776,.1519],[0,.3726,.1498],[0,.3676,.1477],[0,.3625,.1456],[0,.3575,.1435],[0,.3524,.1414],[0,.3474,.1393],[0,.3423,.1373],[0,.3373,.1352],[0,.3322,.1331],[0,.3272,.131],[0,.3222,.1289],[0,.3171,.1268],[0,.3121,.1247],[0,.307,.1226],[0,.302,.1205],[0,.2969,.1184],[0,.2919,.1163],[0,.2868,.1142],[0,.2818,.1122],[0,.2768,.1101],[0,.2717,.108],[0,.2667,.1059]]},BuPu:{interpolate:!0,colors:[[.9686,.9882,.9922],[.9658,.9863,.991],[.963,.9843,.9899],[.9601,.9823,.9888],[.9573,.9804,.9877],[.9545,.9784,.9866],[.9516,.9764,.9855],[.9488,.9745,.9844],[.946,.9725,.9833],[.9432,.9705,.9822],[.9403,.9686,.9811],[.9375,.9666,.98],[.9347,.9646,.9789],[.9318,.9626,.9778],[.929,.9607,.9767],[.9262,.9587,.9755],[.9234,.9567,.9744],[.9205,.9548,.9733],[.9177,.9528,.9722],[.9149,.9508,.9711],[.912,.9489,.97],[.9092,.9469,.9689],[.9064,.9449,.9678],[.9035,.943,.9667],[.9007,.941,.9656],[.8979,.939,.9645],[.8951,.9371,.9634],[.8922,.9351,.9623],[.8894,.9331,.9612],[.8866,.9311,.96],[.8837,.9292,.9589],[.8809,.9272,.9578],[.8779,.9251,.9566],[.8739,.922,.9549],[.8698,.919,.9532],[.8657,.9159,.9515],[.8617,.9128,.9498],[.8576,.9097,.948],[.8536,.9067,.9463],[.8495,.9036,.9446],[.8454,.9005,.9429],[.8414,.8974,.9411],[.8373,.8943,.9394],[.8333,.8913,.9377],[.8292,.8882,.936],[.8251,.8851,.9343],[.8211,.882,.9325],[.817,.879,.9308],[.813,.8759,.9291],[.8089,.8728,.9274],[.8048,.8697,.9256],[.8008,.8667,.9239],[.7967,.8636,.9222],[.7927,.8605,.9205],[.7886,.8574,.9188],[.7845,.8544,.917],[.7805,.8513,.9153],[.7764,.8482,.9136],[.7724,.8451,.9119],[.7683,.8421,.9101],[.7642,.839,.9084],[.7602,.8359,.9067],[.7561,.8328,.905],[.7521,.8298,.9033],[.748,.8267,.9016],[.7439,.8239,.9001],[.7399,.8211,.8986],[.7358,.8183,.8972],[.7318,.8154,.8957],[.7277,.8126,.8942],[.7236,.8098,.8927],[.7196,.8069,.8913],[.7155,.8041,.8898],[.7115,.8013,.8883],[.7074,.7984,.8868],[.7033,.7956,.8854],[.6993,.7928,.8839],[.6952,.79,.8824],[.6912,.7871,.8809],[.6871,.7843,.8794],[.683,.7815,.878],[.679,.7786,.8765],[.6749,.7758,.875],[.6709,.773,.8735],[.6668,.7701,.8721],[.6627,.7673,.8706],[.6587,.7645,.8691],[.6546,.7617,.8676],[.6506,.7588,.8662],[.6465,.756,.8647],[.6424,.7532,.8632],[.6384,.7503,.8617],[.6343,.7475,.8603],[.6303,.7447,.8588],[.6262,.7419,.8573],[.6221,.739,.8558],[.6188,.7355,.854],[.6166,.7308,.8515],[.6143,.7262,.8491],[.6121,.7215,.8466],[.6099,.7168,.8441],[.6077,.7121,.8417],[.6055,.7075,.8392],[.6033,.7028,.8368],[.6011,.6981,.8343],[.5988,.6934,.8318],[.5966,.6888,.8294],[.5944,.6841,.8269],[.5922,.6794,.8245],[.59,.6747,.822],[.5878,.67,.8195],[.5856,.6654,.8171],[.5833,.6607,.8146],[.5811,.656,.8121],[.5789,.6513,.8097],[.5767,.6467,.8072],[.5745,.642,.8048],[.5723,.6373,.8023],[.5701,.6326,.7998],[.5678,.628,.7974],[.5656,.6233,.7949],[.5634,.6186,.7925],[.5612,.6139,.79],[.559,.6093,.7875],[.5568,.6046,.7851],[.5546,.5999,.7826],[.5523,.5952,.7802],[.5501,.5906,.7777],[.549,.5856,.7752],[.549,.5803,.7726],[.549,.575,.77],[.549,.5697,.7674],[.549,.5644,.7648],[.549,.5591,.7623],[.549,.5538,.7597],[.549,.5486,.7571],[.549,.5433,.7545],[.549,.538,.7519],[.549,.5327,.7493],[.549,.5274,.7468],[.549,.5221,.7442],[.549,.5168,.7416],[.549,.5115,.739],[.549,.5062,.7364],[.549,.5009,.7338],[.549,.4957,.7313],[.549,.4904,.7287],[.549,.4851,.7261],[.549,.4798,.7235],[.549,.4745,.7209],[.549,.4692,.7183],[.549,.4639,.7158],[.549,.4586,.7132],[.549,.4533,.7106],[.549,.448,.708],[.549,.4428,.7054],[.549,.4375,.7028],[.549,.4322,.7003],[.549,.4269,.6977],[.549,.4216,.6951],[.5487,.4164,.6926],[.5482,.4112,.6901],[.5477,.406,.6877],[.5472,.4009,.6852],[.5467,.3957,.6827],[.5463,.3905,.6803],[.5458,.3854,.6778],[.5453,.3802,.6754],[.5448,.375,.6729],[.5443,.3699,.6704],[.5438,.3647,.668],[.5433,.3595,.6655],[.5428,.3544,.6631],[.5423,.3492,.6606],[.5418,.344,.6581],[.5413,.3389,.6557],[.5408,.3337,.6532],[.5403,.3285,.6507],[.5399,.3234,.6483],[.5394,.3182,.6458],[.5389,.313,.6434],[.5384,.3079,.6409],[.5379,.3027,.6384],[.5374,.2975,.636],[.5369,.2924,.6335],[.5364,.2872,.6311],[.5359,.282,.6286],[.5354,.2769,.6261],[.5349,.2717,.6237],[.5344,.2665,.6212],[.5339,.2614,.6188],[.5335,.2562,.6163],[.5327,.2503,.6126],[.5318,.2441,.6086],[.531,.238,.6045],[.5301,.2318,.6005],[.5292,.2257,.5964],[.5284,.2195,.5923],[.5275,.2134,.5883],[.5267,.2072,.5842],[.5258,.2011,.5802],[.5249,.1949,.5761],[.5241,.1888,.572],[.5232,.1826,.568],[.5224,.1765,.5639],[.5215,.1703,.5599],[.5206,.1642,.5558],[.5198,.158,.5517],[.5189,.1519,.5477],[.518,.1457,.5436],[.5172,.1396,.5396],[.5163,.1334,.5355],[.5155,.1273,.5314],[.5146,.1211,.5274],[.5137,.115,.5233],[.5129,.1088,.5193],[.512,.1027,.5152],[.5112,.0965,.5111],[.5103,.0903,.5071],[.5094,.0842,.503],[.5086,.078,.499],[.5077,.0719,.4949],[.5069,.0657,.4908],[.506,.0596,.4868],[.5003,.0572,.481],[.4939,.0554,.475],[.4875,.0535,.4689],[.4811,.0517,.4629],[.4747,.0498,.4569],[.4683,.048,.4509],[.4619,.0461,.4448],[.4555,.0443,.4388],[.4491,.0424,.4328],[.4427,.0406,.4267],[.4363,.0388,.4207],[.4299,.0369,.4147],[.4235,.0351,.4087],[.4171,.0332,.4026],[.4107,.0314,.3966],[.4043,.0295,.3906],[.3979,.0277,.3845],[.3915,.0258,.3785],[.3851,.024,.3725],[.3787,.0221,.3665],[.3723,.0203,.3604],[.3659,.0185,.3544],[.3595,.0166,.3484],[.3531,.0148,.3423],[.3467,.0129,.3363],[.3403,.0111,.3303],[.3339,.0092,.3243],[.3276,.0074,.3182],[.3212,.0055,.3122],[.3148,.0037,.3062],[.3084,.0018,.3001],[.302,0,.2941]]},CMRmap:{interpolate:!0,colors:[[0,0,0],[.0047,.0047,.0157],[.0094,.0094,.0314],[.0141,.0141,.0471],[.0188,.0188,.0627],[.0235,.0235,.0784],[.0282,.0282,.0941],[.0329,.0329,.1098],[.0376,.0376,.1255],[.0424,.0424,.1412],[.0471,.0471,.1569],[.0518,.0518,.1725],[.0565,.0565,.1882],[.0612,.0612,.2039],[.0659,.0659,.2196],[.0706,.0706,.2353],[.0753,.0753,.251],[.08,.08,.2667],[.0847,.0847,.2824],[.0894,.0894,.298],[.0941,.0941,.3137],[.0988,.0988,.3294],[.1035,.1035,.3451],[.1082,.1082,.3608],[.1129,.1129,.3765],[.1176,.1176,.3922],[.1224,.1224,.4078],[.1271,.1271,.4235],[.1318,.1318,.4392],[.1365,.1365,.4549],[.1412,.1412,.4706],[.1459,.1459,.4863],[.1506,.15,.501],[.1553,.15,.5088],[.16,.15,.5167],[.1647,.15,.5245],[.1694,.15,.5324],[.1741,.15,.5402],[.1788,.15,.548],[.1835,.15,.5559],[.1882,.15,.5637],[.1929,.15,.5716],[.1976,.15,.5794],[.2024,.15,.5873],[.2071,.15,.5951],[.2118,.15,.6029],[.2165,.15,.6108],[.2212,.15,.6186],[.2259,.15,.6265],[.2306,.15,.6343],[.2353,.15,.6422],[.24,.15,.65],[.2447,.15,.6578],[.2494,.15,.6657],[.2541,.15,.6735],[.2588,.15,.6814],[.2635,.15,.6892],[.2682,.15,.6971],[.2729,.15,.7049],[.2776,.15,.7127],[.2824,.15,.7206],[.2871,.15,.7284],[.2918,.15,.7363],[.2965,.15,.7441],[.3024,.1504,.748],[.3118,.152,.7402],[.3212,.1535,.7324],[.3306,.1551,.7245],[.34,.1567,.7167],[.3494,.1582,.7088],[.3588,.1598,.701],[.3682,.1614,.6931],[.3776,.1629,.6853],[.3871,.1645,.6775],[.3965,.1661,.6696],[.4059,.1676,.6618],[.4153,.1692,.6539],[.4247,.1708,.6461],[.4341,.1724,.6382],[.4435,.1739,.6304],[.4529,.1755,.6225],[.4624,.1771,.6147],[.4718,.1786,.6069],[.4812,.1802,.599],[.4906,.1818,.5912],[.5,.1833,.5833],[.5094,.1849,.5755],[.5188,.1865,.5676],[.5282,.188,.5598],[.5376,.1896,.552],[.5471,.1912,.5441],[.5565,.1927,.5363],[.5659,.1943,.5284],[.5753,.1959,.5206],[.5847,.1975,.5127],[.5941,.199,.5049],[.6047,.2006,.4959],[.6173,.2022,.4849],[.6298,.2037,.4739],[.6424,.2053,.4629],[.6549,.2069,.452],[.6675,.2084,.441],[.68,.21,.43],[.6925,.2116,.419],[.7051,.2131,.408],[.7176,.2147,.3971],[.7302,.2163,.3861],[.7427,.2178,.3751],[.7553,.2194,.3641],[.7678,.221,.3531],[.7804,.2225,.3422],[.7929,.2241,.3312],[.8055,.2257,.3202],[.818,.2273,.3092],[.8306,.2288,.2982],[.8431,.2304,.2873],[.8557,.232,.2763],[.8682,.2335,.2653],[.8808,.2351,.2543],[.8933,.2367,.2433],[.9059,.2382,.2324],[.9184,.2398,.2214],[.931,.2414,.2104],[.9435,.2429,.1994],[.9561,.2445,.1884],[.9686,.2461,.1775],[.9812,.2476,.1665],[.9937,.2492,.1555],[.9984,.2539,.1476],[.9953,.2618,.1429],[.9922,.2696,.1382],[.989,.2775,.1335],[.9859,.2853,.1288],[.9827,.2931,.1241],[.9796,.301,.1194],[.9765,.3088,.1147],[.9733,.3167,.11],[.9702,.3245,.1053],[.9671,.3324,.1006],[.9639,.3402,.0959],[.9608,.348,.0912],[.9576,.3559,.0865],[.9545,.3637,.0818],[.9514,.3716,.0771],[.9482,.3794,.0724],[.9451,.3873,.0676],[.942,.3951,.0629],[.9388,.4029,.0582],[.9357,.4108,.0535],[.9325,.4186,.0488],[.9294,.4265,.0441],[.9263,.4343,.0394],[.9231,.4422,.0347],[.92,.45,.03],[.9169,.4578,.0253],[.9137,.4657,.0206],[.9106,.4735,.0159],[.9075,.4814,.0112],[.9043,.4892,.0065],[.9012,.4971,.0018],[.9,.5049,.002],[.9,.5127,.0051],[.9,.5206,.0082],[.9,.5284,.0114],[.9,.5363,.0145],[.9,.5441,.0176],[.9,.552,.0208],[.9,.5598,.0239],[.9,.5676,.0271],[.9,.5755,.0302],[.9,.5833,.0333],[.9,.5912,.0365],[.9,.599,.0396],[.9,.6069,.0427],[.9,.6147,.0459],[.9,.6225,.049],[.9,.6304,.0522],[.9,.6382,.0553],[.9,.6461,.0584],[.9,.6539,.0616],[.9,.6618,.0647],[.9,.6696,.0678],[.9,.6775,.071],[.9,.6853,.0741],[.9,.6931,.0773],[.9,.701,.0804],[.9,.7088,.0835],[.9,.7167,.0867],[.9,.7245,.0898],[.9,.7324,.0929],[.9,.7402,.0961],[.9,.748,.0992],[.9,.7535,.1094],[.9,.7582,.122],[.9,.7629,.1345],[.9,.7676,.1471],[.9,.7724,.1596],[.9,.7771,.1722],[.9,.7818,.1847],[.9,.7865,.1973],[.9,.7912,.2098],[.9,.7959,.2224],[.9,.8006,.2349],[.9,.8053,.2475],[.9,.81,.26],[.9,.8147,.2725],[.9,.8194,.2851],[.9,.8241,.2976],[.9,.8288,.3102],[.9,.8335,.3227],[.9,.8382,.3353],[.9,.8429,.3478],[.9,.8476,.3604],[.9,.8524,.3729],[.9,.8571,.3855],[.9,.8618,.398],[.9,.8665,.4106],[.9,.8712,.4231],[.9,.8759,.4357],[.9,.8806,.4482],[.9,.8853,.4608],[.9,.89,.4733],[.9,.8947,.4859],[.9,.8994,.4984],[.9027,.9027,.5137],[.9059,.9059,.5294],[.909,.909,.5451],[.9122,.9122,.5608],[.9153,.9153,.5765],[.9184,.9184,.5922],[.9216,.9216,.6078],[.9247,.9247,.6235],[.9278,.9278,.6392],[.931,.931,.6549],[.9341,.9341,.6706],[.9373,.9373,.6863],[.9404,.9404,.702],[.9435,.9435,.7176],[.9467,.9467,.7333],[.9498,.9498,.749],[.9529,.9529,.7647],[.9561,.9561,.7804],[.9592,.9592,.7961],[.9624,.9624,.8118],[.9655,.9655,.8275],[.9686,.9686,.8431],[.9718,.9718,.8588],[.9749,.9749,.8745],[.978,.978,.8902],[.9812,.9812,.9059],[.9843,.9843,.9216],[.9875,.9875,.9373],[.9906,.9906,.9529],[.9937,.9937,.9686],[.9969,.9969,.9843],[1,1,1]]},Dark2:{interpolate:!1,colors:[[.1059,.6196,.4667],[.851,.3725,.0078],[.4588,.4392,.702],[.9059,.1608,.5412],[.4,.651,.1176],[.902,.6706,.0078],[.651,.4627,.1137],[.4,.4,.4]]},GnBu:{interpolate:!0,colors:[[.9686,.9882,.9412],[.9658,.9871,.9386],[.963,.986,.936],[.9601,.9849,.9334],[.9573,.9838,.9308],[.9545,.9827,.9283],[.9516,.9816,.9257],[.9488,.9805,.9231],[.946,.9794,.9205],[.9432,.9783,.9179],[.9403,.9772,.9153],[.9375,.9761,.9128],[.9347,.9749,.9102],[.9318,.9738,.9076],[.929,.9727,.905],[.9262,.9716,.9024],[.9234,.9705,.8998],[.9205,.9694,.8973],[.9177,.9683,.8947],[.9149,.9672,.8921],[.912,.9661,.8895],[.9092,.965,.8869],[.9064,.9639,.8843],[.9035,.9628,.8818],[.9007,.9617,.8792],[.8979,.9606,.8766],[.8951,.9594,.874],[.8922,.9583,.8714],[.8894,.9572,.8688],[.8866,.9561,.8663],[.8837,.955,.8637],[.8809,.9539,.8611],[.8781,.9528,.8585],[.8757,.9518,.8558],[.8732,.9508,.8531],[.8707,.9499,.8504],[.8683,.9489,.8477],[.8658,.9479,.845],[.8634,.9469,.8422],[.8609,.9459,.8395],[.8584,.9449,.8368],[.856,.944,.8341],[.8535,.943,.8314],[.8511,.942,.8287],[.8486,.941,.826],[.8461,.94,.8233],[.8437,.939,.8206],[.8412,.9381,.8179],[.8388,.9371,.8152],[.8363,.9361,.8125],[.8338,.9351,.8098],[.8314,.9341,.8071],[.8289,.9331,.8044],[.8265,.9321,.8016],[.824,.9312,.7989],[.8215,.9302,.7962],[.8191,.9292,.7935],[.8166,.9282,.7908],[.8141,.9272,.7881],[.8117,.9262,.7854],[.8092,.9253,.7827],[.8068,.9243,.78],[.8043,.9233,.7773],[.8018,.9223,.7746],[.7989,.9211,.7721],[.7945,.9194,.7701],[.79,.9177,.7681],[.7856,.916,.7662],[.7812,.9142,.7642],[.7767,.9125,.7622],[.7723,.9108,.7602],[.7679,.9091,.7583],[.7635,.9074,.7563],[.759,.9056,.7543],[.7546,.9039,.7524],[.7502,.9022,.7504],[.7457,.9005,.7484],[.7413,.8987,.7465],[.7369,.897,.7445],[.7325,.8953,.7425],[.728,.8936,.7406],[.7236,.8919,.7386],[.7192,.8901,.7366],[.7147,.8884,.7347],[.7103,.8867,.7327],[.7059,.885,.7307],[.7015,.8832,.7288],[.697,.8815,.7268],[.6926,.8798,.7248],[.6882,.8781,.7228],[.6837,.8764,.7209],[.6793,.8746,.7189],[.6749,.8729,.7169],[.6704,.8712,.715],[.666,.8695,.713],[.6616,.8677,.711],[.6567,.8659,.7105],[.6512,.8638,.7123],[.6457,.8617,.7142],[.6401,.8596,.716],[.6346,.8575,.7179],[.6291,.8554,.7197],[.6235,.8533,.7216],[.618,.8512,.7234],[.6125,.8492,.7253],[.6069,.8471,.7271],[.6014,.845,.729],[.5958,.8429,.7308],[.5903,.8408,.7326],[.5848,.8387,.7345],[.5792,.8366,.7363],[.5737,.8345,.7382],[.5682,.8324,.74],[.5626,.8303,.7419],[.5571,.8282,.7437],[.5516,.8261,.7456],[.546,.8241,.7474],[.5405,.822,.7493],[.5349,.8199,.7511],[.5294,.8178,.7529],[.5239,.8157,.7548],[.5183,.8136,.7566],[.5128,.8115,.7585],[.5073,.8094,.7603],[.5017,.8073,.7622],[.4962,.8052,.764],[.4907,.8031,.7659],[.4851,.801,.7677],[.4796,.7985,.7696],[.474,.7954,.7714],[.4685,.7923,.7732],[.463,.7892,.7751],[.4574,.7862,.7769],[.4519,.7831,.7788],[.4464,.78,.7806],[.4408,.7769,.7825],[.4353,.7739,.7843],[.4298,.7708,.7862],[.4242,.7677,.788],[.4187,.7646,.7899],[.4131,.7616,.7917],[.4076,.7585,.7935],[.4021,.7554,.7954],[.3965,.7523,.7972],[.391,.7493,.7991],[.3855,.7462,.8009],[.3799,.7431,.8028],[.3744,.74,.8046],[.3689,.7369,.8065],[.3633,.7339,.8083],[.3578,.7308,.8101],[.3522,.7277,.812],[.3467,.7246,.8138],[.3412,.7216,.8157],[.3356,.7185,.8175],[.3301,.7154,.8194],[.3246,.7123,.8212],[.319,.7093,.8231],[.3135,.7062,.8249],[.308,.7031,.8268],[.3032,.699,.8258],[.2989,.6942,.8233],[.2946,.6894,.8207],[.2903,.6846,.8181],[.286,.6798,.8155],[.2817,.675,.8129],[.2774,.6702,.8103],[.273,.6654,.8078],[.2687,.6606,.8052],[.2644,.6558,.8026],[.2601,.651,.8],[.2558,.6462,.7974],[.2515,.6414,.7948],[.2472,.6366,.7922],[.2429,.6318,.7897],[.2386,.627,.7871],[.2343,.6222,.7845],[.23,.6174,.7819],[.2257,.6126,.7793],[.2214,.6078,.7767],[.2171,.603,.7742],[.2128,.5982,.7716],[.2085,.5934,.769],[.2042,.5886,.7664],[.1998,.5838,.7638],[.1955,.579,.7612],[.1912,.5742,.7587],[.1869,.5694,.7561],[.1826,.5646,.7535],[.1783,.5598,.7509],[.174,.555,.7483],[.1697,.5502,.7457],[.1654,.5457,.7434],[.1611,.5413,.7412],[.1568,.5368,.739],[.1525,.5324,.7368],[.1482,.528,.7346],[.1439,.5236,.7324],[.1396,.5191,.7301],[.1353,.5147,.7279],[.1309,.5103,.7257],[.1266,.5058,.7235],[.1223,.5014,.7213],[.118,.497,.7191],[.1137,.4925,.7169],[.1094,.4881,.7146],[.1051,.4837,.7124],[.1008,.4793,.7102],[.0965,.4748,.708],[.0922,.4704,.7058],[.0879,.466,.7036],[.0836,.4615,.7014],[.0793,.4571,.6991],[.075,.4527,.6969],[.0707,.4483,.6947],[.0664,.4438,.6925],[.0621,.4394,.6903],[.0577,.435,.6881],[.0534,.4305,.6859],[.0491,.4261,.6836],[.0448,.4217,.6814],[.0405,.4173,.6792],[.0362,.4128,.677],[.0319,.4084,.6748],[.0314,.4035,.6699],[.0314,.3986,.6646],[.0314,.3937,.6593],[.0314,.3888,.654],[.0314,.3839,.6487],[.0314,.3789,.6434],[.0314,.374,.6381],[.0314,.3691,.6328],[.0314,.3642,.6276],[.0314,.3592,.6223],[.0314,.3543,.617],[.0314,.3494,.6117],[.0314,.3445,.6064],[.0314,.3396,.6011],[.0314,.3346,.5958],[.0314,.3297,.5905],[.0314,.3248,.5852],[.0314,.3199,.5799],[.0314,.315,.5747],[.0314,.31,.5694],[.0314,.3051,.5641],[.0314,.3002,.5588],[.0314,.2953,.5535],[.0314,.2903,.5482],[.0314,.2854,.5429],[.0314,.2805,.5376],[.0314,.2756,.5323],[.0314,.2707,.527],[.0314,.2657,.5218],[.0314,.2608,.5165],[.0314,.2559,.5112],[.0314,.251,.5059]]},Greens:{interpolate:!0,colors:[[.9686,.9882,.9608],[.9664,.9874,.9582],[.9642,.9865,.9556],[.962,.9857,.953],[.9598,.9848,.9504],[.9576,.9839,.9479],[.9553,.9831,.9453],[.9531,.9822,.9427],[.9509,.9813,.9401],[.9487,.9805,.9375],[.9465,.9796,.9349],[.9443,.9788,.9324],[.9421,.9779,.9298],[.9398,.977,.9272],[.9376,.9762,.9246],[.9354,.9753,.922],[.9332,.9745,.9194],[.931,.9736,.9169],[.9288,.9727,.9143],[.9266,.9719,.9117],[.9243,.971,.9091],[.9221,.9701,.9065],[.9199,.9693,.9039],[.9177,.9684,.9014],[.9155,.9676,.8988],[.9133,.9667,.8962],[.911,.9658,.8936],[.9088,.965,.891],[.9066,.9641,.8884],[.9044,.9633,.8859],[.9022,.9624,.8833],[.9,.9615,.8807],[.8976,.9606,.8779],[.8939,.9591,.874],[.8902,.9576,.8701],[.8865,.9562,.8661],[.8828,.9547,.8622],[.8791,.9532,.8583],[.8754,.9517,.8543],[.8717,.9503,.8504],[.8681,.9488,.8464],[.8644,.9473,.8425],[.8607,.9458,.8386],[.857,.9444,.8346],[.8533,.9429,.8307],[.8496,.9414,.8268],[.8459,.9399,.8228],[.8422,.9385,.8189],[.8385,.937,.8149],[.8348,.9355,.811],[.8311,.934,.8071],[.8275,.9325,.8031],[.8238,.9311,.7992],[.8201,.9296,.7953],[.8164,.9281,.7913],[.8127,.9266,.7874],[.809,.9252,.7835],[.8053,.9237,.7795],[.8016,.9222,.7756],[.7979,.9207,.7716],[.7942,.9193,.7677],[.7905,.9178,.7638],[.7869,.9163,.7598],[.7832,.9148,.7559],[.7792,.9132,.7518],[.7745,.9113,.7473],[.7699,.9093,.7427],[.7652,.9073,.7381],[.7605,.9054,.7336],[.7558,.9034,.729],[.7512,.9014,.7245],[.7465,.8995,.7199],[.7418,.8975,.7154],[.7371,.8955,.7108],[.7325,.8935,.7063],[.7278,.8916,.7017],[.7231,.8896,.6972],[.7184,.8876,.6926],[.7138,.8857,.6881],[.7091,.8837,.6835],[.7044,.8817,.679],[.6997,.8798,.6744],[.6951,.8778,.6699],[.6904,.8758,.6653],[.6857,.8739,.6608],[.681,.8719,.6562],[.6764,.8699,.6517],[.6717,.868,.6471],[.667,.866,.6426],[.6623,.864,.638],[.6577,.8621,.6334],[.653,.8601,.6289],[.6483,.8581,.6243],[.6436,.8561,.6198],[.639,.8542,.6152],[.6343,.8522,.6107],[.6293,.85,.6061],[.6238,.8474,.6016],[.6182,.8448,.597],[.6127,.8423,.5925],[.6072,.8397,.5879],[.6016,.8371,.5834],[.5961,.8345,.5788],[.5905,.8319,.5743],[.585,.8293,.5697],[.5795,.8268,.5652],[.5739,.8242,.5606],[.5684,.8216,.5561],[.5629,.819,.5515],[.5573,.8164,.547],[.5518,.8138,.5424],[.5463,.8113,.5379],[.5407,.8087,.5333],[.5352,.8061,.5288],[.5296,.8035,.5242],[.5241,.8009,.5196],[.5186,.7983,.5151],[.513,.7958,.5105],[.5075,.7932,.506],[.502,.7906,.5014],[.4964,.788,.4969],[.4909,.7854,.4923],[.4854,.7828,.4878],[.4798,.7803,.4832],[.4743,.7777,.4787],[.4687,.7751,.4741],[.4632,.7725,.4696],[.4577,.7699,.465],[.4518,.7671,.4612],[.4455,.764,.4581],[.4392,.7609,.4551],[.4329,.7579,.452],[.4267,.7548,.4489],[.4204,.7517,.4458],[.4141,.7486,.4428],[.4078,.7456,.4397],[.4016,.7425,.4366],[.3953,.7394,.4335],[.389,.7363,.4304],[.3827,.7333,.4274],[.3765,.7302,.4243],[.3702,.7271,.4212],[.3639,.724,.4181],[.3576,.721,.4151],[.3514,.7179,.412],[.3451,.7148,.4089],[.3388,.7117,.4058],[.3325,.7087,.4028],[.3263,.7056,.3997],[.32,.7025,.3966],[.3137,.6994,.3935],[.3075,.6963,.3905],[.3012,.6933,.3874],[.2949,.6902,.3843],[.2886,.6871,.3812],[.2824,.684,.3782],[.2761,.681,.3751],[.2698,.6779,.372],[.2635,.6748,.3689],[.2573,.6717,.3659],[.2526,.6681,.3629],[.2489,.6642,.3599],[.2452,.6603,.357],[.2415,.6563,.354],[.2378,.6524,.351],[.2341,.6484,.3481],[.2304,.6445,.3451],[.2268,.6406,.3422],[.2231,.6366,.3392],[.2194,.6327,.3363],[.2157,.6288,.3333],[.212,.6248,.3304],[.2083,.6209,.3274],[.2046,.6169,.3245],[.2009,.613,.3215],[.1972,.6091,.3186],[.1935,.6051,.3156],[.1899,.6012,.3127],[.1862,.5973,.3097],[.1825,.5933,.3068],[.1788,.5894,.3038],[.1751,.5855,.3009],[.1714,.5815,.2979],[.1677,.5776,.2949],[.164,.5736,.292],[.1603,.5697,.289],[.1566,.5658,.2861],[.1529,.5618,.2831],[.1493,.5579,.2802],[.1456,.554,.2772],[.1419,.55,.2743],[.1382,.5461,.2713],[.134,.5423,.2683],[.1297,.5386,.2652],[.1254,.5349,.2621],[.1211,.5313,.2591],[.1168,.5276,.256],[.1125,.5239,.2529],[.1082,.5202,.2498],[.1039,.5165,.2468],[.0996,.5128,.2437],[.0953,.5091,.2406],[.091,.5054,.2375],[.0867,.5017,.2344],[.0824,.498,.2314],[.078,.4943,.2283],[.0737,.4907,.2252],[.0694,.487,.2221],[.0651,.4833,.2191],[.0608,.4796,.216],[.0565,.4759,.2129],[.0522,.4722,.2098],[.0479,.4685,.2068],[.0436,.4648,.2037],[.0393,.4611,.2006],[.035,.4574,.1975],[.0307,.4537,.1945],[.0264,.4501,.1914],[.0221,.4464,.1883],[.0178,.4427,.1852],[.0135,.439,.1822],[.0092,.4353,.1791],[.0048,.4316,.176],[5e-4,.4279,.1729],[0,.423,.1707],[0,.418,.1686],[0,.4129,.1665],[0,.4079,.1644],[0,.4029,.1624],[0,.3978,.1603],[0,.3928,.1582],[0,.3877,.1561],[0,.3827,.154],[0,.3776,.1519],[0,.3726,.1498],[0,.3676,.1477],[0,.3625,.1456],[0,.3575,.1435],[0,.3524,.1414],[0,.3474,.1393],[0,.3423,.1373],[0,.3373,.1352],[0,.3322,.1331],[0,.3272,.131],[0,.3222,.1289],[0,.3171,.1268],[0,.3121,.1247],[0,.307,.1226],[0,.302,.1205],[0,.2969,.1184],[0,.2919,.1163],[0,.2868,.1142],[0,.2818,.1122],[0,.2768,.1101],[0,.2717,.108],[0,.2667,.1059]]},Greys:{interpolate:!0,colors:[[1,1,1],[.9982,.9982,.9982],[.9963,.9963,.9963],[.9945,.9945,.9945],[.9926,.9926,.9926],[.9908,.9908,.9908],[.9889,.9889,.9889],[.9871,.9871,.9871],[.9852,.9852,.9852],[.9834,.9834,.9834],[.9815,.9815,.9815],[.9797,.9797,.9797],[.9779,.9779,.9779],[.976,.976,.976],[.9742,.9742,.9742],[.9723,.9723,.9723],[.9705,.9705,.9705],[.9686,.9686,.9686],[.9668,.9668,.9668],[.9649,.9649,.9649],[.9631,.9631,.9631],[.9612,.9612,.9612],[.9594,.9594,.9594],[.9576,.9576,.9576],[.9557,.9557,.9557],[.9539,.9539,.9539],[.952,.952,.952],[.9502,.9502,.9502],[.9483,.9483,.9483],[.9465,.9465,.9465],[.9446,.9446,.9446],[.9428,.9428,.9428],[.9408,.9408,.9408],[.938,.938,.938],[.9352,.9352,.9352],[.9323,.9323,.9323],[.9295,.9295,.9295],[.9267,.9267,.9267],[.9238,.9238,.9238],[.921,.921,.921],[.9182,.9182,.9182],[.9154,.9154,.9154],[.9125,.9125,.9125],[.9097,.9097,.9097],[.9069,.9069,.9069],[.904,.904,.904],[.9012,.9012,.9012],[.8984,.8984,.8984],[.8955,.8955,.8955],[.8927,.8927,.8927],[.8899,.8899,.8899],[.8871,.8871,.8871],[.8842,.8842,.8842],[.8814,.8814,.8814],[.8786,.8786,.8786],[.8757,.8757,.8757],[.8729,.8729,.8729],[.8701,.8701,.8701],[.8673,.8673,.8673],[.8644,.8644,.8644],[.8616,.8616,.8616],[.8588,.8588,.8588],[.8559,.8559,.8559],[.8531,.8531,.8531],[.8501,.8501,.8501],[.8467,.8467,.8467],[.8432,.8432,.8432],[.8398,.8398,.8398],[.8363,.8363,.8363],[.8329,.8329,.8329],[.8295,.8295,.8295],[.826,.826,.826],[.8226,.8226,.8226],[.8191,.8191,.8191],[.8157,.8157,.8157],[.8122,.8122,.8122],[.8088,.8088,.8088],[.8053,.8053,.8053],[.8019,.8019,.8019],[.7984,.7984,.7984],[.795,.795,.795],[.7916,.7916,.7916],[.7881,.7881,.7881],[.7847,.7847,.7847],[.7812,.7812,.7812],[.7778,.7778,.7778],[.7743,.7743,.7743],[.7709,.7709,.7709],[.7674,.7674,.7674],[.764,.764,.764],[.7606,.7606,.7606],[.7571,.7571,.7571],[.7537,.7537,.7537],[.7502,.7502,.7502],[.7468,.7468,.7468],[.7433,.7433,.7433],[.7394,.7394,.7394],[.7346,.7346,.7346],[.7298,.7298,.7298],[.725,.725,.725],[.7202,.7202,.7202],[.7154,.7154,.7154],[.7106,.7106,.7106],[.7058,.7058,.7058],[.701,.701,.701],[.6962,.6962,.6962],[.6914,.6914,.6914],[.6866,.6866,.6866],[.6818,.6818,.6818],[.677,.677,.677],[.6722,.6722,.6722],[.6674,.6674,.6674],[.6626,.6626,.6626],[.6578,.6578,.6578],[.653,.653,.653],[.6482,.6482,.6482],[.6434,.6434,.6434],[.6386,.6386,.6386],[.6338,.6338,.6338],[.629,.629,.629],[.6242,.6242,.6242],[.6194,.6194,.6194],[.6146,.6146,.6146],[.6098,.6098,.6098],[.605,.605,.605],[.6002,.6002,.6002],[.5954,.5954,.5954],[.5906,.5906,.5906],[.5861,.5861,.5861],[.5818,.5818,.5818],[.5775,.5775,.5775],[.5732,.5732,.5732],[.5689,.5689,.5689],[.5646,.5646,.5646],[.5602,.5602,.5602],[.5559,.5559,.5559],[.5516,.5516,.5516],[.5473,.5473,.5473],[.543,.543,.543],[.5387,.5387,.5387],[.5344,.5344,.5344],[.5301,.5301,.5301],[.5258,.5258,.5258],[.5215,.5215,.5215],[.5172,.5172,.5172],[.5129,.5129,.5129],[.5086,.5086,.5086],[.5043,.5043,.5043],[.5,.5,.5],[.4957,.4957,.4957],[.4913,.4913,.4913],[.487,.487,.487],[.4827,.4827,.4827],[.4784,.4784,.4784],[.4741,.4741,.4741],[.4698,.4698,.4698],[.4655,.4655,.4655],[.4612,.4612,.4612],[.4569,.4569,.4569],[.4526,.4526,.4526],[.4484,.4484,.4484],[.4444,.4444,.4444],[.4403,.4403,.4403],[.4363,.4363,.4363],[.4322,.4322,.4322],[.4281,.4281,.4281],[.4241,.4241,.4241],[.42,.42,.42],[.416,.416,.416],[.4119,.4119,.4119],[.4078,.4078,.4078],[.4038,.4038,.4038],[.3997,.3997,.3997],[.3957,.3957,.3957],[.3916,.3916,.3916],[.3875,.3875,.3875],[.3835,.3835,.3835],[.3794,.3794,.3794],[.3754,.3754,.3754],[.3713,.3713,.3713],[.3672,.3672,.3672],[.3632,.3632,.3632],[.3591,.3591,.3591],[.3551,.3551,.3551],[.351,.351,.351],[.3469,.3469,.3469],[.3429,.3429,.3429],[.3388,.3388,.3388],[.3348,.3348,.3348],[.3307,.3307,.3307],[.3266,.3266,.3266],[.3226,.3226,.3226],[.3174,.3174,.3174],[.3119,.3119,.3119],[.3063,.3063,.3063],[.3008,.3008,.3008],[.2953,.2953,.2953],[.2897,.2897,.2897],[.2842,.2842,.2842],[.2787,.2787,.2787],[.2731,.2731,.2731],[.2676,.2676,.2676],[.2621,.2621,.2621],[.2565,.2565,.2565],[.251,.251,.251],[.2454,.2454,.2454],[.2399,.2399,.2399],[.2344,.2344,.2344],[.2288,.2288,.2288],[.2233,.2233,.2233],[.2178,.2178,.2178],[.2122,.2122,.2122],[.2067,.2067,.2067],[.2012,.2012,.2012],[.1956,.1956,.1956],[.1901,.1901,.1901],[.1845,.1845,.1845],[.179,.179,.179],[.1735,.1735,.1735],[.1679,.1679,.1679],[.1624,.1624,.1624],[.1569,.1569,.1569],[.1513,.1513,.1513],[.1458,.1458,.1458],[.1411,.1411,.1411],[.1366,.1366,.1366],[.132,.132,.132],[.1275,.1275,.1275],[.1229,.1229,.1229],[.1184,.1184,.1184],[.1138,.1138,.1138],[.1093,.1093,.1093],[.1047,.1047,.1047],[.1001,.1001,.1001],[.0956,.0956,.0956],[.091,.091,.091],[.0865,.0865,.0865],[.0819,.0819,.0819],[.0774,.0774,.0774],[.0728,.0728,.0728],[.0683,.0683,.0683],[.0637,.0637,.0637],[.0592,.0592,.0592],[.0546,.0546,.0546],[.0501,.0501,.0501],[.0455,.0455,.0455],[.041,.041,.041],[.0364,.0364,.0364],[.0319,.0319,.0319],[.0273,.0273,.0273],[.0228,.0228,.0228],[.0182,.0182,.0182],[.0137,.0137,.0137],[.0091,.0091,.0091],[.0046,.0046,.0046],[0,0,0]]},OrRd:{interpolate:!0,colors:[[1,.9686,.9255],[.9999,.9668,.9211],[.9998,.9649,.9166],[.9996,.9631,.9122],[.9995,.9612,.9078],[.9994,.9594,.9033],[.9993,.9576,.8989],[.9991,.9557,.8945],[.999,.9539,.8901],[.9989,.952,.8856],[.9988,.9502,.8812],[.9986,.9483,.8768],[.9985,.9465,.8723],[.9984,.9446,.8679],[.9983,.9428,.8635],[.9982,.9409,.8591],[.998,.9391,.8546],[.9979,.9373,.8502],[.9978,.9354,.8458],[.9977,.9336,.8413],[.9975,.9317,.8369],[.9974,.9299,.8325],[.9973,.928,.8281],[.9972,.9262,.8236],[.997,.9243,.8192],[.9969,.9225,.8148],[.9968,.9206,.8103],[.9967,.9188,.8059],[.9966,.917,.8015],[.9964,.9151,.797],[.9963,.9133,.7926],[.9962,.9114,.7882],[.9961,.9095,.7837],[.9959,.907,.7785],[.9958,.9046,.7733],[.9957,.9021,.7682],[.9956,.8997,.763],[.9954,.8972,.7578],[.9953,.8947,.7527],[.9952,.8923,.7475],[.9951,.8898,.7423],[.995,.8874,.7372],[.9948,.8849,.732],[.9947,.8824,.7268],[.9946,.88,.7217],[.9945,.8775,.7165],[.9943,.875,.7113],[.9942,.8726,.7062],[.9941,.8701,.701],[.994,.8677,.6958],[.9938,.8652,.6907],[.9937,.8627,.6855],[.9936,.8603,.6803],[.9935,.8578,.6752],[.9934,.8554,.67],[.9932,.8529,.6648],[.9931,.8504,.6597],[.993,.848,.6545],[.9929,.8455,.6493],[.9927,.8431,.6442],[.9926,.8406,.639],[.9925,.8381,.6338],[.9924,.8357,.6287],[.9922,.8332,.6235],[.9922,.8306,.6188],[.9922,.8275,.6156],[.9922,.8245,.6124],[.9922,.8214,.6092],[.9922,.8183,.606],[.9922,.8152,.6028],[.9922,.8121,.5996],[.9922,.8091,.5964],[.9922,.806,.5932],[.9922,.8029,.59],[.9922,.7998,.5868],[.9922,.7968,.5836],[.9922,.7937,.5804],[.9922,.7906,.5772],[.9922,.7875,.574],[.9922,.7845,.5708],[.9922,.7814,.5676],[.9922,.7783,.5644],[.9922,.7752,.5612],[.9922,.7722,.558],[.9922,.7691,.5548],[.9922,.766,.5516],[.9922,.7629,.5484],[.9922,.7599,.5452],[.9922,.7568,.542],[.9922,.7537,.5388],[.9922,.7506,.5356],[.9922,.7476,.5324],[.9922,.7445,.5292],[.9922,.7414,.526],[.9922,.7383,.5228],[.9922,.7353,.5196],[.9921,.7312,.5157],[.992,.7256,.5104],[.9919,.7199,.5051],[.9917,.7142,.4998],[.9916,.7086,.4945],[.9915,.7029,.4892],[.9914,.6973,.4839],[.9912,.6916,.4786],[.9911,.6859,.4733],[.991,.6803,.4681],[.9909,.6746,.4628],[.9908,.669,.4575],[.9906,.6633,.4522],[.9905,.6576,.4469],[.9904,.652,.4416],[.9903,.6463,.4363],[.9901,.6407,.431],[.99,.635,.4257],[.9899,.6293,.4204],[.9898,.6237,.4151],[.9897,.618,.4099],[.9895,.6124,.4046],[.9894,.6067,.3993],[.9893,.601,.394],[.9892,.5954,.3887],[.989,.5897,.3834],[.9889,.5841,.3781],[.9888,.5784,.3728],[.9887,.5727,.3675],[.9885,.5671,.3622],[.9884,.5614,.357],[.9883,.5558,.3517],[.9874,.5505,.348],[.9858,.5456,.3459],[.9842,.5406,.3438],[.9826,.5357,.3417],[.981,.5308,.3396],[.9794,.5259,.3375],[.9778,.521,.3354],[.9762,.516,.3333],[.9746,.5111,.3312],[.973,.5062,.3292],[.9714,.5013,.3271],[.9698,.4963,.325],[.9682,.4914,.3229],[.9666,.4865,.3208],[.965,.4816,.3187],[.9634,.4767,.3166],[.9618,.4717,.3145],[.9602,.4668,.3124],[.9586,.4619,.3103],[.957,.457,.3082],[.9554,.4521,.3061],[.9538,.4471,.3041],[.9522,.4422,.302],[.9506,.4373,.2999],[.9491,.4324,.2978],[.9475,.4275,.2957],[.9459,.4225,.2936],[.9443,.4176,.2915],[.9427,.4127,.2894],[.9411,.4078,.2873],[.9395,.4028,.2852],[.9379,.3979,.2831],[.9354,.392,.2792],[.9325,.3855,.2742],[.9295,.379,.2691],[.9266,.3724,.2641],[.9236,.3659,.259],[.9206,.3594,.254],[.9177,.3529,.2489],[.9147,.3464,.2439],[.9118,.3398,.2388],[.9088,.3333,.2338],[.9059,.3268,.2288],[.9029,.3203,.2237],[.9,.3138,.2187],[.897,.3072,.2136],[.8941,.3007,.2086],[.8911,.2942,.2035],[.8882,.2877,.1985],[.8852,.2812,.1934],[.8823,.2746,.1884],[.8793,.2681,.1834],[.8764,.2616,.1783],[.8734,.2551,.1733],[.8704,.2486,.1682],[.8675,.242,.1632],[.8645,.2355,.1581],[.8616,.229,.1531],[.8586,.2225,.1481],[.8557,.2159,.143],[.8527,.2094,.138],[.8498,.2029,.1329],[.8468,.1964,.1279],[.8439,.1899,.1228],[.8398,.1838,.1187],[.8354,.1779,.1149],[.831,.172,.1111],[.8265,.1661,.1073],[.8221,.1602,.1035],[.8177,.1543,.0996],[.8132,.1484,.0958],[.8088,.1425,.092],[.8044,.1366,.0882],[.8,.1307,.0844],[.7955,.1248,.0806],[.7911,.1188,.0768],[.7867,.1129,.0729],[.7822,.107,.0691],[.7778,.1011,.0653],[.7734,.0952,.0615],[.769,.0893,.0577],[.7645,.0834,.0539],[.7601,.0775,.0501],[.7557,.0716,.0462],[.7512,.0657,.0424],[.7468,.0598,.0386],[.7424,.0539,.0348],[.7379,.048,.031],[.7335,.0421,.0272],[.7291,.0362,.0234],[.7247,.0303,.0195],[.7202,.0244,.0157],[.7158,.0185,.0119],[.7114,.0125,.0081],[.7069,.0066,.0043],[.7025,7e-4,5e-4],[.6964,0,0],[.69,0,0],[.6836,0,0],[.6772,0,0],[.6708,0,0],[.6644,0,0],[.658,0,0],[.6516,0,0],[.6452,0,0],[.6388,0,0],[.6324,0,0],[.626,0,0],[.6196,0,0],[.6132,0,0],[.6068,0,0],[.6004,0,0],[.594,0,0],[.5876,0,0],[.5812,0,0],[.5748,0,0],[.5684,0,0],[.562,0,0],[.5556,0,0],[.5492,0,0],[.5428,0,0],[.5364,0,0],[.53,0,0],[.5236,0,0],[.5172,0,0],[.5108,0,0],[.5044,0,0],[.498,0,0]]},Oranges:{interpolate:!0,colors:[[1,.9608,.9216],[.9999,.9589,.918],[.9998,.9571,.9144],[.9996,.9552,.9109],[.9995,.9534,.9073],[.9994,.9516,.9037],[.9993,.9497,.9002],[.9991,.9479,.8966],[.999,.946,.893],[.9989,.9442,.8895],[.9988,.9423,.8859],[.9986,.9405,.8823],[.9985,.9386,.8788],[.9984,.9368,.8752],[.9983,.9349,.8716],[.9982,.9331,.8681],[.998,.9313,.8645],[.9979,.9294,.8609],[.9978,.9276,.8573],[.9977,.9257,.8538],[.9975,.9239,.8502],[.9974,.922,.8466],[.9973,.9202,.8431],[.9972,.9183,.8395],[.997,.9165,.8359],[.9969,.9146,.8324],[.9968,.9128,.8288],[.9967,.911,.8252],[.9966,.9091,.8217],[.9964,.9073,.8181],[.9963,.9054,.8145],[.9962,.9036,.811],[.9961,.9016,.8072],[.9959,.8989,.8018],[.9958,.8962,.7963],[.9957,.8935,.7909],[.9956,.8908,.7855],[.9954,.8881,.7801],[.9953,.8854,.7747],[.9952,.8827,.7693],[.9951,.88,.7639],[.995,.8773,.7584],[.9948,.8746,.753],[.9947,.8718,.7476],[.9946,.8691,.7422],[.9945,.8664,.7368],[.9943,.8637,.7314],[.9942,.861,.726],[.9941,.8583,.7206],[.994,.8556,.7151],[.9938,.8529,.7097],[.9937,.8502,.7043],[.9936,.8475,.6989],[.9935,.8448,.6935],[.9934,.8421,.6881],[.9932,.8394,.6827],[.9931,.8367,.6772],[.993,.834,.6718],[.9929,.8312,.6664],[.9927,.8285,.661],[.9926,.8258,.6556],[.9925,.8231,.6502],[.9924,.8204,.6448],[.9922,.8177,.6394],[.9922,.8146,.6336],[.9922,.8105,.6268],[.9922,.8063,.6201],[.9922,.8021,.6133],[.9922,.7979,.6065],[.9922,.7937,.5998],[.9922,.7895,.593],[.9922,.7854,.5862],[.9922,.7812,.5795],[.9922,.777,.5727],[.9922,.7728,.5659],[.9922,.7686,.5592],[.9922,.7644,.5524],[.9922,.7603,.5456],[.9922,.7561,.5389],[.9922,.7519,.5321],[.9922,.7477,.5253],[.9922,.7435,.5186],[.9922,.7393,.5118],[.9922,.7352,.505],[.9922,.731,.4983],[.9922,.7268,.4915],[.9922,.7226,.4847],[.9922,.7184,.478],[.9922,.7142,.4712],[.9922,.7101,.4644],[.9922,.7059,.4577],[.9922,.7017,.4509],[.9922,.6975,.4441],[.9922,.6933,.4374],[.9922,.6892,.4306],[.9922,.685,.4238],[.9922,.6808,.4174],[.9922,.6768,.4117],[.9922,.6727,.4059],[.9922,.6687,.4001],[.9922,.6646,.3943],[.9922,.6605,.3885],[.9922,.6565,.3827],[.9922,.6524,.377],[.9922,.6484,.3712],[.9922,.6443,.3654],[.9922,.6402,.3596],[.9922,.6362,.3538],[.9922,.6321,.3481],[.9922,.6281,.3423],[.9922,.624,.3365],[.9922,.6199,.3307],[.9922,.6159,.3249],[.9922,.6118,.3191],[.9922,.6078,.3134],[.9922,.6037,.3076],[.9922,.5996,.3018],[.9922,.5956,.296],[.9922,.5915,.2902],[.9922,.5875,.2844],[.9922,.5834,.2787],[.9922,.5793,.2729],[.9922,.5753,.2671],[.9922,.5712,.2613],[.9922,.5672,.2555],[.9922,.5631,.2498],[.9922,.559,.244],[.9922,.555,.2382],[.9914,.5507,.2328],[.9899,.5463,.2277],[.9885,.5419,.2227],[.987,.5374,.2176],[.9855,.533,.2126],[.984,.5286,.2076],[.9826,.5242,.2025],[.9811,.5197,.1975],[.9796,.5153,.1924],[.9781,.5109,.1874],[.9767,.5064,.1823],[.9752,.502,.1773],[.9737,.4976,.1722],[.9722,.4931,.1672],[.9707,.4887,.1622],[.9693,.4843,.1571],[.9678,.4799,.1521],[.9663,.4754,.147],[.9648,.471,.142],[.9634,.4666,.1369],[.9619,.4621,.1319],[.9604,.4577,.1268],[.9589,.4533,.1218],[.9575,.4489,.1168],[.956,.4444,.1117],[.9545,.44,.1067],[.953,.4356,.1016],[.9516,.4311,.0966],[.9501,.4267,.0915],[.9486,.4223,.0865],[.9471,.4179,.0814],[.9457,.4134,.0764],[.9433,.4092,.0731],[.9403,.4052,.0709],[.9373,.4011,.0687],[.9344,.397,.0665],[.9314,.393,.0643],[.9285,.3889,.0621],[.9255,.3849,.0598],[.9226,.3808,.0576],[.9196,.3767,.0554],[.9167,.3727,.0532],[.9137,.3686,.051],[.9108,.3646,.0488],[.9078,.3605,.0466],[.9049,.3564,.0443],[.9019,.3524,.0421],[.899,.3483,.0399],[.896,.3443,.0377],[.8931,.3402,.0355],[.8901,.3361,.0333],[.8872,.3321,.031],[.8842,.328,.0288],[.8812,.324,.0266],[.8783,.3199,.0244],[.8753,.3158,.0222],[.8724,.3118,.02],[.8694,.3077,.0178],[.8665,.3037,.0155],[.8635,.2996,.0133],[.8606,.2955,.0111],[.8576,.2915,.0089],[.8547,.2874,.0067],[.8517,.2834,.0045],[.8463,.2807,.0041],[.84,.2785,.0044],[.8337,.2763,.0046],[.8275,.274,.0048],[.8212,.2718,.0051],[.8149,.2696,.0053],[.8086,.2674,.0056],[.8024,.2652,.0058],[.7961,.263,.0061],[.7898,.2608,.0063],[.7835,.2585,.0066],[.7773,.2563,.0068],[.771,.2541,.0071],[.7647,.2519,.0073],[.7584,.2497,.0076],[.7522,.2475,.0078],[.7459,.2453,.008],[.7396,.243,.0083],[.7333,.2408,.0085],[.7271,.2386,.0088],[.7208,.2364,.009],[.7145,.2342,.0093],[.7082,.232,.0095],[.702,.2298,.0098],[.6957,.2275,.01],[.6894,.2253,.0103],[.6831,.2231,.0105],[.6769,.2209,.0107],[.6706,.2187,.011],[.6643,.2165,.0112],[.658,.2143,.0115],[.6518,.212,.0117],[.6468,.2101,.0119],[.642,.2083,.012],[.6372,.2065,.0121],[.6324,.2046,.0122],[.6276,.2028,.0124],[.6228,.2009,.0125],[.618,.1991,.0126],[.6132,.1972,.0127],[.6084,.1954,.0129],[.6036,.1935,.013],[.5988,.1917,.0131],[.594,.1899,.0132],[.5892,.188,.0133],[.5844,.1862,.0135],[.5796,.1843,.0136],[.5748,.1825,.0137],[.57,.1806,.0138],[.5652,.1788,.014],[.5604,.1769,.0141],[.5556,.1751,.0142],[.5508,.1732,.0143],[.546,.1714,.0145],[.5412,.1696,.0146],[.5364,.1677,.0147],[.5316,.1659,.0148],[.5268,.164,.0149],[.522,.1622,.0151],[.5172,.1603,.0152],[.5124,.1585,.0153],[.5076,.1566,.0154],[.5028,.1548,.0156],[.498,.1529,.0157]]},PRGn:{interpolate:!0,colors:[[.251,0,.2941],[.2593,.0065,.3027],[.2676,.0129,.3113],[.2759,.0194,.32],[.2842,.0258,.3286],[.2925,.0323,.3372],[.3008,.0388,.3458],[.3091,.0452,.3544],[.3174,.0517,.363],[.3257,.0581,.3716],[.334,.0646,.3802],[.3423,.071,.3889],[.3506,.0775,.3975],[.3589,.084,.4061],[.3672,.0904,.4147],[.3755,.0969,.4233],[.3839,.1033,.4319],[.3922,.1098,.4405],[.4005,.1163,.4491],[.4088,.1227,.4577],[.4171,.1292,.4664],[.4254,.1356,.475],[.4337,.1421,.4836],[.442,.1486,.4922],[.4503,.155,.5008],[.4586,.1615,.5094],[.4654,.1701,.5168],[.4708,.1809,.523],[.4762,.1916,.5291],[.4816,.2024,.5353],[.487,.2131,.5414],[.4923,.2239,.5476],[.4977,.2347,.5537],[.5031,.2454,.5599],[.5085,.2562,.566],[.5139,.267,.5722],[.5193,.2777,.5783],[.5246,.2885,.5845],[.53,.2993,.5906],[.5354,.31,.5968],[.5408,.3208,.6029],[.5462,.3316,.6091],[.5516,.3423,.6152],[.5569,.3531,.6214],[.5623,.3639,.6275],[.5677,.3746,.6337],[.5731,.3854,.6398],[.5785,.3962,.646],[.5839,.4069,.6521],[.5892,.4177,.6583],[.5946,.4285,.6644],[.6,.4392,.6706],[.6063,.4474,.6761],[.6126,.4555,.6817],[.6189,.4637,.6872],[.6252,.4718,.6927],[.6315,.48,.6983],[.6378,.4881,.7038],[.6441,.4963,.7093],[.6504,.5044,.7149],[.6567,.5126,.7204],[.6631,.5207,.726],[.6694,.5289,.7315],[.6757,.537,.737],[.682,.5452,.7426],[.6883,.5533,.7481],[.6946,.5615,.7536],[.7009,.5696,.7592],[.7072,.5778,.7647],[.7135,.5859,.7702],[.7198,.5941,.7758],[.7261,.6022,.7813],[.7324,.6104,.7869],[.7387,.6185,.7924],[.745,.6267,.7979],[.7513,.6348,.8035],[.7576,.643,.809],[.7636,.6507,.8137],[.7693,.6579,.8175],[.775,.6651,.8214],[.7807,.6724,.8252],[.7864,.6796,.8291],[.7921,.6868,.8329],[.7978,.694,.8368],[.8035,.7013,.8406],[.8092,.7085,.8444],[.8148,.7157,.8483],[.8205,.723,.8521],[.8262,.7302,.856],[.8319,.7374,.8598],[.8376,.7446,.8637],[.8433,.7519,.8675],[.849,.7591,.8714],[.8547,.7663,.8752],[.8604,.7735,.879],[.8661,.7808,.8829],[.8717,.788,.8867],[.8774,.7952,.8906],[.8831,.8025,.8944],[.8888,.8097,.8983],[.8945,.8169,.9021],[.9002,.8241,.906],[.9059,.8314,.9098],[.9083,.8368,.9121],[.9108,.8421,.9144],[.9133,.8475,.9167],[.9157,.8529,.919],[.9182,.8583,.9213],[.9206,.8637,.9236],[.9231,.8691,.926],[.9256,.8744,.9283],[.928,.8798,.9306],[.9305,.8852,.9329],[.9329,.8906,.9352],[.9354,.896,.9375],[.9379,.9013,.9398],[.9403,.9067,.9421],[.9428,.9121,.9444],[.9453,.9175,.9467],[.9477,.9229,.949],[.9502,.9283,.9513],[.9526,.9336,.9536],[.9551,.939,.9559],[.9576,.9444,.9582],[.96,.9498,.9606],[.9625,.9552,.9629],[.9649,.9606,.9652],[.9674,.9659,.9675],[.9663,.9681,.9659],[.9617,.967,.9603],[.9571,.9659,.9548],[.9525,.9649,.9493],[.9479,.9638,.9437],[.9433,.9627,.9382],[.9386,.9616,.9326],[.934,.9606,.9271],[.9294,.9595,.9216],[.9248,.9584,.916],[.9202,.9573,.9105],[.9156,.9562,.905],[.911,.9552,.8994],[.9063,.9541,.8939],[.9017,.953,.8884],[.8971,.9519,.8828],[.8925,.9509,.8773],[.8879,.9498,.8717],[.8833,.9487,.8662],[.8787,.9476,.8607],[.874,.9466,.8551],[.8694,.9455,.8496],[.8648,.9444,.8441],[.8602,.9433,.8385],[.8556,.9423,.833],[.851,.9412,.8275],[.8431,.9379,.8196],[.8353,.9347,.8118],[.8275,.9315,.8039],[.8196,.9283,.7961],[.8118,.925,.7882],[.8039,.9218,.7804],[.7961,.9186,.7725],[.7882,.9153,.7647],[.7804,.9121,.7569],[.7725,.9089,.749],[.7647,.9057,.7412],[.7569,.9024,.7333],[.749,.8992,.7255],[.7412,.896,.7176],[.7333,.8927,.7098],[.7255,.8895,.702],[.7176,.8863,.6941],[.7098,.883,.6863],[.702,.8798,.6784],[.6941,.8766,.6706],[.6863,.8734,.6627],[.6784,.8701,.6549],[.6706,.8669,.6471],[.6627,.8637,.6392],[.6549,.8604,.6314],[.6451,.8554,.6226],[.6334,.8484,.6129],[.6218,.8415,.6032],[.6101,.8346,.5935],[.5984,.8277,.5839],[.5867,.8208,.5742],[.575,.8138,.5645],[.5633,.8069,.5548],[.5516,.8,.5451],[.5399,.7931,.5354],[.5283,.7862,.5257],[.5166,.7792,.516],[.5049,.7723,.5063],[.4932,.7654,.4967],[.4815,.7585,.487],[.4698,.7516,.4773],[.4581,.7446,.4676],[.4464,.7377,.4579],[.4348,.7308,.4482],[.4231,.7239,.4385],[.4114,.717,.4288],[.3997,.71,.4191],[.388,.7031,.4095],[.3763,.6962,.3998],[.3646,.6893,.3901],[.3529,.6824,.3804],[.3433,.674,.3739],[.3336,.6657,.3675],[.3239,.6574,.361],[.3142,.6491,.3546],[.3045,.6408,.3481],[.2948,.6325,.3416],[.2851,.6242,.3352],[.2754,.6159,.3287],[.2657,.6076,.3223],[.2561,.5993,.3158],[.2464,.591,.3093],[.2367,.5827,.3029],[.227,.5744,.2964],[.2173,.5661,.29],[.2076,.5578,.2835],[.1979,.5495,.277],[.1882,.5412,.2706],[.1785,.5329,.2641],[.1689,.5246,.2577],[.1592,.5163,.2512],[.1495,.508,.2448],[.1398,.4997,.2383],[.1301,.4913,.2318],[.1204,.483,.2254],[.1107,.4747,.2189],[.1038,.4666,.2135],[.0997,.4586,.2092],[.0955,.4506,.2049],[.0913,.4426,.2006],[.0872,.4346,.1963],[.083,.4266,.192],[.0789,.4186,.1877],[.0747,.4106,.1834],[.0706,.4026,.1791],[.0664,.3946,.1748],[.0623,.3866,.1705],[.0581,.3786,.1662],[.054,.3706,.1619],[.0498,.3626,.1576],[.0457,.3546,.1532],[.0415,.3466,.1489],[.0374,.3386,.1446],[.0332,.3306,.1403],[.0291,.3226,.136],[.0249,.3146,.1317],[.0208,.3067,.1274],[.0166,.2987,.1231],[.0125,.2907,.1188],[.0083,.2827,.1145],[.0042,.2747,.1102],[0,.2667,.1059]]},Paired:{interpolate:!1,colors:[[.651,.8078,.8902],[.1216,.4706,.7059],[.698,.8745,.5412],[.2,.6275,.1725],[.9843,.6039,.6],[.8902,.102,.1098],[.9922,.749,.4353],[1,.498,0],[.7922,.698,.8392],[.4157,.2392,.6039],[1,1,.6],[.6941,.349,.1569]]},Pastel1:{interpolate:!1,colors:[[.9843,.7059,.6824],[.702,.8039,.8902],[.8,.9216,.7725],[.8706,.7961,.8941],[.9961,.851,.651],[1,1,.8],[.898,.8471,.7412],[.9922,.8549,.9255],[.949,.949,.949]]},Pastel2:{interpolate:!1,colors:[[.702,.8863,.8039],[.9922,.8039,.6745],[.7961,.8353,.9098],[.9569,.7922,.8941],[.902,.9608,.7882],[1,.949,.6824],[.9451,.8863,.8],[.8,.8,.8]]},PiYG:{interpolate:!0,colors:[[.5569,.0039,.3216],[.5653,.0079,.3282],[.5738,.0119,.3348],[.5822,.0159,.3414],[.5907,.0199,.348],[.5992,.0239,.3546],[.6076,.0279,.3612],[.6161,.0319,.3679],[.6245,.0359,.3745],[.633,.0399,.3811],[.6414,.0439,.3877],[.6499,.0479,.3943],[.6584,.0519,.4009],[.6668,.0559,.4075],[.6753,.0599,.4141],[.6837,.0639,.4208],[.6922,.0679,.4274],[.7007,.0719,.434],[.7091,.0759,.4406],[.7176,.0799,.4472],[.726,.0839,.4538],[.7345,.0879,.4604],[.7429,.0919,.4671],[.7514,.0959,.4737],[.7599,.0999,.4803],[.7683,.1039,.4869],[.7745,.113,.494],[.7783,.1271,.5015],[.7822,.1413,.509],[.786,.1554,.5166],[.7899,.1696,.5241],[.7937,.1837,.5316],[.7975,.1978,.5392],[.8014,.212,.5467],[.8052,.2261,.5542],[.8091,.2403,.5618],[.8129,.2544,.5693],[.8168,.2686,.5769],[.8206,.2827,.5844],[.8245,.2969,.5919],[.8283,.311,.5995],[.8321,.3252,.607],[.836,.3393,.6145],[.8398,.3535,.6221],[.8437,.3676,.6296],[.8475,.3818,.6371],[.8514,.3959,.6447],[.8552,.4101,.6522],[.8591,.4242,.6597],[.8629,.4384,.6673],[.8667,.4525,.6748],[.8706,.4667,.6824],[.8735,.4764,.6891],[.8764,.486,.6959],[.8794,.4957,.7027],[.8823,.5054,.7094],[.8852,.5151,.7162],[.8881,.5248,.723],[.891,.5345,.7297],[.894,.5442,.7365],[.8969,.5539,.7433],[.8998,.5636,.75],[.9027,.5732,.7568],[.9057,.5829,.7636],[.9086,.5926,.7703],[.9115,.6023,.7771],[.9144,.612,.7839],[.9173,.6217,.7906],[.9203,.6314,.7974],[.9232,.6411,.8042],[.9261,.6507,.8109],[.929,.6604,.8177],[.9319,.6701,.8245],[.9349,.6798,.8312],[.9378,.6895,.838],[.9407,.6992,.8448],[.9436,.7089,.8515],[.946,.717,.8565],[.9479,.7234,.8597],[.9497,.7299,.863],[.9516,.7363,.8662],[.9534,.7428,.8694],[.9552,.7493,.8727],[.9571,.7557,.8759],[.9589,.7622,.8791],[.9608,.7686,.8824],[.9626,.7751,.8856],[.9645,.7815,.8888],[.9663,.788,.892],[.9682,.7945,.8953],[.97,.8009,.8985],[.9719,.8074,.9017],[.9737,.8138,.905],[.9755,.8203,.9082],[.9774,.8268,.9114],[.9792,.8332,.9146],[.9811,.8397,.9179],[.9829,.8461,.9211],[.9848,.8526,.9243],[.9866,.8591,.9276],[.9885,.8655,.9308],[.9903,.872,.934],[.9922,.8784,.9373],[.9912,.882,.9385],[.9903,.8855,.9397],[.9894,.889,.9409],[.9885,.8926,.9422],[.9875,.8961,.9434],[.9866,.8997,.9446],[.9857,.9032,.9459],[.9848,.9067,.9471],[.9839,.9103,.9483],[.9829,.9138,.9496],[.982,.9173,.9508],[.9811,.9209,.952],[.9802,.9244,.9532],[.9792,.928,.9545],[.9783,.9315,.9557],[.9774,.935,.9569],[.9765,.9386,.9582],[.9755,.9421,.9594],[.9746,.9456,.9606],[.9737,.9492,.9619],[.9728,.9527,.9631],[.9719,.9562,.9643],[.9709,.9598,.9656],[.97,.9633,.9668],[.9691,.9669,.968],[.9673,.9685,.9656],[.9647,.9682,.9596],[.9621,.9679,.9536],[.9595,.9676,.9476],[.9569,.9672,.9416],[.9542,.9669,.9356],[.9516,.9666,.9296],[.949,.9663,.9236],[.9464,.966,.9176],[.9438,.9657,.9116],[.9412,.9654,.9057],[.9386,.9651,.8997],[.9359,.9648,.8937],[.9333,.9645,.8877],[.9307,.9642,.8817],[.9281,.9639,.8757],[.9255,.9636,.8697],[.9229,.9632,.8637],[.9203,.9629,.8577],[.9176,.9626,.8517],[.915,.9623,.8457],[.9124,.962,.8397],[.9098,.9617,.8337],[.9072,.9614,.8277],[.9046,.9611,.8217],[.902,.9608,.8157],[.8949,.9577,.8043],[.8878,.9546,.7929],[.8807,.9516,.7815],[.8737,.9485,.7702],[.8666,.9454,.7588],[.8595,.9423,.7474],[.8524,.9393,.736],[.8454,.9362,.7246],[.8383,.9331,.7133],[.8312,.93,.7019],[.8241,.927,.6905],[.8171,.9239,.6791],[.81,.9208,.6677],[.8029,.9177,.6564],[.7958,.9146,.645],[.7888,.9116,.6336],[.7817,.9085,.6222],[.7746,.9054,.6108],[.7676,.9023,.5995],[.7605,.8993,.5881],[.7534,.8962,.5767],[.7463,.8931,.5653],[.7393,.89,.5539],[.7322,.887,.5426],[.7251,.8839,.5312],[.7172,.8795,.5202],[.7084,.8738,.5096],[.6997,.8681,.499],[.6909,.8624,.4884],[.6821,.8567,.4777],[.6734,.8511,.4671],[.6646,.8454,.4565],[.6558,.8397,.4459],[.6471,.834,.4353],[.6383,.8283,.4247],[.6295,.8226,.4141],[.6208,.8169,.4035],[.612,.8112,.3928],[.6032,.8055,.3822],[.5945,.7998,.3716],[.5857,.7942,.361],[.5769,.7885,.3504],[.5682,.7828,.3398],[.5594,.7771,.3292],[.5506,.7714,.3186],[.5419,.7657,.308],[.5331,.76,.2973],[.5243,.7543,.2867],[.5156,.7486,.2761],[.5068,.7429,.2655],[.498,.7373,.2549],[.4903,.7308,.25],[.4827,.7243,.2451],[.475,.7179,.2401],[.4673,.7114,.2352],[.4596,.705,.2303],[.4519,.6985,.2254],[.4442,.692,.2205],[.4365,.6856,.2155],[.4288,.6791,.2106],[.4211,.6727,.2057],[.4135,.6662,.2008],[.4058,.6597,.1958],[.3981,.6533,.1909],[.3904,.6468,.186],[.3827,.6404,.1811],[.375,.6339,.1762],[.3673,.6275,.1712],[.3596,.621,.1663],[.3519,.6145,.1614],[.3443,.6081,.1565],[.3366,.6016,.1516],[.3289,.5952,.1466],[.3212,.5887,.1417],[.3135,.5822,.1368],[.3058,.5758,.1319],[.299,.569,.1288],[.2932,.5619,.1276],[.2874,.5549,.1263],[.2815,.5478,.1251],[.2757,.5407,.1239],[.2698,.5336,.1226],[.264,.5266,.1214],[.2581,.5195,.1202],[.2523,.5124,.119],[.2464,.5053,.1177],[.2406,.4983,.1165],[.2348,.4912,.1153],[.2289,.4841,.114],[.2231,.477,.1128],[.2172,.47,.1116],[.2114,.4629,.1103],[.2055,.4558,.1091],[.1997,.4488,.1079],[.1938,.4417,.1067],[.188,.4346,.1054],[.1822,.4275,.1042],[.1763,.4205,.103],[.1705,.4134,.1017],[.1646,.4063,.1005],[.1588,.3992,.0993],[.1529,.3922,.098]]},PuBu:{interpolate:!0,colors:[[1,.9686,.9843],[.9977,.9667,.9832],[.9953,.9647,.9821],[.993,.9627,.981],[.9906,.9608,.9799],[.9883,.9588,.9788],[.986,.9568,.9777],[.9836,.9548,.9766],[.9813,.9529,.9755],[.979,.9509,.9743],[.9766,.9489,.9732],[.9743,.947,.9721],[.9719,.945,.971],[.9696,.943,.9699],[.9673,.9411,.9688],[.9649,.9391,.9677],[.9626,.9371,.9666],[.9603,.9352,.9655],[.9579,.9332,.9644],[.9556,.9312,.9633],[.9532,.9293,.9622],[.9509,.9273,.9611],[.9486,.9253,.96],[.9462,.9234,.9588],[.9439,.9214,.9577],[.9416,.9194,.9566],[.9392,.9174,.9555],[.9369,.9155,.9544],[.9345,.9135,.9533],[.9322,.9115,.9522],[.9299,.9096,.9511],[.9275,.9076,.95],[.9251,.9055,.9488],[.9216,.9028,.9474],[.9182,.9001,.9459],[.9147,.8974,.9444],[.9113,.8947,.9429],[.9078,.892,.9415],[.9044,.8893,.94],[.9009,.8866,.9385],[.8975,.8839,.937],[.8941,.8812,.9355],[.8906,.8785,.9341],[.8872,.8758,.9326],[.8837,.8731,.9311],[.8803,.8704,.9296],[.8768,.8677,.9282],[.8734,.8649,.9267],[.8699,.8622,.9252],[.8665,.8595,.9237],[.8631,.8568,.9223],[.8596,.8541,.9208],[.8562,.8514,.9193],[.8527,.8487,.9178],[.8493,.846,.9164],[.8458,.8433,.9149],[.8424,.8406,.9134],[.8389,.8379,.9119],[.8355,.8352,.9104],[.832,.8325,.909],[.8286,.8298,.9075],[.8252,.8271,.906],[.8217,.8243,.9045],[.8183,.8216,.9031],[.8144,.819,.9016],[.8092,.8165,.9003],[.8041,.8141,.8989],[.7989,.8116,.8976],[.7937,.8092,.8962],[.7886,.8067,.8949],[.7834,.8042,.8935],[.7782,.8018,.8921],[.7731,.7993,.8908],[.7679,.7968,.8894],[.7627,.7944,.8881],[.7576,.7919,.8867],[.7524,.7895,.8854],[.7472,.787,.884],[.7421,.7845,.8827],[.7369,.7821,.8813],[.7317,.7796,.88],[.7266,.7772,.8786],[.7214,.7747,.8773],[.7162,.7722,.8759],[.711,.7698,.8746],[.7059,.7673,.8732],[.7007,.7649,.8718],[.6955,.7624,.8705],[.6904,.7599,.8691],[.6852,.7575,.8678],[.68,.755,.8664],[.6749,.7526,.8651],[.6697,.7501,.8637],[.6645,.7476,.8624],[.6594,.7452,.861],[.6542,.7427,.8597],[.6487,.7403,.8583],[.6425,.7378,.8568],[.6364,.7353,.8553],[.6302,.7329,.8538],[.6241,.7304,.8524],[.6179,.728,.8509],[.6118,.7255,.8494],[.6056,.723,.8479],[.5995,.7206,.8465],[.5933,.7181,.845],[.5872,.7156,.8435],[.581,.7132,.842],[.5749,.7107,.8406],[.5687,.7083,.8391],[.5626,.7058,.8376],[.5564,.7033,.8361],[.5502,.7009,.8346],[.5441,.6984,.8332],[.5379,.696,.8317],[.5318,.6935,.8302],[.5256,.691,.8287],[.5195,.6886,.8273],[.5133,.6861,.8258],[.5072,.6837,.8243],[.501,.6812,.8228],[.4949,.6787,.8214],[.4887,.6763,.8199],[.4826,.6738,.8184],[.4764,.6714,.8169],[.4703,.6689,.8155],[.4641,.6664,.814],[.458,.664,.8125],[.4511,.6612,.8108],[.4435,.6581,.809],[.4358,.6551,.8072],[.4282,.652,.8053],[.4206,.6489,.8035],[.4129,.6458,.8016],[.4053,.6428,.7998],[.3977,.6397,.7979],[.3901,.6366,.7961],[.3824,.6335,.7942],[.3748,.6304,.7924],[.3672,.6274,.7905],[.3596,.6243,.7887],[.3519,.6212,.7869],[.3443,.6181,.785],[.3367,.6151,.7832],[.329,.612,.7813],[.3214,.6089,.7795],[.3138,.6058,.7776],[.3062,.6028,.7758],[.2985,.5997,.7739],[.2909,.5966,.7721],[.2833,.5935,.7702],[.2756,.5905,.7684],[.268,.5874,.7666],[.2604,.5843,.7647],[.2528,.5812,.7629],[.2451,.5782,.761],[.2375,.5751,.7592],[.2299,.572,.7573],[.2223,.5689,.7555],[.2146,.5659,.7536],[.208,.5622,.7517],[.202,.5583,.7497],[.1959,.5544,.7478],[.1899,.5504,.7458],[.1839,.5465,.7438],[.1779,.5426,.7419],[.1718,.5386,.7399],[.1658,.5347,.7379],[.1598,.5307,.736],[.1537,.5268,.734],[.1477,.5229,.732],[.1417,.5189,.7301],[.1357,.515,.7281],[.1296,.5111,.7261],[.1236,.5071,.7242],[.1176,.5032,.7222],[.1115,.4993,.7202],[.1055,.4953,.7182],[.0995,.4914,.7163],[.0935,.4874,.7143],[.0874,.4835,.7123],[.0814,.4796,.7104],[.0754,.4756,.7084],[.0693,.4717,.7064],[.0633,.4678,.7045],[.0573,.4638,.7025],[.0513,.4599,.7005],[.0452,.4559,.6986],[.0392,.452,.6966],[.0332,.4481,.6946],[.0271,.4441,.6927],[.0211,.4402,.6907],[.0195,.4372,.687],[.0194,.4345,.6827],[.0193,.4318,.6784],[.0191,.4291,.674],[.019,.4264,.6697],[.0189,.4237,.6654],[.0188,.4209,.6611],[.0187,.4182,.6568],[.0185,.4155,.6525],[.0184,.4128,.6482],[.0183,.4101,.6439],[.0182,.4074,.6396],[.018,.4047,.6353],[.0179,.402,.631],[.0178,.3993,.6267],[.0177,.3966,.6224],[.0175,.3939,.6181],[.0174,.3912,.6138],[.0173,.3885,.6095],[.0172,.3858,.6052],[.0171,.3831,.6008],[.0169,.3803,.5965],[.0168,.3776,.5922],[.0167,.3749,.5879],[.0166,.3722,.5836],[.0164,.3695,.5793],[.0163,.3668,.575],[.0162,.3641,.5707],[.0161,.3614,.5664],[.0159,.3587,.5621],[.0158,.356,.5578],[.0157,.3533,.5535],[.0155,.3493,.5472],[.0152,.3451,.5407],[.015,.3409,.5342],[.0147,.3367,.5277],[.0145,.3325,.5212],[.0142,.3284,.5146],[.014,.3242,.5081],[.0137,.32,.5016],[.0135,.3158,.4951],[.0133,.3116,.4886],[.013,.3075,.482],[.0128,.3033,.4755],[.0125,.2991,.469],[.0123,.2949,.4625],[.012,.2907,.4559],[.0118,.2865,.4494],[.0115,.2824,.4429],[.0113,.2782,.4364],[.011,.274,.4299],[.0108,.2698,.4233],[.0105,.2656,.4168],[.0103,.2614,.4103],[.0101,.2573,.4038],[.0098,.2531,.3973],[.0096,.2489,.3907],[.0093,.2447,.3842],[.0091,.2405,.3777],[.0088,.2363,.3712],[.0086,.2322,.3647],[.0083,.228,.3581],[.0081,.2238,.3516],[.0078,.2196,.3451]]},PuBuGn:{interpolate:!0,colors:[[1,.9686,.9843],[.9977,.966,.983],[.9953,.9635,.9816],[.993,.9609,.9803],[.9906,.9583,.9789],[.9883,.9557,.9775],[.986,.9531,.9762],[.9836,.9505,.9748],[.9813,.948,.9735],[.979,.9454,.9721],[.9766,.9428,.9708],[.9743,.9402,.9694],[.9719,.9376,.9681],[.9696,.935,.9667],[.9673,.9325,.9654],[.9649,.9299,.964],[.9626,.9273,.9627],[.9603,.9247,.9613],[.9579,.9221,.96],[.9556,.9195,.9586],[.9532,.917,.9572],[.9509,.9144,.9559],[.9486,.9118,.9545],[.9462,.9092,.9532],[.9439,.9066,.9518],[.9416,.904,.9505],[.9392,.9015,.9491],[.9369,.8989,.9478],[.9345,.8963,.9464],[.9322,.8937,.9451],[.9299,.8911,.9437],[.9275,.8885,.9424],[.9251,.886,.941],[.9216,.8839,.9398],[.9182,.8818,.9386],[.9147,.8797,.9373],[.9113,.8776,.9361],[.9078,.8756,.9349],[.9044,.8735,.9336],[.9009,.8714,.9324],[.8975,.8693,.9312],[.8941,.8672,.93],[.8906,.8651,.9287],[.8872,.863,.9275],[.8837,.8609,.9263],[.8803,.8588,.925],[.8768,.8567,.9238],[.8734,.8546,.9226],[.8699,.8525,.9213],[.8665,.8505,.9201],[.8631,.8484,.9189],[.8596,.8463,.9176],[.8562,.8442,.9164],[.8527,.8421,.9152],[.8493,.84,.914],[.8458,.8379,.9127],[.8424,.8358,.9115],[.8389,.8337,.9103],[.8355,.8316,.909],[.832,.8295,.9078],[.8286,.8275,.9066],[.8252,.8254,.9053],[.8217,.8233,.9041],[.8183,.8212,.9029],[.8144,.819,.9016],[.8092,.8165,.9003],[.8041,.8141,.8989],[.7989,.8116,.8976],[.7937,.8092,.8962],[.7886,.8067,.8949],[.7834,.8042,.8935],[.7782,.8018,.8921],[.7731,.7993,.8908],[.7679,.7968,.8894],[.7627,.7944,.8881],[.7576,.7919,.8867],[.7524,.7895,.8854],[.7472,.787,.884],[.7421,.7845,.8827],[.7369,.7821,.8813],[.7317,.7796,.88],[.7266,.7772,.8786],[.7214,.7747,.8773],[.7162,.7722,.8759],[.711,.7698,.8746],[.7059,.7673,.8732],[.7007,.7649,.8718],[.6955,.7624,.8705],[.6904,.7599,.8691],[.6852,.7575,.8678],[.68,.755,.8664],[.6749,.7526,.8651],[.6697,.7501,.8637],[.6645,.7476,.8624],[.6594,.7452,.861],[.6542,.7427,.8597],[.6481,.7403,.8583],[.6403,.7378,.8568],[.6326,.7353,.8553],[.6248,.7329,.8538],[.6171,.7304,.8524],[.6093,.728,.8509],[.6016,.7255,.8494],[.5938,.723,.8479],[.5861,.7206,.8465],[.5783,.7181,.845],[.5706,.7156,.8435],[.5628,.7132,.842],[.5551,.7107,.8406],[.5473,.7083,.8391],[.5396,.7058,.8376],[.5318,.7033,.8361],[.5241,.7009,.8346],[.5163,.6984,.8332],[.5086,.696,.8317],[.5008,.6935,.8302],[.4931,.691,.8287],[.4853,.6886,.8273],[.4776,.6861,.8258],[.4698,.6837,.8243],[.4621,.6812,.8228],[.4543,.6787,.8214],[.4466,.6763,.8199],[.4388,.6738,.8184],[.431,.6714,.8169],[.4233,.6689,.8155],[.4155,.6664,.814],[.4078,.664,.8125],[.4009,.6612,.8108],[.3949,.6581,.809],[.3889,.6551,.8072],[.3828,.652,.8053],[.3768,.6489,.8035],[.3708,.6458,.8016],[.3647,.6428,.7998],[.3587,.6397,.7979],[.3527,.6366,.7961],[.3467,.6335,.7942],[.3406,.6304,.7924],[.3346,.6274,.7905],[.3286,.6243,.7887],[.3225,.6212,.7869],[.3165,.6181,.785],[.3105,.6151,.7832],[.3045,.612,.7813],[.2984,.6089,.7795],[.2924,.6058,.7776],[.2864,.6028,.7758],[.2803,.5997,.7739],[.2743,.5966,.7721],[.2683,.5935,.7702],[.2623,.5905,.7684],[.2562,.5874,.7666],[.2502,.5843,.7647],[.2442,.5812,.7629],[.2381,.5782,.761],[.2321,.5751,.7592],[.2261,.572,.7573],[.2201,.5689,.7555],[.214,.5659,.7536],[.2078,.5636,.7488],[.2014,.5617,.7421],[.195,.5599,.7355],[.1886,.558,.7289],[.1822,.5562,.7222],[.1758,.5543,.7156],[.1694,.5525,.7089],[.163,.5506,.7023],[.1566,.5488,.6956],[.1502,.5469,.689],[.1438,.5451,.6824],[.1374,.5433,.6757],[.131,.5414,.6691],[.1246,.5396,.6624],[.1182,.5377,.6558],[.1118,.5359,.6491],[.1054,.534,.6425],[.099,.5322,.6358],[.0926,.5303,.6292],[.0862,.5285,.6226],[.0798,.5266,.6159],[.0734,.5248,.6093],[.067,.523,.6026],[.0606,.5211,.596],[.0542,.5193,.5893],[.0478,.5174,.5827],[.0414,.5156,.5761],[.035,.5137,.5694],[.0286,.5119,.5628],[.0222,.51,.5561],[.0158,.5082,.5495],[.0094,.5063,.5428],[.0078,.5039,.5367],[.0076,.5014,.5306],[.0075,.4988,.5246],[.0074,.4962,.5186],[.0073,.4936,.5125],[.0071,.491,.5065],[.007,.4884,.5005],[.0069,.4859,.4945],[.0068,.4833,.4884],[.0066,.4807,.4824],[.0065,.4781,.4764],[.0064,.4755,.4703],[.0063,.4729,.4643],[.0062,.4704,.4583],[.006,.4678,.4523],[.0059,.4652,.4462],[.0058,.4626,.4402],[.0057,.46,.4342],[.0055,.4574,.4281],[.0054,.4549,.4221],[.0053,.4523,.4161],[.0052,.4497,.4101],[.005,.4471,.404],[.0049,.4445,.398],[.0048,.4419,.392],[.0047,.4394,.3859],[.0046,.4368,.3799],[.0044,.4342,.3739],[.0043,.4316,.3679],[.0042,.429,.3618],[.0041,.4264,.3558],[.0039,.4239,.3498],[.0039,.4194,.3453],[.0039,.4148,.3409],[.0039,.4101,.3366],[.0039,.4054,.3323],[.0039,.4007,.328],[.0039,.3961,.3237],[.0039,.3914,.3194],[.0039,.3867,.3151],[.0039,.382,.3108],[.0039,.3774,.3065],[.0039,.3727,.3022],[.0039,.368,.2979],[.0039,.3633,.2936],[.0039,.3587,.2893],[.0039,.354,.285],[.0039,.3493,.2807],[.0039,.3446,.2764],[.0039,.34,.272],[.0039,.3353,.2677],[.0039,.3306,.2634],[.0039,.3259,.2591],[.0039,.3213,.2548],[.0039,.3166,.2505],[.0039,.3119,.2462],[.0039,.3072,.2419],[.0039,.3026,.2376],[.0039,.2979,.2333],[.0039,.2932,.229],[.0039,.2885,.2247],[.0039,.2839,.2204],[.0039,.2792,.2161],[.0039,.2745,.2118]]},PuOr:{interpolate:!0,colors:[[.498,.2314,.0314],[.506,.2358,.0311],[.514,.2403,.0308],[.522,.2448,.0304],[.53,.2492,.0301],[.538,.2537,.0298],[.546,.2581,.0295],[.554,.2626,.0292],[.562,.2671,.0289],[.57,.2715,.0286],[.578,.276,.0283],[.586,.2804,.028],[.594,.2849,.0277],[.602,.2894,.0274],[.61,.2938,.0271],[.618,.2983,.0268],[.626,.3027,.0265],[.634,.3072,.0261],[.642,.3116,.0258],[.65,.3161,.0255],[.658,.3206,.0252],[.666,.325,.0249],[.674,.3295,.0246],[.682,.3339,.0243],[.69,.3384,.024],[.698,.3429,.0237],[.7054,.3483,.0246],[.7123,.3548,.0268],[.7193,.3612,.0289],[.7262,.3677,.0311],[.7331,.3742,.0332],[.74,.3806,.0354],[.7469,.3871,.0375],[.7539,.3935,.0397],[.7608,.4,.0418],[.7677,.4065,.044],[.7746,.4129,.0461],[.7815,.4194,.0483],[.7885,.4258,.0504],[.7954,.4323,.0526],[.8023,.4388,.0547],[.8092,.4452,.0569],[.8161,.4517,.0591],[.8231,.4581,.0612],[.83,.4646,.0634],[.8369,.471,.0655],[.8438,.4775,.0677],[.8507,.484,.0698],[.8577,.4904,.072],[.8646,.4969,.0741],[.8715,.5033,.0763],[.8784,.5098,.0784],[.8829,.5181,.0906],[.8874,.5264,.1027],[.8918,.5347,.1149],[.8963,.543,.127],[.9007,.5513,.1392],[.9052,.5596,.1513],[.9097,.5679,.1635],[.9141,.5762,.1756],[.9186,.5845,.1878],[.923,.5928,.1999],[.9275,.6012,.2121],[.9319,.6095,.2242],[.9364,.6178,.2364],[.9409,.6261,.2485],[.9453,.6344,.2607],[.9498,.6427,.2728],[.9542,.651,.285],[.9587,.6593,.2971],[.9632,.6676,.3093],[.9676,.6759,.3214],[.9721,.6842,.3336],[.9765,.6925,.3457],[.981,.7008,.3579],[.9855,.7091,.37],[.9899,.7174,.3822],[.9922,.7246,.3946],[.9924,.7308,.4074],[.9925,.7369,.4201],[.9927,.7431,.4329],[.9928,.7493,.4457],[.993,.7554,.4584],[.9932,.7616,.4712],[.9933,.7677,.484],[.9935,.7739,.4967],[.9936,.78,.5095],[.9938,.7862,.5223],[.9939,.7923,.535],[.9941,.7985,.5478],[.9942,.8046,.5606],[.9944,.8108,.5733],[.9945,.8169,.5861],[.9947,.8231,.5988],[.9948,.8292,.6116],[.995,.8354,.6244],[.9952,.8415,.6371],[.9953,.8477,.6499],[.9955,.8538,.6627],[.9956,.86,.6754],[.9958,.8661,.6882],[.9959,.8723,.701],[.9961,.8784,.7137],[.995,.882,.7237],[.9939,.8855,.7337],[.9928,.889,.7437],[.9918,.8926,.7537],[.9907,.8961,.7637],[.9896,.8997,.7737],[.9885,.9032,.7837],[.9875,.9067,.7937],[.9864,.9103,.8037],[.9853,.9138,.8137],[.9842,.9173,.8237],[.9832,.9209,.8337],[.9821,.9244,.8437],[.981,.928,.8537],[.9799,.9315,.8637],[.9789,.935,.8737],[.9778,.9386,.8837],[.9767,.9421,.8937],[.9756,.9456,.9037],[.9745,.9492,.9136],[.9735,.9527,.9236],[.9724,.9562,.9336],[.9713,.9598,.9436],[.9702,.9633,.9536],[.9692,.9669,.9636],[.9662,.9664,.9677],[.9615,.9619,.9659],[.9567,.9575,.964],[.9519,.953,.9622],[.9472,.9486,.9603],[.9424,.9441,.9585],[.9376,.9396,.9566],[.9329,.9352,.9548],[.9281,.9307,.9529],[.9233,.9263,.9511],[.9186,.9218,.9493],[.9138,.9173,.9474],[.909,.9129,.9456],[.9043,.9084,.9437],[.8995,.904,.9419],[.8947,.8995,.94],[.89,.895,.9382],[.8852,.8906,.9363],[.8804,.8861,.9345],[.8757,.8817,.9326],[.8709,.8772,.9308],[.8661,.8727,.929],[.8614,.8683,.9271],[.8566,.8638,.9253],[.8518,.8594,.9234],[.8471,.8549,.9216],[.8412,.8477,.9177],[.8354,.8404,.9139],[.8295,.8332,.91],[.8237,.826,.9062],[.8178,.8188,.9023],[.812,.8115,.8985],[.8062,.8043,.8947],[.8003,.7971,.8908],[.7945,.7899,.887],[.7886,.7826,.8831],[.7828,.7754,.8793],[.7769,.7682,.8754],[.7711,.7609,.8716],[.7652,.7537,.8677],[.7594,.7465,.8639],[.7536,.7393,.8601],[.7477,.732,.8562],[.7419,.7248,.8524],[.736,.7176,.8485],[.7302,.7103,.8447],[.7243,.7031,.8408],[.7185,.6959,.837],[.7126,.6887,.8331],[.7068,.6814,.8293],[.701,.6742,.8255],[.6942,.6663,.8206],[.6865,.6577,.8148],[.6788,.6491,.8089],[.6711,.6404,.8031],[.6634,.6318,.7972],[.6557,.6232,.7914],[.6481,.6146,.7855],[.6404,.606,.7797],[.6327,.5974,.7739],[.625,.5888,.768],[.6173,.5802,.7622],[.6096,.5715,.7563],[.6019,.5629,.7505],[.5942,.5543,.7446],[.5865,.5457,.7388],[.5789,.5371,.7329],[.5712,.5285,.7271],[.5635,.5199,.7213],[.5558,.5113,.7154],[.5481,.5027,.7096],[.5404,.494,.7037],[.5327,.4854,.6979],[.525,.4768,.692],[.5173,.4682,.6862],[.5097,.4596,.6804],[.502,.451,.6745],[.4952,.4393,.669],[.4884,.4276,.6634],[.4817,.4159,.6579],[.4749,.4042,.6524],[.4681,.3925,.6468],[.4614,.3809,.6413],[.4546,.3692,.6358],[.4478,.3575,.6302],[.4411,.3458,.6247],[.4343,.3341,.6191],[.4275,.3224,.6136],[.4208,.3107,.6081],[.414,.299,.6025],[.4072,.2874,.597],[.4005,.2757,.5915],[.3937,.264,.5859],[.3869,.2523,.5804],[.3802,.2406,.5749],[.3734,.2289,.5693],[.3666,.2172,.5638],[.3599,.2055,.5582],[.3531,.1938,.5527],[.3463,.1822,.5472],[.3396,.1705,.5416],[.3328,.1588,.5361],[.3264,.1499,.5286],[.3204,.1439,.5193],[.3144,.1379,.5099],[.3084,.1319,.5005],[.3024,.126,.4911],[.2964,.12,.4817],[.2904,.114,.4724],[.2844,.108,.463],[.2784,.102,.4536],[.2724,.096,.4442],[.2664,.09,.4348],[.2604,.084,.4255],[.2544,.078,.4161],[.2484,.072,.4067],[.2424,.066,.3973],[.2364,.06,.3879],[.2304,.054,.3785],[.2245,.048,.3692],[.2185,.042,.3598],[.2125,.036,.3504],[.2065,.03,.341],[.2005,.024,.3316],[.1945,.018,.3223],[.1885,.012,.3129],[.1825,.006,.3035],[.1765,0,.2941]]},PuRd:{interpolate:!0,colors:[[.9686,.9569,.9765],[.9667,.9545,.9752],[.9647,.9522,.974],[.9627,.9499,.9728],[.9608,.9475,.9715],[.9588,.9452,.9703],[.9568,.9428,.9691],[.9548,.9405,.9679],[.9529,.9382,.9666],[.9509,.9358,.9654],[.9489,.9335,.9642],[.947,.9311,.9629],[.945,.9288,.9617],[.943,.9265,.9605],[.9411,.9241,.9592],[.9391,.9218,.958],[.9371,.9195,.9568],[.9352,.9171,.9556],[.9332,.9148,.9543],[.9312,.9124,.9531],[.9293,.9101,.9519],[.9273,.9078,.9506],[.9253,.9054,.9494],[.9234,.9031,.9482],[.9214,.9008,.9469],[.9194,.8984,.9457],[.9174,.8961,.9445],[.9155,.8937,.9433],[.9135,.8914,.942],[.9115,.8891,.9408],[.9096,.8867,.9396],[.9076,.8844,.9383],[.9056,.8817,.9369],[.9033,.8768,.9343],[.9009,.8719,.9318],[.8986,.867,.9292],[.8962,.8621,.9266],[.8939,.8571,.924],[.8916,.8522,.9214],[.8892,.8473,.9188],[.8869,.8424,.9163],[.8846,.8374,.9137],[.8822,.8325,.9111],[.8799,.8276,.9085],[.8775,.8227,.9059],[.8752,.8178,.9033],[.8729,.8128,.9008],[.8705,.8079,.8982],[.8682,.803,.8956],[.8659,.7981,.893],[.8635,.7932,.8904],[.8612,.7882,.8878],[.8588,.7833,.8853],[.8565,.7784,.8827],[.8542,.7735,.8801],[.8518,.7686,.8775],[.8495,.7636,.8749],[.8472,.7587,.8723],[.8448,.7538,.8698],[.8425,.7489,.8672],[.8401,.7439,.8646],[.8378,.739,.862],[.8355,.7341,.8594],[.8331,.7292,.8568],[.831,.7244,.8543],[.8297,.7198,.852],[.8283,.7152,.8496],[.827,.7107,.8473],[.8256,.7061,.845],[.8243,.7016,.8426],[.8229,.697,.8403],[.8216,.6925,.838],[.8202,.6879,.8356],[.8189,.6834,.8333],[.8175,.6788,.8309],[.8161,.6743,.8286],[.8148,.6697,.8263],[.8134,.6652,.8239],[.8121,.6606,.8216],[.8107,.6561,.8193],[.8094,.6515,.8169],[.808,.647,.8146],[.8067,.6424,.8122],[.8053,.6379,.8099],[.804,.6333,.8076],[.8026,.6288,.8052],[.8013,.6242,.8029],[.7999,.6197,.8006],[.7986,.6151,.7982],[.7972,.6105,.7959],[.7958,.606,.7935],[.7945,.6014,.7912],[.7931,.5969,.7889],[.7918,.5923,.7865],[.7904,.5878,.7842],[.7891,.5832,.7819],[.7893,.5782,.7793],[.792,.5724,.7765],[.7947,.5667,.7737],[.7974,.5609,.7708],[.8001,.5551,.768],[.8028,.5493,.7652],[.8055,.5435,.7624],[.8082,.5377,.7595],[.8109,.532,.7567],[.8136,.5262,.7539],[.8163,.5204,.751],[.819,.5146,.7482],[.8217,.5088,.7454],[.8244,.5031,.7425],[.8271,.4973,.7397],[.8299,.4915,.7369],[.8326,.4857,.7341],[.8353,.4799,.7312],[.838,.4741,.7284],[.8407,.4684,.7256],[.8434,.4626,.7227],[.8461,.4568,.7199],[.8488,.451,.7171],[.8515,.4452,.7142],[.8542,.4394,.7114],[.8569,.4337,.7086],[.8596,.4279,.7058],[.8623,.4221,.7029],[.865,.4163,.7001],[.8677,.4105,.6973],[.8704,.4048,.6944],[.8732,.399,.6916],[.875,.3924,.6879],[.876,.385,.6832],[.877,.3776,.6785],[.878,.3702,.6738],[.8789,.3629,.6692],[.8799,.3555,.6645],[.8809,.3481,.6598],[.8819,.3407,.6551],[.8829,.3333,.6505],[.8839,.326,.6458],[.8848,.3186,.6411],[.8858,.3112,.6364],[.8868,.3038,.6318],[.8878,.2964,.6271],[.8888,.289,.6224],[.8898,.2817,.6177],[.8907,.2743,.6131],[.8917,.2669,.6084],[.8927,.2595,.6037],[.8937,.2521,.599],[.8947,.2448,.5944],[.8957,.2374,.5897],[.8967,.23,.585],[.8976,.2226,.5803],[.8986,.2152,.5757],[.8996,.2078,.571],[.9006,.2005,.5663],[.9016,.1931,.5616],[.9026,.1857,.557],[.9035,.1783,.5523],[.9045,.1709,.5476],[.9055,.1636,.5429],[.904,.159,.5372],[.9009,.1562,.5308],[.8978,.1534,.5244],[.8947,.1505,.518],[.8917,.1477,.5116],[.8886,.1449,.5052],[.8855,.142,.4988],[.8824,.1392,.4924],[.8794,.1364,.486],[.8763,.1335,.4796],[.8732,.1307,.4732],[.8701,.1279,.4668],[.8671,.1251,.4604],[.864,.1222,.454],[.8609,.1194,.4476],[.8578,.1166,.4412],[.8547,.1137,.4348],[.8517,.1109,.4284],[.8486,.1081,.422],[.8455,.1053,.4156],[.8424,.1024,.4092],[.8394,.0996,.4028],[.8363,.0968,.3964],[.8332,.0939,.39],[.8301,.0911,.3836],[.8271,.0883,.3772],[.824,.0854,.3708],[.8209,.0826,.3644],[.8178,.0798,.358],[.8148,.077,.3516],[.8117,.0741,.3453],[.8086,.0713,.3389],[.8029,.0689,.3355],[.7962,.0667,.3332],[.7896,.0645,.3308],[.7829,.0623,.3285],[.7763,.0601,.3262],[.7696,.0579,.3238],[.763,.0556,.3215],[.7564,.0534,.3191],[.7497,.0512,.3168],[.7431,.049,.3145],[.7364,.0468,.3121],[.7298,.0446,.3098],[.7231,.0424,.3075],[.7165,.0401,.3051],[.7099,.0379,.3028],[.7032,.0357,.3004],[.6966,.0335,.2981],[.6899,.0313,.2958],[.6833,.0291,.2934],[.6766,.0269,.2911],[.67,.0246,.2888],[.6633,.0224,.2864],[.6567,.0202,.2841],[.6501,.018,.2817],[.6434,.0158,.2794],[.6368,.0136,.2771],[.6301,.0113,.2747],[.6235,.0091,.2724],[.6168,.0069,.27],[.6102,.0047,.2677],[.6036,.0025,.2654],[.5969,3e-4,.263],[.5908,0,.2589],[.5848,0,.2544],[.5787,0,.25],[.5727,0,.2456],[.5667,0,.2412],[.5607,0,.2367],[.5546,0,.2323],[.5486,0,.2279],[.5426,0,.2234],[.5365,0,.219],[.5305,0,.2146],[.5245,0,.2101],[.5185,0,.2057],[.5124,0,.2013],[.5064,0,.1969],[.5004,0,.1924],[.4943,0,.188],[.4883,0,.1836],[.4823,0,.1791],[.4763,0,.1747],[.4702,0,.1703],[.4642,0,.1659],[.4582,0,.1614],[.4521,0,.157],[.4461,0,.1526],[.4401,0,.1481],[.4341,0,.1437],[.428,0,.1393],[.422,0,.1349],[.416,0,.1304],[.41,0,.126],[.4039,0,.1216]]},Purples:{interpolate:!0,colors:[[.9882,.9843,.9922],[.9866,.9826,.9912],[.985,.9809,.9902],[.9834,.9791,.9892],[.9818,.9774,.9882],[.9802,.9757,.9872],[.9786,.974,.9863],[.977,.9723,.9853],[.9754,.9705,.9843],[.9738,.9688,.9833],[.9722,.9671,.9823],[.9706,.9654,.9813],[.969,.9636,.9803],[.9674,.9619,.9794],[.9658,.9602,.9784],[.9642,.9585,.9774],[.9626,.9568,.9764],[.961,.955,.9754],[.9594,.9533,.9744],[.9578,.9516,.9735],[.9562,.9499,.9725],[.9546,.9481,.9715],[.953,.9464,.9705],[.9514,.9447,.9695],[.9499,.943,.9685],[.9483,.9413,.9676],[.9467,.9395,.9666],[.9451,.9378,.9656],[.9435,.9361,.9646],[.9419,.9344,.9636],[.9403,.9326,.9626],[.9387,.9309,.9616],[.9369,.9291,.9606],[.9343,.9268,.9594],[.9318,.9244,.9582],[.9292,.9221,.9569],[.9266,.9198,.9557],[.924,.9174,.9545],[.9214,.9151,.9532],[.9188,.9128,.952],[.9163,.9104,.9508],[.9137,.9081,.9496],[.9111,.9057,.9483],[.9085,.9034,.9471],[.9059,.9011,.9459],[.9033,.8987,.9446],[.9008,.8964,.9434],[.8982,.8941,.9422],[.8956,.8917,.9409],[.893,.8894,.9397],[.8904,.887,.9385],[.8878,.8847,.9373],[.8853,.8824,.936],[.8827,.88,.9348],[.8801,.8777,.9336],[.8775,.8754,.9323],[.8749,.873,.9311],[.8723,.8707,.9299],[.8698,.8683,.9286],[.8672,.866,.9274],[.8646,.8637,.9262],[.862,.8613,.925],[.8594,.859,.9237],[.8568,.8567,.9225],[.854,.854,.9211],[.8503,.8504,.9193],[.8466,.8469,.9174],[.8429,.8433,.9156],[.8392,.8397,.9137],[.8355,.8362,.9119],[.8318,.8326,.91],[.8281,.829,.9082],[.8245,.8255,.9063],[.8208,.8219,.9045],[.8171,.8183,.9027],[.8134,.8148,.9008],[.8097,.8112,.899],[.806,.8076,.8971],[.8023,.8041,.8953],[.7986,.8005,.8934],[.7949,.7969,.8916],[.7912,.7934,.8897],[.7875,.7898,.8879],[.7839,.7862,.886],[.7802,.7827,.8842],[.7765,.7791,.8824],[.7728,.7755,.8805],[.7691,.7719,.8787],[.7654,.7684,.8768],[.7617,.7648,.875],[.758,.7612,.8731],[.7543,.7577,.8713],[.7506,.7541,.8694],[.7469,.7505,.8676],[.7433,.747,.8657],[.7396,.7434,.8639],[.7359,.7396,.8618],[.7322,.7353,.8594],[.7285,.7309,.8569],[.7248,.7266,.8544],[.7211,.7223,.852],[.7174,.718,.8495],[.7137,.7137,.8471],[.71,.7094,.8446],[.7063,.7051,.8421],[.7027,.7008,.8397],[.699,.6965,.8372],[.6953,.6922,.8348],[.6916,.6879,.8323],[.6879,.6836,.8298],[.6842,.6793,.8274],[.6805,.675,.8249],[.6768,.6707,.8225],[.6731,.6664,.82],[.6694,.6621,.8175],[.6657,.6577,.8151],[.6621,.6534,.8126],[.6584,.6491,.8101],[.6547,.6448,.8077],[.651,.6405,.8052],[.6473,.6362,.8028],[.6436,.6319,.8003],[.6399,.6276,.7978],[.6362,.6233,.7954],[.6325,.619,.7929],[.6288,.6147,.7905],[.6251,.6104,.788],[.6215,.6061,.7855],[.6178,.6021,.7835],[.6141,.5986,.7817],[.6104,.595,.78],[.6067,.5914,.7783],[.603,.5879,.7766],[.5993,.5843,.7748],[.5956,.5807,.7731],[.5919,.5772,.7714],[.5882,.5736,.7697],[.5845,.57,.768],[.5809,.5665,.7662],[.5772,.5629,.7645],[.5735,.5593,.7628],[.5698,.5558,.7611],[.5661,.5522,.7593],[.5624,.5486,.7576],[.5587,.5451,.7559],[.555,.5415,.7542],[.5513,.5379,.7524],[.5476,.5343,.7507],[.5439,.5308,.749],[.5403,.5272,.7473],[.5366,.5236,.7456],[.5329,.5201,.7438],[.5292,.5165,.7421],[.5255,.5129,.7404],[.5218,.5094,.7387],[.5181,.5058,.7369],[.5144,.5022,.7352],[.5107,.4987,.7335],[.507,.4951,.7318],[.5033,.4915,.7301],[.5003,.4868,.7276],[.4976,.4814,.7248],[.4949,.476,.722],[.4921,.4706,.7192],[.4894,.4652,.7163],[.4867,.4597,.7135],[.484,.4543,.7107],[.4813,.4489,.7078],[.4786,.4435,.705],[.4759,.4381,.7022],[.4732,.4327,.6993],[.4705,.4273,.6965],[.4678,.4219,.6937],[.4651,.4164,.6909],[.4624,.411,.688],[.4597,.4056,.6852],[.457,.4002,.6824],[.4543,.3948,.6795],[.4515,.3894,.6767],[.4488,.384,.6739],[.4461,.3785,.671],[.4434,.3731,.6682],[.4407,.3677,.6654],[.438,.3623,.6626],[.4353,.3569,.6597],[.4326,.3515,.6569],[.4299,.3461,.6541],[.4272,.3407,.6512],[.4245,.3352,.6484],[.4218,.3298,.6456],[.4191,.3244,.6428],[.4164,.319,.6399],[.4137,.3138,.6374],[.4109,.3086,.6349],[.4082,.3034,.6324],[.4055,.2983,.63],[.4028,.2931,.6275],[.4001,.2879,.6251],[.3974,.2828,.6226],[.3947,.2776,.6201],[.392,.2724,.6177],[.3893,.2673,.6152],[.3866,.2621,.6128],[.3839,.2569,.6103],[.3812,.2518,.6078],[.3785,.2466,.6054],[.3758,.2414,.6029],[.3731,.2363,.6005],[.3703,.2311,.598],[.3676,.2259,.5955],[.3649,.2208,.5931],[.3622,.2156,.5906],[.3595,.2104,.5882],[.3568,.2053,.5857],[.3541,.2001,.5832],[.3514,.1949,.5808],[.3487,.1898,.5783],[.346,.1846,.5759],[.3433,.1794,.5734],[.3406,.1743,.5709],[.3379,.1691,.5685],[.3352,.1639,.566],[.3325,.1588,.5636],[.3298,.1536,.5611],[.3272,.1487,.5588],[.3246,.1439,.5566],[.322,.1391,.5544],[.3194,.1343,.5522],[.3168,.1296,.55],[.3142,.1248,.5478],[.3116,.12,.5456],[.3091,.1152,.5433],[.3065,.1104,.5411],[.3039,.1056,.5389],[.3013,.1008,.5367],[.2987,.096,.5345],[.2961,.0912,.5323],[.2936,.0864,.5301],[.291,.0816,.5278],[.2884,.0768,.5256],[.2858,.072,.5234],[.2832,.0672,.5212],[.2806,.0624,.519],[.2781,.0576,.5168],[.2755,.0528,.5146],[.2729,.048,.5123],[.2703,.0432,.5101],[.2677,.0384,.5079],[.2651,.0336,.5057],[.2626,.0288,.5035],[.26,.024,.5013],[.2574,.0192,.4991],[.2548,.0144,.4968],[.2522,.0096,.4946],[.2496,.0048,.4924],[.2471,0,.4902]]},RdBu:{interpolate:!0,colors:[[.4039,0,.1216],[.4155,.0037,.1234],[.427,.0074,.1253],[.4385,.0111,.1271],[.4501,.0148,.129],[.4616,.0185,.1308],[.4731,.0221,.1326],[.4847,.0258,.1345],[.4962,.0295,.1363],[.5077,.0332,.1382],[.5193,.0369,.14],[.5308,.0406,.1419],[.5423,.0443,.1437],[.5539,.048,.1456],[.5654,.0517,.1474],[.5769,.0554,.1493],[.5885,.0591,.1511],[.6,.0627,.1529],[.6115,.0664,.1548],[.6231,.0701,.1566],[.6346,.0738,.1585],[.6461,.0775,.1603],[.6577,.0812,.1622],[.6692,.0849,.164],[.6807,.0886,.1659],[.6923,.0923,.1677],[.7008,.0997,.1712],[.7063,.1107,.1765],[.7119,.1218,.1817],[.7174,.1329,.1869],[.723,.1439,.1922],[.7285,.155,.1974],[.734,.1661,.2026],[.7396,.1772,.2078],[.7451,.1882,.2131],[.7506,.1993,.2183],[.7562,.2104,.2235],[.7617,.2215,.2288],[.7672,.2325,.234],[.7728,.2436,.2392],[.7783,.2547,.2444],[.7839,.2657,.2497],[.7894,.2768,.2549],[.7949,.2879,.2601],[.8005,.299,.2654],[.806,.31,.2706],[.8115,.3211,.2758],[.8171,.3322,.281],[.8226,.3433,.2863],[.8281,.3543,.2915],[.8337,.3654,.2967],[.8392,.3765,.302],[.8438,.3871,.3101],[.8484,.3977,.3183],[.8531,.4083,.3264],[.8577,.4189,.3346],[.8623,.4295,.3427],[.8669,.4401,.3509],[.8715,.4507,.359],[.8761,.4614,.3672],[.8807,.472,.3753],[.8854,.4826,.3835],[.89,.4932,.3916],[.8946,.5038,.3998],[.8992,.5144,.4079],[.9038,.525,.4161],[.9084,.5356,.4242],[.913,.5463,.4324],[.9176,.5569,.4405],[.9223,.5675,.4487],[.9269,.5781,.4568],[.9315,.5887,.465],[.9361,.5993,.4731],[.9407,.6099,.4813],[.9453,.6205,.4894],[.9499,.6311,.4976],[.9546,.6418,.5057],[.9576,.6512,.5151],[.9589,.6595,.5257],[.9603,.6678,.5363],[.9617,.6761,.5469],[.9631,.6844,.5576],[.9645,.6927,.5682],[.9659,.701,.5788],[.9672,.7093,.5894],[.9686,.7176,.6],[.97,.726,.6106],[.9714,.7343,.6212],[.9728,.7426,.6318],[.9742,.7509,.6424],[.9755,.7592,.6531],[.9769,.7675,.6637],[.9783,.7758,.6743],[.9797,.7841,.6849],[.9811,.7924,.6955],[.9825,.8007,.7061],[.9839,.809,.7167],[.9852,.8173,.7273],[.9866,.8256,.7379],[.988,.8339,.7486],[.9894,.8422,.7592],[.9908,.8505,.7698],[.9922,.8588,.7804],[.9912,.8631,.7878],[.9903,.8674,.7952],[.9894,.8717,.8025],[.9885,.876,.8099],[.9875,.8804,.8173],[.9866,.8847,.8247],[.9857,.889,.8321],[.9848,.8933,.8394],[.9839,.8976,.8468],[.9829,.9019,.8542],[.982,.9062,.8616],[.9811,.9105,.869],[.9802,.9148,.8764],[.9792,.9191,.8837],[.9783,.9234,.8911],[.9774,.9277,.8985],[.9765,.932,.9059],[.9755,.9363,.9133],[.9746,.9406,.9206],[.9737,.9449,.928],[.9728,.9493,.9354],[.9719,.9536,.9428],[.9709,.9579,.9502],[.97,.9622,.9576],[.9691,.9665,.9649],[.9657,.9672,.9681],[.9599,.9645,.967],[.954,.9617,.9659],[.9482,.9589,.9649],[.9423,.9562,.9638],[.9365,.9534,.9627],[.9306,.9506,.9616],[.9248,.9479,.9606],[.919,.9451,.9595],[.9131,.9423,.9584],[.9073,.9396,.9573],[.9014,.9368,.9562],[.8956,.934,.9552],[.8897,.9313,.9541],[.8839,.9285,.953],[.878,.9257,.9519],[.8722,.923,.9509],[.8664,.9202,.9498],[.8605,.9174,.9487],[.8547,.9146,.9476],[.8488,.9119,.9466],[.843,.9091,.9455],[.8371,.9063,.9444],[.8313,.9036,.9433],[.8255,.9008,.9423],[.8196,.898,.9412],[.8099,.8931,.9384],[.8002,.8882,.9356],[.7905,.8833,.9329],[.7809,.8784,.9301],[.7712,.8734,.9273],[.7615,.8685,.9246],[.7518,.8636,.9218],[.7421,.8587,.919],[.7324,.8537,.9163],[.7227,.8488,.9135],[.713,.8439,.9107],[.7033,.839,.908],[.6937,.8341,.9052],[.684,.8291,.9024],[.6743,.8242,.8997],[.6646,.8193,.8969],[.6549,.8144,.8941],[.6452,.8095,.8913],[.6355,.8045,.8886],[.6258,.7996,.8858],[.6161,.7947,.883],[.6065,.7898,.8803],[.5968,.7849,.8775],[.5871,.7799,.8747],[.5774,.775,.872],[.5665,.7687,.8685],[.5543,.761,.8644],[.5422,.7533,.8602],[.53,.7456,.8561],[.5179,.7379,.8519],[.5057,.7303,.8478],[.4936,.7226,.8436],[.4814,.7149,.8394],[.4693,.7072,.8353],[.4571,.6995,.8311],[.445,.6918,.827],[.4328,.6841,.8228],[.4207,.6764,.8187],[.4085,.6687,.8145],[.3964,.6611,.8104],[.3842,.6534,.8062],[.3721,.6457,.8021],[.3599,.638,.7979],[.3478,.6303,.7938],[.3356,.6226,.7896],[.3235,.6149,.7855],[.3113,.6072,.7813],[.2992,.5995,.7772],[.287,.5918,.773],[.2749,.5842,.7689],[.2627,.5765,.7647],[.2575,.5696,.7612],[.2523,.5626,.7576],[.2471,.5557,.7541],[.2418,.5488,.7506],[.2366,.5419,.747],[.2314,.5349,.7435],[.2261,.528,.7399],[.2209,.5211,.7364],[.2157,.5142,.7329],[.2105,.5073,.7293],[.2052,.5003,.7258],[.2,.4934,.7223],[.1948,.4865,.7187],[.1895,.4796,.7152],[.1843,.4727,.7116],[.1791,.4657,.7081],[.1739,.4588,.7046],[.1686,.4519,.701],[.1634,.445,.6975],[.1582,.4381,.694],[.1529,.4311,.6904],[.1477,.4242,.6869],[.1425,.4173,.6834],[.1373,.4104,.6798],[.132,.4035,.6763],[.1273,.3958,.6687],[.123,.3875,.6572],[.1186,.3792,.6457],[.1143,.3709,.6341],[.11,.3626,.6226],[.1057,.3543,.6111],[.1014,.346,.5995],[.0971,.3377,.588],[.0928,.3294,.5765],[.0885,.3211,.5649],[.0842,.3128,.5534],[.0799,.3045,.5419],[.0756,.2962,.5303],[.0713,.2879,.5188],[.067,.2796,.5073],[.0627,.2713,.4957],[.0584,.263,.4842],[.0541,.2547,.4727],[.0498,.2464,.4611],[.0454,.2381,.4496],[.0411,.2298,.4381],[.0368,.2215,.4265],[.0325,.2131,.415],[.0282,.2048,.4035],[.0239,.1965,.3919],[.0196,.1882,.3804]]},RdGy:{interpolate:!0,colors:[[.4039,0,.1216],[.4155,.0037,.1234],[.427,.0074,.1253],[.4385,.0111,.1271],[.4501,.0148,.129],[.4616,.0185,.1308],[.4731,.0221,.1326],[.4847,.0258,.1345],[.4962,.0295,.1363],[.5077,.0332,.1382],[.5193,.0369,.14],[.5308,.0406,.1419],[.5423,.0443,.1437],[.5539,.048,.1456],[.5654,.0517,.1474],[.5769,.0554,.1493],[.5885,.0591,.1511],[.6,.0627,.1529],[.6115,.0664,.1548],[.6231,.0701,.1566],[.6346,.0738,.1585],[.6461,.0775,.1603],[.6577,.0812,.1622],[.6692,.0849,.164],[.6807,.0886,.1659],[.6923,.0923,.1677],[.7008,.0997,.1712],[.7063,.1107,.1765],[.7119,.1218,.1817],[.7174,.1329,.1869],[.723,.1439,.1922],[.7285,.155,.1974],[.734,.1661,.2026],[.7396,.1772,.2078],[.7451,.1882,.2131],[.7506,.1993,.2183],[.7562,.2104,.2235],[.7617,.2215,.2288],[.7672,.2325,.234],[.7728,.2436,.2392],[.7783,.2547,.2444],[.7839,.2657,.2497],[.7894,.2768,.2549],[.7949,.2879,.2601],[.8005,.299,.2654],[.806,.31,.2706],[.8115,.3211,.2758],[.8171,.3322,.281],[.8226,.3433,.2863],[.8281,.3543,.2915],[.8337,.3654,.2967],[.8392,.3765,.302],[.8438,.3871,.3101],[.8484,.3977,.3183],[.8531,.4083,.3264],[.8577,.4189,.3346],[.8623,.4295,.3427],[.8669,.4401,.3509],[.8715,.4507,.359],[.8761,.4614,.3672],[.8807,.472,.3753],[.8854,.4826,.3835],[.89,.4932,.3916],[.8946,.5038,.3998],[.8992,.5144,.4079],[.9038,.525,.4161],[.9084,.5356,.4242],[.913,.5463,.4324],[.9176,.5569,.4405],[.9223,.5675,.4487],[.9269,.5781,.4568],[.9315,.5887,.465],[.9361,.5993,.4731],[.9407,.6099,.4813],[.9453,.6205,.4894],[.9499,.6311,.4976],[.9546,.6418,.5057],[.9576,.6512,.5151],[.9589,.6595,.5257],[.9603,.6678,.5363],[.9617,.6761,.5469],[.9631,.6844,.5576],[.9645,.6927,.5682],[.9659,.701,.5788],[.9672,.7093,.5894],[.9686,.7176,.6],[.97,.726,.6106],[.9714,.7343,.6212],[.9728,.7426,.6318],[.9742,.7509,.6424],[.9755,.7592,.6531],[.9769,.7675,.6637],[.9783,.7758,.6743],[.9797,.7841,.6849],[.9811,.7924,.6955],[.9825,.8007,.7061],[.9839,.809,.7167],[.9852,.8173,.7273],[.9866,.8256,.7379],[.988,.8339,.7486],[.9894,.8422,.7592],[.9908,.8505,.7698],[.9922,.8588,.7804],[.9925,.8644,.789],[.9928,.8699,.7976],[.9931,.8754,.8062],[.9934,.881,.8148],[.9937,.8865,.8235],[.994,.892,.8321],[.9943,.8976,.8407],[.9946,.9031,.8493],[.9949,.9087,.8579],[.9952,.9142,.8665],[.9955,.9197,.8751],[.9958,.9253,.8837],[.9962,.9308,.8923],[.9965,.9363,.901],[.9968,.9419,.9096],[.9971,.9474,.9182],[.9974,.9529,.9268],[.9977,.9585,.9354],[.998,.964,.944],[.9983,.9696,.9526],[.9986,.9751,.9612],[.9989,.9806,.9699],[.9992,.9862,.9785],[.9995,.9917,.9871],[.9998,.9972,.9957],[.9976,.9976,.9976],[.9928,.9928,.9928],[.9881,.9881,.9881],[.9833,.9833,.9833],[.9785,.9785,.9785],[.9738,.9738,.9738],[.969,.969,.969],[.9642,.9642,.9642],[.9595,.9595,.9595],[.9547,.9547,.9547],[.9499,.9499,.9499],[.9452,.9452,.9452],[.9404,.9404,.9404],[.9356,.9356,.9356],[.9309,.9309,.9309],[.9261,.9261,.9261],[.9213,.9213,.9213],[.9166,.9166,.9166],[.9118,.9118,.9118],[.907,.907,.907],[.9023,.9023,.9023],[.8975,.8975,.8975],[.8927,.8927,.8927],[.888,.888,.888],[.8832,.8832,.8832],[.8784,.8784,.8784],[.8726,.8726,.8726],[.8667,.8667,.8667],[.8609,.8609,.8609],[.8551,.8551,.8551],[.8492,.8492,.8492],[.8434,.8434,.8434],[.8375,.8375,.8375],[.8317,.8317,.8317],[.8258,.8258,.8258],[.82,.82,.82],[.8141,.8141,.8141],[.8083,.8083,.8083],[.8025,.8025,.8025],[.7966,.7966,.7966],[.7908,.7908,.7908],[.7849,.7849,.7849],[.7791,.7791,.7791],[.7732,.7732,.7732],[.7674,.7674,.7674],[.7616,.7616,.7616],[.7557,.7557,.7557],[.7499,.7499,.7499],[.744,.744,.744],[.7382,.7382,.7382],[.7323,.7323,.7323],[.7255,.7255,.7255],[.7176,.7176,.7176],[.7098,.7098,.7098],[.702,.702,.702],[.6941,.6941,.6941],[.6863,.6863,.6863],[.6784,.6784,.6784],[.6706,.6706,.6706],[.6627,.6627,.6627],[.6549,.6549,.6549],[.6471,.6471,.6471],[.6392,.6392,.6392],[.6314,.6314,.6314],[.6235,.6235,.6235],[.6157,.6157,.6157],[.6078,.6078,.6078],[.6,.6,.6],[.5922,.5922,.5922],[.5843,.5843,.5843],[.5765,.5765,.5765],[.5686,.5686,.5686],[.5608,.5608,.5608],[.5529,.5529,.5529],[.5451,.5451,.5451],[.5373,.5373,.5373],[.5294,.5294,.5294],[.5205,.5205,.5205],[.5116,.5116,.5116],[.5027,.5027,.5027],[.4937,.4937,.4937],[.4848,.4848,.4848],[.4759,.4759,.4759],[.467,.467,.467],[.4581,.4581,.4581],[.4491,.4491,.4491],[.4402,.4402,.4402],[.4313,.4313,.4313],[.4224,.4224,.4224],[.4135,.4135,.4135],[.4045,.4045,.4045],[.3956,.3956,.3956],[.3867,.3867,.3867],[.3778,.3778,.3778],[.3689,.3689,.3689],[.3599,.3599,.3599],[.351,.351,.351],[.3421,.3421,.3421],[.3332,.3332,.3332],[.3243,.3243,.3243],[.3153,.3153,.3153],[.3064,.3064,.3064],[.298,.298,.298],[.2902,.2902,.2902],[.2824,.2824,.2824],[.2745,.2745,.2745],[.2667,.2667,.2667],[.2588,.2588,.2588],[.251,.251,.251],[.2431,.2431,.2431],[.2353,.2353,.2353],[.2275,.2275,.2275],[.2196,.2196,.2196],[.2118,.2118,.2118],[.2039,.2039,.2039],[.1961,.1961,.1961],[.1882,.1882,.1882],[.1804,.1804,.1804],[.1725,.1725,.1725],[.1647,.1647,.1647],[.1569,.1569,.1569],[.149,.149,.149],[.1412,.1412,.1412],[.1333,.1333,.1333],[.1255,.1255,.1255],[.1176,.1176,.1176],[.1098,.1098,.1098],[.102,.102,.102]]},RdPu:{interpolate:!0,colors:[[1,.9686,.9529],[.9998,.9658,.9502],[.9995,.963,.9475],[.9993,.9601,.9448],[.999,.9573,.9421],[.9988,.9545,.9394],[.9985,.9516,.9367],[.9983,.9488,.934],[.998,.946,.9313],[.9978,.9432,.9286],[.9975,.9403,.9259],[.9973,.9375,.9232],[.997,.9347,.9205],[.9968,.9318,.9178],[.9966,.929,.915],[.9963,.9262,.9123],[.9961,.9234,.9096],[.9958,.9205,.9069],[.9956,.9177,.9042],[.9953,.9149,.9015],[.9951,.912,.8988],[.9948,.9092,.8961],[.9946,.9064,.8934],[.9943,.9035,.8907],[.9941,.9007,.888],[.9938,.8979,.8853],[.9936,.8951,.8826],[.9934,.8922,.8799],[.9931,.8894,.8772],[.9929,.8866,.8744],[.9926,.8837,.8717],[.9924,.8809,.869],[.9921,.878,.8662],[.992,.8747,.8627],[.9919,.8714,.8591],[.9918,.8681,.8555],[.9916,.8647,.8519],[.9915,.8614,.8484],[.9914,.8581,.8448],[.9913,.8548,.8412],[.9912,.8514,.8377],[.991,.8481,.8341],[.9909,.8448,.8305],[.9908,.8415,.827],[.9907,.8382,.8234],[.9905,.8348,.8198],[.9904,.8315,.8163],[.9903,.8282,.8127],[.9902,.8249,.8091],[.99,.8215,.8056],[.9899,.8182,.802],[.9898,.8149,.7984],[.9897,.8116,.7949],[.9896,.8083,.7913],[.9894,.8049,.7877],[.9893,.8016,.7842],[.9892,.7983,.7806],[.9891,.795,.777],[.9889,.7916,.7735],[.9888,.7883,.7699],[.9887,.785,.7663],[.9886,.7817,.7628],[.9885,.7784,.7592],[.9883,.775,.7556],[.9882,.7714,.7526],[.9879,.7667,.7512],[.9877,.762,.7499],[.9874,.7574,.7485],[.9872,.7527,.7472],[.9869,.748,.7458],[.9867,.7433,.7445],[.9865,.7387,.7431],[.9862,.734,.7418],[.986,.7293,.7404],[.9857,.7246,.7391],[.9855,.72,.7377],[.9852,.7153,.7364],[.985,.7106,.735],[.9847,.7059,.7337],[.9845,.7013,.7323],[.9842,.6966,.7309],[.984,.6919,.7296],[.9837,.6872,.7282],[.9835,.6826,.7269],[.9833,.6779,.7255],[.983,.6732,.7242],[.9828,.6685,.7228],[.9825,.6639,.7215],[.9823,.6592,.7201],[.982,.6545,.7188],[.9818,.6498,.7174],[.9815,.6452,.7161],[.9813,.6405,.7147],[.981,.6358,.7134],[.9808,.6311,.712],[.9805,.6265,.7106],[.9803,.621,.7089],[.9799,.6142,.7064],[.9795,.6075,.704],[.9791,.6007,.7015],[.9788,.5939,.699],[.9784,.5872,.6966],[.978,.5804,.6941],[.9777,.5736,.6917],[.9773,.5669,.6892],[.9769,.5601,.6867],[.9766,.5533,.6843],[.9762,.5466,.6818],[.9758,.5398,.6794],[.9755,.533,.6769],[.9751,.5263,.6744],[.9747,.5195,.672],[.9743,.5127,.6695],[.974,.506,.6671],[.9736,.4992,.6646],[.9732,.4924,.6621],[.9729,.4857,.6597],[.9725,.4789,.6572],[.9721,.4721,.6547],[.9718,.4654,.6523],[.9714,.4586,.6498],[.971,.4518,.6474],[.9707,.4451,.6449],[.9703,.4383,.6424],[.9699,.4315,.64],[.9696,.4248,.6375],[.9692,.418,.6351],[.9688,.4112,.6326],[.967,.4046,.6308],[.9638,.3982,.6295],[.9606,.3918,.6283],[.9574,.3855,.6271],[.9542,.3791,.6258],[.951,.3727,.6246],[.9478,.3663,.6234],[.9446,.3599,.6221],[.9414,.3535,.6209],[.9382,.3471,.6197],[.935,.3407,.6185],[.9318,.3343,.6172],[.9286,.3279,.616],[.9254,.3215,.6148],[.9222,.3151,.6135],[.919,.3087,.6123],[.9158,.3023,.6111],[.9126,.2959,.6098],[.9095,.2895,.6086],[.9063,.2831,.6074],[.9031,.2767,.6062],[.8999,.2703,.6049],[.8967,.2639,.6037],[.8935,.2575,.6025],[.8903,.2511,.6012],[.8871,.2447,.6],[.8839,.2383,.5988],[.8807,.2319,.5975],[.8775,.2255,.5963],[.8743,.2191,.5951],[.8711,.2127,.5938],[.8679,.2063,.5926],[.8631,.2,.5902],[.8573,.1937,.5872],[.8515,.1875,.5841],[.8457,.1812,.581],[.8399,.1749,.5779],[.8341,.1686,.5749],[.8284,.1624,.5718],[.8226,.1561,.5687],[.8168,.1498,.5656],[.811,.1435,.5626],[.8052,.1373,.5595],[.7994,.131,.5564],[.7937,.1247,.5533],[.7879,.1184,.5502],[.7821,.1122,.5472],[.7763,.1059,.5441],[.7705,.0996,.541],[.7648,.0933,.5379],[.759,.0871,.5349],[.7532,.0808,.5318],[.7474,.0745,.5287],[.7416,.0682,.5256],[.7358,.062,.5226],[.7301,.0557,.5195],[.7243,.0494,.5164],[.7185,.0431,.5133],[.7127,.0369,.5103],[.7069,.0306,.5072],[.7011,.0243,.5041],[.6954,.018,.501],[.6896,.0118,.498],[.6838,.0055,.4949],[.6776,.0039,.4935],[.6712,.0039,.4926],[.6648,.0039,.4917],[.6584,.0039,.4909],[.652,.0039,.49],[.6456,.0039,.4892],[.6392,.0039,.4883],[.6328,.0039,.4874],[.6264,.0039,.4866],[.62,.0039,.4857],[.6136,.0039,.4849],[.6072,.0039,.484],[.6008,.0039,.4831],[.5944,.0039,.4823],[.588,.0039,.4814],[.5816,.0039,.4806],[.5752,.0039,.4797],[.5688,.0039,.4788],[.5624,.0039,.478],[.556,.0039,.4771],[.5496,.0039,.4762],[.5432,.0039,.4754],[.5368,.0039,.4745],[.5304,.0039,.4737],[.524,.0039,.4728],[.5176,.0039,.4719],[.5112,.0039,.4711],[.5048,.0039,.4702],[.4984,.0039,.4694],[.492,.0039,.4685],[.4856,.0039,.4676],[.4792,.0039,.4668],[.4732,.0038,.4653],[.4671,.0037,.4637],[.4611,.0036,.4621],[.4551,.0034,.4605],[.449,.0033,.4589],[.443,.0032,.4573],[.437,.0031,.4557],[.431,.003,.4541],[.4249,.0028,.4525],[.4189,.0027,.4509],[.4129,.0026,.4493],[.4068,.0025,.4477],[.4008,.0023,.4461],[.3948,.0022,.4445],[.3888,.0021,.4429],[.3827,.002,.4413],[.3767,.0018,.4397],[.3707,.0017,.4381],[.3646,.0016,.4365],[.3586,.0015,.4349],[.3526,.0014,.4333],[.3466,.0012,.4317],[.3405,.0011,.4301],[.3345,.001,.4285],[.3285,9e-4,.4269],[.3224,7e-4,.4253],[.3164,6e-4,.4237],[.3104,5e-4,.4221],[.3044,4e-4,.4205],[.2983,2e-4,.4189],[.2923,1e-4,.4173],[.2863,0,.4157]]},RdYlBu:{interpolate:!0,colors:[[.6471,0,.149],[.6547,.0074,.1492],[.6624,.0148,.1493],[.6701,.0221,.1495],[.6778,.0295,.1496],[.6855,.0369,.1498],[.6932,.0443,.1499],[.7009,.0517,.1501],[.7086,.0591,.1502],[.7163,.0664,.1504],[.724,.0738,.1506],[.7316,.0812,.1507],[.7393,.0886,.1509],[.747,.096,.151],[.7547,.1033,.1512],[.7624,.1107,.1513],[.7701,.1181,.1515],[.7778,.1255,.1516],[.7855,.1329,.1518],[.7932,.1403,.1519],[.8008,.1476,.1521],[.8085,.155,.1522],[.8162,.1624,.1524],[.8239,.1698,.1526],[.8316,.1772,.1527],[.8393,.1845,.1529],[.8454,.1929,.1551],[.8498,.2023,.1594],[.8543,.2117,.1637],[.8587,.2211,.168],[.8632,.2304,.1723],[.8677,.2398,.1766],[.8721,.2492,.1809],[.8766,.2586,.1852],[.881,.268,.1895],[.8855,.2774,.1938],[.89,.2867,.1982],[.8944,.2961,.2025],[.8989,.3055,.2068],[.9033,.3149,.2111],[.9078,.3243,.2154],[.9123,.3336,.2197],[.9167,.343,.224],[.9212,.3524,.2283],[.9256,.3618,.2326],[.9301,.3712,.2369],[.9346,.3805,.2412],[.939,.3899,.2455],[.9435,.3993,.2498],[.9479,.4087,.2541],[.9524,.4181,.2584],[.9569,.4275,.2627],[.9582,.4374,.2674],[.9596,.4474,.272],[.961,.4574,.2766],[.9624,.4674,.2812],[.9638,.4774,.2858],[.9652,.4874,.2904],[.9666,.4974,.295],[.9679,.5074,.2997],[.9693,.5174,.3043],[.9707,.5274,.3089],[.9721,.5374,.3135],[.9735,.5474,.3181],[.9749,.5574,.3227],[.9762,.5674,.3273],[.9776,.5774,.3319],[.979,.5874,.3366],[.9804,.5974,.3412],[.9818,.6074,.3458],[.9832,.6174,.3504],[.9845,.6274,.355],[.9859,.6374,.3596],[.9873,.6474,.3642],[.9887,.6574,.3689],[.9901,.6674,.3735],[.9915,.6774,.3781],[.9922,.6862,.384],[.9924,.6939,.3912],[.9925,.7016,.3985],[.9927,.7093,.4057],[.9928,.717,.4129],[.993,.7246,.4201],[.9932,.7323,.4274],[.9933,.74,.4346],[.9935,.7477,.4418],[.9936,.7554,.4491],[.9938,.7631,.4563],[.9939,.7708,.4635],[.9941,.7785,.4707],[.9942,.7862,.478],[.9944,.7938,.4852],[.9945,.8015,.4924],[.9947,.8092,.4997],[.9948,.8169,.5069],[.995,.8246,.5141],[.9952,.8323,.5213],[.9953,.84,.5286],[.9955,.8477,.5358],[.9956,.8554,.543],[.9958,.8631,.5502],[.9959,.8707,.5575],[.9961,.8784,.5647],[.9962,.8832,.5719],[.9964,.888,.5792],[.9965,.8927,.5864],[.9967,.8975,.5936],[.9968,.9023,.6008],[.997,.907,.6081],[.9972,.9118,.6153],[.9973,.9166,.6225],[.9975,.9213,.6298],[.9976,.9261,.637],[.9978,.9309,.6442],[.9979,.9356,.6514],[.9981,.9404,.6587],[.9982,.9452,.6659],[.9984,.9499,.6731],[.9985,.9547,.6804],[.9987,.9595,.6876],[.9988,.9642,.6948],[.999,.969,.702],[.9992,.9738,.7093],[.9993,.9785,.7165],[.9995,.9833,.7237],[.9996,.9881,.7309],[.9998,.9928,.7382],[.9999,.9976,.7454],[.9976,.9991,.7534],[.9928,.9972,.7622],[.9881,.9954,.7709],[.9833,.9935,.7797],[.9785,.9917,.7885],[.9738,.9899,.7972],[.969,.988,.806],[.9642,.9862,.8148],[.9595,.9843,.8235],[.9547,.9825,.8323],[.9499,.9806,.8411],[.9452,.9788,.8498],[.9404,.9769,.8586],[.9356,.9751,.8674],[.9309,.9732,.8761],[.9261,.9714,.8849],[.9213,.9696,.8937],[.9166,.9677,.9024],[.9118,.9659,.9112],[.907,.964,.92],[.9023,.9622,.9287],[.8975,.9603,.9375],[.8927,.9585,.9463],[.888,.9566,.955],[.8832,.9548,.9638],[.8784,.9529,.9725],[.8703,.9489,.9702],[.8621,.9449,.9679],[.854,.9409,.9656],[.8458,.9369,.9633],[.8377,.9329,.961],[.8295,.929,.9587],[.8214,.925,.9564],[.8132,.921,.9541],[.8051,.917,.9518],[.7969,.913,.9495],[.7888,.909,.9472],[.7806,.905,.9449],[.7725,.901,.9426],[.7643,.897,.9403],[.7562,.893,.9379],[.748,.889,.9356],[.7399,.885,.9333],[.7317,.881,.931],[.7236,.877,.9287],[.7154,.873,.9264],[.7073,.869,.9241],[.6991,.865,.9218],[.691,.861,.9195],[.6828,.857,.9172],[.6747,.853,.9149],[.6664,.8476,.9119],[.6579,.8408,.9082],[.6494,.8341,.9045],[.641,.8273,.9008],[.6325,.8205,.8971],[.6241,.8138,.8934],[.6156,.807,.8897],[.6072,.8002,.886],[.5987,.7935,.8824],[.5902,.7867,.8787],[.5818,.7799,.875],[.5733,.7732,.8713],[.5649,.7664,.8676],[.5564,.7596,.8639],[.5479,.7529,.8602],[.5395,.7461,.8565],[.531,.7393,.8528],[.5226,.7326,.8491],[.5141,.7258,.8454],[.5057,.719,.8418],[.4972,.7123,.8381],[.4887,.7055,.8344],[.4803,.6987,.8307],[.4718,.692,.827],[.4634,.6852,.8233],[.4549,.6784,.8196],[.4477,.6698,.8151],[.4404,.6612,.8107],[.4332,.6526,.8062],[.426,.644,.8018],[.4188,.6354,.7973],[.4115,.6268,.7928],[.4043,.6181,.7884],[.3971,.6095,.7839],[.3899,.6009,.7795],[.3826,.5923,.775],[.3754,.5837,.7705],[.3682,.5751,.7661],[.3609,.5665,.7616],[.3537,.5579,.7572],[.3465,.5493,.7527],[.3393,.5406,.7483],[.332,.532,.7438],[.3248,.5234,.7393],[.3176,.5148,.7349],[.3103,.5062,.7304],[.3031,.4976,.726],[.2959,.489,.7215],[.2887,.4804,.717],[.2814,.4717,.7126],[.2742,.4631,.7081],[.2691,.454,.7035],[.266,.4443,.6987],[.2629,.4346,.694],[.2598,.4249,.6892],[.2567,.4152,.6844],[.2537,.4055,.6797],[.2506,.3958,.6749],[.2475,.3862,.6701],[.2444,.3765,.6654],[.2414,.3668,.6606],[.2383,.3571,.6558],[.2352,.3474,.6511],[.2321,.3377,.6463],[.2291,.328,.6415],[.226,.3183,.6368],[.2229,.3087,.632],[.2198,.299,.6272],[.2168,.2893,.6225],[.2137,.2796,.6177],[.2106,.2699,.6129],[.2075,.2602,.6082],[.2045,.2505,.6034],[.2014,.2408,.5986],[.1983,.2311,.5938],[.1952,.2215,.5891],[.1922,.2118,.5843]]},RdYlGn:{interpolate:!0,colors:[[.6471,0,.149],[.6547,.0074,.1492],[.6624,.0148,.1493],[.6701,.0221,.1495],[.6778,.0295,.1496],[.6855,.0369,.1498],[.6932,.0443,.1499],[.7009,.0517,.1501],[.7086,.0591,.1502],[.7163,.0664,.1504],[.724,.0738,.1506],[.7316,.0812,.1507],[.7393,.0886,.1509],[.747,.096,.151],[.7547,.1033,.1512],[.7624,.1107,.1513],[.7701,.1181,.1515],[.7778,.1255,.1516],[.7855,.1329,.1518],[.7932,.1403,.1519],[.8008,.1476,.1521],[.8085,.155,.1522],[.8162,.1624,.1524],[.8239,.1698,.1526],[.8316,.1772,.1527],[.8393,.1845,.1529],[.8454,.1929,.1551],[.8498,.2023,.1594],[.8543,.2117,.1637],[.8587,.2211,.168],[.8632,.2304,.1723],[.8677,.2398,.1766],[.8721,.2492,.1809],[.8766,.2586,.1852],[.881,.268,.1895],[.8855,.2774,.1938],[.89,.2867,.1982],[.8944,.2961,.2025],[.8989,.3055,.2068],[.9033,.3149,.2111],[.9078,.3243,.2154],[.9123,.3336,.2197],[.9167,.343,.224],[.9212,.3524,.2283],[.9256,.3618,.2326],[.9301,.3712,.2369],[.9346,.3805,.2412],[.939,.3899,.2455],[.9435,.3993,.2498],[.9479,.4087,.2541],[.9524,.4181,.2584],[.9569,.4275,.2627],[.9582,.4374,.2674],[.9596,.4474,.272],[.961,.4574,.2766],[.9624,.4674,.2812],[.9638,.4774,.2858],[.9652,.4874,.2904],[.9666,.4974,.295],[.9679,.5074,.2997],[.9693,.5174,.3043],[.9707,.5274,.3089],[.9721,.5374,.3135],[.9735,.5474,.3181],[.9749,.5574,.3227],[.9762,.5674,.3273],[.9776,.5774,.3319],[.979,.5874,.3366],[.9804,.5974,.3412],[.9818,.6074,.3458],[.9832,.6174,.3504],[.9845,.6274,.355],[.9859,.6374,.3596],[.9873,.6474,.3642],[.9887,.6574,.3689],[.9901,.6674,.3735],[.9915,.6774,.3781],[.9922,.6862,.3836],[.9924,.6939,.3901],[.9925,.7016,.3965],[.9927,.7093,.403],[.9928,.717,.4095],[.993,.7246,.4159],[.9932,.7323,.4224],[.9933,.74,.4288],[.9935,.7477,.4353],[.9936,.7554,.4418],[.9938,.7631,.4482],[.9939,.7708,.4547],[.9941,.7785,.4611],[.9942,.7862,.4676],[.9944,.7938,.474],[.9945,.8015,.4805],[.9947,.8092,.487],[.9948,.8169,.4934],[.995,.8246,.4999],[.9952,.8323,.5063],[.9953,.84,.5128],[.9955,.8477,.5193],[.9956,.8554,.5257],[.9958,.8631,.5322],[.9959,.8707,.5386],[.9961,.8784,.5451],[.9962,.8832,.5531],[.9964,.888,.5611],[.9965,.8927,.5691],[.9967,.8975,.5771],[.9968,.9023,.5851],[.997,.907,.5931],[.9972,.9118,.6011],[.9973,.9166,.6091],[.9975,.9213,.6171],[.9976,.9261,.6251],[.9978,.9309,.6331],[.9979,.9356,.6411],[.9981,.9404,.6491],[.9982,.9452,.6571],[.9984,.9499,.6651],[.9985,.9547,.673],[.9987,.9595,.681],[.9988,.9642,.689],[.999,.969,.697],[.9992,.9738,.705],[.9993,.9785,.713],[.9995,.9833,.721],[.9996,.9881,.729],[.9998,.9928,.737],[.9999,.9976,.745],[.9971,.9988,.745],[.9912,.9963,.737],[.9854,.9938,.729],[.9795,.9914,.721],[.9737,.9889,.713],[.9679,.9865,.705],[.962,.984,.697],[.9562,.9815,.689],[.9503,.9791,.681],[.9445,.9766,.673],[.9386,.9742,.6651],[.9328,.9717,.6571],[.927,.9692,.6491],[.9211,.9668,.6411],[.9153,.9643,.6331],[.9094,.9619,.6251],[.9036,.9594,.6171],[.8977,.9569,.6091],[.8919,.9545,.6011],[.886,.952,.5931],[.8802,.9496,.5851],[.8744,.9471,.5771],[.8685,.9446,.5691],[.8627,.9422,.5611],[.8568,.9397,.5531],[.851,.9373,.5451],[.8431,.9339,.54],[.8353,.9305,.5349],[.8275,.9271,.5299],[.8196,.9237,.5248],[.8118,.9203,.5197],[.8039,.917,.5146],[.7961,.9136,.5096],[.7882,.9102,.5045],[.7804,.9068,.4994],[.7725,.9034,.4943],[.7647,.9,.4893],[.7569,.8967,.4842],[.749,.8933,.4791],[.7412,.8899,.474],[.7333,.8865,.469],[.7255,.8831,.4639],[.7176,.8797,.4588],[.7098,.8764,.4537],[.702,.873,.4487],[.6941,.8696,.4436],[.6863,.8662,.4385],[.6784,.8628,.4334],[.6706,.8594,.4284],[.6627,.8561,.4233],[.6549,.8527,.4182],[.6461,.8488,.4151],[.6362,.8445,.4141],[.6264,.8402,.413],[.6165,.8359,.4119],[.6067,.8316,.4108],[.5968,.8273,.4098],[.587,.823,.4087],[.5772,.8187,.4076],[.5673,.8144,.4065],[.5575,.8101,.4055],[.5476,.8058,.4044],[.5378,.8015,.4033],[.528,.7972,.4022],[.5181,.7928,.4012],[.5083,.7885,.4001],[.4984,.7842,.399],[.4886,.7799,.3979],[.4787,.7756,.3968],[.4689,.7713,.3958],[.4591,.767,.3947],[.4492,.7627,.3936],[.4394,.7584,.3925],[.4295,.7541,.3915],[.4197,.7498,.3904],[.4098,.7455,.3893],[.4,.7412,.3882],[.3883,.7355,.3853],[.3766,.7298,.3824],[.3649,.7241,.3795],[.3532,.7184,.3765],[.3416,.7127,.3736],[.3299,.707,.3707],[.3182,.7013,.3678],[.3065,.6957,.3649],[.2948,.69,.3619],[.2831,.6843,.359],[.2714,.6786,.3561],[.2597,.6729,.3532],[.2481,.6672,.3502],[.2364,.6615,.3473],[.2247,.6558,.3444],[.213,.6501,.3415],[.2013,.6444,.3386],[.1896,.6388,.3356],[.1779,.6331,.3327],[.1662,.6274,.3298],[.1546,.6217,.3269],[.1429,.616,.324],[.1312,.6103,.321],[.1195,.6046,.3181],[.1078,.5989,.3152],[.1,.5924,.3118],[.096,.585,.308],[.092,.5776,.3041],[.088,.5702,.3003],[.084,.5629,.2964],[.08,.5555,.2926],[.076,.5481,.2887],[.072,.5407,.2849],[.068,.5333,.281],[.064,.526,.2772],[.06,.5186,.2734],[.056,.5112,.2695],[.052,.5038,.2657],[.048,.4964,.2618],[.044,.489,.258],[.04,.4817,.2541],[.036,.4743,.2503],[.032,.4669,.2464],[.028,.4595,.2426],[.024,.4521,.2388],[.02,.4448,.2349],[.016,.4374,.2311],[.012,.43,.2272],[.008,.4226,.2234],[.004,.4152,.2195],[0,.4078,.2157]]},Reds:{interpolate:!0,colors:[[1,.9608,.9412],[.9999,.9582,.9375],[.9998,.9556,.9338],[.9996,.953,.9301],[.9995,.9504,.9264],[.9994,.9479,.9227],[.9993,.9453,.919],[.9991,.9427,.9153],[.999,.9401,.9116],[.9989,.9375,.908],[.9988,.9349,.9043],[.9986,.9324,.9006],[.9985,.9298,.8969],[.9984,.9272,.8932],[.9983,.9246,.8895],[.9982,.922,.8858],[.998,.9194,.8821],[.9979,.9169,.8784],[.9978,.9143,.8747],[.9977,.9117,.871],[.9975,.9091,.8674],[.9974,.9065,.8637],[.9973,.9039,.86],[.9972,.9014,.8563],[.997,.8988,.8526],[.9969,.8962,.8489],[.9968,.8936,.8452],[.9967,.891,.8415],[.9966,.8884,.8378],[.9964,.8859,.8341],[.9963,.8833,.8304],[.9962,.8807,.8268],[.996,.8779,.8228],[.9958,.8733,.8167],[.9956,.8688,.8107],[.9953,.8642,.8047],[.9951,.8597,.7987],[.9948,.8551,.7926],[.9946,.8505,.7866],[.9943,.846,.7806],[.9941,.8414,.7745],[.9938,.8369,.7685],[.9936,.8323,.7625],[.9933,.8278,.7565],[.9931,.8232,.7504],[.9928,.8187,.7444],[.9926,.8141,.7384],[.9924,.8096,.7323],[.9921,.805,.7263],[.9919,.8005,.7203],[.9916,.7959,.7143],[.9914,.7914,.7082],[.9911,.7868,.7022],[.9909,.7823,.6962],[.9906,.7777,.6901],[.9904,.7732,.6841],[.9901,.7686,.6781],[.9899,.7641,.6721],[.9897,.7595,.666],[.9894,.755,.66],[.9892,.7504,.654],[.9889,.7459,.648],[.9887,.7413,.6419],[.9884,.7367,.6359],[.9882,.7321,.6299],[.9882,.727,.6241],[.9882,.722,.6184],[.9882,.7169,.6126],[.9882,.7119,.6068],[.9882,.7069,.601],[.9882,.7018,.5952],[.9882,.6968,.5895],[.9882,.6917,.5837],[.9882,.6867,.5779],[.9882,.6816,.5721],[.9882,.6766,.5663],[.9882,.6715,.5605],[.9882,.6665,.5548],[.9882,.6615,.549],[.9882,.6564,.5432],[.9882,.6514,.5374],[.9882,.6463,.5316],[.9882,.6413,.5258],[.9882,.6362,.5201],[.9882,.6312,.5143],[.9882,.6261,.5085],[.9882,.6211,.5027],[.9882,.6161,.4969],[.9882,.611,.4911],[.9882,.606,.4854],[.9882,.6009,.4796],[.9882,.5959,.4738],[.9882,.5908,.468],[.9882,.5858,.4622],[.9882,.5807,.4565],[.9882,.5757,.4507],[.9882,.5707,.4452],[.9881,.5658,.4403],[.9879,.5609,.4354],[.9878,.5559,.4304],[.9877,.551,.4255],[.9876,.5461,.4206],[.9875,.5412,.4157],[.9873,.5363,.4108],[.9872,.5313,.4058],[.9871,.5264,.4009],[.987,.5215,.396],[.9868,.5166,.3911],[.9867,.5116,.3862],[.9866,.5067,.3812],[.9865,.5018,.3763],[.9863,.4969,.3714],[.9862,.492,.3665],[.9861,.487,.3616],[.986,.4821,.3566],[.9859,.4772,.3517],[.9857,.4723,.3468],[.9856,.4674,.3419],[.9855,.4624,.3369],[.9854,.4575,.332],[.9852,.4526,.3271],[.9851,.4477,.3222],[.985,.4428,.3173],[.9849,.4378,.3123],[.9847,.4329,.3074],[.9846,.428,.3025],[.9845,.4231,.2976],[.9844,.4181,.2927],[.9836,.4128,.2884],[.9821,.407,.2847],[.9806,.4012,.281],[.9791,.3954,.2773],[.9777,.3897,.2736],[.9762,.3839,.2699],[.9747,.3781,.2662],[.9732,.3723,.2625],[.9718,.3665,.2588],[.9703,.3608,.2551],[.9688,.355,.2514],[.9673,.3492,.2478],[.9659,.3434,.2441],[.9644,.3376,.2404],[.9629,.3318,.2367],[.9614,.3261,.233],[.96,.3203,.2293],[.9585,.3145,.2256],[.957,.3087,.2219],[.9555,.3029,.2182],[.954,.2971,.2145],[.9526,.2914,.2108],[.9511,.2856,.2072],[.9496,.2798,.2035],[.9481,.274,.1998],[.9467,.2682,.1961],[.9452,.2625,.1924],[.9437,.2567,.1887],[.9422,.2509,.185],[.9408,.2451,.1813],[.9393,.2393,.1776],[.9378,.2335,.1739],[.9345,.2287,.1714],[.9301,.2244,.1696],[.9256,.2201,.1677],[.9212,.2158,.1659],[.9168,.2115,.164],[.9123,.2072,.1622],[.9079,.2028,.1603],[.9035,.1985,.1585],[.8991,.1942,.1566],[.8946,.1899,.1548],[.8902,.1856,.1529],[.8858,.1813,.1511],[.8813,.177,.1493],[.8769,.1727,.1474],[.8725,.1684,.1456],[.8681,.1641,.1437],[.8636,.1598,.1419],[.8592,.1555,.14],[.8548,.1512,.1382],[.8503,.1469,.1363],[.8459,.1426,.1345],[.8415,.1383,.1326],[.837,.1339,.1308],[.8326,.1296,.129],[.8282,.1253,.1271],[.8238,.121,.1253],[.8193,.1167,.1234],[.8149,.1124,.1216],[.8105,.1081,.1197],[.806,.1038,.1179],[.8016,.0995,.116],[.7972,.0952,.1142],[.7926,.0933,.113],[.7879,.0922,.112],[.7832,.0911,.111],[.7785,.09,.11],[.7739,.0889,.1091],[.7692,.0878,.1081],[.7645,.0866,.1071],[.7598,.0855,.1061],[.7552,.0844,.1051],[.7505,.0833,.1041],[.7458,.0822,.1031],[.7411,.0811,.1022],[.7365,.08,.1012],[.7318,.0789,.1002],[.7271,.0778,.0992],[.7224,.0767,.0982],[.7178,.0756,.0972],[.7131,.0745,.0963],[.7084,.0734,.0953],[.7037,.0722,.0943],[.6991,.0711,.0933],[.6944,.07,.0923],[.6897,.0689,.0913],[.685,.0678,.0903],[.6804,.0667,.0894],[.6757,.0656,.0884],[.671,.0645,.0874],[.6663,.0634,.0864],[.6617,.0623,.0854],[.657,.0612,.0844],[.6523,.0601,.0835],[.6476,.059,.0825],[.6404,.0572,.0815],[.6328,.0554,.0805],[.6251,.0535,.0795],[.6175,.0517,.0785],[.6099,.0498,.0776],[.6022,.048,.0766],[.5946,.0461,.0756],[.587,.0443,.0746],[.5794,.0424,.0736],[.5717,.0406,.0726],[.5641,.0388,.0716],[.5565,.0369,.0707],[.5489,.0351,.0697],[.5412,.0332,.0687],[.5336,.0314,.0677],[.526,.0295,.0667],[.5183,.0277,.0657],[.5107,.0258,.0648],[.5031,.024,.0638],[.4955,.0221,.0628],[.4878,.0203,.0618],[.4802,.0185,.0608],[.4726,.0166,.0598],[.4649,.0148,.0589],[.4573,.0129,.0579],[.4497,.0111,.0569],[.4421,.0092,.0559],[.4344,.0074,.0549],[.4268,.0055,.0539],[.4192,.0037,.0529],[.4115,.0018,.052],[.4039,0,.051]]},Set1:{interpolate:!1,colors:[[.8941,.102,.1098],[.2157,.4941,.7216],[.302,.6863,.2902],[.5961,.3059,.6392],[1,.498,0],[1,1,.2],[.651,.3373,.1569],[.9686,.5059,.749],[.6,.6,.6]]},Set2:{interpolate:!1,colors:[[.4,.7608,.6471],[.9882,.5529,.3843],[.5529,.6275,.7961],[.9059,.5412,.7647],[.651,.8471,.3294],[1,.851,.1843],[.898,.7686,.5804],[.702,.702,.702]]},Set3:{interpolate:!1,colors:[[.5529,.8275,.7804],[1,1,.702],[.7451,.7294,.8549],[.9843,.502,.4471],[.502,.6941,.8275],[.9922,.7059,.3843],[.702,.8706,.4118],[.9882,.8039,.898],[.851,.851,.851],[.7373,.502,.7412],[.8,.9216,.7725],[1,.9294,.4353]]},Spectral:{interpolate:!0,colors:[[.6196,.0039,.2588],[.6281,.0133,.2608],[.6365,.0227,.2628],[.645,.0321,.2648],[.6534,.0414,.2668],[.6619,.0508,.2688],[.6704,.0602,.2708],[.6788,.0696,.2728],[.6873,.079,.2748],[.6957,.0884,.2768],[.7042,.0977,.2788],[.7126,.1071,.2808],[.7211,.1165,.2828],[.7296,.1259,.2848],[.738,.1353,.2868],[.7465,.1446,.2888],[.7549,.154,.2908],[.7634,.1634,.2928],[.7719,.1728,.2948],[.7803,.1822,.2968],[.7888,.1915,.2988],[.7972,.2009,.3008],[.8057,.2103,.3028],[.8141,.2197,.3048],[.8226,.2291,.3068],[.8311,.2384,.3088],[.8377,.2468,.3089],[.8424,.254,.307],[.8472,.2612,.3052],[.852,.2684,.3033],[.8567,.2757,.3015],[.8615,.2829,.2997],[.8663,.2901,.2978],[.871,.2973,.296],[.8758,.3046,.2941],[.8806,.3118,.2923],[.8854,.319,.2904],[.8901,.3263,.2886],[.8949,.3335,.2867],[.8997,.3407,.2849],[.9044,.3479,.283],[.9092,.3552,.2812],[.914,.3624,.2794],[.9187,.3696,.2775],[.9235,.3769,.2757],[.9283,.3841,.2738],[.933,.3913,.272],[.9378,.3985,.2701],[.9426,.4058,.2683],[.9473,.413,.2664],[.9521,.4202,.2646],[.9569,.4275,.2627],[.9582,.4374,.2674],[.9596,.4474,.272],[.961,.4574,.2766],[.9624,.4674,.2812],[.9638,.4774,.2858],[.9652,.4874,.2904],[.9666,.4974,.295],[.9679,.5074,.2997],[.9693,.5174,.3043],[.9707,.5274,.3089],[.9721,.5374,.3135],[.9735,.5474,.3181],[.9749,.5574,.3227],[.9762,.5674,.3273],[.9776,.5774,.3319],[.979,.5874,.3366],[.9804,.5974,.3412],[.9818,.6074,.3458],[.9832,.6174,.3504],[.9845,.6274,.355],[.9859,.6374,.3596],[.9873,.6474,.3642],[.9887,.6574,.3689],[.9901,.6674,.3735],[.9915,.6774,.3781],[.9922,.6862,.3836],[.9924,.6939,.3901],[.9925,.7016,.3965],[.9927,.7093,.403],[.9928,.717,.4095],[.993,.7246,.4159],[.9932,.7323,.4224],[.9933,.74,.4288],[.9935,.7477,.4353],[.9936,.7554,.4418],[.9938,.7631,.4482],[.9939,.7708,.4547],[.9941,.7785,.4611],[.9942,.7862,.4676],[.9944,.7938,.474],[.9945,.8015,.4805],[.9947,.8092,.487],[.9948,.8169,.4934],[.995,.8246,.4999],[.9952,.8323,.5063],[.9953,.84,.5128],[.9955,.8477,.5193],[.9956,.8554,.5257],[.9958,.8631,.5322],[.9959,.8707,.5386],[.9961,.8784,.5451],[.9962,.8832,.5531],[.9964,.888,.5611],[.9965,.8927,.5691],[.9967,.8975,.5771],[.9968,.9023,.5851],[.997,.907,.5931],[.9972,.9118,.6011],[.9973,.9166,.6091],[.9975,.9213,.6171],[.9976,.9261,.6251],[.9978,.9309,.6331],[.9979,.9356,.6411],[.9981,.9404,.6491],[.9982,.9452,.6571],[.9984,.9499,.6651],[.9985,.9547,.673],[.9987,.9595,.681],[.9988,.9642,.689],[.999,.969,.697],[.9992,.9738,.705],[.9993,.9785,.713],[.9995,.9833,.721],[.9996,.9881,.729],[.9998,.9928,.737],[.9999,.9976,.745],[.9981,.9992,.746],[.9942,.9977,.74],[.9904,.9962,.734],[.9865,.9946,.728],[.9827,.9931,.722],[.9789,.9915,.716],[.975,.99,.71],[.9712,.9885,.704],[.9673,.9869,.698],[.9635,.9854,.692],[.9596,.9839,.686],[.9558,.9823,.68],[.9519,.9808,.674],[.9481,.9792,.6681],[.9443,.9777,.6621],[.9404,.9762,.6561],[.9366,.9746,.6501],[.9327,.9731,.6441],[.9289,.9715,.6381],[.925,.97,.6321],[.9212,.9685,.6261],[.9173,.9669,.6201],[.9135,.9654,.6141],[.9097,.9639,.6081],[.9058,.9623,.6021],[.902,.9608,.5961],[.8929,.9571,.5979],[.8838,.9534,.5998],[.8747,.9497,.6016],[.8657,.946,.6035],[.8566,.9423,.6053],[.8475,.9386,.6072],[.8384,.9349,.609],[.8294,.9313,.6108],[.8203,.9276,.6127],[.8112,.9239,.6145],[.8022,.9202,.6164],[.7931,.9165,.6182],[.784,.9128,.6201],[.7749,.9091,.6219],[.7659,.9054,.6238],[.7568,.9017,.6256],[.7477,.898,.6275],[.7386,.8943,.6293],[.7296,.8907,.6311],[.7205,.887,.633],[.7114,.8833,.6348],[.7023,.8796,.6367],[.6933,.8759,.6385],[.6842,.8722,.6404],[.6751,.8685,.6422],[.6653,.8646,.6432],[.6547,.8604,.6434],[.6441,.8563,.6435],[.6334,.8521,.6437],[.6228,.848,.6438],[.6122,.8438,.644],[.6016,.8397,.6441],[.591,.8355,.6443],[.5804,.8314,.6444],[.5698,.8272,.6446],[.5592,.8231,.6448],[.5486,.8189,.6449],[.5379,.8148,.6451],[.5273,.8106,.6452],[.5167,.8065,.6454],[.5061,.8023,.6455],[.4955,.7982,.6457],[.4849,.794,.6458],[.4743,.7899,.646],[.4637,.7857,.6461],[.4531,.7815,.6463],[.4424,.7774,.6464],[.4318,.7732,.6466],[.4212,.7691,.6468],[.4106,.7649,.6469],[.4,.7608,.6471],[.392,.7519,.6507],[.384,.7429,.6544],[.376,.734,.6581],[.368,.7251,.6618],[.36,.7162,.6655],[.352,.7073,.6692],[.344,.6983,.6729],[.336,.6894,.6766],[.328,.6805,.6803],[.32,.6716,.684],[.312,.6627,.6877],[.304,.6537,.6913],[.296,.6448,.695],[.288,.6359,.6987],[.28,.627,.7024],[.272,.6181,.7061],[.2641,.6092,.7098],[.2561,.6002,.7135],[.2481,.5913,.7172],[.2401,.5824,.7209],[.2321,.5735,.7246],[.2241,.5646,.7283],[.2161,.5556,.7319],[.2081,.5467,.7356],[.2001,.5378,.7393],[.1995,.529,.7391],[.2062,.5202,.7349],[.213,.5114,.7308],[.2198,.5027,.7266],[.2265,.4939,.7225],[.2333,.4851,.7183],[.2401,.4764,.7142],[.2468,.4676,.71],[.2536,.4588,.7059],[.2604,.4501,.7017],[.2671,.4413,.6976],[.2739,.4325,.6934],[.2807,.4238,.6893],[.2874,.415,.6851],[.2942,.4062,.681],[.301,.3975,.6768],[.3077,.3887,.6727],[.3145,.3799,.6685],[.3213,.3712,.6644],[.328,.3624,.6602],[.3348,.3536,.6561],[.3416,.3449,.6519],[.3483,.3361,.6478],[.3551,.3273,.6436],[.3619,.3186,.6394],[.3686,.3098,.6353]]},Wistia:{interpolate:!0,colors:[[.8941,1,.4784],[.8958,.9986,.4725],[.8974,.9972,.4666],[.8991,.9958,.4607],[.9008,.9943,.4548],[.9024,.9929,.4489],[.9041,.9915,.443],[.9057,.9901,.4371],[.9074,.9887,.4312],[.9091,.9873,.4253],[.9107,.9859,.4194],[.9124,.9844,.4135],[.914,.983,.4076],[.9157,.9816,.4017],[.9174,.9802,.3958],[.919,.9788,.3899],[.9207,.9774,.3839],[.9224,.9759,.378],[.924,.9745,.3721],[.9257,.9731,.3662],[.9273,.9717,.3603],[.929,.9703,.3544],[.9307,.9689,.3485],[.9323,.9675,.3426],[.934,.966,.3367],[.9356,.9646,.3308],[.9373,.9632,.3249],[.939,.9618,.319],[.9406,.9604,.3131],[.9423,.959,.3072],[.9439,.9576,.3013],[.9456,.9561,.2954],[.9473,.9547,.2895],[.9489,.9533,.2836],[.9506,.9519,.2776],[.9522,.9505,.2717],[.9539,.9491,.2658],[.9556,.9477,.2599],[.9572,.9462,.254],[.9589,.9448,.2481],[.9606,.9434,.2422],[.9622,.942,.2363],[.9639,.9406,.2304],[.9655,.9392,.2245],[.9672,.9377,.2186],[.9689,.9363,.2127],[.9705,.9349,.2068],[.9722,.9335,.2009],[.9738,.9321,.195],[.9755,.9307,.1891],[.9772,.9293,.1832],[.9788,.9278,.1773],[.9805,.9264,.1713],[.9821,.925,.1654],[.9838,.9236,.1595],[.9855,.9222,.1536],[.9871,.9208,.1477],[.9888,.9194,.1418],[.9904,.9179,.1359],[.9921,.9165,.13],[.9938,.9151,.1241],[.9954,.9137,.1182],[.9971,.9123,.1123],[.9988,.9109,.1064],[1,.9091,.1016],[1,.9065,.1],[1,.9039,.0984],[1,.9012,.0968],[1,.8986,.0952],[1,.8959,.0936],[1,.8933,.092],[1,.8906,.0904],[1,.888,.0888],[1,.8853,.0872],[1,.8827,.0856],[1,.88,.084],[1,.8774,.0824],[1,.8748,.0808],[1,.8721,.0792],[1,.8695,.0776],[1,.8668,.076],[1,.8642,.0744],[1,.8615,.0728],[1,.8589,.0712],[1,.8562,.0696],[1,.8536,.068],[1,.8509,.0664],[1,.8483,.0648],[1,.8457,.0632],[1,.843,.0616],[1,.8404,.06],[1,.8377,.0584],[1,.8351,.0568],[1,.8324,.0552],[1,.8298,.0536],[1,.8271,.052],[1,.8245,.0504],[1,.8219,.0488],[1,.8192,.0472],[1,.8166,.0456],[1,.8139,.044],[1,.8113,.0424],[1,.8086,.0408],[1,.806,.0392],[1,.8033,.0376],[1,.8007,.036],[1,.798,.0344],[1,.7954,.0328],[1,.7928,.0312],[1,.7901,.0296],[1,.7875,.028],[1,.7848,.0264],[1,.7822,.0248],[1,.7795,.0232],[1,.7769,.0216],[1,.7742,.02],[1,.7716,.0184],[1,.769,.0168],[1,.7663,.0152],[1,.7637,.0136],[1,.761,.012],[1,.7584,.0104],[1,.7557,.0088],[1,.7531,.0072],[1,.7504,.0056],[1,.7478,.004],[1,.7451,.0024],[1,.7425,8e-4],[1,.7403,0],[1,.7385,0],[1,.7367,0],[1,.7349,0],[1,.7331,0],[1,.7314,0],[1,.7296,0],[1,.7278,0],[1,.726,0],[1,.7242,0],[1,.7224,0],[1,.7207,0],[1,.7189,0],[1,.7171,0],[1,.7153,0],[1,.7135,0],[1,.7117,0],[1,.71,0],[1,.7082,0],[1,.7064,0],[1,.7046,0],[1,.7028,0],[1,.701,0],[1,.6993,0],[1,.6975,0],[1,.6957,0],[1,.6939,0],[1,.6921,0],[1,.6903,0],[1,.6886,0],[1,.6868,0],[1,.685,0],[1,.6832,0],[1,.6814,0],[1,.6796,0],[1,.6778,0],[1,.6761,0],[1,.6743,0],[1,.6725,0],[1,.6707,0],[1,.6689,0],[1,.6671,0],[1,.6654,0],[1,.6636,0],[1,.6618,0],[1,.66,0],[1,.6582,0],[1,.6564,0],[1,.6547,0],[1,.6529,0],[1,.6511,0],[1,.6493,0],[1,.6475,0],[1,.6457,0],[1,.644,0],[1,.6422,0],[1,.6404,0],[1,.6386,0],[1,.6368,0],[1,.635,0],[1,.6332,0],[1,.6315,0],[1,.6297,0],[1,.6279,0],[.9999,.6259,0],[.9997,.6239,0],[.9995,.6219,0],[.9993,.6198,0],[.9991,.6178,0],[.9989,.6158,0],[.9988,.6137,0],[.9986,.6117,0],[.9984,.6097,0],[.9982,.6077,0],[.998,.6056,0],[.9978,.6036,0],[.9976,.6016,0],[.9975,.5995,0],[.9973,.5975,0],[.9971,.5955,0],[.9969,.5934,0],[.9967,.5914,0],[.9965,.5894,0],[.9964,.5874,0],[.9962,.5853,0],[.996,.5833,0],[.9958,.5813,0],[.9956,.5792,0],[.9954,.5772,0],[.9952,.5752,0],[.9951,.5731,0],[.9949,.5711,0],[.9947,.5691,0],[.9945,.5671,0],[.9943,.565,0],[.9941,.563,0],[.994,.561,0],[.9938,.5589,0],[.9936,.5569,0],[.9934,.5549,0],[.9932,.5528,0],[.993,.5508,0],[.9928,.5488,0],[.9927,.5468,0],[.9925,.5447,0],[.9923,.5427,0],[.9921,.5407,0],[.9919,.5386,0],[.9917,.5366,0],[.9916,.5346,0],[.9914,.5325,0],[.9912,.5305,0],[.991,.5285,0],[.9908,.5265,0],[.9906,.5244,0],[.9904,.5224,0],[.9903,.5204,0],[.9901,.5183,0],[.9899,.5163,0],[.9897,.5143,0],[.9895,.5122,0],[.9893,.5102,0],[.9892,.5082,0],[.989,.5062,0],[.9888,.5041,0],[.9886,.5021,0],[.9884,.5001,0],[.9882,.498,0]]},YlGn:{interpolate:!0,colors:[[1,1,.898],[.999,.9996,.8926],[.998,.9993,.8872],[.997,.9989,.8818],[.9961,.9985,.8764],[.9951,.9982,.871],[.9941,.9978,.8656],[.9931,.9974,.8601],[.9921,.997,.8547],[.9911,.9967,.8493],[.9902,.9963,.8439],[.9892,.9959,.8385],[.9882,.9956,.8331],[.9872,.9952,.8277],[.9862,.9948,.8223],[.9852,.9945,.8168],[.9843,.9941,.8114],[.9833,.9937,.806],[.9823,.9934,.8006],[.9813,.993,.7952],[.9803,.9926,.7898],[.9793,.9922,.7844],[.9783,.9919,.7789],[.9774,.9915,.7735],[.9764,.9911,.7681],[.9754,.9908,.7627],[.9744,.9904,.7573],[.9734,.99,.7519],[.9724,.9897,.7465],[.9715,.9893,.7411],[.9705,.9889,.7356],[.9695,.9886,.7302],[.9682,.9881,.7252],[.9645,.9866,.7224],[.9608,.9851,.7197],[.9571,.9836,.717],[.9534,.9821,.7143],[.9497,.9807,.7116],[.946,.9792,.7089],[.9423,.9777,.7062],[.9386,.9762,.7035],[.9349,.9748,.7008],[.9313,.9733,.6981],[.9276,.9718,.6954],[.9239,.9703,.6927],[.9202,.9689,.69],[.9165,.9674,.6873],[.9128,.9659,.6846],[.9091,.9644,.6818],[.9054,.963,.6791],[.9017,.9615,.6764],[.898,.96,.6737],[.8943,.9585,.671],[.8907,.957,.6683],[.887,.9556,.6656],[.8833,.9541,.6629],[.8796,.9526,.6602],[.8759,.9511,.6575],[.8722,.9497,.6548],[.8685,.9482,.6521],[.8648,.9467,.6494],[.8611,.9452,.6467],[.8574,.9438,.644],[.8537,.9423,.6412],[.8496,.9406,.6386],[.8442,.9383,.636],[.8388,.9359,.6334],[.8334,.9336,.6308],[.828,.9312,.6282],[.8226,.9289,.6257],[.8171,.9266,.6231],[.8117,.9242,.6205],[.8063,.9219,.6179],[.8009,.9196,.6153],[.7955,.9172,.6127],[.7901,.9149,.6101],[.7847,.9125,.6076],[.7793,.9102,.605],[.7738,.9079,.6024],[.7684,.9055,.5998],[.763,.9032,.5972],[.7576,.9009,.5946],[.7522,.8985,.5921],[.7468,.8962,.5895],[.7414,.8938,.5869],[.7359,.8915,.5843],[.7305,.8892,.5817],[.7251,.8868,.5791],[.7197,.8845,.5766],[.7143,.8822,.574],[.7089,.8798,.5714],[.7035,.8775,.5688],[.6981,.8751,.5662],[.6926,.8728,.5636],[.6872,.8705,.5611],[.6818,.8681,.5585],[.676,.8656,.5559],[.6695,.8628,.5533],[.6629,.8599,.5507],[.6564,.8571,.5481],[.6499,.8543,.5456],[.6434,.8515,.543],[.6369,.8486,.5404],[.6303,.8458,.5378],[.6238,.843,.5352],[.6173,.8401,.5326],[.6108,.8373,.5301],[.6043,.8345,.5275],[.5977,.8316,.5249],[.5912,.8288,.5223],[.5847,.826,.5197],[.5782,.8232,.5171],[.5717,.8203,.5146],[.5651,.8175,.512],[.5586,.8147,.5094],[.5521,.8118,.5068],[.5456,.809,.5042],[.5391,.8062,.5016],[.5325,.8034,.4991],[.526,.8005,.4965],[.5195,.7977,.4939],[.513,.7949,.4913],[.5065,.792,.4887],[.4999,.7892,.4861],[.4934,.7864,.4836],[.4869,.7835,.481],[.4804,.7807,.4784],[.4738,.7779,.4758],[.4672,.7748,.4728],[.4604,.7715,.4693],[.4537,.7682,.4659],[.4469,.7648,.4625],[.4401,.7615,.459],[.4334,.7582,.4556],[.4266,.7549,.4521],[.4198,.7516,.4487],[.4131,.7482,.4452],[.4063,.7449,.4418],[.3995,.7416,.4383],[.3928,.7383,.4349],[.386,.7349,.4314],[.3792,.7316,.428],[.3725,.7283,.4246],[.3657,.725,.4211],[.3589,.7217,.4177],[.3522,.7183,.4142],[.3454,.715,.4108],[.3386,.7117,.4073],[.3319,.7084,.4039],[.3251,.7051,.4004],[.3183,.7017,.397],[.3116,.6984,.3936],[.3048,.6951,.3901],[.298,.6918,.3867],[.2913,.6884,.3832],[.2845,.6851,.3798],[.2777,.6818,.3763],[.271,.6785,.3729],[.2642,.6752,.3694],[.2574,.6718,.366],[.2526,.6676,.3627],[.2489,.6628,.3595],[.2452,.658,.3563],[.2415,.6532,.3531],[.2378,.6484,.3499],[.2341,.6436,.3467],[.2304,.6388,.3435],[.2268,.634,.3403],[.2231,.6292,.3371],[.2194,.6244,.3339],[.2157,.6196,.3307],[.212,.6148,.3275],[.2083,.61,.3243],[.2046,.6052,.3211],[.2009,.6004,.3179],[.1972,.5956,.3147],[.1935,.5908,.3115],[.1899,.586,.3083],[.1862,.5812,.3051],[.1825,.5764,.3019],[.1788,.5716,.2987],[.1751,.5668,.2955],[.1714,.562,.2923],[.1677,.5572,.2891],[.164,.5524,.2859],[.1603,.5476,.2827],[.1566,.5428,.2795],[.1529,.538,.2763],[.1493,.5332,.2731],[.1456,.5284,.2699],[.1419,.5236,.2667],[.1382,.5188,.2635],[.134,.5151,.2616],[.1297,.5116,.2602],[.1254,.5082,.2587],[.1211,.5047,.2572],[.1168,.5013,.2557],[.1125,.4978,.2543],[.1082,.4944,.2528],[.1039,.4909,.2513],[.0996,.4875,.2498],[.0953,.4841,.2484],[.091,.4806,.2469],[.0867,.4772,.2454],[.0824,.4737,.2439],[.078,.4703,.2424],[.0737,.4668,.241],[.0694,.4634,.2395],[.0651,.4599,.238],[.0608,.4565,.2365],[.0565,.4531,.2351],[.0522,.4496,.2336],[.0479,.4462,.2321],[.0436,.4427,.2306],[.0393,.4393,.2292],[.035,.4358,.2277],[.0307,.4324,.2262],[.0264,.4289,.2247],[.0221,.4255,.2233],[.0178,.4221,.2218],[.0135,.4186,.2203],[.0092,.4152,.2188],[.0048,.4117,.2173],[5e-4,.4083,.2159],[0,.4041,.2142],[0,.3998,.2125],[0,.3955,.2107],[0,.3912,.209],[0,.3869,.2073],[0,.3825,.2056],[0,.3782,.2038],[0,.3739,.2021],[0,.3696,.2004],[0,.3653,.1987],[0,.361,.197],[0,.3567,.1952],[0,.3524,.1935],[0,.3481,.1918],[0,.3438,.1901],[0,.3395,.1883],[0,.3352,.1866],[0,.3309,.1849],[0,.3266,.1832],[0,.3223,.1815],[0,.318,.1797],[0,.3136,.178],[0,.3093,.1763],[0,.305,.1746],[0,.3007,.1728],[0,.2964,.1711],[0,.2921,.1694],[0,.2878,.1677],[0,.2835,.166],[0,.2792,.1642],[0,.2749,.1625],[0,.2706,.1608]]},YlGnBu:{interpolate:!0,colors:[[1,1,.851],[.9978,.9991,.8461],[.9956,.9983,.8411],[.9934,.9974,.8362],[.9911,.9966,.8313],[.9889,.9957,.8264],[.9867,.9948,.8215],[.9845,.994,.8165],[.9823,.9931,.8116],[.9801,.9922,.8067],[.9779,.9914,.8018],[.9756,.9905,.7968],[.9734,.9897,.7919],[.9712,.9888,.787],[.969,.9879,.7821],[.9668,.9871,.7772],[.9646,.9862,.7722],[.9624,.9854,.7673],[.9601,.9845,.7624],[.9579,.9836,.7575],[.9557,.9828,.7526],[.9535,.9819,.7476],[.9513,.9811,.7427],[.9491,.9802,.7378],[.9469,.9793,.7329],[.9446,.9785,.728],[.9424,.9776,.723],[.9402,.9767,.7181],[.938,.9759,.7132],[.9358,.975,.7083],[.9336,.9742,.7033],[.9313,.9733,.6984],[.9288,.9723,.6942],[.9242,.9705,.6945],[.9195,.9686,.6949],[.9148,.9668,.6953],[.9101,.9649,.6956],[.9055,.9631,.696],[.9008,.9612,.6964],[.8961,.9594,.6967],[.8914,.9576,.6971],[.8868,.9557,.6975],[.8821,.9539,.6979],[.8774,.952,.6982],[.8727,.9502,.6986],[.8681,.9483,.699],[.8634,.9465,.6993],[.8587,.9446,.6997],[.854,.9428,.7001],[.8494,.9409,.7004],[.8447,.9391,.7008],[.84,.9373,.7012],[.8353,.9354,.7015],[.8306,.9336,.7019],[.826,.9317,.7023],[.8213,.9299,.7027],[.8166,.928,.703],[.8119,.9262,.7034],[.8073,.9243,.7038],[.8026,.9225,.7041],[.7979,.9206,.7045],[.7932,.9188,.7049],[.7886,.917,.7052],[.7839,.9151,.7056],[.7782,.9129,.7061],[.7693,.9094,.707],[.7605,.906,.7078],[.7516,.9025,.7087],[.7427,.8991,.7095],[.7339,.8956,.7104],[.725,.8922,.7113],[.7162,.8888,.7121],[.7073,.8853,.713],[.6985,.8819,.7138],[.6896,.8784,.7147],[.6807,.875,.7156],[.6719,.8715,.7164],[.663,.8681,.7173],[.6542,.8646,.7182],[.6453,.8612,.719],[.6364,.8577,.7199],[.6276,.8543,.7207],[.6187,.8509,.7216],[.6099,.8474,.7225],[.601,.844,.7233],[.5922,.8405,.7242],[.5833,.8371,.725],[.5744,.8336,.7259],[.5656,.8302,.7268],[.5567,.8267,.7276],[.5479,.8233,.7285],[.539,.8199,.7294],[.5301,.8164,.7302],[.5213,.813,.7311],[.5124,.8095,.7319],[.5036,.8061,.7328],[.4952,.8029,.7337],[.4876,.8,.7349],[.4799,.7972,.736],[.4723,.7944,.7371],[.4647,.7915,.7382],[.457,.7887,.7393],[.4494,.7859,.7404],[.4418,.7831,.7415],[.4342,.7802,.7426],[.4265,.7774,.7437],[.4189,.7746,.7448],[.4113,.7717,.7459],[.4036,.7689,.747],[.396,.7661,.7481],[.3884,.7632,.7493],[.3808,.7604,.7504],[.3731,.7576,.7515],[.3655,.7548,.7526],[.3579,.7519,.7537],[.3502,.7491,.7548],[.3426,.7463,.7559],[.335,.7434,.757],[.3274,.7406,.7581],[.3197,.7378,.7592],[.3121,.7349,.7603],[.3045,.7321,.7614],[.2969,.7293,.7625],[.2892,.7265,.7636],[.2816,.7236,.7648],[.274,.7208,.7659],[.2663,.718,.767],[.2587,.7151,.7681],[.2527,.7114,.7684],[.2483,.7069,.7679],[.2438,.7023,.7674],[.2394,.6978,.7669],[.235,.6932,.7664],[.2305,.6887,.7659],[.2261,.6841,.7654],[.2217,.6796,.7649],[.2173,.675,.7644],[.2128,.6705,.764],[.2084,.6659,.7635],[.204,.6614,.763],[.1995,.6568,.7625],[.1951,.6523,.762],[.1907,.6477,.7615],[.1863,.6432,.761],[.1818,.6386,.7605],[.1774,.6341,.76],[.173,.6295,.7595],[.1685,.625,.759],[.1641,.6204,.7585],[.1597,.6159,.758],[.1552,.6113,.7576],[.1508,.6068,.7571],[.1464,.6022,.7566],[.142,.5976,.7561],[.1375,.5931,.7556],[.1331,.5885,.7551],[.1287,.584,.7546],[.1242,.5794,.7541],[.1198,.5749,.7536],[.1154,.5703,.7531],[.1141,.5647,.7511],[.1147,.5584,.7481],[.1153,.5522,.7452],[.116,.5459,.7422],[.1166,.5396,.7393],[.1172,.5333,.7363],[.1178,.5271,.7334],[.1184,.5208,.7304],[.119,.5145,.7275],[.1196,.5082,.7245],[.1203,.502,.7216],[.1209,.4957,.7186],[.1215,.4894,.7157],[.1221,.4831,.7127],[.1227,.4769,.7098],[.1233,.4706,.7068],[.124,.4643,.7039],[.1246,.458,.7009],[.1252,.4518,.6979],[.1258,.4455,.695],[.1264,.4392,.692],[.127,.4329,.6891],[.1276,.4267,.6861],[.1283,.4204,.6832],[.1289,.4141,.6802],[.1295,.4078,.6773],[.1301,.4016,.6743],[.1307,.3953,.6714],[.1313,.389,.6684],[.1319,.3827,.6655],[.1326,.3765,.6625],[.1332,.3702,.6596],[.1336,.3648,.657],[.134,.3596,.6545],[.1343,.3544,.6521],[.1347,.3493,.6496],[.1351,.3441,.6471],[.1355,.3389,.6447],[.1358,.3337,.6422],[.1362,.3286,.6398],[.1366,.3234,.6373],[.1369,.3182,.6348],[.1373,.3131,.6324],[.1377,.3079,.6299],[.138,.3027,.6275],[.1384,.2976,.625],[.1388,.2924,.6225],[.1391,.2872,.6201],[.1395,.2821,.6176],[.1399,.2769,.6151],[.1403,.2717,.6127],[.1406,.2666,.6102],[.141,.2614,.6078],[.1414,.2562,.6053],[.1417,.2511,.6028],[.1421,.2459,.6004],[.1425,.2407,.5979],[.1428,.2356,.5955],[.1432,.2304,.593],[.1436,.2252,.5905],[.1439,.2201,.5881],[.1443,.2149,.5856],[.1447,.2097,.5832],[.1451,.2046,.5807],[.142,.2014,.5739],[.1384,.1986,.5666],[.1348,.1958,.5592],[.1313,.193,.5518],[.1277,.1901,.5444],[.1241,.1873,.537],[.1206,.1845,.5296],[.117,.1816,.5223],[.1134,.1788,.5149],[.1099,.176,.5075],[.1063,.1731,.5001],[.1027,.1703,.4927],[.0992,.1675,.4854],[.0956,.1647,.478],[.092,.1618,.4706],[.0885,.159,.4632],[.0849,.1562,.4558],[.0813,.1533,.4484],[.0778,.1505,.4411],[.0742,.1477,.4337],[.0706,.1449,.4263],[.0671,.142,.4189],[.0635,.1392,.4115],[.0599,.1364,.4042],[.0563,.1335,.3968],[.0528,.1307,.3894],[.0492,.1279,.382],[.0456,.125,.3746],[.0421,.1222,.3672],[.0385,.1194,.3599],[.0349,.1166,.3525],[.0314,.1137,.3451]]},YlOrBr:{interpolate:!0,colors:[[1,1,.898],[1,.999,.893],[1,.998,.888],[1,.997,.8829],[1,.9961,.8779],[1,.9951,.8728],[1,.9941,.8678],[1,.9931,.8627],[1,.9921,.8577],[1,.9911,.8526],[1,.9902,.8476],[1,.9892,.8426],[1,.9882,.8375],[1,.9872,.8325],[1,.9862,.8274],[1,.9852,.8224],[1,.9843,.8173],[1,.9833,.8123],[1,.9823,.8072],[1,.9813,.8022],[1,.9803,.7972],[1,.9793,.7921],[1,.9783,.7871],[1,.9774,.782],[1,.9764,.777],[1,.9754,.7719],[1,.9744,.7669],[1,.9734,.7618],[1,.9724,.7568],[1,.9715,.7518],[1,.9705,.7467],[1,.9695,.7417],[1,.9683,.7366],[.9999,.9659,.7313],[.9997,.9634,.726],[.9996,.9609,.7207],[.9995,.9585,.7154],[.9994,.956,.7101],[.9992,.9536,.7049],[.9991,.9511,.6996],[.999,.9486,.6943],[.9989,.9462,.689],[.9988,.9437,.6837],[.9986,.9413,.6784],[.9985,.9388,.6731],[.9984,.9363,.6678],[.9983,.9339,.6625],[.9981,.9314,.6572],[.998,.929,.6519],[.9979,.9265,.6467],[.9978,.924,.6414],[.9976,.9216,.6361],[.9975,.9191,.6308],[.9974,.9166,.6255],[.9973,.9142,.6202],[.9972,.9117,.6149],[.997,.9093,.6096],[.9969,.9068,.6043],[.9968,.9043,.599],[.9967,.9019,.5938],[.9965,.8994,.5885],[.9964,.897,.5832],[.9963,.8945,.5779],[.9962,.892,.5726],[.9961,.8892,.5666],[.9961,.8854,.5585],[.9961,.8816,.5504],[.9961,.8778,.5422],[.9961,.874,.5341],[.9961,.8702,.526],[.9961,.8664,.5179],[.9961,.8625,.5098],[.9961,.8587,.5016],[.9961,.8549,.4935],[.9961,.8511,.4854],[.9961,.8473,.4773],[.9961,.8435,.4692],[.9961,.8397,.461],[.9961,.8358,.4529],[.9961,.832,.4448],[.9961,.8282,.4367],[.9961,.8244,.4286],[.9961,.8206,.4204],[.9961,.8168,.4123],[.9961,.813,.4042],[.9961,.8092,.3961],[.9961,.8053,.388],[.9961,.8015,.3798],[.9961,.7977,.3717],[.9961,.7939,.3636],[.9961,.7901,.3555],[.9961,.7863,.3474],[.9961,.7825,.3392],[.9961,.7786,.3311],[.9961,.7748,.323],[.9961,.771,.3149],[.9961,.7666,.3081],[.9961,.7614,.3034],[.9961,.7561,.2987],[.9961,.7508,.294],[.9961,.7455,.2894],[.9961,.7402,.2847],[.9961,.7349,.28],[.9961,.7296,.2753],[.9961,.7243,.2706],[.9961,.719,.266],[.9961,.7137,.2613],[.9961,.7085,.2566],[.9961,.7032,.2519],[.9961,.6979,.2473],[.9961,.6926,.2426],[.9961,.6873,.2379],[.9961,.682,.2332],[.9961,.6767,.2286],[.9961,.6714,.2239],[.9961,.6661,.2192],[.9961,.6608,.2145],[.9961,.6555,.2099],[.9961,.6503,.2052],[.9961,.645,.2005],[.9961,.6397,.1958],[.9961,.6344,.1912],[.9961,.6291,.1865],[.9961,.6238,.1818],[.9961,.6185,.1771],[.9961,.6132,.1725],[.9961,.6079,.1678],[.9961,.6026,.1631],[.995,.5975,.1595],[.9928,.5924,.1569],[.9905,.5874,.1543],[.9883,.5823,.1517],[.9861,.5773,.1492],[.9839,.5723,.1466],[.9817,.5672,.144],[.9795,.5622,.1414],[.9773,.5571,.1388],[.975,.5521,.1362],[.9728,.547,.1337],[.9706,.542,.1311],[.9684,.5369,.1285],[.9662,.5319,.1259],[.964,.5269,.1233],[.9618,.5218,.1207],[.9595,.5168,.1182],[.9573,.5117,.1156],[.9551,.5067,.113],[.9529,.5016,.1104],[.9507,.4966,.1078],[.9485,.4915,.1052],[.9463,.4865,.1027],[.944,.4815,.1001],[.9418,.4764,.0975],[.9396,.4714,.0949],[.9374,.4663,.0923],[.9352,.4613,.0897],[.933,.4562,.0872],[.9307,.4512,.0846],[.9285,.4462,.082],[.9263,.4411,.0794],[.923,.4364,.077],[.9191,.432,.0748],[.9152,.4276,.0726],[.9112,.4232,.0704],[.9073,.4187,.0682],[.9033,.4143,.066],[.8994,.4099,.0638],[.8955,.4054,.0615],[.8915,.401,.0593],[.8876,.3966,.0571],[.8837,.3922,.0549],[.8797,.3877,.0527],[.8758,.3833,.0505],[.8718,.3789,.0483],[.8679,.3744,.046],[.864,.37,.0438],[.86,.3656,.0416],[.8561,.3612,.0394],[.8522,.3567,.0372],[.8482,.3523,.035],[.8443,.3479,.0328],[.8404,.3434,.0305],[.8364,.339,.0283],[.8325,.3346,.0261],[.8285,.3301,.0239],[.8246,.3257,.0217],[.8207,.3213,.0195],[.8167,.3169,.0173],[.8128,.3124,.015],[.8089,.308,.0128],[.8049,.3036,.0106],[.801,.2991,.0084],[.7953,.2958,.008],[.789,.2929,.0083],[.7827,.2899,.0085],[.7765,.287,.0088],[.7702,.284,.009],[.7639,.2811,.0093],[.7576,.2781,.0095],[.7514,.2752,.0098],[.7451,.2722,.01],[.7388,.2693,.0102],[.7325,.2663,.0105],[.7263,.2633,.0107],[.72,.2604,.011],[.7137,.2574,.0112],[.7075,.2545,.0115],[.7012,.2515,.0117],[.6949,.2486,.012],[.6886,.2456,.0122],[.6824,.2427,.0125],[.6761,.2397,.0127],[.6698,.2368,.0129],[.6635,.2338,.0132],[.6573,.2309,.0134],[.651,.2279,.0137],[.6447,.225,.0139],[.6384,.222,.0142],[.6322,.2191,.0144],[.6259,.2161,.0147],[.6196,.2131,.0149],[.6133,.2102,.0152],[.6071,.2072,.0154],[.6008,.2043,.0157],[.5945,.2023,.0159],[.5882,.2005,.0161],[.582,.1986,.0164],[.5757,.1968,.0166],[.5694,.1949,.0169],[.5631,.1931,.0171],[.5569,.1912,.0174],[.5506,.1894,.0176],[.5443,.1875,.0179],[.538,.1857,.0181],[.5318,.1839,.0184],[.5255,.182,.0186],[.5192,.1802,.0189],[.5129,.1783,.0191],[.5067,.1765,.0193],[.5004,.1746,.0196],[.4941,.1728,.0198],[.4878,.1709,.0201],[.4816,.1691,.0203],[.4753,.1672,.0206],[.469,.1654,.0208],[.4627,.1636,.0211],[.4565,.1617,.0213],[.4502,.1599,.0216],[.4439,.158,.0218],[.4376,.1562,.0221],[.4314,.1543,.0223],[.4251,.1525,.0225],[.4188,.1506,.0228],[.4125,.1488,.023],[.4063,.1469,.0233],[.4,.1451,.0235]]},YlOrRd:{interpolate:!0,colors:[[1,1,.8],[1,.9978,.7946],[1,.9956,.7892],[1,.9934,.7838],[1,.9911,.7783],[1,.9889,.7729],[1,.9867,.7675],[1,.9845,.7621],[1,.9823,.7567],[1,.9801,.7513],[1,.9779,.7459],[1,.9756,.7405],[1,.9734,.735],[1,.9712,.7296],[1,.969,.7242],[1,.9668,.7188],[1,.9646,.7134],[1,.9624,.708],[1,.9601,.7026],[1,.9579,.6971],[1,.9557,.6917],[1,.9535,.6863],[1,.9513,.6809],[1,.9491,.6755],[1,.9469,.6701],[1,.9446,.6647],[1,.9424,.6593],[1,.9402,.6538],[1,.938,.6484],[1,.9358,.643],[1,.9336,.6376],[1,.9313,.6322],[1,.9291,.6268],[.9999,.9266,.6216],[.9997,.9242,.6165],[.9996,.9217,.6113],[.9995,.9193,.6061],[.9994,.9168,.601],[.9992,.9143,.5958],[.9991,.9119,.5906],[.999,.9094,.5855],[.9989,.907,.5803],[.9988,.9045,.5751],[.9986,.902,.57],[.9985,.8996,.5648],[.9984,.8971,.5596],[.9983,.8947,.5545],[.9981,.8922,.5493],[.998,.8897,.5441],[.9979,.8873,.539],[.9978,.8848,.5338],[.9976,.8824,.5286],[.9975,.8799,.5235],[.9974,.8774,.5183],[.9973,.875,.5131],[.9972,.8725,.508],[.997,.87,.5028],[.9969,.8676,.4976],[.9968,.8651,.4925],[.9967,.8627,.4873],[.9965,.8602,.4821],[.9964,.8577,.477],[.9963,.8553,.4718],[.9962,.8528,.4666],[.9961,.8498,.4615],[.9961,.845,.4563],[.9961,.8402,.4511],[.9961,.8354,.446],[.9961,.8306,.4408],[.9961,.8258,.4356],[.9961,.821,.4304],[.9961,.8162,.4253],[.9961,.8114,.4201],[.9961,.8066,.4149],[.9961,.8018,.4098],[.9961,.797,.4046],[.9961,.7922,.3994],[.9961,.7874,.3943],[.9961,.7826,.3891],[.9961,.7778,.3839],[.9961,.773,.3788],[.9961,.7682,.3736],[.9961,.7634,.3684],[.9961,.7586,.3633],[.9961,.7538,.3581],[.9961,.749,.3529],[.9961,.7442,.3478],[.9961,.7394,.3426],[.9961,.7346,.3374],[.9961,.7298,.3323],[.9961,.725,.3271],[.9961,.7202,.3219],[.9961,.7154,.3168],[.9961,.7106,.3116],[.9961,.7058,.3064],[.9961,.701,.3013],[.996,.6963,.2973],[.9959,.6918,.2953],[.9958,.6872,.2934],[.9957,.6827,.2914],[.9955,.6781,.2894],[.9954,.6736,.2875],[.9953,.669,.2855],[.9952,.6645,.2835],[.995,.6599,.2816],[.9949,.6554,.2796],[.9948,.6508,.2776],[.9947,.6463,.2756],[.9946,.6417,.2737],[.9944,.6372,.2717],[.9943,.6326,.2697],[.9942,.6281,.2678],[.9941,.6235,.2658],[.9939,.6189,.2638],[.9938,.6144,.2619],[.9937,.6098,.2599],[.9936,.6053,.2579],[.9934,.6007,.256],[.9933,.5962,.254],[.9932,.5916,.252],[.9931,.5871,.2501],[.993,.5825,.2481],[.9928,.578,.2461],[.9927,.5734,.2442],[.9926,.5689,.2422],[.9925,.5643,.2402],[.9923,.5598,.2382],[.9922,.5552,.2363],[.9921,.5491,.2342],[.992,.5413,.232],[.9918,.5336,.2298],[.9917,.5258,.2275],[.9916,.5181,.2253],[.9915,.5103,.2231],[.9914,.5026,.2209],[.9912,.4948,.2187],[.9911,.4871,.2165],[.991,.4793,.2143],[.9909,.4716,.212],[.9907,.4638,.2098],[.9906,.4561,.2076],[.9905,.4483,.2054],[.9904,.4406,.2032],[.9902,.4328,.201],[.9901,.4251,.1988],[.99,.4173,.1965],[.9899,.4096,.1943],[.9898,.4018,.1921],[.9896,.394,.1899],[.9895,.3863,.1877],[.9894,.3785,.1855],[.9893,.3708,.1833],[.9891,.363,.181],[.989,.3553,.1788],[.9889,.3475,.1766],[.9888,.3398,.1744],[.9887,.332,.1722],[.9885,.3243,.17],[.9884,.3165,.1678],[.9883,.3088,.1655],[.9863,.3019,.1636],[.9832,.2955,.1619],[.9802,.2891,.1602],[.9771,.2827,.1585],[.974,.2763,.1567],[.9709,.2699,.155],[.9679,.2635,.1533],[.9648,.2571,.1516],[.9617,.2507,.1499],[.9586,.2443,.1481],[.9556,.2379,.1464],[.9525,.2315,.1447],[.9494,.2251,.143],[.9463,.2187,.1412],[.9433,.2123,.1395],[.9402,.2059,.1378],[.9371,.1995,.1361],[.934,.1931,.1343],[.9309,.1867,.1326],[.9279,.1803,.1309],[.9248,.1739,.1292],[.9217,.1675,.1275],[.9186,.1611,.1257],[.9156,.1547,.124],[.9125,.1483,.1223],[.9094,.1419,.1206],[.9063,.1355,.1188],[.9033,.1292,.1171],[.9002,.1228,.1154],[.8971,.1164,.1137],[.894,.11,.112],[.891,.1036,.1102],[.8867,.0996,.1107],[.882,.0964,.112],[.8773,.0932,.1132],[.8727,.09,.1144],[.868,.0868,.1156],[.8633,.0836,.1169],[.8586,.0804,.1181],[.854,.0772,.1193],[.8493,.074,.1206],[.8446,.0708,.1218],[.8399,.0676,.123],[.8353,.0644,.1243],[.8306,.0612,.1255],[.8259,.058,.1267],[.8212,.0548,.128],[.8166,.0516,.1292],[.8119,.0484,.1304],[.8072,.0452,.1316],[.8025,.042,.1329],[.7979,.0388,.1341],[.7932,.0356,.1353],[.7885,.0324,.1366],[.7838,.0292,.1378],[.7792,.026,.139],[.7745,.0228,.1403],[.7698,.0196,.1415],[.7651,.0164,.1427],[.7605,.0132,.1439],[.7558,.01,.1452],[.7511,.0068,.1464],[.7464,.0036,.1476],[.7418,4e-4,.1489],[.7346,0,.149],[.7271,0,.149],[.7196,0,.149],[.7121,0,.149],[.7046,0,.149],[.6971,0,.149],[.6896,0,.149],[.6821,0,.149],[.6746,0,.149],[.6671,0,.149],[.6596,0,.149],[.6521,0,.149],[.6446,0,.149],[.637,0,.149],[.6295,0,.149],[.622,0,.149],[.6145,0,.149],[.607,0,.149],[.5995,0,.149],[.592,0,.149],[.5845,0,.149],[.577,0,.149],[.5695,0,.149],[.562,0,.149],[.5545,0,.149],[.547,0,.149],[.5395,0,.149],[.532,0,.149],[.5245,0,.149],[.517,0,.149],[.5095,0,.149],[.502,0,.149]]},afmhot:{interpolate:!0,colors:[[0,0,0],[.0078,0,0],[.0157,0,0],[.0235,0,0],[.0314,0,0],[.0392,0,0],[.0471,0,0],[.0549,0,0],[.0627,0,0],[.0706,0,0],[.0784,0,0],[.0863,0,0],[.0941,0,0],[.102,0,0],[.1098,0,0],[.1176,0,0],[.1255,0,0],[.1333,0,0],[.1412,0,0],[.149,0,0],[.1569,0,0],[.1647,0,0],[.1725,0,0],[.1804,0,0],[.1882,0,0],[.1961,0,0],[.2039,0,0],[.2118,0,0],[.2196,0,0],[.2275,0,0],[.2353,0,0],[.2431,0,0],[.251,0,0],[.2588,0,0],[.2667,0,0],[.2745,0,0],[.2824,0,0],[.2902,0,0],[.298,0,0],[.3059,0,0],[.3137,0,0],[.3216,0,0],[.3294,0,0],[.3373,0,0],[.3451,0,0],[.3529,0,0],[.3608,0,0],[.3686,0,0],[.3765,0,0],[.3843,0,0],[.3922,0,0],[.4,0,0],[.4078,0,0],[.4157,0,0],[.4235,0,0],[.4314,0,0],[.4392,0,0],[.4471,0,0],[.4549,0,0],[.4627,0,0],[.4706,0,0],[.4784,0,0],[.4863,0,0],[.4941,0,0],[.502,.002,0],[.5098,.0098,0],[.5176,.0176,0],[.5255,.0255,0],[.5333,.0333,0],[.5412,.0412,0],[.549,.049,0],[.5569,.0569,0],[.5647,.0647,0],[.5725,.0725,0],[.5804,.0804,0],[.5882,.0882,0],[.5961,.0961,0],[.6039,.1039,0],[.6118,.1118,0],[.6196,.1196,0],[.6275,.1275,0],[.6353,.1353,0],[.6431,.1431,0],[.651,.151,0],[.6588,.1588,0],[.6667,.1667,0],[.6745,.1745,0],[.6824,.1824,0],[.6902,.1902,0],[.698,.198,0],[.7059,.2059,0],[.7137,.2137,0],[.7216,.2216,0],[.7294,.2294,0],[.7373,.2373,0],[.7451,.2451,0],[.7529,.2529,0],[.7608,.2608,0],[.7686,.2686,0],[.7765,.2765,0],[.7843,.2843,0],[.7922,.2922,0],[.8,.3,0],[.8078,.3078,0],[.8157,.3157,0],[.8235,.3235,0],[.8314,.3314,0],[.8392,.3392,0],[.8471,.3471,0],[.8549,.3549,0],[.8627,.3627,0],[.8706,.3706,0],[.8784,.3784,0],[.8863,.3863,0],[.8941,.3941,0],[.902,.402,0],[.9098,.4098,0],[.9176,.4176,0],[.9255,.4255,0],[.9333,.4333,0],[.9412,.4412,0],[.949,.449,0],[.9569,.4569,0],[.9647,.4647,0],[.9725,.4725,0],[.9804,.4804,0],[.9882,.4882,0],[.9961,.4961,0],[1,.5039,.0039],[1,.5118,.0118],[1,.5196,.0196],[1,.5275,.0275],[1,.5353,.0353],[1,.5431,.0431],[1,.551,.051],[1,.5588,.0588],[1,.5667,.0667],[1,.5745,.0745],[1,.5824,.0824],[1,.5902,.0902],[1,.598,.098],[1,.6059,.1059],[1,.6137,.1137],[1,.6216,.1216],[1,.6294,.1294],[1,.6373,.1373],[1,.6451,.1451],[1,.6529,.1529],[1,.6608,.1608],[1,.6686,.1686],[1,.6765,.1765],[1,.6843,.1843],[1,.6922,.1922],[1,.7,.2],[1,.7078,.2078],[1,.7157,.2157],[1,.7235,.2235],[1,.7314,.2314],[1,.7392,.2392],[1,.7471,.2471],[1,.7549,.2549],[1,.7627,.2627],[1,.7706,.2706],[1,.7784,.2784],[1,.7863,.2863],[1,.7941,.2941],[1,.802,.302],[1,.8098,.3098],[1,.8176,.3176],[1,.8255,.3255],[1,.8333,.3333],[1,.8412,.3412],[1,.849,.349],[1,.8569,.3569],[1,.8647,.3647],[1,.8725,.3725],[1,.8804,.3804],[1,.8882,.3882],[1,.8961,.3961],[1,.9039,.4039],[1,.9118,.4118],[1,.9196,.4196],[1,.9275,.4275],[1,.9353,.4353],[1,.9431,.4431],[1,.951,.451],[1,.9588,.4588],[1,.9667,.4667],[1,.9745,.4745],[1,.9824,.4824],[1,.9902,.4902],[1,.998,.498],[1,1,.5059],[1,1,.5137],[1,1,.5216],[1,1,.5294],[1,1,.5373],[1,1,.5451],[1,1,.5529],[1,1,.5608],[1,1,.5686],[1,1,.5765],[1,1,.5843],[1,1,.5922],[1,1,.6],[1,1,.6078],[1,1,.6157],[1,1,.6235],[1,1,.6314],[1,1,.6392],[1,1,.6471],[1,1,.6549],[1,1,.6627],[1,1,.6706],[1,1,.6784],[1,1,.6863],[1,1,.6941],[1,1,.702],[1,1,.7098],[1,1,.7176],[1,1,.7255],[1,1,.7333],[1,1,.7412],[1,1,.749],[1,1,.7569],[1,1,.7647],[1,1,.7725],[1,1,.7804],[1,1,.7882],[1,1,.7961],[1,1,.8039],[1,1,.8118],[1,1,.8196],[1,1,.8275],[1,1,.8353],[1,1,.8431],[1,1,.851],[1,1,.8588],[1,1,.8667],[1,1,.8745],[1,1,.8824],[1,1,.8902],[1,1,.898],[1,1,.9059],[1,1,.9137],[1,1,.9216],[1,1,.9294],[1,1,.9373],[1,1,.9451],[1,1,.9529],[1,1,.9608],[1,1,.9686],[1,1,.9765],[1,1,.9843],[1,1,.9922],[1,1,1]]},autumn:{interpolate:!0,colors:[[1,0,0],[1,.0039,0],[1,.0078,0],[1,.0118,0],[1,.0157,0],[1,.0196,0],[1,.0235,0],[1,.0275,0],[1,.0314,0],[1,.0353,0],[1,.0392,0],[1,.0431,0],[1,.0471,0],[1,.051,0],[1,.0549,0],[1,.0588,0],[1,.0627,0],[1,.0667,0],[1,.0706,0],[1,.0745,0],[1,.0784,0],[1,.0824,0],[1,.0863,0],[1,.0902,0],[1,.0941,0],[1,.098,0],[1,.102,0],[1,.1059,0],[1,.1098,0],[1,.1137,0],[1,.1176,0],[1,.1216,0],[1,.1255,0],[1,.1294,0],[1,.1333,0],[1,.1373,0],[1,.1412,0],[1,.1451,0],[1,.149,0],[1,.1529,0],[1,.1569,0],[1,.1608,0],[1,.1647,0],[1,.1686,0],[1,.1725,0],[1,.1765,0],[1,.1804,0],[1,.1843,0],[1,.1882,0],[1,.1922,0],[1,.1961,0],[1,.2,0],[1,.2039,0],[1,.2078,0],[1,.2118,0],[1,.2157,0],[1,.2196,0],[1,.2235,0],[1,.2275,0],[1,.2314,0],[1,.2353,0],[1,.2392,0],[1,.2431,0],[1,.2471,0],[1,.251,0],[1,.2549,0],[1,.2588,0],[1,.2627,0],[1,.2667,0],[1,.2706,0],[1,.2745,0],[1,.2784,0],[1,.2824,0],[1,.2863,0],[1,.2902,0],[1,.2941,0],[1,.298,0],[1,.302,0],[1,.3059,0],[1,.3098,0],[1,.3137,0],[1,.3176,0],[1,.3216,0],[1,.3255,0],[1,.3294,0],[1,.3333,0],[1,.3373,0],[1,.3412,0],[1,.3451,0],[1,.349,0],[1,.3529,0],[1,.3569,0],[1,.3608,0],[1,.3647,0],[1,.3686,0],[1,.3725,0],[1,.3765,0],[1,.3804,0],[1,.3843,0],[1,.3882,0],[1,.3922,0],[1,.3961,0],[1,.4,0],[1,.4039,0],[1,.4078,0],[1,.4118,0],[1,.4157,0],[1,.4196,0],[1,.4235,0],[1,.4275,0],[1,.4314,0],[1,.4353,0],[1,.4392,0],[1,.4431,0],[1,.4471,0],[1,.451,0],[1,.4549,0],[1,.4588,0],[1,.4627,0],[1,.4667,0],[1,.4706,0],[1,.4745,0],[1,.4784,0],[1,.4824,0],[1,.4863,0],[1,.4902,0],[1,.4941,0],[1,.498,0],[1,.502,0],[1,.5059,0],[1,.5098,0],[1,.5137,0],[1,.5176,0],[1,.5216,0],[1,.5255,0],[1,.5294,0],[1,.5333,0],[1,.5373,0],[1,.5412,0],[1,.5451,0],[1,.549,0],[1,.5529,0],[1,.5569,0],[1,.5608,0],[1,.5647,0],[1,.5686,0],[1,.5725,0],[1,.5765,0],[1,.5804,0],[1,.5843,0],[1,.5882,0],[1,.5922,0],[1,.5961,0],[1,.6,0],[1,.6039,0],[1,.6078,0],[1,.6118,0],[1,.6157,0],[1,.6196,0],[1,.6235,0],[1,.6275,0],[1,.6314,0],[1,.6353,0],[1,.6392,0],[1,.6431,0],[1,.6471,0],[1,.651,0],[1,.6549,0],[1,.6588,0],[1,.6627,0],[1,.6667,0],[1,.6706,0],[1,.6745,0],[1,.6784,0],[1,.6824,0],[1,.6863,0],[1,.6902,0],[1,.6941,0],[1,.698,0],[1,.702,0],[1,.7059,0],[1,.7098,0],[1,.7137,0],[1,.7176,0],[1,.7216,0],[1,.7255,0],[1,.7294,0],[1,.7333,0],[1,.7373,0],[1,.7412,0],[1,.7451,0],[1,.749,0],[1,.7529,0],[1,.7569,0],[1,.7608,0],[1,.7647,0],[1,.7686,0],[1,.7725,0],[1,.7765,0],[1,.7804,0],[1,.7843,0],[1,.7882,0],[1,.7922,0],[1,.7961,0],[1,.8,0],[1,.8039,0],[1,.8078,0],[1,.8118,0],[1,.8157,0],[1,.8196,0],[1,.8235,0],[1,.8275,0],[1,.8314,0],[1,.8353,0],[1,.8392,0],[1,.8431,0],[1,.8471,0],[1,.851,0],[1,.8549,0],[1,.8588,0],[1,.8627,0],[1,.8667,0],[1,.8706,0],[1,.8745,0],[1,.8784,0],[1,.8824,0],[1,.8863,0],[1,.8902,0],[1,.8941,0],[1,.898,0],[1,.902,0],[1,.9059,0],[1,.9098,0],[1,.9137,0],[1,.9176,0],[1,.9216,0],[1,.9255,0],[1,.9294,0],[1,.9333,0],[1,.9373,0],[1,.9412,0],[1,.9451,0],[1,.949,0],[1,.9529,0],[1,.9569,0],[1,.9608,0],[1,.9647,0],[1,.9686,0],[1,.9725,0],[1,.9765,0],[1,.9804,0],[1,.9843,0],[1,.9882,0],[1,.9922,0],[1,.9961,0],[1,1,0]]},binary:{interpolate:!0,colors:[[1,1,1],[.9961,.9961,.9961],[.9922,.9922,.9922],[.9882,.9882,.9882],[.9843,.9843,.9843],[.9804,.9804,.9804],[.9765,.9765,.9765],[.9725,.9725,.9725],[.9686,.9686,.9686],[.9647,.9647,.9647],[.9608,.9608,.9608],[.9569,.9569,.9569],[.9529,.9529,.9529],[.949,.949,.949],[.9451,.9451,.9451],[.9412,.9412,.9412],[.9373,.9373,.9373],[.9333,.9333,.9333],[.9294,.9294,.9294],[.9255,.9255,.9255],[.9216,.9216,.9216],[.9176,.9176,.9176],[.9137,.9137,.9137],[.9098,.9098,.9098],[.9059,.9059,.9059],[.902,.902,.902],[.898,.898,.898],[.8941,.8941,.8941],[.8902,.8902,.8902],[.8863,.8863,.8863],[.8824,.8824,.8824],[.8784,.8784,.8784],[.8745,.8745,.8745],[.8706,.8706,.8706],[.8667,.8667,.8667],[.8627,.8627,.8627],[.8588,.8588,.8588],[.8549,.8549,.8549],[.851,.851,.851],[.8471,.8471,.8471],[.8431,.8431,.8431],[.8392,.8392,.8392],[.8353,.8353,.8353],[.8314,.8314,.8314],[.8275,.8275,.8275],[.8235,.8235,.8235],[.8196,.8196,.8196],[.8157,.8157,.8157],[.8118,.8118,.8118],[.8078,.8078,.8078],[.8039,.8039,.8039],[.8,.8,.8],[.7961,.7961,.7961],[.7922,.7922,.7922],[.7882,.7882,.7882],[.7843,.7843,.7843],[.7804,.7804,.7804],[.7765,.7765,.7765],[.7725,.7725,.7725],[.7686,.7686,.7686],[.7647,.7647,.7647],[.7608,.7608,.7608],[.7569,.7569,.7569],[.7529,.7529,.7529],[.749,.749,.749],[.7451,.7451,.7451],[.7412,.7412,.7412],[.7373,.7373,.7373],[.7333,.7333,.7333],[.7294,.7294,.7294],[.7255,.7255,.7255],[.7216,.7216,.7216],[.7176,.7176,.7176],[.7137,.7137,.7137],[.7098,.7098,.7098],[.7059,.7059,.7059],[.702,.702,.702],[.698,.698,.698],[.6941,.6941,.6941],[.6902,.6902,.6902],[.6863,.6863,.6863],[.6824,.6824,.6824],[.6784,.6784,.6784],[.6745,.6745,.6745],[.6706,.6706,.6706],[.6667,.6667,.6667],[.6627,.6627,.6627],[.6588,.6588,.6588],[.6549,.6549,.6549],[.651,.651,.651],[.6471,.6471,.6471],[.6431,.6431,.6431],[.6392,.6392,.6392],[.6353,.6353,.6353],[.6314,.6314,.6314],[.6275,.6275,.6275],[.6235,.6235,.6235],[.6196,.6196,.6196],[.6157,.6157,.6157],[.6118,.6118,.6118],[.6078,.6078,.6078],[.6039,.6039,.6039],[.6,.6,.6],[.5961,.5961,.5961],[.5922,.5922,.5922],[.5882,.5882,.5882],[.5843,.5843,.5843],[.5804,.5804,.5804],[.5765,.5765,.5765],[.5725,.5725,.5725],[.5686,.5686,.5686],[.5647,.5647,.5647],[.5608,.5608,.5608],[.5569,.5569,.5569],[.5529,.5529,.5529],[.549,.549,.549],[.5451,.5451,.5451],[.5412,.5412,.5412],[.5373,.5373,.5373],[.5333,.5333,.5333],[.5294,.5294,.5294],[.5255,.5255,.5255],[.5216,.5216,.5216],[.5176,.5176,.5176],[.5137,.5137,.5137],[.5098,.5098,.5098],[.5059,.5059,.5059],[.502,.502,.502],[.498,.498,.498],[.4941,.4941,.4941],[.4902,.4902,.4902],[.4863,.4863,.4863],[.4824,.4824,.4824],[.4784,.4784,.4784],[.4745,.4745,.4745],[.4706,.4706,.4706],[.4667,.4667,.4667],[.4627,.4627,.4627],[.4588,.4588,.4588],[.4549,.4549,.4549],[.451,.451,.451],[.4471,.4471,.4471],[.4431,.4431,.4431],[.4392,.4392,.4392],[.4353,.4353,.4353],[.4314,.4314,.4314],[.4275,.4275,.4275],[.4235,.4235,.4235],[.4196,.4196,.4196],[.4157,.4157,.4157],[.4118,.4118,.4118],[.4078,.4078,.4078],[.4039,.4039,.4039],[.4,.4,.4],[.3961,.3961,.3961],[.3922,.3922,.3922],[.3882,.3882,.3882],[.3843,.3843,.3843],[.3804,.3804,.3804],[.3765,.3765,.3765],[.3725,.3725,.3725],[.3686,.3686,.3686],[.3647,.3647,.3647],[.3608,.3608,.3608],[.3569,.3569,.3569],[.3529,.3529,.3529],[.349,.349,.349],[.3451,.3451,.3451],[.3412,.3412,.3412],[.3373,.3373,.3373],[.3333,.3333,.3333],[.3294,.3294,.3294],[.3255,.3255,.3255],[.3216,.3216,.3216],[.3176,.3176,.3176],[.3137,.3137,.3137],[.3098,.3098,.3098],[.3059,.3059,.3059],[.302,.302,.302],[.298,.298,.298],[.2941,.2941,.2941],[.2902,.2902,.2902],[.2863,.2863,.2863],[.2824,.2824,.2824],[.2784,.2784,.2784],[.2745,.2745,.2745],[.2706,.2706,.2706],[.2667,.2667,.2667],[.2627,.2627,.2627],[.2588,.2588,.2588],[.2549,.2549,.2549],[.251,.251,.251],[.2471,.2471,.2471],[.2431,.2431,.2431],[.2392,.2392,.2392],[.2353,.2353,.2353],[.2314,.2314,.2314],[.2275,.2275,.2275],[.2235,.2235,.2235],[.2196,.2196,.2196],[.2157,.2157,.2157],[.2118,.2118,.2118],[.2078,.2078,.2078],[.2039,.2039,.2039],[.2,.2,.2],[.1961,.1961,.1961],[.1922,.1922,.1922],[.1882,.1882,.1882],[.1843,.1843,.1843],[.1804,.1804,.1804],[.1765,.1765,.1765],[.1725,.1725,.1725],[.1686,.1686,.1686],[.1647,.1647,.1647],[.1608,.1608,.1608],[.1569,.1569,.1569],[.1529,.1529,.1529],[.149,.149,.149],[.1451,.1451,.1451],[.1412,.1412,.1412],[.1373,.1373,.1373],[.1333,.1333,.1333],[.1294,.1294,.1294],[.1255,.1255,.1255],[.1216,.1216,.1216],[.1176,.1176,.1176],[.1137,.1137,.1137],[.1098,.1098,.1098],[.1059,.1059,.1059],[.102,.102,.102],[.098,.098,.098],[.0941,.0941,.0941],[.0902,.0902,.0902],[.0863,.0863,.0863],[.0824,.0824,.0824],[.0784,.0784,.0784],[.0745,.0745,.0745],[.0706,.0706,.0706],[.0667,.0667,.0667],[.0627,.0627,.0627],[.0588,.0588,.0588],[.0549,.0549,.0549],[.051,.051,.051],[.0471,.0471,.0471],[.0431,.0431,.0431],[.0392,.0392,.0392],[.0353,.0353,.0353],[.0314,.0314,.0314],[.0275,.0275,.0275],[.0235,.0235,.0235],[.0196,.0196,.0196],[.0157,.0157,.0157],[.0118,.0118,.0118],[.0078,.0078,.0078],[.0039,.0039,.0039],[0,0,0]]},bone:{interpolate:!0,colors:[[0,0,0],[.0034,.0034,.0048],[.0069,.0069,.0095],[.0103,.0103,.0143],[.0137,.0137,.0191],[.0172,.0172,.0239],[.0206,.0206,.0286],[.024,.024,.0334],[.0275,.0275,.0382],[.0309,.0309,.043],[.0343,.0343,.0477],[.0377,.0377,.0525],[.0412,.0412,.0573],[.0446,.0446,.0621],[.048,.048,.0668],[.0515,.0515,.0716],[.0549,.0549,.0764],[.0583,.0583,.0812],[.0618,.0618,.0859],[.0652,.0652,.0907],[.0686,.0686,.0955],[.0721,.0721,.1003],[.0755,.0755,.105],[.0789,.0789,.1098],[.0824,.0824,.1146],[.0858,.0858,.1194],[.0892,.0892,.1241],[.0926,.0926,.1289],[.0961,.0961,.1337],[.0995,.0995,.1384],[.1029,.1029,.1432],[.1064,.1064,.148],[.1098,.1098,.1528],[.1132,.1132,.1575],[.1167,.1167,.1623],[.1201,.1201,.1671],[.1235,.1235,.1719],[.127,.127,.1766],[.1304,.1304,.1814],[.1338,.1338,.1862],[.1373,.1373,.191],[.1407,.1407,.1957],[.1441,.1441,.2005],[.1475,.1475,.2053],[.151,.151,.2101],[.1544,.1544,.2148],[.1578,.1578,.2196],[.1613,.1613,.2244],[.1647,.1647,.2292],[.1681,.1681,.2339],[.1716,.1716,.2387],[.175,.175,.2435],[.1784,.1784,.2483],[.1819,.1819,.253],[.1853,.1853,.2578],[.1887,.1887,.2626],[.1922,.1922,.2673],[.1956,.1956,.2721],[.199,.199,.2769],[.2025,.2025,.2817],[.2059,.2059,.2864],[.2093,.2093,.2912],[.2127,.2127,.296],[.2162,.2162,.3008],[.2196,.2196,.3055],[.223,.223,.3103],[.2265,.2265,.3151],[.2299,.2299,.3199],[.2333,.2333,.3246],[.2368,.2368,.3294],[.2402,.2402,.3342],[.2436,.2436,.339],[.2471,.2471,.3437],[.2505,.2505,.3485],[.2539,.2539,.3533],[.2574,.2574,.3581],[.2608,.2608,.3628],[.2642,.2642,.3676],[.2676,.2676,.3724],[.2711,.2711,.3772],[.2745,.2745,.3819],[.2779,.2779,.3867],[.2814,.2814,.3915],[.2848,.2848,.3962],[.2882,.2882,.401],[.2917,.2917,.4058],[.2951,.2951,.4106],[.2985,.2985,.4153],[.302,.302,.4201],[.3054,.3054,.4249],[.3088,.3088,.4297],[.3123,.3123,.4344],[.3157,.3157,.4392],[.3191,.3191,.444],[.3225,.3237,.4475],[.326,.3284,.451],[.3294,.3331,.4544],[.3328,.3379,.4578],[.3363,.3426,.4613],[.3397,.3473,.4647],[.3431,.352,.4681],[.3466,.3567,.4716],[.35,.3615,.475],[.3534,.3662,.4784],[.3569,.3709,.4819],[.3603,.3756,.4853],[.3637,.3803,.4887],[.3672,.385,.4922],[.3706,.3898,.4956],[.374,.3945,.499],[.3775,.3992,.5025],[.3809,.4039,.5059],[.3843,.4086,.5093],[.3877,.4134,.5127],[.3912,.4181,.5162],[.3946,.4228,.5196],[.398,.4275,.523],[.4015,.4322,.5265],[.4049,.4369,.5299],[.4083,.4417,.5333],[.4118,.4464,.5368],[.4152,.4511,.5402],[.4186,.4558,.5436],[.4221,.4605,.5471],[.4255,.4653,.5505],[.4289,.47,.5539],[.4324,.4747,.5574],[.4358,.4794,.5608],[.4392,.4841,.5642],[.4426,.4888,.5676],[.4461,.4936,.5711],[.4495,.4983,.5745],[.4529,.503,.5779],[.4564,.5077,.5814],[.4598,.5124,.5848],[.4632,.5172,.5882],[.4667,.5219,.5917],[.4701,.5266,.5951],[.4735,.5313,.5985],[.477,.536,.602],[.4804,.5407,.6054],[.4838,.5455,.6088],[.4873,.5502,.6123],[.4907,.5549,.6157],[.4941,.5596,.6191],[.4975,.5643,.6225],[.501,.5691,.626],[.5044,.5738,.6294],[.5078,.5785,.6328],[.5113,.5832,.6363],[.5147,.5879,.6397],[.5181,.5926,.6431],[.5216,.5974,.6466],[.525,.6021,.65],[.5284,.6068,.6534],[.5319,.6115,.6569],[.5353,.6162,.6603],[.5387,.621,.6637],[.5422,.6257,.6672],[.5456,.6304,.6706],[.549,.6351,.674],[.5525,.6398,.6775],[.5559,.6445,.6809],[.5593,.6493,.6843],[.5627,.654,.6877],[.5662,.6587,.6912],[.5696,.6634,.6946],[.573,.6681,.698],[.5765,.6729,.7015],[.5799,.6776,.7049],[.5833,.6823,.7083],[.5868,.687,.7118],[.5902,.6917,.7152],[.5936,.6964,.7186],[.5971,.7012,.7221],[.6005,.7059,.7255],[.6039,.7106,.7289],[.6074,.7153,.7324],[.6108,.72,.7358],[.6142,.7248,.7392],[.6176,.7295,.7426],[.6211,.7342,.7461],[.6245,.7389,.7495],[.6279,.7436,.7529],[.6314,.7483,.7564],[.6348,.7531,.7598],[.6382,.7578,.7632],[.6417,.7625,.7667],[.6451,.7672,.7701],[.6485,.7719,.7735],[.652,.7767,.777],[.6569,.7804,.7804],[.6622,.7838,.7838],[.6676,.7873,.7873],[.6729,.7907,.7907],[.6783,.7941,.7941],[.6837,.7975,.7975],[.689,.801,.801],[.6944,.8044,.8044],[.6998,.8078,.8078],[.7051,.8113,.8113],[.7105,.8147,.8147],[.7158,.8181,.8181],[.7212,.8216,.8216],[.7266,.825,.825],[.7319,.8284,.8284],[.7373,.8319,.8319],[.7426,.8353,.8353],[.748,.8387,.8387],[.7534,.8422,.8422],[.7587,.8456,.8456],[.7641,.849,.849],[.7695,.8525,.8525],[.7748,.8559,.8559],[.7802,.8593,.8593],[.7855,.8627,.8627],[.7909,.8662,.8662],[.7963,.8696,.8696],[.8016,.873,.873],[.807,.8765,.8765],[.8123,.8799,.8799],[.8177,.8833,.8833],[.8231,.8868,.8868],[.8284,.8902,.8902],[.8338,.8936,.8936],[.8392,.8971,.8971],[.8445,.9005,.9005],[.8499,.9039,.9039],[.8552,.9074,.9074],[.8606,.9108,.9108],[.866,.9142,.9142],[.8713,.9176,.9176],[.8767,.9211,.9211],[.882,.9245,.9245],[.8874,.9279,.9279],[.8928,.9314,.9314],[.8981,.9348,.9348],[.9035,.9382,.9382],[.9089,.9417,.9417],[.9142,.9451,.9451],[.9196,.9485,.9485],[.9249,.952,.952],[.9303,.9554,.9554],[.9357,.9588,.9588],[.941,.9623,.9623],[.9464,.9657,.9657],[.9517,.9691,.9691],[.9571,.9725,.9725],[.9625,.976,.976],[.9678,.9794,.9794],[.9732,.9828,.9828],[.9786,.9863,.9863],[.9839,.9897,.9897],[.9893,.9931,.9931],[.9946,.9966,.9966],[1,1,1]]},brg:{interpolate:!0,colors:[[0,0,1],[.0078,0,.9922],[.0157,0,.9843],[.0235,0,.9765],[.0314,0,.9686],[.0392,0,.9608],[.0471,0,.9529],[.0549,0,.9451],[.0627,0,.9373],[.0706,0,.9294],[.0784,0,.9216],[.0863,0,.9137],[.0941,0,.9059],[.102,0,.898],[.1098,0,.8902],[.1176,0,.8824],[.1255,0,.8745],[.1333,0,.8667],[.1412,0,.8588],[.149,0,.851],[.1569,0,.8431],[.1647,0,.8353],[.1725,0,.8275],[.1804,0,.8196],[.1882,0,.8118],[.1961,0,.8039],[.2039,0,.7961],[.2118,0,.7882],[.2196,0,.7804],[.2275,0,.7725],[.2353,0,.7647],[.2431,0,.7569],[.251,0,.749],[.2588,0,.7412],[.2667,0,.7333],[.2745,0,.7255],[.2824,0,.7176],[.2902,0,.7098],[.298,0,.702],[.3059,0,.6941],[.3137,0,.6863],[.3216,0,.6784],[.3294,0,.6706],[.3373,0,.6627],[.3451,0,.6549],[.3529,0,.6471],[.3608,0,.6392],[.3686,0,.6314],[.3765,0,.6235],[.3843,0,.6157],[.3922,0,.6078],[.4,0,.6],[.4078,0,.5922],[.4157,0,.5843],[.4235,0,.5765],[.4314,0,.5686],[.4392,0,.5608],[.4471,0,.5529],[.4549,0,.5451],[.4627,0,.5373],[.4706,0,.5294],[.4784,0,.5216],[.4863,0,.5137],[.4941,0,.5059],[.502,0,.498],[.5098,0,.4902],[.5176,0,.4824],[.5255,0,.4745],[.5333,0,.4667],[.5412,0,.4588],[.549,0,.451],[.5569,0,.4431],[.5647,0,.4353],[.5725,0,.4275],[.5804,0,.4196],[.5882,0,.4118],[.5961,0,.4039],[.6039,0,.3961],[.6118,0,.3882],[.6196,0,.3804],[.6275,0,.3725],[.6353,0,.3647],[.6431,0,.3569],[.651,0,.349],[.6588,0,.3412],[.6667,0,.3333],[.6745,0,.3255],[.6824,0,.3176],[.6902,0,.3098],[.698,0,.302],[.7059,0,.2941],[.7137,0,.2863],[.7216,0,.2784],[.7294,0,.2706],[.7373,0,.2627],[.7451,0,.2549],[.7529,0,.2471],[.7608,0,.2392],[.7686,0,.2314],[.7765,0,.2235],[.7843,0,.2157],[.7922,0,.2078],[.8,0,.2],[.8078,0,.1922],[.8157,0,.1843],[.8235,0,.1765],[.8314,0,.1686],[.8392,0,.1608],[.8471,0,.1529],[.8549,0,.1451],[.8627,0,.1373],[.8706,0,.1294],[.8784,0,.1216],[.8863,0,.1137],[.8941,0,.1059],[.902,0,.098],[.9098,0,.0902],[.9176,0,.0824],[.9255,0,.0745],[.9333,0,.0667],[.9412,0,.0588],[.949,0,.051],[.9569,0,.0431],[.9647,0,.0353],[.9725,0,.0275],[.9804,0,.0196],[.9882,0,.0118],[.9961,0,.0039],[.9961,.0039,0],[.9882,.0118,0],[.9804,.0196,0],[.9725,.0275,0],[.9647,.0353,0],[.9569,.0431,0],[.949,.051,0],[.9412,.0588,0],[.9333,.0667,0],[.9255,.0745,0],[.9176,.0824,0],[.9098,.0902,0],[.902,.098,0],[.8941,.1059,0],[.8863,.1137,0],[.8784,.1216,0],[.8706,.1294,0],[.8627,.1373,0],[.8549,.1451,0],[.8471,.1529,0],[.8392,.1608,0],[.8314,.1686,0],[.8235,.1765,0],[.8157,.1843,0],[.8078,.1922,0],[.8,.2,0],[.7922,.2078,0],[.7843,.2157,0],[.7765,.2235,0],[.7686,.2314,0],[.7608,.2392,0],[.7529,.2471,0],[.7451,.2549,0],[.7373,.2627,0],[.7294,.2706,0],[.7216,.2784,0],[.7137,.2863,0],[.7059,.2941,0],[.698,.302,0],[.6902,.3098,0],[.6824,.3176,0],[.6745,.3255,0],[.6667,.3333,0],[.6588,.3412,0],[.651,.349,0],[.6431,.3569,0],[.6353,.3647,0],[.6275,.3725,0],[.6196,.3804,0],[.6118,.3882,0],[.6039,.3961,0],[.5961,.4039,0],[.5882,.4118,0],[.5804,.4196,0],[.5725,.4275,0],[.5647,.4353,0],[.5569,.4431,0],[.549,.451,0],[.5412,.4588,0],[.5333,.4667,0],[.5255,.4745,0],[.5176,.4824,0],[.5098,.4902,0],[.502,.498,0],[.4941,.5059,0],[.4863,.5137,0],[.4784,.5216,0],[.4706,.5294,0],[.4627,.5373,0],[.4549,.5451,0],[.4471,.5529,0],[.4392,.5608,0],[.4314,.5686,0],[.4235,.5765,0],[.4157,.5843,0],[.4078,.5922,0],[.4,.6,0],[.3922,.6078,0],[.3843,.6157,0],[.3765,.6235,0],[.3686,.6314,0],[.3608,.6392,0],[.3529,.6471,0],[.3451,.6549,0],[.3373,.6627,0],[.3294,.6706,0],[.3216,.6784,0],[.3137,.6863,0],[.3059,.6941,0],[.298,.702,0],[.2902,.7098,0],[.2824,.7176,0],[.2745,.7255,0],[.2667,.7333,0],[.2588,.7412,0],[.251,.749,0],[.2431,.7569,0],[.2353,.7647,0],[.2275,.7725,0],[.2196,.7804,0],[.2118,.7882,0],[.2039,.7961,0],[.1961,.8039,0],[.1882,.8118,0],[.1804,.8196,0],[.1725,.8275,0],[.1647,.8353,0],[.1569,.8431,0],[.149,.851,0],[.1412,.8588,0],[.1333,.8667,0],[.1255,.8745,0],[.1176,.8824,0],[.1098,.8902,0],[.102,.898,0],[.0941,.9059,0],[.0863,.9137,0],[.0784,.9216,0],[.0706,.9294,0],[.0627,.9373,0],[.0549,.9451,0],[.0471,.9529,0],[.0392,.9608,0],[.0314,.9686,0],[.0235,.9765,0],[.0157,.9843,0],[.0078,.9922,0],[0,1,0]]},bwr:{interpolate:!0,colors:[[0,0,1],[.0078,.0078,1],[.0157,.0157,1],[.0235,.0235,1],[.0314,.0314,1],[.0392,.0392,1],[.0471,.0471,1],[.0549,.0549,1],[.0627,.0627,1],[.0706,.0706,1],[.0784,.0784,1],[.0863,.0863,1],[.0941,.0941,1],[.102,.102,1],[.1098,.1098,1],[.1176,.1176,1],[.1255,.1255,1],[.1333,.1333,1],[.1412,.1412,1],[.149,.149,1],[.1569,.1569,1],[.1647,.1647,1],[.1725,.1725,1],[.1804,.1804,1],[.1882,.1882,1],[.1961,.1961,1],[.2039,.2039,1],[.2118,.2118,1],[.2196,.2196,1],[.2275,.2275,1],[.2353,.2353,1],[.2431,.2431,1],[.251,.251,1],[.2588,.2588,1],[.2667,.2667,1],[.2745,.2745,1],[.2824,.2824,1],[.2902,.2902,1],[.298,.298,1],[.3059,.3059,1],[.3137,.3137,1],[.3216,.3216,1],[.3294,.3294,1],[.3373,.3373,1],[.3451,.3451,1],[.3529,.3529,1],[.3608,.3608,1],[.3686,.3686,1],[.3765,.3765,1],[.3843,.3843,1],[.3922,.3922,1],[.4,.4,1],[.4078,.4078,1],[.4157,.4157,1],[.4235,.4235,1],[.4314,.4314,1],[.4392,.4392,1],[.4471,.4471,1],[.4549,.4549,1],[.4627,.4627,1],[.4706,.4706,1],[.4784,.4784,1],[.4863,.4863,1],[.4941,.4941,1],[.502,.502,1],[.5098,.5098,1],[.5176,.5176,1],[.5255,.5255,1],[.5333,.5333,1],[.5412,.5412,1],[.549,.549,1],[.5569,.5569,1],[.5647,.5647,1],[.5725,.5725,1],[.5804,.5804,1],[.5882,.5882,1],[.5961,.5961,1],[.6039,.6039,1],[.6118,.6118,1],[.6196,.6196,1],[.6275,.6275,1],[.6353,.6353,1],[.6431,.6431,1],[.651,.651,1],[.6588,.6588,1],[.6667,.6667,1],[.6745,.6745,1],[.6824,.6824,1],[.6902,.6902,1],[.698,.698,1],[.7059,.7059,1],[.7137,.7137,1],[.7216,.7216,1],[.7294,.7294,1],[.7373,.7373,1],[.7451,.7451,1],[.7529,.7529,1],[.7608,.7608,1],[.7686,.7686,1],[.7765,.7765,1],[.7843,.7843,1],[.7922,.7922,1],[.8,.8,1],[.8078,.8078,1],[.8157,.8157,1],[.8235,.8235,1],[.8314,.8314,1],[.8392,.8392,1],[.8471,.8471,1],[.8549,.8549,1],[.8627,.8627,1],[.8706,.8706,1],[.8784,.8784,1],[.8863,.8863,1],[.8941,.8941,1],[.902,.902,1],[.9098,.9098,1],[.9176,.9176,1],[.9255,.9255,1],[.9333,.9333,1],[.9412,.9412,1],[.949,.949,1],[.9569,.9569,1],[.9647,.9647,1],[.9725,.9725,1],[.9804,.9804,1],[.9882,.9882,1],[.9961,.9961,1],[1,.9961,.9961],[1,.9882,.9882],[1,.9804,.9804],[1,.9725,.9725],[1,.9647,.9647],[1,.9569,.9569],[1,.949,.949],[1,.9412,.9412],[1,.9333,.9333],[1,.9255,.9255],[1,.9176,.9176],[1,.9098,.9098],[1,.902,.902],[1,.8941,.8941],[1,.8863,.8863],[1,.8784,.8784],[1,.8706,.8706],[1,.8627,.8627],[1,.8549,.8549],[1,.8471,.8471],[1,.8392,.8392],[1,.8314,.8314],[1,.8235,.8235],[1,.8157,.8157],[1,.8078,.8078],[1,.8,.8],[1,.7922,.7922],[1,.7843,.7843],[1,.7765,.7765],[1,.7686,.7686],[1,.7608,.7608],[1,.7529,.7529],[1,.7451,.7451],[1,.7373,.7373],[1,.7294,.7294],[1,.7216,.7216],[1,.7137,.7137],[1,.7059,.7059],[1,.698,.698],[1,.6902,.6902],[1,.6824,.6824],[1,.6745,.6745],[1,.6667,.6667],[1,.6588,.6588],[1,.651,.651],[1,.6431,.6431],[1,.6353,.6353],[1,.6275,.6275],[1,.6196,.6196],[1,.6118,.6118],[1,.6039,.6039],[1,.5961,.5961],[1,.5882,.5882],[1,.5804,.5804],[1,.5725,.5725],[1,.5647,.5647],[1,.5569,.5569],[1,.549,.549],[1,.5412,.5412],[1,.5333,.5333],[1,.5255,.5255],[1,.5176,.5176],[1,.5098,.5098],[1,.502,.502],[1,.4941,.4941],[1,.4863,.4863],[1,.4784,.4784],[1,.4706,.4706],[1,.4627,.4627],[1,.4549,.4549],[1,.4471,.4471],[1,.4392,.4392],[1,.4314,.4314],[1,.4235,.4235],[1,.4157,.4157],[1,.4078,.4078],[1,.4,.4],[1,.3922,.3922],[1,.3843,.3843],[1,.3765,.3765],[1,.3686,.3686],[1,.3608,.3608],[1,.3529,.3529],[1,.3451,.3451],[1,.3373,.3373],[1,.3294,.3294],[1,.3216,.3216],[1,.3137,.3137],[1,.3059,.3059],[1,.298,.298],[1,.2902,.2902],[1,.2824,.2824],[1,.2745,.2745],[1,.2667,.2667],[1,.2588,.2588],[1,.251,.251],[1,.2431,.2431],[1,.2353,.2353],[1,.2275,.2275],[1,.2196,.2196],[1,.2118,.2118],[1,.2039,.2039],[1,.1961,.1961],[1,.1882,.1882],[1,.1804,.1804],[1,.1725,.1725],[1,.1647,.1647],[1,.1569,.1569],[1,.149,.149],[1,.1412,.1412],[1,.1333,.1333],[1,.1255,.1255],[1,.1176,.1176],[1,.1098,.1098],[1,.102,.102],[1,.0941,.0941],[1,.0863,.0863],[1,.0784,.0784],[1,.0706,.0706],[1,.0627,.0627],[1,.0549,.0549],[1,.0471,.0471],[1,.0392,.0392],[1,.0314,.0314],[1,.0235,.0235],[1,.0157,.0157],[1,.0078,.0078],[1,0,0]]},cividis:{interpolate:!0,colors:[[0,.1351,.3048],[0,.1381,.3111],[0,.141,.3176],[0,.144,.324],[0,.1469,.3305],[0,.1498,.3371],[0,.1527,.3437],[0,.1554,.3505],[0,.1579,.3575],[0,.1605,.3645],[0,.1631,.3716],[0,.1656,.3788],[0,.1682,.3859],[0,.1708,.3931],[0,.1734,.4004],[0,.1761,.4076],[0,.1788,.4148],[0,.1816,.4219],[0,.1846,.4288],[0,.1869,.4355],[0,.1888,.4396],[0,.191,.4411],[0,.1934,.4416],[.0036,.1959,.4416],[.0179,.1985,.4412],[.0321,.2012,.4408],[.0462,.2039,.4402],[.0584,.2066,.4395],[.069,.2094,.4389],[.0786,.2121,.4381],[.0875,.2149,.4373],[.0956,.2176,.4366],[.1034,.2204,.4358],[.1107,.2232,.4351],[.1176,.2259,.4343],[.1243,.2287,.4335],[.1307,.2315,.4328],[.1368,.2342,.4321],[.1429,.237,.4314],[.1486,.2397,.4308],[.1543,.2425,.4301],[.1597,.2452,.4295],[.1651,.248,.4289],[.1704,.2507,.4283],[.1755,.2534,.4278],[.1805,.2562,.4273],[.1855,.2589,.4268],[.1903,.2616,.4263],[.1951,.2644,.4259],[.1998,.2671,.4255],[.2044,.2698,.4251],[.2089,.2725,.4248],[.2134,.2753,.4245],[.2179,.278,.4242],[.2223,.2807,.4239],[.2266,.2834,.4237],[.2309,.2861,.4235],[.2351,.2888,.4233],[.2393,.2916,.4232],[.2435,.2943,.423],[.2476,.297,.4229],[.2517,.2997,.4229],[.2557,.3024,.4228],[.2597,.3051,.4228],[.2637,.3078,.4228],[.2677,.3105,.4228],[.2716,.3133,.4228],[.2755,.316,.423],[.2794,.3187,.423],[.2832,.3214,.4232],[.2871,.3241,.4234],[.2909,.3268,.4235],[.2947,.3295,.4237],[.2984,.3322,.424],[.3022,.335,.4242],[.3059,.3377,.4245],[.3096,.3404,.4248],[.3133,.3431,.4251],[.3169,.3458,.4255],[.3206,.3486,.4259],[.3242,.3513,.4262],[.3279,.354,.4267],[.3315,.3567,.4271],[.3351,.3595,.4276],[.3387,.3622,.4281],[.3422,.3649,.4286],[.3458,.3677,.4291],[.3493,.3704,.4297],[.3529,.3732,.4302],[.3564,.3759,.4308],[.3599,.3786,.4315],[.3634,.3814,.4321],[.3669,.3841,.4328],[.3704,.3869,.4334],[.3739,.3896,.4342],[.3774,.3924,.4349],[.3808,.3952,.4357],[.3843,.3979,.4365],[.3877,.4007,.4373],[.3912,.4035,.4381],[.3946,.4062,.439],[.398,.409,.4398],[.4014,.4118,.4407],[.4048,.4146,.4416],[.4082,.4174,.4426],[.4116,.4201,.4436],[.415,.4229,.4446],[.4184,.4257,.4456],[.4217,.4285,.4466],[.4251,.4313,.4477],[.4285,.4341,.4489],[.4318,.437,.45],[.4352,.4398,.4511],[.4385,.4426,.4523],[.4418,.4454,.4537],[.4451,.4482,.4549],[.4484,.4511,.4563],[.4518,.4539,.4576],[.4551,.4567,.459],[.4584,.4596,.4605],[.4616,.4624,.462],[.4649,.4652,.4634],[.4683,.4681,.4649],[.4715,.471,.4664],[.4748,.4738,.4677],[.4782,.4767,.4688],[.4816,.4796,.4698],[.4851,.4825,.4704],[.4887,.4853,.471],[.4923,.4882,.4715],[.4959,.4911,.4718],[.4996,.494,.472],[.5032,.4969,.4723],[.5069,.4997,.4724],[.5105,.5026,.4726],[.5142,.5055,.4726],[.5179,.5085,.4727],[.5216,.5114,.4726],[.5253,.5143,.4727],[.5291,.5172,.4725],[.5328,.5201,.4724],[.5366,.5231,.4724],[.5403,.526,.4722],[.5441,.5289,.4719],[.5478,.5319,.4717],[.5516,.5348,.4714],[.5554,.5378,.4711],[.5592,.5408,.4708],[.563,.5437,.4705],[.5668,.5467,.47],[.5706,.5497,.4696],[.5744,.5527,.4692],[.5782,.5557,.4687],[.5821,.5587,.4681],[.5859,.5617,.4676],[.5898,.5647,.4671],[.5936,.5677,.4664],[.5975,.5707,.4658],[.6014,.5737,.4651],[.6052,.5768,.4644],[.6091,.5798,.4636],[.613,.5829,.463],[.6169,.5859,.4622],[.6208,.589,.4614],[.6247,.592,.4606],[.6286,.5951,.4596],[.6325,.5982,.4587],[.6364,.6013,.4578],[.6404,.6044,.4568],[.6443,.6074,.4559],[.6482,.6106,.4548],[.6522,.6137,.4537],[.6561,.6168,.4527],[.6601,.6199,.4515],[.6641,.623,.4503],[.668,.6262,.4493],[.672,.6293,.448],[.676,.6325,.4467],[.68,.6356,.4454],[.6839,.6388,.4443],[.688,.642,.4429],[.692,.6451,.4415],[.696,.6483,.4401],[.7,.6515,.4386],[.704,.6547,.4371],[.7081,.6579,.4356],[.7121,.6612,.4341],[.7162,.6644,.4324],[.7202,.6676,.4308],[.7243,.6709,.4292],[.7283,.6741,.4276],[.7324,.6774,.4257],[.7365,.6806,.424],[.7406,.6839,.4221],[.7447,.6872,.4204],[.7488,.6905,.4184],[.7529,.6938,.4165],[.757,.6971,.4147],[.7611,.7004,.4126],[.7652,.7037,.4106],[.7694,.707,.4085],[.7735,.7104,.4064],[.7777,.7137,.4041],[.7818,.7171,.402],[.786,.7204,.3996],[.7901,.7238,.3974],[.7943,.7272,.395],[.7985,.7306,.3926],[.8027,.734,.3902],[.8069,.7374,.3877],[.8111,.7408,.3852],[.8153,.7442,.3825],[.8195,.7477,.3798],[.8237,.7511,.377],[.828,.7546,.3743],[.8322,.758,.3715],[.8364,.7615,.3687],[.8407,.765,.3657],[.845,.7684,.3627],[.8492,.7719,.3597],[.8535,.7755,.3565],[.8578,.779,.3533],[.8621,.7825,.35],[.8664,.786,.3466],[.8707,.7896,.3433],[.8751,.7931,.3397],[.8794,.7967,.3362],[.8837,.8003,.3326],[.8881,.8038,.3288],[.8924,.8074,.325],[.8968,.811,.321],[.9012,.8146,.317],[.9056,.8183,.3129],[.91,.8219,.3086],[.9144,.8255,.3043],[.9188,.8292,.3],[.9233,.8328,.2952],[.9277,.8365,.2906],[.9322,.8402,.2859],[.9367,.8438,.2809],[.9411,.8475,.2758],[.9457,.8512,.2705],[.9502,.8549,.2651],[.9547,.8586,.2594],[.9593,.8624,.2536],[.9639,.8661,.2474],[.9685,.8698,.2413],[.9731,.8736,.2347],[.9778,.8773,.228],[.9825,.881,.2209],[.9873,.8847,.2133],[.9922,.8884,.2055],[.9948,.893,.2034],[.9952,.8984,.2076],[.9955,.9039,.2124],[.9957,.9093,.2178]]},cool:{interpolate:!0,colors:[[0,1,1],[.0039,.9961,1],[.0078,.9922,1],[.0118,.9882,1],[.0157,.9843,1],[.0196,.9804,1],[.0235,.9765,1],[.0275,.9725,1],[.0314,.9686,1],[.0353,.9647,1],[.0392,.9608,1],[.0431,.9569,1],[.0471,.9529,1],[.051,.949,1],[.0549,.9451,1],[.0588,.9412,1],[.0627,.9373,1],[.0667,.9333,1],[.0706,.9294,1],[.0745,.9255,1],[.0784,.9216,1],[.0824,.9176,1],[.0863,.9137,1],[.0902,.9098,1],[.0941,.9059,1],[.098,.902,1],[.102,.898,1],[.1059,.8941,1],[.1098,.8902,1],[.1137,.8863,1],[.1176,.8824,1],[.1216,.8784,1],[.1255,.8745,1],[.1294,.8706,1],[.1333,.8667,1],[.1373,.8627,1],[.1412,.8588,1],[.1451,.8549,1],[.149,.851,1],[.1529,.8471,1],[.1569,.8431,1],[.1608,.8392,1],[.1647,.8353,1],[.1686,.8314,1],[.1725,.8275,1],[.1765,.8235,1],[.1804,.8196,1],[.1843,.8157,1],[.1882,.8118,1],[.1922,.8078,1],[.1961,.8039,1],[.2,.8,1],[.2039,.7961,1],[.2078,.7922,1],[.2118,.7882,1],[.2157,.7843,1],[.2196,.7804,1],[.2235,.7765,1],[.2275,.7725,1],[.2314,.7686,1],[.2353,.7647,1],[.2392,.7608,1],[.2431,.7569,1],[.2471,.7529,1],[.251,.749,1],[.2549,.7451,1],[.2588,.7412,1],[.2627,.7373,1],[.2667,.7333,1],[.2706,.7294,1],[.2745,.7255,1],[.2784,.7216,1],[.2824,.7176,1],[.2863,.7137,1],[.2902,.7098,1],[.2941,.7059,1],[.298,.702,1],[.302,.698,1],[.3059,.6941,1],[.3098,.6902,1],[.3137,.6863,1],[.3176,.6824,1],[.3216,.6784,1],[.3255,.6745,1],[.3294,.6706,1],[.3333,.6667,1],[.3373,.6627,1],[.3412,.6588,1],[.3451,.6549,1],[.349,.651,1],[.3529,.6471,1],[.3569,.6431,1],[.3608,.6392,1],[.3647,.6353,1],[.3686,.6314,1],[.3725,.6275,1],[.3765,.6235,1],[.3804,.6196,1],[.3843,.6157,1],[.3882,.6118,1],[.3922,.6078,1],[.3961,.6039,1],[.4,.6,1],[.4039,.5961,1],[.4078,.5922,1],[.4118,.5882,1],[.4157,.5843,1],[.4196,.5804,1],[.4235,.5765,1],[.4275,.5725,1],[.4314,.5686,1],[.4353,.5647,1],[.4392,.5608,1],[.4431,.5569,1],[.4471,.5529,1],[.451,.549,1],[.4549,.5451,1],[.4588,.5412,1],[.4627,.5373,1],[.4667,.5333,1],[.4706,.5294,1],[.4745,.5255,1],[.4784,.5216,1],[.4824,.5176,1],[.4863,.5137,1],[.4902,.5098,1],[.4941,.5059,1],[.498,.502,1],[.502,.498,1],[.5059,.4941,1],[.5098,.4902,1],[.5137,.4863,1],[.5176,.4824,1],[.5216,.4784,1],[.5255,.4745,1],[.5294,.4706,1],[.5333,.4667,1],[.5373,.4627,1],[.5412,.4588,1],[.5451,.4549,1],[.549,.451,1],[.5529,.4471,1],[.5569,.4431,1],[.5608,.4392,1],[.5647,.4353,1],[.5686,.4314,1],[.5725,.4275,1],[.5765,.4235,1],[.5804,.4196,1],[.5843,.4157,1],[.5882,.4118,1],[.5922,.4078,1],[.5961,.4039,1],[.6,.4,1],[.6039,.3961,1],[.6078,.3922,1],[.6118,.3882,1],[.6157,.3843,1],[.6196,.3804,1],[.6235,.3765,1],[.6275,.3725,1],[.6314,.3686,1],[.6353,.3647,1],[.6392,.3608,1],[.6431,.3569,1],[.6471,.3529,1],[.651,.349,1],[.6549,.3451,1],[.6588,.3412,1],[.6627,.3373,1],[.6667,.3333,1],[.6706,.3294,1],[.6745,.3255,1],[.6784,.3216,1],[.6824,.3176,1],[.6863,.3137,1],[.6902,.3098,1],[.6941,.3059,1],[.698,.302,1],[.702,.298,1],[.7059,.2941,1],[.7098,.2902,1],[.7137,.2863,1],[.7176,.2824,1],[.7216,.2784,1],[.7255,.2745,1],[.7294,.2706,1],[.7333,.2667,1],[.7373,.2627,1],[.7412,.2588,1],[.7451,.2549,1],[.749,.251,1],[.7529,.2471,1],[.7569,.2431,1],[.7608,.2392,1],[.7647,.2353,1],[.7686,.2314,1],[.7725,.2275,1],[.7765,.2235,1],[.7804,.2196,1],[.7843,.2157,1],[.7882,.2118,1],[.7922,.2078,1],[.7961,.2039,1],[.8,.2,1],[.8039,.1961,1],[.8078,.1922,1],[.8118,.1882,1],[.8157,.1843,1],[.8196,.1804,1],[.8235,.1765,1],[.8275,.1725,1],[.8314,.1686,1],[.8353,.1647,1],[.8392,.1608,1],[.8431,.1569,1],[.8471,.1529,1],[.851,.149,1],[.8549,.1451,1],[.8588,.1412,1],[.8627,.1373,1],[.8667,.1333,1],[.8706,.1294,1],[.8745,.1255,1],[.8784,.1216,1],[.8824,.1176,1],[.8863,.1137,1],[.8902,.1098,1],[.8941,.1059,1],[.898,.102,1],[.902,.098,1],[.9059,.0941,1],[.9098,.0902,1],[.9137,.0863,1],[.9176,.0824,1],[.9216,.0784,1],[.9255,.0745,1],[.9294,.0706,1],[.9333,.0667,1],[.9373,.0627,1],[.9412,.0588,1],[.9451,.0549,1],[.949,.051,1],[.9529,.0471,1],[.9569,.0431,1],[.9608,.0392,1],[.9647,.0353,1],[.9686,.0314,1],[.9725,.0275,1],[.9765,.0235,1],[.9804,.0196,1],[.9843,.0157,1],[.9882,.0118,1],[.9922,.0078,1],[.9961,.0039,1],[1,0,1]]},coolwarm:{interpolate:!0,colors:[[.2298,.2987,.7537],[.2344,.3055,.7597],[.2389,.3124,.7657],[.2435,.3192,.7717],[.2481,.326,.7777],[.2527,.3328,.7837],[.2572,.3397,.7897],[.2618,.3465,.7957],[.2664,.3533,.8016],[.2711,.36,.8071],[.2758,.3667,.8126],[.2805,.3734,.818],[.2853,.3801,.8235],[.29,.3868,.8289],[.2947,.3935,.8344],[.2994,.4002,.8398],[.3042,.4069,.8453],[.3091,.4135,.8501],[.3139,.4201,.855],[.3188,.4266,.8599],[.3237,.4332,.8647],[.3286,.4397,.8696],[.3335,.4463,.8745],[.3384,.4528,.8793],[.3433,.4594,.8841],[.3483,.4657,.8883],[.3534,.4721,.8926],[.3584,.4784,.8968],[.3635,.4848,.901],[.3685,.4911,.9052],[.3736,.4975,.9095],[.3786,.5039,.9137],[.3837,.5102,.9178],[.3889,.5163,.9214],[.394,.5224,.9249],[.3992,.5285,.9285],[.4044,.5346,.932],[.4096,.5408,.9355],[.4148,.5469,.9391],[.42,.553,.9426],[.4252,.5591,.9461],[.4305,.5649,.9489],[.4358,.5707,.9517],[.4411,.5765,.9545],[.4464,.5824,.9574],[.4517,.5882,.9602],[.457,.594,.963],[.4624,.5998,.9659],[.4677,.6056,.9685],[.4731,.6111,.9706],[.4785,.6166,.9727],[.4839,.622,.9748],[.4892,.6275,.9769],[.4946,.633,.979],[.5,.6385,.9811],[.5054,.644,.9832],[.5108,.6494,.9851],[.5163,.6545,.9864],[.5217,.6596,.9877],[.5271,.6647,.9891],[.5326,.6698,.9904],[.538,.6749,.9917],[.5434,.68,.9931],[.5489,.6851,.9944],[.5543,.6901,.9955],[.5597,.6948,.9961],[.5652,.6994,.9966],[.5706,.7041,.9972],[.5761,.7088,.9978],[.5815,.7135,.9983],[.5869,.7181,.9989],[.5924,.7228,.9994],[.5978,.7273,.9998],[.6032,.7315,.9996],[.6085,.7357,.9994],[.6139,.7399,.9991],[.6193,.7441,.9989],[.6247,.7483,.9987],[.6301,.7525,.9985],[.6355,.7567,.9983],[.6408,.7608,.9978],[.6461,.7644,.9969],[.6514,.7681,.9959],[.6567,.7718,.9949],[.662,.7755,.9939],[.6673,.7792,.993],[.6725,.7829,.992],[.6778,.7865,.991],[.6831,.79,.9898],[.6882,.7932,.988],[.6933,.7963,.9863],[.6985,.7994,.9846],[.7036,.8026,.9828],[.7087,.8057,.9811],[.7139,.8089,.9794],[.719,.812,.9777],[.724,.8149,.9757],[.729,.8175,.9732],[.7339,.82,.9707],[.7388,.8226,.9683],[.7438,.8251,.9658],[.7487,.8277,.9633],[.7536,.8302,.9609],[.7585,.8328,.9584],[.7634,.8351,.9557],[.768,.837,.9525],[.7727,.839,.9493],[.7774,.8409,.9461],[.782,.8429,.943],[.7867,.8448,.9398],[.7914,.8468,.9366],[.7961,.8487,.9335],[.8006,.8504,.93],[.805,.8517,.9262],[.8093,.853,.9223],[.8137,.8543,.9185],[.8181,.8556,.9146],[.8224,.8569,.9108],[.8268,.8582,.907],[.8311,.8595,.9031],[.8353,.8605,.899],[.8394,.8612,.8945],[.8434,.8618,.89],[.8474,.8625,.8855],[.8514,.8631,.8811],[.8554,.8638,.8766],[.8594,.8644,.8721],[.8634,.8651,.8676],[.8674,.8644,.8626],[.8715,.8623,.857],[.8756,.8602,.8514],[.8796,.8582,.8458],[.8837,.8561,.8403],[.8878,.854,.8347],[.8918,.852,.8291],[.8959,.8499,.8235],[.8995,.8475,.8178],[.9028,.8448,.812],[.9062,.8421,.8062],[.9095,.8394,.8003],[.9128,.8367,.7945],[.9161,.834,.7887],[.9194,.8313,.7829],[.9227,.8286,.7771],[.9256,.8255,.7711],[.9281,.8222,.7651],[.9307,.8189,.7591],[.9332,.8156,.7532],[.9358,.8122,.7472],[.9383,.8089,.7412],[.9409,.8056,.7352],[.9434,.8023,.7292],[.9455,.7986,.7231],[.9473,.7947,.717],[.9492,.7908,.7109],[.951,.7869,.7048],[.9528,.783,.6986],[.9546,.7791,.6925],[.9564,.7751,.6864],[.9582,.7712,.6803],[.9595,.767,.6741],[.9606,.7625,.668],[.9616,.758,.6618],[.9627,.7536,.6556],[.9638,.7491,.6494],[.9648,.7446,.6432],[.9659,.7401,.6371],[.967,.7357,.6309],[.9675,.7308,.6247],[.9679,.7258,.6185],[.9682,.7208,.6123],[.9685,.7158,.6061],[.9689,.7108,.5999],[.9692,.7058,.5937],[.9695,.7008,.5875],[.9699,.6958,.5813],[.9697,.6905,.5751],[.9693,.685,.569],[.9689,.6795,.5628],[.9685,.674,.5566],[.9681,.6685,.5505],[.9677,.663,.5443],[.9673,.6575,.5382],[.9669,.652,.532],[.966,.6461,.5259],[.9649,.6402,.5198],[.9638,.6342,.5137],[.9627,.6282,.5076],[.9616,.6222,.5016],[.9605,.6163,.4955],[.9594,.6103,.4894],[.9583,.6043,.4833],[.9567,.598,.4773],[.9549,.5916,.4713],[.9531,.5852,.4654],[.9513,.5788,.4594],[.9495,.5724,.4534],[.9477,.566,.4475],[.9459,.5596,.4415],[.9441,.5532,.4355],[.9417,.5464,.4297],[.9393,.5396,.4239],[.9368,.5327,.4181],[.9343,.5259,.4123],[.9318,.5191,.4065],[.9294,.5123,.4007],[.9269,.5054,.3949],[.9244,.4986,.3891],[.9214,.4914,.3834],[.9183,.4842,.3778],[.9152,.4769,.3722],[.912,.4697,.3666],[.9089,.4624,.361],[.9058,.4552,.3553],[.9027,.4479,.3497],[.8995,.4407,.3441],[.8959,.4331,.3387],[.8921,.4254,.3333],[.8884,.4177,.3279],[.8846,.41,.3225],[.8809,.4023,.3171],[.8771,.3946,.3117],[.8734,.387,.3063],[.8697,.3793,.3009],[.8654,.3711,.2958],[.8611,.3629,.2906],[.8567,.3547,.2855],[.8524,.3465,.2803],[.848,.3383,.2752],[.8437,.3301,.2701],[.8394,.3219,.2649],[.835,.3136,.2598],[.8302,.3047,.2549],[.8253,.2957,.25],[.8204,.2868,.2452],[.8155,.2778,.2403],[.8106,.2688,.2354],[.8057,.2598,.2306],[.8008,.2508,.2257],[.7959,.2418,.2208],[.7906,.2314,.2162],[.7852,.2209,.2117],[.7797,.2103,.2071],[.7743,.1998,.2025],[.7689,.1892,.198],[.7635,.1787,.1934],[.7581,.1681,.1888],[.7527,.1576,.1843],[.7468,.14,.18],[.741,.1222,.1757],[.7351,.1045,.1715],[.7292,.0867,.1672],[.7233,.0689,.163],[.7174,.0511,.1587],[.7116,.0333,.1545],[.7057,.0156,.1502]]},copper:{interpolate:!0,colors:[[0,0,0],[.0048,.0031,.002],[.0097,.0061,.0039],[.0145,.0092,.0059],[.0194,.0123,.0078],[.0242,.0153,.0098],[.0291,.0184,.0117],[.0339,.0214,.0137],[.0388,.0245,.0156],[.0436,.0276,.0176],[.0484,.0306,.0195],[.0533,.0337,.0215],[.0581,.0368,.0234],[.063,.0398,.0254],[.0678,.0429,.0273],[.0727,.046,.0293],[.0775,.049,.0312],[.0824,.0521,.0332],[.0872,.0551,.0351],[.092,.0582,.0371],[.0969,.0613,.039],[.1017,.0643,.041],[.1066,.0674,.0429],[.1114,.0705,.0449],[.1163,.0735,.0468],[.1211,.0766,.0488],[.126,.0797,.0507],[.1308,.0827,.0527],[.1356,.0858,.0546],[.1405,.0888,.0566],[.1453,.0919,.0585],[.1502,.095,.0605],[.155,.098,.0624],[.1599,.1011,.0644],[.1647,.1042,.0663],[.1696,.1072,.0683],[.1744,.1103,.0702],[.1792,.1134,.0722],[.1841,.1164,.0741],[.1889,.1195,.0761],[.1938,.1225,.078],[.1986,.1256,.08],[.2035,.1287,.0819],[.2083,.1317,.0839],[.2131,.1348,.0858],[.218,.1379,.0878],[.2228,.1409,.0897],[.2277,.144,.0917],[.2325,.147,.0936],[.2374,.1501,.0956],[.2422,.1532,.0975],[.2471,.1562,.0995],[.2519,.1593,.1015],[.2567,.1624,.1034],[.2616,.1654,.1054],[.2664,.1685,.1073],[.2713,.1716,.1093],[.2761,.1746,.1112],[.281,.1777,.1132],[.2858,.1807,.1151],[.2907,.1838,.1171],[.2955,.1869,.119],[.3003,.1899,.121],[.3052,.193,.1229],[.31,.1961,.1249],[.3149,.1991,.1268],[.3197,.2022,.1288],[.3246,.2053,.1307],[.3294,.2083,.1327],[.3343,.2114,.1346],[.3391,.2144,.1366],[.3439,.2175,.1385],[.3488,.2206,.1405],[.3536,.2236,.1424],[.3585,.2267,.1444],[.3633,.2298,.1463],[.3682,.2328,.1483],[.373,.2359,.1502],[.3779,.239,.1522],[.3827,.242,.1541],[.3875,.2451,.1561],[.3924,.2481,.158],[.3972,.2512,.16],[.4021,.2543,.1619],[.4069,.2573,.1639],[.4118,.2604,.1658],[.4166,.2635,.1678],[.4215,.2665,.1697],[.4263,.2696,.1717],[.4311,.2727,.1736],[.436,.2757,.1756],[.4408,.2788,.1775],[.4457,.2818,.1795],[.4505,.2849,.1814],[.4554,.288,.1834],[.4602,.291,.1853],[.4651,.2941,.1873],[.4699,.2972,.1892],[.4747,.3002,.1912],[.4796,.3033,.1931],[.4844,.3064,.1951],[.4893,.3094,.197],[.4941,.3125,.199],[.499,.3155,.201],[.5038,.3186,.2029],[.5087,.3217,.2049],[.5135,.3247,.2068],[.5183,.3278,.2088],[.5232,.3309,.2107],[.528,.3339,.2127],[.5329,.337,.2146],[.5377,.3401,.2166],[.5426,.3431,.2185],[.5474,.3462,.2205],[.5522,.3492,.2224],[.5571,.3523,.2244],[.5619,.3554,.2263],[.5668,.3584,.2283],[.5716,.3615,.2302],[.5765,.3646,.2322],[.5813,.3676,.2341],[.5862,.3707,.2361],[.591,.3738,.238],[.5958,.3768,.24],[.6007,.3799,.2419],[.6055,.3829,.2439],[.6104,.386,.2458],[.6152,.3891,.2478],[.6201,.3921,.2497],[.6249,.3952,.2517],[.6298,.3983,.2536],[.6346,.4013,.2556],[.6394,.4044,.2575],[.6443,.4074,.2595],[.6491,.4105,.2614],[.654,.4136,.2634],[.6588,.4166,.2653],[.6637,.4197,.2673],[.6685,.4228,.2692],[.6734,.4258,.2712],[.6782,.4289,.2731],[.683,.432,.2751],[.6879,.435,.277],[.6927,.4381,.279],[.6976,.4411,.2809],[.7024,.4442,.2829],[.7073,.4473,.2848],[.7121,.4503,.2868],[.717,.4534,.2887],[.7218,.4565,.2907],[.7266,.4595,.2926],[.7315,.4626,.2946],[.7363,.4657,.2965],[.7412,.4687,.2985],[.746,.4718,.3005],[.7509,.4748,.3024],[.7557,.4779,.3044],[.7606,.481,.3063],[.7654,.484,.3083],[.7702,.4871,.3102],[.7751,.4902,.3122],[.7799,.4932,.3141],[.7848,.4963,.3161],[.7896,.4994,.318],[.7945,.5024,.32],[.7993,.5055,.3219],[.8042,.5085,.3239],[.809,.5116,.3258],[.8138,.5147,.3278],[.8187,.5177,.3297],[.8235,.5208,.3317],[.8284,.5239,.3336],[.8332,.5269,.3356],[.8381,.53,.3375],[.8429,.5331,.3395],[.8478,.5361,.3414],[.8526,.5392,.3434],[.8574,.5422,.3453],[.8623,.5453,.3473],[.8671,.5484,.3492],[.872,.5514,.3512],[.8768,.5545,.3531],[.8817,.5576,.3551],[.8865,.5606,.357],[.8913,.5637,.359],[.8962,.5668,.3609],[.901,.5698,.3629],[.9059,.5729,.3648],[.9107,.5759,.3668],[.9156,.579,.3687],[.9204,.5821,.3707],[.9253,.5851,.3726],[.9301,.5882,.3746],[.9349,.5913,.3765],[.9398,.5943,.3785],[.9446,.5974,.3804],[.9495,.6005,.3824],[.9543,.6035,.3843],[.9592,.6066,.3863],[.964,.6096,.3882],[.9689,.6127,.3902],[.9737,.6158,.3921],[.9785,.6188,.3941],[.9834,.6219,.396],[.9882,.625,.398],[.9931,.628,.4],[.9979,.6311,.4019],[1,.6342,.4039],[1,.6372,.4058],[1,.6403,.4078],[1,.6433,.4097],[1,.6464,.4117],[1,.6495,.4136],[1,.6525,.4156],[1,.6556,.4175],[1,.6587,.4195],[1,.6617,.4214],[1,.6648,.4234],[1,.6678,.4253],[1,.6709,.4273],[1,.674,.4292],[1,.677,.4312],[1,.6801,.4331],[1,.6832,.4351],[1,.6862,.437],[1,.6893,.439],[1,.6924,.4409],[1,.6954,.4429],[1,.6985,.4448],[1,.7015,.4468],[1,.7046,.4487],[1,.7077,.4507],[1,.7107,.4526],[1,.7138,.4546],[1,.7169,.4565],[1,.7199,.4585],[1,.723,.4604],[1,.7261,.4624],[1,.7291,.4643],[1,.7322,.4663],[1,.7352,.4682],[1,.7383,.4702],[1,.7414,.4721],[1,.7444,.4741],[1,.7475,.476],[1,.7506,.478],[1,.7536,.4799],[1,.7567,.4819],[1,.7598,.4838],[1,.7628,.4858],[1,.7659,.4877],[1,.7689,.4897],[1,.772,.4916],[1,.7751,.4936],[1,.7781,.4955],[1,.7812,.4975]]},cubehelix:{interpolate:!0,colors:[[0,0,0],[.0067,.0021,.006],[.0133,.0043,.0122],[.0196,.0065,.0186],[.0257,.0088,.0252],[.0317,.0112,.0319],[.0374,.0136,.0389],[.0429,.0161,.046],[.0482,.0187,.0533],[.0533,.0214,.0607],[.0581,.0242,.0682],[.0627,.0271,.0758],[.067,.0301,.0835],[.0711,.0332,.0912],[.0749,.0365,.0991],[.0785,.0398,.1069],[.0819,.0433,.1148],[.085,.0469,.1227],[.0879,.0506,.1306],[.0905,.0545,.1385],[.0928,.0584,.1464],[.095,.0625,.1542],[.0969,.0668,.1619],[.0985,.0712,.1696],[.1,.0757,.1771],[.1012,.0803,.1846],[.1022,.0851,.192],[.103,.09,.1992],[.1036,.095,.2062],[.104,.1001,.2131],[.1043,.1054,.2199],[.1043,.1108,.2264],[.1042,.1163,.2328],[.1039,.122,.2389],[.1035,.1277,.2448],[.103,.1336,.2505],[.1023,.1395,.256],[.1015,.1456,.2612],[.1007,.1518,.2662],[.0997,.158,.2709],[.0987,.1644,.2754],[.0976,.1708,.2796],[.0964,.1773,.2835],[.0952,.1839,.2871],[.094,.1905,.2904],[.0928,.1972,.2935],[.0916,.2039,.2962],[.0904,.2107,.2987],[.0892,.2176,.3009],[.0881,.2244,.3027],[.0871,.2313,.3043],[.0861,.2382,.3056],[.0851,.2452,.3066],[.0843,.2521,.3073],[.0836,.259,.3077],[.083,.2659,.3079],[.0826,.2728,.3077],[.0823,.2797,.3073],[.0821,.2866,.3066],[.0822,.2934,.3057],[.0824,.3001,.3045],[.0828,.3069,.303],[.0834,.3135,.3014],[.0842,.3201,.2994],[.0852,.3266,.2973],[.0865,.3331,.295],[.088,.3394,.2924],[.0898,.3457,.2897],[.0918,.3518,.2868],[.0941,.3579,.2838],[.0966,.3638,.2806],[.0994,.3697,.2772],[.1025,.3754,.2737],[.1059,.381,.2702],[.1096,.3864,.2665],[.1136,.3918,.2627],[.1179,.3969,.2589],[.1225,.402,.255],[.1274,.4069,.2511],[.1325,.4116,.2471],[.138,.4162,.2431],[.1438,.4207,.2392],[.1499,.4249,.2352],[.1563,.4291,.2313],[.163,.433,.2275],[.17,.4368,.2237],[.1773,.4404,.22],[.1849,.4439,.2164],[.1928,.4472,.2129],[.201,.4503,.2096],[.2094,.4533,.2064],[.2181,.4561,.2033],[.2271,.4587,.2004],[.2363,.4611,.1977],[.2457,.4634,.1952],[.2555,.4656,.1929],[.2654,.4676,.1908],[.2755,.4694,.189],[.2859,.4711,.1874],[.2965,.4726,.1861],[.3072,.474,.185],[.3182,.4752,.1842],[.3293,.4763,.1837],[.3405,.4772,.1835],[.3519,.4781,.1836],[.3635,.4788,.1841],[.3751,.4794,.1848],[.3869,.4798,.1859],[.3987,.4802,.1873],[.4106,.4804,.1891],[.4226,.4806,.1912],[.4346,.4807,.1937],[.4467,.4807,.1965],[.4588,.4806,.1997],[.4709,.4804,.2033],[.4829,.4802,.2072],[.495,.4799,.2115],[.507,.4796,.2161],[.519,.4792,.2211],[.5309,.4788,.2265],[.5427,.4784,.2322],[.5544,.4779,.2383],[.5661,.4774,.2448],[.5776,.477,.2516],[.5889,.4765,.2587],[.6002,.476,.2662],[.6112,.4756,.2741],[.6221,.4752,.2822],[.6328,.4748,.2907],[.6434,.4745,.2995],[.6537,.4742,.3086],[.6638,.4739,.318],[.6736,.4738,.3277],[.6832,.4737,.3376],[.6926,.4736,.3478],[.7017,.4737,.3583],[.7106,.4738,.369],[.7192,.4741,.38],[.7274,.4744,.3912],[.7355,.4749,.4025],[.7432,.4755,.4141],[.7506,.4761,.4258],[.7577,.477,.4378],[.7645,.4779,.4498],[.7709,.479,.462],[.7771,.4802,.4743],[.7829,.4816,.4867],[.7884,.4831,.4992],[.7936,.4848,.5118],[.7985,.4866,.5244],[.803,.4886,.5371],[.8072,.4907,.5498],[.8111,.493,.5625],[.8146,.4955,.5753],[.8179,.4981,.5879],[.8208,.5009,.6006],[.8234,.5039,.6132],[.8256,.5071,.6257],[.8276,.5104,.6382],[.8293,.5139,.6506],[.8307,.5175,.6628],[.8318,.5213,.6749],[.8326,.5253,.6869],[.8331,.5295,.6988],[.8334,.5338,.7104],[.8334,.5383,.7219],[.8332,.543,.7332],[.8327,.5478,.7443],[.832,.5528,.7552],[.8311,.5579,.7659],[.83,.5632,.7763],[.8286,.5686,.7864],[.8271,.5742,.7964],[.8254,.5799,.806],[.8236,.5857,.8154],[.8216,.5917,.8245],[.8195,.5978,.8333],[.8172,.604,.8418],[.8149,.6103,.85],[.8124,.6167,.8579],[.8099,.6233,.8654],[.8073,.6299,.8727],[.8046,.6366,.8797],[.8019,.6434,.8863],[.7992,.6502,.8926],[.7964,.6571,.8986],[.7937,.6641,.9042],[.791,.6712,.9096],[.7883,.6783,.9146],[.7856,.6854,.9193],[.783,.6926,.9236],[.7804,.6997,.9277],[.778,.7069,.9314],[.7756,.7142,.9349],[.7733,.7214,.938],[.7711,.7286,.9409],[.7691,.7358,.9434],[.7672,.743,.9457],[.7655,.7501,.9477],[.7639,.7573,.9494],[.7625,.7644,.9509],[.7613,.7714,.9521],[.7602,.7784,.9531],[.7594,.7853,.9538],[.7587,.7922,.9544],[.7583,.799,.9547],[.7581,.8057,.9549],[.7581,.8124,.9548],[.7584,.8189,.9546],[.7588,.8254,.9543],[.7596,.8318,.9538],[.7606,.838,.9531],[.7618,.8442,.9524],[.7633,.8502,.9516],[.765,.8562,.9506],[.767,.862,.9496],[.7693,.8677,.9486],[.7718,.8733,.9475],[.7745,.8787,.9463],[.7776,.884,.9452],[.7808,.8892,.9441],[.7844,.8943,.9429],[.7882,.8992,.9419],[.7922,.904,.9408],[.7965,.9087,.9398],[.801,.9132,.9389],[.8057,.9176,.9381],[.8107,.9218,.9374],[.8158,.926,.9368],[.8212,.93,.9363],[.8268,.9338,.936],[.8326,.9376,.9358],[.8386,.9412,.9358],[.8447,.9447,.9359],[.851,.9481,.9363],[.8575,.9513,.9368],[.8641,.9545,.9376],[.8708,.9575,.9386],[.8777,.9604,.9397],[.8847,.9633,.9412],[.8917,.966,.9429],[.8989,.9687,.9448],[.9061,.9712,.947],[.9134,.9737,.9494],[.9207,.9761,.9521],[.928,.9785,.9551],[.9354,.9808,.9583],[.9428,.983,.9619],[.9501,.9852,.9657],[.9574,.9874,.9697],[.9647,.9895,.9741],[.9719,.9917,.9787],[.9791,.9937,.9836],[.9862,.9958,.9888],[.9931,.9979,.9943],[1,1,1]]},flag:{interpolate:!0,colors:[[1,0,0],[1,.3784,.2098],[1,.7005,.4931],[1,.9185,.7774],[1,.9998,1],[.8029,.9325,1],[.5208,.7264,1],[.2355,.4124,1],[0,.037,1],[0,0,.8156],[0,0,.5346],[0,0,.2486],[0,0,0],[.1719,0,0],[.4515,0,0],[.7383,0,0],[.9897,0,0],[1,.309,.1595],[1,.6459,.4377],[1,.8868,.7252],[1,.9957,.9791],[.8528,.9566,1],[.5761,.7752,1],[.2881,.4785,1],[.0316,.1107,1],[0,0,.865],[0,0,.5899],[0,0,.3014],[0,0,.0425],[.123,0,0],[.3964,0,0],[.6852,0,0],[.9464,0,0],[1,.2379,.1111],[1,.5878,.3827],[1,.8502,.6717],[1,.9862,.9352],[.9007,.9755,1],[.631,.8197,1],[.3418,.5421,1],[.0761,.1837,1],[0,0,.9123],[0,0,.6446],[0,0,.3554],[0,0,.0877],[.0761,0,0],[.3418,0,0],[.631,0,0],[.9007,0,0],[1,.1656,.0648],[1,.5264,.3283],[1,.809,.6173],[1,.9713,.8889],[.9464,.9891,1],[.6852,.8598,1],[.3964,.6026,1],[.123,.2558,1],[0,0,.9575],[0,0,.6986],[0,0,.4101],[0,0,.135],[.0316,0,0],[.2881,0,0],[.5761,0,0],[.8528,0,0],[1,.0923,.0209],[1,.4622,.2748],[1,.7634,.5623],[1,.9511,.8405],[.9897,.9973,1],[.7383,.8952,1],[.4515,.6599,1],[.1719,.3265,1],[0,0,1],[0,0,.7514],[0,0,.4654],[0,0,.1844],[0,0,0],[.2355,0,0],[.5208,0,0],[.8029,0,0],[1,.0185,0],[1,.3955,.2226],[1,.7136,.5069],[1,.9256,.7902],[1,1,1],[.7902,.9256,1],[.5069,.7136,1],[.2226,.3955,1],[0,.0185,1],[0,0,.8029],[0,0,.5208],[0,0,.2355],[0,0,0],[.1844,0,0],[.4654,0,0],[.7514,0,0],[1,0,0],[1,.3265,.1719],[1,.6599,.4515],[1,.8952,.7383],[1,.9973,.9897],[.8405,.9511,1],[.5623,.7634,1],[.2748,.4622,1],[.0209,.0923,1],[0,0,.8528],[0,0,.5761],[0,0,.2881],[0,0,.0316],[.135,0,0],[.4101,0,0],[.6986,0,0],[.9575,0,0],[1,.2558,.123],[1,.6026,.3964],[1,.8598,.6852],[1,.9891,.9464],[.8889,.9713,1],[.6173,.809,1],[.3283,.5264,1],[.0648,.1656,1],[0,0,.9007],[0,0,.631],[0,0,.3418],[0,0,.0761],[.0877,0,0],[.3554,0,0],[.6446,0,0],[.9123,0,0],[1,.1837,.0761],[1,.5421,.3418],[1,.8197,.631],[1,.9755,.9007],[.9352,.9862,1],[.6717,.8502,1],[.3827,.5878,1],[.1111,.2379,1],[0,0,.9464],[0,0,.6852],[0,0,.3964],[0,0,.123],[.0425,0,0],[.3014,0,0],[.5899,0,0],[.865,0,0],[1,.1107,.0316],[1,.4785,.2881],[1,.7752,.5761],[1,.9566,.8528],[.9791,.9957,1],[.7252,.8868,1],[.4377,.6459,1],[.1595,.309,1],[0,0,.9897],[0,0,.7383],[0,0,.4515],[0,0,.1719],[0,0,0],[.2486,0,0],[.5346,0,0],[.8156,0,0],[1,.037,0],[1,.4124,.2355],[1,.7264,.5208],[1,.9325,.8029],[1,.9998,1],[.7774,.9185,1],[.4931,.7005,1],[.2098,.3784,1],[0,0,1],[0,0,.7902],[0,0,.5069],[0,0,.2226],[0,0,0],[.1971,0,0],[.4792,0,0],[.7645,0,0],[1,0,0],[1,.3439,.1844],[1,.6737,.4654],[1,.9032,.7514],[1,.9985,1],[.8281,.9452,1],[.5485,.7513,1],[.2617,.4457,1],[.0103,.0739,1],[0,0,.8405],[0,0,.5623],[0,0,.2748],[0,0,.0209],[.1472,0,0],[.4239,0,0],[.7119,0,0],[.9684,0,0],[1,.2737,.135],[1,.6173,.4101],[1,.8691,.6986],[1,.9916,.9575],[.877,.9667,1],[.6036,.798,1],[.3148,.5106,1],[.0536,.1473,1],[0,0,.8889],[0,0,.6173],[0,0,.3283],[0,0,.0648],[.0993,0,0],[.369,0,0],[.6582,0,0],[.9239,0,0],[1,.2019,.0877],[1,.5575,.3554],[1,.8302,.6446],[1,.9794,.9123],[.9239,.983,1],[.6582,.8403,1],[.369,.5727,1],[.0993,.2199,1],[0,0,.9352],[0,0,.6717],[0,0,.3827],[0,0,.1111],[.0536,0,0],[.3148,0,0],[.6036,0,0],[.877,0,0],[1,.129,.0425],[1,.4947,.3014],[1,.7867,.5899],[1,.9618,.865],[.9684,.9939,1],[.7119,.8781,1],[.4239,.6317,1],[.1472,.2914,1],[0,0,.9791],[0,0,.7252],[0,0,.4377],[0,0,.1595],[.0103,0,0],[.2617,0,0],[.5485,0,0],[.8281,0,0],[1,.0554,0],[1,.4291,.2486],[1,.739,.5346],[1,.939,.8156],[1,.9993,1],[.7645,.911,1],[.4792,.6872,1],[.1971,.3612,1],[0,0,1],[0,0,.7774],[0,0,.4931],[0,0,.2098],[0,0,0]]},gist_earth:{interpolate:!0,colors:[[0,0,0],[.0026,0,.1687],[.0052,0,.2217],[.0078,0,.2638],[.0105,0,.3059],[.0131,0,.3481],[.0157,0,.3902],[.0183,0,.4324],[.0209,.0089,.4547],[.0235,.0179,.4556],[.0261,.0269,.4563],[.0287,.036,.457],[.0314,.045,.4577],[.034,.054,.4584],[.0366,.063,.4592],[.0392,.072,.4599],[.0418,.0811,.4606],[.0444,.0901,.4613],[.047,.0991,.462],[.0497,.1081,.4627],[.0523,.1171,.4634],[.0549,.1262,.4641],[.0575,.1352,.4648],[.0601,.1442,.4656],[.0627,.1532,.4663],[.0653,.1622,.467],[.0679,.1713,.4677],[.0706,.1803,.4684],[.0732,.1893,.4691],[.0758,.1975,.4698],[.0784,.2056,.4705],[.081,.2138,.4712],[.0836,.2219,.472],[.0862,.2301,.4727],[.0889,.2383,.4734],[.0915,.2464,.4741],[.0941,.2546,.4748],[.0967,.2627,.4755],[.0993,.2709,.4762],[.1019,.279,.4769],[.1045,.2872,.4776],[.1072,.2954,.4784],[.1098,.3035,.4791],[.1124,.3108,.4798],[.115,.3182,.4805],[.1176,.3255,.4812],[.1202,.3328,.4819],[.1228,.3402,.4826],[.1254,.3475,.4833],[.1281,.3548,.484],[.1307,.3622,.4848],[.1333,.3695,.4855],[.1359,.3768,.4862],[.1385,.3842,.4869],[.1411,.3904,.4876],[.1437,.3966,.4883],[.1464,.4028,.489],[.149,.409,.4897],[.1516,.4152,.4904],[.1542,.4214,.4912],[.1568,.4276,.4919],[.1594,.4338,.4926],[.162,.4399,.4933],[.1646,.4461,.494],[.1673,.4523,.4947],[.1699,.4585,.4954],[.1725,.4647,.4961],[.1751,.4709,.4968],[.1777,.4771,.4975],[.1803,.4833,.4983],[.1829,.4895,.499],[.1856,.4957,.4997],[.1882,.5019,.5004],[.19,.5042,.4957],[.1919,.5065,.4909],[.1937,.5087,.4861],[.1956,.511,.4813],[.1974,.5133,.4765],[.1993,.5155,.4717],[.2011,.5178,.4669],[.203,.52,.4621],[.2048,.5223,.4573],[.2067,.5245,.4525],[.2085,.5268,.4477],[.2104,.5291,.4429],[.2122,.5313,.4381],[.2141,.5336,.4333],[.2159,.5358,.4285],[.2178,.5381,.4237],[.2196,.5404,.4189],[.2215,.5426,.4141],[.2233,.5449,.4093],[.2252,.5471,.4045],[.227,.5494,.3997],[.2289,.5516,.3948],[.2307,.5539,.39],[.2326,.5562,.3852],[.2344,.5584,.3804],[.2363,.5607,.3756],[.2381,.5629,.3708],[.24,.5652,.366],[.2418,.5674,.3612],[.2437,.5697,.3564],[.2455,.572,.3516],[.2474,.5742,.3468],[.2492,.5765,.342],[.2511,.5787,.3372],[.2529,.581,.3324],[.2548,.5832,.3276],[.2566,.5855,.3228],[.2585,.5878,.318],[.2603,.59,.3132],[.2622,.5923,.3084],[.264,.5945,.3036],[.2659,.5968,.2988],[.2677,.599,.294],[.2696,.6013,.2892],[.2715,.6036,.2844],[.2802,.6058,.2796],[.2889,.6081,.2748],[.2976,.6103,.2771],[.3063,.6126,.2794],[.315,.6148,.2816],[.3238,.6171,.2839],[.3325,.6194,.2862],[.3412,.6216,.2885],[.3499,.6239,.2908],[.3586,.6261,.2931],[.3673,.6284,.2954],[.3761,.6307,.2976],[.3848,.6329,.2999],[.3935,.6352,.3022],[.4022,.6374,.3045],[.4109,.6397,.3068],[.4196,.6414,.3091],[.4284,.6431,.3114],[.4371,.6448,.3136],[.4458,.6466,.3159],[.4545,.6483,.3182],[.4632,.65,.3205],[.4719,.6517,.3217],[.4784,.6535,.323],[.4849,.6552,.3242],[.4913,.6569,.3255],[.4978,.6586,.3267],[.5043,.6603,.3279],[.5107,.6621,.3292],[.5172,.6638,.3304],[.5237,.6655,.3317],[.5301,.6672,.3329],[.5366,.6689,.3341],[.5431,.6707,.3354],[.5495,.6724,.3366],[.556,.6741,.3379],[.5625,.6758,.3391],[.5689,.6775,.3403],[.5754,.6793,.3416],[.5819,.681,.3428],[.5883,.6827,.344],[.5948,.6844,.3453],[.6013,.6861,.3465],[.6077,.6879,.3478],[.6142,.6896,.349],[.6207,.6913,.3502],[.6271,.693,.3515],[.6336,.6947,.3527],[.6401,.6965,.354],[.6465,.6982,.3552],[.653,.6999,.3564],[.6595,.7016,.3577],[.6659,.7034,.3589],[.6724,.7051,.3602],[.6789,.7068,.3614],[.6853,.7085,.3626],[.6918,.7102,.3639],[.6983,.712,.3651],[.7047,.7137,.3664],[.7112,.7154,.3676],[.7176,.7171,.3688],[.7193,.7137,.3701],[.7209,.7103,.3713],[.7225,.7069,.3726],[.7242,.7035,.3738],[.7258,.7001,.375],[.7275,.6967,.3763],[.7291,.6934,.3775],[.7307,.69,.3788],[.7324,.6866,.38],[.734,.6832,.3812],[.7356,.6798,.3825],[.7373,.6764,.3837],[.7389,.673,.3849],[.7406,.6697,.3862],[.7422,.6663,.3874],[.7438,.6629,.3887],[.7455,.6595,.3899],[.7471,.6561,.3911],[.7488,.6527,.3924],[.7504,.6493,.3936],[.752,.6459,.3949],[.7537,.6426,.3961],[.7553,.6392,.4057],[.7597,.6413,.4153],[.7641,.643,.425],[.7685,.6447,.4346],[.7729,.6464,.4442],[.7773,.6481,.4538],[.7817,.6515,.4634],[.786,.6549,.473],[.7904,.6583,.4826],[.7948,.6617,.4922],[.7992,.6651,.5018],[.8036,.6685,.5114],[.808,.6719,.521],[.8124,.6753,.5306],[.8167,.6787,.5402],[.8211,.6821,.5499],[.8255,.6855,.5595],[.8299,.6889,.5691],[.8343,.6923,.5787],[.8387,.6957,.5883],[.8431,.6991,.5979],[.8475,.7047,.6075],[.8518,.7103,.6171],[.8562,.7159,.6267],[.8606,.7215,.6363],[.865,.7269,.6459],[.8694,.7323,.6555],[.8738,.7377,.6652],[.8782,.7431,.677],[.8825,.7507,.6888],[.8869,.7584,.7006],[.8913,.7661,.7124],[.8957,.7738,.7243],[.9001,.7814,.7361],[.9045,.7891,.7479],[.9089,.7968,.7597],[.9132,.8044,.7715],[.9176,.8121,.7834],[.922,.8198,.7952],[.9264,.8275,.807],[.9308,.8364,.8188],[.9352,.8454,.8306],[.9396,.8544,.8425],[.944,.8634,.8543],[.9483,.8725,.8661],[.9527,.8816,.8779],[.9571,.8931,.8897],[.9615,.9045,.9016],[.9659,.916,.9134],[.9703,.9274,.9252],[.9747,.9389,.937],[.979,.9503,.9488],[.9834,.9618,.9607],[.9878,.9732,.9725],[.9922,.9843,.9843]]},gist_gray:{interpolate:!0,colors:[[0,0,0],[.0039,.0039,.0039],[.0078,.0078,.0078],[.0118,.0118,.0118],[.0157,.0157,.0157],[.0196,.0196,.0196],[.0235,.0235,.0235],[.0275,.0275,.0275],[.0314,.0314,.0314],[.0353,.0353,.0353],[.0392,.0392,.0392],[.0431,.0431,.0431],[.0471,.0471,.0471],[.051,.051,.051],[.0549,.0549,.0549],[.0588,.0588,.0588],[.0627,.0627,.0627],[.0667,.0667,.0667],[.0706,.0706,.0706],[.0745,.0745,.0745],[.0784,.0784,.0784],[.0824,.0824,.0824],[.0863,.0863,.0863],[.0902,.0902,.0902],[.0941,.0941,.0941],[.098,.098,.098],[.102,.102,.102],[.1059,.1059,.1059],[.1098,.1098,.1098],[.1137,.1137,.1137],[.1176,.1176,.1176],[.1216,.1216,.1216],[.1255,.1255,.1255],[.1294,.1294,.1294],[.1333,.1333,.1333],[.1373,.1373,.1373],[.1412,.1412,.1412],[.1451,.1451,.1451],[.149,.149,.149],[.1529,.1529,.1529],[.1569,.1569,.1569],[.1608,.1608,.1608],[.1647,.1647,.1647],[.1686,.1686,.1686],[.1725,.1725,.1725],[.1765,.1765,.1765],[.1804,.1804,.1804],[.1843,.1843,.1843],[.1882,.1882,.1882],[.1922,.1922,.1922],[.1961,.1961,.1961],[.2,.2,.2],[.2039,.2039,.2039],[.2078,.2078,.2078],[.2118,.2118,.2118],[.2157,.2157,.2157],[.2196,.2196,.2196],[.2235,.2235,.2235],[.2275,.2275,.2275],[.2314,.2314,.2314],[.2353,.2353,.2353],[.2392,.2392,.2392],[.2431,.2431,.2431],[.2471,.2471,.2471],[.251,.251,.251],[.2549,.2549,.2549],[.2588,.2588,.2588],[.2627,.2627,.2627],[.2667,.2667,.2667],[.2706,.2706,.2706],[.2745,.2745,.2745],[.2784,.2784,.2784],[.2824,.2824,.2824],[.2863,.2863,.2863],[.2902,.2902,.2902],[.2941,.2941,.2941],[.298,.298,.298],[.302,.302,.302],[.3059,.3059,.3059],[.3098,.3098,.3098],[.3137,.3137,.3137],[.3176,.3176,.3176],[.3216,.3216,.3216],[.3255,.3255,.3255],[.3294,.3294,.3294],[.3333,.3333,.3333],[.3373,.3373,.3373],[.3412,.3412,.3412],[.3451,.3451,.3451],[.349,.349,.349],[.3529,.3529,.3529],[.3569,.3569,.3569],[.3608,.3608,.3608],[.3647,.3647,.3647],[.3686,.3686,.3686],[.3725,.3725,.3725],[.3765,.3765,.3765],[.3804,.3804,.3804],[.3843,.3843,.3843],[.3882,.3882,.3882],[.3922,.3922,.3922],[.3961,.3961,.3961],[.4,.4,.4],[.4039,.4039,.4039],[.4078,.4078,.4078],[.4118,.4118,.4118],[.4157,.4157,.4157],[.4196,.4196,.4196],[.4235,.4235,.4235],[.4275,.4275,.4275],[.4314,.4314,.4314],[.4353,.4353,.4353],[.4392,.4392,.4392],[.4431,.4431,.4431],[.4471,.4471,.4471],[.451,.451,.451],[.4549,.4549,.4549],[.4588,.4588,.4588],[.4627,.4627,.4627],[.4667,.4667,.4667],[.4706,.4706,.4706],[.4745,.4745,.4745],[.4784,.4784,.4784],[.4824,.4824,.4824],[.4863,.4863,.4863],[.4902,.4902,.4902],[.4941,.4941,.4941],[.498,.498,.498],[.502,.502,.502],[.5059,.5059,.5059],[.5098,.5098,.5098],[.5137,.5137,.5137],[.5176,.5176,.5176],[.5216,.5216,.5216],[.5255,.5255,.5255],[.5294,.5294,.5294],[.5333,.5333,.5333],[.5373,.5373,.5373],[.5412,.5412,.5412],[.5451,.5451,.5451],[.549,.549,.549],[.5529,.5529,.5529],[.5569,.5569,.5569],[.5608,.5608,.5608],[.5647,.5647,.5647],[.5686,.5686,.5686],[.5725,.5725,.5725],[.5765,.5765,.5765],[.5804,.5804,.5804],[.5843,.5843,.5843],[.5882,.5882,.5882],[.5922,.5922,.5922],[.5961,.5961,.5961],[.6,.6,.6],[.6039,.6039,.6039],[.6078,.6078,.6078],[.6118,.6118,.6118],[.6157,.6157,.6157],[.6196,.6196,.6196],[.6235,.6235,.6235],[.6275,.6275,.6275],[.6314,.6314,.6314],[.6353,.6353,.6353],[.6392,.6392,.6392],[.6431,.6431,.6431],[.6471,.6471,.6471],[.651,.651,.651],[.6549,.6549,.6549],[.6588,.6588,.6588],[.6627,.6627,.6627],[.6667,.6667,.6667],[.6706,.6706,.6706],[.6745,.6745,.6745],[.6784,.6784,.6784],[.6824,.6824,.6824],[.6863,.6863,.6863],[.6902,.6902,.6902],[.6941,.6941,.6941],[.698,.698,.698],[.702,.702,.702],[.7059,.7059,.7059],[.7098,.7098,.7098],[.7137,.7137,.7137],[.7176,.7176,.7176],[.7216,.7216,.7216],[.7255,.7255,.7255],[.7294,.7294,.7294],[.7333,.7333,.7333],[.7373,.7373,.7373],[.7412,.7412,.7412],[.7451,.7451,.7451],[.749,.749,.749],[.7529,.7529,.7529],[.7569,.7569,.7569],[.7608,.7608,.7608],[.7647,.7647,.7647],[.7686,.7686,.7686],[.7725,.7725,.7725],[.7765,.7765,.7765],[.7804,.7804,.7804],[.7843,.7843,.7843],[.7882,.7882,.7882],[.7922,.7922,.7922],[.7961,.7961,.7961],[.8,.8,.8],[.8039,.8039,.8039],[.8078,.8078,.8078],[.8118,.8118,.8118],[.8157,.8157,.8157],[.8196,.8196,.8196],[.8235,.8235,.8235],[.8275,.8275,.8275],[.8314,.8314,.8314],[.8353,.8353,.8353],[.8392,.8392,.8392],[.8431,.8431,.8431],[.8471,.8471,.8471],[.851,.851,.851],[.8549,.8549,.8549],[.8588,.8588,.8588],[.8627,.8627,.8627],[.8667,.8667,.8667],[.8706,.8706,.8706],[.8745,.8745,.8745],[.8784,.8784,.8784],[.8824,.8824,.8824],[.8863,.8863,.8863],[.8902,.8902,.8902],[.8941,.8941,.8941],[.898,.898,.898],[.902,.902,.902],[.9059,.9059,.9059],[.9098,.9098,.9098],[.9137,.9137,.9137],[.9176,.9176,.9176],[.9216,.9216,.9216],[.9255,.9255,.9255],[.9294,.9294,.9294],[.9333,.9333,.9333],[.9373,.9373,.9373],[.9412,.9412,.9412],[.9451,.9451,.9451],[.949,.949,.949],[.9529,.9529,.9529],[.9569,.9569,.9569],[.9608,.9608,.9608],[.9647,.9647,.9647],[.9686,.9686,.9686],[.9725,.9725,.9725],[.9765,.9765,.9765],[.9804,.9804,.9804],[.9843,.9843,.9843],[.9882,.9882,.9882],[.9922,.9922,.9922],[.9961,.9961,.9961],[1,1,1]]},gist_heat:{interpolate:!0,colors:[[0,0,0],[.0059,0,0],[.0118,0,0],[.0176,0,0],[.0235,0,0],[.0294,0,0],[.0353,0,0],[.0412,0,0],[.0471,0,0],[.0529,0,0],[.0588,0,0],[.0647,0,0],[.0706,0,0],[.0765,0,0],[.0824,0,0],[.0882,0,0],[.0941,0,0],[.1,0,0],[.1059,0,0],[.1118,0,0],[.1176,0,0],[.1235,0,0],[.1294,0,0],[.1353,0,0],[.1412,0,0],[.1471,0,0],[.1529,0,0],[.1588,0,0],[.1647,0,0],[.1706,0,0],[.1765,0,0],[.1824,0,0],[.1882,0,0],[.1941,0,0],[.2,0,0],[.2059,0,0],[.2118,0,0],[.2176,0,0],[.2235,0,0],[.2294,0,0],[.2353,0,0],[.2412,0,0],[.2471,0,0],[.2529,0,0],[.2588,0,0],[.2647,0,0],[.2706,0,0],[.2765,0,0],[.2824,0,0],[.2882,0,0],[.2941,0,0],[.3,0,0],[.3059,0,0],[.3118,0,0],[.3176,0,0],[.3235,0,0],[.3294,0,0],[.3353,0,0],[.3412,0,0],[.3471,0,0],[.3529,0,0],[.3588,0,0],[.3647,0,0],[.3706,0,0],[.3765,0,0],[.3824,0,0],[.3882,0,0],[.3941,0,0],[.4,0,0],[.4059,0,0],[.4118,0,0],[.4176,0,0],[.4235,0,0],[.4294,0,0],[.4353,0,0],[.4412,0,0],[.4471,0,0],[.4529,0,0],[.4588,0,0],[.4647,0,0],[.4706,0,0],[.4765,0,0],[.4824,0,0],[.4882,0,0],[.4941,0,0],[.5,0,0],[.5059,0,0],[.5118,0,0],[.5176,0,0],[.5235,0,0],[.5294,0,0],[.5353,0,0],[.5412,0,0],[.5471,0,0],[.5529,0,0],[.5588,0,0],[.5647,0,0],[.5706,0,0],[.5765,0,0],[.5824,0,0],[.5882,0,0],[.5941,0,0],[.6,0,0],[.6059,0,0],[.6118,0,0],[.6176,0,0],[.6235,0,0],[.6294,0,0],[.6353,0,0],[.6412,0,0],[.6471,0,0],[.6529,0,0],[.6588,0,0],[.6647,0,0],[.6706,0,0],[.6765,0,0],[.6824,0,0],[.6882,0,0],[.6941,0,0],[.7,0,0],[.7059,0,0],[.7118,0,0],[.7176,0,0],[.7235,0,0],[.7294,0,0],[.7353,0,0],[.7412,0,0],[.7471,0,0],[.7529,.0039,0],[.7588,.0118,0],[.7647,.0196,0],[.7706,.0275,0],[.7765,.0353,0],[.7824,.0431,0],[.7882,.051,0],[.7941,.0588,0],[.8,.0667,0],[.8059,.0745,0],[.8118,.0824,0],[.8176,.0902,0],[.8235,.098,0],[.8294,.1059,0],[.8353,.1137,0],[.8412,.1216,0],[.8471,.1294,0],[.8529,.1373,0],[.8588,.1451,0],[.8647,.1529,0],[.8706,.1608,0],[.8765,.1686,0],[.8824,.1765,0],[.8882,.1843,0],[.8941,.1922,0],[.9,.2,0],[.9059,.2078,0],[.9118,.2157,0],[.9176,.2235,0],[.9235,.2314,0],[.9294,.2392,0],[.9353,.2471,0],[.9412,.2549,0],[.9471,.2627,0],[.9529,.2706,0],[.9588,.2784,0],[.9647,.2863,0],[.9706,.2941,0],[.9765,.302,0],[.9824,.3098,0],[.9882,.3176,0],[.9941,.3255,0],[1,.3333,0],[1,.3412,0],[1,.349,0],[1,.3569,0],[1,.3647,0],[1,.3725,0],[1,.3804,0],[1,.3882,0],[1,.3961,0],[1,.4039,0],[1,.4118,0],[1,.4196,0],[1,.4275,0],[1,.4353,0],[1,.4431,0],[1,.451,0],[1,.4588,0],[1,.4667,0],[1,.4745,0],[1,.4824,0],[1,.4902,0],[1,.498,0],[1,.5059,.0118],[1,.5137,.0275],[1,.5216,.0431],[1,.5294,.0588],[1,.5373,.0745],[1,.5451,.0902],[1,.5529,.1059],[1,.5608,.1216],[1,.5686,.1373],[1,.5765,.1529],[1,.5843,.1686],[1,.5922,.1843],[1,.6,.2],[1,.6078,.2157],[1,.6157,.2314],[1,.6235,.2471],[1,.6314,.2627],[1,.6392,.2784],[1,.6471,.2941],[1,.6549,.3098],[1,.6627,.3255],[1,.6706,.3412],[1,.6784,.3569],[1,.6863,.3725],[1,.6941,.3882],[1,.702,.4039],[1,.7098,.4196],[1,.7176,.4353],[1,.7255,.451],[1,.7333,.4667],[1,.7412,.4824],[1,.749,.498],[1,.7569,.5137],[1,.7647,.5294],[1,.7725,.5451],[1,.7804,.5608],[1,.7882,.5765],[1,.7961,.5922],[1,.8039,.6078],[1,.8118,.6235],[1,.8196,.6392],[1,.8275,.6549],[1,.8353,.6706],[1,.8431,.6863],[1,.851,.702],[1,.8588,.7176],[1,.8667,.7333],[1,.8745,.749],[1,.8824,.7647],[1,.8902,.7804],[1,.898,.7961],[1,.9059,.8118],[1,.9137,.8275],[1,.9216,.8431],[1,.9294,.8588],[1,.9373,.8745],[1,.9451,.8902],[1,.9529,.9059],[1,.9608,.9216],[1,.9686,.9373],[1,.9765,.9529],[1,.9843,.9686],[1,.9922,.9843],[1,1,1]]},gist_ncar:{interpolate:!0,colors:[[0,0,.502],[0,.0286,.4651],[0,.0572,.4282],[0,.0859,.3913],[0,.1145,.3544],[0,.1431,.3175],[0,.1717,.2806],[0,.2003,.2437],[0,.229,.2069],[0,.2576,.17],[0,.2862,.1331],[0,.3148,.0962],[0,.3434,.0593],[0,.3721,.0224],[0,.3457,.0871],[0,.3192,.1523],[0,.2926,.2175],[0,.266,.2827],[0,.2394,.3479],[0,.2128,.4132],[0,.1862,.4784],[0,.1596,.5436],[0,.1331,.6088],[0,.1065,.674],[0,.0799,.7392],[0,.0533,.8044],[0,.0267,.8696],[0,1e-4,.9349],[0,.0551,1],[0,.1105,1],[0,.1659,1],[0,.2213,1],[0,.2766,1],[0,.332,1],[0,.3874,1],[0,.4428,1],[0,.4982,1],[0,.5535,1],[0,.6089,1],[0,.6643,1],[0,.7197,1],[0,.7536,1],[0,.7752,1],[0,.7925,1],[0,.8098,1],[0,.8271,1],[0,.8444,1],[0,.8617,1],[0,.8789,1],[0,.8962,1],[0,.9135,1],[0,.9308,1],[0,.9481,.9999],[0,.9654,.9741],[0,.9827,.9484],[0,.9999,.9227],[0,.9982,.897],[0,.9964,.8713],[0,.9947,.8456],[0,.9929,.8199],[0,.9911,.7942],[0,.9893,.7685],[0,.9875,.7428],[0,.9857,.717],[0,.984,.6913],[0,.9822,.6656],[0,.9804,.6399],[0,.9804,.614],[0,.9804,.5731],[0,.9804,.5322],[0,.982,.4913],[0,.9837,.4504],[0,.9853,.4095],[0,.9869,.3685],[0,.9886,.3276],[0,.9902,.2867],[0,.9918,.2458],[0,.9935,.2049],[0,.9951,.164],[0,.9967,.1231],[.025,.9984,.0822],[.05,.9998,.0412],[.0749,.9851,3e-4],[.0999,.9703,0],[.1249,.9556,0],[.1499,.9408,0],[.1748,.926,0],[.1998,.9113,0],[.2248,.8965,0],[.2498,.8818,0],[.2747,.867,0],[.2997,.8523,0],[.3247,.8375,0],[.3497,.8228,0],[.3746,.8082,0],[.3994,.821,0],[.4072,.8337,0],[.4149,.8465,0],[.4227,.8593,0],[.4305,.8721,0],[.4382,.8848,0],[.446,.8976,0],[.4538,.9104,0],[.4615,.9232,0],[.4693,.936,0],[.4771,.9487,0],[.4848,.9615,0],[.4926,.9743,.0156],[.5004,.9871,.0312],[.5183,.9998,.0468],[.5361,1,.0624],[.554,1,.078],[.5718,1,.0937],[.5897,1,.1093],[.6075,1,.1249],[.6254,1,.1405],[.6432,1,.1561],[.6611,1,.1718],[.6789,1,.1874],[.6968,1,.203],[.7146,1,.2186],[.7324,1,.2342],[.7503,1,.2185],[.7681,1,.2029],[.786,1,.1873],[.8038,1,.1717],[.8217,1,.1561],[.8395,1,.1404],[.8574,1,.1248],[.8752,1,.1092],[.8931,1,.0936],[.9109,1,.078],[.9288,1,.0623],[.9466,1,.0467],[.9645,.9904,.0311],[.9823,.9807,.0155],[1,.9711,0],[1,.9614,0],[1,.9517,0],[1,.942,0],[1,.9324,0],[1,.9227,0],[1,.913,0],[1,.9034,0],[1,.8937,0],[1,.884,0],[1,.8743,0],[1,.8647,0],[1,.855,0],[1,.8453,.0042],[1,.8357,.0084],[1,.826,.0127],[1,.8163,.0169],[1,.8066,.0211],[1,.797,.0253],[1,.7873,.0295],[1,.7776,.0338],[1,.768,.038],[1,.7583,.0422],[1,.7486,.0464],[1,.7389,.0506],[1,.7293,.0549],[1,.6973,.0513],[1,.6652,.0476],[1,.6331,.0439],[1,.601,.0403],[1,.5688,.0366],[1,.5367,.033],[1,.5046,.0293],[1,.4725,.0256],[1,.4404,.022],[1,.4083,.0183],[1,.3762,.0146],[1,.344,.011],[1,.3119,.0073],[1,.2798,.0037],[1,.2611,0],[1,.2424,0],[1,.2238,0],[1,.2051,0],[1,.1865,0],[1,.1678,0],[1,.1492,0],[1,.1305,0],[1,.1119,0],[1,.0932,0],[1,.0746,0],[1,.056,0],[1,.0373,0],[1,.0187,.0688],[1,0,.1383],[1,0,.2079],[1,0,.2774],[1,0,.347],[1,0,.4166],[1,0,.4861],[1,0,.5557],[1,0,.6252],[1,0,.6948],[1,0,.7644],[1,0,.8339],[1,0,.9035],[1,0,.973],[.9733,.0134,.9868],[.9463,.0269,1],[.9193,.0404,1],[.8922,.0539,1],[.8652,.0674,1],[.8382,.0809,1],[.8112,.0944,1],[.7842,.1079,1],[.7572,.1214,1],[.7301,.1349,1],[.7031,.1484,1],[.6761,.1619,1],[.6491,.1755,1],[.6221,.1987,.9952],[.6448,.2219,.9905],[.668,.2451,.9858],[.6913,.2683,.9811],[.7145,.2915,.9764],[.7378,.3147,.9717],[.761,.3379,.967],[.7843,.3611,.9623],[.8075,.3843,.9576],[.8308,.4075,.9529],[.854,.4307,.9482],[.8772,.4538,.9435],[.9005,.477,.9388],[.9235,.5002,.9341],[.9263,.5183,.9365],[.9291,.5365,.9389],[.9319,.5547,.9413],[.9347,.5728,.9437],[.9375,.591,.946],[.9403,.6092,.9484],[.9431,.6273,.9508],[.9459,.6455,.9532],[.9486,.6637,.9556],[.9514,.6818,.958],[.9542,.7,.9603],[.957,.7182,.9627],[.9598,.7363,.9651],[.9626,.7545,.9675],[.9654,.7727,.9699],[.9682,.7908,.9723],[.971,.809,.9746],[.9738,.8272,.977],[.9766,.8453,.9794],[.9794,.8635,.9818],[.9821,.8817,.9842],[.9849,.8998,.9866],[.9877,.918,.9889],[.9905,.9362,.9913],[.9933,.9543,.9937],[.9961,.9725,.9961]]},gist_rainbow:{interpolate:!0,colors:[[1,0,.16],[1,0,.1391],[1,0,.1182],[1,0,.0973],[1,0,.0763],[1,0,.0554],[1,0,.0345],[1,0,.0136],[1,.0074,0],[1,.0286,0],[1,.0498,0],[1,.071,0],[1,.0922,0],[1,.1134,0],[1,.1346,0],[1,.1558,0],[1,.177,0],[1,.1982,0],[1,.2194,0],[1,.2406,0],[1,.2618,0],[1,.283,0],[1,.3042,0],[1,.3254,0],[1,.3466,0],[1,.3678,0],[1,.389,0],[1,.4102,0],[1,.4314,0],[1,.4526,0],[1,.4738,0],[1,.495,0],[1,.5162,0],[1,.5374,0],[1,.5586,0],[1,.5798,0],[1,.601,0],[1,.6222,0],[1,.6433,0],[1,.6645,0],[1,.6857,0],[1,.7069,0],[1,.7281,0],[1,.7493,0],[1,.7705,0],[1,.7917,0],[1,.8129,0],[1,.8341,0],[1,.8553,0],[1,.8765,0],[1,.8977,0],[1,.9189,0],[1,.9401,0],[1,.9613,0],[1,.9825,0],[.9963,1,0],[.9751,1,0],[.9539,1,0],[.9327,1,0],[.9115,1,0],[.8903,1,0],[.8691,1,0],[.8479,1,0],[.8267,1,0],[.8055,1,0],[.7843,1,0],[.7631,1,0],[.7419,1,0],[.7207,1,0],[.6995,1,0],[.6783,1,0],[.6571,1,0],[.6359,1,0],[.6147,1,0],[.5935,1,0],[.5723,1,0],[.5511,1,0],[.5299,1,0],[.5087,1,0],[.4875,1,0],[.4663,1,0],[.4452,1,0],[.424,1,0],[.4028,1,0],[.3816,1,0],[.3604,1,0],[.3392,1,0],[.318,1,0],[.2968,1,0],[.2756,1,0],[.2544,1,0],[.2332,1,0],[.212,1,0],[.1908,1,0],[.1696,1,0],[.1484,1,0],[.1272,1,0],[.106,1,0],[.0848,1,0],[.0636,1,0],[.0424,1,0],[.0212,1,0],[0,1,0],[0,1,.0211],[0,1,.0422],[0,1,.0633],[0,1,.0843],[0,1,.1054],[0,1,.1265],[0,1,.1476],[0,1,.1687],[0,1,.1898],[0,1,.2108],[0,1,.2319],[0,1,.253],[0,1,.2741],[0,1,.2952],[0,1,.3163],[0,1,.3373],[0,1,.3584],[0,1,.3795],[0,1,.4006],[0,1,.4217],[0,1,.4428],[0,1,.4638],[0,1,.4849],[0,1,.506],[0,1,.5271],[0,1,.5482],[0,1,.5693],[0,1,.5903],[0,1,.6114],[0,1,.6325],[0,1,.6536],[0,1,.6747],[0,1,.6958],[0,1,.7168],[0,1,.7379],[0,1,.759],[0,1,.7801],[0,1,.8012],[0,1,.8223],[0,1,.8433],[0,1,.8644],[0,1,.8855],[0,1,.9066],[0,1,.9277],[0,1,.9488],[0,1,.9699],[0,1,.9909],[0,.9879,1],[0,.9665,1],[0,.9452,1],[0,.9239,1],[0,.9026,1],[0,.8813,1],[0,.86,1],[0,.8387,1],[0,.8173,1],[0,.796,1],[0,.7747,1],[0,.7534,1],[0,.7321,1],[0,.7108,1],[0,.6895,1],[0,.6682,1],[0,.6468,1],[0,.6255,1],[0,.6042,1],[0,.5829,1],[0,.5616,1],[0,.5403,1],[0,.519,1],[0,.4977,1],[0,.4763,1],[0,.455,1],[0,.4337,1],[0,.4124,1],[0,.3911,1],[0,.3698,1],[0,.3485,1],[0,.3272,1],[0,.3058,1],[0,.2845,1],[0,.2632,1],[0,.2419,1],[0,.2206,1],[0,.1993,1],[0,.178,1],[0,.1566,1],[0,.1353,1],[0,.114,1],[0,.0927,1],[0,.0714,1],[0,.0501,1],[0,.0288,1],[0,.0075,1],[.0139,0,1],[.0352,0,1],[.0565,0,1],[.0778,0,1],[.0991,0,1],[.1204,0,1],[.1417,0,1],[.163,0,1],[.1844,0,1],[.2057,0,1],[.227,0,1],[.2483,0,1],[.2696,0,1],[.2909,0,1],[.3122,0,1],[.3335,0,1],[.3549,0,1],[.3762,0,1],[.3975,0,1],[.4188,0,1],[.4401,0,1],[.4614,0,1],[.4827,0,1],[.504,0,1],[.5254,0,1],[.5467,0,1],[.568,0,1],[.5893,0,1],[.6106,0,1],[.6319,0,1],[.6532,0,1],[.6746,0,1],[.6959,0,1],[.7172,0,1],[.7385,0,1],[.7598,0,1],[.7811,0,1],[.8024,0,1],[.8237,0,1],[.8451,0,1],[.8664,0,1],[.8877,0,1],[.909,0,1],[.9303,0,1],[.9516,0,1],[.9729,0,1],[.9942,0,1],[1,0,.9844],[1,0,.9631],[1,0,.9418],[1,0,.9205],[1,0,.8992],[1,0,.8779],[1,0,.8566],[1,0,.8353],[1,0,.8139],[1,0,.7926],[1,0,.7713],[1,0,.75]]},gist_stern:{interpolate:!0,colors:[[0,0,0],[.0717,.0039,.0078],[.1434,.0078,.0157],[.2151,.0118,.0235],[.2868,.0157,.0314],[.3585,.0196,.0392],[.4302,.0235,.0471],[.5018,.0275,.0549],[.5735,.0314,.0627],[.6452,.0353,.0706],[.7169,.0392,.0784],[.7886,.0431,.0863],[.8603,.0471,.0941],[.932,.051,.102],[.999,.0549,.1098],[.9795,.0588,.1176],[.9599,.0627,.1255],[.9404,.0667,.1333],[.9208,.0706,.1412],[.9013,.0745,.149],[.8818,.0784,.1569],[.8622,.0824,.1647],[.8427,.0863,.1725],[.8232,.0902,.1804],[.8036,.0941,.1882],[.7841,.098,.1961],[.7645,.102,.2039],[.745,.1059,.2118],[.7255,.1098,.2196],[.7059,.1137,.2275],[.6864,.1176,.2353],[.6669,.1216,.2431],[.6473,.1255,.251],[.6278,.1294,.2588],[.6082,.1333,.2667],[.5887,.1373,.2745],[.5692,.1412,.2824],[.5496,.1451,.2902],[.5301,.149,.298],[.5106,.1529,.3059],[.491,.1569,.3137],[.4715,.1608,.3216],[.4519,.1647,.3294],[.4324,.1686,.3373],[.4129,.1725,.3451],[.3933,.1765,.3529],[.3738,.1804,.3608],[.3543,.1843,.3686],[.3347,.1882,.3765],[.3152,.1922,.3843],[.2956,.1961,.3922],[.2761,.2,.4],[.2566,.2039,.4078],[.237,.2078,.4157],[.2175,.2118,.4235],[.198,.2157,.4314],[.1784,.2196,.4392],[.1589,.2235,.4471],[.1393,.2275,.4549],[.1198,.2314,.4627],[.1003,.2353,.4706],[.0807,.2392,.4784],[.0612,.2431,.4863],[.0417,.2471,.4941],[.251,.251,.502],[.2549,.2549,.5098],[.2588,.2588,.5176],[.2627,.2627,.5255],[.2667,.2667,.5333],[.2706,.2706,.5412],[.2745,.2745,.549],[.2784,.2784,.5569],[.2824,.2824,.5647],[.2863,.2863,.5725],[.2902,.2902,.5804],[.2941,.2941,.5882],[.298,.298,.5961],[.302,.302,.6039],[.3059,.3059,.6118],[.3098,.3098,.6196],[.3137,.3137,.6275],[.3176,.3176,.6353],[.3216,.3216,.6431],[.3255,.3255,.651],[.3294,.3294,.6588],[.3333,.3333,.6667],[.3373,.3373,.6745],[.3412,.3412,.6824],[.3451,.3451,.6902],[.349,.349,.698],[.3529,.3529,.7059],[.3569,.3569,.7137],[.3608,.3608,.7216],[.3647,.3647,.7294],[.3686,.3686,.7373],[.3725,.3725,.7451],[.3765,.3765,.7529],[.3804,.3804,.7608],[.3843,.3843,.7686],[.3882,.3882,.7765],[.3922,.3922,.7843],[.3961,.3961,.7922],[.4,.4,.8],[.4039,.4039,.8078],[.4078,.4078,.8157],[.4118,.4118,.8235],[.4157,.4157,.8314],[.4196,.4196,.8392],[.4235,.4235,.8471],[.4275,.4275,.8549],[.4314,.4314,.8627],[.4353,.4353,.8706],[.4392,.4392,.8784],[.4431,.4431,.8863],[.4471,.4471,.8941],[.451,.451,.902],[.4549,.4549,.9098],[.4588,.4588,.9176],[.4627,.4627,.9255],[.4667,.4667,.9333],[.4706,.4706,.9412],[.4745,.4745,.949],[.4784,.4784,.9569],[.4824,.4824,.9647],[.4863,.4863,.9725],[.4902,.4902,.9804],[.4941,.4941,.9882],[.498,.498,.9961],[.502,.502,.9917],[.5059,.5059,.975],[.5098,.5098,.9583],[.5137,.5137,.9416],[.5176,.5176,.9249],[.5216,.5216,.9082],[.5255,.5255,.8915],[.5294,.5294,.8748],[.5333,.5333,.8582],[.5373,.5373,.8415],[.5412,.5412,.8248],[.5451,.5451,.8081],[.549,.549,.7914],[.5529,.5529,.7747],[.5569,.5569,.758],[.5608,.5608,.7413],[.5647,.5647,.7247],[.5686,.5686,.708],[.5725,.5725,.6913],[.5765,.5765,.6746],[.5804,.5804,.6579],[.5843,.5843,.6412],[.5882,.5882,.6245],[.5922,.5922,.6078],[.5961,.5961,.5912],[.6,.6,.5745],[.6039,.6039,.5578],[.6078,.6078,.5411],[.6118,.6118,.5244],[.6157,.6157,.5077],[.6196,.6196,.491],[.6235,.6235,.4743],[.6275,.6275,.4577],[.6314,.6314,.441],[.6353,.6353,.4243],[.6392,.6392,.4076],[.6431,.6431,.3909],[.6471,.6471,.3742],[.651,.651,.3575],[.6549,.6549,.3408],[.6588,.6588,.3242],[.6627,.6627,.3075],[.6667,.6667,.2908],[.6706,.6706,.2741],[.6745,.6745,.2574],[.6784,.6784,.2407],[.6824,.6824,.224],[.6863,.6863,.2073],[.6902,.6902,.1907],[.6941,.6941,.174],[.698,.698,.1573],[.702,.702,.1406],[.7059,.7059,.1239],[.7098,.7098,.1072],[.7137,.7137,.0905],[.7176,.7176,.0738],[.7216,.7216,.0572],[.7255,.7255,.0405],[.7294,.7294,.0238],[.7333,.7333,.0071],[.7373,.7373,.0085],[.7412,.7412,.0233],[.7451,.7451,.0381],[.749,.749,.0529],[.7529,.7529,.0677],[.7569,.7569,.0825],[.7608,.7608,.0973],[.7647,.7647,.1121],[.7686,.7686,.1269],[.7725,.7725,.1417],[.7765,.7765,.1565],[.7804,.7804,.1713],[.7843,.7843,.1861],[.7882,.7882,.2009],[.7922,.7922,.2157],[.7961,.7961,.2305],[.8,.8,.2453],[.8039,.8039,.2601],[.8078,.8078,.2749],[.8118,.8118,.2897],[.8157,.8157,.3045],[.8196,.8196,.3193],[.8235,.8235,.3341],[.8275,.8275,.3489],[.8314,.8314,.3637],[.8353,.8353,.3785],[.8392,.8392,.3933],[.8431,.8431,.4081],[.8471,.8471,.4229],[.851,.851,.4377],[.8549,.8549,.4525],[.8588,.8588,.4673],[.8627,.8627,.4821],[.8667,.8667,.4969],[.8706,.8706,.5117],[.8745,.8745,.5265],[.8784,.8784,.5413],[.8824,.8824,.556],[.8863,.8863,.5708],[.8902,.8902,.5856],[.8941,.8941,.6004],[.898,.898,.6152],[.902,.902,.63],[.9059,.9059,.6448],[.9098,.9098,.6596],[.9137,.9137,.6744],[.9176,.9176,.6892],[.9216,.9216,.704],[.9255,.9255,.7188],[.9294,.9294,.7336],[.9333,.9333,.7484],[.9373,.9373,.7632],[.9412,.9412,.778],[.9451,.9451,.7928],[.949,.949,.8076],[.9529,.9529,.8224],[.9569,.9569,.8372],[.9608,.9608,.852],[.9647,.9647,.8668],[.9686,.9686,.8816],[.9725,.9725,.8964],[.9765,.9765,.9112],[.9804,.9804,.926],[.9843,.9843,.9408],[.9882,.9882,.9556],[.9922,.9922,.9704],[.9961,.9961,.9852],[1,1,1]]},gist_yarg:{interpolate:!0,colors:[[1,1,1],[.9961,.9961,.9961],[.9922,.9922,.9922],[.9882,.9882,.9882],[.9843,.9843,.9843],[.9804,.9804,.9804],[.9765,.9765,.9765],[.9725,.9725,.9725],[.9686,.9686,.9686],[.9647,.9647,.9647],[.9608,.9608,.9608],[.9569,.9569,.9569],[.9529,.9529,.9529],[.949,.949,.949],[.9451,.9451,.9451],[.9412,.9412,.9412],[.9373,.9373,.9373],[.9333,.9333,.9333],[.9294,.9294,.9294],[.9255,.9255,.9255],[.9216,.9216,.9216],[.9176,.9176,.9176],[.9137,.9137,.9137],[.9098,.9098,.9098],[.9059,.9059,.9059],[.902,.902,.902],[.898,.898,.898],[.8941,.8941,.8941],[.8902,.8902,.8902],[.8863,.8863,.8863],[.8824,.8824,.8824],[.8784,.8784,.8784],[.8745,.8745,.8745],[.8706,.8706,.8706],[.8667,.8667,.8667],[.8627,.8627,.8627],[.8588,.8588,.8588],[.8549,.8549,.8549],[.851,.851,.851],[.8471,.8471,.8471],[.8431,.8431,.8431],[.8392,.8392,.8392],[.8353,.8353,.8353],[.8314,.8314,.8314],[.8275,.8275,.8275],[.8235,.8235,.8235],[.8196,.8196,.8196],[.8157,.8157,.8157],[.8118,.8118,.8118],[.8078,.8078,.8078],[.8039,.8039,.8039],[.8,.8,.8],[.7961,.7961,.7961],[.7922,.7922,.7922],[.7882,.7882,.7882],[.7843,.7843,.7843],[.7804,.7804,.7804],[.7765,.7765,.7765],[.7725,.7725,.7725],[.7686,.7686,.7686],[.7647,.7647,.7647],[.7608,.7608,.7608],[.7569,.7569,.7569],[.7529,.7529,.7529],[.749,.749,.749],[.7451,.7451,.7451],[.7412,.7412,.7412],[.7373,.7373,.7373],[.7333,.7333,.7333],[.7294,.7294,.7294],[.7255,.7255,.7255],[.7216,.7216,.7216],[.7176,.7176,.7176],[.7137,.7137,.7137],[.7098,.7098,.7098],[.7059,.7059,.7059],[.702,.702,.702],[.698,.698,.698],[.6941,.6941,.6941],[.6902,.6902,.6902],[.6863,.6863,.6863],[.6824,.6824,.6824],[.6784,.6784,.6784],[.6745,.6745,.6745],[.6706,.6706,.6706],[.6667,.6667,.6667],[.6627,.6627,.6627],[.6588,.6588,.6588],[.6549,.6549,.6549],[.651,.651,.651],[.6471,.6471,.6471],[.6431,.6431,.6431],[.6392,.6392,.6392],[.6353,.6353,.6353],[.6314,.6314,.6314],[.6275,.6275,.6275],[.6235,.6235,.6235],[.6196,.6196,.6196],[.6157,.6157,.6157],[.6118,.6118,.6118],[.6078,.6078,.6078],[.6039,.6039,.6039],[.6,.6,.6],[.5961,.5961,.5961],[.5922,.5922,.5922],[.5882,.5882,.5882],[.5843,.5843,.5843],[.5804,.5804,.5804],[.5765,.5765,.5765],[.5725,.5725,.5725],[.5686,.5686,.5686],[.5647,.5647,.5647],[.5608,.5608,.5608],[.5569,.5569,.5569],[.5529,.5529,.5529],[.549,.549,.549],[.5451,.5451,.5451],[.5412,.5412,.5412],[.5373,.5373,.5373],[.5333,.5333,.5333],[.5294,.5294,.5294],[.5255,.5255,.5255],[.5216,.5216,.5216],[.5176,.5176,.5176],[.5137,.5137,.5137],[.5098,.5098,.5098],[.5059,.5059,.5059],[.502,.502,.502],[.498,.498,.498],[.4941,.4941,.4941],[.4902,.4902,.4902],[.4863,.4863,.4863],[.4824,.4824,.4824],[.4784,.4784,.4784],[.4745,.4745,.4745],[.4706,.4706,.4706],[.4667,.4667,.4667],[.4627,.4627,.4627],[.4588,.4588,.4588],[.4549,.4549,.4549],[.451,.451,.451],[.4471,.4471,.4471],[.4431,.4431,.4431],[.4392,.4392,.4392],[.4353,.4353,.4353],[.4314,.4314,.4314],[.4275,.4275,.4275],[.4235,.4235,.4235],[.4196,.4196,.4196],[.4157,.4157,.4157],[.4118,.4118,.4118],[.4078,.4078,.4078],[.4039,.4039,.4039],[.4,.4,.4],[.3961,.3961,.3961],[.3922,.3922,.3922],[.3882,.3882,.3882],[.3843,.3843,.3843],[.3804,.3804,.3804],[.3765,.3765,.3765],[.3725,.3725,.3725],[.3686,.3686,.3686],[.3647,.3647,.3647],[.3608,.3608,.3608],[.3569,.3569,.3569],[.3529,.3529,.3529],[.349,.349,.349],[.3451,.3451,.3451],[.3412,.3412,.3412],[.3373,.3373,.3373],[.3333,.3333,.3333],[.3294,.3294,.3294],[.3255,.3255,.3255],[.3216,.3216,.3216],[.3176,.3176,.3176],[.3137,.3137,.3137],[.3098,.3098,.3098],[.3059,.3059,.3059],[.302,.302,.302],[.298,.298,.298],[.2941,.2941,.2941],[.2902,.2902,.2902],[.2863,.2863,.2863],[.2824,.2824,.2824],[.2784,.2784,.2784],[.2745,.2745,.2745],[.2706,.2706,.2706],[.2667,.2667,.2667],[.2627,.2627,.2627],[.2588,.2588,.2588],[.2549,.2549,.2549],[.251,.251,.251],[.2471,.2471,.2471],[.2431,.2431,.2431],[.2392,.2392,.2392],[.2353,.2353,.2353],[.2314,.2314,.2314],[.2275,.2275,.2275],[.2235,.2235,.2235],[.2196,.2196,.2196],[.2157,.2157,.2157],[.2118,.2118,.2118],[.2078,.2078,.2078],[.2039,.2039,.2039],[.2,.2,.2],[.1961,.1961,.1961],[.1922,.1922,.1922],[.1882,.1882,.1882],[.1843,.1843,.1843],[.1804,.1804,.1804],[.1765,.1765,.1765],[.1725,.1725,.1725],[.1686,.1686,.1686],[.1647,.1647,.1647],[.1608,.1608,.1608],[.1569,.1569,.1569],[.1529,.1529,.1529],[.149,.149,.149],[.1451,.1451,.1451],[.1412,.1412,.1412],[.1373,.1373,.1373],[.1333,.1333,.1333],[.1294,.1294,.1294],[.1255,.1255,.1255],[.1216,.1216,.1216],[.1176,.1176,.1176],[.1137,.1137,.1137],[.1098,.1098,.1098],[.1059,.1059,.1059],[.102,.102,.102],[.098,.098,.098],[.0941,.0941,.0941],[.0902,.0902,.0902],[.0863,.0863,.0863],[.0824,.0824,.0824],[.0784,.0784,.0784],[.0745,.0745,.0745],[.0706,.0706,.0706],[.0667,.0667,.0667],[.0627,.0627,.0627],[.0588,.0588,.0588],[.0549,.0549,.0549],[.051,.051,.051],[.0471,.0471,.0471],[.0431,.0431,.0431],[.0392,.0392,.0392],[.0353,.0353,.0353],[.0314,.0314,.0314],[.0275,.0275,.0275],[.0235,.0235,.0235],[.0196,.0196,.0196],[.0157,.0157,.0157],[.0118,.0118,.0118],[.0078,.0078,.0078],[.0039,.0039,.0039],[0,0,0]]},gnuplot:{interpolate:!0,colors:[[0,0,0],[.0626,0,.0246],[.0886,0,.0493],[.1085,0,.0739],[.1252,0,.0984],[.14,0,.1229],[.1534,0,.1473],[.1657,0,.1716],[.1771,0,.1958],[.1879,0,.2199],[.198,1e-4,.2439],[.2077,1e-4,.2677],[.2169,1e-4,.2914],[.2258,1e-4,.3149],[.2343,2e-4,.3382],[.2425,2e-4,.3612],[.2505,2e-4,.3841],[.2582,3e-4,.4067],[.2657,4e-4,.4291],[.273,4e-4,.4512],[.2801,5e-4,.4731],[.287,6e-4,.4947],[.2937,6e-4,.5159],[.3003,7e-4,.5369],[.3068,8e-4,.5575],[.3131,9e-4,.5778],[.3193,.0011,.5977],[.3254,.0012,.6173],[.3314,.0013,.6365],[.3372,.0015,.6553],[.343,.0016,.6737],[.3487,.0018,.6917],[.3542,.002,.7093],[.3597,.0022,.7264],[.3651,.0024,.7431],[.3705,.0026,.7594],[.3757,.0028,.7752],[.3809,.0031,.7905],[.386,.0033,.8054],[.3911,.0036,.8197],[.3961,.0039,.8336],[.401,.0042,.847],[.4058,.0045,.8598],[.4106,.0048,.8721],[.4154,.0051,.8839],[.4201,.0055,.8952],[.4247,.0059,.9059],[.4293,.0063,.916],[.4339,.0067,.9256],[.4384,.0071,.9347],[.4428,.0075,.9432],[.4472,.008,.9511],[.4516,.0085,.9584],[.4559,.009,.9651],[.4602,.0095,.9713],[.4644,.01,.9768],[.4686,.0106,.9818],[.4728,.0112,.9862],[.4769,.0118,.99],[.481,.0124,.9932],[.4851,.013,.9957],[.4891,.0137,.9977],[.4931,.0144,.9991],[.4971,.0151,.9998],[.501,.0158,1],[.5049,.0166,.9995],[.5087,.0173,.9985],[.5126,.0181,.9968],[.5164,.019,.9945],[.5202,.0198,.9916],[.5239,.0207,.9882],[.5277,.0216,.9841],[.5314,.0225,.9794],[.535,.0235,.9741],[.5387,.0244,.9683],[.5423,.0254,.9618],[.5459,.0265,.9548],[.5495,.0275,.9472],[.5531,.0286,.939],[.5566,.0297,.9302],[.5601,.0309,.9209],[.5636,.0321,.911],[.5671,.0333,.9006],[.5705,.0345,.8896],[.5739,.0357,.8781],[.5774,.037,.866],[.5807,.0384,.8534],[.5841,.0397,.8403],[.5875,.0411,.8267],[.5908,.0425,.8126],[.5941,.044,.798],[.5974,.0454,.7829],[.6007,.047,.7674],[.6039,.0485,.7513],[.6071,.0501,.7348],[.6104,.0517,.7179],[.6136,.0534,.7005],[.6168,.055,.6827],[.6199,.0568,.6645],[.6231,.0585,.6459],[.6262,.0603,.6269],[.6293,.0621,.6075],[.6325,.064,.5878],[.6355,.0659,.5677],[.6386,.0678,.5472],[.6417,.0698,.5264],[.6447,.0718,.5053],[.6478,.0739,.4839],[.6508,.076,.4622],[.6538,.0781,.4402],[.6568,.0803,.418],[.6598,.0825,.3955],[.6627,.0847,.3727],[.6657,.087,.3497],[.6686,.0893,.3265],[.6716,.0917,.3032],[.6745,.0941,.2796],[.6774,.0966,.2558],[.6803,.0991,.2319],[.6831,.1016,.2079],[.686,.1042,.1837],[.6888,.1068,.1595],[.6917,.1095,.1351],[.6945,.1122,.1107],[.6973,.115,.0861],[.7001,.1178,.0616],[.7029,.1206,.037],[.7057,.1235,.0123],[.7085,.1265,0],[.7113,.1295,0],[.714,.1325,0],[.7167,.1356,0],[.7195,.1387,0],[.7222,.1419,0],[.7249,.1451,0],[.7276,.1484,0],[.7303,.1517,0],[.733,.1551,0],[.7356,.1585,0],[.7383,.162,0],[.741,.1655,0],[.7436,.1691,0],[.7462,.1727,0],[.7489,.1764,0],[.7515,.1801,0],[.7541,.1839,0],[.7567,.1877,0],[.7593,.1916,0],[.7618,.1955,0],[.7644,.1995,0],[.767,.2035,0],[.7695,.2076,0],[.7721,.2118,0],[.7746,.216,0],[.7771,.2203,0],[.7796,.2246,0],[.7822,.229,0],[.7847,.2334,0],[.7872,.2379,0],[.7896,.2424,0],[.7921,.247,0],[.7946,.2517,0],[.7971,.2564,0],[.7995,.2612,0],[.802,.266,0],[.8044,.2709,0],[.8068,.2759,0],[.8093,.2809,0],[.8117,.286,0],[.8141,.2911,0],[.8165,.2963,0],[.8189,.3016,0],[.8213,.3069,0],[.8237,.3123,0],[.826,.3177,0],[.8284,.3232,0],[.8308,.3288,0],[.8331,.3344,0],[.8355,.3401,0],[.8378,.3459,0],[.8402,.3517,0],[.8425,.3576,0],[.8448,.3636,0],[.8471,.3696,0],[.8495,.3757,0],[.8518,.3819,0],[.8541,.3881,0],[.8563,.3944,0],[.8586,.4007,0],[.8609,.4072,0],[.8632,.4137,0],[.8655,.4202,0],[.8677,.4269,0],[.87,.4336,0],[.8722,.4403,0],[.8745,.4472,0],[.8767,.4541,0],[.8789,.4611,0],[.8812,.4681,0],[.8834,.4753,0],[.8856,.4825,0],[.8878,.4897,0],[.89,.4971,0],[.8922,.5045,0],[.8944,.512,0],[.8966,.5196,0],[.8988,.5272,0],[.901,.5349,0],[.9032,.5427,0],[.9053,.5506,0],[.9075,.5585,0],[.9096,.5665,0],[.9118,.5746,0],[.9139,.5828,0],[.9161,.591,0],[.9182,.5994,0],[.9204,.6078,0],[.9225,.6163,0],[.9246,.6248,0],[.9267,.6334,0],[.9288,.6422,0],[.9309,.651,0],[.9331,.6598,0],[.9352,.6688,0],[.9372,.6778,0],[.9393,.687,0],[.9414,.6962,0],[.9435,.7054,0],[.9456,.7148,0],[.9476,.7242,0],[.9497,.7338,0],[.9518,.7434,0],[.9538,.7531,0],[.9559,.7629,0],[.9579,.7727,0],[.96,.7827,0],[.962,.7927,0],[.9641,.8028,0],[.9661,.813,0],[.9681,.8233,0],[.9701,.8337,0],[.9722,.8442,0],[.9742,.8547,0],[.9762,.8654,0],[.9782,.8761,0],[.9802,.8869,0],[.9822,.8978,0],[.9842,.9088,0],[.9862,.9199,0],[.9882,.9311,0],[.9901,.9423,0],[.9921,.9537,0],[.9941,.9651,0],[.9961,.9767,0],[.998,.9883,0],[1,1,0]]},gnuplot2:{interpolate:!0,colors:[[0,0,0],[0,0,.0157],[0,0,.0314],[0,0,.0471],[0,0,.0627],[0,0,.0784],[0,0,.0941],[0,0,.1098],[0,0,.1255],[0,0,.1412],[0,0,.1569],[0,0,.1725],[0,0,.1882],[0,0,.2039],[0,0,.2196],[0,0,.2353],[0,0,.251],[0,0,.2667],[0,0,.2824],[0,0,.298],[0,0,.3137],[0,0,.3294],[0,0,.3451],[0,0,.3608],[0,0,.3765],[0,0,.3922],[0,0,.4078],[0,0,.4235],[0,0,.4392],[0,0,.4549],[0,0,.4706],[0,0,.4863],[0,0,.502],[0,0,.5176],[0,0,.5333],[0,0,.549],[0,0,.5647],[0,0,.5804],[0,0,.5961],[0,0,.6118],[0,0,.6275],[0,0,.6431],[0,0,.6588],[0,0,.6745],[0,0,.6902],[0,0,.7059],[0,0,.7216],[0,0,.7373],[0,0,.7529],[0,0,.7686],[0,0,.7843],[0,0,.8],[0,0,.8157],[0,0,.8314],[0,0,.8471],[0,0,.8627],[0,0,.8784],[0,0,.8941],[0,0,.9098],[0,0,.9255],[0,0,.9412],[0,0,.9569],[0,0,.9725],[0,0,.9882],[.0031,0,1],[.0153,0,1],[.0276,0,1],[.0398,0,1],[.0521,0,1],[.0643,0,1],[.0766,0,1],[.0888,0,1],[.1011,0,1],[.1134,0,1],[.1256,0,1],[.1379,0,1],[.1501,0,1],[.1624,0,1],[.1746,0,1],[.1869,0,1],[.1991,0,1],[.2114,0,1],[.2237,0,1],[.2359,0,1],[.2482,0,1],[.2604,0,1],[.2727,0,1],[.2849,0,1],[.2972,0,1],[.3094,0,1],[.3217,0,1],[.3339,0,1],[.3462,0,1],[.3585,0,1],[.3707,0,1],[.383,0,1],[.3952,0,1],[.4075,0,1],[.4197,0,1],[.432,0,1],[.4442,0,1],[.4565,0,1],[.4688,0,1],[.481,0,1],[.4933,0,1],[.5055,0,1],[.5178,0,1],[.53,0,1],[.5423,.0071,.9929],[.5545,.0149,.9851],[.5668,.0227,.9773],[.579,.0306,.9694],[.5913,.0384,.9616],[.6036,.0463,.9537],[.6158,.0541,.9459],[.6281,.062,.938],[.6403,.0698,.9302],[.6526,.0776,.9224],[.6648,.0855,.9145],[.6771,.0933,.9067],[.6893,.1012,.8988],[.7016,.109,.891],[.7138,.1169,.8831],[.7261,.1247,.8753],[.7384,.1325,.8675],[.7506,.1404,.8596],[.7629,.1482,.8518],[.7751,.1561,.8439],[.7874,.1639,.8361],[.7996,.1718,.8282],[.8119,.1796,.8204],[.8241,.1875,.8125],[.8364,.1953,.8047],[.8487,.2031,.7969],[.8609,.211,.789],[.8732,.2188,.7812],[.8854,.2267,.7733],[.8977,.2345,.7655],[.9099,.2424,.7576],[.9222,.2502,.7498],[.9344,.258,.742],[.9467,.2659,.7341],[.9589,.2737,.7263],[.9712,.2816,.7184],[.9835,.2894,.7106],[.9957,.2973,.7027],[1,.3051,.6949],[1,.3129,.6871],[1,.3208,.6792],[1,.3286,.6714],[1,.3365,.6635],[1,.3443,.6557],[1,.3522,.6478],[1,.36,.64],[1,.3678,.6322],[1,.3757,.6243],[1,.3835,.6165],[1,.3914,.6086],[1,.3992,.6008],[1,.4071,.5929],[1,.4149,.5851],[1,.4227,.5773],[1,.4306,.5694],[1,.4384,.5616],[1,.4463,.5537],[1,.4541,.5459],[1,.462,.538],[1,.4698,.5302],[1,.4776,.5224],[1,.4855,.5145],[1,.4933,.5067],[1,.5012,.4988],[1,.509,.491],[1,.5169,.4831],[1,.5247,.4753],[1,.5325,.4675],[1,.5404,.4596],[1,.5482,.4518],[1,.5561,.4439],[1,.5639,.4361],[1,.5718,.4282],[1,.5796,.4204],[1,.5875,.4125],[1,.5953,.4047],[1,.6031,.3969],[1,.611,.389],[1,.6188,.3812],[1,.6267,.3733],[1,.6345,.3655],[1,.6424,.3576],[1,.6502,.3498],[1,.658,.342],[1,.6659,.3341],[1,.6737,.3263],[1,.6816,.3184],[1,.6894,.3106],[1,.6973,.3027],[1,.7051,.2949],[1,.7129,.2871],[1,.7208,.2792],[1,.7286,.2714],[1,.7365,.2635],[1,.7443,.2557],[1,.7522,.2478],[1,.76,.24],[1,.7678,.2322],[1,.7757,.2243],[1,.7835,.2165],[1,.7914,.2086],[1,.7992,.2008],[1,.8071,.1929],[1,.8149,.1851],[1,.8227,.1773],[1,.8306,.1694],[1,.8384,.1616],[1,.8463,.1537],[1,.8541,.1459],[1,.862,.138],[1,.8698,.1302],[1,.8776,.1224],[1,.8855,.1145],[1,.8933,.1067],[1,.9012,.0988],[1,.909,.091],[1,.9169,.0831],[1,.9247,.0753],[1,.9325,.0675],[1,.9404,.0596],[1,.9482,.0518],[1,.9561,.0439],[1,.9639,.0361],[1,.9718,.0282],[1,.9796,.0204],[1,.9875,.0125],[1,.9953,.0047],[1,1,.0196],[1,1,.0686],[1,1,.1176],[1,1,.1667],[1,1,.2157],[1,1,.2647],[1,1,.3137],[1,1,.3627],[1,1,.4118],[1,1,.4608],[1,1,.5098],[1,1,.5588],[1,1,.6078],[1,1,.6569],[1,1,.7059],[1,1,.7549],[1,1,.8039],[1,1,.8529],[1,1,.902],[1,1,.951],[1,1,1]]},gray:{interpolate:!0,colors:[[0,0,0],[.0039,.0039,.0039],[.0078,.0078,.0078],[.0118,.0118,.0118],[.0157,.0157,.0157],[.0196,.0196,.0196],[.0235,.0235,.0235],[.0275,.0275,.0275],[.0314,.0314,.0314],[.0353,.0353,.0353],[.0392,.0392,.0392],[.0431,.0431,.0431],[.0471,.0471,.0471],[.051,.051,.051],[.0549,.0549,.0549],[.0588,.0588,.0588],[.0627,.0627,.0627],[.0667,.0667,.0667],[.0706,.0706,.0706],[.0745,.0745,.0745],[.0784,.0784,.0784],[.0824,.0824,.0824],[.0863,.0863,.0863],[.0902,.0902,.0902],[.0941,.0941,.0941],[.098,.098,.098],[.102,.102,.102],[.1059,.1059,.1059],[.1098,.1098,.1098],[.1137,.1137,.1137],[.1176,.1176,.1176],[.1216,.1216,.1216],[.1255,.1255,.1255],[.1294,.1294,.1294],[.1333,.1333,.1333],[.1373,.1373,.1373],[.1412,.1412,.1412],[.1451,.1451,.1451],[.149,.149,.149],[.1529,.1529,.1529],[.1569,.1569,.1569],[.1608,.1608,.1608],[.1647,.1647,.1647],[.1686,.1686,.1686],[.1725,.1725,.1725],[.1765,.1765,.1765],[.1804,.1804,.1804],[.1843,.1843,.1843],[.1882,.1882,.1882],[.1922,.1922,.1922],[.1961,.1961,.1961],[.2,.2,.2],[.2039,.2039,.2039],[.2078,.2078,.2078],[.2118,.2118,.2118],[.2157,.2157,.2157],[.2196,.2196,.2196],[.2235,.2235,.2235],[.2275,.2275,.2275],[.2314,.2314,.2314],[.2353,.2353,.2353],[.2392,.2392,.2392],[.2431,.2431,.2431],[.2471,.2471,.2471],[.251,.251,.251],[.2549,.2549,.2549],[.2588,.2588,.2588],[.2627,.2627,.2627],[.2667,.2667,.2667],[.2706,.2706,.2706],[.2745,.2745,.2745],[.2784,.2784,.2784],[.2824,.2824,.2824],[.2863,.2863,.2863],[.2902,.2902,.2902],[.2941,.2941,.2941],[.298,.298,.298],[.302,.302,.302],[.3059,.3059,.3059],[.3098,.3098,.3098],[.3137,.3137,.3137],[.3176,.3176,.3176],[.3216,.3216,.3216],[.3255,.3255,.3255],[.3294,.3294,.3294],[.3333,.3333,.3333],[.3373,.3373,.3373],[.3412,.3412,.3412],[.3451,.3451,.3451],[.349,.349,.349],[.3529,.3529,.3529],[.3569,.3569,.3569],[.3608,.3608,.3608],[.3647,.3647,.3647],[.3686,.3686,.3686],[.3725,.3725,.3725],[.3765,.3765,.3765],[.3804,.3804,.3804],[.3843,.3843,.3843],[.3882,.3882,.3882],[.3922,.3922,.3922],[.3961,.3961,.3961],[.4,.4,.4],[.4039,.4039,.4039],[.4078,.4078,.4078],[.4118,.4118,.4118],[.4157,.4157,.4157],[.4196,.4196,.4196],[.4235,.4235,.4235],[.4275,.4275,.4275],[.4314,.4314,.4314],[.4353,.4353,.4353],[.4392,.4392,.4392],[.4431,.4431,.4431],[.4471,.4471,.4471],[.451,.451,.451],[.4549,.4549,.4549],[.4588,.4588,.4588],[.4627,.4627,.4627],[.4667,.4667,.4667],[.4706,.4706,.4706],[.4745,.4745,.4745],[.4784,.4784,.4784],[.4824,.4824,.4824],[.4863,.4863,.4863],[.4902,.4902,.4902],[.4941,.4941,.4941],[.498,.498,.498],[.502,.502,.502],[.5059,.5059,.5059],[.5098,.5098,.5098],[.5137,.5137,.5137],[.5176,.5176,.5176],[.5216,.5216,.5216],[.5255,.5255,.5255],[.5294,.5294,.5294],[.5333,.5333,.5333],[.5373,.5373,.5373],[.5412,.5412,.5412],[.5451,.5451,.5451],[.549,.549,.549],[.5529,.5529,.5529],[.5569,.5569,.5569],[.5608,.5608,.5608],[.5647,.5647,.5647],[.5686,.5686,.5686],[.5725,.5725,.5725],[.5765,.5765,.5765],[.5804,.5804,.5804],[.5843,.5843,.5843],[.5882,.5882,.5882],[.5922,.5922,.5922],[.5961,.5961,.5961],[.6,.6,.6],[.6039,.6039,.6039],[.6078,.6078,.6078],[.6118,.6118,.6118],[.6157,.6157,.6157],[.6196,.6196,.6196],[.6235,.6235,.6235],[.6275,.6275,.6275],[.6314,.6314,.6314],[.6353,.6353,.6353],[.6392,.6392,.6392],[.6431,.6431,.6431],[.6471,.6471,.6471],[.651,.651,.651],[.6549,.6549,.6549],[.6588,.6588,.6588],[.6627,.6627,.6627],[.6667,.6667,.6667],[.6706,.6706,.6706],[.6745,.6745,.6745],[.6784,.6784,.6784],[.6824,.6824,.6824],[.6863,.6863,.6863],[.6902,.6902,.6902],[.6941,.6941,.6941],[.698,.698,.698],[.702,.702,.702],[.7059,.7059,.7059],[.7098,.7098,.7098],[.7137,.7137,.7137],[.7176,.7176,.7176],[.7216,.7216,.7216],[.7255,.7255,.7255],[.7294,.7294,.7294],[.7333,.7333,.7333],[.7373,.7373,.7373],[.7412,.7412,.7412],[.7451,.7451,.7451],[.749,.749,.749],[.7529,.7529,.7529],[.7569,.7569,.7569],[.7608,.7608,.7608],[.7647,.7647,.7647],[.7686,.7686,.7686],[.7725,.7725,.7725],[.7765,.7765,.7765],[.7804,.7804,.7804],[.7843,.7843,.7843],[.7882,.7882,.7882],[.7922,.7922,.7922],[.7961,.7961,.7961],[.8,.8,.8],[.8039,.8039,.8039],[.8078,.8078,.8078],[.8118,.8118,.8118],[.8157,.8157,.8157],[.8196,.8196,.8196],[.8235,.8235,.8235],[.8275,.8275,.8275],[.8314,.8314,.8314],[.8353,.8353,.8353],[.8392,.8392,.8392],[.8431,.8431,.8431],[.8471,.8471,.8471],[.851,.851,.851],[.8549,.8549,.8549],[.8588,.8588,.8588],[.8627,.8627,.8627],[.8667,.8667,.8667],[.8706,.8706,.8706],[.8745,.8745,.8745],[.8784,.8784,.8784],[.8824,.8824,.8824],[.8863,.8863,.8863],[.8902,.8902,.8902],[.8941,.8941,.8941],[.898,.898,.898],[.902,.902,.902],[.9059,.9059,.9059],[.9098,.9098,.9098],[.9137,.9137,.9137],[.9176,.9176,.9176],[.9216,.9216,.9216],[.9255,.9255,.9255],[.9294,.9294,.9294],[.9333,.9333,.9333],[.9373,.9373,.9373],[.9412,.9412,.9412],[.9451,.9451,.9451],[.949,.949,.949],[.9529,.9529,.9529],[.9569,.9569,.9569],[.9608,.9608,.9608],[.9647,.9647,.9647],[.9686,.9686,.9686],[.9725,.9725,.9725],[.9765,.9765,.9765],[.9804,.9804,.9804],[.9843,.9843,.9843],[.9882,.9882,.9882],[.9922,.9922,.9922],[.9961,.9961,.9961],[1,1,1]]},hot:{interpolate:!0,colors:[[.0416,0,0],[.0519,0,0],[.0622,0,0],[.0725,0,0],[.0828,0,0],[.0931,0,0],[.1034,0,0],[.1137,0,0],[.124,0,0],[.1343,0,0],[.1445,0,0],[.1548,0,0],[.1651,0,0],[.1754,0,0],[.1857,0,0],[.196,0,0],[.2063,0,0],[.2166,0,0],[.2269,0,0],[.2372,0,0],[.2475,0,0],[.2578,0,0],[.2681,0,0],[.2784,0,0],[.2887,0,0],[.299,0,0],[.3093,0,0],[.3196,0,0],[.3299,0,0],[.3402,0,0],[.3504,0,0],[.3607,0,0],[.371,0,0],[.3813,0,0],[.3916,0,0],[.4019,0,0],[.4122,0,0],[.4225,0,0],[.4328,0,0],[.4431,0,0],[.4534,0,0],[.4637,0,0],[.474,0,0],[.4843,0,0],[.4946,0,0],[.5049,0,0],[.5152,0,0],[.5255,0,0],[.5358,0,0],[.546,0,0],[.5563,0,0],[.5666,0,0],[.5769,0,0],[.5872,0,0],[.5975,0,0],[.6078,0,0],[.6181,0,0],[.6284,0,0],[.6387,0,0],[.649,0,0],[.6593,0,0],[.6696,0,0],[.6799,0,0],[.6902,0,0],[.7005,0,0],[.7108,0,0],[.7211,0,0],[.7314,0,0],[.7416,0,0],[.7519,0,0],[.7622,0,0],[.7725,0,0],[.7828,0,0],[.7931,0,0],[.8034,0,0],[.8137,0,0],[.824,0,0],[.8343,0,0],[.8446,0,0],[.8549,0,0],[.8652,0,0],[.8755,0,0],[.8858,0,0],[.8961,0,0],[.9064,0,0],[.9167,0,0],[.927,0,0],[.9373,0,0],[.9475,0,0],[.9578,0,0],[.9681,0,0],[.9784,0,0],[.9887,0,0],[.999,0,0],[1,.0093,0],[1,.0196,0],[1,.0299,0],[1,.0402,0],[1,.0505,0],[1,.0608,0],[1,.0711,0],[1,.0814,0],[1,.0917,0],[1,.102,0],[1,.1123,0],[1,.1225,0],[1,.1328,0],[1,.1431,0],[1,.1534,0],[1,.1637,0],[1,.174,0],[1,.1843,0],[1,.1946,0],[1,.2049,0],[1,.2152,0],[1,.2255,0],[1,.2358,0],[1,.2461,0],[1,.2564,0],[1,.2667,0],[1,.277,0],[1,.2873,0],[1,.2975,0],[1,.3078,0],[1,.3181,0],[1,.3284,0],[1,.3387,0],[1,.349,0],[1,.3593,0],[1,.3696,0],[1,.3799,0],[1,.3902,0],[1,.4005,0],[1,.4108,0],[1,.4211,0],[1,.4314,0],[1,.4417,0],[1,.452,0],[1,.4623,0],[1,.4725,0],[1,.4828,0],[1,.4931,0],[1,.5034,0],[1,.5137,0],[1,.524,0],[1,.5343,0],[1,.5446,0],[1,.5549,0],[1,.5652,0],[1,.5755,0],[1,.5858,0],[1,.5961,0],[1,.6064,0],[1,.6167,0],[1,.627,0],[1,.6373,0],[1,.6475,0],[1,.6578,0],[1,.6681,0],[1,.6784,0],[1,.6887,0],[1,.699,0],[1,.7093,0],[1,.7196,0],[1,.7299,0],[1,.7402,0],[1,.7505,0],[1,.7608,0],[1,.7711,0],[1,.7814,0],[1,.7917,0],[1,.802,0],[1,.8123,0],[1,.8225,0],[1,.8328,0],[1,.8431,0],[1,.8534,0],[1,.8637,0],[1,.874,0],[1,.8843,0],[1,.8946,0],[1,.9049,0],[1,.9152,0],[1,.9255,0],[1,.9358,0],[1,.9461,0],[1,.9564,0],[1,.9667,0],[1,.977,0],[1,.9873,0],[1,.9975,0],[1,1,.0118],[1,1,.0272],[1,1,.0426],[1,1,.0581],[1,1,.0735],[1,1,.089],[1,1,.1044],[1,1,.1199],[1,1,.1353],[1,1,.1507],[1,1,.1662],[1,1,.1816],[1,1,.1971],[1,1,.2125],[1,1,.2279],[1,1,.2434],[1,1,.2588],[1,1,.2743],[1,1,.2897],[1,1,.3051],[1,1,.3206],[1,1,.336],[1,1,.3515],[1,1,.3669],[1,1,.3824],[1,1,.3978],[1,1,.4132],[1,1,.4287],[1,1,.4441],[1,1,.4596],[1,1,.475],[1,1,.4904],[1,1,.5059],[1,1,.5213],[1,1,.5368],[1,1,.5522],[1,1,.5676],[1,1,.5831],[1,1,.5985],[1,1,.614],[1,1,.6294],[1,1,.6449],[1,1,.6603],[1,1,.6757],[1,1,.6912],[1,1,.7066],[1,1,.7221],[1,1,.7375],[1,1,.7529],[1,1,.7684],[1,1,.7838],[1,1,.7993],[1,1,.8147],[1,1,.8301],[1,1,.8456],[1,1,.861],[1,1,.8765],[1,1,.8919],[1,1,.9074],[1,1,.9228],[1,1,.9382],[1,1,.9537],[1,1,.9691],[1,1,.9846],[1,1,1]]},hsv:{interpolate:!0,colors:[[1,0,0],[1,.0232,0],[1,.0463,0],[1,.0695,0],[1,.0926,0],[1,.1158,0],[1,.139,0],[1,.1621,0],[1,.1853,0],[1,.2085,0],[1,.2316,0],[1,.2548,0],[1,.2779,0],[1,.3011,0],[1,.3243,0],[1,.3474,0],[1,.3706,0],[1,.3938,0],[1,.4169,0],[1,.4401,0],[1,.4632,0],[1,.4864,0],[1,.5096,0],[1,.5327,0],[1,.5559,0],[1,.579,0],[1,.6022,0],[1,.6254,0],[1,.6485,0],[1,.6717,0],[1,.6949,0],[1,.718,0],[1,.7412,0],[1,.7643,0],[1,.7875,0],[1,.8107,0],[1,.8338,0],[1,.857,0],[1,.8801,0],[1,.9033,0],[1,.9265,0],[.996,.9456,0],[.9882,.961,0],[.9805,.9765,0],[.9728,.9919,0],[.9577,1,0],[.9346,1,0],[.9114,1,0],[.8882,1,0],[.8651,1,0],[.8419,1,0],[.8187,1,0],[.7956,1,0],[.7724,1,0],[.7493,1,0],[.7261,1,0],[.7029,1,0],[.6798,1,0],[.6566,1,0],[.6335,1,0],[.6103,1,0],[.5871,1,0],[.564,1,0],[.5408,1,0],[.5176,1,0],[.4945,1,0],[.4713,1,0],[.4482,1,0],[.425,1,0],[.4018,1,0],[.3787,1,0],[.3555,1,0],[.3324,1,0],[.3092,1,0],[.286,1,0],[.2629,1,0],[.2397,1,0],[.2165,1,0],[.1934,1,0],[.1702,1,0],[.1471,1,0],[.1239,1,0],[.1007,1,0],[.0776,1,0],[.0544,1,0],[.0312,1,0],[.0235,1,.0154],[.0158,1,.0309],[.0081,1,.0463],[4e-4,1,.0618],[0,1,.0846],[0,1,.1077],[0,1,.1309],[0,1,.154],[0,1,.1772],[0,1,.2004],[0,1,.2235],[0,1,.2467],[0,1,.2699],[0,1,.293],[0,1,.3162],[0,1,.3393],[0,1,.3625],[0,1,.3857],[0,1,.4088],[0,1,.432],[0,1,.4551],[0,1,.4783],[0,1,.5015],[0,1,.5246],[0,1,.5478],[0,1,.571],[0,1,.5941],[0,1,.6173],[0,1,.6404],[0,1,.6636],[0,1,.6868],[0,1,.7099],[0,1,.7331],[0,1,.7562],[0,1,.7794],[0,1,.8026],[0,1,.8257],[0,1,.8489],[0,1,.8721],[0,1,.8952],[0,1,.9184],[0,1,.9415],[0,1,.9647],[0,1,.9879],[0,.989,1],[0,.9658,1],[0,.9426,1],[0,.9195,1],[0,.8963,1],[0,.8732,1],[0,.85,1],[0,.8268,1],[0,.8037,1],[0,.7805,1],[0,.7574,1],[0,.7342,1],[0,.711,1],[0,.6879,1],[0,.6647,1],[0,.6415,1],[0,.6184,1],[0,.5952,1],[0,.5721,1],[0,.5489,1],[0,.5257,1],[0,.5026,1],[0,.4794,1],[0,.4563,1],[0,.4331,1],[0,.4099,1],[0,.3868,1],[0,.3636,1],[0,.3404,1],[0,.3173,1],[0,.2941,1],[0,.271,1],[0,.2478,1],[0,.2246,1],[0,.2015,1],[0,.1783,1],[0,.1551,1],[0,.132,1],[0,.1088,1],[0,.0857,1],[0,.0625,1],[.0077,.0471,1],[.0154,.0316,1],[.0232,.0162,1],[.0309,7e-4,1],[.0533,0,1],[.0765,0,1],[.0996,0,1],[.1228,0,1],[.146,0,1],[.1691,0,1],[.1923,0,1],[.2154,0,1],[.2386,0,1],[.2618,0,1],[.2849,0,1],[.3081,0,1],[.3312,0,1],[.3544,0,1],[.3776,0,1],[.4007,0,1],[.4239,0,1],[.4471,0,1],[.4702,0,1],[.4934,0,1],[.5165,0,1],[.5397,0,1],[.5629,0,1],[.586,0,1],[.6092,0,1],[.6324,0,1],[.6555,0,1],[.6787,0,1],[.7018,0,1],[.725,0,1],[.7482,0,1],[.7713,0,1],[.7945,0,1],[.8176,0,1],[.8408,0,1],[.864,0,1],[.8871,0,1],[.9103,0,1],[.9335,0,1],[.9566,0,1],[.9724,0,.9926],[.9801,0,.9772],[.9879,0,.9618],[.9956,0,.9463],[1,0,.9276],[1,0,.9044],[1,0,.8813],[1,0,.8581],[1,0,.8349],[1,0,.8118],[1,0,.7886],[1,0,.7654],[1,0,.7423],[1,0,.7191],[1,0,.696],[1,0,.6728],[1,0,.6496],[1,0,.6265],[1,0,.6033],[1,0,.5801],[1,0,.557],[1,0,.5338],[1,0,.5107],[1,0,.4875],[1,0,.4643],[1,0,.4412],[1,0,.418],[1,0,.3949],[1,0,.3717],[1,0,.3485],[1,0,.3254],[1,0,.3022],[1,0,.279],[1,0,.2559],[1,0,.2327],[1,0,.2096],[1,0,.1864],[1,0,.1632],[1,0,.1401],[1,0,.1169],[1,0,.0938]]},inferno:{interpolate:!0,colors:[[.0015,5e-4,.0139],[.0023,.0013,.0186],[.0033,.0022,.0242],[.0045,.0034,.0309],[.006,.0047,.0386],[.0077,.0061,.0468],[.0096,.0077,.0551],[.0117,.0094,.0635],[.014,.0112,.0719],[.0166,.0131,.0803],[.0194,.0151,.0888],[.0224,.0172,.0973],[.0258,.0193,.1059],[.0294,.0215,.1146],[.0334,.0237,.1234],[.0377,.0259,.1322],[.0423,.0281,.1411],[.0469,.0303,.1502],[.0516,.0325,.1593],[.0564,.0346,.1684],[.0613,.0366,.1776],[.0663,.0385,.187],[.0714,.0403,.1964],[.0766,.0419,.2058],[.082,.0433,.2153],[.0874,.0446,.2248],[.093,.0456,.2344],[.0987,.0464,.2439],[.1046,.047,.2534],[.1105,.0474,.2629],[.1167,.0476,.2723],[.1229,.0475,.2816],[.1293,.0473,.2908],[.1358,.0469,.2998],[.1424,.0462,.3086],[.1491,.0455,.3171],[.1558,.0446,.3253],[.1627,.0436,.3333],[.1696,.0425,.3409],[.1765,.0414,.3481],[.1834,.0403,.355],[.1904,.0393,.3614],[.1973,.0384,.3675],[.2042,.0376,.3732],[.2111,.037,.3786],[.2179,.0366,.3835],[.2248,.0364,.3881],[.2315,.0364,.3924],[.2383,.0366,.3964],[.245,.0371,.4],[.2516,.0377,.4034],[.2582,.0386,.4065],[.2648,.0396,.4093],[.2713,.0409,.412],[.2778,.0424,.4144],[.2843,.0439,.4166],[.2908,.0456,.4186],[.2972,.0475,.4205],[.3036,.0494,.4222],[.3099,.0514,.4237],[.3163,.0535,.4251],[.3226,.0556,.4264],[.3289,.0578,.4275],[.3352,.0601,.4285],[.3415,.0623,.4294],[.3478,.0646,.4302],[.354,.0669,.4309],[.3603,.0692,.4315],[.3665,.0716,.432],[.3728,.0739,.4324],[.379,.0763,.4327],[.3852,.0786,.433],[.3915,.0809,.4331],[.3977,.0833,.4332],[.4039,.0856,.4332],[.4101,.0879,.4331],[.4163,.0902,.4329],[.4225,.0925,.4327],[.4288,.0948,.4324],[.435,.0971,.432],[.4412,.0993,.4316],[.4474,.1016,.4311],[.4537,.1038,.4305],[.4599,.1061,.4298],[.4661,.1083,.4291],[.4723,.1105,.4283],[.4786,.1128,.4275],[.4848,.115,.4265],[.491,.1172,.4256],[.4973,.1194,.4245],[.5035,.1216,.4234],[.5097,.1238,.4222],[.516,.126,.4209],[.5222,.1281,.4195],[.5284,.1303,.4181],[.5347,.1325,.4167],[.5409,.1347,.4151],[.5472,.1369,.4135],[.5534,.1391,.4118],[.5596,.1413,.4101],[.5659,.1436,.4083],[.5721,.1458,.4064],[.5783,.148,.4044],[.5845,.1503,.4024],[.5907,.1526,.4003],[.5969,.1548,.3981],[.6031,.1572,.3959],[.6093,.1595,.3936],[.6155,.1618,.3912],[.6217,.1642,.3888],[.6278,.1666,.3863],[.634,.169,.3837],[.6401,.1714,.3811],[.6463,.1739,.3784],[.6524,.1764,.3756],[.6585,.179,.3727],[.6645,.1815,.3698],[.6706,.1842,.3669],[.6766,.1868,.3638],[.6827,.1895,.3608],[.6887,.1922,.3576],[.6946,.195,.3544],[.7006,.1979,.3511],[.7065,.2007,.3478],[.7124,.2037,.3444],[.7183,.2066,.3409],[.7241,.2097,.3374],[.7299,.2128,.3339],[.7357,.2159,.3302],[.7414,.2191,.3266],[.7471,.2224,.3229],[.7528,.2257,.3191],[.7584,.2291,.3153],[.764,.2326,.3114],[.7696,.2361,.3075],[.7751,.2397,.3035],[.7805,.2433,.2995],[.7859,.2471,.2955],[.7913,.2509,.2914],[.7966,.2547,.2873],[.8019,.2587,.2831],[.8071,.2627,.2789],[.8122,.2668,.2747],[.8173,.271,.2704],[.8224,.2752,.2661],[.8274,.2795,.2618],[.8323,.2839,.2574],[.8372,.2884,.253],[.842,.2929,.2486],[.8467,.2976,.2441],[.8514,.3023,.2396],[.856,.307,.2351],[.8605,.3119,.2306],[.865,.3168,.2261],[.8694,.3218,.2215],[.8737,.3269,.2169],[.878,.3321,.2123],[.8822,.3373,.2076],[.8863,.3426,.203],[.8903,.348,.1983],[.8943,.3534,.1936],[.8982,.3589,.1889],[.902,.3645,.1841],[.9057,.3701,.1794],[.9094,.3759,.1746],[.913,.3816,.1698],[.9165,.3875,.1649],[.9199,.3934,.1601],[.9232,.3994,.1552],[.9265,.4054,.1503],[.9296,.4115,.1454],[.9327,.4176,.1404],[.9357,.4238,.1354],[.9387,.4301,.1304],[.9415,.4364,.1254],[.9443,.4428,.1204],[.947,.4492,.1153],[.9496,.4557,.1102],[.9521,.4622,.105],[.9545,.4687,.0999],[.9569,.4754,.0947],[.9591,.482,.0895],[.9613,.4887,.0843],[.9634,.4955,.0791],[.9654,.5022,.0739],[.9673,.5091,.0687],[.9692,.5159,.0635],[.9709,.5229,.0584],[.9726,.5298,.0533],[.9742,.5368,.0484],[.9757,.5438,.0436],[.9771,.5508,.039],[.9784,.5579,.0349],[.9797,.5651,.0314],[.9808,.5722,.0285],[.9819,.5794,.0262],[.9829,.5866,.0247],[.9838,.5938,.0238],[.9846,.6011,.0236],[.9853,.6084,.0242],[.986,.6158,.0256],[.9865,.6231,.0278],[.987,.6305,.0309],[.9873,.6379,.0349],[.9876,.6453,.0399],[.9878,.6528,.0456],[.9879,.6602,.0518],[.9879,.6677,.0583],[.9879,.6753,.0653],[.9877,.6828,.0725],[.9875,.6904,.08],[.9871,.6979,.0877],[.9867,.7055,.0957],[.9862,.7132,.1039],[.9856,.7208,.1122],[.9849,.7284,.1208],[.9841,.7361,.1295],[.9832,.7438,.1385],[.9822,.7514,.1476],[.9812,.7591,.1569],[.98,.7668,.1664],[.9788,.7745,.176],[.9775,.7823,.1859],[.9761,.79,.196],[.9746,.7977,.2063],[.9731,.8054,.2169],[.9715,.8131,.2277],[.9698,.8208,.2387],[.968,.8285,.25],[.9662,.8362,.2615],[.9644,.8438,.2734],[.9625,.8515,.2855],[.9606,.8591,.298],[.9587,.8666,.3108],[.9568,.8741,.324],[.955,.8816,.3375],[.9532,.8889,.3514],[.9515,.8962,.3656],[.95,.9034,.3803],[.9487,.9105,.3953],[.9476,.9174,.4107],[.9468,.9242,.4264],[.9464,.9308,.4424],[.9464,.9372,.4586],[.9469,.9433,.475],[.9479,.9493,.4914],[.9495,.9551,.5079],[.9517,.9606,.5242],[.9545,.9659,.5404],[.9579,.971,.5563],[.9618,.9759,.5719],[.9662,.9807,.5872],[.9712,.9853,.6022],[.9765,.9898,.6168],[.9823,.9941,.631],[.9884,.9984,.6449]]},jet:{interpolate:!0,colors:[[0,0,.5],[0,0,.5178],[0,0,.5357],[0,0,.5535],[0,0,.5713],[0,0,.5891],[0,0,.607],[0,0,.6248],[0,0,.6426],[0,0,.6604],[0,0,.6783],[0,0,.6961],[0,0,.7139],[0,0,.7317],[0,0,.7496],[0,0,.7674],[0,0,.7852],[0,0,.803],[0,0,.8209],[0,0,.8387],[0,0,.8565],[0,0,.8743],[0,0,.8922],[0,0,.91],[0,0,.9278],[0,0,.9456],[0,0,.9635],[0,0,.9813],[0,0,.9991],[0,0,1],[0,0,1],[0,0,1],[0,.002,1],[0,.0176,1],[0,.0333,1],[0,.049,1],[0,.0647,1],[0,.0804,1],[0,.0961,1],[0,.1118,1],[0,.1275,1],[0,.1431,1],[0,.1588,1],[0,.1745,1],[0,.1902,1],[0,.2059,1],[0,.2216,1],[0,.2373,1],[0,.2529,1],[0,.2686,1],[0,.2843,1],[0,.3,1],[0,.3157,1],[0,.3314,1],[0,.3471,1],[0,.3627,1],[0,.3784,1],[0,.3941,1],[0,.4098,1],[0,.4255,1],[0,.4412,1],[0,.4569,1],[0,.4725,1],[0,.4882,1],[0,.5039,1],[0,.5196,1],[0,.5353,1],[0,.551,1],[0,.5667,1],[0,.5824,1],[0,.598,1],[0,.6137,1],[0,.6294,1],[0,.6451,1],[0,.6608,1],[0,.6765,1],[0,.6922,1],[0,.7078,1],[0,.7235,1],[0,.7392,1],[0,.7549,1],[0,.7706,1],[0,.7863,1],[0,.802,1],[0,.8176,1],[0,.8333,1],[0,.849,1],[0,.8647,.9962],[0,.8804,.9836],[0,.8961,.9709],[.0095,.9118,.9583],[.0221,.9275,.9456],[.0348,.9431,.933],[.0474,.9588,.9203],[.0601,.9745,.9077],[.0727,.9902,.895],[.0854,1,.8824],[.098,1,.8697],[.1107,1,.8571],[.1233,1,.8444],[.136,1,.8318],[.1486,1,.8191],[.1613,1,.8065],[.1739,1,.7938],[.1866,1,.7812],[.1992,1,.7685],[.2119,1,.7559],[.2245,1,.7432],[.2372,1,.7306],[.2498,1,.7179],[.2625,1,.7052],[.2751,1,.6926],[.2878,1,.6799],[.3004,1,.6673],[.3131,1,.6546],[.3257,1,.642],[.3384,1,.6293],[.351,1,.6167],[.3637,1,.604],[.3763,1,.5914],[.389,1,.5787],[.4016,1,.5661],[.4143,1,.5534],[.4269,1,.5408],[.4396,1,.5281],[.4522,1,.5155],[.4649,1,.5028],[.4775,1,.4902],[.4902,1,.4775],[.5028,1,.4649],[.5155,1,.4522],[.5281,1,.4396],[.5408,1,.4269],[.5534,1,.4143],[.5661,1,.4016],[.5787,1,.389],[.5914,1,.3763],[.604,1,.3637],[.6167,1,.351],[.6293,1,.3384],[.642,1,.3257],[.6546,1,.3131],[.6673,1,.3004],[.6799,1,.2878],[.6926,1,.2751],[.7052,1,.2625],[.7179,1,.2498],[.7306,1,.2372],[.7432,1,.2245],[.7559,1,.2119],[.7685,1,.1992],[.7812,1,.1866],[.7938,1,.1739],[.8065,1,.1613],[.8191,1,.1486],[.8318,1,.136],[.8444,1,.1233],[.8571,1,.1107],[.8697,1,.098],[.8824,1,.0854],[.895,1,.0727],[.9077,1,.0601],[.9203,1,.0474],[.933,1,.0348],[.9456,.9884,.0221],[.9583,.9739,.0095],[.9709,.9593,0],[.9836,.9448,0],[.9962,.9303,0],[1,.9158,0],[1,.9012,0],[1,.8867,0],[1,.8722,0],[1,.8577,0],[1,.8431,0],[1,.8286,0],[1,.8141,0],[1,.7996,0],[1,.785,0],[1,.7705,0],[1,.756,0],[1,.7415,0],[1,.7269,0],[1,.7124,0],[1,.6979,0],[1,.6834,0],[1,.6688,0],[1,.6543,0],[1,.6398,0],[1,.6253,0],[1,.6107,0],[1,.5962,0],[1,.5817,0],[1,.5672,0],[1,.5527,0],[1,.5381,0],[1,.5236,0],[1,.5091,0],[1,.4946,0],[1,.48,0],[1,.4655,0],[1,.451,0],[1,.4365,0],[1,.4219,0],[1,.4074,0],[1,.3929,0],[1,.3784,0],[1,.3638,0],[1,.3493,0],[1,.3348,0],[1,.3203,0],[1,.3057,0],[1,.2912,0],[1,.2767,0],[1,.2622,0],[1,.2476,0],[1,.2331,0],[1,.2186,0],[1,.2041,0],[1,.1895,0],[1,.175,0],[1,.1605,0],[1,.146,0],[1,.1314,0],[1,.1169,0],[1,.1024,0],[1,.0879,0],[.9991,.0733,0],[.9813,.0588,0],[.9635,.0443,0],[.9456,.0298,0],[.9278,.0153,0],[.91,7e-4,0],[.8922,0,0],[.8743,0,0],[.8565,0,0],[.8387,0,0],[.8209,0,0],[.803,0,0],[.7852,0,0],[.7674,0,0],[.7496,0,0],[.7317,0,0],[.7139,0,0],[.6961,0,0],[.6783,0,0],[.6604,0,0],[.6426,0,0],[.6248,0,0],[.607,0,0],[.5891,0,0],[.5713,0,0],[.5535,0,0],[.5357,0,0],[.5178,0,0],[.5,0,0]]},magma:{interpolate:!0,colors:[[.0015,5e-4,.0139],[.0023,.0013,.0183],[.0033,.0023,.0237],[.0045,.0035,.03],[.006,.0048,.0371],[.0076,.0064,.045],[.0094,.008,.0528],[.0115,.0098,.0608],[.0137,.0118,.0687],[.0162,.0138,.0766],[.0188,.016,.0846],[.0217,.0183,.0926],[.0248,.0207,.1007],[.0281,.0232,.1088],[.0317,.0258,.117],[.0355,.0284,.1252],[.0396,.0311,.1335],[.0438,.0338,.1419],[.0481,.0366,.1503],[.0523,.0394,.1588],[.0566,.0422,.1674],[.0609,.0448,.1761],[.0653,.0473,.1849],[.0698,.0497,.1937],[.0743,.052,.2027],[.0788,.0542,.2117],[.0834,.0562,.2208],[.0882,.0581,.2299],[.0929,.0599,.2392],[.0978,.0615,.2485],[.1028,.063,.2579],[.1079,.0643,.2673],[.1131,.0655,.2768],[.1184,.0665,.2863],[.1238,.0673,.2959],[.1294,.0679,.3054],[.1351,.0684,.315],[.1409,.0687,.3245],[.1468,.0687,.334],[.1528,.0686,.3434],[.159,.0684,.3527],[.1653,.0679,.3618],[.1717,.0673,.3708],[.1782,.0666,.3795],[.1848,.0657,.388],[.1915,.0648,.3962],[.1982,.0639,.404],[.2049,.0629,.4115],[.2117,.062,.4186],[.2185,.0612,.4254],[.2253,.0604,.4317],[.2321,.0599,.4377],[.2388,.0595,.4433],[.2455,.0594,.4484],[.2522,.0594,.4532],[.2589,.0597,.4577],[.2654,.0602,.4618],[.272,.061,.4657],[.2785,.062,.4692],[.285,.0632,.4725],[.2914,.0646,.4755],[.2977,.0661,.4782],[.3041,.0678,.4808],[.3104,.0697,.4832],[.3167,.0717,.4854],[.3229,.0738,.4874],[.3291,.076,.4893],[.3353,.0782,.491],[.3415,.0806,.4926],[.3476,.0829,.4941],[.3538,.0854,.4955],[.3599,.0878,.4968],[.366,.0903,.498],[.3721,.0928,.4991],[.3782,.0953,.5001],[.3843,.0979,.501],[.3904,.1004,.5019],[.3965,.1029,.5027],[.4025,.1054,.5034],[.4086,.1079,.5041],[.4147,.1104,.5047],[.4208,.1129,.5052],[.4269,.1154,.5057],[.433,.1179,.5062],[.4391,.1203,.5066],[.4452,.1227,.5069],[.4513,.1251,.5072],[.4574,.1275,.5074],[.4635,.1299,.5077],[.4696,.1322,.5078],[.4758,.1346,.5079],[.4819,.1369,.508],[.4881,.1392,.508],[.4943,.1415,.508],[.5004,.1437,.5079],[.5066,.146,.5078],[.5128,.1482,.5076],[.519,.1504,.5074],[.5253,.1526,.5072],[.5315,.1547,.5069],[.5378,.1569,.5066],[.544,.159,.5062],[.5503,.1612,.5057],[.5566,.1633,.5052],[.5629,.1654,.5047],[.5692,.1675,.5041],[.5755,.1695,.5035],[.5818,.1716,.5028],[.5882,.1737,.502],[.5945,.1757,.5012],[.6009,.1777,.5004],[.6072,.1798,.4995],[.6136,.1818,.4985],[.62,.1838,.4975],[.6264,.1859,.4965],[.6328,.1879,.4953],[.6392,.1899,.4942],[.6456,.192,.4929],[.6521,.194,.4916],[.6585,.196,.4903],[.6649,.1981,.4888],[.6713,.2001,.4874],[.6778,.2022,.4858],[.6842,.2043,.4842],[.6907,.2064,.4826],[.6971,.2085,.4808],[.7035,.2106,.479],[.71,.2128,.4772],[.7164,.215,.4753],[.7228,.2172,.4733],[.7292,.2194,.4713],[.7356,.2217,.4692],[.742,.224,.467],[.7484,.2264,.4648],[.7547,.2288,.4625],[.7611,.2312,.4602],[.7674,.2337,.4578],[.7737,.2362,.4553],[.78,.2389,.4528],[.7862,.2415,.4502],[.7924,.2442,.4475],[.7986,.247,.4448],[.8048,.2499,.4421],[.8109,.2529,.4393],[.8169,.2559,.4365],[.8229,.259,.4336],[.8289,.2622,.4306],[.8348,.2655,.4277],[.8406,.269,.4247],[.8464,.2725,.4216],[.8521,.2761,.4186],[.8578,.2799,.4155],[.8633,.2837,.4124],[.8688,.2877,.4093],[.8742,.2919,.4062],[.8795,.2961,.4031],[.8847,.3005,.4],[.8897,.3051,.397],[.8947,.3098,.394],[.8996,.3146,.391],[.9043,.3196,.3881],[.9089,.3248,.3853],[.9134,.3301,.3826],[.9177,.3355,.3799],[.9219,.3411,.3774],[.9259,.3468,.375],[.9298,.3527,.3727],[.9336,.3588,.3705],[.9372,.3649,.3686],[.9407,.3712,.3668],[.944,.3776,.3651],[.9472,.3842,.3637],[.9502,.3908,.3625],[.9531,.3976,.3614],[.9558,.4044,.3606],[.9585,.4113,.36],[.9609,.4183,.3596],[.9633,.4254,.3595],[.9655,.4325,.3595],[.9677,.4397,.3598],[.9697,.4469,.3603],[.9716,.4542,.361],[.9734,.4615,.362],[.9751,.4689,.3631],[.9767,.4762,.3645],[.9782,.4836,.366],[.9796,.491,.3678],[.981,.4984,.3697],[.9823,.5059,.3719],[.9835,.5133,.3742],[.9846,.5207,.3767],[.9857,.5281,.3794],[.9867,.5356,.3822],[.9876,.543,.3852],[.9885,.5504,.3884],[.9894,.5579,.3917],[.9901,.5653,.3951],[.9909,.5727,.3987],[.9916,.5801,.4024],[.9922,.5875,.4063],[.9928,.5949,.4103],[.9933,.6023,.4144],[.9938,.6096,.4186],[.9943,.617,.423],[.9947,.6244,.4274],[.9951,.6317,.432],[.9955,.639,.4366],[.9958,.6463,.4414],[.9961,.6537,.4462],[.9963,.661,.4512],[.9966,.6683,.4562],[.9968,.6755,.4613],[.9969,.6828,.4665],[.9971,.6901,.4718],[.9972,.6973,.4772],[.9973,.7046,.4826],[.9973,.7118,.4882],[.9974,.7191,.4938],[.9974,.7263,.4994],[.9973,.7335,.5052],[.9973,.7408,.511],[.9972,.748,.5169],[.9971,.7552,.5228],[.997,.7624,.5288],[.9969,.7696,.5349],[.9967,.7768,.541],[.9966,.784,.5472],[.9964,.7912,.5535],[.9962,.7983,.5598],[.9959,.8055,.5662],[.9957,.8127,.5726],[.9954,.8199,.5791],[.9951,.8271,.5857],[.9949,.8342,.5923],[.9945,.8414,.599],[.9942,.8485,.6057],[.9939,.8557,.6125],[.9935,.8629,.6193],[.9932,.87,.6262],[.9928,.8772,.6331],[.9924,.8843,.6401],[.9921,.8915,.6471],[.9917,.8986,.6542],[.9913,.9058,.6613],[.9909,.9129,.6685],[.9906,.92,.6757],[.9902,.9272,.6829],[.9898,.9343,.6902],[.9894,.9415,.6975],[.9891,.9486,.7049],[.9887,.9557,.7122],[.9884,.9629,.7196],[.988,.97,.7271],[.9877,.9772,.7345],[.9874,.9843,.742],[.9871,.9914,.7495]]},nipy_spectral:{interpolate:!0,colors:[[0,0,0],[.0366,0,.0418],[.0732,0,.0837],[.1098,0,.1255],[.1464,0,.1673],[.183,0,.2091],[.2196,0,.251],[.2562,0,.2928],[.2928,0,.3346],[.3294,0,.3764],[.366,0,.4183],[.4026,0,.4601],[.4392,0,.5019],[.468,0,.5346],[.4732,0,.5398],[.4785,0,.5451],[.4837,0,.5503],[.4889,0,.5555],[.4941,0,.5608],[.4993,0,.566],[.5046,0,.5712],[.5098,0,.5765],[.515,0,.5817],[.5202,0,.5869],[.5255,0,.5922],[.5307,0,.5974],[.5124,0,.6026],[.4706,0,.6078],[.4287,0,.6131],[.3869,0,.6183],[.3451,0,.6235],[.3032,0,.6288],[.2614,0,.634],[.2196,0,.6392],[.1778,0,.6445],[.1359,0,.6497],[.0941,0,.6549],[.0523,0,.6602],[.0105,0,.6654],[0,0,.6785],[0,0,.6942],[0,0,.7098],[0,0,.7255],[0,0,.7412],[0,0,.7569],[0,0,.7726],[0,0,.7883],[0,0,.804],[0,0,.8196],[0,0,.8353],[0,0,.851],[0,0,.8667],[0,.0366,.8667],[0,.0732,.8667],[0,.1098,.8667],[0,.1464,.8667],[0,.183,.8667],[0,.2196,.8667],[0,.2562,.8667],[0,.2928,.8667],[0,.3294,.8667],[0,.366,.8667],[0,.4026,.8667],[0,.4392,.8667],[0,.4693,.8667],[0,.4798,.8667],[0,.4902,.8667],[0,.5007,.8667],[0,.5111,.8667],[0,.5216,.8667],[0,.532,.8667],[0,.5425,.8667],[0,.553,.8667],[0,.5634,.8667],[0,.5739,.8667],[0,.5843,.8667],[0,.5948,.8667],[0,.6026,.8589],[0,.6078,.8432],[0,.6131,.8275],[0,.6183,.8118],[0,.6235,.7961],[0,.6288,.7804],[0,.634,.7647],[0,.6392,.7491],[0,.6445,.7334],[0,.6497,.7177],[0,.6549,.702],[0,.6602,.6863],[0,.6654,.6706],[0,.6667,.6589],[0,.6667,.6484],[0,.6667,.6379],[0,.6667,.6275],[0,.6667,.617],[0,.6667,.6065],[0,.6667,.5961],[0,.6667,.5856],[0,.6667,.5752],[0,.6667,.5647],[0,.6667,.5542],[0,.6667,.5438],[0,.6667,.5333],[0,.6615,.4915],[0,.6562,.4496],[0,.651,.4078],[0,.6458,.366],[0,.6405,.3242],[0,.6353,.2823],[0,.6301,.2405],[0,.6248,.1987],[0,.6196,.1569],[0,.6144,.115],[0,.6092,.0732],[0,.6039,.0314],[0,.6026,0],[0,.6131,0],[0,.6235,0],[0,.634,0],[0,.6444,0],[0,.6549,0],[0,.6653,0],[0,.6758,0],[0,.6863,0],[0,.6967,0],[0,.7072,0],[0,.7176,0],[0,.7281,0],[0,.7385,0],[0,.749,0],[0,.7595,0],[0,.7699,0],[0,.7804,0],[0,.7908,0],[0,.8013,0],[0,.8118,0],[0,.8222,0],[0,.8327,0],[0,.8432,0],[0,.8536,0],[0,.8641,0],[0,.8745,0],[0,.885,0],[0,.8955,0],[0,.9059,0],[0,.9164,0],[0,.9268,0],[0,.9373,0],[0,.9477,0],[0,.9582,0],[0,.9686,0],[0,.9791,0],[0,.9895,0],[0,1,0],[.0575,1,0],[.115,1,0],[.1725,1,0],[.2301,1,0],[.2876,1,0],[.3451,1,0],[.4026,1,0],[.4601,1,0],[.5176,1,0],[.5751,1,0],[.6327,1,0],[.6902,1,0],[.7372,.9987,0],[.7529,.9935,0],[.7686,.9882,0],[.7843,.983,0],[.8,.9778,0],[.8157,.9725,0],[.8313,.9673,0],[.847,.9621,0],[.8627,.9568,0],[.8784,.9516,0],[.8941,.9464,0],[.9098,.9411,0],[.9255,.9359,0],[.9359,.9281,0],[.9411,.9176,0],[.9464,.9072,0],[.9516,.8967,0],[.9568,.8863,0],[.9621,.8758,0],[.9673,.8653,0],[.9725,.8549,0],[.9778,.8444,0],[.983,.834,0],[.9882,.8235,0],[.9935,.8131,0],[.9987,.8026,0],[1,.7882,0],[1,.7725,0],[1,.7569,0],[1,.7412,0],[1,.7255,0],[1,.7098,0],[1,.6941,0],[1,.6784,0],[1,.6627,0],[1,.6471,0],[1,.6314,0],[1,.6157,0],[1,.6,0],[1,.5529,0],[1,.5059,0],[1,.4588,0],[1,.4118,0],[1,.3647,0],[1,.3176,0],[1,.2706,0],[1,.2235,0],[1,.1765,0],[1,.1294,0],[1,.0824,0],[1,.0353,0],[.9974,0,0],[.9869,0,0],[.9765,0,0],[.966,0,0],[.9556,0,0],[.9451,0,0],[.9347,0,0],[.9242,0,0],[.9137,0,0],[.9033,0,0],[.8928,0,0],[.8824,0,0],[.8719,0,0],[.8641,0,0],[.8589,0,0],[.8536,0,0],[.8484,0,0],[.8432,0,0],[.8379,0,0],[.8327,0,0],[.8275,0,0],[.8222,0,0],[.817,0,0],[.8118,0,0],[.8065,0,0],[.8013,0,0],[.8,.0471,.0471],[.8,.1098,.1098],[.8,.1725,.1725],[.8,.2353,.2353],[.8,.298,.298],[.8,.3608,.3608],[.8,.4235,.4235],[.8,.4863,.4863],[.8,.549,.549],[.8,.6118,.6118],[.8,.6745,.6745],[.8,.7373,.7373],[.8,.8,.8]]},ocean:{interpolate:!0,colors:[[0,.5,0],[0,.4941,.0039],[0,.4882,.0078],[0,.4824,.0118],[0,.4765,.0157],[0,.4706,.0196],[0,.4647,.0235],[0,.4588,.0275],[0,.4529,.0314],[0,.4471,.0353],[0,.4412,.0392],[0,.4353,.0431],[0,.4294,.0471],[0,.4235,.051],[0,.4176,.0549],[0,.4118,.0588],[0,.4059,.0627],[0,.4,.0667],[0,.3941,.0706],[0,.3882,.0745],[0,.3824,.0784],[0,.3765,.0824],[0,.3706,.0863],[0,.3647,.0902],[0,.3588,.0941],[0,.3529,.098],[0,.3471,.102],[0,.3412,.1059],[0,.3353,.1098],[0,.3294,.1137],[0,.3235,.1176],[0,.3176,.1216],[0,.3118,.1255],[0,.3059,.1294],[0,.3,.1333],[0,.2941,.1373],[0,.2882,.1412],[0,.2824,.1451],[0,.2765,.149],[0,.2706,.1529],[0,.2647,.1569],[0,.2588,.1608],[0,.2529,.1647],[0,.2471,.1686],[0,.2412,.1725],[0,.2353,.1765],[0,.2294,.1804],[0,.2235,.1843],[0,.2176,.1882],[0,.2118,.1922],[0,.2059,.1961],[0,.2,.2],[0,.1941,.2039],[0,.1882,.2078],[0,.1824,.2118],[0,.1765,.2157],[0,.1706,.2196],[0,.1647,.2235],[0,.1588,.2275],[0,.1529,.2314],[0,.1471,.2353],[0,.1412,.2392],[0,.1353,.2431],[0,.1294,.2471],[0,.1235,.251],[0,.1176,.2549],[0,.1118,.2588],[0,.1059,.2627],[0,.1,.2667],[0,.0941,.2706],[0,.0882,.2745],[0,.0824,.2784],[0,.0765,.2824],[0,.0706,.2863],[0,.0647,.2902],[0,.0588,.2941],[0,.0529,.298],[0,.0471,.302],[0,.0412,.3059],[0,.0353,.3098],[0,.0294,.3137],[0,.0235,.3176],[0,.0176,.3216],[0,.0118,.3255],[0,.0059,.3294],[0,0,.3333],[0,.0059,.3373],[0,.0118,.3412],[0,.0176,.3451],[0,.0235,.349],[0,.0294,.3529],[0,.0353,.3569],[0,.0412,.3608],[0,.0471,.3647],[0,.0529,.3686],[0,.0588,.3725],[0,.0647,.3765],[0,.0706,.3804],[0,.0765,.3843],[0,.0824,.3882],[0,.0882,.3922],[0,.0941,.3961],[0,.1,.4],[0,.1059,.4039],[0,.1118,.4078],[0,.1176,.4118],[0,.1235,.4157],[0,.1294,.4196],[0,.1353,.4235],[0,.1412,.4275],[0,.1471,.4314],[0,.1529,.4353],[0,.1588,.4392],[0,.1647,.4431],[0,.1706,.4471],[0,.1765,.451],[0,.1824,.4549],[0,.1882,.4588],[0,.1941,.4627],[0,.2,.4667],[0,.2059,.4706],[0,.2118,.4745],[0,.2176,.4784],[0,.2235,.4824],[0,.2294,.4863],[0,.2353,.4902],[0,.2412,.4941],[0,.2471,.498],[0,.2529,.502],[0,.2588,.5059],[0,.2647,.5098],[0,.2706,.5137],[0,.2765,.5176],[0,.2824,.5216],[0,.2882,.5255],[0,.2941,.5294],[0,.3,.5333],[0,.3059,.5373],[0,.3118,.5412],[0,.3176,.5451],[0,.3235,.549],[0,.3294,.5529],[0,.3353,.5569],[0,.3412,.5608],[0,.3471,.5647],[0,.3529,.5686],[0,.3588,.5725],[0,.3647,.5765],[0,.3706,.5804],[0,.3765,.5843],[0,.3824,.5882],[0,.3882,.5922],[0,.3941,.5961],[0,.4,.6],[0,.4059,.6039],[0,.4118,.6078],[0,.4176,.6118],[0,.4235,.6157],[0,.4294,.6196],[0,.4353,.6235],[0,.4412,.6275],[0,.4471,.6314],[0,.4529,.6353],[0,.4588,.6392],[0,.4647,.6431],[0,.4706,.6471],[0,.4765,.651],[0,.4824,.6549],[0,.4882,.6588],[0,.4941,.6627],[0,.5,.6667],[.0118,.5059,.6706],[.0235,.5118,.6745],[.0353,.5176,.6784],[.0471,.5235,.6824],[.0588,.5294,.6863],[.0706,.5353,.6902],[.0824,.5412,.6941],[.0941,.5471,.698],[.1059,.5529,.702],[.1176,.5588,.7059],[.1294,.5647,.7098],[.1412,.5706,.7137],[.1529,.5765,.7176],[.1647,.5824,.7216],[.1765,.5882,.7255],[.1882,.5941,.7294],[.2,.6,.7333],[.2118,.6059,.7373],[.2235,.6118,.7412],[.2353,.6176,.7451],[.2471,.6235,.749],[.2588,.6294,.7529],[.2706,.6353,.7569],[.2824,.6412,.7608],[.2941,.6471,.7647],[.3059,.6529,.7686],[.3176,.6588,.7725],[.3294,.6647,.7765],[.3412,.6706,.7804],[.3529,.6765,.7843],[.3647,.6824,.7882],[.3765,.6882,.7922],[.3882,.6941,.7961],[.4,.7,.8],[.4118,.7059,.8039],[.4235,.7118,.8078],[.4353,.7176,.8118],[.4471,.7235,.8157],[.4588,.7294,.8196],[.4706,.7353,.8235],[.4824,.7412,.8275],[.4941,.7471,.8314],[.5059,.7529,.8353],[.5176,.7588,.8392],[.5294,.7647,.8431],[.5412,.7706,.8471],[.5529,.7765,.851],[.5647,.7824,.8549],[.5765,.7882,.8588],[.5882,.7941,.8627],[.6,.8,.8667],[.6118,.8059,.8706],[.6235,.8118,.8745],[.6353,.8176,.8784],[.6471,.8235,.8824],[.6588,.8294,.8863],[.6706,.8353,.8902],[.6824,.8412,.8941],[.6941,.8471,.898],[.7059,.8529,.902],[.7176,.8588,.9059],[.7294,.8647,.9098],[.7412,.8706,.9137],[.7529,.8765,.9176],[.7647,.8824,.9216],[.7765,.8882,.9255],[.7882,.8941,.9294],[.8,.9,.9333],[.8118,.9059,.9373],[.8235,.9118,.9412],[.8353,.9176,.9451],[.8471,.9235,.949],[.8588,.9294,.9529],[.8706,.9353,.9569],[.8824,.9412,.9608],[.8941,.9471,.9647],[.9059,.9529,.9686],[.9176,.9588,.9725],[.9294,.9647,.9765],[.9412,.9706,.9804],[.9529,.9765,.9843],[.9647,.9824,.9882],[.9765,.9882,.9922],[.9882,.9941,.9961],[1,1,1]]},pink:{interpolate:!0,colors:[[.1178,0,0],[.1371,.0254,.0254],[.1564,.0508,.0508],[.1757,.0762,.0762],[.1949,.1017,.1017],[.2088,.1129,.1129],[.2223,.1234,.1234],[.2358,.1339,.1339],[.2494,.1445,.1445],[.2607,.1528,.1528],[.2717,.1609,.1609],[.2828,.1689,.1689],[.2939,.177,.177],[.3037,.184,.184],[.3133,.1908,.1908],[.3229,.1976,.1976],[.3325,.2044,.2044],[.3413,.2106,.2106],[.3499,.2166,.2166],[.3585,.2226,.2226],[.3671,.2286,.2286],[.3751,.2342,.2342],[.3829,.2396,.2396],[.3908,.245,.245],[.3986,.2504,.2504],[.4061,.2555,.2555],[.4134,.2605,.2605],[.4206,.2655,.2655],[.4279,.2705,.2705],[.4349,.2753,.2753],[.4417,.2799,.2799],[.4485,.2845,.2845],[.4553,.2892,.2892],[.4619,.2937,.2937],[.4683,.298,.298],[.4747,.3024,.3024],[.4811,.3067,.3067],[.4873,.311,.311],[.4934,.3151,.3151],[.4995,.3192,.3192],[.5056,.3233,.3233],[.5116,.3274,.3274],[.5174,.3313,.3313],[.5232,.3352,.3352],[.529,.3391,.3391],[.5347,.343,.343],[.5403,.3467,.3467],[.5458,.3505,.3505],[.5514,.3542,.3542],[.5569,.3579,.3579],[.5622,.3615,.3615],[.5675,.3651,.3651],[.5729,.3687,.3687],[.5782,.3722,.3722],[.5833,.3757,.3757],[.5885,.3791,.3791],[.5936,.3826,.3826],[.5987,.386,.386],[.6037,.3894,.3894],[.6087,.3927,.3927],[.6137,.396,.396],[.6186,.3993,.3993],[.6234,.4026,.4026],[.6282,.4058,.4058],[.6331,.409,.409],[.6378,.4122,.4122],[.6425,.4153,.4153],[.6472,.4185,.4185],[.6519,.4216,.4216],[.6565,.4247,.4247],[.6611,.4278,.4278],[.6656,.4308,.4308],[.6702,.4338,.4338],[.6747,.4369,.4369],[.6791,.4398,.4398],[.6836,.4428,.4428],[.688,.4457,.4457],[.6924,.4487,.4487],[.6967,.4515,.4515],[.701,.4544,.4544],[.7053,.4573,.4573],[.7096,.4602,.4602],[.7139,.463,.463],[.7181,.4658,.4658],[.7223,.4686,.4686],[.7265,.4714,.4714],[.7306,.4741,.4741],[.7347,.4769,.4769],[.7388,.4796,.4796],[.7429,.4824,.4824],[.747,.485,.485],[.751,.4877,.4877],[.755,.4904,.4904],[.759,.4931,.4931],[.761,.4988,.4957],[.7627,.5047,.4983],[.7644,.5107,.501],[.7661,.5167,.5036],[.7678,.5224,.5062],[.7695,.5282,.5087],[.7712,.5339,.5113],[.7729,.5396,.5139],[.7746,.5451,.5164],[.7763,.5506,.5189],[.778,.5561,.5214],[.7796,.5615,.5239],[.7813,.5669,.5264],[.783,.5721,.5289],[.7847,.5774,.5313],[.7863,.5827,.5338],[.788,.5878,.5363],[.7896,.5929,.5387],[.7913,.598,.5411],[.7929,.6031,.5435],[.7946,.608,.5459],[.7962,.613,.5483],[.7979,.6179,.5507],[.7995,.6228,.5531],[.8011,.6276,.5554],[.8028,.6324,.5578],[.8044,.6372,.5601],[.806,.6419,.5624],[.8076,.6466,.5648],[.8093,.6512,.5671],[.8109,.6559,.5694],[.8125,.6605,.5717],[.8141,.665,.5739],[.8157,.6695,.5762],[.8173,.674,.5785],[.8189,.6785,.5807],[.8205,.683,.583],[.8221,.6874,.5852],[.8237,.6918,.5874],[.8253,.6961,.5897],[.8268,.7005,.5919],[.8284,.7047,.5941],[.83,.709,.5963],[.8316,.7133,.5985],[.8331,.7175,.6006],[.8347,.7217,.6028],[.8363,.7259,.605],[.8378,.73,.6071],[.8394,.7342,.6093],[.8409,.7383,.6114],[.8425,.7423,.6136],[.844,.7464,.6157],[.8456,.7505,.6178],[.8471,.7545,.6199],[.8487,.7585,.622],[.8502,.7625,.6241],[.8518,.7664,.6262],[.8533,.7703,.6283],[.8548,.7742,.6304],[.8563,.7781,.6324],[.8579,.782,.6345],[.8594,.7859,.6366],[.8609,.7897,.6386],[.8624,.7935,.6407],[.8639,.7974,.6427],[.8655,.8011,.6447],[.867,.8049,.6467],[.8685,.8086,.6488],[.87,.8124,.6508],[.8715,.8161,.6528],[.873,.8198,.6548],[.8745,.8234,.6568],[.876,.8271,.6588],[.8775,.8308,.6607],[.8789,.8344,.6627],[.8804,.838,.6647],[.8819,.8416,.6667],[.8834,.8452,.6686],[.8849,.8487,.6706],[.8863,.8523,.6725],[.8878,.8559,.6745],[.8893,.8594,.6764],[.8908,.8629,.6783],[.8922,.8664,.6802],[.8937,.8699,.6822],[.8952,.8733,.6841],[.8966,.8768,.686],[.8981,.8802,.6879],[.8995,.8837,.6898],[.901,.8871,.6917],[.9024,.8905,.6936],[.9039,.8939,.6954],[.9053,.8972,.6973],[.9068,.9006,.6992],[.9082,.9039,.7011],[.9096,.9073,.7029],[.9111,.9106,.7048],[.9125,.9125,.7094],[.9139,.9139,.7148],[.9154,.9154,.7202],[.9168,.9168,.7256],[.9182,.9182,.7309],[.9196,.9196,.7362],[.9211,.9211,.7414],[.9225,.9225,.7467],[.9239,.9239,.7519],[.9253,.9253,.757],[.9267,.9267,.7621],[.9281,.9281,.7672],[.9295,.9295,.7722],[.9309,.9309,.7772],[.9323,.9323,.7822],[.9338,.9338,.7872],[.9352,.9352,.7921],[.9365,.9365,.7969],[.9379,.9379,.8018],[.9393,.9393,.8067],[.9407,.9407,.8115],[.9421,.9421,.8162],[.9435,.9435,.8209],[.9449,.9449,.8257],[.9463,.9463,.8304],[.9476,.9476,.835],[.949,.949,.8396],[.9504,.9504,.8443],[.9518,.9518,.8489],[.9531,.9531,.8534],[.9545,.9545,.8579],[.9559,.9559,.8625],[.9573,.9573,.867],[.9586,.9586,.8714],[.96,.96,.8758],[.9613,.9613,.8803],[.9627,.9627,.8847],[.9641,.9641,.889],[.9654,.9654,.8934],[.9668,.9668,.8977],[.9681,.9681,.9021],[.9695,.9695,.9063],[.9708,.9708,.9106],[.9722,.9722,.9149],[.9735,.9735,.9191],[.9748,.9748,.9233],[.9762,.9762,.9275],[.9775,.9775,.9317],[.9789,.9789,.9358],[.9802,.9802,.94],[.9815,.9815,.9441],[.9829,.9829,.9482],[.9842,.9842,.9523],[.9855,.9855,.9563],[.9868,.9868,.9604],[.9882,.9882,.9644],[.9895,.9895,.9685],[.9908,.9908,.9724],[.9921,.9921,.9764],[.9934,.9934,.9804],[.9948,.9948,.9844],[.9961,.9961,.9883],[.9974,.9974,.9922],[.9987,.9987,.9961],[1,1,1]]},plasma:{interpolate:!0,colors:[[.0504,.0298,.528],[.0635,.0284,.5331],[.0754,.0272,.538],[.0862,.0261,.5427],[.0964,.0252,.5471],[.106,.0243,.5514],[.1151,.0236,.5555],[.1239,.0229,.5594],[.1324,.0223,.5632],[.1406,.0217,.567],[.1486,.0212,.5706],[.1564,.0207,.5741],[.1641,.0202,.5775],[.1716,.0197,.5808],[.179,.0193,.5841],[.1862,.0188,.5872],[.1934,.0184,.5903],[.2004,.0179,.5934],[.2074,.0174,.5963],[.2144,.017,.5992],[.2212,.0165,.6021],[.228,.016,.6049],[.2347,.0155,.6076],[.2414,.015,.6103],[.248,.0144,.6129],[.2546,.0139,.6154],[.2612,.0133,.6179],[.2677,.0127,.6203],[.2742,.0121,.6227],[.2806,.0115,.625],[.2871,.0109,.6273],[.2935,.0102,.6295],[.2999,.0096,.6316],[.3062,.0089,.6337],[.3125,.0082,.6357],[.3189,.0076,.6376],[.3252,.0069,.6395],[.3314,.0063,.6413],[.3377,.0056,.643],[.3439,.005,.6447],[.3502,.0044,.6463],[.3564,.0038,.6478],[.3626,.0032,.6492],[.3687,.0027,.6506],[.3749,.0022,.6519],[.381,.0018,.6531],[.3872,.0014,.6542],[.3933,.0011,.6552],[.3994,9e-4,.6561],[.4055,7e-4,.657],[.4116,6e-4,.6577],[.4176,6e-4,.6584],[.4237,6e-4,.659],[.4297,8e-4,.6594],[.4357,.0011,.6598],[.4417,.0015,.6601],[.4477,.0021,.6602],[.4537,.0028,.6603],[.4596,.0036,.6603],[.4656,.0045,.6601],[.4715,.0057,.6599],[.4773,.007,.6595],[.4832,.0085,.6591],[.4891,.0101,.6585],[.4949,.012,.6579],[.5007,.0141,.6571],[.5065,.0163,.6562],[.5122,.0188,.6552],[.5179,.0216,.6541],[.5236,.0245,.6529],[.5293,.0277,.6516],[.535,.0312,.6502],[.5406,.035,.6486],[.5462,.039,.647],[.5517,.0431,.6453],[.5572,.0473,.6434],[.5627,.0515,.6415],[.5682,.0558,.6395],[.5736,.06,.6373],[.579,.0643,.6351],[.5844,.0686,.6328],[.5897,.0729,.6304],[.595,.0772,.6279],[.6003,.0815,.6253],[.6055,.0859,.6227],[.6107,.0902,.62],[.6158,.0946,.6171],[.6209,.0989,.6143],[.626,.1033,.6113],[.631,.1077,.6083],[.636,.1121,.6052],[.641,.1165,.6021],[.6459,.1209,.5989],[.6507,.1253,.5956],[.6556,.1297,.5923],[.6604,.1341,.589],[.6651,.1386,.5856],[.6698,.143,.5822],[.6745,.1474,.5787],[.6792,.1518,.5752],[.6838,.1563,.5717],[.6883,.1607,.5681],[.6928,.1651,.5645],[.6973,.1696,.5609],[.7018,.174,.5573],[.7062,.1784,.5537],[.7105,.1829,.55],[.7149,.1873,.5463],[.7192,.1917,.5427],[.7234,.1962,.539],[.7277,.2006,.5353],[.7319,.205,.5316],[.736,.2094,.5279],[.7401,.2139,.5242],[.7442,.2183,.5205],[.7483,.2227,.5168],[.7523,.2271,.5131],[.7563,.2316,.5095],[.7603,.236,.5058],[.7642,.2404,.5021],[.7681,.2448,.4985],[.772,.2492,.4948],[.7758,.2537,.4912],[.7796,.2581,.4875],[.7834,.2625,.4839],[.7871,.2669,.4803],[.7909,.2713,.4767],[.7945,.2758,.4731],[.7982,.2802,.4695],[.8019,.2846,.466],[.8055,.2891,.4624],[.8091,.2935,.4589],[.8126,.2979,.4553],[.8161,.3024,.4518],[.8197,.3068,.4483],[.8231,.3113,.4448],[.8266,.3157,.4413],[.83,.3202,.4378],[.8334,.3246,.4344],[.8368,.3291,.4309],[.8402,.3336,.4275],[.8435,.3381,.424],[.8468,.3426,.4206],[.8501,.347,.4172],[.8533,.3516,.4137],[.8565,.3561,.4103],[.8598,.3606,.4069],[.8629,.3651,.4035],[.8661,.3697,.4001],[.8692,.3742,.3967],[.8723,.3788,.3934],[.8754,.3833,.39],[.8784,.3879,.3866],[.8814,.3925,.3832],[.8844,.3971,.3799],[.8874,.4018,.3765],[.8903,.4064,.3731],[.8932,.411,.3698],[.8961,.4157,.3664],[.899,.4204,.363],[.9018,.4251,.3597],[.9046,.4298,.3563],[.9074,.4345,.353],[.9101,.4393,.3496],[.9128,.444,.3463],[.9155,.4488,.3429],[.9181,.4536,.3395],[.9207,.4584,.3362],[.9233,.4633,.3328],[.9258,.4681,.3294],[.9283,.473,.3261],[.9308,.4779,.3227],[.9332,.4828,.3193],[.9356,.4877,.316],[.938,.4927,.3126],[.9403,.4976,.3092],[.9426,.5026,.3058],[.9448,.5077,.3024],[.9471,.5127,.299],[.9492,.5178,.2957],[.9513,.5228,.2923],[.9534,.528,.2889],[.9555,.5331,.2855],[.9575,.5382,.2821],[.9594,.5434,.2787],[.9613,.5486,.2753],[.9632,.5539,.2719],[.965,.5591,.2685],[.9668,.5644,.2651],[.9685,.5697,.2617],[.9702,.575,.2583],[.9718,.5804,.2549],[.9734,.5858,.2515],[.9749,.5912,.2482],[.9764,.5966,.2448],[.9779,.6021,.2414],[.9792,.6075,.238],[.9806,.613,.2346],[.9818,.6186,.2313],[.983,.6241,.2279],[.9842,.6297,.2246],[.9853,.6353,.2213],[.9863,.641,.2179],[.9873,.6466,.2146],[.9883,.6523,.2114],[.9891,.658,.2081],[.9899,.6638,.2049],[.9907,.6696,.2016],[.9914,.6754,.1985],[.992,.6812,.1953],[.9925,.687,.1922],[.993,.6929,.1891],[.9935,.6988,.186],[.9938,.7047,.183],[.9941,.7107,.1801],[.9943,.7167,.1772],[.9945,.7227,.1744],[.9946,.7287,.1716],[.9946,.7348,.1689],[.9945,.7409,.1663],[.9944,.747,.1638],[.9941,.7531,.1614],[.9939,.7593,.1591],[.9935,.7655,.1569],[.993,.7717,.1548],[.9925,.778,.1529],[.9919,.7842,.151],[.9912,.7905,.1494],[.9904,.7969,.1479],[.9896,.8032,.1465],[.9886,.8096,.1454],[.9876,.816,.1444],[.9865,.8224,.1436],[.9853,.8288,.1429],[.984,.8353,.1425],[.9827,.8418,.1423],[.9812,.8483,.1423],[.9796,.8549,.1425],[.978,.8614,.1428],[.9763,.868,.1434],[.9744,.8746,.1441],[.9725,.8812,.1449],[.9705,.8879,.1459],[.9684,.8946,.147],[.9663,.9012,.1482],[.964,.908,.1494],[.9617,.9147,.1505],[.9593,.9214,.1516],[.9568,.9282,.1524],[.9543,.9349,.1529],[.9517,.9417,.1529],[.9492,.9484,.1522],[.9466,.9552,.1503],[.9442,.9619,.1469],[.9419,.9686,.141],[.94,.9752,.1313]]},prism:{interpolate:!0,colors:[[1,0,0],[1,0,0],[1,.1296,0],[1,.3203,0],[1,.5116,0],[1,.6909,0],[1,.8464,0],[1,.9679,0],[.889,1,0],[.6991,1,0],[.5073,1,0],[.3262,.9966,0],[.1678,.887,0],[.0425,.7408,.2247],[0,.5675,.4915],[0,.3785,.7259],[0,.1863,.9124],[0,.0036,1],[.1001,0,1],[.2431,0,1],[.4142,0,.9965],[.6022,0,.845],[.7946,0,.6378],[.9788,0,.3885],[1,0,.1136],[1,0,0],[1,.0561,0],[1,.2429,0],[1,.4354,0],[1,.6211,0],[1,.7875,0],[1,.9237,0],[.9619,1,0],[.7764,1,0],[.5838,1,0],[.3969,1,0],[.228,.9359,0],[.0883,.8034,.1123],[0,.6397,.3872],[0,.4555,.6367],[0,.2631,.8441],[0,.0751,.9959],[.0528,0,1],[.1817,0,1],[.3427,0,1],[.5254,0,.9132],[.7176,0,.7269],[.9066,0,.4927],[1,0,.2261],[1,0,0],[1,0,0],[1,.1664,0],[1,.3582,0],[1,.5481,0],[1,.7236,0],[1,.8732,0],[1,.987,0],[.8525,1,0],[.6612,1,0],[.4705,1,0],[.293,.9784,0],[.1403,.861,0],[.0226,.7086,.2788],[0,.5312,.5406],[0,.3406,.7667],[0,.1493,.9423],[.0121,0,1],[.1255,0,1],[.2748,0,1],[.4501,0,.9717],[.64,0,.8083],[.8318,0,.5917],[1,0,.336],[1,0,.0582],[1,0,0],[1,.0917,0],[1,.2806,0],[1,.4728,0],[1,.6556,0],[1,.8169,0],[1,.9461,0],[.9267,1,0],[.7387,1,0],[.5463,1,0],[.362,1,0],[.198,.9129,0],[.0651,.7735,.1674],[0,.6048,.4387],[0,.418,.6811],[0,.2255,.8786],[0,.0398,1],[.0751,0,1],[.2111,0,1],[.3772,0,1],[.5627,0,.8811],[.7553,0,.6843],[.9422,0,.4425],[1,0,.1714],[1,0,0],[1,.0195,0],[1,.2036,0],[1,.396,0],[1,.5841,0],[1,.7554,0],[1,.8987,0],[.9981,1,0],[.8155,1,0],[.6234,1,0],[.4343,1,0],[.2607,.9585,0],[.1142,.8336,.0542],[.0043,.6754,.3322],[0,.4945,.5883],[0,.3027,.8056],[0,.1128,.9698],[.0311,0,1],[.1522,0,1],[.3075,0,1],[.4866,0,.9444],[.6779,0,.7696],[.8686,0,.5441],[1,0,.2827],[1,0,.0027],[1,0,0],[1,.1279,0],[1,.3185,0],[1,.5098,0],[1,.6893,0],[1,.8451,0],[1,.9669,0],[.8908,1,0],[.7009,1,0],[.5091,1,0],[.3279,.9974,0],[.1692,.8883,0],[.0435,.7423,.2221],[0,.5692,.4891],[0,.3803,.7239],[0,.1881,.9109],[0,.0052,1],[.0989,0,1],[.2416,0,1],[.4125,0,.9976],[.6003,0,.8467],[.7928,0,.64],[.9772,0,.391],[1,0,.1163],[1,0,0],[1,.0543,0],[1,.241,0],[1,.4336,0],[1,.6194,0],[1,.786,0],[1,.9226,0],[.9636,1,0],[.7782,1,0],[.5856,1,0],[.3986,1,0],[.2295,.937,0],[.0895,.8049,.1096],[0,.6414,.3847],[0,.4574,.6344],[0,.2649,.8424],[0,.0768,.9947],[.0518,0,1],[.1803,0,1],[.3411,0,1],[.5236,0,.9147],[.7157,0,.729],[.9048,0,.4952],[1,0,.2287],[1,0,0],[1,0,0],[1,.1646,0],[1,.3563,0],[1,.5463,0],[1,.7221,0],[1,.872,0],[1,.9861,0],[.8543,1,0],[.6631,1,0],[.4723,1,0],[.2946,.9793,0],[.1416,.8623,0],[.0235,.7102,.2762],[0,.533,.5382],[0,.3425,.7648],[0,.1511,.9409],[.0112,0,1],[.1242,0,1],[.2732,0,1],[.4484,0,.9729],[.6381,0,.8102],[.83,0,.594],[1,0,.3386],[1,0,.061],[1,0,0],[1,.0899,0],[1,.2788,0],[1,.471,0],[1,.6539,0],[1,.8155,0],[1,.9451,0],[.9284,1,0],[.7406,1,0],[.5481,1,0],[.3637,1,0],[.1994,.914,0],[.0662,.7749,.1647],[0,.6065,.4362],[0,.4199,.679],[0,.2273,.877],[0,.0415,1],[.074,0,1],[.2096,0,1],[.3755,0,1],[.5609,0,.8827],[.7534,0,.6864],[.9405,0,.4449],[1,0,.1741],[1,0,0],[1,.0178,0],[1,.2017,0],[1,.3941,0],[1,.5823,0],[1,.7539,0],[1,.8974,0],[.9997,1,0],[.8173,1,0],[.6252,1,0],[.436,1,0],[.2623,.9595,0],[.1154,.8349,.0515],[.0051,.6771,.3296],[0,.4963,.586],[0,.3046,.8037],[0,.1146,.9685],[.0302,0,1],[.1509,0,1],[.3059,0,1],[.4848,0,.9458],[.676,0,.7716],[.8668,0,.5465],[1,0,.2854],[1,0,.0054],[1,0,0],[1,.1261,0],[1,.3166,0],[1,.508,0],[1,.6877,0],[1,.8437,0],[1,.966,0],[.8925,1,0],[.7028,1,0],[.5109,1,0],[.3295,.9983,0]]},rainbow:{interpolate:!0,colors:[[.5,0,1],[.4922,.0123,1],[.4843,.0246,.9999],[.4765,.037,.9998],[.4686,.0493,.9997],[.4608,.0616,.9995],[.4529,.0739,.9993],[.4451,.0861,.9991],[.4373,.0984,.9988],[.4294,.1107,.9985],[.4216,.1229,.9981],[.4137,.1351,.9977],[.4059,.1473,.9973],[.398,.1595,.9968],[.3902,.1716,.9963],[.3824,.1837,.9957],[.3745,.1958,.9951],[.3667,.2079,.9945],[.3588,.2199,.9939],[.351,.2319,.9932],[.3431,.2439,.9924],[.3353,.2558,.9916],[.3275,.2677,.9908],[.3196,.2796,.99],[.3118,.2914,.9891],[.3039,.3032,.9882],[.2961,.3149,.9872],[.2882,.3265,.9862],[.2804,.3382,.9852],[.2725,.3497,.9841],[.2647,.3612,.983],[.2569,.3727,.9818],[.249,.3841,.9806],[.2412,.3955,.9794],[.2333,.4067,.9781],[.2255,.418,.9768],[.2176,.4291,.9755],[.2098,.4402,.9741],[.202,.4512,.9727],[.1941,.4622,.9713],[.1863,.4731,.9698],[.1784,.4839,.9683],[.1706,.4947,.9667],[.1627,.5053,.9651],[.1549,.5159,.9635],[.1471,.5264,.9618],[.1392,.5369,.9601],[.1314,.5472,.9584],[.1235,.5575,.9566],[.1157,.5677,.9548],[.1078,.5778,.9529],[.1,.5878,.9511],[.0922,.5977,.9491],[.0843,.6075,.9472],[.0765,.6173,.9452],[.0686,.6269,.9432],[.0608,.6365,.9411],[.0529,.6459,.939],[.0451,.6553,.9369],[.0373,.6645,.9347],[.0294,.6737,.9325],[.0216,.6827,.9302],[.0137,.6917,.928],[.0059,.7005,.9256],[.002,.7093,.9233],[.0098,.7179,.9209],[.0176,.7264,.9185],[.0255,.7348,.916],[.0333,.7431,.9135],[.0412,.7513,.911],[.049,.7594,.9085],[.0569,.7674,.9059],[.0647,.7752,.9032],[.0725,.7829,.9006],[.0804,.7905,.8979],[.0882,.798,.8952],[.0961,.8054,.8924],[.1039,.8126,.8896],[.1118,.8197,.8868],[.1196,.8267,.8839],[.1275,.8336,.881],[.1353,.8403,.8781],[.1431,.847,.8751],[.151,.8534,.8721],[.1588,.8598,.8691],[.1667,.866,.866],[.1745,.8721,.8629],[.1824,.8781,.8598],[.1902,.8839,.8566],[.198,.8896,.8534],[.2059,.8952,.8502],[.2137,.9006,.847],[.2216,.9059,.8437],[.2294,.911,.8403],[.2373,.916,.837],[.2451,.9209,.8336],[.2529,.9256,.8302],[.2608,.9302,.8267],[.2686,.9347,.8233],[.2765,.939,.8197],[.2843,.9432,.8162],[.2922,.9472,.8126],[.3,.9511,.809],[.3078,.9548,.8054],[.3157,.9584,.8017],[.3235,.9618,.798],[.3314,.9651,.7943],[.3392,.9683,.7905],[.3471,.9713,.7867],[.3549,.9741,.7829],[.3627,.9768,.7791],[.3706,.9794,.7752],[.3784,.9818,.7713],[.3863,.9841,.7674],[.3941,.9862,.7634],[.402,.9882,.7594],[.4098,.99,.7554],[.4176,.9916,.7513],[.4255,.9932,.7473],[.4333,.9945,.7431],[.4412,.9957,.739],[.449,.9968,.7348],[.4569,.9977,.7307],[.4647,.9985,.7264],[.4725,.9991,.7222],[.4804,.9995,.7179],[.4882,.9998,.7136],[.4961,1,.7093],[.5039,1,.7049],[.5118,.9998,.7005],[.5196,.9995,.6961],[.5275,.9991,.6917],[.5353,.9985,.6872],[.5431,.9977,.6827],[.551,.9968,.6782],[.5588,.9957,.6737],[.5667,.9945,.6691],[.5745,.9932,.6645],[.5824,.9916,.6599],[.5902,.99,.6553],[.598,.9882,.6506],[.6059,.9862,.6459],[.6137,.9841,.6412],[.6216,.9818,.6365],[.6294,.9794,.6317],[.6373,.9768,.6269],[.6451,.9741,.6221],[.6529,.9713,.6173],[.6608,.9683,.6124],[.6686,.9651,.6075],[.6765,.9618,.6026],[.6843,.9584,.5977],[.6922,.9548,.5928],[.7,.9511,.5878],[.7078,.9472,.5828],[.7157,.9432,.5778],[.7235,.939,.5727],[.7314,.9347,.5677],[.7392,.9302,.5626],[.7471,.9256,.5575],[.7549,.9209,.5524],[.7627,.916,.5472],[.7706,.911,.5421],[.7784,.9059,.5369],[.7863,.9006,.5317],[.7941,.8952,.5264],[.802,.8896,.5212],[.8098,.8839,.5159],[.8176,.8781,.5106],[.8255,.8721,.5053],[.8333,.866,.5],[.8412,.8598,.4947],[.849,.8534,.4893],[.8569,.847,.4839],[.8647,.8403,.4785],[.8725,.8336,.4731],[.8804,.8267,.4677],[.8882,.8197,.4622],[.8961,.8126,.4567],[.9039,.8054,.4512],[.9118,.798,.4457],[.9196,.7905,.4402],[.9275,.7829,.4347],[.9353,.7752,.4291],[.9431,.7674,.4235],[.951,.7594,.418],[.9588,.7513,.4124],[.9667,.7431,.4067],[.9745,.7348,.4011],[.9824,.7264,.3955],[.9902,.7179,.3898],[.998,.7093,.3841],[1,.7005,.3784],[1,.6917,.3727],[1,.6827,.367],[1,.6737,.3612],[1,.6645,.3555],[1,.6553,.3497],[1,.6459,.3439],[1,.6365,.3382],[1,.6269,.3324],[1,.6173,.3265],[1,.6075,.3207],[1,.5977,.3149],[1,.5878,.309],[1,.5778,.3032],[1,.5677,.2973],[1,.5575,.2914],[1,.5472,.2855],[1,.5369,.2796],[1,.5264,.2737],[1,.5159,.2677],[1,.5053,.2618],[1,.4947,.2558],[1,.4839,.2499],[1,.4731,.2439],[1,.4622,.2379],[1,.4512,.2319],[1,.4402,.226],[1,.4291,.2199],[1,.418,.2139],[1,.4067,.2079],[1,.3955,.2019],[1,.3841,.1958],[1,.3727,.1898],[1,.3612,.1837],[1,.3497,.1777],[1,.3382,.1716],[1,.3265,.1656],[1,.3149,.1595],[1,.3032,.1534],[1,.2914,.1473],[1,.2796,.1412],[1,.2677,.1351],[1,.2558,.129],[1,.2439,.1229],[1,.2319,.1168],[1,.2199,.1107],[1,.2079,.1045],[1,.1958,.0984],[1,.1837,.0923],[1,.1716,.0861],[1,.1595,.08],[1,.1473,.0739],[1,.1351,.0677],[1,.1229,.0616],[1,.1107,.0554],[1,.0984,.0493],[1,.0861,.0431],[1,.0739,.037],[1,.0616,.0308],[1,.0493,.0246],[1,.037,.0185],[1,.0246,.0123],[1,.0123,.0062],[1,0,0]]},seismic:{interpolate:!0,colors:[[0,0,.3],[0,0,.311],[0,0,.322],[0,0,.3329],[0,0,.3439],[0,0,.3549],[0,0,.3659],[0,0,.3769],[0,0,.3878],[0,0,.3988],[0,0,.4098],[0,0,.4208],[0,0,.4318],[0,0,.4427],[0,0,.4537],[0,0,.4647],[0,0,.4757],[0,0,.4867],[0,0,.4976],[0,0,.5086],[0,0,.5196],[0,0,.5306],[0,0,.5416],[0,0,.5525],[0,0,.5635],[0,0,.5745],[0,0,.5855],[0,0,.5965],[0,0,.6075],[0,0,.6184],[0,0,.6294],[0,0,.6404],[0,0,.6514],[0,0,.6624],[0,0,.6733],[0,0,.6843],[0,0,.6953],[0,0,.7063],[0,0,.7173],[0,0,.7282],[0,0,.7392],[0,0,.7502],[0,0,.7612],[0,0,.7722],[0,0,.7831],[0,0,.7941],[0,0,.8051],[0,0,.8161],[0,0,.8271],[0,0,.838],[0,0,.849],[0,0,.86],[0,0,.871],[0,0,.882],[0,0,.8929],[0,0,.9039],[0,0,.9149],[0,0,.9259],[0,0,.9369],[0,0,.9478],[0,0,.9588],[0,0,.9698],[0,0,.9808],[0,0,.9918],[.0039,.0039,1],[.0196,.0196,1],[.0353,.0353,1],[.051,.051,1],[.0667,.0667,1],[.0824,.0824,1],[.098,.098,1],[.1137,.1137,1],[.1294,.1294,1],[.1451,.1451,1],[.1608,.1608,1],[.1765,.1765,1],[.1922,.1922,1],[.2078,.2078,1],[.2235,.2235,1],[.2392,.2392,1],[.2549,.2549,1],[.2706,.2706,1],[.2863,.2863,1],[.302,.302,1],[.3176,.3176,1],[.3333,.3333,1],[.349,.349,1],[.3647,.3647,1],[.3804,.3804,1],[.3961,.3961,1],[.4118,.4118,1],[.4275,.4275,1],[.4431,.4431,1],[.4588,.4588,1],[.4745,.4745,1],[.4902,.4902,1],[.5059,.5059,1],[.5216,.5216,1],[.5373,.5373,1],[.5529,.5529,1],[.5686,.5686,1],[.5843,.5843,1],[.6,.6,1],[.6157,.6157,1],[.6314,.6314,1],[.6471,.6471,1],[.6627,.6627,1],[.6784,.6784,1],[.6941,.6941,1],[.7098,.7098,1],[.7255,.7255,1],[.7412,.7412,1],[.7569,.7569,1],[.7725,.7725,1],[.7882,.7882,1],[.8039,.8039,1],[.8196,.8196,1],[.8353,.8353,1],[.851,.851,1],[.8667,.8667,1],[.8824,.8824,1],[.898,.898,1],[.9137,.9137,1],[.9294,.9294,1],[.9451,.9451,1],[.9608,.9608,1],[.9765,.9765,1],[.9922,.9922,1],[1,.9922,.9922],[1,.9765,.9765],[1,.9608,.9608],[1,.9451,.9451],[1,.9294,.9294],[1,.9137,.9137],[1,.898,.898],[1,.8824,.8824],[1,.8667,.8667],[1,.851,.851],[1,.8353,.8353],[1,.8196,.8196],[1,.8039,.8039],[1,.7882,.7882],[1,.7725,.7725],[1,.7569,.7569],[1,.7412,.7412],[1,.7255,.7255],[1,.7098,.7098],[1,.6941,.6941],[1,.6784,.6784],[1,.6627,.6627],[1,.6471,.6471],[1,.6314,.6314],[1,.6157,.6157],[1,.6,.6],[1,.5843,.5843],[1,.5686,.5686],[1,.5529,.5529],[1,.5373,.5373],[1,.5216,.5216],[1,.5059,.5059],[1,.4902,.4902],[1,.4745,.4745],[1,.4588,.4588],[1,.4431,.4431],[1,.4275,.4275],[1,.4118,.4118],[1,.3961,.3961],[1,.3804,.3804],[1,.3647,.3647],[1,.349,.349],[1,.3333,.3333],[1,.3176,.3176],[1,.302,.302],[1,.2863,.2863],[1,.2706,.2706],[1,.2549,.2549],[1,.2392,.2392],[1,.2235,.2235],[1,.2078,.2078],[1,.1922,.1922],[1,.1765,.1765],[1,.1608,.1608],[1,.1451,.1451],[1,.1294,.1294],[1,.1137,.1137],[1,.098,.098],[1,.0824,.0824],[1,.0667,.0667],[1,.051,.051],[1,.0353,.0353],[1,.0196,.0196],[1,.0039,.0039],[.9941,0,0],[.9863,0,0],[.9784,0,0],[.9706,0,0],[.9627,0,0],[.9549,0,0],[.9471,0,0],[.9392,0,0],[.9314,0,0],[.9235,0,0],[.9157,0,0],[.9078,0,0],[.9,0,0],[.8922,0,0],[.8843,0,0],[.8765,0,0],[.8686,0,0],[.8608,0,0],[.8529,0,0],[.8451,0,0],[.8373,0,0],[.8294,0,0],[.8216,0,0],[.8137,0,0],[.8059,0,0],[.798,0,0],[.7902,0,0],[.7824,0,0],[.7745,0,0],[.7667,0,0],[.7588,0,0],[.751,0,0],[.7431,0,0],[.7353,0,0],[.7275,0,0],[.7196,0,0],[.7118,0,0],[.7039,0,0],[.6961,0,0],[.6882,0,0],[.6804,0,0],[.6725,0,0],[.6647,0,0],[.6569,0,0],[.649,0,0],[.6412,0,0],[.6333,0,0],[.6255,0,0],[.6176,0,0],[.6098,0,0],[.602,0,0],[.5941,0,0],[.5863,0,0],[.5784,0,0],[.5706,0,0],[.5627,0,0],[.5549,0,0],[.5471,0,0],[.5392,0,0],[.5314,0,0],[.5235,0,0],[.5157,0,0],[.5078,0,0],[.5,0,0]]},spring:{interpolate:!0,colors:[[1,0,1],[1,.0039,.9961],[1,.0078,.9922],[1,.0118,.9882],[1,.0157,.9843],[1,.0196,.9804],[1,.0235,.9765],[1,.0275,.9725],[1,.0314,.9686],[1,.0353,.9647],[1,.0392,.9608],[1,.0431,.9569],[1,.0471,.9529],[1,.051,.949],[1,.0549,.9451],[1,.0588,.9412],[1,.0627,.9373],[1,.0667,.9333],[1,.0706,.9294],[1,.0745,.9255],[1,.0784,.9216],[1,.0824,.9176],[1,.0863,.9137],[1,.0902,.9098],[1,.0941,.9059],[1,.098,.902],[1,.102,.898],[1,.1059,.8941],[1,.1098,.8902],[1,.1137,.8863],[1,.1176,.8824],[1,.1216,.8784],[1,.1255,.8745],[1,.1294,.8706],[1,.1333,.8667],[1,.1373,.8627],[1,.1412,.8588],[1,.1451,.8549],[1,.149,.851],[1,.1529,.8471],[1,.1569,.8431],[1,.1608,.8392],[1,.1647,.8353],[1,.1686,.8314],[1,.1725,.8275],[1,.1765,.8235],[1,.1804,.8196],[1,.1843,.8157],[1,.1882,.8118],[1,.1922,.8078],[1,.1961,.8039],[1,.2,.8],[1,.2039,.7961],[1,.2078,.7922],[1,.2118,.7882],[1,.2157,.7843],[1,.2196,.7804],[1,.2235,.7765],[1,.2275,.7725],[1,.2314,.7686],[1,.2353,.7647],[1,.2392,.7608],[1,.2431,.7569],[1,.2471,.7529],[1,.251,.749],[1,.2549,.7451],[1,.2588,.7412],[1,.2627,.7373],[1,.2667,.7333],[1,.2706,.7294],[1,.2745,.7255],[1,.2784,.7216],[1,.2824,.7176],[1,.2863,.7137],[1,.2902,.7098],[1,.2941,.7059],[1,.298,.702],[1,.302,.698],[1,.3059,.6941],[1,.3098,.6902],[1,.3137,.6863],[1,.3176,.6824],[1,.3216,.6784],[1,.3255,.6745],[1,.3294,.6706],[1,.3333,.6667],[1,.3373,.6627],[1,.3412,.6588],[1,.3451,.6549],[1,.349,.651],[1,.3529,.6471],[1,.3569,.6431],[1,.3608,.6392],[1,.3647,.6353],[1,.3686,.6314],[1,.3725,.6275],[1,.3765,.6235],[1,.3804,.6196],[1,.3843,.6157],[1,.3882,.6118],[1,.3922,.6078],[1,.3961,.6039],[1,.4,.6],[1,.4039,.5961],[1,.4078,.5922],[1,.4118,.5882],[1,.4157,.5843],[1,.4196,.5804],[1,.4235,.5765],[1,.4275,.5725],[1,.4314,.5686],[1,.4353,.5647],[1,.4392,.5608],[1,.4431,.5569],[1,.4471,.5529],[1,.451,.549],[1,.4549,.5451],[1,.4588,.5412],[1,.4627,.5373],[1,.4667,.5333],[1,.4706,.5294],[1,.4745,.5255],[1,.4784,.5216],[1,.4824,.5176],[1,.4863,.5137],[1,.4902,.5098],[1,.4941,.5059],[1,.498,.502],[1,.502,.498],[1,.5059,.4941],[1,.5098,.4902],[1,.5137,.4863],[1,.5176,.4824],[1,.5216,.4784],[1,.5255,.4745],[1,.5294,.4706],[1,.5333,.4667],[1,.5373,.4627],[1,.5412,.4588],[1,.5451,.4549],[1,.549,.451],[1,.5529,.4471],[1,.5569,.4431],[1,.5608,.4392],[1,.5647,.4353],[1,.5686,.4314],[1,.5725,.4275],[1,.5765,.4235],[1,.5804,.4196],[1,.5843,.4157],[1,.5882,.4118],[1,.5922,.4078],[1,.5961,.4039],[1,.6,.4],[1,.6039,.3961],[1,.6078,.3922],[1,.6118,.3882],[1,.6157,.3843],[1,.6196,.3804],[1,.6235,.3765],[1,.6275,.3725],[1,.6314,.3686],[1,.6353,.3647],[1,.6392,.3608],[1,.6431,.3569],[1,.6471,.3529],[1,.651,.349],[1,.6549,.3451],[1,.6588,.3412],[1,.6627,.3373],[1,.6667,.3333],[1,.6706,.3294],[1,.6745,.3255],[1,.6784,.3216],[1,.6824,.3176],[1,.6863,.3137],[1,.6902,.3098],[1,.6941,.3059],[1,.698,.302],[1,.702,.298],[1,.7059,.2941],[1,.7098,.2902],[1,.7137,.2863],[1,.7176,.2824],[1,.7216,.2784],[1,.7255,.2745],[1,.7294,.2706],[1,.7333,.2667],[1,.7373,.2627],[1,.7412,.2588],[1,.7451,.2549],[1,.749,.251],[1,.7529,.2471],[1,.7569,.2431],[1,.7608,.2392],[1,.7647,.2353],[1,.7686,.2314],[1,.7725,.2275],[1,.7765,.2235],[1,.7804,.2196],[1,.7843,.2157],[1,.7882,.2118],[1,.7922,.2078],[1,.7961,.2039],[1,.8,.2],[1,.8039,.1961],[1,.8078,.1922],[1,.8118,.1882],[1,.8157,.1843],[1,.8196,.1804],[1,.8235,.1765],[1,.8275,.1725],[1,.8314,.1686],[1,.8353,.1647],[1,.8392,.1608],[1,.8431,.1569],[1,.8471,.1529],[1,.851,.149],[1,.8549,.1451],[1,.8588,.1412],[1,.8627,.1373],[1,.8667,.1333],[1,.8706,.1294],[1,.8745,.1255],[1,.8784,.1216],[1,.8824,.1176],[1,.8863,.1137],[1,.8902,.1098],[1,.8941,.1059],[1,.898,.102],[1,.902,.098],[1,.9059,.0941],[1,.9098,.0902],[1,.9137,.0863],[1,.9176,.0824],[1,.9216,.0784],[1,.9255,.0745],[1,.9294,.0706],[1,.9333,.0667],[1,.9373,.0627],[1,.9412,.0588],[1,.9451,.0549],[1,.949,.051],[1,.9529,.0471],[1,.9569,.0431],[1,.9608,.0392],[1,.9647,.0353],[1,.9686,.0314],[1,.9725,.0275],[1,.9765,.0235],[1,.9804,.0196],[1,.9843,.0157],[1,.9882,.0118],[1,.9922,.0078],[1,.9961,.0039],[1,1,0]]},summer:{interpolate:!0,colors:[[0,.5,.4],[.0039,.502,.4],[.0078,.5039,.4],[.0118,.5059,.4],[.0157,.5078,.4],[.0196,.5098,.4],[.0235,.5118,.4],[.0275,.5137,.4],[.0314,.5157,.4],[.0353,.5176,.4],[.0392,.5196,.4],[.0431,.5216,.4],[.0471,.5235,.4],[.051,.5255,.4],[.0549,.5275,.4],[.0588,.5294,.4],[.0627,.5314,.4],[.0667,.5333,.4],[.0706,.5353,.4],[.0745,.5373,.4],[.0784,.5392,.4],[.0824,.5412,.4],[.0863,.5431,.4],[.0902,.5451,.4],[.0941,.5471,.4],[.098,.549,.4],[.102,.551,.4],[.1059,.5529,.4],[.1098,.5549,.4],[.1137,.5569,.4],[.1176,.5588,.4],[.1216,.5608,.4],[.1255,.5627,.4],[.1294,.5647,.4],[.1333,.5667,.4],[.1373,.5686,.4],[.1412,.5706,.4],[.1451,.5725,.4],[.149,.5745,.4],[.1529,.5765,.4],[.1569,.5784,.4],[.1608,.5804,.4],[.1647,.5824,.4],[.1686,.5843,.4],[.1725,.5863,.4],[.1765,.5882,.4],[.1804,.5902,.4],[.1843,.5922,.4],[.1882,.5941,.4],[.1922,.5961,.4],[.1961,.598,.4],[.2,.6,.4],[.2039,.602,.4],[.2078,.6039,.4],[.2118,.6059,.4],[.2157,.6078,.4],[.2196,.6098,.4],[.2235,.6118,.4],[.2275,.6137,.4],[.2314,.6157,.4],[.2353,.6176,.4],[.2392,.6196,.4],[.2431,.6216,.4],[.2471,.6235,.4],[.251,.6255,.4],[.2549,.6275,.4],[.2588,.6294,.4],[.2627,.6314,.4],[.2667,.6333,.4],[.2706,.6353,.4],[.2745,.6373,.4],[.2784,.6392,.4],[.2824,.6412,.4],[.2863,.6431,.4],[.2902,.6451,.4],[.2941,.6471,.4],[.298,.649,.4],[.302,.651,.4],[.3059,.6529,.4],[.3098,.6549,.4],[.3137,.6569,.4],[.3176,.6588,.4],[.3216,.6608,.4],[.3255,.6627,.4],[.3294,.6647,.4],[.3333,.6667,.4],[.3373,.6686,.4],[.3412,.6706,.4],[.3451,.6725,.4],[.349,.6745,.4],[.3529,.6765,.4],[.3569,.6784,.4],[.3608,.6804,.4],[.3647,.6824,.4],[.3686,.6843,.4],[.3725,.6863,.4],[.3765,.6882,.4],[.3804,.6902,.4],[.3843,.6922,.4],[.3882,.6941,.4],[.3922,.6961,.4],[.3961,.698,.4],[.4,.7,.4],[.4039,.702,.4],[.4078,.7039,.4],[.4118,.7059,.4],[.4157,.7078,.4],[.4196,.7098,.4],[.4235,.7118,.4],[.4275,.7137,.4],[.4314,.7157,.4],[.4353,.7176,.4],[.4392,.7196,.4],[.4431,.7216,.4],[.4471,.7235,.4],[.451,.7255,.4],[.4549,.7275,.4],[.4588,.7294,.4],[.4627,.7314,.4],[.4667,.7333,.4],[.4706,.7353,.4],[.4745,.7373,.4],[.4784,.7392,.4],[.4824,.7412,.4],[.4863,.7431,.4],[.4902,.7451,.4],[.4941,.7471,.4],[.498,.749,.4],[.502,.751,.4],[.5059,.7529,.4],[.5098,.7549,.4],[.5137,.7569,.4],[.5176,.7588,.4],[.5216,.7608,.4],[.5255,.7627,.4],[.5294,.7647,.4],[.5333,.7667,.4],[.5373,.7686,.4],[.5412,.7706,.4],[.5451,.7725,.4],[.549,.7745,.4],[.5529,.7765,.4],[.5569,.7784,.4],[.5608,.7804,.4],[.5647,.7824,.4],[.5686,.7843,.4],[.5725,.7863,.4],[.5765,.7882,.4],[.5804,.7902,.4],[.5843,.7922,.4],[.5882,.7941,.4],[.5922,.7961,.4],[.5961,.798,.4],[.6,.8,.4],[.6039,.802,.4],[.6078,.8039,.4],[.6118,.8059,.4],[.6157,.8078,.4],[.6196,.8098,.4],[.6235,.8118,.4],[.6275,.8137,.4],[.6314,.8157,.4],[.6353,.8176,.4],[.6392,.8196,.4],[.6431,.8216,.4],[.6471,.8235,.4],[.651,.8255,.4],[.6549,.8275,.4],[.6588,.8294,.4],[.6627,.8314,.4],[.6667,.8333,.4],[.6706,.8353,.4],[.6745,.8373,.4],[.6784,.8392,.4],[.6824,.8412,.4],[.6863,.8431,.4],[.6902,.8451,.4],[.6941,.8471,.4],[.698,.849,.4],[.702,.851,.4],[.7059,.8529,.4],[.7098,.8549,.4],[.7137,.8569,.4],[.7176,.8588,.4],[.7216,.8608,.4],[.7255,.8627,.4],[.7294,.8647,.4],[.7333,.8667,.4],[.7373,.8686,.4],[.7412,.8706,.4],[.7451,.8725,.4],[.749,.8745,.4],[.7529,.8765,.4],[.7569,.8784,.4],[.7608,.8804,.4],[.7647,.8824,.4],[.7686,.8843,.4],[.7725,.8863,.4],[.7765,.8882,.4],[.7804,.8902,.4],[.7843,.8922,.4],[.7882,.8941,.4],[.7922,.8961,.4],[.7961,.898,.4],[.8,.9,.4],[.8039,.902,.4],[.8078,.9039,.4],[.8118,.9059,.4],[.8157,.9078,.4],[.8196,.9098,.4],[.8235,.9118,.4],[.8275,.9137,.4],[.8314,.9157,.4],[.8353,.9176,.4],[.8392,.9196,.4],[.8431,.9216,.4],[.8471,.9235,.4],[.851,.9255,.4],[.8549,.9275,.4],[.8588,.9294,.4],[.8627,.9314,.4],[.8667,.9333,.4],[.8706,.9353,.4],[.8745,.9373,.4],[.8784,.9392,.4],[.8824,.9412,.4],[.8863,.9431,.4],[.8902,.9451,.4],[.8941,.9471,.4],[.898,.949,.4],[.902,.951,.4],[.9059,.9529,.4],[.9098,.9549,.4],[.9137,.9569,.4],[.9176,.9588,.4],[.9216,.9608,.4],[.9255,.9627,.4],[.9294,.9647,.4],[.9333,.9667,.4],[.9373,.9686,.4],[.9412,.9706,.4],[.9451,.9725,.4],[.949,.9745,.4],[.9529,.9765,.4],[.9569,.9784,.4],[.9608,.9804,.4],[.9647,.9824,.4],[.9686,.9843,.4],[.9725,.9863,.4],[.9765,.9882,.4],[.9804,.9902,.4],[.9843,.9922,.4],[.9882,.9941,.4],[.9922,.9961,.4],[.9961,.998,.4],[1,1,.4]]},tab10:{interpolate:!1,colors:[[.1216,.4667,.7059],[1,.498,.0549],[.1725,.6275,.1725],[.8392,.1529,.1569],[.5804,.4039,.7412],[.549,.3373,.2941],[.8902,.4667,.7608],[.498,.498,.498],[.7373,.7412,.1333],[.0902,.7451,.8118]]},tab20:{interpolate:!1,colors:[[.1216,.4667,.7059],[.6824,.7804,.9098],[1,.498,.0549],[1,.7333,.4706],[.1725,.6275,.1725],[.5961,.8745,.5412],[.8392,.1529,.1569],[1,.5961,.5882],[.5804,.4039,.7412],[.7725,.6902,.8353],[.549,.3373,.2941],[.7686,.6118,.5804],[.8902,.4667,.7608],[.9686,.7137,.8235],[.498,.498,.498],[.7804,.7804,.7804],[.7373,.7412,.1333],[.8588,.8588,.5529],[.0902,.7451,.8118],[.6196,.8549,.898]]},tab20b:{interpolate:!1,colors:[[.2235,.2314,.4745],[.3216,.3294,.6392],[.4196,.4314,.8118],[.6118,.6196,.8706],[.3882,.4745,.2235],[.549,.6353,.3216],[.7098,.8118,.4196],[.8078,.8588,.6118],[.549,.4275,.1922],[.7412,.6196,.2235],[.9059,.7294,.3216],[.9059,.7961,.5804],[.5176,.2353,.2235],[.6784,.2863,.2902],[.8392,.3804,.4196],[.9059,.5882,.6118],[.4824,.2549,.451],[.6471,.3176,.5804],[.8078,.4275,.7412],[.8706,.6196,.8392]]},tab20c:{interpolate:!1,colors:[[.1922,.5098,.7412],[.4196,.6824,.8392],[.6196,.7922,.8824],[.7765,.8588,.9373],[.902,.3333,.051],[.9922,.5529,.2353],[.9922,.6824,.4196],[.9922,.8157,.6353],[.1922,.6392,.3294],[.4549,.7686,.4627],[.6314,.851,.6078],[.7804,.9137,.7529],[.4588,.4196,.6941],[.6196,.6039,.7843],[.7373,.7412,.8627],[.8549,.8549,.9216],[.3882,.3882,.3882],[.5882,.5882,.5882],[.7412,.7412,.7412],[.851,.851,.851]]},terrain:{interpolate:!0,colors:[[.2,.2,.6],[.1948,.2105,.6105],[.1895,.2209,.6209],[.1843,.2314,.6314],[.1791,.2418,.6418],[.1739,.2523,.6523],[.1686,.2627,.6627],[.1634,.2732,.6732],[.1582,.2837,.6837],[.1529,.2941,.6941],[.1477,.3046,.7046],[.1425,.315,.715],[.1373,.3255,.7255],[.132,.3359,.7359],[.1268,.3464,.7464],[.1216,.3569,.7569],[.1163,.3673,.7673],[.1111,.3778,.7778],[.1059,.3882,.7882],[.1007,.3987,.7987],[.0954,.4092,.8092],[.0902,.4196,.8196],[.085,.4301,.8301],[.0797,.4405,.8405],[.0745,.451,.851],[.0693,.4614,.8614],[.0641,.4719,.8719],[.0588,.4824,.8824],[.0536,.4928,.8928],[.0484,.5033,.9033],[.0431,.5137,.9137],[.0379,.5242,.9242],[.0327,.5346,.9346],[.0275,.5451,.9451],[.0222,.5556,.9556],[.017,.566,.966],[.0118,.5765,.9765],[.0065,.5869,.9869],[.0013,.5974,.9974],[0,.6059,.9824],[0,.6137,.9588],[0,.6216,.9353],[0,.6294,.9118],[0,.6373,.8882],[0,.6451,.8647],[0,.6529,.8412],[0,.6608,.8176],[0,.6686,.7941],[0,.6765,.7706],[0,.6843,.7471],[0,.6922,.7235],[0,.7,.7],[0,.7078,.6765],[0,.7157,.6529],[0,.7235,.6294],[0,.7314,.6059],[0,.7392,.5824],[0,.7471,.5588],[0,.7549,.5353],[0,.7627,.5118],[0,.7706,.4882],[0,.7784,.4647],[0,.7863,.4412],[0,.7941,.4176],[.0039,.8008,.4008],[.0196,.8039,.4039],[.0353,.8071,.4071],[.051,.8102,.4102],[.0667,.8133,.4133],[.0824,.8165,.4165],[.098,.8196,.4196],[.1137,.8227,.4227],[.1294,.8259,.4259],[.1451,.829,.429],[.1608,.8322,.4322],[.1765,.8353,.4353],[.1922,.8384,.4384],[.2078,.8416,.4416],[.2235,.8447,.4447],[.2392,.8478,.4478],[.2549,.851,.451],[.2706,.8541,.4541],[.2863,.8573,.4573],[.302,.8604,.4604],[.3176,.8635,.4635],[.3333,.8667,.4667],[.349,.8698,.4698],[.3647,.8729,.4729],[.3804,.8761,.4761],[.3961,.8792,.4792],[.4118,.8824,.4824],[.4275,.8855,.4855],[.4431,.8886,.4886],[.4588,.8918,.4918],[.4745,.8949,.4949],[.4902,.898,.498],[.5059,.9012,.5012],[.5216,.9043,.5043],[.5373,.9075,.5075],[.5529,.9106,.5106],[.5686,.9137,.5137],[.5843,.9169,.5169],[.6,.92,.52],[.6157,.9231,.5231],[.6314,.9263,.5263],[.6471,.9294,.5294],[.6627,.9325,.5325],[.6784,.9357,.5357],[.6941,.9388,.5388],[.7098,.942,.542],[.7255,.9451,.5451],[.7412,.9482,.5482],[.7569,.9514,.5514],[.7725,.9545,.5545],[.7882,.9576,.5576],[.8039,.9608,.5608],[.8196,.9639,.5639],[.8353,.9671,.5671],[.851,.9702,.5702],[.8667,.9733,.5733],[.8824,.9765,.5765],[.898,.9796,.5796],[.9137,.9827,.5827],[.9294,.9859,.5859],[.9451,.989,.589],[.9608,.9922,.5922],[.9765,.9953,.5953],[.9922,.9984,.5984],[.9961,.995,.5979],[.9882,.9849,.5936],[.9804,.9749,.5894],[.9725,.9649,.5852],[.9647,.9548,.5809],[.9569,.9448,.5767],[.949,.9347,.5725],[.9412,.9247,.5682],[.9333,.9147,.564],[.9255,.9046,.5598],[.9176,.8946,.5555],[.9098,.8845,.5513],[.902,.8745,.5471],[.8941,.8645,.5428],[.8863,.8544,.5386],[.8784,.8444,.5344],[.8706,.8344,.5301],[.8627,.8243,.5259],[.8549,.8143,.5216],[.8471,.8042,.5174],[.8392,.7942,.5132],[.8314,.7842,.5089],[.8235,.7741,.5047],[.8157,.7641,.5005],[.8078,.754,.4962],[.8,.744,.492],[.7922,.734,.4878],[.7843,.7239,.4835],[.7765,.7139,.4793],[.7686,.7038,.4751],[.7608,.6938,.4708],[.7529,.6838,.4666],[.7451,.6737,.4624],[.7373,.6637,.4581],[.7294,.6536,.4539],[.7216,.6436,.4496],[.7137,.6336,.4454],[.7059,.6235,.4412],[.698,.6135,.4369],[.6902,.6035,.4327],[.6824,.5934,.4285],[.6745,.5834,.4242],[.6667,.5733,.42],[.6588,.5633,.4158],[.651,.5533,.4115],[.6431,.5432,.4073],[.6353,.5332,.4031],[.6275,.5231,.3988],[.6196,.5131,.3946],[.6118,.5031,.3904],[.6039,.493,.3861],[.5961,.483,.3819],[.5882,.4729,.3776],[.5804,.4629,.3734],[.5725,.4529,.3692],[.5647,.4428,.3649],[.5569,.4328,.3607],[.549,.4227,.3565],[.5412,.4127,.3522],[.5333,.4027,.348],[.5255,.3926,.3438],[.5176,.3826,.3395],[.5098,.3725,.3353],[.502,.3625,.3311],[.5059,.3675,.3379],[.5137,.3776,.3484],[.5216,.3876,.3589],[.5294,.3976,.3694],[.5373,.4077,.3799],[.5451,.4177,.3904],[.5529,.4278,.4009],[.5608,.4378,.4115],[.5686,.4478,.422],[.5765,.4579,.4325],[.5843,.4679,.443],[.5922,.478,.4535],[.6,.488,.464],[.6078,.498,.4745],[.6157,.5081,.485],[.6235,.5181,.4955],[.6314,.5282,.506],[.6392,.5382,.5165],[.6471,.5482,.5271],[.6549,.5583,.5376],[.6627,.5683,.5481],[.6706,.5784,.5586],[.6784,.5884,.5691],[.6863,.5984,.5796],[.6941,.6085,.5901],[.702,.6185,.6006],[.7098,.6285,.6111],[.7176,.6386,.6216],[.7255,.6486,.6322],[.7333,.6587,.6427],[.7412,.6687,.6532],[.749,.6787,.6637],[.7569,.6888,.6742],[.7647,.6988,.6847],[.7725,.7089,.6952],[.7804,.7189,.7057],[.7882,.7289,.7162],[.7961,.739,.7267],[.8039,.749,.7373],[.8118,.7591,.7478],[.8196,.7691,.7583],[.8275,.7791,.7688],[.8353,.7892,.7793],[.8431,.7992,.7898],[.851,.8093,.8003],[.8588,.8193,.8108],[.8667,.8293,.8213],[.8745,.8394,.8318],[.8824,.8494,.8424],[.8902,.8595,.8529],[.898,.8695,.8634],[.9059,.8795,.8739],[.9137,.8896,.8844],[.9216,.8996,.8949],[.9294,.9096,.9054],[.9373,.9197,.9159],[.9451,.9297,.9264],[.9529,.9398,.9369],[.9608,.9498,.9475],[.9686,.9598,.958],[.9765,.9699,.9685],[.9843,.9799,.979],[.9922,.99,.9895],[1,1,1]]},turbo:{interpolate:!0,colors:[[.19,.0718,.2322],[.1948,.0834,.2615],[.1996,.095,.2902],[.2042,.1065,.3184],[.2086,.118,.3461],[.2129,.1295,.3731],[.2171,.1409,.3996],[.2211,.1522,.4256],[.225,.1635,.451],[.2288,.1748,.4758],[.2324,.186,.5],[.2358,.1972,.5237],[.2392,.2083,.5469],[.2423,.2194,.5694],[.2454,.2304,.5914],[.2483,.2414,.6129],[.2511,.2524,.6337],[.2537,.2633,.6541],[.2562,.2741,.6738],[.2585,.2849,.693],[.2607,.2957,.7116],[.2628,.3064,.7297],[.2647,.3171,.7472],[.2665,.3277,.7641],[.2682,.3382,.7805],[.2697,.3488,.7963],[.271,.3593,.8116],[.2723,.3697,.8262],[.2733,.3801,.8404],[.2743,.3904,.8539],[.2751,.4007,.8669],[.2758,.411,.8794],[.2763,.4212,.8912],[.2767,.4313,.9025],[.2769,.4414,.9133],[.277,.4515,.9235],[.277,.4615,.9331],[.2768,.4715,.9421],[.2765,.4814,.9506],[.276,.4913,.9586],[.2754,.5012,.9659],[.2747,.5109,.9728],[.2738,.5207,.979],[.2727,.5304,.9846],[.2711,.5402,.9893],[.2688,.55,.993],[.2659,.5598,.9958],[.2625,.5697,.9977],[.2586,.5796,.9988],[.2542,.5895,.999],[.2495,.5994,.9984],[.2443,.6094,.997],[.2387,.6193,.9948],[.2329,.6292,.992],[.2268,.6391,.9885],[.2204,.649,.9844],[.2138,.6589,.9796],[.2071,.6687,.9742],[.2002,.6784,.9683],[.1933,.6881,.9619],[.1862,.6978,.955],[.1792,.7073,.9476],[.1722,.7168,.9398],[.1653,.7262,.9316],[.1584,.7355,.923],[.1517,.7447,.9142],[.1452,.7538,.905],[.1389,.7628,.8955],[.1328,.7716,.8858],[.127,.7804,.8759],[.1215,.789,.8658],[.1164,.7974,.8556],[.1117,.8057,.8452],[.1074,.8138,.8348],[.1036,.8218,.8244],[.1003,.8296,.8139],[.0975,.8371,.8034],[.0953,.8446,.793],[.0938,.8518,.7826],[.0929,.8588,.7724],[.0927,.8655,.7623],[.0932,.8721,.7524],[.0945,.8784,.7426],[.0966,.8845,.7332],[.0996,.8904,.7239],[.1034,.896,.715],[.1082,.9014,.706],[.1137,.9067,.6965],[.1201,.9119,.6866],[.1273,.917,.6763],[.1353,.922,.6656],[.1439,.9268,.6545],[.1532,.9315,.6431],[.1632,.9361,.6314],[.1738,.9405,.6194],[.1849,.9448,.6071],[.1966,.949,.5947],[.2088,.953,.582],[.2214,.9569,.5691],[.2345,.9606,.5561],[.248,.9642,.543],[.2618,.9676,.5298],[.276,.9709,.5165],[.2904,.974,.5032],[.3051,.977,.4899],[.3201,.9797,.4765],[.3352,.9823,.4632],[.3504,.9848,.45],[.3658,.987,.4369],[.3813,.9891,.4239],[.3968,.991,.411],[.4123,.9927,.3983],[.4278,.9942,.3858],[.4432,.9955,.3734],[.4585,.9966,.3614],[.4738,.9976,.3496],[.4888,.9983,.3382],[.5036,.9988,.327],[.5182,.9991,.3162],[.5326,.9992,.3058],[.5466,.9991,.2958],[.5603,.9987,.2862],[.5736,.9982,.2771],[.5865,.9974,.2685],[.5989,.9964,.2604],[.6109,.9951,.2528],[.6223,.9937,.2458],[.6332,.992,.2394],[.6436,.99,.2336],[.6539,.9878,.2284],[.6643,.9852,.2237],[.6746,.9825,.2196],[.6849,.9794,.216],[.6952,.9761,.2129],[.7055,.9726,.2103],[.7158,.9688,.2082],[.726,.9647,.2064],[.7361,.9604,.205],[.7462,.9559,.2041],[.7562,.9512,.2034],[.7661,.9463,.2031],[.7759,.9411,.2031],[.7856,.9358,.2034],[.7952,.9302,.2039],[.8047,.9245,.2046],[.8141,.9186,.2055],[.8233,.9125,.2066],[.8324,.9063,.2079],[.8413,.8999,.2093],[.8501,.8933,.2107],[.8587,.8866,.2123],[.8671,.8797,.2139],[.8753,.8727,.2156],[.8833,.8655,.2172],[.8911,.8583,.2188],[.8987,.8509,.2204],[.906,.8434,.2219],[.9132,.8358,.2233],[.92,.8281,.2246],[.9267,.8202,.2257],[.933,.8124,.2267],[.9391,.8044,.2274],[.9449,.7963,.228],[.9504,.7882,.2283],[.9556,.78,.2284],[.9605,.7718,.2281],[.9651,.7635,.2275],[.9693,.7552,.2266],[.9732,.7468,.2254],[.9768,.7384,.2237],[.98,.73,.2216],[.9829,.7214,.2192],[.9855,.7125,.2165],[.9878,.7033,.2136],[.9899,.6938,.2104],[.9916,.6841,.2071],[.9931,.6741,.2035],[.9944,.6639,.1997],[.9954,.6534,.1958],[.9961,.6428,.1916],[.9965,.6319,.1874],[.9968,.6209,.183],[.9967,.6098,.1784],[.9964,.5985,.1738],[.9959,.587,.169],[.9952,.5755,.1641],[.9942,.5639,.1592],[.993,.5521,.1542],[.9915,.5404,.1491],[.9899,.5285,.144],[.988,.5167,.1388],[.9859,.5048,.1337],[.9836,.4929,.1285],[.9811,.481,.1233],[.9784,.4692,.1182],[.9754,.4574,.113],[.9723,.4456,.108],[.969,.434,.1029],[.9656,.4224,.098],[.9619,.4109,.0931],[.958,.3996,.0883],[.954,.3884,.0836],[.9498,.3773,.079],[.9454,.3664,.0746],[.9408,.3557,.0703],[.9361,.3451,.0662],[.9312,.3348,.0622],[.9262,.3247,.0584],[.921,.3149,.0548],[.9157,.3053,.0513],[.9102,.296,.0481],[.9046,.287,.0452],[.8989,.2782,.0424],[.893,.2698,.0399],[.8869,.2615,.0375],[.8807,.2533,.0352],[.8742,.2453,.033],[.8676,.2373,.0308],[.8608,.2294,.0288],[.8538,.2217,.0268],[.8466,.2141,.0249],[.8393,.2065,.023],[.8317,.1991,.0213],[.824,.1918,.0197],[.8161,.1846,.0181],[.808,.1775,.0166],[.7997,.1706,.0152],[.7912,.1637,.0139],[.7826,.1569,.0126],[.7738,.1503,.0115],[.7648,.1437,.0104],[.7556,.1373,.0094],[.7462,.131,.0085],[.7366,.1248,.0077],[.7269,.1187,.007],[.7169,.1127,.0063],[.7068,.1068,.0057],[.6965,.101,.0052],[.686,.0954,.0048],[.6754,.0898,.0045],[.6645,.0844,.0042],[.6534,.079,.0041],[.6422,.0738,.004],[.6308,.0687,.004],[.6192,.0637,.0041],[.6075,.0588,.0043],[.5955,.054,.0045],[.5834,.0493,.0049],[.571,.0447,.0053],[.5585,.0403,.0058],[.5458,.0359,.0064],[.533,.0317,.007],[.5199,.0276,.0078],[.5066,.0235,.0086],[.4932,.0196,.0096],[.4796,.0158,.0106]]},twilight:{interpolate:!0,colors:[[.8858,.85,.888],[.8838,.8507,.8872],[.8817,.8513,.8864],[.8795,.8517,.8854],[.8772,.8519,.8843],[.8749,.8519,.8832],[.8723,.8518,.8819],[.8697,.8515,.8805],[.867,.8511,.8791],[.8641,.8505,.8776],[.8611,.8498,.876],[.858,.8489,.8743],[.8547,.8479,.8726],[.8513,.8467,.8709],[.8478,.8455,.869],[.8441,.8441,.8672],[.8403,.8426,.8653],[.8363,.8409,.8633],[.8322,.8392,.8613],[.828,.8374,.8592],[.8236,.8355,.8571],[.819,.8335,.855],[.8144,.8315,.8528],[.8096,.8293,.8506],[.8047,.8271,.8484],[.7997,.8248,.8462],[.7945,.8225,.8439],[.7893,.82,.8416],[.784,.8176,.8394],[.7786,.815,.8371],[.7731,.8124,.8348],[.7675,.8098,.8325],[.7619,.8071,.8303],[.7562,.8044,.828],[.7504,.8016,.8258],[.7446,.7988,.8236],[.7387,.796,.8214],[.7328,.7931,.8193],[.7269,.7902,.8172],[.721,.7872,.8151],[.715,.7843,.8131],[.709,.7813,.8111],[.703,.7782,.8092],[.697,.7752,.8073],[.691,.7721,.8055],[.6851,.769,.8037],[.6791,.7658,.802],[.6731,.7627,.8003],[.6672,.7595,.7986],[.6613,.7563,.797],[.6554,.7531,.7955],[.6496,.7499,.794],[.6438,.7466,.7926],[.638,.7433,.7912],[.6323,.74,.7898],[.6266,.7367,.7885],[.621,.7334,.7872],[.6154,.73,.786],[.6099,.7267,.7847],[.6044,.7233,.7836],[.599,.7199,.7825],[.5936,.7165,.7814],[.5883,.713,.7803],[.583,.7096,.7793],[.5778,.7061,.7783],[.5727,.7027,.7773],[.5676,.6992,.7763],[.5626,.6957,.7754],[.5576,.6922,.7745],[.5527,.6886,.7736],[.5478,.6851,.7728],[.5431,.6815,.7719],[.5383,.678,.7711],[.5337,.6744,.7703],[.5291,.6708,.7696],[.5246,.6672,.7688],[.5201,.6636,.7681],[.5157,.6599,.7673],[.5114,.6563,.7666],[.5071,.6526,.7659],[.5029,.649,.7652],[.4987,.6453,.7645],[.4947,.6416,.7639],[.4907,.6379,.7632],[.4867,.6342,.7626],[.4829,.6304,.7619],[.4791,.6267,.7613],[.4753,.6229,.7607],[.4717,.6192,.76],[.4681,.6154,.7594],[.4646,.6116,.7588],[.4611,.6078,.7582],[.4577,.6039,.7576],[.4544,.6001,.757],[.4512,.5962,.7564],[.448,.5924,.7557],[.4449,.5885,.7551],[.4419,.5846,.7545],[.439,.5807,.7539],[.4361,.5768,.7533],[.4333,.5729,.7527],[.4306,.5689,.752],[.4279,.565,.7514],[.4253,.561,.7508],[.4228,.557,.7501],[.4204,.553,.7494],[.418,.549,.7488],[.4157,.5449,.7481],[.4135,.5409,.7474],[.4114,.5368,.7467],[.4093,.5328,.746],[.4073,.5287,.7452],[.4053,.5246,.7445],[.4035,.5205,.7437],[.4017,.5164,.743],[.3999,.5122,.7422],[.3983,.5081,.7414],[.3967,.5039,.7405],[.3951,.4997,.7397],[.3937,.4955,.7388],[.3923,.4913,.7379],[.3909,.4871,.737],[.3896,.4828,.736],[.3884,.4786,.7351],[.3872,.4743,.7341],[.3861,.47,.7331],[.3851,.4657,.732],[.3841,.4614,.7309],[.3831,.4571,.7298],[.3822,.4527,.7287],[.3814,.4484,.7276],[.3806,.444,.7264],[.3798,.4396,.7251],[.3791,.4352,.7239],[.3784,.4308,.7226],[.3778,.4264,.7213],[.3772,.4219,.7199],[.3766,.4175,.7185],[.3761,.413,.7171],[.3756,.4086,.7156],[.3751,.4041,.7141],[.3747,.3996,.7126],[.3743,.395,.711],[.3739,.3905,.7094],[.3736,.386,.7077],[.3732,.3814,.706],[.3729,.3768,.7042],[.3726,.3723,.7024],[.3724,.3677,.7006],[.3721,.3631,.6987],[.3719,.3584,.6968],[.3716,.3538,.6948],[.3714,.3492,.6927],[.3712,.3445,.6907],[.3709,.3399,.6885],[.3707,.3352,.6863],[.3705,.3305,.6841],[.3703,.3258,.6818],[.3701,.3211,.6794],[.3699,.3164,.677],[.3697,.3117,.6746],[.3694,.3069,.6721],[.3692,.3022,.6695],[.369,.2974,.6668],[.3687,.2927,.6641],[.3684,.2879,.6613],[.3681,.2832,.6585],[.3678,.2784,.6556],[.3675,.2736,.6526],[.3672,.2688,.6496],[.3668,.264,.6465],[.3664,.2593,.6433],[.366,.2545,.64],[.3656,.2497,.6367],[.3651,.2449,.6333],[.3646,.2401,.6298],[.3641,.2354,.6262],[.3635,.2306,.6225],[.3629,.2258,.6188],[.3622,.2211,.615],[.3615,.2164,.611],[.3608,.2116,.607],[.36,.2069,.6029],[.3592,.2023,.5987],[.3583,.1976,.5944],[.3574,.193,.59],[.3564,.1884,.5855],[.3554,.1838,.5809],[.3543,.1793,.5762],[.3531,.1748,.5714],[.3519,.1703,.5665],[.3506,.166,.5615],[.3492,.1616,.5563],[.3478,.1573,.5511],[.3463,.1531,.5458],[.3447,.149,.5403],[.3431,.1449,.5347],[.3414,.1409,.5291],[.3395,.137,.5233],[.3376,.1332,.5174],[.3357,.1295,.5114],[.3336,.1259,.5054],[.3315,.1224,.4992],[.3292,.1191,.4929],[.3269,.1158,.4866],[.3245,.1126,.4802],[.322,.1096,.4737],[.3195,.1067,.4671],[.3168,.1039,.4605],[.3141,.1012,.4539],[.3113,.0987,.4472],[.3084,.0963,.4405],[.3055,.094,.4337],[.3025,.0918,.427],[.2994,.0897,.4202],[.2963,.0877,.4135],[.2931,.0859,.4067],[.2899,.0841,.4],[.2867,.0824,.3933],[.2834,.0809,.3867],[.2801,.0794,.3801],[.2768,.078,.3735],[.2734,.0767,.367],[.2701,.0755,.3606],[.2667,.0743,.3542],[.2634,.0733,.3479],[.26,.0723,.3417],[.2567,.0714,.3356],[.2534,.0705,.3296],[.2501,.0698,.3237],[.2469,.0691,.3179],[.2437,.0684,.3122],[.2405,.0679,.3066],[.2374,.0674,.3011],[.2343,.0669,.2957],[.2313,.0666,.2905],[.2284,.0663,.2854],[.2255,.0661,.2804],[.2227,.0659,.2756],[.22,.0659,.2709],[.2174,.0659,.2663],[.2148,.0659,.2619],[.2124,.0661,.2577],[.21,.0663,.2535],[.2077,.0666,.2495],[.2056,.067,.2457],[.2035,.0674,.2421],[.2016,.068,.2385],[.1997,.0686,.2352],[.1979,.0693,.2319],[.1961,.0703,.2287],[.1941,.0716,.2256],[.192,.0732,.2224],[.1898,.075,.2193],[.1874,.0771,.2162],[.1849,.0794,.2131],[.1877,.0773,.2139],[.1905,.0753,.2147],[.1932,.0736,.2154],[.1957,.0722,.2162],[.1982,.071,.2169],[.2006,.0701,.2176],[.2029,.0694,.2183],[.2053,.0689,.2191],[.2079,.0685,.22],[.2105,.0681,.221],[.2133,.0678,.2221],[.2163,.0676,.2232],[.2193,.0675,.2245],[.2225,.0674,.2259],[.2258,.0674,.2273],[.2292,.0674,.2288],[.2327,.0676,.2304],[.2363,.0677,.232],[.24,.068,.2337],[.2438,.0683,.2355],[.2477,.0687,.2373],[.2517,.0691,.2392],[.2558,.0695,.2411],[.26,.0701,.2431],[.2643,.0706,.2451],[.2686,.0712,.2471],[.273,.0719,.2492],[.2775,.0726,.2512],[.282,.0733,.2533],[.2866,.0741,.2554],[.2913,.0749,.2576],[.296,.0757,.2597],[.3008,.0766,.2618],[.3056,.0775,.2639],[.3105,.0785,.266],[.3154,.0794,.2681],[.3203,.0804,.2702],[.3253,.0814,.2723],[.3303,.0825,.2743],[.3353,.0835,.2763],[.3404,.0846,.2783],[.3455,.0857,.2803],[.3506,.0869,.2822],[.3557,.088,.2841],[.3609,.0892,.2859],[.3661,.0904,.2877],[.3712,.0917,.2895],[.3764,.0929,.2912],[.3816,.0942,.2928],[.3868,.0956,.2944],[.392,.0969,.296],[.3972,.0983,.2974],[.4024,.0997,.2989],[.4076,.1012,.3002],[.4128,.1027,.3015],[.418,.1042,.3028],[.4231,.1058,.304],[.4283,.1074,.3051],[.4334,.1091,.3061],[.4386,.1108,.3071],[.4437,.1125,.308],[.4488,.1144,.3089],[.4538,.1162,.3097],[.4589,.1181,.3104],[.4639,.1201,.3111],[.4689,.1222,.3117],[.4738,.1243,.3123],[.4788,.1264,.3127],[.4837,.1286,.3132],[.4885,.1309,.3135],[.4934,.1333,.3139],[.4981,.1357,.3141],[.5029,.1382,.3144],[.5076,.1407,.3145],[.5123,.1433,.3147],[.5169,.146,.3148],[.5215,.1487,.3148],[.526,.1515,.3148],[.5305,.1544,.3148],[.535,.1573,.3148],[.5394,.1602,.3147],[.5438,.1633,.3146],[.5481,.1664,.3145],[.5524,.1695,.3144],[.5566,.1727,.3142],[.5608,.1759,.3141],[.565,.1792,.3139],[.5691,.1826,.3137],[.5731,.186,.3136],[.5772,.1894,.3134],[.5811,.1929,.3132],[.5851,.1964,.3131],[.5889,.2,.3129],[.5928,.2036,.3127],[.5966,.2072,.3126],[.6004,.2109,.3124],[.6041,.2146,.3123],[.6078,.2184,.3122],[.6114,.2221,.3121],[.615,.2259,.3121],[.6186,.2298,.312],[.6221,.2337,.312],[.6256,.2376,.312],[.629,.2415,.312],[.6324,.2455,.312],[.6358,.2494,.3121],[.6391,.2535,.3122],[.6424,.2575,.3123],[.6457,.2616,.3125],[.6489,.2656,.3127],[.6521,.2697,.3129],[.6552,.2739,.3132],[.6583,.278,.3135],[.6614,.2822,.3138],[.6644,.2864,.3142],[.6674,.2906,.3146],[.6704,.2949,.315],[.6733,.2991,.3155],[.6762,.3034,.3161],[.6791,.3077,.3167],[.6819,.312,.3173],[.6847,.3163,.318],[.6874,.3207,.3187],[.6901,.3251,.3195],[.6928,.3295,.3203],[.6955,.3339,.3211],[.6981,.3383,.3221],[.7006,.3427,.3231],[.7032,.3472,.3241],[.7057,.3517,.3252],[.7081,.3561,.3263],[.7105,.3607,.3275],[.7129,.3652,.3288],[.7153,.3697,.3301],[.7176,.3743,.3315],[.7199,.3788,.333],[.7221,.3834,.3345],[.7243,.388,.3361],[.7265,.3926,.3377],[.7286,.3972,.3395],[.7307,.4019,.3412],[.7328,.4065,.3431],[.7348,.4112,.345],[.7368,.4159,.347],[.7388,.4205,.3491],[.7407,.4252,.3513],[.7426,.4299,.3535],[.7445,.4347,.3558],[.7463,.4394,.3582],[.748,.4441,.3607],[.7498,.4489,.3633],[.7515,.4536,.3659],[.7532,.4584,.3686],[.7548,.4632,.3714],[.7564,.468,.3743],[.758,.4728,.3773],[.7596,.4776,.3804],[.7611,.4824,.3835],[.7626,.4872,.3868],[.764,.492,.3901],[.7655,.4968,.3935],[.7669,.5017,.397],[.7682,.5065,.4006],[.7696,.5113,.4043],[.7709,.5162,.4081],[.7722,.521,.412],[.7734,.5259,.4159],[.7747,.5307,.42],[.7759,.5355,.4241],[.7771,.5404,.4284],[.7783,.5452,.4327],[.7795,.5501,.4371],[.7806,.5549,.4416],[.7817,.5598,.4462],[.7829,.5646,.4509],[.784,.5694,.4557],[.7851,.5742,.4606],[.7862,.5791,.4655],[.7872,.5839,.4706],[.7883,.5887,.4757],[.7894,.5935,.4809],[.7905,.5983,.4862],[.7915,.6031,.4916],[.7926,.6078,.4971],[.7937,.6126,.5026],[.7948,.6174,.5082],[.7958,.6221,.5139],[.7969,.6268,.5196],[.798,.6316,.5255],[.7992,.6363,.5313],[.8003,.641,.5373],[.8014,.6457,.5433],[.8026,.6503,.5494],[.8038,.655,.5556],[.805,.6596,.5618],[.8062,.6643,.568],[.8075,.6689,.5743],[.8087,.6735,.5807],[.81,.678,.5871],[.8114,.6826,.5936],[.8127,.6871,.6001],[.8141,.6916,.6066],[.8155,.6961,.6132],[.8169,.7006,.6198],[.8184,.7051,.6264],[.8199,.7095,.633],[.8214,.7139,.6397],[.8229,.7183,.6464],[.8245,.7226,.6531],[.8261,.727,.6599],[.8278,.7313,.6666],[.8294,.7355,.6733],[.8311,.7398,.6801],[.8328,.744,.6868],[.8346,.7481,.6936],[.8363,.7523,.7003],[.8381,.7564,.707],[.8399,.7604,.7137],[.8417,.7644,.7203],[.8435,.7684,.727],[.8453,.7723,.7336],[.8471,.7761,.7401],[.8489,.7799,.7466],[.8507,.7837,.7531],[.8525,.7873,.7595],[.8543,.791,.7658],[.856,.7945,.7721],[.8578,.798,.7783],[.8594,.8014,.7844],[.8611,.8048,.7904],[.8627,.8081,.7963],[.8642,.8112,.802],[.8656,.8144,.8077],[.8671,.8174,.8131],[.8684,.8203,.8184],[.8697,.8231,.8235],[.8709,.8259,.8284],[.8722,.8285,.833],[.8734,.831,.8375],[.8745,.8333,.8417],[.8757,.8355,.8458],[.8769,.8376,.8496],[.878,.8395,.8533],[.8791,.8413,.8569],[.8802,.8429,.8603],[.8812,.8443,.8636],[.8821,.8456,.8667],[.883,.8467,.8698],[.8837,.8476,.8727],[.8843,.8484,.8756],[.8849,.8491,.8783],[.8853,.8496,.8809],[.8855,.8499,.8834],[.8857,.85,.8857]]},twilight_shifted:{interpolate:!0,colors:[[.1874,.0771,.2162],[.1898,.075,.2193],[.192,.0732,.2224],[.1941,.0716,.2256],[.1961,.0703,.2287],[.1979,.0693,.2319],[.1997,.0686,.2352],[.2016,.068,.2385],[.2035,.0674,.2421],[.2056,.067,.2457],[.2077,.0666,.2495],[.21,.0663,.2535],[.2124,.0661,.2577],[.2148,.0659,.2619],[.2174,.0659,.2663],[.22,.0659,.2709],[.2227,.0659,.2756],[.2255,.0661,.2804],[.2284,.0663,.2854],[.2313,.0666,.2905],[.2343,.0669,.2957],[.2374,.0674,.3011],[.2405,.0679,.3066],[.2437,.0684,.3122],[.2469,.0691,.3179],[.2501,.0698,.3237],[.2534,.0705,.3296],[.2567,.0714,.3356],[.26,.0723,.3417],[.2634,.0733,.3479],[.2667,.0743,.3542],[.2701,.0755,.3606],[.2734,.0767,.367],[.2768,.078,.3735],[.2801,.0794,.3801],[.2834,.0809,.3867],[.2867,.0824,.3933],[.2899,.0841,.4],[.2931,.0859,.4067],[.2963,.0877,.4135],[.2994,.0897,.4202],[.3025,.0918,.427],[.3055,.094,.4337],[.3084,.0963,.4405],[.3113,.0987,.4472],[.3141,.1012,.4539],[.3168,.1039,.4605],[.3195,.1067,.4671],[.322,.1096,.4737],[.3245,.1126,.4802],[.3269,.1158,.4866],[.3292,.1191,.4929],[.3315,.1224,.4992],[.3336,.1259,.5054],[.3357,.1295,.5114],[.3376,.1332,.5174],[.3395,.137,.5233],[.3414,.1409,.5291],[.3431,.1449,.5347],[.3447,.149,.5403],[.3463,.1531,.5458],[.3478,.1573,.5511],[.3492,.1616,.5563],[.3506,.166,.5615],[.3519,.1703,.5665],[.3531,.1748,.5714],[.3543,.1793,.5762],[.3554,.1838,.5809],[.3564,.1884,.5855],[.3574,.193,.59],[.3583,.1976,.5944],[.3592,.2023,.5987],[.36,.2069,.6029],[.3608,.2116,.607],[.3615,.2164,.611],[.3622,.2211,.615],[.3629,.2258,.6188],[.3635,.2306,.6225],[.3641,.2354,.6262],[.3646,.2401,.6298],[.3651,.2449,.6333],[.3656,.2497,.6367],[.366,.2545,.64],[.3664,.2593,.6433],[.3668,.264,.6465],[.3672,.2688,.6496],[.3675,.2736,.6526],[.3678,.2784,.6556],[.3681,.2832,.6585],[.3684,.2879,.6613],[.3687,.2927,.6641],[.369,.2974,.6668],[.3692,.3022,.6695],[.3694,.3069,.6721],[.3697,.3117,.6746],[.3699,.3164,.677],[.3701,.3211,.6794],[.3703,.3258,.6818],[.3705,.3305,.6841],[.3707,.3352,.6863],[.3709,.3399,.6885],[.3712,.3445,.6907],[.3714,.3492,.6927],[.3716,.3538,.6948],[.3719,.3584,.6968],[.3721,.3631,.6987],[.3724,.3677,.7006],[.3726,.3723,.7024],[.3729,.3768,.7042],[.3732,.3814,.706],[.3736,.386,.7077],[.3739,.3905,.7094],[.3743,.395,.711],[.3747,.3996,.7126],[.3751,.4041,.7141],[.3756,.4086,.7156],[.3761,.413,.7171],[.3766,.4175,.7185],[.3772,.4219,.7199],[.3778,.4264,.7213],[.3784,.4308,.7226],[.3791,.4352,.7239],[.3798,.4396,.7251],[.3806,.444,.7264],[.3814,.4484,.7276],[.3822,.4527,.7287],[.3831,.4571,.7298],[.3841,.4614,.7309],[.3851,.4657,.732],[.3861,.47,.7331],[.3872,.4743,.7341],[.3884,.4786,.7351],[.3896,.4828,.736],[.3909,.4871,.737],[.3923,.4913,.7379],[.3937,.4955,.7388],[.3951,.4997,.7397],[.3967,.5039,.7405],[.3983,.5081,.7414],[.3999,.5122,.7422],[.4017,.5164,.743],[.4035,.5205,.7437],[.4053,.5246,.7445],[.4073,.5287,.7452],[.4093,.5328,.746],[.4114,.5368,.7467],[.4135,.5409,.7474],[.4157,.5449,.7481],[.418,.549,.7488],[.4204,.553,.7494],[.4228,.557,.7501],[.4253,.561,.7508],[.4279,.565,.7514],[.4306,.5689,.752],[.4333,.5729,.7527],[.4361,.5768,.7533],[.439,.5807,.7539],[.4419,.5846,.7545],[.4449,.5885,.7551],[.448,.5924,.7557],[.4512,.5962,.7564],[.4544,.6001,.757],[.4577,.6039,.7576],[.4611,.6078,.7582],[.4646,.6116,.7588],[.4681,.6154,.7594],[.4717,.6192,.76],[.4753,.6229,.7607],[.4791,.6267,.7613],[.4829,.6304,.7619],[.4867,.6342,.7626],[.4907,.6379,.7632],[.4947,.6416,.7639],[.4987,.6453,.7645],[.5029,.649,.7652],[.5071,.6526,.7659],[.5114,.6563,.7666],[.5157,.6599,.7673],[.5201,.6636,.7681],[.5246,.6672,.7688],[.5291,.6708,.7696],[.5337,.6744,.7703],[.5383,.678,.7711],[.5431,.6815,.7719],[.5478,.6851,.7728],[.5527,.6886,.7736],[.5576,.6922,.7745],[.5626,.6957,.7754],[.5676,.6992,.7763],[.5727,.7027,.7773],[.5778,.7061,.7783],[.583,.7096,.7793],[.5883,.713,.7803],[.5936,.7165,.7814],[.599,.7199,.7825],[.6044,.7233,.7836],[.6099,.7267,.7847],[.6154,.73,.786],[.621,.7334,.7872],[.6266,.7367,.7885],[.6323,.74,.7898],[.638,.7433,.7912],[.6438,.7466,.7926],[.6496,.7499,.794],[.6554,.7531,.7955],[.6613,.7563,.797],[.6672,.7595,.7986],[.6731,.7627,.8003],[.6791,.7658,.802],[.6851,.769,.8037],[.691,.7721,.8055],[.697,.7752,.8073],[.703,.7782,.8092],[.709,.7813,.8111],[.715,.7843,.8131],[.721,.7872,.8151],[.7269,.7902,.8172],[.7328,.7931,.8193],[.7387,.796,.8214],[.7446,.7988,.8236],[.7504,.8016,.8258],[.7562,.8044,.828],[.7619,.8071,.8303],[.7675,.8098,.8325],[.7731,.8124,.8348],[.7786,.815,.8371],[.784,.8176,.8394],[.7893,.82,.8416],[.7945,.8225,.8439],[.7997,.8248,.8462],[.8047,.8271,.8484],[.8096,.8293,.8506],[.8144,.8315,.8528],[.819,.8335,.855],[.8236,.8355,.8571],[.828,.8374,.8592],[.8322,.8392,.8613],[.8363,.8409,.8633],[.8403,.8426,.8653],[.8441,.8441,.8672],[.8478,.8455,.869],[.8513,.8467,.8709],[.8547,.8479,.8726],[.858,.8489,.8743],[.8611,.8498,.876],[.8641,.8505,.8776],[.867,.8511,.8791],[.8697,.8515,.8805],[.8723,.8518,.8819],[.8749,.8519,.8832],[.8772,.8519,.8843],[.8795,.8517,.8854],[.8817,.8513,.8864],[.8838,.8507,.8872],[.8858,.85,.888],[.8857,.85,.8857],[.8855,.8499,.8834],[.8853,.8496,.8809],[.8849,.8491,.8783],[.8843,.8484,.8756],[.8837,.8476,.8727],[.883,.8467,.8698],[.8821,.8456,.8667],[.8812,.8443,.8636],[.8802,.8429,.8603],[.8791,.8413,.8569],[.878,.8395,.8533],[.8769,.8376,.8496],[.8757,.8355,.8458],[.8745,.8333,.8417],[.8734,.831,.8375],[.8722,.8285,.833],[.8709,.8259,.8284],[.8697,.8231,.8235],[.8684,.8203,.8184],[.8671,.8174,.8131],[.8656,.8144,.8077],[.8642,.8112,.802],[.8627,.8081,.7963],[.8611,.8048,.7904],[.8594,.8014,.7844],[.8578,.798,.7783],[.856,.7945,.7721],[.8543,.791,.7658],[.8525,.7873,.7595],[.8507,.7837,.7531],[.8489,.7799,.7466],[.8471,.7761,.7401],[.8453,.7723,.7336],[.8435,.7684,.727],[.8417,.7644,.7203],[.8399,.7604,.7137],[.8381,.7564,.707],[.8363,.7523,.7003],[.8346,.7481,.6936],[.8328,.744,.6868],[.8311,.7398,.6801],[.8294,.7355,.6733],[.8278,.7313,.6666],[.8261,.727,.6599],[.8245,.7226,.6531],[.8229,.7183,.6464],[.8214,.7139,.6397],[.8199,.7095,.633],[.8184,.7051,.6264],[.8169,.7006,.6198],[.8155,.6961,.6132],[.8141,.6916,.6066],[.8127,.6871,.6001],[.8114,.6826,.5936],[.81,.678,.5871],[.8087,.6735,.5807],[.8075,.6689,.5743],[.8062,.6643,.568],[.805,.6596,.5618],[.8038,.655,.5556],[.8026,.6503,.5494],[.8014,.6457,.5433],[.8003,.641,.5373],[.7992,.6363,.5313],[.798,.6316,.5255],[.7969,.6268,.5196],[.7958,.6221,.5139],[.7948,.6174,.5082],[.7937,.6126,.5026],[.7926,.6078,.4971],[.7915,.6031,.4916],[.7905,.5983,.4862],[.7894,.5935,.4809],[.7883,.5887,.4757],[.7872,.5839,.4706],[.7862,.5791,.4655],[.7851,.5742,.4606],[.784,.5694,.4557],[.7829,.5646,.4509],[.7817,.5598,.4462],[.7806,.5549,.4416],[.7795,.5501,.4371],[.7783,.5452,.4327],[.7771,.5404,.4284],[.7759,.5355,.4241],[.7747,.5307,.42],[.7734,.5259,.4159],[.7722,.521,.412],[.7709,.5162,.4081],[.7696,.5113,.4043],[.7682,.5065,.4006],[.7669,.5017,.397],[.7655,.4968,.3935],[.764,.492,.3901],[.7626,.4872,.3868],[.7611,.4824,.3835],[.7596,.4776,.3804],[.758,.4728,.3773],[.7564,.468,.3743],[.7548,.4632,.3714],[.7532,.4584,.3686],[.7515,.4536,.3659],[.7498,.4489,.3633],[.748,.4441,.3607],[.7463,.4394,.3582],[.7445,.4347,.3558],[.7426,.4299,.3535],[.7407,.4252,.3513],[.7388,.4205,.3491],[.7368,.4159,.347],[.7348,.4112,.345],[.7328,.4065,.3431],[.7307,.4019,.3412],[.7286,.3972,.3395],[.7265,.3926,.3377],[.7243,.388,.3361],[.7221,.3834,.3345],[.7199,.3788,.333],[.7176,.3743,.3315],[.7153,.3697,.3301],[.7129,.3652,.3288],[.7105,.3607,.3275],[.7081,.3561,.3263],[.7057,.3517,.3252],[.7032,.3472,.3241],[.7006,.3427,.3231],[.6981,.3383,.3221],[.6955,.3339,.3211],[.6928,.3295,.3203],[.6901,.3251,.3195],[.6874,.3207,.3187],[.6847,.3163,.318],[.6819,.312,.3173],[.6791,.3077,.3167],[.6762,.3034,.3161],[.6733,.2991,.3155],[.6704,.2949,.315],[.6674,.2906,.3146],[.6644,.2864,.3142],[.6614,.2822,.3138],[.6583,.278,.3135],[.6552,.2739,.3132],[.6521,.2697,.3129],[.6489,.2656,.3127],[.6457,.2616,.3125],[.6424,.2575,.3123],[.6391,.2535,.3122],[.6358,.2494,.3121],[.6324,.2455,.312],[.629,.2415,.312],[.6256,.2376,.312],[.6221,.2337,.312],[.6186,.2298,.312],[.615,.2259,.3121],[.6114,.2221,.3121],[.6078,.2184,.3122],[.6041,.2146,.3123],[.6004,.2109,.3124],[.5966,.2072,.3126],[.5928,.2036,.3127],[.5889,.2,.3129],[.5851,.1964,.3131],[.5811,.1929,.3132],[.5772,.1894,.3134],[.5731,.186,.3136],[.5691,.1826,.3137],[.565,.1792,.3139],[.5608,.1759,.3141],[.5566,.1727,.3142],[.5524,.1695,.3144],[.5481,.1664,.3145],[.5438,.1633,.3146],[.5394,.1602,.3147],[.535,.1573,.3148],[.5305,.1544,.3148],[.526,.1515,.3148],[.5215,.1487,.3148],[.5169,.146,.3148],[.5123,.1433,.3147],[.5076,.1407,.3145],[.5029,.1382,.3144],[.4981,.1357,.3141],[.4934,.1333,.3139],[.4885,.1309,.3135],[.4837,.1286,.3132],[.4788,.1264,.3127],[.4738,.1243,.3123],[.4689,.1222,.3117],[.4639,.1201,.3111],[.4589,.1181,.3104],[.4538,.1162,.3097],[.4488,.1144,.3089],[.4437,.1125,.308],[.4386,.1108,.3071],[.4334,.1091,.3061],[.4283,.1074,.3051],[.4231,.1058,.304],[.418,.1042,.3028],[.4128,.1027,.3015],[.4076,.1012,.3002],[.4024,.0997,.2989],[.3972,.0983,.2974],[.392,.0969,.296],[.3868,.0956,.2944],[.3816,.0942,.2928],[.3764,.0929,.2912],[.3712,.0917,.2895],[.3661,.0904,.2877],[.3609,.0892,.2859],[.3557,.088,.2841],[.3506,.0869,.2822],[.3455,.0857,.2803],[.3404,.0846,.2783],[.3353,.0835,.2763],[.3303,.0825,.2743],[.3253,.0814,.2723],[.3203,.0804,.2702],[.3154,.0794,.2681],[.3105,.0785,.266],[.3056,.0775,.2639],[.3008,.0766,.2618],[.296,.0757,.2597],[.2913,.0749,.2576],[.2866,.0741,.2554],[.282,.0733,.2533],[.2775,.0726,.2512],[.273,.0719,.2492],[.2686,.0712,.2471],[.2643,.0706,.2451],[.26,.0701,.2431],[.2558,.0695,.2411],[.2517,.0691,.2392],[.2477,.0687,.2373],[.2438,.0683,.2355],[.24,.068,.2337],[.2363,.0677,.232],[.2327,.0676,.2304],[.2292,.0674,.2288],[.2258,.0674,.2273],[.2225,.0674,.2259],[.2193,.0675,.2245],[.2163,.0676,.2232],[.2133,.0678,.2221],[.2105,.0681,.221],[.2079,.0685,.22],[.2053,.0689,.2191],[.2029,.0694,.2183],[.2006,.0701,.2176],[.1982,.071,.2169],[.1957,.0722,.2162],[.1932,.0736,.2154],[.1905,.0753,.2147],[.1877,.0773,.2139],[.1849,.0794,.2131]]},viridis:{interpolate:!0,colors:[[.267,.0049,.3294],[.2685,.0096,.3354],[.2699,.0146,.3414],[.2713,.0199,.3473],[.2726,.0256,.3531],[.2738,.0315,.3589],[.275,.0378,.3645],[.276,.0442,.3702],[.277,.0503,.3757],[.2779,.0563,.3812],[.2788,.0621,.3866],[.2796,.0678,.3919],[.2803,.0734,.3972],[.2809,.0789,.4023],[.2814,.0843,.4074],[.2819,.0897,.4124],[.2823,.095,.4173],[.2827,.1002,.4222],[.2829,.1054,.4269],[.2831,.1106,.4316],[.2832,.1157,.4361],[.2832,.1208,.4406],[.2832,.1258,.445],[.2831,.1309,.4492],[.2829,.1359,.4534],[.2826,.1409,.4575],[.2823,.1459,.4615],[.2819,.1509,.4654],[.2814,.1558,.4692],[.2809,.1608,.4729],[.2803,.1657,.4765],[.2796,.1706,.48],[.2788,.1755,.4834],[.278,.1804,.4867],[.2771,.1852,.4899],[.2762,.1901,.493],[.2752,.1949,.496],[.2741,.1997,.4989],[.273,.2045,.5017],[.2718,.2093,.5044],[.2706,.2141,.5071],[.2693,.2188,.5096],[.268,.2235,.512],[.2666,.2283,.5143],[.2651,.233,.5166],[.2637,.2376,.5188],[.2621,.2423,.5208],[.2606,.2469,.5228],[.259,.2515,.5247],[.2573,.2561,.5266],[.2556,.2607,.5283],[.2539,.2653,.53],[.2522,.2698,.5316],[.2504,.2743,.5331],[.2486,.2788,.5346],[.2468,.2832,.5359],[.245,.2877,.5373],[.2431,.2921,.5385],[.2412,.2965,.5397],[.2393,.3009,.5408],[.2374,.3052,.5419],[.2355,.3095,.5429],[.2336,.3138,.5439],[.2317,.3181,.5448],[.2297,.3224,.5457],[.2278,.3266,.5465],[.2259,.3308,.5473],[.2239,.335,.5481],[.222,.3392,.5488],[.2201,.3433,.5494],[.2181,.3474,.55],[.2162,.3515,.5506],[.2143,.3556,.5512],[.2124,.3597,.5517],[.2105,.3637,.5522],[.2086,.3678,.5527],[.2068,.3718,.5531],[.2049,.3757,.5535],[.2031,.3797,.5539],[.2012,.3837,.5543],[.1994,.3876,.5546],[.1976,.3915,.555],[.1959,.3954,.5553],[.1941,.3993,.5556],[.1924,.4032,.5558],[.1906,.4071,.5561],[.1889,.4109,.5563],[.1872,.4147,.5565],[.1856,.4186,.5568],[.1839,.4224,.5569],[.1823,.4262,.5571],[.1806,.43,.5573],[.179,.4338,.5574],[.1774,.4375,.5576],[.1758,.4413,.5577],[.1743,.445,.5578],[.1727,.4488,.5579],[.1712,.4525,.558],[.1696,.4563,.558],[.1681,.46,.5581],[.1666,.4637,.5581],[.1651,.4674,.5581],[.1636,.4711,.5581],[.1621,.4748,.5581],[.1607,.4785,.5581],[.1592,.4822,.5581],[.1577,.4859,.558],[.1563,.4896,.5579],[.1548,.4933,.5578],[.1534,.497,.5577],[.1519,.5007,.5576],[.1505,.5044,.5574],[.149,.5081,.5572],[.1476,.5117,.557],[.1462,.5154,.5568],[.1448,.5191,.5566],[.1433,.5228,.5563],[.1419,.5265,.556],[.1405,.5301,.5557],[.1391,.5338,.5553],[.1378,.5375,.5549],[.1364,.5412,.5545],[.1351,.5449,.554],[.1337,.5485,.5535],[.1324,.5522,.553],[.1312,.5559,.5525],[.1299,.5596,.5519],[.1287,.5633,.5512],[.1276,.5669,.5506],[.1265,.5706,.5498],[.1254,.5743,.5491],[.1244,.578,.5483],[.1235,.5817,.5474],[.1226,.5854,.5466],[.1218,.5891,.5456],[.1211,.5927,.5446],[.1206,.5964,.5436],[.1201,.6001,.5425],[.1197,.6038,.5414],[.1195,.6075,.5402],[.1194,.6111,.539],[.1195,.6148,.5377],[.1197,.6185,.5363],[.1201,.6222,.5349],[.1206,.6258,.5335],[.1214,.6295,.532],[.1223,.6332,.5304],[.1234,.6368,.5288],[.1248,.6405,.5271],[.1263,.6441,.5253],[.1281,.6477,.5235],[.1301,.6514,.5216],[.1323,.655,.5197],[.1347,.6586,.5176],[.1373,.6623,.5156],[.1402,.6659,.5134],[.1433,.6695,.5112],[.1466,.673,.5089],[.1501,.6766,.5066],[.1539,.6802,.5042],[.1579,.6838,.5017],[.162,.6873,.4991],[.1664,.6909,.4965],[.1709,.6944,.4938],[.1757,.6979,.491],[.1807,.7014,.4882],[.1858,.7049,.4853],[.1911,.7084,.4823],[.1966,.7118,.4792],[.2022,.7153,.4761],[.208,.7187,.4729],[.214,.7221,.4696],[.2201,.7255,.4662],[.2264,.7289,.4628],[.2328,.7322,.4593],[.2394,.7356,.4557],[.2461,.7389,.452],[.2529,.7422,.4483],[.2599,.7455,.4445],[.2669,.7488,.4406],[.2741,.752,.4366],[.2815,.7552,.4326],[.2889,.7584,.4284],[.2965,.7616,.4242],[.3041,.7647,.4199],[.3119,.7678,.4156],[.3198,.7709,.4112],[.3278,.774,.4066],[.3359,.777,.402],[.3441,.78,.3974],[.3524,.783,.3926],[.3607,.786,.3878],[.3692,.7889,.3829],[.3778,.7918,.3779],[.3864,.7946,.3729],[.3952,.7975,.3678],[.404,.8003,.3626],[.4129,.803,.3573],[.4219,.8058,.3519],[.431,.8085,.3465],[.4401,.8111,.341],[.4494,.8138,.3354],[.4587,.8164,.3297],[.4681,.8189,.324],[.4775,.8214,.3182],[.487,.8239,.3123],[.4966,.8264,.3064],[.5063,.8288,.3004],[.516,.8312,.2943],[.5258,.8335,.2881],[.5356,.8358,.2819],[.5455,.838,.2756],[.5555,.8403,.2693],[.5655,.8424,.2629],[.5756,.8446,.2564],[.5857,.8467,.2499],[.5958,.8487,.2433],[.606,.8507,.2367],[.6163,.8527,.2301],[.6266,.8546,.2234],[.6369,.8565,.2166],[.6473,.8584,.2099],[.6576,.8602,.2031],[.6681,.862,.1963],[.6785,.8637,.1895],[.6889,.8654,.1827],[.6994,.8671,.176],[.7099,.8688,.1693],[.7204,.8704,.1626],[.7309,.8719,.156],[.7414,.8734,.1496],[.7519,.875,.1432],[.7624,.8764,.1371],[.7729,.8779,.1311],[.7833,.8793,.1254],[.7938,.8807,.12],[.8042,.882,.115],[.8146,.8834,.1103],[.8249,.8847,.1062],[.8353,.886,.1026],[.8456,.8873,.0997],[.8558,.8886,.0975],[.866,.8899,.096],[.8762,.8911,.0952],[.8863,.8924,.0954],[.8963,.8936,.0963],[.9063,.8949,.0981],[.9162,.8961,.1007],[.9261,.8973,.1041],[.9359,.8986,.1081],[.9456,.8998,.1128],[.9553,.9011,.1181],[.9649,.9023,.1239],[.9744,.9036,.1302],[.9839,.9049,.1369],[.9932,.9062,.1439]]},winter:{interpolate:!0,colors:[[0,0,1],[0,.0039,.998],[0,.0078,.9961],[0,.0118,.9941],[0,.0157,.9922],[0,.0196,.9902],[0,.0235,.9882],[0,.0275,.9863],[0,.0314,.9843],[0,.0353,.9824],[0,.0392,.9804],[0,.0431,.9784],[0,.0471,.9765],[0,.051,.9745],[0,.0549,.9725],[0,.0588,.9706],[0,.0627,.9686],[0,.0667,.9667],[0,.0706,.9647],[0,.0745,.9627],[0,.0784,.9608],[0,.0824,.9588],[0,.0863,.9569],[0,.0902,.9549],[0,.0941,.9529],[0,.098,.951],[0,.102,.949],[0,.1059,.9471],[0,.1098,.9451],[0,.1137,.9431],[0,.1176,.9412],[0,.1216,.9392],[0,.1255,.9373],[0,.1294,.9353],[0,.1333,.9333],[0,.1373,.9314],[0,.1412,.9294],[0,.1451,.9275],[0,.149,.9255],[0,.1529,.9235],[0,.1569,.9216],[0,.1608,.9196],[0,.1647,.9176],[0,.1686,.9157],[0,.1725,.9137],[0,.1765,.9118],[0,.1804,.9098],[0,.1843,.9078],[0,.1882,.9059],[0,.1922,.9039],[0,.1961,.902],[0,.2,.9],[0,.2039,.898],[0,.2078,.8961],[0,.2118,.8941],[0,.2157,.8922],[0,.2196,.8902],[0,.2235,.8882],[0,.2275,.8863],[0,.2314,.8843],[0,.2353,.8824],[0,.2392,.8804],[0,.2431,.8784],[0,.2471,.8765],[0,.251,.8745],[0,.2549,.8725],[0,.2588,.8706],[0,.2627,.8686],[0,.2667,.8667],[0,.2706,.8647],[0,.2745,.8627],[0,.2784,.8608],[0,.2824,.8588],[0,.2863,.8569],[0,.2902,.8549],[0,.2941,.8529],[0,.298,.851],[0,.302,.849],[0,.3059,.8471],[0,.3098,.8451],[0,.3137,.8431],[0,.3176,.8412],[0,.3216,.8392],[0,.3255,.8373],[0,.3294,.8353],[0,.3333,.8333],[0,.3373,.8314],[0,.3412,.8294],[0,.3451,.8275],[0,.349,.8255],[0,.3529,.8235],[0,.3569,.8216],[0,.3608,.8196],[0,.3647,.8176],[0,.3686,.8157],[0,.3725,.8137],[0,.3765,.8118],[0,.3804,.8098],[0,.3843,.8078],[0,.3882,.8059],[0,.3922,.8039],[0,.3961,.802],[0,.4,.8],[0,.4039,.798],[0,.4078,.7961],[0,.4118,.7941],[0,.4157,.7922],[0,.4196,.7902],[0,.4235,.7882],[0,.4275,.7863],[0,.4314,.7843],[0,.4353,.7824],[0,.4392,.7804],[0,.4431,.7784],[0,.4471,.7765],[0,.451,.7745],[0,.4549,.7725],[0,.4588,.7706],[0,.4627,.7686],[0,.4667,.7667],[0,.4706,.7647],[0,.4745,.7627],[0,.4784,.7608],[0,.4824,.7588],[0,.4863,.7569],[0,.4902,.7549],[0,.4941,.7529],[0,.498,.751],[0,.502,.749],[0,.5059,.7471],[0,.5098,.7451],[0,.5137,.7431],[0,.5176,.7412],[0,.5216,.7392],[0,.5255,.7373],[0,.5294,.7353],[0,.5333,.7333],[0,.5373,.7314],[0,.5412,.7294],[0,.5451,.7275],[0,.549,.7255],[0,.5529,.7235],[0,.5569,.7216],[0,.5608,.7196],[0,.5647,.7176],[0,.5686,.7157],[0,.5725,.7137],[0,.5765,.7118],[0,.5804,.7098],[0,.5843,.7078],[0,.5882,.7059],[0,.5922,.7039],[0,.5961,.702],[0,.6,.7],[0,.6039,.698],[0,.6078,.6961],[0,.6118,.6941],[0,.6157,.6922],[0,.6196,.6902],[0,.6235,.6882],[0,.6275,.6863],[0,.6314,.6843],[0,.6353,.6824],[0,.6392,.6804],[0,.6431,.6784],[0,.6471,.6765],[0,.651,.6745],[0,.6549,.6725],[0,.6588,.6706],[0,.6627,.6686],[0,.6667,.6667],[0,.6706,.6647],[0,.6745,.6627],[0,.6784,.6608],[0,.6824,.6588],[0,.6863,.6569],[0,.6902,.6549],[0,.6941,.6529],[0,.698,.651],[0,.702,.649],[0,.7059,.6471],[0,.7098,.6451],[0,.7137,.6431],[0,.7176,.6412],[0,.7216,.6392],[0,.7255,.6373],[0,.7294,.6353],[0,.7333,.6333],[0,.7373,.6314],[0,.7412,.6294],[0,.7451,.6275],[0,.749,.6255],[0,.7529,.6235],[0,.7569,.6216],[0,.7608,.6196],[0,.7647,.6176],[0,.7686,.6157],[0,.7725,.6137],[0,.7765,.6118],[0,.7804,.6098],[0,.7843,.6078],[0,.7882,.6059],[0,.7922,.6039],[0,.7961,.602],[0,.8,.6],[0,.8039,.598],[0,.8078,.5961],[0,.8118,.5941],[0,.8157,.5922],[0,.8196,.5902],[0,.8235,.5882],[0,.8275,.5863],[0,.8314,.5843],[0,.8353,.5824],[0,.8392,.5804],[0,.8431,.5784],[0,.8471,.5765],[0,.851,.5745],[0,.8549,.5725],[0,.8588,.5706],[0,.8627,.5686],[0,.8667,.5667],[0,.8706,.5647],[0,.8745,.5627],[0,.8784,.5608],[0,.8824,.5588],[0,.8863,.5569],[0,.8902,.5549],[0,.8941,.5529],[0,.898,.551],[0,.902,.549],[0,.9059,.5471],[0,.9098,.5451],[0,.9137,.5431],[0,.9176,.5412],[0,.9216,.5392],[0,.9255,.5373],[0,.9294,.5353],[0,.9333,.5333],[0,.9373,.5314],[0,.9412,.5294],[0,.9451,.5275],[0,.949,.5255],[0,.9529,.5235],[0,.9569,.5216],[0,.9608,.5196],[0,.9647,.5176],[0,.9686,.5157],[0,.9725,.5137],[0,.9765,.5118],[0,.9804,.5098],[0,.9843,.5078],[0,.9882,.5059],[0,.9922,.5039],[0,.9961,.502],[0,1,.5]]}},yE=V("Accent"),xE=V("Accent_r"),vE=V("Blues"),DE=V("Blues_r"),EE=V("BrBG"),bE=V("BrBG_r"),wE=V("BuGn"),SE=V("BuGn_r"),_E=V("BuPu"),CE=V("BuPu_r"),TE=V("CMRmap"),FE=V("CMRmap_r"),AE=V("Dark2"),IE=V("Dark2_r"),kE=V("GnBu"),ME=V("GnBu_r"),PE=V("Greens"),NE=V("Greens_r"),BE=V("Greys"),RE=V("Greys_r"),LE=V("OrRd"),OE=V("OrRd_r"),GE=V("Oranges"),UE=V("Oranges_r"),VE=V("PRGn"),zE=V("PRGn_r"),WE=V("Paired"),HE=V("Paired_r"),jE=V("Pastel1"),$E=V("Pastel1_r"),YE=V("Pastel2"),XE=V("Pastel2_r"),qE=V("PiYG"),KE=V("PiYG_r"),ZE=V("PuBu"),QE=V("PuBu_r"),JE=V("PuBuGn"),eb=V("PuBuGn_r"),tb=V("PuOr"),rb=V("PuOr_r"),ib=V("PuRd"),sb=V("PuRd_r"),nb=V("Purples"),ob=V("Purples_r"),ab=V("RdBu"),lb=V("RdBu_r"),ub=V("RdGy"),hb=V("RdGy_r"),cb=V("RdPu"),db=V("RdPu_r"),pb=V("RdYlBu"),fb=V("RdYlBu_r"),gb=V("RdYlGn"),mb=V("RdYlGn_r"),yb=V("Reds"),xb=V("Reds_r"),vb=V("Set1"),Db=V("Set1_r"),Eb=V("Set2"),bb=V("Set2_r"),wb=V("Set3"),Sb=V("Set3_r"),_b=V("Spectral"),Cb=V("Spectral_r"),Tb=V("Wistia"),Fb=V("Wistia_r"),Ab=V("YlGn"),Ib=V("YlGn_r"),kb=V("YlGnBu"),Mb=V("YlGnBu_r"),Pb=V("YlOrBr"),Nb=V("YlOrBr_r"),Bb=V("YlOrRd"),Rb=V("YlOrRd_r"),Lb=V("afmhot"),Ob=V("afmhot_r"),Gb=V("autumn"),Ub=V("autumn_r"),Vb=V("binary"),zb=V("binary_r"),Wb=V("bone"),Hb=V("bone_r"),jb=V("brg"),$b=V("brg_r"),Yb=V("bwr"),Xb=V("bwr_r"),qb=V("cividis"),Kb=V("cividis_r"),Zb=V("cool"),Qb=V("cool_r"),Jb=V("coolwarm"),ew=V("coolwarm_r"),tw=V("copper"),rw=V("copper_r"),iw=V("cubehelix"),sw=V("cubehelix_r"),nw=V("flag"),ow=V("flag_r"),aw=V("gist_earth"),lw=V("gist_earth_r"),uw=V("gist_gray"),hw=V("gist_gray_r"),cw=V("gist_heat"),dw=V("gist_heat_r"),pw=V("gist_ncar"),fw=V("gist_ncar_r"),gw=V("gist_rainbow"),mw=V("gist_rainbow_r"),yw=V("gist_stern"),xw=V("gist_stern_r"),vw=V("gist_yarg"),Dw=V("gist_yarg_r"),Ew=V("gnuplot"),bw=V("gnuplot_r"),ww=V("gnuplot2"),Sw=V("gnuplot2_r"),_w=V("gray"),Cw=V("gray_r"),Tw=V("hot"),Fw=V("hot_r"),Aw=V("hsv"),Iw=V("hsv_r"),kw=V("inferno"),Mw=V("inferno_r"),Pw=V("jet"),Nw=V("jet_r"),Bw=V("magma"),Rw=V("magma_r"),Lw=V("nipy_spectral"),Ow=V("nipy_spectral_r"),Gw=V("ocean"),Uw=V("ocean_r"),Vw=V("pink"),zw=V("pink_r"),Ww=V("plasma"),Hw=V("plasma_r"),jw=V("prism"),$w=V("prism_r"),Yw=V("rainbow"),Xw=V("rainbow_r"),qw=V("seismic"),Kw=V("seismic_r"),Zw=V("spring"),Qw=V("spring_r"),Jw=V("summer"),eS=V("summer_r"),tS=V("tab10"),rS=V("tab10_r"),iS=V("tab20"),sS=V("tab20_r"),nS=V("tab20b"),oS=V("tab20b_r"),aS=V("tab20c"),lS=V("tab20c_r"),uS=V("terrain"),hS=V("terrain_r"),cS=V("turbo"),dS=V("turbo_r"),pS=V("twilight"),fS=V("twilight_r"),gS=V("twilight_shifted"),mS=V("twilight_shifted_r"),yS=V("viridis"),xS=V("viridis_r"),vS=V("winter"),DS=V("winter_r");function pn(r,e,t){0<=r&&r<=1||alert("Illegal value for x! Must be in [0, 1]."),e in y1||alert("Colormap "+e+"does not exist!"),t===!0&&(r=1-r);let i=y1[e].colors;return y1[e].interpolate===!0?Vp(r,i):zp(r,i)}function Vp(r,e){let t=Math.floor(r*(e.length-1)),i=Math.ceil(r*(e.length-1)),s=Math.round((e[t][0]+e[i][0])/2*255),n=Math.round((e[t][1]+e[i][1])/2*255),o=Math.round((e[t][2]+e[i][2])/2*255);return[s,n,o]}function zp(r,e){let t=0;for(;r>(t+1)/(e.length-0);)t++;let i=Math.round(e[t][0]*255),s=Math.round(e[t][1]*255),n=Math.round(e[t][2]*255);return[i,s,n]}function V(r){return r.endsWith("_r")?function(e){return pn(e,r.substring(0,r.length-2),!0)}:function(e){return pn(e,r,!1)}}function fn(r,e){return new Uint8Array(pn(e,r,!1))}function si(r){return r[0]*(256*256)+r[1]*256+r[2]}function F0(r){return"#"+r.toString(16)}function B8(r){return Uo(F0(r))}function Hp(r){r.h/=360,r.s/=100,r.v/=100;let e,t,i,s=Math.floor(r.h*6),n=r.h*6-s,o=r.v*(1-r.s),a=r.v*(1-n*r.s),l=r.v*(1-(1-n)*r.s);switch(s%6){case 0:e=r.v,t=l,i=o;break;case 1:e=a,t=r.v,i=o;break;case 2:e=o,t=r.v,i=l;break;case 3:e=o,t=a,i=r.v;break;case 4:e=l,t=o,i=r.v;break;default:e=r.v,t=o,i=a;break}return new Uint8Array([e*255,t*255,i*255])}function Uo(r){let e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(r);return e?new Uint8Array([parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]):new Uint8Array([0,0,0])}function x1(r){let e=r.toString(16);return e.length===1&&(e="0"+e),e}function Gi(r){return"#"+x1(r[0])+x1(r[1])+x1(r[2])}function Vo(r,e,t){let i=r.getContext("2d");if(i)for(let s=0;s<=256;s++){let n=pn(s/256,e,t),o=n[0],a=n[1],l=n[2];i.fillStyle="rgb("+o+","+a+","+l+")",i.fillRect(s*r.width/256,0,r.width/256,r.height)}}function Vl(){return v1.random(50,95)}var Oi=class Oi{constructor(){}static random(e=50,t=95){Oi.h+=Oi.goldenRatioConjugate,Oi.h%=1;let i=Hp({h:Math.floor(Oi.h*360),s:e,v:t});return Gi(i)}};Oi.goldenRatioConjugate=.618033988749895,Oi.h=Math.random();var v1=Oi;var R8=require("obsidian");var zl=class extends R8.Component{constructor(e){super(),this.instances=e,this.instances.graph=this,this.initializeInteractiveManagers(),this.instances.nodesSet=new $l(this.instances,this.getNodeManagers()),this.instances.linksSet=new jl(this.instances,this.getLinkManagers()),e.settings.enableFeatures[e.type].folders&&(this.instances.foldersSet=new Hl(this.instances,this.getFolderManagers())),this.overrideOnOptionsChange()}initializeInteractiveManagers(){let e=this.getInteractiveManagerKeys();for(let t of e){let i=new Wl(this.instances,t);this.instances.interactiveManagers.set(t,i),this.addChild(i)}}getInteractiveManagerKeys(){let e=[];if(this.instances.settings.enableFeatures[this.instances.type].properties)for(let t in this.instances.settings.additionalProperties)this.instances.settings.additionalProperties[t][this.instances.type]&&e.push(t);return this.instances.settings.enableFeatures[this.instances.type].tags&&e.push(Ue),this.instances.settings.enableFeatures[this.instances.type].links&&e.push(de),this.instances.settings.enableFeatures[this.instances.type].folders&&e.push(he),e}getNodeManagers(){return Array.from(this.instances.interactiveManagers.values()).filter(e=>e.name!==de&&e.name!==he)}getLinkManagers(){let e=this.instances.interactiveManagers.get(de);return e?[e]:[]}getFolderManagers(){let e=this.instances.interactiveManagers.get(he);return e?[e]:[]}overrideOnOptionsChange(){this.onOptionsChangeOriginal=this.instances.view.onOptionsChange,this.instances.view.onOptionsChange=()=>{}}onload(){this.initSets().then(()=>{this.instances.dispatcher.onGraphReady()}).catch(e=>{console.error(e)})}async initSets(){await this.delay(this.instances.settings.delay),this.instances.nodesSet.load(),this.instances.linksSet.load(),this.instances.foldersSet?.load()}delay(e){return new Promise(t=>setTimeout(t,e))}onunload(){this.restoreOriginalFunctions(),this.instances.nodesSet.unload(),this.instances.linksSet.unload(),this.instances.foldersSet?.unload()}restoreOriginalFunctions(){this.instances.view.onOptionsChange=this.onOptionsChangeOriginal}disableLinkTypes(e){for(let t of e)this.instances.linksSet.disableType(de,t)}enableLinkTypes(e){for(let t of e)this.instances.linksSet.enableType(de,t)}disableNodeInteractiveTypes(e,t){let i=[];for(let s of t)i=i.concat(this.instances.nodesSet.disableType(e,s));if(this.instances.settings.fadeOnDisable&&i.length>0)this.fadeOutNodes(i);else if(i.length>0){let s=[...this.instances.linksSet.extendedElementsMap.values()].filter(n=>i.includes(n.coreElement.source.id)||i.includes(n.coreElement.target.id));for(let n of s)n.disable()}}enableNodeInteractiveTypes(e,t){let i=[];for(let s of t)i=i.concat(this.instances.nodesSet.enableType(e,s));this.instances.settings.fadeOnDisable&&i.length>0&&this.fadeInNodes(i)}fadeOutNodes(e){for(let t of e){let i=this.instances.nodesSet.extendedElementsMap.get(t);i&&i.graphicsWrapper?.fadeOut()}return!1}fadeInNodes(e){for(let t of e){let i=this.instances.nodesSet.extendedElementsMap.get(t);i&&i.graphicsWrapper?.fadeIn()}return!1}};var Yl=require("obsidian");var Pl=class extends Yl.Component{constructor(t){super();this.listenStage=!0;this.instances=t,t.dispatcher=this,this.initializeGraph(),this.initializeUI(),this.initializeFoldersUI()}initializeGraph(){new zl(this.instances),this.addChild(this.instances.graph)}initializeUI(){this.initializeLegendUI(),this.instances.statesUI=new Kl(this.instances),this.instances.statesUI.updateStatesList(),this.addChild(this.instances.statesUI)}initializeLegendUI(){let t=f.settings;(t.enableFeatures[this.instances.type].links||t.enableFeatures[this.instances.type].tags||this.hasAdditionalProperties(t))&&(this.instances.legendUI=new Xl(this.instances),this.addChild(this.instances.legendUI))}initializeFoldersUI(){if(!f.settings.enableFeatures[this.instances.type].folders||!f.graphsManager.globalUIs.get(this.instances.view.leaf.id)?.control)return;let i=this.instances.foldersSet?.managers.get(he);i&&(this.instances.foldersUI=new Zl(this.instances,i),this.instances.foldersUI.display())}hasAdditionalProperties(t){return t.enableFeatures[this.instances.type].properties&&Object.values(t.additionalProperties).some(i=>i[this.instances.type])}onload(){this.createStyleElementsForCSSBridge(),this.createSetDataProxy()}loadCurrentStateEngineOptions(){let t=f.settings.states.find(i=>i.id===this.instances.statesUI.currentStateID);if(t){this.instances.engine.setOptions(t.engineOptions);for(let i of this.instances.renderer.nodes)i.fontDirty=!0}}onGraphReady(){this.updateOpacityLayerColor(),this.bindStageEvents();try{this.createRenderCallbackProxy(),this.createInitGraphicsProxy(),this.createDestroyGraphicsProxy(),this.changeArrowAlpha(),this.changeNodeOnClick(),this.loadLastFilteringAction(),this.registerEventsForLastFilteringAction()}catch(t){this.listenStage=!1,typeof t=="string"?console.error(t.toUpperCase()):t instanceof Error&&console.error(t.message),f.graphsManager.disablePluginFromLeafID(this.instances.view.leaf.id);return}this.preventDraggingPinnedNodes(),f.statesManager.changeState(this.instances,this.instances.statesUI.currentStateID)}updateOpacityLayerColor(){this.instances.settings.fadeOnDisable&&this.instances.nodesSet.updateOpacityLayerColor()}bindStageEvents(){this.onChildAddedToStage=this.onChildAddedToStage.bind(this),this.instances.renderer.hanger.on("childAdded",this.onChildAddedToStage),this.onChildRemovedFromStage=this.onChildRemovedFromStage.bind(this),this.instances.renderer.hanger.on("childRemoved",this.onChildRemovedFromStage),this.onPointerDown=this.onPointerDown.bind(this),this.instances.renderer.px.stage.on("pointerdown",this.onPointerDown),this.onPointerUp=this.onPointerUp.bind(this),this.instances.renderer.px.stage.on("pointerup",this.onPointerUp)}createRenderCallbackProxy(){let t=this.beforeRenderCallback.bind(this);f.proxysManager.registerProxy(this.instances.renderer,"renderCallback",{apply(i,s,n){return t(),Reflect.apply(i,s,n)}})}createSetDataProxy(){let t=this.updateData.bind(this);f.proxysManager.registerProxy(this.instances.renderer,"setData",{apply(i,s,n){let o=t(n[0]);return o?(n[0]=o,Reflect.apply(i,s,n)):!1}})}createDestroyGraphicsProxy(){let t=this.beforeDestroyGraphics.bind(this);f.proxysManager.registerProxy(this.instances.renderer,"destroyGraphics",{apply(i,s,n){return t(),Reflect.apply(i,s,n)}})}createInitGraphicsProxy(){let t=this.afterInitGraphics.bind(this);f.proxysManager.registerProxy(this.instances.renderer,"initGraphics",{apply(i,s,n){let o=Reflect.apply(i,s,n);return t(),o}})}changeArrowAlpha(){!this.instances.settings.enableFeatures[this.instances.type].arrows||!this.instances.settings.opaqueArrowsButKeepFading||this.instances.settings.enableFeatures[this.instances.type].links&&this.instances.settings.curvedLinks||(this.coreArrowAlpha=this.instances.renderer.colors.arrow.a,this.instances.renderer.colors.arrow.a=1)}changeNodeOnClick(){this.instances.settings.openInNewTab&&(this.onNodeClick=this.onNodeClick.bind(this),this.coreOnNodeClick=this.instances.renderer.onNodeClick,this.instances.renderer.onNodeClick=this.onNodeClick),this.instances.settings.useRadialMenu&&(this.onNodeRightClick=this.onNodeRightClick.bind(this),this.coreOnNodeRightClick=this.instances.renderer.onNodeRightClick,this.instances.renderer.onNodeRightClick=this.onNodeRightClick)}loadLastFilteringAction(){this.lastFilteringAction={id:void 0,searchNew:this.instances.engine.filterOptions.search.getValue()||"",searchOld:this.instances.engine.filterOptions.search.getValue()||"",showTagsNew:this.instances.engine.options.showTags||!1,showTagsOld:this.instances.engine.options.showTags||!1,showAttachmentsNew:this.instances.engine.options.showAttachments||!1,showAttachmentsOld:this.instances.engine.options.showAttachments||!1,hideUnresolvedNew:this.instances.engine.options.hideUnresolved||!1,hideUnresolvedOld:this.instances.engine.options.hideUnresolved||!1,showOrphansNew:this.instances.engine.options.showOrphans||!0,showOrphansOld:this.instances.engine.options.showOrphans||!0,localJumpsNew:this.instances.engine.options.localJumps||1,localJumpsOld:this.instances.engine.options.localJumps||1,localForelinksNew:this.instances.engine.options.localForelinks||!0,localForelinksOld:this.instances.engine.options.localForelinks||!0,localBacklinksNew:this.instances.engine.options.localBacklinks||!0,localBacklinksOld:this.instances.engine.options.localBacklinks||!0,interactives:{key:"",types:[]},stateIDNew:this.instances.statesUI.currentStateID,stateIDOld:this.instances.statesUI.currentStateID,record:!0,userChange:!1}}registerEventsForLastFilteringAction(){if(!this.lastFilteringAction)return;let t=this.lastFilteringAction;this.instances.engine.filterOptions.search.changeCallback&&f.proxysManager.registerProxy(this.instances.engine.filterOptions.search,"changeCallback",{apply(s,n,o){return t.record&&(t.id="core-search",t.userChange=!0,t.searchOld=t.searchNew,t.searchNew=o[0]),Reflect.apply(s,n,o)}}),this.updateLastCheckboxToggled=this.updateLastCheckboxToggled.bind(this);let i=this.instances.view.contentEl.querySelectorAll(".graph-control-section.mod-filter .checkbox-container");for(let s of Array.from(i))s.addEventListener("mousedown",this.updateLastCheckboxToggled);f.proxysManager.registerProxy(this.instances.engine,"options",{set(s,n,o,a){return t.record&&(n==="showTags"?(t.id="core-tags",t.userChange=!0,t.showTagsOld=t.showTagsNew,t.showTagsNew=o):n==="showAttachments"?(t.id="core-attachments",t.userChange=!0,t.showAttachmentsOld=t.showAttachmentsNew,t.showAttachmentsNew=o):n==="hideUnresolved"?(t.id="core-hide-unresolved",t.userChange=!0,t.hideUnresolvedOld=t.hideUnresolvedNew,t.hideUnresolvedNew=o):n==="showOrphans"?(t.id="core-orphans",t.userChange=!0,t.showOrphansOld=t.showOrphansNew,t.showOrphansNew=o):n==="localJumps"?(t.id="core-local-jumps",t.userChange=!0,t.localJumpsOld=t.localJumpsNew,t.localJumpsNew=o):n==="localForelinks"?(t.id="core-local-forelinks",t.userChange=!0,t.localForelinksOld=t.localForelinksNew,t.localForelinksNew=o):n==="localBacklinks"&&(t.id="core-local-backlinks",t.userChange=!0,t.localBacklinksOld=t.localBacklinksNew,t.localBacklinksNew=o)),Reflect.set(s,n,o,a)}})}setLastFilteringActionAsStateChange(t){!this.lastFilteringAction||!this.lastFilteringAction.record||(this.lastFilteringAction.id="plugin-state-change",this.lastFilteringAction.userChange=!0,this.lastFilteringAction.stateIDOld=this.lastFilteringAction.stateIDNew,this.lastFilteringAction.stateIDNew=t)}setLastFilteringActionAsInteractive(t,i){!this.lastFilteringAction||!this.lastFilteringAction.record||t!==he&&(this.lastFilteringAction.id="plugin-interactives",this.lastFilteringAction.userChange=!0,this.lastFilteringAction.interactives={key:t,types:i})}updateLastCheckboxToggled(t){this.lastCheckboxContainerToggled=t.currentTarget}onunload(){this.removeStylingForCSSBridge(),this.unbindStageEvents(),f.proxysManager.unregisterProxy(this.instances.renderer.renderCallback),f.proxysManager.unregisterProxy(this.instances.renderer.setData),f.proxysManager.unregisterProxy(this.instances.renderer.destroyGraphics),f.proxysManager.unregisterProxy(this.instances.renderer.initGraphics),this.instances.foldersUI?.destroy(),f.graphsManager.onPluginUnloaded(this.instances.view),this.restoreArrowAlpha(),this.restoreOnNodeClick(),this.unregisterEventsForLastFilteringAction()}unbindStageEvents(){this.instances.renderer.hanger.off("childAdded",this.onChildAddedToStage),this.instances.renderer.hanger.off("childRemoved",this.onChildRemovedFromStage),this.instances.renderer.px.stage.off("pointerdown",this.onPointerDown),this.instances.renderer.px.stage.off("pointerup",this.onPointerUp)}restoreArrowAlpha(){this.coreArrowAlpha!==void 0&&(this.instances.renderer.colors.arrow.a=this.coreArrowAlpha,this.coreArrowAlpha=void 0)}restoreOnNodeClick(){this.coreOnNodeClick&&(this.instances.renderer.onNodeClick=this.coreOnNodeClick,this.coreOnNodeClick=void 0),this.coreOnNodeRightClick&&(this.instances.renderer.onNodeRightClick=this.coreOnNodeRightClick,this.coreOnNodeRightClick=void 0)}unregisterEventsForLastFilteringAction(){f.proxysManager.unregisterProxy(this.instances.engine.filterOptions.search.changeCallback);let t=this.instances.view.contentEl.querySelectorAll(".graph-control-section.mod-filter .checkbox-container");for(let i of Array.from(t))i.addEventListener("mousedown",this.updateLastCheckboxToggled);f.proxysManager.unregisterProxy(this.instances.engine.options)}onChildAddedToStage(t,i,s){if(!this.listenStage)return;let n=this.instances.renderer.nodes.find(a=>a.circle===t);if(n){if(f.graphsManager.isNodeLimitExceededForView(this.instances.view)){this.listenStage=!1,setTimeout(()=>{f.graphsManager.disablePluginFromLeafID(this.instances.view.leaf.id)},200);return}let a=this.instances.nodesSet.extendedElementsMap.get(n.id);a?a.setCoreElement(n):this.instances.nodesSet.load();let l=Le(n.id),u=this.instances.foldersSet?.managers.get(he);if(l&&u){let h=r0(he,l);for(let d of h)u.isActive(d)&&this.instances.foldersSet?.loadFolder(he,d)}}let o=this.instances.renderer.links.find(a=>a.px===t||a.arrow===t);if(o){let a=u=>{let h=this.instances.linksSet.extendedElementsMap.get(Dt(u));h?h.setCoreElement(u):this.instances.linksSet.load(Dt(u))},l=u=>u.line&&(!this.instances.renderer.fShowArrow||!!u.arrow);l(o)?a(o):t.on("childAdded",(u,h,d)=>{l(o)&&a(o)})}if("text"in t){let a=this.instances.renderer.nodes.find(l=>l.text===t);if(a){let l=this.instances.nodesSet.extendedElementsMap.get(a.id);l&&l.extendedText.init()}}}onChildRemovedFromStage(t,i,s){if(this.listenStage&&this.instances.foldersSet)for(let[n,o]of this.instances.foldersSet.foldersMap){let a=o.nodes.filter(l=>l.circle===null);for(let l of a)o.removeNode(l);a.length>0&&o.updateGraphics(this.instances.renderer.scale)}}onPointerDown(){this.preventDraggingPinnedNodes()}onPointerUp(){this.pinDraggingPinnedNode()}updateData(t){let i=[];if(!this.instances.settings.fadeOnDisable)for(let[l,u]of Object.entries(t.nodes)){let h=Le(l);if(h)for(let[d,p]of this.instances.nodesSet.managers){let m=r0(d,h);m.size>0&&![...m].some(x=>p.isActive(x))&&i.push(l),m.size===0&&!p.isActive(this.instances.settings.interactiveSettings[d].noneType)&&i.push(l)}else if(u.type==="tag"&&this.instances.settings.enableFeatures[this.instances.type].tags){let d=this.instances.interactiveManagers.get(Ue);d&&!d.isActive(l.replace("#",""))&&i.push(l)}}for(let l of i)delete t.nodes[l];i=[];let s=(l,u)=>G8(u)?.test(l)??l.startsWith(u),n=[],o=Object.entries(t.nodes);for(let[l,u]of o){if(Object.keys(u.links).length===0){this.instances.engine.options.showOrphans||n.push(l);continue}let h=Le(l);if(h){if(this.instances.settings.enableFeatures[this.instances.type].links&&this.instances.settings.excludedSourcesFolder.find(p=>s(l,p))){u.links={};continue}let d=Object.keys(u.links);for(let p of d)this.instances.settings.enableFeatures[this.instances.type].links&&this.instances.settings.excludedTargetsFolder.find(m=>s(p,m))&&delete u.links[p];if(Object.keys(u.links).length===0){this.instances.engine.options.showOrphans||n.push(l);continue}for(let[p,m]of this.instances.linksSet.managers){let x=Bi(this.instances.settings,h),C=new Map([...x.entries()].reduce((A,P)=>(P[1]=new Set([...P[1]].filter(L=>m.getTypes().includes(L))),P[1].size>0&&A.push(P),A),[]));for(let[A,P]of C)A in u.links&&P.size>0&&![...P].some(L=>m.isActive(L))&&(delete u.links[A],this.instances.settings.disableSource&&i.push(l),this.instances.settings.disableTarget&&i.push(A));if(!m.isActive(this.instances.settings.interactiveSettings[m.name].noneType)){let A=Object.keys(u.links).filter(P=>!C.has(P));for(let P of A)delete u.links[P]}}if(Object.keys(u.links).length===0){this.instances.engine.options.showOrphans||n.push(l);continue}}for(let d of i)delete t.nodes[d];i=[]}if(!this.instances.engine.options.showOrphans){let l=Object.values(t.nodes);for(let u of n)l.find(h=>u in h.links)||delete t.nodes[u]}f.graphsManager.updateStatusBarItem(this.instances.view.leaf,Object.keys(t.nodes).length);let a=this.lastFilteringAction?.userChange||!0;if(this.lastFilteringAction&&(this.lastFilteringAction.userChange=!1),f.graphsManager.isNodeLimitExceededForData(t,a))if(f.settings.revertAction&&this.lastFilteringAction){this.revertLastFilteringAction();return}else{this.listenStage=!1,setTimeout(()=>{f.graphsManager.disablePluginFromLeafID(this.instances.view.leaf.id)},200);return}return t}onNodeClick(t,i,s){s!=="tag"?f.app.workspace.openLinkText(i,"","tab"):this.coreOnNodeClick&&this.coreOnNodeClick(t,i,s)}onNodeRightClick(t,i,s){if(t&&Yl.Keymap.isModifier(t,"Shift")){new ql(this.instances,i,s).open(t);return}this.coreOnNodeRightClick&&this.coreOnNodeRightClick(t,i,s)}beforeDestroyGraphics(){this.unbindStageEvents(),f.proxysManager.unregisterProxy(this.instances.renderer.renderCallback);for(let t of this.instances.nodesSet.extendedElementsMap.values())f.proxysManager.unregisterProxy(t.coreElement.text);for(let t of this.instances.linksSet.extendedElementsMap.values())t.restoreCoreElement()}showDestroyed(t){if("children"in t)for(let i of t.children)i.destroyed?console.debug(i):this.showDestroyed(i)}afterInitGraphics(){setTimeout(()=>{for(let t of this.instances.linksSet.extendedElementsMap.values())t.init();for(let t of this.instances.nodesSet.extendedElementsMap.values())t.init();this.instances.nodesSet.onCSSChange(),this.instances.foldersSet?.initGraphics(),this.createRenderCallbackProxy(),this.bindStageEvents(),this.instances.renderer.changed()},this.instances.settings.delay)}beforeRenderCallback(){if(this.instances.statePinnedNodes&&new T0(this.instances).setPinnedNodesFromState(),this.instances.foldersSet&&this.instances.foldersSet.updateGraphics(),this.instances.settings.enableFeatures[this.instances.type].links&&(this.instances.settings.interactiveSettings[de].showOnGraph||this.instances.settings.curvedLinks))for(let t of this.instances.linksSet.connectedIDs)this.instances.linksSet.extendedElementsMap.get(t)?.graphicsWrapper?.pixiElement.updateFrame()}revertLastFilteringAction(){if(!this.lastFilteringAction||this.lastFilteringAction.id===void 0){this.listenStage=!1,f.graphsManager.disablePluginFromLeafID(this.instances.view.leaf.id);return}switch(this.lastFilteringAction.id){case"core-search":this.instances.engine.filterOptions.search.inputEl.blur(),this.lastFilteringAction.searchNew=this.lastFilteringAction.searchOld,this.instances.engine.filterOptions.search.inputEl.value=this.lastFilteringAction.searchOld,this.instances.engine.updateSearch();break;case"core-tags":this.lastCheckboxContainerToggled?.dispatchEvent(new Event("click")),this.lastFilteringAction.showTagsNew=this.lastFilteringAction.showTagsOld;break;case"core-attachments":this.lastCheckboxContainerToggled?.dispatchEvent(new Event("click")),this.lastFilteringAction.showAttachmentsNew=this.lastFilteringAction.showAttachmentsOld;break;case"core-hide-unresolved":this.lastCheckboxContainerToggled?.dispatchEvent(new Event("click")),this.lastFilteringAction.hideUnresolvedNew=this.lastFilteringAction.hideUnresolvedOld;break;case"core-orphans":this.lastCheckboxContainerToggled?.dispatchEvent(new Event("click")),this.lastFilteringAction.showOrphansNew=this.lastFilteringAction.showOrphansOld;break;case"core-local-jumps":this.lastCheckboxContainerToggled?.dispatchEvent(new Event("click")),this.lastFilteringAction.localJumpsNew=this.lastFilteringAction.localJumpsOld;break;case"core-local-forelinks":this.lastCheckboxContainerToggled?.dispatchEvent(new Event("click")),this.lastFilteringAction.localForelinksNew=this.lastFilteringAction.localForelinksOld;break;case"core-local-backlinks":this.lastCheckboxContainerToggled?.dispatchEvent(new Event("click")),this.lastFilteringAction.localBacklinksNew=this.lastFilteringAction.localBacklinksOld;break;case"plugin-interactives":let t=this.instances.interactiveManagers.get(this.lastFilteringAction.interactives.key);if(t){t.disable(this.lastFilteringAction.interactives.types);for(let i of this.lastFilteringAction.interactives.types)this.instances.legendUI?.disableUI(this.lastFilteringAction.interactives.key,i)}break;case"plugin-state-change":this.lastFilteringAction.stateIDNew!==this.lastFilteringAction.stateIDOld&&(this.lastFilteringAction.stateIDNew=this.lastFilteringAction.stateIDOld,this.instances.statesUI.setValue(this.lastFilteringAction.stateIDOld),f.statesManager.changeState(this.instances,this.lastFilteringAction.stateIDOld));break}}onInteractivesAdded(t,i){t===de?this.onLinkTypesAdded(i):t===he?this.onFoldersAdded(i):this.onNodeInteractiveTypesAdded(t,i)}onInteractivesRemoved(t,i){t===de?this.onLinkTypesRemoved(i):t===he?this.onFoldersRemoved(i):this.onNodeInteractiveTypesRemoved(t,i)}onInteractiveColorChanged(t,i,s){t===de?this.onLinkColorChanged(i,s):t===he?this.onFolderColorChanged(i,s):this.onNodeInteractiveColorChanged(t,i,s)}onInteractivesDisabled(t,i){t===de?(this.instances.graph.disableLinkTypes(i),this.instances.engine.render(),this.instances.renderer.changed()):t===he?this.disableFolders(i):(this.instances.graph.disableNodeInteractiveTypes(t,i),this.instances.settings.fadeOnDisable||this.instances.engine.render(),this.instances.renderer.changed())}onInteractivesEnabled(t,i){this.setLastFilteringActionAsInteractive(t,i),t===de?(this.instances.graph.enableLinkTypes(i),this.instances.engine.render(),this.instances.renderer.changed()):t===he?this.enableFolders(i):(this.instances.graph.enableNodeInteractiveTypes(t,i),this.instances.settings.fadeOnDisable||this.instances.engine.render(),this.instances.renderer.changed())}onNodeInteractiveTypesAdded(t,i){if(this.instances.legendUI)for(let[s,n]of i)this.instances.legendUI.add(t,s,n);this.instances.nodesSet.resetArcs(t),this.instances.renderer.changed()}onNodeInteractiveTypesRemoved(t,i){this.instances.legendUI?.remove(t,i),this.instances.nodesSet.resetArcs(t),this.instances.renderer.changed()}onNodeInteractiveColorChanged(t,i,s){this.instances.nodesSet.updateTypeColor(t,i,s),this.instances.legendUI?.update(t,i,s),this.instances.renderer.changed()}onLinkTypesAdded(t){if(this.instances.legendUI)for(let[i,s]of t)this.instances.legendUI.add(de,i,s);this.instances.settings.interactiveSettings[de].enableByDefault&&(t.forEach((i,s)=>{this.instances.linksSet.updateTypeColor(de,s,i)}),this.instances.renderer.changed())}onLinkTypesRemoved(t){this.instances.legendUI?.remove(de,t)}onLinkColorChanged(t,i){this.instances.linksSet.updateTypeColor(de,t,i),this.instances.legendUI?.update(de,t,i),this.instances.renderer.changed()}onFoldersAdded(t){if(this.instances.foldersUI)for(let[i,s]of t)this.instances.foldersUI.add(he,i,s);if(this.instances.settings.interactiveSettings[he].enableByDefault&&this.instances.foldersSet){for(let[i,s]of t)this.instances.foldersSet.loadFolder(he,i);this.instances.renderer.changed()}}onFoldersRemoved(t){this.instances.foldersUI?.remove(he,t);for(let i of t)this.removeBBox(i)}onFolderColorChanged(t,i){this.instances.foldersSet&&(this.instances.foldersSet.updateColor(he,t),this.instances.foldersUI?.update(he,t,i),this.instances.renderer.changed())}disableFolders(t){this.listenStage=!1;for(let i of t)this.removeBBox(i);this.listenStage=!0}enableFolders(t){this.listenStage=!1;for(let i of t)this.addBBox(i);this.listenStage=!0}addBBox(t){this.instances.foldersSet&&(this.instances.foldersSet.loadFolder(he,t),this.instances.renderer.changed())}removeBBox(t){this.instances.foldersSet&&(this.instances.foldersSet.removeFolder(t),this.instances.renderer.changed())}changeState(t){this.setLastFilteringActionAsStateChange(t),f.statesManager.changeState(this.instances,t)}onNodeMenuOpened(t,i){t.addSections(["extended-graph"]),t.addItem(s=>{s.setIcon("pin"),this.instances.nodesSet.isNodePinned(i.path)?(s.setTitle(E.features.unpinNode),s.onClick(()=>{this.unpinNode(i)})):(s.setTitle(E.features.pinNode),s.onClick(()=>{this.pinNode(i)}))})}pinNode(t){new T0(this.instances).pinNode(t.path)}pinNodeFromId(t){new T0(this.instances).pinNode(t)}unpinNode(t){new T0(this.instances).unpinNode(t.path),this.instances.renderer.changed()}unpinNodeFromId(t){new T0(this.instances).unpinNode(t),this.instances.renderer.changed()}preventDraggingPinnedNodes(){let t=this.instances.renderer.dragNode;t&&this.instances.nodesSet.isNodePinned(t.id)&&new T0(this.instances).setLastDraggedPinnedNode(t.id)}pinDraggingPinnedNode(){new T0(this.instances).pinLastDraggedPinnedNode()}createStyleElementsForCSSBridge(){if(!this.instances.settings.enableCSS)return;let t=this.instances.renderer.iframeEl.contentDocument;t&&(this.instances.coreStyleEl=t.createElement("style"),this.instances.coreStyleEl.setAttribute("type","text/css"),t.head.appendChild(this.instances.coreStyleEl),this.instances.extendedStyleEl=t.createElement("style"),this.instances.extendedStyleEl.setAttribute("type","text/css"),t.head.appendChild(this.instances.extendedStyleEl),this.computeStylingFromCSSBridge())}computeStylingFromCSSBridge(){L8(this.instances),this.instances.stylesData={nodeText:Ql(this.instances),folder:O8(this.instances)}}removeStylingForCSSBridge(){this.instances.coreStyleEl?.remove(),this.instances.extendedStyleEl?.remove()}onCSSChange(){this.computeStylingFromCSSBridge(),this.instances.nodesSet&&(this.instances.nodesSet.onCSSChange(),this.instances.settings.enableCSS&&this.instances.foldersSet?.onCSSChange(),this.instances.renderer.changed())}};var U8=require("obsidian");var D1=class{constructor(e,t){this.type=e,this.color=t,this.isActive=!0}setColor(e){this.color=e}},Wl=class extends U8.Component{constructor(e,t){super(),this.interactives=new Map,this.instances=e,this.name=t}disable(e){let t=[];e.forEach(i=>{let s=this.interactives.get(i);s&&(s.isActive=!1,t.push(i))}),t.length>0&&this.instances.dispatcher.onInteractivesDisabled(this.name,t)}enable(e){let t=[];e.forEach(i=>{let s=this.interactives.get(i);s&&(s.isActive=!0,t.push(i))}),t.length>0&&this.instances.dispatcher.onInteractivesEnabled(this.name,t)}isActive(e){let t=this.interactives.get(e);return t?t.isActive:!1}isFullyDisabled(){let e=this.getTypes();for(let t of e)if(this.isActive(t))return!0;return!1}isFullyEnabled(){let e=this.getTypes();for(let t of e)if(!this.isActive(t))return!1;return!0}setColor(e,t){let i=this.interactives.get(e);i&&(i.setColor(t),this.instances.dispatcher.onInteractiveColorChanged(this.name,e,t))}removeTypes(e){e.forEach(t=>{this.interactives.delete(t)}),this.recomputeColors(),this.instances.dispatcher.onInteractivesRemoved(this.name,e)}addTypes(e){let t=new Map,i=new Set([...this.interactives.keys(),...e].sort()),s=new Set(i);s.delete(this.instances.settings.interactiveSettings[this.name].noneType),e.forEach(n=>{if($0[this.name]?.includes(n)||this.instances.settings.interactiveSettings[this.name].unselected.includes(n)||this.interactives.has(n))return;let o=this.tryComputeColorFromType(n);if(!o){let a=s.size,l=[...s].indexOf(n);o=this.computeColorFromIndex(l,a)}t.set(n,o),this.interactives.set(n,new D1(n,o))}),this.interactives=new Map([...this.interactives.entries()].sort()),this.recomputeColors(),t.size>0&&this.instances.dispatcher.onInteractivesAdded(this.name,t)}getColor(e){let t=this.interactives.get(e);return t?t.color:new Uint8Array([0,0,0])}getTypes(){return Array.from(this.interactives.keys())}getTypesWithoutNone(){let e=this.getTypes();return e.remove(this.instances.settings.interactiveSettings[this.name].noneType),e}update(e){this.interactives.clear(),this.addTypes(e)}recomputeColors(){this.interactives.forEach((e,t)=>{let i=this.tryComputeColorFromType(t);i&&this.setColor(t,i)})}recomputeColor(e){if(!this.interactives.has(e))return;let t=this.tryComputeColorFromType(e);t&&this.setColor(e,t)}tryComputeColorFromType(e){let t,i=this.instances.settings.interactiveSettings[this.name].colors.find(s=>s.type===e)?.color;if(i)t=Uo(i);else if(e===this.instances.settings.interactiveSettings[this.name].noneType)this.name===de?t=B8(this.instances.renderer.colors.line.rgb):t=N8;else{let s=[...this.interactives.keys()];s.remove(this.instances.settings.interactiveSettings[this.name].noneType);let n=s.length,o=s.indexOf(e);if(o<0)return null;t=this.computeColorFromIndex(o,n)}return t}computeColorFromIndex(e,t){let i=e/t;return fn(this.instances.settings.interactiveSettings[this.name].colormap,i)}};var gn=class{constructor(e,t,i,s){this.instances=e,this.coreElement=t,this.id=this.getID(),this.managers=new Map,this.types=i;for(let n of s){let o=n.name;this.managers.set(o,n)}this.additionalConstruct(),this.needGraphicsWrapper()&&this.createGraphicsWrapper()}additionalConstruct(){}init(){this.graphicsWrapper?.pixiElement.destroyed&&this.graphicsWrapper.createGraphics(),this.graphicsWrapper?.connect(),this.modifyCoreElement()}unload(){this.restoreCoreElement(),this.graphicsWrapper?.disconnect(),this.graphicsWrapper?.clearGraphics(),this.graphicsWrapper?.destroyGraphics()}setCoreElement(e){e&&e!==this.coreElement&&(this.graphicsWrapper?.disconnect(),this.coreElement=e,this.init())}findCoreElement(){return this.isCoreElementUptodate()?this.coreElement:this.getCoreCollection().find(t=>this.isSameCoreElement(t))}isAnyManagerDisabled(){for(let[e,t]of this.managers){let i=this.getTypes(e);if(i.size!==0&&[...i].every(s=>!t.isActive(s)))return!0}return!1}getActiveType(e){let t=this.managers.get(e);if(!t)return;let i=this.getTypes(e);for(let s of i)if(t.isActive(s))return s}matchesTypes(e,t){let i=this.getTypes(e),s=structuredClone(i),n=structuredClone(t);for(let o of t)i.has(o)&&(s.delete(o),n.remove(o));return{typesToRemove:[...s],typesToAdd:n}}hasType(e,t){return!!this.types.get(e)?.has(t)}getTypes(e){let t=this.types.get(e);return t||new Set}setTypes(e,t){this.types.set(e,t);let i=this.graphicsWrapper?.managerGraphicsMap?.get(e);i&&(i.types=t)}disableType(e,t){this.graphicsWrapper?.managerGraphicsMap?.get(e)?.toggleType(t,!1)}enableType(e,t){this.graphicsWrapper?.managerGraphicsMap?.get(e)?.toggleType(t,!0)}disable(){}enable(){this.init()}};var Mt=(r=>(r[r.WEBGL_LEGACY=0]="WEBGL_LEGACY",r[r.WEBGL=1]="WEBGL",r[r.WEBGL2=2]="WEBGL2",r))(Mt||{}),E1=(r=>(r[r.UNKNOWN=0]="UNKNOWN",r[r.WEBGL=1]="WEBGL",r[r.CANVAS=2]="CANVAS",r))(E1||{}),Jl=(r=>(r[r.COLOR=16384]="COLOR",r[r.DEPTH=256]="DEPTH",r[r.STENCIL=1024]="STENCIL",r))(Jl||{}),be=(r=>(r[r.NORMAL=0]="NORMAL",r[r.ADD=1]="ADD",r[r.MULTIPLY=2]="MULTIPLY",r[r.SCREEN=3]="SCREEN",r[r.OVERLAY=4]="OVERLAY",r[r.DARKEN=5]="DARKEN",r[r.LIGHTEN=6]="LIGHTEN",r[r.COLOR_DODGE=7]="COLOR_DODGE",r[r.COLOR_BURN=8]="COLOR_BURN",r[r.HARD_LIGHT=9]="HARD_LIGHT",r[r.SOFT_LIGHT=10]="SOFT_LIGHT",r[r.DIFFERENCE=11]="DIFFERENCE",r[r.EXCLUSION=12]="EXCLUSION",r[r.HUE=13]="HUE",r[r.SATURATION=14]="SATURATION",r[r.COLOR=15]="COLOR",r[r.LUMINOSITY=16]="LUMINOSITY",r[r.NORMAL_NPM=17]="NORMAL_NPM",r[r.ADD_NPM=18]="ADD_NPM",r[r.SCREEN_NPM=19]="SCREEN_NPM",r[r.NONE=20]="NONE",r[r.SRC_OVER=0]="SRC_OVER",r[r.SRC_IN=21]="SRC_IN",r[r.SRC_OUT=22]="SRC_OUT",r[r.SRC_ATOP=23]="SRC_ATOP",r[r.DST_OVER=24]="DST_OVER",r[r.DST_IN=25]="DST_IN",r[r.DST_OUT=26]="DST_OUT",r[r.DST_ATOP=27]="DST_ATOP",r[r.ERASE=26]="ERASE",r[r.SUBTRACT=28]="SUBTRACT",r[r.XOR=29]="XOR",r))(be||{}),Et=(r=>(r[r.POINTS=0]="POINTS",r[r.LINES=1]="LINES",r[r.LINE_LOOP=2]="LINE_LOOP",r[r.LINE_STRIP=3]="LINE_STRIP",r[r.TRIANGLES=4]="TRIANGLES",r[r.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",r[r.TRIANGLE_FAN=6]="TRIANGLE_FAN",r))(Et||{}),se=(r=>(r[r.RGBA=6408]="RGBA",r[r.RGB=6407]="RGB",r[r.RG=33319]="RG",r[r.RED=6403]="RED",r[r.RGBA_INTEGER=36249]="RGBA_INTEGER",r[r.RGB_INTEGER=36248]="RGB_INTEGER",r[r.RG_INTEGER=33320]="RG_INTEGER",r[r.RED_INTEGER=36244]="RED_INTEGER",r[r.ALPHA=6406]="ALPHA",r[r.LUMINANCE=6409]="LUMINANCE",r[r.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",r[r.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",r[r.DEPTH_STENCIL=34041]="DEPTH_STENCIL",r))(se||{}),ni=(r=>(r[r.TEXTURE_2D=3553]="TEXTURE_2D",r[r.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",r[r.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",r[r.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",r[r.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",r[r.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",r[r.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",r[r.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",r[r.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",r))(ni||{}),me=(r=>(r[r.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",r[r.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",r[r.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",r[r.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",r[r.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",r[r.UNSIGNED_INT=5125]="UNSIGNED_INT",r[r.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",r[r.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",r[r.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",r[r.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",r[r.BYTE=5120]="BYTE",r[r.SHORT=5122]="SHORT",r[r.INT=5124]="INT",r[r.FLOAT=5126]="FLOAT",r[r.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",r[r.HALF_FLOAT=36193]="HALF_FLOAT",r))(me||{}),eu=(r=>(r[r.FLOAT=0]="FLOAT",r[r.INT=1]="INT",r[r.UINT=2]="UINT",r))(eu||{}),Xt=(r=>(r[r.NEAREST=0]="NEAREST",r[r.LINEAR=1]="LINEAR",r))(Xt||{}),Pt=(r=>(r[r.CLAMP=33071]="CLAMP",r[r.REPEAT=10497]="REPEAT",r[r.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",r))(Pt||{}),Y0=(r=>(r[r.OFF=0]="OFF",r[r.POW2=1]="POW2",r[r.ON=2]="ON",r[r.ON_MANUAL=3]="ON_MANUAL",r))(Y0||{}),A0=(r=>(r[r.NPM=0]="NPM",r[r.UNPACK=1]="UNPACK",r[r.PMA=2]="PMA",r[r.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",r[r.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",r[r.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",r))(A0||{}),Nt=(r=>(r[r.NO=0]="NO",r[r.YES=1]="YES",r[r.AUTO=2]="AUTO",r[r.BLEND=0]="BLEND",r[r.CLEAR=1]="CLEAR",r[r.BLIT=2]="BLIT",r))(Nt||{}),tu=(r=>(r[r.AUTO=0]="AUTO",r[r.MANUAL=1]="MANUAL",r))(tu||{}),ht=(r=>(r.LOW="lowp",r.MEDIUM="mediump",r.HIGH="highp",r))(ht||{}),f0=(r=>(r[r.NONE=0]="NONE",r[r.SCISSOR=1]="SCISSOR",r[r.STENCIL=2]="STENCIL",r[r.SPRITE=3]="SPRITE",r[r.COLOR=4]="COLOR",r))(f0||{});var qe=(r=>(r[r.NONE=0]="NONE",r[r.LOW=2]="LOW",r[r.MEDIUM=4]="MEDIUM",r[r.HIGH=8]="HIGH",r))(qe||{}),bt=(r=>(r[r.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",r[r.ARRAY_BUFFER=34962]="ARRAY_BUFFER",r[r.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",r))(bt||{});var b1={createCanvas:(r,e)=>{let t=document.createElement("canvas");return t.width=r,t.height=e,t},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(r,e)=>fetch(r,e),parseXML:r=>new DOMParser().parseFromString(r,"text/xml")};var j={ADAPTER:b1,RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var w1=/iPhone/i,V8=/iPod/i,z8=/iPad/i,W8=/\biOS-universal(?:.+)Mac\b/i,S1=/\bAndroid(?:.+)Mobile\b/i,H8=/Android/i,mn=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,ru=/Silk/i,oi=/Windows Phone/i,j8=/\bWindows(?:.+)ARM\b/i,$8=/BlackBerry/i,Y8=/BB10/i,X8=/Opera Mini/i,q8=/\b(CriOS|Chrome)(?:.+)Mobile/i,K8=/Mobile(?:.+)Firefox\b/i,Z8=function(r){return typeof r<"u"&&r.platform==="MacIntel"&&typeof r.maxTouchPoints=="number"&&r.maxTouchPoints>1&&typeof MSStream>"u"};function jp(r){return function(e){return e.test(r)}}function zo(r){var e={userAgent:"",platform:"",maxTouchPoints:0};!r&&typeof navigator<"u"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof r=="string"?e.userAgent=r:r&&r.userAgent&&(e={userAgent:r.userAgent,platform:r.platform,maxTouchPoints:r.maxTouchPoints||0});var t=e.userAgent,i=t.split("[FBAN");typeof i[1]<"u"&&(t=i[0]),i=t.split("Twitter"),typeof i[1]<"u"&&(t=i[0]);var s=jp(t),n={apple:{phone:s(w1)&&!s(oi),ipod:s(V8),tablet:!s(w1)&&(s(z8)||Z8(e))&&!s(oi),universal:s(W8),device:(s(w1)||s(V8)||s(z8)||s(W8)||Z8(e))&&!s(oi)},amazon:{phone:s(mn),tablet:!s(mn)&&s(ru),device:s(mn)||s(ru)},android:{phone:!s(oi)&&s(mn)||!s(oi)&&s(S1),tablet:!s(oi)&&!s(mn)&&!s(S1)&&(s(ru)||s(H8)),device:!s(oi)&&(s(mn)||s(ru)||s(S1)||s(H8))||s(/\bokhttp\b/i)},windows:{phone:s(oi),tablet:s(j8),device:s(oi)||s(j8)},other:{blackberry:s($8),blackberry10:s(Y8),opera:s(X8),firefox:s(K8),chrome:s(q8),device:s($8)||s(Y8)||s(X8)||s(K8)||s(q8)},any:!1,phone:!1,tablet:!1};return n.any=n.apple.device||n.android.device||n.windows.device||n.other.device,n.phone=n.apple.phone||n.android.phone||n.windows.phone,n.tablet=n.apple.tablet||n.android.tablet||n.windows.tablet,n}var $p=zo.default??zo,qt=$p(globalThis.navigator);var ie={};C8(ie,{BaseTextureCache:()=>dt,BoundingBox:()=>Dn,CanvasRenderTarget:()=>pu,DATA_URI:()=>cu,EventEmitter:()=>zi.default,ProgramCache:()=>Qo,TextureCache:()=>O0,clearTextureCache:()=>P2,correctBlendMode:()=>S2,createIndicesForQuads:()=>F2,decomposeDataUri:()=>L2,deprecation:()=>Pe,destroyTextureCache:()=>M2,determineCrossOrigin:()=>mu,earcut:()=>O2.default,getBufferType:()=>Ui,getCanvasBoundingBox:()=>fu,getResolutionOfUrl:()=>Jo,hex2rgb:()=>D2,hex2string:()=>E2,interleaveTypedArrays:()=>A2,isMobile:()=>qt,isPow2:()=>Ko,isWebGLSupported:()=>uu,log2:()=>Zo,nextPow2:()=>Vi,path:()=>I1,premultiplyBlendMode:()=>qo,premultiplyRgba:()=>_2,premultiplyTint:()=>C2,premultiplyTintToRgba:()=>T2,removeItems:()=>du,rgb2hex:()=>w2,sayHello:()=>a2,sign:()=>I2,skipHello:()=>o2,string2hex:()=>b2,trimCanvas:()=>R2,uid:()=>Tr,url:()=>lu});j.RETINA_PREFIX=/@([0-9\.]+)x/;j.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var zi=h0(J8(),1),O2=h0(s2(),1);var xn=require("url"),lu={parse:xn.parse,format:xn.format,resolve:xn.resolve};function dr(r){if(typeof r!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(r)}`)}function Yo(r){return r.split("?")[0].split("#")[0]}function cf(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function df(r,e,t){return r.replace(new RegExp(cf(e),"g"),t)}function pf(r,e){let t="",i=0,s=-1,n=0,o=-1;for(let a=0;a<=r.length;++a){if(a<r.length)o=r.charCodeAt(a);else{if(o===47)break;o=47}if(o===47){if(!(s===a-1||n===1))if(s!==a-1&&n===2){if(t.length<2||i!==2||t.charCodeAt(t.length-1)!==46||t.charCodeAt(t.length-2)!==46){if(t.length>2){let l=t.lastIndexOf("/");if(l!==t.length-1){l===-1?(t="",i=0):(t=t.slice(0,l),i=t.length-1-t.lastIndexOf("/")),s=a,n=0;continue}}else if(t.length===2||t.length===1){t="",i=0,s=a,n=0;continue}}e&&(t.length>0?t+="/..":t="..",i=2)}else t.length>0?t+=`/${r.slice(s+1,a)}`:t=r.slice(s+1,a),i=a-s-1;s=a,n=0}else o===46&&n!==-1?++n:n=-1}return t}var I1={toPosix(r){return df(r,"\\","/")},isUrl(r){return/^https?:/.test(this.toPosix(r))},isDataUrl(r){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(r)},hasProtocol(r){return/^[^/:]+:\//.test(this.toPosix(r))},getProtocol(r){dr(r),r=this.toPosix(r);let e="",t=/^file:\/\/\//.exec(r),i=/^[^/:]+:\/\//.exec(r),s=/^[^/:]+:\//.exec(r);if(t||i||s){let n=t?.[0]||i?.[0]||s?.[0];e=n,r=r.slice(n.length)}return e},toAbsolute(r,e,t){if(this.isDataUrl(r))return r;let i=Yo(this.toPosix(e??j.ADAPTER.getBaseUrl())),s=Yo(this.toPosix(t??this.rootname(i)));return dr(r),r=this.toPosix(r),r.startsWith("/")?I1.join(s,r.slice(1)):this.isAbsolute(r)?r:this.join(i,r)},normalize(r){if(r=this.toPosix(r),dr(r),r.length===0)return".";let e="",t=r.startsWith("/");this.hasProtocol(r)&&(e=this.rootname(r),r=r.slice(e.length));let i=r.endsWith("/");return r=pf(r,!1),r.length>0&&i&&(r+="/"),t?`/${r}`:e+r},isAbsolute(r){return dr(r),r=this.toPosix(r),this.hasProtocol(r)?!0:r.startsWith("/")},join(...r){if(r.length===0)return".";let e;for(let t=0;t<r.length;++t){let i=r[t];if(dr(i),i.length>0)if(e===void 0)e=i;else{let s=r[t-1]??"";this.extname(s)?e+=`/../${i}`:e+=`/${i}`}}return e===void 0?".":this.normalize(e)},dirname(r){if(dr(r),r.length===0)return".";r=this.toPosix(r);let e=r.charCodeAt(0),t=e===47,i=-1,s=!0,n=this.getProtocol(r),o=r;r=r.slice(n.length);for(let a=r.length-1;a>=1;--a)if(e=r.charCodeAt(a),e===47){if(!s){i=a;break}}else s=!1;return i===-1?t?"/":this.isUrl(o)?n+r:n:t&&i===1?"//":n+r.slice(0,i)},rootname(r){dr(r),r=this.toPosix(r);let e="";if(r.startsWith("/")?e="/":e=this.getProtocol(r),this.isUrl(r)){let t=r.indexOf("/",e.length);t!==-1?e=r.slice(0,t):e=r,e.endsWith("/")||(e+="/")}return e},basename(r,e){dr(r),e&&dr(e),r=Yo(this.toPosix(r));let t=0,i=-1,s=!0,n;if(e!==void 0&&e.length>0&&e.length<=r.length){if(e.length===r.length&&e===r)return"";let o=e.length-1,a=-1;for(n=r.length-1;n>=0;--n){let l=r.charCodeAt(n);if(l===47){if(!s){t=n+1;break}}else a===-1&&(s=!1,a=n+1),o>=0&&(l===e.charCodeAt(o)?--o===-1&&(i=n):(o=-1,i=a))}return t===i?i=a:i===-1&&(i=r.length),r.slice(t,i)}for(n=r.length-1;n>=0;--n)if(r.charCodeAt(n)===47){if(!s){t=n+1;break}}else i===-1&&(s=!1,i=n+1);return i===-1?"":r.slice(t,i)},extname(r){dr(r),r=Yo(this.toPosix(r));let e=-1,t=0,i=-1,s=!0,n=0;for(let o=r.length-1;o>=0;--o){let a=r.charCodeAt(o);if(a===47){if(!s){t=o+1;break}continue}i===-1&&(s=!1,i=o+1),a===46?e===-1?e=o:n!==1&&(n=1):e!==-1&&(n=-1)}return e===-1||i===-1||n===0||n===1&&e===i-1&&e===t+1?"":r.slice(e,i)},parse(r){dr(r);let e={root:"",dir:"",base:"",ext:"",name:""};if(r.length===0)return e;r=Yo(this.toPosix(r));let t=r.charCodeAt(0),i=this.isAbsolute(r),s,n="";e.root=this.rootname(r),i||this.hasProtocol(r)?s=1:s=0;let o=-1,a=0,l=-1,u=!0,h=r.length-1,d=0;for(;h>=s;--h){if(t=r.charCodeAt(h),t===47){if(!u){a=h+1;break}continue}l===-1&&(u=!1,l=h+1),t===46?o===-1?o=h:d!==1&&(d=1):o!==-1&&(d=-1)}return o===-1||l===-1||d===0||d===1&&o===l-1&&o===a+1?l!==-1&&(a===0&&i?e.base=e.name=r.slice(1,l):e.base=e.name=r.slice(a,l)):(a===0&&i?(e.name=r.slice(1,o),e.base=r.slice(1,l)):(e.name=r.slice(a,o),e.base=r.slice(a,l)),e.ext=r.slice(o,l)),e.dir=this.dirname(r),n&&(e.dir=n+e.dir),e},sep:"/",delimiter:":"};var n2={};function Pe(r,e,t=3){if(n2[e])return;let i=new Error().stack;typeof i>"u"?console.warn("PixiJS Deprecation Warning: ",`${e}
Deprecated since v${r}`):(i=i.split(`
`).splice(t).join(`
`),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${e}
Deprecated since v${r}`),console.warn(i),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${e}
Deprecated since v${r}`),console.warn(i))),n2[e]=!0}function o2(){Pe("7.0.0","skipHello is deprecated, please use settings.RENDER_OPTIONS.hello")}function a2(){Pe("7.0.0",`sayHello is deprecated, please use Renderer's "hello" option`)}var k1;function uu(){return typeof k1>"u"&&(k1=function(){let e={stencil:!0,failIfMajorPerformanceCaveat:j.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!j.ADAPTER.getWebGLRenderingContext())return!1;let t=j.ADAPTER.createCanvas(),i=t.getContext("webgl",e)||t.getContext("experimental-webgl",e),s=!!i?.getContextAttributes()?.stencil;if(i){let n=i.getExtension("WEBGL_lose_context");n&&n.loseContext()}return i=null,s}catch{return!1}}()),k1}var ff={grad:.9,turn:360,rad:360/(2*Math.PI)},ai=function(r){return typeof r=="string"?r.length>0:typeof r=="number"},L0=function(r,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*r)/t+0},Kt=function(r,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),r>t?t:r>e?r:e},g2=function(r){return(r=isFinite(r)?r%360:0)>0?r:r+360},l2=function(r){return{r:Kt(r.r,0,255),g:Kt(r.g,0,255),b:Kt(r.b,0,255),a:Kt(r.a)}},M1=function(r){return{r:L0(r.r),g:L0(r.g),b:L0(r.b),a:L0(r.a,3)}},gf=/^#([0-9a-f]{3,8})$/i,hu=function(r){var e=r.toString(16);return e.length<2?"0"+e:e},m2=function(r){var e=r.r,t=r.g,i=r.b,s=r.a,n=Math.max(e,t,i),o=n-Math.min(e,t,i),a=o?n===e?(t-i)/o:n===t?2+(i-e)/o:4+(e-t)/o:0;return{h:60*(a<0?a+6:a),s:n?o/n*100:0,v:n/255*100,a:s}},y2=function(r){var e=r.h,t=r.s,i=r.v,s=r.a;e=e/360*6,t/=100,i/=100;var n=Math.floor(e),o=i*(1-t),a=i*(1-(e-n)*t),l=i*(1-(1-e+n)*t),u=n%6;return{r:255*[i,a,o,o,l,i][u],g:255*[l,i,i,a,o,o][u],b:255*[o,o,l,i,i,a][u],a:s}},u2=function(r){return{h:g2(r.h),s:Kt(r.s,0,100),l:Kt(r.l,0,100),a:Kt(r.a)}},h2=function(r){return{h:L0(r.h),s:L0(r.s),l:L0(r.l),a:L0(r.a,3)}},c2=function(r){return y2((t=(e=r).s,{h:e.h,s:(t*=((i=e.l)<50?i:100-i)/100)>0?2*t/(i+t)*100:0,v:i+t,a:e.a}));var e,t,i},Xo=function(r){return{h:(e=m2(r)).h,s:(s=(200-(t=e.s))*(i=e.v)/100)>0&&s<200?t*i/100/(s<=100?s:200-s)*100:0,l:s/2,a:e.a};var e,t,i,s},mf=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,yf=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,xf=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,vf=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,B1={string:[[function(r){var e=gf.exec(r);return e?(r=e[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:r.length===4?L0(parseInt(r[3]+r[3],16)/255,2):1}:r.length===6||r.length===8?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:r.length===8?L0(parseInt(r.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(r){var e=xf.exec(r)||vf.exec(r);return e?e[2]!==e[4]||e[4]!==e[6]?null:l2({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(r){var e=mf.exec(r)||yf.exec(r);if(!e)return null;var t,i,s=u2({h:(t=e[1],i=e[2],i===void 0&&(i="deg"),Number(t)*(ff[i]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return c2(s)},"hsl"]],object:[[function(r){var e=r.r,t=r.g,i=r.b,s=r.a,n=s===void 0?1:s;return ai(e)&&ai(t)&&ai(i)?l2({r:Number(e),g:Number(t),b:Number(i),a:Number(n)}):null},"rgb"],[function(r){var e=r.h,t=r.s,i=r.l,s=r.a,n=s===void 0?1:s;if(!ai(e)||!ai(t)||!ai(i))return null;var o=u2({h:Number(e),s:Number(t),l:Number(i),a:Number(n)});return c2(o)},"hsl"],[function(r){var e=r.h,t=r.s,i=r.v,s=r.a,n=s===void 0?1:s;if(!ai(e)||!ai(t)||!ai(i))return null;var o=function(a){return{h:g2(a.h),s:Kt(a.s,0,100),v:Kt(a.v,0,100),a:Kt(a.a)}}({h:Number(e),s:Number(t),v:Number(i),a:Number(n)});return y2(o)},"hsv"]]},d2=function(r,e){for(var t=0;t<e.length;t++){var i=e[t][0](r);if(i)return[i,e[t][1]]}return[null,void 0]},Df=function(r){return typeof r=="string"?d2(r.trim(),B1.string):typeof r=="object"&&r!==null?d2(r,B1.object):[null,void 0]};var P1=function(r,e){var t=Xo(r);return{h:t.h,s:Kt(t.s+100*e,0,100),l:t.l,a:t.a}},N1=function(r){return(299*r.r+587*r.g+114*r.b)/1e3/255},p2=function(r,e){var t=Xo(r);return{h:t.h,s:t.s,l:Kt(t.l+100*e,0,100),a:t.a}},R1=function(){function r(e){this.parsed=Df(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return r.prototype.isValid=function(){return this.parsed!==null},r.prototype.brightness=function(){return L0(N1(this.rgba),2)},r.prototype.isDark=function(){return N1(this.rgba)<.5},r.prototype.isLight=function(){return N1(this.rgba)>=.5},r.prototype.toHex=function(){return e=M1(this.rgba),t=e.r,i=e.g,s=e.b,o=(n=e.a)<1?hu(L0(255*n)):"","#"+hu(t)+hu(i)+hu(s)+o;var e,t,i,s,n,o},r.prototype.toRgb=function(){return M1(this.rgba)},r.prototype.toRgbString=function(){return e=M1(this.rgba),t=e.r,i=e.g,s=e.b,(n=e.a)<1?"rgba("+t+", "+i+", "+s+", "+n+")":"rgb("+t+", "+i+", "+s+")";var e,t,i,s,n},r.prototype.toHsl=function(){return h2(Xo(this.rgba))},r.prototype.toHslString=function(){return e=h2(Xo(this.rgba)),t=e.h,i=e.s,s=e.l,(n=e.a)<1?"hsla("+t+", "+i+"%, "+s+"%, "+n+")":"hsl("+t+", "+i+"%, "+s+"%)";var e,t,i,s,n},r.prototype.toHsv=function(){return e=m2(this.rgba),{h:L0(e.h),s:L0(e.s),v:L0(e.v),a:L0(e.a,3)};var e},r.prototype.invert=function(){return pr({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},r.prototype.saturate=function(e){return e===void 0&&(e=.1),pr(P1(this.rgba,e))},r.prototype.desaturate=function(e){return e===void 0&&(e=.1),pr(P1(this.rgba,-e))},r.prototype.grayscale=function(){return pr(P1(this.rgba,-1))},r.prototype.lighten=function(e){return e===void 0&&(e=.1),pr(p2(this.rgba,e))},r.prototype.darken=function(e){return e===void 0&&(e=.1),pr(p2(this.rgba,-e))},r.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},r.prototype.alpha=function(e){return typeof e=="number"?pr({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):L0(this.rgba.a,3);var t},r.prototype.hue=function(e){var t=Xo(this.rgba);return typeof e=="number"?pr({h:e,s:t.s,l:t.l,a:t.a}):L0(t.h)},r.prototype.isEqual=function(e){return this.toHex()===pr(e).toHex()},r}(),pr=function(r){return r instanceof R1?r:new R1(r)},f2=[],x2=function(r){r.forEach(function(e){f2.indexOf(e)<0&&(e(R1,B1),f2.push(e))})};function v2(r,e){var t={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},i={};for(var s in t)i[t[s]]=s;var n={};r.prototype.toName=function(o){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var a,l,u=i[this.toHex()];if(u)return u;if(o?.closest){var h=this.toRgb(),d=1/0,p="black";if(!n.length)for(var m in t)n[m]=new r(t[m]).toRgb();for(var x in t){var C=(a=h,l=n[x],Math.pow(a.r-l.r,2)+Math.pow(a.g-l.g,2)+Math.pow(a.b-l.b,2));C<d&&(d=C,p=x)}return p}},e.string.push([function(o){var a=o.toLowerCase(),l=a==="transparent"?"#0000":t[a];return l?new r(l).toRgb():null},"name"])}x2([v2]);var vn=class{constructor(r=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=r}get red(){return this._components[0]}get green(){return this._components[1]}get blue(){return this._components[2]}get alpha(){return this._components[3]}setValue(r){return this.value=r,this}set value(r){if(r instanceof vn)this._value=this.cloneSource(r._value),this._int=r._int,this._components.set(r._components);else{if(r===null)throw new Error("Cannot set PIXI.Color#value to null");(this._value===null||!this.isSourceEqual(this._value,r))&&(this.normalize(r),this._value=this.cloneSource(r))}}get value(){return this._value}cloneSource(r){return typeof r=="string"||typeof r=="number"||r instanceof Number||r===null?r:Array.isArray(r)||ArrayBuffer.isView(r)?r.slice(0):typeof r=="object"&&r!==null?{...r}:r}isSourceEqual(r,e){let t=typeof r;if(t!==typeof e)return!1;if(t==="number"||t==="string"||r instanceof Number)return r===e;if(Array.isArray(r)&&Array.isArray(e)||ArrayBuffer.isView(r)&&ArrayBuffer.isView(e))return r.length!==e.length?!1:r.every((s,n)=>s===e[n]);if(r!==null&&e!==null){let s=Object.keys(r),n=Object.keys(e);return s.length!==n.length?!1:s.every(o=>r[o]===e[o])}return r===e}toRgba(){let[r,e,t,i]=this._components;return{r,g:e,b:t,a:i}}toRgb(){let[r,e,t]=this._components;return{r,g:e,b:t}}toRgbaString(){let[r,e,t]=this.toUint8RgbArray();return`rgba(${r},${e},${t},${this.alpha})`}toUint8RgbArray(r){let[e,t,i]=this._components;return r=r??[],r[0]=Math.round(e*255),r[1]=Math.round(t*255),r[2]=Math.round(i*255),r}toRgbArray(r){r=r??[];let[e,t,i]=this._components;return r[0]=e,r[1]=t,r[2]=i,r}toNumber(){return this._int}toLittleEndianNumber(){let r=this._int;return(r>>16)+(r&65280)+((r&255)<<16)}multiply(r){let[e,t,i,s]=vn.temp.setValue(r)._components;return this._components[0]*=e,this._components[1]*=t,this._components[2]*=i,this._components[3]*=s,this.refreshInt(),this._value=null,this}premultiply(r,e=!0){return e&&(this._components[0]*=r,this._components[1]*=r,this._components[2]*=r),this._components[3]=r,this.refreshInt(),this._value=null,this}toPremultiplied(r,e=!0){if(r===1)return(255<<24)+this._int;if(r===0)return e?0:this._int;let t=this._int>>16&255,i=this._int>>8&255,s=this._int&255;return e&&(t=t*r+.5|0,i=i*r+.5|0,s=s*r+.5|0),(r*255<<24)+(t<<16)+(i<<8)+s}toHex(){let r=this._int.toString(16);return`#${"000000".substring(0,6-r.length)+r}`}toHexa(){let e=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-e.length)+e}setAlpha(r){return this._components[3]=this._clamp(r),this}round(r){let[e,t,i]=this._components;return this._components[0]=Math.round(e*r)/r,this._components[1]=Math.round(t*r)/r,this._components[2]=Math.round(i*r)/r,this.refreshInt(),this._value=null,this}toArray(r){r=r??[];let[e,t,i,s]=this._components;return r[0]=e,r[1]=t,r[2]=i,r[3]=s,r}normalize(r){let e,t,i,s;if((typeof r=="number"||r instanceof Number)&&r>=0&&r<=16777215){let n=r;e=(n>>16&255)/255,t=(n>>8&255)/255,i=(n&255)/255,s=1}else if((Array.isArray(r)||r instanceof Float32Array)&&r.length>=3&&r.length<=4)r=this._clamp(r),[e,t,i,s=1]=r;else if((r instanceof Uint8Array||r instanceof Uint8ClampedArray)&&r.length>=3&&r.length<=4)r=this._clamp(r,0,255),[e,t,i,s=255]=r,e/=255,t/=255,i/=255,s/=255;else if(typeof r=="string"||typeof r=="object"){if(typeof r=="string"){let o=vn.HEX_PATTERN.exec(r);o&&(r=`#${o[2]}`)}let n=pr(r);n.isValid()&&({r:e,g:t,b:i,a:s}=n.rgba,e/=255,t/=255,i/=255)}if(e!==void 0)this._components[0]=e,this._components[1]=t,this._components[2]=i,this._components[3]=s,this.refreshInt();else throw new Error(`Unable to convert color ${r}`)}refreshInt(){this._clamp(this._components);let[r,e,t]=this._components;this._int=(r*255<<16)+(e*255<<8)+(t*255|0)}_clamp(r,e=0,t=1){return typeof r=="number"?Math.min(Math.max(r,e),t):(r.forEach((i,s)=>{r[s]=Math.min(Math.max(i,e),t)}),r)}},Se=vn;Se.shared=new vn;Se.temp=new vn;Se.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;function D2(r,e=[]){return Pe("7.2.0","utils.hex2rgb is deprecated, use Color#toRgbArray instead"),Se.shared.setValue(r).toRgbArray(e)}function E2(r){return Pe("7.2.0","utils.hex2string is deprecated, use Color#toHex instead"),Se.shared.setValue(r).toHex()}function b2(r){return Pe("7.2.0","utils.string2hex is deprecated, use Color#toNumber instead"),Se.shared.setValue(r).toNumber()}function w2(r){return Pe("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),Se.shared.setValue(r).toNumber()}function Ef(){let r=[],e=[];for(let i=0;i<32;i++)r[i]=i,e[i]=i;r[be.NORMAL_NPM]=be.NORMAL,r[be.ADD_NPM]=be.ADD,r[be.SCREEN_NPM]=be.SCREEN,e[be.NORMAL]=be.NORMAL_NPM,e[be.ADD]=be.ADD_NPM,e[be.SCREEN]=be.SCREEN_NPM;let t=[];return t.push(e),t.push(r),t}var qo=Ef();function S2(r,e){return qo[e?1:0][r]}function _2(r,e,t,i=!0){return Pe("7.2.0","utils.premultiplyRgba has moved to Color.premultiply"),Se.shared.setValue(r).premultiply(e,i).toArray(t??new Float32Array(4))}function C2(r,e){return Pe("7.2.0","utils.premultiplyTint has moved to Color.toPremultiplied"),Se.shared.setValue(r).toPremultiplied(e)}function T2(r,e,t,i=!0){return Pe("7.2.0","utils.premultiplyTintToRgba has moved to Color.premultiply"),Se.shared.setValue(r).premultiply(e,i).toArray(t??new Float32Array(4))}var cu=/^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i;function F2(r,e=null){let t=r*6;if(e=e||new Uint16Array(t),e.length!==t)throw new Error(`Out buffer length is incorrect, got ${e.length} and expected ${t}`);for(let i=0,s=0;i<t;i+=6,s+=4)e[i+0]=s+0,e[i+1]=s+1,e[i+2]=s+2,e[i+3]=s+0,e[i+4]=s+2,e[i+5]=s+3;return e}function Ui(r){if(r.BYTES_PER_ELEMENT===4)return r instanceof Float32Array?"Float32Array":r instanceof Uint32Array?"Uint32Array":"Int32Array";if(r.BYTES_PER_ELEMENT===2){if(r instanceof Uint16Array)return"Uint16Array"}else if(r.BYTES_PER_ELEMENT===1&&r instanceof Uint8Array)return"Uint8Array";return null}var bf={Float32Array,Uint32Array,Int32Array,Uint8Array};function A2(r,e){let t=0,i=0,s={};for(let l=0;l<r.length;l++)i+=e[l],t+=r[l].length;let n=new ArrayBuffer(t*4),o=null,a=0;for(let l=0;l<r.length;l++){let u=e[l],h=r[l],d=Ui(h);s[d]||(s[d]=new bf[d](n)),o=s[d];for(let p=0;p<h.length;p++){let m=(p/u|0)*i+a,x=p%u;o[m+x]=h[p]}a+=u}return new Float32Array(n)}function Vi(r){return r+=r===0?1:0,--r,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r+1}function Ko(r){return!(r&r-1)&&!!r}function Zo(r){let e=(r>65535?1:0)<<4;r>>>=e;let t=(r>255?1:0)<<3;return r>>>=t,e|=t,t=(r>15?1:0)<<2,r>>>=t,e|=t,t=(r>3?1:0)<<1,r>>>=t,e|=t,e|r>>1}function du(r,e,t){let i=r.length,s;if(e>=i||t===0)return;t=e+t>i?i-e:t;let n=i-t;for(s=e;s<n;++s)r[s]=r[s+t];r.length=n}function I2(r){return r===0?0:r<0?-1:1}var wf=0;function Tr(){return++wf}var k2=class{constructor(r,e,t,i){this.left=r,this.top=e,this.right=t,this.bottom=i}get width(){return this.right-this.left}get height(){return this.bottom-this.top}isEmpty(){return this.left===this.right||this.top===this.bottom}},Dn=k2;Dn.EMPTY=new k2(0,0,0,0);var Qo={},O0=Object.create(null),dt=Object.create(null);function M2(){let r;for(r in O0)O0[r].destroy();for(r in dt)dt[r].destroy()}function P2(){let r;for(r in O0)delete O0[r];for(r in dt)delete dt[r]}var pu=class{constructor(e,t,i){this._canvas=j.ADAPTER.createCanvas(),this._context=this._canvas.getContext("2d"),this.resolution=i||j.RESOLUTION,this.resize(e,t)}clear(){this._checkDestroyed(),this._context.setTransform(1,0,0,1,0,0),this._context.clearRect(0,0,this._canvas.width,this._canvas.height)}resize(e,t){this._checkDestroyed(),this._canvas.width=Math.round(e*this.resolution),this._canvas.height=Math.round(t*this.resolution)}destroy(){this._context=null,this._canvas=null}get width(){return this._checkDestroyed(),this._canvas.width}set width(e){this._checkDestroyed(),this._canvas.width=Math.round(e)}get height(){return this._checkDestroyed(),this._canvas.height}set height(e){this._checkDestroyed(),this._canvas.height=Math.round(e)}get canvas(){return this._checkDestroyed(),this._canvas}get context(){return this._checkDestroyed(),this._context}_checkDestroyed(){if(this._canvas===null)throw new TypeError("The CanvasRenderTarget has already been destroyed")}};function N2(r,e,t){for(let i=0,s=4*t*e;i<e;++i,s+=4)if(r[s+3]!==0)return!1;return!0}function B2(r,e,t,i,s){let n=4*e;for(let o=i,a=i*n+4*t;o<=s;++o,a+=n)if(r[a+3]!==0)return!1;return!0}function fu(r){let{width:e,height:t}=r,i=r.getContext("2d",{willReadFrequently:!0});if(i===null)throw new TypeError("Failed to get canvas 2D context");let n=i.getImageData(0,0,e,t).data,o=0,a=0,l=e-1,u=t-1;for(;a<t&&N2(n,e,a);)++a;if(a===t)return Dn.EMPTY;for(;N2(n,e,u);)--u;for(;B2(n,e,o,a,u);)++o;for(;B2(n,e,l,a,u);)--l;return++l,++u,new Dn(o,a,l,u)}function R2(r){let e=fu(r),{width:t,height:i}=e,s=null;if(!e.isEmpty()){let n=r.getContext("2d");if(n===null)throw new TypeError("Failed to get canvas 2D context");s=n.getImageData(e.left,e.top,t,i)}return{width:t,height:i,data:s}}function L2(r){let e=cu.exec(r);if(e)return{mediaType:e[1]?e[1].toLowerCase():void 0,subType:e[2]?e[2].toLowerCase():void 0,charset:e[3]?e[3].toLowerCase():void 0,encoding:e[4]?e[4].toLowerCase():void 0,data:e[5]}}var gu;function mu(r,e=globalThis.location){if(r.startsWith("data:"))return"";e=e||globalThis.location,gu||(gu=document.createElement("a")),gu.href=r;let t=lu.parse(gu.href),i=!t.port&&e.port===""||t.port===e.port;return t.hostname!==e.hostname||!i||t.protocol!==e.protocol?"anonymous":""}function Jo(r,e=1){let t=j.RETINA_PREFIX?.exec(r);return t?parseFloat(t[1]):e}var $=(r=>(r.Renderer="renderer",r.Application="application",r.RendererSystem="renderer-webgl-system",r.RendererPlugin="renderer-webgl-plugin",r.CanvasRendererSystem="renderer-canvas-system",r.CanvasRendererPlugin="renderer-canvas-plugin",r.Asset="asset",r.LoadParser="load-parser",r.ResolveParser="resolve-parser",r.CacheParser="cache-parser",r.DetectionParser="detection-parser",r))($||{}),L1=r=>{if(typeof r=="function"||typeof r=="object"&&r.extension){if(!r.extension)throw new Error("Extension class must have an extension object");r={...typeof r.extension!="object"?{type:r.extension}:r.extension,ref:r}}if(typeof r=="object")r={...r};else throw new Error("Invalid extension type");return typeof r.type=="string"&&(r.type=[r.type]),r},G2=(r,e)=>L1(r).priority??e,K={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...r){return r.map(L1).forEach(e=>{e.type.forEach(t=>this._removeHandlers[t]?.(e))}),this},add(...r){return r.map(L1).forEach(e=>{e.type.forEach(t=>{let i=this._addHandlers,s=this._queue;i[t]?i[t](e):(s[t]=s[t]||[],s[t].push(e))})}),this},handle(r,e,t){let i=this._addHandlers,s=this._removeHandlers;if(i[r]||s[r])throw new Error(`Extension type ${r} already has a handler`);i[r]=e,s[r]=t;let n=this._queue;return n[r]&&(n[r].forEach(o=>e(o)),delete n[r]),this},handleByMap(r,e){return this.handle(r,t=>{e[t.name]=t.ref},t=>{delete e[t.name]})},handleByList(r,e,t=-1){return this.handle(r,i=>{e.includes(i.ref)||(e.push(i.ref),e.sort((s,n)=>G2(n,t)-G2(s,t)))},i=>{let s=e.indexOf(i.ref);s!==-1&&e.splice(s,1)})}};var Wi=class{constructor(e){typeof e=="number"?this.rawBinaryData=new ArrayBuffer(e):e instanceof Uint8Array?this.rawBinaryData=e.buffer:this.rawBinaryData=e,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get uint16View(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}view(e){return this[`${e}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(e){switch(e){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${e} isn't a valid view type`)}}};var Sf=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
`);function _f(r){let e="";for(let t=0;t<r;++t)t>0&&(e+=`
else `),t<r-1&&(e+=`if(test == ${t}.0){}`);return e}function yu(r,e){if(r===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");let t=e.createShader(e.FRAGMENT_SHADER);for(;;){let i=Sf.replace(/%forloop%/gi,_f(r));if(e.shaderSource(t,i),e.compileShader(t),!e.getShaderParameter(t,e.COMPILE_STATUS))r=r/2|0;else break}return r}var O1=0,G1=1,U1=2,V1=3,z1=4,W1=5,X0=class r{constructor(){this.data=0,this.blendMode=be.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<O1)}set blend(e){!!(this.data&1<<O1)!==e&&(this.data^=1<<O1)}get offsets(){return!!(this.data&1<<G1)}set offsets(e){!!(this.data&1<<G1)!==e&&(this.data^=1<<G1)}get culling(){return!!(this.data&1<<U1)}set culling(e){!!(this.data&1<<U1)!==e&&(this.data^=1<<U1)}get depthTest(){return!!(this.data&1<<V1)}set depthTest(e){!!(this.data&1<<V1)!==e&&(this.data^=1<<V1)}get depthMask(){return!!(this.data&1<<W1)}set depthMask(e){!!(this.data&1<<W1)!==e&&(this.data^=1<<W1)}get clockwiseFrontFace(){return!!(this.data&1<<z1)}set clockwiseFrontFace(e){!!(this.data&1<<z1)!==e&&(this.data^=1<<z1)}get blendMode(){return this._blendMode}set blendMode(e){this.blend=e!==be.NONE,this._blendMode=e}get polygonOffset(){return this._polygonOffset}set polygonOffset(e){this.offsets=!!e,this._polygonOffset=e}toString(){return`[@pixi/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`}static for2d(){let e=new r;return e.depthTest=!1,e.blend=!0,e}};var En=[];function bn(r,e){if(!r)return null;let t="";if(typeof r=="string"){let i=/\.(\w{3,4})(?:$|\?|#)/i.exec(r);i&&(t=i[1].toLowerCase())}for(let i=En.length-1;i>=0;--i){let s=En[i];if(s.test&&s.test(r,t))return new s(r,e)}throw new Error("Unrecognized source type to auto-detect Resource")}var b0=class{constructor(e){this.items=[],this._name=e,this._aliasCount=0}emit(e,t,i,s,n,o,a,l){if(arguments.length>8)throw new Error("max arguments reached");let{name:u,items:h}=this;this._aliasCount++;for(let d=0,p=h.length;d<p;d++)h[d][u](e,t,i,s,n,o,a,l);return h===this.items&&this._aliasCount--,this}ensureNonAliasedItems(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(e){return e[this._name]&&(this.ensureNonAliasedItems(),this.remove(e),this.items.push(e)),this}remove(e){let t=this.items.indexOf(e);return t!==-1&&(this.ensureNonAliasedItems(),this.items.splice(t,1)),this}contains(e){return this.items.includes(e)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items=null,this._name=null}get empty(){return this.items.length===0}get name(){return this._name}};Object.defineProperties(b0.prototype,{dispatch:{value:b0.prototype.emit},run:{value:b0.prototype.emit}});var Bt=class{constructor(e=0,t=0){this._width=e,this._height=t,this.destroyed=!1,this.internal=!1,this.onResize=new b0("setRealSize"),this.onUpdate=new b0("update"),this.onError=new b0("onError")}bind(e){this.onResize.add(e),this.onUpdate.add(e),this.onError.add(e),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(e){this.onResize.remove(e),this.onUpdate.remove(e),this.onError.remove(e)}resize(e,t){(e!==this._width||t!==this._height)&&(this._width=e,this._height=t,this.onResize.emit(e,t))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(e,t,i){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(e,t){return!1}};var wt=class extends Bt{constructor(e,t){let{width:i,height:s}=t||{};if(!i||!s)throw new Error("BufferResource width or height invalid");super(i,s),this.data=e}upload(e,t,i){let s=e.gl;s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.alphaMode===A0.UNPACK);let n=t.realWidth,o=t.realHeight;return i.width===n&&i.height===o?s.texSubImage2D(t.target,0,0,0,n,o,t.format,i.type,this.data):(i.width=n,i.height=o,s.texImage2D(t.target,0,i.internalFormat,n,o,0,t.format,i.type,this.data)),!0}dispose(){this.data=null}static test(e){return e instanceof Float32Array||e instanceof Uint8Array||e instanceof Uint32Array}};var Cf={scaleMode:Xt.NEAREST,format:se.RGBA,alphaMode:A0.NPM},wn=class extends zi.default{constructor(r=null,e=null){super(),e=Object.assign({},wn.defaultOptions,e);let{alphaMode:t,mipmap:i,anisotropicLevel:s,scaleMode:n,width:o,height:a,wrapMode:l,format:u,type:h,target:d,resolution:p,resourceOptions:m}=e;r&&!(r instanceof Bt)&&(r=bn(r,m),r.internal=!0),this.resolution=p||j.RESOLUTION,this.width=Math.round((o||0)*this.resolution)/this.resolution,this.height=Math.round((a||0)*this.resolution)/this.resolution,this._mipmap=i,this.anisotropicLevel=s,this._wrapMode=l,this._scaleMode=n,this.format=u,this.type=h,this.target=d,this.alphaMode=t,this.uid=Tr(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=o>0&&a>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(r)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(r){this._mipmap!==r&&(this._mipmap=r,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(r){this._scaleMode!==r&&(this._scaleMode=r,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(r){this._wrapMode!==r&&(this._wrapMode=r,this.dirtyStyleId++)}setStyle(r,e){let t;return r!==void 0&&r!==this.scaleMode&&(this.scaleMode=r,t=!0),e!==void 0&&e!==this.mipmap&&(this.mipmap=e,t=!0),t&&this.dirtyStyleId++,this}setSize(r,e,t){return t=t||this.resolution,this.setRealSize(r*t,e*t,t)}setRealSize(r,e,t){return this.resolution=t||this.resolution,this.width=Math.round(r)/this.resolution,this.height=Math.round(e)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=Ko(this.realWidth)&&Ko(this.realHeight)}setResolution(r){let e=this.resolution;return e===r?this:(this.resolution=r,this.valid&&(this.width=Math.round(this.width*e)/r,this.height=Math.round(this.height*e)/r,this.emit("update",this)),this._refreshPOT(),this)}setResource(r){if(this.resource===r)return this;if(this.resource)throw new Error("Resource can be set only once");return r.bind(this),this.resource=r,this}update(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))}onError(r){this.emit("error",this,r)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete dt[this.cacheId],delete O0[this.cacheId],this.cacheId=null),this.dispose(),wn.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(r,e,t=j.STRICT_TEXTURE_CACHE){let i=typeof r=="string",s=null;if(i)s=r;else{if(!r._pixiId){let o=e?.pixiIdPrefix||"pixiid";r._pixiId=`${o}_${Tr()}`}s=r._pixiId}let n=dt[s];if(i&&t&&!n)throw new Error(`The cacheId "${s}" does not exist in BaseTextureCache.`);return n||(n=new wn(r,e),n.cacheId=s,wn.addToCache(n,s)),n}static fromBuffer(r,e,t,i){r=r||new Float32Array(e*t*4);let s=new wt(r,{width:e,height:t}),n=r instanceof Float32Array?me.FLOAT:me.UNSIGNED_BYTE;return new wn(s,Object.assign({},Cf,{type:n},i))}static addToCache(r,e){e&&(r.textureCacheIds.includes(e)||r.textureCacheIds.push(e),dt[e]&&dt[e]!==r&&console.warn(`BaseTexture added to the cache with an id [${e}] that already had an entry`),dt[e]=r)}static removeFromCache(r){if(typeof r=="string"){let e=dt[r];if(e){let t=e.textureCacheIds.indexOf(r);return t>-1&&e.textureCacheIds.splice(t,1),delete dt[r],e}}else if(r?.textureCacheIds){for(let e=0;e<r.textureCacheIds.length;++e)delete dt[r.textureCacheIds[e]];return r.textureCacheIds.length=0,r}return null}},ye=wn;ye.defaultOptions={mipmap:Y0.POW2,anisotropicLevel:0,scaleMode:Xt.LINEAR,wrapMode:Pt.CLAMP,alphaMode:A0.UNPACK,target:ni.TEXTURE_2D,format:se.RGBA,type:me.UNSIGNED_BYTE};ye._globalBatch=0;var Hi=class{constructor(){this.texArray=null,this.blend=0,this.type=Et.TRIANGLES,this.start=0,this.size=0,this.data=null}};var Tf=0,Qe=class r{constructor(e,t=!0,i=!1){this.data=e||new Float32Array(1),this._glBuffers={},this._updateID=0,this.index=i,this.static=t,this.id=Tf++,this.disposeRunner=new b0("disposeBuffer")}update(e){e instanceof Array&&(e=new Float32Array(e)),this.data=e||this.data,this._updateID++}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.data=null}set index(e){this.type=e?bt.ELEMENT_ARRAY_BUFFER:bt.ARRAY_BUFFER}get index(){return this.type===bt.ELEMENT_ARRAY_BUFFER}static from(e){return e instanceof Array&&(e=new Float32Array(e)),new r(e)}};var Sn=class r{constructor(e,t=0,i=!1,s=me.FLOAT,n,o,a,l=1){this.buffer=e,this.size=t,this.normalized=i,this.type=s,this.stride=n,this.start=o,this.instance=a,this.divisor=l}destroy(){this.buffer=null}static from(e,t,i,s,n){return new r(e,t,i,s,n)}};var Ff={Float32Array,Uint32Array,Int32Array,Uint8Array};function U2(r,e){let t=0,i=0,s={};for(let l=0;l<r.length;l++)i+=e[l],t+=r[l].length;let n=new ArrayBuffer(t*4),o=null,a=0;for(let l=0;l<r.length;l++){let u=e[l],h=r[l],d=Ui(h);s[d]||(s[d]=new Ff[d](n)),o=s[d];for(let p=0;p<h.length;p++){let m=(p/u|0)*i+a,x=p%u;o[m+x]=h[p]}a+=u}return new Float32Array(n)}var V2={5126:4,5123:2,5121:1},Af=0,If={Float32Array,Uint32Array,Int32Array,Uint8Array,Uint16Array},Rt=class r{constructor(e=[],t={}){this.buffers=e,this.indexBuffer=null,this.attributes=t,this.glVertexArrayObjects={},this.id=Af++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new b0("disposeGeometry"),this.refCount=0}addAttribute(e,t,i=0,s=!1,n,o,a,l=!1){if(!t)throw new Error("You must pass a buffer when creating an attribute");t instanceof Qe||(t instanceof Array&&(t=new Float32Array(t)),t=new Qe(t));let u=e.split("|");if(u.length>1){for(let d=0;d<u.length;d++)this.addAttribute(u[d],t,i,s,n);return this}let h=this.buffers.indexOf(t);return h===-1&&(this.buffers.push(t),h=this.buffers.length-1),this.attributes[e]=new Sn(h,i,s,n,o,a,l),this.instanced=this.instanced||l,this}getAttribute(e){return this.attributes[e]}getBuffer(e){return this.buffers[this.getAttribute(e).buffer]}addIndex(e){return e instanceof Qe||(e instanceof Array&&(e=new Uint16Array(e)),e=new Qe(e)),e.type=bt.ELEMENT_ARRAY_BUFFER,this.indexBuffer=e,this.buffers.includes(e)||this.buffers.push(e),this}getIndex(){return this.indexBuffer}interleave(){if(this.buffers.length===1||this.buffers.length===2&&this.indexBuffer)return this;let e=[],t=[],i=new Qe,s;for(s in this.attributes){let n=this.attributes[s],o=this.buffers[n.buffer];e.push(o.data),t.push(n.size*V2[n.type]/4),n.buffer=0}for(i.data=U2(e,t),s=0;s<this.buffers.length;s++)this.buffers[s]!==this.indexBuffer&&this.buffers[s].destroy();return this.buffers=[i],this.indexBuffer&&this.buffers.push(this.indexBuffer),this}getSize(){for(let e in this.attributes){let t=this.attributes[e];return this.buffers[t.buffer].data.length/(t.stride/4||t.size)}return 0}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.buffers=null,this.indexBuffer=null,this.attributes=null}clone(){let e=new r;for(let t=0;t<this.buffers.length;t++)e.buffers[t]=new Qe(this.buffers[t].data.slice(0));for(let t in this.attributes){let i=this.attributes[t];e.attributes[t]=new Sn(i.buffer,i.size,i.normalized,i.type,i.stride,i.start,i.instance)}return this.indexBuffer&&(e.indexBuffer=e.buffers[this.buffers.indexOf(this.indexBuffer)],e.indexBuffer.type=bt.ELEMENT_ARRAY_BUFFER),e}static merge(e){let t=new r,i=[],s=[],n=[],o;for(let a=0;a<e.length;a++){o=e[a];for(let l=0;l<o.buffers.length;l++)s[l]=s[l]||0,s[l]+=o.buffers[l].data.length,n[l]=0}for(let a=0;a<o.buffers.length;a++)i[a]=new If[Ui(o.buffers[a].data)](s[a]),t.buffers[a]=new Qe(i[a]);for(let a=0;a<e.length;a++){o=e[a];for(let l=0;l<o.buffers.length;l++)i[l].set(o.buffers[l].data,n[l]),n[l]+=o.buffers[l].data.length}if(t.attributes=o.attributes,o.indexBuffer){t.indexBuffer=t.buffers[o.buffers.indexOf(o.indexBuffer)],t.indexBuffer.type=bt.ELEMENT_ARRAY_BUFFER;let a=0,l=0,u=0,h=0;for(let d=0;d<o.buffers.length;d++)if(o.buffers[d]!==o.indexBuffer){h=d;break}for(let d in o.attributes){let p=o.attributes[d];(p.buffer|0)===h&&(l+=p.size*V2[p.type]/4)}for(let d=0;d<e.length;d++){let p=e[d].indexBuffer.data;for(let m=0;m<p.length;m++)t.indexBuffer.data[m+u]+=a;a+=e[d].buffers[h].data.length/l,u+=p.length}}return t}};var bs=class extends Rt{constructor(e=!1){super(),this._buffer=new Qe(null,e,!1),this._indexBuffer=new Qe(null,e,!0),this.addAttribute("aVertexPosition",this._buffer,2,!1,me.FLOAT).addAttribute("aTextureCoord",this._buffer,2,!1,me.FLOAT).addAttribute("aColor",this._buffer,4,!0,me.UNSIGNED_BYTE).addAttribute("aTextureId",this._buffer,1,!0,me.FLOAT).addIndex(this._indexBuffer)}};var ji=Math.PI*2,H1=180/Math.PI,j1=Math.PI/180,t0=(r=>(r[r.POLY=0]="POLY",r[r.RECT=1]="RECT",r[r.CIRC=2]="CIRC",r[r.ELIP=3]="ELIP",r[r.RREC=4]="RREC",r))(t0||{});var Ae=class r{constructor(e=0,t=0){this.x=0,this.y=0,this.x=e,this.y=t}clone(){return new r(this.x,this.y)}copyFrom(e){return this.set(e.x,e.y),this}copyTo(e){return e.set(this.x,this.y),e}equals(e){return e.x===this.x&&e.y===this.y}set(e=0,t=e){return this.x=e,this.y=t,this}toString(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`}};var xu=[new Ae,new Ae,new Ae,new Ae],we=class r{constructor(e=0,t=0,i=0,s=0){this.x=Number(e),this.y=Number(t),this.width=Number(i),this.height=Number(s),this.type=t0.RECT}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}static get EMPTY(){return new r(0,0,0,0)}clone(){return new r(this.x,this.y,this.width,this.height)}copyFrom(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this}copyTo(e){return e.x=this.x,e.y=this.y,e.width=this.width,e.height=this.height,e}contains(e,t){return this.width<=0||this.height<=0?!1:e>=this.x&&e<this.x+this.width&&t>=this.y&&t<this.y+this.height}intersects(e,t){if(!t){let z=this.x<e.x?e.x:this.x;if((this.right>e.right?e.right:this.right)<=z)return!1;let J=this.y<e.y?e.y:this.y;return(this.bottom>e.bottom?e.bottom:this.bottom)>J}let i=this.left,s=this.right,n=this.top,o=this.bottom;if(s<=i||o<=n)return!1;let a=xu[0].set(e.left,e.top),l=xu[1].set(e.left,e.bottom),u=xu[2].set(e.right,e.top),h=xu[3].set(e.right,e.bottom);if(u.x<=a.x||l.y<=a.y)return!1;let d=Math.sign(t.a*t.d-t.b*t.c);if(d===0||(t.apply(a,a),t.apply(l,l),t.apply(u,u),t.apply(h,h),Math.max(a.x,l.x,u.x,h.x)<=i||Math.min(a.x,l.x,u.x,h.x)>=s||Math.max(a.y,l.y,u.y,h.y)<=n||Math.min(a.y,l.y,u.y,h.y)>=o))return!1;let p=d*(l.y-a.y),m=d*(a.x-l.x),x=p*i+m*n,C=p*s+m*n,A=p*i+m*o,P=p*s+m*o;if(Math.max(x,C,A,P)<=p*a.x+m*a.y||Math.min(x,C,A,P)>=p*h.x+m*h.y)return!1;let L=d*(a.y-u.y),I=d*(u.x-a.x),T=L*i+I*n,W=L*s+I*n,Q=L*i+I*o,O=L*s+I*o;return!(Math.max(T,W,Q,O)<=L*a.x+I*a.y||Math.min(T,W,Q,O)>=L*h.x+I*h.y)}pad(e=0,t=e){return this.x-=e,this.y-=t,this.width+=e*2,this.height+=t*2,this}fit(e){let t=Math.max(this.x,e.x),i=Math.min(this.x+this.width,e.x+e.width),s=Math.max(this.y,e.y),n=Math.min(this.y+this.height,e.y+e.height);return this.x=t,this.width=Math.max(i-t,0),this.y=s,this.height=Math.max(n-s,0),this}ceil(e=1,t=.001){let i=Math.ceil((this.x+this.width-t)*e)/e,s=Math.ceil((this.y+this.height-t)*e)/e;return this.x=Math.floor((this.x+t)*e)/e,this.y=Math.floor((this.y+t)*e)/e,this.width=i-this.x,this.height=s-this.y,this}enlarge(e){let t=Math.min(this.x,e.x),i=Math.max(this.x+this.width,e.x+e.width),s=Math.min(this.y,e.y),n=Math.max(this.y+this.height,e.y+e.height);return this.x=t,this.width=i-t,this.y=s,this.height=n-s,this}toString(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}};var ea=class r{constructor(e=0,t=0,i=0){this.x=e,this.y=t,this.radius=i,this.type=t0.CIRC}clone(){return new r(this.x,this.y,this.radius)}contains(e,t){if(this.radius<=0)return!1;let i=this.radius*this.radius,s=this.x-e,n=this.y-t;return s*=s,n*=n,s+n<=i}getBounds(){return new we(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)}toString(){return`[@pixi/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`}};var ta=class r{constructor(e=0,t=0,i=0,s=0){this.x=e,this.y=t,this.width=i,this.height=s,this.type=t0.ELIP}clone(){return new r(this.x,this.y,this.width,this.height)}contains(e,t){if(this.width<=0||this.height<=0)return!1;let i=(e-this.x)/this.width,s=(t-this.y)/this.height;return i*=i,s*=s,i+s<=1}getBounds(){return new we(this.x-this.width,this.y-this.height,this.width,this.height)}toString(){return`[@pixi/math:Ellipse x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}};var li=class r{constructor(...e){let t=Array.isArray(e[0])?e[0]:e;if(typeof t[0]!="number"){let i=[];for(let s=0,n=t.length;s<n;s++)i.push(t[s].x,t[s].y);t=i}this.points=t,this.type=t0.POLY,this.closeStroke=!0}clone(){let e=this.points.slice(),t=new r(e);return t.closeStroke=this.closeStroke,t}contains(e,t){let i=!1,s=this.points.length/2;for(let n=0,o=s-1;n<s;o=n++){let a=this.points[n*2],l=this.points[n*2+1],u=this.points[o*2],h=this.points[o*2+1];l>t!=h>t&&e<(u-a)*((t-l)/(h-l))+a&&(i=!i)}return i}toString(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((e,t)=>`${e}, ${t}`,"")}]`}};var ra=class r{constructor(e=0,t=0,i=0,s=0,n=20){this.x=e,this.y=t,this.width=i,this.height=s,this.radius=n,this.type=t0.RREC}clone(){return new r(this.x,this.y,this.width,this.height,this.radius)}contains(e,t){if(this.width<=0||this.height<=0)return!1;if(e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height){let i=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(t>=this.y+i&&t<=this.y+this.height-i||e>=this.x+i&&e<=this.x+this.width-i)return!0;let s=e-(this.x+i),n=t-(this.y+i),o=i*i;if(s*s+n*n<=o||(s=e-(this.x+this.width-i),s*s+n*n<=o)||(n=t-(this.y+this.height-i),s*s+n*n<=o)||(s=e-(this.x+i),s*s+n*n<=o))return!0}return!1}toString(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}};var Re=class r{constructor(e=1,t=0,i=0,s=1,n=0,o=0){this.array=null,this.a=e,this.b=t,this.c=i,this.d=s,this.tx=n,this.ty=o}fromArray(e){this.a=e[0],this.b=e[1],this.c=e[3],this.d=e[4],this.tx=e[2],this.ty=e[5]}set(e,t,i,s,n,o){return this.a=e,this.b=t,this.c=i,this.d=s,this.tx=n,this.ty=o,this}toArray(e,t){this.array||(this.array=new Float32Array(9));let i=t||this.array;return e?(i[0]=this.a,i[1]=this.b,i[2]=0,i[3]=this.c,i[4]=this.d,i[5]=0,i[6]=this.tx,i[7]=this.ty,i[8]=1):(i[0]=this.a,i[1]=this.c,i[2]=this.tx,i[3]=this.b,i[4]=this.d,i[5]=this.ty,i[6]=0,i[7]=0,i[8]=1),i}apply(e,t){t=t||new Ae;let i=e.x,s=e.y;return t.x=this.a*i+this.c*s+this.tx,t.y=this.b*i+this.d*s+this.ty,t}applyInverse(e,t){t=t||new Ae;let i=1/(this.a*this.d+this.c*-this.b),s=e.x,n=e.y;return t.x=this.d*i*s+-this.c*i*n+(this.ty*this.c-this.tx*this.d)*i,t.y=this.a*i*n+-this.b*i*s+(-this.ty*this.a+this.tx*this.b)*i,t}translate(e,t){return this.tx+=e,this.ty+=t,this}scale(e,t){return this.a*=e,this.d*=t,this.c*=e,this.b*=t,this.tx*=e,this.ty*=t,this}rotate(e){let t=Math.cos(e),i=Math.sin(e),s=this.a,n=this.c,o=this.tx;return this.a=s*t-this.b*i,this.b=s*i+this.b*t,this.c=n*t-this.d*i,this.d=n*i+this.d*t,this.tx=o*t-this.ty*i,this.ty=o*i+this.ty*t,this}append(e){let t=this.a,i=this.b,s=this.c,n=this.d;return this.a=e.a*t+e.b*s,this.b=e.a*i+e.b*n,this.c=e.c*t+e.d*s,this.d=e.c*i+e.d*n,this.tx=e.tx*t+e.ty*s+this.tx,this.ty=e.tx*i+e.ty*n+this.ty,this}setTransform(e,t,i,s,n,o,a,l,u){return this.a=Math.cos(a+u)*n,this.b=Math.sin(a+u)*n,this.c=-Math.sin(a-l)*o,this.d=Math.cos(a-l)*o,this.tx=e-(i*this.a+s*this.c),this.ty=t-(i*this.b+s*this.d),this}prepend(e){let t=this.tx;if(e.a!==1||e.b!==0||e.c!==0||e.d!==1){let i=this.a,s=this.c;this.a=i*e.a+this.b*e.c,this.b=i*e.b+this.b*e.d,this.c=s*e.a+this.d*e.c,this.d=s*e.b+this.d*e.d}return this.tx=t*e.a+this.ty*e.c+e.tx,this.ty=t*e.b+this.ty*e.d+e.ty,this}decompose(e){let t=this.a,i=this.b,s=this.c,n=this.d,o=e.pivot,a=-Math.atan2(-s,n),l=Math.atan2(i,t),u=Math.abs(a+l);return u<1e-5||Math.abs(ji-u)<1e-5?(e.rotation=l,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=a,e.skew.y=l),e.scale.x=Math.sqrt(t*t+i*i),e.scale.y=Math.sqrt(s*s+n*n),e.position.x=this.tx+(o.x*t+o.y*s),e.position.y=this.ty+(o.x*i+o.y*n),e}invert(){let e=this.a,t=this.b,i=this.c,s=this.d,n=this.tx,o=e*s-t*i;return this.a=s/o,this.b=-t/o,this.c=-i/o,this.d=e/o,this.tx=(i*this.ty-s*n)/o,this.ty=-(e*this.ty-t*n)/o,this}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){let e=new r;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyTo(e){return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyFrom(e){return this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.tx=e.tx,this.ty=e.ty,this}toString(){return`[@pixi/math:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return new r}static get TEMP_MATRIX(){return new r}};var ws=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Ss=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],_s=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Cs=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],$1=[],z2=[],vu=Math.sign;function kf(){for(let r=0;r<16;r++){let e=[];$1.push(e);for(let t=0;t<16;t++){let i=vu(ws[r]*ws[t]+_s[r]*Ss[t]),s=vu(Ss[r]*ws[t]+Cs[r]*Ss[t]),n=vu(ws[r]*_s[t]+_s[r]*Cs[t]),o=vu(Ss[r]*_s[t]+Cs[r]*Cs[t]);for(let a=0;a<16;a++)if(ws[a]===i&&Ss[a]===s&&_s[a]===n&&Cs[a]===o){e.push(a);break}}}for(let r=0;r<16;r++){let e=new Re;e.set(ws[r],Ss[r],_s[r],Cs[r],0,0),z2.push(e)}}kf();var s0={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:r=>ws[r],uY:r=>Ss[r],vX:r=>_s[r],vY:r=>Cs[r],inv:r=>r&8?r&15:-r&7,add:(r,e)=>$1[r][e],sub:(r,e)=>$1[r][s0.inv(e)],rotate180:r=>r^4,isVertical:r=>(r&3)===2,byDirection:(r,e)=>Math.abs(r)*2<=Math.abs(e)?e>=0?s0.S:s0.N:Math.abs(e)*2<=Math.abs(r)?r>0?s0.E:s0.W:e>0?r>0?s0.SE:s0.SW:r>0?s0.NE:s0.NW,matrixAppendRotationInv:(r,e,t=0,i=0)=>{let s=z2[s0.inv(e)];s.tx=t,s.ty=i,r.append(s)}};var Zt=class r{constructor(e,t,i=0,s=0){this._x=i,this._y=s,this.cb=e,this.scope=t}clone(e=this.cb,t=this.scope){return new r(e,t,this._x,this._y)}set(e=0,t=e){return(this._x!==e||this._y!==t)&&(this._x=e,this._y=t,this.cb.call(this.scope)),this}copyFrom(e){return(this._x!==e.x||this._y!==e.y)&&(this._x=e.x,this._y=e.y,this.cb.call(this.scope)),this}copyTo(e){return e.set(this._x,this._y),e}equals(e){return e.x===this._x&&e.y===this._y}toString(){return`[@pixi/math:ObservablePoint x=0 y=0 scope=${this.scope}]`}get x(){return this._x}set x(e){this._x!==e&&(this._x=e,this.cb.call(this.scope))}get y(){return this._y}set y(e){this._y!==e&&(this._y=e,this.cb.call(this.scope))}};var W2=class{constructor(){this.worldTransform=new Re,this.localTransform=new Re,this.position=new Zt(this.onChange,this,0,0),this.scale=new Zt(this.onChange,this,1,1),this.pivot=new Zt(this.onChange,this,0,0),this.skew=new Zt(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}onChange(){this._localID++}updateSkew(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++}toString(){return`[@pixi/math:Transform position=(${this.position.x}, ${this.position.y}) rotation=${this.rotation} scale=(${this.scale.x}, ${this.scale.y}) skew=(${this.skew.x}, ${this.skew.y}) ]`}updateLocalTransform(){let r=this.localTransform;this._localID!==this._currentLocalID&&(r.a=this._cx*this.scale.x,r.b=this._sx*this.scale.x,r.c=this._cy*this.scale.y,r.d=this._sy*this.scale.y,r.tx=this.position.x-(this.pivot.x*r.a+this.pivot.y*r.c),r.ty=this.position.y-(this.pivot.x*r.b+this.pivot.y*r.d),this._currentLocalID=this._localID,this._parentID=-1)}updateTransform(r){let e=this.localTransform;if(this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==r._worldID){let t=r.worldTransform,i=this.worldTransform;i.a=e.a*t.a+e.b*t.c,i.b=e.a*t.b+e.b*t.d,i.c=e.c*t.a+e.d*t.c,i.d=e.c*t.b+e.d*t.d,i.tx=e.tx*t.a+e.ty*t.c+t.tx,i.ty=e.tx*t.b+e.ty*t.d+t.ty,this._parentID=r._worldID,this._worldID++}}setFromMatrix(r){r.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(r){this._rotation!==r&&(this._rotation=r,this.updateSkew())}},Ts=W2;Ts.IDENTITY=new W2;var H2=`varying vec2 vTextureCoord;
uniform sampler2D uSampler;
void main(void){
gl_FragColor *= texture2D(uSampler, vTextureCoord);
}`;var j2=`attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
uniform mat3 projectionMatrix;
varying vec2 vTextureCoord;
void main(void){
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = aTextureCoord;
}
`;function Du(r,e,t){let i=r.createShader(e);return r.shaderSource(i,t),r.compileShader(i),i}function Y1(r){let e=new Array(r);for(let t=0;t<e.length;t++)e[t]=!1;return e}function ia(r,e){switch(r){case"float":return 0;case"vec2":return new Float32Array(2*e);case"vec3":return new Float32Array(3*e);case"vec4":return new Float32Array(4*e);case"int":case"uint":case"sampler2D":case"sampler2DArray":return 0;case"ivec2":return new Int32Array(2*e);case"ivec3":return new Int32Array(3*e);case"ivec4":return new Int32Array(4*e);case"uvec2":return new Uint32Array(2*e);case"uvec3":return new Uint32Array(3*e);case"uvec4":return new Uint32Array(4*e);case"bool":return!1;case"bvec2":return Y1(2*e);case"bvec3":return Y1(3*e);case"bvec4":return Y1(4*e);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}var Fr=[{test:r=>r.type==="float"&&r.size===1&&!r.isArray,code:r=>`
if(uv["${r}"] !== ud["${r}"].value)
{
ud["${r}"].value = uv["${r}"]
gl.uniform1f(ud["${r}"].location, uv["${r}"])
}
`},{test:(r,e)=>(r.type==="sampler2D"||r.type==="samplerCube"||r.type==="sampler2DArray")&&r.size===1&&!r.isArray&&(e==null||e.castToBaseTexture!==void 0),code:r=>`t = syncData.textureCount++;
renderer.texture.bind(uv["${r}"], t);
if(ud["${r}"].value !== t)
{
ud["${r}"].value = t;
gl.uniform1i(ud["${r}"].location, t);
; // eslint-disable-line max-len
}`},{test:(r,e)=>r.type==="mat3"&&r.size===1&&!r.isArray&&e.a!==void 0,code:r=>`
gl.uniformMatrix3fv(ud["${r}"].location, false, uv["${r}"].toArray(true));
`,codeUbo:r=>`
var ${r}_matrix = uv.${r}.toArray(true);
data[offset] = ${r}_matrix[0];
data[offset+1] = ${r}_matrix[1];
data[offset+2] = ${r}_matrix[2];
data[offset + 4] = ${r}_matrix[3];
data[offset + 5] = ${r}_matrix[4];
data[offset + 6] = ${r}_matrix[5];
data[offset + 8] = ${r}_matrix[6];
data[offset + 9] = ${r}_matrix[7];
data[offset + 10] = ${r}_matrix[8];
`},{test:(r,e)=>r.type==="vec2"&&r.size===1&&!r.isArray&&e.x!==void 0,code:r=>`
cv = ud["${r}"].value;
v = uv["${r}"];
if(cv[0] !== v.x || cv[1] !== v.y)
{
cv[0] = v.x;
cv[1] = v.y;
gl.uniform2f(ud["${r}"].location, v.x, v.y);
}`,codeUbo:r=>`
v = uv.${r};
data[offset] = v.x;
data[offset+1] = v.y;
`},{test:r=>r.type==="vec2"&&r.size===1&&!r.isArray,code:r=>`
cv = ud["${r}"].value;
v = uv["${r}"];
if(cv[0] !== v[0] || cv[1] !== v[1])
{
cv[0] = v[0];
cv[1] = v[1];
gl.uniform2f(ud["${r}"].location, v[0], v[1]);
}
`},{test:(r,e)=>r.type==="vec4"&&r.size===1&&!r.isArray&&e.width!==void 0,code:r=>`
cv = ud["${r}"].value;
v = uv["${r}"];
if(cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height)
{
cv[0] = v.x;
cv[1] = v.y;
cv[2] = v.width;
cv[3] = v.height;
gl.uniform4f(ud["${r}"].location, v.x, v.y, v.width, v.height)
}`,codeUbo:r=>`
v = uv.${r};
data[offset] = v.x;
data[offset+1] = v.y;
data[offset+2] = v.width;
data[offset+3] = v.height;
`},{test:(r,e)=>r.type==="vec4"&&r.size===1&&!r.isArray&&e.red!==void 0,code:r=>`
cv = ud["${r}"].value;
v = uv["${r}"];
if(cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.alpha)
{
cv[0] = v.red;
cv[1] = v.green;
cv[2] = v.blue;
cv[3] = v.alpha;
gl.uniform4f(ud["${r}"].location, v.red, v.green, v.blue, v.alpha)
}`,codeUbo:r=>`
v = uv.${r};
data[offset] = v.red;
data[offset+1] = v.green;
data[offset+2] = v.blue;
data[offset+3] = v.alpha;
`},{test:(r,e)=>r.type==="vec3"&&r.size===1&&!r.isArray&&e.red!==void 0,code:r=>`
cv = ud["${r}"].value;
v = uv["${r}"];
if(cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.a)
{
cv[0] = v.red;
cv[1] = v.green;
cv[2] = v.blue;
gl.uniform3f(ud["${r}"].location, v.red, v.green, v.blue)
}`,codeUbo:r=>`
v = uv.${r};
data[offset] = v.red;
data[offset+1] = v.green;
data[offset+2] = v.blue;
`},{test:r=>r.type==="vec4"&&r.size===1&&!r.isArray,code:r=>`
cv = ud["${r}"].value;
v = uv["${r}"];
if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
cv[3] = v[3];
gl.uniform4f(ud["${r}"].location, v[0], v[1], v[2], v[3])
}`}];var Mf={float:`
if (cv !== v)
{
cu.value = v;
gl.uniform1f(location, v);
}`,vec2:`
if (cv[0] !== v[0] || cv[1] !== v[1])
{
cv[0] = v[0];
cv[1] = v[1];
gl.uniform2f(location, v[0], v[1])
}`,vec3:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
gl.uniform3f(location, v[0], v[1], v[2])
}`,vec4:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
cv[3] = v[3];
gl.uniform4f(location, v[0], v[1], v[2], v[3]);
}`,int:`
if (cv !== v)
{
cu.value = v;
gl.uniform1i(location, v);
}`,ivec2:`
if (cv[0] !== v[0] || cv[1] !== v[1])
{
cv[0] = v[0];
cv[1] = v[1];
gl.uniform2i(location, v[0], v[1]);
}`,ivec3:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
gl.uniform3i(location, v[0], v[1], v[2]);
}`,ivec4:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
cv[3] = v[3];
gl.uniform4i(location, v[0], v[1], v[2], v[3]);
}`,uint:`
if (cv !== v)
{
cu.value = v;
gl.uniform1ui(location, v);
}`,uvec2:`
if (cv[0] !== v[0] || cv[1] !== v[1])
{
cv[0] = v[0];
cv[1] = v[1];
gl.uniform2ui(location, v[0], v[1]);
}`,uvec3:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
gl.uniform3ui(location, v[0], v[1], v[2]);
}`,uvec4:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
cv[3] = v[3];
gl.uniform4ui(location, v[0], v[1], v[2], v[3]);
}`,bool:`
if (cv !== v)
{
cu.value = v;
gl.uniform1i(location, v);
}`,bvec2:`
if (cv[0] != v[0] || cv[1] != v[1])
{
cv[0] = v[0];
cv[1] = v[1];
gl.uniform2i(location, v[0], v[1]);
}`,bvec3:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
gl.uniform3i(location, v[0], v[1], v[2]);
}`,bvec4:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
cv[3] = v[3];
gl.uniform4i(location, v[0], v[1], v[2], v[3]);
}`,mat2:"gl.uniformMatrix2fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",sampler2D:`
if (cv !== v)
{
cu.value = v;
gl.uniform1i(location, v);
}`,samplerCube:`
if (cv !== v)
{
cu.value = v;
gl.uniform1i(location, v);
}`,sampler2DArray:`
if (cv !== v)
{
cu.value = v;
gl.uniform1i(location, v);
}`},Pf={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};function X1(r,e){let t=[`
var v = null;
var cv = null;
var cu = null;
var t = 0;
var gl = renderer.gl;
`];for(let i in r.uniforms){let s=e[i];if(!s){r.uniforms[i]?.group&&(r.uniforms[i].ubo?t.push(`
renderer.shader.syncUniformBufferGroup(uv.${i}, '${i}');
`):t.push(`
renderer.shader.syncUniformGroup(uv.${i}, syncData);
`));continue}let n=r.uniforms[i],o=!1;for(let a=0;a<Fr.length;a++)if(Fr[a].test(s,n)){t.push(Fr[a].code(i,n)),o=!0;break}if(!o){let l=(s.size===1&&!s.isArray?Mf:Pf)[s.type].replace("location",`ud["${i}"].location`);t.push(`
cu = ud["${i}"];
cv = cu.value;
v = uv["${i}"];
${l};`)}}return new Function("ud","uv","renderer","syncData",t.join(`
`))}var $2={},Eu=$2;function bu(){if(Eu===$2||Eu?.isContextLost()){let r=j.ADAPTER.createCanvas(),e;j.PREFER_ENV>=Mt.WEBGL2&&(e=r.getContext("webgl2",{})),e||(e=r.getContext("webgl",{})||r.getContext("experimental-webgl",{}),e?e.getExtension("WEBGL_draw_buffers"):e=null),Eu=e}return Eu}var wu;function q1(){if(!wu){wu=ht.MEDIUM;let r=bu();r&&r.getShaderPrecisionFormat&&(wu=r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT).precision?ht.HIGH:ht.MEDIUM)}return wu}function Y2(r,e){let t=r.getShaderSource(e).split(`
`).map((u,h)=>`${h}: ${u}`),i=r.getShaderInfoLog(e),s=i.split(`
`),n={},o=s.map(u=>parseFloat(u.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))).filter(u=>u&&!n[u]?(n[u]=!0,!0):!1),a=[""];o.forEach(u=>{t[u-1]=`%c${t[u-1]}%c`,a.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});let l=t.join(`
`);a[0]=l,console.error(i),console.groupCollapsed("click to view full shader code"),console.warn(...a),console.groupEnd()}function K1(r,e,t,i){r.getProgramParameter(e,r.LINK_STATUS)||(r.getShaderParameter(t,r.COMPILE_STATUS)||Y2(r,t),r.getShaderParameter(i,r.COMPILE_STATUS)||Y2(r,i),console.error("PixiJS Error: Could not initialize shader."),r.getProgramInfoLog(e)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",r.getProgramInfoLog(e)))}var Nf={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function sa(r){return Nf[r]}var Su=null,X2={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function na(r,e){if(!Su){let t=Object.keys(X2);Su={};for(let i=0;i<t.length;++i){let s=t[i];Su[r[s]]=X2[s]}}return Su[e]}function _u(r,e,t){if(r.substring(0,9)!=="precision"){let i=e;return e===ht.HIGH&&t!==ht.HIGH&&(i=ht.MEDIUM),`precision ${i} float;
${r}`}else if(t!==ht.HIGH&&r.substring(0,15)==="precision highp")return r.replace("precision highp","precision mediump");return r}var oa;function Cu(){if(typeof oa=="boolean")return oa;try{oa=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{oa=!1}return oa}var Bf=0,Tu={},_n=class{constructor(r,e,t="pixi-shader",i={}){this.extra={},this.id=Bf++,this.vertexSrc=r||_n.defaultVertexSrc,this.fragmentSrc=e||_n.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),this.extra=i,this.vertexSrc.substring(0,8)!=="#version"&&(t=t.replace(/\s+/g,"-"),Tu[t]?(Tu[t]++,t+=`-${Tu[t]}`):Tu[t]=1,this.vertexSrc=`#define SHADER_NAME ${t}
${this.vertexSrc}`,this.fragmentSrc=`#define SHADER_NAME ${t}
${this.fragmentSrc}`,this.vertexSrc=_u(this.vertexSrc,_n.defaultVertexPrecision,ht.HIGH),this.fragmentSrc=_u(this.fragmentSrc,_n.defaultFragmentPrecision,q1())),this.glPrograms={},this.syncUniforms=null}static get defaultVertexSrc(){return j2}static get defaultFragmentSrc(){return H2}static from(r,e,t){let i=r+e,s=Qo[i];return s||(Qo[i]=s=new _n(r,e,t)),s}},G0=_n;G0.defaultVertexPrecision=ht.HIGH;G0.defaultFragmentPrecision=qt.apple.device?ht.HIGH:ht.MEDIUM;var Rf=0,pt=class r{constructor(e,t,i){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=Rf++,this.static=!!t,this.ubo=!!i,e instanceof Qe?(this.buffer=e,this.buffer.type=bt.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=e,this.ubo&&(this.buffer=new Qe(new Float32Array(1)),this.buffer.type=bt.UNIFORM_BUFFER,this.autoManage=!0))}update(){this.dirtyId++,!this.autoManage&&this.buffer&&this.buffer.update()}add(e,t,i){if(!this.ubo)this.uniforms[e]=new r(t,i);else throw new Error("[UniformGroup] uniform groups in ubo mode cannot be modified, or have uniform groups nested in them")}static from(e,t,i){return new r(e,t,i)}static uboFrom(e,t){return new r(e,t??!0,!0)}};var q0=class r{constructor(e,t){this.uniformBindCount=0,this.program=e,t?t instanceof pt?this.uniformGroup=t:this.uniformGroup=new pt(t):this.uniformGroup=new pt({}),this.disposeRunner=new b0("disposeShader")}checkUniformExists(e,t){if(t.uniforms[e])return!0;for(let i in t.uniforms){let s=t.uniforms[i];if(s.group&&this.checkUniformExists(e,s))return!0}return!1}destroy(){this.uniformGroup=null,this.disposeRunner.emit(this),this.disposeRunner.destroy()}get uniforms(){return this.uniformGroup.uniforms}static from(e,t,i){let s=G0.from(e,t);return new r(s,i)}};var aa=class{constructor(e,t){if(this.vertexSrc=e,this.fragTemplate=t,this.programCache={},this.defaultGroupCache={},!t.includes("%count%"))throw new Error('Fragment template must contain "%count%".');if(!t.includes("%forloop%"))throw new Error('Fragment template must contain "%forloop%".')}generateShader(e){if(!this.programCache[e]){let i=new Int32Array(e);for(let n=0;n<e;n++)i[n]=n;this.defaultGroupCache[e]=pt.from({uSamplers:i},!0);let s=this.fragTemplate;s=s.replace(/%count%/gi,`${e}`),s=s.replace(/%forloop%/gi,this.generateSampleSrc(e)),this.programCache[e]=new G0(this.vertexSrc,s)}let t={tint:new Float32Array([1,1,1,1]),translationMatrix:new Re,default:this.defaultGroupCache[e]};return new q0(this.programCache[e],t)}generateSampleSrc(e){let t="";t+=`
`,t+=`
`;for(let i=0;i<e;i++)i>0&&(t+=`
else `),i<e-1&&(t+=`if(vTextureId < ${i}.5)`),t+=`
{`,t+=`
color = texture2D(uSamplers[${i}], vTextureCoord);`,t+=`
}`;return t+=`
`,t+=`
`,t}};var $i=class{constructor(){this.elements=[],this.ids=[],this.count=0}clear(){for(let e=0;e<this.count;e++)this.elements[e]=null;this.count=0}};function q2(){return!qt.apple.device}function K2(r){let e=!0,t=j.ADAPTER.getNavigator();if(qt.tablet||qt.phone){if(qt.apple.device){let i=t.userAgent.match(/OS (\d+)_(\d+)?/);i&&parseInt(i[1],10)<11&&(e=!1)}if(qt.android.device){let i=t.userAgent.match(/Android\s([0-9.]*)/);i&&parseInt(i[1],10)<7&&(e=!1)}}return e?r:4}var fr=class{constructor(e){this.renderer=e}flush(){}destroy(){this.renderer=null}start(){}stop(){this.flush()}render(e){}};var Z2=`varying vec2 vTextureCoord;
varying vec4 vColor;
varying float vTextureId;
uniform sampler2D uSamplers[%count%];
void main(void){
vec4 color;
%forloop%
gl_FragColor = color * vColor;
}
`;var Q2=`precision highp float;
attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
attribute vec4 aColor;
attribute float aTextureId;
uniform mat3 projectionMatrix;
uniform mat3 translationMatrix;
uniform vec4 tint;
varying vec2 vTextureCoord;
varying vec4 vColor;
varying float vTextureId;
void main(void){
gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = aTextureCoord;
vTextureId = aTextureId;
vColor = aColor * tint;
}
`;var gr=class extends fr{constructor(r){super(r),this.setShaderGenerator(),this.geometryClass=bs,this.vertexSize=6,this.state=X0.for2d(),this.size=gr.defaultBatchSize*4,this._vertexCount=0,this._indexCount=0,this._bufferedElements=[],this._bufferedTextures=[],this._bufferSize=0,this._shader=null,this._packedGeometries=[],this._packedGeometryPoolSize=2,this._flushId=0,this._aBuffers={},this._iBuffers={},this.maxTextures=1,this.renderer.on("prerender",this.onPrerender,this),r.runners.contextChange.add(this),this._dcIndex=0,this._aIndex=0,this._iIndex=0,this._attributeBuffer=null,this._indexBuffer=null,this._tempBoundTextures=[]}static get defaultMaxTextures(){return this._defaultMaxTextures=this._defaultMaxTextures??K2(32),this._defaultMaxTextures}static set defaultMaxTextures(r){this._defaultMaxTextures=r}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??q2(),this._canUploadSameBuffer}static set canUploadSameBuffer(r){this._canUploadSameBuffer=r}get MAX_TEXTURES(){return Pe("7.1.0","BatchRenderer#MAX_TEXTURES renamed to BatchRenderer#maxTextures"),this.maxTextures}static get defaultVertexSrc(){return Q2}static get defaultFragmentTemplate(){return Z2}setShaderGenerator({vertex:r=gr.defaultVertexSrc,fragment:e=gr.defaultFragmentTemplate}={}){this.shaderGenerator=new aa(r,e)}contextChange(){let r=this.renderer.gl;j.PREFER_ENV===Mt.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS),gr.defaultMaxTextures),this.maxTextures=yu(this.maxTextures,r)),this._shader=this.shaderGenerator.generateShader(this.maxTextures);for(let e=0;e<this._packedGeometryPoolSize;e++)this._packedGeometries[e]=new this.geometryClass;this.initFlushBuffers()}initFlushBuffers(){let{_drawCallPool:r,_textureArrayPool:e}=gr,t=this.size/4,i=Math.floor(t/this.maxTextures)+1;for(;r.length<t;)r.push(new Hi);for(;e.length<i;)e.push(new $i);for(let s=0;s<this.maxTextures;s++)this._tempBoundTextures[s]=null}onPrerender(){this._flushId=0}render(r){r._texture.valid&&(this._vertexCount+r.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=r.vertexData.length/2,this._indexCount+=r.indices.length,this._bufferedTextures[this._bufferSize]=r._texture.baseTexture,this._bufferedElements[this._bufferSize++]=r)}buildTexturesAndDrawCalls(){let{_bufferedTextures:r,maxTextures:e}=this,t=gr._textureArrayPool,i=this.renderer.batch,s=this._tempBoundTextures,n=this.renderer.textureGC.count,o=++ye._globalBatch,a=0,l=t[0],u=0;i.copyBoundTextures(s,e);for(let h=0;h<this._bufferSize;++h){let d=r[h];r[h]=null,d._batchEnabled!==o&&(l.count>=e&&(i.boundArray(l,s,o,e),this.buildDrawCalls(l,u,h),u=h,l=t[++a],++o),d._batchEnabled=o,d.touched=n,l.elements[l.count++]=d)}l.count>0&&(i.boundArray(l,s,o,e),this.buildDrawCalls(l,u,this._bufferSize),++a,++o);for(let h=0;h<s.length;h++)s[h]=null;ye._globalBatch=o}buildDrawCalls(r,e,t){let{_bufferedElements:i,_attributeBuffer:s,_indexBuffer:n,vertexSize:o}=this,a=gr._drawCallPool,l=this._dcIndex,u=this._aIndex,h=this._iIndex,d=a[l];d.start=this._iIndex,d.texArray=r;for(let p=e;p<t;++p){let m=i[p],x=m._texture.baseTexture,C=qo[x.alphaMode?1:0][m.blendMode];i[p]=null,e<p&&d.blend!==C&&(d.size=h-d.start,e=p,d=a[++l],d.texArray=r,d.start=h),this.packInterleavedGeometry(m,s,n,u,h),u+=m.vertexData.length/2*o,h+=m.indices.length,d.blend=C}e<t&&(d.size=h-d.start,++l),this._dcIndex=l,this._aIndex=u,this._iIndex=h}bindAndClearTexArray(r){let e=this.renderer.texture;for(let t=0;t<r.count;t++)e.bind(r.elements[t],r.ids[t]),r.elements[t]=null;r.count=0}updateGeometry(){let{_packedGeometries:r,_attributeBuffer:e,_indexBuffer:t}=this;gr.canUploadSameBuffer?(r[this._flushId]._buffer.update(e.rawBinaryData),r[this._flushId]._indexBuffer.update(t),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,r[this._flushId]=new this.geometryClass),r[this._flushId]._buffer.update(e.rawBinaryData),r[this._flushId]._indexBuffer.update(t),this.renderer.geometry.bind(r[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)}drawBatches(){let r=this._dcIndex,{gl:e,state:t}=this.renderer,i=gr._drawCallPool,s=null;for(let n=0;n<r;n++){let{texArray:o,type:a,size:l,start:u,blend:h}=i[n];s!==o&&(s=o,this.bindAndClearTexArray(o)),this.state.blendMode=h,t.set(this.state),e.drawElements(a,l,e.UNSIGNED_SHORT,u*2)}}flush(){this._vertexCount!==0&&(this._attributeBuffer=this.getAttributeBuffer(this._vertexCount),this._indexBuffer=this.getIndexBuffer(this._indexCount),this._aIndex=0,this._iIndex=0,this._dcIndex=0,this.buildTexturesAndDrawCalls(),this.updateGeometry(),this.drawBatches(),this._bufferSize=0,this._vertexCount=0,this._indexCount=0)}start(){this.renderer.state.set(this.state),this.renderer.texture.ensureSamplerType(this.maxTextures),this.renderer.shader.bind(this._shader),gr.canUploadSameBuffer&&this.renderer.geometry.bind(this._packedGeometries[this._flushId])}stop(){this.flush()}destroy(){for(let r=0;r<this._packedGeometryPoolSize;r++)this._packedGeometries[r]&&this._packedGeometries[r].destroy();this.renderer.off("prerender",this.onPrerender,this),this._aBuffers=null,this._iBuffers=null,this._packedGeometries=null,this._attributeBuffer=null,this._indexBuffer=null,this._shader&&(this._shader.destroy(),this._shader=null),super.destroy()}getAttributeBuffer(r){let e=Vi(Math.ceil(r/8)),t=Zo(e),i=e*8;this._aBuffers.length<=t&&(this._iBuffers.length=t+1);let s=this._aBuffers[i];return s||(this._aBuffers[i]=s=new Wi(i*this.vertexSize*4)),s}getIndexBuffer(r){let e=Vi(Math.ceil(r/12)),t=Zo(e),i=e*12;this._iBuffers.length<=t&&(this._iBuffers.length=t+1);let s=this._iBuffers[t];return s||(this._iBuffers[t]=s=new Uint16Array(i)),s}packInterleavedGeometry(r,e,t,i,s){let{uint32View:n,float32View:o}=e,a=i/this.vertexSize,l=r.uvs,u=r.indices,h=r.vertexData,d=r._texture.baseTexture._batchLocation,p=Math.min(r.worldAlpha,1),m=Se.shared.setValue(r._tintRGB).toPremultiplied(p,r._texture.baseTexture.alphaMode>0);for(let x=0;x<h.length;x+=2)o[i++]=h[x],o[i++]=h[x+1],o[i++]=l[x],o[i++]=l[x+1],n[i++]=m,o[i++]=d;for(let x=0;x<u.length;x++)t[s++]=a+u[x]}},Lt=gr;Lt.defaultBatchSize=4096;Lt.extension={name:"batch",type:$.RendererPlugin};Lt._drawCallPool=[];Lt._textureArrayPool=[];K.add(Lt);var J2=`varying vec2 vTextureCoord;
uniform sampler2D uSampler;
void main(void){
gl_FragColor = texture2D(uSampler, vTextureCoord);
}
`;var e6=`attribute vec2 aVertexPosition;
uniform mat3 projectionMatrix;
varying vec2 vTextureCoord;
uniform vec4 inputSize;
uniform vec4 outputFrame;
vec4 filterVertexPosition( void )
{
vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;
return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
}
vec2 filterTextureCoord( void )
{
return aVertexPosition * (outputFrame.zw * inputSize.zw);
}
void main(void)
{
gl_Position = filterVertexPosition();
vTextureCoord = filterTextureCoord();
}
`;var la=class extends q0{constructor(r,e,t){let i=G0.from(r||la.defaultVertexSrc,e||la.defaultFragmentSrc);super(i,t),this.padding=0,this.resolution=la.defaultResolution,this.multisample=la.defaultMultisample,this.enabled=!0,this.autoFit=!0,this.state=new X0}apply(r,e,t,i,s){r.applyFilter(this,e,t,i)}get blendMode(){return this.state.blendMode}set blendMode(r){this.state.blendMode=r}get resolution(){return this._resolution}set resolution(r){this._resolution=r}static get defaultVertexSrc(){return e6}static get defaultFragmentSrc(){return J2}},Ye=la;Ye.defaultResolution=1;Ye.defaultMultisample=qe.NONE;var ui=class{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new Se(0),this.alpha=1}init(e){this.clearBeforeRender=e.clearBeforeRender;let{backgroundColor:t,background:i,backgroundAlpha:s}=e,n=i??t;n!==void 0&&(this.color=n),this.alpha=s}get color(){return this._backgroundColor.value}set color(e){this._backgroundColor.setValue(e)}get alpha(){return this._backgroundColor.alpha}set alpha(e){this._backgroundColor.setAlpha(e)}get backgroundColor(){return this._backgroundColor}destroy(){}};ui.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0};ui.extension={type:[$.RendererSystem,$.CanvasRendererSystem],name:"background"};K.add(ui);var Cn=class{constructor(e){this.renderer=e,this.emptyRenderer=new fr(e),this.currentRenderer=this.emptyRenderer}setObjectRenderer(e){this.currentRenderer!==e&&(this.currentRenderer.stop(),this.currentRenderer=e,this.currentRenderer.start())}flush(){this.setObjectRenderer(this.emptyRenderer)}reset(){this.setObjectRenderer(this.emptyRenderer)}copyBoundTextures(e,t){let{boundTextures:i}=this.renderer.texture;for(let s=t-1;s>=0;--s)e[s]=i[s]||null,e[s]&&(e[s]._batchLocation=s)}boundArray(e,t,i,s){let{elements:n,ids:o,count:a}=e,l=0;for(let u=0;u<a;u++){let h=n[u],d=h._batchLocation;if(d>=0&&d<s&&t[d]===h){o[u]=d;continue}for(;l<s;){let p=t[l];if(p&&p._batchEnabled===i&&p._batchLocation===l){l++;continue}o[u]=l,h._batchLocation=l,t[l]=h;break}}}destroy(){this.renderer=null}};Cn.extension={type:$.RendererSystem,name:"batch"};K.add(Cn);var t6=0,hi=class{constructor(e){this.renderer=e,this.webGLVersion=1,this.extensions={},this.supports={uint32Indices:!1},this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this)}get isLost(){return!this.gl||this.gl.isContextLost()}contextChange(e){this.gl=e,this.renderer.gl=e,this.renderer.CONTEXT_UID=t6++}init(e){if(e.context)this.initFromContext(e.context);else{let t=this.renderer.background.alpha<1,i=e.premultipliedAlpha;this.preserveDrawingBuffer=e.preserveDrawingBuffer,this.useContextAlpha=e.useContextAlpha,this.powerPreference=e.powerPreference,this.initFromOptions({alpha:t,premultipliedAlpha:i,antialias:e.antialias,stencil:!0,preserveDrawingBuffer:e.preserveDrawingBuffer,powerPreference:e.powerPreference})}}initFromContext(e){this.gl=e,this.validateContext(e),this.renderer.gl=e,this.renderer.CONTEXT_UID=t6++,this.renderer.runners.contextChange.emit(e);let t=this.renderer.view;t.addEventListener!==void 0&&(t.addEventListener("webglcontextlost",this.handleContextLost,!1),t.addEventListener("webglcontextrestored",this.handleContextRestored,!1))}initFromOptions(e){let t=this.createContext(this.renderer.view,e);this.initFromContext(t)}createContext(e,t){let i;if(j.PREFER_ENV>=Mt.WEBGL2&&(i=e.getContext("webgl2",t)),i)this.webGLVersion=2;else if(this.webGLVersion=1,i=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),!i)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=i,this.getExtensions(),this.gl}getExtensions(){let{gl:e}=this,t={loseContext:e.getExtension("WEBGL_lose_context"),anisotropicFiltering:e.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),s3tc:e.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:e.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:e.getExtension("WEBGL_compressed_texture_etc"),etc1:e.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:e.getExtension("WEBGL_compressed_texture_atc"),astc:e.getExtension("WEBGL_compressed_texture_astc")};this.webGLVersion===1?Object.assign(this.extensions,t,{drawBuffers:e.getExtension("WEBGL_draw_buffers"),depthTexture:e.getExtension("WEBGL_depth_texture"),vertexArrayObject:e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:e.getExtension("OES_element_index_uint"),floatTexture:e.getExtension("OES_texture_float"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),textureHalfFloat:e.getExtension("OES_texture_half_float"),textureHalfFloatLinear:e.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,t,{colorBufferFloat:e.getExtension("EXT_color_buffer_float")})}handleContextLost(e){e.preventDefault(),setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext&&this.extensions.loseContext.restoreContext()},0)}handleContextRestored(){this.renderer.runners.contextChange.emit(this.gl)}destroy(){let e=this.renderer.view;this.renderer=null,e.removeEventListener!==void 0&&(e.removeEventListener("webglcontextlost",this.handleContextLost),e.removeEventListener("webglcontextrestored",this.handleContextRestored)),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()}postrender(){this.renderer.objectRenderer.renderingToScreen&&this.gl.flush()}validateContext(e){let t=e.getContextAttributes(),i="WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext;i&&(this.webGLVersion=2),t&&!t.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");let s=i||!!e.getExtension("OES_element_index_uint");this.supports.uint32Indices=s,s||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")}};hi.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"};hi.extension={type:$.RendererSystem,name:"context"};K.add(hi);var Fu=class extends wt{upload(e,t,i){let s=e.gl;s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.alphaMode===A0.UNPACK);let n=t.realWidth,o=t.realHeight;return i.width===n&&i.height===o?s.texSubImage2D(t.target,0,0,0,n,o,t.format,i.type,this.data):(i.width=n,i.height=o,s.texImage2D(t.target,0,i.internalFormat,n,o,0,t.format,i.type,this.data)),!0}};var Yi=class{constructor(e,t){this.width=Math.round(e||100),this.height=Math.round(t||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new b0("disposeFramebuffer"),this.multisample=qe.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(e=0,t){return this.colorTextures[e]=t||new ye(null,{scaleMode:Xt.NEAREST,resolution:1,mipmap:Y0.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(e){return this.depthTexture=e||new ye(new Fu(null,{width:this.width,height:this.height}),{scaleMode:Xt.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:Y0.OFF,format:se.DEPTH_COMPONENT,type:me.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this}enableDepth(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this}enableStencil(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this}resize(e,t){if(e=Math.round(e),t=Math.round(t),!(e===this.width&&t===this.height)){this.width=e,this.height=t,this.dirtyId++,this.dirtySize++;for(let i=0;i<this.colorTextures.length;i++){let s=this.colorTextures[i],n=s.resolution;s.setSize(e/n,t/n)}if(this.depthTexture){let i=this.depthTexture.resolution;this.depthTexture.setSize(e/i,t/i)}}}dispose(){this.disposeRunner.emit(this,!1)}destroyDepthTexture(){this.depthTexture&&(this.depthTexture.destroy(),this.depthTexture=null,++this.dirtyId,++this.dirtyFormat)}};var Fs=class extends ye{constructor(e={}){if(typeof e=="number"){let t=arguments[0],i=arguments[1],s=arguments[2],n=arguments[3];e={width:t,height:i,scaleMode:s,resolution:n}}e.width=e.width||100,e.height=e.height||100,e.multisample??(e.multisample=qe.NONE),super(null,e),this.mipmap=Y0.OFF,this.valid=!0,this._clear=new Se([0,0,0,0]),this.framebuffer=new Yi(this.realWidth,this.realHeight).addColorTexture(0,this),this.framebuffer.multisample=e.multisample,this.maskStack=[],this.filterStack=[{}]}set clearColor(e){this._clear.setValue(e)}get clearColor(){return this._clear.value}get clear(){return this._clear}resize(e,t){this.framebuffer.resize(e*this.resolution,t*this.resolution),this.setRealSize(this.framebuffer.width,this.framebuffer.height)}dispose(){this.framebuffer.dispose(),super.dispose()}destroy(){super.destroy(),this.framebuffer.destroyDepthTexture(),this.framebuffer=null}};var K0=class extends Bt{constructor(e){let t=e,i=t.naturalWidth||t.videoWidth||t.width,s=t.naturalHeight||t.videoHeight||t.height;super(i,s),this.source=e,this.noSubImage=!1}static crossOrigin(e,t,i){i===void 0&&!t.startsWith("data:")?e.crossOrigin=mu(t):i!==!1&&(e.crossOrigin=typeof i=="string"?i:"anonymous")}upload(e,t,i,s){let n=e.gl,o=t.realWidth,a=t.realHeight;if(s=s||this.source,typeof HTMLImageElement<"u"&&s instanceof HTMLImageElement){if(!s.complete||s.naturalWidth===0)return!1}else if(typeof HTMLVideoElement<"u"&&s instanceof HTMLVideoElement&&s.readyState<=1&&s.buffered.length===0)return!1;return n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.alphaMode===A0.UNPACK),!this.noSubImage&&t.target===n.TEXTURE_2D&&i.width===o&&i.height===a?n.texSubImage2D(n.TEXTURE_2D,0,0,0,t.format,i.type,s):(i.width=o,i.height=a,n.texImage2D(t.target,0,i.internalFormat,t.format,i.type,s)),!0}update(){if(this.destroyed)return;let e=this.source,t=e.naturalWidth||e.videoWidth||e.width,i=e.naturalHeight||e.videoHeight||e.height;this.resize(t,i),super.update()}dispose(){this.source=null}};var Xi=class extends K0{constructor(e,t){if(t=t||{},typeof e=="string"){let i=new Image;K0.crossOrigin(i,e,t.crossorigin),i.src=e,e=i}super(e),!e.complete&&this._width&&this._height&&(this._width=0,this._height=0),this.url=e.src,this._process=null,this.preserveBitmap=!1,this.createBitmap=(t.createBitmap??j.CREATE_IMAGE_BITMAP)&&!!globalThis.createImageBitmap,this.alphaMode=typeof t.alphaMode=="number"?t.alphaMode:null,this.bitmap=null,this._load=null,t.autoLoad!==!1&&this.load()}load(e){return this._load?this._load:(e!==void 0&&(this.createBitmap=e),this._load=new Promise((t,i)=>{let s=this.source;this.url=s.src;let n=()=>{this.destroyed||(s.onload=null,s.onerror=null,this.resize(s.width,s.height),this._load=null,this.createBitmap?t(this.process()):t(this))};s.complete&&s.src?n():(s.onload=n,s.onerror=o=>{i(o),this.onError.emit(o)})}),this._load)}process(){let e=this.source;if(this._process!==null)return this._process;if(this.bitmap!==null||!globalThis.createImageBitmap)return Promise.resolve(this);let t=globalThis.createImageBitmap,i=!e.crossOrigin||e.crossOrigin==="anonymous";return this._process=fetch(e.src,{mode:i?"cors":"no-cors"}).then(s=>s.blob()).then(s=>t(s,0,0,e.width,e.height,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===A0.UNPACK?"premultiply":"none"})).then(s=>this.destroyed?Promise.reject():(this.bitmap=s,this.update(),this._process=null,Promise.resolve(this))),this._process}upload(e,t,i){if(typeof this.alphaMode=="number"&&(t.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(e,t,i);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(e,t,i,this.bitmap),!this.preserveBitmap){let s=!0,n=t._glTextures;for(let o in n){let a=n[o];if(a!==i&&a.dirtyId!==t.dirtyId){s=!1;break}}s&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0}dispose(){this.source.onload=null,this.source.onerror=null,super.dispose(),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null}static test(e){return typeof HTMLImageElement<"u"&&(typeof e=="string"||e instanceof HTMLImageElement)}};var Tn=class{constructor(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}set(e,t,i){let s=t.width,n=t.height;if(i){let o=e.width/2/s,a=e.height/2/n,l=e.x/s+o,u=e.y/n+a;i=s0.add(i,s0.NW),this.x0=l+o*s0.uX(i),this.y0=u+a*s0.uY(i),i=s0.add(i,2),this.x1=l+o*s0.uX(i),this.y1=u+a*s0.uY(i),i=s0.add(i,2),this.x2=l+o*s0.uX(i),this.y2=u+a*s0.uY(i),i=s0.add(i,2),this.x3=l+o*s0.uX(i),this.y3=u+a*s0.uY(i)}else this.x0=e.x/s,this.y0=e.y/n,this.x1=(e.x+e.width)/s,this.y1=e.y/n,this.x2=(e.x+e.width)/s,this.y2=(e.y+e.height)/n,this.x3=e.x/s,this.y3=(e.y+e.height)/n;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3}toString(){return`[@pixi/core:TextureUvs x0=${this.x0} y0=${this.y0} x1=${this.x1} y1=${this.y1} x2=${this.x2} y2=${this.y2} x3=${this.x3} y3=${this.y3}]`}};var r6=new Tn;function Au(r){r.destroy=function(){},r.on=function(){},r.once=function(){},r.emit=function(){}}var xe=class r extends zi.default{constructor(e,t,i,s,n,o,a){if(super(),this.noFrame=!1,t||(this.noFrame=!0,t=new we(0,0,1,1)),e instanceof r&&(e=e.baseTexture),this.baseTexture=e,this._frame=t,this.trim=s,this.valid=!1,this._uvs=r6,this.uvMatrix=null,this.orig=i||t,this._rotate=Number(n||0),n===!0)this._rotate=2;else if(this._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=o?new Ae(o.x,o.y):new Ae(0,0),this.defaultBorders=a,this._updateID=0,this.textureCacheIds=[],e.valid?this.noFrame?e.valid&&this.onBaseTextureUpdated(e):this.frame=t:e.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&e.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(e){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=e.width,this._frame.height=e.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(e){if(this.baseTexture){if(e){let{resource:t}=this.baseTexture;t?.url&&O0[t.url]&&r.removeFromCache(t.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,r.removeFromCache(this),this.textureCacheIds=null}clone(){let e=this._frame.clone(),t=this._frame===this.orig?e:this.orig.clone(),i=new r(this.baseTexture,!this.noFrame&&e,t,this.trim?.clone(),this.rotate,this.defaultAnchor,this.defaultBorders);return this.noFrame&&(i._frame=e),i}updateUvs(){this._uvs===r6&&(this._uvs=new Tn),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(e,t={},i=j.STRICT_TEXTURE_CACHE){let s=typeof e=="string",n=null;if(s)n=e;else if(e instanceof ye){if(!e.cacheId){let a=t?.pixiIdPrefix||"pixiid";e.cacheId=`${a}-${Tr()}`,ye.addToCache(e,e.cacheId)}n=e.cacheId}else{if(!e._pixiId){let a=t?.pixiIdPrefix||"pixiid";e._pixiId=`${a}_${Tr()}`}n=e._pixiId}let o=O0[n];if(s&&i&&!o)throw new Error(`The cacheId "${n}" does not exist in TextureCache.`);return!o&&!(e instanceof ye)?(t.resolution||(t.resolution=Jo(e)),o=new r(new ye(e,t)),o.baseTexture.cacheId=n,ye.addToCache(o.baseTexture,n),r.addToCache(o,n)):!o&&e instanceof ye&&(o=new r(e),r.addToCache(o,n)),o}static fromURL(e,t){let i=Object.assign({autoLoad:!1},t?.resourceOptions),s=r.from(e,Object.assign({resourceOptions:i},t),!1),n=s.baseTexture.resource;return s.baseTexture.valid?Promise.resolve(s):n.load().then(()=>Promise.resolve(s))}static fromBuffer(e,t,i,s){return new r(ye.fromBuffer(e,t,i,s))}static fromLoader(e,t,i,s){let n=new ye(e,Object.assign({scaleMode:ye.defaultOptions.scaleMode,resolution:Jo(t)},s)),{resource:o}=n;o instanceof Xi&&(o.url=t);let a=new r(n);return i||(i=t),ye.addToCache(a.baseTexture,i),r.addToCache(a,i),i!==t&&(ye.addToCache(a.baseTexture,t),r.addToCache(a,t)),a.baseTexture.valid?Promise.resolve(a):new Promise(l=>{a.baseTexture.once("loaded",()=>l(a))})}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),O0[t]&&O0[t]!==e&&console.warn(`Texture added to the cache with an id [${t}] that already had an entry`),O0[t]=e)}static removeFromCache(e){if(typeof e=="string"){let t=O0[e];if(t){let i=t.textureCacheIds.indexOf(e);return i>-1&&t.textureCacheIds.splice(i,1),delete O0[e],t}}else if(e?.textureCacheIds){for(let t=0;t<e.textureCacheIds.length;++t)O0[e.textureCacheIds[t]]===e&&delete O0[e.textureCacheIds[t]];return e.textureCacheIds.length=0,e}return null}get resolution(){return this.baseTexture.resolution}get frame(){return this._frame}set frame(e){this._frame=e,this.noFrame=!1;let{x:t,y:i,width:s,height:n}=e,o=t+s>this.baseTexture.width,a=i+n>this.baseTexture.height;if(o||a){let l=o&&a?"and":"or",u=`X: ${t} + ${s} = ${t+s} > ${this.baseTexture.width}`,h=`Y: ${i} + ${n} = ${i+n} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${u} ${l} ${h}`)}this.valid=s&&n&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=e),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(e){this._rotate=e,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return r._EMPTY||(r._EMPTY=new r(new ye),Au(r._EMPTY),Au(r._EMPTY.baseTexture)),r._EMPTY}static get WHITE(){if(!r._WHITE){let e=j.ADAPTER.createCanvas(16,16),t=e.getContext("2d");e.width=16,e.height=16,t.fillStyle="white",t.fillRect(0,0,16,16),r._WHITE=new r(ye.from(e)),Au(r._WHITE),Au(r._WHITE.baseTexture)}return r._WHITE}};var Qt=class r extends xe{constructor(e,t){super(e,t),this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}get framebuffer(){return this.baseTexture.framebuffer}get multisample(){return this.framebuffer.multisample}set multisample(e){this.framebuffer.multisample=e}resize(e,t,i=!0){let s=this.baseTexture.resolution,n=Math.round(e*s)/s,o=Math.round(t*s)/s;this.valid=n>0&&o>0,this._frame.width=this.orig.width=n,this._frame.height=this.orig.height=o,i&&this.baseTexture.resize(n,o),this.updateUvs()}setResolution(e){let{baseTexture:t}=this;t.resolution!==e&&(t.setResolution(e),this.resize(t.width,t.height,!1))}static create(e){return new r(new Fs(e))}};var Fn=class{constructor(e){this.texturePool={},this.textureOptions=e||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(e,t,i=qe.NONE){let s=new Fs(Object.assign({width:e,height:t,resolution:1,multisample:i},this.textureOptions));return new Qt(s)}getOptimalTexture(e,t,i=1,s=qe.NONE){let n;e=Math.ceil(e*i-1e-6),t=Math.ceil(t*i-1e-6),!this.enableFullScreen||e!==this._pixelsWidth||t!==this._pixelsHeight?(e=Vi(e),t=Vi(t),n=((e&65535)<<16|t&65535)>>>0,s>1&&(n+=s*4294967296)):n=s>1?-s:-1,this.texturePool[n]||(this.texturePool[n]=[]);let o=this.texturePool[n].pop();return o||(o=this.createTexture(e,t,s)),o.filterPoolKey=n,o.setResolution(i),o}getFilterTexture(e,t,i){let s=this.getOptimalTexture(e.width,e.height,t||e.resolution,i||qe.NONE);return s.filterFrame=e.filterFrame,s}returnTexture(e){let t=e.filterPoolKey;e.filterFrame=null,this.texturePool[t].push(e)}returnFilterTexture(e){this.returnTexture(e)}clear(e){if(e=e!==!1,e)for(let t in this.texturePool){let i=this.texturePool[t];if(i)for(let s=0;s<i.length;s++)i[s].destroy(!0)}this.texturePool={}}setScreenSize(e){if(!(e.width===this._pixelsWidth&&e.height===this._pixelsHeight)){this.enableFullScreen=e.width>0&&e.height>0;for(let t in this.texturePool){if(!(Number(t)<0))continue;let i=this.texturePool[t];if(i)for(let s=0;s<i.length;s++)i[s].destroy(!0);this.texturePool[t]=[]}this._pixelsWidth=e.width,this._pixelsHeight=e.height}}};Fn.SCREEN_KEY=-1;var ua=class extends Rt{constructor(){super(),this.addAttribute("aVertexPosition",new Float32Array([0,0,1,0,1,1,0,1])).addIndex([0,1,3,2])}};var As=class extends Rt{constructor(){super(),this.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),this.uvs=new Float32Array([0,0,1,0,1,1,0,1]),this.vertexBuffer=new Qe(this.vertices),this.uvBuffer=new Qe(this.uvs),this.addAttribute("aVertexPosition",this.vertexBuffer).addAttribute("aTextureCoord",this.uvBuffer).addIndex([0,1,2,0,2,3])}map(e,t){let i=0,s=0;return this.uvs[0]=i,this.uvs[1]=s,this.uvs[2]=i+t.width/e.width,this.uvs[3]=s,this.uvs[4]=i+t.width/e.width,this.uvs[5]=s+t.height/e.height,this.uvs[6]=i,this.uvs[7]=s+t.height/e.height,i=t.x,s=t.y,this.vertices[0]=i,this.vertices[1]=s,this.vertices[2]=i+t.width,this.vertices[3]=s,this.vertices[4]=i+t.width,this.vertices[5]=s+t.height,this.vertices[6]=i,this.vertices[7]=s+t.height,this.invalidate(),this}invalidate(){return this.vertexBuffer._updateID++,this.uvBuffer._updateID++,this}};var ha=class{constructor(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.multisample=qe.NONE,this.sourceFrame=new we,this.destinationFrame=new we,this.bindingSourceFrame=new we,this.bindingDestinationFrame=new we,this.filters=[],this.transform=null}clear(){this.target=null,this.filters=null,this.renderTexture=null}};var Iu=[new Ae,new Ae,new Ae,new Ae],Z1=new Re,An=class{constructor(e){this.renderer=e,this.defaultFilterStack=[{}],this.texturePool=new Fn,this.statePool=[],this.quad=new ua,this.quadUv=new As,this.tempRect=new we,this.activeState={},this.globalUniforms=new pt({outputFrame:new we,inputSize:new Float32Array(4),inputPixel:new Float32Array(4),inputClamp:new Float32Array(4),resolution:1,filterArea:new Float32Array(4),filterClamp:new Float32Array(4)},!0),this.forceClear=!1,this.useMaxPadding=!1}init(){this.texturePool.setScreenSize(this.renderer.view)}push(e,t){let i=this.renderer,s=this.defaultFilterStack,n=this.statePool.pop()||new ha,o=this.renderer.renderTexture,a=t[0].resolution,l=t[0].multisample,u=t[0].padding,h=t[0].autoFit,d=t[0].legacy??!0;for(let x=1;x<t.length;x++){let C=t[x];a=Math.min(a,C.resolution),l=Math.min(l,C.multisample),u=this.useMaxPadding?Math.max(u,C.padding):u+C.padding,h=h&&C.autoFit,d=d||(C.legacy??!0)}s.length===1&&(this.defaultFilterStack[0].renderTexture=o.current),s.push(n),n.resolution=a,n.multisample=l,n.legacy=d,n.target=e,n.sourceFrame.copyFrom(e.filterArea||e.getBounds(!0)),n.sourceFrame.pad(u);let p=this.tempRect.copyFrom(o.sourceFrame);i.projection.transform&&this.transformAABB(Z1.copyFrom(i.projection.transform).invert(),p),h?(n.sourceFrame.fit(p),(n.sourceFrame.width<=0||n.sourceFrame.height<=0)&&(n.sourceFrame.width=0,n.sourceFrame.height=0)):n.sourceFrame.intersects(p)||(n.sourceFrame.width=0,n.sourceFrame.height=0),this.roundFrame(n.sourceFrame,o.current?o.current.resolution:i.resolution,o.sourceFrame,o.destinationFrame,i.projection.transform),n.renderTexture=this.getOptimalFilterTexture(n.sourceFrame.width,n.sourceFrame.height,a,l),n.filters=t,n.destinationFrame.width=n.renderTexture.width,n.destinationFrame.height=n.renderTexture.height;let m=this.tempRect;m.x=0,m.y=0,m.width=n.sourceFrame.width,m.height=n.sourceFrame.height,n.renderTexture.filterFrame=n.sourceFrame,n.bindingSourceFrame.copyFrom(o.sourceFrame),n.bindingDestinationFrame.copyFrom(o.destinationFrame),n.transform=i.projection.transform,i.projection.transform=null,o.bind(n.renderTexture,n.sourceFrame,m),i.framebuffer.clear(0,0,0,0)}pop(){let e=this.defaultFilterStack,t=e.pop(),i=t.filters;this.activeState=t;let s=this.globalUniforms.uniforms;s.outputFrame=t.sourceFrame,s.resolution=t.resolution;let n=s.inputSize,o=s.inputPixel,a=s.inputClamp;if(n[0]=t.destinationFrame.width,n[1]=t.destinationFrame.height,n[2]=1/n[0],n[3]=1/n[1],o[0]=Math.round(n[0]*t.resolution),o[1]=Math.round(n[1]*t.resolution),o[2]=1/o[0],o[3]=1/o[1],a[0]=.5*o[2],a[1]=.5*o[3],a[2]=t.sourceFrame.width*n[2]-.5*o[2],a[3]=t.sourceFrame.height*n[3]-.5*o[3],t.legacy){let u=s.filterArea;u[0]=t.destinationFrame.width,u[1]=t.destinationFrame.height,u[2]=t.sourceFrame.x,u[3]=t.sourceFrame.y,s.filterClamp=s.inputClamp}this.globalUniforms.update();let l=e[e.length-1];if(this.renderer.framebuffer.blit(),i.length===1)i[0].apply(this,t.renderTexture,l.renderTexture,Nt.BLEND,t),this.returnFilterTexture(t.renderTexture);else{let u=t.renderTexture,h=this.getOptimalFilterTexture(u.width,u.height,t.resolution);h.filterFrame=u.filterFrame;let d=0;for(d=0;d<i.length-1;++d){d===1&&t.multisample>1&&(h=this.getOptimalFilterTexture(u.width,u.height,t.resolution),h.filterFrame=u.filterFrame),i[d].apply(this,u,h,Nt.CLEAR,t);let p=u;u=h,h=p}i[d].apply(this,u,l.renderTexture,Nt.BLEND,t),d>1&&t.multisample>1&&this.returnFilterTexture(t.renderTexture),this.returnFilterTexture(u),this.returnFilterTexture(h)}t.clear(),this.statePool.push(t)}bindAndClear(e,t=Nt.CLEAR){let{renderTexture:i,state:s}=this.renderer;if(e===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,e?.filterFrame){let o=this.tempRect;o.x=0,o.y=0,o.width=e.filterFrame.width,o.height=e.filterFrame.height,i.bind(e,e.filterFrame,o)}else e!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?i.bind(e):this.renderer.renderTexture.bind(e,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);let n=s.stateId&1||this.forceClear;(t===Nt.CLEAR||t===Nt.BLIT&&n)&&this.renderer.framebuffer.clear(0,0,0,0)}applyFilter(e,t,i,s){let n=this.renderer;n.state.set(e.state),this.bindAndClear(i,s),e.uniforms.uSampler=t,e.uniforms.filterGlobals=this.globalUniforms,n.shader.bind(e),e.legacy=!!e.program.attributeData.aTextureCoord,e.legacy?(this.quadUv.map(t._frame,t.filterFrame),n.geometry.bind(this.quadUv),n.geometry.draw(Et.TRIANGLES)):(n.geometry.bind(this.quad),n.geometry.draw(Et.TRIANGLE_STRIP))}calculateSpriteMatrix(e,t){let{sourceFrame:i,destinationFrame:s}=this.activeState,{orig:n}=t._texture,o=e.set(s.width,0,0,s.height,i.x,i.y),a=t.worldTransform.copyTo(Re.TEMP_MATRIX);return a.invert(),o.prepend(a),o.scale(1/n.width,1/n.height),o.translate(t.anchor.x,t.anchor.y),o}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(e,t,i=1,s=qe.NONE){return this.texturePool.getOptimalTexture(e,t,i,s)}getFilterTexture(e,t,i){if(typeof e=="number"){let n=e;e=t,t=n}e=e||this.activeState.renderTexture;let s=this.texturePool.getOptimalTexture(e.width,e.height,t||e.resolution,i||qe.NONE);return s.filterFrame=e.filterFrame,s}returnFilterTexture(e){this.texturePool.returnTexture(e)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(e,t){let i=Iu[0],s=Iu[1],n=Iu[2],o=Iu[3];i.set(t.left,t.top),s.set(t.left,t.bottom),n.set(t.right,t.top),o.set(t.right,t.bottom),e.apply(i,i),e.apply(s,s),e.apply(n,n),e.apply(o,o);let a=Math.min(i.x,s.x,n.x,o.x),l=Math.min(i.y,s.y,n.y,o.y),u=Math.max(i.x,s.x,n.x,o.x),h=Math.max(i.y,s.y,n.y,o.y);t.x=a,t.y=l,t.width=u-a,t.height=h-l}roundFrame(e,t,i,s,n){if(!(e.width<=0||e.height<=0||i.width<=0||i.height<=0)){if(n){let{a:o,b:a,c:l,d:u}=n;if((Math.abs(a)>1e-4||Math.abs(l)>1e-4)&&(Math.abs(o)>1e-4||Math.abs(u)>1e-4))return}n=n?Z1.copyFrom(n):Z1.identity(),n.translate(-i.x,-i.y).scale(s.width/i.width,s.height/i.height).translate(s.x,s.y),this.transformAABB(n,e),e.ceil(t),this.transformAABB(n.invert(),e)}}};An.extension={type:$.RendererSystem,name:"filter"};K.add(An);var ca=class{constructor(e){this.framebuffer=e,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=qe.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}};var Lf=new we,In=class{constructor(e){this.renderer=e,this.managedFramebuffers=[],this.unknownFramebuffer=new Yi(10,10),this.msaaSamples=null}contextChange(){this.disposeAll(!0);let e=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new we,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let t=this.renderer.context.extensions.drawBuffers,i=this.renderer.context.extensions.depthTexture;j.PREFER_ENV===Mt.WEBGL_LEGACY&&(t=null,i=null),t?e.drawBuffers=s=>t.drawBuffersWEBGL(s):(this.hasMRT=!1,e.drawBuffers=()=>{}),i||(this.writeDepthTexture=!1)}else this.msaaSamples=e.getInternalformatParameter(e.RENDERBUFFER,e.RGBA8,e.SAMPLES)}bind(e,t,i=0){let{gl:s}=this;if(e){let n=e.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(e);this.current!==e&&(this.current=e,s.bindFramebuffer(s.FRAMEBUFFER,n.framebuffer)),n.mipLevel!==i&&(e.dirtyId++,e.dirtyFormat++,n.mipLevel=i),n.dirtyId!==e.dirtyId&&(n.dirtyId=e.dirtyId,n.dirtyFormat!==e.dirtyFormat?(n.dirtyFormat=e.dirtyFormat,n.dirtySize=e.dirtySize,this.updateFramebuffer(e,i)):n.dirtySize!==e.dirtySize&&(n.dirtySize=e.dirtySize,this.resizeFramebuffer(e)));for(let o=0;o<e.colorTextures.length;o++){let a=e.colorTextures[o];this.renderer.texture.unbind(a.parentTextureArray||a)}if(e.depthTexture&&this.renderer.texture.unbind(e.depthTexture),t){let o=t.width>>i,a=t.height>>i,l=o/t.width;this.setViewport(t.x*l,t.y*l,o,a)}else{let o=e.width>>i,a=e.height>>i;this.setViewport(0,0,o,a)}}else this.current&&(this.current=null,s.bindFramebuffer(s.FRAMEBUFFER,null)),t?this.setViewport(t.x,t.y,t.width,t.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(e,t,i,s){let n=this.viewport;e=Math.round(e),t=Math.round(t),i=Math.round(i),s=Math.round(s),(n.width!==i||n.height!==s||n.x!==e||n.y!==t)&&(n.x=e,n.y=t,n.width=i,n.height=s,this.gl.viewport(e,t,i,s))}get size(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}}clear(e,t,i,s,n=Jl.COLOR|Jl.DEPTH){let{gl:o}=this;o.clearColor(e,t,i,s),o.clear(n)}initFramebuffer(e){let{gl:t}=this,i=new ca(t.createFramebuffer());return i.multisample=this.detectSamples(e.multisample),e.glFramebuffers[this.CONTEXT_UID]=i,this.managedFramebuffers.push(e),e.disposeRunner.add(this),i}resizeFramebuffer(e){let{gl:t}=this,i=e.glFramebuffers[this.CONTEXT_UID];i.stencil&&(t.bindRenderbuffer(t.RENDERBUFFER,i.stencil),i.msaaBuffer?t.renderbufferStorageMultisample(t.RENDERBUFFER,i.multisample,t.DEPTH24_STENCIL8,e.width,e.height):t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,e.width,e.height));let s=e.colorTextures,n=s.length;t.drawBuffers||(n=Math.min(n,1));for(let o=0;o<n;o++){let a=s[o],l=a.parentTextureArray||a;this.renderer.texture.bind(l,0),o===0&&i.msaaBuffer&&(t.bindRenderbuffer(t.RENDERBUFFER,i.msaaBuffer),t.renderbufferStorageMultisample(t.RENDERBUFFER,i.multisample,l._glTextures[this.CONTEXT_UID].internalFormat,e.width,e.height))}e.depthTexture&&this.writeDepthTexture&&this.renderer.texture.bind(e.depthTexture,0)}updateFramebuffer(e,t){let{gl:i}=this,s=e.glFramebuffers[this.CONTEXT_UID],n=e.colorTextures,o=n.length;i.drawBuffers||(o=Math.min(o,1)),s.multisample>1&&this.canMultisampleFramebuffer(e)?s.msaaBuffer=s.msaaBuffer||i.createRenderbuffer():s.msaaBuffer&&(i.deleteRenderbuffer(s.msaaBuffer),s.msaaBuffer=null,s.blitFramebuffer&&(s.blitFramebuffer.dispose(),s.blitFramebuffer=null));let a=[];for(let l=0;l<o;l++){let u=n[l],h=u.parentTextureArray||u;this.renderer.texture.bind(h,0),l===0&&s.msaaBuffer?(i.bindRenderbuffer(i.RENDERBUFFER,s.msaaBuffer),i.renderbufferStorageMultisample(i.RENDERBUFFER,s.multisample,h._glTextures[this.CONTEXT_UID].internalFormat,e.width,e.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.RENDERBUFFER,s.msaaBuffer)):(i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0+l,u.target,h._glTextures[this.CONTEXT_UID].texture,t),a.push(i.COLOR_ATTACHMENT0+l))}if(a.length>1&&i.drawBuffers(a),e.depthTexture&&this.writeDepthTexture){let u=e.depthTexture;this.renderer.texture.bind(u,0),i.framebufferTexture2D(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.TEXTURE_2D,u._glTextures[this.CONTEXT_UID].texture,t)}(e.stencil||e.depth)&&!(e.depthTexture&&this.writeDepthTexture)?(s.stencil=s.stencil||i.createRenderbuffer(),i.bindRenderbuffer(i.RENDERBUFFER,s.stencil),s.msaaBuffer?i.renderbufferStorageMultisample(i.RENDERBUFFER,s.multisample,i.DEPTH24_STENCIL8,e.width,e.height):i.renderbufferStorage(i.RENDERBUFFER,i.DEPTH_STENCIL,e.width,e.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.DEPTH_STENCIL_ATTACHMENT,i.RENDERBUFFER,s.stencil)):s.stencil&&(i.deleteRenderbuffer(s.stencil),s.stencil=null)}canMultisampleFramebuffer(e){return this.renderer.context.webGLVersion!==1&&e.colorTextures.length<=1&&!e.depthTexture}detectSamples(e){let{msaaSamples:t}=this,i=qe.NONE;if(e<=1||t===null)return i;for(let s=0;s<t.length;s++)if(t[s]<=e){i=t[s];break}return i===1&&(i=qe.NONE),i}blit(e,t,i){let{current:s,renderer:n,gl:o,CONTEXT_UID:a}=this;if(n.context.webGLVersion!==2||!s)return;let l=s.glFramebuffers[a];if(!l)return;if(!e){if(!l.msaaBuffer)return;let h=s.colorTextures[0];if(!h)return;l.blitFramebuffer||(l.blitFramebuffer=new Yi(s.width,s.height),l.blitFramebuffer.addColorTexture(0,h)),e=l.blitFramebuffer,e.colorTextures[0]!==h&&(e.colorTextures[0]=h,e.dirtyId++,e.dirtyFormat++),(e.width!==s.width||e.height!==s.height)&&(e.width=s.width,e.height=s.height,e.dirtyId++,e.dirtySize++)}t||(t=Lf,t.width=s.width,t.height=s.height),i||(i=t);let u=t.width===i.width&&t.height===i.height;this.bind(e),o.bindFramebuffer(o.READ_FRAMEBUFFER,l.framebuffer),o.blitFramebuffer(t.left,t.top,t.right,t.bottom,i.left,i.top,i.right,i.bottom,o.COLOR_BUFFER_BIT,u?o.NEAREST:o.LINEAR),o.bindFramebuffer(o.READ_FRAMEBUFFER,e.glFramebuffers[this.CONTEXT_UID].framebuffer)}disposeFramebuffer(e,t){let i=e.glFramebuffers[this.CONTEXT_UID],s=this.gl;if(!i)return;delete e.glFramebuffers[this.CONTEXT_UID];let n=this.managedFramebuffers.indexOf(e);n>=0&&this.managedFramebuffers.splice(n,1),e.disposeRunner.remove(this),t||(s.deleteFramebuffer(i.framebuffer),i.msaaBuffer&&s.deleteRenderbuffer(i.msaaBuffer),i.stencil&&s.deleteRenderbuffer(i.stencil)),i.blitFramebuffer&&this.disposeFramebuffer(i.blitFramebuffer,t)}disposeAll(e){let t=this.managedFramebuffers;this.managedFramebuffers=[];for(let i=0;i<t.length;i++)this.disposeFramebuffer(t[i],e)}forceStencil(){let e=this.current;if(!e)return;let t=e.glFramebuffers[this.CONTEXT_UID];if(!t||t.stencil)return;e.stencil=!0;let i=e.width,s=e.height,n=this.gl,o=n.createRenderbuffer();n.bindRenderbuffer(n.RENDERBUFFER,o),t.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,t.multisample,n.DEPTH24_STENCIL8,i,s):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,i,s),t.stencil=o,n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,o)}reset(){this.current=this.unknownFramebuffer,this.viewport=new we}destroy(){this.renderer=null}};In.extension={type:$.RendererSystem,name:"framebuffer"};K.add(In);var Q1={5126:4,5123:2,5121:1},kn=class{constructor(e){this.renderer=e,this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0,this.canUseUInt32ElementIndex=!1,this.managedGeometries={}}contextChange(){this.disposeAll(!0);let e=this.gl=this.renderer.gl,t=this.renderer.context;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,t.webGLVersion!==2){let i=this.renderer.context.extensions.vertexArrayObject;j.PREFER_ENV===Mt.WEBGL_LEGACY&&(i=null),i?(e.createVertexArray=()=>i.createVertexArrayOES(),e.bindVertexArray=s=>i.bindVertexArrayOES(s),e.deleteVertexArray=s=>i.deleteVertexArrayOES(s)):(this.hasVao=!1,e.createVertexArray=()=>null,e.bindVertexArray=()=>null,e.deleteVertexArray=()=>null)}if(t.webGLVersion!==2){let i=e.getExtension("ANGLE_instanced_arrays");i?(e.vertexAttribDivisor=(s,n)=>i.vertexAttribDivisorANGLE(s,n),e.drawElementsInstanced=(s,n,o,a,l)=>i.drawElementsInstancedANGLE(s,n,o,a,l),e.drawArraysInstanced=(s,n,o,a)=>i.drawArraysInstancedANGLE(s,n,o,a)):this.hasInstance=!1}this.canUseUInt32ElementIndex=t.webGLVersion===2||!!t.extensions.uint32ElementIndex}bind(e,t){t=t||this.renderer.shader.shader;let{gl:i}=this,s=e.glVertexArrayObjects[this.CONTEXT_UID],n=!1;s||(this.managedGeometries[e.id]=e,e.disposeRunner.add(this),e.glVertexArrayObjects[this.CONTEXT_UID]=s={},n=!0);let o=s[t.program.id]||this.initGeometryVao(e,t,n);this._activeGeometry=e,this._activeVao!==o&&(this._activeVao=o,this.hasVao?i.bindVertexArray(o):this.activateVao(e,t.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){let e=this._activeGeometry,t=this.renderer.buffer;for(let i=0;i<e.buffers.length;i++){let s=e.buffers[i];t.update(s)}}checkCompatibility(e,t){let i=e.attributes,s=t.attributeData;for(let n in s)if(!i[n])throw new Error(`shader and geometry incompatible, geometry missing the "${n}" attribute`)}getSignature(e,t){let i=e.attributes,s=t.attributeData,n=["g",e.id];for(let o in i)s[o]&&n.push(o,s[o].location);return n.join("-")}initGeometryVao(e,t,i=!0){let s=this.gl,n=this.CONTEXT_UID,o=this.renderer.buffer,a=t.program;a.glPrograms[n]||this.renderer.shader.generateProgram(t),this.checkCompatibility(e,a);let l=this.getSignature(e,a),u=e.glVertexArrayObjects[this.CONTEXT_UID],h=u[l];if(h)return u[a.id]=h,h;let d=e.buffers,p=e.attributes,m={},x={};for(let C in d)m[C]=0,x[C]=0;for(let C in p)!p[C].size&&a.attributeData[C]?p[C].size=a.attributeData[C].size:p[C].size||console.warn(`PIXI Geometry attribute '${C}' size cannot be determined (likely the bound shader does not have the attribute)`),m[p[C].buffer]+=p[C].size*Q1[p[C].type];for(let C in p){let A=p[C],P=A.size;A.stride===void 0&&(m[A.buffer]===P*Q1[A.type]?A.stride=0:A.stride=m[A.buffer]),A.start===void 0&&(A.start=x[A.buffer],x[A.buffer]+=P*Q1[A.type])}h=s.createVertexArray(),s.bindVertexArray(h);for(let C=0;C<d.length;C++){let A=d[C];o.bind(A),i&&A._glBuffers[n].refCount++}return this.activateVao(e,a),u[a.id]=h,u[l]=h,s.bindVertexArray(null),o.unbind(bt.ARRAY_BUFFER),h}disposeGeometry(e,t){if(!this.managedGeometries[e.id])return;delete this.managedGeometries[e.id];let i=e.glVertexArrayObjects[this.CONTEXT_UID],s=this.gl,n=e.buffers,o=this.renderer?.buffer;if(e.disposeRunner.remove(this),!!i){if(o)for(let a=0;a<n.length;a++){let l=n[a]._glBuffers[this.CONTEXT_UID];l&&(l.refCount--,l.refCount===0&&!t&&o.dispose(n[a],t))}if(!t){for(let a in i)if(a[0]==="g"){let l=i[a];this._activeVao===l&&this.unbind(),s.deleteVertexArray(l)}}delete e.glVertexArrayObjects[this.CONTEXT_UID]}}disposeAll(e){let t=Object.keys(this.managedGeometries);for(let i=0;i<t.length;i++)this.disposeGeometry(this.managedGeometries[t[i]],e)}activateVao(e,t){let i=this.gl,s=this.CONTEXT_UID,n=this.renderer.buffer,o=e.buffers,a=e.attributes;e.indexBuffer&&n.bind(e.indexBuffer);let l=null;for(let u in a){let h=a[u],d=o[h.buffer],p=d._glBuffers[s];if(t.attributeData[u]){l!==p&&(n.bind(d),l=p);let m=t.attributeData[u].location;if(i.enableVertexAttribArray(m),i.vertexAttribPointer(m,h.size,h.type||i.FLOAT,h.normalized,h.stride,h.start),h.instance)if(this.hasInstance)i.vertexAttribDivisor(m,h.divisor);else throw new Error("geometry error, GPU Instancing is not supported on this device")}}}draw(e,t,i,s){let{gl:n}=this,o=this._activeGeometry;if(o.indexBuffer){let a=o.indexBuffer.data.BYTES_PER_ELEMENT,l=a===2?n.UNSIGNED_SHORT:n.UNSIGNED_INT;a===2||a===4&&this.canUseUInt32ElementIndex?o.instanced?n.drawElementsInstanced(e,t||o.indexBuffer.data.length,l,(i||0)*a,s||1):n.drawElements(e,t||o.indexBuffer.data.length,l,(i||0)*a):console.warn("unsupported index buffer type: uint32")}else o.instanced?n.drawArraysInstanced(e,i,t||o.getSize(),s||1):n.drawArrays(e,i,t||o.getSize());return this}unbind(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null}destroy(){this.renderer=null}};kn.extension={type:$.RendererSystem,name:"geometry"};K.add(kn);var i6=new Re,qi=class{constructor(e,t){this._texture=e,this.mapCoord=new Re,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,this.clampMargin=typeof t>"u"?.5:t,this.isSimple=!1}get texture(){return this._texture}set texture(e){this._texture=e,this._textureID=-1}multiplyUvs(e,t){t===void 0&&(t=e);let i=this.mapCoord;for(let s=0;s<e.length;s+=2){let n=e[s],o=e[s+1];t[s]=n*i.a+o*i.c+i.tx,t[s+1]=n*i.b+o*i.d+i.ty}return t}update(e){let t=this._texture;if(!t||!t.valid||!e&&this._textureID===t._updateID)return!1;this._textureID=t._updateID,this._updateID++;let i=t._uvs;this.mapCoord.set(i.x1-i.x0,i.y1-i.y0,i.x3-i.x0,i.y3-i.y0,i.x0,i.y0);let s=t.orig,n=t.trim;n&&(i6.set(s.width/n.width,0,0,s.height/n.height,-n.x/n.width,-n.y/n.height),this.mapCoord.append(i6));let o=t.baseTexture,a=this.uClampFrame,l=this.clampMargin/o.resolution,u=this.clampOffset;return a[0]=(t._frame.x+l+u)/o.width,a[1]=(t._frame.y+l+u)/o.height,a[2]=(t._frame.x+t._frame.width-l+u)/o.width,a[3]=(t._frame.y+t._frame.height-l+u)/o.height,this.uClampOffset[0]=u/o.realWidth,this.uClampOffset[1]=u/o.realHeight,this.isSimple=t._frame.width===o.width&&t._frame.height===o.height&&t.rotate===0,!0}};var s6=`varying vec2 vMaskCoord;
varying vec2 vTextureCoord;
uniform sampler2D uSampler;
uniform sampler2D mask;
uniform float alpha;
uniform float npmAlpha;
uniform vec4 maskClamp;
void main(void)
{
float clip = step(3.5,
step(maskClamp.x, vMaskCoord.x) +
step(maskClamp.y, vMaskCoord.y) +
step(vMaskCoord.x, maskClamp.z) +
step(vMaskCoord.y, maskClamp.w));
vec4 original = texture2D(uSampler, vTextureCoord);
vec4 masky = texture2D(mask, vMaskCoord);
float alphaMul = 1.0 - npmAlpha * (1.0 - masky.a);
original *= (alphaMul * masky.r * alpha * clip);
gl_FragColor = original;
}
`;var n6=`attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
uniform mat3 projectionMatrix;
uniform mat3 otherMatrix;
varying vec2 vMaskCoord;
varying vec2 vTextureCoord;
void main(void)
{
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = aTextureCoord;
vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;
}
`;var da=class extends Ye{constructor(e,t,i){let s=null;typeof e!="string"&&t===void 0&&i===void 0&&(s=e,e=void 0,t=void 0,i=void 0),super(e||n6,t||s6,i),this.maskSprite=s,this.maskMatrix=new Re}get maskSprite(){return this._maskSprite}set maskSprite(e){this._maskSprite=e,this._maskSprite&&(this._maskSprite.renderable=!1)}apply(e,t,i,s){let n=this._maskSprite,o=n._texture;o.valid&&(o.uvMatrix||(o.uvMatrix=new qi(o,0)),o.uvMatrix.update(),this.uniforms.npmAlpha=o.baseTexture.alphaMode?0:1,this.uniforms.mask=o,this.uniforms.otherMatrix=e.calculateSpriteMatrix(this.maskMatrix,n).prepend(o.uvMatrix.mapCoord),this.uniforms.alpha=n.worldAlpha,this.uniforms.maskClamp=o.uvMatrix.uClampFrame,e.applyFilter(this,t,i,s))}};var pa=class{constructor(e=null){this.type=f0.NONE,this.autoDetect=!0,this.maskObject=e||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=Ye.defaultMultisample,this.enabled=!0,this.colorMask=15,this._filters=null,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._scissorRectLocal=null,this._colorMask=15,this._target=null}get filter(){return this._filters?this._filters[0]:null}set filter(e){e?this._filters?this._filters[0]=e:this._filters=[e]:this._filters=null}reset(){this.pooled&&(this.maskObject=null,this.type=f0.NONE,this.autoDetect=!0),this._target=null,this._scissorRectLocal=null}copyCountersOrReset(e){e?(this._stencilCounter=e._stencilCounter,this._scissorCounter=e._scissorCounter,this._scissorRect=e._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)}};var Mn=class{constructor(e){this.renderer=e,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}setMaskStack(e){this.maskStack=e,this.renderer.scissor.setMaskStack(e),this.renderer.stencil.setMaskStack(e)}push(e,t){let i=t;if(!i.isMaskData){let n=this.maskDataPool.pop()||new pa;n.pooled=!0,n.maskObject=t,i=n}let s=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(i.copyCountersOrReset(s),i._colorMask=s?s._colorMask:15,i.autoDetect&&this.detect(i),i._target=e,i.type!==f0.SPRITE&&this.maskStack.push(i),i.enabled)switch(i.type){case f0.SCISSOR:this.renderer.scissor.push(i);break;case f0.STENCIL:this.renderer.stencil.push(i);break;case f0.SPRITE:i.copyCountersOrReset(null),this.pushSpriteMask(i);break;case f0.COLOR:this.pushColorMask(i);break;default:break}i.type===f0.SPRITE&&this.maskStack.push(i)}pop(e){let t=this.maskStack.pop();if(!(!t||t._target!==e)){if(t.enabled)switch(t.type){case f0.SCISSOR:this.renderer.scissor.pop(t);break;case f0.STENCIL:this.renderer.stencil.pop(t.maskObject);break;case f0.SPRITE:this.popSpriteMask(t);break;case f0.COLOR:this.popColorMask(t);break;default:break}if(t.reset(),t.pooled&&this.maskDataPool.push(t),this.maskStack.length!==0){let i=this.maskStack[this.maskStack.length-1];i.type===f0.SPRITE&&i._filters&&(i._filters[0].maskSprite=i.maskObject)}}}detect(e){let t=e.maskObject;t?t.isSprite?e.type=f0.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(e)?e.type=f0.SCISSOR:e.type=f0.STENCIL:e.type=f0.COLOR}pushSpriteMask(e){let{maskObject:t}=e,i=e._target,s=e._filters;s||(s=this.alphaMaskPool[this.alphaMaskIndex],s||(s=this.alphaMaskPool[this.alphaMaskIndex]=[new da]));let n=this.renderer,o=n.renderTexture,a,l;if(o.current){let h=o.current;a=e.resolution||h.resolution,l=e.multisample??h.multisample}else a=e.resolution||n.resolution,l=e.multisample??n.multisample;s[0].resolution=a,s[0].multisample=l,s[0].maskSprite=t;let u=i.filterArea;i.filterArea=t.getBounds(!0),n.filter.push(i,s),i.filterArea=u,e._filters||this.alphaMaskIndex++}popSpriteMask(e){this.renderer.filter.pop(),e._filters?e._filters[0].maskSprite=null:(this.alphaMaskIndex--,this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite=null)}pushColorMask(e){let t=e._colorMask,i=e._colorMask=t&e.colorMask;i!==t&&this.renderer.gl.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)}popColorMask(e){let t=e._colorMask,i=this.maskStack.length>0?this.maskStack[this.maskStack.length-1]._colorMask:15;i!==t&&this.renderer.gl.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)}destroy(){this.renderer=null}};Mn.extension={type:$.RendererSystem,name:"mask"};K.add(Mn);var Pn=class{constructor(e){this.renderer=e,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(e){let{gl:t}=this.renderer,i=this.getStackLength();this.maskStack=e;let s=this.getStackLength();s!==i&&(s===0?t.disable(this.glConst):(t.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}};var o6=new Re,a6=[],ku=class extends Pn{constructor(r){super(r),this.glConst=j.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){let r=this.maskStack[this.maskStack.length-1];return r?r._scissorCounter:0}calcScissorRect(r){if(r._scissorRectLocal)return;let e=r._scissorRect,{maskObject:t}=r,{renderer:i}=this,s=i.renderTexture,n=t.getBounds(!0,a6.pop()??new we);this.roundFrameToPixels(n,s.current?s.current.resolution:i.resolution,s.sourceFrame,s.destinationFrame,i.projection.transform),e&&n.fit(e),r._scissorRectLocal=n}static isMatrixRotated(r){if(!r)return!1;let{a:e,b:t,c:i,d:s}=r;return(Math.abs(t)>1e-4||Math.abs(i)>1e-4)&&(Math.abs(e)>1e-4||Math.abs(s)>1e-4)}testScissor(r){let{maskObject:e}=r;if(!e.isFastRect||!e.isFastRect()||ku.isMatrixRotated(e.worldTransform)||ku.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(r);let t=r._scissorRectLocal;return t.width>0&&t.height>0}roundFrameToPixels(r,e,t,i,s){ku.isMatrixRotated(s)||(s=s?o6.copyFrom(s):o6.identity(),s.translate(-t.x,-t.y).scale(i.width/t.width,i.height/t.height).translate(i.x,i.y),this.renderer.filter.transformAABB(s,r),r.fit(i),r.x=Math.round(r.x*e),r.y=Math.round(r.y*e),r.width=Math.round(r.width*e),r.height=Math.round(r.height*e))}push(r){r._scissorRectLocal||this.calcScissorRect(r);let{gl:e}=this.renderer;r._scissorRect||e.enable(e.SCISSOR_TEST),r._scissorCounter++,r._scissorRect=r._scissorRectLocal,this._useCurrent()}pop(r){let{gl:e}=this.renderer;r&&a6.push(r._scissorRectLocal),this.getStackLength()>0?this._useCurrent():e.disable(e.SCISSOR_TEST)}_useCurrent(){let r=this.maskStack[this.maskStack.length-1]._scissorRect,e;this.renderer.renderTexture.current?e=r.y:e=this.renderer.height-r.height-r.y,this.renderer.gl.scissor(r.x,e,r.width,r.height)}},Mu=ku;Mu.extension={type:$.RendererSystem,name:"scissor"};K.add(Mu);var Nn=class extends Pn{constructor(e){super(e),this.glConst=j.ADAPTER.getWebGLRenderingContext().STENCIL_TEST}getStackLength(){let e=this.maskStack[this.maskStack.length-1];return e?e._stencilCounter:0}push(e){let t=e.maskObject,{gl:i}=this.renderer,s=e._stencilCounter;s===0&&(this.renderer.framebuffer.forceStencil(),i.clearStencil(0),i.clear(i.STENCIL_BUFFER_BIT),i.enable(i.STENCIL_TEST)),e._stencilCounter++;let n=e._colorMask;n!==0&&(e._colorMask=0,i.colorMask(!1,!1,!1,!1)),i.stencilFunc(i.EQUAL,s,4294967295),i.stencilOp(i.KEEP,i.KEEP,i.INCR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,n!==0&&(e._colorMask=n,i.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)),this._useCurrent()}pop(e){let t=this.renderer.gl;if(this.getStackLength()===0)t.disable(t.STENCIL_TEST);else{let i=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,s=i?i._colorMask:15;s!==0&&(i._colorMask=0,t.colorMask(!1,!1,!1,!1)),t.stencilOp(t.KEEP,t.KEEP,t.DECR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,s!==0&&(i._colorMask=s,t.colorMask((s&1)!==0,(s&2)!==0,(s&4)!==0,(s&8)!==0)),this._useCurrent()}}_useCurrent(){let e=this.renderer.gl;e.stencilFunc(e.EQUAL,this.getStackLength(),4294967295),e.stencilOp(e.KEEP,e.KEEP,e.KEEP)}};Nn.extension={type:$.RendererSystem,name:"stencil"};K.add(Nn);var Bn=class{constructor(e){this.renderer=e,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return Pe("7.0.0","renderer.plugins.extract has moved to renderer.extract"),e.extract}},prepare:{enumerable:!1,get(){return Pe("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),e.prepare}},interaction:{enumerable:!1,get(){return Pe("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),e.events}}})}init(){let e=this.rendererPlugins;for(let t in e)this.plugins[t]=new e[t](this.renderer)}destroy(){for(let e in this.plugins)this.plugins[e].destroy(),this.plugins[e]=null}};Bn.extension={type:[$.RendererSystem,$.CanvasRendererSystem],name:"_plugin"};K.add(Bn);var Rn=class{constructor(e){this.renderer=e,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new Re,this.transform=null}update(e,t,i,s){this.destinationFrame=e||this.destinationFrame||this.defaultFrame,this.sourceFrame=t||this.sourceFrame||e,this.calculateProjection(this.destinationFrame,this.sourceFrame,i,s),this.transform&&this.projectionMatrix.append(this.transform);let n=this.renderer;n.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,n.globalUniforms.update(),n.shader.shader&&n.shader.syncUniformGroup(n.shader.shader.uniforms.globals)}calculateProjection(e,t,i,s){let n=this.projectionMatrix,o=s?-1:1;n.identity(),n.a=1/t.width*2,n.d=o*(1/t.height*2),n.tx=-1-t.x*n.a,n.ty=-o-t.y*n.d}setTransform(e){}destroy(){this.renderer=null}};Rn.extension={type:$.RendererSystem,name:"projection"};K.add(Rn);var Of=new Ts,Ln=class{constructor(e){this.renderer=e,this._tempMatrix=new Re}generateTexture(e,t){let{region:i,...s}=t||{},n=i||e.getLocalBounds(null,!0);n.width===0&&(n.width=1),n.height===0&&(n.height=1);let o=Qt.create({width:n.width,height:n.height,...s});this._tempMatrix.tx=-n.x,this._tempMatrix.ty=-n.y;let a=e.transform;return e.transform=Of,this.renderer.render(e,{renderTexture:o,transform:this._tempMatrix,skipUpdateTransform:!!e.parent,blit:!0}),e.transform=a,o}destroy(){}};Ln.extension={type:[$.RendererSystem,$.CanvasRendererSystem],name:"textureGenerator"};K.add(Ln);var Is=new we,fa=new we,On=class{constructor(e){this.renderer=e,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new we,this.destinationFrame=new we,this.viewportFrame=new we}contextChange(){let e=this.renderer?.gl.getContextAttributes();this._rendererPremultipliedAlpha=!!(e&&e.alpha&&e.premultipliedAlpha)}bind(e=null,t,i){let s=this.renderer;this.current=e;let n,o,a;e?(n=e.baseTexture,a=n.resolution,t||(Is.width=e.frame.width,Is.height=e.frame.height,t=Is),i||(fa.x=e.frame.x,fa.y=e.frame.y,fa.width=t.width,fa.height=t.height,i=fa),o=n.framebuffer):(a=s.resolution,t||(Is.width=s._view.screen.width,Is.height=s._view.screen.height,t=Is),i||(i=Is,i.width=t.width,i.height=t.height));let l=this.viewportFrame;l.x=i.x*a,l.y=i.y*a,l.width=i.width*a,l.height=i.height*a,e||(l.y=s.view.height-(l.y+l.height)),l.ceil(),this.renderer.framebuffer.bind(o,l),this.renderer.projection.update(i,t,a,!o),e?this.renderer.mask.setMaskStack(n.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(t),this.destinationFrame.copyFrom(i)}clear(e,t){let i=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,s=Se.shared.setValue(e||i);(this.current&&this.current.baseTexture.alphaMode>0||!this.current&&this._rendererPremultipliedAlpha)&&s.premultiply(s.alpha);let n=this.destinationFrame,o=this.current?this.current.baseTexture:this.renderer._view.screen,a=n.width!==o.width||n.height!==o.height;if(a){let{x:l,y:u,width:h,height:d}=this.viewportFrame;l=Math.round(l),u=Math.round(u),h=Math.round(h),d=Math.round(d),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(l,u,h,d)}this.renderer.framebuffer.clear(s.red,s.green,s.blue,s.alpha,t),a&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}};On.extension={type:$.RendererSystem,name:"renderTexture"};K.add(On);var ga=class{constructor(e,t){this.program=e,this.uniformData=t,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null}};function l6(r,e){let t={},i=e.getProgramParameter(r,e.ACTIVE_ATTRIBUTES);for(let s=0;s<i;s++){let n=e.getActiveAttrib(r,s);if(n.name.startsWith("gl_"))continue;let o=na(e,n.type),a={type:o,name:n.name,size:sa(o),location:e.getAttribLocation(r,n.name)};t[n.name]=a}return t}function u6(r,e){let t={},i=e.getProgramParameter(r,e.ACTIVE_UNIFORMS);for(let s=0;s<i;s++){let n=e.getActiveUniform(r,s),o=n.name.replace(/\[.*?\]$/,""),a=!!n.name.match(/\[.*?\]$/),l=na(e,n.type);t[o]={name:o,index:s,type:l,size:n.size,isArray:a,value:ia(l,n.size)}}return t}function J1(r,e){let t=Du(r,r.VERTEX_SHADER,e.vertexSrc),i=Du(r,r.FRAGMENT_SHADER,e.fragmentSrc),s=r.createProgram();r.attachShader(s,t),r.attachShader(s,i);let n=e.extra?.transformFeedbackVaryings;if(n&&(typeof r.transformFeedbackVaryings!="function"?console.warn("TransformFeedback is not supported but TransformFeedbackVaryings are given."):r.transformFeedbackVaryings(s,n.names,n.bufferMode==="separate"?r.SEPARATE_ATTRIBS:r.INTERLEAVED_ATTRIBS)),r.linkProgram(s),r.getProgramParameter(s,r.LINK_STATUS)||K1(r,s,t,i),e.attributeData=l6(s,r),e.uniformData=u6(s,r),!/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(e.vertexSrc)){let l=Object.keys(e.attributeData);l.sort((u,h)=>u>h?1:-1);for(let u=0;u<l.length;u++)e.attributeData[l[u]].location=u,r.bindAttribLocation(s,u,l[u]);r.linkProgram(s)}r.deleteShader(t),r.deleteShader(i);let o={};for(let l in e.uniformData){let u=e.uniformData[l];o[l]={location:r.getUniformLocation(s,l),value:ia(u.type,u.size)}}return new ga(s,o)}function Gf(r,e,t,i,s){t.buffer.update(s)}var Uf={float:`
data[offset] = v;
`,vec2:`
data[offset] = v[0];
data[offset+1] = v[1];
`,vec3:`
data[offset] = v[0];
data[offset+1] = v[1];
data[offset+2] = v[2];
`,vec4:`
data[offset] = v[0];
data[offset+1] = v[1];
data[offset+2] = v[2];
data[offset+3] = v[3];
`,mat2:`
data[offset] = v[0];
data[offset+1] = v[1];
data[offset+4] = v[2];
data[offset+5] = v[3];
`,mat3:`
data[offset] = v[0];
data[offset+1] = v[1];
data[offset+2] = v[2];
data[offset + 4] = v[3];
data[offset + 5] = v[4];
data[offset + 6] = v[5];
data[offset + 8] = v[6];
data[offset + 9] = v[7];
data[offset + 10] = v[8];
`,mat4:`
for(var i = 0; i < 16; i++)
{
data[offset + i] = v[i];
}
`},h6={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:16*2,mat3:16*3,mat4:16*4};function c6(r){let e=r.map(n=>({data:n,offset:0,dataLen:0,dirty:0})),t=0,i=0,s=0;for(let n=0;n<e.length;n++){let o=e[n];if(t=h6[o.data.type],o.data.size>1&&(t=Math.max(t,16)*o.data.size),o.dataLen=t,i%t!==0&&i<16){let a=i%t%16;i+=a,s+=a}i+t>16?(s=Math.ceil(s/16)*16,o.offset=s,s+=t,i=t):(o.offset=s,i+=t,s+=t)}return s=Math.ceil(s/16)*16,{uboElements:e,size:s}}function d6(r,e){let t=[];for(let i in r)e[i]&&t.push(e[i]);return t.sort((i,s)=>i.index-s.index),t}function e9(r,e){if(!r.autoManage)return{size:0,syncFunc:Gf};let t=d6(r.uniforms,e),{uboElements:i,size:s}=c6(t),n=[`
var v = null;
var v2 = null;
var cv = null;
var t = 0;
var gl = renderer.gl
var index = 0;
var data = buffer.data;
`];for(let o=0;o<i.length;o++){let a=i[o],l=r.uniforms[a.data.name],u=a.data.name,h=!1;for(let d=0;d<Fr.length;d++){let p=Fr[d];if(p.codeUbo&&p.test(a.data,l)){n.push(`offset = ${a.offset/4};`,Fr[d].codeUbo(a.data.name,l)),h=!0;break}}if(!h)if(a.data.size>1){let d=sa(a.data.type),p=Math.max(h6[a.data.type]/16,1),m=d/p,x=(4-m%4)%4;n.push(`
cv = ud.${u}.value;
v = uv.${u};
offset = ${a.offset/4};
t = 0;
for(var i=0; i < ${a.data.size*p}; i++)
{
for(var j = 0; j < ${m}; j++)
{
data[offset++] = v[t++];
}
offset += ${x};
}
`)}else{let d=Uf[a.data.type];n.push(`
cv = ud.${u}.value;
v = uv.${u};
offset = ${a.offset/4};
${d};
`)}}return n.push(`
renderer.buffer.update(buffer);
`),{size:s,syncFunc:new Function("ud","uv","renderer","syncData","buffer",n.join(`
`))}}var Vf=0,Pu={textureCount:0,uboCount:0},Gn=class{constructor(e){this.destroyed=!1,this.renderer=e,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=Vf++}systemCheck(){if(!Cu())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(e){this.gl=e,this.reset()}bind(e,t){e.disposeRunner.add(this),e.uniforms.globals=this.renderer.globalUniforms;let i=e.program,s=i.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(e);return this.shader=e,this.program!==i&&(this.program=i,this.gl.useProgram(s.program)),t||(Pu.textureCount=0,Pu.uboCount=0,this.syncUniformGroup(e.uniformGroup,Pu)),s}setUniforms(e){let t=this.shader.program,i=t.glPrograms[this.renderer.CONTEXT_UID];t.syncUniforms(i.uniformData,e,this.renderer)}syncUniformGroup(e,t){let i=this.getGlProgram();(!e.static||e.dirtyId!==i.uniformDirtyGroups[e.id])&&(i.uniformDirtyGroups[e.id]=e.dirtyId,this.syncUniforms(e,i,t))}syncUniforms(e,t,i){(e.syncUniforms[this.shader.program.id]||this.createSyncGroups(e))(t.uniformData,e.uniforms,this.renderer,i)}createSyncGroups(e){let t=this.getSignature(e,this.shader.program.uniformData,"u");return this.cache[t]||(this.cache[t]=X1(e,this.shader.program.uniformData)),e.syncUniforms[this.shader.program.id]=this.cache[t],e.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(e,t){let i=this.getGlProgram();if(!e.static||e.dirtyId!==0||!i.uniformGroups[e.id]){e.dirtyId=0;let s=i.uniformGroups[e.id]||this.createSyncBufferGroup(e,i,t);e.buffer.update(),s(i.uniformData,e.uniforms,this.renderer,Pu,e.buffer)}this.renderer.buffer.bindBufferBase(e.buffer,i.uniformBufferBindings[t])}createSyncBufferGroup(e,t,i){let{gl:s}=this.renderer;this.renderer.buffer.bind(e.buffer);let n=this.gl.getUniformBlockIndex(t.program,i);t.uniformBufferBindings[i]=this.shader.uniformBindCount,s.uniformBlockBinding(t.program,n,this.shader.uniformBindCount),this.shader.uniformBindCount++;let o=this.getSignature(e,this.shader.program.uniformData,"ubo"),a=this._uboCache[o];if(a||(a=this._uboCache[o]=e9(e,this.shader.program.uniformData)),e.autoManage){let l=new Float32Array(a.size/4);e.buffer.update(l)}return t.uniformGroups[e.id]=a.syncFunc,t.uniformGroups[e.id]}getSignature(e,t,i){let s=e.uniforms,n=[`${i}-`];for(let o in s)n.push(o),t[o]&&n.push(t[o].type);return n.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(e){let t=this.gl,i=e.program,s=J1(t,i);return i.glPrograms[this.renderer.CONTEXT_UID]=s,s}reset(){this.program=null,this.shader=null}disposeShader(e){this.shader===e&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}};Gn.extension={type:$.RendererSystem,name:"shader"};K.add(Gn);var ci=class{constructor(e){this.renderer=e}run(e){let{renderer:t}=this;t.runners.init.emit(t.options),e.hello&&console.log(`PixiJS 7.2.4 - ${t.rendererLogId} - https://pixijs.com`),t.resize(t.screen.width,t.screen.height)}destroy(){}};ci.defaultOptions={hello:!1};ci.extension={type:[$.RendererSystem,$.CanvasRendererSystem],name:"startup"};K.add(ci);function p6(r,e=[]){return e[be.NORMAL]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[be.ADD]=[r.ONE,r.ONE],e[be.MULTIPLY]=[r.DST_COLOR,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA],e[be.SCREEN]=[r.ONE,r.ONE_MINUS_SRC_COLOR,r.ONE,r.ONE_MINUS_SRC_ALPHA],e[be.OVERLAY]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[be.DARKEN]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[be.LIGHTEN]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[be.COLOR_DODGE]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[be.COLOR_BURN]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[be.HARD_LIGHT]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[be.SOFT_LIGHT]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[be.DIFFERENCE]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[be.EXCLUSION]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[be.HUE]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[be.SATURATION]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[be.COLOR]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[be.LUMINOSITY]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[be.NONE]=[0,0],e[be.NORMAL_NPM]=[r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA],e[be.ADD_NPM]=[r.SRC_ALPHA,r.ONE,r.ONE,r.ONE],e[be.SCREEN_NPM]=[r.SRC_ALPHA,r.ONE_MINUS_SRC_COLOR,r.ONE,r.ONE_MINUS_SRC_ALPHA],e[be.SRC_IN]=[r.DST_ALPHA,r.ZERO],e[be.SRC_OUT]=[r.ONE_MINUS_DST_ALPHA,r.ZERO],e[be.SRC_ATOP]=[r.DST_ALPHA,r.ONE_MINUS_SRC_ALPHA],e[be.DST_OVER]=[r.ONE_MINUS_DST_ALPHA,r.ONE],e[be.DST_IN]=[r.ZERO,r.SRC_ALPHA],e[be.DST_OUT]=[r.ZERO,r.ONE_MINUS_SRC_ALPHA],e[be.DST_ATOP]=[r.ONE_MINUS_DST_ALPHA,r.SRC_ALPHA],e[be.XOR]=[r.ONE_MINUS_DST_ALPHA,r.ONE_MINUS_SRC_ALPHA],e[be.SUBTRACT]=[r.ONE,r.ONE,r.ONE,r.ONE,r.FUNC_REVERSE_SUBTRACT,r.FUNC_ADD],e}var zf=0,Wf=1,Hf=2,jf=3,$f=4,Yf=5,t9=class{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=be.NONE,this._blendEq=!1,this.map=[],this.map[zf]=this.setBlend,this.map[Wf]=this.setOffset,this.map[Hf]=this.setCullFace,this.map[jf]=this.setDepthTest,this.map[$f]=this.setFrontFace,this.map[Yf]=this.setDepthMask,this.checks=[],this.defaultState=new X0,this.defaultState.blend=!0}contextChange(r){this.gl=r,this.blendModes=p6(r),this.set(this.defaultState),this.reset()}set(r){if(r=r||this.defaultState,this.stateId!==r.data){let e=this.stateId^r.data,t=0;for(;e;)e&1&&this.map[t].call(this,!!(r.data&1<<t)),e=e>>1,t++;this.stateId=r.data}for(let e=0;e<this.checks.length;e++)this.checks[e](this,r)}forceState(r){r=r||this.defaultState;for(let e=0;e<this.map.length;e++)this.map[e].call(this,!!(r.data&1<<e));for(let e=0;e<this.checks.length;e++)this.checks[e](this,r);this.stateId=r.data}setBlend(r){this.updateCheck(t9.checkBlendMode,r),this.gl[r?"enable":"disable"](this.gl.BLEND)}setOffset(r){this.updateCheck(t9.checkPolygonOffset,r),this.gl[r?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)}setDepthTest(r){this.gl[r?"enable":"disable"](this.gl.DEPTH_TEST)}setDepthMask(r){this.gl.depthMask(r)}setCullFace(r){this.gl[r?"enable":"disable"](this.gl.CULL_FACE)}setFrontFace(r){this.gl.frontFace(this.gl[r?"CW":"CCW"])}setBlendMode(r){if(r===this.blendMode)return;this.blendMode=r;let e=this.blendModes[r],t=this.gl;e.length===2?t.blendFunc(e[0],e[1]):t.blendFuncSeparate(e[0],e[1],e[2],e[3]),e.length===6?(this._blendEq=!0,t.blendEquationSeparate(e[4],e[5])):this._blendEq&&(this._blendEq=!1,t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD))}setPolygonOffset(r,e){this.gl.polygonOffset(r,e)}reset(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(this.defaultState),this._blendEq=!0,this.blendMode=-1,this.setBlendMode(0)}updateCheck(r,e){let t=this.checks.indexOf(r);e&&t===-1?this.checks.push(r):!e&&t!==-1&&this.checks.splice(t,1)}static checkBlendMode(r,e){r.setBlendMode(e.blendMode)}static checkPolygonOffset(r,e){r.setPolygonOffset(1,e.polygonOffset)}destroy(){this.gl=null}},Nu=t9;Nu.extension={type:$.RendererSystem,name:"state"};K.add(Nu);var Un=class extends zi.default{constructor(){super(...arguments),this.runners={},this._systemsHash={}}setup(e){this.addRunners(...e.runners);let t=(e.priority??[]).filter(s=>e.systems[s]),i=[...t,...Object.keys(e.systems).filter(s=>!t.includes(s))];for(let s of i)this.addSystem(e.systems[s],s)}addRunners(...e){e.forEach(t=>{this.runners[t]=new b0(t)})}addSystem(e,t){let i=new e(this);if(this[t])throw new Error(`Whoops! The name "${t}" is already in use`);this[t]=i,this._systemsHash[t]=i;for(let s in this.runners)this.runners[s].add(i);return this}emitWithCustomOptions(e,t){let i=Object.keys(this._systemsHash);e.items.forEach(s=>{let n=i.find(o=>this._systemsHash[o]===s);s[e.name](t[n])})}destroy(){Object.values(this.runners).forEach(e=>{e.destroy()}),this._systemsHash={}}};var Bu=class{constructor(r){this.renderer=r,this.count=0,this.checkCount=0,this.maxIdle=Bu.defaultMaxIdle,this.checkCountMax=Bu.defaultCheckCountMax,this.mode=Bu.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==tu.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){let r=this.renderer.texture,e=r.managedTextures,t=!1;for(let i=0;i<e.length;i++){let s=e[i];!s.framebuffer&&this.count-s.touched>this.maxIdle&&(r.destroyTexture(s,!0),e[i]=null,t=!0)}if(t){let i=0;for(let s=0;s<e.length;s++)e[s]!==null&&(e[i++]=e[s]);e.length=i}}unload(r){let e=this.renderer.texture,t=r._texture;t&&!t.framebuffer&&e.destroyTexture(t);for(let i=r.children.length-1;i>=0;i--)this.unload(r.children[i])}destroy(){this.renderer=null}},St=Bu;St.defaultMode=tu.AUTO;St.defaultMaxIdle=60*60;St.defaultCheckCountMax=60*10;St.extension={type:$.RendererSystem,name:"textureGC"};K.add(St);var ks=class{constructor(e){this.texture=e,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=me.UNSIGNED_BYTE,this.internalFormat=se.RGBA,this.samplerType=0}};function f6(r){let e;return"WebGL2RenderingContext"in globalThis&&r instanceof globalThis.WebGL2RenderingContext?e={[me.UNSIGNED_BYTE]:{[se.RGBA]:r.RGBA8,[se.RGB]:r.RGB8,[se.RG]:r.RG8,[se.RED]:r.R8,[se.RGBA_INTEGER]:r.RGBA8UI,[se.RGB_INTEGER]:r.RGB8UI,[se.RG_INTEGER]:r.RG8UI,[se.RED_INTEGER]:r.R8UI,[se.ALPHA]:r.ALPHA,[se.LUMINANCE]:r.LUMINANCE,[se.LUMINANCE_ALPHA]:r.LUMINANCE_ALPHA},[me.BYTE]:{[se.RGBA]:r.RGBA8_SNORM,[se.RGB]:r.RGB8_SNORM,[se.RG]:r.RG8_SNORM,[se.RED]:r.R8_SNORM,[se.RGBA_INTEGER]:r.RGBA8I,[se.RGB_INTEGER]:r.RGB8I,[se.RG_INTEGER]:r.RG8I,[se.RED_INTEGER]:r.R8I},[me.UNSIGNED_SHORT]:{[se.RGBA_INTEGER]:r.RGBA16UI,[se.RGB_INTEGER]:r.RGB16UI,[se.RG_INTEGER]:r.RG16UI,[se.RED_INTEGER]:r.R16UI,[se.DEPTH_COMPONENT]:r.DEPTH_COMPONENT16},[me.SHORT]:{[se.RGBA_INTEGER]:r.RGBA16I,[se.RGB_INTEGER]:r.RGB16I,[se.RG_INTEGER]:r.RG16I,[se.RED_INTEGER]:r.R16I},[me.UNSIGNED_INT]:{[se.RGBA_INTEGER]:r.RGBA32UI,[se.RGB_INTEGER]:r.RGB32UI,[se.RG_INTEGER]:r.RG32UI,[se.RED_INTEGER]:r.R32UI,[se.DEPTH_COMPONENT]:r.DEPTH_COMPONENT24},[me.INT]:{[se.RGBA_INTEGER]:r.RGBA32I,[se.RGB_INTEGER]:r.RGB32I,[se.RG_INTEGER]:r.RG32I,[se.RED_INTEGER]:r.R32I},[me.FLOAT]:{[se.RGBA]:r.RGBA32F,[se.RGB]:r.RGB32F,[se.RG]:r.RG32F,[se.RED]:r.R32F,[se.DEPTH_COMPONENT]:r.DEPTH_COMPONENT32F},[me.HALF_FLOAT]:{[se.RGBA]:r.RGBA16F,[se.RGB]:r.RGB16F,[se.RG]:r.RG16F,[se.RED]:r.R16F},[me.UNSIGNED_SHORT_5_6_5]:{[se.RGB]:r.RGB565},[me.UNSIGNED_SHORT_4_4_4_4]:{[se.RGBA]:r.RGBA4},[me.UNSIGNED_SHORT_5_5_5_1]:{[se.RGBA]:r.RGB5_A1},[me.UNSIGNED_INT_2_10_10_10_REV]:{[se.RGBA]:r.RGB10_A2,[se.RGBA_INTEGER]:r.RGB10_A2UI},[me.UNSIGNED_INT_10F_11F_11F_REV]:{[se.RGB]:r.R11F_G11F_B10F},[me.UNSIGNED_INT_5_9_9_9_REV]:{[se.RGB]:r.RGB9_E5},[me.UNSIGNED_INT_24_8]:{[se.DEPTH_STENCIL]:r.DEPTH24_STENCIL8},[me.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[se.DEPTH_STENCIL]:r.DEPTH32F_STENCIL8}}:e={[me.UNSIGNED_BYTE]:{[se.RGBA]:r.RGBA,[se.RGB]:r.RGB,[se.ALPHA]:r.ALPHA,[se.LUMINANCE]:r.LUMINANCE,[se.LUMINANCE_ALPHA]:r.LUMINANCE_ALPHA},[me.UNSIGNED_SHORT_5_6_5]:{[se.RGB]:r.RGB},[me.UNSIGNED_SHORT_4_4_4_4]:{[se.RGBA]:r.RGBA},[me.UNSIGNED_SHORT_5_5_5_1]:{[se.RGBA]:r.RGBA}},e}var Vn=class{constructor(e){this.renderer=e,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new ye,this.hasIntegerTextures=!1}contextChange(){let e=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=f6(e);let t=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=t;for(let s=0;s<t;s++)this.boundTextures[s]=null;this.emptyTextures={};let i=new ks(e.createTexture());e.bindTexture(e.TEXTURE_2D,i.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array(4)),this.emptyTextures[e.TEXTURE_2D]=i,this.emptyTextures[e.TEXTURE_CUBE_MAP]=new ks(e.createTexture()),e.bindTexture(e.TEXTURE_CUBE_MAP,this.emptyTextures[e.TEXTURE_CUBE_MAP].texture);for(let s=0;s<6;s++)e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+s,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,null);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MIN_FILTER,e.LINEAR);for(let s=0;s<this.boundTextures.length;s++)this.bind(null,s)}bind(e,t=0){let{gl:i}=this;if(e=e?.castToBaseTexture(),e?.valid&&!e.parentTextureArray){e.touched=this.renderer.textureGC.count;let s=e._glTextures[this.CONTEXT_UID]||this.initTexture(e);this.boundTextures[t]!==e&&(this.currentLocation!==t&&(this.currentLocation=t,i.activeTexture(i.TEXTURE0+t)),i.bindTexture(e.target,s.texture)),s.dirtyId!==e.dirtyId?(this.currentLocation!==t&&(this.currentLocation=t,i.activeTexture(i.TEXTURE0+t)),this.updateTexture(e)):s.dirtyStyleId!==e.dirtyStyleId&&this.updateTextureStyle(e),this.boundTextures[t]=e}else this.currentLocation!==t&&(this.currentLocation=t,i.activeTexture(i.TEXTURE0+t)),i.bindTexture(i.TEXTURE_2D,this.emptyTextures[i.TEXTURE_2D].texture),this.boundTextures[t]=null}reset(){this._unknownBoundTextures=!0,this.hasIntegerTextures=!1,this.currentLocation=-1;for(let e=0;e<this.boundTextures.length;e++)this.boundTextures[e]=this.unknownTexture}unbind(e){let{gl:t,boundTextures:i}=this;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(let s=0;s<i.length;s++)i[s]===this.unknownTexture&&this.bind(null,s)}for(let s=0;s<i.length;s++)i[s]===e&&(this.currentLocation!==s&&(t.activeTexture(t.TEXTURE0+s),this.currentLocation=s),t.bindTexture(e.target,this.emptyTextures[e.target].texture),i[s]=null)}ensureSamplerType(e){let{boundTextures:t,hasIntegerTextures:i,CONTEXT_UID:s}=this;if(i)for(let n=e-1;n>=0;--n){let o=t[n];o&&o._glTextures[s].samplerType!==eu.FLOAT&&this.renderer.texture.unbind(o)}}initTexture(e){let t=new ks(this.gl.createTexture());return t.dirtyId=-1,e._glTextures[this.CONTEXT_UID]=t,this.managedTextures.push(e),e.on("dispose",this.destroyTexture,this),t}initTextureType(e,t){t.internalFormat=this.internalFormats[e.type]?.[e.format]??e.format,this.webGLVersion===2&&e.type===me.HALF_FLOAT?t.type=this.gl.HALF_FLOAT:t.type=e.type}updateTexture(e){let t=e._glTextures[this.CONTEXT_UID];if(!t)return;let i=this.renderer;if(this.initTextureType(e,t),e.resource?.upload(i,e,t))t.samplerType!==eu.FLOAT&&(this.hasIntegerTextures=!0);else{let s=e.realWidth,n=e.realHeight,o=i.gl;(t.width!==s||t.height!==n||t.dirtyId<0)&&(t.width=s,t.height=n,o.texImage2D(e.target,0,t.internalFormat,s,n,0,e.format,t.type,null))}e.dirtyStyleId!==t.dirtyStyleId&&this.updateTextureStyle(e),t.dirtyId=e.dirtyId}destroyTexture(e,t){let{gl:i}=this;if(e=e.castToBaseTexture(),e._glTextures[this.CONTEXT_UID]&&(this.unbind(e),i.deleteTexture(e._glTextures[this.CONTEXT_UID].texture),e.off("dispose",this.destroyTexture,this),delete e._glTextures[this.CONTEXT_UID],!t)){let s=this.managedTextures.indexOf(e);s!==-1&&du(this.managedTextures,s,1)}}updateTextureStyle(e){let t=e._glTextures[this.CONTEXT_UID];t&&((e.mipmap===Y0.POW2||this.webGLVersion!==2)&&!e.isPowerOfTwo?t.mipmap=!1:t.mipmap=e.mipmap>=1,this.webGLVersion!==2&&!e.isPowerOfTwo?t.wrapMode=Pt.CLAMP:t.wrapMode=e.wrapMode,e.resource?.style(this.renderer,e,t)||this.setStyle(e,t),t.dirtyStyleId=e.dirtyStyleId)}setStyle(e,t){let i=this.gl;if(t.mipmap&&e.mipmap!==Y0.ON_MANUAL&&i.generateMipmap(e.target),i.texParameteri(e.target,i.TEXTURE_WRAP_S,t.wrapMode),i.texParameteri(e.target,i.TEXTURE_WRAP_T,t.wrapMode),t.mipmap){i.texParameteri(e.target,i.TEXTURE_MIN_FILTER,e.scaleMode===Xt.LINEAR?i.LINEAR_MIPMAP_LINEAR:i.NEAREST_MIPMAP_NEAREST);let s=this.renderer.context.extensions.anisotropicFiltering;if(s&&e.anisotropicLevel>0&&e.scaleMode===Xt.LINEAR){let n=Math.min(e.anisotropicLevel,i.getParameter(s.MAX_TEXTURE_MAX_ANISOTROPY_EXT));i.texParameterf(e.target,s.TEXTURE_MAX_ANISOTROPY_EXT,n)}}else i.texParameteri(e.target,i.TEXTURE_MIN_FILTER,e.scaleMode===Xt.LINEAR?i.LINEAR:i.NEAREST);i.texParameteri(e.target,i.TEXTURE_MAG_FILTER,e.scaleMode===Xt.LINEAR?i.LINEAR:i.NEAREST)}destroy(){this.renderer=null}};Vn.extension={type:$.RendererSystem,name:"texture"};K.add(Vn);var zn=class{constructor(e){this.renderer=e}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){let{gl:t,CONTEXT_UID:i}=this,s=e._glTransformFeedbacks[i]||this.createGLTransformFeedback(e);t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,s)}unbind(){let{gl:e}=this;e.bindTransformFeedback(e.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(e,t){let{gl:i,renderer:s}=this;t&&s.shader.bind(t),i.beginTransformFeedback(e)}endTransformFeedback(){let{gl:e}=this;e.endTransformFeedback()}createGLTransformFeedback(e){let{gl:t,renderer:i,CONTEXT_UID:s}=this,n=t.createTransformFeedback();e._glTransformFeedbacks[s]=n,t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,n);for(let o=0;o<e.buffers.length;o++){let a=e.buffers[o];a&&(i.buffer.update(a),a._glBuffers[s].refCount++,t.bindBufferBase(t.TRANSFORM_FEEDBACK_BUFFER,o,a._glBuffers[s].buffer||null))}return t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,null),e.disposeRunner.add(this),n}disposeTransformFeedback(e,t){let i=e._glTransformFeedbacks[this.CONTEXT_UID],s=this.gl;e.disposeRunner.remove(this);let n=this.renderer.buffer;if(n)for(let o=0;o<e.buffers.length;o++){let a=e.buffers[o];if(!a)continue;let l=a._glBuffers[this.CONTEXT_UID];l&&(l.refCount--,l.refCount===0&&!t&&n.dispose(a,t))}i&&(t||s.deleteTransformFeedback(i),delete e._glTransformFeedbacks[this.CONTEXT_UID])}destroy(){this.renderer=null}};zn.extension={type:$.RendererSystem,name:"transformFeedback"};K.add(zn);var di=class{constructor(e){this.renderer=e}init(e){this.screen=new we(0,0,e.width,e.height),this.element=e.view||j.ADAPTER.createCanvas(),this.resolution=e.resolution||j.RESOLUTION,this.autoDensity=!!e.autoDensity}resizeView(e,t){this.element.width=Math.round(e*this.resolution),this.element.height=Math.round(t*this.resolution);let i=this.element.width/this.resolution,s=this.element.height/this.resolution;this.screen.width=i,this.screen.height=s,this.autoDensity&&(this.element.style.width=`${i}px`,this.element.style.height=`${s}px`),this.renderer.emit("resize",i,s),this.renderer.runners.resize.emit(this.screen.width,this.screen.height)}destroy(e){e&&this.element.parentNode?.removeChild(this.element),this.renderer=null,this.element=null,this.screen=null}};di.defaultOptions={width:800,height:600,resolution:j.RESOLUTION,autoDensity:!1};di.extension={type:[$.RendererSystem,$.CanvasRendererSystem],name:"_view"};K.add(di);j.PREFER_ENV=Mt.WEBGL2;j.STRICT_TEXTURE_CACHE=!1;j.RENDER_OPTIONS={...hi.defaultOptions,...ui.defaultOptions,...di.defaultOptions,...ci.defaultOptions};Object.defineProperties(j,{WRAP_MODE:{get(){return ye.defaultOptions.wrapMode},set(r){Pe("7.1.0","settings.WRAP_MODE is deprecated, use BaseTexture.defaultOptions.wrapMode"),ye.defaultOptions.wrapMode=r}},SCALE_MODE:{get(){return ye.defaultOptions.scaleMode},set(r){Pe("7.1.0","settings.SCALE_MODE is deprecated, use BaseTexture.defaultOptions.scaleMode"),ye.defaultOptions.scaleMode=r}},MIPMAP_TEXTURES:{get(){return ye.defaultOptions.mipmap},set(r){Pe("7.1.0","settings.MIPMAP_TEXTURES is deprecated, use BaseTexture.defaultOptions.mipmap"),ye.defaultOptions.mipmap=r}},ANISOTROPIC_LEVEL:{get(){return ye.defaultOptions.anisotropicLevel},set(r){Pe("7.1.0","settings.ANISOTROPIC_LEVEL is deprecated, use BaseTexture.defaultOptions.anisotropicLevel"),ye.defaultOptions.anisotropicLevel=r}},FILTER_RESOLUTION:{get(){return Pe("7.1.0","settings.FILTER_RESOLUTION is deprecated, use Filter.defaultResolution"),Ye.defaultResolution},set(r){Ye.defaultResolution=r}},FILTER_MULTISAMPLE:{get(){return Pe("7.1.0","settings.FILTER_MULTISAMPLE is deprecated, use Filter.defaultMultisample"),Ye.defaultMultisample},set(r){Ye.defaultMultisample=r}},SPRITE_MAX_TEXTURES:{get(){return Lt.defaultMaxTextures},set(r){Pe("7.1.0","settings.SPRITE_MAX_TEXTURES is deprecated, use BatchRenderer.defaultMaxTextures"),Lt.defaultMaxTextures=r}},SPRITE_BATCH_SIZE:{get(){return Lt.defaultBatchSize},set(r){Pe("7.1.0","settings.SPRITE_BATCH_SIZE is deprecated, use BatchRenderer.defaultBatchSize"),Lt.defaultBatchSize=r}},CAN_UPLOAD_SAME_BUFFER:{get(){return Lt.canUploadSameBuffer},set(r){Pe("7.1.0","settings.CAN_UPLOAD_SAME_BUFFER is deprecated, use BatchRenderer.canUploadSameBuffer"),Lt.canUploadSameBuffer=r}},GC_MODE:{get(){return St.defaultMode},set(r){Pe("7.1.0","settings.GC_MODE is deprecated, use TextureGCSystem.defaultMode"),St.defaultMode=r}},GC_MAX_IDLE:{get(){return St.defaultMaxIdle},set(r){Pe("7.1.0","settings.GC_MAX_IDLE is deprecated, use TextureGCSystem.defaultMaxIdle"),St.defaultMaxIdle=r}},GC_MAX_CHECK_COUNT:{get(){return St.defaultCheckCountMax},set(r){Pe("7.1.0","settings.GC_MAX_CHECK_COUNT is deprecated, use TextureGCSystem.defaultCheckCountMax"),St.defaultCheckCountMax=r}},PRECISION_VERTEX:{get(){return G0.defaultVertexPrecision},set(r){Pe("7.1.0","settings.PRECISION_VERTEX is deprecated, use Program.defaultVertexPrecision"),G0.defaultVertexPrecision=r}},PRECISION_FRAGMENT:{get(){return G0.defaultFragmentPrecision},set(r){Pe("7.1.0","settings.PRECISION_FRAGMENT is deprecated, use Program.defaultFragmentPrecision"),G0.defaultFragmentPrecision=r}}});var Ot=(r=>(r[r.INTERACTION=50]="INTERACTION",r[r.HIGH=25]="HIGH",r[r.NORMAL=0]="NORMAL",r[r.LOW=-25]="LOW",r[r.UTILITY=-50]="UTILITY",r))(Ot||{});var Wn=class{constructor(e,t=null,i=0,s=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=e,this.context=t,this.priority=i,this.once=s}match(e,t=null){return this.fn===e&&this.context===t}emit(e){this.fn&&(this.context?this.fn.call(this.context,e):this.fn(e));let t=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),t}connect(e){this.previous=e,e.next&&(e.next.previous=this),this.next=e.next,e.next=this}destroy(e=!1){this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);let t=this.next;return this.next=e?null:t,this.previous=null,t}};var Gt=class{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new Wn(null,null,1/0),this.deltaMS=1/Gt.targetFPMS,this.elapsedMS=1/Gt.targetFPMS,this._tick=r=>{this._requestId=null,this.started&&(this.update(r),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(r,e,t=Ot.NORMAL){return this._addListener(new Wn(r,e,t))}addOnce(r,e,t=Ot.NORMAL){return this._addListener(new Wn(r,e,t,!0))}_addListener(r){let e=this._head.next,t=this._head;if(!e)r.connect(t);else{for(;e;){if(r.priority>e.priority){r.connect(t);break}t=e,e=e.next}r.previous||r.connect(t)}return this._startIfPossible(),this}remove(r,e){let t=this._head.next;for(;t;)t.match(r,e)?t=t.destroy():t=t.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let r=0,e=this._head;for(;e=e.next;)r++;return r}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let r=this._head.next;for(;r;)r=r.destroy(!0);this._head.destroy(),this._head=null}}update(r=performance.now()){let e;if(r>this.lastTime){if(e=this.elapsedMS=r-this.lastTime,e>this._maxElapsedMS&&(e=this._maxElapsedMS),e*=this.speed,this._minElapsedMS){let s=r-this._lastFrame|0;if(s<this._minElapsedMS)return;this._lastFrame=r-s%this._minElapsedMS}this.deltaMS=e,this.deltaTime=this.deltaMS*Gt.targetFPMS;let t=this._head,i=t.next;for(;i;)i=i.emit(this.deltaTime);t.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=r}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(r){let e=Math.min(this.maxFPS,r),t=Math.min(Math.max(0,e)/1e3,Gt.targetFPMS);this._maxElapsedMS=1/t}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(r){if(r===0)this._minElapsedMS=0;else{let e=Math.max(this.minFPS,r);this._minElapsedMS=1/(e/1e3)}}static get shared(){if(!Gt._shared){let r=Gt._shared=new Gt;r.autoStart=!0,r._protected=!0}return Gt._shared}static get system(){if(!Gt._system){let r=Gt._system=new Gt;r.autoStart=!0,r._protected=!0}return Gt._system}},d0=Gt;d0.targetFPMS=.06;Object.defineProperties(j,{TARGET_FPMS:{get(){return d0.targetFPMS},set(r){Pe("7.1.0","settings.TARGET_FPMS is deprecated, use Ticker.targetFPMS"),d0.targetFPMS=r}}});var ma=class{static init(e){e=Object.assign({autoStart:!0,sharedTicker:!1},e),Object.defineProperty(this,"ticker",{set(t){this._ticker&&this._ticker.remove(this.render,this),this._ticker=t,t&&t.add(this.render,this,Ot.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?d0.shared:new d0,e.autoStart&&this.start()}static destroy(){if(this._ticker){let e=this._ticker;this.ticker=null,e.destroy()}}};ma.extension=$.Application;K.add(ma);var g6=[];K.handleByList($.Renderer,g6);function r9(r){for(let e of g6)if(e.test(r))return new e(r);throw new Error("Unable to auto-detect a suitable renderer.")}var m6=`attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
uniform mat3 projectionMatrix;
varying vec2 vTextureCoord;
void main(void)
{
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = aTextureCoord;
}`;var y6=`attribute vec2 aVertexPosition;
uniform mat3 projectionMatrix;
varying vec2 vTextureCoord;
uniform vec4 inputSize;
uniform vec4 outputFrame;
vec4 filterVertexPosition( void )
{
vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;
return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
}
vec2 filterTextureCoord( void )
{
return aVertexPosition * (outputFrame.zw * inputSize.zw);
}
void main(void)
{
gl_Position = filterVertexPosition();
vTextureCoord = filterTextureCoord();
}
`;var i9=m6,ya=y6;var xa=class{constructor(e){this.renderer=e}contextChange(e){let t;if(this.renderer.context.webGLVersion===1){let i=e.getParameter(e.FRAMEBUFFER_BINDING);e.bindFramebuffer(e.FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.FRAMEBUFFER,i)}else{let i=e.getParameter(e.DRAW_FRAMEBUFFER_BINDING);e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.DRAW_FRAMEBUFFER,i)}t>=qe.HIGH?this.multisample=qe.HIGH:t>=qe.MEDIUM?this.multisample=qe.MEDIUM:t>=qe.LOW?this.multisample=qe.LOW:this.multisample=qe.NONE}destroy(){}};xa.extension={type:$.RendererSystem,name:"_multisample"};K.add(xa);var Ru=class{constructor(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}};var va=class{constructor(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){let{gl:t,CONTEXT_UID:i}=this,s=e._glBuffers[i]||this.createGLBuffer(e);t.bindBuffer(e.type,s.buffer)}unbind(e){let{gl:t}=this;t.bindBuffer(e,null)}bindBufferBase(e,t){let{gl:i,CONTEXT_UID:s}=this;if(this.boundBufferBases[t]!==e){let n=e._glBuffers[s]||this.createGLBuffer(e);this.boundBufferBases[t]=e,i.bindBufferBase(i.UNIFORM_BUFFER,t,n.buffer)}}bindBufferRange(e,t,i){let{gl:s,CONTEXT_UID:n}=this;i=i||0;let o=e._glBuffers[n]||this.createGLBuffer(e);s.bindBufferRange(s.UNIFORM_BUFFER,t||0,o.buffer,i*256,256)}update(e){let{gl:t,CONTEXT_UID:i}=this,s=e._glBuffers[i]||this.createGLBuffer(e);if(e._updateID!==s.updateID)if(s.updateID=e._updateID,t.bindBuffer(e.type,s.buffer),s.byteLength>=e.data.byteLength)t.bufferSubData(e.type,0,e.data);else{let n=e.static?t.STATIC_DRAW:t.DYNAMIC_DRAW;s.byteLength=e.data.byteLength,t.bufferData(e.type,e.data,n)}}dispose(e,t){if(!this.managedBuffers[e.id])return;delete this.managedBuffers[e.id];let i=e._glBuffers[this.CONTEXT_UID],s=this.gl;e.disposeRunner.remove(this),i&&(t||s.deleteBuffer(i.buffer),delete e._glBuffers[this.CONTEXT_UID])}disposeAll(e){let t=Object.keys(this.managedBuffers);for(let i=0;i<t.length;i++)this.dispose(this.managedBuffers[t[i]],e)}createGLBuffer(e){let{CONTEXT_UID:t,gl:i}=this;return e._glBuffers[t]=new Ru(i.createBuffer()),this.managedBuffers[e.id]=e,e.disposeRunner.add(this),e._glBuffers[t]}};va.extension={type:$.RendererSystem,name:"buffer"};K.add(va);var Da=class{constructor(e){this.renderer=e}render(e,t){let i=this.renderer,s,n,o,a;if(t&&(s=t.renderTexture,n=t.clear,o=t.transform,a=t.skipUpdateTransform),this.renderingToScreen=!s,i.runners.prerender.emit(),i.emit("prerender"),i.projection.transform=o,!i.context.isLost){if(s||(this.lastObjectRendered=e),!a){let l=e.enableTempParent();e.updateTransform(),e.disableTempParent(l)}i.renderTexture.bind(s),i.batch.currentRenderer.start(),(n??i.background.clearBeforeRender)&&i.renderTexture.clear(),e.render(i),i.batch.currentRenderer.flush(),s&&(t.blit&&i.framebuffer.blit(),s.baseTexture.update()),i.runners.postrender.emit(),i.projection.transform=null,i.emit("postrender")}}destroy(){this.renderer=null,this.lastObjectRendered=null}};Da.extension={type:$.RendererSystem,name:"objectRenderer"};K.add(Da);var s9=class extends Un{constructor(r){super(),this.type=E1.WEBGL,r=Object.assign({},j.RENDER_OPTIONS,r),this.gl=null,this.CONTEXT_UID=0,this.globalUniforms=new pt({projectionMatrix:new Re},!0);let e={runners:["init","destroy","contextChange","resolutionChange","reset","update","postrender","prerender","resize"],systems:s9.__systems,priority:["_view","textureGenerator","background","_plugin","startup","context","state","texture","buffer","geometry","framebuffer","transformFeedback","mask","scissor","stencil","projection","textureGC","filter","renderTexture","batch","objectRenderer","_multisample"]};this.setup(e),"useContextAlpha"in r&&(Pe("7.0.0","options.useContextAlpha is deprecated, use options.premultipliedAlpha and options.backgroundAlpha instead"),r.premultipliedAlpha=r.useContextAlpha&&r.useContextAlpha!=="notMultiplied",r.backgroundAlpha=r.useContextAlpha===!1?1:r.backgroundAlpha),this._plugin.rendererPlugins=s9.__plugins,this.options=r,this.startup.run(this.options)}static test(r){return r?.forceCanvas?!1:uu()}render(r,e){this.objectRenderer.render(r,e)}resize(r,e){this._view.resizeView(r,e)}reset(){return this.runners.reset.emit(),this}clear(){this.renderTexture.bind(),this.renderTexture.clear()}destroy(r=!1){this.runners.destroy.items.reverse(),this.emitWithCustomOptions(this.runners.destroy,{_view:r}),super.destroy()}get plugins(){return this._plugin.plugins}get multisample(){return this._multisample.multisample}get width(){return this._view.element.width}get height(){return this._view.element.height}get resolution(){return this._view.resolution}set resolution(r){this._view.resolution=r,this.runners.resolutionChange.emit(r)}get autoDensity(){return this._view.autoDensity}get view(){return this._view.element}get screen(){return this._view.screen}get lastObjectRendered(){return this.objectRenderer.lastObjectRendered}get renderingToScreen(){return this.objectRenderer.renderingToScreen}get rendererLogId(){return`WebGL ${this.context.webGLVersion}`}get clearBeforeRender(){return Pe("7.0.0","renderer.clearBeforeRender has been deprecated, please use renderer.background.clearBeforeRender instead."),this.background.clearBeforeRender}get useContextAlpha(){return Pe("7.0.0","renderer.useContextAlpha has been deprecated, please use renderer.context.premultipliedAlpha instead."),this.context.useContextAlpha}get preserveDrawingBuffer(){return Pe("7.0.0","renderer.preserveDrawingBuffer has been deprecated, we cannot truly know this unless pixi created the context"),this.context.preserveDrawingBuffer}get backgroundColor(){return Pe("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color}set backgroundColor(r){Pe("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color=r}get backgroundAlpha(){return Pe("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha}set backgroundAlpha(r){Pe("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha=r}get powerPreference(){return Pe("7.0.0","renderer.powerPreference has been deprecated, we can only know this if pixi creates the context"),this.context.powerPreference}generateTexture(r,e){return this.textureGenerator.generateTexture(r,e)}},Ms=s9;Ms.extension={type:$.Renderer,priority:1};Ms.__plugins={};Ms.__systems={};K.handleByMap($.RendererPlugin,Ms.__plugins);K.handleByMap($.RendererSystem,Ms.__systems);K.add(Ms);var Ki=class extends Bt{constructor(e,t){let{width:i,height:s}=t||{};super(i,s),this.items=[],this.itemDirtyIds=[];for(let n=0;n<e;n++){let o=new ye;this.items.push(o),this.itemDirtyIds.push(-2)}this.length=e,this._load=null,this.baseTexture=null}initFromArray(e,t){for(let i=0;i<this.length;i++)e[i]&&(e[i].castToBaseTexture?this.addBaseTextureAt(e[i].castToBaseTexture(),i):e[i]instanceof Bt?this.addResourceAt(e[i],i):this.addResourceAt(bn(e[i],t),i))}dispose(){for(let e=0,t=this.length;e<t;e++)this.items[e].destroy();this.items=null,this.itemDirtyIds=null,this._load=null}addResourceAt(e,t){if(!this.items[t])throw new Error(`Index ${t} is out of bounds`);return e.valid&&!this.valid&&this.resize(e.width,e.height),this.items[t].setResource(e),this}bind(e){if(this.baseTexture!==null)throw new Error("Only one base texture per TextureArray is allowed");super.bind(e);for(let t=0;t<this.length;t++)this.items[t].parentTextureArray=e,this.items[t].on("update",e.update,e)}unbind(e){super.unbind(e);for(let t=0;t<this.length;t++)this.items[t].parentTextureArray=null,this.items[t].off("update",e.update,e)}load(){if(this._load)return this._load;let t=this.items.map(i=>i.resource).filter(i=>i).map(i=>i.load());return this._load=Promise.all(t).then(()=>{let{realWidth:i,realHeight:s}=this.items[0];return this.resize(i,s),Promise.resolve(this)}),this._load}};var Hn=class extends Ki{constructor(e,t){let{width:i,height:s}=t||{},n,o;Array.isArray(e)?(n=e,o=e.length):o=e,super(o,{width:i,height:s}),n&&this.initFromArray(n,t)}addBaseTextureAt(e,t){if(e.resource)this.addResourceAt(e.resource,t);else throw new Error("ArrayResource does not support RenderTexture");return this}bind(e){super.bind(e),e.target=ni.TEXTURE_2D_ARRAY}upload(e,t,i){let{length:s,itemDirtyIds:n,items:o}=this,{gl:a}=e;i.dirtyId<0&&a.texImage3D(a.TEXTURE_2D_ARRAY,0,i.internalFormat,this._width,this._height,s,0,t.format,i.type,null);for(let l=0;l<s;l++){let u=o[l];n[l]<u.dirtyId&&(n[l]=u.dirtyId,u.valid&&a.texSubImage3D(a.TEXTURE_2D_ARRAY,0,0,0,l,u.resource.width,u.resource.height,1,t.format,i.type,u.resource.source))}return!0}};var jn=class extends K0{constructor(e){super(e)}static test(e){let{OffscreenCanvas:t}=globalThis;return t&&e instanceof t?!0:globalThis.HTMLCanvasElement&&e instanceof HTMLCanvasElement}};var Ea=class extends Ki{constructor(r,e){let{width:t,height:i,autoLoad:s,linkBaseTexture:n}=e||{};if(r&&r.length!==Ea.SIDES)throw new Error(`Invalid length. Got ${r.length}, expected 6`);super(6,{width:t,height:i});for(let o=0;o<Ea.SIDES;o++)this.items[o].target=ni.TEXTURE_CUBE_MAP_POSITIVE_X+o;this.linkBaseTexture=n!==!1,r&&this.initFromArray(r,e),s!==!1&&this.load()}bind(r){super.bind(r),r.target=ni.TEXTURE_CUBE_MAP}addBaseTextureAt(r,e,t){if(t===void 0&&(t=this.linkBaseTexture),!this.items[e])throw new Error(`Index ${e} is out of bounds`);if(!this.linkBaseTexture||r.parentTextureArray||Object.keys(r._glTextures).length>0)if(r.resource)this.addResourceAt(r.resource,e);else throw new Error("CubeResource does not support copying of renderTexture.");else r.target=ni.TEXTURE_CUBE_MAP_POSITIVE_X+e,r.parentTextureArray=this.baseTexture,this.items[e]=r;return r.valid&&!this.valid&&this.resize(r.realWidth,r.realHeight),this.items[e]=r,this}upload(r,e,t){let i=this.itemDirtyIds;for(let s=0;s<Ea.SIDES;s++){let n=this.items[s];(i[s]<n.dirtyId||t.dirtyId<e.dirtyId)&&(n.valid&&n.resource?(n.resource.upload(r,n,t),i[s]=n.dirtyId):i[s]<-1&&(r.gl.texImage2D(n.target,0,t.internalFormat,e.realWidth,e.realHeight,0,e.format,t.type,null),i[s]=-1))}return!0}static test(r){return Array.isArray(r)&&r.length===Ea.SIDES}},ba=Ea;ba.SIDES=6;var $n=class r extends K0{constructor(e,t){t=t||{};let i,s;typeof e=="string"?(i=r.EMPTY,s=e):(i=e,s=null),super(i),this.url=s,this.crossOrigin=t.crossOrigin??!0,this.alphaMode=typeof t.alphaMode=="number"?t.alphaMode:null,this._load=null,t.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(async(e,t)=>{if(this.url===null){e(this);return}try{let i=await j.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;let s=await i.blob();if(this.destroyed)return;let n=await createImageBitmap(s,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===A0.UNPACK?"premultiply":"none"});if(this.destroyed)return;this.source=n,this.update(),e(this)}catch(i){if(this.destroyed)return;t(i),this.onError.emit(i)}}),this._load)}upload(e,t,i){return this.source instanceof ImageBitmap?(typeof this.alphaMode=="number"&&(t.alphaMode=this.alphaMode),super.upload(e,t,i)):(this.load(),!1)}dispose(){this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(e){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&(typeof e=="string"||e instanceof ImageBitmap)}static get EMPTY(){return r._EMPTY=r._EMPTY??j.ADAPTER.createCanvas(0,0),r._EMPTY}};var Lu=class extends K0{constructor(r,e){e=e||{},super(j.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=r,this.scale=e.scale||1,this._overrideWidth=e.width,this._overrideHeight=e.height,this._resolve=null,this._crossorigin=e.crossorigin,this._load=null,e.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(r=>{if(this._resolve=()=>{this.resize(this.source.width,this.source.height),r(this)},Lu.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}),this._load)}_loadSvg(){let r=new Image;K0.crossOrigin(r,this.svg,this._crossorigin),r.src=this.svg,r.onerror=e=>{this._resolve&&(r.onerror=null,this.onError.emit(e))},r.onload=()=>{if(!this._resolve)return;let e=r.width,t=r.height;if(!e||!t)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let i=e*this.scale,s=t*this.scale;(this._overrideWidth||this._overrideHeight)&&(i=this._overrideWidth||this._overrideHeight/t*e,s=this._overrideHeight||this._overrideWidth/e*t),i=Math.round(i),s=Math.round(s);let n=this.source;n.width=i,n.height=s,n._pixiId=`canvas_${Tr()}`,n.getContext("2d").drawImage(r,0,0,e,t,0,0,i,s),this._resolve(),this._resolve=null}}static getSize(r){let e=Lu.SVG_SIZE.exec(r),t={};return e&&(t[e[1]]=Math.round(parseFloat(e[3])),t[e[5]]=Math.round(parseFloat(e[7]))),t}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(r,e){return e==="svg"||typeof r=="string"&&r.startsWith("data:image/svg+xml")||typeof r=="string"&&Lu.SVG_XML.test(r)}},pi=Lu;pi.SVG_XML=/^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m;pi.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;var n9=class extends K0{constructor(r,e){if(e=e||{},!(r instanceof HTMLVideoElement)){let t=document.createElement("video");t.setAttribute("preload","auto"),t.setAttribute("webkit-playsinline",""),t.setAttribute("playsinline",""),typeof r=="string"&&(r=[r]);let i=r[0].src||r[0];K0.crossOrigin(t,i,e.crossorigin);for(let s=0;s<r.length;++s){let n=document.createElement("source"),{src:o,mime:a}=r[s];o=o||r[s];let l=o.split("?").shift().toLowerCase(),u=l.slice(l.lastIndexOf(".")+1);a=a||n9.MIME_TYPES[u]||`video/${u}`,n.src=o,n.type=a,t.appendChild(n)}r=t}super(r),this.noSubImage=!0,this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=e.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=e.autoPlay!==!1,this._load=null,this._resolve=null,this._onCanPlay=this._onCanPlay.bind(this),this._onError=this._onError.bind(this),e.autoLoad!==!1&&this.load()}update(r=0){if(!this.destroyed){let e=d0.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-e),(!this._updateFPS||this._msToNextUpdate<=0)&&(super.update(),this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0)}}load(){if(this._load)return this._load;let r=this.source;return(r.readyState===r.HAVE_ENOUGH_DATA||r.readyState===r.HAVE_FUTURE_DATA)&&r.width&&r.height&&(r.complete=!0),r.addEventListener("play",this._onPlayStart.bind(this)),r.addEventListener("pause",this._onPlayStop.bind(this)),this._isSourceReady()?this._onCanPlay():(r.addEventListener("canplay",this._onCanPlay),r.addEventListener("canplaythrough",this._onCanPlay),r.addEventListener("error",this._onError,!0)),this._load=new Promise(e=>{this.valid?e(this):(this._resolve=e,r.load())}),this._load}_onError(r){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(r)}_isSourcePlaying(){let r=this.source;return!r.paused&&!r.ended&&this._isSourceReady()}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(d0.shared.add(this.update,this),this._isConnectedToTicker=!0)}_onPlayStop(){this._isConnectedToTicker&&(d0.shared.remove(this.update,this),this._isConnectedToTicker=!1)}_onCanPlay(){let r=this.source;r.removeEventListener("canplay",this._onCanPlay),r.removeEventListener("canplaythrough",this._onCanPlay);let e=this.valid;this.resize(r.videoWidth,r.videoHeight),!e&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&r.play()}dispose(){this._isConnectedToTicker&&(d0.shared.remove(this.update,this),this._isConnectedToTicker=!1);let r=this.source;r&&(r.removeEventListener("error",this._onError,!0),r.pause(),r.src="",r.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(r){r!==this._autoUpdate&&(this._autoUpdate=r,!this._autoUpdate&&this._isConnectedToTicker?(d0.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(d0.shared.add(this.update,this),this._isConnectedToTicker=!0))}get updateFPS(){return this._updateFPS}set updateFPS(r){r!==this._updateFPS&&(this._updateFPS=r)}static test(r,e){return globalThis.HTMLVideoElement&&r instanceof HTMLVideoElement||n9.TYPES.includes(e)}},Yn=n9;Yn.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"];Yn.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};En.push($n,Xi,jn,Yn,pi,wt,ba,Hn);var Xf=`attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
uniform mat3 projectionMatrix;
varying vec2 vTextureCoord;
void main(void)
{
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = aTextureCoord;
}`,qf=`varying vec2 vTextureCoord;
uniform sampler2D uSampler;
uniform vec4 filterClamp;
uniform float uAlpha;
uniform vec2 uThickness;
uniform vec4 uColor;
uniform bool uKnockout;
const float DOUBLE_PI = 2. * 3.14159265358979323846264;
const float ANGLE_STEP = \${angleStep};
float outlineMaxAlphaAtPos(vec2 pos) {
if (uThickness.x == 0. || uThickness.y == 0.) {
return 0.;
}
vec4 displacedColor;
vec2 displacedPos;
float maxAlpha = 0.;
for (float angle = 0.; angle <= DOUBLE_PI; angle += ANGLE_STEP) {
displacedPos.x = vTextureCoord.x + uThickness.x * cos(angle);
displacedPos.y = vTextureCoord.y + uThickness.y * sin(angle);
displacedColor = texture2D(uSampler, clamp(displacedPos, filterClamp.xy, filterClamp.zw));
maxAlpha = max(maxAlpha, displacedColor.a);
}
return maxAlpha;
}
void main(void) {
vec4 sourceColor = texture2D(uSampler, vTextureCoord);
vec4 contentColor = sourceColor * float(!uKnockout);
float outlineAlpha = uAlpha * outlineMaxAlphaAtPos(vTextureCoord.xy) * (1.-sourceColor.a);
vec4 outlineColor = vec4(vec3(uColor) * outlineAlpha, outlineAlpha);
gl_FragColor = contentColor + outlineColor;
}
`,Ou=class extends Ye{constructor(r=1,e=0,t=.1,i=1,s=!1){super(Xf,qf.replace(/\$\{angleStep\}/,Ou.getAngleStep(t))),this._thickness=1,this._alpha=1,this._knockout=!1,this.uniforms.uThickness=new Float32Array([0,0]),this.uniforms.uColor=new Float32Array([0,0,0,1]),this.uniforms.uAlpha=i,this.uniforms.uKnockout=s,Object.assign(this,{thickness:r,color:e,quality:t,alpha:i,knockout:s})}static getAngleStep(r){let e=Math.max(r*Ou.MAX_SAMPLES,Ou.MIN_SAMPLES);return(Math.PI*2/e).toFixed(7)}apply(r,e,t,i){this.uniforms.uThickness[0]=this._thickness/e._frame.width,this.uniforms.uThickness[1]=this._thickness/e._frame.height,this.uniforms.uAlpha=this._alpha,this.uniforms.uKnockout=this._knockout,r.applyFilter(this,e,t,i)}get alpha(){return this._alpha}set alpha(r){this._alpha=r}get color(){return ie.rgb2hex(this.uniforms.uColor)}set color(r){ie.hex2rgb(r,this.uniforms.uColor)}get knockout(){return this._knockout}set knockout(r){this._knockout=r}get thickness(){return this._thickness}set thickness(r){this._thickness=r,this.padding=r}},Gu=Ou;Gu.MIN_SAMPLES=1,Gu.MAX_SAMPLES=100;var Ar=class{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}clear(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}getRectangle(e){return this.minX>this.maxX||this.minY>this.maxY?we.EMPTY:(e=e||new we(0,0,1,1),e.x=this.minX,e.y=this.minY,e.width=this.maxX-this.minX,e.height=this.maxY-this.minY,e)}addPoint(e){this.minX=Math.min(this.minX,e.x),this.maxX=Math.max(this.maxX,e.x),this.minY=Math.min(this.minY,e.y),this.maxY=Math.max(this.maxY,e.y)}addPointMatrix(e,t){let{a:i,b:s,c:n,d:o,tx:a,ty:l}=e,u=i*t.x+n*t.y+a,h=s*t.x+o*t.y+l;this.minX=Math.min(this.minX,u),this.maxX=Math.max(this.maxX,u),this.minY=Math.min(this.minY,h),this.maxY=Math.max(this.maxY,h)}addQuad(e){let t=this.minX,i=this.minY,s=this.maxX,n=this.maxY,o=e[0],a=e[1];t=o<t?o:t,i=a<i?a:i,s=o>s?o:s,n=a>n?a:n,o=e[2],a=e[3],t=o<t?o:t,i=a<i?a:i,s=o>s?o:s,n=a>n?a:n,o=e[4],a=e[5],t=o<t?o:t,i=a<i?a:i,s=o>s?o:s,n=a>n?a:n,o=e[6],a=e[7],t=o<t?o:t,i=a<i?a:i,s=o>s?o:s,n=a>n?a:n,this.minX=t,this.minY=i,this.maxX=s,this.maxY=n}addFrame(e,t,i,s,n){this.addFrameMatrix(e.worldTransform,t,i,s,n)}addFrameMatrix(e,t,i,s,n){let o=e.a,a=e.b,l=e.c,u=e.d,h=e.tx,d=e.ty,p=this.minX,m=this.minY,x=this.maxX,C=this.maxY,A=o*t+l*i+h,P=a*t+u*i+d;p=A<p?A:p,m=P<m?P:m,x=A>x?A:x,C=P>C?P:C,A=o*s+l*i+h,P=a*s+u*i+d,p=A<p?A:p,m=P<m?P:m,x=A>x?A:x,C=P>C?P:C,A=o*t+l*n+h,P=a*t+u*n+d,p=A<p?A:p,m=P<m?P:m,x=A>x?A:x,C=P>C?P:C,A=o*s+l*n+h,P=a*s+u*n+d,p=A<p?A:p,m=P<m?P:m,x=A>x?A:x,C=P>C?P:C,this.minX=p,this.minY=m,this.maxX=x,this.maxY=C}addVertexData(e,t,i){let s=this.minX,n=this.minY,o=this.maxX,a=this.maxY;for(let l=t;l<i;l+=2){let u=e[l],h=e[l+1];s=u<s?u:s,n=h<n?h:n,o=u>o?u:o,a=h>a?h:a}this.minX=s,this.minY=n,this.maxX=o,this.maxY=a}addVertices(e,t,i,s){this.addVerticesMatrix(e.worldTransform,t,i,s)}addVerticesMatrix(e,t,i,s,n=0,o=n){let a=e.a,l=e.b,u=e.c,h=e.d,d=e.tx,p=e.ty,m=this.minX,x=this.minY,C=this.maxX,A=this.maxY;for(let P=i;P<s;P+=2){let L=t[P],I=t[P+1],T=a*L+u*I+d,W=h*I+l*L+p;m=Math.min(m,T-n),C=Math.max(C,T+n),x=Math.min(x,W-o),A=Math.max(A,W+o)}this.minX=m,this.minY=x,this.maxX=C,this.maxY=A}addBounds(e){let t=this.minX,i=this.minY,s=this.maxX,n=this.maxY;this.minX=e.minX<t?e.minX:t,this.minY=e.minY<i?e.minY:i,this.maxX=e.maxX>s?e.maxX:s,this.maxY=e.maxY>n?e.maxY:n}addBoundsMask(e,t){let i=e.minX>t.minX?e.minX:t.minX,s=e.minY>t.minY?e.minY:t.minY,n=e.maxX<t.maxX?e.maxX:t.maxX,o=e.maxY<t.maxY?e.maxY:t.maxY;if(i<=n&&s<=o){let a=this.minX,l=this.minY,u=this.maxX,h=this.maxY;this.minX=i<a?i:a,this.minY=s<l?s:l,this.maxX=n>u?n:u,this.maxY=o>h?o:h}}addBoundsMatrix(e,t){this.addFrameMatrix(t,e.minX,e.minY,e.maxX,e.maxY)}addBoundsArea(e,t){let i=e.minX>t.x?e.minX:t.x,s=e.minY>t.y?e.minY:t.y,n=e.maxX<t.x+t.width?e.maxX:t.x+t.width,o=e.maxY<t.y+t.height?e.maxY:t.y+t.height;if(i<=n&&s<=o){let a=this.minX,l=this.minY,u=this.maxX,h=this.maxY;this.minX=i<a?i:a,this.minY=s<l?s:l,this.maxX=n>u?n:u,this.maxY=o>h?o:h}}pad(e=0,t=e){this.isEmpty()||(this.minX-=e,this.maxX+=e,this.minY-=t,this.maxY+=t)}addFramePad(e,t,i,s,n,o){e-=n,t-=o,i+=n,s+=o,this.minX=this.minX<e?this.minX:e,this.maxX=this.maxX>i?this.maxX:i,this.minY=this.minY<t?this.minY:t,this.maxY=this.maxY>s?this.maxY:s}};var Xe=class r extends ie.EventEmitter{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new Ts,this.alpha=1,this.visible=!0,this.renderable=!0,this.cullable=!1,this.cullArea=null,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new Ar,this._localBounds=null,this._boundsID=0,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._maskRefCount=0,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}static mixin(e){let t=Object.keys(e);for(let i=0;i<t.length;++i){let s=t[i];Object.defineProperty(r.prototype,s,Object.getOwnPropertyDescriptor(e,s))}}get destroyed(){return this._destroyed}_recursivePostUpdateTransform(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)}updateTransform(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha}getBounds(e,t){return e||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),t||(this._boundsRect||(this._boundsRect=new we),t=this._boundsRect),this._bounds.getRectangle(t)}getLocalBounds(e){e||(this._localBoundsRect||(this._localBoundsRect=new we),e=this._localBoundsRect),this._localBounds||(this._localBounds=new Ar);let t=this.transform,i=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;let s=this._bounds,n=this._boundsID;this._bounds=this._localBounds;let o=this.getBounds(!1,e);return this.parent=i,this.transform=t,this._bounds=s,this._bounds.updateID+=this._boundsID-n,o}toGlobal(e,t,i=!1){return i||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(e,t)}toLocal(e,t,i,s){return t&&(e=t.toGlobal(e,i,s)),s||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(e,i)}setParent(e){if(!e||!e.addChild)throw new Error("setParent: Argument must be a Container");return e.addChild(this),e}removeFromParent(){this.parent?.removeChild(this)}setTransform(e=0,t=0,i=1,s=1,n=0,o=0,a=0,l=0,u=0){return this.position.x=e,this.position.y=t,this.scale.x=i||1,this.scale.y=s||1,this.rotation=n,this.skew.x=o,this.skew.y=a,this.pivot.x=l,this.pivot.y=u,this}destroy(e){this.removeFromParent(),this._destroyed=!0,this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.cullArea=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.eventMode="auto",this.interactiveChildren=!1,this.emit("destroyed"),this.removeAllListeners()}get _tempDisplayObjectParent(){return this.tempDisplayObjectParent===null&&(this.tempDisplayObjectParent=new Uu),this.tempDisplayObjectParent}enableTempParent(){let e=this.parent;return this.parent=this._tempDisplayObjectParent,e}disableTempParent(e){this.parent=e}get x(){return this.position.x}set x(e){this.transform.position.x=e}get y(){return this.position.y}set y(e){this.transform.position.y=e}get worldTransform(){return this.transform.worldTransform}get localTransform(){return this.transform.localTransform}get position(){return this.transform.position}set position(e){this.transform.position.copyFrom(e)}get scale(){return this.transform.scale}set scale(e){this.transform.scale.copyFrom(e)}get pivot(){return this.transform.pivot}set pivot(e){this.transform.pivot.copyFrom(e)}get skew(){return this.transform.skew}set skew(e){this.transform.skew.copyFrom(e)}get rotation(){return this.transform.rotation}set rotation(e){this.transform.rotation=e}get angle(){return this.transform.rotation*H1}set angle(e){this.transform.rotation=e*j1}get zIndex(){return this._zIndex}set zIndex(e){this._zIndex=e,this.parent&&(this.parent.sortDirty=!0)}get worldVisible(){let e=this;do{if(!e.visible)return!1;e=e.parent}while(e);return!0}get mask(){return this._mask}set mask(e){if(this._mask!==e){if(this._mask){let t=this._mask.isMaskData?this._mask.maskObject:this._mask;t&&(t._maskRefCount--,t._maskRefCount===0&&(t.renderable=!0,t.isMask=!1))}if(this._mask=e,this._mask){let t=this._mask.isMaskData?this._mask.maskObject:this._mask;t&&(t._maskRefCount===0&&(t.renderable=!1,t.isMask=!0),t._maskRefCount++)}}}},Uu=class extends Xe{constructor(){super(...arguments),this.sortDirty=null}};Xe.prototype.displayObjectUpdateTransform=Xe.prototype.updateTransform;var Kf=new Re;function Zf(r,e){return r.zIndex===e.zIndex?r._lastSortedIndex-e._lastSortedIndex:r.zIndex-e.zIndex}var o9=class extends Xe{constructor(){super(),this.children=[],this.sortableChildren=o9.defaultSortableChildren,this.sortDirty=!1}onChildrenChange(r){}addChild(...r){if(r.length>1)for(let e=0;e<r.length;e++)this.addChild(r[e]);else{let e=r[0];e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.push(e),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",e,this,this.children.length-1),e.emit("added",this)}return r[0]}addChildAt(r,e){if(e<0||e>this.children.length)throw new Error(`${r}addChildAt: The index ${e} supplied is out of bounds ${this.children.length}`);return r.parent&&r.parent.removeChild(r),r.parent=this,this.sortDirty=!0,r.transform._parentID=-1,this.children.splice(e,0,r),this._boundsID++,this.onChildrenChange(e),r.emit("added",this),this.emit("childAdded",r,this,e),r}swapChildren(r,e){if(r===e)return;let t=this.getChildIndex(r),i=this.getChildIndex(e);this.children[t]=e,this.children[i]=r,this.onChildrenChange(t<i?t:i)}getChildIndex(r){let e=this.children.indexOf(r);if(e===-1)throw new Error("The supplied DisplayObject must be a child of the caller");return e}setChildIndex(r,e){if(e<0||e>=this.children.length)throw new Error(`The index ${e} supplied is out of bounds ${this.children.length}`);let t=this.getChildIndex(r);ie.removeItems(this.children,t,1),this.children.splice(e,0,r),this.onChildrenChange(e)}getChildAt(r){if(r<0||r>=this.children.length)throw new Error(`getChildAt: Index (${r}) does not exist.`);return this.children[r]}removeChild(...r){if(r.length>1)for(let e=0;e<r.length;e++)this.removeChild(r[e]);else{let e=r[0],t=this.children.indexOf(e);if(t===-1)return null;e.parent=null,e.transform._parentID=-1,ie.removeItems(this.children,t,1),this._boundsID++,this.onChildrenChange(t),e.emit("removed",this),this.emit("childRemoved",e,this,t)}return r[0]}removeChildAt(r){let e=this.getChildAt(r);return e.parent=null,e.transform._parentID=-1,ie.removeItems(this.children,r,1),this._boundsID++,this.onChildrenChange(r),e.emit("removed",this),this.emit("childRemoved",e,this,r),e}removeChildren(r=0,e=this.children.length){let t=r,i=e,s=i-t,n;if(s>0&&s<=i){n=this.children.splice(t,s);for(let o=0;o<n.length;++o)n[o].parent=null,n[o].transform&&(n[o].transform._parentID=-1);this._boundsID++,this.onChildrenChange(r);for(let o=0;o<n.length;++o)n[o].emit("removed",this),this.emit("childRemoved",n[o],this,o);return n}else if(s===0&&this.children.length===0)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")}sortChildren(){let r=!1;for(let e=0,t=this.children.length;e<t;++e){let i=this.children[e];i._lastSortedIndex=e,!r&&i.zIndex!==0&&(r=!0)}r&&this.children.length>1&&this.children.sort(Zf),this.sortDirty=!1}updateTransform(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(let r=0,e=this.children.length;r<e;++r){let t=this.children[r];t.visible&&t.updateTransform()}}calculateBounds(){this._bounds.clear(),this._calculateBounds();for(let r=0;r<this.children.length;r++){let e=this.children[r];if(!(!e.visible||!e.renderable))if(e.calculateBounds(),e._mask){let t=e._mask.isMaskData?e._mask.maskObject:e._mask;t?(t.calculateBounds(),this._bounds.addBoundsMask(e._bounds,t._bounds)):this._bounds.addBounds(e._bounds)}else e.filterArea?this._bounds.addBoundsArea(e._bounds,e.filterArea):this._bounds.addBounds(e._bounds)}this._bounds.updateID=this._boundsID}getLocalBounds(r,e=!1){let t=super.getLocalBounds(r);if(!e)for(let i=0,s=this.children.length;i<s;++i){let n=this.children[i];n.visible&&n.updateTransform()}return t}_calculateBounds(){}_renderWithCulling(r){let e=r.renderTexture.sourceFrame;if(!(e.width>0&&e.height>0))return;let t,i;this.cullArea?(t=this.cullArea,i=this.worldTransform):this._render!==o9.prototype._render&&(t=this.getBounds(!0));let s=r.projection.transform;if(s&&(i?(i=Kf.copyFrom(i),i.prepend(s)):i=s),t&&e.intersects(t,i))this._render(r);else if(this.cullArea)return;for(let n=0,o=this.children.length;n<o;++n){let a=this.children[n],l=a.cullable;a.cullable=l||!this.cullArea,a.render(r),a.cullable=l}}render(r){if(!(!this.visible||this.worldAlpha<=0||!this.renderable))if(this._mask||this.filters?.length)this.renderAdvanced(r);else if(this.cullable)this._renderWithCulling(r);else{this._render(r);for(let e=0,t=this.children.length;e<t;++e)this.children[e].render(r)}}renderAdvanced(r){let e=this.filters,t=this._mask;if(e){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(let s=0;s<e.length;s++)e[s].enabled&&this._enabledFilters.push(e[s])}let i=e&&this._enabledFilters?.length||t&&(!t.isMaskData||t.enabled&&(t.autoDetect||t.type!==f0.NONE));if(i&&r.batch.flush(),e&&this._enabledFilters?.length&&r.filter.push(this,this._enabledFilters),t&&r.mask.push(this,this._mask),this.cullable)this._renderWithCulling(r);else{this._render(r);for(let s=0,n=this.children.length;s<n;++s)this.children[s].render(r)}i&&r.batch.flush(),t&&r.mask.pop(this),e&&this._enabledFilters?.length&&r.filter.pop()}_render(r){}destroy(r){super.destroy(),this.sortDirty=!1;let e=typeof r=="boolean"?r:r?.children,t=this.removeChildren(0,this.children.length);if(e)for(let i=0;i<t.length;++i)t[i].destroy(r)}get width(){return this.scale.x*this.getLocalBounds().width}set width(r){let e=this.getLocalBounds().width;e!==0?this.scale.x=r/e:this.scale.x=1,this._width=r}get height(){return this.scale.y*this.getLocalBounds().height}set height(r){let e=this.getLocalBounds().height;e!==0?this.scale.y=r/e:this.scale.y=1,this._height=r}},Je=o9;Je.defaultSortableChildren=!1;Je.prototype.containerUpdateTransform=Je.prototype.updateTransform;Object.defineProperties(j,{SORTABLE_CHILDREN:{get(){return Je.defaultSortableChildren},set(r){ie.deprecation("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),Je.defaultSortableChildren=r}}});var wa=new Ae,Qf=new Uint16Array([0,1,2,0,2,3]),N0=class r extends Je{constructor(e){super(),this._anchor=new Zt(this._onAnchorUpdate,this,e?e.defaultAnchor.x:0,e?e.defaultAnchor.y:0),this._texture=null,this._width=0,this._height=0,this._tintColor=new Se(16777215),this._tintRGB=null,this.tint=16777215,this.blendMode=be.NORMAL,this._cachedTint=16777215,this.uvs=null,this.texture=e||xe.EMPTY,this.vertexData=new Float32Array(8),this.vertexTrimmedData=null,this._transformID=-1,this._textureID=-1,this._transformTrimmedID=-1,this._textureTrimmedID=-1,this.indices=Qf,this.pluginName="batch",this.isSprite=!0,this._roundPixels=j.ROUND_PIXELS}_onTextureUpdate(){this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this._width&&(this.scale.x=ie.sign(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=ie.sign(this.scale.y)*this._height/this._texture.orig.height)}_onAnchorUpdate(){this._transformID=-1,this._transformTrimmedID=-1}calculateVertices(){let e=this._texture;if(this._transformID===this.transform._worldID&&this._textureID===e._updateID)return;this._textureID!==e._updateID&&(this.uvs=this._texture._uvs.uvsFloat32),this._transformID=this.transform._worldID,this._textureID=e._updateID;let t=this.transform.worldTransform,i=t.a,s=t.b,n=t.c,o=t.d,a=t.tx,l=t.ty,u=this.vertexData,h=e.trim,d=e.orig,p=this._anchor,m=0,x=0,C=0,A=0;if(h?(x=h.x-p._x*d.width,m=x+h.width,A=h.y-p._y*d.height,C=A+h.height):(x=-p._x*d.width,m=x+d.width,A=-p._y*d.height,C=A+d.height),u[0]=i*x+n*A+a,u[1]=o*A+s*x+l,u[2]=i*m+n*A+a,u[3]=o*A+s*m+l,u[4]=i*m+n*C+a,u[5]=o*C+s*m+l,u[6]=i*x+n*C+a,u[7]=o*C+s*x+l,this._roundPixels){let P=j.RESOLUTION;for(let L=0;L<u.length;++L)u[L]=Math.round(u[L]*P)/P}}calculateTrimmedVertices(){if(!this.vertexTrimmedData)this.vertexTrimmedData=new Float32Array(8);else if(this._transformTrimmedID===this.transform._worldID&&this._textureTrimmedID===this._texture._updateID)return;this._transformTrimmedID=this.transform._worldID,this._textureTrimmedID=this._texture._updateID;let e=this._texture,t=this.vertexTrimmedData,i=e.orig,s=this._anchor,n=this.transform.worldTransform,o=n.a,a=n.b,l=n.c,u=n.d,h=n.tx,d=n.ty,p=-s._x*i.width,m=p+i.width,x=-s._y*i.height,C=x+i.height;t[0]=o*p+l*x+h,t[1]=u*x+a*p+d,t[2]=o*m+l*x+h,t[3]=u*x+a*m+d,t[4]=o*m+l*C+h,t[5]=u*C+a*m+d,t[6]=o*p+l*C+h,t[7]=u*C+a*p+d}_render(e){this.calculateVertices(),e.batch.setObjectRenderer(e.plugins[this.pluginName]),e.plugins[this.pluginName].render(this)}_calculateBounds(){let e=this._texture.trim,t=this._texture.orig;!e||e.width===t.width&&e.height===t.height?(this.calculateVertices(),this._bounds.addQuad(this.vertexData)):(this.calculateTrimmedVertices(),this._bounds.addQuad(this.vertexTrimmedData))}getLocalBounds(e){return this.children.length===0?(this._localBounds||(this._localBounds=new Ar),this._localBounds.minX=this._texture.orig.width*-this._anchor._x,this._localBounds.minY=this._texture.orig.height*-this._anchor._y,this._localBounds.maxX=this._texture.orig.width*(1-this._anchor._x),this._localBounds.maxY=this._texture.orig.height*(1-this._anchor._y),e||(this._localBoundsRect||(this._localBoundsRect=new we),e=this._localBoundsRect),this._localBounds.getRectangle(e)):super.getLocalBounds.call(this,e)}containsPoint(e){this.worldTransform.applyInverse(e,wa);let t=this._texture.orig.width,i=this._texture.orig.height,s=-t*this.anchor.x,n=0;return wa.x>=s&&wa.x<s+t&&(n=-i*this.anchor.y,wa.y>=n&&wa.y<n+i)}destroy(e){if(super.destroy(e),this._texture.off("update",this._onTextureUpdate,this),this._anchor=null,typeof e=="boolean"?e:e?.texture){let i=typeof e=="boolean"?e:e?.baseTexture;this._texture.destroy(!!i)}this._texture=null}static from(e,t){let i=e instanceof xe?e:xe.from(e,t);return new r(i)}set roundPixels(e){this._roundPixels!==e&&(this._transformID=-1),this._roundPixels=e}get roundPixels(){return this._roundPixels}get width(){return Math.abs(this.scale.x)*this._texture.orig.width}set width(e){let t=ie.sign(this.scale.x)||1;this.scale.x=t*e/this._texture.orig.width,this._width=e}get height(){return Math.abs(this.scale.y)*this._texture.orig.height}set height(e){let t=ie.sign(this.scale.y)||1;this.scale.y=t*e/this._texture.orig.height,this._height=e}get anchor(){return this._anchor}set anchor(e){this._anchor.copyFrom(e)}get tint(){return this._tintColor.value}set tint(e){this._tintColor.setValue(e),this._tintRGB=this._tintColor.toLittleEndianNumber()}get tintValue(){return this._tintColor.toNumber()}get texture(){return this._texture}set texture(e){this._texture!==e&&(this._texture&&this._texture.off("update",this._onTextureUpdate,this),this._texture=e||xe.EMPTY,this._cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,e&&(e.baseTexture.valid?this._onTextureUpdate():e.once("update",this._onTextureUpdate,this)))}};var x6=new Re;Xe.prototype._cacheAsBitmap=!1;Xe.prototype._cacheData=null;Xe.prototype._cacheAsBitmapResolution=null;Xe.prototype._cacheAsBitmapMultisample=null;var a9=class{constructor(){this.textureCacheId=null,this.originalRender=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.originalContainsPoint=null,this.sprite=null}};Object.defineProperties(Xe.prototype,{cacheAsBitmapResolution:{get(){return this._cacheAsBitmapResolution},set(r){r!==this._cacheAsBitmapResolution&&(this._cacheAsBitmapResolution=r,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmapMultisample:{get(){return this._cacheAsBitmapMultisample},set(r){r!==this._cacheAsBitmapMultisample&&(this._cacheAsBitmapMultisample=r,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmap:{get(){return this._cacheAsBitmap},set(r){if(this._cacheAsBitmap===r)return;this._cacheAsBitmap=r;let e;r?(this._cacheData||(this._cacheData=new a9),e=this._cacheData,e.originalRender=this.render,e.originalRenderCanvas=this.renderCanvas,e.originalUpdateTransform=this.updateTransform,e.originalCalculateBounds=this.calculateBounds,e.originalGetLocalBounds=this.getLocalBounds,e.originalDestroy=this.destroy,e.originalContainsPoint=this.containsPoint,e.originalMask=this._mask,e.originalFilterArea=this.filterArea,this.render=this._renderCached,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):(e=this._cacheData,e.sprite&&this._destroyCachedDisplayObject(),this.render=e.originalRender,this.renderCanvas=e.originalRenderCanvas,this.calculateBounds=e.originalCalculateBounds,this.getLocalBounds=e.originalGetLocalBounds,this.destroy=e.originalDestroy,this.updateTransform=e.originalUpdateTransform,this.containsPoint=e.originalContainsPoint,this._mask=e.originalMask,this.filterArea=e.originalFilterArea)}}});Xe.prototype._renderCached=function(e){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(e),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._render(e))};Xe.prototype._initCachedDisplayObject=function(e){if(this._cacheData?.sprite)return;let t=this.alpha;this.alpha=1,e.batch.flush();let i=this.getLocalBounds(null,!0).clone();if(this.filters?.length){let p=this.filters[0].padding;i.pad(p)}i.ceil(j.RESOLUTION);let s=e.renderTexture.current,n=e.renderTexture.sourceFrame.clone(),o=e.renderTexture.destinationFrame.clone(),a=e.projection.transform,l=Qt.create({width:i.width,height:i.height,resolution:this.cacheAsBitmapResolution||e.resolution,multisample:this.cacheAsBitmapMultisample??e.multisample}),u=`cacheAsBitmap_${ie.uid()}`;this._cacheData.textureCacheId=u,ye.addToCache(l.baseTexture,u),xe.addToCache(l,u);let h=this.transform.localTransform.copyTo(x6).invert().translate(-i.x,-i.y);this.render=this._cacheData.originalRender,e.render(this,{renderTexture:l,clear:!0,transform:h,skipUpdateTransform:!1}),e.framebuffer.blit(),e.projection.transform=a,e.renderTexture.bind(s,n,o),this.render=this._renderCached,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=t;let d=new N0(l);d.transform.worldTransform=this.transform.worldTransform,d.anchor.x=-(i.x/i.width),d.anchor.y=-(i.y/i.height),d.alpha=t,d._bounds=this._bounds,this._cacheData.sprite=d,this.transform._parentID=-1,this.parent?this.updateTransform():(this.enableTempParent(),this.updateTransform(),this.disableTempParent(null)),this.containsPoint=d.containsPoint.bind(d)};Xe.prototype._renderCachedCanvas=function(e){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(e),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderCanvas(e))};Xe.prototype._initCachedDisplayObjectCanvas=function(e){if(this._cacheData?.sprite)return;let t=this.getLocalBounds(null,!0),i=this.alpha;this.alpha=1;let s=e.canvasContext.activeContext,n=e._projTransform;t.ceil(j.RESOLUTION);let o=Qt.create({width:t.width,height:t.height}),a=`cacheAsBitmap_${ie.uid()}`;this._cacheData.textureCacheId=a,ye.addToCache(o.baseTexture,a),xe.addToCache(o,a);let l=x6;this.transform.localTransform.copyTo(l),l.invert(),l.tx-=t.x,l.ty-=t.y,this.renderCanvas=this._cacheData.originalRenderCanvas,e.render(this,{renderTexture:o,clear:!0,transform:l,skipUpdateTransform:!1}),e.canvasContext.activeContext=s,e._projTransform=n,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=i;let u=new N0(o);u.transform.worldTransform=this.transform.worldTransform,u.anchor.x=-(t.x/t.width),u.anchor.y=-(t.y/t.height),u.alpha=i,u._bounds=this._bounds,this._cacheData.sprite=u,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=e._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=u.containsPoint.bind(u)};Xe.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._bounds.updateID=this._boundsID};Xe.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds(null)};Xe.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,ye.removeFromCache(this._cacheData.textureCacheId),xe.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null};Xe.prototype._cacheAsBitmapDestroy=function(e){this.cacheAsBitmap=!1,this.destroy(e)};Xe.prototype.name=null;Je.prototype.getChildByName=function(e,t){for(let i=0,s=this.children.length;i<s;i++)if(this.children[i].name===e)return this.children[i];if(t)for(let i=0,s=this.children.length;i<s;i++){let n=this.children[i];if(!n.getChildByName)continue;let o=n.getChildByName(e,!0);if(o)return o}return null};Xe.prototype.getGlobalPosition=function(e=new Ae,t=!1){return this.parent?this.parent.toGlobal(this.position,e,t):(e.x=this.position.x,e.y=this.position.y),e};var v6=`varying vec2 vTextureCoord;
uniform sampler2D uSampler;
uniform float uAlpha;
void main(void)
{
gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha;
}
`;var Sa=class extends Ye{constructor(e=1){super(i9,v6,{uAlpha:1}),this.alpha=e}get alpha(){return this.uniforms.uAlpha}set alpha(e){this.uniforms.uAlpha=e}};var Jf={5:[.153388,.221461,.250301],7:[.071303,.131514,.189879,.214607],9:[.028532,.067234,.124009,.179044,.20236],11:[.0093,.028002,.065984,.121703,.175713,.198596],13:[.002406,.009255,.027867,.065666,.121117,.174868,.197641],15:[489e-6,.002403,.009246,.02784,.065602,.120999,.174697,.197448]},eg=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{"," gl_FragColor = vec4(0.0);"," %blur%","}"].join(`
`);function D6(r){let e=Jf[r],t=e.length,i=eg,s="",n="gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;",o;for(let a=0;a<r;a++){let l=n.replace("%index%",a.toString());o=a,a>=t&&(o=r-a-1),l=l.replace("%value%",e[o].toString()),s+=l,s+=`
`}return i=i.replace("%blur%",s),i=i.replace("%size%",r.toString()),i}var tg=`
attribute vec2 aVertexPosition;
uniform mat3 projectionMatrix;
uniform float strength;
varying vec2 vBlurTexCoords[%size%];
uniform vec4 inputSize;
uniform vec4 outputFrame;
vec4 filterVertexPosition( void )
{
vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;
return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
}
vec2 filterTextureCoord( void )
{
return aVertexPosition * (outputFrame.zw * inputSize.zw);
}
void main(void)
{
gl_Position = filterVertexPosition();
vec2 textureCoord = filterTextureCoord();
%blur%
}`;function E6(r,e){let t=Math.ceil(r/2),i=tg,s="",n;e?n="vBlurTexCoords[%index%] = textureCoord + vec2(%sampleIndex% * strength, 0.0);":n="vBlurTexCoords[%index%] = textureCoord + vec2(0.0, %sampleIndex% * strength);";for(let o=0;o<r;o++){let a=n.replace("%index%",o.toString());a=a.replace("%sampleIndex%",`${o-(t-1)}.0`),s+=a,s+=`
`}return i=i.replace("%blur%",s),i=i.replace("%size%",r.toString()),i}var Zi=class extends Ye{constructor(e,t=8,i=4,s=Ye.defaultResolution,n=5){let o=E6(n,e),a=D6(n);super(o,a),this.horizontal=e,this.resolution=s,this._quality=0,this.quality=i,this.blur=t}apply(e,t,i,s){if(i?this.horizontal?this.uniforms.strength=1/i.width*(i.width/t.width):this.uniforms.strength=1/i.height*(i.height/t.height):this.horizontal?this.uniforms.strength=1/e.renderer.width*(e.renderer.width/t.width):this.uniforms.strength=1/e.renderer.height*(e.renderer.height/t.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,this.passes===1)e.applyFilter(this,t,i,s);else{let n=e.getFilterTexture(),o=e.renderer,a=t,l=n;this.state.blend=!1,e.applyFilter(this,a,l,Nt.CLEAR);for(let u=1;u<this.passes-1;u++){e.bindAndClear(a,Nt.BLIT),this.uniforms.uSampler=l;let h=l;l=a,a=h,o.shader.bind(this),o.geometry.draw(5)}this.state.blend=!0,e.applyFilter(this,l,i,s),e.returnFilterTexture(n)}}get blur(){return this.strength}set blur(e){this.padding=1+Math.abs(e)*2,this.strength=e}get quality(){return this._quality}set quality(e){this._quality=e,this.passes=e}};var _a=class extends Ye{constructor(e=8,t=4,i=Ye.defaultResolution,s=5){super(),this._repeatEdgePixels=!1,this.blurXFilter=new Zi(!0,e,t,i,s),this.blurYFilter=new Zi(!1,e,t,i,s),this.resolution=i,this.quality=t,this.blur=e,this.repeatEdgePixels=!1}apply(e,t,i,s){let n=Math.abs(this.blurXFilter.strength),o=Math.abs(this.blurYFilter.strength);if(n&&o){let a=e.getFilterTexture();this.blurXFilter.apply(e,t,a,Nt.CLEAR),this.blurYFilter.apply(e,a,i,s),e.returnFilterTexture(a)}else o?this.blurYFilter.apply(e,t,i,s):this.blurXFilter.apply(e,t,i,s)}updatePadding(){this._repeatEdgePixels?this.padding=0:this.padding=Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))*2}get blur(){return this.blurXFilter.blur}set blur(e){this.blurXFilter.blur=this.blurYFilter.blur=e,this.updatePadding()}get quality(){return this.blurXFilter.quality}set quality(e){this.blurXFilter.quality=this.blurYFilter.quality=e}get blurX(){return this.blurXFilter.blur}set blurX(e){this.blurXFilter.blur=e,this.updatePadding()}get blurY(){return this.blurYFilter.blur}set blurY(e){this.blurYFilter.blur=e,this.updatePadding()}get blendMode(){return this.blurYFilter.blendMode}set blendMode(e){this.blurYFilter.blendMode=e}get repeatEdgePixels(){return this._repeatEdgePixels}set repeatEdgePixels(e){this._repeatEdgePixels=e,this.updatePadding()}};var b6=`varying vec2 vTextureCoord;
uniform sampler2D uSampler;
uniform float m[20];
uniform float uAlpha;
void main(void)
{
vec4 c = texture2D(uSampler, vTextureCoord);
if (uAlpha == 0.0) {
gl_FragColor = c;
return;
}
// Un-premultiply alpha before applying the color matrix. See issue #3539.
if (c.a > 0.0) {
c.rgb /= c.a;
}
vec4 result;
result.r = (m[0] * c.r);
result.r += (m[1] * c.g);
result.r += (m[2] * c.b);
result.r += (m[3] * c.a);
result.r += m[4];
result.g = (m[5] * c.r);
result.g += (m[6] * c.g);
result.g += (m[7] * c.b);
result.g += (m[8] * c.a);
result.g += m[9];
result.b = (m[10] * c.r);
result.b += (m[11] * c.g);
result.b += (m[12] * c.b);
result.b += (m[13] * c.a);
result.b += m[14];
result.a = (m[15] * c.r);
result.a += (m[16] * c.g);
result.a += (m[17] * c.b);
result.a += (m[18] * c.a);
result.a += m[19];
vec3 rgb = mix(c.rgb, result.rgb, uAlpha);
// Premultiply alpha again.
rgb *= result.a;
gl_FragColor = vec4(rgb, result.a);
}
`;var Ps=class extends Ye{constructor(){let e={m:new Float32Array([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]),uAlpha:1};super(ya,b6,e),this.alpha=1}_loadMatrix(e,t=!1){let i=e;t&&(this._multiply(i,this.uniforms.m,e),i=this._colorMatrix(i)),this.uniforms.m=i}_multiply(e,t,i){return e[0]=t[0]*i[0]+t[1]*i[5]+t[2]*i[10]+t[3]*i[15],e[1]=t[0]*i[1]+t[1]*i[6]+t[2]*i[11]+t[3]*i[16],e[2]=t[0]*i[2]+t[1]*i[7]+t[2]*i[12]+t[3]*i[17],e[3]=t[0]*i[3]+t[1]*i[8]+t[2]*i[13]+t[3]*i[18],e[4]=t[0]*i[4]+t[1]*i[9]+t[2]*i[14]+t[3]*i[19]+t[4],e[5]=t[5]*i[0]+t[6]*i[5]+t[7]*i[10]+t[8]*i[15],e[6]=t[5]*i[1]+t[6]*i[6]+t[7]*i[11]+t[8]*i[16],e[7]=t[5]*i[2]+t[6]*i[7]+t[7]*i[12]+t[8]*i[17],e[8]=t[5]*i[3]+t[6]*i[8]+t[7]*i[13]+t[8]*i[18],e[9]=t[5]*i[4]+t[6]*i[9]+t[7]*i[14]+t[8]*i[19]+t[9],e[10]=t[10]*i[0]+t[11]*i[5]+t[12]*i[10]+t[13]*i[15],e[11]=t[10]*i[1]+t[11]*i[6]+t[12]*i[11]+t[13]*i[16],e[12]=t[10]*i[2]+t[11]*i[7]+t[12]*i[12]+t[13]*i[17],e[13]=t[10]*i[3]+t[11]*i[8]+t[12]*i[13]+t[13]*i[18],e[14]=t[10]*i[4]+t[11]*i[9]+t[12]*i[14]+t[13]*i[19]+t[14],e[15]=t[15]*i[0]+t[16]*i[5]+t[17]*i[10]+t[18]*i[15],e[16]=t[15]*i[1]+t[16]*i[6]+t[17]*i[11]+t[18]*i[16],e[17]=t[15]*i[2]+t[16]*i[7]+t[17]*i[12]+t[18]*i[17],e[18]=t[15]*i[3]+t[16]*i[8]+t[17]*i[13]+t[18]*i[18],e[19]=t[15]*i[4]+t[16]*i[9]+t[17]*i[14]+t[18]*i[19]+t[19],e}_colorMatrix(e){let t=new Float32Array(e);return t[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,t}brightness(e,t){let i=[e,0,0,0,0,0,e,0,0,0,0,0,e,0,0,0,0,0,1,0];this._loadMatrix(i,t)}tint(e,t){let[i,s,n]=Se.shared.setValue(e).toArray(),o=[i,0,0,0,0,0,s,0,0,0,0,0,n,0,0,0,0,0,1,0];this._loadMatrix(o,t)}greyscale(e,t){let i=[e,e,e,0,0,e,e,e,0,0,e,e,e,0,0,0,0,0,1,0];this._loadMatrix(i,t)}blackAndWhite(e){let t=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0];this._loadMatrix(t,e)}hue(e,t){e=(e||0)/180*Math.PI;let i=Math.cos(e),s=Math.sin(e),n=Math.sqrt,o=1/3,a=n(o),l=i+(1-i)*o,u=o*(1-i)-a*s,h=o*(1-i)+a*s,d=o*(1-i)+a*s,p=i+o*(1-i),m=o*(1-i)-a*s,x=o*(1-i)-a*s,C=o*(1-i)+a*s,A=i+o*(1-i),P=[l,u,h,0,0,d,p,m,0,0,x,C,A,0,0,0,0,0,1,0];this._loadMatrix(P,t)}contrast(e,t){let i=(e||0)+1,s=-.5*(i-1),n=[i,0,0,0,s,0,i,0,0,s,0,0,i,0,s,0,0,0,1,0];this._loadMatrix(n,t)}saturate(e=0,t){let i=e*2/3+1,s=(i-1)*-.5,n=[i,s,s,0,0,s,i,s,0,0,s,s,i,0,0,0,0,0,1,0];this._loadMatrix(n,t)}desaturate(){this.saturate(-1)}negative(e){let t=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0];this._loadMatrix(t,e)}sepia(e){let t=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0];this._loadMatrix(t,e)}technicolor(e){let t=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0];this._loadMatrix(t,e)}polaroid(e){let t=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0];this._loadMatrix(t,e)}toBGR(e){let t=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0];this._loadMatrix(t,e)}kodachrome(e){let t=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0];this._loadMatrix(t,e)}browni(e){let t=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0];this._loadMatrix(t,e)}vintage(e){let t=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0];this._loadMatrix(t,e)}colorTone(e,t,i,s,n){e=e||.2,t=t||.15,i=i||16770432,s=s||3375104;let o=Se.shared,[a,l,u]=o.setValue(i).toArray(),[h,d,p]=o.setValue(s).toArray(),m=[.3,.59,.11,0,0,a,l,u,e,0,h,d,p,t,0,a-h,l-d,u-p,0,0];this._loadMatrix(m,n)}night(e,t){e=e||.1;let i=[e*-2,-e,0,0,0,-e,0,e,0,0,0,e,e*2,0,0,0,0,0,1,0];this._loadMatrix(i,t)}predator(e,t){let i=[11.224130630493164*e,-4.794486999511719*e,-2.8746118545532227*e,0*e,.40342438220977783*e,-3.6330697536468506*e,9.193157196044922*e,-2.951810836791992*e,0*e,-1.316135048866272*e,-3.2184197902679443*e,-4.2375030517578125*e,7.476448059082031*e,0*e,.8044459223747253*e,0,0,0,1,0];this._loadMatrix(i,t)}lsd(e){let t=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(t,e)}reset(){let e=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(e,!1)}get matrix(){return this.uniforms.m}set matrix(e){this.uniforms.m=e}get alpha(){return this.uniforms.uAlpha}set alpha(e){this.uniforms.uAlpha=e}};Ps.prototype.grayscale=Ps.prototype.greyscale;var w6=`varying vec2 vFilterCoord;
varying vec2 vTextureCoord;
uniform vec2 scale;
uniform mat2 rotation;
uniform sampler2D uSampler;
uniform sampler2D mapSampler;
uniform highp vec4 inputSize;
uniform vec4 inputClamp;
void main(void)
{
vec4 map = texture2D(mapSampler, vFilterCoord);
map -= 0.5;
map.xy = scale * inputSize.zw * (rotation * map.xy);
gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), inputClamp.xy, inputClamp.zw));
}
`;var S6=`attribute vec2 aVertexPosition;
uniform mat3 projectionMatrix;
uniform mat3 filterMatrix;
varying vec2 vTextureCoord;
varying vec2 vFilterCoord;
uniform vec4 inputSize;
uniform vec4 outputFrame;
vec4 filterVertexPosition( void )
{
vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;
return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
}
vec2 filterTextureCoord( void )
{
return aVertexPosition * (outputFrame.zw * inputSize.zw);
}
void main(void)
{
gl_Position = filterVertexPosition();
vTextureCoord = filterTextureCoord();
vFilterCoord = ( filterMatrix * vec3( vTextureCoord, 1.0) ).xy;
}
`;var Ca=class extends Ye{constructor(e,t){let i=new Re;e.renderable=!1,super(S6,w6,{mapSampler:e._texture,filterMatrix:i,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])}),this.maskSprite=e,this.maskMatrix=i,t==null&&(t=20),this.scale=new Ae(t,t)}apply(e,t,i,s){this.uniforms.filterMatrix=e.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y;let n=this.maskSprite.worldTransform,o=Math.sqrt(n.a*n.a+n.b*n.b),a=Math.sqrt(n.c*n.c+n.d*n.d);o!==0&&a!==0&&(this.uniforms.rotation[0]=n.a/o,this.uniforms.rotation[1]=n.b/o,this.uniforms.rotation[2]=n.c/a,this.uniforms.rotation[3]=n.d/a),e.applyFilter(this,t,i,s)}get map(){return this.uniforms.mapSampler}set map(e){this.uniforms.mapSampler=e}};var _6=`varying vec2 v_rgbNW;
varying vec2 v_rgbNE;
varying vec2 v_rgbSW;
varying vec2 v_rgbSE;
varying vec2 v_rgbM;
varying vec2 vFragCoord;
uniform sampler2D uSampler;
uniform highp vec4 inputSize;
/**
Basic FXAA implementation based on the code on geeks3d.com with the
modification that the texture2DLod stuff was removed since it's
unsupported by WebGL.
--
From:
https://github.com/mitsuhiko/webgl-meincraft
Copyright (c) 2011 by Armin Ronacher.
Some rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* The names of the contributors may not be used to endorse or
promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef FXAA_REDUCE_MIN
#define FXAA_REDUCE_MIN (1.0/ 128.0)
#endif
#ifndef FXAA_REDUCE_MUL
#define FXAA_REDUCE_MUL (1.0 / 8.0)
#endif
#ifndef FXAA_SPAN_MAX
#define FXAA_SPAN_MAX 8.0
#endif
//optimized version for mobile, where dependent
//texture reads can be a bottleneck
vec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 inverseVP,
vec2 v_rgbNW, vec2 v_rgbNE,
vec2 v_rgbSW, vec2 v_rgbSE,
vec2 v_rgbM) {
vec4 color;
vec3 rgbNW = texture2D(tex, v_rgbNW).xyz;
vec3 rgbNE = texture2D(tex, v_rgbNE).xyz;
vec3 rgbSW = texture2D(tex, v_rgbSW).xyz;
vec3 rgbSE = texture2D(tex, v_rgbSE).xyz;
vec4 texColor = texture2D(tex, v_rgbM);
vec3 rgbM = texColor.xyz;
vec3 luma = vec3(0.299, 0.587, 0.114);
float lumaNW = dot(rgbNW, luma);
float lumaNE = dot(rgbNE, luma);
float lumaSW = dot(rgbSW, luma);
float lumaSE = dot(rgbSE, luma);
float lumaM = dot(rgbM, luma);
float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));
float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));
mediump vec2 dir;
dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));
dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));
float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *
(0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);
float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);
dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),
max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),
dir * rcpDirMin)) * inverseVP;
vec3 rgbA = 0.5 * (
texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz +
texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz);
vec3 rgbB = rgbA * 0.5 + 0.25 * (
texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz +
texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz);
float lumaB = dot(rgbB, luma);
if ((lumaB < lumaMin) || (lumaB > lumaMax))
color = vec4(rgbA, texColor.a);
else
color = vec4(rgbB, texColor.a);
return color;
}
void main() {
vec4 color;
color = fxaa(uSampler, vFragCoord, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);
gl_FragColor = color;
}
`;var C6=`
attribute vec2 aVertexPosition;
uniform mat3 projectionMatrix;
varying vec2 v_rgbNW;
varying vec2 v_rgbNE;
varying vec2 v_rgbSW;
varying vec2 v_rgbSE;
varying vec2 v_rgbM;
varying vec2 vFragCoord;
uniform vec4 inputSize;
uniform vec4 outputFrame;
vec4 filterVertexPosition( void )
{
vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;
return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
}
void texcoords(vec2 fragCoord, vec2 inverseVP,
out vec2 v_rgbNW, out vec2 v_rgbNE,
out vec2 v_rgbSW, out vec2 v_rgbSE,
out vec2 v_rgbM) {
v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP;
v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP;
v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP;
v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP;
v_rgbM = vec2(fragCoord * inverseVP);
}
void main(void) {
gl_Position = filterVertexPosition();
vFragCoord = aVertexPosition * outputFrame.zw;
texcoords(vFragCoord, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);
}
`;var Ta=class extends Ye{constructor(){super(C6,_6)}};var T6=`precision highp float;
varying vec2 vTextureCoord;
varying vec4 vColor;
uniform float uNoise;
uniform float uSeed;
uniform sampler2D uSampler;
float rand(vec2 co)
{
return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);
}
void main()
{
vec4 color = texture2D(uSampler, vTextureCoord);
float randomValue = rand(gl_FragCoord.xy * uSeed);
float diff = (randomValue - 0.5) * uNoise;
// Un-premultiply alpha before applying the color matrix. See issue #3539.
if (color.a > 0.0) {
color.rgb /= color.a;
}
color.r += diff;
color.g += diff;
color.b += diff;
// Premultiply alpha again.
color.rgb *= color.a;
gl_FragColor = color;
}
`;var Fa=class extends Ye{constructor(e=.5,t=Math.random()){super(ya,T6,{uNoise:0,uSeed:0}),this.noise=e,this.seed=t}get noise(){return this.uniforms.uNoise}set noise(e){this.uniforms.uNoise=e}get seed(){return this.uniforms.uSeed}set seed(e){this.uniforms.uSeed=e}};var l9={AlphaFilter:Sa,BlurFilter:_a,BlurFilterPass:Zi,ColorMatrixFilter:Ps,DisplacementFilter:Ca,FXAAFilter:Ta,NoiseFilter:Fa};Object.entries(l9).forEach(([r,e])=>{Object.defineProperty(l9,r,{get(){return ie.deprecation("7.1.0",`filters.${r} has moved to ${r}`),e}})});var u9=class{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}init(e){this.removeTickerListener(),this.events=e,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(e){this._pauseUpdate=e}addTickerListener(){this.tickerAdded||!this.domElement||(d0.system.add(this.tickerUpdate,this,Ot.INTERACTION),this.tickerAdded=!0)}removeTickerListener(){this.tickerAdded&&(d0.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)}pointerMoved(){this._didMove=!0}update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}let e=this.events.rootPointerEvent;this.events.supportsTouchEvents&&e.pointerType==="touch"||globalThis.document.dispatchEvent(new PointerEvent("pointermove",{clientX:e.clientX,clientY:e.clientY}))}tickerUpdate(e){this._deltaTime+=e,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this.update())}},Ir=new u9;var fi=class r{constructor(e){this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=r.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new Ae,this.page=new Ae,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}get layerX(){return this.layer.x}get layerY(){return this.layer.y}get pageX(){return this.page.x}get pageY(){return this.page.y}get data(){return this}composedPath(){return this.manager&&(!this.path||this.path[this.path.length-1]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}initEvent(e,t,i){throw new Error("initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}initUIEvent(e,t,i,s,n){throw new Error("initUIEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}preventDefault(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}stopImmediatePropagation(){this.propagationImmediatelyStopped=!0}stopPropagation(){this.propagationStopped=!0}};var kr=class extends fi{constructor(){super(...arguments),this.client=new Ae,this.movement=new Ae,this.offset=new Ae,this.global=new Ae,this.screen=new Ae}get clientX(){return this.client.x}get clientY(){return this.client.y}get x(){return this.clientX}get y(){return this.clientY}get movementX(){return this.movement.x}get movementY(){return this.movement.y}get offsetX(){return this.offset.x}get offsetY(){return this.offset.y}get globalX(){return this.global.x}get globalY(){return this.global.y}get screenX(){return this.screen.x}get screenY(){return this.screen.y}getLocalPosition(e,t,i){return e.worldTransform.applyInverse(i||this.global,t)}getModifierState(e){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(e)}initMouseEvent(e,t,i,s,n,o,a,l,u,h,d,p,m,x,C){throw new Error("Method not implemented.")}};var rt=class extends kr{constructor(){super(...arguments),this.width=0,this.height=0,this.isPrimary=!1}getCoalescedEvents(){return this.type==="pointermove"||this.type==="mousemove"||this.type==="touchmove"?[this]:[]}getPredictedEvents(){throw new Error("getPredictedEvents is not supported!")}};var mr=class extends kr{constructor(){super(...arguments),this.DOM_DELTA_PIXEL=0,this.DOM_DELTA_LINE=1,this.DOM_DELTA_PAGE=2}};mr.DOM_DELTA_PIXEL=0;mr.DOM_DELTA_LINE=1;mr.DOM_DELTA_PAGE=2;var rg=2048,ig=new Ae,h9=new Ae,Aa=class{constructor(e){this.dispatch=new ie.EventEmitter,this.moveOnAll=!1,this.enableGlobalMoveEvents=!0,this.mappingState={trackingData:{}},this.eventPool=new Map,this._allInteractiveElements=[],this._hitElements=[],this._isPointerMoveEvent=!1,this.rootTarget=e,this.hitPruneFn=this.hitPruneFn.bind(this),this.hitTestFn=this.hitTestFn.bind(this),this.mapPointerDown=this.mapPointerDown.bind(this),this.mapPointerMove=this.mapPointerMove.bind(this),this.mapPointerOut=this.mapPointerOut.bind(this),this.mapPointerOver=this.mapPointerOver.bind(this),this.mapPointerUp=this.mapPointerUp.bind(this),this.mapPointerUpOutside=this.mapPointerUpOutside.bind(this),this.mapWheel=this.mapWheel.bind(this),this.mappingTable={},this.addEventMapping("pointerdown",this.mapPointerDown),this.addEventMapping("pointermove",this.mapPointerMove),this.addEventMapping("pointerout",this.mapPointerOut),this.addEventMapping("pointerleave",this.mapPointerOut),this.addEventMapping("pointerover",this.mapPointerOver),this.addEventMapping("pointerup",this.mapPointerUp),this.addEventMapping("pointerupoutside",this.mapPointerUpOutside),this.addEventMapping("wheel",this.mapWheel)}addEventMapping(e,t){this.mappingTable[e]||(this.mappingTable[e]=[]),this.mappingTable[e].push({fn:t,priority:0}),this.mappingTable[e].sort((i,s)=>i.priority-s.priority)}dispatchEvent(e,t){e.propagationStopped=!1,e.propagationImmediatelyStopped=!1,this.propagate(e,t),this.dispatch.emit(t||e.type,e)}mapEvent(e){if(!this.rootTarget)return;let t=this.mappingTable[e.type];if(t)for(let i=0,s=t.length;i<s;i++)t[i].fn(e);else console.warn(`[EventBoundary]: Event mapping not defined for ${e.type}`)}hitTest(e,t){Ir.pauseUpdate=!0;let s=this._isPointerMoveEvent&&this.enableGlobalMoveEvents?"hitTestMoveRecursive":"hitTestRecursive",n=this[s](this.rootTarget,this.rootTarget.eventMode,ig.set(e,t),this.hitTestFn,this.hitPruneFn);return n&&n[0]}propagate(e,t){if(!e.target)return;let i=e.composedPath();e.eventPhase=e.CAPTURING_PHASE;for(let s=0,n=i.length-1;s<n;s++)if(e.currentTarget=i[s],this.notifyTarget(e,t),e.propagationStopped||e.propagationImmediatelyStopped)return;if(e.eventPhase=e.AT_TARGET,e.currentTarget=e.target,this.notifyTarget(e,t),!(e.propagationStopped||e.propagationImmediatelyStopped)){e.eventPhase=e.BUBBLING_PHASE;for(let s=i.length-2;s>=0;s--)if(e.currentTarget=i[s],this.notifyTarget(e,t),e.propagationStopped||e.propagationImmediatelyStopped)return}}all(e,t,i=this._allInteractiveElements){if(i.length===0)return;e.eventPhase=e.BUBBLING_PHASE;let s=Array.isArray(t)?t:[t];for(let n=i.length-1;n>=0;n--)s.forEach(o=>{e.currentTarget=i[n],this.notifyTarget(e,o)})}propagationPath(e){let t=[e];for(let i=0;i<rg&&e!==this.rootTarget;i++){if(!e.parent)throw new Error("Cannot find propagation path to disconnected target");t.push(e.parent),e=e.parent}return t.reverse(),t}hitTestMoveRecursive(e,t,i,s,n,o=!1){let a=!1;if(this._interactivePrune(e))return null;if((e.eventMode==="dynamic"||t==="dynamic")&&(Ir.pauseUpdate=!1),e.interactiveChildren&&e.children){let h=e.children;for(let d=h.length-1;d>=0;d--){let p=h[d],m=this.hitTestMoveRecursive(p,this._isInteractive(t)?t:p.eventMode,i,s,n,o||n(e,i));if(m){if(m.length>0&&!m[m.length-1].parent)continue;let x=e.isInteractive();(m.length>0||x)&&(x&&this._allInteractiveElements.push(e),m.push(e)),this._hitElements.length===0&&(this._hitElements=m),a=!0}}}let l=this._isInteractive(t),u=e.isInteractive();return u&&u&&this._allInteractiveElements.push(e),o||this._hitElements.length>0?null:a?this._hitElements:l&&!n(e,i)&&s(e,i)?u?[e]:[]:null}hitTestRecursive(e,t,i,s,n){if(this._interactivePrune(e)||n(e,i))return null;if((e.eventMode==="dynamic"||t==="dynamic")&&(Ir.pauseUpdate=!1),e.interactiveChildren&&e.children){let l=e.children;for(let u=l.length-1;u>=0;u--){let h=l[u],d=this.hitTestRecursive(h,this._isInteractive(t)?t:h.eventMode,i,s,n);if(d){if(d.length>0&&!d[d.length-1].parent)continue;let p=e.isInteractive();return(d.length>0||p)&&d.push(e),d}}}let o=this._isInteractive(t),a=e.isInteractive();return o&&s(e,i)?a?[e]:[]:null}_isInteractive(e){return e==="static"||e==="dynamic"}_interactivePrune(e){return!!(!e||e.isMask||!e.visible||!e.renderable||e.eventMode==="none"||e.eventMode==="passive"&&!e.interactiveChildren||e.isMask)}hitPruneFn(e,t){if(e.hitArea&&(e.worldTransform.applyInverse(t,h9),!e.hitArea.contains(h9.x,h9.y)))return!0;if(e._mask){let i=e._mask.isMaskData?e._mask.maskObject:e._mask;if(i&&!i.containsPoint?.(t))return!0}return!1}hitTestFn(e,t){return e.eventMode==="passive"?!1:e.hitArea?!0:e.containsPoint?e.containsPoint(t):!1}notifyTarget(e,t){t=t??e.type;let i=`on${t}`;e.currentTarget[i]?.(e);let s=e.eventPhase===e.CAPTURING_PHASE||e.eventPhase===e.AT_TARGET?`${t}capture`:t;this.notifyListeners(e,s),e.eventPhase===e.AT_TARGET&&this.notifyListeners(e,t)}mapPointerDown(e){if(!(e instanceof rt)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}let t=this.createPointerEvent(e);if(this.dispatchEvent(t,"pointerdown"),t.pointerType==="touch")this.dispatchEvent(t,"touchstart");else if(t.pointerType==="mouse"||t.pointerType==="pen"){let s=t.button===2;this.dispatchEvent(t,s?"rightdown":"mousedown")}let i=this.trackingData(e.pointerId);i.pressTargetsByButton[e.button]=t.composedPath(),this.freeEvent(t)}mapPointerMove(e){if(!(e instanceof rt)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}this._allInteractiveElements.length=0,this._hitElements.length=0,this._isPointerMoveEvent=!0;let t=this.createPointerEvent(e);this._isPointerMoveEvent=!1;let i=t.pointerType==="mouse"||t.pointerType==="pen",s=this.trackingData(e.pointerId),n=this.findMountedTarget(s.overTargets);if(s.overTargets?.length>0&&n!==t.target){let l=e.type==="mousemove"?"mouseout":"pointerout",u=this.createPointerEvent(e,l,n);if(this.dispatchEvent(u,"pointerout"),i&&this.dispatchEvent(u,"mouseout"),!t.composedPath().includes(n)){let h=this.createPointerEvent(e,"pointerleave",n);for(h.eventPhase=h.AT_TARGET;h.target&&!t.composedPath().includes(h.target);)h.currentTarget=h.target,this.notifyTarget(h),i&&this.notifyTarget(h,"mouseleave"),h.target=h.target.parent;this.freeEvent(h)}this.freeEvent(u)}if(n!==t.target){let l=e.type==="mousemove"?"mouseover":"pointerover",u=this.clonePointerEvent(t,l);this.dispatchEvent(u,"pointerover"),i&&this.dispatchEvent(u,"mouseover");let h=n?.parent;for(;h&&h!==this.rootTarget.parent&&h!==t.target;)h=h.parent;if(!h||h===this.rootTarget.parent){let p=this.clonePointerEvent(t,"pointerenter");for(p.eventPhase=p.AT_TARGET;p.target&&p.target!==n&&p.target!==this.rootTarget.parent;)p.currentTarget=p.target,this.notifyTarget(p),i&&this.notifyTarget(p,"mouseenter"),p.target=p.target.parent;this.freeEvent(p)}this.freeEvent(u)}let o=[],a=this.enableGlobalMoveEvents??!0;this.moveOnAll?o.push("pointermove"):this.dispatchEvent(t,"pointermove"),a&&o.push("globalpointermove"),t.pointerType==="touch"&&(this.moveOnAll?o.splice(1,0,"touchmove"):this.dispatchEvent(t,"touchmove"),a&&o.push("globaltouchmove")),i&&(this.moveOnAll?o.splice(1,0,"mousemove"):this.dispatchEvent(t,"mousemove"),a&&o.push("globalmousemove"),this.cursor=t.target?.cursor),o.length>0&&this.all(t,o),this._allInteractiveElements.length=0,this._hitElements.length=0,s.overTargets=t.composedPath(),this.freeEvent(t)}mapPointerOver(e){if(!(e instanceof rt)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}let t=this.trackingData(e.pointerId),i=this.createPointerEvent(e),s=i.pointerType==="mouse"||i.pointerType==="pen";this.dispatchEvent(i,"pointerover"),s&&this.dispatchEvent(i,"mouseover"),i.pointerType==="mouse"&&(this.cursor=i.target?.cursor);let n=this.clonePointerEvent(i,"pointerenter");for(n.eventPhase=n.AT_TARGET;n.target&&n.target!==this.rootTarget.parent;)n.currentTarget=n.target,this.notifyTarget(n),s&&this.notifyTarget(n,"mouseenter"),n.target=n.target.parent;t.overTargets=i.composedPath(),this.freeEvent(i),this.freeEvent(n)}mapPointerOut(e){if(!(e instanceof rt)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}let t=this.trackingData(e.pointerId);if(t.overTargets){let i=e.pointerType==="mouse"||e.pointerType==="pen",s=this.findMountedTarget(t.overTargets),n=this.createPointerEvent(e,"pointerout",s);this.dispatchEvent(n),i&&this.dispatchEvent(n,"mouseout");let o=this.createPointerEvent(e,"pointerleave",s);for(o.eventPhase=o.AT_TARGET;o.target&&o.target!==this.rootTarget.parent;)o.currentTarget=o.target,this.notifyTarget(o),i&&this.notifyTarget(o,"mouseleave"),o.target=o.target.parent;t.overTargets=null,this.freeEvent(n),this.freeEvent(o)}this.cursor=null}mapPointerUp(e){if(!(e instanceof rt)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}let t=performance.now(),i=this.createPointerEvent(e);if(this.dispatchEvent(i,"pointerup"),i.pointerType==="touch")this.dispatchEvent(i,"touchend");else if(i.pointerType==="mouse"||i.pointerType==="pen"){let a=i.button===2;this.dispatchEvent(i,a?"rightup":"mouseup")}let s=this.trackingData(e.pointerId),n=this.findMountedTarget(s.pressTargetsByButton[e.button]),o=n;if(n&&!i.composedPath().includes(n)){let a=n;for(;a&&!i.composedPath().includes(a);){if(i.currentTarget=a,this.notifyTarget(i,"pointerupoutside"),i.pointerType==="touch")this.notifyTarget(i,"touchendoutside");else if(i.pointerType==="mouse"||i.pointerType==="pen"){let l=i.button===2;this.notifyTarget(i,l?"rightupoutside":"mouseupoutside")}a=a.parent}delete s.pressTargetsByButton[e.button],o=a}if(o){let a=this.clonePointerEvent(i,"click");a.target=o,a.path=null,s.clicksByButton[e.button]||(s.clicksByButton[e.button]={clickCount:0,target:a.target,timeStamp:t});let l=s.clicksByButton[e.button];if(l.target===a.target&&t-l.timeStamp<200?++l.clickCount:l.clickCount=1,l.target=a.target,l.timeStamp=t,a.detail=l.clickCount,a.pointerType==="mouse"){let u=a.button===2;this.dispatchEvent(a,u?"rightclick":"click")}else a.pointerType==="touch"&&this.dispatchEvent(a,"tap");this.dispatchEvent(a,"pointertap"),this.freeEvent(a)}this.freeEvent(i)}mapPointerUpOutside(e){if(!(e instanceof rt)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}let t=this.trackingData(e.pointerId),i=this.findMountedTarget(t.pressTargetsByButton[e.button]),s=this.createPointerEvent(e);if(i){let n=i;for(;n;)s.currentTarget=n,this.notifyTarget(s,"pointerupoutside"),s.pointerType==="touch"?this.notifyTarget(s,"touchendoutside"):(s.pointerType==="mouse"||s.pointerType==="pen")&&this.notifyTarget(s,s.button===2?"rightupoutside":"mouseupoutside"),n=n.parent;delete t.pressTargetsByButton[e.button]}this.freeEvent(s)}mapWheel(e){if(!(e instanceof mr)){console.warn("EventBoundary cannot map a non-wheel event as a wheel event");return}let t=this.createWheelEvent(e);this.dispatchEvent(t),this.freeEvent(t)}findMountedTarget(e){if(!e)return null;let t=e[0];for(let i=1;i<e.length&&e[i].parent===t;i++)t=e[i];return t}createPointerEvent(e,t,i){let s=this.allocateEvent(rt);return this.copyPointerData(e,s),this.copyMouseData(e,s),this.copyData(e,s),s.nativeEvent=e.nativeEvent,s.originalEvent=e,s.target=i??this.hitTest(s.global.x,s.global.y)??this._hitElements[0],typeof t=="string"&&(s.type=t),s}createWheelEvent(e){let t=this.allocateEvent(mr);return this.copyWheelData(e,t),this.copyMouseData(e,t),this.copyData(e,t),t.nativeEvent=e.nativeEvent,t.originalEvent=e,t.target=this.hitTest(t.global.x,t.global.y),t}clonePointerEvent(e,t){let i=this.allocateEvent(rt);return i.nativeEvent=e.nativeEvent,i.originalEvent=e.originalEvent,this.copyPointerData(e,i),this.copyMouseData(e,i),this.copyData(e,i),i.target=e.target,i.path=e.composedPath().slice(),i.type=t??i.type,i}copyWheelData(e,t){t.deltaMode=e.deltaMode,t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ}copyPointerData(e,t){e instanceof rt&&t instanceof rt&&(t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist)}copyMouseData(e,t){e instanceof kr&&t instanceof kr&&(t.altKey=e.altKey,t.button=e.button,t.buttons=e.buttons,t.client.copyFrom(e.client),t.ctrlKey=e.ctrlKey,t.metaKey=e.metaKey,t.movement.copyFrom(e.movement),t.screen.copyFrom(e.screen),t.shiftKey=e.shiftKey,t.global.copyFrom(e.global))}copyData(e,t){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=performance.now(),t.type=e.type,t.detail=e.detail,t.view=e.view,t.which=e.which,t.layer.copyFrom(e.layer),t.page.copyFrom(e.page)}trackingData(e){return this.mappingState.trackingData[e]||(this.mappingState.trackingData[e]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[e]}allocateEvent(e){this.eventPool.has(e)||this.eventPool.set(e,[]);let t=this.eventPool.get(e).pop()||new e(this);return t.eventPhase=t.NONE,t.currentTarget=null,t.path=null,t.target=null,t}freeEvent(e){if(e.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");let t=e.constructor;this.eventPool.has(t)||this.eventPool.set(t,[]),this.eventPool.get(t).push(e)}notifyListeners(e,t){let i=e.currentTarget._events[t];if(i&&e.currentTarget.isInteractive())if("fn"in i)i.once&&e.currentTarget.removeListener(t,i.fn,void 0,!0),i.fn.call(i.context,e);else for(let s=0,n=i.length;s<n&&!e.propagationImmediatelyStopped;s++)i[s].once&&e.currentTarget.removeListener(t,i[s].fn,void 0,!0),i[s].fn.call(i[s].context,e)}};var sg=1,ng={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},c9=class{constructor(r){this.supportsTouchEvents="ontouchstart"in globalThis,this.supportsPointerEvents=!!globalThis.PointerEvent,this.domElement=null,this.resolution=1,this.renderer=r,this.rootBoundary=new Aa(null),Ir.init(this),this.autoPreventDefault=!0,this.eventsAdded=!1,this.rootPointerEvent=new rt(null),this.rootWheelEvent=new mr(null),this.cursorStyles={default:"inherit",pointer:"pointer"},this.features=new Proxy({...c9.defaultEventFeatures},{set:(e,t,i)=>(t==="globalMove"&&(this.rootBoundary.enableGlobalMoveEvents=i),e[t]=i,!0)}),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOverOut=this.onPointerOverOut.bind(this),this.onWheel=this.onWheel.bind(this)}static get defaultEventMode(){return this._defaultEventMode}init(r){let{view:e,resolution:t}=this.renderer;this.setTargetElement(e),this.resolution=t,c9._defaultEventMode=r.eventMode??"auto",Object.assign(this.features,r.eventFeatures??{}),this.rootBoundary.enableGlobalMoveEvents=this.features.globalMove}resolutionChange(r){this.resolution=r}destroy(){this.setTargetElement(null),this.renderer=null}setCursor(r){r=r||"default";let e=!0;if(globalThis.OffscreenCanvas&&this.domElement instanceof OffscreenCanvas&&(e=!1),this.currentCursor===r)return;this.currentCursor=r;let t=this.cursorStyles[r];if(t)switch(typeof t){case"string":e&&(this.domElement.style.cursor=t);break;case"function":t(r);break;case"object":e&&Object.assign(this.domElement.style,t);break}else e&&typeof r=="string"&&!Object.prototype.hasOwnProperty.call(this.cursorStyles,r)&&(this.domElement.style.cursor=r)}get pointer(){return this.rootPointerEvent}onPointerDown(r){if(!this.features.click||(this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,this.supportsTouchEvents&&r.pointerType==="touch"))return;let e=this.normalizeToPointerData(r);this.autoPreventDefault&&e[0].isNormalized&&(r.cancelable||!("cancelable"in r))&&r.preventDefault();for(let t=0,i=e.length;t<i;t++){let s=e[t],n=this.bootstrapEvent(this.rootPointerEvent,s);this.rootBoundary.mapEvent(n)}this.setCursor(this.rootBoundary.cursor)}onPointerMove(r){if(!this.features.move||(this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,this.supportsTouchEvents&&r.pointerType==="touch"))return;Ir.pointerMoved();let e=this.normalizeToPointerData(r);for(let t=0,i=e.length;t<i;t++){let s=this.bootstrapEvent(this.rootPointerEvent,e[t]);this.rootBoundary.mapEvent(s)}this.setCursor(this.rootBoundary.cursor)}onPointerUp(r){if(!this.features.click||(this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,this.supportsTouchEvents&&r.pointerType==="touch"))return;let e=r.target;r.composedPath&&r.composedPath().length>0&&(e=r.composedPath()[0]);let t=e!==this.domElement?"outside":"",i=this.normalizeToPointerData(r);for(let s=0,n=i.length;s<n;s++){let o=this.bootstrapEvent(this.rootPointerEvent,i[s]);o.type+=t,this.rootBoundary.mapEvent(o)}this.setCursor(this.rootBoundary.cursor)}onPointerOverOut(r){if(!this.features.click||(this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,this.supportsTouchEvents&&r.pointerType==="touch"))return;let e=this.normalizeToPointerData(r);for(let t=0,i=e.length;t<i;t++){let s=this.bootstrapEvent(this.rootPointerEvent,e[t]);this.rootBoundary.mapEvent(s)}this.setCursor(this.rootBoundary.cursor)}onWheel(r){if(!this.features.wheel)return;let e=this.normalizeWheelEvent(r);this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,this.rootBoundary.mapEvent(e)}setTargetElement(r){this.removeEvents(),this.domElement=r,Ir.domElement=r,this.addEvents()}addEvents(){if(this.eventsAdded||!this.domElement)return;Ir.addTickerListener();let r=this.domElement.style;r&&(globalThis.navigator.msPointerEnabled?(r.msContentZooming="none",r.msTouchAction="none"):this.supportsPointerEvents&&(r.touchAction="none")),this.supportsPointerEvents?(globalThis.document.addEventListener("pointermove",this.onPointerMove,!0),this.domElement.addEventListener("pointerdown",this.onPointerDown,!0),this.domElement.addEventListener("pointerleave",this.onPointerOverOut,!0),this.domElement.addEventListener("pointerover",this.onPointerOverOut,!0),globalThis.addEventListener("pointerup",this.onPointerUp,!0)):(globalThis.document.addEventListener("mousemove",this.onPointerMove,!0),this.domElement.addEventListener("mousedown",this.onPointerDown,!0),this.domElement.addEventListener("mouseout",this.onPointerOverOut,!0),this.domElement.addEventListener("mouseover",this.onPointerOverOut,!0),globalThis.addEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.domElement.addEventListener("touchstart",this.onPointerDown,!0),this.domElement.addEventListener("touchend",this.onPointerUp,!0),this.domElement.addEventListener("touchmove",this.onPointerMove,!0)),this.domElement.addEventListener("wheel",this.onWheel,{passive:!0,capture:!0}),this.eventsAdded=!0}removeEvents(){if(!this.eventsAdded||!this.domElement)return;Ir.removeTickerListener();let r=this.domElement.style;globalThis.navigator.msPointerEnabled?(r.msContentZooming="",r.msTouchAction=""):this.supportsPointerEvents&&(r.touchAction=""),this.supportsPointerEvents?(globalThis.document.removeEventListener("pointermove",this.onPointerMove,!0),this.domElement.removeEventListener("pointerdown",this.onPointerDown,!0),this.domElement.removeEventListener("pointerleave",this.onPointerOverOut,!0),this.domElement.removeEventListener("pointerover",this.onPointerOverOut,!0),globalThis.removeEventListener("pointerup",this.onPointerUp,!0)):(globalThis.document.removeEventListener("mousemove",this.onPointerMove,!0),this.domElement.removeEventListener("mousedown",this.onPointerDown,!0),this.domElement.removeEventListener("mouseout",this.onPointerOverOut,!0),this.domElement.removeEventListener("mouseover",this.onPointerOverOut,!0),globalThis.removeEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.domElement.removeEventListener("touchstart",this.onPointerDown,!0),this.domElement.removeEventListener("touchend",this.onPointerUp,!0),this.domElement.removeEventListener("touchmove",this.onPointerMove,!0)),this.domElement.removeEventListener("wheel",this.onWheel,!0),this.domElement=null,this.eventsAdded=!1}mapPositionToPoint(r,e,t){let i;this.domElement.parentElement?i=this.domElement.getBoundingClientRect():i={x:0,y:0,width:this.domElement.width,height:this.domElement.height,left:0,top:0};let s=1/this.resolution;r.x=(e-i.left)*(this.domElement.width/i.width)*s,r.y=(t-i.top)*(this.domElement.height/i.height)*s}normalizeToPointerData(r){let e=[];if(this.supportsTouchEvents&&r instanceof TouchEvent)for(let t=0,i=r.changedTouches.length;t<i;t++){let s=r.changedTouches[t];typeof s.button>"u"&&(s.button=0),typeof s.buttons>"u"&&(s.buttons=1),typeof s.isPrimary>"u"&&(s.isPrimary=r.touches.length===1&&r.type==="touchstart"),typeof s.width>"u"&&(s.width=s.radiusX||1),typeof s.height>"u"&&(s.height=s.radiusY||1),typeof s.tiltX>"u"&&(s.tiltX=0),typeof s.tiltY>"u"&&(s.tiltY=0),typeof s.pointerType>"u"&&(s.pointerType="touch"),typeof s.pointerId>"u"&&(s.pointerId=s.identifier||0),typeof s.pressure>"u"&&(s.pressure=s.force||.5),typeof s.twist>"u"&&(s.twist=0),typeof s.tangentialPressure>"u"&&(s.tangentialPressure=0),typeof s.layerX>"u"&&(s.layerX=s.offsetX=s.clientX),typeof s.layerY>"u"&&(s.layerY=s.offsetY=s.clientY),s.isNormalized=!0,s.type=r.type,e.push(s)}else if(!globalThis.MouseEvent||r instanceof MouseEvent&&(!this.supportsPointerEvents||!(r instanceof globalThis.PointerEvent))){let t=r;typeof t.isPrimary>"u"&&(t.isPrimary=!0),typeof t.width>"u"&&(t.width=1),typeof t.height>"u"&&(t.height=1),typeof t.tiltX>"u"&&(t.tiltX=0),typeof t.tiltY>"u"&&(t.tiltY=0),typeof t.pointerType>"u"&&(t.pointerType="mouse"),typeof t.pointerId>"u"&&(t.pointerId=sg),typeof t.pressure>"u"&&(t.pressure=.5),typeof t.twist>"u"&&(t.twist=0),typeof t.tangentialPressure>"u"&&(t.tangentialPressure=0),t.isNormalized=!0,e.push(t)}else e.push(r);return e}normalizeWheelEvent(r){let e=this.rootWheelEvent;return this.transferMouseData(e,r),e.deltaX=r.deltaX,e.deltaY=r.deltaY,e.deltaZ=r.deltaZ,e.deltaMode=r.deltaMode,this.mapPositionToPoint(e.screen,r.clientX,r.clientY),e.global.copyFrom(e.screen),e.offset.copyFrom(e.screen),e.nativeEvent=r,e.type=r.type,e}bootstrapEvent(r,e){return r.originalEvent=null,r.nativeEvent=e,r.pointerId=e.pointerId,r.width=e.width,r.height=e.height,r.isPrimary=e.isPrimary,r.pointerType=e.pointerType,r.pressure=e.pressure,r.tangentialPressure=e.tangentialPressure,r.tiltX=e.tiltX,r.tiltY=e.tiltY,r.twist=e.twist,this.transferMouseData(r,e),this.mapPositionToPoint(r.screen,e.clientX,e.clientY),r.global.copyFrom(r.screen),r.offset.copyFrom(r.screen),r.isTrusted=e.isTrusted,r.type==="pointerleave"&&(r.type="pointerout"),r.type.startsWith("mouse")&&(r.type=r.type.replace("mouse","pointer")),r.type.startsWith("touch")&&(r.type=ng[r.type]||r.type),r}transferMouseData(r,e){r.isTrusted=e.isTrusted,r.srcElement=e.srcElement,r.timeStamp=performance.now(),r.type=e.type,r.altKey=e.altKey,r.button=e.button,r.buttons=e.buttons,r.client.x=e.clientX,r.client.y=e.clientY,r.ctrlKey=e.ctrlKey,r.metaKey=e.metaKey,r.movement.x=e.movementX,r.movement.y=e.movementY,r.page.x=e.pageX,r.page.y=e.pageY,r.relatedTarget=null,r.shiftKey=e.shiftKey}},Ns=c9;Ns.extension={name:"events",type:[$.RendererSystem,$.CanvasRendererSystem]};Ns.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0};K.add(Ns);function F6(r){return r==="dynamic"||r==="static"}var A6={onclick:null,onmousedown:null,onmouseenter:null,onmouseleave:null,onmousemove:null,onglobalmousemove:null,onmouseout:null,onmouseover:null,onmouseup:null,onmouseupoutside:null,onpointercancel:null,onpointerdown:null,onpointerenter:null,onpointerleave:null,onpointermove:null,onglobalpointermove:null,onpointerout:null,onpointerover:null,onpointertap:null,onpointerup:null,onpointerupoutside:null,onrightclick:null,onrightdown:null,onrightup:null,onrightupoutside:null,ontap:null,ontouchcancel:null,ontouchend:null,ontouchendoutside:null,ontouchmove:null,onglobaltouchmove:null,ontouchstart:null,onwheel:null,_internalInteractive:void 0,get interactive(){return this._internalInteractive??F6(Ns.defaultEventMode)},set interactive(r){ie.deprecation("7.2.0","Setting interactive is deprecated, use eventMode = 'none'/'passive'/'auto'/'static'/'dynamic' instead."),this._internalInteractive=r,this.eventMode=r?"static":"auto"},_internalEventMode:void 0,get eventMode(){return this._internalEventMode??Ns.defaultEventMode},set eventMode(r){this._internalInteractive=F6(r),this._internalEventMode=r},isInteractive(){return this.eventMode==="static"||this.eventMode==="dynamic"},interactiveChildren:!0,hitArea:null,addEventListener(r,e,t){let i=typeof t=="boolean"&&t||typeof t=="object"&&t.capture,s=typeof e=="function"?void 0:e;r=i?`${r}capture`:r,e=typeof e=="function"?e:e.handleEvent,this.on(r,e,s)},removeEventListener(r,e,t){let i=typeof t=="boolean"&&t||typeof t=="object"&&t.capture,s=typeof e=="function"?void 0:e;r=i?`${r}capture`:r,e=typeof e=="function"?e:e.handleEvent,this.off(r,e,s)},dispatchEvent(r){if(!(r instanceof fi))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");return r.defaultPrevented=!1,r.path=null,r.target=this,r.manager.dispatchEvent(r),!r.defaultPrevented}};Xe.mixin(A6);var d9={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,renderId:-1};Xe.mixin(d9);var og=9,Vu=100,ag=0,lg=0,I6=2,k6=1,ug=-1e3,hg=-1e3,cg=2,Ia=class{constructor(e){this.debug=!1,this._isActive=!1,this._isMobileAccessibility=!1,this.pool=[],this.renderId=0,this.children=[],this.androidUpdateCount=0,this.androidUpdateFrequency=500,this._hookDiv=null,(ie.isMobile.tablet||ie.isMobile.phone)&&this.createTouchHook();let t=document.createElement("div");t.style.width=`${Vu}px`,t.style.height=`${Vu}px`,t.style.position="absolute",t.style.top=`${ag}px`,t.style.left=`${lg}px`,t.style.zIndex=I6.toString(),this.div=t,this.renderer=e,this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),globalThis.addEventListener("keydown",this._onKeyDown,!1)}get isActive(){return this._isActive}get isMobileAccessibility(){return this._isMobileAccessibility}createTouchHook(){let e=document.createElement("button");e.style.width=`${k6}px`,e.style.height=`${k6}px`,e.style.position="absolute",e.style.top=`${ug}px`,e.style.left=`${hg}px`,e.style.zIndex=cg.toString(),e.style.backgroundColor="#FF0000",e.title="select to enable accessibility for this content",e.addEventListener("focus",()=>{this._isMobileAccessibility=!0,this.activate(),this.destroyTouchHook()}),document.body.appendChild(e),this._hookDiv=e}destroyTouchHook(){this._hookDiv&&(document.body.removeChild(this._hookDiv),this._hookDiv=null)}activate(){this._isActive||(this._isActive=!0,globalThis.document.addEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),this.renderer.view.parentNode?.appendChild(this.div))}deactivate(){!this._isActive||this._isMobileAccessibility||(this._isActive=!1,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),this.div.parentNode?.removeChild(this.div))}updateAccessibleObjects(e){if(!e.visible||!e.accessibleChildren)return;e.accessible&&e.isInteractive()&&(e._accessibleActive||this.addChild(e),e.renderId=this.renderId);let t=e.children;if(t)for(let i=0;i<t.length;i++)this.updateAccessibleObjects(t[i])}update(){let e=performance.now();if(ie.isMobile.android.device&&e<this.androidUpdateCount||(this.androidUpdateCount=e+this.androidUpdateFrequency,!this.renderer.renderingToScreen))return;this.renderer.lastObjectRendered&&this.updateAccessibleObjects(this.renderer.lastObjectRendered);let{x:t,y:i,width:s,height:n}=this.renderer.view.getBoundingClientRect(),{width:o,height:a,resolution:l}=this.renderer,u=s/o*l,h=n/a*l,d=this.div;d.style.left=`${t}px`,d.style.top=`${i}px`,d.style.width=`${o}px`,d.style.height=`${a}px`;for(let p=0;p<this.children.length;p++){let m=this.children[p];if(m.renderId!==this.renderId)m._accessibleActive=!1,ie.removeItems(this.children,p,1),this.div.removeChild(m._accessibleDiv),this.pool.push(m._accessibleDiv),m._accessibleDiv=null,p--;else{d=m._accessibleDiv;let x=m.hitArea,C=m.worldTransform;m.hitArea?(d.style.left=`${(C.tx+x.x*C.a)*u}px`,d.style.top=`${(C.ty+x.y*C.d)*h}px`,d.style.width=`${x.width*C.a*u}px`,d.style.height=`${x.height*C.d*h}px`):(x=m.getBounds(),this.capHitArea(x),d.style.left=`${x.x*u}px`,d.style.top=`${x.y*h}px`,d.style.width=`${x.width*u}px`,d.style.height=`${x.height*h}px`,d.title!==m.accessibleTitle&&m.accessibleTitle!==null&&(d.title=m.accessibleTitle),d.getAttribute("aria-label")!==m.accessibleHint&&m.accessibleHint!==null&&d.setAttribute("aria-label",m.accessibleHint)),(m.accessibleTitle!==d.title||m.tabIndex!==d.tabIndex)&&(d.title=m.accessibleTitle,d.tabIndex=m.tabIndex,this.debug&&this.updateDebugHTML(d))}}this.renderId++}updateDebugHTML(e){e.innerHTML=`type: ${e.type}</br> title : ${e.title}</br> tabIndex: ${e.tabIndex}`}capHitArea(e){e.x<0&&(e.width+=e.x,e.x=0),e.y<0&&(e.height+=e.y,e.y=0);let{width:t,height:i}=this.renderer;e.x+e.width>t&&(e.width=t-e.x),e.y+e.height>i&&(e.height=i-e.y)}addChild(e){let t=this.pool.pop();t||(t=document.createElement("button"),t.style.width=`${Vu}px`,t.style.height=`${Vu}px`,t.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",t.style.position="absolute",t.style.zIndex=I6.toString(),t.style.borderStyle="none",navigator.userAgent.toLowerCase().includes("chrome")?t.setAttribute("aria-live","off"):t.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?t.setAttribute("aria-relevant","additions"):t.setAttribute("aria-relevant","text"),t.addEventListener("click",this._onClick.bind(this)),t.addEventListener("focus",this._onFocus.bind(this)),t.addEventListener("focusout",this._onFocusOut.bind(this))),t.style.pointerEvents=e.accessiblePointerEvents,t.type=e.accessibleType,e.accessibleTitle&&e.accessibleTitle!==null?t.title=e.accessibleTitle:(!e.accessibleHint||e.accessibleHint===null)&&(t.title=`displayObject ${e.tabIndex}`),e.accessibleHint&&e.accessibleHint!==null&&t.setAttribute("aria-label",e.accessibleHint),this.debug&&this.updateDebugHTML(t),e._accessibleActive=!0,e._accessibleDiv=t,t.displayObject=e,this.children.push(e),this.div.appendChild(e._accessibleDiv),e._accessibleDiv.tabIndex=e.tabIndex}_dispatchEvent(e,t){let{displayObject:i}=e.target,s=this.renderer.events.rootBoundary,n=Object.assign(new fi(s),{target:i});s.rootTarget=this.renderer.lastObjectRendered,t.forEach(o=>s.dispatchEvent(n,o))}_onClick(e){this._dispatchEvent(e,["click","pointertap","tap"])}_onFocus(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","assertive"),this._dispatchEvent(e,["mouseover"])}_onFocusOut(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","polite"),this._dispatchEvent(e,["mouseout"])}_onKeyDown(e){e.keyCode===og&&this.activate()}_onMouseMove(e){e.movementX===0&&e.movementY===0||this.deactivate()}destroy(){this.destroyTouchHook(),this.div=null,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null}};Ia.extension={name:"accessibility",type:[$.RendererPlugin,$.CanvasRendererPlugin]};K.add(Ia);var p9=class{constructor(r){this.stage=new Je,r=Object.assign({forceCanvas:!1},r),this.renderer=r9(r),p9._plugins.forEach(e=>{e.init.call(this,r)})}render(){this.renderer.render(this.stage)}get view(){return this.renderer.view}get screen(){return this.renderer.screen}destroy(r,e){let t=p9._plugins.slice(0);t.reverse(),t.forEach(i=>{i.destroy.call(this)}),this.stage.destroy(e),this.stage=null,this.renderer.destroy(r),this.renderer=null}},f9=p9;f9._plugins=[];K.handleByList($.Application,f9._plugins);var ka=class{static init(e){Object.defineProperty(this,"resizeTo",{set(t){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=t,t&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this.cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this.cancelResize=()=>{this._resizeId&&(cancelAnimationFrame(this._resizeId),this._resizeId=null)},this.resize=()=>{if(!this._resizeTo)return;this.cancelResize();let t,i;if(this._resizeTo===globalThis.window)t=globalThis.innerWidth,i=globalThis.innerHeight;else{let{clientWidth:s,clientHeight:n}=this._resizeTo;t=s,i=n}this.renderer.resize(t,i),this.render()},this._resizeId=null,this._resizeTo=null,this.resizeTo=e.resizeTo||null}static destroy(){globalThis.removeEventListener("resize",this.queueResize),this.cancelResize(),this.cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}};ka.extension=$.Application;K.add(ka);var M6={loader:$.LoadParser,resolver:$.ResolveParser,cache:$.CacheParser,detection:$.DetectionParser};K.handle($.Asset,r=>{let e=r.ref;Object.entries(M6).filter(([t])=>!!e[t]).forEach(([t,i])=>K.add(Object.assign(e[t],{extension:e[t].extension??i})))},r=>{let e=r.ref;Object.keys(M6).filter(t=>!!e[t]).forEach(t=>K.remove(e[t]))});var zu=class{constructor(e,t=!1){this._loader=e,this._assetList=[],this._isLoading=!1,this._maxConcurrent=1,this.verbose=t}add(e){e.forEach(t=>{this._assetList.push(t)}),this.verbose&&console.log("[BackgroundLoader] assets: ",this._assetList),this._isActive&&!this._isLoading&&this._next()}async _next(){if(this._assetList.length&&this._isActive){this._isLoading=!0;let e=[],t=Math.min(this._assetList.length,this._maxConcurrent);for(let i=0;i<t;i++)e.push(this._assetList.pop());await this._loader.load(e),this._isLoading=!1,this._next()}}get active(){return this._isActive}set active(e){this._isActive!==e&&(this._isActive=e,e&&!this._isLoading&&this._next())}};function Jt(r,e){if(Array.isArray(e)){for(let t of e)if(r.startsWith(`data:${t}`))return!0;return!1}return r.startsWith(`data:${e}`)}function it(r,e){let t=r.split("?")[0],i=ie.path.extname(t).toLowerCase();return Array.isArray(e)?e.includes(i):i===e}var ft=(r,e)=>(Array.isArray(r)||(r=[r]),e?r.map(t=>typeof t=="string"?e(t):t):r);var Bs=(r,e)=>{let t=e.split("?")[1];return t&&(r+=`?${t}`),r};function P6(r,e,t,i,s){let n=e[t];for(let o=0;o<n.length;o++){let a=n[o];t<e.length-1?P6(r.replace(i[t],a),e,t+1,i,s):s.push(r.replace(i[t],a))}}function Wu(r){let e=/\{(.*?)\}/g,t=r.match(e),i=[];if(t){let s=[];t.forEach(n=>{let o=n.substring(1,n.length-1).split(",");s.push(o)}),P6(r,s,0,t,i)}else i.push(r);return i}var gi=r=>!Array.isArray(r);var g9=class{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(e){return this._cache.has(e)}get(e){let t=this._cache.get(e);return t||console.warn(`[Assets] Asset id ${e} was not found in the Cache`),t}set(e,t){let i=ft(e),s;for(let a=0;a<this.parsers.length;a++){let l=this.parsers[a];if(l.test(t)){s=l.getCacheableAssets(i,t);break}}s||(s={},i.forEach(a=>{s[a]=t}));let n=Object.keys(s),o={cacheKeys:n,keys:i};if(i.forEach(a=>{this._cacheMap.set(a,o)}),n.forEach(a=>{this._cache.has(a)&&this._cache.get(a)!==t&&console.warn("[Cache] already has key:",a),this._cache.set(a,s[a])}),t instanceof xe){let a=t;i.forEach(l=>{a.baseTexture!==xe.EMPTY.baseTexture&&ye.addToCache(a.baseTexture,l),xe.addToCache(a,l)})}}remove(e){if(this._cacheMap.get(e),!this._cacheMap.has(e)){console.warn(`[Assets] Asset id ${e} was not found in the Cache`);return}let t=this._cacheMap.get(e);t.cacheKeys.forEach(s=>{this._cache.delete(s)}),t.keys.forEach(s=>{this._cacheMap.delete(s)})}get parsers(){return this._parsers}},Qi=new g9;var Hu=class{constructor(){this._parsers=[],this._parsersValidated=!1,this.parsers=new Proxy(this._parsers,{set:(e,t,i)=>(this._parsersValidated=!1,e[t]=i,!0)}),this.promiseCache={}}reset(){this._parsersValidated=!1,this.promiseCache={}}_getLoadPromiseAndParser(e,t){let i={promise:null,parser:null};return i.promise=(async()=>{let s=null,n=null;if(t.loadParser&&(n=this._parserHash[t.loadParser],n||console.warn(`[Assets] specified load parser "${t.loadParser}" not found while loading ${e}`)),!n){for(let o=0;o<this.parsers.length;o++){let a=this.parsers[o];if(a.load&&a.test?.(e,t,this)){n=a;break}}if(!n)return console.warn(`[Assets] ${e} could not be loaded as we don't know how to parse it, ensure the correct parser has been added`),null}s=await n.load(e,t,this),i.parser=n;for(let o=0;o<this.parsers.length;o++){let a=this.parsers[o];a.parse&&a.parse&&await a.testParse?.(s,t,this)&&(s=await a.parse(s,t,this)||s,i.parser=a)}return s})(),i}async load(e,t){this._parsersValidated||this._validateParsers();let i=0,s={},n=gi(e),o=ft(e,u=>({src:u})),a=o.length,l=o.map(async u=>{let h=ie.path.toAbsolute(u.src);if(!s[u.src])try{this.promiseCache[h]||(this.promiseCache[h]=this._getLoadPromiseAndParser(h,u)),s[u.src]=await this.promiseCache[h].promise,t&&t(++i/a)}catch(d){throw delete this.promiseCache[h],delete s[u.src],new Error(`[Loader.load] Failed to load ${h}.
${d}`)}});return await Promise.all(l),n?s[o[0].src]:s}async unload(e){let i=ft(e,s=>({src:s})).map(async s=>{let n=ie.path.toAbsolute(s.src),o=this.promiseCache[n];if(o){let a=await o.promise;o.parser?.unload?.(a,s,this),delete this.promiseCache[n]}});await Promise.all(i)}_validateParsers(){this._parsersValidated=!0,this._parserHash=this._parsers.filter(e=>e.name).reduce((e,t)=>(e[t.name]&&console.warn(`[Assets] loadParser name conflict "${t.name}"`),{...e,[t.name]:t}),{})}};var w0=(r=>(r[r.Low=0]="Low",r[r.Normal=1]="Normal",r[r.High=2]="High",r))(w0||{});var dg=".json",pg="application/json",m9={extension:{type:$.LoadParser,priority:w0.Low},name:"loadJson",test(r){return Jt(r,pg)||it(r,dg)},async load(r){return await(await j.ADAPTER.fetch(r)).json()}};K.add(m9);var fg=".txt",gg="text/plain",y9={name:"loadTxt",extension:{type:$.LoadParser,priority:w0.Low},test(r){return Jt(r,gg)||it(r,fg)},async load(r){return await(await j.ADAPTER.fetch(r)).text()}};K.add(y9);var mg=["normal","bold","100","200","300","400","500","600","700","800","900"],yg=[".ttf",".otf",".woff",".woff2"],xg=["font/ttf","font/otf","font/woff","font/woff2"],vg=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;function x9(r){let e=ie.path.extname(r),s=ie.path.basename(r,e).replace(/(-|_)/g," ").toLowerCase().split(" ").map(a=>a.charAt(0).toUpperCase()+a.slice(1)),n=s.length>0;for(let a of s)if(!a.match(vg)){n=!1;break}let o=s.join(" ");return n||(o=`"${o.replace(/[\\"]/g,"\\$&")}"`),o}var v9={extension:{type:$.LoadParser,priority:w0.Low},name:"loadWebFont",test(r){return Jt(r,xg)||it(r,yg)},async load(r,e){let t=j.ADAPTER.getFontFaceSet();if(t){let i=[],s=e.data?.family??x9(r),n=e.data?.weights?.filter(a=>mg.includes(a))??["normal"],o=e.data??{};for(let a=0;a<n.length;a++){let l=n[a],u=new FontFace(s,`url(${encodeURI(r)})`,{...o,weight:l});await u.load(),t.add(u),i.push(u)}return i.length===1?i[0]:i}return console.warn("[loadWebFont] FontFace API is not supported. Skipping loading font"),null},unload(r){(Array.isArray(r)?r:[r]).forEach(e=>j.ADAPTER.getFontFaceSet().delete(e))}};K.add(v9);var N6=0,D9,Dg="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=",Eg={id:"checkImageBitmap",code:`
async function checkImageBitmap()
{
try
{
if (typeof createImageBitmap !== 'function') return false;
const response = await fetch('${Dg}');
const imageBlob = await response.blob();
const imageBitmap = await createImageBitmap(imageBlob);
return imageBitmap.width === 1 && imageBitmap.height === 1;
}
catch (e)
{
return false;
}
}
checkImageBitmap().then((result) => { self.postMessage(result); });
`},bg={id:"loadImageBitmap",code:`
async function loadImageBitmap(url)
{
const response = await fetch(url);
if (!response.ok)
{
throw new Error(\`[WorkerManager.loadImageBitmap] Failed to fetch \${url}: \`
+ \`\${response.status} \${response.statusText}\`);
}
const imageBlob = await response.blob();
const imageBitmap = await createImageBitmap(imageBlob);
return imageBitmap;
}
self.onmessage = async (event) =>
{
try
{
const imageBitmap = await loadImageBitmap(event.data.data[0]);
self.postMessage({
data: imageBitmap,
uuid: event.data.uuid,
id: event.data.id,
}, [imageBitmap]);
}
catch(e)
{
self.postMessage({
error: e,
uuid: event.data.uuid,
id: event.data.id,
});
}
};`},E9,b9=class{constructor(){this._initialized=!1,this._createdWorkers=0,this.workerPool=[],this.queue=[],this.resolveHash={}}isImageBitmapSupported(){return this._isImageBitmapSupported!==void 0?this._isImageBitmapSupported:(this._isImageBitmapSupported=new Promise(e=>{let t=URL.createObjectURL(new Blob([Eg.code],{type:"application/javascript"})),i=new Worker(t);i.addEventListener("message",s=>{i.terminate(),URL.revokeObjectURL(t),e(s.data)})}),this._isImageBitmapSupported)}loadImageBitmap(e){return this._run("loadImageBitmap",[e])}async _initWorkers(){this._initialized||(this._initialized=!0)}getWorker(){D9===void 0&&(D9=navigator.hardwareConcurrency||4);let e=this.workerPool.pop();return!e&&this._createdWorkers<D9&&(E9||(E9=URL.createObjectURL(new Blob([bg.code],{type:"application/javascript"}))),this._createdWorkers++,e=new Worker(E9),e.addEventListener("message",t=>{this.complete(t.data),this.returnWorker(t.target),this.next()})),e}returnWorker(e){this.workerPool.push(e)}complete(e){e.error!==void 0?this.resolveHash[e.uuid].reject(e.error):this.resolveHash[e.uuid].resolve(e.data),this.resolveHash[e.uuid]=null}async _run(e,t){await this._initWorkers();let i=new Promise((s,n)=>{this.queue.push({id:e,arguments:t,resolve:s,reject:n})});return this.next(),i}next(){if(!this.queue.length)return;let e=this.getWorker();if(!e)return;let t=this.queue.pop(),i=t.id;this.resolveHash[N6]={resolve:t.resolve,reject:t.reject},e.postMessage({data:t.arguments,uuid:N6++,id:i})}},w9=new b9;function Mr(r,e,t){let i=new xe(r);return i.baseTexture.on("dispose",()=>{delete e.promiseCache[t]}),i}var wg=[".jpeg",".jpg",".png",".webp",".avif"],Sg=["image/jpeg","image/png","image/webp","image/avif"];async function S9(r){let e=await j.ADAPTER.fetch(r);if(!e.ok)throw new Error(`[loadImageBitmap] Failed to fetch ${r}: ${e.status} ${e.statusText}`);let t=await e.blob();return await createImageBitmap(t)}var mi={name:"loadTextures",extension:{type:$.LoadParser,priority:w0.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test(r){return Jt(r,Sg)||it(r,wg)},async load(r,e,t){let i=null;globalThis.createImageBitmap&&this.config.preferCreateImageBitmap?this.config.preferWorkers&&await w9.isImageBitmapSupported()?i=await w9.loadImageBitmap(r):i=await S9(r):i=await new Promise(n=>{i=new Image,i.crossOrigin=this.config.crossOrigin,i.src=r,i.complete?n(i):i.onload=()=>{n(i)}});let s=new ye(i,{resolution:ie.getResolutionOfUrl(r),...e.data});return s.resource.src=r,Mr(s,t,r)},unload(r){r.destroy(!0)}};K.add(mi);var _g=".svg",Cg="image/svg+xml",_9={extension:{type:$.LoadParser,priority:w0.High},name:"loadSVG",test(r){return Jt(r,Cg)||it(r,_g)},async testParse(r){return pi.test(r)},async parse(r,e,t){let i=new pi(r,e?.data?.resourceOptions);await i.load();let s=new ye(i,{resolution:ie.getResolutionOfUrl(r),...e?.data});return s.resource.src=r,Mr(s,t,r)},async load(r,e){return(await j.ADAPTER.fetch(r)).text()},unload:mi.unload};K.add(_9);var ju=class{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(e,t)=>`${e}${this._bundleIdConnector}${t}`,extractAssetIdFromBundle:(e,t)=>t.replace(`${e}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(e){if(this._bundleIdConnector=e.connector??this._bundleIdConnector,this._createBundleAssetId=e.createBundleAssetId??this._createBundleAssetId,this._extractAssetIdFromBundle=e.extractAssetIdFromBundle??this._extractAssetIdFromBundle,this._extractAssetIdFromBundle("foo",this._createBundleAssetId("foo","bar"))!=="bar")throw new Error("[Resolver] GenerateBundleAssetId are not working correctly")}prefer(...e){e.forEach(t=>{this._preferredOrder.push(t),t.priority||(t.priority=Object.keys(t.params))}),this._resolverHash={}}set basePath(e){this._basePath=e}get basePath(){return this._basePath}set rootPath(e){this._rootPath=e}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(e){if(typeof e=="string")this._defaultSearchParams=e;else{let t=e;this._defaultSearchParams=Object.keys(t).map(i=>`${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`).join("&")}}addManifest(e){this._manifest&&console.warn("[Resolver] Manifest already exists, this will be overwritten"),this._manifest=e,e.bundles.forEach(t=>{this.addBundle(t.name,t.assets)})}addBundle(e,t){let i=[];Array.isArray(t)?t.forEach(s=>{if(typeof s.name=="string"){let n=this._createBundleAssetId(e,s.name);i.push(n),this.add([s.name,n],s.srcs,s.data)}else{let n=s.name.map(o=>this._createBundleAssetId(e,o));n.forEach(o=>{i.push(o)}),this.add([...s.name,...n],s.srcs)}}):Object.keys(t).forEach(s=>{i.push(this._createBundleAssetId(e,s)),this.add([s,this._createBundleAssetId(e,s)],t[s])}),this._bundles[e]=i}add(e,t,i){let s=ft(e);s.forEach(o=>{this.hasKey(o)&&console.warn(`[Resolver] already has key: ${o} overwriting`)}),Array.isArray(t)||(typeof t=="string"?t=Wu(t):t=[t]);let n=t.map(o=>{let a=o;if(typeof o=="string"){let l=!1;for(let u=0;u<this._parsers.length;u++){let h=this._parsers[u];if(h.test(o)){a=h.parse(o),l=!0;break}}l||(a={src:o})}return a.format||(a.format=a.src.split(".").pop()),a.alias||(a.alias=s),(this._basePath||this._rootPath)&&(a.src=ie.path.toAbsolute(a.src,this._basePath,this._rootPath)),a.src=this._appendDefaultSearchParams(a.src),a.data=a.data??i,a});s.forEach(o=>{this._assetMap[o]=n})}resolveBundle(e){let t=gi(e);e=ft(e);let i={};return e.forEach(s=>{let n=this._bundles[s];if(n){let o=this.resolve(n),a={};for(let l in o){let u=o[l];a[this._extractAssetIdFromBundle(s,l)]=u}i[s]=a}}),t?i[e[0]]:i}resolveUrl(e){let t=this.resolve(e);if(typeof e!="string"){let i={};for(let s in t)i[s]=t[s].src;return i}return t.src}resolve(e){let t=gi(e);e=ft(e);let i={};return e.forEach(s=>{if(!this._resolverHash[s])if(this._assetMap[s]){let n=this._assetMap[s],o=this._getPreferredOrder(n),a=n[0];o?.priority.forEach(l=>{o.params[l].forEach(u=>{let h=n.filter(d=>d[l]?d[l]===u:!1);h.length&&(n=h)})}),this._resolverHash[s]=n[0]??a}else{let n=s;(this._basePath||this._rootPath)&&(n=ie.path.toAbsolute(n,this._basePath,this._rootPath)),n=this._appendDefaultSearchParams(n),this._resolverHash[s]={src:n}}i[s]=this._resolverHash[s]}),t?i[e[0]]:i}hasKey(e){return!!this._assetMap[e]}hasBundle(e){return!!this._bundles[e]}_getPreferredOrder(e){for(let t=0;t<e.length;t++){let i=e[0],s=this._preferredOrder.find(n=>n.params.format.includes(i.format));if(s)return s}return this._preferredOrder[0]}_appendDefaultSearchParams(e){if(!this._defaultSearchParams)return e;let t=/\?/.test(e)?"&":"?";return`${e}${t}${this._defaultSearchParams}`}};var $u=class{constructor(){this._detections=[],this._initialized=!1,this.resolver=new ju,this.loader=new Hu,this.cache=Qi,this._backgroundLoader=new zu(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(e={}){if(this._initialized){console.warn("[Assets]AssetManager already initialized, did you load before calling this Asset.init()?");return}if(this._initialized=!0,e.defaultSearchParams&&this.resolver.setDefaultSearchParams(e.defaultSearchParams),e.basePath&&(this.resolver.basePath=e.basePath),e.bundleIdentifier&&this.resolver.setBundleIdentifier(e.bundleIdentifier),e.manifest){let n=e.manifest;typeof n=="string"&&(n=await this.load(n)),this.resolver.addManifest(n)}let t=e.texturePreference?.resolution??1,i=typeof t=="number"?[t]:t,s=[];if(e.texturePreference?.format){let n=e.texturePreference?.format;s=typeof n=="string"?[n]:n;for(let o of this._detections)await o.test()||(s=await o.remove(s))}else for(let n of this._detections)await n.test()&&(s=await n.add(s));this.resolver.prefer({params:{format:s,resolution:i}}),e.preferences&&this.setPreferences(e.preferences)}add(e,t,i){this.resolver.add(e,t,i)}async load(e,t){this._initialized||await this.init();let i=gi(e),s=ft(e).map(a=>typeof a!="string"?(this.resolver.add(a.src,a),a.src):(this.resolver.hasKey(a)||this.resolver.add(a,a),a)),n=this.resolver.resolve(s),o=await this._mapLoadToResolve(n,t);return i?o[s[0]]:o}addBundle(e,t){this.resolver.addBundle(e,t)}async loadBundle(e,t){this._initialized||await this.init();let i=!1;typeof e=="string"&&(i=!0,e=[e]);let s=this.resolver.resolveBundle(e),n={},o=Object.keys(s),a=0,l=0,u=()=>{t?.(++a/l)},h=o.map(d=>{let p=s[d];return l+=Object.keys(p).length,this._mapLoadToResolve(p,u).then(m=>{n[d]=m})});return await Promise.all(h),i?n[e[0]]:n}async backgroundLoad(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);let t=this.resolver.resolve(e);this._backgroundLoader.add(Object.values(t))}async backgroundLoadBundle(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);let t=this.resolver.resolveBundle(e);Object.values(t).forEach(i=>{this._backgroundLoader.add(Object.values(i))})}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(e){if(typeof e=="string")return Qi.get(e);let t={};for(let i=0;i<e.length;i++)t[i]=Qi.get(e[i]);return t}async _mapLoadToResolve(e,t){let i=Object.values(e),s=Object.keys(e);this._backgroundLoader.active=!1;let n=await this.loader.load(i,t);this._backgroundLoader.active=!0;let o={};return i.forEach((a,l)=>{let u=n[a.src],h=[a.src];a.alias&&h.push(...a.alias),o[s[l]]=u,Qi.set(h,u)}),o}async unload(e){this._initialized||await this.init();let t=ft(e).map(s=>typeof s!="string"?s.src:s),i=this.resolver.resolve(t);await this._unloadFromResolved(i)}async unloadBundle(e){this._initialized||await this.init(),e=ft(e);let t=this.resolver.resolveBundle(e),i=Object.keys(t).map(s=>this._unloadFromResolved(t[s]));await Promise.all(i)}async _unloadFromResolved(e){let t=Object.values(e);t.forEach(i=>{Qi.remove(i.src)}),await this.loader.unload(t)}get detections(){return this._detections}get preferWorkers(){return mi.config.preferWorkers}set preferWorkers(e){ie.deprecation("7.2.0","Assets.prefersWorkers is deprecated, use Assets.setPreferences({ preferWorkers: true }) instead."),this.setPreferences({preferWorkers:e})}setPreferences(e){this.loader.parsers.forEach(t=>{t.config&&Object.keys(t.config).filter(i=>i in e).forEach(i=>{t.config[i]=e[i]})})}},yi=new $u;K.handleByList($.LoadParser,yi.loader.parsers).handleByList($.ResolveParser,yi.resolver.parsers).handleByList($.CacheParser,yi.cache.parsers).handleByList($.DetectionParser,yi.detections);var C9={extension:$.CacheParser,test:r=>Array.isArray(r)&&r.every(e=>e instanceof xe),getCacheableAssets:(r,e)=>{let t={};return r.forEach(i=>{e.forEach((s,n)=>{t[i+(n===0?"":n+1)]=s})}),t}};K.add(C9);var T9={extension:{type:$.DetectionParser,priority:1},test:async()=>{if(!globalThis.createImageBitmap)return!1;let e=await j.ADAPTER.fetch("data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=").then(t=>t.blob());return createImageBitmap(e).then(()=>!0,()=>!1)},add:async r=>[...r,"avif"],remove:async r=>r.filter(e=>e!=="avif")};K.add(T9);var F9={extension:{type:$.DetectionParser,priority:0},test:async()=>{if(!globalThis.createImageBitmap)return!1;let e=await j.ADAPTER.fetch("data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA=").then(t=>t.blob());return createImageBitmap(e).then(()=>!0,()=>!1)},add:async r=>[...r,"webp"],remove:async r=>r.filter(e=>e!=="webp")};K.add(F9);var B6=["png","jpg","jpeg"],A9={extension:{type:$.DetectionParser,priority:-1},test:()=>Promise.resolve(!0),add:async r=>[...r,...B6],remove:async r=>r.filter(e=>!B6.includes(e))};K.add(A9);var I9={extension:$.ResolveParser,test:mi.test,parse:r=>({resolution:parseFloat(j.RETINA_PREFIX.exec(r)?.[1]??"1"),format:r.split(".").pop(),src:r})};K.add(I9);var gt=(r=>(r[r.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",r[r.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",r[r.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",r[r.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",r[r.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917]="COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT",r[r.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918]="COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT",r[r.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919]="COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT",r[r.COMPRESSED_SRGB_S3TC_DXT1_EXT=35916]="COMPRESSED_SRGB_S3TC_DXT1_EXT",r[r.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",r[r.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",r[r.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",r[r.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",r[r.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",r[r.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",r[r.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",r[r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC",r[r.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",r[r.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",r[r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG=35840]="COMPRESSED_RGB_PVRTC_4BPPV1_IMG",r[r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG=35842]="COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",r[r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG=35841]="COMPRESSED_RGB_PVRTC_2BPPV1_IMG",r[r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG=35843]="COMPRESSED_RGBA_PVRTC_2BPPV1_IMG",r[r.COMPRESSED_RGB_ETC1_WEBGL=36196]="COMPRESSED_RGB_ETC1_WEBGL",r[r.COMPRESSED_RGB_ATC_WEBGL=35986]="COMPRESSED_RGB_ATC_WEBGL",r[r.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL=35986]="COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL",r[r.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL=34798]="COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL",r[r.COMPRESSED_RGBA_ASTC_4x4_KHR=37808]="COMPRESSED_RGBA_ASTC_4x4_KHR",r))(gt||{}),Ji={33776:.5,33777:.5,33778:1,33779:1,35916:.5,35917:.5,35918:1,35919:1,37488:.5,37489:.5,37490:1,37491:1,37492:.5,37496:1,37493:.5,37497:1,37494:.5,37495:.5,35840:.5,35842:.5,35841:.25,35843:.25,36196:.5,35986:.5,35986:1,34798:1,37808:1};var xi,Xn;function R6(){Xn={s3tc:xi.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:xi.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:xi.getExtension("WEBGL_compressed_texture_etc"),etc1:xi.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:xi.getExtension("WEBGL_compressed_texture_pvrtc")||xi.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:xi.getExtension("WEBGL_compressed_texture_atc"),astc:xi.getExtension("WEBGL_compressed_texture_astc")}}var k9={extension:{type:$.DetectionParser,priority:2},test:async()=>{let e=j.ADAPTER.createCanvas().getContext("webgl");return e?(xi=e,!0):(console.warn("WebGL not available for compressed textures."),!1)},add:async r=>{Xn||R6();let e=[];for(let t in Xn)Xn[t]&&e.push(t);return[...e,...r]},remove:async r=>(Xn||R6(),r.filter(e=>!(e in Xn)))};K.add(k9);var qn=class extends wt{constructor(e,t={width:1,height:1,autoLoad:!0}){let i,s;typeof e=="string"?(i=e,s=new Uint8Array):(i=null,s=e),super(s,t),this.origin=i,this.buffer=s?new Wi(s):null,this._load=null,this.loaded=!1,this.origin!==null&&t.autoLoad!==!1&&this.load(),this.origin===null&&this.buffer&&(this._load=Promise.resolve(this),this.loaded=!0,this.onBlobLoaded(this.buffer.rawBinaryData))}onBlobLoaded(e){}load(){return this._load?this._load:(this._load=fetch(this.origin).then(e=>e.blob()).then(e=>e.arrayBuffer()).then(e=>(this.data=new Uint32Array(e),this.buffer=new Wi(e),this.loaded=!0,this.onBlobLoaded(e),this.update(),this)),this._load)}};var vi=class r extends qn{constructor(e,t){super(e,t),this.format=t.format,this.levels=t.levels||1,this._width=t.width,this._height=t.height,this._extension=r._formatToExtension(this.format),(t.levelBuffers||this.buffer)&&(this._levelBuffers=t.levelBuffers||r._createLevelBuffers(e instanceof Uint8Array?e:this.buffer.uint8View,this.format,this.levels,4,4,this.width,this.height))}upload(e,t,i){let s=e.gl;if(!e.context.extensions[this._extension])throw new Error(`${this._extension} textures are not supported on the current machine`);if(!this._levelBuffers)return!1;for(let o=0,a=this.levels;o<a;o++){let{levelID:l,levelWidth:u,levelHeight:h,levelBuffer:d}=this._levelBuffers[o];s.compressedTexImage2D(s.TEXTURE_2D,l,this.format,u,h,0,d)}return!0}onBlobLoaded(){this._levelBuffers=r._createLevelBuffers(this.buffer.uint8View,this.format,this.levels,4,4,this.width,this.height)}static _formatToExtension(e){if(e>=33776&&e<=33779)return"s3tc";if(e>=37488&&e<=37497)return"etc";if(e>=35840&&e<=35843)return"pvrtc";if(e>=36196)return"etc1";if(e>=35986&&e<=34798)return"atc";throw new Error("Invalid (compressed) texture format given!")}static _createLevelBuffers(e,t,i,s,n,o,a){let l=new Array(i),u=e.byteOffset,h=o,d=a,p=h+s-1&~(s-1),m=d+n-1&~(n-1),x=p*m*Ji[t];for(let C=0;C<i;C++)l[C]={levelID:C,levelWidth:i>1?h:p,levelHeight:i>1?d:m,levelBuffer:new Uint8Array(e.buffer,u,x)},u+=x,h=h>>1||1,d=d>>1||1,p=h+s-1&~(s-1),m=d+n-1&~(n-1),x=p*m*Ji[t];return l}};var M9=4,Yu=124,Tg=32,L6=20,Fg=542327876,Xu={SIZE:1,FLAGS:2,HEIGHT:3,WIDTH:4,MIPMAP_COUNT:7,PIXEL_FORMAT:19},Ag={SIZE:0,FLAGS:1,FOURCC:2,RGB_BITCOUNT:3,R_BIT_MASK:4,G_BIT_MASK:5,B_BIT_MASK:6,A_BIT_MASK:7},qu={DXGI_FORMAT:0,RESOURCE_DIMENSION:1,MISC_FLAG:2,ARRAY_SIZE:3,MISC_FLAGS2:4};var Ig=1,kg=2,Mg=4,Pg=64,Ng=512,Bg=131072,Rg=827611204,Lg=861165636,Og=894720068,Gg=808540228,Ug=4,Vg={[Rg]:gt.COMPRESSED_RGBA_S3TC_DXT1_EXT,[Lg]:gt.COMPRESSED_RGBA_S3TC_DXT3_EXT,[Og]:gt.COMPRESSED_RGBA_S3TC_DXT5_EXT},zg={70:gt.COMPRESSED_RGBA_S3TC_DXT1_EXT,71:gt.COMPRESSED_RGBA_S3TC_DXT1_EXT,73:gt.COMPRESSED_RGBA_S3TC_DXT3_EXT,74:gt.COMPRESSED_RGBA_S3TC_DXT3_EXT,76:gt.COMPRESSED_RGBA_S3TC_DXT5_EXT,77:gt.COMPRESSED_RGBA_S3TC_DXT5_EXT,72:gt.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,75:gt.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,78:gt.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT};function Ku(r){let e=new Uint32Array(r);if(e[0]!==Fg)throw new Error("Invalid DDS file magic word");let i=new Uint32Array(r,0,Yu/Uint32Array.BYTES_PER_ELEMENT),s=i[Xu.HEIGHT],n=i[Xu.WIDTH],o=i[Xu.MIPMAP_COUNT],a=new Uint32Array(r,Xu.PIXEL_FORMAT*Uint32Array.BYTES_PER_ELEMENT,Tg/Uint32Array.BYTES_PER_ELEMENT),l=a[Ig];if(l&Mg){let u=a[Ag.FOURCC];if(u!==Gg){let I=Vg[u],T=M9+Yu,W=new Uint8Array(r,T);return[new vi(W,{format:I,width:n,height:s,levels:o})]}let h=M9+Yu,d=new Uint32Array(e.buffer,h,L6/Uint32Array.BYTES_PER_ELEMENT),p=d[qu.DXGI_FORMAT],m=d[qu.RESOURCE_DIMENSION],x=d[qu.MISC_FLAG],C=d[qu.ARRAY_SIZE],A=zg[p];if(A===void 0)throw new Error(`DDSParser cannot parse texture data with DXGI format ${p}`);if(x===Ug)throw new Error("DDSParser does not support cubemap textures");if(m===6)throw new Error("DDSParser does not supported 3D texture data");let P=new Array,L=M9+Yu+L6;if(C===1)P.push(new Uint8Array(r,L));else{let I=Ji[A],T=0,W=n,Q=s;for(let z=0;z<o;z++){let oe=Math.max(1,W+3&-4),J=Math.max(1,Q+3&-4),ne=oe*J*I;T+=ne,W=W>>>1,Q=Q>>>1}let O=L;for(let z=0;z<C;z++)P.push(new Uint8Array(r,O,T)),O+=T}return P.map(I=>new vi(I,{format:A,width:n,height:s,levels:o}))}throw l&Pg?new Error("DDSParser does not support uncompressed texture data."):l&Ng?new Error("DDSParser does not supported YUV uncompressed texture data."):l&Bg?new Error("DDSParser does not support single-channel (lumninance) texture data!"):l&kg?new Error("DDSParser does not support single-channel (alpha) texture data!"):new Error("DDSParser failed to load a texture file due to an unknown reason!")}var O6=[171,75,84,88,32,49,49,187,13,10,26,10],Wg=67305985,yr={FILE_IDENTIFIER:0,ENDIANNESS:12,GL_TYPE:16,GL_TYPE_SIZE:20,GL_FORMAT:24,GL_INTERNAL_FORMAT:28,GL_BASE_INTERNAL_FORMAT:32,PIXEL_WIDTH:36,PIXEL_HEIGHT:40,PIXEL_DEPTH:44,NUMBER_OF_ARRAY_ELEMENTS:48,NUMBER_OF_FACES:52,NUMBER_OF_MIPMAP_LEVELS:56,BYTES_OF_KEY_VALUE_DATA:60},P9=64,Zu={[me.UNSIGNED_BYTE]:1,[me.UNSIGNED_SHORT]:2,[me.INT]:4,[me.UNSIGNED_INT]:4,[me.FLOAT]:4,[me.HALF_FLOAT]:8},N9={[se.RGBA]:4,[se.RGB]:3,[se.RG]:2,[se.RED]:1,[se.LUMINANCE]:1,[se.LUMINANCE_ALPHA]:2,[se.ALPHA]:1},B9={[me.UNSIGNED_SHORT_4_4_4_4]:2,[me.UNSIGNED_SHORT_5_5_5_1]:2,[me.UNSIGNED_SHORT_5_6_5]:2};function Qu(r,e,t=!1){let i=new DataView(e);if(!Hg(r,i))return null;let s=i.getUint32(yr.ENDIANNESS,!0)===Wg,n=i.getUint32(yr.GL_TYPE,s),o=i.getUint32(yr.GL_FORMAT,s),a=i.getUint32(yr.GL_INTERNAL_FORMAT,s),l=i.getUint32(yr.PIXEL_WIDTH,s),u=i.getUint32(yr.PIXEL_HEIGHT,s)||1,h=i.getUint32(yr.PIXEL_DEPTH,s)||1,d=i.getUint32(yr.NUMBER_OF_ARRAY_ELEMENTS,s)||1,p=i.getUint32(yr.NUMBER_OF_FACES,s),m=i.getUint32(yr.NUMBER_OF_MIPMAP_LEVELS,s),x=i.getUint32(yr.BYTES_OF_KEY_VALUE_DATA,s);if(u===0||h!==1)throw new Error("Only 2D textures are supported");if(p!==1)throw new Error("CubeTextures are not supported by KTXLoader yet!");if(d!==1)throw new Error("WebGL does not support array textures");let C=4,A=4,P=l+3&-4,L=u+3&-4,I=new Array(d),T=l*u;n===0&&(T=P*L);let W;if(n!==0?Zu[n]?W=Zu[n]*N9[o]:W=B9[n]:W=Ji[a],W===void 0)throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");let Q=t?$g(i,x,s):null,z=T*W,oe=l,J=u,ne=P,Ee=L,q=P9+x;for(let Z=0;Z<m;Z++){let Ce=i.getUint32(q,s),pe=q+4;for(let ve=0;ve<d;ve++){let Ge=I[ve];Ge||(Ge=I[ve]=new Array(m)),Ge[Z]={levelID:Z,levelWidth:m>1||n!==0?oe:ne,levelHeight:m>1||n!==0?J:Ee,levelBuffer:new Uint8Array(e,pe,z)},pe+=z}q+=Ce+4,q=q%4!==0?q+4-q%4:q,oe=oe>>1||1,J=J>>1||1,ne=oe+C-1&~(C-1),Ee=J+A-1&~(A-1),z=ne*Ee*W}return n!==0?{uncompressed:I.map(Z=>{let Ce=Z[0].levelBuffer,pe=!1;return n===me.FLOAT?Ce=new Float32Array(Z[0].levelBuffer.buffer,Z[0].levelBuffer.byteOffset,Z[0].levelBuffer.byteLength/4):n===me.UNSIGNED_INT?(pe=!0,Ce=new Uint32Array(Z[0].levelBuffer.buffer,Z[0].levelBuffer.byteOffset,Z[0].levelBuffer.byteLength/4)):n===me.INT&&(pe=!0,Ce=new Int32Array(Z[0].levelBuffer.buffer,Z[0].levelBuffer.byteOffset,Z[0].levelBuffer.byteLength/4)),{resource:new wt(Ce,{width:Z[0].levelWidth,height:Z[0].levelHeight}),type:n,format:pe?jg(o):o}}),kvData:Q}:{compressed:I.map(Z=>new vi(null,{format:a,width:l,height:u,levels:m,levelBuffers:Z})),kvData:Q}}function Hg(r,e){for(let t=0;t<O6.length;t++)if(e.getUint8(t)!==O6[t])return console.error(`${r} is not a valid *.ktx file!`),!1;return!0}function jg(r){switch(r){case se.RGBA:return se.RGBA_INTEGER;case se.RGB:return se.RGB_INTEGER;case se.RG:return se.RG_INTEGER;case se.RED:return se.RED_INTEGER;default:return r}}function $g(r,e,t){let i=new Map,s=0;for(;s<e;){let n=r.getUint32(P9+s,t),o=P9+s+4,a=3-(n+3)%4;if(n===0||n>e-s){console.error("KTXLoader: keyAndValueByteSize out of bounds");break}let l=0;for(;l<n&&r.getUint8(o+l)!==0;l++);if(l===-1){console.error("KTXLoader: Failed to find null byte terminating kvData key");break}let u=new TextDecoder().decode(new Uint8Array(r.buffer,o,l)),h=new DataView(r.buffer,o+l+1,n-l-1);i.set(u,h),s+=4+n+a}return i}var R9={extension:{type:$.LoadParser,priority:w0.High},name:"loadDDS",test(r){return it(r,".dds")},async load(r,e,t){let s=await(await j.ADAPTER.fetch(r)).arrayBuffer(),o=Ku(s).map(a=>{let l=new ye(a,{mipmap:Y0.OFF,alphaMode:A0.NO_PREMULTIPLIED_ALPHA,resolution:ie.getResolutionOfUrl(r),...e.data});return Mr(l,t,r)});return o.length===1?o[0]:o},unload(r){Array.isArray(r)?r.forEach(e=>e.destroy(!0)):r.destroy(!0)}};K.add(R9);var L9={extension:{type:$.LoadParser,priority:w0.High},name:"loadKTX",test(r){return it(r,".ktx")},async load(r,e,t){let s=await(await j.ADAPTER.fetch(r)).arrayBuffer(),{compressed:n,uncompressed:o,kvData:a}=Qu(r,s),l=n??o,u={mipmap:Y0.OFF,alphaMode:A0.NO_PREMULTIPLIED_ALPHA,resolution:ie.getResolutionOfUrl(r),...e.data},h=l.map(d=>{l===o&&Object.assign(u,{type:d.type,format:d.format});let p=new ye(d,u);return p.ktxKeyValueData=a,Mr(p,t,r)});return h.length===1?h[0]:h},unload(r){Array.isArray(r)?r.forEach(e=>e.destroy(!0)):r.destroy(!0)}};K.add(L9);var O9={extension:$.ResolveParser,test:r=>{let t=r.split("?")[0].split(".").pop();return["basis","ktx","dds"].includes(t)},parse:r=>{if(r.split("?")[0].split(".").pop()==="ktx"){let i=[".s3tc.ktx",".s3tc_sRGB.ktx",".etc.ktx",".etc1.ktx",".pvrt.ktx",".atc.ktx",".astc.ktx"];if(i.some(s=>r.endsWith(s)))return{resolution:parseFloat(j.RETINA_PREFIX.exec(r)?.[1]??"1"),format:i.find(s=>r.endsWith(s)),src:r}}return{resolution:parseFloat(j.RETINA_PREFIX.exec(r)?.[1]??"1"),format:r.split(".").pop(),src:r}}};K.add(O9);var Yg=new we,Xg=4,Ma=class{constructor(r){this.renderer=r}async image(r,e,t){let i=new Image;return i.src=await this.base64(r,e,t),i}async base64(r,e,t){let i=this.canvas(r);if(i.toBlob!==void 0)return new Promise((s,n)=>{i.toBlob(o=>{if(!o){n(new Error("ICanvas.toBlob failed!"));return}let a=new FileReader;a.onload=()=>s(a.result),a.onerror=n,a.readAsDataURL(o)},e,t)});if(i.toDataURL!==void 0)return i.toDataURL(e,t);if(i.convertToBlob!==void 0){let s=await i.convertToBlob({type:e,quality:t});return new Promise((n,o)=>{let a=new FileReader;a.onload=()=>n(a.result),a.onerror=o,a.readAsDataURL(s)})}throw new Error("Extract.base64() requires ICanvas.toDataURL, ICanvas.toBlob, or ICanvas.convertToBlob to be implemented")}canvas(r,e){let{pixels:t,width:i,height:s,flipY:n}=this._rawPixels(r,e);n&&Ma._flipY(t,i,s),Ma._unpremultiplyAlpha(t);let o=new ie.CanvasRenderTarget(i,s,1),a=new ImageData(new Uint8ClampedArray(t.buffer),i,s);return o.context.putImageData(a,0,0),o.canvas}pixels(r,e){let{pixels:t,width:i,height:s,flipY:n}=this._rawPixels(r,e);return n&&Ma._flipY(t,i,s),Ma._unpremultiplyAlpha(t),t}_rawPixels(r,e){let t=this.renderer;if(!t)throw new Error("The Extract has already been destroyed");let i,s=!1,n,o=!1;if(r&&(r instanceof Qt?n=r:(n=t.generateTexture(r,{resolution:t.resolution,multisample:t.multisample}),o=!0)),n){if(i=n.baseTexture.resolution,e=e??n.frame,s=!1,!o){t.renderTexture.bind(n);let d=n.framebuffer.glFramebuffers[t.CONTEXT_UID];d.blitFramebuffer&&t.framebuffer.bind(d.blitFramebuffer)}}else i=t.resolution,e||(e=Yg,e.width=t.width/i,e.height=t.height/i),s=!0,t.renderTexture.bind();let a=Math.round(e.width*i),l=Math.round(e.height*i),u=new Uint8Array(Xg*a*l),h=t.gl;return h.readPixels(Math.round(e.x*i),Math.round(e.y*i),a,l,h.RGBA,h.UNSIGNED_BYTE,u),o&&n?.destroy(!0),{pixels:u,width:a,height:l,flipY:s}}destroy(){this.renderer=null}static _flipY(r,e,t){let i=e<<2,s=t>>1,n=new Uint8Array(i);for(let o=0;o<s;o++){let a=o*i,l=(t-o-1)*i;n.set(r.subarray(a,a+i)),r.copyWithin(a,l,l+i),r.set(n,l)}}static _unpremultiplyAlpha(r){r instanceof Uint8ClampedArray&&(r=new Uint8Array(r.buffer));let e=r.length;for(let t=0;t<e;t+=4){let i=r[t+3];if(i!==0){let s=255.001/i;r[t]=r[t]*s+.5,r[t+1]=r[t+1]*s+.5,r[t+2]=r[t+2]*s+.5}}}},G9=Ma;G9.extension={name:"extract",type:$.RendererSystem};K.add(G9);var es={build(r){let e=r.points,t,i,s,n,o,a;if(r.type===t0.CIRC){let x=r.shape;t=x.x,i=x.y,o=a=x.radius,s=n=0}else if(r.type===t0.ELIP){let x=r.shape;t=x.x,i=x.y,o=x.width,a=x.height,s=n=0}else{let x=r.shape,C=x.width/2,A=x.height/2;t=x.x+C,i=x.y+A,o=a=Math.max(0,Math.min(x.radius,Math.min(C,A))),s=C-o,n=A-a}if(!(o>=0&&a>=0&&s>=0&&n>=0)){e.length=0;return}let l=Math.ceil(2.3*Math.sqrt(o+a)),u=l*8+(s?4:0)+(n?4:0);if(e.length=u,u===0)return;if(l===0){e.length=8,e[0]=e[6]=t+s,e[1]=e[3]=i+n,e[2]=e[4]=t-s,e[5]=e[7]=i-n;return}let h=0,d=l*4+(s?2:0)+2,p=d,m=u;{let x=s+o,C=n,A=t+x,P=t-x,L=i+C;if(e[h++]=A,e[h++]=L,e[--d]=L,e[--d]=P,n){let I=i-C;e[p++]=P,e[p++]=I,e[--m]=I,e[--m]=A}}for(let x=1;x<l;x++){let C=Math.PI/2*(x/l),A=s+Math.cos(C)*o,P=n+Math.sin(C)*a,L=t+A,I=t-A,T=i+P,W=i-P;e[h++]=L,e[h++]=T,e[--d]=T,e[--d]=I,e[p++]=I,e[p++]=W,e[--m]=W,e[--m]=L}{let x=s,C=n+a,A=t+x,P=t-x,L=i+C,I=i-C;e[h++]=A,e[h++]=L,e[--m]=I,e[--m]=A,s&&(e[h++]=P,e[h++]=L,e[--m]=I,e[--m]=P)}},triangulate(r,e){let t=r.points,i=e.points,s=e.indices;if(t.length===0)return;let n=i.length/2,o=n,a,l;if(r.type!==t0.RREC){let h=r.shape;a=h.x,l=h.y}else{let h=r.shape;a=h.x+h.width/2,l=h.y+h.height/2}let u=r.matrix;i.push(r.matrix?u.a*a+u.c*l+u.tx:a,r.matrix?u.b*a+u.d*l+u.ty:l),n++,i.push(t[0],t[1]);for(let h=2;h<t.length;h+=2)i.push(t[h],t[h+1]),s.push(n++,o,n);s.push(o+1,o,n)}};function G6(r,e=!1){let t=r.length;if(t<6)return;let i=0;for(let s=0,n=r[t-2],o=r[t-1];s<t;s+=2){let a=r[s],l=r[s+1];i+=(a-n)*(l+o),n=a,o=l}if(!e&&i>0||e&&i<=0){let s=t/2;for(let n=s+s%2;n<t;n+=2){let o=t-n-2,a=t-n-1,l=n,u=n+1;[r[o],r[l]]=[r[l],r[o]],[r[a],r[u]]=[r[u],r[a]]}}}var Kn={build(r){r.points=r.shape.points.slice()},triangulate(r,e){let t=r.points,i=r.holes,s=e.points,n=e.indices;if(t.length>=6){G6(t,!1);let o=[];for(let u=0;u<i.length;u++){let h=i[u];G6(h.points,!0),o.push(t.length/2),t=t.concat(h.points)}let a=ie.earcut(t,o,2);if(!a)return;let l=s.length/2;for(let u=0;u<a.length;u+=3)n.push(a[u]+l),n.push(a[u+1]+l),n.push(a[u+2]+l);for(let u=0;u<t.length;u++)s.push(t[u])}}};var Ju={build(r){let e=r.shape,t=e.x,i=e.y,s=e.width,n=e.height,o=r.points;o.length=0,s>=0&&n>=0&&o.push(t,i,t+s,i,t+s,i+n,t,i+n)},triangulate(r,e){let t=r.points,i=e.points;if(t.length===0)return;let s=i.length/2;i.push(t[0],t[1],t[2],t[3],t[6],t[7],t[4],t[5]),e.indices.push(s,s+1,s+2,s+1,s+2,s+3)}};var eh={build(r){es.build(r)},triangulate(r,e){es.triangulate(r,e)}};var mt=(r=>(r.MITER="miter",r.BEVEL="bevel",r.ROUND="round",r))(mt||{}),xr=(r=>(r.BUTT="butt",r.ROUND="round",r.SQUARE="square",r))(xr||{}),er={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(r,e=20){if(!this.adaptive||!r||isNaN(r))return e;let t=Math.ceil(r/this.maxLength);return t<this.minSegments?t=this.minSegments:t>this.maxSegments&&(t=this.maxSegments),t}};var Rs=class{static curveTo(e,t,i,s,n,o){let a=o[o.length-2],u=o[o.length-1]-t,h=a-e,d=s-t,p=i-e,m=Math.abs(u*p-h*d);if(m<1e-8||n===0)return(o[o.length-2]!==e||o[o.length-1]!==t)&&o.push(e,t),null;let x=u*u+h*h,C=d*d+p*p,A=u*d+h*p,P=n*Math.sqrt(x)/m,L=n*Math.sqrt(C)/m,I=P*A/x,T=L*A/C,W=P*p+L*h,Q=P*d+L*u,O=h*(L+I),z=u*(L+I),oe=p*(P+T),J=d*(P+T),ne=Math.atan2(z-Q,O-W),Ee=Math.atan2(J-Q,oe-W);return{cx:W+e,cy:Q+t,radius:n,startAngle:ne,endAngle:Ee,anticlockwise:h*d>p*u}}static arc(e,t,i,s,n,o,a,l,u){let h=a-o,d=er._segmentsCount(Math.abs(h)*n,Math.ceil(Math.abs(h)/ji)*40),p=h/(d*2),m=p*2,x=Math.cos(p),C=Math.sin(p),A=d-1,P=A%1/A;for(let L=0;L<=A;++L){let I=L+P*L,T=p+o+m*I,W=Math.cos(T),Q=-Math.sin(T);u.push((x*W+C*Q)*n+i,(x*-Q+C*W)*n+s)}}};var Zn=class{constructor(){this.reset()}begin(e,t,i){this.reset(),this.style=e,this.start=t,this.attribStart=i}end(e,t){this.attribSize=t-this.attribStart,this.size=e-this.start}reset(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0}};var Qn=class r{static curveLength(e,t,i,s,n,o,a,l){let h=0,d=0,p=0,m=0,x=0,C=0,A=0,P=0,L=0,I=0,T=0,W=e,Q=t;for(let O=1;O<=10;++O)d=O/10,p=d*d,m=p*d,x=1-d,C=x*x,A=C*x,P=A*e+3*C*d*i+3*x*p*n+m*a,L=A*t+3*C*d*s+3*x*p*o+m*l,I=W-P,T=Q-L,W=P,Q=L,h+=Math.sqrt(I*I+T*T);return h}static curveTo(e,t,i,s,n,o,a){let l=a[a.length-2],u=a[a.length-1];a.length-=2;let h=er._segmentsCount(r.curveLength(l,u,e,t,i,s,n,o)),d=0,p=0,m=0,x=0,C=0;a.push(l,u);for(let A=1,P=0;A<=h;++A)P=A/h,d=1-P,p=d*d,m=p*d,x=P*P,C=x*P,a.push(m*l+3*p*P*e+3*d*x*i+C*n,m*u+3*p*P*t+3*d*x*s+C*o)}};function U6(r,e,t,i,s,n,o,a){let l=r-t*s,u=e-i*s,h=r+t*n,d=e+i*n,p,m;o?(p=i,m=-t):(p=-i,m=t);let x=l+p,C=u+m,A=h+p,P=d+m;return a.push(x,C,A,P),2}function Ls(r,e,t,i,s,n,o,a){let l=t-r,u=i-e,h=Math.atan2(l,u),d=Math.atan2(s-r,n-e);a&&h<d?h+=Math.PI*2:!a&&h>d&&(d+=Math.PI*2);let p=h,m=d-h,x=Math.abs(m),C=Math.sqrt(l*l+u*u),A=(15*x*Math.sqrt(C)/Math.PI>>0)+1,P=m/A;if(p+=P,a){o.push(r,e,t,i);for(let L=1,I=p;L<A;L++,I+=P)o.push(r,e,r+Math.sin(I)*C,e+Math.cos(I)*C);o.push(r,e,s,n)}else{o.push(t,i,r,e);for(let L=1,I=p;L<A;L++,I+=P)o.push(r+Math.sin(I)*C,e+Math.cos(I)*C,r,e);o.push(s,n,r,e)}return A*2}function qg(r,e){let t=r.shape,i=r.points||t.points.slice(),s=e.closePointEps;if(i.length===0)return;let n=r.lineStyle,o=new Ae(i[0],i[1]),a=new Ae(i[i.length-2],i[i.length-1]),l=t.type!==t0.POLY||t.closeStroke,u=Math.abs(o.x-a.x)<s&&Math.abs(o.y-a.y)<s;if(l){i=i.slice(),u&&(i.pop(),i.pop(),a.set(i[i.length-2],i[i.length-1]));let ve=(o.x+a.x)*.5,Ge=(a.y+o.y)*.5;i.unshift(ve,Ge),i.push(ve,Ge)}let h=e.points,d=i.length/2,p=i.length,m=h.length/2,x=n.width/2,C=x*x,A=n.miterLimit*n.miterLimit,P=i[0],L=i[1],I=i[2],T=i[3],W=0,Q=0,O=-(L-T),z=P-I,oe=0,J=0,ne=Math.sqrt(O*O+z*z);O/=ne,z/=ne,O*=x,z*=x;let Ee=n.alignment,q=(1-Ee)*2,Z=Ee*2;l||(n.cap===xr.ROUND?p+=Ls(P-O*(q-Z)*.5,L-z*(q-Z)*.5,P-O*q,L-z*q,P+O*Z,L+z*Z,h,!0)+2:n.cap===xr.SQUARE&&(p+=U6(P,L,O,z,q,Z,!0,h))),h.push(P-O*q,L-z*q,P+O*Z,L+z*Z);for(let ve=1;ve<d-1;++ve){P=i[(ve-1)*2],L=i[(ve-1)*2+1],I=i[ve*2],T=i[ve*2+1],W=i[(ve+1)*2],Q=i[(ve+1)*2+1],O=-(L-T),z=P-I,ne=Math.sqrt(O*O+z*z),O/=ne,z/=ne,O*=x,z*=x,oe=-(T-Q),J=I-W,ne=Math.sqrt(oe*oe+J*J),oe/=ne,J/=ne,oe*=x,J*=x;let Ge=I-P,Fe=L-T,nt=I-W,n0=Q-T,k0=Ge*nt+Fe*n0,yt=Fe*nt-n0*Ge,ot=yt<0;if(Math.abs(yt)<.001*Math.abs(k0)){h.push(I-O*q,T-z*q,I+O*Z,T+z*Z),k0>=0&&(n.join===mt.ROUND?p+=Ls(I,T,I-O*q,T-z*q,I-oe*q,T-J*q,h,!1)+4:p+=2,h.push(I-oe*Z,T-J*Z,I+oe*q,T+J*q));continue}let $t=(-O+P)*(-z+T)-(-O+I)*(-z+L),ue=(-oe+W)*(-J+T)-(-oe+I)*(-J+Q),re=(Ge*ue-nt*$t)/yt,fe=(n0*$t-Fe*ue)/yt,at=(re-I)*(re-I)+(fe-T)*(fe-T),D0=I+(re-I)*q,M0=T+(fe-T)*q,l0=I-(re-I)*Z,He=T-(fe-T)*Z,V0=Math.min(Ge*Ge+Fe*Fe,nt*nt+n0*n0),P0=ot?q:Z,J0=V0+P0*P0*C,ur=at<=J0,o0=n.join;if(o0===mt.MITER&&at/C>A&&(o0=mt.BEVEL),ur)switch(o0){case mt.MITER:{h.push(D0,M0,l0,He);break}case mt.BEVEL:{ot?h.push(D0,M0,I+O*Z,T+z*Z,D0,M0,I+oe*Z,T+J*Z):h.push(I-O*q,T-z*q,l0,He,I-oe*q,T-J*q,l0,He),p+=2;break}case mt.ROUND:{ot?(h.push(D0,M0,I+O*Z,T+z*Z),p+=Ls(I,T,I+O*Z,T+z*Z,I+oe*Z,T+J*Z,h,!0)+4,h.push(D0,M0,I+oe*Z,T+J*Z)):(h.push(I-O*q,T-z*q,l0,He),p+=Ls(I,T,I-O*q,T-z*q,I-oe*q,T-J*q,h,!1)+4,h.push(I-oe*q,T-J*q,l0,He));break}}else{switch(h.push(I-O*q,T-z*q,I+O*Z,T+z*Z),o0){case mt.MITER:{ot?h.push(l0,He,l0,He):h.push(D0,M0,D0,M0),p+=2;break}case mt.ROUND:{ot?p+=Ls(I,T,I+O*Z,T+z*Z,I+oe*Z,T+J*Z,h,!0)+2:p+=Ls(I,T,I-O*q,T-z*q,I-oe*q,T-J*q,h,!1)+2;break}}h.push(I-oe*q,T-J*q,I+oe*Z,T+J*Z),p+=2}}P=i[(d-2)*2],L=i[(d-2)*2+1],I=i[(d-1)*2],T=i[(d-1)*2+1],O=-(L-T),z=P-I,ne=Math.sqrt(O*O+z*z),O/=ne,z/=ne,O*=x,z*=x,h.push(I-O*q,T-z*q,I+O*Z,T+z*Z),l||(n.cap===xr.ROUND?p+=Ls(I-O*(q-Z)*.5,T-z*(q-Z)*.5,I-O*q,T-z*q,I+O*Z,T+z*Z,h,!1)+2:n.cap===xr.SQUARE&&(p+=U6(I,T,O,z,q,Z,!1,h)));let Ce=e.indices,pe=er.epsilon*er.epsilon;for(let ve=m;ve<p+m-2;++ve)P=h[ve*2],L=h[ve*2+1],I=h[(ve+1)*2],T=h[(ve+1)*2+1],W=h[(ve+2)*2],Q=h[(ve+2)*2+1],!(Math.abs(P*(T-Q)+I*(Q-L)+W*(L-T))<pe)&&Ce.push(ve,ve+1,ve+2)}function Kg(r,e){let t=0,i=r.shape,s=r.points||i.points,n=i.type!==t0.POLY||i.closeStroke;if(s.length===0)return;let o=e.points,a=e.indices,l=s.length/2,u=o.length/2,h=u;for(o.push(s[0],s[1]),t=1;t<l;t++)o.push(s[t*2],s[t*2+1]),a.push(h,h+1),h++;n&&a.push(h,u)}function Pa(r,e){r.lineStyle.native?Kg(r,e):qg(r,e)}var Jn=class r{static curveLength(e,t,i,s,n,o){let a=e-2*i+n,l=t-2*s+o,u=2*i-2*e,h=2*s-2*t,d=4*(a*a+l*l),p=4*(a*u+l*h),m=u*u+h*h,x=2*Math.sqrt(d+p+m),C=Math.sqrt(d),A=2*d*C,P=2*Math.sqrt(m),L=p/C;return(A*x+C*p*(x-P)+(4*m*d-p*p)*Math.log((2*C+L+x)/(L+P)))/(4*A)}static curveTo(e,t,i,s,n){let o=n[n.length-2],a=n[n.length-1],l=er._segmentsCount(r.curveLength(o,a,e,t,i,s)),u=0,h=0;for(let d=1;d<=l;++d){let p=d/l;u=o+(e-o)*p,h=a+(t-a)*p,n.push(u+(e+(i-e)*p-u)*p,h+(t+(s-t)*p-h)*p)}}};var Na={[t0.POLY]:Kn,[t0.CIRC]:es,[t0.ELIP]:es,[t0.RECT]:Ju,[t0.RREC]:eh},th=[],eo=[];var to=class r{constructor(e,t=null,i=null,s=null){this.points=[],this.holes=[],this.shape=e,this.lineStyle=i,this.fillStyle=t,this.matrix=s,this.type=e.type}clone(){return new r(this.shape,this.fillStyle,this.lineStyle,this.matrix)}destroy(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null}};var ro=new Ae,V6=class extends bs{constructor(){super(),this.closePointEps=1e-4,this.boundsPadding=0,this.uvsFloat32=null,this.indicesUint16=null,this.batchable=!1,this.points=[],this.colors=[],this.uvs=[],this.indices=[],this.textureIds=[],this.graphicsData=[],this.drawCalls=[],this.batchDirty=-1,this.batches=[],this.dirty=0,this.cacheDirty=-1,this.clearDirty=0,this.shapeIndex=0,this._bounds=new Ar,this.boundsDirty=-1}get bounds(){return this.updateBatches(),this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds}invalidate(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(let r=0;r<this.drawCalls.length;r++)this.drawCalls[r].texArray.clear(),eo.push(this.drawCalls[r]);this.drawCalls.length=0;for(let r=0;r<this.batches.length;r++){let e=this.batches[r];e.reset(),th.push(e)}this.batches.length=0}clear(){return this.graphicsData.length>0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(r,e=null,t=null,i=null){let s=new to(r,e,t,i);return this.graphicsData.push(s),this.dirty++,this}drawHole(r,e=null){if(!this.graphicsData.length)return null;let t=new to(r,null,null,e),i=this.graphicsData[this.graphicsData.length-1];return t.lineStyle=i.lineStyle,i.holes.push(t),this.dirty++,this}destroy(){super.destroy();for(let r=0;r<this.graphicsData.length;++r)this.graphicsData[r].destroy();this.points.length=0,this.points=null,this.colors.length=0,this.colors=null,this.uvs.length=0,this.uvs=null,this.indices.length=0,this.indices=null,this.indexBuffer.destroy(),this.indexBuffer=null,this.graphicsData.length=0,this.graphicsData=null,this.drawCalls.length=0,this.drawCalls=null,this.batches.length=0,this.batches=null,this._bounds=null}containsPoint(r){let e=this.graphicsData;for(let t=0;t<e.length;++t){let i=e[t];if(i.fillStyle.visible&&i.shape&&(i.matrix?i.matrix.applyInverse(r,ro):ro.copyFrom(r),i.shape.contains(ro.x,ro.y))){let s=!1;if(i.holes){for(let n=0;n<i.holes.length;n++)if(i.holes[n].shape.contains(ro.x,ro.y)){s=!0;break}}if(!s)return!0}}return!1}updateBatches(){if(!this.graphicsData.length){this.batchable=!0;return}if(!this.validateBatching())return;this.cacheDirty=this.dirty;let r=this.uvs,e=this.graphicsData,t=null,i=null;this.batches.length>0&&(t=this.batches[this.batches.length-1],i=t.style);for(let a=this.shapeIndex;a<e.length;a++){this.shapeIndex++;let l=e[a],u=l.fillStyle,h=l.lineStyle;Na[l.type].build(l),l.matrix&&this.transformPoints(l.points,l.matrix),(u.visible||h.visible)&&this.processHoles(l.holes);for(let p=0;p<2;p++){let m=p===0?u:h;if(!m.visible)continue;let x=m.texture.baseTexture,C=this.indices.length,A=this.points.length/2;x.wrapMode=Pt.REPEAT,p===0?this.processFill(l):this.processLine(l);let P=this.points.length/2-A;P!==0&&(t&&!this._compareStyles(i,m)&&(t.end(C,A),t=null),t||(t=th.pop()||new Zn,t.begin(m,C,A),this.batches.push(t),i=m),this.addUvs(this.points,r,m.texture,A,P,m.matrix))}}let s=this.indices.length,n=this.points.length/2;if(t&&t.end(s,n),this.batches.length===0){this.batchable=!0;return}let o=n>65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&o===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=o?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(r,e){return!(!r||!e||r.texture.baseTexture!==e.texture.baseTexture||r.color+r.alpha!==e.color+e.alpha||!!r.native!=!!e.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let r=0,e=this.graphicsData.length;r<e;r++){let t=this.graphicsData[r],i=t.fillStyle,s=t.lineStyle;if(i&&!i.texture.baseTexture.valid||s&&!s.texture.baseTexture.valid)return!1}return!0}packBatches(){this.batchDirty++,this.uvsFloat32=new Float32Array(this.uvs);let r=this.batches;for(let e=0,t=r.length;e<t;e++){let i=r[e];for(let s=0;s<i.size;s++){let n=i.start+s;this.indicesUint16[n]=this.indicesUint16[n]-i.attribStart}}}isBatchable(){if(this.points.length>65535*2)return!1;let r=this.batches;for(let e=0;e<r.length;e++)if(r[e].style.native)return!1;return this.points.length<V6.BATCHABLE_SIZE*2}buildDrawCalls(){let r=++ye._globalBatch;for(let h=0;h<this.drawCalls.length;h++)this.drawCalls[h].texArray.clear(),eo.push(this.drawCalls[h]);this.drawCalls.length=0;let e=this.colors,t=this.textureIds,i=eo.pop();i||(i=new Hi,i.texArray=new $i),i.texArray.count=0,i.start=0,i.size=0,i.type=Et.TRIANGLES;let s=0,n=null,o=0,a=!1,l=Et.TRIANGLES,u=0;this.drawCalls.push(i);for(let h=0;h<this.batches.length;h++){let d=this.batches[h],p=8,m=d.style,x=m.texture.baseTexture;a!==!!m.native&&(a=!!m.native,l=a?Et.LINES:Et.TRIANGLES,n=null,s=p,r++),n!==x&&(n=x,x._batchEnabled!==r&&(s===p&&(r++,s=0,i.size>0&&(i=eo.pop(),i||(i=new Hi,i.texArray=new $i),this.drawCalls.push(i)),i.start=u,i.size=0,i.texArray.count=0,i.type=l),x.touched=1,x._batchEnabled=r,x._batchLocation=s,x.wrapMode=Pt.REPEAT,i.texArray.elements[i.texArray.count++]=x,s++)),i.size+=d.size,u+=d.size,o=x._batchLocation,this.addColors(e,m.color,m.alpha,d.attribSize,d.attribStart),this.addTextureIds(t,o,d.attribSize,d.attribStart)}ye._globalBatch=r,this.packAttributes()}packAttributes(){let r=this.points,e=this.uvs,t=this.colors,i=this.textureIds,s=new ArrayBuffer(r.length*3*4),n=new Float32Array(s),o=new Uint32Array(s),a=0;for(let l=0;l<r.length/2;l++)n[a++]=r[l*2],n[a++]=r[l*2+1],n[a++]=e[l*2],n[a++]=e[l*2+1],o[a++]=t[l],n[a++]=i[l];this._buffer.update(s),this._indexBuffer.update(this.indicesUint16)}processFill(r){r.holes.length?Kn.triangulate(r,this):Na[r.type].triangulate(r,this)}processLine(r){Pa(r,this);for(let e=0;e<r.holes.length;e++)Pa(r.holes[e],this)}processHoles(r){for(let e=0;e<r.length;e++){let t=r[e];Na[t.type].build(t),t.matrix&&this.transformPoints(t.points,t.matrix)}}calculateBounds(){let r=this._bounds;r.clear(),r.addVertexData(this.points,0,this.points.length),r.pad(this.boundsPadding,this.boundsPadding)}transformPoints(r,e){for(let t=0;t<r.length/2;t++){let i=r[t*2],s=r[t*2+1];r[t*2]=e.a*i+e.c*s+e.tx,r[t*2+1]=e.b*i+e.d*s+e.ty}}addColors(r,e,t,i,s=0){let n=Se.shared.setValue(e).toLittleEndianNumber(),o=Se.shared.setValue(n).toPremultiplied(t);r.length=Math.max(r.length,s+i);for(let a=0;a<i;a++)r[s+a]=o}addTextureIds(r,e,t,i=0){r.length=Math.max(r.length,i+t);for(let s=0;s<t;s++)r[i+s]=e}addUvs(r,e,t,i,s,n=null){let o=0,a=e.length,l=t.frame;for(;o<s;){let h=r[(i+o)*2],d=r[(i+o)*2+1];if(n){let p=n.a*h+n.c*d+n.tx;d=n.b*h+n.d*d+n.ty,h=p}o++,e.push(h/l.width,d/l.height)}let u=t.baseTexture;(l.width<u.width||l.height<u.height)&&this.adjustUvs(e,t,a,s)}adjustUvs(r,e,t,i){let s=e.baseTexture,n=1e-6,o=t+i*2,a=e.frame,l=a.width/s.width,u=a.height/s.height,h=a.x/a.width,d=a.y/a.height,p=Math.floor(r[t]+n),m=Math.floor(r[t+1]+n);for(let x=t+2;x<o;x+=2)p=Math.min(p,Math.floor(r[x]+n)),m=Math.min(m,Math.floor(r[x+1]+n));h-=p,d-=m;for(let x=t;x<o;x+=2)r[x]=(r[x]+h)*l,r[x+1]=(r[x+1]+d)*u}},rh=V6;rh.BATCHABLE_SIZE=100;var Os=class r{constructor(){this.color=16777215,this.alpha=1,this.texture=xe.WHITE,this.matrix=null,this.visible=!1,this.reset()}clone(){let e=new r;return e.color=this.color,e.alpha=this.alpha,e.texture=this.texture,e.matrix=this.matrix,e.visible=this.visible,e}reset(){this.color=16777215,this.alpha=1,this.texture=xe.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}};var Ba=class r extends Os{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=xr.BUTT,this.join=mt.MITER,this.miterLimit=10}clone(){let e=new r;return e.color=this.color,e.alpha=this.alpha,e.texture=this.texture,e.matrix=this.matrix,e.visible=this.visible,e.width=this.width,e.alignment=this.alignment,e.native=this.native,e.cap=this.cap,e.join=this.join,e.miterLimit=this.miterLimit,e}reset(){super.reset(),this.color=0,this.alignment=.5,this.width=0,this.native=!1}};var U9={},ih=class extends Je{constructor(r=null){super(),this.shader=null,this.pluginName="batch",this.currentPath=null,this.batches=[],this.batchTint=-1,this.batchDirty=-1,this.vertexData=null,this._fillStyle=new Os,this._lineStyle=new Ba,this._matrix=null,this._holeMode=!1,this.state=X0.for2d(),this._geometry=r||new rh,this._geometry.refCount++,this._transformID=-1,this._tintColor=new Se(16777215),this.blendMode=be.NORMAL}get geometry(){return this._geometry}clone(){return this.finishPoly(),new ih(this._geometry)}set blendMode(r){this.state.blendMode=r}get blendMode(){return this.state.blendMode}get tint(){return this._tintColor.value}set tint(r){this._tintColor.setValue(r)}get fill(){return this._fillStyle}get line(){return this._lineStyle}lineStyle(r=null,e=0,t,i=.5,s=!1){return typeof r=="number"&&(r={width:r,color:e,alpha:t,alignment:i,native:s}),this.lineTextureStyle(r)}lineTextureStyle(r){let e={width:0,texture:xe.WHITE,color:r?.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:xr.BUTT,join:mt.MITER,miterLimit:10};r=Object.assign(e,r),this.normalizeColor(r),this.currentPath&&this.startPoly();let t=r.width>0&&r.alpha>0;return t?(r.matrix&&(r.matrix=r.matrix.clone(),r.matrix.invert()),Object.assign(this._lineStyle,{visible:t},r)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){let r=this.currentPath.points,e=this.currentPath.points.length;e>2&&(this.drawShape(this.currentPath),this.currentPath=new li,this.currentPath.closeStroke=!1,this.currentPath.points.push(r[e-2],r[e-1]))}else this.currentPath=new li,this.currentPath.closeStroke=!1}finishPoly(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)}moveTo(r,e){return this.startPoly(),this.currentPath.points[0]=r,this.currentPath.points[1]=e,this}lineTo(r,e){this.currentPath||this.moveTo(0,0);let t=this.currentPath.points,i=t[t.length-2],s=t[t.length-1];return(i!==r||s!==e)&&t.push(r,e),this}_initCurve(r=0,e=0){this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[r,e]):this.moveTo(r,e)}quadraticCurveTo(r,e,t,i){this._initCurve();let s=this.currentPath.points;return s.length===0&&this.moveTo(0,0),Jn.curveTo(r,e,t,i,s),this}bezierCurveTo(r,e,t,i,s,n){return this._initCurve(),Qn.curveTo(r,e,t,i,s,n,this.currentPath.points),this}arcTo(r,e,t,i,s){this._initCurve(r,e);let n=this.currentPath.points,o=Rs.curveTo(r,e,t,i,s,n);if(o){let{cx:a,cy:l,radius:u,startAngle:h,endAngle:d,anticlockwise:p}=o;this.arc(a,l,u,h,d,p)}return this}arc(r,e,t,i,s,n=!1){if(i===s)return this;if(!n&&s<=i?s+=ji:n&&i<=s&&(i+=ji),s-i===0)return this;let a=r+Math.cos(i)*t,l=e+Math.sin(i)*t,u=this._geometry.closePointEps,h=this.currentPath?this.currentPath.points:null;if(h){let d=Math.abs(h[h.length-2]-a),p=Math.abs(h[h.length-1]-l);d<u&&p<u||h.push(a,l)}else this.moveTo(a,l),h=this.currentPath.points;return Rs.arc(a,l,r,e,t,i,s,n,h),this}beginFill(r=0,e){return this.beginTextureFill({texture:xe.WHITE,color:r,alpha:e})}normalizeColor(r){let e=Se.shared.setValue(r.color??0);r.color=e.toNumber(),r.alpha??(r.alpha=e.alpha)}beginTextureFill(r){let e={texture:xe.WHITE,color:16777215,matrix:null};r=Object.assign(e,r),this.normalizeColor(r),this.currentPath&&this.startPoly();let t=r.alpha>0;return t?(r.matrix&&(r.matrix=r.matrix.clone(),r.matrix.invert()),Object.assign(this._fillStyle,{visible:t},r)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(r,e,t,i){return this.drawShape(new we(r,e,t,i))}drawRoundedRect(r,e,t,i,s){return this.drawShape(new ra(r,e,t,i,s))}drawCircle(r,e,t){return this.drawShape(new ea(r,e,t))}drawEllipse(r,e,t,i){return this.drawShape(new ta(r,e,t,i))}drawPolygon(...r){let e,t=!0,i=r[0];i.points?(t=i.closeStroke,e=i.points):Array.isArray(r[0])?e=r[0]:e=r;let s=new li(e);return s.closeStroke=t,this.drawShape(s),this}drawShape(r){return this._holeMode?this._geometry.drawHole(r,this._matrix):this._geometry.drawShape(r,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this}clear(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this}isFastRect(){let r=this._geometry.graphicsData;return r.length===1&&r[0].shape.type===t0.RECT&&!r[0].matrix&&!r[0].holes.length&&!(r[0].lineStyle.visible&&r[0].lineStyle.width)}_render(r){this.finishPoly();let e=this._geometry;e.updateBatches(),e.batchable?(this.batchDirty!==e.batchDirty&&this._populateBatches(),this._renderBatched(r)):(r.batch.flush(),this._renderDirect(r))}_populateBatches(){let r=this._geometry,e=this.blendMode,t=r.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=r.batchDirty,this.batches.length=t,this.vertexData=new Float32Array(r.points);for(let i=0;i<t;i++){let s=r.batches[i],n=s.style.color,o=new Float32Array(this.vertexData.buffer,s.attribStart*4*2,s.attribSize*2),a=new Float32Array(r.uvsFloat32.buffer,s.attribStart*4*2,s.attribSize*2),l=new Uint16Array(r.indicesUint16.buffer,s.start*2,s.size),u={vertexData:o,blendMode:e,indices:l,uvs:a,_batchRGB:Se.shared.setValue(n).toRgbArray(),_tintRGB:n,_texture:s.style.texture,alpha:s.style.alpha,worldAlpha:1};this.batches[i]=u}}_renderBatched(r){if(this.batches.length){r.batch.setObjectRenderer(r.plugins[this.pluginName]),this.calculateVertices(),this.calculateTints();for(let e=0,t=this.batches.length;e<t;e++){let i=this.batches[e];i.worldAlpha=this.worldAlpha*i.alpha,r.plugins[this.pluginName].render(i)}}}_renderDirect(r){let e=this._resolveDirectShader(r),t=this._geometry,i=this.worldAlpha,s=e.uniforms,n=t.drawCalls;s.translationMatrix=this.transform.worldTransform,Se.shared.setValue(this._tintColor).premultiply(i).toArray(s.tint),r.shader.bind(e),r.geometry.bind(t,e),r.state.set(this.state);for(let o=0,a=n.length;o<a;o++)this._renderDrawCallDirect(r,t.drawCalls[o])}_renderDrawCallDirect(r,e){let{texArray:t,type:i,size:s,start:n}=e,o=t.count;for(let a=0;a<o;a++)r.texture.bind(t.elements[a],a);r.geometry.draw(i,s,n)}_resolveDirectShader(r){let e=this.shader,t=this.pluginName;if(!e){if(!U9[t]){let{maxTextures:i}=r.plugins[t],s=new Int32Array(i);for(let a=0;a<i;a++)s[a]=a;let n={tint:new Float32Array([1,1,1,1]),translationMatrix:new Re,default:pt.from({uSamplers:s},!0)},o=r.plugins[t]._shader.program;U9[t]=new q0(o,n)}e=U9[t]}return e}_calculateBounds(){this.finishPoly();let r=this._geometry;if(!r.graphicsData.length)return;let{minX:e,minY:t,maxX:i,maxY:s}=r.bounds;this._bounds.addFrame(this.transform,e,t,i,s)}containsPoint(r){return this.worldTransform.applyInverse(r,ih._TEMP_POINT),this._geometry.containsPoint(ih._TEMP_POINT)}calculateTints(){if(this.batchTint!==this.tint){this.batchTint=this._tintColor.toNumber();for(let r=0;r<this.batches.length;r++){let e=this.batches[r];e._tintRGB=Se.shared.setValue(this._tintColor).multiply(e._batchRGB).toLittleEndianNumber()}}}calculateVertices(){let r=this.transform._worldID;if(this._transformID===r)return;this._transformID=r;let e=this.transform.worldTransform,t=e.a,i=e.b,s=e.c,n=e.d,o=e.tx,a=e.ty,l=this._geometry.points,u=this.vertexData,h=0;for(let d=0;d<l.length;d+=2){let p=l[d],m=l[d+1];u[h++]=t*p+s*m+o,u[h++]=n*m+i*p+a}}closePath(){let r=this.currentPath;return r&&(r.closeStroke=!0,this.finishPoly()),this}setMatrix(r){return this._matrix=r,this}beginHole(){return this.finishPoly(),this._holeMode=!0,this}endHole(){return this.finishPoly(),this._holeMode=!1,this}destroy(r){this._geometry.refCount--,this._geometry.refCount===0&&this._geometry.dispose(),this._matrix=null,this.currentPath=null,this._lineStyle.destroy(),this._lineStyle=null,this._fillStyle.destroy(),this._fillStyle=null,this._geometry=null,this.shader=null,this.vertexData=null,this.batches.length=0,this.batches=null,super.destroy(r)}},p0=ih;p0.curves=er;p0._TEMP_POINT=new Ae;var Ra=class{constructor(e,t){this.uvBuffer=e,this.uvMatrix=t,this.data=null,this._bufferUpdateId=-1,this._textureUpdateId=-1,this._updateID=0}update(e){if(!e&&this._bufferUpdateId===this.uvBuffer._updateID&&this._textureUpdateId===this.uvMatrix._updateID)return;this._bufferUpdateId=this.uvBuffer._updateID,this._textureUpdateId=this.uvMatrix._updateID;let t=this.uvBuffer.data;(!this.data||this.data.length!==t.length)&&(this.data=new Float32Array(t.length)),this.uvMatrix.multiplyUvs(t,this.data),this._updateID++}};var V9=new Ae,z6=new li,W6=class extends Je{constructor(r,e,t,i=Et.TRIANGLES){super(),this.geometry=r,this.shader=e,this.state=t||X0.for2d(),this.drawMode=i,this.start=0,this.size=0,this.uvs=null,this.indices=null,this.vertexData=new Float32Array(1),this.vertexDirty=-1,this._transformID=-1,this._roundPixels=j.ROUND_PIXELS,this.batchUvs=null}get geometry(){return this._geometry}set geometry(r){this._geometry!==r&&(this._geometry&&(this._geometry.refCount--,this._geometry.refCount===0&&this._geometry.dispose()),this._geometry=r,this._geometry&&this._geometry.refCount++,this.vertexDirty=-1)}get uvBuffer(){return this.geometry.buffers[1]}get verticesBuffer(){return this.geometry.buffers[0]}set material(r){this.shader=r}get material(){return this.shader}set blendMode(r){this.state.blendMode=r}get blendMode(){return this.state.blendMode}set roundPixels(r){this._roundPixels!==r&&(this._transformID=-1),this._roundPixels=r}get roundPixels(){return this._roundPixels}get tint(){return"tint"in this.shader?this.shader.tint:null}set tint(r){this.shader.tint=r}get tintValue(){return this.shader.tintValue}get texture(){return"texture"in this.shader?this.shader.texture:null}set texture(r){this.shader.texture=r}_render(r){let e=this.geometry.buffers[0].data;this.shader.batchable&&this.drawMode===Et.TRIANGLES&&e.length<W6.BATCHABLE_SIZE*2?this._renderToBatch(r):this._renderDefault(r)}_renderDefault(r){let e=this.shader;e.alpha=this.worldAlpha,e.update&&e.update(),r.batch.flush(),e.uniforms.translationMatrix=this.transform.worldTransform.toArray(!0),r.shader.bind(e),r.state.set(this.state),r.geometry.bind(this.geometry,e),r.geometry.draw(this.drawMode,this.size,this.start,this.geometry.instanceCount)}_renderToBatch(r){let e=this.geometry,t=this.shader;t.uvMatrix&&(t.uvMatrix.update(),this.calculateUvs()),this.calculateVertices(),this.indices=e.indexBuffer.data,this._tintRGB=t._tintRGB,this._texture=t.texture;let i=this.material.pluginName;r.batch.setObjectRenderer(r.plugins[i]),r.plugins[i].render(this)}calculateVertices(){let e=this.geometry.buffers[0],t=e.data,i=e._updateID;if(i===this.vertexDirty&&this._transformID===this.transform._worldID)return;this._transformID=this.transform._worldID,this.vertexData.length!==t.length&&(this.vertexData=new Float32Array(t.length));let s=this.transform.worldTransform,n=s.a,o=s.b,a=s.c,l=s.d,u=s.tx,h=s.ty,d=this.vertexData;for(let p=0;p<d.length/2;p++){let m=t[p*2],x=t[p*2+1];d[p*2]=n*m+a*x+u,d[p*2+1]=o*m+l*x+h}if(this._roundPixels){let p=j.RESOLUTION;for(let m=0;m<d.length;++m)d[m]=Math.round(d[m]*p)/p}this.vertexDirty=i}calculateUvs(){let r=this.geometry.buffers[1],e=this.shader;e.uvMatrix.isSimple?this.uvs=r.data:(this.batchUvs||(this.batchUvs=new Ra(r,e.uvMatrix)),this.batchUvs.update(),this.uvs=this.batchUvs.data)}_calculateBounds(){this.calculateVertices(),this._bounds.addVertexData(this.vertexData,0,this.vertexData.length)}containsPoint(r){if(!this.getBounds().contains(r.x,r.y))return!1;this.worldTransform.applyInverse(r,V9);let e=this.geometry.getBuffer("aVertexPosition").data,t=z6.points,i=this.geometry.getIndex().data,s=i.length,n=this.drawMode===4?3:1;for(let o=0;o+2<s;o+=n){let a=i[o]*2,l=i[o+1]*2,u=i[o+2]*2;if(t[0]=e[a],t[1]=e[a+1],t[2]=e[l],t[3]=e[l+1],t[4]=e[u],t[5]=e[u+1],z6.contains(V9.x,V9.y))return!0}return!1}destroy(r){super.destroy(r),this._cachedTexture&&(this._cachedTexture.destroy(),this._cachedTexture=null),this.geometry=null,this.shader=null,this.state=null,this.uvs=null,this.indices=null,this.vertexData=null}},ts=W6;ts.BATCHABLE_SIZE=100;var rs=class extends Rt{constructor(e,t,i){super();let s=new Qe(e),n=new Qe(t,!0),o=new Qe(i,!0,!0);this.addAttribute("aVertexPosition",s,2,!1,me.FLOAT).addAttribute("aTextureCoord",n,2,!1,me.FLOAT).addIndex(o),this._updateId=-1}get vertexDirtyId(){return this.buffers[0]._updateID}};var H6=`varying vec2 vTextureCoord;
uniform vec4 uColor;
uniform sampler2D uSampler;
void main(void)
{
gl_FragColor = texture2D(uSampler, vTextureCoord) * uColor;
}
`;var j6=`attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
uniform mat3 projectionMatrix;
uniform mat3 translationMatrix;
uniform mat3 uTextureMatrix;
varying vec2 vTextureCoord;
void main(void)
{
gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;
}
`;var Di=class extends q0{constructor(e,t){let i={uSampler:e,alpha:1,uTextureMatrix:Re.IDENTITY,uColor:new Float32Array([1,1,1,1])};t=Object.assign({tint:16777215,alpha:1,pluginName:"batch"},t),t.uniforms&&Object.assign(i,t.uniforms),super(t.program||G0.from(j6,H6),i),this._colorDirty=!1,this.uvMatrix=new qi(e),this.batchable=t.program===void 0,this.pluginName=t.pluginName,this._tintColor=new Se(t.tint),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0,this.alpha=t.alpha}get texture(){return this.uniforms.uSampler}set texture(e){this.uniforms.uSampler!==e&&(!this.uniforms.uSampler.baseTexture.alphaMode!=!e.baseTexture.alphaMode&&(this._colorDirty=!0),this.uniforms.uSampler=e,this.uvMatrix.texture=e)}set alpha(e){e!==this._alpha&&(this._alpha=e,this._colorDirty=!0)}get alpha(){return this._alpha}set tint(e){e!==this.tint&&(this._tintColor.setValue(e),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0)}get tint(){return this._tintColor.value}get tintValue(){return this._tintColor.toNumber()}update(){if(this._colorDirty){this._colorDirty=!1;let t=this.texture.baseTexture.alphaMode;Se.shared.setValue(this._tintColor).premultiply(this._alpha,t).toArray(this.uniforms.uColor)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)}};var La=class{constructor(e,t,i){this.geometry=new Rt,this.indexBuffer=null,this.size=i,this.dynamicProperties=[],this.staticProperties=[];for(let s=0;s<e.length;++s){let n=e[s];n={attributeName:n.attributeName,size:n.size,uploadFunction:n.uploadFunction,type:n.type||me.FLOAT,offset:n.offset},t[s]?this.dynamicProperties.push(n):this.staticProperties.push(n)}this.staticStride=0,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.dynamicStride=0,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this._updateID=0,this.initBuffers()}initBuffers(){let e=this.geometry,t=0;this.indexBuffer=new Qe(ie.createIndicesForQuads(this.size),!0,!0),e.addIndex(this.indexBuffer),this.dynamicStride=0;for(let o=0;o<this.dynamicProperties.length;++o){let a=this.dynamicProperties[o];a.offset=t,t+=a.size,this.dynamicStride+=a.size}let i=new ArrayBuffer(this.size*this.dynamicStride*4*4);this.dynamicData=new Float32Array(i),this.dynamicDataUint32=new Uint32Array(i),this.dynamicBuffer=new Qe(this.dynamicData,!1,!1);let s=0;this.staticStride=0;for(let o=0;o<this.staticProperties.length;++o){let a=this.staticProperties[o];a.offset=s,s+=a.size,this.staticStride+=a.size}let n=new ArrayBuffer(this.size*this.staticStride*4*4);this.staticData=new Float32Array(n),this.staticDataUint32=new Uint32Array(n),this.staticBuffer=new Qe(this.staticData,!0,!1);for(let o=0;o<this.dynamicProperties.length;++o){let a=this.dynamicProperties[o];e.addAttribute(a.attributeName,this.dynamicBuffer,0,a.type===me.UNSIGNED_BYTE,a.type,this.dynamicStride*4,a.offset*4)}for(let o=0;o<this.staticProperties.length;++o){let a=this.staticProperties[o];e.addAttribute(a.attributeName,this.staticBuffer,0,a.type===me.UNSIGNED_BYTE,a.type,this.staticStride*4,a.offset*4)}}uploadDynamic(e,t,i){for(let s=0;s<this.dynamicProperties.length;s++){let n=this.dynamicProperties[s];n.uploadFunction(e,t,i,n.type===me.UNSIGNED_BYTE?this.dynamicDataUint32:this.dynamicData,this.dynamicStride,n.offset)}this.dynamicBuffer._updateID++}uploadStatic(e,t,i){for(let s=0;s<this.staticProperties.length;s++){let n=this.staticProperties[s];n.uploadFunction(e,t,i,n.type===me.UNSIGNED_BYTE?this.staticDataUint32:this.staticData,this.staticStride,n.offset)}this.staticBuffer._updateID++}destroy(){this.indexBuffer=null,this.dynamicProperties=null,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this.staticProperties=null,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.geometry.destroy()}};var $6=`varying vec2 vTextureCoord;
varying vec4 vColor;
uniform sampler2D uSampler;
void main(void){
vec4 color = texture2D(uSampler, vTextureCoord) * vColor;
gl_FragColor = color;
}`;var Y6=`attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
attribute vec4 aColor;
attribute vec2 aPositionCoord;
attribute float aRotation;
uniform mat3 translationMatrix;
uniform vec4 uColor;
varying vec2 vTextureCoord;
varying vec4 vColor;
void main(void){
float x = (aVertexPosition.x) * cos(aRotation) - (aVertexPosition.y) * sin(aRotation);
float y = (aVertexPosition.x) * sin(aRotation) + (aVertexPosition.y) * cos(aRotation);
vec2 v = vec2(x, y);
v = v + aPositionCoord;
gl_Position = vec4((translationMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);
vTextureCoord = aTextureCoord;
vColor = aColor * uColor;
}
`;var Oa=class extends fr{constructor(e){super(e),this.shader=null,this.properties=null,this.tempMatrix=new Re,this.properties=[{attributeName:"aVertexPosition",size:2,uploadFunction:this.uploadVertices,offset:0},{attributeName:"aPositionCoord",size:2,uploadFunction:this.uploadPosition,offset:0},{attributeName:"aRotation",size:1,uploadFunction:this.uploadRotation,offset:0},{attributeName:"aTextureCoord",size:2,uploadFunction:this.uploadUvs,offset:0},{attributeName:"aColor",size:1,type:me.UNSIGNED_BYTE,uploadFunction:this.uploadTint,offset:0}],this.shader=q0.from(Y6,$6,{}),this.state=X0.for2d()}render(e){let t=e.children,i=e._maxSize,s=e._batchSize,n=this.renderer,o=t.length;if(o===0)return;o>i&&!e.autoResize&&(o=i);let a=e._buffers;a||(a=e._buffers=this.generateBuffers(e));let l=t[0]._texture.baseTexture,u=l.alphaMode>0;this.state.blendMode=ie.correctBlendMode(e.blendMode,u),n.state.set(this.state);let h=n.gl,d=e.worldTransform.copyTo(this.tempMatrix);d.prepend(n.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=d.toArray(!0),this.shader.uniforms.uColor=Se.shared.setValue(e.tintRgb).premultiply(e.worldAlpha,u).toArray(this.shader.uniforms.uColor),this.shader.uniforms.uSampler=l,this.renderer.shader.bind(this.shader);let p=!1;for(let m=0,x=0;m<o;m+=s,x+=1){let C=o-m;C>s&&(C=s),x>=a.length&&a.push(this._generateOneMoreBuffer(e));let A=a[x];A.uploadDynamic(t,m,C);let P=e._bufferUpdateIDs[x]||0;p=p||A._updateID<P,p&&(A._updateID=e._updateID,A.uploadStatic(t,m,C)),n.geometry.bind(A.geometry),h.drawElements(h.TRIANGLES,C*6,h.UNSIGNED_SHORT,0)}}generateBuffers(e){let t=[],i=e._maxSize,s=e._batchSize,n=e._properties;for(let o=0;o<i;o+=s)t.push(new La(this.properties,n,s));return t}_generateOneMoreBuffer(e){let t=e._batchSize,i=e._properties;return new La(this.properties,i,t)}uploadVertices(e,t,i,s,n,o){let a=0,l=0,u=0,h=0;for(let d=0;d<i;++d){let p=e[t+d],m=p._texture,x=p.scale.x,C=p.scale.y,A=m.trim,P=m.orig;A?(l=A.x-p.anchor.x*P.width,a=l+A.width,h=A.y-p.anchor.y*P.height,u=h+A.height):(a=P.width*(1-p.anchor.x),l=P.width*-p.anchor.x,u=P.height*(1-p.anchor.y),h=P.height*-p.anchor.y),s[o]=l*x,s[o+1]=h*C,s[o+n]=a*x,s[o+n+1]=h*C,s[o+n*2]=a*x,s[o+n*2+1]=u*C,s[o+n*3]=l*x,s[o+n*3+1]=u*C,o+=n*4}}uploadPosition(e,t,i,s,n,o){for(let a=0;a<i;a++){let l=e[t+a].position;s[o]=l.x,s[o+1]=l.y,s[o+n]=l.x,s[o+n+1]=l.y,s[o+n*2]=l.x,s[o+n*2+1]=l.y,s[o+n*3]=l.x,s[o+n*3+1]=l.y,o+=n*4}}uploadRotation(e,t,i,s,n,o){for(let a=0;a<i;a++){let l=e[t+a].rotation;s[o]=l,s[o+n]=l,s[o+n*2]=l,s[o+n*3]=l,o+=n*4}}uploadUvs(e,t,i,s,n,o){for(let a=0;a<i;++a){let l=e[t+a]._texture._uvs;l?(s[o]=l.x0,s[o+1]=l.y0,s[o+n]=l.x1,s[o+n+1]=l.y1,s[o+n*2]=l.x2,s[o+n*2+1]=l.y2,s[o+n*3]=l.x3,s[o+n*3+1]=l.y3,o+=n*4):(s[o]=0,s[o+1]=0,s[o+n]=0,s[o+n+1]=0,s[o+n*2]=0,s[o+n*2+1]=0,s[o+n*3]=0,s[o+n*3+1]=0,o+=n*4)}}uploadTint(e,t,i,s,n,o){for(let a=0;a<i;++a){let l=e[t+a],u=Se.shared.setValue(l._tintRGB).toPremultiplied(l.alpha,l.texture.baseTexture.alphaMode>0);s[o]=u,s[o+n]=u,s[o+n*2]=u,s[o+n*3]=u,o+=n*4}}destroy(){super.destroy(),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null}};Oa.extension={name:"particle",type:$.RendererPlugin};K.add(Oa);var is=(r=>(r[r.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",r[r.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL",r))(is||{});var sh={willReadFrequently:!0},De=class{static get experimentalLetterSpacingSupported(){let r=De._experimentalLetterSpacingSupported;if(r!==void 0){let e=j.ADAPTER.getCanvasRenderingContext2D().prototype;r=De._experimentalLetterSpacingSupported="letterSpacing"in e||"textLetterSpacing"in e}return r}constructor(r,e,t,i,s,n,o,a,l){this.text=r,this.style=e,this.width=t,this.height=i,this.lines=s,this.lineWidths=n,this.lineHeight=o,this.maxLineWidth=a,this.fontProperties=l}static measureText(r,e,t,i=De._canvas){t=t??e.wordWrap;let s=e.toFontString(),n=De.measureFont(s);n.fontSize===0&&(n.fontSize=e.fontSize,n.ascent=e.fontSize);let o=i.getContext("2d",sh);o.font=s;let l=(t?De.wordWrap(r,e,i):r).split(/(?:\r\n|\r|\n)/),u=new Array(l.length),h=0;for(let x=0;x<l.length;x++){let C=De._measureText(l[x],e.letterSpacing,o);u[x]=C,h=Math.max(h,C)}let d=h+e.strokeThickness;e.dropShadow&&(d+=e.dropShadowDistance);let p=e.lineHeight||n.fontSize+e.strokeThickness,m=Math.max(p,n.fontSize+e.strokeThickness*2)+(l.length-1)*(p+e.leading);return e.dropShadow&&(m+=e.dropShadowDistance),new De(r,e,d,m,l,u,p+e.leading,h,n)}static _measureText(r,e,t){let i=!1;De.experimentalLetterSpacingSupported&&(De.experimentalLetterSpacing?(t.letterSpacing=`${e}px`,t.textLetterSpacing=`${e}px`,i=!0):(t.letterSpacing="0px",t.textLetterSpacing="0px"));let s=t.measureText(r).width;return s>0&&(i?s-=e:s+=(De.graphemeSegmenter(r).length-1)*e),s}static wordWrap(r,e,t=De._canvas){let i=t.getContext("2d",sh),s=0,n="",o="",a=Object.create(null),{letterSpacing:l,whiteSpace:u}=e,h=De.collapseSpaces(u),d=De.collapseNewlines(u),p=!h,m=e.wordWrapWidth+l,x=De.tokenize(r);for(let C=0;C<x.length;C++){let A=x[C];if(De.isNewline(A)){if(!d){o+=De.addLine(n),p=!h,n="",s=0;continue}A=" "}if(h){let L=De.isBreakingSpace(A),I=De.isBreakingSpace(n[n.length-1]);if(L&&I)continue}let P=De.getFromCache(A,l,a,i);if(P>m)if(n!==""&&(o+=De.addLine(n),n="",s=0),De.canBreakWords(A,e.breakWords)){let L=De.wordWrapSplit(A);for(let I=0;I<L.length;I++){let T=L[I],W=T,Q=1;for(;L[I+Q];){let z=L[I+Q];if(!De.canBreakChars(W,z,A,I,e.breakWords))T+=z;else break;W=z,Q++}I+=Q-1;let O=De.getFromCache(T,l,a,i);O+s>m&&(o+=De.addLine(n),p=!1,n="",s=0),n+=T,s+=O}}else{n.length>0&&(o+=De.addLine(n),n="",s=0);let L=C===x.length-1;o+=De.addLine(A,!L),p=!1,n="",s=0}else P+s>m&&(p=!1,o+=De.addLine(n),n="",s=0),(n.length>0||!De.isBreakingSpace(A)||p)&&(n+=A,s+=P)}return o+=De.addLine(n,!1),o}static addLine(r,e=!0){return r=De.trimRight(r),r=e?`${r}
`:r,r}static getFromCache(r,e,t,i){let s=t[r];return typeof s!="number"&&(s=De._measureText(r,e,i)+e,t[r]=s),s}static collapseSpaces(r){return r==="normal"||r==="pre-line"}static collapseNewlines(r){return r==="normal"}static trimRight(r){if(typeof r!="string")return"";for(let e=r.length-1;e>=0;e--){let t=r[e];if(!De.isBreakingSpace(t))break;r=r.slice(0,-1)}return r}static isNewline(r){return typeof r!="string"?!1:De._newlines.includes(r.charCodeAt(0))}static isBreakingSpace(r,e){return typeof r!="string"?!1:De._breakingSpaces.includes(r.charCodeAt(0))}static tokenize(r){let e=[],t="";if(typeof r!="string")return e;for(let i=0;i<r.length;i++){let s=r[i],n=r[i+1];if(De.isBreakingSpace(s,n)||De.isNewline(s)){t!==""&&(e.push(t),t=""),e.push(s);continue}t+=s}return t!==""&&e.push(t),e}static canBreakWords(r,e){return e}static canBreakChars(r,e,t,i,s){return!0}static wordWrapSplit(r){return De.graphemeSegmenter(r)}static measureFont(r){if(De._fonts[r])return De._fonts[r];let e={ascent:0,descent:0,fontSize:0},t=De._canvas,i=De._context;i.font=r;let s=De.METRICS_STRING+De.BASELINE_SYMBOL,n=Math.ceil(i.measureText(s).width),o=Math.ceil(i.measureText(De.BASELINE_SYMBOL).width),a=Math.ceil(De.HEIGHT_MULTIPLIER*o);if(o=o*De.BASELINE_MULTIPLIER|0,n===0||a===0)return De._fonts[r]=e,e;t.width=n,t.height=a,i.fillStyle="#f00",i.fillRect(0,0,n,a),i.font=r,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(s,0,o);let l=i.getImageData(0,0,n,a).data,u=l.length,h=n*4,d=0,p=0,m=!1;for(d=0;d<o;++d){for(let x=0;x<h;x+=4)if(l[p+x]!==255){m=!0;break}if(!m)p+=h;else break}for(e.ascent=o-d,p=u-h,m=!1,d=a;d>o;--d){for(let x=0;x<h;x+=4)if(l[p+x]!==255){m=!0;break}if(!m)p-=h;else break}return e.descent=d-o,e.fontSize=e.ascent+e.descent,De._fonts[r]=e,e}static clearMetrics(r=""){r?delete De._fonts[r]:De._fonts={}}static get _canvas(){if(!De.__canvas){let r;try{let e=new OffscreenCanvas(0,0);if(e.getContext("2d",sh)?.measureText)return De.__canvas=e,e;r=j.ADAPTER.createCanvas()}catch{r=j.ADAPTER.createCanvas()}r.width=r.height=10,De.__canvas=r}return De.__canvas}static get _context(){return De.__context||(De.__context=De._canvas.getContext("2d",sh)),De.__context}},S0=De;S0.METRICS_STRING="|\xC9q\xC5";S0.BASELINE_SYMBOL="M";S0.BASELINE_MULTIPLIER=1.4;S0.HEIGHT_MULTIPLIER=2;S0.graphemeSegmenter=(()=>{if(typeof Intl?.Segmenter=="function"){let r=new Intl.Segmenter;return e=>[...r.segment(e)].map(t=>t.segment)}return r=>[...r]})();S0.experimentalLetterSpacing=!1;S0._fonts={};S0._newlines=[10,13];S0._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];var em=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Ga=class{constructor(r){this.styleID=0,this.reset(),W9(this,r,r)}clone(){let r={};return W9(r,this,Ga.defaultStyle),new Ga(r)}reset(){W9(this,Ga.defaultStyle,Ga.defaultStyle)}get align(){return this._align}set align(r){this._align!==r&&(this._align=r,this.styleID++)}get breakWords(){return this._breakWords}set breakWords(r){this._breakWords!==r&&(this._breakWords=r,this.styleID++)}get dropShadow(){return this._dropShadow}set dropShadow(r){this._dropShadow!==r&&(this._dropShadow=r,this.styleID++)}get dropShadowAlpha(){return this._dropShadowAlpha}set dropShadowAlpha(r){this._dropShadowAlpha!==r&&(this._dropShadowAlpha=r,this.styleID++)}get dropShadowAngle(){return this._dropShadowAngle}set dropShadowAngle(r){this._dropShadowAngle!==r&&(this._dropShadowAngle=r,this.styleID++)}get dropShadowBlur(){return this._dropShadowBlur}set dropShadowBlur(r){this._dropShadowBlur!==r&&(this._dropShadowBlur=r,this.styleID++)}get dropShadowColor(){return this._dropShadowColor}set dropShadowColor(r){let e=z9(r);this._dropShadowColor!==e&&(this._dropShadowColor=e,this.styleID++)}get dropShadowDistance(){return this._dropShadowDistance}set dropShadowDistance(r){this._dropShadowDistance!==r&&(this._dropShadowDistance=r,this.styleID++)}get fill(){return this._fill}set fill(r){let e=z9(r);this._fill!==e&&(this._fill=e,this.styleID++)}get fillGradientType(){return this._fillGradientType}set fillGradientType(r){this._fillGradientType!==r&&(this._fillGradientType=r,this.styleID++)}get fillGradientStops(){return this._fillGradientStops}set fillGradientStops(r){tm(this._fillGradientStops,r)||(this._fillGradientStops=r,this.styleID++)}get fontFamily(){return this._fontFamily}set fontFamily(r){this.fontFamily!==r&&(this._fontFamily=r,this.styleID++)}get fontSize(){return this._fontSize}set fontSize(r){this._fontSize!==r&&(this._fontSize=r,this.styleID++)}get fontStyle(){return this._fontStyle}set fontStyle(r){this._fontStyle!==r&&(this._fontStyle=r,this.styleID++)}get fontVariant(){return this._fontVariant}set fontVariant(r){this._fontVariant!==r&&(this._fontVariant=r,this.styleID++)}get fontWeight(){return this._fontWeight}set fontWeight(r){this._fontWeight!==r&&(this._fontWeight=r,this.styleID++)}get letterSpacing(){return this._letterSpacing}set letterSpacing(r){this._letterSpacing!==r&&(this._letterSpacing=r,this.styleID++)}get lineHeight(){return this._lineHeight}set lineHeight(r){this._lineHeight!==r&&(this._lineHeight=r,this.styleID++)}get leading(){return this._leading}set leading(r){this._leading!==r&&(this._leading=r,this.styleID++)}get lineJoin(){return this._lineJoin}set lineJoin(r){this._lineJoin!==r&&(this._lineJoin=r,this.styleID++)}get miterLimit(){return this._miterLimit}set miterLimit(r){this._miterLimit!==r&&(this._miterLimit=r,this.styleID++)}get padding(){return this._padding}set padding(r){this._padding!==r&&(this._padding=r,this.styleID++)}get stroke(){return this._stroke}set stroke(r){let e=z9(r);this._stroke!==e&&(this._stroke=e,this.styleID++)}get strokeThickness(){return this._strokeThickness}set strokeThickness(r){this._strokeThickness!==r&&(this._strokeThickness=r,this.styleID++)}get textBaseline(){return this._textBaseline}set textBaseline(r){this._textBaseline!==r&&(this._textBaseline=r,this.styleID++)}get trim(){return this._trim}set trim(r){this._trim!==r&&(this._trim=r,this.styleID++)}get whiteSpace(){return this._whiteSpace}set whiteSpace(r){this._whiteSpace!==r&&(this._whiteSpace=r,this.styleID++)}get wordWrap(){return this._wordWrap}set wordWrap(r){this._wordWrap!==r&&(this._wordWrap=r,this.styleID++)}get wordWrapWidth(){return this._wordWrapWidth}set wordWrapWidth(r){this._wordWrapWidth!==r&&(this._wordWrapWidth=r,this.styleID++)}toFontString(){let r=typeof this.fontSize=="number"?`${this.fontSize}px`:this.fontSize,e=this.fontFamily;Array.isArray(this.fontFamily)||(e=this.fontFamily.split(","));for(let t=e.length-1;t>=0;t--){let i=e[t].trim();!/([\"\'])[^\'\"]+\1/.test(i)&&!em.includes(i)&&(i=`"${i}"`),e[t]=i}return`${this.fontStyle} ${this.fontVariant} ${this.fontWeight} ${r} ${e.join(",")}`}},Z0=Ga;Z0.defaultStyle={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:is.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",leading:0,letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100};function z9(r){let e=Se.shared;return Array.isArray(r)?r.map(t=>e.setValue(t).toHex()):e.setValue(r).toHex()}function tm(r,e){if(!Array.isArray(r)||!Array.isArray(e)||r.length!==e.length)return!1;for(let t=0;t<r.length;++t)if(r[t]!==e[t])return!1;return!0}function W9(r,e,t){for(let i in t)Array.isArray(e[i])?r[i]=e[i].slice():r[i]=e[i]}var rm={texture:!0,children:!1,baseTexture:!0},H9=class extends N0{constructor(r,e,t){let i=!1;t||(t=j.ADAPTER.createCanvas(),i=!0),t.width=3,t.height=3;let s=xe.from(t);s.orig=new we,s.trim=new we,super(s),this._ownCanvas=i,this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),this._resolution=H9.defaultResolution??j.RESOLUTION,this._autoResolution=H9.defaultAutoResolution,this._text=null,this._style=null,this._styleListener=null,this._font="",this.text=r,this.style=e,this.localStyleID=-1}static get experimentalLetterSpacing(){return S0.experimentalLetterSpacing}static set experimentalLetterSpacing(r){ie.deprecation("7.1.0","Text.experimentalLetterSpacing is deprecated, use TextMetrics.experimentalLetterSpacing"),S0.experimentalLetterSpacing=r}updateText(r){let e=this._style;if(this.localStyleID!==e.styleID&&(this.dirty=!0,this.localStyleID=e.styleID),!this.dirty&&r)return;this._font=this._style.toFontString();let t=this.context,i=S0.measureText(this._text||" ",this._style,this._style.wordWrap,this.canvas),s=i.width,n=i.height,o=i.lines,a=i.lineHeight,l=i.lineWidths,u=i.maxLineWidth,h=i.fontProperties;this.canvas.width=Math.ceil(Math.ceil(Math.max(1,s)+e.padding*2)*this._resolution),this.canvas.height=Math.ceil(Math.ceil(Math.max(1,n)+e.padding*2)*this._resolution),t.scale(this._resolution,this._resolution),t.clearRect(0,0,this.canvas.width,this.canvas.height),t.font=this._font,t.lineWidth=e.strokeThickness,t.textBaseline=e.textBaseline,t.lineJoin=e.lineJoin,t.miterLimit=e.miterLimit;let d,p,m=e.dropShadow?2:1;for(let x=0;x<m;++x){let C=e.dropShadow&&x===0,A=C?Math.ceil(Math.max(1,n)+e.padding*2):0,P=A*this._resolution;if(C){t.fillStyle="black",t.strokeStyle="black";let I=e.dropShadowColor,T=e.dropShadowBlur*this._resolution,W=e.dropShadowDistance*this._resolution;t.shadowColor=Se.shared.setValue(I).setAlpha(e.dropShadowAlpha).toRgbaString(),t.shadowBlur=T,t.shadowOffsetX=Math.cos(e.dropShadowAngle)*W,t.shadowOffsetY=Math.sin(e.dropShadowAngle)*W+P}else t.fillStyle=this._generateFillStyle(e,o,i),t.strokeStyle=e.stroke,t.shadowColor="black",t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0;let L=(a-h.fontSize)/2;a-h.fontSize<0&&(L=0);for(let I=0;I<o.length;I++)d=e.strokeThickness/2,p=e.strokeThickness/2+I*a+h.ascent+L,e.align==="right"?d+=u-l[I]:e.align==="center"&&(d+=(u-l[I])/2),e.stroke&&e.strokeThickness&&this.drawLetterSpacing(o[I],d+e.padding,p+e.padding-A,!0),e.fill&&this.drawLetterSpacing(o[I],d+e.padding,p+e.padding-A)}this.updateTexture()}drawLetterSpacing(r,e,t,i=!1){let n=this._style.letterSpacing,o=!1;if(S0.experimentalLetterSpacingSupported&&(S0.experimentalLetterSpacing?(this.context.letterSpacing=`${n}px`,this.context.textLetterSpacing=`${n}px`,o=!0):(this.context.letterSpacing="0px",this.context.textLetterSpacing="0px")),n===0||o){i?this.context.strokeText(r,e,t):this.context.fillText(r,e,t);return}let a=e,l=S0.graphemeSegmenter(r),u=this.context.measureText(r).width,h=0;for(let d=0;d<l.length;++d){let p=l[d];i?this.context.strokeText(p,a,t):this.context.fillText(p,a,t);let m="";for(let x=d+1;x<l.length;++x)m+=l[x];h=this.context.measureText(m).width,a+=u-h+n,u=h}}updateTexture(){let r=this.canvas;if(this._style.trim){let n=ie.trimCanvas(r);n.data&&(r.width=n.width,r.height=n.height,this.context.putImageData(n.data,0,0))}let e=this._texture,t=this._style,i=t.trim?0:t.padding,s=e.baseTexture;e.trim.width=e._frame.width=r.width/this._resolution,e.trim.height=e._frame.height=r.height/this._resolution,e.trim.x=-i,e.trim.y=-i,e.orig.width=e._frame.width-i*2,e.orig.height=e._frame.height-i*2,this._onTextureUpdate(),s.setRealSize(r.width,r.height,this._resolution),e.updateUvs(),this.dirty=!1}_render(r){this._autoResolution&&this._resolution!==r.resolution&&(this._resolution=r.resolution,this.dirty=!0),this.updateText(!0),super._render(r)}updateTransform(){this.updateText(!0),super.updateTransform()}getBounds(r,e){return this.updateText(!0),this._textureID===-1&&(r=!1),super.getBounds(r,e)}getLocalBounds(r){return this.updateText(!0),super.getLocalBounds.call(this,r)}_calculateBounds(){this.calculateVertices(),this._bounds.addQuad(this.vertexData)}_generateFillStyle(r,e,t){let i=r.fill;if(Array.isArray(i)){if(i.length===1)return i[0]}else return i;let s,n=r.dropShadow?r.dropShadowDistance:0,o=r.padding||0,a=this.canvas.width/this._resolution-n-o*2,l=this.canvas.height/this._resolution-n-o*2,u=i.slice(),h=r.fillGradientStops.slice();if(!h.length){let d=u.length+1;for(let p=1;p<d;++p)h.push(p/d)}if(u.unshift(i[0]),h.unshift(0),u.push(i[i.length-1]),h.push(1),r.fillGradientType===is.LINEAR_VERTICAL){s=this.context.createLinearGradient(a/2,o,a/2,l+o);let d=t.fontProperties.fontSize+r.strokeThickness;for(let p=0;p<e.length;p++){let m=t.lineHeight*(p-1)+d,x=t.lineHeight*p,C=x;p>0&&m>x&&(C=(x+m)/2);let A=x+d,P=t.lineHeight*(p+1),L=A;p+1<e.length&&P<A&&(L=(A+P)/2);let I=(L-C)/l;for(let T=0;T<u.length;T++){let W=0;typeof h[T]=="number"?W=h[T]:W=T/u.length;let Q=Math.min(1,Math.max(0,C/l+W*I));Q=Number(Q.toFixed(5)),s.addColorStop(Q,u[T])}}}else{s=this.context.createLinearGradient(o,l/2,a+o,l/2);let d=u.length+1,p=1;for(let m=0;m<u.length;m++){let x;typeof h[m]=="number"?x=h[m]:x=p/d,s.addColorStop(x,u[m]),p++}}return s}destroy(r){typeof r=="boolean"&&(r={children:r}),r=Object.assign({},rm,r),super.destroy(r),this._ownCanvas&&(this.canvas.height=this.canvas.width=0),this.context=null,this.canvas=null,this._style=null}get width(){return this.updateText(!0),Math.abs(this.scale.x)*this._texture.orig.width}set width(r){this.updateText(!0);let e=ie.sign(this.scale.x)||1;this.scale.x=e*r/this._texture.orig.width,this._width=r}get height(){return this.updateText(!0),Math.abs(this.scale.y)*this._texture.orig.height}set height(r){this.updateText(!0);let e=ie.sign(this.scale.y)||1;this.scale.y=e*r/this._texture.orig.height,this._height=r}get style(){return this._style}set style(r){r=r||{},r instanceof Z0?this._style=r:this._style=new Z0(r),this.localStyleID=-1,this.dirty=!0}get text(){return this._text}set text(r){r=String(r??""),this._text!==r&&(this._text=r,this.dirty=!0)}get resolution(){return this._resolution}set resolution(r){this._autoResolution=!1,this._resolution!==r&&(this._resolution=r,this.dirty=!0)}},vr=H9;vr.defaultAutoResolution=!0;var Ua=class{constructor(e){this.maxItemsPerFrame=e,this.itemsLeft=0}beginFrame(){this.itemsLeft=this.maxItemsPerFrame}allowedToUpload(){return this.itemsLeft-- >0}};function im(r,e){let t=!1;if(r?._textures?.length){for(let i=0;i<r._textures.length;i++)if(r._textures[i]instanceof xe){let s=r._textures[i].baseTexture;e.includes(s)||(e.push(s),t=!0)}}return t}function sm(r,e){if(r.baseTexture instanceof ye){let t=r.baseTexture;return e.includes(t)||e.push(t),!0}return!1}function nm(r,e){if(r._texture&&r._texture instanceof xe){let t=r._texture.baseTexture;return e.includes(t)||e.push(t),!0}return!1}function om(r,e){return e instanceof vr?(e.updateText(!0),!0):!1}function am(r,e){if(e instanceof Z0){let t=e.toFontString();return S0.measureFont(t),!0}return!1}function lm(r,e){if(r instanceof vr){e.includes(r.style)||e.push(r.style),e.includes(r)||e.push(r);let t=r._texture.baseTexture;return e.includes(t)||e.push(t),!0}return!1}function um(r,e){return r instanceof Z0?(e.includes(r)||e.push(r),!0):!1}var X6=class{constructor(r){this.limiter=new Ua(X6.uploadsPerFrame),this.renderer=r,this.uploadHookHelper=null,this.queue=[],this.addHooks=[],this.uploadHooks=[],this.completes=[],this.ticking=!1,this.delayedTick=()=>{this.queue&&this.prepareItems()},this.registerFindHook(lm),this.registerFindHook(um),this.registerFindHook(im),this.registerFindHook(sm),this.registerFindHook(nm),this.registerUploadHook(om),this.registerUploadHook(am)}upload(r){return new Promise(e=>{r&&this.add(r),this.queue.length?(this.completes.push(e),this.ticking||(this.ticking=!0,d0.system.addOnce(this.tick,this,Ot.UTILITY))):e()})}tick(){setTimeout(this.delayedTick,0)}prepareItems(){for(this.limiter.beginFrame();this.queue.length&&this.limiter.allowedToUpload();){let r=this.queue[0],e=!1;if(r&&!r._destroyed){for(let t=0,i=this.uploadHooks.length;t<i;t++)if(this.uploadHooks[t](this.uploadHookHelper,r)){this.queue.shift(),e=!0;break}}e||this.queue.shift()}if(this.queue.length)d0.system.addOnce(this.tick,this,Ot.UTILITY);else{this.ticking=!1;let r=this.completes.slice(0);this.completes.length=0;for(let e=0,t=r.length;e<t;e++)r[e]()}}registerFindHook(r){return r&&this.addHooks.push(r),this}registerUploadHook(r){return r&&this.uploadHooks.push(r),this}add(r){for(let e=0,t=this.addHooks.length;e<t&&!this.addHooks[e](r,this.queue);e++);if(r instanceof Je)for(let e=r.children.length-1;e>=0;e--)this.add(r.children[e]);return this}destroy(){this.ticking&&d0.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null}},Gs=X6;Gs.uploadsPerFrame=4;Object.defineProperties(j,{UPLOADS_PER_FRAME:{get(){return Gs.uploadsPerFrame},set(r){ie.deprecation("7.1.0","settings.UPLOADS_PER_FRAME is deprecated, use prepare.BasePrepare.uploadsPerFrame"),Gs.uploadsPerFrame=r}}});function q6(r,e){return e instanceof ye?(e._glTextures[r.CONTEXT_UID]||r.texture.bind(e),!0):!1}function hm(r,e){if(!(e instanceof p0))return!1;let{geometry:t}=e;e.finishPoly(),t.updateBatches();let{batches:i}=t;for(let s=0;s<i.length;s++){let{texture:n}=i[s].style;n&&q6(r,n.baseTexture)}return t.batchable||r.geometry.bind(t,e._resolveDirectShader(r)),!0}function cm(r,e){return r instanceof p0?(e.push(r),!0):!1}var Va=class extends Gs{constructor(e){super(e),this.uploadHookHelper=this.renderer,this.registerFindHook(cm),this.registerUploadHook(q6),this.registerUploadHook(hm)}};Va.extension={name:"prepare",type:$.RendererSystem};K.add(Va);var Y$=new Ae;var K6=`#version 300 es
#define SHADER_NAME Tiling-Sprite-100
precision lowp float;
in vec2 vTextureCoord;
out vec4 fragmentColor;
uniform sampler2D uSampler;
uniform vec4 uColor;
uniform mat3 uMapCoord;
uniform vec4 uClampFrame;
uniform vec2 uClampOffset;
void main(void)
{
vec2 coord = vTextureCoord + ceil(uClampOffset - vTextureCoord);
coord = (uMapCoord * vec3(coord, 1.0)).xy;
vec2 unclamped = coord;
coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);
vec4 texSample = texture(uSampler, coord, unclamped == coord ? 0.0f : -32.0f);// lod-bias very negative to force lod 0
fragmentColor = texSample * uColor;
}
`;var Z6=`#version 300 es
#define SHADER_NAME Tiling-Sprite-300
precision lowp float;
in vec2 aVertexPosition;
in vec2 aTextureCoord;
uniform mat3 projectionMatrix;
uniform mat3 translationMatrix;
uniform mat3 uTransform;
out vec2 vTextureCoord;
void main(void)
{
gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;
}
`;var Q6=`#version 100
#ifdef GL_EXT_shader_texture_lod
#extension GL_EXT_shader_texture_lod : enable
#endif
#define SHADER_NAME Tiling-Sprite-100
precision lowp float;
varying vec2 vTextureCoord;
uniform sampler2D uSampler;
uniform vec4 uColor;
uniform mat3 uMapCoord;
uniform vec4 uClampFrame;
uniform vec2 uClampOffset;
void main(void)
{
vec2 coord = vTextureCoord + ceil(uClampOffset - vTextureCoord);
coord = (uMapCoord * vec3(coord, 1.0)).xy;
vec2 unclamped = coord;
coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);
#ifdef GL_EXT_shader_texture_lod
vec4 texSample = unclamped == coord
? texture2D(uSampler, coord)
: texture2DLodEXT(uSampler, coord, 0);
#else
vec4 texSample = texture2D(uSampler, coord);
#endif
gl_FragColor = texSample * uColor;
}
`;var j9=`#version 100
#define SHADER_NAME Tiling-Sprite-100
precision lowp float;
attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
uniform mat3 projectionMatrix;
uniform mat3 translationMatrix;
uniform mat3 uTransform;
varying vec2 vTextureCoord;
void main(void)
{
gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;
}
`;var J6=`#version 100
#define SHADER_NAME Tiling-Sprite-Simple-100
precision lowp float;
varying vec2 vTextureCoord;
uniform sampler2D uSampler;
uniform vec4 uColor;
void main(void)
{
vec4 texSample = texture2D(uSampler, vTextureCoord);
gl_FragColor = texSample * uColor;
}
`;var nh=new Re,za=class extends fr{constructor(e){super(e),e.runners.contextChange.add(this),this.quad=new As,this.state=X0.for2d()}contextChange(){let e=this.renderer,t={globals:e.globalUniforms};this.simpleShader=q0.from(j9,J6,t),this.shader=e.context.webGLVersion>1?q0.from(Z6,K6,t):q0.from(j9,Q6,t)}render(e){let t=this.renderer,i=this.quad,s=i.vertices;s[0]=s[6]=e._width*-e.anchor.x,s[1]=s[3]=e._height*-e.anchor.y,s[2]=s[4]=e._width*(1-e.anchor.x),s[5]=s[7]=e._height*(1-e.anchor.y);let n=e.uvRespectAnchor?e.anchor.x:0,o=e.uvRespectAnchor?e.anchor.y:0;s=i.uvs,s[0]=s[6]=-n,s[1]=s[3]=-o,s[2]=s[4]=1-n,s[5]=s[7]=1-o,i.invalidate();let a=e._texture,l=a.baseTexture,u=l.alphaMode>0,h=e.tileTransform.localTransform,d=e.uvMatrix,p=l.isPowerOfTwo&&a.frame.width===l.width&&a.frame.height===l.height;p&&(l._glTextures[t.CONTEXT_UID]?p=l.wrapMode!==Pt.CLAMP:l.wrapMode===Pt.CLAMP&&(l.wrapMode=Pt.REPEAT));let m=p?this.simpleShader:this.shader,x=a.width,C=a.height,A=e._width,P=e._height;nh.set(h.a*x/A,h.b*x/P,h.c*C/A,h.d*C/P,h.tx/A,h.ty/P),nh.invert(),p?nh.prepend(d.mapCoord):(m.uniforms.uMapCoord=d.mapCoord.toArray(!0),m.uniforms.uClampFrame=d.uClampFrame,m.uniforms.uClampOffset=d.uClampOffset),m.uniforms.uTransform=nh.toArray(!0),m.uniforms.uColor=Se.shared.setValue(e.tint).premultiply(e.worldAlpha,u).toArray(m.uniforms.uColor),m.uniforms.translationMatrix=e.transform.worldTransform.toArray(!0),m.uniforms.uSampler=a,t.shader.bind(m),t.geometry.bind(i),this.state.blendMode=ie.correctBlendMode(e.blendMode,u),t.state.set(this.state),t.geometry.draw(this.renderer.gl.TRIANGLES,6,0)}};za.extension={name:"tilingSprite",type:$.RendererPlugin};K.add(za);var Wa=class{constructor(r,e,t=null){this.linkedSheets=[],this._texture=r instanceof xe?r:null,this.baseTexture=r instanceof ye?r:this._texture.baseTexture,this.textures={},this.animations={},this.data=e;let i=this.baseTexture.resource;this.resolution=this._updateResolution(t||(i?i.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}_updateResolution(r=null){let{scale:e}=this.data.meta,t=ie.getResolutionOfUrl(r,null);return t===null&&(t=parseFloat(e??"1")),t!==1&&this.baseTexture.setResolution(t),t}parse(){return new Promise(r=>{this._callback=r,this._batchIndex=0,this._frameKeys.length<=Wa.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(r){let e=r,t=Wa.BATCH_SIZE;for(;e-r<t&&e<this._frameKeys.length;){let i=this._frameKeys[e],s=this._frames[i],n=s.frame;if(n){let o=null,a=null,l=s.trimmed!==!1&&s.sourceSize?s.sourceSize:s.frame,u=new we(0,0,Math.floor(l.w)/this.resolution,Math.floor(l.h)/this.resolution);s.rotated?o=new we(Math.floor(n.x)/this.resolution,Math.floor(n.y)/this.resolution,Math.floor(n.h)/this.resolution,Math.floor(n.w)/this.resolution):o=new we(Math.floor(n.x)/this.resolution,Math.floor(n.y)/this.resolution,Math.floor(n.w)/this.resolution,Math.floor(n.h)/this.resolution),s.trimmed!==!1&&s.spriteSourceSize&&(a=new we(Math.floor(s.spriteSourceSize.x)/this.resolution,Math.floor(s.spriteSourceSize.y)/this.resolution,Math.floor(n.w)/this.resolution,Math.floor(n.h)/this.resolution)),this.textures[i]=new xe(this.baseTexture,o,u,a,s.rotated?2:0,s.anchor,s.borders),xe.addToCache(this.textures[i],i)}e++}}_processAnimations(){let r=this.data.animations||{};for(let e in r){this.animations[e]=[];for(let t=0;t<r[e].length;t++){let i=r[e][t];this.animations[e].push(this.textures[i])}}}_parseComplete(){let r=this._callback;this._callback=null,this._batchIndex=0,r.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*Wa.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*Wa.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(r=!1){for(let e in this.textures)this.textures[e].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,r&&(this._texture?.destroy(),this.baseTexture.destroy()),this._texture=null,this.baseTexture=null,this.linkedSheets=[]}},Ha=Wa;Ha.BATCH_SIZE=1e3;var dm=["jpg","png","jpeg","avif","webp"];function e4(r,e,t){let i={};if(r.forEach(s=>{i[s]=e}),Object.keys(e.textures).forEach(s=>{i[s]=e.textures[s]}),!t){let s=ie.path.dirname(r[0]);e.linkedSheets.forEach((n,o)=>{let a=e4([`${s}/${e.data.meta.related_multi_packs[o]}`],n,!0);Object.assign(i,a)})}return i}var t4={extension:$.Asset,cache:{test:r=>r instanceof Ha,getCacheableAssets:(r,e)=>e4(r,e,!1)},resolver:{test:r=>{let t=r.split("?")[0].split("."),i=t.pop(),s=t.pop();return i==="json"&&dm.includes(s)},parse:r=>{let e=r.split(".");return{resolution:parseFloat(j.RETINA_PREFIX.exec(r)?.[1]??"1"),format:e[e.length-2],src:r}}},loader:{name:"spritesheetLoader",extension:{type:$.LoadParser,priority:w0.Normal},async testParse(r,e){return ie.path.extname(e.src).toLowerCase()===".json"&&!!r.frames},async parse(r,e,t){let i=ie.path.dirname(e.src);i&&i.lastIndexOf("/")!==i.length-1&&(i+="/");let s=i+r.meta.image;s=Bs(s,e.src);let o=(await t.load([s]))[s],a=new Ha(o.baseTexture,r,e.src);await a.parse();let l=r?.meta?.related_multi_packs;if(Array.isArray(l)){let u=[];for(let d of l){if(typeof d!="string")continue;let p=i+d;e.data?.ignoreMultiPack||(p=Bs(p,e.src),u.push(t.load({src:p,data:{ignoreMultiPack:!0}})))}let h=await Promise.all(u);a.linkedSheets=h,h.forEach(d=>{d.linkedSheets=[a].concat(a.linkedSheets.filter(p=>p!==d))})}return a},unload(r){r.destroy(!0)}}};K.add(t4);var Pr=class{constructor(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[],this.distanceField=[]}};var Nr=class{static test(e){return typeof e=="string"&&e.startsWith("info face=")}static parse(e){let t=e.match(/^[a-z]+\s+.+$/gm),i={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[],distanceField:[]};for(let n in t){let o=t[n].match(/^[a-z]+/gm)[0],a=t[n].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),l={};for(let u in a){let h=a[u].split("="),d=h[0],p=h[1].replace(/"/gm,""),m=parseFloat(p),x=isNaN(m)?p:m;l[d]=x}i[o].push(l)}let s=new Pr;return i.info.forEach(n=>s.info.push({face:n.face,size:parseInt(n.size,10)})),i.common.forEach(n=>s.common.push({lineHeight:parseInt(n.lineHeight,10)})),i.page.forEach(n=>s.page.push({id:parseInt(n.id,10),file:n.file})),i.char.forEach(n=>s.char.push({id:parseInt(n.id,10),page:parseInt(n.page,10),x:parseInt(n.x,10),y:parseInt(n.y,10),width:parseInt(n.width,10),height:parseInt(n.height,10),xoffset:parseInt(n.xoffset,10),yoffset:parseInt(n.yoffset,10),xadvance:parseInt(n.xadvance,10)})),i.kerning.forEach(n=>s.kerning.push({first:parseInt(n.first,10),second:parseInt(n.second,10),amount:parseInt(n.amount,10)})),i.distanceField.forEach(n=>s.distanceField.push({distanceRange:parseInt(n.distanceRange,10),fieldType:n.fieldType})),s}};var Ei=class{static test(e){let t=e;return"getElementsByTagName"in t&&t.getElementsByTagName("page").length&&t.getElementsByTagName("info")[0].getAttribute("face")!==null}static parse(e){let t=new Pr,i=e.getElementsByTagName("info"),s=e.getElementsByTagName("common"),n=e.getElementsByTagName("page"),o=e.getElementsByTagName("char"),a=e.getElementsByTagName("kerning"),l=e.getElementsByTagName("distanceField");for(let u=0;u<i.length;u++)t.info.push({face:i[u].getAttribute("face"),size:parseInt(i[u].getAttribute("size"),10)});for(let u=0;u<s.length;u++)t.common.push({lineHeight:parseInt(s[u].getAttribute("lineHeight"),10)});for(let u=0;u<n.length;u++)t.page.push({id:parseInt(n[u].getAttribute("id"),10)||0,file:n[u].getAttribute("file")});for(let u=0;u<o.length;u++){let h=o[u];t.char.push({id:parseInt(h.getAttribute("id"),10),page:parseInt(h.getAttribute("page"),10)||0,x:parseInt(h.getAttribute("x"),10),y:parseInt(h.getAttribute("y"),10),width:parseInt(h.getAttribute("width"),10),height:parseInt(h.getAttribute("height"),10),xoffset:parseInt(h.getAttribute("xoffset"),10),yoffset:parseInt(h.getAttribute("yoffset"),10),xadvance:parseInt(h.getAttribute("xadvance"),10)})}for(let u=0;u<a.length;u++)t.kerning.push({first:parseInt(a[u].getAttribute("first"),10),second:parseInt(a[u].getAttribute("second"),10),amount:parseInt(a[u].getAttribute("amount"),10)});for(let u=0;u<l.length;u++)t.distanceField.push({fieldType:l[u].getAttribute("fieldType"),distanceRange:parseInt(l[u].getAttribute("distanceRange"),10)});return t}};var bi=class{static test(e){return typeof e=="string"&&e.includes("<font>")?Ei.test(j.ADAPTER.parseXML(e)):!1}static parse(e){return Ei.parse(j.ADAPTER.parseXML(e))}};var $9=[Nr,Ei,bi];function Y9(r){for(let e=0;e<$9.length;e++)if($9[e].test(r))return $9[e];return null}function X9(r,e,t,i,s,n){let o=t.fill;if(Array.isArray(o)){if(o.length===1)return o[0]}else return o;let a,l=t.dropShadow?t.dropShadowDistance:0,u=t.padding||0,h=r.width/i-l-u*2,d=r.height/i-l-u*2,p=o.slice(),m=t.fillGradientStops.slice();if(!m.length){let x=p.length+1;for(let C=1;C<x;++C)m.push(C/x)}if(p.unshift(o[0]),m.unshift(0),p.push(o[o.length-1]),m.push(1),t.fillGradientType===is.LINEAR_VERTICAL){a=e.createLinearGradient(h/2,u,h/2,d+u);let x=0,A=(n.fontProperties.fontSize+t.strokeThickness)/d;for(let P=0;P<s.length;P++){let L=n.lineHeight*P;for(let I=0;I<p.length;I++){let T=0;typeof m[I]=="number"?T=m[I]:T=I/p.length;let W=L/d+T*A,Q=Math.max(x,W);Q=Math.min(Q,1),a.addColorStop(Q,p[I]),x=Q}}}else{a=e.createLinearGradient(u,d/2,h+u,d/2);let x=p.length+1,C=1;for(let A=0;A<p.length;A++){let P;typeof m[A]=="number"?P=m[A]:P=C/x,a.addColorStop(P,p[A]),C++}}return a}function q9(r,e,t,i,s,n,o){let a=t.text,l=t.fontProperties;e.translate(i,s),e.scale(n,n);let u=o.strokeThickness/2,h=-(o.strokeThickness/2);if(e.font=o.toFontString(),e.lineWidth=o.strokeThickness,e.textBaseline=o.textBaseline,e.lineJoin=o.lineJoin,e.miterLimit=o.miterLimit,e.fillStyle=X9(r,e,o,n,[a],t),e.strokeStyle=o.stroke,o.dropShadow){let d=o.dropShadowColor,p=o.dropShadowBlur*n,m=o.dropShadowDistance*n;e.shadowColor=Se.shared.setValue(d).setAlpha(o.dropShadowAlpha).toRgbaString(),e.shadowBlur=p,e.shadowOffsetX=Math.cos(o.dropShadowAngle)*m,e.shadowOffsetY=Math.sin(o.dropShadowAngle)*m}else e.shadowColor="black",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0;o.stroke&&o.strokeThickness&&e.strokeText(a,u,h+t.lineHeight-l.descent),o.fill&&e.fillText(a,u,h+t.lineHeight-l.descent),e.setTransform(1,0,0,1,0,0),e.fillStyle="rgba(0, 0, 0, 0)"}function Us(r){return r.codePointAt?r.codePointAt(0):r.charCodeAt(0)}function ja(r){return Array.from?Array.from(r):r.split("")}function K9(r){typeof r=="string"&&(r=[r]);let e=[];for(let t=0,i=r.length;t<i;t++){let s=r[t];if(Array.isArray(s)){if(s.length!==2)throw new Error(`[BitmapFont]: Invalid character range length, expecting 2 got ${s.length}.`);let n=s[0].charCodeAt(0),o=s[1].charCodeAt(0);if(o<n)throw new Error("[BitmapFont]: Invalid character range.");for(let a=n,l=o;a<=l;a++)e.push(String.fromCharCode(a))}else e.push(...ja(s))}if(e.length===0)throw new Error("[BitmapFont]: Empty set when resolving characters.");return e}var Dr=class{constructor(r,e,t){let[i]=r.info,[s]=r.common,[n]=r.page,[o]=r.distanceField,a=ie.getResolutionOfUrl(n.file),l={};this._ownsTextures=t,this.font=i.face,this.size=i.size,this.lineHeight=s.lineHeight/a,this.chars={},this.pageTextures=l;for(let u=0;u<r.page.length;u++){let{id:h,file:d}=r.page[u];l[h]=e instanceof Array?e[u]:e[d],o?.fieldType&&o.fieldType!=="none"&&(l[h].baseTexture.alphaMode=A0.NO_PREMULTIPLIED_ALPHA,l[h].baseTexture.mipmap=Y0.OFF)}for(let u=0;u<r.char.length;u++){let{id:h,page:d}=r.char[u],{x:p,y:m,width:x,height:C,xoffset:A,yoffset:P,xadvance:L}=r.char[u];p/=a,m/=a,x/=a,C/=a,A/=a,P/=a,L/=a;let I=new we(p+l[d].frame.x/a,m+l[d].frame.y/a,x,C);this.chars[h]={xOffset:A,yOffset:P,xAdvance:L,kerning:{},texture:new xe(l[d].baseTexture,I),page:d}}for(let u=0;u<r.kerning.length;u++){let{first:h,second:d,amount:p}=r.kerning[u];h/=a,d/=a,p/=a,this.chars[d]&&(this.chars[d].kerning[h]=p)}this.distanceFieldRange=o?.distanceRange,this.distanceFieldType=o?.fieldType?.toLowerCase()??"none"}destroy(){for(let r in this.chars)this.chars[r].texture.destroy(),this.chars[r].texture=null;for(let r in this.pageTextures)this._ownsTextures&&this.pageTextures[r].destroy(!0),this.pageTextures[r]=null;this.chars=null,this.pageTextures=null}static install(r,e,t){let i;if(r instanceof Pr)i=r;else{let n=Y9(r);if(!n)throw new Error("Unrecognized data format for font.");i=n.parse(r)}e instanceof xe&&(e=[e]);let s=new Dr(i,e,t);return Dr.available[s.font]=s,s}static uninstall(r){let e=Dr.available[r];if(!e)throw new Error(`No font found named '${r}'`);e.destroy(),delete Dr.available[r]}static from(r,e,t){if(!r)throw new Error("[BitmapFont] Property `name` is required.");let{chars:i,padding:s,resolution:n,textureWidth:o,textureHeight:a,...l}=Object.assign({},Dr.defaultOptions,t),u=K9(i),h=e instanceof Z0?e:new Z0(e),d=o,p=new Pr;p.info[0]={face:h.fontFamily,size:h.fontSize},p.common[0]={lineHeight:h.fontSize};let m=0,x=0,C,A,P,L=0,I=[],T=[];for(let Q=0;Q<u.length;Q++){C||(C=j.ADAPTER.createCanvas(),C.width=o,C.height=a,A=C.getContext("2d"),P=new ye(C,{resolution:n,...l}),I.push(P),T.push(new xe(P)),p.page.push({id:T.length-1,file:""}));let O=u[Q],z=S0.measureText(O,h,!1,C),oe=z.width,J=Math.ceil(z.height),ne=Math.ceil((h.fontStyle==="italic"?2:1)*oe);if(x>=a-J*n){if(x===0)throw new Error(`[BitmapFont] textureHeight ${a}px is too small (fontFamily: '${h.fontFamily}', fontSize: ${h.fontSize}px, char: '${O}')`);--Q,C=null,A=null,P=null,x=0,m=0,L=0;continue}if(L=Math.max(J+z.fontProperties.descent,L),ne*n+m>=d){if(m===0)throw new Error(`[BitmapFont] textureWidth ${o}px is too small (fontFamily: '${h.fontFamily}', fontSize: ${h.fontSize}px, char: '${O}')`);--Q,x+=L*n,x=Math.ceil(x),m=0,L=0;continue}q9(C,A,z,m,x,n,h);let Ee=Us(z.text);p.char.push({id:Ee,page:T.length-1,x:m/n,y:x/n,width:ne,height:J,xoffset:0,yoffset:0,xadvance:oe-(h.dropShadow?h.dropShadowDistance:0)-(h.stroke?h.strokeThickness:0)}),m+=(ne+2*s)*n,m=Math.ceil(m)}for(let Q=0,O=u.length;Q<O;Q++){let z=u[Q];for(let oe=0;oe<O;oe++){let J=u[oe],ne=A.measureText(z).width,Ee=A.measureText(J).width,Z=A.measureText(z+J).width-(ne+Ee);Z&&p.kerning.push({first:Us(z),second:Us(J),amount:Z})}}let W=new Dr(p,T,!0);return Dr.available[r]!==void 0&&Dr.uninstall(r),Dr.available[r]=W,W}},Q0=Dr;Q0.ALPHA=[["a","z"],["A","Z"]," "];Q0.NUMERIC=[["0","9"]];Q0.ALPHANUMERIC=[["a","z"],["A","Z"],["0","9"]," "];Q0.ASCII=[[" ","~"]];Q0.defaultOptions={resolution:1,textureWidth:512,textureHeight:512,padding:4,chars:Dr.ALPHANUMERIC};Q0.available={};var r4=`// Pixi texture info\r
varying vec2 vTextureCoord;\r
uniform sampler2D uSampler;\r
\r
// Tint\r
uniform vec4 uColor;\r
\r
// on 2D applications fwidth is screenScale / glyphAtlasScale * distanceFieldRange\r
uniform float uFWidth;\r
\r
void main(void) {\r
\r
// To stack MSDF and SDF we need a non-pre-multiplied-alpha texture.\r
vec4 texColor = texture2D(uSampler, vTextureCoord);\r
\r
// MSDF\r
float median = texColor.r + texColor.g + texColor.b -\r
min(texColor.r, min(texColor.g, texColor.b)) -\r
max(texColor.r, max(texColor.g, texColor.b));\r
// SDF\r
median = min(median, texColor.a);\r
\r
float screenPxDistance = uFWidth * (median - 0.5);\r
float alpha = clamp(screenPxDistance + 0.5, 0.0, 1.0);\r
if (median < 0.01) {\r
alpha = 0.0;\r
} else if (median > 0.99) {\r
alpha = 1.0;\r
}\r
\r
// Gamma correction for coverage-like alpha\r
float luma = dot(uColor.rgb, vec3(0.299, 0.587, 0.114));\r
float gamma = mix(1.0, 1.0 / 2.2, luma);\r
float coverage = pow(uColor.a * alpha, gamma); \r
\r
// NPM Textures, NPM outputs\r
gl_FragColor = vec4(uColor.rgb, coverage);\r
}\r
`;var i4=`// Mesh material default fragment\r
attribute vec2 aVertexPosition;\r
attribute vec2 aTextureCoord;\r
\r
uniform mat3 projectionMatrix;\r
uniform mat3 translationMatrix;\r
uniform mat3 uTextureMatrix;\r
\r
varying vec2 vTextureCoord;\r
\r
void main(void)\r
{\r
gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\r
\r
vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\r
}\r
`;var s4=[],n4=[],o4=[],a4=class extends Je{constructor(r,e={}){super();let{align:t,tint:i,maxWidth:s,letterSpacing:n,fontName:o,fontSize:a}=Object.assign({},a4.styleDefaults,e);if(!Q0.available[o])throw new Error(`Missing BitmapFont "${o}"`);this._activePagesMeshData=[],this._textWidth=0,this._textHeight=0,this._align=t,this._tintColor=new Se(i),this._font=void 0,this._fontName=o,this._fontSize=a,this.text=r,this._maxWidth=s,this._maxLineHeight=0,this._letterSpacing=n,this._anchor=new Zt(()=>{this.dirty=!0},this,0,0),this._roundPixels=j.ROUND_PIXELS,this.dirty=!0,this._resolution=j.RESOLUTION,this._autoResolution=!0,this._textureCache={}}updateText(){let r=Q0.available[this._fontName],e=this.fontSize,t=e/r.size,i=new Ae,s=[],n=[],o=[],a=this._text.replace(/(?:\r\n|\r)/g,`
`)||" ",l=ja(a),u=this._maxWidth*r.size/e,h=r.distanceFieldType==="none"?s4:n4,d=null,p=0,m=0,x=0,C=-1,A=0,P=0,L=0,I=0;for(let J=0;J<l.length;J++){let ne=l[J],Ee=Us(ne);if(/(?:\s)/.test(ne)&&(C=J,A=p,I++),ne==="\r"||ne===`
`){n.push(p),o.push(-1),m=Math.max(m,p),++x,++P,i.x=0,i.y+=r.lineHeight,d=null,I=0;continue}let q=r.chars[Ee];if(!q)continue;d&&q.kerning[d]&&(i.x+=q.kerning[d]);let Z=o4.pop()||{texture:xe.EMPTY,line:0,charCode:0,prevSpaces:0,position:new Ae};Z.texture=q.texture,Z.line=x,Z.charCode=Ee,Z.position.x=Math.round(i.x+q.xOffset+this._letterSpacing/2),Z.position.y=Math.round(i.y+q.yOffset),Z.prevSpaces=I,s.push(Z),p=Z.position.x+Math.max(q.xAdvance-q.xOffset,q.texture.orig.width),i.x+=q.xAdvance+this._letterSpacing,L=Math.max(L,q.yOffset+q.texture.height),d=Ee,C!==-1&&u>0&&i.x>u&&(++P,ie.removeItems(s,1+C-P,1+J-C),J=C,C=-1,n.push(A),o.push(s.length>0?s[s.length-1].prevSpaces:0),m=Math.max(m,A),x++,i.x=0,i.y+=r.lineHeight,d=null,I=0)}let T=l[l.length-1];T!=="\r"&&T!==`
`&&(/(?:\s)/.test(T)&&(p=A),n.push(p),m=Math.max(m,p),o.push(-1));let W=[];for(let J=0;J<=x;J++){let ne=0;this._align==="right"?ne=m-n[J]:this._align==="center"?ne=(m-n[J])/2:this._align==="justify"&&(ne=o[J]<0?0:(m-n[J])/o[J]),W.push(ne)}let Q=s.length,O={},z=[],oe=this._activePagesMeshData;h.push(...oe);for(let J=0;J<Q;J++){let ne=s[J].texture,Ee=ne.baseTexture.uid;if(!O[Ee]){let q=h.pop();if(!q){let Ce=new rs,pe,ve;r.distanceFieldType==="none"?(pe=new Di(xe.EMPTY),ve=be.NORMAL):(pe=new Di(xe.EMPTY,{program:G0.from(i4,r4),uniforms:{uFWidth:0}}),ve=be.NORMAL_NPM);let Ge=new ts(Ce,pe);Ge.blendMode=ve,q={index:0,indexCount:0,vertexCount:0,uvsCount:0,total:0,mesh:Ge,vertices:null,uvs:null,indices:null}}q.index=0,q.indexCount=0,q.vertexCount=0,q.uvsCount=0,q.total=0;let{_textureCache:Z}=this;Z[Ee]=Z[Ee]||new xe(ne.baseTexture),q.mesh.texture=Z[Ee],q.mesh.tint=this._tintColor.value,z.push(q),O[Ee]=q}O[Ee].total++}for(let J=0;J<oe.length;J++)z.includes(oe[J])||this.removeChild(oe[J].mesh);for(let J=0;J<z.length;J++)z[J].mesh.parent!==this&&this.addChild(z[J].mesh);this._activePagesMeshData=z;for(let J in O){let ne=O[J],Ee=ne.total;if(!(ne.indices?.length>6*Ee)||ne.vertices.length<ts.BATCHABLE_SIZE*2)ne.vertices=new Float32Array(4*2*Ee),ne.uvs=new Float32Array(4*2*Ee),ne.indices=new Uint16Array(6*Ee);else{let q=ne.total,Z=ne.vertices;for(let Ce=q*4*2;Ce<Z.length;Ce++)Z[Ce]=0}ne.mesh.size=6*Ee}for(let J=0;J<Q;J++){let ne=s[J],Ee=ne.position.x+W[ne.line]*(this._align==="justify"?ne.prevSpaces:1);this._roundPixels&&(Ee=Math.round(Ee));let q=Ee*t,Z=ne.position.y*t,Ce=ne.texture,pe=O[Ce.baseTexture.uid],ve=Ce.frame,Ge=Ce._uvs,Fe=pe.index++;pe.indices[Fe*6+0]=0+Fe*4,pe.indices[Fe*6+1]=1+Fe*4,pe.indices[Fe*6+2]=2+Fe*4,pe.indices[Fe*6+3]=0+Fe*4,pe.indices[Fe*6+4]=2+Fe*4,pe.indices[Fe*6+5]=3+Fe*4,pe.vertices[Fe*8+0]=q,pe.vertices[Fe*8+1]=Z,pe.vertices[Fe*8+2]=q+ve.width*t,pe.vertices[Fe*8+3]=Z,pe.vertices[Fe*8+4]=q+ve.width*t,pe.vertices[Fe*8+5]=Z+ve.height*t,pe.vertices[Fe*8+6]=q,pe.vertices[Fe*8+7]=Z+ve.height*t,pe.uvs[Fe*8+0]=Ge.x0,pe.uvs[Fe*8+1]=Ge.y0,pe.uvs[Fe*8+2]=Ge.x1,pe.uvs[Fe*8+3]=Ge.y1,pe.uvs[Fe*8+4]=Ge.x2,pe.uvs[Fe*8+5]=Ge.y2,pe.uvs[Fe*8+6]=Ge.x3,pe.uvs[Fe*8+7]=Ge.y3}this._textWidth=m*t,this._textHeight=(i.y+r.lineHeight)*t;for(let J in O){let ne=O[J];if(this.anchor.x!==0||this.anchor.y!==0){let Ce=0,pe=this._textWidth*this.anchor.x,ve=this._textHeight*this.anchor.y;for(let Ge=0;Ge<ne.total;Ge++)ne.vertices[Ce++]-=pe,ne.vertices[Ce++]-=ve,ne.vertices[Ce++]-=pe,ne.vertices[Ce++]-=ve,ne.vertices[Ce++]-=pe,ne.vertices[Ce++]-=ve,ne.vertices[Ce++]-=pe,ne.vertices[Ce++]-=ve}this._maxLineHeight=L*t;let Ee=ne.mesh.geometry.getBuffer("aVertexPosition"),q=ne.mesh.geometry.getBuffer("aTextureCoord"),Z=ne.mesh.geometry.getIndex();Ee.data=ne.vertices,q.data=ne.uvs,Z.data=ne.indices,Ee.update(),q.update(),Z.update()}for(let J=0;J<s.length;J++)o4.push(s[J]);this._font=r,this.dirty=!1}updateTransform(){this.validate(),this.containerUpdateTransform()}_render(r){this._autoResolution&&this._resolution!==r.resolution&&(this._resolution=r.resolution,this.dirty=!0);let{distanceFieldRange:e,distanceFieldType:t,size:i}=Q0.available[this._fontName];if(t!=="none"){let{a:s,b:n,c:o,d:a}=this.worldTransform,l=Math.sqrt(s*s+n*n),u=Math.sqrt(o*o+a*a),h=(Math.abs(l)+Math.abs(u))/2,d=this.fontSize/i,p=r._view.resolution;for(let m of this._activePagesMeshData)m.mesh.shader.uniforms.uFWidth=h*e*d*p}super._render(r)}getLocalBounds(){return this.validate(),super.getLocalBounds()}validate(){let r=Q0.available[this._fontName];if(!r)throw new Error(`Missing BitmapFont "${this._fontName}"`);this._font!==r&&(this.dirty=!0),this.dirty&&this.updateText()}get tint(){return this._tintColor.value}set tint(r){if(this.tint!==r){this._tintColor.setValue(r);for(let e=0;e<this._activePagesMeshData.length;e++)this._activePagesMeshData[e].mesh.tint=r}}get align(){return this._align}set align(r){this._align!==r&&(this._align=r,this.dirty=!0)}get fontName(){return this._fontName}set fontName(r){if(!Q0.available[r])throw new Error(`Missing BitmapFont "${r}"`);this._fontName!==r&&(this._fontName=r,this.dirty=!0)}get fontSize(){return this._fontSize??Q0.available[this._fontName].size}set fontSize(r){this._fontSize!==r&&(this._fontSize=r,this.dirty=!0)}get anchor(){return this._anchor}set anchor(r){typeof r=="number"?this._anchor.set(r):this._anchor.copyFrom(r)}get text(){return this._text}set text(r){r=String(r??""),this._text!==r&&(this._text=r,this.dirty=!0)}get maxWidth(){return this._maxWidth}set maxWidth(r){this._maxWidth!==r&&(this._maxWidth=r,this.dirty=!0)}get maxLineHeight(){return this.validate(),this._maxLineHeight}get textWidth(){return this.validate(),this._textWidth}get letterSpacing(){return this._letterSpacing}set letterSpacing(r){this._letterSpacing!==r&&(this._letterSpacing=r,this.dirty=!0)}get roundPixels(){return this._roundPixels}set roundPixels(r){r!==this._roundPixels&&(this._roundPixels=r,this.dirty=!0)}get textHeight(){return this.validate(),this._textHeight}get resolution(){return this._resolution}set resolution(r){this._autoResolution=!1,this._resolution!==r&&(this._resolution=r,this.dirty=!0)}destroy(r){let{_textureCache:e}=this,i=Q0.available[this._fontName].distanceFieldType==="none"?s4:n4;i.push(...this._activePagesMeshData);for(let s of this._activePagesMeshData)this.removeChild(s.mesh);this._activePagesMeshData=[],i.filter(s=>e[s.mesh.texture.baseTexture.uid]).forEach(s=>{s.mesh.texture=xe.EMPTY});for(let s in e)e[s].destroy(),delete e[s];this._font=null,this._tintColor=null,this._textureCache=null,super.destroy(r)}},l4=a4;l4.styleDefaults={align:"left",tint:16777215,maxWidth:0,letterSpacing:0};var pm=[".xml",".fnt"],u4={extension:{type:$.LoadParser,priority:w0.Normal},name:"loadBitmapFont",test(r){return pm.includes(ie.path.extname(r).toLowerCase())},async testParse(r){return Nr.test(r)||bi.test(r)},async parse(r,e,t){let i=Nr.test(r)?Nr.parse(r):bi.parse(r),{src:s}=e,{page:n}=i,o=[];for(let u=0;u<n.length;++u){let h=n[u].file,d=ie.path.join(ie.path.dirname(s),h);d=Bs(d,s),o.push(d)}let a=await t.load(o),l=o.map(u=>a[u]);return Q0.install(i,l,!0)},async load(r,e){return(await j.ADAPTER.fetch(r)).text()},unload(r){r.destroy()}};K.add(u4);var io=class extends Z0{constructor(){super(...arguments),this._fonts=[],this._overrides=[],this._stylesheet="",this.fontsDirty=!1}static from(r){return new io(Object.keys(io.defaultOptions).reduce((e,t)=>({...e,[t]:r[t]}),{}))}cleanFonts(){this._fonts.length>0&&(this._fonts.forEach(r=>{URL.revokeObjectURL(r.src),r.refs--,r.refs===0&&(r.fontFace&&document.fonts.delete(r.fontFace),delete io.availableFonts[r.originalUrl])}),this.fontFamily="Arial",this._fonts.length=0,this.styleID++,this.fontsDirty=!0)}loadFont(r,e={}){let{availableFonts:t}=io;if(t[r]){let i=t[r];return this._fonts.push(i),i.refs++,this.styleID++,this.fontsDirty=!0,Promise.resolve()}return j.ADAPTER.fetch(r).then(i=>i.blob()).then(async i=>new Promise((s,n)=>{let o=URL.createObjectURL(i),a=new FileReader;a.onload=()=>s([o,a.result]),a.onerror=n,a.readAsDataURL(i)})).then(async([i,s])=>{let n=Object.assign({family:ie.path.basename(r,ie.path.extname(r)),weight:"normal",style:"normal",src:i,dataSrc:s,refs:1,originalUrl:r,fontFace:null},e);t[r]=n,this._fonts.push(n),this.styleID++;let o=new FontFace(n.family,`url(${n.src})`,{weight:n.weight,style:n.style});n.fontFace=o,await o.load(),document.fonts.add(o),await document.fonts.ready,this.styleID++,this.fontsDirty=!0})}addOverride(...r){let e=r.filter(t=>!this._overrides.includes(t));e.length>0&&(this._overrides.push(...e),this.styleID++)}removeOverride(...r){let e=r.filter(t=>this._overrides.includes(t));e.length>0&&(this._overrides=this._overrides.filter(t=>!e.includes(t)),this.styleID++)}toCSS(r){return[`transform: scale(${r})`,"transform-origin: top left","display: inline-block",`color: ${this.normalizeColor(this.fill)}`,`font-size: ${this.fontSize}px`,`font-family: ${this.fontFamily}`,`font-weight: ${this.fontWeight}`,`font-style: ${this.fontStyle}`,`font-variant: ${this.fontVariant}`,`letter-spacing: ${this.letterSpacing}px`,`text-align: ${this.align}`,`padding: ${this.padding}px`,`white-space: ${this.whiteSpace}`,...this.lineHeight?[`line-height: ${this.lineHeight}px`]:[],...this.wordWrap?[`word-wrap: ${this.breakWords?"break-all":"break-word"}`,`max-width: ${this.wordWrapWidth}px`]:[],...this.strokeThickness?[`-webkit-text-stroke-width: ${this.strokeThickness}px`,`-webkit-text-stroke-color: ${this.normalizeColor(this.stroke)}`,`text-stroke-width: ${this.strokeThickness}px`,`text-stroke-color: ${this.normalizeColor(this.stroke)}`,"paint-order: stroke"]:[],...this.dropShadow?[this.dropShadowToCSS()]:[],...this._overrides].join(";")}toGlobalCSS(){return this._fonts.reduce((r,e)=>`${r}
@font-face {
font-family: "${e.family}";
src: url('${e.dataSrc}');
font-weight: ${e.weight};
font-style: ${e.style};
}`,this._stylesheet)}get stylesheet(){return this._stylesheet}set stylesheet(r){this._stylesheet!==r&&(this._stylesheet=r,this.styleID++)}normalizeColor(r){return Array.isArray(r)&&(r=ie.rgb2hex(r)),typeof r=="number"?ie.hex2string(r):r}dropShadowToCSS(){let r=this.normalizeColor(this.dropShadowColor),e=this.dropShadowAlpha,t=Math.round(Math.cos(this.dropShadowAngle)*this.dropShadowDistance),i=Math.round(Math.sin(this.dropShadowAngle)*this.dropShadowDistance);r.startsWith("#")&&e<1&&(r+=(e*255|0).toString(16).padStart(2,"0"));let s=`${t}px ${i}px`;return this.dropShadowBlur>0?`text-shadow: ${s} ${this.dropShadowBlur}px ${r}`:`text-shadow: ${s} ${r}`}reset(){Object.assign(this,io.defaultOptions)}onBeforeDraw(){let{fontsDirty:r}=this;return this.fontsDirty=!1,this.isSafari&&this._fonts.length>0&&r?new Promise(e=>setTimeout(e,100)):Promise.resolve()}get isSafari(){let{userAgent:r}=j.ADAPTER.getNavigator();return/^((?!chrome|android).)*safari/i.test(r)}set fillGradientStops(r){console.warn("[HTMLTextStyle] fillGradientStops is not supported by HTMLText")}get fillGradientStops(){return super.fillGradientStops}set fillGradientType(r){console.warn("[HTMLTextStyle] fillGradientType is not supported by HTMLText")}get fillGradientType(){return super.fillGradientType}set miterLimit(r){console.warn("[HTMLTextStyle] miterLimit is not supported by HTMLText")}get miterLimit(){return super.miterLimit}set trim(r){console.warn("[HTMLTextStyle] trim is not supported by HTMLText")}get trim(){return super.trim}set textBaseline(r){console.warn("[HTMLTextStyle] textBaseline is not supported by HTMLText")}get textBaseline(){return super.textBaseline}set leading(r){console.warn("[HTMLTextStyle] leading is not supported by HTMLText")}get leading(){return super.leading}set lineJoin(r){console.warn("[HTMLTextStyle] lineJoin is not supported by HTMLText")}get lineJoin(){return super.lineJoin}},Vs=io;Vs.availableFonts={};Vs.defaultOptions={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,padding:0,stroke:"black",strokeThickness:0,whiteSpace:"normal",wordWrap:!1,wordWrapWidth:100};var so=class extends N0{constructor(r="",e={}){super(xe.EMPTY),this._text=null,this._style=null,this._autoResolution=!0,this._loading=!1,this.localStyleID=-1,this.dirty=!1,this.ownsStyle=!1;let t=new Image,i=xe.from(t,{scaleMode:j.SCALE_MODE,resourceOptions:{autoLoad:!1}});i.orig=new we,i.trim=new we,this.texture=i;let s="http://www.w3.org/2000/svg",n="http://www.w3.org/1999/xhtml",o=document.createElementNS(s,"svg"),a=document.createElementNS(s,"foreignObject"),l=document.createElementNS(n,"div"),u=document.createElementNS(n,"style");a.setAttribute("width","10000"),a.setAttribute("height","10000"),a.style.overflow="hidden",o.appendChild(a),this.maxWidth=so.defaultMaxWidth,this.maxHeight=so.defaultMaxHeight,this._domElement=l,this._styleElement=u,this._svgRoot=o,this._foreignObject=a,this._foreignObject.appendChild(u),this._foreignObject.appendChild(l),this._image=t,this._loadImage=new Image,this._autoResolution=so.defaultAutoResolution,this._resolution=so.defaultResolution??j.RESOLUTION,this.text=r,this.style=e}measureText(r){let{text:e,style:t,resolution:i}=Object.assign({text:this._text,style:this._style,resolution:this._resolution},r);Object.assign(this._domElement,{innerHTML:e,style:t.toCSS(i)}),this._styleElement.textContent=t.toGlobalCSS(),document.body.appendChild(this._svgRoot);let s=this._domElement.getBoundingClientRect();this._svgRoot.remove();let n=Math.min(this.maxWidth,Math.ceil(s.width)),o=Math.min(this.maxHeight,Math.ceil(s.height));return this._svgRoot.setAttribute("width",n.toString()),this._svgRoot.setAttribute("height",o.toString()),e!==this._text&&(this._domElement.innerHTML=this._text),t!==this._style&&(Object.assign(this._domElement,{style:this._style?.toCSS(i)}),this._styleElement.textContent=this._style?.toGlobalCSS()),{width:n+t.padding*2,height:o+t.padding*2}}async updateText(r=!0){let{style:e,_image:t,_loadImage:i}=this;if(this.localStyleID!==e.styleID&&(this.dirty=!0,this.localStyleID=e.styleID),!this.dirty&&r)return;let{width:s,height:n}=this.measureText();t.width=i.width=Math.ceil(Math.max(1,s)),t.height=i.height=Math.ceil(Math.max(1,n)),this._loading||(this._loading=!0,await new Promise(o=>{i.onload=async()=>{await e.onBeforeDraw(),this._loading=!1,t.src=i.src,i.onload=null,i.src="",this.updateTexture(),o()};let a=new XMLSerializer().serializeToString(this._svgRoot);i.src=`data:image/svg+xml;charset=utf8,${encodeURIComponent(a)}`}))}get source(){return this._image}updateTexture(){let{style:r,texture:e,_image:t,resolution:i}=this,{padding:s}=r,{baseTexture:n}=e;e.trim.width=e._frame.width=t.width/i,e.trim.height=e._frame.height=t.height/i,e.trim.x=-s,e.trim.y=-s,e.orig.width=e._frame.width-s*2,e.orig.height=e._frame.height-s*2,this._onTextureUpdate(),n.setRealSize(t.width,t.height,i),this.dirty=!1}_render(r){this._autoResolution&&this._resolution!==r.resolution&&(this._resolution=r.resolution,this.dirty=!0),this.updateText(!0),super._render(r)}_renderCanvas(r){this._autoResolution&&this._resolution!==r.resolution&&(this._resolution=r.resolution,this.dirty=!0),this.updateText(!0),super._renderCanvas(r)}getLocalBounds(r){return this.updateText(!0),super.getLocalBounds(r)}_calculateBounds(){this.updateText(!0),this.calculateVertices(),this._bounds.addQuad(this.vertexData)}_onStyleChange(){this.dirty=!0}destroy(r){typeof r=="boolean"&&(r={children:r}),r=Object.assign({},so.defaultDestroyOptions,r),super.destroy(r);let e=null;this.ownsStyle&&this._style?.cleanFonts(),this._style=e,this._svgRoot?.remove(),this._svgRoot=e,this._domElement?.remove(),this._domElement=e,this._foreignObject?.remove(),this._foreignObject=e,this._styleElement?.remove(),this._styleElement=e,this._loadImage.src="",this._loadImage.onload=null,this._loadImage=e,this._image.src="",this._image=e}get width(){return this.updateText(!0),Math.abs(this.scale.x)*this._image.width/this.resolution}set width(r){this.updateText(!0);let e=ie.sign(this.scale.x)||1;this.scale.x=e*r/this._image.width/this.resolution,this._width=r}get height(){return this.updateText(!0),Math.abs(this.scale.y)*this._image.height/this.resolution}set height(r){this.updateText(!0);let e=ie.sign(this.scale.y)||1;this.scale.y=e*r/this._image.height/this.resolution,this._height=r}get style(){return this._style}set style(r){this._style!==r&&(r=r||{},r instanceof Vs?(this.ownsStyle=!1,this._style=r):r instanceof Z0?(console.warn("[HTMLText] Cloning TextStyle, if this is not what you want, use HTMLTextStyle"),this.ownsStyle=!0,this._style=Vs.from(r)):(this.ownsStyle=!0,this._style=new Vs(r)),this.localStyleID=-1,this.dirty=!0)}get text(){return this._text}set text(r){r=String(r===""||r===null||r===void 0?" ":r),r=this.sanitiseText(r),this._text!==r&&(this._text=r,this.dirty=!0)}get resolution(){return this._resolution}set resolution(r){this._autoResolution=!1,this._resolution!==r&&(this._resolution=r,this.dirty=!0)}sanitiseText(r){return r.replace(/<br>/gi,"<br/>").replace(/<hr>/gi,"<hr/>").replace(/&nbsp;/gi,"&#160;")}},$a=so;$a.defaultDestroyOptions={texture:!0,children:!1,baseTexture:!0};$a.defaultMaxWidth=2024;$a.defaultMaxHeight=2024;$a.defaultAutoResolution=!0;var oh=class extends gn{constructor(){super(...arguments);this.hasChangedArrowShape=!1}additionalConstruct(){tr.needToChangeArrow(this.instances)&&(this.extendedArrow=new ah(this.instances,this)),this.firstSibling=!0}init(){this.findSiblingLink(),this.addAnimationListener(),super.init(),this.extendedArrow?.init()}findSiblingLink(){let t=Dt({source:{id:this.coreElement.target.id},target:{id:this.coreElement.source.id}});this.siblingLink=this.instances.linksSet.extendedElementsMap.get(t),this.siblingLink&&(this.siblingLink.siblingLink=this,this.siblingLink.firstSibling&&(this.firstSibling=!1))}modifyCoreElement(){this.changeCoreLinkThickness(),this.proxyLine(),this.createContainer()}restoreCoreElement(){this.restoreCoreLinkThickness(),f.proxysManager.unregisterProxy(this.coreElement.line),this.extendedArrow?.unload(),this.removeContainer()}unload(){this.removeAnimationListener(),super.unload()}needGraphicsWrapper(){return this.instances.settings.enableFeatures[this.instances.type].links&&(this.instances.settings.curvedLinks||this.instances.settings.allowMultipleLinkTypes)?(this.id,!0):!1}createGraphicsWrapper(){this.graphicsWrapper||(this.graphicsWrapper=this.instances.settings.curvedLinks?new hh(this):new ch(this),this.graphicsWrapper.createGraphics())}changeCoreLinkThickness(){this.coreElement.px&&f.settings.enableFeatures[this.instances.type]["elements-stats"]&&f.settings.linksSizeFunction!=="default"&&(f.settings.enableFeatures[this.instances.type].links&&!this.instances.settings.curvedLinks||!f.settings.enableFeatures[this.instances.type].links)?this.coreElement.px.scale.y=this.getThicknessScale():this.restoreCoreLinkThickness()}restoreCoreLinkThickness(){this.coreElement.px&&(this.coreElement.px.scale.y=1)}getThicknessScale(){return f.settings.enableFeatures[this.instances.type]["elements-stats"]&&f.settings.linksColorFunction!=="default"?f.graphsManager.linksSizeCalculator?.linksStats[this.coreElement.source.id][this.coreElement.target.id]?.value??1:1}createContainer(){if(!this.instances.settings.enableFeatures[this.instances.type].links||!this.instances.settings.outlineLinks)return;let t;this.siblingLink?.container?t=this.siblingLink.container:(this.container=new Je,t=this.container),this.coreElement.px&&(this.coreElement.px.removeFromParent(),t.addChild(this.coreElement.px),this.coreElement.px.addListener("destroyed",this.removeContainer)),this.coreElement.arrow&&(this.coreElement.arrow.removeFromParent(),t.addChild(this.coreElement.arrow),this.coreElement.arrow.addListener("destroyed",this.removeContainer)),this.graphicsWrapper?.pixiElement&&(this.graphicsWrapper.pixiElement.removeFromParent(),t.addChild(this.graphicsWrapper.pixiElement),this.graphicsWrapper.pixiElement.addListener("destroyed",this.removeContainer)),t.filters=[new Gu(1,si(h4(this.coreElement.renderer)),.1,1,!1)],this.coreElement.renderer.hanger.addChild(t)}removeContainer(){if(this.coreElement&&(this.coreElement.px&&this.coreElement.px.removeEventListener("destroyed",this.removeContainer),this.coreElement.arrow&&this.coreElement.arrow.removeEventListener("destroyed",this.removeContainer),this.graphicsWrapper?.pixiElement&&this.graphicsWrapper.pixiElement.removeEventListener("destroyed",this.removeContainer),!!this.container)){for(let t of this.container.children.filter(i=>!i.destroyed))this.coreElement.renderer.hanger.addChild(t);this.container.destroy(),this.container=void 0}}proxyLine(){if(!tr.needToChangeLinkColor(this.instances))return;let t=this.coreElement;if(t.line){let i=this.getStrokeColor.bind(this);f.proxysManager.registerProxy(this.coreElement,"line",{set(s,n,o,a){return n==="tint"&&(o=i()??o),Reflect.set(s,n,o,a)}}),t.line.on("destroyed",()=>f.proxysManager.unregisterProxy(this.coreElement.line))}}isHighlighted(){return this.coreElement.source===this.coreElement.renderer.getHighlightNode()||this.coreElement.target===this.coreElement.renderer.getHighlightNode()}getStrokeColor(t=!1){if(!t&&this.isHighlighted())return;let i;if(this.instances.settings.enableFeatures[this.instances.type].links&&this.instances.settings.interactiveSettings[de].showOnGraph){let s=this.managers.get(de),n=this.getActiveType(de);if(s&&n&&n!==this.instances.settings.interactiveSettings[de].noneType)return i=si(s.getColor(n)),i}if(f.settings.enableFeatures[this.instances.type]["elements-stats"]&&f.settings.linksColorFunction!=="default"&&(i=f.graphsManager.linksColorCalculator?.linksStats[this.coreElement.source.id][this.coreElement.target.id]?.value,i))return i;if(this.instances.settings.enableFeatures[this.instances.type].linksSameColorAsNode)return this.instances.settings.enableFeatures[this.instances.type].arrows&&this.instances.settings.invertArrows?i=this.coreElement.target.getFillColor().rgb:i=this.coreElement.source.getFillColor().rgb,i}addAnimationListener(){this.instances.settings.animateDotsOnLinks&&(this.initAnimation=this.initAnimation.bind(this),this.coreElement.source.circle?.addListener("mouseenter",this.initAnimation),this.coreElement.target.circle?.addListener("mouseenter",this.initAnimation))}removeAnimationListener(){this.coreElement.source.circle?.removeListener("mouseenter",this.initAnimation),this.coreElement.target.circle?.removeListener("mouseenter",this.initAnimation)}initAnimation(){this.instances.renderer.dragNode&&this.animatedDot||(this.animatedDot&&(this.animatedDot.destroy(),this.animatedDot=void 0),this.instances.settings.enableFeatures[this.instances.type].links&&this.instances.settings.curvedLinks?(this.animatedDot=new lh(this),this.coreElement.renderer.hanger.addChild(this.animatedDot)):(this.animatedDot=new uh(this),this.coreElement.renderer.hanger.addChild(this.animatedDot)),this.animationLoop())}async animate(){if(this.coreElement.renderer.idleFrames=0,this.instances.settings.enableFeatures[this.instances.type].links&&this.instances.settings.curvedLinks&&this.graphicsWrapper?.pixiElement)this.animatedDot?.updateFrame(this.graphicsWrapper.pixiElement.bezier);else{let t=this.coreElement.renderer.nodeScale,i=this.coreElement.source,s=this.coreElement.target,n={x:s.x-i.x,y:s.y-i.y},o=Math.sqrt(n.x*n.x+n.y*n.y);n.x/=o,n.y/=o;let a={x:i.x+t*i.getSize()*n.x,y:i.y+t*i.getSize()*n.y},l={x:s.x-t*s.getSize()*n.x,y:s.y-t*s.getSize()*n.y};this.animatedDot?.updateFrame({P0:a,P1:{x:(a.x+l.x)*.5,y:(a.y+l.y)*.5},P2:l})}}animationLoop(){requestAnimationFrame(async()=>{await this.animate(),this.coreElement.renderer.getHighlightNode()===this.coreElement.source||this.coreElement.renderer.getHighlightNode()===this.coreElement.target?this.animationLoop():(this.animatedDot?.destroy(),this.animatedDot=void 0)})}isCoreElementUptodate(){return!!this.coreElement.line}isSameCoreElement(t){return t.source.id===this.coreElement.source.id&&t.target.id===this.coreElement.target.id}isSameCoreGraphics(t){return t.line===this.coreElement.line}getCoreCollection(){return this.coreElement.renderer.links}getCoreParentGraphics(t){return this.instances.settings.curvedLinks?t.px:t.line}canBeAddedWithEngineOptions(){let t=this.instances.nodesSet.extendedElementsMap.get(this.coreElement.source.id),i=this.instances.nodesSet.extendedElementsMap.get(this.coreElement.target.id);return!t||!i?!1:t.canBeAddedWithEngineOptions()&&i.canBeAddedWithEngineOptions()}getID(){return Dt(this.coreElement)}disableType(t,i){super.disableType(t,i),this.isAnyManagerDisabled()&&this.disable()}disable(){super.disable(),this.extendedArrow?.unload(),this.instances.settings.curvedLinks&&this.graphicsWrapper?.disconnect()}};function Dt(r){return r.source.id+"--to--"+r.target.id}var W7=require("obsidian");var Nh=require("obsidian"),Bh=h0(Pd()),Nd=h0(require("path"));function Le(r){return f.app.vault.getFileByPath(r)}function r0(r,e){if(e.extension!=="md")return new Set;switch(r){case Ue:return mx(e);case he:return Dx(e);default:return xx(r,e)}}function z7(r,e,t){if(e.extension!=="md")return 0;switch(r){case Ue:return yx(e,t);case he:return 1;default:return vx(r,e,t)}}function mx(r){let e=f.app.metadataCache.getCache(r.path);if(!e)return new Set;let t=(0,Nh.getAllTags)(e)?.map(i=>i.replace("#",""));return t?new Set(t.sort()):new Set}function yx(r,e){let t=f.app.metadataCache.getCache(r.path);if(!t)return 0;let i="#"+e.replace("#",""),s=t.frontmatter?.tags?.filter(o=>o===e||o===i)||[],n=t.tags?.reduce((o,a)=>((a.tag===e||a.tag===i)&&o.push(a.tag),o),[])||[];return s.length+n.length}function Bd(r,e){if(r){if(typeof r=="string")if(r.startsWith("[[")&&r.endsWith("]]")){let t=(0,Nh.getLinkpath)(r.slice(2,r.length-2)),i=t.indexOf("|"),s=i>=0?t.slice(0,i):t;e.add(Nd.default.parse(s).name)}else e.add(r);else if(typeof r=="number")e.add(String(r));else if(typeof r=="object"&&"path"in r)e.add(Nd.default.parse(r.path).name);else if(Array.isArray(r))for(let t of r)Bd(t,e)}}function xx(r,e){let t=(0,Bh.getAPI)(f.app),i=new Set;if(t){let n=t.page(e.path)[r];if(n==null||n==="")return new Set;Bd(n,i)}else{let s=f.app.metadataCache.getFileCache(e)?.frontmatter;if(s?.hasOwnProperty(r)){let n=s[r];Bd(n,i)}}return i}function Rd(r,e){if(typeof r=="string"||typeof r=="number"){if(e===String(r))return 1}else if(r&&typeof r=="object"&&"path"in r){let t=Le(r.path);if(t&&f.app.metadataCache.fileToLinktext(t,r.path,!0)===e)return 1;if(!t&&r.path===e)return 1}else if(Array.isArray(r)){let t=0;for(let i of r)t+=Rd(i,e);return t}return 0}function vx(r,e,t){let i=(0,Bh.getAPI)(f.app);if(i){let n=i.page(e.path)[r];return n==null||n===""?0:Rd(n,t)}else{let s=f.app.metadataCache.getFileCache(e)?.frontmatter;if(s?.hasOwnProperty(r)){let n=s[r];return Rd(n,t)}}return 1}function Dx(r){let e=new Set;return r.parent&&e.add(r.parent.path),e}function Bi(r,e){let t=(0,Bh.getAPI)(f.app);return t?Ex(r,t,e):bx(e)}function Ex(r,e,t){let i=new Map,s=e.page(t.path);for(let[n,o]of Object.entries(s))if(!(n==="file"||r.imageProperties.contains(n))&&!(o==null||o==="")){if(o&&typeof o=="object"&&"path"in o){let a=o.path;i.has(a)||i.set(a,new Set),i.get(a)?.add(mo(n))}else if(Array.isArray(o)){for(let a of o)if(a&&typeof a=="object"&&"path"in a){let l=a.path;i.has(l)||i.set(l,new Set),i.get(l)?.add(mo(n))}}}return i}function bx(r){let e=new Map,t=f.app.metadataCache.getFileCache(r)?.frontmatterLinks;if(t)for(let i of t){let s=i.key.split(".")[0],n=f.app.metadataCache.getFirstLinkpathDest(i.link,".")?.path;n&&(e.has(n)||e.set(n,new Set),e.get(n)?.add(s))}return e}var Or=class extends gn{constructor(){super(...arguments);this.isPinned=!1;this.graphicsWrapperScale=1}additionalConstruct(){this.extendedText=new Rh(this.instances,this.coreElement),this.getIcon(),this.radius=Be.RADIUS,this.computeRadius()}init(){super.init(),this.isPinned&&this.pinnedPosition&&new T0(this.instances).pinNode(this.id,this.pinnedPosition.x,this.pinnedPosition.y),this.extendedText.init()}modifyCoreElement(){this.proxyGetSize(),this.proxyGetFillColor(),this.proxyRender(),this.coreElement.circle?.addListener("destroyed",()=>this.restoreCoreElement())}proxyGetSize(){if(!(this.graphicsWrapper&&this.graphicsWrapper.shape!=="circle")&&this.radius===Be.RADIUS&&!(this.instances.settings.enableFeatures[this.instances.type]["elements-stats"]&&this.instances.settings.nodesSizeFunction!=="default"))return;let t=this.getSize.bind(this);f.proxysManager.registerProxy(this.coreElement,"getSize",{apply(i,s,n){return t.call(this,...n)}})}needToChangeColor(){return!1}needToUpdateGraphicsColor(){return!1}proxyGetFillColor(){let t=this.needToUpdateGraphicsColor(),i=this.needToChangeColor();if(!(t||i))return;let s=this.onGetFillColorCalled.bind(this);f.proxysManager.registerProxy(this.coreElement,"getFillColor",{apply(n,o,a){return s(t,i,n,o,a)}})}proxyRender(){if(!this.instances.settings.enableFeatures[this.instances.type].names||!this.instances.settings.showNamesWhenNeighborHighlighted)return;let t=this.onRenderCalled.bind(this);f.proxysManager.registerProxy(this.coreElement,"render",{apply(i,s,n){let o=Reflect.apply(i,s,n);return t(),o}})}unload(){this.isPinned&&new T0(this.instances).unpinNode(this.id),this.extendedText.unload(),super.unload()}restoreCoreElement(){f.proxysManager.unregisterProxy(this.coreElement.getSize),f.proxysManager.unregisterProxy(this.coreElement.getFillColor),f.proxysManager.unregisterProxy(this.coreElement.render)}needGraphicsWrapper(){return this.needPin()||this.needOpacityLayer()||!!this.icon}needOpacityLayer(){return this.instances.settings.fadeOnDisable}needPin(){return!0}needIcon(){return this.instances.settings.enableFeatures[this.instances.type].icons}getIcon(){if(!this.needIcon())return;let t=this.instances.settings.useParentIcon?Y7(this.id).reverse():[this.id],i=null;if(this.instances.settings.iconProperties.some(s=>s!=="")){let s=Le(this.id);if(s){let n=!1;for(let o of this.instances.settings.iconProperties){let a=r0(o,s);for(let l of a){if(sl(l)){i={svg:null,color:null,emoji:l},n=!0;break}let u=(0,W7.getIcon)(l);if(u){u.setAttribute("stroke","white"),i={svg:u,color:null,emoji:null},n=!0;break}}if(n)break}}}if(!i&&this.instances.settings.usePluginForIcon){for(let s of t)if(i=H7(s),i||(i=j7(s)),i)break;i?.svg?.setAttribute("stroke","white")}i&&!this.instances.settings.usePluginForIconColor&&(i.color=null),this.icon&&this.icon.svg==null&&this.icon.emoji==null?this.icon=null:this.icon=i}onRenderCalled(){this.extendedText.makeVisibleIfNeighborHighlighted()}computeRadius(){if(!this.instances.settings.enableFeatures[this.instances.type]["elements-stats"])return;let t=this.instances.settings.nodesSizeProperties.filter(n=>n!=="");if(t.length===0)return;let i=Le(this.id);if(!i)return;let s=!1;for(let n of t){let o=r0(n,i);for(let a of o)if($7(a)){this.radius=parseInt(a),isNaN(this.radius)&&(this.radius=Be.RADIUS),s=!0;break}if(s)break}}getSize(){return this.getSizeWithoutScaling()*this.graphicsWrapperScale}getSizeWithoutScaling(){let t=this.radius/Be.RADIUS,i=this.coreElement;if(this.instances.settings.enableFeatures[this.instances.type]["elements-stats"]&&this.instances.settings.nodesSizeFunction!=="default"){let s=i.renderer.fNodeSizeMult*8,n=f.graphsManager.nodesSizeCalculator?.filesStats.get(this.id)?.value;return s*t*(n??1)}else return i.renderer.fNodeSizeMult*Math.max(8,Math.min(3*Math.sqrt(i.weight+1),30))*t}onGetFillColorCalled(t,i,s,n,o){let a=this.coreElement.renderer.getHighlightNode()===this.coreElement,l=this.coreElement.type==="focused",u=Reflect.apply(s,n,o),h=i&&!(l||a)?this.getFillColor.call(this,...o)??u:u;return t&&this.graphicsWrapper?.updateFillColor(h.rgb,l||a),h}getFillColor(){}isCoreElementUptodate(){return!!this.coreElement.circle}isSameCoreElement(t){return t.id===this.id}isSameCoreGraphics(t){return t.circle===this.coreElement.circle}getCoreCollection(){return this.coreElement.renderer.nodes}setCoreElement(t){t&&(this.extendedText.coreElement=t),super.setCoreElement(t)}getCoreParentGraphics(t){return t.circle}canBeAddedWithEngineOptions(){return!(this.coreElement.type==="tag"&&!this.instances.engine.getOptions().showTags||this.coreElement.type==="attachment"&&!this.instances.engine.getOptions().showAttachments||this.coreElement.type==="unresolved"&&this.instances.engine.getOptions().hideUnresolved)}getID(){return this.coreElement.id}pin(){this.isPinned=!0,this.pinnedPosition={x:this.coreElement.x,y:this.coreElement.y},this.graphicsWrapper?.pin()}unpin(){this.isPinned=!1,this.pinnedPosition=void 0,this.graphicsWrapper?.unpin()}};var Lh=class extends Or{needGraphicsWrapper(){return super.needGraphicsWrapper()||this.needImage()}needImage(){return this.instances.settings.enableFeatures[this.instances.type].imagesForAttachments}createGraphicsWrapper(){this.graphicsWrapper||(this.graphicsWrapper=new Oh(this)),this.graphicsWrapper.createGraphics(),this.graphicsWrapperScale=Be.nodeScaleFactor(this.graphicsWrapper.shape)}};var Gh=class extends Or{needGraphicsWrapper(){return super.needGraphicsWrapper()||this.needBackground()||this.needImage()||this.needArcs()}needImage(){return this.instances.settings.enableFeatures[this.instances.type].imagesFromProperty||this.instances.settings.enableFeatures[this.instances.type].imagesFromEmbeds}needBackground(){return!this.icon&&(this.instances.settings.enableFeatures[this.instances.type].focus||this.graphicsWrapper?.shape!=="circle")}needArcs(){if(this.coreElement.type!==""&&!(this.instances.type==="localgraph"&&this.coreElement.type==="focused")||this.managers.size===0)return!1;for(let[e,t]of this.managers)if(this.instances.settings.interactiveSettings[e].showOnGraph)return!0;return!1}createGraphicsWrapper(){this.graphicsWrapper||(this.graphicsWrapper=new Uh(this)),this.graphicsWrapper.createGraphics(),this.graphicsWrapperScale=Be.nodeScaleFactor(this.graphicsWrapper.shape)}needToChangeColor(){return this.instances.settings.enableFeatures[this.instances.type]["elements-stats"]&&f.settings.nodesColorFunction!=="default"}needToUpdateGraphicsColor(){return!!this.graphicsWrapper.background||!!this.graphicsWrapper?.iconSprite}getFillColor(){let e=f.graphsManager.nodesColorCalculator?.filesStats.get(this.id);if(e)return{rgb:e.value,a:1}}};var Vh=class extends Or{createGraphicsWrapper(){this.graphicsWrapper||(this.graphicsWrapper=new zh(this)),this.graphicsWrapper.createGraphics(),this.graphicsWrapperScale=Be.nodeScaleFactor(this.graphicsWrapper.shape)}needToChangeColor(){return this.instances.settings.enableFeatures[this.instances.type].tags&&!this.instances.settings.interactiveSettings[Ue].unselected.contains(this.id.replace("#",""))}getFillColor(){let e=this.managers.get(Ue)?.getColor(this.id.replace("#",""));if(e)return{rgb:si(e),a:1}}};var Wh=class extends Or{constructor(e,t){super(e,t,new Map,[])}needGraphicsWrapper(){return super.needGraphicsWrapper()||this.needInnerCircle()}needInnerCircle(){return typeof this.instances.settings.borderUnresolved=="number"&&this.instances.settings.borderUnresolved>0&&this.instances.settings.borderUnresolved<1}createGraphicsWrapper(){this.graphicsWrapper||(this.graphicsWrapper=new Hh(this)),this.graphicsWrapper.createGraphics(),this.graphicsWrapperScale=Be.nodeScaleFactor(this.graphicsWrapper.shape)}};var Rh=class{constructor(e,t){this.hasChangedText=!1;this.instances=e,this.coreElement=t,this.coreGetTextStyle=this.coreElement.getTextStyle.bind(this.coreElement),this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.restoreText=this.restoreText.bind(this),this.changeText=this.changeText.bind(this)}init(){this.modifyCoreElement(),this.createGraphicsWrapper(),this.graphicsWrapper?.connect(),this.coreElement.text?.addListener("destroyed",()=>{this.unload()})}modifyCoreElement(){this.updateTextStyle(),this.updateText(),this.createTextPositionCallback()}unload(){this.restoreTextPositionCallback(),this.coreElement.text&&this.hasChangedText&&(this.coreElement.circle?.removeListener("mouseenter",this.onMouseEnter),this.coreElement.circle?.removeListener("mouseleave",this.onMouseLeave),this.restoreText(),this.hasChangedText=!1),this.graphicsWrapper?.destroyGraphics(),this.restoreTextStyle()}disable(){this.restoreTextPositionCallback()}updateTextStyle(){if(!this.coreElement.text||!this.instances.extendedStyleEl)return;let e=Ql(this.instances,this.coreElement.id),t=typeof this.coreElement.text.style.fontFamily=="string"?this.coreElement.text.style.fontFamily:this.coreElement.text.style.fontFamily.join(", ");t!==e.fontFamily&&!X7(e)&&(this.coreElement.getTextStyle=()=>{let i=this.coreGetTextStyle();return i.fontFamily=e.fontFamily+", "+t,i.fontStyle=e.fontStyle,i.fontVariant=e.fontVariant,i.fontWeight=e.fontWeight,i.letterSpacing=e.letterSpacing,e.fill&&(i.fill=e.fill),i},this.graphicsWrapper&&(this.graphicsWrapper.textClone.style=this.coreElement.getTextStyle()),this.coreElement.fontDirty=!0)}restoreTextStyle(){this.coreElement.getTextStyle=this.coreGetTextStyle,this.coreElement.fontDirty=!0}updateText(){!this.instances.settings.enableFeatures[this.instances.type].names||!this.coreElement.text||(this.coreElement.circle?.addListener("mouseenter",this.onMouseEnter),this.coreElement.circle?.addListener("mouseleave",this.onMouseLeave),this.hasChangedText=!0,this.changeText())}onMouseEnter(){this.coreElement.text&&(this.restoreText(),this.coreElement.text.zIndex=10)}onMouseLeave(){this.coreElement.text&&(this.changeText(),this.coreElement.text.zIndex=2)}changeText(){if(!this.coreElement.text)return;let e=this.coreElement.getDisplayText();if(this.instances.settings.usePropertiesForName){let t=Le(this.coreElement.id);if(t){let i=!1;for(let s of this.instances.settings.usePropertiesForName){let n=r0(s,t);for(let o of n){if(o!=null){e=o.toString(),i=!0;break}if(i)break}}}}this.instances.settings.showOnlyFileName&&(e=e.split("/").last()||e),this.instances.settings.noExtension&&(e=e.replace(/\.[^/.]+$/,"")),this.instances.settings.numberOfCharacters&&this.instances.settings.numberOfCharacters>0&&(e=e.slice(0,this.instances.settings.numberOfCharacters)),e!==this.coreElement.text.text&&(this.coreElement.text.text=e,this.graphicsWrapper?.updateBackgroundAfterTextChange())}restoreText(){if(!this.coreElement.text)return;let e=this.coreElement.getDisplayText();this.coreElement.text.text!==e&&(this.coreElement.text.text=this.coreElement.getDisplayText(),this.graphicsWrapper?.updateBackgroundAfterTextChange())}createGraphicsWrapper(){this.coreElement.text&&(!this.instances.settings.enableFeatures[this.instances.type].names||!this.instances.settings.addBackgroundToName||(this.graphicsWrapper||(this.graphicsWrapper=new jh(this)),this.graphicsWrapper.createGraphics()))}createTextPositionCallback(){if(!this.instances.settings.enableFeatures[this.instances.type].names||this.instances.settings.nameVerticalOffset===0&&!this.instances.settings.dynamicVerticalOffset||!this.coreElement.text)return;let e=this.coreElement.text.position,t=this.instances.settings.dynamicVerticalOffset?this.applyDynamicOffset.bind(this):this.applyStaticOffset.bind(this);this.coreTextPositionCallback=e.cb;let i=e.cb;e.cb=()=>{t(),i.call(e.scope)},this.coreElement.moveText=!0}restoreTextPositionCallback(){if(!this.coreTextPositionCallback)return;let e=this.coreElement.text?.position;e&&(e.cb=this.coreTextPositionCallback,this.coreTextPositionCallback=void 0)}applyDynamicOffset(){let e=this.coreElement;if(!e.text||!e.circle)return;let t=this.instances.renderer,i=e.text.y,s=this.instances.settings.enableFeatures[this.instances.type].arrows&&this.instances.settings.arrowFixedSize,n=this.instances.settings.enableFeatures[this.instances.type].arrows?this.instances.settings.arrowScale:1,o=2*Math.sqrt(t.fLineSizeMult)*(s?t.nodeScale:1/t.scale)*n;i=i-5+4*n*o,e.text.position._y=i}applyStaticOffset(){let e=this.coreElement;if(!e.text||!e.circle)return;let t=this.instances.settings.nameVerticalOffset,i=this.instances.renderer,s=e.text.y,n=e.getSize();if(t<-55){let o=e.y+(n+5)*i.nodeScale,a=s-o;s=o-a}if(t<-5&&t>-105){let o=n*i.nodeScale/50+e.text.height/100,a=-5*i.nodeScale+(5+t)*o;s=s+a}else if(t<=-105){let o=n*i.nodeScale/50+e.text.height/100,a=(100+t)*i.nodeScale+-100*o;s=s+a}else s=s+t*i.nodeScale;e.text.position._y=s}makeVisibleIfNeighborHighlighted(){let e=this.coreElement.text;if(!e)return;let t=this.coreElement.renderer;if(t.scale<t.fTextShowMult+.1)return;let i=t.getHighlightNode();i&&(!this.coreElement.forward.hasOwnProperty(i.id)&&!this.coreElement.reverse.hasOwnProperty(i.id)||(e.alpha=1,e.visible||(e.visible=!0,e.position.set(this.coreElement.x,this.coreElement.y+(this.coreElement.getSize()+5)*t.nodeScale),e.scale.set(t.scale<1?1/t.scale:t.nodeScale))))}};var ah=class{constructor(e,t){this.hasChangedArrowShape=!1;this.instances=e,this.extendedLink=t}init(){this.modifyCoreElement()}modifyCoreElement(){this.proxyArrow(),this.createScalleArrowCallback(),this.createFlatArrow()}unload(){f.proxysManager.unregisterProxy(this.extendedLink.coreElement.arrow),this.restoreArrowScaleCallback(),this.resetArrowShape()}proxyArrow(){let e=tr.needToChangeArrowColor(this.instances),t=tr.needToChangeArrowAlpha(this.instances);if(!this.instances.settings.invertArrows&&!e&&!t)return;let i=this.extendedLink.coreElement;if(i.arrow){let s=[];this.instances.settings.invertArrows&&s.push(this.invertArrow.bind(this)),e&&s.push(this.colorArrow.bind(this)),t&&s.push(this.makeArrowOpaque.bind(this));let n=((o,a,l)=>s.some(u=>u(o,a,l))).bind(this);f.proxysManager.registerProxy(this.extendedLink.coreElement,"arrow",{set(o,a,l,u){return n(o,a,l)?!0:Reflect.set(o,a,l,u)}}),i.arrow.addListener("destroyed",()=>{f.proxysManager.unregisterProxy(this.extendedLink.coreElement.arrow)})}}makeArrowOpaque(e,t,i){if(t==="alpha"){let s=this.extendedLink.coreElement.renderer.getHighlightNode();return s&&this.extendedLink.coreElement.source!==s&&this.extendedLink.coreElement.target!==s?Reflect.set(e,t,i):Reflect.set(e,t,1)}return!1}colorArrow(e,t,i){if(t==="tint"){let s=this.getArrowColor();return Reflect.set(e,t,s??i)}return!1}getArrowColor(){if(this.extendedLink.instances.settings.enableFeatures[this.extendedLink.instances.type].arrows&&this.extendedLink.instances.settings.arrowColorBool&&this.extendedLink.instances.settings.arrowColor!=="")return this.extendedLink.instances.settings.arrowColor;if(this.extendedLink.coreElement.line?.worldVisible)return this.extendedLink.coreElement.line.tint;if(this.extendedLink.siblingLink?.coreElement.line?.worldVisible)return this.extendedLink.siblingLink.coreElement.line.tint}invertArrow(e,t,i){if(t==="x"||t==="y"){let l=this.extendedLink.coreElement;var s=l.target.x-l.source.x,n=l.target.y-l.source.y,o=Math.sqrt(s*s+n*n),a=l.source.getSize()*l.renderer.nodeScale;return t==="x"?i=l.source.x+s*a/o:i=l.source.y+n*a/o,Reflect.set(e,t,i)}else if(t==="rotation")return i=i+Math.PI,Reflect.set(e,t,i);return!1}createScalleArrowCallback(){if(this.coreArrowScaleCallback||!tr.needToChangeArrowScale(this.extendedLink.instances))return;let e=this.extendedLink.coreElement.arrow?.scale;if(e){let t=this.scaleArrow.bind(this);this.coreArrowScaleCallback=e.cb;let i=e.cb;e.cb=()=>{t(),i.call(e.scope)},t()}}restoreArrowScaleCallback(){if(!this.coreArrowScaleCallback)return;let e=this.extendedLink.coreElement.arrow?.scale;e&&(e.cb=this.coreArrowScaleCallback,this.coreArrowScaleCallback=void 0)}scaleArrow(){let e=this.extendedLink.coreElement,t=e.arrow;t&&(t.scale._x=t.scale._y=(this.instances.settings.arrowFixedSize?2*Math.sqrt(e.renderer.fLineSizeMult)*e.renderer.nodeScale:t.scale._y)*this.instances.settings.arrowScale)}createFlatArrow(){if(!this.instances.settings.enableFeatures[this.instances.type].arrows||!this.instances.settings.flatArrows)return;let e=this.extendedLink.coreElement.arrow;e&&(e.clear(),e.beginFill(16777215),e.moveTo(0,0),e.lineTo(-4,-2),e.lineTo(-4,2),e.lineTo(0,0),e.endFill(),this.hasChangedArrowShape=!0)}resetArrowShape(){if(!this.hasChangedArrowShape)return;let e=this.extendedLink.coreElement.arrow;!e||e.destroyed||(e.clear(),e.beginFill(16777215),e.moveTo(0,0),e.lineTo(-4,-2),e.lineTo(-3,0),e.lineTo(-4,2),e.lineTo(0,0),e.endFill())}};var lh=class extends p0{constructor(t){super();this.t=0;this.extendedLink=t,this.init()}init(){this.alpha=0,this.beginFill(this.extendedLink.getStrokeColor(!0)||this.extendedLink.coreElement.renderer.colors.lineHighlight.rgb),this.drawCircle(0,0,3),this.endFill()}updateFrame(t){this.alpha=1;let i=Xs(this.t,t.P0,t.P1,t.P2);this.position.set(i.x,i.y),this.scale.set(this.extendedLink.coreElement.renderer.fLineSizeMult/Math.sqrt(this.extendedLink.coreElement.renderer.scale)),this.t+=.01*f.settings.animationSpeedForDots,this.t>1&&(this.t=0)}};var uh=class extends p0{constructor(t){super();this.t=0;this.extendedLink=t,this.init()}init(){this.alpha=0,this.beginFill(this.extendedLink.getStrokeColor(!0)||this.extendedLink.coreElement.renderer.colors.lineHighlight.rgb),this.drawCircle(0,0,3),this.endFill()}updateFrame(t){this.alpha=1,this.position.set(t.P0.x*(1-this.t)+t.P2.x*this.t,t.P0.y*(1-this.t)+t.P2.y*this.t),this.scale.set(this.extendedLink.coreElement.renderer.fLineSizeMult/Math.sqrt(this.extendedLink.coreElement.renderer.scale)),this.t+=.01*f.settings.animationSpeedForDots,this.t>1&&(this.t=0)}};var xo=class extends p0{constructor(e,t,i,s){super(),this.manager=e,this.types=t,this.name="curve:"+i,this.extendedLink=s,this.targetAlpha=s.instances.settings.enableFeatures[s.instances.type].arrows&&s.instances.settings.opaqueArrowsButKeepFading?1:.6,this.bezier={P0:{x:0,y:0},P1:{x:0,y:0},P2:{x:0,y:0}},this.updateValues()}updateValues(){if(this.activeType=this.extendedLink.getActiveType(this.manager.name),!this.activeType)return;let e=this.extendedLink.getStrokeColor();e!==void 0?this.color=e:this.extendedLink.instances.settings.interactiveSettings[this.manager.name].showOnGraph?this.color=this.manager.getColor(this.activeType):this.extendedLink.coreElement.line?this.color=this.extendedLink.coreElement.line.tint:this.color=this.extendedLink.coreElement.renderer.colors.line.rgb,this.redraw()}initArrow(){this.destroyed||(this.arrow=new p0,this.arrow.beginFill("white"),this.arrow.moveTo(0,0),this.arrow.lineTo(-4,-2),(!this.extendedLink.instances.settings.enableFeatures[this.extendedLink.instances.type].arrows||!this.extendedLink.instances.settings.flatArrows)&&this.arrow.lineTo(-3,0),this.arrow.lineTo(-4,2),this.arrow.lineTo(0,0),this.arrow.endFill(),this.arrow.name="arrow",this.arrow.eventMode="none",this.arrow.zIndex=1,this.arrow.pivot.set(0,0),this.arrow.alpha=this.extendedLink.coreElement.renderer.colors.arrow.a,this.extendedLink.coreElement.arrow&&(this.extendedLink.coreElement.arrow.renderable=!1))}redraw(){!this.activeType&&this.arrow&&(this.arrow.clear(),this.arrow.destroy(),this.arrow=null),this.updateFrame()}computeMainBezier(){if(this.destroyed)return!1;this.clear();let e=this.extendedLink.coreElement.renderer,t=this.extendedLink.coreElement,i=this.extendedLink.instances.settings.enableFeatures[this.extendedLink.instances.type].arrows&&this.extendedLink.instances.settings.invertArrows,s=i?t.source:t.target,n=i?t.target:t.source;if(!s.circle||!n.circle)return this.destroy(),this.extendedLink.disable(),!1;let o=e.nodeScale,a=s.x-n.x,l=s.y-n.y;this.bezier.P1={x:(n.x+s.x)*.5+l*.2,y:(n.y+s.y)*.5-a*.2};let u=Ld(1,n,this.bezier.P1,s);return this.bezier.P0=Xs(.9*n.getSize()*o/u,n,this.bezier.P1,s),this.bezier.P2=Xs(1-.9*s.getSize()*o/u,n,this.bezier.P1,s),!0}updateFrame(){if(this.destroyed)return;this.clear();let e=this.extendedLink.coreElement.renderer,t=this.extendedLink.coreElement,i=this.extendedLink.instances.settings.enableFeatures[this.extendedLink.instances.type].arrows&&this.extendedLink.instances.settings.invertArrows,s=i?t.source:t.target,n=i?t.target:t.source;if(!s.circle||!n.circle){this.destroy(),this.extendedLink.disable();return}let o=e.nodeScale,a=s.x-n.x,l=s.y-n.y;this.bezier.P1={x:(n.x+s.x)*.5+l*.2,y:(n.y+s.y)*.5-a*.2};let u=Ld(1,n,this.bezier.P1,s);this.bezier.P0=Xs(.9*n.getSize()*o/u,n,this.bezier.P1,s),this.bezier.P2=Xs(1-.9*s.getSize()*o/u,n,this.bezier.P1,s),this.lineStyle({width:this.extendedLink.getThicknessScale()*e.fLineSizeMult/e.scale,color:"white"}),this.moveTo(this.bezier.P0.x,this.bezier.P0.y).quadraticCurveTo(this.bezier.P1.x,this.bezier.P1.y,this.bezier.P2.x,this.bezier.P2.y),this.extendedLink.isHighlighted()?this.tint=(this.extendedLink.coreElement.line?.worldVisible?this.extendedLink.coreElement.line.tint:this.extendedLink.siblingLink?.coreElement.line?.tint)??this.tint:this.tint=this.color,t.line&&(this.alpha=t.line.alpha+this.targetAlpha,t.line.alpha=-.2),t.arrow&&t.arrow.visible?(this.arrow||(this.initArrow(),this.arrow&&this.addChild(this.arrow)),this.arrow&&(this.arrow.tint=this.tint,this.arrow.position.set(this.bezier.P2.x,this.bezier.P2.y),this.arrow.rotation=-Math.atan(-vo(1,this.bezier.P0,this.bezier.P1,this.bezier.P2).m),this.bezier.P1.x>this.bezier.P2.x&&(this.arrow.rotation+=Math.PI),this.arrow.scale.set(2*Math.sqrt(e.fLineSizeMult)/e.scale))):(this.arrow?.removeFromParent(),this.arrow?.clear(),this.arrow?.destroy(),this.arrow=null)}destroy(e){this.extendedLink.coreElement.arrow&&(this.extendedLink.coreElement.arrow.renderable=!0),!this.destroyed&&super.destroy(e)}clearGraphics(){this.destroyed||(this.arrow?.clear(),this.clear(),this.destroy({children:!0}),this.removeFromParent())}clear(){return this.destroyed?this:super.clear()}toggleType(e,t){this.updateValues()}};var $h=class extends xo{updateFrame(){if(!this.computeMainBezier())return;let e=this.extendedLink.coreElement.renderer,t=this.extendedLink.coreElement;this.lineStyle({width:this.extendedLink.getThicknessScale()*e.fLineSizeMult/e.scale,color:"white"}),this.moveTo(this.bezier.P0.x,this.bezier.P0.y).quadraticCurveTo(this.bezier.P1.x,this.bezier.P1.y,this.bezier.P2.x,this.bezier.P2.y),this.extendedLink.isHighlighted()?this.tint=(this.extendedLink.coreElement.line?.worldVisible?this.extendedLink.coreElement.line.tint:this.extendedLink.siblingLink?.coreElement.line?.tint)??this.tint:this.tint=this.color,t.line&&(this.alpha=t.line.alpha+this.targetAlpha,t.line.alpha=-.2);let i=1;this.extendedLink.instances.settings.enableFeatures[this.extendedLink.instances.type].arrows&&this.extendedLink.instances.settings.alwaysOpaqueArrows&&(this.extendedLink.isHighlighted()||!this.extendedLink.coreElement.renderer.getHighlightNode())&&(i=10),t.arrow&&t.arrow.visible?(this.arrow||(this.initArrow(),this.arrow&&this.addChild(this.arrow)),this.arrow&&(this.arrow.tint=this.extendedLink.coreElement.arrow?.tint??this.tint,this.arrow.alpha=i,this.arrow.position.set(this.bezier.P2.x,this.bezier.P2.y),this.arrow.rotation=-Math.atan(-vo(1,this.bezier.P0,this.bezier.P1,this.bezier.P2).m),this.bezier.P1.x>this.bezier.P2.x&&(this.arrow.rotation+=Math.PI),this.arrow.scale.set(2*Math.sqrt(e.fLineSizeMult)/e.scale))):(this.arrow?.removeFromParent(),this.arrow?.clear(),this.arrow?.destroy(),this.arrow=null)}destroy(e){this.extendedLink.coreElement.arrow&&(this.extendedLink.coreElement.arrow.renderable=!0),!this.destroyed&&super.destroy(e)}clearGraphics(){this.destroyed||(this.arrow?.clear(),this.clear(),this.destroy({children:!0}),this.removeFromParent())}clear(){return this.destroyed?this:super.clear()}toggleType(e,t){this.updateValues()}};var Yh=class extends xo{updateFrame(){if(!this.computeMainBezier())return;let e=this.extendedLink.coreElement.renderer,t=this.extendedLink.coreElement,i=this.extendedLink.coreElement.arrow?.tint,s=this.extendedLink.getThicknessScale()*e.fLineSizeMult/e.scale,n={x:this.bezier.P0.x,y:this.bezier.P0.y},o={x:this.bezier.P1.x,y:this.bezier.P1.y};if(this.extendedLink.isHighlighted())this.lineStyle({width:s,color:"white"}),this.moveTo(this.bezier.P0.x,this.bezier.P0.y).quadraticCurveTo(this.bezier.P1.x,this.bezier.P1.y,this.bezier.P2.x,this.bezier.P2.y),this.tint=(this.extendedLink.coreElement.line?.worldVisible?this.extendedLink.coreElement.line.tint:this.extendedLink.siblingLink?.coreElement.line?.tint)??this.tint;else{let l=[...this.types].filter(u=>this.manager.isActive(u));if(l.length===1)this.lineStyle({width:s,color:"white"}),this.moveTo(this.bezier.P0.x,this.bezier.P0.y).quadraticCurveTo(this.bezier.P1.x,this.bezier.P1.y,this.bezier.P2.x,this.bezier.P2.y),this.tint=this.color;else if(l.length>0){this.tint="white";let u=1/l.length,h=0;this.moveTo(this.bezier.P0.x,this.bezier.P0.y);for(let d of l){let p=u*(1+h),[m,x]=this.deCasteljau([n,o,this.bezier.P2],p);n=x[0],o=x[1],this.lineStyle({width:s,color:this.manager.getColor(d)}),this.quadraticCurveTo(m[1].x,m[1].y,m[2].x,m[2].y),++h}this.extendedLink.instances.settings.enableFeatures[this.extendedLink.instances.type].arrows&&this.extendedLink.instances.settings.arrowColorBool&&this.extendedLink.instances.settings.arrowColor!==""?i=this.extendedLink.instances.settings.arrowColor:i=this.manager.getColor(l[l.length-1])}}t.line&&(this.alpha=t.line.alpha+this.targetAlpha,t.line.alpha=-.2);let a=1;this.extendedLink.instances.settings.enableFeatures[this.extendedLink.instances.type].arrows&&this.extendedLink.instances.settings.alwaysOpaqueArrows&&(this.extendedLink.isHighlighted()||!this.extendedLink.coreElement.renderer.getHighlightNode())&&(a=10),t.arrow&&t.arrow.visible?(this.arrow||(this.initArrow(),this.arrow&&this.addChild(this.arrow)),this.arrow&&(this.arrow.tint=i??this.tint,this.arrow.alpha=a,this.arrow.position.set(this.bezier.P2.x,this.bezier.P2.y),this.arrow.rotation=-Math.atan(-vo(1,n,o,this.bezier.P2).m),this.bezier.P1.x>this.bezier.P2.x&&(this.arrow.rotation+=Math.PI),this.arrow.scale.set(2*Math.sqrt(e.fLineSizeMult)/e.scale))):(this.arrow?.removeFromParent(),this.arrow?.clear(),this.arrow?.destroy(),this.arrow=null)}deCasteljau(e,t){if(t===0||t===1)return[e,e];let i=[],s=[];for(i.push(e[0]),s.push(e[e.length-1]);e.length>1;){let n=[];for(let o=0;o+1<e.length;++o){let a=e[o].x,l=e[o].y,u=e[o+1].x,h=e[o+1].y;n.push({x:a+(u-a)*t,y:l+(h-l)*t})}i.push(n[0]),s.push(n[n.length-1]),e=n}return[i,s.reverse()]}destroy(e){this.extendedLink.coreElement.arrow&&(this.extendedLink.coreElement.arrow.renderable=!0),!this.destroyed&&super.destroy(e)}clearGraphics(){this.destroyed||(this.arrow?.clear(),this.clear(),this.destroy({children:!0}),this.removeFromParent())}clear(){return this.destroyed?this:super.clear()}toggleType(e,t){this.updateValues()}};var hh=class{constructor(e){this.name=e.id,this.extendedElement=e,this.managerGraphicsMap=new Map}createGraphics(){let e=1,t=this.extendedElement.instances;for(let[i,s]of t.linksSet.managers){if(!t.settings.interactiveSettings[i].showOnGraph&&!t.settings.curvedLinks)continue;let n=this.extendedElement.getTypes(i);this.createManagerGraphics(s,n,e),e++}}createManagerGraphics(e,t,i){let s=this.managerGraphicsMap.get(e.name);if(s&&!s.destroyed)this.setManagerGraphics(e,s);else{let n=this.extendedElement.instances.settings.allowMultipleLinkTypes?new Yh(e,t,this.name,this.extendedElement):new $h(e,t,this.name,this.extendedElement);this.setManagerGraphics(e,n)}}setManagerGraphics(e,t){let i=this.managerGraphicsMap.get(e.name);i&&i!==t&&(i.parent&&i.removeFromParent(),i.destroyed||i.destroy({children:!0})),this.managerGraphicsMap.set(e.name,t),this.pixiElement=t}resetManagerGraphics(e){}clearGraphics(){this.pixiElement.clear()}destroyGraphics(){this.pixiElement.destroy({children:!0})}updateGraphics(){this.pixiElement?.updateValues()}connect(){let e=this.extendedElement.coreElement.renderer.hanger;e.getChildByName(this.pixiElement.name)||(this.pixiElement.extendedLink=this.extendedElement,this.extendedElement.coreElement.arrow&&(this.extendedElement.coreElement.arrow.renderable=!1),e.addChild(this.pixiElement))}disconnect(){for(let e of this.managerGraphicsMap.values())e.removeFromParent()}};var Xh=class extends p0{constructor(e,t,i,s){super(),this.manager=e,this.types=t,this.name="line:"+i,this.extendedLink=s,this.targetAlpha=s.instances.settings.enableFeatures[s.instances.type].arrows&&s.instances.settings.opaqueArrowsButKeepFading?1:.6,this.updateValues()}updateValues(){if(this.activeType=this.extendedLink.getActiveType(this.manager.name),!this.activeType)return;let e=this.extendedLink.getStrokeColor();e!==void 0?this.color=e:this.extendedLink.instances.settings.interactiveSettings[this.manager.name].showOnGraph?this.color=this.manager.getColor(this.activeType):this.extendedLink.coreElement.line?this.color=this.extendedLink.coreElement.line.tint:this.color=this.extendedLink.coreElement.renderer.colors.line.rgb,this.redraw()}initArrow(){this.destroyed||(this.arrow=new p0,this.arrow.beginFill("white"),this.arrow.moveTo(0,0),this.arrow.lineTo(-4,-2),(!this.extendedLink.instances.settings.enableFeatures[this.extendedLink.instances.type].arrows||!this.extendedLink.instances.settings.flatArrows)&&this.arrow.lineTo(-3,0),this.arrow.lineTo(-4,2),this.arrow.lineTo(0,0),this.arrow.endFill(),this.arrow.name="arrow",this.arrow.eventMode="none",this.arrow.zIndex=1,this.arrow.pivot.set(0,0),this.arrow.alpha=this.extendedLink.coreElement.renderer.colors.arrow.a,this.extendedLink.coreElement.arrow&&(this.extendedLink.coreElement.arrow.renderable=!1))}redraw(){!this.activeType&&this.arrow&&(this.arrow.clear(),this.arrow.destroy(),this.arrow=null),this.updateFrame()}updateFrame(){if(this.destroyed)return;if(this.clear(),!this.activeType){this.arrow?.clear();return}let e=this.extendedLink.coreElement.renderer,t=this.extendedLink.coreElement,i=this.extendedLink.instances.settings.enableFeatures[this.extendedLink.instances.type].arrows&&this.extendedLink.instances.settings.invertArrows,s=i?t.source:t.target,n=i?t.target:t.source;if(!s.circle||!n.circle){this.destroy(),this.extendedLink.disable();return}let o=e.nodeScale,a={x:n.x,y:n.y},l={x:s.x,y:s.y},u={x:l.x-a.x,y:l.y-a.y},h=Math.sqrt(u.x*u.x+u.y*u.y);u.x/=h,u.y/=h;let d={x:a.x+o*n.getSize()*u.x,y:a.y+o*n.getSize()*u.y},p={x:l.x-o*n.getSize()*u.x,y:l.y-o*n.getSize()*u.y},m=this.extendedLink.coreElement.arrow?.tint,x=this.extendedLink.getThicknessScale()*e.fLineSizeMult/e.scale;if(this.extendedLink.isHighlighted())this.lineStyle({width:x,color:"white"}),this.moveTo(d.x,d.y).lineTo(p.x,p.y),this.tint=(this.extendedLink.coreElement.line?.worldVisible?this.extendedLink.coreElement.line.tint:this.extendedLink.siblingLink?.coreElement.line?.tint)??this.tint;else{let A=[...this.types].filter(P=>this.manager.isActive(P));if(this.extendedLink.firstSibling||!this.extendedLink.siblingLink?.getActiveType(de)){if(this.extendedLink.siblingLink){let P=[...this.extendedLink.siblingLink.types.get(de)??[]].filter(L=>this.manager.isActive(L));for(let L of P)A.includes(L)||A.unshift(L)}if(A.length===1)this.lineStyle({width:x,color:"white"}),this.moveTo(d.x,d.y).lineTo(p.x,p.y),this.tint=this.color;else if(A.length>0){this.tint="white";let P=1/A.length,L=0;this.moveTo(d.x,d.y);for(let I of A){let T=P*(1+L);this.lineStyle({width:x,color:this.manager.getColor(I)}),this.lineTo((1-T)*d.x+T*p.x,(1-T)*d.y+T*p.y),++L}this.extendedLink.instances.settings.enableFeatures[this.extendedLink.instances.type].arrows&&this.extendedLink.instances.settings.arrowColorBool&&this.extendedLink.instances.settings.arrowColor!==""?m=this.extendedLink.instances.settings.arrowColor:m=this.manager.getColor(A[A.length-1])}}}let C=1;this.extendedLink.instances.settings.enableFeatures[this.extendedLink.instances.type].arrows&&this.extendedLink.instances.settings.alwaysOpaqueArrows&&(this.extendedLink.isHighlighted()||!this.extendedLink.coreElement.renderer.getHighlightNode())&&(C=10),t.line&&(this.alpha=t.line.alpha+this.targetAlpha,t.line.alpha=-.2),t.arrow&&t.arrow.visible?(this.arrow||(this.initArrow(),this.arrow&&this.addChild(this.arrow)),this.arrow&&(this.arrow.tint=m??this.tint,this.arrow.alpha=C,this.arrow.position.set(p.x,p.y),this.arrow.rotation=-Math.atan(-(p.y-d.y)/(p.x-d.x)),a.x>p.x&&(this.arrow.rotation+=Math.PI),this.arrow.scale.set(2*Math.sqrt(e.fLineSizeMult)/e.scale))):(this.arrow?.removeFromParent(),this.arrow?.clear(),this.arrow?.destroy(),this.arrow=null)}deCasteljau(e,t){if(t===0||t===1)return[e,e];let i=[],s=[];for(i.push(e[0]),s.push(e[e.length-1]);e.length>1;){let n=[];for(let o=0;o+1<e.length;++o){let a=e[o].x,l=e[o].y,u=e[o+1].x,h=e[o+1].y;n.push({x:a+(u-a)*t,y:l+(h-l)*t})}i.push(n[0]),s.push(n[n.length-1]),e=n}return[i,s.reverse()]}destroy(e){this.extendedLink.coreElement.arrow&&(this.extendedLink.coreElement.arrow.renderable=!0),!this.destroyed&&super.destroy(e)}clearGraphics(){this.destroyed||(this.arrow?.clear(),this.clear(),this.destroy({children:!0}),this.removeFromParent())}clear(){return this.destroyed?this:super.clear()}toggleType(e,t){this.updateValues()}};var ch=class{constructor(e){this.name=e.id,this.extendedElement=e,this.managerGraphicsMap=new Map}createGraphics(){let e=1,t=this.extendedElement.instances;for(let[i,s]of t.linksSet.managers){if(!t.settings.interactiveSettings[i].showOnGraph&&!t.settings.curvedLinks)continue;let n=this.extendedElement.getTypes(i);this.createManagerGraphics(s,n,e),e++}}createManagerGraphics(e,t,i){let s=this.managerGraphicsMap.get(e.name);if(s&&!s.destroyed)this.setManagerGraphics(e,s);else{let n=new Xh(e,t,this.name,this.extendedElement);this.setManagerGraphics(e,n)}}setManagerGraphics(e,t){let i=this.managerGraphicsMap.get(e.name);i&&i!==t&&(i.parent&&i.removeFromParent(),i.destroyed||i.destroy({children:!0})),this.managerGraphicsMap.set(e.name,t),this.pixiElement=t}resetManagerGraphics(e){}clearGraphics(){this.pixiElement.clear()}destroyGraphics(){this.pixiElement.destroy({children:!0})}updateGraphics(){this.pixiElement?.updateValues()}connect(){let e=this.extendedElement.coreElement.renderer.hanger;e.getChildByName(this.pixiElement.name)||(this.pixiElement.extendedLink=this.extendedElement,this.extendedElement.coreElement.arrow&&(this.extendedElement.coreElement.arrow.renderable=!1),e.addChild(this.pixiElement))}disconnect(){for(let e of this.managerGraphicsMap.values())e.removeFromParent()}animate(){}};var wx=100,Sx=100,Gr=class{constructor(e){this.shape="circle";this.extendedElement=e,this.name=e.id,this.initShape()}initShape(){if(!this.extendedElement.instances.settings.enableFeatures[this.extendedElement.instances.type].shapes)return;let e=Object.fromEntries(Object.entries(this.extendedElement.instances.settings.shapeQueries).sort((t,i)=>(t[1].index??0)-(i[1].index??0)));for(let t of Object.keys(e)){let i=new nr(e[t]),s=Le(this.extendedElement.id);if(!s)return;if(i.doesMatch(s)){this.shape=t;return}}}createGraphics(){this.pixiElement&&!this.pixiElement.destroyed||(this.pixiElement&&this.pixiElement.parent&&this.pixiElement.removeFromParent(),this.pixiElement=new Je,this.pixiElement.name=this.name,this.placeNode(),this.extendedElement.needOpacityLayer()&&this.initOpacityLayer())}placeNode(){this.pixiElement.x=wx,this.pixiElement.y=Sx}initOpacityLayer(){this.opacityLayer=new Be(this.shape),this.opacityLayer.drawFill(16711680),this.opacityLayer.scale.set(this.opacityLayer.getDrawingResolution()),this.opacityLayer.alpha=0,this.opacityLayer.name="opacity-layer",this.pixiElement.addChild(this.opacityLayer)}initIcon(){if(this.extendedElement.icon&&!(!this.extendedElement.icon.svg&&!this.extendedElement.icon.emoji)&&!(this.iconSprite?.parent||this.emojiText?.parent)){if(this.extendedElement.icon.svg){let e=this.extendedElement.icon.svg,t=this.extendedElement.icon.color||this.getFillColor().rgb,i=new XMLSerializer,s=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(i.serializeToString(e))}`;this.pixiElement.sortableChildren=!0;let n=a=>{this.iconSprite=new N0(a),this.iconSprite.name="icon",this.iconSprite.anchor.set(.5,.5),this.iconSprite.height=200,this.iconSprite.width=200,this.iconSprite.tint=t,this.pixiElement.addChild(this.iconSprite)},o=xe.from(s,{resourceOptions:{scale:40/e.width.baseVal.value}});n(o)}else this.extendedElement.icon.emoji&&(this.emojiText=new vr(this.extendedElement.icon.emoji,{fontFamily:"Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji, Android Emoji, EmojiSymbols, Symbola, Twemoji Mozilla, Twemoji Mozilla Color Emoji, Twemoji Mozilla Color Emoji 13.1.0",fontSize:150,align:"center"}),this.emojiText.name="icon",this.emojiText.anchor.set(.5,.5),this.pixiElement.addChild(this.emojiText));this.iconBackgroundLayer=new Be(this.shape),this.iconBackgroundLayer.name="icon-background",this.iconBackgroundLayer.drawFill("white"),this.iconBackgroundLayer.scale.set(this.iconBackgroundLayer.getDrawingResolution()+.5),this.iconBackgroundLayer.alpha=10,this.iconBackgroundLayer.zIndex=-1,this.updateIconBackgroundLayerColor(Ur(this.extendedElement.instances.renderer)),this.pixiElement.addChildAt(this.iconBackgroundLayer,0)}}updateIconBackgroundLayerColor(e){this.iconBackgroundLayer&&(this.iconBackgroundLayer.tint=e)}clearGraphics(){}destroyGraphics(){this.pixiElement.destroy({children:!0})}updateGraphics(){}updateOpacityLayerColor(e){this.opacityLayer&&(this.opacityLayer.clear(),this.opacityLayer.drawFill(e))}updateFillColor(e,t){return this.lastColor===e?!1:(this.lastColor=e,this.iconSprite&&(this.iconSprite.tint=(t?e??this.extendedElement.icon?.color:this.extendedElement.icon?.color??e)??this.getFillColor().rgb),!0)}connect(){this.extendedElement.coreElement.circle&&!this.extendedElement.coreElement.circle.getChildByName(this.name)&&this.extendedElement.coreElement.circle.addChild(this.pixiElement)}disconnect(){this.pixiElement.removeFromParent()}fadeIn(){this.opacityLayer&&(this.opacityLayer.alpha=0)}fadeOut(){this.opacityLayer&&(this.opacityLayer.alpha=.8)}pin(){this.pixiElement.getChildByName("pin")||yi.load(f.pinSVGDataUrl).then(t=>{let i=new N0(t);i.name="pin",i.anchor.set(1,0),i.height=80,i.width=80,i.position.set(100,-100),this.pixiElement.addChild(i),this.pixiElement.parent||this.connect()})}unpin(){let e=this.pixiElement.getChildByName("pin");e&&(e.destroy(),this.pixiElement.removeChild(e))}getFillColor(){return this.extendedElement.coreElement.getFillColor()}};var Oh=class extends Gr{createGraphics(){super.createGraphics(),this.texture&&this.initNodeImage(this.texture)}initNodeImage(e){if(this.extendedElement.needImage()&&(this.nodeImage&&(this.nodeImage.destroyed||!this.nodeImage.parent)&&(this.nodeImage.parent&&this.nodeImage.removeFromParent(),this.nodeImage.destroyed||this.nodeImage.destroy({children:!0})),e)){this.texture=e,this.nodeImage=new Do(e,this.extendedElement.instances.settings.borderFactor,this.shape);let t=this.pixiElement.getChildByName("opacity-layer");if(t){let i=this.pixiElement.getChildIndex(t);this.pixiElement.addChildAt(this.nodeImage,i)}else this.pixiElement.addChild(this.nodeImage)}}clearGraphics(){this.nodeImage?.destroy({children:!0}),super.clearGraphics()}};var Uh=class extends Gr{createGraphics(){super.createGraphics(),this.extendedElement.needBackground()&&this.initBackground(),this.extendedElement.needArcs()&&this.initArcsWrapper(),this.texture&&this.initNodeImage(this.texture)}initArcsWrapper(){if(this.managerGraphicsMap&&this.managerGraphicsMap.size>0){for(let t of this.managerGraphicsMap.values()||[])t.parent&&t.removeFromParent(),t.destroyed||t.destroy({children:!0});this.managerGraphicsMap.clear()}else this.managerGraphicsMap=new Map;let e=1;for(let[t,i]of this.extendedElement.managers){if(!this.extendedElement.instances.settings.interactiveSettings[t].showOnGraph)continue;let s=this.extendedElement.getTypes(t);this.createManagerGraphics(i,s,e),e++}}initBackground(){this.background&&(this.background.parent&&this.background.removeFromParent(),this.background.destroyed||this.background.destroy({children:!0})),this.background=new Be(this.shape),this.extendedElement.instances.settings.enableFeatures[this.extendedElement.instances.type].shapes&&this.background.drawFill(this.getFillColor().rgb),this.background.scale.set(this.background.getDrawingResolution()),this.pixiElement.addChildAt(this.background,0)}initNodeImage(e){if(this.extendedElement.needImage()&&(this.nodeImage&&(this.nodeImage.destroyed||!this.nodeImage.parent)&&(this.nodeImage.parent&&this.nodeImage.removeFromParent(),this.nodeImage.destroyed||this.nodeImage.destroy({children:!0})),e)){this.texture=e,this.nodeImage=new Do(e,this.extendedElement.instances.settings.borderFactor,this.shape);let t=this.pixiElement.getChildByName("opacity-layer");if(t){let i=this.pixiElement.getChildIndex(t);this.pixiElement.addChildAt(this.nodeImage,i)}else this.pixiElement.addChild(this.nodeImage)}}createManagerGraphics(e,t,i){let s=new qh(this.extendedElement,t,e,i,this.shape);this.managerGraphicsMap?.set(e.name,s),this.pixiElement.addChild(s)}resetManagerGraphics(e){if(!Le(this.extendedElement.id))return;let i=this.managerGraphicsMap?.get(e.name),s=this.extendedElement.getTypes(e.name);i?(i.clearGraphics(),i.setTypes(s),i.updateValues()):this.createManagerGraphics(e,s,this.managerGraphicsMap?.size??0)}updateFillColor(e,t){return super.updateFillColor(e,t)?(e===void 0?this.background?.drawFill(this.getFillColor().rgb):this.background?.drawFill(e),!0):!1}clearGraphics(){if(this.background?.destroy(),this.nodeImage?.destroy({children:!0}),this.managerGraphicsMap)for(let e of this.managerGraphicsMap.values())e.clearGraphics();super.clearGraphics()}};var zh=class extends Gr{};var Hh=class extends Gr{createGraphics(){super.createGraphics(),this.extendedElement.needInnerCircle()&&this.initInnerCircle()}initInnerCircle(){typeof this.extendedElement.instances.settings.borderUnresolved=="number"&&(this.innerCircle&&(this.innerCircle.parent&&this.innerCircle.removeFromParent(),this.innerCircle.destroyed||this.innerCircle.destroy({children:!0})),this.innerCircle=new Be(this.shape),this.innerCircle.alpha=5,this.innerCircle.scale.set(this.innerCircle.getDrawingResolution()*(1-this.extendedElement.instances.settings.borderUnresolved)),this.pixiElement.addChildAt(this.innerCircle,0))}updateOpacityLayerColor(e){super.updateOpacityLayerColor(e),this.innerCircle&&(this.innerCircle.clear(),this.innerCircle.drawFill(e))}clearGraphics(){this.innerCircle?.destroy(),super.clearGraphics()}};var Od=class{},Ct=class Ct extends p0{constructor(t,i,s,n,o){super();this.graphics=new Map;this.name=s.name,this.extendedNode=t,this.types=i,this.manager=s,this.circleLayer=n,this.shape=o,this.updateValues()}clearGraphics(){for(let t of this.graphics.values())t.graphic.destroy();this.removeChildren(),this.graphics.clear()}updateValues(){let t=this.manager.getTypesWithoutNone(),i=t.length,s=Math.min(2*Math.PI/i,Ct.maxArcSize);this.radius=(.5+(Ct.thickness+Ct.inset)*this.circleLayer)*Be.getSizeFactor(this.shape)*Be.RADIUS*2,this.thickness=Ct.thickness*Be.getSizeFactor(this.shape)*Be.RADIUS*2;let n=!0;for(let o of this.types){if(o===this.manager.instances.settings.interactiveSettings[this.manager.name].noneType)continue;let a=t.findIndex(u=>u===o),l=this.graphics.get(o);if(!l){if(l=new Od,l.type=o,l.index=a,l.size=s,l.graphic=new p0,l.graphic.name=this.getArcName(o),l.color=this.manager.getColor(o),l.weight=1,this.manager.instances.settings.spreadArcs&&this.manager.instances.settings.weightArcs){let u=Le(this.extendedNode.id);u&&(l.weight=z7(this.manager.name,u,o))}this.graphics.set(o,l),this.addChild(l.graphic)}}for(let o of this.types)this.redrawType(o)}redrawType(t,i){let s=this.graphics.get(t);if(s){if(i&&(s.color=i),this.manager.instances.settings.spreadArcs){let n=[...this.types].filter(u=>this.manager.isActive(u)),o=n.reduce((u,h)=>u+(this.graphics.get(h)?.weight||0),0),a=n.slice(0,n.indexOf(t));s.size=s.weight*2*Math.PI/o,s.index=a.reduce((u,h)=>u+(this.graphics.get(h)?.weight||0),0);let l=[...this.types].some(u=>u!==t&&this.manager.isActive(u));s.startAngle=2*Math.PI/o*s.index+(l?Ct.gap*.5:0),s.endAngle=s.startAngle+s.size-(l?Ct.gap*.5:0)}else s.startAngle=s.size*s.index+Ct.gap*.5,s.endAngle=s.size*(s.index+1)-Ct.gap*.5;s.graphic.clear(),s.graphic.lineStyle(this.thickness,s.color).arc(0,0,this.radius,s.startAngle,s.endAngle).endFill(),s.graphic.alpha=this.manager.isActive(t)?1:.1}}updateFrame(){}toggleType(t,i){if(this.manager.instances.settings.spreadArcs)this.updateValues();else{let s=this.graphics.get(t);s&&(s.graphic.alpha=i?1:.1)}}setTypes(t){this.types=t}getArcName(t){return"arc-"+t}};Ct.thickness=.09,Ct.inset=.03,Ct.gap=.2,Ct.maxArcSize=Math.PI/2;var qh=Ct;var Do=class extends N0{constructor(e=xe.EMPTY,t,i){super(e),this.textureSize=Math.min(e.width,e.height),this.name="image",this.anchor.set(.5);let s=new Be(i).drawMask();this.mask=s,this.addChild(s);let n=2*100*Be.getSizeFactor(i)/this.textureSize,o=n*(1-t);this.scale.set(o),s.scale.set(s.getDrawingResolution()/n)}changeImage(e){this.texture=e}};var yo=(m=>(m.CIRCLE="circle",m.SQUARE="square",m.POLY_3="triangle",m.POLY_4="diamond",m.POLY_5="pentagon",m.POLY_6="hexagon",m.POLY_8="octagon",m.POLY_10="decagon",m.STARBURST_4="star4",m.STARBURST_5="star5",m.STARBURST_6="star6",m.STARBURST_8="star8",m.STARBURST_10="star10",m))(yo||{});var Me=class Me extends p0{constructor(e){super(),this.shape=e,this.n=Me.getN(e),this.type=Me.getType(e)}drawMask(){return this.drawFill(16777215)}drawFill(e){return this.clear(),this.beginFill(e).drawUniqueShape().endFill()}getDrawingResolution(){switch(this.type){case"circle":case"unknown":return Me.RESOLUTION_RADIUS;default:return 1}}drawUniqueShape(){switch(this.type){case"polygon":case"starburst":return this.drawPolygon(Me.getVertices(this.shape));case"square":return this.drawRect(-Me.RADIUS,-Me.RADIUS,2*Me.RADIUS,2*Me.RADIUS);case"circle":case"unknown":return this.drawCircle(0,0,Me.RESOLUTION_RADIUS)}}static randomShape(){let e=Object.keys(yo).filter(i=>typeof i=="string"),t=e[Math.floor(Math.random()*e.length)];return yo[t]}static nodeScaleFactor(e){let t=Me.getType(e);if(t==="polygon"){let i=Me.getPolygonRadius(Me.getN(e),Me.RADIUS),s=Me.RADIUS;return(i+s)/2/i}if(t==="starburst"){let i=Me.getStarburstRadius(Me.getN(e),Me.RADIUS),s=Me.RADIUS;return(i+s)/2/i}return 1}static getSizeFactor(e){let t=Me.getType(e);return t==="polygon"?this.getPolygonRadius(Me.getN(e),Me.RADIUS)/Me.RADIUS:t==="starburst"?this.getStarburstRadius(Me.getN(e),Me.RADIUS)/Me.RADIUS:1}static getN(e){switch(e){case"triangle":return 3;case"diamond":case"star4":return 4;case"pentagon":case"star5":return 5;case"hexagon":case"star6":return 6;case"octagon":case"star8":return 8;case"decagon":case"star10":return 10;case"circle":return 10;default:return 0}}static getType(e){switch(e){case"triangle":case"diamond":case"pentagon":case"hexagon":case"octagon":case"decagon":return"polygon";case"star4":case"star5":case"star6":case"star8":case"star10":return"starburst";case"square":return"square";case"circle":return"circle";default:return"unknown"}}static getVertices(e){switch(Me.getType(e)){case"polygon":return Me.getPolygonOutside(e,0,Me.RADIUS);case"starburst":return Me.getStarburst(e,Me.RADIUS)}return[]}static getPolygonInside(e,t,i){let s=Me.getN(e),n=[];for(let o=0;o<s;++o){let a=2*Math.PI*o/s;n.push(i*Math.sin(a+t)),n.push(i*-Math.cos(a+t))}return n}static getPolygonOutside(e,t,i){let s=Me.getType(e),n=Me.getN(e),o=i;return s==="polygon"&&(o=Me.getPolygonRadius(n,i)),s==="starburst"&&(o=Me.getStarburstRadius(n,i)),this.getPolygonInside(e,t,o)}static getStarburst(e,t){let i=Me.getN(e),s=Me.getPolygonInside(e,2*Math.PI/(2*i),t),n=Me.getPolygonOutside(e,0,t),o=[];for(let a=0;a<i;++a)o.push(n[a*2]),o.push(n[a*2+1]),o.push(s[a*2]),o.push(s[a*2+1]);return o}static getPolygonRadius(e,t){return t/Math.cos(Math.PI/e)}static getStarburstRadius(e,t){return Me.getPolygonRadius(e,t)+30}static getSVG(e){let t=Me.getType(e),i=document.createElementNS("http://www.w3.org/2000/svg","svg");switch(i.setAttributeNS(null,"fill","currentColor"),i.setAttributeNS(null,"stroke-width","0"),i.appendChild(Me.getInnerSVG(e)),t){case"circle":case"unknown":i.setAttributeNS(null,"viewBox","0 0 200 200");break;case"square":i.setAttributeNS(null,"viewBox","0 0 200 200");break;case"polygon":case"starburst":let s=Me.getVertices(e);for(let a=0;a<s.length;++a)s[a]+=100;let n=Math.max.apply(null,s),o=Math.min.apply(null,s);i.setAttributeNS(null,"viewBox",`${o} ${o} ${n-o} ${n-o}`);default:break}return i}static getInnerSVG(e){switch(Me.getType(e)){case"square":return We("rect",{width:200,height:200});case"polygon":case"starburst":let i=Me.getVertices(e);for(let n=0;n<i.length;++n)i[n]+=100;let s=`M ${i[0]} ${i[1]} `;for(let n=2;n<i.length;n+=2)s+=`L ${i[n]} ${i[n+1]} `;return We("path",{d:s});case"circle":case"unknown":default:return We("circle",{cx:100,cy:100,r:100})}}};Me.RADIUS=100,Me.RESOLUTION_RADIUS=10;var Be=Me;var jh=class{constructor(e){this.extendedElement=e,this.name=`text:${e.coreElement.id}`}destroyGraphics(){this.pixiElement&&(this.pixiElement.removeFromParent(),this.pixiElement.destroyed||this.pixiElement.destroy(!0)),this.textClone&&(this.textClone.removeFromParent(),this.textClone.destroy(!0),this.textClone.destroyed||this.textClone.destroy(!0))}createGraphics(){this.addBackgroundToText()}clearGraphics(){}updateGraphics(){}connect(){let e=this.extendedElement.coreElement;e.text&&(e.text.addChild(this.pixiElement),e.text.addChild(this.textClone))}disconnect(){this.pixiElement.removeFromParent(),this.textClone.removeFromParent()}addBackgroundToText(){let e=this.extendedElement.coreElement;e.text&&((!this.pixiElement||this.pixiElement.destroyed)&&(this.pixiElement=new N0(xe.WHITE)),(!this.textClone||this.textClone.destroyed)&&(this.textClone=new vr(e.text.text,e.getTextStyle())),this.pixiElement.width=(this.textClone.getBounds().width+this.textClone.width)/2,this.pixiElement.height=(this.textClone.getBounds().height+this.textClone.height)/2,this.pixiElement.anchor.set(.5,0),this.textClone.anchor.set(.5,0),this.pixiElement.tint=Ur(e.renderer),this.pixiElement.alpha=2)}updateBackgroundAfterTextChange(){let e=this.extendedElement.coreElement.text;e&&(this.textClone.text=e.text,this.pixiElement.width=(this.textClone.getBounds().width+this.textClone.width)/2,this.pixiElement.height=(this.textClone.getBounds().height+this.textClone.height)/2)}updateTextBackgroundColor(e){this.pixiElement&&(this.pixiElement.tint=e,this.textClone&&this.extendedElement.coreElement.text&&(this.textClone.style.fill=this.extendedElement.coreElement.getTextStyle().fill))}};var T0=class r{constructor(e){this.instances=e}setPinnedNodesFromState(){if(!this.instances.statePinnedNodes)return;let e=Object.fromEntries(Object.entries(this.instances.statePinnedNodes).filter(([i,s])=>!s.handled&&this.instances.nodesSet.extendedElementsMap.has(i))),t=Object.keys(e).length;for(let[i,s]of this.instances.nodesSet.extendedElementsMap)e.hasOwnProperty(i)&&(!s.isPinned||s.coreElement.x!==e[i].x||s.coreElement.y!==e[i].y)?this.pinNode(i,e[i].x,e[i].y,Math.min(.1*t,1)):!this.instances.statePinnedNodes.hasOwnProperty(i)&&s.isPinned&&this.unpinNode(i),this.instances.statePinnedNodes.hasOwnProperty(i)&&(this.instances.statePinnedNodes[i].handled=!0);Object.keys(e).length===0&&(this.instances.statePinnedNodes=null)}pinNode(e,t,i,s=.3){let n=this.instances.nodesSet.extendedElementsMap.get(e);if(!n)return;let o=n.coreElement;t!==void 0&&(o.x=t),i!==void 0&&(o.y=i),o.fx=o.x,o.fy=o.y,this.instances.nodesSet.instances.renderer.worker.postMessage({alpha:s,alphaTarget:0,run:!0,forceNode:{id:o.id,x:o.x,y:o.y}}),n.pin()}unpinNode(e){let t=this.instances.nodesSet.extendedElementsMap.get(e);if(!t)return;let i=t.coreElement;i.fx=null,i.fy=null,this.instances.nodesSet.instances.renderer.worker.postMessage({alpha:.3,alphaTarget:0,run:!0,forceNode:{id:i.id,x:null,y:null}}),r.lastDraggedPinnedNode===e&&(r.lastDraggedPinnedNode=null),t.unpin()}unpinAllNodes(){for(let[e,t]of this.instances.nodesSet.extendedElementsMap)t.isPinned&&this.unpinNode(e);this.instances.renderer.changed()}setLastDraggedPinnedNode(e){r.lastDraggedPinnedNode=e}pinLastDraggedPinnedNode(){r.lastDraggedPinnedNode&&(this.pinNode(r.lastDraggedPinnedNode),r.lastDraggedPinnedNode=null)}pinInShape(e,t){let i;switch(e.type){case"circle":i=new Kh(this.instances,e);break;case"grid":i=new Zh(this.instances,e);break;default:return}let n=new nr(t).getMatches().map(a=>a.path),o=[...this.instances.nodesSet.extendedElementsMap.values()].filter(a=>n.includes(a.id));i.pinNodes(o)}};var q7={circle:E.features.shapesNames.circle,grid:E.features.shapesNames.grid},Qh=class{constructor(e,t,i){this.type=t,this.data=i,this.pinner=new T0(e)}pinNodes(e){this.pinShape(e),this.pinner.instances.renderer.changed()}},Kh=class extends Qh{constructor(e,t){super(e,"circle",t)}pinShape(e){let t=e.length,i=Math.max(200,t*this.data.step/(2*Math.PI));for(let s=0;s<t;++s){let n=s*Math.PI*2/t,o=i*Math.cos(n)+this.data.center.x,a=i*Math.sin(n)+this.data.center.y;this.pinner.pinNode(e[s].id,o,a)}}},Zh=class extends Qh{constructor(e,t){super(e,"grid",t)}pinShape(e){let t=e.length,i=Math.ceil(Math.sqrt(t)),s=typeof this.data.columns=="string"?this.data.columns==="N"?t:i:this.data.columns??i,n=t/s;for(let o=0;o<t;++o){let a=Math.floor(o/s)-n/2,l=o%s-s/2,u=this.data.step*l+this.data.center.x,h=this.data.step*a+this.data.center.y;this.pinner.pinNode(e[o].id,u,h)}}};var K7=require("obsidian");var nl,Eo=class{constructor(e,t){this.extendedElementsMap=new Map;this.connectedIDs=new Set;this.disconnectedIDs={};this.typesMap={};I8(this,nl);this.managers=new Map;this.instances=e,k8(this,nl,t)}initializeManagers(e){for(let t of e)this.managers.has(t.name)||this.managers.set(t.name,t)}initializeTypesMap(){for(let e of this.managers.keys())this.typesMap.hasOwnProperty(e)||(this.typesMap[e]={})}load(e){this.initializeManagers(A8(this,nl)),this.initializeTypesMap();for(let i of this.managers.keys())this.addMissingInteractiveTypes(i);let t=this.addMissingElements(e);return t.size>0&&this.handleMissingElements(t),t}addMissingInteractiveTypes(e){if(!this.managers.has(e))return;let t=new Set,i=!1;for(let s of this.coreCollection){let n=this.getID(s);if(this.extendedElementsMap.has(n))continue;let o=this.getAbstractFile(s);i=!0;let a=new Set;if(s.type==="tag")e===Ue&&a.add(s.id.replace("#",""));else if(o&&o instanceof K7.TFile)a=this.getTypesFromFile(e,s,o),a.size===0&&a.add(this.instances.settings.interactiveSettings[e].noneType);else continue;this.addTypes(e,a,n,t)}return this.managers.get(e)?.addTypes(t),i}addTypes(e,t,i,s){let n=!1;for(let o of t)this.isTypeValid(e,o)&&(this.managers.get(e)?.interactives.has(o)||(s.add(o),this.typesMap[e].hasOwnProperty(o)||(this.typesMap[e][o]=new Set)),this.typesMap[e][o].add(i),n=!0);if(!n){let o=this.instances.settings.interactiveSettings[e].noneType;this.typesMap[e].hasOwnProperty(o)||(this.typesMap[e][o]=new Set),this.typesMap[e][o].add(i),this.managers.get(e)?.interactives.has(o)||s.add(o)}}addMissingElements(e){let t=new Set;for(let i of this.coreCollection){let s=this.getID(i);if(e&&e!==s)continue;let n=this.extendedElementsMap.get(s);n?n.setCoreElement(i):(t.add(s),this.createExtendedElement(i).init())}return t}handleMissingElements(e){}unload(){this.clearExtendedElements(),this.clearMaps()}clearExtendedElements(){this.extendedElementsMap.forEach(e=>{e.unload()})}clearMaps(){this.extendedElementsMap.clear(),this.connectedIDs.clear(),this.managers.clear()}getTypes(e,t){let s=[...Object.getOwnPropertyNames(this.typesMap[e])].filter(n=>this.typesMap[e][n]?.has(this.getID(t)));return new Set(s)}getElementsByTypes(e,t){let i=new Set;for(let s of t)this.typesMap[e][s]?.forEach(n=>{i.add(n)});return i}isTypeValid(e,t){return!(!this.instances.settings.interactiveSettings[e].unselected||this.instances.settings.interactiveSettings[e].unselected.includes(t)||$0.hasOwnProperty(e)&&[e].includes(t))}disableType(e,t){let i=[];for(let[s,n]of this.extendedElementsMap)n.getTypes(e).has(t)&&(n.disableType(e,t),n.isAnyManagerDisabled()&&i.push(s));return i}enableType(e,t){let i=[];for(let[s,n]of this.extendedElementsMap)n.getTypes(e).has(t)&&(n.enableType(e,t),n.isAnyManagerDisabled()||i.push(s));return i}disableElements(e,t){return new Set(e.filter(i=>this.disableElement(i,t)))}disableElement(e,t){let i=this.extendedElementsMap.get(e);return i?(this.disconnectedIDs[t].add(e),this.connectedIDs.delete(e),i.disable(),i.coreElement.clearGraphics(),this.coreCollection.remove(i.coreElement),!0):!1}enableElements(e,t){return new Set(e.filter(i=>this.enableElement(i,t)))}enableElement(e,t){let i=this.extendedElementsMap.get(e);return!i||(this.disconnectedIDs[t].delete(e),this.connectedIDs.add(e),!i.canBeAddedWithEngineOptions())?!1:(i.getCoreCollection().includes(i.coreElement)||i.getCoreCollection().push(i.coreElement),i.coreElement.initGraphics(),i.enable(),!0)}updateTypeColor(e,t,i){let s=this.getElementsByTypes(e,[t]);for(let n of s){let o=this.extendedElementsMap.get(n);if(!o)return;o.types.get(e)?.add(t),o.graphicsWrapper?.managerGraphicsMap?.get(e)?.updateValues()}}};nl=new WeakMap;var Z7=require("obsidian"),Q7=h0(require("path"));var Gd=class{constructor(e,t,i){this.nodes=[];this.path=e,this.folderStyle=t,this.color=i||Vl()}initGraphics(e){this.area=new p0,this.area.eventMode="none",this.initTextStyle(),this.text=new vr(e?this.path:Q7.default.basename(this.path),this.textStyle),this.area.addChild(this.text)}initTextStyle(){this.textStyle=new Z0({fontSize:this.folderStyle.textStyle.fontSize,fill:this.color,fontFamily:this.folderStyle.textStyle.textStyle.fontFamily,fontStyle:this.folderStyle.textStyle.textStyle.fontStyle,fontVariant:this.folderStyle.textStyle.textStyle.fontVariant,fontWeight:this.folderStyle.textStyle.textStyle.fontWeight,letterSpacing:this.folderStyle.textStyle.textStyle.letterSpacing,wordWrap:!0,wordWrapWidth:300,align:this.folderStyle.textStyle.align}),this.text&&(this.text.style=this.textStyle)}clearGraphics(){this.area.removeFromParent(),this.area.destroy(),this.text?.destroy()}updateGraphics(e){this.nodes.length>0?(this.draw(),this.placeText(e),this.text.visible=!0):(this.area.clear(),this.text.visible=!1)}addNode(e){this.nodes.includes(e)||this.nodes.push(e)}removeNode(e){this.nodes.remove(e)}draw(){this.computeBox(),this.drawBox()}drawBox(){this.area.clear(),this.area.lineStyle(this.folderStyle.borderWidth,this.color,this.folderStyle.strokeOpacity,1).beginFill(this.color,this.folderStyle.fillOpacity).drawRoundedRect(this.BBox.left,this.BBox.top,this.BBox.right-this.BBox.left,this.BBox.bottom-this.BBox.top,this.folderStyle.radius).endFill()}computeBox(){let e=this.nodes[0].x,t=this.nodes[0].x,i=this.nodes[0].y,s=this.nodes[0].y;for(let n of this.nodes)n.x<e?e=n.x:n.x>t&&(t=n.x),n.y<i?i=n.y:n.y>s&&(s=n.y);this.BBox={left:e-50-this.folderStyle.padding.left,right:t+50+this.folderStyle.padding.right,top:i-50-this.folderStyle.padding.top,bottom:s+50+this.folderStyle.padding.bottom}}placeText(e){let t=Math.min(e,5);switch(this.text.style.fontSize=this.folderStyle.textStyle.fontSize*t,this.text.style.letterSpacing=this.folderStyle.textStyle.textStyle.letterSpacing*t,this.folderStyle.textStyle.align){case"center":this.text.anchor.set(.5,0),this.text.x=this.BBox.left+.5*(this.BBox.right-this.BBox.left);break;case"left":this.text.anchor.set(0,0),this.text.x=this.BBox.left+this.folderStyle.padding.left;break;case"right":this.text.anchor.set(1,0),this.text.x=this.BBox.right-this.folderStyle.padding.right;break}this.text.y=this.BBox.top+this.folderStyle.padding.top,this.text.scale.set(1/t)}},Hl=class{constructor(e,t){this.foldersMap=new Map;this.instances=e,this.initializeManager(t)}initializeManager(e){this.managers=new Map;for(let t of e)this.managers.set(t.name,t)}load(){this.initGraphics(),this.addMissingFolders()}initGraphics(){if(!(this.container&&!this.container.destroyed)){this.container=new Je,this.container.name="Blobs",this.instances.renderer.hanger.addChildAt(this.container,0);for(let e of this.foldersMap.values())e.area.destroyed&&this.loadFolder(he,e.path)}}addMissingFolders(){for(let[e,t]of this.managers){let i=new Set;for(let s of this.instances.renderer.nodes){let n=Le(s.id);if(!n||this.foldersMap.has(n.path))continue;let o=r0(he,n);this.addInteractivesToSet(e,o,i)}t.addTypes(i)}}addInteractivesToSet(e,t,i){let s=this.managers.get(e);if(!s)return;let n=!1;for(let o of t)s.interactives.has(o)?n=!0:this.isFolderValid(o)&&(i.add(o),n=!0);!n&&!s.interactives.has(this.instances.settings.interactiveSettings[he].noneType)&&i.add(this.instances.settings.interactiveSettings[he].noneType)}isFolderValid(e){return!(this.instances.settings.interactiveSettings[he].unselected.includes(e)||$0[he].includes(e))}unload(){this.container.destroy({children:!0}),this.container.removeFromParent(),this.foldersMap.clear()}loadFolder(e,t){let i=this.managers.get(e),s=f.app.vault.getFolderByPath(t);if(s&&i){let n=this.foldersMap.get(t),o=!0;n?(n.area.destroyed||!n.area.parent)&&(o=!1,n.initGraphics(this.instances.settings.folderShowFullPath)):(o=!1,n=new Gd(t,this.instances.stylesData?.folder??Tt,i?Gi(i.getColor(t)):void 0),n.initGraphics(this.instances.settings.folderShowFullPath));let a=this.getNodesInFolder(s);for(let l of a)n.addNode(l);n.nodes.length>0&&(this.foldersMap.set(t,n),n.updateGraphics(this.instances.renderer.scale),o||this.container.addChild(n.area))}}getNodesInFolder(e){let t=[];for(let i of e.children)if(i instanceof Z7.TFolder)t.push(...this.getNodesInFolder(i));else{let s=this.instances.renderer.nodes.find(n=>n.id===i.path);s&&t.push(s)}return t}removeFolder(e){this.foldersMap.get(e)?.clearGraphics(),this.foldersMap.delete(e)}updateGraphics(){for(let[e,t]of this.foldersMap)t.updateGraphics(this.instances.renderer.scale)}updateColor(e,t){let i=this.managers.get(e),s=this.foldersMap.get(t);!s||!i||(s.color=Gi(i.getColor(t)),s.updateGraphics(this.instances.renderer.scale))}onCSSChange(){for(let e of this.foldersMap.values())e.folderStyle=this.instances.stylesData?.folder??Tt,e.initTextStyle()}hasMoreThanOneNode(e,t){let i=this.foldersMap.get(t);if(i)return i.nodes.length>1;let s=f.app.vault.getFolderByPath(t);return s?this.getNodesInFolder(s).length>1:!1}};var jl=class extends Eo{constructor(e,t){super(e,t),this.coreCollection=this.instances.renderer.links}createExtendedElement(e){let t=Dt(e),i=new Map;for(let[n,o]of this.managers)i.set(n,this.getTypes(n,e));let s=new oh(this.instances,e,i,[...this.managers.values()]);return this.extendedElementsMap.set(t,s),this.connectedIDs.add(t),s}getID(e){return Dt(e)}getTypesFromFile(e,t,i){return Bi(this.instances.settings,i).get(t.target.id)??new Set}getAbstractFile(e){return Le(e.source.id)}};var $l=class extends Eo{constructor(e,t){super(e,t),this.coreCollection=this.instances.renderer.nodes}handleMissingElements(e){this.applyBackgroundColor(e),this.loadAssets(e)}applyBackgroundColor(e){let t=Ur(this.instances.renderer);for(let i of e){let s=this.extendedElementsMap.get(i);!s||!s.graphicsWrapper||s.graphicsWrapper.updateOpacityLayerColor(t)}}loadAssets(e){if(!(!this.instances.settings.enableFeatures[this.instances.type].imagesFromProperty&&!this.instances.settings.enableFeatures[this.instances.type].imagesFromEmbeds&&!this.instances.settings.enableFeatures[this.instances.type].imagesForAttachments&&!this.instances.settings.enableFeatures[this.instances.type].icons))for(let t of e)this.getImageURI(t).then(i=>{i&&(i.type==="image"?yi.load(i.uri).then(s=>{this.initNodeImages(t,s)}):i.type==="icon"&&this.extendedElementsMap.get(t)?.graphicsWrapper?.initIcon())})}async getImageURI(e){let t=this.extendedElementsMap.get(e);if(!t||!t.graphicsWrapper)return null;let i=null;if(this.instances.settings.enableFeatures[this.instances.type].imagesFromProperty||this.instances.settings.enableFeatures[this.instances.type].imagesFromEmbeds||this.instances.settings.enableFeatures[this.instances.type].imagesForAttachments){if(this.instances.settings.enableFeatures[this.instances.type].imagesFromProperty&&(t.coreElement.type===""||t.coreElement.type==="focused")){for(let s of this.instances.settings.imageProperties)if(i=await bo.getImageUriFromProperty(s,e),i)break}if(!i&&this.instances.settings.enableFeatures[this.instances.type].imagesFromEmbeds&&(t.coreElement.type===""||t.coreElement.type==="focused")&&(i=await bo.getImageUriFromEmbeds(e)),this.instances.settings.enableFeatures[this.instances.type].imagesForAttachments&&t.coreElement.type==="attachment"&&(i=await bo.getImageUriForAttachment(e)),i)return{uri:i,type:"image"}}if(this.instances.settings.enableFeatures[this.instances.type].icons){let s=t.icon;if(s?.svg||s?.emoji)return{uri:"",type:"icon"}}return null}initNodeImages(e,t){let i=this.extendedElementsMap.get(e);if(!(!i||!i.graphicsWrapper)&&!(i.coreElement.type==="tag"||i.coreElement.type==="unresolved"))try{switch(i.coreElement.type){case"attachment":i.graphicsWrapper.initNodeImage(t);break;case"":case"focused":"initNodeImage"in i.graphicsWrapper&&i.graphicsWrapper.initNodeImage(t);break}}catch{}}createExtendedElement(e){let t=e.id,i=new Map;for(let[n,o]of this.managers)i.set(n,this.getTypes(n,e));let s;return e.type==="tag"?s=new Vh(this.instances,e,i,[...this.managers.values()]):e.type==="attachment"?s=new Lh(this.instances,e,i,[...this.managers.values()]):e.type==="unresolved"?s=new Wh(this.instances,e):s=new Gh(this.instances,e,i,[...this.managers.values()]),this.extendedElementsMap.set(t,s),this.connectedIDs.add(t),s}getID(e){return e.id}getTypesFromFile(e,t,i){return r0(e,i)}getAbstractFile(e){return Le(e.id)}resetArcs(e){if(this.instances.settings.enableFeatures[this.instances.type].tags)for(let[t,i]of this.extendedElementsMap)try{let s=this.managers.get(e);if(!s)continue;i.graphicsWrapper.resetManagerGraphics(s)}catch{}}updateOpacityLayerColor(){let e=Ur(this.instances.renderer);this.extendedElementsMap.forEach(t=>{t.graphicsWrapper?.updateOpacityLayerColor(e)})}onCSSChange(){let e=Ur(this.instances.renderer);this.extendedElementsMap.forEach(t=>{t.graphicsWrapper?.updateOpacityLayerColor(e),t.graphicsWrapper?.updateIconBackgroundLayerColor(e),t.extendedText.graphicsWrapper?.updateTextBackgroundColor(e),t.extendedText.updateTextStyle()})}emphasizeNode(e,t){if(!this.instances.settings.enableFeatures[this.instances.type].focus)return;let i=this.extendedElementsMap.get(e.path);!i||!i.graphicsWrapper||i.graphicsWrapper.pixiElement.scale.set(t?f.settings.focusScaleFactor:1)}isNodePinned(e){let t=this.instances.nodesSet.extendedElementsMap.get(e);if(t)return t.isPinned}};var Yd=h0(zd()),M3=h0(n3());var P3=h0(ec()),or=class r{constructor(){this.graphologyConnectedGraphs=new Map;this.graphologyGraph=new Yd.default;let e=f.app.vault.getFiles();for(let s of e)this.graphologyGraph.addNode(s.path);let t=f.app.metadataCache.resolvedLinks;for(let[s,n]of Object.entries(t)){let o=Object.keys(n);for(let a of o)this.graphologyGraph.addEdge(s,a)}let i=f.app.metadataCache.unresolvedLinks;for(let[s,n]of Object.entries(i))for(let[o,a]of Object.entries(n))this.graphologyGraph.hasNode(o)||this.graphologyGraph.addNode(o),this.graphologyGraph.addEdge(s,o)}static getInstance(){return r._instance||(r._instance=new r),r._instance}static getGraphology(){return r.getInstance().graphologyGraph}static getConnectedGraphology(e,t){let i=r.getInstance(),s=function(o,a,l){let u=o.neighbors(l);a.hasNode(l)||a.addNode(l);for(let h of u)a.hasNode(h)||a.addNode(h),a.addEdge(l,h)},n=new Yd.default;return(0,M3.dfsFromNode)(i.graphologyGraph,e,function(o,a,l){n&&s(i.graphologyGraph,n,o)}.bind(this)),t?(0,P3.reverse)(n):n}};var hn={default:E.plugin.default,"Adamic Adar":E.statsFunctions.AdamicAdar,BoW:E.statsFunctions.BoW,"Co-Citations":E.statsFunctions.coCitations,"Clustering Coefficient":E.statsFunctions.clusteringCoefficient,Jaccard:E.statsFunctions.Jaccard,"Otsuka-Ochiai":E.statsFunctions.OtsukaOchiai,Overlap:E.statsFunctions.overlap,Sentiment:E.statsFunctions.sentiment},Mi={default:!1,"Adamic Adar":!1,BoW:!0,"Co-Citations":!1,"Clustering Coefficient":!1,Jaccard:!1,"Otsuka-Ochiai":!0,Overlap:!1,Sentiment:!0},Pi=class{constructor(e,t){this.stat=e,this.g=t}async computeStats(e){this.statFunction=e,await this.getStats(),this.mapStat()}async getStats(){this.linksStats={};let e=this.g.edgeEntries();for(let t of e)this.linksStats[t.source]||(this.linksStats[t.source]={}),this.linksStats[t.source][t.target]={measure:await this.getStat(t),value:0}}async getStat(e){if(this.statFunction==="default")return 1;try{return(await this.g.algs[this.statFunction](e.source))[e.target].measure}catch{return NaN}}mapStat(){switch(this.stat){case"size":this.normalizeValues(.5,1.5),this.cleanNanAndInfiniteValues(1);break;case"color":this.normalizeValues(0,100),this.cleanNanAndInfiniteValues(50),Object.entries(this.linksStats).forEach(([e,t])=>{Object.entries(t).forEach(([i,{measure:s,value:n}])=>{this.linksStats[e][i].value=si(fn(f.settings.linksColorColormap,n/100))})});break;default:break}}normalizeValues(e,t){let i=this.getMeasures(),s=Math.min(...i),n=Math.max(...i);Object.entries(this.linksStats).forEach(([o,a])=>{Object.entries(a).forEach(([l,{measure:u,value:h}])=>{this.linksStats[o][l].value=(t-e)*(u-s)/(n-s)+e})})}getMeasures(){let e=[];return Object.entries(this.linksStats).forEach(([t,i])=>{e=e.concat(Object.values(i).map(({measure:s,value:n})=>s))}),e.filter(t=>isFinite(t)&&!isNaN(t))}cleanNanAndInfiniteValues(e){Object.entries(this.linksStats).forEach(([t,i])=>{Object.entries(i).forEach(([s,{measure:n,value:o}])=>{(!isFinite(o)||isNaN(o))&&(this.linksStats[t][s].value=e)})})}getWarning(){return""}getLink(){return""}};var cn={default:E.plugin.default,constant:E.statsFunctions.constant,backlinksCount:E.statsFunctions.backlinksCount,forwardlinksCount:E.statsFunctions.forwardlinksCount,forwardUniquelinksCount:E.statsFunctions.forwardUniquelinksCount,filenameLength:E.statsFunctions.filenameLength,tagsCount:E.statsFunctions.tagsCount,creationTime:E.statsFunctions.creationTime,modifiedTime:E.statsFunctions.modifiedTime,eccentricity:E.statsFunctions.eccentricity,betweenness:E.statsFunctions.betweenness,closeness:E.statsFunctions.closeness,degree:E.statsFunctions.degree,eigenvector:E.statsFunctions.eigenvector,hub:E.statsFunctions.hub,authority:E.statsFunctions.authority,topological:E.statsFunctions.topological},v0=class{constructor(e){this.stat=e}async computeStats(e){await this.getStats(e),this.mapStat()}async getStats(e){this.filesStats=new Map;let t=or.getInstance().graphologyGraph.nodes();for(let i of t)this.getStat(i,e).then(s=>this.filesStats.set(i,{measure:s,value:0}))}mapStat(){switch(this.stat){case"size":this.normalizeValues(.5,1.5),this.cleanNanAndInfiniteValues(1);break;case"color":this.normalizeValues(0,100),this.cleanNanAndInfiniteValues(50),this.filesStats.forEach(({measure:e,value:t},i)=>{this.filesStats.set(i,{measure:e,value:si(fn(f.settings.nodesColorColormap,t/100))})});break;default:break}}normalizeValues(e,t){let i=this.getMeasures(),s=Math.min(...i),n=Math.max(...i);this.filesStats.forEach(({measure:o,value:a},l)=>{this.filesStats.set(l,{measure:o,value:(t-e)*(o-s)/(n-s)+e})})}getMeasures(){return[...this.filesStats.values()].map(({measure:e,value:t})=>e).filter(e=>isFinite(e)&&!isNaN(e))}cleanNanAndInfiniteValues(e){this.filesStats.forEach(({measure:t,value:i},s)=>{(!isFinite(i)||isNaN(i))&&this.filesStats.set(s,{measure:t,value:e})})}getWarning(){return""}getLink(){return""}};var I5=h0(L3()),k5=h0(j3()),M5=h0(o5()),P5=h0(S5()),o8=h0(A5());var N5=h0(ec()),hs=class extends v0{constructor(e,t=""){super(e),this.link=t}async computeStats(e){return this.computeCentralityMap(e?(0,N5.reverse)(or.getGraphology()):or.getGraphology()),super.computeStats(e)}async getStat(e){return this.cm[e]}},cc=class extends hs{computeCentralityMap(e){this.cm=(0,I5.degreeCentrality)(e)}getLink(){return"https://en.wikipedia.org/wiki/Degree_(graph_theory)"}},dc=class extends hs{computeCentralityMap(e){this.cm=(0,k5.default)(e)}getLink(){return"https://en.wikipedia.org/wiki/Eigenvector_centrality"}},pc=class extends hs{computeCentralityMap(e){this.cm=(0,M5.default)(e)}getLink(){return"https://en.wikipedia.org/wiki/Closeness_centrality"}},fc=class extends hs{computeCentralityMap(e){this.cm=(0,P5.default)(e)}getLink(){return"https://en.wikipedia.org/wiki/Betweenness_centrality"}},gc=class extends hs{computeCentralityMap(e){let{hubs:t,authorities:i}=(0,o8.default)(e);this.cm=t}getLink(){return"https://en.wikipedia.org/wiki/HITS_algorithm"}},mc=class extends hs{computeCentralityMap(e){let{hubs:t,authorities:i}=(0,o8.default)(e);this.cm=i}getLink(){return"https://en.wikipedia.org/wiki/HITS_algorithm"}};var Ni=class{static getCalculator(e){switch(e==="size"?f.settings.nodesSizeFunction:f.settings.nodesColorFunction){case"constant":return new xc(e);case"backlinksCount":return new yc(e);case"forwardlinksCount":return new fl(e,!0);case"forwardUniquelinksCount":return new fl(e,!1);case"filenameLength":return new Ec(e);case"tagsCount":return new wc(e);case"creationTime":return new vc(e);case"modifiedTime":return new bc(e);case"eccentricity":return new Dc(e);case"closeness":return new pc(e);case"betweenness":return new fc(e);case"degree":return new cc(e);case"eigenvector":return new dc(e);case"hub":return new gc(e);case"authority":return new mc(e);case"topological":return new Sc(e);default:return}}};var yc=class extends v0{async getStat(e,t){let i=Le(e);if(i)if(t){let s=f.app.metadataCache.resolvedLinks[i.path];return s?Object.values(s).reduce((n,o,a,l)=>n+o,0):0}else return f.app.metadataCache.getBacklinksForFile(i).count();else{if(t)return 0;{let s=0;return Object.entries(f.app.metadataCache.unresolvedLinks).forEach(([n,o])=>{e in o&&(s+=o[e])}),s}}}};var xc=class extends v0{async getStat(e,t){return 1}};var vc=class extends v0{async getStat(e,t){return Le(e)?.stat.ctime||NaN}getWarning(){return E.statsFunctions.warningUnreliableOS}};var H5=h0(W5());var Dc=class extends v0{async getStat(e,t){let i=or.getConnectedGraphology(e,t);return(0,H5.default)(i,e)}getLink(){return"https://en.wikipedia.org/wiki/Closeness_centrality"}};var Ec=class extends v0{async getStat(e,t){return Le(e)?.basename.length||e.length}};var fl=class extends v0{constructor(e,t){super(e),this.countDuplicates=t}async getStat(e,t){let i=Le(e);if(i){if(t)return f.app.metadataCache.getBacklinksForFile(i).count();{let s=f.app.metadataCache.resolvedLinks[i.path];return s?this.countDuplicates?Object.values(s).reduce((n,o,a,l)=>n+o,0):Object.keys(s).length:0}}else if(t){let s=0;return Object.entries(f.app.metadataCache.unresolvedLinks).forEach(([n,o])=>{e in o&&(s+=this.countDuplicates?o[e]:1)}),s}else return 0}};var bc=class extends v0{async getStat(e,t){return Le(e)?.stat.mtime||NaN}getWarning(){return E.statsFunctions.warningUnreliableOS}};var wc=class extends v0{async getStat(e,t){let i=Le(e);return i?r0(Ue,i).size:0}};var rp=h0(Y5()),ip=h0(zd()),sp=h0(tp()),np=h0(ec()),Sc=class extends v0{constructor(){super(...arguments);this.topologicalWeights=new Map}async getStats(t){let i=t?(0,np.reverse)(or.getInstance().graphologyGraph):or.getInstance().graphologyGraph,s=(0,rp.stronglyConnectedComponents)(i),n=new ip.DirectedGraph;for(let[a,l]of s.entries()){let u=[];for(let h of l){let p=i.outNeighbors(h).map(m=>s.findIndex(x=>x.includes(m))).filter(m=>m!==-1&&m!==a);u.push(...p)}n.addNode(a.toString());for(let h of new Set(u))n.addEdge(a.toString(),h.toString())}let o=(0,sp.topologicalSort)(n);for(let a of o){let l=s[parseInt(a)],u=0;for(let h of l){let d=i.inNeighbors(h);for(let p of d)p!==h&&(u+=this.topologicalWeights.get(p)||0)}u+=1;for(let h of l)this.topologicalWeights.set(h,u)}return super.getStats(t)}async getStat(t,i){return this.topologicalWeights.get(t)||1}getLink(){return"https://en.wikipedia.org/wiki/Topological_sorting"}};var nr=class{constructor(e){this.queryData=e}getMatches(){return f.app.vault.getMarkdownFiles().filter(e=>this.doesMatch(e))}doesMatch(e){let t=this.queryData.rules.filter(i=>new Ci(i).isValid());if(t.length===0)return!1;switch(this.queryData.combinationLogic){case"AND":return t.every(i=>new Ci(i).doesMatch(e)??!1);case"OR":return t.some(i=>new Ci(i).doesMatch(e)??!1);default:break}return!1}toString(){let e="";for(let t=0;t<this.queryData.rules.length;++t){let i=new Ci(this.queryData.rules[t]).toString();i&&(e+=i,t!==this.queryData.rules.length-1&&(e+=" "+E.query[this.queryData.combinationLogic]+" "))}return e}};var h8={all:E.query.source.all,tag:E.query.source.tag,link:E.query.source.link,property:E.query.source.property,file:E.query.source.file,folder:E.query.source.folder,folderRec:E.query.source.folderRec,path:E.query.source.path},c8={contains:E.query.logicKey.contains,containsNot:E.query.logicKey.containsNot,is:E.query.logicKey.is,isNot:E.query.logicKey.isNot,containsRegex:E.query.logicKey.containsRegex,containsRegexNot:E.query.logicKey.containsRegexNot,matchesRegex:E.query.logicKey.matchesRegex,matchesRegexNot:E.query.logicKey.matchesRegexNot,isEmpty:E.query.logicKey.isEmpty,isEmptyNot:E.query.logicKey.isEmptyNot},Ci=class{constructor(e){this.source=e.source??"",this.property=e.property??"",this.value=e.value??"",this.logic=e.logic??""}getRecord(){return{source:this.source,property:this.property,value:this.value,logic:this.logic}}getMatches(){return f.app.vault.getMarkdownFiles().filter(e=>this.doesMatch(e))}doesMatch(e){if(!this.isValid())return null;let t=e.path;switch(this.source){case"all":return!0;case"tag":let i=r0(Ue,e);return this.checkLogic([...i]);case"link":let s=r0(de,e);return this.checkLogic([...s]);case"property":if(!this.property)break;let n=r0(this.property,e);return this.checkLogic([...n]);case"file":return this.checkLogic(e.basename);case"folder":return this.checkLogic(t);case"folderRec":let o=[],a=e.parent;for(;a;)o.push(a.path),a=a.parent;return this.checkLogic(o);case"path":return this.checkLogic(e.path);default:break}return!1}checkLogic(e){let t=Array.isArray(e),i=typeof e=="string",s=this.value;if(s.startsWith("\\b")||(s="\\b"+s),s.endsWith("\\b")||(s=s+"\\b"),t){let n=e;switch(this.logic){case"is":return n.length===1&&e[0]===this.value;case"isNot":return n.length===1&&e[0]!==this.value||n.length!==1;case"contains":return n.contains(this.value);case"containsNot":return!n.contains(this.value);case"matchesRegex":return n.length===1&&new RegExp(s).test(n[0]);case"matchesRegexNot":return n.length===1&&!new RegExp(s).test(n[0])||n.length!==1;case"containsRegex":return n.some(o=>new RegExp(this.value).test(o));case"containsRegexNot":return n.every(o=>!new RegExp(this.value).test(o));case"isEmpty":return n.length===0;case"isEmptyNot":return n.length>0;default:break}}else if(i){let n=e;switch(this.logic){case"is":return n===this.value;case"isNot":return n!==this.value;case"contains":return n.contains(this.value);case"containsNot":return!n.contains(this.value);case"matchesRegex":return new RegExp(s).test(n);case"matchesRegexNot":return!new RegExp(s).test(n);case"containsRegex":return new RegExp(this.value).test(n);case"containsRegexNot":return!new RegExp(this.value).test(n);case"isEmpty":return n==="";case"isEmptyNot":return n!=="";default:break}}return!1}isValid(){return this.source===""?!1:this.source==="all"?!0:!(this.source==="property"&&this.property===""||this.logic===""||this.value===""&&this.logic!=="isEmpty"&&this.logic!=="isEmptyNot")}toString(){if(!this.isValid())return null;let e=h8[this.source];return this.source==="all"||(this.source==="property"&&(e+=":"+this.property),e+=" "+c8[this.logic],e+=" "+this.value),e}};var aD={id:ii,name:"Vault (default)",engineOptions:new cr,toggleTypes:{}},Ht=0,Ti={enableFeatures:{graph:{"auto-enabled":!1,tags:!1,properties:!1,"property-key":!0,links:!1,linksSameColorAsNode:!1,folders:!1,imagesFromProperty:!1,imagesFromEmbeds:!1,imagesForAttachments:!1,focus:!0,shapes:!1,"elements-stats":!0,names:!1,icons:!1,arrows:!1},localgraph:{"auto-enabled":!1,tags:!1,properties:!1,"property-key":!1,links:!1,linksSameColorAsNode:!1,folders:!1,imagesFromProperty:!1,imagesFromEmbeds:!1,imagesForAttachments:!1,focus:!1,shapes:!1,"elements-stats":!1,names:!1,icons:!1,arrows:!1}},interactiveSettings:{},additionalProperties:{},backupGraphOptions:new cr,states:[aD],startingStateID:ii,openInNewTab:!1,imageProperties:["image"],borderFactor:.06,allowExternalImages:!1,allowExternalLocalImages:!1,nodesSizeProperties:[""],nodesSizeFunction:"default",nodesColorColormap:"YlOrRd",nodesColorFunction:"default",invertNodeStats:!1,linksSizeFunction:"default",linksColorColormap:"YlOrRd",linksColorFunction:"default",zoomFactor:2,maxNodes:20,delay:500,revertAction:!1,enableCSS:!1,cssSnippetFilename:"",shapeQueries:{circle:{combinationLogic:"AND",index:Ht++,rules:[]},square:{combinationLogic:"AND",index:Ht++,rules:[]},triangle:{combinationLogic:"AND",index:Ht++,rules:[]},diamond:{combinationLogic:"AND",index:Ht++,rules:[]},pentagon:{combinationLogic:"AND",index:Ht++,rules:[]},hexagon:{combinationLogic:"AND",index:Ht++,rules:[]},octagon:{combinationLogic:"AND",index:Ht++,rules:[]},decagon:{combinationLogic:"AND",index:Ht++,rules:[]},star4:{combinationLogic:"AND",index:Ht++,rules:[]},star5:{combinationLogic:"AND",index:Ht++,rules:[]},star6:{combinationLogic:"AND",index:Ht++,rules:[]},star8:{combinationLogic:"AND",index:Ht++,rules:[]},star10:{combinationLogic:"AND",index:Ht++,rules:[]}},fadeOnDisable:!1,focusScaleFactor:1.8,borderUnresolved:"",spreadArcs:!1,weightArcs:!1,animateDotsOnLinks:!1,animationSpeedForDots:1,allowMultipleLinkTypes:!1,disableSource:!1,disableTarget:!1,excludedSourcesFolder:[],excludedTargetsFolder:[],curvedLinks:!1,outlineLinks:!1,folderRadius:50,folderShowFullPath:!0,invertArrows:!1,flatArrows:!1,opaqueArrowsButKeepFading:!1,alwaysOpaqueArrows:!1,arrowScale:1,arrowFixedSize:!1,arrowColorBool:!1,arrowColor:"",numberOfCharacters:null,showOnlyFileName:!1,noExtension:!1,usePropertiesForName:[],addBackgroundToName:!1,nameVerticalOffset:0,dynamicVerticalOffset:!1,showNamesWhenNeighborHighlighted:!1,iconProperties:[""],usePluginForIcon:!0,usePluginForIconColor:!0,useParentIcon:!1,horizontalLegend:!1,useRadialMenu:!1,collapseState:!0,collapseLegend:!0,resetAfterChanges:!1,collapsedSettings:{},exportSVGOptions:{asImage:!0,onlyVisibleArea:!1,showNodeNames:!0,useCurvedLinks:!1,useModifiedArrows:!0,useNodesShapes:!1,showArcs:!1,showFolders:!0,useModifiedNames:!0,showIcons:!1},multipleNodesData:{}},tr=class r{static needToChangeLinkColor(e){return!!(e.settings.enableFeatures[e.type].links&&e.settings.interactiveSettings[de].showOnGraph||e.settings.enableFeatures[e.type]["elements-stats"]&&e.settings.linksColorFunction!=="default"||e.settings.enableFeatures[e.type].linksSameColorAsNode)}static needToChangeArrowColor(e){return r.needToChangeLinkColor(e)||e.settings.enableFeatures[e.type].arrows&&e.settings.arrowColorBool&&e.settings.arrowColor!=""}static needToChangeArrowScale(e){return!!(e.settings.enableFeatures[e.type].arrows&&(e.settings.arrowScale!==1||e.settings.arrowFixedSize))}static needToChangeArrowAlpha(e){return!!(e.settings.enableFeatures[e.type].arrows&&e.settings.alwaysOpaqueArrows)}static needToChangeArrowRotation(e){return!!(e.settings.enableFeatures[e.type].arrows&&e.settings.invertArrows)}static needToChangeArrow(e){return r.needToChangeArrowRotation(e)||r.needToChangeArrowScale(e)||r.needToChangeArrowColor(e)||r.needToChangeArrowAlpha(e)}static needReload(e,t){let i=f.settings,s=e.enableFeatures[t],n=i.enableFeatures[t],o=p=>JSON.stringify(e[p])===JSON.stringify(i[p]);if(s.tags!==n.tags||n.tags&&!Co(e.interactiveSettings[Ue],i.interactiveSettings[Ue])||s.links!==n.links||n.links&&!Co(e.interactiveSettings[de],i.interactiveSettings[de])||s.folders!==n.folders||n.folders&&!Co(e.interactiveSettings[he],i.interactiveSettings[he])||s.properties!==n.properties)return!0;let a=Object.keys(Object.fromEntries(Object.entries(e.additionalProperties).filter(p=>p[1][t]))),l=Object.keys(Object.fromEntries(Object.entries(i.additionalProperties).filter(p=>p[1][t])));if(!Co(a,l))return!0;let u=a.map(p=>e.interactiveSettings[p]),h=l.map(p=>i.interactiveSettings[p]);if(!Co(u,h)||n.links&&["excludedSourcesFolder","excludedTargetsFolder","curvedLinks","disableSource","disableTarget","outlineLinks"].some(p=>!o(p))||n.folders&&["folderRadius"].some(p=>!o(p)))return!0;let d=["imagesForAttachments","imagesFromEmbeds","imagesFromProperty"];return!!(d.some(p=>s[p]!==n[p])||n.imagesFromProperty&&!o("imageProperties")||d.some(p=>n[p])&&["borderFactor","allowExternalImages","allowExternalLocalImages"].some(p=>!o(p))||n["elements-stats"]!==s["elements-stats"]||n["elements-stats"]&&["nodesSizeProperties","nodesSizeFunction","linksSizeFunction"].some(p=>!o(p))||n.shapes!==s.shapes||n.shapes&&!o("shapeQueries")||n.arrows!==s.arrows||n.arrows&&["invertArrows","flatArrows","opaqueArrowsButKeepFading","alwaysOpaqueArrows","arrowScale","arrowColorBool","arrowColor","arrowFixedSize"].some(p=>!o(p))||n.names!==s.names||n.names&&(["numberOfCharacters","showOnlyFileName","noExtension","usePropertiesForName","addBackgroundToName","dynamicVerticalOffset","showNamesWhenNeighborHighlighted"].some(p=>!o(p))||!e.dynamicVerticalOffset&&!i.dynamicVerticalOffset&&!o("nameVerticalOffset"))||n.icons!==s.icons||n.arrows&&(["iconProperties","usePluginForIcon"].some(p=>!o(p))||e.usePluginForIcon&&i.usePluginForIcon&&["usePluginForIconColor","useParentIcon"].some(p=>!o(p)))||s.linksSameColorAsNode!==n.linksSameColorAsNode||["fadeOnDisable","borderUnresolved","spreadArcs","weightArcs","animateDotsOnLinks","animationSpeedForDots"].some(p=>!o(p))||["openInNewTab"].some(p=>!o(p)))}};function Co(r,e){let t=Object.keys,i=typeof r;return r&&e&&i==="object"&&i===typeof e?t(r).length===t(e).length&&t(r).every(n=>Co(r[n],e[n])):r===e}var Ic=require("obsidian");var Ac=class extends Ic.PluginSettingTab{constructor(t){super(f.app,t);this.sections=[];this.sections.push(new Mc(this)),this.sections.push(new Wc(this)),this.sections.push(new Hc(this)),this.sections.push(new jc(this)),this.sections.push(new kc(this)),this.sections.push(new $c(this)),this.sections.push(new Oc(this)),this.sections.push(new Lc(this)),this.sections.push(new Rc(this)),this.sections.push(new Vc(this)),this.sections.push(new Bc(this)),this.sections.push(new Gc(this)),this.sections.push(new zc(this)),this.sections.push(new Nc(this)),this.sections.push(new Uc(this)),this.sections.push(new Pc(this))}display(){this.originalSettings=structuredClone(f.settings),this.containerEl.empty(),this.containerEl.addClass("extended-graph-settings"),this.addNav(),this.addDisableNodes();for(let t of this.sections)t.display()}addNav(){let i=this.containerEl.createDiv({cls:"extended-graph-nav-settings"}).createDiv({cls:"nav-label"});i.innerText="Go to"}addDisableNodes(){new Ic.Setting(this.containerEl).setName(E.features.disableNodes).setDesc(E.features.disableNodesDesc).addToggle(t=>{t.setValue(!f.settings.fadeOnDisable),t.onChange(i=>{f.settings.fadeOnDisable=!i,f.plugin.saveSettings()})})}hide(){f.graphsManager&&f.settings.resetAfterChanges&&(tr.needReload(this.originalSettings,"graph")&&f.graphsManager.resetAllPlugins("graph"),tr.needReload(this.originalSettings,"localgraph")&&f.graphsManager.resetAllPlugins("localgraph")),super.hide()}};var Zs=require("obsidian");var st=class{constructor(e,t,i,s,n){this.elementsBody=[];this.itemClasses=[];this.isCollapsed=!1;this.settingTab=e,this.containerEl=e.containerEl,this.id=t,this.title=i,this.icon=s,this.description=n,this.itemClasses.push(`setting-${this.id}`)}display(){this.addHeader(),this.addBody(),this.addToNav(),this.id!="property-key"&&(!(this.id in f.settings.collapsedSettings)||f.settings.collapsedSettings[this.id])&&this.collapse(),this.elementsBody.forEach(e=>{e.addClasses(this.itemClasses)})}addHeader(){this.settingHeader=new Zs.Setting(this.containerEl).setName(this.title).setHeading(),this.icon&&this.icon!==""&&this.settingHeader.then(e=>{let t=createDiv();e.settingEl.prepend(t),this.icon&&(0,Zs.setIcon)(t,this.icon)}),this.foldIcon=new Zs.ExtraButtonComponent(this.settingHeader.nameEl).setIcon("chevron-right").onClick(()=>{this.isCollapsed?this.expand():this.collapse()}).then(e=>{e.extraSettingsEl.addClass("setting-header-fold-icon")}),this.settingHeader.setDesc(this.description),this.settingHeader.settingEl.addClasses(this.itemClasses)}addToNav(){if(this.icon==="")return;let e=this.settingTab.containerEl.querySelector(".extended-graph-nav-settings");if(!e)return;new Zs.ExtraButtonComponent(e).setIcon(this.icon).onClick(()=>{this.settingHeader.settingEl.scrollIntoView()}).setTooltip(this.title)}collapse(){this.isCollapsed=!0,this.settingHeader.settingEl.addClass("is-collapsed"),f.settings.collapsedSettings[this.id]=!0,f.plugin.saveSettings(),this.onCollapse()}expand(){this.isCollapsed=!1,this.settingHeader.settingEl.removeClass("is-collapsed"),f.settings.collapsedSettings[this.id]=!1,f.plugin.saveSettings(),this.onExpand()}onCollapse(){}onExpand(){}};var op=require("obsidian");var U0=class extends st{constructor(t,i,s,n,o,a){super(t,i,n,o,a);this.toggles={};this.feature=i,this.interactiveKey=s,s!==""&&this.itemClasses.push(`setting-${this.feature}-${Yc(s)}`)}addHeader(){super.addHeader(),this.addToggle("graph"),this.addToggle("localgraph")}addToggle(t){let i=f.settings.enableFeatures[t][this.feature];this.feature==="property-key"&&(i=f.settings.additionalProperties[this.interactiveKey][t]);let s=this.settingHeader.controlEl.createDiv();s.addClass("toggle-labelled"),s.insertAdjacentText("afterbegin",yl[t]),new op.ToggleComponent(s).setValue(i).onChange(n=>{this.toggle(t,n)}),this.toggles[t]=s,this.toggle(t,i)}toggle(t,i){this.feature==="property-key"?f.settings.additionalProperties[this.interactiveKey][t]=i:f.settings.enableFeatures[t][this.feature]=i,f.plugin.saveSettings()}};var Qs=require("obsidian");var kc=class extends U0{constructor(e){super(e,"arrows","",E.features.arrows,"mouse-pointer-2",E.features.arrowsDesc)}addBody(){this.addInvertArrows(),this.addFlatArrows(),this.addOpaqueArrows(),this.addScaleArrow(),this.addColorArrow()}addInvertArrows(){this.elementsBody.push(new Qs.Setting(this.settingTab.containerEl).setName(E.features.arrowsInvert).setDesc(E.features.arrowsInvertDesc).addToggle(e=>{e.setValue(f.settings.invertArrows),e.onChange(t=>{f.settings.invertArrows=t,f.plugin.saveSettings()})}).settingEl)}addFlatArrows(){this.elementsBody.push(new Qs.Setting(this.settingTab.containerEl).setName(E.features.arrowsFlat).setDesc(E.features.arrowsFlatDesc).addToggle(e=>{e.setValue(f.settings.flatArrows),e.onChange(t=>{f.settings.flatArrows=t,f.plugin.saveSettings()})}).settingEl)}addOpaqueArrows(){this.elementsBody.push(new Qs.Setting(this.settingTab.containerEl).setName(E.features.arrowsOpaque).setDesc(E.features.arrowsOpaqueDesc).addToggle(e=>{e.toggleEl.insertAdjacentText("beforebegin",E.features.arrowsOpaqueKeepFading),e.setValue(f.settings.opaqueArrowsButKeepFading),e.onChange(t=>{f.settings.opaqueArrowsButKeepFading=t,f.plugin.saveSettings()})}).addToggle(e=>{e.toggleEl.insertAdjacentText("beforebegin",E.features.arrowsOpaqueAlways),e.setValue(f.settings.alwaysOpaqueArrows),e.onChange(t=>{f.settings.alwaysOpaqueArrows=t,f.plugin.saveSettings()})}).settingEl)}addScaleArrow(){this.elementsBody.push(new Qs.Setting(this.settingTab.containerEl).setName(E.features.arrowsScale).setDesc(E.features.arrowsScaleDesc).addText(e=>{e.setValue(f.settings.arrowScale.toString()).onChange(async t=>{t===""&&(f.settings.arrowScale=1,await f.plugin.saveSettings());let i=parseFloat(t);isNaN(i)||(f.settings.arrowScale=Math.max(.1,i),await f.plugin.saveSettings())})}).settingEl),this.elementsBody.push(new Qs.Setting(this.settingTab.containerEl).setName(E.features.arrowsFixedSize).setDesc(E.features.arrowsFixedSizeDesc).addToggle(e=>{e.setValue(f.settings.arrowFixedSize),e.onChange(t=>{f.settings.arrowFixedSize=t,f.plugin.saveSettings()})}).settingEl)}addColorArrow(){this.elementsBody.push(new Qs.Setting(this.settingTab.containerEl).setName(E.features.arrowsColor).setDesc(E.features.arrowsColorDesc).addToggle(e=>{e.setValue(f.settings.arrowColorBool),e.onChange(t=>{f.settings.arrowColorBool=t,f.plugin.saveSettings()})}).addColorPicker(e=>{e.setValue(f.settings.arrowColor),e.onChange(t=>{f.settings.arrowColor=t,f.plugin.saveSettings()})}).settingEl)}};var Xc=require("obsidian");var Mc=class extends st{constructor(e){super(e,"automation",E.features.automation,"workflow","")}addBody(){this.addAutoEnable(),this.addStartingState(),this.addOpenInNewTab(),this.addResetAfterChanges()}addAutoEnable(){this.elementsBody.push(new $r(this.containerEl,E.features.autoEnable,E.features.autoEnableDesc,"auto-enabled").settingEl)}addStartingState(){this.elementsBody.push(new Xc.Setting(this.containerEl).setName(E.states.startingState).setDesc(E.states.startingStateDesc).addDropdown(e=>{e.addOptions(Object.fromEntries(Object.values(f.settings.states).map(t=>[t.id,t.name]))),e.setValue(f.settings.startingStateID),e.onChange(t=>{f.settings.startingStateID=t,f.plugin.saveSettings()})}).settingEl)}addOpenInNewTab(){this.elementsBody.push(new Xc.Setting(this.containerEl).setName(E.features.openInNewTab).setDesc(E.features.openInNewTabDesc).addToggle(e=>{e.setValue(f.settings.openInNewTab),e.onChange(t=>{f.settings.openInNewTab=t,f.plugin.saveSettings()})}).settingEl)}addResetAfterChanges(){this.elementsBody.push(new Xc.Setting(this.containerEl).setName(E.features.autoReset).setDesc(E.features.autoResetDesc).addToggle(e=>{e.setValue(f.settings.resetAfterChanges),e.onChange(t=>{f.settings.resetAfterChanges=t,f.plugin.saveSettings()})}).settingEl)}};var qc=require("obsidian");var Pc=class extends st{constructor(e){super(e,"beta",E.beta.beta,"hourglass","")}addBody(){this.addRevertAction(),this.addEnableCSS(),this.addRadialMenu()}addRevertAction(){let e=new qc.Setting(this.settingTab.containerEl).setName(E.beta.revertAction).setDesc(E.beta.revertActionDesc).addToggle(t=>t.setValue(f.settings.revertAction).onChange(async i=>{f.settings.revertAction=i,await f.plugin.saveSettings()}));this.elementsBody.push(e.settingEl)}addEnableCSS(){let e=new qc.Setting(this.settingTab.containerEl).setName(E.beta.enableCSS).setDesc(E.beta.enableCSSDesc).addToggle(t=>t.setValue(f.settings.enableCSS).onChange(i=>{f.settings.enableCSS=i,f.plugin.saveSettings()})).addSearch(t=>{new Kc(t.inputEl,i=>{f.settings.cssSnippetFilename=i,f.plugin.saveSettings()})});this.elementsBody.push(e.settingEl)}addRadialMenu(){let e=new qc.Setting(this.settingTab.containerEl).setName(E.beta.radialMenu).setDesc(E.beta.radialMenuDesc).addToggle(t=>t.setValue(f.settings.useRadialMenu).onChange(async i=>{f.settings.useRadialMenu=i,await f.plugin.saveSettings()}));this.elementsBody.push(e.settingEl)}};var Js=require("obsidian");var Nc=class extends st{constructor(e){super(e,"display",E.features.otherDisplay,"monitor","")}addBody(){this.addBorderUnresolved(),this.addLinkSameColorAsNodes(),this.addSpreadArcs(),this.addWeightArcs(),this.addAnimateDotsOnLinks(),this.addAnimationSpeedForDot(),this.addHorizontalLegend()}addBorderUnresolved(){this.elementsBody.push(new Js.Setting(this.containerEl).setName(E.features.borderUnresolved).setDesc(E.features.borderUnresolvedDesc).addText(e=>e.setValue(f.settings.borderUnresolved.toString()).onChange(async t=>{t===""&&(f.settings.borderUnresolved="",await f.plugin.saveSettings());let i=parseFloat(t);isNaN(i)||(f.settings.borderUnresolved=Math.clamp(i,0,1),await f.plugin.saveSettings())})).settingEl)}addLinkSameColorAsNodes(){this.elementsBody.push(new $r(this.containerEl,E.features.linksSameColorAsNode,E.features.linksSameColorAsNodeDesc,"linksSameColorAsNode").settingEl)}addSpreadArcs(){this.elementsBody.push(new Js.Setting(this.containerEl).setName(E.features.interactives.arcsSpread).setDesc(E.features.interactives.arcsSpreadDesc).addToggle(e=>{e.setValue(f.settings.spreadArcs||!1),e.onChange(t=>{f.settings.spreadArcs=t,f.plugin.saveSettings()})}).settingEl)}addWeightArcs(){this.elementsBody.push(new Js.Setting(this.containerEl).setName(E.features.interactives.arcWeight).setDesc(E.features.interactives.arcWeightDesc).addToggle(e=>{e.setValue(f.settings.weightArcs||!1),e.onChange(t=>{f.settings.weightArcs=t,f.plugin.saveSettings()})}).settingEl)}addAnimateDotsOnLinks(){this.elementsBody.push(new Js.Setting(this.containerEl).setName(E.features.animateDotsOnLinks).setDesc(E.features.animateDotsOnLinksDesc).addToggle(e=>{e.setValue(f.settings.animateDotsOnLinks||!1),e.onChange(t=>{f.settings.animateDotsOnLinks=t,f.plugin.saveSettings()})}).settingEl)}addAnimationSpeedForDot(){this.elementsBody.push(new Js.Setting(this.containerEl).setName(E.features.animateDotsOnLinksSpeed).setDesc(E.features.animateDotsOnLinksSpeedDesc).addText(e=>e.setValue(f.settings.animationSpeedForDots.toString()).onChange(async t=>{let i=parseFloat(t);!isNaN(i)&&i>0&&(f.settings.animationSpeedForDots=i,await f.plugin.saveSettings())})).settingEl)}addHorizontalLegend(){this.elementsBody.push(new Js.Setting(this.containerEl).setName(E.UI.horizontalLegend).setDesc(E.UI.horizontalLegendDesc).addToggle(e=>{e.setValue(f.settings.horizontalLegend),e.onChange(t=>{f.settings.horizontalLegend=t,f.plugin.saveSettings()})}).settingEl)}};var ar=require("obsidian");var cs=require("obsidian");var Yr=class extends cs.Modal{constructor(t,i,s){super(f.app);this.inputs=[];this.properties=s,this.addText=i,this.setTitle(t),this.modalEl.addClass("graph-modal-setting-properties")}onOpen(){this.addAddButton(),this.loadProperties()}addAddButton(){this.contentEl.createSpan().textContent=this.addText;let t=new cs.ButtonComponent(this.contentEl).onClick(()=>{this.addProperty("")});a0.setupButton(t,"add")}loadProperties(){this.propertiesDiv=this.contentEl.createDiv("properties-list");for(let t of this.properties)this.addProperty(t)}addProperty(t){let i=this.propertiesDiv.createDiv("property-value"),s=t,n=new cs.SearchComponent(i).setValue(t).onChange(a=>{this.renameProperty(s,a)&&(s=a)});new To(n.inputEl,a=>{this.renameProperty(s,a)&&(s=a)}),this.inputs.push(n);let o=new cs.ExtraButtonComponent(i).onClick(()=>{this.deleteProperty(i,n)});a0.setupExtraButton(o,"delete")}deleteProperty(t,i){this.inputs.remove(i),this.properties.remove(i.getValue()),t.remove(),f.plugin.saveSettings()}renameProperty(t,i){return Fo(i)&&!this.properties.contains(i)&&i!==t?(this.properties.remove(t),this.properties.push(i),f.plugin.saveSettings(),!0):!1}onClose(){this.contentEl.empty()}};var Bc=class extends U0{constructor(e){super(e,"elements-stats","",E.features.elementsStats,"chart-pie",E.features.elementsStatsDesc)}addBody(){this.addNodeSizeProperties(),this.addNodeSizeFunction(),this.addNodeSizeWarning(),this.addNodeColorFunction(),this.addNodeColorWarning(),this.addColorPaletteSettingForNodes(),this.addInvertNodeStats(),f.graphsManager?.getGraphAnalysis()["graph-analysis"]&&(this.addLinkSizeFunction(),this.addLinkColorFunction(),this.addColorPaletteSettingForLinks())}addNodeSizeProperties(){let e=new ar.Setting(this.settingTab.containerEl).setName(E.features.nodeSizeProperties).setDesc(E.features.nodeSizePropertiesDesc).addExtraButton(t=>{t.setIcon("mouse-pointer-click"),t.onClick(()=>{new Yr(E.features.nodeSizeProperties,E.features.nodeSizePropertiesAdd,f.settings.nodesSizeProperties).open()})});this.elementsBody.push(e.settingEl)}addNodeSizeFunction(){let e=new ar.Setting(this.settingTab.containerEl).setName(E.features.nodeSizesFunction).setDesc(E.features.nodeSizesFunctionDesc).addDropdown(t=>{t.addOptions(cn),t.setValue(f.settings.nodesSizeFunction),t.onChange(i=>{this.recomputeNodesSizes(i,f.settings.invertNodeStats)})});this.elementsBody.push(e.settingEl)}addNodeSizeWarning(){let e=new ar.Setting(this.settingTab.containerEl).setClass("setting-warning").then(t=>{(0,ar.setIcon)(t.nameEl,"triangle-alert")});this.elementsBody.push(e.settingEl),this.warningNodeSizeSetting=e,this.setWarning(e,f.graphsManager?.nodesSizeCalculator?.getWarning())}addNodeColorFunction(){let e=new ar.Setting(this.settingTab.containerEl).setName(E.features.nodeColorsFunction).setDesc(E.features.nodeColorsFunctionDesc).addDropdown(t=>{t.addOptions(cn),t.setValue(f.settings.nodesColorFunction),t.onChange(i=>{this.recomputeNodeColors(i,f.settings.invertNodeStats)})});this.elementsBody.push(e.settingEl)}addNodeColorWarning(){let e=new ar.Setting(this.settingTab.containerEl).setClass("setting-warning").then(t=>{(0,ar.setIcon)(t.nameEl,"triangle-alert")});this.elementsBody.push(e.settingEl),this.warningNodeColorSetting=e,this.setWarning(e,f.graphsManager?.nodesColorCalculator?.getWarning())}addInvertNodeStats(){let e=new ar.Setting(this.settingTab.containerEl).setName(E.features.nodeStatsInvert).setDesc(E.features.nodeStatsInvertDesc).addToggle(t=>{t.setValue(f.settings.invertNodeStats),t.onChange(i=>{this.recomputeNodesSizes(f.settings.nodesSizeFunction,i),this.recomputeNodeColors(f.settings.nodesColorFunction,i)})});this.elementsBody.push(e.settingEl)}addColorPaletteSettingForNodes(){let e=new en(this.containerEl,"stats-colors-nodes").setDesc(E.features.nodeColorsPaletteDesc);e.setValue(f.settings.nodesColorColormap),e.onPaletteChange(t=>{f.settings.nodesColorColormap=t,f.plugin.saveSettings(),f.graphsManager.nodesColorCalculator?.mapStat(),f.graphsManager.updatePaletteForNodesStat()}),this.elementsBody.push(e.settingEl)}addLinkSizeFunction(){let e=new ar.Setting(this.settingTab.containerEl).setName(E.features.linkSizesFunction).setDesc(E.features.linkSizesFunctionDesc).addDropdown(t=>{this.linksSizeFunctionDropdown=t;let i=f.graphsManager?.getGraphAnalysis().nlp;t.addOptions(Object.fromEntries(Object.entries(hn).filter(s=>!Mi[s[0]]||i))),t.setValue(f.settings.linksSizeFunction),t.onChange(s=>{this.recomputeLinksSizes(s)})});this.elementsBody.push(e.settingEl)}addLinkColorFunction(){let e=new ar.Setting(this.settingTab.containerEl).setName(E.features.linkColorsFunction).setDesc(E.features.linkColorsFunctionDesc+" \u26A0\uFE0F "+E.features.linksFeatureRequired).addDropdown(t=>{this.linksColorFunctionDropdown=t;let i=f.graphsManager?.getGraphAnalysis().nlp;t.addOptions(Object.fromEntries(Object.entries(hn).filter(s=>!Mi[s[0]]||i))),t.setValue(f.settings.linksColorFunction),t.onChange(s=>{this.recomputeLinksColors(s)})});this.elementsBody.push(e.settingEl)}addColorPaletteSettingForLinks(){let e=new en(this.containerEl,"stats-colors-links").setDesc(E.features.linkColorsPaletteDesc);e.setValue(f.settings.linksColorColormap),e.onPaletteChange(t=>{f.settings.linksColorColormap=t,f.plugin.saveSettings(),f.graphsManager.linksColorCalculator?.mapStat(),f.graphsManager.updatePaletteForLinksStat()}),this.elementsBody.push(e.settingEl)}setWarning(e,t){t&&t!==""?(e.setDesc(t),e.settingEl.removeClass("is-hidden")):(e.setDesc(""),e.settingEl.addClass("is-hidden"))}recomputeNodesSizes(e,t){f.settings.nodesSizeFunction=e,f.settings.invertNodeStats=t,f.plugin.saveSettings(),f.graphsManager.nodesSizeCalculator=Ni.getCalculator("size"),f.graphsManager.nodesSizeCalculator?.computeStats(t).then(()=>{f.graphsManager.updateSizeFunctionForNodesStat()}),this.setWarning(this.warningNodeSizeSetting,f.graphsManager?.nodesSizeCalculator?.getWarning())}recomputeNodeColors(e,t){f.settings.nodesColorFunction=e,f.settings.invertNodeStats=t,f.graphsManager.nodesColorCalculator=Ni.getCalculator("color"),f.graphsManager.nodesColorCalculator?.computeStats(t).then(()=>{f.graphsManager.updatePaletteForNodesStat()}),this.setWarning(this.warningNodeColorSetting,f.graphsManager?.nodesColorCalculator?.getWarning()),f.plugin.saveSettings()}recomputeLinksSizes(e){let t=f.graphsManager.getGraphAnalysis();if(!t&&e!=="default")return;if(!t.nlp&&Mi[e]&&(new Notice(`${E.notices.nlpPluginRequired} (${e})`),e="default",this.linksSizeFunctionDropdown?.setValue(e)),f.settings.linksSizeFunction=e,f.plugin.saveSettings(),e==="default"){f.graphsManager.linksSizeCalculator=void 0,f.graphsManager.updateSizeFunctionForLinksStat();return}let i=f.app.plugins.getPlugin("graph-analysis");i&&(f.graphsManager.linksSizeCalculator||(f.graphsManager.linksSizeCalculator=new Pi("size",i.g)),f.graphsManager.linksSizeCalculator.computeStats(f.settings.linksSizeFunction).then(()=>{f.graphsManager.updateSizeFunctionForLinksStat()}))}recomputeLinksColors(e){let t=f.graphsManager.getGraphAnalysis();if(!t&&e!=="default")return;if(!t.nlp&&Mi[e]&&(new Notice(`${E.notices.nlpPluginRequired} (${e})`),e="default",this.linksColorFunctionDropdown?.setValue(e)),f.settings.linksColorFunction=e,f.plugin.saveSettings(),e==="default"){f.graphsManager.linksColorCalculator=void 0,f.graphsManager.updatePaletteForLinksStat();return}let i=f.app.plugins.getPlugin("graph-analysis");i&&(f.graphsManager.linksColorCalculator||(f.graphsManager.linksColorCalculator=new Pi("color",i.g)),f.graphsManager.linksColorCalculator.computeStats(f.settings.linksColorFunction).then(()=>{f.graphsManager.updatePaletteForLinksStat()}))}};var ap=require("obsidian");var Rc=class extends U0{constructor(t){super(t,"focus","",E.features.focus,"telescope",E.features.focusDesc);this.allTopElements=[]}addHeader(){super.addHeader(),this.toggles.localgraph?.remove()}addBody(){this.elementsBody.push(new ap.Setting(this.settingTab.containerEl).setName(E.features.focusScale).setDesc(E.features.focusScaleDesc).addText(t=>t.setValue(f.settings.focusScaleFactor.toString()).onChange(async i=>{let s=parseFloat(i);s&&(f.settings.focusScaleFactor=s,await f.plugin.saveSettings())})).settingEl)}};var xl=require("obsidian");var Lc=class extends U0{constructor(e){super(e,"icons","",E.features.icons,"origami",E.features.iconsDesc)}addBody(){this.addProperty(),this.addSupportForPlugins()}addProperty(){this.elementsBody.push(new xl.Setting(this.settingTab.containerEl).setName(E.features.iconProperties).setDesc(E.features.iconPropertiesDesc).addExtraButton(e=>{e.setIcon("mouse-pointer-click"),e.onClick(()=>{new Yr(E.features.iconProperties,E.features.iconPropertiesAdd,f.settings.iconProperties).open()})}).settingEl)}addSupportForPlugins(){this.elementsBody.push(new xl.Setting(this.settingTab.containerEl).setName(E.features.iconUsePlugin).setDesc(E.features.iconUsePluginDesc).addToggle(e=>{e.setValue(f.settings.usePluginForIcon),e.onChange(t=>{f.settings.usePluginForIcon=t,f.plugin.saveSettings(),this.colorSetting?.setVisibility(t),this.parentSetting?.setVisibility(t)})}).settingEl),this.colorSetting=new xl.Setting(this.settingTab.containerEl).setName(E.features.iconUsePluginColor).setDesc(E.features.iconUsePluginColorDesc).addToggle(e=>{e.setValue(f.settings.usePluginForIconColor),e.onChange(t=>{f.settings.usePluginForIconColor=t,f.plugin.saveSettings()})}),this.colorSetting?.setVisibility(f.settings.usePluginForIcon),this.elementsBody.push(this.colorSetting.settingEl),this.parentSetting=new xl.Setting(this.settingTab.containerEl).setName(E.features.iconUseParentIcon).setDesc(E.features.iconUseParentIconDesc).addToggle(e=>{e.setValue(f.settings.useParentIcon),e.onChange(t=>{f.settings.useParentIcon=t,f.plugin.saveSettings()})}),this.parentSetting?.setVisibility(f.settings.usePluginForIcon),this.elementsBody.push(this.parentSetting.settingEl)}};var vl=require("obsidian");var Oc=class extends st{constructor(e){super(e,"images",E.features.image,"image",E.features.imageDesc)}addBody(){this.addImagesFromProperties(),this.addImagesFromEmbeds(),this.addImagesForAttachments(),this.addBorderFactor(),this.addAllowExternal()}addImagesFromProperties(){this.elementsBody.push(new $r(this.settingTab.containerEl,E.features.imagesFromProperty,E.features.imagesFromPropertyDesc,"imagesFromProperty").settingEl),this.elementsBody.push(new vl.Setting(this.settingTab.containerEl).setName(E.features.imageProperties).setDesc(E.features.imagePropertiesDesc).addExtraButton(e=>{e.setIcon("mouse-pointer-click"),e.onClick(()=>{new Yr(E.features.imageProperties,E.features.imagePropertiesAdd,f.settings.imageProperties).open()})}).settingEl)}addImagesFromEmbeds(){this.elementsBody.push(new $r(this.settingTab.containerEl,E.features.imagesFromEmbeds,E.features.imagesFromEmbedsDesc,"imagesFromEmbeds").settingEl)}addImagesForAttachments(){this.elementsBody.push(new $r(this.settingTab.containerEl,E.features.imagesForAttachments,E.features.imagesForAttachmentsDesc,"imagesForAttachments").settingEl)}addBorderFactor(){let e=new vl.Setting(this.settingTab.containerEl).setName(E.features.imageBorderWidth).setDesc(E.features.imageBorderWidthDesc).addSlider(t=>{let i=document.createTextNode(f.settings.borderFactor.toString()+"%");i&&t.sliderEl.parentElement?.insertBefore(i,t.sliderEl),t.setLimits(0,50,1).setValue(f.settings.borderFactor*100).onChange(s=>{f.settings.borderFactor=s/100,i&&(i.textContent=f.settings.borderFactor.toString()+"%"),f.plugin.saveSettings()})});e.controlEl.addClass("setting-item-description"),this.elementsBody.push(e.settingEl)}addAllowExternal(){this.elementsBody.push(new vl.Setting(this.settingTab.containerEl).setName(E.features.imagesAllowExternal).setDesc(E.features.imagesAllowExternalDesc).addToggle(e=>{e.setValue(f.settings.allowExternalImages),e.onChange(t=>{f.settings.allowExternalImages=t,f.plugin.saveSettings()})}).settingEl),this.elementsBody.push(new vl.Setting(this.settingTab.containerEl).setName(E.features.imagesAllowExternalLocal).setDesc(E.features.imagesAllowExternalLocalDesc).addToggle(e=>{e.setValue(f.settings.allowExternalLocalImages),e.onChange(t=>{f.settings.allowExternalLocalImages=t,f.plugin.saveSettings()})}).settingEl)}};var Fi=require("obsidian");var Gc=class extends U0{constructor(e){super(e,"names","",E.features.names,"case-sensitive",E.features.namesDesc)}addBody(){this.addShowWhenNeighborHighlighted(),this.addNumberOfCharacters(),this.addOnlyFilename(),this.addNoExtension(),this.addUseProperty(),this.addBackground(),this.addDynamicVerticalOffset(),this.addVerticalOffset()}addNumberOfCharacters(){this.elementsBody.push(new Fi.Setting(this.settingTab.containerEl).setName(E.features.namesNumberOfCharacters).setDesc(E.features.namesNumberOfCharactersDesc).addText(e=>e.setValue(f.settings.numberOfCharacters?.toString()||"").onChange(async t=>{let i=parseInt(t);isNaN(i)?f.settings.numberOfCharacters=null:f.settings.numberOfCharacters=i,await f.plugin.saveSettings()})).settingEl)}addOnlyFilename(){this.elementsBody.push(new Fi.Setting(this.settingTab.containerEl).setName(E.features.namesShowOnlyFileName).setDesc(E.features.namesShowOnlyFileNameDesc).addToggle(e=>{e.setValue(f.settings.showOnlyFileName),e.onChange(t=>{f.settings.showOnlyFileName=t,f.plugin.saveSettings()})}).settingEl)}addNoExtension(){this.elementsBody.push(new Fi.Setting(this.settingTab.containerEl).setName(E.features.namesNoExtension).setDesc(E.features.namesNoExtensionDesc).addToggle(e=>{e.setValue(f.settings.noExtension),e.onChange(t=>{f.settings.noExtension=t,f.plugin.saveSettings()})}).settingEl)}addUseProperty(){this.elementsBody.push(new Fi.Setting(this.settingTab.containerEl).setName(E.features.namesUseProperties).setDesc(E.features.namesUsePropertiesDesc).addExtraButton(e=>{e.setIcon("mouse-pointer-click"),e.onClick(()=>{new Yr(E.features.namesUseProperties,E.features.namesUsePropertiesAdd,f.settings.usePropertiesForName).open()})}).settingEl)}addBackground(){this.elementsBody.push(new Fi.Setting(this.settingTab.containerEl).setName(E.features.namesBackground).setDesc(E.features.namesBackgroundDesc).addToggle(e=>{e.setValue(f.settings.addBackgroundToName),e.onChange(t=>{f.settings.addBackgroundToName=t,f.plugin.saveSettings()})}).settingEl)}addDynamicVerticalOffset(){this.elementsBody.push(new Fi.Setting(this.settingTab.containerEl).setName(E.features.namesDynamicVerticalOffset).setDesc(E.features.namesDynamicVerticalOffsetDesc).addToggle(e=>{e.setValue(f.settings.dynamicVerticalOffset),e.onChange(t=>{this.verticalOffset.setDisabled(t),f.settings.dynamicVerticalOffset=t,f.plugin.saveSettings()})}).settingEl)}addVerticalOffset(){this.verticalOffset=new Fi.Setting(this.settingTab.containerEl).setName(E.features.namesVerticalOffset).setDesc(E.features.namesVerticalOffsetDesc).addText(e=>{e.setValue(f.settings.nameVerticalOffset.toString()),e.onChange(t=>{let i=parseInt(t);f.settings.nameVerticalOffset=isNaN(i)?0:i,f.plugin.saveSettings()})}),this.verticalOffset.setDisabled(f.settings.dynamicVerticalOffset),this.elementsBody.push(this.verticalOffset.settingEl)}addShowWhenNeighborHighlighted(){this.elementsBody.push(new Fi.Setting(this.settingTab.containerEl).setName(E.features.namesShowWhenNeighborHighlighted).setDesc(E.features.namesShowWhenNeighborHighlightedDesc).addToggle(e=>{e.setValue(f.settings.showNamesWhenNeighborHighlighted),e.onChange(t=>{f.settings.showNamesWhenNeighborHighlighted=t,f.plugin.saveSettings()})}).settingEl)}};var d8=require("obsidian");var Uc=class extends st{constructor(e){super(e,"performances",E.features.performance,"cpu","")}addBody(){this.addDelay(),this.addNumberOfNodes()}addDelay(){let e=new d8.Setting(this.settingTab.containerEl).setName(E.features.performanceDelay).setDesc(E.features.performanceDelayDesc).addText(t=>t.setValue(f.settings.delay.toString()).onChange(async i=>{let s=parseInt(i);isNaN(s)||(f.settings.delay=s,await f.plugin.saveSettings())}));this.elementsBody.push(e.settingEl)}addNumberOfNodes(){let e=new d8.Setting(this.settingTab.containerEl).setName(E.features.performanceMaxNodes).setDesc(E.features.performanceMaxNodesDesc).addText(t=>t.setValue(f.settings.maxNodes.toString()).onChange(async i=>{let s=parseInt(i);isNaN(s)||(f.settings.maxNodes=s,await f.plugin.saveSettings())}));this.elementsBody.push(e.settingEl)}};var Dl=require("obsidian");var Vc=class extends U0{constructor(t){super(t,"shapes","",E.features.shapes,"shapes",E.features.shapesDesc);this.settingsShape=[]}addBody(){let t=Object.fromEntries(Object.entries(f.settings.shapeQueries).sort((s,n)=>(s[1].index??0)-(n[1].index??0))),i=Object.keys(t);for(let s of i){let n=this.addShape(s);this.elementsBody.push(n.settingEl),this.settingsShape.push(n)}}addShape(t){return new p8(this.settingTab.containerEl,t,this.moveDown.bind(this),this.moveUp.bind(this))}moveDown(t){let i=this.settingsShape.indexOf(t);if(i>=this.settingsShape.length-1)return;[this.settingsShape[i],this.settingsShape[i+1]]=[this.settingsShape[i+1],this.settingsShape[i]];let s=t.settingEl.nextSibling;this.settingTab.containerEl?.insertAfter(t.settingEl,s),f.settings.shapeQueries[t.shape].index=i+1,f.settings.shapeQueries[this.settingsShape[i].shape].index=i,f.plugin.saveSettings()}moveUp(t){let i=this.settingsShape.indexOf(t);if(i===0)return;[this.settingsShape[i],this.settingsShape[i-1]]=[this.settingsShape[i-1],this.settingsShape[i]];let s=t.settingEl.previousSibling;this.settingTab.containerEl?.insertBefore(t.settingEl,s),f.settings.shapeQueries[t.shape].index=i-1,f.settings.shapeQueries[this.settingsShape[i].shape].index=i,f.plugin.saveSettings()}},p8=class extends Dl.Setting{constructor(e,t,i,s){super(e),this.shape=t,this.moveDown=i,this.moveUp=s,this.setName(E.features.shapesNames[t]).addMoveButtons().addQueryStringDiv().addSVG().addEditButton()}addQueryStringDiv(){return this.queryStringDiv=this.controlEl.createDiv({cls:"query-string"}),this.setQueryText(this.shape,f.settings.shapeQueries[this.shape]),this}addSVG(){let e=Be.getSVG(this.shape);return e.addClass("shape-svg"),this.controlEl.appendChild(e),this}addEditButton(){return this.addExtraButton(e=>{e.setTooltip(E.query.editShapeQuery),e.onClick(()=>{new Zc(this.shape,f.settings.shapeQueries[this.shape],this.saveShapeQuery.bind(this)).open()})}),this}addMoveButtons(){let e=this.settingEl.createDiv({cls:"move-buttons"});return new Dl.ExtraButtonComponent(e).setIcon("chevron-up").setTooltip(E.controls.moveUp).onClick(()=>{this.moveUp(this)}),new Dl.ExtraButtonComponent(e).setIcon("chevron-down").setTooltip(E.controls.moveDown).onClick(()=>{this.moveDown(this)}),this.settingEl.insertAdjacentElement("afterbegin",e),this}setQueryText(e,t){this.queryStringDiv.setText(new nr(t).toString())}saveShapeQuery(e,t){this.setQueryText(e,t),f.settings.shapeQueries[e].combinationLogic=t.combinationLogic,f.settings.shapeQueries[e].rules=t.rules,f.plugin.saveSettings()}};var lp=require("obsidian");var zc=class extends st{constructor(e){super(e,"zoom",E.features.zoomOnNode,"scan-search","")}addBody(){let e=this.settingTab.containerEl,t=new lp.Setting(e).setName(E.features.zoomScale).setDesc(E.features.zoomScaleDesc).addSlider(i=>{let s=document.createTextNode(f.settings.zoomFactor.toString());s&&i.sliderEl.parentElement?.insertBefore(s,i.sliderEl),i.setLimits(0,8,.5).setValue(f.settings.zoomFactor).onChange(n=>{f.settings.zoomFactor=n,s&&(s.textContent=f.settings.zoomFactor.toString()),f.plugin.saveSettings()})});t.controlEl.addClass("setting-item-description"),this.elementsBody.push(t.settingEl)}};var tn=require("obsidian");var Xr=class extends U0{constructor(t,i,s,n,o,a){super(t,i,s,n,o,a);this.noneType="";this.colors=[]}addBody(){this.colors=[],this.addNoneTypeSetting(),this.addColorPaletteSetting(),this.addSpecificColorHeaderSetting(),f.settings.interactiveSettings[this.interactiveKey].colors.forEach(t=>{this.addColor(t.type,t.color)}),this.addFilterTypeSetting()}addNoneTypeSetting(){this.noneType=f.settings.interactiveSettings[this.interactiveKey].noneType;let t=new tn.Setting(this.containerEl).setName(E.features.interactives.noneTypeID).setDesc(E.features.interactives.noneTypeIDDesc+this.interactiveKey).addText(i=>i.setValue(f.settings.interactiveSettings[this.interactiveKey].noneType).onChange(async s=>{s=s.trim(),s!=this.noneType&&(f.settings.interactiveSettings[this.interactiveKey].noneType=s,this.noneType=s,await f.plugin.saveSettings())}));this.elementsBody.push(t.settingEl)}addColorPaletteSetting(){let t=new en(this.containerEl,this.interactiveKey).setDesc(E.features.interactives.paletteDesc+this.interactiveKey);t.setValue(f.settings.interactiveSettings[this.interactiveKey].colormap),t.onPaletteChange(i=>{f.settings.interactiveSettings[this.interactiveKey].colormap=i,f.plugin.app.workspace.trigger("extended-graph:settings-colorpalette-changed",this.interactiveKey),f.plugin.saveSettings()}),this.elementsBody.push(t.settingEl)}addSpecificColorHeaderSetting(){this.settingInteractiveColor=new tn.Setting(this.containerEl).setName(E.features.interactives.specificColors).setDesc(E.features.interactives.specificColorsDesc).addButton(t=>{a0.setupButton(t,"add"),t.onClick(i=>{this.addColor("",Vl())})}),this.elementsBody.push(this.settingInteractiveColor.settingEl)}addFilterTypeSetting(){this.settingInteractiveFilter=new tn.Setting(this.containerEl).setName(E.features.interactives.selection).setDesc(E.features.interactives.selectionDesc).addExtraButton(t=>{t.setIcon("mouse-pointer-click"),t.onClick(()=>{new Jc(this.interactiveKey,this.getAllTypes()).open()})}),this.elementsBody.push(this.settingInteractiveFilter.settingEl)}getAllTypes(){let t=new Set,i=f.app.vault.getFiles();for(let s of i)t=new Set([...t,...r0(this.interactiveKey,s)]);return[...t].sort()}addColor(t,i){let s=new f8(this.containerEl,f.plugin,this.interactiveKey,t,i,this.isValueValid.bind(this));this.elementsBody.push(s.settingEl),this.colors=this.colors.filter(o=>o.settingEl.parentElement);let n=this.colors.last()??this.settingInteractiveColor;this.containerEl.insertAfter(s.settingEl,n.settingEl),this.colors.push(s)}},f8=class extends tn.Setting{constructor(e,t,i,s,n,o){super(e),this.plugin=t,this.isValid=o,this.key=i,this.type=s,this.color=n,this.addSearch(a=>{this.textComponent=a;let l=new Qc(a.inputEl,u=>{a.setValue(u),this.save()});switch(i){case de:l.setKey("link");break;case Ue:l.setKey("tag");break;case he:l.setKey("folder");break;default:l.setKey("property",i);break}a.setPlaceholder(i),a.setValue(s),a.onChange(u=>{this.save()})}),this.addColorPicker(a=>{this.colorComponent=a,a.setValue(n),a.onChange(l=>{this.updateCSS(),this.save()})}),this.addButton(a=>{(0,tn.setIcon)(a.buttonEl,"x"),a.onClick(()=>{this.remove()})}),this.updateCSS(),this.settingEl.addClass("setting-color")}save(){let e=this.textComponent.getValue().trim(),t=this.colorComponent.getValue();if(!this.isValid(e))return;let i=f.settings.interactiveSettings[this.key].colors,s=i.findIndex(o=>o.type===this.type);s!==-1&&i.remove(i[s]);let n=i.findIndex(o=>o.type===e);n===-1?i.push({type:e,color:t}):i[n]={type:e,color:t},this.plugin.saveSettings(),this.type!==e&&this.plugin.app.workspace.trigger("extended-graph:settings-interactive-color-changed",this.key,this.type),this.plugin.app.workspace.trigger("extended-graph:settings-interactive-color-changed",this.key,e),this.type=e,this.color=t}updateCSS(){this.settingEl.style.setProperty("--interactive-color",this.colorComponent.getValue())}remove(){let e=f.settings.interactiveSettings[this.key].colors,t=e.findIndex(i=>i.type===this.type);t!==-1&&e.remove(e[t]),f.plugin.saveSettings(),f.app.workspace.trigger("extended-graph:settings-interactive-color-changed",this.key,this.type),this.settingEl.remove()}};var up=require("obsidian");var Wc=class extends Xr{constructor(e){super(e,"tags",Ue,E.features.interactives.tags,"tags",E.features.interactives.tagsDesc)}addBody(){super.addBody(),this.elementsBody.push(new up.Setting(this.settingTab.containerEl).setName(E.features.interactives.arcsAdd).setDesc(E.features.interactives.arcsAddTagDesc).addToggle(e=>{e.setValue(f.settings.interactiveSettings[this.interactiveKey].showOnGraph),e.onChange(t=>{f.settings.interactiveSettings[this.interactiveKey].showOnGraph=t,f.plugin.saveSettings()})}).settingEl)}isValueValid(e){return hp(e)}getPlaceholder(){return"tag"}};var cp=require("obsidian");var Hc=class extends U0{constructor(t){super(t,"properties","",E.features.interactives.properties,"archive",E.features.interactives.propertiesDesc);this.settingInteractives=[];for(let i of Object.keys(f.settings.additionalProperties))this.settingInteractives.push(new e1(i,t,this))}addHeader(){super.addHeader(),this.settingHeader.addButton(t=>{this.addButton=t,a0.setupButton(t,"add"),this.elementsBody.push(t.buttonEl),t.onClick(i=>{t.buttonEl.blur(),this.openModalToAddInteractive()}),this.settingHeader.controlEl.insertAdjacentElement("afterbegin",t.buttonEl)})}addBody(){this.propertiesContainer=this.settingTab.containerEl.createDiv("setting-item settings-properties-container"),this.elementsBody.push(this.propertiesContainer);for(let t of this.settingInteractives)t.containerEl=this.propertiesContainer,t.display()}openModalToAddInteractive(){new t1("Property key",this.addProperty.bind(this)).open()}isKeyValid(t){return f.settings.additionalProperties.hasOwnProperty(t)?(new Notice(E.features.interactives.propertyAlreadyExists),!1):t===de?(new Notice(E.features.interactives.propertyReservedLinks),!1):t===he?(new Notice(E.features.interactives.propertyReservedFolders),!1):t===Ue?(new Notice(E.features.interactives.propertyReservedTags),!1):Fo(t)}addProperty(t){return this.isKeyValid(t)?(f.settings.additionalProperties[t]={graph:!0,localgraph:!0},f.settings.interactiveSettings[t]={colormap:"rainbow",colors:[],unselected:[],noneType:"none",showOnGraph:!0,enableByDefault:!0},f.plugin.saveSettings().then(()=>{let i=new e1(t,this.settingTab,this);this.settingInteractives.push(i),i.containerEl=this.propertiesContainer,i.display()}),!0):!1}onCollapse(){this.addButton?.buttonEl.hide()}onExpand(){this.addButton?.buttonEl.show()}},e1=class extends Xr{constructor(e,t,i){super(t,"property-key",e,E.features.interactives.property+": "+e,"",E.features.interactives.propertyDesc+e),this.array=i}addHeader(){super.addHeader(),this.settingHeader.addExtraButton(e=>{a0.setupExtraButton(e,"delete"),e.onClick(()=>{this.remove()}),this.settingHeader.controlEl.insertAdjacentElement("afterbegin",e.extraSettingsEl)}),this.settingHeader.settingEl.addClass("setting-property-header"),this.foldIcon.extraSettingsEl.remove()}addBody(){super.addBody(),this.elementsBody.push(new cp.Setting(this.array.propertiesContainer).setName(E.features.interactives.arcsAdd).setDesc(E.features.interactives.arcsAddPropertyDesc).addToggle(e=>{e.setValue(f.settings.interactiveSettings[this.interactiveKey].showOnGraph),e.onChange(t=>{f.settings.interactiveSettings[this.interactiveKey].showOnGraph=t,f.plugin.saveSettings()})}).settingEl)}remove(){delete f.settings.additionalProperties[this.interactiveKey],delete f.settings.interactiveSettings[this.interactiveKey],this.array.settingInteractives.remove(this),f.plugin.saveSettings().then(()=>{this.settingHeader.settingEl.remove(),this.elementsBody.forEach(e=>e.remove())})}isValueValid(e){return e.length>0}getPlaceholder(){return"property-key"}};var Ai=require("obsidian"),dp=h0(Pd());var jc=class extends Xr{constructor(e){super(e,"links",de,E.features.interactives.links,"link",E.features.interactives.linksDesc)}addBody(){super.addBody(),this.addExcludeFolders(),this.addDisableSources(),this.addDisableTargets(),this.addShowOnGraph(),this.addMultipleTypes(),this.addCurvedLinks(),this.addOutlineLinks()}addExcludeFolders(){this.elementsBody.push(new Ai.Setting(this.settingTab.containerEl).setName(E.features.excludeSourceFolders).setDesc(E.features.excludeSourceFoldersDesc).addButton(e=>{this.setManageNumber(e,f.settings.excludedSourcesFolder.length),e.onClick(()=>{let t=new El(f.settings.excludedSourcesFolder);t.open(),t.onClose=()=>this.setManageNumber(e,f.settings.excludedSourcesFolder.length)})}).settingEl),this.elementsBody.push(new Ai.Setting(this.settingTab.containerEl).setName(E.features.excludeTargetFolders).setDesc(E.features.excludeTargetFoldersDesc).addButton(e=>{this.setManageNumber(e,f.settings.excludedTargetsFolder.length),e.onClick(()=>{let t=new El(f.settings.excludedTargetsFolder);t.open(),t.onClose=()=>this.setManageNumber(e,f.settings.excludedTargetsFolder.length)})}).settingEl)}setManageNumber(e,t){e.setButtonText(`${E.controls.manage} (${t})`)}addMultipleTypes(){this.elementsBody.push(new Ai.Setting(this.settingTab.containerEl).setName(E.features.linksAllowMultipleTypes).setDesc(E.features.linksAllowMultipleTypesDesc).addToggle(e=>{e.setValue(f.settings.allowMultipleLinkTypes),e.onChange(t=>{f.settings.allowMultipleLinkTypes=t,f.plugin.saveSettings()})}).settingEl)}addDisableSources(){this.elementsBody.push(new Ai.Setting(this.settingTab.containerEl).setName(E.features.removeSources).setDesc(E.features.removeSourcesDesc).addToggle(e=>{e.setValue(f.settings.disableSource),e.onChange(t=>{f.settings.disableSource=t,f.plugin.saveSettings()})}).settingEl)}addDisableTargets(){this.elementsBody.push(new Ai.Setting(this.settingTab.containerEl).setName(E.features.removeTargets).setDesc(E.features.removeTargetsDesc).addToggle(e=>{e.setValue(f.settings.disableTarget),e.onChange(t=>{f.settings.disableTarget=t,f.plugin.saveSettings()})}).settingEl)}addShowOnGraph(){this.elementsBody.push(new Ai.Setting(this.settingTab.containerEl).setName(E.features.interactives.colorLinks).setDesc(E.features.interactives.colorLinksDesc).addToggle(e=>{e.setValue(f.settings.interactiveSettings[this.interactiveKey].showOnGraph),e.onChange(t=>{f.settings.interactiveSettings[this.interactiveKey].showOnGraph=t,f.plugin.saveSettings()})}).settingEl)}addCurvedLinks(){this.elementsBody.push(new Ai.Setting(this.settingTab.containerEl).setName(E.features.interactives.curvedLinks).setDesc(E.features.interactives.curvedLinksDesc).addToggle(e=>{e.setValue(f.settings.curvedLinks),e.onChange(t=>{f.settings.curvedLinks=t,f.plugin.saveSettings()})}).settingEl)}addOutlineLinks(){this.elementsBody.push(new Ai.Setting(this.settingTab.containerEl).setName(E.features.linksOutline).setDesc(E.features.linksOutlineDesc).addToggle(e=>{e.setValue(f.settings.outlineLinks),e.onChange(t=>{f.settings.outlineLinks=t,f.plugin.saveSettings()})}).settingEl)}isValueValid(e){return Fo(e)}getPlaceholder(){return"property-key"}getAllTypes(){let e=new Set,t=(0,dp.getAPI)(f.app);if(t){for(let i of t.pages())for(let[s,n]of Object.entries(i))if(!(s==="file"||f.settings.imageProperties.contains(s)||$0[de].includes(s))&&!(n==null||n==="")&&(typeof n=="object"&&"path"in n&&e.add(mo(s)),Array.isArray(n)))for(let o of n)o&&typeof o=="object"&&"path"in o&&e.add(mo(s))}else for(let i of this.settingTab.app.vault.getFiles()){let s=this.settingTab.app.metadataCache.getCache(i.path)?.frontmatterLinks;if(!s)continue;let n=s.map(o=>o.key.split(".")[0]).filter(o=>!f.settings.imageProperties.contains(o)&&!$0[de].includes(o));e=new Set([...e,...n])}return[...e].sort()}};var bl=require("obsidian");var $c=class extends Xr{constructor(e){super(e,"folders",he,E.features.folders,"folder",E.features.foldersDesc)}addBody(){super.addBody(),this.addFolderRadius(),this.addShowFullPath()}addFolderRadius(){this.elementsBody.push(new bl.Setting(this.settingTab.containerEl).setName(E.features.foldersRadius).setDesc(E.features.foldersRadiusDesc).addText(e=>{e.setValue(f.settings.folderRadius.toString()).onChange(async t=>{let i=parseInt(t);!isNaN(i)&&i>=0&&(f.settings.folderRadius=i,await f.plugin.saveSettings())})}).settingEl)}addShowFullPath(){this.elementsBody.push(new bl.Setting(this.settingTab.containerEl).setName(E.features.folderShowFullPath).setDesc(E.features.folderShowFullPathDesc).addToggle(e=>{e.setValue(f.settings.folderShowFullPath).onChange(async t=>{f.settings.folderShowFullPath=t,await f.plugin.saveSettings()})}).settingEl)}isValueValid(e){return!!this.settingTab.app.vault.getFolderByPath(e)}getPlaceholder(){return"folder/path"}getAllTypes(){let e=new Set,t=this.settingTab.app.vault.getAllFolders(!0);for(let i of t)i.children.filter(n=>n instanceof bl.TFile).length>0&&e.add(i.path);return[...e].sort()}};var pp=require("obsidian");var en=class extends pp.Setting{constructor(e,t){super(e),this.setName(E.features.interactives.palette),this.controlEl.addClass("color-palette"),this.canvasPalette=this.controlEl.createEl("canvas"),this.canvasPalette.id=`canvas-palette-${t}`,this.canvasPalette.width=100,this.canvasPalette.height=20,this.addExtraButton(i=>{i.setIcon("pipette"),i.onClick(()=>{let s=new r1;s.onSelected(n=>{n!==""&&(this.setValue(n),this.onPaletteChanged&&this.onPaletteChanged(n))}),s.open()})}),this.addDropdown(i=>{this.dropdown=i;for(let[s,n]of Object.entries(Ul)){let o=i.selectEl.createEl("optgroup");o.label=s;for(let a of n){let l=o.createEl("option");l.value=a,l.text=a}}i.onChange(async s=>{s!==""&&(Vo(this.canvasPalette,s,!1),this.onPaletteChanged&&this.onPaletteChanged(s))})})}setValue(e){Vo(this.canvasPalette,e,!1),this.dropdown.setValue(e)}onPaletteChange(e){this.onPaletteChanged=e}};var fp=require("obsidian");var $r=class extends fp.Setting{constructor(e,t,i,s){super(e),t!==""&&this.setName(t),i!==""&&this.setDesc(i),this.addToggle(n=>{n.toggleEl.insertAdjacentText("beforebegin",yl.graph),n.setValue(f.settings.enableFeatures.graph[s]),n.onChange(o=>{f.settings.enableFeatures.graph[s]=o,f.plugin.saveSettings()})}).addToggle(n=>{n.toggleEl.insertAdjacentText("beforebegin",yl.localgraph),n.setValue(f.settings.enableFeatures.localgraph[s]),n.onChange(o=>{f.settings.enableFeatures.localgraph[s]=o,f.plugin.saveSettings()})})}};var gp=require("obsidian");var qr=class extends gp.AbstractInputSuggest{constructor(e){super(f.app,e)}getSuggestions(e){return this.getStringSuggestions(e).sort().map(t=>{let i=new RegExp(e,"i").exec(t),s=createDiv();return i&&i[0].length>0?(i.index>0&&s.appendText(t.substring(0,i.index)),s.createEl("strong",{cls:"suggestion-highlight"},n=>n.setText(i[0])),i.index+i[0].length<t.length&&s.appendText(t.substring(i.index+i[0].length))):s.setText(t),s})}renderSuggestion(e,t){for(let i of Array.from(e.childNodes))t.appendChild(i.cloneNode(!0))}};var Kc=class extends qr{constructor(e,t){super(e),this.callback=t}getStringSuggestions(e){let i=[...f.app.customCss.enabledSnippets].filter(n=>n.contains(e));return[...new Set(i.sort())]}selectSuggestion(e,t){this.setValue(e.innerText),this.callback(e.innerText),this.close()}};var mp=require("obsidian");var i1=class extends mp.AbstractInputSuggest{constructor(e,t,i,s){super(f.app,e),this.instances=t,this.set=i,this.callback=s}getSuggestions(e){switch(this.set){case"nodes":return[...this.instances.nodesSet.extendedElementsMap.keys()].filter(i=>i.toLowerCase().contains(e.toLowerCase()));case"pinned":return[...this.instances.nodesSet.extendedElementsMap.values()].reduce((i,s)=>(s.isPinned&&s.id.toLowerCase().contains(e.toLowerCase())&&i.push(s.id),i),[]);case"folders":if(!this.instances.foldersSet)return[];let t=this.instances.foldersSet.managers.get(he);return t?t.getTypesWithoutNone().filter(i=>i.toLowerCase().contains(e.toLowerCase())):[]}}renderSuggestion(e,t){t.textContent=e}selectSuggestion(e,t){this.setValue(e),this.callback(e),this.close()}};var s1=class extends qr{constructor(e,t){super(e),this.callback=t}getStringSuggestions(e){return f.app.vault.getAllFolders().reduce((t,i)=>(i.path.toLowerCase().includes(e.toLowerCase())&&t.push(i.path),t),[])}selectSuggestion(e,t){this.setValue(e.innerText),this.callback(e.innerText),this.close()}};var Ao=class extends qr{constructor(e,t){super(e),this.callback=t}getStringSuggestions(e){if(!this.key)return[];let t=f.app.vault.getMarkdownFiles(),i=[];switch(this.key){case"tag":for(let o of t)i=i.concat([...r0(Ue,o)]);break;case"property":if(!this.propertyKey)return[];for(let o of t)i=i.concat([...r0(this.propertyKey,o)]);break;case"link":for(let o of t){let a=[...Bi(f.settings,o).values()].flat();i=i.concat(a.reduce((l,u)=>l.concat([...u]),[])),i=[...new Set(i)]}break;case"folder":case"folderRec":for(let o of t)i=i.concat([...r0(he,o)]);break;case"file":i=t.map(o=>o.basename);break;case"path":i=t.map(o=>o.path);break;default:break}let s=i.filter(o=>o.toLowerCase().contains(e.toLowerCase()));return[...new Set(s.sort())]}setKey(e,t){this.key=e,this.propertyKey=t}selectSuggestion(e,t){this.setValue(e.innerText),this.callback(e.innerText),this.close()}};var Qc=class extends Ao{getStringSuggestions(e){let t=super.getStringSuggestions(e),i=[];return this.key&&this.key!=="property"?i=f.settings.interactiveSettings[this.key].colors.map(s=>s.type):this.key==="property"&&this.propertyKey&&(i=f.settings.interactiveSettings[this.propertyKey].colors.map(s=>s.type)),t.filter(s=>!i.includes(s))}};var yp=require("obsidian");var n1=class extends yp.AbstractInputSuggest{constructor(e,t,i){super(f.app,e),this.renderer=t,this.callback=i}getSuggestions(e){return this.renderer.nodes.filter(t=>t.id.toLowerCase().contains(e.toLowerCase())).map(t=>t.id)}renderSuggestion(e,t){t.textContent=e}selectSuggestion(e,t){this.setValue(e),this.callback(e),this.close()}};var To=class extends qr{constructor(e,t){super(e),this.callback=t}getStringSuggestions(e){let i=Object.keys(f.app.metadataTypeManager.properties).filter(n=>n.contains(e));return[...new Set(i.sort())]}selectSuggestion(e,t){this.setValue(e.innerText),this.callback(e.innerText),this.close()}};var o1=class extends To{getStringSuggestions(e){return super.getStringSuggestions(e).filter(i=>!(i in f.settings.additionalProperties))}};var a1=class{constructor(e){this.fontSize=20;this.renderer=e,this.backgroundColor=Gi(Ur(this.renderer))}createSVG(){this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.options.showFolders&&(this.groupFolders=We("g",{id:"folders"}),this.addFolders(),this.svg.appendChild(this.groupFolders)),this.groupLinks=We("g",{id:"links"}),this.addLinks(),this.svg.appendChild(this.groupLinks),this.groupNodes=We("g",{id:"nodes"}),this.addNodes(),this.svg.appendChild(this.groupNodes),this.options.showNodeNames&&(this.groupText=We("g",{id:"texts"}),this.addNodeNames(),this.svg.appendChild(this.groupText));let{xMin:e,xMax:t,yMin:i,yMax:s}=this.getViewBox();this.svg.setAttribute("viewBox",`${e} ${i} ${t-e} ${s-i}`);let n=t-e,o=s-i;this.svg.prepend(We("rect",{width:n*1.1,height:o*1.1,x:e-n*.05,y:i-o*.05,fill:this.backgroundColor}));let a=this.getDefs();a&&this.svg.prepend(a)}getDefs(){}addNodes(){let e=this.getVisibleNodes();for(let t of e){let i=this.getSVGForNode(t);i&&this.groupNodes.appendChild(i)}}addLinks(){let e=this.getVisibleLinks();for(let t of e){let i=this.getSVGForLink(t);i&&this.groupLinks.appendChild(i)}}addNodeNames(){if(!this.groupText)return;let e=this.getVisibleNodes();for(let t of e){let i=this.getSVGForText(t);i&&this.groupText.appendChild(i)}}addFolders(){}isNodeInVisibleArea(e){if(!this.options.onlyVisibleArea)return!0;let t=structuredClone(this.renderer.viewport),i=e.getSize();return e.x+i>=t.left&&e.x-i<=t.right&&e.y+i>=t.top&&e.y-i<=t.bottom}isLinkInVisibleArea(e){return this.options.onlyVisibleArea?this.isNodeInVisibleArea(e.source)&&this.isNodeInVisibleArea(e.target):!0}getSVGForText(e){if(!this.options.showNodeNames)return null;let t=this.getCoreNode(e),i=We("text",{class:"node-name",id:"text:"+e.id,x:t.x,y:t.y+t.getSize()+this.fontSize+4,style:`font-size: ${this.fontSize}px; fill: ${t.text?.style.fill??rn(Uo(this.backgroundColor))};`,"text-anchor":"middle"});return i.textContent=this.getText(t),i}getText(e){return e.getDisplayText()}getViewBox(){document.body.appendChild(this.svg);let{xMin:e,xMax:t,yMin:i,yMax:s}=Array.from(this.svg.children).reduce((n,o)=>{let{x:a,y:l,width:u,height:h}=o.getBBox();return(!n.xMin||a<n.xMin)&&(n.xMin=a),(!n.xMax||a+u>n.xMax)&&(n.xMax=a+u),(!n.yMin||l<n.yMin)&&(n.yMin=l),(!n.yMax||l+h>n.yMax)&&(n.yMax=l+h),n},{});return document.body.removeChild(this.svg),{xMin:e,xMax:t,yMin:i,yMax:s}}getCoreNode(e){return"coreElement"in e?e.coreElement:e}async toClipboard(){try{let e=this.getModal();e.onClose=async function(){if(e.isCanceled)return;this.options=f.settings.exportSVGOptions,this.createSVG();let t=this.toString();if(this.options.asImage){let i=new Blob([t],{type:"image/svg+xml"});await navigator.clipboard.write([new ClipboardItem({"image/svg+xml":i})])}else await navigator.clipboard.writeText(t);new Notice(E.notices.svgCopied)}.bind(this),e.open()}catch(e){console.error(e.name,e.message)}}toString(){return new XMLSerializer().serializeToString(this.svg)}},Nl=class extends a1{constructor(e){super(e.renderer),this.instances=e}getDefs(){if(this.options.useModifiedNames&&this.instances.settings.addBackgroundToName){let e=We("defs"),t=We("filter",{x:"0",y:"0",width:"1",height:"1",id:"textBackground"}),i=We("feFlood",{"flood-color":this.backgroundColor,result:"bg"}),s=We("feMerge"),n=We("feMergeNode",{in:"bg"}),o=We("feMergeNode",{in:"SourceGraphic"});return s.appendChild(n),s.appendChild(o),t.appendChild(i),t.appendChild(s),e.appendChild(t),e}}getText(e){return this.options.useModifiedNames&&e.text?e.text.text:super.getText(e)}getSVGForText(e){let t=super.getSVGForText(e),i=e.coreElement.text,s=e.coreElement.getSize();if(t&&this.options.useModifiedNames){if(this.instances.settings.addBackgroundToName&&t.setAttribute("filter","url(#textBackground)"),i){let n=typeof i.style.fontFamily=="string"?i.style.fontFamily.split(",")[0].trim():i.style.fontFamily[0].split(",")[0].trim();t.style.setProperty("font-family",n)}if(this.instances.settings.nameVerticalOffset!==0&&i){let n=this.instances.settings.nameVerticalOffset,o=parseInt(t.getAttribute("y")??e.coreElement.y.toString());if(n<-5&&n>-105){let a=-5+(5+n)*s/50;o=o+a}else if(n<=-105){let a=100+n+-2*s;o=o+a}else o=o+n;t.setAttribute("y",(o-this.fontSize*1.5).toString())}}return t}addFolders(){if(!this.groupFolders||!this.instances.foldersSet?.managers.get(he))return;let i=this.getVisibleFolders();for(let s of i){let n=this.getSVGForFolder(s);this.groupFolders.appendChild(n)}}getSVGForNode(e){let t=We("g",{class:"node-group",id:"node:"+e.id}),i=this.getSVGForNodeShape(e);if(t.appendChild(i),this.options.showArcs){let s=this.getSVGForArcs(e);s&&t.appendChild(s)}return t}getSVGForNodeShape(e){let t=e.coreElement,i=t.getSize();if(e.icon?.svg&&this.options.showIcons){let s=e.icon.svg;s.style.stroke=F0(t.getFillColor().rgb),s.style.fill=this.backgroundColor;let n=We("g",{class:"node-shape",transform:`translate(${t.x-i} ${t.y-i}) scale(${i/s.width.baseVal.value*2})`});return n.appendChild(s),n}else if(e.icon?.emoji&&this.options.showIcons){let s=i*2,n=We("text",{class:"node-name",id:"text:"+t.id,x:e.coreElement.x,y:e.coreElement.y+s*.5,style:`font-size: ${s}px;`,"text-anchor":"middle"});return n.textContent=e.icon.emoji,n}else if(this.options.useNodesShapes&&e.graphicsWrapper){let s=We("g",{class:"node-shape",transform:`translate(${t.x-i} ${t.y-i}) scale(${i/Be.RADIUS})`,fill:F0(t.getFillColor().rgb)}),n=Be.getInnerSVG(e.graphicsWrapper?.shape);return s.appendChild(n),s}else return We("circle",{class:"node-shape",cx:t.x,cy:t.y,r:i,fill:F0(t.getFillColor().rgb)})}getSVGForArcs(e){let t=e.coreElement;if(t.type==="tag")return null;let i=t.getSize(),s=t.x,n=t.y,o=We("g",{class:"arcs"});for(let[a,l]of e.managers){let u=e.graphicsWrapper?.managerGraphicsMap?.get(a);if(!u)continue;let h=We("g",{class:"arcs-circle"});for(let[d,p]of u.graphics){let m=p.graphic.alpha,x=u.radius/Be.RADIUS*i,C=u.thickness/Be.RADIUS*i,A=g8(s,n,x,p.endAngle),P=g8(s,n,x,p.startAngle);if(A.x===P.x&&A.y===P.y){let L=We("circle",{class:"arc arc-"+d,cx:t.x,cy:t.y,r:x,opacity:m,"stroke-width":C,stroke:Gi(p.color),fill:"none"});h.appendChild(L)}else{let L=p.endAngle-p.startAngle<=Math.PI?"0":"1",I=`M ${A.x} ${A.y} A ${x} ${x} 0 ${L} 0 ${P.x} ${P.y}`,T=We("path",{class:"arc arc-"+d,d:I,opacity:m,"stroke-width":C,stroke:Gi(p.color),fill:"none"});h.appendChild(T)}}o.appendChild(h)}return o}getSVGForFolder(e){let t=e.BBox,i=We("g",{class:"folder-group",id:"folder:"+e.path}),s=We("rect",{class:"folder-box",x:t.left,y:t.top,height:t.bottom-t.top,width:t.right-t.left,rx:f.settings.folderRadius,fill:e.color,stroke:e.color,"stroke-width":e.folderStyle.borderWidth,"fill-opacity":e.folderStyle.fillOpacity,"stroke-opacity":e.folderStyle.strokeOpacity}),n=14,o=We("text",{class:"folder-name",x:(t.left+t.right)/2,y:t.top+n+2,fill:e.color,"text-anchor":"middle",style:`font-size: ${n}px;`});return o.textContent=e.path,i.appendChild(s),i.appendChild(o),i}getSVGForLink(e){let t=e.coreElement,i;if(this.options.useCurvedLinks){let h={x:t.source.x,y:t.source.y},d={x:t.target.x,y:t.target.y},p={x:-(d.y-h.y),y:d.x-h.x},m={x:(d.x+h.x)*.5,y:(d.y+h.y)*.5},x={x:m.x+.25*p.x,y:m.y+.25*p.y};i=`M ${h.x} ${h.y} C ${x.x} ${x.y}, ${d.x} ${d.y}, ${d.x} ${d.y}`}else i=`M ${t.source.x} ${t.source.y} L ${t.target.x} ${t.target.y}`;let s=e.graphicsWrapper?e.graphicsWrapper.pixiElement.color:t.line?F0(Number(t.line.tint)):"#000000",n=new Se(s).toHex(),o=this.instances.renderer.fLineSizeMult*2,a=e.graphicsWrapper?e.graphicsWrapper.pixiElement.targetAlpha:t.line?t.line.alpha:.6,l=We("path",{class:"link",id:"link:"+Dt(t),d:i,stroke:n,"stroke-width":o,opacity:a,fill:"none"}),u;if(this.instances.renderer.fShowArrow){let d=this.options.useModifiedArrows&&this.instances.settings.flatArrows?"M 1 0 L -3 -2 L -3 2 Z":"M 1 0 L -3 -2 L -2 0 L -3 2 Z",p=this.options.useCurvedLinks?e.graphicsWrapper?.pixiElement.arrow:e.coreElement.arrow;p&&(u=We("path",{id:`arrow:${e.id}`,d,fill:s,transform:`translate(${p.x}, ${p.y}) rotate(${p.rotation*180/Math.PI}) scale(${this.instances.engine.renderer.fLineSizeMult*2})`}))}if(u){let h=We("g");return h.appendChild(l),h.appendChild(u),h}return l}getVisibleNodes(){return this.instances.renderer.nodes.reduce((e,t)=>{if(t.rendered&&this.isNodeInVisibleArea(t)){let i=this.instances.nodesSet.extendedElementsMap.get(t.id);i&&e.push(i)}return e},[])}getVisibleLinks(){return this.instances.renderer.links.reduce((e,t)=>{if(t.rendered&&this.isLinkInVisibleArea(t)){let i=this.instances.linksSet.extendedElementsMap.get(Dt(t));i&&e.push(i)}return e},[])}getVisibleFolders(){let e=this.getVisibleNodes();return this.instances.foldersSet?[...this.instances.foldersSet.foldersMap.values()].filter(t=>e.some(i=>t.nodes.includes(i.coreElement))):[]}getModal(){return new wl(this.instances)}},Bl=class extends a1{constructor(e){super(e.renderer),this.engine=e}getSVGForNode(e){return We("circle",{class:"node-shape",id:"node:"+e.id,cx:e.x,cy:e.y,r:e.getSize(),fill:F0(e.getFillColor().rgb)})}getSVGForLink(e){let t=`M ${e.source.x} ${e.source.y} L ${e.target.x} ${e.target.y}`,i=F0(Number(e.line?.tint))??"#000000",s=(this.engine.options.lineSizeMultiplier??1)*4,n=e.line?.alpha??.6;return We("path",{class:"link",id:"link:"+Dt(e),d:t,stroke:i,"stroke-width":s,opacity:n})}getVisibleNodes(){return this.renderer.nodes.filter(e=>e.rendered&&this.isNodeInVisibleArea(e))}getVisibleLinks(){return this.renderer.links.filter(e=>e.rendered&&e.line?.visible&&this.isLinkInVisibleArea(e))}getModal(){return new wl}};var yl={graph:"Global",localgraph:"Local"};var xp="extended-graph-delete-button",vp="extended-graph-add-button",a0=class{static setupButton(e,t){switch(t){case"add":e.setClass(vp),e.setIcon("plus"),e.setTooltip(E.controls.add);break;case"delete":e.setClass(xp),e.setIcon("trash-2"),e.setTooltip(E.controls.delete);break;case"edit":e.setIcon("pencil"),e.setTooltip(E.controls.edit);break;case"save":e.setIcon("save"),e.setTooltip(E.controls.save);break;default:break}}static setupExtraButton(e,t){switch(t){case"add":e.extraSettingsEl.addClass(vp),e.setIcon("plus"),e.setTooltip(E.controls.add);break;case"delete":e.extraSettingsEl.addClass(xp),e.setIcon("trash-2"),e.setTooltip(E.controls.delete);break;case"edit":e.setIcon("pencil"),e.setTooltip(E.controls.edit);break;case"save":e.setIcon("save"),e.setTooltip(E.controls.save);break;default:break}}};var Ft=require("obsidian");var m8=class extends Ft.Setting{constructor(t,i,s){super(s);this.isVisible=!0;this.isCollapsed=!1;this.name=t,this.manager=i,this.cssBGColorVariable="--legend-color-rgb",this.cssTextColorVariable="--legend-text-color",this.setName(this.name).setTooltip(this.name).addExtraButton(o=>{this.disableAllButton=o,o.setIcon("x").setTooltip(E.controls.disableAll+": "+this.name).onClick(()=>{this.disableAll()})}).addExtraButton(o=>{this.enableAllButton=o,o.setIcon("check-check").setTooltip(E.controls.enableAll+": "+this.name).onClick(()=>{this.enableAll()}).then(a=>{this.enableAllButton.extraSettingsEl.remove()})}).setClass(`${this.getClassName(t)}s-row`),this.nameEl.addClass("mod-clickable"),this.nameEl.onclick=()=>{this.toggleCollapse()};let n=this.nameEl.createSpan();(0,Ft.setIcon)(n,"chevron-down")}getClassName(t){return"graph-legend-"+Yc(t)}addLegend(t,i){if(this.controlEl.getElementsByClassName(this.getClassName(t))[0])return;this.addButton(a=>{a.setClass(this.getClassName(t)).setTooltip(t).setClass("graph-legend").setButtonText(t).onClick(()=>{this.toggle(t)}).then(l=>{l.buttonEl.style.setProperty(this.cssBGColorVariable,`${i[0]}, ${i[1]}, ${i[2]}`),l.buttonEl.style.setProperty(this.cssTextColorVariable,rn(i)),t===this.manager.instances.settings.interactiveSettings[this.name].noneType&&l.buttonEl.addClass("graph-legend-none")})});let n=function(a,l){return l.className.replace("graph-legend","").toLowerCase().localeCompare(a.className.replace("graph-legend","").toLowerCase())},o=Array.from(this.controlEl.getElementsByClassName("graph-legend")).sort(n);for(let a=o.length-1;a>=0;a--)this.controlEl.appendChild(o[a])}updateLegend(t,i){let s=this.controlEl.getElementsByClassName(this.getClassName(t))[0];s?(s.style.setProperty(this.cssBGColorVariable,`${i[0]}, ${i[1]}, ${i[2]}`),s.style.setProperty(this.cssTextColorVariable,rn(i))):this.addLegend(t,i)}removeLegend(t){t.forEach(i=>{let s=this.controlEl.getElementsByClassName(this.getClassName(i))[0];s?.parentNode?.removeChild(s)})}toggle(t){let i=this.manager.interactives.get(t);i&&(i.isActive?(this.disableUI(t),this.manager.disable([t]),!this.manager.getTypes().some(n=>this.manager.isActive(n))&&(this.disableAllButton.extraSettingsEl.remove(),this.controlEl.insertAdjacentElement("afterbegin",this.enableAllButton.extraSettingsEl))):(this.enableUI(t),this.manager.enable([t]),!this.manager.getTypes().some(n=>!this.manager.isActive(n))&&(this.controlEl.insertAdjacentElement("afterbegin",this.disableAllButton.extraSettingsEl),this.enableAllButton.extraSettingsEl.remove())))}disableUI(t){let i=this.controlEl.getElementsByClassName(this.getClassName(t))[0];i&&i.addClass("is-hidden")}enableUI(t){let i=this.controlEl.getElementsByClassName(this.getClassName(t))[0];i&&i.removeClass("is-hidden")}disableAll(){for(let t of this.manager.getTypes())this.disableUI(t);this.manager.disable(this.manager.getTypes()),this.disableAllButton.extraSettingsEl.remove(),this.controlEl.insertAdjacentElement("afterbegin",this.enableAllButton.extraSettingsEl)}enableAll(){for(let t of this.manager.getTypes())this.enableUI(t);this.manager.enable(this.manager.getTypes()),this.controlEl.insertAdjacentElement("afterbegin",this.disableAllButton.extraSettingsEl),this.enableAllButton.extraSettingsEl.remove()}toggleVisibility(){this.isVisible?this.hide():this.show()}show(){this.settingEl.removeClass("is-hidden"),this.isVisible=!0}hide(){this.settingEl.addClass("is-hidden"),this.isVisible=!1}toggleCollapse(){this.isCollapsed?this.expend():this.collapse();let t=f.statesManager.getStateDataById(this.manager.instances.settings.startingStateID);t&&(this.isCollapsed?(t.collapsedLegendRows||(t.collapsedLegendRows=[]),t.collapsedLegendRows?.push(this.name)):t.collapsedLegendRows?.remove(this.name)),t&&f.statesManager.onStateNeedsSaving(t,!1)}collapse(){this.settingEl.addClass("is-collapsed"),this.isCollapsed=!0}expend(){this.settingEl.removeClass("is-collapsed"),this.isCollapsed=!1}},Xl=class extends Ft.Component{constructor(e){super(),this.instances=e,this.createToggleButton(),this.createRootPanel()}createToggleButton(){let e=this.instances.view.contentEl.querySelector(".graph-controls");this.toggleButton=new Ft.ExtraButtonComponent(e).setTooltip(E.controls.openLegend).setIcon("tags").onClick(()=>{this.isOpen?this.close():this.open()}).then(t=>{t.extraSettingsEl.addClasses(["graph-controls-button","mod-legend"])})}createRootPanel(){this.legendRows=new Map,this.root=this.instances.view.contentEl.createDiv("graph-legend-container"),this.instances.settings.horizontalLegend&&this.root.addClass("horizontal-layout"),this.rowsDiv=this.root.createDiv("graph-legend-rows");let e=createDiv("graph-legend-hide-rows-container"),t=f.statesManager.getStateDataById(this.instances.settings.startingStateID);for(let[i,s]of this.instances.interactiveManagers){if(i===he)continue;let n=new m8(i,s,this.rowsDiv),o=createSpan();(0,Ft.setIcon)(o,"eye");let a=new Ft.ButtonComponent(e),l={row:n,visibilityButton:{cb:a,eyeIcon:o}};this.legendRows.set(i,l),a.setButtonText(i).setTooltip(E.controls.hideRow+": "+i,{placement:"top"}).onClick(()=>{this.toggleVisibility(l,t)}).then(u=>{l.visibilityButton={cb:u,eyeIcon:o},u.buttonEl.prepend(o)}),t?.hiddenLegendRows?.contains(i)&&l.row.hide(),t?.collapsedLegendRows?.contains(i)&&l.row.collapse()}this.root.appendChild(e),f.settings.collapseLegend?this.close():this.open()}toggleVisibility(e,t){e.row.toggleVisibility(),e.visibilityButton.cb.buttonEl.toggleClass("is-inactive",!e.row.isVisible),(0,Ft.setIcon)(e.visibilityButton.eyeIcon,e.row.isVisible?"eye":"eye-off"),t&&(e.row.isVisible?t.hiddenLegendRows?.remove(e.row.name):(t.hiddenLegendRows||(t.hiddenLegendRows=[]),t.hiddenLegendRows?.push(e.row.name))),t&&f.statesManager.onStateNeedsSaving(t,!1)}onunload(){this.root.remove(),this.toggleButton.extraSettingsEl.remove()}update(e,t,i){this.legendRows.get(e)?.row.updateLegend(t,i)}add(e,t,i){this.legendRows.get(e)?.row.addLegend(t,i)}remove(e,t){this.legendRows.get(e)?.row.removeLegend(t)}toggle(e,t){this.legendRows.get(e)?.row.toggle(t)}disableUI(e,t){this.legendRows.get(e)?.row.disableUI(t)}enableUI(e,t){this.legendRows.get(e)?.row.enableUI(t)}enableAllUI(e){this.legendRows.get(e)?.row.manager.getTypes().forEach(t=>{this.legendRows.get(e)?.row.enableUI(t)})}disableAllUI(e){this.legendRows.get(e)?.row.manager.getTypes().forEach(t=>{this.legendRows.get(e)?.row.disableUI(t)})}hideRows(e){for(let[t,i]of this.legendRows)e.includes(t)?(i.row.hide(),i.visibilityButton.cb.buttonEl.addClass("is-inactive"),(0,Ft.setIcon)(i.visibilityButton.eyeIcon,"eye-off")):(i.row.show(),i.visibilityButton.cb.buttonEl.removeClass("is-inactive"),(0,Ft.setIcon)(i.visibilityButton.eyeIcon,"eye"))}collapseRows(e){for(let[t,i]of this.legendRows)e.includes(t)?i.row.collapse():i.row.expend()}open(){this.root.removeClass("is-closed"),this.toggleButton.extraSettingsEl.addClass("is-active"),this.isOpen=!0,f.settings.collapseLegend=!1,f.plugin.saveSettings()}close(){this.root.addClass("is-closed"),this.toggleButton.extraSettingsEl.removeClass("is-active"),this.isOpen=!1,f.settings.collapseLegend=!0,f.plugin.saveSettings()}};var sn=require("obsidian");var Rl=class extends sn.Component{constructor(e){super(),this.view=e,this.graphControlsEl=this.view.contentEl.querySelector(".graph-controls"),this.graphControlsEl.addClass("graph-controls-extended-graph"),this.graphControlsEl.createEl("hr").addClass("separator-exended-graph"),this.createEnableButton(),this.createResetButton()}createEnableButton(){this.buttonEnable=new sn.ExtraButtonComponent(this.graphControlsEl).setTooltip(`${E.controls.enable} ${E.plugin.name}`,{placement:"top"}).onClick(()=>{this.enabled?f.graphsManager.disablePlugin(this.view):f.graphsManager.enablePlugin(this.view)}).then(e=>{(0,sn.setIcon)(e.extraSettingsEl,"git-fork-sparkles"),e.extraSettingsEl.addClasses(["graph-controls-button","mod-extended-graph-toggle"])})}createResetButton(){this.buttonReset=new sn.ExtraButtonComponent(this.graphControlsEl).setTooltip(E.controls.resetGraph).setIcon("rotate-ccw").onClick(()=>{this.enabled&&f.graphsManager.resetPlugin(this.view)}).then(e=>{e.extraSettingsEl.addClasses(["graph-controls-button","mod-extended-graph-reset"]),e.extraSettingsEl.remove()})}setEnableUIState(){this.enabled=!0,this.buttonEnable.extraSettingsEl.addClass("is-active"),this.buttonEnable.setTooltip(`${E.controls.disable} ${E.plugin.name}`,{placement:"top"}),this.graphControlsEl.insertAfter(this.buttonReset.extraSettingsEl,this.buttonEnable.extraSettingsEl)}setDisableUIState(){this.enabled=!1,this.buttonEnable.extraSettingsEl.removeClass("is-active"),this.buttonEnable.setTooltip(`${E.controls.enable} ${E.plugin.name}`,{placement:"top"}),this.buttonReset.extraSettingsEl.remove()}};var l1=require("obsidian");var y8=class r extends l1.Menu{constructor(t,i,s,n){super();this.radialSubmenus=new Map;this.menuManager=t,this.level=s,this.parentMenu=n??null,this.dom.addClass("extended-graph-radial-menu"),s>0&&(this.dom.addClass("mod-submenu"),this.dom.style.setProperty("--submenu-level",s.toString())),this.setItems(i),this.setCentralItem()}showAtMouseEvent(t){return this.position={x:t.clientX,y:t.clientY},super.showAtMouseEvent(t)}showAtPosition(t,i){return this.position=t,super.showAtPosition(t,i)}onClick(t){t.items&&t.items.length>0?this.showNestedMenu(t):t.onClick&&t.onClick()}onMouseEnter(t){t.onMouseEnter&&t.onMouseEnter()}onMouseLeave(t){t.onMouseLeave&&t.onMouseLeave()}onClickCenter(){this.parentMenu&&this.switchWhichMenu(this.parentMenu)}setItems(t){let i=this.onClick.bind(this),s=this.onMouseEnter.bind(this),n=this.onMouseLeave.bind(this);for(let o=0;o<t.length;++o)this.addItem(a=>{a.dom.style.setProperty("--color-rgb",`var(--color-${t[o].color}-rgb)`),a.dom.style.setProperty("--rotation",`${-22.5+(o-1)*45}deg`),a.setTitle(t[o].title).setIcon(t[o].icon).onClick(()=>{i(t[o])}),(0,l1.setTooltip)(a.dom,t[o].title,{placement:"bottom"}),a.dom.addEventListener("mouseenter",()=>s(t[o])),a.dom.addEventListener("mouseleave",()=>n(t[o]));let l=t[o].items;l&&l.length>0&&this.radialSubmenus.set(t[o].id,new r(this.menuManager,l,this.level+1,this))})}setCentralItem(){let t=this.onClickCenter.bind(this);this.addItem(i=>{i.dom.addClass("back"),this.level>0?i.setIcon("undo-2"):i.setIcon("x"),i.onClick(t)})}showNestedMenu(t){let i=this.radialSubmenus.get(t.id);i&&this.switchWhichMenu(i)}switchWhichMenu(t){this.position||(this.position=this.dom.getBoundingClientRect()),this.close(),this.menuManager.setCurrentMenu(t),t.showAtPosition({x:this.position.x,y:this.position.y,left:!0})}},ql=class{constructor(e,t,i){this.instances=e,this.nodeID=t,this.nodeType=i,this.populateItems(),this.menu=new y8(this,this.allItems,0)}open(e){let t=this.instances.renderer.nodes.find(i=>i.id===this.nodeID);if(t?.circle){let i=this.instances.renderer.interactiveEl.getBoundingClientRect(),s=t.circle.getGlobalPosition();this.menu.showAtPosition({x:s.x+i.left,y:s.y+i.top,left:!0});return}else e&&this.menu.showAtPosition({x:e.clientX,y:e.clientY,left:!0})}populateItems(){if(this.allItems=[{id:"info",title:"Info",icon:"info",color:"blue",onClick:this.onShowInfo.bind(this)},{id:"pin",title:"Pin",icon:this.instances.nodesSet.isNodePinned(this.nodeID)?"pin-off":"pin",color:"red",onClick:this.onPin.bind(this)}],this.instances.settings.enableFeatures[this.instances.type].links&&this.allItems.push({id:"links",title:"Links",icon:"link",color:"orange",onMouseEnter:()=>this.onShowInteractive(de),onMouseLeave:this.clearInteractivesList.bind(this)}),this.instances.settings.enableFeatures[this.instances.type].folders&&this.allItems.push({id:"folders",title:"Folders",icon:"folder",color:"green",onMouseEnter:()=>this.onShowInteractive(he),onMouseLeave:this.clearInteractivesList.bind(this)}),this.nodeType===""&&(this.instances.settings.enableFeatures[this.instances.type].tags&&this.allItems.push({id:"tags",title:"Tags",icon:"tags",color:"pink",onMouseEnter:()=>this.onShowInteractive(Ue),onMouseLeave:this.clearInteractivesList.bind(this)}),this.instances.settings.enableFeatures[this.instances.type].properties)){let e={id:"properties",title:"Properties",icon:"archive",color:"purple",items:[]},t=["red","orange ","yellow","green","cyan","blue","purple","pink"],i=0;for(let[s,n]of Object.entries(this.instances.settings.additionalProperties))if(n[this.instances.type]&&this.getInteractivesTypes(s).size>0){let o={id:s,title:s,icon:"",color:t[i%t.length],items:[],onMouseEnter:()=>this.onShowInteractive(s),onMouseLeave:this.clearInteractivesList.bind(this)};e.items?.push(o),++i}e.items&&e.items.length>0&&this.allItems.push(e)}}setCurrentMenu(e){this.clearInteractivesList(),this.menu=e}onShowInfo(){let e=new Ri(this.instances);e.setTarget("nodes",this.nodeID),e.open()}onPin(){this.instances.nodesSet.isNodePinned(this.nodeID)?this.instances.dispatcher.unpinNodeFromId(this.nodeID):this.instances.dispatcher.pinNodeFromId(this.nodeID)}onShowInteractive(e){let t=this.instances.interactiveManagers.get(e);if(!t)return;let i=this.getInteractivesTypes(e);if(i.size===0)return;this.clearInteractivesList();let s=this.menu.dom.createDiv("interactives-list");for(let n of i){let o=t.getColor(n),a=s.createDiv("interactive-item");a.textContent=n,a.style.setProperty("--bg-color",`${o[0]}, ${o[1]}, ${o[2]}`),a.style.setProperty("--text-color",rn(o)),a.toggleClass("is-hidden",!t.isActive(n))}}getInteractivesTypes(e){let t;if(e===he&&this.instances.foldersSet)t=[...this.instances.foldersSet.foldersMap.values()].filter(s=>s.nodes.find(n=>n.id===this.nodeID));else if(e===de)t=[...this.instances.linksSet.extendedElementsMap.values()].filter(s=>s.coreElement.source.id===this.nodeID||s.coreElement.target.id===this.nodeID);else{let s=this.instances.nodesSet.extendedElementsMap.get(this.nodeID);t=s?[s]:[]}return t?new Set(t.map(s=>"getTypes"in s&&typeof s.getTypes=="function"?[...s.getTypes(e)]:"path"in s&&typeof s.path=="string"?[s.path]:[]).flat().filter(s=>s!==this.instances.settings.interactiveSettings[e].noneType)):new Set}clearInteractivesList(){this.menu.dom.querySelector(".interactives-list")?.detach()}};var Io=require("obsidian");var Kl=class extends Io.Component{constructor(e){super(),this.instances=e,this.root=this.instances.view.contentEl.createDiv(),this.root.addClass("graph-states-container");let t=this.instances.view.contentEl.querySelector(".graph-controls");this.toggleButton=new Io.ExtraButtonComponent(t).setTooltip(E.states.openSettings).setIcon("eye").onClick(()=>{this.isOpen?this.close():this.open()}).then(i=>{i.extraSettingsEl.addClasses(["graph-controls-button","mod-states"])}),this.statePane=new Io.Setting(this.root).setName(E.states.states).addDropdown(i=>{this.select=i,i.onChange(s=>{this.currentStateID=s,this.displaySaveDeleteButton(),this.instances.dispatcher.changeState(s)})}).addExtraButton(i=>{this.editButton=i,a0.setupExtraButton(i,"edit"),i.onClick(()=>{this.editButton.extraSettingsEl.blur(),this.openModalToRenameState()})}).addExtraButton(i=>{this.addButton=i,a0.setupExtraButton(i,"add"),i.onClick(()=>{this.addButton.extraSettingsEl.blur(),this.openModalToAddState()})}).addExtraButton(i=>{this.saveButton=i,a0.setupExtraButton(i,"save"),i.onClick(()=>{f.statesManager.saveState(this.instances,this.select.getValue())})}).addExtraButton(i=>{this.deleteButton=i,a0.setupExtraButton(i,"delete"),i.onClick(()=>{f.statesManager.deleteState(this.select.getValue())})}),this.currentStateID=this.select.getValue(),f.settings.collapseState?this.close():this.open()}onunload(){this.root.remove(),this.toggleButton.extraSettingsEl.remove()}openModalToAddState(){new Sl(E.states.newStateName,this.newState.bind(this)).open()}openModalToRenameState(){let e=f.statesManager.getStateDataById(this.currentStateID);e&&new Sl(E.states.editStateName,this.renameState.bind(this),e.name).open()}addOption(e,t){for(let i=0;i<this.select.selectEl.length;++i)if(this.select.selectEl.options[i].value==e){this.select.selectEl.options[i].innerText=t;return}this.select.addOption(e,t)}addState(e,t){this.addOption(e,t),this.select.setValue(e)}newState(e){if(e.length===0)return!1;let t=f.statesManager.newState(this.instances,e);return this.currentStateID=t,!0}renameState(e){return e.length===0?!1:(f.statesManager.renameState(this.currentStateID,e),!0)}updateStatesList(){this.clear(),f.settings.states.forEach(e=>{this.addOption(e.id,e.name)}),f.settings.states.find(e=>e.id===this.currentStateID)?this.setValue(this.currentStateID):this.currentStateID=this.select.getValue()}setValue(e){this.currentStateID=e,this.select.setValue(e),this.displaySaveDeleteButton()}clear(){for(let e=this.select.selectEl.length;e>=0;e--)this.select.selectEl.remove(e)}displaySaveDeleteButton(){this.select.getValue()!==ii?(this.statePane.settingEl.append(this.editButton.extraSettingsEl),this.statePane.settingEl.append(this.saveButton.extraSettingsEl),this.statePane.settingEl.append(this.deleteButton.extraSettingsEl)):(this.editButton.extraSettingsEl.remove(),this.saveButton.extraSettingsEl.remove(),this.deleteButton.extraSettingsEl.remove())}open(){this.root.removeClass("is-closed"),this.toggleButton.extraSettingsEl.addClass("is-active"),this.isOpen=!0,f.settings.collapseState=!1,f.plugin.saveSettings()}close(){this.root.addClass("is-closed"),this.toggleButton.extraSettingsEl.removeClass("is-active"),this.isOpen=!1,f.settings.collapseState=!0,f.plugin.saveSettings()}};var Dp=require("obsidian");var Ll=class extends Dp.Component{constructor(e){super(),this.view=e,this.graphControls=e.contentEl.querySelector(".graph-controls"),this.sectionSettings=new u1(e)}onPluginEnabled(e){this.instances=e,this.sectionSettings.onPluginEnabled(e)}onPluginDisabled(){this.sectionSettings.onPluginDisabled()}};var _l=require("obsidian"),ko=class extends _l.Component{constructor(e,t,i){super(),this.view=e,this.graphControls=e.contentEl.querySelector(".graph-controls"),this.root=this.graphControls.createDiv(`tree-item graph-control-section mod-extended-graph-${t}`);let s=this.root.createDiv("tree-item-self mod-collapsible");this.collapseIcon=s.createDiv("tree-item-icon collapse-icon is-collapsed"),(0,_l.setIcon)(this.collapseIcon,"right-triangle");let n=s.createDiv("tree-item-header-icon");(0,_l.setIcon)(n,"git-fork-sparkles");let a=s.createDiv("tree-item-inner").createEl("header",{cls:"graph-control-section-header",text:i});s.onClickEvent(()=>{this.isCollapsed?this.openGraphControlSection():this.collapseGraphControlSection()})}onPluginEnabled(e){this.instances=e,this.display(!0)}onPluginDisabled(){this.instances=void 0,this.display(!1)}onunload(){this.root.parentNode?.removeChild(this.root)}openGraphControlSection(){this.root.removeClass("is-collapsed"),this.root.appendChild(this.treeItemChildren),this.collapseIcon.removeClass("is-collapsed"),this.isCollapsed=!1}collapseGraphControlSection(){this.root.addClass("is-collapsed"),this.treeItemChildren&&this.root.removeChild(this.treeItemChildren),this.collapseIcon.addClass("is-collapsed"),this.isCollapsed=!0}};var lr=require("obsidian");var u1=class extends ko{constructor(e){super(e,"options",E.plugin.options),this.treeItemChildren=this.root.createDiv("tree-item-children"),this.display(!0),this.collapseGraphControlSection()}display(e){this.treeItemChildren.replaceChildren(),this.createSaveForDefaultState(),e&&this.createSaveForNormalState(),this.createZoomOnNode(),this.createScreenshot(),e&&this.createButtonViewState(),e&&this.createPinMultipleNodes(),e&&this.createUnpinAllNodes()}createSaveForDefaultState(){return new lr.Setting(this.treeItemChildren).setName(E.states.saveForDefaultState).setTooltip(E.states.saveForDefaultStateDesc).addExtraButton(e=>{e.extraSettingsEl.addClass("save-button"),(0,lr.setIcon)(e.extraSettingsEl,"arrow-up-to-line"),e.onClick(()=>{this.saveForDefaultState()})})}createSaveForNormalState(){return new lr.Setting(this.treeItemChildren).setName(E.states.saveForNormalState).setTooltip(E.states.saveForNormalStateDesc).addExtraButton(e=>{e.extraSettingsEl.addClass("save-button"),(0,lr.setIcon)(e.extraSettingsEl,"arrow-down-to-line"),e.onClick(()=>{this.saveForNormalState()})})}createScreenshot(){return new lr.Setting(this.treeItemChildren).setName(E.features.svgScreenshotCopy).addExtraButton(e=>{e.extraSettingsEl.addClass("screenshot-button"),(0,lr.setIcon)(e.extraSettingsEl,"image"),e.onClick(()=>{this.getSVGScreenshot()})})}createZoomOnNode(){return new lr.Setting(this.treeItemChildren).setName(E.features.zoomOnNode).addSearch(e=>{let t=i=>{f.graphsManager.zoomOnNode(this.view,i)};this.suggester=new n1(e.inputEl,this.view.renderer,t)})}createButtonViewState(){return new lr.Setting(this.treeItemChildren).setName(E.states.showGraphState).addExtraButton(e=>{e.setIcon("info"),e.onClick(()=>{let t=f.graphsManager.allInstances.get(this.view.leaf.id);if(!t)return;new Ri(t).open()})})}createPinMultipleNodes(){return new lr.Setting(this.treeItemChildren).setName(E.features.pinMultipleNodes).addExtraButton(e=>{e.setIcon("pin"),e.onClick(()=>{let t=f.graphsManager.allInstances.get(this.view.leaf.id);if(!t)return;let i=new T0(t);new h1((n,o)=>{i.pinInShape(n,o)}).open()})})}createUnpinAllNodes(){return new lr.Setting(this.treeItemChildren).setName(E.features.unpinAllNodes).addExtraButton(e=>{e.setIcon("pin-off"),e.onClick(()=>{let t=f.graphsManager.allInstances.get(this.view.leaf.id);if(!t)return;new T0(t).unpinAllNodes()})})}saveForDefaultState(){let e=f.settings.states.find(i=>i.id===ii);if(!e)return;let t=ri(this.view);e.engineOptions=new cr(t.getOptions()),f.statesManager.onStateNeedsSaving(e)}saveForNormalState(){let e=f.app.internalPlugins.getPluginById("graph").instance,t=ri(this.view);e.options=t.getOptions(),e.saveOptions(),f.graphsManager.backupOptions(this.view),new Notice(E.notices.normalStateSave)}getSVGScreenshot(){f.graphsManager.getSVGScreenshot(this.view)}};var c1=require("obsidian");var Zl=class extends ko{constructor(t,i){super(t.view,"folders",E.features.folders);this.settingsMap=new Map;this.foldersManager=i,this.instances=t,this.treeItemChildren=this.root.createDiv("tree-item-children"),this.collapseGraphControlSection()}destroy(){this.root.remove()}display(){this.treeItemChildren.replaceChildren(),this.addToggleAllButton(),this.addToggleAllWithAtLeastOneNodeButton(),this.createFolders()}addToggleAllButton(){new c1.Setting(this.treeItemChildren).setName(E.controls.toggleAll).addExtraButton(t=>{t.setIcon("x").setTooltip(E.controls.disableAll+": "+E.plugin.folder).onClick(()=>{this.disableAll()})}).addExtraButton(t=>{t.setIcon("check-check").setTooltip(E.controls.enableAll+": "+E.plugin.folder).onClick(()=>{this.enableAll()})})}addToggleAllWithAtLeastOneNodeButton(){new c1.Setting(this.treeItemChildren).setName(E.controls.toggleAllWithAtLeastOneNode).addExtraButton(t=>{t.setIcon("x").setTooltip(E.controls.disableAll+": "+E.plugin.folder).onClick(()=>{this.disableAllWithAtLeastOneNode()})}).addExtraButton(t=>{t.setIcon("check-check").setTooltip(E.controls.enableAll+": "+E.plugin.folder).onClick(()=>{this.enableAllWithAtLeastOneNode()})})}createFolders(){let t=this.foldersManager?.getTypesWithoutNone();if(t)for(let i of t)this.add(he,i,this.foldersManager.getColor(i))}update(t,i,s){this.settingsMap.get(i)?.setting.settingEl.style.setProperty("--folder-color-rgb",`${s[0]}, ${s[1]}, ${s[2]}`)}add(t,i,s){let n=new c1.Setting(this.treeItemChildren);n.setName(i).addToggle(o=>{o.setValue(this.foldersManager.isActive(i)),o.onChange(a=>{a!==this.foldersManager.isActive(i)&&this.toggle(t,i)}),this.settingsMap.set(i,{setting:n,toggle:o})}),this.update(t,i,s)}remove(t,i){for(let s of i){let n=this.settingsMap.get(s);s&&(n?.setting.settingEl.remove(),this.settingsMap.delete(s))}}toggle(t,i){this.foldersManager.isActive(i)?this.foldersManager.disable([i]):this.foldersManager.enable([i])}enableAll(){this.foldersManager.enable(this.foldersManager.getTypes()),this.enableAllUI(he)}disableAll(){this.foldersManager.disable(this.foldersManager.getTypes()),this.disableAllUI(he)}enableAllWithAtLeastOneNode(){let t=this.foldersManager.getTypes(),i=[];for(let s of t)this.instances?.foldersSet?.hasMoreThanOneNode(he,s)&&(i.push(s),this.enableUI(he,s));this.foldersManager.enable(i)}disableAllWithAtLeastOneNode(){let t=this.foldersManager.getTypes(),i=[];for(let s of t)this.instances?.foldersSet?.hasMoreThanOneNode(he,s)&&(i.push(s),this.disableUI(he,s));this.foldersManager.disable(i)}enableUI(t,i){this.settingsMap.get(i)?.toggle.setValue(!0)}disableUI(t,i){this.settingsMap.get(i)?.toggle.setValue(!1)}enableAllUI(t){for(let[i,s]of this.settingsMap)s.toggle.setValue(!0)}disableAllUI(t){for(let[i,s]of this.settingsMap)s.toggle.setValue(!1)}};var Ii=require("obsidian");var El=class extends Ii.Modal{constructor(e){super(f.app),this.initialFolders=e,this.folders=structuredClone(e),this.setTitle(E.features.excludedFolders),this.modalEl.addClass("graph-modal-exclude-folders")}onOpen(){this.messageP=this.contentEl.createEl("p"),this.filtersDiv=this.contentEl.createDiv(),this.addNewFilterSetting(),this.addButtonContainer(),this.updateMessage(),this.addFilters()}updateMessage(){this.messageP.textContent=this.folders.length===0?E.features.noExclusionFilter:E.features.withExclusionFilter}addFilters(){this.filtersDiv.innerHTML="";for(let e of this.folders)this.addFilter(e)}addFilter(e){this.filtersDiv.createDiv("mobile-option-setting-item",t=>{t.createSpan({cls:"mobile-option-setting-item-name",text:e},s=>{Ep(e)&&s.createSpan({text:"Regex",cls:"flair mod-flat"})});let i=new Ii.ExtraButtonComponent(t);i.extraSettingsEl.addClass("mobile-option-setting-item-option-icon"),i.setIcon("lucide-x"),i.setTooltip(E.controls.delete),i.onClick(()=>{this.folders.remove(e),this.addFilters(),this.updateMessage()})})}addNewFilterSetting(){new Ii.Setting(this.contentEl).then(e=>{e.setDesc(E.plugin.filter).addSearch(t=>{t.setPlaceholder(E.controls.pathRegexPlaceholder),new s1(t.inputEl,i=>{this.add(t)}),e.addButton(i=>{a0.setupButton(i,"add"),i.onClick(()=>{this.add(t)})})})})}add(e){e.getValue()!==""&&(this.folders.push(e.getValue()),this.addFilter(e.getValue()),this.updateMessage(),e.setValue(""))}addButtonContainer(){this.contentEl.createDiv("modal-button-container",e=>{new Ii.ButtonComponent(e).setCta().setButtonText(E.controls.save).onClick(async()=>{this.initialFolders.length=0;for(let t of this.folders)this.initialFolders.push(t);await f.plugin.saveSettings(),this.close()}),new Ii.ButtonComponent(e).setClass("mod-cancel").setButtonText(E.controls.cancel).onClick(()=>{this.close()})})}onClose(){this.contentEl.empty()}};var jt=require("obsidian");var wl=class extends jt.Modal{constructor(t){super(f.app);this.isCanceled=!0;this.instances=t,this.setTitle(E.features.svgScreenshotOptions)}onOpen(){this.addCoreOptions(),this.addExtendedOptions(),this.addApply()}addCoreOptions(){this.addOnlyVisibleArea(),this.addShowNodeNames()}addOnlyVisibleArea(){new jt.Setting(this.contentEl).setName(E.features.svgScreenshotVisibleArea).addToggle(t=>{t.setValue(f.settings.exportSVGOptions.onlyVisibleArea),t.onChange(i=>{f.settings.exportSVGOptions.onlyVisibleArea=i,this.saveSettings()})})}addShowNodeNames(){new jt.Setting(this.contentEl).setName(E.features.svgScreenshotNodeNames).addToggle(t=>{t.setValue(f.settings.exportSVGOptions.showNodeNames),t.onChange(i=>{f.settings.exportSVGOptions.showNodeNames=i,this.saveSettings()})})}addExtendedOptions(){this.instances&&(this.addUseCurvedLinks(),this.addUseModifiedArrows(),this.addUseNodeShapes(),this.addShowArcs(),this.addShowFolders(),this.addShowModifiedNames(),this.addShowIcons())}addUseCurvedLinks(){let t=this.canUseCurvedLinks();f.settings.exportSVGOptions.useCurvedLinks=t,t&&new jt.Setting(this.contentEl).setName(E.features.svgScreenshotCurvedLinks).addToggle(i=>{i.setValue(f.settings.exportSVGOptions.useCurvedLinks),i.onChange(s=>{f.settings.exportSVGOptions.useCurvedLinks=s,this.saveSettings()})})}canUseCurvedLinks(){return!this.instances||!this.instances?!1:this.instances.settings.enableFeatures[this.instances.type].links&&this.instances.settings.curvedLinks}addUseModifiedArrows(){let t=this.canUseModifiedArrows();f.settings.exportSVGOptions.useModifiedArrows=t,t&&new jt.Setting(this.contentEl).setName("Show modified arrows").addToggle(i=>{i.setValue(f.settings.exportSVGOptions.useModifiedArrows),i.onChange(s=>{f.settings.exportSVGOptions.useModifiedArrows=s,this.saveSettings()})})}canUseModifiedArrows(){return!this.instances||!this.instances?!1:this.instances.settings.enableFeatures[this.instances.type].arrows}addUseNodeShapes(){let t=this.canUseNodeShapes();f.settings.exportSVGOptions.useNodesShapes=t,t&&new jt.Setting(this.contentEl).setName(E.features.svgScreenshotNodeShapes).addToggle(i=>{i.setValue(f.settings.exportSVGOptions.useNodesShapes),i.onChange(s=>{f.settings.exportSVGOptions.useNodesShapes=s,this.saveSettings()})})}canUseNodeShapes(){return!this.instances||!this.instances?!1:this.instances.settings.enableFeatures[this.instances.type].shapes??!1}addShowArcs(){let t=this.canShowArcs();f.settings.exportSVGOptions.showArcs=t,t&&new jt.Setting(this.contentEl).setName(E.features.svgScreenshotArcs).addToggle(i=>{i.setValue(f.settings.exportSVGOptions.showArcs),i.onChange(s=>{f.settings.exportSVGOptions.showArcs=s,this.saveSettings()})})}canShowArcs(){if(!this.instances||!this.instances)return!1;let t=this.instances.type;return this.instances.settings.enableFeatures[t].tags?!0:this.instances.settings.enableFeatures[t].properties?Object.values(this.instances.settings.additionalProperties).some(i=>i[t]):!1}addShowFolders(){let t=this.canShowFolders();f.settings.exportSVGOptions.showFolders=t,t&&new jt.Setting(this.contentEl).setName("Show folder boxes").addToggle(i=>{i.setValue(f.settings.exportSVGOptions.showFolders),i.onChange(s=>{f.settings.exportSVGOptions.showFolders=s,this.saveSettings()})})}canShowFolders(){return!this.instances||!this.instances?!1:this.instances.settings.enableFeatures[this.instances.type].folders}addShowModifiedNames(){let t=this.canShowModifiedNames();f.settings.exportSVGOptions.useModifiedNames=t,t&&new jt.Setting(this.contentEl).setName("Show modified names").addToggle(i=>{i.setValue(f.settings.exportSVGOptions.useModifiedNames),i.onChange(s=>{f.settings.exportSVGOptions.useModifiedNames=s,this.saveSettings()})})}canShowModifiedNames(){return!this.instances||!this.instances?!1:this.instances.settings.enableFeatures[this.instances.type].names}addShowIcons(){let t=this.canShowIcons();f.settings.exportSVGOptions.showIcons=t,t&&new jt.Setting(this.contentEl).setName("Show icons").addToggle(i=>{i.setValue(f.settings.exportSVGOptions.showIcons),i.onChange(s=>{f.settings.exportSVGOptions.showIcons=s,this.saveSettings()})})}canShowIcons(){return!this.instances||!this.instances?!1:this.instances.settings.enableFeatures[this.instances.type].icons}addApply(){let t=new jt.Setting(this.contentEl).addButton(i=>{i.setButtonText(E.features.svgScreenshotCopyCode),i.onClick(()=>{this.isCanceled=!1,f.settings.exportSVGOptions.asImage=!1,this.applyAndClose()})});ClipboardItem.supports("image/svg+xml")&&t.addButton(i=>{i.setButtonText(E.features.svgScreenshotCopyImage),i.setCta(),i.onClick(()=>{this.isCanceled=!1,f.settings.exportSVGOptions.asImage=!0,this.applyAndClose()})})}async saveSettings(){this.instances&&(this.instances.settings.exportSVGOptions=f.settings.exportSVGOptions),await f.plugin.saveSettings()}applyAndClose(){this.saveSettings().then(()=>{this.close()})}};var ds=require("obsidian");var r1=class extends ds.Modal{constructor(){super(f.app);this.selectedPalette="";this.setTitle(E.features.interactives.palettePickGradient),this.modalEl.addClass("graph-modal-palette-picker")}onOpen(){for(let[t,i]of Object.entries(Ul))this.addPalettesGroup(t,i);this.addInfo()}addPalettesGroup(t,i){let s=new ds.Setting(this.contentEl).setName(t).setHeading();s.controlEl.addClass("palette-group");for(let n of i)this.addPalette(n,s.controlEl)}addPalette(t,i){let s=new ds.Setting(i).setName(t).then(n=>{let o=n.controlEl.createEl("canvas");o.id=`picker-canvas-palette-${t}`,o.width=100,o.height=20,Vo(o,t,!1)});s.settingEl.onclick=()=>{this.selectedPalette=t,this.close()}}addInfo(){new ds.Setting(this.contentEl).setName(E.plugin.info).setHeading().setDesc(E.features.interactives.paletteMatplotlibDesc).then(t=>{let i=createDiv();t.nameEl.prepend(i),(0,ds.setIcon)(i,"info");let s=t.descEl.createEl("a");s.href="https://matplotlib.org/stable/users/explain/colors/colormaps.html",s.setText("https://matplotlib.org/stable/users/explain/colors/colormaps.html")})}onClose(){this.contentEl.empty(),this.selectedPalette!==""&&this.callback(this.selectedPalette)}onSelected(t){this.callback=t}};var bp=require("obsidian");var Jc=class extends bp.Modal{constructor(e,t){super(f.app),this.key=e,this.types=t,this.setTitle(E.features.interactives.selectionFor+": "+this.key),this.modalEl.addClass("graph-modal-interactives-selection")}onOpen(){for(let e of this.types){let t=!f.settings.interactiveSettings[this.key].unselected.includes(e),i=this.contentEl.createEl("label"),s=i.createSpan({text:e}),n=i.createEl("input",{type:"checkbox"});t?this.selectInteractive(i,n):this.deselectInteractive(i,n),n.addEventListener("change",o=>{n.checked?this.selectInteractive(i,n):this.deselectInteractive(i,n)})}}selectInteractive(e,t){e.addClass("is-active"),t.checked=!0,f.settings.interactiveSettings[this.key].unselected.includes(e.innerText)&&(f.settings.interactiveSettings[this.key].unselected.remove(e.innerText),f.plugin.saveSettings())}deselectInteractive(e,t){e.removeClass("is-active"),t.checked=!1,f.settings.interactiveSettings[this.key].unselected.includes(e.innerText)||(f.settings.interactiveSettings[this.key].unselected.push(e.innerText),f.plugin.saveSettings())}onClose(){this.contentEl.empty()}};var d1=require("obsidian");var Sl=class extends d1.Modal{constructor(e,t,i){super(f.app),this.setTitle(e),this.modalEl.addClass("graph-modal-new"),this.callback=t,this.name=i,this.scope.register(null,"Enter",s=>{this.callback(this.input.getValue())&&this.close()})}onOpen(){new d1.Setting(this.contentEl).addText(e=>{this.input=e,this.name&&this.input.setValue(this.name)}).addButton(e=>{a0.setupButton(e,this.name?"edit":"add"),e.buttonEl.addEventListener("click",t=>{this.callback(this.input.getValue())&&this.close()})})}onClose(){this.contentEl.empty()}};var p1=require("obsidian");var t1=class extends p1.Modal{constructor(e,t){super(f.app),this.setTitle(e),this.modalEl.addClass("graph-modal-new"),this.callback=t,this.scope.register(null,"Enter",i=>{this.callback(this.input.getValue())&&this.close()})}onOpen(){new p1.Setting(this.contentEl).addSearch(e=>{this.input=e,new o1(e.inputEl,t=>{})}).addButton(e=>{a0.setupButton(e,"add"),e.buttonEl.addEventListener("click",t=>{this.callback(this.input.getValue())&&this.close()})})}onClose(){this.contentEl.empty()}};var nn=require("obsidian");var f1=class extends nn.Modal{constructor(e){super(f.app),this.matcher=new nr(e);let t=this.matcher.getMatches();this.setTitle(E.query.matchingFiles),this.addQueryStringHeader(),this.addQueryString(),this.addFilesHeader(t.length);for(let i of t)this.addFile(i)}addQueryStringHeader(){new nn.Setting(this.contentEl).setName(E.query.query).setHeading()}addQueryString(){new nn.Setting(this.contentEl).setName(this.matcher.toString())}addFilesHeader(e){new nn.Setting(this.contentEl).setName(`${E.query.files} (${e})`).setHeading()}addFile(e){new nn.Setting(this.contentEl).setName(e.path)}};var Kr=require("obsidian");var Mo=class extends Kr.Modal{constructor(t,i,s){super(f.app);this.rulesSettings=[];this.combinationLogicButtons={AND:null,OR:null};this.setTitle(t),this.modalEl.addClass("graph-modal-nodes-query"),this.callback=s,this.queryData=i}onOpen(){this.addCombinationLogic(),this.addRulesHeader(),this.addButtons();for(let t of this.queryData.rules)this.addRule(t);this.onChange()}addCombinationLogic(){new Kr.Setting(this.contentEl).setName(E.query.combinationLogic).addButton(t=>{this.combinationLogicButtons.AND=t,t.setButtonText(E.query.AND),t.onClick(i=>{this.queryData.combinationLogic="AND",this.combinationLogicButtons.AND?.setCta(),this.combinationLogicButtons.OR?.removeCta()})}).addButton(t=>{this.combinationLogicButtons.OR=t,t.setButtonText(E.query.OR),t.onClick(i=>{this.queryData.combinationLogic="OR",this.combinationLogicButtons.AND?.removeCta(),this.combinationLogicButtons.OR?.setCta()})}).then(t=>{this.combinationLogicButtons[this.queryData.combinationLogic]?.setCta()})}addRulesHeader(){this.ruleHeader=new Kr.Setting(this.contentEl).setName(E.query.rules).setHeading().addButton(t=>{a0.setupButton(t,"add"),t.onClick(i=>{this.addRule()})})}addRule(t){let i=new x8(this.contentEl,this.removeRule.bind(this),this.onChange.bind(this),t);(this.rulesSettings.last()?.settingEl??this.ruleHeader.settingEl).insertAdjacentElement("afterend",i.settingEl),this.rulesSettings.push(i)}removeRule(t){this.rulesSettings.remove(t),t.settingEl.remove()}addButtons(){let t=this.modalEl.createDiv({cls:"buttons-container"});new Kr.ButtonComponent(t).setButtonText(E.controls.cancel).onClick(()=>this.close()),this.viewMatchesButton=new Kr.ButtonComponent(t).setButtonText(E.query.viewMatches).onClick(()=>this.viewMatches()),this.applyButton=new Kr.ButtonComponent(t).setButtonText(E.controls.save).setIcon("save").onClick(()=>this.save()).setCta()}onChange(t){let s=this.getMatcher().getMatches();this.viewMatchesButton.setButtonText(`${E.query.viewMatches} (${s.length})`),this.viewMatchesButton.setDisabled(s.length===0)}viewMatches(){new f1(this.queryData).open()}onClose(){this.contentEl.empty()}save(){this.setQueryData(),this.callback(this.queryData),this.close()}setQueryData(){let t=[];for(let i of this.rulesSettings)t.push(i.getRuleQuery());this.queryData.rules=t.map(i=>i.getRecord())}getMatcher(){return this.setQueryData(),new nr(this.queryData)}},x8=class extends Kr.Setting{constructor(e,t,i,s){super(e),this.onRemoveCallback=t,this.setClass("rule-setting"),this.addRemoveButton(),this.addSourceDropdown(),s&&s.source&&this.sourceDropdown.setValue(s.source),this.sourceDropdown.getValue()!=="all"&&(this.addLogicDropdown(),s&&s.logic&&this.logicDropdown?.setValue(s.logic),this.sourceDropdown.getValue()==="property"&&(this.addPropertyDropdown(),s&&s.property&&this.propertyDropdown?.setValue(s.property)),this.addValueText(),s&&s.value&&this.valueText?.setValue(s.value)),this.onChangeCallback=i,this.onChange()}addRemoveButton(){return this.addExtraButton(e=>{a0.setupExtraButton(e,"delete"),e.onClick(()=>{this.onRemoveCallback(this)})})}addSourceDropdown(){return this.addDropdown(e=>{this.sourceDropdown=e,e.addOptions(h8),e.setValue("tag"),e.onChange(t=>{t==="all"?(this.logicDropdown?.selectEl.parentNode?.removeChild(this.logicDropdown.selectEl),this.logicDropdown=null,this.propertyDropdown?.selectEl.parentNode?.removeChild(this.propertyDropdown.selectEl),this.propertyDropdown=null,this.valueText?.containerEl.parentNode?.removeChild(this.valueText.containerEl),this.valueText=null):(!this.propertyDropdown&&t==="property"?this.addPropertyDropdown():t!=="property"&&(this.propertyDropdown?.selectEl.parentNode?.removeChild(this.propertyDropdown.selectEl),this.propertyDropdown=null),this.logicDropdown||this.addLogicDropdown(),this.valueText||this.addValueText()),this.onChange()})})}addPropertyDropdown(){return this.addDropdown(e=>{this.propertyDropdown=e,this.controlEl.insertAfter(e.selectEl,this.sourceDropdown.selectEl);let t=f.app.metadataTypeManager.properties;e.addOptions(Object.keys(t).sort().reduce((i,s)=>(i[s]=t[s].name,i),{})),e.onChange(i=>{this.onChange()})})}addLogicDropdown(){return this.addDropdown(e=>{this.logicDropdown=e,e.addOptions(c8),e.onChange(t=>{t!=="isEmpty"&&t!=="isEmptyNot"?this.valueText||this.addValueText():this.valueText&&(this.valueText.containerEl.parentNode?.removeChild(this.valueText.containerEl),this.valueText=null),this.onChange()})})}addValueText(){return this.addSearch(e=>{this.valueText=e,e.setPlaceholder(E.plugin.valuePlaceholder),e.inputEl.setAttr("required",!0),this.suggester=new Ao(this.valueText.inputEl,t=>{this.onChange()}),e.onChange(t=>{this.onChange()})})}onChange(){switch(this.logicDropdown?.getValue()){case"containsRegex":case"containsRegexNot":case"matchesRegex":case"matchesRegexNot":this.suggester?.setKey();break;default:this.suggester?.setKey(this.sourceDropdown.getValue(),this.propertyDropdown?.getValue());break}let t=this.getRuleQuery();this.setValidity(t),this.onChangeCallback(t)}setValidity(e){e.isValid()?this.settingEl.removeClass("query-invalid"):this.settingEl.addClass("query-invalid")}getRuleQuery(){return new Ci({source:this.sourceDropdown.getValue(),property:this.propertyDropdown?.getValue()??"",value:this.valueText?.getValue()??"",logic:this.logicDropdown?.getValue()??""})}};var Cl=require("obsidian");var h1=class extends Mo{constructor(e){super(E.features.pinMultipleNodes,f.settings.multipleNodesData.queryData??{combinationLogic:"AND",rules:[]},t=>{this.pinCallback(this.shapeData,t)}),this.pinCallback=e,this.shapeData=f.settings.multipleNodesData.shapeData??{type:"grid",center:{x:0,y:0},step:100}}onOpen(){super.onOpen(),this.addShapeType(),this.addStep(),this.addCenter(),this.changeType(this.shapeData.type),this.applyButton.setButtonText(E.controls.apply).setIcon("check"),this.rulesSettings.length===0&&(this.addRule({source:"all"}),this.onChange())}addShapeType(){new Cl.Setting(this.contentEl).setName(E.features.pinMultipleShape).addDropdown(e=>{e.addOptions(q7),e.setValue(this.shapeData.type),e.onChange(t=>{this.changeType(t),this.saveSettings()})})}addStep(){new Cl.Setting(this.contentEl).setName(E.features.pinMultipleGap).addText(e=>{e.setValue(this.shapeData.step.toString()),e.onChange(t=>{let i=parseInt(t);isNaN(i)||(this.shapeData.step=i,this.saveSettings())})})}addCenter(){new Cl.Setting(this.contentEl).setName(E.features.pinMultipleCenter).addText(e=>{e.inputEl.insertAdjacentText("beforebegin","X"),e.setValue(this.shapeData.center.x.toString()),e.onChange(t=>{let i=parseInt(t);isNaN(i)||(this.shapeData.center.x=i,this.saveSettings())})}).addText(e=>{e.inputEl.insertAdjacentText("beforebegin","Y"),e.setValue(this.shapeData.center.y.toString()),e.onChange(t=>{let i=parseInt(t);isNaN(i)||(this.shapeData.center.y=i,this.saveSettings())})})}addGridSettings(){this.gridSetting||(this.gridSetting=new Cl.Setting(this.contentEl).setName(E.features.pinMultipleGridSize).setDesc(E.features.pinMultipleGridSizeDesc).addText(e=>{e.setValue(this.shapeData.columns?.toString()??""),e.onChange(t=>{if(t==="")this.shapeData.columns=void 0,this.saveSettings();else if(t==="N"||t==="auto")this.shapeData.columns=t,this.saveSettings();else{let i=parseInt(t);!isNaN(i)&&i>=1&&(this.shapeData.columns=i,this.saveSettings())}})}))}removeGridSettings(){this.gridSetting&&(this.gridSetting.settingEl.parentNode?.removeChild(this.gridSetting.settingEl),this.gridSetting=null)}changeType(e){this.shapeData.type=e,this.shapeData.type==="grid"?this.addGridSettings():this.removeGridSettings(),this.saveSettings()}onChange(e){super.onChange(e),this.saveSettings()}saveSettings(){f.settings.multipleNodesData={shapeData:this.shapeData,queryData:this.queryData},f.plugin.saveSettings()}};var Zc=class extends Mo{constructor(e,t,i){super(E.query.setShapeQueryFor+": "+E.features.shapesNames[e],t,s=>{this.saveShapeQueryCallback(this.shape,s)}),this.saveShapeQueryCallback=i,this.shape=e}onOpen(){this.addShapeIcon(),super.onOpen()}addShapeIcon(){let e=Be.getSVG(this.shape);e.addClass("shape-svg"),this.titleEl.insertAdjacentElement("afterbegin",e)}};var At=require("obsidian");var Ri=class extends At.Modal{constructor(t){super(f.app);this.sortableTables={};this.defaultMaxRows=10;this.instances=t,this.state=new Li(""),this.state.saveGraph(t),this.setTitle(E.states.graphState),this.modalEl.addClass("graph-modal-graph-state")}setTarget(t,i){this.target={tableID:t,elementID:i}}open(){super.open(),this.modalEl.querySelectorAll("input").forEach(t=>t.blur())}onOpen(){this.addNodes(),this.addLinks(),this.addPinnedNodes(),this.focusOnTarget()}addNodes(){let t=this.instances.nodesSet.extendedElementsMap.size>0;this.createHeading(E.plugin.nodes,"nodes",t);let i=this.contentEl.createEl("table"),s=i.createEl("colgroup"),o=i.createTHead().insertRow(),a;a=o.insertCell(),a.setText(E.plugin.folder),s.createEl("col").addClass("col-folder"),a=o.insertCell(),a.setText(E.plugin.nodeName),s.createEl("col").addClass("col-filename"),a=o.insertCell(),a.setText(E.controls.enabled),s.createEl("col").addClass("col-enabled");for(let[h,d]of this.instances.nodesSet.managers)a=o.insertCell(),a.setText(h),s.createEl("col").addClass("col-key-"+h);if(this.instances.settings.enableFeatures[this.instances.type].shapes&&(a=o.insertCell(),a.setText(E.features.shape),s.createEl("col").addClass("col-shape")),this.instances.settings.enableFeatures[this.instances.type]["elements-stats"]&&(a=o.insertCell(),a.setText(E.features.size),s.createEl("col").addClass("col-size")),!t)return;let l=i.createTBody(),u=[];for(let[h,d]of this.instances.nodesSet.extendedElementsMap){let p=this.getNodeData(h),m=l.insertRow();u.push(h);let x;x=m.insertCell(),x.setText(p.path),x=m.insertCell(),p.link?x.appendChild(p.link):x.setText(h),x=m.insertCell(),d.isAnyManagerDisabled()||x.setText("\u2713");for(let[C,A]of this.instances.nodesSet.managers){x=m.insertCell(),x.addClass("column-interactives");let P=d.types.get(C);if(P)for(let L of P){let I=A.getColor(L),T=x.createEl("span");T.addClass("tag"),A.isActive(L)||T.addClass("is-disabled"),T.style.setProperty("--interactive-color",`${I[0]}, ${I[1]}, ${I[2]}`),T.setText(L)}}this.instances.settings.enableFeatures[this.instances.type].shapes&&d.graphicsWrapper&&(x=m.insertCell(),x.createDiv().appendChild(Be.getSVG(d.graphicsWrapper.shape)).addClass("shape-svg")),this.instances.settings.enableFeatures[this.instances.type]["elements-stats"]&&(x=m.insertCell(),x.setText(d.getSizeWithoutScaling().toFixed(2)))}this.prepareTable("nodes",i,u)}addLinks(){let t=this.instances.linksSet.extendedElementsMap.size>0;this.createHeading("Links","links",t);let i=this.contentEl.createEl("table"),s=i.createEl("colgroup"),o=i.createTHead().insertRow(),a;a=o.insertCell(),a.setText(`${E.plugin.folder} (${E.plugin.source})`),s.createEl("col").addClasses(["col-folder","col-folder-source"]),a=o.insertCell(),a.setText(`${E.plugin.nodeName} (${E.plugin.source})`),s.createEl("col").addClasses(["col-filename","col-filename-source"]),a=o.insertCell(),a.setText(`${E.plugin.folder} (${E.plugin.target})`),s.createEl("col").addClasses(["col-folder","col-folder-target"]),a=o.insertCell(),a.setText(`${E.plugin.nodeName} (${E.plugin.target})`),s.createEl("col").addClasses(["col-filename","col-filename-target"]),a=o.insertCell(),a.setText(E.controls.enabled),s.createEl("col").addClass("col-enabled");for(let[h,d]of this.instances.linksSet.managers)a=o.insertCell(),a.setText(h),s.createEl("col").addClass("col-key-"+h);if(this.instances.settings.enableFeatures[this.instances.type]["elements-stats"]&&(a=o.insertCell(),a.setText(E.features.size),s.createEl("col").addClass("col-size")),!t)return;let l=i.createTBody(),u=[];for(let[h,d]of this.instances.linksSet.extendedElementsMap){let p=this.getNodeData(d.coreElement.source.id),m=this.getNodeData(d.coreElement.target.id),x=l.insertRow();u.push(h);let C;C=x.insertCell(),C.setText(p.path),C=x.insertCell(),p.link?C.appendChild(p.link):C.setText(d.coreElement.source.id),C=x.insertCell(),C.setText(m.path),C=x.insertCell(),m.link?C.appendChild(m.link):C.setText(d.coreElement.target.id),C=x.insertCell(),d.isAnyManagerDisabled()||C.setText("\u2713");for(let[A,P]of this.instances.linksSet.managers){C=x.insertCell(),C.addClass("column-interactives");let L=d.types.get(A);if(L)for(let I of L){let T=P.getColor(I),W=C.createEl("span");W.addClass("tag"),P.isActive(I)||W.addClass("is-disabled"),W.style.setProperty("--interactive-color",`${T[0]}, ${T[1]}, ${T[2]}`),W.setText(I)}}this.instances.settings.enableFeatures[this.instances.type]["elements-stats"]&&(C=x.insertCell(),C.setText(d.getThicknessScale().toFixed(2)))}this.prepareTable("links",i,u)}addPinnedNodes(){let t=this.state.data.pinNodes&&Object.entries(this.state.data.pinNodes).length>0;this.createHeading(E.features.pinnedNodes,"pinned",t);let i=this.contentEl.createEl("table"),s=i.createEl("colgroup"),o=i.createTHead().insertRow(),a;if(a=o.insertCell(),a.setText(E.plugin.folder),s.createEl("col").addClass("col-folder"),a=o.insertCell(),a.setText(E.plugin.nodeName),s.createEl("col").addClass("col-filename"),a=o.insertCell(),a.setText("X"),s.createEl("col").addClass("col-pos-x"),a=o.insertCell(),a.setText("Y"),s.createEl("col").addClass("col-pos-y"),!this.state.data.pinNodes||!t)return;let l=i.createTBody(),u=[];for(let[h,d]of Object.entries(this.state.data.pinNodes)){let p=this.getNodeData(h),m=l.insertRow();u.push(h);let x;x=m.insertCell(),x.setText(p.path),x=m.insertCell(),p.link?x.appendChild(p.link):x.setText(h),x=m.insertCell(),x.setText(d.x.toFixed(2)),x=m.insertCell(),x.setText(d.y.toFixed(2))}this.prepareTable("pinned",i,u)}createHeading(t,i,s){let n=new At.Setting(this.contentEl).setName(t).setHeading();if(s){if(n.addText(o=>{o.inputEl.insertAdjacentText("beforebegin",E.controls.show),o.setValue(this.defaultMaxRows.toString()).onChange(a=>{let l=this.sortableTables[i];if(!l)return;let u=parseInt(a);if(!isNaN(u)&&u>0){let h=l.maxRows/u;l.maxRows=u,l.page=Math.round(l.page*h),l.page=Math.clamp(l.page,0,this.numberOfPages(i)),this.mountPagination(i),this.showPageRows(i)}}),o.inputEl.insertAdjacentText("afterend",E.controls.rows)}),i==="nodes"||i==="pinned"){let o=new At.SearchComponent(n.settingEl).then(a=>{let l=u=>{this.setTarget(i,u),this.focusOnTarget()};new i1(a.inputEl,this.instances,i,l),a.onChange(l)});n.infoEl.insertAdjacentElement("afterend",o.containerEl)}n.controlEl.addClass("number-of-rows")}}getNodeData(t){let i=Le(t),s=this.getPath(i),n=this.getLink(i);return{file:i??void 0,path:s,link:n}}getPath(t){let i="";return t&&(i=t.parent?.path??""),i}getLink(t){if(t){let i=createEl("a");i.setText(t.basename),i.onclick=o=>{this.close(),this.app.workspace.getLeaf(!0).openFile(t)};let s=createEl("code");s.setText(t.extension);let n=createEl("span");return n.appendChild(i),n.insertAdjacentText("beforeend"," "),n.appendChild(s),n}}prepareTable(t,i,s,n=1){i.tHead&&(this.sortableTables[t]={table:i,rows:Array.from(i.tBodies[0].rows).map((o,a)=>({id:s[a],el:o})),sortIndex:n,asc:Array.from(i.tHead.rows[0].cells).map(o=>{}),page:0,pagination:createDiv(),maxRows:this.defaultMaxRows},i.insertAdjacentElement("afterend",this.sortableTables[t].pagination),this.sortableTables[t].pagination.addClass("pagination"),this.mountPagination(t),this.makeSortable(t))}mountPagination(t){let i=this.sortableTables[t];if(!i)return;let s=i.pagination;if(s.replaceChildren(),i.rows.length<i.maxRows)return;let n=3;i.page!==0&&new At.ButtonComponent(s).setIcon("chevrons-left").setTooltip(E.controls.pageFirst).setClass("first-page").onClick(()=>{this.showFirstPage(t)});let o=s.createDiv("pagination-inner");i.page>n&&o.createSpan().setText("...");for(let a=Math.max(0,i.page-n);a<i.page;++a)new At.ButtonComponent(o).setButtonText(a.toString()).setTooltip(E.controls.page+" "+a.toString()).onClick(()=>{this.showPreviousPage(t,i.page-a)});new At.ButtonComponent(o).setButtonText(i.page.toString()).setCta().setTooltip(E.controls.pageCurrent);for(let a=i.page+1;a<Math.min(i.page+n+1,this.numberOfPages(t));++a)new At.ButtonComponent(o).setButtonText(a.toString()).setTooltip(E.controls.page+" "+a.toString()).onClick(()=>{this.showNextPage(t,a-i.page)});i.page<this.numberOfPages(t)-n-1&&o.createSpan().setText("..."),i.page!==this.numberOfPages(t)-1&&new At.ButtonComponent(s).setIcon("chevrons-right").setTooltip(E.controls.pageLast).setClass("last-page").onClick(()=>{this.showLastPage(t)})}makeSortable(t){let i=this.sortableTables[t],s=this.sortableTables[t]?.table;if(!i||!s?.tHead)return;let n=0;Array.from(s.tHead.rows[0].cells).forEach(o=>{new At.ExtraButtonComponent(o).setIcon("chevron-down").onClick(()=>{s.tHead&&(i.sortIndex=Array.from(s.tHead.rows[0].cells).indexOf(o),this.sortTable(t))}),n++}),this.sortTable(t)}sortTable(t){let i=this.sortableTables[t];if(!i)return;let s=!i.asc[i.sortIndex];i.asc[i.sortIndex]=s,i.rows.sort((n,o)=>{let a=n.el.cells[i.sortIndex].textContent??"",l=o.el.cells[i.sortIndex].textContent??"";return s?a.localeCompare(l):l.localeCompare(a)}),this.showPageRows(t);for(let n=0,o=i.asc.length;n<o;++n)n===i.sortIndex?(i.asc[n]=s,i.table.tHead?.rows[0].cells[n].addClass(s?"sorted-asc":"sorted-desc"),i.table.tHead?.rows[0].cells[n].removeClass(s?"sorted-desc":"sorted-asc")):(i.asc[n]=void 0,i.table.tHead?.rows[0].cells[n].removeClasses(["sorted-asc","sorted-desc"]))}showPageRows(t){let i=this.sortableTables[t];if(!i)return;i.table.tBodies[0].replaceChildren();let s=i.page;for(let n=0,o=i.rows.length;n<i.maxRows&&s*i.maxRows+n<o;++n)i.table.tBodies[0].appendChild(i.rows[s*i.maxRows+n].el);this.mountPagination(t)}showFirstPage(t){let i=this.sortableTables[t];i&&(i.page=0,this.showPageRows(t))}showPreviousPage(t,i){let s=this.sortableTables[t];s&&(s.page-=i,s.page<0?this.showFirstPage(t):this.showPageRows(t))}showNextPage(t,i){let s=this.sortableTables[t];s&&(s.page+=i,s.page>=this.numberOfPages(t)?this.showLastPage(t):this.showPageRows(t))}showLastPage(t){let i=this.sortableTables[t];i&&(i.page=this.numberOfPages(t)-1,this.showPageRows(t))}numberOfPages(t){let i=this.sortableTables[t];return i?Math.ceil(i.rows.length/i.maxRows):0}focusOnTarget(){if(!this.target)return;let t=this.sortableTables[this.target.tableID];if(!t)return;let i=t.rows.findIndex(n=>n.id===this.target?.elementID);if(i===-1)return;t.page=Math.floor(i/t.maxRows),this.showPageRows(this.target.tableID);let s=t.rows[i].el;s.addClass("is-flashing"),s.win.setTimeout(function(){return s.removeClass("is-flashing")},1500)}onClose(){this.contentEl.empty()}};function rn(r,e="black",t="white"){return r[0]*.299+r[1]*.587+r[2]*.114>150?e:t}function wp(r){let e=createEl("canvas");e.width=e.height=1;let t=e.getContext("2d");if(t)try{t.clearRect(0,0,1,1),t.fillStyle=r,t.fillRect(0,0,1,1);let i=[...t.getImageData(0,0,1,1).data];if(i[3]>0)return new Uint8Array([i[0],i[1],i[2]])}catch{}try{r=r.replace("rgba","").replace("rgb","").replace("(","").replace(")","");let i=r.split(", ").map(s=>parseInt(s));return Uint8Array.from(i)}catch{return}}function Ur(r){let e=window.getComputedStyle(r.interactiveEl).backgroundColor,t=r.interactiveEl;for(;e.startsWith("rgba(")&&e.endsWith(", 0)")&&t.parentElement;)t=t.parentElement,e=window.getComputedStyle(t).backgroundColor;let i=wp(e);return i||(f.app.vault.getConfig("theme")==="moonstone "?new Uint8Array([255,255,255]):new Uint8Array([0,0,0]))}function h4(r){let e=window.getComputedStyle(r.interactiveEl).getPropertyValue("--color-base-100"),t=wp(e);return t||(f.app.vault.getConfig("theme")==="moonstone "?new Uint8Array([255,255,255]):new Uint8Array([0,0,0]))}var Sp=h0(require("path"));var Po={fontFamily:"??",fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0},_p="extended-graph-css-div",Tt={textStyle:{textStyle:Po,align:"center",fontSize:14},radius:50,borderWidth:2,fillOpacity:.03,strokeOpacity:.03*15,padding:{left:0,top:0,right:0,bottom:0}};function L8(r){lD(r),uD(r)}function lD(r){if(!r.coreStyleEl)return;let e=r.renderer.colors,t=`
.graph-view.color-fill {
color: ${F0(e.fill.rgb)};
}
.graph-view.color-fill-focused {
color: ${F0(e.fillFocused.rgb)};
}
.graph-view.color-fill-tag {
color: ${F0(e.fillTag.rgb)};
}
.graph-view.color-fill-attachment {
color: ${F0(e.fillAttachment.rgb)};
}
.graph-view.color-fill-unresolved {
color: ${F0(e.fillUnresolved.rgb)};
opacity: ${e.fillUnresolved.a};
}
.graph-view.color-arrow {
color: ${F0(e.arrow.rgb)};
opacity: ${e.arrow.a};
}
.graph-view.color-circle {
color: ${F0(e.fillFocused.rgb)};
}
.graph-view.color-line {
color: ${F0(e.line.rgb)};
}
.graph-view.color-text {
color: ${F0(e.text.rgb)};
}
.graph-view.color-fill-highlight {
color: ${F0(e.fillHighlight.rgb)};
}
.graph-view.color-line-highlight {
color: ${F0(e.lineHighlight.rgb)};
}
body {
font-family: ${getComputedStyle(r.renderer.interactiveEl).fontFamily};
}`;r.coreStyleEl.innerHTML=t}function uD(r){if(!r.extendedStyleEl)return;let e=f.settings.cssSnippetFilename;if(!f.app.customCss.enabledSnippets.has(e))return;let t=[...f.app.customCss.csscache.entries()].find(i=>Sp.default.basename(i[0],".css")===e);t&&(r.extendedStyleEl.innerHTML=t[1])}function v8(r,e,t){if(!r.extendedStyleEl)return new CSSStyleDeclaration;D8(r);let i=r.extendedStyleEl.ownerDocument.createElement("div",{});return r.extendedStyleEl.ownerDocument.body.appendChild(i),i.classList.add("graph-view",e),i.id=_p,t&&i.setAttribute("data-path",t),i.style.borderStyle="solid",getComputedStyle(i)}function D8(r){r.extendedStyleEl?.ownerDocument.getElementById(_p)?.remove()}function Cp(r,e,t){if(!r.extendedStyleEl)return Po;let i=v8(r,e,t),s=i.fontFamily,n=i.fontStyle.toLowerCase();["normal","italic","oblique"].contains(n)||(n=Po.fontStyle);let o=i.fontVariant.toLowerCase();["normal","small-caps"].contains(o)||(o=Po.fontVariant);let a=i.fontWeight.toLowerCase();["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"].contains(a)||(a=Po.fontWeight);let l=ps(i.letterSpacing,Po.letterSpacing),u=v8(r,"color-text",t).color,h={fontFamily:s,fontStyle:n,fontVariant:o,fontWeight:a,letterSpacing:l,fill:u};return D8(r),h}function Ql(r,e){return Cp(r,"node-text",e)}function X7(r){return r.fontStyle==="normal"&&r.fontVariant==="normal"&&r.fontWeight==="normal"&&r.letterSpacing===0}function O8(r,e){if(!r.extendedStyleEl)return Tt;let t=Cp(r,"folder",e),i=v8(r,"folder",e),s=i.textAlign.toLowerCase();["left","center","right"].contains(s)||(s=Tt.textStyle.align);let n=ps(i.fontSize,Tt.textStyle.fontSize),o=ps(i.borderRadius,Tt.radius),a=ps(i.borderWidth,Tt.borderWidth),l={left:ps(i.paddingLeft,Tt.padding.left),top:ps(i.paddingTop,Tt.padding.top),right:ps(i.paddingRight,Tt.padding.right),bottom:ps(i.paddingBottom,Tt.padding.bottom)},u=i.opacity.toLowerCase(),h=Tt.fillOpacity;h=parseFloat(u.toLowerCase()),isNaN(h)?h=Tt.fillOpacity:h=Math.clamp(h,0,1);let d=Math.min(h*15,1),p={textStyle:{textStyle:t,fontSize:n,align:s},radius:o,borderWidth:a,fillOpacity:h,strokeOpacity:d,padding:l};return D8(r),p}function ps(r,e){r=r.toLowerCase();let t=e;return r.endsWith("px")&&(t=parseFloat(r),isNaN(t)&&(t=e)),t}function P8(r){return r.view.getViewType()==="graph"||r.view.getViewType()==="localgraph"?r.view:void 0}function Tp(r){return r.view.getViewType()==="graph"?r.view.hasOwnProperty("dataEngine"):r.view.hasOwnProperty("engine")}function ri(r){return r.getViewType()==="graph"?r.dataEngine:r.engine}function We(r,e){let t=document.createElementNS("http://www.w3.org/2000/svg",r);for(let i in e)t.setAttributeNS(null,i.replace(/[A-Z]/g,function(s,n,o,a){return"-"+s.toLowerCase()}),e[i]);return t}function g8(r,e,t,i){return{x:r+t*Math.cos(i),y:e+t*Math.sin(i)}}function Xs(r,e,t,i){let s=(1-r)*((1-r)*e.x+r*t.x),n=(1-r)*((1-r)*e.y+r*t.y),o=r*((1-r)*t.x+r*i.x),a=r*((1-r)*t.y+r*i.y),l=s+o,u=n+a;return{x:l,y:u}}function vo(r,e,t,i){let s={x:(1-r)*e.x+r*t.x,y:(1-r)*e.y+r*t.y},n={x:(1-r)*t.x+r*i.x,y:(1-r)*t.y+r*i.y},o=(n.y-s.y)/(n.x-s.x);return{m:o,c:s.y-o*s.x}}function Ld(r,e,t,i){let s=e.x-t.x-t.x+i.x,n=e.y-t.y-t.y+i.y,o=t.x+t.x-e.x-e.x,a=t.y+t.y-e.y-e.y,l=4*(s*s+n*n),u=4*(s*o+n*a),h=o*o+a*a,d=u/(2*l),p=h/l,m=r+d,x=p-d*d,C=Math.sqrt(d*d+x),A=Math.sqrt(m*m+x);return .5*Math.sqrt(l)*(m*A-d*C+x*Math.log(Math.abs((m+A)/(d+C))))}var No=require("obsidian");var bo=class r{static async getImageUriFromProperty(e,t){let i=f.app.metadataCache.getCache(t);if(!i)return null;let s=i.frontmatter;if(!s)return null;let n=s[e];if(typeof n=="string"){let o=await r.getImageUriFromLink(E8(n));if(o)return o}else if(Array.isArray(n)){for(let o of n)if(typeof o=="string"){let a=await r.getImageUriFromLink(E8(o));if(a)return a}}return null}static async getImageUriFromEmbeds(e){let t=f.app.metadataCache.getCache(e);if(!t)return null;let i=t.embeds?.map(s=>s.link)??[];if(i.length===0){let s=Le(e);if(!s)return null;let n=await f.app.vault.cachedRead(s),o=createDiv();await No.MarkdownRenderer.render(f.app,n,o,e,f.plugin);let a=Array.from(o.querySelectorAll("img")).map(u=>u.src),l=Array.from(o.querySelectorAll("video")).map(u=>u.src);i=i.concat(a.concat(l))}for(let s of i){let n=await r.getImageUriFromLink(s);if(n)return n}return null}static async getImageUriForAttachment(e){let t=Le(e);return t?r.getStaticImageUri(f.app.vault.getResourcePath(t)):null}static async getImageUriFromLink(e){let t=f.app.metadataCache.getFirstLinkpathDest(e,".");if(t){let i=f.app.vault.getResourcePath(t);return r.getStaticImageUri(i)}if(f.settings.allowExternalImages)try{let i=new URL(e);if(i.protocol==="http:"||i.protocol==="https:"){let s=await requestUrl(e),n=s.headers["content-type"];return["image/avif","image/webp","image/png","image/svg+xml","image/jpeg"].includes(n)?"data:"+n+";base64,"+(0,No.arrayBufferToBase64)(s.arrayBuffer):null}}catch{return null}if(f.settings.allowExternalLocalImages)try{let i=new URL(e);if(i.protocol==="file:")return e.startsWith("file:///")&&(e=e.replace("file:///","")),e=No.Platform.resourcePathPrefix+e,r.getStaticImageUri(e);if(i.protocol==="app:")return r.getStaticImageUri(e)}catch{return null}return null}static async getStaticImageUri(e){let t=await r.getMediaType(e);return t?["image/avif","image/webp","image/png","image/svg+xml","image/jpeg"].includes(t)?e:["image/gif"].includes(t)?r.getUriForGif(e):["video/mp4","video/webm","video/ogg","video/quicktime","video/x-matroska"].includes(t)?r.getUriForVideo(e):null:null}static async getUriForGif(e){let t=createEl("canvas"),i=t.getContext("2d");if(i){let s,n=new Image;n.onload=()=>{t.width=n.width,t.height=n.height,i.drawImage(n,0,0),s=t.toDataURL()},n.src=e;let o=0;return await(async()=>{for(;s===void 0&&o<5;)o+=1,await new Promise(a=>setTimeout(a,100))})(),s??null}return null}static async getUriForVideo(e){let t=createEl("canvas"),i=t.getContext("2d");if(i){let s,n=createEl("video");n.src=e,n.addEventListener("seeked",function(){i.drawImage(n,0,0,t.width,t.height),s=t.toDataURL()}),n.onloadedmetadata=function(){n.duration&&(n.currentTime=n.duration/2)};let o=0;return await(async()=>{for(;s===void 0&&o<5;)o+=1,await new Promise(a=>setTimeout(a,100))})(),s??null}return null}static async getMediaType(e){let t,i=new XMLHttpRequest;i.open("HEAD",e,!1),i.onload=function(){t=i.getResponseHeader("Content-Type")},i.onerror=function(n){console.warn(n),t=null},i.onreadystatechange=function(){i.status===401&&console.warn(E.errors.uri401)};try{i.send()}catch(n){console.warn(n),t=null}let s=0;return await(async()=>{for(;t===void 0&&s<5;)s+=1,await new Promise(n=>setTimeout(n,100))})(),t??null}};var Fp=require("obsidian");function hD(){return f.app.plugins.getPlugin("iconic")}function H7(r){let e=hD();if(!e||!e.hasOwnProperty("ruleManager")||typeof e.ruleManager.checkRuling!="function"||typeof e.getFileItem!="function")return null;let t=f.app.vault.getFolderByPath(r)?"folder":"file",i=e.ruleManager.checkRuling(t,r)??e.getFileItem(r);if(i.icon?.startsWith("lucide-")){let s=(0,Fp.getIcon)(i.icon);if(s){let n=getComputedStyle(document.body),o=null;return i.hasOwnProperty("color")&&(o=n.getPropertyValue(`--color-${i.color}`)||null),{svg:s,color:o,emoji:null}}}else if(i.icon&&sl(i.icon))return{svg:null,color:null,emoji:i.icon};return null}function j7(r){let e=f.app.plugins.getPlugin("obsidian-icon-folder");if(!e||!e.hasOwnProperty("api")||!e.api.hasOwnProperty("util")||!e.api.util.hasOwnProperty("dom")||!e.api.util.dom.hasOwnProperty("getIconNodeFromPath")||!e.hasOwnProperty("data"))return null;let t=e.api.util.dom.getIconNodeFromPath(r);if(t){let i=t.querySelector("svg");if(i){if(!e.hasOwnProperty("data")||!e.data.hasOwnProperty(r)||!e.data[r].hasOwnProperty("iconColor"))return{svg:i,color:null,emoji:null};let s=e.data[r].iconColor;return{svg:i.cloneNode(!0),color:s,emoji:null}}}if(e.data.hasOwnProperty(r)){let i=e.data[r];if(typeof i=="string"&&i!==""&&sl(i))return{svg:null,color:null,emoji:i}}return null}function Ap(){return this.app.plugins.getPlugin("graph-banner")?._loaded}function Go(){return"graph-banner-content"}function m1(r){return r.contentEl.classList.contains(Go())}function dn(){return f.app.plugins.getPlugin("graph-banner")}var Bo=h0(Ip());var w8=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function $7(r){return/^\d+(\.\d+)?$/.test(r)}function Fo(r){return r.contains(":")?(new Notice(E.notices.invalidCharacter+" ':'"),!1):r.length>0}function hp(r){return/^[a-zA-Z/]+$/.test(r)}function E8(r){return r.replace("[[","").replace("]]","")}function Yc(r){return r.replaceAll(" ","-").replaceAll(/[~!@$%^&*()+=,.\\\/';:"?><[\]{}|`#]/g,"")}function Y7(r){return r.split("/").reduce((e,t,i)=>{if(t==="")return e;let s=e.last();return s&&s!==""?e.push(s+"/"+t):e.push(t),e},[])}function sl(r){return w8().test(r)}function kp(){return/(\/)(.+)\1([a-z]*)/i}function Ep(r){return kp().test(r)}function G8(r){let e=r.match(kp());return e===null?null:new RegExp(e[2],e[3])}var cD=Bo.default.alt(Bo.default.regex(new RegExp(w8(),"")),Bo.default.regex(/[0-9\p{Letter}_-]+/u).map(r=>r.toLocaleLowerCase()),Bo.default.whitespace.map(r=>"-"),Bo.default.any.map(r=>"")).many().map(r=>r.join(""));function mo(r){return cD.tryParse(r)}var g1=class extends Zr.Plugin{constructor(){super(...arguments);this.waitingTime=0}async onload(){f.plugin=this,f.app=this.app,f.proxysManager=new kl,await this.loadSettings(),(0,Zr.addIcon)("git-fork-sparkles",'<g fill="none" stroke="currentColor" stroke-width="8" stroke-linecap="round" stroke-linejoin="round" class="git-fork-sparkles"><circle cx="50" cy="76" r="12"/><circle cx="25" cy="25" r="12"/><circle cx="76" cy="25" r="12"/><path d="M76 36v8c0 2.4-1.6 4-4 4H28c-2.4 0-4-1.6-4-4V36"/><path d="M50 50v12"/><path d="m 82.03746,54.745552 v 16"/><path d="m 90.03746,62.745552 h -16"/><path d="m 72.5023,80.767008 v 8"/><path d="m 76.5023,84.767008 h -8"/><path d="m 14.7461264,54.15018 v 8"/><path d="m 18.7461264,58.15018 h -8"/></g>'),this.createPinIconUrl(),this.initializeInvalidKeys(),this.addSettingTab(new Ac(this)),this.registerEvent(this.app.workspace.on("layout-ready",()=>{this.loadGraphsManager(),this.onLayoutChange()})),this.registerEvent(this.app.workspace.on("file-open",async t=>{if(!Ap()||!t||t.extension!=="md")return;let i=this.app.workspace.getActiveViewOfType(Zr.MarkdownView);!i||i.file!==t||this.onMarkdownViewOpen(i)}))}initializeInvalidKeys(){for(let t of Object.keys(f.settings.additionalProperties))$0[t]=[]}loadGraphsManager(){f.graphsManager=new Ml,f.statesManager=new Gl,this.addChild(f.graphsManager),f.graphsManager.load()}createPinIconUrl(){let i=getComputedStyle(document.body).getPropertyValue("--color-base-00"),s=(0,Zr.getIcon)("pin");if(s){let n=s.getElementsByTagName("path")[0],o=s.getElementsByTagName("path")[1];o.setAttribute("fill",f.app.getAccentColor()),o.setAttribute("stroke",i),n.setAttribute("stroke",f.app.getAccentColor());let a=new XMLSerializer;f.pinSVGDataUrl=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(a.serializeToString(s))}`}}onunload(){}async loadSettings(){let t=await this.loadData();this.completeDefaultSettings(),t?t=this.migrateSettings(t):t=Ti;for(let i in t)Ti.hasOwnProperty(i)||delete t[i];this.loadSettingsRec(Ti,t),f.settings=t}migrateSettings(t){if(!t)return Ti;if(typeof t!="object")return Ti;if("additionalProperties"in t&&typeof t.additionalProperties=="object"){for(let i of Object.keys(t.additionalProperties))if(typeof t.additionalProperties[i]=="boolean"){let s=t.additionalProperties[i];t.additionalProperties[i]={graph:s,localgraph:s}}}return"enableFeatures"in t||(t.enableFeatures={graph:{},localgraph:{}}),"linksSameColorAsNode"in t&&(t.enableFeatures.graph.linksSameColorAsNode=t.linksSameColorAsNode,t.enableFeatures.localgraph.linksSameColorAsNode=t.linksSameColorAsNode,delete t.linksSameColorAsNode),"enableFeatures"in t&&("curvedLinks"in t.enableFeatures.graph&&(t.curvedLinks=t.enableFeatures.graph.curvedLinks),delete t.enableFeatures.graph.curvedLinks,delete t.enableFeatures.localgraph.curvedLinks),"source"in t.enableFeatures.graph&&(t.disableSource=t.enableFeatures.graph.source,delete t.enableFeatures.graph.source,delete t.enableFeatures.localgraph.source),"target"in t.enableFeatures.graph&&(t.disableTarget=t.enableFeatures.graph.target,delete t.enableFeatures.graph.target,delete t.enableFeatures.localgraph.target),"collapsedSettings"in t&&"property-key"in t.collapsedSettings&&delete t.collapsedSettings["property-key"],"iconProperty"in t&&("iconProperties"in t||(t.iconProperties=[]),t.iconProperties.contains(t.iconProperty)||t.iconProperties.push(t.iconProperty),delete t.iconProperty),"nodesSizeProperty"in t&&("nodesSizeProperties"in t||(t.nodesSizeProperties=[]),t.nodesSizeProperties.contains(t.nodesSizeProperty)||t.nodesSizeProperties.push(t.nodesSizeProperty),delete t.nodesSizeProperty),"imageProperty"in t&&("imageProperties"in t||(t.imageProperties=[]),t.imageProperties.contains(t.imageProperty)||t.imageProperties.push(t.imageProperty),delete t.imageProperty),"usePropertyForName"in t&&("usePropertiesForName"in t||(t.usePropertiesForName=[]),t.usePropertyForName&&!t.usePropertiesForName.contains(t.usePropertyForName)&&t.usePropertiesForName.push(t.usePropertyForName),delete t.usePropertyForName),t}completeDefaultSettings(){Ti.interactiveSettings[Ue]={colormap:"hsv",colors:[],unselected:[],noneType:"none",showOnGraph:!0,enableByDefault:!0},Ti.interactiveSettings[de]={colormap:"rainbow",colors:[],unselected:[],noneType:"none",showOnGraph:!0,enableByDefault:!0},Ti.interactiveSettings[he]={colormap:"winter",colors:[],unselected:[],noneType:".",showOnGraph:!0,enableByDefault:!1}}loadSettingsRec(t,i){if(!(!t||typeof t!="object"||Array.isArray(t))&&!(!i||typeof i!="object"||Array.isArray(i)))for(let s in t)i.hasOwnProperty(s)?this.loadSettingsRec(t[s],i[s]):i[s]=t[s]}async saveSettings(){await this.saveData(f.settings)}async onLayoutChange(){if(this.app.internalPlugins.getPluginById("graph")?._loaded){this.waitingTime=0;try{let i=await this.waitForRenderer()?this.getAllGraphLeaves():[];f.graphsManager.syncWithLeaves(i),i.forEach(s=>{f.graphsManager.onNewLeafOpen(s)})}catch(t){console.error(t)}}}waitForRenderer(){return new Promise(t=>{let i=setInterval(()=>{this.waitingTime+=200,this.isGraphOpen()?this.clearWaitInterval(i,t,!0):this.waitingTime>500&&this.clearWaitInterval(i,t,!1)},100)})}clearWaitInterval(t,i,s){clearInterval(t),this.waitingTime=0,i(s)}isGraphOpen(){return!!(this.app.workspace.getLeavesOfType("graph").find(t=>this.isGraph(t))||this.app.workspace.getLeavesOfType("localgraph").find(t=>this.isGraph(t))||dn()?.graphViews.find(t=>this.isGraph(t.leaf)))}getAllGraphLeaves(){let t=[];return t=t.concat(this.app.workspace.getLeavesOfType("graph").filter(i=>this.isGraph(i))),t=t.concat(this.app.workspace.getLeavesOfType("localgraph").filter(i=>this.isGraph(i))),t=t.concat(dn()?.graphViews.map(i=>i.leaf)||[]),[...new Set(t)]}isGraph(t){return t.view instanceof Zr.View&&t.view._loaded&&Tp(t)}onMarkdownViewOpen(t){let i=t.contentEl,s={attributes:!0,childList:!0,subtree:!0},n=(a,l)=>{for(let u of a)u.type==="childList"&&u.addedNodes.length>0&&u.addedNodes[0].classList?.contains(Go())&&this.onLayoutChange()},o=new MutationObserver(n);o.observe(i,s),setTimeout(()=>{o.disconnect()},2e3)}};
/*! Bundled license information:
@pixi/filter-outline/dist/filter-outline.mjs:
(*!
* @pixi/filter-outline - v5.2.0
* Compiled Tue, 28 Feb 2023 14:24:35 UTC
*
* @pixi/filter-outline is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*)
*/
/* nosourcemap */