/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/

var Eo=Object.defineProperty;var nn=Object.getOwnPropertyDescriptor;var an=Object.getOwnPropertyNames;var sn=Object.prototype.hasOwnProperty;var dt=(s,i)=>{for(var e in i)Eo(s,e,{get:i[e],enumerable:!0})},rn=(s,i,e,t)=>{if(i&&typeof i=="object"||typeof i=="function")for(let o of an(i))!sn.call(s,o)&&o!==e&&Eo(s,o,{get:()=>i[o],enumerable:!(t=nn(i,o))||t.enumerable});return s};var ln=s=>rn(Eo({},"__esModule",{value:!0}),s);var fa={};dt(fa,{default:()=>So});module.exports=ln(fa);var S=require("obsidian");var A=require("obsidian");var De=require("obsidian");var Co={};dt(Co,{command:()=>pn,default:()=>bn,export:()=>dn,import:()=>un,notice:()=>cn,plugin:()=>mn,setting:()=>gn,toolbar:()=>hn});var pn={"name-focus":"Fokus","name-item-suggester":"Schnellwahl \xF6ffen","name-toolbar-suggester":"\xD6ffne Schnellwahl","name-copy-command-uri":"URI f\xFCr Befehl kopieren","name-copy-command-as-data-element":"Callout Element f\xFCr Befehl kopieren","copy-command-notice":"Befehl in Zwischenablage kopiert","name-settings":"Plugin-Einstellungen \xF6ffnen","name-toolbar-settings":"Toolbar-Einstellungen \xF6ffnen","name-show-properties":"Eigenschaften anzeigen","name-hide-properties":"Eigenschaften ausblenden","name-fold-properties":"Eigenschaften einklappen","name-toggle-properties":"Eigenschaften-Anzeige umschalten"},dn={"item-generic":"Element{{number}}","label-callout":"Als Hinweis kopieren","label-share":"Teilen...","label-share-description":"Teile diesen Link mit einem anderen Note Toolbar-Nutzer, um deine Toolbar zu seinem Vault hinzuzuf\xFCgen.","label-share-preview":"Vorschau","title-share":"Toolbar teilen: {{toolbar}}","button-copy-link":"Link kopieren","button-copy-link-description":"Kopiere diesen Link in die Zwischenablage","notice-completed":"Toolbar als Hinweis in die Zwischenablage kopiert. \xD6ffne die Einstellungen, um das Format anzupassen.","notice-shared":"Note Toolbar-Link in die Zwischenablage kopiert","warning-share-menu":"Diese Toolbar verweist auf mindestens eine andere Toolbar, die der Empf\xE4nger nicht erhalten wird.","warning-share-length":"Einige Webbrowser k\xF6nnen m\xF6glicherweise keine URLs laden, die l\xE4nger als 2.048 Zeichen sind.","option-uri":"Obsidian URI verwenden","option-uri-description":"Bietet einen obsidian://-Link anstelle einer https://-URL."},un={"title-import":"Toolbar aus Hinweis erstellen","title-import-confirmation":"Note Toolbar erstellen: {{toolbar}}","title-import-into":"Hinweis-Elemente zu Toolbar hinzuf\xFCgen: {{toolbar}}","label-import-confirmation":"Best\xE4tige, dass du diese Toolbar hinzuf\xFCgen m\xF6chtest. Sobald sie hinzugef\xFCgt ist, muss diese Toolbar einem oder mehreren Notizen zugeordnet werden.","label-import":"F\xFCge unten einen Note Toolbar-Hinweis ein, und er wird als neue Toolbar hinzugef\xFCgt.","label-import-into":"F\xFCge unten einen Note Toolbar-Hinweis ein, und seine Elemente werden zu dieser Toolbar hinzugef\xFCgt.","label-import-into-help":"Die \xDCberschrift des Hinweises ist nicht erforderlich und wird ignoriert, falls vorhanden.","button-add-items":"Elemente hinzuf\xFCgen","button-cancel":"Abbrechen","button-create":"Erstellen","button-confirm":"Best\xE4tigen","option-create":"Note Toolbar aus Hinweis erstellen...","option-help":"\xDCber Note Toolbar-Hinweise","button-import-tooltip":"Toolbar aus Hinweis erstellen","button-import-into-tooltip":"Toolbarelemente aus Hinweis hinzuf\xFCgen","error-invalid-uri-content":"Note Toolbar: Es scheint ein Problem mit diesem Link zu geben. \xDCberpr\xFCfe, ob die URI korrekt ist, oder schaue im Benutzerhandbuch nach.","errorlog-heading":"Fehler w\xE4hrend des Toolbar-Imports gefunden:","errorlog-item":"Element {{number}}:","errorlog-command-not-recognized":"Befehl nicht erkannt: {{command}}","errorlog-icon-not-found":"Icon nicht gefunden: {{icon}}","errorlog-invalid-format":"Ung\xFCltiges Format: {{line}}","errorlog-invalid-styles":"Ung\xFCltige(r) Stil(e) ignoriert: {{styles}}","errorlog-menu-not-found":"Men\xFC nicht gefunden: {{menu}}","placeholder-import-into":"> Note Toolbar-Hinweis-Markdown...","warning-invalid-plugins":"Diese Toolbar verwendet Plugins, die bei dir nicht installiert und aktiviert sind:","warning-vars":"Diese Toolbar verwendet Variablen, die du anpassen kannst, um sie mit deinem Vault zu verwenden."},cn={"error-command-not-found":"\xDCberpr\xFCfung der Note Toolbar Einstellungen auf diesen Befehl. Befehl nicht gefunden: {{command}}","error-folder-not-found":"\xDCberpr\xFCfung der Note Toolbar Einstellungen auf diesen Ordner. Ordner nicht gefunden: {{folder}}","error-item-menu-not-found":"\xDCberpr\xFCfung der Note Toolbar Einstellungen auf diesen Men\xFC-Punkt. Toolbar nicht gefunden: {{toolbar}}","error-toolbar-not-found":"\xDCberpr\xFCfung der Note Toolbar Einstellungen auf diese Toolbar. Toolbar nicht gefunden: {{folder}}","error-uri-params-not-supported":"Einer oder mehrere dieser Note Toolbar-URI-Parameter werden nicht unterst\xFCtzt: {{params}}"},mn={name:"Note Toolbar"},gn={"button-cancel":"Abbrechen","button-collapse-tooltip":"Abschnitt schlie\xDFen","button-delete-tooltip":"L\xF6schen","button-drag-tooltip":"Ziehen zum Umsortieren","button-expand-tooltip":"Abschnitt erweitern","button-help":"Hilfe","button-help-tooltip":"Hilfe-Fenster \xF6ffnen","button-learn-more":"Mehr\xA0erfahren","button-user-guide":"Benutzer\xA0Handbuch","button-whats-new":"Was ist\xA0neu?","button-whats-new-tooltip":"Was ist neu-Fenster \xF6ffnen","error-old-settings-name":"\u26A0\uFE0F Fehler: Bitte Note Toolbar deaktivieren und reaktivieren, oder Obsidian neustarten.","error-old-settings-description":"Alte Einstellungsdatei geladen ({{oldVersion}}), aber aktuellste ist {{currentVersion}}","option-platform-desktop":"Desktop","option-platform-mobile":"Mobile","title-edit-toolbar":"Toolbar bearbeiten: {{toolbar}}","title-edit-toolbar_none":"Toolbar bearbeiten","command-suggest-modal":{placeholder:"Nach einem Befehl suchen...","instruction-navigate":"zum Navigieren","instruction-use":"zum Ausw\xE4hlen des Befehls","instruction-dismiss":"zum Schlie\xDFen"},"copy-as-callout":{title:"Als Hinweis kopieren",description:"Definiere, was passiert, wenn Toolbars in Callouts umgewandelt werden.","option-icons":"Symbole einbeziehen","option-icons-description":"F\xFCge Symbol-Platzhalter zu Callouts hinzu. (Beispiel: :LiHome:) Das Iconize-Plugin muss installiert und aktiviert sein, um Symbole anzuzeigen. Wenn es deaktiviert ist, werden Tooltips verwendet, falls keine Beschriftungen gesetzt sind. Symbole k\xF6nnen von anderen Benutzern importiert werden.","option-vars":"Variablen ersetzen","option-vars-description":"Alle im Toolbar verwendeten Variablen werden durch Werte aus der aktuell ge\xF6ffneten Notiz ersetzt. Beispiel: {{note_title}} \u2192 Meine Notiz","option-ids":"IDs in Men\xFCpunkten verwenden","option-ids-description":"Dies stellt sicher, dass Men\xFCpunkte weiterhin funktionieren, wenn die Men\xFC-Toolbar umbenannt wird. Wenn du Hinweise teilen m\xF6chtest, schalte dies aus und der Name der Toolbar wird verwendet.","option-data":"Daten-Elemente verwenden","option-data-description":"Daten-Elemente erm\xF6glichen es, dass Toolbars in neuen Fenstern weiterhin funktionieren. Wenn deaktiviert, werden Note Toolbar-URIs anstelle von Daten-Elementen verwendet, was auch f\xFCr saubereres Markdown sorgt."},"delete-toolbar":{name:"Diese Toolbar l\xF6schen",description:"Dies kann nicht r\xFCckg\xE4ngig gemacht werden.",title:"Toolbar l\xF6schen: {{toolbar}}","button-delete":"L\xF6schen...","button-delete-confirm":"L\xF6schen","button-delete-tooltip":"Diese Toolbar l\xF6schen","label-delete-confirm":"Sind Sie sicher, dass sie diese Toolbar l\xF6schen m\xF6chten?"},"display-rules":{name:"Anzeigeregeln",description:"Einstellung bei welchen Notizen eine Toolbar angezeigt wird.","option-property":"Eigenschaft","option-property-description":"Wenn in dieser Eigenschaft ein Symbolleistenname gefunden wird, wird die Symbolleiste in der Notiz angezeigt. Sie hat Vorrang vor allen Ordnerzuordnungen. Setzen Sie sie auf \u201Enone\u201C, um die Symbolleiste auszublenden.","option-property-placeholder":"Eigenschaft"},help:{title:"Hilfe zur Verwendung der Note Toolbar \u{1F6DF}",description:"Erstelle kontextabh\xE4ngige Toolbars f\xFCr deine Notizen.","button-donate":"Spenden \u2197","button-donate-tooltip":"buymeacoffee.com \xF6ffnen","button-open":"\xD6ffnen \u2197","button-open-github":"github.com \xF6ffnen","button-open-google":"google.com \xF6ffnen","button-read":"Lesen \u2197","label-article-1":"Erstellen von Toolbarelementen","label-article-1-description":"Lerne die verschiedenen Typen von Elementen kennen.","label-article-2":"Note Toolbar-Hinweise","label-article-2-description":"Lerne, wie du Toolbars in deinen Notizen erstellst.","label-bug":"Einen Fehler melden","label-bug-description":"Ein Problem gefunden? Bitte logge einen Fehler in GitHub oder f\xFClle dieses Google-Formular aus.","label-donate":"Kauf mir einen Kaffee","label-donate-description":"Wenn du dieses Plugin n\xFCtzlich findest und mich finanziell unterst\xFCtzen m\xF6chtest, kannst du eine Spende in Betracht ziehen. Vielen Dank!","label-feedback":"Feedback geben","label-feedback-description":"Nutze dieses Google-Formular f\xFCr Feedback, Fragen, Probleme oder Ideen, die du hast.","label-support":"Unterst\xFCtzung erhalten","label-support-description":"Besuche die Foren auf GitHub, um der Community Fragen zu stellen.","label-user-guide":"Benutzerhandbuch lesen","label-user-guide-description":"Erfahre, wie du das Plugin optimal nutzen kannst, inklusive Tipps und Beispielen."},"icon-suggester":{"option-no-icon":"Kein Symbol",placeholder:"Symbol suchen","instruction-navigate":"zum Navigieren","instruction-use":"zur Verwendung","instruction-dismiss":"zum Verwerfen"},item:{"button-duplicate-tooltip":"Dieses Element duplizieren","button-icon-tooltip":"Symbol w\xE4hlen (optional)","label-preview-edit":"Toolbar bearbeiten: {{toolbar}}","label-preview-empty-no-items":"Keine Elemente. Toolbar bearbeiten, um Elemente hinzuzuf\xFCgen.","option-break":"Umbruch","option-command":"Befehl","option-command-error-does-not-exist":"Dieser Befehl existiert nicht.","option-command-error-not-available-install":"Dieser Befehl ist nicht verf\xFCgbar. Das Plugin muss installiert und aktiviert sein.","option-command-error-not-available-search":"Dieser Befehl kann nicht gefunden werden. Versuche es erneut zu suchen.","option-command-error-refresh":"Aktualisieren","option-command-placeholder":"Befehl suchen","option-component-icon":"Symbol","option-component-label":"Bezeichnung","option-file":"Datei","option-file-placeholder":"Datei oder Ordner suchen","option-file-error-does-not-exist":"Datei oder Ordner existiert nicht.","option-item-group":"Element-Gruppe","option-item-group-placeholder":"Toolbar","option-item-group-help":"Symbolleiste ausw\xE4hlen, um sie in diese einzuf\xFCgen.","option-item-group-error-does-not-exist":"Toolbar exisitert nicht.","option-item-group-error-invalid":"\u26A0\uFE0F Ung\xFCltige Elementgruppe","option-item-menu":"Element-Men\xFC","option-item-menu-placeholder":"Toolbar","option-item-menu-help":"Toolbar w\xE4hlen, um sie als Men\xFC zu \xF6ffnen.","option-item-menu-error-does-not-exist":"Toolbar existiert nicht.","option-label-placeholder":"Bezeichnung (optional, bei Symbolwahl)","option-separator":"Trenner","option-tooltip-placeholder":"Tooltip (optional)","option-uri":"URI","option-uri-placehoder":"Webseite, URI oder Notiztitel","option-uri-help":"Tipp: Verwenden Sie Notiz-Eigenschaften in URIs.","option-visibility-component-hidden-platform":"{{component}} ausgeblendet auf {{platform}}","option-visibility-component-visible-platform":"{{component}} sichtbar auf {{platform}}","option-visibility-hidden":"ausgeblendet","option-visibility-hidden-platform":"ausgeblendet auf {{platform}}","option-visibility-visible-platform":"sichtbar auf {{platform}}","option-visibility-platform-desktop":"Desktop","option-visibility-platform-mobile":"Mobile"},"item-suggest-modal":{placeholder:"Element suchen...","instruction-back":"zum Zur\xFCckgehen","instruction-navigate":"zum Navigieren","instruction-use":"zum Verwenden des Elements","instruction-dismiss":"zum Schlie\xDFen","key-back":"\u232B oder \u2190","key-navigate":"\u2191\u2193","key-use":"\u21B5","key-dismiss":"Esc"},items:{name:"Elemente","name-with-count":"Elemente ({{count}})",description:"Elemente zur Toolbar hinzuf\xFCgen, in Reihenfolge.","label-empty-no-items":"Keine Toolbar-Elemente.","button-add-break-tooltip":"Zeilenumbruch zur Toolbar hinzuf\xFCgen.","button-add-separator-tooltip":"Trenner zur Toolbar hinzuf\xFCgen","button-new-item":"+ Toolbar-Element hinzuf\xFCgen","button-new-item-tooltip":"Neues Element der Toolbar hinzuf\xFCgen","option-item-empty-label":"Keine Bezeichnung festgelegt","option-edit-item-group-tooltip":"Element-Gruppe bearbeiten: {{toolbar}}","option-edit-item-group-tooltip_none":"Element-Gruppe bearbeiten","option-edit-item-tooltip":"Toolbar-Element bearbeiten","option-edit-item-type-tooltip":"Bearbeiten {{itemType}}"},mappings:{name:"Ordnerzuweisungen","name-with-count":"Ordnerzuweisungen ({{count}})",description:"Notizen in den unten aufgef\xFChrten Ordnern zeigen die zugewiesene Toolbar an. Die Reihenfolge wird von oben nach unten priorisiert.","label-empty":"Klicke auf die Schaltfl\xE4che, um eine Zuweisung zu erstellen.","placeholder-folder":"Ordner","placeholder-toolbar":"Toolbar","button-collapse-tooltip":"Alle Zuweisungen einklappen","button-expand-tooltip":"Alle Zuweisungen ausklappen","button-new":"+ Neue Zuweisung","button-new-tooltip":"Eine neue Zuweisung hinzuf\xFCgen","option-folder-all":"Alle Ordner","option-folder-root":"Nur Hauptordner","error-folder-already-mapped":"Dieser Ordner hat bereits eine zugewiesene Toolbar."},name:{name:"Name",description:"Dieser Toolbar einen eindeutigen Namen geben.","error-toolbar-already-exists":"Eine Toolbar mit diesem Namen existiert bereits."},other:{name:"Sonstiges",icon:{name:"Symbol",description:"Legt das Symbol f\xFCr die schwebende Schaltfl\xE4che und die Navigationsleiste (mobil) fest. Erfordert einen Neustart.",tooltip:"Symbol w\xE4hlen"},"ribbon-action":{name:"Aktion des Ribbon-Icons \u{1F4F1}",description:"Aktion, die ausgef\xFChrt wird, wenn das Ribbon-Icon (auf Mobilger\xE4ten) verwendet wird.","option-toolbar":"Aktuelle Toolbar anzeigen","option-item-suggester":"Alle Werkzeuge anzeigen","option-toolbar-suggester":"Alle Toolbars anzeigen"},"show-edit-tbar":{name:"Zeige 'Toolbar bearbeiten' in Toolbar-Men\xFCs",description:"F\xFCgt ein Element f\xFCr den Zugriff auf die Einstellungen der Symbolleiste in den Men\xFCs der Symbolleiste hinzu."}},position:{name:"Position",description:"Positionierung der Toolbar.","option-mobile-help":"Tipp: Greifen Sie \xFCber die Navigationsleiste auf die Symbolleisten zu.","option-fabl":"schwebende Schaltfl\xE4che: links","option-fabr":"schwebende Schaltfl\xE4che: rechts","option-hidden":"ausgeblendet","option-hidden-mobile":"ausgeblendet / Navigationsleiste","option-props":"unterhalb der Eigenschaften","option-top":"oben (fixiert)"},styles:{name:"Stile",description:"Liste der Stile, die auf die Symbolleiste angewendet werden sollen.",help:"Passen Sie noch mehr an mit dem Style Settings Plugin.","option-autohide":"automatisch ausblenden*","option-autohide-disclaimer":"Automatisches Ausblenden funktioniert nicht auf Mobilger\xE4ten.","option-between":"Abstand zwischen den Elementen","option-border":"Rand","option-button":"Schaltfl\xE4chenelemente","option-center":"Elemente zentrieren","option-even":"Elemente gleichm\xE4\xDFig verteilen","option-floatl":"nach links schwebend*","option-floatl-disclaimer":"Schwebend nach links funktioniert nur innerhalb von Callouts.","option-floatr":"nach rechts schwebend*","option-floatr-disclaimer":"Schwebend nach rechts funktioniert nur innerhalb von Callouts.","option-left":"Elemente links ausrichten","option-noborder":"kein Rand","option-nofloat":"kein Schwebend","option-notsticky":"nicht fixiert","option-nowrap":"Elemente nicht umschlie\xDFen*","option-nowrap-disclaimer":"Funktioniert am besten, wenn Elemente nicht gleichm\xE4\xDFig verteilt oder zentriert sind.","option-nowide":"Inhaltbreite*","option-nowide-disclaimer":"Inhaltbreite funktioniert nur, wenn die Symbolleistenposition oben (fest) ist.","option-right":"Elemente rechts ausrichten","option-sticky":"fixiert*","option-sticky-disclaimer":"Fixiert funktioniert nicht im Lesemodus.","option-wide":"Editorbreite*","option-wide-disclaimer":"Editorbreite funktioniert nur, wenn die Symbolleistenposition oben (fest) ist.","option-default-name":"Standard","option-default-description":"Gilt f\xFCr alle Plattformen, sofern nicht \xFCberschrieben.","option-default-empty":"Keine Standardstile festgelegt.","option-mobile-name":"Mobil","option-mobile-description":"Standardstile \xFCberschreiben.","option-mobile-empty":"Keine mobilen Stile festgelegt. Verwende Standardstile.","style-tooltip-use-class":"In Callout oder CSS verwenden: {{class}}","style-remove-tooltip":"Entfernen"},"toolbar-suggest-modal":{placeholder:"Nach einer Toolbar suchen...","instruction-navigate":"zum Navigieren","instruction-use":"zum \xD6ffnen der Toolbar","instruction-dismiss":"zum Schlie\xDFen"},toolbars:{name:"Toolbars","name-with-count":"Toolbars ({{count}})",description:"Definieren Sie die Toolbars, die Sie zu Ihren Notizen hinzuf\xFCgen m\xF6chten.","button-collapse-tbars-tooltip":"Alle Toolbars minimieren","button-duplicate-tbar-tooltip":"Diese Toolbar duplizieren","button-edit-tbar":"Bearbeiten","button-expand-tbars-tooltip":"Alle Toolbars erweitern","button-edit-tbar-tooltip":"Diese Toolbar erweitern","button-new-tbar":"+ Neue Toolbar","button-new-tbar-tooltip":"Neue Toolbar hinzuf\xFCgen","duplicated-tbar-suffix":"Kopieren","label-empty-create-tbar":"Klicken Sie auf die Schaltfl\xE4che, um eine Toolbar zu erstellen.","label-tbar-name-not-set":"\u26A0\uFE0F Toolbar-Name nicht festgelegt"},usage:{name:"Verwendung",description:"Diese Toolbar wird in {{mappingCount}} Zuordnung(en) und {{itemCount}} Toolbar-Element(en) verwendet..","description-search":"Nach der Verwendung von Eigenschaften suchen"},"whats-new":{title:"Was gibt es Neues in Note Toolbar?","button-read":"Lesen \u2197","button-read-tooltip":"github.com \xF6ffnen","label-release-notes":"Versionshinweise","label-release-notes-description":"Detaillierte Hinweise zu den neuesten Versionen findest du auf GitHub.","label-roadmap":"Was steht f\xFCr Note Toolbar an?","label-roadmap-description":"Sieh dir die Roadmap an, um einen Blick auf die in Betracht gezogenen Funktionen zu werfen."}},hn={"button-floating-tooltip":"Note Toolbar \xF6ffnen","menu-edit-toolbar":"Toolbar bearbeiten: {{toolbar}}...","menu-position":"Position festlegen","menu-toolbar-settings":"Note Toolbar Einstellungen..."},bn={command:pn,export:dn,import:un,notice:cn,plugin:mn,setting:gn,toolbar:hn};var ko={};dt(ko,{adapter:()=>fn,command:()=>wn,default:()=>kn,export:()=>yn,import:()=>vn,notice:()=>Tn,plugin:()=>Sn,setting:()=>En,toolbar:()=>Cn});var fn={args:"Arguments (optional)","args-description":"Arguments accepted by your script function, in comma-separated 'name: value' format, with string values in quotes.",outputcontainer:"Output callout ID (optional)","outputcontainer-description":"Add a note-toolbar-output callout with a unique meta field to your note to put text output.",postCommand:"Command after execution (optional)","postCommand-description":"Command to run after the script completes.",dataview:{"error-general":"Dataview error: Check console for more details.\n```\n{{error}}\n```","dvjs-function":"Evaluate Dataview JS expression","dvjs-expr":"Dataview JS expression","dvjs-expr-description":"Dataview JS expression to evaluate.","dvjs-expr-error-required":"Error: A Dataview JS expression is required","exec-function":"Execute JavaScript","exec-sourcefile":"JavaScript file","exec-sourcefile-description":"Dataview JS file to execute.","exec-error-required":"Error: A script file is required","eval-function":"Evaluate Dataview expression","eval-expr":"Dataview expression","eval-expr-description":"Dataview expression to evaluate.","eval-expr-error-required":"Error: A Dataview expression is required","query-function":"Execute query","query-expr":"Query","query-expr-description":"Dataview query to evaluate.","query-expr-error-required":"Error: A Dataview query is required"},"js-engine":{"exec-function":"Execute JavaScript","exec-sourcefile":"JavaScript file","exec-sourcefile-description":"JavaScript file to execute.","exec-sourcefile-error-required":"Error: A JavaScript file is required","importexec-function":"Import and execute JavaScript","importexec-sourcefile":"JavaScript file","importexec-sourcefile-description":"JavaScript file to import. Note that this file is only imported once. You may have to restart Obsidian in order to pick up changes.","importexec-sourcefile-error-required":"Error: A JavaScript file is required","importexec-sourcefunction":"Function (optional)","importexec-sourcefunction-description":"If the script has functions, function name to execute.","importexec-args":"Arguments (optional)","importexec-args-description":"Arguments accepted by your script function, in comma-separated 'name: value' format, with string values in quotes."},templater:{"append-function":"Insert template","append-sourcefile":"Template","append-sourcefile-description":"Template file to insert.","append-sourcefile-error-required":"Error: A template file is required","create-function":"Create new note from template","create-sourcefile":"Template","create-sourcefile-description":"Template file to create a new file from.","create-sourcefile-error-required":"Error: A template file is required","create-outputfile":"Output filename (optional)","create-outputfile-description":"Name of the file (without file extension) and folder(s) to create, from the provided template.","eval-function":"Execute Templater command","eval-expr":"Templater command","eval-expr-description":"Templater command to execute.","eval-expr-error-required":"Error: A Templater expression is required","exec-function":"Execute Templater file","exec-sourcefile":"Template file","exec-sourcefile-description":"Executes the contents of the file and returns.","exec-sourcefile-error-required":"Error: A Templater file is required"},error:{"args-parsing":"Failed to parse arguments for script: {{filename}}","args-parsing-error":"Failed to parse arguments for script: {{filename}}\n```\n{{error}}\n```","callout-not-found":"Error: Could not find note-toolbar-output callout in current note with ID: {{id}}","exec-failed":"Failed to execute script: {{filename}}","exec-note-not-open":"This script must be executed from an open note.","expr-failed":"Failed to evaluate expression: {{expression}}","expr-note-not-open":"This expression must be executed from an open note.","file-not-found":"File not found: {{filename}}","function-invalid":"Unsupported function: {{function}}","function-not-found":"Function not found: {{function}}","function-note-not-open":"This function must be executed from an open note.","query-failed":"Failed to evaluate query: {{expression}}","query-note-not-open":"This query must be run from an open note."}},wn={"name-focus":"Focus","name-item-suggester":"Open quick tools","name-toolbar-suggester":"Open quick toolbars","name-copy-command-uri":"Copy URI for command","name-copy-command-as-data-element":"Copy callout item for command","copy-command-notice":"Command copied to clipboard","name-settings":"Open plugin settings","name-toolbar-settings":"Open toolbar settings","name-show-properties":"Show Properties","name-hide-properties":"Hide Properties","name-fold-properties":"Fold Properties","name-toggle-properties":"Toggle Properties"},yn={"item-generic":"Item{{number}}","label-callout":"Copy as callout","label-share":"Share...","label-share-description":"Share this link with another Note Toolbar user to add your toolbar to their vault.","label-share-preview":"preview","title-share":"Share toolbar: {{toolbar}}","button-copy-link":"Copy link","button-copy-link-description":"Copy this link to your clipboard","notice-completed":"Toolbar copied to clipboard as callout. Open settings to adjust formatting.","notice-shared":"Note Toolbar link copied to clipboard","warning-share-menu":"This toolbar refers to at least one other toolbar that the recipient won't receive.","warning-share-length":"Some web browsers may not load a URL that is longer than 2,048 characters.","option-uri":"Use Obsidian URI","option-uri-description":"Provides an obsidian:// link instead of an https:// URL."},vn={"title-import":"Create toolbar from callout","title-import-confirmation":"Create Note Toolbar: {{toolbar}}","title-import-into":"Add callout items to toolbar: {{toolbar}}","label-import-confirmation":"Confirm you would like to add this toolbar. Once added, this toolbar will need to be mapped to one or more notes.","label-import":"Paste a Note Toolbar Callout below and it will be added as a new toolbar.","label-import-into":"Paste a Note Toolbar Callout below and its items will be added to this toolbar. Styles will be ignored if provided.","label-import-into-help":"The callout heading is not needed, and will be ignored if provided.","button-add-items":"Add items","button-cancel":"Cancel","button-create":"Create","button-confirm":"Confirm","option-create":"Create Note Toolbar from callout...","option-help":"About Note Toolbar Callouts","button-import-tooltip":"Create toolbar from callout","button-import-into-tooltip":"Add toolbar items from callout","error-invalid-uri-content":"Note Toolbar: It looks like there's an issue with this link. Check the URI is correct, or review the user guide.","errorlog-heading":"Errors found during toolbar import:","errorlog-item":"Item {{number}}:","errorlog-command-not-recognized":"Command not recognized: {{command}}","errorlog-icon-not-found":"Icon not found: {{icon}}","errorlog-invalid-format":"Invalid format: {{line}}","errorlog-invalid-styles":"Ignored invalid style(s): {{styles}}","errorlog-menu-not-found":"Menu not found: {{menu}}","placeholder-import-into":"> Note Toolbar Callout markdown...","warning-invalid-plugins":"This toolbar uses plugins you do not have installed and enabled:","warning-vars":"This toolbar uses variables, which you can modify to work with your vault."},Tn={"error-command-not-found":"Check Note Toolbar setting or URI for this command. Command not found: {{command}}","error-folder-not-found":"Check Note Toolbar setting or URI for this folder. Folder not found: {{folder}}","error-item-menu-not-found":"Check Note Toolbar setting or URI for this menu item. Toolbar not found: {{toolbar}}","error-scripting-not-enabled":"Enable Scripting in Note Toolbar settings to use this item.","error-scripting-plugin-not-enabled":"Toggle the Scripting setting after installing and enabling plugin: {{plugin}}","error-toolbar-not-found":"Check Note Toolbar setting or URI for this toolbar. Toolbar not found: {{toolbar}}","error-uri-params-not-supported":"One or more of these Note Toolbar URI parameters is not supported: {{params}}","warning-no-matching-toolbar":`Note Toolbar: No matching toolbar: {{toolbar}}
Click/Tap here to create it.`},Sn={name:"Note Toolbar"},En={"button-cancel":"Cancel","button-collapse-tooltip":"Collapse section","button-delete-tooltip":"Delete","button-drag-tooltip":"Drag to rearrange","button-expand-tooltip":"Expand section","button-help":"Help","button-help-tooltip":"Open the help window","button-learn-more":"Learn\xA0more","button-user-guide":"User\xA0Guide","button-whats-new":"What's\xA0new?","button-whats-new-tooltip":"Open the What's New window","error-old-settings-name":"\u26A0\uFE0F Error: Please disable and renable Note Toolbar, or restart Obsidian.","error-old-settings-description":"Old settings file loaded ({{oldVersion}}) but latest is {{currentVersion}}","option-platform-desktop":"Desktop","option-platform-mobile":"Mobile","title-edit-toolbar":"Edit Toolbar: {{toolbar}}","title-edit-toolbar_none":"Edit Toolbar","command-suggest-modal":{placeholder:"Search for a command...","instruction-navigate":"to navigate","instruction-use":"to select command","instruction-dismiss":"to dismiss"},"copy-as-callout":{title:"Copy as callout",description:"Define what happens when toolbars are converted to callouts.","option-icons":"Include icons","option-icons-description":"Add icon placeholders to callouts. (Example: :LiHome:) The Iconize plugin must be installed and enabled to see icons. If disabled, tooltips will be used if labels are not set. Icons can be imported by other users.","option-vars":"Replace variables and expressions","option-vars-description":"Any variables and expressions used in the toolbar will be replaced with values from the note you're currently viewing. Example: {{note_title}} \u2192 My Note","option-ids":"Use IDs in menu items","option-ids-description":"This ensures menu items still work for you if the menu toolbar's renamed. If you want to share callouts, turn this off, and the toolbar's name will be used instead.","option-data":"Use data elements","option-data-description":"Data elements allow toolbars opened in new windows to still work. If disabled, Note Toolbar URIs will be used instead of data elements, and also provide cleaner-looking markdown."},"delete-toolbar":{name:"Delete this toolbar",description:"This action cannot be undone.",title:"Delete toolbar: {{toolbar}}","button-delete":"Delete...","button-delete-confirm":"Delete","button-delete-tooltip":"Delete this toolbar","label-delete-confirm":"Are you sure you want to delete this toolbar?"},"display-rules":{name:"Display rules",description:"Define which notes to display toolbars on, using a property, mappings, or both.","option-property":"Property","option-property-description":"If a toolbar name is found in this property, the toolbar will be displayed on the note. This takes precedence over any folder mappings. In a note, set this property to 'none' to hide the toolbar.","option-property-placeholder":"Property"},help:{title:"Help using Note Toolbar \u{1F6DF}",description:"Create context-aware toolbars for your notes.","button-donate":"Donate \u2197","button-donate-tooltip":"Open buymeacoffee.com","button-open":"Open \u2197","button-open-github":"Open github.com","button-open-google":"Open google.com","button-read":"Read \u2197","label-article-1":"Creating toolbar items","label-article-1-description":"Learn about the different types of items.","label-article-2":"Note Toolbar Callouts","label-article-2-description":"Learn how to create toolbars within your notes.","label-bug":"Report a bug","label-bug-description":"Found a problem? Please log an issue in GitHub, or complete this Google form.","label-donate":"Buy me a coffee","label-donate-description":"If you find this plugin useful, and wish to support me financially, consider donating. Thank you!","label-examples":"See examples","label-examples-description":"Get inspired by these ready-to-go toolbar examples.","label-feedback":"Provide feedback","label-feedback-description":"Use this Google form for any feedback, questions, or ideas you may have.","label-support":"Get support","label-support-description":"Visit the forums on GitHub to ask questions to the community.","label-user-guide":"Read the User Guide","label-user-guide-description":"How to make the most out of the plugin, including tips and examples."},"icon-suggester":{"option-no-icon":"No icon",placeholder:"Search for an icon...","instruction-navigate":"to navigate","instruction-use":"to use icon","instruction-dismiss":"to dismiss"},item:{"button-duplicate-tooltip":"Duplicate this item","button-icon-tooltip":"Select icon (optional)","label-preview-edit":"Edit toolbar: {{toolbar}}","label-preview-empty-no-items":"No items. Edit this toolbar to add items.","option-break":"break","option-command":"Command","option-command-error-does-not-exist":"This command does not exist.","option-command-error-not-available-install":"This command is not available. Plugin must be installed and enabled.","option-command-error-not-available-search":"This command cannot be found. Try searching again.","option-command-error-refresh":"Refresh","option-command-placeholder":"Search for command","option-component-icon":"icon","option-component-label":"label","option-file":"File","option-file-placeholder":"Search for file or folder","option-file-error-does-not-exist":"This file or folder does not exist.","option-item-group":"Item Group","option-item-group-placeholder":"Toolbar","option-item-group-help":"Select a toolbar to insert into this one.","option-item-group-error-does-not-exist":"Toolbar does not exist","option-item-group-error-invalid":"\u26A0\uFE0F Invalid item group","option-item-menu":"Item Menu","option-item-menu-placeholder":"Toolbar","option-item-menu-help":"Select a toolbar to open as a menu.","option-item-menu-error-does-not-exist":"Toolbar does not exist","option-label-placeholder":"Label (optional, if icon set)","option-separator":"separator","option-tooltip-placeholder":"Tooltip (optional)","option-uri":"URI","option-uri-placehoder":"Website, URI, or note title","option-uri-help":"Tip: Use note properties and expressions in URIs.","option-visibility-component-hidden-platform":"{{component}} hidden on {{platform}}","option-visibility-component-visible-platform":"{{component}} visible on {{platform}}","option-visibility-hidden":"hidden","option-visibility-hidden-platform":"hidden on {{platform}}","option-visibility-visible-platform":"visible on {{platform}}","option-visibility-platform-desktop":"desktop","option-visibility-platform-mobile":"mobile"},"item-suggest-modal":{placeholder:"Search for an item...","instruction-back":"to go back","instruction-navigate":"to navigate","instruction-use":"to use item","instruction-dismiss":"to dismiss","key-back":"\u232B or \u2190","key-navigate":"\u2191\u2193","key-use":"\u21B5","key-dismiss":"esc"},items:{name:"Items","name-with-count":"Items ({{count}})",description:"Add items to the toolbar, in order.","label-empty-no-items":"No toolbar items.","button-add-break-tooltip":"Add a line break to the toolbar","button-add-separator-tooltip":"Add a separator to the toolbar","button-new-item":"+ Add toolbar item","button-new-item-tooltip":"Add a new item to the toolbar","option-item-empty-label":"No label set","option-edit-item-group-tooltip":"Edit item group: {{toolbar}}","option-edit-item-group-tooltip_none":"Edit item group","option-edit-item-tooltip":"Edit toolbar item","option-edit-item-type-tooltip":"Edit {{itemType}}"},mappings:{name:"Folder mappings","name-with-count":"Folder mappings ({{count}})",description:"Notes in folders below will display the toolbar mapped to it. Precedence is top to bottom.","label-empty":"Use the button to create a mapping.","placeholder-folder":"Folder","placeholder-toolbar":"Toolbar","button-collapse-tooltip":"Collapse all mappings","button-expand-tooltip":"Expand all mappings","button-new":"+ New mapping","button-new-tooltip":"Add a new mapping","option-folder-all":"all folders","option-folder-root":"root folder only","error-folder-already-mapped":"This folder already has a toolbar associated with it."},name:{name:"Name",description:"Give this toolbar a unique name.","error-toolbar-already-exists":"A toolbar already exists with this name."},other:{name:"Other",icon:{name:"Icon",description:"Sets the icon for the floating button and navigation bar (on phone). Requires restart.",tooltip:"Select icon"},"ribbon-action":{name:"Ribbon icon action \u{1F4F1}",description:"Action to take when the ribbon icon (on phones) is used.","option-toolbar":"Show current toolbar","option-item-suggester":"Show all tools","option-toolbar-suggester":"Show all toolbars"},scripting:{name:"Scripting",description:"Adds item types for Dataview, JS Engine, and Templater, which must be installed and enabled."},"show-edit-tbar":{name:"Show 'Edit toolbar' link in toolbar menus \u{1F4F1}",description:"Adds an item to access the toolbar's settings in toolbars that are displayed as menus at the bottom of the screen on phones."}},position:{name:"Position",description:"Where to position this toolbar.","option-mobile-help":"Tip: Access toolbars from the navigation bar.","option-fabl":"Floating button: left","option-fabr":"Floating button: right","option-hidden":"Hidden (do not display)","option-hidden-mobile":"Hidden / Navigation bar","option-props":"Below Properties","option-top":"Top (fixed)"},styles:{name:"Styles",description:"List of styles to apply to the toolbar.",help:"Customize even more with the Style Settings plugin.","option-placeholder":"Add style...","option-autohide":"auto-hide*","option-autohide-disclaimer":"Auto-hide does not apply on mobile.","option-between":"space between items","option-border":"border","option-button":"button items","option-center":"center items","option-even":"space items evenly","option-left":"left align items","option-noborder":"no border","option-notsticky":"not sticky","option-nowrap":"don't wrap items*","option-nowrap-disclaimer":"Works best if items are not evenly spaced or centered.","option-nowide":"content width","option-right":"right align items","option-sticky":"sticky*","option-sticky-disclaimer":"Sticky does not apply in Reading mode.","option-wide":"editor width","option-custom-name":"Custom","option-custom-description":"List of classes defined in CSS snippets to apply to this toolbar, separated by spaces.","option-custom-empty":"CSS classes","option-default-name":"Default","option-default-description":"Applies to all platforms unless overridden.","option-default-empty":"No default styles set.","option-mobile-name":"Mobile","option-mobile-description":"Override default styles.","option-mobile-empty":"No mobile styles set. Using default styles.","style-tooltip-use-class":"Use in Callout or CSS: {{class}}","style-remove-tooltip":"Remove"},"toolbar-suggest-modal":{placeholder:"Search for a toolbar...","instruction-navigate":"to navigate","instruction-use":"to open toolbar","instruction-dismiss":"to dismiss"},toolbars:{name:"Toolbars","name-with-count":"Toolbars ({{count}})",description:"Define the toolbars you want to add to your notes.","button-duplicate-tbar-tooltip":"Duplicate","button-edit-tbar":"Edit","button-edit-tbar-tooltip":"Update this toolbar","button-more-tooltip":"More options","button-new-tbar":"+ New toolbar","button-new-tbar-tooltip":"Add a new toolbar","duplicated-tbar-suffix":"copy","imported-tbar-name":"New toolbar","label-empty-create-tbar":"Use the button to create a toolbar.","label-tbar-name-not-set":"\u26A0\uFE0F Toolbar name not set"},usage:{name:"Usage",description:"This toolbar is used in {{mappingCount}} mapping(s) and {{itemCount}} toolbar item(s).","description-search":"Search for property usage"},"whats-new":{title:"What's new in Note Toolbar?","button-read":"Read \u2197","button-read-tooltip":"Open github.com","label-release-notes":"Release notes","label-release-notes-description":"Detailed notes for the latest releases are on GitHub.","label-roadmap":"What's ahead for Note Toolbar?","label-roadmap-description":"Check out the Roadmap to preview the features under consideration."}},Cn={"button-floating-tooltip":"Open Note Toolbar","menu-edit-toolbar":"Edit toolbar: {{toolbar}}...","menu-hide-properties":"Hide note properties","menu-position":"Set position","menu-show-properties":"Show note properties","menu-toolbar-settings":"Note Toolbar settings..."},kn={adapter:fn,command:wn,export:yn,import:vn,notice:Tn,plugin:Sn,setting:En,toolbar:Cn};var xo={};dt(xo,{command:()=>xn,default:()=>Ln,export:()=>In,import:()=>An,notice:()=>Mn,plugin:()=>Dn,setting:()=>Fn,toolbar:()=>Nn});var xn={"name-focus":"\u0424\u043E\u043A\u0443\u0441\u0443\u0432\u0430\u043D\u043D\u044F","name-item-suggester":"\u0428\u0432\u0438\u0434\u043A\u0456 \u0456\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u0438","name-toolbar-suggester":"\u0428\u0432\u0438\u0434\u043A\u043E \u043F\u0430\u043D\u0435\u043B\u0456","name-copy-command-uri":"\u041A\u043E\u043F\u0456\u044E\u0432\u0430\u0442\u0438 URI \u0434\u043B\u044F \u043A\u043E\u043C\u0430\u043D\u0434\u0438","name-copy-command-as-data-element":"\u041A\u043E\u043F\u0456\u044E\u0432\u0430\u0442\u0438 \u0435\u043B\u0435\u043C\u0435\u043D\u0442 \u0432\u0438\u043D\u043E\u0441\u043A\u0438 \u0434\u043B\u044F \u043A\u043E\u043C\u0430\u043D\u0434\u0438","copy-command-notice":"\u041A\u043E\u043C\u0430\u043D\u0434\u0443 \u0441\u043A\u043E\u043F\u0456\u0439\u043E\u0432\u0430\u043D\u043E \u0432 \u0431\u0443\u0444\u0435\u0440 \u043E\u0431\u043C\u0456\u043D\u0443","name-settings":"\u041D\u0430\u043B\u0430\u0448\u0442\u0443\u0432\u0430\u043D\u043D\u044F \u0434\u043E\u0434\u0430\u0442\u043A\u0443","name-toolbar-settings":"\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0438 \u043F\u0430\u043D\u0435\u043B\u0456","name-show-properties":"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u0438 \u0432\u043B\u0430\u0441\u0442\u0438\u0432\u043E\u0441\u0442\u0456","name-hide-properties":"\u041F\u0440\u0438\u0445\u043E\u0432\u0430\u0442\u0438 \u0432\u043B\u0430\u0441\u0442\u0438\u0432\u043E\u0441\u0442\u0456","name-fold-properties":"\u0417\u0433\u043E\u0440\u043D\u0443\u0442\u0438 \u0432\u043B\u0430\u0441\u0442\u0438\u0432\u043E\u0441\u0442\u0456","name-toggle-properties":"\u0417\u043C\u0456\u043D\u0438\u0442\u0438 \u0412\u043B\u0430\u0441\u0442\u0438\u0432\u043E\u0441\u0442\u0456"},In={"item-generic":"\u0415\u043B\u0435\u043C\u0435\u043D\u0442{{number}}","label-callout":"\u0421\u043A\u043E\u043F\u0456\u044E\u0432\u0430\u0442\u0438 \u044F\u043A \u0432\u0438\u043D\u043E\u0441\u043A\u0443","label-share":"\u041F\u043E\u0448\u0438\u0440\u0438\u0442\u0438...","label-share-description":"\u041F\u043E\u0448\u0438\u0440\u0442\u0435 \u0446\u0435 \u043F\u043E\u0441\u0438\u043B\u0430\u043D\u043D\u044F\u043C \u0456\u043D\u0448\u043E\u043C\u0443 \u043A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447\u0443 Note Toolbar, \u0449\u043E\u0431 \u0434\u043E\u0434\u0430\u0442\u0438 \u0412\u0430\u0448\u0443 \u043F\u0430\u043D\u0435\u043B\u044C \u0434\u043E \u0439\u043E\u0433\u043E \u0441\u0445\u043E\u0432\u0438\u0449\u0430.","label-share-preview":"\u043F\u0435\u0440\u0435\u0433\u043B\u044F\u0434","title-share":"\u041F\u043E\u0448\u0438\u0440\u0435\u043D\u043D\u044F \u043F\u0430\u043D\u0435\u043B\u0456: {{toolbar}}","button-copy-link":"\u041A\u043E\u043F\u0456\u044E\u0432\u0430\u0442\u0438 \u043F\u043E\u0441\u0438\u043B\u0430\u043D\u043D\u044F","button-copy-link-description":"\u0421\u043A\u043E\u043F\u0456\u044E\u0432\u0430\u0442\u0438 \u0446\u0435 \u043F\u043E\u0441\u0438\u043B\u0430\u043D\u043D\u044F \u0432 \u0431\u0443\u0444\u0435\u0440 \u043E\u0431\u043C\u0456\u043D\u0443","notice-completed":"\u041F\u0430\u043D\u0435\u043B\u044C \u0441\u043A\u043E\u043F\u0456\u0439\u043E\u0432\u0430\u043D\u043E \u0434\u043E \u0431\u0443\u0444\u0435\u0440\u0430 \u043E\u0431\u043C\u0456\u043D\u0443 \u044F\u043A \u0432\u0438\u043D\u043E\u0441\u043A\u0443. \u0412\u0456\u0434\u043A\u0440\u0438\u0439\u0442\u0435 \u043D\u0430\u043B\u0430\u0448\u0442\u0443\u0432\u0430\u043D\u043D\u044F, \u0449\u043E\u0431 \u0437\u043C\u0456\u043D\u0438\u0442\u0438 \u0444\u043E\u0440\u043C\u0430\u0442\u0443\u0432\u0430\u043D\u043D\u044F.","notice-shared":"\u041F\u043E\u0441\u0438\u043B\u0430\u043D\u043D\u044F Note Toolbar \u0441\u043A\u043E\u043F\u0456\u0439\u043E\u0432\u0430\u043D\u043E \u0432 \u0431\u0443\u0444\u0435\u0440 \u043E\u0431\u043C\u0456\u043D\u0443","warning-share-menu":"\u0426\u044F \u043F\u0430\u043D\u0435\u043B\u044C \u043F\u043E\u0441\u0438\u043B\u0430\u0454\u0442\u044C\u0441\u044F \u043F\u0440\u0438\u043D\u0430\u0439\u043C\u043D\u0456 \u043D\u0430 \u043E\u0434\u043D\u0443 \u0456\u043D\u0448\u0443 \u043F\u0430\u043D\u0435\u043B\u044C, \u044F\u043A\u0443 \u043E\u0434\u0435\u0440\u0436\u0443\u0432\u0430\u0447 \u043D\u0435 \u043E\u0442\u0440\u0438\u043C\u0430\u0454.","warning-share-length":"\u0414\u0435\u044F\u043A\u0456 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0438 \u043C\u043E\u0436\u0443\u0442\u044C \u043D\u0435 \u0437\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0438\u0442\u0438 URL-\u0430\u0434\u0440\u0435\u0441\u0438 \u0434\u043E\u0432\u0436\u0438\u043D\u043E\u044E, \u0431\u0456\u043B\u044C\u0448\u0435 \u043D\u0456\u0436 2048 \u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432.","option-uri":"\u0412\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u0430\u0442\u0438 Obsidian URI","option-uri-description":"\u041D\u0430\u0434\u0430\u0454 \u043F\u043E\u0441\u0438\u043B\u0430\u043D\u043D\u044F obsidian:// \u0437\u0430\u043C\u0456\u0441\u0442\u044C URL-\u0430\u0434\u0440\u0435\u0441\u0438 https://."},An={"title-import":"\u0421\u0442\u0432\u043E\u0440\u0438\u0442\u0438 \u043F\u0430\u043D\u0435\u043B\u044C \u0456\u0437 \u0432\u0438\u043D\u043E\u0441\u043A\u0438","title-import-confirmation":"\u0421\u0442\u0432\u043E\u0440\u0438\u0442\u0438 Note Toolbar: {{toolbar}}","title-import-into":"\u0414\u043E\u0434\u0430\u0442\u0438 \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438 \u0432\u0438\u043D\u043E\u0441\u043A\u0438 \u0434\u043E \u043F\u0430\u043D\u0435\u043B\u0456: {{toolbar}}","label-import-confirmation":"\u041F\u0456\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C, \u0449\u043E \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0441\u0442\u0432\u043E\u0440\u0438\u0442\u0438 \u043D\u043E\u0432\u0443 \u043F\u0430\u043D\u0435\u043B\u044C. \u041F\u0456\u0441\u043B\u044F \u0434\u043E\u0434\u0430\u0432\u0430\u043D\u043D\u044F \u0446\u044E \u043F\u0430\u043D\u0435\u043B\u044C \u043F\u043E\u0442\u0440\u0456\u0431\u043D\u043E \u0431\u0443\u0434\u0435 \u0437\u0456\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0437 \u043E\u0434\u043D\u0456\u0454\u044E, \u0430\u0431\u043E \u043A\u0456\u043B\u044C\u043A\u043E\u043C\u0430 \u043D\u043E\u0442\u0430\u0442\u043A\u0430\u043C\u0438.","label-import":"\u0412\u0441\u0442\u0430\u0432\u0442\u0435 \u0432\u0438\u043D\u043E\u0441\u043A\u0443 Note Toolbar \u043D\u0438\u0436\u0447\u0435 \u0434\u043B\u044F \u0456\u043C\u043F\u043E\u0440\u0442\u0443 \u0434\u043E \u0446\u0456\u0454\u0457 \u043F\u0430\u043D\u0435\u043B\u0456.","label-import-into":"\u0412\u0441\u0442\u0430\u0432\u0442\u0435 \u0432\u0438\u043D\u043E\u0441\u043A\u0443 Note Toolbar \u043D\u0438\u0436\u0447\u0435 \u0434\u043B\u044F \u0434\u043E\u0434\u0430\u0432\u0430\u043D\u043D\u044F \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432 \u0434\u043E \u0446\u0456\u0454\u0457 \u043F\u0430\u043D\u0435\u043B\u0456.","label-import-into-help":"\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u0432\u0438\u043D\u043E\u0441\u043A\u0438 \u043D\u0435 \u043F\u043E\u0442\u0440\u0456\u0431\u0435\u043D, \u0430\u0431\u043E \u0431\u0443\u0434\u0435 \u043F\u0440\u043E\u0456\u0433\u043D\u043E\u0440\u043E\u0432\u0430\u043D\u0438\u0439, \u044F\u043A\u0449\u043E \u0432\u043A\u0430\u0437\u0430\u043D\u0438\u0439.","button-add-items":"\u0414\u043E\u0434\u0430\u0442\u0438 \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438","button-cancel":"\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438","button-create":"\u0421\u0442\u0432\u043E\u0440\u0438\u0442\u0438","button-confirm":"\u041F\u0456\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0438","option-create":"\u0421\u0442\u0432\u043E\u0440\u0438\u0442\u0438 Note Toolbar \u0456\u0437 \u0432\u0438\u043D\u043E\u0441\u043A\u0438...","option-help":"\u041F\u0440\u043E \u0432\u0438\u043D\u043E\u0441\u043A\u0438 Note Toolbar","button-import-tooltip":"\u0421\u0442\u0432\u043E\u0440\u0438\u0442\u0438 \u043F\u0430\u043D\u0435\u043B\u044C \u0456\u0437 \u0432\u0438\u043D\u043E\u0441\u043A\u0438","button-import-into-tooltip":"\u0414\u043E\u0434\u0430\u0442\u0438 \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438 \u043F\u0430\u043D\u0435\u043B\u0456 \u0456\u0437 \u0432\u0438\u043D\u043E\u0441\u043A\u0438","error-invalid-uri-content":"Note Toolbar: \u0441\u0445\u043E\u0436\u0435, \u0437 \u0446\u0438\u043C \u043F\u043E\u0441\u0438\u043B\u0430\u043D\u043D\u044F\u043C \u0432\u0438\u043D\u0438\u043A\u043B\u0430 \u043F\u0440\u043E\u0431\u043B\u0435\u043C\u0430. \u041F\u0435\u0440\u0435\u0432\u0456\u0440\u0442\u0435 \u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456\u0441\u0442\u044C URI \u0430\u0431\u043E \u043F\u0435\u0440\u0435\u0433\u043B\u044F\u043D\u044C\u0442\u0435 \u043F\u043E\u0441\u0456\u0431\u043D\u0438\u043A \u043A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447\u0430.","errorlog-heading":"\u041F\u043E\u043C\u0438\u043B\u043A\u0438 \u0432\u0438\u044F\u0432\u043B\u0435\u043D\u0456 \u043F\u0456\u0434 \u0447\u0430\u0441 \u0456\u043C\u043F\u043E\u0440\u0442\u0443 \u043F\u0430\u043D\u0435\u043B\u0456:","errorlog-item":"\u0415\u043B\u0435\u043C\u0435\u043D\u0442 {{number}}:","errorlog-command-not-recognized":"\u041A\u043E\u043C\u0430\u043D\u0434\u0430 \u043D\u0435 \u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0430: {{command}}","errorlog-icon-not-found":"\u0406\u043A\u043E\u043D\u043A\u0443 \u043D\u0435 \u0437\u043D\u0430\u0439\u0434\u0435\u043D\u043E: {{icon}}","errorlog-invalid-format":"\u041D\u0435\u0432\u0456\u0440\u043D\u0438\u0439 \u0444\u043E\u0440\u043C\u0430\u0442: {{line}}","errorlog-invalid-styles":"\u041F\u0440\u043E\u0456\u0433\u043D\u043E\u0440\u043E\u0432\u0430\u043D\u0456 \u043D\u0435\u0434\u0456\u0439\u0441\u043D\u0456 \u0441\u0442\u0438\u043B\u0456: {{styles}}","errorlog-menu-not-found":"\u041C\u0435\u043D\u044E \u043D\u0435 \u0437\u043D\u0430\u0439\u0434\u0435\u043D\u043E: {{menu}}","placeholder-import-into":"> Markdown \u0432\u0438\u043D\u043E\u0441\u043A\u0430 Note Toolbar...","warning-invalid-plugins":"\u0426\u044F \u043F\u0430\u043D\u0435\u043B\u044C \u0432\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u043E\u0432\u0443\u0454 \u0434\u043E\u0434\u0430\u0442\u043E\u043A, \u044F\u043A\u0438\u0439 \u043D\u0435 \u0432\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u043E, \u0430\u0431\u043E \u0432\u0438\u043C\u043A\u043D\u0443\u0442\u043E:","warning-vars":"\u0426\u044F \u043F\u0430\u043D\u0435\u043B\u044C \u0432\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u043E\u0432\u0443\u0454 \u0437\u043C\u0456\u043D\u043D\u0456, \u044F\u043A\u0456 \u0412\u0438 \u043C\u043E\u0436\u0435\u0442\u0435 \u0440\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u0434\u043B\u044F \u0440\u043E\u0431\u043E\u0442\u0438 \u0437 \u0432\u0430\u0448\u0438\u043C \u0441\u0445\u043E\u0432\u0438\u0449\u0435\u043C."},Mn={"error-command-not-found":"\u041F\u0435\u0440\u0435\u0432\u0456\u0440\u0442\u0435 \u043D\u0430\u043B\u0430\u0448\u0442\u0443\u0432\u0430\u043D\u043D\u044F Note Toolbar \u0430\u0431\u043E URI \u0434\u043B\u044F \u0446\u0456\u0454\u0457 \u043A\u043E\u043C\u0430\u043D\u0434\u0438. \u041A\u043E\u043C\u0430\u043D\u0434\u0443 \u043D\u0435 \u0437\u043D\u0430\u0439\u0434\u0435\u043D\u043E: {{command}}","error-folder-not-found":"\u041F\u0435\u0440\u0435\u0432\u0456\u0440\u0442\u0435 \u043D\u0430\u043B\u0430\u0448\u0442\u0443\u0432\u0430\u043D\u043D\u044F Note Toolbar \u0430\u0431\u043E URI \u0434\u043B\u044F \u0446\u0456\u0454\u0457 \u0442\u0435\u043A\u0438. \u0422\u0435\u043A\u0443 \u043D\u0435 \u0437\u043D\u0430\u0439\u0434\u0435\u043D\u043E: {{folder}}","error-item-menu-not-found":"\u041F\u0435\u0440\u0435\u0432\u0456\u0440\u0442\u0435 \u043D\u0430\u043B\u0430\u0448\u0442\u0443\u0432\u0430\u043D\u043D\u044F Note Toolbar \u0430\u0431\u043E URI \u0434\u043B\u044F \u0446\u044C\u043E\u0433\u043E \u043C\u0435\u043D\u044E. \u041F\u0430\u043D\u0435\u043B\u044C \u043D\u0435 \u0437\u043D\u0430\u0439\u0434\u0435\u043D\u043E: {{toolbar}}","error-toolbar-not-found":"\u041F\u0435\u0440\u0435\u0432\u0456\u0440\u0442\u0435 \u043D\u0430\u043B\u0430\u0448\u0442\u0443\u0432\u0430\u043D\u043D\u044F Note Toolbar \u0430\u0431\u043E URI \u0434\u043B\u044F \u0446\u0456\u0454\u0457 \u043F\u0430\u043D\u0435\u043B\u0456. \u041F\u0430\u043D\u0435\u043B\u044C \u043D\u0435 \u0437\u043D\u0430\u0439\u0434\u0435\u043D\u043E: {{toolbar}}","error-uri-params-not-supported":"\u041E\u0434\u0438\u043D \u0430\u0431\u043E \u043A\u0456\u043B\u044C\u043A\u0430 \u0437 \u0446\u0438\u0445 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0456\u0432 Note Toolbar URI \u043D\u0435 \u043F\u0456\u0434\u0442\u0440\u0438\u043C\u0443\u044E\u0442\u044C\u0441\u044F: {{params}}"},Dn={name:"Note Toolbar"},Fn={"button-cancel":"\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438","button-collapse-tooltip":"\u0417\u0433\u043E\u0440\u043D\u0443\u0442\u0438 \u0440\u043E\u0437\u0434\u0456\u043B","button-delete-tooltip":"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438","button-drag-tooltip":"\u041F\u0435\u0440\u0435\u0442\u044F\u0433\u043D\u0456\u0442\u044C, \u0449\u043E\u0431 \u0437\u043C\u0456\u043D\u0438\u0442\u0438 \u043F\u043E\u0440\u044F\u0434\u043E\u043A","button-expand-tooltip":"\u0420\u043E\u0437\u0433\u043E\u0440\u043D\u0443\u0442\u0438 \u0440\u043E\u0437\u0434\u0456\u043B","button-help":"\u0414\u043E\u0432\u0456\u0434\u043A\u0430","button-help-tooltip":"\u0412\u0456\u0434\u043A\u0440\u0438\u0442\u0438 \u0434\u043E\u0432\u0456\u0434\u043D\u0438\u043A","button-learn-more":"\u0414\u043E\u043A\u043B\u0430\u0434\u043D\u0456\u0448\u0435","button-user-guide":"\u041F\u043E\u0441\u0456\u0431\u043D\u0438\u043A\xA0\u043A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447\u0430","button-whats-new":"\u0429\u043E \u043D\u043E\u0432\u043E\u0433\u043E?","button-whats-new-tooltip":'\u0412\u0456\u0434\u043A\u0440\u0438\u0442\u0438 "\u0429\u043E \u043D\u043E\u0432\u043E\u0433\u043E"',"error-old-settings-name":"\u26A0\uFE0F \u041F\u043E\u043C\u0438\u043B\u043A\u0430: \u0411\u0443\u0434\u044C \u043B\u0430\u0441\u043A\u0430, \u0432\u0438\u043C\u043A\u043D\u0456\u0442\u044C \u0442\u0430 \u043F\u0435\u0440\u0435\u0437\u0430\u043F\u0443\u0441\u0442\u0456\u0442\u044C Note Toolbar, \u0430\u0431\u043E \u043F\u0435\u0440\u0435\u0437\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0442\u0435 Obsidian.","error-old-settings-description":"\u0417\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043E \u0441\u0442\u0430\u0440\u0438\u0439 \u0444\u0430\u0439\u043B \u043D\u0430\u043B\u0430\u0448\u0442\u0443\u0432\u0430\u043D\u044C ({{oldVersion}}), \u043D\u0430\u0439\u043D\u043E\u0432\u0456\u0448\u0438\u0439 - {{currentVersion}}","option-platform-desktop":"\u041A\u043E\u043C\u043F'\u044E\u0442\u0435\u0440","option-platform-mobile":"\u041C\u043E\u0431\u0456\u043B\u044C\u043D\u0438\u0439","title-edit-toolbar":"\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u043D\u043D\u044F \u043F\u0430\u043D\u0435\u043B\u0456: {{toolbar}}","title-edit-toolbar_none":"\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u043F\u0430\u043D\u0435\u043B\u044C","command-suggest-modal":{placeholder:"\u041F\u043E\u0448\u0443\u043A \u043A\u043E\u043C\u0430\u043D\u0434\u0438...","instruction-navigate":"\u043F\u0435\u0440\u0435\u0439\u0442\u0438","instruction-use":"\u0432\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u0430\u0442\u0438","instruction-dismiss":"\u0441\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438"},"copy-as-callout":{title:"\u041A\u043E\u043F\u0456\u044E\u0432\u0430\u043D\u043D\u044F \u0442\u0435\u043A\u0441\u0442\u0443 \u0432\u0438\u043D\u043E\u0441\u043A\u0438",description:"\u0412\u0438\u0437\u043D\u0430\u0447\u0438\u0442\u0438, \u0449\u043E \u0432\u0456\u0434\u0431\u0443\u0434\u0435\u0442\u044C\u0441\u044F, \u043A\u043E\u043B\u0438 \u043F\u0430\u043D\u0435\u043B\u0456 \u043F\u0435\u0440\u0435\u0442\u0432\u043E\u0440\u044E\u044E\u0442\u044C\u0441\u044F \u043D\u0430 \u0432\u0438\u043D\u043E\u0441\u043A\u0443.","option-icons":"\u0414\u043E\u0434\u0430\u0432\u0430\u0442\u0438 \u0456\u043A\u043E\u043D\u043A\u0438","option-icons-description":"","option-vars":"\u0417\u0430\u043C\u0456\u043D\u0430 \u0437\u043C\u0456\u043D\u043D\u0438\u0445","option-vars-description":"\u0423\u0441\u0456 \u0437\u043C\u0456\u043D\u043D\u0456 \u0432\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u0430\u043D\u0456 \u0443 \u043F\u0430\u043D\u0435\u043B\u0456 \u0431\u0443\u0434\u0443\u0442\u044C \u0437\u0430\u043C\u0456\u043D\u0435\u043D\u0456 \u043D\u0430 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0437 \u043D\u043E\u0442\u0430\u0442\u043A\u0438, \u043A\u043E\u0442\u0440\u0430 \u0437\u0430\u0440\u0430\u0437 \u0432\u0456\u0434\u043E\u0431\u0440\u0430\u0436\u0430\u0454\u0442\u044C\u0441\u044F. \u041F\u0440\u0438\u043A\u043B\u0430\u0434: {{note_title}} \u2192 \u041C\u043E\u044F \u043D\u043E\u0442\u0430\u0442\u043A\u0430","option-ids":"\u0414\u043E\u0434\u0430\u0432\u0430\u0442\u0438 ID","option-ids-description":"\u0426\u0435 \u0433\u0430\u0440\u0430\u043D\u0442\u0443\u0454, \u0449\u043E \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438 \u043C\u0435\u043D\u044E \u0437\u0430\u043B\u0438\u0448\u0430\u0442\u044C\u0441\u044F \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0438\u043C\u0438, \u043D\u0430\u0432\u0456\u0442\u044C \u044F\u043A\u0449\u043E \u043F\u0435\u0440\u0435\u0439\u043C\u0435\u043D\u0443\u0432\u0430\u0442\u0438 \u043F\u0430\u043D\u0435\u043B\u044C. \u042F\u043A\u0449\u043E \u0432\u0438\u043C\u043A\u043D\u0443\u0442\u0438 \u0446\u0435\u0439 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440, \u043F\u0440\u0438 \u043F\u043E\u0448\u0438\u0440\u0435\u043D\u043D\u0456 \u0432\u0438\u043D\u043E\u0441\u043A\u0438 \u0431\u0443\u0434\u0435 \u0432\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u043E\u0432\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430\u0437\u0432\u0430 \u043F\u0430\u043D\u0435\u043B\u0456.","option-data":"\u0414\u043E\u0434\u0430\u0432\u0430\u0442\u0438 \u043A\u043E\u043C\u0430\u043D\u0434\u0438","option-data-description":"\u0414\u0430\u043D\u0456 \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432 \u0434\u043E\u0437\u0432\u043E\u043B\u044F\u044E\u0442\u044C \u043F\u0440\u0430\u0446\u044E\u0432\u0430\u0442\u0438 \u043F\u0430\u043D\u0435\u043B\u044F\u043C, \u0432\u0456\u0434\u043A\u0440\u0438\u0442\u0438\u0445 \u0443 \u043D\u043E\u0432\u0438\u0445 \u0432\u0456\u043A\u043D\u0430\u0445. \u042F\u043A\u0449\u043E \u0432\u0438\u043C\u043A\u043D\u0435\u043D\u043E, \u0442\u043E \u0431\u0443\u0434\u0443\u0442\u044C \u0432\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u0430\u0442\u0438\u0441\u044F Note Toolbar URI \u0437\u0430\u043C\u0456\u0441\u0442\u044C \u0434\u0430\u043D\u0438\u0445 \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432, \u0449\u043E \u0442\u0430\u043A\u043E\u0436 \u0437\u0430\u0431\u0435\u0437\u043F\u0435\u0447\u0438\u0442\u044C \u0447\u0438\u0441\u0442\u0456\u0448\u0438\u0439 \u0432\u0438\u0433\u043B\u044F\u0434 markdown."},"delete-toolbar":{name:"\u0412\u0438\u0434\u0430\u043B\u0435\u043D\u043D\u044F \u043F\u0430\u043D\u0435\u043B\u0456",description:"\u0426\u044E \u0434\u0456\u044E \u043D\u0435 \u043C\u043E\u0436\u043D\u0430 \u0441\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438.",title:"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u043F\u0430\u043D\u0435\u043B\u044C: {{toolbar}}","button-delete":"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438...","button-delete-confirm":"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438","button-delete-tooltip":"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u0446\u044E \u043F\u0430\u043D\u0435\u043B\u044C","label-delete-confirm":"\u0412\u0438 \u0434\u0456\u0439\u0441\u043D\u043E \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0432\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u0446\u044E \u043F\u0430\u043D\u0435\u043B\u044C?"},"display-rules":{name:"\u041F\u0440\u0430\u0432\u0438\u043B\u0430 \u0432\u0456\u0434\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F",description:"\u0412\u0438\u0437\u043D\u0430\u0447\u0442\u0435, \u043D\u0430 \u044F\u043A\u0438\u0445 \u043D\u043E\u0442\u0430\u0445 \u043F\u043E\u043A\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u043F\u0430\u043D\u0435\u043B\u0456, \u0432\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u043E\u0432\u0443\u044E\u0447\u0438 \u0432\u043B\u0430\u0441\u0442\u0438\u0432\u043E\u0441\u0442\u0456, \u0437\u0456\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u043D\u044F, \u0430\u0431\u043E \u043E\u0431\u0438\u0434\u0432\u0430 \u0437\u0430\u0441\u043E\u0431\u0438.","option-property":"\u0412\u043B\u0430\u0441\u0442\u0438\u0432\u0456\u0441\u0442\u044C","option-property-description":"\u042F\u043A\u0449\u043E \u043D\u0430\u0437\u0432\u0430 \u043F\u0430\u043D\u0435\u043B\u0456 \u0432\u043A\u0430\u0437\u0430\u043D\u0430 \u0432\u043E \u0412\u043B\u0430\u0441\u0442\u0438\u0432\u043E\u0441\u0442\u0456, \u0442\u043E\u0434\u0456 \u0432\u043E\u043D\u0430 \u0437'\u044F\u0432\u0438\u0442\u044C\u0441\u044F \u0443 \u043D\u043E\u0442\u0430\u0442\u0446\u0456. \u0412\u0438\u043A\u043E\u043D\u0443\u0454\u0442\u044C\u0441\u044F \u0437 \u043F\u0435\u0440\u0435\u0432\u0430\u0433\u043E\u044E \u043D\u0430\u0434 \u0431\u0443\u0434\u044C-\u044F\u043A\u0438\u043C\u0438 \u0437\u0456\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u043D\u044F\u043C \u0442\u0435\u043A. \u042F\u043A\u0449\u043E \u0442\u0440\u0435\u0431\u0430 \u0441\u0445\u043E\u0432\u0430\u0442\u0438 \u043F\u0430\u043D\u0435\u043B\u044C, \u0432\u043A\u0430\u0436\u0456\u0442\u044C 'none'.","option-property-placeholder":"\u0412\u043B\u0430\u0441\u0442\u0438\u0432\u0456\u0441\u0442\u044C"},help:{title:"\u0414\u043E\u0432\u0456\u0434\u043A\u0430 Note Toolbar \u{1F6DF}",description:"\u0421\u0442\u0432\u043E\u0440\u044E\u0439\u0442\u0435 \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442\u043D\u043E-\u043E\u0440\u0456\u0454\u043D\u0442\u043E\u0432\u043D\u0456 \u043F\u0430\u043D\u0435\u043B\u0456 \u0443 \u043D\u043E\u0442\u0430\u0442\u043A\u0430\u0445.","button-donate":"\u0417\u0430\u0434\u043E\u043D\u0430\u0442\u0438\u0442\u0438 \u2197","button-donate-tooltip":"\u0412\u0456\u0434\u043A\u0440\u0438\u0442\u0438 buymeacoffee.com","button-open":"\u0412\u0456\u0434\u043A\u0440\u0438\u0442\u0438 \u2197","button-open-github":"\u0412\u0456\u0434\u043A\u0440\u0438\u0442\u0438 github.com","button-open-google":"\u0412\u0456\u0434\u043A\u0440\u0438\u0442\u0438 google.com","button-read":"\u0427\u0438\u0442\u0430\u0442\u0438 \u2197","label-article-1":"\u0421\u0442\u0432\u043E\u0440\u0435\u043D\u043D\u044F \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432 \u043F\u0430\u043D\u0435\u043B\u0435\u0439","label-article-1-description":"\u0414\u0456\u0437\u043D\u0430\u0442\u0438\u0441\u044F \u043F\u0440\u043E \u0440\u0456\u0437\u043D\u0456 \u0442\u0438\u043F\u0438 \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432.","label-article-2":"\u0412\u0438\u043D\u043E\u0441\u043A\u0438 Note Toolbar","label-article-2-description":"\u0414\u0456\u0437\u043D\u0430\u0442\u0438\u0441\u044F \u044F\u043A \u0441\u0442\u0432\u043E\u0440\u044E\u0432\u0430\u0442\u0438 \u043F\u0430\u043D\u0435\u043B\u0456 \u0443 \u043D\u043E\u0442\u0430\u0442\u043A\u0430\u0445.","label-bug":"\u041F\u043E\u0432\u0456\u0434\u043E\u043C\u0438\u0442\u0438 \u043F\u0440\u043E \u043F\u043E\u043C\u0438\u043B\u043A\u0443","label-bug-description":"\u0417\u043D\u0430\u0439\u0448\u043B\u0438 \u043F\u043E\u043C\u0438\u043B\u043A\u0443? \u041D\u0430\u0434\u0456\u0448\u043B\u0456\u0442\u044C \u0457\u0457 \u0443 GitHub \u0430\u0431\u043E \u0437\u0430\u043F\u043E\u0432\u043D\u0456\u0442\u044C \u0446\u044E Google \u0444\u043E\u0440\u043C\u0443.","label-donate":"Buy me a coffee","label-donate-description":"\u042F\u043A\u0449\u043E \u0412\u0438 \u0432\u0432\u0430\u0436\u0430\u0454\u0442\u0435 \u0446\u0435\u0439 \u0434\u043E\u0434\u0430\u0442\u043E\u043A \u043A\u043E\u0440\u0438\u0441\u043D\u0438\u043C, \u0456 \u0445\u043E\u0447\u0435\u0442\u0435 \u043F\u0456\u0434\u0442\u0440\u0438\u043C\u0430\u0442\u0438 \u043C\u0435\u043D\u0435 \u0444\u0456\u043D\u0430\u043D\u0441\u043E\u0432\u043E, \u043E\u0431\u043C\u0456\u0440\u043A\u0443\u0439\u0442\u0435 \u043F\u0440\u043E \u0434\u043E\u043D\u0430\u0442. \u0414\u044F\u043A\u0443\u044E!","label-examples":"\u0414\u0438\u0432\u0438\u0442\u0438\u0441\u044F \u043F\u0440\u0438\u043A\u043B\u0430\u0434\u0438","label-examples-description":"Get inspired by these ready-to-go toolbar examples.","label-feedback":"\u0417\u0430\u043B\u0438\u0448\u0438\u0442\u0438 \u0432\u0456\u0434\u0433\u0443\u043A","label-feedback-description":"\u0412\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u043E\u0432\u0443\u0439\u0442\u0435 \u0446\u044E Google \u0444\u043E\u0440\u043C\u0443 \u0434\u043B\u044F \u0431\u0443\u0434\u044C-\u044F\u043A\u0438\u0445 \u0432\u0456\u0434\u0433\u0443\u043A\u0456\u0432, \u0437\u0430\u043F\u0438\u0442\u0430\u043D\u044C \u0430\u0431\u043E \u0456\u0434\u0435\u0439, \u044F\u043A\u0456 \u0454 \u0443 \u0432\u0430\u0441.","label-support":"\u041F\u0456\u0434\u0442\u0440\u0438\u043C\u043A\u0430","label-support-description":"\u0412\u0456\u0434\u0432\u0456\u0434\u0430\u0439\u0442\u0435 \u0444\u043E\u0440\u0443\u043C\u0438 \u043D\u0430 GitHub, \u0449\u043E\u0431 \u043F\u043E\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0437\u0430\u043F\u0438\u0442\u0430\u043D\u043D\u044F \u0441\u043F\u0456\u043B\u044C\u043D\u043E\u0442\u0456.","label-user-guide":"\u0427\u0438\u0442\u0430\u0442\u0438 \u041F\u043E\u0441\u0456\u0431\u043D\u0438\u043A \u043A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447\u0430","label-user-guide-description":"\u042F\u043A \u043C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u043E \u0435\u0444\u0435\u043A\u0442\u0438\u0432\u043D\u043E \u0432\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u043E\u0432\u0443\u0432\u0430\u0442\u0438 \u0434\u043E\u0434\u0430\u0442\u043E\u043A, \u0432\u043A\u043B\u044E\u0447\u0430\u044E\u0447\u0438 \u043F\u043E\u0440\u0430\u0434\u0438 \u0442\u0430 \u043F\u0440\u0438\u043A\u043B\u0430\u0434\u0438."},"icon-suggester":{"option-no-icon":"\u0411\u0435\u0437 \u0456\u043A\u043E\u043D\u043A\u0438",placeholder:"\u041F\u043E\u0448\u0443\u043A \u0456\u043A\u043E\u043D\u043A\u0438...","instruction-navigate":"\u043F\u0435\u0440\u0435\u0439\u0442\u0438","instruction-use":"\u0432\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u0430\u0442\u0438 \u0456\u043A\u043E\u043D\u043A\u0443","instruction-dismiss":"\u0441\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438"},item:{"button-duplicate-tooltip":"\u0414\u0443\u0431\u043B\u044E\u0432\u0430\u0442\u0438 \u0446\u0435\u0439 \u0435\u043B\u0435\u043C\u0435\u043D\u0442","button-icon-tooltip":"\u0412\u0438\u0431\u0435\u0440\u0456\u0442\u044C \u0456\u043A\u043E\u043D\u043A\u0443 (\u043D\u0435\u043E\u0431\u043E\u0432'\u044F\u0437\u043A\u043E\u0432\u043E)","label-preview-edit":"\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u043F\u0430\u043D\u0435\u043B\u044C: {{toolbar}}","label-preview-empty-no-items":"\u041D\u0435\u043C\u0430\u0454 \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432. \u0420\u0435\u0434\u0430\u0433\u0443\u0439\u0442\u0435 \u0446\u044E \u043F\u0430\u043D\u0435\u043B\u044C \u0434\u043B\u044F \u0434\u043E\u0434\u0430\u0432\u0430\u043D\u043D\u044F \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432.","option-break":"\u0440\u043E\u0437\u0440\u0438\u0432","option-command":"\u041A\u043E\u043C\u0430\u043D\u0434\u0430","option-command-error-does-not-exist":"\u0426\u044F \u043A\u043E\u043C\u0430\u043D\u0434\u0430 \u043D\u0435 \u0456\u0441\u043D\u0443\u0454.","option-command-error-not-available-install":"\u0426\u044F \u043A\u043E\u043C\u0430\u043D\u0434\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430. \u0414\u043E\u0434\u0430\u0442\u043E\u043A \u043C\u0430\u0454 \u0431\u0443\u0442\u0438 \u0432\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0439 \u0442\u0430 \u0443\u0432\u0456\u043C\u043A\u043D\u0435\u043D\u0438\u0439.","option-command-error-not-available-search":"\u041A\u043E\u043C\u0430\u043D\u0434\u0430 \u043D\u0435 \u0437\u043D\u0430\u0439\u0434\u0435\u043D\u0430. \u0421\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0448\u0443\u043A\u0430\u0442\u0438 \u0449\u0435 \u0440\u0430\u0437.","option-command-error-refresh":"\u041E\u043D\u043E\u0432\u0438\u0442\u0438","option-command-placeholder":"\u0428\u0443\u043A\u0430\u0442\u0438 \u043A\u043E\u043C\u0430\u043D\u0434\u0443","option-component-icon":"\u0456\u043A\u043E\u043D\u043A\u0430","option-component-label":"\u044F\u0440\u043B\u0438\u043A","option-file":"\u0424\u0430\u0439\u043B","option-file-placeholder":"\u041F\u043E\u0448\u0443\u043A \u0444\u0430\u0439\u043B\u0443 \u0447\u0438 \u0442\u0435\u043A\u0438","option-file-error-does-not-exist":"\u0426\u0435\u0439 \u0444\u0430\u0439\u043B \u0430\u0431\u043E \u0442\u0435\u043A\u0430 \u043D\u0435 \u0456\u0441\u043D\u0443\u0454.","option-item-group":"\u0413\u0440\u0443\u043F\u0430","option-item-group-placeholder":"\u041F\u0430\u043D\u0435\u043B\u044C","option-item-group-help":"\u0412\u0438\u0431\u0435\u0440\u0456\u0442\u044C \u043F\u0430\u043D\u0435\u043B\u044C \u0434\u043B\u044F \u0432\u0441\u0442\u0430\u0432\u043A\u0438 \u0432 \u0446\u044E \u043D\u043E\u0442\u0430\u0442\u043A\u0443.","option-item-group-error-does-not-exist":"\u041F\u0430\u043D\u0435\u043B\u044C \u043D\u0435 \u0456\u0441\u043D\u0443\u0454","option-item-group-error-invalid":"\u26A0\uFE0F \u041D\u0435\u0434\u0456\u0439\u0441\u043D\u0430 \u0433\u0440\u0443\u043F\u0430 \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432","option-item-menu":"\u041C\u0435\u043D\u044E","option-item-menu-placeholder":"\u041F\u0430\u043D\u0435\u043B\u044C","option-item-menu-help":"\u0412\u0438\u0431\u0435\u0440\u0456\u0442\u044C \u043F\u0430\u043D\u0435\u043B\u044C \u0434\u043B\u044F \u0432\u0456\u0434\u043A\u0440\u0438\u0442\u0442\u044F \u044F\u043A \u043C\u0435\u043D\u044E.","option-item-menu-error-does-not-exist":"\u041F\u0430\u043D\u0435\u043B\u044C \u043D\u0435 \u0456\u0441\u043D\u0443\u0454","option-label-placeholder":"\u041C\u0456\u0442\u043A\u0430 (\u0454 \u0456\u043A\u043E\u043D\u043A\u0430 - \u043D\u0435\u043E\u0431\u043E\u0432'\u044F\u0437\u043A\u043E\u0432\u043E)","option-separator":"\u0440\u043E\u0437\u0434\u0456\u043B\u044C\u043D\u0438\u043A","option-tooltip-placeholder":"\u041F\u0456\u0434\u043A\u0430\u0437\u043A\u0430 (\u043D\u0435\u043E\u0431\u043E\u0432'\u044F\u0437\u043A\u043E\u0432\u043E)","option-uri":"URI","option-uri-placehoder":"\u0410\u0434\u0440\u0435\u0441\u0430 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0443, \u043D\u0430\u0437\u0432\u0430 \u043D\u043E\u0442\u0430\u0442\u043A\u0438","option-uri-help":"\u041F\u043E\u0440\u0430\u0434\u0430: \u0432\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u043E\u0432\u0443\u0439\u0442\u0435 \u0432\u043B\u0430\u0441\u0442\u0438\u0432\u043E\u0441\u0442\u0456 \u043D\u043E\u0442\u0430\u0442\u043E\u043A \u0432 URI.","option-visibility-component-hidden-platform":"{{component}} \u0441\u0445\u043E\u0432\u0430\u043D \u043D\u0430 {{platform}}","option-visibility-component-visible-platform":"{{component}} \u0432\u0438\u0434\u0438\u043C\u0438\u0439 \u043D\u0430 {{platform}}","option-visibility-hidden":"\u043F\u0440\u0438\u0445\u043E\u0432\u0430\u043D\u043E","option-visibility-hidden-platform":"\u043F\u0440\u0438\u0445\u043E\u0432\u0430\u043D\u043E \u043D\u0430 {{platform}}","option-visibility-visible-platform":"\u0432\u0438\u0434\u0438\u043C\u0438\u0439 \u043D\u0430 {{platform}}","option-visibility-platform-desktop":"\u043A\u043E\u043C\u043F'\u044E\u0442\u0435\u0440\u0456","option-visibility-platform-mobile":"\u043C\u043E\u0431\u0456\u043B\u044C\u043D\u043E\u043C \u043F\u0440\u0438\u0441\u0442\u0440\u043E\u0457"},"item-suggest-modal":{placeholder:"\u041F\u043E\u0448\u0443\u043A \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430...","instruction-back":"\u043D\u0430\u0437\u0430\u0434","instruction-navigate":"\u043F\u0435\u0440\u0435\u0439\u0442\u0438","instruction-use":"\u0432\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u0430\u0442\u0438","instruction-dismiss":"\u0441\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438","key-back":"\u232B \u0430\u0431\u043E \u2190","key-navigate":"\u2191\u2193","key-use":"\u21B5","key-dismiss":"esc"},items:{name:"\u0415\u043B\u0435\u043C\u0435\u043D\u0442\u0438","name-with-count":"\u0415\u043B\u0435\u043C\u0435\u043D\u0442\u0438 ({{count}})",description:"\u0414\u043E\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043F\u043E \u0447\u0435\u0440\u0437\u0456 \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438 \u0434\u043E \u043F\u0430\u043D\u0435\u043B\u0456","label-empty-no-items":"\u041D\u0435\u043C\u0430\u0454 \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432 \u043F\u0430\u043D\u0435\u043B\u0456.","button-add-break-tooltip":"\u0414\u043E\u0434\u0430\u0442\u0438 \u0440\u043E\u0437\u0440\u0438\u0432","button-add-separator-tooltip":"\u0414\u043E\u0434\u0430\u0442\u0438 \u0440\u043E\u0437\u0434\u0456\u043B\u044C\u043D\u0438\u043A","button-new-item":"+ \u0414\u043E\u0434\u0430\u0442\u0438 \u0435\u043B\u0435\u043C\u0435\u043D\u0442","button-new-item-tooltip":"\u0414\u043E\u0434\u0430\u0432\u0430\u043D\u043D\u044F \u043D\u043E\u0432\u043E\u0433\u043E \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430 \u0434\u043E \u043F\u0430\u043D\u0435\u043B\u0456","option-item-empty-label":"\u041C\u0456\u0442\u043E\u043A \u043D\u0435 \u0432\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u043E","option-edit-item-group-tooltip":"\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u0433\u0440\u0443\u043F\u0443: {{toolbar}}","option-edit-item-group-tooltip_none":"\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u0433\u0440\u0443\u043F\u0443 \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432","option-edit-item-tooltip":"\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u0435\u043B\u0435\u043C\u0435\u043D\u0442 \u043F\u0430\u043D\u0435\u043B\u0456","option-edit-item-type-tooltip":"\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 {{itemType}}"},mappings:{name:"\u0417\u0456\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u043D\u0456 \u0442\u0435\u043A\u0438","name-with-count":"\u0417\u0456\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u0456 \u0442\u0435\u043A\u0438 ({{count}})",description:"\u0423 \u043D\u043E\u0442\u0430\u0442\u043A\u0430\u0445 \u0440\u043E\u0437\u0442\u0430\u0448\u043E\u0432\u0430\u043D\u0438\u0445 \u043D\u0438\u0436\u0447\u0435 \u0442\u0435\u043A, \u0432\u0456\u0434\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u0438\u043C\u0443\u0442\u044C\u0441\u044F \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u043D\u0430 \u0457\u043C \u043F\u0430\u043D\u0435\u043B\u044C. \u041F\u0440\u0456\u043E\u0440\u0438\u0442\u0435\u0442 \u0437\u0432\u0435\u0440\u0445\u0443 \u0432\u043D\u0438\u0437.","label-empty":"\u041D\u0430\u0442\u0438\u0441\u043D\u0456\u0442\u044C \u043A\u043D\u043E\u043F\u043A\u0443, \u0449\u043E\u0431 \u0441\u0442\u0432\u043E\u0440\u0438\u0442\u0438 \u0437\u0456\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u043D\u044F.","placeholder-folder":"\u0422\u0435\u043A\u0430","placeholder-toolbar":"\u041F\u0430\u043D\u0435\u043B\u044C","button-collapse-tooltip":"\u0417\u0433\u043E\u0440\u043D\u0443\u0442\u0438 \u0432\u0441\u0456 \u0437\u0456\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u043D\u044F","button-expand-tooltip":"\u0420\u043E\u0437\u0433\u043E\u0440\u043D\u0443\u0442\u0438 \u0432\u0441\u0456 \u0437\u0456\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u043D\u044F","button-new":"+ \u041D\u043E\u0432\u0435 \u0437\u0456\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u043D\u044F","button-new-tooltip":"\u0421\u0442\u0432\u043E\u0440\u0438\u0442\u0438 \u043D\u043E\u0432\u0435 \u0437\u0456\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u043D\u044F","option-folder-all":"\u0432\u0441\u0456 \u0442\u0435\u043A\u0438","option-folder-root":"\u0442\u0456\u043B\u044C\u043A\u0438 \u043A\u043E\u0440\u0435\u043D\u0435\u0432\u0430 \u0442\u0435\u043A\u0430","error-folder-already-mapped":"\u0426\u044F \u0442\u0435\u043A\u0430 \u0432\u0436\u0435 \u043C\u0430\u0454 \u043F\u043E\u0432'\u044F\u0437\u0430\u043D\u0443 \u0437 \u043D\u0435\u044E \u043F\u0430\u043D\u0435\u043B\u044C."},name:{name:"\u041D\u0430\u0437\u0432\u0430",description:"\u0412\u043A\u0430\u0436\u0456\u0442\u044C \u0443\u043D\u0456\u043A\u0430\u043B\u044C\u043D\u0443 \u043D\u0430\u0437\u0432\u0443 \u043F\u0430\u043D\u0435\u043B\u0456.","error-toolbar-already-exists":"\u041F\u0430\u043D\u0435\u043B\u044C \u0456\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u0456\u0432 \u0437 \u0442\u0430\u043A\u0438\u043C \u0456\u043C'\u044F\u043C \u0432\u0436\u0435 \u0456\u0441\u043D\u0443\u0454."},other:{name:"\u0406\u043D\u0448\u0435",icon:{name:"\u0406\u043A\u043E\u043D\u043A\u0430",description:"\u0406\u043A\u043E\u043D\u043A\u0430 \u043F\u043B\u0430\u0432\u0430\u044E\u0447\u043E\u0457 \u043A\u043D\u043E\u043F\u043A\u0438 \u043D\u0430 \u043C\u043E\u0431\u0456\u043B\u044C\u043D\u043E\u043C\u0443. \u041F\u043E\u0442\u0440\u0435\u0431\u0443\u0454 \u043F\u0435\u0440\u0435\u0437\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u044F.",tooltip:"\u041E\u0431\u0440\u0430\u0442\u0438 \u0456\u043A\u043E\u043D\u043A\u0443"},"ribbon-action":{name:"\u0406\u043A\u043E\u043D\u043A\u0430 \u0421\u0442\u0440\u0456\u0447\u043A\u043E\u0432\u043E\u0433\u043E \u043C\u0435\u043D\u044E \u{1F4F1}",description:"\u0414\u0456\u044F \u043D\u0430\u0442\u0438\u0441\u043A\u0430\u043D\u043D\u044F \u0456\u043A\u043E\u043D\u043A\u0438 \u0441\u0442\u0440\u0456\u0447\u043A\u043E\u0432\u043E\u0433\u043E \u043C\u0435\u043D\u044E (\u043C\u043E\u0431\u0456\u043B\u044C\u043D\u0438\u0439).","option-toolbar":"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u0438 \u043F\u043E\u0442\u043E\u0447\u043D\u0443 \u043F\u0430\u043D\u0435\u043B\u044C","option-item-suggester":"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u0438 \u0432\u0441\u0456 \u0456\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u0438","option-toolbar-suggester":"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u0438 \u0432\u0441\u0456 \u043F\u0430\u043D\u0435\u043B\u0456"},"show-edit-tbar":{name:"\u0412\u0456\u0434\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u0438 '\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438' \u0432 \u043C\u0435\u043D\u044E \u043F\u0430\u043D\u0435\u043B\u0435\u0439 \u{1F4F1}",description:"\u0414\u043E\u0434\u0430\u0454 \u043F\u0443\u043D\u043A\u0442 \u043D\u0430\u043B\u0430\u0448\u0442\u0443\u0432\u0430\u043D\u043D\u044F \u043F\u0430\u043D\u0435\u043B\u0456, \u043F\u043E\u043A\u0430\u0437\u0430\u043D\u0438\u0439 \u044F\u043A \u043C\u0435\u043D\u044E \u0432\u043D\u0438\u0437\u0443 \u0435\u043A\u0440\u0430\u043D\u0430 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430."}},position:{name:"\u0420\u043E\u0437\u0442\u0430\u0448\u0443\u0432\u0430\u043D\u043D\u044F",description:"\u0414\u0435 \u0440\u043E\u0437\u0442\u0430\u0448\u043E\u0432\u0443\u0432\u0430\u0442\u0438 \u0446\u044E \u043F\u0430\u043D\u0435\u043B\u044C.","option-mobile-help":"\u2139\uFE0F \u041F\u0430\u043D\u0435\u043B\u044C \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430 \u0447\u0435\u0440\u0435\u0437 \u041F\u0430\u043D\u0435\u043B\u044C \u043D\u0430\u0432\u0456\u0433\u0430\u0446\u0456\u0457.","option-fabl":"\u041F\u043B\u0430\u0432\u0430\u044E\u0447\u0430 \u043A\u043D\u043E\u043F\u043A\u0430: \u043B\u0456\u0432\u043E\u0440\u0443\u0447","option-fabr":"\u041F\u043B\u0430\u0432\u0430\u044E\u0447\u0430 \u043A\u043D\u043E\u043F\u043A\u0430: \u043F\u0440\u0430\u0432\u043E\u0440\u0443\u0447","option-hidden":"\u041F\u0440\u0438\u0445\u043E\u0432\u0430\u043D\u0430 (\u043D\u0435 \u043F\u043E\u043A\u0430\u0437\u0443\u0432\u0430\u0442\u0438)","option-hidden-mobile":"\u041F\u0440\u0438\u0445\u043E\u0432\u0430\u043D\u0430 / \u041F\u0430\u043D\u0435\u043B\u044C \u043D\u0430\u0432\u0456\u0433\u0430\u0446\u0456\u0457","option-props":"\u041F\u0456\u0434  \u0432\u043B\u0430\u0441\u0442\u0438\u0432\u043E\u0441\u0442\u044F\u043C\u0438","option-top":"\u0417\u0432\u0435\u0440\u0445\u0443 (\u0444\u0456\u043A\u0441\u043E\u0432\u0430\u043D\u043E)"},styles:{name:"\u0421\u0442\u0438\u043B\u0456",description:"\u041F\u0435\u0440\u0435\u043B\u0456\u043A \u0441\u0442\u0438\u043B\u0456\u0432 \u0446\u0456\u0454\u0457 \u043F\u0430\u043D\u0435\u043B\u0456.",help:"\u041D\u0430\u043B\u0430\u0448\u0442\u043E\u0432\u0443\u0439\u0442\u0435 \u0449\u0435 \u0431\u0456\u043B\u044C\u0448\u0435 \u0437 \u0434\u043E\u0434\u0430\u0442\u043A\u043E\u043C Style Settings.","option-autohide":"\u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u043D\u043E \u0445\u043E\u0432\u0430\u0442\u0438*","option-autohide-disclaimer":"\u0410\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u043D\u0435 \u043F\u0440\u0438\u0445\u043E\u0432\u0443\u0432\u0430\u043D\u043D\u044F \u043D\u0435 \u043F\u043E\u0448\u0438\u0440\u044E\u0454\u0442\u044C\u0441\u044F \u043D\u0430 \u043C\u043E\u0431\u0456\u043B\u044C\u043D\u0456 \u043F\u0440\u0438\u0441\u0442\u0440\u043E\u0457.","option-between":"\u0456\u043D\u0442\u0435\u0440\u0432\u0430\u043B \u043C\u0456\u0436 \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u043C\u0438","option-border":"\u0440\u0430\u043C\u043A\u0430","option-button":"\u0432\u0438\u0434\u0456\u043B\u0438\u0442\u0438 \u043A\u043D\u043E\u043F\u043A\u0438","option-center":"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438 \u043F\u043E \u0446\u0435\u043D\u0442\u0440\u0443","option-even":"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438 \u0440\u0456\u0432\u043D\u043E\u0432\u0456\u0434\u0434\u0430\u043B\u0435\u043D\u043E","option-floatl":"\u043F\u043B\u0430\u0432\u0430\u044E\u0447\u0430 \u043A\u043D\u043E\u043F\u043A\u0430 \u0437\u043B\u0456\u0432\u0430*","option-floatl-disclaimer":"\u0412\u0438\u0440\u0456\u0432\u043D\u044E\u0432\u0430\u043D\u043D\u044F \u0437\u043B\u0456\u0432\u0430 \u043F\u0440\u0430\u0446\u044E\u0454 \u0442\u0456\u043B\u044C\u043A\u0438 \u0443 \u0412\u0438\u043D\u043E\u0441\u043A\u0430\u0445.","option-floatr":"\u043F\u043B\u0430\u0432\u0430\u044E\u0447\u0430 \u043A\u043D\u043E\u043F\u043A\u0430 \u0437 \u043F\u0440\u0430\u0432\u0430*","option-floatr-disclaimer":"\u0412\u0438\u0440\u0456\u0432\u043D\u044E\u0432\u0430\u043D\u043D\u044F \u0437 \u043F\u0440\u0430\u0432\u0430 \u043F\u0440\u0430\u0446\u044E\u0454 \u0442\u0456\u043B\u044C\u043A\u0438 \u0443 \u0412\u0438\u043D\u043E\u0441\u043A\u0430\u0445.","option-left":"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438 \u043B\u0456\u0432\u043E\u0440\u0443\u0447","option-noborder":"\u0431\u0435\u0437 \u0440\u0430\u043C\u043A\u0438","option-nofloat":"\u043D\u0435 \u043F\u043B\u0430\u0432\u0430\u044E\u0447\u0430 \u043A\u043D\u043E\u043F\u043A\u0430","option-notsticky":"\u043D\u0435 \u043F\u0440\u0438\u043A\u0440\u0456\u043F\u043B\u044F\u0442\u0438","option-nowrap":"\u043D\u0435 \u0437\u0433\u043E\u0440\u0442\u0430\u0442\u0438 \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438*","option-nowrap-disclaimer":"\u041D\u0430\u0439\u043A\u0440\u0430\u0449\u0435 \u0440\u043E\u0431\u0435, \u044F\u043A\u0449\u043E \u043A\u043D\u043E\u043F\u043A\u0438 \u0440\u043E\u0437\u0442\u0430\u0448\u043E\u0432\u0430\u043D\u0456 \u043D\u0435 \u0440\u0456\u0432\u043D\u043E\u0432\u0456\u0434\u0434\u0430\u043B\u0435\u043D\u043E \u0430\u0431\u043E \u043F\u043E \u0446\u0435\u043D\u0442\u0440\u0443.","option-nowide":"\u0448\u0438\u0440\u0438\u043D\u0430 \u043D\u043E\u0442\u0430\u0442\u043A\u0438*","option-nowide-disclaimer":"\u0428\u0438\u0440\u0438\u043D\u0430 \u0432\u043C\u0456\u0441\u0442\u0443 \u043F\u0440\u0430\u0446\u044E\u0454 \u043B\u0438\u0448\u0435 \u043A\u043E\u043B\u0438 \u043F\u0430\u043D\u0435\u043B\u044C \u0440\u043E\u0437\u0442\u0430\u0448\u043E\u0432\u0430\u043D\u0430 \u0437\u0432\u0435\u0440\u0445\u0443 (\u0444\u0456\u043A\u0441\u043E\u0432\u0430\u043D\u043E).","option-right":"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438 \u043F\u0440\u0430\u0432\u043E\u0440\u0443\u0447","option-sticky":"\u043F\u0440\u0438\u043A\u0440\u0456\u043F\u043B\u044F\u0442\u0438*","option-sticky-disclaimer":"\u041F\u0440\u0438\u043A\u0440\u0456\u043F\u043B\u0435\u043D\u043D\u044F \u043D\u0435 \u043F\u0440\u0430\u0446\u044E\u0454 \u0443 \u0440\u0435\u0436\u0438\u043C\u0456 \u0427\u0438\u0442\u0430\u043D\u043D\u044F.","option-wide":"\u0448\u0438\u0440\u0438\u043D\u0430 \u0432\u0456\u043A\u043D\u0430*","option-wide-disclaimer":"\u0428\u0438\u0440\u0438\u043D\u0430 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 \u043F\u0440\u0430\u0446\u044E\u0454 \u043A\u043E\u043B\u0438 \u043F\u043E\u0437\u0438\u0446\u0456\u044F \u043F\u0430\u043D\u0435\u043B\u0456 \u0444\u0456\u043A\u0441\u043E\u0432\u0430\u043D\u0430.","option-default-name":"\u0417\u0430 \u0437\u0430\u043C\u043E\u0432\u0447\u0443\u0432\u0430\u043D\u043D\u044F\u043C","option-default-description":"\u0417\u0430\u0441\u0442\u043E\u0441\u043E\u0432\u0443\u0454\u0442\u044C\u0441\u044F \u0434\u043E \u0432\u0441\u0456\u0445 \u043F\u043B\u0430\u0442\u0444\u043E\u0440\u043C, \u044F\u043A\u0449\u043E \u043D\u0435 \u043F\u0435\u0440\u0435\u0432\u0438\u0437\u043D\u0430\u0447\u0435\u043D\u043E.","option-default-empty":"\u0422\u0438\u043F\u043E\u0432\u0456 \u0441\u0442\u0438\u043B\u0456 \u0449\u0435 \u043D\u0435 \u0432\u043A\u0430\u0437\u0430\u043D\u0456.","option-mobile-name":"\u041C\u043E\u0431\u0456\u043B\u044C\u043D\u0438\u0439 \u{1F4F1}","option-mobile-description":"\u041F\u0435\u0440\u0435\u0432\u0438\u0437\u043D\u0430\u0447\u0438\u0442\u0438 \u0442\u0438\u043F\u043E\u0432\u0456 \u0441\u0442\u0438\u043B\u0456.","option-mobile-empty":"\u0421\u0442\u0438\u043B\u0456 \u0434\u043B\u044F \u041C\u043E\u0431\u0456\u043B\u044C\u043D\u043E\u0433\u043E \u0449\u0435 \u043D\u0435 \u0432\u043A\u0430\u0437\u0430\u043D\u0456, \u0434\u0456\u044E\u0442\u044C \u0442\u0438\u043F\u043E\u0432\u0456 \u0441\u0442\u0438\u043B\u0456.","style-tooltip-use-class":"\u0412\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u043E\u0432\u0443\u0432\u0430\u0442\u0438 \u0443 \u0432\u0438\u043D\u043E\u0441\u043A\u0430\u0445 \u0430\u0431\u043E CSS: {{class}}","style-remove-tooltip":"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438"},"toolbar-suggest-modal":{placeholder:"\u041F\u043E\u0448\u0443\u043A \u043F\u0430\u043D\u0435\u043B\u0456...","instruction-navigate":"\u043F\u0435\u0440\u0435\u0439\u0442\u0438","instruction-use":"\u0432\u0456\u0434\u043A\u0440\u0438\u0442\u0438 \u043F\u0430\u043D\u0435\u043B\u044C","instruction-dismiss":"\u0441\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438"},toolbars:{name:"\u041F\u0430\u043D\u0435\u043B\u0456","name-with-count":"\u041F\u0430\u043D\u0435\u043B\u0456 ({{count}})",description:"\u0417\u0430\u0434\u0430\u0439\u0442\u0435 \u043F\u0430\u043D\u0435\u043B\u0456, \u044F\u043A\u0456 \u0412\u0438 \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0434\u043E\u0434\u0430\u0432\u0430\u0442\u0438 \u0434\u043E \u0432\u0430\u0448\u0438\u0445 \u043D\u043E\u0442\u0430\u0442\u043E\u043A.","button-duplicate-tbar-tooltip":"\u0414\u0443\u0431\u043B\u044E\u0432\u0430\u0442\u0438","button-edit-tbar":"\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438","button-edit-tbar-tooltip":"\u041E\u043D\u043E\u0432\u0438\u0442\u0438 \u0446\u044E \u043F\u0430\u043D\u0435\u043B\u044C","button-more-tooltip":"\u0411\u0456\u043B\u044C\u0448\u0435","button-new-tbar":"+ \u041D\u043E\u0432\u0430 \u043F\u0430\u043D\u0435\u043B\u044C","button-new-tbar-tooltip":"\u0414\u043E\u0434\u0430\u0442\u0438 \u043D\u043E\u0432\u0443 \u043F\u0430\u043D\u0435\u043B\u044C","duplicated-tbar-suffix":"\u043A\u043E\u043F\u0456\u044E\u0432\u0430\u0442\u0438","imported-tbar-name":"\u041D\u043E\u0432\u0430 \u043F\u0430\u043D\u0435\u043B\u044C","label-empty-create-tbar":"\u041D\u0430\u0442\u0438\u0441\u043D\u0456\u0442\u044C \u043A\u043D\u043E\u043F\u043A\u0443 \u0434\u043B\u044F \u0441\u0442\u0432\u043E\u0440\u0435\u043D\u043D\u044F \u043F\u0430\u043D\u0435\u043B\u0456.","label-tbar-name-not-set":"\u26A0\uFE0F \u0406\u043C'\u044F \u043F\u0430\u043D\u0435\u043B\u0456 \u043D\u0435 \u0432\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u043E"},usage:{name:"\u0412\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u0430\u043D\u043D\u044F",description:"\u0426\u044F \u043F\u0430\u043D\u0435\u043B\u044C \u0432\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u043E\u0432\u0443\u0454\u0442\u044C\u0441\u044F \u0443 {{mappingCount}} \u0437\u0456\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u043D\u044F\u0445 \u0442\u0430 {{itemCount}} \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432 \u043F\u0430\u043D\u0435\u043B\u0435\u0439.","description-search":"\u041F\u043E\u0448\u0443\u043A \u0432\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u0430\u043D\u043D\u044F \u043F\u043E \u0432\u043B\u0430\u0441\u0442\u0438\u0432\u043E\u0441\u0442\u044F\u0445"},"whats-new":{title:"\u0429\u043E \u043D\u043E\u0432\u043E\u0433\u043E \u0443 Note Toolbar?","button-read":"\u0427\u0438\u0442\u0430\u0442\u0438 \u2197","button-read-tooltip":"\u0412\u0456\u0434\u043A\u0440\u0438\u0442\u0438 github.com","label-release-notes":"\u041F\u0440\u0438\u043C\u0456\u0442\u043A\u0438 \u0434\u043E \u0432\u0438\u043F\u0443\u0441\u043A\u0443","label-release-notes-description":"\u0414\u0435\u0442\u0430\u043B\u044C\u043D\u0456 \u043A\u043E\u043C\u0435\u043D\u0442\u0430\u0440\u0456 \u0434\u043E \u043E\u0441\u0442\u0430\u043D\u043D\u0456\u0445 \u0432\u0438\u043F\u0443\u0441\u043A\u0456\u0432 \u0440\u043E\u0437\u043C\u0456\u0449\u0435\u043D\u0456 \u043D\u0430 GitHub.","label-roadmap":"\u0429\u043E \u0447\u0435\u043A\u0430\u0454 \u043F\u043E\u043F\u0435\u0440\u0435\u0434\u0443 Note Toolbar?","label-roadmap-description":"\u041E\u0437\u043D\u0430\u0439\u043E\u043C\u0442\u0435\u0441\u044F \u0437 \u0434\u043E\u0440\u043E\u0436\u043D\u044C\u043E\u044E \u043A\u0430\u0440\u0442\u043E\u044E, \u0449\u043E\u0431 \u043F\u0435\u0440\u0435\u0433\u043B\u044F\u043D\u0443\u0442\u0438 \u0444\u0443\u043D\u043A\u0446\u0456\u0457 \u044F\u043A\u0456 \u0440\u043E\u0437\u0433\u043B\u044F\u0434\u0430\u044E\u0442\u044C\u0441\u044F."}},Nn={"button-floating-tooltip":"\u0412\u0456\u0434\u043A\u0440\u0438\u0442\u0438 Note Toolbar","menu-edit-toolbar":"\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u043F\u0430\u043D\u0435\u043B\u044C: {{toolbar}}...","menu-position":"\u0420\u043E\u0437\u0442\u0430\u0448\u0443\u0432\u0430\u043D\u043D\u044F","menu-toolbar-settings":"\u041D\u0430\u043B\u0430\u0448\u0442\u0443\u0432\u0430\u043D\u043D\u044F Note Toolbar..."},Ln={command:xn,export:In,import:An,notice:Mn,plugin:Dn,setting:Fn,toolbar:Nn};var Io={};dt(Io,{command:()=>Pn,default:()=>Hn,notice:()=>On,plugin:()=>Vn,setting:()=>_n,toolbar:()=>Bn});var Pn={"name-focus":"\u805A\u7126","name-item-suggester":"\u6253\u5F00\u5FEB\u901F\u5DE5\u5177","name-toolbar-suggester":"\u6253\u5F00\u5FEB\u901F\u5DE5\u5177\u680F","name-settings":"\u6253\u5F00\u63D2\u4EF6\u8BBE\u7F6E","name-toolbar-settings":"\u6253\u5F00\u5DE5\u5177\u680F\u8BBE\u7F6E","name-show-properties":"\u663E\u793A\u7B14\u8BB0\u5C5E\u6027","name-hide-properties":"\u9690\u85CF\u7B14\u8BB0\u5C5E\u6027","name-fold-properties":"\u6298\u53E0\u7B14\u8BB0\u5C5E\u6027","name-toggle-properties":"\u5207\u6362\u7B14\u8BB0\u5C5E\u6027\u7684\u663E\u793A"},On={"error-command-not-found":`\u8BF7\u68C0\u67E5\u7B14\u8BB0\u5DE5\u5177\u680F\u8BBE\u7F6E\u4E2D\u7684\u547D\u4EE4\u8BBE\u7F6E\u3002
\u672A\u627E\u5230\u547D\u4EE4\uFF1A{{command}}`,"error-folder-not-found":`\u8BF7\u68C0\u67E5\u7B14\u8BB0\u5DE5\u5177\u680F\u8BBE\u7F6E\u4E2D\u7684\u6587\u4EF6\u5939\u8BBE\u7F6E\u3002
\u672A\u627E\u5230\u6587\u4EF6\u5939\uFF1A{{folder}}`,"error-item-menu-not-found":`\u8BF7\u68C0\u67E5\u7B14\u8BB0\u5DE5\u5177\u680F\u8BBE\u7F6E\u4E2D\u7684\u83DC\u5355\u9879\u8BBE\u7F6E\u3002
\u672A\u627E\u5230\u5DE5\u5177\u680F\uFF1A{{toolbar}}`,"error-toolbar-not-found":`\u8BF7\u68C0\u67E5\u7B14\u8BB0\u5DE5\u5177\u680F\u8BBE\u7F6E\u4E2D\u7684\u5DE5\u5177\u680F\u8BBE\u7F6E\u3002
\u672A\u627E\u5230\u5DE5\u5177\u680F\uFF1A{{folder}}`},Vn={name:"\u7B14\u8BB0\u5DE5\u5177\u680F"},_n={"button-cancel":"\u53D6\u6D88","button-delete-tooltip":"\u5220\u9664","button-drag-tooltip":"\u62D6\u52A8\u4EE5\u91CD\u65B0\u6392\u5E8F","button-learn-more":"\u4E86\u89E3\u66F4\u591A","button-user-guide":"\u7528\u6237\u6307\u5357","error-old-settings-name":"\u26A0\uFE0F \u9519\u8BEF\uFF1A\u8BF7\u91CD\u65B0\u542F\u7528\u7B14\u8BB0\u5DE5\u5177\u680F\u63D2\u4EF6\uFF08\u6216\u91CD\u542F Obsidian\uFF09","error-old-settings-description":"\u52A0\u8F7D\u4E86\u65E7\u7684\u8BBE\u7F6E\u6587\u4EF6\uFF08{{oldVersion}}\uFF09\uFF0C\u5F53\u524D\u6700\u65B0\u7248\u672C\u4E3A {{currentVersion}}","option-platform-desktop":"\u684C\u9762\u7AEF","option-platform-mobile":"\u79FB\u52A8\u7AEF","title-edit-toolbar":"\u7F16\u8F91\u5DE5\u5177\u680F\uFF1A{{toolbar}}","title-edit-toolbar_none":"\u7F16\u8F91\u5DE5\u5177\u680F","delete-toolbar":{name:"\u5220\u9664\u6B64\u5DE5\u5177\u680F",description:"\u6B64\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500\u3002",title:"\u5220\u9664\u5DE5\u5177\u680F\uFF1A{{toolbar}}","button-delete":"\u5220\u9664...","button-delete-confirm":"\u5220\u9664","button-delete-tooltip":"\u5220\u9664\u6B64\u5DE5\u5177\u680F","label-delete-confirm":"\u60A8\u786E\u5B9A\u8981\u5220\u9664\u6B64\u5DE5\u5177\u680F\u5417\uFF1F"},"display-rules":{name:"\u7279\u5B9A\u7B14\u8BB0\u663E\u793A\u89C4\u5219",description:"\u5B9A\u4E49\u5728\u54EA\u4E9B\u7279\u5B9A\u7B14\u8BB0\u4E0A\u663E\u793A\u5DE5\u5177\u680F\u3002","option-property":"\u5C5E\u6027","option-property-description":"\u5982\u679C\u5728\u6B64\u5C5E\u6027\u4E2D\u627E\u5230\u5DE5\u5177\u680F\u540D\u79F0\uFF0C\u5219\u4F1A\u5728\u7B14\u8BB0\u4E0A\u663E\u793A\u5BF9\u5E94\u7684\u5DE5\u5177\u680F\u3002\u4F18\u5148\u4E8E\u4EFB\u4F55\u6587\u4EF6\u5939\u6620\u5C04\u7684\u89C4\u5219\u3002\u8BBE\u7F6E\u4E3A'none'\u5219\u4F1A\u9690\u85CF\u5DE5\u5177\u680F\u3002","option-property-placeholder":"\u5C5E\u6027","option-folder-all":"\u6240\u6709\u6587\u4EF6\u5939","option-folder-root":"\u4EC5\u6839\u76EE\u5F55\u6587\u4EF6\u5939","option-folder-mappings":"\u6587\u4EF6\u5939\u6620\u5C04","option-folder-mappings-description":"\u4EE5\u4E0B\u6587\u4EF6\u5939\u4E2D\u7684\u7B14\u8BB0\u5C06\u663E\u793A\u6620\u5C04\u5230\u5B83\u7684\u5DE5\u5177\u680F\uFF0C\u4F18\u5148\u7EA7\u4ECE\u4E0A\u5230\u4E0B\u3002","option-folder-mappings-empty":"\u70B9\u51FB\u6309\u94AE\u521B\u5EFA\u6620\u5C04\u3002","placeholder-mapping-folder":"\u6587\u4EF6\u5939","placeholder-mapping-toolbar":"\u5DE5\u5177\u680F","button-new-mapping":"+ \u65B0\u5EFA\u6620\u5C04","button-new-mapping-tooltip":"\u6DFB\u52A0\u4E00\u9879\u65B0\u7684\u300C\u6587\u4EF6\u5939->\u5DE5\u5177\u680F\u300D\u7684\u6620\u5C04","error-folder-already-mapped":"\u6B64\u6587\u4EF6\u5939\u5DF2\u7ECF\u5173\u8054\u4E86\u4E00\u4E2A\u5DE5\u5177\u680F\u3002"},"icon-suggester":{"option-no-icon":"\u65E0\u56FE\u6807",placeholder:"\u641C\u7D22\u56FE\u6807...","instruction-navigate":"\u5BFC\u822A","instruction-use":"\u4F7F\u7528\u56FE\u6807","instruction-dismiss":"\u5173\u95ED"},item:{"button-duplicate-tooltip":"\u590D\u5236\u6B64\u9879\u76EE","button-icon-tooltip":"\u9009\u62E9\u56FE\u6807\uFF08\u53EF\u9009\uFF09","label-preview-edit":"\u7F16\u8F91\u5DE5\u5177\u680F\uFF1A{{toolbar}}","label-preview-empty-no-items":"\u7F3A\u5C11\u9879\u76EE\uFF0C\u7F16\u8F91\u6B64\u5DE5\u5177\u680F\u4EE5\u6DFB\u52A0\u9879\u76EE\u3002","option-break":"\u6362\u884C","option-command":"\u547D\u4EE4","option-command-placeholder":"\u641C\u7D22\u547D\u4EE4","option-component-icon":"\u56FE\u6807","option-component-label":"\u6587\u672C","option-file":"\u6587\u4EF6","option-file-placeholder":"\u641C\u7D22\u6587\u4EF6\u6216\u6587\u4EF6\u5939","option-file-error-does-not-exist":"\u6B64\u6587\u4EF6\uFF08\u6216\u6587\u4EF6\u5939\uFF09\u4E0D\u5B58\u5728\u3002","option-item-group":"\u9879\u76EE\u7EC4","option-item-group-placeholder":"\u5DE5\u5177\u680F","option-item-group-help":"\u9009\u62E9\u8981\u5D4C\u5957\u8FDB\u6B64\u5DE5\u5177\u680F\u7684\u5DE5\u5177\u680F\u3002","option-item-group-error-does-not-exist":"\u5DE5\u5177\u680F\u4E0D\u5B58\u5728","option-item-menu":"\u9879\u76EE\u83DC\u5355","option-item-menu-placeholder":"\u5DE5\u5177\u680F","option-item-menu-help":"\u9009\u62E9\u8981\u4F5C\u4E3A\u83DC\u5355\u6253\u5F00\u7684\u5DE5\u5177\u680F\u3002","option-item-menu-error-does-not-exist":"\u5DE5\u5177\u680F\u4E0D\u5B58\u5728","option-label-placeholder":"\u6587\u672C\uFF08\u5982\u679C\u8BBE\u7F6E\u4E86\u56FE\u6807\u5219\u53EF\u9009\uFF09","option-separator":"\u5206\u9694\u7B26","option-tooltip-placeholder":"\u5DE5\u5177\u63D0\u793A\uFF08\u53EF\u9009\uFF09","option-uri":"URI","option-uri-placehoder":"\u7F51\u7AD9\u3001URI \u6216\u7B14\u8BB0\u540D\u79F0","option-uri-help":"\u63D0\u793A\uFF1A\u5728 URI \u4E2D\u53EF\u4EE5\u4F7F\u7528\u4F7F\u7528\u7B14\u8BB0\u5C5E\u6027\u3002","option-visibility-component-hidden-platform":"\u5728{{platform}}\u9690\u85CF{{component}}","option-visibility-component-visible-platform":"\u5728{{platform}}\u663E\u793A{{component}}","option-visibility-hidden":"\u9690\u85CF","option-visibility-hidden-platform":"\u5728{{platform}}\u9690\u85CF","option-visibility-visible-platform":"\u5728{{platform}}\u663E\u793A","option-visibility-platform-desktop":"\u684C\u9762\u7AEF","option-visibility-platform-mobile":"\u79FB\u52A8\u7AEF"},"item-suggester":{placeholder:"\u641C\u7D22\u9879\u76EE...","instruction-navigate":"\u5BFC\u822A","instruction-use":"\u4F7F\u7528\u9879\u76EE","instruction-dismiss":"\u5173\u95ED"},items:{name:"\u9879\u76EE","name-with-count":"\u9879\u76EE\uFF08{{count}}\uFF09",description:"\u6309\u987A\u5E8F\u5411\u5DE5\u5177\u680F\u6DFB\u52A0\u9879\u76EE\u3002","label-empty-no-items":"\u65E0\u5DE5\u5177\u680F\u9879\u76EE\u3002","button-add-break-tooltip":"\u5411\u5DE5\u5177\u680F\u6DFB\u52A0\u6362\u884C","button-add-separator-tooltip":"\u5411\u5DE5\u5177\u680F\u6DFB\u52A0\u5206\u9694\u7B26","button-collapse-items-tooltip":"\u6298\u53E0\u6240\u6709\u9879\u76EE","button-expand-items-tooltip":"\u5C55\u5F00\u6240\u6709\u9879\u76EE","button-new-item":"+ \u6DFB\u52A0\u5DE5\u5177\u680F\u9879\u76EE","button-new-item-tooltip":"\u5411\u5DE5\u5177\u680F\u6DFB\u52A0\u65B0\u9879\u76EE","option-item-empty-label":"\u672A\u8BBE\u7F6E\u6587\u672C","option-edit-item-group-tooltip":"\u7F16\u8F91\u9879\u76EE\u7EC4\uFF1A{{toolbar}}","option-edit-item-group-tooltip_none":"\u7F16\u8F91\u9879\u76EE\u7EC4","option-edit-item-tooltip":"\u7F16\u8F91\u5DE5\u5177\u680F\u9879\u76EE","option-edit-item-type-tooltip":"\u7F16\u8F91 {{itemType}}"},name:{name:"\u540D\u79F0",description:"\u4E3A\u6B64\u5DE5\u5177\u680F\u6307\u5B9A\u552F\u4E00\u540D\u79F0\u3002","error-toolbar-already-exists":"\u5DF2\u5B58\u5728\u540C\u540D\u7684\u5DE5\u5177\u680F\uFF01"},other:{name:"\u5176\u4ED6",icon:{name:"\u56FE\u6807",description:"\u8BBE\u7F6E\u6D6E\u52A8\u6309\u94AE\u548C\u5BFC\u822A\u680F\uFF08\u79FB\u52A8\u7AEF\uFF09\u7684\u56FE\u6807\uFF0C\u9700\u8981\u91CD\u542F\u3002",tooltip:"\u9009\u62E9\u56FE\u6807"},"ribbon-action":{"option-item-suggester":"\u6253\u5F00\u5FEB\u901F\u5DE5\u5177","option-toolbar-suggester":"\u6253\u5F00\u5FEB\u901F\u5DE5\u5177\u680F"},"show-edit-tbar":{name:"\u5728\u5DE5\u5177\u680F\u83DC\u5355\u4E2D\u663E\u793A'\u7F16\u8F91\u5DE5\u5177\u680F'\u7684\u94FE\u63A5",description:"\u5728\u5DE5\u5177\u680F\u83DC\u5355\u4E2D\u6DFB\u52A0\u4E00\u4E2A\u9879\u76EE\uFF0C\u4EE5\u5FEB\u901F\u8BBF\u95EE\u5DE5\u5177\u680F\u7684\u8BBE\u7F6E\u3002"}},position:{name:"\u4F4D\u7F6E",description:"\u914D\u7F6E\u5F53\u524D\u5DE5\u5177\u680F\u7684\u663E\u793A\u4F4D\u7F6E","option-mobile-help":"\u63D0\u793A\uFF1A\u4F60\u53EF\u4EE5\u4ECE\u5BFC\u822A\u680F\u8BBF\u95EE\u5DE5\u5177\u680F\u3002","option-fabl":"\u6D6E\u52A8\u6309\u94AE\uFF1A\u5DE6\u4FA7","option-fabr":"\u6D6E\u52A8\u6309\u94AE\uFF1A\u53F3\u4FA7","option-hidden":"\u9690\u85CF\uFF08\u4E0D\u663E\u793A\uFF09","option-hidden-mobile":"\u9690\u85CF / \u5BFC\u822A\u680F","option-props":"\u5C5E\u6027\u4E0B\u65B9","option-top":"\u7F6E\u9876\uFF08\u56FA\u5B9A\u4F4D\u7F6E\uFF09"},styles:{name:"\u6837\u5F0F",description:"\u5E94\u7528\u4E8E\u5DE5\u5177\u680F\u7684\u6837\u5F0F\u5217\u8868\u3002",help:"\u4F7F\u7528 Style Settings \u63D2\u4EF6\u53EF\u8FDB\u884C\u66F4\u591A\u81EA\u5B9A\u4E49\u3002","option-autohide":"\u81EA\u52A8\u9690\u85CF*","option-autohide-disclaimer":"\u81EA\u52A8\u9690\u85CF\u4E0D\u9002\u7528\u4E8E\u79FB\u52A8\u7AEF\u3002","option-between":"\u9879\u76EE\u95F4\u8DDD","option-border":"\u663E\u793A\u8FB9\u6846","option-button":"\u663E\u793A\u4E3A\u6309\u94AE","option-center":"\u5C45\u4E2D\u9879\u76EE","option-even":"\u5747\u5300\u5206\u5E03\u9879\u76EE","option-floatl":"Float left\uFF08\u5DE6\u6D6E\u52A8\uFF09*","option-floatl-disclaimer":"\u5DE6\u6D6E\u52A8\u4EC5\u5728 Callout \u5185\u6709\u6548\u3002","option-floatr":"Float right\uFF08\u53F3\u6D6E\u52A8\uFF09*","option-floatr-disclaimer":"\u53F3\u6D6E\u52A8\u4EC5\u5728 Callout \u5185\u6709\u6548\u3002","option-left":"\u5DE6\u5BF9\u9F50\u9879\u76EE","option-noborder":"\u65E0\u8FB9\u6846","option-nofloat":"\u65E0\u6D6E\u52A8","option-notsticky":"\u975E\u7C98\u6027","option-nowrap":"\u4E0D\u6362\u884C\u9879\u76EE*","option-nowrap-disclaimer":"\u5728\u9879\u76EE\u4E0D\u5747\u5300\u5206\u5E03\u6216\u5C45\u4E2D\u7684\u60C5\u51B5\u4E0B\u6548\u679C\u6700\u4F73\u3002","option-nowide":"\u6B63\u6587\u5BBD\u5EA6*","option-nowide-disclaimer":"\u6B63\u6587\u5BBD\u5EA6\u4EC5\u5728\u5DE5\u5177\u680F\u4F4D\u7F6E\u4E3A\u7F6E\u9876\uFF08\u56FA\u5B9A\u4F4D\u7F6E\uFF09\u65F6\u6709\u6548\u3002","option-right":"\u53F3\u5BF9\u9F50\u9879\u76EE","option-sticky":"Sticky\uFF08\u7C98\u6027\uFF09\u6837\u5F0F*","option-sticky-disclaimer":"Sticky\uFF08\u7C98\u6027\uFF09\u6837\u5F0F\u5728\u9605\u8BFB\u6A21\u5F0F\u4E0B\u4E0D\u9002\u7528\u3002","option-wide":"\u7F16\u8F91\u5668\u5BBD\u5EA6*","option-wide-disclaimer":"\u7F16\u8F91\u5668\u5BBD\u5EA6\u4EC5\u5728\u5DE5\u5177\u680F\u4F4D\u7F6E\u4E3A\u7F6E\u9876\uFF08\u56FA\u5B9A\u4F4D\u7F6E\uFF09\u65F6\u6709\u6548\u3002","option-default-name":"\u9ED8\u8BA4","option-default-description":"\u9002\u7528\u4E8E\u6240\u6709\u5E73\u53F0\uFF08\u9664\u975E\u88AB\u8986\u76D6\uFF09\u3002","option-default-empty":"\u672A\u8BBE\u7F6E\u9ED8\u8BA4\u6837\u5F0F\u3002","option-mobile-name":"\u79FB\u52A8\u7AEF","option-mobile-description":"\u8986\u76D6\u9ED8\u8BA4\u6837\u5F0F\u3002","option-mobile-empty":"\u672A\u8BBE\u7F6E\u79FB\u52A8\u7AEF\u6837\u5F0F\u3002\u4F7F\u7528\u9ED8\u8BA4\u6837\u5F0F\u3002","style-tooltip-use-class":"\u5728 Callout \u6216 CSS \u4E2D\u4F7F\u7528\uFF1A{{class}}","style-remove-tooltip":"\u79FB\u9664"},toolbars:{name:"\u5DE5\u5177\u680F","name-with-count":"\u5DE5\u5177\u680F\uFF08{{count}}\uFF09",description:"\u5B9A\u4E49\u8981\u6DFB\u52A0\u5230\u7B14\u8BB0\u4E2D\u7684\u5DE5\u5177\u680F\u3002","button-collapse-tbars-tooltip":"\u6298\u53E0\u6240\u6709\u5DE5\u5177\u680F","button-duplicate-tbar-tooltip":"\u590D\u5236\u6B64\u5DE5\u5177\u680F","button-edit-tbar":"\u7F16\u8F91","button-expand-tbars-tooltip":"\u5C55\u5F00\u6240\u6709\u5DE5\u5177\u680F","button-edit-tbar-tooltip":"\u66F4\u65B0\u6B64\u5DE5\u5177\u680F","button-new-tbar":"+ \u65B0\u5EFA\u5DE5\u5177\u680F","button-new-tbar-tooltip":"\u6DFB\u52A0\u4E00\u4E2A\u65B0\u7684\u5DE5\u5177\u680F","duplicated-tbar-suffix":"\u590D\u5236","label-empty-create-tbar":"\u70B9\u51FB\u6309\u94AE\u521B\u5EFA\u5DE5\u5177\u680F\u3002","label-tbar-name-not-set":"\u26A0\uFE0F \u672A\u8BBE\u7F6E\u5DE5\u5177\u680F\u540D\u79F0"},usage:{name:"\u4F7F\u7528\u60C5\u51B5",description:"\u6B64\u5DE5\u5177\u680F\u5728 {{mappingCount}} \u4E2A\u6620\u5C04\u548C {{itemCount}} \u4E2A\u5DE5\u5177\u680F\u9879\u76EE\u4E2D\u4F7F\u7528\u3002","description-search":"\u641C\u7D22\u5C5E\u6027\u7684\u4F7F\u7528\u60C5\u51B5"}},Bn={"button-floating-tooltip":"\u6253\u5F00\u7B14\u8BB0\u5DE5\u5177\u680F","menu-edit-toolbar":"\u7F16\u8F91\u5DE5\u5177\u680F\uFF1A{{toolbar}}...","menu-position":"\u8BBE\u7F6E\u4F4D\u7F6E","menu-toolbar-settings":"\u7B14\u8BB0\u5DE5\u5177\u680F\u8BBE\u7F6E..."},Hn={command:Pn,notice:On,plugin:Vn,setting:_n,toolbar:Bn};var si=`What's new in Note Toolbar v1.16?

## New Features \u{1F389}

### Custom styles

Using the new _Custom_ styles section with a CSS snippet, you can now define custom classes that you can apply to one or more specific toolbars.

Read more about it on the new [Custom styling](https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Custom-styling) page.

_Thank you @Moyf for the idea, and to @laktiv for the feedback._

<img src="https://raw.githubusercontent.com/chrisgurney/obsidian-note-toolbar/master/docs/images/styles_settings_custom.png" width="700"/>

### Execute a command after creating a file from a template (Templater)

<img src="https://github.com/user-attachments/assets/7ae7628f-24e6-4721-9f31-2a3b6fb008d0" width="700"/>

Notes:

- Depending on your feedback, this can be added easily to other script functions/types.
- Creating a file from template will now no longer focus the file explorer on the new file, but you now can explicitly do that by selecting the \`Files: Reveal current file in navigation\` command.
  - _Though I couldn't get this command to work reliably in my own testing, while other commands seem to work fine. I'm open to getting help to figure out why. I'm wondering if I have to wait for the \`file-open\` event explicitly first, before execution._
- Thank you @pdelre for inspiring the idea for this one in [#203](https://github.com/chrisgurney/obsidian-note-toolbar/discussions/203)

### (BETA) Note Toolbar API

The first Note Toolbar APIs allow you to show suggester and prompt modals, enabling Dataview JS or JS Engine scripts to prompt the user for information.

>[!note]
> The API is considered BETA beyond this release, until more functions are added in the future (e.g., manipulating toolbars, and other UI components) and I consider naming and organization of the methods available. Functions may change. Provide feedback on the [release announcement](https://github.com/chrisgurney/obsidian-note-toolbar/discussions/207).

Read more about it on the [Note Toolbar API](https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Note-Toolbar-API) page.

## Improvements \u{1F680}

- Improved upon how toolbars are rendered to:
  - remove unneeded removal of existing toolbars (reduce flickering, speed up display);
  - evaluate Templater/Dataview expressions used in the toolbar before displaying it ([#198](https://github.com/chrisgurney/obsidian-note-toolbar/issues/198)); and
  - ensure the toolbar is shown if the view is switched between view modes (i.e., reading \u2190\u2192 editing)
- Changes to the right-click menu:
  - Choose positions, including floating button positions, via the _Set position_ menu.
  - Show/Hide note properties.
  - Reordered items to put settings at the bottom.
- Settings: Increased the size of the arguments and expressions fields for script items. _Thanks @laktiv_

## Fixes

- Importing callouts from Settings now also transfers mobile styles properly [#189](https://github.com/chrisgurney/obsidian-note-toolbar/issues/189) _Thanks @laktiv!_
- Better importing of brackets, escaped characters from callouts.
- Minimal theme: Width of toolbar below props too wide [#204](https://github.com/chrisgurney/obsidian-note-toolbar/issues/204)
- The menu CSS class is now added to sub-menus, so CSS snippets can be applied to them as well.
- Quick Tools: Items with invalid item expressions showing multiple error messages.
- Settings: Preview tooltips with vars not using monospace font.
- Export/Share: URIs with a Templater expression as a link were having extra brackets added.
- Export/Share: Link is cut off at first close bracket.
- Settings: Long expressions in previews pushing Edit button to the right.
- Settings: Font size for expressions too large for item group previews.

---

## Previous releases

[v1.15 release](https://github.com/chrisgurney/obsidian-note-toolbar/releases/tag/1.15.0): Dataview, JS Engine, and Templater support

[v1.14 release](https://github.com/chrisgurney/obsidian-note-toolbar/releases/tag/1.14.0): Share toolbars, and import/export as callouts

[v1.13 release](https://github.com/chrisgurney/obsidian-note-toolbar/releases/tag/1.13): _What's New_ + _Help_ windows, and access to toolbars for linked notes from file menus.

[v1.12 release](https://github.com/chrisgurney/obsidian-note-toolbar/releases/tag/1.12.1): Translations, and Quick Tools (fast access to all of your tools).`;var Me=202407271e-1,Ao=1.16;i18next.addResourceBundle("de","plugin-note-toolbar",Co);i18next.addResourceBundle("en","plugin-note-toolbar",ko);i18next.addResourceBundle("uk","plugin-note-toolbar",xo);i18next.addResourceBundle("zh","plugin-note-toolbar",Io);var r=i18next.getFixedT(null,"plugin-note-toolbar",null);i18next.addResourceBundle("en","plugin-note-toolbar-docs",{"whats-new":si});var ri=i18next.getFixedT(null,"plugin-note-toolbar-docs",null),ce="ntb-whats-new-view";var ne=(d=>(d.Break="break",d.Command="command",d.Dataview="dataview",d.File="file",d.Folder="folder",d.Group="group",d.JsEngine="js-engine",d.Menu="menu",d.Separator="separator",d.Templater="templater-obsidian",d.Uri="uri",d))(ne||{});var li={["break"]:"ignore",["command"]:"command",["dataview"]:"script",["file"]:"file",["folder"]:"file",["group"]:"toolbar",["js-engine"]:"script",["menu"]:"toolbar",["separator"]:"ignore",["uri"]:"text",["templater-obsidian"]:"script"};var Mo=(u=>(u.Command="data-command",u.CommandNtb="data-ntb-command",u.Dataview="data-dataview",u.Folder="data-folder",u.FolderNtb="data-ntb-folder",u.JsEngine="data-js-engine",u.Menu="data-menu",u.MenuNtb="data-ntb-menu",u.Templater="data-templater-obsidian",u))(Mo||{});var pi={export:{includeIcons:!0,replaceVars:!0,useDataEls:!0,useIds:!0},folderMappings:[],icon:"circle-ellipsis",ribbonAction:"toolbar",scriptingEnabled:!1,showEditInFabMenu:!1,toolbarProp:"notetoolbar",toolbars:[],version:Me,whatsnew_version:0},Sa={uuid:te(),customClasses:"",defaultStyles:["border","even","sticky"],items:[],mobileStyles:[],name:"",position:{desktop:{allViews:{position:"props"}},tablet:{allViews:{position:"props"}},mobile:{allViews:{position:"props"}}},updated:new Date().toISOString()},Ot={desktop:{allViews:{components:["icon","label"]}},mobile:{allViews:{components:["icon","label"]}},tablet:{allViews:{components:["icon","label"]}}},Vt="https://github.com/chrisgurney/obsidian-note-toolbar/wiki/",di="https://github.com/chrisgurney/obsidian-note-toolbar/releases",_t="COMMAND_DOES_NOT_EXIST",X={expression:"data-expr",sourceFile:"data-src",sourceFunction:"data-func",sourceArgs:"data-args",outputContainer:"data-callout",outputFile:"data-dest"},ut={["command"]:r("setting.item.option-command"),["dataview"]:"Dataview",["file"]:r("setting.item.option-file"),["group"]:r("setting.item.option-item-group"),["menu"]:r("setting.item.option-item-menu"),["js-engine"]:"JS Engine",["templater-obsidian"]:"Templater",["uri"]:r("setting.item.option-uri")},Do={desktop:[{top:r("setting.position.option-top")},{props:r("setting.position.option-props")},{fabl:r("setting.position.option-fabl")},{fabr:r("setting.position.option-fabr")},{hidden:r("setting.position.option-hidden")}],mobile:[{top:r("setting.position.option-top")},{props:r("setting.position.option-props")},{fabl:r("setting.position.option-fabl")},{fabr:r("setting.position.option-fabr")},{hidden:r("setting.position.option-hidden-mobile")}]},ui={["item-suggester"]:r("setting.other.ribbon-action.option-item-suggester"),["toolbar-suggester"]:r("setting.other.ribbon-action.option-toolbar-suggester"),["toolbar"]:r("setting.other.ribbon-action.option-toolbar")},ct=[{autohide:r("setting.styles.option-autohide")},{border:r("setting.styles.option-border")},{button:r("setting.styles.option-button")},{center:r("setting.styles.option-center")},{wide:r("setting.styles.option-wide")},{left:r("setting.styles.option-left")},{right:r("setting.styles.option-right")},{between:r("setting.styles.option-between")},{even:r("setting.styles.option-even")},{sticky:r("setting.styles.option-sticky")}],Fo=[{autohide:r("setting.styles.option-autohide-disclaimer")},{sticky:r("setting.styles.option-sticky-disclaimer")}],mt=[{mbrder:r("setting.styles.option-border")},{mnbrder:r("setting.styles.option-noborder")},{mbtn:r("setting.styles.option-button")},{mctr:r("setting.styles.option-center")},{mnwd:r("setting.styles.option-nowide")},{mnwrp:r("setting.styles.option-nowrap")},{mwd:r("setting.styles.option-wide")},{mlft:r("setting.styles.option-left")},{mrght:r("setting.styles.option-right")},{mbtwn:r("setting.styles.option-between")},{mevn:r("setting.styles.option-even")},{mstcky:r("setting.styles.option-sticky")},{mnstcky:r("setting.styles.option-notsticky")}],No=[{mnwrp:r("setting.styles.option-nowrap-disclaimer")},{mstcky:r("setting.styles.option-sticky-disclaimer")}];var Un=!1;function _e(s,i){s&&s.allViews&&(s.allViews.components.includes(i)||s.allViews.components.push(i))}function Ye(s,i,e){if(e<0||e===s.length)return;let t=s[i];s[i]=s[e],s[e]=t}function mi(s){let i=Lo(s.desktop),e=Lo(s.mobile),t=Lo(s.tablet);return i.concat(e,t)}function ht(s){let i=Po(s.desktop),e=Po(s.mobile),t=Po(s.tablet);return[i,e,t]}function w(s,...i){Un&&console.debug(s,...i)}function V(s,i,e){console.error(s,i),e&&e.createEl("pre").setText(s+`
`+i);let t=createFragment();t.append(s),i&&t.append(`
`,i),new De.Notice(t,5e3)}function Bt(s,i){let t=Object.values(s.app.commands.commands).find(o=>o.id===i);return t?t.name:void 0}function Oo(s,i){let t=Object.values(s.app.commands.commands).find(o=>o.name===i);return t?t.id:_t}function te(){return window.crypto.randomUUID()}function bt(s){let i=s.getBoundingClientRect();return{x:i.left+activeWindow.scrollX,y:i.top+activeWindow.scrollY}}function Vo(s){let i;return s&&(s instanceof MouseEvent&&s.type==="auxclick"&&s.button===1?i="tab":(De.Platform.isWin||De.Platform.isLinux?s!=null&&s.ctrlKey:s!=null&&s.metaKey)&&(i=s!=null&&s.altKey?s!=null&&s.shiftKey?"window":"split":"tab")),i}function Xe(s){var i;return s&&s instanceof De.MarkdownView?`${s.leaf.id} ${(i=s.file)==null?void 0:i.path} ${s.getMode()}`:void 0}function Lo(s){let i=!1,e=!1;return s&&s.allViews&&(i=s.allViews.components.includes("icon"),e=s.allViews.components.includes("label")),[i,e]}function Po(s){return!!s&&!!s.allViews&&s.allViews.components.length>0}function Ze(s){try{return s=s.replace(/(\w+)\s*:/g,'"$1":'),s.trim().startsWith("{")||(s=`{${s}`),s.trim().endsWith("}")||(s=`${s}}`),JSON.parse(s)}catch(i){return null}}function gi(s,i){let e=s.workspace.getActiveViewOfType(De.MarkdownView),t=e?e.editor:null;if(t){let o=t==null?void 0:t.getCursor(),n=String(i);t.replaceRange(n,o),t.setCursor(o.line,o.ch+n.length)}}var gt;function hi(s){return s!==""?(gt||(gt=document.createElement("input"),gt.setAttribute("type","url")),gt.value=s,gt.validity.valid):!1}function Ht(s,i,e){if(i!==e&&i>=0&&i<s.length&&e>=0&&e<s.length){let t=s.splice(i,1)[0];s.splice(e,0,t)}}function bi(){setTimeout(()=>{let s=new KeyboardEvent("keydown",{key:"ArrowDown",code:"ArrowDown",keyCode:40,bubbles:!0,cancelable:!0});activeDocument.dispatchEvent(s)},50)}function Be(s,i){if(s&&s.allViews){let e=s.allViews.components.indexOf(i);e!==-1&&s.allViews.components.splice(e,1)}}function fi(s,i){return i.items.filter(e=>e.linkAttr.type==="command"&&!(e.linkAttr.commandId in s.app.commands.commands)).map(e=>e.linkAttr.commandId.split(":")[0].trim())}function wi(s){return s.items.some(i=>i.linkAttr.type==="menu"&&i.link)}var ye=require("obsidian");var we=require("obsidian");var Qe=class extends we.Modal{constructor(i){super(i.app),this.modalEl.addClass("note-toolbar-setting-mini-dialog","note-toolbar-setting-help-dialog")}onOpen(){this.setTitle(r("setting.help.title")),new we.Setting(this.modalEl).setName(ae("book-open",r("setting.help.label-user-guide"))).setDesc(r("setting.help.label-user-guide-description")).addButton(i=>{i.setButtonText(r("setting.help.button-read")).setTooltip(r("setting.help.button-open-github")).setCta().onClick(()=>{window.open(Vt,"_blank")})}),new we.Setting(this.modalEl).setName(ae("layout-grid",r("setting.help.label-examples"))).setDesc(r("setting.help.label-examples-description")).addButton(i=>{i.setButtonText(r("setting.help.button-open")).setTooltip(r("setting.help.button-open-github")).onClick(()=>{window.open("https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Examples","_blank")})}).setClass("note-toolbar-setting-no-border"),new we.Setting(this.modalEl).setName(ae("messages-square",r("setting.help.label-support"))).setDesc(r("setting.help.label-support-description")).addButton(i=>{i.setButtonText(r("setting.help.button-open")).setTooltip(r("setting.help.button-open-github")).setCta().onClick(()=>{window.open("https://github.com/chrisgurney/obsidian-note-toolbar/discussions","_blank")})}),new we.Setting(this.modalEl).setName(ae("bug",r("setting.help.label-bug"))).setDesc(r("setting.help.label-bug-description")).addButton(i=>{i.setButtonText(r("setting.help.button-open")).setTooltip(r("setting.help.button-open-google")).onClick(()=>{window.open("https://docs.google.com/forms/d/e/1FAIpQLSf_cABJLmNqPm-2DjH6vcxyuYKNoP-mmeyk8_vph8KMZHDSyg/viewform","_blank")})}).setClass("note-toolbar-setting-no-border"),new we.Setting(this.modalEl).setName(ae("pen-box",r("setting.help.label-feedback"))).setDesc(r("setting.help.label-feedback-description")).addButton(i=>{i.setButtonText(r("setting.help.button-open")).setTooltip(r("setting.help.button-open-google")).onClick(()=>{window.open("https://docs.google.com/forms/d/e/1FAIpQLSeVWHVnookJr8HVQywk5TwupU-p7vkRkSt83Q5jscR6VwpZEQ/viewform","_blank")})}).setClass("note-toolbar-setting-no-border"),new we.Setting(this.modalEl).setName(ae("heart",r("setting.help.label-donate"))).setDesc(r("setting.help.label-donate-description")).addButton(i=>{i.setButtonText(r("setting.help.button-donate")).setTooltip(r("setting.help.button-donate-tooltip")).setCta().onClick(()=>{window.open("https://buymeacoffee.com/cheznine","_blank")})})}};function ve(s,i,e,t=!1){let o=document.createDocumentFragment(),n=o.createDiv();n.addClass("note-toolbar-setting-tbar-preview");let a=document.createDocumentFragment();if(i.items.length>0?i.items.filter(p=>!(p.label===""&&p.icon===""&&!["break","group","separator"].includes(p.linkAttr.type))).map(p=>{switch(p.linkAttr.type){case"break":case"separator":break;case"group":if(e){let u=e.getToolbarById(p.link);if(u){let c=createDiv();c.addClass("note-toolbar-setting-toolbar-list-preview-item");let d=createSpan();d.addClass("note-toolbar-setting-group-preview"),d.setText(u.name),c.append(d),a.append(c)}}break;default:let l=(0,ye.getIcon)(p.icon);if(l||p.label){let u=createDiv();if(u.addClass("note-toolbar-setting-toolbar-list-preview-item"),p.icon&&l){let c=createSpan();(0,ye.setIcon)(c,p.icon),a.append(c),u.append(c)}if(p.label){let c=createSpan();c.textContent=p.label,p.label&&s.hasVars(p.label)&&c.addClass("note-toolbar-setting-item-preview-code"),a.append(c),u.append(c)}a.append(u)}break}}):a=Te(r("setting.item.label-preview-empty-no-items")),n.appendChild(a),t){let p=createDiv();p.addClass("note-toolbar-setting-tbar-preview-edit");let l=createEl("a");l.href="obsidian://note-toolbar?toolbarsettings="+encodeURIComponent(i.name),l.setText(r("setting.item.label-preview-edit",{toolbar:i.name})),p.appendChild(l),o.appendChild(p)}return o}function Rt(s,i,e=!1,t){if(ye.Platform.isPhone||e){let o=i.createDiv();o.addClass("note-toolbar-setting-help-section");let n=document.createDocumentFragment();n.append("v"+s.manifest.version," \u2022\xA0");let a=n.createEl("a",{href:"#",text:r("setting.button-whats-new")});s.registerDomEvent(a,"click",p=>{s.app.workspace.getLeaf(!0).setViewState({type:ce,active:!0}),t()}),n.append(" \u2022\xA0",n.createEl("a",{href:"obsidian://note-toolbar?help",text:ae("help-circle",r("setting.button-help"))})),o.append(n)}else{let o=document.createDocumentFragment();o.append(o.createEl("a",{href:di,text:"v"+s.manifest.version})),new ye.Setting(i).setName(r("plugin.name")+" \u2022 v"+s.manifest.version).setDesc(r("setting.help.description")).addButton(n=>{n.setTooltip(r("setting.button-whats-new-tooltip")).onClick(()=>{s.app.workspace.getLeaf(!0).setViewState({type:ce,active:!0}),t()}).buttonEl.setText(r("setting.button-whats-new"))}).addButton(n=>{n.setTooltip(r("setting.button-help-tooltip")).onClick(()=>{new Qe(s).open()}).buttonEl.setText(ae("help-circle",r("setting.button-help")))})}}function Te(s){let i=document.createDocumentFragment(),e=document.createElement("i");return e.textContent=s,i.append(e),i}function ae(s,i){let e=document.createDocumentFragment(),t=e.createEl("span");t.addClass("note-toolbar-setting-text-with-icon");let o=t.createEl("span");return(0,ye.setIcon)(o,"lucide-"+s),t.createEl("span").setText(i),e.append(t),e}function N(s,i,e=r("setting.button-learn-more")){let t=document.createDocumentFragment();return t.append(s," "),t.createEl("a",{href:Vt+i,text:e}).addClass("note-toolbar-setting-focussable-link"),t}function Ut(s,i){let e,t=s.includes(":")?s.split(":")[0].trim():void 0;return t&&t!=="workspace"&&(e=document.createDocumentFragment(),e.createEl("a",{href:`obsidian://show-plugin?id=${t}`,text:i||"Review\xA0plugin"}).addClass("note-toolbar-setting-focussable-link")),e}function qt(s){s.settings.whatsnew_version!==Ao&&(s.settings.whatsnew_version=Ao,s.settingsManager.save().then(()=>{s.app.workspace.getLeaf(!0).setViewState({type:ce,active:!0})}))}var Wt=require("obsidian");var zt=class extends Wt.AbstractInputSuggest{constructor(e,t){super(e,t);this.PATTERN_ALL_FILES={pattern:"*",label:"*",desc:r("setting.mappings.option-folder-all")};this.PATTERN_ROOT_ONLY={pattern:"/",label:"/",desc:r("setting.mappings.option-folder-root")};this.inputEl=t}getSuggestions(e){let t=this.app.vault.getAllLoadedFiles(),o=[],n=e.toLowerCase();return o.push(this.PATTERN_ALL_FILES.pattern),t.forEach(a=>{a instanceof Wt.TFolder&&a.path.toLowerCase().includes(n)&&o.push(a.path)}),o}renderSuggestion(e,t){e===this.PATTERN_ALL_FILES.pattern?this.renderPattern(t,this.PATTERN_ALL_FILES):e===this.PATTERN_ROOT_ONLY.pattern?this.renderPattern(t,this.PATTERN_ROOT_ONLY):t.setText(e)}selectSuggestion(e){this.inputEl.value=e,this.inputEl.trigger("input"),this.inputEl.blur(),this.close()}renderPattern(e,t){e.addClass("note-toolbar-setting-folder-suggestion-item-muted"),e.createSpan().setText(t.label),e.createSpan().setText(t.desc)}};var yi=require("obsidian"),He=class extends yi.AbstractInputSuggest{constructor(e,t,o){super(e,o);this.plugin=t,this.inputEl=o}getSuggestions(e){let t=this.plugin.settings.toolbars,o=[],n=e.toLowerCase();return t.forEach(a=>{a.name!==""&&a.name.toLowerCase().includes(n)&&o.push(a)}),o}renderSuggestion(e,t){t.setText(e.name)}selectSuggestion(e){this.inputEl.value=e.name,this.inputEl.trigger("input"),this.inputEl.blur(),this.close()}};var et=require("obsidian");var Fe=class extends et.SuggestModal{constructor(e,t){super(e.app);this.modalEl.addClass("note-toolbar-setting-mini-dialog"),this.plugin=e,this.callback=t,this.setPlaceholder(r("setting.icon-suggester.placeholder")),this.setInstructions([{command:"\u2191\u2193",purpose:r("setting.icon-suggester.instruction-navigate")},{command:"\u21B5",purpose:r("setting.icon-suggester.instruction-use")},{command:"esc",purpose:r("setting.icon-suggester.instruction-dismiss")}])}getSuggestions(e){let t=(0,et.getIconIds)(),o=[],n=e.toLowerCase();return o.push(r("setting.icon-suggester.option-no-icon")),t.forEach(a=>{a.toLowerCase().includes(n)&&o.push(a)}),o}renderSuggestion(e,t){t.addClass("note-toolbar-icon-suggestion");let o=t.createSpan();if(e===r("setting.icon-suggester.option-no-icon"))o.setText(e);else{o.setText(e.startsWith("lucide-")?e.substring(7):e);let n=t.createSpan();(0,et.setIcon)(n,e)}}onChooseSuggestion(e,t){this.callback(e),this.close()}};function vi(s,i){var e=Object.keys(s);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(s);i&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(s,o).enumerable})),e.push.apply(e,t)}return e}function ge(s){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?vi(Object(e),!0).forEach(function(t){qn(s,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(e)):vi(Object(e)).forEach(function(t){Object.defineProperty(s,t,Object.getOwnPropertyDescriptor(e,t))})}return s}function Jt(s){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Jt=function(i){return typeof i}:Jt=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Jt(s)}function qn(s,i,e){return i in s?Object.defineProperty(s,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):s[i]=e,s}function Ee(){return Ee=Object.assign||function(s){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(s[t]=e[t])}return s},Ee.apply(this,arguments)}function zn(s,i){if(s==null)return{};var e={},t=Object.keys(s),o,n;for(n=0;n<t.length;n++)o=t[n],!(i.indexOf(o)>=0)&&(e[o]=s[o]);return e}function Wn(s,i){if(s==null)return{};var e=zn(s,i),t,o;if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(s);for(o=0;o<n.length;o++)t=n[o],!(i.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(s,t)&&(e[t]=s[t])}return e}var jn="1.15.3";function Se(s){if(typeof window!="undefined"&&window.navigator)return!!navigator.userAgent.match(s)}var Ce=Se(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),kt=Se(/Edge/i),Ti=Se(/firefox/i),vt=Se(/safari/i)&&!Se(/chrome/i)&&!Se(/android/i),Mi=Se(/iP(ad|od|hone)/i),Di=Se(/chrome/i)&&Se(/android/i),Fi={capture:!1,passive:!1};function L(s,i,e){s.addEventListener(i,e,!Ce&&Fi)}function F(s,i,e){s.removeEventListener(i,e,!Ce&&Fi)}function eo(s,i){if(i){if(i[0]===">"&&(i=i.substring(1)),s)try{if(s.matches)return s.matches(i);if(s.msMatchesSelector)return s.msMatchesSelector(i);if(s.webkitMatchesSelector)return s.webkitMatchesSelector(i)}catch(e){return!1}return!1}}function Ni(s){return s.host&&s!==document&&s.host.nodeType?s.host:s.parentNode}function de(s,i,e,t){if(s){e=e||document;do{if(i!=null&&(i[0]===">"?s.parentNode===e&&eo(s,i):eo(s,i))||t&&s===e)return s;if(s===e)break}while(s=Ni(s))}return null}var Si=/\s+/g;function oe(s,i,e){if(s&&i)if(s.classList)s.classList[e?"add":"remove"](i);else{var t=(" "+s.className+" ").replace(Si," ").replace(" "+i+" "," ");s.className=(t+(e?" "+i:"")).replace(Si," ")}}function C(s,i,e){var t=s&&s.style;if(t){if(e===void 0)return document.defaultView&&document.defaultView.getComputedStyle?e=document.defaultView.getComputedStyle(s,""):s.currentStyle&&(e=s.currentStyle),i===void 0?e:e[i];!(i in t)&&i.indexOf("webkit")===-1&&(i="-webkit-"+i),t[i]=e+(typeof e=="string"?"":"px")}}function at(s,i){var e="";if(typeof s=="string")e=s;else do{var t=C(s,"transform");t&&t!=="none"&&(e=t+" "+e)}while(!i&&(s=s.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(e)}function Li(s,i,e){if(s){var t=s.getElementsByTagName(i),o=0,n=t.length;if(e)for(;o<n;o++)e(t[o],o);return t}return[]}function me(){var s=document.scrollingElement;return s||document.documentElement}function W(s,i,e,t,o){if(!(!s.getBoundingClientRect&&s!==window)){var n,a,p,l,u,c,d;if(s!==window&&s.parentNode&&s!==me()?(n=s.getBoundingClientRect(),a=n.top,p=n.left,l=n.bottom,u=n.right,c=n.height,d=n.width):(a=0,p=0,l=window.innerHeight,u=window.innerWidth,c=window.innerHeight,d=window.innerWidth),(i||e)&&s!==window&&(o=o||s.parentNode,!Ce))do if(o&&o.getBoundingClientRect&&(C(o,"transform")!=="none"||e&&C(o,"position")!=="static")){var m=o.getBoundingClientRect();a-=m.top+parseInt(C(o,"border-top-width")),p-=m.left+parseInt(C(o,"border-left-width")),l=a+n.height,u=p+n.width;break}while(o=o.parentNode);if(t&&s!==window){var g=at(o||s),h=g&&g.a,b=g&&g.d;g&&(a/=b,p/=h,d/=h,c/=b,l=a+c,u=p+d)}return{top:a,left:p,bottom:l,right:u,width:d,height:c}}}function Ei(s,i,e){for(var t=Pe(s,!0),o=W(s)[i];t;){var n=W(t)[e],a=void 0;if(e==="top"||e==="left"?a=o>=n:a=o<=n,!a)return t;if(t===me())break;t=Pe(t,!1)}return!1}function st(s,i,e,t){for(var o=0,n=0,a=s.children;n<a.length;){if(a[n].style.display!=="none"&&a[n]!==k.ghost&&(t||a[n]!==k.dragged)&&de(a[n],e.draggable,s,!1)){if(o===i)return a[n];o++}n++}return null}function Yo(s,i){for(var e=s.lastElementChild;e&&(e===k.ghost||C(e,"display")==="none"||i&&!eo(e,i));)e=e.previousElementSibling;return e||null}function se(s,i){var e=0;if(!s||!s.parentNode)return-1;for(;s=s.previousElementSibling;)s.nodeName.toUpperCase()!=="TEMPLATE"&&s!==k.clone&&(!i||eo(s,i))&&e++;return e}function Ci(s){var i=0,e=0,t=me();if(s)do{var o=at(s),n=o.a,a=o.d;i+=s.scrollLeft*n,e+=s.scrollTop*a}while(s!==t&&(s=s.parentNode));return[i,e]}function $n(s,i){for(var e in s)if(s.hasOwnProperty(e)){for(var t in i)if(i.hasOwnProperty(t)&&i[t]===s[e][t])return Number(e)}return-1}function Pe(s,i){if(!s||!s.getBoundingClientRect)return me();var e=s,t=!1;do if(e.clientWidth<e.scrollWidth||e.clientHeight<e.scrollHeight){var o=C(e);if(e.clientWidth<e.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||e.clientHeight<e.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!e.getBoundingClientRect||e===document.body)return me();if(t||i)return e;t=!0}}while(e=e.parentNode);return me()}function Gn(s,i){if(s&&i)for(var e in i)i.hasOwnProperty(e)&&(s[e]=i[e]);return s}function _o(s,i){return Math.round(s.top)===Math.round(i.top)&&Math.round(s.left)===Math.round(i.left)&&Math.round(s.height)===Math.round(i.height)&&Math.round(s.width)===Math.round(i.width)}var Tt;function Pi(s,i){return function(){if(!Tt){var e=arguments,t=this;e.length===1?s.call(t,e[0]):s.apply(t,e),Tt=setTimeout(function(){Tt=void 0},i)}}}function Kn(){clearTimeout(Tt),Tt=void 0}function Oi(s,i,e){s.scrollLeft+=i,s.scrollTop+=e}function Vi(s){var i=window.Polymer,e=window.jQuery||window.Zepto;return i&&i.dom?i.dom(s).cloneNode(!0):e?e(s).clone(!0)[0]:s.cloneNode(!0)}function _i(s,i,e){var t={};return Array.from(s.children).forEach(function(o){var n,a,p,l;if(!(!de(o,i.draggable,s,!1)||o.animated||o===e)){var u=W(o);t.left=Math.min((n=t.left)!==null&&n!==void 0?n:1/0,u.left),t.top=Math.min((a=t.top)!==null&&a!==void 0?a:1/0,u.top),t.right=Math.max((p=t.right)!==null&&p!==void 0?p:-1/0,u.right),t.bottom=Math.max((l=t.bottom)!==null&&l!==void 0?l:-1/0,u.bottom)}}),t.width=t.right-t.left,t.height=t.bottom-t.top,t.x=t.left,t.y=t.top,t}var ee="Sortable"+new Date().getTime();function Jn(){var s=[],i;return{captureAnimationState:function(){if(s=[],!!this.options.animation){var t=[].slice.call(this.el.children);t.forEach(function(o){if(!(C(o,"display")==="none"||o===k.ghost)){s.push({target:o,rect:W(o)});var n=ge({},s[s.length-1].rect);if(o.thisAnimationDuration){var a=at(o,!0);a&&(n.top-=a.f,n.left-=a.e)}o.fromRect=n}})}},addAnimationState:function(t){s.push(t)},removeAnimationState:function(t){s.splice($n(s,{target:t}),1)},animateAll:function(t){var o=this;if(!this.options.animation){clearTimeout(i),typeof t=="function"&&t();return}var n=!1,a=0;s.forEach(function(p){var l=0,u=p.target,c=u.fromRect,d=W(u),m=u.prevFromRect,g=u.prevToRect,h=p.rect,b=at(u,!0);b&&(d.top-=b.f,d.left-=b.e),u.toRect=d,u.thisAnimationDuration&&_o(m,d)&&!_o(c,d)&&(h.top-d.top)/(h.left-d.left)===(c.top-d.top)/(c.left-d.left)&&(l=Xn(h,m,g,o.options)),_o(d,c)||(u.prevFromRect=c,u.prevToRect=d,l||(l=o.options.animation),o.animate(u,h,d,l)),l&&(n=!0,a=Math.max(a,l),clearTimeout(u.animationResetTimer),u.animationResetTimer=setTimeout(function(){u.animationTime=0,u.prevFromRect=null,u.fromRect=null,u.prevToRect=null,u.thisAnimationDuration=null},l),u.thisAnimationDuration=l)}),clearTimeout(i),n?i=setTimeout(function(){typeof t=="function"&&t()},a):typeof t=="function"&&t(),s=[]},animate:function(t,o,n,a){if(a){C(t,"transition",""),C(t,"transform","");var p=at(this.el),l=p&&p.a,u=p&&p.d,c=(o.left-n.left)/(l||1),d=(o.top-n.top)/(u||1);t.animatingX=!!c,t.animatingY=!!d,C(t,"transform","translate3d("+c+"px,"+d+"px,0)"),this.forRepaintDummy=Yn(t),C(t,"transition","transform "+a+"ms"+(this.options.easing?" "+this.options.easing:"")),C(t,"transform","translate3d(0,0,0)"),typeof t.animated=="number"&&clearTimeout(t.animated),t.animated=setTimeout(function(){C(t,"transition",""),C(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1},a)}}}}function Yn(s){return s.offsetWidth}function Xn(s,i,e,t){return Math.sqrt(Math.pow(i.top-s.top,2)+Math.pow(i.left-s.left,2))/Math.sqrt(Math.pow(i.top-e.top,2)+Math.pow(i.left-e.left,2))*t.animation}var tt=[],Bo={initializeByDefault:!0},xt={mount:function(i){for(var e in Bo)Bo.hasOwnProperty(e)&&!(e in i)&&(i[e]=Bo[e]);tt.forEach(function(t){if(t.pluginName===i.pluginName)throw"Sortable: Cannot mount plugin ".concat(i.pluginName," more than once")}),tt.push(i)},pluginEvent:function(i,e,t){var o=this;this.eventCanceled=!1,t.cancel=function(){o.eventCanceled=!0};var n=i+"Global";tt.forEach(function(a){e[a.pluginName]&&(e[a.pluginName][n]&&e[a.pluginName][n](ge({sortable:e},t)),e.options[a.pluginName]&&e[a.pluginName][i]&&e[a.pluginName][i](ge({sortable:e},t)))})},initializePlugins:function(i,e,t,o){tt.forEach(function(p){var l=p.pluginName;if(!(!i.options[l]&&!p.initializeByDefault)){var u=new p(i,e,i.options);u.sortable=i,u.options=i.options,i[l]=u,Ee(t,u.defaults)}});for(var n in i.options)if(i.options.hasOwnProperty(n)){var a=this.modifyOption(i,n,i.options[n]);typeof a!="undefined"&&(i.options[n]=a)}},getEventProperties:function(i,e){var t={};return tt.forEach(function(o){typeof o.eventProperties=="function"&&Ee(t,o.eventProperties.call(e[o.pluginName],i))}),t},modifyOption:function(i,e,t){var o;return tt.forEach(function(n){i[n.pluginName]&&n.optionListeners&&typeof n.optionListeners[e]=="function"&&(o=n.optionListeners[e].call(i[n.pluginName],t))}),o}};function Zn(s){var i=s.sortable,e=s.rootEl,t=s.name,o=s.targetEl,n=s.cloneEl,a=s.toEl,p=s.fromEl,l=s.oldIndex,u=s.newIndex,c=s.oldDraggableIndex,d=s.newDraggableIndex,m=s.originalEvent,g=s.putSortable,h=s.extraEventProperties;if(i=i||e&&e[ee],!!i){var b,f=i.options,T="on"+t.charAt(0).toUpperCase()+t.substr(1);window.CustomEvent&&!Ce&&!kt?b=new CustomEvent(t,{bubbles:!0,cancelable:!0}):(b=document.createEvent("Event"),b.initEvent(t,!0,!0)),b.to=a||e,b.from=p||e,b.item=o||e,b.clone=n,b.oldIndex=l,b.newIndex=u,b.oldDraggableIndex=c,b.newDraggableIndex=d,b.originalEvent=m,b.pullMode=g?g.lastPutMode:void 0;var x=ge(ge({},h),xt.getEventProperties(t,i));for(var M in x)b[M]=x[M];e&&e.dispatchEvent(b),f[T]&&f[T].call(i,b)}}var Qn=["evt"],Q=function(i,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=t.evt,n=Wn(t,Qn);xt.pluginEvent.bind(k)(i,e,ge({dragEl:y,parentEl:R,ghostEl:I,rootEl:_,nextEl:qe,lastDownEl:Yt,cloneEl:H,cloneHidden:Le,dragStarted:ft,putSortable:J,activeSortable:k.active,originalEvent:o,oldIndex:nt,oldDraggableIndex:St,newIndex:ie,newDraggableIndex:Ne,hideGhostForTarget:Ui,unhideGhostForTarget:qi,cloneNowHidden:function(){Le=!0},cloneNowShown:function(){Le=!1},dispatchSortableEvent:function(p){Z({sortable:e,name:p,originalEvent:o})}},n))};function Z(s){Zn(ge({putSortable:J,cloneEl:H,targetEl:y,rootEl:_,oldIndex:nt,oldDraggableIndex:St,newIndex:ie,newDraggableIndex:Ne},s))}var y,R,I,_,qe,Yt,H,Le,nt,ie,St,Ne,jt,J,it=!1,to=!1,oo=[],Re,pe,Ho,Ro,ki,xi,ft,ot,Et,Ct=!1,$t=!1,Xt,Y,Uo=[],$o=!1,io=[],ao=typeof document!="undefined",Gt=Mi,Ii=kt||Ce?"cssFloat":"float",ea=ao&&!Di&&!Mi&&"draggable"in document.createElement("div"),Bi=function(){if(ao){if(Ce)return!1;var s=document.createElement("x");return s.style.cssText="pointer-events:auto",s.style.pointerEvents==="auto"}}(),Hi=function(i,e){var t=C(i),o=parseInt(t.width)-parseInt(t.paddingLeft)-parseInt(t.paddingRight)-parseInt(t.borderLeftWidth)-parseInt(t.borderRightWidth),n=st(i,0,e),a=st(i,1,e),p=n&&C(n),l=a&&C(a),u=p&&parseInt(p.marginLeft)+parseInt(p.marginRight)+W(n).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+W(a).width;if(t.display==="flex")return t.flexDirection==="column"||t.flexDirection==="column-reverse"?"vertical":"horizontal";if(t.display==="grid")return t.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(n&&p.float&&p.float!=="none"){var d=p.float==="left"?"left":"right";return a&&(l.clear==="both"||l.clear===d)?"vertical":"horizontal"}return n&&(p.display==="block"||p.display==="flex"||p.display==="table"||p.display==="grid"||u>=o&&t[Ii]==="none"||a&&t[Ii]==="none"&&u+c>o)?"vertical":"horizontal"},ta=function(i,e,t){var o=t?i.left:i.top,n=t?i.right:i.bottom,a=t?i.width:i.height,p=t?e.left:e.top,l=t?e.right:e.bottom,u=t?e.width:e.height;return o===p||n===l||o+a/2===p+u/2},oa=function(i,e){var t;return oo.some(function(o){var n=o[ee].options.emptyInsertThreshold;if(!(!n||Yo(o))){var a=W(o),p=i>=a.left-n&&i<=a.right+n,l=e>=a.top-n&&e<=a.bottom+n;if(p&&l)return t=o}}),t},Ri=function(i){function e(n,a){return function(p,l,u,c){var d=p.options.group.name&&l.options.group.name&&p.options.group.name===l.options.group.name;if(n==null&&(a||d))return!0;if(n==null||n===!1)return!1;if(a&&n==="clone")return n;if(typeof n=="function")return e(n(p,l,u,c),a)(p,l,u,c);var m=(a?p:l).options.group.name;return n===!0||typeof n=="string"&&n===m||n.join&&n.indexOf(m)>-1}}var t={},o=i.group;(!o||Jt(o)!="object")&&(o={name:o}),t.name=o.name,t.checkPull=e(o.pull,!0),t.checkPut=e(o.put),t.revertClone=o.revertClone,i.group=t},Ui=function(){!Bi&&I&&C(I,"display","none")},qi=function(){!Bi&&I&&C(I,"display","")};ao&&!Di&&document.addEventListener("click",function(s){if(to)return s.preventDefault(),s.stopPropagation&&s.stopPropagation(),s.stopImmediatePropagation&&s.stopImmediatePropagation(),to=!1,!1},!0);var Ue=function(i){if(y){i=i.touches?i.touches[0]:i;var e=oa(i.clientX,i.clientY);if(e){var t={};for(var o in i)i.hasOwnProperty(o)&&(t[o]=i[o]);t.target=t.rootEl=e,t.preventDefault=void 0,t.stopPropagation=void 0,e[ee]._onDragOver(t)}}},ia=function(i){y&&y.parentNode[ee]._isOutsideThisEl(i.target)};function k(s,i){if(!(s&&s.nodeType&&s.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(s));this.el=s,this.options=i=Ee({},i),s[ee]=this;var e={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(s.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Hi(s,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(a,p){a.setData("Text",p.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:k.supportPointer!==!1&&"PointerEvent"in window&&!vt,emptyInsertThreshold:5};xt.initializePlugins(this,s,e);for(var t in e)!(t in i)&&(i[t]=e[t]);Ri(i);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=i.forceFallback?!1:ea,this.nativeDraggable&&(this.options.touchStartThreshold=1),i.supportPointer?L(s,"pointerdown",this._onTapStart):(L(s,"mousedown",this._onTapStart),L(s,"touchstart",this._onTapStart)),this.nativeDraggable&&(L(s,"dragover",this),L(s,"dragenter",this)),oo.push(this.el),i.store&&i.store.get&&this.sort(i.store.get(this)||[]),Ee(this,Jn())}k.prototype={constructor:k,_isOutsideThisEl:function(i){!this.el.contains(i)&&i!==this.el&&(ot=null)},_getDirection:function(i,e){return typeof this.options.direction=="function"?this.options.direction.call(this,i,e,y):this.options.direction},_onTapStart:function(i){if(i.cancelable){var e=this,t=this.el,o=this.options,n=o.preventOnFilter,a=i.type,p=i.touches&&i.touches[0]||i.pointerType&&i.pointerType==="touch"&&i,l=(p||i).target,u=i.target.shadowRoot&&(i.path&&i.path[0]||i.composedPath&&i.composedPath()[0])||l,c=o.filter;if(ua(t),!y&&!(/mousedown|pointerdown/.test(a)&&i.button!==0||o.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&vt&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=de(l,o.draggable,t,!1),!(l&&l.animated)&&Yt!==l)){if(nt=se(l),St=se(l,o.draggable),typeof c=="function"){if(c.call(this,i,l,this)){Z({sortable:e,rootEl:u,name:"filter",targetEl:l,toEl:t,fromEl:t}),Q("filter",e,{evt:i}),n&&i.cancelable&&i.preventDefault();return}}else if(c&&(c=c.split(",").some(function(d){if(d=de(u,d.trim(),t,!1),d)return Z({sortable:e,rootEl:d,name:"filter",targetEl:l,fromEl:t,toEl:t}),Q("filter",e,{evt:i}),!0}),c)){n&&i.cancelable&&i.preventDefault();return}o.handle&&!de(u,o.handle,t,!1)||this._prepareDragStart(i,p,l)}}},_prepareDragStart:function(i,e,t){var o=this,n=o.el,a=o.options,p=n.ownerDocument,l;if(t&&!y&&t.parentNode===n){var u=W(t);if(_=n,y=t,R=y.parentNode,qe=y.nextSibling,Yt=t,jt=a.group,k.dragged=y,Re={target:y,clientX:(e||i).clientX,clientY:(e||i).clientY},ki=Re.clientX-u.left,xi=Re.clientY-u.top,this._lastX=(e||i).clientX,this._lastY=(e||i).clientY,y.style["will-change"]="all",l=function(){if(Q("delayEnded",o,{evt:i}),k.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!Ti&&o.nativeDraggable&&(y.draggable=!0),o._triggerDragStart(i,e),Z({sortable:o,name:"choose",originalEvent:i}),oe(y,a.chosenClass,!0)},a.ignore.split(",").forEach(function(c){Li(y,c.trim(),qo)}),L(p,"dragover",Ue),L(p,"mousemove",Ue),L(p,"touchmove",Ue),L(p,"mouseup",o._onDrop),L(p,"touchend",o._onDrop),L(p,"touchcancel",o._onDrop),Ti&&this.nativeDraggable&&(this.options.touchStartThreshold=4,y.draggable=!0),Q("delayStart",this,{evt:i}),a.delay&&(!a.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(kt||Ce))){if(k.eventCanceled){this._onDrop();return}L(p,"mouseup",o._disableDelayedDrag),L(p,"touchend",o._disableDelayedDrag),L(p,"touchcancel",o._disableDelayedDrag),L(p,"mousemove",o._delayedDragTouchMoveHandler),L(p,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&L(p,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(l,a.delay)}else l()}},_delayedDragTouchMoveHandler:function(i){var e=i.touches?i.touches[0]:i;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){y&&qo(y),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var i=this.el.ownerDocument;F(i,"mouseup",this._disableDelayedDrag),F(i,"touchend",this._disableDelayedDrag),F(i,"touchcancel",this._disableDelayedDrag),F(i,"mousemove",this._delayedDragTouchMoveHandler),F(i,"touchmove",this._delayedDragTouchMoveHandler),F(i,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(i,e){e=e||i.pointerType=="touch"&&i,!this.nativeDraggable||e?this.options.supportPointer?L(document,"pointermove",this._onTouchMove):e?L(document,"touchmove",this._onTouchMove):L(document,"mousemove",this._onTouchMove):(L(y,"dragend",this),L(_,"dragstart",this._onDragStart));try{document.selection?Zt(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(i,e){if(it=!1,_&&y){Q("dragStarted",this,{evt:e}),this.nativeDraggable&&L(document,"dragover",ia);var t=this.options;!i&&oe(y,t.dragClass,!1),oe(y,t.ghostClass,!0),k.active=this,i&&this._appendGhost(),Z({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(pe){this._lastX=pe.clientX,this._lastY=pe.clientY,Ui();for(var i=document.elementFromPoint(pe.clientX,pe.clientY),e=i;i&&i.shadowRoot&&(i=i.shadowRoot.elementFromPoint(pe.clientX,pe.clientY),i!==e);)e=i;if(y.parentNode[ee]._isOutsideThisEl(i),e)do{if(e[ee]){var t=void 0;if(t=e[ee]._onDragOver({clientX:pe.clientX,clientY:pe.clientY,target:i,rootEl:e}),t&&!this.options.dragoverBubble)break}i=e}while(e=Ni(e));qi()}},_onTouchMove:function(i){if(Re){var e=this.options,t=e.fallbackTolerance,o=e.fallbackOffset,n=i.touches?i.touches[0]:i,a=I&&at(I,!0),p=I&&a&&a.a,l=I&&a&&a.d,u=Gt&&Y&&Ci(Y),c=(n.clientX-Re.clientX+o.x)/(p||1)+(u?u[0]-Uo[0]:0)/(p||1),d=(n.clientY-Re.clientY+o.y)/(l||1)+(u?u[1]-Uo[1]:0)/(l||1);if(!k.active&&!it){if(t&&Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))<t)return;this._onDragStart(i,!0)}if(I){a?(a.e+=c-(Ho||0),a.f+=d-(Ro||0)):a={a:1,b:0,c:0,d:1,e:c,f:d};var m="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");C(I,"webkitTransform",m),C(I,"mozTransform",m),C(I,"msTransform",m),C(I,"transform",m),Ho=c,Ro=d,pe=n}i.cancelable&&i.preventDefault()}},_appendGhost:function(){if(!I){var i=this.options.fallbackOnBody?document.body:_,e=W(y,!0,Gt,!0,i),t=this.options;if(Gt){for(Y=i;C(Y,"position")==="static"&&C(Y,"transform")==="none"&&Y!==document;)Y=Y.parentNode;Y!==document.body&&Y!==document.documentElement?(Y===document&&(Y=me()),e.top+=Y.scrollTop,e.left+=Y.scrollLeft):Y=me(),Uo=Ci(Y)}I=y.cloneNode(!0),oe(I,t.ghostClass,!1),oe(I,t.fallbackClass,!0),oe(I,t.dragClass,!0),C(I,"transition",""),C(I,"transform",""),C(I,"box-sizing","border-box"),C(I,"margin",0),C(I,"top",e.top),C(I,"left",e.left),C(I,"width",e.width),C(I,"height",e.height),C(I,"opacity","0.8"),C(I,"position",Gt?"absolute":"fixed"),C(I,"zIndex","100000"),C(I,"pointerEvents","none"),k.ghost=I,i.appendChild(I),C(I,"transform-origin",ki/parseInt(I.style.width)*100+"% "+xi/parseInt(I.style.height)*100+"%")}},_onDragStart:function(i,e){var t=this,o=i.dataTransfer,n=t.options;if(Q("dragStart",this,{evt:i}),k.eventCanceled){this._onDrop();return}Q("setupClone",this),k.eventCanceled||(H=Vi(y),H.removeAttribute("id"),H.draggable=!1,H.style["will-change"]="",this._hideClone(),oe(H,this.options.chosenClass,!1),k.clone=H),t.cloneId=Zt(function(){Q("clone",t),!k.eventCanceled&&(t.options.removeCloneOnHide||_.insertBefore(H,y),t._hideClone(),Z({sortable:t,name:"clone"}))}),!e&&oe(y,n.dragClass,!0),e?(to=!0,t._loopId=setInterval(t._emulateDragOver,50)):(F(document,"mouseup",t._onDrop),F(document,"touchend",t._onDrop),F(document,"touchcancel",t._onDrop),o&&(o.effectAllowed="move",n.setData&&n.setData.call(t,o,y)),L(document,"drop",t),C(y,"transform","translateZ(0)")),it=!0,t._dragStartId=Zt(t._dragStarted.bind(t,e,i)),L(document,"selectstart",t),ft=!0,vt&&C(document.body,"user-select","none")},_onDragOver:function(i){var e=this.el,t=i.target,o,n,a,p=this.options,l=p.group,u=k.active,c=jt===l,d=p.sort,m=J||u,g,h=this,b=!1;if($o)return;function f(Ke,ni){Q(Ke,h,ge({evt:i,isOwner:c,axis:g?"vertical":"horizontal",revert:a,dragRect:o,targetRect:n,canSort:d,fromSortable:m,target:t,completed:x,onMove:function(ai,on){return Kt(_,e,y,o,ai,W(ai),i,on)},changed:M},ni))}function T(){f("dragOverAnimationCapture"),h.captureAnimationState(),h!==m&&m.captureAnimationState()}function x(Ke){return f("dragOverCompleted",{insertion:Ke}),Ke&&(c?u._hideClone():u._showClone(h),h!==m&&(oe(y,J?J.options.ghostClass:u.options.ghostClass,!1),oe(y,p.ghostClass,!0)),J!==h&&h!==k.active?J=h:h===k.active&&J&&(J=null),m===h&&(h._ignoreWhileAnimating=t),h.animateAll(function(){f("dragOverAnimationComplete"),h._ignoreWhileAnimating=null}),h!==m&&(m.animateAll(),m._ignoreWhileAnimating=null)),(t===y&&!y.animated||t===e&&!t.animated)&&(ot=null),!p.dragoverBubble&&!i.rootEl&&t!==document&&(y.parentNode[ee]._isOutsideThisEl(i.target),!Ke&&Ue(i)),!p.dragoverBubble&&i.stopPropagation&&i.stopPropagation(),b=!0}function M(){ie=se(y),Ne=se(y,p.draggable),Z({sortable:h,name:"change",toEl:e,newIndex:ie,newDraggableIndex:Ne,originalEvent:i})}if(i.preventDefault!==void 0&&i.cancelable&&i.preventDefault(),t=de(t,p.draggable,e,!0),f("dragOver"),k.eventCanceled)return b;if(y.contains(i.target)||t.animated&&t.animatingX&&t.animatingY||h._ignoreWhileAnimating===t)return x(!1);if(to=!1,u&&!p.disabled&&(c?d||(a=R!==_):J===this||(this.lastPutMode=jt.checkPull(this,u,y,i))&&l.checkPut(this,u,y,i))){if(g=this._getDirection(i,t)==="vertical",o=W(y),f("dragOverValid"),k.eventCanceled)return b;if(a)return R=_,T(),this._hideClone(),f("revert"),k.eventCanceled||(qe?_.insertBefore(y,qe):_.appendChild(y)),x(!0);var E=Yo(e,p.draggable);if(!E||ra(i,g,this)&&!E.animated){if(E===y)return x(!1);if(E&&e===i.target&&(t=E),t&&(n=W(t)),Kt(_,e,y,o,t,n,i,!!t)!==!1)return T(),E&&E.nextSibling?e.insertBefore(y,E.nextSibling):e.appendChild(y),R=e,M(),x(!0)}else if(E&&sa(i,g,this)){var D=st(e,0,p,!0);if(D===y)return x(!1);if(t=D,n=W(t),Kt(_,e,y,o,t,n,i,!1)!==!1)return T(),e.insertBefore(y,D),R=e,M(),x(!0)}else if(t.parentNode===e){n=W(t);var O=0,P,G=y.parentNode!==e,B=!ta(y.animated&&y.toRect||o,t.animated&&t.toRect||n,g),ue=g?"top":"left",K=Ei(t,"top","top")||Ei(y,"top","top"),ke=K?K.scrollTop:void 0;ot!==t&&(P=n[ue],Ct=!1,$t=!B&&p.invertSwap||G),O=la(i,t,n,g,B?1:p.swapThreshold,p.invertedSwapThreshold==null?p.swapThreshold:p.invertedSwapThreshold,$t,ot===t);var j;if(O!==0){var q=se(y);do q-=O,j=R.children[q];while(j&&(C(j,"display")==="none"||j===I))}if(O===0||j===t)return x(!1);ot=t,Et=O;var be=t.nextElementSibling,le=!1;le=O===1;var xe=Kt(_,e,y,o,t,n,i,le);if(xe!==!1)return(xe===1||xe===-1)&&(le=xe===1),$o=!0,setTimeout(aa,30),T(),le&&!be?e.appendChild(y):t.parentNode.insertBefore(y,le?be:t),K&&Oi(K,0,ke-K.scrollTop),R=y.parentNode,P!==void 0&&!$t&&(Xt=Math.abs(P-W(t)[ue])),M(),x(!0)}if(e.contains(y))return x(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){F(document,"mousemove",this._onTouchMove),F(document,"touchmove",this._onTouchMove),F(document,"pointermove",this._onTouchMove),F(document,"dragover",Ue),F(document,"mousemove",Ue),F(document,"touchmove",Ue)},_offUpEvents:function(){var i=this.el.ownerDocument;F(i,"mouseup",this._onDrop),F(i,"touchend",this._onDrop),F(i,"pointerup",this._onDrop),F(i,"touchcancel",this._onDrop),F(document,"selectstart",this)},_onDrop:function(i){var e=this.el,t=this.options;if(ie=se(y),Ne=se(y,t.draggable),Q("drop",this,{evt:i}),R=y&&y.parentNode,ie=se(y),Ne=se(y,t.draggable),k.eventCanceled){this._nulling();return}it=!1,$t=!1,Ct=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Go(this.cloneId),Go(this._dragStartId),this.nativeDraggable&&(F(document,"drop",this),F(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),vt&&C(document.body,"user-select",""),C(y,"transform",""),i&&(ft&&(i.cancelable&&i.preventDefault(),!t.dropBubble&&i.stopPropagation()),I&&I.parentNode&&I.parentNode.removeChild(I),(_===R||J&&J.lastPutMode!=="clone")&&H&&H.parentNode&&H.parentNode.removeChild(H),y&&(this.nativeDraggable&&F(y,"dragend",this),qo(y),y.style["will-change"]="",ft&&!it&&oe(y,J?J.options.ghostClass:this.options.ghostClass,!1),oe(y,this.options.chosenClass,!1),Z({sortable:this,name:"unchoose",toEl:R,newIndex:null,newDraggableIndex:null,originalEvent:i}),_!==R?(ie>=0&&(Z({rootEl:R,name:"add",toEl:R,fromEl:_,originalEvent:i}),Z({sortable:this,name:"remove",toEl:R,originalEvent:i}),Z({rootEl:R,name:"sort",toEl:R,fromEl:_,originalEvent:i}),Z({sortable:this,name:"sort",toEl:R,originalEvent:i})),J&&J.save()):ie!==nt&&ie>=0&&(Z({sortable:this,name:"update",toEl:R,originalEvent:i}),Z({sortable:this,name:"sort",toEl:R,originalEvent:i})),k.active&&((ie==null||ie===-1)&&(ie=nt,Ne=St),Z({sortable:this,name:"end",toEl:R,originalEvent:i}),this.save()))),this._nulling()},_nulling:function(){Q("nulling",this),_=y=R=I=qe=H=Yt=Le=Re=pe=ft=ie=Ne=nt=St=ot=Et=J=jt=k.dragged=k.ghost=k.clone=k.active=null,io.forEach(function(i){i.checked=!0}),io.length=Ho=Ro=0},handleEvent:function(i){switch(i.type){case"drop":case"dragend":this._onDrop(i);break;case"dragenter":case"dragover":y&&(this._onDragOver(i),na(i));break;case"selectstart":i.preventDefault();break}},toArray:function(){for(var i=[],e,t=this.el.children,o=0,n=t.length,a=this.options;o<n;o++)e=t[o],de(e,a.draggable,this.el,!1)&&i.push(e.getAttribute(a.dataIdAttr)||da(e));return i},sort:function(i,e){var t={},o=this.el;this.toArray().forEach(function(n,a){var p=o.children[a];de(p,this.options.draggable,o,!1)&&(t[n]=p)},this),e&&this.captureAnimationState(),i.forEach(function(n){t[n]&&(o.removeChild(t[n]),o.appendChild(t[n]))}),e&&this.animateAll()},save:function(){var i=this.options.store;i&&i.set&&i.set(this)},closest:function(i,e){return de(i,e||this.options.draggable,this.el,!1)},option:function(i,e){var t=this.options;if(e===void 0)return t[i];var o=xt.modifyOption(this,i,e);typeof o!="undefined"?t[i]=o:t[i]=e,i==="group"&&Ri(t)},destroy:function(){Q("destroy",this);var i=this.el;i[ee]=null,F(i,"mousedown",this._onTapStart),F(i,"touchstart",this._onTapStart),F(i,"pointerdown",this._onTapStart),this.nativeDraggable&&(F(i,"dragover",this),F(i,"dragenter",this)),Array.prototype.forEach.call(i.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),oo.splice(oo.indexOf(this.el),1),this.el=i=null},_hideClone:function(){if(!Le){if(Q("hideClone",this),k.eventCanceled)return;C(H,"display","none"),this.options.removeCloneOnHide&&H.parentNode&&H.parentNode.removeChild(H),Le=!0}},_showClone:function(i){if(i.lastPutMode!=="clone"){this._hideClone();return}if(Le){if(Q("showClone",this),k.eventCanceled)return;y.parentNode==_&&!this.options.group.revertClone?_.insertBefore(H,y):qe?_.insertBefore(H,qe):_.appendChild(H),this.options.group.revertClone&&this.animate(y,H),C(H,"display",""),Le=!1}}};function na(s){s.dataTransfer&&(s.dataTransfer.dropEffect="move"),s.cancelable&&s.preventDefault()}function Kt(s,i,e,t,o,n,a,p){var l,u=s[ee],c=u.options.onMove,d;return window.CustomEvent&&!Ce&&!kt?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=i,l.from=s,l.dragged=e,l.draggedRect=t,l.related=o||i,l.relatedRect=n||W(i),l.willInsertAfter=p,l.originalEvent=a,s.dispatchEvent(l),c&&(d=c.call(u,l,a)),d}function qo(s){s.draggable=!1}function aa(){$o=!1}function sa(s,i,e){var t=W(st(e.el,0,e.options,!0)),o=_i(e.el,e.options,I),n=10;return i?s.clientX<o.left-n||s.clientY<t.top&&s.clientX<t.right:s.clientY<o.top-n||s.clientY<t.bottom&&s.clientX<t.left}function ra(s,i,e){var t=W(Yo(e.el,e.options.draggable)),o=_i(e.el,e.options,I),n=10;return i?s.clientX>o.right+n||s.clientY>t.bottom&&s.clientX>t.left:s.clientY>o.bottom+n||s.clientX>t.right&&s.clientY>t.top}function la(s,i,e,t,o,n,a,p){var l=t?s.clientY:s.clientX,u=t?e.height:e.width,c=t?e.top:e.left,d=t?e.bottom:e.right,m=!1;if(!a){if(p&&Xt<u*o){if(!Ct&&(Et===1?l>c+u*n/2:l<d-u*n/2)&&(Ct=!0),Ct)m=!0;else if(Et===1?l<c+Xt:l>d-Xt)return-Et}else if(l>c+u*(1-o)/2&&l<d-u*(1-o)/2)return pa(i)}return m=m||a,m&&(l<c+u*n/2||l>d-u*n/2)?l>c+u/2?1:-1:0}function pa(s){return se(y)<se(s)?1:-1}function da(s){for(var i=s.tagName+s.className+s.src+s.href+s.textContent,e=i.length,t=0;e--;)t+=i.charCodeAt(e);return t.toString(36)}function ua(s){io.length=0;for(var i=s.getElementsByTagName("input"),e=i.length;e--;){var t=i[e];t.checked&&io.push(t)}}function Zt(s){return setTimeout(s,0)}function Go(s){return clearTimeout(s)}ao&&L(document,"touchmove",function(s){(k.active||it)&&s.cancelable&&s.preventDefault()});k.utils={on:L,off:F,css:C,find:Li,is:function(i,e){return!!de(i,e,i,!1)},extend:Gn,throttle:Pi,closest:de,toggleClass:oe,clone:Vi,index:se,nextTick:Zt,cancelNextTick:Go,detectDirection:Hi,getChild:st,expando:ee};k.get=function(s){return s[ee]};k.mount=function(){for(var s=arguments.length,i=new Array(s),e=0;e<s;e++)i[e]=arguments[e];i[0].constructor===Array&&(i=i[0]),i.forEach(function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(k.utils=ge(ge({},k.utils),t.utils)),xt.mount(t)})};k.create=function(s,i){return new k(s,i)};k.version=jn;var z=[],wt,Ko,Jo=!1,zo,Wo,no,yt;function ca(){function s(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this))}return s.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?L(document,"dragover",this._handleAutoScroll):this.options.supportPointer?L(document,"pointermove",this._handleFallbackAutoScroll):t.touches?L(document,"touchmove",this._handleFallbackAutoScroll):L(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;!this.options.dragOverBubble&&!t.rootEl&&this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?F(document,"dragover",this._handleAutoScroll):(F(document,"pointermove",this._handleFallbackAutoScroll),F(document,"touchmove",this._handleFallbackAutoScroll),F(document,"mousemove",this._handleFallbackAutoScroll)),Ai(),Qt(),Kn()},nulling:function(){no=Ko=wt=Jo=yt=zo=Wo=null,z.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var o=this,n=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,p=document.elementFromPoint(n,a);if(no=e,t||this.options.forceAutoScrollFallback||kt||Ce||vt){jo(e,this.options,p,t);var l=Pe(p,!0);Jo&&(!yt||n!==zo||a!==Wo)&&(yt&&Ai(),yt=setInterval(function(){var u=Pe(document.elementFromPoint(n,a),!0);u!==l&&(l=u,Qt()),jo(e,o.options,u,t)},10),zo=n,Wo=a)}else{if(!this.options.bubbleScroll||Pe(p,!0)===me()){Qt();return}jo(e,this.options,Pe(p,!1),!1)}}},Ee(s,{pluginName:"scroll",initializeByDefault:!0})}function Qt(){z.forEach(function(s){clearInterval(s.pid)}),z=[]}function Ai(){clearInterval(yt)}var jo=Pi(function(s,i,e,t){if(i.scroll){var o=(s.touches?s.touches[0]:s).clientX,n=(s.touches?s.touches[0]:s).clientY,a=i.scrollSensitivity,p=i.scrollSpeed,l=me(),u=!1,c;Ko!==e&&(Ko=e,Qt(),wt=i.scroll,c=i.scrollFn,wt===!0&&(wt=Pe(e,!0)));var d=0,m=wt;do{var g=m,h=W(g),b=h.top,f=h.bottom,T=h.left,x=h.right,M=h.width,E=h.height,D=void 0,O=void 0,P=g.scrollWidth,G=g.scrollHeight,B=C(g),ue=g.scrollLeft,K=g.scrollTop;g===l?(D=M<P&&(B.overflowX==="auto"||B.overflowX==="scroll"||B.overflowX==="visible"),O=E<G&&(B.overflowY==="auto"||B.overflowY==="scroll"||B.overflowY==="visible")):(D=M<P&&(B.overflowX==="auto"||B.overflowX==="scroll"),O=E<G&&(B.overflowY==="auto"||B.overflowY==="scroll"));var ke=D&&(Math.abs(x-o)<=a&&ue+M<P)-(Math.abs(T-o)<=a&&!!ue),j=O&&(Math.abs(f-n)<=a&&K+E<G)-(Math.abs(b-n)<=a&&!!K);if(!z[d])for(var q=0;q<=d;q++)z[q]||(z[q]={});(z[d].vx!=ke||z[d].vy!=j||z[d].el!==g)&&(z[d].el=g,z[d].vx=ke,z[d].vy=j,clearInterval(z[d].pid),(ke!=0||j!=0)&&(u=!0,z[d].pid=setInterval(function(){t&&this.layer===0&&k.active._onTouchMove(no);var be=z[this.layer].vy?z[this.layer].vy*p:0,le=z[this.layer].vx?z[this.layer].vx*p:0;typeof c=="function"&&c.call(k.dragged.parentNode[ee],le,be,s,no,z[this.layer].el)!=="continue"||Oi(z[this.layer].el,le,be)}.bind({layer:d}),24))),d++}while(i.bubbleScroll&&m!==l&&(m=Pe(m,!1)));Jo=u}},30),zi=function(i){var e=i.originalEvent,t=i.putSortable,o=i.dragEl,n=i.activeSortable,a=i.dispatchSortableEvent,p=i.hideGhostForTarget,l=i.unhideGhostForTarget;if(e){var u=t||n;p();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,d=document.elementFromPoint(c.clientX,c.clientY);l(),u&&!u.el.contains(d)&&(a("spill"),this.onSpill({dragEl:o,putSortable:t}))}};function Xo(){}Xo.prototype={startIndex:null,dragStart:function(i){var e=i.oldDraggableIndex;this.startIndex=e},onSpill:function(i){var e=i.dragEl,t=i.putSortable;this.sortable.captureAnimationState(),t&&t.captureAnimationState();var o=st(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(e,o):this.sortable.el.appendChild(e),this.sortable.animateAll(),t&&t.animateAll()},drop:zi};Ee(Xo,{pluginName:"revertOnSpill"});function Zo(){}Zo.prototype={onSpill:function(i){var e=i.dragEl,t=i.putSortable,o=t||this.sortable;o.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),o.animateAll()},drop:zi};Ee(Zo,{pluginName:"removeOnSpill"});k.mount(new ca);k.mount(Zo,Xo);var so=k;var ze=require("obsidian"),ma=s=>`:Li${s.replace(/^lucide-/,"").split("-").map(i=>i.charAt(0).toUpperCase()+i.slice(1).toLowerCase()).join("")}:`;async function rt(s,i,e){w("exportToCallout()");let t=i.defaultStyles.length?i.defaultStyles.join("-"):"",o=i.mobileStyles.length?i.mobileStyles.join("-"):"",n=[t,o].filter(Boolean).join("-"),a=`> [!note-toolbar${n?"|"+n:""}] ${i.name}`,p=s.app.workspace.getActiveFile();return a+=await Gi(s,i,p,e)+`
`,a}async function Gi(s,i,e,t,o=0){if(o>=2)return"";let n="",a=`
> -`;for(let[p,l]of i.items.entries()){let u=t.includeIcons&&l.icon?ma(l.icon):"";u=u&&l.label?u+" ":u;let c=t.replaceVars?await s.replaceVars(l.label,e):l.label,d=t.replaceVars?await s.replaceVars(l.link,e):l.link,m=t.replaceVars?await s.replaceVars(l.tooltip,e):l.tooltip;switch(c=ji(c),d=ha(d),m=ji(m),c=u?c:c||m||r("export.item-generic",{number:p+1}),l.linkAttr.type){case"break":n+=`${a} <br/>`;break;case"command":n+=t.useDataEls?`${a} [${u}${c}]()<data data-ntb-command="${l.linkAttr.commandId}"/>`:`${a} [${u}${c}](<obsidian://note-toolbar?commandid=${l.linkAttr.commandId}>)`;break;case"dataview":case"js-engine":case"templater-obsidian":if(l.scriptConfig){let T=Object.entries(l.scriptConfig).filter(([x,M])=>M!=null).map(([x,M])=>{if(x==="pluginFunction")return`data-${l.linkAttr.type}="${String(M)}"`;{let E=ga(String(M));return E?`${X[x]}="${E}"`:""}}).join(" ");n+=`${a} [${u}${c}]()<data ${T}/>`}break;case"file":let g=d;s.replaceVars(d,e).then(T=>{g=T}),s.app.vault.getAbstractFileByPath(g)instanceof ze.TFolder?n+=t.useDataEls?`${a} [${u}${c}]()<data data-ntb-folder="${d}"/>`:`${a} [${u}${c}](<obsidian://note-toolbar?folder=${d}>)`:n+=`${a} [[${d}|${u}${c}]]`;break;case"group":let b=s.settingsManager.getToolbar(l.link);n+=b?await Gi(s,b,e,t,o+1):"";break;case"menu":let f=d;if(!t.useIds){let T=s.settingsManager.getToolbar(l.link);f=T?T.name:f}n+=t.useDataEls?`${a} [${u}${c}]()<data data-ntb-menu="${f}"/>`:`${a} [${u}${c}](<obsidian://note-toolbar?menu=${f}>)`;break;case"separator":n+=`${a} <hr/>`;break;case"uri":n+=d?`${a} [${u}${c}](${d.startsWith("<")?d:`<${d}>`})`:"";break}n+=m&&c!==m?` <!-- ${m} -->`:""}return n}function ga(s){return s.replace(/\"/g,"&quot;").replace(/\>/g,"&gt;").replace(/\</g,"&lt;").replace(/\s+/g," ")}function ha(s){return s.replace(/\[/g,"\\[").replace(/\]/g,"\\]").replace(/\)/g,"\\)").replace(/\(/g,"\\(")}function Wi(s){return s.replace(/\\\[/g,"[").replace(/\\\]/g,"[").replace(/\\\)/g,")").replace(/\\\(/g,"(").replace(/^<(?!%)/g,"").replace(/(?<!%)>$/g,"")}function ji(s){return s.replace(/\[/g,"\\[").replace(/\]/g,"\\]")}function $i(s){return s.replace(/\\\[/g,"[").replace(/\\\]/g,"]")}async function Oe(s,i,e,t=!1){let o=i.trim().split(`
`),n=!!e;var a="";let p=s.app.workspace.getActiveFile();if(e||(e={uuid:te(),customClasses:"",defaultStyles:["border","even","sticky"],items:[],mobileStyles:[],name:"",position:{desktop:{allViews:{position:"props"}},mobile:{allViews:{position:"props"}},tablet:{allViews:{position:"props"}}},updated:new Date().toISOString()}),o[0].includes("[!note-toolbar")){if(!n){let l=o[0].match(/\[!note-toolbar\|?\s*([^\]]*)\](.*)/);if(l){let u=l[1].split(/[^a-zA-Z0-9]+/),c=l[2].trim(),d=ct.map(f=>Object.keys(f)[0]),m=mt.map(f=>Object.keys(f)[0]),g=u.filter(f=>d.includes(f)),h=u.filter(f=>m.includes(f)),b=u.filter(f=>f&&!d.includes(f)&&!m.includes(f));w("\u2022 name?",c),w("\u2022 styles?",g,h),b.length>0&&(w("  \u2022 invalid:",b),a+=`${r("import.errorlog-invalid-styles",{styles:b})}
`),e.name=s.settingsManager.getUniqueToolbarName(c||r("setting.toolbars.imported-tbar-name"),!1),e.defaultStyles=g,e.mobileStyles=h}}o.shift()}return o.map((l,u)=>{var T,x,M,E,D,O;w(u+1);var c=void 0;let d="",m="",g="",h="",b="",f;if(/<br\s*\/?>/.test(l))c="break";else if(/<hr\s*\/?>/.test(l))c="separator";else{let P=l.match(/<data data-(ntb-)?(command|dataview|folder|js-engine|menu|templater-obsidian)="(.*?)"(.*?)(\/?>|$)/),G=l.match(/obsidian:\/\/note-toolbar\?(command|folder|menu)=(.*?)>?\)/),B=l.match(/<!--\s*(.*?)\s*-->/),ue=P?l.replace(P[0],"").trim():l;ue=B?ue.replace(B[0],"").trim():ue;let K=ue.match(/\[(.*?)\]\((.*?)\)$|\[\[(.*?)(?:\|(.*?))?\]\]/);if(K){if(K[1])c="uri",m=$i(K[1]),g=Wi(K[2]);else if(K[3]&&(c="file",m=$i(K[4]||K[3]),g=Wi(K[3]),p)){let j=s.app.metadataCache.getFirstLinkpathDest(g,p==null?void 0:p.path);g=j?j.path:g}let ke=m==null?void 0:m.match(/(:Li\w+:)/);if(ke){let j=m==null?void 0:m.match(/:Li(\w+):/);if(j){let q=j[1].replace(/([a-z])([A-Z0-9])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").toLowerCase();d=(0,ze.getIcon)("lucide-"+q)?"lucide-"+q:(0,ze.getIcon)(q)?q:"",a+=d?"":`${r("import.errorlog-item",{number:u+1})} ${r("import.errorlog-icon-not-found",{icon:q})}
`}m=m==null?void 0:m.replace(ke[1],"").trim()}if(h=B?B[1]:"",P||G){let j=P?P[2]:G?G[1]:"",q=P?P[3]:G?G[2]:"";switch(w("\u2022 data?",j,g),j){case"command":c="command",b=q;let be=Bt(s,b);g=be||b,a+=be?"":`${r("import.errorlog-item",{number:u+1})} ${r("import.errorlog-command-not-recognized",{command:b})}
`;break;case"dataview":case"js-engine":case"templater-obsidian":c=j;let le=l.match(/<data\s[^>]*\/?>/);if(le){let $=new DOMParser().parseFromString(le[0],"text/html").body.firstElementChild;f={pluginFunction:q,expression:(T=$==null?void 0:$.getAttribute(X.expression))!=null?T:void 0,sourceFile:(x=$==null?void 0:$.getAttribute(X.sourceFile))!=null?x:void 0,sourceFunction:(M=$==null?void 0:$.getAttribute(X.sourceFunction))!=null?M:void 0,sourceArgs:(E=$==null?void 0:$.getAttribute(X.sourceArgs))!=null?E:void 0,outputContainer:(D=$==null?void 0:$.getAttribute(X.outputContainer))!=null?D:void 0,outputFile:(O=$==null?void 0:$.getAttribute(X.outputFile))!=null?O:void 0}}break;case"folder":c="file",g=q;break;case"menu":c="menu";let xe=s.settingsManager.getToolbar(q);g=xe?xe.uuid:q,a+=xe?"":`${r("import.errorlog-item",{number:u+1})} ${r("import.errorlog-menu-not-found",{menu:q})}
`;break}}}}if(w("\u2022 icon?",d),w("\u2022 label?",m),w("\u2022 tooltip?",h),w("\u2022 link?",g),w("\u2022 commandId?",b),w("\u2022 scriptConfig?",f),w(`=> ${c==null?void 0:c.toUpperCase()}`),a+=c?"":`${r("import.errorlog-item",{number:u+1})} ${r("import.errorlog-invalid-format",{line:l})}
`,c){let P={uuid:te(),label:m.trim(),icon:d.trim(),link:g.trim(),linkAttr:{commandId:c==="command"?b.trim():"",hasVars:!1,type:c},scriptConfig:f,tooltip:h,visibility:Ot};e==null||e.items.push(P)}}),!t&&a&&(a=`${r("import.errorlog-heading")}
${a}`,new ze.Notice(a,1e4)),e}var It=require("obsidian");async function ro(s,i){return new Promise((e,t)=>{let o=new Qo(s,i);o.onClose=()=>{e(o.isConfirmed)},o.open()})}var Qo=class extends It.Modal{constructor(e,t){super(e);this.isConfirmed=!1;this.modalEl.addClass("note-toolbar-setting-mini-dialog","note-toolbar-setting-dialog-phonefix"),this.uiSettings=t}onOpen(){this.display()}async display(){new Promise(e=>{this.setTitle(this.uiSettings.title),this.uiSettings.questionLabel?this.modalEl.createEl("p",{text:this.uiSettings.questionLabel}):this.uiSettings.questionFragment&&this.modalEl.createEl("p").append(this.uiSettings.questionFragment);let t=this.modalEl.createDiv();t.addClass("note-toolbar-setting-confirm-dialog-buttons");let o=new It.ButtonComponent(t).setButtonText(this.uiSettings.approveLabel).onClick(()=>{this.isConfirmed=!0,this.close()});this.uiSettings.warning?o.setWarning():o.setCta();let n=new It.ButtonComponent(t).setButtonText(this.uiSettings.denyLabel).onClick(()=>{this.close()})})}};var We=require("obsidian");var lt=class extends We.Modal{constructor(e,t,o){super(e.app);this.useObsidianUri=!1;this.plugin=e,this.shareUri=t,this.toolbar=o,this.modalEl.addClass("note-toolbar-share-dialog","note-toolbar-setting-dialog-phonefix")}onOpen(){this.setTitle(r("export.title-share",{toolbar:this.toolbar.name})),this.display()}display(){this.contentEl.empty(),this.contentEl.createEl("p",{text:N(r("export.label-share-description"),"Sharing-toolbars")});let e=new We.Setting(this.contentEl).setName(this.shareUri).addButton(n=>{n.setButtonText(r("export.button-copy-link")).setTooltip(r("export.button-copy-link-description")).setCta().onClick(()=>{navigator.clipboard.writeText(this.shareUri),new We.Notice(r("export.notice-shared")),this.close()})});new We.Setting(this.contentEl).setName(r("export.option-uri")).setDesc(r("export.option-uri-description")).addToggle(n=>{n.setValue(this.useObsidianUri).onChange(async a=>{this.useObsidianUri=a,this.shareUri=await this.plugin.protocolManager.getShareUri(this.toolbar,this.useObsidianUri),this.display()})});let t=this.shareUri.length>2048,o=wi(this.toolbar);if(t||o){let n=this.contentEl.createDiv();n.addClass("note-toolbar-setting-field-help");let a=n.createEl("ul");t&&a.createEl("li",{text:r("export.warning-share-length")}),o&&a.createEl("li",{text:r("export.warning-share-menu")})}}};var je=require("obsidian");async function lo(s,i){return new Promise((e,t)=>{let o=new ei(s,i);o.onClose=()=>{e(o.importedToolbar)},o.open()})}var ei=class extends je.Modal{constructor(e,t){super(e.app);this.callout="";this.modalEl.addClass("note-toolbar-setting-dialog-phonefix"),this.plugin=e,this.toolbar=t}onOpen(){new Promise(e=>{if(this.setTitle(this.toolbar?r("import.title-import-into",{toolbar:this.toolbar.name}):r("import.title-import")),this.modalEl.createEl("p",{text:this.toolbar?N(r("import.label-import-into"),"Creating-toolbars-from-callouts"):N(r("import.label-import"),"Creating-toolbars-from-callouts")}),new je.Setting(this.modalEl).addTextArea(o=>{o.setPlaceholder(r("import.placeholder-import-into")).onChange(n=>{this.callout=n})}).setClass("note-toolbar-setting-import-text-area"),this.toolbar){let o=this.modalEl.createDiv();o.addClass("note-toolbar-setting-field-help"),o.setText(r("import.label-import-into-help"))}this.modalEl.createDiv().addClass("note-toolbar-setting-spacer");let t=this.modalEl.createDiv();t.addClass("note-toolbar-setting-confirm-dialog-buttons"),new je.ButtonComponent(t).setButtonText(this.toolbar?r("import.button-add-items"):r("import.button-create")).setCta().onClick(async()=>{this.importedToolbar=await Oe(this.plugin,this.callout,this.toolbar),this.close()}),new je.ButtonComponent(t).setButtonText(r("import.button-cancel")).onClick(()=>{this.close()}),setTimeout(()=>{let o=this.containerEl.querySelector("textarea");o==null||o.focus()},50)})}};var po=class extends A.PluginSettingTab{constructor(e,t){super(e,t);this.itemListIdCounter=0;this.calloutSettingsOpen=!1;this.itemListOpen=!0;this.mappingListOpen=!0;this.app=e,this.plugin=t}display(e,t=!1){let{containerEl:o}=this;if(o.empty(),this.plugin.settings.version!==Me&&new A.Setting(o).setName(r("setting.error-old-settings-name")).setDesc(r("setting.error-old-settings-description",{oldVersion:this.plugin.settings.version+"",currentVersion:Me+""})).setClass("note-toolbar-setting-plugin-error").setHeading(),Rt(this.plugin,o,void 0,()=>{this.plugin.app.setting.close()}),this.displayToolbarList(o),new A.Setting(o).setName(r("setting.display-rules.name")).setDesc(N(r("setting.display-rules.description"),"Defining-where-to-show-toolbars")).setHeading(),this.displayPropertySetting(o),this.displayFolderMap(o),this.displayCopyAsCalloutSettings(o),this.displayOtherSettings(o),e){let n=this.containerEl.querySelector(e);n==null||n.focus(),t&&setTimeout(()=>{n==null||n.scrollIntoView(!0)},A.Platform.isMobile?100:0)}this.rememberLastPosition(this.containerEl),qt(this.plugin)}displayToolbarList(e){let t=createDiv();t.addClass("note-toolbar-setting-items-container"),t.setAttribute("data-active",this.itemListOpen.toString());let o=new A.Setting(t).setName(r("setting.toolbars.name")).setDesc(r("setting.toolbars.description")).setHeading();o.addExtraButton(a=>{a.setIcon("import").setTooltip(r("import.button-import-tooltip")).onClick(async()=>{lo(this.plugin).then(async p=>{p&&(await this.plugin.settingsManager.addToolbar(p),await this.plugin.settingsManager.save(),await this.plugin.commands.openToolbarSettingsForId(p.uuid),this.display())})}).extraSettingsEl.tabIndex=0,this.plugin.registerDomEvent(a.extraSettingsEl,"keydown",p=>{switch(p.key){case"Enter":case" ":p.preventDefault(),a.extraSettingsEl.click()}})}),this.plugin.settings.toolbars.length>4&&o.addExtraButton(a=>{a.setIcon("right-triangle").setTooltip(r("setting.button-collapse-tooltip")).onClick(async()=>{let p=e.querySelector(".note-toolbar-setting-items-container");if(p){this.itemListOpen=!this.itemListOpen,p.setAttribute("data-active",this.itemListOpen.toString());let l=p.querySelector(".setting-item-info .setting-item-name");this.itemListOpen?l==null||l.setText(r("setting.toolbars.name")):l==null||l.setText(r("setting.toolbars.name-with-count",{count:this.plugin.settings.toolbars.length})),a.setTooltip(this.itemListOpen?r("setting.button-collapse-tooltip"):r("setting.button-expand-tooltip"))}}).extraSettingsEl.tabIndex=0,a.extraSettingsEl.addClass("note-toolbar-setting-item-expand"),this.plugin.registerDomEvent(a.extraSettingsEl,"keydown",p=>{switch(p.key){case"Enter":case" ":p.preventDefault(),a.extraSettingsEl.click()}})});let n=createDiv();if(n.addClass("note-toolbar-setting-items-list-container"),this.plugin.settings.toolbars.length==0)n.createEl("div",{text:Te(r("setting.toolbars.label-empty-create-tbar"))}).className="note-toolbar-setting-empty-message";else{let a=createDiv();a.addClass("note-toolbar-setting-toolbar-list"),this.plugin.settings.toolbars.forEach(p=>{let l=new A.Setting(a).setName(p.name?p.name:r("setting.toolbars.label-tbar-name-not-set")).setDesc(ve(this.plugin,p,this.plugin.settingsManager)).addButton(u=>{u.setIcon("more-horizontal").setTooltip(r("setting.toolbars.button-more-tooltip")).onClick(()=>{let c=new A.Menu;c.addItem(d=>{d.setTitle(r("setting.toolbars.button-duplicate-tbar-tooltip")).setIcon("copy-plus").onClick(async()=>{this.plugin.settingsManager.duplicateToolbar(p).then(m=>{this.display(`.note-toolbar-setting-toolbar-list > div[data-tbar-uuid="${m}"] > .setting-item-control > .mod-cta`)})})}),c.addSeparator(),c.addItem(d=>{d.setTitle(r("export.label-share")).setIcon("share").onClick(async()=>{let m=await this.plugin.protocolManager.getShareUri(p);new lt(this.plugin,m,p).open()})}),c.addItem(d=>{d.setTitle(r("export.label-callout")).setIcon("copy").onClick(async()=>{let m=await rt(this.plugin,p,this.plugin.settings.export);navigator.clipboard.writeText(m),new A.Notice(N(r("export.notice-completed"),"Creating-callouts-from-toolbars"))})}),c.addSeparator(),c.addItem(d=>{d.setTitle(r("setting.delete-toolbar.button-delete")).setIcon("minus-circle").onClick(async()=>{ro(this.plugin.app,{title:r("setting.delete-toolbar.title",{toolbar:p.name}),questionLabel:r("setting.delete-toolbar.label-delete-confirm"),approveLabel:r("setting.delete-toolbar.button-delete-confirm"),denyLabel:r("setting.button-cancel"),warning:!0}).then(m=>{m&&(this.plugin.settingsManager.deleteToolbar(p.uuid),this.plugin.settingsManager.save(),this.display())})}).setWarning(!0)}),c.showAtPosition(bt(u.buttonEl))})}).addButton(u=>{u.setTooltip(r("setting.toolbars.button-edit-tbar-tooltip")).setButtonText(r("setting.toolbars.button-edit-tbar")).onClick(()=>{this.plugin.settingsManager.openToolbarSettings(p,this)})});l.settingEl.setAttribute("data-tbar-uuid",p.uuid),p.name||l.nameEl.addClass("mod-warning"),this.plugin.registerDomEvent(l.settingEl,"keydown",u=>{switch(u.key){case"d":(A.Platform.isWin||A.Platform.isLinux?u==null?void 0:u.ctrlKey:u==null?void 0:u.metaKey)&&this.plugin.settingsManager.duplicateToolbar(p).then(d=>{this.display(`.note-toolbar-setting-toolbar-list > div[data-tbar-uuid="${d}"] > .setting-item-control > .mod-cta`)})}})}),n.appendChild(a)}new A.Setting(n).setClass("note-toolbar-setting-button").addButton(a=>{a.setTooltip(r("setting.toolbars.button-new-tbar-tooltip")).setButtonText(r("setting.toolbars.button-new-tbar")).setCta().onClick(async()=>{let p=await this.plugin.settingsManager.newToolbar();this.plugin.settingsManager.openToolbarSettings(p,this)})}),t.appendChild(n),e.append(t)}displayPropertySetting(e){new A.Setting(e).setName(r("setting.display-rules.option-property")).setDesc(r("setting.display-rules.option-property-description")).addText(t=>t.setPlaceholder(r("setting.display-rules.option-property-placeholder")).setValue(this.plugin.settings.toolbarProp).onChange((0,A.debounce)(async o=>{this.plugin.settings.toolbarProp=o,await this.plugin.settingsManager.save()},750)))}displayFolderMap(e){let t=createDiv();t.addClass("note-toolbar-setting-mappings-container"),t.setAttribute("data-active",this.mappingListOpen.toString());let o=new A.Setting(t).setName(r("setting.mappings.name")).setDesc(r("setting.mappings.description")).setClass("note-toolbar-setting-no-border");this.plugin.settings.folderMappings.length>4&&o.addExtraButton(a=>{a.setIcon("right-triangle").setTooltip(r("setting.button-collapse-tooltip")).onClick(async()=>{let p=e.querySelector(".note-toolbar-setting-mappings-container");if(p){this.mappingListOpen=!this.mappingListOpen,p.setAttribute("data-active",this.mappingListOpen.toString());let l=p.querySelector(".setting-item-info .setting-item-name");this.mappingListOpen?l==null||l.setText(r("setting.mappings.name")):l==null||l.setText(r("setting.mappings.name-with-count",{count:this.plugin.settings.folderMappings.length})),a.setTooltip(this.mappingListOpen?r("setting.button-collapse-tooltip"):r("setting.button-expand-tooltip"))}}).extraSettingsEl.tabIndex=0,a.extraSettingsEl.addClass("note-toolbar-setting-item-expand"),this.plugin.registerDomEvent(a.extraSettingsEl,"keydown",p=>{switch(p.key){case"Enter":case" ":p.preventDefault(),a.extraSettingsEl.click()}})});let n=createDiv();if(n.addClass("note-toolbar-setting-items-list-container"),this.plugin.settings.folderMappings.length==0)t.createEl("div",{text:Te(r("setting.mappings.label-empty"))}).className="note-toolbar-setting-empty-message";else{let a=createDiv();a.addClass("note-toolbar-sortablejs-list"),this.plugin.settings.folderMappings.forEach((l,u)=>{let c=this.itemListIdCounter.toString(),d=this.generateMappingForm(l,c);a.append(d),this.itemListIdCounter++});let p=so.create(a,{chosenClass:"sortable-chosen",ghostClass:"sortable-ghost",handle:".sortable-handle",onChange:l=>navigator.vibrate(50),onChoose:l=>navigator.vibrate(50),onSort:async l=>{w("sortable: index: ",l.oldIndex," -> ",l.newIndex),l.oldIndex!==void 0&&l.newIndex!==void 0&&(Ht(this.plugin.settings.folderMappings,l.oldIndex,l.newIndex),await this.plugin.settingsManager.save())}});n.appendChild(a)}new A.Setting(n).setClass("note-toolbar-setting-button").addButton(a=>{a.setButtonText(r("setting.mappings.button-new")).setTooltip(r("setting.mappings.button-new-tooltip")).setCta().onClick(async()=>{let p={folder:"",toolbar:""};this.plugin.settings.folderMappings.push(p),await this.plugin.settingsManager.save(),this.display('.note-toolbar-sortablejs-list > div:last-child input[type="search"]',!0)})}),t.appendChild(n),e.append(t)}generateMappingForm(e,t){let o=createDiv();o.className="note-toolbar-setting-folder-list-item-container",o.setAttribute("data-row-id",t);let n=createDiv();n.id="note-toolbar-setting-item-field-"+this.itemListIdCounter,n.className="note-toolbar-setting-item-fields",new A.Setting(o).setClass("note-toolbar-setting-item-delete").addButton(p=>{p.setIcon("minus-circle").setTooltip(r("setting.button-delete-tooltip")).onClick(async()=>{let l=p.buttonEl.getAttribute("data-row-id");l&&this.listMoveHandlerById(null,l,"delete")}),p.buttonEl.setAttribute("data-row-id",t)}),new A.Setting(n).setClass("note-toolbar-setting-mapping-field").addSearch(p=>{new zt(this.app,p.inputEl),p.setPlaceholder(r("setting.mappings.placeholder-folder")).setValue(e.folder).onChange((0,A.debounce)(async l=>{var u;if(l&&this.plugin.settings.folderMappings.some((c,d)=>e!=c?c.folder.toLowerCase()===l.toLowerCase():void 0)){if(document.getElementById("note-toolbar-name-error")===null){let c=createEl("div",{text:r("setting.mappings.error-folder-already-mapped"),attr:{id:"note-toolbar-name-error"},cls:"note-toolbar-setting-error-message"});o.insertAdjacentElement("afterend",c),o.children[0].addClass("note-toolbar-setting-error")}}else(u=document.getElementById("note-toolbar-name-error"))==null||u.remove(),o.children[0].removeClass("note-toolbar-setting-error"),e.folder=l?(0,A.normalizePath)(l):"",await this.plugin.settingsManager.save()},250))}),new A.Setting(n).setClass("note-toolbar-setting-mapping-field").addSearch(p=>{new He(this.app,this.plugin,p.inputEl),p.setPlaceholder(r("setting.mappings.placeholder-toolbar")).setValue(this.plugin.settingsManager.getToolbarName(e.toolbar)).onChange((0,A.debounce)(async l=>{let u=this.plugin.settingsManager.getToolbarByName(l);u&&(e.toolbar=u.uuid,await this.plugin.settingsManager.save())},250))});let a=createDiv();return a.addClass("note-toolbar-setting-item-controls"),new A.Setting(a).addExtraButton(p=>{p.setIcon("grip-horizontal").setTooltip(r("setting.button-drag-tooltip")).extraSettingsEl.addClass("sortable-handle"),p.extraSettingsEl.setAttribute("data-row-id",this.itemListIdCounter.toString()),p.extraSettingsEl.tabIndex=0,this.plugin.registerDomEvent(p.extraSettingsEl,"keydown",l=>{let c=l.target.getAttribute("data-row-id");w("rowId",c),c&&this.listMoveHandlerById(l,c)})}),o.append(n),o.append(a),o}displayCopyAsCalloutSettings(e){let t=createDiv();t.addClass("note-toolbar-setting-callout-container"),t.setAttribute("data-active",this.calloutSettingsOpen.toString()),new A.Setting(t).setName(r("setting.copy-as-callout.title")).setDesc(N(r("setting.copy-as-callout.description"),"Creating-callouts-from-toolbars")).setHeading().addExtraButton(a=>{a.setIcon("right-triangle").setTooltip(r("setting.button-collapse-tooltip")).onClick(async()=>{let p=e.querySelector(".note-toolbar-setting-callout-container");p&&(this.calloutSettingsOpen=!this.calloutSettingsOpen,p.setAttribute("data-active",this.calloutSettingsOpen.toString()),a.setTooltip(this.calloutSettingsOpen?r("setting.button-collapse-tooltip"):r("setting.button-expand-tooltip")))}).extraSettingsEl.tabIndex=0,a.extraSettingsEl.addClass("note-toolbar-setting-item-expand"),this.plugin.registerDomEvent(a.extraSettingsEl,"keydown",p=>{switch(p.key){case"Enter":case" ":p.preventDefault(),a.extraSettingsEl.click()}})});let n=createDiv();n.addClass("note-toolbar-setting-items-list-container"),new A.Setting(n).setName(r("setting.copy-as-callout.option-icons")).setDesc(r("setting.copy-as-callout.option-icons-description")).addToggle(a=>{a.setValue(this.plugin.settings.export.includeIcons).onChange(async p=>{this.plugin.settings.export.includeIcons=p,await this.plugin.settingsManager.save()})}),new A.Setting(n).setName(r("setting.copy-as-callout.option-vars")).setDesc(r("setting.copy-as-callout.option-vars-description",{interpolation:{skipOnVariables:!0}})).addToggle(a=>{a.setValue(this.plugin.settings.export.replaceVars).onChange(async p=>{this.plugin.settings.export.replaceVars=p,await this.plugin.settingsManager.save()})}),new A.Setting(n).setName(r("setting.copy-as-callout.option-ids")).setDesc(r("setting.copy-as-callout.option-ids-description")).addToggle(a=>{a.setValue(this.plugin.settings.export.useIds).onChange(async p=>{this.plugin.settings.export.useIds=p,await this.plugin.settingsManager.save()})}),new A.Setting(n).setName(r("setting.copy-as-callout.option-data")).setDesc(r("setting.copy-as-callout.option-data-description")).addToggle(a=>{a.setValue(this.plugin.settings.export.useDataEls).onChange(async p=>{this.plugin.settings.export.useDataEls=p,await this.plugin.settingsManager.save()})}),t.appendChild(n),e.appendChild(t)}displayOtherSettings(e){new A.Setting(e).setName(r("setting.other.name")).setHeading(),new A.Setting(e).setName(r("setting.other.scripting.name")).setDesc(N(r("setting.other.scripting.description"),"Executing-scripts")).addToggle(t=>{t.setValue(this.plugin.settings.scriptingEnabled).onChange(async o=>{this.plugin.settings.scriptingEnabled=o,this.plugin.updateAdapters(),await this.plugin.settingsManager.save()})}),new A.Setting(e).setName(r("setting.other.icon.name")).setDesc(r("setting.other.icon.description")).addButton(t=>{t.setIcon(this.plugin.settings.icon).setTooltip(r("setting.other.icon.tooltip")).onClick(async o=>{o.preventDefault(),new Fe(this.plugin,a=>this.updateNoteToolbarIcon(t.buttonEl,a)).open()}),t.buttonEl.setAttribute("data-note-toolbar-no-icon",this.plugin.settings.icon?"false":"true"),t.buttonEl.setAttribute("tabindex","0"),this.plugin.registerDomEvent(t.buttonEl,"keydown",o=>{switch(o.key){case"Enter":case" ":o.preventDefault(),new Fe(this.plugin,a=>this.updateNoteToolbarIcon(t.buttonEl,a)).open()}})}),new A.Setting(e).setName(r("setting.other.ribbon-action.name")).setDesc(N(r("setting.other.ribbon-action.description"),"Navigation-bar")).addDropdown(t=>t.addOptions(ui).setValue(this.plugin.settings.ribbonAction).onChange(async o=>{this.plugin.settings.ribbonAction=o,await this.plugin.settingsManager.save()})),new A.Setting(e).setName(r("setting.other.show-edit-tbar.name")).setDesc(r("setting.other.show-edit-tbar.description")).addToggle(t=>{t.setValue(this.plugin.settings.showEditInFabMenu),t.onChange(async o=>{this.plugin.settings.showEditInFabMenu=o,await this.plugin.settingsManager.save()})})}updateNoteToolbarIcon(e,t){this.plugin.settings.icon=t===r("setting.icon-suggester.option-no-icon")?"":t,this.plugin.settingsManager.save(),(0,A.setIcon)(e,t===r("setting.icon-suggester.option-no-icon")?"lucide-plus-square":t),e.setAttribute("data-note-toolbar-no-icon",t===r("setting.icon-suggester.option-no-icon")?"true":"false")}async listMoveHandler(e,t,o){if(e)switch(e.key){case"ArrowUp":e.preventDefault(),o="up";break;case"ArrowDown":e.preventDefault(),o="down";break;case"Delete":case"Backspace":e.preventDefault(),o="delete";case"Enter":case" ":e.preventDefault();break;default:return}switch(o){case"up":Ye(this.plugin.settings.folderMappings,t,t-1);break;case"down":Ye(this.plugin.settings.folderMappings,t,t+1),e==null||e.preventDefault();break;case"delete":this.plugin.settings.folderMappings.splice(t,1),e==null||e.preventDefault();break}await this.plugin.settingsManager.save(),this.display()}async listMoveHandlerById(e,t,o){let n=this.getIndexByRowId(t);w("listMoveHandlerById: moving index:",n),await this.listMoveHandler(e,n,o)}rememberLastPosition(e){e.scrollTo({top:this.lastScrollPosition,behavior:"auto"}),this.plugin.registerDomEvent(e,"scroll",t=>{this.lastScrollPosition=e.scrollTop})}getIndexByRowId(e){let t=this.getItemListEls();return Array.prototype.findIndex.call(t,o=>o.getAttribute("data-row-id")===e)}getItemListEls(){return this.containerEl.querySelectorAll(".note-toolbar-sortablejs-list > div[data-row-id]")}};var v=require("obsidian");var Ki=require("obsidian"),At=class extends Ki.AbstractInputSuggest{constructor(e,t,o){super(e,t);this.callback=o,this.commands=Object.values(this.app.commands.commands)}getSuggestions(e){let t=[],o=e.toLowerCase();return this.commands.forEach(n=>{n.name.toLowerCase().includes(o)&&t.push(n)}),t}renderSuggestion(e,t){t.setText(e.name)}selectSuggestion(e){this.callback(e),this.close()}};var uo=require("obsidian"),Mt=class extends uo.AbstractInputSuggest{constructor(e,t,o=!1,n,a){super(e,t);this.inputEl=t,this.showFilesOnly=o,this.fileExtension=n,this.folderPath=a}getSuggestions(e){let t=this.app.vault.getAllLoadedFiles(),o=[],n=e.toLowerCase();return o=t.filter(a=>{let p=a instanceof uo.TFile,l=a.path.toLowerCase();return!(!l.includes(n)||this.showFilesOnly&&!p||this.fileExtension&&p&&!l.endsWith(this.fileExtension.toLowerCase())||this.folderPath&&!l.startsWith(this.folderPath.toLowerCase()))}),o}renderSuggestion(e,t){t.setText(e.path)}selectSuggestion(e){this.inputEl.value=e.path,this.inputEl.trigger("input"),this.inputEl.blur(),this.close()}};var re=class extends v.Modal{constructor(e,t,o=null,n){super(e);this.itemListOpen=!0;this.itemListIdCounter=0;this.parent=o,this.plugin=t,this.toolbar=n}onOpen(){this.display()}onClose(){let{contentEl:e}=this;e.empty(),this.parent&&this.parent.display()}onEscapeKey(){let e=activeDocument.activeElement;if(e instanceof HTMLElement&&e.closest(".note-toolbar-setting-item")){let o=e.closest(".note-toolbar-setting-items-container-row"),n=this.modalEl.querySelector(".note-toolbar-setting-modal");n&&this.collapseItemForms(n,o,!0);return}this.close()}display(e){w("\u{1F7E1} REDRAWING MODAL \u{1F7E1}"),this.modalEl.addClass("note-toolbar-setting-modal-container"),this.contentEl.empty(),this.plugin.checkPlugins();let t=createDiv();if(t.className="vertical-tab-content note-toolbar-setting-modal",this.displayNameSetting(t),this.displayItemList(t),this.displayPositionSetting(t),this.displayStyleSetting(t),this.displayUsageSetting(t),this.displayDeleteButton(t),Rt(this.plugin,t,!0,()=>{this.close(),this.parent&&this.plugin.app.setting.close()}),this.contentEl.appendChild(t),this.plugin.registerDomEvent(this.modalEl,"click",o=>{let n=o.target.closest(".note-toolbar-setting-items-container-row");this.collapseItemForms(t,n)}),this.plugin.registerDomEvent(t,"focusin",o=>{let n=o.target.closest(".note-toolbar-setting-items-container-row");this.collapseItemForms(t,n)}),e){let o=this.containerEl.querySelector(e);o==null||o.focus()}this.rememberLastPosition(this.contentEl.children[0]),qt(this.plugin)}displayNameSetting(e){let t=createDiv();new v.Setting(t).setName(r("setting.name.name")).setDesc(r("setting.name.description")).addText(o=>o.setPlaceholder("Name").setValue(this.toolbar.name).onChange((0,v.debounce)(async n=>{let a=this.plugin.settingsManager.getToolbarByName(n);a&&a!==this.toolbar?this.setFieldError(o.inputEl,r("setting.name.error-toolbar-already-exists")):(this.removeFieldError(o.inputEl),this.toolbar.name=n,this.toolbar.updated=new Date().toISOString(),this.plugin.settings.toolbars.sort((p,l)=>p.name.localeCompare(l.name)),await this.plugin.settingsManager.save())},750))),e.append(t)}displayItemList(e){let t=createDiv();t.addClass("note-toolbar-setting-items-container"),t.setAttribute("data-active",this.itemListOpen.toString());let o=new v.Setting(t).setName(r("setting.items.name")).setClass("note-toolbar-setting-items-header").setHeading().setDesc(N(r("setting.items.description"),"Creating-toolbar-items"));o.addExtraButton(c=>{c.setIcon("import").setTooltip(r("import.button-import-into-tooltip")).onClick(async()=>{lo(this.plugin,this.toolbar).then(async d=>{d&&(await this.plugin.settingsManager.save(),this.display())})}).extraSettingsEl.tabIndex=0,this.plugin.registerDomEvent(c.extraSettingsEl,"keydown",d=>{switch(d.key){case"Enter":case" ":d.preventDefault(),c.extraSettingsEl.click()}})}),this.toolbar.items.length>8&&o.addExtraButton(c=>{c.setIcon("right-triangle").setTooltip(r("setting.button-collapse-tooltip")).onClick(async()=>{let d=e.querySelector(".note-toolbar-setting-items-container");if(d){this.itemListOpen=!this.itemListOpen,d.setAttribute("data-active",this.itemListOpen.toString());let m=d.querySelector(".setting-item-heading .setting-item-name");this.itemListOpen?m==null||m.setText(r("setting.items.name")):m==null||m.setText(r("setting.items.name-with-count",{count:this.toolbar.items.length})),c.setTooltip(this.itemListOpen?r("setting.button-collapse-tooltip"):r("setting.button-expand-tooltip"))}}).extraSettingsEl.tabIndex=0,c.extraSettingsEl.addClass("note-toolbar-setting-item-expand"),this.plugin.registerDomEvent(c.extraSettingsEl,"keydown",d=>{switch(d.key){case"Enter":case" ":d.preventDefault(),c.extraSettingsEl.click()}})});let n=createDiv();n.addClass("note-toolbar-setting-items-list-container");let a=createDiv();if(a.addClass("note-toolbar-sortablejs-list"),this.toolbar.items.length===0){let c=this.containerEl.createEl("div",{text:Te(r("setting.items.label-empty-no-items"))});c.className="note-toolbar-setting-empty-message",a.append(c)}else this.toolbar.items.forEach((c,d)=>{let m=createDiv();m.setAttribute("data-item-uuid",c.uuid),m.addClass("note-toolbar-setting-items-container-row");let g=this.generateItemPreview(c,this.itemListIdCounter.toString());m.appendChild(g);let h=this.generateItemForm(c);h.setAttribute("data-active","false"),m.appendChild(h),this.itemListIdCounter++,a.appendChild(m)});let p=so.create(a,{chosenClass:"sortable-chosen",ghostClass:"sortable-ghost",handle:".sortable-handle",onChange:c=>navigator.vibrate(50),onChoose:c=>navigator.vibrate(50),onSort:async c=>{w("sortable: index: ",c.oldIndex," -> ",c.newIndex),c.oldIndex!==void 0&&c.newIndex!==void 0&&(Ht(this.toolbar.items,c.oldIndex,c.newIndex),await this.plugin.settingsManager.save())}});n.appendChild(a);let l=createDiv();l.addClasses(["setting-item","note-toolbar-setting-items-button-container"]);let u=createSpan();new v.Setting(u).addExtraButton(c=>{let d=(0,v.getIcon)("note-toolbar-separator");c.extraSettingsEl.empty(),d&&c.extraSettingsEl.appendChild(d),c.setTooltip(r("setting.items.button-add-separator-tooltip")).onClick(async()=>this.addItemHandler(a,"separator"))}).addExtraButton(c=>{c.setIcon("lucide-corner-down-left").setTooltip(r("setting.items.button-add-break-tooltip")).onClick(async()=>this.addItemHandler(a,"break"))}),l.appendChild(u),new v.Setting(l).addButton(c=>{c.setTooltip(r("setting.items.button-new-item-tooltip")).setButtonText(r("setting.items.button-new-item")).setCta().onClick(async()=>this.addItemHandler(a,"command"))}),n.appendChild(l),t.appendChild(n),e.appendChild(t)}collapseItemForms(e,t,o=!1){e.querySelectorAll(".note-toolbar-sortablejs-list > div").forEach(a=>{let p=a.querySelector(".note-toolbar-setting-item-preview-container");if(o||a!==t){let l=a.querySelector(".note-toolbar-setting-item");p==null||p.setAttribute("data-active","true"),l==null||l.setAttribute("data-active","false")}o&&a===t&&p.querySelector(".note-toolbar-setting-item-preview").focus()})}toggleItemView(e,t,o){var u;let n=e.nextElementSibling,a=(u=e.querySelector(".note-toolbar-setting-item-preview"))==null?void 0:u.getAttribute("data-item-type"),p,l;if(t)switch(t){case"form":p="false",l="true";break;case"preview":p="true",l="false";break}else p=(e==null?void 0:e.getAttribute("data-active"))==="true"?"false":"true",l=(n==null?void 0:n.getAttribute("data-active"))==="true"?"false":"true";if(n==null||n.setAttribute("data-active",l),e==null||e.setAttribute("data-active",p),l==="true"){let c="";if(a)switch(a){case"break":case"separator":o="delete";break;case"group":o="link";break;default:o=o||"icon";break}switch(o){case"delete":c=".note-toolbar-setting-item-delete button";break;case"icon":c="#note-toolbar-item-field-icon .clickable-icon";break;case"label":c="#note-toolbar-item-field-label input";break;case"link":c=".note-toolbar-setting-item-field-link input";break;case"tooltip":c="#note-toolbar-item-field-tooltip input";break}let d=n==null?void 0:n.querySelector(c);d&&(d.focus(),this.scrollToPosition(c,"note-toolbar-setting-item"))}}generateItemPreview(e,t){let o=createDiv();o.className="note-toolbar-setting-item-preview-container";let n=createDiv();n.className="note-toolbar-setting-item-preview",n.setAttribute("role","button"),n.tabIndex=0,o.appendChild(n),this.renderPreview(e,o);let a=createDiv();return a.addClass("note-toolbar-setting-item-controls"),new v.Setting(a).addExtraButton(p=>{p.setIcon("grip-horizontal").setTooltip(r("setting.button-drag-tooltip")).extraSettingsEl.addClass("sortable-handle"),p.extraSettingsEl.setAttribute("data-item-uuid",e.uuid),p.extraSettingsEl.tabIndex=0,this.plugin.registerDomEvent(p.extraSettingsEl,"keydown",l=>{this.listMoveHandlerById(l,this.toolbar.items,e.uuid)})}),o.append(a),this.plugin.registerDomEvent(n,"keydown",p=>{switch(p.key){case"d":if(v.Platform.isWin||v.Platform.isLinux?p==null?void 0:p.ctrlKey:p==null?void 0:p.metaKey){let u=this.plugin.settingsManager.duplicateToolbarItem(this.toolbar,e,!0);this.plugin.settingsManager.save(),this.display(`.note-toolbar-sortablejs-list > div[${"data-item-uuid"}="${u}"] > .note-toolbar-setting-item-preview-container > .note-toolbar-setting-item-preview`)}break;case"Enter":case" ":p.preventDefault(),this.toggleItemView(o,"form")}}),this.plugin.registerDomEvent(n,"click",p=>{let l=p.target,u=p.currentTarget,c="label";u.querySelector(".note-toolbar-setting-tbar-preview")?c="link":l instanceof SVGElement||l!=null&&l.closest("svg")||l.querySelector(":scope > svg")?c="icon":l instanceof HTMLSpanElement&&l.classList.contains("note-toolbar-setting-item-preview-tooltip")&&(c="tooltip"),this.toggleItemView(o,"form",c)}),o}generateItemForm(e){var c;let t=createDiv();t.className="note-toolbar-setting-item";let o=createDiv();o.className="note-toolbar-setting-item-top-container";let n=createDiv();if(n.className="note-toolbar-setting-item-fields",!["break","separator"].includes(e.linkAttr.type)){let d=new v.Setting(n).setClass("note-toolbar-setting-item-icon").addExtraButton(E=>{E.setIcon(e.icon?e.icon:"lucide-plus-square").setTooltip(r("setting.item.button-icon-tooltip")).onClick(async()=>{let D=this.getItemRowEl(e.uuid);new Fe(this.plugin,P=>{e.icon=P===r("setting.icon-suggester.option-no-icon")?"":P,this.plugin.settingsManager.save(),this.updateItemIcon(D,P)}).open()}),E.extraSettingsEl.setAttribute("data-note-toolbar-no-icon",e.icon?"false":"true"),E.extraSettingsEl.setAttribute("tabindex","0"),this.plugin.registerDomEvent(E.extraSettingsEl,"keydown",D=>{switch(D.key){case"Enter":case" ":D.preventDefault();let O=this.getItemRowEl(e.uuid);new Fe(this.plugin,G=>{e.icon=G===r("setting.icon-suggester.option-no-icon")?"":G,this.plugin.settingsManager.save(),this.updateItemIcon(O,G)}).open()}})});d.settingEl.id="note-toolbar-item-field-icon";let m=new v.Setting(n).setClass("note-toolbar-setting-item-field").addText(E=>{E.setPlaceholder(r("setting.item.option-label-placeholder")).setValue(e.label).onChange((0,v.debounce)(async D=>{let O=this.updateItemComponentStatus(D,"text",E.inputEl.parentElement);e.label=D,this.toolbar.updated=new Date().toISOString(),await this.plugin.settingsManager.save(),this.renderPreview(e)},750)),this.updateItemComponentStatus(e.label,"text",E.inputEl.parentElement)});m.settingEl.id="note-toolbar-item-field-label";let g=new v.Setting(n).setClass("note-toolbar-setting-item-field").addText(E=>{E.setPlaceholder(r("setting.item.option-tooltip-placeholder")).setValue(e.tooltip).onChange((0,v.debounce)(async D=>{let O=this.updateItemComponentStatus(D,"text",E.inputEl.parentElement);e.tooltip=D,this.toolbar.updated=new Date().toISOString(),await this.plugin.settingsManager.save(),this.renderPreview(e)},750)),this.updateItemComponentStatus(e.tooltip,"text",E.inputEl.parentElement)});g.settingEl.id="note-toolbar-item-field-tooltip";let h=createDiv();h.className="note-toolbar-setting-item-link-container";let b=createDiv(),f=new v.Setting(b).addDropdown(E=>E.addOptions(Object.fromEntries(Object.entries(ut).filter(([D])=>this.plugin.hasPlugin[D]||!["dataview","js-engine","templater-obsidian"].includes(D)))).setValue(e.linkAttr.type).onChange(async D=>{var G;let O=this.getItemRowEl(e.uuid),P=O==null?void 0:O.querySelector(".note-toolbar-setting-item-link-field");if(P){e.linkAttr.type=D,P.empty(),e.link="",this.getLinkSettingForType(e.linkAttr.type,P,e),await this.plugin.settingsManager.save(),this.renderPreview(e);let B=e.linkAttr.type==="group";d.setDisabled(B),w(d.controlEl),(G=d.controlEl.firstChild)==null||G.setAttribute("tabindex",B?"-1":"0"),m.setDisabled(B),g.setDisabled(B)}})),T=createDiv();T.className="note-toolbar-setting-item-link-field",this.getLinkSettingForType(e.linkAttr.type,T,e),h.append(b),h.append(T);let x=createDiv();x.className="note-toolbar-setting-item-fields",x.appendChild(n),o.appendChild(x),o.appendChild(h),t.appendChild(o);let M=e.linkAttr.type==="group";d.setDisabled(M),(c=d.controlEl.firstChild)==null||c.setAttribute("tabindex",M?"-1":"0"),m.setDisabled(M),g.setDisabled(M)}let a=createDiv();if(a.className="note-toolbar-setting-item-controls",this.getDeleteButton(a,e),new v.Setting(a).setClass("note-toolbar-setting-item-visibility-and-controls").addButton(d=>{d.setIcon("copy-plus").setTooltip(r("setting.item.button-duplicate-tooltip")).onClick(async()=>{let m=this.plugin.settingsManager.duplicateToolbarItem(this.toolbar,e,!0);await this.plugin.settingsManager.save(),this.display(`.note-toolbar-sortablejs-list > div[${"data-item-uuid"}="${m}"] > .note-toolbar-setting-item-preview-container > .note-toolbar-setting-item-preview`)})}),["break","separator"].includes(e.linkAttr.type)){let d=e.linkAttr.type,m=createSpan();m.setText(d.charAt(0).toUpperCase()+d.slice(1)),a.append(m)}let p=createDiv();p.className="note-toolbar-setting-item-visibility-container";let l=new v.Setting(p).setClass("note-toolbar-setting-item-visibility").addButton(d=>{let[m,g]=this.getPlatformStateLabel(e.visibility.desktop,r("setting.item.option-visibility-platform-desktop"));(0,v.setIcon)(d.buttonEl,"monitor"),this.updateItemVisButton(d,m,g),d.setTooltip(g).onClick(async()=>{var h,b;if((b=(h=e.visibility).desktop)!=null||(h.desktop={allViews:{components:[]}}),["break","group","separator"].includes(e.linkAttr.type)){let f=e.visibility.desktop,T={icon:f&&f.allViews?f.allViews.components.includes("icon"):!1,label:f&&f.allViews?f.allViews.components.includes("label"):!1};T.icon&&T.label?(Be(f,"icon"),Be(f,"label"),T.icon=!1,T.label=!1):(_e(f,"icon"),_e(f,"label"),T.icon=!0,T.label=!0);let[x,M]=this.getPlatformStateLabel(f,r("setting.item.option-visibility-platform-desktop"));this.updateItemVisButton(d,x,M),this.toolbar.updated=new Date().toISOString(),await this.plugin.settingsManager.save()}else this.getItemVisibilityMenu(e.visibility.desktop,r("setting.item.option-visibility-platform-desktop"),d).showAtPosition(bt(d.buttonEl))})}).addButton(d=>{let[m,g]=this.getPlatformStateLabel(e.visibility.mobile,r("setting.item.option-visibility-platform-mobile"));(0,v.setIcon)(d.buttonEl,"tablet-smartphone"),this.updateItemVisButton(d,m,g),d.setTooltip(g).onClick(async()=>{var h,b;if((b=(h=e.visibility).mobile)!=null||(h.mobile={allViews:{components:[]}}),["break","group","separator"].includes(e.linkAttr.type)){let f=e.visibility.mobile,T={icon:f&&f.allViews?f.allViews.components.includes("icon"):!1,label:f&&f.allViews?f.allViews.components.includes("label"):!1};T.icon&&T.label?(Be(f,"icon"),Be(f,"label"),T.icon=!1,T.label=!1):(_e(f,"icon"),_e(f,"label"),T.icon=!0,T.label=!0);let[x,M]=this.getPlatformStateLabel(f,r("setting.item.option-visibility-platform-mobile"));this.updateItemVisButton(d,x,M),this.toolbar.updated=new Date().toISOString(),await this.plugin.settingsManager.save()}else this.getItemVisibilityMenu(e.visibility.mobile,r("setting.item.option-visibility-platform-mobile"),d).showAtPosition(bt(d.buttonEl))})}).addExtraButton(d=>{d.setIcon("grip-horizontal").setTooltip(r("setting.button-drag-tooltip")).extraSettingsEl.addClass("sortable-handle"),d.extraSettingsEl.setAttribute("data-item-uuid",e.uuid),d.extraSettingsEl.tabIndex=0,this.plugin.registerDomEvent(d.extraSettingsEl,"keydown",m=>{this.listMoveHandlerById(m,this.toolbar.items,e.uuid)})}),u=createDiv();return u.className="note-toolbar-setting-item-visibility-and-controls",u.setAttribute("data-item-type",e.linkAttr.type),u.appendChild(a),u.appendChild(p),t.appendChild(u),t}updateItemIcon(e,t){let o=e.querySelector(".note-toolbar-setting-item-icon .clickable-icon");o&&(0,v.setIcon)(o,t===r("setting.icon-suggester.option-no-icon")?"lucide-plus-square":t),o.setAttribute("data-note-toolbar-no-icon",t===r("setting.icon-suggester.option-no-icon")?"true":"false");let n=e.querySelector(".note-toolbar-setting-item-preview-icon");n&&t&&(0,v.setIcon)(n,t)}updateItemVisButton(e,t,o){let a=Array.from(e.buttonEl.childNodes).find(p=>p.nodeType===Node.TEXT_NODE);t?a?a.textContent=t:e.buttonEl.appendChild(document.createTextNode(t)):a&&e.buttonEl.removeChild(a),e.setTooltip(o)}getDeleteButton(e,t){new v.Setting(e).setClass("note-toolbar-setting-item-delete").addButton(o=>{o.setIcon("minus-circle").setTooltip(r("setting.button-delete-tooltip")).onClick(async()=>{this.listMoveHandlerById(null,this.toolbar.items,t.uuid,"delete")}),o.buttonEl.setAttribute("data-item-uuid",t.uuid)})}getLinkSetting(e,t,o,n){var a,p;switch(e){case"command":new v.Setting(t).setClass("note-toolbar-setting-item-field-link").addSearch(d=>{new At(this.app,d.inputEl,async m=>{this.updateItemComponentStatus(m.id,"command",d.inputEl.parentElement),d.inputEl.value=m.name,o.link=m.name,o.linkAttr.commandId=m.id,o.linkAttr.type=e,await this.plugin.settingsManager.save(),this.renderPreview(o)}),d.setPlaceholder(r("setting.item.option-command-placeholder")).setValue(o.link).onChange((0,v.debounce)(async m=>{let g=m?Oo(this.plugin,m):"",h=this.updateItemComponentStatus(g,"command",d.inputEl.parentElement);o.link=h&&m?m:"",o.linkAttr.commandId=h&&g?g:"",o.linkAttr.type=e,await this.plugin.settingsManager.save(),this.renderPreview(o)},500)),this.updateItemComponentStatus(o.linkAttr.commandId,"command",d.inputEl.parentElement)});break;case"dataview":case"js-engine":case"templater-obsidian":if(this.plugin.settings.scriptingEnabled){let d=this.plugin.getAdapterForItemType(e);if(d){let m={"":"Select a function...",...Array.from(d==null?void 0:d.getFunctions().entries()).reduce((f,[T,x])=>(f[T]=x.label,f),{})},g=((a=o.scriptConfig)==null?void 0:a.pluginFunction)||"";g=g&&(d!=null&&d.getFunctions().has(g))?g:"";let h=new v.Setting(t).setClass("note-toolbar-setting-item-field-link").addDropdown(f=>{f.addOptions(m).setValue(g).onChange(async T=>{var M;let x=t.querySelector(".note-toolbar-setting-item-link-subfield");if(x==null||x.remove(),(M=o.scriptConfig)!=null||(o.scriptConfig={pluginFunction:T}),o.scriptConfig.pluginFunction=T,this.toolbar.updated=new Date().toISOString(),await this.plugin.settingsManager.save(),d){let E=createDiv();E.addClass("note-toolbar-setting-item-link-subfield"),this.getScriptSubfields(d,o,E),t.append(E);let D=d.getFunctions().get(T);if(D!=null&&D.description)if(typeof D.description=="string"){let O=document.createDocumentFragment();O.appendText(D.description),this.setFieldHelp(h.controlEl,O)}else this.setFieldHelp(h.controlEl,D.description)}this.renderPreview(o)})});this.setFieldHelp(h.controlEl,n),(p=o.scriptConfig)!=null||(o.scriptConfig={pluginFunction:""});let b=createDiv();b.addClass("note-toolbar-setting-item-link-subfield"),this.getScriptSubfields(d,o,b),t.append(b)}else{t.removeClass("note-toolbar-setting-item-link-field"),t.addClass("note-toolbar-setting-plugin-error"),t.setText("Toggle the Scripting setting after installing and enabling plugin: ");let g=document.createDocumentFragment().createEl("a",{href:`obsidian://show-plugin?id=${e}`,text:ut[e]});g.addClass("note-toolbar-setting-focussable-link"),t.append(g)}}else t.removeClass("note-toolbar-setting-item-link-field"),t.addClass("note-toolbar-setting-plugin-error"),t.setText("Enable Scripting in Note Toolbar settings to use this item.");break;case"file":new v.Setting(t).setClass("note-toolbar-setting-item-field-link").addSearch(d=>{new Mt(this.app,d.inputEl),d.setPlaceholder(r("setting.item.option-file-placeholder")).setValue(o.link).onChange((0,v.debounce)(async m=>{let g=this.updateItemComponentStatus(m,"file",d.inputEl.parentElement);o.link=g?(0,v.normalizePath)(m):"",o.linkAttr.commandId="",o.linkAttr.type=e,await this.plugin.settingsManager.save(),this.renderPreview(o)},500)),this.updateItemComponentStatus(o.link,"file",d.inputEl.parentElement)});break;case"group":let l=new v.Setting(t).setClass("note-toolbar-setting-item-field-link").addSearch(d=>{new He(this.app,this.plugin,d.inputEl),d.setPlaceholder(r("setting.item.option-item-group-placeholder")).setValue(this.plugin.settingsManager.getToolbarName(o.link)).onChange((0,v.debounce)(async m=>{let h=this.updateItemComponentStatus(m,"toolbar",d.inputEl.parentElement)?this.plugin.settingsManager.getToolbarByName(m):void 0;o.link=h?h.uuid:"",o.linkAttr.commandId="",o.linkAttr.type=e,await this.plugin.settingsManager.save(),this.renderPreview(o);let b=h?ve(this.plugin,h,void 0,!0):N(r("setting.item.option-item-group-help"),"Creating-toolbar-items");this.setFieldHelp(l.controlEl,b)},500)),this.updateItemComponentStatus(o.link,"toolbar",d.inputEl.parentElement)});this.setFieldHelp(l.controlEl,n);break;case"menu":let u=new v.Setting(t).setClass("note-toolbar-setting-item-field-link").addSearch(d=>{new He(this.app,this.plugin,d.inputEl);let m=this.plugin.settingsManager.getToolbarName(o.link);d.setPlaceholder(r("setting.item.option-item-menu-placeholder")).setValue(m||o.link).onChange((0,v.debounce)(async g=>{this.updateItemComponentStatus(g,"toolbar",d.inputEl.parentElement);let h=this.plugin.settingsManager.getToolbarByName(g);o.link=h?h.uuid:"",o.linkAttr.commandId="",o.linkAttr.type=e,await this.plugin.settingsManager.save(),this.renderPreview(o);let b=h?ve(this.plugin,h,void 0,!0):N(r("setting.item.option-item-menu-help"),"Creating-toolbar-items");this.setFieldHelp(u.controlEl,b)},500)),this.updateItemComponentStatus(o.link,"toolbar",d.inputEl.parentElement)});this.setFieldHelp(u.controlEl,n);break;case"uri":let c=new v.Setting(t).setClass("note-toolbar-setting-item-field-link").addText(d=>{d.setPlaceholder(r("setting.item.option-uri-placehoder")).setValue(o.link).onChange((0,v.debounce)(async m=>{this.updateItemComponentStatus(m,"text",d.inputEl.parentElement),o.link=m,o.linkAttr.commandId="",o.linkAttr.type=e,this.toolbar.updated=new Date().toISOString(),await this.plugin.settingsManager.save(),this.renderPreview(o)},500)),this.updateItemComponentStatus(o.link,"text",d.inputEl.parentElement)});this.setFieldHelp(c.controlEl,n);break}}getScriptSubfields(e,t,o){if(t.scriptConfig){let n=t.scriptConfig,a=e.getFunctions().get(t.scriptConfig.pluginFunction);a==null||a.parameters.forEach(p=>{let l=n[p.parameter],u;switch(p.type){case"command":u=new v.Setting(o).setClass("note-toolbar-setting-item-field-link").addSearch(c=>{new At(this.app,c.inputEl,async d=>{this.updateItemComponentStatus(d.id,p.type,c.inputEl.parentElement),n[p.parameter]=d.id,c.inputEl.value=d.name,await this.plugin.settingsManager.save()}),c.setPlaceholder(p.label).setValue(l&&Bt(this.plugin,l)||"").onChange((0,v.debounce)(async d=>{let m=d?Oo(this.plugin,d):"",g=this.updateItemComponentStatus(m,p.type,c.inputEl.parentElement);n[p.parameter]=g&&m?m:"",await this.plugin.settingsManager.save(),this.renderPreview(t)},500)),this.updateItemComponentStatus(l||"",p.type,c.inputEl.parentElement)});break;case"file":u=new v.Setting(o).setClass("note-toolbar-setting-item-field-link").addSearch(c=>{var g;let d,m=".js";t.linkAttr.type==="templater-obsidian"&&(d=(g=this.plugin.tpAdapter)==null?void 0:g.getSetting("templates_folder"),m=void 0),new Mt(this.app,c.inputEl,!0,m,d),c.setPlaceholder(p.label).setValue(l||"").onChange((0,v.debounce)(async h=>{let b=this.updateItemComponentStatus(h,p.type,c.inputEl.parentElement);n[p.parameter]=b?(0,v.normalizePath)(h):"",this.toolbar.updated=new Date().toISOString(),await this.plugin.settingsManager.save(),this.renderPreview(t)},500)),this.updateItemComponentStatus(l||"",p.type,c.inputEl.parentElement)});break;case"text":u=new v.Setting(o).setClass("note-toolbar-setting-item-field-link").addText(c=>{c.setPlaceholder(p.label).setValue(l||"").onChange((0,v.debounce)(async d=>{let m=this.updateItemComponentStatus(d,p.type,c.inputEl.parentElement);n[p.parameter]=m?d:"",this.toolbar.updated=new Date().toISOString(),await this.plugin.settingsManager.save(),this.renderPreview(t)},500)),this.updateItemComponentStatus(l||"",p.type,c.inputEl.parentElement)});break;case"args":case"textarea":u=new v.Setting(o).setClass("note-toolbar-setting-item-field-link").addTextArea(c=>{c.setPlaceholder(p.label).setValue(l||"").onChange((0,v.debounce)(async d=>{let m=this.updateItemComponentStatus(d,p.type,c.inputEl.parentElement);n[p.parameter]=m?d:"",this.toolbar.updated=new Date().toISOString(),await this.plugin.settingsManager.save(),this.renderPreview(t)},500)),this.updateItemComponentStatus(l||"",p.type,c.inputEl.parentElement)});break}if(u&&p.description){let c=createDiv();c.setText(p.description),c.addClass("note-toolbar-setting-field-help"),u.controlEl.insertAdjacentElement("beforeend",c)}})}}getLinkSettingForType(e,t,o){switch(e){case"command":this.getLinkSetting(e,t,o);break;case"dataview":this.getLinkSetting(e,t,o,N("Select how you want to use Dataview.","Dataview"));break;case"file":this.getLinkSetting(e,t,o);break;case"js-engine":this.getLinkSetting(e,t,o,N("Select how you want to use this.","JS-Engine"));break;case"group":case"menu":let n=this.plugin.settingsManager.getToolbarById(o.link),a=document.createDocumentFragment();n?a.append(ve(this.plugin,n,void 0,!0)):a.append(N(e==="group"?r("setting.item.option-item-group-help"):r("setting.item.option-item-menu-help"),"Creating-toolbar-items")),this.getLinkSetting(e,t,o,a);break;case"templater-obsidian":this.getLinkSetting(e,t,o,N("Select how you want to use Templater.","Templater"));break;case"uri":this.getLinkSetting(e,t,o,N(r("setting.item.option-uri-help"),"Variables"));break}}updateItemComponentStatus(e,t,o,n){var d,m;let a;(f=>(f.Empty="empty",f.Invalid="invalid",f.Valid="valid"))(a||(a={}));var p="valid",l="",u=void 0,c=!0;if(e)switch(t){case"args":Ze(e)||(p="invalid",l="Invalid argument format.");break;case"command":if(!(e in this.app.commands.commands))if(p="invalid",e===_t)l=r("setting.item.option-command-error-does-not-exist");else{l=r("setting.item.option-command-error-not-available-search");let f=Ut(e),T=f==null?void 0:f.querySelector("a");T&&(l=r("setting.item.option-command-error-not-available-install"),T.addClass("note-toolbar-setting-focussable-link"),u=T)}break;case"file":let h=this.app.vault.getAbstractFileByPath(e);!(h instanceof v.TFile)&&!(h instanceof v.TFolder)&&(p="invalid",l=r("setting.item.option-file-error-does-not-exist"));break;case"text":break;case"toolbar":let b=this.plugin.settingsManager.getToolbarByName(e);b||(b=this.plugin.settingsManager.getToolbarById(e),b||(p="invalid",l=r("setting.item.option-item-menu-error-does-not-exist")));break}else switch(t){case"script":if(n&&n.scriptConfig){let g=this.plugin.getAdapterForItemType(n.linkAttr.type);if(g){let h=((d=n.scriptConfig)==null?void 0:d.pluginFunction)||"",b=(m=g==null?void 0:g.getFunctions().get(h))==null?void 0:m.parameters;b==null||b.forEach((f,T)=>{var M,E;let x=(E=(M=n.scriptConfig)==null?void 0:M[f.parameter])!=null?E:null;x&&(p=this.updateItemComponentStatus(x,f.type,o)?"valid":"invalid")})}else p="invalid",l="Plugin not installed and enabled."}break;default:p="empty",l="";break}switch(this.removeFieldError(o),p){case"empty":c=!1;break;case"invalid":this.setFieldError(o,l,u),c=!1;break}return c}displayPositionSetting(e){var t,o;new v.Setting(e).setName(r("setting.position.name")).setDesc(N(r("setting.position.description"),"Positioning-toolbars")).setHeading(),new v.Setting(e).setName(r("setting.option-platform-desktop")).addDropdown(n=>{var a,p,l;return n.addOptions(Do.desktop.reduce((u,c)=>({...u,...c}),{})).setValue((l=(p=(a=this.toolbar.position.desktop)==null?void 0:a.allViews)==null?void 0:p.position)!=null?l:"props").onChange(async u=>{this.toolbar.position.desktop={allViews:{position:u}},this.toolbar.updated=new Date().toISOString(),await this.plugin.settingsManager.save(),this.display()})}),new v.Setting(e).setName(r("setting.option-platform-mobile")).setDesc(((o=(t=this.toolbar.position.mobile)==null?void 0:t.allViews)==null?void 0:o.position)==="hidden"?N(r("setting.position.option-mobile-help"),"Navigation-bar"):"").addDropdown(n=>{var a,p,l;return n.addOptions(Do.mobile.reduce((u,c)=>({...u,...c}),{})).setValue((l=(p=(a=this.toolbar.position.mobile)==null?void 0:a.allViews)==null?void 0:p.position)!=null?l:"props").onChange(async u=>{this.toolbar.position.mobile={allViews:{position:u}},this.toolbar.position.tablet={allViews:{position:u}},this.toolbar.updated=new Date().toISOString(),await this.plugin.settingsManager.save(),this.display()})})}displayStyleSetting(e){new v.Setting(e).setName(r("setting.styles.name")).setDesc(N(r("setting.styles.description"),"Styling-toolbars")).setHeading();let t=createDiv();if(t.className="note-toolbar-setting-item-style",this.toolbar.defaultStyles.length==0){let d=this.containerEl.createEl("div",{text:Te(r("setting.styles.option-default-empty"))});d.className="note-toolbar-setting-empty-message",t.append(d)}else this.toolbar.defaultStyles.forEach((d,m)=>{let g=this.getValueForKey(Fo,d);new v.Setting(t).setName(this.getValueForKey(ct,d)).setTooltip((g?g+" ":"")+r("setting.styles.style-tooltip-use-class",{class:d})).addExtraButton(h=>{h.setIcon("cross").setTooltip(r("setting.styles.style-remove-tooltip")).onClick(async()=>this.listMoveHandler(null,this.toolbar.defaultStyles,m,"delete")),h.extraSettingsEl.setAttribute("tabindex","0"),this.plugin.registerDomEvent(h.extraSettingsEl,"keydown",b=>this.listMoveHandler(b,this.toolbar.defaultStyles,m,"delete"))})});let o=this.getExcludedDefaultStyles(),n=[{placeholder:r("setting.styles.option-placeholder")},...ct].filter(d=>{let m=Object.keys(d)[0];return!this.toolbar.defaultStyles.includes(m)&&!o.includes(m)}).reduce((d,m)=>({...d,...m}),{});new v.Setting(t).addDropdown(d=>d.addOptions(n).setValue("placeholder").onChange(async m=>{this.toolbar.defaultStyles.includes(m)?this.toolbar.defaultStyles=this.toolbar.defaultStyles.filter(g=>g!==m):this.toolbar.defaultStyles.push(m),await this.plugin.settingsManager.save(),this.display()}));let a=document.createDocumentFragment();a.append(r("setting.styles.option-default-description")),a.append(this.getStyleDisclaimersFr(Fo,this.toolbar.defaultStyles)),new v.Setting(e).setName(r("setting.styles.option-default-name")).setDesc(a).setClass("note-toolbar-setting-item-styles").settingEl.append(t);let p=createDiv();if(p.className="note-toolbar-setting-item-style",this.toolbar.mobileStyles.length==0){let d=this.containerEl.createEl("div",{text:Te(r("setting.styles.option-mobile-empty"))});d.className="note-toolbar-setting-empty-message",p.append(d)}else this.toolbar.mobileStyles.forEach((d,m)=>{let g=this.getValueForKey(No,d);new v.Setting(p).setName(this.getValueForKey(mt,d)).setTooltip((g?g+" ":"")+"Use in Callout or CSS: "+d).addExtraButton(h=>{h.setIcon("cross").setTooltip("Remove").onClick(async()=>this.listMoveHandler(null,this.toolbar.mobileStyles,m,"delete")),h.extraSettingsEl.setAttribute("tabindex","0"),this.plugin.registerDomEvent(h.extraSettingsEl,"keydown",b=>this.listMoveHandler(b,this.toolbar.mobileStyles,m,"delete"))})});let l=this.getExcludedMobileStyles(),u=[{placeholder:r("setting.styles.option-placeholder")},...mt].filter(d=>{let m=Object.keys(d)[0];return!this.toolbar.mobileStyles.includes(m)&&!l.includes(m)}).reduce((d,m)=>({...d,...m}),{});new v.Setting(p).addDropdown(d=>d.addOptions(u).setValue("placeholder").onChange(async m=>{this.toolbar.mobileStyles.includes(m)?this.toolbar.mobileStyles=this.toolbar.mobileStyles.filter(g=>g!==m):this.toolbar.mobileStyles.push(m),await this.plugin.settingsManager.save(),this.display()}));let c=document.createDocumentFragment();c.append(r("setting.styles.option-mobile-description")),c.append(this.getStyleDisclaimersFr(No,this.toolbar.mobileStyles)),new v.Setting(e).setName(r("setting.styles.option-mobile-name")).setDesc(c).setClass("note-toolbar-setting-item-styles").settingEl.append(p),new v.Setting(e).setName(r("setting.styles.option-custom-name")).setDesc(N(r("setting.styles.option-custom-description"),"Custom-styling")).setClass("note-toolbar-setting-item-full-width").addText(d=>d.setPlaceholder(r("setting.styles.option-custom-empty")).setValue(this.toolbar.customClasses).onChange((0,v.debounce)(async m=>{this.toolbar.customClasses=m.trim(),await this.plugin.settingsManager.save()},750))),new v.Setting(e).setDesc(N(r("setting.styles.help"),"Style-Settings-plugin-support"))}getExcludedDefaultStyles(){var o,n,a,p;let e=[];((n=(o=this.toolbar.position.desktop)==null?void 0:o.allViews)==null?void 0:n.position)!=="props"&&e.push("sticky"),((p=(a=this.toolbar.position.desktop)==null?void 0:a.allViews)==null?void 0:p.position)!=="top"&&e.push("wide");let{defaultStyles:t}=this.toolbar;return t.includes("left")&&e.push("right","center"),t.includes("right")&&e.push("left","center"),t.includes("center")&&e.push("left","right"),t.includes("between")&&e.push("even"),t.includes("even")&&e.push("between"),e}getExcludedMobileStyles(){var n,a,p,l;let e=[];((a=(n=this.toolbar.position.mobile)==null?void 0:n.allViews)==null?void 0:a.position)!=="top"&&e.push("mnwd","mwd"),((l=(p=this.toolbar.position.mobile)==null?void 0:p.allViews)==null?void 0:l.position)!=="props"&&e.push("mstcky","mnstcky");let{mobileStyles:t}=this.toolbar;t.includes("mlft")&&e.push("mrght","mctr"),t.includes("mrght")&&e.push("mlft","mctr"),t.includes("mctr")&&e.push("mlft","mrght"),t.includes("mbtwn")&&e.push("mevn"),t.includes("mevn")&&e.push("mbtwn"),t.includes("mnwd")&&e.push("mwd"),t.includes("mwd")&&e.push("mnwd");let{defaultStyles:o}=this.toolbar;return o.includes("border")&&e.push("mbrder"),o.includes("border")||e.push("mnbrder"),o.includes("button")&&e.push("mbtn"),o.includes("wide")&&e.push("mwd"),e}displayUsageSetting(e){let t=document.createDocumentFragment(),o=t.createEl("a",{href:"#",text:r("setting.usage.description-search")}),[n,a]=this.getToolbarSettingsUsage(this.toolbar.uuid);t.append(r("setting.usage.description",{mappingCount:n,itemCount:a}),t.createEl("br"),o),this.plugin.registerDomEvent(o,"click",l=>{this.close(),this.app.setting.close(),window.open(this.getToolbarPropSearchUri(this.toolbar.name))});let p=new v.Setting(e).setName(r("setting.usage.name")).setDesc(t).setHeading()}displayDeleteButton(e){new v.Setting(e).setName(r("setting.delete-toolbar.name")).setHeading().setDesc(r("setting.delete-toolbar.description")).setClass("note-toolbar-setting-top-spacing").setClass("note-toolbar-setting-bottom-spacing").addButton(t=>{t.setClass("mod-warning").setTooltip(r("setting.delete-toolbar.button-delete-tooltip")).setButtonText(r("setting.delete-toolbar.button-delete")).setCta().onClick(()=>{ro(this.plugin.app,{title:r("setting.delete-toolbar.title",{toolbar:this.toolbar.name}),questionLabel:r("setting.delete-toolbar.label-delete-confirm"),approveLabel:r("setting.delete-toolbar.button-delete-confirm"),denyLabel:r("setting.button-cancel"),warning:!0}).then(o=>{o&&(this.plugin.settingsManager.deleteToolbar(this.toolbar.uuid),this.plugin.settingsManager.save().then(()=>{this.close()}))})})})}async addItemHandler(e,t){this.toolbar.items.length===0&&e.empty();let o={uuid:te(),label:"",icon:"",link:"",linkAttr:{commandId:"",hasVars:!1,type:t},tooltip:"",visibility:{...Ot}};this.toolbar.items.push(o),this.toolbar.updated=new Date().toISOString(),await this.plugin.settingsManager.save();let n=createDiv();n.setAttribute("data-item-uuid",o.uuid),n.addClass("note-toolbar-setting-items-container-row");let a=this.generateItemPreview(o,this.itemListIdCounter.toString());a.setAttribute("data-active","false"),n.appendChild(a);let p=this.generateItemForm(o);p.setAttribute("data-active","true"),n.appendChild(p),this.itemListIdCounter++,e.appendChild(n);let l=p==null?void 0:p.querySelector(".note-toolbar-setting-item-icon .setting-item-control .clickable-icon");l&&(l.focus(),this.scrollToPosition(".note-toolbar-setting-item-icon .setting-item-control .clickable-icon","note-toolbar-setting-item"))}async listMoveHandler(e,t,o,n){if(e)switch(e.key){case"ArrowUp":e.preventDefault(),n="up";break;case"ArrowDown":e.preventDefault(),n="down";break;case"Delete":case"Backspace":e.preventDefault(),n="delete";break;case"Enter":case" ":e.preventDefault();break;default:return}switch(n){case"up":Ye(t,o,o-1),this.toolbar.updated=new Date().toISOString();break;case"down":Ye(t,o,o+1),this.toolbar.updated=new Date().toISOString();break;case"delete":t.splice(o,1),this.toolbar.updated=new Date().toISOString();break}await this.plugin.settingsManager.save(),this.display()}async listMoveHandlerById(e,t,o,n){let a=this.getIndexByUuid(o);w("listMoveHandlerById: moving index:",a),await this.listMoveHandler(e,t,a,n)}rememberLastPosition(e){e.scrollTo({top:this.lastScrollPosition,behavior:"auto"}),this.plugin.registerDomEvent(e,"scroll",t=>{this.lastScrollPosition=e.scrollTop})}scrollToPosition(e,t){let o=this.contentEl.querySelector(e);o==null||o.focus(),setTimeout(()=>{let n=t?o.closest(t):void 0;n==null||n.scrollIntoView(!0)},v.Platform.isMobile?100:0)}getToolbarPropSearchUri(e){let t="obsidian://search?vault="+this.app.vault.getName()+"&query=["+this.plugin.settings.toolbarProp+": "+e+"]";return encodeURI(t)}getToolbarSettingsUsage(e){let t=this.plugin.settings.folderMappings.filter(n=>n.toolbar===e).length,o=this.plugin.settings.toolbars.reduce((n,a)=>n+a.items.filter(p=>p.link===e&&p.linkAttr.type==="menu").length,0);return[t,o]}getItemVisibilityMenu(e,t,o){let n={icon:e&&e.allViews?e.allViews.components.includes("icon"):!1,label:e&&e.allViews?e.allViews.components.includes("label"):!1},a=new v.Menu;return a.addItem(p=>{p.setTitle(n.icon?r("setting.item.option-visibility-component-visible-platform",{component:r("setting.item.option-component-icon"),platform:t}):r("setting.item.option-visibility-component-hidden-platform",{component:r("setting.item.option-component-icon"),platform:t})).setIcon("image").setChecked(n.icon).onClick(async l=>{n.icon?(Be(e,"icon"),n.icon=!1):(_e(e,"icon"),n.icon=!0),this.toolbar.updated=new Date().toISOString(),await this.plugin.settingsManager.save();let[u,c]=this.getPlatformStateLabel(e,t);this.updateItemVisButton(o,u,c)})}),a.addItem(p=>{p.setTitle(n.label?r("setting.item.option-visibility-component-visible-platform",{component:r("setting.item.option-component-label"),platform:t}):r("setting.item.option-visibility-component-hidden-platform",{component:r("setting.item.option-component-label"),platform:t})).setIcon("whole-word").setChecked(n.label).onClick(async l=>{n.label?(Be(e,"label"),n.label=!1):(_e(e,"label"),n.label=!0),this.toolbar.updated=new Date().toISOString(),await this.plugin.settingsManager.save();let[u,c]=this.getPlatformStateLabel(e,t);this.updateItemVisButton(o,u,c)})}),a}getPlatformStateLabel(e,t){var o;if(e&&e.allViews){let n=(o=e.allViews)==null?void 0:o.components;if(n)return n.length===2?["",r("setting.item.option-visibility-visible-platform",{platform:t})]:n.length===1?[n[0]==="icon"?r("setting.item.option-component-icon"):n[0]==="label"?r("setting.item.option-component-label"):n[0],r("setting.item.option-visibility-component-visible-platform",{component:n[0],platform:t})]:[r("setting.item.option-visibility-hidden"),r("setting.item.option-visibility-hidden-platform",{platform:t})]}return[r("setting.item.option-visibility-hidden"),r("setting.item.option-visibility-hidden-platform",{platform:t})]}getStyleDisclaimersFr(e,t){let o=document.createDocumentFragment();return t.forEach(n=>{e.find(a=>n in a)&&o.append(o.createEl("br"),"* ",this.getValueForKey(e,n))}),o}getValueForKey(e,t){let o=e.find(n=>t in n);return o?Object.values(o)[0]:""}setFieldError(e,t,o){if(e){let n=e.closest(".setting-item-control");if(n||(n=e.closest(".note-toolbar-setting-item-preview"),t=""),(n==null?void 0:n.querySelector(".note-toolbar-setting-field-error"))===null){if(t){let a=createEl("div",{text:t,cls:"note-toolbar-setting-field-error"});o&&(this.plugin.registerDomEvent(o,"click",p=>{let l=document.createDocumentFragment().createEl("a",{text:r("setting.item.option-command-error-refresh"),href:"#"}),u=l.createSpan();(0,v.setIcon)(u,"refresh-cw");let c=p.currentTarget;c==null||c.replaceWith(l),this.plugin.registerDomEvent(l,"click",d=>{this.display()})}),a.append(" ",o)),n.insertAdjacentElement("beforeend",a)}e.addClass("note-toolbar-setting-error")}}}setFieldHelp(e,t){if(!t)return;let o=e.querySelector(".note-toolbar-setting-field-help");o==null||o.remove();let n=createDiv();n.addClass("note-toolbar-setting-field-help"),n.append(t),n&&e.insertAdjacentElement("beforeend",n)}removeFieldError(e){var t;if(e){let o=e.closest(".setting-item-control");(t=o==null?void 0:o.querySelector(".note-toolbar-setting-field-error"))==null||t.remove(),e==null||e.removeClass("note-toolbar-setting-error")}}renderPreview(e,t){t=t||this.getItemRowEl(e.uuid);let o=t.querySelector(".note-toolbar-setting-item-preview");o==null||o.empty();let n=createSpan();switch(o.setAttribute("data-item-type",e.linkAttr.type),e.linkAttr.type){case"break":(0,v.setTooltip)(o,r("setting.items.option-edit-item-type-tooltip",{itemType:e.linkAttr.type})),n.setText(r("setting.item.option-break")),o.append(n);break;case"separator":(0,v.setTooltip)(o,r("setting.items.option-edit-item-type-tooltip",{itemType:e.linkAttr.type})),n.setText(r("setting.item.option-separator")),o.append(n);break;case"group":let a=this.plugin.settingsManager.getToolbarById(e.link);(0,v.setTooltip)(o,r("setting.items.option-edit-item-group-tooltip",{toolbar:a?a.name:"",context:a?"":"none"})),n.appendChild(a?ve(this.plugin,a):Te(r("setting.item.option-item-group-error-invalid")));break;default:(0,v.setTooltip)(o,r("setting.items.option-edit-item-tooltip"));let p=createSpan();p.addClass("note-toolbar-setting-item-preview-icon"),e.icon&&(0,v.setIcon)(p,e.icon),o.appendChild(p),n.addClass("note-toolbar-setting-item-preview-label"),e.label?(n.setText(e.label),this.plugin.hasVars(e.label)&&n.addClass("note-toolbar-setting-item-preview-code")):e.tooltip?(n.setText(e.tooltip),n.addClass("note-toolbar-setting-item-preview-tooltip"),this.plugin.hasVars(e.tooltip)&&n.addClass("note-toolbar-setting-item-preview-code")):(n.setText(r("setting.items.option-item-empty-label")),n.addClass("note-toolbar-setting-item-preview-empty"));break}if(v.Platform.isMobile){if(!["break","separator"].includes(e.linkAttr.type)){let a=createDiv();a.addClass("note-toolbar-setting-item-preview-edit-mobile");let p=createSpan();p.addClass("note-toolbar-setting-icon-button-cta"),(0,v.setIcon)(p,"lucide-pencil"),a.appendChild(n),a.appendChild(p),o.appendChild(a)}}else o.appendChild(n);this.updateItemComponentStatus(e.linkAttr.type==="command"?e.linkAttr.commandId:e.link,li[e.linkAttr.type],o,e)}getIndexByUuid(e){let t=this.getItemListEls();return Array.prototype.findIndex.call(t,o=>o.getAttribute("data-item-uuid")===e)}getItemListEls(){return this.contentEl.querySelectorAll(".note-toolbar-sortablejs-list > div["+"data-item-uuid"+"]")}getItemRowEl(e){return this.contentEl.querySelector(".note-toolbar-sortablejs-list > div["+"data-item-uuid"+'="'+e+'"]')}};var $e=require("obsidian");var co=class extends $e.ItemView{constructor(e,t){super(t);this.plugin=e}getViewType(){return ce}getDisplayText(){return r("setting.whats-new.title")}getIcon(){return"file-text"}async onOpen(){let e=this.contentEl.createDiv();e.addClass("note-toolbar-setting-whatsnew-view");let t=e.createDiv();t.addClass("note-toolbar-setting-whatsnew-content","is-readable-line-width");let o=e.createDiv();o.addClass("note-toolbar-setting-whatsnew-cta","is-readable-line-width"),new $e.Setting(o).setName(ae("book-text",r("setting.whats-new.label-release-notes"))).setDesc(r("setting.whats-new.label-release-notes-description")).addButton(a=>{a.setButtonText(r("setting.whats-new.button-read")).setTooltip(r("setting.whats-new.button-read-tooltip")).setCta().onClick(()=>{window.open("https://github.com/chrisgurney/obsidian-note-toolbar/releases","_blank")})});let n=e.createDiv();n.addClass("note-toolbar-setting-whatsnew-cta","is-readable-line-width"),new $e.Setting(n).setName(ae("signpost",r("setting.whats-new.label-roadmap"))).setDesc(r("setting.whats-new.label-roadmap-description")).addButton(a=>{a.setButtonText(r("setting.whats-new.button-read")).setTooltip(r("setting.whats-new.button-read-tooltip")).setCta().onClick(()=>{window.open("https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Roadmap","_blank")})}),$e.MarkdownRenderer.render(this.plugin.app,ri("whats-new"),t,"/",this.plugin)}async onClose(){}};var oi=require("obsidian");var mo=class{constructor(i){this.plugin=i}async addToolbar(i){this.plugin.settings.toolbars.push(i),this.plugin.settings.toolbars.sort((e,t)=>e.name.localeCompare(t.name)),await this.save()}deleteToolbar(i){this.plugin.settings.toolbars=this.plugin.settings.toolbars.filter(e=>e.uuid!==i)}async duplicateToolbar(i){w("duplicateToolbar",i);let e={uuid:te(),customClasses:"",defaultStyles:JSON.parse(JSON.stringify(i.defaultStyles)),items:[],mobileStyles:JSON.parse(JSON.stringify(i.mobileStyles)),name:this.getUniqueToolbarName(i.name,!0),position:JSON.parse(JSON.stringify(i.position)),updated:new Date().toISOString()};return i.items.forEach(t=>{this.duplicateToolbarItem(e,t)}),w("duplicateToolbar: duplicated",e),await this.addToolbar(e),e.uuid}async duplicateToolbarItem(i,e,t=!1){w("duplicateToolbarItem",e);let o=JSON.parse(JSON.stringify(e));if(o.uuid=te(),w("duplicateToolbarItem: duplicated",o),t){let n=i.items.indexOf(e);n!==-1&&i.items.splice(n+1,0,o)}else i.items.push(o);return o.uuid}getMappedToolbar(i,e){var p,l;let t,o=this.plugin.settings.toolbarProp,n=!1,a=(p=i==null?void 0:i[o])!=null?p:null;if(a!==null&&(a.includes("none")&&(n=!0),n||(t=this.getToolbarFromProps(a))),!t&&!n){let u,c;for(let d=0;d<this.plugin.settings.folderMappings.length&&(u=this.plugin.settings.folderMappings[d],c=((l=e.parent)==null?void 0:l.path)==="/"?"/":e.path.toLowerCase(),!((["*"].includes(u.folder)||c.toLowerCase().startsWith(u.folder.toLowerCase()))&&(t=this.getToolbarById(u.toolbar),t)));d++);}return t}getToolbar(i){if(!i)return;let e=this.isUuid(i);return this.plugin.settings.toolbars.find(t=>e?t.uuid===i:t.name.toLowerCase()===i.toLowerCase())}isUuid(i){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(i)}getToolbarById(i){return i?this.plugin.settings.toolbars.find(e=>e.uuid===i):void 0}getToolbarByName(i){return i?this.plugin.settings.toolbars.find(e=>e.name.toLowerCase()===i.toLowerCase()):void 0}getToolbarFromProps(i){if(i)return typeof i=="string"?this.getToolbarByName(i):this.plugin.settings.toolbars.find(e=>i.some(t=>e.name.toLowerCase()===t.toLowerCase()))}getToolbarItemById(i){if(i)for(let e of this.plugin.settings.toolbars){let t=e.items.find(o=>o.uuid===i);if(t)return t}}getToolbarName(i){var t;let e=(t=this.plugin.settings.toolbars.find(o=>o.uuid===i))==null?void 0:t.name;return e||""}getToolbarPosition(i){var t,o,n,a;let e;return oi.Platform.isDesktop?e=(o=(t=i.position.desktop)==null?void 0:t.allViews)==null?void 0:o.position:oi.Platform.isMobile&&(e=(a=(n=i.position.mobile)==null?void 0:n.allViews)==null?void 0:a.position),e}getUniqueToolbarName(i,e){let t=i,o=1,n=this.plugin.settings.toolbars.map(a=>a.name);for(;n.includes(t);)t=`${i}`,t+=e?` ${r("setting.toolbars.duplicated-tbar-suffix")}`:"",t+=o>1?` ${o}`:"",o++;return t}async newToolbar(i=""){let e={uuid:te(),customClasses:"",defaultStyles:["border","even","sticky"],items:[],mobileStyles:[],name:i,position:{desktop:{allViews:{position:"props"}},mobile:{allViews:{position:"props"}},tablet:{allViews:{position:"props"}}},updated:new Date().toISOString()};return this.plugin.settings.toolbars.push(e),await this.save(),e}openToolbarSettings(i,e=null){let t=new re(this.plugin.app,this.plugin,e,i);t.setTitle(i.name?r("setting.title-edit-toolbar",{toolbar:i.name}):r("setting.title-edit-toolbar_none")),t.open()}async load(){var o,n,a,p,l,u,c,d;let i=await this.plugin.loadData();w("loadSettings: loaded settings: ",i),this.plugin.settings=Object.assign({},pi,i);let e=i==null?void 0:i.version,t;i&&e!==Me&&(w("loadSettings: versions do not match: data.json: ",e," !== latest: ",Me),w("running migrations..."),e||(t=202403181e-1,w("- starting migration: "+e+" -> "+t),(o=i.toolbars)==null||o.forEach((m,g)=>{m.styles&&(w("	- OLD SETTING: "+m.styles),w("		- SETTING: this.plugin.settings.toolbars[index].defaultStyles: "+this.plugin.settings.toolbars[g].defaultStyles),this.plugin.settings.toolbars[g].defaultStyles=m.styles,w("		- SET: "+this.plugin.settings.toolbars[g].defaultStyles),w("		- SETTING: this.plugin.settings.toolbars[index].mobileStyles = []"),this.plugin.settings.toolbars[g].mobileStyles=[],delete m.styles)}),e=t),e===202403181e-1&&(t=202403221e-1,w("- starting migration: "+e+" -> "+t),(n=i.toolbars)==null||n.forEach((m,g)=>{m.items.forEach((h,b)=>{h!=null&&h.urlAttr||(w("  - add urlAttr for: ",m.name,h.label),h.urlAttr={hasVars:!0,isUri:!0})})}),e=t),e===202403221e-1&&(t=202403301e-1,w("- starting migration: "+e+" -> "+t),(a=i.toolbars)==null||a.forEach((m,g)=>{m.items.forEach((h,b)=>{this.plugin.settings.toolbars[g].items[b].icon="",h.url&&(this.plugin.settings.toolbars[g].items[b].link=h.url,delete h.url),h.urlAttr&&(this.plugin.settings.toolbars[g].items[b].linkAttr={commandId:"",hasVars:h.urlAttr.hasVars,type:h.urlAttr.isUri?"uri":"file"},delete h.urlAttr)})}),e=t),e===202403301e-1&&(t=202404161e-1,w("- starting migration: "+e+" -> "+t),(p=i.toolbars)==null||p.forEach((m,g)=>{m.items.forEach((h,b)=>{this.plugin.settings.toolbars[g].items[b].contexts=[{platform:this.migrateItemVisPlatform(h.hideOnDesktop,h.hideOnMobile),view:"all"}],delete h.hideOnDesktop,delete h.hideOnMobile}),this.plugin.settings.toolbars[g].positions=[{position:"props",contexts:[{platform:"all",view:"all"}]}]}),e=t),e===202404161e-1&&(t=202404261e-1,w("- starting migration: "+e+" -> "+t),(l=i.toolbars)==null||l.forEach((m,g)=>{var h;this.plugin.settings.toolbars[g].positions&&((h=this.plugin.settings.toolbars[g].positions)==null||h.forEach((b,f)=>{var T;this.plugin.settings.toolbars[g].position={},b.contexts&&((T=b.contexts)==null||T.forEach((x,M)=>{if(b.position)switch(x.platform){case"desktop":this.plugin.settings.toolbars[g].position.desktop={allViews:{position:b.position}};break;case"mobile":this.plugin.settings.toolbars[g].position.mobile={allViews:{position:b.position}},this.plugin.settings.toolbars[g].position.tablet={allViews:{position:b.position}};break;case"all":this.plugin.settings.toolbars[g].position.desktop={allViews:{position:b.position}},this.plugin.settings.toolbars[g].position.mobile={allViews:{position:b.position}},this.plugin.settings.toolbars[g].position.tablet={allViews:{position:b.position}};break}}))}),delete this.plugin.settings.toolbars[g].positions),m.items.forEach((b,f)=>{var T;this.plugin.settings.toolbars[g].items[f].contexts&&((T=this.plugin.settings.toolbars[g].items[f].contexts)==null||T.forEach((x,M)=>{if(!this.plugin.settings.toolbars[g].items[f].visibility)switch(this.plugin.settings.toolbars[g].items[f].visibility={},x.platform){case"desktop":this.plugin.settings.toolbars[g].items[f].visibility.desktop={allViews:{components:["icon","label"]}};break;case"mobile":this.plugin.settings.toolbars[g].items[f].visibility.mobile={allViews:{components:["icon","label"]}},this.plugin.settings.toolbars[g].items[f].visibility.tablet={allViews:{components:["icon","label"]}};break;case"all":this.plugin.settings.toolbars[g].items[f].visibility.desktop={allViews:{components:["icon","label"]}},this.plugin.settings.toolbars[g].items[f].visibility.mobile={allViews:{components:["icon","label"]}},this.plugin.settings.toolbars[g].items[f].visibility.tablet={allViews:{components:["icon","label"]}};break;case"none":default:break}}),delete this.plugin.settings.toolbars[g].items[f].contexts)})}),e=t),e===202404261e-1&&(t=202407271e-1,w("- starting migration: "+e+" -> "+t),(u=i.toolbars)==null||u.forEach((m,g)=>{this.plugin.settings.toolbars[g].uuid=this.plugin.settings.toolbars[g].uuid?this.plugin.settings.toolbars[g].uuid:te()}),(c=i.toolbars)==null||c.forEach((m,g)=>{m.items.forEach((h,b)=>{if(this.plugin.settings.toolbars[g].items[b].uuid=this.plugin.settings.toolbars[g].items[b].uuid?this.plugin.settings.toolbars[g].items[b].uuid:te(),h.linkAttr.type==="menu"){let f=this.getToolbarByName(h.link);f&&(this.plugin.settings.toolbars[g].items[b].link=f==null?void 0:f.uuid)}})}),(d=i.folderMappings)==null||d.forEach((m,g)=>{let h=this.getToolbarByName(m.toolbar);h&&(this.plugin.settings.folderMappings[g].toolbar=h.uuid)}),e=t),this.plugin.settings.version=Me,w("updated settings:",this.plugin.settings),await this.save())}async save(){await this.plugin.saveData(this.plugin.settings),await this.plugin.removeActiveToolbar(),await this.plugin.renderToolbarForActiveFile(),w("SETTINGS SAVED: "+new Date().getTime())}migrateItemVisPlatform(i,e){return!i&&!e?"all":i&&e?"none":e?"desktop":i?"mobile":"all"}};var Yi=require("obsidian");var go=class extends Yi.SuggestModal{constructor(e,t){super(e.app);this.plugin=e,this.callback=t,this.commands=Object.values(e.app.commands.commands),this.setPlaceholder(r("setting.command-suggest-modal.placeholder")),this.setInstructions([{command:"\u2191\u2193",purpose:r("setting.command-suggest-modal.instruction-navigate")},{command:"\u21B5",purpose:r("setting.command-suggest-modal.instruction-use")},{command:"esc",purpose:r("setting.command-suggest-modal.instruction-dismiss")}])}getSuggestions(e){let t=[],o=e.toLowerCase();return this.inputEl.removeAttribute("data-command-id"),this.commands.forEach(n=>{n.name.toLowerCase().includes(o)&&t.push(n)}),t}renderSuggestion(e,t){t.setText(e.name)}async onChooseSuggestion(e,t){this.callback(e),this.close()}};var U=require("obsidian");var Xi=require("obsidian");var pt=class extends Xi.SuggestModal{constructor(e,t){super(e.app);this.modalEl.addClass("note-toolbar-setting-item-suggester-dialog"),this.plugin=e,this.activeFile=t,this.setPlaceholder(r("setting.toolbar-suggest-modal.placeholder")),this.setInstructions([{command:"\u2191\u2193",purpose:r("setting.toolbar-suggest-modal.instruction-navigate")},{command:"\u21B5",purpose:r("setting.toolbar-suggest-modal.instruction-use")},{command:"esc",purpose:r("setting.toolbar-suggest-modal.instruction-dismiss")}])}getSuggestions(e){let t=this.plugin.settings.toolbars,o=[],n=e.toLowerCase();return t.forEach(a=>{a.name.toLowerCase().includes(n)&&o.push(a)}),o}renderSuggestion(e,t){t.createSpan().setText(e.name)}async onChooseSuggestion(e,t){w("onChooseSuggestion: ",e,t),this.close(),this.plugin.commands.openItemSuggester(e.uuid)}};var ho=class extends U.SuggestModal{constructor(e,t,o){super(e.app);this.modalEl.addClass("note-toolbar-setting-item-suggester-dialog"),this.plugin=e,this.activeFile=t,this.toolbarId=o,this.setPlaceholder(r("setting.item-suggest-modal.placeholder"));let n=[];o&&n.push({command:r("setting.item-suggest-modal.key-back"),purpose:r("setting.item-suggest-modal.instruction-back")}),n.push({command:r("setting.item-suggest-modal.key-navigate"),purpose:r("setting.item-suggest-modal.instruction-navigate")},{command:r("setting.item-suggest-modal.key-use"),purpose:r("setting.item-suggest-modal.instruction-use")},{command:r("setting.item-suggest-modal.key-dismiss"),purpose:r("setting.item-suggest-modal.instruction-dismiss")}),this.setInstructions(n),U.Platform.isWin||U.Platform.isLinux?(this.scope.register(["Ctrl"],"Enter",a=>this.handleKeyboardSelection(a)),this.scope.register(["Ctrl","Alt"],"Enter",a=>this.handleKeyboardSelection(a))):(this.scope.register(["Meta"],"Enter",a=>this.handleKeyboardSelection(a)),this.scope.register(["Meta","Alt"],"Enter",a=>this.handleKeyboardSelection(a))),o&&(this.scope.register([],"ArrowLeft",a=>this.handleKeyboardSelection(a)),this.scope.register([],"Backspace",a=>this.handleKeyboardSelection(a)))}async getSuggestions(e){let t=[];if(this.toolbarId){let p=this.plugin.settingsManager.getToolbarById(this.toolbarId);t=p?[p]:[]}else t=this.plugin.settings.toolbars;let o=[],n=e.toLowerCase();for(let p of t)for(let l of p.items){let u=l.label||l.tooltip;u||(u=l.icon?l.link:"");let c=(l.label+l.tooltip+l.link).toLowerCase();if(u&&l.linkAttr.type!=="menu"&&c.includes(n)){let[d,m,g]=ht(l.visibility);(U.Platform.isMobile&&m||U.Platform.isDesktop&&d)&&!(this.plugin.hasVars(l.link)&&await this.plugin.replaceVars(l.link,this.activeFile)==="")&&!(this.plugin.hasVars(u)&&await this.plugin.replaceVars(u,this.activeFile)==="")&&o.push(l)}}let a=[];if(!this.toolbarId){a=Array.from(new Set(o.filter(l=>l.linkAttr.commandId!=="note-toolbar:open-item-suggester").map(l=>`${(l.label||l.tooltip).toLowerCase()}|${l.link}`))).map(l=>{let[u,c]=l.split("|");return o.find(d=>(d.label||d.tooltip).toLowerCase()===u&&d.link===c)});let p=[];a.sort((l,u)=>{let c=M=>M.replace(/[^\p{L}\p{N}]/gu,"").toLowerCase(),d=c(l.label||l.tooltip||l.link||""),m=c(u.label||u.tooltip||l.link||""),g=c((this.plugin.hasVars(l.label)?"":l.label)||(this.plugin.hasVars(l.tooltip)?"":l.tooltip)||(this.plugin.hasVars(l.link)?"":l.link)),h=c((this.plugin.hasVars(u.label)?"":u.label)||(this.plugin.hasVars(u.tooltip)?"":u.tooltip)||(this.plugin.hasVars(u.link)?"":u.link)),b=p.includes(d),f=p.includes(m);if(b&&!f)return-1;if(!b&&f)return 1;let T=g.includes(n),x=h.includes(n);return T&&!x?-1:!T&&x?1:d.localeCompare(m)})}return this.toolbarId?o:a}renderSuggestion(e,t){if(!e)return;if(t.addClass("note-toolbar-item-suggestion"),t.setAttribute("id",e.uuid),e.icon&&(0,U.getIcon)(e.icon)){let m=t.createSpan();(0,U.setIcon)(m,e.icon)}let o=t.createSpan(),n=e.label||e.tooltip,a=!1;n||(e.icon?(a=!0,n=e.link):n=""),o.addClass("note-toolbar-item-suggester-name");let p=o.createSpan(),l=o.createSpan(),u=n;switch(this.plugin.replaceVars(n,this.activeFile).then(d=>{p.setText(d)}),l.addClass("note-toolbar-item-suggester-type"),e.linkAttr.type){case"command":(0,U.setTooltip)(l,r("setting.item.option-command"));break;case"file":(0,U.setIcon)(l,"file"),(0,U.setTooltip)(l,r("setting.item.option-file"));break;case"uri":(0,U.setIcon)(l,"globe"),(0,U.setTooltip)(l,r("setting.item.option-uri"));break;case"dataview":case"js-engine":(0,U.setIcon)(l,"scroll"),(0,U.setTooltip)(l,"Script");break;case"templater-obsidian":(0,U.setIcon)(l,"templater-icon"),(0,U.setTooltip)(l,"Templater");break}let c=this.inputEl.value.toLowerCase();if(!u.toLowerCase().includes(c)){let d=e.label.toLowerCase().includes(c)?e.label:e.tooltip.toLowerCase().includes(c)?e.tooltip:e.link,m=p.createDiv();m.addClass("note-toolbar-item-suggester-note"),m.setText(d)}}async handleKeyboardSelection(e){switch(e.key){case"ArrowLeft":case"Backspace":if(this.toolbarId&&this.inputEl.value===""){this.close();let n=this.plugin.app.workspace.getActiveFile();new pt(this.plugin,n).open()}break;default:let t=this.modalEl.querySelector(".note-toolbar-item-suggestion.is-selected"),o=t!=null&&t.id?this.plugin.settingsManager.getToolbarItemById(t==null?void 0:t.id):void 0;o&&this.onChooseSuggestion(o,e);break}}async onChooseSuggestion(e,t){w("onChooseSuggestion: ",e,this.activeFile,t),this.close(),await this.plugin.handleItemLink(e,t)}};var fo=require("obsidian"),bo=class{constructor(i){this.plugin=i}async focus(){var t;w("focusCommand()");let i=this.plugin.getToolbarEl();switch(i==null?void 0:i.getAttribute("data-tbar-position")){case"fabr":case"fabl":let o=i==null?void 0:i.querySelector("button.cg-note-toolbar-fab");w("focusCommand: button: ",o),o.click();break;case"props":case"top":let n=this.plugin.getToolbarListEl();if(n){w("focusCommand: toolbar: ",n);let p=Array.from(n.children).filter(u=>{let c=u.querySelector("span")!==null,d=window.getComputedStyle(u).getPropertyValue("display")!=="none";return c&&d}),l=p[0]?p[0].querySelector("span"):null;w("focusCommand: focussed item: ",l),(t=p[0])==null||t.addClass("tbar-item-focused"),l==null||l.focus()}break;case"hidden":default:break}}async copyCommand(i=!1){new go(this.plugin,t=>{let o=i?`[]()<data data-ntb-command="${t.id}"/> <!-- ${t.name} -->`:`obsidian://note-toolbar?command=${t.id}`;navigator.clipboard.writeText(o),new fo.Notice(r("command.copy-command-notice"))}).open()}async openItemSuggester(i){let e=this.plugin.app.workspace.getActiveFile();new ho(this.plugin,e,i).open()}async openSettings(){let i=this.plugin.app.setting;i.open(),i.openTabById("note-toolbar")}async openToolbarSettings(){let i=this.plugin.getToolbarEl();i!=null&&i.id&&await this.openToolbarSettingsForId(i.id)}async openToolbarSettingsForId(i){let e=this.plugin.settingsManager.getToolbarById(i);if(e){let t=new re(this.plugin.app,this.plugin,null,e);t.setTitle(r("setting.title-edit-toolbar",{toolbar:e.name})),t.open()}}async openToolbarSuggester(){let i=this.plugin.app.workspace.getActiveFile();new pt(this.plugin,i).open()}async toggleProps(i){let e=this.plugin.getPropsEl(),t=this.plugin.app.workspace.getActiveViewOfType(fo.MarkdownView);if(w("togglePropsCommand: ","visibility: ",i,"props: ",e),e&&!t.editMode.sourceMode){let o=getComputedStyle(e).getPropertyValue("display");switch(i==="toggle"&&(o==="none"?i="show":i="hide"),i){case"show":e.style.display="var(--metadata-display-editing)",e.classList.contains("is-collapsed")&&e.querySelector(".metadata-properties-heading").click();break;case"hide":e.style.display="none";break;case"fold":e.classList.contains("is-collapsed")||e.querySelector(".metadata-properties-heading").click();break}}}};async function Zi(s,i,e){w("%c\u{1F7E1} Experimental: This function will be deleted.","color: #f00"),w("> plugin = ",s),w("> buttonId = ",i),e("< Hello back from Note Toolbar!")}var Qi=require("obsidian"),wo=class extends Qi.FuzzySuggestModal{constructor(e,t,o,n="",a){super(e);this.text_items=t;this.items=o;this.submitted=!1;this.setPlaceholder(n),a&&(this.limit=a)}getItems(){return this.items}onClose(){this.submitted||this.reject(new Error("Cancelled prompt"))}selectSuggestion(e,t){this.submitted=!0,this.close(),this.onChooseSuggestion(e,t)}getItemText(e){return this.text_items instanceof Function?this.text_items(e):this.text_items[this.items.indexOf(e)]||"Undefined Text Item"}onChooseItem(e){this.resolve(e)}async openAndGetValue(e,t){this.resolve=e,this.reject=t,this.open()}};var he=require("obsidian"),yo=class extends he.Modal{constructor(e,t,o,n){super(e);this.prompt_text=t;this.default_value=o;this.multi_line=n;this.submitted=!1}onOpen(){this.titleEl.setText(this.prompt_text),this.createForm()}onClose(){this.contentEl.empty(),this.submitted||this.reject(new Error("Cancelled prompt"))}createForm(){var o;let e=this.contentEl.createDiv();e.addClass("note-toolbar-comp-div");let t;if(this.multi_line){t=new he.TextAreaComponent(e);let n=this.contentEl.createDiv();n.addClass("note-toolbar-comp-button-div");let a=new he.ButtonComponent(n);a.buttonEl.addClass("mod-cta"),a.setButtonText("Submit").onClick(p=>{this.resolveAndClose(p)})}else t=new he.TextComponent(e);this.value=(o=this.default_value)!=null?o:"",t.inputEl.addClass("note-toolbar-comp-input"),t.setPlaceholder("Type text here"),t.setValue(this.value),t.onChange(n=>this.value=n),t.inputEl.focus(),t.inputEl.addEventListener("keydown",n=>this.enterCallback(n))}enterCallback(e){e.isComposing||e.keyCode===229||(this.multi_line?he.Platform.isDesktop&&e.key==="Enter"&&!e.shiftKey&&this.resolveAndClose(e):e.key==="Enter"&&this.resolveAndClose(e))}resolveAndClose(e){this.submitted=!0,e.preventDefault(),this.resolve(this.value),this.close()}async openAndGetValue(e,t){this.resolve=e,this.reject=t,this.open()}};var vo=class{constructor(i){this.plugin=i;this.noteToolbar=i}initialize(){return{testCallback:this.testCallback(),clipboard:this.generate_clipboard(),prompt:this.generate_prompt(),suggester:this.generate_suggester()}}testCallback(){return async(i,e)=>Zi(this.plugin,i,e)}generate_clipboard(){return async()=>await navigator.clipboard.readText()}generate_prompt(){return async(i,e,t=!1,o=!1)=>{let n=new yo(this.plugin.app,i,e,o),a=new Promise((p,l)=>n.openAndGetValue(p,l));try{return await a}catch(p){if(t)throw p;return null}}}generate_suggester(){return async(i,e,t=!1,o="",n)=>{let a=new wo(this.noteToolbar.app,i,e,o,n),p=new Promise((l,u)=>a.openAndGetValue(l,u));try{return await p}catch(l){if(t)throw l;return null}}}};var Ft=require("obsidian");var Dt=require("obsidian");async function en(s,i){return new Promise((e,t)=>{let o=new ii(s,i);o.onClose=()=>{e(o.isConfirmed)},o.open()})}var ii=class extends Dt.Modal{constructor(e,t){super(e.app);this.isConfirmed=!1;this.modalEl.addClass("note-toolbar-setting-dialog-phonefix"),this.plugin=e,this.callout=t}onOpen(){this.display()}async display(){let e=await Oe(this.plugin,this.callout,void 0,!0);new Promise(t=>{this.setTitle(r("import.title-import-confirmation",{toolbar:e.name})),this.modalEl.createEl("p").append(N(r("import.label-import-confirmation"),"Defining-where-to-show-toolbars"));let o=e?ve(this.plugin,e,void 0):"",n=this.modalEl.createDiv();n.addClass("note-toolbar-setting-import-confirm-preview"),n.createEl("p",{text:r("export.label-share-preview"),cls:"note-toolbar-setting-small-heading"}),n.createDiv().append(o);let a=fi(this.plugin,e),p=this.plugin.toolbarHasVars(e);if(a.length>0||p){let u=this.modalEl.createDiv();u.addClass("note-toolbar-setting-field-help");let c=u.createEl("ul");if(a.length>0){let m=c.createEl("li",{text:r("import.warning-invalid-plugins")}).createEl("ul");a.map((g,h)=>{let b=m.createEl("li"),f=Ut(g,g);f&&b.appendChild(f)})}p&&c.createEl("li",{text:N(r("import.warning-vars"),"Variables")})}this.modalEl.createDiv().addClass("note-toolbar-setting-spacer");let l=this.modalEl.createDiv();l.addClass("note-toolbar-setting-confirm-dialog-buttons"),new Dt.ButtonComponent(l).setButtonText(r("import.button-confirm")).setCta().onClick(()=>{this.isConfirmed=!0,this.close()}),new Dt.ButtonComponent(l).setButtonText(r("import.button-cancel")).onClick(()=>{this.close()})})}};var To=class{constructor(i){this.plugin=i}async handle(i){if(w("protocolHandler",i),i.commandid||i.commandId||i.command)this.plugin.handleLinkCommand(decodeURIComponent(i.commandid||i.commandId||i.command));else if(i.folder)this.plugin.handleLinkFolder(i.folder);else if(i.help)new Qe(this.plugin).open();else if(i.import){let e=decodeURIComponent(i.import);i.import.includes("[!note-toolbar")?en(this.plugin,e).then(t=>{t&&Oe(this.plugin,e,void 0,!0).then(o=>{this.plugin.settingsManager.addToolbar(o).then(n=>{this.plugin.commands.openToolbarSettingsForId(o.uuid)})})}):new Ft.Notice(r("import.error-invalid-uri-content"))}else if(i.menu){let e=this.plugin.app.workspace.getActiveFile(),t=this.plugin.settingsManager.getToolbarByName(i.menu);t=t||this.plugin.settingsManager.getToolbarById(i.menu),e&&(t?this.plugin.renderToolbarAsMenu(t,e).then(o=>{this.plugin.showMenuAtElement(o,this.plugin.lastCalloutLink)}):new Ft.Notice(r("notice.error-item-menu-not-found",{toolbar:i.menu})))}else if(i.toolbarsettings){let e;if(i.toolbarsettings.length>0)e=this.plugin.settingsManager.getToolbarByName(i.toolbarsettings),e||new Ft.Notice(r("notice.error-toolbar-not-found",{toolbar:i.toolbarsettings}));else{let t=this.plugin.getToolbarEl();e=t?this.plugin.settingsManager.getToolbarById(t==null?void 0:t.id):void 0}if(e){let t=new re(this.plugin.app,this.plugin,null,e);t.setTitle(r("setting.title-edit-toolbar",{toolbar:e.name})),t.open()}}else i.whatsnew?this.plugin.app.workspace.getLeaf(!0).setViewState({type:ce,active:!0}):new Ft.Notice(r("notice.error-uri-params-not-supported",{params:Object.keys(i).join(", ")}))}async getShareUri(i,e=!1){let t={includeIcons:!0,replaceVars:!1,useDataEls:!0,useIds:!1},o=await rt(this.plugin,i,t);return e?`obsidian://note-toolbar?import=${encodeURIComponent(o)}`:`https://chrisgurney.github.io/obsidian-note-toolbar/open.htm?uri=${encodeURIComponent(`obsidian://note-toolbar?import=${o}`)}`}};var Ge=require("obsidian");var Ve=class{constructor(i,e,t){this.noteToolbar=i,this.adapterApi=t,this.adapterPlugin=e}disable(){this.adapterApi=null,this.adapterPlugin=null,this.noteToolbar=null}getFunctions(){return new Map(this.FUNCTIONS.map(i=>[i.function.name,i]))}getSetting(i){var e;return(e=this.adapterPlugin.settings[i])!=null?e:""}};var Nt=class extends Ve{constructor(e){let t=e.app.plugins.plugins["dataview"];super(e,t,t.api);this.FUNCTIONS=[{function:this.query,label:r("adapter.dataview.query-function"),description:"",parameters:[{parameter:"expression",label:r("adapter.dataview.query-expr"),description:r("adapter.dataview.query-expr-description"),type:"textarea",required:!0},{parameter:"outputContainer",label:r("adapter.outputcontainer"),description:r("adapter.outputcontainer-description"),type:"text",required:!1}]},{function:this.exec,label:r("adapter.dataview.exec-function"),description:"",parameters:[{parameter:"sourceFile",label:r("adapter.dataview.exec-sourcefile"),description:r("adapter.dataview.exec-sourcefile-description"),type:"file",required:!0},{parameter:"sourceArgs",label:r("adapter.args"),description:r("adapter.args-description"),type:"args",required:!1},{parameter:"outputContainer",label:r("adapter.outputcontainer"),description:r("adapter.outputcontainer-description"),type:"text",required:!1}]},{function:this.evaluate,label:r("adapter.dataview.eval-function"),description:"",parameters:[{parameter:"expression",label:r("adapter.dataview.eval-expr"),description:r("adapter.dataview.eval-expr-description"),type:"textarea",required:!0},{parameter:"outputContainer",label:r("adapter.outputcontainer"),description:r("adapter.outputcontainer-description"),type:"text",required:!1}]},{function:this.executeJs,label:r("adapter.dataview.dvjs-function"),description:"",parameters:[{parameter:"expression",label:r("adapter.dataview.dvjs-expr"),description:r("adapter.dataview.dvjs-expr-description"),type:"textarea",required:!0},{parameter:"outputContainer",label:r("adapter.outputcontainer"),description:r("adapter.outputcontainer-description"),type:"text",required:!1}]}]}async use(e){var n;let t,o;if(e.outputContainer&&(o=(n=this.noteToolbar)==null?void 0:n.getOutputEl(e.outputContainer),!o)){V(r("adapter.error.callout-not-found",{id:e.outputContainer}));return}switch(e.pluginFunction){case"evaluate":t=e.expression?await this.evaluate(e.expression,o):r("adapter.dataview.eval-expr-error-required");break;case"evaluateInline":t=e.expression?await this.evaluate(e.expression,o,!1):r("adapter.dataview.eval-expr-error-required");break;case"exec":t=e.sourceFile?await this.exec(e.sourceFile,e.sourceArgs,o):r("adapter.dataview.exec-error-required");break;case"executeJs":t=e.expression?await this.executeJs(e.expression,o):r("adapter.dataview.dvjs-expr-error-required");break;case"query":t=e.expression?await this.query(e.expression,o):r("adapter.dataview.query-expr-error-required");break;case"":break;default:t=r("adapter.error.function-invalid",{function:e.pluginFunction});break}return t}async evaluate(e,t,o=!0){var u;let n="",a=(u=this.noteToolbar)==null?void 0:u.app.workspace.getActiveFile(),p=a==null?void 0:a.path,l=new Ge.Component;l.load();try{if(this.adapterApi){let c=await this.adapterApi.evaluateInline(e,a==null?void 0:a.path);if(t)t.empty(),await this.adapterApi.renderValue(c.value,t,l,p);else{if(c.error)throw c.error;n=c.value}}}catch(c){o?(V(r("adapter.error.expr-failed",{expression:e}),c,t),n=r("adapter.dataview.error-general",{error:c})):n=e}finally{l.unload()}return n}async exec(e,t,o){var c,d,m;if(!e)return;let n;try{n=t?Ze(t):{}}catch(g){V(r("adapter.error.args-parsing",{filename:e}),g,o);return}o=o||createSpan();let a=(c=this.noteToolbar)==null?void 0:c.app.workspace.getActiveFile();if(!a){V(r("adapter.error.exec-note-not-open"));return}let p=a.path,l=(d=this.noteToolbar)==null?void 0:d.app.metadataCache.getFirstLinkpathDest(e,p);if(!l){V(r("adapter.error.file-not-found",{filename:e}));return}let u=await((m=this.noteToolbar)==null?void 0:m.app.vault.read(l));if(u){u.includes("await")&&(u="(async () => { "+u+" })()"),u+=`
//# sourceURL=${l.path}`;let g=new Function("dv","input",u),h=new Ge.Component;h.load();try{o.empty();let b=this.adapterPlugin.localApi(a.path,this.noteToolbar,o),f=await Promise.resolve(g(b,n));f&&this.noteToolbar&&await this.adapterApi.renderValue(this.noteToolbar.app,f,o,p,h,this.adapterApi.settings,!0)}catch(b){V(r("adapter.error.exec-failed",{filename:l.path}),b,o)}finally{h.unload()}}}async executeJs(e,t){var l,u,c;let o="",n=t||createSpan(),a=(l=this.noteToolbar)==null?void 0:l.app.workspace.getActiveFile(),p=new Ge.Component;p.load();try{if(this.adapterApi&&(w("executeJs() ",e),await this.adapterApi.executeJs(e,n,p,a==null?void 0:a.path),w("executeJs() result:",n),!t)){let d=n.querySelector(".dataview-error");if(d)throw new Error((u=d.textContent)!=null?u:void 0);n.children.length===0&&((c=n.textContent)==null?void 0:c.trim())===""?(w("executeJs() no result"),o=""):o=n.textContent||""}}catch(d){V(r("adapter.error.expr-failed",{expression:e}),d,t)}finally{p.unload()}return o}async query(e,t){var p;let o="",n=(p=this.noteToolbar)==null?void 0:p.app.workspace.getActiveFile();if(!n)return V(r("adapter.error.query-note-not-open")),r("adapter.error.query-note-not-open");let a=new Ge.Component;a.load();try{if(this.adapterApi){w("query() "+e);let l=await this.adapterApi.queryMarkdown(e,n,this.adapterApi.settings);if(w("query() result: ",l),t)t.empty(),this.noteToolbar&&Ge.MarkdownRenderer.render(this.noteToolbar.app,l.successful?l.value:l.error,t,n.path,a);else{if(l.error)throw l.error;o=l.value}}}catch(l){V(r("adapter.error.query-failed",{expression:e}),l,t),o=r("adapter.dataview.error-general",{error:l})}finally{a.unload()}return o}};var Lt=class extends Ve{constructor(e){let t=e.app.plugins.plugins["templater-obsidian"];super(e,t,t.templater);this.FUNCTIONS=[{function:this.appendTemplate,label:r("adapter.templater.append-function"),description:"",parameters:[{parameter:"sourceFile",label:r("adapter.templater.append-sourcefile"),description:r("adapter.templater.append-sourcefile-description"),type:"file",required:!0}]},{function:this.createFrom,label:r("adapter.templater.create-function"),description:"",parameters:[{parameter:"sourceFile",label:r("adapter.templater.create-sourcefile"),description:r("adapter.templater.create-sourcefile-description"),type:"file",required:!0},{parameter:"outputFile",label:r("adapter.templater.create-outputfile"),description:r("adapter.templater.create-outputfile-description"),type:"text",required:!1},{parameter:"postCommand",label:r("adapter.postCommand"),description:r("adapter.postCommand-description"),type:"command",required:!1}]},{function:this.parseTemplate,label:r("adapter.templater.eval-function"),description:"",parameters:[{parameter:"expression",label:r("adapter.templater.eval-expr"),description:r("adapter.templater.eval-expr-description"),type:"textarea",required:!0}]},{function:this.parseTemplateFile,label:r("adapter.templater.exec-function"),description:"",parameters:[{parameter:"sourceFile",label:r("adapter.templater.exec-sourcefile"),description:r("adapter.templater.exec-sourcefile-description"),type:"file",required:!0}]}]}async use(e){var n,a;let t,o;if(e.outputContainer&&(o=(n=this.noteToolbar)==null?void 0:n.getOutputEl(e.outputContainer),!o)){V(r("adapter.error.callout-not-found",{id:e.outputContainer}));return}switch(e.pluginFunction){case"appendTemplate":t=e.sourceFile?await this.appendTemplate(e.sourceFile):r("adapter.templater.append-sourcefile-error-required");break;case"createFrom":t=e.sourceFile?await this.createFrom(e.sourceFile,e.outputFile):r("adapter.templater.create-sourcefile-error-required");break;case"parseTemplate":t=e.expression?await this.parseTemplate(e.expression):r("adapter.templater.eval-expr-error-required");break;case"parseTemplateInline":t=e.expression?await this.parseTemplate(e.expression,!1):r("adapter.templater.eval-expr-error-required");break;case"parseTemplateFile":t=e.sourceFile?await this.parseTemplateFile(e.sourceFile):r("adapter.templater.exec-sourcefile-error-required");break;case"":break;default:t=r("adapter.error.function-invalid",{function:e.pluginFunction});break}if(e.postCommand)try{await((a=this.noteToolbar)==null?void 0:a.app.commands.executeCommandById(e.postCommand))}catch(p){throw new Error(p)}return t}async appendTemplate(e){var t;if(this.adapterApi){let o=(t=this.noteToolbar)==null?void 0:t.app.vault.getFileByPath(e);try{if(o)await this.adapterApi.append_template_to_active_file(o);else throw new Error(r("adapter.error.file-not-found",{filename:e}))}catch(n){V(n)}}}async createFrom(e,t){var l,u,c,d;if(t&&((l=this.noteToolbar)!=null&&l.hasVars(t))){let m=(u=this.noteToolbar)==null?void 0:u.app.workspace.getActiveFile();t=await((c=this.noteToolbar)==null?void 0:c.replaceVars(t,m,!1))}let{parsedFolder:o,parsedFilename:n}=this.parseOutputFile(t),a=t?o:"",p=t?n:"";if(this.adapterApi){let m=(d=this.noteToolbar)==null?void 0:d.app.vault.getFileByPath(e);try{if(m)await this.adapterApi.create_new_note_from_template(m,a,p);else throw new Error(r("adapter.error.file-not-found",{filename:e}))}catch(g){V(g)}}}parseOutputFile(e){if(!e)return{parsedFolder:"",parsedFilename:""};let t=e.replace(/\\/g,"/"),o=t.lastIndexOf("/"),n=t.slice(0,o+1),a=t.slice(o+1);return{parsedFolder:n,parsedFilename:a}}async parseTemplate(e,t=!0){var p;let o="",n=(p=this.noteToolbar)==null?void 0:p.app.workspace.getActiveFile();if(!n)return V(r("adapter.error.expr-note-not-open")),r("adapter.error.expr-note-not-open");let a=e.trim();a.startsWith("<%")||(a="<%"+a),a.endsWith("%>")||(a+="%>");try{let l={target_file:n,run_mode:"DynamicProcessor",active_file:n};this.adapterApi&&(o=await this.adapterApi.parse_template(l,a),o=o==="undefined"?"":o)}catch(l){t?V(l):o=e}return o}async parseTemplateFile(e){var a,p;let t="",o=(a=this.noteToolbar)==null?void 0:a.app.workspace.getActiveFile();if(!o)return V(r("adapter.error.function-note-not-open")),r("adapter.error.function-note-not-open");let n=(p=this.noteToolbar)==null?void 0:p.app.vault.getFileByPath(e);try{if(n){let l={template_file:n,target_file:o,run_mode:"DynamicProcessor",active_file:o};this.adapterApi&&(t=await this.adapterApi.read_and_parse_template(l),w("parseTemplateFile() result:",t))}else throw new Error(r("adapter.error.file-not-found",{filename:e}))}catch(l){V(r("adapter.error.exec-failed",{filename:e}),l)}return t}};var tn=require("obsidian");var Pt=class extends Ve{constructor(e){let t=e.app.plugins.plugins["js-engine"];super(e,t,t.api);this.FUNCTIONS=[{function:this.exec,label:r("adapter.js-engine.exec-function"),description:"",parameters:[{parameter:"sourceFile",label:r("adapter.js-engine.exec-sourcefile"),description:r("adapter.js-engine.exec-sourcefile-description"),type:"file",required:!0},{parameter:"outputContainer",label:r("adapter.outputcontainer"),description:N(r("adapter.outputcontainer-description"),"/Executing-scripts#output-callout"),type:"text",required:!1}]},{function:this.importExec,label:r("adapter.js-engine.importexec-function"),description:"",parameters:[{parameter:"sourceFile",label:r("adapter.js-engine.importexec-sourcefile"),description:r("adapter.js-engine.importexec-sourcefile-description"),type:"file",required:!0},{parameter:"sourceFunction",label:r("adapter.js-engine.importexec-sourcefunction"),description:r("adapter.js-engine.importexec-sourcefunction-description"),type:"text",required:!1},{parameter:"sourceArgs",label:r("adapter.args"),description:r("adapter.args-description"),type:"args",required:!1}]}]}async use(e){var n;let t,o;if(e.outputContainer&&(o=(n=this.noteToolbar)==null?void 0:n.getOutputEl(e.outputContainer),!o)){V(r("adapter.error.callout-not-found",{id:e.outputContainer}));return}switch(e.pluginFunction){case"exec":t=e.sourceFile?await this.exec(e.sourceFile,o):r("adapter.js-engine.exec-sourcefile-error-required");break;case"importExec":t=e.sourceFile?await this.importExec(e.sourceFile,e.sourceFunction,e.sourceArgs):r("adapter.js-engine.importexec-sourcefile-error-required");break;case"":break;default:t=r("adapter.error.function-invalid",{function:e.pluginFunction});break}return t}async importExec(e,t,o){let n="",a;try{a=o?Ze(o):{}}catch(p){return V(r("adapter.error.args-parsing",{filename:e}),p),r("adapter.error.args-parsing-error",{filename:e,error:p})}if(this.adapterApi){let p=await this.adapterApi.importJs(e);if(t)if(p[t]&&typeof p[t]=="function")try{a?n=p[t](this.adapterApi,a):n=p[t](this.adapterApi),w("importExec() result:",n)}catch(l){V(r("adapter.error.exec-failed",{filename:e}),l)}else V(r("adapter.error.function-not-found",{function:t}))}return n}async exec(e,t){var l;let o="",n=t||createSpan(),a=(l=this.noteToolbar)==null?void 0:l.app.workspace.getActiveFile();if(!a)return V(r("adapter.error.exec-note-not-open")),r("adapter.error.exec-note-not-open");let p=new tn.Component;p.load();try{t==null||t.empty();let u=a==null?void 0:a.path,c=await this.adapterApi.internal.executeFile(e,{container:n,component:this.noteToolbar});w("exec() result:",c.result),this.noteToolbar&&(t?this.adapterApi.internal.createRenderer(n,u,this.noteToolbar).render(c.result):o=c.result||"")}catch(u){V(r("adapter.error.exec-failed",{filename:e}),u,t)}finally{p.unload()}return o}};var So=class extends S.Plugin{constructor(){super(...arguments);this.activeViewIds=[];this.lastCalloutLink=null;this.hasPlugin={dataview:!1,"js-engine":!1,"make-md":!1,"templater-obsidian":!1};this.fileOpenListener=e=>{var t;e!=null&&(w("===== FILE-OPEN ===== ",e.name),this.checkAndRenderToolbar(e,(t=this.app.metadataCache.getFileCache(e))==null?void 0:t.frontmatter))};this.fileRenameListener=(e,t)=>{w("fileRenameListener:",e,t),this.settings.toolbars.forEach(o=>{o.items.forEach(n=>{var a,p;n.link===t&&(w("fileRenameListener: changing",n.link,"to",e.path),n.link=e.path),((a=n.scriptConfig)==null?void 0:a.sourceFile)===t&&(w("fileRenameListener: changing",(p=n.scriptConfig)==null?void 0:p.sourceFile,"to",e.path),n.scriptConfig.sourceFile=e.path)})})};this.layoutChangeListener=()=>{let e=this.app.workspace.getActiveViewOfType(S.MarkdownView),t=e==null?void 0:e.getMode();if(e!=null&&e.containerEl.closest("popover"))return;let o=Xe(e);if(w("===== LAYOUT-CHANGE ===== ",o,e,t),o&&this.activeViewIds.contains(o))return;let n=this.lastFileOpenedOnLayoutChange!==(e==null?void 0:e.file),a=this.lastViewModeOnLayoutChange!==t;if(n||a)this.lastFileOpenedOnLayoutChange=n?e==null?void 0:e.file:this.lastFileOpenedOnLayoutChange,this.lastViewModeOnLayoutChange=a?t:this.lastViewModeOnLayoutChange;else return;switch(t){case"source":case"preview":let p=this.getToolbarEl(),l=p==null?void 0:p.getAttribute("data-tbar-position");this.app.workspace.onLayoutReady((0,S.debounce)(()=>{this.updateActiveViewIds(),this.renderToolbarForActiveFile()},t==="preview"?200:0));break;default:return}};this.leafChangeListener=e=>{let t=!1,o=this.app.workspace.getActiveViewOfType(S.MarkdownView),n=Xe(o);w("===== LEAF-CHANGE ===== ",n),!(n&&this.activeViewIds.contains(n))&&(this.updateActiveViewIds(),o&&(t=["source","preview"].includes(o.getMode())),t&&this.renderToolbarForActiveFile())};this.metadataCacheListener=(e,t,o)=>{var p,l;w("===== METADATA-CHANGE ===== ",e.name);let n=this.app.workspace.getActiveFile();if(n===e){let u=this.app.workspace.getActiveViewOfType(S.MarkdownView);this.checkAndRenderToolbar(e,o.frontmatter)}let a=(l=(p=o.frontmatter)==null?void 0:p[this.settings.toolbarProp])!=null?l:[];if(a.length>0){let u=!!a.includes("none");if(this.lastFileOpenedOnCacheChange!==n&&(this.lastNtbProperty=void 0),a[0]!==this.lastNtbProperty&&!(u?void 0:this.settingsManager.getToolbarFromProps(a))&&!u){let d=new S.Notice(r("notice.warning-no-matching-toolbar",{toolbar:a[0]}),7500);this.registerDomEvent(d.noticeEl,"click",async()=>{let m=await this.settingsManager.newToolbar(a[0]);this.settingsManager.openToolbarSettings(m)})}}this.lastNtbProperty=a[0],this.lastFileOpenedOnCacheChange=n};this.editorMenuHandler=(e,t,o)=>{let n=t.getSelection().trim(),a=t.getLine(t.getCursor().line).trim();(n.includes("[!note-toolbar")||a.includes("[!note-toolbar"))&&e.addItem(p=>{p.setIcon("info").setTitle(r("import.option-help")).onClick(async()=>{window.open("https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Note-Toolbar-Callouts","_blank")})}),n.includes("[!note-toolbar")&&e.addItem(p=>{p.setIcon("import").setTitle(r("import.option-create")).onClick(async()=>{let l=await Oe(this,n);await this.settingsManager.addToolbar(l),await this.commands.openToolbarSettingsForId(l.uuid)})})};this.fileMenuHandler=(e,t)=>{let o=this.app.workspace.getActiveFile();if(o&&t!==o){let n=this.app.metadataCache.getFileCache(t);if(n){let a=this.settingsManager.getMappedToolbar(n.frontmatter,t);a&&(S.Platform.isMobile?a&&this.renderMenuItems(e,a,t,1):e.addItem(p=>{p.setIcon(this.settings.icon).setTitle(a?a.name:"");let l=p.setSubmenu();a&&this.renderMenuItems(l,a,t)}))}}}}async onload(){this.settingsManager=new mo(this),await this.settingsManager.load(),this.app.workspace.onLayoutReady(()=>{(0,S.addIcon)("note-toolbar-empty",'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" class="svg-icon note-toolbar-empty\u201D></svg>'),(0,S.addIcon)("note-toolbar-none",'<svg xmlns="http://www.w3.org/2000/svg" width="0" height="24" viewBox="0 0 0 24" fill="none" class="svg-icon note-toolbar-none"></svg>'),(0,S.addIcon)("note-toolbar-separator",'<path d="M23.4444 35.417H13.7222C8.35279 35.417 4 41.6988 4 44V55.5C4 57.8012 8.35279 64.5837 13.7222 64.5837H23.4444C28.8139 64.5837 33.1667 57.8012 33.1667 55.5L33.1667 44C33.1667 41.6988 28.8139 35.417 23.4444 35.417Z" fill="none" stroke="currentColor" stroke-width="7" stroke-linecap="round" stroke-linejoin="round"/><path d="M86.4444 35.417H76.7222C71.3528 35.417 67 41.6988 67 44V55.5C67 57.8012 71.3528 64.5837 76.7222 64.5837H86.4444C91.8139 64.5837 96.1667 57.8012 96.1667 55.5L96.1667 44C96.1667 41.6988 91.8139 35.417 86.4444 35.417Z" stroke="currentColor" stroke-width="7" fill="none" stroke-linecap="round" stroke-linejoin="round"/><path d="M49.8333 8.33301V91.6663" stroke="currentColor" stroke-width="7" stroke-linecap="round" stroke-linejoin="round"/>');let e=this.app.workspace.getActiveViewOfType(S.MarkdownView);this.updateActiveViewIds(),this.renderToolbarForActiveFile(),S.Platform.isPhone&&this.addRibbonIcon(this.settings.icon,r("plugin.name"),t=>this.ribbonMenuHandler(t)),this.addSettingTab(new po(this.app,this)),this.registerEvent(this.app.workspace.on("active-leaf-change",this.leafChangeListener)),this.registerEvent(this.app.metadataCache.on("changed",this.metadataCacheListener)),this.registerEvent(this.app.workspace.on("layout-change",this.layoutChangeListener)),this.registerEvent(this.app.vault.on("rename",this.fileRenameListener)),this.registerEvent(this.app.workspace.on("window-open",t=>{this.registerDomEvent(t.doc,"click",o=>{this.calloutLinkHandler(o)})})),this.registerDomEvent(activeDocument,"click",t=>{t.target.matches(".cg-note-toolbar-container")||this.removeFocusStyle(),this.calloutLinkHandler(t)}),this.registerEvent(this.app.workspace.on("file-menu",this.fileMenuHandler)),this.registerEvent(this.app.workspace.on("editor-menu",this.editorMenuHandler)),this.commands=new bo(this),this.addCommand({id:"copy-command-uri",name:r("command.name-copy-command-uri"),callback:async()=>this.commands.copyCommand(!1)}),this.addCommand({id:"copy-command-as-data-element",name:r("command.name-copy-command-as-data-element"),callback:async()=>this.commands.copyCommand(!0)}),this.addCommand({id:"focus",name:r("command.name-focus"),callback:async()=>this.commands.focus()}),this.addCommand({id:"open-item-suggester",name:r("command.name-item-suggester"),callback:async()=>this.commands.openItemSuggester()}),this.addCommand({id:"open-toolbar-suggester",name:r("command.name-toolbar-suggester"),callback:async()=>this.commands.openToolbarSuggester()}),this.addCommand({id:"open-settings",name:r("command.name-settings"),callback:async()=>this.commands.openSettings()}),this.addCommand({id:"open-toolbar-settings",name:r("command.name-toolbar-settings"),callback:async()=>this.commands.openToolbarSettings()}),this.addCommand({id:"show-properties",name:r("command.name-show-properties"),callback:async()=>this.commands.toggleProps("show")}),this.addCommand({id:"hide-properties",name:r("command.name-hide-properties"),callback:async()=>this.commands.toggleProps("hide")}),this.addCommand({id:"fold-properties",name:r("command.name-fold-properties"),callback:async()=>this.commands.toggleProps("fold")}),this.addCommand({id:"toggle-properties",name:r("command.name-toggle-properties"),callback:async()=>this.commands.toggleProps("toggle")}),this.protocolManager=new To(this),this.registerObsidianProtocolHandler("note-toolbar",async t=>this.protocolManager.handle(t)),this.app.workspace.trigger("parse-style-settings"),this.api=new vo(this).initialize(),(window.NoteToolbar=this.api)&&this.register(()=>delete window.NoteToolbar),this.registerView(ce,t=>new co(this,t)),this.checkPlugins(),this.updateAdapters()})}async onunload(){this.removeAllToolbars(),w("UNLOADED")}async onExternalSettingsChange(){w("onExternalSettingsChange()")}updateActiveViewIds(){let e=this.app.workspace.getActiveViewOfType(S.MarkdownView),t=Xe(e);t&&!(t in this.activeViewIds)&&this.activeViewIds.push(t);let o=[];this.app.workspace.iterateAllLeaves(n=>{if(n.view instanceof S.MarkdownView){let a=Xe(n.view);a&&o.push(a)}}),this.activeViewIds=this.activeViewIds.filter(n=>o.includes(n))}async checkAndRenderToolbar(e,t){let o=this.settingsManager.getMappedToolbar(t,e),n=this.removeToolbarIfNeeded(o);w("checkAndRenderToolbar()",o,n),o&&(n&&await this.renderToolbar(o,e),await this.updateToolbar(o,e))}async renderToolbar(e,t){var u,c,d,m,g,h;let o;S.Platform.isMobile?o=(d=(c=(u=e.position.mobile)==null?void 0:u.allViews)==null?void 0:c.position)!=null?d:"props":o=(h=(g=(m=e.position.desktop)==null?void 0:m.allViews)==null?void 0:g.position)!=null?h:"props";let n=this.app.workspace.getActiveViewOfType(S.MarkdownView),a=n instanceof S.MarkdownView?n.getMode():"",p,l=activeDocument.createElement("div");switch(l.addClass("cg-note-toolbar-container"),e.uuid&&(l.id=e.uuid),l.setAttrs({"data-name":e.name,"data-tbar-position":o,"data-updated":e.updated,"data-view-mode":a,"data-csstheme":this.app.vault.getConfig("cssTheme")}),o){case"fabl":case"fabr":p=await this.renderToolbarAsFab(o),o==="fabl"&&p.setAttribute("data-fab-position","left"),l.append(p),this.registerDomEvent(l,"click",f=>this.toolbarFabHandler(f,p)),this.registerDomEvent(p,"contextmenu",f=>this.toolbarContextMenuHandler(f));break;case"props":case"top":p=await this.renderToolbarAsCallout(e,t);let b=activeDocument.createElement("div");b.append(p),l.addClasses(["cm-embed-block","cm-callout","cg-note-toolbar-bar-container"]),l.append(b),this.registerDomEvent(l,"contextmenu",f=>this.toolbarContextMenuHandler(f)),this.registerDomEvent(l,"keydown",f=>this.toolbarKeyboardHandler(f));break;case"hidden":default:break}switch(o){case"fabl":case"fabr":n==null||n.containerEl.appendChild(l);break;case"top":l.addClass("cg-note-toolbar-position-top");let b=n==null?void 0:n.containerEl.querySelector(".view-header");b?b.insertAdjacentElement("afterend",l):w("\u{1F6D1} renderToolbarFromSettings: Unable to find .view-header to insert toolbar");break;case"hidden":case"props":default:let f=this.getPropsEl();f||w("\u{1F6D1} renderToolbarFromSettings: Unable to find .metadata-container to insert toolbar"),f==null||f.insertAdjacentElement("afterend",l);break}w("\u2B50\uFE0F Rendered Toolbar in:",Xe(n))}async renderToolbarAsCallout(e,t){let o=activeDocument.createElement("ul");o.setAttribute("role","menu");let n=await this.renderToolbarLItems(e,t);o.append(...n);let a=activeDocument.createElement("div");if(e.items.length>0){let p=activeDocument.createElement("div");p.className="callout-content",p.append(o),a.addClasses(["callout","cg-note-toolbar-callout"]),e.customClasses&&a.addClasses([...e.customClasses.split(" ")]),a.setAttribute("data-callout","note-toolbar"),a.setAttribute("data-callout-metadata",[...e.defaultStyles,...e.mobileStyles].join("-")),a.append(p)}return a}async renderToolbarLItems(e,t,o=0){if(o>=2)return[];let n=[],a=await this.resolveLabels(e,t);for(let p=0;p<e.items.length;p++){let l=e.items[p];if(l.label===""&&l.icon===""&&!["break","group","separator"].includes(l.linkAttr.type))continue;let u,[c,d,m]=ht(l.visibility);switch(l.linkAttr.type){case"break":case"separator":u=activeDocument.createElement("data"),u.setAttribute(l.linkAttr.type==="break"?"data-break":"data-sep",""),u.setAttribute("role","separator");break;case"group":let g=this.settingsManager.getToolbarById(l.link);if(g&&(S.Platform.isMobile&&d||S.Platform.isDesktop&&c)){let E=await this.renderToolbarLItems(g,t,o+1);n.push(...E)}break;default:u=activeDocument.createElement("span"),l.uuid&&(u.id=l.uuid),u.className="external-link",u.setAttrs({href:l.link,role:"link",rel:"noopener"}),u.tabIndex=0,Object.entries(l.linkAttr).forEach(([E,D])=>{u==null||u.setAttribute(`data-toolbar-link-attr-${E}`,D)}),l.tooltip&&(0,S.setTooltip)(u,l.tooltip,{placement:"top"}),this.registerDomEvent(u,"click",E=>this.toolbarClickHandler(E)),this.registerDomEvent(u,"auxclick",E=>this.toolbarClickHandler(E));let[h,b,f,T,x,M]=mi(l.visibility);if(l.label)if(l.icon){let E=u.createSpan();this.setComponentDisplayClass(E,h,f),(0,S.setIcon)(E,l.icon);let D=u.createSpan();this.setComponentDisplayClass(D,b,T),D.innerText=a[p],D.addClass("cg-note-toolbar-item-label")}else this.setComponentDisplayClass(u,b,T),u.innerText=a[p],u.addClass("cg-note-toolbar-item-label");else this.setComponentDisplayClass(u,h,f),(0,S.setIcon)(u,l.icon);break}if(u){let g=activeDocument.createElement("li");d||g.addClass("hide-on-mobile"),c||g.addClass("hide-on-desktop"),g.append(u),n.push(g)}}return n}async resolveLabels(e,t){let o=[];for(let n of e.items){let a=await this.replaceVars(n.label,t);o.push(a)}return o}async renderToolbarAsFab(e){let t=activeDocument.createElement("div");t.addClass("cg-note-toolbar-fab-container"),t.setAttrs({role:"group","data-tbar-position":e});let o=activeDocument.createElement("button");return o.addClass("cg-note-toolbar-fab"),o.setAttribute("aria-label",r("toolbar.button-floating-tooltip")),(0,S.setIcon)(o,this.settings.icon),t.append(o),t}async renderToolbarAsMenu(e,t,o=!1){let n=new S.Menu;await this.renderMenuItems(n,e,t),o&&(n.addSeparator(),n.addItem(p=>{p.setTitle(r("toolbar.menu-edit-toolbar",{toolbar:e.name})).setIcon("lucide-pen-box").onClick(l=>{let u=new re(this.app,this,null,e);u.setTitle(r("setting.title-edit-toolbar",{toolbar:e.name})),u.open()})})),n.dom.addClass("note-toolbar-menu");let a=this.getCurrentToolbar();return a&&a.customClasses&&n.dom.addClasses([...a.customClasses.split(" ")]),n}async renderMenuItems(e,t,o,n=0){if(!(n>=2))for(let a of t.items){let[p,l,u]=ht(a.visibility);if(S.Platform.isMobile&&l||S.Platform.isDesktop&&p){let c=a.label?this.hasVars(a.label)?await this.replaceVars(a.label,o):a.label:this.hasVars(a.tooltip)?await this.replaceVars(a.tooltip,o):a.tooltip;switch(a.linkAttr.type){case"break":case"separator":e.addSeparator();break;case"group":let d=this.settingsManager.getToolbarById(a.link);d&&await this.renderMenuItems(e,d,o,n+1);break;case"menu":if(!S.Platform.isMobile){if(n>=1)break;e.addItem(m=>{m.setIcon(a.icon&&(0,S.getIcon)(a.icon)?a.icon:"note-toolbar-empty").setTitle(c);let g=m.setSubmenu();g.dom.addClass("note-toolbar-menu");let h=this.getCurrentToolbar();h&&h.customClasses&&g.dom.addClasses([...h.customClasses.split(" ")]);let b=this.settingsManager.getToolbarById(a.link);b&&this.renderMenuItems(g,b,o,n+1)});break}default:if(this.hasVars(a.link)&&await this.replaceVars(a.link,o)==="")break;e.addItem(m=>{m.setIcon(a.icon&&(0,S.getIcon)(a.icon)?a.icon:"note-toolbar-empty").setTitle(c).onClick(async g=>{w(g,a.link,a.linkAttr,a.contexts),await this.handleItemLink(a,g,o),a.linkAttr.type!=="menu"&&(await this.removeFocusStyle(),await this.app.commands.executeCommandById("editor:focus"))})});break}}}}async renderToolbarForActiveFile(){var t;let e=this.app.workspace.getActiveFile();if(e){let o=e?(t=this.app.metadataCache.getFileCache(e))==null?void 0:t.frontmatter:void 0;this.checkAndRenderToolbar(e,o)}}setComponentDisplayClass(e,t,o){e.removeClasses(["hide","hide-on-desktop","hide-on-mobile"]),!t&&!o?e.addClass("hide"):(!t&&e.addClass("hide-on-desktop"),!o&&e.addClass("hide-on-mobile"))}async showMenuAtElement(e,t){w("showMenuAtElement()",t);let o;if(t){let n=t.getBoundingClientRect();o={x:n.x,y:n.bottom,overlap:!0,left:!1},localStorage.setItem("note-toolbar-menu-pos",JSON.stringify(o))}if(!o){let n=localStorage.getItem("note-toolbar-menu-pos");o=n?JSON.parse(n):void 0}o&&(e.showAtPosition(o),o.left||activeWindow.innerWidth-(o.x+e.dom.offsetWidth)<=2&&(w("\u2B05\uFE0F repositioned menu"),e.showAtPosition({x:activeWindow.innerWidth,y:o.y,overlap:!0,left:!0})))}async updateToolbar(e,t){let o=this.getToolbarEl(),n=o==null?void 0:o.getAttribute("data-name"),a=o==null?void 0:o.getAttribute("data-updated");if(o===null||e.name!==n||e.updated!==a)return;let p=Array.from(o.querySelectorAll(".callout-content > ul > li"));for(let l of p){let u=l.querySelector("span.external-link");if(!u)continue;let c=this.settingsManager.getToolbarItemById(u.id);if(c&&u.id===c.uuid){if(this.hasVars(c.link))if(await this.replaceVars(c.link,t)===""){l.addClass("hide");continue}else l.removeClass("hide");if(this.hasVars(c.tooltip)){let d=await this.replaceVars(c.tooltip,t);(0,S.setTooltip)(u,d,{placement:"top"})}if(this.hasVars(c.label)){let d=await this.replaceVars(c.label,t),m=l.querySelector(".cg-note-toolbar-item-label");d?(m==null||m.removeClass("hide"),m==null||m.setText(d)):(m==null||m.addClass("hide"),m==null||m.setText(""))}}}}async calloutLinkHandler(e){var n,a,p,l,u,c;let t=e.target,o=t==null?void 0:t.closest('.callout[data-callout="note-toolbar"] a.external-link');if(o){this.lastCalloutLink=o;let d=o==null?void 0:o.nextElementSibling;if(d){let m=Object.values(Mo).find(h=>d==null?void 0:d.hasAttribute(h));m&&e.preventDefault();let g=m?d==null?void 0:d.getAttribute(m):null;switch(m){case"data-command":case"data-ntb-command":this.handleLinkCommand(g);break;case"data-dataview":case"data-js-engine":case"data-templater-obsidian":let h={pluginFunction:g,expression:(n=d==null?void 0:d.getAttribute(X.expression))!=null?n:void 0,sourceFile:(a=d==null?void 0:d.getAttribute(X.sourceFile))!=null?a:void 0,sourceFunction:(p=d==null?void 0:d.getAttribute(X.sourceFunction))!=null?p:void 0,sourceArgs:(l=d==null?void 0:d.getAttribute(X.sourceArgs))!=null?l:void 0,outputContainer:(u=d==null?void 0:d.getAttribute(X.outputContainer))!=null?u:void 0,outputFile:(c=d==null?void 0:d.getAttribute(X.outputFile))!=null?c:void 0};switch(m){case"data-dataview":this.handleLinkScript("dataview",h);break;case"data-js-engine":this.handleLinkScript("js-engine",h);break;case"data-templater-obsidian":this.handleLinkScript("templater-obsidian",h);break}break;case"data-folder":case"data-ntb-folder":this.handleLinkFolder(g);break;case"data-menu":case"data-ntb-menu":let b=this.app.workspace.getActiveFile(),f=this.settingsManager.getToolbarByName(g);f=f||this.settingsManager.getToolbarById(g),b&&(f?this.renderToolbarAsMenu(f,b).then(T=>{this.showMenuAtElement(T,this.lastCalloutLink)}):new S.Notice(r("notice.error-item-menu-not-found",{toolbar:g})));break}}}}async handleItemLink(e,t,o){await this.handleLink(e.uuid,e.link,e.linkAttr.type,e.linkAttr.commandId,t,o)}async handleItemScript(e){e&&(e!=null&&e.scriptConfig)&&await this.handleLinkScript(e.linkAttr.type,e.scriptConfig)}async handleLink(e,t,o,n,a,p){var c,d;this.app.workspace.trigger("note-toolbar:item-activated","test");let l=this.app.workspace.getActiveFile(),u=this.settingsManager.getToolbarItemById(e);switch(this.hasVars(t)&&(t=await this.replaceVars(t,l),w("- uri vars replaced: ",t)),o){case"command":p&&p!==l?this.handleLinkInSidebar(u,p):this.handleLinkCommand(n);break;case"file":let m=l?l.path:"";w("- openLinkText: ",t," from: ",m);let g=this.app.vault.getAbstractFileByPath(t);g instanceof S.TFolder?this.app.internalPlugins.getEnabledPluginById("file-explorer").revealInFolder(g):this.app.workspace.openLinkText(t,m,Vo(a));break;case"menu":let h=this.settingsManager.getToolbarById(t);w("- menu item for toolbar",h,l),h&&l?this.renderToolbarAsMenu(h,l).then(b=>{let f=(a==null?void 0:a.targetNode).closest(".external-link");this.showMenuAtElement(b,f),a instanceof KeyboardEvent&&bi()}):h||new S.Notice(r("notice.error-item-menu-not-found",{toolbar:t}));break;case"dataview":case"js-engine":case"templater-obsidian":this.updateAdapters(),this.settings.scriptingEnabled?p&&p!==l?await this.handleLinkInSidebar(u,p):await this.handleItemScript(u):new S.Notice(r("notice.error-scripting-not-enabled"));break;case"uri":if(hi(t))window.open(t,"_blank");else{let b=(d=(c=this.app.workspace.getActiveFile())==null?void 0:c.path)!=null?d:"";this.app.workspace.openLinkText(t,b,Vo(a))}break}}async handleLinkCommand(e){if(e){if(!(e in this.app.commands.commands)){new S.Notice(r("notice.error-command-not-found",{command:e}));return}try{await this.app.commands.executeCommandById(e)}catch(t){console.error(t),new S.Notice(t)}}}async handleLinkScript(e,t){var a,p,l;if(!this.getAdapterForItemType(e)){new S.Notice(r("notice.error-scripting-plugin-not-enabled",{plugin:ut[e]}));return}let n;switch(e){case"dataview":n=await((a=this.dvAdapter)==null?void 0:a.use(t));break;case"js-engine":n=await((p=this.jsAdapter)==null?void 0:p.use(t));break;case"templater-obsidian":n=await((l=this.tpAdapter)==null?void 0:l.use(t));break}n&&gi(this.app,n),await this.app.commands.executeCommandById("editor:focus")}async handleLinkInSidebar(e,t){let o=this.app.workspace.getRightLeaf(!1),n=this.app.workspace.getActiveViewOfType(S.MarkdownView),a=n?n.editor:null;if(o){switch(await o.openFile(t),e==null?void 0:e.linkAttr.type){case"command":let p=e==null?void 0:e.linkAttr.commandId;if(!(p in this.app.commands.commands)){new S.Notice(r("notice.error-command-not-found",{command:p}));return}try{await this.app.commands.executeCommandById(p)}catch(l){console.error(l),new S.Notice(l)}break;case"dataview":case"js-engine":case"templater-obsidian":await this.handleItemScript(e);break}o.detach(),a&&a.focus()}}async handleLinkFolder(e){let t=e?this.app.vault.getAbstractFileByPath(e):void 0;t instanceof S.TFolder?this.app.internalPlugins.getEnabledPluginById("file-explorer").revealInFolder(t):new S.Notice(r("notice.error-folder-not-found",{folder:e}))}async ribbonMenuHandler(e){var t;switch(this.settings.ribbonAction){case"item-suggester":await this.commands.openItemSuggester();break;case"toolbar-suggester":await this.commands.openToolbarSuggester();break;case"toolbar":let o=this.app.workspace.getActiveFile();if(o){let n=o?(t=this.app.metadataCache.getFileCache(o))==null?void 0:t.frontmatter:void 0,a=this.settingsManager.getMappedToolbar(n,o);a&&this.renderToolbarAsMenu(a,o,this.settings.showEditInFabMenu).then(p=>{p.showAtPosition(e)})}break}}async toolbarFabHandler(e,t){var n;w("toolbarFabHandler: ",e),e.preventDefault();let o=this.app.workspace.getActiveFile();if(o){let a=o?(n=this.app.metadataCache.getFileCache(o))==null?void 0:n.frontmatter:void 0,p=this.settingsManager.getMappedToolbar(a,o);p&&this.renderToolbarAsMenu(p,o,this.settings.showEditInFabMenu).then(l=>{let u=this.getToolbarFabEl();if(u){let c=u.getAttribute("data-tbar-position"),d=t.getBoundingClientRect(),m={x:c==="fabl"?d.x:d.x+d.width,y:d.top-4,overlap:!0,left:c!=="fabl"};localStorage.setItem("note-toolbar-menu-pos",JSON.stringify(m)),l.showAtPosition(m)}})}}async toolbarKeyboardHandler(e){var o,n,a;w("toolbarKeyboardHandler: ",e);let t=this.getToolbarListEl();if(t){e.key&&["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Enter","Shift","Tab"," "].includes(e.key)&&e.preventDefault();let l=Array.from(t.children).filter(m=>{let g=m.querySelector("span")!==null,h=window.getComputedStyle(m).getPropertyValue("display")!=="none";return g&&h}),u=(o=activeDocument.activeElement)==null?void 0:o.parentElement,c=l.indexOf(u),d=e.key;switch(e.key==="Tab"&&(d=e.shiftKey?"ArrowLeft":"ArrowRight"),d){case"ArrowRight":case"ArrowDown":let m=(c+1)%l.length;w(u),u.removeClass("tbar-item-focused"),l[m].addClass("tbar-item-focused"),(n=l[m].querySelector("span"))==null||n.focus();break;case"ArrowLeft":case"ArrowUp":let g=(c-1+l.length)%l.length;u.removeClass("tbar-item-focused"),l[g].addClass("tbar-item-focused"),(a=l[g].querySelector("span"))==null||a.focus();break;case"Enter":case" ":let h=activeDocument==null?void 0:activeDocument.activeElement,b=this.settingsManager.getToolbarItemById(h==null?void 0:h.id);b&&await this.handleItemLink(b,e);break;case"Escape":let f=this.app.workspace.getActiveViewOfType(S.MarkdownView);(f==null?void 0:f.getMode())==="preview"&&(activeDocument==null?void 0:activeDocument.activeElement).blur(),u.tagName==="LI"&&u.closest(".cg-note-toolbar-callout")?u.addClass("tbar-item-focused"):await this.removeFocusStyle();break}}}async removeFocusStyle(){let e=this.getToolbarListEl();e&&Array.from(e.children).forEach(t=>{t.removeClass("tbar-item-focused")})}async toolbarClickHandler(e){if(e.type==="click"||e.type==="auxclick"&&e.button===1){let t=e.currentTarget,o=t.getAttribute("href");if(o!=null){let n=t.id,a=t.getAttribute("data-toolbar-link-attr-type");a&&Object.values(ne).includes(a)&&e.preventDefault();let p=t.getAttribute("data-toolbar-link-attr-commandid");(e==null?void 0:e.pointerType)==="mouse"&&(t.blur(),await this.removeFocusStyle()),await this.handleLink(n,o,a,p,e)}}}async toolbarContextMenuHandler(e){e.preventDefault();let t=e.target.closest(".cg-note-toolbar-container"),o=t!=null&&t.id?this.settingsManager.getToolbarById(t.id):void 0,n=new S.Menu;if(o!==void 0){let a=this.settingsManager.getToolbarPosition(o);n.addSeparator(),n.addItem(l=>{l.setTitle(r("toolbar.menu-position")),l.setIcon("move");let u=l.setSubmenu();a!=="top"&&u.addItem(c=>{c.setTitle(r("setting.position.option-top")).setIcon("arrow-up-to-line").onClick(d=>this.setPosition(o,"top"))}),a!=="props"&&u.addItem(c=>{c.setTitle(r("setting.position.option-props")).setIcon("arrow-down-narrow-wide").onClick(d=>this.setPosition(o,"props"))}),a!=="fabl"&&u.addItem(c=>{c.setTitle(r("setting.position.option-fabl")).setIcon("circle-chevron-left").onClick(d=>this.setPosition(o,"fabl"))}),a!=="fabr"&&u.addItem(c=>{c.setTitle(r("setting.position.option-fabr")).setIcon("circle-chevron-right").onClick(d=>this.setPosition(o,"fabr"))})});let p=this.getPropsEl();p&&(getComputedStyle(p).getPropertyValue("display")==="none"?n.addItem(u=>{u.setTitle(r("toolbar.menu-show-properties")).setIcon("table-properties").onClick(async c=>this.commands.toggleProps("show"))}):n.addItem(u=>{u.setTitle(r("toolbar.menu-hide-properties")).setIcon("table-properties").onClick(async c=>this.commands.toggleProps("hide"))})),n.addSeparator(),n.addItem(l=>{l.setIcon("share").setTitle(r("export.label-share")).onClick(async()=>{if(o){let u=await this.protocolManager.getShareUri(o);new lt(this,u,o).open()}})}),n.addItem(l=>{l.setTitle(r("export.label-callout")).setIcon("copy").onClick(async u=>{if(o){let c=await rt(this,o,this.settings.export);navigator.clipboard.writeText(c),new S.Notice(N(r("export.notice-completed"),"Creating-callouts-from-toolbars"))}})})}n.addSeparator(),o!==void 0&&n.addItem(a=>{a.setTitle(r("toolbar.menu-edit-toolbar",{toolbar:o==null?void 0:o.name})).setIcon("lucide-pen-box").onClick(p=>{let l=new re(this.app,this,null,o);l.setTitle(r("setting.title-edit-toolbar",{toolbar:o==null?void 0:o.name})),l.open()})}),n.addItem(a=>{a.setTitle(r("toolbar.menu-toolbar-settings")).setIcon("lucide-wrench").onClick(p=>{this.commands.openSettings()})}),n.showAtPosition(e)}async setPosition(e,t){e!=null&&e.position&&(S.Platform.isDesktop?e.position.desktop={allViews:{position:t}}:e.position.mobile={allViews:{position:t}},e.updated=new Date().toISOString(),await this.settingsManager.save())}getPropsEl(){let e=this.app.workspace.getActiveViewOfType(S.MarkdownView),t=activeDocument.querySelector(".workspace-leaf.mod-active .markdown-"+(e==null?void 0:e.getMode())+"-view .metadata-container");return this.hasPlugin["make-md"]&&(t!=null&&t.closest(".mk-frame-edit"))?null:t}getOutputEl(e){let t=this.app.workspace.getActiveViewOfType(S.MarkdownView);return activeDocument.querySelector(".workspace-leaf.mod-active .markdown-"+(t==null?void 0:t.getMode())+'-view .callout[data-callout="note-toolbar-output"][data-callout-metadata*="'+e+'"]')}getToolbarEl(){return activeDocument.querySelector(".workspace-leaf.mod-active .cg-note-toolbar-container")}getToolbarListEl(){return activeDocument.querySelector(".workspace-leaf.mod-active .cg-note-toolbar-container .callout-content > ul")}getToolbarFabEl(){return activeDocument.querySelector(".cg-note-toolbar-fab-container")}async removeActiveToolbar(){let e=activeDocument.querySelector(".workspace-leaf.mod-active .cg-note-toolbar-container");e==null||e.remove()}async removeAllToolbars(){activeDocument.querySelectorAll(".cg-note-toolbar-container").forEach(t=>{t.remove()})}removeToolbarIfNeeded(e){let t=!1,o=this.getToolbarEl(),n=this.app.workspace.getActiveViewOfType(S.MarkdownView);if(o){let a=o==null?void 0:o.getAttribute("data-name"),p=o.getAttribute("data-updated"),l=o.nextElementSibling,u=o.getAttribute("data-view-mode");e?e.name!==a?(w("\u26D4\uFE0F removing existing toolbar (name does not match): "+a),t=!0):e.updated!==p?(w("\u26D4\uFE0F existing toolbar out of date, removing existing toolbar"),t=!0):l!=null&&l.hasClass("inline-title")?(w("\u26D4\uFE0F toolbar not in correct position (sibling is `inline-title`), removing existing toolbar"),t=!0):(n==null?void 0:n.getMode())!==u&&(w("\u26D4\uFE0F toolbar not for correct view mode"),t=!0):(w("\u26D4\uFE0F toolbar not needed, removing existing toolbar: "+a),t=!0),t&&(o.remove(),o=null)}else w("- no existing toolbar"),t=!0;return t}checkPlugins(){Object.keys(this.hasPlugin).forEach(e=>{this.hasPlugin[e]=e in this.app.plugins.plugins})}getAdapterForItemType(e){let t;switch(e){case"dataview":t=this.hasPlugin["dataview"]?this.dvAdapter:void 0;break;case"js-engine":t=this.hasPlugin["js-engine"]?this.jsAdapter:void 0;break;case"templater-obsidian":t=this.hasPlugin["templater-obsidian"]?this.tpAdapter:void 0;break}return t}getCurrentToolbar(){let e=this.getToolbarEl();return e?this.settingsManager.getToolbarById(e==null?void 0:e.id):void 0}hasVars(e){var o;let t=/{{.*?}}/g.test(e);if(!t&&this.hasPlugin["dataview"]){let n=(o=this.dvAdapter)==null?void 0:o.getSetting("inlineQueryPrefix");t=!!n&&e.trim().startsWith(n)}return!t&&this.hasPlugin["templater-obsidian"]&&(t=e.trim().startsWith("<%")),t}async replaceVars(e,t,o=!1){var p,l,u,c;let n=t==null?void 0:t.basename;n!=null&&(e=e.replace("{{note_title}}",o?encodeURIComponent(n):n));let a=t?(p=this.app.metadataCache.getFileCache(t))==null?void 0:p.frontmatter:void 0;if(e=e.replace(/{{prop_(.*?)}}/g,(d,m)=>{let g=m.trim();if(a&&a[g]!==void 0){let h=/\[\[([^\|\]]+)(?:\|[^\]]*)?\]\]/g,b=Array.isArray(a[g])?a[g].join(","):a[g];return b?o?encodeURIComponent(b==null?void 0:b.replace(h,"$1")):b.replace(h,"$1"):""}else return""}),this.hasPlugin["dataview"]){let d=(l=this.dvAdapter)==null?void 0:l.getSetting("inlineQueryPrefix");if(d&&e.trim().startsWith(d)){e=e.trim().slice(d.length);let m=await((u=this.dvAdapter)==null?void 0:u.use({pluginFunction:"evaluateInline",expression:e}));e=m&&typeof m=="string"?m:""}}if(this.hasPlugin["templater-obsidian"]&&e.trim().startsWith("<%")){e=e.trim(),e.startsWith("<%")||(e="<%"+e),e.endsWith("%>")||(e+="%>");let d=await((c=this.tpAdapter)==null?void 0:c.use({pluginFunction:"parseTemplateInline",expression:e}));e=d&&typeof d=="string"?d:""}return e}toolbarHasVars(e){return e.items.some(t=>this.hasVars([t.label,t.tooltip,t.link].join(" ")))}updateAdapters(){var e,t,o;this.settings.scriptingEnabled?(this.checkPlugins(),this.dvAdapter=this.hasPlugin["dataview"]?this.dvAdapter||new Nt(this):void 0,this.jsAdapter=this.hasPlugin["js-engine"]?this.jsAdapter||new Pt(this):void 0,this.tpAdapter=this.hasPlugin["templater-obsidian"]?this.tpAdapter||new Lt(this):void 0):((e=this.dvAdapter)==null||e.disable(),(t=this.jsAdapter)==null||t.disable(),(o=this.tpAdapter)==null||o.disable(),this.dvAdapter=void 0,this.jsAdapter=void 0,this.tpAdapter=void 0)}};
/*! Bundled license information:

sortablejs/modular/sortable.esm.js:
  (**!
   * Sortable 1.15.3
   * @author	RubaXa   <trash@rubaxa.org>
   * @author	owenm    <owen23355@gmail.com>
   * @license MIT
   *)
*/

/* nosourcemap */