diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 569f524a4a1..14e1ede3f67 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -7,17 +7,17 @@ ## NPM dependencies -Install pnpm: `npm install -g pnpm@10.11.0` +Install pnpm: `npm install -g pnpm@10.12.1`
For China mainland Set the Electron mirror environment variable and install Electron: -* macOS/Linux: `ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ pnpm install electron@v35.5.0 -D` +* macOS/Linux: `ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ pnpm install electron@v36.4.0 -D` * Windows: * `SET ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/` - * `pnpm install electron@v35.5.0 -D` + * `pnpm install electron@v36.4.0 -D` NPM mirror: @@ -27,7 +27,7 @@ NPM mirror: Enter the app folder and execute: -* `pnpm install electron@v35.5.0 -D` +* `pnpm install electron@v36.4.0 -D` * `pnpm run dev` * `pnpm run start` diff --git a/.github/CONTRIBUTING_zh_CN.md b/.github/CONTRIBUTING_zh_CN.md index 96ca7fd527f..940253da781 100644 --- a/.github/CONTRIBUTING_zh_CN.md +++ b/.github/CONTRIBUTING_zh_CN.md @@ -7,17 +7,17 @@ ## NPM 依赖 -安装 pnpm:`npm install -g pnpm@10.11.0` +安装 pnpm:`npm install -g pnpm@10.12.1`
适用于中国大陆 设置 Electron 镜像环境变量并安装 Electron: -* macOS/Linux:`ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ pnpm install electron@v35.5.0 -D` +* macOS/Linux:`ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ pnpm install electron@v36.4.0 -D` * Windows: * `SET ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/` - * `pnpm install electron@v35.5.0 -D` + * `pnpm install electron@v36.4.0 -D` NPM 镜像: @@ -27,7 +27,7 @@ NPM 镜像: 进入 app 文件夹执行: -* `pnpm install electron@v35.5.0 -D` +* `pnpm install electron@v36.4.0 -D` * `pnpm run dev` * `pnpm run start` diff --git a/README_zh_CN.md b/README_zh_CN.md index ece108df908..8a7cfe6bb3f 100644 --- a/README_zh_CN.md +++ b/README_zh_CN.md @@ -45,6 +45,7 @@ * [Docker 部署](#docker-部署) * [Unraid 部署](#unraid-部署) * [宝塔面板 部署](#宝塔面板部署) + * [小皮面板 部署](#小皮面板部署) * [内部预览版](#内部预览版) * [🏘️ 社区](#️-社区) * [🛠️ 开发指南](#️-开发指南) @@ -338,6 +339,29 @@ Publish parameters: --accessAuthCode=******(访问授权码)
+### 小皮面板部署 + +
+小皮面板 部署文档 + +#### 前提 + +* 需要安装小皮面板,前往[小皮面板](https://www.xp.cn/download),选择对应的脚本执行安装 + +#### 部署 + +1. 登录小皮面板后,点击左侧菜单的 **Docker** +2. 首次打开会提示安装 Docker,点击 **点击安装 Docker** +3. 按照提示安装 Docker +4. 点击 **应用商店**,找到 **思源笔记**,点击 **安装** -> **立即安装** +5. 等待安装结束后,可在 **任务队列** 界面的 **已结束** 中点击 **详情** 查看安装信息 + +#### 访问思源笔记 + +* 在浏览器输入 `http://<小皮面板机器IP>:6806` 访问 + +
+ ### 内部预览版 我们会在有重大更新前发布内部预览版,请访问 [https://github.com/siyuan-note/insider](https://github.com/siyuan-note/insider)。 diff --git a/app/appearance/icons/ant/icon.js b/app/appearance/icons/ant/icon.js index 4e9088be82f..ceadc89d7b7 100644 --- a/app/appearance/icons/ant/icon.js +++ b/app/appearance/icons/ant/icon.js @@ -1,5 +1,11 @@ document.body.insertAdjacentHTML('afterbegin', ` + + + + + + diff --git a/app/appearance/icons/ant/icon.json b/app/appearance/icons/ant/icon.json index 669816a924c..6e5dceed1bc 100644 --- a/app/appearance/icons/ant/icon.json +++ b/app/appearance/icons/ant/icon.json @@ -2,5 +2,5 @@ "name": "ant", "author": "Vanessa", "url": "https://github.com/Vanessa219", - "version": "1.32.0" + "version": "1.33.0" } diff --git a/app/appearance/icons/index.html b/app/appearance/icons/index.html index 51a1cd6f18f..1867bf3eabb 100644 --- a/app/appearance/icons/index.html +++ b/app/appearance/icons/index.html @@ -34,6 +34,18 @@

SiYuan

iconCamera +
+ + + + iconGallery +
+
+ + + + iconBoard +
diff --git a/app/appearance/icons/material/icon.js b/app/appearance/icons/material/icon.js index b61d9860f36..bb49080033f 100644 --- a/app/appearance/icons/material/icon.js +++ b/app/appearance/icons/material/icon.js @@ -1,5 +1,11 @@ document.body.insertAdjacentHTML('afterbegin', ` + + + + + + diff --git a/app/appearance/icons/material/icon.json b/app/appearance/icons/material/icon.json index d0bbda16bd4..9c3960a2590 100644 --- a/app/appearance/icons/material/icon.json +++ b/app/appearance/icons/material/icon.json @@ -2,5 +2,5 @@ "name": "material", "author": "Vanessa", "url": "https://github.com/Vanessa219", - "version": "1.32.0" + "version": "1.33.0" } diff --git a/app/appearance/langs/ar_SA.json b/app/appearance/langs/ar_SA.json index e76cffe440d..b41ce5460d0 100644 --- a/app/appearance/langs/ar_SA.json +++ b/app/appearance/langs/ar_SA.json @@ -1,4 +1,15 @@ { + "addCard": "إضافة بطاقة", + "cardPreview1": "معاينة البطاقة", + "contentImage": "صورة المحتوى", + "cardSize": "حجم البطاقة", + "large": "كبير", + "medium": "متوسط", + "small": "صغير", + "fitImage": "تعديل حجم الصورة تلقائيًا", + "showIcon": "إظهار الأيقونة", + "wrapAllFields": "التفاف الحقول تلقائيًا", + "gallery": "معرض", "newTag": "علامة جديدة", "pleaseWait": "يرجى الانتظار...", "reconnectPrompt": "بعد تبديل التطبيقات، سيستغرق الأمر بعض الوقت لاستعادة تشغيل نواة SiYuan. يرجى الانتظار بضع ثوانٍ أو النقر فوق الزر \"إعادة المحاولة\"", @@ -1336,6 +1347,7 @@ }, "_attrView": { "table": "جدول", + "gallery": "معرض", "key": "المفتاح الرئيسي", "select": "تحديد" }, @@ -1596,6 +1608,7 @@ "253": "جارٍ ضغط الملف [%s]، يرجى الانتظار...", "254": "[Region ID] معرّف المنطقة غير صحيح، يرجى الرجوع إلى وثائق مزود خدمة S3 لتكوين معرّف المنطقة", "255": "قام الموقع المستهدف بتمكين حماية الروابط المباشرة، لذلك لا يمكن تنزيل [%d] من الموارد", - "256": "المسار المحدد [%s] يحتوي على مسار مساحة عمل رئيسي [%s]" + "256": "المسار المحدد [%s] يحتوي على مسار مساحة عمل رئيسي [%s]", + "257": "تذكرني لمدة 30 يومًا" } } diff --git a/app/appearance/langs/de_DE.json b/app/appearance/langs/de_DE.json index 50eb6453696..c792eaf2b8e 100644 --- a/app/appearance/langs/de_DE.json +++ b/app/appearance/langs/de_DE.json @@ -1,4 +1,15 @@ { + "addCard": "Karte hinzufügen", + "cardPreview1": "Kartenansicht", + "contentImage": "Inhaltsbild", + "cardSize": "Kartengröße", + "large": "Groß", + "medium": "Mittel", + "small": "Klein", + "fitImage": "Bildgröße automatisch anpassen", + "showIcon": "Symbol anzeigen", + "wrapAllFields": "Felder automatisch umbrechen", + "gallery": "Galerie", "newTag": "Neuer Tag", "pleaseWait": "Bitte warten...", "reconnectPrompt": "Nach dem Wechseln der Anwendungen dauert es einige Zeit, bis der Betrieb des SiYuan-Kernels wiederhergestellt ist. Bitte warten Sie einige Sekunden oder klicken Sie auf die Schaltfläche „Erneut versuchen“", @@ -1336,6 +1347,7 @@ }, "_attrView": { "table": "Tabelle", + "gallery": "Galerie", "key": "Primärschlüssel", "select": "Auswählen" }, @@ -1596,6 +1608,7 @@ "253": "Datei [%s] wird komprimiert, bitte warten...", "254": "[Region ID] Falsche Regions-ID, bitte konsultieren Sie die Dokumentation des S3-Dienstanbieters zur Konfiguration der Regions-ID", "255": "Die Zielseite hat den Hotlink-Schutz aktiviert, daher ist es nicht möglich, [%d] Ressourcen herunterzuladen", - "256": "Der angegebene Pfad [%s] hat einen übergeordneten Arbeitsbereichspfad [%s]" + "256": "Der angegebene Pfad [%s] hat einen übergeordneten Arbeitsbereichspfad [%s]", + "257": "Erinnere dich 30 Tage an mich" } } diff --git a/app/appearance/langs/en_US.json b/app/appearance/langs/en_US.json index b5f8867e03f..d3d2993560a 100644 --- a/app/appearance/langs/en_US.json +++ b/app/appearance/langs/en_US.json @@ -1,4 +1,15 @@ { + "addCard": "Add card", + "cardPreview1": "Card preview", + "contentImage": "Content image", + "cardSize": "Card size", + "large": "Large", + "medium": "Medium", + "small": "Small", + "fitImage": "Auto-fit image size", + "showIcon": "Show icon", + "wrapAllFields": "Auto-wrap fields", + "gallery": "Gallery", "newTag": "New tag", "pleaseWait": "Please wait...", "reconnectPrompt": "After switching applications, it will take some time to restore the SiYuan kernel operation. Please wait a few seconds or click the \"Retry\" button", @@ -1336,6 +1347,7 @@ }, "_attrView": { "table": "Table", + "gallery": "Gallery", "key": "Primary Key", "select": "Select" }, @@ -1596,6 +1608,7 @@ "253": "Compressing file [%s], please wait...", "254": "[Region ID] Incorrect Region ID, please refer to the S3 service provider's documentation to configure the Region ID", "255": "The target site has enabled hotlink protection, so it is not possible to download [%d] resources", - "256": "The specified path [%s] has a parent workspace path [%s]" + "256": "The specified path [%s] has a parent workspace path [%s]", + "257": "Remember me for 30 days" } } diff --git a/app/appearance/langs/es_ES.json b/app/appearance/langs/es_ES.json index 020319f9703..cf83c6a22ab 100644 --- a/app/appearance/langs/es_ES.json +++ b/app/appearance/langs/es_ES.json @@ -1,4 +1,15 @@ { + "addCard": "Agregar tarjeta", + "cardPreview1": "Vista previa de la tarjeta", + "contentImage": "Imagen del contenido", + "cardSize": "Tamaño de la tarjeta", + "large": "Grande", + "medium": "Mediano", + "small": "Pequeño", + "fitImage": "Ajustar automáticamente el tamaño de la imagen", + "showIcon": "Mostrar ícono", + "wrapAllFields": "Ajuste automático de campos", + "gallery": "Galería", "newTag": "Nueva etiqueta", "pleaseWait": "Por favor, espere...", "reconnectPrompt": "Después de cambiar de aplicación, tomará algún tiempo restaurar el funcionamiento del núcleo de SiYuan. Espere unos segundos o haga clic en el botón \"Reintentar\"", @@ -1336,6 +1347,7 @@ }, "_attrView": { "table": "Tabla", + "gallery": "Galería", "key": "Clave principal", "select": "Selección" }, @@ -1596,6 +1608,7 @@ "253": "Comprimiendo el archivo [%s], por favor espere...", "254": "[Region ID] ID de región incorrecto, por favor consulte la documentación del proveedor de servicios S3 para configurar el ID de región", "255": "El sitio de destino ha activado la protección contra hotlinking, por lo que no es posible descargar [%d] recursos", - "256": "La ruta especificada [%s] tiene una ruta de espacio de trabajo padre [%s]" + "256": "La ruta especificada [%s] tiene una ruta de espacio de trabajo padre [%s]", + "257": "Recuérdame durante 30 días" } } diff --git a/app/appearance/langs/fr_FR.json b/app/appearance/langs/fr_FR.json index 222195487d4..9af73d62034 100644 --- a/app/appearance/langs/fr_FR.json +++ b/app/appearance/langs/fr_FR.json @@ -1,4 +1,15 @@ { + "addCard": "Ajouter une carte", + "cardPreview1": "Aperçu de la carte", + "contentImage": "Image du contenu", + "cardSize": "Taille de la carte", + "large": "Grand", + "medium": "Moyen", + "small": "Petit", + "fitImage": "Ajuster automatiquement la taille de l'image", + "showIcon": "Afficher l'icône", + "wrapAllFields": "Retour automatique des champs", + "gallery": "Galerie", "newTag": "Nouvelle étiquette", "pleaseWait": "Veuillez patienter...", "reconnectPrompt": "Après avoir changé d'application, il faudra un certain temps pour rétablir le fonctionnement du noyau SiYuan. Veuillez patienter quelques secondes ou cliquer sur le bouton « Réessayer »", @@ -1336,6 +1347,7 @@ }, "_attrView": { "table": "Tableau", + "gallery": "Galerie", "key": "Clé primaire", "select": "Sélectionner" }, @@ -1596,6 +1608,7 @@ "253": "Compression du fichier [%s], veuillez patienter...", "254": "[Region ID] ID de région incorrect, veuillez consulter la documentation du fournisseur de services S3 pour configurer l'ID de région", "255": "Le site cible a activé la protection contre le hotlinking, il est donc impossible de télécharger [%d] ressources", - "256": "Le chemin spécifié [%s] contient un chemin d'espace de travail parent [%s]" + "256": "Le chemin spécifié [%s] contient un chemin d'espace de travail parent [%s]", + "257": "Souviens-toi de moi pendant 30 jours" } } diff --git a/app/appearance/langs/he_IL.json b/app/appearance/langs/he_IL.json index 01656beaa1d..b21a603d391 100644 --- a/app/appearance/langs/he_IL.json +++ b/app/appearance/langs/he_IL.json @@ -1,4 +1,15 @@ { + "addCard": "הוסף כרטיס", + "cardPreview1": "תצוגה מקדימה של כרטיס", + "contentImage": "תמונת תוכן", + "cardSize": "גודל כרטיס", + "large": "גדול", + "medium": "בינוני", + "small": "קטן", + "fitImage": "התאמה אוטומטית לגודל התמונה", + "showIcon": "הצג אייקון", + "wrapAllFields": "עטיפת שדות אוטומטית", + "gallery": "גלריה", "newTag": "תג חדש", "pleaseWait": "אנא המתן...", "reconnectPrompt": "לאחר מעבר בין יישומים, יידרש זמן מה כדי לשחזר את פעולת ליבת SiYuan. אנא המתן מספר שניות או לחץ על כפתור \"נסה שוב\"", @@ -1336,6 +1347,7 @@ }, "_attrView": { "table": "טבלה", + "gallery": "גלריה", "key": "מפתח ראשי", "select": "בחר" }, @@ -1596,6 +1608,7 @@ "253": "דוחס את הקובץ [%s], אנא המתן...", "254": "[Region ID] מזהה האזור שגוי, אנא עיין בתיעוד ספק שירותי S3 כדי להגדיר את מזהה האזור", "255": "האתר היעד הפעיל הגנה על קישורים חמים, ולכן לא ניתן להוריד [%d] משאבים", - "256": "הנתיב שצוין [%s] מכיל נתיב מרחב עבודה אב [%s]" + "256": "הנתיב שצוין [%s] מכיל נתיב מרחב עבודה אב [%s]", + "257": "זכור אותי למשך 30 יום" } } diff --git a/app/appearance/langs/it_IT.json b/app/appearance/langs/it_IT.json index c893a95a243..d1d68005f43 100644 --- a/app/appearance/langs/it_IT.json +++ b/app/appearance/langs/it_IT.json @@ -1,4 +1,15 @@ { + "addCard": "Aggiungi carta", + "cardPreview1": "Anteprima della carta", + "contentImage": "Immagine del contenuto", + "cardSize": "Dimensione della carta", + "large": "Grande", + "medium": "Medio", + "small": "Piccolo", + "fitImage": "Adatta automaticamente la dimensione dell'immagine", + "showIcon": "Mostra icona", + "wrapAllFields": "Avvolgi automaticamente i campi", + "gallery": "Galleria", "newTag": "Nuova etichetta", "pleaseWait": "Attendere prego...", "reconnectPrompt": "Dopo aver cambiato applicazione, ci vorrà un po' di tempo per ripristinare il funzionamento del kernel SiYuan. Attendere qualche secondo o fare clic sul pulsante \"Riprova\"", @@ -1336,6 +1347,7 @@ }, "_attrView": { "table": "Tabella", + "gallery": "Galleria", "key": "Chiave primaria", "select": "Seleziona" }, @@ -1596,6 +1608,7 @@ "253": "Compressione del file [%s], attendere prego...", "254": "[Region ID] ID regione non corretto, si prega di consultare la documentazione del fornitore di servizi S3 per configurare l'ID regione", "255": "Il sito di destinazione ha abilitato la protezione hotlink, quindi non è possibile scaricare [%d] risorse", - "256": "Il percorso specificato [%s] ha un percorso di spazio di lavoro padre [%s]" + "256": "Il percorso specificato [%s] ha un percorso di spazio di lavoro padre [%s]", + "257": "Ricordati di me per 30 giorni" } } diff --git a/app/appearance/langs/ja_JP.json b/app/appearance/langs/ja_JP.json index 8b7989b07bb..da5c3cd0669 100644 --- a/app/appearance/langs/ja_JP.json +++ b/app/appearance/langs/ja_JP.json @@ -1,4 +1,15 @@ { + "addCard": "カードを追加", + "cardPreview1": "カードプレビュー", + "contentImage": "コンテンツ画像", + "cardSize": "カードサイズ", + "large": "大", + "medium": "中", + "small": "小", + "fitImage": "画像サイズを自動調整", + "showIcon": "アイコンを表示", + "wrapAllFields": "フィールドを自動折り返し", + "gallery": "ギャラリー", "newTag": "新しいタグ", "pleaseWait": "しばらくお待ちください...", "reconnectPrompt": "アプリを切り替えた後、思源カーネルの実行を再開するには少し時間がかかります。数秒待つか、「再試行」ボタンをクリックしてください", @@ -1336,6 +1347,7 @@ }, "_attrView": { "table": "テーブル", + "gallery": "ギャラリー", "key": "プライマリキー", "select": "選択" }, @@ -1596,6 +1608,7 @@ "253": "ファイル [%s] を圧縮しています、お待ちください...", "254": "[Region ID] リージョンIDが正しくありません。S3サービスプロバイダーのドキュメントを参照してリージョンIDを設定してください", "255": "ターゲットサイトはホットリンク保護を有効にしているため、[%d] 個のリソースをダウンロードできません", - "256": "指定されたパス [%s] の親にワークスペースパス [%s] が存在します" + "256": "指定されたパス [%s] の親にワークスペースパス [%s] が存在します", + "257": "30日間私を覚えていてください" } } diff --git a/app/appearance/langs/pl_PL.json b/app/appearance/langs/pl_PL.json index cb8cbb1b471..273b0ba64c0 100644 --- a/app/appearance/langs/pl_PL.json +++ b/app/appearance/langs/pl_PL.json @@ -1,4 +1,15 @@ { + "addCard": "Dodaj kartę", + "cardPreview1": "Podgląd karty", + "contentImage": "Obraz treści", + "cardSize": "Rozmiar karty", + "large": "Duży", + "medium": "Średni", + "small": "Mały", + "fitImage": "Automatyczne dopasowanie rozmiaru obrazu", + "showIcon": "Pokaż ikonę", + "wrapAllFields": "Automatyczne zawijanie pól", + "gallery": "Galeria", "newTag": "Nowy tag", "pleaseWait": "Proszę czekać...", "reconnectPrompt": "Po przełączeniu aplikacji ponowne uruchomienie jądra SiYuan może zająć trochę czasu. Proszę poczekać kilka sekund lub kliknąć przycisk „Ponów próbę”", @@ -1336,6 +1347,7 @@ }, "_attrView": { "table": "Tabela", + "gallery": "Galeria", "key": "Klucz główny", "select": "Wybierz" }, @@ -1596,6 +1608,7 @@ "253": "Kompresja pliku [%s], proszę czekać...", "254": "[Region ID] Nieprawidłowy identyfikator regionu, proszę zapoznać się z dokumentacją dostawcy usług S3 w celu skonfigurowania identyfikatora regionu", "255": "Docelowa strona włączyła ochronę przed hotlinkowaniem, [%d] zasobów nie można pobrać", - "256": "Określona ścieżka [%s] ma nadrzędną ścieżkę przestrzeni roboczej [%s]" + "256": "Określona ścieżka [%s] ma nadrzędną ścieżkę przestrzeni roboczej [%s]", + "257": "Zapamiętaj mnie na 30 dni" } } diff --git a/app/appearance/langs/pt_BR.json b/app/appearance/langs/pt_BR.json new file mode 100644 index 00000000000..3fa64728f4c --- /dev/null +++ b/app/appearance/langs/pt_BR.json @@ -0,0 +1,1614 @@ +{ + "addCard": "Adicionar cartão", + "cardPreview1": "Pré-visualização do cartão", + "contentImage": "Imagem do conteúdo", + "cardSize": "Tamanho do cartão", + "large": "Grande", + "medium": "Médio", + "small": "Pequeno", + "fitImage": "Ajustar automaticamente o tamanho da imagem", + "showIcon": "Mostrar ícone", + "wrapAllFields": "Quebrar automaticamente os campos", + "gallery": "Galeria", + "newTag": "Nova tag", + "pleaseWait": "Por favor, aguarde...", + "reconnectPrompt": "Após alternar aplicativos, levará algum tempo para restaurar a operação do kernel SiYuan. Por favor, aguarde alguns segundos ou clique no botão \"Tentar novamente\"", + "relativeFontSize": "relativo ao tamanho da fonte do editor", + "localFileSystem": "Sistema de arquivos local", + "deviceNotSupport": "O dispositivo atual não é suportado", + "second": "segundo", + "syncInterval": "intervalo de sincronização", + "syncIntervalTip": "Sincronizar dados automaticamente após parar de alterar", + "removeAV": "Remover do banco de dados", + "empty": "Vazio", + "newRowInRelation": "Criar nova entrada em ${x} ${y}", + "copyKeyContent": "Copiar texto da chave primária", + "addDesc": "Adicionar descrição", + "dataRepoAutoPurgeIndexRetentionDays": "Dias de retenção de instantâneos de dados", + "dataRepoAutoPurgeRetentionIndexesDaily": "Instantâneos de dados por dia", + "fields": "Campos", + "dynamicEmoji": "Ícone dinâmico", + "backlinkContainChildren": "Os backlinks contêm blocos filhos", + "backlinkContainChildrenTip": "Quando ativado, os blocos filhos serão incluídos no cálculo do backlink", + "entryNum": "Número de entradas", + "workspaceData": "Dados do espaço de trabalho", + "confirmRemoveRelationField": "Tem certeza que deseja excluir o campo associado a ${x}?", + "removeButKeepRelationField": "Remover, mas manter campo relacionado", + "exportPDFLowMemory": "Memória disponível insuficiente para exportar este PDF, reduza o conteúdo ou aumente a memória disponível e tente exportar novamente", + "exportConf": "Configurações de exportação", + "exportConfTip": "Conta, código de autorização de acesso, sincronização, token de API e chave do repositório de dados não serão exportados", + "importConf": "Importar configurações", + "importConfTip": "Após importar, as configurações atuais serão sobrescritas e o aplicativo será fechado automaticamente, reinicie manualmente", + "jumpToPage": "Ir para a página especificada: 1 ~ ${x}", + "pageCountAndSnapshotCount": "Total ${x} páginas, ${y} instantâneos", + "pageCountAndHistoryCount": "Total ${x} páginas, ${y} históricos", + "visitCommunityShare": "Visitar compartilhamento da comunidade", + "clearContextSucc": "O contexto foi limpo", + "emptyMobilePlaceholder": "Registrar algo", + "emptyPlaceholder": "Escreva algo, '/' para comandos", + "publish": "Publicar", + "publishService": "Serviço de publicação", + "publishServiceNotStarted": "Serviço de Publicação Não Iniciado", + "publishServiceTip": "Quando ativado, o serviço de publicação será iniciado. Este serviço publica o conteúdo do espaço de trabalho atual em modo somente leitura na rede local.", + "publishServicePort": "Porta do serviço", + "publishServicePortTip": "Ativar o serviço de publicação usando o número da porta especificado. Se definido como 0, uma porta aleatória será usada.", + "publishServiceAddresses": "Endereços de acesso ao serviço", + "publishServiceAddressesTip": "Possíveis endereços de rede para acessar o serviço de publicação.", + "publishServiceAuth": "Autenticação básica do serviço", + "publishServiceAuthTip": "Quando ativado, é necessária autenticação para acessar o serviço de publicação.", + "publishServiceAuthAccounts": "Contas autenticadas", + "publishServiceAuthAccountsTip": "Lista de contas de autenticação básica. Os visitantes precisam inserir o nome de usuário e senha desta lista para visualizar o conteúdo publicado.", + "publishServiceAuthAccountAdd": "Adicionar conta", + "copyMirror": "Copiar espelho", + "duplicateMirror": "Duplicar espelho", + "duplicateCompletely": "Duplicar completamente", + "isMsStoreVerTip": "A versão atualmente usada é da Microsoft Store, verifique atualizações na Microsoft Store", + "andSubFile": "Tem certeza que deseja excluir ${x} e seus ${y} subdocumentos?", + "confirmDeleteTip": "Tem certeza que deseja excluir ${x}?", + "rollbackTip": "Após exclusão, pode ser restaurado em [Histórico de Dados], retido por ${x} dias de acordo com [Configurações - Editor - Dias de Retenção de Histórico]", + "newView": "Adicionar Visualização", + "newCol": "Adicionar campo", + "newRow": "Adicionar entrada", + "enterKey": "Enter", + "doubleClick": "Duplo Clique", + "click": "Clique", + "allowHTMLBLockScript": "Permitir execução de scripts dentro de blocos HTML", + "allowHTMLBLockScriptTip": "Quando ativado, o script no bloco HTML não será sanitizado, esteja ciente do risco potencial de ataques XSS", + "autoLaunchMode0": "Não iniciar automaticamente", + "autoLaunchMode1": "Iniciar automaticamente após inicialização", + "autoLaunchMode2": "Iniciar automaticamente e minimizar a interface principal após inicialização", + "editorMarkdownInlineMark": "Sintaxe de marca inline Markdown", + "editorMarkdownInlineMarkTip": "Quando ativado, a sintaxe de marca inline ==foo== será suportada", + "editorMarkdownInlineStrikethrough": "Sintaxe de tachado inline Markdown", + "editorMarkdownInlineStrikethroughTip": "Quando ativado, a sintaxe de tachado inline ~~foo~~ será suportada", + "editorMarkdownInlineSup": "Sintaxe de sobrescrito inline Markdown", + "editorMarkdownInlineSupTip": "Quando ativado, a sintaxe de sobrescrito inline ^foo^ será suportada", + "editorMarkdownInlineSub": "Sintaxe de subscrito inline Markdown", + "editorMarkdownInlineSubTip": "Quando ativado, a sintaxe de subscrito inline ~foo~ será suportada", + "editorMarkdownInlineTag": "Sintaxe de tag inline Markdown", + "editorMarkdownInlineTagTip": "Quando ativado, a sintaxe de tag inline #foo# será suportada", + "editorMarkdownInlineMath": "Sintaxe de fórmula inline Markdown", + "editorMarkdownInlineMathTip": "Quando ativado, a sintaxe de fórmula inline $foo$ será suportada", + "editorMarkdownInlineAsterisk": "Sintaxe de asterisco inline Markdown", + "editorMarkdownInlineAsteriskTip": "Quando ativado, a sintaxe de itálico *foo* e a sintaxe de negrito **foo** serão suportadas", + "editorMarkdownInlineUnderscore": "Sintaxe de sublinhado inline Markdown", + "editorMarkdownInlineUnderscoreTip": "Quando ativado, a sintaxe de itálico _foo_ e a sintaxe de negrito __foo__ serão suportadas", + "currentNotebook": "Bloco de Notas Atual", + "containerBlockTip1": "Ativar blocos de contêiner resultará em resultados de pesquisa duplicados", + "copyAsPNG": "Copiar como PNG", + "unbindBlock": "Desvincular bloco", + "showTitle": "Mostrar título do banco de dados", + "fillCreated": "Preencher automaticamente a hora de criação", + "removeCard": "Remover cartão de memorização", + "updateLayout": "Atualizar layout", + "dndFolderTip": "Observe que ${x} apenas insere o hiperlink file:// e não copia o arquivo", + "removeCol": "Tem certeza que deseja excluir o campo ${x} no banco de dados?", + "video": "Vídeo", + "audio": "Áudio", + "updateAll": "Atualizar tudo", + "confirmUpdateAll": "Tem certeza que deseja atualizar tudo?", + "confirmUpdate": "Tem certeza que deseja atualizar?", + "insertRowBefore": "Inserir linhas ${x} acima", + "insertRowAfter": "Inserir linhas ${x} abaixo", + "setDueTime": "Definir hora de expiração", + "showCardDay": "Depois de quantos dias você quer mostrar o cartão?", + "forgetCount": "Contagem de esquecimento", + "lastReviewTime": "Última hora de revisão", + "cardStatus": "Status do cartão", + "noSupportTip": "Esta função não suporta o uso de baralhos de cartas", + "insertRowTip": "As entradas recém-adicionadas foram filtradas e podem ser visualizadas cancelando o filtro/pesquisa/ordenação", + "insertPhoto": "Tirar uma foto e inserir", + "relativeToToday": "Relativo a hoje", + "current": "Este", + "week": "semana", + "month": "mês", + "year": "ano", + "pastDate": "Passado", + "nextDate": "Próximo", + "listInvalidRefBlocks": "Listar blocos com referências inválidas", + "listItemDotNumberClickFocus": "Clique no ponto/número do item da lista para focar", + "listItemDotNumberClickFocusTip": "Quando ativado, clicar no ponto/número do item da lista focará no item da lista", + "reviewMode": "Modo de revisão", + "reviewModeTip": "Selecione a ordem em que cartões novos e antigos aparecem durante a revisão", + "reviewMode0": "Misturar novos e antigos", + "reviewMode1": "Novos primeiro", + "reviewMode2": "Antigos primeiro", + "fileAnnoRefPlaceholder": "Por favor, insira o ID do bloco", + "addToDatabase": "Adicionar ao Banco de Dados", + "clearContext": "Limpar contexto", + "cloudStoragePurge": "Limpar armazenamento em nuvem", + "cloudStoragePurgeConfirm": "Limpar o armazenamento em nuvem excluirá completamente todos os instantâneos não referenciados e objetos de dados relacionados. Tem certeza que deseja executar agora?", + "dragFill": "Arrastar verticalmente para preencher valor", + "switchReadonly": "Alternar modo somente leitura", + "original": "Original", + "selectRelation": "Por favor, selecione o campo relacionado primeiro", + "backRelation": "Bidirecional", + "thisDatabase": "Este banco de dados", + "relatedTo": "Relacionado a", + "relation": "Relação", + "rollup": "Rollup", + "rollupProperty": "Propriedade", + "rollupCalc": "Calcular", + "searchRelation": "Pesquisar um campo de relação", + "searchRollupProperty": "Pesquisar uma propriedade", + "replaceTypes": { + "text": "Texto normal", + "imgText": "Texto alternativo da imagem", + "imgTitle": "Título da imagem", + "imgSrc": "Link da imagem", + "aText": "Texto âncora do link", + "aTitle": "Título do link", + "aHref": "Link do link", + "code": "código inline", + "em": "Itálico", + "strong": "Negrito", + "inlineMath": "Fórmula inline", + "inlineMemo": "Memo inline", + "blockRef": "Texto âncora de referência", + "fileAnnotationRef": "Texto âncora de anotação PDF", + "kbd": "Teclado", + "mark": "Marca", + "s": "Tachado", + "sub": "Subscrito", + "sup": "Sobrescrito", + "tag": "Tag", + "u": "Sublinhado", + "docTitle": "Título do documento", + "codeBlock": "Bloco de código", + "mathBlock": "Bloco de fórmula", + "htmlBlock": "Bloco HTML" + }, + "selected": "Selecionado", + "loadMore": "Carregar mais", + "tempUnlock": "Desbloquear temporariamente", + "cancelTempUnlock": "Cancelar desbloqueio temporário", + "addFilter": "Adicionar filtro", + "removeFilters": "Limpar filtro", + "checked": "Marcado", + "unchecked": "Desmarcado", + "percentChecked": "Porcentagem marcada", + "percentUnchecked": "Porcentagem desmarcada", + "checkbox": "Caixa de seleção", + "unsplit": "Não dividir", + "unsplitAll": "Não dividir tudo", + "resetCardTip": "Tem certeza que deseja redefinir ${x} cartões de memorização?", + "freezeCol": "Congelar campo", + "unfreezeCol": "Descongelar campo", + "snippetsTip": "O snippet de código foi atualizado, deseja salvá-lo?", + "addBelowAbove": "Clique Adicionar abaixo
⌥Clique Adicionar acima", + "imported": "Importação concluída", + "mirrorTip": "Espelhar banco de dados, todas as atualizações de dados serão sincronizadas para todos os outros espelhos", + "includeTime": "Incluir hora", + "accountSupport1": "Desde seu primeiro lançamento público em 31 de agosto de 2020, o SiYuan foi lançado 776 vezes, resolveu requisitos e feedbacks de usuários 13840 vezes e cometeu código 17637 vezes. Não teríamos alcançado isso sem seu apoio e feedback.", + "accountSupport2": "Seu apoio e feedback tornarão o SiYuan melhor. Seremos sempre amigos dos usuários, trabalharemos duro para melhorar os produtos e fornecer uma melhor experiência de gerenciamento de conhecimento. Muito obrigado pelo seu apoio!", + "goToTab1": "Ir para aba #1", + "goToTab2": "Ir para aba #2", + "goToTab3": "Ir para aba #3", + "goToTab4": "Ir para aba #4", + "goToTab5": "Ir para aba #5", + "goToTab6": "Ir para aba #6", + "goToTab7": "Ir para aba #7", + "goToTab8": "Ir para aba #8", + "goToTab9": "Ir para última aba", + "goToTabNext": "Ir para próxima aba", + "goToTabPrev": "Ir para aba anterior", + "goToEditTabNext": "Ir para próxima aba editada", + "goToEditTabPrev": "Ir para aba editada anterior", + "createdTime": "Hora de criação", + "updatedTime": "Hora de atualização", + "lineNumber": "Número da linha", + "removeBookmark": "Remover marcador de ${x}?", + "defaultMargin": "Padrão", + "noneMargin": "Nenhum", + "minimalMargin": "Mínimo", + "customMargin": "Personalizado", + "marginTop": "Topo", + "marginRight": "Direita", + "marginBottom": "Inferior", + "marginLeft": "Esquerda", + "lockEdit": "Tornar documento somente leitura", + "unlockEdit": "Tornar documento gravável", + "enable": "Ativar", + "disable": "Desativar", + "removeWorkspacePhysically": "O espaço de trabalho foi removido da lista, e os dados neste espaço de trabalho ${x} serão excluídos permanentemente. Esta exclusão não pode ser desfeita, deseja continuar?", + "mainMenu": "Menu Principal", + "searchRemoveName": "Deseja excluir ${x} e atribuir sua condição de consulta a ${y}?", + "searchUpdateName": "Atualizar nome ${x} para ${y}?", + "searchAssetContent": "Pesquisar conteúdo de arquivo de ativo", + "searchOverwrite": "O nome da consulta está duplicado, deseja sobrescrever?", + "onepay": "PRO", + "format": "Formato numérico", + "numberFormatNone": "Número", + "numberFormatCommas": "Número com vírgulas", + "numberFormatPercent": "Porcentagem", + "numberFormatUSDollar": "Dólar Americano", + "numberFormatYuan": "Yuan", + "numberFormatEuro": "Euro", + "numberFormatPound": "Libra", + "numberFormatYen": "Iene", + "numberFormatRuble": "Rublo", + "numberFormatRupee": "Rúpia", + "numberFormatWon": "Won", + "numberFormatCanadianDollar": "Dólar Canadense", + "numberFormatFranc": "Franco", + "email": "E-mail", + "phone": "Telefone", + "inboxTip": "Abra o guia do usuário para pesquisar o inbox e visualizar as instruções", + "builtIn": "Integrado", + "endDate": "Data final", + "needLogin": "Esta função precisa estar logada para usar", + "calcResultCountAll": "Contar todos", + "calcResultCountValues": "Contar valores", + "calcResultCountUniqueValues": "Contar valores únicos", + "calcResultCountEmpty": "Contar vazios", + "calcResultCountNotEmpty": "Contar não vazios", + "calcResultPercentEmpty": "Porcentagem vazia", + "calcResultPercentNotEmpty": "Porcentagem não vazia", + "calcResultPercentUniqueValues": "Porcentagem de valores únicos", + "calcResultSum": "Soma", + "calcResultAverage": "Média", + "calcResultMedian": "Mediana", + "calcResultMin": "Mínimo", + "calcResultMax": "Máximo", + "calcResultRange": "Intervalo", + "calc": "Calcular", + "createWorkspace": "Criar Espaço de Trabalho", + "createWorkspaceTip": "Tem certeza que deseja usar este caminho para criar um espaço de trabalho?", + "calcOperatorNone": "Nenhum", + "calcOperatorCountAll": "Contar todos", + "calcOperatorCountValues": "Contar valores", + "calcOperatorCountUniqueValues": "Contar valores únicos", + "calcOperatorCountEmpty": "Contar vazios", + "calcOperatorCountNotEmpty": "Contar não vazios", + "calcOperatorPercentEmpty": "Porcentagem vazia", + "calcOperatorPercentNotEmpty": "Porcentagem não vazia", + "calcOperatorPercentUniqueValues": "Porcentagem de valores únicos", + "calcOperatorSum": "Soma", + "calcOperatorAverage": "Média", + "calcOperatorMedian": "Mediana", + "calcOperatorMin": "Mínimo", + "calcOperatorMax": "Máximo", + "calcOperatorRange": "Intervalo", + "calcOperatorEarliest": "Mais antigo", + "calcOperatorLatest": "Mais recente", + "filterOperatorIs": "É", + "filterOperatorIsNot": "Não é", + "filterOperatorContains": "Contém", + "filterOperatorDoesNotContain": "Não contém", + "filterOperatorStartsWith": "Começa com", + "filterOperatorEndsWith": "Termina com", + "filterOperatorIsEmpty": "Está vazio", + "filterOperatorIsNotEmpty": "Não está vazio", + "filterOperatorIsBetween": "Está entre", + "filterOperatorIsBefore": "É antes de", + "filterOperatorIsAfter": "É depois de", + "filterOperatorIsOnOrBefore": "É em ou antes de", + "filterOperatorIsOnOrAfter": "É em ou depois de", + "asc": "Ascendente", + "desc": "Descendente", + "hideCol": "Ocultar campo", + "hideAll": "Ocultar tudo", + "showAll": "Mostrar tudo", + "showCol": "Mostrar campo", + "number": "Número", + "date": "Data", + "select": "Selecionar", + "multiSelect": "Seleção múltipla", + "commandEmpty": "Nenhum comando ainda, clique para ir ao mercado instalar plugins", + "commandPanel": "Paleta de Comandos", + "cloudRegionNorthAmerica": "LiuYun (Centro de dados América do Norte)", + "cloudRegionChina": "LianDi (Centro de dados China Continental)", + "currentKernel": "Kernel atual", + "otherOnlineKernels": "Outros kernels online", + "syncPerception": "Percepção de sincronização", + "syncPerceptionTip": "Quando ativado, receberá e enviará sinais de sincronização de dados automaticamente, para que a sincronização de dados possa ser realizada para todos os dispositivos online o mais rápido possível em tempo real", + "hide": "Ocultar", + "wrap": "Quebrar coluna", + "edit": "Editar", + "incompatiblePluginTip": "Este plugin não é suportado no terminal atual", + "incompatible": "Incompatível", + "trust": "Confiar", + "bazaarTrust": "O pacote do mercado é semelhante a um aplicativo de terceiros, ele pode fazer o que quiser, então instalar um pacote do mercado no mercado tem certos riscos de segurança.", + "bazaarTrust3": "Damos grande importância a possíveis problemas de segurança. Para evitar riscos de segurança tanto quanto possível, as seguintes medidas foram tomadas:", + "bazaarTrustCodeReview": "Revisão de código antes da listagem", + "bazaarTrustCodeReviewTip": "Antes do pacote do mercado ser colocado nas prateleiras, revisaremos seu código", + "bazaarTrustOpenSource": "Código aberto", + "bazaarTrustOpenSourceTip": "O código da maioria dos pacotes do mercado é de código aberto, você pode revisar o código e prestar atenção aos problemas do repositório antes de instalar", + "bazaarCommunityReview": "Revisão por pares da comunidade", + "bazaarPeerReviewTip": "Numerosos desenvolvedores da comunidade podem revisar o código do pacote do mercado", + "bazaarUserReport": "Relatório do usuário", + "bazaarUserReportTip": "Se você encontrar código malicioso ou problemas de segurança no pacote do mercado, por favor, nos dê feedback", + "bazaarTrust1": "Uma vez que você escolhe confiar no mercado, não pode ser fechado. Se você instalou um pacote do mercado contendo código malicioso, por favor, exclua-o manualmente no sistema de arquivos", + "bazaarTrust2": "Isenção de responsabilidade: Para detalhes, consulte os termos relevantes na licença de código aberto AGPLv3 usada pelo SiYuan", + "pinTableHead": "Fixar cabeçalho da tabela", + "unpinTableHead": "Desafixar cabeçalho da tabela", + "enablePluginTip": "Você precisa ativar este plugin agora? Você pode ativar, desativar ou desinstalar mais tarde em [Baixados - Plugin]", + "enablePluginTip2": "Todos os plugins estão atualmente desativados, por favor, ative-os em [Baixados - Plugin]", + "enablePlugin": "Ativar plugin", + "color": "Cor", + "confirmPassword": "Eu já lembrei a senha", + "passwordNoMatch": "As senhas inseridas não coincidem", + "cloudConfigTip": "Por favor, configure em [Configurações - Nuvem]", + "confirmUninstall": "Tem certeza que deseja desinstalar ${name}?", + "scrollGetMore": "Role para cima e para baixo para carregar mais", + "flashcardNewCard": "Novo", + "flashcardReviewCard": "Antigo", + "flashcardDueCard": "Devido", + "flashcardCard": "Total", + "plugin": "Plugin", + "attrBookmarkTip": "Associar este bloco a um marcador para visualização posterior através do painel de marcadores", + "attrNameTip": "Definir um nome para este bloco, principalmente para referência e pesquisa, um bloco só pode ter um nome único", + "attrAliasTip": "Definir apelidos para este bloco, um bloco pode definir vários apelidos separados por vírgulas", + "attrMemoTip": "Definir um memo para este bloco, apenas texto simples é suportado", + "switchDirect": "Alternar direção de comparação", + "onlySearchForDoc": "[[ apenas pesquisa documentos", + "onlySearchForDocTip": "Quando ativado, [[ ou 【【 para pesquisar referências de bloco apenas em nomes de documentos", + "ocrResult": "Texto do resultado OCR", + "reOCR": "Refazer OCR", + "continueReview1": "Continuar Revisão", + "continueReview2": "Ainda há ${count} cartões para revisar, continuar?", + "whatsNewInSiYuan": "Novidades no SiYuan", + "returnDesktop": "Pressione voltar novamente para a área de trabalho. Use [Sair do Aplicativo] no painel da barra lateral direita para sair normalmente do aplicativo", + "enterNew": "Enter para criar", + "enterNewTip": "Nenhum documento encontrado, Enter para criar um novo documento.", + "searchTip1": "para navegar", + "searchTip2": "para abrir", + "searchTip3": "para alternar para o próximo resultado", + "searchTip4": "para abrir à direita", + "searchTip5": "para dispensar", + "showRecentUpdatedBlocks": "Os blocos mais recentemente atualizados serão mostrados quando a entrada estiver vazia", + "revisionCount": "Número de revisões", + "nextDue": "Próximo Vencimento", + "flashcardNewCardLimit": "Limite de Cartões Novos", + "flashcardNewCardLimitTip": "Se houver muitos cartões novos, você pode definir o número de cartões novos para revisar através deste item", + "flashcardReviewCardLimit": "Limite de Cartões Antigos", + "flashcardReviewCardLimitTip": "Se houver muitos cartões antigos, você pode definir o número de cartões antigos para revisar através deste item", + "flashcardMark": "Marcar Cartão", + "flashcardMarkTip": "Quando ativado, a marca é reconhecida como preenchimento em branco", + "flashcardList": "Listar Cartão", + "flashcardListTip": "Quando ativado, o primeiro item de uma lista é reconhecido como uma pergunta, e o restante dos itens da lista são reconhecidos como respostas", + "flashcardSuperBlock": "Super Bloco Cartão", + "flashcardSuperBlockTip": "Quando ativado, o primeiro bloco filho de um super bloco é reconhecido como uma pergunta, e o restante dos blocos filhos são reconhecidos como respostas", + "flashcardHeading": "Bloco de Título Cartão", + "flashcardHeadingTip": "Quando ativado, o bloco de título é reconhecido como uma pergunta, e os blocos abaixo são reconhecidos como respostas", + "flashcardDeck": "Baralho", + "flashcardDeckTip": "Quando ativado, a classificação de baralho de cartas é suportada. Esta é uma opção de compatibilidade histórica, não é recomendável ativar a menos que necessário, e é recomendável usar Criar cartão rápido", + "flashcardFSRSParamRequestRetention": "Retenção de Solicitação FSRS", + "flashcardFSRSParamRequestRetentionTip": "Representa a probabilidade de recall que você deseja atingir. Observe que há uma compensação entre maior retenção e maior número de repetições. Recomenda-se definir este valor entre 0,8 e 0,9", + "flashcardFSRSParamMaximumInterval": "Intervalo Máximo FSRS", + "flashcardFSRSParamMaximumIntervalTip": "O número máximo de dias entre repetições", + "flashcardFSRSParamWeights": "Pesos FSRS", + "flashcardFSRSParamWeightsTip": "Parâmetros de peso do algoritmo. O valor padrão é obtido de uma amostra menor. Se ajustes forem necessários, use o otimizador FSRS para calcular", + "apiKey": "Chave API", + "apiKeyTip": "Recomenda-se atribuir uma Chave API separada ao SiYuan para gerenciamento subsequente. Se este item estiver em branco, as funções relacionadas à IA serão desativadas", + "apiTimeout": "Tempo limite", + "apiTimeoutTip": "O período de tempo limite para iniciar uma solicitação, unidade: segundo", + "apiProxy": "Proxy de rede", + "apiProxyTip": "O proxy de rede que inicia a solicitação, como socks://user:pass@127.0.0.1:1080", + "apiModel": "Modelo", + "apiModelTip": "O parâmetro model passado ao solicitar a API é usado para controlar o estilo do texto gerado (o ID de Implantação precisa ser preenchido ao usar o serviço Azure OpenAI)", + "apiMaxTokens": "Número máximo de Tokens", + "apiMaxTokensTip": "O parâmetro max_tokens passado ao solicitar a API é usado para controlar o comprimento do texto gerado", + "apiTemperature": "Temperatura", + "apiTemperatureTip": "O parâmetro temperature passado ao solicitar a API é usado para controlar a aleatoriedade do texto gerado", + "apiMaxContexts": "Número máximo de contextos", + "apiMaxContextsTip": "O número máximo de contextos passados ao solicitar a API", + "apiBaseURL": "URL base da API", + "apiBaseURLTip": "O endereço base da solicitação, como https://api.openai.com/v1", + "apiUserAgentTip": "O agente do usuário que iniciou a solicitação, ou seja, o cabeçalho HTTP User-Agent", + "apiVersion": "Versão da API", + "apiVersionTip": "Obrigatório apenas ao usar o serviço Azure OpenAI", + "apiProvider": "Provedor da API", + "apiProviderTip": "Use o provedor de API selecionado para implementar funções relacionadas à IA", + "skip": "Pular", + "nextRound": "Próxima rodada", + "save": "Salvar", + "ai": "Inteligência Artificial", + "aiContinueWrite": "Continuar escrevendo", + "aiTranslate": "Traduzir", + "aiExtractSummary": "Extrair resumo", + "aiBrainStorm": "Tempestade de ideias", + "aiFixGrammarSpell": "Corrigir gramática, ortografia e erros de digitação", + "aiCustomAction": "Ação personalizada...", + "aiWriting": "Escrita IA", + "database": "Banco de dados", + "manage": "Gerenciar", + "spaceRepetition": "Repetição Espaçada", + "space": "Espaço", + "cardShowAnswer": "Mostrar Resposta", + "cardRatingAgain": "Novamente", + "cardRatingHard": "Difícil", + "cardRatingGood": "Bom", + "cardRatingEasy": "Fácil", + "pdfIsLoading": "PDF está carregando, por favor, tente novamente mais tarde", + "addToDeck": "Adicionar ao Baralho...", + "quickMakeCard": "Criar cartão rápido", + "allAttrs": "Todos os nomes e valores de atributos", + "chooseSyncDirection": "Escolher direção de sincronização", + "uploadData2Cloud": "⬆️ Enviar instantâneo de dados local", + "uploadData2CloudTip": "Gerar um instantâneo de dados e depois enviar para a nuvem", + "downloadDataFromCloud": "⬇️ Baixar instantâneo de dados da nuvem", + "downloadDataFromCloudTip": "Baixar o último instantâneo de dados da nuvem e mesclar com os dados locais", + "targetBlockID": "ID do Bloco Alvo", + "transferBlockRefTip": "Transferir todas as referências deste bloco para o bloco alvo", + "transferBlockRef": "Transferir Referência", + "sortByFiletree": "Usar regra de ordenação da árvore de documentos", + "tabToWindow": "Mover para Nova Janela", + "openByNewWindow": "Abrir com Nova Janela", + "exitFocus": "Sair do foco", + "pointExchangeSize": "Troca de Pontos", + "panels": "Painéis", + "copyPath": "Copiar Caminho", + "workspaceList": "Espaços de Trabalho", + "removeWorkspaceTip": "Remover dos Espaços de Trabalho", + "new": "Novo", + "share2LiandiConfirmTip": "Tem certeza que deseja publicar este documento na comunidade?
Uma vez publicado, todos poderão visualizar este documento, certifique-se de que não contém informações sensíveis", + "share2Liandi": "Compartilhar para comunidade", + "noDueCard": "Bom trabalho! Não há mais tarefas de revisão no momento, volte mais tarde!", + "createDeck": "Criar Baralho", + "addDeck": "Adicionar ao baralho", + "removeDeck": "Remover do baralho", + "riffCard": "Cartão de Memorização", + "compare": "Comparar", + "switchTab": "Alternador", + "recentDocs": "Documentos recentes", + "autoLaunch": "Inicialização automática ao iniciar", + "autoLaunchTip": "Quando ativado, o aplicativo será iniciado automaticamente após o login no sistema operacional", + "sortByContent": "Ordem original do conteúdo", + "sortByRankDesc": "Relevância DESC", + "sortByRankAsc": "Relevância ASC", + "saveCriterion": "Salvar critérios de consulta", + "useCriterion": "A próxima consulta não usará mais os critérios de consulta atuais", + "removeCriterion": "Remover critérios de consulta", + "group": "Grupo", + "noGroupBy": "Sem agrupamento", + "groupByDoc": "Agrupar por documento", + "leftRightLayout": "Layout esquerda e direita", + "topBottomLayout": "Layout superior e inferior", + "keyword": "Palavra-chave", + "searchMethod": "Método de Pesquisa", + "regex": "Regex", + "keywordsLimit": "Limite de Palavras-chave", + "exportAsImage": "Exportar como imagem", + "proFeature": "Este recurso requer pagamento (assinantes não precisam pagar separadamente), pagamento único pode ser usado por toda a vida", + "syncOfficialProviderIntro": "Atualmente selecionado é o serviço de armazenamento em nuvem fornecido oficialmente pelo SiYuan, que suporta apenas usuários assinantes pagos", + "syncThirdPartyProviderS3Intro": "Atualmente selecionado é um serviço de armazenamento em nuvem de terceiros compatível com o protocolo Amazon S3 (por exemplo, Qiniu, Aliyun OSS, Cloudflare R2)", + "syncThirdPartyProviderWebDAVIntro": "Atualmente selecionado é um serviço de armazenamento em nuvem de terceiros com o protocolo WebDAV. Devido ao desempenho ruim e estabilidade insuficiente deste protocolo, recomenda-se escolher o serviço S3 primeiro", + "syncThirdPartyProviderLocalIntro": "Atualmente selecionado é o serviço de armazenamento fornecido pelo sistema de arquivos local. Por favor, insira o caminho completo da pasta local no campo Endpoint", + "syncThirdPartyProviderTip": "Antes de usar este recurso, preste atenção às limitações técnicas e itens de cobrança do serviço de armazenamento em nuvem de terceiros:
  • Limitações técnicas como frequência de chamadas de interface e largura de banda
  • Itens de cobrança como espaço de armazenamento e tráfego
  • Termos de uso e garantia de disponibilidade
Isenção de responsabilidade: Para detalhes, consulte os termos relevantes na licença de código aberto AGPLv3 usada pelo SiYuan", + "syncProvider": "Provedor de serviço de armazenamento em nuvem", + "syncProviderTip": "Se selecionado, o serviço de armazenamento em nuvem deste provedor será usado para alcançar funções de sincronização e backup em nuvem", + "confirmReset": "Tem certeza que deseja redefinir todos os atalhos de teclado para as configurações padrão?", + "notBatchRemove": "Exclusão em lote de bloco de notas não suportada", + "confirmRemoveAll": "Tem certeza que deseja excluir os ${count} documentos selecionados e seus subdocumentos?", + "microphoneDenied": "É necessário permitir que o SiYuan acesse o microfone nas Preferências do Sistema", + "microphoneNotAccess": "O acesso ao microfone foi negado, vá para as Preferências do Sistema para redefinir", + "dynamicLoadBlocks": "Número de blocos carregados dinamicamente", + "dynamicLoadBlocksTip": "Este valor contém o número de subblocos. Se houver muitos blocos de código, blocos de fórmula ou blocos de gráfico que precisam ser renderizados, recomenda-se não definir muito grande", + "backlinkExpand": "Backlink expandir padrão", + "backlinkExpandTip": "Se configurado como 0", + "backmentionExpand": "Backmention expandir padrão", + "backmentionExpandTip": "Se configurado como 0, não será expandido, se configurado como -1, o painel será fechado", + "googleAnalytics": "Google Analytics", + "googleAnalyticsTip": "Quando ativado, usará Google Analytics para estatísticas do status de abertura do aplicativo e não coletará dados e operações dos usuários", + "floatWindowMode": "Método de acionamento da janela flutuante", + "floatWindowModeTip": "Escolha como acionar a janela flutuante quando o mouse passar sobre o ícone do bloco, ícone de navegação estrutural, etc.", + "floatWindowMode0": "Passar o mouse", + "floatWindowMode1": "Pressionar e segurar ${hotkey} + Passar o mouse", + "floatWindowMode2": "Não acionar", + "codeSnippet": "Snippet de Código", + "codeSnippetTip": "Ajuste fino da interface ou funcionalidade através de snippets de código", + "expandDown": "Expandir para Baixo", + "expandUp": "Expandir para Cima", + "goForward": "Avançar", + "goBack": "Voltar", + "docNameAndContent": "Nome e Conteúdo do Documento", + "breadcrumb": "Navegação Estruturada", + "embedBlockBreadcrumb": "Navegação Estruturada de Bloco Incorporado", + "embedBlockBreadcrumbTip": "Quando ativado, blocos incorporados exibirão navegação estrutural, blocos incorporados em super blocos ignoram esta opção e nunca mostram navegação estrutural", + "appearanceMode": "Modo de Aparência", + "editReadonly": "Modo somente leitura", + "editReadonlyTip": "Quando ativado, o editor carregará o documento em modo somente leitura", + "generateConflictDoc": "Gerar documentação de conflito quando houver conflitos de sincronização", + "generateConflictDocTip": "Quando ativado, um documento de conflito será gerado quando ocorrer um conflito de sincronização, para que possa ser aberto e visualizado diretamente. Independentemente de estar ativado ou não, o [Histórico de Dados] registrará o documento de conflito", + "deleteOpConfirm": "⚠️ Confirmação de operação de exclusão", + "filterKeywordEnter": "Filtrar palavra-chave Enter", + "defBlock": "Bloco de definição", + "defBlockChildren": "Definir bloco e seus filhos", + "filter": "Filtrar", + "headings1": "Títulos e Blocos Inferiores", + "tWithSubtitle": "Transformação com subtítulos", + "clear": "Limpar", + "autoDownloadUpdatePkg": "Baixar automaticamente pacote de atualização", + "autoDownloadUpdatePkgTip": "Quando ativado, verificará automaticamente a atualização de versão a cada duas horas. Se houver uma versão atualizada, baixará automaticamente o pacote de instalação e solicitará instalação", + "downloaded": "Baixado", + "allOp": "Todas as operações", + "allNotebooks": "Todos os Blocos de Notas", + "historyClean": "limpar", + "historyUpdate": "atualizar", + "historyDelete": "excluir", + "historyFormat": "formatar", + "historySync": "sincronizar", + "historyReplace": "substituir", + "historyOutline": "esboço", + "htmlBlockError": "A execução do seguinte script afetará a exibição da interface, e o script parou de rodar", + "fileHistory": "Histórico de arquivo", + "htmlBlockTip": "Vários blocos HTML são formados. Para evitar perda de dados, use tags <div> para envolver e remover linhas em branco", + "katexMacros": "Definição de macro KaTeX", + "katexMacrosTip": "Use o formato de objeto JSON ({}) para envolver definições de macro, por exemplo { \"\\\\foo\": \"{x^2}\" }", + "systemLogTip": "Registros de execução do programa são salvos no log do sistema. Exportando o log do sistema e enviando para os desenvolvedores, pode ajudar melhor os desenvolvedores a diagnosticar problemas do programa", + "systemLog": "Log do sistema", + "syncConfGuide1": "Inicializar chave de sincronização", + "syncConfGuide2": "Esta chave é usada para criptografia de ponta a ponta de sincronização de dados
A chave é gerada com base na senha que você insere, lembre-se da senha", + "syncConfGuide3": "O diretório de sincronização em nuvem é usado para armazenar os dados criptografados correspondentes ao espaço de trabalho atual. O nome padrão é main. Se você tiver apenas um espaço de trabalho para sincronizar, use main diretamente", + "syncConfGuide4": "Sincronizar agora?", + "syncConfGuide5": "Se a quantidade de dados for grande, a primeira sincronização será lenta, aguarde pacientemente
Não alterne de aplicativo e mantenha a tela acesa enquanto o iOS/iPad estiver sincronizando", + "copyPlainText": "Copiar texto simples", + "findInDoc": "Corresponde a ${y} blocos em ${x} documentos", + "matchDoc": "Correspondeu a ${x} documentos", + "jumpToParentNext": "Pular para o próximo bloco do bloco pai", + "jumpToParentPrev": "Pular para o bloco anterior do bloco pai", + "jumpToParent": "Pular para bloco pai", + "initRepoKeyTip": "Se a chave já foi inicializada em outros dispositivos, use [Importar Chave] ou gere a chave com a mesma frase secreta, caso contrário os dados não poderão ser sincronizados para a nuvem, portanto, certifique-se de usar a mesma chave em todos os dispositivos", + "crossKeepLazyLoad": "Seleção múltipla entre páginas precisa selecionar [Manter Conteúdo Carregado] no menu mais", + "keepLazyLoad": "Manter conteúdo carregado", + "localSnapshot": "Instantâneo local", + "localTagSnapshot": "Instantâneo de tag local", + "cloudSnapshot": "Instantâneo em nuvem", + "cloudTagSnapshot": "Instantâneo de tag em nuvem", + "cloudBackupTip": "Por favor, vá para [Histórico de Dados - Instantâneo de Dados] para operar", + "snapshotMemo": "Memo do Instantâneo", + "snapshotMemoTip": "Por favor, insira o memo do instantâneo", + "tagSnapshot": "Instantâneo de Tag", + "tagSnapshotUpload": "Instantâneo de tag e upload", + "tagSnapshotTip": "Não inclua símbolos \\ / : * ? " ' < > |", + "dataRepo": "Repositório de dados", + "newSubDoc": "Criar subdocumento", + "newSubDocRef": "Criar subdocumento com referência", + "newDocBelow": "Criar documento abaixo", + "newDocAbove": "Criar documento acima", + "fullWidth": "Largura Adaptável", + "switchAdjust": "Alternar largura adaptável", + "fullWidthTip": "Quando ativado, a área de edição será exibida o mais ampla possível", + "tabLimit": "Limite de Abas", + "tabLimit1": "Ordenar por hora de abertura, fechar a aba aberta mais antiga", + "pasteEscaped": "Colar texto escapado", + "resetRepoTip": "Redefinir o repositório de dados excluirá completamente a chave e todos os instantâneos, tem certeza que deseja redefinir?", + "resetRepo": "Redefinir repositório de dados", + "createSnapshot": "Criar instantâneo", + "dataSnapshot": "Instantâneo de dados", + "copyKey": "Copiar string da chave", + "importKey": "Importar chave", + "keyPlaceholder": "Por favor, cole a string da chave aqui", + "key": "Chave", + "genKey": "Gerar chave automaticamente", + "genKeyByPW": "Gerar chave por frase secreta", + "dataRepoKeyTip1": "O repositório de dados é usado para criptografar e salvar instantâneos de dados. Instantâneos podem ser criados e revertidos no [Histórico de Dados]", + "dataRepoKeyTip2": "Todos os dispositivos devem usar a mesma chave, se as chaves forem inconsistentes, os dados não poderão ser sincronizados para a nuvem", + "dataRepoKey": "Chave do repositório de dados", + "dataRepoPurge": "Limpar repositório de dados", + "dataRepoPurgeTip": "Excluir todos os instantâneos não referenciados e objetos de dados relacionados", + "dataRepoPurgeConfirm": "Limpar o repositório de dados excluirá completamente todos os instantâneos não referenciados e objetos de dados relacionados, tem certeza que deseja limpar?", + "purge": "Limpar", + "plsChoose": "Por favor, escolha primeiro", + "clearMessage": "Ler", + "freeSub": "Assinatura de Teste Gratuita", + "sortByUpdateTimeDesc": "Decrescente por hora de atualização", + "sortByUpdateTimeAsc": "Crescente por hora de atualização", + "sortByDownloadsDesc": "Decrescente por downloads", + "sortByDownloadsAsc": "Crescente por downloads", + "activationCode": "Código de ativação", + "activationCodePlaceholder": "Por favor, insira seu código de ativação de assinatura aqui", + "exportDataTip": "Empacotar e exportar todos os arquivos na pasta workspace/data/ como um arquivo zip", + "importDataTip": "Importar o arquivo zip exportado, sobrescrevendo a pasta workspace/data/ por caminho", + "includeChildDoc": "Incluir subdocumentos", + "text": "Texto", + "lastUsed": "Aparência usada recentemente", + "removedNotebook": "Bloco de notas removido", + "querySyntax": "Sintaxe de Consulta", + "rollback": "Reverter", + "custom": "Personalizado", + "feedback": "Feedback", + "inbox": "Caixa de Entrada", + "turnToStatic": "Texto âncora estático", + "turnToDynamic": "Texto âncora dinâmico", + "sizeLimit": "Limite", + "trafficStat": "Estatísticas de tráfego", + "hideHeadingBelowBlocks": "Ocultar blocos abaixo do título", + "matchDiacritics": "Corresponder Diacríticos", + "copyHPath": "Copiar caminho legível", + "justify": "Justificar", + "justifyTip": "Renderizar conteúdo alinhado", + "rtl": "Direita para Esquerda (RTL)", + "ltr": "Esquerda para Direita (LTR)", + "rtlTip": "Renderizar conteúdo da direita para a esquerda", + "height": "Altura", + "deactivateUser": "Desativar Conta", + "deactivateUserTip": "", + "mergeCell": "Mesclar Célula", + "cancelMerged": "Cancelar mesclagem de célula", + "useDefaultWidth": "Usar Largura de Coluna Padrão", + "useDefaultAlign": "Usar alinhamento padrão", + "type": "Tipo", + "replaceType": "Tipo de substituição", + "searchType": "Tipo de pesquisa", + "searchBlockType": "Tipos de bloco (pesquisa nos tipos ativados abaixo, a opção de filtro na pesquisa global substitui esta configuração)", + "searchBlockAttr": "Atributos de bloco (pesquisa não apenas no conteúdo, mas também nos seguintes atributos ativados)", + "searchIndex": "Índice", + "indexAssetPath": "Caminho do ativo", + "searchBackmention": "Menções de backlink (palavras-chave de pesquisa de menções de backlink são obtidas de)", + "searchVirtualRef": "Referência virtual (palavras-chave de pesquisa de referência virtual são obtidas de)", + "netImg2LocalAsset": "Converter imagens da rede em imagens locais", + "netAssets2LocalAssets": "Converter ativos da rede em locais", + "releaseDate": "Data de Lançamento", + "pkgSize": "Tamanho do pacote", + "installSize": "Tamanho da instalação", + "installDate": "Data de instalação", + "optimizeTypography": "Otimizar tipografia", + "dragPosition": "Arrastar imagem para reposicionar", + "exportPDF0": "Tamanho da Página", + "exportPDF1": "Página paisagem", + "exportPDF2": "Margens da página", + "exportPDF3": "Escala da página", + "exportPDF4": "Incorporar ativos", + "exportPDF5": "Manter dobrado", + "mergeSubdocs": "Mesclar subdocumentos", + "removeAssetsFolder": "Remover diretório de ativos", + "upload": "Enviar", + "reminderTip": "O horário do lembrete não pode ser menor que o horário atual", + "wechatTip": "O bloco de conteúdo será enviado para a nuvem em texto claro e enviado através da mensagem de modelo MP do WeChat quando expirar", + "notEmpty": "O horário do lembrete não pode estar vazio", + "experimentalFeature": "(⚗️ Este recurso está em fase experimental)", + "wechatReminder": "Lembrete WeChat", + "notifyTime": "Hora de Notificação", + "docName": "Nome do Documento", + "bootSyncFailed": "Falha ao sincronizar dados na inicialização", + "use": "Usar", + "uninstallTip": "Atualmente em uso, por favor, alterne em [Configurações - Aparência] antes de desinstalar", + "safeQuit": "Sair do Aplicativo", + "anchor": "Âncora", + "showMore": "Mostrar Mais", + "refPopover": "Abrir em popover", + "refTab": "Abrir em aba em segundo plano", + "showHideBg": "Mostrar/Ocultar Plano de Fundo", + "directConnection": "Conexão direta", + "networkProxy": "Proxy de Rede", + "copyAnnotation": "Copiar Anotação", + "rectAnnotation": "Anotação Retangular", + "fileName": "Nome do arquivo", + "fileSize": "Tamanho do arquivo", + "fileCount": "Contagem de arquivos", + "title1": "Título", + "author": "Autor", + "subject": "Assunto", + "keywords": "Palavras-chave", + "creationDate": "Data de Criação", + "modificationDate": "Data de Modificação", + "creator": "Criador", + "producer": "Produtor", + "version": "Versão", + "pageCount": "Contagem de Páginas", + "pageSize": "Tamanho da Página", + "linearized": "Visualização Rápida na Web", + "firstPage": "Ir para Primeira Página", + "lastPage": "Ir para Última Página", + "rotateCw": "Girar no Sentido Horário", + "rotateCcw": "Girar no Sentido Anti-Horário", + "cursorText": "Ferramenta de Seleção de Texto", + "cursorHand": "Ferramenta de Mão", + "scrollVertical": "Rolagem Vertical", + "scrollHorizontal": "Rolagem Horizontal", + "scrollWrapped": "Rolagem Envolta", + "spreadNone": "Sem Espalhamento", + "spreadOdd": "Espalhamento Ímpar", + "spreadEven": "Espalhamento Par", + "find_match_count_limit": "Mais de {{limit}} correspondência(s)", + "find_match_count": "{{current}} de {{total}} correspondência(s)", + "findHighlight": "Destacar todos", + "findEntireWord": "Palavras inteiras", + "presentationMode": "Alternar para Modo de Apresentação", + "focusOutline": "Encontrar Item de Esboço Atual", + "previousLabel": "Anterior", + "nextLabel": "Próximo", + "pageScaleWidth": "Largura da Página", + "pageScaleFit": "Ajustar Página", + "pageScaleAuto": "Zoom Automático", + "pageScaleActual": "Tamanho Real", + "thumbPageTitle": "Página {{page}}", + "loading": "Carregando…", + "toggleSidebarNotification2Title": "Alternar Barra Lateral (documento contém esboço/anexos/camadas)", + "toggleSidebarTitle": "Alternar Barra Lateral", + "loadingError": "Ocorreu um erro ao carregar o PDF.", + "invalidFileError": "Arquivo PDF inválido ou corrompido.", + "missingFileError": "Arquivo PDF ausente.", + "unexpectedResponseError": "Resposta inesperada do servidor.", + "printingNotSupported": "Aviso: A impressão não é totalmente suportada por este navegador.", + "printingNotReady": "Aviso: O PDF não está totalmente carregado para impressão.", + "unitInches": "pol", + "unitMillimeters": "mm", + "additionalLayers": "Camadas Adicionais", + "thumbsTitle": "Mostrar Miniaturas", + "document_properties_page_size_name_a3": "A3", + "document_properties_page_size_name_a4": "A4", + "document_properties_page_size_name_letter": "Carta", + "document_properties_page_size_name_legal": "Legal", + "document_properties_page_size_orientation_portrait": "retrato", + "document_properties_page_size_orientation_landscape": "paisagem", + "find_not_found": "Frase não encontrada", + "find_reached_top": "Chegou ao topo do documento, continuado a partir do final", + "find_reached_bottom": "Chegou ao final do documento, continuado a partir do topo", + "password_label": "Digite a senha para abrir este arquivo PDF.", + "password_invalid": "Senha inválida. Por favor, tente novamente.", + "stateExcepted": "\uD83D\uDEA7 Estado anormal", + "rebuildIndex": "Reconstruir Índice", + "rebuildIndexTip": "Foi encontrado um erro de execução do sistema, por favor, escolha se deseja sair ou reconstruir o índice para reparar", + "closeNotebook": "Blocos de notas fechados", + "widget": "Widget", + "customEmoji": "Adicionar emoji personalizado", + "customEmojiTip": "Coloque imagens na pasta emojis, você pode usar uma pasta para classificação, o caminho não deve conter espaços ou marcadores Markdown", + "recentEmoji": "Emojis Comuns", + "changeIcon": "Alterar ícone", + "addIcon": "Adicionar ícone", + "includeSubFile": "\nIncluir x subdocumentos", + "untitled": "Sem título", + "lockScreen": "Bloquear Tela", + "cloudIntro1": "Sincronização de dados criptografada de ponta a ponta", + "cloudIntro2": "O processo de criptografia e descriptografia é totalmente realizado no dispositivo local", + "cloudIntro3": "O algoritmo de criptografia é o AES GCM reconhecido como seguro pela indústria", + "cloudIntro4": "A senha definida pelo usuário é criptografada com a chave embutida do programa e armazenada localmente", + "cloudIntro5": "A menos que você saiba a senha ou use força bruta, não pode ser descriptografado", + "cloudIntro6": "Número ilimitado de dispositivos e número de espaços de trabalho", + "cloudIntro7": "Diferentes espaços de trabalho locais correspondem a diferentes diretórios de sincronização de dados na nuvem", + "cloudIntro8": "Diferentes dispositivos mantêm seu próprio histórico de dados, e dados sobrescritos ou excluídos por sincronização não serão perdidos", + "cloudIntro9": "Serviço de hospedagem de ativos em nuvem", + "cloudIntro10": "Envie arquivos de ativos locais para a nuvem com um clique", + "cloudIntro11": "Copie o documento para as plataformas Wechat MP, Zhihu, Yuque, etc. com um clique", + "selectAll": "Selecionar tudo", + "reposTip": "O nome do diretório de sincronização em nuvem correspondente ao espaço de trabalho atual, você pode selecioná-lo em outros dispositivos após ser criado no primeiro dispositivo", + "stickOpen": "Manter tudo aberto", + "cloud": "Nuvem", + "setEmojiTip": "Por favor, vá para [Configurações - Aparência para adicionar emoji]", + "openSyncTip1": "Ativar sincronização em nuvem", + "openSyncTip2": "Ao alterar de desativado para ativado, recomenda-se clicar manualmente no botão de sincronização para acionar uma sincronização", + "syncMode": "Modo de sincronização em nuvem", + "syncModeTip": "O modo de sincronização pode ser selecionado após a sincronização em nuvem ser ativada", + "syncMode1": "Automático", + "syncMode2": "Manual (automático apenas uma vez quando o software é iniciado e fechado, outras vezes precisa acionar manualmente)", + "syncMode3": "Sincronização totalmente manual (sem sincronização na inicialização e desligamento, controle totalmente manual do tempo de sincronização e direção de sincronização)", + "cloudSync": "Sincronização em nuvem", + "cloudSyncDir": "Diretório de sincronização em nuvem", + "cloudSyncDirTip": "O diretório de sincronização em nuvem corresponde um a um com o espaço de trabalho e não pode ser misturado. Após alterar a chave do repositório de dados, um novo diretório de sincronização em nuvem precisa ser substituído", + "emptyCloudSyncList": "A lista de sincronização em nuvem está vazia", + "retry": "Tentar novamente", + "insertVideoURL": "Inserir link de vídeo", + "insertAudioURL": "Inserir link de áudio", + "insertImgURL": "Inserir link de imagem", + "insertIframeURL": "Inserir link IFrame", + "context": "Contexto", + "dockTip": "\nClique Abrir/Minimizar\nClique Direito/Arrastar Ajustar posição", + "shadow": "Sombra", + "hollow": "Oco", + "attrValue1": "Deixar o valor do atributo em branco excluirá automaticamente o atributo", + "specifyPath": "Especificar caminho", + "addAttr": "Adicionar", + "addTag": "Adicionar Tag", + "width": "Largura", + "attrName": "Nome do atributo", + "attr": "Atributo", + "updatePath": "Alterar diretório", + "default": "Padrão", + "titleBg": "Adicionar capa", + "random": "Aleatório", + "cloudBackup": "Backup em nuvem", + "total": "Total", + "cdn": "Ativos", + "backup": "Backup", + "cloudStorage": "Armazenamento em nuvem", + "vLayout": "Layout vertical", + "hLayout": "Layout horizontal", + "merge": "Mesclar", + "wordCount": "Palavras", + "runeCount": "Caracteres", + "linkCount": "Links", + "imgCount": "Imagens", + "refCount": "Referências", + "blockCount": "Blocos", + "kbd": "Teclado", + "errorStyle": "Estilo de Erro", + "successStyle": "Estilo de Sucesso", + "warningStyle": "Estilo de Aviso", + "infoStyle": "Estilo de Informação", + "chart": "Gráfico", + "staff": "Equipe", + "sup": "Sobrescrito", + "sub": "Subscrito", + "enter": "Ampliar", + "enterBack": "Reduzir", + "duplicate": "Duplicar", + "turnInto": "Transformar em", + "split": "Dividir", + "underline": "Sublinhado", + "inline-math": "Fórmula Inline", + "moveToUp": "Mover para Cima", + "moveToDown": "Mover para Baixo", + "moveToLeft": "Mover para Esquerda", + "moveToRight": "Mover para Direita", + "copyProtocol": "Copiar hiperlink do bloco", + "copyProtocolInMd": "Copiar link Markdown do bloco", + "uploadAssets2CDN": "Enviar arquivos de ativos para a nuvem", + "uploadAssets2CDNConfirmTip": "Tem certeza que deseja enviar os ativos neste documento para a nuvem?", + "notSupport1": "Não suporta arrastar e soltar entre blocos de notas", + "keymapTip": "Após modificar alguns atalhos, você precisa clicar no botão de atualizar para ter efeito", + "keymapTip2": "Usar atalhos padrão", + "searchLimit": "O número de resultados de pesquisa exibidos", + "searchLimit1": "Se a quantidade de dados for grande, não configure o valor muito grande, o padrão é 64", + "searchLimit2": "Este item de configuração afeta todas as funções relacionadas a pesquisas, como pesquisa de referência de bloco, histórico de arquivo, bloco de incorporação de consulta, painel de abas e função de modelo queryBlocks/querySpans", + "searchCaseSensitive": "Diferencia maiúsculas de minúsculas", + "searchCaseSensitive1": "Quando ativado, todas as funções relacionadas a pesquisa diferenciarão maiúsculas de minúsculas", + "toggleWin": "Ocultar/Mostrar Janela", + "customSort": "Ordenação Personalizada", + "collapse": "Recolher", + "blockEmbed": "Incorporar Bloco", + "rowTip": "Clique Abrir Menu
Arraste Ordenar
⇧Clique Atualizar atributo", + "gutterTip": "Clique/⌘/ Abrir Menu
⌘Clique/⌥→ Focar
⌥Clique/⌘↑ Recolher/Expandir
⇧Clique/⌥⌘A Atualizar atributo
Arraste Mover posição
⌃Arraste Repetir
⌥Arraste Gerar referência de bloco
⇧Arraste Gerar bloco incorporado", + "gutterTip2": "Clique Abrir Menu
⇧Clique Atualizar atributo", + "linkDistance": "Distância do link", + "collideStrength": "Força de colisão", + "collideRadius": "Raio de colisão", + "centerStrength": "Força central", + "lineOpacity": "Opacidade da linha", + "lineWidth": "Tamanho da linha", + "nodeSize": "Tamanho do nó", + "arrow": "Seta", + "paragraph": "Parágrafo", + "math": "Bloco de Fórmula", + "listItem": "Item de lista", + "superBlock": "Super bloco", + "embedBlock": "Bloco incorporado", + "expand": "Expandir", + "toggleDock": "Mostrar/Ocultar Dock", + "notebookName": "Por favor, insira um nome para o bloco de notas", + "moveToLeftTop": "Mover para o Canto Superior Esquerdo", + "moveToLeftBottom": "Mover para o Canto Inferior Esquerdo", + "moveToRightTop": "Mover para o Canto Superior Direito", + "moveToRightBottom": "Mover para o Canto Inferior Direito", + "moveToBottomLeft": "Mover para o Inferior Esquerdo", + "moveToBottomRight": "Mover para o Inferior Direito", + "accountDisplayTitle": "Exibir ícone de título", + "accountDisplayVIP": "Exibir ícone VIP", + "rollbackConfirm": "A operação de reversão não pode ser desfeita, prossiga com cautela. Tem certeza que deseja reverter ${name} para ${time}?", + "pdfTip": "A exportação PDF não suporta o tema Escuro", + "pdfConfirm": "Deseja continuar exportando com o tema Claro selecionado?", + "import": "Importar", + "doc": "Documento", + "openBy": "Abrir", + "replace": "Substituir", + "replaceAll": "Substituir Tudo", + "alias": "Apelido", + "exportTplSucc": "O modelo foi exportado com sucesso", + "exportTplTip": "Os dados já existem, você precisa sobrescrever?", + "globalSearch": "Busca Global", + "stickSearch": "Busca Fixa", + "resetLayout1": "Redefinir Layout", + "zoomIn": "Ampliar", + "zoomOut": "Reduzir", + "template": "Modelo", + "move": "Mover", + "layout": "Layout", + "expandLevel": "Nível de Expansão", + "mindmap": "Mapa Mental", + "dailyNote": "Nota Diária", + "memo": "Memorando", + "name": "Nome", + "fold": "Recolher/Expandir", + "zoom": "Zoom", + "invalid": "Inválido", + "conflict": "Conflito", + "checkToggle": "Marque a lista de tarefas para alternar", + "heading1": "Título 1", + "heading2": "Título 2", + "heading3": "Título 3", + "heading4": "Título 4", + "heading5": "Título 5", + "heading6": "Título 6", + "general": "Geral", + "insertBefore": "Inserir um bloco vazio antes do bloco onde está o cursor", + "insertAfter": "Inserir um bloco vazio após o bloco onde está o cursor", + "list1": "Lista", + "element": "Elemento", + "closeTab": "Fechar Aba Atual", + "keymap": "Mapa de Teclas", + "clearFontStyle": "Limpar Estilo", + "clearInline": "Limpar elementos inline", + "fontStyle": "Efeitos de Fonte", + "font": "Fonte", + "folder": "Pasta", + "day": "Dias", + "pin": "Fixar", + "unpin": "Desafixar", + "createdAt": "Criado em", + "modifiedAt": "Modificado em", + "download": "Baixar", + "uninstall": "Desinstalar", + "all": "Todos", + "bazaar": "Mercado", + "revolve": "Revolver", + "useDefault": "Abrir com programa padrão", + "previous": "Anterior", + "next": "Próximo", + "kernelFault0": "SiYuan encontrou um pequeno problema...", + "kernelFault1": "Seus dados devem estar seguros, verifique se a conexão de rede e o processo do kernel estão normais e reinicie o SiYuan", + "kernelFault2": "Se o problema persistir, procure ajuda ou relate bugs aqui", + "fontSize": "Tamanho da Fonte", + "fontSizeTip": "O tamanho padrão da fonte é 16, esta configuração afeta o editor e a exibição do tamanho da fonte em PDF/HTML exportados", + "fontSizeScrollZoom": "Ajuste rápido do tamanho da fonte", + "fontSizeScrollZoomTip": "Quando ativado, pressione e segure Ctrl para ajustar rapidamente o tamanho da fonte através da roda do mouse ou gesto de pinça no trackpad", + "font1": "Esta configuração afeta apenas a exibição da família de fontes no editor, escolha Padrão para usar a família de fontes do tema", + "newNameFile": "O nome do novo subdocumento é", + "newNameSettingFile": "O nome do novo documento é", + "newContentFile": "O conteúdo do novo documento é", + "exporting": "Exportando, por favor aguarde...", + "exported": "Exportação concluída", + "refExpired": "Bloco de conteúdo de pesquisa não existe", + "emptyContent": "Nenhum conteúdo relacionado encontrado", + "useBrowserView": "Visualizar no navegador", + "userLocalPDF": "Abrir com ferramenta PDF local", + "copyID": "Copiar ID", + "newBookmark": "Criar um marcador", + "generateHistory": "Intervalo de Geração de Histórico (minutos, defina como 0 para desativar)", + "generateHistoryInterval": "O histórico é gerado automaticamente ao editar ou excluir, que pode ser visualizado e revertido no [Histórico de Dados]", + "historyRetentionDays": "Dias de Retenção de Histórico", + "historyRetentionDaysTip": "Limpeza de arquivo de histórico", + "clearHistory": "Excluir todo o histórico", + "confirmClearHistory": "Tem certeza que deseja excluir completamente todos os dados históricos no espaço de trabalho?", + "fileNameASC": "Nome Alfabético ASC", + "fileNameDESC": "Nome Alfabético DESC", + "modifiedASC": "Tempo de Modificação ASC", + "modifiedDESC": "Tempo de Modificação DESC", + "fileNameNatASC": "Nome Natural ASC", + "fileNameNatDESC": "Nome Natural DESC", + "refCountASC": "Contagem de Refs ASC", + "refCountDESC": "Contagem de Refs DESC", + "createdASC": "Tempo de Criação ASC", + "createdDESC": "Tempo de Criação DESC", + "docSizeASC": "Tamanho do Documento ASC", + "docSizeDESC": "Tamanho do Documento DESC", + "subDocCountASC": "Contagem de Sub-documentos ASC", + "subDocCountDESC": "Contagem de Sub-documentos DESC", + "sort": "Ordenar", + "enterFullscreen": "Entrar em Tela Cheia", + "exitFullscreen": "Sair da Tela Cheia", + "clearAll": "Tem certeza que deseja limpar todos os ativos não referenciados?", + "missingAssets": "Ativos ausentes", + "unreferencedAssets": "Ativos não referenciados", + "paste": "Colar", + "pasteRef": "Colar Referência de Bloco", + "pasteEmbed": "Colar Bloco Incorporado", + "cut": "Cortar", + "mentions": "Menções", + "colorFont": "Cor da Fonte", + "colorPrimary": "Cor de Fundo", + "sync": "Sincronizar", + "syncNow": "Sincronizar agora", + "waitSync": "Os dados editados não foram sincronizados para a nuvem", + "paymentSum": "Total pago", + "refresh": "Atualizar", + "logout": "Sair", + "refreshUser": "Informações do usuário atualizadas", + "insertBottom": "Abrir Abaixo da Aba", + "insertRight": "Abrir à Direita da Aba", + "account1": "Torne-se um membro pago", + "account4": "Atualizar para assinatura", + "account2": "Sincronização e backup de dados criptografados de ponta a ponta", + "account3": "Assinatura de Teste", + "account5": "Hospedagem de ativos na nuvem", + "account6": "Restante antes da assinatura expirar", + "account7": "Comprado [Recursos]", + "account8": "Comprado [Assinatura Anual]", + "account10": "Assinatura anual", + "account11": "Até o final do desconto para early birds", + "account12": "Companheiro de vida", + "clickMeToRenew": "Ir para Renovar", + "dataHistory": "Histórico de Dados", + "quitApp": "Sair?", + "reset": "Redefinir", + "siyuanNote": "SiYuan", + "resetLayout": "Restaurar Layout Padrão", + "tag": "Tag", + "twoFactorCaptcha": "Captcha de autenticação de dois fatores", + "captcha": "Captcha", + "register": "Criar Nova Conta", + "login": "Entrar", + "accountTip": "Eu li e concordo com a Política de Privacidade do SiYuan", + "forgetPassword": "Esqueci a Senha", + "accountName": "Nome de Usuário/E-mail", + "account": "Conta", + "globalGraph": "Grafo Global", + "backlinks": "Backlinks", + "editor": "Editor", + "appearance6": "O layout da janela será restaurado para o estado inicial após redefinir", + "appearance9": "Abrir Pasta de Temas", + "appearance8": "Abrir Pasta de Ícones", + "appearance5": "Selecione o modo da interface do usuário", + "appearance4": "Modo", + "appearance3": "Selecione o tema de destaque de sintaxe usado no modo escuro", + "appearance2": "Selecione o tema de destaque de sintaxe usado no modo claro", + "appearance1": "Tema do Bloco de Código", + "appearance10": "Configurações do botão fechar", + "appearance11": "minimizar para a bandeja após clicar no botão fechar", + "appearance16": "Ocultar barra de status inferior", + "appearance17": "Oculta a barra de status na parte inferior da área de trabalho quando ativado", + "min": "Mín", + "restore": "Restaurar", + "max": "Máx", + "md2": "Ligadura de bloco de código", + "md3": "Quando ativado, o bloco de código exibirá a ligadura", + "md4": "Quando ativado, recua automaticamente o início dos parágrafos para se adequar aos hábitos tradicionais de diagramação chinesa", + "md7": "Ícone de imagem da rede", + "md8": "Quando ativado, se a imagem for um arquivo da web (não um arquivo de ativo local), exibirá uma marca de canto", + "md9": "Lista de inclusão de palavras-chave de Referência Virtual", + "md12": "Ícone de canto do bloco de conteúdo", + "md16": "Exibir marcadores, nomes, apelidos, notas, o nome do banco de dados vinculado e contagem de referência no canto superior direito", + "md27": "Número de linha do bloco de código", + "md28": "Quando ativado, o bloco de código exibirá o número da linha (Observe que ativar pode reduzir o desempenho do editor)", + "md29": "Número de espaços Tab", + "md30": "Substitui por espaços apenas quando Tab é pressionado, não substitui tabs (Tab) na área de transferência por espaços", + "md31": "Quebra de linha do bloco de código", + "md32": "Quando ativado, o conteúdo no bloco de código quebrará linha automaticamente", + "md33": "Referência Virtual", + "md34": "Quando ativado, identificará automaticamente a possível relação de referência de acordo com o nome, apelido e texto âncora da referência de bloco existente", + "md35": "Lista de exclusão de palavras-chave de Referência Virtual", + "md36": "Use a vírgula inglesa , para separar, a própria vírgula pode ser escapada por \\,", + "md37": "O comprimento máximo do texto âncora dinâmico da referência de bloco", + "md38": "O comprimento máximo do texto âncora que é renderizado automaticamente quando o texto âncora da referência de bloco não é personalizado, o padrão é 96 caracteres", + "md39": "Endereço do Servidor PlantUML", + "md40": "Deixe em branco para restaurar o padrão https://www.plantuml.com/plantuml/svg/~1", + "md41": "Suporte usando / para envolver expressões regulares, por exemplo foo,/[0-9]+/ significa excluir foo e números", + "fileTree2": "A árvore de documentos selecionará automaticamente o documento atual quando a aba do editor for alternada", + "fileTree3": "Nenhuma confirmação necessária ao excluir documentos", + "fileTree4": "Se não estiver ativado, uma caixa de confirmação aparecerá toda vez que você excluir um documento", + "fileTree5": "Local de salvamento do documento criado por Ref", + "fileTree6": "Ao usar ((, o caminho de salvamento do novo documento (por exemplo, /folder1/{{now | date \"20060102150405\"}}/)", + "fileTree7": "Abrir na aba atual", + "fileTree8": "A nova aba de documento substituirá a aba não modificada", + "fileTree9": "Fechar todas as abas na inicialização", + "fileTree10": "Quando ativado, as abas não fixadas que foram abertas da última vez serão fechadas automaticamente toda vez que a interface for iniciada", + "fileTree11": "Nova nota diária", + "fileTree12": "Local de salvamento do novo documento", + "fileTree13": "Ao usar Ctrl+N, o caminho de salvamento do novo documento (por exemplo, /folder1/{{now | date \"20060102150405\"}}, o caminho relativo do documento atual é usado se não começar com /)", + "fileTree14": "Caminho de salvamento (suporta variáveis de modelo de formato de data, como /Daily Notes/{{now | date \"2006/01\"}}/{{now | date \"2006-01-02\"}})", + "fileTree15": "Caminho do modelo (por exemplo, dailynote.md, o arquivo precisa ser colocado em workspace/data/templates/)", + "fileTree16": "Número máximo para listar", + "fileTree17": "Se houver muitos subdocumentos/tags, esta restrição pode ser usada para melhorar o desempenho", + "fileTree18": "Permitir criação de subdocumentos mais profundos que 7 níveis", + "fileTree19": "Alguns sistemas operacionais têm limitações técnicas que podem impedir a cópia manual de dados do espaço de trabalho após a criação de subdocumentos maiores que 7 níveis", + "fileTree20": "Salvar com uma única linha", + "fileTree21": "Quando ativado, o formato JSON de linha única será usado ao salvar documentos .sy e arquivos .json de banco de dados, o que pode reduzir o tamanho do arquivo em cerca de 30% e melhorar a eficiência de leitura/gravação em 50%", + "export10": "Por exemplo <span style=\"color: #fff;background-color: black;padding: 4px;border-radius: 5px;float:right;\">SiYuan</span>, se vazio, use texto de marca d'água ou caminho do arquivo de marca d'água.", + "export11": "Método de manipulação de conteúdo do bloco de referência ao exportar", + "export12": "Método de manipulação de conteúdo do bloco incorporado ao exportar", + "export13": "Símbolo de quebra de texto âncora", + "export14": "Por favor, preencha o símbolo no lado esquerdo do texto âncora e o símbolo no lado direito do texto âncora na caixa de entrada em sequência", + "export15": "Símbolo de Pacote de Etiqueta", + "export16": "Por favor, preencha o símbolo no lado esquerdo da tag e o símbolo no lado direito da tag na caixa de entrada em sequência", + "export17": "Adicionar título do documento", + "export18": "Quando ativado, insira o título do documento como um cabeçalho 1 no início", + "export19": "Caminho para o executável Pandoc", + "export20": "Exportar arquivos Word .docx requer conversão de formato usando Pandoc", + "export21": "Modelo de rodapé para exportar PDF", + "export22": "%page é o número da página atual, %pages é o número total de páginas e suporta funções de modelo Sprig", + "export23": "Exportar Markdown com front-matter YAML", + "export24": "Quando ativado, adiciona algumas informações gerais de metadados no início do arquivo Markdown exportado", + "export25": "Caminho do modelo para exportar Word .docx", + "export26": "O caminho absoluto do modelo usado ao exportar arquivos Word .docx, ou seja, o valor do parâmetro Pandoc --reference-doc", + "export27": "Marca d'água para exportar PDF", + "export28": "Texto da marca d'água ou caminho do arquivo de marca d'água", + "export29": "Posição, tamanho e estilo da marca d'água, etc.", + "export30": "Marca d'água de imagem para exportar", + "export31": "Exportar memos inline", + "export32": "Quando ativado, memos inline serão exportados como sobrescrito", + "theme11": "Usar tema no modo claro", + "theme12": "Usar tema no modo escuro", + "theme2": "Selecione os ícones usados na interface do usuário", + "language1": "Selecione o idioma de exibição da interface do usuário", + "summary": "Resumo", + "bookmark": "Marcador", + "icon": "Ícone", + "appearance": "Aparência", + "export0": "Texto original", + "export1": "Citação em bloco", + "export2": "Texto âncora com URL do bloco", + "export3": "Apenas texto âncora", + "export4": "Notas de rodapé+Hash âncora", + "export5": "Ref de Anotação PDF", + "export6": "Sobre o tratamento do texto âncora em anotações PDF ao exportar", + "export7": "Nome do Arquivo - Número da Página - Texto Âncora", + "export8": "Apenas texto âncora", + "graphConfig2": "Filtro de Contagem de Referência", + "selectOpen": "Sempre Selecionar Documento Aberto", + "selectOpen1": "Selecionar Documento Aberto", + "closeAll": "Fechar Todas as Abas", + "closeOthers": "Fechar Outras Abas", + "closeLeft": "Fechar Abas à Esquerda", + "closeRight": "Fechar Abas à Direita", + "closeUnmodified": "Fechar Abas Não Modificadas", + "newFileTip": "Por favor, abra um bloco de notas primeiro", + "copyBlockRef": "Copiar referência de bloco", + "copyBlockEmbed": "Copiar bloco incorporado", + "linkLevel": "Profundidade", + "mark": "Marca", + "splitLR": "Dividir à Direita", + "splitMoveR": "Dividir e Mover para Direita", + "splitTB": "Dividir para Baixo", + "splitMoveB": "Dividir e Mover para Baixo", + "debug": "Ferramentas do Desenvolvedor", + "fileTree": "Árvore de Documentos", + "graphView": "Visualização de Grafo", + "sponsor": "Doar para desenvolvedores", + "relativeRelation": "Vinculado", + "parentRelation": "Pai - Filho", + "openInNewTab": "Abrir em Nova Aba", + "help": "Ajuda", + "userGuide": "Guia do Usuário", + "paragraphBeginningSpace": "Dois espaços vazios no início do parágrafo", + "outline": "Esboço", + "newFile": "Novo Documento", + "newFileRef": "Criar novo Documento com referência", + "close": "Fechar", + "delete": "Excluir", + "rename": "Renomear", + "cancel": "Cancelar", + "confirm": "Confirmar", + "confirmDelete": "Excluir", + "confirmDeleteCloudDir": "Tem certeza que deseja excluir o diretório de sincronização em nuvem", + "back": "Voltar", + "mount": "Abrir Bloco de Notas", + "newNotebook": "Novo Bloco de Notas", + "fileNameRule": "O título não pode conter o caractere /, foi automaticamente substituído pelo caractere de largura total /", + "slogan": "Reestruture seu pensamento", + "showInFolder": "Mostrar na Pasta", + "search": "Pesquisar", + "config": "Configurações", + "userName": "Nome de Usuário", + "password": "Senha", + "passphrase": "Senha", + "reEnterPassphrase": "Digite a Senha novamente", + "theme": "Tema", + "language": "Idioma", + "about": "Sobre", + "about1": "Copyright (c) 2020-presente • Yunnan Liandi Technology Co., Ltd. • Política de PrivacidadeContrato do Usuário", + "about2": "Usar no navegador", + "about3": "Por favor, use o navegador Chrome e mantenha-o na mesma rede que o computador, porta ${port}(Além da porta aleatória, o primeiro espaço de trabalho iniciado também escutará automaticamente 6806 como uma porta fixa, para que seja conveniente para o navegador recortar extensões ou outros programas externos chamarem a interface do kernel), os endereços que podem ser conectados são os seguintes: ", + "about4": "Abrir navegador", + "about5": "Código de autorização de acesso", + "about6": "Após configurar, será usado como senha de autenticação de acesso, deixe em branco para fechar a autenticação", + "about7": "Seguir bloqueio de tela do sistema", + "about8": "Quando ativado, o aplicativo será bloqueado automaticamente ao bloquear a tela do sistema", + "about11": "Serviço de rede", + "about12": "Quando ativado, outros dispositivos na mesma LAN terão permissão para acessar. O aplicativo será fechado automaticamente após a modificação, por favor reinicie manualmente", + "about13": "Token API", + "about14": "O token precisa ser autenticado ao chamar a API
Cabeçalho da requisição HTTP Authorization: token ${token}", + "about17": "Não ativar proxy quando definido como Conexão direta", + "about18": "Ao usar um endereço não-loopback (127.0.0.1/[::1]) por favor defina o Código de autorização de acesso primeiro", + "checkUpdate": "Verificar atualização", + "currentVer": "Versão atual", + "downloadLatestVer": "Baixar a versão mais recente", + "themeLight": "Claro", + "themeDark": "Escuro", + "themeOS": "Seguir o sistema", + "pasteAsPlainText": "Colar como texto simples", + "assets": "Ativos", + "alignCenter": "Centralizar", + "alignLeft": "Esquerda", + "alignRight": "Direita", + "alternateText": "Texto alternativo", + "bold": "Negrito", + "cardPreview": "Pré-visualização", + "check": "Lista de Tarefas", + "code": "Bloco de Código", + "column": "Coluna", + "copied": "Copiado", + "copy": "Copiar", + "copyText": "Copiar texto *", + "delete-column": "Excluir Coluna", + "delete-row": "Excluir Linha", + "down": "Para baixo", + "downloadTip": "O navegador não suporta a função de download", + "edit-mode": "Alternar Modo", + "emoji": "Emoji", + "export": "Exportar", + "fileTypeError": "tipo de arquivo é inválido", + "fullscreen": "Alternar Tela Cheia", + "generate": "Gerando", + "headings": "Cabeçalhos", + "imageURL": "URL da imagem", + "indent": "Recuar", + "info": "Informação", + "inline-code": "Código Inline", + "insert-after": "Inserir bloco depois", + "insert-before": "Inserir bloco Antes", + "insertColumnLeft": "Inserir 1 à esquerda", + "insertColumnRight": "Inserir 1 à direita", + "insertRowAbove": "Inserir 1 acima", + "insertRowBelow": "Inserir 1 abaixo", + "italic": "Itálico", + "line": "Quebra temática", + "link": "Link", + "image": "Imagem", + "ref": "Ref", + "list": "Lista", + "more": "Mais", + "nameEmpty": "O nome está vazio", + "ordered-list": "Lista Ordenada", + "outdent": "Recuo negativo", + "outlineOutdent": "Recuo negativo de lista", + "outlineOutdentTip": "Quando ativado, o recuo negativo usará a lógica de esboço de lista, ou seja, movendo os itens da lista abaixo do pai", + "spellcheck": "Verificação Ortográfica", + "spellcheckTip": "Quando ativado, usará a função de verificação ortográfica incorporada do navegador. Atualmente, apenas a verificação ortográfica em inglês é suportada", + "over": "sobre", + "preview": "Pré-visualização de Exportação", + "desktop": "Área de Trabalho", + "tablet": "Tablet", + "mobile": "Celular", + "copyToWechatMP": "Copiar para Wechat MP", + "copyToZhihu": "Copiar para Zhihu", + "copyToYuque": "Copiar para Yuque", + "pasteToWechatMP": "Copiado, pronto para colar no Wechat MP", + "pasteToZhihu": "Copiado, pronto para colar no Zhihu", + "pasteToYuque": "Copiado, pronto para colar no Yuque", + "quote": "Citação em Bloco", + "startRecord": "Iniciar Gravação", + "endRecord": "Finalizar Gravação", + "record-tip": "O dispositivo não suporta gravação", + "recording": "gravando...", + "redo": "Refazer", + "remove": "Remover", + "row": "Linha", + "splitView": "Visualização Dividida", + "strike": "Tachado", + "table": "Tabela", + "title": "Título", + "tooltipText": "Texto de dica", + "undo": "Desfazer", + "up": "Para cima", + "update": "Atualizar", + "insertAsset": "Inserir imagem ou arquivo", + "uploadError": "erro de upload", + "uploading": "Enviando...", + "wysiwyg": "WYSIWYG", + "_label": "Português (Brasil)", + "_time": { + "albl": "atrás", + "blbl": "a partir de agora", + "now": "agora", + "1s": "1 segundo %s", + "xs": "%d segundos %s", + "1m": "1 minuto %s", + "xm": "%d minutos %s", + "1h": "1 hora %s", + "xh": "%d horas %s", + "1d": "1 dia %s", + "xd": "%d dias %s", + "1w": "1 semana %s", + "xw": "%d semanas %s", + "1M": "1 mês %s", + "xM": "%d meses %s", + "1y": "1 ano %s", + "2y": "2 anos %s", + "xy": "%d anos %s", + "max": "há muito tempo %s" + }, +"_taskAction": { + "task.repo.checkout": "Executar checkout do snapshot", + "task.database.index.full": "Executar reconstrução do índice", + "task.database.index": "Executar índice do banco de dados", + "task.database.index.commit": "Executar commit do índice do banco de dados", + "task.database.index.ref": "Executar índice de referência do banco de dados", + "task.database.index.fix": "Executar correção do índice do banco de dados", + "task.ocr.image": "Executar OCR de imagem para extrair texto", + "task.history.generateFile": "Executar geração de documento do histórico do banco de dados", + "task.history.database.index.full": "Executar reconstrução do índice do histórico do banco de dados", + "task.history.database.index.commit": "Executar commit do índice do histórico do banco de dados", + "task.database.index.embedBlock": "Executar índice de bloco incorporado do banco de dados", + "task.reload.ui": "Executar recarregamento da UI", + "task.asset.database.index.full": "Executar reconstrução do índice do banco de dados de ativos", + "task.asset.database.index.commit": "Executar commit do índice do banco de dados de ativos", + "task.cache.virtualBlockRef": "Executar cache de referência virtual" + }, + "_trayMenu": { + "showWindow": "Mostrar janela", + "hideWindow": "Ocultar janela", + "setWindowTop": "Definir janela no topo", + "cancelWindowTop": "Cancelar janela no topo", + "officialWebsite": "Visitar site oficial", + "openSource": "Visitar projeto no GitHub", + "resetWindow": "Redefinir janela e sair", + "quit": "Sair do aplicativo" + }, + "_attrView": { + "table": "Tabela", + "gallery": "Galeria", + "key": "Chave Primária", + "select": "Selecionar" + }, + "_kernel": { + "0": "Falha ao consultar o bloco de notas", + "1": "Nome de arquivo duplicado", + "2": "Falha ao listar arquivos da caixa [%s] e do caminho [%s]: %s", + "3": "Falha ao ler o arquivo [%s] do bloco de notas [%s]: %s", + "4": "Falha ao obter metadados do arquivo [%s] do bloco de notas [%s]: %s", + "5": "Falha ao mover o arquivo [%s] do bloco de notas [%s]: %s", + "6": "Falha ao criar pasta [%s] no bloco de notas [%s]: %s", + "7": "Falha ao remover o caminho [%s] do bloco de notas [%s]: %s", + "8": "Falha ao verificar atualização", + "9": "\uD83D\uDE80 Uma nova versão está disponível, por favor consulte o anúncio de lançamento %s", + "10": "É a versão mais recente", + "11": "\uD83D\uDCE2 Anúncio do sistema: %s", + "12": "Falha ao consultar ativo [%s]", + "13": "Não é possível criar um arquivo começando com .", + "14": "Falha na exportação: %s", + "15": "Bloco de conteúdo com ID [%s] não encontrado", + "16": "Sem título", + "17": "A sincronização inicial falhou na inicialização. Operações contínuas podem causar sobrescrita imprevisível de dados. Por favor, realize uma sincronização primeiro", + "18": "Falha ao obter conta de usuário da comunidade", + "19": "As informações do usuário expiraram, por favor faça login novamente", + "20": "Não pode ser convertido em cabeçalho quando inclui subdocumentos", + "21": "Por favor, insira o captcha", + "22": "O captcha está incorreto", + "23": "O repositório de dados está corrompido, por favor redefina o repositório de dados", + "24": "Tempo limite da rede, por favor tente novamente mais tarde", + "25": "O nome do atributo só suporta letras inglesas e dígitos", + "26": "Por favor, inicialize a chave do repositório de dados primeiro em [Configurações - Sobre - Chave do repositório de dados]", + "27": "Enviando [%v]", + "28": "A rede está anormal, por favor tente novamente mais tarde", + "29": "Este recurso requer a compra de uma [Assinatura Anual] (se já comprou, por favor atualize ou faça login novamente em Configurações - Conta)", + "30": "Falha ao obter informações da nuvem", + "31": "Falha na autenticação da conta, por favor faça login novamente", + "32": "Falha ao remover bloco de notas da nuvem", + "33": "Permissões insuficientes para ler e escrever arquivos ou acessar a rede, por favor verifique as permissões da pasta do espaço de trabalho e as configurações do software antivírus/firewall. Se você executou o SiYuan como administrador antes, considere mudar para um novo diretório de espaço de trabalho e não execute como administrador no futuro (o diretório atual pode não ser mais acessível por usuários comuns)", + "34": "Esta operação não é suportada no modo somente leitura", + "35": "Reconstruindo índice, por favor aguarde...", + "36": "Há muito conteúdo no documento histórico, para não afetar o desempenho, foi alternado para exibição em texto simples", + "37": "O nome do diretório de sincronização na nuvem (Bucket) não pode estar vazio, conter espaços ou símbolos especiais, e tem um comprimento máximo de 63 caracteres", + "38": "Mencionadas muitas palavras-chave [%d], ajuste se necessário [Configurações - Busca - Menções de backlink - Limite de palavras-chave]", + "39": "Excluindo índice %s", + "40": "Inserindo índice %s", + "41": "Upload concluído [%d]", + "42": "A configuração está completa, o aplicativo será fechado automaticamente, por favor reinicie mais tarde...", + "43": "A capacidade máxima de armazenamento em nuvem [%s] foi excedida, e o upload de dados não pode continuar", + "44": "Falha ao analisar o modelo: %s", + "45": "Abrindo, por favor aguarde...", + "46": "Falha ao instalar o pacote do marketplace [%s]: %s", + "47": "Falha na desinstalação: %s", + "48": "Apenas listando os primeiros [%d] subdocumentos, se precisar ajustar, modifique [Configurações - Árvore de documentos - Número máximo para listar]", + "49": "Por favor, especifique o caminho de salvamento da nota diária nas Configurações do Bloco de Notas", + "50": "Resolvendo referência [%s]", + "51": "Cache do bloco de conteúdo [%d]", + "52": "Toda vez que você inicia e abre o guia do usuário, os dados nele são redefinidos, por favor não salve nenhum dado no guia do usuário", + "53": "A sincronização de dados não foi ativada", + "54": "Indexando referências...", + "55": "Referências indexadas de [%d] documentos", + "56": "Reindexando, por favor aguarde até que a reconstrução esteja completa antes de tentar abrir", + "57": "Falha ao criar chave temporária", + "58": "[%d/%d] Verificando índice...", + "59": "Falha ao definir lista de ignorados de sincronização", + "60": "Falha ao obter o pacote de atualização: %s", + "61": "⬆️ O pacote de instalação da nova versão está pronto, deseja instalar a nova versão agora?", + "62": "⬆️ O pacote de instalação da nova versão está pronto. Ao sair, você será perguntado se deseja instalar a nova versão", + "63": "Recuperando, por favor aguarde...", + "64": "Há [%d] arquivos no total, levará algum tempo para indexar, por favor aguarde...", + "65": "Exportando dados...", + "66": "Arquivo de dados [%s] criado", + "67": "Enviado em %s, baixado em %s", + "68": "Os dados locais excederam a capacidade máxima de armazenamento em nuvem [%s] durante o período de teste, e não podem continuar a sincronizar dados. Após a assinatura, a capacidade de armazenamento em nuvem será atualizada para [8 GB]", + "69": "Download concluído", + "70": "Processando [%s], por favor aguarde...", + "71": "Falha ao inserir arquivo de ativo, por favor reabra o documento", + "72": "O conteúdo foi copiado para a área de transferência do sistema, por favor vá para o SiYuan para colar", + "73": "Importando dados...", + "74": "O kernel não foi totalmente inicializado [%d%%], por favor tente novamente mais tarde", + "75": "Tentativa de acesso ao arquivo falhou", + "76": "A verificação de conectividade de rede do provedor de armazenamento em nuvem está anormal, por favor verifique a configuração de rede", + "77": "Caminho de diretório inválido [%s]", + "78": "Os caminhos antigo e novo são repetidos", + "79": "Apenas suporta importar documentos Markdown", + "80": "Falha na sincronização: %s", + "81": "Sincronizando dados...", + "82": "Sincronizado em %s", + "83": "O código de autorização de acesso está incorreto", + "84": "Falha no backup: %s", + "85": "O arquivo está sendo usado por outros programas %s", + "86": "Por favor configure [Configurações - Sobre - Código de autorização de acesso]", + "87": "Não é possível mover para esta localização", + "88": "Concluída a análise de [%d] arquivos de dados, restam a serem processados [%d]", + "89": "[%d/%d] Criados [%d] índices de dados de elementos de bloco [%s]", + "90": "[%d/%d] Criados [%d] índices de busca de elementos de bloco [%s]", + "91": "Limpeza de ativos não referenciados concluída. [%d] arquivos foram excluídos, liberando um total de [%s] de espaço em disco", + "92": "Analisando árvore de documentos [%s]", + "93": "[%d/%d] Limpo o índice relacionado ao documento [%s]", + "94": "Falha no upload: %s", + "95": "Saindo...", + "96": "Falha na sincronização ao sair. Por favor, realize uma sincronização manual para garantir que os dados locais estejam consistentes com os dados na nuvem", + "97": "Forçar saída", + "98": "Não defina o espaço de trabalho sob o caminho de instalação, caso contrário os dados serão perdidos ao desinstalar ou atualizar os programas", + "99": "Limpeza de dados concluída", + "100": "Limpando dados...", + "101": "Lembrete definido [%s]", + "102": "Processamento concluído", + "103": "O pacote de instalação da atualização foi baixado automaticamente em segundo plano. Ao sair, você será perguntado se deseja instalar a nova versão", + "104": "Falha ao baixar o pacote de instalação da atualização, por favor verifique a conexão de rede", + "105": "Sem título", + "106": "Comprimento máximo limitado a 512 caracteres", + "107": "Documento movido [%s]", + "108": "A sincronização de dados encontrou conflitos, você pode visualizar o conteúdo gerado em [Histórico de Dados]", + "109": "Lembrete removido [%s]", + "110": "Renomeando...", + "111": "Salvando dados [%s]...", + "112": "Não inclua marcador de sintaxe Markdown [%s]", + "113": "Completando escrita de dados...", + "114": "A tag não pode estar vazia", + "115": "Por favor, configure primeiro [Configurações - Exportar - Caminho executável do Pandoc]", + "116": "Processando, por favor aguarde...", + "117": "[%s] não é um executável Pandoc válido", + "118": "As configurações atuais não permitem a criação de subdocumentos sob um documento com 7 níveis de profundidade", + "119": "Baixando arquivo da rede [%s]", + "120": "Download concluído, [%d] arquivos no total", + "121": "Não há arquivo de rede neste documento", + "122": "O recurso de barra lateral que vem com o plugin precisa ser configurado na área de trabalho. Após a configuração, por favor reinicie o SiYuan (para usuários móveis, você deve primeiro confiar no marketplace a partir da área de trabalho antes de usar o plugin pela primeira vez)", + "123": "A função de sincronização só pode ser ativada após adicionar/selecionar o diretório de sincronização na nuvem", + "124": "Por favor, ative a sincronização na nuvem em [Configurações - Ativar Sincronização na Nuvem]", + "125": "Falha na sincronização automática muitas vezes, por favor tente acionar a sincronização manualmente, se ainda houver problemas, por favor reporte via GitHub Issues", + "126": "O favorito não pode estar vazio", + "127": "Faltam [%d] dias para a assinatura expirar, após isso os dados oficiais de armazenamento em nuvem serão completamente excluídos. Para renovar, visite aqui", + "128": "A assinatura expirou, os dados oficiais de armazenamento em nuvem serão completamente excluídos (os dados de armazenamento em nuvem S3/WebDAV não são afetados), dois dias após a expiração este lembrete não aparecerá mais. Para renovar, visite aqui", + "129": "Os dados na nuvem foram corrompidos, por favor redefina o repositório de dados local e o diretório de sincronização na nuvem para resolver o problema", + "130": "O instalador da nova versão está iniciando. Como o sistema operacional realizará uma verificação de segurança, pode levar algum tempo para iniciar. Por favor aguarde...", + "131": "Esta operação não é suportada, por favor vá para o console de gerenciamento do provedor de armazenamento em nuvem para operar", + "132": "O modo de busca SQL não suporta a operação de substituição, por favor use outro método de busca", + "133": "Baixando pacote de instalação da atualização [%s]", + "134": "Para evitar que os dados recém-restaurados sejam sobrescritos pela sincronização, a função de sincronização de dados foi automaticamente suspensa", + "135": "A chave do repositório de dados está incorreta e os dados não podem ser descriptografados. Por favor, consulte as etapas do Guia do Usuário-FAQ-Chave Perdida para resolver o problema", + "136": "Inicializando chave do repositório de dados...", + "137": "Falha ao inicializar a chave do repositório de dados: %s", + "138": "Chave do repositório de dados definida", + "139": "Snapshot de dados está sendo gerado, [%s] arquivos de dados processados, [%s] restantes...", + "140": "Falha ao criar snapshot de dados: %s", + "141": "Falha ao reverter snapshot de dados", + "142": "A entrada não pode estar vazia", + "143": "Criando snapshot de dados...", + "144": "Redefinindo repositório de dados...", + "145": "O repositório de dados foi redefinido, e a interface será atualizada automaticamente mais tarde...", + "146": "Falha ao redefinir repositório de dados: %s", + "147": "Criado um novo snapshot de dados, levou %.2fs", + "148": "Verificado o snapshot de dados e nenhuma alteração foi encontrada, levou %.2fs", + "149": "Snapshot de dados sincronizado, levou %.2fs", + "150": "arquivos enviados/baixados %d/%d
 partes enviadas/baixadas %d/%d
 bytes enviados/recebidos %s/%s", + "151": "Não inclua símbolos \\ / : * ? " ' < > |", + "152": "Arquivos enviados %d, partes %d, bytes enviados %s", + "153": "Arquivos baixados %d, partes %d, bytes recebidos %s", + "154": "A nuvem só suporta backup de até 12 snapshots", + "155": "Diretório de sincronização na nuvem foi redefinido para [main]", + "156": "Falha na autenticação, por favor ou reabra", + "157": "A chave não é reconhecida, por favor confirme se a string de chave copiada está correta", + "158": "Indexando repositório de dados, percorrendo dados %s", + "159": "Indexando repositório de dados, obtendo o arquivo mais recente %v/%v", + "160": "Indexando repositório de dados, inserindo arquivo %v/%v", + "161": "Checkout do repositório de dados, percorrendo dados %s", + "162": "Checkout do repositório de dados, inserindo arquivo %v/%v", + "163": "Checkout do repositório de dados, excluindo arquivo %v/%v", + "164": "Baixando snapshot do repositório de dados %s", + "165": "Baixando arquivo do repositório de dados %v/%v", + "166": "Baixando parte do repositório de dados %v/%v", + "167": "Baixando referência do repositório de dados %s", + "168": "Enviando snapshot do repositório de dados %s", + "169": "Enviando arquivo do repositório de dados %v/%v", + "170": "Enviando parte do repositório de dados %v/%v", + "171": "Enviando referência do repositório de dados %s", + "172": "Se você esqueceu o código de autorização, por favor encontre ajuda aqui", + "173": "Por favor, insira o código de autorização de acesso", + "174": "Desbloquear acesso", + "175": "Por favor, insira o código de verificação", + "176": "SiYuan", + "177": "Sair do aplicativo", + "178": "Autorização de Acesso - SiYuan", + "179": "O espaço em disco pode estar insuficiente. É recomendado manter o espaço livre do disco onde o espaço de trabalho está localizado em mais que o dobro do tamanho dos dados", + "180": "Bloco de conteúdo de busca não existe", + "181": "O documento foi compartilhado para a comunidade, clique para visualizar", + "182": "Compartilhando documento, por favor aguarde...", + "183": "Validando árvore de documentos do índice [%d/%d %s]", + "184": "Desenvolvido por SiYuan", + "185": "Verificação de índice concluída", + "186": "Bloqueando diretório de sincronização na nuvem", + "187": "Desbloqueando diretório de sincronização na nuvem", + "188": "Falha ao bloquear o diretório de sincronização na nuvem, por favor tente novamente mais tarde", + "189": "O diretório de sincronização na nuvem ainda está bloqueado por outros dispositivos, por favor tente novamente mais tarde", + "190": "Um problema foi encontrado ao validar o índice, que foi automaticamente corrigido", + "191": "[%d/%d] Criado índice de dados históricos", + "192": "Reconstruindo índice de dados históricos, por favor aguarde...", + "193": "Por favor, consulte o capítulo [Inteligência Artificial] do Guia do Usuário para configuração", + "194": "Há restrições na interface do Nutstore, por favor use outros serviços WebDAV", + "195": "O horário do sistema está incorreto, por favor calibre o horário do sistema e tente novamente", + "196": "Não defina o espaço de trabalho sob o caminho de um disco de sincronização de terceiros, caso contrário os dados serão danificados (iCloud/OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun, etc.)", + "197": "O modelo de Word .docx especificado [%s] não foi encontrado, por favor verifique [Configurações - Exportar - Caminho do modelo de exportação do Word .docx]", + "198": "Este não é um arquivo de dados válido. Se o arquivo foi exportado de [Árvore de Documentos], por favor importe de [Árvore de Documentos]", + "199": "Este não é um arquivo .sy.zip válido. Se o arquivo foi exportado de [Configurações], por favor importe de [Configurações]", + "200": "O tempo de resposta da busca global está lento, recomenda-se adicionar filtros de tipo ou palavras-chave para reduzir o escopo da busca", + "201": "Falha ao purgar repositório de dados: %s", + "202": "Limpando repositório de dados...", + "203": "O repositório de dados foi purgado, [%d] snapshots e [%d] objetos de dados foram excluídos, e um total de [%s] de espaço em disco foi liberado", + "204": "O documento no guia do usuário não suporta compartilhamento para a comunidade", + "205": "O plugin não é suportado no ambiente atual", + "206": "Executando substituição de conteúdo [%d/%d]", + "207": "Executando substituição de caminho [%d/%d]", + "208": "Enviando lista de índices...", + "209": "Enviando índice de verificação...", + "210": "Verificando dados na nuvem %v/%v", + "211": "Verificação de dados na nuvem concluída", + "212": "Há alguns defeitos na versão atual da sincronização de dados na nuvem, por favor atualize para a versão mais recente. Pedimos desculpas pelo inconveniente", + "213": "Falha na verificação na nuvem, por favor tente atualizar para a versão mais recente e faça login novamente antes de sincronizar", + "214": "Este recurso requer login na conta e compra de [Recursos PRO] ou [Assinatura Anual] para usar", + "215": "Por favor, consulte o guia do usuário da área de trabalho", + "216": "Reconstruindo índice de dados de conteúdo de ativos, por favor aguarde...", + "217": "[%d/%d] Criado índice de dados de conteúdo de ativos", + "218": "Muitos snapshots do repositório de dados foram detectados, o que retarda a inicialização do programa e a sincronização de dados. Por favor, considere executar [Configurações - Sobre - Purga do repositório de dados]", + "219": "O serviço de armazenamento em nuvem está indisponível, por favor tente novamente mais tarde", + "220": "Devido a um defeito na versão anterior, os dados na nuvem estão corrompidos. Por favor, consulte as etapas do Guia do Usuário-FAQ-Chave Perdida para redefinir o repositório de dados local e o diretório na nuvem", + "221": "A operação de substituição não é suportada após agrupamento por documento. Por favor, use desagrupamento e depois substitua", + "222": "A sincronização de dados está em progresso, por favor aguarde até que a sincronização seja concluída e tente novamente", + "223": "Purgando armazenamento em nuvem...", + "224": "Listando objetos de dados do armazenamento em nuvem...", + "225": "Listando snapshots do armazenamento em nuvem...", + "226": "Listando referências de snapshots do armazenamento em nuvem...", + "227": "Baixando snapshot do armazenamento em nuvem...", + "228": "Baixando arquivos de dados do armazenamento em nuvem...", + "229": "Excluindo snapshots não referenciados do armazenamento em nuvem...", + "230": "Excluindo índices de verificação não referenciados do armazenamento em nuvem...", + "231": "Excluindo objetos de dados não referenciados no armazenamento em nuvem...", + "232": "O armazenamento de dados na nuvem foi purgado. [%d] snapshots e [%d] objetos de dados foram excluídos, e um total de [%s] de espaço em disco foi liberado", + "233": "Fechando guia do usuário...", + "234": "[%d/%d] Atualizados [%d] caminhos legíveis do documento [%s]", + "235": "[%d/%d] está atualizando o pacote do marketplace...", + "236": "[%d/%d] está atualizando o pacote do marketplace [%s]...", + "237": "[%d] pacotes do marketplace foram todos atualizados com sucesso", + "238": "Falha na atualização do pacote do marketplace [%s], por favor tente novamente mais tarde", + "239": "Operações relacionadas estão sendo processadas, por favor tente novamente mais tarde", + "240": "O cabeçalho atual arrastado está localizado no bloco de contêiner e a operação de arrastar não pode ser realizada", + "241": "Arrastar para seu subcabeçalho não é suportado", + "242": "Espaço disponível atual é [%s], pelo menos [%s] é necessário para realizar esta operação", + "243": "Apenas listando as primeiras [%d] tags (incluindo subtags), se precisar ajustar, modifique [Configurações - Árvore de Documentos - Número máximo para listar]", + "244": "A indexação de dados não foi concluída após o último uso. Por favor execute [Árvore de Documentos - Reconstruir Índice]. Por favor, saia completamente do programa antes de desligar o computador", + "245": "A indexação de dados não foi concluída após o último uso. Por favor execute [Árvore de Documentos - Reconstruir Índice]. Por favor use [Sair do Aplicativo] no painel da coluna direita para sair normalmente", + "246": "O título do documento não pode conter / e foi substituído por _", + "247": "O arquivo [%s] é maior que o limite máximo [%s], e foi ignorado para upload na nuvem", + "248": "O cabeçalho de destino está localizado no bloco de contêiner e não pode ser usado como ponto de soltura", + "249": "Incapaz de acessar dados devido a erro de configuração. Por favor verifique as configurações e permissões de armazenamento em nuvem", + "250": "A solicitação foi limitada por taxa pelo armazenamento em nuvem. Por favor verifique as configurações e permissões de armazenamento em nuvem", + "251": "Total de ativos não utilizados [%d], apenas [%d] listados aqui", + "252": "\uD83D\uDEA8 O Microsoft Defender pode excluir erroneamente o kernel, excluir dados e reduzir significativamente o desempenho. Recomenda-se adicionar o caminho de instalação do SiYuan e o caminho do espaço de trabalho à lista de exclusão", + "253": "Comprimindo arquivo [%s], por favor aguarde...", + "254": "[ID da Região] ID da Região incorreta, por favor consulte a documentação do provedor de serviços S3 para configurar o ID da Região", + "255": "O site de destino ativou proteção contra hotlinking, portanto não é possível baixar [%d] recursos", + "256": "O caminho especificado [%s] tem um caminho de espaço de trabalho pai [%s]", + "257": "Lembre-se de mim por 30 dias" + } +} diff --git a/app/appearance/langs/ru_RU.json b/app/appearance/langs/ru_RU.json index 6c2917779cf..1bec9ee5f66 100644 --- a/app/appearance/langs/ru_RU.json +++ b/app/appearance/langs/ru_RU.json @@ -1,4 +1,15 @@ { + "addCard": "Добавить карту", + "cardPreview1": "Предпросмотр карты", + "contentImage": "Изображение содержимого", + "cardSize": "Размер карты", + "large": "Большой", + "medium": "Средний", + "small": "Маленький", + "fitImage": "Автоматическая подгонка размера изображения", + "showIcon": "Показать значок", + "wrapAllFields": "Автоматический перенос полей", + "gallery": "Галерея", "newTag": "Новый тег", "pleaseWait": "Пожалуйста, подождите...", "reconnectPrompt": "После переключения приложений потребуется некоторое время, чтобы восстановить работу ядра SiYuan. Пожалуйста, подождите несколько секунд или нажмите кнопку «Повторить»", @@ -1336,6 +1347,7 @@ }, "_attrView": { "table": "Таблица", + "gallery": "Галерея", "key": "Первичный ключ", "select": "Выбрать" }, @@ -1596,6 +1608,7 @@ "253": "Сжатие файла [%s], пожалуйста, подождите...", "254": "[Region ID] Неправильный идентификатор региона, пожалуйста, обратитесь к документации поставщика услуг S3 для настройки идентификатора региона", "255": "Целевой сайт включил защиту от хотлинков, [%d] ресурсов невозможно скачать", - "256": "Указанный путь [%s] имеет родительский путь рабочей области [%s]" + "256": "Указанный путь [%s] имеет родительский путь рабочей области [%s]", + "257": "Запомнить меня на 30 дней" } } diff --git a/app/appearance/langs/zh_CHT.json b/app/appearance/langs/zh_CHT.json index 173a1a568fc..4d34af90047 100644 --- a/app/appearance/langs/zh_CHT.json +++ b/app/appearance/langs/zh_CHT.json @@ -1,4 +1,15 @@ { + "addCard": "添加卡片", + "cardPreview1": "卡片預覽", + "contentImage": "內容圖片", + "cardSize": "卡片大小", + "large": "大", + "medium": "中", + "small": "小", + "fitImage": "自動調整圖片大小", + "showIcon": "顯示圖示", + "wrapAllFields": "欄位自動換行", + "gallery": "圖庫", "newTag": "新建標籤", "pleaseWait": "請稍等片刻...", "reconnectPrompt": "切換應用後再次進入需要一些時間恢復思源內核運行,請稍等幾秒或者點擊“重試”按鈕", @@ -1336,6 +1347,7 @@ }, "_attrView": { "table": "表格", + "gallery": "畫廊", "key": "主鍵", "select": "單選" }, @@ -1596,6 +1608,7 @@ "253": "正在壓縮文件 [%s],請稍等...", "254": "[Region ID] 不正確,請參考 S3 服務提供商的文檔配置地域 ID", "255": "目標站點啟用了防盜鏈,[%d] 個資源無法下載", - "256": "指定的路徑 [%s] 父級存在工作空間路徑 [%s]" + "256": "指定的路徑 [%s] 父級存在工作空間路徑 [%s]", + "257": "記住我 30 天" } } diff --git a/app/appearance/langs/zh_CN.json b/app/appearance/langs/zh_CN.json index 104d3e0ddb3..f82cd8d4586 100644 --- a/app/appearance/langs/zh_CN.json +++ b/app/appearance/langs/zh_CN.json @@ -1,4 +1,15 @@ { + "addCard": "添加卡片", + "cardPreview1": "卡片预览", + "contentImage": "内容图", + "cardSize": "卡片大小", + "large": "大", + "medium": "中", + "small": "小", + "fitImage": "自适应图片大小", + "showIcon": "显示图标", + "wrapAllFields": "字段自动换行", + "gallery": "画廊", "newTag": "新建标签", "pleaseWait": "请稍等片刻...", "reconnectPrompt": "切换应用后再次进入需要一些时间恢复思源内核运行,请稍等几秒或者点击“重试”按钮", @@ -1336,6 +1347,7 @@ }, "_attrView": { "table": "表格", + "gallery": "画廊", "key": "主键", "select": "单选" }, @@ -1596,6 +1608,7 @@ "253": "正在压缩文件 [%s],请稍等...", "254": "[Region ID] 不正确,请参考 S3 服务提供商的文档配置地域 ID", "255": "目标站点启用了防盗链,[%d] 个资源无法下载", - "256": "指定的路径 [%s] 父级存在工作空间路径 [%s]" + "256": "指定的路径 [%s] 父级存在工作空间路径 [%s]", + "257": "记住我 30 天" } } diff --git a/app/electron/init.html b/app/electron/init.html index 4f5847003e0..415196e4e5b 100644 --- a/app/electron/init.html +++ b/app/electron/init.html @@ -205,18 +205,18 @@

思源笔记

`; - toolbarElement.addEventListener(isInAndroid() || isInHarmony() ? "touchstart" : "click", (event) => { + let startY = 0; + let startX = 0; + let moved = false; + toolbarElement.addEventListener("touchstart", e => { + startY = e.touches[0].clientY; + startX = e.touches[0].clientX; + moved = false; + }); + toolbarElement.addEventListener("touchmove", e => { + if (Math.abs(e.touches[0].clientY - startY) > 10 || Math.abs(e.touches[0].clientX - startX) > 10) { + moved = true; + } + }); + toolbarElement.addEventListener(isInAndroid() || isInHarmony() ? "touchend" : "click", (event) => { + if (moved) { + return; + } const protyle = getCurrentEditor()?.protyle; const target = event.target as HTMLElement; const slashBtnElement = hasClosestByClassName(event.target as HTMLElement, "keyboard__slash-item"); @@ -631,6 +647,9 @@ export const initKeyboardToolbar = () => { const oldScrollTop = protyle.contentElement.scrollTop; renderTextMenu(protyle, toolbarElement); showKeyboardToolbarUtil(oldScrollTop); + if (window.JSAndroid && window.JSAndroid.hideKeyboard) { + window.JSAndroid.hideKeyboard(); + } } return; } else if (type === "moveup") { @@ -656,6 +675,9 @@ export const initKeyboardToolbar = () => { const oldScrollTop = protyle.contentElement.scrollTop; renderSlashMenu(protyle, toolbarElement); showKeyboardToolbarUtil(oldScrollTop); + if (window.JSAndroid && window.JSAndroid.hideKeyboard) { + window.JSAndroid.hideKeyboard(); + } } return; } else if (type === "block") { diff --git a/app/src/mobile/util/touch.ts b/app/src/mobile/util/touch.ts index bf227e17503..36d1486e340 100644 --- a/app/src/mobile/util/touch.ts +++ b/app/src/mobile/util/touch.ts @@ -271,11 +271,12 @@ export const handleTouchMove = (event: TouchEvent) => { scrollBlock = true; return; } - if (scrollBlock) { - return; - } + } + if (scrollBlock) { + return; } } + if (isFirstMove) { sideMaskElement.style.zIndex = (++window.siyuan.zIndex).toString(); document.getElementById("sidebar").style.zIndex = (++window.siyuan.zIndex).toString(); diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.ts index d4d1931948e..8615c650d8e 100644 --- a/app/src/protyle/gutter/index.ts +++ b/app/src/protyle/gutter/index.ts @@ -2,7 +2,7 @@ import { hasClosestBlock, hasClosestByClassName, hasClosestByTag, - hasTopClosestByClassName, + hasTopClosestByClassName, isInAVBlock, isInEmbedBlock } from "../util/hasClosest"; import {getIconByType} from "../../editor/getIcon"; @@ -2314,7 +2314,7 @@ export class Gutter { const topElement = getTopAloneElement(nodeElement); listItem = topElement.querySelector(".li") || topElement.querySelector(".list"); // 嵌入块中有列表时块标显示位置错误 https://github.com/siyuan-note/siyuan/issues/6254 - if (isInEmbedBlock(listItem)) { + if (isInEmbedBlock(listItem) || isInAVBlock(listItem)) { listItem = undefined; } // 标题必须显示 diff --git a/app/src/protyle/hint/index.ts b/app/src/protyle/hint/index.ts index 4d7b4364be6..6d9d3f9b68a 100644 --- a/app/src/protyle/hint/index.ts +++ b/app/src/protyle/hint/index.ts @@ -275,11 +275,19 @@ ${unicode2Emoji(emoji.unicode)}`; const cellElement = hasClosestByClassName(protyle.toolbar.range.startContainer, "av__cell"); if (cellElement) { const cellRect = cellElement.getBoundingClientRect(); + /// #if !MOBILE setPosition(this.element, cellRect.left, cellRect.bottom, cellRect.height); + /// #else + setPosition(this.element, 0, 0); + /// #endif } } else { const textareaPosition = getSelectionPosition(protyle.wysiwyg.element); + /// #if !MOBILE setPosition(this.element, textareaPosition.left, textareaPosition.top + 26, 30); + /// #else + setPosition(this.element, 0, 0); + /// #endif } this.element.scrollTop = 0; this.bindUploadEvent(protyle, this.element); diff --git a/app/src/protyle/render/abcRender.ts b/app/src/protyle/render/abcRender.ts index 257c5dd9d25..06ef1fce9c5 100644 --- a/app/src/protyle/render/abcRender.ts +++ b/app/src/protyle/render/abcRender.ts @@ -36,7 +36,7 @@ export const abcRender = (element: Element, cdn = Constants.PROTYLE_CDN) => { return; } if (abcElements.length > 0) { - addScript(`${cdn}/js/abcjs/abcjs-basic-min.js?v=6.2.2`, "protyleAbcjsScript").then(() => { + addScript(`${cdn}/js/abcjs/abcjs-basic-min.js?v=6.5.0`, "protyleAbcjsScript").then(() => { const wysiswgElement = hasClosestByClassName(element, "protyle-wysiwyg", true); abcElements.forEach((e: HTMLDivElement) => { if (e.getAttribute("data-render") === "true") { diff --git a/app/src/protyle/render/av/action.ts b/app/src/protyle/render/av/action.ts index 32392b5a51c..c4023fa674d 100644 --- a/app/src/protyle/render/av/action.ts +++ b/app/src/protyle/render/av/action.ts @@ -34,6 +34,7 @@ import {hideElements} from "../../ui/hideElements"; import {fetchPost, fetchSyncPost} from "../../../util/fetch"; import {scrollCenter} from "../../../util/highlightById"; import {escapeHtml} from "../../../util/escape"; +import {editGalleryItem, openGalleryItemMenu} from "./gallery/util"; export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLElement }) => { if (isOnlyMeta(event)) { @@ -46,7 +47,10 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle const loadMoreElement = hasClosestByAttribute(event.target, "data-type", "av-load-more"); if (loadMoreElement && !hasClosestByAttribute(event.target, "data-type", "set-page-size")) { - (blockElement.querySelector(".av__row--footer") as HTMLElement).style.transform = ""; + const rowFooterElement = blockElement.querySelector(".av__row--footer") as HTMLElement; + if (rowFooterElement) { + rowFooterElement.style.transform = ""; + } blockElement.removeAttribute("data-render"); blockElement.dataset.pageSize = (parseInt(blockElement.dataset.pageSize) + parseInt(blockElement.querySelector('[data-type="set-page-size"]').getAttribute("data-size"))).toString(); avRender(blockElement, protyle); @@ -115,6 +119,7 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle openViewMenu({protyle, blockElement, element: viewItemElement}); } else { blockElement.removeAttribute("data-render"); + blockElement.setAttribute("data-av-type", viewItemElement.dataset.avType); avRender(blockElement, protyle, undefined, viewItemElement.dataset.id); } event.preventDefault(); @@ -198,7 +203,10 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle event.stopPropagation(); return true; } else if (type === "av-add-bottom") { - insertRows(blockElement, protyle, 1, blockElement.querySelector(".av__row--util").previousElementSibling.getAttribute("data-id") || ""); + insertRows(blockElement, protyle, 1, + blockElement.querySelector(".av__row--util")?.previousElementSibling?.getAttribute("data-id") || + target.previousElementSibling?.getAttribute("data-id") || undefined + ); event.preventDefault(); event.stopPropagation(); return true; @@ -209,25 +217,38 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle return true; } else if (target.classList.contains("av__cell")) { if (!hasClosestByClassName(target, "av__row--header")) { - const scrollElement = hasClosestByClassName(target, "av__scroll"); - if (!scrollElement || target.querySelector(".av__pulse")) { - return; - } - const rowElement = hasClosestByClassName(target, "av__row"); - if (!rowElement) { + if (target.querySelector(".av__pulse")) { return; } const cellType = getTypeByCellElement(target); - // TODO 点击单元格的时候, lineNumber 选中整行 - if (cellType === "updated" || cellType === "created" || cellType === "lineNumber") { - selectRow(rowElement.querySelector(".av__firstcol"), "toggle"); + if (blockElement.getAttribute("data-av-type") === "gallery") { + const itemElement = hasClosestByClassName(target, "av__gallery-item"); + if (itemElement) + if (cellType === "updated" || cellType === "created" || cellType === "lineNumber") { + itemElement.classList.add("av__gallery-item--select"); + } else { + popTextCell(protyle, [target]); + } } else { - scrollElement.querySelectorAll(".av__row--select").forEach(item => { - item.querySelector(".av__firstcol use").setAttribute("xlink:href", "#iconUncheck"); - item.classList.remove("av__row--select"); - }); - updateHeader(rowElement); - popTextCell(protyle, [target]); + const scrollElement = hasClosestByClassName(target, "av__scroll"); + if (!scrollElement) { + return; + } + const rowElement = hasClosestByClassName(target, "av__row"); + if (!rowElement) { + return; + } + // TODO 点击单元格的时候, lineNumber 选中整行 + if (cellType === "updated" || cellType === "created" || cellType === "lineNumber") { + selectRow(rowElement.querySelector(".av__firstcol"), "toggle"); + } else { + scrollElement.querySelectorAll(".av__row--select").forEach(item => { + item.querySelector(".av__firstcol use").setAttribute("xlink:href", "#iconUncheck"); + item.classList.remove("av__row--select"); + }); + updateHeader(rowElement); + popTextCell(protyle, [target]); + } } } event.preventDefault(); @@ -251,6 +272,16 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle event.preventDefault(); event.stopPropagation(); return true; + } else if (type === "av-gallery-edit") { + editGalleryItem(target); + event.preventDefault(); + event.stopPropagation(); + return true; + } else if (type === "av-gallery-more") { + openGalleryItemMenu({target, blockElement, protyle}); + event.preventDefault(); + event.stopPropagation(); + return true; } target = target.parentElement; } @@ -699,7 +730,17 @@ export const updateAttrViewCellAnimation = (cellElement: HTMLElement, value: IAV updateHeaderCell(cellElement, headerValue); } else { const hasDragFill = cellElement.querySelector(".av__drag-fill"); - cellElement.innerHTML = renderCell(value); + const blockElement = hasClosestBlock(cellElement); + if (!blockElement) { + return; + } + const viewType = blockElement.getAttribute("data-av-type") as TAVView; + if (viewType === "gallery") { + const iconElement = cellElement.querySelector(".b3-menu__avemoji"); + cellElement.innerHTML = renderCell(value, undefined, iconElement ? !iconElement.classList.contains("fn__none") : false, viewType); + } else { + cellElement.innerHTML = renderCell(value); + } if (hasDragFill) { addDragFill(cellElement); } diff --git a/app/src/protyle/render/av/asset.ts b/app/src/protyle/render/av/asset.ts index 72176277343..09bc55bf335 100644 --- a/app/src/protyle/render/av/asset.ts +++ b/app/src/protyle/render/av/asset.ts @@ -13,12 +13,14 @@ import {previewAttrViewImages} from "../../preview/image"; import {genAVValueHTML} from "./blockAttr"; import {hideMessage, showMessage} from "../../../dialog/message"; import {fetchPost} from "../../../util/fetch"; -import {hasClosestBlock, hasClosestByClassName} from "../../util/hasClosest"; +import {hasClosestBlock} from "../../util/hasClosest"; import {genCellValueByElement, getTypeByCellElement} from "./cell"; import {writeText} from "../../util/compatibility"; import {escapeAttr} from "../../../util/escape"; import {renameAsset} from "../../../editor/rename"; import * as dayjs from "dayjs"; +import {getColId} from "./col"; +import {getFieldIdByCellElement} from "./row"; export const bindAssetEvent = (options: { protyle: IProtyle, @@ -97,22 +99,22 @@ export const updateAssetCell = (options: { removeIndex?: number, blockElement: Element }) => { - const colId = options.cellElements[0].dataset.colId; + const viewType = options.blockElement.getAttribute("data-av-type") as TAVView; + const colId = getColId(options.cellElements[0], viewType); const cellDoOperations: IOperation[] = []; const cellUndoOperations: IOperation[] = []; let mAssetValue: IAVCellAssetValue[]; options.cellElements.forEach((item, elementIndex) => { + const rowID = getFieldIdByCellElement(item, viewType); if (!options.blockElement.contains(item)) { - const rowElement = hasClosestByClassName(item, "av__row"); - if (rowElement) { - item = options.cellElements[elementIndex] = - (options.blockElement.querySelector(`.av__row[data-id="${rowElement.dataset.id}"] .av__cell[data-col-id="${item.dataset.colId}"]`) || - // block attr - options.blockElement.querySelector(`.fn__flex-1[data-col-id="${item.dataset.colId}"]`)) as HTMLElement; + if (viewType === "table") { + item = options.cellElements[elementIndex] = (options.blockElement.querySelector(`.av__row[data-id="${rowID}"] .av__cell[data-col-id="${item.dataset.colId}"]`) || + options.blockElement.querySelector(`.fn__flex-1[data-col-id="${item.dataset.colId}"]`)) as HTMLElement; + } else { + item = options.cellElements[elementIndex] = (options.blockElement.querySelector(`.av__gallery-item[data-id="${rowID}"] .av__cell[data-field-id="${item.dataset.fieldId}"]`)) as HTMLElement; } } const cellValue = genCellValueByElement(getTypeByCellElement(item) || item.dataset.type as TAVCol, item); - const rowID = (hasClosestByClassName(item, "av__row") as HTMLElement).dataset.id; const oldValue = JSON.parse(JSON.stringify(cellValue)); if (elementIndex === 0) { if (typeof options.removeIndex === "number") { diff --git a/app/src/protyle/render/av/calc.ts b/app/src/protyle/render/av/calc.ts index 38ae15e80db..5bc8e37e68a 100644 --- a/app/src/protyle/render/av/calc.ts +++ b/app/src/protyle/render/av/calc.ts @@ -2,6 +2,7 @@ import {Menu} from "../../../plugin/Menu"; import {transaction} from "../../wysiwyg/transaction"; import {hasClosestBlock, hasClosestByClassName} from "../../util/hasClosest"; import {fetchSyncPost} from "../../../util/fetch"; +import {getFieldsByData} from "./view"; const calcItem = (options: { menu: Menu, @@ -38,7 +39,7 @@ const calcItem = (options: { }]); } else { options.target.querySelector(".b3-menu__accelerator").textContent = getNameByOperator(options.operator, true); - const colData = options.data.view.columns.find((item) => { + const colData = getFieldsByData(options.data).find((item) => { if (item.id === options.colId) { if (!item.rollup) { item.rollup = {}; @@ -274,7 +275,8 @@ export const openCalcMenu = async (protyle: IProtyle, calcElement: HTMLElement, const avResponse = await fetchSyncPost("api/av/renderAttributeView", {id: avId}); avData = avResponse.data; } - avData.view.columns.find((item) => { + + getFieldsByData(avData).find((item) => { if (item.id === colId) { relationKeyID = item.rollup?.relationKeyID; keyID = item.rollup?.keyID; @@ -283,7 +285,7 @@ export const openCalcMenu = async (protyle: IProtyle, calcElement: HTMLElement, }); if (relationKeyID && keyID) { let relationAvId: string; - avData.view.columns.find((item) => { + getFieldsByData(avData).find((item) => { if (item.id === relationKeyID) { relationAvId = item.relation?.avID; return true; diff --git a/app/src/protyle/render/av/cell.ts b/app/src/protyle/render/av/cell.ts index a5ccce07a40..2a0a0c789e7 100644 --- a/app/src/protyle/render/av/cell.ts +++ b/app/src/protyle/render/av/cell.ts @@ -8,7 +8,7 @@ import {fetchPost} from "../../../util/fetch"; import {focusBlock, focusByRange} from "../../util/selection"; import * as dayjs from "dayjs"; import {unicode2Emoji} from "../../../emoji"; -import {getColIconByType} from "./col"; +import {getColIconByType, getColId} from "./col"; import {genAVValueHTML} from "./blockAttr"; import {Constants} from "../../../constants"; import {hintRef} from "../../hint/extend"; @@ -16,6 +16,8 @@ import {getAssetName, pathPosix} from "../../../util/pathName"; import {mergeAddOption} from "./select"; import {escapeAttr, escapeHtml} from "../../../util/escape"; import {electronUndo} from "../../undo"; +import {getFieldIdByCellElement} from "./row"; +import {getFieldsByData} from "./view"; const renderCellURL = (urlContent: string) => { let host = urlContent; @@ -235,7 +237,6 @@ const transformCellValue = (colType: TAVCol, value: IAVCellValue): IAVCellValue return newValue; }; - export const genCellValue = (colType: TAVCol, value: string | any) => { let cellValue: IAVCellValue = { type: colType, @@ -455,6 +456,9 @@ export const cellScrollIntoView = (blockElement: HTMLElement, cellElement: Eleme }; export const getTypeByCellElement = (cellElement: Element) => { + if (cellElement.parentElement.classList.contains("av__gallery-fields")) { + return cellElement.getAttribute("data-dtype") as TAVCol; + } const scrollElement = hasClosestByClassName(cellElement, "av__scroll"); if (!scrollElement) { return; @@ -476,9 +480,12 @@ export const popTextCell = (protyle: IProtyle, cellElements: HTMLElement[], type if (!blockElement) { return; } + const viewType = blockElement.getAttribute("data-av-type") as TAVView; let cellRect = cellElements[0].getBoundingClientRect(); const contentElement = hasClosestByClassName(blockElement, "protyle-content", true); - cellScrollIntoView(blockElement, cellElements[0], false); + if (viewType === "table") { + cellScrollIntoView(blockElement, cellElements[0], false); + } cellRect = cellElements[0].getBoundingClientRect(); let html = ""; let height = cellRect.height; @@ -489,9 +496,9 @@ export const popTextCell = (protyle: IProtyle, cellElements: HTMLElement[], type height = contentRect.bottom - cellRect.top; } const width = Math.min(Math.max(cellRect.width, 25), contentRect.width); - style = `style="padding-top: 6.5px;position:absolute;left: ${(cellRect.left < contentRect.left || cellRect.left + width > contentRect.right) ? contentRect.left : cellRect.left}px;top: ${cellRect.top}px;width:${width}px;height: ${height}px"`; + style = `style="padding-top: ${viewType === "table" ? 6.5 : 1}px;position:absolute;left: ${(cellRect.left < contentRect.left || cellRect.left + width > contentRect.right) ? contentRect.left : cellRect.left}px;top: ${cellRect.top}px;width:${width}px;height: ${height}px"`; } else { - style = `style="padding-top: 6.5px;position:absolute;left: ${cellRect.left}px;top: ${cellRect.top}px;width:${Math.max(cellRect.width, 25)}px;height: ${height}px"`; + style = `style="padding-top: ${viewType === "table" ? 6.5 : 1}px;position:absolute;left: ${cellRect.left}px;top: ${cellRect.top}px;width:${Math.max(cellRect.width, 25)}px;height: ${height}px"`; } if (["text", "email", "phone", "block", "template"].includes(type)) { @@ -513,9 +520,15 @@ export const popTextCell = (protyle: IProtyle, cellElements: HTMLElement[], type } else if (type === "relation") { openMenuPanel({protyle, blockElement, type: "relation", cellElements}); } else if (type === "rollup") { - openMenuPanel({protyle, blockElement, type: "rollup", cellElements, colId: cellElements[0].dataset.colId}); + openMenuPanel({ + protyle, + blockElement, + type: "rollup", + cellElements, + colId: getColId(cellElements[0], viewType) + }); } - if (!hasClosestByClassName(cellElements[0], "custom-attr")) { + if (viewType === "table" && !hasClosestByClassName(cellElements[0], "custom-attr")) { cellElements[0].classList.add("av__cell--select"); addDragFill(cellElements[0]); } @@ -538,8 +551,8 @@ export const popTextCell = (protyle: IProtyle, cellElements: HTMLElement[], type id: blockElement.dataset.avId, viewID: blockElement.getAttribute(Constants.CUSTOM_SY_AV_VIEW) }, (response) => { - response.data.view.columns.find((item: IAVColumn) => { - if (item.id === cellElements[0].dataset.colId) { + getFieldsByData(response.data).find((item: IAVColumn) => { + if (item.id === getColId(cellElements[0], viewType)) { inputElement.value = item.template; inputElement.dataset.template = item.template; return true; @@ -551,10 +564,12 @@ export const popTextCell = (protyle: IProtyle, cellElements: HTMLElement[], type inputElement.addEventListener("input", (event: InputEvent) => { if (Constants.BLOCK_HINT_KEYS.includes(inputElement.value.substring(0, 2))) { protyle.toolbar.range = document.createRange(); - if (!blockElement.contains(cellElements[0])) { - const rowElement = hasClosestByClassName(cellElements[0], "av__row") as HTMLElement; - if (cellElements[0]) { - cellElements[0] = blockElement.querySelector(`.av__row[data-id="${rowElement.dataset.id}"] .av__cell[data-col-id="${cellElements[0].dataset.colId}"]`) as HTMLElement; + if (cellElements[0] && !blockElement.contains(cellElements[0])) { + const rowID = getFieldIdByCellElement(cellElements[0], viewType); + if (viewType === "table") { + cellElements[0] = (blockElement.querySelector(`.av__row[data-id="${rowID}"] .av__cell[data-col-id="${cellElements[0].dataset.colId}"]`)) as HTMLElement; + } else { + cellElements[0] = (blockElement.querySelector(`.av__gallery-item[data-id="${rowID}"] .av__cell[data-field-id="${cellElements[0].dataset.fieldId}"]`)) as HTMLElement; } } protyle.toolbar.range.selectNodeContents(cellElements[0].lastChild); @@ -624,17 +639,20 @@ export const popTextCell = (protyle: IProtyle, cellElements: HTMLElement[], type }; const updateCellValueByInput = (protyle: IProtyle, type: TAVCol, blockElement: HTMLElement, cellElements: HTMLElement[]) => { - const rowElement = hasClosestByClassName(cellElements[0], "av__row"); - if (!rowElement) { - return; - } - if (cellElements.length === 1 && cellElements[0].dataset.detached === "true" && !rowElement.dataset.id) { - return; + const viewType = blockElement.getAttribute("data-av-type") as TAVView; + if (viewType === "table") { + const rowElement = hasClosestByClassName(cellElements[0], "av__row"); + if (!rowElement) { + return; + } + if (cellElements.length === 1 && cellElements[0].dataset.detached === "true" && !rowElement.dataset.id) { + return; + } } const avMaskElement = document.querySelector(".av__mask"); const avID = blockElement.getAttribute("data-av-id"); if (type === "template") { - const colId = cellElements[0].getAttribute("data-col-id"); + const colId = getColId(cellElements[0], viewType); const textElement = avMaskElement.querySelector(".b3-text-field") as HTMLInputElement; if (textElement.value !== textElement.dataset.template && !blockElement.getAttribute("data-loading")) { transaction(protyle, [{ @@ -657,8 +675,10 @@ const updateCellValueByInput = (protyle: IProtyle, type: TAVCol, blockElement: H checked: cellElements[0].querySelector("use").getAttribute("xlink:href") === "#iconUncheck" } : (avMaskElement.querySelector(".b3-text-field") as HTMLInputElement).value, cellElements); } - if (cellElements[0] // 兼容新增行后台隐藏 - && !hasClosestByClassName(cellElements[0], "custom-attr")) { + if (viewType === "table" && + // 兼容新增行后台隐藏 + cellElements[0] && + !hasClosestByClassName(cellElements[0], "custom-attr")) { cellElements[0].classList.add("av__cell--select"); addDragFill(cellElements[0]); } @@ -694,15 +714,21 @@ export const updateCellsValue = (protyle: IProtyle, nodeElement: HTMLElement, va } } const isCustomAttr = hasClosestByClassName(cellElements[0], "custom-attr"); + const viewType = nodeElement.getAttribute("data-av-type") as TAVView; cellElements.forEach((item: HTMLElement, elementIndex) => { - const rowElement = hasClosestByClassName(item, "av__row"); - if (!rowElement) { + const rowID = getFieldIdByCellElement(item, viewType); + if (!rowID) { return; } if (!nodeElement.contains(item)) { - item = cellElements[elementIndex] = (nodeElement.querySelector(`.av__row[data-id="${rowElement.dataset.id}"] .av__cell[data-col-id="${item.dataset.colId}"]`) || - nodeElement.querySelector(`.fn__flex-1[data-col-id="${item.dataset.colId}"]`)) as HTMLElement; + if (viewType === "table") { + item = cellElements[elementIndex] = (nodeElement.querySelector(`.av__row[data-id="${rowID}"] .av__cell[data-col-id="${item.dataset.colId}"]`) || + nodeElement.querySelector(`.fn__flex-1[data-col-id="${item.dataset.colId}"]`)) as HTMLElement; + } else { + item = cellElements[elementIndex] = (nodeElement.querySelector(`.av__gallery-item[data-id="${rowID}"] .av__cell[data-field-id="${item.dataset.fieldId}"]`)) as HTMLElement; + } } + if (!item) { // 兼容新增行后台隐藏 return; @@ -711,9 +737,8 @@ export const updateCellsValue = (protyle: IProtyle, nodeElement: HTMLElement, va if (["created", "updated", "template", "rollup"].includes(type)) { return; } - const rowID = rowElement.getAttribute("data-id"); const cellId = item.dataset.id; // 刚创建时无 id,更新需和 oldValue 保持一致 - const colId = item.dataset.colId; + const colId = getColId(item, viewType); text += getCellText(item) + ((cellElements[elementIndex + 1] && item.nextElementSibling && item.nextElementSibling.isSameNode(cellElements[elementIndex + 1])) ? "\t" : "\n\n"); const oldValue = genCellValueByElement(type, item); @@ -893,7 +918,7 @@ export const renderCellAttr = (cellElement: Element, value: IAVCellValue) => { } }; -export const renderCell = (cellValue: IAVCellValue, rowIndex = 0) => { +export const renderCell = (cellValue: IAVCellValue, rowIndex = 0, showIcon = true, type: TAVView = "table") => { let text = ""; if ("template" === cellValue.type) { text = `${cellValue ? (cellValue.template.content || "") : ""}`; @@ -908,7 +933,7 @@ export const renderCell = (cellValue: IAVCellValue, rowIndex = 0) => { if (cellValue?.isDetached) { text = `${Lute.EscapeHTMLStr(cellValue.block.content || "")}${window.siyuan.languages.more}`; } else { - text = `${unicode2Emoji(cellValue.block.icon || window.siyuan.storage[Constants.LOCAL_IMAGES].file)}${Lute.EscapeHTMLStr(cellValue.block.content)}${window.siyuan.languages.update}`; + text = `${unicode2Emoji(cellValue.block.icon || window.siyuan.storage[Constants.LOCAL_IMAGES].file)}${Lute.EscapeHTMLStr(cellValue.block.content)}${window.siyuan.languages.update}`; } } else if (cellValue.type === "number") { text = `${cellValue?.number.formattedContent || cellValue?.number.content || ""}`; @@ -948,10 +973,14 @@ export const renderCell = (cellValue: IAVCellValue, rowIndex = 0) => { } }); } else if (cellValue.type === "checkbox") { - text += ``; + text += `
`; + if (type === "gallery") { + text += `${window.siyuan.languages.checkbox}`; + } + text += "
"; } else if (cellValue.type === "rollup") { cellValue?.rollup?.contents?.forEach((item) => { - const rollupText = ["select", "mSelect", "mAsset", "checkbox", "relation"].includes(item.type) ? renderCell(item) : renderRollup(item); + const rollupText = ["select", "mSelect", "mAsset", "checkbox", "relation"].includes(item.type) ? renderCell(item, rowIndex, showIcon, type) : renderRollup(item); if (rollupText) { text += rollupText + ", "; } @@ -966,7 +995,7 @@ export const renderCell = (cellValue: IAVCellValue, rowIndex = 0) => { text += `${Lute.EscapeHTMLStr(item.block.content || window.siyuan.languages.untitled)}`; } else { // data-block-id 用于更新 emoji - text += `${unicode2Emoji(item.block.icon || window.siyuan.storage[Constants.LOCAL_IMAGES].file)}${Lute.EscapeHTMLStr(item.block.content || window.siyuan.languages.untitled)}`; + text += `${unicode2Emoji(item.block.icon || window.siyuan.storage[Constants.LOCAL_IMAGES].file)}${Lute.EscapeHTMLStr(item.block.content || window.siyuan.languages.untitled)}`; } } }); @@ -1148,3 +1177,34 @@ export const addDragFill = (cellElement: Element) => { cellElement.insertAdjacentHTML("beforeend", `
`); } }; + +export const cellValueIsEmpty = (value: IAVCellValue) => { + if (value.type === "checkbox") { + return false; + } + if (["text", "number", "block", "url", "phone", "email", "template"].includes(value.type)) { + return !value[value.type as "text"]?.content; + } + if (["mSelect", "mAsset", "select"].includes(value.type)) { + if (value[value.type as "mSelect"]?.length > 0) { + return false; + } + return true; + } + if (["date", "created", "updated"].includes(value.type)) { + return !value[value.type as "date"]?.isNotEmpty && + !value[value.type as "date"]?.isNotEmpty2; + } + if (value.type === "relation") { + if (value.relation?.blockIDs && value.relation.blockIDs.length > 0) { + return false; + } + return true; + } + if (value.type === "rollup") { + if (value.rollup?.contents && value.rollup.contents.length > 0) { + return false; + } + return true; + } +}; diff --git a/app/src/protyle/render/av/col.ts b/app/src/protyle/render/av/col.ts index 0b02ce4fbb2..263728337e0 100644 --- a/app/src/protyle/render/av/col.ts +++ b/app/src/protyle/render/av/col.ts @@ -16,6 +16,15 @@ import {setPosition} from "../../../util/setPosition"; import {duplicateNameAddOne} from "../../../util/functions"; import {Dialog} from "../../../dialog"; import {escapeAriaLabel, escapeAttr, escapeHtml} from "../../../util/escape"; +import {getFieldsByData} from "./view"; + +export const getColId = (element: Element, viewType: TAVView) => { + if (viewType === "table") { + return element.getAttribute("data-col-id"); + } else if (viewType === "gallery") { + return element.getAttribute("data-field-id"); + } +}; export const duplicateCol = (options: { protyle: IProtyle, @@ -25,10 +34,11 @@ export const duplicateCol = (options: { data: IAV, }) => { let newColData: IAVColumn; - options.data.view.columns.find((item: IAVColumn, index) => { + const fields = getFieldsByData(options.data); + fields.find((item: IAVColumn, index) => { if (item.id === options.colId) { newColData = JSON.parse(JSON.stringify(item)); - options.data.view.columns.splice(index + 1, 0, newColData); + fields.splice(index + 1, 0, newColData); return true; } }); @@ -74,7 +84,7 @@ export const getEditHTML = (options: { isCustomAttr: boolean }) => { let colData: IAVColumn; - options.data.view.columns.find((item) => { + getFieldsByData(options.data).find((item) => { if (item.id === options.colId) { colData = item; return true; @@ -190,12 +200,6 @@ export const getEditHTML = (options: { } return `
${html} - -
${html} - diff --git a/app/src/protyle/render/av/gallery/item.ts b/app/src/protyle/render/av/gallery/item.ts new file mode 100644 index 00000000000..4d00b0b36e7 --- /dev/null +++ b/app/src/protyle/render/av/gallery/item.ts @@ -0,0 +1,135 @@ +import {showMessage} from "../../../../dialog/message"; +import { + genCellValueByElement, + getTypeByCellElement, + renderCell, + renderCellAttr +} from "../cell"; +import {fetchPost} from "../../../../util/fetch"; +import {setPage} from "../row"; + +export const insertGalleryItemAnimation = (options: { + blockElement: HTMLElement; + protyle: IProtyle; + srcIDs: string[]; + previousId: string; +}) => { + if ((options.blockElement.querySelector('[data-type="av-search"]') as HTMLInputElement).value !== "") { + showMessage(window.siyuan.languages.insertRowTip); + return; + } + const avId = options.blockElement.getAttribute("data-av-id"); + const sideItemElement = options.previousId ? options.blockElement.querySelector(`.av__gallery-item[data-id="${options.previousId}"]`) : options.blockElement.querySelector(".av__gallery-item"); + let html = ""; + let needUpdate = ""; + if (options.blockElement.querySelector('.av__views [data-type="av-sort"]').classList.contains("block__icon--active") && + !options.blockElement.querySelector('[data-type="av-load-more"]').classList.contains("fn__none")) { + needUpdate = ' data-need-update="true"'; + } + options.srcIDs.forEach((id) => { + html += ``; + }); + if (options.previousId) { + sideItemElement.insertAdjacentHTML("afterend", html); + } else { + options.blockElement.querySelector(".av__gallery").insertAdjacentHTML("afterbegin", html); + } + const currentItemElement = options.blockElement.querySelector(`.av__gallery-item[data-id="${options.srcIDs[0]}"]`); + fetchPost("/api/av/getAttributeViewFilterSort", { + id: avId, + blockID: options.blockElement.getAttribute("data-node-id") + }, (response) => { + // https://github.com/siyuan-note/siyuan/issues/10517 + let hideTextCell = false; + response.data.filters.find((item: IAVFilter) => { + const itemCellElement = options.blockElement.querySelector(`.av__cell[data-field-id="${item.column}"]`); + if (!itemCellElement) { + return; + } + const filterType = itemCellElement.getAttribute("data-dtype"); + if (item.value && filterType !== item.value.type) { + return; + } + if (["relation", "rollup", "template"].includes(filterType)) { + hideTextCell = true; + return true; + } + + // 根据后台计算出显示与否的结果进行标识,以便于在 refreshAV 中更新 UI + if (["created", "updated"].includes(filterType)) { + currentItemElement.setAttribute("data-need-update", "true"); + } else { + response.data.sorts.find((sortItem: IAVSort) => { + if (sortItem.column === item.column) { + currentItemElement.setAttribute("data-need-update", "true"); + return true; + } + }); + } + // 当空或非空外,需要根据值进行判断 + let isRenderValue = true; + if (item.operator !== "Is empty" && item.operator !== "Is not empty") { + switch (item.value.type) { + case "select": + case "mSelect": + if (!item.value.mSelect || item.value.mSelect.length === 0) { + isRenderValue = false; + } + break; + case "block": + if (!item.value.block || !item.value.block.content) { + isRenderValue = false; + } + break; + case "number": + if (!item.value.number || !item.value.number.isNotEmpty) { + isRenderValue = false; + } + break; + case "date": + case "created": + case "updated": + if (!item.value[item.value.type] || !item.value[item.value.type].isNotEmpty) { + isRenderValue = false; + } + break; + case "mAsset": + if (!item.value.mAsset || item.value.mAsset.length === 0) { + isRenderValue = false; + } + break; + case "checkbox": + if (!item.value.checkbox) { + isRenderValue = false; + } + break; + case "text": + case "url": + case "phone": + case "email": + if (!item.value[item.value.type] || !item.value[item.value.type].content) { + isRenderValue = false; + } + break; + } + } + if (sideItemElement.classList.contains("av__row") && isRenderValue) { + const sideItemCellElement = sideItemElement.querySelector(`.av__cell[data-field-id="${item.column}"]`) as HTMLElement; + const cellElement = currentItemElement.querySelector(`.av__cell[data-field-id="${item.column}"]`); + const cellValue = genCellValueByElement(getTypeByCellElement(sideItemCellElement), sideItemCellElement); + const iconElement = cellElement.querySelector(".b3-menu__avemoji"); + cellElement.innerHTML = renderCell(cellValue, undefined, + iconElement ? !iconElement.classList.contains("fn__none") : false, "gallery"); + renderCellAttr(cellElement, cellValue); + } + }); + if (hideTextCell) { + currentItemElement.remove(); + showMessage(window.siyuan.languages.insertRowTip); + } + setPage(options.blockElement); + }); +}; diff --git a/app/src/protyle/render/av/gallery/render.ts b/app/src/protyle/render/av/gallery/render.ts new file mode 100644 index 00000000000..fb0e4b69474 --- /dev/null +++ b/app/src/protyle/render/av/gallery/render.ts @@ -0,0 +1,282 @@ +import {hasClosestBlock, hasClosestByAttribute, hasClosestByClassName} from "../../../util/hasClosest"; +import {Constants} from "../../../../constants"; +import {fetchPost} from "../../../../util/fetch"; +import {escapeAriaLabel, escapeAttr, escapeHtml} from "../../../../util/escape"; +import {unicode2Emoji} from "../../../../emoji"; +import {cellValueIsEmpty, renderCell} from "../cell"; +import {focusBlock} from "../../../util/selection"; +import {electronUndo} from "../../../undo"; +import {addClearButton} from "../../../../util/addClearButton"; +import {updateSearch} from "../render"; +import {getViewIcon} from "../view"; + +export const renderGallery = (options: { + blockElement: HTMLElement, + protyle: IProtyle, + cb?: (data: IAV) => void, + viewID?: string, + renderAll: boolean +}) => { + const alignSelf = options.blockElement.style.alignSelf; + let oldOffset: number; + if (options.blockElement.firstElementChild.innerHTML === "") { + options.blockElement.style.alignSelf = ""; + options.blockElement.firstElementChild.outerHTML = ``; + } else { + oldOffset = options.protyle.contentElement.scrollTop; + } + const editIds: string[] = []; + options.blockElement.querySelectorAll(".av__gallery-fields--edit").forEach(item => { + editIds.push(item.parentElement.getAttribute("data-id")); + }); + const selectItemIds: string[] = []; + options.blockElement.querySelectorAll(".av__gallery-item--select").forEach(rowItem => { + const rowId = rowItem.getAttribute("data-id"); + if (rowId) { + selectItemIds.push(rowId); + } + }); + const created = options.protyle.options.history?.created; + const snapshot = options.protyle.options.history?.snapshot; + let newViewID = options.blockElement.getAttribute(Constants.CUSTOM_SY_AV_VIEW) || ""; + if (typeof options.viewID === "string") { + const viewTabElement = options.blockElement.querySelector(`.av__views > .layout-tab-bar > .item[data-id="${options.viewID}"]`) as HTMLElement; + if (viewTabElement) { + options.blockElement.dataset.pageSize = viewTabElement.dataset.page; + } + newViewID = options.viewID; + fetchPost("/api/av/setDatabaseBlockView", { + id: options.blockElement.dataset.nodeId, + avID: options.blockElement.dataset.avId, + viewID: options.viewID + }); + options.blockElement.setAttribute(Constants.CUSTOM_SY_AV_VIEW, newViewID); + } + let searchInputElement = options.blockElement.querySelector('[data-type="av-search"]') as HTMLInputElement; + const isSearching = searchInputElement && document.activeElement.isSameNode(searchInputElement); + const query = searchInputElement?.value || ""; + fetchPost(created ? "/api/av/renderHistoryAttributeView" : (snapshot ? "/api/av/renderSnapshotAttributeView" : "/api/av/renderAttributeView"), { + id: options.blockElement.getAttribute("data-av-id"), + created, + snapshot, + pageSize: parseInt(options.blockElement.dataset.pageSize) || undefined, + viewID: newViewID, + query: query.trim() + }, (response) => { + const view: IAVGallery = response.data.view; + if (!options.blockElement.dataset.pageSize) { + options.blockElement.dataset.pageSize = view.pageSize.toString(); + } + let galleryHTML = ""; + // body + view.cards.forEach((item: IAVGalleryItem, rowIndex: number) => { + galleryHTML += ``; + }); + galleryHTML += ``; + let tabHTML = ""; + let viewData: IAVView; + response.data.views.forEach((item: IAVView) => { + tabHTML += `
+ ${item.icon ? unicode2Emoji(item.icon, "item__graphic", true) : ``} + ${escapeHtml(item.name)} +
`; + if (item.id === response.data.viewID) { + viewData = item; + } + }); + if (options.renderAll) { + options.blockElement.firstElementChild.outerHTML = `
+
+
+
+ ${tabHTML} +
+
+ + + +
+
+ + + + ${response.data.views.length} + +
+ + + +
+ + + +
+ +
+ +
+
+ + + +
+ + + +
+ ${response.data.isMirror ? ` +
` : ""} +
+
${response.data.name || ""}
+
+
+
+ ${galleryHTML} +
+ +
${Constants.ZWSP}
+
`; + } else { + const galleryElement = options.blockElement.firstElementChild.querySelector(".av__gallery"); + galleryElement.innerHTML = galleryHTML; + if (view.hideAttrViewName) { + galleryElement.classList.add("av__gallery--top"); + } else { + galleryElement.classList.remove("av__gallery--top"); + } + } + if (typeof oldOffset === "number") { + options.protyle.contentElement.scrollTop = oldOffset; + } + options.blockElement.setAttribute("data-render", "true"); + if (alignSelf) { + options.blockElement.style.alignSelf = alignSelf; + } + if (getSelection().rangeCount > 0) { + // 修改表头后光标重新定位 + const range = getSelection().getRangeAt(0); + if (!hasClosestByClassName(range.startContainer, "av__title")) { + const blockElement = hasClosestBlock(range.startContainer); + if (blockElement && options.blockElement.isSameNode(blockElement) && !isSearching) { + focusBlock(options.blockElement); + } + } + } + options.blockElement.querySelector(".layout-tab-bar").scrollLeft = (options.blockElement.querySelector(".layout-tab-bar .item--focus") as HTMLElement).offsetLeft; + if (options.cb) { + options.cb(response.data); + } + if (!options.renderAll) { + return; + } + const viewsElement = options.blockElement.querySelector(".av__views") as HTMLElement; + searchInputElement = options.blockElement.querySelector('[data-type="av-search"]') as HTMLInputElement; + searchInputElement.value = query || ""; + if (isSearching) { + searchInputElement.focus(); + } + searchInputElement.addEventListener("compositionstart", (event: KeyboardEvent) => { + event.stopPropagation(); + }); + searchInputElement.addEventListener("keydown", (event: KeyboardEvent) => { + if (event.isComposing) { + return; + } + electronUndo(event); + }); + searchInputElement.addEventListener("input", (event: KeyboardEvent) => { + event.stopPropagation(); + if (event.isComposing) { + return; + } + if (searchInputElement.value || document.activeElement.isSameNode(searchInputElement)) { + viewsElement.classList.add("av__views--show"); + } else { + viewsElement.classList.remove("av__views--show"); + } + updateSearch(options.blockElement, options.protyle); + }); + searchInputElement.addEventListener("compositionend", () => { + updateSearch(options.blockElement, options.protyle); + }); + searchInputElement.addEventListener("blur", (event: KeyboardEvent) => { + if (event.isComposing) { + return; + } + if (!searchInputElement.value) { + viewsElement.classList.remove("av__views--show"); + searchInputElement.style.width = "0"; + searchInputElement.style.paddingLeft = "0"; + searchInputElement.style.paddingRight = "0"; + } + }); + addClearButton({ + inputElement: searchInputElement, + right: 0, + width: "1em", + height: searchInputElement.clientHeight, + clearCB() { + viewsElement.classList.remove("av__views--show"); + searchInputElement.style.width = "0"; + searchInputElement.style.paddingLeft = "0"; + searchInputElement.style.paddingRight = "0"; + focusBlock(options.blockElement); + updateSearch(options.blockElement, options.protyle); + } + }); + }); +}; diff --git a/app/src/protyle/render/av/gallery/util.ts b/app/src/protyle/render/av/gallery/util.ts new file mode 100644 index 00000000000..c72374d65f3 --- /dev/null +++ b/app/src/protyle/render/av/gallery/util.ts @@ -0,0 +1,232 @@ +import {transaction} from "../../../wysiwyg/transaction"; +import {Menu} from "../../../../plugin/Menu"; +import * as dayjs from "dayjs"; +import {hasClosestByClassName} from "../../../util/hasClosest"; +import {genCellValueByElement} from "../cell"; + +export const setGalleryCover = (options: { + view: IAVGallery + nodeElement: Element, + protyle: IProtyle, + target: HTMLElement +}) => { + const avID = options.nodeElement.getAttribute("data-av-id"); + const blockID = options.nodeElement.getAttribute("data-node-id"); + const targetNameElement = options.target.querySelector(".b3-menu__accelerator"); + const menu = new Menu(); + menu.addItem({ + iconHTML: "", + checked: options.view.coverFrom === 0, + label: window.siyuan.languages.calcOperatorNone, + click() { + transaction(options.protyle, [{ + action: "setAttrViewCoverFrom", + avID, + blockID, + data: 0 + }], [{ + action: "setAttrViewCoverFrom", + avID, + blockID, + data: options.view.coverFrom + }]); + options.view.coverFrom = 0; + targetNameElement.textContent = window.siyuan.languages.calcOperatorNone; + } + }); + menu.addItem({ + iconHTML: "", + checked: options.view.coverFrom === 1, + label: window.siyuan.languages.contentImage, + click() { + transaction(options.protyle, [{ + action: "setAttrViewCoverFrom", + avID, + blockID, + data: 1 + }], [{ + action: "setAttrViewCoverFrom", + avID, + blockID, + data: options.view.coverFrom + }]); + options.view.coverFrom = 1; + targetNameElement.textContent = window.siyuan.languages.contentImage; + } + }); + options.view.fields.forEach(item => { + if (item.type === "mAsset") { + menu.addItem({ + iconHTML: "", + checked: options.view.coverFrom === 2 && options.view.coverFromAssetKeyID === item.id, + label: item.name, + click() { + transaction(options.protyle, [{ + action: "setAttrViewCoverFrom", + avID, + blockID, + data: 2 + }, { + action: "setAttrViewCoverFromAssetKeyID", + avID, + blockID, + keyID: item.id + }], [{ + action: "setAttrViewCoverFrom", + avID, + blockID, + data: options.view.coverFrom + }, { + action: "setAttrViewCoverFromAssetKeyID", + avID, + blockID, + keyID: options.view.coverFromAssetKeyID + }]); + options.view.coverFrom = 2; + options.view.coverFromAssetKeyID = item.id; + targetNameElement.textContent = item.name; + } + }); + } + }); + const rect = options.target.getBoundingClientRect(); + menu.open({x: rect.left, y: rect.bottom}); +}; + +export const setGallerySize = (options: { + view: IAVGallery + nodeElement: Element, + protyle: IProtyle, + target: HTMLElement +}) => { + const menu = new Menu(); + const avID = options.nodeElement.getAttribute("data-av-id"); + const blockID = options.nodeElement.getAttribute("data-node-id"); + const galleryElement = options.nodeElement.querySelector(".av__gallery"); + const targetNameElement = options.target.querySelector(".b3-menu__accelerator"); + menu.addItem({ + iconHTML: "", + checked: options.view.cardSize === 0, + label: window.siyuan.languages.small, + click() { + transaction(options.protyle, [{ + action: "setAttrViewCardSize", + avID, + blockID, + data: 0 + }], [{ + action: "setAttrViewCardSize", + avID, + blockID, + data: options.view.cardSize + }]); + options.view.cardSize = 0; + galleryElement.classList.add("av__gallery--small"); + galleryElement.classList.remove("av__gallery--big"); + targetNameElement.textContent = window.siyuan.languages.small; + } + }); + menu.addItem({ + iconHTML: "", + checked: options.view.cardSize === 1, + label: window.siyuan.languages.medium, + click() { + transaction(options.protyle, [{ + action: "setAttrViewCardSize", + avID, + blockID, + data: 1 + }], [{ + action: "setAttrViewCardSize", + avID, + blockID, + data: options.view.cardSize + }]); + options.view.cardSize = 1; + galleryElement.classList.remove("av__gallery--big", "av__gallery--small"); + targetNameElement.textContent = window.siyuan.languages.medium; + } + }); + menu.addItem({ + iconHTML: "", + checked: options.view.cardSize === 2, + label: window.siyuan.languages.large, + click() { + transaction(options.protyle, [{ + action: "setAttrViewCardSize", + avID, + blockID, + data: 2 + }], [{ + action: "setAttrViewCardSize", + avID, + blockID, + data: options.view.cardSize + }]); + options.view.cardSize = 2; + galleryElement.classList.remove("av__gallery--small"); + galleryElement.classList.add("av__gallery--big"); + targetNameElement.textContent = window.siyuan.languages.large; + } + }); + const rect = options.target.getBoundingClientRect(); + menu.open({x: rect.left, y: rect.bottom}); +}; + +export const openGalleryItemMenu = (options: { + target: HTMLElement, + blockElement: HTMLElement, + protyle: IProtyle, +}) => { + const menu = new Menu(); + const avID = options.blockElement.getAttribute("data-av-id"); + menu.addItem({ + icon: "iconTrashcan", + warning: true, + label: window.siyuan.languages.delete, + click() { + const cardElement = hasClosestByClassName(options.target, "av__gallery-item"); + if (cardElement) { + const newUpdated = dayjs().format("YYYYMMDDHHmmss"); + const blockValue = genCellValueByElement("block", cardElement.querySelector(".av__cell[data-block-id]")); + transaction(options.protyle, [{ + action: "removeAttrViewBlock", + srcIDs: [cardElement.dataset.id], + avID, + }, { + action: "doUpdateUpdated", + id: options.blockElement.dataset.nodeId, + data: newUpdated, + }], [{ + action: "insertAttrViewBlock", + avID, + previousID: cardElement.previousElementSibling?.getAttribute("data-id") || "", + srcs: [{ + id: cardElement.getAttribute("data-id"), + isDetached: blockValue.isDetached, + content: blockValue.block.content + }], + blockID: options.blockElement.dataset.nodeId + }, { + action: "doUpdateUpdated", + id: options.blockElement.dataset.nodeId, + data: options.blockElement.getAttribute("updated") + }]); + cardElement.remove(); + options.blockElement.setAttribute("updated", newUpdated); + } + } + }); + const rect = options.target.getBoundingClientRect(); + menu.open({ + x: rect.left, + y: rect.bottom + }); +}; + +export const editGalleryItem = (taget: Element) => { + const itemElement = hasClosestByClassName(taget, "av__gallery-item"); + if (itemElement) { + itemElement.querySelector(".av__gallery-fields")?.classList.toggle("av__gallery-fields--edit"); + } +}; diff --git a/app/src/protyle/render/av/layout.ts b/app/src/protyle/render/av/layout.ts new file mode 100644 index 00000000000..90516800c68 --- /dev/null +++ b/app/src/protyle/render/av/layout.ts @@ -0,0 +1,227 @@ +import {transaction} from "../../wysiwyg/transaction"; +import {Constants} from "../../../constants"; + +export const getLayoutHTML = (data: IAV) => { + let html = ""; + const view = data.view as IAVGallery; + if (data.viewType === "gallery") { + let coverFromTitle = ""; + if (view.coverFrom === 0) { + coverFromTitle = window.siyuan.languages.calcOperatorNone; + } else if (view.coverFrom === 1) { + coverFromTitle = window.siyuan.languages.contentImage; + } else { + view.fields.find(item => { + if (item.type === "mAsset" && item.id === view.coverFromAssetKeyID) { + coverFromTitle = item.name; + return true; + } + }); + } + html = ` + + + +`; + } + return `
+
+ + + + + ${html} + +
`; +}; + +export const bindLayoutEvent = (options: { + protyle: IProtyle, + data: IAV, + menuElement: HTMLElement + blockElement: Element +}) => { + const toggleTitleElement = options.menuElement.querySelector('.b3-switch[data-type="toggle-view-title"]') as HTMLInputElement; + toggleTitleElement.addEventListener("change", () => { + const avID = options.blockElement.getAttribute("data-av-id"); + const blockID = options.blockElement.getAttribute("data-node-id"); + const checked = toggleTitleElement.checked; + transaction(options.protyle, [{ + action: "hideAttrViewName", + avID, + blockID, + data: !checked + }], [{ + action: "hideAttrViewName", + avID, + blockID, + data: checked + }]); + if (checked) { + options.blockElement.querySelector(".av__title").classList.remove("fn__none"); + } else { + // hide + options.blockElement.querySelector(".av__title").classList.add("fn__none"); + } + if (options.data.viewType === "gallery") { + const galleryElement = options.blockElement.querySelector(".av__gallery"); + if (checked) { + galleryElement.classList.remove("av__gallery--top"); + } else { + // hide + galleryElement.classList.add("av__gallery--top"); + } + } + }); + if (options.data.viewType !== "gallery") { + return; + } + const toggleFitElement = options.menuElement.querySelector('.b3-switch[data-type="toggle-gallery-fit"]') as HTMLInputElement; + toggleFitElement.addEventListener("change", () => { + const avID = options.blockElement.getAttribute("data-av-id"); + const blockID = options.blockElement.getAttribute("data-node-id"); + const checked = toggleFitElement.checked; + transaction(options.protyle, [{ + action: "setAttrViewFitImage", + avID, + blockID, + data: checked + }], [{ + action: "setAttrViewFitImage", + avID, + blockID, + data: !checked + }]); + options.blockElement.querySelectorAll(".av__gallery-img").forEach(item => { + if (checked) { + item.classList.add("av__gallery-img--fit"); + } else { + item.classList.remove("av__gallery-img--fit"); + } + }); + }); + const toggleIconElement = options.menuElement.querySelector('.b3-switch[data-type="toggle-gallery-icon"]') as HTMLInputElement; + toggleIconElement.addEventListener("change", () => { + const avID = options.blockElement.getAttribute("data-av-id"); + const blockID = options.blockElement.getAttribute("data-node-id"); + const checked = toggleIconElement.checked; + transaction(options.protyle, [{ + action: "setAttrViewShowIcon", + avID, + blockID, + data: checked + }], [{ + action: "setAttrViewShowIcon", + avID, + blockID, + data: !checked + }]); + options.blockElement.querySelectorAll('.av__cell[data-dtype="block"] .b3-menu__avemoji').forEach(item => { + if (checked) { + item.classList.remove("fn__none"); + } else { + item.classList.add("fn__none"); + } + }); + }); + const toggleWrapElement = options.menuElement.querySelector('.b3-switch[data-type="toggle-gallery-wrap"]') as HTMLInputElement; + toggleWrapElement.addEventListener("change", () => { + const avID = options.blockElement.getAttribute("data-av-id"); + const blockID = options.blockElement.getAttribute("data-node-id"); + const checked = toggleWrapElement.checked; + transaction(options.protyle, [{ + action: "setAttrViewWrapField", + avID, + blockID, + data: checked + }], [{ + action: "setAttrViewWrapField", + avID, + blockID, + data: !checked + }]); + options.blockElement.querySelectorAll('.av__gallery-fields').forEach(item => { + if (checked) { + item.classList.add("av__gallery-fields--wrap"); + } else { + item.classList.remove("av__gallery-fields--wrap"); + } + }); + }); +}; + +export const updateLayout = (options: { + data: IAV + nodeElement: Element, + protyle: IProtyle, + target: HTMLElement +}) => { + if (options.target.classList.contains("av__layout-item--select")) { + return; + } + const avID = options.nodeElement.getAttribute("data-av-id"); + const blockID = options.nodeElement.getAttribute("data-node-id"); + const layout = options.target.getAttribute("data-view-type"); + transaction(options.protyle, [{ + action: "changeAttrViewLayout", + avID, + blockID, + layout + }], [{ + action: "changeAttrViewLayout", + avID, + blockID, + layout: options.data.viewType + }]); + options.target.parentElement.querySelector(".av__layout-item--select").classList.remove("av__layout-item--select"); + options.target.classList.add("av__layout-item--select"); +}; diff --git a/app/src/protyle/render/av/openMenuPanel.ts b/app/src/protyle/render/av/openMenuPanel.ts index a7ba04a3041..d9901a8da28 100644 --- a/app/src/protyle/render/av/openMenuPanel.ts +++ b/app/src/protyle/render/av/openMenuPanel.ts @@ -1,6 +1,15 @@ import {transaction} from "../../wysiwyg/transaction"; import {fetchPost} from "../../../util/fetch"; -import {addCol, bindEditEvent, duplicateCol, getColIconByType, getColNameByType, getEditHTML, removeCol} from "./col"; +import { + addCol, + bindEditEvent, + duplicateCol, + getColIconByType, + getColId, + getColNameByType, + getEditHTML, + removeCol +} from "./col"; import {setPosition} from "../../../util/setPosition"; import {hasClosestByAttribute, hasClosestByClassName} from "../../util/hasClosest"; import {addColOptionOrCell, bindSelectEvent, getSelectHTML, removeCellOption, setColOption} from "./select"; @@ -20,7 +29,14 @@ import {openAsset} from "../../../editor/util"; /// #endif import {previewAttrViewImages} from "../../preview/image"; import {assetMenu} from "../../../menus/protyle"; -import {addView, bindSwitcherEvent, bindViewEvent, getSwitcherHTML, getViewHTML, openViewMenu} from "./view"; +import { + addView, + bindSwitcherEvent, + bindViewEvent, getFieldsByData, + getSwitcherHTML, + getViewHTML, + openViewMenu +} from "./view"; import {focusBlock} from "../../util/selection"; import {avRender} from "./render"; import {setPageSize} from "./row"; @@ -30,6 +46,8 @@ import {updateCellsValue} from "./cell"; import {openCalcMenu} from "./calc"; import {escapeAttr, escapeHtml} from "../../../util/escape"; import {Dialog} from "../../../dialog"; +import {bindLayoutEvent, getLayoutHTML, updateLayout} from "./layout"; +import {setGalleryCover, setGallerySize} from "./gallery/util"; export const openMenuPanel = (options: { protyle: IProtyle, @@ -67,31 +85,32 @@ export const openMenuPanel = (options: { const isCustomAttr = !options.blockElement.classList.contains("av"); const data = response.data as IAV; let html; + const fields = getFieldsByData(data); if (options.type === "config") { html = getViewHTML(data); } else if (options.type === "properties") { - html = getPropertiesHTML(data.view); + html = getPropertiesHTML(fields); } else if (options.type === "sorts") { - html = getSortsHTML(data.view.columns, data.view.sorts); + html = getSortsHTML(fields, data.view.sorts); } else if (options.type === "switcher") { html = getSwitcherHTML(data.views, data.viewID); } else if (options.type === "filters") { - html = getFiltersHTML(data.view); + html = getFiltersHTML(data); } else if (options.type === "select") { - html = getSelectHTML(data.view, options.cellElements, true); + html = getSelectHTML(fields, options.cellElements, true, options.blockElement); } else if (options.type === "asset") { html = getAssetHTML(options.cellElements); } else if (options.type === "edit") { if (options.editData) { if (options.editData.previousID) { - data.view.columns.find((item, index) => { + fields.find((item, index) => { if (item.id === options.editData.previousID) { - data.view.columns.splice(index + 1, 0, options.editData.colData); + fields.splice(index + 1, 0, options.editData.colData); return true; } }); } else { - data.view.columns.splice(0, 0, options.editData.colData); + fields.splice(0, 0, options.editData.colData); } } html = getEditHTML({protyle: options.protyle, data, colId: options.colId, isCustomAttr}); @@ -106,7 +125,7 @@ export const openMenuPanel = (options: { protyle: options.protyle, blockElement: options.blockElement, type: "edit", - colId: options.cellElements[0].dataset.colId + colId: getColId(options.cellElements[0], data.viewType) }); return; } @@ -239,7 +258,7 @@ export const openMenuPanel = (options: { data: oldData, blockID }]); - menuElement.innerHTML = getSortsHTML(data.view.columns, data.view.sorts); + menuElement.innerHTML = getSortsHTML(fields, data.view.sorts); bindSortsEvent(options.protyle, menuElement, data, blockID); return; } @@ -275,7 +294,7 @@ export const openMenuPanel = (options: { data: oldData, blockID }]); - menuElement.innerHTML = getFiltersHTML(data.view); + menuElement.innerHTML = getFiltersHTML(data); return; } if (targetElement.querySelector('[data-type="av-view-edit"]')) { @@ -326,8 +345,8 @@ export const openMenuPanel = (options: { return; } if (targetElement.querySelector('[data-type="setColOption"]')) { - const colId = options.cellElements ? options.cellElements[0].dataset.colId : menuElement.querySelector(".b3-menu__item").getAttribute("data-col-id"); - const changeData = data.view.columns.find((column) => column.id === colId).options; + const colId = options.cellElements ? getColId(options.cellElements[0], data.viewType) : menuElement.querySelector(".b3-menu__item").getAttribute("data-col-id"); + const changeData = fields.find((column) => column.id === colId).options; const oldData = Object.assign([], changeData); let targetOption: { name: string, color: string }; changeData.find((option, index: number) => { @@ -359,7 +378,7 @@ export const openMenuPanel = (options: { }]); const oldScroll = menuElement.querySelector(".b3-menu__items").scrollTop; if (options.cellElements) { - menuElement.innerHTML = getSelectHTML(data.view, options.cellElements); + menuElement.innerHTML = getSelectHTML(fields, options.cellElements, false, options.blockElement); bindSelectEvent(options.protyle, data, menuElement, options.cellElements, options.blockElement); } else { menuElement.innerHTML = getEditHTML({ @@ -419,24 +438,24 @@ export const openMenuPanel = (options: { blockID }]); let column: IAVColumn; - data.view.columns.find((item, index: number) => { + fields.find((item, index: number) => { if (item.id === sourceId) { - column = data.view.columns.splice(index, 1)[0]; + column = fields.splice(index, 1)[0]; return true; } }); - data.view.columns.find((item, index: number) => { + fields.find((item, index: number) => { if (item.id === targetId) { if (isTop) { - data.view.columns.splice(index, 0, column); + fields.splice(index, 0, column); } else { - data.view.columns.splice(index + 1, 0, column); + fields.splice(index + 1, 0, column); } return true; } }); } - menuElement.innerHTML = getPropertiesHTML(data.view); + menuElement.innerHTML = getPropertiesHTML(fields); return; } }); @@ -531,14 +550,22 @@ export const openMenuPanel = (options: { } else if (type === "go-properties") { // 复制列后点击返回到属性面板,宽度不一致,需重新计算 tabRect = options.blockElement.querySelector(".av__views").getBoundingClientRect(); - menuElement.innerHTML = getPropertiesHTML(data.view); + menuElement.innerHTML = getPropertiesHTML(fields); setPosition(menuElement, tabRect.right - menuElement.clientWidth, tabRect.bottom, tabRect.height); window.siyuan.menus.menu.remove(); event.preventDefault(); event.stopPropagation(); break; + } else if (type === "go-layout") { + menuElement.innerHTML = getLayoutHTML(data); + setPosition(menuElement, tabRect.right - menuElement.clientWidth, tabRect.bottom, tabRect.height); + bindLayoutEvent({protyle: options.protyle, data, menuElement, blockElement: options.blockElement}); + window.siyuan.menus.menu.remove(); + event.preventDefault(); + event.stopPropagation(); + break; } else if (type === "goSorts") { - menuElement.innerHTML = getSortsHTML(data.view.columns, data.view.sorts); + menuElement.innerHTML = getSortsHTML(fields, data.view.sorts); bindSortsEvent(options.protyle, menuElement, data, blockID); setPosition(menuElement, tabRect.right - menuElement.clientWidth, tabRect.bottom, tabRect.height); window.siyuan.menus.menu.remove(); @@ -558,7 +585,7 @@ export const openMenuPanel = (options: { blockID }]); data.view.sorts = []; - menuElement.innerHTML = getSortsHTML(data.view.columns, data.view.sorts); + menuElement.innerHTML = getSortsHTML(fields, data.view.sorts); bindSortsEvent(options.protyle, menuElement, data, blockID); setPosition(menuElement, tabRect.right - menuElement.clientWidth, tabRect.bottom, tabRect.height); event.preventDefault(); @@ -596,14 +623,14 @@ export const openMenuPanel = (options: { data: oldSorts, blockID }]); - menuElement.innerHTML = getSortsHTML(data.view.columns, data.view.sorts); + menuElement.innerHTML = getSortsHTML(fields, data.view.sorts); bindSortsEvent(options.protyle, menuElement, data, blockID); setPosition(menuElement, tabRect.right - menuElement.clientWidth, tabRect.bottom, tabRect.height); event.preventDefault(); event.stopPropagation(); break; } else if (type === "goFilters") { - menuElement.innerHTML = getFiltersHTML(data.view); + menuElement.innerHTML = getFiltersHTML(data); setPosition(menuElement, tabRect.right - menuElement.clientWidth, tabRect.bottom, tabRect.height); window.siyuan.menus.menu.remove(); event.preventDefault(); @@ -622,7 +649,7 @@ export const openMenuPanel = (options: { blockID }]); data.view.filters = []; - menuElement.innerHTML = getFiltersHTML(data.view); + menuElement.innerHTML = getFiltersHTML(data); setPosition(menuElement, tabRect.right - menuElement.clientWidth, tabRect.bottom, tabRect.height); window.siyuan.menus.menu.remove(); event.preventDefault(); @@ -661,7 +688,7 @@ export const openMenuPanel = (options: { data: oldFilters, blockID }]); - menuElement.innerHTML = getFiltersHTML(data.view); + menuElement.innerHTML = getFiltersHTML(data); setPosition(menuElement, tabRect.right - menuElement.clientWidth, tabRect.bottom, tabRect.height); event.preventDefault(); event.stopPropagation(); @@ -806,7 +833,7 @@ export const openMenuPanel = (options: { } else if (type === "showAllCol") { const doOperations: IOperation[] = []; const undoOperations: IOperation[] = []; - data.view.columns.forEach((item: IAVColumn) => { + fields.forEach((item: IAVColumn) => { if (item.hidden) { doOperations.push({ action: "setAttrViewColHidden", @@ -827,7 +854,7 @@ export const openMenuPanel = (options: { }); if (doOperations.length > 0) { transaction(options.protyle, doOperations, undoOperations); - menuElement.innerHTML = getPropertiesHTML(data.view); + menuElement.innerHTML = getPropertiesHTML(fields); setPosition(menuElement, tabRect.right - menuElement.clientWidth, tabRect.bottom, tabRect.height); } event.preventDefault(); @@ -836,7 +863,7 @@ export const openMenuPanel = (options: { } else if (type === "hideAllCol") { const doOperations: IOperation[] = []; const undoOperations: IOperation[] = []; - data.view.columns.forEach((item: IAVColumn) => { + fields.forEach((item: IAVColumn) => { if (!item.hidden && item.type !== "block") { doOperations.push({ action: "setAttrViewColHidden", @@ -857,7 +884,7 @@ export const openMenuPanel = (options: { }); if (doOperations.length > 0) { transaction(options.protyle, doOperations, undoOperations); - menuElement.innerHTML = getPropertiesHTML(data.view); + menuElement.innerHTML = getPropertiesHTML(fields); setPosition(menuElement, tabRect.right - menuElement.clientWidth, tabRect.bottom, tabRect.height); } event.preventDefault(); @@ -880,7 +907,7 @@ export const openMenuPanel = (options: { const nameElement = avPanelElement.querySelector('.b3-text-field[data-type="name"]') as HTMLInputElement; const name = nameElement.value; let newName = name; - data.view.columns.find((item: IAVColumn) => { + fields.find((item: IAVColumn) => { if (item.id === options.colId) { item.type = target.dataset.newType as TAVCol; if (getColNameByType(target.dataset.oldType as TAVCol) === name) { @@ -1006,7 +1033,7 @@ export const openMenuPanel = (options: { protyle: options.protyle, avElement: avPanelElement, avID, - colsData: data.view.columns, + colsData: fields, blockElement: options.blockElement, }); event.preventDefault(); @@ -1038,7 +1065,7 @@ export const openMenuPanel = (options: { data: false, blockID }]); - data.view.columns.find((item: IAVColumn) => item.id === colId).hidden = true; + fields.find((item: IAVColumn) => item.id === colId).hidden = true; if (isEdit) { menuElement.innerHTML = getEditHTML({ protyle: options.protyle, @@ -1048,7 +1075,7 @@ export const openMenuPanel = (options: { }); bindEditEvent({protyle: options.protyle, data, menuElement, isCustomAttr, blockID}); } else { - menuElement.innerHTML = getPropertiesHTML(data.view); + menuElement.innerHTML = getPropertiesHTML(fields); } setPosition(menuElement, tabRect.right - menuElement.clientWidth, tabRect.bottom, tabRect.height); event.preventDefault(); @@ -1070,7 +1097,7 @@ export const openMenuPanel = (options: { data: true, blockID }]); - data.view.columns.find((item: IAVColumn) => item.id === colId).hidden = false; + fields.find((item: IAVColumn) => item.id === colId).hidden = false; if (isEdit) { menuElement.innerHTML = getEditHTML({ protyle: options.protyle, @@ -1080,7 +1107,7 @@ export const openMenuPanel = (options: { }); bindEditEvent({protyle: options.protyle, data, menuElement, isCustomAttr, blockID}); } else { - menuElement.innerHTML = getPropertiesHTML(data.view); + menuElement.innerHTML = getPropertiesHTML(fields); } setPosition(menuElement, tabRect.right - menuElement.clientWidth, tabRect.bottom, tabRect.height); event.preventDefault(); @@ -1102,7 +1129,7 @@ export const openMenuPanel = (options: { tabRect = options.blockElement.querySelector(".av__views").getBoundingClientRect(); } const colId = menuElement.querySelector(".b3-menu__item").getAttribute("data-col-id"); - const colData = data.view.columns.find((item: IAVColumn) => { + const colData = fields.find((item: IAVColumn) => { if (item.id === colId) { return true; } @@ -1129,7 +1156,7 @@ export const openMenuPanel = (options: { if (action === "delete" || (isDispatch && dialogEvent.detail === "Enter")) { removeCol({ protyle: options.protyle, - data, + fields, avID, blockID, menuElement, @@ -1144,7 +1171,7 @@ export const openMenuPanel = (options: { } else if (action === "keep-relation") { removeCol({ protyle: options.protyle, - data, + fields, avID, blockID, menuElement, @@ -1167,7 +1194,7 @@ export const openMenuPanel = (options: { } else { removeCol({ protyle: options.protyle, - data, + fields, avID, blockID, menuElement, @@ -1314,6 +1341,7 @@ export const openMenuPanel = (options: { avPanelElement.querySelector(".b3-menu__item--current")?.classList.remove("b3-menu__item--current"); target.parentElement.classList.add("b3-menu__item--current"); options.blockElement.removeAttribute("data-render"); + options.blockElement.setAttribute("data-av-type", target.dataset.avType); avRender(options.blockElement, options.protyle, undefined, target.parentElement.dataset.id); } event.preventDefault(); @@ -1343,6 +1371,36 @@ export const openMenuPanel = (options: { event.preventDefault(); event.stopPropagation(); break; + } else if (type === "set-gallery-cover") { + setGalleryCover({ + target, + protyle: options.protyle, + nodeElement: options.blockElement, + view: data.view as IAVGallery + }); + event.preventDefault(); + event.stopPropagation(); + break; + } else if (type === "set-gallery-size") { + setGallerySize({ + target, + protyle: options.protyle, + nodeElement: options.blockElement, + view: data.view as IAVGallery + }); + event.preventDefault(); + event.stopPropagation(); + break; + } else if (type === "set-layout") { + updateLayout({ + target, + protyle: options.protyle, + nodeElement: options.blockElement, + data: data + }); + event.preventDefault(); + event.stopPropagation(); + break; } // 有错误日志,没找到重现步骤,需先判断一下 if (!target || !target.parentElement) { @@ -1354,10 +1412,10 @@ export const openMenuPanel = (options: { }); }; -export const getPropertiesHTML = (data: IAVTable) => { +export const getPropertiesHTML = (fields: IAVColumn[]) => { let showHTML = ""; let hideHTML = ""; - data.columns.forEach((item: IAVColumn) => { + fields.forEach((item: IAVColumn) => { if (item.hidden) { hideHTML += ` -
", bind(element) { element.addEventListener("click", (event) => { - const target = event.target as HTMLElement; - if (target.classList.contains("color__square") && !target.classList.contains("color__square--current")) { + const colorTarget = event.target as HTMLElement; + if (colorTarget.classList.contains("color__square") && !colorTarget.classList.contains("color__square--current")) { element.querySelector(".color__square--current")?.classList.remove("color__square--current"); - target.classList.add("color__square--current"); - const newColor = target.getAttribute("data-color"); + colorTarget.classList.add("color__square--current"); + const newColor = colorTarget.getAttribute("data-color"); transaction(protyle, [{ action: "updateAttrViewColOption", id: colId, @@ -390,7 +402,7 @@ export const setColOption = (protyle: IProtyle, data: IAV, target: HTMLElement, }, }]); - data.view.columns.find(column => { + fields.find(column => { if (column.id === colId) { column.options.find((item) => { if (item.name === name) { @@ -408,10 +420,12 @@ export const setColOption = (protyle: IProtyle, data: IAV, target: HTMLElement, bindEditEvent({protyle, data, menuElement, isCustomAttr, blockID}); } else { cellElements.forEach((cellElement: HTMLElement, cellIndex) => { - const rowElement = hasClosestByClassName(cellElement, "av__row"); - if (rowElement) { - cellElement = cellElements[cellIndex] = (blockElement.querySelector(`.av__row[data-id="${rowElement.dataset.id}"] .av__cell[data-col-id="${cellElement.dataset.colId}"]`) || + const rowID = getFieldIdByCellElement(cellElement, viewType); + if (viewType === "table") { + cellElement = cellElements[cellIndex] = (blockElement.querySelector(`.av__row[data-id="${rowID}"] .av__cell[data-col-id="${cellElement.dataset.colId}"]`) || blockElement.querySelector(`.fn__flex-1[data-col-id="${cellElement.dataset.colId}"]`)) as HTMLElement; + } else { + cellElement = cellElements[cellIndex] = (blockElement.querySelector(`.av__gallery-item[data-id="${rowID}"] .av__cell[data-field-id="${cellElement.dataset.fieldId}"]`)) as HTMLElement; } cellValues[cellIndex].mSelect.find((item) => { if (item.content === name) { @@ -426,7 +440,7 @@ export const setColOption = (protyle: IProtyle, data: IAV, target: HTMLElement, updateAttrViewCellAnimation(cellElement, cellValues[cellIndex]); } }); - menuElement.innerHTML = getSelectHTML(data.view, cellElements); + menuElement.innerHTML = getSelectHTML(fields, cellElements, false, blockElement); bindSelectEvent(protyle, data, menuElement, cellElements, blockElement); } menuElement.querySelector(".b3-menu__items").scrollTop = oldScroll; @@ -451,9 +465,9 @@ export const setColOption = (protyle: IProtyle, data: IAV, target: HTMLElement, export const bindSelectEvent = (protyle: IProtyle, data: IAV, menuElement: HTMLElement, cellElements: HTMLElement[], blockElement: Element) => { const inputElement = menuElement.querySelector("input"); - const colId = cellElements[0].dataset.colId; + const colId = getColId(cellElements[0], blockElement.getAttribute("data-av-type") as TAVView); let colData: IAVColumn; - data.view.columns.find((item: IAVColumn) => { + getFieldsByData(data).find((item: IAVColumn) => { if (item.id === colId) { colData = item; return; @@ -508,16 +522,19 @@ export const addColOptionOrCell = (protyle: IProtyle, data: IAV, cellElements: H const nodeElement = hasClosestBlock(cellElements[0]); if (!nodeElement) { cellElements.forEach((item, index) => { - const rowElement = hasClosestByClassName(item, "av__row"); - if (rowElement) { - cellElements[index] = (blockElement.querySelector(`.av__row[data-id="${rowElement.dataset.id}"] .av__cell[data-col-id="${item.dataset.colId}"]`) || + const rowID = getFieldIdByCellElement(item, data.viewType); + if (data.viewType === "table") { + cellElements[index] = (blockElement.querySelector(`.av__row[data-id="${rowID}"] .av__cell[data-col-id="${item.dataset.colId}"]`) || blockElement.querySelector(`.fn__flex-1[data-col-id="${item.dataset.colId}"]`)) as HTMLElement; + } else { + cellElements[index] = (blockElement.querySelector(`.av__gallery-item[data-id="${rowID}"] .av__cell[data-field-id="${item.dataset.fieldId}"]`)) as HTMLElement; } }); } - const colId = cellElements[0].dataset.colId; + const colId = getColId( cellElements[0], blockElement.getAttribute("data-av-type") as TAVView); let colData: IAVColumn; - data.view.columns.find((item: IAVColumn) => { + const fields = getFieldsByData(data); + fields.find((item: IAVColumn) => { if (item.id === colId) { colData = item; if (!colData.options) { @@ -531,11 +548,10 @@ export const addColOptionOrCell = (protyle: IProtyle, data: IAV, cellElements: H const cellUndoOperations: IOperation[] = []; let mSelectValue: IAVCellSelectValue[]; cellElements.forEach((item, index) => { - const itemRowElement = hasClosestByClassName(item, "av__row"); - if (!itemRowElement) { + const rowID = getFieldIdByCellElement(item, data.viewType); + if (!rowID) { return; } - const rowID = itemRowElement.dataset.id; const cellValue: IAVCellValue = cellValues[index]; const oldValue = JSON.parse(JSON.stringify(cellValue)); if (index === 0) { @@ -621,14 +637,14 @@ export const addColOptionOrCell = (protyle: IProtyle, data: IAV, cellElements: H } else { const oldScroll = menuElement.querySelector(".b3-menu__items").scrollTop; const oldChipsHeight = menuElement.querySelector(".b3-chips").clientHeight; - menuElement.innerHTML = getSelectHTML(data.view, cellElements); + menuElement.innerHTML = getSelectHTML(fields, cellElements, false, blockElement); bindSelectEvent(protyle, data, menuElement, cellElements, blockElement); menuElement.querySelector("input").focus(); menuElement.querySelector(".b3-menu__items").scrollTop = oldScroll + (menuElement.querySelector(".b3-chips").clientHeight - oldChipsHeight); } }; -export const getSelectHTML = (data: IAVTable, cellElements: HTMLElement[], init = false) => { +export const getSelectHTML = (fields: IAVColumn[], cellElements: HTMLElement[], init = false, blockElement: Element) => { if (init) { // 快速选中后如果 render 了再使用 genCellValueByElement 获取的元素和当前选中的不一致, https://github.com/siyuan-note/siyuan/issues/11268 cellValues = []; @@ -637,8 +653,8 @@ export const getSelectHTML = (data: IAVTable, cellElements: HTMLElement[], init cellValues.push(genCellValueByElement(isCustomAttr ? item.dataset.type as TAVCol : getTypeByCellElement(item), item)); }); } - const colId = cellElements[0].dataset["colId"]; - const colData = data.columns.find(item => { + const colId = cellElements[0].dataset[blockElement.getAttribute("data-av-type") === "table" ? "colId" : "fieldId"]; + const colData = fields.find(item => { if (item.id === colId) { return item; } diff --git a/app/src/protyle/render/av/sort.ts b/app/src/protyle/render/av/sort.ts index e56936c11a2..9be26beea0b 100644 --- a/app/src/protyle/render/av/sort.ts +++ b/app/src/protyle/render/av/sort.ts @@ -3,6 +3,7 @@ import {getColIconByType} from "./col"; import {transaction} from "../../wysiwyg/transaction"; import {setPosition} from "../../../util/setPosition"; import {unicode2Emoji} from "../../../emoji"; +import {getFieldsByData} from "./view"; export const addSort = (options: { data: IAV, @@ -14,7 +15,8 @@ export const addSort = (options: { blockID: string, }) => { const menu = new Menu("av-add-sort"); - options.data.view.columns.forEach((column) => { + const fields = getFieldsByData(options.data) + fields.forEach((column) => { let hasSort = false; // 如果该列是行号类型列,不允许添加排序 @@ -28,7 +30,7 @@ export const addSort = (options: { } }); } - + if (!hasSort) { menu.addItem({ label: column.name, @@ -50,7 +52,7 @@ export const addSort = (options: { data: oldSorts, blockID: options.blockID, }]); - options.menuElement.innerHTML = getSortsHTML(options.data.view.columns, options.data.view.sorts); + options.menuElement.innerHTML = getSortsHTML(fields, options.data.view.sorts); bindSortsEvent(options.protyle, options.menuElement, options.data, options.blockID); setPosition(options.menuElement, options.tabRect.right - options.menuElement.clientWidth, options.tabRect.bottom, options.tabRect.height); } diff --git a/app/src/protyle/render/av/view.ts b/app/src/protyle/render/av/view.ts index 386523919be..1082f094d63 100644 --- a/app/src/protyle/render/av/view.ts +++ b/app/src/protyle/render/av/view.ts @@ -163,43 +163,16 @@ export const bindViewEvent = (options: { descElement.addEventListener("input", () => { inputElement.nextElementSibling.setAttribute("aria-label", descElement.value ? escapeHtml(descElement.value) : window.siyuan.languages.addDesc); }); - const toggleTitleElement = options.menuElement.querySelector('.b3-switch[data-type="toggle-view-title"]') as HTMLInputElement; - toggleTitleElement.addEventListener("change", () => { - const avID = options.blockElement.getAttribute("data-av-id"); - const blockID = options.blockElement.getAttribute("data-node-id"); - if (!toggleTitleElement.checked) { - // hide - transaction(options.protyle, [{ - action: "hideAttrViewName", - avID, - blockID, - data: true - }], [{ - action: "hideAttrViewName", - avID, - blockID, - data: false - }]); - options.blockElement.querySelector(".av__title").classList.add("fn__none"); - } else { - transaction(options.protyle, [{ - action: "hideAttrViewName", - avID, - blockID, - data: false - }], [{ - action: "hideAttrViewName", - avID, - blockID, - data: true - }]); - options.blockElement.querySelector(".av__title").classList.remove("fn__none"); - } - }); }; export const getViewHTML = (data: IAV) => { const view = data.view; + let fields: IAVColumn[]; + if (data.viewType === "table") { + fields = (view as IAVTable).columns; + } else if (data.viewType === "gallery") { + fields = (view as IAVGallery).fields; + } return `
+ - -
{{.l2}} @@ -475,6 +479,7 @@

{{.workspace const submitAuth = () => { const inputElement = document.getElementById('authCode') const captchaElement = document.getElementById('captcha') + const rememberMeElement = document.getElementById('rememberMe') let code = inputElement.value.trim(); if ("" === code) { showMessage({{.l9}}) @@ -489,6 +494,7 @@

{{.workspace body: JSON.stringify({ authCode: code, captcha: captchaElement.value, + rememberMe: rememberMeElement.checked }), }).then((response) => { return response.json() diff --git a/app/stage/protyle/js/abcjs/abcjs-basic-min.js.LICENSE b/app/stage/protyle/js/abcjs/LICENSE.md similarity index 89% rename from app/stage/protyle/js/abcjs/abcjs-basic-min.js.LICENSE rename to app/stage/protyle/js/abcjs/LICENSE.md index ce22b18f8ed..ad3b93938cf 100644 --- a/app/stage/protyle/js/abcjs/abcjs-basic-min.js.LICENSE +++ b/app/stage/protyle/js/abcjs/LICENSE.md @@ -1,5 +1,4 @@ -/**! -Copyright (c) 2009-2023 Paul Rosen and Gregory Dyke +Copyright (c) 2009-2024 Paul Rosen and Gregory Dyke Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -19,5 +18,4 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - **This text is from: http://opensource.org/licenses/MIT** -!**/ +**This text is from: http://opensource.org/licenses/MIT** diff --git a/app/stage/protyle/js/abcjs/abcjs-basic-min.min.js b/app/stage/protyle/js/abcjs/abcjs-basic-min.min.js new file mode 100644 index 00000000000..c90242626f7 --- /dev/null +++ b/app/stage/protyle/js/abcjs/abcjs-basic-min.min.js @@ -0,0 +1,9 @@ +/** + * Skipped minification because the original files appears to be already minified. + * Original file: /npm/abcjs@6.5.0/dist/abcjs-basic-min.js + * + * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files + */ +/*! abcjs_basic v6.5.0 Copyright © 2009-2024 Paul Rosen and Gregory Dyke (https://abcjs.net) */ +/*! For license information please see abcjs_basic.LICENSE */ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.abcjs=t():e.ABCJS=t()}(this,(function(){return e={1045:function(e,t,r){var n=r(1185),a=r(6306),i=r(1592),s=r(1028),o=r(5633),c={};c.signature="abcjs-basic v"+n,Object.keys(a).forEach((function(e){c[e]=a[e]})),Object.keys(i).forEach((function(e){c[e]=i[e]})),c.renderAbc=r(6859),c.tuneMetrics=r(9989),c.TimingCallbacks=r(5681);var l=r(6020);c.setGlyph=l.setSymbol,c.strTranspose=o;var h=r(5594),u=r(8471),d=r(522),f=r(2029),p=r(6313),m=r(5281),g=r(8702),v=r(5049),b=r(4718),y=r(3450),x=r(562),k=r(9991);c.synth={CreateSynth:h,instrumentIndexToName:u,pitchToNoteName:d,SynthController:y,SynthSequence:f,CreateSynthControl:p,registerAudioContext:m,activeAudioContext:g,supportsAudio:v,playEvent:b,getMidiFile:x,sequence:s,midiRenderer:k},c.Editor=r(5294),c.EditArea=r(2945),e.exports=c},6306:function(e,t,r){var n=r(5681),a={};!function(){"use strict";var e,t;a.startAnimation=function(r,a,i){function s(e){for(var t=0;tr.currentEvent&&r.noteTimings[r.currentEvent].millisecondsr.currentLine&&r.lineEndTimings[r.currentLine].milliseconds=r.lastMoment)if(r.eventCallback){var s=r.eventCallback(null);r.shouldStop(s).then((function(e){e&&r.stop()}))}else r.stop()}},r.shouldStop=function(e){return new Promise((function(t){return e?"continue"===e?t(!1):void(e.then&&e.then((function(e){t("continue"!==e)}))):t(!0)}))},r.doBeatCallback=function(e){if(r.beatCallback){for(var t,n,a=r.currentEvent;a=0&&null===r.noteTimings[a].left;)a--;n=r.noteTimings[a]}var i={},s={};if(n){i.top=n.top,i.height=n.height;var o=Math.max(0,e-r.startTime-n.milliseconds),c=t-n.milliseconds,l=n.endX-n.left,h=c?o*l/c:0;i.left=n.left+h,0===r.currentEvent&&n.milliseconds>e-r.startTime&&(i.left=void 0),s={timestamp:e,startTime:r.startTime,ev:n,endMs:t,offMs:o,offPx:h,gapMs:c,gapPx:l}}else s={timestamp:e,startTime:r.startTime};var u=r.startTime;if(r.beatCallback(r.currentBeat/r.beatSubdivisions,r.totalBeats/r.beatSubdivisions,r.lastMoment,i,s),u!==r.startTime)return e-r.startTime;r.currentBeat++}return null},r.animationJogger=function(){r.isRunning&&(r.doTiming(performance.now()),r.joggerTimer=setTimeout(r.animationJogger,60))},r.start=function(e,t){if(r.isRunning=!0,r.isPaused&&(r.isPaused=!1,void 0===e&&(r.justUnpaused=!0)),e)r.setProgress(e,t);else if(0===e)r.reset();else if(null!==r.pausedPercent){var n=performance.now();r.currentTime=r.lastMoment*r.pausedPercent,r.startTime=n-r.currentTime,r.pausedPercent=null,r.reportNext=!0}requestAnimationFrame(r.doTiming),r.joggerTimer=setTimeout(r.animationJogger,60)},r.pause=function(){r.isPaused=!0;var e=performance.now();r.pausedPercent=(e-r.startTime)/r.lastMoment,r.isRunning=!1,r.joggerTimer&&(clearTimeout(r.joggerTimer),r.joggerTimer=null)},r.currentMillisecond=function(){return r.currentTime},r.reset=function(){r.currentBeat=0,r.currentEvent=0,r.currentLine=0,r.startTime=null,r.pausedPercent=null},r.stop=function(){r.pause(),r.reset()},r.setProgress=function(e,t){var n;switch(t){case"seconds":r.currentTime=1e3*e,r.currentTime<0&&(r.currentTime=0),r.currentTime>r.lastMoment&&(r.currentTime=r.lastMoment),n=r.currentTime/r.lastMoment;break;case"beats":r.currentTime=e*r.millisecondsPerBeat*r.beatSubdivisions,r.currentTime<0&&(r.currentTime=0),r.currentTime>r.lastMoment&&(r.currentTime=r.lastMoment),n=r.currentTime/r.lastMoment;break;default:(n=e)<0&&(n=0),n>1&&(n=1),r.currentTime=r.lastMoment*n}r.isRunning||(r.pausedPercent=n);var a=performance.now();for(r.startTime=a-r.currentTime,r.currentEvent,r.currentEvent=0;r.noteTimings.length>r.currentEvent&&r.noteTimings[r.currentEvent].millisecondsr.currentLine&&r.lineEndTimings[r.currentLine].milliseconds+r.lineEndAnticipation=0&&"event"===r.noteTimings[r.currentEvent].type&&r.eventCallback(r.noteTimings[r.currentEvent]),r.lineEndCallback&&r.lineEndCallback(r.lineEndTimings[r.currentLine],r.noteTimings[r.currentEvent],{line:r.currentLine,endTimings:r.lineEndTimings}),r.joggerTimer=setTimeout(r.animationJogger,60)}}},1592:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var a=r(8905),i=r(9565),s=r(2426),o={};!function(){"use strict";o.numberOfTunes=function(e){var t=e.split("\nX:").length;return 0===t&&(t=1),t};var e=o.TuneBook=function(e){var t=i(e);this.header=t.header,this.tunes=t.tunes};e.prototype.getTuneById=function(e){for(var t=0;t=0&&h0,v=0;v=0&&(d=T.startChar,u=void 0===T.chord?h:null),T.chord&&(h=T),"bar"===T.el_type){if(p){var S={abc:i.abc.substring(d,T.endChar)};(h=u&&u.chord&&u.chord.length>0?u.chord[0].name:null)&&(S.lastChord=h),T.startEnding&&(S.startEnding=T.startEnding),T.endEnding&&(S.endEnding=T.endEnding),f.push(S),d=null,p=!1}}else"note"===T.el_type&&(p=!0)}}r.push({header:l,measures:f,hasPickup:g})}return r}}(),e.exports=o},6859:function(e,t,r){var n=r(1592),a=(r(6780),r(5253)),i=r(8905),s=r(1756),o={};function c(){var e=window.innerWidth;for(var t in o)if(o.hasOwnProperty(t)){var r=o[t];e-=2*r.offsetLeft,r.style.width=e+"px"}}try{window.addEventListener("resize",c),window.addEventListener("orientationChange",c)}catch(e){}function l(e,t,r,n,i){r.viewportHorizontal?(e.innerHTML='
',r.scrollHorizontal?(e.style.overflowX="auto",e.style.overflowY="hidden"):e.style.overflow="hidden",o[e.id]=e,e=e.children[0]):r.viewportVertical?(e.innerHTML='
',e.style.overflowX="hidden",e.style.overflowY="auto",e=e.children[0]):e.innerHTML="";var s=new a(e,r);s.engraveABC(t,n,i),t.engraver=s,(r.viewportVertical||r.viewportHorizontal)&&(e.parentNode.style.width=e.style.width)}e.exports=function(e,t,r,o,c){var h,u={};if(r){for(h in r)r.hasOwnProperty(h)&&(u[h]=r[h]);u.warnings_id&&u.tablature&&(u.tablature.warning_id=u.warnings_id)}if(o)for(h in o)o.hasOwnProperty(h)&&("listener"===h?o[h].highlight&&(u.clickListener=o[h].highlight):u[h]=o[h]);if(c)for(h in c)c.hasOwnProperty(h)&&(u[h]=c[h]);return n.renderEngine((function(e,t,r,n){var o=!1;return"*"===e&&(o=!0,(e=document.createElement("div")).setAttribute("style","visibility: hidden;"),document.body.appendChild(e)),!o&&u.wrap&&u.staffwidth?(t=function(e,t,r,n,o){var c=new a(e,o).getMeasureWidths(t),h=s.calcLineWraps(t,c,o);if(h.reParse){var u=new i;u.parse(n,h.revisedParams),t=u.getTune();var d=u.getWarnings();d&&(t.warnings=d)}return o.afterParsing&&o.afterParsing(t,r,n),l(e,t,h.revisedParams,r,0),t.explanation=h.explanation,t}(e,t,r,n,u),t):(u.afterParsing&&u.afterParsing(t,r,n),l(e,t,u,r,0),o&&e.parentNode.removeChild(e),null)}),e,t,u)}},9989:function(e,t,r){var n=r(1592),a=r(5253);e.exports=function(e,t){return n.renderEngine((function(e,r,n,i){(e=document.createElement("div")).setAttribute("style","visibility: hidden;"),document.body.appendChild(e);var s=new a(e,t).getMeasureWidths(r);return e.parentNode.removeChild(e),{sections:s}}),"*",e,t)}},9447:function(e,t,r){var n=r(4914).relativeMajor,a={acc:"sharp",note:"f"},i={acc:"sharp",note:"c"},s={acc:"sharp",note:"g"},o={acc:"sharp",note:"d"},c={acc:"sharp",note:"A"},l={acc:"sharp",note:"e"},h={acc:"flat",note:"B"},u={acc:"flat",note:"e"},d={acc:"flat",note:"A"},f={acc:"flat",note:"d"},p={acc:"flat",note:"G"},m={acc:"flat",note:"c"},g={"C#":[a,i,s,o,c,l,{acc:"sharp",note:"B"}],"F#":[a,i,s,o,c,l],B:[a,i,s,o,c],E:[a,i,s,o],A:[a,i,s],D:[a,i],G:[a],C:[],F:[h],Bb:[h,u],Eb:[h,u,d],Cm:[h,u,d],Ab:[h,u,d,f],Db:[h,u,d,f,p],Gb:[h,u,d,f,p,m],Cb:[h,u,d,f,p,m,{acc:"flat",note:"F"}],"A#":[h,u],"B#":[],"D#":[h,u,d],"E#":[h],"G#":[h,u,d,f],none:[]};e.exports=function(e){var t=g[n(e)];return t?JSON.parse(JSON.stringify(t)):null}},4914:function(e){var t={C:{modes:["CMaj","Amin","Am","GMix","DDor","EPhr","FLyd","BLoc"],stepsFromC:0},Db:{modes:["DbMaj","Bbmin","Bbm","AbMix","EbDor","FPhr","GbLyd","CLoc"],stepsFromC:1},D:{modes:["DMaj","Bmin","Bm","AMix","EDor","F#Phr","GLyd","C#Loc"],stepsFromC:2},Eb:{modes:["EbMaj","Cmin","Cm","BbMix","FDor","GPhr","AbLyd","DLoc"],stepsFromC:3},E:{modes:["EMaj","C#min","C#m","BMix","F#Dor","G#Phr","ALyd","D#Loc"],stepsFromC:4},F:{modes:["FMaj","Dmin","Dm","CMix","GDor","APhr","BbLyd","ELoc"],stepsFromC:5},Gb:{modes:["GbMaj","Ebmin","Ebm","DbMix","AbDor","BbPhr","CbLyd","FLoc"],stepsFromC:6},G:{modes:["GMaj","Emin","Em","DMix","ADor","BPhr","CLyd","F#Loc"],stepsFromC:7},Ab:{modes:["AbMaj","Fmin","Fm","EbMix","BbDor","CPhr","DbLyd","GLoc"],stepsFromC:8},A:{modes:["AMaj","F#min","F#m","EMix","BDor","C#Phr","DLyd","G#Loc"],stepsFromC:9},Bb:{modes:["BbMaj","Gmin","Gm","FMix","CDor","DPhr","EbLyd","ALoc"],stepsFromC:10},B:{modes:["BMaj","G#min","G#m","F#Mix","C#Dor","D#Phr","ELyd","A#Loc"],stepsFromC:11},"C#":{modes:["C#Maj","A#min","A#m","G#Mix","D#Dor","E#Phr","F#Lyd","B#Loc"],stepsFromC:1},"F#":{modes:["F#Maj","D#min","D#m","C#Mix","G#Dor","A#Phr","BLyd","E#Loc"],stepsFromC:6},Cb:{modes:["CbMaj","Abmin","Abm","GbMix","DbDor","EbPhr","FbLyd","BbLoc"],stepsFromC:11}},r=null;e.exports={relativeMajor:function(e){r||function(){r={};for(var e=Object.keys(t),n=0;n=t&&(r-=t),"bar"===s[c].el_type)return r}return r}(this.lines,e);return t<1e-8||e-t<1e-8?0:t},this.getBarLength=function(){var e=this.getMeterFraction();return e.num/e.den},this.getTotalTime=function(){return this.totalTime},this.getTotalBeats=function(){return this.totalBeats},this.millisecondsPerMeasure=function(e){var t;if(e)t=e;else{var r=this.metaText?this.metaText.tempo:null;t=this.getBpm(r)}return t<=0&&(t=1),this.getBeatsPerMeasure()/t*6e4},this.getBeatsPerMeasure=function(){var e=this.getBeatLength();return this.getBarLength()/e},this.getMeter=function(){for(var e=0;ee)return c}}return null},this.addElementToEvents=function(e,t,r,a,i,s,o,c,l,h){if(t.hint)return{isTiedState:void 0,duration:0};var u=t.durationClass?t.durationClass:t.duration;if(t.abcelem.rest&&"spacer"===t.abcelem.rest.type&&(u=0),u>0){for(var d=[],f=0;f0)for(var s=i.staffs[0],o=s.absoluteY,c=o-s.top*a.STEP,l=i.staffs[i.staffs.length-1],h=(o=l.absoluteY)-l.bottom*a.STEP-c,u=i.voices,d=0;d0&&o["event"+p]&&(w="event"+p),p=Math.round(1e3*f),"bar"===C.type){var S=C.abcelem.type,_="bar_right_repeat"===S||"bar_dbl_repeat"===S,E="1"===C.abcelem.startEnding,M="bar_left_repeat"===S||"bar_dbl_repeat"===S||"bar_right_repeat"===S;if(_){x>0&&(o[w].endX=C.x),-1===g&&(g=x);var A=0;y=-1;for(var N=m;N=0;i--){var s=e[i];"bar"===s.type?(s.top=n,s.nextTop=t,t=n,s.bottom=a,s.nextBottom=r,r=a):"event"===s.type&&(n=s.top,a=s.top+s.height)}}(s=function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(e[r]);return t.sort((function(e,t){var r=e.milliseconds-t.milliseconds;return 0!==r?r:"bar"===e.type?-1:1}))}(o)),function(e,r){if(!(r.length<1)){for(var n=0;na.left&&(a.endX=Math.min(a.endX,s)):a.endX=s}}var o=r[r.length-1];o.endX=e[o.line].staffGroup.w}}(this.lines,s),s.push({type:"end",milliseconds:u}),this.addUsefulCallbackInfo(s,b*a),s},this.addUsefulCallbackInfo=function(e,t){for(var r=this.millisecondsPerMeasure(t),n=0;n0?e.duration[0]:r)/r}if(!t){t=180;var n=this.getMeterFraction();n&&3!==n.num&&n.num%3==0&&(t=120)}return t},this.setTiming=function(e,t){if(t=t||0,!this.engraver||!this.engraver.staffgroups)return console.log("setTiming cannot be called before the tune is drawn."),this.noteTimings=[],this.noteTimings;var r=this.metaText?this.metaText.tempo:null,n=this.getBpm(r),a=1;e?r&&(a=e/n):e=n;var i=this.getBeatLength(),s=e/60,o=this.getBarLength()/i*t/s;o&&(o-=this.getPickupLength()/i/s);var c=i*s;return this.noteTimings=this.setupEvents(o,c,e,a),this.noteTimings.length>0?(this.totalTime=this.noteTimings[this.noteTimings.length-1].milliseconds/1e3,this.totalBeats=this.totalTime*s):(this.totalTime=void 0,this.totalBeats=void 0),this.noteTimings},this.setUpAudio=function(e){e||(e={});var t=i(this,e);return s(t,e,this.formatting.percmap,this.formatting.midi)},this.deline=function(e){return o(this.lines,e)},this.findSelectableElement=function(e){return this.engraver&&this.engraver.selectables?this.engraver.findSelectableElement(e):null},this.getSelectableArray=function(){return this.engraver&&this.engraver.selectables?this.engraver.selectables:[]}}},351:function(e){function t(e,t){return"abselem"===e?"abselem":t}function r(e,t){e.el_type="meter",e.startChar=-1,e.endChar=-1;for(var r=0;r0&&(r===t||new RegExp("(^|\\s)"+t+"(\\s|$)").test(r))}(e,t)||(e.className+=(e.className?" ":"")+t),e},this.removeClassName=function(e,t){return e.className=n.strip(e.className.replace(new RegExp("(^|\\s+)"+t+"(\\s+|$)")," ")),e},this.setReadOnly=function(e){var t="abc_textarea_readonly",r=this.editarea.getElem();e?(r.setAttribute("readonly","yes"),this.addClassName(r,t)):(r.removeAttribute("readonly"),this.removeClassName(r,t))}};c.prototype.redrawMidi=function(){if(this.generate_midi&&!this.midiPause){var e=new window.CustomEvent("generateMidi",{detail:{tunes:this.tunes,abcjsParams:this.abcjsParams,downloadMidiEl:this.downloadMidi,inlineMidiEl:this.inlineMidi,engravingEl:this.div}});window.dispatchEvent(e)}if(this.synth){var t=this.synth.synthControl;this.synth.synthControl||(this.synth.synthControl=new a,this.synth.synthControl.load(this.synth.el,this.synth.cursorControl,this.synth.options)),this.synth.synthControl.setTune(this.tunes[0],t,this.synth.options)}},c.prototype.modelChanged=function(){if(!this.bReentry){this.bReentry=!0;try{this.timerId=null,this.synth&&this.synth.synthControl&&this.synth.synthControl.disable(!0),this.tunes=s(this.div,this.currentAbc,this.abcjsParams),this.tunes.length>0&&(this.warnings=this.tunes[0].warnings),this.redrawMidi()}catch(e){console.error("ABCJS error: ",e),this.warnings||(this.warnings=[]),this.warnings.push(e.message)}this.warningsdiv&&(this.warningsdiv.innerHTML=this.warnings?this.warnings.join("
"):"No errors"),this.updateSelection(),this.bReentry=!1}},c.prototype.paramChanged=function(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this.abcjsParams[t]=e[t]);this.currentAbc="",this.fireChanged()},c.prototype.synthParamChanged=function(e){if(this.synth){if(this.synth.options={},e)for(var t in e)e.hasOwnProperty(t)&&(this.synth.options[t]=e[t]);this.currentAbc="",this.fireChanged()}},c.prototype.parseABC=function(){var e=this.editarea.getString();return e===this.currentAbc?(this.updateSelection(),!1):(this.currentAbc=e,!0)},c.prototype.updateSelection=function(){var e=this.editarea.getSelection();try{this.tunes.length>0&&this.tunes[0].engraver&&this.tunes[0].engraver.rangeHighlight(e.start,e.end)}catch(e){}this.selectionChangeCallback&&this.selectionChangeCallback(e.start,e.end)},c.prototype.fireSelectionChanged=function(){this.updateSelection()},c.prototype.setDirtyStyle=function(e){if(void 0!==this.indicate_changed){var t,r,a="abc_textarea_dirty",i=this.editarea.getElem();e?function(e,t){var r=e.className;return r.length>0&&(r===t||new RegExp("(^|\\s)"+t+"(\\s|$)").test(r))}(t=i,r=a)||(t.className+=(t.className?" ":"")+r):function(e,t){e.className=n.strip(e.className.replace(new RegExp("(^|\\s+)"+t+"(\\s+|$)")," "))}(i,a)}},c.prototype.fireChanged=function(){if(!this.bIsPaused&&this.parseABC()){var e=this;this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout((function(){e.modelChanged()}),300);var t=this.isDirty();this.wasDirty!==t&&(this.wasDirty=t,this.setDirtyStyle(t)),this.onchangeCallback&&this.onchangeCallback(this)}},c.prototype.setNotDirty=function(){this.editarea.initialText=this.editarea.getString(),this.wasDirty=!1,this.setDirtyStyle(!1)},c.prototype.isDirty=function(){return void 0!==this.indicate_changed&&this.editarea.initialText!==this.editarea.getString()},c.prototype.highlight=function(e,t,r,n,a,i){this.editarea.setSelection(e.startChar,e.endChar),this.selectionChangeCallback&&this.selectionChangeCallback(e.startChar,e.endChar),this.clientClickListener&&this.clientClickListener(e,t,r,n,a,i)},c.prototype.pause=function(e){this.bIsPaused=e,e||this.fireChanged()},c.prototype.millisecondsPerMeasure=function(){return this.synth&&this.synth.synthControl&&this.synth.synthControl.visualObj?this.synth.synthControl.visualObj.millisecondsPerMeasure():0},c.prototype.pauseMidi=function(e){this.midiPause=e,e||this.redrawMidi()},e.exports=c},3284:function(e,t,r){var n,a=r(9991);!function(){"use strict";function e(e,t,r){for(var n=Object.keys(t),a=0;ai){var c=(n[s]-i)*r;e.addRest(c),i=n[s]}for(var l=0;l128&&(s=s.substring(0,124)+"...");var o=t.getKeySignature(),c=t.getMeterFraction(),l=n.tempo,h=l/60;8==c.den&&(h=(l=6e4/(t.millisecondsPerMeasure()/c.num)/2)/60),i.setGlobalInfo(l,s,o,c);for(var u=0;uu&&(m=r.pan[u]),128===p.instrument?(i.setChannel(9,m),i.setInstrument(0)):(i.setChannel(p.channel,m),i.setInstrument(p.instrument));break;case"note":var g=p.gap*h,v=p.start,b=v+p.duration-g;d[v]||(d[v]=[]),d[v].push({pitch:p.pitch,volume:p.volume,cents:p.cents}),d[b]||(d[b]=[]),d[b].push({pitch:p.pitch,volume:0});break;default:console.log("MIDI create Unknown: "+p.cmd)}}e(i,d,1920),i.endTrack()}return i.getData()}}(),e.exports=n},5008:function(e){var t={cloneArray:function(e){for(var t=[],r=0;r=0&&e.lastIndexOf(t)===r},last:function(e){return 0===e.length?null:e[e.length-1]}};e.exports=t},8905:function(e,t,r){var n=r(5008),a=r(8360),i=r(9928),s=r(6476),o=r(1881),c=r(1756),l=r(6780),h=r(575);e.exports=function(){"use strict";var e,t=new l,r=new h(t),u="",d="";function f(e,t,r){e.positioning||(e.positioning={}),e.positioning[t]=r}function p(e,t,r){e.fonts||(e.fonts={}),e.fonts[t]=r}this.getTune=function(){var e={formatting:t.formatting,lines:t.lines,media:t.media,metaText:t.metaText,metaTextInfo:t.metaTextInfo,version:t.version,addElementToEvents:t.addElementToEvents,addUsefulCallbackInfo:t.addUsefulCallbackInfo,getTotalTime:t.getTotalTime,getTotalBeats:t.getTotalBeats,getBarLength:t.getBarLength,getBeatLength:t.getBeatLength,getBeatsPerMeasure:t.getBeatsPerMeasure,getBpm:t.getBpm,getMeter:t.getMeter,getMeterFraction:t.getMeterFraction,getPickupLength:t.getPickupLength,getKeySignature:t.getKeySignature,getElementFromChar:t.getElementFromChar,makeVoicesArray:t.makeVoicesArray,millisecondsPerMeasure:t.millisecondsPerMeasure,setupEvents:t.setupEvents,setTiming:t.setTiming,setUpAudio:t.setUpAudio,deline:t.deline,findSelectableElement:t.findSelectableElement,getSelectableArray:t.getSelectableArray};return t.lineBreaks&&(e.lineBreaks=t.lineBreaks),t.visualTranspose&&(e.visualTranspose=t.visualTranspose),e};var m,g,v={reset:function(){for(var e in this)this.hasOwnProperty(e)&&"function"!=typeof this[e]&&delete this[e];this.iChar=0,this.key={accidentals:[],root:"none",acc:"",mode:""},this.meter=null,this.origMeter=null,this.hasMainTitle=!1,this.default_length=.125,this.clef={type:"treble",verticalPos:0},this.octave=0,this.next_note_duration=0,this.start_new_line=!0,this.is_in_header=!0,this.partForNextLine={},this.tempoForNextLine=[],this.havent_set_length=!0,this.voices={},this.staves=[],this.macros={},this.currBarNumber=1,this.barCounter={},this.ignoredDecorations=[],this.score_is_present=!1,this.inEnding=!1,this.inTie=[],this.inTieChord={},this.vocalPosition="auto",this.dynamicPosition="auto",this.chordPosition="auto",this.ornamentPosition="auto",this.volumePosition="auto",this.openSlurs=[],this.freegchord=!1,this.endingHoldOver={}},differentFont:function(e,t){return this[e].decoration!==t[e].decoration||this[e].face!==t[e].face||this[e].size!==t[e].size||this[e].style!==t[e].style||this[e].weight!==t[e].weight},addFormattingOptions:function(e,t,r){"note"===r?("auto"!==this.vocalPosition&&f(e,"vocalPosition",this.vocalPosition),"auto"!==this.dynamicPosition&&f(e,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&f(e,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&f(e,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&f(e,"volumePosition",this.volumePosition),this.differentFont("annotationfont",t)&&p(e,"annotationfont",this.annotationfont),this.differentFont("gchordfont",t)&&p(e,"gchordfont",this.gchordfont),this.differentFont("vocalfont",t)&&p(e,"vocalfont",this.vocalfont),this.differentFont("tripletfont",t)&&p(e,"tripletfont",this.tripletfont)):"bar"===r&&("auto"!==this.dynamicPosition&&f(e,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&f(e,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&f(e,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&f(e,"volumePosition",this.volumePosition),this.differentFont("measurefont",t)&&p(e,"measurefont",this.measurefont),this.differentFont("repeatfont",t)&&p(e,"repeatfont",this.repeatfont))},duplicateStartEndingHoldOvers:function(){this.endingHoldOver={inTie:[],inTieChord:{}};for(var e=0;e/g,">")},y=function(t,r,n){r||(r=" ");var a=r[n];" "!==a&&a||(a="SPACE");var i,s=b(r.substring(n-64,n))+''+a+""+b(r.substring(n+1).substring(0,64));!function(e){v.warnings||(v.warnings=[]),v.warnings.push(e)}("Music Line:"+e.lineIndex+":"+(n+1)+": "+t+": "+s),i={message:t,line:r,startChar:v.iChar+n,column:n},v.warningObjects||(v.warningObjects=[]),v.warningObjects.push(i)};this.getWarnings=function(){return v.warnings},this.getWarningObjects=function(){return v.warningObjects};var x=function(t,r){if(r.indexOf("")>=0)u+=r;else if(r=u+r,u="",t){"-"!==(r=n.strip(r))[r.length-1]&&(r+=" ");for(var a=[],i=0,s=!1,o=function(t){var o=n.strip(r.substring(i,t));if(o=o.replace(/\\([-_*|~])/g,"$1"),i=t+1,o.length>0){s&&(o=o.replace(/~/g," "));var c=r[t];return"_"!==c&&"-"!==c&&(c=" "),a.push({syllable:e.translateString(o),divider:c}),s=!1,!0}return!1},c=!1,l=0;l0&&(n.last(a).divider="-",a.push({skip:!0,to:"next"}));break;case"_":c||(o(l),a.push({skip:!0,to:"slur"}));break;case"*":c||(o(l),a.push({skip:!0,to:"next"}));break;case"|":c||(o(l),a.push({skip:!0,to:"bar"}));break;case"~":c||(s=!0)}c="\\"===r[l]}t.forEach((function(e){if(0!==a.length)if(a[0].skip){switch(a[0].to){case"next":case"slur":"note"===e.el_type&&null!==e.pitches&&a.shift();break;case"bar":"bar"===e.el_type&&a.shift()}"bar"!==e.el_type&&(void 0===e.lyric?e.lyric=[{syllable:"",divider:" "}]:e.lyric.push({syllable:"",divider:" "}))}else if("note"===e.el_type&&void 0===e.rest){var t=a.shift();t.syllable&&(t.syllable=t.syllable.replace(/ +/g," ")),void 0===e.lyric?e.lyric=[t]:e.lyric.push(t)}}))}else y("Can't add words before the first line of music",t,0)},k=function(t,r){if(r.indexOf("")>=0)d+=r;else if(r=d+r,d="",t){"-"!==(r=n.strip(r))[r.length-1]&&(r+=" ");for(var a=[],i=0,s=!1,o=function(t){var o=n.strip(r.substring(i,t));if(i=t+1,o.length>0){s&&(o=o.replace(/~/g," "));var c=r[t];return"_"!==c&&"-"!==c&&(c=" "),a.push({syllable:e.translateString(o),divider:c}),s=!1,!0}return!1},c=0;c0&&(n.last(a).divider="-",a.push({skip:!0,to:"next"}));break;case"_":o(c),a.push({skip:!0,to:"slur"});break;case"*":o(c),a.push({skip:!0,to:"next"});break;case"|":o(c),a.push({skip:!0,to:"bar"});break;case"~":s=!0}t.forEach((function(e){if(0!==a.length)if(a[0].skip)switch(a[0].to){case"next":case"slur":"note"===e.el_type&&null!==e.pitches&&a.shift();break;case"bar":"bar"===e.el_type&&a.shift()}else if("note"===e.el_type&&void 0===e.rest){var t=a.shift();void 0===e.lyric?e.lyric=[t]:e.lyric.push(t)}}))}else y("Can't add symbols before the first line of music",t,0)},w=function(e){if(n.startsWith(e,"%%")){var t=a.addDirective(e.substring(2));t&&y(t,e,2)}else{var i=e.indexOf("%");if(i>=0&&(e=e.substring(0,i)),0!==(e=e.replace(/\s+$/,"")).length)if(u)x(r.getCurrentVoice(),e.substring(2));else if(d)k(r.getCurrentVoice(),e.substring(2));else if(e.length<2||":"!==e[1]||g.lineContinuation)g.parseMusic(e);else{var s=m.parseHeader(e);s.regular&&g.parseMusic(e),s.newline&&g.startNewLine(),s.words&&x(r.getCurrentVoice(),e.substring(2)),s.symbols&&k(r.getCurrentVoice(),e.substring(2))}}};function C(e,t){e.push({el_type:"hint"});for(var r=0;r1){for(var b=1;b0&&"\n"!==p[b][0];)p[b]=p[b].substr(1),p[b-1]+=" ";l=p.join(" ")}var C=(l=l.replace(/\\([ \t]*)(%.*)*\n/g,(function(e,t,r){return t+""+(r?Array(r.length+1).join(" "):"")+"\n"}))).split("\n");0===n.last(C).length&&C.pop(),e=new o(C,v),m=new i(e,y,v,t,r),g=new s(e,y,v,t,r,m),h.print&&(t.media="print"),v.reset(),v.iChar=f,h.visualTranspose?(v.globalTranspose=parseInt(h.visualTranspose),0===v.globalTranspose?v.globalTranspose=void 0:r.setVisualTranspose(h.visualTranspose)):v.globalTranspose=void 0,h.lineBreaks&&(v.lineBreaks=h.lineBreaks),m.reset(e,y,v,t);try{h.format&&a.globalFormatting(h.format);for(var S=e.nextLine();S;){if(h.header_only&&!1===v.is_in_header)throw"normal_abort";if(h.stop_on_warning&&v.warnings)throw"normal_abort";var _=v.is_in_header;w(S),_&&!v.is_in_header&&(r.setRunningFont("annotationfont",v.annotationfont),r.setRunningFont("gchordfont",v.gchordfont),r.setRunningFont("tripletfont",v.tripletfont),r.setRunningFont("vocalfont",v.vocalfont)),S=e.nextLine()}u&&x(r.getCurrentVoice(),""),d&&k(r.getCurrentVoice(),""),v.openSlurs=r.cleanUp(v.barsperstaff,v.staffnonote,v.openSlurs)}catch(e){if("normal_abort"!==e)throw e}var E=792,M=612;switch(v.papersize){case"legal":E=1008,M=612;break;case"A4":E=842.4,M=597.6}if(v.landscape){var A=E;E=M,M=A}t.formatting.pagewidth||(t.formatting.pagewidth=M),t.formatting.pageheight||(t.formatting.pageheight=E),h.hint_measures&&function(){for(var e=0;e1&&!n.startsWith(o[0].abc,"X:")&&o.shift().abc.split("\n").forEach((function(e){n.startsWith(e,"%%")&&(t+=e+"\n")}));var c=t;return o.forEach((function(e){var r=e.abc.indexOf("\n\n");r>0&&(e.abc=e.abc.substring(0,r)),e.pure=e.abc,e.abc=t+e.abc,e.title="";var a=e.pure.split("T:");a.length>1&&(a=a[1].split("\n"),e.title=n.strip(a[0]));var i=e.pure.substring(2,e.pure.indexOf("\n"));e.id=n.strip(i)})),{header:c,tunes:o}}},8360:function(e,t,r){var n=r(5008),a={};!function(){"use strict";var e,t,r,i,s;a.initialize=function(n,a,o,c,l){e=n,t=a,i=c,s=l,(r=o).annotationfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},r.gchordfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},r.historyfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},r.infofont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},r.measurefont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},r.partsfont={face:'"Times New Roman"',size:15,weight:"normal",style:"normal",decoration:"none"},r.repeatfont={face:'"Times New Roman"',size:13,weight:"normal",style:"normal",decoration:"none"},r.textfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},r.tripletfont={face:"Times",size:11,weight:"normal",style:"italic",decoration:"none"},r.vocalfont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},r.wordsfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},i.formatting.composerfont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},i.formatting.subtitlefont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},i.formatting.tempofont={face:'"Times New Roman"',size:15,weight:"bold",style:"normal",decoration:"none"},i.formatting.titlefont={face:'"Times New Roman"',size:20,weight:"normal",style:"normal",decoration:"none"},i.formatting.footerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},i.formatting.headerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},i.formatting.voicefont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},i.formatting.tablabelfont={face:'"Trebuchet MS"',size:16,weight:"normal",style:"normal",decoration:"none"},i.formatting.tabnumberfont={face:'"Arial"',size:11,weight:"normal",style:"normal",decoration:"none"},i.formatting.tabgracefont={face:'"Arial"',size:8,weight:"normal",style:"normal",decoration:"none"},i.formatting.annotationfont=r.annotationfont,i.formatting.gchordfont=r.gchordfont,i.formatting.historyfont=r.historyfont,i.formatting.infofont=r.infofont,i.formatting.measurefont=r.measurefont,i.formatting.partsfont=r.partsfont,i.formatting.repeatfont=r.repeatfont,i.formatting.textfont=r.textfont,i.formatting.tripletfont=r.tripletfont,i.formatting.vocalfont=r.vocalfont,i.formatting.wordsfont=r.wordsfont};var o={gchordfont:!0,measurefont:!0,partsfont:!0,annotationfont:!0,composerfont:!0,historyfont:!0,infofont:!0,subtitlefont:!0,textfont:!0,titlefont:!0,voicefont:!0},c=function(e,r,n,a,i){function s(){var s=parseInt(e[0].token);return e.shift(),r?0===e.length?{face:r.face,weight:r.weight,style:r.style,decoration:r.decoration,size:s}:1===e.length&&"box"===e[0].token&&o[i]?{face:r.face,weight:r.weight,style:r.style,decoration:r.decoration,size:s,box:!0}:(t("Extra parameters in font definition.",n,a),{face:r.face,weight:r.weight,style:r.style,decoration:r.decoration,size:s}):(t("Can't set just the size of the font since there is no default value.",n,a),{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none",size:s})}if("*"===e[0].token){if(e.shift(),"number"===e[0].type)return s();t("Expected font size number after *.",n,a)}if("number"===e[0].type)return s();for(var c,l=[],h="normal",u="normal",d="none",f=!1,p="face",m=!1;e.length;){var g=e.shift(),v=g.token.toLowerCase();switch(p){case"face":m||"utf"!==v&&"number"!==g.type&&"bold"!==v&&"italic"!==v&&"underline"!==v&&"box"!==v?l.length>0&&"-"===g.token?(m=!0,l[l.length-1]=l[l.length-1]+g.token):m?(m=!1,l[l.length-1]=l[l.length-1]+g.token):l.push(g.token):"number"===g.type?(c?t("Font size specified twice in font definition.",n,a):c=g.token,p="modifier"):"bold"===v?h="bold":"italic"===v?u="italic":"underline"===v?d="underline":"box"===v?(o[i]?f=!0:t('This font style doesn\'t support "box"',n,a),p="finished"):"utf"===v?(g=e.shift(),p="size"):t("Unknown parameter "+g.token+" in font definition.",n,a);break;case"size":"number"===g.type?c?t("Font size specified twice in font definition.",n,a):c=g.token:t("Expected font size in font definition.",n,a),p="modifier";break;case"modifier":"bold"===v?h="bold":"italic"===v?u="italic":"underline"===v?d="underline":"box"===v?(o[i]?f=!0:t('This font style doesn\'t support "box"',n,a),p="finished"):t("Unknown parameter "+g.token+" in font definition.",n,a);break;case"finished":t('Extra characters found after "box" in font definition.',n,a)}}void 0===c?r?c=r.size:(t("Must specify the size of the font since there is no default value.",n,a),c=12):c=parseFloat(c),""===(l=l.join(" "))&&(r?l=r.face:(t("Must specify the name of the font since there is no default value.",n,a),l="sans-serif"));var b=function(e){switch(e){case"Arial-Italic":return{face:"Arial",weight:"normal",style:"italic",decoration:"none"};case"Arial-Bold":return{face:"Arial",weight:"bold",style:"normal",decoration:"none"};case"Bookman-Demi":return{face:"Bookman,serif",weight:"bold",style:"normal",decoration:"none"};case"Bookman-DemiItalic":return{face:"Bookman,serif",weight:"bold",style:"italic",decoration:"none"};case"Bookman-Light":return{face:"Bookman,serif",weight:"normal",style:"normal",decoration:"none"};case"Bookman-LightItalic":return{face:"Bookman,serif",weight:"normal",style:"italic",decoration:"none"};case"Courier":return{face:'"Courier New"',weight:"normal",style:"normal",decoration:"none"};case"Courier-Oblique":return{face:'"Courier New"',weight:"normal",style:"italic",decoration:"none"};case"Courier-Bold":return{face:'"Courier New"',weight:"bold",style:"normal",decoration:"none"};case"Courier-BoldOblique":return{face:'"Courier New"',weight:"bold",style:"italic",decoration:"none"};case"AvantGarde-Book":return{face:"AvantGarde,Arial",weight:"normal",style:"normal",decoration:"none"};case"AvantGarde-BookOblique":return{face:"AvantGarde,Arial",weight:"normal",style:"italic",decoration:"none"};case"AvantGarde-Demi":case"Avant-Garde-Demi":return{face:"AvantGarde,Arial",weight:"bold",style:"normal",decoration:"none"};case"AvantGarde-DemiOblique":return{face:"AvantGarde,Arial",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Oblique":return{face:"Helvetica",weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Bold":return{face:"Helvetica",weight:"bold",style:"normal",decoration:"none"};case"Helvetica-BoldOblique":return{face:"Helvetica",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Narrow":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"normal",decoration:"none"};case"Helvetica-Narrow-Oblique":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Narrow-Bold":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"normal",decoration:"none"};case"Helvetica-Narrow-BoldOblique":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"italic",decoration:"none"};case"Palatino-Roman":return{face:"Palatino",weight:"normal",style:"normal",decoration:"none"};case"Palatino-Italic":return{face:"Palatino",weight:"normal",style:"italic",decoration:"none"};case"Palatino-Bold":return{face:"Palatino",weight:"bold",style:"normal",decoration:"none"};case"Palatino-BoldItalic":return{face:"Palatino",weight:"bold",style:"italic",decoration:"none"};case"NewCenturySchlbk-Roman":return{face:'"New Century",serif',weight:"normal",style:"normal",decoration:"none"};case"NewCenturySchlbk-Italic":return{face:'"New Century",serif',weight:"normal",style:"italic",decoration:"none"};case"NewCenturySchlbk-Bold":return{face:'"New Century",serif',weight:"bold",style:"normal",decoration:"none"};case"NewCenturySchlbk-BoldItalic":return{face:'"New Century",serif',weight:"bold",style:"italic",decoration:"none"};case"Times":case"Times-Roman":case"Times-Narrow":case"Times-Courier":case"Times-New-Roman":return{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none"};case"Times-Italic":case"Times-Italics":return{face:'"Times New Roman"',weight:"normal",style:"italic",decoration:"none"};case"Times-Bold":return{face:'"Times New Roman"',weight:"bold",style:"normal",decoration:"none"};case"Times-BoldItalic":return{face:'"Times New Roman"',weight:"bold",style:"italic",decoration:"none"};case"ZapfChancery-MediumItalic":return{face:'"Zapf Chancery",cursive,serif',weight:"normal",style:"normal",decoration:"none"};default:return null}}(l),y={};return b?(y.face=b.face,y.weight=b.weight,y.style=b.style,y.decoration=b.decoration,y.size=c,f&&(y.box=!0),y):(y.face=l,y.weight=h,y.style=u,y.decoration=d,y.size=c,f&&(y.box=!0),y)},l=function(e,t,n){return 0===t.length?'Directive "'+e+'" requires a font as a parameter.':(r[e]=c(t,r[e],n,0,e),r.is_in_header&&(i.formatting[e]=r[e]),null)},h=function(e,t){var r="";t.forEach((function(e){r+=e.token}));var n=parseFloat(r);if(isNaN(n)||0===n)return'Directive "'+e+'" requires a number as a parameter.';i.formatting.scale=n},u=["acoustic-bass-drum","bass-drum-1","side-stick","acoustic-snare","hand-clap","electric-snare","low-floor-tom","closed-hi-hat","high-floor-tom","pedal-hi-hat","low-tom","open-hi-hat","low-mid-tom","hi-mid-tom","crash-cymbal-1","high-tom","ride-cymbal-1","chinese-cymbal","ride-bell","tambourine","splash-cymbal","cowbell","crash-cymbal-2","vibraslap","ride-cymbal-2","hi-bongo","low-bongo","mute-hi-conga","open-hi-conga","low-conga","high-timbale","low-timbale","high-agogo","low-agogo","cabasa","maracas","short-whistle","long-whistle","short-guiro","long-guiro","claves","hi-wood-block","low-wood-block","mute-cuica","open-cuica","mute-triangle","open-triangle"],d=function(e,t,n,a,i){if(1!==n.length||"number"!==n[0].type)return'Directive "'+t+'" requires a number as a parameter.';var s=n[0].intt;return void 0!==a&&si?'Directive "'+t+'" requires a number less than or equal to '+i+" as a parameter.":(r[e]=s,null)},f=function(e,t,n){if(1===n.length&&("true"===n[0].token||"false"===n[0].token))return r[e]="true"===n[0].token,null;var a=d(e,t,n,0,1);return null!==a?a:(r[e]=1===r[e],null)},p=function(e,t,n,a){if(1!==n.length)return'Directive "'+t+'" requires one of [ '+a.join(", ")+" ] as a parameter.";for(var i=n[0].token,s=!1,o=0;!s&&o1&&r.setfont){var n=[];""!==t[0]&&n.push({text:t[0]});for(var a=1;a=0||e[0].floatt<=1)return{value:e[0].floatt}}else{if("false"===e[0].token)return{value:0};if("true"===e[0].token)return{value:1}}return{error:"Directive stretchlast requires zero or one parameter: false, true, or number between 0 and 1 (received "+e[0].token+")"}}a.addDirective=function(o){var M=e.tokenize(o,0,o.length);if(0===M.length||"alpha"!==M[0].type)return null;var A=o.substring(o.indexOf(M[0].token)+M[0].token.length);A=e.stripComment(A);var N,B=M.shift().token.toLowerCase(),P="";switch(B){case"bagpipes":i.formatting.bagpipes=!0;break;case"flatbeams":i.formatting.flatbeams=!0;break;case"jazzchords":i.formatting.jazzchords=!0;break;case"accentAbove":i.formatting.accentAbove=!0;break;case"germanAlphabet":i.formatting.germanAlphabet=!0;break;case"landscape":r.landscape=!0;break;case"papersize":r.papersize=A;break;case"graceslurs":if(1!==M.length)return"Directive graceslurs requires one parameter: 0 or 1";if("0"===M[0].token||"false"===M[0].token)i.formatting.graceSlurs=!1;else{if("1"!==M[0].token&&"true"!==M[0].token)return"Directive graceslurs requires one parameter: 0 or 1 (received "+M[0].token+")";i.formatting.graceSlurs=!0}break;case"lineThickness":var L=E(M);if(void 0!==L.value&&(i.formatting.lineThickness=L.value),L.error)return L.error;break;case"stretchlast":var O=E(M);if(void 0!==O.value&&(i.formatting.stretchlast=O.value),O.error)return O.error;break;case"titlecaps":r.titlecaps=!0;break;case"titleleft":i.formatting.titleleft=!0;break;case"measurebox":i.formatting.measurebox=!0;break;case"vocal":return p("vocalPosition",B,M,_);case"dynamic":return p("dynamicPosition",B,M,_);case"gchord":return p("chordPosition",B,M,_);case"ornament":return p("ornamentPosition",B,M,_);case"volume":return p("volumePosition",B,M,_);case"botmargin":case"botspace":case"composerspace":case"indent":case"leftmargin":case"linesep":case"musicspace":case"partsspace":case"pageheight":case"pagewidth":case"rightmargin":case"stafftopmargin":case"staffsep":case"staffwidth":case"subtitlespace":case"sysstaffsep":case"systemsep":case"textspace":case"titlespace":case"topmargin":case"topspace":case"vocalspace":case"wordsspace":return function(t,r){var n=e.getMeasurement(r);return 0===n.used||0!==r.length?'Directive "'+t+'" requires a measurement as a parameter.':(i.formatting[t]=n.value,null)}(B,M);case"voicescale":if(1!==M.length||"number"!==M[0].type)return"voicescale requires one float as a parameter";var H=M.shift();return r.currentVoice&&(r.currentVoice.scale=H.floatt,s.changeVoiceScale(r.currentVoice.scale)),null;case"voicecolor":if(1!==M.length)return"voicecolor requires one string as a parameter";var z=M.shift();return r.currentVoice&&(r.currentVoice.color=z.token,s.changeVoiceColor(r.currentVoice.color)),null;case"vskip":var D=Math.round(function(t,r){var n=e.getMeasurement(r);return 0===n.used||0!==r.length?{error:'Directive "'+t+'" requires a measurement as a parameter.'}:n.value}(B,M));return D.error?D.error:(s.addSpacing(D),null);case"scale":h(B,M);break;case"sep":if(0===M.length)s.addSeparator(14,14,85,{startChar:r.iChar,endChar:r.iChar+5});else{var F=e.getMeasurement(M);if(0===F.used)return'Directive "'+B+'" requires 3 numbers: space above, space below, length of line';var j=F.value;if(0===(F=e.getMeasurement(M)).used)return'Directive "'+B+'" requires 3 numbers: space above, space below, length of line';var I=F.value;if(0===(F=e.getMeasurement(M)).used||0!==M.length)return'Directive "'+B+'" requires 3 numbers: space above, space below, length of line';var V=F.value;s.addSeparator(j,I,V,{startChar:r.iChar,endChar:r.iChar+A.length})}break;case"barsperstaff":if(null!==(P=d("barsperstaff",B,M)))return P;break;case"staffnonote":if(1!==M.length)return"Directive staffnonote requires one parameter: 0 or 1";if("0"===M[0].token)r.staffnonote=!0;else{if("1"!==M[0].token)return"Directive staffnonote requires one parameter: 0 or 1 (received "+M[0].token+")";r.staffnonote=!1}break;case"printtempo":if(null!==(P=f("printTempo",B,M)))return P;break;case"partsbox":if(null!==(P=f("partsBox",B,M)))return P;r.partsfont.box=r.partsBox;break;case"freegchord":if(null!==(P=f("freegchord",B,M)))return P;break;case"measurenb":case"barnumbers":if(null!==(P=d("barNumbers",B,M)))return P;break;case"setbarnb":if(1!==M.length||"number"!==M[0].type)return"Directive setbarnb requires a number as a parameter.";r.currBarNumber=s.setBarNumberImmediate(M[0].intt);break;case"keywarn":if(1!==M.length||"number"!==M[0].type||1!==M[0].intt&&0!==M[0].intt)return"Directive "+B+" requires 0 or 1 as a parameter.";r[B]=1===M[0].intt;break;case"begintext":var Y="";for(N=e.nextLine();N&&0!==N.indexOf("%%endtext");){if(n.startsWith(N,"%%")){var G=N.substring(2);Y+=G=G.trim()+"\n"}else Y+=N.trim()+"\n";N=e.nextLine()}s.addText(Y,{startChar:r.iChar,endChar:r.iChar+Y.length+7});break;case"continueall":r.continueall=!0;break;case"beginps":for(N=e.nextLine();N&&0!==N.indexOf("%%endps");)e.nextLine();t("Postscript ignored",o,0);break;case"deco":A.length>0&&r.ignoredDecorations.push(A.substring(0,A.indexOf(" "))),t("Decoration redefinition ignored",o,0);break;case"text":var q=e.translateString(A);s.addText(a.parseFontChangeLine(q),{startChar:r.iChar,endChar:r.iChar+A.length+7});break;case"center":var W=e.translateString(A);s.addCentered(a.parseFontChangeLine(W));break;case"font":break;case"setfont":var R=e.tokenize(A,0,A.length);if(R.length>=4&&"-"===R[0].token&&"number"===R[1].type){var X=parseInt(R[1].token);X>=1&&X<=9&&(r.setfont||(r.setfont=[]),R.shift(),R.shift(),r.setfont[X]=c(R,r.setfont[X],o,0,"setfont"))}break;case"gchordfont":case"partsfont":case"tripletfont":case"vocalfont":case"textfont":case"annotationfont":case"historyfont":case"infofont":case"measurefont":case"repeatfont":case"wordsfont":return l(B,M,o);case"composerfont":case"subtitlefont":case"tempofont":case"titlefont":case"voicefont":case"footerfont":case"headerfont":return function(e,t,r){return 0===t.length?'Directive "'+e+'" requires a font as a parameter.':(i.formatting[e]=c(t,i.formatting[e],r,0,e),null)}(B,M,o);case"barlabelfont":case"barnumberfont":case"barnumfont":return l("measurefont",M,o);case"staves":case"score":r.score_is_present=!0;for(var U,K=function(e,t,a,i,s){(t||0===r.staves.length)&&r.staves.push({index:r.staves.length,numVoices:0});var o=n.last(r.staves);void 0!==a&&void 0===o.bracket&&(o.bracket=a),void 0!==i&&void 0===o.brace&&(o.brace=i),s&&(o.connectBarLines="end"),void 0===r.voices[e]&&(r.voices[e]={staffNum:o.index,index:o.numVoices},o.numVoices++)},$=!1,Q=!1,J=!1,Z=!1,ee=!1,te=!1,re=!1,ne=function(){if(re=!0,U){var e="start";U.staffNum>0&&("start"!==r.staves[U.staffNum-1].connectBarLines&&"continue"!==r.staves[U.staffNum-1].connectBarLines||(e="continue")),r.staves[U.staffNum].connectBarLines=e}};M.length;){var ae=M.shift();switch(ae.token){case"(":$?t("Can't nest parenthesis in %%score",o,ae.start):($=!0,Z=!0);break;case")":!$||Z?t("Unexpected close parenthesis in %%score",o,ae.start):$=!1;break;case"[":Q?t("Can't nest brackets in %%score",o,ae.start):(Q=!0,ee=!0);break;case"]":!Q||ee?t("Unexpected close bracket in %%score",o,ae.start):(Q=!1,r.staves[U.staffNum].bracket="end");break;case"{":J?t("Can't nest braces in %%score",o,ae.start):(J=!0,te=!0);break;case"}":!J||te?t("Unexpected close brace in %%score",o,ae.start):(J=!1,r.staves[U.staffNum].brace="end");break;case"|":ne();break;default:for(var ie="";("alpha"===ae.type||"number"===ae.type)&&(ie+=ae.token,ae.continueId);)ae=M.shift();K(ie,!$||Z,ee?"start":Q?"continue":void 0,te?"start":J?"continue":void 0,re),Z=!1,ee=!1,te=!1,re=!1,U=r.voices[ie],"staves"===B&&ne()}}break;case"maxstaves":var se=e.getInt(A);0===se.digits?t("Expected number of staves in maxstaves"):se.value>0&&(i.formatting.maxStaves=se.value);break;case"newpage":var oe=e.getInt(A);s.addNewPage(0===oe.digits?-1:oe.value);break;case"abc":var ce=A.split(" ");switch(ce[0]){case"-copyright":case"-creator":case"-edited-by":case"-version":case"-charset":var le=ce.shift();s.addMetaText(B+le,ce.join(" "),{startChar:r.iChar,endChar:r.iChar+A.length+5});break;default:return"Unknown directive: "+B+ce[0]}break;case"header":case"footer":var he=e.getMeat(A,0,A.length);'"'===(he=A.substring(he.start,he.end))[0]&&'"'===he[he.length-1]&&(he=he.substring(1,he.length-1));var ue=he.split("\t"),de={};de=1===ue.length?{left:"",center:ue[0],right:""}:2===ue.length?{left:ue[0],center:ue[1],right:""}:{left:ue[0],center:ue[1],right:ue[2]},ue.length>3&&t("Too many tabs in "+B+": "+ue.length+" found.",A,0),s.addMetaTextObj(B,de,{startChar:r.iChar,endChar:r.iChar+o.length});break;case"midi":var fe=e.tokenize(A,0,A.length,!0);fe.length>0&&"="===fe[0].token&&fe.shift(),0===fe.length?t("Expected midi command",A,0):function(e,r,n){var a=e.shift().token,i=[];if(m.indexOf(a)>=0)0!==e.length&&t("Unexpected parameter in MIDI "+a,n,0);else if(g.indexOf(a)>=0)1!==e.length?t("Expected one parameter in MIDI "+a,n,0):i.push(e[0].token);else if(v.indexOf(a)>=0)1!==e.length?t("Expected one parameter in MIDI "+a,n,0):"number"!==e[0].type?t("Expected one integer parameter in MIDI "+a,n,0):i.push(e[0].intt);else if(b.indexOf(a)>=0)1!==e.length&&2!==e.length?t("Expected one or two parameters in MIDI "+a,n,0):"number"!==e[0].type||2===e.length&&"number"!==e[1].type?t("Expected integer parameter in MIDI "+a,n,0):(i.push(e[0].intt),2===e.length&&i.push(e[1].intt));else if(y.indexOf(a)>=0)2!==e.length?t("Expected two parameters in MIDI "+a,n,0):"number"!==e[0].type||"number"!==e[1].type?t("Expected two integer parameters in MIDI "+a,n,0):(i.push(e[0].intt),i.push(e[1].intt));else if(w.indexOf(a)>=0)2!==e.length?t("Expected two parameters in MIDI "+a,n,0):"alpha"!==e[0].type||"number"!==e[1].type?t("Expected one string and one integer parameters in MIDI "+a,n,0):(i.push(e[0].token),i.push(e[1].intt));else if("drummap"===a)2===e.length&&"alpha"===e[0].type&&"number"===e[1].type?(r.formatting||(r.formatting={}),r.formatting.midi||(r.formatting.midi={}),r.formatting.midi.drummap||(r.formatting.midi.drummap={}),r.formatting.midi.drummap[e[0].token]=e[1].intt,i=r.formatting.midi.drummap):3===e.length&&"punct"===e[0].type&&"alpha"===e[1].type&&"number"===e[2].type?(r.formatting||(r.formatting={}),r.formatting.midi||(r.formatting.midi={}),r.formatting.midi.drummap||(r.formatting.midi.drummap={}),r.formatting.midi.drummap[e[0].token+e[1].token]=e[2].intt,i=r.formatting.midi.drummap):t("Expected one note name and one integer parameter in MIDI "+a,n,0);else if(C.indexOf(a)>=0)3!==e.length||"number"!==e[0].type||"/"!==e[1].token||"number"!==e[2].type?t("Expected fraction parameter in MIDI "+a,n,0):(i.push(e[0].intt),i.push(e[2].intt));else if(x.indexOf(a)>=0)4!==e.length?t("Expected four parameters in MIDI "+a,n,0):"number"!==e[0].type||"number"!==e[1].type||"number"!==e[2].type||"number"!==e[3].type?t("Expected four integer parameters in MIDI "+a,n,0):(i.push(e[0].intt),i.push(e[1].intt),i.push(e[2].intt),i.push(e[3].intt));else if(k.indexOf(a)>=0)5!==e.length?t("Expected five parameters in MIDI "+a,n,0):"number"!==e[0].type||"number"!==e[1].type||"number"!==e[2].type||"number"!==e[3].type||"number"!==e[4].type?t("Expected five integer parameters in MIDI "+a,n,0):(i.push(e[0].intt),i.push(e[1].intt),i.push(e[2].intt),i.push(e[3].intt),i.push(e[4].intt));else if(b.indexOf(a)>=0)1!==e.length||4!==e.length?t("Expected one or two parameters in MIDI "+a,n,0):"number"!==e[0].type?t("Expected integer parameter in MIDI "+a,n,0):4===e.length?("octave"!==e[1].token&&t("Expected octave parameter in MIDI "+a,n,0),"="!==e[2].token&&t("Expected octave parameter in MIDI "+a,n,0),"number"!==e[3].type&&t("Expected integer parameter for octave in MIDI "+a,n,0)):(i.push(e[0].intt),4===e.length&&i.push(e[3].intt));else if(T.indexOf(a)>=0)if(e.length<2)t("Expected string parameter and at least one integer parameter in MIDI "+a,n,0);else if("alpha"!==e[0].type)t("Expected string parameter and at least one integer parameter in MIDI "+a,n,0);else{var o=e.shift();for(i.push(o.token);e.length>0;)"number"!==(o=e.shift()).type&&t("Expected integer parameter in MIDI "+a,n,0),i.push(o.intt)}else if(S.indexOf(a)>=0)if(1!==e.length&&2!==e.length)t("Expected one or two parameters in MIDI "+a,n,0);else if("number"!==e[0].type)t("Expected integer parameter in MIDI "+a,n,0);else if(2===e.length&&"alpha"!==e[1].type)t("Expected alpha parameter in MIDI "+a,n,0);else if(i.push(e[0].intt),2===e.length){var c=e[1].token;-1!=c.indexOf("octave=")?(c=c.replace("octave=",""),c=parseInt(c),isNaN(c)?t("Expected octave value in MIDI"+a):(c<-1&&(t("Expected octave= in MIDI "+a+" to be >= -1 (recv:"+c+")"),c=-1),c>3&&(t("Expected octave= in MIDI "+a+" to be <= 3 (recv:"+c+")"),c=3),i.push(c))):t("Expected octave= in MIDI"+a)}s.hasBeginMusic()?s.appendElement("midi",-1,-1,{cmd:a,params:i}):(void 0===r.formatting.midi&&(r.formatting.midi={}),r.formatting.midi[a]=i)}(fe,i,A);break;case"percmap":var pe=function(e){var t=e.split(/\s+/);if(2!==t.length&&3!==t.length)return{error:'Expected parameters "abc-note", "drum-sound", and optionally "note-head"'};var r=t[0],n=parseInt(t[1],10);if((isNaN(n)||n<35||n>81)&&t[1]&&(n=u.indexOf(t[1].toLowerCase())+35),isNaN(n)||n<35||n>81)return{error:'Expected drum name, received "'+t[1]+'"'};var a={sound:n};return 3===t.length&&(a.noteHead=t[2]),{key:r,value:a}}(A);pe.error?t(pe.error,o,8):(i.formatting.percmap||(i.formatting.percmap={}),i.formatting.percmap[pe.key]=pe.value);break;case"visualtranspose":var me=e.getInt(A);0===me.digits?t("Expected number of half steps in visualTranspose"):r.globalTranspose=me.value;break;case"map":case"playtempo":case"auquality":case"continuous":case"nobarcheck":i.formatting[B]=A;break;default:return"Unknown directive: "+B}return null},a.globalFormatting=function(n){for(var a in n)if(n.hasOwnProperty(a)){var s,o=""+n[a],c=e.tokenize(o,0,o.length);switch(a){case"titlefont":case"gchordfont":case"composerfont":case"footerfont":case"headerfont":case"historyfont":case"infofont":case"measurefont":case"partsfont":case"repeatfont":case"subtitlefont":case"tempofont":case"textfont":case"voicefont":case"tripletfont":case"vocalfont":case"wordsfont":case"annotationfont":case"tablabelfont":case"tabnumberfont":case"tabgracefont":l(a,c,o);break;case"scale":h(a,c);break;case"partsbox":null!==(s=f("partsBox",a,c))&&t(s),r.partsfont.box=r.partsBox;break;case"freegchord":null!==(s=f("freegchord",a,c))&&t(s);break;case"fontboxpadding":1===c.length&&"number"===c[0].type||t('Directive "'+a+'" requires a number as a parameter.'),i.formatting.fontboxpadding=c[0].floatt;break;case"stafftopmargin":1===c.length&&"number"===c[0].type||t('Directive "'+a+'" requires a number as a parameter.'),i.formatting.stafftopmargin=c[0].floatt;break;case"stretchlast":var u=E(c);if(void 0!==u.value&&(i.formatting.stretchlast=u.value),u.error)return u.error;break;default:t("Formatting directive unrecognized: ",a,0)}}}}(),e.exports=a},9928:function(e,t,r){var n=r(5008),a=r(8360),i=r(9708);e.exports=function(e,t,r,s,o){this.reset=function(e,t,r,n){i.initialize(e,t,r,n,o),a.initialize(e,t,r,n,o)},this.reset(e,t,r,s),this.setTitle=function(e,t){r.hasMainTitle?o.addSubtitle(e,{startChar:r.iChar,endChar:r.iChar+t+2}):(o.addMetaText("title",e,{startChar:r.iChar,endChar:r.iChar+t+2}),r.hasMainTitle=!0)},this.setMeter=function(n){if("C"===(n=e.stripComment(n)))return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"common_time"};if("C|"===n)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"cut_time"};if("o"===n)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_perfectum"};if("c"===n)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_imperfectum"};if("o."===n)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_perfectum_prolatio"};if("c."===n)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_imperfectum_prolatio"};if(0===n.length||"none"===n.toLowerCase())return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),null;var a=e.tokenize(n,0,n.length);try{var i=function(){var e=function(){var e={value:0,num:""},t=a.shift();for("("===t.token&&(t=a.shift());;){if("number"!==t.type)throw"Expected top number of meter";if(e.value+=parseInt(t.token),e.num+=t.token,0===a.length||"/"===a[0].token)return e;if(")"===(t=a.shift()).token){if(0===a.length||"/"===a[0].token)return e;throw"Unexpected paren in meter"}if("."!==t.token&&"+"!==t.token)throw"Expected top number of meter";if(e.num+=t.token,0===a.length)throw"Expected top number of meter";t=a.shift()}return e}();if(0===a.length)return e;var t=a.shift();if("/"!==t.token)throw"Expected slash in meter";if("number"!==(t=a.shift()).type)throw"Expected bottom number of meter";return e.den=t.token,e.value=e.value/parseInt(e.den),e};if(0===a.length)throw"Expected meter definition in M: line";for(var s={type:"specified",value:[]},o=0;;){var c=i();o+=c.value;var l={num:c.num};if(void 0!==c.den&&(l.den=c.den),s.value.push(l),0===a.length)break}return!0===r.havent_set_length&&(r.default_length=o<.75?.0625:.125,r.havent_set_length=!1),s}catch(e){t(e,n,0)}return null},this.calcTempo=function(e){var t=1/4;r.meter&&"specified"===r.meter.type?t=1/parseInt(r.meter.value[0].den):r.origMeter&&"specified"===r.origMeter.type&&(t=1/parseInt(r.origMeter.value[0].den));for(var n=0;n0&&(r.default_length=i/s,r.havent_set_length=!1)}else 1===a.length&&"1"===a[0]&&(r.default_length=1,r.havent_set_length=!1)};var c={larghissimo:20,adagissimo:24,sostenuto:28,grave:32,largo:40,lento:50,larghetto:60,adagio:68,adagietto:74,andante:80,andantino:88,"marcia moderato":84,"andante moderato":100,moderato:112,allegretto:116,"allegro moderato":120,allegro:126,animato:132,agitato:140,veloce:148,"mosso vivo":156,vivace:164,vivacissimo:172,allegrissimo:176,presto:184,prestissimo:210};this.setTempo=function(n,a,i,s){try{var o=e.tokenize(n,a,i);if(0===o.length)throw"Missing parameter in Q: field";var l={startChar:s+a-2,endChar:s+i},h=!0,u=o.shift();if("quote"===u.type&&(l.preString=u.token,u=o.shift(),0===o.length))return c[l.preString.toLowerCase()]&&(l.bpm=c[l.preString.toLowerCase()],l.suppressBpm=!0),{type:"immediate",tempo:l};if("alpha"===u.type&&"C"===u.token){if(0===o.length)throw"Missing tempo after C in Q: field";if("punct"===(u=o.shift()).type&&"="===u.token){if(0===o.length)throw"Missing tempo after = in Q: field";if("number"!==(u=o.shift()).type)throw"Expected number after = in Q: field";l.duration=[1],l.bpm=parseInt(u.token)}else{if("number"!==u.type)throw"Expected number or equal after C in Q: field";if(l.duration=[parseInt(u.token)],0===o.length)throw"Missing = after duration in Q: field";if("punct"!==(u=o.shift()).type||"="!==u.token)throw"Expected = after duration in Q: field";if(0===o.length)throw"Missing tempo after = in Q: field";if("number"!==(u=o.shift()).type)throw"Expected number after = in Q: field";l.bpm=parseInt(u.token)}}else{if("number"!==u.type)throw"Unknown value in Q: field";var d=parseInt(u.token);if(0===o.length||"quote"===o[0].type)l.duration=[1],l.bpm=d;else{if(h=!1,"punct"!==(u=o.shift()).type&&"/"!==u.token)throw"Expected fraction in Q: field";if("number"!==(u=o.shift()).type)throw"Expected fraction in Q: field";var f=parseInt(u.token);for(l.duration=[d/f];o.length>0&&"="!==o[0].token&&"quote"!==o[0].type;){if("number"!==(u=o.shift()).type)throw"Expected fraction in Q: field";if(d=parseInt(u.token),"punct"!==(u=o.shift()).type&&"/"!==u.token)throw"Expected fraction in Q: field";if("number"!==(u=o.shift()).type)throw"Expected fraction in Q: field";f=parseInt(u.token),l.duration.push(d/f)}if("punct"!==(u=o.shift()).type&&"="!==u.token)throw"Expected = in Q: field";if("number"!==(u=o.shift()).type)throw"Expected tempo in Q: field";l.bpm=parseInt(u.token)}}if(0!==o.length&&("quote"===(u=o.shift()).type&&(l.postString=u.token,u=o.shift()),0!==o.length))throw"Unexpected string at end of Q: field";return!1===r.printTempo&&(l.suppress=!0),{type:h?"delaySet":"immediate",tempo:l}}catch(e){return t(e,n,a),{type:"none"}}},this.letter_to_inline_header=function(n,c,l){var h=!1,u=e.eatWhiteSpace(n,c);if(c+=u,n.length>=c+5&&"["===n[c]&&":"===n[c+2]){var d=n.indexOf("]",c),f=r.iChar+c,p=r.iChar+d+1;switch(n.substring(c,c+3)){case"[I:":var m=a.addDirective(n.substring(c+3,d));return m&&t(m,n,c),[d-c+1+u];case"[M:":var g=this.setMeter(n.substring(c+3,d));return o.hasBeginMusic()&&g?o.appendStartingElement("meter",f,p,g):r.meter=g,[d-c+1+u];case"[K:":var v=i.parseKey(n.substring(c+3,d),!0);return v.foundClef&&o.hasBeginMusic()&&o.appendStartingElement("clef",f,p,r.clef),v.foundKey&&o.hasBeginMusic()&&o.appendStartingElement("key",f,p,i.fixKey(r.clef,r.key)),[d-c+1+u];case"[P:":var b=a.parseFontChangeLine(n.substring(c+3,d));return l||s.lines.length<=s.lineNum?r.partForNextLine={title:b,startChar:f,endChar:p}:o.appendElement("part",f,p,{title:b}),[d-c+1+u];case"[L:":return this.setDefaultLength(n,c+3,d),[d-c+1+u];case"[Q:":if(d>0){var y=this.setTempo(n,c+3,d,r.iChar);return"delaySet"===y.type?o.hasBeginMusic()?o.appendElement("tempo",f,p,this.calcTempo(y.tempo)):r.tempoForNextLine=["tempo",f,p,this.calcTempo(y.tempo)]:"immediate"===y.type&&(!l&&o.hasBeginMusic()?o.appendElement("tempo",f,p,y.tempo):r.tempoForNextLine=["tempo",f,p,y.tempo]),[d-c+1+u,n[c+1],n.substring(c+3,d)]}break;case"[V:":if(d>0)return h=i.parseVoice(n,c+3,d),[d-c+1+u,n[c+1],n.substring(c+3,d),h];break;case"[r:":return[d-c+1+u]}}return[0]},this.letter_to_body_header=function(e,s){var c=!1;if(e.length>=s+3)switch(e.substring(s,s+2)){case"I:":var l=a.addDirective(e.substring(s+2));return l&&t(l,e,s),[e.length];case"M:":var h=this.setMeter(e.substring(s+2));return o.hasBeginMusic()&&h&&o.appendStartingElement("meter",r.iChar+s,r.iChar+e.length,h),[e.length];case"K:":var u=i.parseKey(e.substring(s+2),o.hasBeginMusic());return u.foundClef&&o.hasBeginMusic()&&!1!==r.keywarn&&o.appendStartingElement("clef",r.iChar+s,r.iChar+e.length,r.clef),u.foundKey&&o.hasBeginMusic()&&!1!==r.keywarn&&o.appendStartingElement("key",r.iChar+s,r.iChar+e.length,i.fixKey(r.clef,r.key)),[e.length];case"P:":return o.hasBeginMusic()&&o.appendElement("part",r.iChar+s,r.iChar+e.length,{title:e.substring(s+2)}),[e.length];case"L:":return this.setDefaultLength(e,s+2,e.length),[e.length];case"Q:":var d=e.indexOf("",s+2);-1===d&&(d=e.length);var f=this.setTempo(e,s+2,d,r.iChar);return"delaySet"===f.type?o.appendElement("tempo",r.iChar+s,r.iChar+e.length,this.calcTempo(f.tempo)):"immediate"===f.type&&o.appendElement("tempo",r.iChar+s,r.iChar+e.length,f.tempo),[d,e[s],n.strip(e.substring(s+2))];case"V:":return c=i.parseVoice(e,s+2,e.length),[e.length,e[s],n.strip(e.substring(s+2)),c]}return[0]};var l={A:"author",B:"book",C:"composer",D:"discography",F:"url",G:"group",I:"instruction",N:"notes",O:"origin",R:"rhythm",S:"source",W:"unalignedWords",Z:"transcription"};this.parseHeader=function(n){var c=l[n[0]],h=n.length-2,u=e.translateString(e.stripComment(n.substring(2)));if("unalignedWords"===c||"notes"===c)o.addMetaTextArray(c,a.parseFontChangeLine(u),{startChar:r.iChar,endChar:r.iChar+n.length});else if(void 0!==c)o.addMetaText(c,a.parseFontChangeLine(u),{startChar:r.iChar,endChar:r.iChar+n.length});else{var d=r.iChar,f=d+n.length;switch(n[0]){case"H":for(o.addMetaTextArray("history",a.parseFontChangeLine(u),{startChar:r.iChar,endChar:r.iChar+n.length}),n=e.peekLine();n&&":"!==n[1];)e.nextLine(),o.addMetaTextArray("history",a.parseFontChangeLine(e.translateString(e.stripComment(n))),{startChar:r.iChar,endChar:r.iChar+n.length}),n=e.peekLine();break;case"K":this.resolveTempo();var p=i.parseKey(n.substring(2),!1);!r.is_in_header&&o.hasBeginMusic()&&!1!==r.keywarn&&(p.foundClef&&o.appendStartingElement("clef",d,f,r.clef),p.foundKey&&o.appendStartingElement("key",d,f,i.fixKey(r.clef,r.key))),r.is_in_header=!1;break;case"L":this.setDefaultLength(n,2,n.length);break;case"M":r.origMeter=r.meter=this.setMeter(n.substring(2));break;case"P":r.is_in_header?o.addMetaText("partOrder",a.parseFontChangeLine(u),{startChar:r.iChar,endChar:r.iChar+n.length}):r.partForNextLine={title:u,startChar:d,endChar:f};break;case"Q":var m=this.setTempo(n,2,n.length,r.iChar);"delaySet"===m.type?r.tempo=m.tempo:"immediate"===m.type&&(s.metaText.tempo?r.tempoForNextLine=["tempo",d,f,m.tempo]:s.metaText.tempo=m.tempo);break;case"T":r.titlecaps&&(u=u.toUpperCase()),this.setTitle(a.parseFontChangeLine(e.theReverser(u)),h);break;case"U":this.addUserDefinition(n,2,n.length);break;case"V":if(i.parseVoice(n,2,n.length),!r.is_in_header)return{newline:!0};break;case"s":return{symbols:!0};case"w":return{words:!0};case"X":break;case"E":case"m":t("Ignored header",n,0);break;default:return{regular:!0}}}return{}}}},9708:function(e,t,r){var n=r(8360),a=r(2821),i={};!function(){var e,t,r,s;i.initialize=function(n,a,i,o,c){e=n,t=a,r=i,s=c},i.standardKey=function(e,t,n,i){return a.keySignature(r,e,t,n,i)};var o={treble:{clef:"treble",pitch:4,mid:0},"treble+8":{clef:"treble+8",pitch:4,mid:0},"treble-8":{clef:"treble-8",pitch:4,mid:0},"treble^8":{clef:"treble+8",pitch:4,mid:0},treble_8:{clef:"treble-8",pitch:4,mid:0},treble1:{clef:"treble",pitch:2,mid:2},treble2:{clef:"treble",pitch:4,mid:0},treble3:{clef:"treble",pitch:6,mid:-2},treble4:{clef:"treble",pitch:8,mid:-4},treble5:{clef:"treble",pitch:10,mid:-6},perc:{clef:"perc",pitch:6,mid:0},none:{clef:"none",mid:0},bass:{clef:"bass",pitch:8,mid:-12},"bass+8":{clef:"bass+8",pitch:8,mid:-12},"bass-8":{clef:"bass-8",pitch:8,mid:-12},"bass^8":{clef:"bass+8",pitch:8,mid:-12},bass_8:{clef:"bass-8",pitch:8,mid:-12},"bass+16":{clef:"bass",pitch:8,mid:-12},"bass-16":{clef:"bass",pitch:8,mid:-12},"bass^16":{clef:"bass",pitch:8,mid:-12},bass_16:{clef:"bass",pitch:8,mid:-12},bass1:{clef:"bass",pitch:2,mid:-6},bass2:{clef:"bass",pitch:4,mid:-8},bass3:{clef:"bass",pitch:6,mid:-10},bass4:{clef:"bass",pitch:8,mid:-12},bass5:{clef:"bass",pitch:10,mid:-14},tenor:{clef:"alto",pitch:8,mid:-8},tenor1:{clef:"alto",pitch:2,mid:-2},tenor2:{clef:"alto",pitch:4,mid:-4},tenor3:{clef:"alto",pitch:6,mid:-6},tenor4:{clef:"alto",pitch:8,mid:-8},tenor5:{clef:"alto",pitch:10,mid:-10},alto:{clef:"alto",pitch:6,mid:-6},alto1:{clef:"alto",pitch:2,mid:-2},alto2:{clef:"alto",pitch:4,mid:-4},alto3:{clef:"alto",pitch:6,mid:-6},alto4:{clef:"alto",pitch:8,mid:-8},alto5:{clef:"alto",pitch:10,mid:-10},"alto+8":{clef:"alto+8",pitch:6,mid:-6},"alto-8":{clef:"alto-8",pitch:6,mid:-6},"alto^8":{clef:"alto+8",pitch:6,mid:-6},alto_8:{clef:"alto-8",pitch:6,mid:-6}},c=function(e,t){var r=o[e];return(r?r.mid:0)+t};i.fixClef=function(e){var t=o[e.type];t&&(e.clefPos=t.pitch,e.type=t.clef)},i.deepCopyKey=function(e){var t={accidentals:[],root:e.root,acc:e.acc,mode:e.mode};return e.accidentals.forEach((function(e){t.accidentals.push(Object.assign({},e))})),t};var l={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11};i.addPosToKey=function(e,t){var r=e.verticalPos;t.accidentals.forEach((function(e){var t=l[e.note];t-=r,e.verticalPos=t})),t.impliedNaturals&&t.impliedNaturals.forEach((function(e){var t=l[e.note];t-=r,e.verticalPos=t})),r<-10?(t.accidentals.forEach((function(e){e.verticalPos-=7,(e.verticalPos>=11||10===e.verticalPos&&"flat"===e.acc)&&(e.verticalPos-=7),"A"===e.note&&"sharp"===e.acc&&(e.verticalPos-=7),"G"!==e.note&&"F"!==e.note||"flat"!==e.acc||(e.verticalPos-=7)})),t.impliedNaturals&&t.impliedNaturals.forEach((function(e){e.verticalPos-=7,(e.verticalPos>=11||10===e.verticalPos&&"flat"===e.acc)&&(e.verticalPos-=7),"A"===e.note&&"sharp"===e.acc&&(e.verticalPos-=7),"G"!==e.note&&"F"!==e.note||"flat"!==e.acc||(e.verticalPos-=7)}))):r<-4?(t.accidentals.forEach((function(e){e.verticalPos-=7,-8!==r||"f"!==e.note&&"g"!==e.note||"sharp"!==e.acc||(e.verticalPos-=7)})),t.impliedNaturals&&t.impliedNaturals.forEach((function(e){e.verticalPos-=7,-8!==r||"f"!==e.note&&"g"!==e.note||"sharp"!==e.acc||(e.verticalPos-=7)}))):r>=7&&(t.accidentals.forEach((function(e){e.verticalPos+=7})),t.impliedNaturals&&t.impliedNaturals.forEach((function(e){e.verticalPos+=7})))},i.fixKey=function(e,t){var r=Object.assign({},t);return i.addPosToKey(e,r),r};var h=function(e){var t=0,r=e[t++];"^"!==r&&"_"!==r||(r=e[t++]);var n=l[r];for(void 0===n&&(n=6);t0){l.foundKey=!0;var u="",d="";o[0].token.length>1?o[0].token=o[0].token.substring(1):o.shift();var f=h.token;if(o.length>0){var p=e.getSharpFlat(o[0].token);if(p.len>0&&(o[0].token.length>1?o[0].token=o[0].token.substring(1):o.shift(),f+=p.token,u=p.token),o.length>0){var m=e.getMode(o[0].token);m.len>0&&(o.shift(),f+=m.token,d=m.token)}if(void 0===i.standardKey(f,h.token,u,0))return t("Unsupported key signature: "+f,a,0),l}var g,v=i.deepCopyKey(r.key),b=!s&&r.globalTranspose?-r.globalTranspose:0;if(s&&(g=r.globalTransposeOrigKeySig),r.key=i.deepCopyKey(i.standardKey(f,h.token,u,b)),s&&(r.globalTransposeOrigKeySig=g),r.key.mode=d,v&&!1!==r.keywarn){for(var y,x=0;x0;)switch(o[0].token){case"m":case"middle":if(o.shift(),0===o.length)return t("Expected = after middle",a,0),l;if("="!==(k=o.shift()).token){t("Expected = after middle",a,k.start);break}if(0===o.length)return t("Expected parameter after middle=",a,0),l;var E=e.getPitchFromTokens(o);E.warn&&t(E.warn,a,0),E.position&&(r.clef.verticalPos=E.position-6);break;case"transpose":if(o.shift(),0===o.length)return t("Expected = after transpose",a,0),l;if("="!==(k=o.shift()).token){t("Expected = after transpose",a,k.start);break}if(0===o.length)return t("Expected parameter after transpose=",a,0),l;if("number"!==o[0].type){t("Expected number after transpose",a,o[0].start);break}r.clef.transpose=o[0].intt,o.shift();break;case"stafflines":if(o.shift(),0===o.length)return t("Expected = after stafflines",a,0),l;if("="!==(k=o.shift()).token){t("Expected = after stafflines",a,k.start);break}if(0===o.length)return t("Expected parameter after stafflines=",a,0),l;if("number"!==o[0].type){t("Expected number after stafflines",a,o[0].start);break}r.clef.stafflines=o[0].intt,o.shift();break;case"staffscale":if(o.shift(),0===o.length)return t("Expected = after staffscale",a,0),l;if("="!==(k=o.shift()).token){t("Expected = after staffscale",a,k.start);break}if(0===o.length)return t("Expected parameter after staffscale=",a,0),l;if("number"!==o[0].type){t("Expected number after staffscale",a,o[0].start);break}r.clef.staffscale=o[0].floatt,o.shift();break;case"octave":if(o.shift(),0===o.length)return t("Expected = after octave",a,0),l;if("="!==(k=o.shift()).token){t("Expected = after octave",a,k.start);break}if(0===o.length)return t("Expected parameter after octave=",a,0),l;if("number"!==o[0].type){t("Expected number after octave",a,o[0].start);break}r.octave=o[0].intt,o.shift();break;case"style":if(o.shift(),0===o.length)return t("Expected = after style",a,0),l;if("="!==(k=o.shift()).token){t("Expected = after style",a,k.start);break}if(0===o.length)return t("Expected parameter after style=",a,0),l;switch(o[0].token){case"normal":case"harmonic":case"rhythm":case"x":case"triangle":r.style=o[0].token,o.shift();break;default:t("error parsing style element: "+o[0].token,a,o[0].start)}break;case"clef":if(o.shift(),0===o.length)return t("Expected = after clef",a,0),l;if("="!==(k=o.shift()).token){t("Expected = after clef",a,k.start);break}if(0===o.length)return t("Expected parameter after clef=",a,0),l;case"treble":case"bass":case"alto":case"tenor":case"perc":case"none":var M=o.shift();switch(M.token){case"treble":case"tenor":case"alto":case"bass":case"perc":case"none":break;case"C":case"c":M.token="alto";break;case"F":case"f":M.token="bass";break;case"G":case"g":M.token="treble";break;default:t("Expected clef name. Found "+M.token,a,M.start)}o.length>0&&"number"===o[0].type&&(M.token+=o[0].token,o.shift()),o.length>1&&("-"===o[0].token||"+"===o[0].token||"^"===o[0].token||"_"===o[0].token)&&"8"===o[1].token&&(M.token+=o[0].token+o[1].token,o.shift(),o.shift()),r.clef={type:M.token,verticalPos:c(M.token,0)},r.currentVoice&&void 0!==r.currentVoice.transpose&&(r.clef.transpose=r.currentVoice.transpose),l.foundClef=!0;break;default:t("Unknown parameter: "+o[0].token,a,o[0].start),o.shift()}return l},i.parseVoice=function(n,a,i){var o=e.getMeat(n,a,i),l=o.start,u=o.end,d=e.getToken(n,l,u);if(0!==d.length){var f=!1;void 0===r.voices[d]&&(r.voices[d]={},f=!0,r.score_is_present&&t("Can't have an unknown V: id when the %score directive is present",n,l)),l+=d.length,l+=e.eatWhiteSpace(n,l);for(var p={startStaff:f},m=function(r){var a=e.getVoiceToken(n,l,u);void 0!==a.warn?t("Expected value for "+r+" in voice: "+a.warn,n,l):void 0!==a.err?t("Expected value for "+r+" in voice: "+a.err,n,l):0===a.token.length&&'"'!==n[l]?t("Expected value for "+r+" in voice",n,l):p[r]=a.token,l+=a.len},g=function(a,i,s){var o=e.getVoiceToken(n,l,u);void 0!==o.warn?t("Expected value for "+i+" in voice: "+o.warn,n,l):void 0!==o.err?t("Expected value for "+i+" in voice: "+o.err,n,l):0===o.token.length&&'"'!==n[l]?t("Expected value for "+i+" in voice",n,l):("number"===s&&(o.token=parseFloat(o.token)),r.voices[a][i]=o.token),l+=o.len},v=function(r,a){var i=e.getVoiceToken(n,l,u);if(void 0!==i.warn)t("Expected value for "+r+" in voice: "+i.warn,n,l);else if(void 0!==i.err)t("Expected value for "+r+" in voice: "+i.err,n,l);else{if(0!==i.token.length||'"'===n[l])return"number"===a&&(i.token=parseFloat(i.token)),i.token;t("Expected value for "+r+" in voice",n,l)}l+=i.len},b=function(a,i){var s=e.getVoiceToken(n,l,u);if(void 0!==s.warn)t("Expected one of (_B, _E, _b, _e) for "+i+" in voice: "+s.warn,n,l);else if(0===s.token.length&&'"'!==n[l])t("Expected one of (_B, _E, _b, _e) for "+i+" in voice",n,l);else{var o={_B:2,_E:9,_b:-10,_e:-3}[s.token];o?r.voices[a][i]=o:t("Expected one of (_B, _E, _b, _e) for "+i+" in voice",n,l)}l+=s.len};l0&&(t+=u[0],"V"===u[1]&&this.startNewLine());for(var d=0;t0)t+=p[0],"V"===p[1]&&(l=!0);else{var m;for((!o.hasBeginMusic()||l&&!this.lineContinuation)&&(this.startNewLine(),l=!1);;)if((m=n.eatWhiteSpace(e,t))>0&&(t+=m),t>0&&""===e[t-1]&&(m=c.letter_to_body_header(e,t))[0]>0&&("V"===m[1]&&this.startNewLine(),t=m[0],i.start_new_line=!1),(m=P(e,t))[0]>0&&(t+=m[0]),(m=E(e,t))[0]>0){S.chord||(S.chord=[]);var g=n.translateString(m[1]);g=g.replace(/;/g,"\n");for(var y=!1,x=0;x0&&(S.force_end_beam_last=!0),t+=k}else if((m=-1===v.indexOf(e[t])?B(e,t):[0])[0]>0)null===m[1]?t+10&&(0===m[1].indexOf("style=")?S.style=m[1].substr(6):(void 0===S.decoration&&(S.decoration=[]),"beambr1"===m[1]?S.beambr=1:"beambr2"===m[1]?S.beambr=2:S.decoration.push(m[1]))),t+=m[0];else{if(!((m=M(e,t))[0]>0))break;S.gracenotes=m[1],t+=m[0]}if((m=L(e,t))[0]>0){d=0,void 0!==S.gracenotes&&(S.rest={type:"spacer"},S.duration=.125,i.addFormattingOptions(S,s.formatting,"note"),o.appendElement("note",r+t,r+t+m[0],S),i.measureNotEmpty=!0,S={});var w={type:m[1]};0===w.type.length?a("Unknown bar type",e,t):(i.inEnding&&"bar_thin"!==w.type&&(w.endEnding=!0,i.inEnding=!1),m[2]&&(w.startEnding=m[2],i.inEnding&&(w.endEnding=!0),i.inEnding=!0,"bar_right_repeat"===m[1]?i.restoreStartEndingHoldOvers():i.duplicateStartEndingHoldOvers()),void 0!==S.decoration&&(w.decoration=S.decoration),void 0!==S.chord&&(w.chord=S.chord),w.startEnding&&void 0===i.barFirstEndingNum?i.barFirstEndingNum=i.currBarNumber:w.startEnding&&w.endEnding&&i.barFirstEndingNum?i.currBarNumber=i.barFirstEndingNum:w.endEnding&&(i.barFirstEndingNum=void 0),"bar_invisible"!==w.type&&i.measureNotEmpty&&F()&&(i.currBarNumber++,i.barNumbers&&i.currBarNumber%i.barNumbers==0&&(w.barNumber=i.currBarNumber)),i.addFormattingOptions(S,s.formatting,"bar"),o.appendElement("bar",r+f,r+t+m[0],w),i.measureNotEmpty=!1,S={}),t+=m[0]}else if("&"===e[t])(m=A(e,t))[0]>0&&(o.appendElement("overlay",r,r+1,{}),t+=1,d++);else{if((m=O(e,t)).consumed>0&&(void 0!==m.startSlur&&(S.startSlur=m.startSlur),m.dottedSlur&&(S.dottedSlur=!0),void 0!==m.triplet&&(h>0?a("Can't nest triplets",e,t):(S.startTriplet=m.triplet,S.tripletMultiplier=m.tripletQ/m.triplet,S.tripletR=m.num_notes,h=void 0===m.num_notes?m.triplet:m.num_notes)),t+=m.consumed),"["===e[t]){t++;for(var C=null,j=!1,I=!1;!I;){var V=B(e,t);V[0]>0&&(t+=V[0]);var Y=z(e,t,{},!1);if(null!==Y&&void 0!==Y.pitch)V[0]>0&&0!==V[1].indexOf("style=")&&(void 0===S.decoration&&(S.decoration=[]),S.decoration.push(V[1])),Y.end_beam&&(S.end_beam=!0,delete Y.end_beam),void 0===S.pitches?(S.duration=Y.duration,S.pitches=[Y]):S.pitches.push(Y),delete Y.duration,V[0]>0&&0===V[1].indexOf("style=")&&(S.pitches[S.pitches.length-1].style=V[1].substr(6)),i.inTieChord[S.pitches.length]&&(Y.endTie=!0,i.inTieChord[S.pitches.length]=void 0),Y.startTie&&(i.inTieChord[S.pitches.length]=!0),t=Y.endChar,delete Y.endChar;else if(" "===e[t])a("Spaces are not allowed in chords",e,t),t++;else{if(t0&&(!S.rest||"spacer"!==S.rest.type)&&0==--h&&(S.endTriplet=!0);for(var G=!1;t":case"<":var q=D(e,t);t+=q[0]-1,i.next_note_duration=q[2],C?C*=q[1]:C=q[1];break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"/":var W=n.getFraction(e,t);C=W.value;var R=e[t=W.index];" "===R&&(j=!0),"-"===R||")"===R||" "===R||"<"===R||">"===R?t--:G=!0;break;case"0":C=0;break;default:G=!0}G||t++}}else a("Expected ']' to end the chords",e,t);void 0!==S.pitches&&(null!==C&&(S.duration=S.duration*C,j&&H(S)),i.addFormattingOptions(S,s.formatting,"note"),o.appendElement("note",r+f,r+t,S),i.measureNotEmpty=!0,S={}),I=!0}}}else{var X={},U=z(e,t,X,!0);void 0!==X.endTie&&_(i,d,!0),null!==U&&(void 0!==U.pitch?(S.pitches=[{}],void 0!==U.accidental&&(S.pitches[0].accidental=U.accidental),S.pitches[0].pitch=U.pitch,S.pitches[0].name=U.name,(U.midipitch||0===U.midipitch)&&(S.pitches[0].midipitch=U.midipitch),void 0!==U.endSlur&&(S.pitches[0].endSlur=U.endSlur),void 0!==U.endTie&&(S.pitches[0].endTie=U.endTie),void 0!==U.startSlur&&(S.pitches[0].startSlur=U.startSlur),void 0!==S.startSlur&&(S.pitches[0].startSlur=S.startSlur),void 0!==S.dottedSlur&&(S.pitches[0].dottedSlur=!0),void 0!==U.startTie&&(S.pitches[0].startTie=U.startTie),void 0!==S.startTie&&(S.pitches[0].startTie=S.startTie)):(S.rest=U.rest,"multimeasure"===U.rest.type&&F()&&(i.currBarNumber+=U.rest.text-1),void 0!==U.endSlur&&(S.endSlur=U.endSlur),void 0!==U.endTie&&(S.rest.endTie=U.endTie),void 0!==U.startSlur&&(S.startSlur=U.startSlur),void 0!==U.startTie&&(S.rest.startTie=U.startTie),void 0!==S.startTie&&(S.rest.startTie=S.startTie)),void 0!==U.chord&&(S.chord=U.chord),void 0!==U.duration&&(S.duration=U.duration),void 0!==U.decoration&&(S.decoration=U.decoration),void 0!==U.graceNotes&&(S.graceNotes=U.graceNotes),delete S.startSlur,delete S.dottedSlur,T(i,d,S)&&(void 0!==S.pitches?S.pitches[0].endTie=!0:"spacer"!==S.rest.type&&(S.rest.endTie=!0),_(i,d,!1)),(U.startTie||S.startTie)&&_(i,d,!0),t=U.endChar,h>0&&(!U.rest||"spacer"!==U.rest.type)&&0==--h&&(S.endTriplet=!0),U.end_beam&&H(S),S.rest&&"rest"===S.rest.type&&1===S.duration&&N(i)<=1&&(S.rest.type="whole",S.duration=N(i)),S.duration<1&&-1===b.indexOf(S.duration)&&0!==S.duration&&(S.rest&&"spacer"===S.rest.type||a("Duration not representable: "+e.substring(f,t),e,t)),i.addFormattingOptions(S,s.formatting,"note"),o.appendElement("note",r+f,r+t,S)||(this.startNewLine(),o.appendElement("note",r+f,r+t,S)),i.measureNotEmpty=!0,S={})}t===f&&(" "!==e[t]&&"`"!==e[t]&&a("Unknown character ignored",e,t),t++)}}}this.lineContinuation=e.indexOf("")>=0||u[0]>0,this.lineContinuation||(S={})}};var _=function(e,t,r){var n=e.currentVoice?100*e.currentVoice.staffNum+e.currentVoice.index:0;void 0===e.inTie[t]&&(e.inTie[t]=[]),e.inTie[t][n]=r},E=function(e,t){if('"'===e[t]){var r=n.getBrackettedSubstring(e,t,5);if(r[2]||a("Missing the closing quote while parsing the chord symbol",e,t),r[0]>0&&r[1].length>0&&"^"===r[1][0])r[1]=r[1].substring(1),r[2]="above";else if(r[0]>0&&r[1].length>0&&"_"===r[1][0])r[1]=r[1].substring(1),r[2]="below";else if(r[0]>0&&r[1].length>0&&"<"===r[1][0])r[1]=r[1].substring(1),r[2]="left";else if(r[0]>0&&r[1].length>0&&">"===r[1][0])r[1]=r[1].substring(1),r[2]="right";else if(r[0]>0&&r[1].length>0&&"@"===r[1][0]){r[1]=r[1].substring(1);var s=n.getFloat(r[1]);if(0===s.digits)return a("Missing first position in absolutely positioned annotation.",e,t),r[1]=r[1].replace("@",""),r[2]="above",r;if(r[1]=r[1].substring(s.digits),","!==r[1][0])return a("Missing comma absolutely positioned annotation.",e,t),r[1]=r[1].replace("@",""),r[2]="above",r;r[1]=r[1].substring(1);var o=n.getFloat(r[1]);if(0===o.digits)return a("Missing second position in absolutely positioned annotation.",e,t),r[1]=r[1].replace("@",""),r[2]="above",r;r[1]=r[1].substring(o.digits);var c=n.skipWhiteSpace(r[1]);r[1]=r[1].substring(c),r[2]=null,r[3]={x:s.value,y:o.value}}else!0!==i.freegchord&&(r[1]=r[1].replace(/([ABCDEFG0-9])b/g,"$1♭"),r[1]=r[1].replace(/([ABCDEFG0-9])#/g,"$1♯"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)o([^A-Za-z])/g,"$1$2°$3"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)o$/g,"$1$2°"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)0([^A-Za-z])/g,"$1$2ø$3"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)\^([^A-Za-z])/g,"$1$2∆$3")),r[2]="default",r[1]=h.chordName(i,r[1]);return r}return[0,""]},M=function(e,t){if("{"===e[t]){var r=n.getBrackettedSubstring(e,t,1,"}");r[2]||a("Missing the closing '}' while parsing grace note",e,t),")"===e[t+r[0]]&&(r[0]++,r[1]+=")");for(var s=[],o=0,c=!1;o0&&(s[s.length-1].endBeam=!0):a("Unknown character '"+r[1][o]+"' while parsing grace note",e,t),o++)}if(s.length)return[r[0],s]}return[0]};function A(e,t){if("&"===e[t]){for(var r=t;e[t]&&":"!==e[t]&&"|"!==e[t];)t++;return[t-r,e.substring(r+1,t)]}return[0]}function N(e){var t=e.origMeter;return t&&"specified"===t.type&&t.value&&0!==t.value.length?parseInt(t.value[0].num,10)/parseInt(t.value[0].den,10):1}var B=function(e,t){var r=i.macros[e[t]];if(void 0!==r)return"!"!==r[0]&&"+"!==r[0]||(r=r.substring(1)),"!"!==r[r.length-1]&&"+"!==r[r.length-1]||(r=r.substring(0,r.length-1)),d.includes(r)?[1,r]:f.includes(r)?("hidden"===i.volumePosition&&(r=""),[1,r]):p.includes(r)?("hidden"===i.dynamicPosition&&(r=""),[1,r]):(i.ignoredDecorations.includes(r)||a("Unknown macro: "+r,e,t),[1,""]);switch(e[t]){case".":if("("===e[t+1]||"-"===e[t+1])break;return[1,"staccato"];case"u":return[1,"upbow"];case"v":return[1,"downbow"];case"~":return[1,"irishroll"];case"!":case"+":var s=n.getBrackettedSubstring(e,t,5);if(s[1].length>1&&("^"===s[1][0]||"_"===s[1][0])&&(s[1]=s[1].substring(1)),d.includes(s[1]))return s;if(f.includes(s[1]))return"hidden"===i.volumePosition&&(s[1]=""),s;if(p.includes(s[1]))return"hidden"===i.dynamicPosition&&(s[1]=""),s;var o=m.findIndex((function(e){return s[1]===e[0]}));return o>=0?(s[1]=m[o][1],s):(o=g.findIndex((function(e){return s[1]===e[0]})))>=0?(s[1]=g[o][1],"hidden"===i.dynamicPosition&&(s[1]=""),s):"!"!==e[t]||1!==s[0]&&"!"===e[t+s[0]-1]?(a("Unknown decoration: "+s[1],e,t),s[1]="",s):[1,null];case"H":return[1,"fermata"];case"J":return[1,"slide"];case"L":return[1,"accent"];case"M":return[1,"mordent"];case"O":return[1,"coda"];case"P":return[1,"pralltriller"];case"R":return[1,"roll"];case"S":return[1,"segno"];case"T":return[1,"trill"];case"t":return[1,"trillh"]}return[0,0]},P=function(e,t){for(var r=t;n.isWhiteSpace(e[t]);)t++;return[t-r]},L=function(e,t){var r=n.getBarLine(e,t);if(0===r.len)return[0,""];if(r.warn)return a(r.warn,e,t),[r.len,""];for(var i=0;i="2"&&e[t+1]<="9"?(void 0!==r.triplet?a("Can't nest triplets",e,t):(r.triplet=e[t+1]-"0",r.tripletQ=w[r.triplet],r.num_notes=r.triplet,t+2="1"&&e[t+4]<="9"?(r.num_notes=e[t+4]-"0",t+=3):a("expected number after the two colons after the triplet to mark the duration",e,t):t+3="1"&&e[t+3]<="9"?(r.tripletQ=e[t+3]-"0",t+4="1"&&e[t+5]<="9"&&(r.num_notes=e[t+5]-"0",t+=4):t+=2):a("expected number after the triplet to mark the duration",e,t))),t++):void 0===r.startSlur?r.startSlur=1:r.startSlur++),t++;return r.consumed=t-i,r};C.prototype.startNewLine=function(){var e={startChar:-1,endChar:-1};i.partForNextLine.title&&(e.part=i.partForNextLine),e.clef=i.currentVoice&&void 0!==i.staves[i.currentVoice.staffNum].clef?Object.assign({},i.staves[i.currentVoice.staffNum].clef):Object.assign({},i.clef);var t=i.currentVoice?i.currentVoice.scoreTranspose:0;if(e.key=l.standardKey(i.key.root+i.key.acc+i.key.mode,i.key.root,i.key.acc,t),e.key.mode=i.key.mode,i.key.impliedNaturals&&(e.key.impliedNaturals=i.key.impliedNaturals),i.key.explicitAccidentals)for(var r=0;r=0?(r.duration=s.getBarLength(),r.rest.text=1,u="Zduration"):(a&&0!==i.next_note_duration?(r.duration=i.default_length*i.next_note_duration,i.next_note_duration=0,d=!0):r.duration=i.default_length,u="duration");break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"0":case"/":if("octave"===u||"duration"===u){var p=n.getFraction(e,t);for(r.duration=r.duration*p.value,r.endChar=p.index;p.index"!==e[t])return r;t--,u="broken_rhythm";break;case">":case"<":if(!l(u))return null;if(!a)return r.endChar=t,r;var g=D(e,t);t+=g[0]-1,i.next_note_duration=g[2],r.duration=g[1]*r.duration,u="end_slur";break;default:return l(u)?(r.endChar=t,r):null}if(++t===e.length)return l(u)?(r.endChar=t,r):null}return null},D=function(e,t){switch(e[t]){case">":return t"===e[t+1]&&">"===e[t+2]?[3,1.875,.125]:t"===e[t+1]?[2,1.75,.25]:[1,1.5,.5];case"<":return t","accent"],["tr","trill"],["plus","+"],["emphasis","accent"],["^","umarcato"],["marcato","umarcato"]],e.exports.accentDynamicPseudonyms=[["<(","crescendo("],["<)","crescendo)"],[">(","diminuendo("],[">)","diminuendo)"]],e.exports.nonDecorations="ABCDEFGabcdefgxyzZ[]|^_{",e.exports.durations=[.5,.75,.875,.9375,.96875,.984375,.25,.375,.4375,.46875,.484375,.4921875,.125,.1875,.21875,.234375,.2421875,.24609375,.0625,.09375,.109375,.1171875,.12109375,.123046875,.03125,.046875,.0546875,.05859375,.060546875,.0615234375,.015625,.0234375,.02734375,.029296875,.0302734375,.03076171875],e.exports.pitches={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11},e.exports.rests={x:"invisible",X:"invisible-multimeasure",y:"spacer",z:"rest",Z:"multimeasure"},e.exports.accMap={dblflat:"__",flat:"_",natural:"=",sharp:"^",dblsharp:"^^",quarterflat:"_/",quartersharp:"^/"},e.exports.tripletQ={2:3,3:2,4:3,5:2,6:2,7:2,8:3,9:2}},1881:function(e,t,r){var n=r(5008),a=function(e,t){this.lineIndex=0,this.lines=e,this.multilineVars=t,this.skipWhiteSpace=function(e){for(var t=0;t=e.length};this.eatWhiteSpace=function(e,t){for(var r=t;r="a"&&e[t]<="z"||e[t]>="A"&&e[t]<="Z");)t++;return t},n=this.skipWhiteSpace(e);if(r(e,n))return{len:0};var a=e.substring(n,n+3).toLowerCase();switch((a.length>1&&" "===a[1]||"^"===a[1]||"_"===a[1]||"="===a[1])&&(a=a[0]),a){case"mix":return{len:t(e,n),token:"Mix"};case"dor":return{len:t(e,n),token:"Dor"};case"phr":return{len:t(e,n),token:"Phr"};case"lyd":return{len:t(e,n),token:"Lyd"};case"loc":return{len:t(e,n),token:"Loc"};case"aeo":case"min":case"m":return{len:t(e,n),token:"m"};case"maj":case"ion":return{len:t(e,n),token:""}}return{len:0}},this.getClef=function(e,t){var a=e,i=this.skipWhiteSpace(e);if(r(e,i))return{len:0};var s=!1,o=e.substring(i);if(n.startsWith(o,"clef=")&&(s=!0,o=o.substring(5),i+=5),0===o.length&&s)return{len:i+5,warn:"No clef specified: "+a};var c=this.skipWhiteSpace(o);if(r(o,c))return{len:0};c>0&&(i+=c,o=o.substring(c));var l=null;if(n.startsWith(o,"treble"))l="treble";else if(n.startsWith(o,"bass3"))l="bass3";else if(n.startsWith(o,"bass"))l="bass";else if(n.startsWith(o,"tenor"))l="tenor";else if(n.startsWith(o,"alto2"))l="alto2";else if(n.startsWith(o,"alto1"))l="alto1";else if(n.startsWith(o,"alto"))l="alto";else if(!t&&s&&n.startsWith(o,"none"))l="none";else if(n.startsWith(o,"perc"))l="perc";else if(!t&&s&&n.startsWith(o,"C"))l="tenor";else if(!t&&s&&n.startsWith(o,"F"))l="bass";else{if(t||!s||!n.startsWith(o,"G"))return{len:i+5,warn:"Unknown clef specified: "+a};l="treble"}return o=o.substring(l.length),(c=this.isMatch(o,"+8"))>0?l+="+8":(c=this.isMatch(o,"-8"))>0&&(l+="-8"),{len:i+l.length,token:l,explicit:s}},this.getBarLine=function(e,t){switch(e[t]){case"]":switch(e[++t]){case"|":return{len:2,token:"bar_thick_thin"};case"[":return e[++t]>="1"&&e[t]<="9"||'"'===e[t]?{len:2,token:"bar_invisible"}:{len:1,warn:"Unknown bar symbol"};default:return{len:1,token:"bar_invisible"}}break;case":":switch(e[++t]){case":":return{len:2,token:"bar_dbl_repeat"};case"|":switch(e[++t]){case"]":return"|"===e[++t]&&":"===e[++t]?{len:5,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};case"|":return":"===e[++t]?{len:4,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};default:return{len:2,token:"bar_right_repeat"}}break;default:return{len:1,warn:"Unknown bar symbol"}}break;case"[":if("|"!==e[++t])return e[t]>="1"&&e[t]<="9"||'"'===e[t]?{len:1,token:"bar_invisible"}:{len:0};switch(e[++t]){case":":return{len:3,token:"bar_left_repeat"};case"]":return{len:3,token:"bar_invisible"};default:return{len:2,token:"bar_thick_thin"}}break;case"|":switch(e[++t]){case"]":return{len:2,token:"bar_thin_thick"};case"|":return":"===e[++t]?{len:3,token:"bar_left_repeat"}:{len:2,token:"bar_thin_thin"};case":":for(var r=0;":"===e[t+r];)r++;return{len:1+r,token:"bar_left_repeat"};default:return{len:1,token:"bar_thin"}}}return{len:0}},this.getTokenOf=function(e,t){for(var r=0;r0;){var r;if("^"===e[0].token){if(r="sharp",e.shift(),0===e.length)return{accs:t,warn:"Expected note name after "+r};switch(e[0].token){case"^":r="dblsharp",e.shift();break;case"/":r="quartersharp",e.shift()}}else if("="===e[0].token)r="natural",e.shift();else{if("_"!==e[0].token)return{accs:t};if(r="flat",e.shift(),0===e.length)return{accs:t,warn:"Expected note name after "+r};switch(e[0].token){case"_":r="dblflat",e.shift();break;case"/":r="quarterflat",e.shift()}}if(0===e.length)return{accs:t,warn:"Expected note name after "+r};switch(e[0].token[0]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":void 0===t&&(t=[]),t.push({acc:r,note:e[0].token[0]}),1===e[0].token.length?e.shift():e[0].token=e[0].token.substring(1);break;default:return{accs:t,warn:"Expected note name after "+r+" Found: "+e[0].token}}}return{accs:t}},this.getKeyAccidental=function(e){var t={"^":"sharp","^^":"dblsharp","=":"natural",_:"flat",__:"dblflat","_/":"quarterflat","^/":"quartersharp"},n=this.skipWhiteSpace(e);if(r(e,n))return{len:0};var a=null;switch(e[n]){case"^":case"_":case"=":a=e[n];break;default:return{len:0}}if(n++,r(e,n))return{len:1,warn:"Expected note name after accidental"};switch(e[n]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:n+1,token:{acc:t[a],note:e[n]}};case"^":case"_":case"/":if(a+=e[n],n++,r(e,n))return{len:2,warn:"Expected note name after accidental"};switch(e[n]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:n+1,token:{acc:t[a],note:e[n]}};default:return{len:2,warn:"Expected note name after accidental"}}break;default:return{len:1,warn:"Expected note name after accidental"}}},this.isWhiteSpace=function(e){return" "===e||"\t"===e||""===e},this.getMeat=function(e,t,r){var n=e.indexOf("%",t);for(n>=0&&n="A"&&e<="Z"||e>="a"&&e<="z"},i=function(e){return e>="0"&&e<="9"};this.tokenize=function(e,t,r,n){var s=this.getMeat(e,t,r);t=s.start,r=s.end;for(var o,c=[];t=r?{len:1,err:"Missing close quote"}:{len:a-t+1,token:this.translateString(e.substring(n+1,a))}}for(var i=n;i=0?n.strip(e.substring(0,t)):n.strip(e)},this.getInt=function(e){var t=parseInt(e);if(isNaN(t))return{digits:0};var r=""+t;return{value:t,digits:e.indexOf(r)+r.length}},this.getFloat=function(e){var t=parseFloat(e);if(isNaN(t))return{digits:0};var r=""+t;return{value:t,digits:e.indexOf(r)+r.length}},this.getMeasurement=function(e){if(0===e.length)return{used:0};var t=1,r="";if("-"===e[0].token)e.shift(),r="-",t++;else if("number"!==e[0].type)return{used:0};if(r+=e.shift().token,0===e.length)return{used:1,value:parseInt(r)};var n=e.shift();if("."===n.token){if(t++,0===e.length)return{used:t,value:parseInt(r)};if("number"===e[0].type&&(r=r+"."+(n=e.shift()).token,t++,0===e.length))return{used:t,value:parseFloat(r)};n=e.shift()}switch(n.token){case"pt":case"px":return{used:t+1,value:parseFloat(r)};case"cm":return{used:t+1,value:parseFloat(r)/2.54*72};case"in":return{used:t+1,value:72*parseFloat(r)};default:return e.unshift(n),{used:t,value:parseFloat(r)}}};var u=function(e){return e=(e=e.replace(/\\n/g,"\n")).replace(/\\"/g,'"')};this.getBrackettedSubstring=function(e,t,r,n){for(var a=n||e[t],i=t+1,s=!1;ie.length-1&&(i=e.length-1),[i-t+1,u(e.substring(t+1,i)),!1])}};a.prototype.peekLine=function(){return this.lines[this.lineIndex]},a.prototype.nextLine=function(){if(this.lineIndex>0&&(this.multilineVars.iChar+=this.lines[this.lineIndex-1].length+1),this.lineIndex11&&(f%=12);var p="m"===t[0]?l[f]:c[f],m=p+t,g=i(m);0!==g.length&&"flat"!==g[0].acc||(e.localTransposePreferFlats=!0);var v=m.charCodeAt(0)-h.charCodeAt(0);return e.localTranspose>0?v<0?v+=7:0===v&&("#"!==h[1]&&"b"!==m[1]||(v+=7)):e.localTranspose<0&&(v>0?v-=7:0===v&&("b"!==h[1]&&"#"!==m[1]||(v-=7))),e.localTranspose>0?e.localTransposeVerticalMovement=v+7*Math.floor(e.localTranspose/12):e.localTransposeVerticalMovement=v+7*Math.ceil(e.localTranspose/12),d?{accidentals:g,root:p[0],acc:p.length>1?p[1]:""}:{accidentals:[],root:r,acc:n}},s.chordName=function(e,t){return a(t,e.localTranspose,e.localTransposePreferFlats,e.freegchord)};var h=["c","d","e","f","g","a","b"],u={dblflat:-2,flat:-1,natural:0,sharp:1,dblsharp:2},d={"-2":"dblflat","-1":"flat",0:"natural",1:"sharp",2:"dblsharp"},f={"-2":"__","-1":"_",0:"=",1:"^",2:"^^"};s.note=function(e,t){if(e.localTranspose&&"perc"!==e.clef.type){var r=t.pitch;if(e.localTransposeVerticalMovement&&(t.pitch=t.pitch+e.localTransposeVerticalMovement,t.name)){var a=t.accidental?t.name.substring(1):t.name,i=t.accidental?t.name[0]:"",s=n.pitchIndex(a);t.name=i+n.noteName(s+e.localTransposeVerticalMovement)}if(t.accidental){var o=function(e,t,r,n,a){for(var i=h[(e+49)%7],s=0,o=0;o2&&(t++,p-="b"===l||"e"===l?1:2),[t,p]}(r,t.pitch,t.accidental,e.globalTransposeOrigKeySig,e.targetKey);t.pitch=o[0],t.accidental=d[o[1]],t.name&&(t.name=f[o[1]]+t.name.replace(/[_^=]/g,""))}}},e.exports=s},867:function(e){var t={},r=["C,,,","D,,,","E,,,","F,,,","G,,,","A,,,","B,,,","C,,","D,,","E,,","F,,","G,,","A,,","B,,","C,","D,","E,","F,","G,","A,","B,","C","D","E","F","G","A","B","c","d","e","f","g","a","b","c'","d'","e'","f'","g'","a'","b'","c''","d''","e''","f''","g''","a''","b''","c'''","d'''","e'''","f'''","g'''","a'''","b'''"];t.pitchIndex=function(e){return r.indexOf(e)},t.noteName=function(e){return r[e]},e.exports=t},4208:function(e){var t=["C","C♯","D","D♯","E","F","F♯","G","G♯","A","A♯","B"],r=["C","D♭","D","E♭","E","F","G♭","G","A♭","A","B♭","B"],n=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],a=["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"];e.exports=function(e,i,s,o){if(!i||i%12==0)return e;for(;i<0;)i+=12;i>11&&(i%=12);var c=e.match(/^([A-G][b#♭♯]?)([^\/]+)?\/?([A-G][b#♭♯]?)?(.+)?/);if(!c)return e;var l=c[1],h=c[2],u=c[3],d=c[4];if((f=t.indexOf(l))<0&&(f=r.indexOf(l)),f<0&&(f=n.indexOf(l)),f<0&&(f=a.indexOf(l)),f<0)return e;f+=i,f%=12,e=s?o?a[f]:r[f]:o?n[f]:t[f];var f,p=h&&(h.indexOf("dim")>=0||h.indexOf("°")>=0);return console.log(p,e,h),p&&"A#"===e&&(e="Bb"),p&&"D#"===e&&(e="Eb"),p&&"A♯"===e&&(e="B♭"),p&&"D♯"===e&&(e="E♭"),h&&(e+=h),u&&((f=t.indexOf(u))<0&&(f=r.indexOf(u)),f<0&&(f=n.indexOf(u)),f<0&&(f=a.indexOf(u)),e+="/",f>=0?(f+=i,f%=12,e+=s?o?a[f]:r[f]:o?n[f]:t[f]):e+=u),d&&(e+=d),e}},575:function(e,t,r){var n=r(9708);function a(e){if(!e)return!1;if("string"==typeof e)return!1;for(var t=0;t0&&o[l].voice.push({el_type:"note",duration:u,rest:{type:"invisible"},startChar:g.startChar,endChar:g.endChar}),o[l].voice.push(g)),u=0):"note"===g.el_type?d?o[l].voice.push(g):(u+=g.duration,r[n]+=g.duration):"scale"!==g.el_type&&"stem"!==g.el_type&&"overlay"!==g.el_type&&"style"!==g.el_type&&"transpose"!==g.el_type&&"color"!==g.el_type||o[l].voice.push(g);else{t=!0,d=!0,p=m,o[l].hasOverlay=!0,0===f&&(f=r[n]);for(var v=0;v=e.lines[v].staff[0].voices.length&&e.lines[v].staff[0].voices.push([{el_type:"note",duration:r[v],rest:{type:"invisible"},startChar:g.startChar,endChar:g.endChar}])}}o[l].hasOverlay&&0===o[l].snip.length&&o[l].snip.push({start:p,len:h.length-p})}for(l=0;l=0;y--){var x=b.snip[y];s.voices[l].splice(x.start,x.len),s.voices[l].splice(x.start+1,0,{el_type:"stem",direction:"auto"});var k=c(s.voices[l],x.start);s.voices[l].splice(k,0,{el_type:"stem",direction:"up"})}for(y=0;y0&&"bar"!==e[r].el_type;r--);return r}function l(e,t,r,n){var a;n[t]||(n[t]=[]),n[t][r]||(n[t][r]=[]);for(var i=function(e,i,s){if(void 0===n[t][r][s]){for(a=0;a=t&&ot;){if(e[t].staff)return e[t];t++}return null}function d(e){e.potentialStartBeam&&e.potentialEndBeam&&(e.potentialStartBeam.startBeam=!0,e.potentialEndBeam.endBeam=!0),delete e.potentialStartBeam,delete e.potentialEndBeam}function f(e){for(var t=0;t0){if(void 0!==n.voices[0]){for(var a=!1,i=0;i0&&x[x.length-1].barNumber){var w=u(e.lines,b);w&&(w.staff[0].barNumber=x[x.length-1].barNumber),delete x[x.length-1].barNumber}}}return delete e.staffNum,delete e.voiceNum,delete e.lineNum,delete e.potentialStartBeam,delete e.potentialEndBeam,delete e.vskipPending,i},this.addTieToLastNote=function(t){var r=function(e){if(!e.lines[e.lineNum])return null;if(!e.lines[e.lineNum].staff)return null;if(!e.lines[e.lineNum].staff[e.staffNum])return null;var t=e.lines[e.lineNum].staff[e.staffNum].voices[e.voiceNum];if(!t)return null;for(var r=t.length-1;r>=0;r--){var n=t[r];if("note"===n.el_type)return n}return null}(e);return!!(r&&r.pitches&&r.pitches.length>0)&&(r.pitches[0].startTie={},t&&(r.pitches[0].startTie.style="dotted"),!0)},this.appendElement=function(n,a,s,o){var c;return o.el_type=n,null!==a&&(o.startChar=a),null!==s&&(o.endChar=s),"note"===n?((c=o).duration?c.duration:0)>=.25||o.force_end_beam_last&&void 0!==e.potentialStartBeam?g(e):o.end_beam&&void 0!==e.potentialStartBeam?void 0===o.rest?function(e,t){t.potentialStartBeam.startBeam=!0,e.endBeam=!0,delete t.potentialStartBeam,delete t.potentialEndBeam}(o,e):g(e):void 0===o.rest&&(void 0===e.potentialStartBeam?o.end_beam||(e.potentialStartBeam=o,delete e.potentialEndBeam):e.potentialEndBeam=o):g(e),delete o.end_beam,delete o.force_end_beam_last,o.rest&&"invisible"===o.rest.type&&delete o.decoration,!(e.lines.length<=e.lineNum||e.lines[e.lineNum].staff.length<=e.staffNum||(function(e,t,r,n,a){var i=t.lines[t.lineNum].staff[t.staffNum];if(void 0!==r.pitches){var s=i.workingClef.verticalPos;r.pitches.forEach((function(e){e.verticalPos=e.pitch-s}))}if(void 0!==r.gracenotes){var o=i.workingClef.verticalPos;r.gracenotes.forEach((function(e){e.verticalPos=e.pitch-o}))}i.voices.length<=t.voiceNum&&(n[a]||(n[a]={}),y(e,t,n[a])),i.voices[t.voiceNum].push(r)}(t,e,o,r,i),0))},this.appendStartingElement=function(t,r,n,a){var i;d(e),"key"===t&&(i=a.impliedNaturals,delete a.impliedNaturals,delete a.explicitAccidentals);var s=Object.assign({},a);if(e.lines[e.lineNum]){var o=e.lines[e.lineNum].staff;if(o){o.length<=e.staffNum&&(o[e.staffNum]={},o[e.staffNum].clef=Object.assign({},o[0].clef),o[e.staffNum].key=Object.assign({},o[0].key),o[0].meter&&(o[e.staffNum].meter=Object.assign({},o[0].meter)),o[e.staffNum].workingClef=Object.assign({},o[0].workingClef),o[e.staffNum].voices=[[]]),"clef"===t&&(o[e.staffNum].workingClef=s);for(var c=o[e.staffNum].voices[e.voiceNum],l=0;l0){var r=t[t.length-1];if("bar"!==r.el_type)return e-1;void 0!==r.barNumber&&(r.barNumber=e)}return e},this.hasBeginMusic=function(){for(var t=0;t=0;r--)if(void 0!==e.lines[r].staff)return!1;return!0},this.getCurrentVoice=function(){var t=function(e,t){if(e.length<=t)return null;for(;t>=0;){if(e[t].staff)return e[t];t--}return null}(e.lines,e.lineNum);if(!t)return null;var r=t.staff[e.staffNum];return r&&void 0!==r.voices[e.voiceNum]?r.voices[e.voiceNum]:null},this.setCurrentVoice=function(t,r,n){e.staffNum=t,e.voiceNum=r,i=n;for(var a=0;a0?(r.push(i-1),n.push(Math.round(a-s)),a=s):is&&ds?(l.push(d-1),c++,o=Math.max(o,s),s=Math.abs(n-t[c]),i.push(a-f),a=f):s=p}i.push(a)}function a(e,t,r,a){for(var i=Math.ceil(e.total/t),s=Math.floor(e.total/i),o=[],c=0;ct&&(s=!0),o%r==r-1&&(o!==e.length-1&&n.push(o),a.push(Math.round(i)),i=0);return{failed:s,totals:a,lineBreaks:n}}e.exports={wrapLines:function(e,t,r){if(t&&0!==e.lines.length){var n=e.deline({lineBreaks:!1}),a=function(e,t){for(var r=[],n=0,a=0,i=0,s=0;s0&&(n[c.line].staff[c.staff].barNumber=s);for(var h=Object.keys(l),u=0;u=0;p--)if("key"===f[p].el_type){a[c.staff]={root:f[p].root,acc:f[p].acc,mode:f[p].mode,accidentals:f[p].accidentals.filter((function(e){return"natural"!==e.acc}))};break}for(p=f.length-1;p>=0;p--)if("stem"===f[p].el_type){i[10*c.staff+c.voice]={direction:f[p].direction};break}if(void 0!==r&&0===c.staff&&0===c.voice)for(p=0;p0&&p.measureWidths.length<25&&(k=a(p,g,0,b),b.attempts.push({type:"Optimize",failed:k.failed,reason:k.reason,lineBreaks:k.lineBreaks,totals:k.totals}),k.failed||(y=k.lineBreaks))}u.push(y),d.push(b)}var w=function(e,t,r){var n={lineBreaks:e,staffwidth:t};for(var a in r)r.hasOwnProperty(a)&&"wrap"!==a&&"staffwidth"!==a&&(n[a]=r[a]);return{revisedParams:n}}(u,n.staffwidth,n);return w.explanation=d,w.reParse=!0,w}}},5633:function(e,t,r){var n,a=r(9447),i=r(4914),s=i.relativeMajor,o=i.transposeKey,c=i.relativeMode,l=r(4208);!function(){"use strict";function e(e,r,n){var a=[],i=r.getKeySignature();if("Hp"===i.root||"HP"===i.root)return a;a=a.concat(function(e,t){for(var r=[],n=e.split("K:"),a=n[0].length,i=1;i2?n+=7:-12===r&&(n-=7):r>0&&n<0?n+=7:r<0&&n>0&&(n-=7),r>12?n+=7:r<-12&&(n-=7),n}function h(e,t,n,a,s,o){for(var c=[],h=i(s,n,o),u={},d={},m=0;m1?i[1]:"",accidentals:l}}function p(e,t,r,n){for(var a=e.pitch,i=u.indexOf(e.name),s=(u.indexOf(t.root)+a)%7,o=i+r,c=e.oct;o>6;)c++,o-=7;for(;o<0;)c--,o+=7;for(var l=u[s],h="",d=e.adj,f="=",m=0;m4&&(l=l.toLowerCase()),{acc:h,name:l,upper:l.toUpperCase()}}var m=/([_^=]*)([A-Ga-g])([,']*)/,g=/([_^=]*[A-Ga-g][,']*)(\d*\/*\d*)([\>\<\-\)\.\s\\]*)/,v=/([_^=]*[A-Ga-g][,']*)?(\d*\/*\d*)?([\>\<\-\)]*)?/,b=/(\s*)$/;function y(e,t,r,n){var a="none"===t?0:u.indexOf(t),i=e.match(m),s=i[2].toUpperCase(),o=u.indexOf(s)-a;o<0&&(o+=7);var c=d.indexOf(i[3]);s===i[2]&&c--;var l=n[s]||r[s]||"=";return{acc:i[1],name:s,pitch:o,oct:c,adj:C(i[1],r[s],n[s]),courtesy:i[1]===l}}function x(e,t,r,n,a){var i=e.substring(t,r),s=i.match(new RegExp(g.source+b.source),"");if(s){var o=s[1].length,c=s[2].length+s[3].length+s[4].length;t+=r-t-o-c,r-=c}else if(s=i.match(new RegExp(/([^\[]*)/.source+/\[/.source+v.source+v.source+v.source+v.source+v.source+v.source+v.source+v.source+/\-?](\d*\/*\d*)?([\>\<\-\)]*)/.source+b.source))){for(var l=1+s[1].length,h=0;h=0;t--)if("program"===u[t].cmd)return void(u[t].channel=e)}function O(e){return e/1e6}function H(e){return Math.round(e*k*1e6)/1e6}function z(e){switch(parseInt(e.den,10)){case 2:return.5;case 4:return.25;case 8:return e.num%3==0?.375:.125;case 16:return.125}return.25}function D(e,t,r){if(t)return 0;var n,a,i,s=S,o=_,c=E;if(void 0!==r&&M.length>=r+1&&(s=M[r][0],o=M[r][1],c=M[r][2]),void 0!==g)n=g,g=void 0;else if(T)if(P>e)n=c;else{var l=(a=m,i=z(w),(e-a)/i);n=0===l?s:parseInt(l,10)===l?o:c}else n=o;return v&&(n+=v,v=void 0),n<0&&(n=0),n>127&&(n=127),t?0:n}function F(e,t){var r=t.start,n=t.duration,a=H(1/32);switch(e){case"trill":for(var i=2;n>0;)u.push({cmd:"note",pitch:t.pitch+i,volume:t.volume,start:r,duration:a,gap:0,instrument:h,style:"decoration"}),i=2===i?0:2,n-=a,r+=a;break;case"trillh":for(i=1;n>0;)u.push({cmd:"note",pitch:t.pitch+i,volume:t.volume,start:r,duration:a,gap:0,instrument:h,style:"decoration"}),i=1===i?0:1,n-=a,r+=a;break;case"pralltriller":u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:a,gap:0,instrument:h,style:"decoration"}),n-=a,r+=a,u.push({cmd:"note",pitch:t.pitch+2,volume:t.volume,start:r,duration:a,gap:0,instrument:h,style:"decoration"}),n-=a,r+=a,u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:n,gap:0,instrument:h});break;case"mordent":case"lowermordent":u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:a,gap:0,instrument:h,style:"decoration"}),n-=a,r+=a,u.push({cmd:"note",pitch:t.pitch-2,volume:t.volume,start:r,duration:a,gap:0,instrument:h,style:"decoration"}),n-=a,r+=a,u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:n,gap:0,instrument:h});break;case"turn":a=t.duration/4,u.push({cmd:"note",pitch:t.pitch+2,volume:t.volume,start:r,duration:a,gap:0,instrument:h,style:"decoration"}),u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r+a,duration:a,gap:0,instrument:h,style:"decoration"}),u.push({cmd:"note",pitch:t.pitch-1,volume:t.volume,start:r+2*a,duration:a,gap:0,instrument:h,style:"decoration"}),u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r+3*a,duration:a,gap:0,instrument:h,style:"decoration"});break;case"roll":for(;n>0;)u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:a,gap:0,instrument:h,style:"decoration"}),n-=2*a,r+=2*a}}function j(e,t){var r,n=D(O(e.time),t);if(p.processChord(e),e.gracenotes&&e.pitches&&e.pitches.length>0&&e.pitches[0]&&(r=function(e,t){for(var r,n=0,a=[],s=0;sv&&(b=D(O(e.time),t,v));var y=g[v];if(y){y.startSlur&&(N+=y.startSlur.length),y.endSlur&&(N-=y.endSlur.length);var k=y.actualPitch?y.actualPitch:V(y);if(h===C&&x){var w=i(y);w&&x[w]&&(k=x[w].sound)}var T={cmd:"note",pitch:k,volume:b,start:O(e.time),duration:H(y.duration),instrument:h,startChar:e.elem.startChar,endChar:e.elem.endChar};if(T=G(T),e.gracenotes&&(T.duration=T.duration/2,T.start=T.start+T.duration),e.elem&&e.elem.midiPitches.push(T),m.noteModification)F(m.noteModification,T);else{switch(N>0?T.endType="tenuto":d&&(T.endType=d),T.endType){case"tenuto":T.gap=-.001;break;case"staccato":var S=.4*T.duration;T.gap=o/60*S;break;default:T.gap=0}u.push(T)}}}u.length}var _=function(e){return e.pitches&&e.pitches.length>0&&e.pitches[0]?e.pitches[0].duration:e.elem?e.elem.duration:e.duration}(e);f=Math.max(f,O(e.time)+H(_))}n=function(n,i,C,H){i||(i={}),H||(H={}),e=[],t=[0,0,0,0,0,0,0],s=[],o=i.qpm,c=void 0,k=1,l=void 0,h=void 0,u=void 0,d=void 0,f=0,x=C,w={num:4,den:4},T=!0,S=105,_=95,E=85,M=[],A=.25,g=void 0,v=void 0,N=0,b=[],B={},y=1,n.length>0&&n[0].length>0&&(P=n[0][0].pickupLength),void 0===i.bassprog||H.bassprog||(H.bassprog=[i.bassprog]),void 0===i.bassvol||H.bassvol||(H.bassvol=[i.bassvol]),void 0===i.chordprog||H.chordprog||(H.chordprog=[i.chordprog]),void 0===i.chordvol||H.chordvol||(H.chordvol=[i.chordvol]),void 0===i.gchord||H.gchord||(H.gchord=[i.gchord]),p=new a(n.length,i.chordsOff,H,w),function(e,t){for(var r=0;r=0)&&(I=!0);for(var V=0;V0&&"program"===u[u.length-1].cmd)u[u.length-1].instrument=G.program;else{var q;for(q=u.length-1;q>=0&&"program"!==u[q].cmd;q--);(q<0||u[q].instrument!==G.program)&&u.push({cmd:"program",channel:0,instrument:G.program})}break;case"channel":L(G.channel);break;case"drum":B=W(G.params),R();break;case"gchordOn":p.gChordOn(G);break;case"beat":S=G.beats[0],_=G.beats[1],E=G.beats[2],M=G.volumesPerNotePitch?G.volumesPerNotePitch:[];break;case"vol":g=G.volume;break;case"volinc":v=G.volume;break;case"beataccents":T=G.value;break;case"gchord":case"bassprog":case"chordprog":case"bassvol":case"chordvol":case"gchordbars":p.paramChange(G);break;default:console.log("MIDI creation. Unknown el_type: "+G.el_type+"\n")}}void 0===u[0].instrument&&(u[0].instrument=l||0),d&&u.unshift(d),s.push(u),p.finish(),b.length}return i.detuneOctave&&function(e,t){for(var r={},n=0;n1){var c=(o=o.sort((function(e,t){return e.pitch-t.pitch})))[o.length-1],l=c.pitch%12,h=!1;for(a=0;!h&&a0&&s.push(b),{tempo:o,instrument:l,tracks:s,totalDuration:f}};var I=[0,2,4,5,7,9,11];function V(n){if(void 0!==n.midipitch)return n.midipitch;var a=n.pitch;if(n.accidental)switch(n.accidental){case"sharp":e[a]=1;break;case"flat":e[a]=-1;break;case"natural":e[a]=0;break;case"dblsharp":e[a]=2;break;case"dblflat":e[a]=-2;break;case"quartersharp":e[a]=.25;break;case"quarterflat":e[a]=-.25}var i=12*function(e){return Math.floor(e/7)}(a)+I[q(a)]+60;return void 0!==e[a]?i+=e[a]:i+=t[q(a)],i+=r}function Y(e){var t=[0,0,0,0,0,0,0];if(!e.accidentals)return t;for(var r=0;r=0?(e.pitch=Math.round(e.pitch),e.cents=-50):t.indexOf(".25")>=0&&(e.pitch=Math.round(e.pitch),e.cents=50),e}function q(e){return(e%=7)<0&&(e+=7),e}function W(e){if(0===e.pattern.length||!1===e.on)return{on:!1};for(var t=e.pattern[0],r=[],n="",a=0,i=0;it&&(r=r.substring(0,t)),function(e){for(var t="",r=0;r>=7;for(var n=r.length-1;n>=0;n--){t<<=8;var a=r[n];0!==n&&(a|=128),t|=a}var s=t.toString(16).length;return i(t,s+=s%2)}t.prototype.setTempo=function(e){0===this.trackcount&&(this.startTrack(),this.track+="%00%FF%51%03"+i(Math.round(6e7/e),6),this.endTrack())},t.prototype.setGlobalInfo=function(e,t,n,a){if(0===this.trackcount){this.startTrack();var s=Math.round(6e7/e);this.track+="%00%FF%51%03"+i(s,6),n&&(this.track+=function(e){if(!e||!e.accidentals)return"";for(var t="%00%FF%59%02",r=0,n=256,a=0;a=0)return n;return n}function i(e,t,r){for(var n=Math.min(e.length,t+3),a=t;a=0)return e[a].decoration[i];return null}function s(e){for(var t=0;t=0&&"bar"!==r[n].el_type;)r[n].noChordVoice=!0,n--}function o(e,t){if(e&&!(e.length<=t)&&e[t].title)return e[t].title.join(" ")}function c(e,t){var r=1/4;e.duration&&(r=e.duration[0]);var n=60;return e.bpm&&(n=e.bpm),r*n/t}function l(t){var r;switch(t.type){case"common_time":r={el_type:"meter",num:4,den:4};break;case"cut_time":r={el_type:"meter",num:2,den:2};break;case"specified":r={el_type:"meter",num:t.value[0].num,den:t.value[0].den};break;default:r={el_type:"meter"}}return e=r.num/r.den,r}function h(e){for(var t=[],r=0;r=0;r--)if(e[r].el_type===t.el_type)return void(JSON.stringify(e[r])!==JSON.stringify(t)&&e.push(t));e.push(t)}n=function(n,h){var p,m=(h=h||{}).program||0,g=h.midiTranspose||0;n.visualTranspose&&(g-=n.visualTranspose);var v=h.channel||0,b=!1,y=h.drum||"",x=h.drumBars||1,k=h.drumIntro||0,w=""!==y,C=!!h.drumOff,T=[];m=parseInt(m,10),g=parseInt(g,10),10===(v=parseInt(v,10))&&(m=t),y=y.split(" "),x=parseInt(x,10),k=parseInt(k,10);var S=n.formatting.bagpipes;S&&(m=71);var _=[];if(n.formatting.midi){var E=n.formatting.midi;E.program&&E.program.length>0&&(m=E.program[0],E.program.length>1&&(m=E.program[1],v=E.program[0]),b=!0),E.transpose&&(g=E.transpose[0]),E.channel&&(v=E.channel[0],b=!0),E.drum&&(y=E.drum),E.drumbars&&(x=E.drumbars[0]),E.drumon&&(w=!0),10===v&&(m=t),E.beat&&_.push({el_type:"beat",beats:E.beat}),E.nobeataccents&&_.push({el_type:"beataccents",value:!1})}p=h.qpm?parseInt(h.qpm,10):n.metaText.tempo?c(n.metaText.tempo,n.getBeatLength()):h.defaultQpm?h.defaultQpm:180;var M=[];S&&M.push({el_type:"bagpipes"}),M.push({el_type:"instrument",program:m}),v&&M.push({el_type:"channel",channel:v}),g&&M.push({el_type:"transpose",transpose:g}),M.push({el_type:"tempo",qpm:p});for(var A=0;A<_.length;A++)M.push(_[A]);var N,B=[],P=[],L=[],O=[],H=[0],z={};z[0]={el_type:"tempo",qpm:p,timing:0};for(var D=[],F=[],j=!1,I=n.lines,V=0;V=0?t="pppp":e.decoration.indexOf("ppp")>=0?t="ppp":e.decoration.indexOf("pp")>=0?t="pp":e.decoration.indexOf("p")>=0?t="p":e.decoration.indexOf("mp")>=0?t="mp":e.decoration.indexOf("mf")>=0?t="mf":e.decoration.indexOf("f")>=0?t="f":e.decoration.indexOf("ff")>=0?t="ff":e.decoration.indexOf("fff")>=0?t="fff":e.decoration.indexOf("ffff")>=0&&(t="ffff"),t){var a=[N=n[t].slice(0)];Array.isArray(e.decoration)&&(a=[],e.decoration.forEach((function(e){a.push(n[e].slice(0))}))),B[W].push({el_type:"beat",beats:N.slice(0),volumesPerNotePitch:a}),L[U]=!1,O[U]=!1}if(e.decoration.indexOf("crescendo(")>=0){var s=r(K,re,"crescendo)"),o=Math.min(127,N[0]+50),c=i(K,re+s+1,Object.keys(n));c&&(o=n[c][0]),L[U]=s>0&&Math.floor((o-N[0])/s),O[U]=!1}else if(e.decoration.indexOf("crescendo)")>=0)L[U]=!1;else if(e.decoration.indexOf("diminuendo(")>=0){var l=r(K,re,"diminuendo)"),h=Math.max(15,N[0]-50),u=i(K,re+l+1,Object.keys(n));u&&(h=n[u][0]),L[U]=!1,O[U]=l>0&&Math.floor((h-N[0])/l)}else e.decoration.indexOf("diminuendo)")>=0&&(O[U]=!1)}},q=Y.staff,W=0,R=0;R=0?(B[W].push({el_type:"transpose",transpose:-12}),P[W]=!0):X.clef.type.indexOf("+8")>=0?(B[W].push({el_type:"transpose",transpose:12}),P[W]=!0):P[W]&&(B[W].push({el_type:"transpose",transpose:0}),P[W]=!1)),n.formatting.midi&&n.formatting.midi.drumoff&&(B[W].push({el_type:"bar"}),B[W].push({el_type:"drum",params:{pattern:"",on:!1}}));var J=0,Z=0,ee=0,te=0;N=[105,95,85,1];for(var re=0;re=0?B[W].push({el_type:"transpose",transpose:-12}):ne.type.indexOf("+8")>=0&&B[W].push({el_type:"transpose",transpose:12}));break;case"tempo":p=c(ne,n.getBeatLength()),B[W].push({el_type:"tempo",qpm:p,timing:H[W]}),z[""+H[W]]={el_type:"tempo",qpm:p,timing:H[W]};break;case"bar":J>0&&B[W].push({el_type:"bar"}),G(ne),J=0;var oe="bar_right_repeat"===ne.type||"bar_dbl_repeat"===ne.type,ce="1"===ne.startEnding,le="bar_left_repeat"===ne.type||"bar_dbl_repeat"===ne.type||"bar_right_repeat"===ne.type;if(oe){var he=D[W];he||(he=0);var ue=F[W];ue||(ue=B[W].length);for(var de=he;de=0&&i!==t[""+o.timing].qpm&&(i=t[""+o.timing].qpm,"tempo"===o.el_type?(o.qpm=t[""+o.timing].qpm,s++):(e[n].splice(s,0,{el_type:"tempo",qpm:t[""+o.timing].qpm,timing:o.timing}),s+=2))}}(B,z),k)for(var me=n.getPickupLength(),ge=0;geve;)ve++;if(B[ge].length>ve){for(se=0;se0&&B[0].length>0&&(B[0][0].pickupLength=n.getPickupLength()),B}}(),e.exports=n},8702:function(e,t,r){var n=r(5281);e.exports=function(){return window.abcjsAudioContext||n(),window.abcjsAudioContext}},2710:function(e){e.exports=function(e){return Math.pow(2,e/1200)}},7207:function(e){var t=function(e,t,r,n){this.chordTrack=[],this.chordTrackFinished=!1,this.chordChannel=e,this.currentChords=[],this.lastChord,this.chordLastBar,this.chordsOff=!!t,this.gChordTacet=this.chordsOff,this.hasRhythmHead=!1,this.transpose=0,this.lastBarTime=0,this.meter=n,this.tempoChangeFactor=1,this.bassInstrument=r.bassprog&&r.bassprog.length>=1?r.bassprog[0]:0,this.chordInstrument=r.chordprog&&r.chordprog.length>=1?r.chordprog[0]:0,this.bassOctaveShift=r.bassprog&&2===r.bassprog.length?r.bassprog[1]:0,this.chordOctaveShift=r.chordprog&&2===r.chordprog.length?r.chordprog[1]:0,this.boomVolume=r.bassvol&&1===r.bassvol.length?r.bassvol[0]:64,this.chickVolume=r.chordvol&&1===r.chordvol.length?r.chordvol[0]:48,r.gchord&&r.gchord.length>0?this.overridePattern=a(r.gchord[0]):this.overridePattern=void 0};function r(e,t,r,a){var i=[];if(!e)return i;t.indexOf("boom")>=0?i.push(r?e.boom:e.boom2):a&&i.push(e.boom);var s=e.chick.length;if(t.indexOf("chick")>=0)for(var o=0;o0&&!this.chordTrackFinished&&(this.resolveChords(this.lastBarTime,i(e.time)),this.currentChords=[]),this.chordLastBar=this.lastChord},t.prototype.gChordOn=function(e){this.chordsOff||(this.gChordTacet=e.tacet)},t.prototype.paramChange=function(e){switch(e.el_type){case"gchord":e.param&&e.param.length>0?this.overridePattern=a(e.param):this.overridePattern=void 0;break;case"bassprog":this.bassInstrument=e.value,null!=e.octaveShift&&null!=e.octaveShift?this.bassOctaveShift=e.octaveShift:this.bassOctaveShift=0;break;case"chordprog":this.chordInstrument=e.value,null!=e.octaveShift&&null!=e.octaveShift?this.chordOctaveShift=e.octaveShift:this.chordOctaveShift=0;break;case"bassvol":this.boomVolume=e.param;break;case"chordvol":this.chickVolume=e.param;break;default:console.log("unhandled midi param",e)}},t.prototype.finish=function(){this.chordTrackEmpty()||(this.chordTrackFinished=!0)},t.prototype.addTrack=function(e){this.chordTrackEmpty()||e.push(this.chordTrack)},t.prototype.findChord=function(e){if(this.gChordTacet)return"break";if(this.chordTrackFinished||!e.chord||0===e.chord.length)return null;for(var t=0;t=0)return"break"}return null},t.prototype.interpretChord=function(e){if(0!==e.length){if("break"===e)return{chick:[]};var t=e.substring(0,1);if("("===t){if(0===(e=e.substring(1,e.length-1)).length)return;t=e.substring(0,1)}var r=this.basses[t];if(r){for(var n=this.transpose;n<-8;)n+=12;for(;n>8;)n-=12;(r+=n)<33?r+=12:r>44&&(r-=12);var a,i=r,s=(r+=12*this.bassOctaveShift)-5;1===e.length&&(a=this.chordNotes(r,""));var o=e.substring(1),c=o.substring(0,1);"b"===c||"♭"===c?(i--,r--,s--,o=o.substring(1)):"#"!==c&&"♯"!==c||(i++,r++,s++,o=o.substring(1));var l=o.split("/");if((a=this.chordNotes(i,l[0])).length>=3&&(s=s+(a[2]-a[0])-7),2===l.length&&this.basses[l[1].substring(0,1)]){var h={"#":1,"♯":1,b:-1,"♭":-1}[l[1].substring(1)]||0;r=this.basses[l[1].substring(0,1)]+h+n,s=r+=12*this.bassOctaveShift}return{boom:r,boom2:s,chick:a}}}},t.prototype.chordNotes=function(e,t){var r=this.chordIntervals[t];r||(r="ma"===t.slice(0,2).toLowerCase()||"M"===t[0]?this.chordIntervals.M:"m"===t[0]||"-"===t[0]?this.chordIntervals.m:this.chordIntervals.M),e+=12,e+=12*this.chordOctaveShift;for(var n=[],a=0;a0&&c[u-1]&&c[u]&&c[u-1].boom!==c[u].boom&&(d=!0);var p=l[u],m=p.indexOf("boom")>=0,g=!m&&0!==u&&l[0].indexOf("boom")>=0&&(!c[u-1]||c[u-1].boom!==c[u].boom),v=r(c[u],p,d,g);m&&(d=!1);for(var b=0;b0){var s=e.gap?e.gap:0,o=e.duration;s=Math.min(s,2*o/3);var c={pitch:e.pitch,instrument:i,start:Math.round(1e6*e.start)/1e6,end:Math.round(1e6*(e.start+o-s))/1e6,volume:e.volume};e.startChar&&(c.startChar=e.startChar),e.endChar&&(c.endChar=e.endChar),e.style&&(c.style=e.style),e.cents&&(c.cents=e.cents),t[r].push(c)}break;case"program":a=n[e.instrument];break;case"text":break;default:console.log("Unhandled midi event",e)}}))})),t}},6313:function(e,t,r){var n=r(5049),a=r(5281),i=r(8702),s=r(1225),o=r(9733),c=r(5075),l=r(5343),h=r(6987);function u(e,t,r,s,o){var c=!0;if(i()?c="suspended"===i().state:a(),!n())throw{status:"NotSupported",message:"This browser does not support audio."};(c||o)&&r&&r.classList.add("abcjs-loading"),c?i().resume().then((function(){s?s().then((function(n){d(e,t,r,o)})):d(e,t,r,o)})):d(e,t,r,o)}function d(e,t,r,n){n?e(t).then((function(){r&&r.classList.remove("abcjs-loading")})):(e(t),r&&r.classList.remove("abcjs-loading"))}e.exports=function(e,t){var r=this;if("string"==typeof e){var n=e;if(!(e=document.querySelector(n)))throw new Error('Cannot find element "'+n+'" in the DOM.')}else if(!(e instanceof HTMLElement))throw new Error("The first parameter must be a valid element or selector in the DOM.");if(r.parent=e,r.options={},t&&(r.options=Object.assign({},t)),r.options.ac&&a(r.options.ac),function(e,t){var r=!!t.loopHandler,n=!!t.restartHandler,a=!!t.playHandler||!!t.playPromiseHandler,i=!!t.progressHandler,u=!!t.warpHandler,d=!1!==t.hasClock,f='
\n';if(r){var p=t.repeatTitle?t.repeatTitle:"Click to toggle play once/repeat.";f+='\n"}if(n){var m=t.restartTitle?t.restartTitle:"Click to go to beginning.";f+='\n"}if(a){var g=t.playTitle?t.playTitle:"Click to play/pause.";f+='\n"}if(i){var v=t.randomTitle?t.randomTitle:"Click to change the playback position.";f+='\n'}if(d&&(f+='\n'),u){var b=t.warpTitle?t.warpTitle:"Change the playback speed.";f+=' ( '+(t.bpm?t.bpm:"BPM")+")\n"}f+='
CSS required: load abcjs-audio.css
',f+="
\n",e.innerHTML=f}(r.parent,r.options),function(e){var t=!!e.options.loopHandler,r=!!e.options.restartHandler,n=!!e.options.playHandler||!!e.options.playPromiseHandler,a=!!e.options.progressHandler,i=!!e.options.warpHandler,s=e.parent.querySelector(".abcjs-midi-start");t&&e.parent.querySelector(".abcjs-midi-loop").addEventListener("click",(function(t){u(e.options.loopHandler,t,s,e.options.afterResume)})),r&&e.parent.querySelector(".abcjs-midi-reset").addEventListener("click",(function(t){u(e.options.restartHandler,t,s,e.options.afterResume)})),n&&s.addEventListener("click",(function(t){u(e.options.playPromiseHandler||e.options.playHandler,t,s,e.options.afterResume,!!e.options.playPromiseHandler)})),a&&e.parent.querySelector(".abcjs-midi-progress-background").addEventListener("click",(function(t){u(e.options.progressHandler,t,s,e.options.afterResume)})),i&&e.parent.querySelector(".abcjs-midi-tempo").addEventListener("change",(function(t){u(e.options.warpHandler,t,s,e.options.afterResume)}))}(r),r.disable=function(e){var t=r.parent.querySelector(".abcjs-inline-audio");e?t.classList.add("abcjs-disabled"):t.classList.remove("abcjs-disabled")},r.setWarp=function(e,t){r.parent.querySelector(".abcjs-midi-tempo").value=Math.round(t),r.setTempo(e)},r.setTempo=function(e){var t=r.parent.querySelector(".abcjs-midi-current-tempo");t&&(t.innerHTML=Math.round(e))},r.resetAll=function(){for(var e=r.parent.querySelectorAll(".abcjs-pushed"),t=0;t0){if(e.debugCallback&&e.debugCallback("pending "+JSON.stringify(l)),i?i*=2:i=50,i<9e4)return new Promise((function(t,n){setTimeout((function(){var s=[];for(u=0;u0?e.audioBuffers[0].duration:0;return{status:s().state,duration:t}},o=s().currentTime,c=e.millisecondsPerMeasure/1e3/e.meterSize;if(e.duration=e.flattened.totalDuration*c,e.duration<=0)return e.audioBuffers=[],r({status:"empty",seconds:0});e.duration+=t;var l=Math.floor(s().sampleRate*e.duration);e.stop();var h=a(e.flattened);e.options.swing&&function(e,t,r,n){if(!(4!=r.den&&8!=r.den||(t=parseFloat(t),isNaN(t)||t<=50))){t>75&&(t=75),t=t/50-1;var a=0,i=.25;8===r.den&&(i/=2);for(var s=i/2,o=s*t,c=0;c=l[h].start+s)){var d=u.start;u.start+=o,u.volume*=1+a,h>0&&l[h-1].end==d&&(l[h-1].end=u.start,l[h-1].volume*=1-a)}}}}(h,e.options.swing,e.meterFraction,e.pickupLength),e.sequenceCallback&&e.sequenceCallback(h,e.callbackContext);var d=function(e,t){if(null==t)return null;var r=[];if(t.length){for(var n=0;n1&&(a=1),r.push(a)}else r.push(0);return r}var i=parseFloat(t);if(i*(e-1)>2)return null;for(var s=e%2==0,o=s?0-i/2:0,c=o+i,l=0;lr?d[r]:0;t.forEach((function(t){var r=t.instrument+":"+t.pitch+":"+t.volume+":"+Math.round(1e3*(t.end-t.start))/1e3+":"+n+":"+c+":"+(t.cents?t.cents:0);e.debugCallback&&e.debugCallback("noteMapTrack "+r),f[r]||(f[r]=[]),f[r].push(t.start)}))}));for(var p=[],m=s().createBuffer(2,l,s().sampleRate),g=0;g';t.preTextDownload&&(i+=t.preTextDownload);var s,o,c=e.metaText&&e.metaText.title?e.metaText.title:"Untitled";return s=t.downloadLabel&&(o=t.downloadLabel)&&"[object Function]"==={}.toString.call(o)?t.downloadLabel(e,n):t.downloadLabel?t.downloadLabel.replace(/%T/,c):'Download MIDI for "'+c+'"',c=c.toLowerCase().replace(/'/g,"").replace(/\W/g,"_").replace(/__/g,"_"),i+=''+s+"",t.postTextDownload&&(i+=t.postTextDownload),i+"

"};e.exports=function(e,t){var r={};if(t)for(var s in t)t.hasOwnProperty(s)&&(r[s]=t[s]);function o(e,t,n){var s=a(t,r);switch(r.midiOutputType){case"encoded":return s;case"binary":var o=s.replace("data:audio/midi,","");o=(o=o.replace(/MThd/g,"%4d%54%68%64")).replace(/MTrk/g,"%4d%54%72%6b");for(var c=new ArrayBuffer(o.length/3),l=new Uint8Array(c),h=0;h4)for(a=a.toLowerCase(),t-=5;t>0;)a+="'",t--;else for(;t<4;)a+=",",t++;return a}}},522:function(e){e.exports={21:"A0",22:"Bb0",23:"B0",24:"C1",25:"Db1",26:"D1",27:"Eb1",28:"E1",29:"F1",30:"Gb1",31:"G1",32:"Ab1",33:"A1",34:"Bb1",35:"B1",36:"C2",37:"Db2",38:"D2",39:"Eb2",40:"E2",41:"F2",42:"Gb2",43:"G2",44:"Ab2",45:"A2",46:"Bb2",47:"B2",48:"C3",49:"Db3",50:"D3",51:"Eb3",52:"E3",53:"F3",54:"Gb3",55:"G3",56:"Ab3",57:"A3",58:"Bb3",59:"B3",60:"C4",61:"Db4",62:"D4",63:"Eb4",64:"E4",65:"F4",66:"Gb4",67:"G4",68:"Ab4",69:"A4",70:"Bb4",71:"B4",72:"C5",73:"Db5",74:"D5",75:"Eb5",76:"E5",77:"F5",78:"Gb5",79:"G5",80:"Ab5",81:"A5",82:"Bb5",83:"B5",84:"C6",85:"Db6",86:"D6",87:"Eb6",88:"E6",89:"F6",90:"Gb6",91:"G6",92:"Ab6",93:"A6",94:"Bb6",95:"B6",96:"C7",97:"Db7",98:"D7",99:"Eb7",100:"E7",101:"F7",102:"Gb7",103:"G7",104:"Ab7",105:"A7",106:"Bb7",107:"B7",108:"C8",109:"Db8",110:"D8",111:"Eb8",112:"E8",113:"F8",114:"Gb8",115:"G8",116:"Ab8",117:"A8",118:"Bb8",119:"B8",120:"C9",121:"Db9"}},5058:function(e){var t={f0:"_C",n0:"=C",s0:"^C",x0:"C",f1:"_D",n1:"=D",s1:"^D",x1:"D",f2:"_E",n2:"=E",s2:"^E",x2:"E",f3:"_F",n3:"=F",s3:"^F",x3:"F",f4:"_G",n4:"=G",s4:"^G",x4:"G",f5:"_A",n5:"=A",s5:"^A",x5:"A",f6:"_B",n6:"=B",s6:"^B",x6:"B",f7:"_c",n7:"=c",s7:"^c",x7:"c",f8:"_d",n8:"=d",s8:"^d",x8:"d",f9:"_e",n9:"=e",s9:"^e",x9:"e",f10:"_f",n10:"=f",s10:"^f",x10:"f",f11:"_g",n11:"=g",s11:"^g",x11:"g",f12:"_a",n12:"=a",s12:"^a",x12:"a",f13:"_b",n13:"=b",s13:"^b",x13:"b",f14:"_c'",n14:"=c'",s14:"^c'",x14:"c'",f15:"_d'",n15:"=d'",s15:"^d'",x15:"d'",f16:"_e'",n16:"=e'",s16:"^e'",x16:"e'"};e.exports=function(e){var r=(e.accidental?e.accidental[0]:"x")+e.verticalPos;return t[r]}},4586:function(e,t,r){var n=r(4771),a=r(522),i=r(2710),s=function(e,t,r){for(var n=0;n<2;n++)for(var a=t.getChannelData(n),i=e.getChannelData(n),s=0;s=1&&parseInt(e.cursorControl.beatSubdivisions,10)<=64&&(r=parseInt(e.cursorControl.beatSubdivisions,10)),e.timer=new i(e.visualObj,{beatCallback:e.beatCallback,eventCallback:e.eventCallback,lineEndCallback:e.lineEndCallback,qpm:e.currentTempo,extraMeasuresAtBeginning:e.cursorControl?e.cursorControl.extraMeasuresAtBeginning:void 0,lineEndAnticipation:e.cursorControl?e.cursorControl.lineEndAnticipation:0,beatSubdivisions:r}),e.cursorControl&&e.cursorControl.onReady&&"function"==typeof e.cursorControl.onReady&&e.cursorControl.onReady(e),e.isLoaded=!0,e.isLoading=!1,Promise.resolve({status:"created",notesStatus:t})}))},e.destroy=function(){e.timer&&(e.timer.reset(),e.timer.stop(),e.timer=null),e.midiBuffer&&(e.midiBuffer.stop(),e.midiBuffer=null),e.setProgress(0,1),e.control&&e.control.resetAll()},e.play=function(){return e.runWhenReady(e._play,void 0)},e.runWhenReady=function(t,r){return e.visualObj?e.isLoading?(n=500,new Promise((function(e){setTimeout(e,n)}))).then((function(){return e.isLoading?e.runWhenReady(t,r):t(r)})):e.isLoaded?t(r):e.go().then((function(){return t(r)})):Promise.resolve({status:"loading"});var n},e._play=function(){return s().resume().then((function(){return e.isStarted=!e.isStarted,e.isStarted?(e.cursorControl&&e.cursorControl.onStart&&"function"==typeof e.cursorControl.onStart&&e.cursorControl.onStart(),e.midiBuffer.start(),e.timer.start(e.percent),e.control&&e.control.pushPlay(!0)):e.pause(),Promise.resolve({status:"ok"})}))},e.pause=function(){e.timer&&(e.timer.pause(),e.midiBuffer.pause(),e.control&&e.control.pushPlay(!1))},e.toggleLoop=function(){e.isLooping=!e.isLooping,e.control&&e.control.pushLoop(e.isLooping)},e.restart=function(){e.timer&&(e.timer.setProgress(0),e.midiBuffer.seek(0))},e.randomAccess=function(t){return e.runWhenReady(e._randomAccess,t)},e._randomAccess=function(t){var r=t.target.classList.contains("abcjs-midi-progress-indicator")?t.target.parentNode:t.target,n=(t.x-r.getBoundingClientRect().left)/r.offsetWidth;return n<0&&(n=0),n>1&&(n=1),e.seek(n),Promise.resolve({status:"ok"})},e.seek=function(t,r){e.timer&&e.midiBuffer&&(e.timer.setProgress(t,r),e.midiBuffer.seek(t,r))},e.setWarp=function(t){if(parseInt(t,10)>0){e.warp=parseInt(t,10);var r=e.isStarted,n=e.percent;return e.destroy(),e.isStarted=!1,e.go().then((function(){return e.setProgress(n,1e3*e.midiBuffer.duration),e.control&&e.control.setWarp(e.currentTempo,e.warp),r?e.play().then((function(){return e.seek(n),Promise.resolve()})):(e.seek(n),Promise.resolve())}))}return Promise.resolve()},e.onWarp=function(t){var r=t.target.value;return e.setWarp(r)},e.setProgress=function(t,r){e.percent=t,e.control&&e.control.setProgress(t,r)},e.finished=function(){if(e.timer.reset(),e.isLooping)return e.timer.start(0),e.midiBuffer.finished(),e.midiBuffer.start(),"continue";e.timer.stop(),e.isStarted&&(e.control&&e.control.pushPlay(!1),e.isStarted=!1,e.midiBuffer.finished(),e.cursorControl&&e.cursorControl.onFinished&&"function"==typeof e.cursorControl.onFinished&&e.cursorControl.onFinished(),e.setProgress(0,1))},e.beatCallback=function(t,r,n,a){var i=t/r;e.setProgress(i,n),e.cursorControl&&e.cursorControl.onBeat&&"function"==typeof e.cursorControl.onBeat&&e.cursorControl.onBeat(t,r,n,a)},e.eventCallback=function(t){if(!t)return e.finished();e.cursorControl&&e.cursorControl.onEvent&&"function"==typeof e.cursorControl.onEvent&&e.cursorControl.onEvent(t)},e.lineEndCallback=function(t,r){e.cursorControl&&e.cursorControl.onLineEnd&&"function"==typeof e.cursorControl.onLineEnd&&e.cursorControl.onLineEnd(t,r)},e.getUrl=function(){return e.midiBuffer.download()},e.download=function(t){var r=e.getUrl(),n=document.createElement("a");document.body.appendChild(n),n.setAttribute("style","display: none;"),n.href=r,n.download=t||"output.wav",n.click(),window.URL.revokeObjectURL(r),document.body.removeChild(n)}}},2029:function(e){e.exports=function(){var e=this;e.tracks=[],e.totalDuration=0,e.currentInstrument=[],e.starts=[],e.addTrack=function(){return e.tracks.push([]),e.currentInstrument.push(0),e.starts.push(0),e.tracks.length-1},e.setInstrument=function(t,r){e.tracks[t].push({channel:0,cmd:"program",instrument:r}),e.currentInstrument[t]=r},e.appendNote=function(t,r,n,a,i){var s={cmd:"note",duration:n,gap:0,instrument:e.currentInstrument[t],pitch:r,start:e.starts[t],volume:a};i&&(s.cents=i),e.tracks[t].push(s),e.starts[t]+=n,e.totalDuration=Math.max(e.totalDuration,e.starts[t])}}},2426:function(e,t,r){var n=r(6074),a={violin:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},fiddle:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},mandolin:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},guitar:{name:"StringTab",defaultTuning:["E,","A,","D","G","B","e"],isTabBig:!0,tabSymbolOffset:0},fiveString:{name:"StringTab",defaultTuning:["C,","G,","D","A","e"],isTabBig:!1,tabSymbolOffset:-.95}},i={inited:!1,plugins:{},register:function(e){var t=e.name,r=e.tablature;this.plugins[t]=r},setError:function(e,t){e.warnings?e.warning.push(t):e.warnings=[t]},preparePlugins:function(e,t,r){this.inited||(this.register(new n),this.inited=!0);var i=null;if(r.tablature){var s=r.tablature;i=[];for(var o=0;o0)for(var a=r.length,i=0;i1&&r&&r.length>0)for(a=r.length,i=0;i=0;n--)if(t.pitch+t.pitchAltered>=e.stringPitches[n]){var a=t.pitch+t.pitchAltered-e.stringPitches[n];return"^"===t.quarter?a-=.5:"v"===t.quarter&&(a+=.5),{num:Math.round(a),str:e.stringPitches.length-1-n,note:t}}return{num:"?",str:e.stringPitches.length-1,note:t}}function l(e,t){var r={num:"?",str:0,note:t};e.push(r),e.error=t.emit()+": unexpected note for instrument"}function h(e){var t=e.tuning,r=e.capo,s=e.params.highestNote;this.linePitch=e.linePitch,this.highestNote="a'",s&&(this.highestNote=s),this.measureAccidentals={},this.capo=0,r&&(this.capo=parseInt(r,10)),this.transpose=e.transpose?e.transpose:0,this.tuning=t,this.stringPitches=[];for(var o=0;o0&&(this.capoTuning=function(e){var t=null,r=e.tuning;if(e.capo>0){t=[];for(var n=0;n0&&(r=e.capoTuning);for(var n=r.length-1,a=0;a1?(o=s(this,e)).error&&(i=o.error):e[0].endTie||((r=new a(e[0].name,this.clefTranspose)).checkKeyAccidentals(this.accidentals,this.measureAccidentals),(n=c(this,r))?o.push(n):(l(o,r),i=o.error))),i)return o;var h=null;if(t){h=[];for(var u=0;u0&&(r+=" capo:"+e.capo),t=t.replace("%T",r)),t}return""},h.prototype.suppress=function(e){return!!e.params.suppress},e.exports=h},8918:function(e){function t(e,t){this.numLines=e,this.lineSpace=t,this.verticalSize=this.numLines*this.lineSpace,this.bar={pitch:3,pitch2:t*e,height:5}}t.prototype.bypass=function(e){var t=e.staffGroup.voices;return!!(t.length>0&&t[0].isPercussion)},t.prototype.setRelative=function(e,t,r){switch(e.type){case"bar":t.pitch=this.bar.pitch,t.pitch2=this.bar.pitch2,t.height=this.height;break;case"symbol":var n=this.bar.pitch2/2;if("dots.dot"==e.name)return r?(t.pitch=n,!1):(t.pitch=n+this.lineSpace,!0)}return r},e.exports=t},6776:function(e,t,r){var n=r(2842),a=n.noteToMidi,i=n.midiToNote;function s(e,t){var r=a(e);t&&(r+=t);var n,s=i(r),o=!1,c=!1,l=null,h=null,u=!1,d=0;e.startsWith("_")?(o=!0,d=-1,"/"==e[1]?(o=!1,h="v",d=0):"_"==e[1]&&(u=!0,d-=1)):e.startsWith("^")?(c=!0,d=1,"/"==e[1]?(c=!1,h="^",d=0):"^"==e[1]&&(u=!0,d+=1)):e.startsWith("=")&&(l=!0,d=0),((n=o||c||null!=h)||l)&&(s=null!=h||u?e.slice(2):e.slice(1));var f=(s.match(/,/g)||[]).length,p=(s.match(/'/g)||[]).length;this.pitch=r,this.pitchAltered=0,this.name=s,this.acc=d,this.isSharp=c,this.isKeySharp=!1,this.isDouble=u,this.isAltered=n,this.isFlat=o,this.isKeyFlat=!1,this.natural=l,this.quarter=h,this.isLower=this.name==this.name.toLowerCase(),this.name=this.name[0].toUpperCase(),this.hasComma=f,this.isQuoted=p}s.prototype.sameNoteAs=function(e){return e.pitch===this.pitch},s.prototype.isLowerThan=function(e){return e.pitch>this.pitch},s.prototype.checkKeyAccidentals=function(e,t){if(!this.isAltered&&!this.natural)if(t[this.name.toUpperCase()])switch(t[this.name.toUpperCase()]){case"__":return this.acc=-2,void(this.pitchAltered=-2);case"_":return this.acc=-1,void(this.pitchAltered=-1);case"=":return this.acc=0,void(this.pitchAltered=0);case"^":return this.acc=1,void(this.pitchAltered=1);case"^^":return this.acc=2,void(this.pitchAltered=2)}else if(e)for(var r=this.name,n=0;n=0){if(r===t)return e.extra[n].x+e.extra[n].w/2;r++}return-1}function f(e){if(e.abcelem){var t=e.abcelem;if(t.rest)return t.gracenotes}return null}function p(e,t,r){var n=e.semantics.notesToNumber(t,r);if(n.error)return e.setError(n.error),n;if(n.graces&&n.notes){var a=n.notes.length-1;n.notes[a].graces=n.graces}return n}function m(e,t,r,n,a){for(var i=0;i=0&&(e.semantics.clefTranspose=-12),k.abcelem.type.indexOf("+8")>=0&&(e.semantics.clefTranspose=12)),k.type){case"staff-extra key-signature":this.accidentals=k.abcelem.accidentals,e.semantics.accidentals=this.accidentals;break;case"bar":e.semantics.measureAccidentals={};var T=!1;x===g.children.length-1&&(T=!0);var S=o(k,e);if(S.abcelem.barNumber){delete S.abcelem.barNumber;for(var _=0;_0&&(y.abselem=M,r.push(y),v.children.push(M))}}},e.exports=h},4785:function(e,t,r){var n=r(3197),a=r(4240),i=r(4331);function s(e,t,r){var n=e.semantics,a=t.controller.getTextSize,i=n.tabInfos(e),s=!0;if(n.suppress(e)&&(s=!1),s){var o=a.calc(i,"tablabelfont","text instrumentname");return r.tabNameInfos={textSize:{height:o.height,width:o.width},name:i},o.height}return 0}function o(e,t){return!(!t[e].isTabStaff||e!==t.length-1&&t[e+1].isTabStaff)}function c(e,t){for(var r=t;r>=0;r--)if(!e[r].isTabStaff)return r;return-1}function l(e,t){return"clef"===e[t].children[0].abcelem.el_type?null:0==t?"none":e[t-1].children[0]}e.exports=function(e,t,r,h){var u=new a,d={clef:{type:"TAB"}},f=e.linePitch*e.nbLines,p=r.staff;if(p){var m=p[0];if(m&&m.clef&&0==m.clef.stafflines)return void e.setError("No tablatures when stafflines=0");p.splice(p.length,0,d)}var g=r.staffGroup,v=g.voices,b=function(e){for(var t=0,r=0;rt&&(t=n.specialY.lyricHeightBelow)}return t}(v[0]),y=h,x=g.staffs[y],k=f+3-x.bottom-b;x.isTabStaff&&(k=x.top);var w={bottom:-1,isTabStaff:!0,specialY:{tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0},lines:e.nbLines,linePitch:e.linePitch,dy:.15,top:k},C=function(e,t){for(var r=0,n=0,a=0;;){if(!t[r])return-1;if(t[r].isTabStaff||(a=t[r].voices.length),t[r].isTabStaff){if(n++,o(r,t)&&n=e){if(r+1==t.length)return r+1;if(!t[r+1].isTabStaff)return r+1}if(++r>t.length)return-1}}(h,g.staffs);if(-1!==C){w.parentIndex=C-1,g.staffs.splice(C,0,w),g.height+=f+3;var T=function(e,t){for(var r=t;r>=0;r--)if(!e[r].isTabStaff)return e[r];return null}(g.staffs,C),S=1;(function(e,t){return 1===function(e){for(var t=0,r=0;r1})(g.staffs,T)&&(S=T.voices.length),d.voices=[];for(var _=0;_0&&(E.duplicate=!0);var M=s(e,t,E)/i.STEP;M=Math.max(M,1),g.staffs[h].top+=1,g.height+=M,E.staff=w;var A=v.length;v.splice(v.length,0,E);var N=l(v,_+h);d.voices[_]=[],u.build(e,v,d.voices[_],_,h,N,A)}!function(e){for(var t=0;t0&&(i[0].invisible=!0);break;case"meter":i[0]=l(a,this.tuneNumber),this.startlimitelem=i[0],r.duplicate&&i.length>0&&(i[0].invisible=!0);break;case"clef":if(i[0]=s(a,this.tuneNumber),!i[0])return null;r.duplicate&&i.length>0&&(i[0].invisible=!0);break;case"key":var h=o(a,this.tuneNumber);h&&(i[0]=h,this.startlimitelem=i[0]),r.duplicate&&i.length>0&&(i[0].invisible=!0);break;case"stem":this.stemdir="auto"===a.direction?void 0:a.direction;break;case"part":var u=new n(a,0,0,"part",this.tuneNumber),d=this.getTextSize.calc(a.title,"partsfont","part");u.addFixedX(new f(a.title,0,0,void 0,{type:"part",height:d.height/p.STEP})),i[0]=u;break;case"tempo":var m=new n(a,0,0,"tempo",this.tuneNumber);m.addFixedX(new g(a,this.tuneNumber,c)),i[0]=m;break;case"style":"normal"===a.head?delete this.style:this.style=a.head;break;case"hint":T=!0,this.saveState();break;case"midi":break;case"scale":this.voiceScale=a.size;break;case"color":this.voiceColor=a.color,r.color=this.voiceColor;break;default:var v=new n(a,0,0,"unsupported",this.tuneNumber);v.addFixed(new f("element type "+a.el_type,0,0,void 0,{type:"debug"})),i[0]=v}return i},_.prototype.createBeam=function(e,t,r){var n=[],i=new a(this.stemHeight*this.voiceScale,this.stemdir,this.flatBeams,r[0]);T&&i.setHint();for(var s=0;se.pitches[r+1].pitch){t=!1;var n=e.pitches[r];e.pitches[r]=e.pitches[r+1],e.pitches[r+1]=n}}while(!t)},N=function(e,t,r,n,a,i,s,o,c){for(var l=r;l>11;l--)l%2!=0||n||e.addFixed(new f(null,o,(a+4)*c,l,{type:"ledger"}));for(l=t;l<1;l++)l%2!=0||n||e.addFixed(new f(null,o,(a+4)*c,l,{type:"ledger"}));for(l=0;l1&&(p=new a(i,"grace",s),T&&p.setHint(),p.mainNote=r);var m=[];for(u=e.gracenotes.length-1;u>=0;u--)o+=10,m[u]=o,e.gracenotes[u].accidental&&(o+=7);for(u=0;u=6?"down":"up";for(n&&(_=n),(a=t.style?t.style:a)&&"normal"!==a||(a="note"),(m=i?S[a].nostem:S[a][-s])||console.log("noteSymbol:",a,s,i),g="down"===_?t.pitches.length-2:1;"down"===_?g>=0:g11||M.verticalPos<1)&&x.push(M.verticalPos-M.verticalPos%2),"down"===_?b=d.getSymbolWidth(m)+2:v=d.getSymbolWidth(m)+2)}var N=t.pitches.length;for(g=0;g0&&(h.bottom=h.bottom-1),e.addHead(h)),b+=z.accidentalshiftx,y=Math.max(y,z.dotshiftx)}if(H){var D=Math.round(70*this.voiceScale)/10,F="down"===_?t.minpitch-D:t.minpitch+1/3;F>6&&!n&&(F=6);var j="down"===_?t.maxpitch-1/3:t.maxpitch+D;j<6&&!n&&(j=6);var I="down"===_||0===e.heads.length?0:e.heads[0].w,V="down"===_?1:-1;h&&"noteheads.slash.quarter"===h.c&&("down"===_?j-=1:F+=1),h&&"noteheads.triangle.quarter"===h.c&&("down"===_?j-=.7:F-=1.2),e.addRight(new f(null,I,0,F,{type:"stem",pitch2:j,linewidth:V,bottom:F-1})),u=Math.min(F,j)}return{noteHead:h,roomTaken:b,roomTakenRight:y,min:u,additionalLedgers:x,dir:_,symbolWidth:T}},_.prototype.addLyric=function(e,t){var r="";t.lyric.forEach((function(e){var t=" "===e.divider?"":e.divider;r+=e.syllable+t+"\n"}));var n=this.getTextSize.calc(r,"vocalfont","lyric"),a=t.positioning?t.positioning.vocalPosition:"below";e.addCentered(new f(r,0,n.width,void 0,{type:"lyric",position:a,height:n.height/p.STEP,dim:this.getTextSize.attr("vocalfont","lyric")}))},_.prototype.createNote=function(e,t,r,a){var i,s=null,o=0,l=0,h=0,u=[],p=C(e),m=!1;0===p&&(m=!0,p=.25,t=!0);for(var g=Math.floor(Math.log(p)/Math.log(2)),v=0,y=Math.pow(2,g),k=y/2;y1,this.stemdir,r,g,this.voiceScale);s=M.noteHead,o=M.roomTaken,l=M.roomTakenRight}else{var A=this.addNoteToAbcElement(E,e,v,this.stemdir,this.style,m,g,t,a);void 0!==A.min&&(this.minY=Math.min(A.min,this.minY)),s=A.noteHead,o=A.roomTaken,l=A.roomTakenRight,u=A.additionalLedgers,i=A.dir,h=A.symbolWidth}if(void 0!==e.lyric&&this.addLyric(E,e),void 0!==e.gracenotes&&(o+=this.addGraceNotes(e,a,E,s,this.stemHeight*this.voiceScale,this.isBagpipes,o)),e.decoration){var B=t&&"up"!==i?Math.min(-3,E.bottom-6):E.bottom;this.decoration.createDecoration(a,e.decoration,E.top,s?s.w:0,E,o,i,B,e.positioning,this.hasVocals,this.accentAbove)}if(e.barNumber&&E.addFixed(new f(e.barNumber,-10,0,0,{type:"barNumber"})),N(E,e.minpitch,e.maxpitch,e.rest,h,u,i,-2,1),void 0!==e.chord){var P=x(this.getTextSize,E,e,o,l,h,this.jazzchords,this.germanAlphabet);o=P.roomTaken,l=P.roomTakenRight}return e.startTriplet&&(this.triplet=new b(e.startTriplet,s,{flatBeams:this.flatBeams})),e.endTriplet&&this.triplet&&this.triplet.setCloseAnchor(s),!this.triplet||e.startTriplet||e.endTriplet||e.rest&&"spacer"===e.rest.type||this.triplet.middleNote(s),E},_.prototype.addSlursAndTies=function(e,t,r,n,a,i){if(t.endTie&&this.ties.length>0){for(var s=!1,o=0;o10&&"treble"===t.abcelem.type?13.5:11;t.addFixed(new f(e,n,r.width,a+r.height/p.STEP,{type:"barNumber",dim:this.getTextSize.attr("measurefont","bar-number")}))},_.prototype.createBarLine=function(e,t,r){var a=new n(t,0,10,"bar",this.tuneNumber),i=null,s=0;t.barNumber&&this.addMeasureNumber(t.barNumber,a);var o="bar_right_repeat"===t.type||"bar_dbl_repeat"===t.type,c="bar_left_repeat"!==t.type&&"bar_thick_thin"!==t.type&&"bar_invisible"!==t.type,l="bar_right_repeat"===t.type||"bar_dbl_repeat"===t.type||"bar_left_repeat"===t.type||"bar_thin_thick"===t.type||"bar_thick_thin"===t.type,h="bar_left_repeat"===t.type||"bar_thick_thin"===t.type||"bar_thin_thin"===t.type||"bar_dbl_repeat"===t.type,d="bar_left_repeat"===t.type||"bar_dbl_repeat"===t.type;if(o||d){for(var p in this.slurs)this.slurs.hasOwnProperty(p)&&this.slurs[p].setEndX(a);this.startlimitelem=a}if(o&&(a.addRight(new f("dots.dot",s,1,7)),a.addRight(new f("dots.dot",s,1,5)),s+=6),c&&(i=new f(null,s,1,2,{type:"bar",pitch2:10,linewidth:.6}),a.addRight(i)),"bar_invisible"===t.type&&(i=new f(null,s,1,2,{type:"none",pitch2:10,linewidth:.6}),a.addRight(i)),t.decoration&&this.decoration.createDecoration(e,t.decoration,12,l?3:1,a,0,"down",2,t.positioning,this.hasVocals,this.accentAbove),l&&(i=new f(null,s+=4,4,2,{type:"bar",pitch2:10,linewidth:4}),a.addRight(i),s+=5),this.partstartelem&&t.endEnding&&(this.partstartelem.anchor2=i,this.partstartelem=null),h&&(i=new f(null,s+=3,1,2,{type:"bar",pitch2:10,linewidth:.6}),a.addRight(i)),d&&(s+=3,a.addRight(new f("dots.dot",s,1,7)),a.addRight(new f("dots.dot",s,1,5))),t.startEnding&&r&&0===e.voicenumber){var m=this.getTextSize.calc(t.startEnding,"repeatfont","").width;a.minspacing+=m+10,this.partstartelem=new u(t.startEnding,i,null),e.addOther(this.partstartelem)}return a.extraw-=5,void 0!==t.chord&&x(this.getTextSize,a,t,0,0,0,!1,this.germanAlphabet),a},e.exports=_},2652:function(e,t,r){var n=r(6658),a=r(4331),i=r(5810);function s(e,t,r,s,o,c,l,h,u,d,f,p,m,g,v){for(var b=e.split("\n"),y=b.length-1;y>=0;y--){var x,k=b[y],w=0;s||(k=i(k,g,v));var C=h.calc(k,o,c),T=C.width,S=C.height/a.STEP;switch(t){case"left":w=-(f+=T+7),x=d.averagepitch,u.addExtra(new n(k,w,T+4,x,{type:"text",height:S,dim:l,position:"left"}));break;case"right":w=p+=4,x=d.averagepitch,u.addRight(new n(k,w,T+4,x,{type:"text",height:S,dim:l,position:"right"}));break;case"below":u.addRight(new n(k,0,0,void 0,{type:"text",position:"below",height:S,dim:l,realWidth:T}));break;case"above":u.addRight(new n(k,0,0,void 0,{type:"text",position:"above",height:S,dim:l,realWidth:T}));break;default:if(r){var _=r.y+3*a.STEP;u.addRight(new n(k,w+r.x,0,d.minpitch+_/a.STEP,{position:"relative",type:"text",height:S,dim:l}))}else{var E="above";d.positioning&&d.positioning.chordPosition&&(E=d.positioning.chordPosition),"hidden"!==E&&u.addCentered(new n(k,m/2,T,void 0,{type:"chord",position:E,height:S,dim:l,realWidth:T}))}}}return{roomTaken:f,roomTakenRight:p}}e.exports=function(e,t,r,n,a,i,o,c){for(var l=0;l0?o.top+3:o.bottom-1,f=s>0?o.top+3:o.bottom-3,p=f-2;"bass-8"===e.type&&(d=3,u=0),o.addRight(new i("8",5+u,a.getSymbolWidth("8")*h,d,{scalex:h,scaley:h,top:f,bottom:p}))}}return o}},3923:function(e,t,r){var n=r(1409),a=r(6020),i=r(6658);e.exports=function(e,t){if(e.el_type="keySignature",!e.accidentals||0===e.accidentals.length)return null;var r=new n(e,0,10,"staff-extra key-signature",t);r.isKeySig=!0;var s=0;return e.accidentals.forEach((function(e){var t,n=0;switch(e.acc){case"sharp":t="accidentals.sharp",n=-3;break;case"natural":t="accidentals.nat";break;case"flat":t="accidentals.flat",n=-1.2;break;case"quartersharp":t="accidentals.halfsharp",n=-2.5;break;case"quarterflat":t="accidentals.halfflat",n=-1.2;break;default:t="accidentals.flat"}r.addRight(new i(t,s,a.getSymbolWidth(t),e.verticalPos,{thickness:a.symbolHeightInPitches(t),top:e.verticalPos+a.symbolHeightInPitches(t)+n,bottom:e.verticalPos+n})),s+=a.getSymbolWidth(t)+2}),this),r}},2143:function(e,t,r){var n=r(6020),a=r(6658);e.exports=function(e,t,r,i){i||(i={});var s,o=void 0!==i.dir?i.dir:null,c=void 0!==i.headx?i.headx:0,l=void 0!==i.extrax?i.extrax:0,h=void 0!==i.flag?i.flag:null,u=void 0!==i.dot?i.dot:0,d=void 0!==i.dotshiftx?i.dotshiftx:0,f=void 0!==i.scale?i.scale:1,p=void 0!==i.accidentalSlot?i.accidentalSlot:[],m=void 0!==i.shouldExtendStem&&i.shouldExtendStem,g=void 0===i.printAccidentals||i.printAccidentals,v=r.verticalPos,b=0,y=0,x=0;if(void 0===t)e.addFixed(new a("pitch is undefined",0,0,0,{type:"debug"}));else if(""===t)s=new a(null,0,0,v);else{var k=c;if(r.printer_shift){var w="same"===r.printer_shift?1:0;k="down"===o?-n.getSymbolWidth(t)*f+w:n.getSymbolWidth(t)*f-w}var C={scalex:f,scaley:f,thickness:n.symbolHeightInPitches(t)*f,name:r.name};if((s=new a(t,k,n.getSymbolWidth(t)*f,v,C)).stemDir=o,h){var T=v+("down"===o?-7:7)*f;m&&("down"===o&&T>6&&(T=6),"up"===o&&T<6&&(T=6));var S="down"===o?c:c+s.w-.6;e.addRight(new a(h,S,n.getSymbolWidth(h)*f,T,{scalex:f,scaley:f}))}for(y=s.w+d-2+5*u;u>0;u--){var _=1-Math.abs(v)%2;e.addRight(new a("dots.dot",s.w+d-2+5*u,n.getSymbolWidth("dots.dot"),v+_))}}if(s&&(s.highestVert=r.highestVert),g&&r.accidental){var E;switch(r.accidental){case"quartersharp":E="accidentals.halfsharp";break;case"dblsharp":E="accidentals.dblsharp";break;case"sharp":E="accidentals.sharp";break;case"quarterflat":E="accidentals.halfflat";break;case"flat":E="accidentals.flat";break;case"dblflat":E="accidentals.dblflat";break;case"natural":E="accidentals.nat"}for(var M=!1,A=l,N=0;N=6){p[N][0]=v,A=p[N][1],M=!0;break}!1===M&&(A-=n.getSymbolWidth(E)*f+2,p.push([v,A]),b=n.getSymbolWidth(E)*f+2);var B=n.symbolHeightInPitches(E);e.addExtra(new a(E,A,n.getSymbolWidth(E),v,{scalex:f,scaley:f,top:v+B/2,bottom:v-B/2})),x=n.getSymbolWidth(E)/2}return{notehead:s,accidentalshiftx:b,dotshiftx:y,extraLeft:x}}},2525:function(e,t,r){var n=r(1409),a=r(6020),i=r(6658);e.exports=function(e,t){e.el_type="timeSignature";var r=new n(e,0,10,"staff-extra time-signature",t);if("specified"===e.type)for(var s=0,o=0;o",n)),o&&e.addOther(new a(o.start,o.stop,"<",n)),c&&e.addOther(new i(c.start,c.stop))},l.prototype.createDecoration=function(e,t,r,a,i,l,u,d,f,p,m){f||(f={ornamentPosition:"above",volumePosition:p?"above":"below",dynamicPosition:p?"above":"below"}),function(e,t,r,a){for(var i=0;i9&&d++;var m=n/2;"center"!==s.getSymbolAlign(p)&&(m-=s.getSymbolWidth(p)/2),a.addFixedX(new o(p,m,s.getSymbolWidth(p),d))}if("slide"===t[f]&&a.heads[0]){var g=a.heads[0].pitch,v=new o("",-i-15,0,(g-=2)-1),b=new o("",-i-5,0,g+1);a.addFixedX(v),a.addFixedX(b),e.addOther(new c({anchor1:v,anchor2:b,fixedY:!0}))}}return void 0===d&&(d=r),{above:d,below:a.bottom}}(e,t,r,a,i,l,u,d,m);g.above=Math.max(g.above,this.minTop),g.below=Math.min(g.below,d),function(e,t,r,n,a,i,c,l){function h(e,t){"above"===e?n.above+=t:n.below-=t}function u(e){var t;return"above"===e?(t=n.above)c&&(t=c),t}function d(e,n,a){var i=u(n);r.addFixedX(new o(e,t/2,0,i+2,{type:"decoration",klass:"ornament",thickness:3,anchor:a})),h(n,5)}function f(e,n){var a=t/2;"center"!==s.getSymbolAlign(e)&&(a-=s.getSymbolWidth(e)/2);var i=s.symbolHeightInPitches(e)+1,c=u(n);c="above"===n?c+i/2:c-i/2,r.addFixedX(new o(e,a,s.getSymbolWidth(e),c,{klass:"ornament",thickness:s.symbolHeightInPitches(e),position:n})),h(n,i)}for(var p={"+":"scripts.stopped",open:"scripts.open",snap:"scripts.snap",wedge:"scripts.wedge",thumb:"scripts.thumb",shortphrase:"scripts.shortphrase",mediumphrase:"scripts.mediumphrase",longphrase:"scripts.longphrase",trill:"scripts.trill",trillh:"scripts.trill",roll:"scripts.roll",irishroll:"scripts.roll",marcato:"scripts.umarcato",dmarcato:"scripts.dmarcato",umarcato:"scripts.umarcato",turn:"scripts.turn",uppermordent:"scripts.prall",pralltriller:"scripts.prall",mordent:"scripts.mordent",lowermordent:"scripts.mordent",downbow:"scripts.downbow",upbow:"scripts.upbow",fermata:"scripts.ufermata",invertedfermata:"scripts.dfermata",breath:",",coda:"scripts.coda",segno:"scripts.segno"},m=0;mthis.w&&(this.w=e.dx+e.w),this.right[this.right.length]=e,this._addChild(e)},i.prototype.addFixed=function(e){this._addChild(e)},i.prototype.addFixedX=function(e){this._addChild(e)},i.prototype.addCentered=function(e){var t=e.w/2;-tthis.w&&(this.w=e.dx+t),this.right[this.right.length]=e,this._addChild(e)},i.prototype.setLimit=function(e,t){t[e]&&(this.specialY[e]?this.specialY[e]=Math.max(this.specialY[e],t[e]):this.specialY[e]=t[e])},i.prototype._addChild=function(e){var t=!0;"clef"==this.abcelem.el_type&&"barNumber"==e.type&&(t=!1),e.parent=this,this.children[this.children.length]=e,t&&this.pushTop(e.top),this.pushBottom(e.bottom),this.setLimit("tempoHeightAbove",e),this.setLimit("partHeightAbove",e),this.setLimit("volumeHeightAbove",e),this.setLimit("dynamicHeightAbove",e),this.setLimit("endingHeightAbove",e),this.setLimit("chordHeightAbove",e),this.setLimit("lyricHeightAbove",e),this.setLimit("lyricHeightBelow",e),this.setLimit("chordHeightBelow",e),this.setLimit("volumeHeightBelow",e),this.setLimit("dynamicHeightBelow",e)},i.prototype.pushTop=function(e){void 0!==e&&(void 0===this.top?this.top=e:this.top=Math.max(e,this.top))},i.prototype.pushBottom=function(e){void 0!==e&&(void 0===this.bottom?this.bottom=e:this.bottom=Math.min(e,this.bottom))},i.prototype.setX=function(e){this.x=e;for(var t=0;tthis.max)&&(this.max=e.abcelem.maxpitch))},t.prototype.addBeam=function(e){this.beams.push(e)},t.prototype.setStemDirection=function(){this.average=r(this.total,this.count),this.forceup?this.stemsUp=!0:this.forcedown?this.stemsUp=!1:this.stemsUp=this.average<6,delete this.count,this.total=0},t.prototype.calcDir=function(){this.average=r(this.total,this.elems.length),this.forceup?this.stemsUp=!0:this.forcedown?this.stemsUp=!1:this.stemsUp=this.average<6;for(var e=this.stemsUp?"up":"down",t=0;t0&&this.unalignedWords(e.unalignedWords,n,a,i,s),this.extraText(e,n,a,i,s),e.footer&&r&&this.footer(e.footer,t,n,s)}function s(e,t,r,n,i,s,o){r&&(t&&(r="string"==typeof r?t+r:[{text:t}].concat(r)),a(e,r,"historyfont",i=s?"abcjs-extra-text "+i:"","description",n,{absElemType:"extraText",anchor:"start"},o))}function o(e,t,r,i,s,o,c,l,h,u,d,f){if(r){l=d?"abcjs-extra-text "+l:"";var p=f.calc("A",s,l);if("string"==typeof r)t&&(r=t+"\n"+r),n(e,{marginLeft:i,text:r,font:s,absElemType:"extraText",name:h,"dominant-baseline":"middle",klass:l},f);else{e.push({startGroup:c,klass:l,name:h}),e.push({move:u.info}),t&&(n(e,{marginLeft:i,text:t,font:s,absElemType:"extraText",name:h,"dominant-baseline":"middle"},f),e.push({move:3*p.height/4}));for(var m=0;m0&&this.startVoice.staff.voices[0]===e)},e.exports=t},6891:function(e){e.exports=function(e,t,r,n){this.type="CrescendoElem",this.anchor1=e,this.anchor2=t,this.dir=r,"above"===n?this.dynamicHeightAbove=6:this.dynamicHeightBelow=6,this.pitch=void 0}},3185:function(e){e.exports=function(e,t,r){this.type="DynamicDecoration",this.anchor=e,this.dec=t,"below"===r?this.volumeHeightBelow=6:this.volumeHeightAbove=6,this.pitch=void 0}},8256:function(e){e.exports=function(e,t,r){this.type="EndingElem",this.text=e,this.anchor1=t,this.anchor2=r,this.endingHeightAbove=5,this.pitch=void 0}},3736:function(e){e.exports=function(e,t,r,n,a,i){var s,o=e.text;this.rows=[],t&&this.rows.push({move:t});var c=r.calc("textfont","defined-text");if(""===o)this.rows.push({move:2*c.attr["font-size"]});else if("string"==typeof o){this.rows.push({move:c.attr["font-size"]/2}),this.rows.push({left:n,text:o,font:"textfont",klass:"defined-text",anchor:"start",startChar:e.startChar,endChar:e.endChar,absElemType:"freeText",name:"free-text"});var l=o.replace(/^[ \t]*\n/gm,"X\n");s=i.calc(l,"textfont","defined-text"),this.rows.push({move:s.height})}else if(o){for(var h=0,u=n,d="textfont",f=0;fthis.top&&(this.top=this.pitch2),this.bottom=n,void 0!==this.pitch2&&this.pitch20?this.top+=a.stemHeight:this.bottom+=a.stemHeight),a.dim&&(this.dim=a.dim),a.position&&(this.position=a.position),this.height=a.height?a.height:4,a.top&&(this.top=a.top),a.bottom&&(this.bottom=a.bottom),a.name?this.name=a.name:this.c?this.name=this.c:this.name=this.type,a.realWidth?this.realWidth=a.realWidth:this.realWidth=this.w,this.centerVertically=!1,this.type){case"debug":this.chordHeightAbove=this.height;break;case"lyric":a.position&&"below"===a.position?this.lyricHeightBelow=this.height:this.lyricHeightAbove=this.height;break;case"chord":a.position&&"below"===a.position?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height;break;case"text":void 0===this.pitch?a.position&&"below"===a.position?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height:this.centerVertically=!0;break;case"part":this.partHeightAbove=this.height}};t.prototype.getChordDim=function(){if("debug"===this.type)return null;if(!this.chordHeightAbove&&!this.chordHeightBelow)return null;var e="chord"===this.type?this.realWidth/2:0,t=this.x-e-0;return{left:t,right:t+this.realWidth+0}},t.prototype.invertLane=function(e){void 0===this.lane&&(this.lane=0),this.lane=e-this.lane-1},t.prototype.putChordInLane=function(e){this.lane=e,this.chordHeightAbove?this.chordHeightAbove=1.25*this.height*this.lane:this.chordHeightBelow=1.25*this.height*this.lane},t.prototype.getLane=function(){return void 0===this.lane?0:this.lane},t.prototype.setX=function(e){this.x=e+this.dx},e.exports=t},6994:function(e,t,r){var n=r(1716);e.exports=function(e,t,r,a,i,s,o,c){var l=c.calc("i",r,a);if(""===t)e.push({move:l.height});else{if("string"==typeof t)return void n(e,{marginLeft:s,text:t,font:r,klass:a,marginTop:o.marginTop,anchor:o.anchor,absElemType:o.absElemType,info:o.info,name:i},c);o.marginTop&&e.push({move:o.marginTop});var h=0,u={left:s,anchor:o.anchor,phrases:[]};a&&(u.klass=a),e.push(u);for(var d=0;d0)this.above=!1;else{var e;e=this.anchor1?this.anchor1.pitch:this.anchor2?this.anchor2.pitch:14,this.anchor1&&"down"===this.anchor1.stemDir&&this.anchor2&&"down"===this.anchor2.stemDir?this.above=!0:this.anchor1&&"up"===this.anchor1.stemDir&&this.anchor2&&"up"===this.anchor2.stemDir?this.above=!1:this.anchor1&&this.anchor2?this.above=e>=6:this.anchor1?this.above="down"===this.anchor1.stemDir:this.anchor2?this.above="down"===this.anchor2.stemDir:this.above=e>=6}},t.prototype.calcSlurDirection=function(){if(this.isGrace)this.above=!1;else if(0===this.voiceNumber)this.above=!0;else if(this.voiceNumber>0)this.above=!1;else{var e=!1;this.anchor1&&"down"===this.anchor1.stemDir&&(e=!0),this.anchor2&&"down"===this.anchor2.stemDir&&(e=!0);for(var t=0;te&&(e=this.internalNotes[t].highestVert);e>this.startY&&e>this.endY&&(this.startY=this.endY=e-1)}},t.prototype.getYBounds=function(){var e,t;return this.isTie?(this.calcTieDirection(),this.calcX(10,1e3),this.calcTieY()):(this.calcSlurDirection(),this.calcX(10,1e3),this.calcSlurY()),this.above?e=(t=Math.min(this.startY,this.endY))+3:t=(e=Math.min(this.startY,this.endY))-3,[e,t]},e.exports=t},1134:function(e,t,r){var n=r(1716),a=r(6994);e.exports=function(e,t,r,i,s,o,c,l,h,u){if(this.rows=[],e.header&&o){var d=u.calc("X","headerfont","abcjs-header abcjs-meta-top").height;n(this.rows,{marginLeft:c,text:e.header.left,font:"headerfont",klass:"header meta-top",marginTop:-d,info:t.header,name:"header"},u),n(this.rows,{marginLeft:c+s/2,text:e.header.center,font:"headerfont",klass:"header meta-top",marginTop:-d,anchor:"middle",info:t.header,name:"header"},u),n(this.rows,{marginLeft:c+s,text:e.header.right,font:"headerfont",klass:"header meta-top",marginTop:-d,anchor:"end",info:t.header,name:"header"},u)}o&&this.rows.push({move:l.top});var f=r.titleleft?"start":"middle",p=r.titleleft?c:c+s/2;if(e.title){var m=h?"abcjs-title":"";a(this.rows,e.title,"titlefont",m,"title",p,{marginTop:l.title,anchor:f,absElemType:"title",info:t.title},u)}if(i.length)for(var g=0;g0){var v=!(!e.composer&&!e.origin);m=h?"abcjs-rhythm":"",n(this.rows,{marginLeft:c,text:e.rhythm,font:"infofont",klass:m,absElemType:"rhythm",noMove:v,info:t.rhythm,name:"rhythm"},u)}e.composer&&e.composer,e.origin&&e.origin;var b=e.composer?e.composer:"";e.origin&&("string"==typeof b&&"string"==typeof e.origin?b+=" ("+e.origin+")":"string"==typeof b&&"string"!=typeof e.origin?((b=[{text:b}]).push({text:" ("}),(b=b.concat(e.origin)).push({text:")"})):(b.push({text:" ("}),(b=b.concat(e.origin)).push({text:")"}))),b&&(m=h?"abcjs-composer":"",a(this.rows,b,"composerfont",m,"composer",c+s,{anchor:"end",absElemType:"composer",info:t.composer,ingroup:!0},u))}e.author&&e.author.length>0&&(m=h?"abcjs-author":"",a(this.rows,e.author,"composerfont",m,"author",c+s,{anchor:"end",absElemType:"author",info:t.author},u)),e.partOrder&&e.partOrder.length>0&&(m=h?"abcjs-part-order":"",a(this.rows,e.partOrder,"partsfont",m,"part-order",c,{absElemType:"partOrder",info:t.partOrder,anchor:"start"},u))}},2096:function(e){var t=function(e,t,r){this.type="TripletElem",this.anchor1=t,this.number=e,this.durationClass=("d"+Math.round(1e3*t.parent.durationClass)/1e3).replace(/\./,"-"),this.middleElems=[],this.flatBeams=r.flatBeams};t.prototype.isClosed=function(){return!!this.anchor2},t.prototype.middleNote=function(e){this.middleElems.push(e)},t.prototype.setCloseAnchor=function(e){this.anchor2=e,this.anchor1.parent.beam&&"up"!==this.anchor1.stemDir||(this.endingHeightAbove=4)},e.exports=t},3197:function(e){var t=function(e,t){this.children=[],this.beams=[],this.otherchildren=[],this.w=0,this.duplicate=!1,this.voicenumber=e,this.voicetotal=t,this.bottom=7,this.top=7,this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};t.prototype.addChild=function(e){if("bar"===e.type){for(var t=!0,r=0;t&&r0&&"TempoElement"===t.children[0].type;t.elemset=[],o.beginGroup(e.paper,e.controller);for(var u=0;u=0&&f.setAttribute("class","abcjs-notehead")}}var p=t.type;if(("note"===t.type||"rest"===t.type)&&(t.counters=e.controller.classes.getCurrent(),p=(p+=" d"+Math.round(1e3*t.durationClass)/1e3).replace(/\./g,"-"),t.abcelem.pitches))for(var m=0;m0?g.classList[0]+" ":"";g.setAttribute("class",v+t.overrideClasses)}if(h)t.startChar=t.abcelem.startChar,t.endChar=t.abcelem.endChar,c.add(t,g,!1,l);else{t.elemset.push(g);var b=!1;"note"!==t.type&&"tabNumber"!==t.type||(b=!0),c.add(t,g,b,l)}}else t.elemset.length>0&&c.add(t,t.elemset[0],"note"===t.type,l);if(t.klass&&s(t.elemset,"mark","","#00ff00"),t.hint&&s(t.elemset,"abcjs-hint","",null),t.abcelem.abselem=t,t.heads&&t.heads.length>0){t.notePositions=[];for(var y=0;yr.formatting.maxStaves)break;t.shouldAddClasses&&(g.klass="abcjs-staff-wrapper abcjs-l"+t.lineNumber),e.paper.openGroup(g),x.vskip&&e.moveY(x.vskip),v.length>=1&&l(e,e.spacing.staffSeparation,v[v.length-1],x.staffGroup);var k=c(e,x.staffGroup,m,y);k.line=p+y,v.push(k),e.paper.closeGroup()}else x.nonMusic&&(t.shouldAddClasses&&(g.klass="abcjs-non-music"),e.paper.openGroup(g),i(e,x.nonMusic,m),e.paper.closeGroup())}return t.reset(),r.bottomText&&r.bottomText.rows&&r.bottomText.rows.length>0&&(t.shouldAddClasses&&(g.klass="abcjs-meta-bottom"),e.paper.openGroup(g),e.moveY(24),i(e,r.bottomText,m),e.paper.closeGroup()),a(e,s,u,h),{staffgroups:v,selectables:m.getElements()}}},9879:function(e,t,r){var n=r(4777);e.exports=function(e,t,r){void 0===t.pitch&&window.console.error("Dynamic Element y-coordinate not set.");var a=n(e,t.anchor.x,t.pitch,t.dec,{scalex:1,scaley:1,klass:e.controller.classes.generate("decoration dynamics"),fill:e.foregroundColor,stroke:"none",name:"dynamics"});return r.wrapSvgEl({el_type:"dynamicDecoration",startChar:-1,endChar:-1,decoration:t.dec},a),[a]}},5947:function(e,t,r){var n=r(6764),a=r(5759),i=r(6454),s=r(7199);e.exports=function(e,t,r,o,c){void 0===t.pitch&&window.console.error("Ending Element y-coordinate not set.");var l=s(e.calcY(t.pitch)),h="";t.anchor1&&(r=s(t.anchor1.x+t.anchor1.w),h+=n("M %f %f L %f %f ",r,l,r,s(l+20))),t.anchor2&&(o=s(t.anchor2.x),h+=n("M %f %f L %f %f ",o,l,o,s(l+20))),h+=n("M %f %f L %f %f ",r,l,o,l),e.paper.openGroup({klass:e.controller.classes.generate("ending"),fill:e.foregroundColor,"data-name":"ending"}),i(e,{path:h,stroke:e.foregroundColor,fill:e.foregroundColor,"data-name":"line"}),t.anchor1&&a(e,{x:s(r+5),y:s(e.calcY(t.pitch-.5)),text:t.text,type:"repeatfont",klass:"ending",anchor:"start",noClass:!0,name:t.text});var u=e.paper.closeGroup();return c.wrapSvgEl({el_type:"ending",startChar:-1,endChar:-1},u),[u]}},9045:function(e,t,r){var n=r(6764),a=r(6454),i=r(7199);function s(e,t,r){return i(e+r*t)}var o=[[3.5,-4.8]],c=[[1.5,-1],[.3,-.3],[-3.5,3.8]],l=[[-1.5,2]],h=[[3,4],[3,-4]],u=[[-3,4],[-3,-4]];function d(e,t){for(var r="",n=0;n1&&s.indexOf(".")<0){var p=i.isInGroup()?"":o.klass;e.paper.openGroup({"data-name":o.name,klass:p});for(var m=0,g=0;g0?t.linewidth+e.lineThickness:t.linewidth-e.lineThickness;t.graphelem=a(e,t.x,u,o,e.calcY(t.pitch2),"abcjs-stem","stem");break;case"ledger":t.graphelem=i(e,t.x,t.x+t.w,t.pitch,"abcjs-ledger","ledger",.35+e.lineThickness)}return 1!==t.scalex&&t.graphelem&&function(e,t,r,n,a,i){e.setAttributeOnElement(t,{style:"transform:scale("+r+","+n+");transform-origin:"+a+"px "+i+"px;"})}(e.paper,t.graphelem,t.scalex,t.scaley,t.x,o),t.graphelem}},7199:function(e){e.exports=function(e){return parseFloat(e.toFixed(2))}},3524:function(e,t,r){var n=r(5741),a=r(5829);function i(e,t,r){this.elements=[],this.paper=e,this.tuneNumber=r,this.selectTypes=t}i.prototype.getElements=function(){return this.elements},i.prototype.add=function(e,t,r,n){if(this.canSelect(e)){var a;a=void 0===this.selectTypes?{selectable:!1,"data-index":this.elements.length}:{selectable:!0,tabindex:0,"data-index":this.elements.length},this.paper.setAttributeOnElement(t,a);var i={absEl:e,svgEl:t,isDraggable:r};void 0!==n&&(i.staffPos=n),this.elements.push(i)}},i.prototype.canSelect=function(e){return!(!1===this.selectTypes||!e||!e.abcelem||!0!==this.selectTypes&&!(void 0===this.selectTypes?"note"===e.abcelem.el_type||"tabNumber"===e.abcelem.el_type:this.selectTypes.indexOf(e.abcelem.el_type)>=0))},i.prototype.wrapSvgEl=function(e,t){var r={tuneNumber:this.tuneNumber,abcelem:e,elemset:[t],highlight:n,unhighlight:a};this.add(r,t,!1)},e.exports=i},4169:function(e){e.exports=function(e,t){var r=Math.round(e.y),n=(e.controller.width-t)/2,a=n+t,i="M "+n+" "+r+" L "+a+" "+r+" L "+a+" "+(r+1)+" L "+n+" "+(r+1)+" L "+n+" "+r+" z";e.paper.pathToBack({path:i,stroke:"rgba(0,0,0,0)",fill:"rgba(0,0,0,255)",class:e.controller.classes.generate("defined-text")})}},7611:function(e){e.exports=function(e,t,r,n){var a=(t+e.padding.left+e.padding.right)*r,i=(e.y+e.padding.bottom)*r;if(e.isPrint&&(i=Math.max(i,1056)),""!==e.ariaLabel){var s="Sheet Music";e.abctune&&e.abctune.metaText&&e.abctune.metaText.title&&(s+=' for "'+e.abctune.metaText.title+'"'),e.paper.setTitle(s);var o=e.ariaLabel?e.ariaLabel:s;e.paper.setAttribute("aria-label",o)}e.paper.insertStyles(".abcjs-dragging-in-progress text, .abcjs-dragging-in-progress tspan {"+["-webkit-touch-callout: none;","-webkit-user-select: none;","-khtml-user-select: none;","-moz-user-select: none;","-ms-user-select: none;","user-select: none;"].join(" ")+"}");var c={overflow:"hidden"};"resize"===n?e.paper.setResponsiveWidth(a,i):(c.width="",c.height=i+"px",r<1?(c.width=a+"px",e.paper.setSize(a/r,i/r)):e.paper.setSize(a,i)),e.paper.setScale(r),e.paper.setParentStyles(c)}},6764:function(e){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}e.exports=function(){for(var e,r,n,a,i,s=0,o=arguments[s++],c=[];o;){if(r=/^[^\x25]+/.exec(o))c.push(r[0]);else if(r=/^\x25{2}/.exec(o))c.push("%");else{if(!(r=/^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(o)))throw"Huh ?!";if(null==(e=arguments[r[1]||s++])||null==e)throw"Too few arguments.";if(/[^s]/.test(r[7])&&"number"!=typeof e)throw"Expecting number but found "+t(e);switch(r[7]){case"b":e=e.toString(2);break;case"c":e=String.fromCharCode(e);break;case"d":e=parseInt(e);break;case"e":e=r[6]?e.toExponential(r[6]):e.toExponential();break;case"f":e=r[6]?parseFloat(e).toFixed(r[6]):parseFloat(e);break;case"o":e=e.toString(8);break;case"s":e=(e=String(e))&&r[6]?e.substring(0,r[6]):e;break;case"u":e=Math.abs(e);break;case"x":e=e.toString(16);break;case"X":e=e.toString(16).toUpperCase()}e=/[def]/.test(r[7])&&r[2]&&e>0?"+"+e:e,a=r[3]?"0"==r[3]?"0":r[3][1]:" ",i=r[5]-String(e).length,n=r[5]?str_repeat(a,i):"",c.push(r[4]?e+n:n+e)}o=o.substring(r[0].length)}return c.join("")}},5537:function(e,t,r){var n=r(4331),a=r(129),i=r(3145),s=r(7641),o=r(1547),c=r(3624),l=r(5668);function h(e,t,r,i,s){if(r)for(var o=0;o=0&&v.voices&&u(e,t.voices,v.voices),e.showDebug.indexOf("grid")>=0&&(e.paper.dottedLine({x1:e.padding.left,x2:e.padding.left+e.controller.width,y1:m,y2:m,stroke:"#0000ff"}),o(e,{x:e.padding.left,y:e.calcY(v.originalTop),width:e.controller.width,height:e.calcY(v.originalBottom)-e.calcY(v.originalTop),fill:e.foregroundColor,stroke:e.foregroundColor,"fill-opacity":.1,"stroke-opacity":.1}),d=0,E(v,"chordHeightAbove"),E(v,"chordHeightBelow"),E(v,"dynamicHeightAbove"),E(v,"dynamicHeightBelow"),E(v,"endingHeightAbove"),E(v,"lyricHeightAbove"),E(v,"lyricHeightBelow"),E(v,"partHeightAbove"),E(v,"tempoHeightAbove"),E(v,"volumeHeightAbove"),E(v,"volumeHeightBelow"))),e.moveY(n.STEP,-v.bottom),e.showDebug&&e.showDebug.indexOf("grid")>=0&&e.paper.dottedLine({x1:e.padding.left,x2:e.padding.left+e.controller.width,y1:e.y,y2:e.y,stroke:"#0000aa"})}for(var b=2,y=0,x=0;x6&&(d=0)}}_>1&&(f=t.staffs[0].topLine,p=t.staffs[_-1].bottomLine,c(e,t.startx,.6,f,p,null)),e.y=m}},7865:function(e,t,r){var n=r(6637);e.exports=function(e,t,r,a,i,s,o){var c=e.calcY(a);return n(e,t,r,c,i,s,o)}},7641:function(e,t,r){var n=r(7865);e.exports=function(e,t,r,a,i,s){var o="abcjs-top-line",c=2;i&&(c=i),e.paper.openGroup({prepend:!0,klass:e.controller.classes.generate("abcjs-staff")});var l=0,h=0;if(1===a)n(e,t,r,6,o,null,s+e.lineThickness),l=e.calcY(10),h=e.calcY(2);else for(var u=a-1;u>=0;u--){var d=(u+1)*c;h=e.calcY(d),0===l&&(l=h),n(e,t,r,d,o,null,s+e.lineThickness),o=void 0}return e.paper.closeGroup(),[l,h]}},3987:function(e,t,r){var n=r(2435),a=r(5759);e.exports=function(e,t){var r=t.x;void 0===t.pitch&&window.console.error("Tempo Element y-coordinate not set."),t.tempo.el_type="tempo";var i,s=e.calcY(t.pitch)+2;if(t.tempo.preString){i=a(e,{x:r,y:s,text:t.tempo.preString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"pre"},!0);var o=e.controller.getTextSize.calc(t.tempo.preString,"tempofont","tempo",i).width;r+=o+o/t.tempo.preString.length}if(t.note){t.note.setX(r);for(var c=0;c.1||(this.scale=void 0),t.staffwidth?(this.staffwidthScreen=t.staffwidth,this.staffwidthPrint=t.staffwidth):(this.staffwidthScreen=740,this.staffwidthPrint=680),this.listeners=[],t.clickListener&&this.addSelectListener(t.clickListener),this.renderer=new i(e),this.renderer.setPaddingOverride(t),t.showDebug&&(this.renderer.showDebug=t.showDebug),t.jazzchords&&(this.jazzchords=t.jazzchords),t.accentAbove&&(this.accentAbove=t.accentAbove),t.germanAlphabet&&(this.germanAlphabet=t.germanAlphabet),t.lineThickness&&(this.lineThickness=t.lineThickness),this.renderer.controller=this,this.renderer.foregroundColor=t.foregroundColor?t.foregroundColor:"currentColor",void 0!==t.ariaLabel&&(this.renderer.ariaLabel=t.ariaLabel),this.renderer.minPadding=t.minPadding?t.minPadding:0,this.reset()};function x(e){for(var t=document.createElementNS("http://www.w3.org/2000/svg","svg"),r=0;r0)for(var o=s.staffGroup.voices[0],c=!1,l=0,h=0;hthis.width+1&&(e.topText=new l(e.metaText,e.metaTextInfo,e.formatting,e.lines,i,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize),e.lines&&e.lines.length>0))for(var s=e.lines.length,o=0;o0)for(var h=c.nonMusic.rows.length,f=0;f0&&c.text[0].center)&&(p.left=i/2+this.renderer.padding.left)}}e.tablatures&&v.layoutTablatures(this.renderer,e);var m=g(this.renderer,this.classes,e,this.width,i,this.responsive,a,this.selectTypes,t,r);if(this.staffgroups=m.staffgroups,this.selectables=m.selectables,this.oneSvgPerLine){var b=this.renderer.paper.svg.parentNode;this.svgs=function(e,t,r,n,a){r||(r="Untitled");var i=t.querySelector("svg");"resize"===n&&(t.style.paddingBottom="");for(var s=i.querySelector("style"),o="resize"===n?i.viewBox.baseVal.width:i.getAttribute("width"),c=t.querySelectorAll("svg > g"),l=0,h=[],u=0;u0&&t.push(e),"abcjs-tab-number"===e)return t.join(" ");if("text instrument-name"===e)return"abcjs-text abcjs-instrument-name";if(null!==this.lineNumber&&t.push("l"+this.lineNumber),null!==this.measureNumber&&t.push("m"+this.measureNumber),null!==this.measureNumber&&t.push("mm"+this.measureTotal()),null!==this.voiceNumber&&t.push("v"+this.voiceNumber),e&&(e.indexOf("note")>=0||e.indexOf("rest")>=0||e.indexOf("lyric")>=0)&&null!==this.noteNumber&&t.push("n"+this.noteNumber),t.length>0){t=(t=t.join(" ")).split(" ");for(var r=0;r0&&(t[r]="abcjs-"+t[r])}return t.join(" ")},e.exports=t},1328:function(e){var t=function(e,t){this.formatting=e,this.classes=t};t.prototype.updateFonts=function(e){e.gchordfont&&(this.formatting.gchordfont=e.gchordfont),e.tripletfont&&(this.formatting.tripletfont=e.tripletfont),e.annotationfont&&(this.formatting.annotationfont=e.annotationfont),e.vocalfont&&(this.formatting.vocalfont=e.vocalfont)},t.prototype.getFamily=function(e){return'"'===e[0]&&'"'===e[e.length-1]?e.substring(1,e.length-1):e},t.prototype.calc=function(e,t){var r;r="string"==typeof e?(r=this.formatting[e])?{face:r.face,size:Math.round(4*r.size/3),decoration:r.decoration,style:r.style,weight:r.weight,box:r.box}:{face:"Arial",size:Math.round(16),decoration:"underline",style:"normal",weight:"normal"}:{face:e.face,size:Math.round(4*e.size/3),decoration:e.decoration,style:e.style,weight:e.weight,box:e.box};var n=this.formatting.fontboxpadding?this.formatting.fontboxpadding:.1;return r.padding=r.size*n,{font:r,attr:{"font-size":r.size,"font-style":r.style,"font-family":this.getFamily(r.face),"font-weight":r.weight,"text-decoration":r.decoration,class:this.classes.generate(t)}}},e.exports=t},9799:function(e){var t=function(e,t){this.getFontAndAttr=e,this.svg=t};t.prototype.updateFonts=function(e){this.getFontAndAttr.updateFonts(e)},t.prototype.attr=function(e,t){return this.getFontAndAttr.calc(e,t)},t.prototype.getFamily=function(e){return'"'===e[0]&&'"'===e[e.length-1]?e.substring(1,e.length-1):e},t.prototype.calc=function(e,t,r,n){var a;a="string"==typeof t?this.attr(t,r):{font:{face:t.face,size:t.size,decoration:t.decoration,style:t.style,weight:t.weight},attr:{"font-size":t.size,"font-style":t.style,"font-family":this.getFamily(t.face),"font-weight":t.weight,"text-decoration":t.decoration,class:this.getFontAndAttr.classes.generate(r)}};var i=this.svg.getTextSize(e,a.attr,n);return a.font.box?{height:i.height+4*a.font.padding,width:i.width+4*a.font.padding}:i},t.prototype.baselineToCenter=function(e,t,r,n,a){return.5*this.calc(e,t,r).height+(a-n-2)*this.attr(t,r).font.size},e.exports=t},2187:function(e){e.exports=function(e,t,r,n){if(e)for(var a=0;a0&&(o.length>0&&" "!==o[o.length-1]&&(o+=" "),o+=t),i.setAttribute("class",o)}}},4331:function(e){var t={FONTEM:360,FONTSIZE:30};t.STEP=93*t.FONTSIZE/720,t.SPACE=10,t.TOPNOTE=15,t.STAVEHEIGHT=100,t.INDENT=50,e.exports=t},8123:function(e){function t(e,t,r,n){if(0===e.indexOf(t)){var a=e.replace(t,""),i=parseInt(a,10);""+i===a&&(r[n]=i)}}e.exports=function(e,r){var n=[];if(e.absEl.elemset){for(var a={},i=0;i=0&&r=0?(a=function(e,t,r){return e.x<=t.offsetX&&e.x+e.width>=t.offsetX&&e.y<=t.offsetY&&e.y+e.height>=t.offsetY||Math.abs(t.layerY/r-t.offsetY)<3?[t.offsetX,t.offsetY]:[t.layerX,t.layerY]}(e.selectables[i].svgEl.getBBox(),t,e.scale),r=a[0],n=a[1]):(a=function(e){var t,r,n=1,a=1,i=e.target.closest("svg"),s=0;return i&&i.viewBox&&i.viewBox.baseVal&&(0!==i.viewBox.baseVal.width&&(n=i.viewBox.baseVal.width/i.clientWidth),0!==i.viewBox.baseVal.height&&(a=i.viewBox.baseVal.height/i.clientHeight),s=i.viewBox.baseVal.y),e.target&&"svg"===e.target.tagName?(t=e.offsetX,r=e.offsetY):(t=e.layerX,r=e.layerY),[t*=n,(r*=a)+s]}(t),i=function(e,t,r){for(var n=9999999,a=-1,i=0;i0;i++){var s=e.selectables[i];if(e.getDim(s),s.dim.leftt&&s.dim.topr)a=i,n=0;else if(s.dim.topr){var o=Math.min(Math.abs(s.dim.left-t),Math.abs(s.dim.right-t));ot){var c=Math.min(Math.abs(s.dim.top-r),Math.abs(s.dim.bottom-r));cMath.abs(t-s.dim.right)?Math.abs(t-s.dim.right):Math.abs(t-s.dim.left),h=Math.abs(r-s.dim.top)>Math.abs(r-s.dim.bottom)?Math.abs(r-s.dim.bottom):Math.abs(r-s.dim.top),u=Math.sqrt(l*l+h*h);u=0&&n<=12?a:-1}(e,r=a[0],n=a[1])),{x:r,y:n,clickedOn:i}}function l(e){if(e&&e.target&&e.touches&&!(e.touches.length<1)){var t=e.target.getBoundingClientRect(),r=e.touches[0].pageX-t.left,n=e.touches[0].pageY-t.top;e.touches[0].offsetX=r,e.touches[0].offsetY=n,e.touches[0].layerX=e.touches[0].pageX,e.touches[0].layerY=e.touches[0].pageY}}function h(e){var t=e;"touchstart"===e.type&&(l(e),e.touches.length>0&&(t=e.touches[0]));var r=c(this,t);r.clickedOn>=0&&("touchstart"===e.type||0===e.button)&&this.selectables[r.clickedOn]&&(this.dragTarget=this.selectables[r.clickedOn],this.dragIndex=r.clickedOn,this.dragMechanism="mouse",this.dragMouseStart={x:r.x,y:r.y},this.dragging&&this.dragTarget.isDraggable&&(function(e,t){if(e){var r=v(e.svg);r[t]=!0,b(e.svg,r)}}(this.renderer.paper,"abcjs-dragging-in-progress"),this.dragTarget.absEl.highlight(void 0,this.dragColor)))}function u(e){var t=e;if("touchmove"===e.type&&(l(e),e.touches.length>0&&(t=e.touches[0])),this.lastTouchMove=e,this.dragTarget&&this.dragging&&this.dragTarget.isDraggable&&"mouse"===this.dragMechanism&&this.dragMouseStart){var r=c(this,t),a=Math.round((r.y-this.dragMouseStart.y)/n.STEP);a!==this.dragYStep&&(this.dragYStep=a,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+a*n.STEP+")"))}}function d(e){var t=e;"touchend"===e.type&&this.lastTouchMove&&(l(this.lastTouchMove),this.lastTouchMove&&this.lastTouchMove.touches&&this.lastTouchMove.touches.length>0&&(t=this.lastTouchMove.touches[0])),this.dragTarget&&(m.bind(this)(),this.dragTarget.absEl&&this.dragTarget.absEl.highlight&&(this.selected=[this.dragTarget.absEl],this.dragTarget.absEl.highlight(void 0,this.selectionColor)),p.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex,t),this.dragTarget.svgEl&&this.dragTarget.svgEl.focus&&(this.dragTarget.svgEl.focus(),this.dragTarget=null,this.dragIndex=-1),function(e,t){if(e){var r=v(e.svg);delete r[t],b(e.svg,r)}}(this.renderer.svg,"abcjs-dragging-in-progress"))}function f(e){e>=0&&eo&&ei&&(a=i),a<-i&&(a=-i),a}(x,k,v,w),N=M+Math.floor(A/2),B=M+Math.floor(-A/2),S||(y&&M<6||!y&&M>6)&&(N=6,B=6),[N,B]),f=c(e.stemsUp,r,l);e.addBeam({startX:f[0],endX:f[1],startY:d[0],endY:d[1],dy:t});for(var p=function(e,t,r,n,a){for(var o=[],l=[],h=0;h0&&u.abcelem.beambr&&u.abcelem.beambr<=b+1){l[b].split||(l[b].split=[l[b].x]);var y=c(t,e[h-1],u);l[b].split[l[b].split.length-1]>=y[0]&&(y[0]+=u.w),l[b].split.push(y[0]),l[b].split.push(y[1])}}for(var x=l.length-1;x>=0;x--)if(h===e.length-1||s(e[h+1].abcelem.duration)>-x-4){var k=f,w=p+m*(x+1);l[x].single&&(k=0===h?f+5:f-5,w=i(r.startX,r.startY,r.endX,r.endY,k)+m*(x+1));var C={startX:l[x].x,endX:k,startY:l[x].y,endY:w,dy:a};if(void 0!==l[x].split){var T=l[x].split;C.endX<=T[T.length-1]&&(T[T.length-1]-=u.w),T.push(C.endX),C.split=l[x].split}o.push(C),l=l.slice(0,x)}}}return o}(e.elems,e.stemsUp,e.beams[0],e.isgrace,t),m=0;m0?((a=(r-(n-i*a))/i)*s>50&&(a=50/s),a):null}e.exports=function(e,t,r,i,s,l){var h,u,d=r;for(h=0;hMath.round(d)&&(d=f,s&&(h=-1)))}for(h=0;h=0&&(c.originalTop=c.top,c.originalBottom=c.bottom),i(c,l,"lyricHeightAbove"),i(c,l,"chordHeightAbove",c.specialY.chordLines.above),c.specialY.endingHeightAbove&&(c.specialY.chordHeightAbove?c.top+=2:c.top+=c.specialY.endingHeightAbove+a,l.endingHeightAbove=c.top),c.specialY.dynamicHeightAbove&&c.specialY.volumeHeightAbove?(c.top+=Math.max(c.specialY.dynamicHeightAbove,c.specialY.volumeHeightAbove)+a,l.dynamicHeightAbove=c.top,l.volumeHeightAbove=c.top):(i(c,l,"dynamicHeightAbove"),i(c,l,"volumeHeightAbove")),i(c,l,"partHeightAbove"),i(c,l,"tempoHeightAbove"),c.specialY.lyricHeightBelow&&(c.specialY.lyricHeightBelow+=e.spacing.vocal/n.STEP,l.lyricHeightBelow=c.bottom,c.bottom-=c.specialY.lyricHeightBelow+a),c.specialY.chordHeightBelow){l.chordHeightBelow=c.bottom;var h=c.specialY.chordHeightBelow;c.specialY.chordLines.below&&(h*=c.specialY.chordLines.below),c.bottom-=h+a}c.specialY.volumeHeightBelow&&c.specialY.dynamicHeightBelow?(l.volumeHeightBelow=c.bottom,l.dynamicHeightBelow=c.bottom,c.bottom-=Math.max(c.specialY.volumeHeightBelow,c.specialY.dynamicHeightBelow)+a):c.specialY.volumeHeightBelow?(l.volumeHeightBelow=c.bottom,c.bottom-=c.specialY.volumeHeightBelow+a):c.specialY.dynamicHeightBelow&&(l.dynamicHeightBelow=c.bottom,c.bottom-=c.specialY.dynamicHeightBelow+a),e.showDebug&&e.showDebug.indexOf("box")>=0&&(c.positionY=l);for(var u=0;u0&&(c.top+=f)}c.top+=e.spacing.staffTopMargin/n.STEP,r=2-c.bottom}}},735:function(e,t,r){var n=r(937);function a(e){for(var t=0;t0?0:5e-7)}e.exports=function(e,t,r,s,o){var c,l=0,h=1e3,u=o;s.startx=u;var d,f,p=0;for(r&&console.log("init layout",e),c=0;c1e-7?v.push(s.voices[c]):g.push(s.voices[c]);m=0;var b=0;for(c=0;cu&&(u=n.getNextX(g[c]),m=n.getSpacingUnits(g[c]),b=g[c].spacingduration);l+=m,h=Math.min(h,m),r&&console.log("currentduration: ",p,l,h);var y=void 0;for(c=0;c0){u=w;for(var T=0;Tu&&(u=n.getNextX(s.voices[c]),m=n.getSpacingUnits(s.voices[c]));return function(e){for(var t=0,r=0;r0){var a=n.children.length-1,i=n.children[a];if("bar"===i.abcelem.el_type){var s=i.children[0].x;s>t?t=s:i.children[0].x=t}}}}(s.voices),l+=m,s.setWidth(u),{spacingUnits:l,minSpace:h}}},3294:function(e,t,r){var n=r(3721);function a(e){return e.stemsUp}e.exports=function(e){if(e.anchor1&&e.anchor2){e.hasBeam=!!e.anchor1.parent.beam&&e.anchor1.parent.beam===e.anchor2.parent.beam;var t=e.anchor1.parent.beam;if(!e.hasBeam||t.elems[0]===e.anchor1.parent&&t.elems[t.elems.length-1]===e.anchor2.parent||(e.hasBeam=!1),e.hasBeam){var r=a(t)?e.anchor1.x+e.anchor1.w:e.anchor1.x;e.yTextPos=function(e,t,r){if(0===r.beams.length)return 0;r=r.beams[0];var a=e+(t-e)/2;return n(r.startX,r.startY,r.endX,r.endY,a)}(r,e.anchor2.x,t),e.yTextPos+=a(t)?3:-2,e.xTextPos=(o=r,c=e.anchor2.x,o+(c-o)/2),e.top=e.yTextPos+1,e.bottom=e.yTextPos-2,a(t)&&(e.endingHeightAbove=4)}else{e.startNote=Math.max(e.anchor1.parent.top,9)+4,e.endNote=Math.max(e.anchor2.parent.top,9)+4,"rest"===e.anchor1.parent.type&&"rest"!==e.anchor2.parent.type?e.startNote=e.endNote:"rest"===e.anchor2.parent.type&&"rest"!==e.anchor1.parent.type&&(e.endNote=e.startNote);for(var i=0,s=0;se.startNote||i>e.endNote)&&(e.startNote=i,e.endNote=i),e.flatBeams&&(e.startNote=Math.max(e.startNote,e.endNote),e.endNote=Math.max(e.startNote,e.endNote)),e.yTextPos=e.startNote+(e.endNote-e.startNote)/2,e.xTextPos=e.anchor1.x+(e.anchor2.x+e.anchor2.w-e.anchor1.x)/2,e.top=e.yTextPos+1}}var o,c;delete e.middleElems,delete e.flatBeams}},937:function(e){var t=function(){};t.beginLayout=function(e,t){t.i=0,t.durationindex=0,t.startx=e,t.minx=e,t.nextx=e,t.spacingduration=0},t.layoutEnded=function(e){return e.i>=e.children.length},t.getNextX=function(e){return Math.max(e.minx,e.nextx)},t.getSpacingUnits=function(e){return Math.sqrt(8*e.spacingduration)},t.layoutOneItem=function(e,t,r,n,a){var i=r.children[r.i];if(!i)return 0;var s=e-r.minx,o=r.durationindex+i.duration>0?n:0;if("note"===i.abcelem.el_type&&!i.abcelem.rest&&0!==r.voicenumber&&a){var c=a.children[a.i],l=c&&(i.abcelem.maxpitch<=c.abcelem.maxpitch+1&&i.abcelem.maxpitch>=c.abcelem.minpitch-1||i.abcelem.minpitch<=c.abcelem.maxpitch+1&&i.abcelem.minpitch>=c.abcelem.minpitch-1);if(l&&i.abcelem.minpitch===c.abcelem.minpitch&&i.abcelem.maxpitch===c.abcelem.maxpitch&&c.heads&&c.heads.length>0&&i.heads&&i.heads.length>0&&c.heads[0].c===i.heads[0].c&&(l=!1),l){var h=c.heads&&c.heads.length>0?c.heads[0].realWidth:c.fixed.w;i.adjustedWidth||(i.adjustedWidth=h+i.w),i.w=i.adjustedWidth;for(var u=0;u0&&t.putChordInLane(n),void(e[n]=r.right);e.push(r.right),t.putChordInLane(e.length-1)}}function c(e){for(var t=0,r=0;r=0;r--)(n=e[t].children[r]).chordHeightBelow&&o(i,n)}return(a.length>1||i.length>1)&&function(e,t,r){for(var n=0;n=0};i.prototype.reset=function(){this.paper.clear(),this.y=0,this.abctune=null,this.path=null,this.isPrint=!1,this.lineThickness=0,this.initVerticalSpace()},i.prototype.newTune=function(e){this.abctune=e,this.setVerticalSpace(e.formatting),this.isPrint="print"===e.media,this.setPadding(e)},i.prototype.setLineThickness=function(e){this.lineThickness=e},i.prototype.setPaddingOverride=function(e){this.paddingOverride={top:e.paddingtop,bottom:e.paddingbottom,right:e.paddingright,left:e.paddingleft}},i.prototype.setPadding=function(e){function t(t,r,n,a,i){void 0!==e.formatting[n]?t.padding[r]=e.formatting[n]:void 0!==t.paddingOverride[r]?t.padding[r]=t.paddingOverride[r]:t.isPrint?t.padding[r]=a:t.padding[r]=i}t(this,"top","topmargin",38,15),t(this,"bottom","botmargin",38,15),t(this,"left","leftmargin",68,15),t(this,"right","rightmargin",68,15)},i.prototype.adjustNonScaledItems=function(e){this.padding.top/=e,this.padding.bottom/=e,this.padding.left/=e,this.padding.right/=e,this.abctune.formatting.headerfont.size/=e,this.abctune.formatting.footerfont.size/=e},i.prototype.initVerticalSpace=function(){this.spacing={composer:7.56,graceBefore:8.67,graceInside:10.67,graceAfter:16,info:0,lineSkipFactor:1.1,music:7.56,paragraphSkipFactor:.4,parts:11.33,slurHeight:1,staffSeparation:61.33,staffTopMargin:0,stemHeight:36.67,subtitle:3.78,systemStaffSeparation:48,text:18.9,title:7.56,top:30.24,vocal:0,words:0}},i.prototype.setVerticalSpace=function(e){void 0!==e.staffsep&&(this.spacing.staffSeparation=4*e.staffsep/3),void 0!==e.composerspace&&(this.spacing.composer=4*e.composerspace/3),void 0!==e.partsspace&&(this.spacing.parts=4*e.partsspace/3),void 0!==e.textspace&&(this.spacing.text=4*e.textspace/3),void 0!==e.musicspace&&(this.spacing.music=4*e.musicspace/3),void 0!==e.titlespace&&(this.spacing.title=4*e.titlespace/3),void 0!==e.sysstaffsep&&(this.spacing.systemStaffSeparation=4*e.sysstaffsep/3),void 0!==e.stafftopmargin&&(this.spacing.staffTopMargin=4*e.stafftopmargin/3),void 0!==e.subtitlespace&&(this.spacing.subtitle=4*e.subtitlespace/3),void 0!==e.topspace&&(this.spacing.top=4*e.topspace/3),void 0!==e.vocalspace&&(this.spacing.vocal=4*e.vocalspace/3),void 0!==e.wordsspace&&(this.spacing.words=4*e.wordsspace/3)},i.prototype.calcY=function(e){return this.y-e*n.STEP},i.prototype.moveY=function(e,t){void 0===t&&(t=1),this.y+=e*t},i.prototype.absolutemoveY=function(e){this.y=e},e.exports=i},4101:function(e){var t="http://www.w3.org/2000/svg";function r(e){this.svg=s(),this.currentGroup=[],e.appendChild(this.svg)}function n(e,t,r){var n=r-e;return"M "+e+" "+t+" l "+n+" 0 l 0 1 l "+-n+" 0 z "}function a(e,t,r){var n=r-t;return"M "+e+" "+t+" l 0 "+n+" l 1 0 l 0 "+-n+" z "}r.prototype.clear=function(){if(this.svg){var e=this.svg.parentNode;this.svg=s(),this.currentGroup=[],e&&(e.innerHTML="",e.appendChild(this.svg))}},r.prototype.setTitle=function(e){var t=document.createElement("title"),r=document.createTextNode(e);t.appendChild(r),this.svg.insertBefore(t,this.svg.firstChild)},r.prototype.setResponsiveWidth=function(e,t){if(this.svg.setAttribute("viewBox","0 0 "+e+" "+t),this.svg.setAttribute("preserveAspectRatio","xMinYMin meet"),this.svg.removeAttribute("height"),this.svg.removeAttribute("width"),this.svg.style.display="inline-block",this.svg.style.position="absolute",this.svg.style.top="0",this.svg.style.left="0",this.svg.parentNode){var r=this.svg.parentNode.getAttribute("class");r?r.indexOf("abcjs-container")<0&&this.svg.parentNode.setAttribute("class",r+" abcjs-container"):this.svg.parentNode.setAttribute("class","abcjs-container"),this.svg.parentNode.style.display="inline-block",this.svg.parentNode.style.position="relative",this.svg.parentNode.style.width="100%";var n=t/e*100;this.svg.parentNode.style["padding-bottom"]=n+"%",this.svg.parentNode.style["vertical-align"]="middle",this.svg.parentNode.style.overflow="hidden"}},r.prototype.setSize=function(e,t){this.svg.setAttribute("width",e),this.svg.setAttribute("height",t)},r.prototype.setAttribute=function(e,t){this.svg.setAttribute(e,t)},r.prototype.setScale=function(e){1!==e?(this.svg.style.transform="scale("+e+","+e+")",this.svg.style["-ms-transform"]="scale("+e+","+e+")",this.svg.style["-webkit-transform"]="scale("+e+","+e+")",this.svg.style["transform-origin"]="0 0",this.svg.style["-ms-transform-origin-x"]="0",this.svg.style["-ms-transform-origin-y"]="0",this.svg.style["-webkit-transform-origin-x"]="0",this.svg.style["-webkit-transform-origin-y"]="0"):(this.svg.style.transform="",this.svg.style["-ms-transform"]="",this.svg.style["-webkit-transform"]="")},r.prototype.insertStyles=function(e){var r=document.createElementNS(t,"style");r.textContent=e,this.svg.insertBefore(r,this.svg.firstChild)},r.prototype.setParentStyles=function(e){for(var t in e)e.hasOwnProperty(t)&&this.svg.parentNode&&(this.svg.parentNode.style[t]=e[t]);this.dummySvg&&(document.querySelector("body").removeChild(this.dummySvg),this.dummySvg=null)},r.prototype.rect=function(e){var t=[],r=e.x,i=e.y,s=e.x+e.width,o=e.y+e.height;return t.push(n(r,i,s)),t.push(n(r,o,s)),t.push(a(s,i,o)),t.push(a(r,o,i)),this.path({path:t.join(" "),stroke:"none","data-name":e["data-name"]})},r.prototype.dottedLine=function(e){var r=document.createElementNS(t,"line");r.setAttribute("x1",e.x1),r.setAttribute("x2",e.x2),r.setAttribute("y1",e.y1),r.setAttribute("y2",e.y2),r.setAttribute("stroke",e.stroke),r.setAttribute("stroke-dasharray","5,5"),this.svg.insertBefore(r,this.svg.firstChild)},r.prototype.rectBeneath=function(e){var r=document.createElementNS(t,"rect");r.setAttribute("x",e.x),r.setAttribute("width",e.width),r.setAttribute("y",e.y),r.setAttribute("height",e.height),e.stroke&&r.setAttribute("stroke",e.stroke),e["stroke-opacity"]&&r.setAttribute("stroke-opacity",e["stroke-opacity"]),e.fill&&r.setAttribute("fill",e.fill),e["fill-opacity"]&&r.setAttribute("fill-opacity",e["fill-opacity"]),this.svg.insertBefore(r,this.svg.firstChild)},r.prototype.text=function(e,r,n){var a=document.createElementNS(t,"text");for(var i in a.setAttribute("stroke","none"),r)r.hasOwnProperty(i)&&a.setAttribute(i,r[i]);for(var s="free-text"==r["data-name"],o=(""+e).split("\n"),c=0;c0?this.currentGroup[0].removeChild(r):this.svg.removeChild(r)),n&&(i[n]=a),a},r.prototype.openGroup=function(e){e=e||{};var r=document.createElementNS(t,"g");return e.klass&&r.setAttribute("class",e.klass),e.fill&&r.setAttribute("fill",e.fill),e.stroke&&r.setAttribute("stroke",e.stroke),e["data-name"]&&r.setAttribute("data-name",e["data-name"]),e.prepend?this.prepend(r):this.append(r),this.currentGroup.unshift(r),r},r.prototype.closeGroup=function(){var e=this.currentGroup.shift();return e&&0===e.children.length?(e.parentElement.removeChild(e),null):e},r.prototype.path=function(e){var r=document.createElementNS(t,"path");for(var n in e)e.hasOwnProperty(n)&&("path"===n?r.setAttributeNS(null,"d",e.path):"klass"===n?r.setAttributeNS(null,"class",e[n]):void 0!==e[n]&&r.setAttributeNS(null,n,e[n]));return this.append(r),r},r.prototype.pathToBack=function(e){var r=document.createElementNS(t,"path");for(var n in e)e.hasOwnProperty(n)&&("path"===n?r.setAttributeNS(null,"d",e.path):"klass"===n?r.setAttributeNS(null,"class",e[n]):r.setAttributeNS(null,n,e[n]));return this.prepend(r),r},r.prototype.lineToBack=function(e){for(var r=document.createElementNS(t,"line"),n=Object.keys(e),a=0;a0?this.currentGroup[0].appendChild(e):this.svg.appendChild(e)},r.prototype.prepend=function(e){this.currentGroup.length>0?this.currentGroup[0].appendChild(e):this.svg.insertBefore(e,this.svg.firstChild)},r.prototype.setAttributeOnElement=function(e,t){for(var r in t)t.hasOwnProperty(r)&&e.setAttributeNS(null,r,t[r])},r.prototype.moveElementToChild=function(e,t){e.appendChild(t)},e.exports=r},1185:function(e){e.exports="6.5.0"}},t={},r=function r(n){var a=t[n];if(void 0!==a)return a.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}(1045),r;var e,t,r})); \ No newline at end of file diff --git a/app/stage/protyle/js/lute/lute.min.js b/app/stage/protyle/js/lute/lute.min.js index 289426fa739..17fd20b610f 100644 --- a/app/stage/protyle/js/lute/lute.min.js +++ b/app/stage/protyle/js/lute/lute.min.js @@ -49,7 +49,7 @@ $packages["bufio"]=(function(){var $pkg={},$init,A,B,C,E,D,U,Z,AD,S,T,V,W;A=$pac $packages["github.com/88250/lute/html/atom"]=(function(){var $pkg={},$init,B,A,C,D,E,F;B=$pkg.Atom=$newType(4,$kindUint32,"atom.Atom",true,"github.com/88250/lute/html/atom",true,null);B.prototype.String=function(){var a,b,c;a=this.$val;b=(((a>>>8>>>0)>>>0));c=((((a&255)>>>0)>>>0));if((b+c>>>0)>1834){return"";}return $substring("abbradiogrouparamainavalueaccept-charsetbodyaccesskeygenobrbasefontimeupdateviacacheightmlabelooptgroupatternoembedetailsampictureversedfnoframesetdirnameterowspanomoduleacronymalignmarkbdialogallowpaymentrequestrikeytypeallowusermediagroupingaltfooterubyasyncanvasidefaultitleaudioncancelautofocusandboxmplaceholderautoplaysinlinebdoncanplaythrough1bgsoundisabledivarbigblinkindraggablegendblockquotebuttonabortcitempropenoncecolgrouplaintextrackcolorcolspannotation-xmlcommandcontrolshapecoordslotranslatecrossoriginsmallowfullscreenoscriptfacenterfieldsetfigcaptionafterprintegrityfigurequiredforeignObjectforeignobjectformactionautocompleteerrorformenctypemustmatchallengeformmethodformnovalidatetimeformtargethgrouposterhiddenhigh2hreflanghttp-equivideonclickiframeimageimglyph3isindexismappletitemtypemarqueematheadersortedmaxlength4minlength5mtextareadonlymultiplemutedoncloseamlessourceoncontextmenuitemidoncopyoncuechangeoncutondblclickondragendondragenterondragexitemreferrerpolicyondragleaveondragoverondragstarticleondropzonemptiedondurationchangeonendedonerroronfocuspaceronhashchangeoninputmodeloninvalidonkeydownloadonkeypresspellcheckedonkeyupreloadonlanguagechangeonloadeddatalistingonloadedmetadatabindexonloadendonloadstartonmessageerroronmousedownonmouseenteronmouseleaveonmousemoveonmouseoutputonmouseoveronmouseupromptonmousewheelonofflineononlineonpagehidesclassectionbluronpageshowbronpastepublicontenteditableonpausemaponplayingonpopstateonprogressrcdocodeferonratechangeonrejectionhandledonresetonresizesrclangonscrollonsecuritypolicyviolationauxclickonseekedonseekingonselectedonshowidth6onsortableonstalledonstorageonsubmitemscopedonsuspendontoggleonunhandledrejectionbeforeprintonunloadonvolumechangeonwaitingonwheeloptimumanifestrongoptionbeforeunloaddressrcsetstylesummarysupsvgsystemplateworkertypewrap",b,(b+c>>>0));};$ptrType(B).prototype.String=function(){return new B(this.$get()).String();};B.prototype.string=function(){var a;a=this.$val;return $substring("abbradiogrouparamainavalueaccept-charsetbodyaccesskeygenobrbasefontimeupdateviacacheightmlabelooptgroupatternoembedetailsampictureversedfnoframesetdirnameterowspanomoduleacronymalignmarkbdialogallowpaymentrequestrikeytypeallowusermediagroupingaltfooterubyasyncanvasidefaultitleaudioncancelautofocusandboxmplaceholderautoplaysinlinebdoncanplaythrough1bgsoundisabledivarbigblinkindraggablegendblockquotebuttonabortcitempropenoncecolgrouplaintextrackcolorcolspannotation-xmlcommandcontrolshapecoordslotranslatecrossoriginsmallowfullscreenoscriptfacenterfieldsetfigcaptionafterprintegrityfigurequiredforeignObjectforeignobjectformactionautocompleteerrorformenctypemustmatchallengeformmethodformnovalidatetimeformtargethgrouposterhiddenhigh2hreflanghttp-equivideonclickiframeimageimglyph3isindexismappletitemtypemarqueematheadersortedmaxlength4minlength5mtextareadonlymultiplemutedoncloseamlessourceoncontextmenuitemidoncopyoncuechangeoncutondblclickondragendondragenterondragexitemreferrerpolicyondragleaveondragoverondragstarticleondropzonemptiedondurationchangeonendedonerroronfocuspaceronhashchangeoninputmodeloninvalidonkeydownloadonkeypresspellcheckedonkeyupreloadonlanguagechangeonloadeddatalistingonloadedmetadatabindexonloadendonloadstartonmessageerroronmousedownonmouseenteronmouseleaveonmousemoveonmouseoutputonmouseoveronmouseupromptonmousewheelonofflineononlineonpagehidesclassectionbluronpageshowbronpastepublicontenteditableonpausemaponplayingonpopstateonprogressrcdocodeferonratechangeonrejectionhandledonresetonresizesrclangonscrollonsecuritypolicyviolationauxclickonseekedonseekingonselectedonshowidth6onsortableonstalledonstorageonsubmitemscopedonsuspendontoggleonunhandledrejectionbeforeprintonunloadonvolumechangeonwaitingonwheeloptimumanifestrongoptionbeforeunloaddressrcsetstylesummarysupsvgsystemplateworkertypewrap",(a>>>8>>>0),((a>>>8>>>0)+((a&255)>>>0)>>>0));};$ptrType(B).prototype.string=function(){return new B(this.$get()).string();};C=function(a,b){var a,b,c,d,e;c=b;d=0;while(true){if(!(d=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+e])>>>0))))>>>0;a=$imul(a,(16777619))>>>0;d++;}return a;};D=function(a,b){var a,b,c,d,e,f;c=b;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(!((a.charCodeAt(e)===f))){return false;}d++;}return true;};E=function(a){var a,b,c,d,e,f;if((a.$length===0)||a.$length>25){return 0;}b=C(2177757454,a);d=(c=(b&511)>>>0,((c<0||c>=A.length)?($throwRuntimeError("index out of range"),undefined):A[c]));if((((((d&255)>>>0)>>0))===a.$length)&&D(new B(d).string(),a)){return d;}f=(e=(((b>>>16>>>0))&511)>>>0,((e<0||e>=A.length)?($throwRuntimeError("index out of range"),undefined):A[e]));if((((((f&255)>>>0)>>0))===a.$length)&&D(new B(f).string(),a)){return f;}return 0;};$pkg.Lookup=E;F=function(a){var a,b;b=E(a);if(!((b===0))){return new B(b).String();}return($bytesToString(a));};$pkg.String=F;B.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"string",name:"string",pkg:"github.com/88250/lute/html/atom",typ:$funcType([],[$String],false)}];$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:A=$toNativeArray($kindUint32,[0,58890,189444,0,11273,35592,0,408072,463110,0,411909,0,166155,79618,235275,0,84739,70917,96777,0,192773,176386,231172,184070,0,62982,174086,178184,103687,17934,65285,302342,0,71944,403720,197125,382994,0,95236,335110,209156,327436,360199,369673,115719,0,0,114437,390404,190474,0,1537,350474,429076,0,272903,0,0,15112,0,0,0,0,4867,96004,218888,198662,0,45570,0,185606,462339,361220,147209,361990,0,109315,100106,216834,0,375048,390405,214274,0,0,0,208901,54791,374538,281353,241929,0,0,238085,276230,109320,0,0,91394,0,0,15362,346121,210694,0,298256,0,0,277772,38404,62725,352516,212227,0,125446,199938,452366,39940,408582,38917,232198,343052,376838,0,0,113157,0,204552,0,0,41986,269064,209159,379916,395289,0,304392,321547,126724,307216,6662,157702,0,0,0,439054,8455,161299,49427,10244,68103,408584,138756,124165,0,427016,0,0,412418,46596,0,2817,0,0,437000,23812,91144,0,0,0,271111,45066,0,424713,217349,413446,105736,0,0,422153,94981,0,241926,42754,159236,76039,35589,5381,418313,0,0,43527,104962,0,514,140808,167949,41480,27655,433677,102662,193799,459783,0,0,64260,353285,259083,143623,0,0,0,56590,315147,0,0,0,92931,305412,208388,281349,0,0,256522,187906,0,111113,0,324364,0,0,293127,290819,0,220936,47619,212233,52993,401162,0,359427,0,15108,451334,0,267024,0,35080,0,263432,0,423173,32776,244235,260613,77571,391431,198403,0,0,257,152579,67333,280839,218628,173066,468484,0,146434,289546,26626,0,214786,222981,62211,378116,28162,247050,0,40708,0,448264,231176,363271,0,442633,0,312841,0,228877,0,355590,261127,37635,61188,150536,283913,45317,0,363012,412930,115716,142858,286217,420616,85257,461571,3073,0,264713,233734,105476,239370,0,330507,0,421123,296707,24328,0,0,0,39943,227334,136712,107268,132099,152589,371978,0,167175,161294,217608,0,161804,87810,122376,67842,0,144908,0,155917,206599,367111,386562,20998,214787,37639,127497,22020,214793,296455,463880,253707,14850,0,376835,449798,0,30724,455431,348424,0,78091,181254,132613,444935,117002,291850,29191,66310,73993,3077,0,287496,283139,224263,47363,203014,188420,389384,0,302348,0,52226,180234,69637,458501,53766,368134,195590,4100,0,31495,0,0,202245,0,304388,22789,0,250126,87554,0,341510,354311,0,446727,187140,89090,416009,93443,16900,0,422914,209158,317961,108037,159242,139270,14084,365829,305415,98566,0,170761,149510,58885,0,0,55556,16132,317966,225544,34563,378629,49923,104963,336651,176650,465930,0,249095,0,0,1,202755,16396,89607,12806,9989,0,0,410630,0,9473,26119,0,0,0,85264,0,186114,456966,94211,0,413960,294919,0,369670,0,309252,262918,0,393224,129803,357130,4,37378,363279,160262,81931,274695,188424,0,333322,387591,80904,405769,0,423174,0,778,0,229387,339465,0,182790,133135,310792,0,0,200455,6670,175630,0,0,117006,28165,137222,47878,120583]);}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); $packages["github.com/88250/lute/lex"]=(function(){var $pkg={},$init,A,B,C,AN,AP,AQ,AR,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AO;A=$packages["bytes"];B=$packages["unicode"];C=$packages["unicode/utf8"];AN=$pkg.Lexer=$newType(0,$kindStruct,"lex.Lexer",true,"github.com/88250/lute/lex",true,function(input_,length_,offset_,width_){this.$val=this;if(arguments.length===0){this.input=AP.nil;this.length=0;this.offset=0;this.width=0;return;}this.input=input_;this.length=length_;this.offset=offset_;this.width=width_;});AP=$sliceType($Uint8);AQ=$sliceType(AP);AR=$ptrType(AN);D=function(a){var a;return(32===a)||(10===a)||(9===a)||(11===a)||(12===a)||(13===a);};$pkg.IsWhitespace=D;E=function(a){var a;return B.IsSpace(a)||B.Is(B.Zs,a);};$pkg.IsUnicodeWhitespace=E;F=function(a){var a;return 48<=a&&57>=a;};$pkg.IsDigit=F;G=function(a){var a;return F(a)||a>=97&&a<=102||a>=65&&a<=70;};$pkg.IsHexDigit=G;H=function(a){var a;if(a>=97&&a<=122){return(a-97<<24>>>24)+65<<24>>>24;}return a;};$pkg.TokenToUpper=H;I=function(a){var a;return(33<=a&&47>=a)||(58<=a&&64>=a)||(91<=a&&96>=a)||(123<=a&&126>=a);};$pkg.IsASCIIPunct=I;J=function(a){var a;return(65<=a&&90>=a)||(97<=a&&122>=a);};$pkg.IsASCIILetter=J;K=function(a){var a;return(65<=a&&90>=a)||(97<=a&&122>=a)||(48<=a&&57>=a);};$pkg.IsASCIILetterNum=K;L=function(a){var a,b,c,d;b=a;c=0;while(true){if(!(c=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+c]);if(!K(d)){return false;}c++;}return true;};$pkg.IsASCIILetterNums=L;M=function(a){var a;return(65<=a&&90>=a)||(97<=a&&122>=a)||(48<=a&&57>=a)||(45===a);};$pkg.IsASCIILetterNumHyphen=M;N=function(a){var a;return B.IsControl(((a>>0)));};$pkg.IsControl=N;O=function(a){var a,b,c,d;b=a;c=0;while(true){if(!(c=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+c]);if(!((32===d))){return false;}c++;}return true;};$pkg.IsBlank=O;P=function(a,b){var a,b,c,d,e,f,g;c=AQ.nil;d=a.$length;e=0;f=0;g=AP.nil;while(true){if(!(e=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+e]);if(!((b===f))){g=$append(g,f);e=e+(1)>>0;continue;}c=$append(c,g);g=new AP([]);e=e+(1)>>0;}if(0=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+g]);if(!((b===e))||AC(a,g)){f=$append(f,e);g=g+(1)>>0;continue;}c=$append(c,f);f=new AP([]);g=g+(1)>>0;}if(0=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+e]);if(g===b){((f<0||f>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f]=c);}e++;}return a;};$pkg.ReplaceAll=R;S=function(a){var a,b,c,d,e;b=a.$length;c=0;d=b-1>>0;while(true){if(!(0<=d)){break;}c=((d<0||d>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+d]);if(!((10===c))&&!((32===c))){break;}if((10===(e=d-1>>0,((e<0||e>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+e])))&&((32===c)||(10===c))){a=$subslice(a,0,d);}d=d-(1)>>0;}return a;};$pkg.ReplaceNewlineSpace=S;T=function(a){var a,b,c;b=AP.nil;c=U(a);b=c[2];return b;};$pkg.TrimWhitespace=T;U=function(a){var a,b,c,d,e,f,g,h,i,j,k,l;b=AP.nil;c=AP.nil;d=AP.nil;e=a.$length;if(0===e){f=AP.nil;g=AP.nil;h=a;b=f;c=g;d=h;return[b,c,d];}i=0;j=e-1>>0;k=i;l=j;while(true){if(!(k=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+k]))){break;}k=k+(1)>>0;}b=$subslice(a,0,k);if(k===e){k=k-(1)>>0;}while(true){if(!(0<=l)){break;}if(!D(((l<0||l>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+l]))){break;}l=l-(1)>>0;}if(l>0;}if(0>0),e);}d=$subslice(a,k,(l+1>>0));return[b,c,d];};$pkg.Trim=U;V=function(a){var a,b,c,d,e,f,g,h,i;b=AP.nil;c=AP.nil;d=a.$length;if(1>d){e=AP.nil;f=a;b=e;c=f;return[b,c];}g=d-1>>0;while(true){if(!(0<=g)){break;}if(!D(((g<0||g>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+g]))){break;}b=$append(b,((g<0||g>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+g]));g=g-(1)>>0;}h=b;i=$subslice(a,0,(g+1>>0));b=h;c=i;return[b,c];};$pkg.TrimRight=V;W=function(a){var a,b,c,d,e,f,g,h,i;b=AP.nil;c=AP.nil;d=a.$length;if(1>d){e=AP.nil;f=a;b=e;c=f;return[b,c];}g=0;while(true){if(!(g=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+g]))){break;}b=$append(b,((g<0||g>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+g]));g=g+(1)>>0;}h=b;i=$subslice(a,g);b=h;c=i;return[b,c];};$pkg.TrimLeft=W;X=function(a,b){var a,b,c,d;c=0;d=a.$length;while(true){if(!(c=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+c])))){break;}c=c+(1)>>0;}return c;};$pkg.Accept=X;Y=function(a,b){var a,b,c,d,e,f,g,h,i;c=0;d=a.$length;e=b.$length;f=0;while(true){if(!(f=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+h]);c=Z(g,i);if(0<=c){return c;}h=h+(1)>>0;}f=f+(1)>>0;}c=-1;return c;};$pkg.AcceptTokenss=Y;Z=function(a,b){var a,b,c,d;c=0;d=b.$length;while(true){if(!(c=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+c])===((c<0||c>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+c])))){c=-1;return c;}c=c+(1)>>0;}return c;};$pkg.AcceptTokens=Z;AA=function(a){var a,b,c,d;b=a;c=0;while(true){if(!(c=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+c]);if(!((32===d))&&!((9===d))&&!((10===d))){return false;}c++;}return true;};$pkg.IsBlankLine=AA;AB=function(a){var a,b,c,d,e,f,g;b=AQ.nil;c=0;b=$append(b,new AP([]));d=false;e=a;f=0;while(true){if(!(f=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+f]);if(D(g)){if(!d){c=c+(1)>>0;b=$append(b,new AP([]));}d=true;}else{((c<0||c>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+c]=$append(((c<0||c>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+c]),g));d=false;}f++;}return b;};$pkg.SplitWhitespace=AB;AC=function(a,b){var a,b,c,d,e;if(!I(((b<0||b>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+b]))){return false;}c=0;d=b-1>>0;while(true){if(!(0<=d)){break;}if(!((92===((d<0||d>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+d])))){break;}c=c+(1)>>0;d=d-(1)>>0;}return!((0===(e=c%2,e===e?e:$throwRuntimeError("integer divide by zero"))));};$pkg.IsBackslashEscapePunct=AC;AD=function(a){var a,b,c,d,e,f,g;b=0;c=0;d=0;e=a;f=0;while(true){if(!(f=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+f]);if(10===g){b=b+(1)>>0;}else if(32===g){c=c+(1)>>0;}else if(9===g){d=d+(1)>>0;}f++;}return[b,c,d];};$pkg.StatWhitespace=AD;AE=function(a){var a,b,c,d,e,f,g,h,i,j;b=false;c=AP.nil;d=AP.nil;e=W(a);c=e[0];d=e[1];f=AD(c);g=f[0];if(1=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+b]);}return 0;};$pkg.Peek=AF;AG=function(a){var a,b,c;b=0;c=0;while(true){if(!(c=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+c])&192)>>>0))===128))){if(((c<0||c>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+c])<127){b=b+(1)>>0;}else{b=b+(2)>>0;}}c=c+(1)>>0;}return b;};$pkg.BytesShowLength=AG;AH=function(a){var{a,b,c,d,e,f,g,h,i,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=new A.Buffer.ptr(AP.nil,0,0);c=0;d=0;e=0;case 1:if(!(e>0;}else{d=0;}i=b.WriteByte(f);$s=11;case 11:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}i;e=e+(1)>>0;$s=1;continue;case 2:$s=-1;return b.String();}return;}var $f={$blk:AH,$c:true,$r,a,b,c,d,e,f,g,h,i,$s};return $f;};$pkg.RepeatBackslashBeforePipe=AH;AI=function(a){var a,b,c;b=0;while(true){if(!(b=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+b]))){c=$appendSlice(new AP([92]),$subslice(a,b));a=$subslice(a,0,b);a=$appendSlice(a,c);b=b+(1)>>0;}b=b+(1)>>0;}return a;};$pkg.EscapeCommonMarkers=AI;AJ=function(a){var a,b,c;b=0;while(true){if(!(b=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+b]))){c=$appendSlice(new AP([92]),$subslice(a,b));a=$subslice(a,0,b);a=$appendSlice(a,c);b=b+(1)>>0;}b=b+(1)>>0;}return a;};$pkg.EscapeProtyleMarkers=AJ;AK=function(a){var a,b;b=a;if((b===(42))||(b===(95))||(b===(92))||(b===(96))||(b===(126))||(b===(36))){return true;}else{return false;}};$pkg.IsCommonInlineMarker=AK;AL=function(a){var a,b;b=a;if((b===(42))||(b===(95))||(b===(92))||(b===(96))||(b===(126))||(b===(36))||(b===(61))||(b===(94))||(b===(60))||(b===(62))){return true;}else{return false;}};$pkg.IsProtyleInlineMarker=AL;AM=function(a){var a,b;b=a;if((b===(42))||(b===(95))||(b===(91))||(b===(33))||(b===(10))||(b===(92))||(b===(96))||(b===(60))||(b===(93))||(b===(38))||(b===(126))||(b===(36))||(b===(123))||(b===(40))||(b===(61))||(b===(35))){return true;}else{return false;}};$pkg.IsMarker=AM;AO=function(a){var a,b,c,d;b=AR.nil;b=new AN.ptr(a,a.$length,0,0);if(0>0,((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]))))){b.input=$append(b.input,10);b.length=b.length+(1)>>0;}return b;};$pkg.NewLexer=AO;AN.ptr.prototype.NextLine=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;a=AP.nil;b=this;if(b.offset>=b.length){return a;}c=0;d=0;e=c;f=d;g=b.offset;while(true){if(!(g=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+g]));if(10===e){g=g+(1)>>0;break;}else if(13===e){if(g<(b.length-1>>0)){f=(i=b.input,j=g+1>>0,((j<0||j>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+j]));if(10===f){b.input=$appendSlice($subslice(b.input,0,g),$subslice(b.input,(g+1>>0)));b.length=b.length-(1)>>0;}else{(k=b.input,((g<0||g>=k.$length)?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+g]=10));}}else{(l=b.input,((g<0||g>=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+g]=10));}g=g+(1)>>0;break;}else if(0===e){b.input=$append(b.input,0,0);$copySlice($subslice(b.input,(g+2>>0)),$subslice(b.input,g));m=239;n=191;o=189;(p=b.input,((g<0||g>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+g]=m));(q=b.input,r=g+1>>0,((r<0||r>=q.$length)?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+r]=n));(s=b.input,t=g+2>>0,((t<0||t>=s.$length)?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+t]=o));b.length=b.length+(2)>>0;b.width=3;g=g+(b.width)>>0;continue;}if(128<=e){u=C.DecodeRune($subslice(b.input,g));b.width=u[1];}else{b.width=1;}g=g+(b.width)>>0;}a=$subslice(b.input,b.offset,g);b.offset=g;return a;};AN.prototype.NextLine=function(){return this.$val.NextLine();};AR.methods=[{prop:"NextLine",name:"NextLine",pkg:"",typ:$funcType([],[AP],false)}];AN.init("github.com/88250/lute/lex",[{prop:"input",name:"input",embedded:false,exported:false,typ:AP,tag:""},{prop:"length",name:"length",embedded:false,exported:false,typ:$Int,tag:""},{prop:"offset",name:"offset",embedded:false,exported:false,typ:$Int,tag:""},{prop:"width",name:"width",embedded:false,exported:false,typ:$Int,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); $packages["github.com/88250/lute/html"]=(function(){var $pkg={},$init,J,E,F,H,I,D,G,A,B,C,O,P,Q,R,S,Z,AG,AI,AJ,BK,BO,BQ,BS,BT,DC,DD,DE,DF,DG,DH,DI,DJ,DK,DL,DM,DN,DO,DP,DQ,DR,V,W,AB,AF,AH,BP,DB,BY,BZ,CA,CB,CC,CD,CE,CF,CQ,CY,CZ,K,L,M,N,T,U,X,Y,AA,AC,AD,AE,AK,AL,AM,AN,AO,AP,AQ,AR,AS,AT,AU,AV,AW,AX,AY,AZ,BA,BB,BC,BD,BE,BF,BG,BH,BI,BJ,BM,BN,BR,BU,BV,BW,BX,CG,CH,CI,CJ,CK,CL,CM,CR,CS,CT,CU,CV,CW,CX,DA;J=$packages["bufio"];E=$packages["bytes"];F=$packages["errors"];H=$packages["github.com/88250/lute/editor"];I=$packages["github.com/88250/lute/html/atom"];D=$packages["github.com/88250/lute/lex"];G=$packages["io"];A=$packages["strconv"];B=$packages["strings"];C=$packages["unicode/utf8"];O=$pkg.TokenType=$newType(4,$kindUint32,"html.TokenType",true,"github.com/88250/lute/html",true,null);P=$pkg.Attribute=$newType(0,$kindStruct,"html.Attribute",true,"github.com/88250/lute/html",true,function(Namespace_,Key_,Val_){this.$val=this;if(arguments.length===0){this.Namespace="";this.Key="";this.Val="";return;}this.Namespace=Namespace_;this.Key=Key_;this.Val=Val_;});Q=$pkg.Token=$newType(0,$kindStruct,"html.Token",true,"github.com/88250/lute/html",true,function(Type_,DataAtom_,Data_,Attr_){this.$val=this;if(arguments.length===0){this.Type=0;this.DataAtom=0;this.Data="";this.Attr=DG.nil;return;}this.Type=Type_;this.DataAtom=DataAtom_;this.Data=Data_;this.Attr=Attr_;});R=$pkg.span=$newType(0,$kindStruct,"html.span",true,"github.com/88250/lute/html",false,function(start_,end_){this.$val=this;if(arguments.length===0){this.start=0;this.end=0;return;}this.start=start_;this.end=end_;});S=$pkg.Tokenizer=$newType(0,$kindStruct,"html.Tokenizer",true,"github.com/88250/lute/html",true,function(r_,tt_,err_,readErr_,raw_,buf_,maxBuf_,data_,pendingAttr_,attr_,nAttrReturned_,rawTag_,textIsRaw_,convertNUL_,allowCDATA_){this.$val=this;if(arguments.length===0){this.r=$ifaceNil;this.tt=0;this.err=$ifaceNil;this.readErr=$ifaceNil;this.raw=new R.ptr(0,0);this.buf=DC.nil;this.maxBuf=0;this.data=new R.ptr(0,0);this.pendingAttr=DJ.zero();this.attr=DK.nil;this.nAttrReturned=0;this.rawTag="";this.textIsRaw=false;this.convertNUL=false;this.allowCDATA=false;return;}this.r=r_;this.tt=tt_;this.err=err_;this.readErr=readErr_;this.raw=raw_;this.buf=buf_;this.maxBuf=maxBuf_;this.data=data_;this.pendingAttr=pendingAttr_;this.attr=attr_;this.nAttrReturned=nAttrReturned_;this.rawTag=rawTag_;this.textIsRaw=textIsRaw_;this.convertNUL=convertNUL_;this.allowCDATA=allowCDATA_;});Z=$pkg.writer=$newType(8,$kindInterface,"html.writer",true,"github.com/88250/lute/html",false,null);AG=$pkg.parser=$newType(0,$kindStruct,"html.parser",true,"github.com/88250/lute/html",false,function(tokenizer_,tok_,hasSelfClosingToken_,doc_,oe_,afe_,head_,form_,scripting_,framesetOK_,templateStack_,im_,originalIM_,fosterParenting_,quirks_,fragment_,context_){this.$val=this;if(arguments.length===0){this.tokenizer=DO.nil;this.tok=new Q.ptr(0,0,"",DG.nil);this.hasSelfClosingToken=false;this.doc=DE.nil;this.oe=BS.nil;this.afe=BS.nil;this.head=DE.nil;this.form=DE.nil;this.scripting=false;this.framesetOK=false;this.templateStack=BT.nil;this.im=$throwNilPointerError;this.originalIM=$throwNilPointerError;this.fosterParenting=false;this.quirks=false;this.fragment=false;this.context=DE.nil;return;}this.tokenizer=tokenizer_;this.tok=tok_;this.hasSelfClosingToken=hasSelfClosingToken_;this.doc=doc_;this.oe=oe_;this.afe=afe_;this.head=head_;this.form=form_;this.scripting=scripting_;this.framesetOK=framesetOK_;this.templateStack=templateStack_;this.im=im_;this.originalIM=originalIM_;this.fosterParenting=fosterParenting_;this.quirks=quirks_;this.fragment=fragment_;this.context=context_;});AI=$pkg.scope=$newType(4,$kindInt,"html.scope",true,"github.com/88250/lute/html",false,null);AJ=$pkg.insertionMode=$newType(4,$kindFunc,"html.insertionMode",true,"github.com/88250/lute/html",false,null);BK=$pkg.ParseOption=$newType(4,$kindFunc,"html.ParseOption",true,"github.com/88250/lute/html",true,null);BO=$pkg.NodeType=$newType(4,$kindUint32,"html.NodeType",true,"github.com/88250/lute/html",true,null);BQ=$pkg.Node=$newType(0,$kindStruct,"html.Node",true,"github.com/88250/lute/html",true,function(Parent_,FirstChild_,LastChild_,PrevSibling_,NextSibling_,Type_,DataAtom_,Data_,Namespace_,Attr_){this.$val=this;if(arguments.length===0){this.Parent=DE.nil;this.FirstChild=DE.nil;this.LastChild=DE.nil;this.PrevSibling=DE.nil;this.NextSibling=DE.nil;this.Type=0;this.DataAtom=0;this.Data="";this.Namespace="";this.Attr=DG.nil;return;}this.Parent=Parent_;this.FirstChild=FirstChild_;this.LastChild=LastChild_;this.PrevSibling=PrevSibling_;this.NextSibling=NextSibling_;this.Type=Type_;this.DataAtom=DataAtom_;this.Data=Data_;this.Namespace=Namespace_;this.Attr=Attr_;});BS=$pkg.nodeStack=$newType(12,$kindSlice,"html.nodeStack",true,"github.com/88250/lute/html",false,null);BT=$pkg.insertionModeStack=$newType(12,$kindSlice,"html.insertionModeStack",true,"github.com/88250/lute/html",false,null);DC=$sliceType($Uint8);DD=$sliceType(I.Atom);DE=$ptrType(BQ);DF=$ptrType(P);DG=$sliceType(DF);DH=$sliceType($String);DI=$arrayType($Uint8,2);DJ=$arrayType(R,2);DK=$sliceType(DJ);DL=$ptrType(BS);DM=$ptrType(BT);DN=$sliceType(BK);DO=$ptrType(S);DP=$sliceType(DE);DQ=$sliceType($Int32);DR=$ptrType(AG);K=function(a){var a,b,c,d;b=DC.nil;if(DC.nil===a){return b;}a=(new DC($stringToBytes(L(($bytesToString(a))))));c=a.$length;b=$makeSlice(DC,0,c);d=0;while(true){if(!(d>0));}b=$append(b,((d<0||d>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+d]));d=d+(1)>>0;}return b;};$pkg.UnescapeBytes=K;L=function(a){var a,b,c,d,e,f,g,h,i,j,k;b=B.IndexByte(a,38);if(b<0){return a;}c=false;d="";e=0;while(true){if(!(b0){c=true;break;}}b=b+(1)>>0;}if(!c){return a;}g=$makeSlice(DC,((a.length-e>>0)+d.length>>0));$copyString($subslice(g,0,b),a);h=$copyString($subslice(g,b),d);i=b+h>>0;b=b+(e)>>0;while(true){if(!(b0){h=$copyString($subslice(g,i),d);i=i+(h)>>0;b=b+(e)>>0;continue;}}((i<0||i>=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+i]=j);i=i+(1)>>0;b=b+(1)>>0;}return($bytesToString($subslice(g,0,i)));};$pkg.HtmlUnescapeString=L;M=function(a){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o;b=0;c=0;d=1;while(true){if(!(d>0;if(c>31){return["",0];}}else if((e===59)){g=(h=$mapIndex($pkg.Entities,$String.keyFor($substring(a,(d-c>>0),(d+1>>0)))),h!==undefined?[h.v,true]:["",false]);i=g[0];j=g[1];if(j){return[i,d+1>>0];}return["",0];}else{return["",0];}}else if(f===(3)){if(D.IsHexDigit(e)){c=1;b=5;}else{return["",0];}}else if(f===(4)){if(D.IsDigit(e)){c=c+(1)>>0;if(c>8){return["",0];}}else if((e===59)){k=A.ParseInt($substring(a,(d-c>>0),d),10,32);l=k[0];if(!N(l)){return["\xEF\xBF\xBD",d+1>>0];}return[($encodeRune((((l.$low+((l.$high>>31)*4294967296))>>0)))),d+1>>0];}else{return["",0];}}else if(f===(5)){if(D.IsHexDigit(e)){c=c+(1)>>0;if(c>8){return["",0];}}else if((e===59)){m=A.ParseInt($substring(a,(d-c>>0),d),16,32);n=m[0];o=m[1];if(!($interfaceIsEqual($ifaceNil,o))){return["\xEF\xBF\xBD",d+1>>0];}if(!N(n)){return["\xEF\xBF\xBD",d+1>>0];}return[($encodeRune((((n.$low+((n.$high>>31)*4294967296))>>0)))),d+1>>0];}else{return["",0];}}d=d+(1)>>0;}return["",0];};N=function(a){var a,b,c;if(!C.ValidRune((((a.$low+((a.$high>>31)*4294967296))>>0)))){return false;}else if((a.$high>0||(a.$high===0&&a.$low>=64976))&&(a.$high<0||(a.$high===0&&a.$low<=65007))){return false;}else if((b=new $Int64(a.$high&0,(a.$low&65535)>>>0),(b.$high===0&&b.$low===65535))||(c=new $Int64(a.$high&0,(a.$low&65535)>>>0),(c.$high===0&&c.$low===65534))){return false;}else if((a.$high>0||(a.$high===0&&a.$low>=0))&&(a.$high<0||(a.$high===0&&a.$low<=8))){return false;}else if((a.$high===0&&a.$low===11)){return false;}else if((a.$high>0||(a.$high===0&&a.$low>=14))&&(a.$high<0||(a.$high===0&&a.$low<=31))){return false;}else if((a.$high>0||(a.$high===0&&a.$low>=127))&&(a.$high<0||(a.$high===0&&a.$low<=159))){return false;}return true;};O.prototype.String=function(){var a,b;a=this.$val;b=a;if(b===(0)){return"Error";}else if(b===(1)){return"Text";}else if(b===(2)){return"StartTag";}else if(b===(3)){return"EndTag";}else if(b===(4)){return"SelfClosingTag";}else if(b===(5)){return"Comment";}else if(b===(6)){return"Doctype";}return"Invalid("+A.Itoa(((a>>0)))+")";};$ptrType(O).prototype.String=function(){return new O(this.$get()).String();};Q.ptr.prototype.tagString=function(){var{a,b,c,d,e,f,g,h,i,j,k,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;if(a.Attr.$length===0){$s=-1;return a.Data;}b=E.NewBufferString(a.Data);c=a.Attr;d=0;case 1:if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(e.Key==="caretreplacement"){$s=3;continue;}$s=4;continue;case 3:f=b.WriteString("caretreplacement");$s=5;case 5:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}f;d++;$s=1;continue;case 4:g=b.WriteByte(32);$s=6;case 6:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}g;h=b.WriteString(e.Key);$s=7;case 7:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}h;i=b.WriteString("=\"");$s=8;case 8:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}i;j=CU(b,e.Val);$s=9;case 9:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}j;k=b.WriteByte(34);$s=10;case 10:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}k;d++;$s=1;continue;case 2:$s=-1;return b.String();}return;}var $f={$blk:Q.ptr.prototype.tagString,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,$s};return $f;};Q.prototype.tagString=function(){return this.$val.tagString();};Q.ptr.prototype.String=function(){var{a,b,c,d,e,f,g,h,i,j,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;b=a.Type;if(b===(0)){$s=2;continue;}if(b===(1)){$s=3;continue;}if(b===(2)){$s=4;continue;}if(b===(3)){$s=5;continue;}if(b===(4)){$s=6;continue;}if(b===(5)){$s=7;continue;}if(b===(6)){$s=8;continue;}$s=9;continue;case 2:$s=-1;return"";case 3:c=CV(a.Data);$s=10;case 10:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;$s=11;case 11:return d;case 4:e=$clone(a,Q).tagString();$s=12;case 12:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f="<"+e+">";$s=13;case 13:return f;case 5:g=$clone(a,Q).tagString();$s=14;case 14:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h="";$s=15;case 15:return h;case 6:i=$clone(a,Q).tagString();$s=16;case 16:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}j="<"+i+"/>";$s=17;case 17:return j;case 7:$s=-1;return"";case 8:$s=-1;return"";case 9:case 1:$s=-1;return"Invalid("+A.Itoa(((a.Type>>0)))+")";}return;}var $f={$blk:Q.ptr.prototype.String,$c:true,$r,a,b,c,d,e,f,g,h,i,j,$s};return $f;};Q.prototype.String=function(){return this.$val.String();};S.ptr.prototype.AllowCDATA=function(a){var a,b;b=this;b.allowCDATA=a;};S.prototype.AllowCDATA=function(a){return this.$val.AllowCDATA(a);};S.ptr.prototype.NextIsNotRawText=function(){var a;a=this;a.rawTag="";};S.prototype.NextIsNotRawText=function(){return this.$val.NextIsNotRawText();};S.ptr.prototype.Err=function(){var a;a=this;if(!((a.tt===0))){return $ifaceNil;}return a.err;};S.prototype.Err=function(){return this.$val.Err();};S.ptr.prototype.readByte=function(){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;if(a.raw.end>=a.buf.$length){$s=1;continue;}$s=2;continue;case 1:if(!($interfaceIsEqual(a.readErr,$ifaceNil))){a.err=a.readErr;$s=-1;return 0;}b=a.buf.$capacity;c=a.raw.end-a.raw.start>>0;d=DC.nil;if(($imul(2,c))>b){d=$makeSlice(DC,c,($imul(2,b)));}else{d=$subslice(a.buf,0,c);}$copySlice(d,$subslice(a.buf,a.raw.start,a.raw.end));e=a.raw.start;if(!((e===0))){a.data.start=a.data.start-(e)>>0;a.data.end=a.data.end-(e)>>0;a.pendingAttr[0].start=a.pendingAttr[0].start-(e)>>0;a.pendingAttr[0].end=a.pendingAttr[0].end-(e)>>0;a.pendingAttr[1].start=a.pendingAttr[1].start-(e)>>0;a.pendingAttr[1].end=a.pendingAttr[1].end-(e)>>0;f=a.attr;g=0;while(true){if(!(g=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+h]))[0].start=(i=a.attr,((h<0||h>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+h]))[0].start-(e)>>0;(l=a.attr,((h<0||h>=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+h]))[0].end=(k=a.attr,((h<0||h>=k.$length)?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+h]))[0].end-(e)>>0;(n=a.attr,((h<0||h>=n.$length)?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+h]))[1].start=(m=a.attr,((h<0||h>=m.$length)?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+h]))[1].start-(e)>>0;(p=a.attr,((h<0||h>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+h]))[1].end=(o=a.attr,((h<0||h>=o.$length)?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+h]))[1].end-(e)>>0;g++;}}q=0;r=c;s=$subslice(d,0,c);a.raw.start=q;a.raw.end=r;a.buf=s;t=0;v=T(a.r,$subslice(d,c,d.$capacity));$s=3;case 3:if($c){$c=false;v=v.$blk();}if(v&&v.$blk!==undefined){break s;}u=v;t=u[0];a.readErr=u[1];if(t===0){a.err=a.readErr;$s=-1;return 0;}a.buf=$subslice(d,0,(c+t>>0));case 2:y=(w=a.buf,x=a.raw.end,((x<0||x>=w.$length)?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+x]));a.raw.end=a.raw.end+(1)>>0;if(a.maxBuf>0&&(a.raw.end-a.raw.start>>0)>=a.maxBuf){a.err=$pkg.ErrBufferExceeded;$s=-1;return 0;}$s=-1;return y;}return;}var $f={$blk:S.ptr.prototype.readByte,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,$s};return $f;};S.prototype.readByte=function(){return this.$val.readByte();};S.ptr.prototype.Buffered=function(){var a;a=this;return $subslice(a.buf,a.raw.end);};S.prototype.Buffered=function(){return this.$val.Buffered();};T=function(a,b){var{a,b,c,d,e,f,g,$s,$r,$c}=$restore(this,{a,b});$s=$s||0;s:while(true){switch($s){case 0:c=0;case 1:if(!(c<100)){$s=2;continue;}e=a.Read(b);$s=3;case 3:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}d=e;f=d[0];g=d[1];if(!((f===0))||!($interfaceIsEqual(g,$ifaceNil))){$s=-1;return[f,g];}c=c+(1)>>0;$s=1;continue;case 2:$s=-1;return[0,G.ErrNoProgress];}return;}var $f={$blk:T,$c:true,$r,a,b,c,d,e,f,g,$s};return $f;};S.ptr.prototype.skipWhiteSpace=function(){var{a,b,c,d,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;if(!($interfaceIsEqual(a.err,$ifaceNil))){$s=-1;return;}case 1:b=a.readByte();$s=3;case 3:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=b;if(!($interfaceIsEqual(a.err,$ifaceNil))){$s=-1;return;}d=c;if((d===(32))||(d===(10))||(d===(13))||(d===(9))||(d===(12))){}else{a.raw.end=a.raw.end-(1)>>0;$s=-1;return;}$s=1;continue;case 2:$s=-1;return;}return;}var $f={$blk:S.ptr.prototype.skipWhiteSpace,$c:true,$r,a,b,c,d,$s};return $f;};S.prototype.skipWhiteSpace=function(){return this.$val.skipWhiteSpace();};S.ptr.prototype.readRawOrRCDATA=function(){var{a,b,c,d,e,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;if(a.rawTag==="script"){$s=1;continue;}$s=2;continue;case 1:$r=a.readScript();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}a.textIsRaw=true;a.rawTag="";$s=-1;return;case 2:case 4:b=a.readByte();$s=6;case 6:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=b;if(!($interfaceIsEqual(a.err,$ifaceNil))){$s=5;continue s;}if(!((c===60))){$s=4;continue s;}d=a.readByte();$s=7;case 7:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}c=d;if(!($interfaceIsEqual(a.err,$ifaceNil))){$s=5;continue s;}if(!((c===47))){$s=4;continue s;}e=a.readRawEndTag();$s=10;case 10:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}if(e||!($interfaceIsEqual(a.err,$ifaceNil))){$s=8;continue;}$s=9;continue;case 8:$s=5;continue s;case 9:$s=4;continue;case 5:a.data.end=a.raw.end;a.textIsRaw=!(a.rawTag==="textarea")&&!(a.rawTag==="title");a.rawTag="";$s=-1;return;}return;}var $f={$blk:S.ptr.prototype.readRawOrRCDATA,$c:true,$r,a,b,c,d,e,$s};return $f;};S.prototype.readRawOrRCDATA=function(){return this.$val.readRawOrRCDATA();};S.ptr.prototype.readRawEndTag=function(){var{a,b,c,d,e,f,g,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;b=0;case 1:if(!(b>>24)))){a.raw.end=a.raw.end-(1)>>0;$s=-1;return false;}b=b+(1)>>0;$s=1;continue;case 2:e=a.readByte();$s=4;case 4:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;if(!($interfaceIsEqual(a.err,$ifaceNil))){$s=-1;return false;}g=f;if((g===(32))||(g===(10))||(g===(13))||(g===(9))||(g===(12))||(g===(47))||(g===(62))){a.raw.end=a.raw.end-((3+a.rawTag.length>>0))>>0;$s=-1;return true;}a.raw.end=a.raw.end-(1)>>0;$s=-1;return false;}return;}var $f={$blk:S.ptr.prototype.readRawEndTag,$c:true,$r,a,b,c,d,e,f,g,$s};return $f;};S.prototype.readRawEndTag=function(){return this.$val.readRawEndTag();};S.ptr.prototype.readScript=function(){var{a,aa,ab,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$deferred,$r,$c}=$restore(this,{});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);a=[a];a[0]=this;$deferred.push([(function(a){return function(){a[0].data.end=a[0].raw.end;};})(a),[]]);b=0;case 1:c=a[0].readByte();$s=2;case 2:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}b=c;if(!($interfaceIsEqual(a[0].err,$ifaceNil))){$s=3;continue;}$s=4;continue;case 3:$s=5;case 5:return;case 4:if(b===60){$s=6;continue;}$s=7;continue;case 6:$s=8;continue;case 7:$s=1;continue;case 8:d=a[0].readByte();$s=9;case 9:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}b=d;if(!($interfaceIsEqual(a[0].err,$ifaceNil))){$s=10;continue;}$s=11;continue;case 10:$s=12;case 12:return;case 11:e=b;if(e===(47)){$s=14;continue;}if(e===(33)){$s=15;continue;}$s=16;continue;case 14:$s=17;continue;$s=16;continue;case 15:$s=18;continue;case 16:case 13:a[0].raw.end=a[0].raw.end-(1)>>0;$s=1;continue;case 17:f=a[0].readRawEndTag();$s=21;case 21:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}if(f||!($interfaceIsEqual(a[0].err,$ifaceNil))){$s=19;continue;}$s=20;continue;case 19:$s=22;case 22:return;case 20:$s=1;continue;case 18:g=a[0].readByte();$s=23;case 23:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}b=g;if(!($interfaceIsEqual(a[0].err,$ifaceNil))){$s=24;continue;}$s=25;continue;case 24:$s=26;case 26:return;case 25:if(b===45){$s=27;continue;}$s=28;continue;case 27:$s=29;continue;case 28:a[0].raw.end=a[0].raw.end-(1)>>0;$s=1;continue;case 29:h=a[0].readByte();$s=30;case 30:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}b=h;if(!($interfaceIsEqual(a[0].err,$ifaceNil))){$s=31;continue;}$s=32;continue;case 31:$s=33;case 33:return;case 32:if(b===45){$s=34;continue;}$s=35;continue;case 34:$s=36;continue;case 35:a[0].raw.end=a[0].raw.end-(1)>>0;$s=1;continue;case 37:i=a[0].readByte();$s=38;case 38:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}b=i;if(!($interfaceIsEqual(a[0].err,$ifaceNil))){$s=39;continue;}$s=40;continue;case 39:$s=41;case 41:return;case 40:j=b;if(j===(45)){$s=43;continue;}if(j===(60)){$s=44;continue;}$s=45;continue;case 43:$s=46;continue;$s=45;continue;case 44:$s=47;continue;case 45:case 42:$s=37;continue;case 46:k=a[0].readByte();$s=48;case 48:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}b=k;if(!($interfaceIsEqual(a[0].err,$ifaceNil))){$s=49;continue;}$s=50;continue;case 49:$s=51;case 51:return;case 50:l=b;if(l===(45)){$s=53;continue;}if(l===(60)){$s=54;continue;}$s=55;continue;case 53:$s=36;continue;$s=55;continue;case 54:$s=47;continue;case 55:case 52:$s=37;continue;case 36:m=a[0].readByte();$s=56;case 56:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}b=m;if(!($interfaceIsEqual(a[0].err,$ifaceNil))){$s=57;continue;}$s=58;continue;case 57:$s=59;case 59:return;case 58:n=b;if(n===(45)){$s=61;continue;}if(n===(60)){$s=62;continue;}if(n===(62)){$s=63;continue;}$s=64;continue;case 61:$s=36;continue;$s=64;continue;case 62:$s=47;continue;$s=64;continue;case 63:$s=1;continue;case 64:case 60:$s=37;continue;case 47:o=a[0].readByte();$s=65;case 65:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}b=o;if(!($interfaceIsEqual(a[0].err,$ifaceNil))){$s=66;continue;}$s=67;continue;case 66:$s=68;case 68:return;case 67:if(b===47){$s=69;continue;}$s=70;continue;case 69:$s=71;continue;case 70:if(97<=b&&b<=122||65<=b&&b<=90){$s=72;continue;}$s=73;continue;case 72:$s=74;continue;case 73:a[0].raw.end=a[0].raw.end-(1)>>0;$s=1;continue;case 71:p=a[0].readRawEndTag();$s=77;case 77:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}if(p||!($interfaceIsEqual(a[0].err,$ifaceNil))){$s=75;continue;}$s=76;continue;case 75:$s=78;case 78:return;case 76:$s=37;continue;case 74:a[0].raw.end=a[0].raw.end-(1)>>0;q=0;case 79:if(!(q<6)){$s=80;continue;}r=a[0].readByte();$s=81;case 81:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}b=r;if(!($interfaceIsEqual(a[0].err,$ifaceNil))){$s=82;continue;}$s=83;continue;case 82:$s=84;case 84:return;case 83:if(!((b==="script".charCodeAt(q)))&&!((b==="SCRIPT".charCodeAt(q)))){$s=85;continue;}$s=86;continue;case 85:a[0].raw.end=a[0].raw.end-(1)>>0;$s=37;continue;case 86:q=q+(1)>>0;$s=79;continue;case 80:s=a[0].readByte();$s=87;case 87:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}b=s;if(!($interfaceIsEqual(a[0].err,$ifaceNil))){$s=88;continue;}$s=89;continue;case 88:$s=90;case 90:return;case 89:t=b;if((t===(32))||(t===(10))||(t===(13))||(t===(9))||(t===(12))||(t===(47))||(t===(62))){$s=92;continue;}$s=93;continue;case 92:$s=94;continue;case 93:case 91:a[0].raw.end=a[0].raw.end-(1)>>0;$s=37;continue;case 94:u=a[0].readByte();$s=95;case 95:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}b=u;if(!($interfaceIsEqual(a[0].err,$ifaceNil))){$s=96;continue;}$s=97;continue;case 96:$s=98;case 98:return;case 97:v=b;if(v===(45)){$s=100;continue;}if(v===(60)){$s=101;continue;}$s=102;continue;case 100:$s=103;continue;$s=102;continue;case 101:$s=104;continue;case 102:case 99:$s=94;continue;case 103:w=a[0].readByte();$s=105;case 105:if($c){$c=false;w=w.$blk();}if(w&&w.$blk!==undefined){break s;}b=w;if(!($interfaceIsEqual(a[0].err,$ifaceNil))){$s=106;continue;}$s=107;continue;case 106:$s=108;case 108:return;case 107:x=b;if(x===(45)){$s=110;continue;}if(x===(60)){$s=111;continue;}$s=112;continue;case 110:$s=113;continue;$s=112;continue;case 111:$s=104;continue;case 112:case 109:$s=94;continue;case 113:y=a[0].readByte();$s=114;case 114:if($c){$c=false;y=y.$blk();}if(y&&y.$blk!==undefined){break s;}b=y;if(!($interfaceIsEqual(a[0].err,$ifaceNil))){$s=115;continue;}$s=116;continue;case 115:$s=117;case 117:return;case 116:z=b;if(z===(45)){$s=119;continue;}if(z===(60)){$s=120;continue;}if(z===(62)){$s=121;continue;}$s=122;continue;case 119:$s=113;continue;$s=122;continue;case 120:$s=104;continue;$s=122;continue;case 121:$s=1;continue;case 122:case 118:$s=94;continue;case 104:aa=a[0].readByte();$s=123;case 123:if($c){$c=false;aa=aa.$blk();}if(aa&&aa.$blk!==undefined){break s;}b=aa;if(!($interfaceIsEqual(a[0].err,$ifaceNil))){$s=124;continue;}$s=125;continue;case 124:$s=126;case 126:return;case 125:if(b===47){$s=127;continue;}$s=128;continue;case 127:$s=129;continue;case 128:a[0].raw.end=a[0].raw.end-(1)>>0;$s=94;continue;case 129:ab=a[0].readRawEndTag();$s=132;case 132:if($c){$c=false;ab=ab.$blk();}if(ab&&ab.$blk!==undefined){break s;}if(ab){$s=130;continue;}$s=131;continue;case 130:a[0].raw.end=a[0].raw.end+(9)>>0;$s=37;continue;case 131:if(!($interfaceIsEqual(a[0].err,$ifaceNil))){$s=133;continue;}$s=134;continue;case 133:$s=135;case 135:return;case 134:$s=94;continue;$s=-1;return;}return;}}catch(err){$err=err;$s=-1;}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:S.ptr.prototype.readScript,$c:true,$r,a,aa,ab,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$deferred};return $f;}}};S.prototype.readScript=function(){return this.$val.readScript();};S.ptr.prototype.readComment=function(){var{a,b,c,d,e,f,$s,$deferred,$r,$c}=$restore(this,{});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);a=[a];a[0]=this;a[0].data.start=a[0].raw.end;$deferred.push([(function(a){return function(){if(a[0].data.end2){b=2;}a[0].data.end=a[0].raw.end-b>>0;$s=6;case 6:return;case 5:e=d;if(e===(45)){$s=8;continue;}if(e===(62)){$s=9;continue;}if(e===(33)){$s=10;continue;}$s=11;continue;case 8:b=b+(1)>>0;$s=1;continue;$s=11;continue;case 9:if(b>=2){$s=12;continue;}$s=13;continue;case 12:a[0].data.end=a[0].raw.end-3>>0;$s=14;case 14:return;case 13:$s=11;continue;case 10:if(b>=2){$s=15;continue;}$s=16;continue;case 15:f=a[0].readByte();$s=17;case 17:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}d=f;if(!($interfaceIsEqual(a[0].err,$ifaceNil))){$s=18;continue;}$s=19;continue;case 18:a[0].data.end=a[0].raw.end;$s=20;case 20:return;case 19:if(d===62){$s=21;continue;}$s=22;continue;case 21:a[0].data.end=a[0].raw.end-4>>0;$s=23;case 23:return;case 22:case 16:case 11:case 7:b=0;$s=1;continue;case 2:$s=-1;return;}return;}}catch(err){$err=err;$s=-1;}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:S.ptr.prototype.readComment,$c:true,$r,a,b,c,d,e,f,$s,$deferred};return $f;}}};S.prototype.readComment=function(){return this.$val.readComment();};S.ptr.prototype.readUntilCloseAngle=function(){var{a,b,c,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;a.data.start=a.raw.end;case 1:b=a.readByte();$s=3;case 3:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=b;if(!($interfaceIsEqual(a.err,$ifaceNil))){a.data.end=a.raw.end;$s=-1;return;}if(c===62){a.data.end=a.raw.end-1>>0;$s=-1;return;}$s=1;continue;case 2:$s=-1;return;}return;}var $f={$blk:S.ptr.prototype.readUntilCloseAngle,$c:true,$r,a,b,c,$s};return $f;};S.prototype.readUntilCloseAngle=function(){return this.$val.readUntilCloseAngle();};S.ptr.prototype.readMarkupDeclaration=function(){var{a,b,c,d,e,f,g,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;a.data.start=a.raw.end;b=DI.zero();c=0;case 1:if(!(c<2)){$s=2;continue;}d=a.readByte();$s=3;case 3:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}((c<0||c>=b.length)?($throwRuntimeError("index out of range"),undefined):b[c]=d);if(!($interfaceIsEqual(a.err,$ifaceNil))){a.data.end=a.raw.end;$s=-1;return 5;}c=c+(1)>>0;$s=1;continue;case 2:if((b[0]===45)&&(b[1]===45)){$s=4;continue;}$s=5;continue;case 4:$r=a.readComment();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return 5;case 5:a.raw.end=a.raw.end-(2)>>0;e=a.readDoctype();$s=9;case 9:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}if(e){$s=7;continue;}$s=8;continue;case 7:$s=-1;return 6;case 8:if(!(a.allowCDATA)){f=false;$s=12;continue s;}g=a.readCDATA();$s=13;case 13:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}f=g;case 12:if(f){$s=10;continue;}$s=11;continue;case 10:a.convertNUL=true;$s=-1;return 1;case 11:$r=a.readUntilCloseAngle();$s=14;case 14:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return 5;}return;}var $f={$blk:S.ptr.prototype.readMarkupDeclaration,$c:true,$r,a,b,c,d,e,f,g,$s};return $f;};S.prototype.readMarkupDeclaration=function(){return this.$val.readMarkupDeclaration();};S.ptr.prototype.readDoctype=function(){var{a,b,c,d,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;b=0;case 1:if(!(b<7)){$s=2;continue;}c=a.readByte();$s=3;case 3:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;if(!($interfaceIsEqual(a.err,$ifaceNil))){a.data.end=a.raw.end;$s=-1;return false;}if(!((d==="DOCTYPE".charCodeAt(b)))&&!((d===("DOCTYPE".charCodeAt(b)+32<<24>>>24)))){a.raw.end=a.data.start;$s=-1;return false;}b=b+(1)>>0;$s=1;continue;case 2:$r=a.skipWhiteSpace();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if(!($interfaceIsEqual(a.err,$ifaceNil))){a.data.start=a.raw.end;a.data.end=a.raw.end;$s=-1;return true;}$r=a.readUntilCloseAngle();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return true;}return;}var $f={$blk:S.ptr.prototype.readDoctype,$c:true,$r,a,b,c,d,$s};return $f;};S.prototype.readDoctype=function(){return this.$val.readDoctype();};S.ptr.prototype.readCDATA=function(){var{a,b,c,d,e,f,g,h,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;b=0;case 1:if(!(b<7)){$s=2;continue;}c=a.readByte();$s=3;case 3:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;if(!($interfaceIsEqual(a.err,$ifaceNil))){a.data.end=a.raw.end;$s=-1;return false;}if(!((d==="[CDATA[".charCodeAt(b)))){a.raw.end=a.data.start;$s=-1;return false;}b=b+(1)>>0;$s=1;continue;case 2:a.data.start=a.raw.end;e=0;case 4:f=a.readByte();$s=6;case 6:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;if(!($interfaceIsEqual(a.err,$ifaceNil))){a.data.end=a.raw.end;$s=-1;return true;}h=g;if(h===(93)){e=e+(1)>>0;}else if(h===(62)){if(e>=2){a.data.end=a.raw.end-3>>0;$s=-1;return true;}e=0;}else{e=0;}$s=4;continue;case 5:$s=-1;return false;}return;}var $f={$blk:S.ptr.prototype.readCDATA,$c:true,$r,a,b,c,d,e,f,g,h,$s};return $f;};S.prototype.readCDATA=function(){return this.$val.readCDATA();};S.ptr.prototype.startTagIn=function(a){var a,b,c,d,e,f,g,h,i;b=this;c=a;d=0;loop:while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(!(((b.data.end-b.data.start>>0)===e.length))){d++;continue loop;}f=0;while(true){if(!(f>0,((h<0||h>=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+h]));if(65<=i&&i<=90){i=i+(32)<<24>>>24;}if(!((i===e.charCodeAt(f)))){d++;continue loop;}f=f+(1)>>0;}return true;}return false;};S.prototype.startTagIn=function(a){return this.$val.startTagIn(a);};S.ptr.prototype.readStartTag=function(){var{a,b,c,d,e,f,g,h,i,j,k,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;$r=a.readTag(true);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if(!($interfaceIsEqual(a.err,$ifaceNil))){$s=-1;return 0;}b=(c=a.buf,d=a.data.start,((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]));e=false;f=b;g=e;if(65<=f&&f<=90){f=f+(32)<<24>>>24;}h=f;if(h===(105)){g=a.startTagIn(new DH(["iframe"]));}else if(h===(110)){g=a.startTagIn(new DH(["noembed","noframes","noscript"]));}else if(h===(112)){g=a.startTagIn(new DH(["plaintext"]));}else if(h===(115)){g=a.startTagIn(new DH(["script","style"]));}else if(h===(116)){g=a.startTagIn(new DH(["textarea","title"]));}else if(h===(120)){g=a.startTagIn(new DH(["xmp"]));}if(g){$s=2;continue;}$s=3;continue;case 2:i=B.ToLower(($bytesToString($subslice(a.buf,a.data.start,a.data.end))));$s=4;case 4:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}a.rawTag=i;case 3:if($interfaceIsEqual(a.err,$ifaceNil)&&((j=a.buf,k=a.raw.end-2>>0,((k<0||k>=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+k]))===47)){$s=-1;return 4;}$s=-1;return 2;}return;}var $f={$blk:S.ptr.prototype.readStartTag,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,$s};return $f;};S.prototype.readStartTag=function(){return this.$val.readStartTag();};S.ptr.prototype.readTag=function(a){var{a,b,c,d,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=this;b.attr=$subslice(b.attr,0,0);b.nAttrReturned=0;$r=b.readTagName();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=b.skipWhiteSpace();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if(!($interfaceIsEqual(b.err,$ifaceNil))){$s=-1;return;}case 3:c=b.readByte();$s=5;case 5:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;if(!($interfaceIsEqual(b.err,$ifaceNil))||(d===62)){$s=4;continue;}b.raw.end=b.raw.end-(1)>>0;$r=b.readTagAttrKey();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=b.readTagAttrVal();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if(a&&!((b.pendingAttr[0].start===b.pendingAttr[0].end))){b.attr=$append(b.attr,b.pendingAttr);}$r=b.skipWhiteSpace();$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if(!($interfaceIsEqual(b.err,$ifaceNil))){$s=4;continue;}$s=3;continue;case 4:$s=-1;return;}return;}var $f={$blk:S.ptr.prototype.readTag,$c:true,$r,a,b,c,d,$s};return $f;};S.prototype.readTag=function(a){return this.$val.readTag(a);};S.ptr.prototype.readTagName=function(){var{a,b,c,d,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;a.data.start=a.raw.end-1>>0;case 1:b=a.readByte();$s=3;case 3:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=b;if(!($interfaceIsEqual(a.err,$ifaceNil))){a.data.end=a.raw.end;$s=-1;return;}d=c;if((d===(32))||(d===(10))||(d===(13))||(d===(9))||(d===(12))){a.data.end=a.raw.end-1>>0;$s=-1;return;}else if((d===(47))||(d===(62))){a.raw.end=a.raw.end-(1)>>0;a.data.end=a.raw.end;$s=-1;return;}$s=1;continue;case 2:$s=-1;return;}return;}var $f={$blk:S.ptr.prototype.readTagName,$c:true,$r,a,b,c,d,$s};return $f;};S.prototype.readTagName=function(){return this.$val.readTagName();};S.ptr.prototype.readTagAttrKey=function(){var{a,b,c,d,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;a.pendingAttr[0].start=a.raw.end;case 1:b=a.readByte();$s=3;case 3:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=b;if(!($interfaceIsEqual(a.err,$ifaceNil))){a.pendingAttr[0].end=a.raw.end;$s=-1;return;}d=c;if((d===(32))||(d===(10))||(d===(13))||(d===(9))||(d===(12))||(d===(47))){a.pendingAttr[0].end=a.raw.end-1>>0;$s=-1;return;}else if((d===(61))||(d===(62))){a.raw.end=a.raw.end-(1)>>0;a.pendingAttr[0].end=a.raw.end;$s=-1;return;}$s=1;continue;case 2:$s=-1;return;}return;}var $f={$blk:S.ptr.prototype.readTagAttrKey,$c:true,$r,a,b,c,d,$s};return $f;};S.prototype.readTagAttrKey=function(){return this.$val.readTagAttrKey();};S.ptr.prototype.readTagAttrVal=function(){var{a,b,c,d,e,f,g,h,i,j,k,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;a.pendingAttr[1].start=a.raw.end;a.pendingAttr[1].end=a.raw.end;$r=a.skipWhiteSpace();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if(!($interfaceIsEqual(a.err,$ifaceNil))){$s=-1;return;}b=a.readByte();$s=2;case 2:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=b;if(!($interfaceIsEqual(a.err,$ifaceNil))){$s=-1;return;}if(!((c===61))){a.raw.end=a.raw.end-(1)>>0;$s=-1;return;}$r=a.skipWhiteSpace();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if(!($interfaceIsEqual(a.err,$ifaceNil))){$s=-1;return;}d=a.readByte();$s=4;case 4:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;if(!($interfaceIsEqual(a.err,$ifaceNil))){$s=-1;return;}f=e;if(f===(62)){$s=6;continue;}if((f===(39))||(f===(34))){$s=7;continue;}$s=8;continue;case 6:a.raw.end=a.raw.end-(1)>>0;$s=-1;return;case 7:a.pendingAttr[1].start=a.raw.end;case 10:g=a.readByte();$s=12;case 12:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;if(!($interfaceIsEqual(a.err,$ifaceNil))){a.pendingAttr[1].end=a.raw.end;$s=-1;return;}if(h===e){a.pendingAttr[1].end=a.raw.end-1>>0;$s=-1;return;}$s=10;continue;case 11:$s=9;continue;case 8:a.pendingAttr[1].start=a.raw.end-1>>0;case 13:i=a.readByte();$s=15;case 15:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}j=i;if(!($interfaceIsEqual(a.err,$ifaceNil))){a.pendingAttr[1].end=a.raw.end;$s=-1;return;}k=j;if((k===(32))||(k===(10))||(k===(13))||(k===(9))||(k===(12))){a.pendingAttr[1].end=a.raw.end-1>>0;$s=-1;return;}else if(k===(62)){a.raw.end=a.raw.end-(1)>>0;a.pendingAttr[1].end=a.raw.end;$s=-1;return;}$s=13;continue;case 14:case 9:case 5:$s=-1;return;}return;}var $f={$blk:S.ptr.prototype.readTagAttrVal,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,$s};return $f;};S.prototype.readTagAttrVal=function(){return this.$val.readTagAttrVal();};S.ptr.prototype.Next=function(){var{a,b,c,d,e,f,g,h,i,j,k,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;a.raw.start=a.raw.end;a.data.start=a.raw.end;a.data.end=a.raw.end;if(!($interfaceIsEqual(a.err,$ifaceNil))){a.tt=0;$s=-1;return a.tt;}if(!(a.rawTag==="")){$s=1;continue;}$s=2;continue;case 1:if(a.rawTag==="plaintext"){$s=3;continue;}$s=4;continue;case 3:case 6:if(!($interfaceIsEqual(a.err,$ifaceNil))){$s=7;continue;}b=a.readByte();$s=8;case 8:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}b;$s=6;continue;case 7:a.data.end=a.raw.end;a.textIsRaw=true;$s=5;continue;case 4:$r=a.readRawOrRCDATA();$s=9;case 9:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 5:if(a.data.end>a.data.start){a.tt=1;a.convertNUL=true;$s=-1;return a.tt;}case 2:a.textIsRaw=false;a.convertNUL=false;case 10:c=a.readByte();$s=12;case 12:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;if(!($interfaceIsEqual(a.err,$ifaceNil))){$s=11;continue s;}if(!((d===60))){$s=10;continue s;}e=a.readByte();$s=13;case 13:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}d=e;if(!($interfaceIsEqual(a.err,$ifaceNil))){$s=11;continue s;}f=0;if(97<=d&&d<=122||65<=d&&d<=90){f=2;}else if((d===47)){f=3;}else if((d===33)||(d===63)){f=5;}else{a.raw.end=a.raw.end-(1)>>0;$s=10;continue;}g=a.raw.end-2>>0;if(a.raw.start>0;$r=a.readUntilCloseAngle();$s=24;case 24:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}a.tt=5;$s=-1;return a.tt;case 17:if(d===33){$s=25;continue;}$s=26;continue;case 25:k=a.readMarkupDeclaration();$s=27;case 27:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}a.tt=k;$s=-1;return a.tt;case 26:a.raw.end=a.raw.end-(1)>>0;$r=a.readUntilCloseAngle();$s=28;case 28:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}a.tt=5;$s=-1;return a.tt;case 18:case 14:$s=10;continue;case 11:if(a.raw.start=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+c]);if(!((e===13))){c++;continue;}f=d+1>>0;if(f>=a.$length||!((((f<0||f>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f])===10))){((d<0||d>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+d]=10);c++;continue;}g=d;while(true){if(!(f=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f])===13){if((f+1>>0)>0,((h<0||h>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+h]))===10)){f=f+(1)>>0;}((g<0||g>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+g]=10);}else{((g<0||g>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+g]=((f<0||f>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f]));}f=f+(1)>>0;g=g+(1)>>0;}return $subslice(a,0,g);}return a;};S.ptr.prototype.Text=function(){var a,b,c;a=this;b=a.tt;if((b===(1))||(b===(5))||(b===(6))){c=$subslice(a.buf,a.data.start,a.data.end);a.data.start=a.raw.end;a.data.end=a.raw.end;c=U(c);if((a.convertNUL||(a.tt===5))&&E.Contains(c,V)){c=E.Replace(c,V,W,-1);}if(!a.textIsRaw){c=CS(c,false);}return c;}return DC.nil;};S.prototype.Text=function(){return this.$val.Text();};S.ptr.prototype.TagName=function(){var a,b,c,d,e,f,g,h,i;a=DC.nil;b=false;c=this;if(c.data.start=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+g])),DJ);d.nAttrReturned=d.nAttrReturned+(1)>>0;a=$subslice(d.buf,h[0].start,h[0].end);b=$subslice(d.buf,h[1].start,h[1].end);i=CT(a);j=CS(U(b),true);k=d.nAttrReturned");$s=17;case 17:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}o=p;q=o[1];if(!($interfaceIsEqual(q,$ifaceNil))){$s=-1;return q;}$s=-1;return $ifaceNil;case 7:s=a.WriteString("=ab.$length)?($throwRuntimeError("index out of range"),undefined):ab.$array[ab.$offset+ac]);ae=ad.Key;if(ae===("public")){z=ad.Val;}else if(ae===("system")){aa=ad.Val;}ac++;}if(!(z==="")){$s=22;continue;}if(!(aa==="")){$s=23;continue;}$s=24;continue;case 22:ag=a.WriteString(" PUBLIC ");$s=25;case 25:if($c){$c=false;ag=ag.$blk();}if(ag&&ag.$blk!==undefined){break s;}af=ag;ah=af[1];if(!($interfaceIsEqual(ah,$ifaceNil))){$s=-1;return ah;}ai=AE(a,z);$s=26;case 26:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}aj=ai;if(!($interfaceIsEqual(aj,$ifaceNil))){$s=-1;return aj;}if(!(aa==="")){$s=27;continue;}$s=28;continue;case 27:ak=a.WriteByte(32);$s=29;case 29:if($c){$c=false;ak=ak.$blk();}if(ak&&ak.$blk!==undefined){break s;}al=ak;if(!($interfaceIsEqual(al,$ifaceNil))){$s=-1;return al;}am=AE(a,aa);$s=30;case 30:if($c){$c=false;am=am.$blk();}if(am&&am.$blk!==undefined){break s;}an=am;if(!($interfaceIsEqual(an,$ifaceNil))){$s=-1;return an;}case 28:$s=24;continue;case 23:ap=a.WriteString(" SYSTEM ");$s=31;case 31:if($c){$c=false;ap=ap.$blk();}if(ap&&ap.$blk!==undefined){break s;}ao=ap;aq=ao[1];if(!($interfaceIsEqual(aq,$ifaceNil))){$s=-1;return aq;}ar=AE(a,aa);$s=32;case 32:if($c){$c=false;ar=ar.$blk();}if(ar&&ar.$blk!==undefined){break s;}as=ar;if(!($interfaceIsEqual(as,$ifaceNil))){$s=-1;return as;}case 24:case 21:at=a.WriteByte(62);$s=33;case 33:if($c){$c=false;at=at.$blk();}if(at&&at.$blk!==undefined){break s;}au=at;$s=34;case 34:return au;case 8:$s=-1;return F.New("html: unknown node type");case 9:case 1:av=a.WriteByte(60);$s=35;case 35:if($c){$c=false;av=av.$blk();}if(av&&av.$blk!==undefined){break s;}aw=av;if(!($interfaceIsEqual(aw,$ifaceNil))){$s=-1;return aw;}ay=a.WriteString(b.Data);$s=36;case 36:if($c){$c=false;ay=ay.$blk();}if(ay&&ay.$blk!==undefined){break s;}ax=ay;az=ax[1];if(!($interfaceIsEqual(az,$ifaceNil))){$s=-1;return az;}ba=b.Attr;bb=0;case 37:if(!(bb=ba.$length)?($throwRuntimeError("index out of range"),undefined):ba.$array[ba.$offset+bb]);bd=a.WriteByte(32);$s=39;case 39:if($c){$c=false;bd=bd.$blk();}if(bd&&bd.$blk!==undefined){break s;}be=bd;if(!($interfaceIsEqual(be,$ifaceNil))){$s=-1;return be;}if(!(bc.Namespace==="")){$s=40;continue;}$s=41;continue;case 40:bg=a.WriteString(bc.Namespace);$s=42;case 42:if($c){$c=false;bg=bg.$blk();}if(bg&&bg.$blk!==undefined){break s;}bf=bg;bh=bf[1];if(!($interfaceIsEqual(bh,$ifaceNil))){$s=-1;return bh;}bi=a.WriteByte(58);$s=43;case 43:if($c){$c=false;bi=bi.$blk();}if(bi&&bi.$blk!==undefined){break s;}bj=bi;if(!($interfaceIsEqual(bj,$ifaceNil))){$s=-1;return bj;}case 41:bl=a.WriteString(bc.Key);$s=44;case 44:if($c){$c=false;bl=bl.$blk();}if(bl&&bl.$blk!==undefined){break s;}bk=bl;bm=bk[1];if(!($interfaceIsEqual(bm,$ifaceNil))){$s=-1;return bm;}bo=a.WriteString("=\"");$s=45;case 45:if($c){$c=false;bo=bo.$blk();}if(bo&&bo.$blk!==undefined){break s;}bn=bo;bp=bn[1];if(!($interfaceIsEqual(bp,$ifaceNil))){$s=-1;return bp;}bq=CU(a,bc.Val);$s=46;case 46:if($c){$c=false;bq=bq.$blk();}if(bq&&bq.$blk!==undefined){break s;}br=bq;if(!($interfaceIsEqual(br,$ifaceNil))){$s=-1;return br;}bs=a.WriteByte(34);$s=47;case 47:if($c){$c=false;bs=bs.$blk();}if(bs&&bs.$blk!==undefined){break s;}bt=bs;if(!($interfaceIsEqual(bt,$ifaceNil))){$s=-1;return bt;}bb++;$s=37;continue;case 38:if((bu=$mapIndex(AF,$String.keyFor(b.Data)),bu!==undefined?bu.v:false)){$s=48;continue;}$s=49;continue;case 48:if(!(b.FirstChild===DE.nil)){$s=-1;return F.New("html: void element <"+b.Data+" has child nodes");}bw=a.WriteString("/>");$s=50;case 50:if($c){$c=false;bw=bw.$blk();}if(bw&&bw.$blk!==undefined){break s;}bv=bw;bx=bv[1];$s=-1;return bx;case 49:by=a.WriteByte(62);$s=51;case 51:if($c){$c=false;by=by.$blk();}if(by&&by.$blk!==undefined){break s;}bz=by;if(!($interfaceIsEqual(bz,$ifaceNil))){$s=-1;return bz;}ca=b.FirstChild;if(!(ca===DE.nil)&&(ca.Type===1)&&B.HasPrefix(ca.Data,"\n")){$s=52;continue;}$s=53;continue;case 52:cb=b.Data;if(cb===("pre")||cb===("listing")||cb===("textarea")){$s=55;continue;}$s=56;continue;case 55:cc=a.WriteByte(10);$s=57;case 57:if($c){$c=false;cc=cc.$blk();}if(cc&&cc.$blk!==undefined){break s;}cd=cc;if(!($interfaceIsEqual(cd,$ifaceNil))){$s=-1;return cd;}case 56:case 54:case 53:ce=b.Data;if(ce===("iframe")||ce===("noembed")||ce===("noframes")||ce===("noscript")||ce===("plaintext")||ce===("script")||ce===("style")||ce===("xmp")){$s=59;continue;}$s=60;continue;case 59:cf=b.FirstChild;case 62:if(!(!(cf===DE.nil))){$s=63;continue;}if(cf.Type===1){$s=64;continue;}$s=65;continue;case 64:ch=a.WriteString(cf.Data);$s=67;case 67:if($c){$c=false;ch=ch.$blk();}if(ch&&ch.$blk!==undefined){break s;}cg=ch;ci=cg[1];if(!($interfaceIsEqual(ci,$ifaceNil))){$s=-1;return ci;}$s=66;continue;case 65:cj=AD(a,cf);$s=68;case 68:if($c){$c=false;cj=cj.$blk();}if(cj&&cj.$blk!==undefined){break s;}ck=cj;if(!($interfaceIsEqual(ck,$ifaceNil))){$s=-1;return ck;}case 66:cf=cf.NextSibling;$s=62;continue;case 63:if(b.Data==="plaintext"){$s=-1;return AB;}$s=61;continue;case 60:cl=b.FirstChild;case 69:if(!(!(cl===DE.nil))){$s=70;continue;}cm=AD(a,cl);$s=71;case 71:if($c){$c=false;cm=cm.$blk();}if(cm&&cm.$blk!==undefined){break s;}cn=cm;if(!($interfaceIsEqual(cn,$ifaceNil))){$s=-1;return cn;}cl=cl.NextSibling;$s=69;continue;case 70:case 61:case 58:cp=a.WriteString(">0;while(true){if(!(d>=0)){break;}f=(e=c.oe,((d<0||d>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+d])).DataAtom;if((g=c.oe,((d<0||d>=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+d])).Namespace===""){h=b;i=0;while(true){if(!(i=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+i]);if(j===f){return d;}i++;}k=a;if(k===(0)){}else if(k===(1)){if((f===79618)||(f===42754)){return-1;}}else if(k===(2)){if(f===102662){return-1;}}else if(k===(3)){if((f===22020)||(f===365829)||(f===463880)){return-1;}}else if(k===(6)){if(!((f===24328))&&!((f===451334))){return-1;}}else{$panic(new $String("unreachable"));}}l=a;if((l===(0))||(l===(1))||(l===(2))){m=(o=$mapIndex(AH,$String.keyFor((n=c.oe,((d<0||d>=n.$length)?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+d])).Namespace)),o!==undefined?o.v:DD.nil);p=0;while(true){if(!(p=m.$length)?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+p]);if(q===f){return-1;}p++;}}d=d-(1)>>0;}return-1;};AG.prototype.indexOfElementInScope=function(a,b){return this.$val.indexOfElementInScope(a,b);};AG.ptr.prototype.elementInScope=function(a,b){var a,b,c;c=this;return!((c.indexOfElementInScope(a,b)===-1));};AG.prototype.elementInScope=function(a,b){return this.$val.elementInScope(a,b);};AG.ptr.prototype.clearStackToContext=function(a){var a,b,c,d,e,f;b=this;c=b.oe.$length-1>>0;while(true){if(!(c>=0)){break;}e=(d=b.oe,((c<0||c>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+c])).DataAtom;f=a;if(f===(3)){if((e===22020)||(e===365829)||(e===463880)){b.oe=$subslice(b.oe,0,(c+1>>0));return;}}else if(f===(4)){if((e===22020)||(e===52226)||(e===463880)){b.oe=$subslice(b.oe,0,(c+1>>0));return;}}else if(f===(5)){if((e===22020)||(e===9989)||(e===62725)||(e===208901)||(e===463880)){b.oe=$subslice(b.oe,0,(c+1>>0));return;}}else{$panic(new $String("unreachable"));}c=c-(1)>>0;}};AG.prototype.clearStackToContext=function(a){return this.$val.clearStackToContext(a);};AG.ptr.prototype.generateImpliedEndTags=function(a){var a,b,c,d,e,f,g,h,i;b=this;c=0;c=b.oe.$length-1>>0;loop:while(true){if(!(c>=0)){break;}e=(d=b.oe,((c<0||c>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+c]));if(e.Type===3){f=e.DataAtom;if((f===(186114))||(f===(412418))||(f===(45570))||(f===(24328))||(f===(451334))||(f===(3073))||(f===(14850))||(f===(146434))||(f===(104962))||(f===(104963))){g=a;h=0;while(true){if(!(h=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+h]);if(e.Data===i){break loop;}h++;}c=c-(1)>>0;continue;}}break;}b.oe=$subslice(b.oe,0,(c+1>>0));};AG.prototype.generateImpliedEndTags=function(a){return this.$val.generateImpliedEndTags(a);};AG.ptr.prototype.addChild=function(a){var a,b;b=this;if(b.shouldFosterParent()){b.fosterParent(a);}else{b.top().AppendChild(a);}if(a.Type===3){b.oe=$append(b.oe,a);}};AG.prototype.addChild=function(a){return this.$val.addChild(a);};AG.ptr.prototype.shouldFosterParent=function(){var a,b;a=this;if(a.fosterParenting){b=a.top().DataAtom;if((b===(365829))||(b===(9989))||(b===(62725))||(b===(208901))||(b===(52226))){return true;}}return false;};AG.prototype.shouldFosterParent=function(){return this.$val.shouldFosterParent();};AG.ptr.prototype.fosterParent=function(a){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;b=this;c=DE.nil;d=DE.nil;e=DE.nil;f=DE.nil;g=c;h=d;i=e;j=f;k=0;k=b.oe.$length-1>>0;while(true){if(!(k>=0)){break;}if((l=b.oe,((k<0||k>=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+k])).DataAtom===365829){g=(m=b.oe,((k<0||k>=m.$length)?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+k]));break;}k=k-(1)>>0;}n=0;n=b.oe.$length-1>>0;while(true){if(!(n>=0)){break;}if((o=b.oe,((n<0||n>=o.$length)?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+n])).DataAtom===463880){j=(p=b.oe,((n<0||n>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+n]));break;}n=n-(1)>>0;}if(!(j===DE.nil)&&(g===DE.nil||n>k)){j.AppendChild(a);return;}if(g===DE.nil){h=(q=b.oe,(0>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+0]));}else{h=g.Parent;}if(h===DE.nil){h=(r=b.oe,s=k-1>>0,((s<0||s>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+s]));}if(!(g===DE.nil)){i=g.PrevSibling;}else{i=h.LastChild;}if(!(i===DE.nil)&&(i.Type===1)&&(a.Type===1)){i.Data=i.Data+(a.Data);return;}h.InsertChildBefore(a,g);};AG.prototype.fosterParent=function(a){return this.$val.fosterParent(a);};AG.ptr.prototype.addText=function(a){var a,b,c,d;b=this;if(a===""){return;}if(b.shouldFosterParent()){b.fosterParent(new BQ.ptr(DE.nil,DE.nil,DE.nil,DE.nil,DE.nil,1,0,a,"",DG.nil));return;}c=b.top();d=c.LastChild;if(!(d===DE.nil)&&(d.Type===1)){d.Data=d.Data+(a);return;}b.addChild(new BQ.ptr(DE.nil,DE.nil,DE.nil,DE.nil,DE.nil,1,0,a,"",DG.nil));};AG.prototype.addText=function(a){return this.$val.addText(a);};AG.ptr.prototype.addElement=function(){var a;a=this;a.addChild(new BQ.ptr(DE.nil,DE.nil,DE.nil,DE.nil,DE.nil,3,a.tok.DataAtom,a.tok.Data,"",a.tok.Attr));};AG.prototype.addElement=function(){return this.$val.addElement();};AG.ptr.prototype.addFormattingElement=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o;a=this;b=a.tok.DataAtom;c=a.tok.Attr;d=b;e=c;a.addElement();f=0;g=a.afe.$length-1>>0;findIdenticalElements:while(true){if(!(g>=0)){break;}i=(h=a.afe,((g<0||g>=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+g]));if(i.Type===6){break;}if(!((i.Type===3))){g=g-(1)>>0;continue;}if(!(i.Namespace==="")){g=g-(1)>>0;continue;}if(!((i.DataAtom===d))){g=g-(1)>>0;continue;}if(!((i.Attr.$length===e.$length))){g=g-(1)>>0;continue;}j=i.Attr;k=0;compareAttributes:while(true){if(!(k=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+k]);m=e;n=0;while(true){if(!(n=m.$length)?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+n]);if(l.Key===o.Key&&l.Namespace===o.Namespace&&l.Val===o.Val){k++;continue compareAttributes;}n++;}g=g-(1)>>0;continue findIdenticalElements;}f=f+(1)>>0;if(f>=3){(a.$ptr_afe||(a.$ptr_afe=new DL(function(){return this.$target.afe;},function($v){this.$target.afe=$v;},a))).remove(i);}g=g-(1)>>0;}a.afe=$append(a.afe,a.top());};AG.prototype.addFormattingElement=function(){return this.$val.addFormattingElement();};AG.ptr.prototype.clearActiveFormattingElements=function(){var a,b;a=this;while(true){b=(a.$ptr_afe||(a.$ptr_afe=new DL(function(){return this.$target.afe;},function($v){this.$target.afe=$v;},a))).pop();if((a.afe.$length===0)||(b.Type===6)){return;}}};AG.prototype.clearActiveFormattingElements=function(){return this.$val.clearActiveFormattingElements();};AG.ptr.prototype.reconstructActiveFormattingElements=function(){var a,b,c,d,e,f,g;a=this;b=(a.$ptr_afe||(a.$ptr_afe=new DL(function(){return this.$target.afe;},function($v){this.$target.afe=$v;},a))).top();if(b===DE.nil){return;}if((b.Type===6)||!(((a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).index(b)===-1))){return;}c=a.afe.$length-1>>0;while(true){if(!(!((b.Type===6))&&((a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).index(b)===-1))){break;}if(c===0){c=-1;break;}c=c-(1)>>0;b=(d=a.afe,((c<0||c>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+c]));}while(true){c=c+(1)>>0;f=(e=a.afe,((c<0||c>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+c])).clone();a.addChild(f);(g=a.afe,((c<0||c>=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+c]=f));if(c===(a.afe.$length-1>>0)){break;}}};AG.prototype.reconstructActiveFormattingElements=function(){return this.$val.reconstructActiveFormattingElements();};AG.ptr.prototype.acknowledgeSelfClosingTag=function(){var a;a=this;a.hasSelfClosingToken=false;};AG.prototype.acknowledgeSelfClosingTag=function(){return this.$val.acknowledgeSelfClosingTag();};AG.ptr.prototype.setOriginalIM=function(){var a;a=this;if(!(a.originalIM===$throwNilPointerError)){$panic(new $String("html: bad parser state: originalIM was set twice"));}a.originalIM=a.im;};AG.prototype.setOriginalIM=function(){return this.$val.setOriginalIM();};AG.ptr.prototype.resetInsertionMode=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n;a=this;b=a.oe.$length-1>>0;while(true){if(!(b>=0)){break;}d=(c=a.oe,((b<0||b>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+b]));e=b===0;if(e&&!(a.context===DE.nil)){d=a.context;}f=d.DataAtom;if(f===(408582)){if(!e){g=d;h=(i=a.oe,(0>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+0]));j=g;k=h;while(true){if(!(!(j===k))){break;}j=(l=a.oe,m=(a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).index(j)-1>>0,((m<0||m>=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+m]));n=j.DataAtom;if(n===(463880)){a.im=AZ;return;}else if(n===(365829)){a.im=BA;return;}}}a.im=AZ;}else if((f===(37378))||(f===(87554))){a.im=AY;}else if(f===(52226)){a.im=AX;}else if((f===(9989))||(f===(208901))||(f===(62725))){a.im=AW;}else if(f===(143623)){a.im=AU;}else if(f===(109320)){a.im=AV;}else if(f===(365829)){a.im=AT;}else if(f===(463880)){if(!(d.Namespace==="")){b=b-(1)>>0;continue;}a.im=(a.$ptr_templateStack||(a.$ptr_templateStack=new DM(function(){return this.$target.templateStack;},function($v){this.$target.templateStack=$v;},a))).top();}else if(f===(209156)){a.im=AN;}else if(f===(10244)){a.im=AR;}else if(f===(35592)){a.im=BD;}else if(f===(22020)){if(a.head===DE.nil){a.im=AM;}else{a.im=AP;}}else{if(e){a.im=AR;return;}b=b-(1)>>0;continue;}return;}};AG.prototype.resetInsertionMode=function(){return this.$val.resetInsertionMode();};AK=function(a){var{a,b,c,d,e,f,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=a.tok.Type;if(b===(1)){$s=2;continue;}if(b===(5)){$s=3;continue;}if(b===(6)){$s=4;continue;}$s=5;continue;case 2:a.tok.Data=B.TrimLeft(a.tok.Data," \t\r\n\f");if(a.tok.Data.length===0){$s=-1;return true;}$s=5;continue;case 3:a.doc.AppendChild(new BQ.ptr(DE.nil,DE.nil,DE.nil,DE.nil,DE.nil,4,0,a.tok.Data,"",DG.nil));$s=-1;return true;case 4:d=CX(a.tok.Data);$s=6;case 6:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}c=d;e=c[0];f=c[1];a.doc.AppendChild(e);a.quirks=f;a.im=AL;$s=-1;return true;case 5:case 1:a.quirks=true;a.im=AL;$s=-1;return false;}return;}var $f={$blk:AK,$c:true,$r,a,b,c,d,e,f,$s};return $f;};AL=function(a){var{a,b,c,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=a.tok.Type;if(b===(6)){$s=2;continue;}if(b===(1)){$s=3;continue;}if(b===(2)){$s=4;continue;}if(b===(3)){$s=5;continue;}if(b===(5)){$s=6;continue;}$s=7;continue;case 2:$s=-1;return true;case 3:a.tok.Data=B.TrimLeft(a.tok.Data," \t\r\n\f");if(a.tok.Data.length===0){$s=-1;return true;}$s=7;continue;case 4:if(a.tok.DataAtom===22020){a.addElement();a.im=AM;$s=-1;return true;}$s=7;continue;case 5:c=a.tok.DataAtom;if((c===(209156))||(c===(10244))||(c===(22020))||(c===(514))){$s=9;continue;}$s=10;continue;case 9:$r=a.parseImpliedToken(2,22020,new I.Atom(22020).String());$s=12;case 12:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return false;case 10:$s=-1;return true;case 11:case 8:$s=7;continue;case 6:a.doc.AppendChild(new BQ.ptr(DE.nil,DE.nil,DE.nil,DE.nil,DE.nil,4,0,a.tok.Data,"",DG.nil));$s=-1;return true;case 7:case 1:$r=a.parseImpliedToken(2,22020,new I.Atom(22020).String());$s=13;case 13:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return false;}return;}var $f={$blk:AL,$c:true,$r,a,b,c,$s};return $f;};AM=function(a){var{a,b,c,d,e,f,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=a.tok.Type;if(b===(1)){$s=2;continue;}if(b===(2)){$s=3;continue;}if(b===(3)){$s=4;continue;}if(b===(5)){$s=5;continue;}if(b===(6)){$s=6;continue;}$s=7;continue;case 2:a.tok.Data=B.TrimLeft(a.tok.Data," \t\r\n\f");if(a.tok.Data.length===0){$s=-1;return true;}$s=7;continue;case 3:c=a.tok.DataAtom;if(c===(209156)){$s=9;continue;}if(c===(22020)){$s=10;continue;}$s=11;continue;case 9:a.addElement();a.head=a.top();a.im=AN;$s=-1;return true;case 10:d=AR(a);$s=12;case 12:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;$s=13;case 13:return e;case 11:case 8:$s=7;continue;case 4:f=a.tok.DataAtom;if((f===(209156))||(f===(10244))||(f===(22020))||(f===(514))){$s=15;continue;}$s=16;continue;case 15:$r=a.parseImpliedToken(2,209156,new I.Atom(209156).String());$s=18;case 18:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return false;case 16:$s=-1;return true;case 17:case 14:$s=7;continue;case 5:a.addChild(new BQ.ptr(DE.nil,DE.nil,DE.nil,DE.nil,DE.nil,4,0,a.tok.Data,"",DG.nil));$s=-1;return true;case 6:$s=-1;return true;case 7:case 1:$r=a.parseImpliedToken(2,209156,new I.Atom(209156).String());$s=19;case 19:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return false;}return;}var $f={$blk:AM,$c:true,$r,a,b,c,d,e,f,$s};return $f;};AN=function(a){var{a,b,c,d,e,f,g,h,i,j,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=a.tok.Type;if(b===(1)){$s=2;continue;}if(b===(2)){$s=3;continue;}if(b===(3)){$s=4;continue;}if(b===(5)){$s=5;continue;}if(b===(6)){$s=6;continue;}$s=7;continue;case 2:c=B.TrimLeft(a.tok.Data," \t\r\n\f");if(c.length>0)));if(c===""){$s=-1;return true;}a.tok.Data=c;}$s=7;continue;case 3:d=a.tok.DataAtom;if(d===(22020)){$s=9;continue;}if((d===(15108))||(d===(15112))||(d===(89607))||(d===(120583))||(d===(95236))||(d===(309252))){$s=10;continue;}if(d===(136712)){$s=11;continue;}if((d===(137222))||(d===(69637))||(d===(35080))||(d===(458501))){$s=12;continue;}if(d===(209156)){$s=13;continue;}if(d===(463880)){$s=14;continue;}$s=15;continue;case 9:e=AR(a);$s=16;case 16:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;$s=17;case 17:return f;case 10:a.addElement();(a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).pop();a.acknowledgeSelfClosingTag();$s=-1;return true;case 11:a.addElement();if(a.scripting){a.setOriginalIM();a.im=AS;}else{a.im=AO;}$s=-1;return true;case 12:a.addElement();a.setOriginalIM();a.im=AS;$s=-1;return true;case 13:$s=-1;return true;case 14:a.addElement();a.afe=$append(a.afe,BP);a.framesetOK=false;a.im=BB;a.templateStack=$append(a.templateStack,BB);$s=-1;return true;case 15:case 8:$s=7;continue;case 4:g=a.tok.DataAtom;if(g===(209156)){$s=19;continue;}if((g===(10244))||(g===(22020))||(g===(514))){$s=20;continue;}if(g===(463880)){$s=21;continue;}$s=22;continue;case 19:(a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).pop();a.im=AP;$s=-1;return true;case 20:$r=a.parseImpliedToken(3,209156,new I.Atom(209156).String());$s=24;case 24:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return false;case 21:if(!(a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).contains(463880)){$s=-1;return true;}a.generateImpliedEndTags(DH.nil);h=a.oe.$length-1>>0;while(true){if(!(h>=0)){break;}j=(i=a.oe,((h<0||h>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+h]));if(j.Namespace===""&&(j.DataAtom===463880)){a.oe=$subslice(a.oe,0,h);break;}h=h-(1)>>0;}a.clearActiveFormattingElements();(a.$ptr_templateStack||(a.$ptr_templateStack=new DM(function(){return this.$target.templateStack;},function($v){this.$target.templateStack=$v;},a))).pop();a.resetInsertionMode();$s=-1;return true;case 22:$s=-1;return true;case 23:case 18:$s=7;continue;case 5:a.addChild(new BQ.ptr(DE.nil,DE.nil,DE.nil,DE.nil,DE.nil,4,0,a.tok.Data,"",DG.nil));$s=-1;return true;case 6:$s=-1;return true;case 7:case 1:$r=a.parseImpliedToken(3,209156,new I.Atom(209156).String());$s=25;case 25:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return false;}return;}var $f={$blk:AN,$c:true,$r,a,b,c,d,e,f,g,h,i,j,$s};return $f;};AO=function(a){var{a,b,c,d,e,f,g,h,i,j,k,l,m,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=a.tok.Type;if(b===(6)){$s=2;continue;}if(b===(2)){$s=3;continue;}if(b===(3)){$s=4;continue;}if(b===(1)){$s=5;continue;}if(b===(5)){$s=6;continue;}$s=7;continue;case 2:$s=-1;return true;case 3:c=a.tok.DataAtom;if(c===(22020)){$s=9;continue;}if((c===(15112))||(c===(89607))||(c===(95236))||(c===(309252))||(c===(35080))||(c===(458501))){$s=10;continue;}if((c===(209156))||(c===(136712))){$s=11;continue;}$s=12;continue;case 9:d=AR(a);$s=13;case 13:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;$s=14;case 14:return e;case 10:f=AN(a);$s=15;case 15:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;$s=16;case 16:return g;case 11:$s=-1;return true;case 12:case 8:$s=7;continue;case 4:h=a.tok.DataAtom;if((h===(136712))||(h===(514))){}else{$s=-1;return true;}$s=7;continue;case 5:i=B.TrimLeft(a.tok.Data," \t\r\n\f");if(i.length===0){$s=17;continue;}$s=18;continue;case 17:j=AN(a);$s=19;case 19:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j;$s=20;case 20:return k;case 18:$s=7;continue;case 6:l=AN(a);$s=21;case 21:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}m=l;$s=22;case 22:return m;case 7:case 1:(a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).pop();if(!((a.top().DataAtom===209156))){$panic(new $String("html: the new current node will be a head element."));}a.im=AN;if(a.tok.DataAtom===136712){$s=-1;return true;}$s=-1;return false;}return;}var $f={$blk:AO,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,$s};return $f;};AP=function(a){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,$s,$deferred,$r,$c}=$restore(this,{a});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);b=a.tok.Type;if(b===(1)){$s=2;continue;}if(b===(2)){$s=3;continue;}if(b===(3)){$s=4;continue;}if(b===(5)){$s=5;continue;}if(b===(6)){$s=6;continue;}$s=7;continue;case 2:c=B.TrimLeft(a.tok.Data," \t\r\n\f");if(c.length>0)));if(c===""){$s=10;continue;}$s=11;continue;case 10:d=true;$s=12;case 12:return d;case 11:a.tok.Data=c;case 9:$s=7;continue;case 3:e=a.tok.DataAtom;if(e===(22020)){$s=14;continue;}if(e===(10244)){$s=15;continue;}if(e===(35592)){$s=16;continue;}if((e===(15108))||(e===(15112))||(e===(89607))||(e===(95236))||(e===(309252))||(e===(35080))||(e===(137222))||(e===(458501))||(e===(463880))||(e===(69637))){$s=17;continue;}if(e===(209156)){$s=18;continue;}$s=19;continue;case 14:f=AR(a);$s=20;case 20:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;$s=21;case 21:return g;case 15:a.addElement();a.framesetOK=false;a.im=AR;h=true;$s=22;case 22:return h;case 16:a.addElement();a.im=BD;i=true;$s=23;case 23:return i;case 17:a.oe=$append(a.oe,a.head);$deferred.push([$methodVal((a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))),"remove"),[a.head]]);j=AN(a);$s=24;case 24:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j;$s=25;case 25:return k;case 18:l=true;$s=26;case 26:return l;case 19:case 13:$s=7;continue;case 4:m=a.tok.DataAtom;if((m===(10244))||(m===(22020))||(m===(514))){$s=28;continue;}if(m===(463880)){$s=29;continue;}$s=30;continue;case 28:$s=31;continue;case 29:n=AN(a);$s=32;case 32:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}o=n;$s=33;case 33:return o;case 30:p=true;$s=34;case 34:return p;case 31:case 27:$s=7;continue;case 5:a.addChild(new BQ.ptr(DE.nil,DE.nil,DE.nil,DE.nil,DE.nil,4,0,a.tok.Data,"",DG.nil));q=true;$s=35;case 35:return q;case 6:r=true;$s=36;case 36:return r;case 7:case 1:$r=a.parseImpliedToken(2,10244,new I.Atom(10244).String());$s=37;case 37:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}a.framesetOK=true;s=false;$s=38;case 38:return s;}return;}}catch(err){$err=err;$s=-1;return false;}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:AP,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,$s,$deferred};return $f;}}};AQ=function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l,m,n;if(b.Attr.$length===0){return;}c=$makeMap($String.keyFor,[]);d=a.Attr;e=0;while(true){if(!(e=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+e]);g=f.Key;(c||$throwRuntimeError("assignment to entry in nil map")).set($String.keyFor(g),{k:g,v:f.Val});e++;}h=b.Attr;i=0;while(true){if(!(i=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+i]);k=(l=$mapIndex(c,$String.keyFor(j.Key)),l!==undefined?[l.v,true]:["",false]);m=k[1];if(!m){a.Attr=$append(a.Attr,j);n=j.Key;(c||$throwRuntimeError("assignment to entry in nil map")).set($String.keyFor(n),{k:n,v:j.Val});}i++;}};AR=function(a){var{a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=a.tok.Type;if(b===(1)){$s=2;continue;}if(b===(2)){$s=3;continue;}if(b===(3)){$s=4;continue;}if(b===(5)){$s=5;continue;}if(b===(0)){$s=6;continue;}$s=7;continue;case 2:c=a.tok.Data;d=(a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).top();e=d.DataAtom;if((e===(290819))||(e===(305415))){if(d.FirstChild===DE.nil){if(!(c==="")&&(c.charCodeAt(0)===13)){c=$substring(c,1);}if(!(c==="")&&(c.charCodeAt(0)===10)){c=$substring(c,1);}}}c=B.Replace(c,"\x00","",-1);if(c===""){$s=-1;return true;}a.reconstructActiveFormattingElements();a.addText(c);if(a.framesetOK&&!(B.TrimLeft(c," \t\r\n\f")==="")){a.framesetOK=false;}$s=7;continue;case 3:f=a.tok.DataAtom;if(f===(22020)){$s=9;continue;}if((f===(15108))||(f===(15112))||(f===(89607))||(f===(120583))||(f===(95236))||(f===(309252))||(f===(35080))||(f===(137222))||(f===(458501))||(f===(463880))||(f===(69637))){$s=10;continue;}if(f===(10244)){$s=11;continue;}if(f===(35592)){$s=12;continue;}if((f===(455431))||(f===(261127))||(f===(67333))||(f===(100106))||(f===(139270))||(f===(29191))||(f===(37635))||(f===(92931))||(f===(386562))||(f===(140808))||(f===(142858))||(f===(149510))||(f===(62982))||(f===(209158))||(f===(182790))||(f===(231172))||(f===(4867))||(f===(79618))||(f===(3073))||(f===(354311))||(f===(459783))||(f===(42754))){$s=13;continue;}if((f===(89090))||(f===(187906))||(f===(199938))||(f===(214274))||(f===(216834))||(f===(412930))){$s=14;continue;}if((f===(290819))||(f===(305415))){$s=15;continue;}if(f===(159236)){$s=16;continue;}if(f===(45570)){$s=17;continue;}if((f===(186114))||(f===(412418))){$s=18;continue;}if(f===(111113)){$s=19;continue;}if(f===(102662)){$s=20;continue;}if(f===(1)){$s=21;continue;}if((f===(257))||(f===(94211))||(f===(378116))||(f===(28162))||(f===(16132))||(f===(1537))||(f===(9473))||(f===(132613))||(f===(53766))||(f===(449798))||(f===(26626))||(f===(2817))){$s=22;continue;}if(f===(14084)){$s=23;continue;}if((f===(203014))||(f===(206599))||(f===(157702))){$s=24;continue;}if(f===(365829)){$s=25;continue;}if((f===(218628))||(f===(514))||(f===(28165))||(f===(198403))||(f===(281349))||(f===(12806))||(f===(359427))){$s=26;continue;}if((f===(3077))||(f===(227334))||(f===(113157))){$s=27;continue;}if(f===(87810)){$s=28;continue;}if(f===(197125)){$s=29;continue;}if(f===(200455)){$s=30;continue;}if(f===(217608)){$s=31;continue;}if(f===(77571)){$s=32;continue;}if(f===(195590)){$s=33;continue;}if((f===(27655))||(f===(136712))){$s=34;continue;}if(f===(408582)){$s=35;continue;}if((f===(24328))||(f===(451334))){$s=36;continue;}if((f===(14850))||(f===(104963))){$s=37;continue;}if((f===(146434))||(f===(104962))){$s=38;continue;}if((f===(208388))||(f===(462339))){$s=39;continue;}if((f===(143623))||(f===(109315))||(f===(109320))||(f===(35589))||(f===(209156))||(f===(9989))||(f===(37378))||(f===(62725))||(f===(87554))||(f===(208901))||(f===(52226))){$s=40;continue;}$s=41;continue;case 9:if((a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).contains(463880)){$s=-1;return true;}AQ((g=a.oe,(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0])),$clone(a.tok,Q));$s=42;continue;case 10:h=AN(a);$s=43;case 43:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=h;$s=44;case 44:return i;case 11:if((a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).contains(463880)){$s=-1;return true;}if(a.oe.$length>=2){k=(j=a.oe,(1>=j.$length?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+1]));if((k.Type===3)&&(k.DataAtom===10244)){a.framesetOK=false;AQ(k,$clone(a.tok,Q));}}$s=42;continue;case 12:if(!a.framesetOK||a.oe.$length<2||!(((l=a.oe,(1>=l.$length?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+1])).DataAtom===10244))){$s=-1;return true;}n=(m=a.oe,(1>=m.$length?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+1]));if(!(n.Parent===DE.nil)){n.Parent.RemoveChild(n);}a.oe=$subslice(a.oe,0,1);a.addElement();a.im=BD;$s=-1;return true;case 13:a.popUntil(2,new DD([3073]));a.addElement();$s=42;continue;case 14:a.popUntil(2,new DD([3073]));o=a.top();p=o.DataAtom;if((p===(89090))||(p===(187906))||(p===(199938))||(p===(214274))||(p===(216834))||(p===(412930))){(a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).pop();}a.addElement();$s=42;continue;case 15:a.popUntil(2,new DD([3073]));a.addElement();a.framesetOK=false;$s=42;continue;case 16:if(!(a.form===DE.nil)&&!(a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).contains(463880)){$s=-1;return true;}a.popUntil(2,new DD([3073]));a.addElement();if(!(a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).contains(463880)){a.form=a.top();}$s=42;continue;case 17:a.framesetOK=false;q=a.oe.$length-1>>0;while(true){if(!(q>=0)){break;}s=(r=a.oe,((q<0||q>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+q]));t=s.DataAtom;if(t===(45570)){a.oe=$subslice(a.oe,0,q);}else if((t===(455431))||(t===(92931))||(t===(3073))){q=q-(1)>>0;continue;}else if(!DA(s)){q=q-(1)>>0;continue;}break;}a.popUntil(2,new DD([3073]));a.addElement();$s=42;continue;case 18:a.framesetOK=false;u=a.oe.$length-1>>0;while(true){if(!(u>=0)){break;}w=(v=a.oe,((u<0||u>=v.$length)?($throwRuntimeError("index out of range"),undefined):v.$array[v.$offset+u]));x=w.DataAtom;if((x===(186114))||(x===(412418))){a.oe=$subslice(a.oe,0,u);}else if((x===(455431))||(x===(92931))||(x===(3073))){u=u-(1)>>0;continue;}else if(!DA(w)){u=u-(1)>>0;continue;}break;}a.popUntil(2,new DD([3073]));a.addElement();$s=42;continue;case 19:a.popUntil(2,new DD([3073]));a.addElement();$s=42;continue;case 20:a.popUntil(0,new DD([102662]));a.reconstructActiveFormattingElements();a.addElement();a.framesetOK=false;$s=42;continue;case 21:y=a.afe.$length-1>>0;while(true){if(!(y>=0&&!(((z=a.afe,((y<0||y>=z.$length)?($throwRuntimeError("index out of range"),undefined):z.$array[z.$offset+y])).Type===6)))){break;}ab=(aa=a.afe,((y<0||y>=aa.$length)?($throwRuntimeError("index out of range"),undefined):aa.$array[aa.$offset+y]));if((ab.Type===3)&&(ab.DataAtom===1)){a.inBodyEndTagFormatting(1,"a");(a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).remove(ab);(a.$ptr_afe||(a.$ptr_afe=new DL(function(){return this.$target.afe;},function($v){this.$target.afe=$v;},a))).remove(ab);break;}y=y-(1)>>0;}a.reconstructActiveFormattingElements();a.addFormattingElement();$s=42;continue;case 22:a.reconstructActiveFormattingElements();a.addFormattingElement();$s=42;continue;case 23:a.reconstructActiveFormattingElements();if(a.elementInScope(0,new DD([14084]))){a.inBodyEndTagFormatting(14084,"nobr");a.reconstructActiveFormattingElements();}a.addFormattingElement();$s=42;continue;case 24:a.reconstructActiveFormattingElements();a.addElement();a.afe=$append(a.afe,BP);a.framesetOK=false;$s=42;continue;case 25:if(!a.quirks){a.popUntil(2,new DD([3073]));}a.addElement();a.framesetOK=false;a.im=AT;$s=-1;return true;case 26:a.reconstructActiveFormattingElements();a.addElement();(a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).pop();a.acknowledgeSelfClosingTag();if(a.tok.DataAtom===281349){$s=45;continue;}$s=46;continue;case 45:ac=a.tok.Attr;ad=0;case 47:if(!(ad=ac.$length)?($throwRuntimeError("index out of range"),undefined):ac.$array[ac.$offset+ad]);if(ae.Key==="type"){$s=49;continue;}$s=50;continue;case 49:af=B.ToLower(ae.Val);$s=53;case 53:if($c){$c=false;af=af.$blk();}if(af&&af.$blk!==undefined){break s;}if(af==="hidden"){$s=51;continue;}$s=52;continue;case 51:$s=-1;return true;case 52:case 50:ad++;$s=47;continue;case 48:case 46:a.framesetOK=false;$s=42;continue;case 27:a.addElement();(a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).pop();a.acknowledgeSelfClosingTag();$s=42;continue;case 28:a.popUntil(2,new DD([3073]));a.addElement();(a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).pop();a.acknowledgeSelfClosingTag();a.framesetOK=false;$s=42;continue;case 29:a.tok.DataAtom=198403;a.tok.Data=new I.Atom(198403).String();$s=-1;return false;case 30:if(!(a.form===DE.nil)){$s=-1;return true;}ag="";ah="This is a searchable index. Enter search keywords: ";ai=new DG([new P.ptr("","name","isindex")]);aj=a.tok.Attr;ak=0;while(true){if(!(ak=aj.$length)?($throwRuntimeError("index out of range"),undefined):aj.$array[aj.$offset+ak]);am=al.Key;if(am===("action")){ag=al.Val;}else if(am===("name")){}else if(am===("prompt")){ah=al.Val;}else{ai=$append(ai,al);}ak++;}a.acknowledgeSelfClosingTag();a.popUntil(2,new DD([3073]));$r=a.parseImpliedToken(2,159236,new I.Atom(159236).String());$s=54;case 54:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if(a.form===DE.nil){$s=-1;return true;}if(!(ag==="")){a.form.Attr=new DG([new P.ptr("","action",ag)]);}$r=a.parseImpliedToken(2,87810,new I.Atom(87810).String());$s=55;case 55:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=a.parseImpliedToken(2,22789,new I.Atom(22789).String());$s=56;case 56:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}a.addText(ah);a.addChild(new BQ.ptr(DE.nil,DE.nil,DE.nil,DE.nil,DE.nil,3,281349,new I.Atom(281349).String(),"",ai));(a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).pop();$r=a.parseImpliedToken(3,22789,new I.Atom(22789).String());$s=57;case 57:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=a.parseImpliedToken(2,87810,new I.Atom(87810).String());$s=58;case 58:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=a.parseImpliedToken(3,159236,new I.Atom(159236).String());$s=59;case 59:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=42;continue;case 31:a.addElement();a.setOriginalIM();a.framesetOK=false;a.im=AS;$s=42;continue;case 32:a.popUntil(2,new DD([3073]));a.reconstructActiveFormattingElements();a.framesetOK=false;a.addElement();a.setOriginalIM();a.im=AS;$s=42;continue;case 33:a.framesetOK=false;a.addElement();a.setOriginalIM();a.im=AS;$s=42;continue;case 34:a.addElement();a.setOriginalIM();a.im=AS;$s=42;continue;case 35:a.reconstructActiveFormattingElements();a.addElement();a.framesetOK=false;a.im=AZ;$s=-1;return true;case 36:if(a.top().DataAtom===451334){(a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).pop();}a.reconstructActiveFormattingElements();a.addElement();$s=42;continue;case 37:if(a.elementInScope(0,new DD([64260]))){a.generateImpliedEndTags(DH.nil);}a.addElement();$s=42;continue;case 38:if(a.elementInScope(0,new DD([64260]))){a.generateImpliedEndTags(new DH(["rtc"]));}a.addElement();$s=42;continue;case 39:a.reconstructActiveFormattingElements();if(a.tok.DataAtom===208388){BU(a.tok.Attr,CA);}else{BU(a.tok.Attr,CB);}BV(a.tok.Attr);a.addElement();a.top().Namespace=a.tok.Data;if(a.hasSelfClosingToken){(a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).pop();a.acknowledgeSelfClosingTag();}$s=-1;return true;case 40:$s=42;continue;case 41:a.reconstructActiveFormattingElements();a.addElement();case 42:case 8:$s=7;continue;case 4:an=a.tok.DataAtom;if(an===(10244)){$s=61;continue;}if(an===(22020)){$s=62;continue;}if((an===(455431))||(an===(261127))||(an===(67333))||(an===(100106))||(an===(102662))||(an===(139270))||(an===(29191))||(an===(37635))||(an===(92931))||(an===(386562))||(an===(140808))||(an===(142858))||(an===(149510))||(an===(62982))||(an===(209158))||(an===(182790))||(an===(305415))||(an===(231172))||(an===(4867))||(an===(79618))||(an===(290819))||(an===(354311))||(an===(459783))||(an===(42754))){$s=63;continue;}if(an===(159236)){$s=64;continue;}if(an===(3073)){$s=65;continue;}if(an===(45570)){$s=66;continue;}if((an===(186114))||(an===(412418))){$s=67;continue;}if((an===(89090))||(an===(187906))||(an===(199938))||(an===(214274))||(an===(216834))||(an===(412930))){$s=68;continue;}if((an===(1))||(an===(257))||(an===(94211))||(an===(378116))||(an===(28162))||(an===(16132))||(an===(1537))||(an===(14084))||(an===(9473))||(an===(132613))||(an===(53766))||(an===(449798))||(an===(26626))||(an===(2817))){$s=69;continue;}if((an===(203014))||(an===(206599))||(an===(157702))){$s=70;continue;}if(an===(514)){$s=71;continue;}if(an===(463880)){$s=72;continue;}$s=73;continue;case 61:if(a.elementInScope(0,new DD([10244]))){a.im=BC;}$s=74;continue;case 62:if(a.elementInScope(0,new DD([10244]))){$s=75;continue;}$s=76;continue;case 75:$r=a.parseImpliedToken(3,10244,new I.Atom(10244).String());$s=77;case 77:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return false;case 76:$s=-1;return true;case 63:a.popUntil(0,new DD([a.tok.DataAtom]));$s=74;continue;case 64:if((a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).contains(463880)){ao=a.indexOfElementInScope(0,new DD([159236]));if(ao===-1){$s=-1;return true;}a.generateImpliedEndTags(DH.nil);if(!(((ap=a.oe,((ao<0||ao>=ap.$length)?($throwRuntimeError("index out of range"),undefined):ap.$array[ap.$offset+ao])).DataAtom===159236))){$s=-1;return true;}a.popUntil(0,new DD([159236]));}else{aq=a.form;a.form=DE.nil;ar=a.indexOfElementInScope(0,new DD([159236]));if(aq===DE.nil||(ar===-1)||!((as=a.oe,((ar<0||ar>=as.$length)?($throwRuntimeError("index out of range"),undefined):as.$array[as.$offset+ar]))===aq)){$s=-1;return true;}a.generateImpliedEndTags(DH.nil);(a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).remove(aq);}$s=74;continue;case 65:if(!a.elementInScope(2,new DD([3073]))){$s=78;continue;}$s=79;continue;case 78:$r=a.parseImpliedToken(2,3073,new I.Atom(3073).String());$s=80;case 80:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 79:a.popUntil(2,new DD([3073]));$s=74;continue;case 66:a.popUntil(1,new DD([45570]));$s=74;continue;case 67:a.popUntil(0,new DD([a.tok.DataAtom]));$s=74;continue;case 68:a.popUntil(0,new DD([89090,187906,199938,214274,216834,412930]));$s=74;continue;case 69:a.inBodyEndTagFormatting(a.tok.DataAtom,a.tok.Data);$s=74;continue;case 70:if(a.popUntil(0,new DD([a.tok.DataAtom]))){a.clearActiveFormattingElements();}$s=74;continue;case 71:a.tok.Type=2;$s=-1;return false;case 72:at=AN(a);$s=81;case 81:if($c){$c=false;at=at.$blk();}if(at&&at.$blk!==undefined){break s;}au=at;$s=82;case 82:return au;case 73:a.inBodyEndTagOther(a.tok.DataAtom,a.tok.Data);case 74:case 60:$s=7;continue;case 5:a.addChild(new BQ.ptr(DE.nil,DE.nil,DE.nil,DE.nil,DE.nil,4,0,a.tok.Data,"",DG.nil));$s=7;continue;case 6:if(a.templateStack.$length>0){a.im=BB;$s=-1;return false;}else{av=a.oe;aw=0;while(true){if(!(aw=av.$length)?($throwRuntimeError("index out of range"),undefined):av.$array[av.$offset+aw]);ay=ax.DataAtom;if((ay===(186114))||(ay===(412418))||(ay===(45570))||(ay===(24328))||(ay===(451334))||(ay===(3073))||(ay===(14850))||(ay===(146434))||(ay===(104962))||(ay===(104963))||(ay===(9989))||(ay===(37378))||(ay===(62725))||(ay===(87554))||(ay===(208901))||(ay===(52226))||(ay===(10244))||(ay===(22020))){}else{$s=-1;return true;}aw++;}}case 7:case 1:$s=-1;return true;}return;}var $f={$blk:AR,$c:true,$r,a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};AG.ptr.prototype.inBodyEndTagFormatting=function(a,b){var a,aa,ab,ac,ad,ae,af,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;c=this;d=0;while(true){if(!(d<8)){break;}e=DE.nil;f=c.afe.$length-1>>0;while(true){if(!(f>=0)){break;}if((g=c.afe,((f<0||f>=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+f])).Type===6){break;}if((h=c.afe,((f<0||f>=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+f])).DataAtom===a){e=(i=c.afe,((f<0||f>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+f]));break;}f=f-(1)>>0;}if(e===DE.nil){c.inBodyEndTagOther(a,b);return;}j=(c.$ptr_oe||(c.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},c))).index(e);if(j===-1){(c.$ptr_afe||(c.$ptr_afe=new DL(function(){return this.$target.afe;},function($v){this.$target.afe=$v;},c))).remove(e);return;}if(!c.elementInScope(0,new DD([a]))){return;}k=DE.nil;l=$subslice(c.oe,j);m=0;while(true){if(!(m=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+m]);if(DA(n)){k=n;break;}m++;}if(k===DE.nil){o=(c.$ptr_oe||(c.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},c))).pop();while(true){if(!(!(o===e))){break;}o=(c.$ptr_oe||(c.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},c))).pop();}(c.$ptr_afe||(c.$ptr_afe=new DL(function(){return this.$target.afe;},function($v){this.$target.afe=$v;},c))).remove(o);return;}r=(p=c.oe,q=j-1>>0,((q<0||q>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+q]));s=(c.$ptr_afe||(c.$ptr_afe=new DL(function(){return this.$target.afe;},function($v){this.$target.afe=$v;},c))).index(e);t=k;u=k;v=(c.$ptr_oe||(c.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},c))).index(u);w=0;while(true){if(!(w<3)){break;}v=v-(1)>>0;u=(x=c.oe,((v<0||v>=x.$length)?($throwRuntimeError("index out of range"),undefined):x.$array[x.$offset+v]));if((c.$ptr_afe||(c.$ptr_afe=new DL(function(){return this.$target.afe;},function($v){this.$target.afe=$v;},c))).index(u)===-1){(c.$ptr_oe||(c.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},c))).remove(u);w=w+(1)>>0;continue;}if(u===e){break;}y=u.clone();(z=c.afe,aa=(c.$ptr_afe||(c.$ptr_afe=new DL(function(){return this.$target.afe;},function($v){this.$target.afe=$v;},c))).index(u),((aa<0||aa>=z.$length)?($throwRuntimeError("index out of range"),undefined):z.$array[z.$offset+aa]=y));(ab=c.oe,ac=(c.$ptr_oe||(c.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},c))).index(u),((ac<0||ac>=ab.$length)?($throwRuntimeError("index out of range"),undefined):ab.$array[ab.$offset+ac]=y));u=y;if(t===k){s=(c.$ptr_afe||(c.$ptr_afe=new DL(function(){return this.$target.afe;},function($v){this.$target.afe=$v;},c))).index(u)+1>>0;}if(!(t.Parent===DE.nil)){t.Parent.RemoveChild(t);}u.AppendChild(t);t=u;w=w+(1)>>0;}if(!(t.Parent===DE.nil)){t.Parent.RemoveChild(t);}ad=r.DataAtom;if((ad===(365829))||(ad===(9989))||(ad===(62725))||(ad===(208901))||(ad===(52226))){c.fosterParent(t);}else{r.AppendChild(t);}ae=e.clone();BR(ae,k);k.AppendChild(ae);af=(c.$ptr_afe||(c.$ptr_afe=new DL(function(){return this.$target.afe;},function($v){this.$target.afe=$v;},c))).index(e);if(!((af===-1))&&af>0;}(c.$ptr_afe||(c.$ptr_afe=new DL(function(){return this.$target.afe;},function($v){this.$target.afe=$v;},c))).remove(e);(c.$ptr_afe||(c.$ptr_afe=new DL(function(){return this.$target.afe;},function($v){this.$target.afe=$v;},c))).insert(s,ae);(c.$ptr_oe||(c.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},c))).remove(e);(c.$ptr_oe||(c.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},c))).insert((c.$ptr_oe||(c.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},c))).index(k)+1>>0,ae);d=d+(1)>>0;}};AG.prototype.inBodyEndTagFormatting=function(a,b){return this.$val.inBodyEndTagFormatting(a,b);};AG.ptr.prototype.inBodyEndTagOther=function(a,b){var a,b,c,d,e,f,g;c=this;d=c.oe.$length-1>>0;while(true){if(!(d>=0)){break;}if((((e=c.oe,((d<0||d>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+d])).DataAtom===a))&&((!((a===0)))||((f=c.oe,((d<0||d>=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+d])).Data===b))){c.oe=$subslice(c.oe,0,d);break;}if(DA((g=c.oe,((d<0||d>=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+d])))){break;}d=d-(1)>>0;}};AG.prototype.inBodyEndTagOther=function(a,b){return this.$val.inBodyEndTagOther(a,b);};AS=function(a){var a,b,c,d;b=a.tok.Type;if(b===(0)){(a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).pop();}else if(b===(1)){c=a.tok.Data;d=(a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).top();if((d.DataAtom===217608)&&d.FirstChild===DE.nil){if(!(c==="")&&(c.charCodeAt(0)===13)){c=$substring(c,1);}if(!(c==="")&&(c.charCodeAt(0)===10)){c=$substring(c,1);}}if(c===""){return true;}a.addText(c);return true;}else if(b===(3)){(a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).pop();}a.im=a.originalIM;a.originalIM=$throwNilPointerError;return a.tok.Type===3;};AT=function(a){var{a,aa,ab,ac,ad,ae,af,ag,ah,ai,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$deferred,$r,$c}=$restore(this,{a});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);a=[a];b=a[0].tok.Type;if(b===(1)){$s=2;continue;}if(b===(2)){$s=3;continue;}if(b===(3)){$s=4;continue;}if(b===(5)){$s=5;continue;}if(b===(6)){$s=6;continue;}if(b===(0)){$s=7;continue;}$s=8;continue;case 2:a[0].tok.Data=B.Replace(a[0].tok.Data,"\x00","",-1);c=(a[0].$ptr_oe||(a[0].$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a[0]))).top().DataAtom;if((c===(365829))||(c===(9989))||(c===(62725))||(c===(208901))||(c===(52226))){$s=10;continue;}$s=11;continue;case 10:if(B.Trim(a[0].tok.Data," \t\r\n\f")===""){$s=12;continue;}$s=13;continue;case 12:a[0].addText(a[0].tok.Data);d=true;$s=14;case 14:return d;case 13:case 11:case 9:$s=8;continue;case 3:e=a[0].tok.DataAtom;if(e===(143623)){$s=16;continue;}if(e===(109320)){$s=17;continue;}if(e===(109315)){$s=18;continue;}if((e===(9989))||(e===(62725))||(e===(208901))){$s=19;continue;}if((e===(37378))||(e===(87554))||(e===(52226))){$s=20;continue;}if(e===(365829)){$s=21;continue;}if((e===(458501))||(e===(137222))||(e===(463880))){$s=22;continue;}if(e===(281349)){$s=23;continue;}if(e===(159236)){$s=24;continue;}if(e===(408582)){$s=25;continue;}$s=26;continue;case 16:a[0].clearStackToContext(3);a[0].afe=$append(a[0].afe,BP);a[0].addElement();a[0].im=AU;f=true;$s=27;case 27:return f;case 17:a[0].clearStackToContext(3);a[0].addElement();a[0].im=AV;g=true;$s=28;case 28:return g;case 18:$r=a[0].parseImpliedToken(2,109320,new I.Atom(109320).String());$s=29;case 29:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}h=false;$s=30;case 30:return h;case 19:a[0].clearStackToContext(3);a[0].addElement();a[0].im=AW;i=true;$s=31;case 31:return i;case 20:$r=a[0].parseImpliedToken(2,9989,new I.Atom(9989).String());$s=32;case 32:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}j=false;$s=33;case 33:return j;case 21:if(a[0].popUntil(3,new DD([365829]))){$s=34;continue;}$s=35;continue;case 34:a[0].resetInsertionMode();k=false;$s=36;case 36:return k;case 35:l=true;$s=37;case 37:return l;case 22:m=AN(a[0]);$s=38;case 38:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}n=m;$s=39;case 39:return n;case 23:o=a[0].tok.Attr;p=0;case 40:if(!(p=o.$length)?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+p]);if(!(q.Key==="type")){r=false;$s=44;continue s;}s=B.ToLower(q.Val);$s=45;case 45:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}r=s==="hidden";case 44:if(r){$s=42;continue;}$s=43;continue;case 42:a[0].addElement();(a[0].$ptr_oe||(a[0].$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a[0]))).pop();t=true;$s=46;case 46:return t;case 43:p++;$s=40;continue;case 41:$s=26;continue;case 24:if((a[0].$ptr_oe||(a[0].$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a[0]))).contains(463880)||!(a[0].form===DE.nil)){$s=47;continue;}$s=48;continue;case 47:u=true;$s=49;case 49:return u;case 48:a[0].addElement();a[0].form=(a[0].$ptr_oe||(a[0].$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a[0]))).pop();$s=26;continue;case 25:a[0].reconstructActiveFormattingElements();v=a[0].top().DataAtom;if((v===(365829))||(v===(9989))||(v===(62725))||(v===(208901))||(v===(52226))){a[0].fosterParenting=true;}a[0].addElement();a[0].fosterParenting=false;a[0].framesetOK=false;a[0].im=BA;w=true;$s=50;case 50:return w;case 26:case 15:$s=8;continue;case 4:x=a[0].tok.DataAtom;if(x===(365829)){$s=52;continue;}if((x===(10244))||(x===(143623))||(x===(109315))||(x===(109320))||(x===(22020))||(x===(9989))||(x===(37378))||(x===(62725))||(x===(87554))||(x===(208901))||(x===(52226))){$s=53;continue;}if(x===(463880)){$s=54;continue;}$s=55;continue;case 52:if(a[0].popUntil(3,new DD([365829]))){$s=56;continue;}$s=57;continue;case 56:a[0].resetInsertionMode();y=true;$s=58;case 58:return y;case 57:z=true;$s=59;case 59:return z;case 53:aa=true;$s=60;case 60:return aa;case 54:ab=AN(a[0]);$s=61;case 61:if($c){$c=false;ab=ab.$blk();}if(ab&&ab.$blk!==undefined){break s;}ac=ab;$s=62;case 62:return ac;case 55:case 51:$s=8;continue;case 5:a[0].addChild(new BQ.ptr(DE.nil,DE.nil,DE.nil,DE.nil,DE.nil,4,0,a[0].tok.Data,"",DG.nil));ad=true;$s=63;case 63:return ad;case 6:ae=true;$s=64;case 64:return ae;case 7:af=AR(a[0]);$s=65;case 65:if($c){$c=false;af=af.$blk();}if(af&&af.$blk!==undefined){break s;}ag=af;$s=66;case 66:return ag;case 8:case 1:a[0].fosterParenting=true;$deferred.push([(function(a){return function(){a[0].fosterParenting=false;};})(a),[]]);ah=AR(a[0]);$s=67;case 67:if($c){$c=false;ah=ah.$blk();}if(ah&&ah.$blk!==undefined){break s;}ai=ah;$s=68;case 68:return ai;}return;}}catch(err){$err=err;$s=-1;return false;}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:AT,$c:true,$r,a,aa,ab,ac,ad,ae,af,ag,ah,ai,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$deferred};return $f;}}};AU=function(a){var{a,b,c,d,e,f,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=a.tok.Type;if(b===(2)){c=a.tok.DataAtom;if((c===(143623))||(c===(109315))||(c===(109320))||(c===(9989))||(c===(37378))||(c===(62725))||(c===(208901))||(c===(52226))){if(a.popUntil(3,new DD([143623]))){a.clearActiveFormattingElements();a.im=AT;$s=-1;return false;}else{$s=-1;return true;}}else if(c===(408582)){a.reconstructActiveFormattingElements();a.addElement();a.framesetOK=false;a.im=BA;$s=-1;return true;}}else if(b===(3)){d=a.tok.DataAtom;if(d===(143623)){if(a.popUntil(3,new DD([143623]))){a.clearActiveFormattingElements();a.im=AT;}$s=-1;return true;}else if(d===(365829)){if(a.popUntil(3,new DD([143623]))){a.clearActiveFormattingElements();a.im=AT;$s=-1;return false;}else{$s=-1;return true;}}else if((d===(10244))||(d===(109315))||(d===(109320))||(d===(22020))||(d===(9989))||(d===(37378))||(d===(62725))||(d===(87554))||(d===(208901))||(d===(52226))){$s=-1;return true;}}e=AR(a);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;$s=2;case 2:return f;}return;}var $f={$blk:AU,$c:true,$r,a,b,c,d,e,f,$s};return $f;};AV=function(a){var{a,b,c,d,e,f,g,h,i,j,k,l,m,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=a.tok.Type;if(b===(1)){$s=2;continue;}if(b===(5)){$s=3;continue;}if(b===(6)){$s=4;continue;}if(b===(2)){$s=5;continue;}if(b===(3)){$s=6;continue;}if(b===(0)){$s=7;continue;}$s=8;continue;case 2:c=B.TrimLeft(a.tok.Data," \t\r\n\f");if(c.length>0)));if(c===""){$s=-1;return true;}a.tok.Data=c;}$s=8;continue;case 3:a.addChild(new BQ.ptr(DE.nil,DE.nil,DE.nil,DE.nil,DE.nil,4,0,a.tok.Data,"",DG.nil));$s=-1;return true;case 4:$s=-1;return true;case 5:d=a.tok.DataAtom;if(d===(22020)){$s=10;continue;}if(d===(109315)){$s=11;continue;}if(d===(463880)){$s=12;continue;}$s=13;continue;case 10:e=AR(a);$s=14;case 14:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;$s=15;case 15:return f;case 11:a.addElement();(a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).pop();a.acknowledgeSelfClosingTag();$s=-1;return true;case 12:g=AN(a);$s=16;case 16:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;$s=17;case 17:return h;case 13:case 9:$s=8;continue;case 6:i=a.tok.DataAtom;if(i===(109320)){$s=19;continue;}if(i===(109315)){$s=20;continue;}if(i===(463880)){$s=21;continue;}$s=22;continue;case 19:if((a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).top().DataAtom===109320){(a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).pop();a.im=AT;}$s=-1;return true;case 20:$s=-1;return true;case 21:j=AN(a);$s=23;case 23:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j;$s=24;case 24:return k;case 22:case 18:$s=8;continue;case 7:l=AR(a);$s=25;case 25:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}m=l;$s=26;case 26:return m;case 8:case 1:if(!(((a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).top().DataAtom===109320))){$s=-1;return true;}(a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).pop();a.im=AT;$s=-1;return false;}return;}var $f={$blk:AV,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,$s};return $f;};AW=function(a){var{a,b,c,d,e,f,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=a.tok.Type;if(b===(2)){$s=2;continue;}if(b===(3)){$s=3;continue;}if(b===(5)){$s=4;continue;}$s=5;continue;case 2:c=a.tok.DataAtom;if(c===(52226)){$s=7;continue;}if((c===(37378))||(c===(87554))){$s=8;continue;}if((c===(143623))||(c===(109315))||(c===(109320))||(c===(9989))||(c===(62725))||(c===(208901))){$s=9;continue;}$s=10;continue;case 7:a.clearStackToContext(5);a.addElement();a.im=AX;$s=-1;return true;case 8:$r=a.parseImpliedToken(2,52226,new I.Atom(52226).String());$s=11;case 11:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return false;case 9:if(a.popUntil(3,new DD([9989,208901,62725]))){a.im=AT;$s=-1;return false;}$s=-1;return true;case 10:case 6:$s=5;continue;case 3:d=a.tok.DataAtom;if((d===(9989))||(d===(62725))||(d===(208901))){if(a.elementInScope(3,new DD([a.tok.DataAtom]))){a.clearStackToContext(5);(a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).pop();a.im=AT;}$s=-1;return true;}else if(d===(365829)){if(a.popUntil(3,new DD([9989,208901,62725]))){a.im=AT;$s=-1;return false;}$s=-1;return true;}else if((d===(10244))||(d===(143623))||(d===(109315))||(d===(109320))||(d===(22020))||(d===(37378))||(d===(87554))||(d===(52226))){$s=-1;return true;}$s=5;continue;case 4:a.addChild(new BQ.ptr(DE.nil,DE.nil,DE.nil,DE.nil,DE.nil,4,0,a.tok.Data,"",DG.nil));$s=-1;return true;case 5:case 1:e=AT(a);$s=12;case 12:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;$s=13;case 13:return f;}return;}var $f={$blk:AW,$c:true,$r,a,b,c,d,e,f,$s};return $f;};AX=function(a){var{a,b,c,d,e,f,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=a.tok.Type;if(b===(2)){$s=2;continue;}if(b===(3)){$s=3;continue;}$s=4;continue;case 2:c=a.tok.DataAtom;if((c===(37378))||(c===(87554))){a.clearStackToContext(4);a.addElement();a.afe=$append(a.afe,BP);a.im=AY;$s=-1;return true;}else if((c===(143623))||(c===(109315))||(c===(109320))||(c===(9989))||(c===(62725))||(c===(208901))||(c===(52226))){if(a.popUntil(3,new DD([52226]))){a.im=AW;$s=-1;return false;}$s=-1;return true;}$s=4;continue;case 3:d=a.tok.DataAtom;if(d===(52226)){$s=6;continue;}if(d===(365829)){$s=7;continue;}if((d===(9989))||(d===(62725))||(d===(208901))){$s=8;continue;}if((d===(10244))||(d===(143623))||(d===(109315))||(d===(109320))||(d===(22020))||(d===(37378))||(d===(87554))){$s=9;continue;}$s=10;continue;case 6:if(a.popUntil(3,new DD([52226]))){a.im=AW;$s=-1;return true;}$s=-1;return true;case 7:if(a.popUntil(3,new DD([52226]))){a.im=AW;$s=-1;return false;}$s=-1;return true;case 8:if(a.elementInScope(3,new DD([a.tok.DataAtom]))){$s=11;continue;}$s=12;continue;case 11:$r=a.parseImpliedToken(3,52226,new I.Atom(52226).String());$s=13;case 13:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return false;case 12:$s=-1;return true;case 9:$s=-1;return true;case 10:case 5:case 4:case 1:e=AT(a);$s=14;case 14:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;$s=15;case 15:return f;}return;}var $f={$blk:AX,$c:true,$r,a,b,c,d,e,f,$s};return $f;};AY=function(a){var{a,b,c,d,e,f,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=a.tok.Type;if(b===(2)){c=a.tok.DataAtom;if((c===(143623))||(c===(109315))||(c===(109320))||(c===(9989))||(c===(37378))||(c===(62725))||(c===(87554))||(c===(208901))||(c===(52226))){if(a.popUntil(3,new DD([37378,87554]))){a.clearActiveFormattingElements();a.im=AX;$s=-1;return false;}$s=-1;return true;}else if(c===(408582)){a.reconstructActiveFormattingElements();a.addElement();a.framesetOK=false;a.im=BA;$s=-1;return true;}}else if(b===(3)){d=a.tok.DataAtom;if((d===(37378))||(d===(87554))){if(!a.popUntil(3,new DD([a.tok.DataAtom]))){$s=-1;return true;}a.clearActiveFormattingElements();a.im=AX;$s=-1;return true;}else if((d===(10244))||(d===(143623))||(d===(109315))||(d===(109320))||(d===(22020))){$s=-1;return true;}else if((d===(365829))||(d===(9989))||(d===(62725))||(d===(208901))||(d===(52226))){if(!a.elementInScope(3,new DD([a.tok.DataAtom]))){$s=-1;return true;}if(a.popUntil(3,new DD([37378,87554]))){a.clearActiveFormattingElements();}a.im=AX;$s=-1;return false;}}e=AR(a);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;$s=2;case 2:return f;}return;}var $f={$blk:AY,$c:true,$r,a,b,c,d,e,f,$s};return $f;};AZ=function(a){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=a.tok.Type;if(b===(1)){$s=2;continue;}if(b===(2)){$s=3;continue;}if(b===(3)){$s=4;continue;}if(b===(5)){$s=5;continue;}if(b===(6)){$s=6;continue;}if(b===(0)){$s=7;continue;}$s=8;continue;case 2:a.addText(B.Replace(a.tok.Data,"\x00","",-1));$s=8;continue;case 3:c=a.tok.DataAtom;if(c===(22020)){$s=10;continue;}if(c===(451334)){$s=11;continue;}if(c===(24328)){$s=12;continue;}if(c===(408582)){$s=13;continue;}if((c===(281349))||(c===(12806))||(c===(217608))){$s=14;continue;}if((c===(137222))||(c===(463880))){$s=15;continue;}$s=16;continue;case 10:d=AR(a);$s=17;case 17:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;$s=18;case 18:return e;case 11:if(a.top().DataAtom===451334){(a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).pop();}a.addElement();$s=16;continue;case 12:if(a.top().DataAtom===451334){(a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).pop();}if(a.top().DataAtom===24328){(a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).pop();}a.addElement();$s=16;continue;case 13:if(a.popUntil(6,new DD([408582]))){a.resetInsertionMode();}else{$s=-1;return true;}$s=16;continue;case 14:if(a.elementInScope(6,new DD([408582]))){$s=19;continue;}$s=20;continue;case 19:$r=a.parseImpliedToken(3,408582,new I.Atom(408582).String());$s=21;case 21:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return false;case 20:a.tokenizer.NextIsNotRawText();$s=-1;return true;case 15:f=AN(a);$s=22;case 22:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;$s=23;case 23:return g;case 16:case 9:$s=8;continue;case 4:h=a.tok.DataAtom;if(h===(451334)){$s=25;continue;}if(h===(24328)){$s=26;continue;}if(h===(408582)){$s=27;continue;}if(h===(463880)){$s=28;continue;}$s=29;continue;case 25:if(a.top().DataAtom===451334){(a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).pop();}$s=29;continue;case 26:i=a.oe.$length-1>>0;if((j=a.oe,((i<0||i>=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+i])).DataAtom===451334){i=i-(1)>>0;}if((k=a.oe,((i<0||i>=k.$length)?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+i])).DataAtom===24328){a.oe=$subslice(a.oe,0,i);}$s=29;continue;case 27:if(a.popUntil(6,new DD([408582]))){a.resetInsertionMode();}else{$s=-1;return true;}$s=29;continue;case 28:l=AN(a);$s=30;case 30:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}m=l;$s=31;case 31:return m;case 29:case 24:$s=8;continue;case 5:a.addChild(new BQ.ptr(DE.nil,DE.nil,DE.nil,DE.nil,DE.nil,4,0,a.tok.Data,"",DG.nil));$s=8;continue;case 6:$s=-1;return true;case 7:n=AR(a);$s=32;case 32:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}o=n;$s=33;case 33:return o;case 8:case 1:$s=-1;return true;}return;}var $f={$blk:AZ,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,$s};return $f;};BA=function(a){var{a,b,c,d,e,f,g,h,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=a.tok.Type;if((b===(2))||(b===(3))){c=a.tok.DataAtom;if((c===(143623))||(c===(365829))||(c===(9989))||(c===(62725))||(c===(208901))||(c===(52226))||(c===(37378))||(c===(87554))){if((a.tok.Type===3)&&!a.elementInScope(3,new DD([a.tok.DataAtom]))){$s=-1;return true;}d=a.oe.$length-1>>0;while(true){if(!(d>=0)){break;}f=(e=a.oe,((d<0||d>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+d]));if(f.DataAtom===408582){a.oe=$subslice(a.oe,0,d);break;}d=d-(1)>>0;}a.resetInsertionMode();$s=-1;return false;}}g=AZ(a);$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;$s=2;case 2:return h;}return;}var $f={$blk:BA,$c:true,$r,a,b,c,d,e,f,g,h,$s};return $f;};BB=function(a){var{a,b,c,d,e,f,g,h,i,j,k,l,m,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=a.tok.Type;if((b===(1))||(b===(5))||(b===(6))){$s=2;continue;}if(b===(2)){$s=3;continue;}if(b===(3)){$s=4;continue;}if(b===(0)){$s=5;continue;}$s=6;continue;case 2:c=AR(a);$s=7;case 7:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;$s=8;case 8:return d;case 3:e=a.tok.DataAtom;if((e===(15108))||(e===(15112))||(e===(89607))||(e===(95236))||(e===(309252))||(e===(35080))||(e===(137222))||(e===(458501))||(e===(463880))||(e===(69637))){$s=10;continue;}if((e===(143623))||(e===(109320))||(e===(9989))||(e===(62725))||(e===(208901))){$s=11;continue;}if(e===(109315)){$s=12;continue;}if(e===(52226)){$s=13;continue;}if((e===(37378))||(e===(87554))){$s=14;continue;}$s=15;continue;case 10:f=AN(a);$s=17;case 17:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;$s=18;case 18:return g;case 11:(a.$ptr_templateStack||(a.$ptr_templateStack=new DM(function(){return this.$target.templateStack;},function($v){this.$target.templateStack=$v;},a))).pop();a.templateStack=$append(a.templateStack,AT);a.im=AT;$s=-1;return false;case 12:(a.$ptr_templateStack||(a.$ptr_templateStack=new DM(function(){return this.$target.templateStack;},function($v){this.$target.templateStack=$v;},a))).pop();a.templateStack=$append(a.templateStack,AV);a.im=AV;$s=-1;return false;case 13:(a.$ptr_templateStack||(a.$ptr_templateStack=new DM(function(){return this.$target.templateStack;},function($v){this.$target.templateStack=$v;},a))).pop();a.templateStack=$append(a.templateStack,AW);a.im=AW;$s=-1;return false;case 14:(a.$ptr_templateStack||(a.$ptr_templateStack=new DM(function(){return this.$target.templateStack;},function($v){this.$target.templateStack=$v;},a))).pop();a.templateStack=$append(a.templateStack,AX);a.im=AX;$s=-1;return false;case 15:(a.$ptr_templateStack||(a.$ptr_templateStack=new DM(function(){return this.$target.templateStack;},function($v){this.$target.templateStack=$v;},a))).pop();a.templateStack=$append(a.templateStack,AR);a.im=AR;$s=-1;return false;case 16:case 9:$s=6;continue;case 4:h=a.tok.DataAtom;if(h===(463880)){$s=20;continue;}$s=21;continue;case 20:i=AN(a);$s=23;case 23:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}j=i;$s=24;case 24:return j;case 21:$s=-1;return true;case 22:case 19:$s=6;continue;case 5:if(!(a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).contains(463880)){$s=-1;return true;}a.generateImpliedEndTags(DH.nil);k=a.oe.$length-1>>0;while(true){if(!(k>=0)){break;}m=(l=a.oe,((k<0||k>=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+k]));if(m.Namespace===""&&(m.DataAtom===463880)){a.oe=$subslice(a.oe,0,k);break;}k=k-(1)>>0;}a.clearActiveFormattingElements();(a.$ptr_templateStack||(a.$ptr_templateStack=new DM(function(){return this.$target.templateStack;},function($v){this.$target.templateStack=$v;},a))).pop();a.resetInsertionMode();$s=-1;return false;case 6:case 1:$s=-1;return false;}return;}var $f={$blk:BB,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,$s};return $f;};BC=function(a){var{a,b,c,d,e,f,g,h,i,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=a.tok.Type;if(b===(0)){$s=2;continue;}if(b===(1)){$s=3;continue;}if(b===(2)){$s=4;continue;}if(b===(3)){$s=5;continue;}if(b===(5)){$s=6;continue;}$s=7;continue;case 2:$s=-1;return true;case 3:c=B.TrimLeft(a.tok.Data," \t\r\n\f");if(c.length===0){$s=8;continue;}$s=9;continue;case 8:d=AR(a);$s=10;case 10:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;$s=11;case 11:return e;case 9:$s=7;continue;case 4:if(a.tok.DataAtom===22020){$s=12;continue;}$s=13;continue;case 12:f=AR(a);$s=14;case 14:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;$s=15;case 15:return g;case 13:$s=7;continue;case 5:if(a.tok.DataAtom===22020){if(!a.fragment){a.im=BF;}$s=-1;return true;}$s=7;continue;case 6:if(a.oe.$length<1||!(((h=a.oe,(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0])).DataAtom===22020))){$panic(new $String("html: bad parser state: element not found, in the after-body insertion mode"));}(i=a.oe,(0>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+0])).AppendChild(new BQ.ptr(DE.nil,DE.nil,DE.nil,DE.nil,DE.nil,4,0,a.tok.Data,"",DG.nil));$s=-1;return true;case 7:case 1:a.im=AR;$s=-1;return false;}return;}var $f={$blk:BC,$c:true,$r,a,b,c,d,e,f,g,h,i,$s};return $f;};BD=function(a){var{a,b,c,d,e,f,g,h,i,j,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=a.tok.Type;if(b===(5)){$s=2;continue;}if(b===(1)){$s=3;continue;}if(b===(2)){$s=4;continue;}if(b===(3)){$s=5;continue;}$s=6;continue;case 2:a.addChild(new BQ.ptr(DE.nil,DE.nil,DE.nil,DE.nil,DE.nil,4,0,a.tok.Data,"",DG.nil));$s=6;continue;case 3:c=B.Map((function(c){var c,d;d=c;if((d===(32))||(d===(9))||(d===(10))||(d===(12))||(d===(13))){return c;}return-1;}),a.tok.Data);$s=7;case 7:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;if(!(d==="")){a.addText(d);}$s=6;continue;case 4:e=a.tok.DataAtom;if(e===(22020)){$s=9;continue;}if(e===(35592)){$s=10;continue;}if(e===(35589)){$s=11;continue;}if(e===(35080)){$s=12;continue;}$s=13;continue;case 9:f=AR(a);$s=14;case 14:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;$s=15;case 15:return g;case 10:a.addElement();$s=13;continue;case 11:a.addElement();(a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).pop();a.acknowledgeSelfClosingTag();$s=13;continue;case 12:h=AN(a);$s=16;case 16:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=h;$s=17;case 17:return i;case 13:case 8:$s=6;continue;case 5:j=a.tok.DataAtom;if(j===(35592)){if(!(((a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).top().DataAtom===22020))){(a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).pop();if(!(((a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).top().DataAtom===35592))){a.im=BE;$s=-1;return true;}}}case 6:case 1:$s=-1;return true;}return;}var $f={$blk:BD,$c:true,$r,a,b,c,d,e,f,g,h,i,j,$s};return $f;};BE=function(a){var{a,b,c,d,e,f,g,h,i,j,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=a.tok.Type;if(b===(5)){$s=2;continue;}if(b===(1)){$s=3;continue;}if(b===(2)){$s=4;continue;}if(b===(3)){$s=5;continue;}$s=6;continue;case 2:a.addChild(new BQ.ptr(DE.nil,DE.nil,DE.nil,DE.nil,DE.nil,4,0,a.tok.Data,"",DG.nil));$s=6;continue;case 3:c=B.Map((function(c){var c,d;d=c;if((d===(32))||(d===(9))||(d===(10))||(d===(12))||(d===(13))){return c;}return-1;}),a.tok.Data);$s=7;case 7:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;if(!(d==="")){a.addText(d);}$s=6;continue;case 4:e=a.tok.DataAtom;if(e===(22020)){$s=9;continue;}if(e===(35080)){$s=10;continue;}$s=11;continue;case 9:f=AR(a);$s=12;case 12:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;$s=13;case 13:return g;case 10:h=AN(a);$s=14;case 14:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=h;$s=15;case 15:return i;case 11:case 8:$s=6;continue;case 5:j=a.tok.DataAtom;if(j===(22020)){a.im=BG;$s=-1;return true;}case 6:case 1:$s=-1;return true;}return;}var $f={$blk:BE,$c:true,$r,a,b,c,d,e,f,g,h,i,j,$s};return $f;};BF=function(a){var{a,b,c,d,e,f,g,h,i,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=a.tok.Type;if(b===(0)){$s=2;continue;}if(b===(1)){$s=3;continue;}if(b===(2)){$s=4;continue;}if(b===(5)){$s=5;continue;}if(b===(6)){$s=6;continue;}$s=7;continue;case 2:$s=-1;return true;case 3:c=B.TrimLeft(a.tok.Data," \t\r\n\f");if(c.length===0){$s=8;continue;}$s=9;continue;case 8:d=AR(a);$s=10;case 10:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;$s=11;case 11:return e;case 9:$s=7;continue;case 4:if(a.tok.DataAtom===22020){$s=12;continue;}$s=13;continue;case 12:f=AR(a);$s=14;case 14:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;$s=15;case 15:return g;case 13:$s=7;continue;case 5:a.doc.AppendChild(new BQ.ptr(DE.nil,DE.nil,DE.nil,DE.nil,DE.nil,4,0,a.tok.Data,"",DG.nil));$s=-1;return true;case 6:h=AR(a);$s=16;case 16:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=h;$s=17;case 17:return i;case 7:case 1:a.im=AR;$s=-1;return false;}return;}var $f={$blk:BF,$c:true,$r,a,b,c,d,e,f,g,h,i,$s};return $f;};BG=function(a){var{a,b,c,d,e,f,g,h,i,j,k,l,m,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=a.tok.Type;if(b===(5)){$s=2;continue;}if(b===(1)){$s=3;continue;}if(b===(2)){$s=4;continue;}if(b===(6)){$s=5;continue;}$s=6;continue;case 2:a.doc.AppendChild(new BQ.ptr(DE.nil,DE.nil,DE.nil,DE.nil,DE.nil,4,0,a.tok.Data,"",DG.nil));$s=6;continue;case 3:c=B.Map((function(c){var c,d;d=c;if((d===(32))||(d===(9))||(d===(10))||(d===(12))||(d===(13))){return c;}return-1;}),a.tok.Data);$s=7;case 7:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;if(!(d==="")){$s=8;continue;}$s=9;continue;case 8:a.tok.Data=d;e=AR(a);$s=10;case 10:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;$s=11;case 11:return f;case 9:$s=6;continue;case 4:g=a.tok.DataAtom;if(g===(22020)){$s=13;continue;}if(g===(35080)){$s=14;continue;}$s=15;continue;case 13:h=AR(a);$s=16;case 16:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=h;$s=17;case 17:return i;case 14:j=AN(a);$s=18;case 18:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j;$s=19;case 19:return k;case 15:case 12:$s=6;continue;case 5:l=AR(a);$s=20;case 20:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}m=l;$s=21;case 21:return m;case 6:case 1:$s=-1;return true;}return;}var $f={$blk:BG,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,$s};return $f;};BH=function(a){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=a.tok.Type;if(b===(1)){$s=2;continue;}if(b===(5)){$s=3;continue;}if(b===(2)){$s=4;continue;}if(b===(3)){$s=5;continue;}$s=6;continue;case 2:if(a.framesetOK){a.framesetOK=B.TrimLeft(a.tok.Data," \t\r\n\f\x00")==="";}a.tok.Data=B.Replace(a.tok.Data,"\x00","\xEF\xBF\xBD",-1);a.addText(a.tok.Data);$s=6;continue;case 3:a.addChild(new BQ.ptr(DE.nil,DE.nil,DE.nil,DE.nil,DE.nil,4,0,a.tok.Data,"",DG.nil));$s=6;continue;case 4:d=(c=$mapIndex(BY,$String.keyFor(a.tok.Data)),c!==undefined?c.v:false);if(a.tok.DataAtom===16132){e=a.tok.Attr;f=0;loop:while(true){if(!(f=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+f]);h=g.Key;if(h===("color")||h===("face")||h===("size")){d=true;break loop;}f++;}}if(d){$s=7;continue;}$s=8;continue;case 7:i=a.oe.$length-1>>0;case 9:if(!(i>=0)){$s=10;continue;}k=(j=a.oe,((i<0||i>=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+i]));if(k.Namespace===""){l=true;$s=13;continue s;}m=BW(k);$s=14;case 14:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}l=m;case 13:if(l||BX(k)){$s=11;continue;}$s=12;continue;case 11:a.oe=$subslice(a.oe,0,(i+1>>0));$s=10;continue;case 12:i=i-(1)>>0;$s=9;continue;case 10:$s=-1;return false;case 8:n=a.top().Namespace;if(n===("math")){BU(a.tok.Attr,CA);}else if(n===("svg")){p=(o=$mapIndex(BZ,$String.keyFor(a.tok.Data)),o!==undefined?o.v:"");if(!(p==="")){a.tok.DataAtom=I.Lookup((new DC($stringToBytes(p))));a.tok.Data=p;}BU(a.tok.Attr,CB);}else{$panic(new $String("html: bad parser state: unexpected namespace"));}BV(a.tok.Attr);q=a.top().Namespace;a.addElement();a.top().Namespace=q;if(!(q==="")){a.tokenizer.NextIsNotRawText();}if(a.hasSelfClosingToken){(a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).pop();a.acknowledgeSelfClosingTag();}$s=6;continue;case 5:r=a.oe.$length-1>>0;case 15:if(!(r>=0)){$s=16;continue;}if((s=a.oe,((r<0||r>=s.$length)?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+r])).Namespace===""){$s=17;continue;}$s=18;continue;case 17:t=a.im(a);$s=19;case 19:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}u=t;$s=20;case 20:return u;case 18:if(B.EqualFold((v=a.oe,((r<0||r>=v.$length)?($throwRuntimeError("index out of range"),undefined):v.$array[v.$offset+r])).Data,a.tok.Data)){a.oe=$subslice(a.oe,0,r);$s=16;continue;}r=r-(1)>>0;$s=15;continue;case 16:$s=-1;return true;case 6:case 1:$s=-1;return true;}return;}var $f={$blk:BH,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,$s};return $f;};AG.ptr.prototype.inForeignContent=function(){var{a,b,c,d,e,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;if(a.oe.$length===0){$s=-1;return false;}d=(b=a.oe,c=a.oe.$length-1>>0,((c<0||c>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+c]));if(d.Namespace===""){$s=-1;return false;}if(BX(d)){if((a.tok.Type===2)&&!((a.tok.DataAtom===198662))&&!((a.tok.DataAtom===45066))){$s=-1;return false;}if(a.tok.Type===1){$s=-1;return false;}}if(d.Namespace==="math"&&(d.DataAtom===117006)&&(a.tok.Type===2)&&(a.tok.DataAtom===462339)){$s=-1;return false;}e=BW(d);$s=3;case 3:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}if(e&&((a.tok.Type===2)||(a.tok.Type===1))){$s=1;continue;}$s=2;continue;case 1:$s=-1;return false;case 2:if(a.tok.Type===0){$s=-1;return false;}$s=-1;return true;}return;}var $f={$blk:AG.ptr.prototype.inForeignContent,$c:true,$r,a,b,c,d,e,$s};return $f;};AG.prototype.inForeignContent=function(){return this.$val.inForeignContent();};AG.ptr.prototype.parseImpliedToken=function(a,b,c){var{a,b,c,d,e,f,g,h,i,j,$s,$r,$c}=$restore(this,{a,b,c});$s=$s||0;s:while(true){switch($s){case 0:d=this;e=$clone(d.tok,Q);f=d.hasSelfClosingToken;g=$clone(e,Q);h=f;Q.copy(d.tok,new Q.ptr(a,b,c,DG.nil));d.hasSelfClosingToken=false;$r=d.parseCurrentToken();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}i=$clone(g,Q);j=h;Q.copy(d.tok,i);d.hasSelfClosingToken=j;$s=-1;return;}return;}var $f={$blk:AG.ptr.prototype.parseImpliedToken,$c:true,$r,a,b,c,d,e,f,g,h,i,j,$s};return $f;};AG.prototype.parseImpliedToken=function(a,b,c){return this.$val.parseImpliedToken(a,b,c);};AG.ptr.prototype.parseCurrentToken=function(){var{a,b,c,d,e,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;if(a.tok.Type===4){a.hasSelfClosingToken=true;a.tok.Type=2;}b=false;case 1:if(!(!b)){$s=2;continue;}c=a.inForeignContent();$s=6;case 6:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}if(c){$s=3;continue;}$s=4;continue;case 3:d=BH(a);$s=7;case 7:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}b=d;$s=5;continue;case 4:e=a.im(a);$s=8;case 8:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}b=e;case 5:$s=1;continue;case 2:if(a.hasSelfClosingToken){a.hasSelfClosingToken=false;}$s=-1;return;}return;}var $f={$blk:AG.ptr.prototype.parseCurrentToken,$c:true,$r,a,b,c,d,e,$s};return $f;};AG.prototype.parseCurrentToken=function(){return this.$val.parseCurrentToken();};AG.ptr.prototype.parse=function(){var{a,b,c,d,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;b=$ifaceNil;case 1:if(!(!($interfaceIsEqual(b,G.EOF)))){$s=2;continue;}c=(a.$ptr_oe||(a.$ptr_oe=new DL(function(){return this.$target.oe;},function($v){this.$target.oe=$v;},a))).top();a.tokenizer.AllowCDATA(!(c===DE.nil)&&!(c.Namespace===""));d=a.tokenizer.Next();$s=3;case 3:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}d;Q.copy(a.tok,a.tokenizer.Token());if(a.tok.Type===0){b=a.tokenizer.Err();if(!($interfaceIsEqual(b,$ifaceNil))&&!($interfaceIsEqual(b,G.EOF))){$s=-1;return b;}}$r=a.parseCurrentToken();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=1;continue;case 2:$s=-1;return $ifaceNil;}return;}var $f={$blk:AG.ptr.prototype.parse,$c:true,$r,a,b,c,d,$s};return $f;};AG.prototype.parse=function(){return this.$val.parse();};BI=function(a){var{a,b,c,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=BM(a,DN.nil);$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=b;$s=2;case 2:return c;}return;}var $f={$blk:BI,$c:true,$r,a,b,c,$s};return $f;};$pkg.Parse=BI;BJ=function(a,b){var{a,b,c,d,$s,$r,$c}=$restore(this,{a,b});$s=$s||0;s:while(true){switch($s){case 0:c=BN(a,b,DN.nil);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;$s=2;case 2:return d;}return;}var $f={$blk:BJ,$c:true,$r,a,b,c,d,$s};return $f;};$pkg.ParseFragment=BJ;BM=function(a,b){var{a,b,c,d,e,f,g,h,i,$s,$r,$c}=$restore(this,{a,b});$s=$s||0;s:while(true){switch($s){case 0:c=X(a);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=new AG.ptr(c,new Q.ptr(0,0,"",DG.nil),false,new BQ.ptr(DE.nil,DE.nil,DE.nil,DE.nil,DE.nil,2,0,"","",DG.nil),BS.nil,BS.nil,DE.nil,DE.nil,true,true,BT.nil,AK,$throwNilPointerError,false,false,false,DE.nil);e=b;f=0;case 2:if(!(f=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+f]);$r=g(d);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}f++;$s=2;continue;case 3:h=d.parse();$s=5;case 5:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=h;if(!($interfaceIsEqual(i,$ifaceNil))){$s=-1;return[DE.nil,i];}$s=-1;return[d.doc,$ifaceNil];}return;}var $f={$blk:BM,$c:true,$r,a,b,c,d,e,f,g,h,i,$s};return $f;};$pkg.ParseWithOptions=BM;BN=function(a,b,c){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,$s,$r,$c}=$restore(this,{a,b,c});$s=$s||0;s:while(true){switch($s){case 0:d="";if(!(b===DE.nil)){if(!((b.Type===3))){$s=-1;return[DP.nil,F.New("html: ParseFragment of non-element Node")];}if(!((b.DataAtom===I.Lookup((new DC($stringToBytes(b.Data))))))){$s=-1;return[DP.nil,F.New("html: inconsistent Node: DataAtom="+A.Itoa(((b.DataAtom>>0)))+", Data="+b.Data)];}d=new I.Atom(b.DataAtom).String();}e=Y(a,d);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=new AG.ptr(e,new Q.ptr(0,0,"",DG.nil),false,new BQ.ptr(DE.nil,DE.nil,DE.nil,DE.nil,DE.nil,2,0,"","",DG.nil),BS.nil,BS.nil,DE.nil,DE.nil,true,false,BT.nil,$throwNilPointerError,$throwNilPointerError,false,false,true,b);g=c;h=0;case 2:if(!(h=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+h]);$r=i(f);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}h++;$s=2;continue;case 3:j=new BQ.ptr(DE.nil,DE.nil,DE.nil,DE.nil,DE.nil,3,22020,new I.Atom(22020).String(),"",DG.nil);f.doc.AppendChild(j);f.oe=new BS([j]);if(!(b===DE.nil)&&(b.DataAtom===463880)){f.templateStack=$append(f.templateStack,BB);}f.resetInsertionMode();k=b;while(true){if(!(!(k===DE.nil))){break;}if((k.Type===3)&&(k.DataAtom===159236)){f.form=k;break;}k=k.Parent;}l=f.parse();$s=5;case 5:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}m=l;if(!($interfaceIsEqual(m,$ifaceNil))){$s=-1;return[DP.nil,m];}n=f.doc;if(!(b===DE.nil)){n=j;}o=DP.nil;p=n.FirstChild;while(true){if(!(!(p===DE.nil))){break;}q=p.NextSibling;n.RemoveChild(p);o=$append(o,p);p=q;}$s=-1;return[o,$ifaceNil];}return;}var $f={$blk:BN,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,$s};return $f;};$pkg.ParseFragmentWithOptions=BN;BQ.ptr.prototype.Unlink=function(){var a;a=this;if(!(DE.nil===a.PrevSibling)){a.PrevSibling.NextSibling=a.NextSibling;}else if(!(DE.nil===a.Parent)){a.Parent.FirstChild=a.NextSibling;}if(!(DE.nil===a.NextSibling)){a.NextSibling.PrevSibling=a.PrevSibling;}else if(!(DE.nil===a.Parent)){a.Parent.LastChild=a.PrevSibling;}a.Parent=DE.nil;a.NextSibling=DE.nil;a.PrevSibling=DE.nil;};BQ.prototype.Unlink=function(){return this.$val.Unlink();};BQ.ptr.prototype.InsertBefore=function(a){var a,b;b=this;a.Unlink();a.PrevSibling=b.PrevSibling;if(!(DE.nil===a.PrevSibling)){a.PrevSibling.NextSibling=a;}a.NextSibling=b;b.PrevSibling=a;a.Parent=b.Parent;if(!(DE.nil===a.Parent)&&DE.nil===a.PrevSibling){a.Parent.FirstChild=a;}};BQ.prototype.InsertBefore=function(a){return this.$val.InsertBefore(a);};BQ.ptr.prototype.InsertAfter=function(a){var a,b;b=this;a.Unlink();a.NextSibling=b.NextSibling;if(!(DE.nil===a.NextSibling)){a.NextSibling.PrevSibling=a;}a.PrevSibling=b;b.NextSibling=a;a.Parent=b.Parent;if(DE.nil===a.NextSibling&&!(DE.nil===a.Parent)){a.Parent.LastChild=a;}};BQ.prototype.InsertAfter=function(a){return this.$val.InsertAfter(a);};BQ.ptr.prototype.InsertChildBefore=function(a,b){var a,b,c,d,e,f,g,h,i;c=this;if(!(a.Parent===DE.nil)||!(a.PrevSibling===DE.nil)||!(a.NextSibling===DE.nil)){$panic(new $String("html: InsertChildBefore called for an attached child Node"));}d=DE.nil;e=DE.nil;f=d;g=e;if(!(b===DE.nil)){h=b.PrevSibling;i=b;f=h;g=i;}else{f=c.LastChild;}if(!(f===DE.nil)){f.NextSibling=a;}else{c.FirstChild=a;}if(!(g===DE.nil)){g.PrevSibling=a;}else{c.LastChild=a;}a.Parent=c;a.PrevSibling=f;a.NextSibling=g;};BQ.prototype.InsertChildBefore=function(a,b){return this.$val.InsertChildBefore(a,b);};BQ.ptr.prototype.AppendChild=function(a){var a,b,c;b=this;if(!(a.Parent===DE.nil)||!(a.PrevSibling===DE.nil)||!(a.NextSibling===DE.nil)){$panic(new $String("html: AppendChild called for an attached child Node"));}c=b.LastChild;if(!(c===DE.nil)){c.NextSibling=a;}else{b.FirstChild=a;}b.LastChild=a;a.Parent=b;a.PrevSibling=c;};BQ.prototype.AppendChild=function(a){return this.$val.AppendChild(a);};BQ.ptr.prototype.RemoveChild=function(a){var a,b;b=this;if(!(a.Parent===b)){$panic(new $String("html: RemoveChild called for a non-child Node"));}if(b.FirstChild===a){b.FirstChild=a.NextSibling;}if(!(a.NextSibling===DE.nil)){a.NextSibling.PrevSibling=a.PrevSibling;}if(b.LastChild===a){b.LastChild=a.PrevSibling;}if(!(a.PrevSibling===DE.nil)){a.PrevSibling.NextSibling=a.NextSibling;}a.Parent=DE.nil;a.PrevSibling=DE.nil;a.NextSibling=DE.nil;};BQ.prototype.RemoveChild=function(a){return this.$val.RemoveChild(a);};BR=function(a,b){var a,b,c;while(true){c=b.FirstChild;if(c===DE.nil){break;}b.RemoveChild(c);a.AppendChild(c);}};BQ.ptr.prototype.clone=function(){var a,b;a=this;b=new BQ.ptr(DE.nil,DE.nil,DE.nil,DE.nil,DE.nil,a.Type,a.DataAtom,a.Data,"",$makeSlice(DG,a.Attr.$length));$copySlice(b.Attr,a.Attr);return b;};BQ.prototype.clone=function(){return this.$val.clone();};$ptrType(BS).prototype.pop=function(){var a,b,c,d,e;a=this;b=a.$get().$length;e=(c=a.$get(),d=b-1>>0,((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]));a.$set($subslice((a.$get()),0,(b-1>>0)));return e;};$ptrType(BS).prototype.top=function(){var a,b,c,d;a=this;b=a.$get().$length;if(b>0){return(c=a.$get(),d=b-1>>0,((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]));}return DE.nil;};$ptrType(BS).prototype.index=function(a){var a,b,c,d;b=this;c=b.$get().$length-1>>0;while(true){if(!(c>=0)){break;}if((d=b.$get(),((c<0||c>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+c]))===a){return c;}c=c-(1)>>0;}return-1;};$ptrType(BS).prototype.contains=function(a){var a,b,c,d,e;b=this;c=b.$get();d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if((e.DataAtom===a)&&e.Namespace===""){return true;}d++;}return false;};$ptrType(BS).prototype.insert=function(a,b){var a,b,c,d;c=this;c.$set($append(c.$get(),DE.nil));$copySlice($subslice((c.$get()),(a+1>>0)),$subslice((c.$get()),a));(d=c.$get(),((a<0||a>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+a]=b));};$ptrType(BS).prototype.remove=function(a){var a,b,c,d,e;b=this;c=b.index(a);if(c===-1){return;}$copySlice($subslice((b.$get()),c),$subslice((b.$get()),(c+1>>0)));d=b.$get().$length-1>>0;(e=b.$get(),((d<0||d>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+d]=DE.nil));b.$set($subslice((b.$get()),0,d));};$ptrType(BT).prototype.pop=function(){var a,b,c,d,e;a=$throwNilPointerError;b=this;c=b.$get().$length;a=(d=b.$get(),e=c-1>>0,((e<0||e>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+e]));b.$set($subslice((b.$get()),0,(c-1>>0)));a=a;return a;};$ptrType(BT).prototype.top=function(){var a,b,c,d;a=this;b=a.$get().$length;if(b>0){return(c=a.$get(),d=b-1>>0,((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]));}return $throwNilPointerError;};BU=function(a,b){var a,b,c,d,e,f,g,h,i;c=a;d=0;while(true){if(!(d=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+e]).Key)),g!==undefined?[g.v,true]:["",false]);h=f[0];i=f[1];if(i){((e<0||e>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+e]).Key=h;}d++;}};BV=function(a){var a,b,c,d,e,f,g;b=a;c=0;while(true){if(!(c=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+c]);if(e.Key===""||!((e.Key.charCodeAt(0)===120))){c++;continue;}f=e.Key;if(f===("xlink:actuate")||f===("xlink:arcrole")||f===("xlink:href")||f===("xlink:role")||f===("xlink:show")||f===("xlink:title")||f===("xlink:type")||f===("xml:base")||f===("xml:lang")||f===("xml:space")||f===("xmlns:xlink")){g=B.Index(e.Key,":");((d<0||d>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+d]).Namespace=$substring(e.Key,0,g);((d<0||d>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+d]).Key=$substring(e.Key,(g+1>>0));}c++;}};BW=function(a){var{a,b,c,d,e,f,g,h,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:if(!((a.Type===3))){$s=-1;return false;}b=a.Namespace;if(b===("math")){$s=2;continue;}if(b===("svg")){$s=3;continue;}$s=4;continue;case 2:if(a.Data==="annotation-xml"){$s=5;continue;}$s=6;continue;case 5:c=a.Attr;d=0;case 7:if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(e.Key==="encoding"){$s=9;continue;}$s=10;continue;case 9:f=B.ToLower(e.Val);$s=11;case 11:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;if(g==="text/html"||g==="application/xhtml+xml"){$s=-1;return true;}case 10:d++;$s=7;continue;case 8:case 6:$s=4;continue;case 3:h=a.Data;if(h===("desc")||h===("foreignObject")||h===("title")){$s=-1;return true;}case 4:case 1:$s=-1;return false;}return;}var $f={$blk:BW,$c:true,$r,a,b,c,d,e,f,g,h,$s};return $f;};BX=function(a){var a,b;if(!(a.Namespace==="math")){return false;}b=a.Data;if(b===("mi")||b===("mo")||b===("mn")||b===("ms")||b===("mtext")){return true;}return false;};CG=function(a){var a;a=B.ReplaceAll(a,"_esc_newline_","\n");a=B.ReplaceAll(a,"{","{");a=B.ReplaceAll(a,"}","}");return CW(a);};$pkg.UnescapeAttrVal=CG;CH=function(a){var a,b;b="";b=($bytesToString(CL((new DC($stringToBytes(a))))));b=B.ReplaceAll(b,"\n","_esc_newline_");b=B.ReplaceAll(b,"{","{");b=B.ReplaceAll(b,"}","}");return b;};$pkg.EscapeAttrVal=CH;CI=function(a){var a;return CW(a);};$pkg.UnescapeHTMLStr=CI;CJ=function(a){var a;return($bytesToString(CL((new DC($stringToBytes(a))))));};$pkg.EscapeHTMLStr=CJ;CK=function(a){var a,b;b=DC.nil;b=(new DC($stringToBytes(CW(($bytesToString(a))))));return b;};$pkg.UnescapeHTML=CK;CL=function(a){var a,b,c,d,e,f,g,h,i;b=DC.nil;c=a.$length;d=0;e=0;f=d;g=e;h=false;b=a;while(true){if(!(g=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+g]);if(i===(38)){if(!h){b=$makeSlice(DC,0,(c+128>>0));h=true;}b=$appendSlice(b,$subslice(a,f,g));b=$appendSlice(b,CC);f=g+1>>0;}else if(i===(60)){if(!h){b=$makeSlice(DC,0,(c+128>>0));h=true;}b=$appendSlice(b,$subslice(a,f,g));b=$appendSlice(b,CD);f=g+1>>0;}else if(i===(62)){if(!h){b=$makeSlice(DC,0,(c+128>>0));h=true;}b=$appendSlice(b,$subslice(a,f,g));b=$appendSlice(b,CE);f=g+1>>0;}else if(i===(34)){if(!h){b=$makeSlice(DC,0,(c+128>>0));h=true;}b=$appendSlice(b,$subslice(a,f,g));b=$appendSlice(b,CF);f=g+1>>0;}g=g+(1)>>0;}if(h){b=$appendSlice(b,$subslice(a,f));}return b;};$pkg.EscapeHTML=CL;CM=function(a){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;b=DC.nil;b=$makeSlice(DC,0,256);c=0;d=0;while(true){if(!(c>0;j=h;k=i;while(true){if(!(j=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+j]);d=((j<0||j>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+j]);b=$append(b,37);b=$append(b,"0123456789ABCDEF".charCodeAt(((((l>>>4<<24>>>24))&15)>>>0)));b=$append(b,"0123456789ABCDEF".charCodeAt(((l&15)>>>0)));j=j+(1)>>0;}}else if(f===37){d=((c<0||c>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+c]);if((c+2>>0)>0,((m<0||m>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+m])))&&D.IsHexDigit((n=c+2>>0,((n<0||n>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+n])))){b=$append(b,37);b=$append(b,D.TokenToUpper((o=c+1>>0,((o<0||o>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+o]))));b=$append(b,D.TokenToUpper((p=c+2>>0,((p<0||p>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+p]))));c=c+(2)>>0;}else{b=$append(b,37);b=$append(b,50);b=$append(b,53);}}else if(B.IndexByte("!#$&'()*+,-./0123456789:;=?@ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~",((f<<24>>>24)))===-1){d=((c<0||c>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+c]);b=$append(b,37);b=$append(b,"0123456789ABCDEF".charCodeAt((((f>>4>>0))&15)));b=$append(b,"0123456789ABCDEF".charCodeAt((f&15)));}else{d=((c<0||c>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+c]);b=$append(b,d);}c=c+(g)>>0;}return b;};$pkg.EncodeDestination=CM;CR=function(a,b,c,d){var a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;e=0;f=0;g=1;h=$subslice(a,c);i=g;j=h;if(j.$length<=1){((b<0||b>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+b]=((c<0||c>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+c]));k=b+1>>0;l=c+1>>0;e=k;f=l;return[e,f];}if(((i<0||i>=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+i])===35){if(j.$length<=3){((b<0||b>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+b]=((c<0||c>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+c]));m=b+1>>0;n=c+1>>0;e=m;f=n;return[e,f];}i=i+(1)>>0;o=((i<0||i>=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+i]);p=false;if((o===120)||(o===88)){p=true;i=i+(1)>>0;}q=0;while(true){if(!(i=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+i]);i=i+(1)>>0;if(p){if(48<=o&&o<=57){q=(($imul(16,q))+((o>>0))>>0)-48>>0;continue;}else if(97<=o&&o<=102){q=((($imul(16,q))+((o>>0))>>0)-97>>0)+10>>0;continue;}else if(65<=o&&o<=70){q=((($imul(16,q))+((o>>0))>>0)-65>>0)+10>>0;continue;}}else if(48<=o&&o<=57){q=(($imul(10,q))+((o>>0))>>0)-48>>0;continue;}if(!((o===59))){i=i-(1)>>0;}break;}if(i<=3){((b<0||b>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+b]=((c<0||c>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+c]));r=b+1>>0;s=c+1>>0;e=r;f=s;return[e,f];}if(128<=q&&q<=159){q=(t=q-128>>0,((t<0||t>=CQ.length)?($throwRuntimeError("index out of range"),undefined):CQ[t]));}else if((q===0)||(55296<=q&&q<=57343)||q>1114111){q=65533;}u=b+C.EncodeRune($subslice(a,b),q)>>0;v=c+i>>0;e=u;f=v;return[e,f];}while(true){if(!(i=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+i]);i=i+(1)>>0;if(97<=w&&w<=122||65<=w&&w<=90||48<=w&&w<=57){continue;}if(!((w===59))){i=i-(1)>>0;}break;}x=i;if(x<1){x=1;}y=($bytesToString($subslice(j,1,x)));if(y===""){}else if(d&&!((y.charCodeAt((y.length-1>>0))===59))&&j.$length>i&&(((i<0||i>=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+i])===61)){}else{aa=(z=$mapIndex($pkg.Entities,$String.keyFor(y)),z!==undefined?z.v:"");if(!(aa==="")){ab=b+C.EncodeRune($subslice(a,b),(ac=(new DQ($stringToRunes(aa))),(0>=ac.$length?($throwRuntimeError("index out of range"),undefined):ac.$array[ac.$offset+0])))>>0;ad=c+i>>0;e=ab;f=ad;return[e,f];}else if(!d){ae=y.length-1>>0;if(ae>6){ae=6;}af=ae;while(true){if(!(af>1)){break;}ah=(ag=$mapIndex($pkg.Entities,$String.keyFor($substring(y,0,af))),ag!==undefined?ag.v:"");if(!(ah==="")){ai=b+C.EncodeRune($subslice(a,b),(aj=(new DQ($stringToRunes(ah))),(0>=aj.$length?($throwRuntimeError("index out of range"),undefined):aj.$array[aj.$offset+0])))>>0;ak=(c+af>>0)+1>>0;e=ai;f=ak;return[e,f];}af=af-(1)>>0;}}}al=b+i>>0;am=c+i>>0;e=al;f=am;$copySlice($subslice(a,b,e),$subslice(a,c,f));an=e;ao=f;e=an;f=ao;return[e,f];};CS=function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l,m;c=a;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(f===38){g=CR(a,e,e,b);h=g[0];i=g[1];while(true){if(!(i=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+i]);if(j===38){k=CR(a,h,i,b);h=k[0];i=k[1];}else{((h<0||h>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+h]=j);l=h+1>>0;m=i+1>>0;h=l;i=m;}}return $subslice(a,0,h);}d++;}return a;};CT=function(a){var a,b,c,d,e;b=a;c=0;while(true){if(!(c=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+c]);if(65<=e&&e<=90){((d<0||d>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+d]=((e+97<<24>>>24)-65<<24>>>24));}c++;}return a;};CU=function(a,b){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,$s,$r,$c}=$restore(this,{a,b});$s=$s||0;s:while(true){switch($s){case 0:c=B.IndexAny(b,"&'<>\"\r");case 1:if(!(!((c===-1)))){$s=2;continue;}e=a.WriteString($substring(b,0,c));$s=3;case 3:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}d=e;f=d[1];if(!($interfaceIsEqual(f,$ifaceNil))){$s=-1;return f;}g="";h=b.charCodeAt(c);if(h===(38)){g="&";}else if(h===(39)){g="'";}else if(h===(60)){g="<";}else if(h===(62)){g=">";}else if(h===(34)){g=""";}else if(h===(13)){g=" ";}else{$panic(new $String("unrecognized escape character"));}b=$substring(b,(c+1>>0));j=a.WriteString(g);$s=4;case 4:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}i=j;k=i[1];if(!($interfaceIsEqual(k,$ifaceNil))){$s=-1;return k;}c=B.IndexAny(b,"&'<>\"\r");$s=1;continue;case 2:m=a.WriteString(b);$s=5;case 5:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}l=m;n=l[1];$s=-1;return n;}return;}var $f={$blk:CU,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,$s};return $f;};CV=function(a){var{a,b,c,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=[b];if(B.IndexAny(a,"&'<>\"\r")===-1){$s=-1;return a;}b[0]=new E.Buffer.ptr(DC.nil,0,0);c=CU(b[0],a);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}c;$s=-1;return b[0].String();}return;}var $f={$blk:CV,$c:true,$r,a,b,c,$s};return $f;};$pkg.EscapeString=CV;CW=function(a){var a,b,c,d,e;b=a;c=0;while(true){if(!(c>0)));l="";if(k===-1){l=a;a="";}else{l=$substring(a,0,k);a=$substring(a,(k+1>>0));}b.Attr=$append(b.Attr,new P.ptr("",i,l));if(i==="public"){i="system";}else{i="";}}if(!(i==="")||!(a==="")){$s=3;continue;}if(b.Attr.$length>0){$s=4;continue;}$s=5;continue;case 3:c=true;$s=5;continue;case 4:if((m=b.Attr,(0>=m.$length?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+0])).Key==="public"){$s=6;continue;}$s=7;continue;case 6:o=B.ToLower((n=b.Attr,(0>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+0])).Val);$s=8;case 8:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}p=o;q=p;if(q===("-//w3o//dtd w3 html strict 3.0//en//")||q===("-/w3d/dtd html 4.0 transitional/en")||q===("html")){c=true;}else{r=CY;s=0;while(true){if(!(s=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+s]);if(B.HasPrefix(p,t)){c=true;break;}s++;}}if((b.Attr.$length===1)&&(B.HasPrefix(p,"-//w3c//dtd html 4.01 frameset//")||B.HasPrefix(p,"-//w3c//dtd html 4.01 transitional//"))){c=true;}case 7:w=(u=b.Attr,v=b.Attr.$length-1>>0,((v<0||v>=u.$length)?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+v]));if(!(w.Key==="system")){x=false;$s=11;continue s;}y=B.ToLower(w.Val);$s=12;case 12:if($c){$c=false;y=y.$blk();}if(y&&y.$blk!==undefined){break s;}x=y==="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd";case 11:if(x){$s=9;continue;}$s=10;continue;case 9:c=true;case 10:case 5:z=b;aa=c;b=z;c=aa;$s=-1;return[b,c];}return;}var $f={$blk:CX,$c:true,$r,a,aa,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};DA=function(a){var a,b,c,d,e;b=a.Namespace;if(b===("")||b===("html")){return(c=$mapIndex(CZ,$String.keyFor(a.Data)),c!==undefined?c.v:false);}else if(b===("math")){d=a.Data;if(d===("mi")||d===("mo")||d===("mn")||d===("ms")||d===("mtext")||d===("annotation-xml")){return true;}}else if(b===("svg")){e=a.Data;if(e===("foreignObject")||e===("desc")||e===("title")){return true;}}return false;};O.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];Q.methods=[{prop:"tagString",name:"tagString",pkg:"github.com/88250/lute/html",typ:$funcType([],[$String],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];DO.methods=[{prop:"AllowCDATA",name:"AllowCDATA",pkg:"",typ:$funcType([$Bool],[],false)},{prop:"NextIsNotRawText",name:"NextIsNotRawText",pkg:"",typ:$funcType([],[],false)},{prop:"Err",name:"Err",pkg:"",typ:$funcType([],[$error],false)},{prop:"readByte",name:"readByte",pkg:"github.com/88250/lute/html",typ:$funcType([],[$Uint8],false)},{prop:"Buffered",name:"Buffered",pkg:"",typ:$funcType([],[DC],false)},{prop:"skipWhiteSpace",name:"skipWhiteSpace",pkg:"github.com/88250/lute/html",typ:$funcType([],[],false)},{prop:"readRawOrRCDATA",name:"readRawOrRCDATA",pkg:"github.com/88250/lute/html",typ:$funcType([],[],false)},{prop:"readRawEndTag",name:"readRawEndTag",pkg:"github.com/88250/lute/html",typ:$funcType([],[$Bool],false)},{prop:"readScript",name:"readScript",pkg:"github.com/88250/lute/html",typ:$funcType([],[],false)},{prop:"readComment",name:"readComment",pkg:"github.com/88250/lute/html",typ:$funcType([],[],false)},{prop:"readUntilCloseAngle",name:"readUntilCloseAngle",pkg:"github.com/88250/lute/html",typ:$funcType([],[],false)},{prop:"readMarkupDeclaration",name:"readMarkupDeclaration",pkg:"github.com/88250/lute/html",typ:$funcType([],[O],false)},{prop:"readDoctype",name:"readDoctype",pkg:"github.com/88250/lute/html",typ:$funcType([],[$Bool],false)},{prop:"readCDATA",name:"readCDATA",pkg:"github.com/88250/lute/html",typ:$funcType([],[$Bool],false)},{prop:"startTagIn",name:"startTagIn",pkg:"github.com/88250/lute/html",typ:$funcType([DH],[$Bool],true)},{prop:"readStartTag",name:"readStartTag",pkg:"github.com/88250/lute/html",typ:$funcType([],[O],false)},{prop:"readTag",name:"readTag",pkg:"github.com/88250/lute/html",typ:$funcType([$Bool],[],false)},{prop:"readTagName",name:"readTagName",pkg:"github.com/88250/lute/html",typ:$funcType([],[],false)},{prop:"readTagAttrKey",name:"readTagAttrKey",pkg:"github.com/88250/lute/html",typ:$funcType([],[],false)},{prop:"readTagAttrVal",name:"readTagAttrVal",pkg:"github.com/88250/lute/html",typ:$funcType([],[],false)},{prop:"Next",name:"Next",pkg:"",typ:$funcType([],[O],false)},{prop:"Raw",name:"Raw",pkg:"",typ:$funcType([],[DC],false)},{prop:"Text",name:"Text",pkg:"",typ:$funcType([],[DC],false)},{prop:"TagName",name:"TagName",pkg:"",typ:$funcType([],[DC,$Bool],false)},{prop:"TagAttr",name:"TagAttr",pkg:"",typ:$funcType([],[DC,DC,$Bool],false)},{prop:"Token",name:"Token",pkg:"",typ:$funcType([],[Q],false)},{prop:"SetMaxBuf",name:"SetMaxBuf",pkg:"",typ:$funcType([$Int],[],false)}];DR.methods=[{prop:"top",name:"top",pkg:"github.com/88250/lute/html",typ:$funcType([],[DE],false)},{prop:"popUntil",name:"popUntil",pkg:"github.com/88250/lute/html",typ:$funcType([AI,DD],[$Bool],true)},{prop:"indexOfElementInScope",name:"indexOfElementInScope",pkg:"github.com/88250/lute/html",typ:$funcType([AI,DD],[$Int],true)},{prop:"elementInScope",name:"elementInScope",pkg:"github.com/88250/lute/html",typ:$funcType([AI,DD],[$Bool],true)},{prop:"clearStackToContext",name:"clearStackToContext",pkg:"github.com/88250/lute/html",typ:$funcType([AI],[],false)},{prop:"generateImpliedEndTags",name:"generateImpliedEndTags",pkg:"github.com/88250/lute/html",typ:$funcType([DH],[],true)},{prop:"addChild",name:"addChild",pkg:"github.com/88250/lute/html",typ:$funcType([DE],[],false)},{prop:"shouldFosterParent",name:"shouldFosterParent",pkg:"github.com/88250/lute/html",typ:$funcType([],[$Bool],false)},{prop:"fosterParent",name:"fosterParent",pkg:"github.com/88250/lute/html",typ:$funcType([DE],[],false)},{prop:"addText",name:"addText",pkg:"github.com/88250/lute/html",typ:$funcType([$String],[],false)},{prop:"addElement",name:"addElement",pkg:"github.com/88250/lute/html",typ:$funcType([],[],false)},{prop:"addFormattingElement",name:"addFormattingElement",pkg:"github.com/88250/lute/html",typ:$funcType([],[],false)},{prop:"clearActiveFormattingElements",name:"clearActiveFormattingElements",pkg:"github.com/88250/lute/html",typ:$funcType([],[],false)},{prop:"reconstructActiveFormattingElements",name:"reconstructActiveFormattingElements",pkg:"github.com/88250/lute/html",typ:$funcType([],[],false)},{prop:"acknowledgeSelfClosingTag",name:"acknowledgeSelfClosingTag",pkg:"github.com/88250/lute/html",typ:$funcType([],[],false)},{prop:"setOriginalIM",name:"setOriginalIM",pkg:"github.com/88250/lute/html",typ:$funcType([],[],false)},{prop:"resetInsertionMode",name:"resetInsertionMode",pkg:"github.com/88250/lute/html",typ:$funcType([],[],false)},{prop:"inBodyEndTagFormatting",name:"inBodyEndTagFormatting",pkg:"github.com/88250/lute/html",typ:$funcType([I.Atom,$String],[],false)},{prop:"inBodyEndTagOther",name:"inBodyEndTagOther",pkg:"github.com/88250/lute/html",typ:$funcType([I.Atom,$String],[],false)},{prop:"inForeignContent",name:"inForeignContent",pkg:"github.com/88250/lute/html",typ:$funcType([],[$Bool],false)},{prop:"parseImpliedToken",name:"parseImpliedToken",pkg:"github.com/88250/lute/html",typ:$funcType([O,I.Atom,$String],[],false)},{prop:"parseCurrentToken",name:"parseCurrentToken",pkg:"github.com/88250/lute/html",typ:$funcType([],[],false)},{prop:"parse",name:"parse",pkg:"github.com/88250/lute/html",typ:$funcType([],[$error],false)}];DE.methods=[{prop:"Unlink",name:"Unlink",pkg:"",typ:$funcType([],[],false)},{prop:"InsertBefore",name:"InsertBefore",pkg:"",typ:$funcType([DE],[],false)},{prop:"InsertAfter",name:"InsertAfter",pkg:"",typ:$funcType([DE],[],false)},{prop:"InsertChildBefore",name:"InsertChildBefore",pkg:"",typ:$funcType([DE,DE],[],false)},{prop:"AppendChild",name:"AppendChild",pkg:"",typ:$funcType([DE],[],false)},{prop:"RemoveChild",name:"RemoveChild",pkg:"",typ:$funcType([DE],[],false)},{prop:"clone",name:"clone",pkg:"github.com/88250/lute/html",typ:$funcType([],[DE],false)}];DL.methods=[{prop:"pop",name:"pop",pkg:"github.com/88250/lute/html",typ:$funcType([],[DE],false)},{prop:"top",name:"top",pkg:"github.com/88250/lute/html",typ:$funcType([],[DE],false)},{prop:"index",name:"index",pkg:"github.com/88250/lute/html",typ:$funcType([DE],[$Int],false)},{prop:"contains",name:"contains",pkg:"github.com/88250/lute/html",typ:$funcType([I.Atom],[$Bool],false)},{prop:"insert",name:"insert",pkg:"github.com/88250/lute/html",typ:$funcType([$Int,DE],[],false)},{prop:"remove",name:"remove",pkg:"github.com/88250/lute/html",typ:$funcType([DE],[],false)}];DM.methods=[{prop:"pop",name:"pop",pkg:"github.com/88250/lute/html",typ:$funcType([],[AJ],false)},{prop:"top",name:"top",pkg:"github.com/88250/lute/html",typ:$funcType([],[AJ],false)}];P.init("",[{prop:"Namespace",name:"Namespace",embedded:false,exported:true,typ:$String,tag:""},{prop:"Key",name:"Key",embedded:false,exported:true,typ:$String,tag:""},{prop:"Val",name:"Val",embedded:false,exported:true,typ:$String,tag:""}]);Q.init("",[{prop:"Type",name:"Type",embedded:false,exported:true,typ:O,tag:""},{prop:"DataAtom",name:"DataAtom",embedded:false,exported:true,typ:I.Atom,tag:""},{prop:"Data",name:"Data",embedded:false,exported:true,typ:$String,tag:""},{prop:"Attr",name:"Attr",embedded:false,exported:true,typ:DG,tag:""}]);R.init("github.com/88250/lute/html",[{prop:"start",name:"start",embedded:false,exported:false,typ:$Int,tag:""},{prop:"end",name:"end",embedded:false,exported:false,typ:$Int,tag:""}]);S.init("github.com/88250/lute/html",[{prop:"r",name:"r",embedded:false,exported:false,typ:G.Reader,tag:""},{prop:"tt",name:"tt",embedded:false,exported:false,typ:O,tag:""},{prop:"err",name:"err",embedded:false,exported:false,typ:$error,tag:""},{prop:"readErr",name:"readErr",embedded:false,exported:false,typ:$error,tag:""},{prop:"raw",name:"raw",embedded:false,exported:false,typ:R,tag:""},{prop:"buf",name:"buf",embedded:false,exported:false,typ:DC,tag:""},{prop:"maxBuf",name:"maxBuf",embedded:false,exported:false,typ:$Int,tag:""},{prop:"data",name:"data",embedded:false,exported:false,typ:R,tag:""},{prop:"pendingAttr",name:"pendingAttr",embedded:false,exported:false,typ:DJ,tag:""},{prop:"attr",name:"attr",embedded:false,exported:false,typ:DK,tag:""},{prop:"nAttrReturned",name:"nAttrReturned",embedded:false,exported:false,typ:$Int,tag:""},{prop:"rawTag",name:"rawTag",embedded:false,exported:false,typ:$String,tag:""},{prop:"textIsRaw",name:"textIsRaw",embedded:false,exported:false,typ:$Bool,tag:""},{prop:"convertNUL",name:"convertNUL",embedded:false,exported:false,typ:$Bool,tag:""},{prop:"allowCDATA",name:"allowCDATA",embedded:false,exported:false,typ:$Bool,tag:""}]);Z.init([{prop:"Write",name:"Write",pkg:"",typ:$funcType([DC],[$Int,$error],false)},{prop:"WriteByte",name:"WriteByte",pkg:"",typ:$funcType([$Uint8],[$error],false)},{prop:"WriteString",name:"WriteString",pkg:"",typ:$funcType([$String],[$Int,$error],false)}]);AG.init("github.com/88250/lute/html",[{prop:"tokenizer",name:"tokenizer",embedded:false,exported:false,typ:DO,tag:""},{prop:"tok",name:"tok",embedded:false,exported:false,typ:Q,tag:""},{prop:"hasSelfClosingToken",name:"hasSelfClosingToken",embedded:false,exported:false,typ:$Bool,tag:""},{prop:"doc",name:"doc",embedded:false,exported:false,typ:DE,tag:""},{prop:"oe",name:"oe",embedded:false,exported:false,typ:BS,tag:""},{prop:"afe",name:"afe",embedded:false,exported:false,typ:BS,tag:""},{prop:"head",name:"head",embedded:false,exported:false,typ:DE,tag:""},{prop:"form",name:"form",embedded:false,exported:false,typ:DE,tag:""},{prop:"scripting",name:"scripting",embedded:false,exported:false,typ:$Bool,tag:""},{prop:"framesetOK",name:"framesetOK",embedded:false,exported:false,typ:$Bool,tag:""},{prop:"templateStack",name:"templateStack",embedded:false,exported:false,typ:BT,tag:""},{prop:"im",name:"im",embedded:false,exported:false,typ:AJ,tag:""},{prop:"originalIM",name:"originalIM",embedded:false,exported:false,typ:AJ,tag:""},{prop:"fosterParenting",name:"fosterParenting",embedded:false,exported:false,typ:$Bool,tag:""},{prop:"quirks",name:"quirks",embedded:false,exported:false,typ:$Bool,tag:""},{prop:"fragment",name:"fragment",embedded:false,exported:false,typ:$Bool,tag:""},{prop:"context",name:"context",embedded:false,exported:false,typ:DE,tag:""}]);AJ.init([DR],[$Bool],false);BK.init([DR],[],false);BQ.init("",[{prop:"Parent",name:"Parent",embedded:false,exported:true,typ:DE,tag:""},{prop:"FirstChild",name:"FirstChild",embedded:false,exported:true,typ:DE,tag:""},{prop:"LastChild",name:"LastChild",embedded:false,exported:true,typ:DE,tag:""},{prop:"PrevSibling",name:"PrevSibling",embedded:false,exported:true,typ:DE,tag:""},{prop:"NextSibling",name:"NextSibling",embedded:false,exported:true,typ:DE,tag:""},{prop:"Type",name:"Type",embedded:false,exported:true,typ:BO,tag:""},{prop:"DataAtom",name:"DataAtom",embedded:false,exported:true,typ:I.Atom,tag:""},{prop:"Data",name:"Data",embedded:false,exported:true,typ:$String,tag:""},{prop:"Namespace",name:"Namespace",embedded:false,exported:true,typ:$String,tag:""},{prop:"Attr",name:"Attr",embedded:false,exported:true,typ:DG,tag:""}]);BS.init(DE);BT.init(AJ);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=J.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=H.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=I.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=G.$init();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=9;case 9:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$pkg.ErrBufferExceeded=F.New("max buffer exceeded");V=(new DC($stringToBytes("\x00")));W=(new DC($stringToBytes("\xEF\xBF\xBD")));AB=F.New("html: internal error (plaintext abort)");AF=$makeMap($String.keyFor,[{k:"area",v:true},{k:"base",v:true},{k:"br",v:true},{k:"col",v:true},{k:"command",v:true},{k:"embed",v:true},{k:"hr",v:true},{k:"img",v:true},{k:"input",v:true},{k:"keygen",v:true},{k:"link",v:true},{k:"meta",v:true},{k:"param",v:true},{k:"source",v:true},{k:"track",v:true},{k:"wbr",v:true}]);AH=$makeMap($String.keyFor,[{k:"",v:new DD([203014,143623,22020,365829,37378,87554,206599,157702,463880])},{k:"math",v:new DD([117006,214786,176386,41986,422914,217349])},{k:"svg",v:new DD([352516,152589,69637])}]);BP=new BQ.ptr(DE.nil,DE.nil,DE.nil,DE.nil,DE.nil,6,0,"","",DG.nil);BY=$makeMap($String.keyFor,[{k:"b",v:true},{k:"big",v:true},{k:"blockquote",v:true},{k:"body",v:true},{k:"br",v:true},{k:"center",v:true},{k:"code",v:true},{k:"dd",v:true},{k:"div",v:true},{k:"dl",v:true},{k:"dt",v:true},{k:"em",v:true},{k:"embed",v:true},{k:"h1",v:true},{k:"h2",v:true},{k:"h3",v:true},{k:"h4",v:true},{k:"h5",v:true},{k:"h6",v:true},{k:"head",v:true},{k:"hr",v:true},{k:"i",v:true},{k:"img",v:true},{k:"li",v:true},{k:"listing",v:true},{k:"menu",v:true},{k:"meta",v:true},{k:"nobr",v:true},{k:"ol",v:true},{k:"p",v:true},{k:"pre",v:true},{k:"ruby",v:true},{k:"s",v:true},{k:"small",v:true},{k:"span",v:true},{k:"strong",v:true},{k:"strike",v:true},{k:"sub",v:true},{k:"sup",v:true},{k:"table",v:true},{k:"tt",v:true},{k:"u",v:true},{k:"ul",v:true},{k:"var",v:true}]);BZ=$makeMap($String.keyFor,[{k:"altglyph",v:"altGlyph"},{k:"altglyphdef",v:"altGlyphDef"},{k:"altglyphitem",v:"altGlyphItem"},{k:"animatecolor",v:"animateColor"},{k:"animatemotion",v:"animateMotion"},{k:"animatetransform",v:"animateTransform"},{k:"clippath",v:"clipPath"},{k:"feblend",v:"feBlend"},{k:"fecolormatrix",v:"feColorMatrix"},{k:"fecomponenttransfer",v:"feComponentTransfer"},{k:"fecomposite",v:"feComposite"},{k:"feconvolvematrix",v:"feConvolveMatrix"},{k:"fediffuselighting",v:"feDiffuseLighting"},{k:"fedisplacementmap",v:"feDisplacementMap"},{k:"fedistantlight",v:"feDistantLight"},{k:"feflood",v:"feFlood"},{k:"fefunca",v:"feFuncA"},{k:"fefuncb",v:"feFuncB"},{k:"fefuncg",v:"feFuncG"},{k:"fefuncr",v:"feFuncR"},{k:"fegaussianblur",v:"feGaussianBlur"},{k:"feimage",v:"feImage"},{k:"femerge",v:"feMerge"},{k:"femergenode",v:"feMergeNode"},{k:"femorphology",v:"feMorphology"},{k:"feoffset",v:"feOffset"},{k:"fepointlight",v:"fePointLight"},{k:"fespecularlighting",v:"feSpecularLighting"},{k:"fespotlight",v:"feSpotLight"},{k:"fetile",v:"feTile"},{k:"feturbulence",v:"feTurbulence"},{k:"foreignobject",v:"foreignObject"},{k:"glyphref",v:"glyphRef"},{k:"lineargradient",v:"linearGradient"},{k:"radialgradient",v:"radialGradient"},{k:"textpath",v:"textPath"}]);CA=$makeMap($String.keyFor,[{k:"definitionurl",v:"definitionURL"}]);CB=$makeMap($String.keyFor,[{k:"attributename",v:"attributeName"},{k:"attributetype",v:"attributeType"},{k:"basefrequency",v:"baseFrequency"},{k:"baseprofile",v:"baseProfile"},{k:"calcmode",v:"calcMode"},{k:"clippathunits",v:"clipPathUnits"},{k:"contentscripttype",v:"contentScriptType"},{k:"contentstyletype",v:"contentStyleType"},{k:"diffuseconstant",v:"diffuseConstant"},{k:"edgemode",v:"edgeMode"},{k:"externalresourcesrequired",v:"externalResourcesRequired"},{k:"filterres",v:"filterRes"},{k:"filterunits",v:"filterUnits"},{k:"glyphref",v:"glyphRef"},{k:"gradienttransform",v:"gradientTransform"},{k:"gradientunits",v:"gradientUnits"},{k:"kernelmatrix",v:"kernelMatrix"},{k:"kernelunitlength",v:"kernelUnitLength"},{k:"keypoints",v:"keyPoints"},{k:"keysplines",v:"keySplines"},{k:"keytimes",v:"keyTimes"},{k:"lengthadjust",v:"lengthAdjust"},{k:"limitingconeangle",v:"limitingConeAngle"},{k:"markerheight",v:"markerHeight"},{k:"markerunits",v:"markerUnits"},{k:"markerwidth",v:"markerWidth"},{k:"maskcontentunits",v:"maskContentUnits"},{k:"maskunits",v:"maskUnits"},{k:"numoctaves",v:"numOctaves"},{k:"pathlength",v:"pathLength"},{k:"patterncontentunits",v:"patternContentUnits"},{k:"patterntransform",v:"patternTransform"},{k:"patternunits",v:"patternUnits"},{k:"pointsatx",v:"pointsAtX"},{k:"pointsaty",v:"pointsAtY"},{k:"pointsatz",v:"pointsAtZ"},{k:"preservealpha",v:"preserveAlpha"},{k:"preserveaspectratio",v:"preserveAspectRatio"},{k:"primitiveunits",v:"primitiveUnits"},{k:"refx",v:"refX"},{k:"refy",v:"refY"},{k:"repeatcount",v:"repeatCount"},{k:"repeatdur",v:"repeatDur"},{k:"requiredextensions",v:"requiredExtensions"},{k:"requiredfeatures",v:"requiredFeatures"},{k:"specularconstant",v:"specularConstant"},{k:"specularexponent",v:"specularExponent"},{k:"spreadmethod",v:"spreadMethod"},{k:"startoffset",v:"startOffset"},{k:"stddeviation",v:"stdDeviation"},{k:"stitchtiles",v:"stitchTiles"},{k:"surfacescale",v:"surfaceScale"},{k:"systemlanguage",v:"systemLanguage"},{k:"tablevalues",v:"tableValues"},{k:"targetx",v:"targetX"},{k:"targety",v:"targetY"},{k:"textlength",v:"textLength"},{k:"viewbox",v:"viewBox"},{k:"viewtarget",v:"viewTarget"},{k:"xchannelselector",v:"xChannelSelector"},{k:"ychannelselector",v:"yChannelSelector"},{k:"zoomandpan",v:"zoomAndPan"}]);CC=(new DC($stringToBytes("&")));CD=(new DC($stringToBytes("<")));CE=(new DC($stringToBytes(">")));CF=(new DC($stringToBytes(""")));CQ=$toNativeArray($kindInt32,[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376]);$pkg.Entities=$makeMap($String.keyFor,[{k:"AElig;",v:"\xC3\x86"},{k:"AMP;",v:"&"},{k:"Aacute;",v:"\xC3\x81"},{k:"Abreve;",v:"\xC4\x82"},{k:"Acirc;",v:"\xC3\x82"},{k:"Acy;",v:"\xD0\x90"},{k:"Afr;",v:"\xF0\x9D\x94\x84"},{k:"Agrave;",v:"\xC3\x80"},{k:"Alpha;",v:"\xCE\x91"},{k:"Amacr;",v:"\xC4\x80"},{k:"And;",v:"\xE2\xA9\x93"},{k:"Aogon;",v:"\xC4\x84"},{k:"Aopf;",v:"\xF0\x9D\x94\xB8"},{k:"ApplyFunction;",v:"\xE2\x81\xA1"},{k:"Aring;",v:"\xC3\x85"},{k:"Ascr;",v:"\xF0\x9D\x92\x9C"},{k:"Assign;",v:"\xE2\x89\x94"},{k:"Atilde;",v:"\xC3\x83"},{k:"Auml;",v:"\xC3\x84"},{k:"Backslash;",v:"\xE2\x88\x96"},{k:"Barv;",v:"\xE2\xAB\xA7"},{k:"Barwed;",v:"\xE2\x8C\x86"},{k:"Bcy;",v:"\xD0\x91"},{k:"Because;",v:"\xE2\x88\xB5"},{k:"Bernoullis;",v:"\xE2\x84\xAC"},{k:"Beta;",v:"\xCE\x92"},{k:"Bfr;",v:"\xF0\x9D\x94\x85"},{k:"Bopf;",v:"\xF0\x9D\x94\xB9"},{k:"Breve;",v:"\xCB\x98"},{k:"Bscr;",v:"\xE2\x84\xAC"},{k:"Bumpeq;",v:"\xE2\x89\x8E"},{k:"CHcy;",v:"\xD0\xA7"},{k:"COPY;",v:"\xC2\xA9"},{k:"Cacute;",v:"\xC4\x86"},{k:"Cap;",v:"\xE2\x8B\x92"},{k:"CapitalDifferentialD;",v:"\xE2\x85\x85"},{k:"Cayleys;",v:"\xE2\x84\xAD"},{k:"Ccaron;",v:"\xC4\x8C"},{k:"Ccedil;",v:"\xC3\x87"},{k:"Ccirc;",v:"\xC4\x88"},{k:"Cconint;",v:"\xE2\x88\xB0"},{k:"Cdot;",v:"\xC4\x8A"},{k:"Cedilla;",v:"\xC2\xB8"},{k:"CenterDot;",v:"\xC2\xB7"},{k:"Cfr;",v:"\xE2\x84\xAD"},{k:"Chi;",v:"\xCE\xA7"},{k:"CircleDot;",v:"\xE2\x8A\x99"},{k:"CircleMinus;",v:"\xE2\x8A\x96"},{k:"CirclePlus;",v:"\xE2\x8A\x95"},{k:"CircleTimes;",v:"\xE2\x8A\x97"},{k:"ClockwiseContourIntegral;",v:"\xE2\x88\xB2"},{k:"CloseCurlyDoubleQuote;",v:"\xE2\x80\x9D"},{k:"CloseCurlyQuote;",v:"\xE2\x80\x99"},{k:"Colon;",v:"\xE2\x88\xB7"},{k:"Colone;",v:"\xE2\xA9\xB4"},{k:"Congruent;",v:"\xE2\x89\xA1"},{k:"Conint;",v:"\xE2\x88\xAF"},{k:"ContourIntegral;",v:"\xE2\x88\xAE"},{k:"Copf;",v:"\xE2\x84\x82"},{k:"Coproduct;",v:"\xE2\x88\x90"},{k:"CounterClockwiseContourIntegral;",v:"\xE2\x88\xB3"},{k:"Cross;",v:"\xE2\xA8\xAF"},{k:"Cscr;",v:"\xF0\x9D\x92\x9E"},{k:"Cup;",v:"\xE2\x8B\x93"},{k:"CupCap;",v:"\xE2\x89\x8D"},{k:"DD;",v:"\xE2\x85\x85"},{k:"DDotrahd;",v:"\xE2\xA4\x91"},{k:"DJcy;",v:"\xD0\x82"},{k:"DScy;",v:"\xD0\x85"},{k:"DZcy;",v:"\xD0\x8F"},{k:"Dagger;",v:"\xE2\x80\xA1"},{k:"Darr;",v:"\xE2\x86\xA1"},{k:"Dashv;",v:"\xE2\xAB\xA4"},{k:"Dcaron;",v:"\xC4\x8E"},{k:"Dcy;",v:"\xD0\x94"},{k:"Del;",v:"\xE2\x88\x87"},{k:"Delta;",v:"\xCE\x94"},{k:"Dfr;",v:"\xF0\x9D\x94\x87"},{k:"DiacriticalAcute;",v:"\xC2\xB4"},{k:"DiacriticalDot;",v:"\xCB\x99"},{k:"DiacriticalDoubleAcute;",v:"\xCB\x9D"},{k:"DiacriticalGrave;",v:"`"},{k:"DiacriticalTilde;",v:"\xCB\x9C"},{k:"Diamond;",v:"\xE2\x8B\x84"},{k:"DifferentialD;",v:"\xE2\x85\x86"},{k:"Dopf;",v:"\xF0\x9D\x94\xBB"},{k:"Dot;",v:"\xC2\xA8"},{k:"DotDot;",v:"\xE2\x83\x9C"},{k:"DotEqual;",v:"\xE2\x89\x90"},{k:"DoubleContourIntegral;",v:"\xE2\x88\xAF"},{k:"DoubleDot;",v:"\xC2\xA8"},{k:"DoubleDownArrow;",v:"\xE2\x87\x93"},{k:"DoubleLeftArrow;",v:"\xE2\x87\x90"},{k:"DoubleLeftRightArrow;",v:"\xE2\x87\x94"},{k:"DoubleLeftTee;",v:"\xE2\xAB\xA4"},{k:"DoubleLongLeftArrow;",v:"\xE2\x9F\xB8"},{k:"DoubleLongLeftRightArrow;",v:"\xE2\x9F\xBA"},{k:"DoubleLongRightArrow;",v:"\xE2\x9F\xB9"},{k:"DoubleRightArrow;",v:"\xE2\x87\x92"},{k:"DoubleRightTee;",v:"\xE2\x8A\xA8"},{k:"DoubleUpArrow;",v:"\xE2\x87\x91"},{k:"DoubleUpDownArrow;",v:"\xE2\x87\x95"},{k:"DoubleVerticalBar;",v:"\xE2\x88\xA5"},{k:"DownArrow;",v:"\xE2\x86\x93"},{k:"DownArrowBar;",v:"\xE2\xA4\x93"},{k:"DownArrowUpArrow;",v:"\xE2\x87\xB5"},{k:"DownBreve;",v:"\xCC\x91"},{k:"DownLeftRightVector;",v:"\xE2\xA5\x90"},{k:"DownLeftTeeVector;",v:"\xE2\xA5\x9E"},{k:"DownLeftVector;",v:"\xE2\x86\xBD"},{k:"DownLeftVectorBar;",v:"\xE2\xA5\x96"},{k:"DownRightTeeVector;",v:"\xE2\xA5\x9F"},{k:"DownRightVector;",v:"\xE2\x87\x81"},{k:"DownRightVectorBar;",v:"\xE2\xA5\x97"},{k:"DownTee;",v:"\xE2\x8A\xA4"},{k:"DownTeeArrow;",v:"\xE2\x86\xA7"},{k:"Downarrow;",v:"\xE2\x87\x93"},{k:"Dscr;",v:"\xF0\x9D\x92\x9F"},{k:"Dstrok;",v:"\xC4\x90"},{k:"ENG;",v:"\xC5\x8A"},{k:"ETH;",v:"\xC3\x90"},{k:"Eacute;",v:"\xC3\x89"},{k:"Ecaron;",v:"\xC4\x9A"},{k:"Ecirc;",v:"\xC3\x8A"},{k:"Ecy;",v:"\xD0\xAD"},{k:"Edot;",v:"\xC4\x96"},{k:"Efr;",v:"\xF0\x9D\x94\x88"},{k:"Egrave;",v:"\xC3\x88"},{k:"Element;",v:"\xE2\x88\x88"},{k:"Emacr;",v:"\xC4\x92"},{k:"EmptySmallSquare;",v:"\xE2\x97\xBB"},{k:"EmptyVerySmallSquare;",v:"\xE2\x96\xAB"},{k:"Eogon;",v:"\xC4\x98"},{k:"Eopf;",v:"\xF0\x9D\x94\xBC"},{k:"Epsilon;",v:"\xCE\x95"},{k:"Equal;",v:"\xE2\xA9\xB5"},{k:"EqualTilde;",v:"\xE2\x89\x82"},{k:"Equilibrium;",v:"\xE2\x87\x8C"},{k:"Escr;",v:"\xE2\x84\xB0"},{k:"Esim;",v:"\xE2\xA9\xB3"},{k:"Eta;",v:"\xCE\x97"},{k:"Euml;",v:"\xC3\x8B"},{k:"Exists;",v:"\xE2\x88\x83"},{k:"ExponentialE;",v:"\xE2\x85\x87"},{k:"Fcy;",v:"\xD0\xA4"},{k:"Ffr;",v:"\xF0\x9D\x94\x89"},{k:"FilledSmallSquare;",v:"\xE2\x97\xBC"},{k:"FilledVerySmallSquare;",v:"\xE2\x96\xAA"},{k:"Fopf;",v:"\xF0\x9D\x94\xBD"},{k:"ForAll;",v:"\xE2\x88\x80"},{k:"Fouriertrf;",v:"\xE2\x84\xB1"},{k:"Fscr;",v:"\xE2\x84\xB1"},{k:"GJcy;",v:"\xD0\x83"},{k:"GT;",v:">"},{k:"Gamma;",v:"\xCE\x93"},{k:"Gammad;",v:"\xCF\x9C"},{k:"Gbreve;",v:"\xC4\x9E"},{k:"Gcedil;",v:"\xC4\xA2"},{k:"Gcirc;",v:"\xC4\x9C"},{k:"Gcy;",v:"\xD0\x93"},{k:"Gdot;",v:"\xC4\xA0"},{k:"Gfr;",v:"\xF0\x9D\x94\x8A"},{k:"Gg;",v:"\xE2\x8B\x99"},{k:"Gopf;",v:"\xF0\x9D\x94\xBE"},{k:"GreaterEqual;",v:"\xE2\x89\xA5"},{k:"GreaterEqualLess;",v:"\xE2\x8B\x9B"},{k:"GreaterFullEqual;",v:"\xE2\x89\xA7"},{k:"GreaterGreater;",v:"\xE2\xAA\xA2"},{k:"GreaterLess;",v:"\xE2\x89\xB7"},{k:"GreaterSlantEqual;",v:"\xE2\xA9\xBE"},{k:"GreaterTilde;",v:"\xE2\x89\xB3"},{k:"Gscr;",v:"\xF0\x9D\x92\xA2"},{k:"Gt;",v:"\xE2\x89\xAB"},{k:"HARDcy;",v:"\xD0\xAA"},{k:"Hacek;",v:"\xCB\x87"},{k:"Hat;",v:"^"},{k:"Hcirc;",v:"\xC4\xA4"},{k:"Hfr;",v:"\xE2\x84\x8C"},{k:"HilbertSpace;",v:"\xE2\x84\x8B"},{k:"Hopf;",v:"\xE2\x84\x8D"},{k:"HorizontalLine;",v:"\xE2\x94\x80"},{k:"Hscr;",v:"\xE2\x84\x8B"},{k:"Hstrok;",v:"\xC4\xA6"},{k:"HumpDownHump;",v:"\xE2\x89\x8E"},{k:"HumpEqual;",v:"\xE2\x89\x8F"},{k:"IEcy;",v:"\xD0\x95"},{k:"IJlig;",v:"\xC4\xB2"},{k:"IOcy;",v:"\xD0\x81"},{k:"Iacute;",v:"\xC3\x8D"},{k:"Icirc;",v:"\xC3\x8E"},{k:"Icy;",v:"\xD0\x98"},{k:"Idot;",v:"\xC4\xB0"},{k:"Ifr;",v:"\xE2\x84\x91"},{k:"Igrave;",v:"\xC3\x8C"},{k:"Im;",v:"\xE2\x84\x91"},{k:"Imacr;",v:"\xC4\xAA"},{k:"ImaginaryI;",v:"\xE2\x85\x88"},{k:"Implies;",v:"\xE2\x87\x92"},{k:"Int;",v:"\xE2\x88\xAC"},{k:"Integral;",v:"\xE2\x88\xAB"},{k:"Intersection;",v:"\xE2\x8B\x82"},{k:"InvisibleComma;",v:"\xE2\x81\xA3"},{k:"InvisibleTimes;",v:"\xE2\x81\xA2"},{k:"Iogon;",v:"\xC4\xAE"},{k:"Iopf;",v:"\xF0\x9D\x95\x80"},{k:"Iota;",v:"\xCE\x99"},{k:"Iscr;",v:"\xE2\x84\x90"},{k:"Itilde;",v:"\xC4\xA8"},{k:"Iukcy;",v:"\xD0\x86"},{k:"Iuml;",v:"\xC3\x8F"},{k:"Jcirc;",v:"\xC4\xB4"},{k:"Jcy;",v:"\xD0\x99"},{k:"Jfr;",v:"\xF0\x9D\x94\x8D"},{k:"Jopf;",v:"\xF0\x9D\x95\x81"},{k:"Jscr;",v:"\xF0\x9D\x92\xA5"},{k:"Jsercy;",v:"\xD0\x88"},{k:"Jukcy;",v:"\xD0\x84"},{k:"KHcy;",v:"\xD0\xA5"},{k:"KJcy;",v:"\xD0\x8C"},{k:"Kappa;",v:"\xCE\x9A"},{k:"Kcedil;",v:"\xC4\xB6"},{k:"Kcy;",v:"\xD0\x9A"},{k:"Kfr;",v:"\xF0\x9D\x94\x8E"},{k:"Kopf;",v:"\xF0\x9D\x95\x82"},{k:"Kscr;",v:"\xF0\x9D\x92\xA6"},{k:"LJcy;",v:"\xD0\x89"},{k:"LT;",v:"<"},{k:"Lacute;",v:"\xC4\xB9"},{k:"Lambda;",v:"\xCE\x9B"},{k:"Lang;",v:"\xE2\x9F\xAA"},{k:"Laplacetrf;",v:"\xE2\x84\x92"},{k:"Larr;",v:"\xE2\x86\x9E"},{k:"Lcaron;",v:"\xC4\xBD"},{k:"Lcedil;",v:"\xC4\xBB"},{k:"Lcy;",v:"\xD0\x9B"},{k:"LeftAngleBracket;",v:"\xE2\x9F\xA8"},{k:"LeftArrow;",v:"\xE2\x86\x90"},{k:"LeftArrowBar;",v:"\xE2\x87\xA4"},{k:"LeftArrowRightArrow;",v:"\xE2\x87\x86"},{k:"LeftCeiling;",v:"\xE2\x8C\x88"},{k:"LeftDoubleBracket;",v:"\xE2\x9F\xA6"},{k:"LeftDownTeeVector;",v:"\xE2\xA5\xA1"},{k:"LeftDownVector;",v:"\xE2\x87\x83"},{k:"LeftDownVectorBar;",v:"\xE2\xA5\x99"},{k:"LeftFloor;",v:"\xE2\x8C\x8A"},{k:"LeftRightArrow;",v:"\xE2\x86\x94"},{k:"LeftRightVector;",v:"\xE2\xA5\x8E"},{k:"LeftTee;",v:"\xE2\x8A\xA3"},{k:"LeftTeeArrow;",v:"\xE2\x86\xA4"},{k:"LeftTeeVector;",v:"\xE2\xA5\x9A"},{k:"LeftTriangle;",v:"\xE2\x8A\xB2"},{k:"LeftTriangleBar;",v:"\xE2\xA7\x8F"},{k:"LeftTriangleEqual;",v:"\xE2\x8A\xB4"},{k:"LeftUpDownVector;",v:"\xE2\xA5\x91"},{k:"LeftUpTeeVector;",v:"\xE2\xA5\xA0"},{k:"LeftUpVector;",v:"\xE2\x86\xBF"},{k:"LeftUpVectorBar;",v:"\xE2\xA5\x98"},{k:"LeftVector;",v:"\xE2\x86\xBC"},{k:"LeftVectorBar;",v:"\xE2\xA5\x92"},{k:"Leftarrow;",v:"\xE2\x87\x90"},{k:"Leftrightarrow;",v:"\xE2\x87\x94"},{k:"LessEqualGreater;",v:"\xE2\x8B\x9A"},{k:"LessFullEqual;",v:"\xE2\x89\xA6"},{k:"LessGreater;",v:"\xE2\x89\xB6"},{k:"LessLess;",v:"\xE2\xAA\xA1"},{k:"LessSlantEqual;",v:"\xE2\xA9\xBD"},{k:"LessTilde;",v:"\xE2\x89\xB2"},{k:"Lfr;",v:"\xF0\x9D\x94\x8F"},{k:"Ll;",v:"\xE2\x8B\x98"},{k:"Lleftarrow;",v:"\xE2\x87\x9A"},{k:"Lmidot;",v:"\xC4\xBF"},{k:"LongLeftArrow;",v:"\xE2\x9F\xB5"},{k:"LongLeftRightArrow;",v:"\xE2\x9F\xB7"},{k:"LongRightArrow;",v:"\xE2\x9F\xB6"},{k:"Longleftarrow;",v:"\xE2\x9F\xB8"},{k:"Longleftrightarrow;",v:"\xE2\x9F\xBA"},{k:"Longrightarrow;",v:"\xE2\x9F\xB9"},{k:"Lopf;",v:"\xF0\x9D\x95\x83"},{k:"LowerLeftArrow;",v:"\xE2\x86\x99"},{k:"LowerRightArrow;",v:"\xE2\x86\x98"},{k:"Lscr;",v:"\xE2\x84\x92"},{k:"Lsh;",v:"\xE2\x86\xB0"},{k:"Lstrok;",v:"\xC5\x81"},{k:"Lt;",v:"\xE2\x89\xAA"},{k:"Map;",v:"\xE2\xA4\x85"},{k:"Mcy;",v:"\xD0\x9C"},{k:"MediumSpace;",v:"\xE2\x81\x9F"},{k:"Mellintrf;",v:"\xE2\x84\xB3"},{k:"Mfr;",v:"\xF0\x9D\x94\x90"},{k:"MinusPlus;",v:"\xE2\x88\x93"},{k:"Mopf;",v:"\xF0\x9D\x95\x84"},{k:"Mscr;",v:"\xE2\x84\xB3"},{k:"Mu;",v:"\xCE\x9C"},{k:"NJcy;",v:"\xD0\x8A"},{k:"Nacute;",v:"\xC5\x83"},{k:"Ncaron;",v:"\xC5\x87"},{k:"Ncedil;",v:"\xC5\x85"},{k:"Ncy;",v:"\xD0\x9D"},{k:"NegativeMediumSpace;",v:"\xE2\x80\x8B"},{k:"NegativeThickSpace;",v:"\xE2\x80\x8B"},{k:"NegativeThinSpace;",v:"\xE2\x80\x8B"},{k:"NegativeVeryThinSpace;",v:"\xE2\x80\x8B"},{k:"NestedGreaterGreater;",v:"\xE2\x89\xAB"},{k:"NestedLessLess;",v:"\xE2\x89\xAA"},{k:"NewLine;",v:"\n"},{k:"Nfr;",v:"\xF0\x9D\x94\x91"},{k:"NoBreak;",v:"\xE2\x81\xA0"},{k:"NonBreakingSpace;",v:"\xC2\xA0"},{k:"Nopf;",v:"\xE2\x84\x95"},{k:"Not;",v:"\xE2\xAB\xAC"},{k:"NotCongruent;",v:"\xE2\x89\xA2"},{k:"NotCupCap;",v:"\xE2\x89\xAD"},{k:"NotDoubleVerticalBar;",v:"\xE2\x88\xA6"},{k:"NotElement;",v:"\xE2\x88\x89"},{k:"NotEqual;",v:"\xE2\x89\xA0"},{k:"NotEqualTilde;",v:"\xE2\x89\x82\xCC\xB8"},{k:"NotExists;",v:"\xE2\x88\x84"},{k:"NotGreater;",v:"\xE2\x89\xAF"},{k:"NotGreaterEqual;",v:"\xE2\x89\xB1"},{k:"NotGreaterFullEqual;",v:"\xE2\x89\xA7\xCC\xB8"},{k:"NotGreaterGreater;",v:"\xE2\x89\xAB\xCC\xB8"},{k:"NotGreaterLess;",v:"\xE2\x89\xB9"},{k:"NotGreaterSlantEqual;",v:"\xE2\xA9\xBE\xCC\xB8"},{k:"NotGreaterTilde;",v:"\xE2\x89\xB5"},{k:"NotHumpDownHump;",v:"\xE2\x89\x8E\xCC\xB8"},{k:"NotHumpEqual;",v:"\xE2\x89\x8F\xCC\xB8"},{k:"NotLeftTriangle;",v:"\xE2\x8B\xAA"},{k:"NotLeftTriangleBar;",v:"\xE2\xA7\x8F\xCC\xB8"},{k:"NotLeftTriangleEqual;",v:"\xE2\x8B\xAC"},{k:"NotLess;",v:"\xE2\x89\xAE"},{k:"NotLessEqual;",v:"\xE2\x89\xB0"},{k:"NotLessGreater;",v:"\xE2\x89\xB8"},{k:"NotLessLess;",v:"\xE2\x89\xAA\xCC\xB8"},{k:"NotLessSlantEqual;",v:"\xE2\xA9\xBD\xCC\xB8"},{k:"NotLessTilde;",v:"\xE2\x89\xB4"},{k:"NotNestedGreaterGreater;",v:"\xE2\xAA\xA2\xCC\xB8"},{k:"NotNestedLessLess;",v:"\xE2\xAA\xA1\xCC\xB8"},{k:"NotPrecedes;",v:"\xE2\x8A\x80"},{k:"NotPrecedesEqual;",v:"\xE2\xAA\xAF\xCC\xB8"},{k:"NotPrecedesSlantEqual;",v:"\xE2\x8B\xA0"},{k:"NotReverseElement;",v:"\xE2\x88\x8C"},{k:"NotRightTriangle;",v:"\xE2\x8B\xAB"},{k:"NotRightTriangleBar;",v:"\xE2\xA7\x90\xCC\xB8"},{k:"NotRightTriangleEqual;",v:"\xE2\x8B\xAD"},{k:"NotSquareSubset;",v:"\xE2\x8A\x8F\xCC\xB8"},{k:"NotSquareSubsetEqual;",v:"\xE2\x8B\xA2"},{k:"NotSquareSuperset;",v:"\xE2\x8A\x90\xCC\xB8"},{k:"NotSquareSupersetEqual;",v:"\xE2\x8B\xA3"},{k:"NotSubset;",v:"\xE2\x8A\x82\xE2\x83\x92"},{k:"NotSubsetEqual;",v:"\xE2\x8A\x88"},{k:"NotSucceeds;",v:"\xE2\x8A\x81"},{k:"NotSucceedsEqual;",v:"\xE2\xAA\xB0\xCC\xB8"},{k:"NotSucceedsSlantEqual;",v:"\xE2\x8B\xA1"},{k:"NotSucceedsTilde;",v:"\xE2\x89\xBF\xCC\xB8"},{k:"NotSuperset;",v:"\xE2\x8A\x83\xE2\x83\x92"},{k:"NotSupersetEqual;",v:"\xE2\x8A\x89"},{k:"NotTilde;",v:"\xE2\x89\x81"},{k:"NotTildeEqual;",v:"\xE2\x89\x84"},{k:"NotTildeFullEqual;",v:"\xE2\x89\x87"},{k:"NotTildeTilde;",v:"\xE2\x89\x89"},{k:"NotVerticalBar;",v:"\xE2\x88\xA4"},{k:"Nscr;",v:"\xF0\x9D\x92\xA9"},{k:"Ntilde;",v:"\xC3\x91"},{k:"Nu;",v:"\xCE\x9D"},{k:"OElig;",v:"\xC5\x92"},{k:"Oacute;",v:"\xC3\x93"},{k:"Ocirc;",v:"\xC3\x94"},{k:"Ocy;",v:"\xD0\x9E"},{k:"Odblac;",v:"\xC5\x90"},{k:"Ofr;",v:"\xF0\x9D\x94\x92"},{k:"Ograve;",v:"\xC3\x92"},{k:"Omacr;",v:"\xC5\x8C"},{k:"Omega;",v:"\xCE\xA9"},{k:"Omicron;",v:"\xCE\x9F"},{k:"Oopf;",v:"\xF0\x9D\x95\x86"},{k:"OpenCurlyDoubleQuote;",v:"\xE2\x80\x9C"},{k:"OpenCurlyQuote;",v:"\xE2\x80\x98"},{k:"Or;",v:"\xE2\xA9\x94"},{k:"Oscr;",v:"\xF0\x9D\x92\xAA"},{k:"Oslash;",v:"\xC3\x98"},{k:"Otilde;",v:"\xC3\x95"},{k:"Otimes;",v:"\xE2\xA8\xB7"},{k:"Ouml;",v:"\xC3\x96"},{k:"OverBar;",v:"\xE2\x80\xBE"},{k:"OverBrace;",v:"\xE2\x8F\x9E"},{k:"OverBracket;",v:"\xE2\x8E\xB4"},{k:"OverParenthesis;",v:"\xE2\x8F\x9C"},{k:"PartialD;",v:"\xE2\x88\x82"},{k:"Pcy;",v:"\xD0\x9F"},{k:"Pfr;",v:"\xF0\x9D\x94\x93"},{k:"Phi;",v:"\xCE\xA6"},{k:"Pi;",v:"\xCE\xA0"},{k:"PlusMinus;",v:"\xC2\xB1"},{k:"Poincareplane;",v:"\xE2\x84\x8C"},{k:"Popf;",v:"\xE2\x84\x99"},{k:"Pr;",v:"\xE2\xAA\xBB"},{k:"Precedes;",v:"\xE2\x89\xBA"},{k:"PrecedesEqual;",v:"\xE2\xAA\xAF"},{k:"PrecedesSlantEqual;",v:"\xE2\x89\xBC"},{k:"PrecedesTilde;",v:"\xE2\x89\xBE"},{k:"Prime;",v:"\xE2\x80\xB3"},{k:"Product;",v:"\xE2\x88\x8F"},{k:"Proportion;",v:"\xE2\x88\xB7"},{k:"Proportional;",v:"\xE2\x88\x9D"},{k:"Pscr;",v:"\xF0\x9D\x92\xAB"},{k:"Psi;",v:"\xCE\xA8"},{k:"QUOT;",v:"\""},{k:"Qfr;",v:"\xF0\x9D\x94\x94"},{k:"Qopf;",v:"\xE2\x84\x9A"},{k:"Qscr;",v:"\xF0\x9D\x92\xAC"},{k:"RBarr;",v:"\xE2\xA4\x90"},{k:"REG;",v:"\xC2\xAE"},{k:"Racute;",v:"\xC5\x94"},{k:"Rang;",v:"\xE2\x9F\xAB"},{k:"Rarr;",v:"\xE2\x86\xA0"},{k:"Rarrtl;",v:"\xE2\xA4\x96"},{k:"Rcaron;",v:"\xC5\x98"},{k:"Rcedil;",v:"\xC5\x96"},{k:"Rcy;",v:"\xD0\xA0"},{k:"Re;",v:"\xE2\x84\x9C"},{k:"ReverseElement;",v:"\xE2\x88\x8B"},{k:"ReverseEquilibrium;",v:"\xE2\x87\x8B"},{k:"ReverseUpEquilibrium;",v:"\xE2\xA5\xAF"},{k:"Rfr;",v:"\xE2\x84\x9C"},{k:"Rho;",v:"\xCE\xA1"},{k:"RightAngleBracket;",v:"\xE2\x9F\xA9"},{k:"RightArrow;",v:"\xE2\x86\x92"},{k:"RightArrowBar;",v:"\xE2\x87\xA5"},{k:"RightArrowLeftArrow;",v:"\xE2\x87\x84"},{k:"RightCeiling;",v:"\xE2\x8C\x89"},{k:"RightDoubleBracket;",v:"\xE2\x9F\xA7"},{k:"RightDownTeeVector;",v:"\xE2\xA5\x9D"},{k:"RightDownVector;",v:"\xE2\x87\x82"},{k:"RightDownVectorBar;",v:"\xE2\xA5\x95"},{k:"RightFloor;",v:"\xE2\x8C\x8B"},{k:"RightTee;",v:"\xE2\x8A\xA2"},{k:"RightTeeArrow;",v:"\xE2\x86\xA6"},{k:"RightTeeVector;",v:"\xE2\xA5\x9B"},{k:"RightTriangle;",v:"\xE2\x8A\xB3"},{k:"RightTriangleBar;",v:"\xE2\xA7\x90"},{k:"RightTriangleEqual;",v:"\xE2\x8A\xB5"},{k:"RightUpDownVector;",v:"\xE2\xA5\x8F"},{k:"RightUpTeeVector;",v:"\xE2\xA5\x9C"},{k:"RightUpVector;",v:"\xE2\x86\xBE"},{k:"RightUpVectorBar;",v:"\xE2\xA5\x94"},{k:"RightVector;",v:"\xE2\x87\x80"},{k:"RightVectorBar;",v:"\xE2\xA5\x93"},{k:"Rightarrow;",v:"\xE2\x87\x92"},{k:"Ropf;",v:"\xE2\x84\x9D"},{k:"RoundImplies;",v:"\xE2\xA5\xB0"},{k:"Rrightarrow;",v:"\xE2\x87\x9B"},{k:"Rscr;",v:"\xE2\x84\x9B"},{k:"Rsh;",v:"\xE2\x86\xB1"},{k:"RuleDelayed;",v:"\xE2\xA7\xB4"},{k:"SHCHcy;",v:"\xD0\xA9"},{k:"SHcy;",v:"\xD0\xA8"},{k:"SOFTcy;",v:"\xD0\xAC"},{k:"Sacute;",v:"\xC5\x9A"},{k:"Sc;",v:"\xE2\xAA\xBC"},{k:"Scaron;",v:"\xC5\xA0"},{k:"Scedil;",v:"\xC5\x9E"},{k:"Scirc;",v:"\xC5\x9C"},{k:"Scy;",v:"\xD0\xA1"},{k:"Sfr;",v:"\xF0\x9D\x94\x96"},{k:"ShortDownArrow;",v:"\xE2\x86\x93"},{k:"ShortLeftArrow;",v:"\xE2\x86\x90"},{k:"ShortRightArrow;",v:"\xE2\x86\x92"},{k:"ShortUpArrow;",v:"\xE2\x86\x91"},{k:"Sigma;",v:"\xCE\xA3"},{k:"SmallCircle;",v:"\xE2\x88\x98"},{k:"Sopf;",v:"\xF0\x9D\x95\x8A"},{k:"Sqrt;",v:"\xE2\x88\x9A"},{k:"Square;",v:"\xE2\x96\xA1"},{k:"SquareIntersection;",v:"\xE2\x8A\x93"},{k:"SquareSubset;",v:"\xE2\x8A\x8F"},{k:"SquareSubsetEqual;",v:"\xE2\x8A\x91"},{k:"SquareSuperset;",v:"\xE2\x8A\x90"},{k:"SquareSupersetEqual;",v:"\xE2\x8A\x92"},{k:"SquareUnion;",v:"\xE2\x8A\x94"},{k:"Sscr;",v:"\xF0\x9D\x92\xAE"},{k:"Star;",v:"\xE2\x8B\x86"},{k:"Sub;",v:"\xE2\x8B\x90"},{k:"Subset;",v:"\xE2\x8B\x90"},{k:"SubsetEqual;",v:"\xE2\x8A\x86"},{k:"Succeeds;",v:"\xE2\x89\xBB"},{k:"SucceedsEqual;",v:"\xE2\xAA\xB0"},{k:"SucceedsSlantEqual;",v:"\xE2\x89\xBD"},{k:"SucceedsTilde;",v:"\xE2\x89\xBF"},{k:"SuchThat;",v:"\xE2\x88\x8B"},{k:"Sum;",v:"\xE2\x88\x91"},{k:"Sup;",v:"\xE2\x8B\x91"},{k:"Superset;",v:"\xE2\x8A\x83"},{k:"SupersetEqual;",v:"\xE2\x8A\x87"},{k:"Supset;",v:"\xE2\x8B\x91"},{k:"THORN;",v:"\xC3\x9E"},{k:"TRADE;",v:"\xE2\x84\xA2"},{k:"TSHcy;",v:"\xD0\x8B"},{k:"TScy;",v:"\xD0\xA6"},{k:"Tab;",v:"\t"},{k:"Tau;",v:"\xCE\xA4"},{k:"Tcaron;",v:"\xC5\xA4"},{k:"Tcedil;",v:"\xC5\xA2"},{k:"Tcy;",v:"\xD0\xA2"},{k:"Tfr;",v:"\xF0\x9D\x94\x97"},{k:"Therefore;",v:"\xE2\x88\xB4"},{k:"Theta;",v:"\xCE\x98"},{k:"ThickSpace;",v:"\xE2\x81\x9F\xE2\x80\x8A"},{k:"ThinSpace;",v:"\xE2\x80\x89"},{k:"Tilde;",v:"\xE2\x88\xBC"},{k:"TildeEqual;",v:"\xE2\x89\x83"},{k:"TildeFullEqual;",v:"\xE2\x89\x85"},{k:"TildeTilde;",v:"\xE2\x89\x88"},{k:"Topf;",v:"\xF0\x9D\x95\x8B"},{k:"TripleDot;",v:"\xE2\x83\x9B"},{k:"Tscr;",v:"\xF0\x9D\x92\xAF"},{k:"Tstrok;",v:"\xC5\xA6"},{k:"Uacute;",v:"\xC3\x9A"},{k:"Uarr;",v:"\xE2\x86\x9F"},{k:"Uarrocir;",v:"\xE2\xA5\x89"},{k:"Ubrcy;",v:"\xD0\x8E"},{k:"Ubreve;",v:"\xC5\xAC"},{k:"Ucirc;",v:"\xC3\x9B"},{k:"Ucy;",v:"\xD0\xA3"},{k:"Udblac;",v:"\xC5\xB0"},{k:"Ufr;",v:"\xF0\x9D\x94\x98"},{k:"Ugrave;",v:"\xC3\x99"},{k:"Umacr;",v:"\xC5\xAA"},{k:"UnderBar;",v:"_"},{k:"UnderBrace;",v:"\xE2\x8F\x9F"},{k:"UnderBracket;",v:"\xE2\x8E\xB5"},{k:"UnderParenthesis;",v:"\xE2\x8F\x9D"},{k:"Union;",v:"\xE2\x8B\x83"},{k:"UnionPlus;",v:"\xE2\x8A\x8E"},{k:"Uogon;",v:"\xC5\xB2"},{k:"Uopf;",v:"\xF0\x9D\x95\x8C"},{k:"UpArrow;",v:"\xE2\x86\x91"},{k:"UpArrowBar;",v:"\xE2\xA4\x92"},{k:"UpArrowDownArrow;",v:"\xE2\x87\x85"},{k:"UpDownArrow;",v:"\xE2\x86\x95"},{k:"UpEquilibrium;",v:"\xE2\xA5\xAE"},{k:"UpTee;",v:"\xE2\x8A\xA5"},{k:"UpTeeArrow;",v:"\xE2\x86\xA5"},{k:"Uparrow;",v:"\xE2\x87\x91"},{k:"Updownarrow;",v:"\xE2\x87\x95"},{k:"UpperLeftArrow;",v:"\xE2\x86\x96"},{k:"UpperRightArrow;",v:"\xE2\x86\x97"},{k:"Upsi;",v:"\xCF\x92"},{k:"Upsilon;",v:"\xCE\xA5"},{k:"Uring;",v:"\xC5\xAE"},{k:"Uscr;",v:"\xF0\x9D\x92\xB0"},{k:"Utilde;",v:"\xC5\xA8"},{k:"Uuml;",v:"\xC3\x9C"},{k:"VDash;",v:"\xE2\x8A\xAB"},{k:"Vbar;",v:"\xE2\xAB\xAB"},{k:"Vcy;",v:"\xD0\x92"},{k:"Vdash;",v:"\xE2\x8A\xA9"},{k:"Vdashl;",v:"\xE2\xAB\xA6"},{k:"Vee;",v:"\xE2\x8B\x81"},{k:"Verbar;",v:"\xE2\x80\x96"},{k:"Vert;",v:"\xE2\x80\x96"},{k:"VerticalBar;",v:"\xE2\x88\xA3"},{k:"VerticalLine;",v:"|"},{k:"VerticalSeparator;",v:"\xE2\x9D\x98"},{k:"VerticalTilde;",v:"\xE2\x89\x80"},{k:"VeryThinSpace;",v:"\xE2\x80\x8A"},{k:"Vfr;",v:"\xF0\x9D\x94\x99"},{k:"Vopf;",v:"\xF0\x9D\x95\x8D"},{k:"Vscr;",v:"\xF0\x9D\x92\xB1"},{k:"Vvdash;",v:"\xE2\x8A\xAA"},{k:"Wcirc;",v:"\xC5\xB4"},{k:"Wedge;",v:"\xE2\x8B\x80"},{k:"Wfr;",v:"\xF0\x9D\x94\x9A"},{k:"Wopf;",v:"\xF0\x9D\x95\x8E"},{k:"Wscr;",v:"\xF0\x9D\x92\xB2"},{k:"Xfr;",v:"\xF0\x9D\x94\x9B"},{k:"Xi;",v:"\xCE\x9E"},{k:"Xopf;",v:"\xF0\x9D\x95\x8F"},{k:"Xscr;",v:"\xF0\x9D\x92\xB3"},{k:"YAcy;",v:"\xD0\xAF"},{k:"YIcy;",v:"\xD0\x87"},{k:"YUcy;",v:"\xD0\xAE"},{k:"Yacute;",v:"\xC3\x9D"},{k:"Ycirc;",v:"\xC5\xB6"},{k:"Ycy;",v:"\xD0\xAB"},{k:"Yfr;",v:"\xF0\x9D\x94\x9C"},{k:"Yopf;",v:"\xF0\x9D\x95\x90"},{k:"Yscr;",v:"\xF0\x9D\x92\xB4"},{k:"Yuml;",v:"\xC5\xB8"},{k:"ZHcy;",v:"\xD0\x96"},{k:"Zacute;",v:"\xC5\xB9"},{k:"Zcaron;",v:"\xC5\xBD"},{k:"Zcy;",v:"\xD0\x97"},{k:"Zdot;",v:"\xC5\xBB"},{k:"ZeroWidthSpace;",v:"\xE2\x80\x8B"},{k:"Zeta;",v:"\xCE\x96"},{k:"Zfr;",v:"\xE2\x84\xA8"},{k:"Zopf;",v:"\xE2\x84\xA4"},{k:"Zscr;",v:"\xF0\x9D\x92\xB5"},{k:"aacute;",v:"\xC3\xA1"},{k:"abreve;",v:"\xC4\x83"},{k:"ac;",v:"\xE2\x88\xBE"},{k:"acE;",v:"\xE2\x88\xBE\xCC\xB3"},{k:"acd;",v:"\xE2\x88\xBF"},{k:"acirc;",v:"\xC3\xA2"},{k:"acute;",v:"\xC2\xB4"},{k:"acy;",v:"\xD0\xB0"},{k:"aelig;",v:"\xC3\xA6"},{k:"af;",v:"\xE2\x81\xA1"},{k:"afr;",v:"\xF0\x9D\x94\x9E"},{k:"agrave;",v:"\xC3\xA0"},{k:"alefsym;",v:"\xE2\x84\xB5"},{k:"aleph;",v:"\xE2\x84\xB5"},{k:"alpha;",v:"\xCE\xB1"},{k:"amacr;",v:"\xC4\x81"},{k:"amalg;",v:"\xE2\xA8\xBF"},{k:"amp;",v:"&"},{k:"and;",v:"\xE2\x88\xA7"},{k:"andand;",v:"\xE2\xA9\x95"},{k:"andd;",v:"\xE2\xA9\x9C"},{k:"andslope;",v:"\xE2\xA9\x98"},{k:"andv;",v:"\xE2\xA9\x9A"},{k:"ang;",v:"\xE2\x88\xA0"},{k:"ange;",v:"\xE2\xA6\xA4"},{k:"angle;",v:"\xE2\x88\xA0"},{k:"angmsd;",v:"\xE2\x88\xA1"},{k:"angmsdaa;",v:"\xE2\xA6\xA8"},{k:"angmsdab;",v:"\xE2\xA6\xA9"},{k:"angmsdac;",v:"\xE2\xA6\xAA"},{k:"angmsdad;",v:"\xE2\xA6\xAB"},{k:"angmsdae;",v:"\xE2\xA6\xAC"},{k:"angmsdaf;",v:"\xE2\xA6\xAD"},{k:"angmsdag;",v:"\xE2\xA6\xAE"},{k:"angmsdah;",v:"\xE2\xA6\xAF"},{k:"angrt;",v:"\xE2\x88\x9F"},{k:"angrtvb;",v:"\xE2\x8A\xBE"},{k:"angrtvbd;",v:"\xE2\xA6\x9D"},{k:"angsph;",v:"\xE2\x88\xA2"},{k:"angst;",v:"\xC3\x85"},{k:"angzarr;",v:"\xE2\x8D\xBC"},{k:"aogon;",v:"\xC4\x85"},{k:"aopf;",v:"\xF0\x9D\x95\x92"},{k:"ap;",v:"\xE2\x89\x88"},{k:"apE;",v:"\xE2\xA9\xB0"},{k:"apacir;",v:"\xE2\xA9\xAF"},{k:"ape;",v:"\xE2\x89\x8A"},{k:"apid;",v:"\xE2\x89\x8B"},{k:"apos;",v:"'"},{k:"approx;",v:"\xE2\x89\x88"},{k:"approxeq;",v:"\xE2\x89\x8A"},{k:"aring;",v:"\xC3\xA5"},{k:"ascr;",v:"\xF0\x9D\x92\xB6"},{k:"ast;",v:"*"},{k:"asymp;",v:"\xE2\x89\x88"},{k:"asympeq;",v:"\xE2\x89\x8D"},{k:"atilde;",v:"\xC3\xA3"},{k:"auml;",v:"\xC3\xA4"},{k:"awconint;",v:"\xE2\x88\xB3"},{k:"awint;",v:"\xE2\xA8\x91"},{k:"bNot;",v:"\xE2\xAB\xAD"},{k:"backcong;",v:"\xE2\x89\x8C"},{k:"backepsilon;",v:"\xCF\xB6"},{k:"backprime;",v:"\xE2\x80\xB5"},{k:"backsim;",v:"\xE2\x88\xBD"},{k:"backsimeq;",v:"\xE2\x8B\x8D"},{k:"barvee;",v:"\xE2\x8A\xBD"},{k:"barwed;",v:"\xE2\x8C\x85"},{k:"barwedge;",v:"\xE2\x8C\x85"},{k:"bbrk;",v:"\xE2\x8E\xB5"},{k:"bbrktbrk;",v:"\xE2\x8E\xB6"},{k:"bcong;",v:"\xE2\x89\x8C"},{k:"bcy;",v:"\xD0\xB1"},{k:"bdquo;",v:"\xE2\x80\x9E"},{k:"becaus;",v:"\xE2\x88\xB5"},{k:"because;",v:"\xE2\x88\xB5"},{k:"bemptyv;",v:"\xE2\xA6\xB0"},{k:"bepsi;",v:"\xCF\xB6"},{k:"bernou;",v:"\xE2\x84\xAC"},{k:"beta;",v:"\xCE\xB2"},{k:"beth;",v:"\xE2\x84\xB6"},{k:"between;",v:"\xE2\x89\xAC"},{k:"bfr;",v:"\xF0\x9D\x94\x9F"},{k:"bigcap;",v:"\xE2\x8B\x82"},{k:"bigcirc;",v:"\xE2\x97\xAF"},{k:"bigcup;",v:"\xE2\x8B\x83"},{k:"bigodot;",v:"\xE2\xA8\x80"},{k:"bigoplus;",v:"\xE2\xA8\x81"},{k:"bigotimes;",v:"\xE2\xA8\x82"},{k:"bigsqcup;",v:"\xE2\xA8\x86"},{k:"bigstar;",v:"\xE2\x98\x85"},{k:"bigtriangledown;",v:"\xE2\x96\xBD"},{k:"bigtriangleup;",v:"\xE2\x96\xB3"},{k:"biguplus;",v:"\xE2\xA8\x84"},{k:"bigvee;",v:"\xE2\x8B\x81"},{k:"bigwedge;",v:"\xE2\x8B\x80"},{k:"bkarow;",v:"\xE2\xA4\x8D"},{k:"blacklozenge;",v:"\xE2\xA7\xAB"},{k:"blacksquare;",v:"\xE2\x96\xAA"},{k:"blacktriangle;",v:"\xE2\x96\xB4"},{k:"blacktriangledown;",v:"\xE2\x96\xBE"},{k:"blacktriangleleft;",v:"\xE2\x97\x82"},{k:"blacktriangleright;",v:"\xE2\x96\xB8"},{k:"blank;",v:"\xE2\x90\xA3"},{k:"blk12;",v:"\xE2\x96\x92"},{k:"blk14;",v:"\xE2\x96\x91"},{k:"blk34;",v:"\xE2\x96\x93"},{k:"block;",v:"\xE2\x96\x88"},{k:"bne;",v:"=\xE2\x83\xA5"},{k:"bnequiv;",v:"\xE2\x89\xA1\xE2\x83\xA5"},{k:"bnot;",v:"\xE2\x8C\x90"},{k:"bopf;",v:"\xF0\x9D\x95\x93"},{k:"bot;",v:"\xE2\x8A\xA5"},{k:"bottom;",v:"\xE2\x8A\xA5"},{k:"bowtie;",v:"\xE2\x8B\x88"},{k:"boxDL;",v:"\xE2\x95\x97"},{k:"boxDR;",v:"\xE2\x95\x94"},{k:"boxDl;",v:"\xE2\x95\x96"},{k:"boxDr;",v:"\xE2\x95\x93"},{k:"boxH;",v:"\xE2\x95\x90"},{k:"boxHD;",v:"\xE2\x95\xA6"},{k:"boxHU;",v:"\xE2\x95\xA9"},{k:"boxHd;",v:"\xE2\x95\xA4"},{k:"boxHu;",v:"\xE2\x95\xA7"},{k:"boxUL;",v:"\xE2\x95\x9D"},{k:"boxUR;",v:"\xE2\x95\x9A"},{k:"boxUl;",v:"\xE2\x95\x9C"},{k:"boxUr;",v:"\xE2\x95\x99"},{k:"boxV;",v:"\xE2\x95\x91"},{k:"boxVH;",v:"\xE2\x95\xAC"},{k:"boxVL;",v:"\xE2\x95\xA3"},{k:"boxVR;",v:"\xE2\x95\xA0"},{k:"boxVh;",v:"\xE2\x95\xAB"},{k:"boxVl;",v:"\xE2\x95\xA2"},{k:"boxVr;",v:"\xE2\x95\x9F"},{k:"boxbox;",v:"\xE2\xA7\x89"},{k:"boxdL;",v:"\xE2\x95\x95"},{k:"boxdR;",v:"\xE2\x95\x92"},{k:"boxdl;",v:"\xE2\x94\x90"},{k:"boxdr;",v:"\xE2\x94\x8C"},{k:"boxh;",v:"\xE2\x94\x80"},{k:"boxhD;",v:"\xE2\x95\xA5"},{k:"boxhU;",v:"\xE2\x95\xA8"},{k:"boxhd;",v:"\xE2\x94\xAC"},{k:"boxhu;",v:"\xE2\x94\xB4"},{k:"boxminus;",v:"\xE2\x8A\x9F"},{k:"boxplus;",v:"\xE2\x8A\x9E"},{k:"boxtimes;",v:"\xE2\x8A\xA0"},{k:"boxuL;",v:"\xE2\x95\x9B"},{k:"boxuR;",v:"\xE2\x95\x98"},{k:"boxul;",v:"\xE2\x94\x98"},{k:"boxur;",v:"\xE2\x94\x94"},{k:"boxv;",v:"\xE2\x94\x82"},{k:"boxvH;",v:"\xE2\x95\xAA"},{k:"boxvL;",v:"\xE2\x95\xA1"},{k:"boxvR;",v:"\xE2\x95\x9E"},{k:"boxvh;",v:"\xE2\x94\xBC"},{k:"boxvl;",v:"\xE2\x94\xA4"},{k:"boxvr;",v:"\xE2\x94\x9C"},{k:"bprime;",v:"\xE2\x80\xB5"},{k:"breve;",v:"\xCB\x98"},{k:"brvbar;",v:"\xC2\xA6"},{k:"bscr;",v:"\xF0\x9D\x92\xB7"},{k:"bsemi;",v:"\xE2\x81\x8F"},{k:"bsim;",v:"\xE2\x88\xBD"},{k:"bsime;",v:"\xE2\x8B\x8D"},{k:"bsol;",v:"\\"},{k:"bsolb;",v:"\xE2\xA7\x85"},{k:"bsolhsub;",v:"\xE2\x9F\x88"},{k:"bull;",v:"\xE2\x80\xA2"},{k:"bullet;",v:"\xE2\x80\xA2"},{k:"bump;",v:"\xE2\x89\x8E"},{k:"bumpE;",v:"\xE2\xAA\xAE"},{k:"bumpe;",v:"\xE2\x89\x8F"},{k:"bumpeq;",v:"\xE2\x89\x8F"},{k:"cacute;",v:"\xC4\x87"},{k:"cap;",v:"\xE2\x88\xA9"},{k:"capand;",v:"\xE2\xA9\x84"},{k:"capbrcup;",v:"\xE2\xA9\x89"},{k:"capcap;",v:"\xE2\xA9\x8B"},{k:"capcup;",v:"\xE2\xA9\x87"},{k:"capdot;",v:"\xE2\xA9\x80"},{k:"caps;",v:"\xE2\x88\xA9\xEF\xB8\x80"},{k:"caret;",v:"\xE2\x81\x81"},{k:"caron;",v:"\xCB\x87"},{k:"ccaps;",v:"\xE2\xA9\x8D"},{k:"ccaron;",v:"\xC4\x8D"},{k:"ccedil;",v:"\xC3\xA7"},{k:"ccirc;",v:"\xC4\x89"},{k:"ccups;",v:"\xE2\xA9\x8C"},{k:"ccupssm;",v:"\xE2\xA9\x90"},{k:"cdot;",v:"\xC4\x8B"},{k:"cedil;",v:"\xC2\xB8"},{k:"cemptyv;",v:"\xE2\xA6\xB2"},{k:"cent;",v:"\xC2\xA2"},{k:"centerdot;",v:"\xC2\xB7"},{k:"cfr;",v:"\xF0\x9D\x94\xA0"},{k:"chcy;",v:"\xD1\x87"},{k:"check;",v:"\xE2\x9C\x93"},{k:"checkmark;",v:"\xE2\x9C\x93"},{k:"chi;",v:"\xCF\x87"},{k:"cir;",v:"\xE2\x97\x8B"},{k:"cirE;",v:"\xE2\xA7\x83"},{k:"circ;",v:"\xCB\x86"},{k:"circeq;",v:"\xE2\x89\x97"},{k:"circlearrowleft;",v:"\xE2\x86\xBA"},{k:"circlearrowright;",v:"\xE2\x86\xBB"},{k:"circledR;",v:"\xC2\xAE"},{k:"circledS;",v:"\xE2\x93\x88"},{k:"circledast;",v:"\xE2\x8A\x9B"},{k:"circledcirc;",v:"\xE2\x8A\x9A"},{k:"circleddash;",v:"\xE2\x8A\x9D"},{k:"cire;",v:"\xE2\x89\x97"},{k:"cirfnint;",v:"\xE2\xA8\x90"},{k:"cirmid;",v:"\xE2\xAB\xAF"},{k:"cirscir;",v:"\xE2\xA7\x82"},{k:"clubs;",v:"\xE2\x99\xA3"},{k:"clubsuit;",v:"\xE2\x99\xA3"},{k:"colon;",v:":"},{k:"colone;",v:"\xE2\x89\x94"},{k:"coloneq;",v:"\xE2\x89\x94"},{k:"comma;",v:","},{k:"commat;",v:"@"},{k:"comp;",v:"\xE2\x88\x81"},{k:"compfn;",v:"\xE2\x88\x98"},{k:"complement;",v:"\xE2\x88\x81"},{k:"complexes;",v:"\xE2\x84\x82"},{k:"cong;",v:"\xE2\x89\x85"},{k:"congdot;",v:"\xE2\xA9\xAD"},{k:"conint;",v:"\xE2\x88\xAE"},{k:"copf;",v:"\xF0\x9D\x95\x94"},{k:"coprod;",v:"\xE2\x88\x90"},{k:"copy;",v:"\xC2\xA9"},{k:"copysr;",v:"\xE2\x84\x97"},{k:"crarr;",v:"\xE2\x86\xB5"},{k:"cross;",v:"\xE2\x9C\x97"},{k:"cscr;",v:"\xF0\x9D\x92\xB8"},{k:"csub;",v:"\xE2\xAB\x8F"},{k:"csube;",v:"\xE2\xAB\x91"},{k:"csup;",v:"\xE2\xAB\x90"},{k:"csupe;",v:"\xE2\xAB\x92"},{k:"ctdot;",v:"\xE2\x8B\xAF"},{k:"cudarrl;",v:"\xE2\xA4\xB8"},{k:"cudarrr;",v:"\xE2\xA4\xB5"},{k:"cuepr;",v:"\xE2\x8B\x9E"},{k:"cuesc;",v:"\xE2\x8B\x9F"},{k:"cularr;",v:"\xE2\x86\xB6"},{k:"cularrp;",v:"\xE2\xA4\xBD"},{k:"cup;",v:"\xE2\x88\xAA"},{k:"cupbrcap;",v:"\xE2\xA9\x88"},{k:"cupcap;",v:"\xE2\xA9\x86"},{k:"cupcup;",v:"\xE2\xA9\x8A"},{k:"cupdot;",v:"\xE2\x8A\x8D"},{k:"cupor;",v:"\xE2\xA9\x85"},{k:"cups;",v:"\xE2\x88\xAA\xEF\xB8\x80"},{k:"curarr;",v:"\xE2\x86\xB7"},{k:"curarrm;",v:"\xE2\xA4\xBC"},{k:"curlyeqprec;",v:"\xE2\x8B\x9E"},{k:"curlyeqsucc;",v:"\xE2\x8B\x9F"},{k:"curlyvee;",v:"\xE2\x8B\x8E"},{k:"curlywedge;",v:"\xE2\x8B\x8F"},{k:"curren;",v:"\xC2\xA4"},{k:"curvearrowleft;",v:"\xE2\x86\xB6"},{k:"curvearrowright;",v:"\xE2\x86\xB7"},{k:"cuvee;",v:"\xE2\x8B\x8E"},{k:"cuwed;",v:"\xE2\x8B\x8F"},{k:"cwconint;",v:"\xE2\x88\xB2"},{k:"cwint;",v:"\xE2\x88\xB1"},{k:"cylcty;",v:"\xE2\x8C\xAD"},{k:"dArr;",v:"\xE2\x87\x93"},{k:"dHar;",v:"\xE2\xA5\xA5"},{k:"dagger;",v:"\xE2\x80\xA0"},{k:"daleth;",v:"\xE2\x84\xB8"},{k:"darr;",v:"\xE2\x86\x93"},{k:"dash;",v:"\xE2\x80\x90"},{k:"dashv;",v:"\xE2\x8A\xA3"},{k:"dbkarow;",v:"\xE2\xA4\x8F"},{k:"dblac;",v:"\xCB\x9D"},{k:"dcaron;",v:"\xC4\x8F"},{k:"dcy;",v:"\xD0\xB4"},{k:"dd;",v:"\xE2\x85\x86"},{k:"ddagger;",v:"\xE2\x80\xA1"},{k:"ddarr;",v:"\xE2\x87\x8A"},{k:"ddotseq;",v:"\xE2\xA9\xB7"},{k:"deg;",v:"\xC2\xB0"},{k:"delta;",v:"\xCE\xB4"},{k:"demptyv;",v:"\xE2\xA6\xB1"},{k:"dfisht;",v:"\xE2\xA5\xBF"},{k:"dfr;",v:"\xF0\x9D\x94\xA1"},{k:"dharl;",v:"\xE2\x87\x83"},{k:"dharr;",v:"\xE2\x87\x82"},{k:"diam;",v:"\xE2\x8B\x84"},{k:"diamond;",v:"\xE2\x8B\x84"},{k:"diamondsuit;",v:"\xE2\x99\xA6"},{k:"diams;",v:"\xE2\x99\xA6"},{k:"die;",v:"\xC2\xA8"},{k:"digamma;",v:"\xCF\x9D"},{k:"disin;",v:"\xE2\x8B\xB2"},{k:"div;",v:"\xC3\xB7"},{k:"divide;",v:"\xC3\xB7"},{k:"divideontimes;",v:"\xE2\x8B\x87"},{k:"divonx;",v:"\xE2\x8B\x87"},{k:"djcy;",v:"\xD1\x92"},{k:"dlcorn;",v:"\xE2\x8C\x9E"},{k:"dlcrop;",v:"\xE2\x8C\x8D"},{k:"dollar;",v:"$"},{k:"dopf;",v:"\xF0\x9D\x95\x95"},{k:"dot;",v:"\xCB\x99"},{k:"doteq;",v:"\xE2\x89\x90"},{k:"doteqdot;",v:"\xE2\x89\x91"},{k:"dotminus;",v:"\xE2\x88\xB8"},{k:"dotplus;",v:"\xE2\x88\x94"},{k:"dotsquare;",v:"\xE2\x8A\xA1"},{k:"doublebarwedge;",v:"\xE2\x8C\x86"},{k:"downarrow;",v:"\xE2\x86\x93"},{k:"downdownarrows;",v:"\xE2\x87\x8A"},{k:"downharpoonleft;",v:"\xE2\x87\x83"},{k:"downharpoonright;",v:"\xE2\x87\x82"},{k:"drbkarow;",v:"\xE2\xA4\x90"},{k:"drcorn;",v:"\xE2\x8C\x9F"},{k:"drcrop;",v:"\xE2\x8C\x8C"},{k:"dscr;",v:"\xF0\x9D\x92\xB9"},{k:"dscy;",v:"\xD1\x95"},{k:"dsol;",v:"\xE2\xA7\xB6"},{k:"dstrok;",v:"\xC4\x91"},{k:"dtdot;",v:"\xE2\x8B\xB1"},{k:"dtri;",v:"\xE2\x96\xBF"},{k:"dtrif;",v:"\xE2\x96\xBE"},{k:"duarr;",v:"\xE2\x87\xB5"},{k:"duhar;",v:"\xE2\xA5\xAF"},{k:"dwangle;",v:"\xE2\xA6\xA6"},{k:"dzcy;",v:"\xD1\x9F"},{k:"dzigrarr;",v:"\xE2\x9F\xBF"},{k:"eDDot;",v:"\xE2\xA9\xB7"},{k:"eDot;",v:"\xE2\x89\x91"},{k:"eacute;",v:"\xC3\xA9"},{k:"easter;",v:"\xE2\xA9\xAE"},{k:"ecaron;",v:"\xC4\x9B"},{k:"ecir;",v:"\xE2\x89\x96"},{k:"ecirc;",v:"\xC3\xAA"},{k:"ecolon;",v:"\xE2\x89\x95"},{k:"ecy;",v:"\xD1\x8D"},{k:"edot;",v:"\xC4\x97"},{k:"ee;",v:"\xE2\x85\x87"},{k:"efDot;",v:"\xE2\x89\x92"},{k:"efr;",v:"\xF0\x9D\x94\xA2"},{k:"eg;",v:"\xE2\xAA\x9A"},{k:"egrave;",v:"\xC3\xA8"},{k:"egs;",v:"\xE2\xAA\x96"},{k:"egsdot;",v:"\xE2\xAA\x98"},{k:"el;",v:"\xE2\xAA\x99"},{k:"elinters;",v:"\xE2\x8F\xA7"},{k:"ell;",v:"\xE2\x84\x93"},{k:"els;",v:"\xE2\xAA\x95"},{k:"elsdot;",v:"\xE2\xAA\x97"},{k:"emacr;",v:"\xC4\x93"},{k:"empty;",v:"\xE2\x88\x85"},{k:"emptyset;",v:"\xE2\x88\x85"},{k:"emptyv;",v:"\xE2\x88\x85"},{k:"emsp;",v:"\xE2\x80\x83"},{k:"emsp13;",v:"\xE2\x80\x84"},{k:"emsp14;",v:"\xE2\x80\x85"},{k:"eng;",v:"\xC5\x8B"},{k:"ensp;",v:"\xE2\x80\x82"},{k:"eogon;",v:"\xC4\x99"},{k:"eopf;",v:"\xF0\x9D\x95\x96"},{k:"epar;",v:"\xE2\x8B\x95"},{k:"eparsl;",v:"\xE2\xA7\xA3"},{k:"eplus;",v:"\xE2\xA9\xB1"},{k:"epsi;",v:"\xCE\xB5"},{k:"epsilon;",v:"\xCE\xB5"},{k:"epsiv;",v:"\xCF\xB5"},{k:"eqcirc;",v:"\xE2\x89\x96"},{k:"eqcolon;",v:"\xE2\x89\x95"},{k:"eqsim;",v:"\xE2\x89\x82"},{k:"eqslantgtr;",v:"\xE2\xAA\x96"},{k:"eqslantless;",v:"\xE2\xAA\x95"},{k:"equals;",v:"="},{k:"equest;",v:"\xE2\x89\x9F"},{k:"equiv;",v:"\xE2\x89\xA1"},{k:"equivDD;",v:"\xE2\xA9\xB8"},{k:"eqvparsl;",v:"\xE2\xA7\xA5"},{k:"erDot;",v:"\xE2\x89\x93"},{k:"erarr;",v:"\xE2\xA5\xB1"},{k:"escr;",v:"\xE2\x84\xAF"},{k:"esdot;",v:"\xE2\x89\x90"},{k:"esim;",v:"\xE2\x89\x82"},{k:"eta;",v:"\xCE\xB7"},{k:"eth;",v:"\xC3\xB0"},{k:"euml;",v:"\xC3\xAB"},{k:"euro;",v:"\xE2\x82\xAC"},{k:"excl;",v:"!"},{k:"exist;",v:"\xE2\x88\x83"},{k:"expectation;",v:"\xE2\x84\xB0"},{k:"exponentiale;",v:"\xE2\x85\x87"},{k:"fallingdotseq;",v:"\xE2\x89\x92"},{k:"fcy;",v:"\xD1\x84"},{k:"female;",v:"\xE2\x99\x80"},{k:"ffilig;",v:"\xEF\xAC\x83"},{k:"fflig;",v:"\xEF\xAC\x80"},{k:"ffllig;",v:"\xEF\xAC\x84"},{k:"ffr;",v:"\xF0\x9D\x94\xA3"},{k:"filig;",v:"\xEF\xAC\x81"},{k:"fjlig;",v:"fj fj"},{k:"flat;",v:"\xE2\x99\xAD"},{k:"fllig;",v:"\xEF\xAC\x82"},{k:"fltns;",v:"\xE2\x96\xB1"},{k:"fnof;",v:"\xC6\x92"},{k:"fopf;",v:"\xF0\x9D\x95\x97"},{k:"forall;",v:"\xE2\x88\x80"},{k:"fork;",v:"\xE2\x8B\x94"},{k:"forkv;",v:"\xE2\xAB\x99"},{k:"fpartint;",v:"\xE2\xA8\x8D"},{k:"frac12;",v:"\xC2\xBD"},{k:"frac13;",v:"\xE2\x85\x93"},{k:"frac14;",v:"\xC2\xBC"},{k:"frac15;",v:"\xE2\x85\x95"},{k:"frac16;",v:"\xE2\x85\x99"},{k:"frac18;",v:"\xE2\x85\x9B"},{k:"frac23;",v:"\xE2\x85\x94"},{k:"frac25;",v:"\xE2\x85\x96"},{k:"frac34;",v:"\xC2\xBE"},{k:"frac35;",v:"\xE2\x85\x97"},{k:"frac38;",v:"\xE2\x85\x9C"},{k:"frac45;",v:"\xE2\x85\x98"},{k:"frac56;",v:"\xE2\x85\x9A"},{k:"frac58;",v:"\xE2\x85\x9D"},{k:"frac78;",v:"\xE2\x85\x9E"},{k:"frasl;",v:"\xE2\x81\x84"},{k:"frown;",v:"\xE2\x8C\xA2"},{k:"fscr;",v:"\xF0\x9D\x92\xBB"},{k:"gE;",v:"\xE2\x89\xA7"},{k:"gEl;",v:"\xE2\xAA\x8C"},{k:"gacute;",v:"\xC7\xB5"},{k:"gamma;",v:"\xCE\xB3"},{k:"gammad;",v:"\xCF\x9D"},{k:"gap;",v:"\xE2\xAA\x86"},{k:"gbreve;",v:"\xC4\x9F"},{k:"gcirc;",v:"\xC4\x9D"},{k:"gcy;",v:"\xD0\xB3"},{k:"gdot;",v:"\xC4\xA1"},{k:"ge;",v:"\xE2\x89\xA5"},{k:"gel;",v:"\xE2\x8B\x9B"},{k:"geq;",v:"\xE2\x89\xA5"},{k:"geqq;",v:"\xE2\x89\xA7"},{k:"geqslant;",v:"\xE2\xA9\xBE"},{k:"ges;",v:"\xE2\xA9\xBE"},{k:"gescc;",v:"\xE2\xAA\xA9"},{k:"gesdot;",v:"\xE2\xAA\x80"},{k:"gesdoto;",v:"\xE2\xAA\x82"},{k:"gesdotol;",v:"\xE2\xAA\x84"},{k:"gesl;",v:"\xE2\x8B\x9B\xEF\xB8\x80"},{k:"gesles;",v:"\xE2\xAA\x94"},{k:"gfr;",v:"\xF0\x9D\x94\xA4"},{k:"gg;",v:"\xE2\x89\xAB"},{k:"ggg;",v:"\xE2\x8B\x99"},{k:"gimel;",v:"\xE2\x84\xB7"},{k:"gjcy;",v:"\xD1\x93"},{k:"gl;",v:"\xE2\x89\xB7"},{k:"glE;",v:"\xE2\xAA\x92"},{k:"gla;",v:"\xE2\xAA\xA5"},{k:"glj;",v:"\xE2\xAA\xA4"},{k:"gnE;",v:"\xE2\x89\xA9"},{k:"gnap;",v:"\xE2\xAA\x8A"},{k:"gnapprox;",v:"\xE2\xAA\x8A"},{k:"gne;",v:"\xE2\xAA\x88"},{k:"gneq;",v:"\xE2\xAA\x88"},{k:"gneqq;",v:"\xE2\x89\xA9"},{k:"gnsim;",v:"\xE2\x8B\xA7"},{k:"gopf;",v:"\xF0\x9D\x95\x98"},{k:"grave;",v:"`"},{k:"gscr;",v:"\xE2\x84\x8A"},{k:"gsim;",v:"\xE2\x89\xB3"},{k:"gsime;",v:"\xE2\xAA\x8E"},{k:"gsiml;",v:"\xE2\xAA\x90"},{k:"gt;",v:">"},{k:"gtcc;",v:"\xE2\xAA\xA7"},{k:"gtcir;",v:"\xE2\xA9\xBA"},{k:"gtdot;",v:"\xE2\x8B\x97"},{k:"gtlPar;",v:"\xE2\xA6\x95"},{k:"gtquest;",v:"\xE2\xA9\xBC"},{k:"gtrapprox;",v:"\xE2\xAA\x86"},{k:"gtrarr;",v:"\xE2\xA5\xB8"},{k:"gtrdot;",v:"\xE2\x8B\x97"},{k:"gtreqless;",v:"\xE2\x8B\x9B"},{k:"gtreqqless;",v:"\xE2\xAA\x8C"},{k:"gtrless;",v:"\xE2\x89\xB7"},{k:"gtrsim;",v:"\xE2\x89\xB3"},{k:"gvertneqq;",v:"\xE2\x89\xA9\xEF\xB8\x80"},{k:"gvnE;",v:"\xE2\x89\xA9\xEF\xB8\x80"},{k:"hArr;",v:"\xE2\x87\x94"},{k:"hairsp;",v:"\xE2\x80\x8A"},{k:"half;",v:"\xC2\xBD"},{k:"hamilt;",v:"\xE2\x84\x8B"},{k:"hardcy;",v:"\xD1\x8A"},{k:"harr;",v:"\xE2\x86\x94"},{k:"harrcir;",v:"\xE2\xA5\x88"},{k:"harrw;",v:"\xE2\x86\xAD"},{k:"hbar;",v:"\xE2\x84\x8F"},{k:"hcirc;",v:"\xC4\xA5"},{k:"hearts;",v:"\xE2\x99\xA5"},{k:"heartsuit;",v:"\xE2\x99\xA5"},{k:"hellip;",v:"\xE2\x80\xA6"},{k:"hercon;",v:"\xE2\x8A\xB9"},{k:"hfr;",v:"\xF0\x9D\x94\xA5"},{k:"hksearow;",v:"\xE2\xA4\xA5"},{k:"hkswarow;",v:"\xE2\xA4\xA6"},{k:"hoarr;",v:"\xE2\x87\xBF"},{k:"homtht;",v:"\xE2\x88\xBB"},{k:"hookleftarrow;",v:"\xE2\x86\xA9"},{k:"hookrightarrow;",v:"\xE2\x86\xAA"},{k:"hopf;",v:"\xF0\x9D\x95\x99"},{k:"horbar;",v:"\xE2\x80\x95"},{k:"hscr;",v:"\xF0\x9D\x92\xBD"},{k:"hslash;",v:"\xE2\x84\x8F"},{k:"hstrok;",v:"\xC4\xA7"},{k:"hybull;",v:"\xE2\x81\x83"},{k:"hyphen;",v:"\xE2\x80\x90"},{k:"iacute;",v:"\xC3\xAD"},{k:"ic;",v:"\xE2\x81\xA3"},{k:"icirc;",v:"\xC3\xAE"},{k:"icy;",v:"\xD0\xB8"},{k:"iecy;",v:"\xD0\xB5"},{k:"iexcl;",v:"\xC2\xA1"},{k:"iff;",v:"\xE2\x87\x94"},{k:"ifr;",v:"\xF0\x9D\x94\xA6"},{k:"igrave;",v:"\xC3\xAC"},{k:"ii;",v:"\xE2\x85\x88"},{k:"iiiint;",v:"\xE2\xA8\x8C"},{k:"iiint;",v:"\xE2\x88\xAD"},{k:"iinfin;",v:"\xE2\xA7\x9C"},{k:"iiota;",v:"\xE2\x84\xA9"},{k:"ijlig;",v:"\xC4\xB3"},{k:"imacr;",v:"\xC4\xAB"},{k:"image;",v:"\xE2\x84\x91"},{k:"imagline;",v:"\xE2\x84\x90"},{k:"imagpart;",v:"\xE2\x84\x91"},{k:"imath;",v:"\xC4\xB1"},{k:"imof;",v:"\xE2\x8A\xB7"},{k:"imped;",v:"\xC6\xB5"},{k:"in;",v:"\xE2\x88\x88"},{k:"incare;",v:"\xE2\x84\x85"},{k:"infin;",v:"\xE2\x88\x9E"},{k:"infintie;",v:"\xE2\xA7\x9D"},{k:"inodot;",v:"\xC4\xB1"},{k:"int;",v:"\xE2\x88\xAB"},{k:"intcal;",v:"\xE2\x8A\xBA"},{k:"integers;",v:"\xE2\x84\xA4"},{k:"intercal;",v:"\xE2\x8A\xBA"},{k:"intlarhk;",v:"\xE2\xA8\x97"},{k:"intprod;",v:"\xE2\xA8\xBC"},{k:"iocy;",v:"\xD1\x91"},{k:"iogon;",v:"\xC4\xAF"},{k:"iopf;",v:"\xF0\x9D\x95\x9A"},{k:"iota;",v:"\xCE\xB9"},{k:"iprod;",v:"\xE2\xA8\xBC"},{k:"iquest;",v:"\xC2\xBF"},{k:"iscr;",v:"\xF0\x9D\x92\xBE"},{k:"isin;",v:"\xE2\x88\x88"},{k:"isinE;",v:"\xE2\x8B\xB9"},{k:"isindot;",v:"\xE2\x8B\xB5"},{k:"isins;",v:"\xE2\x8B\xB4"},{k:"isinsv;",v:"\xE2\x8B\xB3"},{k:"isinv;",v:"\xE2\x88\x88"},{k:"it;",v:"\xE2\x81\xA2"},{k:"itilde;",v:"\xC4\xA9"},{k:"iukcy;",v:"\xD1\x96"},{k:"iuml;",v:"\xC3\xAF"},{k:"jcirc;",v:"\xC4\xB5"},{k:"jcy;",v:"\xD0\xB9"},{k:"jfr;",v:"\xF0\x9D\x94\xA7"},{k:"jmath;",v:"\xC8\xB7"},{k:"jopf;",v:"\xF0\x9D\x95\x9B"},{k:"jscr;",v:"\xF0\x9D\x92\xBF"},{k:"jsercy;",v:"\xD1\x98"},{k:"jukcy;",v:"\xD1\x94"},{k:"kappa;",v:"\xCE\xBA"},{k:"kappav;",v:"\xCF\xB0"},{k:"kcedil;",v:"\xC4\xB7"},{k:"kcy;",v:"\xD0\xBA"},{k:"kfr;",v:"\xF0\x9D\x94\xA8"},{k:"kgreen;",v:"\xC4\xB8"},{k:"khcy;",v:"\xD1\x85"},{k:"kjcy;",v:"\xD1\x9C"},{k:"kopf;",v:"\xF0\x9D\x95\x9C"},{k:"kscr;",v:"\xF0\x9D\x93\x80"},{k:"lAarr;",v:"\xE2\x87\x9A"},{k:"lArr;",v:"\xE2\x87\x90"},{k:"lAtail;",v:"\xE2\xA4\x9B"},{k:"lBarr;",v:"\xE2\xA4\x8E"},{k:"lE;",v:"\xE2\x89\xA6"},{k:"lEg;",v:"\xE2\xAA\x8B"},{k:"lHar;",v:"\xE2\xA5\xA2"},{k:"lacute;",v:"\xC4\xBA"},{k:"laemptyv;",v:"\xE2\xA6\xB4"},{k:"lagran;",v:"\xE2\x84\x92"},{k:"lambda;",v:"\xCE\xBB"},{k:"lang;",v:"\xE2\x9F\xA8"},{k:"langd;",v:"\xE2\xA6\x91"},{k:"langle;",v:"\xE2\x9F\xA8"},{k:"lap;",v:"\xE2\xAA\x85"},{k:"laquo;",v:"\xC2\xAB"},{k:"larr;",v:"\xE2\x86\x90"},{k:"larrb;",v:"\xE2\x87\xA4"},{k:"larrbfs;",v:"\xE2\xA4\x9F"},{k:"larrfs;",v:"\xE2\xA4\x9D"},{k:"larrhk;",v:"\xE2\x86\xA9"},{k:"larrlp;",v:"\xE2\x86\xAB"},{k:"larrpl;",v:"\xE2\xA4\xB9"},{k:"larrsim;",v:"\xE2\xA5\xB3"},{k:"larrtl;",v:"\xE2\x86\xA2"},{k:"lat;",v:"\xE2\xAA\xAB"},{k:"latail;",v:"\xE2\xA4\x99"},{k:"late;",v:"\xE2\xAA\xAD"},{k:"lates;",v:"\xE2\xAA\xAD\xEF\xB8\x80"},{k:"lbarr;",v:"\xE2\xA4\x8C"},{k:"lbbrk;",v:"\xE2\x9D\xB2"},{k:"lbrace;",v:"{"},{k:"lbrack;",v:"["},{k:"lbrke;",v:"\xE2\xA6\x8B"},{k:"lbrksld;",v:"\xE2\xA6\x8F"},{k:"lbrkslu;",v:"\xE2\xA6\x8D"},{k:"lcaron;",v:"\xC4\xBE"},{k:"lcedil;",v:"\xC4\xBC"},{k:"lceil;",v:"\xE2\x8C\x88"},{k:"lcub;",v:"{"},{k:"lcy;",v:"\xD0\xBB"},{k:"ldca;",v:"\xE2\xA4\xB6"},{k:"ldquo;",v:"\xE2\x80\x9C"},{k:"ldquor;",v:"\xE2\x80\x9E"},{k:"ldrdhar;",v:"\xE2\xA5\xA7"},{k:"ldrushar;",v:"\xE2\xA5\x8B"},{k:"ldsh;",v:"\xE2\x86\xB2"},{k:"le;",v:"\xE2\x89\xA4"},{k:"leftarrow;",v:"\xE2\x86\x90"},{k:"leftarrowtail;",v:"\xE2\x86\xA2"},{k:"leftharpoondown;",v:"\xE2\x86\xBD"},{k:"leftharpoonup;",v:"\xE2\x86\xBC"},{k:"leftleftarrows;",v:"\xE2\x87\x87"},{k:"leftrightarrow;",v:"\xE2\x86\x94"},{k:"leftrightarrows;",v:"\xE2\x87\x86"},{k:"leftrightharpoons;",v:"\xE2\x87\x8B"},{k:"leftrightsquigarrow;",v:"\xE2\x86\xAD"},{k:"leftthreetimes;",v:"\xE2\x8B\x8B"},{k:"leg;",v:"\xE2\x8B\x9A"},{k:"leq;",v:"\xE2\x89\xA4"},{k:"leqq;",v:"\xE2\x89\xA6"},{k:"leqslant;",v:"\xE2\xA9\xBD"},{k:"les;",v:"\xE2\xA9\xBD"},{k:"lescc;",v:"\xE2\xAA\xA8"},{k:"lesdot;",v:"\xE2\xA9\xBF"},{k:"lesdoto;",v:"\xE2\xAA\x81"},{k:"lesdotor;",v:"\xE2\xAA\x83"},{k:"lesg;",v:"\xE2\x8B\x9A\xEF\xB8\x80"},{k:"lesges;",v:"\xE2\xAA\x93"},{k:"lessapprox;",v:"\xE2\xAA\x85"},{k:"lessdot;",v:"\xE2\x8B\x96"},{k:"lesseqgtr;",v:"\xE2\x8B\x9A"},{k:"lesseqqgtr;",v:"\xE2\xAA\x8B"},{k:"lessgtr;",v:"\xE2\x89\xB6"},{k:"lesssim;",v:"\xE2\x89\xB2"},{k:"lfisht;",v:"\xE2\xA5\xBC"},{k:"lfloor;",v:"\xE2\x8C\x8A"},{k:"lfr;",v:"\xF0\x9D\x94\xA9"},{k:"lg;",v:"\xE2\x89\xB6"},{k:"lgE;",v:"\xE2\xAA\x91"},{k:"lhard;",v:"\xE2\x86\xBD"},{k:"lharu;",v:"\xE2\x86\xBC"},{k:"lharul;",v:"\xE2\xA5\xAA"},{k:"lhblk;",v:"\xE2\x96\x84"},{k:"ljcy;",v:"\xD1\x99"},{k:"ll;",v:"\xE2\x89\xAA"},{k:"llarr;",v:"\xE2\x87\x87"},{k:"llcorner;",v:"\xE2\x8C\x9E"},{k:"llhard;",v:"\xE2\xA5\xAB"},{k:"lltri;",v:"\xE2\x97\xBA"},{k:"lmidot;",v:"\xC5\x80"},{k:"lmoust;",v:"\xE2\x8E\xB0"},{k:"lmoustache;",v:"\xE2\x8E\xB0"},{k:"lnE;",v:"\xE2\x89\xA8"},{k:"lnap;",v:"\xE2\xAA\x89"},{k:"lnapprox;",v:"\xE2\xAA\x89"},{k:"lne;",v:"\xE2\xAA\x87"},{k:"lneq;",v:"\xE2\xAA\x87"},{k:"lneqq;",v:"\xE2\x89\xA8"},{k:"lnsim;",v:"\xE2\x8B\xA6"},{k:"loang;",v:"\xE2\x9F\xAC"},{k:"loarr;",v:"\xE2\x87\xBD"},{k:"lobrk;",v:"\xE2\x9F\xA6"},{k:"longleftarrow;",v:"\xE2\x9F\xB5"},{k:"longleftrightarrow;",v:"\xE2\x9F\xB7"},{k:"longmapsto;",v:"\xE2\x9F\xBC"},{k:"longrightarrow;",v:"\xE2\x9F\xB6"},{k:"looparrowleft;",v:"\xE2\x86\xAB"},{k:"looparrowright;",v:"\xE2\x86\xAC"},{k:"lopar;",v:"\xE2\xA6\x85"},{k:"lopf;",v:"\xF0\x9D\x95\x9D"},{k:"loplus;",v:"\xE2\xA8\xAD"},{k:"lotimes;",v:"\xE2\xA8\xB4"},{k:"lowast;",v:"\xE2\x88\x97"},{k:"lowbar;",v:"_"},{k:"loz;",v:"\xE2\x97\x8A"},{k:"lozenge;",v:"\xE2\x97\x8A"},{k:"lozf;",v:"\xE2\xA7\xAB"},{k:"lpar;",v:"("},{k:"lparlt;",v:"\xE2\xA6\x93"},{k:"lrarr;",v:"\xE2\x87\x86"},{k:"lrcorner;",v:"\xE2\x8C\x9F"},{k:"lrhar;",v:"\xE2\x87\x8B"},{k:"lrhard;",v:"\xE2\xA5\xAD"},{k:"lrm;",v:"\xE2\x80\x8E"},{k:"lrtri;",v:"\xE2\x8A\xBF"},{k:"lsaquo;",v:"\xE2\x80\xB9"},{k:"lscr;",v:"\xF0\x9D\x93\x81"},{k:"lsh;",v:"\xE2\x86\xB0"},{k:"lsim;",v:"\xE2\x89\xB2"},{k:"lsime;",v:"\xE2\xAA\x8D"},{k:"lsimg;",v:"\xE2\xAA\x8F"},{k:"lsqb;",v:"["},{k:"lsquo;",v:"\xE2\x80\x98"},{k:"lsquor;",v:"\xE2\x80\x9A"},{k:"lstrok;",v:"\xC5\x82"},{k:"lt;",v:"<"},{k:"ltcc;",v:"\xE2\xAA\xA6"},{k:"ltcir;",v:"\xE2\xA9\xB9"},{k:"ltdot;",v:"\xE2\x8B\x96"},{k:"lthree;",v:"\xE2\x8B\x8B"},{k:"ltimes;",v:"\xE2\x8B\x89"},{k:"ltlarr;",v:"\xE2\xA5\xB6"},{k:"ltquest;",v:"\xE2\xA9\xBB"},{k:"ltrPar;",v:"\xE2\xA6\x96"},{k:"ltri;",v:"\xE2\x97\x83"},{k:"ltrie;",v:"\xE2\x8A\xB4"},{k:"ltrif;",v:"\xE2\x97\x82"},{k:"lurdshar;",v:"\xE2\xA5\x8A"},{k:"luruhar;",v:"\xE2\xA5\xA6"},{k:"lvertneqq;",v:"\xE2\x89\xA8\xEF\xB8\x80"},{k:"lvnE;",v:"\xE2\x89\xA8\xEF\xB8\x80"},{k:"mDDot;",v:"\xE2\x88\xBA"},{k:"macr;",v:"\xC2\xAF"},{k:"male;",v:"\xE2\x99\x82"},{k:"malt;",v:"\xE2\x9C\xA0"},{k:"maltese;",v:"\xE2\x9C\xA0"},{k:"map;",v:"\xE2\x86\xA6"},{k:"mapsto;",v:"\xE2\x86\xA6"},{k:"mapstodown;",v:"\xE2\x86\xA7"},{k:"mapstoleft;",v:"\xE2\x86\xA4"},{k:"mapstoup;",v:"\xE2\x86\xA5"},{k:"marker;",v:"\xE2\x96\xAE"},{k:"mcomma;",v:"\xE2\xA8\xA9"},{k:"mcy;",v:"\xD0\xBC"},{k:"mdash;",v:"\xE2\x80\x94"},{k:"measuredangle;",v:"\xE2\x88\xA1"},{k:"mfr;",v:"\xF0\x9D\x94\xAA"},{k:"mho;",v:"\xE2\x84\xA7"},{k:"micro;",v:"\xC2\xB5"},{k:"mid;",v:"\xE2\x88\xA3"},{k:"midast;",v:"*"},{k:"midcir;",v:"\xE2\xAB\xB0"},{k:"middot;",v:"\xC2\xB7"},{k:"minus;",v:"\xE2\x88\x92"},{k:"minusb;",v:"\xE2\x8A\x9F"},{k:"minusd;",v:"\xE2\x88\xB8"},{k:"minusdu;",v:"\xE2\xA8\xAA"},{k:"mlcp;",v:"\xE2\xAB\x9B"},{k:"mldr;",v:"\xE2\x80\xA6"},{k:"mnplus;",v:"\xE2\x88\x93"},{k:"models;",v:"\xE2\x8A\xA7"},{k:"mopf;",v:"\xF0\x9D\x95\x9E"},{k:"mp;",v:"\xE2\x88\x93"},{k:"mscr;",v:"\xF0\x9D\x93\x82"},{k:"mstpos;",v:"\xE2\x88\xBE"},{k:"mu;",v:"\xCE\xBC"},{k:"multimap;",v:"\xE2\x8A\xB8"},{k:"mumap;",v:"\xE2\x8A\xB8"},{k:"nGg;",v:"\xE2\x8B\x99\xCC\xB8"},{k:"nGt;",v:"\xE2\x89\xAB\xE2\x83\x92"},{k:"nGtv;",v:"\xE2\x89\xAB\xCC\xB8"},{k:"nLeftarrow;",v:"\xE2\x87\x8D"},{k:"nLeftrightarrow;",v:"\xE2\x87\x8E"},{k:"nLl;",v:"\xE2\x8B\x98\xCC\xB8"},{k:"nLt;",v:"\xE2\x89\xAA\xE2\x83\x92"},{k:"nLtv;",v:"\xE2\x89\xAA\xCC\xB8"},{k:"nRightarrow;",v:"\xE2\x87\x8F"},{k:"nVDash;",v:"\xE2\x8A\xAF"},{k:"nVdash;",v:"\xE2\x8A\xAE"},{k:"nabla;",v:"\xE2\x88\x87"},{k:"nacute;",v:"\xC5\x84"},{k:"nang;",v:"\xE2\x88\xA0\xE2\x83\x92"},{k:"nap;",v:"\xE2\x89\x89"},{k:"napE;",v:"\xE2\xA9\xB0\xCC\xB8"},{k:"napid;",v:"\xE2\x89\x8B\xCC\xB8"},{k:"napos;",v:"\xC5\x89"},{k:"napprox;",v:"\xE2\x89\x89"},{k:"natur;",v:"\xE2\x99\xAE"},{k:"natural;",v:"\xE2\x99\xAE"},{k:"naturals;",v:"\xE2\x84\x95"},{k:"nbsp;",v:"\xC2\xA0"},{k:"nbump;",v:"\xE2\x89\x8E\xCC\xB8"},{k:"nbumpe;",v:"\xE2\x89\x8F\xCC\xB8"},{k:"ncap;",v:"\xE2\xA9\x83"},{k:"ncaron;",v:"\xC5\x88"},{k:"ncedil;",v:"\xC5\x86"},{k:"ncong;",v:"\xE2\x89\x87"},{k:"ncongdot;",v:"\xE2\xA9\xAD\xCC\xB8"},{k:"ncup;",v:"\xE2\xA9\x82"},{k:"ncy;",v:"\xD0\xBD"},{k:"ndash;",v:"\xE2\x80\x93"},{k:"ne;",v:"\xE2\x89\xA0"},{k:"neArr;",v:"\xE2\x87\x97"},{k:"nearhk;",v:"\xE2\xA4\xA4"},{k:"nearr;",v:"\xE2\x86\x97"},{k:"nearrow;",v:"\xE2\x86\x97"},{k:"nedot;",v:"\xE2\x89\x90\xCC\xB8"},{k:"nequiv;",v:"\xE2\x89\xA2"},{k:"nesear;",v:"\xE2\xA4\xA8"},{k:"nesim;",v:"\xE2\x89\x82\xCC\xB8"},{k:"nexist;",v:"\xE2\x88\x84"},{k:"nexists;",v:"\xE2\x88\x84"},{k:"nfr;",v:"\xF0\x9D\x94\xAB"},{k:"ngE;",v:"\xE2\x89\xA7\xCC\xB8"},{k:"nge;",v:"\xE2\x89\xB1"},{k:"ngeq;",v:"\xE2\x89\xB1"},{k:"ngeqq;",v:"\xE2\x89\xA7\xCC\xB8"},{k:"ngeqslant;",v:"\xE2\xA9\xBE\xCC\xB8"},{k:"nges;",v:"\xE2\xA9\xBE\xCC\xB8"},{k:"ngsim;",v:"\xE2\x89\xB5"},{k:"ngt;",v:"\xE2\x89\xAF"},{k:"ngtr;",v:"\xE2\x89\xAF"},{k:"nhArr;",v:"\xE2\x87\x8E"},{k:"nharr;",v:"\xE2\x86\xAE"},{k:"nhpar;",v:"\xE2\xAB\xB2"},{k:"ni;",v:"\xE2\x88\x8B"},{k:"nis;",v:"\xE2\x8B\xBC"},{k:"nisd;",v:"\xE2\x8B\xBA"},{k:"niv;",v:"\xE2\x88\x8B"},{k:"njcy;",v:"\xD1\x9A"},{k:"nlArr;",v:"\xE2\x87\x8D"},{k:"nlE;",v:"\xE2\x89\xA6\xCC\xB8"},{k:"nlarr;",v:"\xE2\x86\x9A"},{k:"nldr;",v:"\xE2\x80\xA5"},{k:"nle;",v:"\xE2\x89\xB0"},{k:"nleftarrow;",v:"\xE2\x86\x9A"},{k:"nleftrightarrow;",v:"\xE2\x86\xAE"},{k:"nleq;",v:"\xE2\x89\xB0"},{k:"nleqq;",v:"\xE2\x89\xA6\xCC\xB8"},{k:"nleqslant;",v:"\xE2\xA9\xBD\xCC\xB8"},{k:"nles;",v:"\xE2\xA9\xBD\xCC\xB8"},{k:"nless;",v:"\xE2\x89\xAE"},{k:"nlsim;",v:"\xE2\x89\xB4"},{k:"nlt;",v:"\xE2\x89\xAE"},{k:"nltri;",v:"\xE2\x8B\xAA"},{k:"nltrie;",v:"\xE2\x8B\xAC"},{k:"nmid;",v:"\xE2\x88\xA4"},{k:"nopf;",v:"\xF0\x9D\x95\x9F"},{k:"not;",v:"\xC2\xAC"},{k:"notin;",v:"\xE2\x88\x89"},{k:"notinE;",v:"\xE2\x8B\xB9\xCC\xB8"},{k:"notindot;",v:"\xE2\x8B\xB5\xCC\xB8"},{k:"notinva;",v:"\xE2\x88\x89"},{k:"notinvb;",v:"\xE2\x8B\xB7"},{k:"notinvc;",v:"\xE2\x8B\xB6"},{k:"notni;",v:"\xE2\x88\x8C"},{k:"notniva;",v:"\xE2\x88\x8C"},{k:"notnivb;",v:"\xE2\x8B\xBE"},{k:"notnivc;",v:"\xE2\x8B\xBD"},{k:"npar;",v:"\xE2\x88\xA6"},{k:"nparallel;",v:"\xE2\x88\xA6"},{k:"nparsl;",v:"\xE2\xAB\xBD\xE2\x83\xA5"},{k:"npart;",v:"\xE2\x88\x82\xCC\xB8"},{k:"npolint;",v:"\xE2\xA8\x94"},{k:"npr;",v:"\xE2\x8A\x80"},{k:"nprcue;",v:"\xE2\x8B\xA0"},{k:"npre;",v:"\xE2\xAA\xAF\xCC\xB8"},{k:"nprec;",v:"\xE2\x8A\x80"},{k:"npreceq;",v:"\xE2\xAA\xAF\xCC\xB8"},{k:"nrArr;",v:"\xE2\x87\x8F"},{k:"nrarr;",v:"\xE2\x86\x9B"},{k:"nrarrc;",v:"\xE2\xA4\xB3\xCC\xB8"},{k:"nrarrw;",v:"\xE2\x86\x9D\xCC\xB8"},{k:"nrightarrow;",v:"\xE2\x86\x9B"},{k:"nrtri;",v:"\xE2\x8B\xAB"},{k:"nrtrie;",v:"\xE2\x8B\xAD"},{k:"nsc;",v:"\xE2\x8A\x81"},{k:"nsccue;",v:"\xE2\x8B\xA1"},{k:"nsce;",v:"\xE2\xAA\xB0\xCC\xB8"},{k:"nscr;",v:"\xF0\x9D\x93\x83"},{k:"nshortmid;",v:"\xE2\x88\xA4"},{k:"nshortparallel;",v:"\xE2\x88\xA6"},{k:"nsim;",v:"\xE2\x89\x81"},{k:"nsime;",v:"\xE2\x89\x84"},{k:"nsimeq;",v:"\xE2\x89\x84"},{k:"nsmid;",v:"\xE2\x88\xA4"},{k:"nspar;",v:"\xE2\x88\xA6"},{k:"nsqsube;",v:"\xE2\x8B\xA2"},{k:"nsqsupe;",v:"\xE2\x8B\xA3"},{k:"nsub;",v:"\xE2\x8A\x84"},{k:"nsubE;",v:"\xE2\xAB\x85\xCC\xB8"},{k:"nsube;",v:"\xE2\x8A\x88"},{k:"nsubset;",v:"\xE2\x8A\x82\xE2\x83\x92"},{k:"nsubseteq;",v:"\xE2\x8A\x88"},{k:"nsubseteqq;",v:"\xE2\xAB\x85\xCC\xB8"},{k:"nsucc;",v:"\xE2\x8A\x81"},{k:"nsucceq;",v:"\xE2\xAA\xB0\xCC\xB8"},{k:"nsup;",v:"\xE2\x8A\x85"},{k:"nsupE;",v:"\xE2\xAB\x86\xCC\xB8"},{k:"nsupe;",v:"\xE2\x8A\x89"},{k:"nsupset;",v:"\xE2\x8A\x83\xE2\x83\x92"},{k:"nsupseteq;",v:"\xE2\x8A\x89"},{k:"nsupseteqq;",v:"\xE2\xAB\x86\xCC\xB8"},{k:"ntgl;",v:"\xE2\x89\xB9"},{k:"ntilde;",v:"\xC3\xB1"},{k:"ntlg;",v:"\xE2\x89\xB8"},{k:"ntriangleleft;",v:"\xE2\x8B\xAA"},{k:"ntrianglelefteq;",v:"\xE2\x8B\xAC"},{k:"ntriangleright;",v:"\xE2\x8B\xAB"},{k:"ntrianglerighteq;",v:"\xE2\x8B\xAD"},{k:"nu;",v:"\xCE\xBD"},{k:"num;",v:"#"},{k:"numero;",v:"\xE2\x84\x96"},{k:"numsp;",v:"\xE2\x80\x87"},{k:"nvDash;",v:"\xE2\x8A\xAD"},{k:"nvHarr;",v:"\xE2\xA4\x84"},{k:"nvap;",v:"\xE2\x89\x8D\xE2\x83\x92"},{k:"nvdash;",v:"\xE2\x8A\xAC"},{k:"nvge;",v:"\xE2\x89\xA5\xE2\x83\x92"},{k:"nvgt;",v:">\xE2\x83\x92"},{k:"nvinfin;",v:"\xE2\xA7\x9E"},{k:"nvlArr;",v:"\xE2\xA4\x82"},{k:"nvle;",v:"\xE2\x89\xA4\xE2\x83\x92"},{k:"nvlt;",v:"<\xE2\x83\x92"},{k:"nvltrie;",v:"\xE2\x8A\xB4\xE2\x83\x92"},{k:"nvrArr;",v:"\xE2\xA4\x83"},{k:"nvrtrie;",v:"\xE2\x8A\xB5\xE2\x83\x92"},{k:"nvsim;",v:"\xE2\x88\xBC\xE2\x83\x92"},{k:"nwArr;",v:"\xE2\x87\x96"},{k:"nwarhk;",v:"\xE2\xA4\xA3"},{k:"nwarr;",v:"\xE2\x86\x96"},{k:"nwarrow;",v:"\xE2\x86\x96"},{k:"nwnear;",v:"\xE2\xA4\xA7"},{k:"oS;",v:"\xE2\x93\x88"},{k:"oacute;",v:"\xC3\xB3"},{k:"oast;",v:"\xE2\x8A\x9B"},{k:"ocir;",v:"\xE2\x8A\x9A"},{k:"ocirc;",v:"\xC3\xB4"},{k:"ocy;",v:"\xD0\xBE"},{k:"odash;",v:"\xE2\x8A\x9D"},{k:"odblac;",v:"\xC5\x91"},{k:"odiv;",v:"\xE2\xA8\xB8"},{k:"odot;",v:"\xE2\x8A\x99"},{k:"odsold;",v:"\xE2\xA6\xBC"},{k:"oelig;",v:"\xC5\x93"},{k:"ofcir;",v:"\xE2\xA6\xBF"},{k:"ofr;",v:"\xF0\x9D\x94\xAC"},{k:"ogon;",v:"\xCB\x9B"},{k:"ograve;",v:"\xC3\xB2"},{k:"ogt;",v:"\xE2\xA7\x81"},{k:"ohbar;",v:"\xE2\xA6\xB5"},{k:"ohm;",v:"\xCE\xA9"},{k:"oint;",v:"\xE2\x88\xAE"},{k:"olarr;",v:"\xE2\x86\xBA"},{k:"olcir;",v:"\xE2\xA6\xBE"},{k:"olcross;",v:"\xE2\xA6\xBB"},{k:"oline;",v:"\xE2\x80\xBE"},{k:"olt;",v:"\xE2\xA7\x80"},{k:"omacr;",v:"\xC5\x8D"},{k:"omega;",v:"\xCF\x89"},{k:"omicron;",v:"\xCE\xBF"},{k:"omid;",v:"\xE2\xA6\xB6"},{k:"ominus;",v:"\xE2\x8A\x96"},{k:"oopf;",v:"\xF0\x9D\x95\xA0"},{k:"opar;",v:"\xE2\xA6\xB7"},{k:"operp;",v:"\xE2\xA6\xB9"},{k:"oplus;",v:"\xE2\x8A\x95"},{k:"or;",v:"\xE2\x88\xA8"},{k:"orarr;",v:"\xE2\x86\xBB"},{k:"ord;",v:"\xE2\xA9\x9D"},{k:"order;",v:"\xE2\x84\xB4"},{k:"orderof;",v:"\xE2\x84\xB4"},{k:"ordf;",v:"\xC2\xAA"},{k:"ordm;",v:"\xC2\xBA"},{k:"origof;",v:"\xE2\x8A\xB6"},{k:"oror;",v:"\xE2\xA9\x96"},{k:"orslope;",v:"\xE2\xA9\x97"},{k:"orv;",v:"\xE2\xA9\x9B"},{k:"oscr;",v:"\xE2\x84\xB4"},{k:"oslash;",v:"\xC3\xB8"},{k:"osol;",v:"\xE2\x8A\x98"},{k:"otilde;",v:"\xC3\xB5"},{k:"otimes;",v:"\xE2\x8A\x97"},{k:"otimesas;",v:"\xE2\xA8\xB6"},{k:"ouml;",v:"\xC3\xB6"},{k:"ovbar;",v:"\xE2\x8C\xBD"},{k:"par;",v:"\xE2\x88\xA5"},{k:"para;",v:"\xC2\xB6"},{k:"parallel;",v:"\xE2\x88\xA5"},{k:"parsim;",v:"\xE2\xAB\xB3"},{k:"parsl;",v:"\xE2\xAB\xBD"},{k:"part;",v:"\xE2\x88\x82"},{k:"pcy;",v:"\xD0\xBF"},{k:"percnt;",v:"%"},{k:"period;",v:"."},{k:"permil;",v:"\xE2\x80\xB0"},{k:"perp;",v:"\xE2\x8A\xA5"},{k:"pertenk;",v:"\xE2\x80\xB1"},{k:"pfr;",v:"\xF0\x9D\x94\xAD"},{k:"phi;",v:"\xCF\x86"},{k:"phiv;",v:"\xCF\x95"},{k:"phmmat;",v:"\xE2\x84\xB3"},{k:"phone;",v:"\xE2\x98\x8E"},{k:"pi;",v:"\xCF\x80"},{k:"pitchfork;",v:"\xE2\x8B\x94"},{k:"piv;",v:"\xCF\x96"},{k:"planck;",v:"\xE2\x84\x8F"},{k:"planckh;",v:"\xE2\x84\x8E"},{k:"plankv;",v:"\xE2\x84\x8F"},{k:"plus;",v:"+"},{k:"plusacir;",v:"\xE2\xA8\xA3"},{k:"plusb;",v:"\xE2\x8A\x9E"},{k:"pluscir;",v:"\xE2\xA8\xA2"},{k:"plusdo;",v:"\xE2\x88\x94"},{k:"plusdu;",v:"\xE2\xA8\xA5"},{k:"pluse;",v:"\xE2\xA9\xB2"},{k:"plusmn;",v:"\xC2\xB1"},{k:"plussim;",v:"\xE2\xA8\xA6"},{k:"plustwo;",v:"\xE2\xA8\xA7"},{k:"pm;",v:"\xC2\xB1"},{k:"pointint;",v:"\xE2\xA8\x95"},{k:"popf;",v:"\xF0\x9D\x95\xA1"},{k:"pound;",v:"\xC2\xA3"},{k:"pr;",v:"\xE2\x89\xBA"},{k:"prE;",v:"\xE2\xAA\xB3"},{k:"prap;",v:"\xE2\xAA\xB7"},{k:"prcue;",v:"\xE2\x89\xBC"},{k:"pre;",v:"\xE2\xAA\xAF"},{k:"prec;",v:"\xE2\x89\xBA"},{k:"precapprox;",v:"\xE2\xAA\xB7"},{k:"preccurlyeq;",v:"\xE2\x89\xBC"},{k:"preceq;",v:"\xE2\xAA\xAF"},{k:"precnapprox;",v:"\xE2\xAA\xB9"},{k:"precneqq;",v:"\xE2\xAA\xB5"},{k:"precnsim;",v:"\xE2\x8B\xA8"},{k:"precsim;",v:"\xE2\x89\xBE"},{k:"prime;",v:"\xE2\x80\xB2"},{k:"primes;",v:"\xE2\x84\x99"},{k:"prnE;",v:"\xE2\xAA\xB5"},{k:"prnap;",v:"\xE2\xAA\xB9"},{k:"prnsim;",v:"\xE2\x8B\xA8"},{k:"prod;",v:"\xE2\x88\x8F"},{k:"profalar;",v:"\xE2\x8C\xAE"},{k:"profline;",v:"\xE2\x8C\x92"},{k:"profsurf;",v:"\xE2\x8C\x93"},{k:"prop;",v:"\xE2\x88\x9D"},{k:"propto;",v:"\xE2\x88\x9D"},{k:"prsim;",v:"\xE2\x89\xBE"},{k:"prurel;",v:"\xE2\x8A\xB0"},{k:"pscr;",v:"\xF0\x9D\x93\x85"},{k:"psi;",v:"\xCF\x88"},{k:"puncsp;",v:"\xE2\x80\x88"},{k:"qfr;",v:"\xF0\x9D\x94\xAE"},{k:"qint;",v:"\xE2\xA8\x8C"},{k:"qopf;",v:"\xF0\x9D\x95\xA2"},{k:"qprime;",v:"\xE2\x81\x97"},{k:"qscr;",v:"\xF0\x9D\x93\x86"},{k:"quaternions;",v:"\xE2\x84\x8D"},{k:"quatint;",v:"\xE2\xA8\x96"},{k:"quest;",v:"?"},{k:"questeq;",v:"\xE2\x89\x9F"},{k:"quot;",v:"\""},{k:"rAarr;",v:"\xE2\x87\x9B"},{k:"rArr;",v:"\xE2\x87\x92"},{k:"rAtail;",v:"\xE2\xA4\x9C"},{k:"rBarr;",v:"\xE2\xA4\x8F"},{k:"rHar;",v:"\xE2\xA5\xA4"},{k:"race;",v:"\xE2\x88\xBD\xCC\xB1"},{k:"racute;",v:"\xC5\x95"},{k:"radic;",v:"\xE2\x88\x9A"},{k:"raemptyv;",v:"\xE2\xA6\xB3"},{k:"rang;",v:"\xE2\x9F\xA9"},{k:"rangd;",v:"\xE2\xA6\x92"},{k:"range;",v:"\xE2\xA6\xA5"},{k:"rangle;",v:"\xE2\x9F\xA9"},{k:"raquo;",v:"\xC2\xBB"},{k:"rarr;",v:"\xE2\x86\x92"},{k:"rarrap;",v:"\xE2\xA5\xB5"},{k:"rarrb;",v:"\xE2\x87\xA5"},{k:"rarrbfs;",v:"\xE2\xA4\xA0"},{k:"rarrc;",v:"\xE2\xA4\xB3"},{k:"rarrfs;",v:"\xE2\xA4\x9E"},{k:"rarrhk;",v:"\xE2\x86\xAA"},{k:"rarrlp;",v:"\xE2\x86\xAC"},{k:"rarrpl;",v:"\xE2\xA5\x85"},{k:"rarrsim;",v:"\xE2\xA5\xB4"},{k:"rarrtl;",v:"\xE2\x86\xA3"},{k:"rarrw;",v:"\xE2\x86\x9D"},{k:"ratail;",v:"\xE2\xA4\x9A"},{k:"ratio;",v:"\xE2\x88\xB6"},{k:"rationals;",v:"\xE2\x84\x9A"},{k:"rbarr;",v:"\xE2\xA4\x8D"},{k:"rbbrk;",v:"\xE2\x9D\xB3"},{k:"rbrace;",v:"}"},{k:"rbrack;",v:"]"},{k:"rbrke;",v:"\xE2\xA6\x8C"},{k:"rbrksld;",v:"\xE2\xA6\x8E"},{k:"rbrkslu;",v:"\xE2\xA6\x90"},{k:"rcaron;",v:"\xC5\x99"},{k:"rcedil;",v:"\xC5\x97"},{k:"rceil;",v:"\xE2\x8C\x89"},{k:"rcub;",v:"}"},{k:"rcy;",v:"\xD1\x80"},{k:"rdca;",v:"\xE2\xA4\xB7"},{k:"rdldhar;",v:"\xE2\xA5\xA9"},{k:"rdquo;",v:"\xE2\x80\x9D"},{k:"rdquor;",v:"\xE2\x80\x9D"},{k:"rdsh;",v:"\xE2\x86\xB3"},{k:"real;",v:"\xE2\x84\x9C"},{k:"realine;",v:"\xE2\x84\x9B"},{k:"realpart;",v:"\xE2\x84\x9C"},{k:"reals;",v:"\xE2\x84\x9D"},{k:"rect;",v:"\xE2\x96\xAD"},{k:"reg;",v:"\xC2\xAE"},{k:"rfisht;",v:"\xE2\xA5\xBD"},{k:"rfloor;",v:"\xE2\x8C\x8B"},{k:"rfr;",v:"\xF0\x9D\x94\xAF"},{k:"rhard;",v:"\xE2\x87\x81"},{k:"rharu;",v:"\xE2\x87\x80"},{k:"rharul;",v:"\xE2\xA5\xAC"},{k:"rho;",v:"\xCF\x81"},{k:"rhov;",v:"\xCF\xB1"},{k:"rightarrow;",v:"\xE2\x86\x92"},{k:"rightarrowtail;",v:"\xE2\x86\xA3"},{k:"rightharpoondown;",v:"\xE2\x87\x81"},{k:"rightharpoonup;",v:"\xE2\x87\x80"},{k:"rightleftarrows;",v:"\xE2\x87\x84"},{k:"rightleftharpoons;",v:"\xE2\x87\x8C"},{k:"rightrightarrows;",v:"\xE2\x87\x89"},{k:"rightsquigarrow;",v:"\xE2\x86\x9D"},{k:"rightthreetimes;",v:"\xE2\x8B\x8C"},{k:"ring;",v:"\xCB\x9A"},{k:"risingdotseq;",v:"\xE2\x89\x93"},{k:"rlarr;",v:"\xE2\x87\x84"},{k:"rlhar;",v:"\xE2\x87\x8C"},{k:"rlm;",v:"\xE2\x80\x8F"},{k:"rmoust;",v:"\xE2\x8E\xB1"},{k:"rmoustache;",v:"\xE2\x8E\xB1"},{k:"rnmid;",v:"\xE2\xAB\xAE"},{k:"roang;",v:"\xE2\x9F\xAD"},{k:"roarr;",v:"\xE2\x87\xBE"},{k:"robrk;",v:"\xE2\x9F\xA7"},{k:"ropar;",v:"\xE2\xA6\x86"},{k:"ropf;",v:"\xF0\x9D\x95\xA3"},{k:"roplus;",v:"\xE2\xA8\xAE"},{k:"rotimes;",v:"\xE2\xA8\xB5"},{k:"rpar;",v:")"},{k:"rpargt;",v:"\xE2\xA6\x94"},{k:"rppolint;",v:"\xE2\xA8\x92"},{k:"rrarr;",v:"\xE2\x87\x89"},{k:"rsaquo;",v:"\xE2\x80\xBA"},{k:"rscr;",v:"\xF0\x9D\x93\x87"},{k:"rsh;",v:"\xE2\x86\xB1"},{k:"rsqb;",v:"]"},{k:"rsquo;",v:"\xE2\x80\x99"},{k:"rsquor;",v:"\xE2\x80\x99"},{k:"rthree;",v:"\xE2\x8B\x8C"},{k:"rtimes;",v:"\xE2\x8B\x8A"},{k:"rtri;",v:"\xE2\x96\xB9"},{k:"rtrie;",v:"\xE2\x8A\xB5"},{k:"rtrif;",v:"\xE2\x96\xB8"},{k:"rtriltri;",v:"\xE2\xA7\x8E"},{k:"ruluhar;",v:"\xE2\xA5\xA8"},{k:"rx;",v:"\xE2\x84\x9E"},{k:"sacute;",v:"\xC5\x9B"},{k:"sbquo;",v:"\xE2\x80\x9A"},{k:"sc;",v:"\xE2\x89\xBB"},{k:"scE;",v:"\xE2\xAA\xB4"},{k:"scap;",v:"\xE2\xAA\xB8"},{k:"scaron;",v:"\xC5\xA1"},{k:"sccue;",v:"\xE2\x89\xBD"},{k:"sce;",v:"\xE2\xAA\xB0"},{k:"scedil;",v:"\xC5\x9F"},{k:"scirc;",v:"\xC5\x9D"},{k:"scnE;",v:"\xE2\xAA\xB6"},{k:"scnap;",v:"\xE2\xAA\xBA"},{k:"scnsim;",v:"\xE2\x8B\xA9"},{k:"scpolint;",v:"\xE2\xA8\x93"},{k:"scsim;",v:"\xE2\x89\xBF"},{k:"scy;",v:"\xD1\x81"},{k:"sdot;",v:"\xE2\x8B\x85"},{k:"sdotb;",v:"\xE2\x8A\xA1"},{k:"sdote;",v:"\xE2\xA9\xA6"},{k:"seArr;",v:"\xE2\x87\x98"},{k:"searhk;",v:"\xE2\xA4\xA5"},{k:"searr;",v:"\xE2\x86\x98"},{k:"searrow;",v:"\xE2\x86\x98"},{k:"sect;",v:"\xC2\xA7"},{k:"semi;",v:";"},{k:"seswar;",v:"\xE2\xA4\xA9"},{k:"setminus;",v:"\xE2\x88\x96"},{k:"setmn;",v:"\xE2\x88\x96"},{k:"sext;",v:"\xE2\x9C\xB6"},{k:"sfr;",v:"\xF0\x9D\x94\xB0"},{k:"sfrown;",v:"\xE2\x8C\xA2"},{k:"sharp;",v:"\xE2\x99\xAF"},{k:"shchcy;",v:"\xD1\x89"},{k:"shcy;",v:"\xD1\x88"},{k:"shortmid;",v:"\xE2\x88\xA3"},{k:"shortparallel;",v:"\xE2\x88\xA5"},{k:"shy;",v:"\xC2\xAD"},{k:"sigma;",v:"\xCF\x83"},{k:"sigmaf;",v:"\xCF\x82"},{k:"sigmav;",v:"\xCF\x82"},{k:"sim;",v:"\xE2\x88\xBC"},{k:"simdot;",v:"\xE2\xA9\xAA"},{k:"sime;",v:"\xE2\x89\x83"},{k:"simeq;",v:"\xE2\x89\x83"},{k:"simg;",v:"\xE2\xAA\x9E"},{k:"simgE;",v:"\xE2\xAA\xA0"},{k:"siml;",v:"\xE2\xAA\x9D"},{k:"simlE;",v:"\xE2\xAA\x9F"},{k:"simne;",v:"\xE2\x89\x86"},{k:"simplus;",v:"\xE2\xA8\xA4"},{k:"simrarr;",v:"\xE2\xA5\xB2"},{k:"slarr;",v:"\xE2\x86\x90"},{k:"smallsetminus;",v:"\xE2\x88\x96"},{k:"smashp;",v:"\xE2\xA8\xB3"},{k:"smeparsl;",v:"\xE2\xA7\xA4"},{k:"smid;",v:"\xE2\x88\xA3"},{k:"smile;",v:"\xE2\x8C\xA3"},{k:"smt;",v:"\xE2\xAA\xAA"},{k:"smte;",v:"\xE2\xAA\xAC"},{k:"smtes;",v:"\xE2\xAA\xAC\xEF\xB8\x80"},{k:"softcy;",v:"\xD1\x8C"},{k:"sol;",v:"/"},{k:"solb;",v:"\xE2\xA7\x84"},{k:"solbar;",v:"\xE2\x8C\xBF"},{k:"sopf;",v:"\xF0\x9D\x95\xA4"},{k:"spades;",v:"\xE2\x99\xA0"},{k:"spadesuit;",v:"\xE2\x99\xA0"},{k:"spar;",v:"\xE2\x88\xA5"},{k:"sqcap;",v:"\xE2\x8A\x93"},{k:"sqcaps;",v:"\xE2\x8A\x93\xEF\xB8\x80"},{k:"sqcup;",v:"\xE2\x8A\x94"},{k:"sqcups;",v:"\xE2\x8A\x94\xEF\xB8\x80"},{k:"sqsub;",v:"\xE2\x8A\x8F"},{k:"sqsube;",v:"\xE2\x8A\x91"},{k:"sqsubset;",v:"\xE2\x8A\x8F"},{k:"sqsubseteq;",v:"\xE2\x8A\x91"},{k:"sqsup;",v:"\xE2\x8A\x90"},{k:"sqsupe;",v:"\xE2\x8A\x92"},{k:"sqsupset;",v:"\xE2\x8A\x90"},{k:"sqsupseteq;",v:"\xE2\x8A\x92"},{k:"squ;",v:"\xE2\x96\xA1"},{k:"square;",v:"\xE2\x96\xA1"},{k:"squarf;",v:"\xE2\x96\xAA"},{k:"squf;",v:"\xE2\x96\xAA"},{k:"srarr;",v:"\xE2\x86\x92"},{k:"sscr;",v:"\xF0\x9D\x93\x88"},{k:"ssetmn;",v:"\xE2\x88\x96"},{k:"ssmile;",v:"\xE2\x8C\xA3"},{k:"sstarf;",v:"\xE2\x8B\x86"},{k:"star;",v:"\xE2\x98\x86"},{k:"starf;",v:"\xE2\x98\x85"},{k:"straightepsilon;",v:"\xCF\xB5"},{k:"straightphi;",v:"\xCF\x95"},{k:"strns;",v:"\xC2\xAF"},{k:"sub;",v:"\xE2\x8A\x82"},{k:"subE;",v:"\xE2\xAB\x85"},{k:"subdot;",v:"\xE2\xAA\xBD"},{k:"sube;",v:"\xE2\x8A\x86"},{k:"subedot;",v:"\xE2\xAB\x83"},{k:"submult;",v:"\xE2\xAB\x81"},{k:"subnE;",v:"\xE2\xAB\x8B"},{k:"subne;",v:"\xE2\x8A\x8A"},{k:"subplus;",v:"\xE2\xAA\xBF"},{k:"subrarr;",v:"\xE2\xA5\xB9"},{k:"subset;",v:"\xE2\x8A\x82"},{k:"subseteq;",v:"\xE2\x8A\x86"},{k:"subseteqq;",v:"\xE2\xAB\x85"},{k:"subsetneq;",v:"\xE2\x8A\x8A"},{k:"subsetneqq;",v:"\xE2\xAB\x8B"},{k:"subsim;",v:"\xE2\xAB\x87"},{k:"subsub;",v:"\xE2\xAB\x95"},{k:"subsup;",v:"\xE2\xAB\x93"},{k:"succ;",v:"\xE2\x89\xBB"},{k:"succapprox;",v:"\xE2\xAA\xB8"},{k:"succcurlyeq;",v:"\xE2\x89\xBD"},{k:"succeq;",v:"\xE2\xAA\xB0"},{k:"succnapprox;",v:"\xE2\xAA\xBA"},{k:"succneqq;",v:"\xE2\xAA\xB6"},{k:"succnsim;",v:"\xE2\x8B\xA9"},{k:"succsim;",v:"\xE2\x89\xBF"},{k:"sum;",v:"\xE2\x88\x91"},{k:"sung;",v:"\xE2\x99\xAA"},{k:"sup;",v:"\xE2\x8A\x83"},{k:"sup1;",v:"\xC2\xB9"},{k:"sup2;",v:"\xC2\xB2"},{k:"sup3;",v:"\xC2\xB3"},{k:"supE;",v:"\xE2\xAB\x86"},{k:"supdot;",v:"\xE2\xAA\xBE"},{k:"supdsub;",v:"\xE2\xAB\x98"},{k:"supe;",v:"\xE2\x8A\x87"},{k:"supedot;",v:"\xE2\xAB\x84"},{k:"suphsol;",v:"\xE2\x9F\x89"},{k:"suphsub;",v:"\xE2\xAB\x97"},{k:"suplarr;",v:"\xE2\xA5\xBB"},{k:"supmult;",v:"\xE2\xAB\x82"},{k:"supnE;",v:"\xE2\xAB\x8C"},{k:"supne;",v:"\xE2\x8A\x8B"},{k:"supplus;",v:"\xE2\xAB\x80"},{k:"supset;",v:"\xE2\x8A\x83"},{k:"supseteq;",v:"\xE2\x8A\x87"},{k:"supseteqq;",v:"\xE2\xAB\x86"},{k:"supsetneq;",v:"\xE2\x8A\x8B"},{k:"supsetneqq;",v:"\xE2\xAB\x8C"},{k:"supsim;",v:"\xE2\xAB\x88"},{k:"supsub;",v:"\xE2\xAB\x94"},{k:"supsup;",v:"\xE2\xAB\x96"},{k:"swArr;",v:"\xE2\x87\x99"},{k:"swarhk;",v:"\xE2\xA4\xA6"},{k:"swarr;",v:"\xE2\x86\x99"},{k:"swarrow;",v:"\xE2\x86\x99"},{k:"swnwar;",v:"\xE2\xA4\xAA"},{k:"szlig;",v:"\xC3\x9F"},{k:"target;",v:"\xE2\x8C\x96"},{k:"tau;",v:"\xCF\x84"},{k:"tbrk;",v:"\xE2\x8E\xB4"},{k:"tcaron;",v:"\xC5\xA5"},{k:"tcedil;",v:"\xC5\xA3"},{k:"tcy;",v:"\xD1\x82"},{k:"tdot;",v:"\xE2\x83\x9B"},{k:"telrec;",v:"\xE2\x8C\x95"},{k:"tfr;",v:"\xF0\x9D\x94\xB1"},{k:"there4;",v:"\xE2\x88\xB4"},{k:"therefore;",v:"\xE2\x88\xB4"},{k:"theta;",v:"\xCE\xB8"},{k:"thetasym;",v:"\xCF\x91"},{k:"thetav;",v:"\xCF\x91"},{k:"thickapprox;",v:"\xE2\x89\x88"},{k:"thicksim;",v:"\xE2\x88\xBC"},{k:"thinsp;",v:"\xE2\x80\x89"},{k:"thkap;",v:"\xE2\x89\x88"},{k:"thksim;",v:"\xE2\x88\xBC"},{k:"thorn;",v:"\xC3\xBE"},{k:"tilde;",v:"\xCB\x9C"},{k:"times;",v:"\xC3\x97"},{k:"timesb;",v:"\xE2\x8A\xA0"},{k:"timesbar;",v:"\xE2\xA8\xB1"},{k:"timesd;",v:"\xE2\xA8\xB0"},{k:"tint;",v:"\xE2\x88\xAD"},{k:"toea;",v:"\xE2\xA4\xA8"},{k:"top;",v:"\xE2\x8A\xA4"},{k:"topbot;",v:"\xE2\x8C\xB6"},{k:"topcir;",v:"\xE2\xAB\xB1"},{k:"topf;",v:"\xF0\x9D\x95\xA5"},{k:"topfork;",v:"\xE2\xAB\x9A"},{k:"tosa;",v:"\xE2\xA4\xA9"},{k:"tprime;",v:"\xE2\x80\xB4"},{k:"trade;",v:"\xE2\x84\xA2"},{k:"triangle;",v:"\xE2\x96\xB5"},{k:"triangledown;",v:"\xE2\x96\xBF"},{k:"triangleleft;",v:"\xE2\x97\x83"},{k:"trianglelefteq;",v:"\xE2\x8A\xB4"},{k:"triangleq;",v:"\xE2\x89\x9C"},{k:"triangleright;",v:"\xE2\x96\xB9"},{k:"trianglerighteq;",v:"\xE2\x8A\xB5"},{k:"tridot;",v:"\xE2\x97\xAC"},{k:"trie;",v:"\xE2\x89\x9C"},{k:"triminus;",v:"\xE2\xA8\xBA"},{k:"triplus;",v:"\xE2\xA8\xB9"},{k:"trisb;",v:"\xE2\xA7\x8D"},{k:"tritime;",v:"\xE2\xA8\xBB"},{k:"trpezium;",v:"\xE2\x8F\xA2"},{k:"tscr;",v:"\xF0\x9D\x93\x89"},{k:"tscy;",v:"\xD1\x86"},{k:"tshcy;",v:"\xD1\x9B"},{k:"tstrok;",v:"\xC5\xA7"},{k:"twixt;",v:"\xE2\x89\xAC"},{k:"twoheadleftarrow;",v:"\xE2\x86\x9E"},{k:"twoheadrightarrow;",v:"\xE2\x86\xA0"},{k:"uArr;",v:"\xE2\x87\x91"},{k:"uHar;",v:"\xE2\xA5\xA3"},{k:"uacute;",v:"\xC3\xBA"},{k:"uarr;",v:"\xE2\x86\x91"},{k:"ubrcy;",v:"\xD1\x9E"},{k:"ubreve;",v:"\xC5\xAD"},{k:"ucirc;",v:"\xC3\xBB"},{k:"ucy;",v:"\xD1\x83"},{k:"udarr;",v:"\xE2\x87\x85"},{k:"udblac;",v:"\xC5\xB1"},{k:"udhar;",v:"\xE2\xA5\xAE"},{k:"ufisht;",v:"\xE2\xA5\xBE"},{k:"ufr;",v:"\xF0\x9D\x94\xB2"},{k:"ugrave;",v:"\xC3\xB9"},{k:"uharl;",v:"\xE2\x86\xBF"},{k:"uharr;",v:"\xE2\x86\xBE"},{k:"uhblk;",v:"\xE2\x96\x80"},{k:"ulcorn;",v:"\xE2\x8C\x9C"},{k:"ulcorner;",v:"\xE2\x8C\x9C"},{k:"ulcrop;",v:"\xE2\x8C\x8F"},{k:"ultri;",v:"\xE2\x97\xB8"},{k:"umacr;",v:"\xC5\xAB"},{k:"uml;",v:"\xC2\xA8"},{k:"uogon;",v:"\xC5\xB3"},{k:"uopf;",v:"\xF0\x9D\x95\xA6"},{k:"uparrow;",v:"\xE2\x86\x91"},{k:"updownarrow;",v:"\xE2\x86\x95"},{k:"upharpoonleft;",v:"\xE2\x86\xBF"},{k:"upharpoonright;",v:"\xE2\x86\xBE"},{k:"uplus;",v:"\xE2\x8A\x8E"},{k:"upsi;",v:"\xCF\x85"},{k:"upsih;",v:"\xCF\x92"},{k:"upsilon;",v:"\xCF\x85"},{k:"upuparrows;",v:"\xE2\x87\x88"},{k:"urcorn;",v:"\xE2\x8C\x9D"},{k:"urcorner;",v:"\xE2\x8C\x9D"},{k:"urcrop;",v:"\xE2\x8C\x8E"},{k:"uring;",v:"\xC5\xAF"},{k:"urtri;",v:"\xE2\x97\xB9"},{k:"uscr;",v:"\xF0\x9D\x93\x8A"},{k:"utdot;",v:"\xE2\x8B\xB0"},{k:"utilde;",v:"\xC5\xA9"},{k:"utri;",v:"\xE2\x96\xB5"},{k:"utrif;",v:"\xE2\x96\xB4"},{k:"uuarr;",v:"\xE2\x87\x88"},{k:"uuml;",v:"\xC3\xBC"},{k:"uwangle;",v:"\xE2\xA6\xA7"},{k:"vArr;",v:"\xE2\x87\x95"},{k:"vBar;",v:"\xE2\xAB\xA8"},{k:"vBarv;",v:"\xE2\xAB\xA9"},{k:"vDash;",v:"\xE2\x8A\xA8"},{k:"vangrt;",v:"\xE2\xA6\x9C"},{k:"varepsilon;",v:"\xCF\xB5"},{k:"varkappa;",v:"\xCF\xB0"},{k:"varnothing;",v:"\xE2\x88\x85"},{k:"varphi;",v:"\xCF\x95"},{k:"varpi;",v:"\xCF\x96"},{k:"varpropto;",v:"\xE2\x88\x9D"},{k:"varr;",v:"\xE2\x86\x95"},{k:"varrho;",v:"\xCF\xB1"},{k:"varsigma;",v:"\xCF\x82"},{k:"varsubsetneq;",v:"\xE2\x8A\x8A\xEF\xB8\x80"},{k:"varsubsetneqq;",v:"\xE2\xAB\x8B\xEF\xB8\x80"},{k:"varsupsetneq;",v:"\xE2\x8A\x8B\xEF\xB8\x80"},{k:"varsupsetneqq;",v:"\xE2\xAB\x8C\xEF\xB8\x80"},{k:"vartheta;",v:"\xCF\x91"},{k:"vartriangleleft;",v:"\xE2\x8A\xB2"},{k:"vartriangleright;",v:"\xE2\x8A\xB3"},{k:"vcy;",v:"\xD0\xB2"},{k:"vdash;",v:"\xE2\x8A\xA2"},{k:"vee;",v:"\xE2\x88\xA8"},{k:"veebar;",v:"\xE2\x8A\xBB"},{k:"veeeq;",v:"\xE2\x89\x9A"},{k:"vellip;",v:"\xE2\x8B\xAE"},{k:"verbar;",v:"|"},{k:"vert;",v:"|"},{k:"vfr;",v:"\xF0\x9D\x94\xB3"},{k:"vltri;",v:"\xE2\x8A\xB2"},{k:"vnsub;",v:"\xE2\x8A\x82\xE2\x83\x92"},{k:"vnsup;",v:"\xE2\x8A\x83\xE2\x83\x92"},{k:"vopf;",v:"\xF0\x9D\x95\xA7"},{k:"vprop;",v:"\xE2\x88\x9D"},{k:"vrtri;",v:"\xE2\x8A\xB3"},{k:"vscr;",v:"\xF0\x9D\x93\x8B"},{k:"vsubnE;",v:"\xE2\xAB\x8B\xEF\xB8\x80"},{k:"vsubne;",v:"\xE2\x8A\x8A\xEF\xB8\x80"},{k:"vsupnE;",v:"\xE2\xAB\x8C\xEF\xB8\x80"},{k:"vsupne;",v:"\xE2\x8A\x8B\xEF\xB8\x80"},{k:"vzigzag;",v:"\xE2\xA6\x9A"},{k:"wcirc;",v:"\xC5\xB5"},{k:"wedbar;",v:"\xE2\xA9\x9F"},{k:"wedge;",v:"\xE2\x88\xA7"},{k:"wedgeq;",v:"\xE2\x89\x99"},{k:"weierp;",v:"\xE2\x84\x98"},{k:"wfr;",v:"\xF0\x9D\x94\xB4"},{k:"wopf;",v:"\xF0\x9D\x95\xA8"},{k:"wp;",v:"\xE2\x84\x98"},{k:"wr;",v:"\xE2\x89\x80"},{k:"wreath;",v:"\xE2\x89\x80"},{k:"wscr;",v:"\xF0\x9D\x93\x8C"},{k:"xcap;",v:"\xE2\x8B\x82"},{k:"xcirc;",v:"\xE2\x97\xAF"},{k:"xcup;",v:"\xE2\x8B\x83"},{k:"xdtri;",v:"\xE2\x96\xBD"},{k:"xfr;",v:"\xF0\x9D\x94\xB5"},{k:"xhArr;",v:"\xE2\x9F\xBA"},{k:"xharr;",v:"\xE2\x9F\xB7"},{k:"xi;",v:"\xCE\xBE"},{k:"xlArr;",v:"\xE2\x9F\xB8"},{k:"xlarr;",v:"\xE2\x9F\xB5"},{k:"xmap;",v:"\xE2\x9F\xBC"},{k:"xnis;",v:"\xE2\x8B\xBB"},{k:"xodot;",v:"\xE2\xA8\x80"},{k:"xopf;",v:"\xF0\x9D\x95\xA9"},{k:"xoplus;",v:"\xE2\xA8\x81"},{k:"xotime;",v:"\xE2\xA8\x82"},{k:"xrArr;",v:"\xE2\x9F\xB9"},{k:"xrarr;",v:"\xE2\x9F\xB6"},{k:"xscr;",v:"\xF0\x9D\x93\x8D"},{k:"xsqcup;",v:"\xE2\xA8\x86"},{k:"xuplus;",v:"\xE2\xA8\x84"},{k:"xutri;",v:"\xE2\x96\xB3"},{k:"xvee;",v:"\xE2\x8B\x81"},{k:"xwedge;",v:"\xE2\x8B\x80"},{k:"yacute;",v:"\xC3\xBD"},{k:"yacy;",v:"\xD1\x8F"},{k:"ycirc;",v:"\xC5\xB7"},{k:"ycy;",v:"\xD1\x8B"},{k:"yen;",v:"\xC2\xA5"},{k:"yfr;",v:"\xF0\x9D\x94\xB6"},{k:"yicy;",v:"\xD1\x97"},{k:"yopf;",v:"\xF0\x9D\x95\xAA"},{k:"yscr;",v:"\xF0\x9D\x93\x8E"},{k:"yucy;",v:"\xD1\x8E"},{k:"yuml;",v:"\xC3\xBF"},{k:"zacute;",v:"\xC5\xBA"},{k:"zcaron;",v:"\xC5\xBE"},{k:"zcy;",v:"\xD0\xB7"},{k:"zdot;",v:"\xC5\xBC"},{k:"zeetrf;",v:"\xE2\x84\xA8"},{k:"zeta;",v:"\xCE\xB6"},{k:"zfr;",v:"\xF0\x9D\x94\xB7"},{k:"zhcy;",v:"\xD0\xB6"},{k:"zigrarr;",v:"\xE2\x87\x9D"},{k:"zopf;",v:"\xF0\x9D\x95\xAB"},{k:"zscr;",v:"\xF0\x9D\x93\x8F"},{k:"zwj;",v:"\xE2\x80\x8D"},{k:"zwnj;",v:"\xE2\x80\x8C"}]);CY=new DH(["+//silmaril//dtd html pro v0r11 19970101//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//as//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sq//dtd html 2.0 hotmetal + extensions//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"]);CZ=$makeMap($String.keyFor,[{k:"address",v:true},{k:"applet",v:true},{k:"area",v:true},{k:"article",v:true},{k:"aside",v:true},{k:"base",v:true},{k:"basefont",v:true},{k:"bgsound",v:true},{k:"blockquote",v:true},{k:"body",v:true},{k:"br",v:true},{k:"button",v:true},{k:"caption",v:true},{k:"center",v:true},{k:"col",v:true},{k:"colgroup",v:true},{k:"dd",v:true},{k:"details",v:true},{k:"dir",v:true},{k:"div",v:true},{k:"dl",v:true},{k:"dt",v:true},{k:"embed",v:true},{k:"fieldset",v:true},{k:"figcaption",v:true},{k:"figure",v:true},{k:"footer",v:true},{k:"form",v:true},{k:"frame",v:true},{k:"frameset",v:true},{k:"h1",v:true},{k:"h2",v:true},{k:"h3",v:true},{k:"h4",v:true},{k:"h5",v:true},{k:"h6",v:true},{k:"head",v:true},{k:"header",v:true},{k:"hgroup",v:true},{k:"hr",v:true},{k:"html",v:true},{k:"iframe",v:true},{k:"img",v:true},{k:"input",v:true},{k:"isindex",v:true},{k:"keygen",v:true},{k:"li",v:true},{k:"link",v:true},{k:"listing",v:true},{k:"main",v:true},{k:"marquee",v:true},{k:"menu",v:true},{k:"meta",v:true},{k:"nav",v:true},{k:"noembed",v:true},{k:"noframes",v:true},{k:"noscript",v:true},{k:"object",v:true},{k:"ol",v:true},{k:"p",v:true},{k:"param",v:true},{k:"plaintext",v:true},{k:"pre",v:true},{k:"script",v:true},{k:"section",v:true},{k:"select",v:true},{k:"source",v:true},{k:"style",v:true},{k:"summary",v:true},{k:"table",v:true},{k:"tbody",v:true},{k:"td",v:true},{k:"template",v:true},{k:"textarea",v:true},{k:"tfoot",v:true},{k:"th",v:true},{k:"thead",v:true},{k:"title",v:true},{k:"tr",v:true},{k:"track",v:true},{k:"ul",v:true},{k:"wbr",v:true},{k:"xmp",v:true}]);}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["github.com/88250/lute/util"]=(function(){var $pkg={},$init,E,B,F,G,A,C,D,AV,AX,AY,AZ,R,S,T,U,V,W,X,Y,Z,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AS,AT,AU;E=$packages["bytes"];B=$packages["github.com/88250/lute/editor"];F=$packages["github.com/88250/lute/html"];G=$packages["github.com/88250/lute/html/atom"];A=$packages["strconv"];C=$packages["strings"];D=$packages["unicode/utf8"];AV=$sliceType($Uint8);AX=$sliceType($Int32);AY=$ptrType(F.Node);AZ=$sliceType(AY);R=function(a){var{a,b,c,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:a=C.ReplaceAll(a,"\xE2\x80\x8B","");a=C.ReplaceAll(a,"\xE2\x80\x8D","");b=C.TrimSpace(a);$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=0===b.length;$s=2;case 2:return c;}return;}var $f={$blk:R,$c:true,$r,a,b,c,$s};return $f;};$pkg.IsEmptyStr=R;S=function(a){var{a,b,c,d,e,f,g,h,i,j,k,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=0;c=0;d=C.Fields(a);$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;f=e;g=0;while(true){if(!(g=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+g]);i=T(h);j=i[0];k=i[1];b=b+(j)>>0;c=c+(k)>>0;g++;}$s=-1;return[b,c];}return;}var $f={$blk:S,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,$s};return $f;};$pkg.WordCount=S;T=function(a){var a,b,c,d,e,f,g,h,i,j;b=0;c=0;d=(new AX($stringToRunes(a)));e=d.$length;if(1>e){return[b,c];}f=1;g=1;b=f;c=g;h=(0>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+0])<128;i=1;while(true){if(!(i=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+i]);b=b+(1)>>0;if(j>=128){c=c+(1)>>0;h=false;i=i+(1)>>0;continue;}if(j<128===h){i=i+(1)>>0;continue;}c=c+(1)>>0;h=!h;i=i+(1)>>0;}return[b,c];};U=function(a){var a;};$pkg.RecoverPanic=U;V=function(a){var a;return E.Contains(a,(new AV($stringToBytes("type=\"doc\""))));};$pkg.IsDocIAL=V;W=function(a){var a,b,c,d;b=a;c=0;while(true){if(!(c=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+c]);if("type"===(0>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+0])&&"doc"===(1>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+1])){return true;}c++;}return false;};$pkg.IsDocIAL2=W;X=function(a){var{a,b,c,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b="";c=AM(a);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}b=c;b=C.ReplaceAll(b,"\xE2\x80\x8B","");b=C.TrimSuffix(b,"\n");b=F.EscapeHTMLStr(b);b=C.ReplaceAll(b,""","\"");while(true){if(!(C.Contains(b,"\n\n"))){break;}b=C.ReplaceAll(b,"\n\n","\n");}$s=-1;return b;}return;}var $f={$blk:X,$c:true,$r,a,b,c,$s};return $f;};$pkg.GetTextMarkTextDataWithoutEscapeQuote=X;Y=function(a){var{a,b,c,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b="";c=X(a);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}b=c;b=C.TrimPrefix(b,"\n");b=C.ReplaceAll(b,"'","'");while(true){if(!(C.Contains(b,"\n\n"))){break;}b=C.ReplaceAll(b,"\n\n","\n");}$s=-1;return b;}return;}var $f={$blk:Y,$c:true,$r,a,b,c,$s};return $f;};$pkg.GetTextMarkTextData=Y;Z=function(a){var a,b;b="";b=AQ(a,"data-inline-memo-content");b=C.ReplaceAll(b,"\xE2\x80\x8B","");b=C.ReplaceAll(b,"\n","_esc_newline_");b=F.UnescapeHTMLStr(b);return b;};$pkg.GetTextMarkInlineMemoData=Z;AA=function(a){var a,b,c;b="";c="";b=AQ(a,"data-href");b=F.EscapeHTMLStr(b);c=AQ(a,"data-title");c=F.EscapeHTMLStr(c);return[b,c];};$pkg.GetTextMarkAData=AA;AB=function(a){var a,b;b="";b=AQ(a,"data-content");b=C.ReplaceAll(b,"\n","_esc_newline_");b=F.UnescapeHTMLStr(b);b=C.ReplaceAll(b,"\xE2\x80\x8B","");return b;};$pkg.GetTextMarkInlineMathData=AB;AC=function(a){var a,b,c;b="";c="";b=AQ(a,"data-id");c=AQ(a,"data-subtype");if(""===c){c="s";}return[b,c];};$pkg.GetTextMarkBlockRefData=AC;AD=function(a){var a,b;b="";b=AQ(a,"data-id");return b;};$pkg.GetTextMarkFileAnnotationRefData=AD;AE=function(a,b,c){var a,b,c,d,e,f,g,h;if(AY.nil===a){return AY.nil;}if(a.DataAtom===b){d=c;e=0;while(true){if(!(e=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+e]);if(C.Contains(AQ(a,"class"),f)){return a;}e++;}}g=a.FirstChild;while(true){if(!(!(AY.nil===g))){break;}h=AE(g,b,c);if(!(AY.nil===h)){return h;}g=g.NextSibling;}return AY.nil;};$pkg.DomChildByTypeAndClass=AE;AF=function(a,b){var a,b,c,d;c=AZ.nil;d=a.FirstChild;while(true){if(!(!(AY.nil===d))){break;}if(d.DataAtom===b){c=$append(c,d);}c=$appendSlice(c,AF(d,b));d=d.NextSibling;}return c;};$pkg.DomChildrenByType=AF;AG=function(a,b){var a,b,c,d,e,f;if(AY.nil===a){return false;}c=b;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(!(AY.nil===AH(a,e))){return true;}d++;}f=a.FirstChild;while(true){if(!(!(AY.nil===f))){break;}if(AG(f,b)){return true;}f=f.NextSibling;}return false;};$pkg.DomExistChildByType=AG;AH=function(a,b){var a,b,c;c=a.FirstChild;while(true){if(!(!(AY.nil===c))){break;}if(c.DataAtom===b){return c;}c=c.NextSibling;}return AY.nil;};AI=function(a){var{a,b,c,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:if(AY.nil===a){$s=-1;return AV.nil;}b=new E.Buffer.ptr(AV.nil,0,0);c=F.Render(b,a);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}c;$s=-1;return E.ReplaceAll(b.Bytes(),(new AV($stringToBytes("\xE2\x80\x8B"))),AV.nil);}return;}var $f={$blk:AI,$c:true,$r,a,b,c,$s};return $f;};$pkg.DomHTML=AI;AJ=function(a){var{a,b,c,d,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:if(AY.nil===a){$s=-1;return"";}b=new E.Buffer.ptr(AV.nil,0,0);if(1===a.Type){$s=1;continue;}$s=2;continue;case 1:c=b.WriteString(a.Data);$s=3;case 3:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}c;$s=-1;return b.String();case 2:d=a.FirstChild;case 4:if(!(!(AY.nil===d))){$s=5;continue;}$r=AK(d,b);$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}d=d.NextSibling;$s=4;continue;case 5:$s=-1;return b.String();}return;}var $f={$blk:AJ,$c:true,$r,a,b,c,d,$s};return $f;};$pkg.DomTexhtml=AJ;AK=function(a,b){var{a,b,c,d,e,f,g,h,i,j,$s,$r,$c}=$restore(this,{a,b});$s=$s||0;s:while(true){switch($s){case 0:if(AY.nil===a){$s=-1;return;}c=a.DataAtom;if(c===(0)){$s=2;continue;}if(c===(461571)){$s=3;continue;}if(c===(421123)){$s=4;continue;}$s=5;continue;case 2:d=b.WriteString(AL(a.Data));$s=6;case 6:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}d;$s=5;continue;case 3:e=b.WriteString("^{");$s=7;case 7:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}e;$s=5;continue;case 4:f=b.WriteString("_{");$s=8;case 8:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}f;case 5:case 1:g=a.FirstChild;case 9:if(!(!(AY.nil===g))){$s=10;continue;}$r=AK(g,b);$s=11;case 11:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}g=g.NextSibling;$s=9;continue;case 10:h=a.DataAtom;if(h===(461571)){$s=13;continue;}if(h===(421123)){$s=14;continue;}$s=15;continue;case 13:i=b.WriteString("}");$s=16;case 16:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}i;$s=15;continue;case 14:j=b.WriteString("}");$s=17;case 17:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}j;case 15:case 12:$s=-1;return;}return;}var $f={$blk:AK,$c:true,$r,a,b,c,d,e,f,g,h,i,j,$s};return $f;};AL=function(a){var a;a=C.ReplaceAll(a,"_","\\_");a=C.ReplaceAll(a,"^","\\^");a=C.ReplaceAll(a,"{","\\{");a=C.ReplaceAll(a,"}","\\}");return a;};AM=function(a){var{a,b,c,d,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:if(AY.nil===a){$s=-1;return"";}b=new E.Buffer.ptr(AV.nil,0,0);if(1===a.Type){$s=1;continue;}$s=2;continue;case 1:c=b.WriteString(a.Data);$s=3;case 3:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}c;$s=-1;return b.String();case 2:d=a.FirstChild;case 4:if(!(!(AY.nil===d))){$s=5;continue;}$r=AN(d,b);$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}d=d.NextSibling;$s=4;continue;case 5:$s=-1;return b.String();}return;}var $f={$blk:AM,$c:true,$r,a,b,c,d,$s};return $f;};$pkg.DomText=AM;AN=function(a,b){var{a,b,c,d,e,f,g,h,i,j,k,$s,$r,$c}=$restore(this,{a,b});$s=$s||0;s:while(true){switch($s){case 0:if(AY.nil===a){$s=-1;return;}c=AQ(a,"data-render");if("1"===c||"2"===c){$s=-1;return;}if("svg"===a.Namespace){$s=-1;return;}d=false;if((0===a.DataAtom)&&(3===a.Type)){e=a.Parent;if(AY.nil===e){$s=-1;return;}if(!((40708===e.DataAtom))){$s=-1;return;}if(!AO(e)){$s=-1;return;}d=true;}f=a.DataAtom;if(f===(0)){$s=2;continue;}if(f===(514)){$s=3;continue;}if(f===(3073)){$s=4;continue;}$s=5;continue;case 2:if(d){$s=6;continue;}$s=7;continue;case 6:g=b.WriteString("<"+a.Data+">");$s=9;case 9:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}g;$s=8;continue;case 7:h=b.WriteString(a.Data);$s=10;case 10:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}h;case 8:$s=5;continue;case 3:i=b.WriteString("\n");$s=11;case 11:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}i;$s=5;continue;case 4:j=b.WriteString("\n\n");$s=12;case 12:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}j;case 5:case 1:k=a.FirstChild;case 13:if(!(!(AY.nil===k))){$s=14;continue;}$r=AN(k,b);$s=15;case 15:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}k=k.NextSibling;$s=13;continue;case 14:$s=-1;return;}return;}var $f={$blk:AN,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,$s};return $f;};AO=function(a){var a,b;b=AQ(a,"data-type");return"search-mark"===b||"virtual-block-ref"===b;};$pkg.IsTempMarkSpan=AO;AP=function(a,b,c){var a,b,c,d,e,f;if(AY.nil===a){return;}d=a.Attr;e=0;while(true){if(!(e=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+e]);if(f.Key===b){f.Val=c;return;}e++;}a.Attr=$append(a.Attr,new F.Attribute.ptr("",b,c));};$pkg.SetDomAttrValue=AP;AQ=function(a,b){var a,b,c,d,e;if(AY.nil===a){return"";}c=a.Attr;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(e.Key===b){return e.Val;}d++;}return"";};$pkg.DomAttrValue=AQ;AS=function(a){var a,b,c,d,e,f;b=false;if(AY.nil===a){b=false;return b;}b=$makeMap($String.keyFor,[]);c=a.Attr;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(C.HasPrefix(e.Key,"custom-")){f=e.Key;(b||$throwRuntimeError("assignment to entry in nil map")).set($String.keyFor(f),{k:f,v:e.Val});}d++;}if(1>(b?b.size:0)){b=false;return b;}return b;};$pkg.DomCustomAttrs=AS;AT=function(a){var a,b;b=AV.nil;b=(new AV($stringToBytes(a)));return b;};$pkg.StrToBytes=AT;AU=function(a){var a;return($bytesToString(a));};$pkg.BytesToStr=AU;$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=E.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=G.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["github.com/88250/lute/util"]=(function(){var $pkg={},$init,E,B,F,G,A,C,D,AV,AX,AY,AZ,R,S,T,U,V,W,X,Y,Z,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AS,AT,AU;E=$packages["bytes"];B=$packages["github.com/88250/lute/editor"];F=$packages["github.com/88250/lute/html"];G=$packages["github.com/88250/lute/html/atom"];A=$packages["strconv"];C=$packages["strings"];D=$packages["unicode/utf8"];AV=$sliceType($Uint8);AX=$sliceType($Int32);AY=$ptrType(F.Node);AZ=$sliceType(AY);R=function(a){var{a,b,c,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:a=C.ReplaceAll(a,"\xE2\x80\x8B","");a=C.ReplaceAll(a,"\xE2\x80\x8D","");b=C.TrimSpace(a);$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=0===b.length;$s=2;case 2:return c;}return;}var $f={$blk:R,$c:true,$r,a,b,c,$s};return $f;};$pkg.IsEmptyStr=R;S=function(a){var{a,b,c,d,e,f,g,h,i,j,k,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=0;c=0;d=C.Fields(a);$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;f=e;g=0;while(true){if(!(g=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+g]);i=T(h);j=i[0];k=i[1];b=b+(j)>>0;c=c+(k)>>0;g++;}$s=-1;return[b,c];}return;}var $f={$blk:S,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,$s};return $f;};$pkg.WordCount=S;T=function(a){var a,b,c,d,e,f,g,h,i,j;b=0;c=0;d=(new AX($stringToRunes(a)));e=d.$length;if(1>e){return[b,c];}f=1;g=1;b=f;c=g;h=(0>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+0])<128;i=1;while(true){if(!(i=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+i]);b=b+(1)>>0;if(j>=128){c=c+(1)>>0;h=false;i=i+(1)>>0;continue;}if(j<128===h){i=i+(1)>>0;continue;}c=c+(1)>>0;h=!h;i=i+(1)>>0;}return[b,c];};U=function(a){var a;};$pkg.RecoverPanic=U;V=function(a){var a;return E.Contains(a,(new AV($stringToBytes("type=\"doc\""))));};$pkg.IsDocIAL=V;W=function(a){var a,b,c,d;b=a;c=0;while(true){if(!(c=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+c]);if("type"===(0>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+0])&&"doc"===(1>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+1])){return true;}c++;}return false;};$pkg.IsDocIAL2=W;X=function(a){var{a,b,c,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b="";c=AM(a);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}b=c;b=C.ReplaceAll(b,"\xE2\x80\x8B","");b=C.TrimSuffix(b,"\n");b=F.EscapeHTMLStr(b);b=C.ReplaceAll(b,""","\"");while(true){if(!(C.Contains(b,"\n\n"))){break;}b=C.ReplaceAll(b,"\n\n","\n");}$s=-1;return b;}return;}var $f={$blk:X,$c:true,$r,a,b,c,$s};return $f;};$pkg.GetTextMarkTextDataWithoutEscapeQuote=X;Y=function(a){var{a,b,c,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b="";c=X(a);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}b=c;b=C.TrimPrefix(b,"\n");b=C.ReplaceAll(b,"'","'");while(true){if(!(C.Contains(b,"\n\n"))){break;}b=C.ReplaceAll(b,"\n\n","\n");}$s=-1;return b;}return;}var $f={$blk:Y,$c:true,$r,a,b,c,$s};return $f;};$pkg.GetTextMarkTextData=Y;Z=function(a){var a,b;b="";b=AQ(a,"data-inline-memo-content");b=C.ReplaceAll(b,"\xE2\x80\x8B","");b=C.ReplaceAll(b,"\n","_esc_newline_");b=F.UnescapeHTMLStr(b);return b;};$pkg.GetTextMarkInlineMemoData=Z;AA=function(a){var a,b,c;b="";c="";b=AQ(a,"data-href");b=F.EscapeHTMLStr(b);c=AQ(a,"data-title");c=F.EscapeHTMLStr(c);c=C.ReplaceAll(c,"&lt;","<");c=C.ReplaceAll(c,"&gt;",">");return[b,c];};$pkg.GetTextMarkAData=AA;AB=function(a){var a,b;b="";b=AQ(a,"data-content");b=C.ReplaceAll(b,"\n","_esc_newline_");b=F.UnescapeHTMLStr(b);b=C.ReplaceAll(b,"\xE2\x80\x8B","");return b;};$pkg.GetTextMarkInlineMathData=AB;AC=function(a){var a,b,c;b="";c="";b=AQ(a,"data-id");c=AQ(a,"data-subtype");if(""===c){c="s";}return[b,c];};$pkg.GetTextMarkBlockRefData=AC;AD=function(a){var a,b;b="";b=AQ(a,"data-id");return b;};$pkg.GetTextMarkFileAnnotationRefData=AD;AE=function(a,b,c){var a,b,c,d,e,f,g,h;if(AY.nil===a){return AY.nil;}if(a.DataAtom===b){d=c;e=0;while(true){if(!(e=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+e]);if(C.Contains(AQ(a,"class"),f)){return a;}e++;}}g=a.FirstChild;while(true){if(!(!(AY.nil===g))){break;}h=AE(g,b,c);if(!(AY.nil===h)){return h;}g=g.NextSibling;}return AY.nil;};$pkg.DomChildByTypeAndClass=AE;AF=function(a,b){var a,b,c,d;c=AZ.nil;d=a.FirstChild;while(true){if(!(!(AY.nil===d))){break;}if(d.DataAtom===b){c=$append(c,d);}c=$appendSlice(c,AF(d,b));d=d.NextSibling;}return c;};$pkg.DomChildrenByType=AF;AG=function(a,b){var a,b,c,d,e,f;if(AY.nil===a){return false;}c=b;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(!(AY.nil===AH(a,e))){return true;}d++;}f=a.FirstChild;while(true){if(!(!(AY.nil===f))){break;}if(AG(f,b)){return true;}f=f.NextSibling;}return false;};$pkg.DomExistChildByType=AG;AH=function(a,b){var a,b,c;c=a.FirstChild;while(true){if(!(!(AY.nil===c))){break;}if(c.DataAtom===b){return c;}c=c.NextSibling;}return AY.nil;};AI=function(a){var{a,b,c,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:if(AY.nil===a){$s=-1;return AV.nil;}b=new E.Buffer.ptr(AV.nil,0,0);c=F.Render(b,a);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}c;$s=-1;return E.ReplaceAll(b.Bytes(),(new AV($stringToBytes("\xE2\x80\x8B"))),AV.nil);}return;}var $f={$blk:AI,$c:true,$r,a,b,c,$s};return $f;};$pkg.DomHTML=AI;AJ=function(a){var{a,b,c,d,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:if(AY.nil===a){$s=-1;return"";}b=new E.Buffer.ptr(AV.nil,0,0);if(1===a.Type){$s=1;continue;}$s=2;continue;case 1:c=b.WriteString(a.Data);$s=3;case 3:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}c;$s=-1;return b.String();case 2:d=a.FirstChild;case 4:if(!(!(AY.nil===d))){$s=5;continue;}$r=AK(d,b);$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}d=d.NextSibling;$s=4;continue;case 5:$s=-1;return b.String();}return;}var $f={$blk:AJ,$c:true,$r,a,b,c,d,$s};return $f;};$pkg.DomTexhtml=AJ;AK=function(a,b){var{a,b,c,d,e,f,g,h,i,j,$s,$r,$c}=$restore(this,{a,b});$s=$s||0;s:while(true){switch($s){case 0:if(AY.nil===a){$s=-1;return;}c=a.DataAtom;if(c===(0)){$s=2;continue;}if(c===(461571)){$s=3;continue;}if(c===(421123)){$s=4;continue;}$s=5;continue;case 2:d=b.WriteString(AL(a.Data));$s=6;case 6:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}d;$s=5;continue;case 3:e=b.WriteString("^{");$s=7;case 7:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}e;$s=5;continue;case 4:f=b.WriteString("_{");$s=8;case 8:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}f;case 5:case 1:g=a.FirstChild;case 9:if(!(!(AY.nil===g))){$s=10;continue;}$r=AK(g,b);$s=11;case 11:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}g=g.NextSibling;$s=9;continue;case 10:h=a.DataAtom;if(h===(461571)){$s=13;continue;}if(h===(421123)){$s=14;continue;}$s=15;continue;case 13:i=b.WriteString("}");$s=16;case 16:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}i;$s=15;continue;case 14:j=b.WriteString("}");$s=17;case 17:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}j;case 15:case 12:$s=-1;return;}return;}var $f={$blk:AK,$c:true,$r,a,b,c,d,e,f,g,h,i,j,$s};return $f;};AL=function(a){var a;a=C.ReplaceAll(a,"_","\\_");a=C.ReplaceAll(a,"^","\\^");a=C.ReplaceAll(a,"{","\\{");a=C.ReplaceAll(a,"}","\\}");return a;};AM=function(a){var{a,b,c,d,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:if(AY.nil===a){$s=-1;return"";}b=new E.Buffer.ptr(AV.nil,0,0);if(1===a.Type){$s=1;continue;}$s=2;continue;case 1:c=b.WriteString(a.Data);$s=3;case 3:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}c;$s=-1;return b.String();case 2:d=a.FirstChild;case 4:if(!(!(AY.nil===d))){$s=5;continue;}$r=AN(d,b);$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}d=d.NextSibling;$s=4;continue;case 5:$s=-1;return b.String();}return;}var $f={$blk:AM,$c:true,$r,a,b,c,d,$s};return $f;};$pkg.DomText=AM;AN=function(a,b){var{a,b,c,d,e,f,g,h,i,j,k,$s,$r,$c}=$restore(this,{a,b});$s=$s||0;s:while(true){switch($s){case 0:if(AY.nil===a){$s=-1;return;}c=AQ(a,"data-render");if("1"===c||"2"===c){$s=-1;return;}if("svg"===a.Namespace){$s=-1;return;}d=false;if((0===a.DataAtom)&&(3===a.Type)){e=a.Parent;if(AY.nil===e){$s=-1;return;}if(!((40708===e.DataAtom))){$s=-1;return;}if(!AO(e)){$s=-1;return;}d=true;}f=a.DataAtom;if(f===(0)){$s=2;continue;}if(f===(514)){$s=3;continue;}if(f===(3073)){$s=4;continue;}$s=5;continue;case 2:if(d){$s=6;continue;}$s=7;continue;case 6:g=b.WriteString("<"+a.Data+">");$s=9;case 9:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}g;$s=8;continue;case 7:h=b.WriteString(a.Data);$s=10;case 10:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}h;case 8:$s=5;continue;case 3:i=b.WriteString("\n");$s=11;case 11:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}i;$s=5;continue;case 4:j=b.WriteString("\n\n");$s=12;case 12:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}j;case 5:case 1:k=a.FirstChild;case 13:if(!(!(AY.nil===k))){$s=14;continue;}$r=AN(k,b);$s=15;case 15:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}k=k.NextSibling;$s=13;continue;case 14:$s=-1;return;}return;}var $f={$blk:AN,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,$s};return $f;};AO=function(a){var a,b;b=AQ(a,"data-type");return"search-mark"===b||"virtual-block-ref"===b;};$pkg.IsTempMarkSpan=AO;AP=function(a,b,c){var a,b,c,d,e,f;if(AY.nil===a){return;}d=a.Attr;e=0;while(true){if(!(e=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+e]);if(f.Key===b){f.Val=c;return;}e++;}a.Attr=$append(a.Attr,new F.Attribute.ptr("",b,c));};$pkg.SetDomAttrValue=AP;AQ=function(a,b){var a,b,c,d,e;if(AY.nil===a){return"";}c=a.Attr;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(e.Key===b){return e.Val;}d++;}return"";};$pkg.DomAttrValue=AQ;AS=function(a){var a,b,c,d,e,f;b=false;if(AY.nil===a){b=false;return b;}b=$makeMap($String.keyFor,[]);c=a.Attr;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(C.HasPrefix(e.Key,"custom-")){f=e.Key;(b||$throwRuntimeError("assignment to entry in nil map")).set($String.keyFor(f),{k:f,v:e.Val});}d++;}if(1>(b?b.size:0)){b=false;return b;}return b;};$pkg.DomCustomAttrs=AS;AT=function(a){var a,b;b=AV.nil;b=(new AV($stringToBytes(a)));return b;};$pkg.StrToBytes=AT;AU=function(a){var a;return($bytesToString(a));};$pkg.BytesToStr=AU;$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=E.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=G.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); $packages["math/rand"]=(function(){var $pkg={},$init,B,A,F,H,I,K,AE,AM,AN,AO,AQ,AR,AS,AT,AU,AV,E,N,AG,AH,AI,AJ,AK,AL,G,J,L,M,O,W,AF;B=$packages["github.com/gopherjs/gopherjs/nosync"];A=$packages["math"];F=$pkg.rngSource=$newType(0,$kindStruct,"rand.rngSource",true,"math/rand",false,function(tap_,feed_,vec_){this.$val=this;if(arguments.length===0){this.tap=0;this.feed=0;this.vec=AQ.zero();return;}this.tap=tap_;this.feed=feed_;this.vec=vec_;});H=$pkg.Source=$newType(8,$kindInterface,"rand.Source",true,"math/rand",true,null);I=$pkg.Source64=$newType(8,$kindInterface,"rand.Source64",true,"math/rand",true,null);K=$pkg.Rand=$newType(0,$kindStruct,"rand.Rand",true,"math/rand",true,function(src_,s64_,readVal_,readPos_){this.$val=this;if(arguments.length===0){this.src=$ifaceNil;this.s64=$ifaceNil;this.readVal=new $Int64(0,0);this.readPos=0;return;}this.src=src_;this.s64=s64_;this.readVal=readVal_;this.readPos=readPos_;});AE=$pkg.lockedSource=$newType(0,$kindStruct,"rand.lockedSource",true,"math/rand",false,function(lk_,src_){this.$val=this;if(arguments.length===0){this.lk=new B.Mutex.ptr(false,false,false,false,0);this.src=AM.nil;return;}this.lk=lk_;this.src=src_;});AM=$ptrType(F);AN=$ptrType(AE);AO=$ptrType(K);AQ=$arrayType($Int64,607);AR=$ptrType($Int8);AS=$sliceType($Int);AT=$ptrType($Int64);AU=$funcType([$Int,$Int],[],false);AV=$sliceType($Uint8);G=function(a){var a,b,c,d,e;c=(b=a/44488,(b===b&&b!==1/0&&b!==-1/0)?b>>0:$throwRuntimeError("integer divide by zero"));e=(d=a%44488,d===d?d:$throwRuntimeError("integer divide by zero"));a=($imul(48271,e))-($imul(3399,c))>>0;if(a<0){a=a+(2147483647)>>0;}return a;};F.ptr.prototype.Seed=function(a){var a,b,c,d,e,f,g,h,i,j;b=this;b.tap=0;b.feed=334;a=$div64(a,new $Int64(0,2147483647),true);if((a.$high<0||(a.$high===0&&a.$low<0))){a=(c=new $Int64(0,2147483647),new $Int64(a.$high+c.$high,a.$low+c.$low));}if((a.$high===0&&a.$low===0)){a=new $Int64(0,89482311);}d=(((a.$low+((a.$high>>31)*4294967296))>>0));e=-20;while(true){if(!(e<607)){break;}d=G(d);if(e>=0){f=new $Int64(0,0);f=$shiftLeft64((new $Int64(0,d)),40);d=G(d);f=(g=$shiftLeft64((new $Int64(0,d)),20),new $Int64(f.$high^g.$high,(f.$low^g.$low)>>>0));d=G(d);f=(h=(new $Int64(0,d)),new $Int64(f.$high^h.$high,(f.$low^h.$low)>>>0));f=(i=((e<0||e>=E.length)?($throwRuntimeError("index out of range"),undefined):E[e]),new $Int64(f.$high^i.$high,(f.$low^i.$low)>>>0));(j=b.vec,((e<0||e>=j.length)?($throwRuntimeError("index out of range"),undefined):j[e]=f));}e=e+(1)>>0;}};F.prototype.Seed=function(a){return this.$val.Seed(a);};F.ptr.prototype.Int63=function(){var a,b,c;a=this;return((b=(c=a.Uint64(),new $Uint64(c.$high&2147483647,(c.$low&4294967295)>>>0)),new $Int64(b.$high,b.$low)));};F.prototype.Int63=function(){return this.$val.Int63();};F.ptr.prototype.Uint64=function(){var a,b,c,d,e,f,g,h,i,j;a=this;a.tap=a.tap-(1)>>0;if(a.tap<0){a.tap=a.tap+(607)>>0;}a.feed=a.feed-(1)>>0;if(a.feed<0){a.feed=a.feed+(607)>>0;}h=(b=(c=a.vec,d=a.feed,((d<0||d>=c.length)?($throwRuntimeError("index out of range"),undefined):c[d])),e=(f=a.vec,g=a.tap,((g<0||g>=f.length)?($throwRuntimeError("index out of range"),undefined):f[g])),new $Int64(b.$high+e.$high,b.$low+e.$low));(i=a.vec,j=a.feed,((j<0||j>=i.length)?($throwRuntimeError("index out of range"),undefined):i[j]=h));return(new $Uint64(h.$high,h.$low));};F.prototype.Uint64=function(){return this.$val.Uint64();};J=function(a){var a,b;b=new F.ptr(0,0,AQ.zero());b.Seed(a);return b;};$pkg.NewSource=J;L=function(a){var a,b,c;b=$assertType(a,I,true);c=b[0];return new K.ptr(a,c,new $Int64(0,0),0);};$pkg.New=L;K.ptr.prototype.Seed=function(a){var{a,b,c,d,e,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=this;c=$assertType(b.src,AN,true);d=c[0];e=c[1];if(e){d.seedPos(a,(b.$ptr_readPos||(b.$ptr_readPos=new AR(function(){return this.$target.readPos;},function($v){this.$target.readPos=$v;},b))));$s=-1;return;}$r=b.src.Seed(a);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}b.readPos=0;$s=-1;return;}return;}var $f={$blk:K.ptr.prototype.Seed,$c:true,$r,a,b,c,d,e,$s};return $f;};K.prototype.Seed=function(a){return this.$val.Seed(a);};K.ptr.prototype.Int63=function(){var{a,b,c,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;b=a.src.Int63();$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=b;$s=2;case 2:return c;}return;}var $f={$blk:K.ptr.prototype.Int63,$c:true,$r,a,b,c,$s};return $f;};K.prototype.Int63=function(){return this.$val.Int63();};K.ptr.prototype.Uint32=function(){var{a,b,c,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;b=a.Int63();$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=(($shiftRightInt64(b,31).$low>>>0));$s=2;case 2:return c;}return;}var $f={$blk:K.ptr.prototype.Uint32,$c:true,$r,a,b,c,$s};return $f;};K.prototype.Uint32=function(){return this.$val.Uint32();};K.ptr.prototype.Uint64=function(){var{a,b,c,d,e,f,g,h,i,j,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;if(!($interfaceIsEqual(a.s64,$ifaceNil))){$s=1;continue;}$s=2;continue;case 1:b=a.s64.Uint64();$s=3;case 3:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=b;$s=4;case 4:return c;case 2:f=a.Int63();$s=5;case 5:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}i=a.Int63();$s=6;case 6:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}j=(d=$shiftRightUint64(((e=f,new $Uint64(e.$high,e.$low))),31),g=$shiftLeft64(((h=i,new $Uint64(h.$high,h.$low))),32),new $Uint64(d.$high|g.$high,(d.$low|g.$low)>>>0));$s=7;case 7:return j;}return;}var $f={$blk:K.ptr.prototype.Uint64,$c:true,$r,a,b,c,d,e,f,g,h,i,j,$s};return $f;};K.prototype.Uint64=function(){return this.$val.Uint64();};K.ptr.prototype.Int31=function(){var{a,b,c,d,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;c=a.Int63();$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=(((b=$shiftRightInt64(c,32),b.$low+((b.$high>>31)*4294967296))>>0));$s=2;case 2:return d;}return;}var $f={$blk:K.ptr.prototype.Int31,$c:true,$r,a,b,c,d,$s};return $f;};K.prototype.Int31=function(){return this.$val.Int31();};K.ptr.prototype.Int=function(){var{a,b,c,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;b=a.Int63();$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=((b.$low>>>0));$s=-1;return((((c<<1>>>0)>>>1>>>0)>>0));}return;}var $f={$blk:K.ptr.prototype.Int,$c:true,$r,a,b,c,$s};return $f;};K.prototype.Int=function(){return this.$val.Int();};K.ptr.prototype.Int63n=function(a){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=this;if((a.$high<0||(a.$high===0&&a.$low<=0))){$panic(new $String("invalid argument to Int63n"));}if((c=(d=new $Int64(a.$high-0,a.$low-1),new $Int64(a.$high&d.$high,(a.$low&d.$low)>>>0)),(c.$high===0&&c.$low===0))){$s=1;continue;}$s=2;continue;case 1:f=b.Int63();$s=3;case 3:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}h=(e=f,g=new $Int64(a.$high-0,a.$low-1),new $Int64(e.$high&g.$high,(e.$low&g.$low)>>>0));$s=4;case 4:return h;case 2:k=((i=(j=$div64(new $Uint64(2147483648,0),(new $Uint64(a.$high,a.$low)),true),new $Uint64(2147483647-j.$high,4294967295-j.$low)),new $Int64(i.$high,i.$low)));l=b.Int63();$s=5;case 5:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}m=l;case 6:if(!((m.$high>k.$high||(m.$high===k.$high&&m.$low>k.$low)))){$s=7;continue;}n=b.Int63();$s=8;case 8:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}m=n;$s=6;continue;case 7:$s=-1;return $div64(m,a,true);}return;}var $f={$blk:K.ptr.prototype.Int63n,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,$s};return $f;};K.prototype.Int63n=function(a){return this.$val.Int63n(a);};K.ptr.prototype.Int31n=function(a){var{a,b,c,d,e,f,g,h,i,j,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=this;if(a<=0){$panic(new $String("invalid argument to Int31n"));}if((a&((a-1>>0)))===0){$s=1;continue;}$s=2;continue;case 1:c=b.Int31();$s=3;case 3:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c&((a-1>>0));$s=4;case 4:return d;case 2:f=(((2147483647-(e=2147483648%((a>>>0)),e===e?e:$throwRuntimeError("integer divide by zero"))>>>0)>>0));g=b.Int31();$s=5;case 5:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;case 6:if(!(h>f)){$s=7;continue;}i=b.Int31();$s=8;case 8:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}h=i;$s=6;continue;case 7:$s=-1;return(j=h%a,j===j?j:$throwRuntimeError("integer divide by zero"));}return;}var $f={$blk:K.ptr.prototype.Int31n,$c:true,$r,a,b,c,d,e,f,g,h,i,j,$s};return $f;};K.prototype.Int31n=function(a){return this.$val.Int31n(a);};K.ptr.prototype.int31n=function(a){var{a,b,c,d,e,f,g,h,i,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=this;c=b.Uint32();$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;e=$mul64((new $Uint64(0,d)),(new $Uint64(0,a)));f=((e.$low>>>0));if(f<((a>>>0))){$s=2;continue;}$s=3;continue;case 2:h=(g=((-a>>>0))%((a>>>0)),g===g?g:$throwRuntimeError("integer divide by zero"));case 4:if(!(f>>0));$s=4;continue;case 5:case 3:$s=-1;return(($shiftRightUint64(e,32).$low>>0));}return;}var $f={$blk:K.ptr.prototype.int31n,$c:true,$r,a,b,c,d,e,f,g,h,i,$s};return $f;};K.prototype.int31n=function(a){return this.$val.int31n(a);};K.ptr.prototype.Intn=function(a){var{a,b,c,d,e,f,g,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=this;if(a<=0){$panic(new $String("invalid argument to Intn"));}if(a<=2147483647){$s=1;continue;}$s=2;continue;case 1:c=b.Int31n(((a>>0)));$s=3;case 3:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=((c>>0));$s=4;case 4:return d;case 2:f=b.Int63n((new $Int64(0,a)));$s=5;case 5:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=(((e=f,e.$low+((e.$high>>31)*4294967296))>>0));$s=6;case 6:return g;}return;}var $f={$blk:K.ptr.prototype.Intn,$c:true,$r,a,b,c,d,e,f,g,$s};return $f;};K.prototype.Intn=function(a){return this.$val.Intn(a);};K.ptr.prototype.Float64=function(){var{a,b,c,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;case 1:b=a.Int63();$s=2;case 2:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=($flatten64(b))/9.223372036854776e+18;if(c===1){$s=3;continue;}$s=4;continue;case 3:$s=1;continue;case 4:$s=-1;return c;}return;}var $f={$blk:K.ptr.prototype.Float64,$c:true,$r,a,b,c,$s};return $f;};K.prototype.Float64=function(){return this.$val.Float64();};K.ptr.prototype.Float32=function(){var{a,b,c,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;case 1:b=a.Float64();$s=2;case 2:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=($fround(b));if(c===1){$s=3;continue;}$s=4;continue;case 3:$s=1;continue;case 4:$s=-1;return c;}return;}var $f={$blk:K.ptr.prototype.Float32,$c:true,$r,a,b,c,$s};return $f;};K.prototype.Float32=function(){return this.$val.Float32();};K.ptr.prototype.Perm=function(a){var{a,b,c,d,e,f,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=this;c=$makeSlice(AS,a);d=0;case 1:if(!(d>0);$s=3;case 3:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]=((f<0||f>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+f]));((f<0||f>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+f]=d);d=d+(1)>>0;$s=1;continue;case 2:$s=-1;return c;}return;}var $f={$blk:K.ptr.prototype.Perm,$c:true,$r,a,b,c,d,e,f,$s};return $f;};K.prototype.Perm=function(a){return this.$val.Perm(a);};K.ptr.prototype.Shuffle=function(a,b){var{a,b,c,d,e,f,g,h,i,$s,$r,$c}=$restore(this,{a,b});$s=$s||0;s:while(true){switch($s){case 0:c=this;if(a<0){$panic(new $String("invalid argument to Shuffle"));}d=a-1>>0;case 1:if(!(d>2147483646)){$s=2;continue;}f=c.Int63n((new $Int64(0,(d+1>>0))));$s=3;case 3:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=(((e=f,e.$low+((e.$high>>31)*4294967296))>>0));$r=b(d,g);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}d=d-(1)>>0;$s=1;continue;case 2:case 5:if(!(d>0)){$s=6;continue;}h=c.int31n((((d+1>>0)>>0)));$s=7;case 7:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=((h>>0));$r=b(d,i);$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}d=d-(1)>>0;$s=5;continue;case 6:$s=-1;return;}return;}var $f={$blk:K.ptr.prototype.Shuffle,$c:true,$r,a,b,c,d,e,f,g,h,i,$s};return $f;};K.prototype.Shuffle=function(a,b){return this.$val.Shuffle(a,b);};K.ptr.prototype.Read=function(a){var{a,b,c,d,e,f,g,h,i,j,k,l,m,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=0;c=$ifaceNil;d=this;e=$assertType(d.src,AN,true);f=e[0];g=e[1];if(g){$s=1;continue;}$s=2;continue;case 1:i=f.read(a,(d.$ptr_readVal||(d.$ptr_readVal=new AT(function(){return this.$target.readVal;},function($v){this.$target.readVal=$v;},d))),(d.$ptr_readPos||(d.$ptr_readPos=new AR(function(){return this.$target.readPos;},function($v){this.$target.readPos=$v;},d))));$s=3;case 3:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}h=i;b=h[0];c=h[1];j=[b,c];$s=4;case 4:return j;case 2:l=M(a,d.src,(d.$ptr_readVal||(d.$ptr_readVal=new AT(function(){return this.$target.readVal;},function($v){this.$target.readVal=$v;},d))),(d.$ptr_readPos||(d.$ptr_readPos=new AR(function(){return this.$target.readPos;},function($v){this.$target.readPos=$v;},d))));$s=5;case 5:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}k=l;b=k[0];c=k[1];m=[b,c];$s=6;case 6:return m;}return;}var $f={$blk:K.ptr.prototype.Read,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,$s};return $f;};K.prototype.Read=function(a){return this.$val.Read(a);};M=function(a,b,c,d){var{a,b,c,d,e,f,g,h,i,j,k,$s,$r,$c}=$restore(this,{a,b,c,d});$s=$s||0;s:while(true){switch($s){case 0:e=0;f=$ifaceNil;g=d.$get();h=c.$get();i=$assertType(b,AM,true);j=i[0];e=0;case 1:if(!(e=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+e]=((h.$low<<24>>>24)));h=$shiftRightInt64(h,(8));g=g-(1)<<24>>24;e=e+(1)>>0;$s=1;continue;case 2:d.$set(g);c.$set(h);$s=-1;return[e,f];}return;}var $f={$blk:M,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,$s};return $f;};O=function(a){var{a,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:$r=N.Seed(a);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return;}return;}var $f={$blk:O,$c:true,$r,a,$s};return $f;};$pkg.Seed=O;W=function(a){var{a,b,c,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=N.Intn(a);$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=b;$s=2;case 2:return c;}return;}var $f={$blk:W,$c:true,$r,a,b,c,$s};return $f;};$pkg.Intn=W;AE.ptr.prototype.Int63=function(){var a,b;a=new $Int64(0,0);b=this;b.lk.Lock();a=b.src.Int63();b.lk.Unlock();return a;};AE.prototype.Int63=function(){return this.$val.Int63();};AE.ptr.prototype.Uint64=function(){var a,b;a=new $Uint64(0,0);b=this;b.lk.Lock();a=b.src.Uint64();b.lk.Unlock();return a;};AE.prototype.Uint64=function(){return this.$val.Uint64();};AE.ptr.prototype.Seed=function(a){var a,b;b=this;b.lk.Lock();b.src.Seed(a);b.lk.Unlock();};AE.prototype.Seed=function(a){return this.$val.Seed(a);};AE.ptr.prototype.seedPos=function(a,b){var a,b,c;c=this;c.lk.Lock();c.src.Seed(a);b.$set(0);c.lk.Unlock();};AE.prototype.seedPos=function(a,b){return this.$val.seedPos(a,b);};AE.ptr.prototype.read=function(a,b,c){var{a,b,c,d,e,f,g,h,$s,$r,$c}=$restore(this,{a,b,c});$s=$s||0;s:while(true){switch($s){case 0:d=0;e=$ifaceNil;f=this;f.lk.Lock();h=M(a,f.src,b,c);$s=1;case 1:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}g=h;d=g[0];e=g[1];f.lk.Unlock();$s=-1;return[d,e];}return;}var $f={$blk:AE.ptr.prototype.read,$c:true,$r,a,b,c,d,e,f,g,h,$s};return $f;};AE.prototype.read=function(a,b,c){return this.$val.read(a,b,c);};AF=function(a){var a;if(a<0){return((-a>>>0));}return((a>>>0));};K.ptr.prototype.NormFloat64=function(){var{a,b,c,d,e,f,g,h,i,j,k,l,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;case 1:b=a.Uint32();$s=3;case 3:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=((b>>0));d=c&127;e=(c)*(((d<0||d>=AH.length)?($throwRuntimeError("index out of range"),undefined):AH[d]));if(AF(c)<((d<0||d>=AG.length)?($throwRuntimeError("index out of range"),undefined):AG[d])){$s=-1;return e;}if(d===0){$s=4;continue;}$s=5;continue;case 4:case 6:f=a.Float64();$s=8;case 8:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=A.Log(f);$s=9;case 9:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}e=-g*0.29047645161474317;h=a.Float64();$s=10;case 10:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=A.Log(h);$s=11;case 11:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}j=-i;if(j+j>=e*e){$s=7;continue;}$s=6;continue;case 7:if(c>0){$s=-1;return 3.442619855899+e;}$s=-1;return-3.442619855899-e;case 5:k=a.Float64();$s=14;case 14:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}if($fround(((d<0||d>=AI.length)?($throwRuntimeError("index out of range"),undefined):AI[d])+$fround(($fround(k))*($fround((l=d-1>>0,((l<0||l>=AI.length)?($throwRuntimeError("index out of range"),undefined):AI[l]))-((d<0||d>=AI.length)?($throwRuntimeError("index out of range"),undefined):AI[d])))))<($fround(A.Exp(-0.5*e*e)))){$s=12;continue;}$s=13;continue;case 12:$s=-1;return e;case 13:$s=1;continue;case 2:$s=-1;return 0;}return;}var $f={$blk:K.ptr.prototype.NormFloat64,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,$s};return $f;};K.prototype.NormFloat64=function(){return this.$val.NormFloat64();};K.ptr.prototype.ExpFloat64=function(){var{a,b,c,d,e,f,g,h,i,j,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;case 1:b=a.Uint32();$s=3;case 3:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=b;d=(c&255)>>>0;e=(c)*(((d<0||d>=AK.length)?($throwRuntimeError("index out of range"),undefined):AK[d]));if(c<((d<0||d>=AJ.length)?($throwRuntimeError("index out of range"),undefined):AJ[d])){$s=-1;return e;}if(d===0){$s=4;continue;}$s=5;continue;case 4:f=a.Float64();$s=6;case 6:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=A.Log(f);$s=7;case 7:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=7.69711747013105-g;$s=8;case 8:return h;case 5:i=a.Float64();$s=11;case 11:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}if($fround(((d<0||d>=AL.length)?($throwRuntimeError("index out of range"),undefined):AL[d])+$fround(($fround(i))*($fround((j=d-1>>>0,((j<0||j>=AL.length)?($throwRuntimeError("index out of range"),undefined):AL[j]))-((d<0||d>=AL.length)?($throwRuntimeError("index out of range"),undefined):AL[d])))))<($fround(A.Exp(-e)))){$s=9;continue;}$s=10;continue;case 9:$s=-1;return e;case 10:$s=1;continue;case 2:$s=-1;return 0;}return;}var $f={$blk:K.ptr.prototype.ExpFloat64,$c:true,$r,a,b,c,d,e,f,g,h,i,j,$s};return $f;};K.prototype.ExpFloat64=function(){return this.$val.ExpFloat64();};AM.methods=[{prop:"Seed",name:"Seed",pkg:"",typ:$funcType([$Int64],[],false)},{prop:"Int63",name:"Int63",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Uint64",name:"Uint64",pkg:"",typ:$funcType([],[$Uint64],false)}];AO.methods=[{prop:"Seed",name:"Seed",pkg:"",typ:$funcType([$Int64],[],false)},{prop:"Int63",name:"Int63",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Uint32",name:"Uint32",pkg:"",typ:$funcType([],[$Uint32],false)},{prop:"Uint64",name:"Uint64",pkg:"",typ:$funcType([],[$Uint64],false)},{prop:"Int31",name:"Int31",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"Int",name:"Int",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Int63n",name:"Int63n",pkg:"",typ:$funcType([$Int64],[$Int64],false)},{prop:"Int31n",name:"Int31n",pkg:"",typ:$funcType([$Int32],[$Int32],false)},{prop:"int31n",name:"int31n",pkg:"math/rand",typ:$funcType([$Int32],[$Int32],false)},{prop:"Intn",name:"Intn",pkg:"",typ:$funcType([$Int],[$Int],false)},{prop:"Float64",name:"Float64",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Float32",name:"Float32",pkg:"",typ:$funcType([],[$Float32],false)},{prop:"Perm",name:"Perm",pkg:"",typ:$funcType([$Int],[AS],false)},{prop:"Shuffle",name:"Shuffle",pkg:"",typ:$funcType([$Int,AU],[],false)},{prop:"Read",name:"Read",pkg:"",typ:$funcType([AV],[$Int,$error],false)},{prop:"NormFloat64",name:"NormFloat64",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"ExpFloat64",name:"ExpFloat64",pkg:"",typ:$funcType([],[$Float64],false)}];AN.methods=[{prop:"Int63",name:"Int63",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Uint64",name:"Uint64",pkg:"",typ:$funcType([],[$Uint64],false)},{prop:"Seed",name:"Seed",pkg:"",typ:$funcType([$Int64],[],false)},{prop:"seedPos",name:"seedPos",pkg:"math/rand",typ:$funcType([$Int64,AR],[],false)},{prop:"read",name:"read",pkg:"math/rand",typ:$funcType([AV,AT,AR],[$Int,$error],false)}];F.init("math/rand",[{prop:"tap",name:"tap",embedded:false,exported:false,typ:$Int,tag:""},{prop:"feed",name:"feed",embedded:false,exported:false,typ:$Int,tag:""},{prop:"vec",name:"vec",embedded:false,exported:false,typ:AQ,tag:""}]);H.init([{prop:"Int63",name:"Int63",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Seed",name:"Seed",pkg:"",typ:$funcType([$Int64],[],false)}]);I.init([{prop:"Int63",name:"Int63",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Seed",name:"Seed",pkg:"",typ:$funcType([$Int64],[],false)},{prop:"Uint64",name:"Uint64",pkg:"",typ:$funcType([],[$Uint64],false)}]);K.init("math/rand",[{prop:"src",name:"src",embedded:false,exported:false,typ:H,tag:""},{prop:"s64",name:"s64",embedded:false,exported:false,typ:I,tag:""},{prop:"readVal",name:"readVal",embedded:false,exported:false,typ:$Int64,tag:""},{prop:"readPos",name:"readPos",embedded:false,exported:false,typ:$Int8,tag:""}]);AE.init("math/rand",[{prop:"lk",name:"lk",embedded:false,exported:false,typ:B.Mutex,tag:""},{prop:"src",name:"src",embedded:false,exported:false,typ:AM,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=B.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}E=$toNativeArray($kindInt64,[new $Int64(-973649357,3952672746),new $Int64(-1065661887,3130416987),new $Int64(324977939,3414273807),new $Int64(1241840476,2806224363),new $Int64(-1477934308,1997590414),new $Int64(2103305448,2402795971),new $Int64(1663160183,1140819369),new $Int64(1120601685,1788868961),new $Int64(1848035537,1089001426),new $Int64(1235702047,873593504),new $Int64(1911387977,581324885),new $Int64(-1654874170,1609182556),new $Int64(1069394745,1241596776),new $Int64(1895445337,1771189259),new $Int64(-1374618802,3467012610),new $Int64(-140526423,2344407434),new $Int64(-1745367887,782467244),new $Int64(26335124,3404933915),new $Int64(1063924276,618867887),new $Int64(-968700782,520164395),new $Int64(-1591572833,1341358184),new $Int64(-1515085039,665794848),new $Int64(1527227641,3183648150),new $Int64(1781176124,696329606),new $Int64(1789146075,4151988961),new $Int64(-2087444114,998951326),new $Int64(-612324923,1364957564),new $Int64(63173359,4090230633),new $Int64(-1498029007,4009697548),new $Int64(248009524,2569622517),new $Int64(778703922,3742421481),new $Int64(-1109106023,1506914633),new $Int64(1738099768,1983412561),new $Int64(236311649,1436266083),new $Int64(-1111517500,3922894967),new $Int64(-1336974714,1792680179),new $Int64(563141142,1188796351),new $Int64(1349617468,405968250),new $Int64(1044074554,433754187),new $Int64(870549669,4073162024),new $Int64(-1094251604,433121399),new $Int64(2451824,4162580594),new $Int64(-137262572,4132415622),new $Int64(-1536231048,3033822028),new $Int64(2016407895,824682382),new $Int64(2366218,3583765414),new $Int64(-624604839,535386927),new $Int64(1637219058,2286693689),new $Int64(1453075389,2968466525),new $Int64(193683513,1351410206),new $Int64(-283806096,1412813499),new $Int64(492736522,4126267639),new $Int64(512765208,2105529399),new $Int64(2132966268,2413882233),new $Int64(947457634,32226200),new $Int64(1149341356,2032329073),new $Int64(106485445,1356518208),new $Int64(-2067810156,3430061722),new $Int64(-1484435135,3820169661),new $Int64(-1665985194,2981816134),new $Int64(1017155588,4184371017),new $Int64(206574701,2119206761),new $Int64(-852109057,2472200560),new $Int64(-560457548,2853524696),new $Int64(1307803389,1681119904),new $Int64(-174986835,95608918),new $Int64(392686347,3690479145),new $Int64(-1205570926,1397922290),new $Int64(-1159314025,1516129515),new $Int64(-320178155,1547420459),new $Int64(1311333971,1470949486),new $Int64(-1953469798,1336785672),new $Int64(-45086614,4131677129),new $Int64(-1392278100,4246329084),new $Int64(-1142500187,3788585631),new $Int64(-66478285,3080389532),new $Int64(-646438364,2215402037),new $Int64(391002300,1171593935),new $Int64(1408774047,1423855166),new $Int64(-519177718,2276716302),new $Int64(-368453140,2068027241),new $Int64(1369359303,3427553297),new $Int64(189241615,3289637845),new $Int64(1057480830,3486407650),new $Int64(-1512910664,3071877822),new $Int64(1159653919,3363620705),new $Int64(-934256930,4159821533),new $Int64(-76621938,1894661),new $Int64(-674493898,1156868282),new $Int64(348271067,776219088),new $Int64(-501428838,2425634259),new $Int64(1716021749,680510161),new $Int64(-574263456,1310101429),new $Int64(1095885995,2964454134),new $Int64(-325695512,3467098407),new $Int64(1990672920,2109628894),new $Int64(-2139648704,1232604732),new $Int64(-1838070714,3261916179),new $Int64(1699175360,434597899),new $Int64(235436061,1624796439),new $Int64(-1626402839,3589632480),new $Int64(1198416575,864579159),new $Int64(-1938748161,1380889830),new $Int64(619206309,2654509477),new $Int64(1419738251,1468209306),new $Int64(-1744284772,100794388),new $Int64(-1191421458,2991674471),new $Int64(-208666741,2224662036),new $Int64(-173659161,977097250),new $Int64(1351320195,726419512),new $Int64(-183459897,1747974366),new $Int64(-753095183,1556430604),new $Int64(-1049492215,1080776742),new $Int64(-385846958,280794874),new $Int64(117767733,919835643),new $Int64(-967009426,3434019658),new $Int64(-1951414480,2461941785),new $Int64(133215641,3615001066),new $Int64(417204809,3103414427),new $Int64(790056561,3380809712),new $Int64(-1267681408,2724693469),new $Int64(547796833,598827710),new $Int64(-1846559452,3452273442),new $Int64(-75778224,649274915),new $Int64(-801301329,2585724112),new $Int64(-1510934263,3165579553),new $Int64(1185578221,2635894283),new $Int64(-52910178,2053289721),new $Int64(985976581,3169337108),new $Int64(1170569632,144717764),new $Int64(1079216270,1383666384),new $Int64(-124804942,681540375),new $Int64(1375448925,537050586),new $Int64(-1964768344,315246468),new $Int64(226402871,849323088),new $Int64(-885062465,45543944),new $Int64(-946445250,2319052083),new $Int64(-40708194,3613090841),new $Int64(560472520,2992171180),new $Int64(-381863169,2068244785),new $Int64(917538188,4239862634),new $Int64(-1369555809,3892253031),new $Int64(720683925,958186149),new $Int64(-423297785,1877702262),new $Int64(1357886971,837674867),new $Int64(1837048883,1507589294),new $Int64(1905518400,873336795),new $Int64(-1879761037,2764496274),new $Int64(-1806480530,4196182374),new $Int64(-1066765755,550964545),new $Int64(818747069,420611474),new $Int64(-1924830376,204265180),new $Int64(1549974541,1787046383),new $Int64(1215581865,3102292318),new $Int64(418321538,1552199393),new $Int64(1243493047,980542004),new $Int64(267284263,3293718720),new $Int64(1179528763,3771917473),new $Int64(599484404,2195808264),new $Int64(252818753,3894702887),new $Int64(-1367475956,2099949527),new $Int64(1424094358,338442522),new $Int64(490737398,637158004),new $Int64(-1727621530,281976339),new $Int64(574970164,3619802330),new $Int64(-431930823,3084554784),new $Int64(-1264611183,4129772886),new $Int64(-2104399043,1680378557),new $Int64(-1621962591,3339087776),new $Int64(1680500332,4220317857),new $Int64(-1935828963,2959322499),new $Int64(1675600481,1488354890),new $Int64(-834863562,3958162143),new $Int64(-1226511573,2773705983),new $Int64(1876039582,225908689),new $Int64(-1183735113,908216283),new $Int64(-605696219,3574646075),new $Int64(-1827723091,1936937569),new $Int64(1519770881,75492235),new $Int64(816689472,1935193178),new $Int64(2142521206,2018250883),new $Int64(455141620,3943126022),new $Int64(-601399488,3066544345),new $Int64(1932392669,2793082663),new $Int64(-1239009361,3297036421),new $Int64(1640597065,2206987825),new $Int64(-553246738,807894872),new $Int64(-1781325307,766252117),new $Int64(2060649606,3833114345),new $Int64(845619743,1255067973),new $Int64(1201145605,741697208),new $Int64(-1476242608,2810093753),new $Int64(1109032642,4229340371),new $Int64(1462188720,1361684224),new $Int64(-1159399429,1906263026),new $Int64(475781207,3904421704),new $Int64(-623537128,1769075545),new $Int64(1062308525,2621599764),new $Int64(1279509432,3431891480),new $Int64(-1742751146,1871896503),new $Int64(128756421,1412808876),new $Int64(1605404688,952876175),new $Int64(-230443691,1824438899),new $Int64(1662295856,1005035476),new $Int64(-156574141,527508597),new $Int64(1288873303,3066806859),new $Int64(565995893,3244940914),new $Int64(-889746188,209092916),new $Int64(-247669406,1242699167),new $Int64(-713830396,456723774),new $Int64(1776978905,1001252870),new $Int64(1468772157,2026725874),new $Int64(857254202,2137562569),new $Int64(765939740,3183366709),new $Int64(1533887628,2612072960),new $Int64(56977098,1727148468),new $Int64(-1197583895,3803658212),new $Int64(1883670356,479946959),new $Int64(685713571,1562982345),new $Int64(-1946242443,1766109365),new $Int64(700596547,3257093788),new $Int64(-184714929,2365720207),new $Int64(93384808,3742754173),new $Int64(-458385235,2878193673),new $Int64(1096135042,2174002182),new $Int64(-834260953,3573511231),new $Int64(-754572527,1760299077),new $Int64(-1375627191,2260779833),new $Int64(-866019274,1452805722),new $Int64(-1229671918,2940011802),new $Int64(1890251082,1886183802),new $Int64(893897673,2514369088),new $Int64(1644345561,3924317791),new $Int64(-1974867432,500935732),new $Int64(1403501753,676580929),new $Int64(-1565912283,1184984890),new $Int64(-691968413,1271474274),new $Int64(-1828754738,3163791473),new $Int64(2051027584,2842487377),new $Int64(1511537551,2170968612),new $Int64(573262976,3535856740),new $Int64(-2053227187,1488599718),new $Int64(-1180531831,3408913763),new $Int64(-2086531912,2501050084),new $Int64(-875130448,1639124157),new $Int64(-2009482504,4088176393),new $Int64(1574896563,3989947576),new $Int64(-165243708,3414355209),new $Int64(-792329287,2275136352),new $Int64(-2057774345,2151835223),new $Int64(-931144933,1654534827),new $Int64(-679921451,377892833),new $Int64(-482716010,660204544),new $Int64(85706799,390828249),new $Int64(-1422172693,3402783878),new $Int64(-1468634160,3717936603),new $Int64(1113532086,2211058823),new $Int64(1564224320,2692150867),new $Int64(1952770442,1928910388),new $Int64(788716862,3931011137),new $Int64(1083670504,1112701047),new $Int64(-68150572,2452299106),new $Int64(-896164822,2337204777),new $Int64(1774877857,273889282),new $Int64(1798719843,1462008793),new $Int64(2138834788,1554494002),new $Int64(-1194967131,182675323),new $Int64(-1598554764,1882802136),new $Int64(589279648,3700220025),new $Int64(381039426,3083431543),new $Int64(-851859191,3622207527),new $Int64(338126939,432729309),new $Int64(-1667470126,2391914317),new $Int64(-1849558151,235747924),new $Int64(2120733629,3088823825),new $Int64(-745079795,2314658321),new $Int64(1165929723,2957634338),new $Int64(501323675,4117056981),new $Int64(1564699815,1482500298),new $Int64(-740826490,840489337),new $Int64(799522364,3483178565),new $Int64(532129761,2074004656),new $Int64(724246478,3643392642),new $Int64(-665153481,1583624461),new $Int64(-885822954,287473085),new $Int64(1667835381,3136843981),new $Int64(1138806821,1266970974),new $Int64(135185781,1998688839),new $Int64(392094735,1492900209),new $Int64(1031326774,1538112737),new $Int64(-2070568842,2207265429),new $Int64(-1886797613,963263315),new $Int64(1671145500,2295892134),new $Int64(1068469660,2002560897),new $Int64(-356250305,1369254035),new $Int64(33436120,3353312708),new $Int64(57507843,947771099),new $Int64(-1945755145,1747061399),new $Int64(1507240140,2047354631),new $Int64(720000810,4165367136),new $Int64(479265078,3388864963),new $Int64(-952181250,286492130),new $Int64(2045622690,2795735007),new $Int64(-715730566,3703961339),new $Int64(-148436487,1797825479),new $Int64(1429039600,1116589674),new $Int64(-1665420098,2593309206),new $Int64(1329049334,3404995677),new $Int64(-750579440,3453462936),new $Int64(1014767077,3016498634),new $Int64(75698599,1650371545),new $Int64(1592007860,212344364),new $Int64(1127766888,3843932156),new $Int64(-748019856,3573129983),new $Int64(-890581831,665897820),new $Int64(1071492673,1675628772),new $Int64(243225682,2831752928),new $Int64(2120298836,1486294219),new $Int64(-1954407413,268782709),new $Int64(-1002123503,4186179080),new $Int64(624342951,1613720397),new $Int64(857179861,2703686015),new $Int64(-911618704,2205342611),new $Int64(-672703993,1411666394),new $Int64(-1528454899,677744900),new $Int64(-1876628533,4172867247),new $Int64(135494707,2163418403),new $Int64(849547544,2841526879),new $Int64(-1117516959,1082141470),new $Int64(-1770111792,4046134367),new $Int64(51415528,2142943655),new $Int64(-249824333,3124627521),new $Int64(998228909,219992939),new $Int64(-1078790951,1756846531),new $Int64(1283749206,1225118210),new $Int64(-525858006,1647770243),new $Int64(-2035959705,444807907),new $Int64(2036369448,3952076173),new $Int64(53201823,1461839639),new $Int64(315761893,3699250910),new $Int64(702974850,1373688981),new $Int64(734022261,147523747),new $Int64(-2047330906,1211276581),new $Int64(1294440951,2548832680),new $Int64(1144696256,1995631888),new $Int64(-1992983070,2011457303),new $Int64(-1351022674,3057425772),new $Int64(667839456,81484597),new $Int64(-1681980888,3646681560),new $Int64(-1372462725,635548515),new $Int64(602489502,2508044581),new $Int64(-1794220117,1014917157),new $Int64(719992433,3214891315),new $Int64(-1294799037,959582252),new $Int64(226415134,3347040449),new $Int64(-362868096,4102971975),new $Int64(397887437,4078022210),new $Int64(-536803826,2851767182),new $Int64(-1398321012,1540160644),new $Int64(-1549098876,1057290595),new $Int64(-112592988,3907769253),new $Int64(579300318,4248952684),new $Int64(-1054576049,132554364),new $Int64(-1085862414,1029351092),new $Int64(697840928,2583007416),new $Int64(298619124,1486185789),new $Int64(55905697,2871589073),new $Int64(2017643612,723203291),new $Int64(146250550,2494333952),new $Int64(-1082993397,2230939180),new $Int64(-1804568072,3943232912),new $Int64(1768732449,2181367922),new $Int64(-729261111,2889274791),new $Int64(1824032949,2046728161),new $Int64(1653899792,1376052477),new $Int64(1022327048,381236993),new $Int64(-1113097690,3188942166),new $Int64(-74480109,350070824),new $Int64(144881592,61758415),new $Int64(-741824226,3492950336),new $Int64(-2030042720,3093818430),new $Int64(-453590535,2962480613),new $Int64(-1912050708,3154871160),new $Int64(-1636478569,3228564679),new $Int64(610731502,888276216),new $Int64(-946702974,3574998604),new $Int64(-1277068380,1967526716),new $Int64(-1556147941,1554691298),new $Int64(-1573024234,339944798),new $Int64(1223764147,1154515356),new $Int64(1825645307,967516237),new $Int64(1546195135,596588202),new $Int64(-1867600880,3764362170),new $Int64(-1655392592,266611402),new $Int64(-393255880,2047856075),new $Int64(-1000726433,21444105),new $Int64(-949424754,3065563181),new $Int64(-232418803,1140663212),new $Int64(633187674,2323741028),new $Int64(2126290159,3103873707),new $Int64(1008658319,2766828349),new $Int64(-485587503,1970872996),new $Int64(1628585413,3766615585),new $Int64(-595148528,2036813414),new $Int64(-1994877121,3105536507),new $Int64(13954645,3396176938),new $Int64(-721402003,1377154485),new $Int64(-61839181,3807014186),new $Int64(543009040,3710110597),new $Int64(-1751425519,916420443),new $Int64(734556788,2103831255),new $Int64(-1766161494,717331943),new $Int64(-1574598896,3550505941),new $Int64(45939673,378749927),new $Int64(-1997615719,611017331),new $Int64(592130075,758907650),new $Int64(1012992349,154266815),new $Int64(-1040454942,1407468696),new $Int64(-1678191250,970098704),new $Int64(-285057486,1971660656),new $Int64(998365243,3332747885),new $Int64(1947089649,1935189867),new $Int64(1510248801,203520055),new $Int64(-1305165746,3916463034),new $Int64(-388598655,3474113316),new $Int64(1036101639,316544223),new $Int64(-1773744891,1650844677),new $Int64(-907191419,4267565603),new $Int64(-1070275024,2501167616),new $Int64(-1520651863,3929401789),new $Int64(-2091360852,337170252),new $Int64(-960502090,2061966842),new $Int64(-304190848,2508461464),new $Int64(-1941471116,2791377107),new $Int64(1240791848,1227227588),new $Int64(1813978778,1709681848),new $Int64(1153692192,3768820575),new $Int64(-1002297449,2887126398),new $Int64(-1447111334,296561685),new $Int64(700300844,3729960077),new $Int64(-1572311344,372833036),new $Int64(2078875613,2409779288),new $Int64(1829161290,555274064),new $Int64(-1105595719,4239804901),new $Int64(1839403216,3723486978),new $Int64(-1649093095,2145871984),new $Int64(-1582765715,3565480803),new $Int64(-1568653827,2197313814),new $Int64(974785092,3613674566),new $Int64(438638731,3042093666),new $Int64(-96556264,3324034321),new $Int64(869420878,3708873369),new $Int64(946682149,1698090092),new $Int64(1618900382,4213940712),new $Int64(-1843479747,2087477361),new $Int64(-1766167800,2407950639),new $Int64(-1296225558,3942568569),new $Int64(-1223900450,4088074412),new $Int64(723260036,2964773675),new $Int64(-673921829,1539178386),new $Int64(1062961552,2694849566),new $Int64(460977733,2120273838),new $Int64(-1604570740,2484608657),new $Int64(880846449,2956190677),new $Int64(1970902366,4223313749),new $Int64(662161910,3502682327),new $Int64(705634754,4133891139),new $Int64(-1031359300,1166449596),new $Int64(1038247601,3362705993),new $Int64(93734798,3892921029),new $Int64(1876124043,786869787),new $Int64(1057490746,1046342263),new $Int64(242763728,493777327),new $Int64(-853573201,3304827646),new $Int64(616460742,125356352),new $Int64(499300063,74094113),new $Int64(-795586925,2500816079),new $Int64(-490248444,514015239),new $Int64(1377565129,543520454),new $Int64(-2039776725,3614531153),new $Int64(2056746300,2356753985),new $Int64(1390062617,2018141668),new $Int64(131272971,2087974891),new $Int64(-1502927041,3166972343),new $Int64(372256200,1517638666),new $Int64(-935275664,173466846),new $Int64(-695774461,4241513471),new $Int64(-1413550842,2783126920),new $Int64(1972004134,4167264826),new $Int64(29260506,3907395640),new $Int64(-910901561,1539634186),new $Int64(-595957298,178241987),new $Int64(-113277636,182168164),new $Int64(-1102530459,2386154934),new $Int64(1379126408,4077374341),new $Int64(-2114679722,1732699140),new $Int64(-421057745,1041306002),new $Int64(1860414813,2068001749),new $Int64(1005320202,3208962910),new $Int64(844054010,697710380),new $Int64(-1509359403,2228431183),new $Int64(-810313977,3554678728),new $Int64(-750989047,173470263),new $Int64(-85886265,3848297795),new $Int64(-926936977,246236185),new $Int64(-1984190461,2066374846),new $Int64(1771673660,312890749),new $Int64(703378057,3573310289),new $Int64(-598851901,143166754),new $Int64(613554316,2081511079),new $Int64(1197802104,486038032),new $Int64(-1906483789,2982218564),new $Int64(364901986,1000939191),new $Int64(1902782651,2750454885),new $Int64(-671844857,3375313137),new $Int64(-1643868040,881302957),new $Int64(-1508784745,2514186393),new $Int64(-1703622845,360024739),new $Int64(1399671872,292500025),new $Int64(1381210821,2276300752),new $Int64(521803381,4069087683),new $Int64(-1938982667,1637778212),new $Int64(720490469,1676670893),new $Int64(1067262482,3855174429),new $Int64(2114075974,2067248671),new $Int64(-89426259,2884561259),new $Int64(-805741095,2456511185),new $Int64(983726246,561175414),new $Int64(-1719489563,432588903),new $Int64(885133709,4059399550),new $Int64(-93096266,1075014784),new $Int64(-1733832628,2728058415),new $Int64(1839142064,1299703678),new $Int64(1262333188,2347583393),new $Int64(1285481956,2468164145),new $Int64(-1158354011,1140014346),new $Int64(2033889184,1936972070),new $Int64(-1737578993,3870530098),new $Int64(-484494257,1717789158),new $Int64(-232997156,1153452491),new $Int64(-990424416,3948827651),new $Int64(-1357145630,2101413152),new $Int64(1495744672,3854091229),new $Int64(83644069,4215565463),new $Int64(-1385277313,1202710438),new $Int64(-564909037,2072216740),new $Int64(705690639,2066751068),new $Int64(-2113583312,173902580),new $Int64(-741983806,142459001),new $Int64(172391592,1889151926),new $Int64(-498943125,3034199774),new $Int64(1618587731,516490102),new $Int64(93114264,3692577783),new $Int64(-2078821353,2953948865),new $Int64(-320938673,4041040923),new $Int64(-1942517976,592046130),new $Int64(-705643640,384297211),new $Int64(-2051649464,265863924),new $Int64(2101717619,1333136237),new $Int64(1499611781,1406273556),new $Int64(1074670496,426305476),new $Int64(125704633,2750898176),new $Int64(488068495,1633944332),new $Int64(2037723464,3236349343),new $Int64(-1703423246,4013676611),new $Int64(1718532237,2265047407),new $Int64(1433593806,875071080),new $Int64(-343047503,1418843655),new $Int64(2009228711,451657300),new $Int64(1229446621,1866374663),new $Int64(1653472867,1551455622),new $Int64(577191481,3560962459),new $Int64(1669204077,3347903778),new $Int64(-298327194,2675874918),new $Int64(-1831355577,2762991672),new $Int64(530492383,3689068477),new $Int64(844089962,4071997905),new $Int64(1508155730,1381702441),new $Int64(2089931018,2373284878),new $Int64(-864267462,2143983064),new $Int64(308739063,1938207195),new $Int64(1754949306,1188152253),new $Int64(1272345009,615870490),new $Int64(742653194,2662252621),new $Int64(1477718295,3839976789),new $Int64(-2091334213,306752547),new $Int64(-1426688067,2162363077),new $Int64(-57052633,2767224719),new $Int64(-1471624099,2628837712),new $Int64(1678405918,2967771969),new $Int64(1694285728,499792248),new $Int64(-1744131281,4285253508),new $Int64(962357072,2856511070),new $Int64(679471692,2526409716),new $Int64(-1793706473,1240875658),new $Int64(-914893422,2577342868),new $Int64(-1001298215,4136853496),new $Int64(-1477114974,2403540137),new $Int64(1372824515,1371410668),new $Int64(-176562048,371758825),new $Int64(-441063112,1528834084),new $Int64(-71688630,1504757260),new $Int64(-1461820072,699052551),new $Int64(-505543539,3347789870),new $Int64(1951619734,3430604759),new $Int64(2119672219,1935601723),new $Int64(966789690,834676166)]);N=L(new AE.ptr(new B.Mutex.ptr(false,false,false,false,0),$assertType(J(new $Int64(0,1)),AM)));AG=$toNativeArray($kindUint32,[1991057938,0,1611602771,1826899878,1918584482,1969227037,2001281515,2023368125,2039498179,2051788381,2061460127,2069267110,2075699398,2081089314,2085670119,2089610331,2093034710,2096037586,2098691595,2101053571,2103168620,2105072996,2106796166,2108362327,2109791536,2111100552,2112303493,2113412330,2114437283,2115387130,2116269447,2117090813,2117856962,2118572919,2119243101,2119871411,2120461303,2121015852,2121537798,2122029592,2122493434,2122931299,2123344971,2123736059,2124106020,2124456175,2124787725,2125101763,2125399283,2125681194,2125948325,2126201433,2126441213,2126668298,2126883268,2127086657,2127278949,2127460589,2127631985,2127793506,2127945490,2128088244,2128222044,2128347141,2128463758,2128572095,2128672327,2128764606,2128849065,2128925811,2128994934,2129056501,2129110560,2129157136,2129196237,2129227847,2129251929,2129268426,2129277255,2129278312,2129271467,2129256561,2129233410,2129201800,2129161480,2129112170,2129053545,2128985244,2128906855,2128817916,2128717911,2128606255,2128482298,2128345305,2128194452,2128028813,2127847342,2127648860,2127432031,2127195339,2126937058,2126655214,2126347546,2126011445,2125643893,2125241376,2124799783,2124314271,2123779094,2123187386,2122530867,2121799464,2120980787,2120059418,2119015917,2117825402,2116455471,2114863093,2112989789,2110753906,2108037662,2104664315,2100355223,2094642347,2086670106,2074676188,2054300022,2010539237]);AH=$toNativeArray($kindFloat32,[1.7290404663583558e-09,1.2680928529462676e-10,1.689751810696194e-10,1.9862687883343e-10,2.223243117382978e-10,2.4244936613904144e-10,2.601613091623989e-10,2.761198769629658e-10,2.9073962681813725e-10,3.042996965518796e-10,3.169979556627567e-10,3.289802041894774e-10,3.4035738116777736e-10,3.5121602848242617e-10,3.61625090983253e-10,3.7164057942185025e-10,3.813085680537398e-10,3.906675816178762e-10,3.997501218933053e-10,4.0858399996679395e-10,4.1719308563337165e-10,4.255982233303257e-10,4.3381759295968436e-10,4.4186720948857783e-10,4.497613115272969e-10,4.57512583373898e-10,4.6513240481438345e-10,4.726310454117311e-10,4.800177477726209e-10,4.873009773476156e-10,4.944885056978876e-10,5.015873272284921e-10,5.086040477664255e-10,5.155446070048697e-10,5.224146670812502e-10,5.292193350214802e-10,5.359634958068682e-10,5.426517013518151e-10,5.492881705038144e-10,5.558769555769061e-10,5.624218868405251e-10,5.689264614971989e-10,5.75394121238304e-10,5.818281967329142e-10,5.882316855831959e-10,5.946076964136182e-10,6.009590047817426e-10,6.072883862451306e-10,6.135985053390414e-10,6.19892026598734e-10,6.261713370037114e-10,6.324390455780815e-10,6.386973727678935e-10,6.449488165749528e-10,6.511955974453087e-10,6.574400468473129e-10,6.636843297158634e-10,6.699307220081607e-10,6.761814441702541e-10,6.824387166481927e-10,6.887046488657234e-10,6.949815167800466e-10,7.012714853260604e-10,7.075767749498141e-10,7.13899661608508e-10,7.202424212593428e-10,7.266072743483676e-10,7.329966078550854e-10,7.394128087589991e-10,7.458582640396116e-10,7.523354716987285e-10,7.588469852493063e-10,7.653954137154528e-10,7.719834771435785e-10,7.786139510912449e-10,7.852897221383159e-10,7.920137878869582e-10,7.987892014504894e-10,8.056192379868321e-10,8.125072836762115e-10,8.194568912323064e-10,8.264716688799467e-10,8.3355555791087e-10,8.407127216614185e-10,8.479473234679347e-10,8.552640262671218e-10,8.626675485068347e-10,8.701631637464402e-10,8.777562010564566e-10,8.854524335966119e-10,8.932581896381464e-10,9.011799639857543e-10,9.092249730890956e-10,9.174008219758889e-10,9.25715837318819e-10,9.341788453909317e-10,9.42799727177146e-10,9.515889187738935e-10,9.605578554783278e-10,9.697193048552322e-10,9.790869226478094e-10,9.886760299337993e-10,9.985036131254788e-10,1.008588212947359e-09,1.0189509236369076e-09,1.0296150598776421e-09,1.040606933955246e-09,1.0519566329136865e-09,1.0636980185552147e-09,1.0758701707302976e-09,1.0885182755160372e-09,1.101694735439196e-09,1.115461056855338e-09,1.1298901814171813e-09,1.1450695946990663e-09,1.1611052119775422e-09,1.178127595480305e-09,1.1962995039027646e-09,1.2158286599728285e-09,1.2369856250415978e-09,1.2601323318151003e-09,1.2857697129220469e-09,1.3146201904845611e-09,1.3477839955200466e-09,1.3870635751089821e-09,1.43574030442295e-09,1.5008658760251592e-09,1.6030947680434338e-09]);AI=$toNativeArray($kindFloat32,[1,0.963599681854248,0.9362826943397522,0.9130436182022095,0.8922816514968872,0.8732430338859558,0.8555005788803101,0.8387836217880249,0.8229072093963623,0.8077383041381836,0.7931770086288452,0.7791460752487183,0.7655841708183289,0.7524415850639343,0.7396772503852844,0.7272568941116333,0.7151514887809753,0.7033361196517944,0.6917891502380371,0.6804918646812439,0.6694276928901672,0.6585819721221924,0.6479418277740479,0.6374954581260681,0.6272324919700623,0.6171433925628662,0.6072195172309875,0.5974531769752502,0.5878370404243469,0.5783646702766418,0.5690299868583679,0.5598273873329163,0.550751805305481,0.5417983531951904,0.5329626798629761,0.5242405533790588,0.5156282186508179,0.5071220397949219,0.49871864914894104,0.4904148280620575,0.48220765590667725,0.47409430146217346,0.466072142124176,0.45813870429992676,0.45029163360595703,0.44252872467041016,0.4348478317260742,0.42724698781967163,0.41972434520721436,0.41227802634239197,0.40490642189979553,0.39760786294937134,0.3903807997703552,0.3832238018512726,0.3761354684829712,0.3691144585609436,0.36215949058532715,0.3552693724632263,0.3484429717063904,0.3416791558265686,0.33497685194015503,0.32833510637283325,0.3217529058456421,0.3152293860912323,0.30876362323760986,0.3023548424243927,0.2960021495819092,0.2897048592567444,0.28346219658851624,0.2772735059261322,0.271138072013855,0.2650552988052368,0.25902456045150757,0.25304529070854187,0.24711695313453674,0.24123899638652802,0.23541094362735748,0.22963231801986694,0.22390270233154297,0.21822164952754974,0.21258877217769623,0.20700371265411377,0.20146611332893372,0.1959756463766098,0.19053204357624054,0.18513499200344086,0.17978426814079285,0.1744796335697174,0.16922089457511902,0.16400785744190216,0.1588403731584549,0.15371830761432648,0.14864157140254974,0.14361007511615753,0.13862377405166626,0.13368265330791473,0.12878671288490295,0.12393598258495331,0.11913054436445236,0.11437050998210907,0.10965602099895477,0.1049872562289238,0.10036443918943405,0.09578784555196762,0.09125780314207077,0.08677466958761215,0.08233889937400818,0.07795098423957825,0.07361150532960892,0.06932111829519272,0.06508058309555054,0.06089077144861221,0.05675266310572624,0.05266740173101425,0.048636294901371,0.044660862535238266,0.040742866694927216,0.03688438981771469,0.03308788686990738,0.029356317594647408,0.025693291798233986,0.02210330404341221,0.018592102453112602,0.015167297795414925,0.011839478276669979,0.0086244847625494,0.005548994988203049,0.0026696291752159595]);AJ=$toNativeArray($kindUint32,[3801129273,0,2615860924,3279400049,3571300752,3733536696,3836274812,3906990442,3958562475,3997804264,4028649213,4053523342,4074002619,4091154507,4105727352,4118261130,4129155133,4138710916,4147160435,4154685009,4161428406,4167506077,4173011791,4178022498,4182601930,4186803325,4190671498,4194244443,4197554582,4200629752,4203493986,4206168142,4208670408,4211016720,4213221098,4215295924,4217252177,4219099625,4220846988,4222502074,4224071896,4225562770,4226980400,4228329951,4229616109,4230843138,4232014925,4233135020,4234206673,4235232866,4236216336,4237159604,4238064994,4238934652,4239770563,4240574564,4241348362,4242093539,4242811568,4243503822,4244171579,4244816032,4245438297,4246039419,4246620374,4247182079,4247725394,4248251127,4248760037,4249252839,4249730206,4250192773,4250641138,4251075867,4251497493,4251906522,4252303431,4252688672,4253062674,4253425844,4253778565,4254121205,4254454110,4254777611,4255092022,4255397640,4255694750,4255983622,4256264513,4256537670,4256803325,4257061702,4257313014,4257557464,4257795244,4258026541,4258251531,4258470383,4258683258,4258890309,4259091685,4259287526,4259477966,4259663135,4259843154,4260018142,4260188212,4260353470,4260514019,4260669958,4260821380,4260968374,4261111028,4261249421,4261383632,4261513736,4261639802,4261761900,4261880092,4261994441,4262105003,4262211835,4262314988,4262414513,4262510454,4262602857,4262691764,4262777212,4262859239,4262937878,4263013162,4263085118,4263153776,4263219158,4263281289,4263340187,4263395872,4263448358,4263497660,4263543789,4263586755,4263626565,4263663224,4263696735,4263727099,4263754314,4263778377,4263799282,4263817020,4263831582,4263842955,4263851124,4263856071,4263857776,4263856218,4263851370,4263843206,4263831695,4263816804,4263798497,4263776735,4263751476,4263722676,4263690284,4263654251,4263614520,4263571032,4263523724,4263472530,4263417377,4263358192,4263294892,4263227394,4263155608,4263079437,4262998781,4262913534,4262823581,4262728804,4262629075,4262524261,4262414220,4262298801,4262177846,4262051187,4261918645,4261780032,4261635148,4261483780,4261325704,4261160681,4260988457,4260808763,4260621313,4260425802,4260221905,4260009277,4259787550,4259556329,4259315195,4259063697,4258801357,4258527656,4258242044,4257943926,4257632664,4257307571,4256967906,4256612870,4256241598,4255853155,4255446525,4255020608,4254574202,4254106002,4253614578,4253098370,4252555662,4251984571,4251383021,4250748722,4250079132,4249371435,4248622490,4247828790,4246986404,4246090910,4245137315,4244119963,4243032411,4241867296,4240616155,4239269214,4237815118,4236240596,4234530035,4232664930,4230623176,4228378137,4225897409,4223141146,4220059768,4216590757,4212654085,4208145538,4202926710,4196809522,4189531420,4180713890,4169789475,4155865042,4137444620,4111806704,4073393724,4008685917,3873074895]);AK=$toNativeArray($kindFloat32,[2.0249555365836613e-09,1.4866739783681027e-11,2.4409616689036184e-11,3.1968806074589295e-11,3.844677007314168e-11,4.42282044321729e-11,4.951644302919611e-11,5.443358958023836e-11,5.905943789574764e-11,6.34494193296753e-11,6.764381416113352e-11,7.167294535648239e-11,7.556032188826833e-11,7.932458162551725e-11,8.298078890689453e-11,8.654132271912474e-11,9.001651507523079e-11,9.341507428706208e-11,9.674443190998971e-11,1.0001099254308699e-10,1.0322031424037093e-10,1.0637725422757427e-10,1.0948611461891744e-10,1.1255067711157807e-10,1.1557434870246297e-10,1.1856014781042035e-10,1.2151082917633005e-10,1.2442885610752796e-10,1.2731647680563896e-10,1.3017574518325858e-10,1.330085347417409e-10,1.3581656632677408e-10,1.386014220061682e-10,1.413645728254309e-10,1.4410737880776736e-10,1.4683107507629245e-10,1.4953686899854546e-10,1.522258291641876e-10,1.5489899640730442e-10,1.575573282952547e-10,1.6020171300645814e-10,1.628330109637588e-10,1.6545202707884954e-10,1.68059510752272e-10,1.7065616975120435e-10,1.73242697965037e-10,1.758197337720091e-10,1.783878739169964e-10,1.8094774290045024e-10,1.834998542005195e-10,1.8604476292871652e-10,1.8858298256319017e-10,1.9111498494872592e-10,1.9364125580789704e-10,1.9616222535212557e-10,1.9867835154840918e-10,2.011900368525943e-10,2.0369768372052732e-10,2.062016807302669e-10,2.0870240258208383e-10,2.1120022397624894e-10,2.136955057352452e-10,2.1618855317040442e-10,2.1867974098199738e-10,2.2116936060356807e-10,2.2365774510202385e-10,2.2614519978869652e-10,2.2863201609713002e-10,2.3111849933865614e-10,2.3360494094681883e-10,2.3609159072179864e-10,2.3857874009713953e-10,2.4106666662859766e-10,2.4355562011635357e-10,2.460458781161634e-10,2.485376904282077e-10,2.5103127909709144e-10,2.5352694943414633e-10,2.560248957284017e-10,2.585253955356137e-10,2.610286709003873e-10,2.6353494386732734e-10,2.6604446423661443e-10,2.6855745405285347e-10,2.71074163116225e-10,2.7359478571575835e-10,2.7611959940720965e-10,2.786487707240326e-10,2.8118254946640775e-10,2.8372118543451563e-10,2.8626484516180994e-10,2.8881380620404684e-10,2.9136826285025563e-10,2.9392840938946563e-10,2.96494523377433e-10,2.990667713476114e-10,3.016454031001814e-10,3.042306406797479e-10,3.068226783753403e-10,3.09421765987139e-10,3.12028125559749e-10,3.1464195138219964e-10,3.17263521010247e-10,3.1989300097734485e-10,3.225306410836737e-10,3.2517669112941405e-10,3.2783134540359526e-10,3.3049485370639786e-10,3.3316743808242677e-10,3.3584937608743815e-10,3.385408342548857e-10,3.4124211789610115e-10,3.4395342130011386e-10,3.4667499426710435e-10,3.494071143528288e-10,3.521500313574677e-10,3.54903967325626e-10,3.576691720574843e-10,3.6044595086437425e-10,3.632345535464765e-10,3.660352021483959e-10,3.688482297370399e-10,3.716738583570134e-10,3.7451239331964814e-10,3.773641121807003e-10,3.802292924959261e-10,3.831082673322328e-10,3.8600128648980103e-10,3.8890865527996255e-10,3.9183070676962473e-10,3.9476774627011935e-10,3.977200790927782e-10,4.006880383045086e-10,4.0367195697221803e-10,4.066721681628138e-10,4.0968900494320337e-10,4.127228558914453e-10,4.15774054074447e-10,4.188429603146915e-10,4.2192993543466173e-10,4.25035395767992e-10,4.2815970213716525e-10,4.313032986313914e-10,4.3446651831757777e-10,4.376498607960855e-10,4.408536868893975e-10,4.4407846844229937e-10,4.4732464954400086e-10,4.5059267428371186e-10,4.538830145062178e-10,4.5719619756745544e-10,4.605326675566346e-10,4.638929240741163e-10,4.672775499869886e-10,4.706869893844612e-10,4.74121908400349e-10,4.775827511238617e-10,4.810701836888143e-10,4.845848167178701e-10,4.881271498113904e-10,4.916979601254923e-10,4.952977472605369e-10,4.989272883726414e-10,5.025872495956207e-10,5.062783525744408e-10,5.100013189540675e-10,5.13756870379467e-10,5.175458395179078e-10,5.21369003525507e-10,5.252272505806843e-10,5.29121357839557e-10,5.330522134805449e-10,5.3702081670437e-10,5.41028055689452e-10,5.450749851476644e-10,5.491624932574268e-10,5.532918012640664e-10,5.574638528571541e-10,5.616799247931681e-10,5.659410717839819e-10,5.702485705860738e-10,5.746036979559221e-10,5.790077306500052e-10,5.83462111958255e-10,5.879682296594524e-10,5.925275825546805e-10,5.971417249561739e-10,6.01812211176167e-10,6.065408175714992e-10,6.113292094767075e-10,6.16179329782085e-10,6.21092954844471e-10,6.260721940876124e-10,6.311191569352559e-10,6.362359528111483e-10,6.414249686947926e-10,6.466885360545405e-10,6.520292639144998e-10,6.574497612987784e-10,6.629528592760892e-10,6.685415554485985e-10,6.742187919073217e-10,6.799880103436351e-10,6.858525969377638e-10,6.918161599145378e-10,6.978825850545434e-10,7.040559801829716e-10,7.103406751696184e-10,7.167412219288849e-10,7.232625609532306e-10,7.2990985477972e-10,7.366885990123251e-10,7.436047333442275e-10,7.506645305355164e-10,7.57874762946642e-10,7.652426470272644e-10,7.727759543385559e-10,7.804830115532013e-10,7.883728114777e-10,7.964550685635174e-10,8.047402189070851e-10,8.132396422944055e-10,8.219657177122031e-10,8.309318788590758e-10,8.401527806789488e-10,8.496445214056791e-10,8.594246980742071e-10,8.695127395874636e-10,8.799300732498239e-10,8.90700457834015e-10,9.01850316648023e-10,9.134091816243028e-10,9.254100818978372e-10,9.37890431984556e-10,9.508922538259412e-10,9.64463842123564e-10,9.78660263939446e-10,9.935448019859905e-10,1.0091912860943353e-09,1.0256859805934937e-09,1.0431305819125214e-09,1.0616465484503124e-09,1.0813799855569073e-09,1.1025096391392708e-09,1.1252564435793033e-09,1.149898620766976e-09,1.176793218427008e-09,1.2064089727203964e-09,1.2393785997488749e-09,1.2765849488616254e-09,1.319313880365769e-09,1.36954347862428e-09,1.4305497897382224e-09,1.5083649884672923e-09,1.6160853766322703e-09,1.7921247819074893e-09]);AL=$toNativeArray($kindFloat32,[1,0.9381436705589294,0.900469958782196,0.8717043399810791,0.847785472869873,0.8269932866096497,0.8084216713905334,0.7915276288986206,0.7759568691253662,0.7614634037017822,0.7478685975074768,0.7350381016731262,0.7228676676750183,0.7112747430801392,0.7001926302909851,0.6895664930343628,0.6793505549430847,0.669506311416626,0.6600008606910706,0.6508058309555054,0.6418967247009277,0.633251965045929,0.62485271692276,0.6166821718215942,0.608725368976593,0.6009689569473267,0.5934008955955505,0.5860103368759155,0.5787873864173889,0.5717230439186096,0.5648092031478882,0.5580382943153381,0.5514034032821655,0.5448982119560242,0.5385168790817261,0.5322538614273071,0.526104211807251,0.5200631618499756,0.5141264200210571,0.5082897543907166,0.5025495290756226,0.4969019889831543,0.4913438558578491,0.4858720004558563,0.48048335313796997,0.4751752018928528,0.4699448347091675,0.4647897481918335,0.4597076177597046,0.4546961486339569,0.4497532546520233,0.44487687945365906,0.4400651156902313,0.4353161156177521,0.4306281507015228,0.42599955201148987,0.42142874002456665,0.4169141948223114,0.4124544560909271,0.40804818272590637,0.4036940038204193,0.39939069747924805,0.3951369822025299,0.39093172550201416,0.38677382469177246,0.38266217708587646,0.378595769405365,0.37457355856895447,0.37059465050697327,0.366658091545105,0.362762987613678,0.358908474445343,0.35509374737739563,0.35131800174713135,0.3475804924964905,0.34388044476509094,0.34021714329719543,0.33658990263938904,0.3329980671405792,0.3294409513473511,0.32591795921325684,0.32242849469184875,0.3189719021320343,0.3155476748943329,0.31215524673461914,0.3087940812110901,0.30546361207962036,0.30216339230537415,0.29889291524887085,0.29565170407295227,0.2924392819404602,0.2892552316188812,0.28609907627105713,0.2829704284667969,0.27986884117126465,0.2767939269542694,0.2737452983856201,0.2707225978374481,0.26772540807724,0.26475343108177185,0.2618062496185303,0.258883535861969,0.2559850215911865,0.25311028957366943,0.25025907158851624,0.24743106961250305,0.2446259707212448,0.24184346199035645,0.23908329010009766,0.23634515702724457,0.2336287796497345,0.23093391954898834,0.22826029360294342,0.22560766339302063,0.22297576069831848,0.22036437690258026,0.21777324378490448,0.21520215272903442,0.212650865316391,0.21011915802955627,0.20760682225227356,0.20511364936828613,0.20263944566249847,0.20018397271633148,0.19774706661701202,0.1953285187482834,0.19292815029621124,0.19054576754570007,0.18818120658397675,0.18583425879478455,0.18350479006767273,0.18119260668754578,0.17889754474163055,0.17661945521831512,0.17435817420482635,0.1721135377883911,0.16988539695739746,0.16767361760139465,0.16547803580760956,0.16329853236675262,0.16113494336605072,0.1589871346950531,0.15685498714447021,0.15473836660385132,0.15263713896274567,0.1505511850118637,0.1484803706407547,0.14642459154129028,0.1443837285041809,0.14235764741897583,0.1403462439775467,0.13834942877292633,0.136367067694664,0.13439907133579254,0.1324453204870224,0.1305057406425476,0.12858019769191742,0.12666863203048706,0.12477091699838638,0.12288697808980942,0.1210167184472084,0.11916005611419678,0.11731690168380737,0.11548716574907303,0.11367076635360718,0.11186762899160385,0.11007767915725708,0.1083008274435997,0.10653700679540634,0.10478614270687103,0.1030481606721878,0.10132300108671188,0.0996105819940567,0.09791085124015808,0.09622374176979065,0.09454918652772903,0.09288713335990906,0.09123751521110535,0.08960027992725372,0.08797537535429001,0.08636274188756943,0.0847623273730278,0.08317409455776215,0.08159798383712769,0.08003395050764084,0.07848194986581802,0.07694194465875626,0.07541389018297195,0.07389774918556213,0.07239348441362381,0.070901058614254,0.06942043453454971,0.06795158982276917,0.06649449467658997,0.06504911929368973,0.06361543387174606,0.06219341605901718,0.06078304722905159,0.0593843050301075,0.05799717456102371,0.05662164092063904,0.05525768920779228,0.05390531197190285,0.05256449431180954,0.05123523622751236,0.04991753399372101,0.04861138388514519,0.047316793352365494,0.04603376239538193,0.044762298464775085,0.04350241273641586,0.04225412383675575,0.04101744294166565,0.039792392402887344,0.03857899457216263,0.03737728297710419,0.03618728369474411,0.03500903770327568,0.03384258225560188,0.0326879620552063,0.031545232981443405,0.030414443463087082,0.0292956605553627,0.028188949450850487,0.027094384655356407,0.02601204626262188,0.024942025542259216,0.023884421214461327,0.022839335724711418,0.021806888282299042,0.020787203684449196,0.019780423492193222,0.018786700442433357,0.017806200310587883,0.016839107498526573,0.015885621309280396,0.014945968054234982,0.01402039173990488,0.013109165243804455,0.012212592177093029,0.011331013403832912,0.010464809834957123,0.009614413604140282,0.008780314587056637,0.007963077165186405,0.007163353264331818,0.0063819061033427715,0.005619642324745655,0.004877655766904354,0.004157294984906912,0.003460264764726162,0.0027887988835573196,0.0021459676790982485,0.001536299823783338,0.0009672692976891994,0.0004541343660093844]);}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); $packages["github.com/88250/lute/ast"]=(function(){var $pkg={},$init,B,I,J,K,L,C,D,A,E,F,G,H,M,R,S,X,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,Q,Y,Z,O,P,T,U,V,W,AA;B=$packages["bytes"];I=$packages["github.com/88250/lute/editor"];J=$packages["github.com/88250/lute/html"];K=$packages["github.com/88250/lute/lex"];L=$packages["github.com/88250/lute/util"];C=$packages["math/rand"];D=$packages["sort"];A=$packages["strconv"];E=$packages["strings"];F=$packages["sync"];G=$packages["time"];H=$packages["unicode/utf8"];M=$pkg.WalkStatus=$newType(4,$kindInt,"ast.WalkStatus",true,"github.com/88250/lute/ast",true,null);R=$pkg.Node=$newType(0,$kindStruct,"ast.Node",true,"github.com/88250/lute/ast",true,function(ID_,Box_,Path_,Spec_,Type_,Parent_,Previous_,Next_,FirstChild_,LastChild_,Children_,Tokens_,TypeStr_,Data_,Close_,LastLineBlank_,LastLineChecked_,CodeMarkerLen_,IsFencedCodeBlock_,CodeBlockFenceChar_,CodeBlockFenceLen_,CodeBlockFenceOffset_,CodeBlockOpenFence_,CodeBlockInfo_,CodeBlockCloseFence_,HtmlBlockType_,ListData_,TaskListItemChecked_,TableAligns_,TableCellAlign_,TableCellContentWidth_,TableCellContentMaxWidth_,LinkType_,LinkRefLabel_,HeadingLevel_,HeadingSetext_,HeadingNormalizedID_,MathBlockDollarOffset_,FootnotesRefLabel_,FootnotesRefId_,FootnotesRefs_,HtmlEntityTokens_,KramdownIAL_,Properties_,TextMarkType_,TextMarkAHref_,TextMarkATitle_,TextMarkInlineMathContent_,TextMarkInlineMemoContent_,TextMarkBlockRefID_,TextMarkBlockRefSubtype_,TextMarkFileAnnotationRefID_,TextMarkTextContent_,AttributeViewID_,AttributeViewType_,CustomBlockFenceOffset_,CustomBlockInfo_){this.$val=this;if(arguments.length===0){this.ID="";this.Box="";this.Path="";this.Spec="";this.Type=0;this.Parent=AB.nil;this.Previous=AB.nil;this.Next=AB.nil;this.FirstChild=AB.nil;this.LastChild=AB.nil;this.Children=AE.nil;this.Tokens=AF.nil;this.TypeStr="";this.Data="";this.Close=false;this.LastLineBlank=false;this.LastLineChecked=false;this.CodeMarkerLen=0;this.IsFencedCodeBlock=false;this.CodeBlockFenceChar=0;this.CodeBlockFenceLen=0;this.CodeBlockFenceOffset=0;this.CodeBlockOpenFence=AF.nil;this.CodeBlockInfo=AF.nil;this.CodeBlockCloseFence=AF.nil;this.HtmlBlockType=0;this.ListData=AG.nil;this.TaskListItemChecked=false;this.TableAligns=AH.nil;this.TableCellAlign=0;this.TableCellContentWidth=0;this.TableCellContentMaxWidth=0;this.LinkType=0;this.LinkRefLabel=AF.nil;this.HeadingLevel=0;this.HeadingSetext=false;this.HeadingNormalizedID="";this.MathBlockDollarOffset=0;this.FootnotesRefLabel=AF.nil;this.FootnotesRefId="";this.FootnotesRefs=AE.nil;this.HtmlEntityTokens=AF.nil;this.KramdownIAL=AI.nil;this.Properties=false;this.TextMarkType="";this.TextMarkAHref="";this.TextMarkATitle="";this.TextMarkInlineMathContent="";this.TextMarkInlineMemoContent="";this.TextMarkBlockRefID="";this.TextMarkBlockRefSubtype="";this.TextMarkFileAnnotationRefID="";this.TextMarkTextContent="";this.AttributeViewID="";this.AttributeViewType="";this.CustomBlockFenceOffset=0;this.CustomBlockInfo="";return;}this.ID=ID_;this.Box=Box_;this.Path=Path_;this.Spec=Spec_;this.Type=Type_;this.Parent=Parent_;this.Previous=Previous_;this.Next=Next_;this.FirstChild=FirstChild_;this.LastChild=LastChild_;this.Children=Children_;this.Tokens=Tokens_;this.TypeStr=TypeStr_;this.Data=Data_;this.Close=Close_;this.LastLineBlank=LastLineBlank_;this.LastLineChecked=LastLineChecked_;this.CodeMarkerLen=CodeMarkerLen_;this.IsFencedCodeBlock=IsFencedCodeBlock_;this.CodeBlockFenceChar=CodeBlockFenceChar_;this.CodeBlockFenceLen=CodeBlockFenceLen_;this.CodeBlockFenceOffset=CodeBlockFenceOffset_;this.CodeBlockOpenFence=CodeBlockOpenFence_;this.CodeBlockInfo=CodeBlockInfo_;this.CodeBlockCloseFence=CodeBlockCloseFence_;this.HtmlBlockType=HtmlBlockType_;this.ListData=ListData_;this.TaskListItemChecked=TaskListItemChecked_;this.TableAligns=TableAligns_;this.TableCellAlign=TableCellAlign_;this.TableCellContentWidth=TableCellContentWidth_;this.TableCellContentMaxWidth=TableCellContentMaxWidth_;this.LinkType=LinkType_;this.LinkRefLabel=LinkRefLabel_;this.HeadingLevel=HeadingLevel_;this.HeadingSetext=HeadingSetext_;this.HeadingNormalizedID=HeadingNormalizedID_;this.MathBlockDollarOffset=MathBlockDollarOffset_;this.FootnotesRefLabel=FootnotesRefLabel_;this.FootnotesRefId=FootnotesRefId_;this.FootnotesRefs=FootnotesRefs_;this.HtmlEntityTokens=HtmlEntityTokens_;this.KramdownIAL=KramdownIAL_;this.Properties=Properties_;this.TextMarkType=TextMarkType_;this.TextMarkAHref=TextMarkAHref_;this.TextMarkATitle=TextMarkATitle_;this.TextMarkInlineMathContent=TextMarkInlineMathContent_;this.TextMarkInlineMemoContent=TextMarkInlineMemoContent_;this.TextMarkBlockRefID=TextMarkBlockRefID_;this.TextMarkBlockRefSubtype=TextMarkBlockRefSubtype_;this.TextMarkFileAnnotationRefID=TextMarkFileAnnotationRefID_;this.TextMarkTextContent=TextMarkTextContent_;this.AttributeViewID=AttributeViewID_;this.AttributeViewType=AttributeViewType_;this.CustomBlockFenceOffset=CustomBlockFenceOffset_;this.CustomBlockInfo=CustomBlockInfo_;});S=$pkg.ListData=$newType(0,$kindStruct,"ast.ListData",true,"github.com/88250/lute/ast",true,function(Typ_,Tight_,BulletChar_,Start_,Delimiter_,Padding_,MarkerOffset_,Checked_,Marker_,Num_){this.$val=this;if(arguments.length===0){this.Typ=0;this.Tight=false;this.BulletChar=0;this.Start=0;this.Delimiter=0;this.Padding=0;this.MarkerOffset=0;this.Checked=false;this.Marker=AF.nil;this.Num=0;return;}this.Typ=Typ_;this.Tight=Tight_;this.BulletChar=BulletChar_;this.Start=Start_;this.Delimiter=Delimiter_;this.Padding=Padding_;this.MarkerOffset=MarkerOffset_;this.Checked=Checked_;this.Marker=Marker_;this.Num=Num_;});X=$pkg.NodeType=$newType(4,$kindInt,"ast.NodeType",true,"github.com/88250/lute/ast",true,null);AB=$ptrType(R);AC=$sliceType($Int32);AD=$sliceType($String);AE=$sliceType(AB);AF=$sliceType($Uint8);AG=$ptrType(S);AH=$sliceType($Int);AI=$sliceType(AD);AJ=$sliceType(X);AK=$mapType($String,$String);O=function(b,c){var{b,c,d,$s,$r,$c}=$restore(this,{b,c});$s=$s||0;s:while(true){switch($s){case 0:d=P(b,c);$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}d;$s=-1;return;}return;}var $f={$blk:O,$c:true,$r,b,c,d,$s};return $f;};$pkg.Walk=O;P=function(b,c){var{b,c,d,e,f,g,h,$s,$r,$c}=$restore(this,{b,c});$s=$s||0;s:while(true){switch($s){case 0:d=0;e=c(b,true);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}d=e;if(d===0){$s=-1;return d;}if(!((d===1))){$s=2;continue;}$s=3;continue;case 2:f=b.FirstChild;case 4:if(!(!(AB.nil===f))){$s=5;continue;}g=P(f,c);$s=6;case 6:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}d=g;if(0===d){d=0;$s=-1;return d;}f=f.Next;$s=4;continue;case 5:case 3:h=c(b,false);$s=7;case 7:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}d=h;$s=-1;return d;}return;}var $f={$blk:P,$c:true,$r,b,c,d,e,f,g,h,$s};return $f;};X.prototype.String=function(){var b,c,d,e,f;b=this.$val;c=(d=$mapIndex(Q,X.keyFor(b)),d!==undefined?[d.v,true]:["",false]);e=c[0];f=c[1];if(f){return e;}return"NodeType("+A.FormatInt((new $Int64(0,b)),10)+")";};$ptrType(X).prototype.String=function(){return new X(this.$get()).String();};T=function(){var{b,c,d,e,f,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:if($pkg.Testing){$s=-1;return"20060102150405-1a2b3c4";}b=G.Now();$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=$clone(b,G.Time);d=$clone(c,G.Time).Format("20060102150405");$s=2;case 2:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=W(7);$s=3;case 3:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=d+"-"+e;$s=4;case 4:return f;}return;}var $f={$blk:T,$c:true,$r,b,c,d,e,f,$s};return $f;};$pkg.NewNodeID=T;U=function(b){var b,c,d,e,f,g,h,i,j,k,l,m;if(!((22===b.length))){return false;}if(!((1===E.Count(b,"-")))){return false;}c=E.Split(b,"-");d=(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]);if(!((14===d.length))){return false;}e=d;f=0;while(true){if(!(f=h)){return false;}f+=g[1];}i=(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]);if(!((7===i.length))){return false;}j=i;k=0;while(true){if(!(k=m)&&!(48<=m&&57>=m)){return false;}k+=l[1];}return true;};$pkg.IsNodeIDPattern=U;V=function(){var{b,c,d,e,f,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:b=G.Now();$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=$clone(b,G.Time).UTC();$s=2;case 2:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=$clone(c,G.Time).UnixNano();$s=3;case 3:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}$r=C.Seed(d);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}e=0;while(true){if(!(e<1024)){break;}f=new X(e).String();(Y||$throwRuntimeError("assignment to entry in nil map")).set($String.keyFor(f),{k:f,v:e});e=e+(1)>>0;}$s=-1;return;}return;}var $f={$blk:V,$c:true,$r,b,c,d,e,f,$s};return $f;};W=function(b){var{b,c,d,e,f,g,h,i,$s,$r,$c}=$restore(this,{b});$s=$s||0;s:while(true){switch($s){case 0:c=(new AC($stringToRunes("abcdefghijklmnopqrstuvwxyz0123456789")));d=$makeSlice(AC,b);e=d;f=0;case 1:if(!(f=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+g]=(h=i,((h<0||h>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+h])));f++;$s=1;continue;case 2:$s=-1;return($runesToString(d));}return;}var $f={$blk:W,$c:true,$r,b,c,d,e,f,g,h,i,$s};return $f;};R.ptr.prototype.Marker=function(b){var b,c,d,e;c="";d=this;e=d.Type;if((e===(461))||(e===(462))){if(b){c="#";return c;}}else if((e===(18))||(e===(19))){if(b){c="*";return c;}}else if((e===(20))||(e===(21))){if(b){c="_";return c;}}else if((e===(23))||(e===(24))){if(b){c="**";return c;}}else if((e===(25))||(e===(26))){if(b){c="__";return c;}}else if((e===(104))||(e===(105))){if(b){c="~~";return c;}}else if((e===(486))||(e===(487))){if(b){c="^";return c;}}else if((e===(491))||(e===(492))){if(b){c="~";return c;}}else if((e===(305))||(e===(307))){if(b){c="$";return c;}}else if(e===(516)){if(b){c="";return c;}}else if(e===(517)){if(b){c="";return c;}}else if(e===(521)){if(b){c="";return c;}}else if(e===(522)){if(b){c="";return c;}}else if((e===(453))||(e===(454))){if(b){c="==";return c;}}else if(e===(35)){if(b){c="!";return c;}}else if(e===(36)){if(b){c="[";return c;}}else if(e===(37)){if(b){c="]";return c;}}else if(e===(38)){if(b){c="(";return c;}}else if(e===(39)){if(b){c=")";return c;}}c="";return c;};R.prototype.Marker=function(b){return this.$val.Marker(b);};R.ptr.prototype.ContainTextMarkTypes=function(b){var b,c,d,e,f,g,h,i,j;c=this;d=E.Split(c.TextMarkType," ");e=b;f=0;while(true){if(!(f=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+f]);h=d;i=0;while(true){if(!(i=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+i]);if(g===j){return true;}i++;}f++;}return false;};R.prototype.ContainTextMarkTypes=function(b){return this.$val.ContainTextMarkTypes(b);};R.ptr.prototype.IsTextMarkType=function(b){var b,c,d,e,f,g;c=this;d=E.Split(c.TextMarkType," ");e=d;f=0;while(true){if(!(f=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+f]);if(b===g){return true;}f++;}return false;};R.prototype.IsTextMarkType=function(b){return this.$val.IsTextMarkType(b);};R.ptr.prototype.IsNextSameInlineMemo=function(){var b,c,d;b=this;if(AB.nil===b){return false;}c=AB.nil;d=b.Next;while(true){if(!(!(AB.nil===d))){break;}if(AB.nil===b.Next||(456===d.Type)||AB.nil===d.Next||(456===d.Next.Type)){d=d.Next;continue;}if((530===d.Type)&&d.IsTextMarkType("inline-memo")){c=d;break;}d=d.Next;}if(!(AB.nil===c)&&b.TextMarkInlineMemoContent===c.TextMarkInlineMemoContent){return true;}return false;};R.prototype.IsNextSameInlineMemo=function(){return this.$val.IsNextSameInlineMemo();};R.ptr.prototype.IsSameTextMarkType=function(b){var{b,c,d,e,f,g,h,i,$s,$r,$c}=$restore(this,{b});$s=$s||0;s:while(true){switch($s){case 0:c=this;if(""===c.TextMarkType||""===b.TextMarkType){$s=-1;return false;}d=E.Split(c.TextMarkType," ");e=E.Split(b.TextMarkType," ");if(!((d.$length===e.$length))){$s=-1;return false;}$r=D.Strings(d);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.Strings(e);$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}f=d;g=0;while(true){if(!(g=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+h])===((h<0||h>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+h]))){$s=-1;return false;}i=((h<0||h>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+h]);if(i===("block-ref")){if(!(c.TextMarkBlockRefID===b.TextMarkBlockRefID)){$s=-1;return false;}}else if(i===("a")){if(!(c.TextMarkAHref===b.TextMarkAHref)||!(b.TextMarkATitle===b.TextMarkATitle)){$s=-1;return false;}}else if(i===("inline-memo")){if(!(c.TextMarkInlineMemoContent===b.TextMarkInlineMemoContent)){$s=-1;return false;}}g++;}$s=-1;return true;}return;}var $f={$blk:R.ptr.prototype.IsSameTextMarkType,$c:true,$r,b,c,d,e,f,g,h,i,$s};return $f;};R.prototype.IsSameTextMarkType=function(b){return this.$val.IsSameTextMarkType(b);};R.ptr.prototype.SortTextMarkDataTypes=function(){var{b,c,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:b=this;if(""===b.TextMarkTextContent){$s=-1;return;}c=E.Split(b.TextMarkType," ");$r=D.Strings(c);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}b.TextMarkType=E.Join(c," ");$s=-1;return;}return;}var $f={$blk:R.ptr.prototype.SortTextMarkDataTypes,$c:true,$r,b,c,$s};return $f;};R.prototype.SortTextMarkDataTypes=function(){return this.$val.SortTextMarkDataTypes();};R.ptr.prototype.ClearIALAttrs=function(){var b,c,d,e,f;b=this;c=$subslice(b.KramdownIAL,0,0);d=b.KramdownIAL;e=0;while(true){if(!(e=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+e]);if(!("name"===(0>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+0]))&&!("alias"===(0>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+0]))&&!("memo"===(0>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+0]))&&!("bookmark"===(0>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+0]))&&!E.HasPrefix((0>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+0]),"custom-")){c=$append(c,f);}e++;}b.KramdownIAL=c;};R.prototype.ClearIALAttrs=function(){return this.$val.ClearIALAttrs();};R.ptr.prototype.RemoveIALAttr=function(b){var b,c,d,e,f,g;c=this;d=$subslice(c.KramdownIAL,0,0);e=c.KramdownIAL;f=0;while(true){if(!(f=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+f]);if(!(b===(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0]))){d=$append(d,g);}f++;}c.KramdownIAL=d;};R.prototype.RemoveIALAttr=function(b){return this.$val.RemoveIALAttr(b);};R.ptr.prototype.SetIALAttr=function(b,c){var b,c,d,e,f,g;d=this;c=J.EscapeAttrVal(c);e=d.KramdownIAL;f=0;while(true){if(!(f=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+f]);if(b===(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0])){(1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1]=c);return;}f++;}d.KramdownIAL=$append(d.KramdownIAL,new AD([b,c]));};R.prototype.SetIALAttr=function(b,c){return this.$val.SetIALAttr(b,c);};R.ptr.prototype.IALAttr=function(b){var b,c,d,e,f;c=this;d=c.KramdownIAL;e=0;while(true){if(!(e=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+e]);if(b===(0>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+0])){return J.UnescapeAttrVal((1>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+1]));}e++;}return"";};R.prototype.IALAttr=function(b){return this.$val.IALAttr(b);};R.ptr.prototype.IsEmptyBlockIAL=function(){var b;b=this;if(!((455===b.Type))){return false;}if(L.IsDocIAL(b.Tokens)){return false;}if(!(AB.nil===b.Previous)){if(455===b.Previous.Type){return true;}return false;}return true;};R.prototype.IsEmptyBlockIAL=function(){return this.$val.IsEmptyBlockIAL();};R.ptr.prototype.TokensStr=function(){var b;b=this;return L.BytesToStr(b.Tokens);};R.prototype.TokensStr=function(){return this.$val.TokensStr();};R.ptr.prototype.LastDeepestChild=function(){var b,c;b=AB.nil;c=this;if(AB.nil===c.LastChild){b=c;return b;}b=c.LastChild.LastDeepestChild();return b;};R.prototype.LastDeepestChild=function(){return this.$val.LastDeepestChild();};R.ptr.prototype.FirstDeepestChild=function(){var b,c;b=AB.nil;c=this;if(AB.nil===c.FirstChild){b=c;return b;}b=c.FirstChild.FirstDeepestChild();return b;};R.prototype.FirstDeepestChild=function(){return this.$val.FirstDeepestChild();};R.ptr.prototype.ChildByType=function(b){var b,c,d;c=this;d=c.FirstChild;while(true){if(!(!(AB.nil===d))){break;}if(d.Type===b){return d;}d=d.Next;}return AB.nil;};R.prototype.ChildByType=function(b){return this.$val.ChildByType(b);};R.ptr.prototype.ChildrenByType=function(b){var{b,c,d,$s,$r,$c}=$restore(this,{b});$s=$s||0;s:while(true){switch($s){case 0:b=[b];c=[c];c[0]=AE.nil;d=this;c[0]=new AE([]);$r=O(d,(function(b,c){return function(e,f){var e,f;if(((b[0]===e.Type))&&f){c[0]=$append(c[0],e);}return 2;};})(b,c));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return c[0];}return;}var $f={$blk:R.ptr.prototype.ChildrenByType,$c:true,$r,b,c,d,$s};return $f;};R.prototype.ChildrenByType=function(b){return this.$val.ChildrenByType(b);};R.ptr.prototype.Text=function(){var{b,c,d,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:b=[b];c="";d=this;b[0]=new B.Buffer.ptr(AF.nil,0,0);$r=O(d,(function(b){return function $b(e,f){var{e,f,g,h,i,$s,$r,$c}=$restore(this,{e,f});$s=$s||0;s:while(true){switch($s){case 0:if(!f){$s=-1;return 2;}g=e.Type;if((g===(16))||(g===(40))||(g===(433))||(g===(434))||(g===(543))||(g===(412))){$s=2;continue;}if(g===(530)){$s=3;continue;}$s=4;continue;case 2:h=b[0].Write(e.Tokens);$s=5;case 5:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}h;$s=4;continue;case 3:i=b[0].WriteString(e.TextMarkTextContent);$s=6;case 6:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}i;case 4:case 1:$s=-1;return 2;}return;}var $f={$blk:$b,$c:true,$r,e,f,g,h,i,$s};return $f;};})(b));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}c=b[0].String();$s=-1;return c;}return;}var $f={$blk:R.ptr.prototype.Text,$c:true,$r,b,c,d,$s};return $f;};R.prototype.Text=function(){return this.$val.Text();};R.ptr.prototype.TextLen=function(){var{b,c,d,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:b=[b];c=0;d=this;b[0]=$makeSlice(AF,0,4096);$r=O(d,(function(b){return function(e,f){var e,f,g;if(!f){return 2;}g=e.Type;if((g===(16))||(g===(40))||(g===(433))||(g===(434))||(g===(543))||(g===(412))){b[0]=$appendSlice(b[0],e.Tokens);}else if(g===(530)){b[0]=$appendSlice(b[0],e.TextMarkTextContent);}return 2;};})(b));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}c=H.RuneCount(b[0]);$s=-1;return c;}return;}var $f={$blk:R.ptr.prototype.TextLen,$c:true,$r,b,c,d,$s};return $f;};R.prototype.TextLen=function(){return this.$val.TextLen();};R.ptr.prototype.Content=function(){var{b,c,d,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:b=[b];c="";d=this;b[0]=new B.Buffer.ptr(AF.nil,0,0);$r=O(d,(function(b){return function $b(e,f){var{e,f,g,h,i,j,k,l,m,n,o,p,q,$s,$r,$c}=$restore(this,{e,f});$s=$s||0;s:while(true){switch($s){case 0:if(!f){$s=1;continue;}$s=2;continue;case 1:if(!(AB.nil===e.Next)&&!(AB.nil===e.Next.Next)&&1>0,((h<0||h>=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+h]))===10))){$s=3;continue;}$s=4;continue;case 3:i=b[0].WriteByte(10);$s=5;case 5:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}i;case 4:$s=-1;return 2;case 2:j=e.Type;if((j===(16))||(j===(40))||(j===(433))||(j===(434))||(j===(543))||(j===(412))||(j===(29))||(j===(15))||(j===(306))||(j===(302))||(j===(44))||(j===(203))||(j===(201))||(j===(401))||(j===(427))||(j===(497))){$s=7;continue;}if(j===(530)){$s=8;continue;}$s=9;continue;case 7:k=b[0].Write(e.Tokens);$s=10;case 10:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}k;$s=9;continue;case 8:if(!(""===e.TextMarkTextContent)){$s=11;continue;}if(!(""===e.TextMarkInlineMathContent)){$s=12;continue;}$s=13;continue;case 11:if(e.IsTextMarkType("code")||e.IsTextMarkType("tag")||e.IsTextMarkType("strong")||e.IsTextMarkType("em")||e.IsTextMarkType("a")){$s=14;continue;}$s=15;continue;case 14:l=b[0].WriteString(J.UnescapeString(e.TextMarkTextContent));$s=17;case 17:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}l;$s=16;continue;case 15:m=b[0].WriteString(e.TextMarkTextContent);$s=18;case 18:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}m;case 16:$s=13;continue;case 12:n=e.TextMarkInlineMathContent;n=E.ReplaceAll(n,"_esc_newline_"," ");o=b[0].WriteString(n);$s=19;case 19:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}o;case 13:if(!(""===e.TextMarkInlineMemoContent)){$s=20;continue;}$s=21;continue;case 20:p=e.TextMarkInlineMemoContent;p=E.ReplaceAll(p,"_esc_newline_"," ");q=b[0].WriteString(p);$s=22;case 22:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}q;case 21:case 9:case 6:$s=-1;return 2;}return;}var $f={$blk:$b,$c:true,$r,e,f,g,h,i,j,k,l,m,n,o,p,q,$s};return $f;};})(b));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}c=b[0].String();$s=-1;return c;}return;}var $f={$blk:R.ptr.prototype.Content,$c:true,$r,b,c,d,$s};return $f;};R.prototype.Content=function(){return this.$val.Content();};R.ptr.prototype.EscapeMarkerContent=function(){var{b,c,d,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:b="";c=this;d=c.Content();$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}b=d;b=($bytesToString(K.EscapeProtyleMarkers((new AF($stringToBytes(b))))));$s=-1;return b;}return;}var $f={$blk:R.ptr.prototype.EscapeMarkerContent,$c:true,$r,b,c,d,$s};return $f;};R.prototype.EscapeMarkerContent=function(){return this.$val.EscapeMarkerContent();};R.ptr.prototype.Stat=function(){var{b,c,d,e,f,g,h,i,j,k,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:b=[b];c=[c];d=[d];e=[e];f=0;g=0;c[0]=0;e[0]=0;d[0]=0;h=this;b[0]=$makeSlice(AF,0,8192);$r=O(h,(function(b,c,d,e){return function(i,j){var i,j,k,l,m;if(!j){return 2;}k=i.Type;if((k===(16))||(k===(40))||(k===(433))||(k===(434))||(k===(543))||(k===(412))||(k===(29))||(k===(15))||(k===(306))||(k===(302))||(k===(44))||(k===(203))||(k===(201))||(k===(401))||(k===(427))||(k===(497))){b[0]=$appendSlice(b[0],i.Tokens);}else if(k===(530)){if(0>0;}if(i.IsTextMarkType("block-ref")||i.IsTextMarkType("file-annotation-ref")){d[0]=d[0]+(1)>>0;}}else if(k===(33)){c[0]=c[0]+(1)>>0;}else if(k===(34)){e[0]=e[0]+(1)>>0;}else if(k===(430)){d[0]=d[0]+(1)>>0;}if(i.IsBlock()){b[0]=$append(b[0],32);}return 2;};})(b,c,d,e));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}i=B.TrimSpace(b[0]);$s=2;case 2:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}b[0]=i;k=L.WordCount(L.BytesToStr(b[0]));$s=3;case 3:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}j=k;f=j[0];g=j[1];$s=-1;return[f,g,c[0],e[0],d[0]];}return;}var $f={$blk:R.ptr.prototype.Stat,$c:true,$r,b,c,d,e,f,g,h,i,j,k,$s};return $f;};R.prototype.Stat=function(){return this.$val.Stat();};R.ptr.prototype.TokenLen=function(){var{b,c,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:b=[b];b[0]=0;c=this;$r=O(c,(function(b){return function(d,e){var d,e;if(!e){return 2;}b[0]=b[0]+(K.BytesShowLength(d.Tokens))>>0;return 2;};})(b));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return b[0];}return;}var $f={$blk:R.ptr.prototype.TokenLen,$c:true,$r,b,c,$s};return $f;};R.prototype.TokenLen=function(){return this.$val.TokenLen();};R.ptr.prototype.DocChild=function(){var b,c,d;b=AB.nil;c=this;b=c;d=c;while(true){if(!(!(AB.nil===d))){break;}if(0===d.Type){return b;}b=d;d=d.Parent;}return b;};R.prototype.DocChild=function(){return this.$val.DocChild();};R.ptr.prototype.IsChildBlockOf=function(b,c){var b,c,d,e,f,g;d=this;if(""===d.ID||!d.IsBlock()){return false;}if(c===0){e=d.Parent;while(true){if(!(!(AB.nil===e))){break;}if(e===b){return true;}e=e.Parent;}return false;}f=d.Parent;g=1;while(true){if(!(g>0;}if(!(b===f)){return false;}return true;};R.prototype.IsChildBlockOf=function(b,c){return this.$val.IsChildBlockOf(b,c);};R.ptr.prototype.NextNodeText=function(){var{b,c,d,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:b=this;if(AB.nil===b.Next){$s=-1;return"";}c=b.Next.Text();$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;$s=2;case 2:return d;}return;}var $f={$blk:R.ptr.prototype.NextNodeText,$c:true,$r,b,c,d,$s};return $f;};R.prototype.NextNodeText=function(){return this.$val.NextNodeText();};R.ptr.prototype.PreviousNodeText=function(){var{b,c,d,e,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:b=this;c=b.Previous;if(AB.nil===c){$s=-1;return"";}if(456===c.Type){c=c.Previous;}if(AB.nil===c){$s=-1;return"";}d=c.Text();$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;$s=2;case 2:return e;}return;}var $f={$blk:R.ptr.prototype.PreviousNodeText,$c:true,$r,b,c,d,e,$s};return $f;};R.prototype.PreviousNodeText=function(){return this.$val.PreviousNodeText();};R.ptr.prototype.Unlink=function(){var b;b=this;if(!(AB.nil===b.Previous)){b.Previous.Next=b.Next;}else if(!(AB.nil===b.Parent)){b.Parent.FirstChild=b.Next;}if(!(AB.nil===b.Next)){b.Next.Previous=b.Previous;}else if(!(AB.nil===b.Parent)){b.Parent.LastChild=b.Previous;}b.Parent=AB.nil;b.Next=AB.nil;b.Previous=AB.nil;};R.prototype.Unlink=function(){return this.$val.Unlink();};R.ptr.prototype.AppendTokens=function(b){var b,c;c=this;c.Tokens=$appendSlice(c.Tokens,($bytesToString(b)));};R.prototype.AppendTokens=function(b){return this.$val.AppendTokens(b);};R.ptr.prototype.PrependTokens=function(b){var b,c;c=this;c.Tokens=$appendSlice(b,c.Tokens);};R.prototype.PrependTokens=function(b){return this.$val.PrependTokens(b);};R.ptr.prototype.InsertAfter=function(b){var b,c;c=this;b.Unlink();b.Next=c.Next;if(!(AB.nil===b.Next)){b.Next.Previous=b;}b.Previous=c;c.Next=b;b.Parent=c.Parent;if(!(AB.nil===b.Parent)&&AB.nil===b.Next&&!(AB.nil===b.Parent.LastChild)){b.Parent.LastChild=b;}};R.prototype.InsertAfter=function(b){return this.$val.InsertAfter(b);};R.ptr.prototype.InsertBefore=function(b){var b,c;c=this;b.Unlink();b.Previous=c.Previous;if(!(AB.nil===b.Previous)){b.Previous.Next=b;}b.Next=c;c.Previous=b;b.Parent=c.Parent;if(!(AB.nil===b.Parent)&&AB.nil===b.Previous){b.Parent.FirstChild=b;}};R.prototype.InsertBefore=function(b){return this.$val.InsertBefore(b);};R.ptr.prototype.AppendChild=function(b){var b,c;c=this;b.Unlink();b.Parent=c;if(!(AB.nil===c.LastChild)){c.LastChild.Next=b;b.Previous=c.LastChild;c.LastChild=b;}else{c.FirstChild=b;c.LastChild=b;}};R.prototype.AppendChild=function(b){return this.$val.AppendChild(b);};R.ptr.prototype.PrependChild=function(b){var b,c;c=this;b.Unlink();b.Parent=c;if(!(AB.nil===c.FirstChild)){c.FirstChild.Previous=b;b.Next=c.FirstChild;c.FirstChild=b;}else{c.FirstChild=b;c.LastChild=b;}};R.prototype.PrependChild=function(b){return this.$val.PrependChild(b);};R.ptr.prototype.List=function(){var{b,c,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:b=[b];b[0]=AE.nil;c=this;b[0]=$makeSlice(AE,0,512);$r=O(c,(function(b){return function(d,e){var d,e;if(e){b[0]=$append(b[0],d);}return 2;};})(b));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return b[0];}return;}var $f={$blk:R.ptr.prototype.List,$c:true,$r,b,c,$s};return $f;};R.prototype.List=function(){return this.$val.List();};R.ptr.prototype.ParentIs=function(b,c){var b,c,d,e,f,g,h,i,j;d=this;e=$append(c,b);f=0;g=d.Parent;while(true){if(!(!(AB.nil===g))){break;}h=e;i=0;while(true){if(!(i=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+i]);if(j===g.Type){return true;}i++;}f=f+(1)>>0;if(128>0));}b.Tokens=d;b.AppendChild(new B.Node.ptr("","","","",426,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));b.AppendChild(new B.Node.ptr("","","","",427,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,d,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));b.AppendChild(new B.Node.ptr("","","","",428,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));};AB.prototype.yamlFrontMatterFinalize=function(b){return this.$val.yamlFrontMatterFinalize(b);};AD.ptr.prototype.parseYamlFrontMatter=function(){var b,c,d,e,f;b=this;if(!((45===(c=b.Context.currentLine,(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]))))){return false;}d=0;e=0;while(true){if(!(e=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+e]))))){break;}d=d+(1)>>0;e=e+(1)>>0;}return 3===d;};AD.prototype.parseYamlFrontMatter=function(){return this.$val.parseYamlFrontMatter();};O=function(b){var b,c,d,e,f,g,h;if(b.ParseOption.KramdownBlockIAL&&BG(b.currentLine)){c=b.parseKramdownBlockIAL(b.currentLine);if(0=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0]))))){return false;}f=0;g=0;while(true){if(!(g=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+g]))))){break;}f=f+(1)>>0;g=g+(1)>>0;}return 3===f;};P=function(b,c){var{b,c,d,e,f,g,h,i,j,k,l,$s,$r,$c}=$restore(this,{b,c});$s=$s||0;s:while(true){switch($s){case 0:c=[c];d=[d];e=[e];f=[f];e[0]=CZ.nil;$r=B.Walk(b.Root,(function(c,d,e,f){return function $b(g,h){var{g,h,i,j,k,l,m,n,o,p,q,r,$s,$r,$c}=$restore(this,{g,h});$s=$s||0;s:while(true){switch($s){case 0:i=[i];if(!h){$s=-1;return 2;}if(33===g.Type){$s=1;continue;}$s=2;continue;case 1:i[0]=CZ.nil;$r=B.Walk(g,(function(c,d,e,f,i){return function(j,k){var j,k,l,m;if(!k){return 2;}if(400===j.Type){l=j.ChildByType(401);if(!(CY.nil===l)){m=new B.Node.ptr("","","","",40,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,l.Tokens,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");j.InsertBefore(m);}i[0]=$append(i[0],j);}return 2;};})(c,d,e,f,i));$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}j=i[0];k=0;while(true){if(!(k=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+k]);l.Unlink();k++;}m=g.ChildByType(34);if(CY.nil===m){$s=-1;return 2;}g.InsertBefore(m);n=g.ChildByType(40);if(CY.nil===n){o=true;$s=6;continue s;}p=A.TrimSpace(n.Tokens);$s=7;case 7:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}o=1>p.$length;case 6:if(o){$s=4;continue;}$s=5;continue;case 4:q=g.ChildByType(36);if(!(CY.nil===q)){r=g.ChildByType(41);if(!(CY.nil===r)){q.InsertAfter(new B.Node.ptr("","","","",40,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,r.Tokens,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));}}case 5:case 2:$s=-1;return 2;}return;}var $f={$blk:$b,$c:true,$r,g,h,i,j,k,l,m,n,o,p,q,r,$s};return $f;};})(c,d,e,f));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}g=e[0];h=0;while(true){if(!(h=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+h]);i.Unlink();h++;}e[0]=CZ.nil;d[0]=DC.nil;f[0]=CY.nil;$r=B.Walk(b.Root,(function(c,d,e,f){return function(j,k){var j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y;l=j.Type;if(l===(27)){R(j,"code",(d.$ptr||(d.$ptr=new DE(function(){return this.$target[0];},function($v){this.$target[0]=$v;},d))),(e.$ptr||(e.$ptr=new DF(function(){return this.$target[0];},function($v){this.$target[0]=$v;},e))),k);}else if(l===(460)){R(j,"tag",(d.$ptr||(d.$ptr=new DE(function(){return this.$target[0];},function($v){this.$target[0]=$v;},d))),(e.$ptr||(e.$ptr=new DF(function(){return this.$target[0];},function($v){this.$target[0]=$v;},e))),k);}else if(l===(304)){R(j,"inline-math",(d.$ptr||(d.$ptr=new DE(function(){return this.$target[0];},function($v){this.$target[0]=$v;},d))),(e.$ptr||(e.$ptr=new DF(function(){return this.$target[0];},function($v){this.$target[0]=$v;},e))),k);}else if(l===(17)){R(j,"em",(d.$ptr||(d.$ptr=new DE(function(){return this.$target[0];},function($v){this.$target[0]=$v;},d))),(e.$ptr||(e.$ptr=new DF(function(){return this.$target[0];},function($v){this.$target[0]=$v;},e))),k);}else if(l===(22)){R(j,"strong",(d.$ptr||(d.$ptr=new DE(function(){return this.$target[0];},function($v){this.$target[0]=$v;},d))),(e.$ptr||(e.$ptr=new DF(function(){return this.$target[0];},function($v){this.$target[0]=$v;},e))),k);}else if(l===(101)){R(j,"s",(d.$ptr||(d.$ptr=new DE(function(){return this.$target[0];},function($v){this.$target[0]=$v;},d))),(e.$ptr||(e.$ptr=new DF(function(){return this.$target[0];},function($v){this.$target[0]=$v;},e))),k);}else if(l===(450)){R(j,"mark",(d.$ptr||(d.$ptr=new DE(function(){return this.$target[0];},function($v){this.$target[0]=$v;},d))),(e.$ptr||(e.$ptr=new DF(function(){return this.$target[0];},function($v){this.$target[0]=$v;},e))),k);}else if(l===(520)){R(j,"u",(d.$ptr||(d.$ptr=new DE(function(){return this.$target[0];},function($v){this.$target[0]=$v;},d))),(e.$ptr||(e.$ptr=new DF(function(){return this.$target[0];},function($v){this.$target[0]=$v;},e))),k);}else if(l===(490)){R(j,"sub",(d.$ptr||(d.$ptr=new DE(function(){return this.$target[0];},function($v){this.$target[0]=$v;},d))),(e.$ptr||(e.$ptr=new DF(function(){return this.$target[0];},function($v){this.$target[0]=$v;},e))),k);}else if(l===(485)){R(j,"sup",(d.$ptr||(d.$ptr=new DE(function(){return this.$target[0];},function($v){this.$target[0]=$v;},d))),(e.$ptr||(e.$ptr=new DF(function(){return this.$target[0];},function($v){this.$target[0]=$v;},e))),k);}else if(l===(515)){R(j,"kbd",(d.$ptr||(d.$ptr=new DE(function(){return this.$target[0];},function($v){this.$target[0]=$v;},d))),(e.$ptr||(e.$ptr=new DF(function(){return this.$target[0];},function($v){this.$target[0]=$v;},e))),k);}else if(l===(33)){R(j,"a",(d.$ptr||(d.$ptr=new DE(function(){return this.$target[0];},function($v){this.$target[0]=$v;},d))),(e.$ptr||(e.$ptr=new DF(function(){return this.$target[0];},function($v){this.$target[0]=$v;},e))),k);}else if(l===(430)){R(j,"block-ref",(d.$ptr||(d.$ptr=new DE(function(){return this.$target[0];},function($v){this.$target[0]=$v;},d))),(e.$ptr||(e.$ptr=new DF(function(){return this.$target[0];},function($v){this.$target[0]=$v;},e))),k);}else if((l===(16))||(l===(29))||(l===(306))||(l===(40))||(l===(431))||(l===(44))||(l===(400))){if(1>d[0].$length){return 2;}if(k){m=($bytesToString(G.EscapeHTML(j.Tokens)));m=F.ReplaceAll(m,""","\"");f[0]=new B.Node.ptr("","","","",530,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,F.Join(d[0]," "),"","","","","","","",m,"","",0,"");if(306===j.Type){f[0].TextMarkTextContent="";f[0].TextMarkInlineMathContent=($bytesToString(G.EscapeHTML(j.Tokens)));if(j.ParentIs(109,DG.nil)&&!c[0]){f[0].TextMarkInlineMathContent=F.ReplaceAll(f[0].TextMarkInlineMathContent,"\\|","|");}}else if(400===j.Type){n=j.ChildByType(401);if(!(CY.nil===n)){f[0].TextMarkTextContent=($bytesToString(G.EscapeHTML(n.Tokens)));}}else if(431===j.Type){f[0].TextMarkBlockRefSubtype="s";f[0].TextMarkTextContent=j.TokensStr();o=j.Parent.ChildByType(433);if(CY.nil===o){o=j.Parent.ChildByType(434);f[0].TextMarkBlockRefSubtype="d";}if(!(CY.nil===o)){f[0].TextMarkTextContent=o.TokensStr();}f[0].TextMarkBlockRefID=j.Parent.ChildByType(431).TokensStr();}else if(j.ParentIs(33,DG.nil)&&!j.ParentIs(34,DG.nil)){p=j.Next;if(!(CY.nil===p)&&(40===p.Type)){j.Next.PrependTokens(j.Tokens);return 2;}q=CY.nil;r=j.Parent;while(true){if(!(!(CY.nil===r))){break;}if(33===r.Type){q=r;break;}r=r.Parent;}if(!(CY.nil===q)){s=q.ChildByType(41);if(!(CY.nil===s)){f[0].TextMarkAHref=($bytesToString(s.Tokens));}t=q.ChildByType(42);if(!(CY.nil===t)){f[0].TextMarkATitle=($bytesToString(t.Tokens));}}}}else{u=j.Next;if(!(CY.nil===u)&&(40===u.Type)){return 2;}f[0].KramdownIAL=j.Parent.KramdownIAL;if(j.IsMarker()){j.Parent.InsertBefore(f[0]);}else if(!(CY.nil===j.Parent)&&(570===j.Parent.Type)&&!(CY.nil===j.Parent.Parent)&&(33===j.Parent.Parent.Type)){j.Parent.Parent.InsertBefore(f[0]);}else{j.InsertBefore(f[0]);if(16===j.Type){e[0]=$append(e[0],j);}}}}else if(l===(530)){if(1>d[0].$length){return 2;}if(k){v=false;w=d[0];x=0;while(true){if(!(x=w.$length)?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+x]);if(j.IsTextMarkType(y)){v=true;break;}x++;}if(!v){d[0]=$append(d[0],j.TextMarkType);j.TextMarkType=F.Join(d[0]," ");}}else{if(CY.nil===j.Next||j.Next.IsCloseMarker()){d[0]=$subslice(d[0],0,(d[0].$length-1>>0));}}return 2;}return 2;};})(c,d,e,f));$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}j=e[0];k=0;while(true){if(!(k=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+k]);l.Unlink();k++;}$s=-1;return;}return;}var $f={$blk:P,$c:true,$r,b,c,d,e,f,g,h,i,j,k,l,$s};return $f;};$pkg.NestedInlines2FlattedSpansHybrid=P;R=function(b,c,d,e,f){var b,c,d,e,f,g,h;if(f){d.$set($append(d.$get(),c));}else{if(0>0)));}e.$set($append(e.$get(),b));g=b.FirstChild;while(true){if(!(!(CY.nil===g))){break;}h=g.Next;if((530===g.Type)||(16===g.Type)){b.InsertBefore(g);}else if(41===g.Type){if(!(CY.nil===b.Previous)&&(530===b.Previous.Type)){b.Previous.TextMarkAHref=($bytesToString(g.Tokens));}}g=h;}}};S=function(b){var{b,c,$s,$r,$c}=$restore(this,{b});$s=$s||0;s:while(true){switch($s){case 0:b=[b];c=[c];c[0]=(function(b,c){return function $b(d){var{d,e,f,g,h,$s,$r,$c}=$restore(this,{d});$s=$s||0;s:while(true){switch($s){case 0:e=CZ.nil;f=AA("",(new CW($stringToBytes(d))),b[0].Context.ParseOption);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;h=g.Root.FirstChild.FirstChild;while(true){if(!(!(CY.nil===h))){break;}e=$append(e,h);h=h.Next;}$s=-1;return e;}return;}var $f={$blk:$b,$c:true,$r,d,e,f,g,h,$s};return $f;};})(b,c);$r=B.Walk(b[0].Root,(function(b,c){return function $b(d,e){var{aa,ab,ac,ad,ae,af,ag,ah,ai,aj,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{d,e});$s=$s||0;s:while(true){switch($s){case 0:if(!e){$s=-1;return 2;}if(530===d.Type){$s=1;continue;}$s=2;continue;case 1:f=d.TextMarkType;if(f===("sup")){$s=4;continue;}if(f===("sub")){$s=5;continue;}if(f===("em")){$s=6;continue;}if(f===("strong")){$s=7;continue;}if(f===("mark")){$s=8;continue;}if(f===("s")){$s=9;continue;}$s=10;continue;case 4:d.Type=485;d.PrependChild(new B.Node.ptr("","","","",486,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));g=c[0](d.TextMarkTextContent);$s=11;case 11:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;i=h;j=0;while(true){if(!(j=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+j]);d.AppendChild(k);j++;}d.AppendChild(new B.Node.ptr("","","","",487,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));$s=10;continue;case 5:d.Type=490;d.PrependChild(new B.Node.ptr("","","","",491,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));l=c[0](d.TextMarkTextContent);$s=12;case 12:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}m=l;n=m;o=0;while(true){if(!(o=n.$length)?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+o]);d.AppendChild(p);o++;}d.AppendChild(new B.Node.ptr("","","","",492,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));$s=10;continue;case 6:d.Type=17;d.PrependChild(new B.Node.ptr("","","","",18,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));q=c[0](d.TextMarkTextContent);$s=13;case 13:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}r=q;s=r;t=0;while(true){if(!(t=s.$length)?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+t]);d.AppendChild(u);t++;}d.AppendChild(new B.Node.ptr("","","","",19,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));$s=10;continue;case 7:d.Type=22;d.PrependChild(new B.Node.ptr("","","","",23,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));v=c[0](d.TextMarkTextContent);$s=14;case 14:if($c){$c=false;v=v.$blk();}if(v&&v.$blk!==undefined){break s;}w=v;x=w;y=0;while(true){if(!(y=x.$length)?($throwRuntimeError("index out of range"),undefined):x.$array[x.$offset+y]);d.AppendChild(z);y++;}d.AppendChild(new B.Node.ptr("","","","",24,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));$s=10;continue;case 8:d.Type=450;d.PrependChild(new B.Node.ptr("","","","",453,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));aa=c[0](d.TextMarkTextContent);$s=15;case 15:if($c){$c=false;aa=aa.$blk();}if(aa&&aa.$blk!==undefined){break s;}ab=aa;ac=ab;ad=0;while(true){if(!(ad=ac.$length)?($throwRuntimeError("index out of range"),undefined):ac.$array[ac.$offset+ad]);d.AppendChild(ae);ad++;}d.AppendChild(new B.Node.ptr("","","","",454,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));$s=10;continue;case 9:d.Type=101;d.PrependChild(new B.Node.ptr("","","","",104,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));af=c[0](d.TextMarkTextContent);$s=16;case 16:if($c){$c=false;af=af.$blk();}if(af&&af.$blk!==undefined){break s;}ag=af;ah=ag;ai=0;while(true){if(!(ai=ah.$length)?($throwRuntimeError("index out of range"),undefined):ah.$array[ah.$offset+ai]);d.AppendChild(aj);ai++;}d.AppendChild(new B.Node.ptr("","","","",105,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));case 10:case 3:case 2:$s=-1;return 2;}return;}var $f={$blk:$b,$c:true,$r,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};})(b,c));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return;}return;}var $f={$blk:S,$c:true,$r,b,c,$s};return $f;};$pkg.TextMarks2Inlines=S;AB.ptr.prototype.parseToC=function(b){var{b,c,d,e,f,$s,$r,$c}=$restore(this,{b});$s=$s||0;s:while(true){switch($s){case 0:c=this;d=D.Split(b.Tokens,10);if(!((1===d.$length))){$s=-1;return CY.nil;}e=A.TrimSpace((0>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+0]));$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;if(c.ParseOption.VditorWYSIWYG||c.ParseOption.VditorIR||c.ParseOption.VditorSV){f=A.ReplaceAll(f,C.CaretTokens,CW.nil);}if(!A.EqualFold(f,(new CW($stringToBytes("[toc]"))))){$s=-1;return CY.nil;}$s=-1;return new B.Node.ptr("","","","",415,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");}return;}var $f={$blk:AB.ptr.prototype.parseToC,$c:true,$r,b,c,d,e,f,$s};return $f;};AB.prototype.parseToC=function(b){return this.$val.parseToC(b);};T=function(b,c){var{b,c,d,e,f,g,h,$s,$r,$c}=$restore(this,{b,c});$s=$s||0;s:while(true){switch($s){case 0:if(b.Context.indented){$s=-1;return 0;}d=b.parseThematicBreak();e=d[0];f=d[1];if(e){$s=1;continue;}$s=2;continue;case 1:$r=b.Context.closeUnmatchedBlocks();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}g=b.Context.addChild(4);$s=4;case 4:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;h.Tokens=f;b.Context.advanceOffset(b.Context.currentLineLen-b.Context.offset>>0,false);$s=-1;return 2;case 2:$s=-1;return 0;}return;}var $f={$blk:T,$c:true,$r,b,c,d,e,f,g,h,$s};return $f;};$pkg.ThematicBreakStart=T;AD.ptr.prototype.parseThematicBreak=function(){var b,c,d,e,f,g,h,i,j,k,l,m;b=false;c=CW.nil;d=this;e=0;f=0;g=d.Context.currentLine;h=false;i=g.$length;j=d.Context.nextNonspace;while(true){if(!(j<(i-1>>0))){break;}k=((j<0||j>=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+j]);if((32===k)||(9===k)){j=j+(1)>>0;continue;}if(!((45===k))&&!((95===k))&&!((42===k))){return[b,c];}if(!((0===f))){if(!((f===k))){return[b,c];}}else{f=k;}e=e+(1)>>0;j=j+(1)>>0;}if((d.Context.ParseOption.VditorWYSIWYG||d.Context.ParseOption.VditorIR||d.Context.ParseOption.VditorSV||d.Context.ParseOption.ProtyleWYSIWYG)&&h){c=C.CaretTokens;}l=3<=e;m=c;b=l;c=m;return[b,c];};AD.prototype.parseThematicBreak=function(){return this.$val.parseThematicBreak();};AD.ptr.prototype.parseText=function(b){var b,c,d,e,f;c=this;d=b.pos;while(true){if(!(b.pos=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+f])))){break;}b.pos=b.pos+(1)>>0;}return new B.Node.ptr("","","","",16,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,$subslice(b.tokens,d,b.pos),"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");};AD.prototype.parseText=function(b){return this.$val.parseText(b);};AD.ptr.prototype.isMarker=function(b){var b,c;c=this;if(D.IsMarker(b)){return true;}if(c.Context.ParseOption.Sup&&(94===b)){return true;}return false;};AD.prototype.isMarker=function(b){return this.$val.isMarker(b);};AD.ptr.prototype.parseBackslash=function(b,c){var b,c,d,e,f,g,h,i,j,k,l,m,n,o;d=this;if(c.pos===(c.tokensLen-1>>0)){c.pos=c.pos+(1)>>0;return new B.Node.ptr("","","","",16,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,U,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");}c.pos=c.pos+(1)>>0;g=(e=c.tokens,f=c.pos,((f<0||f>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+f]));if(10===g){c.pos=c.pos+(1)>>0;return new B.Node.ptr("","","","",31,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,new CW([g]),"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");}if(D.IsASCIIPunct(g)){if((60===g)&&!(CY.nil===d.Context.oldtip)&&(106===d.Context.oldtip.Type)){h=$subslice(c.tokens,c.pos);if(A.HasPrefix(h,(new CW($stringToBytes("
"))))||A.HasPrefix(h,(new CW($stringToBytes("
"))))||A.HasPrefix(h,(new CW($stringToBytes("
"))))){return new B.Node.ptr("","","","",16,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,U,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");}}c.pos=c.pos+(1)>>0;i=new B.Node.ptr("","","","",400,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");b.AppendChild(i);i.AppendChild(new B.Node.ptr("","","","",401,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,new CW([g]),"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));return CY.nil;}if(d.Context.ParseOption.VditorWYSIWYG||d.Context.ParseOption.VditorIR||d.Context.ParseOption.ProtyleWYSIWYG){j=$subslice(c.tokens,c.pos);k=C.CaretTokens;if(k.$length>0,((m<0||m>=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+m]));if(D.IsASCIIPunct(g)){if((60===g)&&!(CY.nil===d.Context.oldtip)&&(106===d.Context.oldtip.Type)){n=$subslice(c.tokens,(c.pos+k.$length>>0));if(A.HasPrefix(n,(new CW($stringToBytes("
"))))||A.HasPrefix(n,(new CW($stringToBytes("
"))))||A.HasPrefix(n,(new CW($stringToBytes("
"))))){return new B.Node.ptr("","","","",16,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,U,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");}}c.pos=c.pos+(k.$length)>>0;c.pos=c.pos+(1)>>0;o=new B.Node.ptr("","","","",400,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");b.AppendChild(o);o.AppendChild(new B.Node.ptr("","","","",401,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,new CW([g]),"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));if(d.Context.ParseOption.ProtyleWYSIWYG){o.InsertBefore(new B.Node.ptr("","","","",16,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,k,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));}else{b.AppendChild(new B.Node.ptr("","","","",16,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,k,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));}return CY.nil;}}}return new B.Node.ptr("","","","",16,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,U,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");};AD.prototype.parseBackslash=function(b,c){return this.$val.parseBackslash(b,c);};AD.ptr.prototype.parseNewline=function(b,c){var b,c,d,e,f,g,h,i,j,k,l,m,n;d=CY.nil;e=this;f=c.pos;c.pos=c.pos+(1)>>0;g=false;h=b.LastChild;if(!(CY.nil===h)&&(16===h.Type)){i=h.Tokens;j=i.$length;if(32===(k=j-1>>0,((k<0||k>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+k]))){l=D.TrimRight(i);h.Tokens=l[1];if(1>0,((m<0||m>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+m]));}}}d=new B.Node.ptr("","","","",32,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,new CW([(n=c.tokens,((f<0||f>=n.$length)?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+f]))]),"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");if(e.Context.ParseOption.ProtyleWYSIWYG){return d;}if(g){d.Type=31;}return d;};AD.prototype.parseNewline=function(b,c){return this.$val.parseNewline(b,c);};AD.ptr.prototype.MergeText=function(){var b;b=this;b.mergeText(b.Root);};AD.prototype.MergeText=function(){return this.$val.MergeText();};AD.ptr.prototype.mergeText=function(b){var b,c,d,e;c=this;d=b.FirstChild;while(true){if(!(!(CY.nil===d))){break;}e=d.Next;if(16===d.Type){while(true){if(!(!(CY.nil===e)&&(16===e.Type))){break;}d.AppendTokens(e.Tokens);e.Unlink();e=d.Next;}}else if(40===d.Type){while(true){if(!(!(CY.nil===e)&&(40===e.Type))){break;}d.AppendTokens(e.Tokens);e.Unlink();e=d.Next;}}else{c.mergeText(d);}d=e;}};AD.prototype.mergeText=function(b){return this.$val.mergeText(b);};AB.ptr.prototype.parseTable=function(b){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;c=CY.nil;d=CY.nil;e=this;f=CW.nil;g=b.Tokens.$length;h=0;i=0;while(true){if(!(ik){return[c,d];}l=e.parseTableDelimRow(D.TrimWhitespace(((k<0||k>=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+k])));if(DB.nil===l){return[c,d];}if((2===g)&&(1===l.$length)&&(0===(0>=l.$length?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+0]))&&!A.Contains(f,(new CW($stringToBytes("|"))))){return[c,d];}m=CZ.nil;n=0;while(true){if(!(n=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+n])),l,true);if(CY.nil===o){return[c,d];}m=$append(m,o);p=o.FirstChild;while(true){if(!(!(CY.nil===p))){break;}q=A.Index(p.Tokens,(new CW($stringToBytes("{:"))));if(!((0===q))){p=p.Next;continue;}r=$subslice(p.Tokens,q);s=e.parseKramdownSpanIAL(r);t=s[0];u=s[1];if(0>0));if(A.Contains(v,(new CW($stringToBytes("span"))))||A.Contains(v,(new CW($stringToBytes("fn__none"))))||A.Contains(v,(new CW($stringToBytes("width:"))))){p.KramdownIAL=u;p.Tokens=$subslice(p.Tokens,v.$length);w=new B.Node.ptr("","","","",456,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,v,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");p.PrependChild(w);}}p=p.Next;}n=n+(1)>>0;}d=new B.Node.ptr("","","","",106,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,l,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");d.TableAligns=l;d.AppendChild(e.newTableHead(m));x=k+1>>0;while(true){if(!(x=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+x]));z=e.parseTableRow(y,l,false);if(CY.nil===z){return[c,d];}if(e.ParseOption.KramdownSpanIAL){aa=z.FirstChild;while(true){if(!(!(CY.nil===aa))){break;}ab=A.Index(aa.Tokens,(new CW($stringToBytes("{:"))));if(!((0===ab))){aa=aa.Next;continue;}ac=$subslice(aa.Tokens,ab);ad=e.parseKramdownSpanIAL(ac);ae=ad[0];af=ad[1];if(0>0));if(A.Contains(ag,(new CW($stringToBytes("span"))))||A.Contains(ag,(new CW($stringToBytes("fn__none"))))||A.Contains(ag,(new CW($stringToBytes("width:"))))){aa.KramdownIAL=af;aa.Tokens=$subslice(aa.Tokens,ag.$length);ah=new B.Node.ptr("","","","",456,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,ag,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");aa.PrependChild(ah);}}aa=aa.Next;}}d.AppendChild(z);x=x+(1)>>0;}return[c,d];}else{if((10===(ai=b.Tokens,((i<0||i>=ai.$length)?($throwRuntimeError("index out of range"),undefined):ai.$array[ai.$offset+i])))||(0===i)){if(0===i){f=$subslice(b.Tokens,i);}else{f=$subslice(b.Tokens,(i+1>>0));}aj=e.parseTable0(f);if(!(CY.nil===aj)){if(0>0;i=i+(1)>>0;}return[c,d];};AB.prototype.parseTable=function(b){return this.$val.parseTable(b);};AB.ptr.prototype.parseTable0=function(b){var aa,ab,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;c=CY.nil;d=this;e=D.Split(b,10);f=e.$length;if(2>f){return c;}g=D.TrimWhitespace((1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1]));if(2>g.$length){return c;}h=d.parseTableDelimRow(g);if(DB.nil===h){return c;}if((2===f)&&(1===h.$length)&&(0===(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0]))&&!A.Contains(b,(new CW($stringToBytes("|"))))){return c;}i=d.parseTableRow(D.TrimWhitespace((0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0])),h,true);if(CY.nil===i){return c;}if(d.ParseOption.KramdownSpanIAL){j=i.FirstChild;while(true){if(!(!(CY.nil===j))){break;}k=A.LastIndex(j.Tokens,(new CW($stringToBytes("{:"))));if(0>k){j=j.Next;continue;}l=$subslice(j.Tokens,k);m=d.parseKramdownSpanIAL(l);n=m[0];o=m[1];if(0>0));j.Tokens=$subslice(j.Tokens,0,(j.Tokens.$length-p.$length>>0));q=new B.Node.ptr("","","","",456,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,p,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");j.InsertAfter(q);j=j.Next;}j=j.Next;}}c=new B.Node.ptr("","","","",106,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,h,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");c.TableAligns=h;c.AppendChild(d.newTableHead(new CZ([i])));r=2;while(true){if(!(r=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+r]));t=d.parseTableRow(s,h,false);if(CY.nil===t){return c;}if(d.ParseOption.KramdownSpanIAL){u=t.FirstChild;while(true){if(!(!(CY.nil===u))){break;}v=A.LastIndex(u.Tokens,(new CW($stringToBytes("{:"))));if(0>v){u=u.Next;continue;}w=$subslice(u.Tokens,v);x=d.parseKramdownSpanIAL(w);y=x[0];z=x[1];if(0>0));u.Tokens=$subslice(u.Tokens,0,(u.Tokens.$length-aa.$length>>0));ab=new B.Node.ptr("","","","",456,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,aa,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");u.InsertAfter(ab);u=u.Next;}u=u.Next;}}c.AppendChild(t);r=r+(1)>>0;}return c;};AB.prototype.parseTable0=function(b){return this.$val.parseTable0(b);};AB.ptr.prototype.newTableHead=function(b){var b,c,d,e,f,g,h,i,j;c=this;d=new B.Node.ptr("","","","",107,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");e=b;f=0;while(true){if(!(f=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+f]);h=new B.Node.ptr("","","","",108,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");d.AppendChild(h);i=g.FirstChild;while(true){if(!(!(CY.nil===i))){break;}j=i.Next;h.AppendChild(i);i=j;}f++;}return d;};AB.prototype.newTableHead=function(b){return this.$val.newTableHead(b);};V=function(b,c,d){var b,c,d,e,f,g,h;if((c+1>>0)>=b.$length||c<1){return false;}e=A.IndexByte($subslice(b,0,c),d);g=0===(f=A.Count($subslice(b,0,c),new CW([d]))%2,f===f?f:$throwRuntimeError("integer divide by zero"));if(g){return false;}h=A.IndexByte($subslice(b,(c+1>>0)),d);return-1h.$length){e=CY.nil;return e;}if(D.IsBlank((0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0]))){h=$subslice(h,1);}if(h.$length>0&&D.IsBlank((i=h.$length-1>>0,((i<0||i>=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+i])))){h=$subslice(h,0,(h.$length-1>>0));}j=h.$length;k=c.$length;if(d&&j>k){e=CY.nil;return e;}l=0;m=CW.nil;while(true){if(!(l=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+l]));m=A.ReplaceAll(m,(new CW($stringToBytes("|"))),(new CW($stringToBytes("|"))));n=new B.Node.ptr("","","","",109,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,((l<0||l>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+l]),0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");n.Tokens=m;e.AppendChild(n);l=l+(1)>>0;}while(true){if(!(l=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+l]),0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");e.AppendChild(o);l=l+(1)>>0;}return e;};AB.prototype.parseTableRow=function(b,c,d){return this.$val.parseTableRow(b,c,d);};AB.ptr.prototype.findTableDelimRow=function(b){var b,c,d,e,f,g,h,i;c=0;d=this;e=b.$length;if(2>e){c=-1;return c;}f=b;g=0;while(true){if(!(g=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+g]);if(!(DB.nil===d.parseTableDelimRow(i))){c=h;return c;}g++;}c=-1;return c;};AB.prototype.findTableDelimRow=function(b){return this.$val.findTableDelimRow(b);};AB.ptr.prototype.parseTableDelimRow=function(b){var b,c,d,e,f,g,h,i,j,k,l,m,n,o;c=DB.nil;d=this;e=b.$length;if(1>e){c=DB.nil;return c;}f=0;g=0;while(true){if(!(g=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+g]);if(!((124===f))&&!((45===f))&&!((58===f))&&!((32===f))){c=DB.nil;return c;}g=g+(1)>>0;}h=A.Index(b,(new CW($stringToBytes("\\|"))));if(0=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+0]))){i=$subslice(i,1);}if(i.$length>0&&D.IsBlank((j=i.$length-1>>0,((j<0||j>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+j])))){i=$subslice(i,0,(i.$length-1>>0));}k=DB.nil;l=i;m=0;while(true){if(!(m=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+m]);n=D.TrimWhitespace(n);n=A.ReplaceAll(n,(new CW($stringToBytes("|"))),(new CW($stringToBytes("|"))));if(1>e||CW.nil===n){c=DB.nil;return c;}o=d.tableDelimAlign(n);if(-1===o){c=DB.nil;return c;}k=$append(k,o);m++;}c=k;return c;};AB.prototype.parseTableDelimRow=function(b){return this.$val.parseTableDelimRow(b);};AB.ptr.prototype.tableDelimAlign=function(b){var b,c,d,e,f,g,h,i,j,k,l,m;c=this;d=b.$length;if(1>d){return-1;}e=false;f=false;g=e;h=f;i=(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0]);g=58===i;k=(j=d-1>>0,((j<0||j>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+j]));h=58===k;l=1;m=0;while(true){if(!(l<(d-1>>0))){break;}m=((l<0||l>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+l]);if(!((45===m))){return-1;}l=l+(1)>>0;}if(g&&h){return 2;}if(g){return 1;}if(h){return 3;}return 0;};AB.prototype.tableDelimAlign=function(b){return this.$val.tableDelimAlign(b);};W=function(b,c){var{b,c,d,e,f,g,$s,$r,$c}=$restore(this,{b,c});$s=$s||0;s:while(true){switch($s){case 0:if(!b.Context.ParseOption.SuperBlock||b.Context.indented){$s=-1;return 0;}d=b.parseSuperBlock();e=d[0];f=d[1];if(e){$s=1;continue;}$s=2;continue;case 1:$r=b.Context.closeUnmatchedBlocks();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}g=b.Context.addChild(475);$s=4;case 4:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}g;b.Context.addChildMarker(476,CW.nil);b.Context.addChildMarker(477,f);b.Context.offset=b.Context.currentLineLen-1>>0;$s=-1;return 1;case 2:$s=-1;return 0;}return;}var $f={$blk:W,$c:true,$r,b,c,d,e,f,g,$s};return $f;};$pkg.SuperBlockStart=W;X=function(b,c){var{b,c,d,e,$s,$r,$c}=$restore(this,{b,c});$s=$s||0;s:while(true){switch($s){case 0:if(!(CY.nil===c.Tip.LastChild)&&(478===c.Tip.LastChild.Type)&&c.Tip.LastChild.Close){$s=-1;return 1;}d=c.isSuperBlockClose($subslice(c.currentLine,c.nextNonspace));$s=3;case 3:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}if(d){$s=1;continue;}$s=2;continue;case 1:e=c.Tip;while(true){if(!(!(CY.nil===e))){break;}if(475===e.Type){$s=-1;return 3;}e=e.Parent;}case 2:$s=-1;return 0;}return;}var $f={$blk:X,$c:true,$r,b,c,d,e,$s};return $f;};$pkg.SuperBlockContinue=X;AB.ptr.prototype.superBlockFinalize=function(b){var{b,c,d,$s,$r,$c}=$restore(this,{b});$s=$s||0;s:while(true){switch($s){case 0:c=this;d=b.FirstChild;case 1:if(!(!(CY.nil===d))){$s=2;continue;}if(d.Close){d=d.Next;$s=1;continue;}$r=c.finalize(d);$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}d=d.Next;$s=1;continue;case 2:$s=-1;return;}return;}var $f={$blk:AB.ptr.prototype.superBlockFinalize,$c:true,$r,b,c,d,$s};return $f;};AB.prototype.superBlockFinalize=function(b){return this.$val.superBlockFinalize(b);};AD.ptr.prototype.parseSuperBlock=function(){var b,c,d,e,f,g,h,i,j,k,l,m;b=false;c=CW.nil;d=this;g=(e=d.Context.currentLine,f=d.Context.nextNonspace,((f<0||f>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+f]));if(!((123===g))){return[b,c];}h=g;i=0;j=d.Context.nextNonspace;while(true){if(!(j=k.$length)?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+j]))))){break;}i=i+(1)>>0;j=j+(1)>>0;}if(!((3===i))){return[b,c];}c=$subslice(d.Context.currentLine,(d.Context.nextNonspace+i>>0));c=D.TrimWhitespace(c);if(!A.EqualFold(c,CW.nil)&&!A.EqualFold(c,(new CW($stringToBytes("row"))))&&!A.EqualFold(c,(new CW($stringToBytes("col"))))){return[b,c];}l=true;m=c;b=l;c=m;return[b,c];};AD.prototype.parseSuperBlock=function(){return this.$val.parseSuperBlock();};AB.ptr.prototype.isSuperBlockClose=function(b){var{b,c,d,e,f,g,h,i,j,k,$s,$r,$c}=$restore(this,{b});$s=$s||0;s:while(true){switch($s){case 0:c=false;d=this;b=D.TrimWhitespace(b);if(A.Equal(b,(new CW($stringToBytes("\xE2\x80\xB8}}}"))))){e=new B.Node.ptr("","","","",1,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,C.CaretTokens,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");d.TipAppendChild(e);}f=A.HasSuffix(b,C.CaretTokens);b=A.ReplaceAll(b,C.CaretTokens,CW.nil);if(!A.Equal((new CW($stringToBytes("}}}"))),b)){$s=-1;return c;}if(f){$s=1;continue;}$s=2;continue;case 1:g=d.Tip.ChildrenByType(1);$s=3;case 3:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;i=h.$length;if(0>0,((j<0||j>=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+j]));k.Tokens=$appendSlice(k.Tokens,C.CaretTokens);}case 2:c=true;$s=-1;return c;}return;}var $f={$blk:AB.ptr.prototype.isSuperBlockClose,$c:true,$r,b,c,d,e,f,g,h,i,j,k,$s};return $f;};AB.prototype.isSuperBlockClose=function(b){return this.$val.isSuperBlockClose(b);};Y=function(b,c,d){var{b,c,d,e,$s,$r,$c}=$restore(this,{b,c,d});$s=$s||0;s:while(true){switch($s){case 0:e=DH.nil;e=new AD.ptr(CY.nil,new AB.ptr(DH.nil,d,CY.nil,CY.nil,CW.nil,0,0,0,0,0,0,false,false,false,false,CY.nil,CY.nil),DJ.nil,DK.nil,b,"","","","",DC.nil,new $Int64(0,0),new $Int64(0,0),"");e.Context.Tree=e;e.lexer=D.NewLexer(c);e.Root=new B.Node.ptr("","","","",0,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");$r=e.parseBlocks();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=e.parseInlines();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=e.finalParseBlockIAL();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}e.lexer=DJ.nil;$s=-1;return e;}return;}var $f={$blk:Y,$c:true,$r,b,c,d,e,$s};return $f;};$pkg.Parse=Y;AD.ptr.prototype.finalParseBlockIAL=function(){var{b,c,d,e,f,g,h,i,j,k,l,m,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:b=[b];c=[c];c[0]=this;if(!c[0].Context.ParseOption.KramdownBlockIAL){$s=-1;return;}b[0]=CZ.nil;$r=B.Walk(c[0].Root,(function(b,c){return function $b(d,e){var{d,e,f,g,h,i,j,k,l,$s,$r,$c}=$restore(this,{d,e});$s=$s||0;s:while(true){switch($s){case 0:if(!e||!d.IsBlock()||(455===d.Type)){$s=-1;return 2;}if((5===d.Type)&&!(CY.nil===d.FirstChild)&&CY.nil===d.FirstChild.Next){b[0]=$append(b[0],d);}if(""===d.ID){$s=1;continue;}$s=2;continue;case 1:f=d.IALAttr("id");if(""===f){$s=3;continue;}$s=4;continue;case 3:g=B.NewNodeID();$s=5;case 5:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}f=g;case 4:d.ID=f;if(c[0].Context.ParseOption.ProtyleWYSIWYG&&c[0].Context.ParseOption.Spin&&!((0===d.Type))&&!(CY.nil===d.Next)&&!((455===d.Next.Type))&&!(""===d.Next.ID)){$s=6;continue;}$s=7;continue;case 6:d.ID=d.Next.ID;d.KramdownIAL=d.Next.KramdownIAL;if(""===d.IALAttr("updated")){d.SetIALAttr("updated",$substring(d.ID,0,14));}h=B.NewNodeID();$s=8;case 8:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}d.Next.ID=h;d.Next.KramdownIAL=DD.nil;d.Next.SetIALAttr("id",d.Next.ID);d.Next.SetIALAttr("updated",$substring(d.Next.ID,0,14));if(!(CY.nil===d.Next.Next)&&(455===d.Next.Next.Type)){$s=9;continue;}$s=10;continue;case 9:i=BA(d.Next.KramdownIAL);$s=11;case 11:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}d.Next.Next.Tokens=i;case 10:j=BA(d.KramdownIAL);$s=12;case 12:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}$r=d.InsertAfter(new B.Node.ptr("","","","",455,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,j,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));$s=13;case 13:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return 2;case 7:case 2:k=d.Next;if(CY.nil===k||!((455===k.Type))){if(c[0].Context.ParseOption.ProtyleWYSIWYG){d.SetIALAttr("id",d.ID);d.SetIALAttr("updated",$substring(d.ID,0,14));}$s=-1;return 2;}d.KramdownIAL=BH(k.Tokens);if(""===d.IALAttr("updated")&&c[0].Context.ParseOption.ProtyleWYSIWYG){$s=14;continue;}$s=15;continue;case 14:d.SetIALAttr("updated",$substring(d.ID,0,14));l=BA(d.KramdownIAL);$s=16;case 16:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}k.Tokens=l;case 15:$s=-1;return 2;}return;}var $f={$blk:$b,$c:true,$r,d,e,f,g,h,i,j,k,l,$s};return $f;};})(b,c));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}d=b[0];e=0;case 2:if(!(e=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+e]);g=B.NewNodeID();$s=4;case 4:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;i=(new CW($stringToBytes("{: id=\""+h+"\"}")));j=new B.Node.ptr(h,"","","",1,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");j.KramdownIAL=new DD([new DC(["id",h]),new DC(["updated",$substring(h,0,14)])]);j.ID=h;j.InsertAfter(new B.Node.ptr("","","","",455,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,i,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));f.AppendChild(j);e++;$s=2;continue;case 3:k=CY.nil;l="";if(!(CY.nil===c[0].Context.rootIAL)){$s=5;continue;}$s=6;continue;case 5:k=c[0].Context.rootIAL;$s=7;continue;case 6:m=B.NewNodeID();$s=8;case 8:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}l=m;k=new B.Node.ptr("","","","",455,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,(new CW($stringToBytes("{: id=\""+l+"\" updated=\""+$substring(l,0,14)+"\" type=\"doc\"}"))),"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");c[0].Root.ID=l;c[0].ID=l;case 7:c[0].Root.AppendChild(k);$s=-1;return;}return;}var $f={$blk:AD.ptr.prototype.finalParseBlockIAL,$c:true,$r,b,c,d,e,f,g,h,i,j,k,l,m,$s};return $f;};AD.prototype.finalParseBlockIAL=function(){return this.$val.finalParseBlockIAL();};AA=function(b,c,d){var{b,c,d,e,$s,$r,$c}=$restore(this,{b,c,d});$s=$s||0;s:while(true){switch($s){case 0:e=DH.nil;e=new AD.ptr(CY.nil,new AB.ptr(DH.nil,d,CY.nil,CY.nil,CW.nil,0,0,0,0,0,0,false,false,false,false,CY.nil,CY.nil),DJ.nil,DK.nil,b,"","","","",DC.nil,new $Int64(0,0),new $Int64(0,0),"");e.Context.Tree=e;e.Root=new B.Node.ptr("","","","",0,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");e.Root.AppendChild(new B.Node.ptr("","","","",1,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,c,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));$r=e.parseInlines();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}e.lexer=DJ.nil;$s=-1;return e;}return;}var $f={$blk:AA,$c:true,$r,b,c,d,e,$s};return $f;};$pkg.Inline=AA;AB.ptr.prototype.advanceOffset=function(b,c){var b,c,d,e,f,g,h,i,j,k,l;d=this;e=d.currentLine;f=0;g=0;h=f;i=g;j=0;while(true){if(!(0=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+k]));if(9===j){h=4-((l=d.column%4,l===l?l:$throwRuntimeError("integer divide by zero")))>>0;if(c){d.partiallyConsumedTab=h>b;if(d.partiallyConsumedTab){i=b;}else{i=h;d.offset=d.offset+(1)>>0;}d.column=d.column+(i)>>0;b=b-(i)>>0;}else{d.partiallyConsumedTab=false;d.column=d.column+(h)>>0;d.offset=d.offset+(1)>>0;b=b-(1)>>0;}}else{d.partiallyConsumedTab=false;d.offset=d.offset+(1)>>0;d.column=d.column+(1)>>0;b=b-(1)>>0;}}};AB.prototype.advanceOffset=function(b,c){return this.$val.advanceOffset(b,c);};AB.ptr.prototype.advanceNextNonspace=function(){var b;b=this;b.offset=b.nextNonspace;b.column=b.nextNonspaceColumn;b.partiallyConsumedTab=false;};AB.prototype.advanceNextNonspace=function(){return this.$val.advanceNextNonspace();};AB.ptr.prototype.findNextNonspace=function(){var b,c,d,e,f,g;b=this;c=b.offset;d=b.column;e=0;while(true){e=(f=b.currentLine,((c<0||c>=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+c]));if(32===e){c=c+(1)>>0;d=d+(1)>>0;}else if(9===e){c=c+(1)>>0;d=d+((4-((g=d%4,g===g?g:$throwRuntimeError("integer divide by zero")))>>0))>>0;}else{break;}}b.blank=10===e;b.nextNonspace=c;b.nextNonspaceColumn=d;b.indent=b.nextNonspaceColumn-b.column>>0;b.indented=4<=b.indent;};AB.prototype.findNextNonspace=function(){return this.$val.findNextNonspace();};AB.ptr.prototype.closeUnmatchedBlocks=function(){var{b,c,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:b=this;if(!b.allClosed){$s=1;continue;}$s=2;continue;case 1:case 3:if(!(!(b.oldtip===b.lastMatchedContainer))){$s=4;continue;}c=b.oldtip.Parent;$r=b.finalize(b.oldtip);$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}b.oldtip=c;$s=3;continue;case 4:b.allClosed=true;case 2:$s=-1;return;}return;}var $f={$blk:AB.ptr.prototype.closeUnmatchedBlocks,$c:true,$r,b,c,$s};return $f;};AB.prototype.closeUnmatchedBlocks=function(){return this.$val.closeUnmatchedBlocks();};AB.ptr.prototype.closeSuperBlockChildren=function(){var{b,c,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:b=this;c=b.Tip;case 1:if(!(!(CY.nil===c)&&!((475===c.Type)))){$s=2;continue;}$r=b.finalize(c);$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}c=c.Parent;$s=1;continue;case 2:$s=-1;return;}return;}var $f={$blk:AB.ptr.prototype.closeSuperBlockChildren,$c:true,$r,b,c,$s};return $f;};AB.prototype.closeSuperBlockChildren=function(){return this.$val.closeSuperBlockChildren();};AB.ptr.prototype.finalize=function(b){var{b,c,d,e,f,g,$s,$r,$c}=$restore(this,{b});$s=$s||0;s:while(true){switch($s){case 0:c=this;d=b.Parent;b.Close=true;e=b.Type;if(e===(11)){$s=2;continue;}if((e===(9))||(e===(500))||(e===(510))||(e===(505))||(e===(535))){$s=3;continue;}if(e===(1)){$s=4;continue;}if(e===(300)){$s=5;continue;}if(e===(425)){$s=6;continue;}if(e===(7)){$s=7;continue;}if(e===(475)){$s=8;continue;}if(e===(495)){$s=9;continue;}if(e===(560)){$s=10;continue;}$s=11;continue;case 2:c.codeBlockFinalize(b);$s=11;continue;case 3:c.htmlBlockFinalize(b);$s=11;continue;case 4:f=AH(b,c);$s=12;case 12:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;if(g){$s=-1;return;}$s=11;continue;case 5:$r=c.mathBlockFinalize(b);$s=13;case 13:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=11;continue;case 6:c.yamlFrontMatterFinalize(b);$s=11;continue;case 7:$r=c.listFinalize(b);$s=14;case 14:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=11;continue;case 8:$r=c.superBlockFinalize(b);$s=15;case 15:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=11;continue;case 9:$r=c.gitConflictFinalize(b);$s=16;case 16:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=11;continue;case 10:c.customBlockFinalize(b);case 11:case 1:c.Tip=d;$s=-1;return;}return;}var $f={$blk:AB.ptr.prototype.finalize,$c:true,$r,b,c,d,e,f,g,$s};return $f;};AB.prototype.finalize=function(b){return this.$val.finalize(b);};AB.ptr.prototype.addChildMarker=function(b,c){var b,c,d,e;d=CY.nil;e=this;d=new B.Node.ptr("","","","",b,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,c,"","",true,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");e.Tip.AppendChild(d);return d;};AB.prototype.addChildMarker=function(b,c){return this.$val.addChildMarker(b,c);};AB.ptr.prototype.addChild=function(b){var{b,c,d,$s,$r,$c}=$restore(this,{b});$s=$s||0;s:while(true){switch($s){case 0:c=CY.nil;d=this;case 1:if(!(!d.Tip.CanContain(b))){$s=2;continue;}$r=d.finalize(d.Tip);$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=1;continue;case 2:c=new B.Node.ptr("","","","",b,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");d.Tip.AppendChild(c);d.Tip=c;$s=-1;return c;}return;}var $f={$blk:AB.ptr.prototype.addChild,$c:true,$r,b,c,d,$s};return $f;};AB.prototype.addChild=function(b){return this.$val.addChild(b);};AB.ptr.prototype.listsMatch=function(b,c){var b,c,d;d=this;return(b.Typ===c.Typ)&&(((0===b.Delimiter)&&(0===c.Delimiter))||(b.Delimiter===c.Delimiter))&&(b.BulletChar===c.BulletChar);};AB.prototype.listsMatch=function(b,c){return this.$val.listsMatch(b,c);};AF=function(){return new AE.ptr(true,true,true,true,true,true,true,false,true,$pkg.EmojiAliasUnicode,$pkg.EmojiUnicodeAlias,"https://cdn.jsdelivr.net/npm/vditor/dist/images/emoji",false,false,false,false,true,false,true,true,false,false,false,false,false,false,false,false,false,false,true,true,false,true,true,false,true,false,false,false);};$pkg.NewOptions=AF;AB.ptr.prototype.ParentTip=function(){var b,c;b=this;c=b.Tip.Parent;if(!(CY.nil===c)){b.Tip=b.Tip.Parent;}};AB.prototype.ParentTip=function(){return this.$val.ParentTip();};AB.ptr.prototype.TipAppendChild=function(b){var b,c;c=this;c.Tip.AppendChild(b);};AB.prototype.TipAppendChild=function(b){return this.$val.TipAppendChild(b);};AG=function(b,c){var b,c;if(c.blank){return 1;}return 0;};$pkg.ParagraphContinue=AG;AH=function(b,c){var{aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{b,c});$s=$s||0;s:while(true){switch($s){case 0:d=false;if(c.ParseOption.ParagraphBeginningSpace){e=D.TrimRight(b.Tokens);b.Tokens=e[1];}else{b.Tokens=D.TrimWhitespace(b.Tokens);}f=false;g=b.Tokens;while(true){if(!(0=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0])))){break;}g=c.parseLinkRefDef(g);if(!(CW.nil===g)){b.Tokens=g;f=true;g=b.Tokens;continue;}break;}if(f&&D.IsBlankLine(b.Tokens)){b.Unlink();}if(c.ParseOption.KramdownBlockIAL&&!(CY.nil===c.Tip.Parent)&&(8===c.Tip.Parent.Type)&&b===c.Tip.Parent.FirstChild){$s=1;continue;}$s=2;continue;case 1:h=BH(b.Tokens);if(!(DD.nil===h)){$s=3;continue;}$s=4;continue;case 3:i=new B.Node.ptr("","","","",1,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,h,false,"","","","","","","","","","","",0,"");j=BD(h);i.ID=(k=$mapIndex(j,$String.keyFor("id")),k!==undefined?k.v:"");c.Tip.Parent.AppendChild(i);l=BA(h);$s=5;case 5:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}$r=i.InsertAfter(new B.Node.ptr("","","","",455,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,l,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}b.Unlink();$s=-1;return d;case 4:case 2:if(c.ParseOption.GFMTaskListItem){$s=7;continue;}$s=8;continue;case 7:m=b.Parent;if(!(CY.nil===m)&&(8===m.Type)&&m.FirstChild===b){$s=9;continue;}$s=10;continue;case 9:if(3===m.ListData.Typ){$s=11;continue;}$s=12;continue;case 11:n=c.ParseOption.VditorWYSIWYG||c.ParseOption.VditorIR||c.ParseOption.VditorSV||c.ParseOption.ProtyleWYSIWYG;o=3>0));b.KramdownIAL=q;}}if(((3===p.$length)&&(A.EqualFold(p,(new CW($stringToBytes("[x]"))))||A.Equal(p,(new CW($stringToBytes("[ ]"))))))||(3=p.$length?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+3]))||((r=C.CaretTokens,(0>=r.$length?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+0]))===(3>=p.$length?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+3]))||((s=C.CaretTokens,(0>=s.$length?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+0]))===(2>=p.$length?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+2]))))){$s=15;continue;}$s=16;continue;case 15:t=false;u=false;v=false;w=t;x=u;y=v;if(c.ParseOption.VditorWYSIWYG||c.ParseOption.VditorIR||c.ParseOption.VditorSV||c.ParseOption.ProtyleWYSIWYG){z=A.IndexByte(p,93);if(A.HasPrefix(p,C.CaretTokens)){p=A.ReplaceAll(p,C.CaretTokens,CW.nil);w=true;}else if(A.HasPrefix($subslice(p,(z+1>>0)),C.CaretTokens)){p=A.ReplaceAll(p,C.CaretTokens,CW.nil);x=true;}else if(A.Contains($subslice(p,1,z),C.CaretTokens)){p=A.ReplaceAll(p,C.CaretTokens,CW.nil);y=true;}}aa=new B.Node.ptr("","","","",100,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,$subslice(p,0,3),"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,m.ListData.Checked,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");if(c.ParseOption.ProtyleWYSIWYG){b.InsertBefore(aa);}else{b.PrependChild(aa);}b.Tokens=$subslice(p,3);if(n){$s=17;continue;}$s=18;continue;case 17:ab=A.TrimSpace(b.Tokens);$s=19;case 19:if($c){$c=false;ab=ab.$blk();}if(ab&&ab.$blk!==undefined){break s;}b.Tokens=ab;if(w||x||y){b.Tokens=$appendSlice((new CW($stringToBytes(" \xE2\x80\xB8"))),b.Tokens);}else{if(!c.ParseOption.ProtyleWYSIWYG){b.Tokens=$appendSlice((new CW($stringToBytes(" "))),b.Tokens);}}case 18:if(0=aj.$length)?($throwRuntimeError("index out of range"),undefined):aj.$array[aj.$offset+ak]);b.InsertAfter(al);ak++;}b.Unlink();}case 21:case 16:case 14:case 12:case 10:case 8:if(c.ParseOption.GFMTable){am=c.parseTable(b);an=am[0];ao=am[1];if(!(CY.nil===ao)){if(!(CY.nil===an)){b.Tokens=an.Tokens;b.InsertAfter(ao);ao.Close=true;c.Tip=ao;d=true;$s=-1;return d;}else{b.Type=106;b.TableAligns=ao.TableAligns;ap=ao.FirstChild;while(true){if(!(!(CY.nil===ap))){break;}aq=ap.Next;b.AppendChild(ap);ap=aq;}}$s=-1;return d;}}if(c.ParseOption.ToC){$s=23;continue;}$s=24;continue;case 23:ar=c.parseToC(b);$s=25;case 25:if($c){$c=false;ar=ar.$blk();}if(ar&&ar.$blk!==undefined){break s;}as=ar;if(!(CY.nil===as)){b.Type=415;$s=-1;return d;}case 24:$s=-1;return d;}return;}var $f={$blk:AH,$c:true,$r,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};AI=function(b,c){var{b,c,d,e,f,g,h,$s,$r,$c}=$restore(this,{b,c});$s=$s||0;s:while(true){switch($s){case 0:if(b.Context.indented){$s=-1;return 0;}d=b.parseMathBlock();e=d[0];f=d[1];if(e){$s=1;continue;}$s=2;continue;case 1:$r=b.Context.closeUnmatchedBlocks();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}g=b.Context.addChild(300);$s=4;case 4:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;h.MathBlockDollarOffset=f;b.Context.advanceNextNonspace();b.Context.advanceOffset(f,false);$s=-1;return 2;case 2:$s=-1;return 0;}return;}var $f={$blk:AI,$c:true,$r,b,c,d,e,f,g,h,$s};return $f;};$pkg.MathBlockStart=AI;AJ=function(b,c){var{b,c,d,e,f,g,$s,$r,$c}=$restore(this,{b,c});$s=$s||0;s:while(true){switch($s){case 0:d=c.currentLine;e=c.indent;if(3>=e&&c.isMathBlockClose($subslice(d,c.nextNonspace))){$s=1;continue;}$s=2;continue;case 1:$r=c.finalize(b);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return 2;case 2:f=b.MathBlockDollarOffset;g=0;while(true){if(!(f>0)){break;}g=D.Peek(d,c.offset);if(!((32===g))&&!((9===g))){break;}c.advanceOffset(1,true);f=f-(1)>>0;}case 3:$s=-1;return 0;}return;}var $f={$blk:AJ,$c:true,$r,b,c,d,e,f,g,$s};return $f;};$pkg.MathBlockContinue=AJ;AB.ptr.prototype.mathBlockFinalize=function(b){var{b,c,d,e,f,g,$s,$r,$c}=$restore(this,{b});$s=$s||0;s:while(true){switch($s){case 0:c=this;if(2>b.Tokens.$length){b.AppendChild(new B.Node.ptr("","","","",301,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));b.AppendChild(new B.Node.ptr("","","","",302,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));b.AppendChild(new B.Node.ptr("","","","",303,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));$s=-1;return;}d=$subslice(b.Tokens,2);d=D.TrimWhitespace(d);if(c.ParseOption.VditorWYSIWYG||c.ParseOption.VditorIR||c.ParseOption.VditorSV||c.ParseOption.ProtyleWYSIWYG){if(A.HasSuffix(d,$pkg.MathBlockMarkerCaret)){d=A.TrimSuffix(d,$pkg.MathBlockMarkerCaret);d=$appendSlice(d,C.CaretTokens);}}if(A.HasSuffix(d,$pkg.MathBlockMarker)){d=$subslice(d,0,(d.$length-2>>0));}if(A.Contains(d,(new CW($stringToBytes("=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+f]));if(!((36===g))){return[b,c];}h=g;i=0;j=d.Context.nextNonspace;while(true){if(!(j=k.$length)?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+j]))))){break;}i=i+(1)>>0;j=j+(1)>>0;}if(2>i){return[b,c];}l=true;m=d.Context.indent;b=l;c=m;return[b,c];};AD.prototype.parseMathBlock=function(){return this.$val.parseMathBlock();};AB.ptr.prototype.isMathBlockClose=function(b){var b,c,d,e,f,g,h,i;c=this;if(c.ParseOption.KramdownBlockIAL&&BG(b)){d=c.parseKramdownBlockIAL(b);if(0=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0]);if(!((f===36))){return false;}if(2>D.Accept(b,f)){return false;}b=D.TrimWhitespace(b);g=b;h=0;while(true){if(!(h=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+h]);if(!((i===36))){return false;}h++;}return true;};AB.prototype.isMathBlockClose=function(b){return this.$val.isMathBlockClose(b);};AK=function(b,c){var{b,c,d,e,f,g,h,i,j,k,l,m,$s,$r,$c}=$restore(this,{b,c});$s=$s||0;s:while(true){switch($s){case 0:if(!((7===c.Type))&&b.Context.indented){$s=-1;return 0;}d=b.parseListMarker(c);e=d[0];f=d[1];if(DA.nil===e){$s=-1;return 0;}$r=b.Context.closeUnmatchedBlocks();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}g=(c.Type===7)&&b.Context.listsMatch(c.ListData,e);if(!((b.Context.Tip.Type===7))||!g){$s=2;continue;}$s=3;continue;case 2:h=b.Context.addChild(7);$s=4;case 4:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=h;i.ListData=e;case 3:j=b.Context.addChild(8);$s=5;case 5:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j;k.ListData=e;if(b.Context.ParseOption.KramdownBlockIAL&&!(DD.nil===f)){$s=6;continue;}$s=7;continue;case 6:k.KramdownIAL=f;k.ID=k.IALAttr("id");l=BA(f);$s=8;case 8:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}b.Context.offset=b.Context.offset+(l.$length)>>0;case 7:k.Tokens=e.Marker;if((1===k.ListData.Typ)||((3===k.ListData.Typ)&&(0===k.ListData.BulletChar))){m=k.Previous;if(!(CY.nil===m)){k.ListData.Num=m.ListData.Num+1>>0;}else{k.ListData.Num=e.Start;}}$s=-1;return 1;}return;}var $f={$blk:AK,$c:true,$r,b,c,d,e,f,g,h,i,j,k,l,m,$s};return $f;};$pkg.ListStart=AK;AL=function(b,c){var b,c;if(c.blank){if(CY.nil===b.FirstChild){return 1;}c.advanceNextNonspace();}else if(c.indent>=(b.ListData.MarkerOffset+b.ListData.Padding>>0)){c.advanceOffset(b.ListData.MarkerOffset+b.ListData.Padding>>0,true);}else{return 1;}return 0;};$pkg.ListItemContinue=AL;AB.ptr.prototype.listFinalize=function(b){var{b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,$s,$r,$c}=$restore(this,{b});$s=$s||0;s:while(true){switch($s){case 0:c=this;d=b.FirstChild;while(true){if(!(!(CY.nil===d))){break;}if(AN(d)&&!(CY.nil===d.Next)){b.ListData.Tight=false;break;}e=d.FirstChild;while(true){if(!(!(CY.nil===e))){break;}if(AN(e)&&(!(CY.nil===d.Next)||!(CY.nil===e.Next))){b.ListData.Tight=false;break;}e=e.Next;}d=d.Next;}if(c.ParseOption.KramdownBlockIAL){$s=1;continue;}$s=2;continue;case 1:f=b.FirstChild;case 3:if(!(!(CY.nil===f))){$s=4;continue;}if(CY.nil===f.FirstChild){$s=5;continue;}$s=6;continue;case 5:if(!((455===f.Type))){$s=7;continue;}$s=8;continue;case 7:g=B.NewNodeID();$s=9;case 9:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;i=(new CW($stringToBytes("{: id=\""+h+"\"}")));f.KramdownIAL=new DD([new DC(["id",h])]);f.ID=h;f.InsertAfter(new B.Node.ptr("","","","",455,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,i,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));j=B.NewNodeID();$s=10;case 10:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}h=j;i=(new CW($stringToBytes("{: id=\""+h+"\"}")));k=new B.Node.ptr(h,"","","",1,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");k.KramdownIAL=new DD([new DC(["id",h])]);k.ID=h;k.InsertAfter(new B.Node.ptr("","","","",455,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,i,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));f.AppendChild(k);f=f.Next;case 8:f=f.Next;$s=3;continue;case 6:if(7=l.$length?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+0])))){$s=11;continue;}$s=12;continue;case 11:m=c.parseKramdownIALInListItem(f.FirstChild.Tokens);if(0=m.$length?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+0]),(1>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+1]));o=BA(m);$s=16;case 16:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}p=o;f.InsertAfter(new B.Node.ptr("","","","",455,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,p,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));q=$subslice(f.FirstChild.Tokens,(A.Index(f.FirstChild.Tokens,(new CW($stringToBytes("}"))))+1>>0));q=D.TrimWhitespace(q);f.FirstChild.Tokens=q;f=f.Next;case 15:$s=13;continue;case 12:r=CW.nil;if(DD.nil===f.KramdownIAL){$s=17;continue;}$s=18;continue;case 17:s=B.NewNodeID();$s=20;case 20:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}t=s;r=(new CW($stringToBytes("{: id=\""+t+"\"}")));f.KramdownIAL=new DD([new DC(["id",t])]);f.ID=t;$s=19;continue;case 18:u=BA(f.KramdownIAL);$s=21;case 21:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}r=u;case 19:f.InsertAfter(new B.Node.ptr("","","","",455,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,r,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));case 13:f=f.Next;$s=3;continue;case 4:case 2:$s=-1;return;}return;}var $f={$blk:AB.ptr.prototype.listFinalize,$c:true,$r,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,$s};return $f;};AB.prototype.listFinalize=function(b){return this.$val.listFinalize(b);};AD.ptr.prototype.parseListMarker=function(b){var aa,ab,ac,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;c=DA.nil;d=DD.nil;e=this;if(4<=e.Context.indent){f=DA.nil;g=DD.nil;c=f;d=g;return[c,d];}h=e.Context.currentLine;i=$subslice(h,e.Context.nextNonspace);c=new B.ListData.ptr(0,true,0,0,0,0,e.Context.indent,false,CW.nil,-1);j=1;k=new CW([(0>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+0])]);l=0;if((43===(0>=k.$length?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+0]))||(45===(0>=k.$length?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+0]))||(42===(0>=k.$length?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+0]))){c.BulletChar=(0>=k.$length?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+0]);}else{m=e.parseOrderedListMarker(i);k=m[0];l=m[1];if(!(CW.nil===k)){if(!((b.Type===1))||A.Equal(AM,k)){c.Typ=1;n=I.Atoi(E.BytesToStr(k));c.Start=n[0];j=k.$length+1>>0;c.Delimiter=l;}else{o=DA.nil;p=DD.nil;c=o;d=p;return[c,d];}}else{q=DA.nil;r=DD.nil;c=q;d=r;return[c,d];}}c.Marker=k;if(1===c.Typ){c.Marker=$appendSlice(c.Marker,(new CW($stringToBytes("."))));}t=(s=e.Context.nextNonspace+j>>0,((s<0||s>=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+s]));if(!D.IsWhitespace(t)){u=DA.nil;v=DD.nil;c=u;d=v;return[c,d];}if((b.Type===1)&&(10===t)){w=DA.nil;x=DD.nil;c=w;d=x;return[c,d];}e.Context.advanceNextNonspace();e.Context.advanceOffset(j,true);y=e.Context.column;z=e.Context.offset;while(true){e.Context.advanceOffset(1,true);t=D.Peek(h,e.Context.offset);if((e.Context.column-y>>0)>=5||(0===(t))||(!((32===t))&&!((9===t)))){break;}}t=D.Peek(h,e.Context.offset);aa=(0===t)||(10===t);ab=e.Context.column-y>>0;if(ab>=5||ab<1||aa){c.Padding=j+1>>0;e.Context.column=y;e.Context.offset=z;t=D.Peek(h,e.Context.offset);if((32===t)||(9===t)){e.Context.advanceOffset(1,true);}}else{c.Padding=j+ab>>0;}if(!aa){ac=$subslice(h,e.Context.offset);if(e.Context.ParseOption.KramdownBlockIAL){d=e.Context.parseKramdownIALInListItem(ac);if(0>0));}}if(e.Context.ParseOption.VditorWYSIWYG||e.Context.ParseOption.VditorIR||e.Context.ParseOption.VditorSV){ac=A.ReplaceAll(ac,C.CaretTokens,CW.nil);}if(3<=ac.$length){if((91===(0>=ac.$length?($throwRuntimeError("index out of range"),undefined):ac.$array[ac.$offset+0]))&&((120===(1>=ac.$length?($throwRuntimeError("index out of range"),undefined):ac.$array[ac.$offset+1]))||(88===(1>=ac.$length?($throwRuntimeError("index out of range"),undefined):ac.$array[ac.$offset+1]))||(32===(1>=ac.$length?($throwRuntimeError("index out of range"),undefined):ac.$array[ac.$offset+1])))&&(93===(2>=ac.$length?($throwRuntimeError("index out of range"),undefined):ac.$array[ac.$offset+2]))){c.Typ=3;c.Checked=(120===(1>=ac.$length?($throwRuntimeError("index out of range"),undefined):ac.$array[ac.$offset+1]))||(88===(1>=ac.$length?($throwRuntimeError("index out of range"),undefined):ac.$array[ac.$offset+1]));}}}return[c,d];};AD.prototype.parseListMarker=function(b){return this.$val.parseListMarker(b);};AD.ptr.prototype.parseOrderedListMarker=function(b){var b,c,d,e,f,g,h,i,j;c=CW.nil;d=0;e=this;f=b.$length;g=0;h=0;while(true){if(!(g=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+g]);if(!D.IsDigit(h)||8>0;}if(1>c.$length||(!((46===d))&&!((41===d)))){i=CW.nil;j=0;c=i;d=j;return[c,d];}return[c,d];};AD.prototype.parseOrderedListMarker=function(b){return this.$val.parseOrderedListMarker(b);};AN=function(b){var b,c;while(true){if(!(!(CY.nil===b))){break;}if(b.LastLineBlank){return true;}c=b.Type;if(!b.LastLineChecked&&((c===7)||(c===8))){b.LastLineChecked=true;b=b.LastChild;}else{b.LastLineChecked=true;break;}}return false;};AD.ptr.prototype.FindLinkRefDefLink=function(b){var{b,c,d,$s,$r,$c}=$restore(this,{b});$s=$s||0;s:while(true){switch($s){case 0:b=[b];c=[c];c[0]=CY.nil;d=this;if(!d.Context.ParseOption.LinkRef){$s=-1;return c[0];}if(d.Context.ParseOption.VditorIR||d.Context.ParseOption.VditorSV||d.Context.ParseOption.VditorWYSIWYG||d.Context.ParseOption.ProtyleWYSIWYG){b[0]=A.ReplaceAll(b[0],C.CaretTokens,CW.nil);}$r=B.Walk(d.Root,(function(b,c){return function(e,f){var e,f;if(!f||!((46===e.Type))){return 2;}if(A.EqualFold(e.Tokens,b[0])){c[0]=e.FirstChild;return 0;}return 2;};})(b,c));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return c[0];}return;}var $f={$blk:AD.ptr.prototype.FindLinkRefDefLink,$c:true,$r,b,c,d,$s};return $f;};AD.prototype.FindLinkRefDefLink=function(b){return this.$val.FindLinkRefDefLink(b);};AB.ptr.prototype.parseLinkRefDef=function(b){var aa,ab,ac,ad,ae,af,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;c=this;if(!c.ParseOption.LinkRef){return CW.nil;}d=D.TrimLeft(b);b=d[1];if(1>b.$length){return CW.nil;}e=c.parseLinkLabel(b);f=e[0];g=e[1];h=e[2];if(2>f||1>h.$length){return CW.nil;}i=g.$length;if(1>i){return CW.nil;}if(!((58===(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0])))){return CW.nil;}g=$subslice(g,1);j=D.TrimLeft(g);k=j[0];g=j[1];l=D.StatWhitespace(k);m=l[0];if(1m){return CW.nil;}if(0<(s+t>>0)&&!D.IsBlankLine(g)&&!((10===(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0])))){return CW.nil;}y=b;z=D.TrimLeft(g);k=z[0];b=z[1];aa=D.StatWhitespace(k);ab=aa[1];ac=aa[2];if(!D.IsBlankLine(b)&&0<(ab+ac>>0)){g=y;}else{g=b;}ad=c.Tree.newLink(33,h,p,x,1);ae=new B.Node.ptr("","","","",46,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,h,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");ae.AppendChild(ad);af=c.Tip;if(!((45===af.Type))){af=new B.Node.ptr("","","","",45,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");}af.AppendChild(ae);c.Tip.Parent.AppendChild(af);return g;};AB.prototype.parseLinkRefDef=function(b){return this.$val.parseLinkRefDef(b);};AB.ptr.prototype.parseLinkTitle=function(b){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;c=false;d=CW.nil;e=CW.nil;f=CW.nil;g=this;if(1>b.$length){h=true;i=CW.nil;j=b;k=CW.nil;c=h;d=i;e=j;f=k;return[c,d,e,f];}if(91===(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])){l=true;m=CW.nil;n=b;o=CW.nil;c=l;d=m;e=n;f=o;return[c,d,e,f];}p=g.parseLinkTitleMatch(34,34,b);c=p[0];d=p[1];e=p[2];f=p[3];if(!c){q=g.parseLinkTitleMatch(39,39,b);c=q[0];d=q[1];e=q[2];f=q[3];if(!c){r=g.parseLinkTitleMatch(40,41,b);c=r[0];d=r[1];e=r[2];f=r[3];}}if(!(CW.nil===f)){if(!g.ParseOption.VditorWYSIWYG&&!g.ParseOption.VditorIR&&!g.ParseOption.VditorSV&&!g.ParseOption.ProtyleWYSIWYG){f=G.UnescapeBytes(f);}}return[c,d,e,f];};AB.prototype.parseLinkTitle=function(b){return this.$val.parseLinkTitle(b);};AB.ptr.prototype.parseBlockRefText=function(b){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;c=false;d=CW.nil;e=CW.nil;f=CW.nil;g="";h=this;if(1>b.$length){i=true;j=CW.nil;k=b;l=CW.nil;m="";c=i;d=j;e=k;f=l;g=m;return[c,d,e,f,g];}if(91===(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])){n=true;o=CW.nil;p=b;q=CW.nil;r="";c=n;d=o;e=p;f=q;g=r;return[c,d,e,f,g];}s=h.parseLinkTitleMatch(34,34,b);c=s[0];d=s[1];e=s[2];f=s[3];g="s";if(!c){t=h.parseLinkTitleMatch(39,39,b);c=t[0];d=t[1];e=t[2];f=t[3];g="d";}if(!(CW.nil===f)){if(!h.ParseOption.VditorWYSIWYG&&!h.ParseOption.VditorIR&&!h.ParseOption.VditorSV&&!h.ParseOption.ProtyleWYSIWYG){f=G.UnescapeBytes(f);}}return[c,d,e,f,g];};AB.prototype.parseBlockRefText=function(b){return this.$val.parseBlockRefText(b);};AB.ptr.prototype.parseLinkTitleMatch=function(b,c,d){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;e=false;f=CW.nil;g=CW.nil;h=CW.nil;i=this;g=d;j=d.$length;if(2>j){return[e,f,g,h];}if(!((b===(0>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+0])))){return[e,f,g,h];}k=d;j=k.$length;l=false;m=1;n=0;o=0;while(true){if(!(m=k.$length)?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+m]);f=$append(f,p);q=J.DecodeRune($subslice(k,m));o=q[0];n=q[1];r=1;while(true){if(!(r>0,((s<0||s>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+s])));r=r+(1)>>0;}h=$appendSlice(h,E.StrToBytes(($encodeRune(o))));if((c===p)&&!D.IsBackslashEscapePunct(d,m)){l=true;h=$subslice(h,0,(h.$length-1>>0));break;}m=m+(n)>>0;}if(!l){f=CW.nil;return[e,f,g,h];}e=true;g=$subslice(d,(m+1>>0));return[e,f,g,h];};AB.prototype.parseLinkTitleMatch=function(b,c,d){return this.$val.parseLinkTitleMatch(b,c,d);};AB.ptr.prototype.parseLinkDest=function(b){var b,c,d,e,f,g,h;c=CW.nil;d=CW.nil;e=CW.nil;f=this;g=f.parseLinkDest1(b);c=g[0];d=g[1];e=g[2];if(CW.nil===c){h=f.parseLinkDest2(b);c=h[0];d=h[1];e=h[2];}if(!(CW.nil===c)){if(!f.ParseOption.VditorWYSIWYG&&!f.ParseOption.VditorIR&&!f.ParseOption.VditorSV&&!f.ParseOption.ProtyleWYSIWYG){e=G.EncodeDestination(G.UnescapeBytes(e));}}return[c,d,e];};AB.prototype.parseLinkDest=function(b){return this.$val.parseLinkDest(b);};AB.ptr.prototype.parseLinkDest2=function(b){var b,c,d,e,f,g,h,i,j,k,l,m,n,o;c=CW.nil;d=CW.nil;e=CW.nil;f=this;d=b;g=b.$length;if(1>g){return[c,d,e];}c=$makeSlice(CW,0,256);e=$makeSlice(CW,0,256);h=0;i=0;j=0;k=0;while(true){if(!(i=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+i]);c=$append(c,l);m=J.DecodeRune($subslice(b,i));k=m[0];j=m[1];n=1;while(true){if(!(n>0,((o<0||o>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+o])));n=n+(1)>>0;}e=$appendSlice(e,E.StrToBytes(($encodeRune(k))));if(D.IsWhitespace(l)||D.IsControl(l)){e=$subslice(e,0,(e.$length-1>>0));c=$subslice(c,0,(c.$length-1>>0));break;}if((40===l)&&!D.IsBackslashEscapePunct(b,i)){h=h+(1)>>0;}if((41===l)&&!D.IsBackslashEscapePunct(b,i)){h=h-(1)>>0;if(1>h){i=i+(1)>>0;break;}}i=i+(j)>>0;}d=$subslice(b,i);if(g>i&&!D.IsWhitespace(((i<0||i>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+i]))){c=CW.nil;return[c,d,e];}return[c,d,e];};AB.prototype.parseLinkDest2=function(b){return this.$val.parseLinkDest2(b);};AB.ptr.prototype.parseLinkDest1=function(b){var b,c,d,e,f,g,h,i,j,k,l,m,n,o;c=CW.nil;d=CW.nil;e=CW.nil;f=this;d=b;g=b.$length;if(2>g){return[c,d,e];}if(!((60===(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])))){return[c,d,e];}c=$makeSlice(CW,0,256);e=$makeSlice(CW,0,256);h=false;i=0;j=0;k=0;while(true){if(!(i=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+i]);c=$append(c,l);j=1;if(0>0,((o<0||o>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+o])));n=n+(1)>>0;}e=$appendSlice(e,E.StrToBytes(($encodeRune(k))));if((60===l)&&!D.IsBackslashEscapePunct(b,i)){c=CW.nil;return[c,d,e];}}if((62===l)&&!D.IsBackslashEscapePunct(b,i)){h=true;e=$subslice(e,0,(e.$length-1>>0));break;}i=i+(j)>>0;}if(!h){c=CW.nil;return[c,d,e];}d=$subslice(b,(i+1>>0));return[c,d,e];};AB.prototype.parseLinkDest1=function(b){return this.$val.parseLinkDest1(b);};AB.ptr.prototype.parseLinkLabel=function(b){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;c=0;d=CW.nil;e=CW.nil;f=this;g=b.$length;if(2>g){return[c,d,e];}if(!((91===(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])))){return[c,d,e];}h=$makeSlice(CW,0,b.$length);h=$append(h,(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0]));i=false;j=1;while(true){if(!(j=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+j]);h=$append(h,k);l=J.DecodeRune($subslice(b,j));m=l[0];n=l[1];o=1;while(true){if(!(o>0,((p<0||p>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+p])));o=o+(1)>>0;}e=$appendSlice(e,E.StrToBytes(($encodeRune(m))));if((93===k)&&!D.IsBackslashEscapePunct(b,j)){i=true;e=$subslice(e,0,(e.$length-1>>0));d=$subslice(b,(j+1>>0));break;}if((91===k)&&!D.IsBackslashEscapePunct(b,j)){h=CW.nil;return[c,d,e];}j=j+(n)>>0;}if(!i||CW.nil===D.TrimWhitespace(e)||999=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+s]);if((r===32)&&s<(q-1>>0)&&((t=s+1>>0,((t<0||t>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+t]))===32)){e=$appendSlice($subslice(e,0,s),$subslice(e,(s+1>>0)));q=q-(1)>>0;}s=s+(1)>>0;}}c=h.$length;return[c,d,e];};AB.prototype.parseLinkLabel=function(b){return this.$val.parseLinkLabel(b);};AD.ptr.prototype.parseInlines=function(){var{b,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:b=this;$r=b.walkParseInline(b.Root);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if(b.Context.ParseOption.KramdownSpanIAL){$s=2;continue;}$s=3;continue;case 2:$r=b.parseKramdownSpanIAL();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 3:$s=-1;return;}return;}var $f={$blk:AD.ptr.prototype.parseInlines,$c:true,$r,b,$s};return $f;};AD.prototype.parseInlines=function(){return this.$val.parseInlines();};AD.ptr.prototype.walkParseInline=function(b){var{b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,$s,$r,$c}=$restore(this,{b});$s=$s||0;s:while(true){switch($s){case 0:c=this;if(CY.nil===b){$s=-1;return;}d=b.Type;if(475===d){if(!(CY.nil===b.LastChild)&&(477===b.LastChild.Type)){b.Type=1;b.Tokens=$appendSlice((new CW($stringToBytes("{{{"))),b.LastChild.Tokens);b.FirstChild.Unlink();b.LastChild.Unlink();d=1;}}if((1===d)||(2===d)||(109===d)){$s=1;continue;}if(11===d){$s=2;continue;}$s=3;continue;case 1:e=b.Tokens;if(1===d){if(CW.nil===e){if(!((8===b.Parent.Type))||c.Context.ParseOption.VditorWYSIWYG||c.Context.ParseOption.VditorIR||c.Context.ParseOption.VditorSV){f=b.Next;b.Unlink();b.Next=f;}$s=-1;return;}else{g=c.Context.parseKramdownIALInListItem(e);if(0=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0]),(1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1])));i=b.Next;b.Unlink();b.Next=i;$s=-1;return;}}}}j=e.$length;if(1>j){$s=-1;return;}k=new AC.ptr(e,j,0,DM.nil,DM.nil);$r=c.parseInline(b,k);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}c.processEmphasis(DM.nil,k);c.mergeText(b);if(c.Context.ParseOption.GFMAutoLink&&!c.Context.ParseOption.VditorWYSIWYG&&!c.Context.ParseOption.VditorIR&&!c.Context.ParseOption.VditorSV&&!c.Context.ParseOption.ProtyleWYSIWYG){c.parseGFMAutoEmailLink(b);c.parseGFMAutoLink(b);}if(c.Context.ParseOption.Emoji){$s=5;continue;}$s=6;continue;case 5:$r=c.emoji(b);$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 6:$s=-1;return;case 2:if(b.IsFencedCodeBlock){l=new B.Node.ptr("","","","",12,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,b.CodeBlockOpenFence,"","",false,false,false,0,false,0,b.CodeBlockFenceLen,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");b.PrependChild(l);m=new B.Node.ptr("","","","",14,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,b.CodeBlockInfo,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");b.AppendChild(m);n=new B.Node.ptr("","","","",15,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,b.Tokens,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");b.AppendChild(n);if(CW.nil===b.CodeBlockCloseFence){b.CodeBlockCloseFence=b.CodeBlockOpenFence;}o=new B.Node.ptr("","","","",13,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,b.CodeBlockCloseFence,"","",false,false,false,0,false,0,b.CodeBlockFenceLen,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");b.AppendChild(o);}else{p=new B.Node.ptr("","","","",15,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,b.Tokens,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");b.AppendChild(p);}b.Tokens=CW.nil;case 3:q=b.FirstChild;case 8:if(!(!(CY.nil===q))){$s=9;continue;}$r=c.walkParseInline(q);$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}q=q.Next;$s=8;continue;case 9:$s=-1;return;}return;}var $f={$blk:AD.ptr.prototype.walkParseInline,$c:true,$r,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,$s};return $f;};AD.prototype.walkParseInline=function(b){return this.$val.walkParseInline(b);};AD.ptr.prototype.parseInlineMath=function(b){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;c=CY.nil;d=this;if(3>b.tokensLen||!d.Context.ParseOption.InlineMath){b.pos=b.pos+(1)>>0;c=new B.Node.ptr("","","","",16,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,AO,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");return c;}e=b.pos;f=e;g=0;while(true){if(!(f=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+f]))))){break;}g=g+(1)>>0;f=f+(1)>>0;}if(2<=g){if(d.Context.ParseOption.ProtyleWYSIWYG){b.pos=b.pos+(1)>>0;c=new B.Node.ptr("","","","",16,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,AO,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");return c;}i=false;j=f+g>>0;k=0;while(true){if(!(j=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+j]));if((36===k)&&j<(b.tokensLen-1>>0)&&(36===(m=b.tokens,n=j+1>>0,((n<0||n>=m.$length)?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+n])))){i=true;break;}j=j+(1)>>0;}if(i){c=new B.Node.ptr("","","","",300,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");c.AppendChild(new B.Node.ptr("","","","",301,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));c.AppendChild(new B.Node.ptr("","","","",302,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,$subslice(b.tokens,f,j),"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));c.AppendChild(new B.Node.ptr("","","","",303,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));b.pos=j+2>>0;return c;}}if(!d.Context.ParseOption.InlineMathAllowDigitAfterOpenMarker&&b.tokensLen>(e+1>>0)&&D.IsDigit((o=b.tokens,p=e+1>>0,((p<0||p>=o.$length)?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+p])))){b.pos=b.pos+(3)>>0;if(b.tokens.$length<(e+3>>0)){c=new B.Node.ptr("","","","",16,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,$subslice(b.tokens,e),"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");return c;}c=new B.Node.ptr("","","","",16,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,$subslice(b.tokens,e,(e+3>>0)),"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");return c;}q=d.matchInlineMathEnd($subslice(b.tokens,(e+1>>0)));if(1>q){b.pos=b.pos+(1)>>0;c=new B.Node.ptr("","","","",16,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,AO,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");return c;}if(d.Context.ParseOption.TextMark){if(A.Contains($subslice(b.tokens,(e+1>>0),((e+q>>0)+1>>0)),(new CW($stringToBytes(">0;c=new B.Node.ptr("","","","",16,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,AO,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");return c;}}q=(e+q>>0)+2>>0;r=$subslice(b.tokens,(e+1>>0),(q-1>>0));if(1>D.TrimWhitespace(r).$length){b.pos=b.pos+(1)>>0;c=new B.Node.ptr("","","","",16,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,AO,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");return c;}c=new B.Node.ptr("","","","",304,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");c.AppendChild(new B.Node.ptr("","","","",305,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));c.AppendChild(new B.Node.ptr("","","","",306,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,r,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));c.AppendChild(new B.Node.ptr("","","","",307,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));b.pos=q;return c;};AD.prototype.parseInlineMath=function(b){return this.$val.parseInlineMath(b);};AD.ptr.prototype.matchInlineMathEnd=function(b){var b,c,d,e,f,g;c=0;d=this;e=b.$length;while(true){if(!(c=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+c]))&&0>0,((f<0||f>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+f]))))){if(c<(e-1>>0)){if(!D.IsDigit((g=c+1>>0,((g<0||g>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+g])))||d.Context.ParseOption.InlineMathAllowDigitAfterOpenMarker){c=c;return c;}}else{c=c;return c;}}else if(10===((c<0||c>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+c])){c=-1;return c;}c=c+(1)>>0;}c=-1;return c;};AD.prototype.matchInlineMathEnd=function(b){return this.$val.matchInlineMathEnd(b);};AB.ptr.prototype.parseInlineLinkDest=function(b){var{aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{b});$s=$s||0;s:while(true){switch($s){case 0:c=CW.nil;d=CW.nil;e=CW.nil;f=this;d=b;g=b.$length;if(2>g){$s=-1;return[c,d,e];}c=$makeSlice(CW,0,256);e=$makeSlice(CW,0,256);h=60===(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1]);if(h){i=false;c=$append(c,(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0]),(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1]));j=2;k=1;l=0;m=CW.nil;n=CW.nil;o=m;p=n;while(true){if(!(j=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+j]);if(10===q){c=CW.nil;$s=-1;return[c,d,e];}if(q<128){c=$append(c,q);o=new CW([q]);}else{o=new CW([]);r=J.DecodeRune($subslice(b,j));l=r[0];k=r[1];p=E.StrToBytes(($encodeRune(l)));c=$appendSlice(c,p);o=$appendSlice(o,p);}e=$appendSlice(e,o);if((62===q)&&!D.IsBackslashEscapePunct(b,j)){e=$subslice(e,0,(e.$length-1>>0));i=true;break;}j=j+(k)>>0;}if(!i||g<=(j+1>>0)){c=CW.nil;$s=-1;return[c,d,e];}if((62===(s=j+1>>0,((s<0||s>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+s])))||(41===(t=j+1>>0,((t<0||t>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+t])))){c=$append(c,(u=j+1>>0,((u<0||u>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+u])));d=$subslice(b,(j+2>>0));}else{d=$subslice(b,(j+1>>0));}}else{v=0;w=0;x=1;y=0;z=CW.nil;aa=CW.nil;ab=z;ac=aa;ad=false;while(true){if(!(w=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+w]);if(ae<128){c=$append(c,ae);ab=new CW([ae]);}else{ab=new CW([]);af=J.DecodeRune($subslice(b,w));y=af[0];x=af[1];ac=E.StrToBytes(($encodeRune(y)));c=$appendSlice(c,ac);ab=$appendSlice(ab,ac);}e=$appendSlice(e,ab);if(!ad&&!D.IsWhitespace(ae)&&0>0));c=$subslice(c,0,(c.$length-1>>0));v=v-(1)>>0;break;}}else{if(ad&&D.IsWhitespace(ae)&&(w+1>>0)>0,((ag<0||ag>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+ag]));if((34===ah)||(39===ah)){e=$subslice(e,0,(e.$length-x>>0));c=$subslice(c,0,(c.$length-1>>0));v=v-(1)>>0;break;}}}if((40===ae)&&!D.IsBackslashEscapePunct(b,w)){v=v+(1)>>0;}if((41===ae)&&!D.IsBackslashEscapePunct(b,w)){v=v-(1)>>0;if(1>v){if(40===(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0])){e=$subslice(e,1);}e=$subslice(e,0,(e.$length-1>>0));break;}}w=w+(x)>>0;}d=$subslice(b,w);if(g>w&&(!((41===((w<0||w>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+w])))&&!((32===((w<0||w>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+w])))&&!((10===((w<0||w>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+w]))))){c=CW.nil;$s=-1;return[c,d,e];}if(!((0===v))){c=CW.nil;$s=-1;return[c,d,e];}}if(!(f.ParseOption.ProtyleWYSIWYG||!f.ParseOption.DataImage)){ai=false;$s=3;continue s;}aj=A.ToLower(e);$s=4;case 4:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}ak=A.HasPrefix(aj,(new CW($stringToBytes("data:image"))));$s=5;case 5:if($c){$c=false;ak=ak.$blk();}if(ak&&ak.$blk!==undefined){break s;}ai=ak;case 3:if(ai){$s=1;continue;}$s=2;continue;case 1:al=CW.nil;am=CW.nil;an=CW.nil;c=al;d=am;e=an;$s=-1;return[c,d,e];case 2:if(!(CW.nil===c)){if((!f.ParseOption.VditorWYSIWYG&&!f.ParseOption.VditorIR&&!f.ParseOption.VditorSV&&!f.ParseOption.ProtyleWYSIWYG)&&!f.ParseOption.ImgPathAllowSpace){e=G.EncodeDestination(G.UnescapeBytes(e));}}$s=-1;return[c,d,e];}return;}var $f={$blk:AB.ptr.prototype.parseInlineLinkDest,$c:true,$r,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};AB.prototype.parseInlineLinkDest=function(b){return this.$val.parseInlineLinkDest(b);};AD.ptr.prototype.parseInlineHTML=function(b){var{aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,b,ba,bb,bc,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{b});$s=$s||0;s:while(true){switch($s){case 0:c=CY.nil;d=this;e=b.tokens;f=false;g=false;if(d.Context.ParseOption.VditorWYSIWYG||d.Context.ParseOption.VditorIR||d.Context.ParseOption.VditorSV||d.Context.ParseOption.ProtyleWYSIWYG){h=A.Index(e,C.CaretTokens);f=h>b.pos;if(f){g=A.Contains(e,(new CW($stringToBytes(" \xE2\x80\xB8"))));e=A.ReplaceAll(e,C.CaretTokens,(new CW($stringToBytes("caretreplacement"))));e=A.ReplaceAll(e,(new CW($stringToBytes("\"caretreplacement"))),(new CW($stringToBytes("\" caretreplacement"))));}}i=b.pos;c=new B.Node.ptr("","","","",16,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,new CW([(j=b.pos,((j<0||j>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+j]))]),"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");if(3>b.tokensLen||b.tokensLen<=(i+1>>0)){b.pos=b.pos+(1)>>0;$s=-1;return c;}k=CW.nil;k=$append(k,((i<0||i>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+i]));if((47===(l=i+1>>0,((l<0||l>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+l])))&&1<(b.tokensLen-((i+1>>0))>>0)){k=$append(k,(m=i+1>>0,((m<0||m>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+m])));n=d.parseTagName($subslice(e,(b.pos+2>>0)));o=n[0];p=n[1];if(1>p.$length){b.pos=b.pos+(1)>>0;$s=-1;return c;}k=$appendSlice(k,p);e=o;}else{q=d.parseTagName($subslice(e,(b.pos+1>>0)));r=q[0];s=q[1];if(0>0;$s=-1;return c;}e=v;k=$appendSlice(k,w);if(1>w.$length){break;}}}else{x=d.parseHTMLComment($subslice(e,(b.pos+1>>0)));y=x[0];z=x[1];aa=x[2];if(y){k=$appendSlice(k,aa);e=z;b.pos=b.pos+(k.$length)>>0;c=new B.Node.ptr("","","","",10,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,k,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");$s=-1;return c;}else{ab=d.parseProcessingInstruction($subslice(e,(b.pos+1>>0)));ac=ab[0];ad=ab[1];ae=ab[2];if(ac){k=$appendSlice(k,ae);e=ad;b.pos=b.pos+(k.$length)>>0;c=new B.Node.ptr("","","","",10,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,k,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");$s=-1;return c;}else{af=d.parseDeclaration($subslice(e,(b.pos+1>>0)));ag=af[0];ah=af[1];ai=af[2];if(ag){k=$appendSlice(k,ai);e=ah;b.pos=b.pos+(k.$length)>>0;c=new B.Node.ptr("","","","",10,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,k,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");$s=-1;return c;}else{aj=d.parseCDATA($subslice(e,(b.pos+1>>0)));ak=aj[0];al=aj[1];am=aj[2];if(ak){k=$appendSlice(k,am);e=al;b.pos=b.pos+(k.$length)>>0;c=new B.Node.ptr("","","","",10,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,k,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");$s=-1;return c;}else{b.pos=b.pos+(1)>>0;$s=-1;return c;}}}}}}an=D.TrimLeft(e);ao=an[0];e=an[1];ap=e.$length;if(1>ap){b.pos=i+1>>0;$s=-1;return c;}if(((62===(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0])))||(1=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0]))&&(62===(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1])))){$s=1;continue;}$s=2;continue;case 1:k=$appendSlice(k,ao);k=$append(k,(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0]));if(47===(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0])){k=$append(k,(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1]));}if((d.Context.ParseOption.VditorWYSIWYG||d.Context.ParseOption.VditorIR||d.Context.ParseOption.VditorSV)&&f||d.Context.ParseOption.ProtyleWYSIWYG){if(!A.Contains(k,(new CW($stringToBytes("caretreplacement "))))&&!g){k=A.ReplaceAll(k,(new CW($stringToBytes("\" caretreplacement"))),(new CW($stringToBytes("\"caretreplacement"))));}k=A.ReplaceAll(k,(new CW($stringToBytes("caretreplacement"))),C.CaretTokens);}b.pos=b.pos+(k.$length)>>0;if(d.Context.ParseOption.ProtyleWYSIWYG){$s=3;continue;}$s=4;continue;case 3:if(A.EqualFold(k,(new CW($stringToBytes("
"))))||A.EqualFold(k,(new CW($stringToBytes("
"))))||A.EqualFold(k,(new CW($stringToBytes("
"))))){$s=5;continue;}if(A.HasPrefix(k,(new CW($stringToBytes(""))))){$s=7;continue;}if(A.EqualFold(k,(new CW($stringToBytes(""))))){$s=8;continue;}if(A.EqualFold(k,(new CW($stringToBytes(""))))){$s=9;continue;}if(A.EqualFold(k,(new CW($stringToBytes(""))))){$s=10;continue;}if(A.EqualFold(k,(new CW($stringToBytes(""))))){$s=11;continue;}if(A.EqualFold(k,(new CW($stringToBytes(""))))){$s=12;continue;}if(A.EqualFold(k,(new CW($stringToBytes(""))))){$s=13;continue;}if(A.EqualFold(k,(new CW($stringToBytes(""))))){$s=14;continue;}if(A.EqualFold(k,(new CW($stringToBytes(""))))){$s=15;continue;}if(A.EqualFold(k,(new CW($stringToBytes(""))))){$s=16;continue;}if(A.EqualFold(k,(new CW($stringToBytes(""))))){$s=17;continue;}if(A.EqualFold(k,(new CW($stringToBytes(""))))){$s=18;continue;}$s=19;continue;case 5:c=new B.Node.ptr("","","","",525,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");$s=-1;return c;case 6:aq=d.processSpanTag(k,"",b);$s=20;case 20:if($c){$c=false;aq=aq.$blk();}if(aq&&aq.$blk!==undefined){break s;}c=aq;$s=-1;return c;case 7:ar=d.processSpanTag(k,"","",b);$s=21;case 21:if($c){$c=false;ar=ar.$blk();}if(ar&&ar.$blk!==undefined){break s;}c=ar;$s=-1;return c;case 8:as=d.processSpanTag(k,"","",b);$s=22;case 22:if($c){$c=false;as=as.$blk();}if(as&&as.$blk!==undefined){break s;}c=as;$s=-1;return c;case 9:at=d.processSpanTag(k,"","",b);$s=23;case 23:if($c){$c=false;at=at.$blk();}if(at&&at.$blk!==undefined){break s;}c=at;$s=-1;return c;case 10:au=d.processSpanTag(k,"","",b);$s=24;case 24:if($c){$c=false;au=au.$blk();}if(au&&au.$blk!==undefined){break s;}c=au;$s=-1;return c;case 11:av=d.processSpanTag(k,"","",b);$s=25;case 25:if($c){$c=false;av=av.$blk();}if(av&&av.$blk!==undefined){break s;}c=av;$s=-1;return c;case 12:aw=d.processSpanTag(k,"","",b);$s=26;case 26:if($c){$c=false;aw=aw.$blk();}if(aw&&aw.$blk!==undefined){break s;}c=aw;$s=-1;return c;case 13:ax=d.processSpanTag(k,"","",b);$s=27;case 27:if($c){$c=false;ax=ax.$blk();}if(ax&&ax.$blk!==undefined){break s;}c=ax;$s=-1;return c;case 14:ay=d.processSpanTag(k,"","",b);$s=28;case 28:if($c){$c=false;ay=ay.$blk();}if(ay&&ay.$blk!==undefined){break s;}c=ay;$s=-1;return c;case 15:az=d.processSpanTag(k,"","",b);$s=29;case 29:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}c=az;$s=-1;return c;case 16:ba=d.processSpanTag(k,"","",b);$s=30;case 30:if($c){$c=false;ba=ba.$blk();}if(ba&&ba.$blk!==undefined){break s;}c=ba;$s=-1;return c;case 17:bb=d.processSpanTag(k,"","",b);$s=31;case 31:if($c){$c=false;bb=bb.$blk();}if(bb&&bb.$blk!==undefined){break s;}c=bb;$s=-1;return c;case 18:bc=d.processSpanTag(k,"","",b);$s=32;case 32:if($c){$c=false;bc=bc.$blk();}if(bc&&bc.$blk!==undefined){break s;}c=bc;$s=-1;return c;case 19:case 4:c=new B.Node.ptr("","","","",10,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,k,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");$s=-1;return c;case 2:b.pos=i+1>>0;$s=-1;return c;}return;}var $f={$blk:AD.ptr.prototype.parseInlineHTML,$c:true,$r,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,b,ba,bb,bc,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};AD.prototype.parseInlineHTML=function(b){return this.$val.parseInlineHTML(b);};AD.ptr.prototype.processSpanTag=function(b,c,d,e){var{b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,$s,$r,$c}=$restore(this,{b,c,d,e});$s=$s||0;s:while(true){switch($s){case 0:f=CY.nil;g=this;h=$subslice(e.tokens,e.pos);if(1>h.$length){$s=-1;return f;}i=A.Index(h,(new CW($stringToBytes(d))));j=A.Index(h,(new CW($stringToBytes(c))));if((A.Contains(h,(new CW($stringToBytes(c))))&&-1>0;if(h.$length=p.$length?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+0]);r="";s=c.length;if(""===c||""===c||""===c||""===c||""===c||""===c||""===c||""===c||""===c||""===c||""===c||""===c){if(!g.Context.ParseOption.HTMLTag2TextMark){f=new B.Node.ptr("","","","",10,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,b,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");$s=-1;return f;}r=q.Data;if("b"===r){r="strong";}else if("i"===r){r="em";}else if("del"===r||"strike"===r){r="s";}}else{r=($bytesToString($subslice(b,(s+1>>0))));r=$substring(r,0,F.Index(r,"\""));}f=new B.Node.ptr("","","","",530,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,r,"","","","","","","","","","",0,"");$r=AU(f,q,g.Context.ParseOption);$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}e.pos=e.pos+((i+k>>0))>>0;$s=-1;return f;}return;}var $f={$blk:AD.ptr.prototype.processSpanTag,$c:true,$r,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,$s};return $f;};AD.prototype.processSpanTag=function(b,c,d,e){return this.$val.processSpanTag(b,c,d,e);};AD.ptr.prototype.parseCDATA=function(b){var b,c,d,e,f,g,h,i,j,k;c=false;d=CW.nil;e=CW.nil;f=this;d=b;if(8>b.$length){return[c,d,e];}if(!((33===(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])))){return[c,d,e];}if(!((91===(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1])))){return[c,d,e];}if(!((67===(2>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+2])))||!((68===(3>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+3])))||!((65===(4>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+4])))||!((84===(5>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+5])))||!((65===(6>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+6])))){return[c,d,e];}if(!((91===(7>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+7])))){return[c,d,e];}e=$appendSlice(e,$subslice(b,0,7));b=$subslice(b,7);g=0;h=0;i=b.$length;while(true){if(!(h=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+h]);e=$append(e,g);if(h<=(i-3>>0)&&(93===g)&&(93===(j=h+1>>0,((j<0||j>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+j])))&&(62===(k=h+2>>0,((k<0||k>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+k])))){break;}h=h+(1)>>0;}b=$subslice(b,h);if(3>b.$length){return[c,d,e];}if(!((93===(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])))||!((93===(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1])))||!((62===(2>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+2])))){return[c,d,e];}e=$append(e,(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1]),(2>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+2]));c=true;d=$subslice(b,3);return[c,d,e];};AD.prototype.parseCDATA=function(b){return this.$val.parseCDATA(b);};AD.ptr.prototype.parseDeclaration=function(b){var b,c,d,e,f,g,h,i,j,k;c=false;d=CW.nil;e=CW.nil;f=this;d=b;if(2>b.$length){return[c,d,e];}if(!((33===(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])))){return[c,d,e];}g=0;h=0;i=$subslice(b,1);j=0;while(true){if(!(j=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+j]);if(D.IsWhitespace(g)){break;}if(!(65<=g&&90>=g)){return[c,d,e];}j++;}e=$append(e,(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0]),(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1]));b=$subslice(b,2);k=b.$length;while(true){if(!(h=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+h]);e=$append(e,g);if(62===g){break;}h=h+(1)>>0;}b=$subslice(b,h);if(1>b.$length||!((62===(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])))){return[c,d,e];}c=true;d=$subslice(b,1);return[c,d,e];};AD.prototype.parseDeclaration=function(b){return this.$val.parseDeclaration(b);};AD.ptr.prototype.parseProcessingInstruction=function(b){var b,c,d,e,f,g,h,i,j;c=false;d=CW.nil;e=CW.nil;f=this;d=b;if(!((63===(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])))){return[c,d,e];}e=$append(e,(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0]));b=$subslice(b,1);g=0;h=0;i=b.$length;while(true){if(!(h=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+h]);e=$append(e,g);if(h<=(i-2>>0)&&(63===g)&&(62===(j=h+1>>0,((j<0||j>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+j])))){break;}h=h+(1)>>0;}b=$subslice(b,h);if(1>b.$length){return[c,d,e];}if(!((63===(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])))||!((62===(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1])))){return[c,d,e];}e=$append(e,(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1]));c=true;d=$subslice(b,2);return[c,d,e];};AD.prototype.parseProcessingInstruction=function(b){return this.$val.parseProcessingInstruction(b);};AD.ptr.prototype.parseHTMLComment=function(b){var b,c,d,e,f,g,h,i,j;c=false;d=CW.nil;e=CW.nil;f=this;d=b;if(3>b.$length){return[c,d,e];}if(!((33===(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])))||!((45===(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1])))||!((45===(2>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+2])))){return[c,d,e];}g=b.$length;h=0;while(true){if(!(h=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+h]));if(h<=(g-3>>0)&&(45===((h<0||h>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+h]))&&(45===(i=h+1>>0,((i<0||i>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+i])))&&(62===(j=h+2>>0,((j<0||j>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+j])))){break;}h=h+(1)>>0;}b=$subslice(b,h);if(3>b.$length||!((45===(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])))||!((45===(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1])))||!((62===(2>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+2])))){return[c,d,e];}e=$append(e,(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1]),(2>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+2]));c=true;d=$subslice(b,3);return[c,d,e];};AD.prototype.parseHTMLComment=function(b){return this.$val.parseHTMLComment(b);};AP=function(b){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;c=false;d=CW.nil;e=CW.nil;f=CW.nil;g=CW.nil;c=true;d=b;h=CW.nil;i=0;j=0;k=b;l=0;while(true){if(!(l=k.$length)?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+l]);if(!D.IsWhitespace(j)){break;}h=$append(h,j);l++;}if(1>h.$length){return[c,d,e,f,g];}b=$subslice(b,i);m=CW.nil;n=AR(b);b=n[0];m=n[1];if(1>m.$length){return[c,d,e,f,g];}o=CW.nil;p=AQ(b);c=p[0];b=p[1];o=p[2];if(!c){return[c,d,e,f,g];}d=b;e=$appendSlice(e,h);e=$appendSlice(e,m);e=$appendSlice(e,o);if(!(CW.nil===o)){f=m;g=$subslice(o,2,(o.$length-1>>0));}return[c,d,e,f,g];};$pkg.TagAttr=AP;AQ=function(b){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;c=false;d=CW.nil;e=CW.nil;c=true;d=b;f=0;g=0;h=b;i=0;while(true){if(!(i=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+i]);if(!D.IsWhitespace(g)){break;}e=$append(e,g);i++;}if(!((61===g))){e=CW.nil;return[c,d,e];}e=$append(e,g);b=$subslice(b,(f+1>>0));if(1>b.$length){c=false;return[c,d,e];}j=b;k=0;while(true){if(!(k=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+k]);if(!D.IsWhitespace(g)){break;}e=$append(e,g);k++;}g=((f<0||f>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+f]);e=$append(e,g);b=$subslice(b,(f+1>>0));l=false;if(34===g){m=b;n=0;while(true){if(!(n=m.$length)?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+n]);e=$append(e,g);if(34===g){l=true;break;}n++;}}else if(39===g){o=b;p=0;while(true){if(!(p=o.$length)?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+p]);e=$append(e,g);if(39===g){l=true;break;}p++;}}else{q=b;r=0;while(true){if(!(r=q.$length)?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+r]);if(62===g){f=f-(1)>>0;break;}e=$append(e,g);if(D.IsWhitespace(g)){break;}if((34===g)||(39===g)||(61===g)||(60===g)||(62===g)||(96===g)){l=false;break;}l=true;r++;}}if(!l){c=false;e=CW.nil;return[c,d,e];}d=$subslice(b,(f+1>>0));return[c,d,e];};AR=function(b){var b,c,d,e,f,g,h;c=CW.nil;d=CW.nil;c=b;if(!D.IsASCIILetter((0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0]))&&!((95===(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])))&&!((58===(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])))){return[c,d];}d=$append(d,(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0]));b=$subslice(b,1);e=0;f=0;g=b;h=0;while(true){if(!(h=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+h]);if(!D.IsASCIILetterNumHyphen(f)&&!((95===f))&&!((46===f))&&!((58===f))){break;}d=$append(d,f);h++;}if(1>d.$length){return[c,d];}c=$subslice(b,e);return[c,d];};AD.ptr.prototype.parseTagName=function(b){var b,c,d,e,f,g,h,i;c=CW.nil;d=CW.nil;e=this;if(1>b.$length){return[c,d];}f=0;g=((f<0||f>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+f]);if(!D.IsASCIILetter(g)){h=b;i=CW.nil;c=h;d=i;return[c,d];}d=$append(d,g);f=1;while(true){if(!(f=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+f]);if(!D.IsASCIILetterNumHyphen(g)){break;}d=$append(d,g);f=f+(1)>>0;}c=$subslice(b,f);return[c,d];};AD.prototype.parseTagName=function(b){return this.$val.parseTagName(b);};AS=function(b,c){var{aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,b,ba,bb,bc,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{b,c});$s=$s||0;s:while(true){switch($s){case 0:if(CY.nil===b||DN.nil===c){$s=-1;return;}d=false;e=E.DomAttrValue(c,"style");if(!(""===e)){$s=1;continue;}$s=2;continue;case 1:f=AV(e);$s=3;case 3:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}e=f;b.SetIALAttr("style",e);g=BA(b.KramdownIAL);$s=4;case 4:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;i=new B.Node.ptr("","","","",456,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,h,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");if(109===b.Type){b.PrependChild(i);}else{b.InsertAfter(i);}d=true;case 2:j=E.DomCustomAttrs(c);if(!(false===j)){$s=5;continue;}$s=6;continue;case 5:if(!d){$s=7;continue;}$s=8;continue;case 7:k=j;l=0;m=k?k.keys():undefined;n=k?k.size:0;while(true){if(!(l=aq.$length)?($throwRuntimeError("index out of range"),undefined):aq.$array[aq.$offset+ar]);if("style"===(0>=as.$length?($throwRuntimeError("index out of range"),undefined):as.$array[as.$offset+0])){(1>=as.$length?($throwRuntimeError("index out of range"),undefined):as.$array[as.$offset+1]=(1>=as.$length?($throwRuntimeError("index out of range"),undefined):as.$array[as.$offset+1])+an);ap=true;break;}ar++;}if(!ap){ao=$append(ao,new DC(["style",an]));}at=BA(ao);$s=28;case 28:if($c){$c=false;at=at.$blk();}if(at&&at.$blk!==undefined){break s;}b.Next.Tokens=at;b.SetIALAttr("style",an);b.KramdownIAL=ao;$s=27;continue;case 26:b.SetIALAttr("style",an);au=BA(b.KramdownIAL);$s=29;case 29:if($c){$c=false;au=au.$blk();}if(au&&au.$blk!==undefined){break s;}av=au;aw=new B.Node.ptr("","","","",456,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,av,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");b.InsertAfter(aw);case 27:d=true;case 24:case 22:if(!(DN.nil===c.Parent)&&!(DN.nil===c.Parent.Parent)&&(198403===c.DataAtom)){$s=30;continue;}$s=31;continue;case 30:ax=E.DomAttrValue(c.Parent.Parent,"style");if(!(""===ax)){$s=32;continue;}$s=33;continue;case 32:if(d){$s=34;continue;}$s=35;continue;case 34:ay=BH(b.Next.Tokens);ay=$append(ay,new DC(["parent-style",ax]));az=BA(ay);$s=37;case 37:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}b.Next.Tokens=az;b.SetIALAttr("parent-style",ax);b.KramdownIAL=ay;$s=36;continue;case 35:b.SetIALAttr("parent-style",ax);ba=BA(b.KramdownIAL);$s=38;case 38:if($c){$c=false;ba=ba.$blk();}if(ba&&ba.$blk!==undefined){break s;}bb=ba;bc=new B.Node.ptr("","","","",456,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,bb,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");b.InsertAfter(bc);case 36:case 33:case 31:$s=-1;return;}return;}var $f={$blk:AS,$c:true,$r,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,b,ba,bb,bc,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};$pkg.SetSpanIAL=AS;AT=function(b,c){var b,c,d,e,f,g,h,i,j;d=F.Split(b.TextMarkType," ");e=d;f=0;while(true){if(!(f=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+f]);h=c;i=0;while(true){if(!(i=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+i]);if(g===j){return true;}i++;}f++;}return false;};$pkg.ContainTextMark=AT;AU=function(b,c,d){var{aa,ab,ac,ad,ae,af,ag,ah,ai,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{b,c,d});$s=$s||0;s:while(true){switch($s){case 0:b.Type=530;e=E.DomAttrValue(c,"data-type");if(""===e){if(c.DataAtom===40708){e="text";}else{if(!(""===b.TextMarkType)){e=b.TextMarkType;}else{e=new K.Atom(c.DataAtom).String();if("b"===e){e="strong";}else if("i"===e){e="em";}else if("del"===e||"strike"===e){e="s";}}}}b.TextMarkType=e;b.Tokens=CW.nil;f=F.Split(e," ");g=DC.nil;h=f;i=0;while(true){if(!(i=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+i]);if("a"===k||"inline-memo"===k||"block-ref"===k||"file-annotation-ref"===k||"inline-math"===k){g=$append(g,k);f=$appendSlice($subslice(f,0,j),$subslice(f,(j+1>>0)));break;}i++;}f=$appendSlice(g,f);l=false;m=f;n=0;case 1:if(!(n=m.$length)?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+n]);p=o;if(p===("a")){$s=4;continue;}if(p===("inline-math")){$s=5;continue;}if(p===("block-ref")){$s=6;continue;}if(p===("file-annotation-ref")){$s=7;continue;}if(p===("inline-memo")){$s=8;continue;}if(!l){$s=9;continue;}$s=10;continue;case 4:q=E.GetTextMarkAData(c);b.TextMarkAHref=q[0];b.TextMarkATitle=q[1];r=E.GetTextMarkTextData(c);$s=11;case 11:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}b.TextMarkTextContent=r;$s=10;continue;case 5:b.TextMarkInlineMathContent=E.GetTextMarkInlineMathData(c);l=true;$s=10;continue;case 6:s=E.GetTextMarkBlockRefData(c);b.TextMarkBlockRefID=s[0];b.TextMarkBlockRefSubtype=s[1];t=E.GetTextMarkTextData(c);$s=12;case 12:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}b.TextMarkTextContent=t;$s=10;continue;case 7:b.TextMarkFileAnnotationRefID=E.GetTextMarkFileAnnotationRefData(c);u=E.GetTextMarkTextData(c);$s=13;case 13:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}b.TextMarkTextContent=u;$s=10;continue;case 8:v=E.GetTextMarkTextData(c);$s=14;case 14:if($c){$c=false;v=v.$blk();}if(v&&v.$blk!==undefined){break s;}b.TextMarkTextContent=v;b.TextMarkInlineMemoContent=E.GetTextMarkInlineMemoData(c);w=AA("",(new CW($stringToBytes(b.TextMarkInlineMemoContent))),d);$s=15;case 15:if($c){$c=false;w=w.$blk();}if(w&&w.$blk!==undefined){break s;}x=w;if(!(DH.nil===x)){$s=16;continue;}$s=17;continue;case 16:y=x.Root.Content();$s=18;case 18:if($c){$c=false;y=y.$blk();}if(y&&y.$blk!==undefined){break s;}z=F.ReplaceAll(y,"\n","_esc_newline_");$s=19;case 19:if($c){$c=false;z=z.$blk();}if(z&&z.$blk!==undefined){break s;}b.TextMarkInlineMemoContent=z;b.TextMarkInlineMemoContent=F.ReplaceAll(b.TextMarkInlineMemoContent,"\"",""");case 17:$s=10;continue;case 9:aa=E.GetTextMarkTextDataWithoutEscapeQuote(c);$s=20;case 20:if($c){$c=false;aa=aa.$blk();}if(aa&&aa.$blk!==undefined){break s;}b.TextMarkTextContent=aa;if(b.ContainTextMarkTypes(new DC(["strong","em","s","mark","sup","sub"]))){$s=21;continue;}$s=22;continue;case 21:ab=AW(b.TextMarkTextContent);ac=ab[0];ad=ab[1];if(!(""===ac)){b.InsertBefore(new B.Node.ptr("","","","",16,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,(new CW($stringToBytes(ac))),"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));}if(!(""===ad)){b.InsertAfter(new B.Node.ptr("","","","",16,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,(new CW($stringToBytes(ad))),"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));}ae=F.TrimSpace(b.TextMarkTextContent);$s=23;case 23:if($c){$c=false;ae=ae.$blk();}if(ae&&ae.$blk!==undefined){break s;}b.TextMarkTextContent=ae;case 22:if(b.ParentIs(109,DG.nil)&&b.IsTextMarkType("code")){b.TextMarkTextContent=F.ReplaceAll(b.TextMarkTextContent,"|","|");}if("u"===b.TextMarkType){$s=24;continue;}$s=25;continue;case 24:af=b.TextMarkTextContent;if(!(DN.nil===c.FirstChild)&&"a"===E.DomAttrValue(c.FirstChild,"data-type")){af="["+af+"]("+E.DomAttrValue(c.FirstChild,"data-href")+")";}ag=AA("",(new CW($stringToBytes(af))),d);$s=26;case 26:if($c){$c=false;ag=ag.$blk();}if(ag&&ag.$blk!==undefined){break s;}ah=ag;if(!(DH.nil===ah)&&!(CY.nil===ah.Root.FirstChild)&&!(CY.nil===ah.Root.FirstChild.FirstChild)){$s=27;continue;}$s=28;continue;case 27:ai=ah.Root.FirstChild.Content();$s=29;case 29:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}b.TextMarkTextContent=ai;if(CY.nil===ah.Root.FirstChild.FirstChild.Next){if(33===ah.Root.FirstChild.FirstChild.Type){b.TextMarkType=b.TextMarkType+(" a");b.TextMarkAHref=ah.Root.FirstChild.FirstChild.ChildByType(41).TokensStr();}}case 28:case 25:case 10:case 3:n++;$s=1;continue;case 2:$r=AS(b,c);$s=30;case 30:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return;}return;}var $f={$blk:AU,$c:true,$r,aa,ab,ac,ad,ae,af,ag,ah,ai,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};$pkg.SetTextMarkNode=AU;AV=function(b){var{b,c,d,e,f,$s,$r,$c}=$restore(this,{b});$s=$s||0;s:while(true){switch($s){case 0:c="";d=F.TrimSpace(b);$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}c=d;c=F.ReplaceAll(c,"\n","");e=F.Fields(c);$s=2;case 2:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=F.Join(e," ");$s=3;case 3:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}c=f;$s=-1;return c;}return;}var $f={$blk:AV,$c:true,$r,b,c,d,e,f,$s};return $f;};$pkg.StyleValue=AV;AW=function(b){var b,c,d,e,f,g,h,i;c="";d="";e=b;f=0;while(true){if(!(f>0;while(true){if(!(i>=0)){break;}if(!((32===b.charCodeAt(i)))&&!((9===b.charCodeAt(i)))&&!((10===b.charCodeAt(i)))){break;}d=($encodeRune(b.charCodeAt(i)))+d;i=i-(1)>>0;}return[c,d];};AX=function(b,c){var{b,c,d,e,f,g,h,i,j,k,l,m,n,o,$s,$r,$c}=$restore(this,{b,c});$s=$s||0;s:while(true){switch($s){case 0:if(!b.Context.ParseOption.KramdownBlockIAL||b.Context.indented){$s=-1;return 0;}if((8===b.Context.Tip.Type)&&CY.nil===b.Context.Tip.FirstChild){$s=-1;return 0;}d=b.parseKramdownBlockIAL();if(!(DD.nil===d)){$s=1;continue;}$s=2;continue;case 1:$r=b.Context.closeUnmatchedBlocks();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}b.Context.offset=b.Context.currentLineLen;if(E.IsDocIAL2(d)){b.Context.rootIAL=new B.Node.ptr("","","","",455,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,$subslice(b.Context.currentLine,b.Context.nextNonspace),"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");b.Root.KramdownIAL=d;b.Root.ID=(e=(0>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+0]),(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1]));b.ID=b.Root.ID;$s=-1;return 2;}f=b.Context.lastMatchedContainer;if(b.Context.allClosed){$s=4;continue;}$s=5;continue;case 4:if((0===f.Type)||(8===f.Type)||(5===f.Type)||(475===f.Type)){$s=6;continue;}$s=7;continue;case 6:f=b.Context.Tip.LastChild;if(CY.nil===f){f=b.Context.lastMatchedContainer;}if(((477===f.Type)||(455===f.Type))&&!(CY.nil===f.Parent)){$s=8;continue;}if(6===f.Type){$s=9;continue;}if(0===f.Type){$s=10;continue;}$s=11;continue;case 8:g=BA(d);$s=12;case 12:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;if(!A.HasPrefix(f.Tokens,h)){i=new B.Node.ptr("","","","",1,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,(new CW($stringToBytes(" "))),"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");f.InsertAfter(i);b.Context.Tip=i;f=i;}$s=11;continue;case 9:j=new B.Node.ptr("","","","",1,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,(new CW($stringToBytes(" "))),"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");f.InsertAfter(j);b.Context.Tip=j;f=j;$s=11;continue;case 10:k=new B.Node.ptr("","","","",1,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,(new CW($stringToBytes(" "))),"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");f.AppendChild(k);b.Context.Tip=k;f=k;case 11:case 7:case 5:f.KramdownIAL=d;l=BE(d);f.ID=(m=$mapIndex(l,$String.keyFor("id")),m!==undefined?m.v:"");n=b.Context.addChild(455);$s=13;case 13:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}o=n;o.Tokens=$subslice(b.Context.currentLine,b.Context.nextNonspace);$s=-1;return 2;case 2:$s=-1;return 0;}return;}var $f={$blk:AX,$c:true,$r,b,c,d,e,f,g,h,i,j,k,l,m,n,o,$s};return $f;};$pkg.IALStart=AX;BA=function(b){var{b,c,d,e,f,g,h,i,j,k,l,m,n,$s,$r,$c}=$restore(this,{b});$s=$s||0;s:while(true){switch($s){case 0:c=new A.Buffer.ptr(CW.nil,0,0);d=c.WriteString("{: ");$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}d;e=b;f=0;case 2:if(!(f=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+f]);i=c.WriteString((0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0]));$s=4;case 4:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}i;j=c.WriteString("=\"");$s=5;case 5:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}j;k=c.WriteString((1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1]));$s=6;case 6:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}k;l=c.WriteByte(34);$s=7;case 7:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}l;if(g<(b.$length-1>>0)){$s=8;continue;}$s=9;continue;case 8:m=c.WriteByte(32);$s=10;case 10:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}m;case 9:f++;$s=2;continue;case 3:n=c.WriteByte(125);$s=11;case 11:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}n;$s=-1;return c.Bytes();}return;}var $f={$blk:BA,$c:true,$r,b,c,d,e,f,g,h,i,j,k,l,m,n,$s};return $f;};$pkg.IAL2Tokens=BA;BD=function(b){var b,c,d,e,f,g;c=false;c=$makeMap($String.keyFor,[]);d=b;e=0;while(true){if(!(e=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+e]);g=(0>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+0]);(c||$throwRuntimeError("assignment to entry in nil map")).set($String.keyFor(g),{k:g,v:G.UnescapeAttrVal((1>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+1]))});e++;}return c;};$pkg.IAL2Map=BD;BE=function(b){var b,c,d,e,f,g;c=false;c=$makeMap($String.keyFor,[]);d=b;e=0;while(true){if(!(e=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+e]);g=(0>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+0]);(c||$throwRuntimeError("assignment to entry in nil map")).set($String.keyFor(g),{k:g,v:(1>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+1])});e++;}return c;};$pkg.IAL2MapUnEsc=BE;BG=function(b){var b;if(7>=b.$length){return false;}return A.Contains(b,(new CW($stringToBytes("id=\""))));};BH=function(b){var b,c,d,e,f,g,h,i;c=DD.nil;b=A.TrimRight(b," \n");b=A.TrimPrefix(b,(new CW($stringToBytes("{:"))));b=A.TrimSuffix(b,(new CW($stringToBytes("}"))));b=A.ReplaceAll(b,(new CW($stringToBytes("\n"))),(new CW($stringToBytes("_esc_newline_"))));while(true){d=AP(b);e=d[0];f=d[1];g=d[2];h=d[3];i=d[4];if(!e){break;}b=f;if(1>g.$length){break;}i=A.ReplaceAll(i,(new CW($stringToBytes("_esc_newline_"))),(new CW($stringToBytes("\n"))));c=$append(c,new DC([E.BytesToStr(h),E.BytesToStr(i)]));}return c;};$pkg.Tokens2IAL=BH;AD.ptr.prototype.parseKramdownBlockIAL=function(){var b,c,d;b=DD.nil;c=this;d=$subslice(c.Context.currentLine,c.Context.nextNonspace);b=c.Context.parseKramdownBlockIAL(d);return b;};AD.prototype.parseKramdownBlockIAL=function(){return this.$val.parseKramdownBlockIAL();};AD.ptr.prototype.parseKramdownSpanIAL=function(){var{b,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:b=[b];b[0]=this;$r=B.Walk(b[0].Root,(function(b){return function(c,d){var c,d,e,f,g,h,i,j;if(!d){return 2;}switch(0){default:e=c.Type;if((e===(17))||(e===(22))||(e===(27))||(e===(101))||(e===(460))||(e===(450))||(e===(34))||(e===(530))){break;}else{return 2;}}if(CY.nil===c.Next||!((16===c.Next.Type))){return 2;}f=c.Next.Tokens;g=b[0].Context.parseKramdownSpanIAL(f);h=g[0];i=g[1];if(0>0));if(1>c.Next.Tokens.$length){c.Next.Unlink();}j=new B.Node.ptr("","","","",456,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,$subslice(f,0,(h+1>>0)),"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");c.InsertAfter(j);}return 2;};})(b));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return;}return;}var $f={$blk:AD.ptr.prototype.parseKramdownSpanIAL,$c:true,$r,b,$s};return $f;};AD.prototype.parseKramdownSpanIAL=function(){return this.$val.parseKramdownSpanIAL();};AB.ptr.prototype.parseKramdownBlockIAL=function(b){var b,c,d,e,f;c=DD.nil;d=this;e=A.Index(b,(new CW($stringToBytes("{:"))));if(0===e){b=$subslice(b,(e+2>>0));f=A.LastIndex(b,BR);if(3>f){return c;}if(!A.Equal($subslice(b,f),(new CW($stringToBytes("}\n"))))){return c;}c=BH(b);}return c;};AB.prototype.parseKramdownBlockIAL=function(b){return this.$val.parseKramdownBlockIAL(b);};AB.ptr.prototype.parseKramdownSpanIAL=function(b){var b,c,d,e,f,g,h,i,j,k,l,m,n,o;c=0;d=DD.nil;e=this;c=A.Index(b,BR);f=A.Index(b,(new CW($stringToBytes("{:"))));if((0===f)&&(f+2>>0)>0));g=A.Index(b,BR);if(3>g){return[c,d];}b=$subslice(b,0,g);while(true){h=AP(b);i=h[0];j=h[1];k=h[2];l=h[3];m=h[4];if(!i){break;}b=j;if(1>k.$length){break;}n=F.ReplaceAll(E.BytesToStr(l),"\xE2\x80\xB8","");o=F.ReplaceAll(E.BytesToStr(m),"\xE2\x80\xB8","");d=$append(d,new DC([n,o]));}}return[c,d];};AB.prototype.parseKramdownSpanIAL=function(b){return this.$val.parseKramdownSpanIAL(b);};AB.ptr.prototype.parseKramdownIALInListItem=function(b){var b,c,d,e,f,g,h,i,j,k,l;c=DD.nil;d=this;e=A.Index(b,(new CW($stringToBytes("{:"))));if(0===e){b=$subslice(b,(e+2>>0));f=A.Index(b,BR);if(3>f){return c;}b=$subslice(b,0,A.Index(b,(new CW($stringToBytes("}")))));while(true){g=AP(b);h=g[0];i=g[1];j=g[2];k=g[3];l=g[4];if(!h){break;}b=i;if(1>j.$length){break;}c=$append(c,new DC([E.BytesToStr(k),E.BytesToStr(l)]));}}return c;};AB.prototype.parseKramdownIALInListItem=function(b){return this.$val.parseKramdownIALInListItem(b);};AD.ptr.prototype.parseInline=function(b,c){var{b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,$s,$r,$c}=$restore(this,{b,c});$s=$s||0;s:while(true){switch($s){case 0:d=this;case 1:if(!(c.pos=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+f]));h=CY.nil;i=g;if(i===(92)){$s=4;continue;}if(i===(96)){$s=5;continue;}if((i===(42))||(i===(95))||(i===(126))||(i===(61))||(i===(35))){$s=6;continue;}if(i===(94)){$s=7;continue;}if(i===(10)){$s=8;continue;}if(i===(60)){$s=9;continue;}if(i===(91)){$s=10;continue;}if(i===(93)){$s=11;continue;}if(i===(38)){$s=12;continue;}if(i===(33)){$s=13;continue;}if(i===(36)){$s=14;continue;}if(i===(123)){$s=15;continue;}if(i===(40)){$s=16;continue;}$s=17;continue;case 4:h=d.parseBackslash(b,c);$s=18;continue;case 5:j=d.parseCodeSpan(b,c);$s=19;case 19:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}h=j;$s=18;continue;case 6:d.handleDelim(b,c);$s=18;continue;case 7:if(d.Context.ParseOption.Sup){d.handleDelim(b,c);}else{h=d.parseText(c);}$s=18;continue;case 8:h=d.parseNewline(b,c);$s=18;continue;case 9:h=d.parseAutolink(c);if(CY.nil===h){$s=20;continue;}$s=21;continue;case 20:h=d.parseAutoEmailLink(c);if(CY.nil===h){$s=22;continue;}$s=23;continue;case 22:k=d.parseFileAnnotationRef(c);$s=24;case 24:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}h=k;if(CY.nil===h){$s=25;continue;}$s=26;continue;case 25:l=d.parseInlineHTML(c);$s=27;case 27:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}h=l;if(d.Context.ParseOption.ProtyleWYSIWYG&&!(CY.nil===h)&&(10===h.Type)){h.Type=16;}case 26:case 23:case 21:$s=18;continue;case 10:h=d.parseOpenBracket(c);$s=18;continue;case 11:m=d.parseCloseBracket(c);$s=28;case 28:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}h=m;$s=18;continue;case 12:h=d.parseEntity(c);$s=18;continue;case 13:h=d.parseBang(c);$s=18;continue;case 14:h=d.parseInlineMath(c);$s=18;continue;case 15:h=d.parseHeadingID(b,c);$s=18;continue;case 16:h=d.parseBlockRef(c);$s=18;continue;case 17:h=d.parseText(c);case 18:case 3:if(!(CY.nil===h)){n=CZ.nil;o=h;while(true){if(CY.nil===o.Previous){break;}o=o.Previous;}p=o;while(true){if(!(!(CY.nil===p))){break;}n=$append(n,p);p=p.Next;}q=n;r=0;while(true){if(!(r=q.$length)?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+r]);b.AppendChild(s);r++;}}$s=1;continue;case 2:b.Tokens=CW.nil;$s=-1;return;}return;}var $f={$blk:AD.ptr.prototype.parseInline,$c:true,$r,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,$s};return $f;};AD.prototype.parseInline=function(b,c){return this.$val.parseInline(b,c);};AD.ptr.prototype.parseEntity=function(b){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;c=CY.nil;d=this;g=new CW([(e=b.tokens,f=b.pos,((f<0||f>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+f]))]);if(2>b.tokensLen||b.tokensLen<=(b.pos+1>>0)){b.pos=b.pos+(1)>>0;c=new B.Node.ptr("","","","",16,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,g,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");return c;}h=b.pos;i=false;if(3>0,((k<0||k>=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+k]));}l=b.pos;m=0;n=false;while(true){if(!(l=o.$length)?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+l]));if(D.IsWhitespace(m)){break;}if(59===m){l=l+(1)>>0;n=true;break;}l=l+(1)>>0;}if(!n){b.pos=b.pos+(1)>>0;c=new B.Node.ptr("","","","",16,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,g,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");return c;}p=E.BytesToStr($subslice(b.tokens,h,l));if(i){q=p.length;if(10q){b.pos=b.pos+(1)>>0;c=new B.Node.ptr("","","","",16,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,g,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");return c;}if(((120===p.charCodeAt(2))||(88===p.charCodeAt(2)))&&5>q){b.pos=b.pos+(1)>>0;c=new B.Node.ptr("","","","",16,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,g,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");return c;}}r=G.HtmlUnescapeString(p);if(r===p){b.pos=b.pos+(1)>>0;c=new B.Node.ptr("","","","",16,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,g,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");return c;}b.pos=b.pos+((l-h>>0))>>0;c=new B.Node.ptr("","","","",44,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,E.StrToBytes(r),"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,E.StrToBytes(p),DD.nil,false,"","","","","","","","","","","",0,"");return c;};AD.prototype.parseEntity=function(b){return this.$val.parseEntity(b);};AD.ptr.prototype.parseCloseBracket=function(b){var{aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,b,ba,bb,bc,bd,be,bf,bg,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{b});$s=$s||0;s:while(true){switch($s){case 0:c=this;f=new CW([(d=b.tokens,e=b.pos,((e<0||e>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+e]))]);b.pos=b.pos+(1)>>0;g=b.pos;h=b.brackets;if(DM.nil===h){$s=-1;return new B.Node.ptr("","","","",16,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,f,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");}if(!h.active){c.removeBracket(b);$s=-1;return new B.Node.ptr("","","","",16,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,f,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");}i=h.image;j=CW.nil;k=CW.nil;l=CW.nil;m=CW.nil;n=CW.nil;o=j;p=k;q=l;r=m;s=n;t=b.pos;u=false;if((b.pos+1>>0)=v.$length)?($throwRuntimeError("index out of range"),undefined):v.$array[v.$offset+w])))){$s=1;continue;}$s=2;continue;case 1:b.pos=b.pos+(1)>>0;x=false;y=CW.nil;z=CW.nil;aa=y;ab=z;case 3:ac=D.Spnl($subslice(b.tokens,(b.pos-1>>0)));x=ac[0];aa=ac[1];ab=ac[2];if(!x){$s=4;continue;}b.pos=b.pos+(aa.$length)>>0;ae=c.Context.parseInlineLinkDest(ab);$s=5;case 5:if($c){$c=false;ae=ae.$blk();}if(ae&&ae.$blk!==undefined){break s;}ad=ae;aa=ad[0];ab=ad[1];p=ad[2];if(CW.nil===aa){$s=4;continue;}if(c.Context.ParseOption.VditorWYSIWYG||c.Context.ParseOption.VditorIR||c.Context.ParseOption.VditorSV||c.Context.ParseOption.ProtyleWYSIWYG){if(!i&&CY.nil===h.node.Next){$s=4;continue;}}b.pos=b.pos+(aa.$length)>>0;o=$subslice(aa,0,1);s=$subslice(aa,(aa.$length-1>>0));u=41===(af=aa.$length-1>>0,((af<0||af>=aa.$length)?($throwRuntimeError("index out of range"),undefined):aa.$array[aa.$offset+af]));if(u&&1=ab.$length?($throwRuntimeError("index out of range"),undefined):ab.$array[ab.$offset+0]))&&!((34===(1>=ab.$length?($throwRuntimeError("index out of range"),undefined):ab.$array[ab.$offset+1])));}if(u){b.pos=b.pos-(1)>>0;$s=4;continue;}if(1>ab.$length||!D.IsWhitespace((0>=ab.$length?($throwRuntimeError("index out of range"),undefined):ab.$array[ab.$offset+0]))){$s=4;continue;}ag=D.Spnl(ab);x=ag[0];aa=ag[1];ab=ag[2];if(!x){$s=4;continue;}q=aa;b.pos=b.pos+(aa.$length)>>0;u=41===(0>=ab.$length?($throwRuntimeError("index out of range"),undefined):ab.$array[ab.$offset+0]);s=$subslice(ab,0,1);if(u){$s=4;continue;}b.pos=b.pos+(1)>>0;ah=false;ai=c.Context.parseLinkTitle(ab);ah=ai[0];aa=ai[1];ab=ai[2];r=ai[3];if(!ah){$s=4;continue;}b.pos=b.pos+(aa.$length)>>0;aj=D.Spnl(ab);x=aj[0];aa=aj[1];ab=aj[2];b.pos=b.pos+(aa.$length)>>0;u=x&&0>0)),ab);}else{r=C.CaretTokens;ab=$subslice(ab,C.CaretTokens.$length);b.pos=b.pos+(3)>>0;}}else if(A.HasPrefix(ab,(new CW($stringToBytes(")\xE2\x80\xB8"))))){if(0===r.$length){r=C.CaretTokens;ab=A.ReplaceAll(ab,C.CaretTokens,CW.nil);b.pos=b.pos+(3)>>0;}}}u=41===(0>=ab.$length?($throwRuntimeError("index out of range"),undefined):ab.$array[ab.$offset+0]);}s=$subslice(ab,0);$s=4;continue;case 4:if(!u){b.pos=t;}case 2:ak=CW.nil;al=0;if(!u){$s=6;continue;}$s=7;continue;case 6:am=b.pos;an=c.Context.parseLinkLabel($subslice(b.tokens,am));ao=an[0];ap=an[2];if(2>0;}else if(!h.bracketAfter){aq=h.index;if(91===(ar=b.tokens,((aq<0||aq>=ar.$length)?($throwRuntimeError("index out of range"),undefined):ar.$array[ar.$offset+aq]))){aq=aq+(1)>>0;}ak=$subslice(b.tokens,aq,(g-1>>0));b.pos=b.pos+(2)>>0;}if(0===ao){b.pos=g;}if(!(CW.nil===ak)){$s=8;continue;}$s=9;continue;case 8:if(c.Context.ParseOption.Footnotes){$s=10;continue;}$s=11;continue;case 10:at=c.FindFootnotesDef(ak);$s=12;case 12:if($c){$c=false;at=at.$blk();}if(at&&at.$blk!==undefined){break s;}as=at;au=as[0];av=as[1];if(!(CY.nil===av)){c.removeBracket(b);if(c.Context.ParseOption.Sup&&!(CY.nil===h.node.Next.Next)){h.node.Next.Next.Unlink();h.node.Next.Unlink();}else{h.node.Next.Unlink();}h.node.Unlink();aw=I.Itoa(au);ax=av.FootnotesRefs.$length;if(0>0));}ay=new B.Node.ptr("","","","",412,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,ak,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,A.ReplaceAll(ak,C.CaretTokens,CW.nil),aw,CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");av.FootnotesRefs=$append(av.FootnotesRefs,ay);$s=-1;return ay;}case 11:az=c.FindLinkRefDefLink(ak);$s=13;case 13:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ba=az;if(!(CY.nil===ba)){p=ba.ChildByType(41).Tokens;bb=ba.ChildByType(42);if(!(CY.nil===bb)){r=bb.Tokens;}u=true;al=3;}case 9:case 7:if(u){bc=new B.Node.ptr("","","","",33,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,CW.nil,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,al,ak,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");if(i){bc.Type=34;bc.AppendChild(new B.Node.ptr("","","","",35,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,$subslice(h.node.Tokens,0,1),"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));h.node.Tokens=$subslice(h.node.Tokens,1);}bc.AppendChild(new B.Node.ptr("","","","",36,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,h.node.Tokens,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));bd=CY.nil;be=CY.nil;bf=bd;bg=be;bf=h.node.Next;while(true){if(!(!(CY.nil===bf))){break;}bg=bf.Next;bf.Unlink();if(16===bf.Type){bf.Type=40;if(c.Context.ParseOption.ProtyleWYSIWYG){bf.Tokens=A.ReplaceAll(bf.Tokens,C.CaretTokens,CW.nil);}}bc.AppendChild(bf);bf=bg;}bc.AppendChild(new B.Node.ptr("","","","",37,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,f,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));bc.AppendChild(new B.Node.ptr("","","","",38,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,o,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));if(c.Context.ParseOption.ProtyleWYSIWYG){p=A.ReplaceAll(p,C.CaretTokens,CW.nil);}bc.AppendChild(new B.Node.ptr("","","","",41,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,p,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));if(!(CW.nil===q)){bc.AppendChild(new B.Node.ptr("","","","",43,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,q,"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,""));}if(0>0;c=new B.Node.ptr("","","","",16,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,$subslice(b.tokens,e,b.pos),"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");d.addBracket(c,b.pos-1>>0,false,b);return c;};AD.prototype.parseOpenBracket=function(b){return this.$val.parseOpenBracket(b);};AD.ptr.prototype.addBracket=function(b,c,d,e){var b,c,d,e,f;f=this;if(!(DM.nil===e.brackets)){e.brackets.bracketAfter=true;}e.brackets=new CA.ptr(b,0,0,0,false,false,e.brackets,DM.nil,true,d,false,c,e.delimiters);};AD.prototype.addBracket=function(b,c,d,e){return this.$val.addBracket(b,c,d,e);};AD.ptr.prototype.removeBracket=function(b){var b,c;c=this;b.brackets=b.brackets.previous;};AD.prototype.removeBracket=function(b){return this.$val.removeBracket(b);};AD.ptr.prototype.parseBang=function(b){var b,c,d,e,f,g;c=CY.nil;d=this;e=b.pos;b.pos=b.pos+(1)>>0;if(b.pos=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+g])))){b.pos=b.pos+(1)>>0;c=new B.Node.ptr("","","","",16,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,$subslice(b.tokens,e,b.pos),"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");d.addBracket(c,e+2>>0,true,b);return c;}c=new B.Node.ptr("","","","",16,CY.nil,CY.nil,CY.nil,CY.nil,CY.nil,CZ.nil,$subslice(b.tokens,e,b.pos),"","",false,false,false,0,false,0,0,0,CW.nil,CW.nil,CW.nil,0,DA.nil,false,DB.nil,0,0,0,0,CW.nil,0,false,"",0,CW.nil,"",CZ.nil,CW.nil,DD.nil,false,"","","","","","","","","","","",0,"");return c;};AD.prototype.parseBang=function(b){return this.$val.parseBang(b);};BI=function(b,c){var{b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,$s,$r,$c}=$restore(this,{b,c});$s=$s||0;s:while(true){switch($s){case 0:if(b.Context.indented){$s=-1;return 0;}if(!((60===D.Peek(b.Context.currentLine,b.Context.nextNonspace)))){$s=-1;return 0;}if(b.Context.ParseOption.VditorWYSIWYG){if(A.Contains(b.Context.currentLine,(new CW($stringToBytes("vditor-comment"))))){$s=-1;return 0;}}if(b.Context.ParseOption.ProtyleWYSIWYG){if(A.Contains(b.Context.currentLine,(new CW($stringToBytes(""))))){$s=7;continue;}if(A.HasPrefix(d,(new CW($stringToBytes(""))))){$s=8;continue;}if(A.HasPrefix(d,(new CW($stringToBytes(""))))){$s=9;continue;}if(A.HasPrefix(d,(new CW($stringToBytes(""))))){$s=10;continue;}$s=11;continue;case 7:if(A.Contains(d,(new CW($stringToBytes("data-subtype=\"widget\""))))){$s=12;continue;}$s=13;continue;case 12:g=b.Context.addChild(535);$s=15;case 15:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}g;$s=14;continue;case 13:h=b.Context.addChild(500);$s=16;case 16:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}h;case 14:$s=-1;return 2;case 8:i=b.Context.addChild(510);$s=17;case 17:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}i;$s=-1;return 2;case 9:j=b.Context.addChild(505);$s=18;case 18:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}j;$s=-1;return 2;case 10:k=b.Context.addChild(550);$s=19;case 19:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}l=k;m=A.Index(d,(new CW($stringToBytes("data-av-type=\""))))+14>>0;n=m+A.Index($subslice(d,m),(new CW($stringToBytes("\""))))>>0;l.AttributeViewType=($bytesToString($subslice(d,m,n)));o=A.Index(d,(new CW($stringToBytes("data-av-id=\""))));if(0>0;p=o+A.Index($subslice(d,o),(new CW($stringToBytes("\""))))>>0;l.AttributeViewID=($bytesToString($subslice(d,o,p)));$s=22;continue;case 21:q=B.NewNodeID();$s=23;case 23:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}l.AttributeViewID=q;case 22:$s=-1;return 2;case 11:case 5:if(b.Context.ParseOption.ProtyleWYSIWYG){r=D.TrimLeft(b.Context.currentLine);s=r[1];if(!A.HasPrefix(s,(new CW($stringToBytes(">0))){break;}if((45===((j<0||j>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+j]))&&(45===(k=j+1>>0,((k<0||k>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+k])))&&(62===(l=j+2>>0,((l<0||l>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+l])))){return true;}j=j+(1)>>0;}}else if(h===(3)){m=0;while(true){if(!(m<(g-2>>0))){break;}if((63===((m<0||m>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+m]))&&(62===(n=m+1>>0,((n<0||n>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+n])))){return true;}m=m+(1)>>0;}}else if(h===(4)){return A.Contains(b,BP);}else if(h===(5)){o=0;while(true){if(!(o<(g-2>>0))){break;}if((93===((o<0||o>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+o]))&&(93===(p=o+1>>0,((p<0||p>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+p])))){return true;}o=o+(1)>>0;}}return false;};AD.prototype.isHTMLBlockClose=function(b,c){return this.$val.isHTMLBlockClose(b,c);};AD.ptr.prototype.parseHTML=function(b){var b,c,d,e,f,g,h,i,j,k,l,m;c=0;d=this;e=D.TrimLeft(b);b=e[1];f=b.$length;if(3>f){return c;}if(!((60===(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])))){return c;}c=1;g=D.AcceptTokenss(b,BK);if(0<=g){if(D.IsWhitespace(((g<0||g>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+g]))||(62===((g<0||g>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+g]))){return c;}}h=D.AcceptTokenss(b,BM);if(0<=h){if(D.IsWhitespace(((h<0||h>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+h]))||(62===((h<0||h>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+h]))){c=6;return c;}if((47===((h<0||h>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+h]))&&(62===(i=h+1>>0,((i<0||i>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+i])))){c=6;return c;}}j=D.TrimWhitespace(b);k=d.isOpenTag(j);if(k&&!((d.Context.Tip.Type===1))){c=7;return c;}l=d.isCloseTag(j);if(l&&!((d.Context.Tip.Type===1))){c=7;return c;}if(0===A.Index(b,E.StrToBytes("